packages feed

ghc 8.8.3 → 8.10.1

raw patch · 499 files changed

+90157/−79472 lines, 499 filesdep ~basedep ~ghc-bootdep ~ghc-boot-thPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc-boot, ghc-boot-th, ghc-heap, ghci, template-haskell

API changes (from Hackage documentation)

- AsmCodeGen: [ncg_x86fp_kludge] :: NcgImpl statics instr jumpDest -> [NatCmmDecl statics instr] -> [NatCmmDecl statics instr]
- Bag: foldlBag :: (r -> a -> r) -> r -> Bag a -> r
- Bag: foldlBagM :: Monad m => (b -> a -> m b) -> b -> Bag a -> m b
- Bag: foldrBag :: (a -> r -> r) -> r -> Bag a -> r
- Bag: foldrBagM :: Monad m => (a -> b -> m b) -> b -> Bag a -> m b
- BasicTypes: type Alignment = Int
- Binary: instance (GHC.Arr.Ix a, Binary.Binary a, Binary.Binary b) => Binary.Binary (GHC.Arr.Array a b)
- BkpSyn: ModuleD :: HsDeclType
- BkpSyn: SignatureD :: HsDeclType
- BkpSyn: data HsDeclType
- BlockLayout: instance GHC.Classes.Eq BlockLayout.WeightedEdge
- BlockLayout: instance GHC.Classes.Ord BlockLayout.WeightedEdge
- BlockLayout: instance Hoopl.Graph.NonLocal BlockLayout.BlockNode
- BlockLayout: instance Outputable.Outputable BlockLayout.WeightedEdge
- CFG: instance GHC.Real.Integral CFG.EdgeWeight
- CFG: weightedEdgeList :: CFG -> [(BlockId, BlockId, EdgeWeight)]
- CLabel: mkSplitMarkerLabel :: CLabel
- CgUtils: fixStgRegisters :: DynFlags -> RawCmmDecl -> RawCmmDecl
- Check: checkGuardMatches :: HsMatchContext Name -> GRHSs GhcTc (LHsExpr GhcTc) -> DsM ()
- Check: checkMatches :: DynFlags -> DsMatchContext -> [Id] -> [LMatch GhcTc (LHsExpr GhcTc)] -> DsM ()
- Check: checkSingle :: DynFlags -> DsMatchContext -> Id -> Pat GhcTc -> DsM ()
- Check: genCaseTmCs1 :: Maybe (LHsExpr GhcTc) -> [Id] -> Bag SimpleEq
- Check: genCaseTmCs2 :: Maybe (LHsExpr GhcTc) -> [Pat GhcTc] -> [Id] -> DsM (Bag SimpleEq)
- Check: instance GHC.Base.Monoid Check.Covered
- Check: instance GHC.Base.Monoid Check.Diverged
- Check: instance GHC.Base.Monoid Check.PartialResult
- Check: instance GHC.Base.Monoid Check.Provenance
- Check: instance GHC.Base.Semigroup Check.Covered
- Check: instance GHC.Base.Semigroup Check.Diverged
- Check: instance GHC.Base.Semigroup Check.PartialResult
- Check: instance GHC.Base.Semigroup Check.Provenance
- Check: instance GHC.Classes.Eq Check.Provenance
- Check: instance GHC.Classes.Ord Check.Provenance
- Check: instance GHC.Show.Show Check.Covered
- Check: instance GHC.Show.Show Check.Diverged
- Check: instance GHC.Show.Show Check.Provenance
- Check: instance Outputable.Outputable (Check.PmPat a)
- Check: instance Outputable.Outputable Check.Covered
- Check: instance Outputable.Outputable Check.Diverged
- Check: instance Outputable.Outputable Check.InhabitationCandidate
- Check: instance Outputable.Outputable Check.PartialResult
- Check: instance Outputable.Outputable Check.Provenance
- Check: instance Outputable.Outputable Check.ValVec
- Check: isAnyPmCheckEnabled :: DynFlags -> DsMatchContext -> Bool
- CmmType: W80 :: Width
- CodeGen.Platform: activeStgRegs :: Platform -> [GlobalReg]
- CodeGen.Platform: callerSaves :: Platform -> GlobalReg -> Bool
- CodeGen.Platform: freeReg :: Platform -> RegNo -> Bool
- CodeGen.Platform: globalRegMaybe :: Platform -> GlobalReg -> Maybe RealReg
- CodeGen.Platform: haveRegBase :: Platform -> Bool
- CodeGen.Platform.ARM: activeStgRegs :: [GlobalReg]
- CodeGen.Platform.ARM: callerSaves :: GlobalReg -> Bool
- CodeGen.Platform.ARM: freeReg :: RegNo -> Bool
- CodeGen.Platform.ARM: globalRegMaybe :: GlobalReg -> Maybe RealReg
- CodeGen.Platform.ARM: haveRegBase :: Bool
- CodeGen.Platform.ARM64: activeStgRegs :: [GlobalReg]
- CodeGen.Platform.ARM64: callerSaves :: GlobalReg -> Bool
- CodeGen.Platform.ARM64: freeReg :: RegNo -> Bool
- CodeGen.Platform.ARM64: globalRegMaybe :: GlobalReg -> Maybe RealReg
- CodeGen.Platform.ARM64: haveRegBase :: Bool
- CodeGen.Platform.NoRegs: activeStgRegs :: [GlobalReg]
- CodeGen.Platform.NoRegs: callerSaves :: GlobalReg -> Bool
- CodeGen.Platform.NoRegs: freeReg :: RegNo -> Bool
- CodeGen.Platform.NoRegs: globalRegMaybe :: GlobalReg -> Maybe RealReg
- CodeGen.Platform.NoRegs: haveRegBase :: Bool
- CodeGen.Platform.PPC: activeStgRegs :: [GlobalReg]
- CodeGen.Platform.PPC: callerSaves :: GlobalReg -> Bool
- CodeGen.Platform.PPC: freeReg :: RegNo -> Bool
- CodeGen.Platform.PPC: globalRegMaybe :: GlobalReg -> Maybe RealReg
- CodeGen.Platform.PPC: haveRegBase :: Bool
- CodeGen.Platform.SPARC: activeStgRegs :: [GlobalReg]
- CodeGen.Platform.SPARC: callerSaves :: GlobalReg -> Bool
- CodeGen.Platform.SPARC: freeReg :: RegNo -> Bool
- CodeGen.Platform.SPARC: globalRegMaybe :: GlobalReg -> Maybe RealReg
- CodeGen.Platform.SPARC: haveRegBase :: Bool
- CodeGen.Platform.X86: activeStgRegs :: [GlobalReg]
- CodeGen.Platform.X86: callerSaves :: GlobalReg -> Bool
- CodeGen.Platform.X86: freeReg :: RegNo -> Bool
- CodeGen.Platform.X86: freeRegBase :: RegNo -> Bool
- CodeGen.Platform.X86: globalRegMaybe :: GlobalReg -> Maybe RealReg
- CodeGen.Platform.X86: haveRegBase :: Bool
- CodeGen.Platform.X86_64: activeStgRegs :: [GlobalReg]
- CodeGen.Platform.X86_64: callerSaves :: GlobalReg -> Bool
- CodeGen.Platform.X86_64: freeReg :: RegNo -> Bool
- CodeGen.Platform.X86_64: freeRegBase :: RegNo -> Bool
- CodeGen.Platform.X86_64: globalRegMaybe :: GlobalReg -> Maybe RealReg
- CodeGen.Platform.X86_64: haveRegBase :: Bool
- Coercion: maybeSubCo :: EqRel -> Coercion -> Coercion
- Config: IntegerGMP :: IntegerLibrary
- Config: IntegerSimple :: IntegerLibrary
- Config: cGHC_SPLIT_PGM :: String
- Config: cGHC_UNLIT_PGM :: String
- Config: cGhcDebugged :: Bool
- Config: cGhcEnableTablesNextToCode :: String
- Config: cGhcRTSWays :: String
- Config: cGhcRtsWithLibdw :: Bool
- Config: cGhcThreaded :: Bool
- Config: cGhcWithInterpreter :: String
- Config: cGhcWithNativeCodeGen :: String
- Config: cGhcWithSMP :: String
- Config: cIntegerLibraryType :: IntegerLibrary
- Config: cLeadingUnderscore :: String
- Config: cLibFFI :: Bool
- Config: cProjectGitCommitId :: String
- Config: cProjectPatchLevel :: String
- Config: cProjectPatchLevel1 :: String
- Config: cProjectPatchLevel2 :: String
- Config: cProjectVersion :: String
- Config: cProjectVersionInt :: String
- Config: cSupportsSplitObjs :: String
- Config: cTargetPlatformString :: String
- Config: data IntegerLibrary
- Config: instance GHC.Classes.Eq Config.IntegerLibrary
- Convert: convertToHsDecls :: SrcSpan -> [Dec] -> Either MsgDoc [LHsDecl GhcPs]
- Convert: convertToHsExpr :: SrcSpan -> Exp -> Either MsgDoc (LHsExpr GhcPs)
- Convert: convertToHsType :: SrcSpan -> Type -> Either MsgDoc (LHsType GhcPs)
- Convert: convertToPat :: SrcSpan -> Pat -> Either MsgDoc (LPat GhcPs)
- Convert: instance GHC.Base.Applicative Convert.CvtM
- Convert: instance GHC.Base.Functor Convert.CvtM
- Convert: instance GHC.Base.Monad Convert.CvtM
- Convert: thRdrNameGuesses :: Name -> [RdrName]
- CoreMonad: liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b
- CoreMonad: liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c
- CoreMonad: liftIO3 :: MonadIO m => (a -> b -> c -> IO d) -> a -> b -> c -> m d
- CoreMonad: liftIO4 :: MonadIO m => (a -> b -> c -> d -> IO e) -> a -> b -> c -> d -> m e
- CoreMonad: reinitializeGlobals :: CoreM ()
- CoreTidy: tidyRule :: TidyEnv -> CoreRule -> CoreRule
- Debug: dblIsEntry :: DebugBlock -> Bool
- Demand: catchArgDmd :: Demand
- Demand: exnRes :: DmdResult
- Demand: exnSig :: StrictSig
- Demand: instance Binary.Binary Demand.ExnStr
- Demand: instance GHC.Classes.Eq Demand.ExnStr
- Demand: instance GHC.Show.Show Demand.ExnStr
- Demand: mkStrictSig :: DmdType -> StrictSig
- Demand: removeDmdTyArgs :: DmdType -> DmdType
- DriverPhases: SplitAs :: Phase
- DriverPhases: Splitter :: Phase
- DsMonad: addDictsDs :: Bag EvVar -> DsM a -> DsM a
- DsMonad: addTmCsDs :: Bag SimpleEq -> DsM a -> DsM a
- DsMonad: getDictsDs :: DsM (Bag EvVar)
- DsMonad: getTmCsDs :: DsM (Bag SimpleEq)
- DsMonad: incrCheckPmIterDs :: DsM Int
- DsMonad: resetPmIterDs :: DsM ()
- DsUtils: mkLHsVarPatTup :: [Id] -> LPat GhcTc
- DynFlags: Opt_D_dump_shape :: DumpFlag
- DynFlags: Opt_SplitObjs :: GeneralFlag
- DynFlags: [maxPmCheckIterations] :: DynFlags -> Int
- DynFlags: [pc_platformConstants] :: PlatformConstants -> ()
- DynFlags: [sExtraGccViaCFlags] :: Settings -> [String]
- DynFlags: [sGccSupportsNoPie] :: Settings -> Bool
- DynFlags: [sGhcUsagePath] :: Settings -> FilePath
- DynFlags: [sGhciUsagePath] :: Settings -> FilePath
- DynFlags: [sLdIsGnuLd] :: Settings -> Bool
- DynFlags: [sLdSupportsBuildId] :: Settings -> Bool
- DynFlags: [sLdSupportsCompactUnwind] :: Settings -> Bool
- DynFlags: [sLdSupportsFilelist] :: Settings -> Bool
- DynFlags: [sOpt_F] :: Settings -> [String]
- DynFlags: [sOpt_L] :: Settings -> [String]
- DynFlags: [sOpt_P] :: Settings -> [String]
- DynFlags: [sOpt_P_fingerprint] :: Settings -> Fingerprint
- DynFlags: [sOpt_a] :: Settings -> [String]
- DynFlags: [sOpt_c] :: Settings -> [String]
- DynFlags: [sOpt_i] :: Settings -> [String]
- DynFlags: [sOpt_l] :: Settings -> [String]
- DynFlags: [sOpt_lc] :: Settings -> [String]
- DynFlags: [sOpt_lcc] :: Settings -> [String]
- DynFlags: [sOpt_lo] :: Settings -> [String]
- DynFlags: [sOpt_windres] :: Settings -> [String]
- DynFlags: [sPgm_F] :: Settings -> String
- DynFlags: [sPgm_L] :: Settings -> String
- DynFlags: [sPgm_P] :: Settings -> (String, [Option])
- DynFlags: [sPgm_T] :: Settings -> String
- DynFlags: [sPgm_a] :: Settings -> (String, [Option])
- DynFlags: [sPgm_ar] :: Settings -> String
- DynFlags: [sPgm_c] :: Settings -> (String, [Option])
- DynFlags: [sPgm_dll] :: Settings -> (String, [Option])
- DynFlags: [sPgm_i] :: Settings -> String
- DynFlags: [sPgm_l] :: Settings -> (String, [Option])
- DynFlags: [sPgm_lc] :: Settings -> (String, [Option])
- DynFlags: [sPgm_lcc] :: Settings -> (String, [Option])
- DynFlags: [sPgm_libtool] :: Settings -> String
- DynFlags: [sPgm_lo] :: Settings -> (String, [Option])
- DynFlags: [sPgm_ranlib] :: Settings -> String
- DynFlags: [sPgm_s] :: Settings -> (String, [Option])
- DynFlags: [sPgm_windres] :: Settings -> String
- DynFlags: [sProgramName] :: Settings -> String
- DynFlags: [sProjectVersion] :: Settings -> String
- DynFlags: [sSystemPackageConfig] :: Settings -> FilePath
- DynFlags: [sTmpDir] :: Settings -> String
- DynFlags: [sToolDir] :: Settings -> Maybe FilePath
- DynFlags: [sTopDir] :: Settings -> FilePath
- DynFlags: [settings] :: DynFlags -> Settings
- DynFlags: instance GHC.Classes.Eq DynFlags.Option
- DynFlags: interpretPackageEnv :: DynFlags -> IO DynFlags
- DynFlags: mkTablesNextToCode :: Bool -> Bool
- DynFlags: pgm_s :: DynFlags -> (String, [Option])
- DynFlags: rawSettings :: DynFlags -> [(String, String)]
- DynFlags: targetPlatform :: DynFlags -> Platform
- DynFlags: type LlvmConfig = (LlvmTargets, LlvmPasses)
- DynFlags: type LlvmPasses = [(Int, String)]
- DynFlags: type LlvmTargets = [(String, LlvmTarget)]
- DynamicLoading: pluginError :: [ModuleName] -> a
- FamInst: injTyVarsOfType :: TcTauType -> TcTyVarSet
- FamInst: injTyVarsOfTypes :: [Type] -> VarSet
- FamInst: makeInjectivityErrors :: CoAxiom br -> CoAxBranch -> [Bool] -> [CoAxBranch] -> [(SDoc, SrcSpan)]
- FastString: [fs_ref] :: FastString -> {-# UNPACK #-} !IORef (Maybe FastZString)
- FastString: hasZEncoding :: FastString -> Bool
- Format: FF80 :: Format
- GHC: Opt_SplitObjs :: GeneralFlag
- GHC: [llvmPasses] :: DynFlags -> LlvmPasses
- GHC: [llvmTargets] :: DynFlags -> LlvmTargets
- GHC: [maxPmCheckIterations] :: DynFlags -> Int
- GHC: [mi_exp_hash] :: ModIface -> !Fingerprint
- GHC: [mi_finsts] :: ModIface -> !WhetherHasFamInst
- GHC: [mi_fix_fn] :: ModIface -> OccName -> Maybe Fixity
- GHC: [mi_flag_hash] :: ModIface -> !Fingerprint
- GHC: [mi_hash_fn] :: ModIface -> OccName -> Maybe (OccName, Fingerprint)
- GHC: [mi_hpc_hash] :: ModIface -> !Fingerprint
- GHC: [mi_iface_hash] :: ModIface -> !Fingerprint
- GHC: [mi_mod_hash] :: ModIface -> !Fingerprint
- GHC: [mi_opt_hash] :: ModIface -> !Fingerprint
- GHC: [mi_orphan] :: ModIface -> !WhetherHasOrphans
- GHC: [mi_orphan_hash] :: ModIface -> !Fingerprint
- GHC: [mi_plugin_hash] :: ModIface -> !Fingerprint
- GHC: [mi_warn_fn] :: ModIface -> OccName -> Maybe WarningTxt
- GHC: [settings] :: DynFlags -> Settings
- GHC: data ModIface
- GhcPlugins: ClassPred :: Class -> [Type] -> PredTree
- GhcPlugins: EqPred :: EqRel -> Type -> Type -> PredTree
- GhcPlugins: ForAllPred :: [TyCoVarBinder] -> [PredType] -> PredType -> PredTree
- GhcPlugins: IrredPred :: PredType -> PredTree
- GhcPlugins: NomEq :: EqRel
- GhcPlugins: ReprEq :: EqRel
- GhcPlugins: [tcm_smart] :: TyCoMapper env m -> Bool
- GhcPlugins: caseBinder :: TyCoBinder -> (TyCoVarBinder -> a) -> (Type -> a) -> a
- GhcPlugins: classifyPredType :: PredType -> PredTree
- GhcPlugins: dVarSetElemsWellScoped :: DVarSet -> [Var]
- GhcPlugins: data EqRel
- GhcPlugins: data PredTree
- GhcPlugins: eqRelRole :: EqRel -> Role
- GhcPlugins: equalityTyCon :: Role -> TyCon
- GhcPlugins: getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- GhcPlugins: getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
- GhcPlugins: getEqPredRole :: PredType -> Role
- GhcPlugins: getEqPredTys :: PredType -> (Type, Type)
- GhcPlugins: getEqPredTys_maybe :: PredType -> Maybe (Role, Type, Type)
- GhcPlugins: isCTupleClass :: Class -> Bool
- GhcPlugins: isClassPred :: PredType -> Bool
- GhcPlugins: isDictId :: Id -> Bool
- GhcPlugins: isDictLikeTy :: Type -> Bool
- GhcPlugins: isDictTy :: Type -> Bool
- GhcPlugins: isEqPred :: PredType -> Bool
- GhcPlugins: isEvVar :: Var -> Bool
- GhcPlugins: isEvVarType :: Type -> Bool
- GhcPlugins: isIPClass :: Class -> Bool
- GhcPlugins: isIPPred :: PredType -> Bool
- GhcPlugins: isIPPred_maybe :: Type -> Maybe (FastString, Type)
- GhcPlugins: isIPTyCon :: TyCon -> Bool
- GhcPlugins: isNomEqPred :: PredType -> Bool
- GhcPlugins: maybeSubCo :: EqRel -> Coercion -> Coercion
- GhcPlugins: mkClassPred :: Class -> [Type] -> PredType
- GhcPlugins: mkFunTy :: Type -> Type -> Type
- GhcPlugins: mkFunTys :: [Type] -> Type -> Type
- GhcPlugins: mkTyCoPiTy :: TyCoBinder -> Type -> Type
- GhcPlugins: mkTyCoPiTys :: [TyCoBinder] -> Type -> Type
- GhcPlugins: pprClassPred :: Class -> [Type] -> SDoc
- GhcPlugins: pprForAll :: [TyCoVarBinder] -> SDoc
- GhcPlugins: pprKind :: Kind -> SDoc
- GhcPlugins: pprParendKind :: Kind -> SDoc
- GhcPlugins: pprParendType :: Type -> SDoc
- GhcPlugins: pprPrecType :: PprPrec -> Type -> SDoc
- GhcPlugins: pprShortTyThing :: TyThing -> SDoc
- GhcPlugins: pprSigmaType :: Type -> SDoc
- GhcPlugins: pprSourceTyCon :: TyCon -> SDoc
- GhcPlugins: pprTCvBndr :: TyCoVarBinder -> SDoc
- GhcPlugins: pprTCvBndrs :: [TyCoVarBinder] -> SDoc
- GhcPlugins: pprTheta :: ThetaType -> SDoc
- GhcPlugins: pprThetaArrowTy :: ThetaType -> SDoc
- GhcPlugins: pprTyThingCategory :: TyThing -> SDoc
- GhcPlugins: pprTyVar :: TyVar -> SDoc
- GhcPlugins: pprTyVars :: [TyVar] -> SDoc
- GhcPlugins: pprType :: Type -> SDoc
- GhcPlugins: pprTypeApp :: TyCon -> [Type] -> SDoc
- GhcPlugins: pprUserForAll :: [TyCoVarBinder] -> SDoc
- GhcPlugins: pprWithExplicitKindsWhen :: Bool -> SDoc -> SDoc
- GhcPlugins: pprWithTYPE :: Type -> SDoc
- GhcPlugins: predTypeEqRel :: PredType -> EqRel
- GhcPlugins: splitCoercionType_maybe :: Type -> Maybe (Type, Type)
- GhcPlugins: tcRepSplitTyConApp :: HasCallStack => Type -> (TyCon, [Type])
- GhcPlugins: tcRepSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- GhcPlugins: tyCoVarsOfBindersWellScoped :: [TyVar] -> [TyVar]
- GhcPlugins: type Alignment = Int
- GhcPlugins: type DictId = EvId
- HieAst: instance (HieAst.HasLoc a, HieAst.HasLoc b) => HieAst.HasLoc (HsDecls.FamEqn s a b)
- HieAst: instance (HieAst.HasLoc thing, HieAst.ToHie (HieAst.TScoped thing)) => HieAst.ToHie (HieAst.TScoped (HsTypes.HsImplicitBndrs HsExtension.GhcRn thing))
- HieAst: instance (HieAst.HasLoc thing, HieAst.ToHie (HieAst.TScoped thing)) => HieAst.ToHie (HieAst.TScoped (HsTypes.HsWildCardBndrs HsExtension.GhcRn thing))
- HieAst: instance (HieAst.HasLoc tm, HieAst.HasLoc ty) => HieAst.HasLoc (HsTypes.HsArg tm ty)
- HieAst: instance (HieAst.ToHie (HieAst.BindContext (HsBinds.LHsBind a)), HieAst.ToHie (HieAst.SigContext (HsBinds.LSig a)), HieAst.ToHie (HieAst.RScoped (HsExtension.XXValBindsLR a a))) => HieAst.ToHie (HieAst.RScoped (HsBinds.HsValBindsLR a a))
- HieAst: instance (HieAst.ToHie (HieAst.Context (SrcLoc.Located (HsExtension.IdP a))), HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HsBinds.HsPatSynDir a)) => HieAst.ToHie (SrcLoc.Located (HsBinds.PatSynBind a a))
- HieAst: instance (HieAst.ToHie (HieAst.Context (SrcLoc.Located (HsExtension.IdP a))), HieAst.ToHie (HsExpr.MatchGroup a (HsExpr.LHsExpr a)), HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HsExpr.GRHSs a (HsExpr.LHsExpr a)), HieAst.ToHie (HsExpr.LHsExpr a), HieAst.ToHie (SrcLoc.Located (HsBinds.PatSynBind a a)), HieAst.HasType (HsBinds.LHsBind a), HieAst.ModifyState (HsExtension.IdP a), Data.Data.Data (HsBinds.HsBind a)) => HieAst.ToHie (HieAst.BindContext (HsBinds.LHsBind a))
- HieAst: instance (HieAst.ToHie (HieAst.RFContext (SrcLoc.Located label)), HieAst.ToHie arg, HieAst.HasLoc arg, Data.Data.Data label, Data.Data.Data arg) => HieAst.ToHie (HieAst.RContext (HsPat.LHsRecField' label arg))
- HieAst: instance (HieAst.ToHie (HsExpr.LHsCmd a), Data.Data.Data (HsExpr.HsCmdTop a)) => HieAst.ToHie (HsExpr.LHsCmdTop a)
- HieAst: instance (HieAst.ToHie (HsExpr.LHsExpr a), Data.Data.Data (HsExpr.HsSplice a)) => HieAst.ToHie (SrcLoc.Located (HsExpr.HsSplice a))
- HieAst: instance (HieAst.ToHie (HsExpr.LHsExpr a), HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HieAst.BindContext (HsBinds.LHsBind a)), HieAst.ToHie (HieAst.SigContext (HsBinds.LSig a)), HieAst.ToHie (HieAst.RScoped (HsBinds.HsValBindsLR a a)), Data.Data.Data (HsBinds.HsLocalBinds a)) => HieAst.ToHie (HieAst.RScoped (HsBinds.LHsLocalBinds a))
- HieAst: instance (HieAst.ToHie (SrcLoc.Located body), HieAst.ToHie (HieAst.RScoped (HsExpr.GuardLStmt a)), Data.Data.Data (HsExpr.GRHS a (SrcLoc.Located body))) => HieAst.ToHie (HsExpr.LGRHS a (SrcLoc.Located body))
- HieAst: instance (HieAst.ToHie arg, HieAst.ToHie rec) => HieAst.ToHie (HsTypes.HsConDetails arg rec)
- HieAst: instance (HieAst.ToHie body, HieAst.ToHie (HsExpr.LGRHS a body), HieAst.ToHie (HieAst.RScoped (HsBinds.LHsLocalBinds a))) => HieAst.ToHie (HsExpr.GRHSs a body)
- HieAst: instance (HieAst.ToHie pats, HieAst.ToHie rhs, HieAst.HasLoc pats, HieAst.HasLoc rhs) => HieAst.ToHie (HieAst.TScoped (HsDecls.FamEqn HsExtension.GhcRn pats rhs))
- HieAst: instance (HieAst.ToHie pats, HieAst.ToHie rhs, HieAst.HasLoc pats, HieAst.HasLoc rhs) => HieAst.ToHie (HsDecls.FamEqn HsExtension.GhcRn pats rhs)
- HieAst: instance (HieAst.ToHie tm, HieAst.ToHie ty) => HieAst.ToHie (HsTypes.HsArg tm ty)
- HieAst: instance (a GHC.Types.~ HsExtension.GhcPass p, HieAst.ToHie (HieAst.Context (SrcLoc.Located (HsExtension.IdP a))), HieAst.HasType (HsExpr.LHsExpr a), HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HsExpr.MatchGroup a (HsExpr.LHsExpr a)), HieAst.ToHie (HsExpr.LGRHS a (HsExpr.LHsExpr a)), HieAst.ToHie (HieAst.RContext (HsExpr.HsRecordBinds a)), HieAst.ToHie (HieAst.RFContext (SrcLoc.Located (HsTypes.AmbiguousFieldOcc a))), HieAst.ToHie (HsExpr.ArithSeqInfo a), HieAst.ToHie (HsExpr.LHsCmdTop a), HieAst.ToHie (HieAst.RScoped (HsExpr.GuardLStmt a)), HieAst.ToHie (HieAst.RScoped (HsBinds.LHsLocalBinds a)), HieAst.ToHie (HieAst.TScoped (HsTypes.LHsWcType (HsExtension.NoGhcTc a))), HieAst.ToHie (HieAst.TScoped (HsTypes.LHsSigWcType (HsExtension.NoGhcTc a))), Data.Data.Data (HsExpr.HsExpr a), Data.Data.Data (HsExpr.HsSplice a), Data.Data.Data (HsExpr.HsTupArg a), Data.Data.Data (HsTypes.AmbiguousFieldOcc a)) => HieAst.ToHie (HsExpr.LHsExpr (HsExtension.GhcPass p))
- HieAst: instance (a GHC.Types.~ HsExtension.GhcPass p, HieAst.ToHie (HieAst.Context (SrcLoc.Located (HsExtension.IdP a))), HieAst.ToHie (HieAst.RContext (HsPat.HsRecFields a (HieAst.PScoped (HsPat.LPat a)))), HieAst.ToHie (HsExpr.LHsExpr a), HieAst.ToHie (HieAst.TScoped (HsTypes.LHsSigWcType a)), HieAst.ProtectSig a, HieAst.ToHie (HieAst.TScoped (HieAst.ProtectedSig a)), HieAst.HasType (HsPat.LPat a), Data.Data.Data (HsExpr.HsSplice a)) => HieAst.ToHie (HieAst.PScoped (HsPat.LPat (HsExtension.GhcPass p)))
- HieAst: instance (a GHC.Types.~ HsExtension.GhcPass p, HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HieAst.BindContext (HsBinds.LHsBind a)), HieAst.ToHie (HsExpr.LHsExpr a), HieAst.ToHie (HieAst.SigContext (HsBinds.LSig a)), HieAst.ToHie (HieAst.RScoped (HsBinds.HsValBindsLR a a)), Data.Data.Data (HsExpr.StmtLR a a (SrcLoc.Located (HsExpr.HsExpr a))), Data.Data.Data (HsBinds.HsLocalBinds a)) => HieAst.ToHie (HieAst.RScoped (HsExpr.ApplicativeArg (HsExtension.GhcPass p)))
- HieAst: instance (a GHC.Types.~ HsExtension.GhcPass p, HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HieAst.BindContext (HsBinds.LHsBind a)), HieAst.ToHie (HsExpr.LHsExpr a), HieAst.ToHie (HsExpr.MatchGroup a (HsExpr.LHsCmd a)), HieAst.ToHie (HieAst.SigContext (HsBinds.LSig a)), HieAst.ToHie (HieAst.RScoped (HsBinds.HsValBindsLR a a)), Data.Data.Data (HsExpr.HsCmd a), Data.Data.Data (HsExpr.HsCmdTop a), Data.Data.Data (HsExpr.StmtLR a a (SrcLoc.Located (HsExpr.HsCmd a))), Data.Data.Data (HsBinds.HsLocalBinds a), Data.Data.Data (HsExpr.StmtLR a a (SrcLoc.Located (HsExpr.HsExpr a)))) => HieAst.ToHie (HsExpr.LHsCmd (HsExtension.GhcPass p))
- HieAst: instance (a GHC.Types.~ HsExtension.GhcPass p, HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HsExpr.LHsExpr a), HieAst.ToHie (HieAst.SigContext (HsBinds.LSig a)), HieAst.ToHie (HieAst.RScoped (HsBinds.LHsLocalBinds a)), HieAst.ToHie (HieAst.RScoped (HsExpr.ApplicativeArg a)), HieAst.ToHie (SrcLoc.Located body), Data.Data.Data (HsExpr.StmtLR a a (SrcLoc.Located body)), Data.Data.Data (HsExpr.StmtLR a a (SrcLoc.Located (HsExpr.HsExpr a)))) => HieAst.ToHie (HieAst.RScoped (HsExpr.LStmt (HsExtension.GhcPass p) (SrcLoc.Located body)))
- HieAst: instance (a GHC.Types.~ HsExtension.GhcPass p, HieAst.ToHie (HsExpr.LHsExpr a), Data.Data.Data (HsExpr.HsTupArg a)) => HieAst.ToHie (HsExpr.LHsTupArg (HsExtension.GhcPass p))
- HieAst: instance (a GHC.Types.~ HsExtension.GhcPass p, HieAst.ToHie body, HieAst.ToHie (HsExpr.HsMatchContext (PlaceHolder.NameOrRdrName (HsExtension.IdP a))), HieAst.ToHie (HieAst.PScoped (HsPat.LPat a)), HieAst.ToHie (HsExpr.GRHSs a body), Data.Data.Data (HsExpr.Match a body)) => HieAst.ToHie (HsExpr.LMatch (HsExtension.GhcPass p) body)
- HieAst: instance HieAst.HasLoc (HsDecls.HsDataDefn HsExtension.GhcRn)
- HieAst: instance HieAst.HasLoc (HsPat.Pat (HsExtension.GhcPass a))
- HieAst: instance HieAst.HasLoc (HsTypes.LHsQTyVars HsExtension.GhcRn)
- HieAst: instance HieAst.HasLoc thing => HieAst.HasLoc (HsTypes.HsImplicitBndrs a thing)
- HieAst: instance HieAst.HasLoc thing => HieAst.HasLoc (HsTypes.HsWildCardBndrs a thing)
- HieAst: instance HieAst.HasType (HsBinds.LHsBind HsExtension.GhcRn)
- HieAst: instance HieAst.HasType (HsBinds.LHsBind HsExtension.GhcTc)
- HieAst: instance HieAst.HasType (HsExpr.LHsExpr HsExtension.GhcRn)
- HieAst: instance HieAst.HasType (HsExpr.LHsExpr HsExtension.GhcTc)
- HieAst: instance HieAst.HasType (HsPat.LPat HsExtension.GhcRn)
- HieAst: instance HieAst.HasType (HsPat.LPat HsExtension.GhcTc)
- HieAst: instance HieAst.ProtectSig HsExtension.GhcRn
- HieAst: instance HieAst.ProtectSig HsExtension.GhcTc
- HieAst: instance HieAst.ToHie (HieAst.Context (SrcLoc.Located HsExtension.NoExt))
- HieAst: instance HieAst.ToHie (HieAst.Context (SrcLoc.Located a)) => HieAst.ToHie (HsDecls.AnnProvenance a)
- HieAst: instance HieAst.ToHie (HieAst.Context (SrcLoc.Located a)) => HieAst.ToHie (HsExpr.HsMatchContext a)
- HieAst: instance HieAst.ToHie (HieAst.Context a) => HieAst.ToHie (HieAst.PatSynFieldContext (HsBinds.RecordPatSynField a))
- HieAst: instance HieAst.ToHie (HieAst.IEContext (HsImpExp.LIE HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.IEContext (HsImpExp.LIEWrappedName Name.Name))
- HieAst: instance HieAst.ToHie (HieAst.RContext (HsPat.LHsRecField a arg)) => HieAst.ToHie (HieAst.RContext (HsPat.HsRecFields a arg))
- HieAst: instance HieAst.ToHie (HieAst.RFContext (HsTypes.LFieldOcc HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.RFContext (HsTypes.LFieldOcc HsExtension.GhcTc))
- HieAst: instance HieAst.ToHie (HieAst.RFContext (SrcLoc.Located (HsTypes.AmbiguousFieldOcc HsExtension.GhcRn)))
- HieAst: instance HieAst.ToHie (HieAst.RFContext (SrcLoc.Located (HsTypes.AmbiguousFieldOcc HsExtension.GhcTc)))
- HieAst: instance HieAst.ToHie (HieAst.RScoped (HsBinds.NHsValBindsLR HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.RScoped (HsBinds.NHsValBindsLR HsExtension.GhcTc))
- HieAst: instance HieAst.ToHie (HieAst.RScoped (HsDecls.LFamilyResultSig HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.RScoped (HsDecls.LRuleBndr HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.SigContext (HsBinds.LSig HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.SigContext (HsBinds.LSig HsExtension.GhcTc))
- HieAst: instance HieAst.ToHie (HieAst.TScoped (HsTypes.LHsQTyVars HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.TScoped (HsTypes.LHsSigWcType HsExtension.GhcTc))
- HieAst: instance HieAst.ToHie (HieAst.TScoped (HsTypes.LHsType HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HieAst.TScoped (HsTypes.LHsWcType HsExtension.GhcTc))
- HieAst: instance HieAst.ToHie (HieAst.TScoped HsExtension.NoExt)
- HieAst: instance HieAst.ToHie (HieAst.TVScoped (HsTypes.LHsTyVarBndr HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (HsBinds.LFixitySig HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.FamilyInfo HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.HsDataDefn HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.HsDeriving HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LAnnDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LClsInstDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LConDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LDataFamInstDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LDefaultDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LDerivDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LFamilyDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LForeignDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LHsDerivingClause HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LInjectivityAnn HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LInstDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LRoleAnnotDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LRuleDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LRuleDecls HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LSpliceDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LTyClDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LTyFamInstDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LWarnDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.LWarnDecls HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsDecls.TyClGroup HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsExpr.HsBracket a)
- HieAst: instance HieAst.ToHie (HsExpr.HsMatchContext a) => HieAst.ToHie (HsExpr.HsStmtContext a)
- HieAst: instance HieAst.ToHie (HsExpr.LHsExpr a) => HieAst.ToHie (HsExpr.ArithSeqInfo a)
- HieAst: instance HieAst.ToHie (HsExpr.LMatch a body) => HieAst.ToHie (HsExpr.MatchGroup a body)
- HieAst: instance HieAst.ToHie (HsExpr.MatchGroup a (HsExpr.LHsExpr a)) => HieAst.ToHie (HsBinds.HsPatSynDir a)
- HieAst: instance HieAst.ToHie (HsImpExp.LImportDecl HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsTypes.LConDeclField HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsTypes.LHsContext HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (HsTypes.LHsType HsExtension.GhcRn)
- HieAst: instance HieAst.ToHie (SrcLoc.Located (HsDecls.DerivStrategy HsExtension.GhcRn))
- HieAst: instance HieAst.ToHie (SrcLoc.Located HsTypes.HsIPName)
- HieAst: instance HieAst.ToHie (SrcLoc.Located [HsTypes.LConDeclField HsExtension.GhcRn])
- HieAst: instance HieAst.ToHie HsDecls.ForeignExport
- HieAst: instance HieAst.ToHie HsDecls.ForeignImport
- HieAst: instance HieAst.ToHie HsExpr.PendingRnSplice
- HieAst: instance HieAst.ToHie HsExpr.PendingTcSplice
- Hoopl.Block: data C
- Hoopl.Block: data O
- Hoopl.Dataflow: data C
- Hoopl.Dataflow: data O
- HsBinds: ABE :: XABE p -> IdP p -> IdP p -> HsWrapper -> TcSpecPrags -> ABExport p
- HsBinds: AbsBinds :: XAbsBinds idL idR -> [TyVar] -> [EvVar] -> [ABExport idL] -> [TcEvBinds] -> LHsBinds idL -> Bool -> HsBindLR idL idR
- HsBinds: ClassOpSig :: XClassOpSig pass -> Bool -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass
- HsBinds: CompleteMatchSig :: XCompleteMatchSig pass -> SourceText -> Located [Located (IdP pass)] -> Maybe (Located (IdP pass)) -> Sig pass
- HsBinds: EmptyLocalBinds :: XEmptyLocalBinds idL idR -> HsLocalBindsLR idL idR
- HsBinds: ExplicitBidirectional :: MatchGroup id (LHsExpr id) -> HsPatSynDir id
- HsBinds: FixSig :: XFixSig pass -> FixitySig pass -> Sig pass
- HsBinds: FixitySig :: XFixitySig pass -> [Located (IdP pass)] -> Fixity -> FixitySig pass
- HsBinds: FunBind :: XFunBind idL idR -> Located (IdP idL) -> MatchGroup idR (LHsExpr idR) -> HsWrapper -> [Tickish Id] -> HsBindLR idL idR
- HsBinds: HsIPBinds :: XHsIPBinds idL idR -> HsIPBinds idR -> HsLocalBindsLR idL idR
- HsBinds: HsValBinds :: XHsValBinds idL idR -> HsValBindsLR idL idR -> HsLocalBindsLR idL idR
- HsBinds: IPBind :: XCIPBind id -> Either (Located HsIPName) (IdP id) -> LHsExpr id -> IPBind id
- HsBinds: IPBinds :: XIPBinds id -> [LIPBind id] -> HsIPBinds id
- HsBinds: IdSig :: XIdSig pass -> Id -> Sig pass
- HsBinds: ImplicitBidirectional :: HsPatSynDir id
- HsBinds: InlineSig :: XInlineSig pass -> Located (IdP pass) -> InlinePragma -> Sig pass
- HsBinds: IsDefaultMethod :: TcSpecPrags
- HsBinds: MinimalSig :: XMinimalSig pass -> SourceText -> LBooleanFormula (Located (IdP pass)) -> Sig pass
- HsBinds: NPatBindTc :: NameSet -> Type -> NPatBindTc
- HsBinds: NValBinds :: [(RecFlag, LHsBinds idL)] -> [LSig GhcRn] -> NHsValBindsLR idL
- HsBinds: PSB :: XPSB idL idR -> Located (IdP idL) -> HsPatSynDetails (Located (IdP idR)) -> LPat idR -> HsPatSynDir idR -> PatSynBind idL idR
- HsBinds: PatBind :: XPatBind idL idR -> LPat idL -> GRHSs idR (LHsExpr idR) -> ([Tickish Id], [[Tickish Id]]) -> HsBindLR idL idR
- HsBinds: PatSynBind :: XPatSynBind idL idR -> PatSynBind idL idR -> HsBindLR idL idR
- HsBinds: PatSynSig :: XPatSynSig pass -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass
- HsBinds: RecordPatSynField :: a -> a -> RecordPatSynField a
- HsBinds: SCCFunSig :: XSCCFunSig pass -> SourceText -> Located (IdP pass) -> Maybe (Located StringLiteral) -> Sig pass
- HsBinds: SpecInstSig :: XSpecInstSig pass -> SourceText -> LHsSigType pass -> Sig pass
- HsBinds: SpecPrag :: Id -> HsWrapper -> InlinePragma -> TcSpecPrag
- HsBinds: SpecPrags :: [LTcSpecPrag] -> TcSpecPrags
- HsBinds: SpecSig :: XSpecSig pass -> Located (IdP pass) -> [LHsSigType pass] -> InlinePragma -> Sig pass
- HsBinds: TypeSig :: XTypeSig pass -> [Located (IdP pass)] -> LHsSigWcType pass -> Sig pass
- HsBinds: Unidirectional :: HsPatSynDir id
- HsBinds: ValBinds :: XValBinds idL idR -> LHsBindsLR idL idR -> [LSig idR] -> HsValBindsLR idL idR
- HsBinds: VarBind :: XVarBind idL idR -> IdP idL -> LHsExpr idR -> Bool -> HsBindLR idL idR
- HsBinds: XABExport :: XXABExport p -> ABExport p
- HsBinds: XFixitySig :: XXFixitySig pass -> FixitySig pass
- HsBinds: XHsBindsLR :: XXHsBindsLR idL idR -> HsBindLR idL idR
- HsBinds: XHsIPBinds :: XXHsIPBinds id -> HsIPBinds id
- HsBinds: XHsLocalBindsLR :: XXHsLocalBindsLR idL idR -> HsLocalBindsLR idL idR
- HsBinds: XIPBind :: XXIPBind id -> IPBind id
- HsBinds: XPatSynBind :: XXPatSynBind idL idR -> PatSynBind idL idR
- HsBinds: XSig :: XXSig pass -> Sig pass
- HsBinds: XValBindsLR :: XXValBindsLR idL idR -> HsValBindsLR idL idR
- HsBinds: [abe_ext] :: ABExport p -> XABE p
- HsBinds: [abe_mono] :: ABExport p -> IdP p
- HsBinds: [abe_poly] :: ABExport p -> IdP p
- HsBinds: [abe_prags] :: ABExport p -> TcSpecPrags
- HsBinds: [abe_wrap] :: ABExport p -> HsWrapper
- HsBinds: [abs_binds] :: HsBindLR idL idR -> LHsBinds idL
- HsBinds: [abs_ev_binds] :: HsBindLR idL idR -> [TcEvBinds]
- HsBinds: [abs_ev_vars] :: HsBindLR idL idR -> [EvVar]
- HsBinds: [abs_exports] :: HsBindLR idL idR -> [ABExport idL]
- HsBinds: [abs_ext] :: HsBindLR idL idR -> XAbsBinds idL idR
- HsBinds: [abs_sig] :: HsBindLR idL idR -> Bool
- HsBinds: [abs_tvs] :: HsBindLR idL idR -> [TyVar]
- HsBinds: [fun_co_fn] :: HsBindLR idL idR -> HsWrapper
- HsBinds: [fun_ext] :: HsBindLR idL idR -> XFunBind idL idR
- HsBinds: [fun_id] :: HsBindLR idL idR -> Located (IdP idL)
- HsBinds: [fun_matches] :: HsBindLR idL idR -> MatchGroup idR (LHsExpr idR)
- HsBinds: [fun_tick] :: HsBindLR idL idR -> [Tickish Id]
- HsBinds: [pat_ext] :: HsBindLR idL idR -> XPatBind idL idR
- HsBinds: [pat_fvs] :: NPatBindTc -> NameSet
- HsBinds: [pat_lhs] :: HsBindLR idL idR -> LPat idL
- HsBinds: [pat_rhs] :: HsBindLR idL idR -> GRHSs idR (LHsExpr idR)
- HsBinds: [pat_rhs_ty] :: NPatBindTc -> Type
- HsBinds: [pat_ticks] :: HsBindLR idL idR -> ([Tickish Id], [[Tickish Id]])
- HsBinds: [psb_args] :: PatSynBind idL idR -> HsPatSynDetails (Located (IdP idR))
- HsBinds: [psb_def] :: PatSynBind idL idR -> LPat idR
- HsBinds: [psb_dir] :: PatSynBind idL idR -> HsPatSynDir idR
- HsBinds: [psb_ext] :: PatSynBind idL idR -> XPSB idL idR
- HsBinds: [psb_id] :: PatSynBind idL idR -> Located (IdP idL)
- HsBinds: [recordPatSynPatVar] :: RecordPatSynField a -> a
- HsBinds: [recordPatSynSelectorId] :: RecordPatSynField a -> a
- HsBinds: [var_ext] :: HsBindLR idL idR -> XVarBind idL idR
- HsBinds: [var_id] :: HsBindLR idL idR -> IdP idL
- HsBinds: [var_inline] :: HsBindLR idL idR -> Bool
- HsBinds: [var_rhs] :: HsBindLR idL idR -> LHsExpr idR
- HsBinds: data ABExport p
- HsBinds: data FixitySig pass
- HsBinds: data HsBindLR idL idR
- HsBinds: data HsIPBinds id
- HsBinds: data HsLocalBindsLR idL idR
- HsBinds: data HsPatSynDir id
- HsBinds: data HsValBindsLR idL idR
- HsBinds: data IPBind id
- HsBinds: data NHsValBindsLR idL
- HsBinds: data NPatBindTc
- HsBinds: data PatSynBind idL idR
- HsBinds: data RecordPatSynField a
- HsBinds: data Sig pass
- HsBinds: data TcSpecPrag
- HsBinds: data TcSpecPrags
- HsBinds: emptyLHsBinds :: LHsBindsLR idL idR
- HsBinds: emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)
- HsBinds: emptyValBindsIn :: HsValBindsLR (GhcPass a) (GhcPass b)
- HsBinds: emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)
- HsBinds: eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- HsBinds: hasSpecPrags :: TcSpecPrags -> Bool
- HsBinds: hsSigDoc :: Sig name -> SDoc
- HsBinds: instance (idL GHC.Types.~ HsExtension.GhcPass pl, idR GHC.Types.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsBindLR idL idR)
- HsBinds: instance (idL GHC.Types.~ HsExtension.GhcPass pl, idR GHC.Types.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsLocalBindsLR idL idR)
- HsBinds: instance (idL GHC.Types.~ HsExtension.GhcPass pl, idR GHC.Types.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsValBindsLR idL idR)
- HsBinds: instance (idR GHC.Types.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR, Outputable.Outputable (HsExtension.XXPatSynBind idL idR)) => Outputable.Outputable (HsBinds.PatSynBind idL idR)
- HsBinds: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.ABExport p)
- HsBinds: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.FixitySig p)
- HsBinds: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.HsIPBinds p)
- HsBinds: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.IPBind p)
- HsBinds: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.Sig p)
- HsBinds: instance Data.Data.Data HsBinds.NPatBindTc
- HsBinds: instance Data.Data.Data HsBinds.TcSpecPrag
- HsBinds: instance Data.Data.Data HsBinds.TcSpecPrags
- HsBinds: instance Data.Data.Data a => Data.Data.Data (HsBinds.RecordPatSynField a)
- HsBinds: instance Data.Foldable.Foldable HsBinds.RecordPatSynField
- HsBinds: instance Data.Traversable.Traversable HsBinds.RecordPatSynField
- HsBinds: instance GHC.Base.Functor HsBinds.RecordPatSynField
- HsBinds: instance Outputable.Outputable HsBinds.TcSpecPrag
- HsBinds: instance Outputable.Outputable a => Outputable.Outputable (HsBinds.RecordPatSynField a)
- HsBinds: isCompleteMatchSig :: LSig name -> Bool
- HsBinds: isDefaultMethod :: TcSpecPrags -> Bool
- HsBinds: isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool
- HsBinds: isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
- HsBinds: isEmptyLHsBinds :: LHsBindsLR idL idR -> Bool
- HsBinds: isEmptyLocalBindsPR :: HsLocalBindsLR (GhcPass a) (GhcPass b) -> Bool
- HsBinds: isEmptyLocalBindsTc :: HsLocalBindsLR (GhcPass a) GhcTc -> Bool
- HsBinds: isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- HsBinds: isFixityLSig :: LSig name -> Bool
- HsBinds: isInlineLSig :: LSig name -> Bool
- HsBinds: isMinimalLSig :: LSig name -> Bool
- HsBinds: isPragLSig :: LSig name -> Bool
- HsBinds: isSCCFunSig :: LSig name -> Bool
- HsBinds: isSpecInstLSig :: LSig name -> Bool
- HsBinds: isSpecLSig :: LSig name -> Bool
- HsBinds: isTypeLSig :: LSig name -> Bool
- HsBinds: noSpecPrags :: TcSpecPrags
- HsBinds: plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- HsBinds: pprDeclList :: [SDoc] -> SDoc
- HsBinds: pprLHsBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- HsBinds: pprLHsBindsForUser :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), OutputableBndrId (GhcPass id2)) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
- HsBinds: pprMinimalSig :: OutputableBndr name => LBooleanFormula (Located name) -> SDoc
- HsBinds: pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- HsBinds: pprTcSpecPrags :: TcSpecPrags -> SDoc
- HsBinds: pprTicks :: SDoc -> SDoc -> SDoc
- HsBinds: pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- HsBinds: ppr_monobind :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- HsBinds: ppr_sig :: OutputableBndrId (GhcPass p) => Sig (GhcPass p) -> SDoc
- HsBinds: pragBrackets :: SDoc -> SDoc
- HsBinds: pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
- HsBinds: type HsBind id = HsBindLR id id
- HsBinds: type HsLocalBinds id = HsLocalBindsLR id id
- HsBinds: type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg]
- HsBinds: type HsValBinds id = HsValBindsLR id id
- HsBinds: type LFixitySig pass = Located (FixitySig pass)
- HsBinds: type LHsBind id = LHsBindLR id id
- HsBinds: type LHsBindLR idL idR = Located (HsBindLR idL idR)
- HsBinds: type LHsBinds id = LHsBindsLR id id
- HsBinds: type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
- HsBinds: type LHsLocalBinds id = Located (HsLocalBinds id)
- HsBinds: type LHsLocalBindsLR idL idR = Located (HsLocalBindsLR idL idR)
- HsBinds: type LIPBind id = Located (IPBind id)
- HsBinds: type LSig pass = Located (Sig pass)
- HsBinds: type LTcSpecPrag = Located TcSpecPrag
- HsDecls: AnnD :: XAnnD p -> AnnDecl p -> HsDecl p
- HsDecls: AnyclassStrategy :: DerivStrategy pass
- HsDecls: CExport :: Located CExportSpec -> Located SourceText -> ForeignExport
- HsDecls: CFunction :: CCallTarget -> CImportSpec
- HsDecls: CImport :: Located CCallConv -> Located Safety -> Maybe Header -> CImportSpec -> Located SourceText -> ForeignImport
- HsDecls: CLabel :: CLabelString -> CImportSpec
- HsDecls: CWrapper :: CImportSpec
- HsDecls: ClassDecl :: XClassDecl pass -> LHsContext pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> [LHsFunDep pass] -> [LSig pass] -> LHsBinds pass -> [LFamilyDecl pass] -> [LTyFamDefltEqn pass] -> [LDocDecl] -> TyClDecl pass
- HsDecls: ClosedTypeFamily :: Maybe [LTyFamInstEqn pass] -> FamilyInfo pass
- HsDecls: ClsInstD :: XClsInstD pass -> ClsInstDecl pass -> InstDecl pass
- HsDecls: ClsInstDecl :: XCClsInstDecl pass -> LHsSigType pass -> LHsBinds pass -> [LSig pass] -> [LTyFamInstDecl pass] -> [LDataFamInstDecl pass] -> Maybe (Located OverlapMode) -> ClsInstDecl pass
- HsDecls: ConDeclGADT :: XConDeclGADT pass -> [Located (IdP pass)] -> Located Bool -> LHsQTyVars pass -> Maybe (LHsContext pass) -> HsConDeclDetails pass -> LHsType pass -> Maybe LHsDocString -> ConDecl pass
- HsDecls: ConDeclH98 :: XConDeclH98 pass -> Located (IdP pass) -> Located Bool -> [LHsTyVarBndr pass] -> Maybe (LHsContext pass) -> HsConDeclDetails pass -> Maybe LHsDocString -> ConDecl pass
- HsDecls: DataDecl :: XDataDecl pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> HsDataDefn pass -> TyClDecl pass
- HsDecls: DataDeclRn :: Bool -> NameSet -> DataDeclRn
- HsDecls: DataFamInstD :: XDataFamInstD pass -> DataFamInstDecl pass -> InstDecl pass
- HsDecls: DataFamInstDecl :: FamInstEqn pass (HsDataDefn pass) -> DataFamInstDecl pass
- HsDecls: DataFamily :: FamilyInfo pass
- HsDecls: DataType :: NewOrData
- HsDecls: DefD :: XDefD p -> DefaultDecl p -> HsDecl p
- HsDecls: DefaultDecl :: XCDefaultDecl pass -> [LHsType pass] -> DefaultDecl pass
- HsDecls: DerivD :: XDerivD p -> DerivDecl p -> HsDecl p
- HsDecls: DerivDecl :: XCDerivDecl pass -> LHsSigWcType pass -> Maybe (LDerivStrategy pass) -> Maybe (Located OverlapMode) -> DerivDecl pass
- HsDecls: DocCommentNamed :: String -> HsDocString -> DocDecl
- HsDecls: DocCommentNext :: HsDocString -> DocDecl
- HsDecls: DocCommentPrev :: HsDocString -> DocDecl
- HsDecls: DocD :: XDocD p -> DocDecl -> HsDecl p
- HsDecls: DocGroup :: Int -> HsDocString -> DocDecl
- HsDecls: ExplicitSplice :: SpliceExplicitFlag
- HsDecls: FamDecl :: XFamDecl pass -> FamilyDecl pass -> TyClDecl pass
- HsDecls: FamEqn :: XCFamEqn pass pats rhs -> Located (IdP pass) -> Maybe [LHsTyVarBndr pass] -> pats -> LexicalFixity -> rhs -> FamEqn pass pats rhs
- HsDecls: FamilyDecl :: XCFamilyDecl pass -> FamilyInfo pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LFamilyResultSig pass -> Maybe (LInjectivityAnn pass) -> FamilyDecl pass
- HsDecls: ForD :: XForD p -> ForeignDecl p -> HsDecl p
- HsDecls: ForeignExport :: XForeignExport pass -> Located (IdP pass) -> LHsSigType pass -> ForeignExport -> ForeignDecl pass
- HsDecls: ForeignImport :: XForeignImport pass -> Located (IdP pass) -> LHsSigType pass -> ForeignImport -> ForeignDecl pass
- HsDecls: HsAnnotation :: XHsAnnotation pass -> SourceText -> AnnProvenance (IdP pass) -> Located (HsExpr pass) -> AnnDecl pass
- HsDecls: HsDataDefn :: XCHsDataDefn pass -> NewOrData -> LHsContext pass -> Maybe (Located CType) -> Maybe (LHsKind pass) -> [LConDecl pass] -> HsDeriving pass -> HsDataDefn pass
- HsDecls: HsDerivingClause :: XCHsDerivingClause pass -> Maybe (LDerivStrategy pass) -> Located [LHsSigType pass] -> HsDerivingClause pass
- HsDecls: HsGroup :: XCHsGroup p -> HsValBinds p -> [LSpliceDecl p] -> [TyClGroup p] -> [LDerivDecl p] -> [LFixitySig p] -> [LDefaultDecl p] -> [LForeignDecl p] -> [LWarnDecls p] -> [LAnnDecl p] -> [LRuleDecls p] -> [LDocDecl] -> HsGroup p
- HsDecls: HsRule :: XHsRule pass -> Located (SourceText, RuleName) -> Activation -> Maybe [LHsTyVarBndr (NoGhcTc pass)] -> [LRuleBndr pass] -> Located (HsExpr pass) -> Located (HsExpr pass) -> RuleDecl pass
- HsDecls: HsRuleRn :: NameSet -> NameSet -> HsRuleRn
- HsDecls: HsRules :: XCRuleDecls pass -> SourceText -> [LRuleDecl pass] -> RuleDecls pass
- HsDecls: ImplicitSplice :: SpliceExplicitFlag
- HsDecls: InjectivityAnn :: Located (IdP pass) -> [Located (IdP pass)] -> InjectivityAnn pass
- HsDecls: InstD :: XInstD p -> InstDecl p -> HsDecl p
- HsDecls: KindSig :: XCKindSig pass -> LHsKind pass -> FamilyResultSig pass
- HsDecls: ModuleAnnProvenance :: AnnProvenance name
- HsDecls: NewType :: NewOrData
- HsDecls: NewtypeStrategy :: DerivStrategy pass
- HsDecls: NoSig :: XNoSig pass -> FamilyResultSig pass
- HsDecls: OpenTypeFamily :: FamilyInfo pass
- HsDecls: RoleAnnotD :: XRoleAnnotD p -> RoleAnnotDecl p -> HsDecl p
- HsDecls: RoleAnnotDecl :: XCRoleAnnotDecl pass -> Located (IdP pass) -> [Located (Maybe Role)] -> RoleAnnotDecl pass
- HsDecls: RuleBndr :: XCRuleBndr pass -> Located (IdP pass) -> RuleBndr pass
- HsDecls: RuleBndrSig :: XRuleBndrSig pass -> Located (IdP pass) -> LHsSigWcType pass -> RuleBndr pass
- HsDecls: RuleD :: XRuleD p -> RuleDecls p -> HsDecl p
- HsDecls: SigD :: XSigD p -> Sig p -> HsDecl p
- HsDecls: SpliceD :: XSpliceD p -> SpliceDecl p -> HsDecl p
- HsDecls: SpliceDecl :: XSpliceDecl p -> Located (HsSplice p) -> SpliceExplicitFlag -> SpliceDecl p
- HsDecls: StockStrategy :: DerivStrategy pass
- HsDecls: SynDecl :: XSynDecl pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LHsType pass -> TyClDecl pass
- HsDecls: TyClD :: XTyClD p -> TyClDecl p -> HsDecl p
- HsDecls: TyClGroup :: XCTyClGroup pass -> [LTyClDecl pass] -> [LRoleAnnotDecl pass] -> [LInstDecl pass] -> TyClGroup pass
- HsDecls: TyFamInstD :: XTyFamInstD pass -> TyFamInstDecl pass -> InstDecl pass
- HsDecls: TyFamInstDecl :: TyFamInstEqn pass -> TyFamInstDecl pass
- HsDecls: TyVarSig :: XTyVarSig pass -> LHsTyVarBndr pass -> FamilyResultSig pass
- HsDecls: TypeAnnProvenance :: Located name -> AnnProvenance name
- HsDecls: ValD :: XValD p -> HsBind p -> HsDecl p
- HsDecls: ValueAnnProvenance :: Located name -> AnnProvenance name
- HsDecls: ViaStrategy :: XViaStrategy pass -> DerivStrategy pass
- HsDecls: Warning :: XWarning pass -> [Located (IdP pass)] -> WarningTxt -> WarnDecl pass
- HsDecls: WarningD :: XWarningD p -> WarnDecls p -> HsDecl p
- HsDecls: Warnings :: XWarnings pass -> SourceText -> [LWarnDecl pass] -> WarnDecls pass
- HsDecls: XAnnDecl :: XXAnnDecl pass -> AnnDecl pass
- HsDecls: XClsInstDecl :: XXClsInstDecl pass -> ClsInstDecl pass
- HsDecls: XConDecl :: XXConDecl pass -> ConDecl pass
- HsDecls: XDefaultDecl :: XXDefaultDecl pass -> DefaultDecl pass
- HsDecls: XDerivDecl :: XXDerivDecl pass -> DerivDecl pass
- HsDecls: XFamEqn :: XXFamEqn pass pats rhs -> FamEqn pass pats rhs
- HsDecls: XFamilyDecl :: XXFamilyDecl pass -> FamilyDecl pass
- HsDecls: XFamilyResultSig :: XXFamilyResultSig pass -> FamilyResultSig pass
- HsDecls: XForeignDecl :: XXForeignDecl pass -> ForeignDecl pass
- HsDecls: XHsDataDefn :: XXHsDataDefn pass -> HsDataDefn pass
- HsDecls: XHsDecl :: XXHsDecl p -> HsDecl p
- HsDecls: XHsDerivingClause :: XXHsDerivingClause pass -> HsDerivingClause pass
- HsDecls: XHsGroup :: XXHsGroup p -> HsGroup p
- HsDecls: XInstDecl :: XXInstDecl pass -> InstDecl pass
- HsDecls: XRoleAnnotDecl :: XXRoleAnnotDecl pass -> RoleAnnotDecl pass
- HsDecls: XRuleBndr :: XXRuleBndr pass -> RuleBndr pass
- HsDecls: XRuleDecl :: XXRuleDecl pass -> RuleDecl pass
- HsDecls: XRuleDecls :: XXRuleDecls pass -> RuleDecls pass
- HsDecls: XSpliceDecl :: XXSpliceDecl p -> SpliceDecl p
- HsDecls: XTyClDecl :: XXTyClDecl pass -> TyClDecl pass
- HsDecls: XTyClGroup :: XXTyClGroup pass -> TyClGroup pass
- HsDecls: XWarnDecl :: XXWarnDecl pass -> WarnDecl pass
- HsDecls: XWarnDecls :: XXWarnDecls pass -> WarnDecls pass
- HsDecls: [cid_binds] :: ClsInstDecl pass -> LHsBinds pass
- HsDecls: [cid_d_ext] :: InstDecl pass -> XClsInstD pass
- HsDecls: [cid_datafam_insts] :: ClsInstDecl pass -> [LDataFamInstDecl pass]
- HsDecls: [cid_ext] :: ClsInstDecl pass -> XCClsInstDecl pass
- HsDecls: [cid_inst] :: InstDecl pass -> ClsInstDecl pass
- HsDecls: [cid_overlap_mode] :: ClsInstDecl pass -> Maybe (Located OverlapMode)
- HsDecls: [cid_poly_ty] :: ClsInstDecl pass -> LHsSigType pass
- HsDecls: [cid_sigs] :: ClsInstDecl pass -> [LSig pass]
- HsDecls: [cid_tyfam_insts] :: ClsInstDecl pass -> [LTyFamInstDecl pass]
- HsDecls: [con_args] :: ConDecl pass -> HsConDeclDetails pass
- HsDecls: [con_doc] :: ConDecl pass -> Maybe LHsDocString
- HsDecls: [con_ex_tvs] :: ConDecl pass -> [LHsTyVarBndr pass]
- HsDecls: [con_ext] :: ConDecl pass -> XConDeclH98 pass
- HsDecls: [con_forall] :: ConDecl pass -> Located Bool
- HsDecls: [con_g_ext] :: ConDecl pass -> XConDeclGADT pass
- HsDecls: [con_mb_cxt] :: ConDecl pass -> Maybe (LHsContext pass)
- HsDecls: [con_name] :: ConDecl pass -> Located (IdP pass)
- HsDecls: [con_names] :: ConDecl pass -> [Located (IdP pass)]
- HsDecls: [con_qvars] :: ConDecl pass -> LHsQTyVars pass
- HsDecls: [con_res_ty] :: ConDecl pass -> LHsType pass
- HsDecls: [dd_ND] :: HsDataDefn pass -> NewOrData
- HsDecls: [dd_cType] :: HsDataDefn pass -> Maybe (Located CType)
- HsDecls: [dd_cons] :: HsDataDefn pass -> [LConDecl pass]
- HsDecls: [dd_ctxt] :: HsDataDefn pass -> LHsContext pass
- HsDecls: [dd_derivs] :: HsDataDefn pass -> HsDeriving pass
- HsDecls: [dd_ext] :: HsDataDefn pass -> XCHsDataDefn pass
- HsDecls: [dd_kindSig] :: HsDataDefn pass -> Maybe (LHsKind pass)
- HsDecls: [deriv_clause_ext] :: HsDerivingClause pass -> XCHsDerivingClause pass
- HsDecls: [deriv_clause_strategy] :: HsDerivingClause pass -> Maybe (LDerivStrategy pass)
- HsDecls: [deriv_clause_tys] :: HsDerivingClause pass -> Located [LHsSigType pass]
- HsDecls: [deriv_ext] :: DerivDecl pass -> XCDerivDecl pass
- HsDecls: [deriv_overlap_mode] :: DerivDecl pass -> Maybe (Located OverlapMode)
- HsDecls: [deriv_strategy] :: DerivDecl pass -> Maybe (LDerivStrategy pass)
- HsDecls: [deriv_type] :: DerivDecl pass -> LHsSigWcType pass
- HsDecls: [dfid_eqn] :: DataFamInstDecl pass -> FamInstEqn pass (HsDataDefn pass)
- HsDecls: [dfid_ext] :: InstDecl pass -> XDataFamInstD pass
- HsDecls: [dfid_inst] :: InstDecl pass -> DataFamInstDecl pass
- HsDecls: [fdExt] :: FamilyDecl pass -> XCFamilyDecl pass
- HsDecls: [fdFixity] :: FamilyDecl pass -> LexicalFixity
- HsDecls: [fdInfo] :: FamilyDecl pass -> FamilyInfo pass
- HsDecls: [fdInjectivityAnn] :: FamilyDecl pass -> Maybe (LInjectivityAnn pass)
- HsDecls: [fdLName] :: FamilyDecl pass -> Located (IdP pass)
- HsDecls: [fdResultSig] :: FamilyDecl pass -> LFamilyResultSig pass
- HsDecls: [fdTyVars] :: FamilyDecl pass -> LHsQTyVars pass
- HsDecls: [fd_e_ext] :: ForeignDecl pass -> XForeignExport pass
- HsDecls: [fd_fe] :: ForeignDecl pass -> ForeignExport
- HsDecls: [fd_fi] :: ForeignDecl pass -> ForeignImport
- HsDecls: [fd_i_ext] :: ForeignDecl pass -> XForeignImport pass
- HsDecls: [fd_name] :: ForeignDecl pass -> Located (IdP pass)
- HsDecls: [fd_sig_ty] :: ForeignDecl pass -> LHsSigType pass
- HsDecls: [feqn_bndrs] :: FamEqn pass pats rhs -> Maybe [LHsTyVarBndr pass]
- HsDecls: [feqn_ext] :: FamEqn pass pats rhs -> XCFamEqn pass pats rhs
- HsDecls: [feqn_fixity] :: FamEqn pass pats rhs -> LexicalFixity
- HsDecls: [feqn_pats] :: FamEqn pass pats rhs -> pats
- HsDecls: [feqn_rhs] :: FamEqn pass pats rhs -> rhs
- HsDecls: [feqn_tycon] :: FamEqn pass pats rhs -> Located (IdP pass)
- HsDecls: [group_ext] :: TyClGroup pass -> XCTyClGroup pass
- HsDecls: [group_instds] :: TyClGroup pass -> [LInstDecl pass]
- HsDecls: [group_roles] :: TyClGroup pass -> [LRoleAnnotDecl pass]
- HsDecls: [group_tyclds] :: TyClGroup pass -> [LTyClDecl pass]
- HsDecls: [hs_annds] :: HsGroup p -> [LAnnDecl p]
- HsDecls: [hs_defds] :: HsGroup p -> [LDefaultDecl p]
- HsDecls: [hs_derivds] :: HsGroup p -> [LDerivDecl p]
- HsDecls: [hs_docs] :: HsGroup p -> [LDocDecl]
- HsDecls: [hs_ext] :: HsGroup p -> XCHsGroup p
- HsDecls: [hs_fixds] :: HsGroup p -> [LFixitySig p]
- HsDecls: [hs_fords] :: HsGroup p -> [LForeignDecl p]
- HsDecls: [hs_ruleds] :: HsGroup p -> [LRuleDecls p]
- HsDecls: [hs_splcds] :: HsGroup p -> [LSpliceDecl p]
- HsDecls: [hs_tyclds] :: HsGroup p -> [TyClGroup p]
- HsDecls: [hs_valds] :: HsGroup p -> HsValBinds p
- HsDecls: [hs_warnds] :: HsGroup p -> [LWarnDecls p]
- HsDecls: [rd_act] :: RuleDecl pass -> Activation
- HsDecls: [rd_ext] :: RuleDecl pass -> XHsRule pass
- HsDecls: [rd_lhs] :: RuleDecl pass -> Located (HsExpr pass)
- HsDecls: [rd_name] :: RuleDecl pass -> Located (SourceText, RuleName)
- HsDecls: [rd_rhs] :: RuleDecl pass -> Located (HsExpr pass)
- HsDecls: [rd_tmvs] :: RuleDecl pass -> [LRuleBndr pass]
- HsDecls: [rd_tyvs] :: RuleDecl pass -> Maybe [LHsTyVarBndr (NoGhcTc pass)]
- HsDecls: [rds_ext] :: RuleDecls pass -> XCRuleDecls pass
- HsDecls: [rds_rules] :: RuleDecls pass -> [LRuleDecl pass]
- HsDecls: [rds_src] :: RuleDecls pass -> SourceText
- HsDecls: [tcdATDefs] :: TyClDecl pass -> [LTyFamDefltEqn pass]
- HsDecls: [tcdATs] :: TyClDecl pass -> [LFamilyDecl pass]
- HsDecls: [tcdCExt] :: TyClDecl pass -> XClassDecl pass
- HsDecls: [tcdCtxt] :: TyClDecl pass -> LHsContext pass
- HsDecls: [tcdDExt] :: TyClDecl pass -> XDataDecl pass
- HsDecls: [tcdDataCusk] :: DataDeclRn -> Bool
- HsDecls: [tcdDataDefn] :: TyClDecl pass -> HsDataDefn pass
- HsDecls: [tcdDocs] :: TyClDecl pass -> [LDocDecl]
- HsDecls: [tcdFDs] :: TyClDecl pass -> [LHsFunDep pass]
- HsDecls: [tcdFExt] :: TyClDecl pass -> XFamDecl pass
- HsDecls: [tcdFVs] :: DataDeclRn -> NameSet
- HsDecls: [tcdFam] :: TyClDecl pass -> FamilyDecl pass
- HsDecls: [tcdFixity] :: TyClDecl pass -> LexicalFixity
- HsDecls: [tcdLName] :: TyClDecl pass -> Located (IdP pass)
- HsDecls: [tcdMeths] :: TyClDecl pass -> LHsBinds pass
- HsDecls: [tcdRhs] :: TyClDecl pass -> LHsType pass
- HsDecls: [tcdSExt] :: TyClDecl pass -> XSynDecl pass
- HsDecls: [tcdSigs] :: TyClDecl pass -> [LSig pass]
- HsDecls: [tcdTyVars] :: TyClDecl pass -> LHsQTyVars pass
- HsDecls: [tfid_eqn] :: TyFamInstDecl pass -> TyFamInstEqn pass
- HsDecls: [tfid_ext] :: InstDecl pass -> XTyFamInstD pass
- HsDecls: [tfid_inst] :: InstDecl pass -> TyFamInstDecl pass
- HsDecls: [wd_ext] :: WarnDecls pass -> XWarnings pass
- HsDecls: [wd_src] :: WarnDecls pass -> SourceText
- HsDecls: [wd_warnings] :: WarnDecls pass -> [LWarnDecl pass]
- HsDecls: annProvenanceName_maybe :: AnnProvenance name -> Maybe name
- HsDecls: appendGroups :: HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p)
- HsDecls: collectRuleBndrSigTys :: [RuleBndr pass] -> [LHsSigWcType pass]
- HsDecls: countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)
- HsDecls: data AnnDecl pass
- HsDecls: data AnnProvenance name
- HsDecls: data CImportSpec
- HsDecls: data ClsInstDecl pass
- HsDecls: data ConDecl pass
- HsDecls: data DataDeclRn
- HsDecls: data DefaultDecl pass
- HsDecls: data DerivDecl pass
- HsDecls: data DerivStrategy pass
- HsDecls: data DocDecl
- HsDecls: data FamEqn pass pats rhs
- HsDecls: data FamilyDecl pass
- HsDecls: data FamilyInfo pass
- HsDecls: data FamilyResultSig pass
- HsDecls: data ForeignDecl pass
- HsDecls: data ForeignExport
- HsDecls: data ForeignImport
- HsDecls: data HsDataDefn pass
- HsDecls: data HsDecl p
- HsDecls: data HsDerivingClause pass
- HsDecls: data HsGroup p
- HsDecls: data HsRuleRn
- HsDecls: data InjectivityAnn pass
- HsDecls: data InstDecl pass
- HsDecls: data NewOrData
- HsDecls: data RoleAnnotDecl pass
- HsDecls: data RuleBndr pass
- HsDecls: data RuleDecl pass
- HsDecls: data RuleDecls pass
- HsDecls: data SpliceDecl p
- HsDecls: data SpliceExplicitFlag
- HsDecls: data TyClDecl pass
- HsDecls: data TyClGroup pass
- HsDecls: data WarnDecl pass
- HsDecls: data WarnDecls pass
- HsDecls: derivStrategyName :: DerivStrategy a -> SDoc
- HsDecls: docDeclDoc :: DocDecl -> HsDocString
- HsDecls: emptyRdrGroup :: HsGroup (GhcPass p)
- HsDecls: emptyRnGroup :: HsGroup (GhcPass p)
- HsDecls: emptyTyClGroup :: TyClGroup (GhcPass p)
- HsDecls: famDeclHasCusk :: Maybe Bool -> FamilyDecl pass -> Bool
- HsDecls: flattenRuleDecls :: [LRuleDecls pass] -> [LRuleDecl pass]
- HsDecls: getConArgs :: ConDecl pass -> HsConDeclDetails pass
- HsDecls: getConNames :: ConDecl pass -> [Located (IdP pass)]
- HsDecls: hsConDeclArgTys :: HsConDeclDetails pass -> [LBangType pass]
- HsDecls: hsConDeclTheta :: Maybe (LHsContext pass) -> [LHsType pass]
- HsDecls: hsDeclHasCusk :: TyClDecl GhcRn -> Bool
- HsDecls: hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
- HsDecls: instDeclDataFamInsts :: [LInstDecl pass] -> [DataFamInstDecl pass]
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.AnnDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.ClsInstDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.ConDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DataFamInstDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DefaultDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DerivDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DerivStrategy p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.FamilyDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.ForeignDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsDataDefn p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsDerivingClause p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsGroup p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.InstDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.RuleBndr p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.RuleDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.RuleDecls p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.SpliceDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.TyClDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.TyClGroup p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.TyFamInstDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, Outputable.OutputableBndr (HsExtension.IdP p)) => Outputable.Outputable (HsDecls.RoleAnnotDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, Outputable.OutputableBndr (HsExtension.IdP p)) => Outputable.Outputable (HsDecls.WarnDecl p)
- HsDecls: instance (p GHC.Types.~ HsExtension.GhcPass pass, Outputable.OutputableBndr (HsExtension.IdP p)) => Outputable.Outputable (HsDecls.WarnDecls p)
- HsDecls: instance Data.Data.Data HsDecls.CImportSpec
- HsDecls: instance Data.Data.Data HsDecls.DataDeclRn
- HsDecls: instance Data.Data.Data HsDecls.DocDecl
- HsDecls: instance Data.Data.Data HsDecls.ForeignExport
- HsDecls: instance Data.Data.Data HsDecls.ForeignImport
- HsDecls: instance Data.Data.Data HsDecls.HsRuleRn
- HsDecls: instance Data.Data.Data HsDecls.NewOrData
- HsDecls: instance Data.Data.Data pass => Data.Data.Data (HsDecls.AnnProvenance pass)
- HsDecls: instance Data.Foldable.Foldable HsDecls.AnnProvenance
- HsDecls: instance Data.Traversable.Traversable HsDecls.AnnProvenance
- HsDecls: instance GHC.Base.Functor HsDecls.AnnProvenance
- HsDecls: instance GHC.Classes.Eq HsDecls.NewOrData
- HsDecls: instance Outputable.Outputable (HsDecls.FamilyInfo pass)
- HsDecls: instance Outputable.Outputable HsDecls.DocDecl
- HsDecls: instance Outputable.Outputable HsDecls.ForeignExport
- HsDecls: instance Outputable.Outputable HsDecls.ForeignImport
- HsDecls: instance Outputable.Outputable HsDecls.NewOrData
- HsDecls: isClassDecl :: TyClDecl pass -> Bool
- HsDecls: isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
- HsDecls: isDataDecl :: TyClDecl pass -> Bool
- HsDecls: isDataFamilyDecl :: TyClDecl pass -> Bool
- HsDecls: isFamilyDecl :: TyClDecl pass -> Bool
- HsDecls: isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
- HsDecls: isSynDecl :: TyClDecl pass -> Bool
- HsDecls: isTypeFamilyDecl :: TyClDecl pass -> Bool
- HsDecls: mkTyClGroup :: [LTyClDecl (GhcPass p)] -> [LInstDecl (GhcPass p)] -> TyClGroup (GhcPass p)
- HsDecls: newOrDataToFlavour :: NewOrData -> TyConFlavour
- HsDecls: newtype DataFamInstDecl pass
- HsDecls: newtype TyFamInstDecl pass
- HsDecls: pprDataFamInstFlavour :: DataFamInstDecl (GhcPass p) -> SDoc
- HsDecls: pprFullRuleName :: Located (SourceText, RuleName) -> SDoc
- HsDecls: pprHsFamInstLHS :: OutputableBndrId (GhcPass p) => IdP (GhcPass p) -> Maybe [LHsTyVarBndr (GhcPass p)] -> HsTyPats (GhcPass p) -> LexicalFixity -> LHsContext (GhcPass p) -> SDoc
- HsDecls: pprTyClDeclFlavour :: TyClDecl (GhcPass p) -> SDoc
- HsDecls: resultVariableName :: FamilyResultSig a -> Maybe (IdP a)
- HsDecls: roleAnnotDeclName :: RoleAnnotDecl pass -> IdP pass
- HsDecls: tcdName :: TyClDecl pass -> IdP pass
- HsDecls: tyClDeclLName :: TyClDecl pass -> Located (IdP pass)
- HsDecls: tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
- HsDecls: tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
- HsDecls: tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
- HsDecls: tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
- HsDecls: tyFamInstDeclLName :: TyFamInstDecl pass -> Located (IdP pass)
- HsDecls: tyFamInstDeclName :: TyFamInstDecl pass -> IdP pass
- HsDecls: type FamInstEqn pass rhs = HsImplicitBndrs pass (FamEqn pass (HsTyPats pass) rhs) " Here, the @pats@ are type patterns (with kind and type bndrs). See Note [Family instance declaration binders]"
- HsDecls: type HsConDeclDetails pass = HsConDetails (LBangType pass) (Located [LConDeclField pass])
- HsDecls: type HsDeriving pass = Located [LHsDerivingClause pass] " The optional @deriving@ clauses of a data declaration. "Clauses" is plural because one can specify multiple deriving clauses using the @-XDerivingStrategies@ language extension. The list of 'LHsDerivingClause's corresponds to exactly what the user requested to derive, in order. If no deriving clauses were specified, the list is empty."
- HsDecls: type HsTyPats pass = [LHsTypeArg pass]
- HsDecls: type LAnnDecl pass = Located (AnnDecl pass)
- HsDecls: type LClsInstDecl pass = Located (ClsInstDecl pass)
- HsDecls: type LConDecl pass = Located (ConDecl pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a GADT constructor list"
- HsDecls: type LDataFamInstDecl pass = Located (DataFamInstDecl pass)
- HsDecls: type LDefaultDecl pass = Located (DefaultDecl pass)
- HsDecls: type LDerivDecl pass = Located (DerivDecl pass)
- HsDecls: type LDerivStrategy pass = Located (DerivStrategy pass)
- HsDecls: type LDocDecl = Located (DocDecl)
- HsDecls: type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs)
- HsDecls: type LFamilyDecl pass = Located (FamilyDecl pass)
- HsDecls: type LFamilyResultSig pass = Located (FamilyResultSig pass)
- HsDecls: type LForeignDecl pass = Located (ForeignDecl pass)
- HsDecls: type LHsDecl p = Located (HsDecl p) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' "
- HsDecls: type LHsDerivingClause pass = Located (HsDerivingClause pass)
- HsDecls: type LHsFunDep pass = Located (FunDep (Located (IdP pass)))
- HsDecls: type LInjectivityAnn pass = Located (InjectivityAnn pass)
- HsDecls: type LInstDecl pass = Located (InstDecl pass)
- HsDecls: type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass)
- HsDecls: type LRuleBndr pass = Located (RuleBndr pass)
- HsDecls: type LRuleDecl pass = Located (RuleDecl pass)
- HsDecls: type LRuleDecls pass = Located (RuleDecls pass)
- HsDecls: type LSpliceDecl pass = Located (SpliceDecl pass)
- HsDecls: type LTyClDecl pass = Located (TyClDecl pass)
- HsDecls: type LTyFamDefltEqn pass = Located (TyFamDefltEqn pass)
- HsDecls: type LTyFamInstDecl pass = Located (TyFamInstDecl pass)
- HsDecls: type LTyFamInstEqn pass = Located (TyFamInstEqn pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a list"
- HsDecls: type LWarnDecl pass = Located (WarnDecl pass)
- HsDecls: type LWarnDecls pass = Located (WarnDecls pass)
- HsDecls: type TyFamDefltEqn pass = FamEqn pass (LHsQTyVars pass) (LHsType pass)
- HsDecls: type TyFamInstEqn pass = FamInstEqn pass (LHsType pass)
- HsDoc: ArgDocMap :: Map Name (Map Int HsDocString) -> ArgDocMap
- HsDoc: DeclDocMap :: Map Name HsDocString -> DeclDocMap
- HsDoc: appendDocs :: HsDocString -> HsDocString -> HsDocString
- HsDoc: concatDocs :: [HsDocString] -> Maybe HsDocString
- HsDoc: data HsDocString
- HsDoc: emptyArgDocMap :: ArgDocMap
- HsDoc: emptyDeclDocMap :: DeclDocMap
- HsDoc: hsDocStringToByteString :: HsDocString -> ByteString
- HsDoc: instance Binary.Binary HsDoc.ArgDocMap
- HsDoc: instance Binary.Binary HsDoc.DeclDocMap
- HsDoc: instance Binary.Binary HsDoc.HsDocString
- HsDoc: instance Data.Data.Data HsDoc.HsDocString
- HsDoc: instance GHC.Classes.Eq HsDoc.HsDocString
- HsDoc: instance GHC.Show.Show HsDoc.HsDocString
- HsDoc: instance Outputable.Outputable HsDoc.ArgDocMap
- HsDoc: instance Outputable.Outputable HsDoc.DeclDocMap
- HsDoc: instance Outputable.Outputable HsDoc.HsDocString
- HsDoc: mkHsDocString :: String -> HsDocString
- HsDoc: mkHsDocStringUtf8ByteString :: ByteString -> HsDocString
- HsDoc: newtype ArgDocMap
- HsDoc: newtype DeclDocMap
- HsDoc: ppr_mbDoc :: Maybe LHsDocString -> SDoc
- HsDoc: type LHsDocString = Located HsDocString
- HsDoc: unpackHDS :: HsDocString -> String
- HsDumpAst: BlankSrcSpan :: BlankSrcSpan
- HsDumpAst: NoBlankSrcSpan :: BlankSrcSpan
- HsDumpAst: data BlankSrcSpan
- HsDumpAst: instance GHC.Classes.Eq HsDumpAst.BlankSrcSpan
- HsDumpAst: instance GHC.Show.Show HsDumpAst.BlankSrcSpan
- HsDumpAst: showAstData :: Data a => BlankSrcSpan -> a -> SDoc
- HsExpr: ApplicativeArgMany :: XApplicativeArgMany idL -> [ExprLStmt idL] -> HsExpr idL -> LPat idL -> ApplicativeArg idL
- HsExpr: ApplicativeArgOne :: XApplicativeArgOne idL -> LPat idL -> LHsExpr idL -> Bool -> ApplicativeArg idL
- HsExpr: ApplicativeStmt :: XApplicativeStmt idL idR body -> [(SyntaxExpr idR, ApplicativeArg idL)] -> Maybe (SyntaxExpr idR) -> StmtLR idL idR body
- HsExpr: ArithSeq :: XArithSeq p -> Maybe (SyntaxExpr p) -> ArithSeqInfo p -> HsExpr p
- HsExpr: ArrowExpr :: HsStmtContext id
- HsExpr: BindStmt :: XBindStmt idL idR body -> LPat idL -> body -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: BodyStmt :: XBodyStmt idL idR body -> body -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: CaseAlt :: HsMatchContext id
- HsExpr: CmdTopTc :: Type -> Type -> CmdSyntaxTable GhcTc -> CmdTopTc
- HsExpr: DecBrG :: XDecBrG p -> HsGroup p -> HsBracket p
- HsExpr: DecBrL :: XDecBrL p -> [LHsDecl p] -> HsBracket p
- HsExpr: DelayedSplice :: TcLclEnv -> LHsExpr GhcRn -> TcType -> LHsExpr GhcTcId -> DelayedSplice
- HsExpr: DoExpr :: HsStmtContext id
- HsExpr: EAsPat :: XEAsPat p -> Located (IdP p) -> LHsExpr p -> HsExpr p
- HsExpr: ELazyPat :: XELazyPat p -> LHsExpr p -> HsExpr p
- HsExpr: EViewPat :: XEViewPat p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: EWildPat :: XEWildPat p -> HsExpr p
- HsExpr: ExpBr :: XExpBr p -> LHsExpr p -> HsBracket p
- HsExpr: ExplicitList :: XExplicitList p -> Maybe (SyntaxExpr p) -> [LHsExpr p] -> HsExpr p
- HsExpr: ExplicitSum :: XExplicitSum p -> ConTag -> Arity -> LHsExpr p -> HsExpr p
- HsExpr: ExplicitTuple :: XExplicitTuple p -> [LHsTupArg p] -> Boxity -> HsExpr p
- HsExpr: ExprWithTySig :: XExprWithTySig p -> LHsExpr p -> LHsSigWcType (NoGhcTc p) -> HsExpr p
- HsExpr: From :: LHsExpr id -> ArithSeqInfo id
- HsExpr: FromThen :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
- HsExpr: FromThenTo :: LHsExpr id -> LHsExpr id -> LHsExpr id -> ArithSeqInfo id
- HsExpr: FromTo :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
- HsExpr: FunRhs :: Located id -> LexicalFixity -> SrcStrictness -> HsMatchContext id
- HsExpr: GRHS :: XCGRHS p body -> [GuardLStmt p] -> body -> GRHS p body
- HsExpr: GRHSs :: XCGRHSs p body -> [LGRHS p body] -> LHsLocalBinds p -> GRHSs p body
- HsExpr: GhciStmtCtxt :: HsStmtContext id
- HsExpr: GroupForm :: TransForm
- HsExpr: HasDollar :: SpliceDecoration
- HsExpr: HasParens :: SpliceDecoration
- HsExpr: HsApp :: XApp p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: HsAppType :: XAppTypeE p -> LHsExpr p -> LHsWcType (NoGhcTc p) -> HsExpr p
- HsExpr: HsArrApp :: XArrApp p -> LHsExpr p -> LHsExpr p -> HsArrAppType -> Bool -> HsExpr p
- HsExpr: HsArrForm :: XArrForm p -> LHsExpr p -> Maybe Fixity -> [LHsCmdTop p] -> HsExpr p
- HsExpr: HsBinTick :: XBinTick p -> Int -> Int -> LHsExpr p -> HsExpr p
- HsExpr: HsBracket :: XBracket p -> HsBracket p -> HsExpr p
- HsExpr: HsCase :: XCase p -> LHsExpr p -> MatchGroup p (LHsExpr p) -> HsExpr p
- HsExpr: HsCmdApp :: XCmdApp id -> LHsCmd id -> LHsExpr id -> HsCmd id
- HsExpr: HsCmdArrApp :: XCmdArrApp id -> LHsExpr id -> LHsExpr id -> HsArrAppType -> Bool -> HsCmd id
- HsExpr: HsCmdArrForm :: XCmdArrForm id -> LHsExpr id -> LexicalFixity -> Maybe Fixity -> [LHsCmdTop id] -> HsCmd id
- HsExpr: HsCmdCase :: XCmdCase id -> LHsExpr id -> MatchGroup id (LHsCmd id) -> HsCmd id
- HsExpr: HsCmdDo :: XCmdDo id -> Located [CmdLStmt id] -> HsCmd id
- HsExpr: HsCmdIf :: XCmdIf id -> Maybe (SyntaxExpr id) -> LHsExpr id -> LHsCmd id -> LHsCmd id -> HsCmd id
- HsExpr: HsCmdLam :: XCmdLam id -> MatchGroup id (LHsCmd id) -> HsCmd id
- HsExpr: HsCmdLet :: XCmdLet id -> LHsLocalBinds id -> LHsCmd id -> HsCmd id
- HsExpr: HsCmdPar :: XCmdPar id -> LHsCmd id -> HsCmd id
- HsExpr: HsCmdTop :: XCmdTop p -> LHsCmd p -> HsCmdTop p
- HsExpr: HsCmdWrap :: XCmdWrap id -> HsWrapper -> HsCmd id -> HsCmd id
- HsExpr: HsConLikeOut :: XConLikeOut p -> ConLike -> HsExpr p
- HsExpr: HsCoreAnn :: XCoreAnn p -> SourceText -> StringLiteral -> LHsExpr p -> HsExpr p
- HsExpr: HsDo :: XDo p -> HsStmtContext Name -> Located [ExprLStmt p] -> HsExpr p
- HsExpr: HsFirstOrderApp :: HsArrAppType
- HsExpr: HsHigherOrderApp :: HsArrAppType
- HsExpr: HsIPVar :: XIPVar p -> HsIPName -> HsExpr p
- HsExpr: HsIf :: XIf p -> Maybe (SyntaxExpr p) -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: HsLam :: XLam p -> MatchGroup p (LHsExpr p) -> HsExpr p
- HsExpr: HsLamCase :: XLamCase p -> MatchGroup p (LHsExpr p) -> HsExpr p
- HsExpr: HsLet :: XLet p -> LHsLocalBinds p -> LHsExpr p -> HsExpr p
- HsExpr: HsLit :: XLitE p -> HsLit p -> HsExpr p
- HsExpr: HsMultiIf :: XMultiIf p -> [LGRHS p (LHsExpr p)] -> HsExpr p
- HsExpr: HsOverLabel :: XOverLabel p -> Maybe (IdP p) -> FastString -> HsExpr p
- HsExpr: HsOverLit :: XOverLitE p -> HsOverLit p -> HsExpr p
- HsExpr: HsPar :: XPar p -> LHsExpr p -> HsExpr p
- HsExpr: HsProc :: XProc p -> LPat p -> LHsCmdTop p -> HsExpr p
- HsExpr: HsQuasiQuote :: XQuasiQuote id -> IdP id -> IdP id -> SrcSpan -> FastString -> HsSplice id
- HsExpr: HsRecFld :: XRecFld p -> AmbiguousFieldOcc p -> HsExpr p
- HsExpr: HsRnBracketOut :: XRnBracketOut p -> HsBracket GhcRn -> [PendingRnSplice] -> HsExpr p
- HsExpr: HsSCC :: XSCC p -> SourceText -> StringLiteral -> LHsExpr p -> HsExpr p
- HsExpr: HsSpliceE :: XSpliceE p -> HsSplice p -> HsExpr p
- HsExpr: HsSpliced :: XSpliced id -> ThModFinalizers -> HsSplicedThing id -> HsSplice id
- HsExpr: HsSplicedExpr :: HsExpr id -> HsSplicedThing id
- HsExpr: HsSplicedPat :: Pat id -> HsSplicedThing id
- HsExpr: HsSplicedT :: DelayedSplice -> HsSplice id
- HsExpr: HsSplicedTy :: HsType id -> HsSplicedThing id
- HsExpr: HsStatic :: XStatic p -> LHsExpr p -> HsExpr p
- HsExpr: HsTcBracketOut :: XTcBracketOut p -> HsBracket GhcRn -> [PendingTcSplice] -> HsExpr p
- HsExpr: HsTick :: XTick p -> Tickish (IdP p) -> LHsExpr p -> HsExpr p
- HsExpr: HsTickPragma :: XTickPragma p -> SourceText -> (StringLiteral, (Int, Int), (Int, Int)) -> ((SourceText, SourceText), (SourceText, SourceText)) -> LHsExpr p -> HsExpr p
- HsExpr: HsTypedSplice :: XTypedSplice id -> SpliceDecoration -> IdP id -> LHsExpr id -> HsSplice id
- HsExpr: HsUnboundVar :: XUnboundVar p -> UnboundVar -> HsExpr p
- HsExpr: HsUntypedSplice :: XUntypedSplice id -> SpliceDecoration -> IdP id -> LHsExpr id -> HsSplice id
- HsExpr: HsVar :: XVar p -> Located (IdP p) -> HsExpr p
- HsExpr: HsWrap :: XWrap p -> HsWrapper -> HsExpr p -> HsExpr p
- HsExpr: IfAlt :: HsMatchContext id
- HsExpr: LambdaExpr :: HsMatchContext id
- HsExpr: LastStmt :: XLastStmt idL idR body -> body -> Bool -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: LetStmt :: XLetStmt idL idR body -> LHsLocalBindsLR idL idR -> StmtLR idL idR body
- HsExpr: ListComp :: HsStmtContext id
- HsExpr: MDoExpr :: HsStmtContext id
- HsExpr: MG :: XMG p body -> Located [LMatch p body] -> Origin -> MatchGroup p body
- HsExpr: Match :: XCMatch p body -> HsMatchContext (NameOrRdrName (IdP p)) -> [LPat p] -> GRHSs p body -> Match p body
- HsExpr: MatchGroupTc :: [Type] -> Type -> MatchGroupTc
- HsExpr: Missing :: XMissing id -> HsTupArg id
- HsExpr: MonadComp :: HsStmtContext id
- HsExpr: NegApp :: XNegApp p -> LHsExpr p -> SyntaxExpr p -> HsExpr p
- HsExpr: NoParens :: SpliceDecoration
- HsExpr: OpApp :: XOpApp p -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: OutOfScope :: OccName -> GlobalRdrEnv -> UnboundVar
- HsExpr: ParStmt :: XParStmt idL idR body -> [ParStmtBlock idL idR] -> HsExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: ParStmtBlock :: XParStmtBlock idL idR -> [ExprLStmt idL] -> [IdP idR] -> SyntaxExpr idR -> ParStmtBlock idL idR
- HsExpr: ParStmtCtxt :: HsStmtContext id -> HsStmtContext id
- HsExpr: PatBindGuards :: HsMatchContext id
- HsExpr: PatBindRhs :: HsMatchContext id
- HsExpr: PatBr :: XPatBr p -> LPat p -> HsBracket p
- HsExpr: PatGuard :: HsMatchContext id -> HsStmtContext id
- HsExpr: PatSyn :: HsMatchContext id
- HsExpr: PendingRnSplice :: UntypedSpliceFlavour -> SplicePointName -> LHsExpr GhcRn -> PendingRnSplice
- HsExpr: PendingTcSplice :: SplicePointName -> LHsExpr GhcTc -> PendingTcSplice
- HsExpr: Present :: XPresent id -> LHsExpr id -> HsTupArg id
- HsExpr: ProcExpr :: HsMatchContext id
- HsExpr: RecStmt :: XRecStmt idL idR body -> [LStmtLR idL idR body] -> [IdP idR] -> [IdP idR] -> SyntaxExpr idR -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: RecStmtTc :: Type -> [PostTcExpr] -> [PostTcExpr] -> Type -> RecStmtTc
- HsExpr: RecUpd :: HsMatchContext id
- HsExpr: RecordCon :: XRecordCon p -> Located (IdP p) -> HsRecordBinds p -> HsExpr p
- HsExpr: RecordConTc :: ConLike -> PostTcExpr -> RecordConTc
- HsExpr: RecordUpd :: XRecordUpd p -> LHsExpr p -> [LHsRecUpdField p] -> HsExpr p
- HsExpr: RecordUpdTc :: [ConLike] -> [Type] -> [Type] -> HsWrapper -> RecordUpdTc
- HsExpr: SectionL :: XSectionL p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: SectionR :: XSectionR p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: StmtCtxt :: HsStmtContext id -> HsMatchContext id
- HsExpr: SyntaxExpr :: HsExpr p -> [HsWrapper] -> HsWrapper -> SyntaxExpr p
- HsExpr: TExpBr :: XTExpBr p -> LHsExpr p -> HsBracket p
- HsExpr: ThModFinalizers :: [ForeignRef (Q ())] -> ThModFinalizers
- HsExpr: ThPatQuote :: HsMatchContext id
- HsExpr: ThPatSplice :: HsMatchContext id
- HsExpr: ThenForm :: TransForm
- HsExpr: TransStmt :: XTransStmt idL idR body -> TransForm -> [ExprLStmt idL] -> [(IdP idR, IdP idR)] -> LHsExpr idR -> Maybe (LHsExpr idR) -> SyntaxExpr idR -> SyntaxExpr idR -> HsExpr idR -> StmtLR idL idR body
- HsExpr: TransStmtCtxt :: HsStmtContext id -> HsStmtContext id
- HsExpr: TrueExprHole :: OccName -> UnboundVar
- HsExpr: TypBr :: XTypBr p -> LHsType p -> HsBracket p
- HsExpr: UntypedDeclSplice :: UntypedSpliceFlavour
- HsExpr: UntypedExpSplice :: UntypedSpliceFlavour
- HsExpr: UntypedPatSplice :: UntypedSpliceFlavour
- HsExpr: UntypedTypeSplice :: UntypedSpliceFlavour
- HsExpr: VarBr :: XVarBr p -> Bool -> IdP p -> HsBracket p
- HsExpr: XApplicativeArg :: XXApplicativeArg idL -> ApplicativeArg idL
- HsExpr: XBracket :: XXBracket p -> HsBracket p
- HsExpr: XCmd :: XXCmd id -> HsCmd id
- HsExpr: XCmdTop :: XXCmdTop p -> HsCmdTop p
- HsExpr: XExpr :: XXExpr p -> HsExpr p
- HsExpr: XGRHS :: XXGRHS p body -> GRHS p body
- HsExpr: XGRHSs :: XXGRHSs p body -> GRHSs p body
- HsExpr: XMatch :: XXMatch p body -> Match p body
- HsExpr: XMatchGroup :: XXMatchGroup p body -> MatchGroup p body
- HsExpr: XParStmtBlock :: XXParStmtBlock idL idR -> ParStmtBlock idL idR
- HsExpr: XSplice :: XXSplice id -> HsSplice id
- HsExpr: XStmtLR :: XXStmtLR idL idR body -> StmtLR idL idR body
- HsExpr: XTupArg :: XXTupArg id -> HsTupArg id
- HsExpr: [grhssExt] :: GRHSs p body -> XCGRHSs p body
- HsExpr: [grhssGRHSs] :: GRHSs p body -> [LGRHS p body]
- HsExpr: [grhssLocalBinds] :: GRHSs p body -> LHsLocalBinds p
- HsExpr: [m_ctxt] :: Match p body -> HsMatchContext (NameOrRdrName (IdP p))
- HsExpr: [m_ext] :: Match p body -> XCMatch p body
- HsExpr: [m_grhss] :: Match p body -> GRHSs p body
- HsExpr: [m_pats] :: Match p body -> [LPat p]
- HsExpr: [mc_fixity] :: HsMatchContext id -> LexicalFixity
- HsExpr: [mc_fun] :: HsMatchContext id -> Located id
- HsExpr: [mc_strictness] :: HsMatchContext id -> SrcStrictness
- HsExpr: [mg_alts] :: MatchGroup p body -> Located [LMatch p body]
- HsExpr: [mg_arg_tys] :: MatchGroupTc -> [Type]
- HsExpr: [mg_ext] :: MatchGroup p body -> XMG p body
- HsExpr: [mg_origin] :: MatchGroup p body -> Origin
- HsExpr: [mg_res_ty] :: MatchGroupTc -> Type
- HsExpr: [rcon_con_expr] :: RecordConTc -> PostTcExpr
- HsExpr: [rcon_con_like] :: RecordConTc -> ConLike
- HsExpr: [rcon_con_name] :: HsExpr p -> Located (IdP p)
- HsExpr: [rcon_ext] :: HsExpr p -> XRecordCon p
- HsExpr: [rcon_flds] :: HsExpr p -> HsRecordBinds p
- HsExpr: [recS_bind_fn] :: StmtLR idL idR body -> SyntaxExpr idR
- HsExpr: [recS_bind_ty] :: RecStmtTc -> Type
- HsExpr: [recS_ext] :: StmtLR idL idR body -> XRecStmt idL idR body
- HsExpr: [recS_later_ids] :: StmtLR idL idR body -> [IdP idR]
- HsExpr: [recS_later_rets] :: RecStmtTc -> [PostTcExpr]
- HsExpr: [recS_mfix_fn] :: StmtLR idL idR body -> SyntaxExpr idR
- HsExpr: [recS_rec_ids] :: StmtLR idL idR body -> [IdP idR]
- HsExpr: [recS_rec_rets] :: RecStmtTc -> [PostTcExpr]
- HsExpr: [recS_ret_fn] :: StmtLR idL idR body -> SyntaxExpr idR
- HsExpr: [recS_ret_ty] :: RecStmtTc -> Type
- HsExpr: [recS_stmts] :: StmtLR idL idR body -> [LStmtLR idL idR body]
- HsExpr: [rupd_cons] :: RecordUpdTc -> [ConLike]
- HsExpr: [rupd_expr] :: HsExpr p -> LHsExpr p
- HsExpr: [rupd_ext] :: HsExpr p -> XRecordUpd p
- HsExpr: [rupd_flds] :: HsExpr p -> [LHsRecUpdField p]
- HsExpr: [rupd_in_tys] :: RecordUpdTc -> [Type]
- HsExpr: [rupd_out_tys] :: RecordUpdTc -> [Type]
- HsExpr: [rupd_wrap] :: RecordUpdTc -> HsWrapper
- HsExpr: [syn_arg_wraps] :: SyntaxExpr p -> [HsWrapper]
- HsExpr: [syn_expr] :: SyntaxExpr p -> HsExpr p
- HsExpr: [syn_res_wrap] :: SyntaxExpr p -> HsWrapper
- HsExpr: [trS_bind] :: StmtLR idL idR body -> SyntaxExpr idR
- HsExpr: [trS_bndrs] :: StmtLR idL idR body -> [(IdP idR, IdP idR)]
- HsExpr: [trS_by] :: StmtLR idL idR body -> Maybe (LHsExpr idR)
- HsExpr: [trS_ext] :: StmtLR idL idR body -> XTransStmt idL idR body
- HsExpr: [trS_fmap] :: StmtLR idL idR body -> HsExpr idR
- HsExpr: [trS_form] :: StmtLR idL idR body -> TransForm
- HsExpr: [trS_ret] :: StmtLR idL idR body -> SyntaxExpr idR
- HsExpr: [trS_stmts] :: StmtLR idL idR body -> [ExprLStmt idL]
- HsExpr: [trS_using] :: StmtLR idL idR body -> LHsExpr idR
- HsExpr: data ApplicativeArg idL
- HsExpr: data ArithSeqInfo id
- HsExpr: data CmdTopTc
- HsExpr: data DelayedSplice
- HsExpr: data GRHS p body
- HsExpr: data GRHSs p body
- HsExpr: data HsArrAppType
- HsExpr: data HsBracket p
- HsExpr: data HsCmd id
- HsExpr: data HsCmdTop p
- HsExpr: data HsExpr p
- HsExpr: data HsMatchContext id
- HsExpr: data HsSplice id
- HsExpr: data HsSplicedThing id
- HsExpr: data HsStmtContext id
- HsExpr: data HsTupArg id
- HsExpr: data Match p body
- HsExpr: data MatchGroup p body
- HsExpr: data MatchGroupTc
- HsExpr: data ParStmtBlock idL idR
- HsExpr: data PendingRnSplice
- HsExpr: data PendingTcSplice
- HsExpr: data RecStmtTc
- HsExpr: data RecordConTc
- HsExpr: data RecordUpdTc
- HsExpr: data SpliceDecoration
- HsExpr: data StmtLR idL idR body
- HsExpr: data SyntaxExpr p
- HsExpr: data TransForm
- HsExpr: data UnboundVar
- HsExpr: data UntypedSpliceFlavour
- HsExpr: hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool
- HsExpr: hsLMatchPats :: LMatch id body -> [LPat id]
- HsExpr: instance (Outputable.Outputable (HsExpr.StmtLR idL idL (HsExpr.LHsExpr idL)), Outputable.Outputable (HsExtension.XXParStmtBlock idL idR)) => Outputable.Outputable (HsExpr.ParStmtBlock idL idR)
- HsExpr: instance (Outputable.Outputable p, Outputable.Outputable (PlaceHolder.NameOrRdrName p)) => Outputable.Outputable (HsExpr.HsStmtContext p)
- HsExpr: instance (idL GHC.Types.~ HsExtension.GhcPass pl, idR GHC.Types.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR, Outputable.Outputable body) => Outputable.Outputable (HsExpr.StmtLR idL idR body)
- HsExpr: instance (idR GHC.Types.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idR, Outputable.Outputable body) => Outputable.Outputable (HsExpr.Match idR body)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.ArithSeqInfo p)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsBracket p)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsCmd p)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsCmdTop p)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsExpr p)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsSplice p)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsSplicedThing p)
- HsExpr: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.SyntaxExpr p)
- HsExpr: instance Data.Data.Data HsExpr.DelayedSplice
- HsExpr: instance Data.Data.Data HsExpr.HsArrAppType
- HsExpr: instance Data.Data.Data HsExpr.MatchGroupTc
- HsExpr: instance Data.Data.Data HsExpr.RecordUpdTc
- HsExpr: instance Data.Data.Data HsExpr.SpliceDecoration
- HsExpr: instance Data.Data.Data HsExpr.ThModFinalizers
- HsExpr: instance Data.Data.Data HsExpr.TransForm
- HsExpr: instance Data.Data.Data HsExpr.UnboundVar
- HsExpr: instance Data.Data.Data HsExpr.UntypedSpliceFlavour
- HsExpr: instance Data.Data.Data id => Data.Data.Data (HsExpr.HsMatchContext id)
- HsExpr: instance Data.Data.Data id => Data.Data.Data (HsExpr.HsStmtContext id)
- HsExpr: instance GHC.Base.Functor HsExpr.HsMatchContext
- HsExpr: instance GHC.Base.Functor HsExpr.HsStmtContext
- HsExpr: instance GHC.Classes.Eq HsExpr.SpliceDecoration
- HsExpr: instance GHC.Show.Show HsExpr.SpliceDecoration
- HsExpr: instance Outputable.Outputable HsExpr.PendingRnSplice
- HsExpr: instance Outputable.Outputable HsExpr.PendingTcSplice
- HsExpr: instance Outputable.Outputable HsExpr.SpliceDecoration
- HsExpr: instance Outputable.Outputable HsExpr.UnboundVar
- HsExpr: instance Outputable.OutputableBndr id => Outputable.Outputable (HsExpr.HsMatchContext id)
- HsExpr: isAtomicHsExpr :: HsExpr id -> Bool
- HsExpr: isComprehensionContext :: HsStmtContext id -> Bool
- HsExpr: isEmptyMatchGroup :: MatchGroup id body -> Bool
- HsExpr: isInfixMatch :: Match id body -> Bool
- HsExpr: isMonadCompContext :: HsStmtContext id -> Bool
- HsExpr: isMonadFailStmtContext :: HsStmtContext id -> Bool
- HsExpr: isPatSynCtxt :: HsMatchContext id -> Bool
- HsExpr: isQuietHsCmd :: HsCmd id -> Bool
- HsExpr: isQuietHsExpr :: HsExpr id -> Bool
- HsExpr: isSingletonMatchGroup :: [LMatch id body] -> Bool
- HsExpr: isTypedBracket :: HsBracket id -> Bool
- HsExpr: isTypedSplice :: HsSplice id -> Bool
- HsExpr: matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
- HsExpr: matchGroupArity :: MatchGroup id body -> Arity
- HsExpr: matchSeparator :: HsMatchContext id -> SDoc
- HsExpr: mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn
- HsExpr: mkSyntaxExpr :: HsExpr (GhcPass p) -> SyntaxExpr (GhcPass p)
- HsExpr: newtype ThModFinalizers
- HsExpr: noExpr :: HsExpr (GhcPass p)
- HsExpr: noSyntaxExpr :: SyntaxExpr (GhcPass p)
- HsExpr: parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- HsExpr: pp_dotdot :: SDoc
- HsExpr: pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc
- HsExpr: pprAStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
- HsExpr: pprBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- HsExpr: pprBy :: Outputable body => Maybe body -> SDoc
- HsExpr: pprCmd :: OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- HsExpr: pprCmdArg :: OutputableBndrId (GhcPass p) => HsCmdTop (GhcPass p) -> SDoc
- HsExpr: pprComp :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- HsExpr: pprDebugParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprDo :: (OutputableBndrId (GhcPass p), Outputable body) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
- HsExpr: pprExpr :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- HsExpr: pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
- HsExpr: pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- HsExpr: pprGRHS :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc
- HsExpr: pprGRHSs :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc
- HsExpr: pprHsBracket :: OutputableBndrId (GhcPass p) => HsBracket (GhcPass p) -> SDoc
- HsExpr: pprLCmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- HsExpr: pprLExpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprMatch :: (OutputableBndrId (GhcPass idR), Outputable body) => Match (GhcPass idR) body -> SDoc
- HsExpr: pprMatchContext :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
- HsExpr: pprMatchContextNoun :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
- HsExpr: pprMatchInCtxt :: (OutputableBndrId (GhcPass idR), Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc
- HsExpr: pprMatches :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- HsExpr: pprParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> HsExpr (GhcPass p) -> SDoc
- HsExpr: pprParendLExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprPatBind :: forall bndr p body. (OutputableBndrId (GhcPass bndr), OutputableBndrId (GhcPass p), Outputable body) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc
- HsExpr: pprPendingSplice :: OutputableBndrId (GhcPass p) => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprQuals :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- HsExpr: pprSplice :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- HsExpr: pprSpliceDecl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc
- HsExpr: pprStmt :: forall idL idR body. (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- HsExpr: pprStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
- HsExpr: pprStmtInCtxt :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- HsExpr: pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
- HsExpr: pprTransformStmt :: OutputableBndrId (GhcPass p) => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
- HsExpr: ppr_apps :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
- HsExpr: ppr_cmd :: forall p. OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- HsExpr: ppr_do_stmts :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
- HsExpr: ppr_expr :: forall p. OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- HsExpr: ppr_lcmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- HsExpr: ppr_lexpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- HsExpr: ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
- HsExpr: ppr_splice :: OutputableBndrId (GhcPass p) => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
- HsExpr: ppr_splice_decl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- HsExpr: thBrackets :: SDoc -> SDoc -> SDoc
- HsExpr: thTyBrackets :: SDoc -> SDoc
- HsExpr: tupArgPresent :: LHsTupArg id -> Bool
- HsExpr: type CmdLStmt id = LStmt id (LHsCmd id)
- HsExpr: type CmdStmt id = Stmt id (LHsCmd id)
- HsExpr: type CmdSyntaxTable p = [(Name, HsExpr p)]
- HsExpr: type ExprLStmt id = LStmt id (LHsExpr id)
- HsExpr: type ExprStmt id = Stmt id (LHsExpr id)
- HsExpr: type GhciLStmt id = LStmt id (LHsExpr id)
- HsExpr: type GhciStmt id = Stmt id (LHsExpr id)
- HsExpr: type GuardLStmt id = LStmt id (LHsExpr id)
- HsExpr: type GuardStmt id = Stmt id (LHsExpr id)
- HsExpr: type HsRecordBinds p = HsRecFields p (LHsExpr p)
- HsExpr: type LGRHS id body = Located (GRHS id body)
- HsExpr: type LHsCmd id = Located (HsCmd id)
- HsExpr: type LHsCmdTop p = Located (HsCmdTop p)
- HsExpr: type LHsExpr p = Located (HsExpr p) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
- HsExpr: type LHsTupArg id = Located (HsTupArg id)
- HsExpr: type LMatch id body = Located (Match id body)
- HsExpr: type LStmt id body = Located (StmtLR id id body)
- HsExpr: type LStmtLR idL idR body = Located (StmtLR idL idR body)
- HsExpr: type PostTcExpr = HsExpr GhcTc
- HsExpr: type PostTcTable = [(Name, PostTcExpr)]
- HsExpr: type SplicePointName = Name
- HsExpr: type Stmt id body = StmtLR id id body
- HsExpr: unboundVarOcc :: UnboundVar -> OccName
- HsExtension: NoExt :: NoExt
- HsExtension: Parsed :: Pass
- HsExtension: Renamed :: Pass
- HsExtension: Typechecked :: Pass
- HsExtension: class Convertable a b | a -> b
- HsExtension: convert :: Convertable a b => a -> b
- HsExtension: data GhcPass (c :: Pass)
- HsExtension: data NoExt
- HsExtension: data Pass
- HsExtension: instance Data.Data.Data HsExtension.NoExt
- HsExtension: instance Data.Data.Data HsExtension.Pass
- HsExtension: instance Data.Typeable.Internal.Typeable c => Data.Data.Data (HsExtension.GhcPass c)
- HsExtension: instance GHC.Classes.Eq (HsExtension.GhcPass c)
- HsExtension: instance GHC.Classes.Eq HsExtension.NoExt
- HsExtension: instance GHC.Classes.Ord HsExtension.NoExt
- HsExtension: instance HsExtension.Convertable a a
- HsExtension: instance Outputable.Outputable HsExtension.NoExt
- HsExtension: noExt :: NoExt
- HsExtension: type ConvertIdX a b = (XHsDoublePrim a ~ XHsDoublePrim b, XHsFloatPrim a ~ XHsFloatPrim b, XHsRat a ~ XHsRat b, XHsInteger a ~ XHsInteger b, XHsWord64Prim a ~ XHsWord64Prim b, XHsInt64Prim a ~ XHsInt64Prim b, XHsWordPrim a ~ XHsWordPrim b, XHsIntPrim a ~ XHsIntPrim b, XHsInt a ~ XHsInt b, XHsStringPrim a ~ XHsStringPrim b, XHsString a ~ XHsString b, XHsCharPrim a ~ XHsCharPrim b, XHsChar a ~ XHsChar b, XXLit a ~ XXLit b)
- HsExtension: type ForallXABExport (c :: * -> Constraint) (x :: *) = (c (XABE x), c (XXABExport x))
- HsExtension: type ForallXAmbiguousFieldOcc (c :: * -> Constraint) (x :: *) = (c (XUnambiguous x), c (XAmbiguous x), c (XXAmbiguousFieldOcc x))
- HsExtension: type ForallXAnnDecl (c :: * -> Constraint) (x :: *) = (c (XHsAnnotation x), c (XXAnnDecl x))
- HsExtension: type ForallXApplicativeArg (c :: * -> Constraint) (x :: *) = (c (XApplicativeArgOne x), c (XApplicativeArgMany x), c (XXApplicativeArg x))
- HsExtension: type ForallXBracket (c :: * -> Constraint) (x :: *) = (c (XExpBr x), c (XPatBr x), c (XDecBrL x), c (XDecBrG x), c (XTypBr x), c (XVarBr x), c (XTExpBr x), c (XXBracket x))
- HsExtension: type ForallXClsInstDecl (c :: * -> Constraint) (x :: *) = (c (XCClsInstDecl x), c (XXClsInstDecl x))
- HsExtension: type ForallXCmd (c :: * -> Constraint) (x :: *) = (c (XCmdArrApp x), c (XCmdArrForm x), c (XCmdApp x), c (XCmdLam x), c (XCmdPar x), c (XCmdCase x), c (XCmdIf x), c (XCmdLet x), c (XCmdDo x), c (XCmdWrap x), c (XXCmd x))
- HsExtension: type ForallXCmdTop (c :: * -> Constraint) (x :: *) = (c (XCmdTop x), c (XXCmdTop x))
- HsExtension: type ForallXConDecl (c :: * -> Constraint) (x :: *) = (c (XConDeclGADT x), c (XConDeclH98 x), c (XXConDecl x))
- HsExtension: type ForallXConDeclField (c :: * -> Constraint) (x :: *) = (c (XConDeclField x), c (XXConDeclField x))
- HsExtension: type ForallXDefaultDecl (c :: * -> Constraint) (x :: *) = (c (XCDefaultDecl x), c (XXDefaultDecl x))
- HsExtension: type ForallXDerivDecl (c :: * -> Constraint) (x :: *) = (c (XCDerivDecl x), c (XXDerivDecl x))
- HsExtension: type ForallXExpr (c :: * -> Constraint) (x :: *) = (c (XVar x), c (XUnboundVar x), c (XConLikeOut x), c (XRecFld x), c (XOverLabel x), c (XIPVar x), c (XOverLitE x), c (XLitE x), c (XLam x), c (XLamCase x), c (XApp x), c (XAppTypeE x), c (XOpApp x), c (XNegApp x), c (XPar x), c (XSectionL x), c (XSectionR x), c (XExplicitTuple x), c (XExplicitSum x), c (XCase x), c (XIf x), c (XMultiIf x), c (XLet x), c (XDo x), c (XExplicitList x), c (XRecordCon x), c (XRecordUpd x), c (XExprWithTySig x), c (XArithSeq x), c (XSCC x), c (XCoreAnn x), c (XBracket x), c (XRnBracketOut x), c (XTcBracketOut x), c (XSpliceE x), c (XProc x), c (XStatic x), c (XArrApp x), c (XArrForm x), c (XTick x), c (XBinTick x), c (XTickPragma x), c (XEWildPat x), c (XEAsPat x), c (XEViewPat x), c (XELazyPat x), c (XWrap x), c (XXExpr x))
- HsExtension: type ForallXFamEqn (c :: * -> Constraint) (x :: *) (p :: *) (r :: *) = (c (XCFamEqn x p r), c (XXFamEqn x p r))
- HsExtension: type ForallXFamilyDecl (c :: * -> Constraint) (x :: *) = (c (XCFamilyDecl x), c (XXFamilyDecl x))
- HsExtension: type ForallXFamilyResultSig (c :: * -> Constraint) (x :: *) = (c (XNoSig x), c (XCKindSig x), c (XTyVarSig x), c (XXFamilyResultSig x))
- HsExtension: type ForallXFieldOcc (c :: * -> Constraint) (x :: *) = (c (XCFieldOcc x), c (XXFieldOcc x))
- HsExtension: type ForallXFixitySig (c :: * -> Constraint) (x :: *) = (c (XFixitySig x), c (XXFixitySig x))
- HsExtension: type ForallXForeignDecl (c :: * -> Constraint) (x :: *) = (c (XForeignImport x), c (XForeignExport x), c (XXForeignDecl x))
- HsExtension: type ForallXGRHS (c :: * -> Constraint) (x :: *) (b :: *) = (c (XCGRHS x b), c (XXGRHS x b))
- HsExtension: type ForallXGRHSs (c :: * -> Constraint) (x :: *) (b :: *) = (c (XCGRHSs x b), c (XXGRHSs x b))
- HsExtension: type ForallXHsBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XFunBind x x'), c (XPatBind x x'), c (XVarBind x x'), c (XAbsBinds x x'), c (XPatSynBind x x'), c (XXHsBindsLR x x'))
- HsExtension: type ForallXHsDataDefn (c :: * -> Constraint) (x :: *) = (c (XCHsDataDefn x), c (XXHsDataDefn x))
- HsExtension: type ForallXHsDecl (c :: * -> Constraint) (x :: *) = (c (XTyClD x), c (XInstD x), c (XDerivD x), c (XValD x), c (XSigD x), c (XDefD x), c (XForD x), c (XWarningD x), c (XAnnD x), c (XRuleD x), c (XSpliceD x), c (XDocD x), c (XRoleAnnotD x), c (XXHsDecl x))
- HsExtension: type ForallXHsDerivingClause (c :: * -> Constraint) (x :: *) = (c (XCHsDerivingClause x), c (XXHsDerivingClause x))
- HsExtension: type ForallXHsGroup (c :: * -> Constraint) (x :: *) = (c (XCHsGroup x), c (XXHsGroup x))
- HsExtension: type ForallXHsIPBinds (c :: * -> Constraint) (x :: *) = (c (XIPBinds x), c (XXHsIPBinds x))
- HsExtension: type ForallXHsImplicitBndrs (c :: * -> Constraint) (x :: *) (b :: *) = (c (XHsIB x b), c (XXHsImplicitBndrs x b))
- HsExtension: type ForallXHsLit (c :: * -> Constraint) (x :: *) = (c (XHsChar x), c (XHsCharPrim x), c (XHsDoublePrim x), c (XHsFloatPrim x), c (XHsInt x), c (XHsInt64Prim x), c (XHsIntPrim x), c (XHsInteger x), c (XHsRat x), c (XHsString x), c (XHsStringPrim x), c (XHsWord64Prim x), c (XHsWordPrim x), c (XXLit x))
- HsExtension: type ForallXHsLocalBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XHsValBinds x x'), c (XHsIPBinds x x'), c (XEmptyLocalBinds x x'), c (XXHsLocalBindsLR x x'))
- HsExtension: type ForallXHsWildCardBndrs (c :: * -> Constraint) (x :: *) (b :: *) = (c (XHsWC x b), c (XXHsWildCardBndrs x b))
- HsExtension: type ForallXIE (c :: * -> Constraint) (x :: *) = (c (XIEVar x), c (XIEThingAbs x), c (XIEThingAll x), c (XIEThingWith x), c (XIEModuleContents x), c (XIEGroup x), c (XIEDoc x), c (XIEDocNamed x), c (XXIE x))
- HsExtension: type ForallXIPBind (c :: * -> Constraint) (x :: *) = (c (XCIPBind x), c (XXIPBind x))
- HsExtension: type ForallXImportDecl (c :: * -> Constraint) (x :: *) = (c (XCImportDecl x), c (XXImportDecl x))
- HsExtension: type ForallXInstDecl (c :: * -> Constraint) (x :: *) = (c (XClsInstD x), c (XDataFamInstD x), c (XTyFamInstD x), c (XXInstDecl x))
- HsExtension: type ForallXLHsQTyVars (c :: * -> Constraint) (x :: *) = (c (XHsQTvs x), c (XXLHsQTyVars x))
- HsExtension: type ForallXMatch (c :: * -> Constraint) (x :: *) (b :: *) = (c (XCMatch x b), c (XXMatch x b))
- HsExtension: type ForallXMatchGroup (c :: * -> Constraint) (x :: *) (b :: *) = (c (XMG x b), c (XXMatchGroup x b))
- HsExtension: type ForallXOverLit (c :: * -> Constraint) (x :: *) = (c (XOverLit x), c (XXOverLit x))
- HsExtension: type ForallXParStmtBlock (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XParStmtBlock x x'), c (XXParStmtBlock x x'))
- HsExtension: type ForallXPat (c :: * -> Constraint) (x :: *) = (c (XWildPat x), c (XVarPat x), c (XLazyPat x), c (XAsPat x), c (XParPat x), c (XBangPat x), c (XListPat x), c (XTuplePat x), c (XSumPat x), c (XViewPat x), c (XSplicePat x), c (XLitPat x), c (XNPat x), c (XNPlusKPat x), c (XSigPat x), c (XCoPat x), c (XXPat x))
- HsExtension: type ForallXPatSynBind (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XPSB x x'), c (XXPatSynBind x x'))
- HsExtension: type ForallXRoleAnnotDecl (c :: * -> Constraint) (x :: *) = (c (XCRoleAnnotDecl x), c (XXRoleAnnotDecl x))
- HsExtension: type ForallXRuleBndr (c :: * -> Constraint) (x :: *) = (c (XCRuleBndr x), c (XRuleBndrSig x), c (XXRuleBndr x))
- HsExtension: type ForallXRuleDecl (c :: * -> Constraint) (x :: *) = (c (XHsRule x), c (XXRuleDecl x))
- HsExtension: type ForallXRuleDecls (c :: * -> Constraint) (x :: *) = (c (XCRuleDecls x), c (XXRuleDecls x))
- HsExtension: type ForallXSig (c :: * -> Constraint) (x :: *) = (c (XTypeSig x), c (XPatSynSig x), c (XClassOpSig x), c (XIdSig x), c (XFixSig x), c (XInlineSig x), c (XSpecSig x), c (XSpecInstSig x), c (XMinimalSig x), c (XSCCFunSig x), c (XCompleteMatchSig x), c (XXSig x))
- HsExtension: type ForallXSplice (c :: * -> Constraint) (x :: *) = (c (XTypedSplice x), c (XUntypedSplice x), c (XQuasiQuote x), c (XSpliced x), c (XXSplice x))
- HsExtension: type ForallXSpliceDecl (c :: * -> Constraint) (x :: *) = (c (XSpliceDecl x), c (XXSpliceDecl x))
- HsExtension: type ForallXStmtLR (c :: * -> Constraint) (x :: *) (x' :: *) (b :: *) = (c (XLastStmt x x' b), c (XBindStmt x x' b), c (XApplicativeStmt x x' b), c (XBodyStmt x x' b), c (XLetStmt x x' b), c (XParStmt x x' b), c (XTransStmt x x' b), c (XRecStmt x x' b), c (XXStmtLR x x' b))
- HsExtension: type ForallXTupArg (c :: * -> Constraint) (x :: *) = (c (XPresent x), c (XMissing x), c (XXTupArg x))
- HsExtension: type ForallXTyClDecl (c :: * -> Constraint) (x :: *) = (c (XFamDecl x), c (XSynDecl x), c (XDataDecl x), c (XClassDecl x), c (XXTyClDecl x))
- HsExtension: type ForallXTyClGroup (c :: * -> Constraint) (x :: *) = (c (XCTyClGroup x), c (XXTyClGroup x))
- HsExtension: type ForallXTyVarBndr (c :: * -> Constraint) (x :: *) = (c (XUserTyVar x), c (XKindedTyVar x), c (XXTyVarBndr x))
- HsExtension: type ForallXType (c :: * -> Constraint) (x :: *) = (c (XForAllTy x), c (XQualTy x), c (XTyVar x), c (XAppTy x), c (XAppKindTy x), c (XFunTy x), c (XListTy x), c (XTupleTy x), c (XSumTy x), c (XOpTy x), c (XParTy x), c (XIParamTy x), c (XStarTy x), c (XKindSig x), c (XSpliceTy x), c (XDocTy x), c (XBangTy x), c (XRecTy x), c (XExplicitListTy x), c (XExplicitTupleTy x), c (XTyLit x), c (XWildCardTy x), c (XXType x))
- HsExtension: type ForallXValBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XValBinds x x'), c (XXValBindsLR x x'))
- HsExtension: type ForallXWarnDecl (c :: * -> Constraint) (x :: *) = (c (XWarning x), c (XXWarnDecl x))
- HsExtension: type ForallXWarnDecls (c :: * -> Constraint) (x :: *) = (c (XWarnings x), c (XXWarnDecls x))
- HsExtension: type GhcPs = GhcPass 'Parsed
- HsExtension: type GhcRn = GhcPass 'Renamed
- HsExtension: type GhcTc = GhcPass 'Typechecked
- HsExtension: type GhcTcId = GhcTc
- HsExtension: type LIdP p = Located (IdP p)
- HsExtension: type OutputableBndrId id = (OutputableBndr (NameOrRdrName (IdP id)), OutputableBndr (IdP id), OutputableBndr (NameOrRdrName (IdP (NoGhcTc id))), OutputableBndr (IdP (NoGhcTc id)), NoGhcTc id ~ NoGhcTc (NoGhcTc id), OutputableX id, OutputableX (NoGhcTc id))
- HsExtension: type OutputableX p = (Outputable (XIPBinds p), Outputable (XViaStrategy p), Outputable (XViaStrategy GhcRn))
- HsExtension: type family XXIE x
- HsImpExp: IEDoc :: XIEDoc pass -> HsDocString -> IE pass
- HsImpExp: IEDocNamed :: XIEDocNamed pass -> String -> IE pass
- HsImpExp: IEGroup :: XIEGroup pass -> Int -> HsDocString -> IE pass
- HsImpExp: IEModuleContents :: XIEModuleContents pass -> Located ModuleName -> IE pass
- HsImpExp: IEName :: Located name -> IEWrappedName name
- HsImpExp: IEPattern :: Located name -> IEWrappedName name
- HsImpExp: IEThingAbs :: XIEThingAbs pass -> LIEWrappedName (IdP pass) -> IE pass
- HsImpExp: IEThingAll :: XIEThingAll pass -> LIEWrappedName (IdP pass) -> IE pass
- HsImpExp: IEThingWith :: XIEThingWith pass -> LIEWrappedName (IdP pass) -> IEWildcard -> [LIEWrappedName (IdP pass)] -> [Located (FieldLbl (IdP pass))] -> IE pass
- HsImpExp: IEType :: Located name -> IEWrappedName name
- HsImpExp: IEVar :: XIEVar pass -> LIEWrappedName (IdP pass) -> IE pass
- HsImpExp: IEWildcard :: Int -> IEWildcard
- HsImpExp: ImportDecl :: XCImportDecl pass -> SourceText -> Located ModuleName -> Maybe StringLiteral -> Bool -> Bool -> Bool -> Bool -> Maybe (Located ModuleName) -> Maybe (Bool, Located [LIE pass]) -> ImportDecl pass
- HsImpExp: NoIEWildcard :: IEWildcard
- HsImpExp: XIE :: XXIE pass -> IE pass
- HsImpExp: XImportDecl :: XXImportDecl pass -> ImportDecl pass
- HsImpExp: [ideclAs] :: ImportDecl pass -> Maybe (Located ModuleName)
- HsImpExp: [ideclExt] :: ImportDecl pass -> XCImportDecl pass
- HsImpExp: [ideclHiding] :: ImportDecl pass -> Maybe (Bool, Located [LIE pass])
- HsImpExp: [ideclImplicit] :: ImportDecl pass -> Bool
- HsImpExp: [ideclName] :: ImportDecl pass -> Located ModuleName
- HsImpExp: [ideclPkgQual] :: ImportDecl pass -> Maybe StringLiteral
- HsImpExp: [ideclQualified] :: ImportDecl pass -> Bool
- HsImpExp: [ideclSafe] :: ImportDecl pass -> Bool
- HsImpExp: [ideclSourceSrc] :: ImportDecl pass -> SourceText
- HsImpExp: [ideclSource] :: ImportDecl pass -> Bool
- HsImpExp: data IE pass
- HsImpExp: data IEWildcard
- HsImpExp: data IEWrappedName name
- HsImpExp: data ImportDecl pass
- HsImpExp: ieLWrappedName :: LIEWrappedName name -> Located name
- HsImpExp: ieName :: IE pass -> IdP pass
- HsImpExp: ieNames :: IE pass -> [IdP pass]
- HsImpExp: ieWrappedName :: IEWrappedName name -> name
- HsImpExp: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsImpExp.IE p)
- HsImpExp: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsImpExp.ImportDecl p)
- HsImpExp: instance Data.Data.Data HsImpExp.IEWildcard
- HsImpExp: instance Data.Data.Data name => Data.Data.Data (HsImpExp.IEWrappedName name)
- HsImpExp: instance GHC.Classes.Eq HsImpExp.IEWildcard
- HsImpExp: instance GHC.Classes.Eq name => GHC.Classes.Eq (HsImpExp.IEWrappedName name)
- HsImpExp: instance OccName.HasOccName name => OccName.HasOccName (HsImpExp.IEWrappedName name)
- HsImpExp: instance Outputable.OutputableBndr name => Outputable.Outputable (HsImpExp.IEWrappedName name)
- HsImpExp: instance Outputable.OutputableBndr name => Outputable.OutputableBndr (HsImpExp.IEWrappedName name)
- HsImpExp: lieWrappedName :: LIEWrappedName name -> name
- HsImpExp: pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc
- HsImpExp: replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2
- HsImpExp: replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2
- HsImpExp: simpleImportDecl :: ModuleName -> ImportDecl (GhcPass p)
- HsImpExp: type LIE pass = Located (IE pass) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'"
- HsImpExp: type LIEWrappedName name = Located (IEWrappedName name)
- HsImpExp: type LImportDecl pass = Located (ImportDecl pass) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'"
- HsInstances: instance (Data.Data.Data pats, Data.Data.Data rhs) => Data.Data.Data (HsDecls.FamEqn HsExtension.GhcPs pats rhs)
- HsInstances: instance (Data.Data.Data pats, Data.Data.Data rhs) => Data.Data.Data (HsDecls.FamEqn HsExtension.GhcRn pats rhs)
- HsInstances: instance (Data.Data.Data pats, Data.Data.Data rhs) => Data.Data.Data (HsDecls.FamEqn HsExtension.GhcTc pats rhs)
- HsInstances: instance Data.Data.Data (HsBinds.ABExport HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.ABExport HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.ABExport HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.FixitySig HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.FixitySig HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.FixitySig HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.HsBindLR HsExtension.GhcPs HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.HsBindLR HsExtension.GhcPs HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsBindLR HsExtension.GhcRn HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsBindLR HsExtension.GhcTc HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.HsIPBinds HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.HsIPBinds HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsIPBinds HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.HsLocalBindsLR HsExtension.GhcPs HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.HsLocalBindsLR HsExtension.GhcPs HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsLocalBindsLR HsExtension.GhcRn HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsLocalBindsLR HsExtension.GhcTc HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.HsPatSynDir HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.HsPatSynDir HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsPatSynDir HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.HsValBindsLR HsExtension.GhcPs HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.HsValBindsLR HsExtension.GhcPs HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsValBindsLR HsExtension.GhcRn HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.HsValBindsLR HsExtension.GhcTc HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.IPBind HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.IPBind HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.IPBind HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.NHsValBindsLR HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.NHsValBindsLR HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.NHsValBindsLR HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.PatSynBind HsExtension.GhcPs HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.PatSynBind HsExtension.GhcPs HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.PatSynBind HsExtension.GhcRn HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.PatSynBind HsExtension.GhcTc HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsBinds.Sig HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsBinds.Sig HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsBinds.Sig HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.AnnDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.AnnDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.AnnDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.ClsInstDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.ClsInstDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.ClsInstDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.ConDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.ConDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.ConDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.DataFamInstDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.DataFamInstDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.DataFamInstDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.DefaultDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.DefaultDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.DefaultDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.DerivDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.DerivDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.DerivDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.DerivStrategy HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.DerivStrategy HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.DerivStrategy HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyInfo HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyInfo HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyInfo HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyResultSig HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyResultSig HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.FamilyResultSig HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.ForeignDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.ForeignDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.ForeignDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.HsDataDefn HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.HsDataDefn HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.HsDataDefn HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.HsDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.HsDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.HsDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.HsDerivingClause HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.HsDerivingClause HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.HsDerivingClause HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.HsGroup HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.HsGroup HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.HsGroup HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.InjectivityAnn HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.InjectivityAnn HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.InjectivityAnn HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.InstDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.InstDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.InstDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.RoleAnnotDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.RoleAnnotDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.RoleAnnotDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.RuleBndr HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.RuleBndr HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.RuleBndr HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.RuleDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.RuleDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.RuleDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.RuleDecls HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.RuleDecls HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.RuleDecls HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.SpliceDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.SpliceDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.SpliceDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.TyClDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.TyClDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.TyClDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.TyClGroup HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.TyClGroup HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.TyClGroup HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.TyFamInstDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.TyFamInstDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.TyFamInstDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.WarnDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.WarnDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.WarnDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsDecls.WarnDecls HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsDecls.WarnDecls HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsDecls.WarnDecls HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.ApplicativeArg HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.ApplicativeArg HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.ApplicativeArg HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.ArithSeqInfo HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.ArithSeqInfo HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.ArithSeqInfo HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.HsBracket HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.HsBracket HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.HsBracket HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.HsCmd HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.HsCmd HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.HsCmd HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.HsCmdTop HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.HsCmdTop HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.HsCmdTop HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.HsExpr HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.HsExpr HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.HsExpr HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.HsSplice HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.HsSplice HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.HsSplice HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.HsSplicedThing HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.HsSplicedThing HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.HsSplicedThing HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.HsTupArg HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.HsTupArg HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.HsTupArg HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.ParStmtBlock HsExtension.GhcPs HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.ParStmtBlock HsExtension.GhcPs HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.ParStmtBlock HsExtension.GhcRn HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.ParStmtBlock HsExtension.GhcTc HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsExpr.SyntaxExpr HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsExpr.SyntaxExpr HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsExpr.SyntaxExpr HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsImpExp.IE HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsImpExp.IE HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsImpExp.IE HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsImpExp.ImportDecl HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsImpExp.ImportDecl HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsImpExp.ImportDecl HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsLit.HsLit HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsLit.HsLit HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsLit.HsLit HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsLit.HsOverLit HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsLit.HsOverLit HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsLit.HsOverLit HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsPat.Pat HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsPat.Pat HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsPat.Pat HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsTypes.AmbiguousFieldOcc HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsTypes.AmbiguousFieldOcc HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsTypes.AmbiguousFieldOcc HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsTypes.ConDeclField HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsTypes.ConDeclField HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsTypes.ConDeclField HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsTypes.FieldOcc HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsTypes.FieldOcc HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsTypes.FieldOcc HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsTypes.HsArg (HsTypes.LHsType HsExtension.GhcPs) (HsTypes.LHsKind HsExtension.GhcPs))
- HsInstances: instance Data.Data.Data (HsTypes.HsArg (HsTypes.LHsType HsExtension.GhcRn) (HsTypes.LHsKind HsExtension.GhcRn))
- HsInstances: instance Data.Data.Data (HsTypes.HsArg (HsTypes.LHsType HsExtension.GhcTc) (HsTypes.LHsKind HsExtension.GhcTc))
- HsInstances: instance Data.Data.Data (HsTypes.HsTyVarBndr HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsTypes.HsTyVarBndr HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsTypes.HsTyVarBndr HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsTypes.HsType HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsTypes.HsType HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsTypes.HsType HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data (HsTypes.LHsQTyVars HsExtension.GhcPs)
- HsInstances: instance Data.Data.Data (HsTypes.LHsQTyVars HsExtension.GhcRn)
- HsInstances: instance Data.Data.Data (HsTypes.LHsQTyVars HsExtension.GhcTc)
- HsInstances: instance Data.Data.Data HsExpr.CmdTopTc
- HsInstances: instance Data.Data.Data HsExpr.PendingRnSplice
- HsInstances: instance Data.Data.Data HsExpr.PendingTcSplice
- HsInstances: instance Data.Data.Data HsExpr.RecStmtTc
- HsInstances: instance Data.Data.Data HsExpr.RecordConTc
- HsInstances: instance Data.Data.Data HsPat.ListPatTc
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.GRHS HsExtension.GhcPs body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.GRHS HsExtension.GhcRn body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.GRHS HsExtension.GhcTc body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.GRHSs HsExtension.GhcPs body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.GRHSs HsExtension.GhcRn body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.GRHSs HsExtension.GhcTc body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.Match HsExtension.GhcPs body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.Match HsExtension.GhcRn body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.Match HsExtension.GhcTc body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.MatchGroup HsExtension.GhcPs body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.MatchGroup HsExtension.GhcRn body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.MatchGroup HsExtension.GhcTc body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.StmtLR HsExtension.GhcPs HsExtension.GhcPs body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.StmtLR HsExtension.GhcPs HsExtension.GhcRn body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.StmtLR HsExtension.GhcRn HsExtension.GhcRn body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsExpr.StmtLR HsExtension.GhcTc HsExtension.GhcTc body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsPat.HsRecFields HsExtension.GhcPs body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsPat.HsRecFields HsExtension.GhcRn body)
- HsInstances: instance Data.Data.Data body => Data.Data.Data (HsPat.HsRecFields HsExtension.GhcTc body)
- HsInstances: instance Data.Data.Data thing => Data.Data.Data (HsTypes.HsImplicitBndrs HsExtension.GhcPs thing)
- HsInstances: instance Data.Data.Data thing => Data.Data.Data (HsTypes.HsImplicitBndrs HsExtension.GhcRn thing)
- HsInstances: instance Data.Data.Data thing => Data.Data.Data (HsTypes.HsImplicitBndrs HsExtension.GhcTc thing)
- HsInstances: instance Data.Data.Data thing => Data.Data.Data (HsTypes.HsWildCardBndrs HsExtension.GhcPs thing)
- HsInstances: instance Data.Data.Data thing => Data.Data.Data (HsTypes.HsWildCardBndrs HsExtension.GhcRn thing)
- HsInstances: instance Data.Data.Data thing => Data.Data.Data (HsTypes.HsWildCardBndrs HsExtension.GhcTc thing)
- HsInstances: instance GHC.Classes.Eq (HsImpExp.IE HsExtension.GhcPs)
- HsInstances: instance GHC.Classes.Eq (HsImpExp.IE HsExtension.GhcRn)
- HsInstances: instance GHC.Classes.Eq (HsImpExp.IE HsExtension.GhcTc)
- HsLit: HsChar :: XHsChar x -> Char -> HsLit x
- HsLit: HsCharPrim :: XHsCharPrim x -> Char -> HsLit x
- HsLit: HsDoublePrim :: XHsDoublePrim x -> FractionalLit -> HsLit x
- HsLit: HsFloatPrim :: XHsFloatPrim x -> FractionalLit -> HsLit x
- HsLit: HsFractional :: !FractionalLit -> OverLitVal
- HsLit: HsInt :: XHsInt x -> IntegralLit -> HsLit x
- HsLit: HsInt64Prim :: XHsInt64Prim x -> Integer -> HsLit x
- HsLit: HsIntPrim :: XHsIntPrim x -> Integer -> HsLit x
- HsLit: HsInteger :: XHsInteger x -> Integer -> Type -> HsLit x
- HsLit: HsIntegral :: !IntegralLit -> OverLitVal
- HsLit: HsIsString :: !SourceText -> !FastString -> OverLitVal
- HsLit: HsRat :: XHsRat x -> FractionalLit -> Type -> HsLit x
- HsLit: HsString :: XHsString x -> FastString -> HsLit x
- HsLit: HsStringPrim :: XHsStringPrim x -> ByteString -> HsLit x
- HsLit: HsWord64Prim :: XHsWord64Prim x -> Integer -> HsLit x
- HsLit: HsWordPrim :: XHsWordPrim x -> Integer -> HsLit x
- HsLit: OverLit :: XOverLit p -> OverLitVal -> HsExpr p -> HsOverLit p
- HsLit: OverLitTc :: Bool -> Type -> OverLitTc
- HsLit: XLit :: XXLit x -> HsLit x
- HsLit: XOverLit :: XXOverLit p -> HsOverLit p
- HsLit: [ol_ext] :: HsOverLit p -> XOverLit p
- HsLit: [ol_rebindable] :: OverLitTc -> Bool
- HsLit: [ol_type] :: OverLitTc -> Type
- HsLit: [ol_val] :: HsOverLit p -> OverLitVal
- HsLit: [ol_witness] :: HsOverLit p -> HsExpr p
- HsLit: convertLit :: ConvertIdX a b => HsLit a -> HsLit b
- HsLit: data HsLit x
- HsLit: data HsOverLit p
- HsLit: data OverLitTc
- HsLit: data OverLitVal
- HsLit: hsLitNeedsParens :: PprPrec -> HsLit x -> Bool
- HsLit: hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool
- HsLit: instance (p GHC.Types.~ HsExtension.GhcPass pass) => Outputable.Outputable (HsLit.HsLit p)
- HsLit: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsLit.HsOverLit p)
- HsLit: instance Data.Data.Data HsLit.OverLitTc
- HsLit: instance Data.Data.Data HsLit.OverLitVal
- HsLit: instance GHC.Classes.Eq (HsExtension.XXOverLit p) => GHC.Classes.Eq (HsLit.HsOverLit p)
- HsLit: instance GHC.Classes.Eq (HsLit.HsLit x)
- HsLit: instance GHC.Classes.Eq HsLit.OverLitVal
- HsLit: instance GHC.Classes.Ord (HsExtension.XXOverLit p) => GHC.Classes.Ord (HsLit.HsOverLit p)
- HsLit: instance GHC.Classes.Ord HsLit.OverLitVal
- HsLit: instance Outputable.Outputable HsLit.OverLitVal
- HsLit: negateOverLitVal :: OverLitVal -> OverLitVal
- HsLit: overLitType :: HsOverLit GhcTc -> Type
- HsLit: pmPprHsLit :: HsLit (GhcPass x) -> SDoc
- HsLit: pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc
- HsPat: AsPat :: XAsPat p -> Located (IdP p) -> LPat p -> Pat p
- HsPat: BangPat :: XBangPat p -> LPat p -> Pat p
- HsPat: CoPat :: XCoPat p -> HsWrapper -> Pat p -> Type -> Pat p
- HsPat: ConPatIn :: Located (IdP p) -> HsConPatDetails p -> Pat p
- HsPat: ConPatOut :: Located ConLike -> [Type] -> [TyVar] -> [EvVar] -> TcEvBinds -> HsConPatDetails p -> HsWrapper -> Pat p
- HsPat: HsRecField :: Located id -> arg -> Bool -> HsRecField' id arg
- HsPat: HsRecFields :: [LHsRecField p arg] -> Maybe Int -> HsRecFields p arg
- HsPat: LazyPat :: XLazyPat p -> LPat p -> Pat p
- HsPat: ListPat :: XListPat p -> [LPat p] -> Pat p
- HsPat: ListPatTc :: Type -> Maybe (Type, SyntaxExpr GhcTc) -> ListPatTc
- HsPat: LitPat :: XLitPat p -> HsLit p -> Pat p
- HsPat: NPat :: XNPat p -> Located (HsOverLit p) -> Maybe (SyntaxExpr p) -> SyntaxExpr p -> Pat p
- HsPat: NPlusKPat :: XNPlusKPat p -> Located (IdP p) -> Located (HsOverLit p) -> HsOverLit p -> SyntaxExpr p -> SyntaxExpr p -> Pat p
- HsPat: ParPat :: XParPat p -> LPat p -> Pat p
- HsPat: SigPat :: XSigPat p -> LPat p -> LHsSigWcType (NoGhcTc p) -> Pat p
- HsPat: SplicePat :: XSplicePat p -> HsSplice p -> Pat p
- HsPat: SumPat :: XSumPat p -> LPat p -> ConTag -> Arity -> Pat p
- HsPat: TuplePat :: XTuplePat p -> [LPat p] -> Boxity -> Pat p
- HsPat: VarPat :: XVarPat p -> Located (IdP p) -> Pat p
- HsPat: ViewPat :: XViewPat p -> LHsExpr p -> LPat p -> Pat p
- HsPat: WildPat :: XWildPat p -> Pat p
- HsPat: XPat :: XXPat p -> Pat p
- HsPat: [hsRecFieldArg] :: HsRecField' id arg -> arg
- HsPat: [hsRecFieldLbl] :: HsRecField' id arg -> Located id
- HsPat: [hsRecPun] :: HsRecField' id arg -> Bool
- HsPat: [pat_arg_tys] :: Pat p -> [Type]
- HsPat: [pat_args] :: Pat p -> HsConPatDetails p
- HsPat: [pat_binds] :: Pat p -> TcEvBinds
- HsPat: [pat_con] :: Pat p -> Located ConLike
- HsPat: [pat_dicts] :: Pat p -> [EvVar]
- HsPat: [pat_tvs] :: Pat p -> [TyVar]
- HsPat: [pat_wrap] :: Pat p -> HsWrapper
- HsPat: [rec_dotdot] :: HsRecFields p arg -> Maybe Int
- HsPat: [rec_flds] :: HsRecFields p arg -> [LHsRecField p arg]
- HsPat: collectEvVarsPat :: Pat GhcTc -> Bag EvVar
- HsPat: collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar
- HsPat: data HsRecField' id arg
- HsPat: data HsRecFields p arg
- HsPat: data ListPatTc
- HsPat: data Pat p
- HsPat: hsConPatArgs :: HsConPatDetails p -> [LPat p]
- HsPat: hsRecFieldId :: HsRecField GhcTc arg -> Located Id
- HsPat: hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)
- HsPat: hsRecFields :: HsRecFields p arg -> [XCFieldOcc p]
- HsPat: hsRecFieldsArgs :: HsRecFields p arg -> [arg]
- HsPat: hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id
- HsPat: hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc
- HsPat: hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName
- HsPat: instance (Data.Data.Data id, Data.Data.Data arg) => Data.Data.Data (HsPat.HsRecField' id arg)
- HsPat: instance (Outputable.Outputable p, Outputable.Outputable arg) => Outputable.Outputable (HsPat.HsRecField' p arg)
- HsPat: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsPat.Pat p)
- HsPat: instance Data.Foldable.Foldable (HsPat.HsRecField' id)
- HsPat: instance Data.Foldable.Foldable (HsPat.HsRecFields p)
- HsPat: instance Data.Traversable.Traversable (HsPat.HsRecField' id)
- HsPat: instance Data.Traversable.Traversable (HsPat.HsRecFields p)
- HsPat: instance GHC.Base.Functor (HsPat.HsRecField' id)
- HsPat: instance GHC.Base.Functor (HsPat.HsRecFields p)
- HsPat: instance Outputable.Outputable arg => Outputable.Outputable (HsPat.HsRecFields p arg)
- HsPat: instance SrcLoc.HasSrcSpan (HsPat.LPat (HsExtension.GhcPass p))
- HsPat: isBangedLPat :: LPat (GhcPass p) -> Bool
- HsPat: isIrrefutableHsPat :: OutputableBndrId (GhcPass p) => LPat (GhcPass p) -> Bool
- HsPat: looksLazyPatBind :: HsBind (GhcPass p) -> Bool
- HsPat: mkCharLitPat :: SourceText -> Char -> OutPat (GhcPass p)
- HsPat: mkNilPat :: Type -> OutPat (GhcPass p)
- HsPat: mkPrefixConPat :: DataCon -> [OutPat (GhcPass p)] -> [Type] -> OutPat (GhcPass p)
- HsPat: parenthesizePat :: PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
- HsPat: patNeedsParens :: PprPrec -> Pat p -> Bool
- HsPat: pprConArgs :: OutputableBndrId (GhcPass p) => HsConPatDetails (GhcPass p) -> SDoc
- HsPat: pprParendLPat :: OutputableBndrId (GhcPass p) => PprPrec -> LPat (GhcPass p) -> SDoc
- HsPat: type HsConPatDetails p = HsConDetails (LPat p) (HsRecFields p (LPat p))
- HsPat: type HsRecField p arg = HsRecField' (FieldOcc p) arg
- HsPat: type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p)
- HsPat: type InPat p = LPat p
- HsPat: type LHsRecField p arg = Located (HsRecField p arg)
- HsPat: type LHsRecField' p arg = Located (HsRecField' p arg)
- HsPat: type LHsRecUpdField p = Located (HsRecUpdField p)
- HsPat: type LPat p = Pat p
- HsPat: type OutPat p = LPat p
- HsSyn: HsModule :: Maybe (Located ModuleName) -> Maybe (Located [LIE pass]) -> [LImportDecl pass] -> [LHsDecl pass] -> Maybe (Located WarningTxt) -> Maybe LHsDocString -> HsModule pass
- HsSyn: [hsmodDecls] :: HsModule pass -> [LHsDecl pass]
- HsSyn: [hsmodDeprecMessage] :: HsModule pass -> Maybe (Located WarningTxt)
- HsSyn: [hsmodExports] :: HsModule pass -> Maybe (Located [LIE pass])
- HsSyn: [hsmodHaddockModHeader] :: HsModule pass -> Maybe LHsDocString
- HsSyn: [hsmodImports] :: HsModule pass -> [LImportDecl pass]
- HsSyn: [hsmodName] :: HsModule pass -> Maybe (Located ModuleName)
- HsSyn: data Fixity
- HsSyn: data HsModule pass
- HsSyn: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsSyn.HsModule p)
- HsSyn: instance Data.Data.Data (HsSyn.HsModule HsExtension.GhcPs)
- HsSyn: instance Data.Data.Data (HsSyn.HsModule HsExtension.GhcRn)
- HsSyn: instance Data.Data.Data (HsSyn.HsModule HsExtension.GhcTc)
- HsTypes: Ambiguous :: XAmbiguous pass -> Located RdrName -> AmbiguousFieldOcc pass
- HsTypes: ConDeclField :: XConDeclField pass -> [LFieldOcc pass] -> LBangType pass -> Maybe LHsDocString -> ConDeclField pass
- HsTypes: FieldOcc :: XCFieldOcc pass -> Located RdrName -> FieldOcc pass
- HsTypes: HsAppKindTy :: XAppKindTy pass -> LHsType pass -> LHsKind pass -> HsType pass
- HsTypes: HsAppTy :: XAppTy pass -> LHsType pass -> LHsType pass -> HsType pass
- HsTypes: HsArgPar :: SrcSpan -> HsArg tm ty
- HsTypes: HsBangTy :: XBangTy pass -> HsSrcBang -> LHsType pass -> HsType pass
- HsTypes: HsBoxedOrConstraintTuple :: HsTupleSort
- HsTypes: HsBoxedTuple :: HsTupleSort
- HsTypes: HsConstraintTuple :: HsTupleSort
- HsTypes: HsDocTy :: XDocTy pass -> LHsType pass -> LHsDocString -> HsType pass
- HsTypes: HsExplicitListTy :: XExplicitListTy pass -> PromotionFlag -> [LHsType pass] -> HsType pass
- HsTypes: HsExplicitTupleTy :: XExplicitTupleTy pass -> [LHsType pass] -> HsType pass
- HsTypes: HsForAllTy :: XForAllTy pass -> [LHsTyVarBndr pass] -> LHsType pass -> HsType pass
- HsTypes: HsFunTy :: XFunTy pass -> LHsType pass -> LHsType pass -> HsType pass
- HsTypes: HsIB :: XHsIB pass thing -> thing -> HsImplicitBndrs pass thing
- HsTypes: HsIPName :: FastString -> HsIPName
- HsTypes: HsIParamTy :: XIParamTy pass -> Located HsIPName -> LHsType pass -> HsType pass
- HsTypes: HsKindSig :: XKindSig pass -> LHsType pass -> LHsKind pass -> HsType pass
- HsTypes: HsLazy :: HsImplBang
- HsTypes: HsListTy :: XListTy pass -> LHsType pass -> HsType pass
- HsTypes: HsNumTy :: SourceText -> Integer -> HsTyLit
- HsTypes: HsOpTy :: XOpTy pass -> LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass
- HsTypes: HsParTy :: XParTy pass -> LHsType pass -> HsType pass
- HsTypes: HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr pass] -> LHsQTyVars pass
- HsTypes: HsQTvsRn :: [Name] -> NameSet -> HsQTvsRn
- HsTypes: HsQualTy :: XQualTy pass -> LHsContext pass -> LHsType pass -> HsType pass
- HsTypes: HsRecTy :: XRecTy pass -> [LConDeclField pass] -> HsType pass
- HsTypes: HsSpliceTy :: XSpliceTy pass -> HsSplice pass -> HsType pass
- HsTypes: HsSrcBang :: SourceText -> SrcUnpackedness -> SrcStrictness -> HsSrcBang
- HsTypes: HsStarTy :: XStarTy pass -> Bool -> HsType pass
- HsTypes: HsStrTy :: SourceText -> FastString -> HsTyLit
- HsTypes: HsStrict :: HsImplBang
- HsTypes: HsSumTy :: XSumTy pass -> [LHsType pass] -> HsType pass
- HsTypes: HsTupleTy :: XTupleTy pass -> HsTupleSort -> [LHsType pass] -> HsType pass
- HsTypes: HsTyLit :: XTyLit pass -> HsTyLit -> HsType pass
- HsTypes: HsTyVar :: XTyVar pass -> PromotionFlag -> Located (IdP pass) -> HsType pass
- HsTypes: HsTypeArg :: SrcSpan -> ty -> HsArg tm ty
- HsTypes: HsUnboxedTuple :: HsTupleSort
- HsTypes: HsUnpack :: Maybe Coercion -> HsImplBang
- HsTypes: HsValArg :: tm -> HsArg tm ty
- HsTypes: HsWC :: XHsWC pass thing -> thing -> HsWildCardBndrs pass thing
- HsTypes: HsWildCardTy :: XWildCardTy pass -> HsType pass
- HsTypes: InfixCon :: arg -> arg -> HsConDetails arg rec
- HsTypes: KindedTyVar :: XKindedTyVar pass -> Located (IdP pass) -> LHsKind pass -> HsTyVarBndr pass
- HsTypes: NHsCoreTy :: Type -> NewHsTypeX
- HsTypes: NoSrcStrict :: SrcStrictness
- HsTypes: NoSrcUnpack :: SrcUnpackedness
- HsTypes: PrefixCon :: [arg] -> HsConDetails arg rec
- HsTypes: RecCon :: rec -> HsConDetails arg rec
- HsTypes: SrcLazy :: SrcStrictness
- HsTypes: SrcNoUnpack :: SrcUnpackedness
- HsTypes: SrcStrict :: SrcStrictness
- HsTypes: SrcUnpack :: SrcUnpackedness
- HsTypes: Unambiguous :: XUnambiguous pass -> Located RdrName -> AmbiguousFieldOcc pass
- HsTypes: UserTyVar :: XUserTyVar pass -> Located (IdP pass) -> HsTyVarBndr pass
- HsTypes: XAmbiguousFieldOcc :: XXAmbiguousFieldOcc pass -> AmbiguousFieldOcc pass
- HsTypes: XConDeclField :: XXConDeclField pass -> ConDeclField pass
- HsTypes: XFieldOcc :: XXFieldOcc pass -> FieldOcc pass
- HsTypes: XHsImplicitBndrs :: XXHsImplicitBndrs pass thing -> HsImplicitBndrs pass thing
- HsTypes: XHsType :: XXType pass -> HsType pass
- HsTypes: XHsWildCardBndrs :: XXHsWildCardBndrs pass thing -> HsWildCardBndrs pass thing
- HsTypes: XLHsQTyVars :: XXLHsQTyVars pass -> LHsQTyVars pass
- HsTypes: XTyVarBndr :: XXTyVarBndr pass -> HsTyVarBndr pass
- HsTypes: [cd_fld_doc] :: ConDeclField pass -> Maybe LHsDocString
- HsTypes: [cd_fld_ext] :: ConDeclField pass -> XConDeclField pass
- HsTypes: [cd_fld_names] :: ConDeclField pass -> [LFieldOcc pass]
- HsTypes: [cd_fld_type] :: ConDeclField pass -> LBangType pass
- HsTypes: [extFieldOcc] :: FieldOcc pass -> XCFieldOcc pass
- HsTypes: [hsib_body] :: HsImplicitBndrs pass thing -> thing
- HsTypes: [hsib_ext] :: HsImplicitBndrs pass thing -> XHsIB pass thing
- HsTypes: [hsq_dependent] :: HsQTvsRn -> NameSet
- HsTypes: [hsq_explicit] :: LHsQTyVars pass -> [LHsTyVarBndr pass]
- HsTypes: [hsq_ext] :: LHsQTyVars pass -> XHsQTvs pass
- HsTypes: [hsq_implicit] :: HsQTvsRn -> [Name]
- HsTypes: [hst_bndrs] :: HsType pass -> [LHsTyVarBndr pass]
- HsTypes: [hst_body] :: HsType pass -> LHsType pass
- HsTypes: [hst_ctxt] :: HsType pass -> LHsContext pass
- HsTypes: [hst_xforall] :: HsType pass -> XForAllTy pass
- HsTypes: [hst_xqual] :: HsType pass -> XQualTy pass
- HsTypes: [hswc_body] :: HsWildCardBndrs pass thing -> thing
- HsTypes: [hswc_ext] :: HsWildCardBndrs pass thing -> XHsWC pass thing
- HsTypes: [rdrNameFieldOcc] :: FieldOcc pass -> Located RdrName
- HsTypes: ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc
- HsTypes: data AmbiguousFieldOcc pass
- HsTypes: data ConDeclField pass
- HsTypes: data FieldOcc pass
- HsTypes: data HsArg tm ty
- HsTypes: data HsConDetails arg rec
- HsTypes: data HsImplBang
- HsTypes: data HsImplicitBndrs pass thing
- HsTypes: data HsQTvsRn
- HsTypes: data HsSrcBang
- HsTypes: data HsTupleSort
- HsTypes: data HsTyLit
- HsTypes: data HsTyVarBndr pass
- HsTypes: data HsType pass
- HsTypes: data HsWildCardBndrs pass thing
- HsTypes: data LHsQTyVars pass
- HsTypes: data NewHsTypeX
- HsTypes: data SrcStrictness
- HsTypes: data SrcUnpackedness
- HsTypes: dropWildCards :: LHsSigWcType pass -> LHsSigType pass
- HsTypes: emptyLHsQTvs :: LHsQTyVars GhcRn
- HsTypes: getBangStrictness :: LHsType a -> HsSrcBang
- HsTypes: getBangType :: LHsType a -> LHsType a
- HsTypes: getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
- HsTypes: getLHsInstDeclHead :: LHsSigType pass -> LHsType pass
- HsTypes: hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]
- HsTypes: hsExplicitLTyVarNames :: LHsQTyVars pass -> [IdP pass]
- HsTypes: hsIPNameFS :: HsIPName -> FastString
- HsTypes: hsImplicitBody :: HsImplicitBndrs pass thing -> thing
- HsTypes: hsLTyVarBndrToType :: LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p)
- HsTypes: hsLTyVarBndrsToTypes :: LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)]
- HsTypes: hsLTyVarLocName :: LHsTyVarBndr pass -> Located (IdP pass)
- HsTypes: hsLTyVarLocNames :: LHsQTyVars pass -> [Located (IdP pass)]
- HsTypes: hsLTyVarName :: LHsTyVarBndr pass -> IdP pass
- HsTypes: hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr pass]
- HsTypes: hsScopedTvs :: LHsSigType GhcRn -> [Name]
- HsTypes: hsSigType :: LHsSigType pass -> LHsType pass
- HsTypes: hsSigWcType :: LHsSigWcType pass -> LHsType pass
- HsTypes: hsTvbAllKinded :: LHsQTyVars pass -> Bool
- HsTypes: hsTyGetAppHead_maybe :: LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
- HsTypes: hsTyVarName :: HsTyVarBndr pass -> IdP pass
- HsTypes: hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool
- HsTypes: hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
- HsTypes: ignoreParens :: LHsType pass -> LHsType pass
- HsTypes: instance (Data.Data.Data arg, Data.Data.Data rec) => Data.Data.Data (HsTypes.HsConDetails arg rec)
- HsTypes: instance (Outputable.Outputable arg, Outputable.Outputable rec) => Outputable.Outputable (HsTypes.HsConDetails arg rec)
- HsTypes: instance (Outputable.Outputable tm, Outputable.Outputable ty) => Outputable.Outputable (HsTypes.HsArg tm ty)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass) => Outputable.Outputable (HsTypes.AmbiguousFieldOcc p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass) => Outputable.OutputableBndr (HsTypes.AmbiguousFieldOcc p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, GHC.Classes.Eq (HsExtension.XCFieldOcc p)) => GHC.Classes.Eq (HsTypes.FieldOcc p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, GHC.Classes.Ord (HsExtension.XCFieldOcc p)) => GHC.Classes.Ord (HsTypes.FieldOcc p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.ConDeclField p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.HsTyVarBndr p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.HsType p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.LHsQTyVars p)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, Outputable.Outputable thing) => Outputable.Outputable (HsTypes.HsImplicitBndrs p thing)
- HsTypes: instance (p GHC.Types.~ HsExtension.GhcPass pass, Outputable.Outputable thing) => Outputable.Outputable (HsTypes.HsWildCardBndrs p thing)
- HsTypes: instance Data.Data.Data HsTypes.HsIPName
- HsTypes: instance Data.Data.Data HsTypes.HsQTvsRn
- HsTypes: instance Data.Data.Data HsTypes.HsTupleSort
- HsTypes: instance Data.Data.Data HsTypes.HsTyLit
- HsTypes: instance Data.Data.Data HsTypes.NewHsTypeX
- HsTypes: instance GHC.Classes.Eq HsTypes.HsIPName
- HsTypes: instance Outputable.Outputable (HsTypes.FieldOcc pass)
- HsTypes: instance Outputable.Outputable HsTypes.HsIPName
- HsTypes: instance Outputable.Outputable HsTypes.HsTyLit
- HsTypes: instance Outputable.Outputable HsTypes.NewHsTypeX
- HsTypes: instance Outputable.OutputableBndr HsTypes.HsIPName
- HsTypes: isEmptyLHsQTvs :: LHsQTyVars GhcRn -> Bool
- HsTypes: isHsKindedTyVar :: HsTyVarBndr pass -> Bool
- HsTypes: isLHsForAllTy :: LHsType p -> Bool
- HsTypes: mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs
- HsTypes: mkAnonWildCardTy :: HsType GhcPs
- HsTypes: mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing
- HsTypes: mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing
- HsTypes: mkFieldOcc :: Located RdrName -> FieldOcc GhcPs
- HsTypes: mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsTypes: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsTypes: mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- HsTypes: mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing
- HsTypes: mkHsOpTy :: LHsType (GhcPass p) -> Located (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
- HsTypes: mkHsQTvs :: [LHsTyVarBndr GhcPs] -> LHsQTyVars GhcPs
- HsTypes: mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing
- HsTypes: newtype HsIPName
- HsTypes: noLHsContext :: LHsContext pass
- HsTypes: numVisibleArgs :: [HsArg tm ty] -> Arity
- HsTypes: parenthesizeHsContext :: PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)
- HsTypes: parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsTypes: pprAnonWildCard :: SDoc
- HsTypes: pprConDeclFields :: OutputableBndrId (GhcPass p) => [LConDeclField (GhcPass p)] -> SDoc
- HsTypes: pprHsExplicitForAll :: OutputableBndrId (GhcPass p) => Maybe [LHsTyVarBndr (GhcPass p)] -> SDoc
- HsTypes: pprHsForAll :: OutputableBndrId (GhcPass p) => [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
- HsTypes: pprHsForAllExtra :: OutputableBndrId (GhcPass p) => Maybe SrcSpan -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
- HsTypes: pprHsType :: OutputableBndrId (GhcPass p) => HsType (GhcPass p) -> SDoc
- HsTypes: pprLHsContext :: OutputableBndrId (GhcPass p) => LHsContext (GhcPass p) -> SDoc
- HsTypes: rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName
- HsTypes: selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id
- HsTypes: splitHsAppTys :: HsType GhcRn -> (LHsType GhcRn, [LHsTypeArg GhcRn])
- HsTypes: splitHsFunType :: LHsType GhcRn -> ([LHsType GhcRn], LHsType GhcRn)
- HsTypes: splitLHsForAllTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsType pass)
- HsTypes: splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], LHsContext GhcRn, LHsType GhcRn)
- HsTypes: splitLHsPatSynTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, [LHsTyVarBndr pass], LHsContext pass, LHsType pass)
- HsTypes: splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass)
- HsTypes: splitLHsSigmaTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, LHsType pass)
- HsTypes: type BangType pass = HsType pass
- HsTypes: type HsContext pass = [LHsType pass]
- HsTypes: type HsKind pass = HsType pass
- HsTypes: type LBangType pass = Located (BangType pass)
- HsTypes: type LConDeclField pass = Located (ConDeclField pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
- HsTypes: type LFieldOcc pass = Located (FieldOcc pass)
- HsTypes: type LHsContext pass = Located (HsContext pass) " 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnUnit' For details on above see note [Api annotations] in ApiAnnotation"
- HsTypes: type LHsKind pass = Located (HsKind pass) " 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'"
- HsTypes: type LHsSigType pass = HsImplicitBndrs pass (LHsType pass)
- HsTypes: type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
- HsTypes: type LHsTyVarBndr pass = Located (HsTyVarBndr pass)
- HsTypes: type LHsType pass = Located (HsType pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
- HsTypes: type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
- HsTypes: type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
- HsTypes: unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc
- HsUtils: chunkify :: [a] -> [[a]]
- HsUtils: collectHsBindBinders :: (SrcSpanLess (LPat p) ~ Pat p, HasSrcSpan (LPat p)) => HsBindLR p idR -> [IdP p]
- HsUtils: collectHsBindListBinders :: [LHsBindLR (GhcPass p) idR] -> [IdP (GhcPass p)]
- HsUtils: collectHsBindsBinders :: LHsBindsLR (GhcPass p) idR -> [IdP (GhcPass p)]
- HsUtils: collectHsIdBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- HsUtils: collectHsValBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- HsUtils: collectLStmtBinders :: LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- HsUtils: collectLStmtsBinders :: [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- HsUtils: collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- HsUtils: collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)]
- HsUtils: collectPatBinders :: LPat (GhcPass p) -> [IdP (GhcPass p)]
- HsUtils: collectPatsBinders :: [LPat (GhcPass p)] -> [IdP (GhcPass p)]
- HsUtils: collectStmtBinders :: StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- HsUtils: collectStmtsBinders :: [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- HsUtils: emptyRecStmt :: StmtLR (GhcPass idL) GhcPs bodyR
- HsUtils: emptyRecStmtId :: StmtLR GhcTc GhcTc bodyR
- HsUtils: emptyRecStmtName :: StmtLR GhcRn GhcRn bodyR
- HsUtils: emptyTransStmt :: StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: getPatSynBinds :: [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
- HsUtils: hsDataFamInstBinders :: DataFamInstDecl pass -> ([Located (IdP pass)], [LFieldOcc pass])
- HsUtils: hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)]
- HsUtils: hsGroupBinders :: HsGroup GhcRn -> [Name]
- HsUtils: hsLTyClDeclBinders :: Located (TyClDecl pass) -> ([Located (IdP pass)], [LFieldOcc pass])
- HsUtils: hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)]
- HsUtils: hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name]
- HsUtils: hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> NameSet
- HsUtils: isBangedHsBind :: HsBind GhcTc -> Bool
- HsUtils: isInfixFunBind :: HsBindLR id1 id2 -> Bool
- HsUtils: isUnliftedHsBind :: HsBind GhcTc -> Bool
- HsUtils: lPatImplicits :: LPat GhcRn -> NameSet
- HsUtils: lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))] -> NameSet
- HsUtils: missingTupArg :: HsTupArg GhcPs
- HsUtils: mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn
- HsUtils: mkBigLHsTup :: [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn
- HsUtils: mkBigLHsVarTup :: [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: mkBindStmt :: XBindStmt (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) ~ NoExt => LPat (GhcPass idL) -> Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
- HsUtils: mkBodyStmt :: Located (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (Located (bodyR GhcPs))
- HsUtils: mkChunkified :: ([a] -> a) -> [a] -> a
- HsUtils: mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]
- HsUtils: mkFunBind :: Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs
- HsUtils: mkGroupByUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkGroupUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: mkHsAppType :: NoGhcTc (GhcPass id) ~ GhcRn => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id)
- HsUtils: mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn
- HsUtils: mkHsCaseAlt :: LPat (GhcPass p) -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
- HsUtils: mkHsCmdWrap :: HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p)
- HsUtils: mkHsComp :: HsStmtContext Name -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> HsExpr GhcPs
- HsUtils: mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
- HsUtils: mkHsDo :: HsStmtContext Name -> [ExprLStmt GhcPs] -> HsExpr GhcPs
- HsUtils: mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- HsUtils: mkHsIf :: LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> HsExpr (GhcPass p)
- HsUtils: mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- HsUtils: mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
- HsUtils: mkHsLam :: XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExt => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
- HsUtils: mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
- HsUtils: mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
- HsUtils: mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs
- HsUtils: mkHsSigEnv :: forall a. (LSig GhcRn -> Maybe ([Located Name], a)) -> [LSig GhcRn] -> NameEnv a
- HsUtils: mkHsSpliceE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs
- HsUtils: mkHsSpliceTE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs
- HsUtils: mkHsSpliceTy :: SpliceDecoration -> LHsExpr GhcPs -> HsType GhcPs
- HsUtils: mkHsString :: String -> HsLit (GhcPass p)
- HsUtils: mkHsStringPrimLit :: FastString -> HsLit (GhcPass p)
- HsUtils: mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs
- HsUtils: mkHsWrap :: HsWrapper -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- HsUtils: mkHsWrapCo :: TcCoercionN -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- HsUtils: mkHsWrapCoR :: TcCoercionR -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- HsUtils: mkHsWrapPat :: HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
- HsUtils: mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
- HsUtils: mkLHsCmdWrap :: HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p)
- HsUtils: mkLHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
- HsUtils: mkLHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
- HsUtils: mkLHsTupleExpr :: [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a)
- HsUtils: mkLHsVarTuple :: [IdP (GhcPass a)] -> LHsExpr (GhcPass a)
- HsUtils: mkLHsWrap :: HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkLastStmt :: Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
- HsUtils: mkMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> Located (HsLocalBinds (GhcPass p)) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
- HsUtils: mkMatchGroup :: XMG name (Located (body name)) ~ NoExt => Origin -> [LMatch name (Located (body name))] -> MatchGroup name (Located (body name))
- HsUtils: mkNPat :: Located (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs) -> Pat GhcPs
- HsUtils: mkNPlusKPat :: Located RdrName -> Located (HsOverLit GhcPs) -> Pat GhcPs
- HsUtils: mkParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
- HsUtils: mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName) -> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs
- HsUtils: mkPrefixFunRhs :: Located id -> HsMatchContext id
- HsUtils: mkRecStmt :: [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR
- HsUtils: mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
- HsUtils: mkTcBindStmt :: LPat GhcTc -> Located (bodyR GhcTc) -> StmtLR GhcTc GhcTc (Located (bodyR GhcTc))
- HsUtils: mkTopFunBind :: Origin -> Located Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn
- HsUtils: mkTransformByStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkTransformStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
- HsUtils: mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
- HsUtils: mk_easy_FunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs
- HsUtils: nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs
- HsUtils: nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn
- HsUtils: nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs
- HsUtils: nlConVarPatName :: Name -> [Name] -> LPat GhcRn
- HsUtils: nlHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsAppKindTy :: LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsApps :: IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- HsUtils: nlHsDataCon :: DataCon -> LHsExpr GhcTc
- HsUtils: nlHsDo :: HsStmtContext Name -> [LStmt GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
- HsUtils: nlHsFunTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsIf :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsIntLit :: Integer -> LHsExpr (GhcPass p)
- HsUtils: nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs
- HsUtils: nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)
- HsUtils: nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- HsUtils: nlHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsSyntaxApps :: SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlHsTyApp :: IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id)
- HsUtils: nlHsTyApps :: IdP (GhcPass id) -> [Type] -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlHsTyConApp :: IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- HsUtils: nlHsTyVar :: IdP (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsVar :: IdP (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsVarApps :: IdP (GhcPass id) -> [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs
- HsUtils: nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
- HsUtils: nlLitPat :: HsLit GhcPs -> LPat GhcPs
- HsUtils: nlNullaryConPat :: IdP (GhcPass p) -> LPat (GhcPass p)
- HsUtils: nlParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
- HsUtils: nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
- HsUtils: nlVarPat :: IdP (GhcPass id) -> LPat (GhcPass id)
- HsUtils: nlWildConPat :: DataCon -> LPat GhcPs
- HsUtils: nlWildPat :: LPat GhcPs
- HsUtils: nlWildPatName :: LPat GhcRn
- HsUtils: typeToLHsType :: Type -> LHsType GhcPs
- HsUtils: unguardedGRHSs :: Located (body (GhcPass p)) -> GRHSs (GhcPass p) (Located (body (GhcPass p)))
- HsUtils: unguardedRHS :: SrcSpan -> Located (body (GhcPass p)) -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))]
- HsUtils: unitRecStmtTc :: RecStmtTc
- HsUtils: unqualQuasiQuote :: RdrName
- HsUtils: userHsLTyVarBndrs :: SrcSpan -> [Located (IdP (GhcPass p))] -> [LHsTyVarBndr (GhcPass p)]
- HsUtils: userHsTyVarBndrs :: SrcSpan -> [IdP (GhcPass p)] -> [LHsTyVarBndr (GhcPass p)]
- HscMain: hscNormalIface' :: ModGuts -> Maybe Fingerprint -> Hsc (ModIface, Bool, ModDetails, CgGuts)
- HscTypes: data ModIface
- HscTypes: emptyModIface :: Module -> ModIface
- HscTypes: instance Outputable.Outputable HscTypes.Linkable
- HscTypes: instance Outputable.Outputable HscTypes.SptEntry
- HscTypes: instance Outputable.Outputable HscTypes.Unlinked
- IOEnv: instance GHC.Base.Functor (IOEnv.IOEnv m)
- Id: isDictId :: Id -> Bool
- Id: isEvVar :: Var -> Bool
- Id: type DictId = EvId
- IfaceType: IfaceDFunTy :: IfaceType -> IfaceType -> IfaceType
- Inst: tcInstTyBinder :: Maybe (VarEnv Kind) -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)
- Inst: tcInstTyBinders :: HasDebugCallStack => ([TyCoBinder], TcKind) -> TcM ([TcType], TcKind)
- Kind: classifiesTypeWithValues :: Kind -> Bool
- Kind: isConstraintKindCon :: TyCon -> Bool
- Kind: isKindLevPoly :: Kind -> Bool
- Kind: isLiftedTypeKind :: Kind -> Bool
- Kind: isUnliftedTypeKind :: Kind -> Bool
- Kind: type Kind = Type
- Lexer: failSpanMsgP :: SrcSpan -> SDoc -> P a
- Lexer: type AddAnn = SrcSpan -> P ()
- ListT: ListT :: (forall r. (a -> m r -> m r) -> m r -> m r) -> ListT m a
- ListT: [unListT] :: ListT m a -> forall r. (a -> m r -> m r) -> m r -> m r
- ListT: fold :: ListT m a -> (a -> m r -> m r) -> m r -> m r
- ListT: instance Control.Monad.Fail.MonadFail (ListT.ListT m)
- ListT: instance GHC.Base.Alternative (ListT.ListT f)
- ListT: instance GHC.Base.Applicative (ListT.ListT f)
- ListT: instance GHC.Base.Functor (ListT.ListT f)
- ListT: instance GHC.Base.Monad (ListT.ListT m)
- ListT: instance GHC.Base.MonadPlus (ListT.ListT m)
- ListT: newtype ListT m a
- ListT: runListT :: ListT m a -> (a -> m r -> m r) -> m r -> m r
- ListT: select :: Monad m => [a] -> ListT m a
- Llvm.Types: fixEndian :: [a] -> [a]
- MkCore: mkCoreVarTup :: [Id] -> CoreExpr
- MkIface: mkIface :: HscEnv -> Maybe Fingerprint -> ModDetails -> ModGuts -> IO (ModIface, Bool)
- MonadUtils: liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b
- MonadUtils: liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c
- MonadUtils: liftIO3 :: MonadIO m => (a -> b -> c -> IO d) -> a -> b -> c -> m d
- MonadUtils: liftIO4 :: MonadIO m => (a -> b -> c -> d -> IO e) -> a -> b -> c -> d -> m e
- NCGMonad: [ncg_x86fp_kludge] :: NcgImpl statics instr jumpDest -> [NatCmmDecl statics instr] -> [NatCmmDecl statics instr]
- NCGMonad: getCfgNat :: NatM CFG
- PPC.Regs: f20 :: Reg
- PPC.Regs: f21 :: Reg
- PPC.Regs: r27 :: Reg
- PPC.Regs: r28 :: Reg
- PlaceHolder: placeHolderNamesTc :: NameSet
- PlaceHolder: type family NameOrRdrName id
- Platform: ARMv5 :: ArmISA
- Platform: ARMv6 :: ArmISA
- Platform: ARMv7 :: ArmISA
- Platform: ArchARM :: ArmISA -> [ArmISAExt] -> ArmABI -> Arch
- Platform: ArchARM64 :: Arch
- Platform: ArchAlpha :: Arch
- Platform: ArchJavaScript :: Arch
- Platform: ArchMipseb :: Arch
- Platform: ArchMipsel :: Arch
- Platform: ArchPPC :: Arch
- Platform: ArchPPC_64 :: PPC_64ABI -> Arch
- Platform: ArchSPARC :: Arch
- Platform: ArchSPARC64 :: Arch
- Platform: ArchUnknown :: Arch
- Platform: ArchX86 :: Arch
- Platform: ArchX86_64 :: Arch
- Platform: ELF_V1 :: PPC_64ABI
- Platform: ELF_V2 :: PPC_64ABI
- Platform: HARD :: ArmABI
- Platform: IWMMX2 :: ArmISAExt
- Platform: NEON :: ArmISAExt
- Platform: OSAIX :: OS
- Platform: OSDarwin :: OS
- Platform: OSDragonFly :: OS
- Platform: OSFreeBSD :: OS
- Platform: OSHaiku :: OS
- Platform: OSHurd :: OS
- Platform: OSKFreeBSD :: OS
- Platform: OSLinux :: OS
- Platform: OSMinGW32 :: OS
- Platform: OSNetBSD :: OS
- Platform: OSOpenBSD :: OS
- Platform: OSQNXNTO :: OS
- Platform: OSSolaris2 :: OS
- Platform: OSUnknown :: OS
- Platform: Platform :: Arch -> OS -> {-# UNPACK #-} !Int -> Bool -> Bool -> Bool -> Bool -> Bool -> Platform
- Platform: SOFT :: ArmABI
- Platform: SOFTFP :: ArmABI
- Platform: VFPv2 :: ArmISAExt
- Platform: VFPv3 :: ArmISAExt
- Platform: VFPv3D16 :: ArmISAExt
- Platform: [armABI] :: Arch -> ArmABI
- Platform: [armISAExt] :: Arch -> [ArmISAExt]
- Platform: [armISA] :: Arch -> ArmISA
- Platform: [platformArch] :: Platform -> Arch
- Platform: [platformHasGnuNonexecStack] :: Platform -> Bool
- Platform: [platformHasIdentDirective] :: Platform -> Bool
- Platform: [platformHasSubsectionsViaSymbols] :: Platform -> Bool
- Platform: [platformIsCrossCompiling] :: Platform -> Bool
- Platform: [platformOS] :: Platform -> OS
- Platform: [platformUnregisterised] :: Platform -> Bool
- Platform: [platformWordSize] :: Platform -> {-# UNPACK #-} !Int
- Platform: [ppc_64ABI] :: Arch -> PPC_64ABI
- Platform: data Arch
- Platform: data ArmABI
- Platform: data ArmISA
- Platform: data ArmISAExt
- Platform: data OS
- Platform: data PPC_64ABI
- Platform: data Platform
- Platform: instance GHC.Classes.Eq Platform.Arch
- Platform: instance GHC.Classes.Eq Platform.ArmABI
- Platform: instance GHC.Classes.Eq Platform.ArmISA
- Platform: instance GHC.Classes.Eq Platform.ArmISAExt
- Platform: instance GHC.Classes.Eq Platform.OS
- Platform: instance GHC.Classes.Eq Platform.PPC_64ABI
- Platform: instance GHC.Classes.Eq Platform.Platform
- Platform: instance GHC.Read.Read Platform.Arch
- Platform: instance GHC.Read.Read Platform.ArmABI
- Platform: instance GHC.Read.Read Platform.ArmISA
- Platform: instance GHC.Read.Read Platform.ArmISAExt
- Platform: instance GHC.Read.Read Platform.OS
- Platform: instance GHC.Read.Read Platform.PPC_64ABI
- Platform: instance GHC.Read.Read Platform.Platform
- Platform: instance GHC.Show.Show Platform.Arch
- Platform: instance GHC.Show.Show Platform.ArmABI
- Platform: instance GHC.Show.Show Platform.ArmISA
- Platform: instance GHC.Show.Show Platform.ArmISAExt
- Platform: instance GHC.Show.Show Platform.OS
- Platform: instance GHC.Show.Show Platform.PPC_64ABI
- Platform: instance GHC.Show.Show Platform.Platform
- Platform: isARM :: Arch -> Bool
- Platform: osElfTarget :: OS -> Bool
- Platform: osMachOTarget :: OS -> Bool
- Platform: osSubsectionsViaSymbols :: OS -> Bool
- Platform: platformUsesFrameworks :: Platform -> Bool
- Platform: target32Bit :: Platform -> Bool
- PlatformConstants: [pc_platformConstants] :: PlatformConstants -> ()
- PmExpr: PmExprCon :: ConLike -> [PmExpr] -> PmExpr
- PmExpr: PmExprEq :: PmExpr -> PmExpr -> PmExpr
- PmExpr: PmExprLit :: PmLit -> PmExpr
- PmExpr: PmExprOther :: HsExpr GhcTc -> PmExpr
- PmExpr: PmExprVar :: Name -> PmExpr
- PmExpr: PmOLit :: Bool -> HsOverLit GhcTc -> PmLit
- PmExpr: PmSLit :: HsLit GhcTc -> PmLit
- PmExpr: data PmExpr
- PmExpr: data PmLit
- PmExpr: eqPmLit :: PmLit -> PmLit -> Bool
- PmExpr: falsePmExpr :: PmExpr
- PmExpr: filterComplex :: [ComplexEq] -> [PmNegLitCt]
- PmExpr: hsExprToPmExpr :: HsExpr GhcTc -> PmExpr
- PmExpr: instance Outputable.Outputable PmExpr.PmExpr
- PmExpr: instance Outputable.Outputable PmExpr.PmLit
- PmExpr: isFalsePmExpr :: PmExpr -> Bool
- PmExpr: isNotPmExprOther :: PmExpr -> Bool
- PmExpr: isTruePmExpr :: PmExpr -> Bool
- PmExpr: lhsExprToPmExpr :: LHsExpr GhcTc -> PmExpr
- PmExpr: pprPmExprWithParens :: PmExpr -> PmPprM SDoc
- PmExpr: runPmPprM :: PmPprM a -> [PmNegLitCt] -> (a, [(SDoc, [PmLit])])
- PmExpr: substComplexEq :: Name -> PmExpr -> ComplexEq -> Either ComplexEq ComplexEq
- PmExpr: toComplex :: SimpleEq -> ComplexEq
- PmExpr: truePmExpr :: PmExpr
- PmExpr: type ComplexEq = (PmExpr, PmExpr)
- PmExpr: type SimpleEq = (Id, PmExpr)
- PprC: pprStringInCStyle :: [Word8] -> SDoc
- PprC: writeCs :: DynFlags -> Handle -> [RawCmmGroup] -> IO ()
- PrelNames: breakpointAutoIdKey :: Unique
- PrelNames: breakpointAutoJumpIdKey :: Unique
- PrelNames: breakpointAutoJumpName :: Name
- PrelNames: breakpointAutoName :: Name
- PrelNames: breakpointCondJumpIdKey :: Unique
- PrelNames: breakpointCondJumpName :: Name
- PrelNames: breakpointJumpIdKey :: Unique
- PrelNames: breakpointJumpName :: Name
- PrelNames: gHC_ARR :: Module
- PrimOp: GetThreadAllocationCounter :: PrimOp
- RdrHsSyn: bang_RDR :: RdrName
- RdrHsSyn: checkBlockArguments :: LHsExpr GhcPs -> P ()
- RdrHsSyn: checkCommand :: LHsExpr GhcPs -> P (LHsCmd GhcPs)
- RdrHsSyn: checkDoAndIfThenElse :: LHsExpr GhcPs -> Bool -> LHsExpr GhcPs -> Bool -> LHsExpr GhcPs -> P ()
- RdrHsSyn: checkPatterns :: SDoc -> [LHsExpr GhcPs] -> P [LPat GhcPs]
- RdrHsSyn: mkATDefault :: LTyFamInstDecl GhcPs -> Either (SrcSpan, SDoc) (LTyFamDefltEqn GhcPs, P ())
- RdrHsSyn: mkSumOrTuple :: Boxity -> SrcSpan -> SumOrTuple -> P (HsExpr GhcPs)
- RdrHsSyn: parseErrorSDoc :: SrcSpan -> SDoc -> P a
- Reg: VirtualRegSSE :: {-# UNPACK #-} !Unique -> VirtualReg
- RegAlloc.Liveness: natCmmTopToLive :: (Instruction instr, Outputable instr) => Maybe CFG -> NatCmmDecl statics instr -> LiveCmmDecl statics instr
- RegClass: RcDoubleSSE :: RegClass
- RnTypes: extractFilteredRdrTyVars :: LHsType GhcPs -> RnM FreeKiTyVarsNoDups
- RnTypes: extractFilteredRdrTyVarsDups :: LHsType GhcPs -> RnM FreeKiTyVarsWithDups
- RnTypes: extractHsTyRdrTyVarsDups :: LHsType GhcPs -> FreeKiTyVarsWithDups
- RnTypes: extractHsTysRdrTyVars :: [LHsType GhcPs] -> FreeKiTyVarsNoDups
- RnTypes: freeKiTyVarsAllVars :: FreeKiTyVars -> [Located RdrName]
- RnTypes: freeKiTyVarsKindVars :: FreeKiTyVars -> [Located RdrName]
- RnTypes: freeKiTyVarsTypeVars :: FreeKiTyVars -> [Located RdrName]
- RnTypes: instance Outputable.Outputable RnTypes.FreeKiTyVars
- RnTypes: rmDupsInRdrTyVars :: FreeKiTyVarsWithDups -> FreeKiTyVarsNoDups
- SMRep: hALF_WORD_SIZE :: DynFlags -> ByteOff
- SMRep: hALF_WORD_SIZE_IN_BITS :: DynFlags -> Int
- SMRep: pprWord8String :: [Word8] -> SDoc
- SMRep: stringToWord8s :: String -> [Word8]
- Specialise: instance Outputable.Outputable Specialise.CallKey
- StgCmm: codeGen :: DynFlags -> Module -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -> HpcInfo -> Stream IO CmmGroup ()
- StgCmmArgRep: D :: ArgRep
- StgCmmArgRep: F :: ArgRep
- StgCmmArgRep: L :: ArgRep
- StgCmmArgRep: N :: ArgRep
- StgCmmArgRep: P :: ArgRep
- StgCmmArgRep: V :: ArgRep
- StgCmmArgRep: V16 :: ArgRep
- StgCmmArgRep: V32 :: ArgRep
- StgCmmArgRep: V64 :: ArgRep
- StgCmmArgRep: argRepSizeW :: DynFlags -> ArgRep -> WordOff
- StgCmmArgRep: argRepString :: ArgRep -> String
- StgCmmArgRep: data ArgRep
- StgCmmArgRep: idArgRep :: Id -> ArgRep
- StgCmmArgRep: instance Outputable.Outputable StgCmmArgRep.ArgRep
- StgCmmArgRep: isNonV :: ArgRep -> Bool
- StgCmmArgRep: slowCallPattern :: [ArgRep] -> (FastString, RepArity)
- StgCmmArgRep: toArgRep :: PrimRep -> ArgRep
- StgCmmBind: cgBind :: CgStgBinding -> FCode ()
- StgCmmBind: cgTopRhsClosure :: DynFlags -> RecFlag -> Id -> CostCentreStack -> UpdateFlag -> [Id] -> CgStgExpr -> (CgIdInfo, FCode ())
- StgCmmBind: emitBlackHoleCode :: CmmExpr -> FCode ()
- StgCmmBind: emitUpdateFrame :: DynFlags -> CmmExpr -> CLabel -> CmmExpr -> FCode ()
- StgCmmBind: pushUpdateFrame :: CLabel -> CmmExpr -> FCode () -> FCode ()
- StgCmmClosure: CmmLoc :: CmmExpr -> CgLoc
- StgCmmClosure: DirectEntry :: CLabel -> RepArity -> CallMethod
- StgCmmClosure: EnterIt :: CallMethod
- StgCmmClosure: JumpToIt :: BlockId -> [LocalReg] -> CallMethod
- StgCmmClosure: LneLoc :: BlockId -> [LocalReg] -> CgLoc
- StgCmmClosure: NonVoid :: a -> NonVoid a
- StgCmmClosure: ReturnIt :: CallMethod
- StgCmmClosure: SlowCall :: CallMethod
- StgCmmClosure: addArgReps :: [NonVoid StgArg] -> [NonVoid (PrimRep, StgArg)]
- StgCmmClosure: addIdReps :: [NonVoid Id] -> [NonVoid (PrimRep, Id)]
- StgCmmClosure: argPrimRep :: StgArg -> PrimRep
- StgCmmClosure: assertNonVoidIds :: [Id] -> [NonVoid Id]
- StgCmmClosure: assertNonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]
- StgCmmClosure: blackHoleOnEntry :: ClosureInfo -> Bool
- StgCmmClosure: cafBlackHoleInfoTable :: CmmInfoTable
- StgCmmClosure: closureFunInfo :: ClosureInfo -> Maybe (RepArity, ArgDescr)
- StgCmmClosure: closureInfoLabel :: ClosureInfo -> CLabel
- StgCmmClosure: closureLFInfo :: ClosureInfo -> LambdaFormInfo
- StgCmmClosure: closureLocalEntryLabel :: DynFlags -> ClosureInfo -> CLabel
- StgCmmClosure: closureName :: ClosureInfo -> Name
- StgCmmClosure: closureReEntrant :: ClosureInfo -> Bool
- StgCmmClosure: closureSingleEntry :: ClosureInfo -> Bool
- StgCmmClosure: closureSlowEntryLabel :: ClosureInfo -> CLabel
- StgCmmClosure: closureUpdReqd :: ClosureInfo -> Bool
- StgCmmClosure: data CallMethod
- StgCmmClosure: data CgLoc
- StgCmmClosure: data ClosureInfo
- StgCmmClosure: data LambdaFormInfo
- StgCmmClosure: data StandardFormInfo
- StgCmmClosure: fromNonVoid :: NonVoid a -> a
- StgCmmClosure: funTag :: DynFlags -> ClosureInfo -> DynTag
- StgCmmClosure: getCallMethod :: DynFlags -> Name -> Id -> LambdaFormInfo -> RepArity -> RepArity -> CgLoc -> Maybe SelfLoopInfo -> CallMethod
- StgCmmClosure: idPrimRep :: Id -> PrimRep
- StgCmmClosure: indStaticInfoTable :: CmmInfoTable
- StgCmmClosure: instance GHC.Classes.Eq a => GHC.Classes.Eq (StgCmmClosure.NonVoid a)
- StgCmmClosure: instance GHC.Show.Show a => GHC.Show.Show (StgCmmClosure.NonVoid a)
- StgCmmClosure: instance Outputable.Outputable StgCmmClosure.CgLoc
- StgCmmClosure: instance Outputable.Outputable a => Outputable.Outputable (StgCmmClosure.NonVoid a)
- StgCmmClosure: isGcPtrRep :: PrimRep -> Bool
- StgCmmClosure: isKnownFun :: LambdaFormInfo -> Bool
- StgCmmClosure: isLFReEntrant :: LambdaFormInfo -> Bool
- StgCmmClosure: isLFThunk :: LambdaFormInfo -> Bool
- StgCmmClosure: isSmallFamily :: DynFlags -> Int -> Bool
- StgCmmClosure: isStaticClosure :: ClosureInfo -> Bool
- StgCmmClosure: isToplevClosure :: ClosureInfo -> Bool
- StgCmmClosure: isVoidRep :: PrimRep -> Bool
- StgCmmClosure: lfDynTag :: DynFlags -> LambdaFormInfo -> DynTag
- StgCmmClosure: lfUpdatable :: LambdaFormInfo -> Bool
- StgCmmClosure: mkApLFInfo :: Id -> UpdateFlag -> Arity -> LambdaFormInfo
- StgCmmClosure: mkClosureInfo :: DynFlags -> Bool -> Id -> LambdaFormInfo -> Int -> Int -> String -> ClosureInfo
- StgCmmClosure: mkCmmInfo :: ClosureInfo -> Id -> CostCentreStack -> CmmInfoTable
- StgCmmClosure: mkConLFInfo :: DataCon -> LambdaFormInfo
- StgCmmClosure: mkDataConInfoTable :: DynFlags -> DataCon -> Bool -> Int -> Int -> CmmInfoTable
- StgCmmClosure: mkLFArgument :: Id -> LambdaFormInfo
- StgCmmClosure: mkLFImported :: Id -> LambdaFormInfo
- StgCmmClosure: mkLFLetNoEscape :: LambdaFormInfo
- StgCmmClosure: mkLFReEntrant :: TopLevelFlag -> [Id] -> [Id] -> ArgDescr -> LambdaFormInfo
- StgCmmClosure: mkLFStringLit :: LambdaFormInfo
- StgCmmClosure: mkLFThunk :: Type -> TopLevelFlag -> [Id] -> UpdateFlag -> LambdaFormInfo
- StgCmmClosure: mkSelectorLFInfo :: Id -> Int -> Bool -> LambdaFormInfo
- StgCmmClosure: newtype NonVoid a
- StgCmmClosure: nodeMustPointToIt :: DynFlags -> LambdaFormInfo -> Bool
- StgCmmClosure: nonVoidIds :: [Id] -> [NonVoid Id]
- StgCmmClosure: nonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]
- StgCmmClosure: staticClosureLabel :: ClosureInfo -> CLabel
- StgCmmClosure: staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool
- StgCmmClosure: tagForArity :: DynFlags -> RepArity -> DynTag
- StgCmmClosure: tagForCon :: DynFlags -> DataCon -> DynTag
- StgCmmClosure: type DynTag = Int
- StgCmmClosure: type SelfLoopInfo = (Id, BlockId, [LocalReg])
- StgCmmCon: bindConArgs :: AltCon -> LocalReg -> [NonVoid Id] -> FCode [LocalReg]
- StgCmmCon: buildDynCon :: Id -> Bool -> CostCentreStack -> DataCon -> [NonVoid StgArg] -> FCode (CgIdInfo, FCode CmmAGraph)
- StgCmmCon: cgTopRhsCon :: DynFlags -> Id -> DataCon -> [NonVoid StgArg] -> (CgIdInfo, FCode ())
- StgCmmEnv: addBindC :: CgIdInfo -> FCode ()
- StgCmmEnv: addBindsC :: [CgIdInfo] -> FCode ()
- StgCmmEnv: bindArgToReg :: NonVoid Id -> FCode LocalReg
- StgCmmEnv: bindArgsToRegs :: [NonVoid Id] -> FCode [LocalReg]
- StgCmmEnv: bindToReg :: NonVoid Id -> LambdaFormInfo -> FCode LocalReg
- StgCmmEnv: data CgIdInfo
- StgCmmEnv: getArgAmode :: NonVoid StgArg -> FCode CmmExpr
- StgCmmEnv: getCgIdInfo :: Id -> FCode CgIdInfo
- StgCmmEnv: getNonVoidArgAmodes :: [StgArg] -> FCode [CmmExpr]
- StgCmmEnv: idInfoToAmode :: CgIdInfo -> CmmExpr
- StgCmmEnv: idToReg :: DynFlags -> NonVoid Id -> LocalReg
- StgCmmEnv: litIdInfo :: DynFlags -> Id -> LambdaFormInfo -> CmmLit -> CgIdInfo
- StgCmmEnv: lneIdInfo :: DynFlags -> Id -> [NonVoid Id] -> CgIdInfo
- StgCmmEnv: maybeLetNoEscape :: CgIdInfo -> Maybe (BlockId, [LocalReg])
- StgCmmEnv: mkRhsInit :: DynFlags -> LocalReg -> LambdaFormInfo -> CmmExpr -> CmmAGraph
- StgCmmEnv: rebindToReg :: NonVoid Id -> FCode LocalReg
- StgCmmEnv: rhsIdInfo :: Id -> LambdaFormInfo -> FCode (CgIdInfo, LocalReg)
- StgCmmExpr: cgExpr :: CgStgExpr -> FCode ReturnKind
- StgCmmExtCode: FunN :: UnitId -> Named
- StgCmmExtCode: LabelN :: BlockId -> Named
- StgCmmExtCode: VarN :: CmmExpr -> Named
- StgCmmExtCode: code :: FCode a -> CmmParse a
- StgCmmExtCode: data CmmParse a
- StgCmmExtCode: data Named
- StgCmmExtCode: emit :: CmmAGraph -> CmmParse ()
- StgCmmExtCode: emitAssign :: CmmReg -> CmmExpr -> CmmParse ()
- StgCmmExtCode: emitLabel :: BlockId -> CmmParse ()
- StgCmmExtCode: emitOutOfLine :: BlockId -> CmmAGraphScoped -> CmmParse ()
- StgCmmExtCode: emitStore :: CmmExpr -> CmmExpr -> CmmParse ()
- StgCmmExtCode: getCode :: CmmParse a -> CmmParse CmmAGraph
- StgCmmExtCode: getCodeR :: CmmParse a -> CmmParse (a, CmmAGraph)
- StgCmmExtCode: getCodeScoped :: CmmParse a -> CmmParse (a, CmmAGraphScoped)
- StgCmmExtCode: getEnv :: CmmParse Env
- StgCmmExtCode: getName :: CmmParse String
- StgCmmExtCode: getUpdFrameOff :: CmmParse UpdFrameOffset
- StgCmmExtCode: instance DynFlags.HasDynFlags StgCmmExtCode.CmmParse
- StgCmmExtCode: instance GHC.Base.Applicative StgCmmExtCode.CmmParse
- StgCmmExtCode: instance GHC.Base.Functor StgCmmExtCode.CmmParse
- StgCmmExtCode: instance GHC.Base.Monad StgCmmExtCode.CmmParse
- StgCmmExtCode: instance UniqSupply.MonadUnique StgCmmExtCode.CmmParse
- StgCmmExtCode: lookupLabel :: FastString -> CmmParse BlockId
- StgCmmExtCode: lookupName :: FastString -> CmmParse CmmExpr
- StgCmmExtCode: loopDecls :: CmmParse a -> CmmParse a
- StgCmmExtCode: newBlockId :: MonadUnique m => m BlockId
- StgCmmExtCode: newFunctionName :: FastString -> UnitId -> ExtCode
- StgCmmExtCode: newImport :: (FastString, CLabel) -> CmmParse ()
- StgCmmExtCode: newLabel :: FastString -> CmmParse BlockId
- StgCmmExtCode: newLocal :: CmmType -> FastString -> CmmParse LocalReg
- StgCmmExtCode: type Env = UniqFM Named
- StgCmmExtCode: unEC :: CmmParse a -> String -> Env -> Decls -> FCode (Decls, a)
- StgCmmExtCode: withName :: String -> CmmParse a -> CmmParse a
- StgCmmExtCode: withUpdFrameOff :: UpdFrameOffset -> CmmParse () -> CmmParse ()
- StgCmmForeign: cgForeignCall :: ForeignCall -> [StgArg] -> Type -> FCode ReturnKind
- StgCmmForeign: emitCCall :: [(CmmFormal, ForeignHint)] -> CmmExpr -> [(CmmActual, ForeignHint)] -> FCode ()
- StgCmmForeign: emitCloseNursery :: FCode ()
- StgCmmForeign: emitForeignCall :: Safety -> [CmmFormal] -> ForeignTarget -> [CmmActual] -> FCode ReturnKind
- StgCmmForeign: emitLoadThreadState :: FCode ()
- StgCmmForeign: emitOpenNursery :: FCode ()
- StgCmmForeign: emitPrimCall :: [CmmFormal] -> CallishMachOp -> [CmmActual] -> FCode ()
- StgCmmForeign: emitSaveThreadState :: FCode ()
- StgCmmForeign: loadThreadState :: MonadUnique m => DynFlags -> m CmmAGraph
- StgCmmForeign: saveThreadState :: MonadUnique m => DynFlags -> m CmmAGraph
- StgCmmHeap: allocDynClosure :: Maybe Id -> CmmInfoTable -> LambdaFormInfo -> CmmExpr -> CmmExpr -> [(NonVoid StgArg, VirtualHpOffset)] -> FCode CmmExpr
- StgCmmHeap: allocDynClosureCmm :: Maybe Id -> CmmInfoTable -> LambdaFormInfo -> CmmExpr -> CmmExpr -> [(CmmExpr, ByteOff)] -> FCode CmmExpr
- StgCmmHeap: allocHeapClosure :: SMRep -> CmmExpr -> CmmExpr -> [(CmmExpr, ByteOff)] -> FCode CmmExpr
- StgCmmHeap: altHeapCheck :: [LocalReg] -> FCode a -> FCode a
- StgCmmHeap: altHeapCheckReturnsTo :: [LocalReg] -> Label -> ByteOff -> FCode a -> FCode a
- StgCmmHeap: emitSetDynHdr :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()
- StgCmmHeap: entryHeapCheck :: ClosureInfo -> Maybe LocalReg -> Int -> [LocalReg] -> FCode () -> FCode ()
- StgCmmHeap: entryHeapCheck' :: Bool -> CmmExpr -> Int -> [LocalReg] -> FCode () -> FCode ()
- StgCmmHeap: getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr
- StgCmmHeap: getVirtHp :: FCode VirtualHpOffset
- StgCmmHeap: heapStackCheckGen :: Maybe CmmExpr -> Maybe CmmExpr -> FCode ()
- StgCmmHeap: mkStaticClosure :: DynFlags -> CLabel -> CostCentreStack -> [CmmLit] -> [CmmLit] -> [CmmLit] -> [CmmLit] -> [CmmLit]
- StgCmmHeap: mkStaticClosureFields :: DynFlags -> CmmInfoTable -> CostCentreStack -> CafInfo -> [CmmLit] -> [CmmLit]
- StgCmmHeap: noEscapeHeapCheck :: [LocalReg] -> FCode a -> FCode a
- StgCmmHeap: setRealHp :: VirtualHpOffset -> FCode ()
- StgCmmHeap: setVirtHp :: VirtualHpOffset -> FCode ()
- StgCmmHpc: initHpc :: Module -> HpcInfo -> FCode ()
- StgCmmHpc: mkTickBox :: DynFlags -> Module -> Int -> CmmAGraph
- StgCmmLayout: D :: ArgRep
- StgCmmLayout: F :: ArgRep
- StgCmmLayout: FieldOff :: NonVoid a -> ByteOff -> FieldOffOrPadding a
- StgCmmLayout: L :: ArgRep
- StgCmmLayout: N :: ArgRep
- StgCmmLayout: NoHeader :: ClosureHeader
- StgCmmLayout: P :: ArgRep
- StgCmmLayout: Padding :: ByteOff -> ByteOff -> FieldOffOrPadding a
- StgCmmLayout: StdHeader :: ClosureHeader
- StgCmmLayout: ThunkHeader :: ClosureHeader
- StgCmmLayout: V :: ArgRep
- StgCmmLayout: V16 :: ArgRep
- StgCmmLayout: V32 :: ArgRep
- StgCmmLayout: V64 :: ArgRep
- StgCmmLayout: adjustHpBackwards :: FCode ()
- StgCmmLayout: argRepSizeW :: DynFlags -> ArgRep -> WordOff
- StgCmmLayout: data ArgRep
- StgCmmLayout: data ClosureHeader
- StgCmmLayout: data FieldOffOrPadding a
- StgCmmLayout: directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind
- StgCmmLayout: emitCall :: (Convention, Convention) -> CmmExpr -> [CmmExpr] -> FCode ReturnKind
- StgCmmLayout: emitClosureAndInfoTable :: CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode ()
- StgCmmLayout: emitClosureProcAndInfoTable :: Bool -> Id -> LambdaFormInfo -> CmmInfoTable -> [NonVoid Id] -> ((Int, LocalReg, [LocalReg]) -> FCode ()) -> FCode ()
- StgCmmLayout: emitReturn :: [CmmExpr] -> FCode ReturnKind
- StgCmmLayout: getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr
- StgCmmLayout: mkArgDescr :: DynFlags -> [Id] -> ArgDescr
- StgCmmLayout: mkVirtConstrOffsets :: DynFlags -> [NonVoid (PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, ByteOff)])
- StgCmmLayout: mkVirtConstrSizes :: DynFlags -> [NonVoid PrimRep] -> (WordOff, WordOff)
- StgCmmLayout: mkVirtHeapOffsets :: DynFlags -> ClosureHeader -> [NonVoid (PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, ByteOff)])
- StgCmmLayout: mkVirtHeapOffsetsWithPadding :: DynFlags -> ClosureHeader -> [NonVoid (PrimRep, a)] -> (WordOff, WordOff, [FieldOffOrPadding a])
- StgCmmLayout: slowCall :: CmmExpr -> [StgArg] -> FCode ReturnKind
- StgCmmLayout: toArgRep :: PrimRep -> ArgRep
- StgCmmMonad: AssignTo :: [LocalReg] -> Bool -> Sequel
- StgCmmMonad: AssignedDirectly :: ReturnKind
- StgCmmMonad: CgIdInfo :: Id -> LambdaFormInfo -> CgLoc -> CgIdInfo
- StgCmmMonad: HeapUsage :: VirtualHpOffset -> VirtualHpOffset -> HeapUsage
- StgCmmMonad: MkCgInfoDown :: DynFlags -> Module -> UpdFrameOffset -> CLabel -> Sequel -> Maybe SelfLoopInfo -> CmmTickScope -> CgInfoDownwards
- StgCmmMonad: MkCgState :: CmmAGraph -> OrdList CmmDecl -> CgBindings -> HeapUsage -> UniqSupply -> CgState
- StgCmmMonad: Return :: Sequel
- StgCmmMonad: ReturnedTo :: BlockId -> ByteOff -> ReturnKind
- StgCmmMonad: [cg_id] :: CgIdInfo -> Id
- StgCmmMonad: [cg_lf] :: CgIdInfo -> LambdaFormInfo
- StgCmmMonad: [cg_loc] :: CgIdInfo -> CgLoc
- StgCmmMonad: [cgd_dflags] :: CgInfoDownwards -> DynFlags
- StgCmmMonad: [cgd_mod] :: CgInfoDownwards -> Module
- StgCmmMonad: [cgd_self_loop] :: CgInfoDownwards -> Maybe SelfLoopInfo
- StgCmmMonad: [cgd_sequel] :: CgInfoDownwards -> Sequel
- StgCmmMonad: [cgd_tick_scope] :: CgInfoDownwards -> CmmTickScope
- StgCmmMonad: [cgd_ticky] :: CgInfoDownwards -> CLabel
- StgCmmMonad: [cgd_updfr_off] :: CgInfoDownwards -> UpdFrameOffset
- StgCmmMonad: [cgs_binds] :: CgState -> CgBindings
- StgCmmMonad: [cgs_hp_usg] :: CgState -> HeapUsage
- StgCmmMonad: [cgs_stmts] :: CgState -> CmmAGraph
- StgCmmMonad: [cgs_tops] :: CgState -> OrdList CmmDecl
- StgCmmMonad: [cgs_uniqs] :: CgState -> UniqSupply
- StgCmmMonad: [realHp] :: HeapUsage -> VirtualHpOffset
- StgCmmMonad: [virtHp] :: HeapUsage -> VirtualHpOffset
- StgCmmMonad: aGraphToGraph :: CmmAGraphScoped -> FCode CmmGraph
- StgCmmMonad: codeOnly :: FCode () -> FCode ()
- StgCmmMonad: data CgIdInfo
- StgCmmMonad: data CgInfoDownwards
- StgCmmMonad: data CgState
- StgCmmMonad: data FCode a
- StgCmmMonad: data HeapUsage
- StgCmmMonad: data ReturnKind
- StgCmmMonad: data Sequel
- StgCmmMonad: emit :: CmmAGraph -> FCode ()
- StgCmmMonad: emitAssign :: CmmReg -> CmmExpr -> FCode ()
- StgCmmMonad: emitComment :: FastString -> FCode ()
- StgCmmMonad: emitDecl :: CmmDecl -> FCode ()
- StgCmmMonad: emitLabel :: BlockId -> FCode ()
- StgCmmMonad: emitOutOfLine :: BlockId -> CmmAGraphScoped -> FCode ()
- StgCmmMonad: emitProc :: Maybe CmmInfoTable -> CLabel -> [GlobalReg] -> CmmAGraphScoped -> Int -> FCode ()
- StgCmmMonad: emitProcWithConvention :: Convention -> Maybe CmmInfoTable -> CLabel -> [CmmFormal] -> CmmAGraphScoped -> FCode ()
- StgCmmMonad: emitProcWithStackFrame :: Convention -> Maybe CmmInfoTable -> CLabel -> [CmmFormal] -> [CmmFormal] -> CmmAGraphScoped -> Bool -> FCode ()
- StgCmmMonad: emitStore :: CmmExpr -> CmmExpr -> FCode ()
- StgCmmMonad: emitTick :: CmmTickish -> FCode ()
- StgCmmMonad: emitUnwind :: [(GlobalReg, Maybe CmmExpr)] -> FCode ()
- StgCmmMonad: fixC :: (a -> FCode a) -> FCode a
- StgCmmMonad: forkAltPair :: FCode a -> FCode a -> FCode (a, a)
- StgCmmMonad: forkAlts :: [FCode a] -> FCode [a]
- StgCmmMonad: forkClosureBody :: FCode () -> FCode ()
- StgCmmMonad: forkLneBody :: FCode a -> FCode a
- StgCmmMonad: getBinds :: FCode CgBindings
- StgCmmMonad: getCmm :: FCode () -> FCode CmmGroup
- StgCmmMonad: getCode :: FCode a -> FCode CmmAGraph
- StgCmmMonad: getCodeR :: FCode a -> FCode (a, CmmAGraph)
- StgCmmMonad: getCodeScoped :: FCode a -> FCode (a, CmmAGraphScoped)
- StgCmmMonad: getDynFlags :: HasDynFlags m => m DynFlags
- StgCmmMonad: getHeapUsage :: (VirtualHpOffset -> FCode a) -> FCode a
- StgCmmMonad: getHpUsage :: FCode HeapUsage
- StgCmmMonad: getInfoDown :: FCode CgInfoDownwards
- StgCmmMonad: getModuleName :: FCode Module
- StgCmmMonad: getSelfLoop :: FCode (Maybe SelfLoopInfo)
- StgCmmMonad: getSequel :: FCode Sequel
- StgCmmMonad: getState :: FCode CgState
- StgCmmMonad: getThisPackage :: FCode UnitId
- StgCmmMonad: getTickScope :: FCode CmmTickScope
- StgCmmMonad: getTickyCtrLabel :: FCode CLabel
- StgCmmMonad: getUpdFrameOff :: FCode UpdFrameOffset
- StgCmmMonad: getVirtHp :: FCode VirtualHpOffset
- StgCmmMonad: heapHWM :: HeapUsage -> VirtualHpOffset
- StgCmmMonad: initC :: IO CgState
- StgCmmMonad: initHpUsage :: HeapUsage
- StgCmmMonad: initUpdFrameOff :: DynFlags -> UpdFrameOffset
- StgCmmMonad: instance DynFlags.HasDynFlags StgCmmMonad.FCode
- StgCmmMonad: instance GHC.Base.Applicative StgCmmMonad.FCode
- StgCmmMonad: instance GHC.Base.Functor StgCmmMonad.FCode
- StgCmmMonad: instance GHC.Base.Monad StgCmmMonad.FCode
- StgCmmMonad: instance Outputable.Outputable StgCmmMonad.CgIdInfo
- StgCmmMonad: instance Outputable.Outputable StgCmmMonad.Sequel
- StgCmmMonad: instance UniqSupply.MonadUnique StgCmmMonad.FCode
- StgCmmMonad: mkCall :: CmmExpr -> (Convention, Convention) -> [CmmFormal] -> [CmmExpr] -> UpdFrameOffset -> [CmmExpr] -> FCode CmmAGraph
- StgCmmMonad: mkCmmCall :: CmmExpr -> [CmmFormal] -> [CmmExpr] -> UpdFrameOffset -> FCode CmmAGraph
- StgCmmMonad: mkCmmIfGoto :: CmmExpr -> BlockId -> FCode CmmAGraph
- StgCmmMonad: mkCmmIfGoto' :: CmmExpr -> BlockId -> Maybe Bool -> FCode CmmAGraph
- StgCmmMonad: mkCmmIfThen :: CmmExpr -> CmmAGraph -> FCode CmmAGraph
- StgCmmMonad: mkCmmIfThen' :: CmmExpr -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph
- StgCmmMonad: mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> FCode CmmAGraph
- StgCmmMonad: mkCmmIfThenElse' :: CmmExpr -> CmmAGraph -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph
- StgCmmMonad: newUnique :: FCode Unique
- StgCmmMonad: runC :: DynFlags -> Module -> CgState -> FCode a -> (a, CgState)
- StgCmmMonad: setBinds :: CgBindings -> FCode ()
- StgCmmMonad: setHpUsage :: HeapUsage -> FCode ()
- StgCmmMonad: setRealHp :: VirtualHpOffset -> FCode ()
- StgCmmMonad: setState :: CgState -> FCode ()
- StgCmmMonad: setTickyCtrLabel :: CLabel -> FCode a -> FCode a
- StgCmmMonad: setVirtHp :: VirtualHpOffset -> FCode ()
- StgCmmMonad: tickScope :: FCode a -> FCode a
- StgCmmMonad: type ConTagZ = Int
- StgCmmMonad: type VirtualHpOffset = WordOff
- StgCmmMonad: withSelfLoop :: SelfLoopInfo -> FCode a -> FCode a
- StgCmmMonad: withSequel :: Sequel -> FCode a -> FCode a
- StgCmmMonad: withUpdFrameOff :: UpdFrameOffset -> FCode a -> FCode a
- StgCmmPrim: cgOpApp :: StgOp -> [StgArg] -> Type -> FCode ReturnKind
- StgCmmPrim: cgPrimOp :: [LocalReg] -> PrimOp -> [StgArg] -> FCode ()
- StgCmmPrim: shouldInlinePrimOp :: DynFlags -> PrimOp -> [CmmExpr] -> Maybe ([LocalReg] -> FCode ())
- StgCmmProf: ccType :: DynFlags -> CmmType
- StgCmmProf: ccsType :: DynFlags -> CmmType
- StgCmmProf: costCentreFrom :: DynFlags -> CmmExpr -> CmmExpr
- StgCmmProf: dynProfHdr :: DynFlags -> CmmExpr -> [CmmExpr]
- StgCmmProf: emitSetCCC :: CostCentre -> Bool -> Bool -> FCode ()
- StgCmmProf: enterCostCentreFun :: CostCentreStack -> CmmExpr -> FCode ()
- StgCmmProf: enterCostCentreThunk :: CmmExpr -> FCode ()
- StgCmmProf: initCostCentres :: CollectedCCs -> FCode ()
- StgCmmProf: initUpdFrameProf :: CmmExpr -> FCode ()
- StgCmmProf: ldvEnter :: CmmExpr -> FCode ()
- StgCmmProf: ldvEnterClosure :: ClosureInfo -> CmmReg -> FCode ()
- StgCmmProf: ldvRecordCreate :: CmmExpr -> FCode ()
- StgCmmProf: mkCCostCentre :: CostCentre -> CmmLit
- StgCmmProf: mkCCostCentreStack :: CostCentreStack -> CmmLit
- StgCmmProf: profAlloc :: CmmExpr -> CmmExpr -> FCode ()
- StgCmmProf: profDynAlloc :: SMRep -> CmmExpr -> FCode ()
- StgCmmProf: restoreCurrentCostCentre :: Maybe LocalReg -> FCode ()
- StgCmmProf: saveCurrentCostCentre :: FCode (Maybe LocalReg)
- StgCmmProf: staticProfHdr :: DynFlags -> CostCentreStack -> [CmmLit]
- StgCmmProf: storeCurCCS :: CmmExpr -> CmmAGraph
- StgCmmTicky: tickyAllocHeap :: Bool -> VirtualHpOffset -> FCode ()
- StgCmmTicky: tickyAllocPAP :: CmmExpr -> CmmExpr -> FCode ()
- StgCmmTicky: tickyAllocPrim :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()
- StgCmmTicky: tickyAllocThunk :: CmmExpr -> CmmExpr -> FCode ()
- StgCmmTicky: tickyBlackHole :: Bool -> FCode ()
- StgCmmTicky: tickyDirectCall :: RepArity -> [StgArg] -> FCode ()
- StgCmmTicky: tickyDynAlloc :: Maybe Id -> SMRep -> LambdaFormInfo -> FCode ()
- StgCmmTicky: tickyEnterDynCon :: FCode ()
- StgCmmTicky: tickyEnterFun :: ClosureInfo -> FCode ()
- StgCmmTicky: tickyEnterLNE :: FCode ()
- StgCmmTicky: tickyEnterStaticCon :: FCode ()
- StgCmmTicky: tickyEnterStdThunk :: ClosureInfo -> FCode ()
- StgCmmTicky: tickyEnterThunk :: ClosureInfo -> FCode ()
- StgCmmTicky: tickyEnterViaNode :: FCode ()
- StgCmmTicky: tickyHeapCheck :: FCode ()
- StgCmmTicky: tickyKnownCallExact :: FCode ()
- StgCmmTicky: tickyKnownCallExtraArgs :: FCode ()
- StgCmmTicky: tickyKnownCallTooFewArgs :: FCode ()
- StgCmmTicky: tickyPushUpdateFrame :: FCode ()
- StgCmmTicky: tickyReturnNewCon :: RepArity -> FCode ()
- StgCmmTicky: tickyReturnOldCon :: RepArity -> FCode ()
- StgCmmTicky: tickySlowCall :: LambdaFormInfo -> [StgArg] -> FCode ()
- StgCmmTicky: tickySlowCallPat :: [PrimRep] -> FCode ()
- StgCmmTicky: tickyStackCheck :: FCode ()
- StgCmmTicky: tickyUnboxedTupleReturn :: RepArity -> FCode ()
- StgCmmTicky: tickyUnknownCall :: FCode ()
- StgCmmTicky: tickyUpdateBhCaf :: ClosureInfo -> FCode ()
- StgCmmTicky: tickyUpdateFrameOmitted :: FCode ()
- StgCmmTicky: withNewTickyCounterCon :: Name -> FCode a -> FCode a
- StgCmmTicky: withNewTickyCounterFun :: Bool -> Name -> [NonVoid Id] -> FCode a -> FCode a
- StgCmmTicky: withNewTickyCounterLNE :: Name -> [NonVoid Id] -> FCode a -> FCode a
- StgCmmTicky: withNewTickyCounterStdThunk :: Bool -> Name -> FCode a -> FCode a
- StgCmmTicky: withNewTickyCounterThunk :: Bool -> Bool -> Name -> FCode a -> FCode a
- StgCmmUtils: addToMem :: CmmType -> CmmExpr -> Int -> CmmAGraph
- StgCmmUtils: addToMemE :: CmmType -> CmmExpr -> CmmExpr -> CmmAGraph
- StgCmmUtils: addToMemLbl :: CmmType -> CLabel -> Int -> CmmAGraph
- StgCmmUtils: addToMemLblE :: CmmType -> CLabel -> CmmExpr -> CmmAGraph
- StgCmmUtils: assignTemp :: CmmExpr -> FCode LocalReg
- StgCmmUtils: blankWord :: DynFlags -> CmmStatic
- StgCmmUtils: callerSaveVolatileRegs :: DynFlags -> (CmmAGraph, CmmAGraph)
- StgCmmUtils: callerSaves :: Platform -> GlobalReg -> Bool
- StgCmmUtils: cgLit :: Literal -> FCode CmmLit
- StgCmmUtils: cmmAddWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmAndWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmConstrTag1 :: DynFlags -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmEqWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmIsTagged :: DynFlags -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmLabelOffB :: CLabel -> ByteOff -> CmmLit
- StgCmmUtils: cmmLabelOffW :: DynFlags -> CLabel -> WordOff -> CmmLit
- StgCmmUtils: cmmLoadIndexW :: DynFlags -> CmmExpr -> Int -> CmmType -> CmmExpr
- StgCmmUtils: cmmMulWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmNeWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmNegate :: DynFlags -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmOffsetB :: DynFlags -> CmmExpr -> ByteOff -> CmmExpr
- StgCmmUtils: cmmOffsetExprB :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmOffsetExprW :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmOffsetLitB :: CmmLit -> ByteOff -> CmmLit
- StgCmmUtils: cmmOffsetLitW :: DynFlags -> CmmLit -> WordOff -> CmmLit
- StgCmmUtils: cmmOffsetW :: DynFlags -> CmmExpr -> WordOff -> CmmExpr
- StgCmmUtils: cmmOrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmRegOffB :: CmmReg -> ByteOff -> CmmExpr
- StgCmmUtils: cmmRegOffW :: DynFlags -> CmmReg -> WordOff -> CmmExpr
- StgCmmUtils: cmmSubWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmUGtWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmUShrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
- StgCmmUtils: cmmUntag :: DynFlags -> CmmExpr -> CmmExpr
- StgCmmUtils: emitCmmLitSwitch :: CmmExpr -> [(Literal, CmmAGraphScoped)] -> CmmAGraphScoped -> FCode ()
- StgCmmUtils: emitDataLits :: CLabel -> [CmmLit] -> FCode ()
- StgCmmUtils: emitMultiAssign :: [LocalReg] -> [CmmExpr] -> FCode ()
- StgCmmUtils: emitRODataLits :: CLabel -> [CmmLit] -> FCode ()
- StgCmmUtils: emitRtsCall :: UnitId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
- StgCmmUtils: emitRtsCallGen :: [(LocalReg, ForeignHint)] -> CLabel -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
- StgCmmUtils: emitRtsCallWithResult :: LocalReg -> ForeignHint -> UnitId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
- StgCmmUtils: emitSwitch :: CmmExpr -> [(ConTagZ, CmmAGraphScoped)] -> Maybe CmmAGraphScoped -> ConTagZ -> ConTagZ -> FCode ()
- StgCmmUtils: get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr
- StgCmmUtils: mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt
- StgCmmUtils: mkRODataLits :: CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt
- StgCmmUtils: mkSimpleLit :: DynFlags -> Literal -> CmmLit
- StgCmmUtils: mkTaggedObjectLoad :: DynFlags -> LocalReg -> LocalReg -> ByteOff -> DynTag -> CmmAGraph
- StgCmmUtils: mkWordCLit :: DynFlags -> Integer -> CmmLit
- StgCmmUtils: newByteStringCLit :: [Word8] -> FCode CmmLit
- StgCmmUtils: newStringCLit :: String -> FCode CmmLit
- StgCmmUtils: newTemp :: MonadUnique m => CmmType -> m LocalReg
- StgCmmUtils: newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
- StgCmmUtils: tagToClosure :: DynFlags -> TyCon -> CmmExpr -> CmmExpr
- StgSyn: data NoExtSilent
- StgSyn: instance Data.Data.Data StgSyn.NoExtSilent
- StgSyn: instance GHC.Classes.Eq StgSyn.NoExtSilent
- StgSyn: instance GHC.Classes.Ord StgSyn.NoExtSilent
- StgSyn: instance Outputable.Outputable StgSyn.NoExtSilent
- StgSyn: noExtSilent :: NoExtSilent
- SysTools: initLlvmConfig :: String -> IO LlvmConfig
- SysTools.Tasks: runSplit :: DynFlags -> [Option] -> IO ()
- TcBinds: addTypecheckedBinds :: TcGblEnv -> [LHsBinds GhcTc] -> TcGblEnv
- TcDeriv: mkDerivInfos :: [LTyClDecl GhcRn] -> TcM [DerivInfo]
- TcDerivUtils: [denv_cls_tys] :: DerivEnv -> [Type]
- TcDerivUtils: [denv_rep_tc] :: DerivEnv -> TyCon
- TcDerivUtils: [denv_rep_tc_args] :: DerivEnv -> [Type]
- TcDerivUtils: [denv_tc] :: DerivEnv -> TyCon
- TcDerivUtils: [denv_tc_args] :: DerivEnv -> [Type]
- TcDerivUtils: [ds_tc] :: DerivSpec theta -> TyCon
- TcEnv: instance HsExtension.OutputableBndrId (HsExtension.GhcPass a) => Outputable.Outputable (TcEnv.InstInfo (HsExtension.GhcPass a))
- TcEnv: newDFunName' :: Class -> TyCon -> TcM Name
- TcEnv: tcGetGlobalTyCoVars :: TcM TcTyVarSet
- TcEvidence: mkWpFuns :: [(TcType, HsWrapper)] -> TcType -> HsWrapper -> SDoc -> HsWrapper
- TcHoleErrors: instance GHC.Classes.Eq TcHoleErrors.HoleFit
- TcHoleErrors: instance GHC.Classes.Eq TcHoleErrors.HoleFitCandidate
- TcHoleErrors: instance GHC.Classes.Ord TcHoleErrors.HoleFit
- TcHoleErrors: instance OccName.HasOccName TcHoleErrors.HoleFitCandidate
- TcHoleErrors: instance Outputable.Outputable TcHoleErrors.HoleFit
- TcHoleErrors: instance Outputable.Outputable TcHoleErrors.HoleFitCandidate
- TcHsType: NoSaturation :: RequireSaturation
- TcHsType: YesSaturation :: RequireSaturation
- TcHsType: badKindSig :: Bool -> Kind -> SDoc
- TcHsType: checkExpectedKind :: HasDebugCallStack => RequireSaturation -> SDoc -> TcType -> TcKind -> TcKind -> TcM TcType
- TcHsType: data RequireSaturation
- TcHsType: instance Outputable.Outputable TcHsType.RequireSaturation
- TcHsType: kcLHsQTyVars :: Name -> TyConFlavour -> Bool -> LHsQTyVars GhcRn -> TcM Kind -> TcM TcTyCon
- TcHsType: kindGeneralize :: TcType -> TcM [KindVar]
- TcHsType: reportFloatingKvs :: Name -> TyConFlavour -> [TcTyVar] -> [TcTyVar] -> TcM ()
- TcHsType: tcWildCardBinders :: [Name] -> ([(Name, TcTyVar)] -> TcM a) -> TcM a
- TcHsType: zonkPromoteType :: TcType -> TcM TcType
- TcMType: newTauTyVar :: Name -> Kind -> TcM TcTyVar
- TcMType: tcGetGlobalTyCoVars :: TcM TcTyVarSet
- TcMType: zonkTcTyCoVarBndr :: TcTyCoVar -> TcM TcTyCoVar
- TcMType: zonkTyConBinders :: [TyConBinder] -> TcM [TyConBinder]
- TcRnMonad: checkTH :: a -> String -> TcRn ()
- TcRnMonad: emitWildCardHoleConstraints :: [(Name, TcTyVar)] -> TcM ()
- TcRnMonad: failTH :: Outputable a => a -> String -> TcRn x
- TcRnTypes: AnnOrigin :: CtOrigin
- TcRnTypes: AppOrigin :: CtOrigin
- TcRnTypes: ArithSeqOrigin :: ArithSeqInfo GhcRn -> CtOrigin
- TcRnTypes: ArrowSkol :: SkolemInfo
- TcRnTypes: AssocFamPatOrigin :: CtOrigin
- TcRnTypes: BracketSkol :: SkolemInfo
- TcRnTypes: CDictCan :: CtEvidence -> Class -> [Xi] -> Bool -> Ct
- TcRnTypes: CFunEqCan :: CtEvidence -> TyCon -> [Xi] -> TcTyVar -> Ct
- TcRnTypes: CHoleCan :: CtEvidence -> Hole -> Ct
- TcRnTypes: CIrredCan :: CtEvidence -> Bool -> Ct
- TcRnTypes: CNonCanonical :: CtEvidence -> Ct
- TcRnTypes: CQuantCan :: QCInst -> Ct
- TcRnTypes: CTyEqCan :: CtEvidence -> TcTyVar -> TcType -> EqRel -> Ct
- TcRnTypes: CtDerived :: TcPredType -> CtLoc -> CtEvidence
- TcRnTypes: CtGiven :: TcPredType -> EvVar -> CtLoc -> CtEvidence
- TcRnTypes: CtLoc :: CtOrigin -> TcLclEnv -> Maybe TypeOrKind -> !SubGoalDepth -> CtLoc
- TcRnTypes: CtWanted :: TcPredType -> TcEvDest -> ShadowInfo -> CtLoc -> CtEvidence
- TcRnTypes: DataConSkol :: Name -> SkolemInfo
- TcRnTypes: DefaultOrigin :: CtOrigin
- TcRnTypes: DerivClauseOrigin :: CtOrigin
- TcRnTypes: DerivOriginCoerce :: Id -> Type -> Type -> Bool -> CtOrigin
- TcRnTypes: DerivOriginDC :: DataCon -> Int -> Bool -> CtOrigin
- TcRnTypes: DerivSkol :: Type -> SkolemInfo
- TcRnTypes: Derived :: CtFlavour
- TcRnTypes: DoOrigin :: CtOrigin
- TcRnTypes: DoPatOrigin :: LPat GhcRn -> CtOrigin
- TcRnTypes: EvVarDest :: EvVar -> TcEvDest
- TcRnTypes: ExprSigOrigin :: CtOrigin
- TcRnTypes: FailablePattern :: LPat GhcTcId -> CtOrigin
- TcRnTypes: FamInstSkol :: SkolemInfo
- TcRnTypes: ForAllSkol :: SDoc -> SkolemInfo
- TcRnTypes: FunDepOrigin1 :: PredType -> CtLoc -> PredType -> CtLoc -> CtOrigin
- TcRnTypes: FunDepOrigin2 :: PredType -> CtOrigin -> PredType -> SrcSpan -> CtOrigin
- TcRnTypes: Given :: CtFlavour
- TcRnTypes: GivenOrigin :: SkolemInfo -> CtOrigin
- TcRnTypes: HoleDest :: CoercionHole -> TcEvDest
- TcRnTypes: HoleOrigin :: CtOrigin
- TcRnTypes: IC_BadTelescope :: ImplicStatus
- TcRnTypes: IC_Insoluble :: ImplicStatus
- TcRnTypes: IC_Solved :: [EvVar] -> ImplicStatus
- TcRnTypes: IC_Unsolved :: ImplicStatus
- TcRnTypes: IPOccOrigin :: HsIPName -> CtOrigin
- TcRnTypes: IPSkol :: [HsIPName] -> SkolemInfo
- TcRnTypes: IfOrigin :: CtOrigin
- TcRnTypes: Implic :: TcLevel -> [TcTyVar] -> SkolemInfo -> Maybe SDoc -> [EvVar] -> Bool -> Env TcGblEnv TcLclEnv -> WantedConstraints -> EvBindsVar -> VarSet -> VarSet -> ImplicStatus -> Implication
- TcRnTypes: InferSkol :: [(Name, TcType)] -> SkolemInfo
- TcRnTypes: InstProvidedOrigin :: Module -> ClsInst -> CtOrigin
- TcRnTypes: InstSC :: TypeSize -> SkolemInfo
- TcRnTypes: InstSkol :: SkolemInfo
- TcRnTypes: KindEqOrigin :: TcType -> Maybe TcType -> CtOrigin -> Maybe TypeOrKind -> CtOrigin
- TcRnTypes: KindLevel :: TypeOrKind
- TcRnTypes: ListOrigin :: CtOrigin
- TcRnTypes: LiteralOrigin :: HsOverLit GhcRn -> CtOrigin
- TcRnTypes: MCompOrigin :: CtOrigin
- TcRnTypes: MCompPatOrigin :: LPat GhcRn -> CtOrigin
- TcRnTypes: NegateOrigin :: CtOrigin
- TcRnTypes: OccurrenceOf :: Name -> CtOrigin
- TcRnTypes: OccurrenceOfRecSel :: RdrName -> CtOrigin
- TcRnTypes: OverLabelOrigin :: FastString -> CtOrigin
- TcRnTypes: PatOrigin :: CtOrigin
- TcRnTypes: PatSigOrigin :: CtOrigin
- TcRnTypes: PatSkol :: ConLike -> HsMatchContext Name -> SkolemInfo
- TcRnTypes: PatSynExPE :: PromotionErr
- TcRnTypes: ProcOrigin :: CtOrigin
- TcRnTypes: ProvCtxtOrigin :: PatSynBind GhcRn GhcRn -> CtOrigin
- TcRnTypes: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> Bool -> QCInst
- TcRnTypes: QuantCtxtSkol :: SkolemInfo
- TcRnTypes: RecordUpdOrigin :: CtOrigin
- TcRnTypes: ReifySkol :: SkolemInfo
- TcRnTypes: RuleSkol :: RuleName -> SkolemInfo
- TcRnTypes: ScOrigin :: TypeSize -> CtOrigin
- TcRnTypes: SectionOrigin :: CtOrigin
- TcRnTypes: Shouldn'tHappenOrigin :: String -> CtOrigin
- TcRnTypes: SigSkol :: UserTypeCtxt -> TcType -> [(Name, TcTyVar)] -> SkolemInfo
- TcRnTypes: SigTypeSkol :: UserTypeCtxt -> SkolemInfo
- TcRnTypes: SpecPragOrigin :: UserTypeCtxt -> CtOrigin
- TcRnTypes: StandAloneDerivOrigin :: CtOrigin
- TcRnTypes: StaticOrigin :: CtOrigin
- TcRnTypes: TupleOrigin :: CtOrigin
- TcRnTypes: TyConSkol :: TyConFlavour -> Name -> SkolemInfo
- TcRnTypes: TypeEqOrigin :: TcType -> TcType -> Maybe SDoc -> Bool -> CtOrigin
- TcRnTypes: TypeLevel :: TypeOrKind
- TcRnTypes: UnboundOccurrenceOf :: OccName -> CtOrigin
- TcRnTypes: UnifyForAllSkol :: TcType -> SkolemInfo
- TcRnTypes: UnkSkol :: SkolemInfo
- TcRnTypes: ViewPatOrigin :: CtOrigin
- TcRnTypes: WC :: Cts -> Bag Implication -> WantedConstraints
- TcRnTypes: WDeriv :: ShadowInfo
- TcRnTypes: WOnly :: ShadowInfo
- TcRnTypes: Wanted :: ShadowInfo -> CtFlavour
- TcRnTypes: [cc_class] :: Ct -> Class
- TcRnTypes: [cc_eq_rel] :: Ct -> EqRel
- TcRnTypes: [cc_ev] :: Ct -> CtEvidence
- TcRnTypes: [cc_fsk] :: Ct -> TcTyVar
- TcRnTypes: [cc_fun] :: Ct -> TyCon
- TcRnTypes: [cc_hole] :: Ct -> Hole
- TcRnTypes: [cc_insol] :: Ct -> Bool
- TcRnTypes: [cc_pend_sc] :: Ct -> Bool
- TcRnTypes: [cc_rhs] :: Ct -> TcType
- TcRnTypes: [cc_tyargs] :: Ct -> [Xi]
- TcRnTypes: [cc_tyvar] :: Ct -> TcTyVar
- TcRnTypes: [ctev_dest] :: CtEvidence -> TcEvDest
- TcRnTypes: [ctev_evar] :: CtEvidence -> EvVar
- TcRnTypes: [ctev_loc] :: CtEvidence -> CtLoc
- TcRnTypes: [ctev_nosh] :: CtEvidence -> ShadowInfo
- TcRnTypes: [ctev_pred] :: CtEvidence -> TcPredType
- TcRnTypes: [ctl_depth] :: CtLoc -> !SubGoalDepth
- TcRnTypes: [ctl_env] :: CtLoc -> TcLclEnv
- TcRnTypes: [ctl_origin] :: CtLoc -> CtOrigin
- TcRnTypes: [ctl_t_or_k] :: CtLoc -> Maybe TypeOrKind
- TcRnTypes: [dsl_dicts] :: DsLclEnv -> Bag EvVar
- TcRnTypes: [dsl_pm_iter] :: DsLclEnv -> IORef Int
- TcRnTypes: [dsl_tm_cs] :: DsLclEnv -> Bag SimpleEq
- TcRnTypes: [env_us] :: Env gbl lcl -> {-# UNPACK #-} !IORef UniqSupply
- TcRnTypes: [ic_binds] :: Implication -> EvBindsVar
- TcRnTypes: [ic_env] :: Implication -> Env TcGblEnv TcLclEnv
- TcRnTypes: [ic_given] :: Implication -> [EvVar]
- TcRnTypes: [ic_info] :: Implication -> SkolemInfo
- TcRnTypes: [ic_need_inner] :: Implication -> VarSet
- TcRnTypes: [ic_need_outer] :: Implication -> VarSet
- TcRnTypes: [ic_no_eqs] :: Implication -> Bool
- TcRnTypes: [ic_skols] :: Implication -> [TcTyVar]
- TcRnTypes: [ic_status] :: Implication -> ImplicStatus
- TcRnTypes: [ic_tclvl] :: Implication -> TcLevel
- TcRnTypes: [ic_telescope] :: Implication -> Maybe SDoc
- TcRnTypes: [ic_wanted] :: Implication -> WantedConstraints
- TcRnTypes: [ics_dead] :: ImplicStatus -> [EvVar]
- TcRnTypes: [qci_ev] :: QCInst -> CtEvidence
- TcRnTypes: [qci_pend_sc] :: QCInst -> Bool
- TcRnTypes: [qci_pred] :: QCInst -> TcPredType
- TcRnTypes: [qci_tvs] :: QCInst -> [TcTyVar]
- TcRnTypes: [tcl_tyvars] :: TcLclEnv -> TcRef TcTyVarSet
- TcRnTypes: [uo_actual] :: CtOrigin -> TcType
- TcRnTypes: [uo_expected] :: CtOrigin -> TcType
- TcRnTypes: [uo_thing] :: CtOrigin -> Maybe SDoc
- TcRnTypes: [uo_visible] :: CtOrigin -> Bool
- TcRnTypes: [wc_impl] :: WantedConstraints -> Bag Implication
- TcRnTypes: [wc_simple] :: WantedConstraints -> Cts
- TcRnTypes: addImplics :: WantedConstraints -> Bag Implication -> WantedConstraints
- TcRnTypes: addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints
- TcRnTypes: addSimples :: WantedConstraints -> Bag Ct -> WantedConstraints
- TcRnTypes: andCts :: Cts -> Cts -> Cts
- TcRnTypes: andManyCts :: [Cts] -> Cts
- TcRnTypes: andWC :: WantedConstraints -> WantedConstraints -> WantedConstraints
- TcRnTypes: arisesFromGivens :: Ct -> Bool
- TcRnTypes: bumpCtLocDepth :: CtLoc -> CtLoc
- TcRnTypes: bumpSubGoalDepth :: SubGoalDepth -> SubGoalDepth
- TcRnTypes: consCts :: Ct -> Cts -> Cts
- TcRnTypes: ctEqRel :: Ct -> EqRel
- TcRnTypes: ctEvCoercion :: HasDebugCallStack => CtEvidence -> Coercion
- TcRnTypes: ctEvEqRel :: CtEvidence -> EqRel
- TcRnTypes: ctEvEvId :: CtEvidence -> EvVar
- TcRnTypes: ctEvExpr :: CtEvidence -> EvExpr
- TcRnTypes: ctEvFlavour :: CtEvidence -> CtFlavour
- TcRnTypes: ctEvFlavourRole :: CtEvidence -> CtFlavourRole
- TcRnTypes: ctEvId :: Ct -> EvVar
- TcRnTypes: ctEvLoc :: CtEvidence -> CtLoc
- TcRnTypes: ctEvOrigin :: CtEvidence -> CtOrigin
- TcRnTypes: ctEvPred :: CtEvidence -> TcPredType
- TcRnTypes: ctEvRole :: CtEvidence -> Role
- TcRnTypes: ctEvTerm :: CtEvidence -> EvTerm
- TcRnTypes: ctEvidence :: Ct -> CtEvidence
- TcRnTypes: ctFlavour :: Ct -> CtFlavour
- TcRnTypes: ctFlavourRole :: Ct -> CtFlavourRole
- TcRnTypes: ctLoc :: Ct -> CtLoc
- TcRnTypes: ctLocDepth :: CtLoc -> SubGoalDepth
- TcRnTypes: ctLocEnv :: CtLoc -> TcLclEnv
- TcRnTypes: ctLocLevel :: CtLoc -> TcLevel
- TcRnTypes: ctLocOrigin :: CtLoc -> CtOrigin
- TcRnTypes: ctLocSpan :: CtLoc -> RealSrcSpan
- TcRnTypes: ctLocTypeOrKind_maybe :: CtLoc -> Maybe TypeOrKind
- TcRnTypes: ctOrigin :: Ct -> CtOrigin
- TcRnTypes: ctPred :: Ct -> PredType
- TcRnTypes: ctsElts :: Cts -> [Ct]
- TcRnTypes: data Ct
- TcRnTypes: data CtEvidence
- TcRnTypes: data CtFlavour
- TcRnTypes: data CtLoc
- TcRnTypes: data CtOrigin
- TcRnTypes: data ImplicStatus
- TcRnTypes: data Implication
- TcRnTypes: data QCInst
- TcRnTypes: data ShadowInfo
- TcRnTypes: data SkolemInfo
- TcRnTypes: data SubGoalDepth
- TcRnTypes: data TcEvDest
- TcRnTypes: data TypeOrKind
- TcRnTypes: data WantedConstraints
- TcRnTypes: dropDerivedSimples :: Cts -> Cts
- TcRnTypes: dropDerivedWC :: WantedConstraints -> WantedConstraints
- TcRnTypes: emptyCts :: Cts
- TcRnTypes: emptyWC :: WantedConstraints
- TcRnTypes: eqCanDischargeFR :: CtFlavourRole -> CtFlavourRole -> Bool
- TcRnTypes: eqCanRewrite :: EqRel -> EqRel -> Bool
- TcRnTypes: eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
- TcRnTypes: eqMayRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
- TcRnTypes: exprCtOrigin :: HsExpr GhcRn -> CtOrigin
- TcRnTypes: extendCtsList :: Cts -> [Ct] -> Cts
- TcRnTypes: funEqCanDischarge :: CtEvidence -> CtEvidence -> (SwapFlag, Bool)
- TcRnTypes: funEqCanDischargeF :: CtFlavour -> CtFlavour -> (SwapFlag, Bool)
- TcRnTypes: getPendingWantedScs :: Cts -> ([Ct], Cts)
- TcRnTypes: getUserTypeErrorMsg :: Ct -> Maybe Type
- TcRnTypes: grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin
- TcRnTypes: implicDynFlags :: Implication -> DynFlags
- TcRnTypes: implicLclEnv :: Implication -> TcLclEnv
- TcRnTypes: implicationPrototype :: Implication
- TcRnTypes: initialSubGoalDepth :: SubGoalDepth
- TcRnTypes: insolubleCt :: Ct -> Bool
- TcRnTypes: insolubleEqCt :: Ct -> Bool
- TcRnTypes: insolubleImplic :: Implication -> Bool
- TcRnTypes: insolubleWC :: WantedConstraints -> Bool
- TcRnTypes: insolublesOnly :: WantedConstraints -> WantedConstraints
- TcRnTypes: instance GHC.Classes.Eq TcRnTypes.CtFlavour
- TcRnTypes: instance GHC.Classes.Eq TcRnTypes.ShadowInfo
- TcRnTypes: instance GHC.Classes.Eq TcRnTypes.SubGoalDepth
- TcRnTypes: instance GHC.Classes.Eq TcRnTypes.TypeOrKind
- TcRnTypes: instance GHC.Classes.Ord TcRnTypes.SubGoalDepth
- TcRnTypes: instance Outputable.Outputable TcRnTypes.Ct
- TcRnTypes: instance Outputable.Outputable TcRnTypes.CtEvidence
- TcRnTypes: instance Outputable.Outputable TcRnTypes.CtFlavour
- TcRnTypes: instance Outputable.Outputable TcRnTypes.CtOrigin
- TcRnTypes: instance Outputable.Outputable TcRnTypes.Hole
- TcRnTypes: instance Outputable.Outputable TcRnTypes.ImplicStatus
- TcRnTypes: instance Outputable.Outputable TcRnTypes.Implication
- TcRnTypes: instance Outputable.Outputable TcRnTypes.QCInst
- TcRnTypes: instance Outputable.Outputable TcRnTypes.SkolemInfo
- TcRnTypes: instance Outputable.Outputable TcRnTypes.SubGoalDepth
- TcRnTypes: instance Outputable.Outputable TcRnTypes.TcEvDest
- TcRnTypes: instance Outputable.Outputable TcRnTypes.TypeOrKind
- TcRnTypes: instance Outputable.Outputable TcRnTypes.WantedConstraints
- TcRnTypes: isCDictCan_Maybe :: Ct -> Maybe Class
- TcRnTypes: isCFunEqCan :: Ct -> Bool
- TcRnTypes: isCFunEqCan_maybe :: Ct -> Maybe (TyCon, [Type])
- TcRnTypes: isCNonCanonical :: Ct -> Bool
- TcRnTypes: isCTyEqCan :: Ct -> Bool
- TcRnTypes: isDerived :: CtEvidence -> Bool
- TcRnTypes: isDerivedCt :: Ct -> Bool
- TcRnTypes: isDroppableCt :: Ct -> Bool
- TcRnTypes: isEmptyCts :: Cts -> Bool
- TcRnTypes: isEmptyWC :: WantedConstraints -> Bool
- TcRnTypes: isExprHoleCt :: Ct -> Bool
- TcRnTypes: isGiven :: CtEvidence -> Bool
- TcRnTypes: isGivenCt :: Ct -> Bool
- TcRnTypes: isGivenLoc :: CtLoc -> Bool
- TcRnTypes: isGivenOrWDeriv :: CtFlavour -> Bool
- TcRnTypes: isHoleCt :: Ct -> Bool
- TcRnTypes: isInsolubleStatus :: ImplicStatus -> Bool
- TcRnTypes: isKindLevel :: TypeOrKind -> Bool
- TcRnTypes: isOutOfScopeCt :: Ct -> Bool
- TcRnTypes: isPendingScDict :: Ct -> Maybe Ct
- TcRnTypes: isPendingScInst :: QCInst -> Maybe QCInst
- TcRnTypes: isSolvedStatus :: ImplicStatus -> Bool
- TcRnTypes: isSolvedWC :: WantedConstraints -> Bool
- TcRnTypes: isTypeHoleCt :: Ct -> Bool
- TcRnTypes: isTypeLevel :: TypeOrKind -> Bool
- TcRnTypes: isUserTypeErrorCt :: Ct -> Bool
- TcRnTypes: isVisibleOrigin :: CtOrigin -> Bool
- TcRnTypes: isWanted :: CtEvidence -> Bool
- TcRnTypes: isWantedCt :: Ct -> Bool
- TcRnTypes: lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
- TcRnTypes: listToCts :: [Ct] -> Cts
- TcRnTypes: matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin
- TcRnTypes: maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth
- TcRnTypes: mkGivenLoc :: TcLevel -> SkolemInfo -> TcLclEnv -> CtLoc
- TcRnTypes: mkGivens :: CtLoc -> [EvId] -> [Ct]
- TcRnTypes: mkImplicWC :: Bag Implication -> WantedConstraints
- TcRnTypes: mkInsolubleCt :: CtEvidence -> Ct
- TcRnTypes: mkIrredCt :: CtEvidence -> Ct
- TcRnTypes: mkKindLoc :: TcType -> TcType -> CtLoc -> CtLoc
- TcRnTypes: mkNonCanonical :: CtEvidence -> Ct
- TcRnTypes: mkNonCanonicalCt :: Ct -> Ct
- TcRnTypes: mkSimpleWC :: [CtEvidence] -> WantedConstraints
- TcRnTypes: mkTcEqPredLikeEv :: CtEvidence -> TcType -> TcType -> TcType
- TcRnTypes: newImplication :: TcM Implication
- TcRnTypes: pprCtLoc :: CtLoc -> SDoc
- TcRnTypes: pprCtOrigin :: CtOrigin -> SDoc
- TcRnTypes: pprCts :: Cts -> SDoc
- TcRnTypes: pprEvVarTheta :: [EvVar] -> SDoc
- TcRnTypes: pprEvVarWithType :: EvVar -> SDoc
- TcRnTypes: pprEvVars :: [EvVar] -> SDoc
- TcRnTypes: pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc
- TcRnTypes: pprSkolInfo :: SkolemInfo -> SDoc
- TcRnTypes: setCtLoc :: Ct -> CtLoc -> Ct
- TcRnTypes: setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc
- TcRnTypes: setCtLocOrigin :: CtLoc -> CtOrigin -> CtLoc
- TcRnTypes: setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc
- TcRnTypes: singleCt :: Ct -> Cts
- TcRnTypes: snocCts :: Cts -> Ct -> Cts
- TcRnTypes: subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool
- TcRnTypes: superClassesMightHelp :: WantedConstraints -> Bool
- TcRnTypes: toInvisibleOrigin :: CtOrigin -> CtOrigin
- TcRnTypes: toKindLoc :: CtLoc -> CtLoc
- TcRnTypes: tyCoVarsOfCt :: Ct -> TcTyCoVarSet
- TcRnTypes: tyCoVarsOfCtList :: Ct -> [TcTyCoVar]
- TcRnTypes: tyCoVarsOfCts :: Cts -> TcTyCoVarSet
- TcRnTypes: tyCoVarsOfCtsList :: Cts -> [TcTyCoVar]
- TcRnTypes: tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet
- TcRnTypes: tyCoVarsOfWCList :: WantedConstraints -> [TyCoVar]
- TcRnTypes: type CtFlavourRole = (CtFlavour, EqRel)
- TcRnTypes: type Cts = Bag Ct
- TcRnTypes: type Xi = Type
- TcRnTypes: unionsWC :: [WantedConstraints] -> WantedConstraints
- TcRnTypes: updateCtLocOrigin :: CtLoc -> (CtOrigin -> CtOrigin) -> CtLoc
- TcRnTypes: wrapType :: Type -> [TyVar] -> [PredType] -> Type
- TcRnTypes: wrapTypeWithImplication :: Type -> Implication -> Type
- TcSMonad: lookupFlattenTyVar :: InertEqs -> TcTyVar -> TcType
- TcTyClsDecls: kcConDecl :: ConDecl GhcRn -> TcM ()
- TcType: ClassSCCtxt :: Name -> UserTypeCtxt
- TcType: ConArgCtxt :: Name -> UserTypeCtxt
- TcType: DataKindCtxt :: Name -> UserTypeCtxt
- TcType: DataTyCtxt :: Name -> UserTypeCtxt
- TcType: DefaultDeclCtxt :: UserTypeCtxt
- TcType: DerivClauseCtxt :: UserTypeCtxt
- TcType: ExprSigCtxt :: UserTypeCtxt
- TcType: ForSigCtxt :: Name -> UserTypeCtxt
- TcType: FunSigCtxt :: Name -> Bool -> UserTypeCtxt
- TcType: GenSigCtxt :: UserTypeCtxt
- TcType: GhciCtxt :: Bool -> UserTypeCtxt
- TcType: InfSigCtxt :: Name -> UserTypeCtxt
- TcType: InstDeclCtxt :: Bool -> UserTypeCtxt
- TcType: KindSigCtxt :: UserTypeCtxt
- TcType: PatSigCtxt :: UserTypeCtxt
- TcType: PatSynCtxt :: Name -> UserTypeCtxt
- TcType: ResSigCtxt :: UserTypeCtxt
- TcType: RuleSigCtxt :: Name -> UserTypeCtxt
- TcType: SigmaCtxt :: UserTypeCtxt
- TcType: SpecInstCtxt :: UserTypeCtxt
- TcType: ThBrackCtxt :: UserTypeCtxt
- TcType: TyFamResKindCtxt :: Name -> UserTypeCtxt
- TcType: TySynCtxt :: Name -> UserTypeCtxt
- TcType: TySynKindCtxt :: Name -> UserTypeCtxt
- TcType: TyVarBndrKindCtxt :: Name -> UserTypeCtxt
- TcType: TypeAppCtxt :: UserTypeCtxt
- TcType: data UserTypeCtxt
- TcType: isDictLikeTy :: Type -> Bool
- TcType: isNomEqPred :: PredType -> Bool
- TcType: isSigMaybe :: UserTypeCtxt -> Maybe Name
- TcType: mkFunTy :: Type -> Type -> Type
- TcType: mkFunTys :: [Type] -> Type -> Type
- TcType: mkNakedAppTy :: Type -> Type -> Type
- TcType: mkNakedAppTys :: Type -> [Type] -> Type
- TcType: mkNakedCastTy :: Type -> Coercion -> Type
- TcType: nakedSubstTy :: HasCallStack => TCvSubst -> TcType -> TcType
- TcType: pprUserTypeCtxt :: UserTypeCtxt -> SDoc
- TcType: tcRepSplitTyConApp :: HasCallStack => Type -> (TyCon, [Type])
- TcType: tcRepSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- TcType: tcRepSplitTyConApp_maybe' :: HasCallStack => Type -> Maybe (TyCon, [Type])
- TcType: typeKind :: HasDebugCallStack => Type -> Kind
- TcTypeableValidity: tyConIsTypeable :: TyCon -> Bool
- TcTypeableValidity: typeIsTypeable :: Type -> Bool
- TcUnify: OC_Bad :: OccCheckResult a
- TcUnify: OC_OK :: a -> OccCheckResult a
- TcUnify: OC_Occurs :: OccCheckResult a
- TcUnify: data OccCheckResult a
- TcUnify: instance GHC.Base.Applicative TcUnify.OccCheckResult
- TcUnify: instance GHC.Base.Functor TcUnify.OccCheckResult
- TcUnify: instance GHC.Base.Monad TcUnify.OccCheckResult
- TcValidity: checkValidTelescope :: TyCon -> TcM ()
- TmOracle: PmExprCon :: ConLike -> [PmExpr] -> PmExpr
- TmOracle: PmExprEq :: PmExpr -> PmExpr -> PmExpr
- TmOracle: PmExprLit :: PmLit -> PmExpr
- TmOracle: PmExprOther :: HsExpr GhcTc -> PmExpr
- TmOracle: PmExprVar :: Name -> PmExpr
- TmOracle: PmOLit :: Bool -> HsOverLit GhcTc -> PmLit
- TmOracle: PmSLit :: HsLit GhcTc -> PmLit
- TmOracle: canDiverge :: Name -> TmState -> Bool
- TmOracle: data PmExpr
- TmOracle: data PmLit
- TmOracle: eqPmLit :: PmLit -> PmLit -> Bool
- TmOracle: exprDeepLookup :: PmVarEnv -> PmExpr -> PmExpr
- TmOracle: extendSubst :: Id -> PmExpr -> TmState -> TmState
- TmOracle: falsePmExpr :: PmExpr
- TmOracle: filterComplex :: [ComplexEq] -> [PmNegLitCt]
- TmOracle: flattenPmVarEnv :: PmVarEnv -> PmVarEnv
- TmOracle: hsExprToPmExpr :: HsExpr GhcTc -> PmExpr
- TmOracle: initialTmState :: TmState
- TmOracle: isNotPmExprOther :: PmExpr -> Bool
- TmOracle: lhsExprToPmExpr :: LHsExpr GhcTc -> PmExpr
- TmOracle: pmLitType :: PmLit -> Type
- TmOracle: pprPmExprWithParens :: PmExpr -> PmPprM SDoc
- TmOracle: runPmPprM :: PmPprM a -> [PmNegLitCt] -> (a, [(SDoc, [PmLit])])
- TmOracle: solveOneEq :: TmState -> ComplexEq -> Maybe TmState
- TmOracle: tmOracle :: TmState -> [ComplexEq] -> Maybe TmState
- TmOracle: toComplex :: SimpleEq -> ComplexEq
- TmOracle: type ComplexEq = (PmExpr, PmExpr)
- TmOracle: type PmVarEnv = NameEnv PmExpr
- TmOracle: type SimpleEq = (Id, PmExpr)
- TmOracle: type TmState = ([ComplexEq], TmOracleEnv)
- TyCoRep: PprPrec :: Int -> PprPrec
- TyCoRep: TCvSubst :: InScopeSet -> TvSubstEnv -> CvSubstEnv -> TCvSubst
- TyCoRep: almostDevoidCoVarOfCo :: CoVar -> Coercion -> Bool
- TyCoRep: appPrec :: PprPrec
- TyCoRep: avoidNameClashes :: [TyCoVar] -> TidyEnv -> TidyEnv
- TyCoRep: checkValidSubst :: HasCallStack => TCvSubst -> [Type] -> [Coercion] -> a -> a
- TyCoRep: cloneTyVarBndr :: TCvSubst -> TyVar -> Unique -> (TCvSubst, TyVar)
- TyCoRep: cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar])
- TyCoRep: coVarsOfCo :: Coercion -> CoVarSet
- TyCoRep: coVarsOfCos :: [Coercion] -> CoVarSet
- TyCoRep: coVarsOfType :: Type -> CoVarSet
- TyCoRep: coVarsOfTypes :: [Type] -> TyCoVarSet
- TyCoRep: composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- TyCoRep: composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv)
- TyCoRep: data TCvSubst
- TyCoRep: debugPprType :: Type -> SDoc
- TyCoRep: emptyCvSubstEnv :: CvSubstEnv
- TyCoRep: emptyTCvSubst :: TCvSubst
- TyCoRep: emptyTvSubstEnv :: TvSubstEnv
- TyCoRep: extendCvSubst :: TCvSubst -> CoVar -> Coercion -> TCvSubst
- TyCoRep: extendCvSubstWithClone :: TCvSubst -> CoVar -> CoVar -> TCvSubst
- TyCoRep: extendTCvInScope :: TCvSubst -> Var -> TCvSubst
- TyCoRep: extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst
- TyCoRep: extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst
- TyCoRep: extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst
- TyCoRep: extendTCvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
- TyCoRep: extendTCvSubstWithClone :: TCvSubst -> TyCoVar -> TyCoVar -> TCvSubst
- TyCoRep: extendTvSubst :: TCvSubst -> TyVar -> Type -> TCvSubst
- TyCoRep: extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst
- TyCoRep: extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst
- TyCoRep: extendTvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
- TyCoRep: extendTvSubstWithClone :: TCvSubst -> TyVar -> TyVar -> TCvSubst
- TyCoRep: funPrec :: PprPrec
- TyCoRep: getCvSubstEnv :: TCvSubst -> CvSubstEnv
- TyCoRep: getTCvInScope :: TCvSubst -> InScopeSet
- TyCoRep: getTCvSubstRangeFVs :: TCvSubst -> VarSet
- TyCoRep: getTvSubstEnv :: TCvSubst -> TvSubstEnv
- TyCoRep: injectiveVarsOfType :: Type -> FV
- TyCoRep: instance Outputable.Outputable TyCoRep.TCvSubst
- TyCoRep: isEmptyTCvSubst :: TCvSubst -> Bool
- TyCoRep: isInScope :: Var -> TCvSubst -> Bool
- TyCoRep: isLiftedRuntimeRep :: Type -> Bool
- TyCoRep: isLiftedTypeKind :: Kind -> Bool
- TyCoRep: isRuntimeRepTy :: Type -> Bool
- TyCoRep: isRuntimeRepVar :: TyVar -> Bool
- TyCoRep: isUnliftedRuntimeRep :: Type -> Bool
- TyCoRep: isUnliftedTypeKind :: Kind -> Bool
- TyCoRep: isValidTCvSubst :: TCvSubst -> Bool
- TyCoRep: kindRep :: HasDebugCallStack => Kind -> Type
- TyCoRep: kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type
- TyCoRep: lookupCoVar :: TCvSubst -> Var -> Maybe Coercion
- TyCoRep: lookupTyVar :: TCvSubst -> TyVar -> Maybe Type
- TyCoRep: maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- TyCoRep: mkCvSubst :: InScopeSet -> CvSubstEnv -> TCvSubst
- TyCoRep: mkEmptyTCvSubst :: InScopeSet -> TCvSubst
- TyCoRep: mkFunTys :: [Type] -> Type -> Type
- TyCoRep: mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst
- TyCoRep: mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst
- TyCoRep: mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
- TyCoRep: mkTyCoForAllTy :: TyCoVar -> ArgFlag -> Type -> Type
- TyCoRep: mkTyCoInScopeSet :: [Type] -> [Coercion] -> InScopeSet
- TyCoRep: mkTyCoPiTy :: TyCoBinder -> Type -> Type
- TyCoRep: mkTyCoPiTys :: [TyCoBinder] -> Type -> Type
- TyCoRep: newtype PprPrec
- TyCoRep: noFreeVarsOfCo :: Coercion -> Bool
- TyCoRep: noFreeVarsOfType :: Type -> Bool
- TyCoRep: notElemTCvSubst :: Var -> TCvSubst -> Bool
- TyCoRep: opPrec :: PprPrec
- TyCoRep: pprClassPred :: Class -> [Type] -> SDoc
- TyCoRep: pprCo :: Coercion -> SDoc
- TyCoRep: pprDataCons :: TyCon -> SDoc
- TyCoRep: pprForAll :: [TyCoVarBinder] -> SDoc
- TyCoRep: pprKind :: Kind -> SDoc
- TyCoRep: pprParendCo :: Coercion -> SDoc
- TyCoRep: pprParendKind :: Kind -> SDoc
- TyCoRep: pprParendTheta :: ThetaType -> SDoc
- TyCoRep: pprParendType :: Type -> SDoc
- TyCoRep: pprPrecType :: PprPrec -> Type -> SDoc
- TyCoRep: pprPrecTypeX :: TidyEnv -> PprPrec -> Type -> SDoc
- TyCoRep: pprSigmaType :: Type -> SDoc
- TyCoRep: pprTCvBndr :: TyCoVarBinder -> SDoc
- TyCoRep: pprTCvBndrs :: [TyCoVarBinder] -> SDoc
- TyCoRep: pprTheta :: ThetaType -> SDoc
- TyCoRep: pprThetaArrowTy :: ThetaType -> SDoc
- TyCoRep: pprTyLit :: TyLit -> SDoc
- TyCoRep: pprTyVar :: TyVar -> SDoc
- TyCoRep: pprTyVars :: [TyVar] -> SDoc
- TyCoRep: pprType :: Type -> SDoc
- TyCoRep: pprTypeApp :: TyCon -> [Type] -> SDoc
- TyCoRep: pprUserForAll :: [TyCoVarBinder] -> SDoc
- TyCoRep: pprWithExplicitKindsWhen :: Bool -> SDoc -> SDoc
- TyCoRep: sameVis :: ArgFlag -> ArgFlag -> Bool
- TyCoRep: setCvSubstEnv :: TCvSubst -> CvSubstEnv -> TCvSubst
- TyCoRep: setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst
- TyCoRep: sigPrec :: PprPrec
- TyCoRep: substCo :: HasCallStack => TCvSubst -> Coercion -> Coercion
- TyCoRep: substCoUnchecked :: TCvSubst -> Coercion -> Coercion
- TyCoRep: substCoVar :: TCvSubst -> CoVar -> Coercion
- TyCoRep: substCoVarBndr :: HasCallStack => TCvSubst -> CoVar -> (TCvSubst, CoVar)
- TyCoRep: substCoVars :: TCvSubst -> [CoVar] -> [Coercion]
- TyCoRep: substCoWith :: HasCallStack => [TyVar] -> [Type] -> Coercion -> Coercion
- TyCoRep: substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion
- TyCoRep: substCos :: HasCallStack => TCvSubst -> [Coercion] -> [Coercion]
- TyCoRep: substForAllCoBndr :: TCvSubst -> TyCoVar -> KindCoercion -> (TCvSubst, TyCoVar, Coercion)
- TyCoRep: substForAllCoBndrUsing :: Bool -> (Coercion -> Coercion) -> TCvSubst -> TyCoVar -> KindCoercion -> (TCvSubst, TyCoVar, KindCoercion)
- TyCoRep: substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType
- TyCoRep: substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType
- TyCoRep: substTy :: HasCallStack => TCvSubst -> Type -> Type
- TyCoRep: substTyAddInScope :: TCvSubst -> Type -> Type
- TyCoRep: substTyCoVars :: TCvSubst -> [TyCoVar] -> [Type]
- TyCoRep: substTyUnchecked :: TCvSubst -> Type -> Type
- TyCoRep: substTyVar :: TCvSubst -> TyVar -> Type
- TyCoRep: substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)
- TyCoRep: substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])
- TyCoRep: substTyVars :: TCvSubst -> [TyVar] -> [Type]
- TyCoRep: substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type
- TyCoRep: substTyWithCoVars :: [CoVar] -> [Coercion] -> Type -> Type
- TyCoRep: substTyWithInScope :: InScopeSet -> [TyVar] -> [Type] -> Type -> Type
- TyCoRep: substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type
- TyCoRep: substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]
- TyCoRep: substTysUnchecked :: TCvSubst -> [Type] -> [Type]
- TyCoRep: substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]
- TyCoRep: substTysWithCoVars :: [CoVar] -> [Coercion] -> [Type] -> [Type]
- TyCoRep: substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)
- TyCoRep: substVarBndrUsing :: (TCvSubst -> Type -> Type) -> TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)
- TyCoRep: substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar])
- TyCoRep: tidyCo :: TidyEnv -> Coercion -> Coercion
- TyCoRep: tidyCos :: TidyEnv -> [Coercion] -> [Coercion]
- TyCoRep: tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
- TyCoRep: tidyKind :: TidyEnv -> Kind -> Kind
- TyCoRep: tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)
- TyCoRep: tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- TyCoRep: tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- TyCoRep: tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)
- TyCoRep: tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])
- TyCoRep: tidyTopType :: Type -> Type
- TyCoRep: tidyTyCoVarBinder :: TidyEnv -> VarBndr TyCoVar vis -> (TidyEnv, VarBndr TyCoVar vis)
- TyCoRep: tidyTyCoVarBinders :: TidyEnv -> [VarBndr TyCoVar vis] -> (TidyEnv, [VarBndr TyCoVar vis])
- TyCoRep: tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar
- TyCoRep: tidyType :: TidyEnv -> Type -> Type
- TyCoRep: tidyTypes :: TidyEnv -> [Type] -> [Type]
- TyCoRep: tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
- TyCoRep: tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
- TyCoRep: topPrec :: PprPrec
- TyCoRep: tyCoBinderArgFlag :: TyCoBinder -> ArgFlag
- TyCoRep: tyCoFVsBndr :: TyCoVarBinder -> FV -> FV
- TyCoRep: tyCoFVsOfCo :: Coercion -> FV
- TyCoRep: tyCoFVsOfCos :: [Coercion] -> FV
- TyCoRep: tyCoFVsOfType :: Type -> FV
- TyCoRep: tyCoFVsOfTypes :: [Type] -> FV
- TyCoRep: tyCoFVsVarBndr :: Var -> FV -> FV
- TyCoRep: tyCoFVsVarBndrs :: [Var] -> FV -> FV
- TyCoRep: tyCoVarsOfCo :: Coercion -> TyCoVarSet
- TyCoRep: tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet
- TyCoRep: tyCoVarsOfCoList :: Coercion -> [TyCoVar]
- TyCoRep: tyCoVarsOfCos :: [Coercion] -> TyCoVarSet
- TyCoRep: tyCoVarsOfProv :: UnivCoProvenance -> TyCoVarSet
- TyCoRep: tyCoVarsOfType :: Type -> TyCoVarSet
- TyCoRep: tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
- TyCoRep: tyCoVarsOfTypeList :: Type -> [TyCoVar]
- TyCoRep: tyCoVarsOfTypes :: [Type] -> TyCoVarSet
- TyCoRep: tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet
- TyCoRep: tyCoVarsOfTypesList :: [Type] -> [TyCoVar]
- TyCoRep: tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
- TyCoRep: type CvSubstEnv = CoVarEnv Coercion
- TyCoRep: type TvSubstEnv = TyVarEnv Type
- TyCoRep: unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
- TyCoRep: zapTCvSubst :: TCvSubst -> TCvSubst
- TyCoRep: zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
- TyCoRep: zipCvSubst :: HasDebugCallStack => [CoVar] -> [Coercion] -> TCvSubst
- TyCoRep: zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst
- TyCoRep: zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst
- TyCoRep: zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
- TyCon: instance GHC.Classes.Eq TyCon.PrimRep
- TyCon: makeRecoveryTyCon :: TyCon -> TyCon
- TyCon: mightBeUnsaturatedTyCon :: TyCon -> Bool
- TyCon: tcFlavourCanBeUnsaturated :: TyConFlavour -> Bool
- TyCon: tcTyConUserTyVars :: TyCon -> SDoc
- Type: ClassPred :: Class -> [Type] -> PredTree
- Type: EqPred :: EqRel -> Type -> Type -> PredTree
- Type: ForAllPred :: [TyCoVarBinder] -> [PredType] -> PredType -> PredTree
- Type: IrredPred :: PredType -> PredTree
- Type: NomEq :: EqRel
- Type: PprPrec :: Int -> PprPrec
- Type: ReprEq :: EqRel
- Type: [tcm_smart] :: TyCoMapper env m -> Bool
- Type: appPrec :: PprPrec
- Type: caseBinder :: TyCoBinder -> (TyCoVarBinder -> a) -> (Type -> a) -> a
- Type: classifyPredType :: PredType -> PredTree
- Type: dVarSetElemsWellScoped :: DVarSet -> [Var]
- Type: data EqRel
- Type: data PredTree
- Type: eqRelRole :: EqRel -> Role
- Type: equalityTyCon :: Role -> TyCon
- Type: funPrec :: PprPrec
- Type: getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- Type: getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
- Type: getEqPredRole :: PredType -> Role
- Type: getEqPredTys :: PredType -> (Type, Type)
- Type: getEqPredTys_maybe :: PredType -> Maybe (Role, Type, Type)
- Type: instance GHC.Classes.Eq Type.EqRel
- Type: instance GHC.Classes.Ord Type.EqRel
- Type: instance Outputable.Outputable Type.EqRel
- Type: isCTupleClass :: Class -> Bool
- Type: isClassPred :: PredType -> Bool
- Type: isDictLikeTy :: Type -> Bool
- Type: isDictTy :: Type -> Bool
- Type: isEqPred :: PredType -> Bool
- Type: isEvVarType :: Type -> Bool
- Type: isIPClass :: Class -> Bool
- Type: isIPPred :: PredType -> Bool
- Type: isIPPred_maybe :: Type -> Maybe (FastString, Type)
- Type: isIPTyCon :: TyCon -> Bool
- Type: isNomEqPred :: PredType -> Bool
- Type: maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- Type: mkClassPred :: Class -> [Type] -> PredType
- Type: mkFunTy :: Type -> Type -> Type
- Type: mkFunTys :: [Type] -> Type -> Type
- Type: mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- Type: mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
- Type: mkPrimEqPred :: Type -> Type -> Type
- Type: mkPrimEqPredRole :: Role -> Type -> Type -> PredType
- Type: mkReprPrimEqPred :: Type -> Type -> Type
- Type: mkTyCoPiTy :: TyCoBinder -> Type -> Type
- Type: mkTyCoPiTys :: [TyCoBinder] -> Type -> Type
- Type: newtype PprPrec
- Type: opPrec :: PprPrec
- Type: pprClassPred :: Class -> [Type] -> SDoc
- Type: pprForAll :: [TyCoVarBinder] -> SDoc
- Type: pprKind :: Kind -> SDoc
- Type: pprParendKind :: Kind -> SDoc
- Type: pprParendType :: Type -> SDoc
- Type: pprPrecType :: PprPrec -> Type -> SDoc
- Type: pprShortTyThing :: TyThing -> SDoc
- Type: pprSigmaType :: Type -> SDoc
- Type: pprSourceTyCon :: TyCon -> SDoc
- Type: pprTCvBndr :: TyCoVarBinder -> SDoc
- Type: pprTCvBndrs :: [TyCoVarBinder] -> SDoc
- Type: pprTheta :: ThetaType -> SDoc
- Type: pprThetaArrowTy :: ThetaType -> SDoc
- Type: pprTyThingCategory :: TyThing -> SDoc
- Type: pprTyVar :: TyVar -> SDoc
- Type: pprTyVars :: [TyVar] -> SDoc
- Type: pprType :: Type -> SDoc
- Type: pprTypeApp :: TyCon -> [Type] -> SDoc
- Type: pprUserForAll :: [TyCoVarBinder] -> SDoc
- Type: pprWithExplicitKindsWhen :: Bool -> SDoc -> SDoc
- Type: pprWithTYPE :: Type -> SDoc
- Type: predTypeEqRel :: PredType -> EqRel
- Type: sigPrec :: PprPrec
- Type: splitCoercionType_maybe :: Type -> Maybe (Type, Type)
- Type: tcRepSplitTyConApp :: HasCallStack => Type -> (TyCon, [Type])
- Type: tcRepSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])
- Type: topPrec :: PprPrec
- Type: tyCoVarsOfBindersWellScoped :: [TyVar] -> [TyVar]
- TysWiredIn: mkForAllKind :: TyCoVar -> ArgFlag -> Kind -> Kind
- TysWiredIn: mkFunKind :: Kind -> Kind -> Kind
- UniqSupply: getUniqueSupplyM3 :: MonadUnique m => m (UniqSupply, UniqSupply, UniqSupply)
- UniqSupply: lazyMapUs :: (a -> UniqSM b) -> [a] -> UniqSM [b]
- UniqSupply: lazyThenUs :: UniqSM a -> (a -> UniqSM b) -> UniqSM b
- UniqSupply: liftUs :: MonadUnique m => UniqSM a -> m a
- UniqSupply: splitUniqSupply3 :: UniqSupply -> (UniqSupply, UniqSupply, UniqSupply)
- UniqSupply: splitUniqSupply4 :: UniqSupply -> (UniqSupply, UniqSupply, UniqSupply, UniqSupply)
- Util: maybeRead :: Read a => String -> Maybe a
- Util: maybeReadFuzzy :: Read a => String -> Maybe a
- Util: nOfThem :: Int -> a -> [a]
- Util: ncgDebugIsOn :: Bool
- X86.Instr: GABS :: Format -> Reg -> Reg -> Instr
- X86.Instr: GADD :: Format -> Reg -> Reg -> Reg -> Instr
- X86.Instr: GCMP :: Cond -> Reg -> Reg -> Instr
- X86.Instr: GCOS :: Format -> CLabel -> CLabel -> Reg -> Reg -> Instr
- X86.Instr: GDIV :: Format -> Reg -> Reg -> Reg -> Instr
- X86.Instr: GDTOF :: Reg -> Reg -> Instr
- X86.Instr: GDTOI :: Reg -> Reg -> Instr
- X86.Instr: GFREE :: Instr
- X86.Instr: GFTOI :: Reg -> Reg -> Instr
- X86.Instr: GITOD :: Reg -> Reg -> Instr
- X86.Instr: GITOF :: Reg -> Reg -> Instr
- X86.Instr: GLD :: Format -> AddrMode -> Reg -> Instr
- X86.Instr: GLD1 :: Reg -> Instr
- X86.Instr: GLDZ :: Reg -> Instr
- X86.Instr: GMOV :: Reg -> Reg -> Instr
- X86.Instr: GMUL :: Format -> Reg -> Reg -> Reg -> Instr
- X86.Instr: GNEG :: Format -> Reg -> Reg -> Instr
- X86.Instr: GSIN :: Format -> CLabel -> CLabel -> Reg -> Reg -> Instr
- X86.Instr: GSQRT :: Format -> Reg -> Reg -> Instr
- X86.Instr: GST :: Format -> Reg -> AddrMode -> Instr
- X86.Instr: GSUB :: Format -> Reg -> Reg -> Reg -> Instr
- X86.Instr: GTAN :: Format -> CLabel -> CLabel -> Reg -> Reg -> Instr
- X86.Instr: i386_insert_ffrees :: [GenBasicBlock Instr] -> [GenBasicBlock Instr]
- X86.Regs: fake0 :: Reg
- X86.Regs: fake1 :: Reg
- X86.Regs: fake2 :: Reg
- X86.Regs: fake3 :: Reg
- X86.Regs: fake4 :: Reg
- X86.Regs: fake5 :: Reg
- X86.Regs: firstfake :: RegNo
+ Bag: instance Data.Traversable.Traversable Bag.Bag
+ BasicTypes: KindLevel :: TypeOrKind
+ BasicTypes: TypeLevel :: TypeOrKind
+ BasicTypes: alignmentBytes :: Alignment -> Int
+ BasicTypes: alignmentOf :: Int -> Alignment
+ BasicTypes: data Alignment
+ BasicTypes: data TypeOrKind
+ BasicTypes: instance GHC.Classes.Eq BasicTypes.Alignment
+ BasicTypes: instance GHC.Classes.Eq BasicTypes.TypeOrKind
+ BasicTypes: instance GHC.Classes.Ord BasicTypes.Alignment
+ BasicTypes: instance Outputable.Outputable BasicTypes.Alignment
+ BasicTypes: instance Outputable.Outputable BasicTypes.TupleSort
+ BasicTypes: instance Outputable.Outputable BasicTypes.TypeOrKind
+ BasicTypes: isKindLevel :: TypeOrKind -> Bool
+ BasicTypes: isTypeLevel :: TypeOrKind -> Bool
+ BasicTypes: mkAlignment :: Int -> Alignment
+ BinIface: BinDictionary :: !FastMutInt -> !IORef (UniqFM (Int, FastString)) -> BinDictionary
+ BinIface: BinSymbolTable :: !FastMutInt -> !IORef (UniqFM (Int, Name)) -> BinSymbolTable
+ BinIface: [bin_dict_map] :: BinDictionary -> !IORef (UniqFM (Int, FastString))
+ BinIface: [bin_dict_next] :: BinDictionary -> !FastMutInt
+ BinIface: [bin_symtab_map] :: BinSymbolTable -> !IORef (UniqFM (Int, Name))
+ BinIface: [bin_symtab_next] :: BinSymbolTable -> !FastMutInt
+ BinIface: data BinDictionary
+ BinIface: data BinSymbolTable
+ BinIface: getSymbolTable :: BinHandle -> NameCacheUpdater -> IO SymbolTable
+ BinIface: putDictionary :: BinHandle -> Int -> UniqFM (Int, FastString) -> IO ()
+ BinIface: putFastString :: BinDictionary -> BinHandle -> FastString -> IO ()
+ BinIface: putName :: BinDictionary -> BinSymbolTable -> BinHandle -> Name -> IO ()
+ BinIface: putSymbolTable :: BinHandle -> Int -> UniqFM (Int, Name) -> IO ()
+ Binary: getSLEB128 :: forall a. (Show a, Integral a, FiniteBits a) => BinHandle -> IO a
+ Binary: getULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> IO a
+ Binary: instance (GHC.Ix.Ix a, Binary.Binary a, Binary.Binary b) => Binary.Binary (GHC.Arr.Array a b)
+ Binary: putSLEB128 :: forall a. (Integral a, Bits a) => BinHandle -> a -> IO ()
+ Binary: putULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> a -> IO ()
+ CFG: [trans_cmmNode] :: TransitionSource -> CmmNode O C
+ CFG: [trans_info] :: TransitionSource -> BranchInfo
+ CFG: [weightToDouble] :: EdgeWeight -> Double
+ CFG: delNode :: BlockId -> CFG -> CFG
+ CFG: instance GHC.Classes.Eq CFG.BranchInfo
+ CFG: instance GHC.Real.Fractional CFG.EdgeWeight
+ CFG: instance Hoopl.Graph.NonLocal CFG.BlockNode
+ CFG: instance Outputable.Outputable CFG.BranchInfo
+ CFG: instance Outputable.Outputable CFG.LoopInfo
+ CFG: loopInfo :: HasDebugCallStack => CFG -> BlockId -> LoopInfo
+ CFG: loopLevels :: CFG -> BlockId -> LabelMap Int
+ CFG: mkGlobalWeights :: HasDebugCallStack => BlockId -> CFG -> (LabelMap Double, LabelMap (LabelMap Double))
+ CFG: setEdgeWeight :: CFG -> EdgeWeight -> BlockId -> BlockId -> CFG
+ CLabel: mayRedirectTo :: CLabel -> CLabel -> Bool
+ CLabel: mkNonmovingWriteBarrierEnabledLabel :: CLabel
+ CPrim: bRevLabel :: Width -> String
+ CliOption: FileOption :: String -> String -> Option
+ CliOption: Option :: String -> Option
+ CliOption: data Option
+ CliOption: instance GHC.Classes.Eq CliOption.Option
+ CliOption: showOpt :: Option -> String
+ ClsInst: BuiltinEqInstance :: InstanceWhat
+ ClsInst: instanceReturnsDictCon :: InstanceWhat -> Bool
+ CmmExpr: cmmExprAlignment :: CmmExpr -> Alignment
+ CmmMachOp: MO_BRev :: Width -> CallishMachOp
+ CmmMachOp: MO_F32_ExpM1 :: CallishMachOp
+ CmmMachOp: MO_F32_Log1P :: CallishMachOp
+ CmmMachOp: MO_F64_ExpM1 :: CallishMachOp
+ CmmMachOp: MO_F64_Log1P :: CallishMachOp
+ CmmUtils: cmmMkAssign :: DynFlags -> CmmExpr -> Unique -> (CmmNode O O, CmmExpr)
+ Coercion: coToMCo :: Coercion -> MCoercion
+ Coercion: isGReflMCo :: MCoercion -> Bool
+ Coercion: mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
+ Coercion: mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
+ Coercion: mkPrimEqPred :: Type -> Type -> Type
+ Coercion: mkPrimEqPredRole :: Role -> Type -> Type -> PredType
+ Coercion: mkReprPrimEqPred :: Type -> Type -> Type
+ Constraint: CDictCan :: CtEvidence -> Class -> [Xi] -> Bool -> Ct
+ Constraint: CFunEqCan :: CtEvidence -> TyCon -> [Xi] -> TcTyVar -> Ct
+ Constraint: CHoleCan :: CtEvidence -> Hole -> Ct
+ Constraint: CIrredCan :: CtEvidence -> Bool -> Ct
+ Constraint: CNonCanonical :: CtEvidence -> Ct
+ Constraint: CQuantCan :: QCInst -> Ct
+ Constraint: CTyEqCan :: CtEvidence -> TcTyVar -> TcType -> EqRel -> Ct
+ Constraint: CtDerived :: TcPredType -> CtLoc -> CtEvidence
+ Constraint: CtGiven :: TcPredType -> EvVar -> CtLoc -> CtEvidence
+ Constraint: CtLoc :: CtOrigin -> TcLclEnv -> Maybe TypeOrKind -> !SubGoalDepth -> CtLoc
+ Constraint: CtWanted :: TcPredType -> TcEvDest -> ShadowInfo -> CtLoc -> CtEvidence
+ Constraint: Derived :: CtFlavour
+ Constraint: EvVarDest :: EvVar -> TcEvDest
+ Constraint: ExprHole :: UnboundVar -> Hole
+ Constraint: Given :: CtFlavour
+ Constraint: HoleDest :: CoercionHole -> TcEvDest
+ Constraint: IC_BadTelescope :: ImplicStatus
+ Constraint: IC_Insoluble :: ImplicStatus
+ Constraint: IC_Solved :: [EvVar] -> ImplicStatus
+ Constraint: IC_Unsolved :: ImplicStatus
+ Constraint: Implic :: TcLevel -> [TcTyVar] -> SkolemInfo -> Maybe SDoc -> [EvVar] -> Bool -> Bool -> TcLclEnv -> WantedConstraints -> EvBindsVar -> VarSet -> VarSet -> ImplicStatus -> Implication
+ Constraint: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> Bool -> QCInst
+ Constraint: TypeHole :: OccName -> Hole
+ Constraint: WC :: Cts -> Bag Implication -> WantedConstraints
+ Constraint: WDeriv :: ShadowInfo
+ Constraint: WOnly :: ShadowInfo
+ Constraint: Wanted :: ShadowInfo -> CtFlavour
+ Constraint: [cc_class] :: Ct -> Class
+ Constraint: [cc_eq_rel] :: Ct -> EqRel
+ Constraint: [cc_ev] :: Ct -> CtEvidence
+ Constraint: [cc_fsk] :: Ct -> TcTyVar
+ Constraint: [cc_fun] :: Ct -> TyCon
+ Constraint: [cc_hole] :: Ct -> Hole
+ Constraint: [cc_insol] :: Ct -> Bool
+ Constraint: [cc_pend_sc] :: Ct -> Bool
+ Constraint: [cc_rhs] :: Ct -> TcType
+ Constraint: [cc_tyargs] :: Ct -> [Xi]
+ Constraint: [cc_tyvar] :: Ct -> TcTyVar
+ Constraint: [ctev_dest] :: CtEvidence -> TcEvDest
+ Constraint: [ctev_evar] :: CtEvidence -> EvVar
+ Constraint: [ctev_loc] :: CtEvidence -> CtLoc
+ Constraint: [ctev_nosh] :: CtEvidence -> ShadowInfo
+ Constraint: [ctev_pred] :: CtEvidence -> TcPredType
+ Constraint: [ctl_depth] :: CtLoc -> !SubGoalDepth
+ Constraint: [ctl_env] :: CtLoc -> TcLclEnv
+ Constraint: [ctl_origin] :: CtLoc -> CtOrigin
+ Constraint: [ctl_t_or_k] :: CtLoc -> Maybe TypeOrKind
+ Constraint: [ic_binds] :: Implication -> EvBindsVar
+ Constraint: [ic_env] :: Implication -> TcLclEnv
+ Constraint: [ic_given] :: Implication -> [EvVar]
+ Constraint: [ic_info] :: Implication -> SkolemInfo
+ Constraint: [ic_need_inner] :: Implication -> VarSet
+ Constraint: [ic_need_outer] :: Implication -> VarSet
+ Constraint: [ic_no_eqs] :: Implication -> Bool
+ Constraint: [ic_skols] :: Implication -> [TcTyVar]
+ Constraint: [ic_status] :: Implication -> ImplicStatus
+ Constraint: [ic_tclvl] :: Implication -> TcLevel
+ Constraint: [ic_telescope] :: Implication -> Maybe SDoc
+ Constraint: [ic_wanted] :: Implication -> WantedConstraints
+ Constraint: [ic_warn_inaccessible] :: Implication -> Bool
+ Constraint: [ics_dead] :: ImplicStatus -> [EvVar]
+ Constraint: [qci_ev] :: QCInst -> CtEvidence
+ Constraint: [qci_pend_sc] :: QCInst -> Bool
+ Constraint: [qci_pred] :: QCInst -> TcPredType
+ Constraint: [qci_tvs] :: QCInst -> [TcTyVar]
+ Constraint: [wc_impl] :: WantedConstraints -> Bag Implication
+ Constraint: [wc_simple] :: WantedConstraints -> Cts
+ Constraint: addImplics :: WantedConstraints -> Bag Implication -> WantedConstraints
+ Constraint: addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints
+ Constraint: addSimples :: WantedConstraints -> Bag Ct -> WantedConstraints
+ Constraint: andCts :: Cts -> Cts -> Cts
+ Constraint: andManyCts :: [Cts] -> Cts
+ Constraint: andWC :: WantedConstraints -> WantedConstraints -> WantedConstraints
+ Constraint: arisesFromGivens :: Ct -> Bool
+ Constraint: bumpCtLocDepth :: CtLoc -> CtLoc
+ Constraint: bumpSubGoalDepth :: SubGoalDepth -> SubGoalDepth
+ Constraint: consCts :: Ct -> Cts -> Cts
+ Constraint: ctEqRel :: Ct -> EqRel
+ Constraint: ctEvCoercion :: HasDebugCallStack => CtEvidence -> TcCoercion
+ Constraint: ctEvEqRel :: CtEvidence -> EqRel
+ Constraint: ctEvEvId :: CtEvidence -> EvVar
+ Constraint: ctEvExpr :: CtEvidence -> EvExpr
+ Constraint: ctEvFlavour :: CtEvidence -> CtFlavour
+ Constraint: ctEvFlavourRole :: CtEvidence -> CtFlavourRole
+ Constraint: ctEvId :: Ct -> EvVar
+ Constraint: ctEvLoc :: CtEvidence -> CtLoc
+ Constraint: ctEvOrigin :: CtEvidence -> CtOrigin
+ Constraint: ctEvPred :: CtEvidence -> TcPredType
+ Constraint: ctEvRole :: CtEvidence -> Role
+ Constraint: ctEvTerm :: CtEvidence -> EvTerm
+ Constraint: ctEvidence :: Ct -> CtEvidence
+ Constraint: ctFlavour :: Ct -> CtFlavour
+ Constraint: ctFlavourRole :: Ct -> CtFlavourRole
+ Constraint: ctLoc :: Ct -> CtLoc
+ Constraint: ctLocDepth :: CtLoc -> SubGoalDepth
+ Constraint: ctLocEnv :: CtLoc -> TcLclEnv
+ Constraint: ctLocLevel :: CtLoc -> TcLevel
+ Constraint: ctLocOrigin :: CtLoc -> CtOrigin
+ Constraint: ctLocSpan :: CtLoc -> RealSrcSpan
+ Constraint: ctLocTypeOrKind_maybe :: CtLoc -> Maybe TypeOrKind
+ Constraint: ctOrigin :: Ct -> CtOrigin
+ Constraint: ctPred :: Ct -> PredType
+ Constraint: ctsElts :: Cts -> [Ct]
+ Constraint: data Ct
+ Constraint: data CtEvidence
+ Constraint: data CtFlavour
+ Constraint: data CtLoc
+ Constraint: data Hole
+ Constraint: data ImplicStatus
+ Constraint: data Implication
+ Constraint: data QCInst
+ Constraint: data ShadowInfo
+ Constraint: data SubGoalDepth
+ Constraint: data TcEvDest
+ Constraint: data WantedConstraints
+ Constraint: dropDerivedSimples :: Cts -> Cts
+ Constraint: dropDerivedWC :: WantedConstraints -> WantedConstraints
+ Constraint: emptyCts :: Cts
+ Constraint: emptyWC :: WantedConstraints
+ Constraint: eqCanDischargeFR :: CtFlavourRole -> CtFlavourRole -> Bool
+ Constraint: eqCanRewrite :: EqRel -> EqRel -> Bool
+ Constraint: eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
+ Constraint: eqMayRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
+ Constraint: extendCtsList :: Cts -> [Ct] -> Cts
+ Constraint: funEqCanDischarge :: CtEvidence -> CtEvidence -> (SwapFlag, Bool)
+ Constraint: funEqCanDischargeF :: CtFlavour -> CtFlavour -> (SwapFlag, Bool)
+ Constraint: getPendingWantedScs :: Cts -> ([Ct], Cts)
+ Constraint: getUserTypeErrorMsg :: Ct -> Maybe Type
+ Constraint: holeOcc :: Hole -> OccName
+ Constraint: implicationPrototype :: Implication
+ Constraint: initialSubGoalDepth :: SubGoalDepth
+ Constraint: insolubleCt :: Ct -> Bool
+ Constraint: insolubleEqCt :: Ct -> Bool
+ Constraint: insolubleImplic :: Implication -> Bool
+ Constraint: insolubleWC :: WantedConstraints -> Bool
+ Constraint: insolublesOnly :: WantedConstraints -> WantedConstraints
+ Constraint: instance GHC.Classes.Eq Constraint.CtFlavour
+ Constraint: instance GHC.Classes.Eq Constraint.ShadowInfo
+ Constraint: instance GHC.Classes.Eq Constraint.SubGoalDepth
+ Constraint: instance GHC.Classes.Ord Constraint.SubGoalDepth
+ Constraint: instance Outputable.Outputable Constraint.Ct
+ Constraint: instance Outputable.Outputable Constraint.CtEvidence
+ Constraint: instance Outputable.Outputable Constraint.CtFlavour
+ Constraint: instance Outputable.Outputable Constraint.Hole
+ Constraint: instance Outputable.Outputable Constraint.ImplicStatus
+ Constraint: instance Outputable.Outputable Constraint.Implication
+ Constraint: instance Outputable.Outputable Constraint.QCInst
+ Constraint: instance Outputable.Outputable Constraint.SubGoalDepth
+ Constraint: instance Outputable.Outputable Constraint.TcEvDest
+ Constraint: instance Outputable.Outputable Constraint.WantedConstraints
+ Constraint: isCDictCan_Maybe :: Ct -> Maybe Class
+ Constraint: isCFunEqCan :: Ct -> Bool
+ Constraint: isCFunEqCan_maybe :: Ct -> Maybe (TyCon, [Type])
+ Constraint: isCNonCanonical :: Ct -> Bool
+ Constraint: isCTyEqCan :: Ct -> Bool
+ Constraint: isDerived :: CtEvidence -> Bool
+ Constraint: isDerivedCt :: Ct -> Bool
+ Constraint: isDroppableCt :: Ct -> Bool
+ Constraint: isEmptyCts :: Cts -> Bool
+ Constraint: isEmptyWC :: WantedConstraints -> Bool
+ Constraint: isExprHoleCt :: Ct -> Bool
+ Constraint: isGiven :: CtEvidence -> Bool
+ Constraint: isGivenCt :: Ct -> Bool
+ Constraint: isGivenLoc :: CtLoc -> Bool
+ Constraint: isGivenOrWDeriv :: CtFlavour -> Bool
+ Constraint: isHoleCt :: Ct -> Bool
+ Constraint: isInsolubleStatus :: ImplicStatus -> Bool
+ Constraint: isOutOfScopeCt :: Ct -> Bool
+ Constraint: isPendingScDict :: Ct -> Maybe Ct
+ Constraint: isPendingScInst :: QCInst -> Maybe QCInst
+ Constraint: isSolvedStatus :: ImplicStatus -> Bool
+ Constraint: isSolvedWC :: WantedConstraints -> Bool
+ Constraint: isTypeHoleCt :: Ct -> Bool
+ Constraint: isUserTypeErrorCt :: Ct -> Bool
+ Constraint: isWanted :: CtEvidence -> Bool
+ Constraint: isWantedCt :: Ct -> Bool
+ Constraint: listToCts :: [Ct] -> Cts
+ Constraint: maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth
+ Constraint: mkGivenLoc :: TcLevel -> SkolemInfo -> TcLclEnv -> CtLoc
+ Constraint: mkGivens :: CtLoc -> [EvId] -> [Ct]
+ Constraint: mkImplicWC :: Bag Implication -> WantedConstraints
+ Constraint: mkInsolubleCt :: CtEvidence -> Ct
+ Constraint: mkIrredCt :: CtEvidence -> Ct
+ Constraint: mkKindLoc :: TcType -> TcType -> CtLoc -> CtLoc
+ Constraint: mkNonCanonical :: CtEvidence -> Ct
+ Constraint: mkNonCanonicalCt :: Ct -> Ct
+ Constraint: mkSimpleWC :: [CtEvidence] -> WantedConstraints
+ Constraint: mkTcEqPredLikeEv :: CtEvidence -> TcType -> TcType -> TcType
+ Constraint: pprCtLoc :: CtLoc -> SDoc
+ Constraint: pprCts :: Cts -> SDoc
+ Constraint: pprEvVarTheta :: [EvVar] -> SDoc
+ Constraint: pprEvVarWithType :: EvVar -> SDoc
+ Constraint: pprEvVars :: [EvVar] -> SDoc
+ Constraint: setCtLoc :: Ct -> CtLoc -> Ct
+ Constraint: setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc
+ Constraint: setCtLocOrigin :: CtLoc -> CtOrigin -> CtLoc
+ Constraint: setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc
+ Constraint: singleCt :: Ct -> Cts
+ Constraint: snocCts :: Cts -> Ct -> Cts
+ Constraint: subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool
+ Constraint: superClassesMightHelp :: WantedConstraints -> Bool
+ Constraint: toKindLoc :: CtLoc -> CtLoc
+ Constraint: tyCoVarsOfCt :: Ct -> TcTyCoVarSet
+ Constraint: tyCoVarsOfCtList :: Ct -> [TcTyCoVar]
+ Constraint: tyCoVarsOfCts :: Cts -> TcTyCoVarSet
+ Constraint: tyCoVarsOfCtsList :: Cts -> [TcTyCoVar]
+ Constraint: tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet
+ Constraint: tyCoVarsOfWCList :: WantedConstraints -> [TyCoVar]
+ Constraint: type CtFlavourRole = (CtFlavour, EqRel)
+ Constraint: type Cts = Bag Ct
+ Constraint: type Xi = Type
+ Constraint: unionsWC :: [WantedConstraints] -> WantedConstraints
+ Constraint: updateCtLocOrigin :: CtLoc -> (CtOrigin -> CtOrigin) -> CtLoc
+ Constraint: wrapType :: Type -> [TyVar] -> [PredType] -> Type
+ Constraint: wrapTypeWithImplication :: Type -> Implication -> Type
+ CoreMonad: getUniqMask :: CoreM Char
+ CoreToStg: instance DynFlags.HasDynFlags CoreToStg.CtsM
+ CoreUtils: mkDefaultCase :: CoreExpr -> Id -> CoreExpr -> CoreExpr
+ CoreUtils: mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
+ Demand: ensureArgs :: Arity -> DmdType -> DmdType
+ Demand: mkCallDmds :: Arity -> CleanDemand -> CleanDemand
+ Demand: mkStrictSigForArity :: Arity -> DmdType -> StrictSig
+ Demand: peelTsFuns :: Arity -> TypeShape -> Maybe TypeShape
+ Dominators: ancestors :: Tree a -> [(a, [a])]
+ Dominators: asGraph :: Tree Node -> Rooted
+ Dominators: asTree :: Rooted -> Tree Node
+ Dominators: dom :: Rooted -> [(Node, Path)]
+ Dominators: domTree :: Rooted -> Tree Node
+ Dominators: fromAdj :: [(Node, [Node])] -> Graph
+ Dominators: fromEdges :: [Edge] -> Graph
+ Dominators: idom :: Rooted -> [(Node, Node)]
+ Dominators: instance GHC.Base.Applicative (Dominators.S z s)
+ Dominators: instance GHC.Base.Functor (Dominators.S z s)
+ Dominators: instance GHC.Base.Monad (Dominators.S z s)
+ Dominators: ipdom :: Rooted -> [(Node, Node)]
+ Dominators: parents :: Tree a -> [(a, a)]
+ Dominators: pddfs :: Rooted -> [Node]
+ Dominators: pdom :: Rooted -> [(Node, Path)]
+ Dominators: pdomTree :: Rooted -> Tree Node
+ Dominators: rpddfs :: Rooted -> [Node]
+ Dominators: toAdj :: Graph -> [(Node, [Node])]
+ Dominators: toEdges :: Graph -> [Edge]
+ Dominators: type Edge = (Node, Node)
+ Dominators: type Graph = IntMap IntSet
+ Dominators: type Node = Int
+ Dominators: type Path = [Node]
+ Dominators: type Rooted = (Node, Graph)
+ DriverPipeline: [iface] :: PipeState -> Maybe ModIface
+ DriverPipeline: doCpp :: DynFlags -> Bool -> FilePath -> FilePath -> IO ()
+ DsMonad: getPmDelta :: DsM Delta
+ DsMonad: updPmDelta :: Delta -> DsM a -> DsM a
+ DynFlags: FileSettings :: FilePath -> FilePath -> Maybe FilePath -> FilePath -> String -> FilePath -> FileSettings
+ DynFlags: GhcNameVersion :: String -> String -> GhcNameVersion
+ DynFlags: IntegerGMP :: IntegerLibrary
+ DynFlags: IntegerSimple :: IntegerLibrary
+ DynFlags: LlvmConfig :: [(String, LlvmTarget)] -> [(Int, String)] -> LlvmConfig
+ DynFlags: Opt_ByteCode :: GeneralFlag
+ DynFlags: Opt_D_dump_cmm_verbose_by_proc :: DumpFlag
+ DynFlags: Opt_D_dump_stg_final :: DumpFlag
+ DynFlags: Opt_D_dump_stg_unarised :: DumpFlag
+ DynFlags: Opt_DeferDiagnostics :: GeneralFlag
+ DynFlags: Opt_EnableThSpliceWarnings :: GeneralFlag
+ DynFlags: Opt_KeepGoing :: GeneralFlag
+ DynFlags: Opt_NoTypeableBinds :: GeneralFlag
+ DynFlags: Opt_PluginTrustworthy :: GeneralFlag
+ DynFlags: Opt_PrintAxiomIncomps :: GeneralFlag
+ DynFlags: Opt_WarnCompatUnqualifiedImports :: WarningFlag
+ DynFlags: Opt_WarnDerivingDefaults :: WarningFlag
+ DynFlags: Opt_WarnInferredSafeImports :: WarningFlag
+ DynFlags: Opt_WarnMissingSafeHaskellMode :: WarningFlag
+ DynFlags: Opt_WarnPrepositiveQualifiedModule :: WarningFlag
+ DynFlags: Opt_WarnRedundantRecordWildcards :: WarningFlag
+ DynFlags: Opt_WarnUnusedPackages :: WarningFlag
+ DynFlags: Opt_WarnUnusedRecordWildcards :: WarningFlag
+ DynFlags: PlatformMisc :: String -> String -> IntegerLibrary -> Bool -> Bool -> Bool -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> String -> PlatformMisc
+ DynFlags: Sf_SafeInferred :: SafeHaskellMode
+ DynFlags: [binBlobThreshold] :: DynFlags -> Word
+ DynFlags: [depIncludeCppDeps] :: DynFlags -> Bool
+ DynFlags: [fileSettings] :: DynFlags -> {-# UNPACK #-} !FileSettings
+ DynFlags: [fileSettings_ghcUsagePath] :: FileSettings -> FilePath
+ DynFlags: [fileSettings_ghciUsagePath] :: FileSettings -> FilePath
+ DynFlags: [fileSettings_systemPackageConfig] :: FileSettings -> FilePath
+ DynFlags: [fileSettings_tmpDir] :: FileSettings -> String
+ DynFlags: [fileSettings_toolDir] :: FileSettings -> Maybe FilePath
+ DynFlags: [fileSettings_topDir] :: FileSettings -> FilePath
+ DynFlags: [ghcNameVersion] :: DynFlags -> {-# UNPACK #-} !GhcNameVersion
+ DynFlags: [ghcNameVersion_programName] :: GhcNameVersion -> String
+ DynFlags: [ghcNameVersion_projectVersion] :: GhcNameVersion -> String
+ DynFlags: [llvmConfig] :: DynFlags -> LlvmConfig
+ DynFlags: [maxPmCheckModels] :: DynFlags -> Int
+ DynFlags: [platformConstants] :: DynFlags -> PlatformConstants
+ DynFlags: [platformMisc] :: DynFlags -> {-# UNPACK #-} !PlatformMisc
+ DynFlags: [platformMisc_ghcDebugged] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_ghcRTSWays] :: PlatformMisc -> String
+ DynFlags: [platformMisc_ghcRtsWithLibdw] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_ghcThreaded] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_ghcWithInterpreter] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_ghcWithNativeCodeGen] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_ghcWithSMP] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_integerLibraryType] :: PlatformMisc -> IntegerLibrary
+ DynFlags: [platformMisc_integerLibrary] :: PlatformMisc -> String
+ DynFlags: [platformMisc_leadingUnderscore] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_libFFI] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_llvmTarget] :: PlatformMisc -> String
+ DynFlags: [platformMisc_tablesNextToCode] :: PlatformMisc -> Bool
+ DynFlags: [platformMisc_targetPlatformString] :: PlatformMisc -> String
+ DynFlags: [rawSettings] :: DynFlags -> [(String, String)]
+ DynFlags: [sFileSettings] :: Settings -> {-# UNPACK #-} !FileSettings
+ DynFlags: [sGhcNameVersion] :: Settings -> {-# UNPACK #-} !GhcNameVersion
+ DynFlags: [sPlatformMisc] :: Settings -> {-# UNPACK #-} !PlatformMisc
+ DynFlags: [sToolSettings] :: Settings -> {-# UNPACK #-} !ToolSettings
+ DynFlags: [targetPlatform] :: DynFlags -> Platform
+ DynFlags: [toolSettings] :: DynFlags -> {-# UNPACK #-} !ToolSettings
+ DynFlags: data FileSettings
+ DynFlags: data GhcNameVersion
+ DynFlags: data IntegerLibrary
+ DynFlags: data LlvmConfig
+ DynFlags: data PlatformMisc
+ DynFlags: dynamicOutputFile :: DynFlags -> FilePath -> FilePath
+ DynFlags: opt_cxx :: DynFlags -> [String]
+ DynFlags: sExtraGccViaCFlags :: Settings -> [String]
+ DynFlags: sGccSupportsNoPie :: Settings -> Bool
+ DynFlags: sGhcDebugged :: Settings -> Bool
+ DynFlags: sGhcRTSWays :: Settings -> String
+ DynFlags: sGhcRtsWithLibdw :: Settings -> Bool
+ DynFlags: sGhcThreaded :: Settings -> Bool
+ DynFlags: sGhcUsagePath :: Settings -> FilePath
+ DynFlags: sGhcWithInterpreter :: Settings -> Bool
+ DynFlags: sGhcWithNativeCodeGen :: Settings -> Bool
+ DynFlags: sGhcWithSMP :: Settings -> Bool
+ DynFlags: sGhciUsagePath :: Settings -> FilePath
+ DynFlags: sIntegerLibrary :: Settings -> String
+ DynFlags: sIntegerLibraryType :: Settings -> IntegerLibrary
+ DynFlags: sLdIsGnuLd :: Settings -> Bool
+ DynFlags: sLdSupportsBuildId :: Settings -> Bool
+ DynFlags: sLdSupportsCompactUnwind :: Settings -> Bool
+ DynFlags: sLdSupportsFilelist :: Settings -> Bool
+ DynFlags: sLeadingUnderscore :: Settings -> Bool
+ DynFlags: sLibFFI :: Settings -> Bool
+ DynFlags: sOpt_F :: Settings -> [String]
+ DynFlags: sOpt_L :: Settings -> [String]
+ DynFlags: sOpt_P :: Settings -> [String]
+ DynFlags: sOpt_P_fingerprint :: Settings -> Fingerprint
+ DynFlags: sOpt_a :: Settings -> [String]
+ DynFlags: sOpt_c :: Settings -> [String]
+ DynFlags: sOpt_cxx :: Settings -> [String]
+ DynFlags: sOpt_i :: Settings -> [String]
+ DynFlags: sOpt_l :: Settings -> [String]
+ DynFlags: sOpt_lc :: Settings -> [String]
+ DynFlags: sOpt_lcc :: Settings -> [String]
+ DynFlags: sOpt_lo :: Settings -> [String]
+ DynFlags: sOpt_windres :: Settings -> [String]
+ DynFlags: sPgm_F :: Settings -> String
+ DynFlags: sPgm_L :: Settings -> String
+ DynFlags: sPgm_P :: Settings -> (String, [Option])
+ DynFlags: sPgm_T :: Settings -> String
+ DynFlags: sPgm_a :: Settings -> (String, [Option])
+ DynFlags: sPgm_ar :: Settings -> String
+ DynFlags: sPgm_c :: Settings -> String
+ DynFlags: sPgm_dll :: Settings -> (String, [Option])
+ DynFlags: sPgm_i :: Settings -> String
+ DynFlags: sPgm_l :: Settings -> (String, [Option])
+ DynFlags: sPgm_lc :: Settings -> (String, [Option])
+ DynFlags: sPgm_lcc :: Settings -> (String, [Option])
+ DynFlags: sPgm_libtool :: Settings -> String
+ DynFlags: sPgm_lo :: Settings -> (String, [Option])
+ DynFlags: sPgm_ranlib :: Settings -> String
+ DynFlags: sPgm_windres :: Settings -> String
+ DynFlags: sProgramName :: Settings -> String
+ DynFlags: sProjectVersion :: Settings -> String
+ DynFlags: sSystemPackageConfig :: Settings -> FilePath
+ DynFlags: sTablesNextToCode :: Settings -> Bool
+ DynFlags: sTargetPlatformString :: Settings -> String
+ DynFlags: sTmpDir :: Settings -> String
+ DynFlags: sToolDir :: Settings -> Maybe FilePath
+ DynFlags: sTopDir :: Settings -> FilePath
+ DynFlags: setFlagsFromEnvFile :: FilePath -> String -> DynP ()
+ DynFlags: settings :: DynFlags -> Settings
+ DynFlags: versionedFilePath :: DynFlags -> FilePath
+ DynFlags: wordAlignment :: DynFlags -> Alignment
+ DynamicLoading: forceLoadModuleInterfaces :: HscEnv -> SDoc -> [Module] -> IO ()
+ DynamicLoading: forceLoadNameModuleInterface :: HscEnv -> SDoc -> Name -> IO ()
+ DynamicLoading: forceLoadTyCon :: HscEnv -> Name -> IO TyCon
+ DynamicLoading: getHValueSafely :: HscEnv -> Name -> Type -> IO (Maybe HValue)
+ DynamicLoading: getValueSafely :: HscEnv -> Name -> Type -> IO (Maybe a)
+ DynamicLoading: lessUnsafeCoerce :: DynFlags -> String -> a -> IO b
+ DynamicLoading: loadFrontendPlugin :: HscEnv -> ModuleName -> IO FrontendPlugin
+ DynamicLoading: lookupRdrNameInModuleForPlugins :: HscEnv -> ModuleName -> RdrName -> IO (Maybe (Name, ModIface))
+ ErrUtils: instance GHC.Classes.Eq ErrUtils.PrintTimings
+ ErrUtils: instance GHC.Show.Show ErrUtils.PrintTimings
+ ErrUtils: warningsToMessages :: DynFlags -> WarningMessages -> Messages
+ ErrUtils: withTimingD :: (MonadIO m, HasDynFlags m) => SDoc -> (a -> ()) -> m a -> m a
+ ErrUtils: withTimingSilent :: MonadIO m => DynFlags -> SDoc -> (a -> ()) -> m a -> m a
+ ErrUtils: withTimingSilentD :: (MonadIO m, HasDynFlags m) => SDoc -> (a -> ()) -> m a -> m a
+ FamInst: reportConflictingInjectivityErrs :: TyCon -> [CoAxBranch] -> CoAxBranch -> TcM ()
+ FamInst: reportInjectivityErrors :: DynFlags -> CoAxiom br -> CoAxBranch -> [Bool] -> TcM ()
+ FastString: [fs_zenc] :: FastString -> FastZString
+ FastString: getFastStringZEncCounter :: IO Int
+ FastString: instance Control.DeepSeq.NFData FastString.FastString
+ FileSettings: FileSettings :: FilePath -> FilePath -> Maybe FilePath -> FilePath -> String -> FilePath -> FileSettings
+ FileSettings: [fileSettings_ghcUsagePath] :: FileSettings -> FilePath
+ FileSettings: [fileSettings_ghciUsagePath] :: FileSettings -> FilePath
+ FileSettings: [fileSettings_systemPackageConfig] :: FileSettings -> FilePath
+ FileSettings: [fileSettings_tmpDir] :: FileSettings -> String
+ FileSettings: [fileSettings_toolDir] :: FileSettings -> Maybe FilePath
+ FileSettings: [fileSettings_topDir] :: FileSettings -> FilePath
+ FileSettings: data FileSettings
+ GHC: Opt_ByteCode :: GeneralFlag
+ GHC: Opt_DeferDiagnostics :: GeneralFlag
+ GHC: Opt_EnableThSpliceWarnings :: GeneralFlag
+ GHC: Opt_KeepGoing :: GeneralFlag
+ GHC: Opt_NoTypeableBinds :: GeneralFlag
+ GHC: Opt_PluginTrustworthy :: GeneralFlag
+ GHC: Opt_PrintAxiomIncomps :: GeneralFlag
+ GHC: Sf_SafeInferred :: SafeHaskellMode
+ GHC: [binBlobThreshold] :: DynFlags -> Word
+ GHC: [depIncludeCppDeps] :: DynFlags -> Bool
+ GHC: [fileSettings] :: DynFlags -> {-# UNPACK #-} !FileSettings
+ GHC: [ghcNameVersion] :: DynFlags -> {-# UNPACK #-} !GhcNameVersion
+ GHC: [llvmConfig] :: DynFlags -> LlvmConfig
+ GHC: [maxPmCheckModels] :: DynFlags -> Int
+ GHC: [mi_final_exts] :: ModIface_ (phase :: ModIfacePhase) -> !IfaceBackendExts phase
+ GHC: [platformConstants] :: DynFlags -> PlatformConstants
+ GHC: [platformMisc] :: DynFlags -> {-# UNPACK #-} !PlatformMisc
+ GHC: [rawSettings] :: DynFlags -> [(String, String)]
+ GHC: [targetPlatform] :: DynFlags -> Platform
+ GHC: [toolSettings] :: DynFlags -> {-# UNPACK #-} !ToolSettings
+ GHC: data ModIface_ (phase :: ModIfacePhase)
+ GHC: getInstancesForType :: GhcMonad m => Type -> m [ClsInst]
+ GHC: parseInstanceHead :: GhcMonad m => String -> m Type
+ GHC: type ModIface = ModIface_ 'ModIfaceFinal
+ GHC.Hs: HsModule :: Maybe (Located ModuleName) -> Maybe (Located [LIE pass]) -> [LImportDecl pass] -> [LHsDecl pass] -> Maybe (Located WarningTxt) -> Maybe LHsDocString -> HsModule pass
+ GHC.Hs: [hsmodDecls] :: HsModule pass -> [LHsDecl pass]
+ GHC.Hs: [hsmodDeprecMessage] :: HsModule pass -> Maybe (Located WarningTxt)
+ GHC.Hs: [hsmodExports] :: HsModule pass -> Maybe (Located [LIE pass])
+ GHC.Hs: [hsmodHaddockModHeader] :: HsModule pass -> Maybe LHsDocString
+ GHC.Hs: [hsmodImports] :: HsModule pass -> [LImportDecl pass]
+ GHC.Hs: [hsmodName] :: HsModule pass -> Maybe (Located ModuleName)
+ GHC.Hs: data Fixity
+ GHC.Hs: data HsModule pass
+ GHC.Hs: instance Data.Data.Data (GHC.Hs.HsModule GHC.Hs.Extension.GhcPs)
+ GHC.Hs: instance Data.Data.Data (GHC.Hs.HsModule GHC.Hs.Extension.GhcRn)
+ GHC.Hs: instance Data.Data.Data (GHC.Hs.HsModule GHC.Hs.Extension.GhcTc)
+ GHC.Hs: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.HsModule (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Binds: ABE :: XABE p -> IdP p -> IdP p -> HsWrapper -> TcSpecPrags -> ABExport p
+ GHC.Hs.Binds: AbsBinds :: XAbsBinds idL idR -> [TyVar] -> [EvVar] -> [ABExport idL] -> [TcEvBinds] -> LHsBinds idL -> Bool -> HsBindLR idL idR
+ GHC.Hs.Binds: ClassOpSig :: XClassOpSig pass -> Bool -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass
+ GHC.Hs.Binds: CompleteMatchSig :: XCompleteMatchSig pass -> SourceText -> Located [Located (IdP pass)] -> Maybe (Located (IdP pass)) -> Sig pass
+ GHC.Hs.Binds: EmptyLocalBinds :: XEmptyLocalBinds idL idR -> HsLocalBindsLR idL idR
+ GHC.Hs.Binds: ExplicitBidirectional :: MatchGroup id (LHsExpr id) -> HsPatSynDir id
+ GHC.Hs.Binds: FixSig :: XFixSig pass -> FixitySig pass -> Sig pass
+ GHC.Hs.Binds: FixitySig :: XFixitySig pass -> [Located (IdP pass)] -> Fixity -> FixitySig pass
+ GHC.Hs.Binds: FunBind :: XFunBind idL idR -> Located (IdP idL) -> MatchGroup idR (LHsExpr idR) -> HsWrapper -> [Tickish Id] -> HsBindLR idL idR
+ GHC.Hs.Binds: HsIPBinds :: XHsIPBinds idL idR -> HsIPBinds idR -> HsLocalBindsLR idL idR
+ GHC.Hs.Binds: HsValBinds :: XHsValBinds idL idR -> HsValBindsLR idL idR -> HsLocalBindsLR idL idR
+ GHC.Hs.Binds: IPBind :: XCIPBind id -> Either (Located HsIPName) (IdP id) -> LHsExpr id -> IPBind id
+ GHC.Hs.Binds: IPBinds :: XIPBinds id -> [LIPBind id] -> HsIPBinds id
+ GHC.Hs.Binds: IdSig :: XIdSig pass -> Id -> Sig pass
+ GHC.Hs.Binds: ImplicitBidirectional :: HsPatSynDir id
+ GHC.Hs.Binds: InlineSig :: XInlineSig pass -> Located (IdP pass) -> InlinePragma -> Sig pass
+ GHC.Hs.Binds: IsDefaultMethod :: TcSpecPrags
+ GHC.Hs.Binds: MinimalSig :: XMinimalSig pass -> SourceText -> LBooleanFormula (Located (IdP pass)) -> Sig pass
+ GHC.Hs.Binds: NPatBindTc :: NameSet -> Type -> NPatBindTc
+ GHC.Hs.Binds: NValBinds :: [(RecFlag, LHsBinds idL)] -> [LSig GhcRn] -> NHsValBindsLR idL
+ GHC.Hs.Binds: PSB :: XPSB idL idR -> Located (IdP idL) -> HsPatSynDetails (Located (IdP idR)) -> LPat idR -> HsPatSynDir idR -> PatSynBind idL idR
+ GHC.Hs.Binds: PatBind :: XPatBind idL idR -> LPat idL -> GRHSs idR (LHsExpr idR) -> ([Tickish Id], [[Tickish Id]]) -> HsBindLR idL idR
+ GHC.Hs.Binds: PatSynBind :: XPatSynBind idL idR -> PatSynBind idL idR -> HsBindLR idL idR
+ GHC.Hs.Binds: PatSynSig :: XPatSynSig pass -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass
+ GHC.Hs.Binds: RecordPatSynField :: a -> a -> RecordPatSynField a
+ GHC.Hs.Binds: SCCFunSig :: XSCCFunSig pass -> SourceText -> Located (IdP pass) -> Maybe (Located StringLiteral) -> Sig pass
+ GHC.Hs.Binds: SpecInstSig :: XSpecInstSig pass -> SourceText -> LHsSigType pass -> Sig pass
+ GHC.Hs.Binds: SpecPrag :: Id -> HsWrapper -> InlinePragma -> TcSpecPrag
+ GHC.Hs.Binds: SpecPrags :: [LTcSpecPrag] -> TcSpecPrags
+ GHC.Hs.Binds: SpecSig :: XSpecSig pass -> Located (IdP pass) -> [LHsSigType pass] -> InlinePragma -> Sig pass
+ GHC.Hs.Binds: TypeSig :: XTypeSig pass -> [Located (IdP pass)] -> LHsSigWcType pass -> Sig pass
+ GHC.Hs.Binds: Unidirectional :: HsPatSynDir id
+ GHC.Hs.Binds: ValBinds :: XValBinds idL idR -> LHsBindsLR idL idR -> [LSig idR] -> HsValBindsLR idL idR
+ GHC.Hs.Binds: VarBind :: XVarBind idL idR -> IdP idL -> LHsExpr idR -> Bool -> HsBindLR idL idR
+ GHC.Hs.Binds: XABExport :: XXABExport p -> ABExport p
+ GHC.Hs.Binds: XFixitySig :: XXFixitySig pass -> FixitySig pass
+ GHC.Hs.Binds: XHsBindsLR :: XXHsBindsLR idL idR -> HsBindLR idL idR
+ GHC.Hs.Binds: XHsIPBinds :: XXHsIPBinds id -> HsIPBinds id
+ GHC.Hs.Binds: XHsLocalBindsLR :: XXHsLocalBindsLR idL idR -> HsLocalBindsLR idL idR
+ GHC.Hs.Binds: XIPBind :: XXIPBind id -> IPBind id
+ GHC.Hs.Binds: XPatSynBind :: XXPatSynBind idL idR -> PatSynBind idL idR
+ GHC.Hs.Binds: XSig :: XXSig pass -> Sig pass
+ GHC.Hs.Binds: XValBindsLR :: XXValBindsLR idL idR -> HsValBindsLR idL idR
+ GHC.Hs.Binds: [abe_ext] :: ABExport p -> XABE p
+ GHC.Hs.Binds: [abe_mono] :: ABExport p -> IdP p
+ GHC.Hs.Binds: [abe_poly] :: ABExport p -> IdP p
+ GHC.Hs.Binds: [abe_prags] :: ABExport p -> TcSpecPrags
+ GHC.Hs.Binds: [abe_wrap] :: ABExport p -> HsWrapper
+ GHC.Hs.Binds: [abs_binds] :: HsBindLR idL idR -> LHsBinds idL
+ GHC.Hs.Binds: [abs_ev_binds] :: HsBindLR idL idR -> [TcEvBinds]
+ GHC.Hs.Binds: [abs_ev_vars] :: HsBindLR idL idR -> [EvVar]
+ GHC.Hs.Binds: [abs_exports] :: HsBindLR idL idR -> [ABExport idL]
+ GHC.Hs.Binds: [abs_ext] :: HsBindLR idL idR -> XAbsBinds idL idR
+ GHC.Hs.Binds: [abs_sig] :: HsBindLR idL idR -> Bool
+ GHC.Hs.Binds: [abs_tvs] :: HsBindLR idL idR -> [TyVar]
+ GHC.Hs.Binds: [fun_co_fn] :: HsBindLR idL idR -> HsWrapper
+ GHC.Hs.Binds: [fun_ext] :: HsBindLR idL idR -> XFunBind idL idR
+ GHC.Hs.Binds: [fun_id] :: HsBindLR idL idR -> Located (IdP idL)
+ GHC.Hs.Binds: [fun_matches] :: HsBindLR idL idR -> MatchGroup idR (LHsExpr idR)
+ GHC.Hs.Binds: [fun_tick] :: HsBindLR idL idR -> [Tickish Id]
+ GHC.Hs.Binds: [pat_ext] :: HsBindLR idL idR -> XPatBind idL idR
+ GHC.Hs.Binds: [pat_fvs] :: NPatBindTc -> NameSet
+ GHC.Hs.Binds: [pat_lhs] :: HsBindLR idL idR -> LPat idL
+ GHC.Hs.Binds: [pat_rhs] :: HsBindLR idL idR -> GRHSs idR (LHsExpr idR)
+ GHC.Hs.Binds: [pat_rhs_ty] :: NPatBindTc -> Type
+ GHC.Hs.Binds: [pat_ticks] :: HsBindLR idL idR -> ([Tickish Id], [[Tickish Id]])
+ GHC.Hs.Binds: [psb_args] :: PatSynBind idL idR -> HsPatSynDetails (Located (IdP idR))
+ GHC.Hs.Binds: [psb_def] :: PatSynBind idL idR -> LPat idR
+ GHC.Hs.Binds: [psb_dir] :: PatSynBind idL idR -> HsPatSynDir idR
+ GHC.Hs.Binds: [psb_ext] :: PatSynBind idL idR -> XPSB idL idR
+ GHC.Hs.Binds: [psb_id] :: PatSynBind idL idR -> Located (IdP idL)
+ GHC.Hs.Binds: [recordPatSynPatVar] :: RecordPatSynField a -> a
+ GHC.Hs.Binds: [recordPatSynSelectorId] :: RecordPatSynField a -> a
+ GHC.Hs.Binds: [var_ext] :: HsBindLR idL idR -> XVarBind idL idR
+ GHC.Hs.Binds: [var_id] :: HsBindLR idL idR -> IdP idL
+ GHC.Hs.Binds: [var_inline] :: HsBindLR idL idR -> Bool
+ GHC.Hs.Binds: [var_rhs] :: HsBindLR idL idR -> LHsExpr idR
+ GHC.Hs.Binds: data ABExport p
+ GHC.Hs.Binds: data FixitySig pass
+ GHC.Hs.Binds: data HsBindLR idL idR
+ GHC.Hs.Binds: data HsIPBinds id
+ GHC.Hs.Binds: data HsLocalBindsLR idL idR
+ GHC.Hs.Binds: data HsPatSynDir id
+ GHC.Hs.Binds: data HsValBindsLR idL idR
+ GHC.Hs.Binds: data IPBind id
+ GHC.Hs.Binds: data NHsValBindsLR idL
+ GHC.Hs.Binds: data NPatBindTc
+ GHC.Hs.Binds: data PatSynBind idL idR
+ GHC.Hs.Binds: data RecordPatSynField a
+ GHC.Hs.Binds: data Sig pass
+ GHC.Hs.Binds: data TcSpecPrag
+ GHC.Hs.Binds: data TcSpecPrags
+ GHC.Hs.Binds: emptyLHsBinds :: LHsBindsLR idL idR
+ GHC.Hs.Binds: emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)
+ GHC.Hs.Binds: emptyValBindsIn :: HsValBindsLR (GhcPass a) (GhcPass b)
+ GHC.Hs.Binds: emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)
+ GHC.Hs.Binds: eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
+ GHC.Hs.Binds: hasSpecPrags :: TcSpecPrags -> Bool
+ GHC.Hs.Binds: hsSigDoc :: Sig name -> SDoc
+ GHC.Hs.Binds: instance (GHC.Hs.Extension.OutputableBndrId l, GHC.Hs.Extension.OutputableBndrId r, Outputable.Outputable (GHC.Hs.Extension.XXPatSynBind (GHC.Hs.Extension.GhcPass l) (GHC.Hs.Extension.GhcPass r))) => Outputable.Outputable (GHC.Hs.Binds.PatSynBind (GHC.Hs.Extension.GhcPass l) (GHC.Hs.Extension.GhcPass r))
+ GHC.Hs.Binds: instance (GHC.Hs.Extension.OutputableBndrId pl, GHC.Hs.Extension.OutputableBndrId pr) => Outputable.Outputable (GHC.Hs.Binds.HsBindLR (GHC.Hs.Extension.GhcPass pl) (GHC.Hs.Extension.GhcPass pr))
+ GHC.Hs.Binds: instance (GHC.Hs.Extension.OutputableBndrId pl, GHC.Hs.Extension.OutputableBndrId pr) => Outputable.Outputable (GHC.Hs.Binds.HsLocalBindsLR (GHC.Hs.Extension.GhcPass pl) (GHC.Hs.Extension.GhcPass pr))
+ GHC.Hs.Binds: instance (GHC.Hs.Extension.OutputableBndrId pl, GHC.Hs.Extension.OutputableBndrId pr) => Outputable.Outputable (GHC.Hs.Binds.HsValBindsLR (GHC.Hs.Extension.GhcPass pl) (GHC.Hs.Extension.GhcPass pr))
+ GHC.Hs.Binds: instance Data.Data.Data GHC.Hs.Binds.NPatBindTc
+ GHC.Hs.Binds: instance Data.Data.Data GHC.Hs.Binds.TcSpecPrag
+ GHC.Hs.Binds: instance Data.Data.Data GHC.Hs.Binds.TcSpecPrags
+ GHC.Hs.Binds: instance Data.Data.Data a => Data.Data.Data (GHC.Hs.Binds.RecordPatSynField a)
+ GHC.Hs.Binds: instance Data.Foldable.Foldable GHC.Hs.Binds.RecordPatSynField
+ GHC.Hs.Binds: instance Data.Traversable.Traversable GHC.Hs.Binds.RecordPatSynField
+ GHC.Hs.Binds: instance GHC.Base.Functor GHC.Hs.Binds.RecordPatSynField
+ GHC.Hs.Binds: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Binds.ABExport (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Binds: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Binds.FixitySig (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Binds: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Binds.HsIPBinds (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Binds: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Binds.IPBind (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Binds: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Binds.Sig (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Binds: instance Outputable.Outputable GHC.Hs.Binds.TcSpecPrag
+ GHC.Hs.Binds: instance Outputable.Outputable a => Outputable.Outputable (GHC.Hs.Binds.RecordPatSynField a)
+ GHC.Hs.Binds: isCompleteMatchSig :: LSig name -> Bool
+ GHC.Hs.Binds: isDefaultMethod :: TcSpecPrags -> Bool
+ GHC.Hs.Binds: isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool
+ GHC.Hs.Binds: isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
+ GHC.Hs.Binds: isEmptyLHsBinds :: LHsBindsLR idL idR -> Bool
+ GHC.Hs.Binds: isEmptyLocalBindsPR :: HsLocalBindsLR (GhcPass a) (GhcPass b) -> Bool
+ GHC.Hs.Binds: isEmptyLocalBindsTc :: HsLocalBindsLR (GhcPass a) GhcTc -> Bool
+ GHC.Hs.Binds: isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
+ GHC.Hs.Binds: isFixityLSig :: LSig name -> Bool
+ GHC.Hs.Binds: isInlineLSig :: LSig name -> Bool
+ GHC.Hs.Binds: isMinimalLSig :: LSig name -> Bool
+ GHC.Hs.Binds: isPragLSig :: LSig name -> Bool
+ GHC.Hs.Binds: isSCCFunSig :: LSig name -> Bool
+ GHC.Hs.Binds: isSpecInstLSig :: LSig name -> Bool
+ GHC.Hs.Binds: isSpecLSig :: LSig name -> Bool
+ GHC.Hs.Binds: isTypeLSig :: LSig name -> Bool
+ GHC.Hs.Binds: noSpecPrags :: TcSpecPrags
+ GHC.Hs.Binds: plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
+ GHC.Hs.Binds: pprDeclList :: [SDoc] -> SDoc
+ GHC.Hs.Binds: pprLHsBinds :: (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
+ GHC.Hs.Binds: pprLHsBindsForUser :: (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
+ GHC.Hs.Binds: pprMinimalSig :: OutputableBndr name => LBooleanFormula (Located name) -> SDoc
+ GHC.Hs.Binds: pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
+ GHC.Hs.Binds: pprTcSpecPrags :: TcSpecPrags -> SDoc
+ GHC.Hs.Binds: pprTicks :: SDoc -> SDoc -> SDoc
+ GHC.Hs.Binds: pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
+ GHC.Hs.Binds: ppr_monobind :: (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
+ GHC.Hs.Binds: ppr_sig :: OutputableBndrId p => Sig (GhcPass p) -> SDoc
+ GHC.Hs.Binds: pragBrackets :: SDoc -> SDoc
+ GHC.Hs.Binds: pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
+ GHC.Hs.Binds: type HsBind id = HsBindLR id id
+ GHC.Hs.Binds: type HsLocalBinds id = HsLocalBindsLR id id
+ GHC.Hs.Binds: type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg]
+ GHC.Hs.Binds: type HsValBinds id = HsValBindsLR id id
+ GHC.Hs.Binds: type LFixitySig pass = Located (FixitySig pass)
+ GHC.Hs.Binds: type LHsBind id = LHsBindLR id id
+ GHC.Hs.Binds: type LHsBindLR idL idR = Located (HsBindLR idL idR)
+ GHC.Hs.Binds: type LHsBinds id = LHsBindsLR id id
+ GHC.Hs.Binds: type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
+ GHC.Hs.Binds: type LHsLocalBinds id = Located (HsLocalBinds id)
+ GHC.Hs.Binds: type LHsLocalBindsLR idL idR = Located (HsLocalBindsLR idL idR)
+ GHC.Hs.Binds: type LIPBind id = Located (IPBind id)
+ GHC.Hs.Binds: type LSig pass = Located (Sig pass)
+ GHC.Hs.Binds: type LTcSpecPrag = Located TcSpecPrag
+ GHC.Hs.Decls: AnnD :: XAnnD p -> AnnDecl p -> HsDecl p
+ GHC.Hs.Decls: AnyclassStrategy :: DerivStrategy pass
+ GHC.Hs.Decls: CExport :: Located CExportSpec -> Located SourceText -> ForeignExport
+ GHC.Hs.Decls: CFunction :: CCallTarget -> CImportSpec
+ GHC.Hs.Decls: CImport :: Located CCallConv -> Located Safety -> Maybe Header -> CImportSpec -> Located SourceText -> ForeignImport
+ GHC.Hs.Decls: CLabel :: CLabelString -> CImportSpec
+ GHC.Hs.Decls: CWrapper :: CImportSpec
+ GHC.Hs.Decls: ClassDecl :: XClassDecl pass -> LHsContext pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> [LHsFunDep pass] -> [LSig pass] -> LHsBinds pass -> [LFamilyDecl pass] -> [LTyFamDefltDecl pass] -> [LDocDecl] -> TyClDecl pass
+ GHC.Hs.Decls: ClosedTypeFamily :: Maybe [LTyFamInstEqn pass] -> FamilyInfo pass
+ GHC.Hs.Decls: ClsInstD :: XClsInstD pass -> ClsInstDecl pass -> InstDecl pass
+ GHC.Hs.Decls: ClsInstDecl :: XCClsInstDecl pass -> LHsSigType pass -> LHsBinds pass -> [LSig pass] -> [LTyFamInstDecl pass] -> [LDataFamInstDecl pass] -> Maybe (Located OverlapMode) -> ClsInstDecl pass
+ GHC.Hs.Decls: ConDeclGADT :: XConDeclGADT pass -> [Located (IdP pass)] -> Located Bool -> LHsQTyVars pass -> Maybe (LHsContext pass) -> HsConDeclDetails pass -> LHsType pass -> Maybe LHsDocString -> ConDecl pass
+ GHC.Hs.Decls: ConDeclH98 :: XConDeclH98 pass -> Located (IdP pass) -> Located Bool -> [LHsTyVarBndr pass] -> Maybe (LHsContext pass) -> HsConDeclDetails pass -> Maybe LHsDocString -> ConDecl pass
+ GHC.Hs.Decls: DataDecl :: XDataDecl pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> HsDataDefn pass -> TyClDecl pass
+ GHC.Hs.Decls: DataDeclRn :: Bool -> NameSet -> DataDeclRn
+ GHC.Hs.Decls: DataFamInstD :: XDataFamInstD pass -> DataFamInstDecl pass -> InstDecl pass
+ GHC.Hs.Decls: DataFamInstDecl :: FamInstEqn pass (HsDataDefn pass) -> DataFamInstDecl pass
+ GHC.Hs.Decls: DataFamily :: FamilyInfo pass
+ GHC.Hs.Decls: DataType :: NewOrData
+ GHC.Hs.Decls: DefD :: XDefD p -> DefaultDecl p -> HsDecl p
+ GHC.Hs.Decls: DefaultDecl :: XCDefaultDecl pass -> [LHsType pass] -> DefaultDecl pass
+ GHC.Hs.Decls: DerivD :: XDerivD p -> DerivDecl p -> HsDecl p
+ GHC.Hs.Decls: DerivDecl :: XCDerivDecl pass -> LHsSigWcType pass -> Maybe (LDerivStrategy pass) -> Maybe (Located OverlapMode) -> DerivDecl pass
+ GHC.Hs.Decls: DocCommentNamed :: String -> HsDocString -> DocDecl
+ GHC.Hs.Decls: DocCommentNext :: HsDocString -> DocDecl
+ GHC.Hs.Decls: DocCommentPrev :: HsDocString -> DocDecl
+ GHC.Hs.Decls: DocD :: XDocD p -> DocDecl -> HsDecl p
+ GHC.Hs.Decls: DocGroup :: Int -> HsDocString -> DocDecl
+ GHC.Hs.Decls: ExplicitSplice :: SpliceExplicitFlag
+ GHC.Hs.Decls: FamDecl :: XFamDecl pass -> FamilyDecl pass -> TyClDecl pass
+ GHC.Hs.Decls: FamEqn :: XCFamEqn pass rhs -> Located (IdP pass) -> Maybe [LHsTyVarBndr pass] -> HsTyPats pass -> LexicalFixity -> rhs -> FamEqn pass rhs
+ GHC.Hs.Decls: FamilyDecl :: XCFamilyDecl pass -> FamilyInfo pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LFamilyResultSig pass -> Maybe (LInjectivityAnn pass) -> FamilyDecl pass
+ GHC.Hs.Decls: ForD :: XForD p -> ForeignDecl p -> HsDecl p
+ GHC.Hs.Decls: ForeignExport :: XForeignExport pass -> Located (IdP pass) -> LHsSigType pass -> ForeignExport -> ForeignDecl pass
+ GHC.Hs.Decls: ForeignImport :: XForeignImport pass -> Located (IdP pass) -> LHsSigType pass -> ForeignImport -> ForeignDecl pass
+ GHC.Hs.Decls: HsAnnotation :: XHsAnnotation pass -> SourceText -> AnnProvenance (IdP pass) -> Located (HsExpr pass) -> AnnDecl pass
+ GHC.Hs.Decls: HsDataDefn :: XCHsDataDefn pass -> NewOrData -> LHsContext pass -> Maybe (Located CType) -> Maybe (LHsKind pass) -> [LConDecl pass] -> HsDeriving pass -> HsDataDefn pass
+ GHC.Hs.Decls: HsDerivingClause :: XCHsDerivingClause pass -> Maybe (LDerivStrategy pass) -> Located [LHsSigType pass] -> HsDerivingClause pass
+ GHC.Hs.Decls: HsGroup :: XCHsGroup p -> HsValBinds p -> [LSpliceDecl p] -> [TyClGroup p] -> [LDerivDecl p] -> [LFixitySig p] -> [LDefaultDecl p] -> [LForeignDecl p] -> [LWarnDecls p] -> [LAnnDecl p] -> [LRuleDecls p] -> [LDocDecl] -> HsGroup p
+ GHC.Hs.Decls: HsRule :: XHsRule pass -> Located (SourceText, RuleName) -> Activation -> Maybe [LHsTyVarBndr (NoGhcTc pass)] -> [LRuleBndr pass] -> Located (HsExpr pass) -> Located (HsExpr pass) -> RuleDecl pass
+ GHC.Hs.Decls: HsRuleRn :: NameSet -> NameSet -> HsRuleRn
+ GHC.Hs.Decls: HsRules :: XCRuleDecls pass -> SourceText -> [LRuleDecl pass] -> RuleDecls pass
+ GHC.Hs.Decls: ImplicitSplice :: SpliceExplicitFlag
+ GHC.Hs.Decls: InjectivityAnn :: Located (IdP pass) -> [Located (IdP pass)] -> InjectivityAnn pass
+ GHC.Hs.Decls: InstD :: XInstD p -> InstDecl p -> HsDecl p
+ GHC.Hs.Decls: KindSig :: XCKindSig pass -> LHsKind pass -> FamilyResultSig pass
+ GHC.Hs.Decls: KindSigD :: XKindSigD p -> StandaloneKindSig p -> HsDecl p
+ GHC.Hs.Decls: ModuleAnnProvenance :: AnnProvenance name
+ GHC.Hs.Decls: NewType :: NewOrData
+ GHC.Hs.Decls: NewtypeStrategy :: DerivStrategy pass
+ GHC.Hs.Decls: NoSig :: XNoSig pass -> FamilyResultSig pass
+ GHC.Hs.Decls: OpenTypeFamily :: FamilyInfo pass
+ GHC.Hs.Decls: RoleAnnotD :: XRoleAnnotD p -> RoleAnnotDecl p -> HsDecl p
+ GHC.Hs.Decls: RoleAnnotDecl :: XCRoleAnnotDecl pass -> Located (IdP pass) -> [Located (Maybe Role)] -> RoleAnnotDecl pass
+ GHC.Hs.Decls: RuleBndr :: XCRuleBndr pass -> Located (IdP pass) -> RuleBndr pass
+ GHC.Hs.Decls: RuleBndrSig :: XRuleBndrSig pass -> Located (IdP pass) -> LHsSigWcType pass -> RuleBndr pass
+ GHC.Hs.Decls: RuleD :: XRuleD p -> RuleDecls p -> HsDecl p
+ GHC.Hs.Decls: SigD :: XSigD p -> Sig p -> HsDecl p
+ GHC.Hs.Decls: SpliceD :: XSpliceD p -> SpliceDecl p -> HsDecl p
+ GHC.Hs.Decls: SpliceDecl :: XSpliceDecl p -> Located (HsSplice p) -> SpliceExplicitFlag -> SpliceDecl p
+ GHC.Hs.Decls: StandaloneKindSig :: XStandaloneKindSig pass -> Located (IdP pass) -> LHsSigType pass -> StandaloneKindSig pass
+ GHC.Hs.Decls: StockStrategy :: DerivStrategy pass
+ GHC.Hs.Decls: SynDecl :: XSynDecl pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LHsType pass -> TyClDecl pass
+ GHC.Hs.Decls: TyClD :: XTyClD p -> TyClDecl p -> HsDecl p
+ GHC.Hs.Decls: TyClGroup :: XCTyClGroup pass -> [LTyClDecl pass] -> [LRoleAnnotDecl pass] -> [LStandaloneKindSig pass] -> [LInstDecl pass] -> TyClGroup pass
+ GHC.Hs.Decls: TyFamInstD :: XTyFamInstD pass -> TyFamInstDecl pass -> InstDecl pass
+ GHC.Hs.Decls: TyFamInstDecl :: TyFamInstEqn pass -> TyFamInstDecl pass
+ GHC.Hs.Decls: TyVarSig :: XTyVarSig pass -> LHsTyVarBndr pass -> FamilyResultSig pass
+ GHC.Hs.Decls: TypeAnnProvenance :: Located name -> AnnProvenance name
+ GHC.Hs.Decls: ValD :: XValD p -> HsBind p -> HsDecl p
+ GHC.Hs.Decls: ValueAnnProvenance :: Located name -> AnnProvenance name
+ GHC.Hs.Decls: ViaStrategy :: XViaStrategy pass -> DerivStrategy pass
+ GHC.Hs.Decls: Warning :: XWarning pass -> [Located (IdP pass)] -> WarningTxt -> WarnDecl pass
+ GHC.Hs.Decls: WarningD :: XWarningD p -> WarnDecls p -> HsDecl p
+ GHC.Hs.Decls: Warnings :: XWarnings pass -> SourceText -> [LWarnDecl pass] -> WarnDecls pass
+ GHC.Hs.Decls: XAnnDecl :: XXAnnDecl pass -> AnnDecl pass
+ GHC.Hs.Decls: XClsInstDecl :: XXClsInstDecl pass -> ClsInstDecl pass
+ GHC.Hs.Decls: XConDecl :: XXConDecl pass -> ConDecl pass
+ GHC.Hs.Decls: XDefaultDecl :: XXDefaultDecl pass -> DefaultDecl pass
+ GHC.Hs.Decls: XDerivDecl :: XXDerivDecl pass -> DerivDecl pass
+ GHC.Hs.Decls: XFamEqn :: XXFamEqn pass rhs -> FamEqn pass rhs
+ GHC.Hs.Decls: XFamilyDecl :: XXFamilyDecl pass -> FamilyDecl pass
+ GHC.Hs.Decls: XFamilyResultSig :: XXFamilyResultSig pass -> FamilyResultSig pass
+ GHC.Hs.Decls: XForeignDecl :: XXForeignDecl pass -> ForeignDecl pass
+ GHC.Hs.Decls: XHsDataDefn :: XXHsDataDefn pass -> HsDataDefn pass
+ GHC.Hs.Decls: XHsDecl :: XXHsDecl p -> HsDecl p
+ GHC.Hs.Decls: XHsDerivingClause :: XXHsDerivingClause pass -> HsDerivingClause pass
+ GHC.Hs.Decls: XHsGroup :: XXHsGroup p -> HsGroup p
+ GHC.Hs.Decls: XInstDecl :: XXInstDecl pass -> InstDecl pass
+ GHC.Hs.Decls: XRoleAnnotDecl :: XXRoleAnnotDecl pass -> RoleAnnotDecl pass
+ GHC.Hs.Decls: XRuleBndr :: XXRuleBndr pass -> RuleBndr pass
+ GHC.Hs.Decls: XRuleDecl :: XXRuleDecl pass -> RuleDecl pass
+ GHC.Hs.Decls: XRuleDecls :: XXRuleDecls pass -> RuleDecls pass
+ GHC.Hs.Decls: XSpliceDecl :: XXSpliceDecl p -> SpliceDecl p
+ GHC.Hs.Decls: XStandaloneKindSig :: XXStandaloneKindSig pass -> StandaloneKindSig pass
+ GHC.Hs.Decls: XTyClDecl :: XXTyClDecl pass -> TyClDecl pass
+ GHC.Hs.Decls: XTyClGroup :: XXTyClGroup pass -> TyClGroup pass
+ GHC.Hs.Decls: XWarnDecl :: XXWarnDecl pass -> WarnDecl pass
+ GHC.Hs.Decls: XWarnDecls :: XXWarnDecls pass -> WarnDecls pass
+ GHC.Hs.Decls: [cid_binds] :: ClsInstDecl pass -> LHsBinds pass
+ GHC.Hs.Decls: [cid_d_ext] :: InstDecl pass -> XClsInstD pass
+ GHC.Hs.Decls: [cid_datafam_insts] :: ClsInstDecl pass -> [LDataFamInstDecl pass]
+ GHC.Hs.Decls: [cid_ext] :: ClsInstDecl pass -> XCClsInstDecl pass
+ GHC.Hs.Decls: [cid_inst] :: InstDecl pass -> ClsInstDecl pass
+ GHC.Hs.Decls: [cid_overlap_mode] :: ClsInstDecl pass -> Maybe (Located OverlapMode)
+ GHC.Hs.Decls: [cid_poly_ty] :: ClsInstDecl pass -> LHsSigType pass
+ GHC.Hs.Decls: [cid_sigs] :: ClsInstDecl pass -> [LSig pass]
+ GHC.Hs.Decls: [cid_tyfam_insts] :: ClsInstDecl pass -> [LTyFamInstDecl pass]
+ GHC.Hs.Decls: [con_args] :: ConDecl pass -> HsConDeclDetails pass
+ GHC.Hs.Decls: [con_doc] :: ConDecl pass -> Maybe LHsDocString
+ GHC.Hs.Decls: [con_ex_tvs] :: ConDecl pass -> [LHsTyVarBndr pass]
+ GHC.Hs.Decls: [con_ext] :: ConDecl pass -> XConDeclH98 pass
+ GHC.Hs.Decls: [con_forall] :: ConDecl pass -> Located Bool
+ GHC.Hs.Decls: [con_g_ext] :: ConDecl pass -> XConDeclGADT pass
+ GHC.Hs.Decls: [con_mb_cxt] :: ConDecl pass -> Maybe (LHsContext pass)
+ GHC.Hs.Decls: [con_name] :: ConDecl pass -> Located (IdP pass)
+ GHC.Hs.Decls: [con_names] :: ConDecl pass -> [Located (IdP pass)]
+ GHC.Hs.Decls: [con_qvars] :: ConDecl pass -> LHsQTyVars pass
+ GHC.Hs.Decls: [con_res_ty] :: ConDecl pass -> LHsType pass
+ GHC.Hs.Decls: [dd_ND] :: HsDataDefn pass -> NewOrData
+ GHC.Hs.Decls: [dd_cType] :: HsDataDefn pass -> Maybe (Located CType)
+ GHC.Hs.Decls: [dd_cons] :: HsDataDefn pass -> [LConDecl pass]
+ GHC.Hs.Decls: [dd_ctxt] :: HsDataDefn pass -> LHsContext pass
+ GHC.Hs.Decls: [dd_derivs] :: HsDataDefn pass -> HsDeriving pass
+ GHC.Hs.Decls: [dd_ext] :: HsDataDefn pass -> XCHsDataDefn pass
+ GHC.Hs.Decls: [dd_kindSig] :: HsDataDefn pass -> Maybe (LHsKind pass)
+ GHC.Hs.Decls: [deriv_clause_ext] :: HsDerivingClause pass -> XCHsDerivingClause pass
+ GHC.Hs.Decls: [deriv_clause_strategy] :: HsDerivingClause pass -> Maybe (LDerivStrategy pass)
+ GHC.Hs.Decls: [deriv_clause_tys] :: HsDerivingClause pass -> Located [LHsSigType pass]
+ GHC.Hs.Decls: [deriv_ext] :: DerivDecl pass -> XCDerivDecl pass
+ GHC.Hs.Decls: [deriv_overlap_mode] :: DerivDecl pass -> Maybe (Located OverlapMode)
+ GHC.Hs.Decls: [deriv_strategy] :: DerivDecl pass -> Maybe (LDerivStrategy pass)
+ GHC.Hs.Decls: [deriv_type] :: DerivDecl pass -> LHsSigWcType pass
+ GHC.Hs.Decls: [dfid_eqn] :: DataFamInstDecl pass -> FamInstEqn pass (HsDataDefn pass)
+ GHC.Hs.Decls: [dfid_ext] :: InstDecl pass -> XDataFamInstD pass
+ GHC.Hs.Decls: [dfid_inst] :: InstDecl pass -> DataFamInstDecl pass
+ GHC.Hs.Decls: [fdExt] :: FamilyDecl pass -> XCFamilyDecl pass
+ GHC.Hs.Decls: [fdFixity] :: FamilyDecl pass -> LexicalFixity
+ GHC.Hs.Decls: [fdInfo] :: FamilyDecl pass -> FamilyInfo pass
+ GHC.Hs.Decls: [fdInjectivityAnn] :: FamilyDecl pass -> Maybe (LInjectivityAnn pass)
+ GHC.Hs.Decls: [fdLName] :: FamilyDecl pass -> Located (IdP pass)
+ GHC.Hs.Decls: [fdResultSig] :: FamilyDecl pass -> LFamilyResultSig pass
+ GHC.Hs.Decls: [fdTyVars] :: FamilyDecl pass -> LHsQTyVars pass
+ GHC.Hs.Decls: [fd_e_ext] :: ForeignDecl pass -> XForeignExport pass
+ GHC.Hs.Decls: [fd_fe] :: ForeignDecl pass -> ForeignExport
+ GHC.Hs.Decls: [fd_fi] :: ForeignDecl pass -> ForeignImport
+ GHC.Hs.Decls: [fd_i_ext] :: ForeignDecl pass -> XForeignImport pass
+ GHC.Hs.Decls: [fd_name] :: ForeignDecl pass -> Located (IdP pass)
+ GHC.Hs.Decls: [fd_sig_ty] :: ForeignDecl pass -> LHsSigType pass
+ GHC.Hs.Decls: [feqn_bndrs] :: FamEqn pass rhs -> Maybe [LHsTyVarBndr pass]
+ GHC.Hs.Decls: [feqn_ext] :: FamEqn pass rhs -> XCFamEqn pass rhs
+ GHC.Hs.Decls: [feqn_fixity] :: FamEqn pass rhs -> LexicalFixity
+ GHC.Hs.Decls: [feqn_pats] :: FamEqn pass rhs -> HsTyPats pass
+ GHC.Hs.Decls: [feqn_rhs] :: FamEqn pass rhs -> rhs
+ GHC.Hs.Decls: [feqn_tycon] :: FamEqn pass rhs -> Located (IdP pass)
+ GHC.Hs.Decls: [group_ext] :: TyClGroup pass -> XCTyClGroup pass
+ GHC.Hs.Decls: [group_instds] :: TyClGroup pass -> [LInstDecl pass]
+ GHC.Hs.Decls: [group_kisigs] :: TyClGroup pass -> [LStandaloneKindSig pass]
+ GHC.Hs.Decls: [group_roles] :: TyClGroup pass -> [LRoleAnnotDecl pass]
+ GHC.Hs.Decls: [group_tyclds] :: TyClGroup pass -> [LTyClDecl pass]
+ GHC.Hs.Decls: [hs_annds] :: HsGroup p -> [LAnnDecl p]
+ GHC.Hs.Decls: [hs_defds] :: HsGroup p -> [LDefaultDecl p]
+ GHC.Hs.Decls: [hs_derivds] :: HsGroup p -> [LDerivDecl p]
+ GHC.Hs.Decls: [hs_docs] :: HsGroup p -> [LDocDecl]
+ GHC.Hs.Decls: [hs_ext] :: HsGroup p -> XCHsGroup p
+ GHC.Hs.Decls: [hs_fixds] :: HsGroup p -> [LFixitySig p]
+ GHC.Hs.Decls: [hs_fords] :: HsGroup p -> [LForeignDecl p]
+ GHC.Hs.Decls: [hs_ruleds] :: HsGroup p -> [LRuleDecls p]
+ GHC.Hs.Decls: [hs_splcds] :: HsGroup p -> [LSpliceDecl p]
+ GHC.Hs.Decls: [hs_tyclds] :: HsGroup p -> [TyClGroup p]
+ GHC.Hs.Decls: [hs_valds] :: HsGroup p -> HsValBinds p
+ GHC.Hs.Decls: [hs_warnds] :: HsGroup p -> [LWarnDecls p]
+ GHC.Hs.Decls: [rd_act] :: RuleDecl pass -> Activation
+ GHC.Hs.Decls: [rd_ext] :: RuleDecl pass -> XHsRule pass
+ GHC.Hs.Decls: [rd_lhs] :: RuleDecl pass -> Located (HsExpr pass)
+ GHC.Hs.Decls: [rd_name] :: RuleDecl pass -> Located (SourceText, RuleName)
+ GHC.Hs.Decls: [rd_rhs] :: RuleDecl pass -> Located (HsExpr pass)
+ GHC.Hs.Decls: [rd_tmvs] :: RuleDecl pass -> [LRuleBndr pass]
+ GHC.Hs.Decls: [rd_tyvs] :: RuleDecl pass -> Maybe [LHsTyVarBndr (NoGhcTc pass)]
+ GHC.Hs.Decls: [rds_ext] :: RuleDecls pass -> XCRuleDecls pass
+ GHC.Hs.Decls: [rds_rules] :: RuleDecls pass -> [LRuleDecl pass]
+ GHC.Hs.Decls: [rds_src] :: RuleDecls pass -> SourceText
+ GHC.Hs.Decls: [tcdATDefs] :: TyClDecl pass -> [LTyFamDefltDecl pass]
+ GHC.Hs.Decls: [tcdATs] :: TyClDecl pass -> [LFamilyDecl pass]
+ GHC.Hs.Decls: [tcdCExt] :: TyClDecl pass -> XClassDecl pass
+ GHC.Hs.Decls: [tcdCtxt] :: TyClDecl pass -> LHsContext pass
+ GHC.Hs.Decls: [tcdDExt] :: TyClDecl pass -> XDataDecl pass
+ GHC.Hs.Decls: [tcdDataCusk] :: DataDeclRn -> Bool
+ GHC.Hs.Decls: [tcdDataDefn] :: TyClDecl pass -> HsDataDefn pass
+ GHC.Hs.Decls: [tcdDocs] :: TyClDecl pass -> [LDocDecl]
+ GHC.Hs.Decls: [tcdFDs] :: TyClDecl pass -> [LHsFunDep pass]
+ GHC.Hs.Decls: [tcdFExt] :: TyClDecl pass -> XFamDecl pass
+ GHC.Hs.Decls: [tcdFVs] :: DataDeclRn -> NameSet
+ GHC.Hs.Decls: [tcdFam] :: TyClDecl pass -> FamilyDecl pass
+ GHC.Hs.Decls: [tcdFixity] :: TyClDecl pass -> LexicalFixity
+ GHC.Hs.Decls: [tcdLName] :: TyClDecl pass -> Located (IdP pass)
+ GHC.Hs.Decls: [tcdMeths] :: TyClDecl pass -> LHsBinds pass
+ GHC.Hs.Decls: [tcdRhs] :: TyClDecl pass -> LHsType pass
+ GHC.Hs.Decls: [tcdSExt] :: TyClDecl pass -> XSynDecl pass
+ GHC.Hs.Decls: [tcdSigs] :: TyClDecl pass -> [LSig pass]
+ GHC.Hs.Decls: [tcdTyVars] :: TyClDecl pass -> LHsQTyVars pass
+ GHC.Hs.Decls: [tfid_eqn] :: TyFamInstDecl pass -> TyFamInstEqn pass
+ GHC.Hs.Decls: [tfid_ext] :: InstDecl pass -> XTyFamInstD pass
+ GHC.Hs.Decls: [tfid_inst] :: InstDecl pass -> TyFamInstDecl pass
+ GHC.Hs.Decls: [wd_ext] :: WarnDecls pass -> XWarnings pass
+ GHC.Hs.Decls: [wd_src] :: WarnDecls pass -> SourceText
+ GHC.Hs.Decls: [wd_warnings] :: WarnDecls pass -> [LWarnDecl pass]
+ GHC.Hs.Decls: annProvenanceName_maybe :: AnnProvenance name -> Maybe name
+ GHC.Hs.Decls: appendGroups :: HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p)
+ GHC.Hs.Decls: collectRuleBndrSigTys :: [RuleBndr pass] -> [LHsSigWcType pass]
+ GHC.Hs.Decls: countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)
+ GHC.Hs.Decls: data AnnDecl pass
+ GHC.Hs.Decls: data AnnProvenance name
+ GHC.Hs.Decls: data CImportSpec
+ GHC.Hs.Decls: data ClsInstDecl pass
+ GHC.Hs.Decls: data ConDecl pass
+ GHC.Hs.Decls: data DataDeclRn
+ GHC.Hs.Decls: data DefaultDecl pass
+ GHC.Hs.Decls: data DerivDecl pass
+ GHC.Hs.Decls: data DerivStrategy pass
+ GHC.Hs.Decls: data DocDecl
+ GHC.Hs.Decls: data FamEqn pass rhs
+ GHC.Hs.Decls: data FamilyDecl pass
+ GHC.Hs.Decls: data FamilyInfo pass
+ GHC.Hs.Decls: data FamilyResultSig pass
+ GHC.Hs.Decls: data ForeignDecl pass
+ GHC.Hs.Decls: data ForeignExport
+ GHC.Hs.Decls: data ForeignImport
+ GHC.Hs.Decls: data HsDataDefn pass
+ GHC.Hs.Decls: data HsDecl p
+ GHC.Hs.Decls: data HsDerivingClause pass
+ GHC.Hs.Decls: data HsGroup p
+ GHC.Hs.Decls: data HsRuleRn
+ GHC.Hs.Decls: data InjectivityAnn pass
+ GHC.Hs.Decls: data InstDecl pass
+ GHC.Hs.Decls: data NewOrData
+ GHC.Hs.Decls: data RoleAnnotDecl pass
+ GHC.Hs.Decls: data RuleBndr pass
+ GHC.Hs.Decls: data RuleDecl pass
+ GHC.Hs.Decls: data RuleDecls pass
+ GHC.Hs.Decls: data SpliceDecl p
+ GHC.Hs.Decls: data SpliceExplicitFlag
+ GHC.Hs.Decls: data StandaloneKindSig pass
+ GHC.Hs.Decls: data TyClDecl pass
+ GHC.Hs.Decls: data TyClGroup pass
+ GHC.Hs.Decls: data WarnDecl pass
+ GHC.Hs.Decls: data WarnDecls pass
+ GHC.Hs.Decls: derivStrategyName :: DerivStrategy a -> SDoc
+ GHC.Hs.Decls: docDeclDoc :: DocDecl -> HsDocString
+ GHC.Hs.Decls: emptyRdrGroup :: HsGroup (GhcPass p)
+ GHC.Hs.Decls: emptyRnGroup :: HsGroup (GhcPass p)
+ GHC.Hs.Decls: famResultKindSignature :: FamilyResultSig (GhcPass p) -> Maybe (LHsKind (GhcPass p))
+ GHC.Hs.Decls: flattenRuleDecls :: [LRuleDecls pass] -> [LRuleDecl pass]
+ GHC.Hs.Decls: foldDerivStrategy :: p ~ GhcPass pass => r -> (XViaStrategy p -> r) -> DerivStrategy p -> r
+ GHC.Hs.Decls: getConArgs :: ConDecl pass -> HsConDeclDetails pass
+ GHC.Hs.Decls: getConNames :: ConDecl (GhcPass p) -> [Located (IdP (GhcPass p))]
+ GHC.Hs.Decls: hsConDeclArgTys :: HsConDeclDetails pass -> [LBangType pass]
+ GHC.Hs.Decls: hsConDeclTheta :: Maybe (LHsContext pass) -> [LHsType pass]
+ GHC.Hs.Decls: hsDeclHasCusk :: TyClDecl GhcRn -> Bool
+ GHC.Hs.Decls: hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
+ GHC.Hs.Decls: instDeclDataFamInsts :: [LInstDecl (GhcPass p)] -> [DataFamInstDecl (GhcPass p)]
+ GHC.Hs.Decls: instance Data.Data.Data GHC.Hs.Decls.CImportSpec
+ GHC.Hs.Decls: instance Data.Data.Data GHC.Hs.Decls.DataDeclRn
+ GHC.Hs.Decls: instance Data.Data.Data GHC.Hs.Decls.DocDecl
+ GHC.Hs.Decls: instance Data.Data.Data GHC.Hs.Decls.ForeignExport
+ GHC.Hs.Decls: instance Data.Data.Data GHC.Hs.Decls.ForeignImport
+ GHC.Hs.Decls: instance Data.Data.Data GHC.Hs.Decls.HsRuleRn
+ GHC.Hs.Decls: instance Data.Data.Data GHC.Hs.Decls.NewOrData
+ GHC.Hs.Decls: instance Data.Data.Data pass => Data.Data.Data (GHC.Hs.Decls.AnnProvenance pass)
+ GHC.Hs.Decls: instance Data.Foldable.Foldable GHC.Hs.Decls.AnnProvenance
+ GHC.Hs.Decls: instance Data.Traversable.Traversable GHC.Hs.Decls.AnnProvenance
+ GHC.Hs.Decls: instance GHC.Base.Functor GHC.Hs.Decls.AnnProvenance
+ GHC.Hs.Decls: instance GHC.Classes.Eq GHC.Hs.Decls.NewOrData
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.AnnDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.ClsInstDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.ConDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.DataFamInstDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.DefaultDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.DerivDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.DerivStrategy (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.FamilyDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.ForeignDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.HsDataDefn (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.HsDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.HsDerivingClause (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.HsGroup (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.InstDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.RuleBndr (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.RuleDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.RuleDecls (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.SpliceDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.StandaloneKindSig (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.TyClDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.TyClGroup (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Decls.TyFamInstDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance Outputable.Outputable (GHC.Hs.Decls.FamilyInfo pass)
+ GHC.Hs.Decls: instance Outputable.Outputable GHC.Hs.Decls.DocDecl
+ GHC.Hs.Decls: instance Outputable.Outputable GHC.Hs.Decls.ForeignExport
+ GHC.Hs.Decls: instance Outputable.Outputable GHC.Hs.Decls.ForeignImport
+ GHC.Hs.Decls: instance Outputable.Outputable GHC.Hs.Decls.NewOrData
+ GHC.Hs.Decls: instance Outputable.OutputableBndr (GHC.Hs.Extension.IdP (GHC.Hs.Extension.GhcPass p)) => Outputable.Outputable (GHC.Hs.Decls.RoleAnnotDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance Outputable.OutputableBndr (GHC.Hs.Extension.IdP (GHC.Hs.Extension.GhcPass p)) => Outputable.Outputable (GHC.Hs.Decls.WarnDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: instance Outputable.OutputableBndr (GHC.Hs.Extension.IdP (GHC.Hs.Extension.GhcPass p)) => Outputable.Outputable (GHC.Hs.Decls.WarnDecls (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Decls: isClassDecl :: TyClDecl pass -> Bool
+ GHC.Hs.Decls: isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
+ GHC.Hs.Decls: isDataDecl :: TyClDecl pass -> Bool
+ GHC.Hs.Decls: isDataFamilyDecl :: TyClDecl pass -> Bool
+ GHC.Hs.Decls: isFamilyDecl :: TyClDecl pass -> Bool
+ GHC.Hs.Decls: isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
+ GHC.Hs.Decls: isSynDecl :: TyClDecl pass -> Bool
+ GHC.Hs.Decls: isTypeFamilyDecl :: TyClDecl pass -> Bool
+ GHC.Hs.Decls: mapDerivStrategy :: p ~ GhcPass pass => (XViaStrategy p -> XViaStrategy p) -> DerivStrategy p -> DerivStrategy p
+ GHC.Hs.Decls: newOrDataToFlavour :: NewOrData -> TyConFlavour
+ GHC.Hs.Decls: newtype DataFamInstDecl pass
+ GHC.Hs.Decls: newtype TyFamInstDecl pass
+ GHC.Hs.Decls: pprDataFamInstFlavour :: DataFamInstDecl (GhcPass p) -> SDoc
+ GHC.Hs.Decls: pprFullRuleName :: Located (SourceText, RuleName) -> SDoc
+ GHC.Hs.Decls: pprHsFamInstLHS :: OutputableBndrId p => IdP (GhcPass p) -> Maybe [LHsTyVarBndr (GhcPass p)] -> HsTyPats (GhcPass p) -> LexicalFixity -> LHsContext (GhcPass p) -> SDoc
+ GHC.Hs.Decls: pprTyClDeclFlavour :: TyClDecl (GhcPass p) -> SDoc
+ GHC.Hs.Decls: pprTyFamInstDecl :: OutputableBndrId p => TopLevelFlag -> TyFamInstDecl (GhcPass p) -> SDoc
+ GHC.Hs.Decls: resultVariableName :: FamilyResultSig (GhcPass a) -> Maybe (IdP (GhcPass a))
+ GHC.Hs.Decls: roleAnnotDeclName :: RoleAnnotDecl (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: standaloneKindSigName :: StandaloneKindSig (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: tcdName :: TyClDecl pass -> IdP pass
+ GHC.Hs.Decls: tyClDeclLName :: TyClDecl pass -> Located (IdP pass)
+ GHC.Hs.Decls: tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
+ GHC.Hs.Decls: tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
+ GHC.Hs.Decls: tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass]
+ GHC.Hs.Decls: tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
+ GHC.Hs.Decls: tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
+ GHC.Hs.Decls: tyFamInstDeclLName :: TyFamInstDecl (GhcPass p) -> Located (IdP (GhcPass p))
+ GHC.Hs.Decls: tyFamInstDeclName :: TyFamInstDecl (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Decls: type FamInstEqn pass rhs = HsImplicitBndrs pass (FamEqn pass rhs) " Here, the @pats@ are type patterns (with kind and type bndrs). See Note [Family instance declaration binders]"
+ GHC.Hs.Decls: type HsConDeclDetails pass = HsConDetails (LBangType pass) (Located [LConDeclField pass])
+ GHC.Hs.Decls: type HsDeriving pass = Located [LHsDerivingClause pass] " The optional @deriving@ clauses of a data declaration. "Clauses" is plural because one can specify multiple deriving clauses using the @-XDerivingStrategies@ language extension. The list of 'LHsDerivingClause's corresponds to exactly what the user requested to derive, in order. If no deriving clauses were specified, the list is empty."
+ GHC.Hs.Decls: type HsTyPats pass = [LHsTypeArg pass]
+ GHC.Hs.Decls: type LAnnDecl pass = Located (AnnDecl pass)
+ GHC.Hs.Decls: type LClsInstDecl pass = Located (ClsInstDecl pass)
+ GHC.Hs.Decls: type LConDecl pass = Located (ConDecl pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a GADT constructor list"
+ GHC.Hs.Decls: type LDataFamInstDecl pass = Located (DataFamInstDecl pass)
+ GHC.Hs.Decls: type LDefaultDecl pass = Located (DefaultDecl pass)
+ GHC.Hs.Decls: type LDerivDecl pass = Located (DerivDecl pass)
+ GHC.Hs.Decls: type LDerivStrategy pass = Located (DerivStrategy pass)
+ GHC.Hs.Decls: type LDocDecl = Located (DocDecl)
+ GHC.Hs.Decls: type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs)
+ GHC.Hs.Decls: type LFamilyDecl pass = Located (FamilyDecl pass)
+ GHC.Hs.Decls: type LFamilyResultSig pass = Located (FamilyResultSig pass)
+ GHC.Hs.Decls: type LForeignDecl pass = Located (ForeignDecl pass)
+ GHC.Hs.Decls: type LHsDecl p = Located (HsDecl p) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' "
+ GHC.Hs.Decls: type LHsDerivingClause pass = Located (HsDerivingClause pass)
+ GHC.Hs.Decls: type LHsFunDep pass = Located (FunDep (Located (IdP pass)))
+ GHC.Hs.Decls: type LInjectivityAnn pass = Located (InjectivityAnn pass)
+ GHC.Hs.Decls: type LInstDecl pass = Located (InstDecl pass)
+ GHC.Hs.Decls: type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass)
+ GHC.Hs.Decls: type LRuleBndr pass = Located (RuleBndr pass)
+ GHC.Hs.Decls: type LRuleDecl pass = Located (RuleDecl pass)
+ GHC.Hs.Decls: type LRuleDecls pass = Located (RuleDecls pass)
+ GHC.Hs.Decls: type LSpliceDecl pass = Located (SpliceDecl pass)
+ GHC.Hs.Decls: type LStandaloneKindSig pass = Located (StandaloneKindSig pass)
+ GHC.Hs.Decls: type LTyClDecl pass = Located (TyClDecl pass)
+ GHC.Hs.Decls: type LTyFamDefltDecl pass = Located (TyFamDefltDecl pass)
+ GHC.Hs.Decls: type LTyFamInstDecl pass = Located (TyFamInstDecl pass)
+ GHC.Hs.Decls: type LTyFamInstEqn pass = Located (TyFamInstEqn pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a list"
+ GHC.Hs.Decls: type LWarnDecl pass = Located (WarnDecl pass)
+ GHC.Hs.Decls: type LWarnDecls pass = Located (WarnDecls pass)
+ GHC.Hs.Decls: type TyFamDefltDecl = TyFamInstDecl
+ GHC.Hs.Decls: type TyFamInstEqn pass = FamInstEqn pass (LHsType pass)
+ GHC.Hs.Doc: ArgDocMap :: Map Name (Map Int HsDocString) -> ArgDocMap
+ GHC.Hs.Doc: DeclDocMap :: Map Name HsDocString -> DeclDocMap
+ GHC.Hs.Doc: appendDocs :: HsDocString -> HsDocString -> HsDocString
+ GHC.Hs.Doc: concatDocs :: [HsDocString] -> Maybe HsDocString
+ GHC.Hs.Doc: data HsDocString
+ GHC.Hs.Doc: emptyArgDocMap :: ArgDocMap
+ GHC.Hs.Doc: emptyDeclDocMap :: DeclDocMap
+ GHC.Hs.Doc: hsDocStringToByteString :: HsDocString -> ByteString
+ GHC.Hs.Doc: instance Binary.Binary GHC.Hs.Doc.ArgDocMap
+ GHC.Hs.Doc: instance Binary.Binary GHC.Hs.Doc.DeclDocMap
+ GHC.Hs.Doc: instance Binary.Binary GHC.Hs.Doc.HsDocString
+ GHC.Hs.Doc: instance Data.Data.Data GHC.Hs.Doc.HsDocString
+ GHC.Hs.Doc: instance GHC.Classes.Eq GHC.Hs.Doc.HsDocString
+ GHC.Hs.Doc: instance GHC.Show.Show GHC.Hs.Doc.HsDocString
+ GHC.Hs.Doc: instance Outputable.Outputable GHC.Hs.Doc.ArgDocMap
+ GHC.Hs.Doc: instance Outputable.Outputable GHC.Hs.Doc.DeclDocMap
+ GHC.Hs.Doc: instance Outputable.Outputable GHC.Hs.Doc.HsDocString
+ GHC.Hs.Doc: mkHsDocString :: String -> HsDocString
+ GHC.Hs.Doc: mkHsDocStringUtf8ByteString :: ByteString -> HsDocString
+ GHC.Hs.Doc: newtype ArgDocMap
+ GHC.Hs.Doc: newtype DeclDocMap
+ GHC.Hs.Doc: ppr_mbDoc :: Maybe LHsDocString -> SDoc
+ GHC.Hs.Doc: type LHsDocString = Located HsDocString
+ GHC.Hs.Doc: unpackHDS :: HsDocString -> String
+ GHC.Hs.Dump: BlankSrcSpan :: BlankSrcSpan
+ GHC.Hs.Dump: NoBlankSrcSpan :: BlankSrcSpan
+ GHC.Hs.Dump: data BlankSrcSpan
+ GHC.Hs.Dump: instance GHC.Classes.Eq GHC.Hs.Dump.BlankSrcSpan
+ GHC.Hs.Dump: instance GHC.Show.Show GHC.Hs.Dump.BlankSrcSpan
+ GHC.Hs.Dump: showAstData :: Data a => BlankSrcSpan -> a -> SDoc
+ GHC.Hs.Expr: ApplicativeArgMany :: XApplicativeArgMany idL -> [ExprLStmt idL] -> HsExpr idL -> LPat idL -> ApplicativeArg idL
+ GHC.Hs.Expr: ApplicativeArgOne :: XApplicativeArgOne idL -> LPat idL -> LHsExpr idL -> Bool -> SyntaxExpr idL -> ApplicativeArg idL
+ GHC.Hs.Expr: ApplicativeStmt :: XApplicativeStmt idL idR body -> [(SyntaxExpr idR, ApplicativeArg idL)] -> Maybe (SyntaxExpr idR) -> StmtLR idL idR body
+ GHC.Hs.Expr: ArithSeq :: XArithSeq p -> Maybe (SyntaxExpr p) -> ArithSeqInfo p -> HsExpr p
+ GHC.Hs.Expr: ArrowExpr :: HsStmtContext id
+ GHC.Hs.Expr: BindStmt :: XBindStmt idL idR body -> LPat idL -> body -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
+ GHC.Hs.Expr: BodyStmt :: XBodyStmt idL idR body -> body -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
+ GHC.Hs.Expr: CaseAlt :: HsMatchContext id
+ GHC.Hs.Expr: CmdTopTc :: Type -> Type -> CmdSyntaxTable GhcTc -> CmdTopTc
+ GHC.Hs.Expr: DecBrG :: XDecBrG p -> HsGroup p -> HsBracket p
+ GHC.Hs.Expr: DecBrL :: XDecBrL p -> [LHsDecl p] -> HsBracket p
+ GHC.Hs.Expr: DelayedSplice :: TcLclEnv -> LHsExpr GhcRn -> TcType -> LHsExpr GhcTcId -> DelayedSplice
+ GHC.Hs.Expr: DoExpr :: HsStmtContext id
+ GHC.Hs.Expr: ExpBr :: XExpBr p -> LHsExpr p -> HsBracket p
+ GHC.Hs.Expr: ExplicitList :: XExplicitList p -> Maybe (SyntaxExpr p) -> [LHsExpr p] -> HsExpr p
+ GHC.Hs.Expr: ExplicitSum :: XExplicitSum p -> ConTag -> Arity -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: ExplicitTuple :: XExplicitTuple p -> [LHsTupArg p] -> Boxity -> HsExpr p
+ GHC.Hs.Expr: ExprWithTySig :: XExprWithTySig p -> LHsExpr p -> LHsSigWcType (NoGhcTc p) -> HsExpr p
+ GHC.Hs.Expr: From :: LHsExpr id -> ArithSeqInfo id
+ GHC.Hs.Expr: FromThen :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
+ GHC.Hs.Expr: FromThenTo :: LHsExpr id -> LHsExpr id -> LHsExpr id -> ArithSeqInfo id
+ GHC.Hs.Expr: FromTo :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
+ GHC.Hs.Expr: FunRhs :: Located id -> LexicalFixity -> SrcStrictness -> HsMatchContext id
+ GHC.Hs.Expr: GRHS :: XCGRHS p body -> [GuardLStmt p] -> body -> GRHS p body
+ GHC.Hs.Expr: GRHSs :: XCGRHSs p body -> [LGRHS p body] -> LHsLocalBinds p -> GRHSs p body
+ GHC.Hs.Expr: GhciStmtCtxt :: HsStmtContext id
+ GHC.Hs.Expr: GroupForm :: TransForm
+ GHC.Hs.Expr: HasDollar :: SpliceDecoration
+ GHC.Hs.Expr: HasParens :: SpliceDecoration
+ GHC.Hs.Expr: HsApp :: XApp p -> LHsExpr p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsAppType :: XAppTypeE p -> LHsExpr p -> LHsWcType (NoGhcTc p) -> HsExpr p
+ GHC.Hs.Expr: HsBinTick :: XBinTick p -> Int -> Int -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsBracket :: XBracket p -> HsBracket p -> HsExpr p
+ GHC.Hs.Expr: HsCase :: XCase p -> LHsExpr p -> MatchGroup p (LHsExpr p) -> HsExpr p
+ GHC.Hs.Expr: HsCmdApp :: XCmdApp id -> LHsCmd id -> LHsExpr id -> HsCmd id
+ GHC.Hs.Expr: HsCmdArrApp :: XCmdArrApp id -> LHsExpr id -> LHsExpr id -> HsArrAppType -> Bool -> HsCmd id
+ GHC.Hs.Expr: HsCmdArrForm :: XCmdArrForm id -> LHsExpr id -> LexicalFixity -> Maybe Fixity -> [LHsCmdTop id] -> HsCmd id
+ GHC.Hs.Expr: HsCmdCase :: XCmdCase id -> LHsExpr id -> MatchGroup id (LHsCmd id) -> HsCmd id
+ GHC.Hs.Expr: HsCmdDo :: XCmdDo id -> Located [CmdLStmt id] -> HsCmd id
+ GHC.Hs.Expr: HsCmdIf :: XCmdIf id -> Maybe (SyntaxExpr id) -> LHsExpr id -> LHsCmd id -> LHsCmd id -> HsCmd id
+ GHC.Hs.Expr: HsCmdLam :: XCmdLam id -> MatchGroup id (LHsCmd id) -> HsCmd id
+ GHC.Hs.Expr: HsCmdLet :: XCmdLet id -> LHsLocalBinds id -> LHsCmd id -> HsCmd id
+ GHC.Hs.Expr: HsCmdPar :: XCmdPar id -> LHsCmd id -> HsCmd id
+ GHC.Hs.Expr: HsCmdTop :: XCmdTop p -> LHsCmd p -> HsCmdTop p
+ GHC.Hs.Expr: HsCmdWrap :: XCmdWrap id -> HsWrapper -> HsCmd id -> HsCmd id
+ GHC.Hs.Expr: HsConLikeOut :: XConLikeOut p -> ConLike -> HsExpr p
+ GHC.Hs.Expr: HsCoreAnn :: XCoreAnn p -> SourceText -> StringLiteral -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsDo :: XDo p -> HsStmtContext Name -> Located [ExprLStmt p] -> HsExpr p
+ GHC.Hs.Expr: HsFirstOrderApp :: HsArrAppType
+ GHC.Hs.Expr: HsHigherOrderApp :: HsArrAppType
+ GHC.Hs.Expr: HsIPVar :: XIPVar p -> HsIPName -> HsExpr p
+ GHC.Hs.Expr: HsIf :: XIf p -> Maybe (SyntaxExpr p) -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsLam :: XLam p -> MatchGroup p (LHsExpr p) -> HsExpr p
+ GHC.Hs.Expr: HsLamCase :: XLamCase p -> MatchGroup p (LHsExpr p) -> HsExpr p
+ GHC.Hs.Expr: HsLet :: XLet p -> LHsLocalBinds p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsLit :: XLitE p -> HsLit p -> HsExpr p
+ GHC.Hs.Expr: HsMultiIf :: XMultiIf p -> [LGRHS p (LHsExpr p)] -> HsExpr p
+ GHC.Hs.Expr: HsOverLabel :: XOverLabel p -> Maybe (IdP p) -> FastString -> HsExpr p
+ GHC.Hs.Expr: HsOverLit :: XOverLitE p -> HsOverLit p -> HsExpr p
+ GHC.Hs.Expr: HsPar :: XPar p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsProc :: XProc p -> LPat p -> LHsCmdTop p -> HsExpr p
+ GHC.Hs.Expr: HsQuasiQuote :: XQuasiQuote id -> IdP id -> IdP id -> SrcSpan -> FastString -> HsSplice id
+ GHC.Hs.Expr: HsRecFld :: XRecFld p -> AmbiguousFieldOcc p -> HsExpr p
+ GHC.Hs.Expr: HsRnBracketOut :: XRnBracketOut p -> HsBracket GhcRn -> [PendingRnSplice] -> HsExpr p
+ GHC.Hs.Expr: HsSCC :: XSCC p -> SourceText -> StringLiteral -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsSpliceE :: XSpliceE p -> HsSplice p -> HsExpr p
+ GHC.Hs.Expr: HsSpliced :: XSpliced id -> ThModFinalizers -> HsSplicedThing id -> HsSplice id
+ GHC.Hs.Expr: HsSplicedExpr :: HsExpr id -> HsSplicedThing id
+ GHC.Hs.Expr: HsSplicedPat :: Pat id -> HsSplicedThing id
+ GHC.Hs.Expr: HsSplicedT :: DelayedSplice -> HsSplice id
+ GHC.Hs.Expr: HsSplicedTy :: HsType id -> HsSplicedThing id
+ GHC.Hs.Expr: HsStatic :: XStatic p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsTcBracketOut :: XTcBracketOut p -> HsBracket GhcRn -> [PendingTcSplice] -> HsExpr p
+ GHC.Hs.Expr: HsTick :: XTick p -> Tickish (IdP p) -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsTickPragma :: XTickPragma p -> SourceText -> (StringLiteral, (Int, Int), (Int, Int)) -> ((SourceText, SourceText), (SourceText, SourceText)) -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: HsTypedSplice :: XTypedSplice id -> SpliceDecoration -> IdP id -> LHsExpr id -> HsSplice id
+ GHC.Hs.Expr: HsUnboundVar :: XUnboundVar p -> UnboundVar -> HsExpr p
+ GHC.Hs.Expr: HsUntypedSplice :: XUntypedSplice id -> SpliceDecoration -> IdP id -> LHsExpr id -> HsSplice id
+ GHC.Hs.Expr: HsVar :: XVar p -> Located (IdP p) -> HsExpr p
+ GHC.Hs.Expr: HsWrap :: XWrap p -> HsWrapper -> HsExpr p -> HsExpr p
+ GHC.Hs.Expr: IfAlt :: HsMatchContext id
+ GHC.Hs.Expr: LambdaExpr :: HsMatchContext id
+ GHC.Hs.Expr: LastStmt :: XLastStmt idL idR body -> body -> Bool -> SyntaxExpr idR -> StmtLR idL idR body
+ GHC.Hs.Expr: LetStmt :: XLetStmt idL idR body -> LHsLocalBindsLR idL idR -> StmtLR idL idR body
+ GHC.Hs.Expr: ListComp :: HsStmtContext id
+ GHC.Hs.Expr: MDoExpr :: HsStmtContext id
+ GHC.Hs.Expr: MG :: XMG p body -> Located [LMatch p body] -> Origin -> MatchGroup p body
+ GHC.Hs.Expr: Match :: XCMatch p body -> HsMatchContext (NameOrRdrName (IdP p)) -> [LPat p] -> GRHSs p body -> Match p body
+ GHC.Hs.Expr: MatchGroupTc :: [Type] -> Type -> MatchGroupTc
+ GHC.Hs.Expr: Missing :: XMissing id -> HsTupArg id
+ GHC.Hs.Expr: MonadComp :: HsStmtContext id
+ GHC.Hs.Expr: NegApp :: XNegApp p -> LHsExpr p -> SyntaxExpr p -> HsExpr p
+ GHC.Hs.Expr: NoParens :: SpliceDecoration
+ GHC.Hs.Expr: OpApp :: XOpApp p -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: OutOfScope :: OccName -> GlobalRdrEnv -> UnboundVar
+ GHC.Hs.Expr: ParStmt :: XParStmt idL idR body -> [ParStmtBlock idL idR] -> HsExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
+ GHC.Hs.Expr: ParStmtBlock :: XParStmtBlock idL idR -> [ExprLStmt idL] -> [IdP idR] -> SyntaxExpr idR -> ParStmtBlock idL idR
+ GHC.Hs.Expr: ParStmtCtxt :: HsStmtContext id -> HsStmtContext id
+ GHC.Hs.Expr: PatBindGuards :: HsMatchContext id
+ GHC.Hs.Expr: PatBindRhs :: HsMatchContext id
+ GHC.Hs.Expr: PatBr :: XPatBr p -> LPat p -> HsBracket p
+ GHC.Hs.Expr: PatGuard :: HsMatchContext id -> HsStmtContext id
+ GHC.Hs.Expr: PatSyn :: HsMatchContext id
+ GHC.Hs.Expr: PendingRnSplice :: UntypedSpliceFlavour -> SplicePointName -> LHsExpr GhcRn -> PendingRnSplice
+ GHC.Hs.Expr: PendingTcSplice :: SplicePointName -> LHsExpr GhcTc -> PendingTcSplice
+ GHC.Hs.Expr: Present :: XPresent id -> LHsExpr id -> HsTupArg id
+ GHC.Hs.Expr: ProcExpr :: HsMatchContext id
+ GHC.Hs.Expr: RecStmt :: XRecStmt idL idR body -> [LStmtLR idL idR body] -> [IdP idR] -> [IdP idR] -> SyntaxExpr idR -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
+ GHC.Hs.Expr: RecStmtTc :: Type -> [PostTcExpr] -> [PostTcExpr] -> Type -> RecStmtTc
+ GHC.Hs.Expr: RecUpd :: HsMatchContext id
+ GHC.Hs.Expr: RecordCon :: XRecordCon p -> Located (IdP p) -> HsRecordBinds p -> HsExpr p
+ GHC.Hs.Expr: RecordConTc :: ConLike -> PostTcExpr -> RecordConTc
+ GHC.Hs.Expr: RecordUpd :: XRecordUpd p -> LHsExpr p -> [LHsRecUpdField p] -> HsExpr p
+ GHC.Hs.Expr: RecordUpdTc :: [ConLike] -> [Type] -> [Type] -> HsWrapper -> RecordUpdTc
+ GHC.Hs.Expr: SectionL :: XSectionL p -> LHsExpr p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: SectionR :: XSectionR p -> LHsExpr p -> LHsExpr p -> HsExpr p
+ GHC.Hs.Expr: StmtCtxt :: HsStmtContext id -> HsMatchContext id
+ GHC.Hs.Expr: SyntaxExpr :: HsExpr p -> [HsWrapper] -> HsWrapper -> SyntaxExpr p
+ GHC.Hs.Expr: TExpBr :: XTExpBr p -> LHsExpr p -> HsBracket p
+ GHC.Hs.Expr: ThModFinalizers :: [ForeignRef (Q ())] -> ThModFinalizers
+ GHC.Hs.Expr: ThPatQuote :: HsMatchContext id
+ GHC.Hs.Expr: ThPatSplice :: HsMatchContext id
+ GHC.Hs.Expr: ThenForm :: TransForm
+ GHC.Hs.Expr: TransStmt :: XTransStmt idL idR body -> TransForm -> [ExprLStmt idL] -> [(IdP idR, IdP idR)] -> LHsExpr idR -> Maybe (LHsExpr idR) -> SyntaxExpr idR -> SyntaxExpr idR -> HsExpr idR -> StmtLR idL idR body
+ GHC.Hs.Expr: TransStmtCtxt :: HsStmtContext id -> HsStmtContext id
+ GHC.Hs.Expr: TrueExprHole :: OccName -> UnboundVar
+ GHC.Hs.Expr: TypBr :: XTypBr p -> LHsType p -> HsBracket p
+ GHC.Hs.Expr: UntypedDeclSplice :: UntypedSpliceFlavour
+ GHC.Hs.Expr: UntypedExpSplice :: UntypedSpliceFlavour
+ GHC.Hs.Expr: UntypedPatSplice :: UntypedSpliceFlavour
+ GHC.Hs.Expr: UntypedTypeSplice :: UntypedSpliceFlavour
+ GHC.Hs.Expr: VarBr :: XVarBr p -> Bool -> IdP p -> HsBracket p
+ GHC.Hs.Expr: XApplicativeArg :: XXApplicativeArg idL -> ApplicativeArg idL
+ GHC.Hs.Expr: XBracket :: XXBracket p -> HsBracket p
+ GHC.Hs.Expr: XCmd :: XXCmd id -> HsCmd id
+ GHC.Hs.Expr: XCmdTop :: XXCmdTop p -> HsCmdTop p
+ GHC.Hs.Expr: XExpr :: XXExpr p -> HsExpr p
+ GHC.Hs.Expr: XGRHS :: XXGRHS p body -> GRHS p body
+ GHC.Hs.Expr: XGRHSs :: XXGRHSs p body -> GRHSs p body
+ GHC.Hs.Expr: XMatch :: XXMatch p body -> Match p body
+ GHC.Hs.Expr: XMatchGroup :: XXMatchGroup p body -> MatchGroup p body
+ GHC.Hs.Expr: XParStmtBlock :: XXParStmtBlock idL idR -> ParStmtBlock idL idR
+ GHC.Hs.Expr: XSplice :: XXSplice id -> HsSplice id
+ GHC.Hs.Expr: XStmtLR :: XXStmtLR idL idR body -> StmtLR idL idR body
+ GHC.Hs.Expr: XTupArg :: XXTupArg id -> HsTupArg id
+ GHC.Hs.Expr: [app_arg_pattern] :: ApplicativeArg idL -> LPat idL
+ GHC.Hs.Expr: [app_stmts] :: ApplicativeArg idL -> [ExprLStmt idL]
+ GHC.Hs.Expr: [arg_expr] :: ApplicativeArg idL -> LHsExpr idL
+ GHC.Hs.Expr: [bv_pattern] :: ApplicativeArg idL -> LPat idL
+ GHC.Hs.Expr: [fail_operator] :: ApplicativeArg idL -> SyntaxExpr idL
+ GHC.Hs.Expr: [final_expr] :: ApplicativeArg idL -> HsExpr idL
+ GHC.Hs.Expr: [grhssExt] :: GRHSs p body -> XCGRHSs p body
+ GHC.Hs.Expr: [grhssGRHSs] :: GRHSs p body -> [LGRHS p body]
+ GHC.Hs.Expr: [grhssLocalBinds] :: GRHSs p body -> LHsLocalBinds p
+ GHC.Hs.Expr: [is_body_stmt] :: ApplicativeArg idL -> Bool
+ GHC.Hs.Expr: [m_ctxt] :: Match p body -> HsMatchContext (NameOrRdrName (IdP p))
+ GHC.Hs.Expr: [m_ext] :: Match p body -> XCMatch p body
+ GHC.Hs.Expr: [m_grhss] :: Match p body -> GRHSs p body
+ GHC.Hs.Expr: [m_pats] :: Match p body -> [LPat p]
+ GHC.Hs.Expr: [mc_fixity] :: HsMatchContext id -> LexicalFixity
+ GHC.Hs.Expr: [mc_fun] :: HsMatchContext id -> Located id
+ GHC.Hs.Expr: [mc_strictness] :: HsMatchContext id -> SrcStrictness
+ GHC.Hs.Expr: [mg_alts] :: MatchGroup p body -> Located [LMatch p body]
+ GHC.Hs.Expr: [mg_arg_tys] :: MatchGroupTc -> [Type]
+ GHC.Hs.Expr: [mg_ext] :: MatchGroup p body -> XMG p body
+ GHC.Hs.Expr: [mg_origin] :: MatchGroup p body -> Origin
+ GHC.Hs.Expr: [mg_res_ty] :: MatchGroupTc -> Type
+ GHC.Hs.Expr: [rcon_con_expr] :: RecordConTc -> PostTcExpr
+ GHC.Hs.Expr: [rcon_con_like] :: RecordConTc -> ConLike
+ GHC.Hs.Expr: [rcon_con_name] :: HsExpr p -> Located (IdP p)
+ GHC.Hs.Expr: [rcon_ext] :: HsExpr p -> XRecordCon p
+ GHC.Hs.Expr: [rcon_flds] :: HsExpr p -> HsRecordBinds p
+ GHC.Hs.Expr: [recS_bind_fn] :: StmtLR idL idR body -> SyntaxExpr idR
+ GHC.Hs.Expr: [recS_bind_ty] :: RecStmtTc -> Type
+ GHC.Hs.Expr: [recS_ext] :: StmtLR idL idR body -> XRecStmt idL idR body
+ GHC.Hs.Expr: [recS_later_ids] :: StmtLR idL idR body -> [IdP idR]
+ GHC.Hs.Expr: [recS_later_rets] :: RecStmtTc -> [PostTcExpr]
+ GHC.Hs.Expr: [recS_mfix_fn] :: StmtLR idL idR body -> SyntaxExpr idR
+ GHC.Hs.Expr: [recS_rec_ids] :: StmtLR idL idR body -> [IdP idR]
+ GHC.Hs.Expr: [recS_rec_rets] :: RecStmtTc -> [PostTcExpr]
+ GHC.Hs.Expr: [recS_ret_fn] :: StmtLR idL idR body -> SyntaxExpr idR
+ GHC.Hs.Expr: [recS_ret_ty] :: RecStmtTc -> Type
+ GHC.Hs.Expr: [recS_stmts] :: StmtLR idL idR body -> [LStmtLR idL idR body]
+ GHC.Hs.Expr: [rupd_cons] :: RecordUpdTc -> [ConLike]
+ GHC.Hs.Expr: [rupd_expr] :: HsExpr p -> LHsExpr p
+ GHC.Hs.Expr: [rupd_ext] :: HsExpr p -> XRecordUpd p
+ GHC.Hs.Expr: [rupd_flds] :: HsExpr p -> [LHsRecUpdField p]
+ GHC.Hs.Expr: [rupd_in_tys] :: RecordUpdTc -> [Type]
+ GHC.Hs.Expr: [rupd_out_tys] :: RecordUpdTc -> [Type]
+ GHC.Hs.Expr: [rupd_wrap] :: RecordUpdTc -> HsWrapper
+ GHC.Hs.Expr: [syn_arg_wraps] :: SyntaxExpr p -> [HsWrapper]
+ GHC.Hs.Expr: [syn_expr] :: SyntaxExpr p -> HsExpr p
+ GHC.Hs.Expr: [syn_res_wrap] :: SyntaxExpr p -> HsWrapper
+ GHC.Hs.Expr: [trS_bind] :: StmtLR idL idR body -> SyntaxExpr idR
+ GHC.Hs.Expr: [trS_bndrs] :: StmtLR idL idR body -> [(IdP idR, IdP idR)]
+ GHC.Hs.Expr: [trS_by] :: StmtLR idL idR body -> Maybe (LHsExpr idR)
+ GHC.Hs.Expr: [trS_ext] :: StmtLR idL idR body -> XTransStmt idL idR body
+ GHC.Hs.Expr: [trS_fmap] :: StmtLR idL idR body -> HsExpr idR
+ GHC.Hs.Expr: [trS_form] :: StmtLR idL idR body -> TransForm
+ GHC.Hs.Expr: [trS_ret] :: StmtLR idL idR body -> SyntaxExpr idR
+ GHC.Hs.Expr: [trS_stmts] :: StmtLR idL idR body -> [ExprLStmt idL]
+ GHC.Hs.Expr: [trS_using] :: StmtLR idL idR body -> LHsExpr idR
+ GHC.Hs.Expr: [xarg_app_arg_many] :: ApplicativeArg idL -> XApplicativeArgMany idL
+ GHC.Hs.Expr: [xarg_app_arg_one] :: ApplicativeArg idL -> XApplicativeArgOne idL
+ GHC.Hs.Expr: data ApplicativeArg idL
+ GHC.Hs.Expr: data ArithSeqInfo id
+ GHC.Hs.Expr: data CmdTopTc
+ GHC.Hs.Expr: data DelayedSplice
+ GHC.Hs.Expr: data GRHS p body
+ GHC.Hs.Expr: data GRHSs p body
+ GHC.Hs.Expr: data HsArrAppType
+ GHC.Hs.Expr: data HsBracket p
+ GHC.Hs.Expr: data HsCmd id
+ GHC.Hs.Expr: data HsCmdTop p
+ GHC.Hs.Expr: data HsExpr p
+ GHC.Hs.Expr: data HsMatchContext id
+ GHC.Hs.Expr: data HsSplice id
+ GHC.Hs.Expr: data HsSplicedThing id
+ GHC.Hs.Expr: data HsStmtContext id
+ GHC.Hs.Expr: data HsTupArg id
+ GHC.Hs.Expr: data Match p body
+ GHC.Hs.Expr: data MatchGroup p body
+ GHC.Hs.Expr: data MatchGroupTc
+ GHC.Hs.Expr: data ParStmtBlock idL idR
+ GHC.Hs.Expr: data PendingRnSplice
+ GHC.Hs.Expr: data PendingTcSplice
+ GHC.Hs.Expr: data RecStmtTc
+ GHC.Hs.Expr: data RecordConTc
+ GHC.Hs.Expr: data RecordUpdTc
+ GHC.Hs.Expr: data SpliceDecoration
+ GHC.Hs.Expr: data StmtLR idL idR body
+ GHC.Hs.Expr: data SyntaxExpr p
+ GHC.Hs.Expr: data TransForm
+ GHC.Hs.Expr: data UnboundVar
+ GHC.Hs.Expr: data UntypedSpliceFlavour
+ GHC.Hs.Expr: hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool
+ GHC.Hs.Expr: hsLMatchPats :: LMatch (GhcPass id) body -> [LPat (GhcPass id)]
+ GHC.Hs.Expr: instance (GHC.Hs.Extension.OutputableBndrId pl, GHC.Hs.Extension.OutputableBndrId pr, Outputable.Outputable body) => Outputable.Outputable (GHC.Hs.Expr.StmtLR (GHC.Hs.Extension.GhcPass pl) (GHC.Hs.Extension.GhcPass pr) body)
+ GHC.Hs.Expr: instance (GHC.Hs.Extension.OutputableBndrId pr, Outputable.Outputable body) => Outputable.Outputable (GHC.Hs.Expr.Match (GHC.Hs.Extension.GhcPass pr) body)
+ GHC.Hs.Expr: instance (Outputable.Outputable (GHC.Hs.Expr.StmtLR idL idL (GHC.Hs.Expr.LHsExpr idL)), Outputable.Outputable (GHC.Hs.Extension.XXParStmtBlock idL idR)) => Outputable.Outputable (GHC.Hs.Expr.ParStmtBlock idL idR)
+ GHC.Hs.Expr: instance (Outputable.Outputable (GHC.Hs.Extension.GhcPass p), Outputable.Outputable (GHC.Hs.PlaceHolder.NameOrRdrName (GHC.Hs.Extension.GhcPass p))) => Outputable.Outputable (GHC.Hs.Expr.HsStmtContext (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.DelayedSplice
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.HsArrAppType
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.MatchGroupTc
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.RecordUpdTc
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.SpliceDecoration
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.ThModFinalizers
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.TransForm
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.UnboundVar
+ GHC.Hs.Expr: instance Data.Data.Data GHC.Hs.Expr.UntypedSpliceFlavour
+ GHC.Hs.Expr: instance Data.Data.Data id => Data.Data.Data (GHC.Hs.Expr.HsMatchContext id)
+ GHC.Hs.Expr: instance Data.Data.Data id => Data.Data.Data (GHC.Hs.Expr.HsStmtContext id)
+ GHC.Hs.Expr: instance GHC.Base.Functor GHC.Hs.Expr.HsMatchContext
+ GHC.Hs.Expr: instance GHC.Base.Functor GHC.Hs.Expr.HsStmtContext
+ GHC.Hs.Expr: instance GHC.Classes.Eq GHC.Hs.Expr.SpliceDecoration
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId idL => Outputable.Outputable (GHC.Hs.Expr.ApplicativeArg (GHC.Hs.Extension.GhcPass idL))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.ArithSeqInfo (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.HsBracket (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.HsCmd (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.HsCmdTop (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.HsExpr (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.HsSplice (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.HsSplicedThing (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Expr.SyntaxExpr (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Expr: instance GHC.Show.Show GHC.Hs.Expr.SpliceDecoration
+ GHC.Hs.Expr: instance Outputable.Outputable GHC.Hs.Expr.PendingRnSplice
+ GHC.Hs.Expr: instance Outputable.Outputable GHC.Hs.Expr.PendingTcSplice
+ GHC.Hs.Expr: instance Outputable.Outputable GHC.Hs.Expr.SpliceDecoration
+ GHC.Hs.Expr: instance Outputable.Outputable GHC.Hs.Expr.UnboundVar
+ GHC.Hs.Expr: instance Outputable.OutputableBndr id => Outputable.Outputable (GHC.Hs.Expr.HsMatchContext id)
+ GHC.Hs.Expr: isAtomicHsExpr :: HsExpr id -> Bool
+ GHC.Hs.Expr: isComprehensionContext :: HsStmtContext id -> Bool
+ GHC.Hs.Expr: isEmptyMatchGroup :: MatchGroup id body -> Bool
+ GHC.Hs.Expr: isInfixMatch :: Match id body -> Bool
+ GHC.Hs.Expr: isMonadCompContext :: HsStmtContext id -> Bool
+ GHC.Hs.Expr: isMonadFailStmtContext :: HsStmtContext id -> Bool
+ GHC.Hs.Expr: isPatSynCtxt :: HsMatchContext id -> Bool
+ GHC.Hs.Expr: isQuietHsCmd :: HsCmd id -> Bool
+ GHC.Hs.Expr: isQuietHsExpr :: HsExpr id -> Bool
+ GHC.Hs.Expr: isSingletonMatchGroup :: [LMatch id body] -> Bool
+ GHC.Hs.Expr: isTypedBracket :: HsBracket id -> Bool
+ GHC.Hs.Expr: isTypedSplice :: HsSplice id -> Bool
+ GHC.Hs.Expr: matchContextErrString :: Outputable id => HsMatchContext id -> SDoc
+ GHC.Hs.Expr: matchGroupArity :: MatchGroup (GhcPass id) body -> Arity
+ GHC.Hs.Expr: matchSeparator :: HsMatchContext id -> SDoc
+ GHC.Hs.Expr: mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn
+ GHC.Hs.Expr: mkSyntaxExpr :: HsExpr (GhcPass p) -> SyntaxExpr (GhcPass p)
+ GHC.Hs.Expr: newtype ThModFinalizers
+ GHC.Hs.Expr: noExpr :: HsExpr (GhcPass p)
+ GHC.Hs.Expr: noSyntaxExpr :: SyntaxExpr (GhcPass p)
+ GHC.Hs.Expr: parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Expr: pp_dotdot :: SDoc
+ GHC.Hs.Expr: pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc
+ GHC.Hs.Expr: pprAStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
+ GHC.Hs.Expr: pprArg :: forall idL. OutputableBndrId idL => ApplicativeArg (GhcPass idL) -> SDoc
+ GHC.Hs.Expr: pprBinds :: (OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
+ GHC.Hs.Expr: pprBy :: Outputable body => Maybe body -> SDoc
+ GHC.Hs.Expr: pprCmd :: OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprCmdArg :: OutputableBndrId p => HsCmdTop (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprComp :: (OutputableBndrId p, Outputable body) => [LStmt (GhcPass p) body] -> SDoc
+ GHC.Hs.Expr: pprDebugParendExpr :: OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprDo :: (OutputableBndrId p, Outputable body) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
+ GHC.Hs.Expr: pprExpr :: OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
+ GHC.Hs.Expr: pprFunBind :: (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprGRHS :: (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprGRHSs :: (OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprHsBracket :: OutputableBndrId p => HsBracket (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprLCmd :: OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprLExpr :: OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprMatch :: (OutputableBndrId idR, Outputable body) => Match (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprMatchContext :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
+ GHC.Hs.Expr: pprMatchContextNoun :: (Outputable (NameOrRdrName id), Outputable id) => HsMatchContext id -> SDoc
+ GHC.Hs.Expr: pprMatchInCtxt :: (OutputableBndrId idR, Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprMatches :: (OutputableBndrId idR, Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprParendExpr :: OutputableBndrId p => PprPrec -> HsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprParendLExpr :: OutputableBndrId p => PprPrec -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprPatBind :: forall bndr p body. (OutputableBndrId bndr, OutputableBndrId p, Outputable body) => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc
+ GHC.Hs.Expr: pprPendingSplice :: OutputableBndrId p => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprQuals :: (OutputableBndrId p, Outputable body) => [LStmt (GhcPass p) body] -> SDoc
+ GHC.Hs.Expr: pprSplice :: OutputableBndrId p => HsSplice (GhcPass p) -> SDoc
+ GHC.Hs.Expr: pprSpliceDecl :: OutputableBndrId p => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc
+ GHC.Hs.Expr: pprStmt :: forall idL idR body. (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprStmtContext :: (Outputable id, Outputable (NameOrRdrName id)) => HsStmtContext id -> SDoc
+ GHC.Hs.Expr: pprStmtInCtxt :: (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
+ GHC.Hs.Expr: pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc
+ GHC.Hs.Expr: pprTransformStmt :: OutputableBndrId p => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
+ GHC.Hs.Expr: ppr_apps :: OutputableBndrId p => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))] -> SDoc
+ GHC.Hs.Expr: ppr_cmd :: forall p. OutputableBndrId p => HsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_do_stmts :: (OutputableBndrId idL, OutputableBndrId idR, Outputable body) => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc
+ GHC.Hs.Expr: ppr_expr :: forall p. OutputableBndrId p => HsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_infix_expr :: OutputableBndrId p => HsExpr (GhcPass p) -> Maybe SDoc
+ GHC.Hs.Expr: ppr_lcmd :: OutputableBndrId p => LHsCmd (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_lexpr :: OutputableBndrId p => LHsExpr (GhcPass p) -> SDoc
+ GHC.Hs.Expr: ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc
+ GHC.Hs.Expr: ppr_splice :: OutputableBndrId p => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
+ GHC.Hs.Expr: ppr_splice_decl :: OutputableBndrId p => HsSplice (GhcPass p) -> SDoc
+ GHC.Hs.Expr: thBrackets :: SDoc -> SDoc -> SDoc
+ GHC.Hs.Expr: thTyBrackets :: SDoc -> SDoc
+ GHC.Hs.Expr: tupArgPresent :: LHsTupArg id -> Bool
+ GHC.Hs.Expr: type CmdLStmt id = LStmt id (LHsCmd id)
+ GHC.Hs.Expr: type CmdStmt id = Stmt id (LHsCmd id)
+ GHC.Hs.Expr: type CmdSyntaxTable p = [(Name, HsExpr p)]
+ GHC.Hs.Expr: type ExprLStmt id = LStmt id (LHsExpr id)
+ GHC.Hs.Expr: type ExprStmt id = Stmt id (LHsExpr id)
+ GHC.Hs.Expr: type GhciLStmt id = LStmt id (LHsExpr id)
+ GHC.Hs.Expr: type GhciStmt id = Stmt id (LHsExpr id)
+ GHC.Hs.Expr: type GuardLStmt id = LStmt id (LHsExpr id)
+ GHC.Hs.Expr: type GuardStmt id = Stmt id (LHsExpr id)
+ GHC.Hs.Expr: type HsRecordBinds p = HsRecFields p (LHsExpr p)
+ GHC.Hs.Expr: type LGRHS id body = Located (GRHS id body)
+ GHC.Hs.Expr: type LHsCmd id = Located (HsCmd id)
+ GHC.Hs.Expr: type LHsCmdTop p = Located (HsCmdTop p)
+ GHC.Hs.Expr: type LHsExpr p = Located (HsExpr p) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
+ GHC.Hs.Expr: type LHsTupArg id = Located (HsTupArg id)
+ GHC.Hs.Expr: type LMatch id body = Located (Match id body)
+ GHC.Hs.Expr: type LStmt id body = Located (StmtLR id id body)
+ GHC.Hs.Expr: type LStmtLR idL idR body = Located (StmtLR idL idR body)
+ GHC.Hs.Expr: type PostTcExpr = HsExpr GhcTc
+ GHC.Hs.Expr: type PostTcTable = [(Name, PostTcExpr)]
+ GHC.Hs.Expr: type SplicePointName = Name
+ GHC.Hs.Expr: type Stmt id body = StmtLR id id body
+ GHC.Hs.Expr: unboundVarOcc :: UnboundVar -> OccName
+ GHC.Hs.Extension: NoExtField :: NoExtField
+ GHC.Hs.Extension: Parsed :: Pass
+ GHC.Hs.Extension: Renamed :: Pass
+ GHC.Hs.Extension: Typechecked :: Pass
+ GHC.Hs.Extension: class Convertable a b | a -> b
+ GHC.Hs.Extension: convert :: Convertable a b => a -> b
+ GHC.Hs.Extension: data GhcPass (c :: Pass)
+ GHC.Hs.Extension: data NoExtCon
+ GHC.Hs.Extension: data NoExtField
+ GHC.Hs.Extension: data Pass
+ GHC.Hs.Extension: instance Data.Data.Data GHC.Hs.Extension.NoExtCon
+ GHC.Hs.Extension: instance Data.Data.Data GHC.Hs.Extension.NoExtField
+ GHC.Hs.Extension: instance Data.Data.Data GHC.Hs.Extension.Pass
+ GHC.Hs.Extension: instance Data.Typeable.Internal.Typeable c => Data.Data.Data (GHC.Hs.Extension.GhcPass c)
+ GHC.Hs.Extension: instance GHC.Classes.Eq (GHC.Hs.Extension.GhcPass c)
+ GHC.Hs.Extension: instance GHC.Classes.Eq GHC.Hs.Extension.NoExtCon
+ GHC.Hs.Extension: instance GHC.Classes.Eq GHC.Hs.Extension.NoExtField
+ GHC.Hs.Extension: instance GHC.Classes.Ord GHC.Hs.Extension.NoExtCon
+ GHC.Hs.Extension: instance GHC.Classes.Ord GHC.Hs.Extension.NoExtField
+ GHC.Hs.Extension: instance GHC.Hs.Extension.Convertable a a
+ GHC.Hs.Extension: instance Outputable.Outputable GHC.Hs.Extension.NoExtCon
+ GHC.Hs.Extension: instance Outputable.Outputable GHC.Hs.Extension.NoExtField
+ GHC.Hs.Extension: noExtCon :: NoExtCon -> a
+ GHC.Hs.Extension: noExtField :: NoExtField
+ GHC.Hs.Extension: type ConvertIdX a b = (XHsDoublePrim a ~ XHsDoublePrim b, XHsFloatPrim a ~ XHsFloatPrim b, XHsRat a ~ XHsRat b, XHsInteger a ~ XHsInteger b, XHsWord64Prim a ~ XHsWord64Prim b, XHsInt64Prim a ~ XHsInt64Prim b, XHsWordPrim a ~ XHsWordPrim b, XHsIntPrim a ~ XHsIntPrim b, XHsInt a ~ XHsInt b, XHsStringPrim a ~ XHsStringPrim b, XHsString a ~ XHsString b, XHsCharPrim a ~ XHsCharPrim b, XHsChar a ~ XHsChar b, XXLit a ~ XXLit b)
+ GHC.Hs.Extension: type ForallXABExport (c :: * -> Constraint) (x :: *) = (c (XABE x), c (XXABExport x))
+ GHC.Hs.Extension: type ForallXAmbiguousFieldOcc (c :: * -> Constraint) (x :: *) = (c (XUnambiguous x), c (XAmbiguous x), c (XXAmbiguousFieldOcc x))
+ GHC.Hs.Extension: type ForallXAnnDecl (c :: * -> Constraint) (x :: *) = (c (XHsAnnotation x), c (XXAnnDecl x))
+ GHC.Hs.Extension: type ForallXApplicativeArg (c :: * -> Constraint) (x :: *) = (c (XApplicativeArgOne x), c (XApplicativeArgMany x), c (XXApplicativeArg x))
+ GHC.Hs.Extension: type ForallXBracket (c :: * -> Constraint) (x :: *) = (c (XExpBr x), c (XPatBr x), c (XDecBrL x), c (XDecBrG x), c (XTypBr x), c (XVarBr x), c (XTExpBr x), c (XXBracket x))
+ GHC.Hs.Extension: type ForallXClsInstDecl (c :: * -> Constraint) (x :: *) = (c (XCClsInstDecl x), c (XXClsInstDecl x))
+ GHC.Hs.Extension: type ForallXCmd (c :: * -> Constraint) (x :: *) = (c (XCmdArrApp x), c (XCmdArrForm x), c (XCmdApp x), c (XCmdLam x), c (XCmdPar x), c (XCmdCase x), c (XCmdIf x), c (XCmdLet x), c (XCmdDo x), c (XCmdWrap x), c (XXCmd x))
+ GHC.Hs.Extension: type ForallXCmdTop (c :: * -> Constraint) (x :: *) = (c (XCmdTop x), c (XXCmdTop x))
+ GHC.Hs.Extension: type ForallXConDecl (c :: * -> Constraint) (x :: *) = (c (XConDeclGADT x), c (XConDeclH98 x), c (XXConDecl x))
+ GHC.Hs.Extension: type ForallXConDeclField (c :: * -> Constraint) (x :: *) = (c (XConDeclField x), c (XXConDeclField x))
+ GHC.Hs.Extension: type ForallXDefaultDecl (c :: * -> Constraint) (x :: *) = (c (XCDefaultDecl x), c (XXDefaultDecl x))
+ GHC.Hs.Extension: type ForallXDerivDecl (c :: * -> Constraint) (x :: *) = (c (XCDerivDecl x), c (XXDerivDecl x))
+ GHC.Hs.Extension: type ForallXExpr (c :: * -> Constraint) (x :: *) = (c (XVar x), c (XUnboundVar x), c (XConLikeOut x), c (XRecFld x), c (XOverLabel x), c (XIPVar x), c (XOverLitE x), c (XLitE x), c (XLam x), c (XLamCase x), c (XApp x), c (XAppTypeE x), c (XOpApp x), c (XNegApp x), c (XPar x), c (XSectionL x), c (XSectionR x), c (XExplicitTuple x), c (XExplicitSum x), c (XCase x), c (XIf x), c (XMultiIf x), c (XLet x), c (XDo x), c (XExplicitList x), c (XRecordCon x), c (XRecordUpd x), c (XExprWithTySig x), c (XArithSeq x), c (XSCC x), c (XCoreAnn x), c (XBracket x), c (XRnBracketOut x), c (XTcBracketOut x), c (XSpliceE x), c (XProc x), c (XStatic x), c (XTick x), c (XBinTick x), c (XTickPragma x), c (XWrap x), c (XXExpr x))
+ GHC.Hs.Extension: type ForallXFamEqn (c :: * -> Constraint) (x :: *) (r :: *) = (c (XCFamEqn x r), c (XXFamEqn x r))
+ GHC.Hs.Extension: type ForallXFamilyDecl (c :: * -> Constraint) (x :: *) = (c (XCFamilyDecl x), c (XXFamilyDecl x))
+ GHC.Hs.Extension: type ForallXFamilyResultSig (c :: * -> Constraint) (x :: *) = (c (XNoSig x), c (XCKindSig x), c (XTyVarSig x), c (XXFamilyResultSig x))
+ GHC.Hs.Extension: type ForallXFieldOcc (c :: * -> Constraint) (x :: *) = (c (XCFieldOcc x), c (XXFieldOcc x))
+ GHC.Hs.Extension: type ForallXFixitySig (c :: * -> Constraint) (x :: *) = (c (XFixitySig x), c (XXFixitySig x))
+ GHC.Hs.Extension: type ForallXForeignDecl (c :: * -> Constraint) (x :: *) = (c (XForeignImport x), c (XForeignExport x), c (XXForeignDecl x))
+ GHC.Hs.Extension: type ForallXGRHS (c :: * -> Constraint) (x :: *) (b :: *) = (c (XCGRHS x b), c (XXGRHS x b))
+ GHC.Hs.Extension: type ForallXGRHSs (c :: * -> Constraint) (x :: *) (b :: *) = (c (XCGRHSs x b), c (XXGRHSs x b))
+ GHC.Hs.Extension: type ForallXHsBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XFunBind x x'), c (XPatBind x x'), c (XVarBind x x'), c (XAbsBinds x x'), c (XPatSynBind x x'), c (XXHsBindsLR x x'))
+ GHC.Hs.Extension: type ForallXHsDataDefn (c :: * -> Constraint) (x :: *) = (c (XCHsDataDefn x), c (XXHsDataDefn x))
+ GHC.Hs.Extension: type ForallXHsDecl (c :: * -> Constraint) (x :: *) = (c (XTyClD x), c (XInstD x), c (XDerivD x), c (XValD x), c (XSigD x), c (XKindSigD x), c (XDefD x), c (XForD x), c (XWarningD x), c (XAnnD x), c (XRuleD x), c (XSpliceD x), c (XDocD x), c (XRoleAnnotD x), c (XXHsDecl x))
+ GHC.Hs.Extension: type ForallXHsDerivingClause (c :: * -> Constraint) (x :: *) = (c (XCHsDerivingClause x), c (XXHsDerivingClause x))
+ GHC.Hs.Extension: type ForallXHsGroup (c :: * -> Constraint) (x :: *) = (c (XCHsGroup x), c (XXHsGroup x))
+ GHC.Hs.Extension: type ForallXHsIPBinds (c :: * -> Constraint) (x :: *) = (c (XIPBinds x), c (XXHsIPBinds x))
+ GHC.Hs.Extension: type ForallXHsImplicitBndrs (c :: * -> Constraint) (x :: *) (b :: *) = (c (XHsIB x b), c (XXHsImplicitBndrs x b))
+ GHC.Hs.Extension: type ForallXHsLit (c :: * -> Constraint) (x :: *) = (c (XHsChar x), c (XHsCharPrim x), c (XHsDoublePrim x), c (XHsFloatPrim x), c (XHsInt x), c (XHsInt64Prim x), c (XHsIntPrim x), c (XHsInteger x), c (XHsRat x), c (XHsString x), c (XHsStringPrim x), c (XHsWord64Prim x), c (XHsWordPrim x), c (XXLit x))
+ GHC.Hs.Extension: type ForallXHsLocalBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XHsValBinds x x'), c (XHsIPBinds x x'), c (XEmptyLocalBinds x x'), c (XXHsLocalBindsLR x x'))
+ GHC.Hs.Extension: type ForallXHsWildCardBndrs (c :: * -> Constraint) (x :: *) (b :: *) = (c (XHsWC x b), c (XXHsWildCardBndrs x b))
+ GHC.Hs.Extension: type ForallXIE (c :: * -> Constraint) (x :: *) = (c (XIEVar x), c (XIEThingAbs x), c (XIEThingAll x), c (XIEThingWith x), c (XIEModuleContents x), c (XIEGroup x), c (XIEDoc x), c (XIEDocNamed x), c (XXIE x))
+ GHC.Hs.Extension: type ForallXIPBind (c :: * -> Constraint) (x :: *) = (c (XCIPBind x), c (XXIPBind x))
+ GHC.Hs.Extension: type ForallXImportDecl (c :: * -> Constraint) (x :: *) = (c (XCImportDecl x), c (XXImportDecl x))
+ GHC.Hs.Extension: type ForallXInstDecl (c :: * -> Constraint) (x :: *) = (c (XClsInstD x), c (XDataFamInstD x), c (XTyFamInstD x), c (XXInstDecl x))
+ GHC.Hs.Extension: type ForallXLHsQTyVars (c :: * -> Constraint) (x :: *) = (c (XHsQTvs x), c (XXLHsQTyVars x))
+ GHC.Hs.Extension: type ForallXMatch (c :: * -> Constraint) (x :: *) (b :: *) = (c (XCMatch x b), c (XXMatch x b))
+ GHC.Hs.Extension: type ForallXMatchGroup (c :: * -> Constraint) (x :: *) (b :: *) = (c (XMG x b), c (XXMatchGroup x b))
+ GHC.Hs.Extension: type ForallXOverLit (c :: * -> Constraint) (x :: *) = (c (XOverLit x), c (XXOverLit x))
+ GHC.Hs.Extension: type ForallXParStmtBlock (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XParStmtBlock x x'), c (XXParStmtBlock x x'))
+ GHC.Hs.Extension: type ForallXPat (c :: * -> Constraint) (x :: *) = (c (XWildPat x), c (XVarPat x), c (XLazyPat x), c (XAsPat x), c (XParPat x), c (XBangPat x), c (XListPat x), c (XTuplePat x), c (XSumPat x), c (XViewPat x), c (XSplicePat x), c (XLitPat x), c (XNPat x), c (XNPlusKPat x), c (XSigPat x), c (XCoPat x), c (XXPat x))
+ GHC.Hs.Extension: type ForallXPatSynBind (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XPSB x x'), c (XXPatSynBind x x'))
+ GHC.Hs.Extension: type ForallXRoleAnnotDecl (c :: * -> Constraint) (x :: *) = (c (XCRoleAnnotDecl x), c (XXRoleAnnotDecl x))
+ GHC.Hs.Extension: type ForallXRuleBndr (c :: * -> Constraint) (x :: *) = (c (XCRuleBndr x), c (XRuleBndrSig x), c (XXRuleBndr x))
+ GHC.Hs.Extension: type ForallXRuleDecl (c :: * -> Constraint) (x :: *) = (c (XHsRule x), c (XXRuleDecl x))
+ GHC.Hs.Extension: type ForallXRuleDecls (c :: * -> Constraint) (x :: *) = (c (XCRuleDecls x), c (XXRuleDecls x))
+ GHC.Hs.Extension: type ForallXSig (c :: * -> Constraint) (x :: *) = (c (XTypeSig x), c (XPatSynSig x), c (XClassOpSig x), c (XIdSig x), c (XFixSig x), c (XInlineSig x), c (XSpecSig x), c (XSpecInstSig x), c (XMinimalSig x), c (XSCCFunSig x), c (XCompleteMatchSig x), c (XXSig x))
+ GHC.Hs.Extension: type ForallXSplice (c :: * -> Constraint) (x :: *) = (c (XTypedSplice x), c (XUntypedSplice x), c (XQuasiQuote x), c (XSpliced x), c (XXSplice x))
+ GHC.Hs.Extension: type ForallXSpliceDecl (c :: * -> Constraint) (x :: *) = (c (XSpliceDecl x), c (XXSpliceDecl x))
+ GHC.Hs.Extension: type ForallXStmtLR (c :: * -> Constraint) (x :: *) (x' :: *) (b :: *) = (c (XLastStmt x x' b), c (XBindStmt x x' b), c (XApplicativeStmt x x' b), c (XBodyStmt x x' b), c (XLetStmt x x' b), c (XParStmt x x' b), c (XTransStmt x x' b), c (XRecStmt x x' b), c (XXStmtLR x x' b))
+ GHC.Hs.Extension: type ForallXTupArg (c :: * -> Constraint) (x :: *) = (c (XPresent x), c (XMissing x), c (XXTupArg x))
+ GHC.Hs.Extension: type ForallXTyClDecl (c :: * -> Constraint) (x :: *) = (c (XFamDecl x), c (XSynDecl x), c (XDataDecl x), c (XClassDecl x), c (XXTyClDecl x))
+ GHC.Hs.Extension: type ForallXTyClGroup (c :: * -> Constraint) (x :: *) = (c (XCTyClGroup x), c (XXTyClGroup x))
+ GHC.Hs.Extension: type ForallXTyVarBndr (c :: * -> Constraint) (x :: *) = (c (XUserTyVar x), c (XKindedTyVar x), c (XXTyVarBndr x))
+ GHC.Hs.Extension: type ForallXType (c :: * -> Constraint) (x :: *) = (c (XForAllTy x), c (XQualTy x), c (XTyVar x), c (XAppTy x), c (XAppKindTy x), c (XFunTy x), c (XListTy x), c (XTupleTy x), c (XSumTy x), c (XOpTy x), c (XParTy x), c (XIParamTy x), c (XStarTy x), c (XKindSig x), c (XSpliceTy x), c (XDocTy x), c (XBangTy x), c (XRecTy x), c (XExplicitListTy x), c (XExplicitTupleTy x), c (XTyLit x), c (XWildCardTy x), c (XXType x))
+ GHC.Hs.Extension: type ForallXValBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) = (c (XValBinds x x'), c (XXValBindsLR x x'))
+ GHC.Hs.Extension: type ForallXWarnDecl (c :: * -> Constraint) (x :: *) = (c (XWarning x), c (XXWarnDecl x))
+ GHC.Hs.Extension: type ForallXWarnDecls (c :: * -> Constraint) (x :: *) = (c (XWarnings x), c (XXWarnDecls x))
+ GHC.Hs.Extension: type GhcPs = GhcPass 'Parsed
+ GHC.Hs.Extension: type GhcRn = GhcPass 'Renamed
+ GHC.Hs.Extension: type GhcTc = GhcPass 'Typechecked
+ GHC.Hs.Extension: type GhcTcId = GhcTc
+ GHC.Hs.Extension: type LIdP p = Located (IdP p)
+ GHC.Hs.Extension: type OutputableBndrId pass = (OutputableBndr (NameOrRdrName (IdP (GhcPass pass))), OutputableBndr (IdP (GhcPass pass)), OutputableBndr (NameOrRdrName (IdP (NoGhcTc (GhcPass pass)))), OutputableBndr (IdP (NoGhcTc (GhcPass pass))), NoGhcTc (GhcPass pass) ~ NoGhcTc (NoGhcTc (GhcPass pass)), OutputableX (GhcPass pass), OutputableX (NoGhcTc (GhcPass pass)))
+ GHC.Hs.Extension: type OutputableX p = (Outputable (XIPBinds p), Outputable (XViaStrategy p), Outputable (XViaStrategy GhcRn))
+ GHC.Hs.Extension: type family XXIE x
+ GHC.Hs.ImpExp: IEDoc :: XIEDoc pass -> HsDocString -> IE pass
+ GHC.Hs.ImpExp: IEDocNamed :: XIEDocNamed pass -> String -> IE pass
+ GHC.Hs.ImpExp: IEGroup :: XIEGroup pass -> Int -> HsDocString -> IE pass
+ GHC.Hs.ImpExp: IEModuleContents :: XIEModuleContents pass -> Located ModuleName -> IE pass
+ GHC.Hs.ImpExp: IEName :: Located name -> IEWrappedName name
+ GHC.Hs.ImpExp: IEPattern :: Located name -> IEWrappedName name
+ GHC.Hs.ImpExp: IEThingAbs :: XIEThingAbs pass -> LIEWrappedName (IdP pass) -> IE pass
+ GHC.Hs.ImpExp: IEThingAll :: XIEThingAll pass -> LIEWrappedName (IdP pass) -> IE pass
+ GHC.Hs.ImpExp: IEThingWith :: XIEThingWith pass -> LIEWrappedName (IdP pass) -> IEWildcard -> [LIEWrappedName (IdP pass)] -> [Located (FieldLbl (IdP pass))] -> IE pass
+ GHC.Hs.ImpExp: IEType :: Located name -> IEWrappedName name
+ GHC.Hs.ImpExp: IEVar :: XIEVar pass -> LIEWrappedName (IdP pass) -> IE pass
+ GHC.Hs.ImpExp: IEWildcard :: Int -> IEWildcard
+ GHC.Hs.ImpExp: ImportDecl :: XCImportDecl pass -> SourceText -> Located ModuleName -> Maybe StringLiteral -> Bool -> Bool -> ImportDeclQualifiedStyle -> Bool -> Maybe (Located ModuleName) -> Maybe (Bool, Located [LIE pass]) -> ImportDecl pass
+ GHC.Hs.ImpExp: NoIEWildcard :: IEWildcard
+ GHC.Hs.ImpExp: NotQualified :: ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: QualifiedPost :: ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: QualifiedPre :: ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: XIE :: XXIE pass -> IE pass
+ GHC.Hs.ImpExp: XImportDecl :: XXImportDecl pass -> ImportDecl pass
+ GHC.Hs.ImpExp: [ideclAs] :: ImportDecl pass -> Maybe (Located ModuleName)
+ GHC.Hs.ImpExp: [ideclExt] :: ImportDecl pass -> XCImportDecl pass
+ GHC.Hs.ImpExp: [ideclHiding] :: ImportDecl pass -> Maybe (Bool, Located [LIE pass])
+ GHC.Hs.ImpExp: [ideclImplicit] :: ImportDecl pass -> Bool
+ GHC.Hs.ImpExp: [ideclName] :: ImportDecl pass -> Located ModuleName
+ GHC.Hs.ImpExp: [ideclPkgQual] :: ImportDecl pass -> Maybe StringLiteral
+ GHC.Hs.ImpExp: [ideclQualified] :: ImportDecl pass -> ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: [ideclSafe] :: ImportDecl pass -> Bool
+ GHC.Hs.ImpExp: [ideclSourceSrc] :: ImportDecl pass -> SourceText
+ GHC.Hs.ImpExp: [ideclSource] :: ImportDecl pass -> Bool
+ GHC.Hs.ImpExp: data IE pass
+ GHC.Hs.ImpExp: data IEWildcard
+ GHC.Hs.ImpExp: data IEWrappedName name
+ GHC.Hs.ImpExp: data ImportDecl pass
+ GHC.Hs.ImpExp: data ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: ieLWrappedName :: LIEWrappedName name -> Located name
+ GHC.Hs.ImpExp: ieName :: IE (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.ImpExp: ieNames :: IE (GhcPass p) -> [IdP (GhcPass p)]
+ GHC.Hs.ImpExp: ieWrappedName :: IEWrappedName name -> name
+ GHC.Hs.ImpExp: importDeclQualifiedStyle :: Maybe (Located a) -> Maybe (Located a) -> ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: instance Data.Data.Data GHC.Hs.ImpExp.IEWildcard
+ GHC.Hs.ImpExp: instance Data.Data.Data GHC.Hs.ImpExp.ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: instance Data.Data.Data name => Data.Data.Data (GHC.Hs.ImpExp.IEWrappedName name)
+ GHC.Hs.ImpExp: instance GHC.Classes.Eq GHC.Hs.ImpExp.IEWildcard
+ GHC.Hs.ImpExp: instance GHC.Classes.Eq GHC.Hs.ImpExp.ImportDeclQualifiedStyle
+ GHC.Hs.ImpExp: instance GHC.Classes.Eq name => GHC.Classes.Eq (GHC.Hs.ImpExp.IEWrappedName name)
+ GHC.Hs.ImpExp: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.ImpExp.IE (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.ImpExp: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.ImpExp.ImportDecl (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.ImpExp: instance OccName.HasOccName name => OccName.HasOccName (GHC.Hs.ImpExp.IEWrappedName name)
+ GHC.Hs.ImpExp: instance Outputable.OutputableBndr name => Outputable.Outputable (GHC.Hs.ImpExp.IEWrappedName name)
+ GHC.Hs.ImpExp: instance Outputable.OutputableBndr name => Outputable.OutputableBndr (GHC.Hs.ImpExp.IEWrappedName name)
+ GHC.Hs.ImpExp: isImportDeclQualified :: ImportDeclQualifiedStyle -> Bool
+ GHC.Hs.ImpExp: lieWrappedName :: LIEWrappedName name -> name
+ GHC.Hs.ImpExp: pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc
+ GHC.Hs.ImpExp: replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2
+ GHC.Hs.ImpExp: replaceWrappedName :: IEWrappedName name1 -> name2 -> IEWrappedName name2
+ GHC.Hs.ImpExp: simpleImportDecl :: ModuleName -> ImportDecl (GhcPass p)
+ GHC.Hs.ImpExp: type LIE pass = Located (IE pass) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'"
+ GHC.Hs.ImpExp: type LIEWrappedName name = Located (IEWrappedName name)
+ GHC.Hs.ImpExp: type LImportDecl pass = Located (ImportDecl pass) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'"
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.ABExport GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.ABExport GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.ABExport GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.FixitySig GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.FixitySig GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.FixitySig GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsBindLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsBindLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsBindLR GHC.Hs.Extension.GhcRn GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsBindLR GHC.Hs.Extension.GhcTc GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsIPBinds GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsIPBinds GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsIPBinds GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsLocalBindsLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsLocalBindsLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsLocalBindsLR GHC.Hs.Extension.GhcRn GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsLocalBindsLR GHC.Hs.Extension.GhcTc GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsPatSynDir GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsPatSynDir GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsPatSynDir GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsValBindsLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsValBindsLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsValBindsLR GHC.Hs.Extension.GhcRn GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.HsValBindsLR GHC.Hs.Extension.GhcTc GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.IPBind GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.IPBind GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.IPBind GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.NHsValBindsLR GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.NHsValBindsLR GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.NHsValBindsLR GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.PatSynBind GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.PatSynBind GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.PatSynBind GHC.Hs.Extension.GhcRn GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.PatSynBind GHC.Hs.Extension.GhcTc GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.Sig GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.Sig GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Binds.Sig GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.AnnDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.AnnDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.AnnDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ClsInstDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ClsInstDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ClsInstDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ConDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ConDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ConDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DataFamInstDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DataFamInstDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DataFamInstDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DefaultDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DefaultDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DefaultDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DerivDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DerivDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DerivDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DerivStrategy GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DerivStrategy GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.DerivStrategy GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyInfo GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyInfo GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyInfo GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyResultSig GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyResultSig GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.FamilyResultSig GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ForeignDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ForeignDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.ForeignDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDataDefn GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDataDefn GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDataDefn GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDerivingClause GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDerivingClause GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsDerivingClause GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsGroup GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsGroup GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.HsGroup GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.InjectivityAnn GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.InjectivityAnn GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.InjectivityAnn GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.InstDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.InstDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.InstDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RoleAnnotDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RoleAnnotDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RoleAnnotDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleBndr GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleBndr GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleBndr GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleDecls GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleDecls GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.RuleDecls GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.SpliceDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.SpliceDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.SpliceDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.StandaloneKindSig GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.StandaloneKindSig GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.StandaloneKindSig GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyClDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyClDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyClDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyClGroup GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyClGroup GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyClGroup GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyFamInstDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyFamInstDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.TyFamInstDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.WarnDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.WarnDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.WarnDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.WarnDecls GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.WarnDecls GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Decls.WarnDecls GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ApplicativeArg GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ApplicativeArg GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ApplicativeArg GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ArithSeqInfo GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ArithSeqInfo GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ArithSeqInfo GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsBracket GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsBracket GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsBracket GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsCmd GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsCmd GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsCmd GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsCmdTop GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsCmdTop GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsCmdTop GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsExpr GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsExpr GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsExpr GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsSplice GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsSplice GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsSplice GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsSplicedThing GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsSplicedThing GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsSplicedThing GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsTupArg GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsTupArg GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.HsTupArg GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ParStmtBlock GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ParStmtBlock GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ParStmtBlock GHC.Hs.Extension.GhcRn GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.ParStmtBlock GHC.Hs.Extension.GhcTc GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.SyntaxExpr GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.SyntaxExpr GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Expr.SyntaxExpr GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.ImpExp.IE GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.ImpExp.IE GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.ImpExp.IE GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.ImpExp.ImportDecl GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.ImpExp.ImportDecl GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.ImpExp.ImportDecl GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Lit.HsLit GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Lit.HsLit GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Lit.HsLit GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Lit.HsOverLit GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Lit.HsOverLit GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Lit.HsOverLit GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Pat.Pat GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Pat.Pat GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Pat.Pat GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.AmbiguousFieldOcc GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.AmbiguousFieldOcc GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.AmbiguousFieldOcc GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.ConDeclField GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.ConDeclField GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.ConDeclField GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.FieldOcc GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.FieldOcc GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.FieldOcc GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.HsTyVarBndr GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.HsTyVarBndr GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.HsTyVarBndr GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.HsType GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.HsType GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.HsType GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.LHsQTyVars GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.LHsQTyVars GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.LHsQTyVars GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.LHsTypeArg GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.LHsTypeArg GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance Data.Data.Data (GHC.Hs.Types.LHsTypeArg GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Instances: instance Data.Data.Data GHC.Hs.Expr.CmdTopTc
+ GHC.Hs.Instances: instance Data.Data.Data GHC.Hs.Expr.PendingRnSplice
+ GHC.Hs.Instances: instance Data.Data.Data GHC.Hs.Expr.PendingTcSplice
+ GHC.Hs.Instances: instance Data.Data.Data GHC.Hs.Expr.RecStmtTc
+ GHC.Hs.Instances: instance Data.Data.Data GHC.Hs.Expr.RecordConTc
+ GHC.Hs.Instances: instance Data.Data.Data GHC.Hs.Pat.ListPatTc
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.GRHS GHC.Hs.Extension.GhcPs body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.GRHS GHC.Hs.Extension.GhcRn body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.GRHS GHC.Hs.Extension.GhcTc body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.GRHSs GHC.Hs.Extension.GhcPs body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.GRHSs GHC.Hs.Extension.GhcRn body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.GRHSs GHC.Hs.Extension.GhcTc body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.Match GHC.Hs.Extension.GhcPs body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.Match GHC.Hs.Extension.GhcRn body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.Match GHC.Hs.Extension.GhcTc body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.MatchGroup GHC.Hs.Extension.GhcPs body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.MatchGroup GHC.Hs.Extension.GhcRn body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.MatchGroup GHC.Hs.Extension.GhcTc body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.StmtLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcPs body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.StmtLR GHC.Hs.Extension.GhcPs GHC.Hs.Extension.GhcRn body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.StmtLR GHC.Hs.Extension.GhcRn GHC.Hs.Extension.GhcRn body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Expr.StmtLR GHC.Hs.Extension.GhcTc GHC.Hs.Extension.GhcTc body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Pat.HsRecFields GHC.Hs.Extension.GhcPs body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Pat.HsRecFields GHC.Hs.Extension.GhcRn body)
+ GHC.Hs.Instances: instance Data.Data.Data body => Data.Data.Data (GHC.Hs.Pat.HsRecFields GHC.Hs.Extension.GhcTc body)
+ GHC.Hs.Instances: instance Data.Data.Data rhs => Data.Data.Data (GHC.Hs.Decls.FamEqn GHC.Hs.Extension.GhcPs rhs)
+ GHC.Hs.Instances: instance Data.Data.Data rhs => Data.Data.Data (GHC.Hs.Decls.FamEqn GHC.Hs.Extension.GhcRn rhs)
+ GHC.Hs.Instances: instance Data.Data.Data rhs => Data.Data.Data (GHC.Hs.Decls.FamEqn GHC.Hs.Extension.GhcTc rhs)
+ GHC.Hs.Instances: instance Data.Data.Data thing => Data.Data.Data (GHC.Hs.Types.HsImplicitBndrs GHC.Hs.Extension.GhcPs thing)
+ GHC.Hs.Instances: instance Data.Data.Data thing => Data.Data.Data (GHC.Hs.Types.HsImplicitBndrs GHC.Hs.Extension.GhcRn thing)
+ GHC.Hs.Instances: instance Data.Data.Data thing => Data.Data.Data (GHC.Hs.Types.HsImplicitBndrs GHC.Hs.Extension.GhcTc thing)
+ GHC.Hs.Instances: instance Data.Data.Data thing => Data.Data.Data (GHC.Hs.Types.HsWildCardBndrs GHC.Hs.Extension.GhcPs thing)
+ GHC.Hs.Instances: instance Data.Data.Data thing => Data.Data.Data (GHC.Hs.Types.HsWildCardBndrs GHC.Hs.Extension.GhcRn thing)
+ GHC.Hs.Instances: instance Data.Data.Data thing => Data.Data.Data (GHC.Hs.Types.HsWildCardBndrs GHC.Hs.Extension.GhcTc thing)
+ GHC.Hs.Instances: instance GHC.Classes.Eq (GHC.Hs.ImpExp.IE GHC.Hs.Extension.GhcPs)
+ GHC.Hs.Instances: instance GHC.Classes.Eq (GHC.Hs.ImpExp.IE GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Instances: instance GHC.Classes.Eq (GHC.Hs.ImpExp.IE GHC.Hs.Extension.GhcTc)
+ GHC.Hs.Lit: HsChar :: XHsChar x -> Char -> HsLit x
+ GHC.Hs.Lit: HsCharPrim :: XHsCharPrim x -> Char -> HsLit x
+ GHC.Hs.Lit: HsDoublePrim :: XHsDoublePrim x -> FractionalLit -> HsLit x
+ GHC.Hs.Lit: HsFloatPrim :: XHsFloatPrim x -> FractionalLit -> HsLit x
+ GHC.Hs.Lit: HsFractional :: !FractionalLit -> OverLitVal
+ GHC.Hs.Lit: HsInt :: XHsInt x -> IntegralLit -> HsLit x
+ GHC.Hs.Lit: HsInt64Prim :: XHsInt64Prim x -> Integer -> HsLit x
+ GHC.Hs.Lit: HsIntPrim :: XHsIntPrim x -> Integer -> HsLit x
+ GHC.Hs.Lit: HsInteger :: XHsInteger x -> Integer -> Type -> HsLit x
+ GHC.Hs.Lit: HsIntegral :: !IntegralLit -> OverLitVal
+ GHC.Hs.Lit: HsIsString :: !SourceText -> !FastString -> OverLitVal
+ GHC.Hs.Lit: HsRat :: XHsRat x -> FractionalLit -> Type -> HsLit x
+ GHC.Hs.Lit: HsString :: XHsString x -> FastString -> HsLit x
+ GHC.Hs.Lit: HsStringPrim :: XHsStringPrim x -> ByteString -> HsLit x
+ GHC.Hs.Lit: HsWord64Prim :: XHsWord64Prim x -> Integer -> HsLit x
+ GHC.Hs.Lit: HsWordPrim :: XHsWordPrim x -> Integer -> HsLit x
+ GHC.Hs.Lit: OverLit :: XOverLit p -> OverLitVal -> HsExpr p -> HsOverLit p
+ GHC.Hs.Lit: OverLitTc :: Bool -> Type -> OverLitTc
+ GHC.Hs.Lit: XLit :: XXLit x -> HsLit x
+ GHC.Hs.Lit: XOverLit :: XXOverLit p -> HsOverLit p
+ GHC.Hs.Lit: [ol_ext] :: HsOverLit p -> XOverLit p
+ GHC.Hs.Lit: [ol_rebindable] :: OverLitTc -> Bool
+ GHC.Hs.Lit: [ol_type] :: OverLitTc -> Type
+ GHC.Hs.Lit: [ol_val] :: HsOverLit p -> OverLitVal
+ GHC.Hs.Lit: [ol_witness] :: HsOverLit p -> HsExpr p
+ GHC.Hs.Lit: convertLit :: ConvertIdX a b => HsLit a -> HsLit b
+ GHC.Hs.Lit: data HsLit x
+ GHC.Hs.Lit: data HsOverLit p
+ GHC.Hs.Lit: data OverLitTc
+ GHC.Hs.Lit: data OverLitVal
+ GHC.Hs.Lit: hsLitNeedsParens :: PprPrec -> HsLit x -> Bool
+ GHC.Hs.Lit: hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool
+ GHC.Hs.Lit: instance Data.Data.Data GHC.Hs.Lit.OverLitTc
+ GHC.Hs.Lit: instance Data.Data.Data GHC.Hs.Lit.OverLitVal
+ GHC.Hs.Lit: instance GHC.Classes.Eq (GHC.Hs.Extension.XXOverLit p) => GHC.Classes.Eq (GHC.Hs.Lit.HsOverLit p)
+ GHC.Hs.Lit: instance GHC.Classes.Eq (GHC.Hs.Lit.HsLit x)
+ GHC.Hs.Lit: instance GHC.Classes.Eq GHC.Hs.Lit.OverLitVal
+ GHC.Hs.Lit: instance GHC.Classes.Ord (GHC.Hs.Extension.XXOverLit p) => GHC.Classes.Ord (GHC.Hs.Lit.HsOverLit p)
+ GHC.Hs.Lit: instance GHC.Classes.Ord GHC.Hs.Lit.OverLitVal
+ GHC.Hs.Lit: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Lit.HsOverLit (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Lit: instance Outputable.Outputable (GHC.Hs.Lit.HsLit (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Lit: instance Outputable.Outputable GHC.Hs.Lit.OverLitVal
+ GHC.Hs.Lit: negateOverLitVal :: OverLitVal -> OverLitVal
+ GHC.Hs.Lit: overLitType :: HsOverLit GhcTc -> Type
+ GHC.Hs.Lit: pmPprHsLit :: HsLit (GhcPass x) -> SDoc
+ GHC.Hs.Lit: pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc
+ GHC.Hs.Pat: AsPat :: XAsPat p -> Located (IdP p) -> LPat p -> Pat p
+ GHC.Hs.Pat: BangPat :: XBangPat p -> LPat p -> Pat p
+ GHC.Hs.Pat: CoPat :: XCoPat p -> HsWrapper -> Pat p -> Type -> Pat p
+ GHC.Hs.Pat: ConPatIn :: Located (IdP p) -> HsConPatDetails p -> Pat p
+ GHC.Hs.Pat: ConPatOut :: Located ConLike -> [Type] -> [TyVar] -> [EvVar] -> TcEvBinds -> HsConPatDetails p -> HsWrapper -> Pat p
+ GHC.Hs.Pat: HsRecField :: Located id -> arg -> Bool -> HsRecField' id arg
+ GHC.Hs.Pat: HsRecFields :: [LHsRecField p arg] -> Maybe (Located Int) -> HsRecFields p arg
+ GHC.Hs.Pat: LazyPat :: XLazyPat p -> LPat p -> Pat p
+ GHC.Hs.Pat: ListPat :: XListPat p -> [LPat p] -> Pat p
+ GHC.Hs.Pat: ListPatTc :: Type -> Maybe (Type, SyntaxExpr GhcTc) -> ListPatTc
+ GHC.Hs.Pat: LitPat :: XLitPat p -> HsLit p -> Pat p
+ GHC.Hs.Pat: NPat :: XNPat p -> Located (HsOverLit p) -> Maybe (SyntaxExpr p) -> SyntaxExpr p -> Pat p
+ GHC.Hs.Pat: NPlusKPat :: XNPlusKPat p -> Located (IdP p) -> Located (HsOverLit p) -> HsOverLit p -> SyntaxExpr p -> SyntaxExpr p -> Pat p
+ GHC.Hs.Pat: ParPat :: XParPat p -> LPat p -> Pat p
+ GHC.Hs.Pat: SigPat :: XSigPat p -> LPat p -> LHsSigWcType (NoGhcTc p) -> Pat p
+ GHC.Hs.Pat: SplicePat :: XSplicePat p -> HsSplice p -> Pat p
+ GHC.Hs.Pat: SumPat :: XSumPat p -> LPat p -> ConTag -> Arity -> Pat p
+ GHC.Hs.Pat: TuplePat :: XTuplePat p -> [LPat p] -> Boxity -> Pat p
+ GHC.Hs.Pat: VarPat :: XVarPat p -> Located (IdP p) -> Pat p
+ GHC.Hs.Pat: ViewPat :: XViewPat p -> LHsExpr p -> LPat p -> Pat p
+ GHC.Hs.Pat: WildPat :: XWildPat p -> Pat p
+ GHC.Hs.Pat: XPat :: XXPat p -> Pat p
+ GHC.Hs.Pat: [hsRecFieldArg] :: HsRecField' id arg -> arg
+ GHC.Hs.Pat: [hsRecFieldLbl] :: HsRecField' id arg -> Located id
+ GHC.Hs.Pat: [hsRecPun] :: HsRecField' id arg -> Bool
+ GHC.Hs.Pat: [pat_arg_tys] :: Pat p -> [Type]
+ GHC.Hs.Pat: [pat_args] :: Pat p -> HsConPatDetails p
+ GHC.Hs.Pat: [pat_binds] :: Pat p -> TcEvBinds
+ GHC.Hs.Pat: [pat_con] :: Pat p -> Located ConLike
+ GHC.Hs.Pat: [pat_dicts] :: Pat p -> [EvVar]
+ GHC.Hs.Pat: [pat_tvs] :: Pat p -> [TyVar]
+ GHC.Hs.Pat: [pat_wrap] :: Pat p -> HsWrapper
+ GHC.Hs.Pat: [rec_dotdot] :: HsRecFields p arg -> Maybe (Located Int)
+ GHC.Hs.Pat: [rec_flds] :: HsRecFields p arg -> [LHsRecField p arg]
+ GHC.Hs.Pat: collectEvVarsPat :: Pat GhcTc -> Bag EvVar
+ GHC.Hs.Pat: collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar
+ GHC.Hs.Pat: data HsRecField' id arg
+ GHC.Hs.Pat: data HsRecFields p arg
+ GHC.Hs.Pat: data ListPatTc
+ GHC.Hs.Pat: data Pat p
+ GHC.Hs.Pat: hsConPatArgs :: HsConPatDetails p -> [LPat p]
+ GHC.Hs.Pat: hsRecFieldId :: HsRecField GhcTc arg -> Located Id
+ GHC.Hs.Pat: hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)
+ GHC.Hs.Pat: hsRecFields :: HsRecFields p arg -> [XCFieldOcc p]
+ GHC.Hs.Pat: hsRecFieldsArgs :: HsRecFields p arg -> [arg]
+ GHC.Hs.Pat: hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id
+ GHC.Hs.Pat: hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc
+ GHC.Hs.Pat: hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName
+ GHC.Hs.Pat: instance (Data.Data.Data id, Data.Data.Data arg) => Data.Data.Data (GHC.Hs.Pat.HsRecField' id arg)
+ GHC.Hs.Pat: instance (Outputable.Outputable p, Outputable.Outputable arg) => Outputable.Outputable (GHC.Hs.Pat.HsRecField' p arg)
+ GHC.Hs.Pat: instance Data.Foldable.Foldable (GHC.Hs.Pat.HsRecField' id)
+ GHC.Hs.Pat: instance Data.Foldable.Foldable (GHC.Hs.Pat.HsRecFields p)
+ GHC.Hs.Pat: instance Data.Traversable.Traversable (GHC.Hs.Pat.HsRecField' id)
+ GHC.Hs.Pat: instance Data.Traversable.Traversable (GHC.Hs.Pat.HsRecFields p)
+ GHC.Hs.Pat: instance GHC.Base.Functor (GHC.Hs.Pat.HsRecField' id)
+ GHC.Hs.Pat: instance GHC.Base.Functor (GHC.Hs.Pat.HsRecFields p)
+ GHC.Hs.Pat: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Pat.Pat (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Pat: instance Outputable.Outputable arg => Outputable.Outputable (GHC.Hs.Pat.HsRecFields p arg)
+ GHC.Hs.Pat: isBangedLPat :: LPat (GhcPass p) -> Bool
+ GHC.Hs.Pat: isIrrefutableHsPat :: OutputableBndrId p => LPat (GhcPass p) -> Bool
+ GHC.Hs.Pat: looksLazyPatBind :: HsBind (GhcPass p) -> Bool
+ GHC.Hs.Pat: mkCharLitPat :: SourceText -> Char -> OutPat (GhcPass p)
+ GHC.Hs.Pat: mkNilPat :: Type -> OutPat (GhcPass p)
+ GHC.Hs.Pat: mkPrefixConPat :: DataCon -> [OutPat (GhcPass p)] -> [Type] -> OutPat (GhcPass p)
+ GHC.Hs.Pat: parenthesizePat :: PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
+ GHC.Hs.Pat: patNeedsParens :: PprPrec -> Pat p -> Bool
+ GHC.Hs.Pat: pprConArgs :: OutputableBndrId p => HsConPatDetails (GhcPass p) -> SDoc
+ GHC.Hs.Pat: pprParendLPat :: OutputableBndrId p => PprPrec -> LPat (GhcPass p) -> SDoc
+ GHC.Hs.Pat: type HsConPatDetails p = HsConDetails (LPat p) (HsRecFields p (LPat p))
+ GHC.Hs.Pat: type HsRecField p arg = HsRecField' (FieldOcc p) arg
+ GHC.Hs.Pat: type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p)
+ GHC.Hs.Pat: type InPat p = LPat p
+ GHC.Hs.Pat: type LHsRecField p arg = Located (HsRecField p arg)
+ GHC.Hs.Pat: type LHsRecField' p arg = Located (HsRecField' p arg)
+ GHC.Hs.Pat: type LHsRecUpdField p = Located (HsRecUpdField p)
+ GHC.Hs.Pat: type LPat p = XRec p Pat
+ GHC.Hs.Pat: type OutPat p = LPat p
+ GHC.Hs.PlaceHolder: placeHolderNamesTc :: NameSet
+ GHC.Hs.PlaceHolder: type family NameOrRdrName id
+ GHC.Hs.Types: Ambiguous :: XAmbiguous pass -> Located RdrName -> AmbiguousFieldOcc pass
+ GHC.Hs.Types: ConDeclField :: XConDeclField pass -> [LFieldOcc pass] -> LBangType pass -> Maybe LHsDocString -> ConDeclField pass
+ GHC.Hs.Types: FieldOcc :: XCFieldOcc pass -> Located RdrName -> FieldOcc pass
+ GHC.Hs.Types: ForallInvis :: ForallVisFlag
+ GHC.Hs.Types: ForallVis :: ForallVisFlag
+ GHC.Hs.Types: HsAppKindTy :: XAppKindTy pass -> LHsType pass -> LHsKind pass -> HsType pass
+ GHC.Hs.Types: HsAppTy :: XAppTy pass -> LHsType pass -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsArgPar :: SrcSpan -> HsArg tm ty
+ GHC.Hs.Types: HsBangTy :: XBangTy pass -> HsSrcBang -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsBoxedOrConstraintTuple :: HsTupleSort
+ GHC.Hs.Types: HsBoxedTuple :: HsTupleSort
+ GHC.Hs.Types: HsConstraintTuple :: HsTupleSort
+ GHC.Hs.Types: HsDocTy :: XDocTy pass -> LHsType pass -> LHsDocString -> HsType pass
+ GHC.Hs.Types: HsExplicitListTy :: XExplicitListTy pass -> PromotionFlag -> [LHsType pass] -> HsType pass
+ GHC.Hs.Types: HsExplicitTupleTy :: XExplicitTupleTy pass -> [LHsType pass] -> HsType pass
+ GHC.Hs.Types: HsForAllTy :: XForAllTy pass -> ForallVisFlag -> [LHsTyVarBndr pass] -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsFunTy :: XFunTy pass -> LHsType pass -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsIB :: XHsIB pass thing -> thing -> HsImplicitBndrs pass thing
+ GHC.Hs.Types: HsIPName :: FastString -> HsIPName
+ GHC.Hs.Types: HsIParamTy :: XIParamTy pass -> Located HsIPName -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsKindSig :: XKindSig pass -> LHsType pass -> LHsKind pass -> HsType pass
+ GHC.Hs.Types: HsLazy :: HsImplBang
+ GHC.Hs.Types: HsListTy :: XListTy pass -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsNumTy :: SourceText -> Integer -> HsTyLit
+ GHC.Hs.Types: HsOpTy :: XOpTy pass -> LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsParTy :: XParTy pass -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr pass] -> LHsQTyVars pass
+ GHC.Hs.Types: HsQualTy :: XQualTy pass -> LHsContext pass -> LHsType pass -> HsType pass
+ GHC.Hs.Types: HsRecTy :: XRecTy pass -> [LConDeclField pass] -> HsType pass
+ GHC.Hs.Types: HsSpliceTy :: XSpliceTy pass -> HsSplice pass -> HsType pass
+ GHC.Hs.Types: HsSrcBang :: SourceText -> SrcUnpackedness -> SrcStrictness -> HsSrcBang
+ GHC.Hs.Types: HsStarTy :: XStarTy pass -> Bool -> HsType pass
+ GHC.Hs.Types: HsStrTy :: SourceText -> FastString -> HsTyLit
+ GHC.Hs.Types: HsStrict :: HsImplBang
+ GHC.Hs.Types: HsSumTy :: XSumTy pass -> [LHsType pass] -> HsType pass
+ GHC.Hs.Types: HsTupleTy :: XTupleTy pass -> HsTupleSort -> [LHsType pass] -> HsType pass
+ GHC.Hs.Types: HsTyLit :: XTyLit pass -> HsTyLit -> HsType pass
+ GHC.Hs.Types: HsTyVar :: XTyVar pass -> PromotionFlag -> Located (IdP pass) -> HsType pass
+ GHC.Hs.Types: HsTypeArg :: SrcSpan -> ty -> HsArg tm ty
+ GHC.Hs.Types: HsUnboxedTuple :: HsTupleSort
+ GHC.Hs.Types: HsUnpack :: Maybe Coercion -> HsImplBang
+ GHC.Hs.Types: HsValArg :: tm -> HsArg tm ty
+ GHC.Hs.Types: HsWC :: XHsWC pass thing -> thing -> HsWildCardBndrs pass thing
+ GHC.Hs.Types: HsWildCardTy :: XWildCardTy pass -> HsType pass
+ GHC.Hs.Types: InfixCon :: arg -> arg -> HsConDetails arg rec
+ GHC.Hs.Types: KindedTyVar :: XKindedTyVar pass -> Located (IdP pass) -> LHsKind pass -> HsTyVarBndr pass
+ GHC.Hs.Types: NHsCoreTy :: Type -> NewHsTypeX
+ GHC.Hs.Types: NoSrcStrict :: SrcStrictness
+ GHC.Hs.Types: NoSrcUnpack :: SrcUnpackedness
+ GHC.Hs.Types: PrefixCon :: [arg] -> HsConDetails arg rec
+ GHC.Hs.Types: RecCon :: rec -> HsConDetails arg rec
+ GHC.Hs.Types: SrcLazy :: SrcStrictness
+ GHC.Hs.Types: SrcNoUnpack :: SrcUnpackedness
+ GHC.Hs.Types: SrcStrict :: SrcStrictness
+ GHC.Hs.Types: SrcUnpack :: SrcUnpackedness
+ GHC.Hs.Types: Unambiguous :: XUnambiguous pass -> Located RdrName -> AmbiguousFieldOcc pass
+ GHC.Hs.Types: UserTyVar :: XUserTyVar pass -> Located (IdP pass) -> HsTyVarBndr pass
+ GHC.Hs.Types: XAmbiguousFieldOcc :: XXAmbiguousFieldOcc pass -> AmbiguousFieldOcc pass
+ GHC.Hs.Types: XConDeclField :: XXConDeclField pass -> ConDeclField pass
+ GHC.Hs.Types: XFieldOcc :: XXFieldOcc pass -> FieldOcc pass
+ GHC.Hs.Types: XHsImplicitBndrs :: XXHsImplicitBndrs pass thing -> HsImplicitBndrs pass thing
+ GHC.Hs.Types: XHsType :: XXType pass -> HsType pass
+ GHC.Hs.Types: XHsWildCardBndrs :: XXHsWildCardBndrs pass thing -> HsWildCardBndrs pass thing
+ GHC.Hs.Types: XLHsQTyVars :: XXLHsQTyVars pass -> LHsQTyVars pass
+ GHC.Hs.Types: XTyVarBndr :: XXTyVarBndr pass -> HsTyVarBndr pass
+ GHC.Hs.Types: [cd_fld_doc] :: ConDeclField pass -> Maybe LHsDocString
+ GHC.Hs.Types: [cd_fld_ext] :: ConDeclField pass -> XConDeclField pass
+ GHC.Hs.Types: [cd_fld_names] :: ConDeclField pass -> [LFieldOcc pass]
+ GHC.Hs.Types: [cd_fld_type] :: ConDeclField pass -> LBangType pass
+ GHC.Hs.Types: [extFieldOcc] :: FieldOcc pass -> XCFieldOcc pass
+ GHC.Hs.Types: [hsib_body] :: HsImplicitBndrs pass thing -> thing
+ GHC.Hs.Types: [hsib_ext] :: HsImplicitBndrs pass thing -> XHsIB pass thing
+ GHC.Hs.Types: [hsq_explicit] :: LHsQTyVars pass -> [LHsTyVarBndr pass]
+ GHC.Hs.Types: [hsq_ext] :: LHsQTyVars pass -> XHsQTvs pass
+ GHC.Hs.Types: [hst_bndrs] :: HsType pass -> [LHsTyVarBndr pass]
+ GHC.Hs.Types: [hst_body] :: HsType pass -> LHsType pass
+ GHC.Hs.Types: [hst_ctxt] :: HsType pass -> LHsContext pass
+ GHC.Hs.Types: [hst_fvf] :: HsType pass -> ForallVisFlag
+ GHC.Hs.Types: [hst_xforall] :: HsType pass -> XForAllTy pass
+ GHC.Hs.Types: [hst_xqual] :: HsType pass -> XQualTy pass
+ GHC.Hs.Types: [hswc_body] :: HsWildCardBndrs pass thing -> thing
+ GHC.Hs.Types: [hswc_ext] :: HsWildCardBndrs pass thing -> XHsWC pass thing
+ GHC.Hs.Types: [rdrNameFieldOcc] :: FieldOcc pass -> Located RdrName
+ GHC.Hs.Types: ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc
+ GHC.Hs.Types: data AmbiguousFieldOcc pass
+ GHC.Hs.Types: data ConDeclField pass
+ GHC.Hs.Types: data FieldOcc pass
+ GHC.Hs.Types: data ForallVisFlag
+ GHC.Hs.Types: data HsArg tm ty
+ GHC.Hs.Types: data HsConDetails arg rec
+ GHC.Hs.Types: data HsImplBang
+ GHC.Hs.Types: data HsImplicitBndrs pass thing
+ GHC.Hs.Types: data HsSrcBang
+ GHC.Hs.Types: data HsTupleSort
+ GHC.Hs.Types: data HsTyLit
+ GHC.Hs.Types: data HsTyVarBndr pass
+ GHC.Hs.Types: data HsType pass
+ GHC.Hs.Types: data HsWildCardBndrs pass thing
+ GHC.Hs.Types: data LHsQTyVars pass
+ GHC.Hs.Types: data NewHsTypeX
+ GHC.Hs.Types: data SrcStrictness
+ GHC.Hs.Types: data SrcUnpackedness
+ GHC.Hs.Types: dropWildCards :: LHsSigWcType pass -> LHsSigType pass
+ GHC.Hs.Types: emptyLHsQTvs :: LHsQTyVars GhcRn
+ GHC.Hs.Types: getBangStrictness :: LHsType a -> HsSrcBang
+ GHC.Hs.Types: getBangType :: LHsType a -> LHsType a
+ GHC.Hs.Types: getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
+ GHC.Hs.Types: getLHsInstDeclHead :: LHsSigType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Types: hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]
+ GHC.Hs.Types: hsConDetailsArgs :: HsConDetails (LHsType a) (Located [LConDeclField a]) -> [LHsType a]
+ GHC.Hs.Types: hsExplicitLTyVarNames :: LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)]
+ GHC.Hs.Types: hsIPNameFS :: HsIPName -> FastString
+ GHC.Hs.Types: hsImplicitBody :: HsImplicitBndrs (GhcPass p) thing -> thing
+ GHC.Hs.Types: hsLTyVarBndrToType :: LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Types: hsLTyVarBndrsToTypes :: LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)]
+ GHC.Hs.Types: hsLTyVarLocName :: LHsTyVarBndr (GhcPass p) -> Located (IdP (GhcPass p))
+ GHC.Hs.Types: hsLTyVarLocNames :: LHsQTyVars (GhcPass p) -> [Located (IdP (GhcPass p))]
+ GHC.Hs.Types: hsLTyVarName :: LHsTyVarBndr (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Types: hsLTyVarNames :: [LHsTyVarBndr (GhcPass p)] -> [IdP (GhcPass p)]
+ GHC.Hs.Types: hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr pass]
+ GHC.Hs.Types: hsScopedTvs :: LHsSigType GhcRn -> [Name]
+ GHC.Hs.Types: hsSigType :: LHsSigType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Types: hsSigWcType :: LHsSigWcType pass -> LHsType pass
+ GHC.Hs.Types: hsTvbAllKinded :: LHsQTyVars pass -> Bool
+ GHC.Hs.Types: hsTyGetAppHead_maybe :: LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
+ GHC.Hs.Types: hsTyKindSig :: LHsType pass -> Maybe (LHsKind pass)
+ GHC.Hs.Types: hsTyVarName :: HsTyVarBndr (GhcPass p) -> IdP (GhcPass p)
+ GHC.Hs.Types: hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool
+ GHC.Hs.Types: hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
+ GHC.Hs.Types: ignoreParens :: LHsType pass -> LHsType pass
+ GHC.Hs.Types: instance (Data.Data.Data arg, Data.Data.Data rec) => Data.Data.Data (GHC.Hs.Types.HsConDetails arg rec)
+ GHC.Hs.Types: instance (Outputable.Outputable arg, Outputable.Outputable rec) => Outputable.Outputable (GHC.Hs.Types.HsConDetails arg rec)
+ GHC.Hs.Types: instance (Outputable.Outputable tm, Outputable.Outputable ty) => Outputable.Outputable (GHC.Hs.Types.HsArg tm ty)
+ GHC.Hs.Types: instance Data.Data.Data GHC.Hs.Types.HsIPName
+ GHC.Hs.Types: instance Data.Data.Data GHC.Hs.Types.HsTupleSort
+ GHC.Hs.Types: instance Data.Data.Data GHC.Hs.Types.HsTyLit
+ GHC.Hs.Types: instance Data.Data.Data GHC.Hs.Types.NewHsTypeX
+ GHC.Hs.Types: instance GHC.Classes.Eq (GHC.Hs.Extension.XCFieldOcc (GHC.Hs.Extension.GhcPass p)) => GHC.Classes.Eq (GHC.Hs.Types.FieldOcc (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance GHC.Classes.Eq GHC.Hs.Types.HsIPName
+ GHC.Hs.Types: instance GHC.Classes.Ord (GHC.Hs.Extension.XCFieldOcc (GHC.Hs.Extension.GhcPass p)) => GHC.Classes.Ord (GHC.Hs.Types.FieldOcc (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Types.ConDeclField (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Types.HsTyVarBndr (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Types.HsType (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance GHC.Hs.Extension.OutputableBndrId p => Outputable.Outputable (GHC.Hs.Types.LHsQTyVars (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance Name.NamedThing (GHC.Hs.Types.HsTyVarBndr GHC.Hs.Extension.GhcRn)
+ GHC.Hs.Types: instance Outputable.Outputable (GHC.Hs.Types.AmbiguousFieldOcc (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance Outputable.Outputable (GHC.Hs.Types.FieldOcc pass)
+ GHC.Hs.Types: instance Outputable.Outputable GHC.Hs.Types.HsIPName
+ GHC.Hs.Types: instance Outputable.Outputable GHC.Hs.Types.HsTyLit
+ GHC.Hs.Types: instance Outputable.Outputable GHC.Hs.Types.NewHsTypeX
+ GHC.Hs.Types: instance Outputable.Outputable thing => Outputable.Outputable (GHC.Hs.Types.HsImplicitBndrs (GHC.Hs.Extension.GhcPass p) thing)
+ GHC.Hs.Types: instance Outputable.Outputable thing => Outputable.Outputable (GHC.Hs.Types.HsWildCardBndrs (GHC.Hs.Extension.GhcPass p) thing)
+ GHC.Hs.Types: instance Outputable.OutputableBndr (GHC.Hs.Types.AmbiguousFieldOcc (GHC.Hs.Extension.GhcPass p))
+ GHC.Hs.Types: instance Outputable.OutputableBndr GHC.Hs.Types.HsIPName
+ GHC.Hs.Types: isEmptyLHsQTvs :: LHsQTyVars GhcRn -> Bool
+ GHC.Hs.Types: isHsKindedTyVar :: HsTyVarBndr pass -> Bool
+ GHC.Hs.Types: isLHsForAllTy :: LHsType p -> Bool
+ GHC.Hs.Types: mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs
+ GHC.Hs.Types: mkAnonWildCardTy :: HsType GhcPs
+ GHC.Hs.Types: mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing
+ GHC.Hs.Types: mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing
+ GHC.Hs.Types: mkFieldOcc :: Located RdrName -> FieldOcc GhcPs
+ GHC.Hs.Types: mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Types: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Types: mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
+ GHC.Hs.Types: mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing
+ GHC.Hs.Types: mkHsOpTy :: LHsType (GhcPass p) -> Located (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
+ GHC.Hs.Types: mkHsQTvs :: [LHsTyVarBndr GhcPs] -> LHsQTyVars GhcPs
+ GHC.Hs.Types: mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing
+ GHC.Hs.Types: newtype HsIPName
+ GHC.Hs.Types: noLHsContext :: LHsContext pass
+ GHC.Hs.Types: numVisibleArgs :: [HsArg tm ty] -> Arity
+ GHC.Hs.Types: parenthesizeHsContext :: PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)
+ GHC.Hs.Types: parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Types: pprAnonWildCard :: SDoc
+ GHC.Hs.Types: pprConDeclFields :: OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc
+ GHC.Hs.Types: pprHsExplicitForAll :: OutputableBndrId p => ForallVisFlag -> Maybe [LHsTyVarBndr (GhcPass p)] -> SDoc
+ GHC.Hs.Types: pprHsForAll :: OutputableBndrId p => ForallVisFlag -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
+ GHC.Hs.Types: pprHsForAllExtra :: OutputableBndrId p => Maybe SrcSpan -> ForallVisFlag -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
+ GHC.Hs.Types: pprHsType :: OutputableBndrId p => HsType (GhcPass p) -> SDoc
+ GHC.Hs.Types: pprLHsContext :: OutputableBndrId p => LHsContext (GhcPass p) -> SDoc
+ GHC.Hs.Types: rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName
+ GHC.Hs.Types: selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id
+ GHC.Hs.Types: splitHsFunType :: LHsType GhcRn -> ([LHsType GhcRn], LHsType GhcRn)
+ GHC.Hs.Types: splitLHsForAllTyInvis :: LHsType pass -> ([LHsTyVarBndr pass], LHsType pass)
+ GHC.Hs.Types: splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], LHsContext GhcRn, LHsType GhcRn)
+ GHC.Hs.Types: splitLHsPatSynTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, [LHsTyVarBndr pass], LHsContext pass, LHsType pass)
+ GHC.Hs.Types: splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass)
+ GHC.Hs.Types: splitLHsSigmaTyInvis :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, LHsType pass)
+ GHC.Hs.Types: type BangType pass = HsType pass
+ GHC.Hs.Types: type HsContext pass = [LHsType pass]
+ GHC.Hs.Types: type HsKind pass = HsType pass
+ GHC.Hs.Types: type LBangType pass = Located (BangType pass)
+ GHC.Hs.Types: type LConDeclField pass = Located (ConDeclField pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
+ GHC.Hs.Types: type LFieldOcc pass = Located (FieldOcc pass)
+ GHC.Hs.Types: type LHsContext pass = Located (HsContext pass) " 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnUnit' For details on above see note [Api annotations] in ApiAnnotation"
+ GHC.Hs.Types: type LHsKind pass = Located (HsKind pass) " 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'"
+ GHC.Hs.Types: type LHsSigType pass = HsImplicitBndrs pass (LHsType pass)
+ GHC.Hs.Types: type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
+ GHC.Hs.Types: type LHsTyVarBndr pass = Located (HsTyVarBndr pass)
+ GHC.Hs.Types: type LHsType pass = Located (HsType pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
+ GHC.Hs.Types: type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
+ GHC.Hs.Types: type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
+ GHC.Hs.Types: unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc
+ GHC.Hs.Utils: chunkify :: [a] -> [[a]]
+ GHC.Hs.Utils: collectHsBindBinders :: (SrcSpanLess (LPat p) ~ Pat p, HasSrcSpan (LPat p)) => HsBindLR p idR -> [IdP p]
+ GHC.Hs.Utils: collectHsBindListBinders :: [LHsBindLR (GhcPass p) idR] -> [IdP (GhcPass p)]
+ GHC.Hs.Utils: collectHsBindsBinders :: LHsBindsLR (GhcPass p) idR -> [IdP (GhcPass p)]
+ GHC.Hs.Utils: collectHsIdBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectHsValBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectLStmtBinders :: LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectLStmtsBinders :: [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)]
+ GHC.Hs.Utils: collectPatBinders :: LPat (GhcPass p) -> [IdP (GhcPass p)]
+ GHC.Hs.Utils: collectPatsBinders :: [LPat (GhcPass p)] -> [IdP (GhcPass p)]
+ GHC.Hs.Utils: collectStmtBinders :: StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: collectStmtsBinders :: [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
+ GHC.Hs.Utils: emptyRecStmt :: StmtLR (GhcPass idL) GhcPs bodyR
+ GHC.Hs.Utils: emptyRecStmtId :: StmtLR GhcTc GhcTc bodyR
+ GHC.Hs.Utils: emptyRecStmtName :: StmtLR GhcRn GhcRn bodyR
+ GHC.Hs.Utils: emptyTransStmt :: StmtLR GhcPs GhcPs (LHsExpr GhcPs)
+ GHC.Hs.Utils: getPatSynBinds :: [(RecFlag, LHsBinds id)] -> [PatSynBind id id]
+ GHC.Hs.Utils: hsDataFamInstBinders :: DataFamInstDecl (GhcPass p) -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
+ GHC.Hs.Utils: hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)]
+ GHC.Hs.Utils: hsGroupBinders :: HsGroup GhcRn -> [Name]
+ GHC.Hs.Utils: hsLTyClDeclBinders :: Located (TyClDecl (GhcPass p)) -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])
+ GHC.Hs.Utils: hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)]
+ GHC.Hs.Utils: hsTyClForeignBinders :: [TyClGroup GhcRn] -> [LForeignDecl GhcRn] -> [Name]
+ GHC.Hs.Utils: hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])]
+ GHC.Hs.Utils: isBangedHsBind :: HsBind GhcTc -> Bool
+ GHC.Hs.Utils: isInfixFunBind :: HsBindLR id1 id2 -> Bool
+ GHC.Hs.Utils: isUnliftedHsBind :: HsBind GhcTc -> Bool
+ GHC.Hs.Utils: lPatImplicits :: LPat GhcRn -> [(SrcSpan, [Name])]
+ GHC.Hs.Utils: lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))] -> [(SrcSpan, [Name])]
+ GHC.Hs.Utils: missingTupArg :: HsTupArg GhcPs
+ GHC.Hs.Utils: mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn
+ GHC.Hs.Utils: mkBigLHsTup :: [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn
+ GHC.Hs.Utils: mkBigLHsVarTup :: [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkBindStmt :: XBindStmt (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) ~ NoExtField => LPat (GhcPass idL) -> Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
+ GHC.Hs.Utils: mkBodyStmt :: Located (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (Located (bodyR GhcPs))
+ GHC.Hs.Utils: mkChunkified :: ([a] -> a) -> [a] -> a
+ GHC.Hs.Utils: mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]
+ GHC.Hs.Utils: mkFunBind :: Origin -> Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)] -> HsBind GhcPs
+ GHC.Hs.Utils: mkGroupByUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
+ GHC.Hs.Utils: mkGroupUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
+ GHC.Hs.Utils: mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: mkHsAppType :: NoGhcTc (GhcPass id) ~ GhcRn => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn
+ GHC.Hs.Utils: mkHsCaseAlt :: LPat (GhcPass p) -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
+ GHC.Hs.Utils: mkHsCmdIf :: LHsExpr (GhcPass p) -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p) -> HsCmd (GhcPass p)
+ GHC.Hs.Utils: mkHsCmdWrap :: HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p)
+ GHC.Hs.Utils: mkHsComp :: HsStmtContext Name -> [ExprLStmt GhcPs] -> LHsExpr GhcPs -> HsExpr GhcPs
+ GHC.Hs.Utils: mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc
+ GHC.Hs.Utils: mkHsDo :: HsStmtContext Name -> [ExprLStmt GhcPs] -> HsExpr GhcPs
+ GHC.Hs.Utils: mkHsFractional :: FractionalLit -> HsOverLit GhcPs
+ GHC.Hs.Utils: mkHsIf :: LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> HsExpr (GhcPass p)
+ GHC.Hs.Utils: mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
+ GHC.Hs.Utils: mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
+ GHC.Hs.Utils: mkHsLam :: XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField => [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
+ GHC.Hs.Utils: mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
+ GHC.Hs.Utils: mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs
+ GHC.Hs.Utils: mkHsSigEnv :: forall a. (LSig GhcRn -> Maybe ([Located Name], a)) -> [LSig GhcRn] -> NameEnv a
+ GHC.Hs.Utils: mkHsString :: String -> HsLit (GhcPass p)
+ GHC.Hs.Utils: mkHsStringPrimLit :: FastString -> HsLit (GhcPass p)
+ GHC.Hs.Utils: mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs
+ GHC.Hs.Utils: mkHsWrap :: HsWrapper -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsWrapCo :: TcCoercionN -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsWrapCoR :: TcCoercionR -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
+ GHC.Hs.Utils: mkHsWrapPat :: HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
+ GHC.Hs.Utils: mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
+ GHC.Hs.Utils: mkLHsCmdWrap :: HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p)
+ GHC.Hs.Utils: mkLHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs
+ GHC.Hs.Utils: mkLHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs
+ GHC.Hs.Utils: mkLHsTupleExpr :: [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a)
+ GHC.Hs.Utils: mkLHsVarTuple :: [IdP (GhcPass a)] -> LHsExpr (GhcPass a)
+ GHC.Hs.Utils: mkLHsWrap :: HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: mkLastStmt :: Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
+ GHC.Hs.Utils: mkMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> Located (HsLocalBinds (GhcPass p)) -> LMatch (GhcPass p) (LHsExpr (GhcPass p))
+ GHC.Hs.Utils: mkMatchGroup :: XMG name (Located (body name)) ~ NoExtField => Origin -> [LMatch name (Located (body name))] -> MatchGroup name (Located (body name))
+ GHC.Hs.Utils: mkNPat :: Located (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs) -> Pat GhcPs
+ GHC.Hs.Utils: mkNPlusKPat :: Located RdrName -> Located (HsOverLit GhcPs) -> Pat GhcPs
+ GHC.Hs.Utils: mkParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
+ GHC.Hs.Utils: mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName) -> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs
+ GHC.Hs.Utils: mkPrefixFunRhs :: Located id -> HsMatchContext id
+ GHC.Hs.Utils: mkRecStmt :: [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR
+ GHC.Hs.Utils: mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs
+ GHC.Hs.Utils: mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
+ GHC.Hs.Utils: mkTcBindStmt :: LPat GhcTc -> Located (bodyR GhcTc) -> StmtLR GhcTc GhcTc (Located (bodyR GhcTc))
+ GHC.Hs.Utils: mkTopFunBind :: Origin -> Located Name -> [LMatch GhcRn (LHsExpr GhcRn)] -> HsBind GhcRn
+ GHC.Hs.Utils: mkTransformByStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
+ GHC.Hs.Utils: mkTransformStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
+ GHC.Hs.Utils: mkTypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
+ GHC.Hs.Utils: mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
+ GHC.Hs.Utils: mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
+ GHC.Hs.Utils: nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs
+ GHC.Hs.Utils: nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn
+ GHC.Hs.Utils: nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs
+ GHC.Hs.Utils: nlConVarPatName :: Name -> [Name] -> LPat GhcRn
+ GHC.Hs.Utils: nlHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsAppKindTy :: LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsApps :: IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
+ GHC.Hs.Utils: nlHsDataCon :: DataCon -> LHsExpr GhcTc
+ GHC.Hs.Utils: nlHsDo :: HsStmtContext Name -> [LStmt GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs
+ GHC.Hs.Utils: nlHsFunTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsIf :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsIntLit :: Integer -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs
+ GHC.Hs.Utils: nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)
+ GHC.Hs.Utils: nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
+ GHC.Hs.Utils: nlHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsSyntaxApps :: SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsTyApp :: IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsTyApps :: IdP (GhcPass id) -> [Type] -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsTyConApp :: IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsTyVar :: IdP (GhcPass p) -> LHsType (GhcPass p)
+ GHC.Hs.Utils: nlHsVar :: IdP (GhcPass id) -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlHsVarApps :: IdP (GhcPass id) -> [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
+ GHC.Hs.Utils: nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs
+ GHC.Hs.Utils: nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs
+ GHC.Hs.Utils: nlLitPat :: HsLit GhcPs -> LPat GhcPs
+ GHC.Hs.Utils: nlNullaryConPat :: IdP (GhcPass p) -> LPat (GhcPass p)
+ GHC.Hs.Utils: nlParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
+ GHC.Hs.Utils: nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
+ GHC.Hs.Utils: nlVarPat :: IdP (GhcPass id) -> LPat (GhcPass id)
+ GHC.Hs.Utils: nlWildConPat :: DataCon -> LPat GhcPs
+ GHC.Hs.Utils: nlWildPat :: LPat GhcPs
+ GHC.Hs.Utils: nlWildPatName :: LPat GhcRn
+ GHC.Hs.Utils: typeToLHsType :: Type -> LHsType GhcPs
+ GHC.Hs.Utils: unguardedGRHSs :: Located (body (GhcPass p)) -> GRHSs (GhcPass p) (Located (body (GhcPass p)))
+ GHC.Hs.Utils: unguardedRHS :: SrcSpan -> Located (body (GhcPass p)) -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))]
+ GHC.Hs.Utils: unitRecStmtTc :: RecStmtTc
+ GHC.Hs.Utils: unqualQuasiQuote :: RdrName
+ GHC.HsToCore.PmCheck: addPatTmCs :: [Pat GhcTc] -> [Id] -> DsM a -> DsM a
+ GHC.HsToCore.PmCheck: addScrutTmCs :: Maybe (LHsExpr GhcTc) -> [Id] -> DsM a -> DsM a
+ GHC.HsToCore.PmCheck: addTyCsDs :: Bag EvVar -> DsM a -> DsM a
+ GHC.HsToCore.PmCheck: checkGuardMatches :: HsMatchContext Name -> GRHSs GhcTc (LHsExpr GhcTc) -> DsM ()
+ GHC.HsToCore.PmCheck: checkMatches :: DynFlags -> DsMatchContext -> [Id] -> [LMatch GhcTc (LHsExpr GhcTc)] -> DsM ()
+ GHC.HsToCore.PmCheck: checkSingle :: DynFlags -> DsMatchContext -> Id -> Pat GhcTc -> DsM ()
+ GHC.HsToCore.PmCheck: instance GHC.Base.Monoid GHC.HsToCore.PmCheck.Covered
+ GHC.HsToCore.PmCheck: instance GHC.Base.Monoid GHC.HsToCore.PmCheck.Diverged
+ GHC.HsToCore.PmCheck: instance GHC.Base.Monoid GHC.HsToCore.PmCheck.PartialResult
+ GHC.HsToCore.PmCheck: instance GHC.Base.Monoid GHC.HsToCore.PmCheck.Precision
+ GHC.HsToCore.PmCheck: instance GHC.Base.Semigroup GHC.HsToCore.PmCheck.Covered
+ GHC.HsToCore.PmCheck: instance GHC.Base.Semigroup GHC.HsToCore.PmCheck.Diverged
+ GHC.HsToCore.PmCheck: instance GHC.Base.Semigroup GHC.HsToCore.PmCheck.PartialResult
+ GHC.HsToCore.PmCheck: instance GHC.Base.Semigroup GHC.HsToCore.PmCheck.Precision
+ GHC.HsToCore.PmCheck: instance GHC.Classes.Eq GHC.HsToCore.PmCheck.Precision
+ GHC.HsToCore.PmCheck: instance GHC.Show.Show GHC.HsToCore.PmCheck.Covered
+ GHC.HsToCore.PmCheck: instance GHC.Show.Show GHC.HsToCore.PmCheck.Diverged
+ GHC.HsToCore.PmCheck: instance GHC.Show.Show GHC.HsToCore.PmCheck.Precision
+ GHC.HsToCore.PmCheck: instance Outputable.Outputable GHC.HsToCore.PmCheck.Covered
+ GHC.HsToCore.PmCheck: instance Outputable.Outputable GHC.HsToCore.PmCheck.Diverged
+ GHC.HsToCore.PmCheck: instance Outputable.Outputable GHC.HsToCore.PmCheck.PartialResult
+ GHC.HsToCore.PmCheck: instance Outputable.Outputable GHC.HsToCore.PmCheck.PmGrd
+ GHC.HsToCore.PmCheck: instance Outputable.Outputable GHC.HsToCore.PmCheck.PmResult
+ GHC.HsToCore.PmCheck: instance Outputable.Outputable GHC.HsToCore.PmCheck.Precision
+ GHC.HsToCore.PmCheck: isMatchContextPmChecked :: DynFlags -> Origin -> HsMatchContext id -> Bool
+ GHC.HsToCore.PmCheck: needToRunPmCheck :: DynFlags -> Origin -> Bool
+ GHC.HsToCore.PmCheck.Oracle: TmVarCon :: !Id -> !PmAltCon -> ![Id] -> TmCt
+ GHC.HsToCore.PmCheck.Oracle: TmVarNonVoid :: !Id -> TmCt
+ GHC.HsToCore.PmCheck.Oracle: TmVarVar :: !Id -> !Id -> TmCt
+ GHC.HsToCore.PmCheck.Oracle: addRefutableAltCon :: Delta -> Id -> PmAltCon -> DsM (Maybe Delta)
+ GHC.HsToCore.PmCheck.Oracle: addTmCt :: Delta -> TmCt -> DsM (Maybe Delta)
+ GHC.HsToCore.PmCheck.Oracle: addTypeEvidence :: Delta -> Bag EvVar -> DsM (Maybe Delta)
+ GHC.HsToCore.PmCheck.Oracle: addVarCoreCt :: Delta -> Id -> CoreExpr -> DsM (Maybe Delta)
+ GHC.HsToCore.PmCheck.Oracle: canDiverge :: Delta -> Id -> Bool
+ GHC.HsToCore.PmCheck.Oracle: data Delta
+ GHC.HsToCore.PmCheck.Oracle: data TmCt
+ GHC.HsToCore.PmCheck.Oracle: initDelta :: Delta
+ GHC.HsToCore.PmCheck.Oracle: instance GHC.Base.Monoid GHC.HsToCore.PmCheck.Oracle.SatisfiabilityCheck
+ GHC.HsToCore.PmCheck.Oracle: instance GHC.Base.Semigroup GHC.HsToCore.PmCheck.Oracle.SatisfiabilityCheck
+ GHC.HsToCore.PmCheck.Oracle: instance Outputable.Outputable GHC.HsToCore.PmCheck.Oracle.InhabitationCandidate
+ GHC.HsToCore.PmCheck.Oracle: instance Outputable.Outputable GHC.HsToCore.PmCheck.Oracle.TmCt
+ GHC.HsToCore.PmCheck.Oracle: instance Outputable.Outputable GHC.HsToCore.PmCheck.Oracle.TopNormaliseTypeResult
+ GHC.HsToCore.PmCheck.Oracle: instance Outputable.Outputable GHC.HsToCore.PmCheck.Oracle.TyCt
+ GHC.HsToCore.PmCheck.Oracle: lookupRefuts :: Uniquable k => Delta -> k -> [PmAltCon]
+ GHC.HsToCore.PmCheck.Oracle: lookupSolution :: Delta -> Id -> Maybe (PmAltCon, [Id])
+ GHC.HsToCore.PmCheck.Oracle: mkPmId :: Type -> DsM Id
+ GHC.HsToCore.PmCheck.Oracle: provideEvidence :: [Id] -> Int -> Delta -> DsM [Delta]
+ GHC.HsToCore.PmCheck.Oracle: tracePm :: String -> SDoc -> DsM ()
+ GHC.HsToCore.PmCheck.Oracle: type DsM = TcRnIf DsGblEnv DsLclEnv
+ GHC.HsToCore.PmCheck.Ppr: pprUncovered :: Delta -> [Id] -> SDoc
+ GHC.HsToCore.PmCheck.Types: Disjoint :: PmEquality
+ GHC.HsToCore.PmCheck.Types: Entry :: a -> Shared a
+ GHC.HsToCore.PmCheck.Types: Equal :: PmEquality
+ GHC.HsToCore.PmCheck.Types: Indirect :: Id -> Shared a
+ GHC.HsToCore.PmCheck.Types: MkDelta :: TyState -> TmState -> Delta
+ GHC.HsToCore.PmCheck.Types: NoPM :: PossibleMatches
+ GHC.HsToCore.PmCheck.Types: PM :: NonEmpty ConLikeSet -> PossibleMatches
+ GHC.HsToCore.PmCheck.Types: PmAltConLike :: ConLike -> PmAltCon
+ GHC.HsToCore.PmCheck.Types: PmAltLit :: PmLit -> PmAltCon
+ GHC.HsToCore.PmCheck.Types: PmLit :: Type -> PmLitValue -> PmLit
+ GHC.HsToCore.PmCheck.Types: PmLitChar :: Char -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: PmLitInt :: Integer -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: PmLitOverInt :: Int -> Integer -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: PmLitOverRat :: Int -> Rational -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: PmLitOverString :: FastString -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: PmLitRat :: Rational -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: PmLitString :: FastString -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: PossiblyOverlap :: PmEquality
+ GHC.HsToCore.PmCheck.Types: SDIE :: DIdEnv (Shared a) -> SharedDIdEnv a
+ GHC.HsToCore.PmCheck.Types: TmSt :: !SharedDIdEnv VarInfo -> !CoreMap Id -> TmState
+ GHC.HsToCore.PmCheck.Types: TySt :: Bag EvVar -> TyState
+ GHC.HsToCore.PmCheck.Types: VI :: !Type -> ![(PmAltCon, [Id])] -> ![PmAltCon] -> !PossibleMatches -> VarInfo
+ GHC.HsToCore.PmCheck.Types: [delta_tm_st] :: Delta -> TmState
+ GHC.HsToCore.PmCheck.Types: [delta_ty_st] :: Delta -> TyState
+ GHC.HsToCore.PmCheck.Types: [pm_lit_ty] :: PmLit -> Type
+ GHC.HsToCore.PmCheck.Types: [pm_lit_val] :: PmLit -> PmLitValue
+ GHC.HsToCore.PmCheck.Types: [ts_facts] :: TmState -> !SharedDIdEnv VarInfo
+ GHC.HsToCore.PmCheck.Types: [ts_reps] :: TmState -> !CoreMap Id
+ GHC.HsToCore.PmCheck.Types: [unSDIE] :: SharedDIdEnv a -> DIdEnv (Shared a)
+ GHC.HsToCore.PmCheck.Types: [vi_cache] :: VarInfo -> !PossibleMatches
+ GHC.HsToCore.PmCheck.Types: [vi_neg] :: VarInfo -> ![PmAltCon]
+ GHC.HsToCore.PmCheck.Types: [vi_pos] :: VarInfo -> ![(PmAltCon, [Id])]
+ GHC.HsToCore.PmCheck.Types: [vi_ty] :: VarInfo -> !Type
+ GHC.HsToCore.PmCheck.Types: coreExprAsPmLit :: CoreExpr -> Maybe PmLit
+ GHC.HsToCore.PmCheck.Types: data Delta
+ GHC.HsToCore.PmCheck.Types: data PmAltCon
+ GHC.HsToCore.PmCheck.Types: data PmEquality
+ GHC.HsToCore.PmCheck.Types: data PmLit
+ GHC.HsToCore.PmCheck.Types: data PmLitValue
+ GHC.HsToCore.PmCheck.Types: data PossibleMatches
+ GHC.HsToCore.PmCheck.Types: data Shared a
+ GHC.HsToCore.PmCheck.Types: data TmState
+ GHC.HsToCore.PmCheck.Types: data VarInfo
+ GHC.HsToCore.PmCheck.Types: emptySDIE :: SharedDIdEnv a
+ GHC.HsToCore.PmCheck.Types: eqPmAltCon :: PmAltCon -> PmAltCon -> PmEquality
+ GHC.HsToCore.PmCheck.Types: initDelta :: Delta
+ GHC.HsToCore.PmCheck.Types: instance GHC.Classes.Eq GHC.HsToCore.PmCheck.Types.PmAltCon
+ GHC.HsToCore.PmCheck.Types: instance GHC.Classes.Eq GHC.HsToCore.PmCheck.Types.PmEquality
+ GHC.HsToCore.PmCheck.Types: instance GHC.Classes.Eq GHC.HsToCore.PmCheck.Types.PmLit
+ GHC.HsToCore.PmCheck.Types: instance GHC.Show.Show GHC.HsToCore.PmCheck.Types.PmEquality
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.Delta
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.PmAltCon
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.PmEquality
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.PmLit
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.PmLitValue
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.PossibleMatches
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.TmState
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.TyState
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable GHC.HsToCore.PmCheck.Types.VarInfo
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable a => Outputable.Outputable (GHC.HsToCore.PmCheck.Types.Shared a)
+ GHC.HsToCore.PmCheck.Types: instance Outputable.Outputable a => Outputable.Outputable (GHC.HsToCore.PmCheck.Types.SharedDIdEnv a)
+ GHC.HsToCore.PmCheck.Types: literalToPmLit :: Type -> Literal -> Maybe PmLit
+ GHC.HsToCore.PmCheck.Types: lookupSDIE :: SharedDIdEnv a -> Id -> Maybe a
+ GHC.HsToCore.PmCheck.Types: negatePmLit :: PmLit -> Maybe PmLit
+ GHC.HsToCore.PmCheck.Types: newtype SharedDIdEnv a
+ GHC.HsToCore.PmCheck.Types: newtype TyState
+ GHC.HsToCore.PmCheck.Types: overloadPmLit :: Type -> PmLit -> Maybe PmLit
+ GHC.HsToCore.PmCheck.Types: pmAltConType :: PmAltCon -> [Type] -> Type
+ GHC.HsToCore.PmCheck.Types: pmLitAsStringLit :: PmLit -> Maybe FastString
+ GHC.HsToCore.PmCheck.Types: pmLitType :: PmLit -> Type
+ GHC.HsToCore.PmCheck.Types: sameRepresentativeSDIE :: SharedDIdEnv a -> Id -> Id -> Bool
+ GHC.HsToCore.PmCheck.Types: setEntrySDIE :: SharedDIdEnv a -> Id -> a -> SharedDIdEnv a
+ GHC.HsToCore.PmCheck.Types: setIndirectSDIE :: SharedDIdEnv a -> Id -> Id -> SharedDIdEnv a
+ GHC.HsToCore.PmCheck.Types: traverseSDIE :: Applicative f => (a -> f b) -> SharedDIdEnv a -> f (SharedDIdEnv b)
+ GHC.HsToCore.PmCheck.Types: type ConLikeSet = UniqDSet ConLike
+ GHC.Platform.ARM: activeStgRegs :: [GlobalReg]
+ GHC.Platform.ARM: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.ARM: freeReg :: RegNo -> Bool
+ GHC.Platform.ARM: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.ARM: haveRegBase :: Bool
+ GHC.Platform.ARM64: activeStgRegs :: [GlobalReg]
+ GHC.Platform.ARM64: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.ARM64: freeReg :: RegNo -> Bool
+ GHC.Platform.ARM64: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.ARM64: haveRegBase :: Bool
+ GHC.Platform.NoRegs: activeStgRegs :: [GlobalReg]
+ GHC.Platform.NoRegs: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.NoRegs: freeReg :: RegNo -> Bool
+ GHC.Platform.NoRegs: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.NoRegs: haveRegBase :: Bool
+ GHC.Platform.PPC: activeStgRegs :: [GlobalReg]
+ GHC.Platform.PPC: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.PPC: freeReg :: RegNo -> Bool
+ GHC.Platform.PPC: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.PPC: haveRegBase :: Bool
+ GHC.Platform.Regs: activeStgRegs :: Platform -> [GlobalReg]
+ GHC.Platform.Regs: callerSaves :: Platform -> GlobalReg -> Bool
+ GHC.Platform.Regs: freeReg :: Platform -> RegNo -> Bool
+ GHC.Platform.Regs: globalRegMaybe :: Platform -> GlobalReg -> Maybe RealReg
+ GHC.Platform.Regs: haveRegBase :: Platform -> Bool
+ GHC.Platform.S390X: activeStgRegs :: [GlobalReg]
+ GHC.Platform.S390X: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.S390X: freeReg :: RegNo -> Bool
+ GHC.Platform.S390X: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.S390X: haveRegBase :: Bool
+ GHC.Platform.SPARC: activeStgRegs :: [GlobalReg]
+ GHC.Platform.SPARC: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.SPARC: freeReg :: RegNo -> Bool
+ GHC.Platform.SPARC: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.SPARC: haveRegBase :: Bool
+ GHC.Platform.X86: activeStgRegs :: [GlobalReg]
+ GHC.Platform.X86: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.X86: freeReg :: RegNo -> Bool
+ GHC.Platform.X86: freeRegBase :: RegNo -> Bool
+ GHC.Platform.X86: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.X86: haveRegBase :: Bool
+ GHC.Platform.X86_64: activeStgRegs :: [GlobalReg]
+ GHC.Platform.X86_64: callerSaves :: GlobalReg -> Bool
+ GHC.Platform.X86_64: freeReg :: RegNo -> Bool
+ GHC.Platform.X86_64: freeRegBase :: RegNo -> Bool
+ GHC.Platform.X86_64: globalRegMaybe :: GlobalReg -> Maybe RealReg
+ GHC.Platform.X86_64: haveRegBase :: Bool
+ GHC.StgToCmm: codeGen :: DynFlags -> Module -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -> HpcInfo -> Stream IO CmmGroup ()
+ GHC.StgToCmm.ArgRep: D :: ArgRep
+ GHC.StgToCmm.ArgRep: F :: ArgRep
+ GHC.StgToCmm.ArgRep: L :: ArgRep
+ GHC.StgToCmm.ArgRep: N :: ArgRep
+ GHC.StgToCmm.ArgRep: P :: ArgRep
+ GHC.StgToCmm.ArgRep: V :: ArgRep
+ GHC.StgToCmm.ArgRep: V16 :: ArgRep
+ GHC.StgToCmm.ArgRep: V32 :: ArgRep
+ GHC.StgToCmm.ArgRep: V64 :: ArgRep
+ GHC.StgToCmm.ArgRep: argRepSizeW :: DynFlags -> ArgRep -> WordOff
+ GHC.StgToCmm.ArgRep: argRepString :: ArgRep -> String
+ GHC.StgToCmm.ArgRep: data ArgRep
+ GHC.StgToCmm.ArgRep: idArgRep :: Id -> ArgRep
+ GHC.StgToCmm.ArgRep: instance Outputable.Outputable GHC.StgToCmm.ArgRep.ArgRep
+ GHC.StgToCmm.ArgRep: isNonV :: ArgRep -> Bool
+ GHC.StgToCmm.ArgRep: slowCallPattern :: [ArgRep] -> (FastString, RepArity)
+ GHC.StgToCmm.ArgRep: toArgRep :: PrimRep -> ArgRep
+ GHC.StgToCmm.Bind: cgBind :: CgStgBinding -> FCode ()
+ GHC.StgToCmm.Bind: cgTopRhsClosure :: DynFlags -> RecFlag -> Id -> CostCentreStack -> UpdateFlag -> [Id] -> CgStgExpr -> (CgIdInfo, FCode ())
+ GHC.StgToCmm.Bind: emitBlackHoleCode :: CmmExpr -> FCode ()
+ GHC.StgToCmm.Bind: emitUpdateFrame :: DynFlags -> CmmExpr -> CLabel -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Bind: pushUpdateFrame :: CLabel -> CmmExpr -> FCode () -> FCode ()
+ GHC.StgToCmm.CgUtils: baseRegOffset :: DynFlags -> GlobalReg -> Int
+ GHC.StgToCmm.CgUtils: fixStgRegisters :: DynFlags -> RawCmmDecl -> RawCmmDecl
+ GHC.StgToCmm.CgUtils: get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr
+ GHC.StgToCmm.CgUtils: get_Regtable_addr_from_offset :: DynFlags -> Int -> CmmExpr
+ GHC.StgToCmm.CgUtils: regTableOffset :: DynFlags -> Int -> CmmExpr
+ GHC.StgToCmm.Closure: CmmLoc :: CmmExpr -> CgLoc
+ GHC.StgToCmm.Closure: DirectEntry :: CLabel -> RepArity -> CallMethod
+ GHC.StgToCmm.Closure: EnterIt :: CallMethod
+ GHC.StgToCmm.Closure: JumpToIt :: BlockId -> [LocalReg] -> CallMethod
+ GHC.StgToCmm.Closure: LneLoc :: BlockId -> [LocalReg] -> CgLoc
+ GHC.StgToCmm.Closure: NonVoid :: a -> NonVoid a
+ GHC.StgToCmm.Closure: ReturnIt :: CallMethod
+ GHC.StgToCmm.Closure: SlowCall :: CallMethod
+ GHC.StgToCmm.Closure: addArgReps :: [NonVoid StgArg] -> [NonVoid (PrimRep, StgArg)]
+ GHC.StgToCmm.Closure: addIdReps :: [NonVoid Id] -> [NonVoid (PrimRep, Id)]
+ GHC.StgToCmm.Closure: argPrimRep :: StgArg -> PrimRep
+ GHC.StgToCmm.Closure: assertNonVoidIds :: [Id] -> [NonVoid Id]
+ GHC.StgToCmm.Closure: assertNonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]
+ GHC.StgToCmm.Closure: blackHoleOnEntry :: ClosureInfo -> Bool
+ GHC.StgToCmm.Closure: cafBlackHoleInfoTable :: CmmInfoTable
+ GHC.StgToCmm.Closure: closureFunInfo :: ClosureInfo -> Maybe (RepArity, ArgDescr)
+ GHC.StgToCmm.Closure: closureInfoLabel :: ClosureInfo -> CLabel
+ GHC.StgToCmm.Closure: closureLFInfo :: ClosureInfo -> LambdaFormInfo
+ GHC.StgToCmm.Closure: closureLocalEntryLabel :: DynFlags -> ClosureInfo -> CLabel
+ GHC.StgToCmm.Closure: closureName :: ClosureInfo -> Name
+ GHC.StgToCmm.Closure: closureReEntrant :: ClosureInfo -> Bool
+ GHC.StgToCmm.Closure: closureSingleEntry :: ClosureInfo -> Bool
+ GHC.StgToCmm.Closure: closureSlowEntryLabel :: ClosureInfo -> CLabel
+ GHC.StgToCmm.Closure: closureUpdReqd :: ClosureInfo -> Bool
+ GHC.StgToCmm.Closure: data CallMethod
+ GHC.StgToCmm.Closure: data CgLoc
+ GHC.StgToCmm.Closure: data ClosureInfo
+ GHC.StgToCmm.Closure: data LambdaFormInfo
+ GHC.StgToCmm.Closure: data StandardFormInfo
+ GHC.StgToCmm.Closure: fromNonVoid :: NonVoid a -> a
+ GHC.StgToCmm.Closure: funTag :: DynFlags -> ClosureInfo -> DynTag
+ GHC.StgToCmm.Closure: getCallMethod :: DynFlags -> Name -> Id -> LambdaFormInfo -> RepArity -> RepArity -> CgLoc -> Maybe SelfLoopInfo -> CallMethod
+ GHC.StgToCmm.Closure: idPrimRep :: Id -> PrimRep
+ GHC.StgToCmm.Closure: indStaticInfoTable :: CmmInfoTable
+ GHC.StgToCmm.Closure: instance GHC.Classes.Eq a => GHC.Classes.Eq (GHC.StgToCmm.Closure.NonVoid a)
+ GHC.StgToCmm.Closure: instance GHC.Show.Show a => GHC.Show.Show (GHC.StgToCmm.Closure.NonVoid a)
+ GHC.StgToCmm.Closure: instance Outputable.Outputable GHC.StgToCmm.Closure.CgLoc
+ GHC.StgToCmm.Closure: instance Outputable.Outputable a => Outputable.Outputable (GHC.StgToCmm.Closure.NonVoid a)
+ GHC.StgToCmm.Closure: isGcPtrRep :: PrimRep -> Bool
+ GHC.StgToCmm.Closure: isKnownFun :: LambdaFormInfo -> Bool
+ GHC.StgToCmm.Closure: isLFReEntrant :: LambdaFormInfo -> Bool
+ GHC.StgToCmm.Closure: isLFThunk :: LambdaFormInfo -> Bool
+ GHC.StgToCmm.Closure: isSmallFamily :: DynFlags -> Int -> Bool
+ GHC.StgToCmm.Closure: isStaticClosure :: ClosureInfo -> Bool
+ GHC.StgToCmm.Closure: isToplevClosure :: ClosureInfo -> Bool
+ GHC.StgToCmm.Closure: isVoidRep :: PrimRep -> Bool
+ GHC.StgToCmm.Closure: lfDynTag :: DynFlags -> LambdaFormInfo -> DynTag
+ GHC.StgToCmm.Closure: lfUpdatable :: LambdaFormInfo -> Bool
+ GHC.StgToCmm.Closure: mkApLFInfo :: Id -> UpdateFlag -> Arity -> LambdaFormInfo
+ GHC.StgToCmm.Closure: mkClosureInfo :: DynFlags -> Bool -> Id -> LambdaFormInfo -> Int -> Int -> String -> ClosureInfo
+ GHC.StgToCmm.Closure: mkCmmInfo :: ClosureInfo -> Id -> CostCentreStack -> CmmInfoTable
+ GHC.StgToCmm.Closure: mkConLFInfo :: DataCon -> LambdaFormInfo
+ GHC.StgToCmm.Closure: mkDataConInfoTable :: DynFlags -> DataCon -> Bool -> Int -> Int -> CmmInfoTable
+ GHC.StgToCmm.Closure: mkLFArgument :: Id -> LambdaFormInfo
+ GHC.StgToCmm.Closure: mkLFImported :: Id -> LambdaFormInfo
+ GHC.StgToCmm.Closure: mkLFLetNoEscape :: LambdaFormInfo
+ GHC.StgToCmm.Closure: mkLFReEntrant :: TopLevelFlag -> [Id] -> [Id] -> ArgDescr -> LambdaFormInfo
+ GHC.StgToCmm.Closure: mkLFStringLit :: LambdaFormInfo
+ GHC.StgToCmm.Closure: mkLFThunk :: Type -> TopLevelFlag -> [Id] -> UpdateFlag -> LambdaFormInfo
+ GHC.StgToCmm.Closure: mkSelectorLFInfo :: Id -> Int -> Bool -> LambdaFormInfo
+ GHC.StgToCmm.Closure: newtype NonVoid a
+ GHC.StgToCmm.Closure: nodeMustPointToIt :: DynFlags -> LambdaFormInfo -> Bool
+ GHC.StgToCmm.Closure: nonVoidIds :: [Id] -> [NonVoid Id]
+ GHC.StgToCmm.Closure: nonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]
+ GHC.StgToCmm.Closure: staticClosureLabel :: ClosureInfo -> CLabel
+ GHC.StgToCmm.Closure: staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool
+ GHC.StgToCmm.Closure: tagForArity :: DynFlags -> RepArity -> DynTag
+ GHC.StgToCmm.Closure: tagForCon :: DynFlags -> DataCon -> DynTag
+ GHC.StgToCmm.Closure: type DynTag = Int
+ GHC.StgToCmm.Closure: type SelfLoopInfo = (Id, BlockId, [LocalReg])
+ GHC.StgToCmm.DataCon: bindConArgs :: AltCon -> LocalReg -> [NonVoid Id] -> FCode [LocalReg]
+ GHC.StgToCmm.DataCon: buildDynCon :: Id -> Bool -> CostCentreStack -> DataCon -> [NonVoid StgArg] -> FCode (CgIdInfo, FCode CmmAGraph)
+ GHC.StgToCmm.DataCon: cgTopRhsCon :: DynFlags -> Id -> DataCon -> [NonVoid StgArg] -> (CgIdInfo, FCode ())
+ GHC.StgToCmm.Env: addBindC :: CgIdInfo -> FCode ()
+ GHC.StgToCmm.Env: addBindsC :: [CgIdInfo] -> FCode ()
+ GHC.StgToCmm.Env: bindArgToReg :: NonVoid Id -> FCode LocalReg
+ GHC.StgToCmm.Env: bindArgsToRegs :: [NonVoid Id] -> FCode [LocalReg]
+ GHC.StgToCmm.Env: bindToReg :: NonVoid Id -> LambdaFormInfo -> FCode LocalReg
+ GHC.StgToCmm.Env: data CgIdInfo
+ GHC.StgToCmm.Env: getArgAmode :: NonVoid StgArg -> FCode CmmExpr
+ GHC.StgToCmm.Env: getCgIdInfo :: Id -> FCode CgIdInfo
+ GHC.StgToCmm.Env: getNonVoidArgAmodes :: [StgArg] -> FCode [CmmExpr]
+ GHC.StgToCmm.Env: idInfoToAmode :: CgIdInfo -> CmmExpr
+ GHC.StgToCmm.Env: idToReg :: DynFlags -> NonVoid Id -> LocalReg
+ GHC.StgToCmm.Env: litIdInfo :: DynFlags -> Id -> LambdaFormInfo -> CmmLit -> CgIdInfo
+ GHC.StgToCmm.Env: lneIdInfo :: DynFlags -> Id -> [NonVoid Id] -> CgIdInfo
+ GHC.StgToCmm.Env: maybeLetNoEscape :: CgIdInfo -> Maybe (BlockId, [LocalReg])
+ GHC.StgToCmm.Env: mkRhsInit :: DynFlags -> LocalReg -> LambdaFormInfo -> CmmExpr -> CmmAGraph
+ GHC.StgToCmm.Env: rebindToReg :: NonVoid Id -> FCode LocalReg
+ GHC.StgToCmm.Env: rhsIdInfo :: Id -> LambdaFormInfo -> FCode (CgIdInfo, LocalReg)
+ GHC.StgToCmm.Expr: cgExpr :: CgStgExpr -> FCode ReturnKind
+ GHC.StgToCmm.ExtCode: FunN :: UnitId -> Named
+ GHC.StgToCmm.ExtCode: LabelN :: BlockId -> Named
+ GHC.StgToCmm.ExtCode: VarN :: CmmExpr -> Named
+ GHC.StgToCmm.ExtCode: code :: FCode a -> CmmParse a
+ GHC.StgToCmm.ExtCode: data CmmParse a
+ GHC.StgToCmm.ExtCode: data Named
+ GHC.StgToCmm.ExtCode: emit :: CmmAGraph -> CmmParse ()
+ GHC.StgToCmm.ExtCode: emitAssign :: CmmReg -> CmmExpr -> CmmParse ()
+ GHC.StgToCmm.ExtCode: emitLabel :: BlockId -> CmmParse ()
+ GHC.StgToCmm.ExtCode: emitOutOfLine :: BlockId -> CmmAGraphScoped -> CmmParse ()
+ GHC.StgToCmm.ExtCode: emitStore :: CmmExpr -> CmmExpr -> CmmParse ()
+ GHC.StgToCmm.ExtCode: getCode :: CmmParse a -> CmmParse CmmAGraph
+ GHC.StgToCmm.ExtCode: getCodeR :: CmmParse a -> CmmParse (a, CmmAGraph)
+ GHC.StgToCmm.ExtCode: getCodeScoped :: CmmParse a -> CmmParse (a, CmmAGraphScoped)
+ GHC.StgToCmm.ExtCode: getEnv :: CmmParse Env
+ GHC.StgToCmm.ExtCode: getName :: CmmParse String
+ GHC.StgToCmm.ExtCode: getUpdFrameOff :: CmmParse UpdFrameOffset
+ GHC.StgToCmm.ExtCode: instance DynFlags.HasDynFlags GHC.StgToCmm.ExtCode.CmmParse
+ GHC.StgToCmm.ExtCode: instance GHC.Base.Applicative GHC.StgToCmm.ExtCode.CmmParse
+ GHC.StgToCmm.ExtCode: instance GHC.Base.Functor GHC.StgToCmm.ExtCode.CmmParse
+ GHC.StgToCmm.ExtCode: instance GHC.Base.Monad GHC.StgToCmm.ExtCode.CmmParse
+ GHC.StgToCmm.ExtCode: instance UniqSupply.MonadUnique GHC.StgToCmm.ExtCode.CmmParse
+ GHC.StgToCmm.ExtCode: lookupLabel :: FastString -> CmmParse BlockId
+ GHC.StgToCmm.ExtCode: lookupName :: FastString -> CmmParse CmmExpr
+ GHC.StgToCmm.ExtCode: loopDecls :: CmmParse a -> CmmParse a
+ GHC.StgToCmm.ExtCode: newBlockId :: MonadUnique m => m BlockId
+ GHC.StgToCmm.ExtCode: newFunctionName :: FastString -> UnitId -> ExtCode
+ GHC.StgToCmm.ExtCode: newImport :: (FastString, CLabel) -> CmmParse ()
+ GHC.StgToCmm.ExtCode: newLabel :: FastString -> CmmParse BlockId
+ GHC.StgToCmm.ExtCode: newLocal :: CmmType -> FastString -> CmmParse LocalReg
+ GHC.StgToCmm.ExtCode: type Env = UniqFM Named
+ GHC.StgToCmm.ExtCode: unEC :: CmmParse a -> String -> Env -> Decls -> FCode (Decls, a)
+ GHC.StgToCmm.ExtCode: withName :: String -> CmmParse a -> CmmParse a
+ GHC.StgToCmm.ExtCode: withUpdFrameOff :: UpdFrameOffset -> CmmParse () -> CmmParse ()
+ GHC.StgToCmm.Foreign: cgForeignCall :: ForeignCall -> Type -> [StgArg] -> Type -> FCode ReturnKind
+ GHC.StgToCmm.Foreign: emitCCall :: [(CmmFormal, ForeignHint)] -> CmmExpr -> [(CmmActual, ForeignHint)] -> FCode ()
+ GHC.StgToCmm.Foreign: emitCloseNursery :: FCode ()
+ GHC.StgToCmm.Foreign: emitForeignCall :: Safety -> [CmmFormal] -> ForeignTarget -> [CmmActual] -> FCode ReturnKind
+ GHC.StgToCmm.Foreign: emitLoadThreadState :: FCode ()
+ GHC.StgToCmm.Foreign: emitOpenNursery :: FCode ()
+ GHC.StgToCmm.Foreign: emitPrimCall :: [CmmFormal] -> CallishMachOp -> [CmmActual] -> FCode ()
+ GHC.StgToCmm.Foreign: emitSaveThreadState :: FCode ()
+ GHC.StgToCmm.Foreign: loadThreadState :: MonadUnique m => DynFlags -> m CmmAGraph
+ GHC.StgToCmm.Foreign: saveThreadState :: MonadUnique m => DynFlags -> m CmmAGraph
+ GHC.StgToCmm.Heap: allocDynClosure :: Maybe Id -> CmmInfoTable -> LambdaFormInfo -> CmmExpr -> CmmExpr -> [(NonVoid StgArg, VirtualHpOffset)] -> FCode CmmExpr
+ GHC.StgToCmm.Heap: allocDynClosureCmm :: Maybe Id -> CmmInfoTable -> LambdaFormInfo -> CmmExpr -> CmmExpr -> [(CmmExpr, ByteOff)] -> FCode CmmExpr
+ GHC.StgToCmm.Heap: allocHeapClosure :: SMRep -> CmmExpr -> CmmExpr -> [(CmmExpr, ByteOff)] -> FCode CmmExpr
+ GHC.StgToCmm.Heap: altHeapCheck :: [LocalReg] -> FCode a -> FCode a
+ GHC.StgToCmm.Heap: altHeapCheckReturnsTo :: [LocalReg] -> Label -> ByteOff -> FCode a -> FCode a
+ GHC.StgToCmm.Heap: emitSetDynHdr :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Heap: entryHeapCheck :: ClosureInfo -> Maybe LocalReg -> Int -> [LocalReg] -> FCode () -> FCode ()
+ GHC.StgToCmm.Heap: entryHeapCheck' :: Bool -> CmmExpr -> Int -> [LocalReg] -> FCode () -> FCode ()
+ GHC.StgToCmm.Heap: getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr
+ GHC.StgToCmm.Heap: getVirtHp :: FCode VirtualHpOffset
+ GHC.StgToCmm.Heap: heapStackCheckGen :: Maybe CmmExpr -> Maybe CmmExpr -> FCode ()
+ GHC.StgToCmm.Heap: mkStaticClosure :: DynFlags -> CLabel -> CostCentreStack -> [CmmLit] -> [CmmLit] -> [CmmLit] -> [CmmLit] -> [CmmLit]
+ GHC.StgToCmm.Heap: mkStaticClosureFields :: DynFlags -> CmmInfoTable -> CostCentreStack -> CafInfo -> [CmmLit] -> [CmmLit]
+ GHC.StgToCmm.Heap: noEscapeHeapCheck :: [LocalReg] -> FCode a -> FCode a
+ GHC.StgToCmm.Heap: setRealHp :: VirtualHpOffset -> FCode ()
+ GHC.StgToCmm.Heap: setVirtHp :: VirtualHpOffset -> FCode ()
+ GHC.StgToCmm.Hpc: initHpc :: Module -> HpcInfo -> FCode ()
+ GHC.StgToCmm.Hpc: mkTickBox :: DynFlags -> Module -> Int -> CmmAGraph
+ GHC.StgToCmm.Layout: D :: ArgRep
+ GHC.StgToCmm.Layout: F :: ArgRep
+ GHC.StgToCmm.Layout: FieldOff :: NonVoid a -> ByteOff -> FieldOffOrPadding a
+ GHC.StgToCmm.Layout: L :: ArgRep
+ GHC.StgToCmm.Layout: N :: ArgRep
+ GHC.StgToCmm.Layout: NoHeader :: ClosureHeader
+ GHC.StgToCmm.Layout: P :: ArgRep
+ GHC.StgToCmm.Layout: Padding :: ByteOff -> ByteOff -> FieldOffOrPadding a
+ GHC.StgToCmm.Layout: StdHeader :: ClosureHeader
+ GHC.StgToCmm.Layout: ThunkHeader :: ClosureHeader
+ GHC.StgToCmm.Layout: V :: ArgRep
+ GHC.StgToCmm.Layout: V16 :: ArgRep
+ GHC.StgToCmm.Layout: V32 :: ArgRep
+ GHC.StgToCmm.Layout: V64 :: ArgRep
+ GHC.StgToCmm.Layout: adjustHpBackwards :: FCode ()
+ GHC.StgToCmm.Layout: argRepSizeW :: DynFlags -> ArgRep -> WordOff
+ GHC.StgToCmm.Layout: data ArgRep
+ GHC.StgToCmm.Layout: data ClosureHeader
+ GHC.StgToCmm.Layout: data FieldOffOrPadding a
+ GHC.StgToCmm.Layout: directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind
+ GHC.StgToCmm.Layout: emitCall :: (Convention, Convention) -> CmmExpr -> [CmmExpr] -> FCode ReturnKind
+ GHC.StgToCmm.Layout: emitClosureAndInfoTable :: CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode ()
+ GHC.StgToCmm.Layout: emitClosureProcAndInfoTable :: Bool -> Id -> LambdaFormInfo -> CmmInfoTable -> [NonVoid Id] -> ((Int, LocalReg, [LocalReg]) -> FCode ()) -> FCode ()
+ GHC.StgToCmm.Layout: emitReturn :: [CmmExpr] -> FCode ReturnKind
+ GHC.StgToCmm.Layout: getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr
+ GHC.StgToCmm.Layout: mkArgDescr :: DynFlags -> [Id] -> ArgDescr
+ GHC.StgToCmm.Layout: mkVirtConstrOffsets :: DynFlags -> [NonVoid (PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, ByteOff)])
+ GHC.StgToCmm.Layout: mkVirtConstrSizes :: DynFlags -> [NonVoid PrimRep] -> (WordOff, WordOff)
+ GHC.StgToCmm.Layout: mkVirtHeapOffsets :: DynFlags -> ClosureHeader -> [NonVoid (PrimRep, a)] -> (WordOff, WordOff, [(NonVoid a, ByteOff)])
+ GHC.StgToCmm.Layout: mkVirtHeapOffsetsWithPadding :: DynFlags -> ClosureHeader -> [NonVoid (PrimRep, a)] -> (WordOff, WordOff, [FieldOffOrPadding a])
+ GHC.StgToCmm.Layout: slowCall :: CmmExpr -> [StgArg] -> FCode ReturnKind
+ GHC.StgToCmm.Layout: toArgRep :: PrimRep -> ArgRep
+ GHC.StgToCmm.Monad: AssignTo :: [LocalReg] -> Bool -> Sequel
+ GHC.StgToCmm.Monad: AssignedDirectly :: ReturnKind
+ GHC.StgToCmm.Monad: CgIdInfo :: Id -> LambdaFormInfo -> CgLoc -> CgIdInfo
+ GHC.StgToCmm.Monad: HeapUsage :: VirtualHpOffset -> VirtualHpOffset -> HeapUsage
+ GHC.StgToCmm.Monad: MkCgInfoDown :: DynFlags -> Module -> UpdFrameOffset -> CLabel -> Sequel -> Maybe SelfLoopInfo -> CmmTickScope -> CgInfoDownwards
+ GHC.StgToCmm.Monad: MkCgState :: CmmAGraph -> OrdList CmmDecl -> CgBindings -> HeapUsage -> UniqSupply -> CgState
+ GHC.StgToCmm.Monad: Return :: Sequel
+ GHC.StgToCmm.Monad: ReturnedTo :: BlockId -> ByteOff -> ReturnKind
+ GHC.StgToCmm.Monad: [cg_id] :: CgIdInfo -> Id
+ GHC.StgToCmm.Monad: [cg_lf] :: CgIdInfo -> LambdaFormInfo
+ GHC.StgToCmm.Monad: [cg_loc] :: CgIdInfo -> CgLoc
+ GHC.StgToCmm.Monad: [cgd_dflags] :: CgInfoDownwards -> DynFlags
+ GHC.StgToCmm.Monad: [cgd_mod] :: CgInfoDownwards -> Module
+ GHC.StgToCmm.Monad: [cgd_self_loop] :: CgInfoDownwards -> Maybe SelfLoopInfo
+ GHC.StgToCmm.Monad: [cgd_sequel] :: CgInfoDownwards -> Sequel
+ GHC.StgToCmm.Monad: [cgd_tick_scope] :: CgInfoDownwards -> CmmTickScope
+ GHC.StgToCmm.Monad: [cgd_ticky] :: CgInfoDownwards -> CLabel
+ GHC.StgToCmm.Monad: [cgd_updfr_off] :: CgInfoDownwards -> UpdFrameOffset
+ GHC.StgToCmm.Monad: [cgs_binds] :: CgState -> CgBindings
+ GHC.StgToCmm.Monad: [cgs_hp_usg] :: CgState -> HeapUsage
+ GHC.StgToCmm.Monad: [cgs_stmts] :: CgState -> CmmAGraph
+ GHC.StgToCmm.Monad: [cgs_tops] :: CgState -> OrdList CmmDecl
+ GHC.StgToCmm.Monad: [cgs_uniqs] :: CgState -> UniqSupply
+ GHC.StgToCmm.Monad: [realHp] :: HeapUsage -> VirtualHpOffset
+ GHC.StgToCmm.Monad: [virtHp] :: HeapUsage -> VirtualHpOffset
+ GHC.StgToCmm.Monad: aGraphToGraph :: CmmAGraphScoped -> FCode CmmGraph
+ GHC.StgToCmm.Monad: codeOnly :: FCode () -> FCode ()
+ GHC.StgToCmm.Monad: data CgIdInfo
+ GHC.StgToCmm.Monad: data CgInfoDownwards
+ GHC.StgToCmm.Monad: data CgState
+ GHC.StgToCmm.Monad: data FCode a
+ GHC.StgToCmm.Monad: data HeapUsage
+ GHC.StgToCmm.Monad: data ReturnKind
+ GHC.StgToCmm.Monad: data Sequel
+ GHC.StgToCmm.Monad: emit :: CmmAGraph -> FCode ()
+ GHC.StgToCmm.Monad: emitAssign :: CmmReg -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Monad: emitComment :: FastString -> FCode ()
+ GHC.StgToCmm.Monad: emitDecl :: CmmDecl -> FCode ()
+ GHC.StgToCmm.Monad: emitLabel :: BlockId -> FCode ()
+ GHC.StgToCmm.Monad: emitOutOfLine :: BlockId -> CmmAGraphScoped -> FCode ()
+ GHC.StgToCmm.Monad: emitProcWithConvention :: Convention -> Maybe CmmInfoTable -> CLabel -> [CmmFormal] -> CmmAGraphScoped -> FCode ()
+ GHC.StgToCmm.Monad: emitProcWithStackFrame :: Convention -> Maybe CmmInfoTable -> CLabel -> [CmmFormal] -> [CmmFormal] -> CmmAGraphScoped -> Bool -> FCode ()
+ GHC.StgToCmm.Monad: emitStore :: CmmExpr -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Monad: emitTick :: CmmTickish -> FCode ()
+ GHC.StgToCmm.Monad: emitUnwind :: [(GlobalReg, Maybe CmmExpr)] -> FCode ()
+ GHC.StgToCmm.Monad: fixC :: (a -> FCode a) -> FCode a
+ GHC.StgToCmm.Monad: forkAltPair :: FCode a -> FCode a -> FCode (a, a)
+ GHC.StgToCmm.Monad: forkAlts :: [FCode a] -> FCode [a]
+ GHC.StgToCmm.Monad: forkClosureBody :: FCode () -> FCode ()
+ GHC.StgToCmm.Monad: forkLneBody :: FCode a -> FCode a
+ GHC.StgToCmm.Monad: getBinds :: FCode CgBindings
+ GHC.StgToCmm.Monad: getCmm :: FCode () -> FCode CmmGroup
+ GHC.StgToCmm.Monad: getCode :: FCode a -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: getCodeR :: FCode a -> FCode (a, CmmAGraph)
+ GHC.StgToCmm.Monad: getCodeScoped :: FCode a -> FCode (a, CmmAGraphScoped)
+ GHC.StgToCmm.Monad: getDynFlags :: HasDynFlags m => m DynFlags
+ GHC.StgToCmm.Monad: getHeapUsage :: (VirtualHpOffset -> FCode a) -> FCode a
+ GHC.StgToCmm.Monad: getHpUsage :: FCode HeapUsage
+ GHC.StgToCmm.Monad: getInfoDown :: FCode CgInfoDownwards
+ GHC.StgToCmm.Monad: getModuleName :: FCode Module
+ GHC.StgToCmm.Monad: getSelfLoop :: FCode (Maybe SelfLoopInfo)
+ GHC.StgToCmm.Monad: getSequel :: FCode Sequel
+ GHC.StgToCmm.Monad: getState :: FCode CgState
+ GHC.StgToCmm.Monad: getThisPackage :: FCode UnitId
+ GHC.StgToCmm.Monad: getTickScope :: FCode CmmTickScope
+ GHC.StgToCmm.Monad: getTickyCtrLabel :: FCode CLabel
+ GHC.StgToCmm.Monad: getUpdFrameOff :: FCode UpdFrameOffset
+ GHC.StgToCmm.Monad: getVirtHp :: FCode VirtualHpOffset
+ GHC.StgToCmm.Monad: heapHWM :: HeapUsage -> VirtualHpOffset
+ GHC.StgToCmm.Monad: initC :: IO CgState
+ GHC.StgToCmm.Monad: initHpUsage :: HeapUsage
+ GHC.StgToCmm.Monad: initUpdFrameOff :: DynFlags -> UpdFrameOffset
+ GHC.StgToCmm.Monad: instance DynFlags.HasDynFlags GHC.StgToCmm.Monad.FCode
+ GHC.StgToCmm.Monad: instance GHC.Base.Applicative GHC.StgToCmm.Monad.FCode
+ GHC.StgToCmm.Monad: instance GHC.Base.Functor GHC.StgToCmm.Monad.FCode
+ GHC.StgToCmm.Monad: instance GHC.Base.Monad GHC.StgToCmm.Monad.FCode
+ GHC.StgToCmm.Monad: instance Outputable.Outputable GHC.StgToCmm.Monad.CgIdInfo
+ GHC.StgToCmm.Monad: instance Outputable.Outputable GHC.StgToCmm.Monad.Sequel
+ GHC.StgToCmm.Monad: instance UniqSupply.MonadUnique GHC.StgToCmm.Monad.FCode
+ GHC.StgToCmm.Monad: mkCall :: CmmExpr -> (Convention, Convention) -> [CmmFormal] -> [CmmExpr] -> UpdFrameOffset -> [CmmExpr] -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: mkCmmCall :: CmmExpr -> [CmmFormal] -> [CmmExpr] -> UpdFrameOffset -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: mkCmmIfGoto :: CmmExpr -> BlockId -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: mkCmmIfGoto' :: CmmExpr -> BlockId -> Maybe Bool -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: mkCmmIfThen :: CmmExpr -> CmmAGraph -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: mkCmmIfThen' :: CmmExpr -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: mkCmmIfThenElse' :: CmmExpr -> CmmAGraph -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph
+ GHC.StgToCmm.Monad: newUnique :: FCode Unique
+ GHC.StgToCmm.Monad: runC :: DynFlags -> Module -> CgState -> FCode a -> (a, CgState)
+ GHC.StgToCmm.Monad: setBinds :: CgBindings -> FCode ()
+ GHC.StgToCmm.Monad: setHpUsage :: HeapUsage -> FCode ()
+ GHC.StgToCmm.Monad: setRealHp :: VirtualHpOffset -> FCode ()
+ GHC.StgToCmm.Monad: setState :: CgState -> FCode ()
+ GHC.StgToCmm.Monad: setTickyCtrLabel :: CLabel -> FCode a -> FCode a
+ GHC.StgToCmm.Monad: setVirtHp :: VirtualHpOffset -> FCode ()
+ GHC.StgToCmm.Monad: tickScope :: FCode a -> FCode a
+ GHC.StgToCmm.Monad: type ConTagZ = Int
+ GHC.StgToCmm.Monad: type VirtualHpOffset = WordOff
+ GHC.StgToCmm.Monad: withSelfLoop :: SelfLoopInfo -> FCode a -> FCode a
+ GHC.StgToCmm.Monad: withSequel :: Sequel -> FCode a -> FCode a
+ GHC.StgToCmm.Monad: withUpdFrameOff :: UpdFrameOffset -> FCode a -> FCode a
+ GHC.StgToCmm.Prim: cgOpApp :: StgOp -> [StgArg] -> Type -> FCode ReturnKind
+ GHC.StgToCmm.Prim: cgPrimOp :: [LocalReg] -> PrimOp -> [StgArg] -> FCode ()
+ GHC.StgToCmm.Prim: shouldInlinePrimOp :: DynFlags -> PrimOp -> [CmmExpr] -> Bool
+ GHC.StgToCmm.Prof: ccType :: DynFlags -> CmmType
+ GHC.StgToCmm.Prof: ccsType :: DynFlags -> CmmType
+ GHC.StgToCmm.Prof: costCentreFrom :: DynFlags -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Prof: dynProfHdr :: DynFlags -> CmmExpr -> [CmmExpr]
+ GHC.StgToCmm.Prof: emitSetCCC :: CostCentre -> Bool -> Bool -> FCode ()
+ GHC.StgToCmm.Prof: enterCostCentreFun :: CostCentreStack -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Prof: enterCostCentreThunk :: CmmExpr -> FCode ()
+ GHC.StgToCmm.Prof: initCostCentres :: CollectedCCs -> FCode ()
+ GHC.StgToCmm.Prof: initUpdFrameProf :: CmmExpr -> FCode ()
+ GHC.StgToCmm.Prof: ldvEnter :: CmmExpr -> FCode ()
+ GHC.StgToCmm.Prof: ldvEnterClosure :: ClosureInfo -> CmmReg -> FCode ()
+ GHC.StgToCmm.Prof: ldvRecordCreate :: CmmExpr -> FCode ()
+ GHC.StgToCmm.Prof: mkCCostCentre :: CostCentre -> CmmLit
+ GHC.StgToCmm.Prof: mkCCostCentreStack :: CostCentreStack -> CmmLit
+ GHC.StgToCmm.Prof: profAlloc :: CmmExpr -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Prof: profDynAlloc :: SMRep -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Prof: restoreCurrentCostCentre :: Maybe LocalReg -> FCode ()
+ GHC.StgToCmm.Prof: saveCurrentCostCentre :: FCode (Maybe LocalReg)
+ GHC.StgToCmm.Prof: staticProfHdr :: DynFlags -> CostCentreStack -> [CmmLit]
+ GHC.StgToCmm.Prof: storeCurCCS :: CmmExpr -> CmmAGraph
+ GHC.StgToCmm.Ticky: tickyAllocHeap :: Bool -> VirtualHpOffset -> FCode ()
+ GHC.StgToCmm.Ticky: tickyAllocPAP :: CmmExpr -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Ticky: tickyAllocPrim :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Ticky: tickyAllocThunk :: CmmExpr -> CmmExpr -> FCode ()
+ GHC.StgToCmm.Ticky: tickyBlackHole :: Bool -> FCode ()
+ GHC.StgToCmm.Ticky: tickyDirectCall :: RepArity -> [StgArg] -> FCode ()
+ GHC.StgToCmm.Ticky: tickyDynAlloc :: Maybe Id -> SMRep -> LambdaFormInfo -> FCode ()
+ GHC.StgToCmm.Ticky: tickyEnterDynCon :: FCode ()
+ GHC.StgToCmm.Ticky: tickyEnterFun :: ClosureInfo -> FCode ()
+ GHC.StgToCmm.Ticky: tickyEnterLNE :: FCode ()
+ GHC.StgToCmm.Ticky: tickyEnterStaticCon :: FCode ()
+ GHC.StgToCmm.Ticky: tickyEnterStdThunk :: ClosureInfo -> FCode ()
+ GHC.StgToCmm.Ticky: tickyEnterThunk :: ClosureInfo -> FCode ()
+ GHC.StgToCmm.Ticky: tickyEnterViaNode :: FCode ()
+ GHC.StgToCmm.Ticky: tickyHeapCheck :: FCode ()
+ GHC.StgToCmm.Ticky: tickyKnownCallExact :: FCode ()
+ GHC.StgToCmm.Ticky: tickyKnownCallExtraArgs :: FCode ()
+ GHC.StgToCmm.Ticky: tickyKnownCallTooFewArgs :: FCode ()
+ GHC.StgToCmm.Ticky: tickyPushUpdateFrame :: FCode ()
+ GHC.StgToCmm.Ticky: tickyReturnNewCon :: RepArity -> FCode ()
+ GHC.StgToCmm.Ticky: tickyReturnOldCon :: RepArity -> FCode ()
+ GHC.StgToCmm.Ticky: tickySlowCall :: LambdaFormInfo -> [StgArg] -> FCode ()
+ GHC.StgToCmm.Ticky: tickySlowCallPat :: [PrimRep] -> FCode ()
+ GHC.StgToCmm.Ticky: tickyStackCheck :: FCode ()
+ GHC.StgToCmm.Ticky: tickyUnboxedTupleReturn :: RepArity -> FCode ()
+ GHC.StgToCmm.Ticky: tickyUnknownCall :: FCode ()
+ GHC.StgToCmm.Ticky: tickyUpdateBhCaf :: ClosureInfo -> FCode ()
+ GHC.StgToCmm.Ticky: tickyUpdateFrameOmitted :: FCode ()
+ GHC.StgToCmm.Ticky: withNewTickyCounterCon :: Name -> FCode a -> FCode a
+ GHC.StgToCmm.Ticky: withNewTickyCounterFun :: Bool -> Name -> [NonVoid Id] -> FCode a -> FCode a
+ GHC.StgToCmm.Ticky: withNewTickyCounterLNE :: Name -> [NonVoid Id] -> FCode a -> FCode a
+ GHC.StgToCmm.Ticky: withNewTickyCounterStdThunk :: Bool -> Name -> FCode a -> FCode a
+ GHC.StgToCmm.Ticky: withNewTickyCounterThunk :: Bool -> Bool -> Name -> FCode a -> FCode a
+ GHC.StgToCmm.Utils: addToMem :: CmmType -> CmmExpr -> Int -> CmmAGraph
+ GHC.StgToCmm.Utils: addToMemE :: CmmType -> CmmExpr -> CmmExpr -> CmmAGraph
+ GHC.StgToCmm.Utils: addToMemLbl :: CmmType -> CLabel -> Int -> CmmAGraph
+ GHC.StgToCmm.Utils: addToMemLblE :: CmmType -> CLabel -> CmmExpr -> CmmAGraph
+ GHC.StgToCmm.Utils: assignTemp :: CmmExpr -> FCode LocalReg
+ GHC.StgToCmm.Utils: blankWord :: DynFlags -> CmmStatic
+ GHC.StgToCmm.Utils: callerSaveVolatileRegs :: DynFlags -> (CmmAGraph, CmmAGraph)
+ GHC.StgToCmm.Utils: callerSaves :: Platform -> GlobalReg -> Bool
+ GHC.StgToCmm.Utils: cgLit :: Literal -> FCode CmmLit
+ GHC.StgToCmm.Utils: cmmAddWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmAndWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmConstrTag1 :: DynFlags -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmEqWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmIsTagged :: DynFlags -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmLabelOffB :: CLabel -> ByteOff -> CmmLit
+ GHC.StgToCmm.Utils: cmmLabelOffW :: DynFlags -> CLabel -> WordOff -> CmmLit
+ GHC.StgToCmm.Utils: cmmLoadIndexW :: DynFlags -> CmmExpr -> Int -> CmmType -> CmmExpr
+ GHC.StgToCmm.Utils: cmmMulWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmNeWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmNegate :: DynFlags -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmOffsetB :: DynFlags -> CmmExpr -> ByteOff -> CmmExpr
+ GHC.StgToCmm.Utils: cmmOffsetExprB :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmOffsetExprW :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmOffsetLitB :: CmmLit -> ByteOff -> CmmLit
+ GHC.StgToCmm.Utils: cmmOffsetLitW :: DynFlags -> CmmLit -> WordOff -> CmmLit
+ GHC.StgToCmm.Utils: cmmOffsetW :: DynFlags -> CmmExpr -> WordOff -> CmmExpr
+ GHC.StgToCmm.Utils: cmmOrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmRegOffB :: CmmReg -> ByteOff -> CmmExpr
+ GHC.StgToCmm.Utils: cmmRegOffW :: DynFlags -> CmmReg -> WordOff -> CmmExpr
+ GHC.StgToCmm.Utils: cmmSubWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmUGtWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmUShrWord :: DynFlags -> CmmExpr -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: cmmUntag :: DynFlags -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: emitCmmLitSwitch :: CmmExpr -> [(Literal, CmmAGraphScoped)] -> CmmAGraphScoped -> FCode ()
+ GHC.StgToCmm.Utils: emitDataLits :: CLabel -> [CmmLit] -> FCode ()
+ GHC.StgToCmm.Utils: emitMultiAssign :: [LocalReg] -> [CmmExpr] -> FCode ()
+ GHC.StgToCmm.Utils: emitRODataLits :: CLabel -> [CmmLit] -> FCode ()
+ GHC.StgToCmm.Utils: emitRtsCall :: UnitId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
+ GHC.StgToCmm.Utils: emitRtsCallGen :: [(LocalReg, ForeignHint)] -> CLabel -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
+ GHC.StgToCmm.Utils: emitRtsCallWithResult :: LocalReg -> ForeignHint -> UnitId -> FastString -> [(CmmExpr, ForeignHint)] -> Bool -> FCode ()
+ GHC.StgToCmm.Utils: emitSwitch :: CmmExpr -> [(ConTagZ, CmmAGraphScoped)] -> Maybe CmmAGraphScoped -> ConTagZ -> ConTagZ -> FCode ()
+ GHC.StgToCmm.Utils: emitUpdRemSetPush :: CmmExpr -> FCode ()
+ GHC.StgToCmm.Utils: emitUpdRemSetPushThunk :: CmmExpr -> FCode ()
+ GHC.StgToCmm.Utils: get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr
+ GHC.StgToCmm.Utils: mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt
+ GHC.StgToCmm.Utils: mkRODataLits :: CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt
+ GHC.StgToCmm.Utils: mkSimpleLit :: DynFlags -> Literal -> CmmLit
+ GHC.StgToCmm.Utils: mkTaggedObjectLoad :: DynFlags -> LocalReg -> LocalReg -> ByteOff -> DynTag -> CmmAGraph
+ GHC.StgToCmm.Utils: mkWordCLit :: DynFlags -> Integer -> CmmLit
+ GHC.StgToCmm.Utils: newByteStringCLit :: ByteString -> FCode CmmLit
+ GHC.StgToCmm.Utils: newStringCLit :: String -> FCode CmmLit
+ GHC.StgToCmm.Utils: newTemp :: MonadUnique m => CmmType -> m LocalReg
+ GHC.StgToCmm.Utils: newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
+ GHC.StgToCmm.Utils: tagToClosure :: DynFlags -> TyCon -> CmmExpr -> CmmExpr
+ GHC.StgToCmm.Utils: whenUpdRemSetEnabled :: DynFlags -> FCode a -> FCode ()
+ GHC.ThToHs: convertToHsDecls :: Origin -> SrcSpan -> [Dec] -> Either MsgDoc [LHsDecl GhcPs]
+ GHC.ThToHs: convertToHsExpr :: Origin -> SrcSpan -> Exp -> Either MsgDoc (LHsExpr GhcPs)
+ GHC.ThToHs: convertToHsType :: Origin -> SrcSpan -> Type -> Either MsgDoc (LHsType GhcPs)
+ GHC.ThToHs: convertToPat :: Origin -> SrcSpan -> Pat -> Either MsgDoc (LPat GhcPs)
+ GHC.ThToHs: instance GHC.Base.Applicative GHC.ThToHs.CvtM
+ GHC.ThToHs: instance GHC.Base.Functor GHC.ThToHs.CvtM
+ GHC.ThToHs: instance GHC.Base.Monad GHC.ThToHs.CvtM
+ GHC.ThToHs: thRdrNameGuesses :: Name -> [RdrName]
+ GHCi: [RtsRevertCAFs] :: Message ()
+ GhcNameVersion: GhcNameVersion :: String -> String -> GhcNameVersion
+ GhcNameVersion: [ghcNameVersion_programName] :: GhcNameVersion -> String
+ GhcNameVersion: [ghcNameVersion_projectVersion] :: GhcNameVersion -> String
+ GhcNameVersion: data GhcNameVersion
+ GhcPlugins: ForallInvis :: ForallVisFlag
+ GhcPlugins: ForallVis :: ForallVisFlag
+ GhcPlugins: InvisArg :: AnonArgFlag
+ GhcPlugins: KindLevel :: TypeOrKind
+ GhcPlugins: TypeLevel :: TypeOrKind
+ GhcPlugins: VisArg :: AnonArgFlag
+ GhcPlugins: alignmentOf :: Int -> Alignment
+ GhcPlugins: classifiesTypeWithValues :: Kind -> Bool
+ GhcPlugins: coToMCo :: Coercion -> MCoercion
+ GhcPlugins: data Alignment
+ GhcPlugins: data AnonArgFlag
+ GhcPlugins: data ForallVisFlag
+ GhcPlugins: data TypeOrKind
+ GhcPlugins: discardCast :: Type -> Type
+ GhcPlugins: isConstraintKindCon :: TyCon -> Bool
+ GhcPlugins: isDataConWrapId :: Id -> Bool
+ GhcPlugins: isDataConWrapId_maybe :: Id -> Maybe DataCon
+ GhcPlugins: isGReflMCo :: MCoercion -> Bool
+ GhcPlugins: isKindLevPoly :: Kind -> Bool
+ GhcPlugins: isKindLevel :: TypeOrKind -> Bool
+ GhcPlugins: isLiftedRuntimeRep :: Type -> Bool
+ GhcPlugins: isLiftedTypeKind :: Kind -> Bool
+ GhcPlugins: isTypeLevel :: TypeOrKind -> Bool
+ GhcPlugins: isUnliftedRuntimeRep :: Type -> Bool
+ GhcPlugins: isUnliftedTypeKind :: Kind -> Bool
+ GhcPlugins: mightBeUnliftedType :: Type -> Bool
+ GhcPlugins: mkAlignment :: Int -> Alignment
+ GhcPlugins: mkInvisFunTy :: Type -> Type -> Type
+ GhcPlugins: mkInvisFunTys :: [Type] -> Type -> Type
+ GhcPlugins: mkPiTy :: TyCoBinder -> Type -> Type
+ GhcPlugins: mkSpecForAllTy :: TyVar -> Type -> Type
+ GhcPlugins: mkVisFunTy :: Type -> Type -> Type
+ GhcPlugins: mkVisFunTys :: [Type] -> Type -> Type
+ GhcPlugins: nameNameSpace :: Name -> NameSpace
+ GhcPlugins: splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type)
+ GhcPlugins: tcIsRuntimeTypeKind :: Kind -> Bool
+ GhcPlugins: tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
+ GhcPrelude: (!!) :: [a] -> Int -> a
+ GhcPrelude: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ GhcPrelude: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
+ GhcPrelude: (&&) :: Bool -> Bool -> Bool
+ GhcPrelude: (*) :: Num a => a -> a -> a
+ GhcPrelude: (**) :: Floating a => a -> a -> a
+ GhcPrelude: (*>) :: Applicative f => f a -> f b -> f b
+ GhcPrelude: (+) :: Num a => a -> a -> a
+ GhcPrelude: (++) :: [a] -> [a] -> [a]
+ GhcPrelude: (-) :: Num a => a -> a -> a
+ GhcPrelude: (.) :: (b -> c) -> (a -> b) -> a -> c
+ GhcPrelude: (/) :: Fractional a => a -> a -> a
+ GhcPrelude: (/=) :: Eq a => a -> a -> Bool
+ GhcPrelude: (<$) :: Functor f => a -> f b -> f a
+ GhcPrelude: (<$>) :: Functor f => (a -> b) -> f a -> f b
+ GhcPrelude: (<) :: Ord a => a -> a -> Bool
+ GhcPrelude: (<*) :: Applicative f => f a -> f b -> f a
+ GhcPrelude: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
+ GhcPrelude: (<=) :: Ord a => a -> a -> Bool
+ GhcPrelude: (=<<) :: Monad m => (a -> m b) -> m a -> m b
+ GhcPrelude: (==) :: Eq a => a -> a -> Bool
+ GhcPrelude: (>) :: Ord a => a -> a -> Bool
+ GhcPrelude: (>=) :: Ord a => a -> a -> Bool
+ GhcPrelude: (>>) :: Monad m => m a -> m b -> m b
+ GhcPrelude: (>>=) :: Monad m => m a -> (a -> m b) -> m b
+ GhcPrelude: (^) :: (Num a, Integral b) => a -> b -> a
+ GhcPrelude: (^^) :: (Fractional a, Integral b) => a -> b -> a
+ GhcPrelude: (||) :: Bool -> Bool -> Bool
+ GhcPrelude: EQ :: Ordering
+ GhcPrelude: False :: Bool
+ GhcPrelude: GT :: Ordering
+ GhcPrelude: Just :: a -> Maybe a
+ GhcPrelude: LT :: Ordering
+ GhcPrelude: Left :: a -> Either a b
+ GhcPrelude: Nothing :: Maybe a
+ GhcPrelude: Right :: b -> Either a b
+ GhcPrelude: True :: Bool
+ GhcPrelude: abs :: Num a => a -> a
+ GhcPrelude: acos :: Floating a => a -> a
+ GhcPrelude: acosh :: Floating a => a -> a
+ GhcPrelude: all :: Foldable t => (a -> Bool) -> t a -> Bool
+ GhcPrelude: and :: Foldable t => t Bool -> Bool
+ GhcPrelude: any :: Foldable t => (a -> Bool) -> t a -> Bool
+ GhcPrelude: appendFile :: FilePath -> String -> IO ()
+ GhcPrelude: asTypeOf :: a -> a -> a
+ GhcPrelude: asin :: Floating a => a -> a
+ GhcPrelude: asinh :: Floating a => a -> a
+ GhcPrelude: atan :: Floating a => a -> a
+ GhcPrelude: atan2 :: RealFloat a => a -> a -> a
+ GhcPrelude: atanh :: Floating a => a -> a
+ GhcPrelude: break :: (a -> Bool) -> [a] -> ([a], [a])
+ GhcPrelude: ceiling :: (RealFrac a, Integral b) => a -> b
+ GhcPrelude: class Functor f => Applicative (f :: Type -> Type)
+ GhcPrelude: class Bounded a
+ GhcPrelude: class Enum a
+ GhcPrelude: class Eq a
+ GhcPrelude: class Fractional a => Floating a
+ GhcPrelude: class Foldable (t :: Type -> Type)
+ GhcPrelude: class Num a => Fractional a
+ GhcPrelude: class Functor (f :: Type -> Type)
+ GhcPrelude: class (Real a, Enum a) => Integral a
+ GhcPrelude: class Applicative m => Monad (m :: Type -> Type)
+ GhcPrelude: class Monad m => MonadFail (m :: Type -> Type)
+ GhcPrelude: class Semigroup a => Monoid a
+ GhcPrelude: class Num a
+ GhcPrelude: class Eq a => Ord a
+ GhcPrelude: class Read a
+ GhcPrelude: class (Num a, Ord a) => Real a
+ GhcPrelude: class (RealFrac a, Floating a) => RealFloat a
+ GhcPrelude: class (Real a, Fractional a) => RealFrac a
+ GhcPrelude: class Semigroup a
+ GhcPrelude: class Show a
+ GhcPrelude: class (Functor t, Foldable t) => Traversable (t :: Type -> Type)
+ GhcPrelude: compare :: Ord a => a -> a -> Ordering
+ GhcPrelude: concat :: Foldable t => t [a] -> [a]
+ GhcPrelude: concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
+ GhcPrelude: const :: a -> b -> a
+ GhcPrelude: cos :: Floating a => a -> a
+ GhcPrelude: cosh :: Floating a => a -> a
+ GhcPrelude: curry :: ((a, b) -> c) -> a -> b -> c
+ GhcPrelude: cycle :: [a] -> [a]
+ GhcPrelude: data Bool
+ GhcPrelude: data Char
+ GhcPrelude: data Double
+ GhcPrelude: data Either a b
+ GhcPrelude: data Float
+ GhcPrelude: data IO a
+ GhcPrelude: data Int
+ GhcPrelude: data Integer
+ GhcPrelude: data Maybe a
+ GhcPrelude: data Ordering
+ GhcPrelude: data Word
+ GhcPrelude: decodeFloat :: RealFloat a => a -> (Integer, Int)
+ GhcPrelude: div :: Integral a => a -> a -> a
+ GhcPrelude: divMod :: Integral a => a -> a -> (a, a)
+ GhcPrelude: drop :: Int -> [a] -> [a]
+ GhcPrelude: dropWhile :: (a -> Bool) -> [a] -> [a]
+ GhcPrelude: either :: (a -> c) -> (b -> c) -> Either a b -> c
+ GhcPrelude: elem :: (Foldable t, Eq a) => a -> t a -> Bool
+ GhcPrelude: encodeFloat :: RealFloat a => Integer -> Int -> a
+ GhcPrelude: enumFrom :: Enum a => a -> [a]
+ GhcPrelude: enumFromThen :: Enum a => a -> a -> [a]
+ GhcPrelude: enumFromThenTo :: Enum a => a -> a -> a -> [a]
+ GhcPrelude: enumFromTo :: Enum a => a -> a -> [a]
+ GhcPrelude: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
+ GhcPrelude: errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
+ GhcPrelude: even :: Integral a => a -> Bool
+ GhcPrelude: exp :: Floating a => a -> a
+ GhcPrelude: exponent :: RealFloat a => a -> Int
+ GhcPrelude: fail :: MonadFail m => String -> m a
+ GhcPrelude: filter :: (a -> Bool) -> [a] -> [a]
+ GhcPrelude: flip :: (a -> b -> c) -> b -> a -> c
+ GhcPrelude: floatDigits :: RealFloat a => a -> Int
+ GhcPrelude: floatRadix :: RealFloat a => a -> Integer
+ GhcPrelude: floatRange :: RealFloat a => a -> (Int, Int)
+ GhcPrelude: floor :: (RealFrac a, Integral b) => a -> b
+ GhcPrelude: fmap :: Functor f => (a -> b) -> f a -> f b
+ GhcPrelude: foldMap :: (Foldable t, Monoid m) => (a -> m) -> t a -> m
+ GhcPrelude: foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
+ GhcPrelude: foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
+ GhcPrelude: foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
+ GhcPrelude: foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
+ GhcPrelude: foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
+ GhcPrelude: fromEnum :: Enum a => a -> Int
+ GhcPrelude: fromInteger :: Num a => Integer -> a
+ GhcPrelude: fromIntegral :: (Integral a, Num b) => a -> b
+ GhcPrelude: fromRational :: Fractional a => Rational -> a
+ GhcPrelude: fst :: (a, b) -> a
+ GhcPrelude: gcd :: Integral a => a -> a -> a
+ GhcPrelude: getChar :: IO Char
+ GhcPrelude: getContents :: IO String
+ GhcPrelude: getLine :: IO String
+ GhcPrelude: head :: [a] -> a
+ GhcPrelude: id :: a -> a
+ GhcPrelude: infix 4 `notElem`
+ GhcPrelude: infixl 1 >>
+ GhcPrelude: infixl 4 <$>
+ GhcPrelude: infixl 6 +
+ GhcPrelude: infixl 7 *
+ GhcPrelude: infixl 9 !!
+ GhcPrelude: infixr 0 $!
+ GhcPrelude: infixr 1 =<<
+ GhcPrelude: infixr 2 ||
+ GhcPrelude: infixr 3 &&
+ GhcPrelude: infixr 5 ++
+ GhcPrelude: infixr 8 ^
+ GhcPrelude: infixr 9 .
+ GhcPrelude: init :: [a] -> [a]
+ GhcPrelude: interact :: (String -> String) -> IO ()
+ GhcPrelude: ioError :: IOError -> IO a
+ GhcPrelude: isDenormalized :: RealFloat a => a -> Bool
+ GhcPrelude: isIEEE :: RealFloat a => a -> Bool
+ GhcPrelude: isInfinite :: RealFloat a => a -> Bool
+ GhcPrelude: isNaN :: RealFloat a => a -> Bool
+ GhcPrelude: isNegativeZero :: RealFloat a => a -> Bool
+ GhcPrelude: iterate :: (a -> a) -> a -> [a]
+ GhcPrelude: last :: [a] -> a
+ GhcPrelude: lcm :: Integral a => a -> a -> a
+ GhcPrelude: length :: Foldable t => t a -> Int
+ GhcPrelude: lex :: ReadS String
+ GhcPrelude: lines :: String -> [String]
+ GhcPrelude: log :: Floating a => a -> a
+ GhcPrelude: logBase :: Floating a => a -> a -> a
+ GhcPrelude: lookup :: Eq a => a -> [(a, b)] -> Maybe b
+ GhcPrelude: map :: (a -> b) -> [a] -> [b]
+ GhcPrelude: mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
+ GhcPrelude: mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
+ GhcPrelude: mappend :: Monoid a => a -> a -> a
+ GhcPrelude: max :: Ord a => a -> a -> a
+ GhcPrelude: maxBound :: Bounded a => a
+ GhcPrelude: maximum :: (Foldable t, Ord a) => t a -> a
+ GhcPrelude: maybe :: b -> (a -> b) -> Maybe a -> b
+ GhcPrelude: mconcat :: Monoid a => [a] -> a
+ GhcPrelude: mempty :: Monoid a => a
+ GhcPrelude: min :: Ord a => a -> a -> a
+ GhcPrelude: minBound :: Bounded a => a
+ GhcPrelude: minimum :: (Foldable t, Ord a) => t a -> a
+ GhcPrelude: mod :: Integral a => a -> a -> a
+ GhcPrelude: negate :: Num a => a -> a
+ GhcPrelude: not :: Bool -> Bool
+ GhcPrelude: notElem :: (Foldable t, Eq a) => a -> t a -> Bool
+ GhcPrelude: null :: Foldable t => t a -> Bool
+ GhcPrelude: odd :: Integral a => a -> Bool
+ GhcPrelude: or :: Foldable t => t Bool -> Bool
+ GhcPrelude: otherwise :: Bool
+ GhcPrelude: pi :: Floating a => a
+ GhcPrelude: pred :: Enum a => a -> a
+ GhcPrelude: print :: Show a => a -> IO ()
+ GhcPrelude: product :: (Foldable t, Num a) => t a -> a
+ GhcPrelude: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
+ GhcPrelude: pure :: Applicative f => a -> f a
+ GhcPrelude: putChar :: Char -> IO ()
+ GhcPrelude: putStr :: String -> IO ()
+ GhcPrelude: putStrLn :: String -> IO ()
+ GhcPrelude: quot :: Integral a => a -> a -> a
+ GhcPrelude: quotRem :: Integral a => a -> a -> (a, a)
+ GhcPrelude: read :: Read a => String -> a
+ GhcPrelude: readFile :: FilePath -> IO String
+ GhcPrelude: readIO :: Read a => String -> IO a
+ GhcPrelude: readList :: Read a => ReadS [a]
+ GhcPrelude: readLn :: Read a => IO a
+ GhcPrelude: readParen :: Bool -> ReadS a -> ReadS a
+ GhcPrelude: reads :: Read a => ReadS a
+ GhcPrelude: readsPrec :: Read a => Int -> ReadS a
+ GhcPrelude: realToFrac :: (Real a, Fractional b) => a -> b
+ GhcPrelude: recip :: Fractional a => a -> a
+ GhcPrelude: rem :: Integral a => a -> a -> a
+ GhcPrelude: repeat :: a -> [a]
+ GhcPrelude: replicate :: Int -> a -> [a]
+ GhcPrelude: return :: Monad m => a -> m a
+ GhcPrelude: reverse :: [a] -> [a]
+ GhcPrelude: round :: (RealFrac a, Integral b) => a -> b
+ GhcPrelude: scaleFloat :: RealFloat a => Int -> a -> a
+ GhcPrelude: scanl :: (b -> a -> b) -> b -> [a] -> [b]
+ GhcPrelude: scanl1 :: (a -> a -> a) -> [a] -> [a]
+ GhcPrelude: scanr :: (a -> b -> b) -> b -> [a] -> [b]
+ GhcPrelude: scanr1 :: (a -> a -> a) -> [a] -> [a]
+ GhcPrelude: seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
+ GhcPrelude: sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
+ GhcPrelude: sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)
+ GhcPrelude: sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
+ GhcPrelude: show :: Show a => a -> String
+ GhcPrelude: showChar :: Char -> ShowS
+ GhcPrelude: showList :: Show a => [a] -> ShowS
+ GhcPrelude: showParen :: Bool -> ShowS -> ShowS
+ GhcPrelude: showString :: String -> ShowS
+ GhcPrelude: shows :: Show a => a -> ShowS
+ GhcPrelude: showsPrec :: Show a => Int -> a -> ShowS
+ GhcPrelude: significand :: RealFloat a => a -> a
+ GhcPrelude: signum :: Num a => a -> a
+ GhcPrelude: sin :: Floating a => a -> a
+ GhcPrelude: sinh :: Floating a => a -> a
+ GhcPrelude: snd :: (a, b) -> b
+ GhcPrelude: span :: (a -> Bool) -> [a] -> ([a], [a])
+ GhcPrelude: splitAt :: Int -> [a] -> ([a], [a])
+ GhcPrelude: sqrt :: Floating a => a -> a
+ GhcPrelude: subtract :: Num a => a -> a -> a
+ GhcPrelude: succ :: Enum a => a -> a
+ GhcPrelude: sum :: (Foldable t, Num a) => t a -> a
+ GhcPrelude: tail :: [a] -> [a]
+ GhcPrelude: take :: Int -> [a] -> [a]
+ GhcPrelude: takeWhile :: (a -> Bool) -> [a] -> [a]
+ GhcPrelude: tan :: Floating a => a -> a
+ GhcPrelude: tanh :: Floating a => a -> a
+ GhcPrelude: toEnum :: Enum a => Int -> a
+ GhcPrelude: toInteger :: Integral a => a -> Integer
+ GhcPrelude: toRational :: Real a => a -> Rational
+ GhcPrelude: traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
+ GhcPrelude: truncate :: (RealFrac a, Integral b) => a -> b
+ GhcPrelude: type FilePath = String
+ GhcPrelude: type IOError = IOException
+ GhcPrelude: type Rational = Ratio Integer
+ GhcPrelude: type ReadS a = String -> [(a, String)]
+ GhcPrelude: type ShowS = String -> String
+ GhcPrelude: type String = [Char]
+ GhcPrelude: uncurry :: (a -> b -> c) -> (a, b) -> c
+ GhcPrelude: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
+ GhcPrelude: unlines :: [String] -> String
+ GhcPrelude: until :: (a -> Bool) -> (a -> a) -> a -> a
+ GhcPrelude: unwords :: [String] -> String
+ GhcPrelude: unzip :: [(a, b)] -> ([a], [b])
+ GhcPrelude: unzip3 :: [(a, b, c)] -> ([a], [b], [c])
+ GhcPrelude: userError :: String -> IOError
+ GhcPrelude: words :: String -> [String]
+ GhcPrelude: writeFile :: FilePath -> String -> IO ()
+ GhcPrelude: zip :: [a] -> [b] -> [(a, b)]
+ GhcPrelude: zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
+ GhcPrelude: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
+ GhcPrelude: zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
+ HieAst: instance (HieAst.HasLoc thing, HieAst.ToHie (HieAst.TScoped thing)) => HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.HsImplicitBndrs GHC.Hs.Extension.GhcRn thing))
+ HieAst: instance (HieAst.HasLoc thing, HieAst.ToHie (HieAst.TScoped thing)) => HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.HsWildCardBndrs GHC.Hs.Extension.GhcRn thing))
+ HieAst: instance (HieAst.HasLoc tm, HieAst.HasLoc ty) => HieAst.HasLoc (GHC.Hs.Types.HsArg tm ty)
+ HieAst: instance (HieAst.ToHie (GHC.Hs.Expr.LHsCmd a), Data.Data.Data (GHC.Hs.Expr.HsCmdTop a)) => HieAst.ToHie (GHC.Hs.Expr.LHsCmdTop a)
+ HieAst: instance (HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), Data.Data.Data (GHC.Hs.Expr.HsSplice a)) => HieAst.ToHie (SrcLoc.Located (GHC.Hs.Expr.HsSplice a))
+ HieAst: instance (HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (HieAst.BindContext (GHC.Hs.Binds.LHsBind a)), HieAst.ToHie (HieAst.SigContext (GHC.Hs.Binds.LSig a)), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.HsValBindsLR a a)), Data.Data.Data (GHC.Hs.Binds.HsLocalBinds a)) => HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.LHsLocalBinds a))
+ HieAst: instance (HieAst.ToHie (HieAst.BindContext (GHC.Hs.Binds.LHsBind a)), HieAst.ToHie (HieAst.SigContext (GHC.Hs.Binds.LSig a)), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Extension.XXValBindsLR a a))) => HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.HsValBindsLR a a))
+ HieAst: instance (HieAst.ToHie (HieAst.Context (SrcLoc.Located (GHC.Hs.Extension.IdP a))), HieAst.ToHie (GHC.Hs.Expr.MatchGroup a (GHC.Hs.Expr.LHsExpr a)), HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (GHC.Hs.Expr.GRHSs a (GHC.Hs.Expr.LHsExpr a)), HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), HieAst.ToHie (SrcLoc.Located (GHC.Hs.Binds.PatSynBind a a)), HieAst.HasType (GHC.Hs.Binds.LHsBind a), HieAst.ModifyState (GHC.Hs.Extension.IdP a), Data.Data.Data (GHC.Hs.Binds.HsBind a)) => HieAst.ToHie (HieAst.BindContext (GHC.Hs.Binds.LHsBind a))
+ HieAst: instance (HieAst.ToHie (HieAst.Context (SrcLoc.Located (GHC.Hs.Extension.IdP a))), HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (GHC.Hs.Binds.HsPatSynDir a)) => HieAst.ToHie (SrcLoc.Located (GHC.Hs.Binds.PatSynBind a a))
+ HieAst: instance (HieAst.ToHie (HieAst.RFContext (SrcLoc.Located label)), HieAst.ToHie arg, HieAst.HasLoc arg, Data.Data.Data label, Data.Data.Data arg) => HieAst.ToHie (HieAst.RContext (GHC.Hs.Pat.LHsRecField' label arg))
+ HieAst: instance (HieAst.ToHie (SrcLoc.Located body), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Expr.GuardLStmt a)), Data.Data.Data (GHC.Hs.Expr.GRHS a (SrcLoc.Located body))) => HieAst.ToHie (GHC.Hs.Expr.LGRHS a (SrcLoc.Located body))
+ HieAst: instance (HieAst.ToHie arg, HieAst.ToHie rec) => HieAst.ToHie (GHC.Hs.Types.HsConDetails arg rec)
+ HieAst: instance (HieAst.ToHie body, HieAst.ToHie (GHC.Hs.Expr.LGRHS a body), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.LHsLocalBinds a))) => HieAst.ToHie (GHC.Hs.Expr.GRHSs a body)
+ HieAst: instance (HieAst.ToHie rhs, HieAst.HasLoc rhs) => HieAst.ToHie (GHC.Hs.Decls.FamEqn GHC.Hs.Extension.GhcRn rhs)
+ HieAst: instance (HieAst.ToHie rhs, HieAst.HasLoc rhs) => HieAst.ToHie (HieAst.TScoped (GHC.Hs.Decls.FamEqn GHC.Hs.Extension.GhcRn rhs))
+ HieAst: instance (HieAst.ToHie tm, HieAst.ToHie ty) => HieAst.ToHie (GHC.Hs.Types.HsArg tm ty)
+ HieAst: instance (a GHC.Types.~ GHC.Hs.Extension.GhcPass p, HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), Data.Data.Data (GHC.Hs.Expr.HsTupArg a)) => HieAst.ToHie (GHC.Hs.Expr.LHsTupArg (GHC.Hs.Extension.GhcPass p))
+ HieAst: instance (a GHC.Types.~ GHC.Hs.Extension.GhcPass p, HieAst.ToHie (HieAst.Context (SrcLoc.Located (GHC.Hs.Extension.IdP a))), HieAst.HasType (GHC.Hs.Expr.LHsExpr a), HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (GHC.Hs.Expr.MatchGroup a (GHC.Hs.Expr.LHsExpr a)), HieAst.ToHie (GHC.Hs.Expr.LGRHS a (GHC.Hs.Expr.LHsExpr a)), HieAst.ToHie (HieAst.RContext (GHC.Hs.Expr.HsRecordBinds a)), HieAst.ToHie (HieAst.RFContext (SrcLoc.Located (GHC.Hs.Types.AmbiguousFieldOcc a))), HieAst.ToHie (GHC.Hs.Expr.ArithSeqInfo a), HieAst.ToHie (GHC.Hs.Expr.LHsCmdTop a), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Expr.GuardLStmt a)), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.LHsLocalBinds a)), HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.LHsWcType (GHC.Hs.Extension.NoGhcTc a))), HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.LHsSigWcType (GHC.Hs.Extension.NoGhcTc a))), Data.Data.Data (GHC.Hs.Expr.HsExpr a), Data.Data.Data (GHC.Hs.Expr.HsSplice a), Data.Data.Data (GHC.Hs.Expr.HsTupArg a), Data.Data.Data (GHC.Hs.Types.AmbiguousFieldOcc a), HieAst.HasRealDataConName a) => HieAst.ToHie (GHC.Hs.Expr.LHsExpr (GHC.Hs.Extension.GhcPass p))
+ HieAst: instance (a GHC.Types.~ GHC.Hs.Extension.GhcPass p, HieAst.ToHie (HieAst.Context (SrcLoc.Located (GHC.Hs.Extension.IdP a))), HieAst.ToHie (HieAst.RContext (GHC.Hs.Pat.HsRecFields a (HieAst.PScoped (GHC.Hs.Pat.LPat a)))), HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.LHsSigWcType a)), HieAst.ProtectSig a, HieAst.ToHie (HieAst.TScoped (HieAst.ProtectedSig a)), HieAst.HasType (GHC.Hs.Pat.LPat a), Data.Data.Data (GHC.Hs.Expr.HsSplice a)) => HieAst.ToHie (HieAst.PScoped (SrcLoc.Located (GHC.Hs.Pat.Pat (GHC.Hs.Extension.GhcPass p))))
+ HieAst: instance (a GHC.Types.~ GHC.Hs.Extension.GhcPass p, HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), HieAst.ToHie (HieAst.SigContext (GHC.Hs.Binds.LSig a)), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.LHsLocalBinds a)), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Expr.ApplicativeArg a)), HieAst.ToHie (SrcLoc.Located body), Data.Data.Data (GHC.Hs.Expr.StmtLR a a (SrcLoc.Located body)), Data.Data.Data (GHC.Hs.Expr.StmtLR a a (SrcLoc.Located (GHC.Hs.Expr.HsExpr a)))) => HieAst.ToHie (HieAst.RScoped (GHC.Hs.Expr.LStmt (GHC.Hs.Extension.GhcPass p) (SrcLoc.Located body)))
+ HieAst: instance (a GHC.Types.~ GHC.Hs.Extension.GhcPass p, HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (HieAst.BindContext (GHC.Hs.Binds.LHsBind a)), HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), HieAst.ToHie (GHC.Hs.Expr.MatchGroup a (GHC.Hs.Expr.LHsCmd a)), HieAst.ToHie (HieAst.SigContext (GHC.Hs.Binds.LSig a)), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.HsValBindsLR a a)), Data.Data.Data (GHC.Hs.Expr.HsCmd a), Data.Data.Data (GHC.Hs.Expr.HsCmdTop a), Data.Data.Data (GHC.Hs.Expr.StmtLR a a (SrcLoc.Located (GHC.Hs.Expr.HsCmd a))), Data.Data.Data (GHC.Hs.Binds.HsLocalBinds a), Data.Data.Data (GHC.Hs.Expr.StmtLR a a (SrcLoc.Located (GHC.Hs.Expr.HsExpr a)))) => HieAst.ToHie (GHC.Hs.Expr.LHsCmd (GHC.Hs.Extension.GhcPass p))
+ HieAst: instance (a GHC.Types.~ GHC.Hs.Extension.GhcPass p, HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (HieAst.BindContext (GHC.Hs.Binds.LHsBind a)), HieAst.ToHie (GHC.Hs.Expr.LHsExpr a), HieAst.ToHie (HieAst.SigContext (GHC.Hs.Binds.LSig a)), HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.HsValBindsLR a a)), Data.Data.Data (GHC.Hs.Expr.StmtLR a a (SrcLoc.Located (GHC.Hs.Expr.HsExpr a))), Data.Data.Data (GHC.Hs.Binds.HsLocalBinds a)) => HieAst.ToHie (HieAst.RScoped (GHC.Hs.Expr.ApplicativeArg (GHC.Hs.Extension.GhcPass p)))
+ HieAst: instance (a GHC.Types.~ GHC.Hs.Extension.GhcPass p, HieAst.ToHie body, HieAst.ToHie (GHC.Hs.Expr.HsMatchContext (GHC.Hs.PlaceHolder.NameOrRdrName (GHC.Hs.Extension.IdP a))), HieAst.ToHie (HieAst.PScoped (GHC.Hs.Pat.LPat a)), HieAst.ToHie (GHC.Hs.Expr.GRHSs a body), Data.Data.Data (GHC.Hs.Expr.Match a body)) => HieAst.ToHie (GHC.Hs.Expr.LMatch (GHC.Hs.Extension.GhcPass p) body)
+ HieAst: instance HieAst.HasLoc (GHC.Hs.Decls.HsDataDefn GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.HasLoc (GHC.Hs.Types.LHsQTyVars GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.HasLoc a => HieAst.HasLoc (GHC.Hs.Decls.FamEqn s a)
+ HieAst: instance HieAst.HasLoc thing => HieAst.HasLoc (GHC.Hs.Types.HsImplicitBndrs a thing)
+ HieAst: instance HieAst.HasLoc thing => HieAst.HasLoc (GHC.Hs.Types.HsWildCardBndrs a thing)
+ HieAst: instance HieAst.HasRealDataConName GHC.Hs.Extension.GhcRn
+ HieAst: instance HieAst.HasRealDataConName GHC.Hs.Extension.GhcTc
+ HieAst: instance HieAst.HasType (GHC.Hs.Binds.LHsBind GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.HasType (GHC.Hs.Binds.LHsBind GHC.Hs.Extension.GhcTc)
+ HieAst: instance HieAst.HasType (GHC.Hs.Expr.LHsExpr GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.HasType (GHC.Hs.Expr.LHsExpr GHC.Hs.Extension.GhcTc)
+ HieAst: instance HieAst.HasType (SrcLoc.Located (GHC.Hs.Pat.Pat GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.HasType (SrcLoc.Located (GHC.Hs.Pat.Pat GHC.Hs.Extension.GhcTc))
+ HieAst: instance HieAst.ProtectSig GHC.Hs.Extension.GhcRn
+ HieAst: instance HieAst.ProtectSig GHC.Hs.Extension.GhcTc
+ HieAst: instance HieAst.ToHie (GHC.Hs.Binds.LFixitySig GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.FamilyInfo GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.HsDataDefn GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.HsDeriving GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LAnnDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LClsInstDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LConDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LDataFamInstDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LDefaultDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LDerivDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LFamilyDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LForeignDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LHsDerivingClause GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LInjectivityAnn GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LInstDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LRoleAnnotDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LRuleDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LRuleDecls GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LSpliceDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LStandaloneKindSig GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LTyClDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LTyFamInstDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LWarnDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.LWarnDecls GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.StandaloneKindSig GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Decls.TyClGroup GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Expr.HsBracket a)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Expr.HsMatchContext a) => HieAst.ToHie (GHC.Hs.Expr.HsStmtContext a)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Expr.LHsExpr a) => HieAst.ToHie (GHC.Hs.Expr.ArithSeqInfo a)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Expr.LMatch a body) => HieAst.ToHie (GHC.Hs.Expr.MatchGroup a body)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Expr.MatchGroup a (GHC.Hs.Expr.LHsExpr a)) => HieAst.ToHie (GHC.Hs.Binds.HsPatSynDir a)
+ HieAst: instance HieAst.ToHie (GHC.Hs.ImpExp.LImportDecl GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Types.LConDeclField GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Types.LHsContext GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (GHC.Hs.Types.LHsType GHC.Hs.Extension.GhcRn)
+ HieAst: instance HieAst.ToHie (HieAst.Context (SrcLoc.Located GHC.Hs.Extension.NoExtField))
+ HieAst: instance HieAst.ToHie (HieAst.Context (SrcLoc.Located a)) => HieAst.ToHie (GHC.Hs.Decls.AnnProvenance a)
+ HieAst: instance HieAst.ToHie (HieAst.Context (SrcLoc.Located a)) => HieAst.ToHie (GHC.Hs.Expr.HsMatchContext a)
+ HieAst: instance HieAst.ToHie (HieAst.Context a) => HieAst.ToHie (HieAst.PatSynFieldContext (GHC.Hs.Binds.RecordPatSynField a))
+ HieAst: instance HieAst.ToHie (HieAst.IEContext (GHC.Hs.ImpExp.LIE GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.IEContext (GHC.Hs.ImpExp.LIEWrappedName Name.Name))
+ HieAst: instance HieAst.ToHie (HieAst.RContext (GHC.Hs.Pat.LHsRecField a arg)) => HieAst.ToHie (HieAst.RContext (GHC.Hs.Pat.HsRecFields a arg))
+ HieAst: instance HieAst.ToHie (HieAst.RFContext (GHC.Hs.Types.LFieldOcc GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.RFContext (GHC.Hs.Types.LFieldOcc GHC.Hs.Extension.GhcTc))
+ HieAst: instance HieAst.ToHie (HieAst.RFContext (SrcLoc.Located (GHC.Hs.Types.AmbiguousFieldOcc GHC.Hs.Extension.GhcRn)))
+ HieAst: instance HieAst.ToHie (HieAst.RFContext (SrcLoc.Located (GHC.Hs.Types.AmbiguousFieldOcc GHC.Hs.Extension.GhcTc)))
+ HieAst: instance HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.NHsValBindsLR GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.RScoped (GHC.Hs.Binds.NHsValBindsLR GHC.Hs.Extension.GhcTc))
+ HieAst: instance HieAst.ToHie (HieAst.RScoped (GHC.Hs.Decls.LFamilyResultSig GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.RScoped (GHC.Hs.Decls.LRuleBndr GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.SigContext (GHC.Hs.Binds.LSig GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.SigContext (GHC.Hs.Binds.LSig GHC.Hs.Extension.GhcTc))
+ HieAst: instance HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.LHsQTyVars GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.LHsSigWcType GHC.Hs.Extension.GhcTc))
+ HieAst: instance HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.LHsType GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (HieAst.TScoped (GHC.Hs.Types.LHsWcType GHC.Hs.Extension.GhcTc))
+ HieAst: instance HieAst.ToHie (HieAst.TScoped GHC.Hs.Extension.NoExtField)
+ HieAst: instance HieAst.ToHie (HieAst.TVScoped (GHC.Hs.Types.LHsTyVarBndr GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (SrcLoc.Located (GHC.Hs.Decls.DerivStrategy GHC.Hs.Extension.GhcRn))
+ HieAst: instance HieAst.ToHie (SrcLoc.Located GHC.Hs.Types.HsIPName)
+ HieAst: instance HieAst.ToHie (SrcLoc.Located [GHC.Hs.Types.LConDeclField GHC.Hs.Extension.GhcRn])
+ HieAst: instance HieAst.ToHie GHC.Hs.Decls.ForeignExport
+ HieAst: instance HieAst.ToHie GHC.Hs.Decls.ForeignImport
+ HieAst: instance HieAst.ToHie GHC.Hs.Expr.PendingRnSplice
+ HieAst: instance HieAst.ToHie GHC.Hs.Expr.PendingTcSplice
+ HieBin: hieNameOcc :: HieName -> OccName
+ Hoopl.Block: Closed :: Extensibility
+ Hoopl.Block: Open :: Extensibility
+ Hoopl.Block: data Extensibility
+ Hoopl.Block: type C = 'Closed
+ Hoopl.Block: type O = 'Open
+ Hoopl.Dataflow: type C = 'Closed
+ Hoopl.Dataflow: type O = 'Open
+ HscMain: [hscs_guts] :: HscStatus -> CgGuts
+ HscMain: [hscs_iface_dflags] :: HscStatus -> !DynFlags
+ HscMain: [hscs_mod_location] :: HscStatus -> !ModLocation
+ HscMain: [hscs_old_iface_hash] :: HscStatus -> !Maybe Fingerprint
+ HscMain: [hscs_partial_iface] :: HscStatus -> !PartialModIface
+ HscMain: hscMaybeWriteIface :: DynFlags -> ModIface -> Maybe Fingerprint -> ModLocation -> IO ()
+ HscMain: hscParseType :: String -> Hsc (LHsType GhcPs)
+ HscTypes: ModIfaceBackend :: !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !WhetherHasOrphans -> !WhetherHasFamInst -> !Fingerprint -> !Fingerprint -> !OccName -> Maybe WarningTxt -> !OccName -> Maybe Fixity -> !OccName -> Maybe (OccName, Fingerprint) -> ModIfaceBackend
+ HscTypes: [hsc_dynLinker] :: HscEnv -> DynLinker
+ HscTypes: [hscs_guts] :: HscStatus -> CgGuts
+ HscTypes: [hscs_iface_dflags] :: HscStatus -> !DynFlags
+ HscTypes: [hscs_mod_location] :: HscStatus -> !ModLocation
+ HscTypes: [hscs_old_iface_hash] :: HscStatus -> !Maybe Fingerprint
+ HscTypes: [hscs_partial_iface] :: HscStatus -> !PartialModIface
+ HscTypes: [mi_final_exts] :: ModIface_ (phase :: ModIfacePhase) -> !IfaceBackendExts phase
+ HscTypes: data ModIfaceBackend
+ HscTypes: data ModIface_ (phase :: ModIfacePhase)
+ HscTypes: emptyFullModIface :: Module -> ModIface
+ HscTypes: emptyPartialModIface :: Module -> PartialModIface
+ HscTypes: home_imps :: [(Maybe FastString, Located ModuleName)] -> [Located ModuleName]
+ HscTypes: instance (Control.DeepSeq.NFData (HscTypes.IfaceBackendExts phase), Control.DeepSeq.NFData (HscTypes.IfaceDeclExts phase)) => Control.DeepSeq.NFData (HscTypes.ModIface_ phase)
+ HscTypes: ms_home_allimps :: ModSummary -> [ModuleName]
+ HscTypes: ms_home_imps :: ModSummary -> [Located ModuleName]
+ HscTypes: ms_home_srcimps :: ModSummary -> [Located ModuleName]
+ HscTypes: phaseForeignLanguage :: Phase -> Maybe ForeignSrcLang
+ HscTypes: type ModIface = ModIface_ 'ModIfaceFinal
+ HscTypes: type PartialModIface = ModIface_ 'ModIfaceCore
+ IOEnv: instance GHC.Base.Functor (IOEnv.IOEnv env)
+ Id: isDataConWrapId :: Id -> Bool
+ Id: isDataConWrapId_maybe :: Id -> Maybe DataCon
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceAT
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceAnnotation
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceAxBranch
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceBang
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceBinding
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceClassBody
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceClassOp
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceClsInst
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceCompleteMatch
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceConAlt
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceConDecl
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceConDecls
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceDecl
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceExpr
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceFamInst
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceFamTyConFlav
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceIdDetails
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceIdInfo
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceInfoItem
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceJoinInfo
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceLetBndr
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceRule
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceSrcBang
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceTickish
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceTyConParent
+ IfaceSyn: instance Control.DeepSeq.NFData IfaceSyn.IfaceUnfolding
+ IfaceType: ForallInvis :: ForallVisFlag
+ IfaceType: ForallVis :: ForallVisFlag
+ IfaceType: InvisArg :: AnonArgFlag
+ IfaceType: SuppressBndrSig :: Bool -> SuppressBndrSig
+ IfaceType: UseBndrParens :: Bool -> UseBndrParens
+ IfaceType: VisArg :: AnonArgFlag
+ IfaceType: data AnonArgFlag
+ IfaceType: data ForallVisFlag
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceAppArgs
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceBndr
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceCoercion
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceMCoercion
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceOneShot
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceTyCon
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceTyConInfo
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceTyConSort
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceTyLit
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceType
+ IfaceType: instance Control.DeepSeq.NFData IfaceType.IfaceUnivCoProv
+ IfaceType: isIfaceTauType :: IfaceType -> Bool
+ IfaceType: mkIfaceTyConKind :: [IfaceTyConBinder] -> IfaceKind -> IfaceKind
+ IfaceType: newtype SuppressBndrSig
+ IfaceType: newtype UseBndrParens
+ Inst: tcInstInvisibleTyBinder :: TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)
+ Inst: tcInstInvisibleTyBinders :: Int -> TcKind -> TcM ([TcType], TcKind)
+ InstEnv: instEnvClasses :: InstEnv -> [Class]
+ InteractiveEval: getInstancesForType :: GhcMonad m => Type -> m [ClsInst]
+ InteractiveEval: parseInstanceHead :: GhcMonad m => String -> m Type
+ Lexer: AddAnn :: AnnKeywordId -> SrcSpan -> AddAnn
+ Lexer: ImportQualifiedPostBit :: ExtBits
+ Lexer: ParserFlags :: EnumSet WarningFlag -> UnitId -> !ExtsBitmap -> ParserFlags
+ Lexer: [pExtsBitmap] :: ParserFlags -> !ExtsBitmap
+ Lexer: [pThisPackage] :: ParserFlags -> UnitId
+ Lexer: [pWarningFlags] :: ParserFlags -> EnumSet WarningFlag
+ Lexer: addError :: MonadP m => SrcSpan -> SDoc -> m ()
+ Lexer: addFatalError :: MonadP m => SrcSpan -> SDoc -> m a
+ Lexer: allocateComments :: SrcSpan -> [Located AnnotationComment] -> ([Located AnnotationComment], [(SrcSpan, [Located AnnotationComment])])
+ Lexer: appendError :: SrcSpan -> SDoc -> (DynFlags -> Messages) -> DynFlags -> Messages
+ Lexer: appendWarning :: ParserFlags -> WarningFlag -> SrcSpan -> SDoc -> (DynFlags -> Messages) -> DynFlags -> Messages
+ Lexer: class Monad m => MonadP m
+ Lexer: data AddAnn
+ Lexer: getErrorMessages :: PState -> DynFlags -> ErrorMessages
+ Lexer: instance Lexer.MonadP Lexer.P
+ Lexer: xtest :: ExtBits -> ExtsBitmap -> Bool
+ Linker: instance Outputable.Outputable Linker.LibrarySpec
+ Linker: uninitializedLinker :: IO DynLinker
+ LinkerTypes: BCOs :: CompiledByteCode -> [SptEntry] -> Unlinked
+ LinkerTypes: DotA :: FilePath -> Unlinked
+ LinkerTypes: DotDLL :: FilePath -> Unlinked
+ LinkerTypes: DotO :: FilePath -> Unlinked
+ LinkerTypes: DynLinker :: MVar (Maybe PersistentLinkerState) -> DynLinker
+ LinkerTypes: LM :: UTCTime -> Module -> [Unlinked] -> Linkable
+ LinkerTypes: PersistentLinkerState :: ClosureEnv -> !ItblEnv -> ![Linkable] -> ![Linkable] -> ![LinkerUnitId] -> ![(FilePath, String)] -> PersistentLinkerState
+ LinkerTypes: SptEntry :: Id -> Fingerprint -> SptEntry
+ LinkerTypes: [bcos_loaded] :: PersistentLinkerState -> ![Linkable]
+ LinkerTypes: [closure_env] :: PersistentLinkerState -> ClosureEnv
+ LinkerTypes: [dl_mpls] :: DynLinker -> MVar (Maybe PersistentLinkerState)
+ LinkerTypes: [itbl_env] :: PersistentLinkerState -> !ItblEnv
+ LinkerTypes: [linkableModule] :: Linkable -> Module
+ LinkerTypes: [linkableTime] :: Linkable -> UTCTime
+ LinkerTypes: [linkableUnlinked] :: Linkable -> [Unlinked]
+ LinkerTypes: [objs_loaded] :: PersistentLinkerState -> ![Linkable]
+ LinkerTypes: [pkgs_loaded] :: PersistentLinkerState -> ![LinkerUnitId]
+ LinkerTypes: [temp_sos] :: PersistentLinkerState -> ![(FilePath, String)]
+ LinkerTypes: data Linkable
+ LinkerTypes: data PersistentLinkerState
+ LinkerTypes: data SptEntry
+ LinkerTypes: data Unlinked
+ LinkerTypes: instance Outputable.Outputable LinkerTypes.Linkable
+ LinkerTypes: instance Outputable.Outputable LinkerTypes.SptEntry
+ LinkerTypes: instance Outputable.Outputable LinkerTypes.Unlinked
+ LinkerTypes: newtype DynLinker
+ LinkerTypes: type LinkerUnitId = InstalledUnitId
+ LlvmCodeGen.Base: llvmDefLabel :: LMString -> LMString
+ MkCore: floatBindings :: FloatBind -> [Var]
+ MkCore: mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
+ MkCore: wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr
+ MkId: coerceName :: Name
+ MkIface: mkFullIface :: HscEnv -> PartialModIface -> IO ModIface
+ MkIface: mkPartialIface :: HscEnv -> ModDetails -> ModGuts -> PartialModIface
+ Name: nameNameSpace :: Name -> NameSpace
+ NameEnv: adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a
+ NameEnv: delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a
+ NameEnv: extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a
+ NameEnv: filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a
+ NameEnv: mkNameEnvWith :: (a -> Name) -> [a] -> NameEnv a
+ OrdList: fromOLReverse :: OrdList a -> [a]
+ OrdList: headOL :: OrdList a -> a
+ OrdList: strictlyEqOL :: Eq a => OrdList a -> OrdList a -> Bool
+ OrdList: strictlyOrdOL :: Ord a => OrdList a -> OrdList a -> Ordering
+ Outputable: instance Outputable.Outputable GHC.Types.Double
+ Outputable: instance Outputable.Outputable GHC.Types.Float
+ Outputable: instance Outputable.Outputable Outputable.SDoc
+ Outputable: pprFilePathString :: FilePath -> SDoc
+ Outputable: pprTraceWith :: String -> (a -> SDoc) -> a -> a
+ PipelineMonad: [iface] :: PipeState -> Maybe ModIface
+ PipelineMonad: pipeStateDynFlags :: PipeState -> DynFlags
+ PipelineMonad: pipeStateModIface :: PipeState -> Maybe ModIface
+ PipelineMonad: setIface :: ModIface -> CompPipeline ()
+ Plugins: [dynflagsPlugin] :: Plugin -> [CommandLineOption] -> DynFlags -> IO DynFlags
+ Plugins: [holeFitPlugin] :: Plugin -> HoleFitPlugin
+ Plugins: data HoleFitPluginR
+ PprBase: pprBytes :: ByteString -> SDoc
+ PprC: writeC :: DynFlags -> Handle -> RawCmmGroup -> IO ()
+ Predicate: ClassPred :: Class -> [Type] -> Pred
+ Predicate: EqPred :: EqRel -> Type -> Type -> Pred
+ Predicate: ForAllPred :: [TyCoVarBinder] -> [PredType] -> PredType -> Pred
+ Predicate: IrredPred :: PredType -> Pred
+ Predicate: NomEq :: EqRel
+ Predicate: ReprEq :: EqRel
+ Predicate: classifyPredType :: PredType -> Pred
+ Predicate: data EqRel
+ Predicate: data Pred
+ Predicate: eqRelRole :: EqRel -> Role
+ Predicate: getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
+ Predicate: getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
+ Predicate: getEqPredRole :: PredType -> Role
+ Predicate: getEqPredTys :: PredType -> (Type, Type)
+ Predicate: getEqPredTys_maybe :: PredType -> Maybe (Role, Type, Type)
+ Predicate: hasIPPred :: PredType -> Bool
+ Predicate: instance GHC.Classes.Eq Predicate.EqRel
+ Predicate: instance GHC.Classes.Ord Predicate.EqRel
+ Predicate: instance Outputable.Outputable Predicate.EqRel
+ Predicate: isCTupleClass :: Class -> Bool
+ Predicate: isClassPred :: PredType -> Bool
+ Predicate: isDictId :: Id -> Bool
+ Predicate: isDictTy :: Type -> Bool
+ Predicate: isEqPred :: PredType -> Bool
+ Predicate: isEqPredClass :: Class -> Bool
+ Predicate: isEqPrimPred :: PredType -> Bool
+ Predicate: isEvVar :: Var -> Bool
+ Predicate: isEvVarType :: Type -> Bool
+ Predicate: isIPClass :: Class -> Bool
+ Predicate: isIPPred :: PredType -> Bool
+ Predicate: isIPPred_maybe :: Type -> Maybe (FastString, Type)
+ Predicate: isIPTyCon :: TyCon -> Bool
+ Predicate: isPredTy :: HasDebugCallStack => Type -> Bool
+ Predicate: mkClassPred :: Class -> [Type] -> PredType
+ Predicate: mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
+ Predicate: mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type
+ Predicate: mkPrimEqPred :: Type -> Type -> Type
+ Predicate: mkPrimEqPredRole :: Role -> Type -> Type -> PredType
+ Predicate: mkReprPrimEqPred :: Type -> Type -> Type
+ Predicate: predTypeEqRel :: PredType -> EqRel
+ Predicate: type DictId = EvId
+ PrelNames: dATA_LIST :: Module
+ PrelNames: gHC_IX :: Module
+ PrimOp: BRev16Op :: PrimOp
+ PrimOp: BRev32Op :: PrimOp
+ PrimOp: BRev64Op :: PrimOp
+ PrimOp: BRev8Op :: PrimOp
+ PrimOp: BRevOp :: PrimOp
+ PrimOp: ClosureSizeOp :: PrimOp
+ PrimOp: DoubleExpM1Op :: PrimOp
+ PrimOp: DoubleLog1POp :: PrimOp
+ PrimOp: FloatExpM1Op :: PrimOp
+ PrimOp: FloatLog1POp :: PrimOp
+ PrimOp: GetSizeofSmallMutableArrayOp :: PrimOp
+ PrimOp: ShrinkSmallMutableArrayOp_Char :: PrimOp
+ RdrHsSyn: -- | Function argument representation
+ RdrHsSyn: ECP :: (forall b. DisambECP b => PV (Located b)) -> ECP
+ RdrHsSyn: [runECP_PV] :: ECP -> forall b. DisambECP b => PV (Located b)
+ RdrHsSyn: addFatalError :: MonadP m => SrcSpan -> SDoc -> m a
+ RdrHsSyn: checkExpBlockArguments :: LHsExpr GhcPs -> PV ()
+ RdrHsSyn: checkImportDecl :: Maybe (Located Token) -> Maybe (Located Token) -> P ()
+ RdrHsSyn: checkPattern_msg :: SDoc -> PV (Located (PatBuilder GhcPs)) -> P (LPat GhcPs)
+ RdrHsSyn: class b ~ (Body b) GhcPs => DisambECP b where {
+ RdrHsSyn: class DisambInfixOp b
+ RdrHsSyn: data PV a
+ RdrHsSyn: data PatBuilder p
+ RdrHsSyn: ecpFromCmd :: LHsCmd GhcPs -> ECP
+ RdrHsSyn: ecpFromCmd' :: DisambECP b => LHsCmd GhcPs -> PV (Located b)
+ RdrHsSyn: ecpFromExp :: LHsExpr GhcPs -> ECP
+ RdrHsSyn: ecpFromExp' :: DisambECP b => LHsExpr GhcPs -> PV (Located b)
+ RdrHsSyn: failOpImportQualifiedTwice :: SrcSpan -> P ()
+ RdrHsSyn: failOpNotEnabledImportQualifiedPost :: SrcSpan -> P ()
+ RdrHsSyn: instance (p GHC.Types.~ GHC.Hs.Extension.GhcPs) => RdrHsSyn.DisambECP (GHC.Hs.Expr.HsCmd p)
+ RdrHsSyn: instance (p GHC.Types.~ GHC.Hs.Extension.GhcPs) => RdrHsSyn.DisambECP (GHC.Hs.Expr.HsExpr p)
+ RdrHsSyn: instance (p GHC.Types.~ GHC.Hs.Extension.GhcPs) => RdrHsSyn.DisambInfixOp (GHC.Hs.Expr.HsExpr p)
+ RdrHsSyn: instance GHC.Base.Applicative RdrHsSyn.PV
+ RdrHsSyn: instance GHC.Base.Functor RdrHsSyn.PV
+ RdrHsSyn: instance GHC.Base.Monad RdrHsSyn.PV
+ RdrHsSyn: instance Lexer.MonadP RdrHsSyn.PV
+ RdrHsSyn: instance Outputable.Outputable (RdrHsSyn.PatBuilder GHC.Hs.Extension.GhcPs)
+ RdrHsSyn: instance RdrHsSyn.DisambECP (RdrHsSyn.PatBuilder GHC.Hs.Extension.GhcPs)
+ RdrHsSyn: instance RdrHsSyn.DisambInfixOp RdrName.RdrName
+ RdrHsSyn: isTildeRdr :: RdrName -> Bool
+ RdrHsSyn: mkHsAppPV :: DisambECP b => SrcSpan -> Located b -> Located (FunArg b) -> PV (Located b)
+ RdrHsSyn: mkHsAsPatPV :: DisambECP b => SrcSpan -> Located RdrName -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsCasePV :: DisambECP b => SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located b) -> PV (Located b)
+ RdrHsSyn: mkHsConOpPV :: DisambInfixOp b => Located RdrName -> PV (Located b)
+ RdrHsSyn: mkHsDoPV :: DisambECP b => SrcSpan -> Located [LStmt GhcPs (Located b)] -> PV (Located b)
+ RdrHsSyn: mkHsExplicitListPV :: DisambECP b => SrcSpan -> [Located b] -> PV (Located b)
+ RdrHsSyn: mkHsIfPV :: DisambECP b => SrcSpan -> LHsExpr GhcPs -> Bool -> Located b -> Bool -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsInfixHolePV :: DisambInfixOp b => SrcSpan -> PV (Located b)
+ RdrHsSyn: mkHsLamPV :: DisambECP b => SrcSpan -> MatchGroup GhcPs (Located b) -> PV (Located b)
+ RdrHsSyn: mkHsLazyPatPV :: DisambECP b => SrcSpan -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsLetPV :: DisambECP b => SrcSpan -> LHsLocalBinds GhcPs -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsLitPV :: DisambECP b => Located (HsLit GhcPs) -> PV (Located b)
+ RdrHsSyn: mkHsNegAppPV :: DisambECP b => SrcSpan -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsOpAppPV :: DisambECP b => SrcSpan -> Located b -> Located (InfixOp b) -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsOverLitPV :: DisambECP b => Located (HsOverLit GhcPs) -> PV (Located b)
+ RdrHsSyn: mkHsParPV :: DisambECP b => SrcSpan -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsRecordPV :: DisambECP b => SrcSpan -> SrcSpan -> Located b -> ([LHsRecField GhcPs (Located b)], Maybe SrcSpan) -> PV (Located b)
+ RdrHsSyn: mkHsSectionR_PV :: DisambECP b => SrcSpan -> Located (InfixOp b) -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsSplicePV :: DisambECP b => Located (HsSplice GhcPs) -> PV (Located b)
+ RdrHsSyn: mkHsTySigPV :: DisambECP b => SrcSpan -> Located b -> LHsType GhcPs -> PV (Located b)
+ RdrHsSyn: mkHsVarOpPV :: DisambInfixOp b => Located RdrName -> PV (Located b)
+ RdrHsSyn: mkHsVarPV :: DisambECP b => Located RdrName -> PV (Located b)
+ RdrHsSyn: mkHsViewPatPV :: DisambECP b => SrcSpan -> LHsExpr GhcPs -> Located b -> PV (Located b)
+ RdrHsSyn: mkHsWildCardPV :: DisambECP b => SrcSpan -> PV (Located b)
+ RdrHsSyn: mkStandaloneKindSig :: SrcSpan -> Located [Located RdrName] -> LHsKind GhcPs -> P (LStandaloneKindSig GhcPs)
+ RdrHsSyn: mkSumOrTuplePV :: DisambECP b => SrcSpan -> Boxity -> SumOrTuple b -> PV (Located b)
+ RdrHsSyn: newtype ECP
+ RdrHsSyn: patBuilderBang :: SrcSpan -> Located (PatBuilder p) -> Located (PatBuilder p)
+ RdrHsSyn: runECP_P :: DisambECP b => ECP -> P (Located b)
+ RdrHsSyn: runPV :: PV a -> P a
+ RdrHsSyn: superFunArg :: DisambECP b => (DisambECP (FunArg b) => PV (Located b)) -> PV (Located b)
+ RdrHsSyn: superInfixOp :: DisambECP b => (DisambInfixOp (InfixOp b) => PV (Located b)) -> PV (Located b)
+ RdrHsSyn: type family FunArg b;
+ RdrHsSyn: warnPrepositiveQualifiedModule :: SrcSpan -> P ()
+ RdrHsSyn: }
+ RegAlloc.Liveness: cmmTopLiveness :: (Outputable instr, Instruction instr) => Maybe CFG -> Platform -> NatCmmDecl statics instr -> UniqSM (LiveCmmDecl statics instr)
+ RepType: Int32Rep :: PrimRep
+ RepType: Word32Rep :: PrimRep
+ RnExpr: instance Outputable.Outputable RnExpr.MonadNames
+ RnTypes: nubL :: Eq a => [Located a] -> [Located a]
+ RnUtils: StandaloneKindSigCtx :: SDoc -> HsDocContext
+ RnUtils: checkUnusedRecordWildcard :: SrcSpan -> FreeVars -> Maybe [Name] -> RnM ()
+ SMRep: halfWordSize :: DynFlags -> ByteOff
+ SMRep: halfWordSizeInBits :: DynFlags -> Int
+ Settings: Settings :: {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> PlatformConstants -> [(String, String)] -> Settings
+ Settings: [sFileSettings] :: Settings -> {-# UNPACK #-} !FileSettings
+ Settings: [sGhcNameVersion] :: Settings -> {-# UNPACK #-} !GhcNameVersion
+ Settings: [sPlatformConstants] :: Settings -> PlatformConstants
+ Settings: [sPlatformMisc] :: Settings -> {-# UNPACK #-} !PlatformMisc
+ Settings: [sRawSettings] :: Settings -> [(String, String)]
+ Settings: [sTargetPlatform] :: Settings -> Platform
+ Settings: [sToolSettings] :: Settings -> {-# UNPACK #-} !ToolSettings
+ Settings: data Settings
+ Settings: sExtraGccViaCFlags :: Settings -> [String]
+ Settings: sGccSupportsNoPie :: Settings -> Bool
+ Settings: sGhcDebugged :: Settings -> Bool
+ Settings: sGhcRTSWays :: Settings -> String
+ Settings: sGhcRtsWithLibdw :: Settings -> Bool
+ Settings: sGhcThreaded :: Settings -> Bool
+ Settings: sGhcUsagePath :: Settings -> FilePath
+ Settings: sGhcWithInterpreter :: Settings -> Bool
+ Settings: sGhcWithNativeCodeGen :: Settings -> Bool
+ Settings: sGhcWithSMP :: Settings -> Bool
+ Settings: sGhciUsagePath :: Settings -> FilePath
+ Settings: sIntegerLibrary :: Settings -> String
+ Settings: sIntegerLibraryType :: Settings -> IntegerLibrary
+ Settings: sLdIsGnuLd :: Settings -> Bool
+ Settings: sLdSupportsBuildId :: Settings -> Bool
+ Settings: sLdSupportsCompactUnwind :: Settings -> Bool
+ Settings: sLdSupportsFilelist :: Settings -> Bool
+ Settings: sLeadingUnderscore :: Settings -> Bool
+ Settings: sLibFFI :: Settings -> Bool
+ Settings: sOpt_F :: Settings -> [String]
+ Settings: sOpt_L :: Settings -> [String]
+ Settings: sOpt_P :: Settings -> [String]
+ Settings: sOpt_P_fingerprint :: Settings -> Fingerprint
+ Settings: sOpt_a :: Settings -> [String]
+ Settings: sOpt_c :: Settings -> [String]
+ Settings: sOpt_cxx :: Settings -> [String]
+ Settings: sOpt_i :: Settings -> [String]
+ Settings: sOpt_l :: Settings -> [String]
+ Settings: sOpt_lc :: Settings -> [String]
+ Settings: sOpt_lcc :: Settings -> [String]
+ Settings: sOpt_lo :: Settings -> [String]
+ Settings: sOpt_windres :: Settings -> [String]
+ Settings: sPgm_F :: Settings -> String
+ Settings: sPgm_L :: Settings -> String
+ Settings: sPgm_P :: Settings -> (String, [Option])
+ Settings: sPgm_T :: Settings -> String
+ Settings: sPgm_a :: Settings -> (String, [Option])
+ Settings: sPgm_ar :: Settings -> String
+ Settings: sPgm_c :: Settings -> String
+ Settings: sPgm_dll :: Settings -> (String, [Option])
+ Settings: sPgm_i :: Settings -> String
+ Settings: sPgm_l :: Settings -> (String, [Option])
+ Settings: sPgm_lc :: Settings -> (String, [Option])
+ Settings: sPgm_lcc :: Settings -> (String, [Option])
+ Settings: sPgm_libtool :: Settings -> String
+ Settings: sPgm_lo :: Settings -> (String, [Option])
+ Settings: sPgm_ranlib :: Settings -> String
+ Settings: sPgm_windres :: Settings -> String
+ Settings: sProgramName :: Settings -> String
+ Settings: sProjectVersion :: Settings -> String
+ Settings: sSystemPackageConfig :: Settings -> FilePath
+ Settings: sTablesNextToCode :: Settings -> Bool
+ Settings: sTargetPlatformString :: Settings -> String
+ Settings: sTmpDir :: Settings -> String
+ Settings: sToolDir :: Settings -> Maybe FilePath
+ Settings: sTopDir :: Settings -> FilePath
+ Specialise: instance Outputable.Outputable Specialise.SpecArg
+ SrcLoc: mapLoc :: (a -> b) -> GenLocated l a -> GenLocated l b
+ StgSyn: data NoExtFieldSilent
+ StgSyn: instance Data.Data.Data StgSyn.NoExtFieldSilent
+ StgSyn: instance GHC.Classes.Eq StgSyn.NoExtFieldSilent
+ StgSyn: instance GHC.Classes.Ord StgSyn.NoExtFieldSilent
+ StgSyn: instance Outputable.Outputable StgSyn.NoExtFieldSilent
+ StgSyn: noExtFieldSilent :: NoExtFieldSilent
+ StgSyn: stripStgTicksTopE :: (Tickish Id -> Bool) -> GenStgExpr p -> GenStgExpr p
+ Stream: collect_ :: Monad m => Stream m a r -> m ([a], r)
+ Stream: consume :: Monad m => Stream m a b -> (a -> m ()) -> m b
+ Stream: mapAccumL_ :: Monad m => (c -> a -> m (c, b)) -> c -> Stream m a r -> Stream m b (c, r)
+ SysTools: lazyInitLlvmConfig :: String -> IO LlvmConfig
+ SysTools.BaseDir: tryFindTopDir :: Maybe String -> IO (Maybe String)
+ SysTools.Settings: SettingsError_BadData :: String -> SettingsError
+ SysTools.Settings: SettingsError_MissingData :: String -> SettingsError
+ SysTools.Settings: data SettingsError
+ SysTools.Settings: initSettings :: forall m. MonadIO m => String -> ExceptT SettingsError m Settings
+ SysTools.Tasks: traceToolCommand :: DynFlags -> String -> IO a -> IO a
+ THNames: forallVisTIdKey :: Unique
+ THNames: forallVisTName :: Name
+ THNames: kiSigDIdKey :: Unique
+ THNames: kiSigDName :: Name
+ THNames: liftTypedIdKey :: Unique
+ THNames: liftTypedName :: Name
+ THNames: liftTyped_RDR :: RdrName
+ TcDeriv: [di_scoped_tvs] :: DerivInfo -> ![(Name, TyVar)]
+ TcDerivUtils: DerivInstTys :: [Type] -> TyCon -> [Type] -> TyCon -> [Type] -> DerivInstTys
+ TcDerivUtils: [denv_inst_tys] :: DerivEnv -> [Type]
+ TcDerivUtils: [dit_cls_tys] :: DerivInstTys -> [Type]
+ TcDerivUtils: [dit_rep_tc] :: DerivInstTys -> TyCon
+ TcDerivUtils: [dit_rep_tc_args] :: DerivInstTys -> [Type]
+ TcDerivUtils: [dit_tc] :: DerivInstTys -> TyCon
+ TcDerivUtils: [dit_tc_args] :: DerivInstTys -> [Type]
+ TcDerivUtils: [dsm_newtype_dit] :: DerivSpecMechanism -> DerivInstTys
+ TcDerivUtils: [dsm_newtype_rep_ty] :: DerivSpecMechanism -> Type
+ TcDerivUtils: [dsm_stock_dit] :: DerivSpecMechanism -> DerivInstTys
+ TcDerivUtils: [dsm_stock_gen_fn] :: DerivSpecMechanism -> SrcSpan -> TyCon -> [Type] -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name])
+ TcDerivUtils: [dsm_via_cls_tys] :: DerivSpecMechanism -> [Type]
+ TcDerivUtils: [dsm_via_inst_ty] :: DerivSpecMechanism -> Type
+ TcDerivUtils: [dsm_via_ty] :: DerivSpecMechanism -> Type
+ TcDerivUtils: data DerivInstTys
+ TcDerivUtils: instance Outputable.Outputable TcDerivUtils.DerivInstTys
+ TcEnv: addTypecheckedBinds :: TcGblEnv -> [LHsBinds GhcTc] -> TcGblEnv
+ TcEnv: instance GHC.Hs.Extension.OutputableBndrId a => Outputable.Outputable (TcEnv.InstInfo (GHC.Hs.Extension.GhcPass a))
+ TcEnv: tcLookupTcTyCon :: HasDebugCallStack => Name -> TcM TcTyCon
+ TcEvidence: isErasableHsWrapper :: HsWrapper -> Bool
+ TcEvidence: isTcGReflMCo :: TcMCoercion -> Bool
+ TcEvidence: tcCoToMCo :: TcCoercion -> TcMCoercion
+ TcEvidence: type TcMCoercion = MCoercion
+ TcFlatten: rewriteTyVar :: TcTyVar -> TcS TcType
+ TcHoleErrors: HoleFitPlugin :: CandPlugin -> FitPlugin -> HoleFitPlugin
+ TcHoleErrors: HoleFitPluginR :: TcM (TcRef s) -> (TcRef s -> HoleFitPlugin) -> (TcRef s -> TcM ()) -> HoleFitPluginR
+ TcHoleErrors: RawHoleFit :: SDoc -> HoleFit
+ TcHoleErrors: TyH :: Cts -> [Implication] -> Maybe Ct -> TypedHole
+ TcHoleErrors: [candPlugin] :: HoleFitPlugin -> CandPlugin
+ TcHoleErrors: [fitPlugin] :: HoleFitPlugin -> FitPlugin
+ TcHoleErrors: [hfPluginInit] :: HoleFitPluginR -> TcM (TcRef s)
+ TcHoleErrors: [hfPluginRun] :: HoleFitPluginR -> TcRef s -> HoleFitPlugin
+ TcHoleErrors: [hfPluginStop] :: HoleFitPluginR -> TcRef s -> TcM ()
+ TcHoleErrors: [tyHCt] :: TypedHole -> Maybe Ct
+ TcHoleErrors: [tyHImplics] :: TypedHole -> [Implication]
+ TcHoleErrors: [tyHRelevantCts] :: TypedHole -> Cts
+ TcHoleErrors: data HoleFitPlugin
+ TcHoleErrors: data HoleFitPluginR
+ TcHoleErrors: data TypedHole
+ TcHoleErrors: debugHoleFitDispConfig :: HoleFitDispConfig
+ TcHoleErrors: fromPureHFPlugin :: HoleFitPlugin -> HoleFitPluginR
+ TcHoleErrors: hfIsLcl :: HoleFit -> Bool
+ TcHoleErrors: pprHoleFit :: HoleFitDispConfig -> HoleFit -> SDoc
+ TcHoleErrors: type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]
+ TcHoleErrors: type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]
+ TcHoleFitTypes: GreHFCand :: GlobalRdrElt -> HoleFitCandidate
+ TcHoleFitTypes: HoleFit :: Id -> HoleFitCandidate -> TcType -> Int -> [TcType] -> [TcType] -> Maybe HsDocString -> HoleFit
+ TcHoleFitTypes: HoleFitPlugin :: CandPlugin -> FitPlugin -> HoleFitPlugin
+ TcHoleFitTypes: HoleFitPluginR :: TcM (TcRef s) -> (TcRef s -> HoleFitPlugin) -> (TcRef s -> TcM ()) -> HoleFitPluginR
+ TcHoleFitTypes: IdHFCand :: Id -> HoleFitCandidate
+ TcHoleFitTypes: NameHFCand :: Name -> HoleFitCandidate
+ TcHoleFitTypes: RawHoleFit :: SDoc -> HoleFit
+ TcHoleFitTypes: TyH :: Cts -> [Implication] -> Maybe Ct -> TypedHole
+ TcHoleFitTypes: [candPlugin] :: HoleFitPlugin -> CandPlugin
+ TcHoleFitTypes: [fitPlugin] :: HoleFitPlugin -> FitPlugin
+ TcHoleFitTypes: [hfCand] :: HoleFit -> HoleFitCandidate
+ TcHoleFitTypes: [hfDoc] :: HoleFit -> Maybe HsDocString
+ TcHoleFitTypes: [hfId] :: HoleFit -> Id
+ TcHoleFitTypes: [hfMatches] :: HoleFit -> [TcType]
+ TcHoleFitTypes: [hfPluginInit] :: HoleFitPluginR -> TcM (TcRef s)
+ TcHoleFitTypes: [hfPluginRun] :: HoleFitPluginR -> TcRef s -> HoleFitPlugin
+ TcHoleFitTypes: [hfPluginStop] :: HoleFitPluginR -> TcRef s -> TcM ()
+ TcHoleFitTypes: [hfRefLvl] :: HoleFit -> Int
+ TcHoleFitTypes: [hfType] :: HoleFit -> TcType
+ TcHoleFitTypes: [hfWrap] :: HoleFit -> [TcType]
+ TcHoleFitTypes: [tyHCt] :: TypedHole -> Maybe Ct
+ TcHoleFitTypes: [tyHImplics] :: TypedHole -> [Implication]
+ TcHoleFitTypes: [tyHRelevantCts] :: TypedHole -> Cts
+ TcHoleFitTypes: data HoleFit
+ TcHoleFitTypes: data HoleFitCandidate
+ TcHoleFitTypes: data HoleFitPlugin
+ TcHoleFitTypes: data HoleFitPluginR
+ TcHoleFitTypes: data TypedHole
+ TcHoleFitTypes: hfIsLcl :: HoleFit -> Bool
+ TcHoleFitTypes: instance GHC.Classes.Eq TcHoleFitTypes.HoleFit
+ TcHoleFitTypes: instance GHC.Classes.Eq TcHoleFitTypes.HoleFitCandidate
+ TcHoleFitTypes: instance GHC.Classes.Ord TcHoleFitTypes.HoleFit
+ TcHoleFitTypes: instance GHC.Classes.Ord TcHoleFitTypes.HoleFitCandidate
+ TcHoleFitTypes: instance Name.NamedThing TcHoleFitTypes.HoleFitCandidate
+ TcHoleFitTypes: instance OccName.HasOccName TcHoleFitTypes.HoleFitCandidate
+ TcHoleFitTypes: instance Outputable.Outputable TcHoleFitTypes.HoleFit
+ TcHoleFitTypes: instance Outputable.Outputable TcHoleFitTypes.HoleFitCandidate
+ TcHoleFitTypes: instance Outputable.Outputable TcHoleFitTypes.TypedHole
+ TcHoleFitTypes: pprHoleFitCand :: HoleFitCandidate -> SDoc
+ TcHoleFitTypes: type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]
+ TcHoleFitTypes: type FitPlugin = TypedHole -> [HoleFit] -> TcM [HoleFit]
+ TcHsSyn: zonkRecTyVarBndrs :: [Name] -> [TcTyVar] -> TcM (ZonkEnv, [TyVar])
+ TcHsType: CUSK :: SAKS_or_CUSK
+ TcHsType: DataDeclSort :: NewOrData -> DataSort
+ TcHsType: DataFamilySort :: DataSort
+ TcHsType: DataInstanceSort :: NewOrData -> DataSort
+ TcHsType: InitialKindCheck :: SAKS_or_CUSK -> InitialKindStrategy
+ TcHsType: InitialKindInfer :: InitialKindStrategy
+ TcHsType: SAKS :: Kind -> SAKS_or_CUSK
+ TcHsType: StandaloneKindSigCtxt :: Name -> UserTypeCtxt
+ TcHsType: checkClassKindSig :: Kind -> TcM ()
+ TcHsType: checkDataKindSig :: DataSort -> Kind -> TcM ()
+ TcHsType: checkExpectedKind_pp :: HasDebugCallStack => SDoc -> TcType -> TcKind -> TcKind -> TcM TcType
+ TcHsType: data DataSort
+ TcHsType: data InitialKindStrategy
+ TcHsType: data SAKS_or_CUSK
+ TcHsType: instance Outputable.Outputable TcHsType.SAKS_or_CUSK
+ TcHsType: kcDeclHeader :: InitialKindStrategy -> Name -> TyConFlavour -> LHsQTyVars GhcRn -> TcM ContextKind -> TcM TcTyCon
+ TcHsType: kindGeneralizeAll :: TcType -> TcM [KindVar]
+ TcHsType: kindGeneralizeNone :: TcType -> TcM ()
+ TcHsType: kindGeneralizeSome :: (TcTyVar -> Bool) -> TcType -> TcM [KindVar]
+ TcHsType: tcNamedWildCardBinders :: [Name] -> ([(Name, TcTyVar)] -> TcM a) -> TcM a
+ TcHsType: tcStandaloneKindSig :: LStandaloneKindSig GhcRn -> TcM (Name, Kind)
+ TcMType: isQuantifiableTv :: TcLevel -> TcTyVar -> Bool
+ TcMType: newImplication :: TcM Implication
+ TcMType: newPatSigTyVar :: Name -> Kind -> TcM TcTyVar
+ TcMType: partitionCandidates :: CandidatesQTvs -> (TyVar -> Bool) -> (DTyVarSet, CandidatesQTvs)
+ TcMType: skolemiseUnboundMetaTyVar :: TcTyVar -> TcM TyVar
+ TcMType: zonkAndSkolemise :: TcTyCoVar -> TcM TcTyCoVar
+ TcMType: zonkDTyCoVarSetAndFV :: DTyCoVarSet -> TcM DTyCoVarSet
+ TcOrigin: AnnOrigin :: CtOrigin
+ TcOrigin: AppOrigin :: CtOrigin
+ TcOrigin: ArithSeqOrigin :: ArithSeqInfo GhcRn -> CtOrigin
+ TcOrigin: ArrowSkol :: SkolemInfo
+ TcOrigin: AssocFamPatOrigin :: CtOrigin
+ TcOrigin: BracketSkol :: SkolemInfo
+ TcOrigin: ClassSCCtxt :: Name -> UserTypeCtxt
+ TcOrigin: ConArgCtxt :: Name -> UserTypeCtxt
+ TcOrigin: DataConSkol :: Name -> SkolemInfo
+ TcOrigin: DataKindCtxt :: Name -> UserTypeCtxt
+ TcOrigin: DataTyCtxt :: Name -> UserTypeCtxt
+ TcOrigin: DefaultDeclCtxt :: UserTypeCtxt
+ TcOrigin: DefaultOrigin :: CtOrigin
+ TcOrigin: DerivClauseCtxt :: UserTypeCtxt
+ TcOrigin: DerivClauseOrigin :: CtOrigin
+ TcOrigin: DerivOriginCoerce :: Id -> Type -> Type -> Bool -> CtOrigin
+ TcOrigin: DerivOriginDC :: DataCon -> Int -> Bool -> CtOrigin
+ TcOrigin: DerivSkol :: Type -> SkolemInfo
+ TcOrigin: DoOrigin :: CtOrigin
+ TcOrigin: DoPatOrigin :: LPat GhcRn -> CtOrigin
+ TcOrigin: ExprSigCtxt :: UserTypeCtxt
+ TcOrigin: ExprSigOrigin :: CtOrigin
+ TcOrigin: FailablePattern :: LPat GhcTcId -> CtOrigin
+ TcOrigin: FamInstSkol :: SkolemInfo
+ TcOrigin: ForAllSkol :: SDoc -> SkolemInfo
+ TcOrigin: ForSigCtxt :: Name -> UserTypeCtxt
+ TcOrigin: FunDepOrigin1 :: PredType -> CtOrigin -> RealSrcSpan -> PredType -> CtOrigin -> RealSrcSpan -> CtOrigin
+ TcOrigin: FunDepOrigin2 :: PredType -> CtOrigin -> PredType -> SrcSpan -> CtOrigin
+ TcOrigin: FunSigCtxt :: Name -> Bool -> UserTypeCtxt
+ TcOrigin: GenSigCtxt :: UserTypeCtxt
+ TcOrigin: GhciCtxt :: Bool -> UserTypeCtxt
+ TcOrigin: GivenOrigin :: SkolemInfo -> CtOrigin
+ TcOrigin: HoleOrigin :: CtOrigin
+ TcOrigin: IPOccOrigin :: HsIPName -> CtOrigin
+ TcOrigin: IPSkol :: [HsIPName] -> SkolemInfo
+ TcOrigin: IfOrigin :: CtOrigin
+ TcOrigin: InfSigCtxt :: Name -> UserTypeCtxt
+ TcOrigin: InferSkol :: [(Name, TcType)] -> SkolemInfo
+ TcOrigin: InstDeclCtxt :: Bool -> UserTypeCtxt
+ TcOrigin: InstProvidedOrigin :: Module -> ClsInst -> CtOrigin
+ TcOrigin: InstSC :: TypeSize -> SkolemInfo
+ TcOrigin: InstSkol :: SkolemInfo
+ TcOrigin: KindEqOrigin :: TcType -> Maybe TcType -> CtOrigin -> Maybe TypeOrKind -> CtOrigin
+ TcOrigin: KindSigCtxt :: UserTypeCtxt
+ TcOrigin: ListOrigin :: CtOrigin
+ TcOrigin: LiteralOrigin :: HsOverLit GhcRn -> CtOrigin
+ TcOrigin: MCompOrigin :: CtOrigin
+ TcOrigin: MCompPatOrigin :: LPat GhcRn -> CtOrigin
+ TcOrigin: NegateOrigin :: CtOrigin
+ TcOrigin: OccurrenceOf :: Name -> CtOrigin
+ TcOrigin: OccurrenceOfRecSel :: RdrName -> CtOrigin
+ TcOrigin: OverLabelOrigin :: FastString -> CtOrigin
+ TcOrigin: PatOrigin :: CtOrigin
+ TcOrigin: PatSigCtxt :: UserTypeCtxt
+ TcOrigin: PatSigOrigin :: CtOrigin
+ TcOrigin: PatSkol :: ConLike -> HsMatchContext Name -> SkolemInfo
+ TcOrigin: PatSynCtxt :: Name -> UserTypeCtxt
+ TcOrigin: ProcOrigin :: CtOrigin
+ TcOrigin: ProvCtxtOrigin :: PatSynBind GhcRn GhcRn -> CtOrigin
+ TcOrigin: QuantCtxtSkol :: SkolemInfo
+ TcOrigin: RecordUpdOrigin :: CtOrigin
+ TcOrigin: ReifySkol :: SkolemInfo
+ TcOrigin: ResSigCtxt :: UserTypeCtxt
+ TcOrigin: RuleSigCtxt :: Name -> UserTypeCtxt
+ TcOrigin: RuleSkol :: RuleName -> SkolemInfo
+ TcOrigin: ScOrigin :: TypeSize -> CtOrigin
+ TcOrigin: SectionOrigin :: CtOrigin
+ TcOrigin: Shouldn'tHappenOrigin :: String -> CtOrigin
+ TcOrigin: SigSkol :: UserTypeCtxt -> TcType -> [(Name, TcTyVar)] -> SkolemInfo
+ TcOrigin: SigTypeSkol :: UserTypeCtxt -> SkolemInfo
+ TcOrigin: SigmaCtxt :: UserTypeCtxt
+ TcOrigin: SpecInstCtxt :: UserTypeCtxt
+ TcOrigin: SpecPragOrigin :: UserTypeCtxt -> CtOrigin
+ TcOrigin: StandAloneDerivOrigin :: CtOrigin
+ TcOrigin: StandaloneKindSigCtxt :: Name -> UserTypeCtxt
+ TcOrigin: StaticOrigin :: CtOrigin
+ TcOrigin: ThBrackCtxt :: UserTypeCtxt
+ TcOrigin: TupleOrigin :: CtOrigin
+ TcOrigin: TyConSkol :: TyConFlavour -> Name -> SkolemInfo
+ TcOrigin: TyFamResKindCtxt :: Name -> UserTypeCtxt
+ TcOrigin: TySynCtxt :: Name -> UserTypeCtxt
+ TcOrigin: TySynKindCtxt :: Name -> UserTypeCtxt
+ TcOrigin: TyVarBndrKindCtxt :: Name -> UserTypeCtxt
+ TcOrigin: TypeAppCtxt :: UserTypeCtxt
+ TcOrigin: TypeEqOrigin :: TcType -> TcType -> Maybe SDoc -> Bool -> CtOrigin
+ TcOrigin: UnboundOccurrenceOf :: OccName -> CtOrigin
+ TcOrigin: UnifyForAllSkol :: TcType -> SkolemInfo
+ TcOrigin: UnkSkol :: SkolemInfo
+ TcOrigin: ViewPatOrigin :: CtOrigin
+ TcOrigin: [uo_actual] :: CtOrigin -> TcType
+ TcOrigin: [uo_expected] :: CtOrigin -> TcType
+ TcOrigin: [uo_thing] :: CtOrigin -> Maybe SDoc
+ TcOrigin: [uo_visible] :: CtOrigin -> Bool
+ TcOrigin: data CtOrigin
+ TcOrigin: data SkolemInfo
+ TcOrigin: data UserTypeCtxt
+ TcOrigin: exprCtOrigin :: HsExpr GhcRn -> CtOrigin
+ TcOrigin: grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin
+ TcOrigin: instance Outputable.Outputable TcOrigin.CtOrigin
+ TcOrigin: instance Outputable.Outputable TcOrigin.SkolemInfo
+ TcOrigin: isGivenOrigin :: CtOrigin -> Bool
+ TcOrigin: isSigMaybe :: UserTypeCtxt -> Maybe Name
+ TcOrigin: isVisibleOrigin :: CtOrigin -> Bool
+ TcOrigin: lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
+ TcOrigin: matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin
+ TcOrigin: pprCtOrigin :: CtOrigin -> SDoc
+ TcOrigin: pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc
+ TcOrigin: pprSkolInfo :: SkolemInfo -> SDoc
+ TcOrigin: pprUserTypeCtxt :: UserTypeCtxt -> SDoc
+ TcOrigin: toInvisibleOrigin :: CtOrigin -> CtOrigin
+ TcPluginM: Found :: ModLocation -> Module -> FindResult
+ TcPluginM: FoundMultiple :: [(Module, ModuleOrigin)] -> FindResult
+ TcPluginM: NoPackage :: UnitId -> FindResult
+ TcPluginM: NotFound :: [FilePath] -> Maybe UnitId -> [UnitId] -> [UnitId] -> [(UnitId, UnusablePackageReason)] -> [ModuleSuggestion] -> FindResult
+ TcPluginM: [fr_mods_hidden] :: FindResult -> [UnitId]
+ TcPluginM: [fr_paths] :: FindResult -> [FilePath]
+ TcPluginM: [fr_pkg] :: FindResult -> Maybe UnitId
+ TcPluginM: [fr_pkgs_hidden] :: FindResult -> [UnitId]
+ TcPluginM: [fr_suggestions] :: FindResult -> [ModuleSuggestion]
+ TcPluginM: [fr_unusables] :: FindResult -> [(UnitId, UnusablePackageReason)]
+ TcPluginM: data FindResult
+ TcPluginM: data TcPluginM a
+ TcPluginM: findImportedModule :: ModuleName -> Maybe FastString -> TcPluginM FindResult
+ TcPluginM: getEnvs :: TcPluginM (TcGblEnv, TcLclEnv)
+ TcPluginM: getEvBindsTcPluginM :: TcPluginM EvBindsVar
+ TcPluginM: getFamInstEnvs :: TcPluginM (FamInstEnv, FamInstEnv)
+ TcPluginM: getInstEnvs :: TcPluginM InstEnvs
+ TcPluginM: getTopEnv :: TcPluginM HscEnv
+ TcPluginM: isTouchableTcPluginM :: TcTyVar -> TcPluginM Bool
+ TcPluginM: lookupOrig :: Module -> OccName -> TcPluginM Name
+ TcPluginM: matchFam :: TyCon -> [Type] -> TcPluginM (Maybe (TcCoercion, TcType))
+ TcPluginM: newCoercionHole :: PredType -> TcPluginM CoercionHole
+ TcPluginM: newDerived :: CtLoc -> PredType -> TcPluginM CtEvidence
+ TcPluginM: newEvVar :: PredType -> TcPluginM EvVar
+ TcPluginM: newFlexiTyVar :: Kind -> TcPluginM TcTyVar
+ TcPluginM: newGiven :: CtLoc -> PredType -> EvExpr -> TcPluginM CtEvidence
+ TcPluginM: newUnique :: TcPluginM Unique
+ TcPluginM: newWanted :: CtLoc -> PredType -> TcPluginM CtEvidence
+ TcPluginM: setEvBind :: EvBind -> TcPluginM ()
+ TcPluginM: tcLookup :: Name -> TcPluginM TcTyThing
+ TcPluginM: tcLookupClass :: Name -> TcPluginM Class
+ TcPluginM: tcLookupDataCon :: Name -> TcPluginM DataCon
+ TcPluginM: tcLookupGlobal :: Name -> TcPluginM TyThing
+ TcPluginM: tcLookupId :: Name -> TcPluginM Id
+ TcPluginM: tcLookupTyCon :: Name -> TcPluginM TyCon
+ TcPluginM: tcPluginIO :: IO a -> TcPluginM a
+ TcPluginM: tcPluginTrace :: String -> SDoc -> TcPluginM ()
+ TcPluginM: unsafeTcPluginTcM :: TcM a -> TcPluginM a
+ TcPluginM: zonkCt :: Ct -> TcPluginM Ct
+ TcPluginM: zonkTcType :: TcType -> TcPluginM TcType
+ TcRnMonad: emitAnonWildCardHoleConstraint :: TcTyVar -> TcM ()
+ TcRnMonad: emitNamedWildCardHoleConstraints :: [(Name, TcTyVar)] -> TcM ()
+ TcRnTypes: [dsl_delta] :: DsLclEnv -> Delta
+ TcRnTypes: [env_um] :: Env gbl lcl -> !Char
+ TcRnTypes: [tcg_hf_plugins] :: TcGblEnv -> [HoleFitPlugin]
+ TcRnTypes: getLclEnvLoc :: TcLclEnv -> RealSrcSpan
+ TcRnTypes: getLclEnvTcLevel :: TcLclEnv -> TcLevel
+ TcRnTypes: setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv
+ TcRnTypes: setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv
+ TcSMonad: keepAlive :: Name -> TcS ()
+ TcSMonad: newWantedEq_SI :: ShadowInfo -> CtLoc -> Role -> TcType -> TcType -> TcS (CtEvidence, Coercion)
+ TcSMonad: newWanted_SI :: ShadowInfo -> CtLoc -> PredType -> TcS MaybeNew
+ TcTyClsDecls: kcConDecls :: NewOrData -> Kind -> [LConDecl GhcRn] -> TcM ()
+ TcType: ForallInvis :: ForallVisFlag
+ TcType: ForallVis :: ForallVisFlag
+ TcType: InvisArg :: AnonArgFlag
+ TcType: VisArg :: AnonArgFlag
+ TcType: data AnonArgFlag
+ TcType: data ForallVisFlag
+ TcType: isAlmostFunctionFree :: TcType -> Bool
+ TcType: isEqPredClass :: Class -> Bool
+ TcType: isEqPrimPred :: PredType -> Bool
+ TcType: mkInvisFunTy :: Type -> Type -> Type
+ TcType: mkInvisFunTys :: [Type] -> Type -> Type
+ TcType: mkTcAppTy :: Type -> Type -> Type
+ TcType: mkTcAppTys :: Type -> [Type] -> Type
+ TcType: mkTcCastTy :: Type -> Coercion -> Type
+ TcType: mkVisFunTy :: Type -> Type -> Type
+ TcType: mkVisFunTys :: [Type] -> Type -> Type
+ TcType: tcSplitForAllTysSameVis :: ArgFlag -> Type -> ([TyVar], Type)
+ TcTypeable: tyConIsTypeable :: TyCon -> Bool
+ TcUnify: MTVU_Bad :: MetaTyVarUpdateResult a
+ TcUnify: MTVU_OK :: a -> MetaTyVarUpdateResult a
+ TcUnify: MTVU_Occurs :: MetaTyVarUpdateResult a
+ TcUnify: data MetaTyVarUpdateResult a
+ TcUnify: instance GHC.Base.Applicative TcUnify.MetaTyVarUpdateResult
+ TcUnify: instance GHC.Base.Functor TcUnify.MetaTyVarUpdateResult
+ TcUnify: instance GHC.Base.Monad TcUnify.MetaTyVarUpdateResult
+ TcValidity: StandaloneKindSigCtxt :: Name -> UserTypeCtxt
+ TcValidity: checkTyConTelescope :: TyCon -> TcM ()
+ ToolSettings: ToolSettings :: Bool -> Bool -> Bool -> Bool -> Bool -> String -> (String, [Option]) -> String -> String -> (String, [Option]) -> (String, [Option]) -> (String, [Option]) -> String -> String -> String -> String -> String -> (String, [Option]) -> (String, [Option]) -> (String, [Option]) -> String -> [String] -> [String] -> Fingerprint -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> ToolSettings
+ ToolSettings: [toolSettings_ccSupportsNoPie] :: ToolSettings -> Bool
+ ToolSettings: [toolSettings_extraGccViaCFlags] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_ldIsGnuLd] :: ToolSettings -> Bool
+ ToolSettings: [toolSettings_ldSupportsBuildId] :: ToolSettings -> Bool
+ ToolSettings: [toolSettings_ldSupportsCompactUnwind] :: ToolSettings -> Bool
+ ToolSettings: [toolSettings_ldSupportsFilelist] :: ToolSettings -> Bool
+ ToolSettings: [toolSettings_opt_F] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_L] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_P] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_P_fingerprint] :: ToolSettings -> Fingerprint
+ ToolSettings: [toolSettings_opt_a] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_c] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_cxx] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_i] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_l] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_lc] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_lcc] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_lo] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_opt_windres] :: ToolSettings -> [String]
+ ToolSettings: [toolSettings_pgm_F] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_L] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_P] :: ToolSettings -> (String, [Option])
+ ToolSettings: [toolSettings_pgm_T] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_a] :: ToolSettings -> (String, [Option])
+ ToolSettings: [toolSettings_pgm_ar] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_c] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_dll] :: ToolSettings -> (String, [Option])
+ ToolSettings: [toolSettings_pgm_i] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_l] :: ToolSettings -> (String, [Option])
+ ToolSettings: [toolSettings_pgm_lc] :: ToolSettings -> (String, [Option])
+ ToolSettings: [toolSettings_pgm_lcc] :: ToolSettings -> (String, [Option])
+ ToolSettings: [toolSettings_pgm_libtool] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_lo] :: ToolSettings -> (String, [Option])
+ ToolSettings: [toolSettings_pgm_ranlib] :: ToolSettings -> String
+ ToolSettings: [toolSettings_pgm_windres] :: ToolSettings -> String
+ ToolSettings: data ToolSettings
+ TyCoFVs: almostDevoidCoVarOfCo :: CoVar -> Coercion -> Bool
+ TyCoFVs: coVarsOfCo :: Coercion -> CoVarSet
+ TyCoFVs: coVarsOfCos :: [Coercion] -> CoVarSet
+ TyCoFVs: coVarsOfType :: Type -> CoVarSet
+ TyCoFVs: coVarsOfTypes :: [Type] -> TyCoVarSet
+ TyCoFVs: exactTyCoVarsOfType :: Type -> TyCoVarSet
+ TyCoFVs: exactTyCoVarsOfTypes :: [Type] -> TyVarSet
+ TyCoFVs: injectiveVarsOfType :: Bool -> Type -> FV
+ TyCoFVs: injectiveVarsOfTypes :: Bool -> [Type] -> FV
+ TyCoFVs: invisibleVarsOfType :: Type -> FV
+ TyCoFVs: invisibleVarsOfTypes :: [Type] -> FV
+ TyCoFVs: mkTyCoInScopeSet :: [Type] -> [Coercion] -> InScopeSet
+ TyCoFVs: noFreeVarsOfCo :: Coercion -> Bool
+ TyCoFVs: noFreeVarsOfType :: Type -> Bool
+ TyCoFVs: noFreeVarsOfTypes :: [Type] -> Bool
+ TyCoFVs: scopedSort :: [TyCoVar] -> [TyCoVar]
+ TyCoFVs: tyCoFVsBndr :: TyCoVarBinder -> FV -> FV
+ TyCoFVs: tyCoFVsOfCo :: Coercion -> FV
+ TyCoFVs: tyCoFVsOfCos :: [Coercion] -> FV
+ TyCoFVs: tyCoFVsOfType :: Type -> FV
+ TyCoFVs: tyCoFVsOfTypes :: [Type] -> FV
+ TyCoFVs: tyCoFVsVarBndr :: Var -> FV -> FV
+ TyCoFVs: tyCoFVsVarBndrs :: [Var] -> FV -> FV
+ TyCoFVs: tyCoVarsOfCo :: Coercion -> TyCoVarSet
+ TyCoFVs: tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet
+ TyCoFVs: tyCoVarsOfCoList :: Coercion -> [TyCoVar]
+ TyCoFVs: tyCoVarsOfCos :: [Coercion] -> TyCoVarSet
+ TyCoFVs: tyCoVarsOfCosSet :: CoVarEnv Coercion -> TyCoVarSet
+ TyCoFVs: tyCoVarsOfProv :: UnivCoProvenance -> TyCoVarSet
+ TyCoFVs: tyCoVarsOfType :: Type -> TyCoVarSet
+ TyCoFVs: tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet
+ TyCoFVs: tyCoVarsOfTypeList :: Type -> [TyCoVar]
+ TyCoFVs: tyCoVarsOfTypeWellScoped :: Type -> [TyVar]
+ TyCoFVs: tyCoVarsOfTypes :: [Type] -> TyCoVarSet
+ TyCoFVs: tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet
+ TyCoFVs: tyCoVarsOfTypesList :: [Type] -> [TyCoVar]
+ TyCoFVs: tyCoVarsOfTypesSet :: TyVarEnv Type -> TyCoVarSet
+ TyCoFVs: tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]
+ TyCoPpr: PprPrec :: Int -> PprPrec
+ TyCoPpr: appPrec :: PprPrec
+ TyCoPpr: debugPprType :: Type -> SDoc
+ TyCoPpr: funPrec :: PprPrec
+ TyCoPpr: maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
+ TyCoPpr: newtype PprPrec
+ TyCoPpr: opPrec :: PprPrec
+ TyCoPpr: pprClassPred :: Class -> [Type] -> SDoc
+ TyCoPpr: pprCo :: Coercion -> SDoc
+ TyCoPpr: pprDataCons :: TyCon -> SDoc
+ TyCoPpr: pprForAll :: [TyCoVarBinder] -> SDoc
+ TyCoPpr: pprKind :: Kind -> SDoc
+ TyCoPpr: pprParendCo :: Coercion -> SDoc
+ TyCoPpr: pprParendKind :: Kind -> SDoc
+ TyCoPpr: pprParendTheta :: ThetaType -> SDoc
+ TyCoPpr: pprParendType :: Type -> SDoc
+ TyCoPpr: pprPrecType :: PprPrec -> Type -> SDoc
+ TyCoPpr: pprPrecTypeX :: TidyEnv -> PprPrec -> Type -> SDoc
+ TyCoPpr: pprShortTyThing :: TyThing -> SDoc
+ TyCoPpr: pprSigmaType :: Type -> SDoc
+ TyCoPpr: pprSourceTyCon :: TyCon -> SDoc
+ TyCoPpr: pprTCvBndr :: TyCoVarBinder -> SDoc
+ TyCoPpr: pprTCvBndrs :: [TyCoVarBinder] -> SDoc
+ TyCoPpr: pprTheta :: ThetaType -> SDoc
+ TyCoPpr: pprThetaArrowTy :: ThetaType -> SDoc
+ TyCoPpr: pprTyLit :: TyLit -> SDoc
+ TyCoPpr: pprTyThingCategory :: TyThing -> SDoc
+ TyCoPpr: pprTyVar :: TyVar -> SDoc
+ TyCoPpr: pprTyVars :: [TyVar] -> SDoc
+ TyCoPpr: pprType :: Type -> SDoc
+ TyCoPpr: pprTypeApp :: TyCon -> [Type] -> SDoc
+ TyCoPpr: pprUserForAll :: [TyCoVarBinder] -> SDoc
+ TyCoPpr: pprWithExplicitKindsWhen :: Bool -> SDoc -> SDoc
+ TyCoPpr: pprWithTYPE :: Type -> SDoc
+ TyCoPpr: sigPrec :: PprPrec
+ TyCoPpr: topPrec :: PprPrec
+ TyCoRep: ForallInvis :: ForallVisFlag
+ TyCoRep: ForallVis :: ForallVisFlag
+ TyCoRep: InvisArg :: AnonArgFlag
+ TyCoRep: VisArg :: AnonArgFlag
+ TyCoRep: [ft_af] :: Type -> AnonArgFlag
+ TyCoRep: [ft_arg] :: Type -> Type
+ TyCoRep: [ft_res] :: Type -> Type
+ TyCoRep: data AnonArgFlag
+ TyCoRep: data ForallVisFlag
+ TyCoRep: mkInvisFunTy :: Type -> Type -> Type
+ TyCoRep: mkInvisFunTys :: [Type] -> Type -> Type
+ TyCoRep: mkPiTy :: TyCoBinder -> Type -> Type
+ TyCoRep: mkVisFunTy :: Type -> Type -> Type
+ TyCoRep: mkVisFunTys :: [Type] -> Type -> Type
+ TyCoSubst: TCvSubst :: InScopeSet -> TvSubstEnv -> CvSubstEnv -> TCvSubst
+ TyCoSubst: checkValidSubst :: HasCallStack => TCvSubst -> [Type] -> [Coercion] -> a -> a
+ TyCoSubst: cloneTyVarBndr :: TCvSubst -> TyVar -> Unique -> (TCvSubst, TyVar)
+ TyCoSubst: cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar])
+ TyCoSubst: composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
+ TyCoSubst: composeTCvSubstEnv :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv) -> (TvSubstEnv, CvSubstEnv)
+ TyCoSubst: data TCvSubst
+ TyCoSubst: emptyCvSubstEnv :: CvSubstEnv
+ TyCoSubst: emptyTCvSubst :: TCvSubst
+ TyCoSubst: emptyTvSubstEnv :: TvSubstEnv
+ TyCoSubst: extendCvSubst :: TCvSubst -> CoVar -> Coercion -> TCvSubst
+ TyCoSubst: extendCvSubstWithClone :: TCvSubst -> CoVar -> CoVar -> TCvSubst
+ TyCoSubst: extendTCvInScope :: TCvSubst -> Var -> TCvSubst
+ TyCoSubst: extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst
+ TyCoSubst: extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst
+ TyCoSubst: extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst
+ TyCoSubst: extendTCvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
+ TyCoSubst: extendTCvSubstWithClone :: TCvSubst -> TyCoVar -> TyCoVar -> TCvSubst
+ TyCoSubst: extendTvSubst :: TCvSubst -> TyVar -> Type -> TCvSubst
+ TyCoSubst: extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst
+ TyCoSubst: extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst
+ TyCoSubst: extendTvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst
+ TyCoSubst: extendTvSubstWithClone :: TCvSubst -> TyVar -> TyVar -> TCvSubst
+ TyCoSubst: getCvSubstEnv :: TCvSubst -> CvSubstEnv
+ TyCoSubst: getTCvInScope :: TCvSubst -> InScopeSet
+ TyCoSubst: getTCvSubstRangeFVs :: TCvSubst -> VarSet
+ TyCoSubst: getTvSubstEnv :: TCvSubst -> TvSubstEnv
+ TyCoSubst: instance Outputable.Outputable TyCoSubst.TCvSubst
+ TyCoSubst: isEmptyTCvSubst :: TCvSubst -> Bool
+ TyCoSubst: isInScope :: Var -> TCvSubst -> Bool
+ TyCoSubst: isValidTCvSubst :: TCvSubst -> Bool
+ TyCoSubst: lookupCoVar :: TCvSubst -> Var -> Maybe Coercion
+ TyCoSubst: lookupTyVar :: TCvSubst -> TyVar -> Maybe Type
+ TyCoSubst: mkCvSubst :: InScopeSet -> CvSubstEnv -> TCvSubst
+ TyCoSubst: mkEmptyTCvSubst :: InScopeSet -> TCvSubst
+ TyCoSubst: mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst
+ TyCoSubst: mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst
+ TyCoSubst: mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
+ TyCoSubst: mkTyCoInScopeSet :: [Type] -> [Coercion] -> InScopeSet
+ TyCoSubst: notElemTCvSubst :: Var -> TCvSubst -> Bool
+ TyCoSubst: setCvSubstEnv :: TCvSubst -> CvSubstEnv -> TCvSubst
+ TyCoSubst: setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst
+ TyCoSubst: substCo :: HasCallStack => TCvSubst -> Coercion -> Coercion
+ TyCoSubst: substCoUnchecked :: TCvSubst -> Coercion -> Coercion
+ TyCoSubst: substCoVar :: TCvSubst -> CoVar -> Coercion
+ TyCoSubst: substCoVarBndr :: HasCallStack => TCvSubst -> CoVar -> (TCvSubst, CoVar)
+ TyCoSubst: substCoVars :: TCvSubst -> [CoVar] -> [Coercion]
+ TyCoSubst: substCoWith :: HasCallStack => [TyVar] -> [Type] -> Coercion -> Coercion
+ TyCoSubst: substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion
+ TyCoSubst: substCos :: HasCallStack => TCvSubst -> [Coercion] -> [Coercion]
+ TyCoSubst: substForAllCoBndr :: TCvSubst -> TyCoVar -> KindCoercion -> (TCvSubst, TyCoVar, Coercion)
+ TyCoSubst: substForAllCoBndrUsing :: Bool -> (Coercion -> Coercion) -> TCvSubst -> TyCoVar -> KindCoercion -> (TCvSubst, TyCoVar, KindCoercion)
+ TyCoSubst: substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType
+ TyCoSubst: substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType
+ TyCoSubst: substTy :: HasCallStack => TCvSubst -> Type -> Type
+ TyCoSubst: substTyAddInScope :: TCvSubst -> Type -> Type
+ TyCoSubst: substTyCoVars :: TCvSubst -> [TyCoVar] -> [Type]
+ TyCoSubst: substTyUnchecked :: TCvSubst -> Type -> Type
+ TyCoSubst: substTyVar :: TCvSubst -> TyVar -> Type
+ TyCoSubst: substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)
+ TyCoSubst: substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])
+ TyCoSubst: substTyVars :: TCvSubst -> [TyVar] -> [Type]
+ TyCoSubst: substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type
+ TyCoSubst: substTyWithCoVars :: [CoVar] -> [Coercion] -> Type -> Type
+ TyCoSubst: substTyWithInScope :: InScopeSet -> [TyVar] -> [Type] -> Type -> Type
+ TyCoSubst: substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type
+ TyCoSubst: substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]
+ TyCoSubst: substTysUnchecked :: TCvSubst -> [Type] -> [Type]
+ TyCoSubst: substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]
+ TyCoSubst: substTysWithCoVars :: [CoVar] -> [Coercion] -> [Type] -> [Type]
+ TyCoSubst: substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)
+ TyCoSubst: substVarBndrUsing :: (TCvSubst -> Type -> Type) -> TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)
+ TyCoSubst: substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar])
+ TyCoSubst: type CvSubstEnv = CoVarEnv Coercion
+ TyCoSubst: type TvSubstEnv = TyVarEnv Type
+ TyCoSubst: unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst
+ TyCoSubst: zapTCvSubst :: TCvSubst -> TCvSubst
+ TyCoSubst: zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv
+ TyCoSubst: zipCvSubst :: HasDebugCallStack => [CoVar] -> [Coercion] -> TCvSubst
+ TyCoSubst: zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst
+ TyCoSubst: zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst
+ TyCoSubst: zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv
+ TyCoTidy: avoidNameClashes :: [TyCoVar] -> TidyEnv -> TidyEnv
+ TyCoTidy: tidyCo :: TidyEnv -> Coercion -> Coercion
+ TyCoTidy: tidyCos :: TidyEnv -> [Coercion] -> [Coercion]
+ TyCoTidy: tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv
+ TyCoTidy: tidyKind :: TidyEnv -> Kind -> Kind
+ TyCoTidy: tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)
+ TyCoTidy: tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
+ TyCoTidy: tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
+ TyCoTidy: tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)
+ TyCoTidy: tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])
+ TyCoTidy: tidyTopType :: Type -> Type
+ TyCoTidy: tidyTyCoVarBinder :: TidyEnv -> VarBndr TyCoVar vis -> (TidyEnv, VarBndr TyCoVar vis)
+ TyCoTidy: tidyTyCoVarBinders :: TidyEnv -> [VarBndr TyCoVar vis] -> (TidyEnv, [VarBndr TyCoVar vis])
+ TyCoTidy: tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar
+ TyCoTidy: tidyType :: TidyEnv -> Type -> Type
+ TyCoTidy: tidyTypes :: TidyEnv -> [Type] -> [Type]
+ TyCoTidy: tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)
+ TyCoTidy: tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])
+ TyCon: Int32Rep :: PrimRep
+ TyCon: Word32Rep :: PrimRep
+ TyCon: [nt_lev_poly] :: AlgTyConRhs -> Bool
+ TyCon: mustBeSaturated :: TyCon -> Bool
+ TyCon: noTcTyConScopedTyVars :: [(Name, TcTyVar)]
+ TyCon: primRepCompatible :: DynFlags -> PrimRep -> PrimRep -> Bool
+ TyCon: primRepsCompatible :: DynFlags -> [PrimRep] -> [PrimRep] -> Bool
+ TyCon: setTcTyConKind :: TyCon -> Kind -> TyCon
+ Type: ForallInvis :: ForallVisFlag
+ Type: ForallVis :: ForallVisFlag
+ Type: InvisArg :: AnonArgFlag
+ Type: VisArg :: AnonArgFlag
+ Type: classifiesTypeWithValues :: Kind -> Bool
+ Type: data AnonArgFlag
+ Type: data ForallVisFlag
+ Type: discardCast :: Type -> Type
+ Type: isConstraintKindCon :: TyCon -> Bool
+ Type: isKindLevPoly :: Kind -> Bool
+ Type: isLiftedRuntimeRep :: Type -> Bool
+ Type: isLiftedTypeKind :: Kind -> Bool
+ Type: isUnliftedRuntimeRep :: Type -> Bool
+ Type: isUnliftedTypeKind :: Kind -> Bool
+ Type: mightBeUnliftedType :: Type -> Bool
+ Type: mkInvisFunTy :: Type -> Type -> Type
+ Type: mkInvisFunTys :: [Type] -> Type -> Type
+ Type: mkPiTy :: TyCoBinder -> Type -> Type
+ Type: mkSpecForAllTy :: TyVar -> Type -> Type
+ Type: mkVisFunTy :: Type -> Type -> Type
+ Type: mkVisFunTys :: [Type] -> Type -> Type
+ Type: splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type)
+ Type: tcIsRuntimeTypeKind :: Kind -> Bool
+ Type: tyConAppNeedsKindSig :: Bool -> TyCon -> Int -> Bool
+ TysPrim: equalityTyCon :: Role -> TyCon
+ TysPrim: mkTemplateKiTyVar :: Kind -> (Kind -> [Kind]) -> [TyVar]
+ TysWiredIn: constraintKindTyConName :: Name
+ TysWiredIn: int32RepDataConTy :: Type
+ TysWiredIn: makeRecoveryTyCon :: TyCon -> TyCon
+ TysWiredIn: mkTupleStr :: Boxity -> Arity -> String
+ TysWiredIn: mkTupleTy1 :: Boxity -> [Type] -> Type
+ TysWiredIn: typeToTypeKind :: Kind
+ TysWiredIn: word32RepDataConTy :: Type
+ UniqDFM: instance Data.Foldable.Foldable UniqDFM.UniqDFM
+ UniqDFM: instance Data.Traversable.Traversable UniqDFM.UniqDFM
+ UniqFM: NonDetUniqFM :: UniqFM ele -> NonDetUniqFM ele
+ UniqFM: [getNonDet] :: NonDetUniqFM ele -> UniqFM ele
+ UniqFM: instance Data.Foldable.Foldable UniqFM.NonDetUniqFM
+ UniqFM: instance Data.Traversable.Traversable UniqFM.NonDetUniqFM
+ UniqFM: instance GHC.Base.Functor UniqFM.NonDetUniqFM
+ UniqFM: newtype NonDetUniqFM ele
+ UniqSupply: uniqFromMask :: Char -> IO Unique
+ Util: applyWhen :: Bool -> (a -> a) -> a -> a
+ Util: lastMaybe :: [a] -> Maybe a
+ Util: whenNonEmpty :: Applicative m => [a] -> (NonEmpty a -> m ()) -> m ()
+ Util: withAtomicRename :: MonadIO m => FilePath -> (FilePath -> m a) -> m a
+ Var: ForallInvis :: ForallVisFlag
+ Var: ForallVis :: ForallVisFlag
+ Var: InvisArg :: AnonArgFlag
+ Var: VisArg :: AnonArgFlag
+ Var: argToForallVisFlag :: ArgFlag -> ForallVisFlag
+ Var: data AnonArgFlag
+ Var: data ForallVisFlag
+ Var: instance Binary.Binary Var.AnonArgFlag
+ Var: instance Data.Data.Data Var.AnonArgFlag
+ Var: instance Data.Data.Data Var.ForallVisFlag
+ Var: instance GHC.Classes.Eq Var.AnonArgFlag
+ Var: instance GHC.Classes.Eq Var.ForallVisFlag
+ Var: instance GHC.Classes.Ord Var.AnonArgFlag
+ Var: instance GHC.Classes.Ord Var.ForallVisFlag
+ Var: instance Outputable.Outputable Var.AnonArgFlag
+ Var: instance Outputable.Outputable Var.ForallVisFlag
+ X86.Instr: LZCNT :: Format -> Operand -> Reg -> Instr
+ X86.Instr: TZCNT :: Format -> Operand -> Reg -> Instr
+ X86.Instr: X87Store :: Format -> AddrMode -> Instr
+ X86.Regs: firstxmm :: RegNo
+ X86.Regs: lastint :: Platform -> RegNo
+ X86.Regs: lastxmm :: Platform -> RegNo
- AsmCodeGen: NcgImpl :: (RawCmmDecl -> NatM [NatCmmDecl statics instr]) -> (instr -> Maybe (NatCmmDecl statics instr)) -> (jumpDest -> Maybe BlockId) -> (instr -> Maybe jumpDest) -> ((BlockId -> Maybe jumpDest) -> statics -> statics) -> ((BlockId -> Maybe jumpDest) -> instr -> instr) -> (NatCmmDecl statics instr -> SDoc) -> Int -> [RealReg] -> ([NatCmmDecl statics instr] -> [NatCmmDecl statics instr]) -> ([NatCmmDecl statics instr] -> [NatCmmDecl statics instr]) -> (Int -> NatCmmDecl statics instr -> UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])) -> (LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> ([instr] -> [UnwindPoint]) -> (Maybe CFG -> LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> NcgImpl statics instr jumpDest
+ AsmCodeGen: NcgImpl :: (RawCmmDecl -> NatM [NatCmmDecl statics instr]) -> (instr -> Maybe (NatCmmDecl statics instr)) -> (jumpDest -> Maybe BlockId) -> (instr -> Maybe jumpDest) -> ((BlockId -> Maybe jumpDest) -> statics -> statics) -> ((BlockId -> Maybe jumpDest) -> instr -> instr) -> (NatCmmDecl statics instr -> SDoc) -> Int -> [RealReg] -> ([NatCmmDecl statics instr] -> [NatCmmDecl statics instr]) -> (Int -> NatCmmDecl statics instr -> UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])) -> (LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> ([instr] -> [UnwindPoint]) -> (Maybe CFG -> LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> NcgImpl statics instr jumpDest
- AsmCodeGen: nativeCodeGen :: DynFlags -> Module -> ModLocation -> Handle -> UniqSupply -> Stream IO RawCmmGroup () -> IO UniqSupply
+ AsmCodeGen: nativeCodeGen :: forall a. DynFlags -> Module -> ModLocation -> Handle -> UniqSupply -> Stream IO RawCmmGroup a -> IO a
- BkpSyn: DeclD :: HsDeclType -> Located ModuleName -> Maybe (Located (HsModule GhcPs)) -> HsUnitDecl n
+ BkpSyn: DeclD :: HscSource -> Located ModuleName -> Maybe (Located (HsModule GhcPs)) -> HsUnitDecl n
- CFG: CmmSource :: CmmNode O C -> TransitionSource
+ CFG: CmmSource :: CmmNode O C -> BranchInfo -> TransitionSource
- CFG: EdgeWeight :: Int -> EdgeWeight
+ CFG: EdgeWeight :: Double -> EdgeWeight
- CFG: addImmediateSuccessor :: HasDebugCallStack => BlockId -> BlockId -> CFG -> CFG
+ CFG: addImmediateSuccessor :: BlockId -> BlockId -> CFG -> CFG
- CFG: getCfgNodes :: CFG -> LabelSet
+ CFG: getCfgNodes :: CFG -> [BlockId]
- CFG: mkWeightInfo :: Integral n => n -> EdgeInfo
+ CFG: mkWeightInfo :: EdgeWeight -> EdgeInfo
- CFG: optimizeCFG :: HasDebugCallStack => CfgWeights -> RawCmmDecl -> CFG -> CFG
+ CFG: optimizeCFG :: CfgWeights -> RawCmmDecl -> CFG -> CFG
- CLabel: pprCLabel :: Platform -> CLabel -> SDoc
+ CLabel: pprCLabel :: DynFlags -> CLabel -> SDoc
- Cmm: CmmString :: [Word8] -> CmmStatic
+ Cmm: CmmString :: ByteString -> CmmStatic
- Cmm: ProfilingInfo :: [Word8] -> [Word8] -> ProfilingInfo
+ Cmm: ProfilingInfo :: ByteString -> ByteString -> ProfilingInfo
- Cmm: type ConstrDescription = [Word8]
+ Cmm: type ConstrDescription = ByteString
- CmmInfo: cmmToRawCmm :: DynFlags -> Stream IO CmmGroup () -> IO (Stream IO RawCmmGroup ())
+ CmmInfo: cmmToRawCmm :: DynFlags -> Stream IO CmmGroup a -> IO (Stream IO RawCmmGroup a)
- CmmUtils: mkByteStringCLit :: CLabel -> [Word8] -> (CmmLit, GenCmmDecl CmmStatics info stmt)
+ CmmUtils: mkByteStringCLit :: CLabel -> ByteString -> (CmmLit, GenCmmDecl CmmStatics info stmt)
- CodeOutput: codeOutput :: DynFlags -> Module -> FilePath -> ModLocation -> ForeignStubs -> [(ForeignSrcLang, FilePath)] -> [InstalledUnitId] -> Stream IO RawCmmGroup () -> IO (FilePath, (Bool, Maybe FilePath), [(ForeignSrcLang, FilePath)])
+ CodeOutput: codeOutput :: DynFlags -> Module -> FilePath -> ModLocation -> ForeignStubs -> [(ForeignSrcLang, FilePath)] -> [InstalledUnitId] -> Stream IO RawCmmGroup a -> IO (FilePath, (Bool, Maybe FilePath), [(ForeignSrcLang, FilePath)], a)
- CoreMonad: runCoreM :: HscEnv -> RuleBase -> UniqSupply -> Module -> ModuleSet -> PrintUnqualified -> SrcSpan -> CoreM a -> IO (a, SimplCount)
+ CoreMonad: runCoreM :: HscEnv -> RuleBase -> Char -> Module -> ModuleSet -> PrintUnqualified -> SrcSpan -> CoreM a -> IO (a, SimplCount)
- CoreMonad: warnMsg :: SDoc -> CoreM ()
+ CoreMonad: warnMsg :: WarnReason -> SDoc -> CoreM ()
- CoreOpt: exprIsConApp_maybe :: InScopeEnv -> CoreExpr -> Maybe (DataCon, [Type], [CoreExpr])
+ CoreOpt: exprIsConApp_maybe :: InScopeEnv -> CoreExpr -> Maybe (InScopeSet, [FloatBind], DataCon, [Type], [CoreExpr])
- CoreSubst: substCo :: Subst -> Coercion -> Coercion
+ CoreSubst: substCo :: HasCallStack => Subst -> Coercion -> Coercion
- CoreUnfold: exprIsConApp_maybe :: InScopeEnv -> CoreExpr -> Maybe (DataCon, [Type], [CoreExpr])
+ CoreUnfold: exprIsConApp_maybe :: InScopeEnv -> CoreExpr -> Maybe (InScopeSet, [FloatBind], DataCon, [Type], [CoreExpr])
- DataCon: dataConIdentity :: DataCon -> [Word8]
+ DataCon: dataConIdentity :: DataCon -> ByteString
- DriverPipeline: PipeState :: HscEnv -> Maybe ModLocation -> [FilePath] -> PipeState
+ DriverPipeline: PipeState :: HscEnv -> Maybe ModLocation -> [FilePath] -> Maybe ModIface -> PipeState
- DriverPipeline: hscPostBackendPhase :: DynFlags -> HscSource -> HscTarget -> Phase
+ DriverPipeline: hscPostBackendPhase :: HscSource -> HscTarget -> Phase
- DsMonad: foldlM :: Monad m => (a -> b -> m a) -> a -> [b] -> m a
+ DsMonad: foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- DsMonad: foldrM :: Monad m => (b -> a -> m a) -> a -> [b] -> m a
+ DsMonad: foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
- DynFlags: DynFlags :: GhcMode -> GhcLink -> HscTarget -> Settings -> IntegerLibrary -> LlvmTargets -> LlvmPasses -> Int -> Int -> Int -> Int -> Int -> Int -> Maybe String -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Maybe Int -> Maybe Int -> Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> Module -> Maybe String -> IntWithInf -> IntWithInf -> InstalledUnitId -> Maybe ComponentId -> Maybe [(ModuleName, Module)] -> [Way] -> String -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> IORef Bool -> String -> String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> Maybe FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [LoadedPlugin] -> [StaticPlugin] -> Hooks -> FilePath -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> Maybe [(FilePath, [PackageConfig])] -> PackageState -> IORef FilesToClean -> IORef (Map FilePath FilePath) -> IORef Int -> IORef (Set FilePath) -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> Int -> Int -> Int -> Int -> Float -> Int -> Bool -> Int -> Int -> LogAction -> FlushOut -> FlushErr -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> Maybe String -> IORef (ModuleEnv Int) -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Int -> Int -> CfgWeights -> DynFlags
+ DynFlags: DynFlags :: GhcMode -> GhcLink -> HscTarget -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> PlatformConstants -> [(String, String)] -> IntegerLibrary -> LlvmConfig -> Int -> Int -> Int -> Int -> Int -> Maybe String -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> Maybe Int -> Maybe Int -> Int -> Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> Module -> Maybe String -> IntWithInf -> IntWithInf -> InstalledUnitId -> Maybe ComponentId -> Maybe [(ModuleName, Module)] -> [Way] -> String -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> IORef Bool -> String -> String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> Maybe FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [LoadedPlugin] -> [StaticPlugin] -> Hooks -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> Maybe [(FilePath, [PackageConfig])] -> PackageState -> IORef FilesToClean -> IORef (Map FilePath FilePath) -> IORef Int -> IORef (Set FilePath) -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> Int -> Int -> Int -> Int -> Float -> Int -> Bool -> Int -> Int -> LogAction -> FlushOut -> FlushErr -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> Maybe String -> IORef (ModuleEnv Int) -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Int -> Int -> CfgWeights -> DynFlags
- DynFlags: PlatformConstants :: () -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Bool -> Bool -> Int -> Integer -> Integer -> Integer -> PlatformConstants
+ DynFlags: PlatformConstants :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Bool -> Bool -> Int -> Integer -> Integer -> Integer -> PlatformConstants
- DynFlags: Settings :: Platform -> FilePath -> FilePath -> Maybe FilePath -> FilePath -> String -> String -> String -> [(String, String)] -> [String] -> FilePath -> Bool -> Bool -> Bool -> Bool -> Bool -> String -> (String, [Option]) -> String -> (String, [Option]) -> (String, [Option]) -> (String, [Option]) -> (String, [Option]) -> (String, [Option]) -> String -> String -> String -> String -> String -> (String, [Option]) -> (String, [Option]) -> (String, [Option]) -> String -> [String] -> [String] -> Fingerprint -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> PlatformConstants -> Settings
+ DynFlags: Settings :: {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> PlatformConstants -> [(String, String)] -> Settings
- DynFlags: [llvmPasses] :: DynFlags -> LlvmPasses
+ DynFlags: [llvmPasses] :: LlvmConfig -> [(Int, String)]
- DynFlags: [llvmTargets] :: DynFlags -> LlvmTargets
+ DynFlags: [llvmTargets] :: LlvmConfig -> [(String, LlvmTarget)]
- DynFlags: defaultObjectTarget :: Platform -> HscTarget
+ DynFlags: defaultObjectTarget :: DynFlags -> HscTarget
- DynFlags: pgm_c :: DynFlags -> (String, [Option])
+ DynFlags: pgm_c :: DynFlags -> String
- DynFlags: supportedLanguagesAndExtensions :: [String]
+ DynFlags: supportedLanguagesAndExtensions :: PlatformMini -> [String]
- ErrUtils: withTiming :: MonadIO m => m DynFlags -> SDoc -> (a -> ()) -> m a -> m a
+ ErrUtils: withTiming :: MonadIO m => DynFlags -> SDoc -> (a -> ()) -> m a -> m a
- FastString: FastString :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !ByteString -> {-# UNPACK #-} !IORef (Maybe FastZString) -> FastString
+ FastString: FastString :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !ByteString -> FastZString -> FastString
- FastString: bytesFS :: FastString -> [Word8]
+ FastString: bytesFS :: FastString -> ByteString
- GHC: DynFlags :: GhcMode -> GhcLink -> HscTarget -> Settings -> IntegerLibrary -> LlvmTargets -> LlvmPasses -> Int -> Int -> Int -> Int -> Int -> Int -> Maybe String -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Maybe Int -> Maybe Int -> Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> Module -> Maybe String -> IntWithInf -> IntWithInf -> InstalledUnitId -> Maybe ComponentId -> Maybe [(ModuleName, Module)] -> [Way] -> String -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> IORef Bool -> String -> String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> Maybe FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [LoadedPlugin] -> [StaticPlugin] -> Hooks -> FilePath -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> Maybe [(FilePath, [PackageConfig])] -> PackageState -> IORef FilesToClean -> IORef (Map FilePath FilePath) -> IORef Int -> IORef (Set FilePath) -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> Int -> Int -> Int -> Int -> Float -> Int -> Bool -> Int -> Int -> LogAction -> FlushOut -> FlushErr -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> Maybe String -> IORef (ModuleEnv Int) -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Int -> Int -> CfgWeights -> DynFlags
+ GHC: DynFlags :: GhcMode -> GhcLink -> HscTarget -> {-# UNPACK #-} !GhcNameVersion -> {-# UNPACK #-} !FileSettings -> Platform -> {-# UNPACK #-} !ToolSettings -> {-# UNPACK #-} !PlatformMisc -> PlatformConstants -> [(String, String)] -> IntegerLibrary -> LlvmConfig -> Int -> Int -> Int -> Int -> Int -> Maybe String -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Int -> Maybe Int -> Maybe Int -> Int -> Word -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Bool -> Maybe Int -> Int -> [FilePath] -> Module -> Maybe String -> IntWithInf -> IntWithInf -> InstalledUnitId -> Maybe ComponentId -> Maybe [(ModuleName, Module)] -> [Way] -> String -> Maybe (String, Int) -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> String -> String -> String -> String -> IORef Bool -> String -> String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> Maybe FilePath -> Maybe FilePath -> [Option] -> IncludeSpecs -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> [LoadedPlugin] -> [StaticPlugin] -> Hooks -> FilePath -> Bool -> Bool -> [ModuleName] -> [String] -> [PackageDBFlag] -> [IgnorePackageFlag] -> [PackageFlag] -> [PackageFlag] -> [TrustFlag] -> Maybe FilePath -> Maybe [(FilePath, [PackageConfig])] -> PackageState -> IORef FilesToClean -> IORef (Map FilePath FilePath) -> IORef Int -> IORef (Set FilePath) -> EnumSet DumpFlag -> EnumSet GeneralFlag -> EnumSet WarningFlag -> EnumSet WarningFlag -> Maybe Language -> SafeHaskellMode -> Bool -> Bool -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> SrcSpan -> [OnOff Extension] -> EnumSet Extension -> Int -> Int -> Int -> Int -> Float -> Int -> Bool -> Int -> Int -> LogAction -> FlushOut -> FlushErr -> Maybe FilePath -> Maybe String -> [String] -> Int -> Int -> Bool -> OverridingBool -> Bool -> Scheme -> ProfAuto -> Maybe String -> IORef (ModuleEnv Int) -> Maybe SseVersion -> Maybe BmiVersion -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> IORef (Maybe LinkerInfo) -> IORef (Maybe CompilerInfo) -> Int -> Int -> Int -> Bool -> Maybe Int -> Int -> Int -> CfgWeights -> DynFlags
- GHC: ModIface :: !Module -> !Maybe Module -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !WhetherHasOrphans -> !WhetherHasFamInst -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Fingerprint -> !Bool -> [(OccName, Fixity)] -> Warnings -> [IfaceAnnotation] -> [(Fingerprint, IfaceDecl)] -> !Maybe GlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !Fingerprint -> (OccName -> Maybe WarningTxt) -> (OccName -> Maybe Fixity) -> (OccName -> Maybe (OccName, Fingerprint)) -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> [IfaceCompleteMatch] -> Maybe HsDocString -> DeclDocMap -> ArgDocMap -> ModIface
+ GHC: ModIface :: !Module -> !Maybe Module -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Bool -> [(OccName, Fixity)] -> Warnings -> [IfaceAnnotation] -> [IfaceDeclExts phase] -> !Maybe GlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> [IfaceCompleteMatch] -> Maybe HsDocString -> DeclDocMap -> ArgDocMap -> !IfaceBackendExts phase -> ModIface_ (phase :: ModIfacePhase)
- GHC: [mi_anns] :: ModIface -> [IfaceAnnotation]
+ GHC: [mi_anns] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceAnnotation]
- GHC: [mi_arg_docs] :: ModIface -> ArgDocMap
+ GHC: [mi_arg_docs] :: ModIface_ (phase :: ModIfacePhase) -> ArgDocMap
- GHC: [mi_complete_sigs] :: ModIface -> [IfaceCompleteMatch]
+ GHC: [mi_complete_sigs] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceCompleteMatch]
- GHC: [mi_decl_docs] :: ModIface -> DeclDocMap
+ GHC: [mi_decl_docs] :: ModIface_ (phase :: ModIfacePhase) -> DeclDocMap
- GHC: [mi_decls] :: ModIface -> [(Fingerprint, IfaceDecl)]
+ GHC: [mi_decls] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceDeclExts phase]
- GHC: [mi_deps] :: ModIface -> Dependencies
+ GHC: [mi_deps] :: ModIface_ (phase :: ModIfacePhase) -> Dependencies
- GHC: [mi_doc_hdr] :: ModIface -> Maybe HsDocString
+ GHC: [mi_doc_hdr] :: ModIface_ (phase :: ModIfacePhase) -> Maybe HsDocString
- GHC: [mi_exports] :: ModIface -> ![IfaceExport]
+ GHC: [mi_exports] :: ModIface_ (phase :: ModIfacePhase) -> ![IfaceExport]
- GHC: [mi_fam_insts] :: ModIface -> [IfaceFamInst]
+ GHC: [mi_fam_insts] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceFamInst]
- GHC: [mi_fixities] :: ModIface -> [(OccName, Fixity)]
+ GHC: [mi_fixities] :: ModIface_ (phase :: ModIfacePhase) -> [(OccName, Fixity)]
- GHC: [mi_globals] :: ModIface -> !Maybe GlobalRdrEnv
+ GHC: [mi_globals] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe GlobalRdrEnv
- GHC: [mi_hpc] :: ModIface -> !AnyHpcUsage
+ GHC: [mi_hpc] :: ModIface_ (phase :: ModIfacePhase) -> !AnyHpcUsage
- GHC: [mi_hsc_src] :: ModIface -> !HscSource
+ GHC: [mi_hsc_src] :: ModIface_ (phase :: ModIfacePhase) -> !HscSource
- GHC: [mi_insts] :: ModIface -> [IfaceClsInst]
+ GHC: [mi_insts] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceClsInst]
- GHC: [mi_module] :: ModIface -> !Module
+ GHC: [mi_module] :: ModIface_ (phase :: ModIfacePhase) -> !Module
- GHC: [mi_rules] :: ModIface -> [IfaceRule]
+ GHC: [mi_rules] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceRule]
- GHC: [mi_sig_of] :: ModIface -> !Maybe Module
+ GHC: [mi_sig_of] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe Module
- GHC: [mi_trust] :: ModIface -> !IfaceTrustInfo
+ GHC: [mi_trust] :: ModIface_ (phase :: ModIfacePhase) -> !IfaceTrustInfo
- GHC: [mi_trust_pkg] :: ModIface -> !Bool
+ GHC: [mi_trust_pkg] :: ModIface_ (phase :: ModIfacePhase) -> !Bool
- GHC: [mi_usages] :: ModIface -> [Usage]
+ GHC: [mi_usages] :: ModIface_ (phase :: ModIfacePhase) -> [Usage]
- GHC: [mi_used_th] :: ModIface -> !Bool
+ GHC: [mi_used_th] :: ModIface_ (phase :: ModIfacePhase) -> !Bool
- GHC: [mi_warns] :: ModIface -> Warnings
+ GHC: [mi_warns] :: ModIface_ (phase :: ModIfacePhase) -> Warnings
- GHC: defaultObjectTarget :: Platform -> HscTarget
+ GHC: defaultObjectTarget :: DynFlags -> HscTarget
- GHCi: [MkConInfoTable] :: Int -> Int -> Int -> Int -> [Word8] -> Message (RemotePtr StgInfoTable)
+ GHCi: [MkConInfoTable] :: Int -> Int -> Int -> Int -> ByteString -> Message (RemotePtr StgInfoTable)
- GhcPlugins: TyCoMapper :: Bool -> (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyCoVar -> ArgFlag -> m (env, TyCoVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
+ GhcPlugins: TyCoMapper :: (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyCoVar -> ArgFlag -> m (env, TyCoVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
- GhcPlugins: infixr 3 `mkFunTy`
+ GhcPlugins: infixr 3 `mkInvisFunTy`
- GhcPlugins: isPredTy :: Type -> Bool
+ GhcPlugins: isPredTy :: HasDebugCallStack => Type -> Bool
- GhcPlugins: mkAnonBinder :: Type -> TyCoBinder
+ GhcPlugins: mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder
- GhcPlugins: substCo :: Subst -> Coercion -> Coercion
+ GhcPlugins: substCo :: HasCallStack => Subst -> Coercion -> Coercion
- HieDebug: diffAst :: (Outputable a, Eq a) => Diff a -> Diff (HieAST a)
+ HieDebug: diffAst :: (Outputable a, Eq a, Ord a) => Diff a -> Diff (HieAST a)
- HieDebug: diffAsts :: (Outputable a, Eq a) => Diff a -> Diff (Map FastString (HieAST a))
+ HieDebug: diffAsts :: (Outputable a, Eq a, Ord a) => Diff a -> Diff (Map FastString (HieAST a))
- HieDebug: normalizeIdents :: NodeIdentifiers a -> [(DiffIdent, IdentifierDetails a)]
+ HieDebug: normalizeIdents :: Ord a => NodeIdentifiers a -> [(DiffIdent, IdentifierDetails a)]
- HieDebug: validateScopes :: Map FastString (HieAST a) -> [SDoc]
+ HieDebug: validateScopes :: Module -> Map FastString (HieAST a) -> [SDoc]
- Hoopl.Block: type family IndexedCO ex a b :: *
+ Hoopl.Block: type family IndexedCO (ex :: Extensibility) (a :: k) (b :: k) :: k
- Hoopl.Dataflow: type family Fact x f :: *
+ Hoopl.Dataflow: type family Fact (x :: Extensibility) f :: *
- Hoopl.Graph: data Graph' block (n :: * -> * -> *) e x
+ Hoopl.Graph: data Graph' block (n :: Extensibility -> Extensibility -> *) e x
- HscMain: HscNotGeneratingCode :: HscStatus
+ HscMain: HscNotGeneratingCode :: ModIface -> HscStatus
- HscMain: HscRecomp :: CgGuts -> ModSummary -> HscStatus
+ HscMain: HscRecomp :: CgGuts -> !ModLocation -> !PartialModIface -> !Maybe Fingerprint -> !DynFlags -> HscStatus
- HscMain: HscUpToDate :: HscStatus
+ HscMain: HscUpToDate :: ModIface -> HscStatus
- HscMain: HscUpdateBoot :: HscStatus
+ HscMain: HscUpdateBoot :: ModIface -> HscStatus
- HscMain: HscUpdateSig :: HscStatus
+ HscMain: HscUpdateSig :: ModIface -> HscStatus
- HscMain: hscGenHardCode :: HscEnv -> CgGuts -> ModSummary -> FilePath -> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)])
+ HscMain: hscGenHardCode :: HscEnv -> CgGuts -> ModLocation -> FilePath -> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)])
- HscMain: hscIncrementalCompile :: Bool -> Maybe TcGblEnv -> Maybe Messager -> HscEnv -> ModSummary -> SourceModified -> Maybe ModIface -> (Int, Int) -> IO (HscStatus, HomeModInfo)
+ HscMain: hscIncrementalCompile :: Bool -> Maybe TcGblEnv -> Maybe Messager -> HscEnv -> ModSummary -> SourceModified -> Maybe ModIface -> (Int, Int) -> IO (HscStatus, ModDetails, DynFlags)
- HscMain: hscInteractive :: HscEnv -> CgGuts -> ModSummary -> IO (Maybe FilePath, CompiledByteCode, [SptEntry])
+ HscMain: hscInteractive :: HscEnv -> CgGuts -> ModLocation -> IO (Maybe FilePath, CompiledByteCode, [SptEntry])
- HscMain: hscSimpleIface' :: TcGblEnv -> Maybe Fingerprint -> Hsc (ModIface, Bool, ModDetails)
+ HscMain: hscSimpleIface' :: TcGblEnv -> Maybe Fingerprint -> Hsc (ModIface, Maybe Fingerprint, ModDetails)
- HscTypes: HscEnv :: DynFlags -> [Target] -> ModuleGraph -> InteractiveContext -> HomePackageTable -> {-# UNPACK #-} !IORef ExternalPackageState -> {-# UNPACK #-} !IORef NameCache -> {-# UNPACK #-} !IORef FinderCache -> Maybe (Module, IORef TypeEnv) -> MVar (Maybe IServ) -> HscEnv
+ HscTypes: HscEnv :: DynFlags -> [Target] -> ModuleGraph -> InteractiveContext -> HomePackageTable -> {-# UNPACK #-} !IORef ExternalPackageState -> {-# UNPACK #-} !IORef NameCache -> {-# UNPACK #-} !IORef FinderCache -> Maybe (Module, IORef TypeEnv) -> MVar (Maybe IServ) -> DynLinker -> HscEnv
- HscTypes: HscNotGeneratingCode :: HscStatus
+ HscTypes: HscNotGeneratingCode :: ModIface -> HscStatus
- HscTypes: HscRecomp :: CgGuts -> ModSummary -> HscStatus
+ HscTypes: HscRecomp :: CgGuts -> !ModLocation -> !PartialModIface -> !Maybe Fingerprint -> !DynFlags -> HscStatus
- HscTypes: HscUpToDate :: HscStatus
+ HscTypes: HscUpToDate :: ModIface -> HscStatus
- HscTypes: HscUpdateBoot :: HscStatus
+ HscTypes: HscUpdateBoot :: ModIface -> HscStatus
- HscTypes: HscUpdateSig :: HscStatus
+ HscTypes: HscUpdateSig :: ModIface -> HscStatus
- HscTypes: ModIface :: !Module -> !Maybe Module -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !Fingerprint -> !WhetherHasOrphans -> !WhetherHasFamInst -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Fingerprint -> !Bool -> [(OccName, Fixity)] -> Warnings -> [IfaceAnnotation] -> [(Fingerprint, IfaceDecl)] -> !Maybe GlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !Fingerprint -> (OccName -> Maybe WarningTxt) -> (OccName -> Maybe Fixity) -> (OccName -> Maybe (OccName, Fingerprint)) -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> [IfaceCompleteMatch] -> Maybe HsDocString -> DeclDocMap -> ArgDocMap -> ModIface
+ HscTypes: ModIface :: !Module -> !Maybe Module -> !HscSource -> Dependencies -> [Usage] -> ![IfaceExport] -> !Bool -> [(OccName, Fixity)] -> Warnings -> [IfaceAnnotation] -> [IfaceDeclExts phase] -> !Maybe GlobalRdrEnv -> [IfaceClsInst] -> [IfaceFamInst] -> [IfaceRule] -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> [IfaceCompleteMatch] -> Maybe HsDocString -> DeclDocMap -> ArgDocMap -> !IfaceBackendExts phase -> ModIface_ (phase :: ModIfacePhase)
- HscTypes: [mi_anns] :: ModIface -> [IfaceAnnotation]
+ HscTypes: [mi_anns] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceAnnotation]
- HscTypes: [mi_arg_docs] :: ModIface -> ArgDocMap
+ HscTypes: [mi_arg_docs] :: ModIface_ (phase :: ModIfacePhase) -> ArgDocMap
- HscTypes: [mi_complete_sigs] :: ModIface -> [IfaceCompleteMatch]
+ HscTypes: [mi_complete_sigs] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceCompleteMatch]
- HscTypes: [mi_decl_docs] :: ModIface -> DeclDocMap
+ HscTypes: [mi_decl_docs] :: ModIface_ (phase :: ModIfacePhase) -> DeclDocMap
- HscTypes: [mi_decls] :: ModIface -> [(Fingerprint, IfaceDecl)]
+ HscTypes: [mi_decls] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceDeclExts phase]
- HscTypes: [mi_deps] :: ModIface -> Dependencies
+ HscTypes: [mi_deps] :: ModIface_ (phase :: ModIfacePhase) -> Dependencies
- HscTypes: [mi_doc_hdr] :: ModIface -> Maybe HsDocString
+ HscTypes: [mi_doc_hdr] :: ModIface_ (phase :: ModIfacePhase) -> Maybe HsDocString
- HscTypes: [mi_exp_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_exp_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_exports] :: ModIface -> ![IfaceExport]
+ HscTypes: [mi_exports] :: ModIface_ (phase :: ModIfacePhase) -> ![IfaceExport]
- HscTypes: [mi_fam_insts] :: ModIface -> [IfaceFamInst]
+ HscTypes: [mi_fam_insts] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceFamInst]
- HscTypes: [mi_finsts] :: ModIface -> !WhetherHasFamInst
+ HscTypes: [mi_finsts] :: ModIfaceBackend -> !WhetherHasFamInst
- HscTypes: [mi_fix_fn] :: ModIface -> OccName -> Maybe Fixity
+ HscTypes: [mi_fix_fn] :: ModIfaceBackend -> !OccName -> Maybe Fixity
- HscTypes: [mi_fixities] :: ModIface -> [(OccName, Fixity)]
+ HscTypes: [mi_fixities] :: ModIface_ (phase :: ModIfacePhase) -> [(OccName, Fixity)]
- HscTypes: [mi_flag_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_flag_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_globals] :: ModIface -> !Maybe GlobalRdrEnv
+ HscTypes: [mi_globals] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe GlobalRdrEnv
- HscTypes: [mi_hash_fn] :: ModIface -> OccName -> Maybe (OccName, Fingerprint)
+ HscTypes: [mi_hash_fn] :: ModIfaceBackend -> !OccName -> Maybe (OccName, Fingerprint)
- HscTypes: [mi_hpc] :: ModIface -> !AnyHpcUsage
+ HscTypes: [mi_hpc] :: ModIface_ (phase :: ModIfacePhase) -> !AnyHpcUsage
- HscTypes: [mi_hpc_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_hpc_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_hsc_src] :: ModIface -> !HscSource
+ HscTypes: [mi_hsc_src] :: ModIface_ (phase :: ModIfacePhase) -> !HscSource
- HscTypes: [mi_iface_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_iface_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_insts] :: ModIface -> [IfaceClsInst]
+ HscTypes: [mi_insts] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceClsInst]
- HscTypes: [mi_mod_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_mod_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_module] :: ModIface -> !Module
+ HscTypes: [mi_module] :: ModIface_ (phase :: ModIfacePhase) -> !Module
- HscTypes: [mi_opt_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_opt_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_orphan] :: ModIface -> !WhetherHasOrphans
+ HscTypes: [mi_orphan] :: ModIfaceBackend -> !WhetherHasOrphans
- HscTypes: [mi_orphan_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_orphan_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_plugin_hash] :: ModIface -> !Fingerprint
+ HscTypes: [mi_plugin_hash] :: ModIfaceBackend -> !Fingerprint
- HscTypes: [mi_rules] :: ModIface -> [IfaceRule]
+ HscTypes: [mi_rules] :: ModIface_ (phase :: ModIfacePhase) -> [IfaceRule]
- HscTypes: [mi_sig_of] :: ModIface -> !Maybe Module
+ HscTypes: [mi_sig_of] :: ModIface_ (phase :: ModIfacePhase) -> !Maybe Module
- HscTypes: [mi_trust] :: ModIface -> !IfaceTrustInfo
+ HscTypes: [mi_trust] :: ModIface_ (phase :: ModIfacePhase) -> !IfaceTrustInfo
- HscTypes: [mi_trust_pkg] :: ModIface -> !Bool
+ HscTypes: [mi_trust_pkg] :: ModIface_ (phase :: ModIfacePhase) -> !Bool
- HscTypes: [mi_usages] :: ModIface -> [Usage]
+ HscTypes: [mi_usages] :: ModIface_ (phase :: ModIfacePhase) -> [Usage]
- HscTypes: [mi_used_th] :: ModIface -> !Bool
+ HscTypes: [mi_used_th] :: ModIface_ (phase :: ModIfacePhase) -> !Bool
- HscTypes: [mi_warn_fn] :: ModIface -> OccName -> Maybe WarningTxt
+ HscTypes: [mi_warn_fn] :: ModIfaceBackend -> !OccName -> Maybe WarningTxt
- HscTypes: [mi_warns] :: ModIface -> Warnings
+ HscTypes: [mi_warns] :: ModIface_ (phase :: ModIfacePhase) -> Warnings
- HscTypes: lookupIfaceByModule :: DynFlags -> HomePackageTable -> PackageIfaceTable -> Module -> Maybe ModIface
+ HscTypes: lookupIfaceByModule :: HomePackageTable -> PackageIfaceTable -> Module -> Maybe ModIface
- HscTypes: mi_semantic_module :: ModIface -> Module
+ HscTypes: mi_semantic_module :: ModIface_ a -> Module
- HscTypes: throwOneError :: MonadIO m => ErrMsg -> m ab
+ HscTypes: throwOneError :: MonadIO io => ErrMsg -> io a
- IfaceType: IfaceFunTy :: IfaceType -> IfaceType -> IfaceType
+ IfaceType: IfaceFunTy :: AnonArgFlag -> IfaceType -> IfaceType -> IfaceType
- IfaceType: pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc
+ IfaceType: pprIfaceTvBndr :: IfaceTvBndr -> SuppressBndrSig -> UseBndrParens -> SDoc
- IfaceType: pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc
+ IfaceType: pprIfaceTyConBinders :: SuppressBndrSig -> [IfaceTyConBinder] -> SDoc
- Inst: newMethodFromName :: CtOrigin -> Name -> TcRhoType -> TcM (HsExpr GhcTcId)
+ Inst: newMethodFromName :: CtOrigin -> Name -> [TcRhoType] -> TcM (HsExpr GhcTcId)
- Lexer: PFailed :: (DynFlags -> Messages) -> SrcSpan -> MsgDoc -> ParseResult a
+ Lexer: PFailed :: PState -> ParseResult a
- Lexer: addAnnotation :: SrcSpan -> AnnKeywordId -> SrcSpan -> P ()
+ Lexer: addAnnotation :: MonadP m => SrcSpan -> AnnKeywordId -> SrcSpan -> m ()
- Lexer: addAnnsAt :: SrcSpan -> [AddAnn] -> P ()
+ Lexer: addAnnsAt :: MonadP m => SrcSpan -> [AddAnn] -> m ()
- Lexer: addWarning :: WarningFlag -> SrcSpan -> SDoc -> P ()
+ Lexer: addWarning :: MonadP m => WarningFlag -> SrcSpan -> SDoc -> m ()
- Lexer: getBit :: ExtBits -> P Bool
+ Lexer: getBit :: MonadP m => ExtBits -> m Bool
- Linker: deleteFromLinkEnv :: [Name] -> IO ()
+ Linker: deleteFromLinkEnv :: DynLinker -> [Name] -> IO ()
- Linker: extendLinkEnv :: [(Name, ForeignHValue)] -> IO ()
+ Linker: extendLinkEnv :: DynLinker -> [(Name, ForeignHValue)] -> IO ()
- Linker: extendLoadedPkgs :: [InstalledUnitId] -> IO ()
+ Linker: extendLoadedPkgs :: DynLinker -> [InstalledUnitId] -> IO ()
- Linker: showLinkerState :: DynFlags -> IO ()
+ Linker: showLinkerState :: DynLinker -> DynFlags -> IO ()
- Linker: withExtendedLinkEnv :: ExceptionMonad m => [(Name, ForeignHValue)] -> m a -> m a
+ Linker: withExtendedLinkEnv :: ExceptionMonad m => DynLinker -> [(Name, ForeignHValue)] -> m a -> m a
- ListSetOps: unionLists :: (Outputable a, Eq a) => [a] -> [a] -> [a]
+ ListSetOps: unionLists :: (HasDebugCallStack, Outputable a, Eq a) => [a] -> [a] -> [a]
- LlvmCodeGen: llvmCodeGen :: DynFlags -> Handle -> UniqSupply -> Stream IO RawCmmGroup () -> IO ()
+ LlvmCodeGen: llvmCodeGen :: DynFlags -> Handle -> Stream IO RawCmmGroup a -> IO a
- LlvmCodeGen.Base: runLlvm :: DynFlags -> LlvmVersion -> BufHandle -> UniqSupply -> LlvmM () -> IO ()
+ LlvmCodeGen.Base: runLlvm :: DynFlags -> LlvmVersion -> BufHandle -> LlvmM a -> IO a
- MkIface: mkIfaceTc :: HscEnv -> Maybe Fingerprint -> SafeHaskellMode -> ModDetails -> TcGblEnv -> IO (ModIface, Bool)
+ MkIface: mkIfaceTc :: HscEnv -> SafeHaskellMode -> ModDetails -> TcGblEnv -> IO ModIface
- MonadUtils: foldlM :: Monad m => (a -> b -> m a) -> a -> [b] -> m a
+ MonadUtils: foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- MonadUtils: foldlM_ :: Monad m => (a -> b -> m a) -> a -> [b] -> m ()
+ MonadUtils: foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m ()
- MonadUtils: foldrM :: Monad m => (b -> a -> m a) -> a -> [b] -> m a
+ MonadUtils: foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
- NCGMonad: NcgImpl :: (RawCmmDecl -> NatM [NatCmmDecl statics instr]) -> (instr -> Maybe (NatCmmDecl statics instr)) -> (jumpDest -> Maybe BlockId) -> (instr -> Maybe jumpDest) -> ((BlockId -> Maybe jumpDest) -> statics -> statics) -> ((BlockId -> Maybe jumpDest) -> instr -> instr) -> (NatCmmDecl statics instr -> SDoc) -> Int -> [RealReg] -> ([NatCmmDecl statics instr] -> [NatCmmDecl statics instr]) -> ([NatCmmDecl statics instr] -> [NatCmmDecl statics instr]) -> (Int -> NatCmmDecl statics instr -> UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])) -> (LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> ([instr] -> [UnwindPoint]) -> (Maybe CFG -> LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> NcgImpl statics instr jumpDest
+ NCGMonad: NcgImpl :: (RawCmmDecl -> NatM [NatCmmDecl statics instr]) -> (instr -> Maybe (NatCmmDecl statics instr)) -> (jumpDest -> Maybe BlockId) -> (instr -> Maybe jumpDest) -> ((BlockId -> Maybe jumpDest) -> statics -> statics) -> ((BlockId -> Maybe jumpDest) -> instr -> instr) -> (NatCmmDecl statics instr -> SDoc) -> Int -> [RealReg] -> ([NatCmmDecl statics instr] -> [NatCmmDecl statics instr]) -> (Int -> NatCmmDecl statics instr -> UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])) -> (LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> ([instr] -> [UnwindPoint]) -> (Maybe CFG -> LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> NcgImpl statics instr jumpDest
- NCGMonad: addImmediateSuccessorNat :: HasDebugCallStack => BlockId -> BlockId -> NatM ()
+ NCGMonad: addImmediateSuccessorNat :: BlockId -> BlockId -> NatM ()
- NameSet: type DefUses = [DefUse]
+ NameSet: type DefUses = OrdList DefUse
- Outputable: warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a
+ Outputable: warnPprTrace :: HasCallStack => Bool -> String -> Int -> SDoc -> a -> a
- PPC.Instr: BCTR :: [Maybe BlockId] -> Maybe CLabel -> Instr
+ PPC.Instr: BCTR :: [Maybe BlockId] -> Maybe CLabel -> [Reg] -> Instr
- PPC.Instr: JMP :: CLabel -> Instr
+ PPC.Instr: JMP :: CLabel -> [Reg] -> Instr
- Parser: parseExpression :: P (LHsExpr GhcPs)
+ Parser: parseExpression :: P ECP
- Parser: parsePattern :: P (LPat GhcPs)
+ Parser: parsePattern :: P (Located (Pat (GhcPass 'Parsed)))
- PipelineMonad: PipeState :: HscEnv -> Maybe ModLocation -> [FilePath] -> PipeState
+ PipelineMonad: PipeState :: HscEnv -> Maybe ModLocation -> [FilePath] -> Maybe ModIface -> PipeState
- PipelineMonad: evalP :: CompPipeline a -> PipeEnv -> PipeState -> IO a
+ PipelineMonad: evalP :: CompPipeline a -> PipeEnv -> PipeState -> IO (PipeState, a)
- PlatformConstants: PlatformConstants :: () -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Bool -> Bool -> Int -> Integer -> Integer -> Integer -> PlatformConstants
+ PlatformConstants: PlatformConstants :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Bool -> Bool -> Int -> Integer -> Integer -> Integer -> PlatformConstants
- Plugins: Plugin :: CorePlugin -> TcPlugin -> ([CommandLineOption] -> IO PluginRecompile) -> ([CommandLineOption] -> ModSummary -> HsParsedModule -> Hsc HsParsedModule) -> ([CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)) -> ([CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv) -> ([CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)) -> (forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface) -> Plugin
+ Plugins: Plugin :: CorePlugin -> TcPlugin -> HoleFitPlugin -> ([CommandLineOption] -> DynFlags -> IO DynFlags) -> ([CommandLineOption] -> IO PluginRecompile) -> ([CommandLineOption] -> ModSummary -> HsParsedModule -> Hsc HsParsedModule) -> ([CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)) -> ([CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv) -> ([CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)) -> (forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface) -> Plugin
- PprBase: pprASCII :: [Word8] -> SDoc
+ PprBase: pprASCII :: ByteString -> SDoc
- RdrHsSyn: Sum :: ConTag -> Arity -> LHsExpr GhcPs -> SumOrTuple
+ RdrHsSyn: Sum :: ConTag -> Arity -> Located b -> SumOrTuple b
- RdrHsSyn: Tuple :: [LHsTupArg GhcPs] -> SumOrTuple
+ RdrHsSyn: Tuple :: [Located (Maybe (Located b))] -> SumOrTuple b
- RdrHsSyn: checkMonadComp :: P (HsStmtContext Name)
+ RdrHsSyn: checkMonadComp :: PV (HsStmtContext Name)
- RdrHsSyn: checkPattern :: SDoc -> LHsExpr GhcPs -> P (LPat GhcPs)
+ RdrHsSyn: checkPattern :: Located (PatBuilder GhcPs) -> P (LPat GhcPs)
- RdrHsSyn: checkRecordSyntax :: Outputable a => Located a -> P (Located a)
+ RdrHsSyn: checkRecordSyntax :: (MonadP m, Outputable a) => Located a -> m (Located a)
- RdrHsSyn: checkValDef :: SDoc -> SrcStrictness -> LHsExpr GhcPs -> Maybe (LHsType GhcPs) -> Located (a, GRHSs GhcPs (LHsExpr GhcPs)) -> P ([AddAnn], HsBind GhcPs)
+ RdrHsSyn: checkValDef :: SrcStrictness -> Located (PatBuilder GhcPs) -> Maybe (LHsType GhcPs) -> Located (a, GRHSs GhcPs (LHsExpr GhcPs)) -> P ([AddAnn], HsBind GhcPs)
- RdrHsSyn: data SumOrTuple
+ RdrHsSyn: data SumOrTuple b
- RdrHsSyn: hintBangPat :: SrcSpan -> HsExpr GhcPs -> P ()
+ RdrHsSyn: hintBangPat :: SrcSpan -> PatBuilder GhcPs -> PV ()
- RdrHsSyn: mkRecConstrOrUpdate :: LHsExpr GhcPs -> SrcSpan -> ([LHsRecField GhcPs (LHsExpr GhcPs)], Bool) -> P (HsExpr GhcPs)
+ RdrHsSyn: mkRecConstrOrUpdate :: LHsExpr GhcPs -> SrcSpan -> ([LHsRecField GhcPs (LHsExpr GhcPs)], Maybe SrcSpan) -> PV (HsExpr GhcPs)
- RdrHsSyn: placeHolderPunRhs :: LHsExpr GhcPs
+ RdrHsSyn: placeHolderPunRhs :: DisambECP b => PV (Located b)
- RegAlloc.Liveness: LiveInfo :: LabelMap CmmStatics -> [BlockId] -> Maybe (BlockMap RegSet) -> BlockMap IntSet -> LiveInfo
+ RegAlloc.Liveness: LiveInfo :: LabelMap CmmStatics -> [BlockId] -> BlockMap RegSet -> BlockMap IntSet -> LiveInfo
- RnNames: reportUnusedNames :: Maybe (Located [LIE GhcPs]) -> TcGblEnv -> RnM ()
+ RnNames: reportUnusedNames :: TcGblEnv -> RnM ()
- RnTypes: extractDataDefnKindVars :: HsDataDefn GhcPs -> [Located RdrName]
+ RnTypes: extractDataDefnKindVars :: HsDataDefn GhcPs -> FreeKiTyVarsNoDups
- RnTypes: extractHsTyRdrTyVarsKindVars :: LHsType GhcPs -> [Located RdrName]
+ RnTypes: extractHsTyRdrTyVarsKindVars :: LHsType GhcPs -> FreeKiTyVarsNoDups
- RnTypes: rnHsSigType :: HsDocContext -> LHsSigType GhcPs -> RnM (LHsSigType GhcRn, FreeVars)
+ RnTypes: rnHsSigType :: HsDocContext -> TypeOrKind -> LHsSigType GhcPs -> RnM (LHsSigType GhcRn, FreeVars)
- SMRep: type ConstrDescription = [Word8]
+ SMRep: type ConstrDescription = ByteString
- StgSyn: StgFCallOp :: ForeignCall -> Unique -> StgOp
+ StgSyn: StgFCallOp :: ForeignCall -> Type -> StgOp
- SysTools.Tasks: runCc :: DynFlags -> [Option] -> IO ()
+ SysTools.Tasks: runCc :: Maybe ForeignSrcLang -> DynFlags -> [Option] -> IO ()
- TcAnnotations: annCtxt :: OutputableBndrId (GhcPass p) => AnnDecl (GhcPass p) -> SDoc
+ TcAnnotations: annCtxt :: OutputableBndrId p => AnnDecl (GhcPass p) -> SDoc
- TcDeriv: DerivInfo :: TyCon -> [LHsDerivingClause GhcRn] -> SDoc -> DerivInfo
+ TcDeriv: DerivInfo :: TyCon -> ![(Name, TyVar)] -> [LHsDerivingClause GhcRn] -> SDoc -> DerivInfo
- TcDerivUtils: DS :: SrcSpan -> Name -> [TyVar] -> theta -> Class -> [Type] -> TyCon -> Maybe OverlapMode -> Maybe SrcSpan -> DerivSpecMechanism -> DerivSpec theta
+ TcDerivUtils: DS :: SrcSpan -> Name -> [TyVar] -> theta -> Class -> [Type] -> Maybe OverlapMode -> Maybe SrcSpan -> DerivSpecMechanism -> DerivSpec theta
- TcDerivUtils: DerivEnv :: Maybe OverlapMode -> [TyVar] -> Class -> [Type] -> TyCon -> [Type] -> TyCon -> [Type] -> DerivContext -> Maybe (DerivStrategy GhcTc) -> DerivEnv
+ TcDerivUtils: DerivEnv :: Maybe OverlapMode -> [TyVar] -> Class -> [Type] -> DerivContext -> Maybe (DerivStrategy GhcTc) -> DerivEnv
- TcDerivUtils: DerivSpecNewtype :: Type -> DerivSpecMechanism
+ TcDerivUtils: DerivSpecNewtype :: DerivInstTys -> Type -> DerivSpecMechanism
- TcDerivUtils: DerivSpecStock :: (SrcSpan -> TyCon -> [Type] -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name])) -> DerivSpecMechanism
+ TcDerivUtils: DerivSpecStock :: DerivInstTys -> (SrcSpan -> TyCon -> [Type] -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name])) -> DerivSpecMechanism
- TcDerivUtils: DerivSpecVia :: Type -> DerivSpecMechanism
+ TcDerivUtils: DerivSpecVia :: [Type] -> Type -> Type -> DerivSpecMechanism
- TcEnv: pprInstInfoDetails :: OutputableBndrId (GhcPass a) => InstInfo (GhcPass a) -> SDoc
+ TcEnv: pprInstInfoDetails :: OutputableBndrId a => InstInfo (GhcPass a) -> SDoc
- TcEnv: tcExtendLocalTypeEnv :: TcLclEnv -> [(Name, TcTyThing)] -> TcM TcLclEnv
+ TcEnv: tcExtendLocalTypeEnv :: TcLclEnv -> [(Name, TcTyThing)] -> TcLclEnv
- TcHoleErrors: tcCheckHoleFit :: Cts -> [Implication] -> TcSigmaType -> TcSigmaType -> TcM (Bool, HsWrapper)
+ TcHoleErrors: tcCheckHoleFit :: TypedHole -> TcSigmaType -> TcSigmaType -> TcM (Bool, HsWrapper)
- TcHoleErrors: tcFilterHoleFits :: Maybe Int -> [Implication] -> [Ct] -> (TcType, [TcTyVar]) -> [HoleFitCandidate] -> TcM (Bool, [HoleFit])
+ TcHoleErrors: tcFilterHoleFits :: Maybe Int -> TypedHole -> (TcType, [TcTyVar]) -> [HoleFitCandidate] -> TcM (Bool, [HoleFit])
- TcHsSyn: hsLPatType :: OutPat GhcTc -> Type
+ TcHsSyn: hsLPatType :: LPat GhcTc -> Type
- TcHsSyn: initZonkEnv :: (ZonkEnv -> a -> TcM b) -> a -> TcM b
+ TcHsSyn: initZonkEnv :: (ZonkEnv -> TcM b) -> TcM b
- TcHsType: tcDerivStrategy :: forall a. Maybe (DerivStrategy GhcRn) -> TcM ([TyVar], a) -> TcM (Maybe (DerivStrategy GhcTc), [TyVar], a)
+ TcHsType: tcDerivStrategy :: Maybe (LDerivStrategy GhcRn) -> TcM (Maybe (LDerivStrategy GhcTc), [TyVar])
- TcHsType: tcHsDeriv :: LHsSigType GhcRn -> TcM ([TyVar], (Class, [Type], [Kind]))
+ TcHsType: tcHsDeriv :: LHsSigType GhcRn -> TcM ([TyVar], Class, [Type], [Kind])
- TcHsType: tcHsPartialSigType :: UserTypeCtxt -> LHsSigWcType GhcRn -> TcM ([(Name, TcTyVar)], Maybe TcType, [Name], [TcTyVar], TcThetaType, TcType)
+ TcHsType: tcHsPartialSigType :: UserTypeCtxt -> LHsSigWcType GhcRn -> TcM ([(Name, TcTyVar)], Maybe TcType, [(Name, TcTyVar)], TcThetaType, TcType)
- TcHsType: tcInferApps :: TcTyMode -> LHsType GhcRn -> TcType -> TcKind -> [LHsTypeArg GhcRn] -> TcM (TcType, TcKind)
+ TcHsType: tcInferApps :: TcTyMode -> LHsType GhcRn -> TcType -> [LHsTypeArg GhcRn] -> TcM (TcType, TcKind)
- TcInstDcls: tcInstDeclsDeriv :: [DerivInfo] -> [LTyClDecl GhcRn] -> [LDerivDecl GhcRn] -> TcM (TcGblEnv, [InstInfo GhcRn], HsValBinds GhcRn)
+ TcInstDcls: tcInstDeclsDeriv :: [DerivInfo] -> [LDerivDecl GhcRn] -> TcM (TcGblEnv, [InstInfo GhcRn], HsValBinds GhcRn)
- TcMType: quantifyTyVars :: TcTyCoVarSet -> CandidatesQTvs -> TcM [TcTyVar]
+ TcMType: quantifyTyVars :: CandidatesQTvs -> TcM [TcTyVar]
- TcMatches: tcMatchesFun :: Located Name -> MatchGroup GhcRn (LHsExpr GhcRn) -> ExpRhoType -> TcM (HsWrapper, MatchGroup GhcTcId (LHsExpr GhcTcId))
+ TcMatches: tcMatchesFun :: Located Name -> MatchGroup GhcRn (LHsExpr GhcRn) -> ExpSigmaType -> TcM (HsWrapper, MatchGroup GhcTcId (LHsExpr GhcTcId))
- TcRnDriver: tcRnType :: HscEnv -> Bool -> LHsType GhcPs -> IO (Messages, Maybe (Type, Kind))
+ TcRnDriver: tcRnType :: HscEnv -> ZonkFlexi -> Bool -> LHsType GhcPs -> IO (Messages, Maybe (Type, Kind))
- TcRnTypes: DsLclEnv :: DsMetaEnv -> RealSrcSpan -> Bag EvVar -> Bag SimpleEq -> IORef Int -> DsLclEnv
+ TcRnTypes: DsLclEnv :: DsMetaEnv -> RealSrcSpan -> Delta -> DsLclEnv
- TcRnTypes: Env :: !HscEnv -> {-# UNPACK #-} !IORef UniqSupply -> gbl -> lcl -> Env gbl lcl
+ TcRnTypes: Env :: !HscEnv -> !Char -> gbl -> lcl -> Env gbl lcl
- TcRnTypes: TcGblEnv :: Module -> Module -> HscSource -> GlobalRdrEnv -> Maybe [Type] -> FixityEnv -> RecFieldEnv -> TypeEnv -> TcRef TypeEnv -> !InstEnv -> !FamInstEnv -> AnnEnv -> [AvailInfo] -> ImportAvails -> DefUses -> TcRef [GlobalRdrElt] -> TcRef NameSet -> TcRef Bool -> TcRef Bool -> TcRef (Set RealSrcSpan) -> TcRef OccSet -> [(Module, Fingerprint)] -> Maybe [(Located (IE GhcRn), Avails)] -> [LImportDecl GhcRn] -> Maybe (HsGroup GhcRn) -> TcRef [FilePath] -> TcRef [LHsDecl GhcPs] -> TcRef [(ForeignSrcLang, FilePath)] -> TcRef NameSet -> TcRef [(TcLclEnv, ThModFinalizers)] -> TcRef [String] -> TcRef (Map TypeRep Dynamic) -> TcRef (Maybe (ForeignRef (IORef QState))) -> Bag EvBind -> Maybe Id -> LHsBinds GhcTc -> NameSet -> [LTcSpecPrag] -> Warnings -> [Annotation] -> [TyCon] -> [ClsInst] -> [FamInst] -> [LRuleDecl GhcTc] -> [LForeignDecl GhcTc] -> [PatSyn] -> Maybe LHsDocString -> !AnyHpcUsage -> SelfBootInfo -> Maybe Name -> TcRef (Bool, WarningMessages) -> [TcPluginSolver] -> RealSrcSpan -> TcRef WantedConstraints -> [CompleteMatch] -> TcRef CostCentreState -> TcGblEnv
+ TcRnTypes: TcGblEnv :: Module -> Module -> HscSource -> GlobalRdrEnv -> Maybe [Type] -> FixityEnv -> RecFieldEnv -> TypeEnv -> TcRef TypeEnv -> !InstEnv -> !FamInstEnv -> AnnEnv -> [AvailInfo] -> ImportAvails -> DefUses -> TcRef [GlobalRdrElt] -> TcRef NameSet -> TcRef Bool -> TcRef Bool -> TcRef (Set RealSrcSpan) -> TcRef OccSet -> [(Module, Fingerprint)] -> Maybe [(Located (IE GhcRn), Avails)] -> [LImportDecl GhcRn] -> Maybe (HsGroup GhcRn) -> TcRef [FilePath] -> TcRef [LHsDecl GhcPs] -> TcRef [(ForeignSrcLang, FilePath)] -> TcRef NameSet -> TcRef [(TcLclEnv, ThModFinalizers)] -> TcRef [String] -> TcRef (Map TypeRep Dynamic) -> TcRef (Maybe (ForeignRef (IORef QState))) -> Bag EvBind -> Maybe Id -> LHsBinds GhcTc -> NameSet -> [LTcSpecPrag] -> Warnings -> [Annotation] -> [TyCon] -> [ClsInst] -> [FamInst] -> [LRuleDecl GhcTc] -> [LForeignDecl GhcTc] -> [PatSyn] -> Maybe LHsDocString -> !AnyHpcUsage -> SelfBootInfo -> Maybe Name -> TcRef (Bool, WarningMessages) -> [TcPluginSolver] -> [HoleFitPlugin] -> RealSrcSpan -> TcRef WantedConstraints -> [CompleteMatch] -> TcRef CostCentreState -> TcGblEnv
- TcRnTypes: TcLclEnv :: RealSrcSpan -> [ErrCtxt] -> TcLevel -> ThStage -> ThBindEnv -> ArrowCtxt -> LocalRdrEnv -> TcTypeEnv -> TcBinderStack -> TcRef TcTyVarSet -> TcRef WantedConstraints -> TcRef Messages -> TcLclEnv
+ TcRnTypes: TcLclEnv :: RealSrcSpan -> [ErrCtxt] -> TcLevel -> ThStage -> ThBindEnv -> ArrowCtxt -> LocalRdrEnv -> TcTypeEnv -> TcBinderStack -> TcRef WantedConstraints -> TcRef Messages -> TcLclEnv
- TcRnTypes: getRoleAnnots :: [Name] -> RoleAnnotEnv -> ([LRoleAnnotDecl GhcRn], RoleAnnotEnv)
+ TcRnTypes: getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn]
- TcSMonad: addSolvedDict :: CtEvidence -> Class -> [Type] -> TcS ()
+ TcSMonad: addSolvedDict :: InstanceWhat -> CtEvidence -> Class -> [Type] -> TcS ()
- TcSMonad: insertSafeOverlapFailureTcS :: Ct -> TcS ()
+ TcSMonad: insertSafeOverlapFailureTcS :: InstanceWhat -> Ct -> TcS ()
- TcSMonad: matchFam :: TyCon -> [Type] -> TcS (Maybe (Coercion, TcType))
+ TcSMonad: matchFam :: TyCon -> [Type] -> TcS (Maybe (CoercionN, TcType))
- TcSMonad: matchFamTcM :: TyCon -> [Type] -> TcM (Maybe (Coercion, TcType))
+ TcSMonad: matchFamTcM :: TyCon -> [Type] -> TcM (Maybe (CoercionN, TcType))
- TcTyClsDecls: tcConDecls :: KnotTied TyCon -> [KnotTied TyConBinder] -> KnotTied Type -> [LConDecl GhcRn] -> TcM [DataCon]
+ TcTyClsDecls: tcConDecls :: KnotTied TyCon -> NewOrData -> [TyConBinder] -> TcKind -> KnotTied Type -> [LConDecl GhcRn] -> TcM [DataCon]
- TcType: infixr 3 `mkFunTy`
+ TcType: infixr 3 `mkInvisFunTy`
- TcType: isPredTy :: Type -> Bool
+ TcType: isPredTy :: HasDebugCallStack => Type -> Bool
- TcType: tcEqTypeVis :: TcType -> TcType -> Maybe Bool
+ TcType: tcEqTypeVis :: TcType -> TcType -> Bool
- TcUnify: matchExpectedFunKind :: Outputable fun => fun -> TcKind -> TcM (Coercion, TcKind, TcKind)
+ TcUnify: matchExpectedFunKind :: Outputable fun => fun -> Arity -> TcKind -> TcM Coercion
- TcUnify: occCheckForErrors :: DynFlags -> TcTyVar -> Type -> OccCheckResult ()
+ TcUnify: occCheckForErrors :: DynFlags -> TcTyVar -> Type -> MetaTyVarUpdateResult ()
- TyCoRep: Anon :: Type -> TyCoBinder
+ TyCoRep: Anon :: AnonArgFlag -> Type -> TyCoBinder
- TyCoRep: FunTy :: Type -> Type -> Type
+ TyCoRep: FunTy :: AnonArgFlag -> Type -> Type -> Type
- TyCoRep: infixr 3 `mkFunTy`
+ TyCoRep: infixr 3 `mkInvisFunTy`
- TyCoRep: mkFunTy :: Type -> Type -> Type
+ TyCoRep: mkFunTy :: AnonArgFlag -> Type -> Type -> Type
- TyCon: AnonTCB :: TyConBndrVis
+ TyCon: AnonTCB :: AnonArgFlag -> TyConBndrVis
- TyCon: NewTyCon :: DataCon -> Type -> ([TyVar], Type) -> CoAxiom Unbranched -> AlgTyConRhs
+ TyCon: NewTyCon :: DataCon -> Type -> ([TyVar], Type) -> CoAxiom Unbranched -> Bool -> AlgTyConRhs
- TyCon: mkAnonTyConBinder :: TyVar -> TyConBinder
+ TyCon: mkAnonTyConBinder :: AnonArgFlag -> TyVar -> TyConBinder
- TyCon: mkAnonTyConBinders :: [TyVar] -> [TyConBinder]
+ TyCon: mkAnonTyConBinders :: AnonArgFlag -> [TyVar] -> [TyConBinder]
- TyCon: mkTcTyCon :: Name -> SDoc -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour -> TyCon
+ TyCon: mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> Bool -> TyConFlavour -> TyCon
- Type: TyCoMapper :: Bool -> (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyCoVar -> ArgFlag -> m (env, TyCoVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
+ Type: TyCoMapper :: (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyCoVar -> ArgFlag -> m (env, TyCoVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
- Type: infixr 3 `mkFunTy`
+ Type: infixr 3 `mkInvisFunTy`
- Type: isPredTy :: Type -> Bool
+ Type: isPredTy :: HasDebugCallStack => Type -> Bool
- Type: mkAnonBinder :: Type -> TyCoBinder
+ Type: mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder

Files

+ GHC/Hs.hs view
@@ -0,0 +1,153 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998++\section{Haskell abstract syntax definition}++This module glues together the pieces of the Haskell abstract syntax,+which is declared in the various \tr{Hs*} modules.  This module,+therefore, is almost nothing but re-exporting.+-}++{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE FlexibleInstances #-} -- For deriving instance Data++module GHC.Hs (+        module GHC.Hs.Binds,+        module GHC.Hs.Decls,+        module GHC.Hs.Expr,+        module GHC.Hs.ImpExp,+        module GHC.Hs.Lit,+        module GHC.Hs.Pat,+        module GHC.Hs.Types,+        module GHC.Hs.Utils,+        module GHC.Hs.Doc,+        module GHC.Hs.PlaceHolder,+        module GHC.Hs.Extension,+        Fixity,++        HsModule(..),+) where++-- friends:+import GhcPrelude++import GHC.Hs.Decls+import GHC.Hs.Binds+import GHC.Hs.Expr+import GHC.Hs.ImpExp+import GHC.Hs.Lit+import GHC.Hs.PlaceHolder+import GHC.Hs.Extension+import GHC.Hs.Pat+import GHC.Hs.Types+import BasicTypes       ( Fixity, WarningTxt )+import GHC.Hs.Utils+import GHC.Hs.Doc+import GHC.Hs.Instances () -- For Data instances++-- others:+import Outputable+import SrcLoc+import Module           ( ModuleName )++-- libraries:+import Data.Data hiding ( Fixity )++-- | Haskell Module+--+-- All we actually declare here is the top-level structure for a module.+data HsModule pass+  = HsModule {+      hsmodName :: Maybe (Located ModuleName),+        -- ^ @Nothing@: \"module X where\" is omitted (in which case the next+        --     field is Nothing too)+      hsmodExports :: Maybe (Located [LIE pass]),+        -- ^ Export list+        --+        --  - @Nothing@: export list omitted, so export everything+        --+        --  - @Just []@: export /nothing/+        --+        --  - @Just [...]@: as you would expect...+        --+        --+        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen'+        --                                   ,'ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation+      hsmodImports :: [LImportDecl pass],+        -- ^ We snaffle interesting stuff out of the imported interfaces early+        -- on, adding that info to TyDecls/etc; so this list is often empty,+        -- downstream.+      hsmodDecls :: [LHsDecl pass],+        -- ^ Type, class, value, and interface signature decls+      hsmodDeprecMessage :: Maybe (Located WarningTxt),+        -- ^ reason\/explanation for warning/deprecation of this module+        --+        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen'+        --                                   ,'ApiAnnotation.AnnClose'+        --++        -- For details on above see note [Api annotations] in ApiAnnotation+      hsmodHaddockModHeader :: Maybe LHsDocString+        -- ^ Haddock module info and description, unparsed+        --+        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen'+        --                                   ,'ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation+   }+     -- ^ 'ApiAnnotation.AnnKeywordId's+     --+     --  - 'ApiAnnotation.AnnModule','ApiAnnotation.AnnWhere'+     --+     --  - 'ApiAnnotation.AnnOpen','ApiAnnotation.AnnSemi',+     --    'ApiAnnotation.AnnClose' for explicit braces and semi around+     --    hsmodImports,hsmodDecls if this style is used.++     -- For details on above see note [Api annotations] in ApiAnnotation+-- deriving instance (DataIdLR name name) => Data (HsModule name)+deriving instance Data (HsModule GhcPs)+deriving instance Data (HsModule GhcRn)+deriving instance Data (HsModule GhcTc)++instance (OutputableBndrId p) => Outputable (HsModule (GhcPass p)) where++    ppr (HsModule Nothing _ imports decls _ mbDoc)+      = pp_mb mbDoc $$ pp_nonnull imports+                    $$ pp_nonnull decls++    ppr (HsModule (Just name) exports imports decls deprec mbDoc)+      = vcat [+            pp_mb mbDoc,+            case exports of+              Nothing -> pp_header (text "where")+              Just es -> vcat [+                           pp_header lparen,+                           nest 8 (fsep (punctuate comma (map ppr (unLoc es)))),+                           nest 4 (text ") where")+                          ],+            pp_nonnull imports,+            pp_nonnull decls+          ]+      where+        pp_header rest = case deprec of+           Nothing -> pp_modname <+> rest+           Just d -> vcat [ pp_modname, ppr d, rest ]++        pp_modname = text "module" <+> ppr name++pp_mb :: Outputable t => Maybe t -> SDoc+pp_mb (Just x) = ppr x+pp_mb Nothing  = empty++pp_nonnull :: Outputable t => [t] -> SDoc+pp_nonnull [] = empty+pp_nonnull xs = vcat (map ppr xs)
+ GHC/Hs/Binds.hs view
@@ -0,0 +1,1310 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998++\section[HsBinds]{Abstract syntax: top-level bindings and signatures}++Datatype for: @BindGroup@, @Bind@, @Sig@, @Bind@.+-}++{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE TypeFamilies #-}++module GHC.Hs.Binds where++import GhcPrelude++import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, LHsExpr,+                                    MatchGroup, pprFunBind,+                                    GRHSs, pprPatBind )+import {-# SOURCE #-} GHC.Hs.Pat  ( LPat )++import GHC.Hs.Extension+import GHC.Hs.Types+import CoreSyn+import TcEvidence+import Type+import NameSet+import BasicTypes+import Outputable+import SrcLoc+import Var+import Bag+import FastString+import BooleanFormula (LBooleanFormula)+import DynFlags++import Data.Data hiding ( Fixity )+import Data.List hiding ( foldr )+import Data.Ord++{-+************************************************************************+*                                                                      *+\subsection{Bindings: @BindGroup@}+*                                                                      *+************************************************************************++Global bindings (where clauses)+-}++-- During renaming, we need bindings where the left-hand sides+-- have been renamed but the right-hand sides have not.+-- the ...LR datatypes are parametrized by two id types,+-- one for the left and one for the right.+-- Other than during renaming, these will be the same.++-- | Haskell Local Bindings+type HsLocalBinds id = HsLocalBindsLR id id++-- | Located Haskell local bindings+type LHsLocalBinds id = Located (HsLocalBinds id)++-- | Haskell Local Bindings with separate Left and Right identifier types+--+-- Bindings in a 'let' expression+-- or a 'where' clause+data HsLocalBindsLR idL idR+  = HsValBinds+        (XHsValBinds idL idR)+        (HsValBindsLR idL idR)+      -- ^ Haskell Value Bindings++         -- There should be no pattern synonyms in the HsValBindsLR+         -- These are *local* (not top level) bindings+         -- The parser accepts them, however, leaving the+         -- renamer to report them++  | HsIPBinds+        (XHsIPBinds idL idR)+        (HsIPBinds idR)+      -- ^ Haskell Implicit Parameter Bindings++  | EmptyLocalBinds (XEmptyLocalBinds idL idR)+      -- ^ Empty Local Bindings++  | XHsLocalBindsLR+        (XXHsLocalBindsLR idL idR)++type instance XHsValBinds      (GhcPass pL) (GhcPass pR) = NoExtField+type instance XHsIPBinds       (GhcPass pL) (GhcPass pR) = NoExtField+type instance XEmptyLocalBinds (GhcPass pL) (GhcPass pR) = NoExtField+type instance XXHsLocalBindsLR (GhcPass pL) (GhcPass pR) = NoExtCon++type LHsLocalBindsLR idL idR = Located (HsLocalBindsLR idL idR)+++-- | Haskell Value Bindings+type HsValBinds id = HsValBindsLR id id++-- | Haskell Value bindings with separate Left and Right identifier types+-- (not implicit parameters)+-- Used for both top level and nested bindings+-- May contain pattern synonym bindings+data HsValBindsLR idL idR+  = -- | Value Bindings In+    --+    -- Before renaming RHS; idR is always RdrName+    -- Not dependency analysed+    -- Recursive by default+    ValBinds+        (XValBinds idL idR)+        (LHsBindsLR idL idR) [LSig idR]++    -- | Value Bindings Out+    --+    -- After renaming RHS; idR can be Name or Id Dependency analysed,+    -- later bindings in the list may depend on earlier ones.+  | XValBindsLR+      (XXValBindsLR idL idR)++-- ---------------------------------------------------------------------+-- Deal with ValBindsOut++-- TODO: make this the only type for ValBinds+data NHsValBindsLR idL+  = NValBinds+      [(RecFlag, LHsBinds idL)]+      [LSig GhcRn]++type instance XValBinds    (GhcPass pL) (GhcPass pR) = NoExtField+type instance XXValBindsLR (GhcPass pL) (GhcPass pR)+            = NHsValBindsLR (GhcPass pL)++-- ---------------------------------------------------------------------++-- | Located Haskell Binding+type LHsBind  id = LHsBindLR  id id++-- | Located Haskell Bindings+type LHsBinds id = LHsBindsLR id id++-- | Haskell Binding+type HsBind   id = HsBindLR   id id++-- | Located Haskell Bindings with separate Left and Right identifier types+type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)++-- | Located Haskell Binding with separate Left and Right identifier types+type LHsBindLR  idL idR = Located (HsBindLR idL idR)++{- Note [FunBind vs PatBind]+   ~~~~~~~~~~~~~~~~~~~~~~~~~+The distinction between FunBind and PatBind is a bit subtle. FunBind covers+patterns which resemble function bindings and simple variable bindings.++    f x = e+    f !x = e+    f = e+    !x = e          -- FunRhs has SrcStrict+    x `f` y = e     -- FunRhs has Infix++The actual patterns and RHSs of a FunBind are encoding in fun_matches.+The m_ctxt field of each Match in fun_matches will be FunRhs and carries+two bits of information about the match,++  * The mc_fixity field on each Match describes the fixity of the+    function binder in that match.  E.g. this is legal:+         f True False  = e1+         True `f` True = e2++  * The mc_strictness field is used /only/ for nullary FunBinds: ones+    with one Match, which has no pats. For these, it describes whether+    the match is decorated with a bang (e.g. `!x = e`).++By contrast, PatBind represents data constructor patterns, as well as a few+other interesting cases. Namely,++    Just x = e+    (x) = e+    x :: Ty = e+-}++-- | Haskell Binding with separate Left and Right id's+data HsBindLR idL idR+  = -- | Function-like Binding+    --+    -- FunBind is used for both functions     @f x = e@+    -- and variables                          @f = \x -> e@+    -- and strict variables                   @!x = x + 1@+    --+    -- Reason 1: Special case for type inference: see 'TcBinds.tcMonoBinds'.+    --+    -- Reason 2: Instance decls can only have FunBinds, which is convenient.+    --           If you change this, you'll need to change e.g. rnMethodBinds+    --+    -- But note that the form                 @f :: a->a = ...@+    -- parses as a pattern binding, just like+    --                                        @(f :: a -> a) = ... @+    --+    -- Strict bindings have their strictness recorded in the 'SrcStrictness' of their+    -- 'MatchContext'. See Note [FunBind vs PatBind] for+    -- details about the relationship between FunBind and PatBind.+    --+    --  'ApiAnnotation.AnnKeywordId's+    --+    --  - 'ApiAnnotation.AnnFunId', attached to each element of fun_matches+    --+    --  - 'ApiAnnotation.AnnEqual','ApiAnnotation.AnnWhere',+    --    'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',++    -- For details on above see note [Api annotations] in ApiAnnotation+    FunBind {++        fun_ext :: XFunBind idL idR, -- ^ After the renamer, this contains+                                --  the locally-bound+                                -- free variables of this defn.+                                -- See Note [Bind free vars]++        fun_id :: Located (IdP idL), -- Note [fun_id in Match] in GHC.Hs.Expr++        fun_matches :: MatchGroup idR (LHsExpr idR),  -- ^ The payload++        fun_co_fn :: HsWrapper, -- ^ Coercion from the type of the MatchGroup to the type of+                                -- the Id.  Example:+                                --+                                -- @+                                --      f :: Int -> forall a. a -> a+                                --      f x y = y+                                -- @+                                --+                                -- Then the MatchGroup will have type (Int -> a' -> a')+                                -- (with a free type variable a').  The coercion will take+                                -- a CoreExpr of this type and convert it to a CoreExpr of+                                -- type         Int -> forall a'. a' -> a'+                                -- Notice that the coercion captures the free a'.++        fun_tick :: [Tickish Id] -- ^ Ticks to put on the rhs, if any+    }++  -- | Pattern Binding+  --+  -- The pattern is never a simple variable;+  -- That case is done by FunBind.+  -- See Note [FunBind vs PatBind] for details about the+  -- relationship between FunBind and PatBind.++  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnBang',+  --       'ApiAnnotation.AnnEqual','ApiAnnotation.AnnWhere',+  --       'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',++  -- For details on above see note [Api annotations] in ApiAnnotation+  | PatBind {+        pat_ext    :: XPatBind idL idR, -- ^ See Note [Bind free vars]+        pat_lhs    :: LPat idL,+        pat_rhs    :: GRHSs idR (LHsExpr idR),+        pat_ticks  :: ([Tickish Id], [[Tickish Id]])+               -- ^ Ticks to put on the rhs, if any, and ticks to put on+               -- the bound variables.+    }++  -- | Variable Binding+  --+  -- Dictionary binding and suchlike.+  -- All VarBinds are introduced by the type checker+  | VarBind {+        var_ext    :: XVarBind idL idR,+        var_id     :: IdP idL,+        var_rhs    :: LHsExpr idR,   -- ^ Located only for consistency+        var_inline :: Bool           -- ^ True <=> inline this binding regardless+                                     -- (used for implication constraints only)+    }++  -- | Abstraction Bindings+  | AbsBinds {                      -- Binds abstraction; TRANSLATION+        abs_ext     :: XAbsBinds idL idR,+        abs_tvs     :: [TyVar],+        abs_ev_vars :: [EvVar],  -- ^ Includes equality constraints++       -- | AbsBinds only gets used when idL = idR after renaming,+       -- but these need to be idL's for the collect... code in HsUtil+       -- to have the right type+        abs_exports :: [ABExport idL],++        -- | Evidence bindings+        -- Why a list? See TcInstDcls+        -- Note [Typechecking plan for instance declarations]+        abs_ev_binds :: [TcEvBinds],++        -- | Typechecked user bindings+        abs_binds    :: LHsBinds idL,++        abs_sig :: Bool  -- See Note [The abs_sig field of AbsBinds]+    }++  -- | Patterns Synonym Binding+  | PatSynBind+        (XPatSynBind idL idR)+        (PatSynBind idL idR)+        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',+        --          'ApiAnnotation.AnnLarrow','ApiAnnotation.AnnEqual',+        --          'ApiAnnotation.AnnWhere'+        --          'ApiAnnotation.AnnOpen' @'{'@,'ApiAnnotation.AnnClose' @'}'@++        -- For details on above see note [Api annotations] in ApiAnnotation++  | XHsBindsLR (XXHsBindsLR idL idR)++data NPatBindTc = NPatBindTc {+     pat_fvs :: NameSet, -- ^ Free variables+     pat_rhs_ty :: Type  -- ^ Type of the GRHSs+     } deriving Data++type instance XFunBind    (GhcPass pL) GhcPs = NoExtField+type instance XFunBind    (GhcPass pL) GhcRn = NameSet -- Free variables+type instance XFunBind    (GhcPass pL) GhcTc = NameSet -- Free variables++type instance XPatBind    GhcPs (GhcPass pR) = NoExtField+type instance XPatBind    GhcRn (GhcPass pR) = NameSet -- Free variables+type instance XPatBind    GhcTc (GhcPass pR) = NPatBindTc++type instance XVarBind    (GhcPass pL) (GhcPass pR) = NoExtField+type instance XAbsBinds   (GhcPass pL) (GhcPass pR) = NoExtField+type instance XPatSynBind (GhcPass pL) (GhcPass pR) = NoExtField+type instance XXHsBindsLR (GhcPass pL) (GhcPass pR) = NoExtCon+++        -- Consider (AbsBinds tvs ds [(ftvs, poly_f, mono_f) binds]+        --+        -- Creates bindings for (polymorphic, overloaded) poly_f+        -- in terms of monomorphic, non-overloaded mono_f+        --+        -- Invariants:+        --      1. 'binds' binds mono_f+        --      2. ftvs is a subset of tvs+        --      3. ftvs includes all tyvars free in ds+        --+        -- See Note [AbsBinds]++-- | Abtraction Bindings Export+data ABExport p+  = ABE { abe_ext       :: XABE p+        , abe_poly      :: IdP p -- ^ Any INLINE pragma is attached to this Id+        , abe_mono      :: IdP p+        , abe_wrap      :: HsWrapper    -- ^ See Note [ABExport wrapper]+             -- Shape: (forall abs_tvs. abs_ev_vars => abe_mono) ~ abe_poly+        , abe_prags     :: TcSpecPrags  -- ^ SPECIALISE pragmas+        }+   | XABExport (XXABExport p)++type instance XABE       (GhcPass p) = NoExtField+type instance XXABExport (GhcPass p) = NoExtCon+++-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',+--             'ApiAnnotation.AnnEqual','ApiAnnotation.AnnLarrow'+--             'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpen' @'{'@,+--             'ApiAnnotation.AnnClose' @'}'@,++-- For details on above see note [Api annotations] in ApiAnnotation++-- | Pattern Synonym binding+data PatSynBind idL idR+  = PSB { psb_ext  :: XPSB idL idR,            -- ^ Post renaming, FVs.+                                               -- See Note [Bind free vars]+          psb_id   :: Located (IdP idL),       -- ^ Name of the pattern synonym+          psb_args :: HsPatSynDetails (Located (IdP idR)),+                                               -- ^ Formal parameter names+          psb_def  :: LPat idR,                -- ^ Right-hand side+          psb_dir  :: HsPatSynDir idR          -- ^ Directionality+     }+   | XPatSynBind (XXPatSynBind idL idR)++type instance XPSB         (GhcPass idL) GhcPs = NoExtField+type instance XPSB         (GhcPass idL) GhcRn = NameSet+type instance XPSB         (GhcPass idL) GhcTc = NameSet++type instance XXPatSynBind (GhcPass idL) (GhcPass idR) = NoExtCon++{-+Note [AbsBinds]+~~~~~~~~~~~~~~~+The AbsBinds constructor is used in the output of the type checker, to+record *typechecked* and *generalised* bindings.  Specifically++         AbsBinds { abs_tvs      = tvs+                  , abs_ev_vars  = [d1,d2]+                  , abs_exports  = [ABE { abe_poly = fp, abe_mono = fm+                                        , abe_wrap = fwrap }+                                    ABE { slly for g } ]+                  , abs_ev_binds = DBINDS+                  , abs_binds    = BIND[fm,gm] }++where 'BIND' binds the monomorphic Ids 'fm' and 'gm', means++        fp = fwrap [/\ tvs. \d1 d2. letrec { DBINDS        ]+                   [                       ; BIND[fm,gm] } ]+                   [                 in fm                 ]++        gp = ...same again, with gm instead of fm++The 'fwrap' is an impedence-matcher that typically does nothing; see+Note [ABExport wrapper].++This is a pretty bad translation, because it duplicates all the bindings.+So the desugarer tries to do a better job:++        fp = /\ [a,b] -> \ [d1,d2] -> case tp [a,b] [d1,d2] of+                                        (fm,gm) -> fm+        ..ditto for gp..++        tp = /\ [a,b] -> \ [d1,d2] -> letrec { DBINDS; BIND }+                                      in (fm,gm)++In general:++  * abs_tvs are the type variables over which the binding group is+    generalised+  * abs_ev_var are the evidence variables (usually dictionaries)+    over which the binding group is generalised+  * abs_binds are the monomorphic bindings+  * abs_ex_binds are the evidence bindings that wrap the abs_binds+  * abs_exports connects the monomorphic Ids bound by abs_binds+    with the polymorphic Ids bound by the AbsBinds itself.++For example, consider a module M, with this top-level binding, where+there is no type signature for M.reverse,+    M.reverse []     = []+    M.reverse (x:xs) = M.reverse xs ++ [x]++In Hindley-Milner, a recursive binding is typechecked with the+*recursive* uses being *monomorphic*.  So after typechecking *and*+desugaring we will get something like this++    M.reverse :: forall a. [a] -> [a]+      = /\a. letrec+                reverse :: [a] -> [a] = \xs -> case xs of+                                                []     -> []+                                                (x:xs) -> reverse xs ++ [x]+             in reverse++Notice that 'M.reverse' is polymorphic as expected, but there is a local+definition for plain 'reverse' which is *monomorphic*.  The type variable+'a' scopes over the entire letrec.++That's after desugaring.  What about after type checking but before+desugaring?  That's where AbsBinds comes in.  It looks like this:++   AbsBinds { abs_tvs     = [a]+            , abs_ev_vars = []+            , abs_exports = [ABE { abe_poly = M.reverse :: forall a. [a] -> [a],+                                 , abe_mono = reverse :: [a] -> [a]}]+            , abs_ev_binds = {}+            , abs_binds = { reverse :: [a] -> [a]+                               = \xs -> case xs of+                                            []     -> []+                                            (x:xs) -> reverse xs ++ [x] } }++Here,++  * abs_tvs says what type variables are abstracted over the binding+    group, just 'a' in this case.+  * abs_binds is the *monomorphic* bindings of the group+  * abs_exports describes how to get the polymorphic Id 'M.reverse'+    from the monomorphic one 'reverse'++Notice that the *original* function (the polymorphic one you thought+you were defining) appears in the abe_poly field of the+abs_exports. The bindings in abs_binds are for fresh, local, Ids with+a *monomorphic* Id.++If there is a group of mutually recursive (see Note [Polymorphic+recursion]) functions without type signatures, we get one AbsBinds+with the monomorphic versions of the bindings in abs_binds, and one+element of abe_exports for each variable bound in the mutually+recursive group.  This is true even for pattern bindings.  Example:+        (f,g) = (\x -> x, f)+After type checking we get+   AbsBinds { abs_tvs     = [a]+            , abs_exports = [ ABE { abe_poly = M.f :: forall a. a -> a+                                  , abe_mono = f :: a -> a }+                            , ABE { abe_poly = M.g :: forall a. a -> a+                                  , abe_mono = g :: a -> a }]+            , abs_binds = { (f,g) = (\x -> x, f) }++Note [Polymorphic recursion]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+   Rec { f x = ...(g ef)...++       ; g :: forall a. [a] -> [a]+       ; g y = ...(f eg)...  }++These bindings /are/ mutually recursive (f calls g, and g calls f).+But we can use the type signature for g to break the recursion,+like this:++  1. Add g :: forall a. [a] -> [a] to the type environment++  2. Typecheck the definition of f, all by itself,+     including generalising it to find its most general+     type, say f :: forall b. b -> b -> [b]++  3. Extend the type environment with that type for f++  4. Typecheck the definition of g, all by itself,+     checking that it has the type claimed by its signature++Steps 2 and 4 each generate a separate AbsBinds, so we end+up with+   Rec { AbsBinds { ...for f ... }+       ; AbsBinds { ...for g ... } }++This approach allows both f and to call each other+polymorphically, even though only g has a signature.++We get an AbsBinds that encompasses multiple source-program+bindings only when+ * Each binding in the group has at least one binder that+   lacks a user type signature+ * The group forms a strongly connected component+++Note [The abs_sig field of AbsBinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The abs_sig field supports a couple of special cases for bindings.+Consider++  x :: Num a => (# a, a #)+  x = (# 3, 4 #)++The general desugaring for AbsBinds would give++  x = /\a. \ ($dNum :: Num a) ->+      letrec xm = (# fromInteger $dNum 3, fromInteger $dNum 4 #) in+      xm++But that has an illegal let-binding for an unboxed tuple.  In this+case we'd prefer to generate the (more direct)++  x = /\ a. \ ($dNum :: Num a) ->+     (# fromInteger $dNum 3, fromInteger $dNum 4 #)++A similar thing happens with representation-polymorphic defns+(#11405):++  undef :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a+  undef = error "undef"++Again, the vanilla desugaring gives a local let-binding for a+representation-polymorphic (undefm :: a), which is illegal.  But+again we can desugar without a let:++  undef = /\ a. \ (d:HasCallStack) -> error a d "undef"++The abs_sig field supports this direct desugaring, with no local+let-bining.  When abs_sig = True++ * the abs_binds is single FunBind++ * the abs_exports is a singleton++ * we have a complete type sig for binder+   and hence the abs_binds is non-recursive+   (it binds the mono_id but refers to the poly_id++These properties are exploited in DsBinds.dsAbsBinds to+generate code without a let-binding.++Note [ABExport wrapper]+~~~~~~~~~~~~~~~~~~~~~~~+Consider+   (f,g) = (\x.x, \y.y)+This ultimately desugars to something like this:+   tup :: forall a b. (a->a, b->b)+   tup = /\a b. (\x:a.x, \y:b.y)+   f :: forall a. a -> a+   f = /\a. case tup a Any of+               (fm::a->a,gm:Any->Any) -> fm+   ...similarly for g...++The abe_wrap field deals with impedance-matching between+    (/\a b. case tup a b of { (f,g) -> f })+and the thing we really want, which may have fewer type+variables.  The action happens in TcBinds.mkExport.++Note [Bind free vars]+~~~~~~~~~~~~~~~~~~~~~+The bind_fvs field of FunBind and PatBind records the free variables+of the definition.  It is used for the following purposes++a) Dependency analysis prior to type checking+    (see TcBinds.tc_group)++b) Deciding whether we can do generalisation of the binding+    (see TcBinds.decideGeneralisationPlan)++c) Deciding whether the binding can be used in static forms+    (see TcExpr.checkClosedInStaticForm for the HsStatic case and+     TcBinds.isClosedBndrGroup).++Specifically,++  * bind_fvs includes all free vars that are defined in this module+    (including top-level things and lexically scoped type variables)++  * bind_fvs excludes imported vars; this is just to keep the set smaller++  * Before renaming, and after typechecking, the field is unused;+    it's just an error thunk+-}++instance (OutputableBndrId pl, OutputableBndrId pr)+        => Outputable (HsLocalBindsLR (GhcPass pl) (GhcPass pr)) where+  ppr (HsValBinds _ bs)   = ppr bs+  ppr (HsIPBinds _ bs)    = ppr bs+  ppr (EmptyLocalBinds _) = empty+  ppr (XHsLocalBindsLR x) = ppr x++instance (OutputableBndrId pl, OutputableBndrId pr)+        => Outputable (HsValBindsLR (GhcPass pl) (GhcPass pr)) where+  ppr (ValBinds _ binds sigs)+   = pprDeclList (pprLHsBindsForUser binds sigs)++  ppr (XValBindsLR (NValBinds sccs sigs))+    = getPprStyle $ \ sty ->+      if debugStyle sty then    -- Print with sccs showing+        vcat (map ppr sigs) $$ vcat (map ppr_scc sccs)+     else+        pprDeclList (pprLHsBindsForUser (unionManyBags (map snd sccs)) sigs)+   where+     ppr_scc (rec_flag, binds) = pp_rec rec_flag <+> pprLHsBinds binds+     pp_rec Recursive    = text "rec"+     pp_rec NonRecursive = text "nonrec"++pprLHsBinds :: (OutputableBndrId idL, OutputableBndrId idR)+            => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc+pprLHsBinds binds+  | isEmptyLHsBinds binds = empty+  | otherwise = pprDeclList (map ppr (bagToList binds))++pprLHsBindsForUser :: (OutputableBndrId idL,+                       OutputableBndrId idR,+                       OutputableBndrId id2)+     => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]+--  pprLHsBindsForUser is different to pprLHsBinds because+--  a) No braces: 'let' and 'where' include a list of HsBindGroups+--     and we don't want several groups of bindings each+--     with braces around+--  b) Sort by location before printing+--  c) Include signatures+pprLHsBindsForUser binds sigs+  = map snd (sort_by_loc decls)+  where++    decls :: [(SrcSpan, SDoc)]+    decls = [(loc, ppr sig)  | L loc sig <- sigs] +++            [(loc, ppr bind) | L loc bind <- bagToList binds]++    sort_by_loc decls = sortBy (comparing fst) decls++pprDeclList :: [SDoc] -> SDoc   -- Braces with a space+-- Print a bunch of declarations+-- One could choose  { d1; d2; ... }, using 'sep'+-- or      d1+--         d2+--         ..+--    using vcat+-- At the moment we chose the latter+-- Also we do the 'pprDeeperList' thing.+pprDeclList ds = pprDeeperList vcat ds++------------+emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)+emptyLocalBinds = EmptyLocalBinds noExtField++-- AZ:These functions do not seem to be used at all?+isEmptyLocalBindsTc :: HsLocalBindsLR (GhcPass a) GhcTc -> Bool+isEmptyLocalBindsTc (HsValBinds _ ds)   = isEmptyValBinds ds+isEmptyLocalBindsTc (HsIPBinds _ ds)    = isEmptyIPBindsTc ds+isEmptyLocalBindsTc (EmptyLocalBinds _) = True+isEmptyLocalBindsTc (XHsLocalBindsLR _) = True++isEmptyLocalBindsPR :: HsLocalBindsLR (GhcPass a) (GhcPass b) -> Bool+isEmptyLocalBindsPR (HsValBinds _ ds)   = isEmptyValBinds ds+isEmptyLocalBindsPR (HsIPBinds _ ds)    = isEmptyIPBindsPR ds+isEmptyLocalBindsPR (EmptyLocalBinds _) = True+isEmptyLocalBindsPR (XHsLocalBindsLR _) = True++eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool+eqEmptyLocalBinds (EmptyLocalBinds _) = True+eqEmptyLocalBinds _                   = False++isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool+isEmptyValBinds (ValBinds _ ds sigs)  = isEmptyLHsBinds ds && null sigs+isEmptyValBinds (XValBindsLR (NValBinds ds sigs)) = null ds && null sigs++emptyValBindsIn, emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)+emptyValBindsIn  = ValBinds noExtField emptyBag []+emptyValBindsOut = XValBindsLR (NValBinds [] [])++emptyLHsBinds :: LHsBindsLR idL idR+emptyLHsBinds = emptyBag++isEmptyLHsBinds :: LHsBindsLR idL idR -> Bool+isEmptyLHsBinds = isEmptyBag++------------+plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)+               -> HsValBinds(GhcPass a)+plusHsValBinds (ValBinds _ ds1 sigs1) (ValBinds _ ds2 sigs2)+  = ValBinds noExtField (ds1 `unionBags` ds2) (sigs1 ++ sigs2)+plusHsValBinds (XValBindsLR (NValBinds ds1 sigs1))+               (XValBindsLR (NValBinds ds2 sigs2))+  = XValBindsLR (NValBinds (ds1 ++ ds2) (sigs1 ++ sigs2))+plusHsValBinds _ _+  = panic "HsBinds.plusHsValBinds"++instance (OutputableBndrId pl, OutputableBndrId pr)+         => Outputable (HsBindLR (GhcPass pl) (GhcPass pr)) where+    ppr mbind = ppr_monobind mbind++ppr_monobind :: (OutputableBndrId idL, OutputableBndrId idR)+             => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc++ppr_monobind (PatBind { pat_lhs = pat, pat_rhs = grhss })+  = pprPatBind pat grhss+ppr_monobind (VarBind { var_id = var, var_rhs = rhs })+  = sep [pprBndr CasePatBind var, nest 2 $ equals <+> pprExpr (unLoc rhs)]+ppr_monobind (FunBind { fun_id = fun,+                        fun_co_fn = wrap,+                        fun_matches = matches,+                        fun_tick = ticks })+  = pprTicks empty (if null ticks then empty+                    else text "-- ticks = " <> ppr ticks)+    $$  whenPprDebug (pprBndr LetBind (unLoc fun))+    $$  pprFunBind  matches+    $$  whenPprDebug (ppr wrap)+ppr_monobind (PatSynBind _ psb) = ppr psb+ppr_monobind (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dictvars+                       , abs_exports = exports, abs_binds = val_binds+                       , abs_ev_binds = ev_binds })+  = sdocWithDynFlags $ \ dflags ->+    if gopt Opt_PrintTypecheckerElaboration dflags then+      -- Show extra information (bug number: #10662)+      hang (text "AbsBinds" <+> brackets (interpp'SP tyvars)+                                    <+> brackets (interpp'SP dictvars))+         2 $ braces $ vcat+      [ text "Exports:" <+>+          brackets (sep (punctuate comma (map ppr exports)))+      , text "Exported types:" <+>+          vcat [pprBndr LetBind (abe_poly ex) | ex <- exports]+      , text "Binds:" <+> pprLHsBinds val_binds+      , text "Evidence:" <+> ppr ev_binds ]+    else+      pprLHsBinds val_binds+ppr_monobind (XHsBindsLR x) = ppr x++instance OutputableBndrId p => Outputable (ABExport (GhcPass p)) where+  ppr (ABE { abe_wrap = wrap, abe_poly = gbl, abe_mono = lcl, abe_prags = prags })+    = vcat [ ppr gbl <+> text "<=" <+> ppr lcl+           , nest 2 (pprTcSpecPrags prags)+           , nest 2 (text "wrap:" <+> ppr wrap)]+  ppr (XABExport x) = ppr x++instance (OutputableBndrId l, OutputableBndrId r,+         Outputable (XXPatSynBind (GhcPass l) (GhcPass r)))+          => Outputable (PatSynBind (GhcPass l) (GhcPass r)) where+  ppr (PSB{ psb_id = (L _ psyn), psb_args = details, psb_def = pat,+            psb_dir = dir })+      = ppr_lhs <+> ppr_rhs+    where+      ppr_lhs = text "pattern" <+> ppr_details+      ppr_simple syntax = syntax <+> ppr pat++      ppr_details = case details of+          InfixCon v1 v2 -> hsep [ppr v1, pprInfixOcc psyn, ppr v2]+          PrefixCon vs   -> hsep (pprPrefixOcc psyn : map ppr vs)+          RecCon vs      -> pprPrefixOcc psyn+                            <> braces (sep (punctuate comma (map ppr vs)))++      ppr_rhs = case dir of+          Unidirectional           -> ppr_simple (text "<-")+          ImplicitBidirectional    -> ppr_simple equals+          ExplicitBidirectional mg -> ppr_simple (text "<-") <+> ptext (sLit "where") $$+                                      (nest 2 $ pprFunBind mg)+  ppr (XPatSynBind x) = ppr x++pprTicks :: SDoc -> SDoc -> SDoc+-- Print stuff about ticks only when -dppr-debug is on, to avoid+-- them appearing in error messages (from the desugarer); see # 3263+-- Also print ticks in dumpStyle, so that -ddump-hpc actually does+-- something useful.+pprTicks pp_no_debug pp_when_debug+  = getPprStyle (\ sty -> if debugStyle sty || dumpStyle sty+                             then pp_when_debug+                             else pp_no_debug)++{-+************************************************************************+*                                                                      *+                Implicit parameter bindings+*                                                                      *+************************************************************************+-}++-- | Haskell Implicit Parameter Bindings+data HsIPBinds id+  = IPBinds+        (XIPBinds id)+        [LIPBind id]+        -- TcEvBinds       -- Only in typechecker output; binds+        --                 -- uses of the implicit parameters+  | XHsIPBinds (XXHsIPBinds id)++type instance XIPBinds       GhcPs = NoExtField+type instance XIPBinds       GhcRn = NoExtField+type instance XIPBinds       GhcTc = TcEvBinds -- binds uses of the+                                               -- implicit parameters+++type instance XXHsIPBinds    (GhcPass p) = NoExtCon++isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool+isEmptyIPBindsPR (IPBinds _ is) = null is+isEmptyIPBindsPR (XHsIPBinds _) = True++isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool+isEmptyIPBindsTc (IPBinds ds is) = null is && isEmptyTcEvBinds ds+isEmptyIPBindsTc (XHsIPBinds _) = True++-- | Located Implicit Parameter Binding+type LIPBind id = Located (IPBind id)+-- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a+--   list++-- For details on above see note [Api annotations] in ApiAnnotation++-- | Implicit parameter bindings.+--+-- These bindings start off as (Left "x") in the parser and stay+-- that way until after type-checking when they are replaced with+-- (Right d), where "d" is the name of the dictionary holding the+-- evidence for the implicit parameter.+--+-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual'++-- For details on above see note [Api annotations] in ApiAnnotation+data IPBind id+  = IPBind+        (XCIPBind id)+        (Either (Located HsIPName) (IdP id))+        (LHsExpr id)+  | XIPBind (XXIPBind id)++type instance XCIPBind    (GhcPass p) = NoExtField+type instance XXIPBind    (GhcPass p) = NoExtCon++instance OutputableBndrId p+       => Outputable (HsIPBinds (GhcPass p)) where+  ppr (IPBinds ds bs) = pprDeeperList vcat (map ppr bs)+                        $$ whenPprDebug (ppr ds)+  ppr (XHsIPBinds x) = ppr x++instance OutputableBndrId p => Outputable (IPBind (GhcPass p)) where+  ppr (IPBind _ lr rhs) = name <+> equals <+> pprExpr (unLoc rhs)+    where name = case lr of+                   Left (L _ ip) -> pprBndr LetBind ip+                   Right     id  -> pprBndr LetBind id+  ppr (XIPBind x) = ppr x++{-+************************************************************************+*                                                                      *+\subsection{@Sig@: type signatures and value-modifying user pragmas}+*                                                                      *+************************************************************************++It is convenient to lump ``value-modifying'' user-pragmas (e.g.,+``specialise this function to these four types...'') in with type+signatures.  Then all the machinery to move them into place, etc.,+serves for both.+-}++-- | Located Signature+type LSig pass = Located (Sig pass)++-- | Signatures and pragmas+data Sig pass+  =   -- | An ordinary type signature+      --+      -- > f :: Num a => a -> a+      --+      -- After renaming, this list of Names contains the named+      -- wildcards brought into scope by this signature. For a signature+      -- @_ -> _a -> Bool@, the renamer will leave the unnamed wildcard @_@+      -- untouched, and the named wildcard @_a@ is then replaced with+      -- fresh meta vars in the type. Their names are stored in the type+      -- signature that brought them into scope, in this third field to be+      -- more specific.+      --+      --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon',+      --          'ApiAnnotation.AnnComma'++      -- For details on above see note [Api annotations] in ApiAnnotation+    TypeSig+       (XTypeSig pass)+       [Located (IdP pass)]  -- LHS of the signature; e.g.  f,g,h :: blah+       (LHsSigWcType pass)   -- RHS of the signature; can have wildcards++      -- | A pattern synonym type signature+      --+      -- > pattern Single :: () => (Show a) => a -> [a]+      --+      --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',+      --           'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnForall'+      --           'ApiAnnotation.AnnDot','ApiAnnotation.AnnDarrow'++      -- For details on above see note [Api annotations] in ApiAnnotation+  | PatSynSig (XPatSynSig pass) [Located (IdP pass)] (LHsSigType pass)+      -- P :: forall a b. Req => Prov => ty++      -- | A signature for a class method+      --   False: ordinary class-method signature+      --   True:  generic-default class method signature+      -- e.g.   class C a where+      --          op :: a -> a                   -- Ordinary+      --          default op :: Eq a => a -> a   -- Generic default+      -- No wildcards allowed here+      --+      --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDefault',+      --           'ApiAnnotation.AnnDcolon'+  | ClassOpSig (XClassOpSig pass) Bool [Located (IdP pass)] (LHsSigType pass)++        -- | A type signature in generated code, notably the code+        -- generated for record selectors.  We simply record+        -- the desired Id itself, replete with its name, type+        -- and IdDetails.  Otherwise it's just like a type+        -- signature: there should be an accompanying binding+  | IdSig (XIdSig pass) Id++        -- | An ordinary fixity declaration+        --+        -- >     infixl 8 ***+        --+        --+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnInfix',+        --           'ApiAnnotation.AnnVal'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | FixSig (XFixSig pass) (FixitySig pass)++        -- | An inline pragma+        --+        -- > {#- INLINE f #-}+        --+        --  - 'ApiAnnotation.AnnKeywordId' :+        --       'ApiAnnotation.AnnOpen' @'{-\# INLINE'@ and @'['@,+        --       'ApiAnnotation.AnnClose','ApiAnnotation.AnnOpen',+        --       'ApiAnnotation.AnnVal','ApiAnnotation.AnnTilde',+        --       'ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | InlineSig   (XInlineSig pass)+                (Located (IdP pass)) -- Function name+                InlinePragma         -- Never defaultInlinePragma++        -- | A specialisation pragma+        --+        -- > {-# SPECIALISE f :: Int -> Int #-}+        --+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+        --      'ApiAnnotation.AnnOpen' @'{-\# SPECIALISE'@ and @'['@,+        --      'ApiAnnotation.AnnTilde',+        --      'ApiAnnotation.AnnVal',+        --      'ApiAnnotation.AnnClose' @']'@ and @'\#-}'@,+        --      'ApiAnnotation.AnnDcolon'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | SpecSig     (XSpecSig pass)+                (Located (IdP pass)) -- Specialise a function or datatype  ...+                [LHsSigType pass]  -- ... to these types+                InlinePragma       -- The pragma on SPECIALISE_INLINE form.+                                   -- If it's just defaultInlinePragma, then we said+                                   --    SPECIALISE, not SPECIALISE_INLINE++        -- | A specialisation pragma for instance declarations only+        --+        -- > {-# SPECIALISE instance Eq [Int] #-}+        --+        -- (Class tys); should be a specialisation of the+        -- current instance declaration+        --+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+        --      'ApiAnnotation.AnnInstance','ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)+                  -- Note [Pragma source text] in BasicTypes++        -- | A minimal complete definition pragma+        --+        -- > {-# MINIMAL a | (b, c | (d | e)) #-}+        --+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+        --      'ApiAnnotation.AnnVbar','ApiAnnotation.AnnComma',+        --      'ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | MinimalSig (XMinimalSig pass)+               SourceText (LBooleanFormula (Located (IdP pass)))+               -- Note [Pragma source text] in BasicTypes++        -- | A "set cost centre" pragma for declarations+        --+        -- > {-# SCC funName #-}+        --+        -- or+        --+        -- > {-# SCC funName "cost_centre_name" #-}++  | SCCFunSig  (XSCCFunSig pass)+               SourceText      -- Note [Pragma source text] in BasicTypes+               (Located (IdP pass))  -- Function name+               (Maybe (Located StringLiteral))+       -- | A complete match pragma+       --+       -- > {-# COMPLETE C, D [:: T] #-}+       --+       -- Used to inform the pattern match checker about additional+       -- complete matchings which, for example, arise from pattern+       -- synonym definitions.+  | CompleteMatchSig (XCompleteMatchSig pass)+                     SourceText+                     (Located [Located (IdP pass)])+                     (Maybe (Located (IdP pass)))+  | XSig (XXSig pass)++type instance XTypeSig          (GhcPass p) = NoExtField+type instance XPatSynSig        (GhcPass p) = NoExtField+type instance XClassOpSig       (GhcPass p) = NoExtField+type instance XIdSig            (GhcPass p) = NoExtField+type instance XFixSig           (GhcPass p) = NoExtField+type instance XInlineSig        (GhcPass p) = NoExtField+type instance XSpecSig          (GhcPass p) = NoExtField+type instance XSpecInstSig      (GhcPass p) = NoExtField+type instance XMinimalSig       (GhcPass p) = NoExtField+type instance XSCCFunSig        (GhcPass p) = NoExtField+type instance XCompleteMatchSig (GhcPass p) = NoExtField+type instance XXSig             (GhcPass p) = NoExtCon++-- | Located Fixity Signature+type LFixitySig pass = Located (FixitySig pass)++-- | Fixity Signature+data FixitySig pass = FixitySig (XFixitySig pass) [Located (IdP pass)] Fixity+                    | XFixitySig (XXFixitySig pass)++type instance XFixitySig  (GhcPass p) = NoExtField+type instance XXFixitySig (GhcPass p) = NoExtCon++-- | Type checker Specialisation Pragmas+--+-- 'TcSpecPrags' conveys @SPECIALISE@ pragmas from the type checker to the desugarer+data TcSpecPrags+  = IsDefaultMethod     -- ^ Super-specialised: a default method should+                        -- be macro-expanded at every call site+  | SpecPrags [LTcSpecPrag]+  deriving Data++-- | Located Type checker Specification Pragmas+type LTcSpecPrag = Located TcSpecPrag++-- | Type checker Specification Pragma+data TcSpecPrag+  = SpecPrag+        Id+        HsWrapper+        InlinePragma+  -- ^ The Id to be specialised, a wrapper that specialises the+  -- polymorphic function, and inlining spec for the specialised function+  deriving Data++noSpecPrags :: TcSpecPrags+noSpecPrags = SpecPrags []++hasSpecPrags :: TcSpecPrags -> Bool+hasSpecPrags (SpecPrags ps) = not (null ps)+hasSpecPrags IsDefaultMethod = False++isDefaultMethod :: TcSpecPrags -> Bool+isDefaultMethod IsDefaultMethod = True+isDefaultMethod (SpecPrags {})  = False+++isFixityLSig :: LSig name -> Bool+isFixityLSig (L _ (FixSig {})) = True+isFixityLSig _                 = False++isTypeLSig :: LSig name -> Bool  -- Type signatures+isTypeLSig (L _(TypeSig {}))    = True+isTypeLSig (L _(ClassOpSig {})) = True+isTypeLSig (L _(IdSig {}))      = True+isTypeLSig _                    = False++isSpecLSig :: LSig name -> Bool+isSpecLSig (L _(SpecSig {})) = True+isSpecLSig _                 = False++isSpecInstLSig :: LSig name -> Bool+isSpecInstLSig (L _ (SpecInstSig {})) = True+isSpecInstLSig _                      = False++isPragLSig :: LSig name -> Bool+-- Identifies pragmas+isPragLSig (L _ (SpecSig {}))   = True+isPragLSig (L _ (InlineSig {})) = True+isPragLSig (L _ (SCCFunSig {})) = True+isPragLSig (L _ (CompleteMatchSig {})) = True+isPragLSig _                    = False++isInlineLSig :: LSig name -> Bool+-- Identifies inline pragmas+isInlineLSig (L _ (InlineSig {})) = True+isInlineLSig _                    = False++isMinimalLSig :: LSig name -> Bool+isMinimalLSig (L _ (MinimalSig {})) = True+isMinimalLSig _                     = False++isSCCFunSig :: LSig name -> Bool+isSCCFunSig (L _ (SCCFunSig {})) = True+isSCCFunSig _                    = False++isCompleteMatchSig :: LSig name -> Bool+isCompleteMatchSig (L _ (CompleteMatchSig {} )) = True+isCompleteMatchSig _                            = False++hsSigDoc :: Sig name -> SDoc+hsSigDoc (TypeSig {})           = text "type signature"+hsSigDoc (PatSynSig {})         = text "pattern synonym signature"+hsSigDoc (ClassOpSig _ is_deflt _ _)+ | is_deflt                     = text "default type signature"+ | otherwise                    = text "class method signature"+hsSigDoc (IdSig {})             = text "id signature"+hsSigDoc (SpecSig _ _ _ inl)+                                = ppr inl <+> text "pragma"+hsSigDoc (InlineSig _ _ prag)   = ppr (inlinePragmaSpec prag) <+> text "pragma"+hsSigDoc (SpecInstSig _ src _)+                                = pprWithSourceText src empty <+> text "instance pragma"+hsSigDoc (FixSig {})            = text "fixity declaration"+hsSigDoc (MinimalSig {})        = text "MINIMAL pragma"+hsSigDoc (SCCFunSig {})         = text "SCC pragma"+hsSigDoc (CompleteMatchSig {})  = text "COMPLETE pragma"+hsSigDoc (XSig {})              = text "XSIG TTG extension"++{-+Check if signatures overlap; this is used when checking for duplicate+signatures. Since some of the signatures contain a list of names, testing for+equality is not enough -- we have to check if they overlap.+-}++instance OutputableBndrId p => Outputable (Sig (GhcPass p)) where+    ppr sig = ppr_sig sig++ppr_sig :: (OutputableBndrId p) => Sig (GhcPass p) -> SDoc+ppr_sig (TypeSig _ vars ty)  = pprVarSig (map unLoc vars) (ppr ty)+ppr_sig (ClassOpSig _ is_deflt vars ty)+  | is_deflt                 = text "default" <+> pprVarSig (map unLoc vars) (ppr ty)+  | otherwise                = pprVarSig (map unLoc vars) (ppr ty)+ppr_sig (IdSig _ id)         = pprVarSig [id] (ppr (varType id))+ppr_sig (FixSig _ fix_sig)   = ppr fix_sig+ppr_sig (SpecSig _ var ty inl@(InlinePragma { inl_inline = spec }))+  = pragSrcBrackets (inl_src inl) pragmaSrc (pprSpec (unLoc var)+                                             (interpp'SP ty) inl)+    where+      pragmaSrc = case spec of+        NoUserInline -> "{-# SPECIALISE"+        _            -> "{-# SPECIALISE_INLINE"+ppr_sig (InlineSig _ var inl)+  = pragSrcBrackets (inl_src inl) "{-# INLINE"  (pprInline inl+                                   <+> pprPrefixOcc (unLoc var))+ppr_sig (SpecInstSig _ src ty)+  = pragSrcBrackets src "{-# pragma" (text "instance" <+> ppr ty)+ppr_sig (MinimalSig _ src bf)+  = pragSrcBrackets src "{-# MINIMAL" (pprMinimalSig bf)+ppr_sig (PatSynSig _ names sig_ty)+  = text "pattern" <+> pprVarSig (map unLoc names) (ppr sig_ty)+ppr_sig (SCCFunSig _ src fn mlabel)+  = pragSrcBrackets src "{-# SCC" (ppr fn <+> maybe empty ppr mlabel )+ppr_sig (CompleteMatchSig _ src cs mty)+  = pragSrcBrackets src "{-# COMPLETE"+      ((hsep (punctuate comma (map ppr (unLoc cs))))+        <+> opt_sig)+  where+    opt_sig = maybe empty ((\t -> dcolon <+> ppr t) . unLoc) mty+ppr_sig (XSig x) = ppr x++instance OutputableBndrId p+       => Outputable (FixitySig (GhcPass p)) where+  ppr (FixitySig _ names fixity) = sep [ppr fixity, pprops]+    where+      pprops = hsep $ punctuate comma (map (pprInfixOcc . unLoc) names)+  ppr (XFixitySig x) = ppr x++pragBrackets :: SDoc -> SDoc+pragBrackets doc = text "{-#" <+> doc <+> text "#-}"++-- | Using SourceText in case the pragma was spelled differently or used mixed+-- case+pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc+pragSrcBrackets (SourceText src) _   doc = text src <+> doc <+> text "#-}"+pragSrcBrackets NoSourceText     alt doc = text alt <+> doc <+> text "#-}"++pprVarSig :: (OutputableBndr id) => [id] -> SDoc -> SDoc+pprVarSig vars pp_ty = sep [pprvars <+> dcolon, nest 2 pp_ty]+  where+    pprvars = hsep $ punctuate comma (map pprPrefixOcc vars)++pprSpec :: (OutputableBndr id) => id -> SDoc -> InlinePragma -> SDoc+pprSpec var pp_ty inl = pp_inl <+> pprVarSig [var] pp_ty+  where+    pp_inl | isDefaultInlinePragma inl = empty+           | otherwise = pprInline inl++pprTcSpecPrags :: TcSpecPrags -> SDoc+pprTcSpecPrags IsDefaultMethod = text "<default method>"+pprTcSpecPrags (SpecPrags ps)  = vcat (map (ppr . unLoc) ps)++instance Outputable TcSpecPrag where+  ppr (SpecPrag var _ inl)+    = text "SPECIALIZE" <+> pprSpec var (text "<type>") inl++pprMinimalSig :: (OutputableBndr name)+              => LBooleanFormula (Located name) -> SDoc+pprMinimalSig (L _ bf) = ppr (fmap unLoc bf)++{-+************************************************************************+*                                                                      *+\subsection[PatSynBind]{A pattern synonym definition}+*                                                                      *+************************************************************************+-}++-- | Haskell Pattern Synonym Details+type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg]++-- See Note [Record PatSyn Fields]+-- | Record Pattern Synonym Field+data RecordPatSynField a+  = RecordPatSynField {+      recordPatSynSelectorId :: a  -- Selector name visible in rest of the file+      , recordPatSynPatVar :: a+      -- Filled in by renamer, the name used internally+      -- by the pattern+      } deriving (Data, Functor)++++{-+Note [Record PatSyn Fields]++Consider the following two pattern synonyms.++pattern P x y = ([x,True], [y,'v'])+pattern Q{ x, y } =([x,True], [y,'v'])++In P, we just have two local binders, x and y.++In Q, we have local binders but also top-level record selectors+x :: ([Bool], [Char]) -> Bool and similarly for y.++It would make sense to support record-like syntax++pattern Q{ x=x1, y=y1 } = ([x1,True], [y1,'v'])++when we have a different name for the local and top-level binder+the distinction between the two names clear++-}+instance Outputable a => Outputable (RecordPatSynField a) where+    ppr (RecordPatSynField { recordPatSynSelectorId = v }) = ppr v++instance Foldable RecordPatSynField  where+    foldMap f (RecordPatSynField { recordPatSynSelectorId = visible+                                 , recordPatSynPatVar = hidden })+      = f visible `mappend` f hidden++instance Traversable RecordPatSynField where+    traverse f (RecordPatSynField { recordPatSynSelectorId =visible+                                  , recordPatSynPatVar = hidden })+      = (\ sel_id pat_var -> RecordPatSynField { recordPatSynSelectorId = sel_id+                                               , recordPatSynPatVar = pat_var })+          <$> f visible <*> f hidden+++-- | Haskell Pattern Synonym Direction+data HsPatSynDir id+  = Unidirectional+  | ImplicitBidirectional+  | ExplicitBidirectional (MatchGroup id (LHsExpr id))
+ GHC/Hs/Decls.hs view
@@ -0,0 +1,2449 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+-}++{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable,+             DeriveTraversable #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE TypeFamilies #-}++-- | Abstract syntax of global declarations.+--+-- Definitions for: @SynDecl@ and @ConDecl@, @ClassDecl@,+-- @InstDecl@, @DefaultDecl@ and @ForeignDecl@.+module GHC.Hs.Decls (+  -- * Toplevel declarations+  HsDecl(..), LHsDecl, HsDataDefn(..), HsDeriving, LHsFunDep,+  HsDerivingClause(..), LHsDerivingClause, NewOrData(..), newOrDataToFlavour,+  StandaloneKindSig(..), LStandaloneKindSig, standaloneKindSigName,++  -- ** Class or type declarations+  TyClDecl(..), LTyClDecl, DataDeclRn(..),+  TyClGroup(..),+  tyClGroupTyClDecls, tyClGroupInstDecls, tyClGroupRoleDecls,+  tyClGroupKindSigs,+  isClassDecl, isDataDecl, isSynDecl, tcdName,+  isFamilyDecl, isTypeFamilyDecl, isDataFamilyDecl,+  isOpenTypeFamilyInfo, isClosedTypeFamilyInfo,+  tyFamInstDeclName, tyFamInstDeclLName,+  countTyClDecls, pprTyClDeclFlavour,+  tyClDeclLName, tyClDeclTyVars,+  hsDeclHasCusk, famResultKindSignature,+  FamilyDecl(..), LFamilyDecl,++  -- ** Instance declarations+  InstDecl(..), LInstDecl, FamilyInfo(..),+  TyFamInstDecl(..), LTyFamInstDecl, instDeclDataFamInsts,+  TyFamDefltDecl, LTyFamDefltDecl,+  DataFamInstDecl(..), LDataFamInstDecl,+  pprDataFamInstFlavour, pprTyFamInstDecl, pprHsFamInstLHS,+  FamInstEqn, LFamInstEqn, FamEqn(..),+  TyFamInstEqn, LTyFamInstEqn, HsTyPats,+  LClsInstDecl, ClsInstDecl(..),++  -- ** Standalone deriving declarations+  DerivDecl(..), LDerivDecl,+  -- ** Deriving strategies+  DerivStrategy(..), LDerivStrategy,+  derivStrategyName, foldDerivStrategy, mapDerivStrategy,+  -- ** @RULE@ declarations+  LRuleDecls,RuleDecls(..),RuleDecl(..),LRuleDecl,HsRuleRn(..),+  RuleBndr(..),LRuleBndr,+  collectRuleBndrSigTys,+  flattenRuleDecls, pprFullRuleName,+  -- ** @default@ declarations+  DefaultDecl(..), LDefaultDecl,+  -- ** Template haskell declaration splice+  SpliceExplicitFlag(..),+  SpliceDecl(..), LSpliceDecl,+  -- ** Foreign function interface declarations+  ForeignDecl(..), LForeignDecl, ForeignImport(..), ForeignExport(..),+  CImportSpec(..),+  -- ** Data-constructor declarations+  ConDecl(..), LConDecl,+  HsConDeclDetails, hsConDeclArgTys, hsConDeclTheta,+  getConNames, getConArgs,+  -- ** Document comments+  DocDecl(..), LDocDecl, docDeclDoc,+  -- ** Deprecations+  WarnDecl(..),  LWarnDecl,+  WarnDecls(..), LWarnDecls,+  -- ** Annotations+  AnnDecl(..), LAnnDecl,+  AnnProvenance(..), annProvenanceName_maybe,+  -- ** Role annotations+  RoleAnnotDecl(..), LRoleAnnotDecl, roleAnnotDeclName,+  -- ** Injective type families+  FamilyResultSig(..), LFamilyResultSig, InjectivityAnn(..), LInjectivityAnn,+  resultVariableName,++  -- * Grouping+  HsGroup(..),  emptyRdrGroup, emptyRnGroup, appendGroups, hsGroupInstDecls++    ) where++-- friends:+import GhcPrelude++import {-# SOURCE #-} GHC.Hs.Expr( HsExpr, HsSplice, pprExpr,+                                   pprSpliceDecl )+        -- Because Expr imports Decls via HsBracket++import GHC.Hs.Binds+import GHC.Hs.Types+import GHC.Hs.Doc+import TyCon+import BasicTypes+import Coercion+import ForeignCall+import GHC.Hs.Extension+import NameSet++-- others:+import Class+import Outputable+import Util+import SrcLoc+import Type++import Bag+import Maybes+import Data.Data        hiding (TyCon,Fixity, Infix)++{-+************************************************************************+*                                                                      *+\subsection[HsDecl]{Declarations}+*                                                                      *+************************************************************************+-}++type LHsDecl p = Located (HsDecl p)+        -- ^ When in a list this may have+        --+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'+        --++-- For details on above see note [Api annotations] in ApiAnnotation++-- | A Haskell Declaration+data HsDecl p+  = TyClD      (XTyClD p)      (TyClDecl p)      -- ^ Type or Class Declaration+  | InstD      (XInstD p)      (InstDecl  p)     -- ^ Instance declaration+  | DerivD     (XDerivD p)     (DerivDecl p)     -- ^ Deriving declaration+  | ValD       (XValD p)       (HsBind p)        -- ^ Value declaration+  | SigD       (XSigD p)       (Sig p)           -- ^ Signature declaration+  | KindSigD   (XKindSigD p)   (StandaloneKindSig p) -- ^ Standalone kind signature+  | DefD       (XDefD p)       (DefaultDecl p)   -- ^ 'default' declaration+  | ForD       (XForD p)       (ForeignDecl p)   -- ^ Foreign declaration+  | WarningD   (XWarningD p)   (WarnDecls p)     -- ^ Warning declaration+  | AnnD       (XAnnD p)       (AnnDecl p)       -- ^ Annotation declaration+  | RuleD      (XRuleD p)      (RuleDecls p)     -- ^ Rule declaration+  | SpliceD    (XSpliceD p)    (SpliceDecl p)    -- ^ Splice declaration+                                                 -- (Includes quasi-quotes)+  | DocD       (XDocD p)       (DocDecl)  -- ^ Documentation comment declaration+  | RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p) -- ^Role annotation declaration+  | XHsDecl    (XXHsDecl p)++type instance XTyClD      (GhcPass _) = NoExtField+type instance XInstD      (GhcPass _) = NoExtField+type instance XDerivD     (GhcPass _) = NoExtField+type instance XValD       (GhcPass _) = NoExtField+type instance XSigD       (GhcPass _) = NoExtField+type instance XKindSigD   (GhcPass _) = NoExtField+type instance XDefD       (GhcPass _) = NoExtField+type instance XForD       (GhcPass _) = NoExtField+type instance XWarningD   (GhcPass _) = NoExtField+type instance XAnnD       (GhcPass _) = NoExtField+type instance XRuleD      (GhcPass _) = NoExtField+type instance XSpliceD    (GhcPass _) = NoExtField+type instance XDocD       (GhcPass _) = NoExtField+type instance XRoleAnnotD (GhcPass _) = NoExtField+type instance XXHsDecl    (GhcPass _) = NoExtCon++-- NB: all top-level fixity decls are contained EITHER+-- EITHER SigDs+-- OR     in the ClassDecls in TyClDs+--+-- The former covers+--      a) data constructors+--      b) class methods (but they can be also done in the+--              signatures of class decls)+--      c) imported functions (that have an IfacSig)+--      d) top level decls+--+-- The latter is for class methods only++-- | Haskell Group+--+-- A 'HsDecl' is categorised into a 'HsGroup' before being+-- fed to the renamer.+data HsGroup p+  = HsGroup {+        hs_ext    :: XCHsGroup p,+        hs_valds  :: HsValBinds p,+        hs_splcds :: [LSpliceDecl p],++        hs_tyclds :: [TyClGroup p],+                -- A list of mutually-recursive groups;+                -- This includes `InstDecl`s as well;+                -- Parser generates a singleton list;+                -- renamer does dependency analysis++        hs_derivds :: [LDerivDecl p],++        hs_fixds  :: [LFixitySig p],+                -- Snaffled out of both top-level fixity signatures,+                -- and those in class declarations++        hs_defds  :: [LDefaultDecl p],+        hs_fords  :: [LForeignDecl p],+        hs_warnds :: [LWarnDecls p],+        hs_annds  :: [LAnnDecl p],+        hs_ruleds :: [LRuleDecls p],++        hs_docs   :: [LDocDecl]+    }+  | XHsGroup (XXHsGroup p)++type instance XCHsGroup (GhcPass _) = NoExtField+type instance XXHsGroup (GhcPass _) = NoExtCon+++emptyGroup, emptyRdrGroup, emptyRnGroup :: HsGroup (GhcPass p)+emptyRdrGroup = emptyGroup { hs_valds = emptyValBindsIn }+emptyRnGroup  = emptyGroup { hs_valds = emptyValBindsOut }++hsGroupInstDecls :: HsGroup id -> [LInstDecl id]+hsGroupInstDecls = (=<<) group_instds . hs_tyclds++emptyGroup = HsGroup { hs_ext = noExtField,+                       hs_tyclds = [],+                       hs_derivds = [],+                       hs_fixds = [], hs_defds = [], hs_annds = [],+                       hs_fords = [], hs_warnds = [], hs_ruleds = [],+                       hs_valds = error "emptyGroup hs_valds: Can't happen",+                       hs_splcds = [],+                       hs_docs = [] }++appendGroups :: HsGroup (GhcPass p) -> HsGroup (GhcPass p)+             -> HsGroup (GhcPass p)+appendGroups+    HsGroup {+        hs_valds  = val_groups1,+        hs_splcds = spliceds1,+        hs_tyclds = tyclds1,+        hs_derivds = derivds1,+        hs_fixds  = fixds1,+        hs_defds  = defds1,+        hs_annds  = annds1,+        hs_fords  = fords1,+        hs_warnds = warnds1,+        hs_ruleds = rulds1,+        hs_docs   = docs1 }+    HsGroup {+        hs_valds  = val_groups2,+        hs_splcds = spliceds2,+        hs_tyclds = tyclds2,+        hs_derivds = derivds2,+        hs_fixds  = fixds2,+        hs_defds  = defds2,+        hs_annds  = annds2,+        hs_fords  = fords2,+        hs_warnds = warnds2,+        hs_ruleds = rulds2,+        hs_docs   = docs2 }+  =+    HsGroup {+        hs_ext    = noExtField,+        hs_valds  = val_groups1 `plusHsValBinds` val_groups2,+        hs_splcds = spliceds1 ++ spliceds2,+        hs_tyclds = tyclds1 ++ tyclds2,+        hs_derivds = derivds1 ++ derivds2,+        hs_fixds  = fixds1 ++ fixds2,+        hs_annds  = annds1 ++ annds2,+        hs_defds  = defds1 ++ defds2,+        hs_fords  = fords1 ++ fords2,+        hs_warnds = warnds1 ++ warnds2,+        hs_ruleds = rulds1 ++ rulds2,+        hs_docs   = docs1  ++ docs2 }+appendGroups _ _ = panic "appendGroups"++instance (OutputableBndrId p) => Outputable (HsDecl (GhcPass p)) where+    ppr (TyClD _ dcl)             = ppr dcl+    ppr (ValD _ binds)            = ppr binds+    ppr (DefD _ def)              = ppr def+    ppr (InstD _ inst)            = ppr inst+    ppr (DerivD _ deriv)          = ppr deriv+    ppr (ForD _ fd)               = ppr fd+    ppr (SigD _ sd)               = ppr sd+    ppr (KindSigD _ ksd)          = ppr ksd+    ppr (RuleD _ rd)              = ppr rd+    ppr (WarningD _ wd)           = ppr wd+    ppr (AnnD _ ad)               = ppr ad+    ppr (SpliceD _ dd)            = ppr dd+    ppr (DocD _ doc)              = ppr doc+    ppr (RoleAnnotD _ ra)         = ppr ra+    ppr (XHsDecl x)               = ppr x++instance (OutputableBndrId p) => Outputable (HsGroup (GhcPass p)) where+    ppr (HsGroup { hs_valds  = val_decls,+                   hs_tyclds = tycl_decls,+                   hs_derivds = deriv_decls,+                   hs_fixds  = fix_decls,+                   hs_warnds = deprec_decls,+                   hs_annds  = ann_decls,+                   hs_fords  = foreign_decls,+                   hs_defds  = default_decls,+                   hs_ruleds = rule_decls })+        = vcat_mb empty+            [ppr_ds fix_decls, ppr_ds default_decls,+             ppr_ds deprec_decls, ppr_ds ann_decls,+             ppr_ds rule_decls,+             if isEmptyValBinds val_decls+                then Nothing+                else Just (ppr val_decls),+             ppr_ds (tyClGroupRoleDecls tycl_decls),+             ppr_ds (tyClGroupKindSigs  tycl_decls),+             ppr_ds (tyClGroupTyClDecls tycl_decls),+             ppr_ds (tyClGroupInstDecls tycl_decls),+             ppr_ds deriv_decls,+             ppr_ds foreign_decls]+        where+          ppr_ds :: Outputable a => [a] -> Maybe SDoc+          ppr_ds [] = Nothing+          ppr_ds ds = Just (vcat (map ppr ds))++          vcat_mb :: SDoc -> [Maybe SDoc] -> SDoc+          -- Concatenate vertically with white-space between non-blanks+          vcat_mb _    []             = empty+          vcat_mb gap (Nothing : ds) = vcat_mb gap ds+          vcat_mb gap (Just d  : ds) = gap $$ d $$ vcat_mb blankLine ds+    ppr (XHsGroup x) = ppr x++-- | Located Splice Declaration+type LSpliceDecl pass = Located (SpliceDecl pass)++-- | Splice Declaration+data SpliceDecl p+  = SpliceDecl                  -- Top level splice+        (XSpliceDecl p)+        (Located (HsSplice p))+        SpliceExplicitFlag+  | XSpliceDecl (XXSpliceDecl p)++type instance XSpliceDecl      (GhcPass _) = NoExtField+type instance XXSpliceDecl     (GhcPass _) = NoExtCon++instance OutputableBndrId p+       => Outputable (SpliceDecl (GhcPass p)) where+   ppr (SpliceDecl _ (L _ e) f) = pprSpliceDecl e f+   ppr (XSpliceDecl x) = ppr x++{-+************************************************************************+*                                                                      *+            Type and class declarations+*                                                                      *+************************************************************************++Note [The Naming story]+~~~~~~~~~~~~~~~~~~~~~~~+Here is the story about the implicit names that go with type, class,+and instance decls.  It's a bit tricky, so pay attention!++"Implicit" (or "system") binders+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+  Each data type decl defines+        a worker name for each constructor+        to-T and from-T convertors+  Each class decl defines+        a tycon for the class+        a data constructor for that tycon+        the worker for that constructor+        a selector for each superclass++All have occurrence names that are derived uniquely from their parent+declaration.++None of these get separate definitions in an interface file; they are+fully defined by the data or class decl.  But they may *occur* in+interface files, of course.  Any such occurrence must haul in the+relevant type or class decl.++Plan of attack:+ - Ensure they "point to" the parent data/class decl+   when loading that decl from an interface file+   (See RnHiFiles.getSysBinders)++ - When typechecking the decl, we build the implicit TyCons and Ids.+   When doing so we look them up in the name cache (RnEnv.lookupSysName),+   to ensure correct module and provenance is set++These are the two places that we have to conjure up the magic derived+names.  (The actual magic is in OccName.mkWorkerOcc, etc.)++Default methods+~~~~~~~~~~~~~~~+ - Occurrence name is derived uniquely from the method name+   E.g. $dmmax++ - If there is a default method name at all, it's recorded in+   the ClassOpSig (in GHC.Hs.Binds), in the DefMethInfo field.+   (DefMethInfo is defined in Class.hs)++Source-code class decls and interface-code class decls are treated subtly+differently, which has given me a great deal of confusion over the years.+Here's the deal.  (We distinguish the two cases because source-code decls+have (Just binds) in the tcdMeths field, whereas interface decls have Nothing.++In *source-code* class declarations:++ - When parsing, every ClassOpSig gets a DefMeth with a suitable RdrName+   This is done by RdrHsSyn.mkClassOpSigDM++ - The renamer renames it to a Name++ - During typechecking, we generate a binding for each $dm for+   which there's a programmer-supplied default method:+        class Foo a where+          op1 :: <type>+          op2 :: <type>+          op1 = ...+   We generate a binding for $dmop1 but not for $dmop2.+   The Class for Foo has a Nothing for op2 and+                         a Just ($dm_op1, VanillaDM) for op1.+   The Name for $dmop2 is simply discarded.++In *interface-file* class declarations:+  - When parsing, we see if there's an explicit programmer-supplied default method+    because there's an '=' sign to indicate it:+        class Foo a where+          op1 = :: <type>       -- NB the '='+          op2   :: <type>+    We use this info to generate a DefMeth with a suitable RdrName for op1,+    and a NoDefMeth for op2+  - The interface file has a separate definition for $dmop1, with unfolding etc.+  - The renamer renames it to a Name.+  - The renamer treats $dmop1 as a free variable of the declaration, so that+    the binding for $dmop1 will be sucked in.  (See RnHsSyn.tyClDeclFVs)+    This doesn't happen for source code class decls, because they *bind* the default method.++Dictionary functions+~~~~~~~~~~~~~~~~~~~~+Each instance declaration gives rise to one dictionary function binding.++The type checker makes up new source-code instance declarations+(e.g. from 'deriving' or generic default methods --- see+TcInstDcls.tcInstDecls1).  So we can't generate the names for+dictionary functions in advance (we don't know how many we need).++On the other hand for interface-file instance declarations, the decl+specifies the name of the dictionary function, and it has a binding elsewhere+in the interface file:+        instance {Eq Int} = dEqInt+        dEqInt :: {Eq Int} <pragma info>++So again we treat source code and interface file code slightly differently.++Source code:+  - Source code instance decls have a Nothing in the (Maybe name) field+    (see data InstDecl below)++  - The typechecker makes up a Local name for the dict fun for any source-code+    instance decl, whether it comes from a source-code instance decl, or whether+    the instance decl is derived from some other construct (e.g. 'deriving').++  - The occurrence name it chooses is derived from the instance decl (just for+    documentation really) --- e.g. dNumInt.  Two dict funs may share a common+    occurrence name, but will have different uniques.  E.g.+        instance Foo [Int]  where ...+        instance Foo [Bool] where ...+    These might both be dFooList++  - The CoreTidy phase externalises the name, and ensures the occurrence name is+    unique (this isn't special to dict funs).  So we'd get dFooList and dFooList1.++  - We can take this relaxed approach (changing the occurrence name later)+    because dict fun Ids are not captured in a TyCon or Class (unlike default+    methods, say).  Instead, they are kept separately in the InstEnv.  This+    makes it easy to adjust them after compiling a module.  (Once we've finished+    compiling that module, they don't change any more.)+++Interface file code:+  - The instance decl gives the dict fun name, so the InstDecl has a (Just name)+    in the (Maybe name) field.++  - RnHsSyn.instDeclFVs treats the dict fun name as free in the decl, so that we+    suck in the dfun binding+-}++-- | Located Declaration of a Type or Class+type LTyClDecl pass = Located (TyClDecl pass)++-- | A type or class declaration.+data TyClDecl pass+  = -- | @type/data family T :: *->*@+    --+    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',+    --             'ApiAnnotation.AnnData',+    --             'ApiAnnotation.AnnFamily','ApiAnnotation.AnnDcolon',+    --             'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpenP',+    --             'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnCloseP',+    --             'ApiAnnotation.AnnEqual','ApiAnnotation.AnnRarrow',+    --             'ApiAnnotation.AnnVbar'++    -- For details on above see note [Api annotations] in ApiAnnotation+    FamDecl { tcdFExt :: XFamDecl pass, tcdFam :: FamilyDecl pass }++  | -- | @type@ declaration+    --+    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',+    --             'ApiAnnotation.AnnEqual',++    -- For details on above see note [Api annotations] in ApiAnnotation+    SynDecl { tcdSExt   :: XSynDecl pass          -- ^ Post renameer, FVs+            , tcdLName  :: Located (IdP pass)     -- ^ Type constructor+            , tcdTyVars :: LHsQTyVars pass        -- ^ Type variables; for an+                                                  -- associated type these+                                                  -- include outer binders+            , tcdFixity :: LexicalFixity    -- ^ Fixity used in the declaration+            , tcdRhs    :: LHsType pass }         -- ^ RHS of type declaration++  | -- | @data@ declaration+    --+    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnData',+    --              'ApiAnnotation.AnnFamily',+    --              'ApiAnnotation.AnnNewType',+    --              'ApiAnnotation.AnnNewType','ApiAnnotation.AnnDcolon'+    --              'ApiAnnotation.AnnWhere',++    -- For details on above see note [Api annotations] in ApiAnnotation+    DataDecl { tcdDExt     :: XDataDecl pass       -- ^ Post renamer, CUSK flag, FVs+             , tcdLName    :: Located (IdP pass)   -- ^ Type constructor+             , tcdTyVars   :: LHsQTyVars pass      -- ^ Type variables+                              -- See Note [TyVar binders for associated declarations]+             , tcdFixity   :: LexicalFixity        -- ^ Fixity used in the declaration+             , tcdDataDefn :: HsDataDefn pass }++  | ClassDecl { tcdCExt    :: XClassDecl pass,         -- ^ Post renamer, FVs+                tcdCtxt    :: LHsContext pass,         -- ^ Context...+                tcdLName   :: Located (IdP pass),      -- ^ Name of the class+                tcdTyVars  :: LHsQTyVars pass,         -- ^ Class type variables+                tcdFixity  :: LexicalFixity, -- ^ Fixity used in the declaration+                tcdFDs     :: [LHsFunDep pass],         -- ^ Functional deps+                tcdSigs    :: [LSig pass],              -- ^ Methods' signatures+                tcdMeths   :: LHsBinds pass,            -- ^ Default methods+                tcdATs     :: [LFamilyDecl pass],       -- ^ Associated types;+                tcdATDefs  :: [LTyFamDefltDecl pass],   -- ^ Associated type defaults+                tcdDocs    :: [LDocDecl]                -- ^ Haddock docs+    }+        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnClass',+        --           'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpen',+        --           'ApiAnnotation.AnnClose'+        --   - The tcdFDs will have 'ApiAnnotation.AnnVbar',+        --                          'ApiAnnotation.AnnComma'+        --                          'ApiAnnotation.AnnRarrow'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | XTyClDecl (XXTyClDecl pass)++type LHsFunDep pass = Located (FunDep (Located (IdP pass)))++data DataDeclRn = DataDeclRn+             { tcdDataCusk :: Bool    -- ^ does this have a CUSK?+                 -- See Note [CUSKs: complete user-supplied kind signatures]+             , tcdFVs      :: NameSet }+  deriving Data++{- Note [TyVar binders for associated decls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For an /associated/ data, newtype, or type-family decl, the LHsQTyVars+/includes/ outer binders.  For example+    class T a where+       data D a c+       type F a b :: *+       type F a b = a -> a+Here the data decl for 'D', and type-family decl for 'F', both include 'a'+in their LHsQTyVars (tcdTyVars and fdTyVars resp).++Ditto any implicit binders in the hsq_implicit field of the LHSQTyVars.++The idea is that the associated type is really a top-level decl in its+own right.  However we are careful to use the same name 'a', so that+we can match things up.++c.f. Note [Associated type tyvar names] in Class.hs+     Note [Family instance declaration binders]+-}++type instance XFamDecl      (GhcPass _) = NoExtField++type instance XSynDecl      GhcPs = NoExtField+type instance XSynDecl      GhcRn = NameSet -- FVs+type instance XSynDecl      GhcTc = NameSet -- FVs++type instance XDataDecl     GhcPs = NoExtField+type instance XDataDecl     GhcRn = DataDeclRn+type instance XDataDecl     GhcTc = DataDeclRn++type instance XClassDecl    GhcPs = NoExtField+type instance XClassDecl    GhcRn = NameSet -- FVs+type instance XClassDecl    GhcTc = NameSet -- FVs++type instance XXTyClDecl    (GhcPass _) = NoExtCon++-- Simple classifiers for TyClDecl+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++-- | @True@ <=> argument is a @data@\/@newtype@+-- declaration.+isDataDecl :: TyClDecl pass -> Bool+isDataDecl (DataDecl {}) = True+isDataDecl _other        = False++-- | type or type instance declaration+isSynDecl :: TyClDecl pass -> Bool+isSynDecl (SynDecl {})   = True+isSynDecl _other        = False++-- | type class+isClassDecl :: TyClDecl pass -> Bool+isClassDecl (ClassDecl {}) = True+isClassDecl _              = False++-- | type/data family declaration+isFamilyDecl :: TyClDecl pass -> Bool+isFamilyDecl (FamDecl {})  = True+isFamilyDecl _other        = False++-- | type family declaration+isTypeFamilyDecl :: TyClDecl pass -> Bool+isTypeFamilyDecl (FamDecl _ (FamilyDecl { fdInfo = info })) = case info of+  OpenTypeFamily      -> True+  ClosedTypeFamily {} -> True+  _                   -> False+isTypeFamilyDecl _ = False++-- | open type family info+isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool+isOpenTypeFamilyInfo OpenTypeFamily = True+isOpenTypeFamilyInfo _              = False++-- | closed type family info+isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool+isClosedTypeFamilyInfo (ClosedTypeFamily {}) = True+isClosedTypeFamilyInfo _                     = False++-- | data family declaration+isDataFamilyDecl :: TyClDecl pass -> Bool+isDataFamilyDecl (FamDecl _ (FamilyDecl { fdInfo = DataFamily })) = True+isDataFamilyDecl _other      = False++-- Dealing with names++tyFamInstDeclName :: TyFamInstDecl (GhcPass p) -> IdP (GhcPass p)+tyFamInstDeclName = unLoc . tyFamInstDeclLName++tyFamInstDeclLName :: TyFamInstDecl (GhcPass p) -> Located (IdP (GhcPass p))+tyFamInstDeclLName (TyFamInstDecl { tfid_eqn =+                     (HsIB { hsib_body = FamEqn { feqn_tycon = ln }}) })+  = ln+tyFamInstDeclLName (TyFamInstDecl (HsIB _ (XFamEqn nec)))+  = noExtCon nec+tyFamInstDeclLName (TyFamInstDecl (XHsImplicitBndrs nec))+  = noExtCon nec++tyClDeclLName :: TyClDecl pass -> Located (IdP pass)+tyClDeclLName (FamDecl { tcdFam = FamilyDecl { fdLName = ln } }) = ln+tyClDeclLName decl = tcdLName decl++tcdName :: TyClDecl pass -> IdP pass+tcdName = unLoc . tyClDeclLName++tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass+tyClDeclTyVars (FamDecl { tcdFam = FamilyDecl { fdTyVars = tvs } }) = tvs+tyClDeclTyVars d = tcdTyVars d++countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)+        -- class, synonym decls, data, newtype, family decls+countTyClDecls decls+ = (count isClassDecl    decls,+    count isSynDecl      decls,  -- excluding...+    count isDataTy       decls,  -- ...family...+    count isNewTy        decls,  -- ...instances+    count isFamilyDecl   decls)+ where+   isDataTy DataDecl{ tcdDataDefn = HsDataDefn { dd_ND = DataType } } = True+   isDataTy _                                                       = False++   isNewTy DataDecl{ tcdDataDefn = HsDataDefn { dd_ND = NewType } } = True+   isNewTy _                                                      = False++-- | Does this declaration have a complete, user-supplied kind signature?+-- See Note [CUSKs: complete user-supplied kind signatures]+hsDeclHasCusk :: TyClDecl GhcRn -> Bool+hsDeclHasCusk (FamDecl { tcdFam =+    FamilyDecl { fdInfo      = fam_info+               , fdTyVars    = tyvars+               , fdResultSig = L _ resultSig } }) =+    case fam_info of+      ClosedTypeFamily {} -> hsTvbAllKinded tyvars+                          && isJust (famResultKindSignature resultSig)+      _ -> True -- Un-associated open type/data families have CUSKs+hsDeclHasCusk (SynDecl { tcdTyVars = tyvars, tcdRhs = rhs })+  = hsTvbAllKinded tyvars && isJust (hsTyKindSig rhs)+hsDeclHasCusk (DataDecl { tcdDExt = DataDeclRn { tcdDataCusk = cusk }}) = cusk+hsDeclHasCusk (ClassDecl { tcdTyVars = tyvars }) = hsTvbAllKinded tyvars+hsDeclHasCusk (FamDecl { tcdFam = XFamilyDecl nec }) = noExtCon nec+hsDeclHasCusk (XTyClDecl nec) = noExtCon nec++-- Pretty-printing TyClDecl+-- ~~~~~~~~~~~~~~~~~~~~~~~~++instance (OutputableBndrId p) => Outputable (TyClDecl (GhcPass p)) where++    ppr (FamDecl { tcdFam = decl }) = ppr decl+    ppr (SynDecl { tcdLName = ltycon, tcdTyVars = tyvars, tcdFixity = fixity+                 , tcdRhs = rhs })+      = hang (text "type" <+>+              pp_vanilla_decl_head ltycon tyvars fixity noLHsContext <+> equals)+          4 (ppr rhs)++    ppr (DataDecl { tcdLName = ltycon, tcdTyVars = tyvars, tcdFixity = fixity+                  , tcdDataDefn = defn })+      = pp_data_defn (pp_vanilla_decl_head ltycon tyvars fixity) defn++    ppr (ClassDecl {tcdCtxt = context, tcdLName = lclas, tcdTyVars = tyvars,+                    tcdFixity = fixity,+                    tcdFDs  = fds,+                    tcdSigs = sigs, tcdMeths = methods,+                    tcdATs = ats, tcdATDefs = at_defs})+      | null sigs && isEmptyBag methods && null ats && null at_defs -- No "where" part+      = top_matter++      | otherwise       -- Laid out+      = vcat [ top_matter <+> text "where"+             , nest 2 $ pprDeclList (map (pprFamilyDecl NotTopLevel . unLoc) ats +++                                     map (pprTyFamDefltDecl . unLoc) at_defs +++                                     pprLHsBindsForUser methods sigs) ]+      where+        top_matter = text "class"+                    <+> pp_vanilla_decl_head lclas tyvars fixity context+                    <+> pprFundeps (map unLoc fds)++    ppr (XTyClDecl x) = ppr x++instance OutputableBndrId p+       => Outputable (TyClGroup (GhcPass p)) where+  ppr (TyClGroup { group_tyclds = tyclds+                 , group_roles = roles+                 , group_kisigs = kisigs+                 , group_instds = instds+                 }+      )+    = hang (text "TyClGroup") 2 $+      ppr kisigs $$+      ppr tyclds $$+      ppr roles $$+      ppr instds+  ppr (XTyClGroup x) = ppr x++pp_vanilla_decl_head :: (OutputableBndrId p)+   => Located (IdP (GhcPass p))+   -> LHsQTyVars (GhcPass p)+   -> LexicalFixity+   -> LHsContext (GhcPass p)+   -> SDoc+pp_vanilla_decl_head thing (HsQTvs { hsq_explicit = tyvars }) fixity context+ = hsep [pprLHsContext context, pp_tyvars tyvars]+  where+    pp_tyvars (varl:varsr)+      | fixity == Infix && length varsr > 1+         = hsep [char '(',ppr (unLoc varl), pprInfixOcc (unLoc thing)+                , (ppr.unLoc) (head varsr), char ')'+                , hsep (map (ppr.unLoc) (tail varsr))]+      | fixity == Infix+         = hsep [ppr (unLoc varl), pprInfixOcc (unLoc thing)+         , hsep (map (ppr.unLoc) varsr)]+      | otherwise = hsep [ pprPrefixOcc (unLoc thing)+                  , hsep (map (ppr.unLoc) (varl:varsr))]+    pp_tyvars [] = pprPrefixOcc (unLoc thing)+pp_vanilla_decl_head _ (XLHsQTyVars x) _ _ = ppr x++pprTyClDeclFlavour :: TyClDecl (GhcPass p) -> SDoc+pprTyClDeclFlavour (ClassDecl {})   = text "class"+pprTyClDeclFlavour (SynDecl {})     = text "type"+pprTyClDeclFlavour (FamDecl { tcdFam = FamilyDecl { fdInfo = info }})+  = pprFlavour info <+> text "family"+pprTyClDeclFlavour (FamDecl { tcdFam = XFamilyDecl nec })+  = noExtCon nec+pprTyClDeclFlavour (DataDecl { tcdDataDefn = HsDataDefn { dd_ND = nd } })+  = ppr nd+pprTyClDeclFlavour (DataDecl { tcdDataDefn = XHsDataDefn x })+  = ppr x+pprTyClDeclFlavour (XTyClDecl x) = ppr x+++{- Note [CUSKs: complete user-supplied kind signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We kind-check declarations differently if they have a complete, user-supplied+kind signature (CUSK). This is because we can safely generalise a CUSKed+declaration before checking all of the others, supporting polymorphic recursion.+See https://gitlab.haskell.org/ghc/ghc/wikis/ghc-kinds/kind-inference#proposed-new-strategy+and #9200 for lots of discussion of how we got here.++The detection of CUSKs is enabled by the -XCUSKs extension, switched on by default.+Under -XNoCUSKs, all declarations are treated as if they have no CUSK.+See https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0036-kind-signatures.rst++PRINCIPLE:+  a type declaration has a CUSK iff we could produce a separate kind signature+  for it, just like a type signature for a function,+  looking only at the header of the declaration.++Examples:+  * data T1 (a :: *->*) (b :: *) = ....+    -- Has CUSK; equivalant to   T1 :: (*->*) -> * -> *++ * data T2 a b = ...+   -- No CUSK; we do not want to guess T2 :: * -> * -> *+   -- because the full decl might be   data T a b = MkT (a b)++  * data T3 (a :: k -> *) (b :: *) = ...+    -- CUSK; equivalent to   T3 :: (k -> *) -> * -> *+    -- We lexically generalise over k to get+    --    T3 :: forall k. (k -> *) -> * -> *+    -- The generalisation is here is purely lexical, just like+    --    f3 :: a -> a+    -- means+    --    f3 :: forall a. a -> a++  * data T4 (a :: j k) = ...+     -- CUSK; equivalent to   T4 :: j k -> *+     -- which we lexically generalise to  T4 :: forall j k. j k -> *+     -- and then, if PolyKinds is on, we further generalise to+     --   T4 :: forall kk (j :: kk -> *) (k :: kk). j k -> *+     -- Again this is exactly like what happens as the term level+     -- when you write+     --    f4 :: forall a b. a b -> Int++NOTE THAT+  * A CUSK does /not/ mean that everything about the kind signature is+    fully specified by the user.  Look at T4 and f4: we had do do kind+    inference to figure out the kind-quantification.  But in both cases+    (T4 and f4) that inference is done looking /only/ at the header of T4+    (or signature for f4), not at the definition thereof.++  * The CUSK completely fixes the kind of the type constructor, forever.++  * The precise rules, for each declaration form, for whethher a declaration+    has a CUSK are given in the user manual section "Complete user-supplied+    kind signatures and polymorphic recursion".  BUt they simply implement+    PRINCIPLE above.++  * Open type families are interesting:+      type family T5 a b :: *+    There simply /is/ no accompanying declaration, so that info is all+    we'll ever get.  So we it has a CUSK by definition, and we default+    any un-fixed kind variables to *.++  * Associated types are a bit tricker:+      class C6 a where+         type family T6 a b :: *+         op :: a Int -> Int+    Here C6 does not have a CUSK (in fact we ultimately discover that+    a :: * -> *).  And hence neither does T6, the associated family,+    because we can't fix its kind until we have settled C6.  Another+    way to say it: unlike a top-level, we /may/ discover more about+    a's kind from C6's definition.++  * A data definition with a top-level :: must explicitly bind all+    kind variables to the right of the ::. See test+    dependent/should_compile/KindLevels, which requires this+    case. (Naturally, any kind variable mentioned before the :: should+    not be bound after it.)++    This last point is much more debatable than the others; see+    #15142 comment:22++    Because this is fiddly to check, there is a field in the DataDeclRn+    structure (included in a DataDecl after the renamer) that stores whether+    or not the declaration has a CUSK.+-}+++{- *********************************************************************+*                                                                      *+                         TyClGroup+        Strongly connected components of+      type, class, instance, and role declarations+*                                                                      *+********************************************************************* -}++{- Note [TyClGroups and dependency analysis]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A TyClGroup represents a strongly connected components of type/class/instance+decls, together with the role annotations for the type/class declarations.++The hs_tyclds :: [TyClGroup] field of a HsGroup is a dependency-order+sequence of strongly-connected components.++Invariants+ * The type and class declarations, group_tyclds, may depend on each+   other, or earlier TyClGroups, but not on later ones++ * The role annotations, group_roles, are role-annotations for some or+   all of the types and classes in group_tyclds (only).++ * The instance declarations, group_instds, may (and usually will)+   depend on group_tyclds, or on earlier TyClGroups, but not on later+   ones.++See Note [Dependency analsis of type, class, and instance decls]+in RnSource for more info.+-}++-- | Type or Class Group+data TyClGroup pass  -- See Note [TyClGroups and dependency analysis]+  = TyClGroup { group_ext    :: XCTyClGroup pass+              , group_tyclds :: [LTyClDecl pass]+              , group_roles  :: [LRoleAnnotDecl pass]+              , group_kisigs :: [LStandaloneKindSig pass]+              , group_instds :: [LInstDecl pass] }+  | XTyClGroup (XXTyClGroup pass)++type instance XCTyClGroup (GhcPass _) = NoExtField+type instance XXTyClGroup (GhcPass _) = NoExtCon+++tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]+tyClGroupTyClDecls = concatMap group_tyclds++tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]+tyClGroupInstDecls = concatMap group_instds++tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]+tyClGroupRoleDecls = concatMap group_roles++tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass]+tyClGroupKindSigs = concatMap group_kisigs+++{- *********************************************************************+*                                                                      *+               Data and type family declarations+*                                                                      *+********************************************************************* -}++{- Note [FamilyResultSig]+~~~~~~~~~~~~~~~~~~~~~~~~~++This data type represents the return signature of a type family.  Possible+values are:++ * NoSig - the user supplied no return signature:+      type family Id a where ...++ * KindSig - the user supplied the return kind:+      type family Id a :: * where ...++ * TyVarSig - user named the result with a type variable and possibly+   provided a kind signature for that variable:+      type family Id a = r where ...+      type family Id a = (r :: *) where ...++   Naming result of a type family is required if we want to provide+   injectivity annotation for a type family:+      type family Id a = r | r -> a where ...++See also: Note [Injectivity annotation]++Note [Injectivity annotation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++A user can declare a type family to be injective:++   type family Id a = r | r -> a where ...++ * The part after the "|" is called "injectivity annotation".+ * "r -> a" part is called "injectivity condition"; at the moment terms+   "injectivity annotation" and "injectivity condition" are synonymous+   because we only allow a single injectivity condition.+ * "r" is the "LHS of injectivity condition". LHS can only contain the+   variable naming the result of a type family.++ * "a" is the "RHS of injectivity condition". RHS contains space-separated+   type and kind variables representing the arguments of a type+   family. Variables can be omitted if a type family is not injective in+   these arguments. Example:+         type family Foo a b c = d | d -> a c where ...++Note that:+ (a) naming of type family result is required to provide injectivity+     annotation+ (b) for associated types if the result was named then injectivity annotation+     is mandatory. Otherwise result type variable is indistinguishable from+     associated type default.++It is possible that in the future this syntax will be extended to support+more complicated injectivity annotations. For example we could declare that+if we know the result of Plus and one of its arguments we can determine the+other argument:++   type family Plus a b = (r :: Nat) | r a -> b, r b -> a where ...++Here injectivity annotation would consist of two comma-separated injectivity+conditions.++See also Note [Injective type families] in TyCon+-}++-- | Located type Family Result Signature+type LFamilyResultSig pass = Located (FamilyResultSig pass)++-- | type Family Result Signature+data FamilyResultSig pass = -- see Note [FamilyResultSig]+    NoSig (XNoSig pass)+  -- ^ - 'ApiAnnotation.AnnKeywordId' :++  -- For details on above see note [Api annotations] in ApiAnnotation++  | KindSig  (XCKindSig pass) (LHsKind pass)+  -- ^ - 'ApiAnnotation.AnnKeywordId' :+  --             'ApiAnnotation.AnnOpenP','ApiAnnotation.AnnDcolon',+  --             'ApiAnnotation.AnnCloseP'++  -- For details on above see note [Api annotations] in ApiAnnotation++  | TyVarSig (XTyVarSig pass) (LHsTyVarBndr pass)+  -- ^ - 'ApiAnnotation.AnnKeywordId' :+  --             'ApiAnnotation.AnnOpenP','ApiAnnotation.AnnDcolon',+  --             'ApiAnnotation.AnnCloseP', 'ApiAnnotation.AnnEqual'+  | XFamilyResultSig (XXFamilyResultSig pass)++  -- For details on above see note [Api annotations] in ApiAnnotation++type instance XNoSig            (GhcPass _) = NoExtField+type instance XCKindSig         (GhcPass _) = NoExtField++type instance XTyVarSig         (GhcPass _) = NoExtField+type instance XXFamilyResultSig (GhcPass _) = NoExtCon+++-- | Located type Family Declaration+type LFamilyDecl pass = Located (FamilyDecl pass)++-- | type Family Declaration+data FamilyDecl pass = FamilyDecl+  { fdExt            :: XCFamilyDecl pass+  , fdInfo           :: FamilyInfo pass              -- type/data, closed/open+  , fdLName          :: Located (IdP pass)           -- type constructor+  , fdTyVars         :: LHsQTyVars pass              -- type variables+                       -- See Note [TyVar binders for associated declarations]+  , fdFixity         :: LexicalFixity                -- Fixity used in the declaration+  , fdResultSig      :: LFamilyResultSig pass        -- result signature+  , fdInjectivityAnn :: Maybe (LInjectivityAnn pass) -- optional injectivity ann+  }+  | XFamilyDecl (XXFamilyDecl pass)+  -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',+  --             'ApiAnnotation.AnnData', 'ApiAnnotation.AnnFamily',+  --             'ApiAnnotation.AnnWhere', 'ApiAnnotation.AnnOpenP',+  --             'ApiAnnotation.AnnDcolon', 'ApiAnnotation.AnnCloseP',+  --             'ApiAnnotation.AnnEqual', 'ApiAnnotation.AnnRarrow',+  --             'ApiAnnotation.AnnVbar'++  -- For details on above see note [Api annotations] in ApiAnnotation++type instance XCFamilyDecl    (GhcPass _) = NoExtField+type instance XXFamilyDecl    (GhcPass _) = NoExtCon+++-- | Located Injectivity Annotation+type LInjectivityAnn pass = Located (InjectivityAnn pass)++-- | If the user supplied an injectivity annotation it is represented using+-- InjectivityAnn. At the moment this is a single injectivity condition - see+-- Note [Injectivity annotation]. `Located name` stores the LHS of injectivity+-- condition. `[Located name]` stores the RHS of injectivity condition. Example:+--+--   type family Foo a b c = r | r -> a c where ...+--+-- This will be represented as "InjectivityAnn `r` [`a`, `c`]"+data InjectivityAnn pass+  = InjectivityAnn (Located (IdP pass)) [Located (IdP pass)]+  -- ^ - 'ApiAnnotation.AnnKeywordId' :+  --             'ApiAnnotation.AnnRarrow', 'ApiAnnotation.AnnVbar'++  -- For details on above see note [Api annotations] in ApiAnnotation++data FamilyInfo pass+  = DataFamily+  | OpenTypeFamily+     -- | 'Nothing' if we're in an hs-boot file and the user+     -- said "type family Foo x where .."+  | ClosedTypeFamily (Maybe [LTyFamInstEqn pass])++famResultKindSignature :: FamilyResultSig (GhcPass p) -> Maybe (LHsKind (GhcPass p))+famResultKindSignature (NoSig _) = Nothing+famResultKindSignature (KindSig _ ki) = Just ki+famResultKindSignature (TyVarSig _ bndr) =+  case unLoc bndr of+    UserTyVar _ _ -> Nothing+    KindedTyVar _ _ ki -> Just ki+    XTyVarBndr nec -> noExtCon nec+famResultKindSignature (XFamilyResultSig nec) = noExtCon nec++-- | Maybe return name of the result type variable+resultVariableName :: FamilyResultSig (GhcPass a) -> Maybe (IdP (GhcPass a))+resultVariableName (TyVarSig _ sig) = Just $ hsLTyVarName sig+resultVariableName _                = Nothing++instance OutputableBndrId p+       => Outputable (FamilyDecl (GhcPass p)) where+  ppr = pprFamilyDecl TopLevel++pprFamilyDecl :: (OutputableBndrId p)+              => TopLevelFlag -> FamilyDecl (GhcPass p) -> SDoc+pprFamilyDecl top_level (FamilyDecl { fdInfo = info, fdLName = ltycon+                                    , fdTyVars = tyvars+                                    , fdFixity = fixity+                                    , fdResultSig = L _ result+                                    , fdInjectivityAnn = mb_inj })+  = vcat [ pprFlavour info <+> pp_top_level <+>+           pp_vanilla_decl_head ltycon tyvars fixity noLHsContext <+>+           pp_kind <+> pp_inj <+> pp_where+         , nest 2 $ pp_eqns ]+  where+    pp_top_level = case top_level of+                     TopLevel    -> text "family"+                     NotTopLevel -> empty++    pp_kind = case result of+                NoSig    _         -> empty+                KindSig  _ kind    -> dcolon <+> ppr kind+                TyVarSig _ tv_bndr -> text "=" <+> ppr tv_bndr+                XFamilyResultSig nec -> noExtCon nec+    pp_inj = case mb_inj of+               Just (L _ (InjectivityAnn lhs rhs)) ->+                 hsep [ vbar, ppr lhs, text "->", hsep (map ppr rhs) ]+               Nothing -> empty+    (pp_where, pp_eqns) = case info of+      ClosedTypeFamily mb_eqns ->+        ( text "where"+        , case mb_eqns of+            Nothing   -> text ".."+            Just eqns -> vcat $ map (ppr_fam_inst_eqn . unLoc) eqns )+      _ -> (empty, empty)+pprFamilyDecl _ (XFamilyDecl nec) = noExtCon nec++pprFlavour :: FamilyInfo pass -> SDoc+pprFlavour DataFamily            = text "data"+pprFlavour OpenTypeFamily        = text "type"+pprFlavour (ClosedTypeFamily {}) = text "type"++instance Outputable (FamilyInfo pass) where+  ppr info = pprFlavour info <+> text "family"++++{- *********************************************************************+*                                                                      *+               Data types and data constructors+*                                                                      *+********************************************************************* -}++-- | Haskell Data type Definition+data HsDataDefn pass   -- The payload of a data type defn+                       -- Used *both* for vanilla data declarations,+                       --       *and* for data family instances+  = -- | Declares a data type or newtype, giving its constructors+    -- @+    --  data/newtype T a = <constrs>+    --  data/newtype instance T [a] = <constrs>+    -- @+    HsDataDefn { dd_ext    :: XCHsDataDefn pass,+                 dd_ND     :: NewOrData,+                 dd_ctxt   :: LHsContext pass,           -- ^ Context+                 dd_cType  :: Maybe (Located CType),+                 dd_kindSig:: Maybe (LHsKind pass),+                     -- ^ Optional kind signature.+                     --+                     -- @(Just k)@ for a GADT-style @data@,+                     -- or @data instance@ decl, with explicit kind sig+                     --+                     -- Always @Nothing@ for H98-syntax decls++                 dd_cons   :: [LConDecl pass],+                     -- ^ Data constructors+                     --+                     -- For @data T a = T1 | T2 a@+                     --   the 'LConDecl's all have 'ConDeclH98'.+                     -- For @data T a where { T1 :: T a }@+                     --   the 'LConDecls' all have 'ConDeclGADT'.++                 dd_derivs :: HsDeriving pass  -- ^ Optional 'deriving' claues++             -- For details on above see note [Api annotations] in ApiAnnotation+   }+  | XHsDataDefn (XXHsDataDefn pass)++type instance XCHsDataDefn    (GhcPass _) = NoExtField++type instance XXHsDataDefn    (GhcPass _) = NoExtCon++-- | Haskell Deriving clause+type HsDeriving pass = Located [LHsDerivingClause pass]+  -- ^ The optional @deriving@ clauses of a data declaration. "Clauses" is+  -- plural because one can specify multiple deriving clauses using the+  -- @-XDerivingStrategies@ language extension.+  --+  -- The list of 'LHsDerivingClause's corresponds to exactly what the user+  -- requested to derive, in order. If no deriving clauses were specified,+  -- the list is empty.++type LHsDerivingClause pass = Located (HsDerivingClause pass)++-- | A single @deriving@ clause of a data declaration.+--+--  - 'ApiAnnotation.AnnKeywordId' :+--       'ApiAnnotation.AnnDeriving', 'ApiAnnotation.AnnStock',+--       'ApiAnnotation.AnnAnyClass', 'Api.AnnNewtype',+--       'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'+data HsDerivingClause pass+  -- See Note [Deriving strategies] in TcDeriv+  = HsDerivingClause+    { deriv_clause_ext :: XCHsDerivingClause pass+    , deriv_clause_strategy :: Maybe (LDerivStrategy pass)+      -- ^ The user-specified strategy (if any) to use when deriving+      -- 'deriv_clause_tys'.+    , deriv_clause_tys :: Located [LHsSigType pass]+      -- ^ The types to derive.+      --+      -- It uses 'LHsSigType's because, with @-XGeneralizedNewtypeDeriving@,+      -- we can mention type variables that aren't bound by the datatype, e.g.+      --+      -- > data T b = ... deriving (C [a])+      --+      -- should produce a derived instance for @C [a] (T b)@.+    }+  | XHsDerivingClause (XXHsDerivingClause pass)++type instance XCHsDerivingClause    (GhcPass _) = NoExtField+type instance XXHsDerivingClause    (GhcPass _) = NoExtCon++instance OutputableBndrId p+       => Outputable (HsDerivingClause (GhcPass p)) where+  ppr (HsDerivingClause { deriv_clause_strategy = dcs+                        , deriv_clause_tys      = L _ dct })+    = hsep [ text "deriving"+           , pp_strat_before+           , pp_dct dct+           , pp_strat_after ]+      where+        -- This complexity is to distinguish between+        --    deriving Show+        --    deriving (Show)+        pp_dct [HsIB { hsib_body = ty }]+                 = ppr (parenthesizeHsType appPrec ty)+        pp_dct _ = parens (interpp'SP dct)++        -- @via@ is unique in that in comes /after/ the class being derived,+        -- so we must special-case it.+        (pp_strat_before, pp_strat_after) =+          case dcs of+            Just (L _ via@ViaStrategy{}) -> (empty, ppr via)+            _                            -> (ppDerivStrategy dcs, empty)+  ppr (XHsDerivingClause x) = ppr x++-- | Located Standalone Kind Signature+type LStandaloneKindSig pass = Located (StandaloneKindSig pass)++data StandaloneKindSig pass+  = StandaloneKindSig (XStandaloneKindSig pass)+      (Located (IdP pass))  -- Why a single binder? See #16754+      (LHsSigType pass)     -- Why not LHsSigWcType? See Note [Wildcards in standalone kind signatures]+  | XStandaloneKindSig (XXStandaloneKindSig pass)++type instance XStandaloneKindSig (GhcPass p) = NoExtField+type instance XXStandaloneKindSig (GhcPass p) = NoExtCon++standaloneKindSigName :: StandaloneKindSig (GhcPass p) -> IdP (GhcPass p)+standaloneKindSigName (StandaloneKindSig _ lname _) = unLoc lname+standaloneKindSigName (XStandaloneKindSig nec) = noExtCon nec++{- Note [Wildcards in standalone kind signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Standalone kind signatures enable polymorphic recursion, and it is unclear how+to reconcile this with partial type signatures, so we disallow wildcards in+them.++We reject wildcards in 'rnStandaloneKindSignature' by returning False for+'StandaloneKindSigCtx' in 'wildCardsAllowed'.++The alternative design is to have special treatment for partial standalone kind+signatures, much like we have special treatment for partial type signatures in+terms. However, partial standalone kind signatures are not a proper replacement+for CUSKs, so this would be a separate feature.+-}++data NewOrData+  = NewType                     -- ^ @newtype Blah ...@+  | DataType                    -- ^ @data Blah ...@+  deriving( Eq, Data )                -- Needed because Demand derives Eq++-- | Convert a 'NewOrData' to a 'TyConFlavour'+newOrDataToFlavour :: NewOrData -> TyConFlavour+newOrDataToFlavour NewType  = NewtypeFlavour+newOrDataToFlavour DataType = DataTypeFlavour+++-- | Located data Constructor Declaration+type LConDecl pass = Located (ConDecl pass)+      -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when+      --   in a GADT constructor list++  -- For details on above see note [Api annotations] in ApiAnnotation++-- |+--+-- @+-- data T b = forall a. Eq a => MkT a b+--   MkT :: forall b a. Eq a => MkT a b+--+-- data T b where+--      MkT1 :: Int -> T Int+--+-- data T = Int `MkT` Int+--        | MkT2+--+-- data T a where+--      Int `MkT` Int :: T Int+-- @+--+-- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen',+--            'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnCLose',+--            'ApiAnnotation.AnnEqual','ApiAnnotation.AnnVbar',+--            'ApiAnnotation.AnnDarrow','ApiAnnotation.AnnDarrow',+--            'ApiAnnotation.AnnForall','ApiAnnotation.AnnDot'++-- For details on above see note [Api annotations] in ApiAnnotation++-- | data Constructor Declaration+data ConDecl pass+  = ConDeclGADT+      { con_g_ext   :: XConDeclGADT pass+      , con_names   :: [Located (IdP pass)]++      -- The next four fields describe the type after the '::'+      -- See Note [GADT abstract syntax]+      -- The following field is Located to anchor API Annotations,+      -- AnnForall and AnnDot.+      , con_forall  :: Located Bool      -- ^ True <=> explicit forall+                                         --   False => hsq_explicit is empty+      , con_qvars   :: LHsQTyVars pass+                       -- Whether or not there is an /explicit/ forall, we still+                       -- need to capture the implicitly-bound type/kind variables++      , con_mb_cxt  :: Maybe (LHsContext pass) -- ^ User-written context (if any)+      , con_args    :: HsConDeclDetails pass   -- ^ Arguments; never InfixCon+      , con_res_ty  :: LHsType pass            -- ^ Result type++      , con_doc     :: Maybe LHsDocString+          -- ^ A possible Haddock comment.+      }++  | ConDeclH98+      { con_ext     :: XConDeclH98 pass+      , con_name    :: Located (IdP pass)++      , con_forall  :: Located Bool+                              -- ^ True <=> explicit user-written forall+                              --     e.g. data T a = forall b. MkT b (b->a)+                              --     con_ex_tvs = {b}+                              -- False => con_ex_tvs is empty+      , con_ex_tvs :: [LHsTyVarBndr pass]      -- ^ Existentials only+      , con_mb_cxt :: Maybe (LHsContext pass)  -- ^ User-written context (if any)+      , con_args   :: HsConDeclDetails pass    -- ^ Arguments; can be InfixCon++      , con_doc       :: Maybe LHsDocString+          -- ^ A possible Haddock comment.+      }+  | XConDecl (XXConDecl pass)++type instance XConDeclGADT (GhcPass _) = NoExtField+type instance XConDeclH98  (GhcPass _) = NoExtField+type instance XXConDecl    (GhcPass _) = NoExtCon++{- Note [GADT abstract syntax]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There's a wrinkle in ConDeclGADT++* For record syntax, it's all uniform.  Given:+      data T a where+        K :: forall a. Ord a => { x :: [a], ... } -> T a+    we make the a ConDeclGADT for K with+       con_qvars  = {a}+       con_mb_cxt = Just [Ord a]+       con_args   = RecCon <the record fields>+       con_res_ty = T a++  We need the RecCon before the reanmer, so we can find the record field+  binders in GHC.Hs.Utils.hsConDeclsBinders.++* However for a GADT constr declaration which is not a record, it can+  be hard parse until we know operator fixities. Consider for example+     C :: a :*: b -> a :*: b -> a :+: b+  Initially this type will parse as+      a :*: (b -> (a :*: (b -> (a :+: b))))+  so it's hard to split up the arguments until we've done the precedence+  resolution (in the renamer).++  So:  - In the parser (RdrHsSyn.mkGadtDecl), we put the whole constr+         type into the res_ty for a ConDeclGADT for now, and use+         PrefixCon []+            con_args   = PrefixCon []+            con_res_ty = a :*: (b -> (a :*: (b -> (a :+: b))))++       - In the renamer (RnSource.rnConDecl), we unravel it afer+         operator fixities are sorted. So we generate. So we end+         up with+            con_args   = PrefixCon [ a :*: b, a :*: b ]+            con_res_ty = a :+: b+-}++-- | Haskell data Constructor Declaration Details+type HsConDeclDetails pass+   = HsConDetails (LBangType pass) (Located [LConDeclField pass])++getConNames :: ConDecl (GhcPass p) -> [Located (IdP (GhcPass p))]+getConNames ConDeclH98  {con_name  = name}  = [name]+getConNames ConDeclGADT {con_names = names} = names+getConNames (XConDecl nec) = noExtCon nec++getConArgs :: ConDecl pass -> HsConDeclDetails pass+getConArgs d = con_args d++hsConDeclArgTys :: HsConDeclDetails pass -> [LBangType pass]+hsConDeclArgTys (PrefixCon tys)    = tys+hsConDeclArgTys (InfixCon ty1 ty2) = [ty1,ty2]+hsConDeclArgTys (RecCon flds)      = map (cd_fld_type . unLoc) (unLoc flds)++hsConDeclTheta :: Maybe (LHsContext pass) -> [LHsType pass]+hsConDeclTheta Nothing            = []+hsConDeclTheta (Just (L _ theta)) = theta++pp_data_defn :: (OutputableBndrId p)+                  => (LHsContext (GhcPass p) -> SDoc)   -- Printing the header+                  -> HsDataDefn (GhcPass p)+                  -> SDoc+pp_data_defn pp_hdr (HsDataDefn { dd_ND = new_or_data, dd_ctxt = context+                                , dd_cType = mb_ct+                                , dd_kindSig = mb_sig+                                , dd_cons = condecls, dd_derivs = derivings })+  | null condecls+  = ppr new_or_data <+> pp_ct <+> pp_hdr context <+> pp_sig+    <+> pp_derivings derivings++  | otherwise+  = hang (ppr new_or_data <+> pp_ct  <+> pp_hdr context <+> pp_sig)+       2 (pp_condecls condecls $$ pp_derivings derivings)+  where+    pp_ct = case mb_ct of+               Nothing   -> empty+               Just ct -> ppr ct+    pp_sig = case mb_sig of+               Nothing   -> empty+               Just kind -> dcolon <+> ppr kind+    pp_derivings (L _ ds) = vcat (map ppr ds)+pp_data_defn _ (XHsDataDefn x) = ppr x++instance OutputableBndrId p+       => Outputable (HsDataDefn (GhcPass p)) where+   ppr d = pp_data_defn (\_ -> text "Naked HsDataDefn") d++instance OutputableBndrId p+       => Outputable (StandaloneKindSig (GhcPass p)) where+  ppr (StandaloneKindSig _ v ki)+    = text "type" <+> pprPrefixOcc (unLoc v) <+> text "::" <+> ppr ki+  ppr (XStandaloneKindSig nec) = noExtCon nec++instance Outputable NewOrData where+  ppr NewType  = text "newtype"+  ppr DataType = text "data"++pp_condecls :: (OutputableBndrId p) => [LConDecl (GhcPass p)] -> SDoc+pp_condecls cs@(L _ ConDeclGADT{} : _) -- In GADT syntax+  = hang (text "where") 2 (vcat (map ppr cs))+pp_condecls cs                    -- In H98 syntax+  = equals <+> sep (punctuate (text " |") (map ppr cs))++instance (OutputableBndrId p) => Outputable (ConDecl (GhcPass p)) where+    ppr = pprConDecl++pprConDecl :: (OutputableBndrId p) => ConDecl (GhcPass p) -> SDoc+pprConDecl (ConDeclH98 { con_name = L _ con+                       , con_ex_tvs = ex_tvs+                       , con_mb_cxt = mcxt+                       , con_args = args+                       , con_doc = doc })+  = sep [ppr_mbDoc doc, pprHsForAll ForallInvis ex_tvs cxt, ppr_details args]+  where+    ppr_details (InfixCon t1 t2) = hsep [ppr t1, pprInfixOcc con, ppr t2]+    ppr_details (PrefixCon tys)  = hsep (pprPrefixOcc con+                                   : map (pprHsType . unLoc) tys)+    ppr_details (RecCon fields)  = pprPrefixOcc con+                                 <+> pprConDeclFields (unLoc fields)+    cxt = fromMaybe noLHsContext mcxt++pprConDecl (ConDeclGADT { con_names = cons, con_qvars = qvars+                        , con_mb_cxt = mcxt, con_args = args+                        , con_res_ty = res_ty, con_doc = doc })+  = ppr_mbDoc doc <+> ppr_con_names cons <+> dcolon+    <+> (sep [pprHsForAll ForallInvis (hsq_explicit qvars) cxt,+              ppr_arrow_chain (get_args args ++ [ppr res_ty]) ])+  where+    get_args (PrefixCon args) = map ppr args+    get_args (RecCon fields)  = [pprConDeclFields (unLoc fields)]+    get_args (InfixCon {})    = pprPanic "pprConDecl:GADT" (ppr cons)++    cxt = fromMaybe noLHsContext mcxt++    ppr_arrow_chain (a:as) = sep (a : map (arrow <+>) as)+    ppr_arrow_chain []     = empty++pprConDecl (XConDecl x) = ppr x++ppr_con_names :: (OutputableBndr a) => [Located a] -> SDoc+ppr_con_names = pprWithCommas (pprPrefixOcc . unLoc)++{-+************************************************************************+*                                                                      *+                Instance declarations+*                                                                      *+************************************************************************++Note [Type family instance declarations in HsSyn]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The data type FamEqn represents one equation of a type family instance.+Aside from the pass, it is also parameterised over another field, feqn_rhs.+feqn_rhs is either an HsDataDefn (for data family instances) or an LHsType+(for type family instances).++Type family instances also include associated type family default equations.+That is because a default for a type family looks like this:++  class C a where+    type family F a b :: Type+    type F c d = (c,d)   -- Default instance++The default declaration is really just a `type instance` declaration, but one+with particularly simple patterns: they must all be distinct type variables.+That's because we will instantiate it (in an instance declaration for `C`) if+we don't give an explicit instance for `F`. Note that the names of the+variables don't need to match those of the class: it really is like a+free-standing `type instance` declaration.+-}++----------------- Type synonym family instances -------------++-- | Located Type Family Instance Equation+type LTyFamInstEqn pass = Located (TyFamInstEqn pass)+  -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'+  --   when in a list++-- For details on above see note [Api annotations] in ApiAnnotation++-- | Haskell Type Patterns+type HsTyPats pass = [LHsTypeArg pass]++{- Note [Family instance declaration binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The feqn_pats field of FamEqn (family instance equation) stores the LHS type+(and kind) patterns. Any type (and kind) variables contained+in these type patterns are bound in the hsib_vars field of the HsImplicitBndrs+in FamInstEqn depending on whether or not an explicit forall is present. In+the case of an explicit forall, the hsib_vars only includes kind variables not+bound in the forall. Otherwise, all type (and kind) variables are bound in+the hsib_vars. In the latter case, note that in particular++* The hsib_vars *includes* any anonymous wildcards.  For example+     type instance F a _ = a+  The hsib_vars will be {a, _}.  Remember that each separate wildcard+  '_' gets its own unique.  In this context wildcards behave just like+  an ordinary type variable, only anonymous.++* The hsib_vars *includes* type variables that are already in scope++   Eg   class C s t where+          type F t p :: *+        instance C w (a,b) where+          type F (a,b) x = x->a+   The hsib_vars of the F decl are {a,b,x}, even though the F decl+   is nested inside the 'instance' decl.++   However after the renamer, the uniques will match up:+        instance C w7 (a8,b9) where+          type F (a8,b9) x10 = x10->a8+   so that we can compare the type pattern in the 'instance' decl and+   in the associated 'type' decl++c.f. Note [TyVar binders for associated decls]+-}++-- | Type Family Instance Equation+type TyFamInstEqn pass = FamInstEqn pass (LHsType pass)++-- | Type family default declarations.+-- A convenient synonym for 'TyFamInstDecl'.+-- See @Note [Type family instance declarations in HsSyn]@.+type TyFamDefltDecl = TyFamInstDecl++-- | Located type family default declarations.+type LTyFamDefltDecl pass = Located (TyFamDefltDecl pass)++-- | Located Type Family Instance Declaration+type LTyFamInstDecl pass = Located (TyFamInstDecl pass)++-- | Type Family Instance Declaration+newtype TyFamInstDecl pass = TyFamInstDecl { tfid_eqn :: TyFamInstEqn pass }+    -- ^+    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',+    --           'ApiAnnotation.AnnInstance',++    -- For details on above see note [Api annotations] in ApiAnnotation++----------------- Data family instances -------------++-- | Located Data Family Instance Declaration+type LDataFamInstDecl pass = Located (DataFamInstDecl pass)++-- | Data Family Instance Declaration+newtype DataFamInstDecl pass+  = DataFamInstDecl { dfid_eqn :: FamInstEqn pass (HsDataDefn pass) }+    -- ^+    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnData',+    --           'ApiAnnotation.AnnNewType','ApiAnnotation.AnnInstance',+    --           'ApiAnnotation.AnnDcolon'+    --           'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpen',+    --           'ApiAnnotation.AnnClose'++    -- For details on above see note [Api annotations] in ApiAnnotation++----------------- Family instances (common types) -------------++-- | Located Family Instance Equation+type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs)++-- | Family Instance Equation+type FamInstEqn pass rhs = HsImplicitBndrs pass (FamEqn pass rhs)+            -- ^ Here, the @pats@ are type patterns (with kind and type bndrs).+            -- See Note [Family instance declaration binders]++-- | Family Equation+--+-- One equation in a type family instance declaration, data family instance+-- declaration, or type family default.+-- See Note [Type family instance declarations in HsSyn]+-- See Note [Family instance declaration binders]+data FamEqn pass rhs+  = FamEqn+       { feqn_ext    :: XCFamEqn pass rhs+       , feqn_tycon  :: Located (IdP pass)+       , feqn_bndrs  :: Maybe [LHsTyVarBndr pass] -- ^ Optional quantified type vars+       , feqn_pats   :: HsTyPats pass+       , feqn_fixity :: LexicalFixity -- ^ Fixity used in the declaration+       , feqn_rhs    :: rhs+       }+    -- ^+    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual'+  | XFamEqn (XXFamEqn pass rhs)++    -- For details on above see note [Api annotations] in ApiAnnotation++type instance XCFamEqn    (GhcPass _) r = NoExtField+type instance XXFamEqn    (GhcPass _) r = NoExtCon++----------------- Class instances -------------++-- | Located Class Instance Declaration+type LClsInstDecl pass = Located (ClsInstDecl pass)++-- | Class Instance Declaration+data ClsInstDecl pass+  = ClsInstDecl+      { cid_ext     :: XCClsInstDecl pass+      , cid_poly_ty :: LHsSigType pass    -- Context => Class Instance-type+                                          -- Using a polytype means that the renamer conveniently+                                          -- figures out the quantified type variables for us.+      , cid_binds         :: LHsBinds pass       -- Class methods+      , cid_sigs          :: [LSig pass]         -- User-supplied pragmatic info+      , cid_tyfam_insts   :: [LTyFamInstDecl pass]   -- Type family instances+      , cid_datafam_insts :: [LDataFamInstDecl pass] -- Data family instances+      , cid_overlap_mode  :: Maybe (Located OverlapMode)+         -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+         --                                    'ApiAnnotation.AnnClose',++        -- For details on above see note [Api annotations] in ApiAnnotation+      }+    -- ^+    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnInstance',+    --           'ApiAnnotation.AnnWhere',+    --           'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',++    -- For details on above see note [Api annotations] in ApiAnnotation+  | XClsInstDecl (XXClsInstDecl pass)++type instance XCClsInstDecl    (GhcPass _) = NoExtField+type instance XXClsInstDecl    (GhcPass _) = NoExtCon++----------------- Instances of all kinds -------------++-- | Located Instance Declaration+type LInstDecl pass = Located (InstDecl pass)++-- | Instance Declaration+data InstDecl pass  -- Both class and family instances+  = ClsInstD+      { cid_d_ext :: XClsInstD pass+      , cid_inst  :: ClsInstDecl pass }+  | DataFamInstD              -- data family instance+      { dfid_ext  :: XDataFamInstD pass+      , dfid_inst :: DataFamInstDecl pass }+  | TyFamInstD              -- type family instance+      { tfid_ext  :: XTyFamInstD pass+      , tfid_inst :: TyFamInstDecl pass }+  | XInstDecl (XXInstDecl pass)++type instance XClsInstD     (GhcPass _) = NoExtField+type instance XDataFamInstD (GhcPass _) = NoExtField+type instance XTyFamInstD   (GhcPass _) = NoExtField+type instance XXInstDecl    (GhcPass _) = NoExtCon++instance OutputableBndrId p+       => Outputable (TyFamInstDecl (GhcPass p)) where+  ppr = pprTyFamInstDecl TopLevel++pprTyFamInstDecl :: (OutputableBndrId p)+                 => TopLevelFlag -> TyFamInstDecl (GhcPass p) -> SDoc+pprTyFamInstDecl top_lvl (TyFamInstDecl { tfid_eqn = eqn })+   = text "type" <+> ppr_instance_keyword top_lvl <+> ppr_fam_inst_eqn eqn++ppr_instance_keyword :: TopLevelFlag -> SDoc+ppr_instance_keyword TopLevel    = text "instance"+ppr_instance_keyword NotTopLevel = empty++pprTyFamDefltDecl :: (OutputableBndrId p)+                  => TyFamDefltDecl (GhcPass p) -> SDoc+pprTyFamDefltDecl = pprTyFamInstDecl NotTopLevel++ppr_fam_inst_eqn :: (OutputableBndrId p)+                 => TyFamInstEqn (GhcPass p) -> SDoc+ppr_fam_inst_eqn (HsIB { hsib_body = FamEqn { feqn_tycon  = L _ tycon+                                            , feqn_bndrs  = bndrs+                                            , feqn_pats   = pats+                                            , feqn_fixity = fixity+                                            , feqn_rhs    = rhs }})+    = pprHsFamInstLHS tycon bndrs pats fixity noLHsContext <+> equals <+> ppr rhs+ppr_fam_inst_eqn (HsIB { hsib_body = XFamEqn x }) = ppr x+ppr_fam_inst_eqn (XHsImplicitBndrs x) = ppr x++instance OutputableBndrId p+       => Outputable (DataFamInstDecl (GhcPass p)) where+  ppr = pprDataFamInstDecl TopLevel++pprDataFamInstDecl :: (OutputableBndrId p)+                   => TopLevelFlag -> DataFamInstDecl (GhcPass p) -> SDoc+pprDataFamInstDecl top_lvl (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =+                             FamEqn { feqn_tycon  = L _ tycon+                                    , feqn_bndrs  = bndrs+                                    , feqn_pats   = pats+                                    , feqn_fixity = fixity+                                    , feqn_rhs    = defn }}})+  = pp_data_defn pp_hdr defn+  where+    pp_hdr ctxt = ppr_instance_keyword top_lvl+              <+> pprHsFamInstLHS tycon bndrs pats fixity ctxt+                  -- pp_data_defn pretty-prints the kind sig. See #14817.++pprDataFamInstDecl _ (DataFamInstDecl (HsIB _ (XFamEqn x)))+  = ppr x+pprDataFamInstDecl _ (DataFamInstDecl (XHsImplicitBndrs x))+  = ppr x++pprDataFamInstFlavour :: DataFamInstDecl (GhcPass p) -> SDoc+pprDataFamInstFlavour (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =+                        FamEqn { feqn_rhs = HsDataDefn { dd_ND = nd }}}})+  = ppr nd+pprDataFamInstFlavour (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =+                        FamEqn { feqn_rhs = XHsDataDefn x}}})+  = ppr x+pprDataFamInstFlavour (DataFamInstDecl (HsIB _ (XFamEqn x)))+  = ppr x+pprDataFamInstFlavour (DataFamInstDecl (XHsImplicitBndrs x))+  = ppr x++pprHsFamInstLHS :: (OutputableBndrId p)+   => IdP (GhcPass p)+   -> Maybe [LHsTyVarBndr (GhcPass p)]+   -> HsTyPats (GhcPass p)+   -> LexicalFixity+   -> LHsContext (GhcPass p)+   -> SDoc+pprHsFamInstLHS thing bndrs typats fixity mb_ctxt+   = hsep [ pprHsExplicitForAll ForallInvis bndrs+          , pprLHsContext mb_ctxt+          , pp_pats typats ]+   where+     pp_pats (patl:patr:pats)+       | Infix <- fixity+       = let pp_op_app = hsep [ ppr patl, pprInfixOcc thing, ppr patr ] in+         case pats of+           [] -> pp_op_app+           _  -> hsep (parens pp_op_app : map ppr pats)++     pp_pats pats = hsep [ pprPrefixOcc thing+                         , hsep (map ppr pats)]++instance OutputableBndrId p+       => Outputable (ClsInstDecl (GhcPass p)) where+    ppr (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = binds+                     , cid_sigs = sigs, cid_tyfam_insts = ats+                     , cid_overlap_mode = mbOverlap+                     , cid_datafam_insts = adts })+      | null sigs, null ats, null adts, isEmptyBag binds  -- No "where" part+      = top_matter++      | otherwise       -- Laid out+      = vcat [ top_matter <+> text "where"+             , nest 2 $ pprDeclList $+               map (pprTyFamInstDecl NotTopLevel . unLoc)   ats +++               map (pprDataFamInstDecl NotTopLevel . unLoc) adts +++               pprLHsBindsForUser binds sigs ]+      where+        top_matter = text "instance" <+> ppOverlapPragma mbOverlap+                                             <+> ppr inst_ty+    ppr (XClsInstDecl x) = ppr x++ppDerivStrategy :: OutputableBndrId p+                => Maybe (LDerivStrategy (GhcPass p)) -> SDoc+ppDerivStrategy mb =+  case mb of+    Nothing       -> empty+    Just (L _ ds) -> ppr ds++ppOverlapPragma :: Maybe (Located OverlapMode) -> SDoc+ppOverlapPragma mb =+  case mb of+    Nothing           -> empty+    Just (L _ (NoOverlap s))    -> maybe_stext s "{-# NO_OVERLAP #-}"+    Just (L _ (Overlappable s)) -> maybe_stext s "{-# OVERLAPPABLE #-}"+    Just (L _ (Overlapping s))  -> maybe_stext s "{-# OVERLAPPING #-}"+    Just (L _ (Overlaps s))     -> maybe_stext s "{-# OVERLAPS #-}"+    Just (L _ (Incoherent s))   -> maybe_stext s "{-# INCOHERENT #-}"+  where+    maybe_stext NoSourceText     alt = text alt+    maybe_stext (SourceText src) _   = text src <+> text "#-}"+++instance (OutputableBndrId p) => Outputable (InstDecl (GhcPass p)) where+    ppr (ClsInstD     { cid_inst  = decl }) = ppr decl+    ppr (TyFamInstD   { tfid_inst = decl }) = ppr decl+    ppr (DataFamInstD { dfid_inst = decl }) = ppr decl+    ppr (XInstDecl x) = ppr x++-- Extract the declarations of associated data types from an instance++instDeclDataFamInsts :: [LInstDecl (GhcPass p)] -> [DataFamInstDecl (GhcPass p)]+instDeclDataFamInsts inst_decls+  = concatMap do_one inst_decls+  where+    do_one (L _ (ClsInstD { cid_inst = ClsInstDecl { cid_datafam_insts = fam_insts } }))+      = map unLoc fam_insts+    do_one (L _ (DataFamInstD { dfid_inst = fam_inst }))      = [fam_inst]+    do_one (L _ (TyFamInstD {}))                              = []+    do_one (L _ (ClsInstD _ (XClsInstDecl nec))) = noExtCon nec+    do_one (L _ (XInstDecl nec))                 = noExtCon nec++{-+************************************************************************+*                                                                      *+\subsection[DerivDecl]{A stand-alone instance deriving declaration}+*                                                                      *+************************************************************************+-}++-- | Located stand-alone 'deriving instance' declaration+type LDerivDecl pass = Located (DerivDecl pass)++-- | Stand-alone 'deriving instance' declaration+data DerivDecl pass = DerivDecl+        { deriv_ext          :: XCDerivDecl pass+        , deriv_type         :: LHsSigWcType pass+          -- ^ The instance type to derive.+          --+          -- It uses an 'LHsSigWcType' because the context is allowed to be a+          -- single wildcard:+          --+          -- > deriving instance _ => Eq (Foo a)+          --+          -- Which signifies that the context should be inferred.++          -- See Note [Inferring the instance context] in TcDerivInfer.++        , deriv_strategy     :: Maybe (LDerivStrategy pass)+        , deriv_overlap_mode :: Maybe (Located OverlapMode)+         -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDeriving',+         --        'ApiAnnotation.AnnInstance', 'ApiAnnotation.AnnStock',+         --        'ApiAnnotation.AnnAnyClass', 'Api.AnnNewtype',+         --        'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'++  -- For details on above see note [Api annotations] in ApiAnnotation+        }+  | XDerivDecl (XXDerivDecl pass)++type instance XCDerivDecl    (GhcPass _) = NoExtField+type instance XXDerivDecl    (GhcPass _) = NoExtCon++instance OutputableBndrId p+       => Outputable (DerivDecl (GhcPass p)) where+    ppr (DerivDecl { deriv_type = ty+                   , deriv_strategy = ds+                   , deriv_overlap_mode = o })+        = hsep [ text "deriving"+               , ppDerivStrategy ds+               , text "instance"+               , ppOverlapPragma o+               , ppr ty ]+    ppr (XDerivDecl x) = ppr x++{-+************************************************************************+*                                                                      *+                Deriving strategies+*                                                                      *+************************************************************************+-}++-- | A 'Located' 'DerivStrategy'.+type LDerivStrategy pass = Located (DerivStrategy pass)++-- | Which technique the user explicitly requested when deriving an instance.+data DerivStrategy pass+  -- See Note [Deriving strategies] in TcDeriv+  = StockStrategy    -- ^ GHC's \"standard\" strategy, which is to implement a+                     --   custom instance for the data type. This only works+                     --   for certain types that GHC knows about (e.g., 'Eq',+                     --   'Show', 'Functor' when @-XDeriveFunctor@ is enabled,+                     --   etc.)+  | AnyclassStrategy -- ^ @-XDeriveAnyClass@+  | NewtypeStrategy  -- ^ @-XGeneralizedNewtypeDeriving@+  | ViaStrategy (XViaStrategy pass)+                     -- ^ @-XDerivingVia@++type instance XViaStrategy GhcPs = LHsSigType GhcPs+type instance XViaStrategy GhcRn = LHsSigType GhcRn+type instance XViaStrategy GhcTc = Type++instance OutputableBndrId p+        => Outputable (DerivStrategy (GhcPass p)) where+    ppr StockStrategy    = text "stock"+    ppr AnyclassStrategy = text "anyclass"+    ppr NewtypeStrategy  = text "newtype"+    ppr (ViaStrategy ty) = text "via" <+> ppr ty++-- | A short description of a @DerivStrategy'@.+derivStrategyName :: DerivStrategy a -> SDoc+derivStrategyName = text . go+  where+    go StockStrategy    = "stock"+    go AnyclassStrategy = "anyclass"+    go NewtypeStrategy  = "newtype"+    go (ViaStrategy {}) = "via"++-- | Eliminate a 'DerivStrategy'.+foldDerivStrategy :: (p ~ GhcPass pass)+                  => r -> (XViaStrategy p -> r) -> DerivStrategy p -> r+foldDerivStrategy other _   StockStrategy    = other+foldDerivStrategy other _   AnyclassStrategy = other+foldDerivStrategy other _   NewtypeStrategy  = other+foldDerivStrategy _     via (ViaStrategy t)  = via t++-- | Map over the @via@ type if dealing with 'ViaStrategy'. Otherwise,+-- return the 'DerivStrategy' unchanged.+mapDerivStrategy :: (p ~ GhcPass pass)+                 => (XViaStrategy p -> XViaStrategy p)+                 -> DerivStrategy p -> DerivStrategy p+mapDerivStrategy f ds = foldDerivStrategy ds (ViaStrategy . f) ds++{-+************************************************************************+*                                                                      *+\subsection[DefaultDecl]{A @default@ declaration}+*                                                                      *+************************************************************************++There can only be one default declaration per module, but it is hard+for the parser to check that; we pass them all through in the abstract+syntax, and that restriction must be checked in the front end.+-}++-- | Located Default Declaration+type LDefaultDecl pass = Located (DefaultDecl pass)++-- | Default Declaration+data DefaultDecl pass+  = DefaultDecl (XCDefaultDecl pass) [LHsType pass]+        -- ^ - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnDefault',+        --          'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | XDefaultDecl (XXDefaultDecl pass)++type instance XCDefaultDecl    (GhcPass _) = NoExtField+type instance XXDefaultDecl    (GhcPass _) = NoExtCon++instance OutputableBndrId p+       => Outputable (DefaultDecl (GhcPass p)) where+    ppr (DefaultDecl _ tys)+      = text "default" <+> parens (interpp'SP tys)+    ppr (XDefaultDecl x) = ppr x++{-+************************************************************************+*                                                                      *+\subsection{Foreign function interface declaration}+*                                                                      *+************************************************************************+-}++-- foreign declarations are distinguished as to whether they define or use a+-- Haskell name+--+--  * the Boolean value indicates whether the pre-standard deprecated syntax+--   has been used++-- | Located Foreign Declaration+type LForeignDecl pass = Located (ForeignDecl pass)++-- | Foreign Declaration+data ForeignDecl pass+  = ForeignImport+      { fd_i_ext  :: XForeignImport pass   -- Post typechecker, rep_ty ~ sig_ty+      , fd_name   :: Located (IdP pass)    -- defines this name+      , fd_sig_ty :: LHsSigType pass       -- sig_ty+      , fd_fi     :: ForeignImport }++  | ForeignExport+      { fd_e_ext  :: XForeignExport pass   -- Post typechecker, rep_ty ~ sig_ty+      , fd_name   :: Located (IdP pass)    -- uses this name+      , fd_sig_ty :: LHsSigType pass       -- sig_ty+      , fd_fe     :: ForeignExport }+        -- ^+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnForeign',+        --           'ApiAnnotation.AnnImport','ApiAnnotation.AnnExport',+        --           'ApiAnnotation.AnnDcolon'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | XForeignDecl (XXForeignDecl pass)++{-+    In both ForeignImport and ForeignExport:+        sig_ty is the type given in the Haskell code+        rep_ty is the representation for this type, i.e. with newtypes+               coerced away and type functions evaluated.+    Thus if the declaration is valid, then rep_ty will only use types+    such as Int and IO that we know how to make foreign calls with.+-}++type instance XForeignImport   GhcPs = NoExtField+type instance XForeignImport   GhcRn = NoExtField+type instance XForeignImport   GhcTc = Coercion++type instance XForeignExport   GhcPs = NoExtField+type instance XForeignExport   GhcRn = NoExtField+type instance XForeignExport   GhcTc = Coercion++type instance XXForeignDecl    (GhcPass _) = NoExtCon++-- Specification Of an imported external entity in dependence on the calling+-- convention+--+data ForeignImport = -- import of a C entity+                     --+                     --  * the two strings specifying a header file or library+                     --   may be empty, which indicates the absence of a+                     --   header or object specification (both are not used+                     --   in the case of `CWrapper' and when `CFunction'+                     --   has a dynamic target)+                     --+                     --  * the calling convention is irrelevant for code+                     --   generation in the case of `CLabel', but is needed+                     --   for pretty printing+                     --+                     --  * `Safety' is irrelevant for `CLabel' and `CWrapper'+                     --+                     CImport  (Located CCallConv) -- ccall or stdcall+                              (Located Safety)  -- interruptible, safe or unsafe+                              (Maybe Header)       -- name of C header+                              CImportSpec          -- details of the C entity+                              (Located SourceText) -- original source text for+                                                   -- the C entity+  deriving Data++-- details of an external C entity+--+data CImportSpec = CLabel    CLabelString     -- import address of a C label+                 | CFunction CCallTarget      -- static or dynamic function+                 | CWrapper                   -- wrapper to expose closures+                                              -- (former f.e.d.)+  deriving Data++-- specification of an externally exported entity in dependence on the calling+-- convention+--+data ForeignExport = CExport  (Located CExportSpec) -- contains the calling+                                                    -- convention+                              (Located SourceText)  -- original source text for+                                                    -- the C entity+  deriving Data++-- pretty printing of foreign declarations+--++instance OutputableBndrId p+       => Outputable (ForeignDecl (GhcPass p)) where+  ppr (ForeignImport { fd_name = n, fd_sig_ty = ty, fd_fi = fimport })+    = hang (text "foreign import" <+> ppr fimport <+> ppr n)+         2 (dcolon <+> ppr ty)+  ppr (ForeignExport { fd_name = n, fd_sig_ty = ty, fd_fe = fexport }) =+    hang (text "foreign export" <+> ppr fexport <+> ppr n)+       2 (dcolon <+> ppr ty)+  ppr (XForeignDecl x) = ppr x++instance Outputable ForeignImport where+  ppr (CImport  cconv safety mHeader spec (L _ srcText)) =+    ppr cconv <+> ppr safety+      <+> pprWithSourceText srcText (pprCEntity spec "")+    where+      pp_hdr = case mHeader of+               Nothing -> empty+               Just (Header _ header) -> ftext header++      pprCEntity (CLabel lbl) _ =+        doubleQuotes $ text "static" <+> pp_hdr <+> char '&' <> ppr lbl+      pprCEntity (CFunction (StaticTarget st _lbl _ isFun)) src =+        if dqNeeded then doubleQuotes ce else empty+          where+            dqNeeded = (take 6 src == "static")+                    || isJust mHeader+                    || not isFun+                    || st /= NoSourceText+            ce =+                  -- We may need to drop leading spaces first+                  (if take 6 src == "static" then text "static" else empty)+              <+> pp_hdr+              <+> (if isFun then empty else text "value")+              <+> (pprWithSourceText st empty)+      pprCEntity (CFunction DynamicTarget) _ =+        doubleQuotes $ text "dynamic"+      pprCEntity CWrapper _ = doubleQuotes $ text "wrapper"++instance Outputable ForeignExport where+  ppr (CExport  (L _ (CExportStatic _ lbl cconv)) _) =+    ppr cconv <+> char '"' <> ppr lbl <> char '"'++{-+************************************************************************+*                                                                      *+\subsection{Transformation rules}+*                                                                      *+************************************************************************+-}++-- | Located Rule Declarations+type LRuleDecls pass = Located (RuleDecls pass)++  -- Note [Pragma source text] in BasicTypes+-- | Rule Declarations+data RuleDecls pass = HsRules { rds_ext   :: XCRuleDecls pass+                              , rds_src   :: SourceText+                              , rds_rules :: [LRuleDecl pass] }+  | XRuleDecls (XXRuleDecls pass)++type instance XCRuleDecls    (GhcPass _) = NoExtField+type instance XXRuleDecls    (GhcPass _) = NoExtCon++-- | Located Rule Declaration+type LRuleDecl pass = Located (RuleDecl pass)++-- | Rule Declaration+data RuleDecl pass+  = HsRule -- Source rule+       { rd_ext  :: XHsRule pass+           -- ^ After renamer, free-vars from the LHS and RHS+       , rd_name :: Located (SourceText,RuleName)+           -- ^ Note [Pragma source text] in BasicTypes+       , rd_act  :: Activation+       , rd_tyvs :: Maybe [LHsTyVarBndr (NoGhcTc pass)]+           -- ^ Forall'd type vars+       , rd_tmvs :: [LRuleBndr pass]+           -- ^ Forall'd term vars, before typechecking; after typechecking+           --    this includes all forall'd vars+       , rd_lhs  :: Located (HsExpr pass)+       , rd_rhs  :: Located (HsExpr pass)+       }+    -- ^+    --  - 'ApiAnnotation.AnnKeywordId' :+    --           'ApiAnnotation.AnnOpen','ApiAnnotation.AnnTilde',+    --           'ApiAnnotation.AnnVal',+    --           'ApiAnnotation.AnnClose',+    --           'ApiAnnotation.AnnForall','ApiAnnotation.AnnDot',+    --           'ApiAnnotation.AnnEqual',+  | XRuleDecl (XXRuleDecl pass)++data HsRuleRn = HsRuleRn NameSet NameSet -- Free-vars from the LHS and RHS+  deriving Data++type instance XHsRule       GhcPs = NoExtField+type instance XHsRule       GhcRn = HsRuleRn+type instance XHsRule       GhcTc = HsRuleRn++type instance XXRuleDecl    (GhcPass _) = NoExtCon++flattenRuleDecls :: [LRuleDecls pass] -> [LRuleDecl pass]+flattenRuleDecls decls = concatMap (rds_rules . unLoc) decls++-- | Located Rule Binder+type LRuleBndr pass = Located (RuleBndr pass)++-- | Rule Binder+data RuleBndr pass+  = RuleBndr (XCRuleBndr pass)  (Located (IdP pass))+  | RuleBndrSig (XRuleBndrSig pass) (Located (IdP pass)) (LHsSigWcType pass)+  | XRuleBndr (XXRuleBndr pass)+        -- ^+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+        --     'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation++type instance XCRuleBndr    (GhcPass _) = NoExtField+type instance XRuleBndrSig  (GhcPass _) = NoExtField+type instance XXRuleBndr    (GhcPass _) = NoExtCon++collectRuleBndrSigTys :: [RuleBndr pass] -> [LHsSigWcType pass]+collectRuleBndrSigTys bndrs = [ty | RuleBndrSig _ _ ty <- bndrs]++pprFullRuleName :: Located (SourceText, RuleName) -> SDoc+pprFullRuleName (L _ (st, n)) = pprWithSourceText st (doubleQuotes $ ftext n)++instance (OutputableBndrId p) => Outputable (RuleDecls (GhcPass p)) where+  ppr (HsRules { rds_src = st+               , rds_rules = rules })+    = pprWithSourceText st (text "{-# RULES")+          <+> vcat (punctuate semi (map ppr rules)) <+> text "#-}"+  ppr (XRuleDecls x) = ppr x++instance (OutputableBndrId p) => Outputable (RuleDecl (GhcPass p)) where+  ppr (HsRule { rd_name = name+              , rd_act  = act+              , rd_tyvs = tys+              , rd_tmvs = tms+              , rd_lhs  = lhs+              , rd_rhs  = rhs })+        = sep [pprFullRuleName name <+> ppr act,+               nest 4 (pp_forall_ty tys <+> pp_forall_tm tys+                                        <+> pprExpr (unLoc lhs)),+               nest 6 (equals <+> pprExpr (unLoc rhs)) ]+        where+          pp_forall_ty Nothing     = empty+          pp_forall_ty (Just qtvs) = forAllLit <+> fsep (map ppr qtvs) <> dot+          pp_forall_tm Nothing | null tms = empty+          pp_forall_tm _ = forAllLit <+> fsep (map ppr tms) <> dot+  ppr (XRuleDecl x) = ppr x++instance (OutputableBndrId p) => Outputable (RuleBndr (GhcPass p)) where+   ppr (RuleBndr _ name) = ppr name+   ppr (RuleBndrSig _ name ty) = parens (ppr name <> dcolon <> ppr ty)+   ppr (XRuleBndr x) = ppr x++{-+************************************************************************+*                                                                      *+\subsection[DocDecl]{Document comments}+*                                                                      *+************************************************************************+-}++-- | Located Documentation comment Declaration+type LDocDecl = Located (DocDecl)++-- | Documentation comment Declaration+data DocDecl+  = DocCommentNext HsDocString+  | DocCommentPrev HsDocString+  | DocCommentNamed String HsDocString+  | DocGroup Int HsDocString+  deriving Data++-- Okay, I need to reconstruct the document comments, but for now:+instance Outputable DocDecl where+  ppr _ = text "<document comment>"++docDeclDoc :: DocDecl -> HsDocString+docDeclDoc (DocCommentNext d) = d+docDeclDoc (DocCommentPrev d) = d+docDeclDoc (DocCommentNamed _ d) = d+docDeclDoc (DocGroup _ d) = d++{-+************************************************************************+*                                                                      *+\subsection[DeprecDecl]{Deprecations}+*                                                                      *+************************************************************************++We use exported entities for things to deprecate.+-}++-- | Located Warning Declarations+type LWarnDecls pass = Located (WarnDecls pass)++ -- Note [Pragma source text] in BasicTypes+-- | Warning pragma Declarations+data WarnDecls pass = Warnings { wd_ext      :: XWarnings pass+                               , wd_src      :: SourceText+                               , wd_warnings :: [LWarnDecl pass]+                               }+  | XWarnDecls (XXWarnDecls pass)++type instance XWarnings      (GhcPass _) = NoExtField+type instance XXWarnDecls    (GhcPass _) = NoExtCon++-- | Located Warning pragma Declaration+type LWarnDecl pass = Located (WarnDecl pass)++-- | Warning pragma Declaration+data WarnDecl pass = Warning (XWarning pass) [Located (IdP pass)] WarningTxt+                   | XWarnDecl (XXWarnDecl pass)++type instance XWarning      (GhcPass _) = NoExtField+type instance XXWarnDecl    (GhcPass _) = NoExtCon+++instance OutputableBndr (IdP (GhcPass p))+        => Outputable (WarnDecls (GhcPass p)) where+    ppr (Warnings _ (SourceText src) decls)+      = text src <+> vcat (punctuate comma (map ppr decls)) <+> text "#-}"+    ppr (Warnings _ NoSourceText _decls) = panic "WarnDecls"+    ppr (XWarnDecls x) = ppr x++instance OutputableBndr (IdP (GhcPass p))+       => Outputable (WarnDecl (GhcPass p)) where+    ppr (Warning _ thing txt)+      = hsep ( punctuate comma (map ppr thing))+              <+> ppr txt+    ppr (XWarnDecl x) = ppr x++{-+************************************************************************+*                                                                      *+\subsection[AnnDecl]{Annotations}+*                                                                      *+************************************************************************+-}++-- | Located Annotation Declaration+type LAnnDecl pass = Located (AnnDecl pass)++-- | Annotation Declaration+data AnnDecl pass = HsAnnotation+                      (XHsAnnotation pass)+                      SourceText -- Note [Pragma source text] in BasicTypes+                      (AnnProvenance (IdP pass)) (Located (HsExpr pass))+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+      --           'ApiAnnotation.AnnType'+      --           'ApiAnnotation.AnnModule'+      --           'ApiAnnotation.AnnClose'++      -- For details on above see note [Api annotations] in ApiAnnotation+  | XAnnDecl (XXAnnDecl pass)++type instance XHsAnnotation (GhcPass _) = NoExtField+type instance XXAnnDecl     (GhcPass _) = NoExtCon++instance (OutputableBndrId p) => Outputable (AnnDecl (GhcPass p)) where+    ppr (HsAnnotation _ _ provenance expr)+      = hsep [text "{-#", pprAnnProvenance provenance, pprExpr (unLoc expr), text "#-}"]+    ppr (XAnnDecl x) = ppr x++-- | Annotation Provenance+data AnnProvenance name = ValueAnnProvenance (Located name)+                        | TypeAnnProvenance (Located name)+                        | ModuleAnnProvenance+deriving instance Functor     AnnProvenance+deriving instance Foldable    AnnProvenance+deriving instance Traversable AnnProvenance+deriving instance (Data pass) => Data (AnnProvenance pass)++annProvenanceName_maybe :: AnnProvenance name -> Maybe name+annProvenanceName_maybe (ValueAnnProvenance (L _ name)) = Just name+annProvenanceName_maybe (TypeAnnProvenance (L _ name))  = Just name+annProvenanceName_maybe ModuleAnnProvenance       = Nothing++pprAnnProvenance :: OutputableBndr name => AnnProvenance name -> SDoc+pprAnnProvenance ModuleAnnProvenance       = text "ANN module"+pprAnnProvenance (ValueAnnProvenance (L _ name))+  = text "ANN" <+> ppr name+pprAnnProvenance (TypeAnnProvenance (L _ name))+  = text "ANN type" <+> ppr name++{-+************************************************************************+*                                                                      *+\subsection[RoleAnnot]{Role annotations}+*                                                                      *+************************************************************************+-}++-- | Located Role Annotation Declaration+type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass)++-- See #8185 for more info about why role annotations are+-- top-level declarations+-- | Role Annotation Declaration+data RoleAnnotDecl pass+  = RoleAnnotDecl (XCRoleAnnotDecl pass)+                  (Located (IdP pass))   -- type constructor+                  [Located (Maybe Role)] -- optional annotations+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',+      --           'ApiAnnotation.AnnRole'++      -- For details on above see note [Api annotations] in ApiAnnotation+  | XRoleAnnotDecl (XXRoleAnnotDecl pass)++type instance XCRoleAnnotDecl (GhcPass _) = NoExtField+type instance XXRoleAnnotDecl (GhcPass _) = NoExtCon++instance OutputableBndr (IdP (GhcPass p))+       => Outputable (RoleAnnotDecl (GhcPass p)) where+  ppr (RoleAnnotDecl _ ltycon roles)+    = text "type role" <+> pprPrefixOcc (unLoc ltycon) <+>+      hsep (map (pp_role . unLoc) roles)+    where+      pp_role Nothing  = underscore+      pp_role (Just r) = ppr r+  ppr (XRoleAnnotDecl x) = ppr x++roleAnnotDeclName :: RoleAnnotDecl (GhcPass p) -> IdP (GhcPass p)+roleAnnotDeclName (RoleAnnotDecl _ (L _ name) _) = name+roleAnnotDeclName (XRoleAnnotDecl nec) = noExtCon nec
+ GHC/Hs/Doc.hs view
@@ -0,0 +1,152 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}++module GHC.Hs.Doc+  ( HsDocString+  , LHsDocString+  , mkHsDocString+  , mkHsDocStringUtf8ByteString+  , unpackHDS+  , hsDocStringToByteString+  , ppr_mbDoc++  , appendDocs+  , concatDocs++  , DeclDocMap(..)+  , emptyDeclDocMap++  , ArgDocMap(..)+  , emptyArgDocMap+  ) where++#include "HsVersions.h"++import GhcPrelude++import Binary+import Encoding+import FastFunctions+import Name+import Outputable+import SrcLoc++import Data.ByteString (ByteString)+import qualified Data.ByteString as BS+import qualified Data.ByteString.Char8 as C8+import qualified Data.ByteString.Internal as BS+import Data.Data+import Data.Map (Map)+import qualified Data.Map as Map+import Data.Maybe+import Foreign++-- | Haskell Documentation String+--+-- Internally this is a UTF8-Encoded 'ByteString'.+newtype HsDocString = HsDocString ByteString+  -- There are at least two plausible Semigroup instances for this type:+  --+  -- 1. Simple string concatenation.+  -- 2. Concatenation as documentation paragraphs with newlines in between.+  --+  -- To avoid confusion, we pass on defining an instance at all.+  deriving (Eq, Show, Data)++-- | Located Haskell Documentation String+type LHsDocString = Located HsDocString++instance Binary HsDocString where+  put_ bh (HsDocString bs) = put_ bh bs+  get bh = HsDocString <$> get bh++instance Outputable HsDocString where+  ppr = doubleQuotes . text . unpackHDS++mkHsDocString :: String -> HsDocString+mkHsDocString s =+  inlinePerformIO $ do+    let len = utf8EncodedLength s+    buf <- mallocForeignPtrBytes len+    withForeignPtr buf $ \ptr -> do+      utf8EncodeString ptr s+      pure (HsDocString (BS.fromForeignPtr buf 0 len))++-- | Create a 'HsDocString' from a UTF8-encoded 'ByteString'.+mkHsDocStringUtf8ByteString :: ByteString -> HsDocString+mkHsDocStringUtf8ByteString = HsDocString++unpackHDS :: HsDocString -> String+unpackHDS = utf8DecodeByteString . hsDocStringToByteString++-- | Return the contents of a 'HsDocString' as a UTF8-encoded 'ByteString'.+hsDocStringToByteString :: HsDocString -> ByteString+hsDocStringToByteString (HsDocString bs) = bs++ppr_mbDoc :: Maybe LHsDocString -> SDoc+ppr_mbDoc (Just doc) = ppr doc+ppr_mbDoc Nothing    = empty++-- | Join two docstrings.+--+-- Non-empty docstrings are joined with two newlines in between,+-- resulting in separate paragraphs.+appendDocs :: HsDocString -> HsDocString -> HsDocString+appendDocs x y =+  fromMaybe+    (HsDocString BS.empty)+    (concatDocs [x, y])++-- | Concat docstrings with two newlines in between.+--+-- Empty docstrings are skipped.+--+-- If all inputs are empty, 'Nothing' is returned.+concatDocs :: [HsDocString] -> Maybe HsDocString+concatDocs xs =+    if BS.null b+      then Nothing+      else Just (HsDocString b)+  where+    b = BS.intercalate (C8.pack "\n\n")+      . filter (not . BS.null)+      . map hsDocStringToByteString+      $ xs++-- | Docs for declarations: functions, data types, instances, methods etc.+newtype DeclDocMap = DeclDocMap (Map Name HsDocString)++instance Binary DeclDocMap where+  put_ bh (DeclDocMap m) = put_ bh (Map.toList m)+  -- We can't rely on a deterministic ordering of the `Name`s here.+  -- See the comments on `Name`'s `Ord` instance for context.+  get bh = DeclDocMap . Map.fromList <$> get bh++instance Outputable DeclDocMap where+  ppr (DeclDocMap m) = vcat (map pprPair (Map.toAscList m))+    where+      pprPair (name, doc) = ppr name Outputable.<> colon $$ nest 2 (ppr doc)++emptyDeclDocMap :: DeclDocMap+emptyDeclDocMap = DeclDocMap Map.empty++-- | Docs for arguments. E.g. function arguments, method arguments.+newtype ArgDocMap = ArgDocMap (Map Name (Map Int HsDocString))++instance Binary ArgDocMap where+  put_ bh (ArgDocMap m) = put_ bh (Map.toList (Map.toAscList <$> m))+  -- We can't rely on a deterministic ordering of the `Name`s here.+  -- See the comments on `Name`'s `Ord` instance for context.+  get bh = ArgDocMap . fmap Map.fromDistinctAscList . Map.fromList <$> get bh++instance Outputable ArgDocMap where+  ppr (ArgDocMap m) = vcat (map pprPair (Map.toAscList m))+    where+      pprPair (name, int_map) =+        ppr name Outputable.<> colon $$ nest 2 (pprIntMap int_map)+      pprIntMap im = vcat (map pprIPair (Map.toAscList im))+      pprIPair (i, doc) = ppr i Outputable.<> colon $$ nest 2 (ppr doc)++emptyArgDocMap :: ArgDocMap+emptyArgDocMap = ArgDocMap Map.empty
+ GHC/Hs/Dump.hs view
@@ -0,0 +1,220 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE ScopedTypeVariables #-}++-- | Contains a debug function to dump parts of the GHC.Hs AST. It uses a syb+-- traversal which falls back to displaying based on the constructor name, so+-- can be used to dump anything having a @Data.Data@ instance.++module GHC.Hs.Dump (+        -- * Dumping ASTs+        showAstData,+        BlankSrcSpan(..),+    ) where++import GhcPrelude++import Data.Data hiding (Fixity)+import Bag+import BasicTypes+import FastString+import NameSet+import Name+import DataCon+import SrcLoc+import GHC.Hs+import OccName hiding (occName)+import Var+import Module+import Outputable++import qualified Data.ByteString as B++data BlankSrcSpan = BlankSrcSpan | NoBlankSrcSpan+                  deriving (Eq,Show)++-- | Show a GHC syntax tree. This parameterised because it is also used for+-- comparing ASTs in ppr roundtripping tests, where the SrcSpan's are blanked+-- out, to avoid comparing locations, only structure+showAstData :: Data a => BlankSrcSpan -> a -> SDoc+showAstData b a0 = blankLine $$ showAstData' a0+  where+    showAstData' :: Data a => a -> SDoc+    showAstData' =+      generic+              `ext1Q` list+              `extQ` string `extQ` fastString `extQ` srcSpan+              `extQ` lit `extQ` litr `extQ` litt+              `extQ` bytestring+              `extQ` name `extQ` occName `extQ` moduleName `extQ` var+              `extQ` dataCon+              `extQ` bagName `extQ` bagRdrName `extQ` bagVar `extQ` nameSet+              `extQ` fixity+              `ext2Q` located++      where generic :: Data a => a -> SDoc+            generic t = parens $ text (showConstr (toConstr t))+                                  $$ vcat (gmapQ showAstData' t)++            string :: String -> SDoc+            string     = text . normalize_newlines . show++            fastString :: FastString -> SDoc+            fastString s = braces $+                            text "FastString: "+                         <> text (normalize_newlines . show $ s)++            bytestring :: B.ByteString -> SDoc+            bytestring = text . normalize_newlines . show++            list []    = brackets empty+            list [x]   = brackets (showAstData' x)+            list (x1 : x2 : xs) =  (text "[" <> showAstData' x1)+                                $$ go x2 xs+              where+                go y [] = text "," <> showAstData' y <> text "]"+                go y1 (y2 : ys) = (text "," <> showAstData' y1) $$ go y2 ys++            -- Eliminate word-size dependence+            lit :: HsLit GhcPs -> SDoc+            lit (HsWordPrim   s x) = numericLit "HsWord{64}Prim" x s+            lit (HsWord64Prim s x) = numericLit "HsWord{64}Prim" x s+            lit (HsIntPrim    s x) = numericLit "HsInt{64}Prim"  x s+            lit (HsInt64Prim  s x) = numericLit "HsInt{64}Prim"  x s+            lit l                  = generic l++            litr :: HsLit GhcRn -> SDoc+            litr (HsWordPrim   s x) = numericLit "HsWord{64}Prim" x s+            litr (HsWord64Prim s x) = numericLit "HsWord{64}Prim" x s+            litr (HsIntPrim    s x) = numericLit "HsInt{64}Prim"  x s+            litr (HsInt64Prim  s x) = numericLit "HsInt{64}Prim"  x s+            litr l                  = generic l++            litt :: HsLit GhcTc -> SDoc+            litt (HsWordPrim   s x) = numericLit "HsWord{64}Prim" x s+            litt (HsWord64Prim s x) = numericLit "HsWord{64}Prim" x s+            litt (HsIntPrim    s x) = numericLit "HsInt{64}Prim"  x s+            litt (HsInt64Prim  s x) = numericLit "HsInt{64}Prim"  x s+            litt l                  = generic l++            numericLit :: String -> Integer -> SourceText -> SDoc+            numericLit tag x s = braces $ hsep [ text tag+                                               , generic x+                                               , generic s ]++            name :: Name -> SDoc+            name nm    = braces $ text "Name: " <> ppr nm++            occName n  =  braces $+                          text "OccName: "+                       <> text (OccName.occNameString n)++            moduleName :: ModuleName -> SDoc+            moduleName m = braces $ text "ModuleName: " <> ppr m++            srcSpan :: SrcSpan -> SDoc+            srcSpan ss = case b of+             BlankSrcSpan -> text "{ ss }"+             NoBlankSrcSpan -> braces $ char ' ' <>+                             (hang (ppr ss) 1+                                   -- TODO: show annotations here+                                   (text ""))++            var  :: Var -> SDoc+            var v      = braces $ text "Var: " <> ppr v++            dataCon :: DataCon -> SDoc+            dataCon c  = braces $ text "DataCon: " <> ppr c++            bagRdrName:: Bag (Located (HsBind GhcPs)) -> SDoc+            bagRdrName bg =  braces $+                             text "Bag(Located (HsBind GhcPs)):"+                          $$ (list . bagToList $ bg)++            bagName   :: Bag (Located (HsBind GhcRn)) -> SDoc+            bagName bg  =  braces $+                           text "Bag(Located (HsBind Name)):"+                        $$ (list . bagToList $ bg)++            bagVar    :: Bag (Located (HsBind GhcTc)) -> SDoc+            bagVar bg  =  braces $+                          text "Bag(Located (HsBind Var)):"+                       $$ (list . bagToList $ bg)++            nameSet ns =  braces $+                          text "NameSet:"+                       $$ (list . nameSetElemsStable $ ns)++            fixity :: Fixity -> SDoc+            fixity fx =  braces $+                         text "Fixity: "+                      <> ppr fx++            located :: (Data b,Data loc) => GenLocated loc b -> SDoc+            located (L ss a) = parens $+                   case cast ss of+                        Just (s :: SrcSpan) ->+                          srcSpan s+                        Nothing -> text "nnnnnnnn"+                      $$ showAstData' a++normalize_newlines :: String -> String+normalize_newlines ('\\':'r':'\\':'n':xs) = '\\':'n':normalize_newlines xs+normalize_newlines (x:xs)                 = x:normalize_newlines xs+normalize_newlines []                     = []++{-+************************************************************************+*                                                                      *+* Copied from syb+*                                                                      *+************************************************************************+-}+++-- | The type constructor for queries+newtype Q q x = Q { unQ :: x -> q }++-- | Extend a generic query by a type-specific case+extQ :: ( Typeable a+        , Typeable b+        )+     => (a -> q)+     -> (b -> q)+     -> a+     -> q+extQ f g a = maybe (f a) g (cast a)++-- | Type extension of queries for type constructors+ext1Q :: (Data d, Typeable t)+      => (d -> q)+      -> (forall e. Data e => t e -> q)+      -> d -> q+ext1Q def ext = unQ ((Q def) `ext1` (Q ext))+++-- | Type extension of queries for type constructors+ext2Q :: (Data d, Typeable t)+      => (d -> q)+      -> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> q)+      -> d -> q+ext2Q def ext = unQ ((Q def) `ext2` (Q ext))++-- | Flexible type extension+ext1 :: (Data a, Typeable t)+     => c a+     -> (forall d. Data d => c (t d))+     -> c a+ext1 def ext = maybe def id (dataCast1 ext)++++-- | Flexible type extension+ext2 :: (Data a, Typeable t)+     => c a+     -> (forall d1 d2. (Data d1, Data d2) => c (t d1 d2))+     -> c a+ext2 def ext = maybe def id (dataCast2 ext)
+ GHC/Hs/Expr.hs view
@@ -0,0 +1,2920 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+-}++{-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns #-}++-- | Abstract Haskell syntax for expressions.+module GHC.Hs.Expr where++#include "HsVersions.h"++-- friends:+import GhcPrelude++import GHC.Hs.Decls+import GHC.Hs.Pat+import GHC.Hs.Lit+import GHC.Hs.PlaceHolder ( NameOrRdrName )+import GHC.Hs.Extension+import GHC.Hs.Types+import GHC.Hs.Binds++-- others:+import TcEvidence+import CoreSyn+import DynFlags ( gopt, GeneralFlag(Opt_PrintExplicitCoercions) )+import Name+import NameSet+import RdrName  ( GlobalRdrEnv )+import BasicTypes+import ConLike+import SrcLoc+import Util+import Outputable+import FastString+import Type+import TysWiredIn (mkTupleStr)+import TcType (TcType)+import {-# SOURCE #-} TcRnTypes (TcLclEnv)++-- libraries:+import Data.Data hiding (Fixity(..))+import qualified Data.Data as Data (Fixity(..))+import Data.Maybe (isNothing)++import GHCi.RemoteTypes ( ForeignRef )+import qualified Language.Haskell.TH as TH (Q)++{-+************************************************************************+*                                                                      *+\subsection{Expressions proper}+*                                                                      *+************************************************************************+-}++-- * Expressions proper++-- | Located Haskell Expression+type LHsExpr p = Located (HsExpr p)+  -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when+  --   in a list++  -- For details on above see note [Api annotations] in ApiAnnotation++-------------------------+-- | Post-Type checking Expression+--+-- PostTcExpr is an evidence expression attached to the syntax tree by the+-- type checker (c.f. postTcType).+type PostTcExpr  = HsExpr GhcTc++-- | Post-Type checking Table+--+-- We use a PostTcTable where there are a bunch of pieces of evidence, more+-- than is convenient to keep individually.+type PostTcTable = [(Name, PostTcExpr)]++-------------------------+-- | Syntax Expression+--+-- SyntaxExpr is like 'PostTcExpr', but it's filled in a little earlier,+-- by the renamer.  It's used for rebindable syntax.+--+-- E.g. @(>>=)@ is filled in before the renamer by the appropriate 'Name' for+--      @(>>=)@, and then instantiated by the type checker with its type args+--      etc+--+-- This should desugar to+--+-- > syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0)+-- >                         (syn_arg_wraps[1] arg1) ...+--+-- where the actual arguments come from elsewhere in the AST.+-- This could be defined using @GhcPass p@ and such, but it's+-- harder to get it all to work out that way. ('noSyntaxExpr' is hard to+-- write, for example.)+data SyntaxExpr p = SyntaxExpr { syn_expr      :: HsExpr p+                               , syn_arg_wraps :: [HsWrapper]+                               , syn_res_wrap  :: HsWrapper }++-- | This is used for rebindable-syntax pieces that are too polymorphic+-- for tcSyntaxOp (trS_fmap and the mzip in ParStmt)+noExpr :: HsExpr (GhcPass p)+noExpr = HsLit noExtField (HsString (SourceText  "noExpr") (fsLit "noExpr"))++noSyntaxExpr :: SyntaxExpr (GhcPass p)+                              -- Before renaming, and sometimes after,+                              -- (if the syntax slot makes no sense)+noSyntaxExpr = SyntaxExpr { syn_expr      = HsLit noExtField+                                                  (HsString NoSourceText+                                                  (fsLit "noSyntaxExpr"))+                          , syn_arg_wraps = []+                          , syn_res_wrap  = WpHole }++-- | Make a 'SyntaxExpr (HsExpr _)', missing its HsWrappers.+mkSyntaxExpr :: HsExpr (GhcPass p) -> SyntaxExpr (GhcPass p)+mkSyntaxExpr expr = SyntaxExpr { syn_expr      = expr+                               , syn_arg_wraps = []+                               , syn_res_wrap  = WpHole }++-- | Make a 'SyntaxExpr Name' (the "rn" is because this is used in the+-- renamer), missing its HsWrappers.+mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn+mkRnSyntaxExpr name = mkSyntaxExpr $ HsVar noExtField $ noLoc name+  -- don't care about filling in syn_arg_wraps because we're clearly+  -- not past the typechecker++instance OutputableBndrId p+       => Outputable (SyntaxExpr (GhcPass p)) where+  ppr (SyntaxExpr { syn_expr      = expr+                  , syn_arg_wraps = arg_wraps+                  , syn_res_wrap  = res_wrap })+    = sdocWithDynFlags $ \ dflags ->+      getPprStyle $ \s ->+      if debugStyle s || gopt Opt_PrintExplicitCoercions dflags+      then ppr expr <> braces (pprWithCommas ppr arg_wraps)+                    <> braces (ppr res_wrap)+      else ppr expr++-- | Command Syntax Table (for Arrow syntax)+type CmdSyntaxTable p = [(Name, HsExpr p)]+-- See Note [CmdSyntaxTable]++{-+Note [CmdSyntaxtable]+~~~~~~~~~~~~~~~~~~~~~+Used only for arrow-syntax stuff (HsCmdTop), the CmdSyntaxTable keeps+track of the methods needed for a Cmd.++* Before the renamer, this list is an empty list++* After the renamer, it takes the form @[(std_name, HsVar actual_name)]@+  For example, for the 'arr' method+   * normal case:            (GHC.Control.Arrow.arr, HsVar GHC.Control.Arrow.arr)+   * with rebindable syntax: (GHC.Control.Arrow.arr, arr_22)+             where @arr_22@ is whatever 'arr' is in scope++* After the type checker, it takes the form [(std_name, <expression>)]+  where <expression> is the evidence for the method.  This evidence is+  instantiated with the class, but is still polymorphic in everything+  else.  For example, in the case of 'arr', the evidence has type+         forall b c. (b->c) -> a b c+  where 'a' is the ambient type of the arrow.  This polymorphism is+  important because the desugarer uses the same evidence at multiple+  different types.++This is Less Cool than what we normally do for rebindable syntax, which is to+make fully-instantiated piece of evidence at every use site.  The Cmd way+is Less Cool because+  * The renamer has to predict which methods are needed.+    See the tedious RnExpr.methodNamesCmd.++  * The desugarer has to know the polymorphic type of the instantiated+    method. This is checked by Inst.tcSyntaxName, but is less flexible+    than the rest of rebindable syntax, where the type is less+    pre-ordained.  (And this flexibility is useful; for example we can+    typecheck do-notation with (>>=) :: m1 a -> (a -> m2 b) -> m2 b.)+-}++-- | An unbound variable; used for treating+-- out-of-scope variables as expression holes+--+-- Either "x", "y"     Plain OutOfScope+-- or     "_", "_x"    A TrueExprHole+--+-- Both forms indicate an out-of-scope variable,  but the latter+-- indicates that the user /expects/ it to be out of scope, and+-- just wants GHC to report its type+data UnboundVar+  = OutOfScope OccName GlobalRdrEnv  -- ^ An (unqualified) out-of-scope+                                     -- variable, together with the GlobalRdrEnv+                                     -- with respect to which it is unbound++                                     -- See Note [OutOfScope and GlobalRdrEnv]++  | TrueExprHole OccName             -- ^ A "true" expression hole (_ or _x)++  deriving Data++instance Outputable UnboundVar where+    ppr (OutOfScope occ _) = text "OutOfScope" <> parens (ppr occ)+    ppr (TrueExprHole occ) = text "ExprHole"   <> parens (ppr occ)++unboundVarOcc :: UnboundVar -> OccName+unboundVarOcc (OutOfScope occ _) = occ+unboundVarOcc (TrueExprHole occ) = occ++{-+Note [OutOfScope and GlobalRdrEnv]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+To understand why we bundle a GlobalRdrEnv with an out-of-scope variable,+consider the following module:++    module A where++    foo :: ()+    foo = bar++    bat :: [Double]+    bat = [1.2, 3.4]++    $(return [])++    bar = ()+    bad = False++When A is compiled, the renamer determines that `bar` is not in scope in the+declaration of `foo` (since `bar` is declared in the following inter-splice+group).  Once it has finished typechecking the entire module, the typechecker+then generates the associated error message, which specifies both the type of+`bar` and a list of possible in-scope alternatives:++    A.hs:6:7: error:+        • Variable not in scope: bar :: ()+        • ‘bar’ (line 13) is not in scope before the splice on line 11+          Perhaps you meant ‘bat’ (line 9)++When it calls RnEnv.unknownNameSuggestions to identify these alternatives, the+typechecker must provide a GlobalRdrEnv.  If it provided the current one, which+contains top-level declarations for the entire module, the error message would+incorrectly suggest the out-of-scope `bar` and `bad` as possible alternatives+for `bar` (see #11680).  Instead, the typechecker must use the same+GlobalRdrEnv the renamer used when it determined that `bar` is out-of-scope.++To obtain this GlobalRdrEnv, can the typechecker simply use the out-of-scope+`bar`'s location to either reconstruct it (from the current GlobalRdrEnv) or to+look it up in some global store?  Unfortunately, no.  The problem is that+location information is not always sufficient for this task.  This is most+apparent when dealing with the TH function addTopDecls, which adds its+declarations to the FOLLOWING inter-splice group.  Consider these declarations:++    ex9 = cat               -- cat is NOT in scope here++    $(do -------------------------------------------------------------+        ds <- [d| f = cab   -- cat and cap are both in scope here+                  cat = ()+                |]+        addTopDecls ds+        [d| g = cab         -- only cap is in scope here+            cap = True+          |])++    ex10 = cat              -- cat is NOT in scope here++    $(return []) -----------------------------------------------------++    ex11 = cat              -- cat is in scope++Here, both occurrences of `cab` are out-of-scope, and so the typechecker needs+the GlobalRdrEnvs which were used when they were renamed.  These GlobalRdrEnvs+are different (`cat` is present only in the GlobalRdrEnv for f's `cab'), but the+locations of the two `cab`s are the same (they are both created in the same+splice).  Thus, we must include some additional information with each `cab` to+allow the typechecker to obtain the correct GlobalRdrEnv.  Clearly, the simplest+information to use is the GlobalRdrEnv itself.+-}++-- | A Haskell expression.+data HsExpr p+  = HsVar     (XVar p)+              (Located (IdP p)) -- ^ Variable++                             -- See Note [Located RdrNames]++  | HsUnboundVar (XUnboundVar p)+                 UnboundVar  -- ^ Unbound variable; also used for "holes"+                             --   (_ or _x).+                             -- Turned from HsVar to HsUnboundVar by the+                             --   renamer, when it finds an out-of-scope+                             --   variable or hole.+                             -- Turned into HsVar by type checker, to support+                             --   deferred type errors.++  | HsConLikeOut (XConLikeOut p)+                 ConLike     -- ^ After typechecker only; must be different+                             -- HsVar for pretty printing++  | HsRecFld  (XRecFld p)+              (AmbiguousFieldOcc p) -- ^ Variable pointing to record selector+                                    -- Not in use after typechecking++  | HsOverLabel (XOverLabel p)+                (Maybe (IdP p)) FastString+     -- ^ Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels)+     --   @Just id@ means @RebindableSyntax@ is in use, and gives the id of the+     --   in-scope 'fromLabel'.+     --   NB: Not in use after typechecking++  | HsIPVar   (XIPVar p)+              HsIPName   -- ^ Implicit parameter (not in use after typechecking)+  | HsOverLit (XOverLitE p)+              (HsOverLit p)  -- ^ Overloaded literals++  | HsLit     (XLitE p)+              (HsLit p)      -- ^ Simple (non-overloaded) literals++  | HsLam     (XLam p)+              (MatchGroup p (LHsExpr p))+                       -- ^ Lambda abstraction. Currently always a single match+       --+       -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',+       --       'ApiAnnotation.AnnRarrow',++       -- For details on above see note [Api annotations] in ApiAnnotation++  | HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) -- ^ Lambda-case+       --+       -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',+       --           'ApiAnnotation.AnnCase','ApiAnnotation.AnnOpen',+       --           'ApiAnnotation.AnnClose'++       -- For details on above see note [Api annotations] in ApiAnnotation++  | HsApp     (XApp p) (LHsExpr p) (LHsExpr p) -- ^ Application++  | HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p))  -- ^ Visible type application+       --+       -- Explicit type argument; e.g  f @Int x y+       -- NB: Has wildcards, but no implicit quantification+       --+       -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnAt',++  -- | Operator applications:+  -- NB Bracketed ops such as (+) come out as Vars.++  -- NB We need an expr for the operator in an OpApp/Section since+  -- the typechecker may need to apply the operator to a few types.++  | OpApp       (XOpApp p)+                (LHsExpr p)       -- left operand+                (LHsExpr p)       -- operator+                (LHsExpr p)       -- right operand++  -- | Negation operator. Contains the negated expression and the name+  -- of 'negate'+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnMinus'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | NegApp      (XNegApp p)+                (LHsExpr p)+                (SyntaxExpr p)++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,+  --             'ApiAnnotation.AnnClose' @')'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsPar       (XPar p)+                (LHsExpr p)  -- ^ Parenthesised expr; see Note [Parens in HsSyn]++  | SectionL    (XSectionL p)+                (LHsExpr p)    -- operand; see Note [Sections in HsSyn]+                (LHsExpr p)    -- operator+  | SectionR    (XSectionR p)+                (LHsExpr p)    -- operator; see Note [Sections in HsSyn]+                (LHsExpr p)    -- operand++  -- | Used for explicit tuples and sections thereof+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+  --         'ApiAnnotation.AnnClose'++  -- For details on above see note [Api annotations] in ApiAnnotation+  -- Note [ExplicitTuple]+  | ExplicitTuple+        (XExplicitTuple p)+        [LHsTupArg p]+        Boxity++  -- | Used for unboxed sum types+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'(#'@,+  --          'ApiAnnotation.AnnVbar', 'ApiAnnotation.AnnClose' @'#)'@,+  --+  --  There will be multiple 'ApiAnnotation.AnnVbar', (1 - alternative) before+  --  the expression, (arity - alternative) after it+  | ExplicitSum+          (XExplicitSum p)+          ConTag --  Alternative (one-based)+          Arity  --  Sum arity+          (LHsExpr p)++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnCase',+  --       'ApiAnnotation.AnnOf','ApiAnnotation.AnnOpen' @'{'@,+  --       'ApiAnnotation.AnnClose' @'}'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsCase      (XCase p)+                (LHsExpr p)+                (MatchGroup p (LHsExpr p))++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnIf',+  --       'ApiAnnotation.AnnSemi',+  --       'ApiAnnotation.AnnThen','ApiAnnotation.AnnSemi',+  --       'ApiAnnotation.AnnElse',++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsIf        (XIf p)+                (Maybe (SyntaxExpr p)) -- cond function+                                        -- Nothing => use the built-in 'if'+                                        -- See Note [Rebindable if]+                (LHsExpr p)    --  predicate+                (LHsExpr p)    --  then part+                (LHsExpr p)    --  else part++  -- | Multi-way if+  --+  -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnIf'+  --       'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsMultiIf   (XMultiIf p) [LGRHS p (LHsExpr p)]++  -- | let(rec)+  --+  -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet',+  --       'ApiAnnotation.AnnOpen' @'{'@,+  --       'ApiAnnotation.AnnClose' @'}'@,'ApiAnnotation.AnnIn'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsLet       (XLet p)+                (LHsLocalBinds p)+                (LHsExpr  p)++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDo',+  --             'ApiAnnotation.AnnOpen', 'ApiAnnotation.AnnSemi',+  --             'ApiAnnotation.AnnVbar',+  --             'ApiAnnotation.AnnClose'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsDo        (XDo p)                  -- Type of the whole expression+                (HsStmtContext Name)     -- The parameterisation is unimportant+                                         -- because in this context we never use+                                         -- the PatGuard or ParStmt variant+                (Located [ExprLStmt p]) -- "do":one or more stmts++  -- | Syntactic list: [a,b,c,...]+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,+  --              'ApiAnnotation.AnnClose' @']'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  -- See Note [Empty lists]+  | ExplicitList+                (XExplicitList p)  -- Gives type of components of list+                (Maybe (SyntaxExpr p))+                                   -- For OverloadedLists, the fromListN witness+                [LHsExpr p]++  -- | Record construction+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,+  --         'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose' @'}'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | RecordCon+      { rcon_ext      :: XRecordCon p+      , rcon_con_name :: Located (IdP p)    -- The constructor name;+                                            --  not used after type checking+      , rcon_flds     :: HsRecordBinds p }  -- The fields++  -- | Record update+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,+  --         'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose' @'}'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | RecordUpd+      { rupd_ext  :: XRecordUpd p+      , rupd_expr :: LHsExpr p+      , rupd_flds :: [LHsRecUpdField p]+      }+  -- For a type family, the arg types are of the *instance* tycon,+  -- not the family tycon++  -- | Expression with an explicit type signature. @e :: type@+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | ExprWithTySig+                (XExprWithTySig p)++                (LHsExpr p)+                (LHsSigWcType (NoGhcTc p))++  -- | Arithmetic sequence+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,+  --              'ApiAnnotation.AnnComma','ApiAnnotation.AnnDotdot',+  --              'ApiAnnotation.AnnClose' @']'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | ArithSeq+                (XArithSeq p)+                (Maybe (SyntaxExpr p))+                                  -- For OverloadedLists, the fromList witness+                (ArithSeqInfo p)++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsSCC       (XSCC p)+                SourceText            -- Note [Pragma source text] in BasicTypes+                StringLiteral         -- "set cost centre" SCC pragma+                (LHsExpr p)           -- expr whose cost is to be measured++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{-\# CORE'@,+  --             'ApiAnnotation.AnnVal', 'ApiAnnotation.AnnClose' @'\#-}'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsCoreAnn   (XCoreAnn p)+                SourceText            -- Note [Pragma source text] in BasicTypes+                StringLiteral         -- hdaume: core annotation+                (LHsExpr p)++  -----------------------------------------------------------+  -- MetaHaskell Extensions++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+  --         'ApiAnnotation.AnnOpenE','ApiAnnotation.AnnOpenEQ',+  --         'ApiAnnotation.AnnClose','ApiAnnotation.AnnCloseQ'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsBracket    (XBracket p) (HsBracket p)++    -- See Note [Pending Splices]+  | HsRnBracketOut+      (XRnBracketOut p)+      (HsBracket GhcRn)    -- Output of the renamer is the *original* renamed+                           -- expression, plus+      [PendingRnSplice]    -- _renamed_ splices to be type checked++  | HsTcBracketOut+      (XTcBracketOut p)+      (HsBracket GhcRn)    -- Output of the type checker is the *original*+                           -- renamed expression, plus+      [PendingTcSplice]    -- _typechecked_ splices to be+                           -- pasted back in by the desugarer++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+  --         'ApiAnnotation.AnnClose'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsSpliceE  (XSpliceE p) (HsSplice p)++  -----------------------------------------------------------+  -- Arrow notation extension++  -- | @proc@ notation for Arrows+  --+  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnProc',+  --          'ApiAnnotation.AnnRarrow'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsProc      (XProc p)+                (LPat p)               -- arrow abstraction, proc+                (LHsCmdTop p)          -- body of the abstraction+                                       -- always has an empty stack++  ---------------------------------------+  -- static pointers extension+  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnStatic',++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsStatic (XStatic p) -- Free variables of the body+             (LHsExpr p)        -- Body++  ---------------------------------------+  -- Haskell program coverage (Hpc) Support++  | HsTick+     (XTick p)+     (Tickish (IdP p))+     (LHsExpr p)                       -- sub-expression++  | HsBinTick+     (XBinTick p)+     Int                                -- module-local tick number for True+     Int                                -- module-local tick number for False+     (LHsExpr p)                        -- sub-expression++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+  --       'ApiAnnotation.AnnOpen' @'{-\# GENERATED'@,+  --       'ApiAnnotation.AnnVal','ApiAnnotation.AnnVal',+  --       'ApiAnnotation.AnnColon','ApiAnnotation.AnnVal',+  --       'ApiAnnotation.AnnMinus',+  --       'ApiAnnotation.AnnVal','ApiAnnotation.AnnColon',+  --       'ApiAnnotation.AnnVal',+  --       'ApiAnnotation.AnnClose' @'\#-}'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsTickPragma                      -- A pragma introduced tick+     (XTickPragma p)+     SourceText                       -- Note [Pragma source text] in BasicTypes+     (StringLiteral,(Int,Int),(Int,Int))+                                      -- external span for this tick+     ((SourceText,SourceText),(SourceText,SourceText))+        -- Source text for the four integers used in the span.+        -- See note [Pragma source text] in BasicTypes+     (LHsExpr p)++  ---------------------------------------+  -- Finally, HsWrap appears only in typechecker output+  -- The contained Expr is *NOT* itself an HsWrap.+  -- See Note [Detecting forced eta expansion] in DsExpr. This invariant+  -- is maintained by GHC.Hs.Utils.mkHsWrap.++  |  HsWrap     (XWrap p)+                HsWrapper    -- TRANSLATION+                (HsExpr p)++  | XExpr       (XXExpr p) -- Note [Trees that Grow] extension constructor+++-- | Extra data fields for a 'RecordCon', added by the type checker+data RecordConTc = RecordConTc+      { rcon_con_like :: ConLike      -- The data constructor or pattern synonym+      , rcon_con_expr :: PostTcExpr   -- Instantiated constructor function+      }++-- | Extra data fields for a 'RecordUpd', added by the type checker+data RecordUpdTc = RecordUpdTc+      { rupd_cons :: [ConLike]+                -- Filled in by the type checker to the+                -- _non-empty_ list of DataCons that have+                -- all the upd'd fields++      , rupd_in_tys  :: [Type] -- Argument types of *input* record type+      , rupd_out_tys :: [Type] --             and  *output* record type+                               -- The original type can be reconstructed+                               -- with conLikeResTy+      , rupd_wrap :: HsWrapper -- See note [Record Update HsWrapper]+      } deriving Data++-- ---------------------------------------------------------------------++type instance XVar           (GhcPass _) = NoExtField+type instance XUnboundVar    (GhcPass _) = NoExtField+type instance XConLikeOut    (GhcPass _) = NoExtField+type instance XRecFld        (GhcPass _) = NoExtField+type instance XOverLabel     (GhcPass _) = NoExtField+type instance XIPVar         (GhcPass _) = NoExtField+type instance XOverLitE      (GhcPass _) = NoExtField+type instance XLitE          (GhcPass _) = NoExtField+type instance XLam           (GhcPass _) = NoExtField+type instance XLamCase       (GhcPass _) = NoExtField+type instance XApp           (GhcPass _) = NoExtField++type instance XAppTypeE      (GhcPass _) = NoExtField++type instance XOpApp         GhcPs = NoExtField+type instance XOpApp         GhcRn = Fixity+type instance XOpApp         GhcTc = Fixity++type instance XNegApp        (GhcPass _) = NoExtField+type instance XPar           (GhcPass _) = NoExtField+type instance XSectionL      (GhcPass _) = NoExtField+type instance XSectionR      (GhcPass _) = NoExtField+type instance XExplicitTuple (GhcPass _) = NoExtField++type instance XExplicitSum   GhcPs = NoExtField+type instance XExplicitSum   GhcRn = NoExtField+type instance XExplicitSum   GhcTc = [Type]++type instance XCase          (GhcPass _) = NoExtField+type instance XIf            (GhcPass _) = NoExtField++type instance XMultiIf       GhcPs = NoExtField+type instance XMultiIf       GhcRn = NoExtField+type instance XMultiIf       GhcTc = Type++type instance XLet           (GhcPass _) = NoExtField++type instance XDo            GhcPs = NoExtField+type instance XDo            GhcRn = NoExtField+type instance XDo            GhcTc = Type++type instance XExplicitList  GhcPs = NoExtField+type instance XExplicitList  GhcRn = NoExtField+type instance XExplicitList  GhcTc = Type++type instance XRecordCon     GhcPs = NoExtField+type instance XRecordCon     GhcRn = NoExtField+type instance XRecordCon     GhcTc = RecordConTc++type instance XRecordUpd     GhcPs = NoExtField+type instance XRecordUpd     GhcRn = NoExtField+type instance XRecordUpd     GhcTc = RecordUpdTc++type instance XExprWithTySig (GhcPass _) = NoExtField++type instance XArithSeq      GhcPs = NoExtField+type instance XArithSeq      GhcRn = NoExtField+type instance XArithSeq      GhcTc = PostTcExpr++type instance XSCC           (GhcPass _) = NoExtField+type instance XCoreAnn       (GhcPass _) = NoExtField+type instance XBracket       (GhcPass _) = NoExtField++type instance XRnBracketOut  (GhcPass _) = NoExtField+type instance XTcBracketOut  (GhcPass _) = NoExtField++type instance XSpliceE       (GhcPass _) = NoExtField+type instance XProc          (GhcPass _) = NoExtField++type instance XStatic        GhcPs = NoExtField+type instance XStatic        GhcRn = NameSet+type instance XStatic        GhcTc = NameSet++type instance XTick          (GhcPass _) = NoExtField+type instance XBinTick       (GhcPass _) = NoExtField+type instance XTickPragma    (GhcPass _) = NoExtField+type instance XWrap          (GhcPass _) = NoExtField+type instance XXExpr         (GhcPass _) = NoExtCon++-- ---------------------------------------------------------------------++-- | Located Haskell Tuple Argument+--+-- 'HsTupArg' is used for tuple sections+-- @(,a,)@ is represented by+-- @ExplicitTuple [Missing ty1, Present a, Missing ty3]@+-- Which in turn stands for @(\x:ty1 \y:ty2. (x,a,y))@+type LHsTupArg id = Located (HsTupArg id)+-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'++-- For details on above see note [Api annotations] in ApiAnnotation++-- | Haskell Tuple Argument+data HsTupArg id+  = Present (XPresent id) (LHsExpr id)     -- ^ The argument+  | Missing (XMissing id)    -- ^ The argument is missing, but this is its type+  | XTupArg (XXTupArg id)    -- ^ Note [Trees that Grow] extension point++type instance XPresent         (GhcPass _) = NoExtField++type instance XMissing         GhcPs = NoExtField+type instance XMissing         GhcRn = NoExtField+type instance XMissing         GhcTc = Type++type instance XXTupArg         (GhcPass _) = NoExtCon++tupArgPresent :: LHsTupArg id -> Bool+tupArgPresent (L _ (Present {})) = True+tupArgPresent (L _ (Missing {})) = False+tupArgPresent (L _ (XTupArg {})) = False++{-+Note [Parens in HsSyn]+~~~~~~~~~~~~~~~~~~~~~~+HsPar (and ParPat in patterns, HsParTy in types) is used as follows++  * HsPar is required; the pretty printer does not add parens.++  * HsPars are respected when rearranging operator fixities.+    So   a * (b + c)  means what it says (where the parens are an HsPar)++  * For ParPat and HsParTy the pretty printer does add parens but this should be+    a no-op for ParsedSource, based on the pretty printer round trip feature+    introduced in+    https://phabricator.haskell.org/rGHC499e43824bda967546ebf95ee33ec1f84a114a7c++  * ParPat and HsParTy are pretty printed as '( .. )' regardless of whether or+    not they are strictly necessary. This should be addressed when #13238 is+    completed, to be treated the same as HsPar.+++Note [Sections in HsSyn]+~~~~~~~~~~~~~~~~~~~~~~~~+Sections should always appear wrapped in an HsPar, thus+         HsPar (SectionR ...)+The parser parses sections in a wider variety of situations+(See Note [Parsing sections]), but the renamer checks for those+parens.  This invariant makes pretty-printing easier; we don't need+a special case for adding the parens round sections.++Note [Rebindable if]+~~~~~~~~~~~~~~~~~~~~+The rebindable syntax for 'if' is a bit special, because when+rebindable syntax is *off* we do not want to treat+   (if c then t else e)+as if it was an application (ifThenElse c t e).  Why not?+Because we allow an 'if' to return *unboxed* results, thus+  if blah then 3# else 4#+whereas that would not be possible using a all to a polymorphic function+(because you can't call a polymorphic function at an unboxed type).++So we use Nothing to mean "use the old built-in typing rule".++Note [Record Update HsWrapper]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There is a wrapper in RecordUpd which is used for the *required*+constraints for pattern synonyms. This wrapper is created in the+typechecking and is then directly used in the desugaring without+modification.++For example, if we have the record pattern synonym P,+  pattern P :: (Show a) => a -> Maybe a+  pattern P{x} = Just x++  foo = (Just True) { x = False }+then `foo` desugars to something like+  foo = case Just True of+          P x -> P False+hence we need to provide the correct dictionaries to P's matcher on+the RHS so that we can build the expression.++Note [Located RdrNames]+~~~~~~~~~~~~~~~~~~~~~~~+A number of syntax elements have seemingly redundant locations attached to them.+This is deliberate, to allow transformations making use of the API Annotations+to easily correlate a Located Name in the RenamedSource with a Located RdrName+in the ParsedSource.++There are unfortunately enough differences between the ParsedSource and the+RenamedSource that the API Annotations cannot be used directly with+RenamedSource, so this allows a simple mapping to be used based on the location.++Note [ExplicitTuple]+~~~~~~~~~~~~~~~~~~~~+An ExplicitTuple is never just a data constructor like (,,,).+That is, the `[LHsTupArg p]` argument of `ExplicitTuple` has at least+one `Present` member (and is thus never empty).++A tuple data constructor like () or (,,,) is parsed as an `HsVar`, not an+`ExplicitTuple`, and stays that way. This is important for two reasons:++  1. We don't need -XTupleSections for (,,,)+  2. The type variables in (,,,) can be instantiated with visible type application.+     That is,++       (,,)     :: forall a b c. a -> b -> c -> (a,b,c)+       (True,,) :: forall {b} {c}. b -> c -> (Bool,b,c)++     Note that the tuple section has *inferred* arguments, while the data+     constructor has *specified* ones.+     (See Note [Required, Specified, and Inferred for types] in TcTyClsDecls+     for background.)++Sadly, the grammar for this is actually ambiguous, and it's only thanks to the+preference of a shift in a shift/reduce conflict that the parser works as this+Note details. Search for a reference to this Note in Parser.y for further+explanation.++Note [Empty lists]+~~~~~~~~~~~~~~~~~~+An empty list could be considered either a data constructor (stored with+HsVar) or an ExplicitList. This Note describes how empty lists flow through the+various phases and why.++Parsing+-------+An empty list is parsed by the sysdcon nonterminal. It thus comes to life via+HsVar nilDataCon (defined in TysWiredIn). A freshly-parsed (HsExpr GhcPs) empty list+is never a ExplicitList.++Renaming+--------+If -XOverloadedLists is enabled, we must type-check the empty list as if it+were a call to fromListN. (This is true regardless of the setting of+-XRebindableSyntax.) This is very easy if the empty list is an ExplicitList,+but an annoying special case if it's an HsVar. So the renamer changes a+HsVar nilDataCon to an ExplicitList [], but only if -XOverloadedLists is on.+(Why not always? Read on, dear friend.) This happens in the HsVar case of rnExpr.++Type-checking+-------------+We want to accept an expression like [] @Int. To do this, we must infer that+[] :: forall a. [a]. This is easy if [] is a HsVar with the right DataCon inside.+However, the type-checking for explicit lists works differently: [x,y,z] is never+polymorphic. Instead, we unify the types of x, y, and z together, and use the+unified type as the argument to the cons and nil constructors. Thus, treating+[] as an empty ExplicitList in the type-checker would prevent [] @Int from working.++However, if -XOverloadedLists is on, then [] @Int really shouldn't be allowed:+it's just like fromListN 0 [] @Int. Since+  fromListN :: forall list. IsList list => Int -> [Item list] -> list+that expression really should be rejected. Thus, the renamer's behaviour is+exactly what we want: treat [] as a datacon when -XNoOverloadedLists, and as+an empty ExplicitList when -XOverloadedLists.++See also #13680, which requested [] @Int to work.+-}++instance (OutputableBndrId p) => Outputable (HsExpr (GhcPass p)) where+    ppr expr = pprExpr expr++-----------------------+-- pprExpr, pprLExpr, pprBinds call pprDeeper;+-- the underscore versions do not+pprLExpr :: (OutputableBndrId p) => LHsExpr (GhcPass p) -> SDoc+pprLExpr (L _ e) = pprExpr e++pprExpr :: (OutputableBndrId p) => HsExpr (GhcPass p) -> SDoc+pprExpr e | isAtomicHsExpr e || isQuietHsExpr e =            ppr_expr e+          | otherwise                           = pprDeeper (ppr_expr e)++isQuietHsExpr :: HsExpr id -> Bool+-- Parentheses do display something, but it gives little info and+-- if we go deeper when we go inside them then we get ugly things+-- like (...)+isQuietHsExpr (HsPar {})        = True+-- applications don't display anything themselves+isQuietHsExpr (HsApp {})        = True+isQuietHsExpr (HsAppType {})    = True+isQuietHsExpr (OpApp {})        = True+isQuietHsExpr _ = False++pprBinds :: (OutputableBndrId idL, OutputableBndrId idR)+         => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc+pprBinds b = pprDeeper (ppr b)++-----------------------+ppr_lexpr :: (OutputableBndrId p) => LHsExpr (GhcPass p) -> SDoc+ppr_lexpr e = ppr_expr (unLoc e)++ppr_expr :: forall p. (OutputableBndrId p)+         => HsExpr (GhcPass p) -> SDoc+ppr_expr (HsVar _ (L _ v))  = pprPrefixOcc v+ppr_expr (HsUnboundVar _ uv)= pprPrefixOcc (unboundVarOcc uv)+ppr_expr (HsConLikeOut _ c) = pprPrefixOcc c+ppr_expr (HsIPVar _ v)      = ppr v+ppr_expr (HsOverLabel _ _ l)= char '#' <> ppr l+ppr_expr (HsLit _ lit)      = ppr lit+ppr_expr (HsOverLit _ lit)  = ppr lit+ppr_expr (HsPar _ e)        = parens (ppr_lexpr e)++ppr_expr (HsCoreAnn _ stc (StringLiteral sta s) e)+  = vcat [pprWithSourceText stc (text "{-# CORE")+          <+> pprWithSourceText sta (doubleQuotes $ ftext s) <+> text "#-}"+         , ppr_lexpr e]++ppr_expr e@(HsApp {})        = ppr_apps e []+ppr_expr e@(HsAppType {})    = ppr_apps e []++ppr_expr (OpApp _ e1 op e2)+  | Just pp_op <- ppr_infix_expr (unLoc op)+  = pp_infixly pp_op+  | otherwise+  = pp_prefixly++  where+    pp_e1 = pprDebugParendExpr opPrec e1   -- In debug mode, add parens+    pp_e2 = pprDebugParendExpr opPrec e2   -- to make precedence clear++    pp_prefixly+      = hang (ppr op) 2 (sep [pp_e1, pp_e2])++    pp_infixly pp_op+      = hang pp_e1 2 (sep [pp_op, nest 2 pp_e2])++ppr_expr (NegApp _ e _) = char '-' <+> pprDebugParendExpr appPrec e++ppr_expr (SectionL _ expr op)+  | Just pp_op <- ppr_infix_expr (unLoc op)+  = pp_infixly pp_op+  | otherwise+  = pp_prefixly+  where+    pp_expr = pprDebugParendExpr opPrec expr++    pp_prefixly = hang (hsep [text " \\ x_ ->", ppr op])+                       4 (hsep [pp_expr, text "x_ )"])++    pp_infixly v = (sep [pp_expr, v])++ppr_expr (SectionR _ op expr)+  | Just pp_op <- ppr_infix_expr (unLoc op)+  = pp_infixly pp_op+  | otherwise+  = pp_prefixly+  where+    pp_expr = pprDebugParendExpr opPrec expr++    pp_prefixly = hang (hsep [text "( \\ x_ ->", ppr op, text "x_"])+                       4 (pp_expr <> rparen)++    pp_infixly v = sep [v, pp_expr]++ppr_expr (ExplicitTuple _ exprs boxity)+    -- Special-case unary boxed tuples so that they are pretty-printed as+    -- `Unit x`, not `(x)`+  | [dL -> L _ (Present _ expr)] <- exprs+  , Boxed <- boxity+  = hsep [text (mkTupleStr Boxed 1), ppr expr]+  | otherwise+  = tupleParens (boxityTupleSort boxity) (fcat (ppr_tup_args $ map unLoc exprs))+  where+    ppr_tup_args []               = []+    ppr_tup_args (Present _ e : es) = (ppr_lexpr e <> punc es) : ppr_tup_args es+    ppr_tup_args (Missing _   : es) = punc es : ppr_tup_args es+    ppr_tup_args (XTupArg x   : es) = (ppr x <> punc es) : ppr_tup_args es++    punc (Present {} : _) = comma <> space+    punc (Missing {} : _) = comma+    punc (XTupArg {} : _) = comma <> space+    punc []               = empty++ppr_expr (ExplicitSum _ alt arity expr)+  = text "(#" <+> ppr_bars (alt - 1) <+> ppr expr <+> ppr_bars (arity - alt) <+> text "#)"+  where+    ppr_bars n = hsep (replicate n (char '|'))++ppr_expr (HsLam _ matches)+  = pprMatches matches++ppr_expr (HsLamCase _ matches)+  = sep [ sep [text "\\case"],+          nest 2 (pprMatches matches) ]++ppr_expr (HsCase _ expr matches@(MG { mg_alts = L _ [_] }))+  = sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of {")],+          nest 2 (pprMatches matches) <+> char '}']+ppr_expr (HsCase _ expr matches)+  = sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of")],+          nest 2 (pprMatches matches) ]++ppr_expr (HsIf _ _ e1 e2 e3)+  = sep [hsep [text "if", nest 2 (ppr e1), ptext (sLit "then")],+         nest 4 (ppr e2),+         text "else",+         nest 4 (ppr e3)]++ppr_expr (HsMultiIf _ alts)+  = hang (text "if") 3  (vcat (map ppr_alt alts))+  where ppr_alt (L _ (GRHS _ guards expr)) =+          hang vbar 2 (ppr_one one_alt)+          where+            ppr_one [] = panic "ppr_exp HsMultiIf"+            ppr_one (h:t) = hang h 2 (sep t)+            one_alt = [ interpp'SP guards+                      , text "->" <+> pprDeeper (ppr expr) ]+        ppr_alt (L _ (XGRHS x)) = ppr x++-- special case: let ... in let ...+ppr_expr (HsLet _ (L _ binds) expr@(L _ (HsLet _ _ _)))+  = sep [hang (text "let") 2 (hsep [pprBinds binds, ptext (sLit "in")]),+         ppr_lexpr expr]++ppr_expr (HsLet _ (L _ binds) expr)+  = sep [hang (text "let") 2 (pprBinds binds),+         hang (text "in")  2 (ppr expr)]++ppr_expr (HsDo _ do_or_list_comp (L _ stmts)) = pprDo do_or_list_comp stmts++ppr_expr (ExplicitList _ _ exprs)+  = brackets (pprDeeperList fsep (punctuate comma (map ppr_lexpr exprs)))++ppr_expr (RecordCon { rcon_con_name = con_id, rcon_flds = rbinds })+  = hang (ppr con_id) 2 (ppr rbinds)++ppr_expr (RecordUpd { rupd_expr = L _ aexp, rupd_flds = rbinds })+  = hang (ppr aexp) 2 (braces (fsep (punctuate comma (map ppr rbinds))))++ppr_expr (ExprWithTySig _ expr sig)+  = hang (nest 2 (ppr_lexpr expr) <+> dcolon)+         4 (ppr sig)++ppr_expr (ArithSeq _ _ info) = brackets (ppr info)++ppr_expr (HsSCC _ st (StringLiteral stl lbl) expr)+  = sep [ pprWithSourceText st (text "{-# SCC")+         -- no doublequotes if stl empty, for the case where the SCC was written+         -- without quotes.+          <+> pprWithSourceText stl (ftext lbl) <+> text "#-}",+          ppr expr ]++ppr_expr (HsWrap _ co_fn e)+  = pprHsWrapper co_fn (\parens -> if parens then pprExpr e+                                             else pprExpr e)++ppr_expr (HsSpliceE _ s)         = pprSplice s+ppr_expr (HsBracket _ b)         = pprHsBracket b+ppr_expr (HsRnBracketOut _ e []) = ppr e+ppr_expr (HsRnBracketOut _ e ps) = ppr e $$ text "pending(rn)" <+> ppr ps+ppr_expr (HsTcBracketOut _ e []) = ppr e+ppr_expr (HsTcBracketOut _ e ps) = ppr e $$ text "pending(tc)" <+> ppr ps++ppr_expr (HsProc _ pat (L _ (HsCmdTop _ cmd)))+  = hsep [text "proc", ppr pat, ptext (sLit "->"), ppr cmd]+ppr_expr (HsProc _ pat (L _ (XCmdTop x)))+  = hsep [text "proc", ppr pat, ptext (sLit "->"), ppr x]++ppr_expr (HsStatic _ e)+  = hsep [text "static", ppr e]++ppr_expr (HsTick _ tickish exp)+  = pprTicks (ppr exp) $+    ppr tickish <+> ppr_lexpr exp+ppr_expr (HsBinTick _ tickIdTrue tickIdFalse exp)+  = pprTicks (ppr exp) $+    hcat [text "bintick<",+          ppr tickIdTrue,+          text ",",+          ppr tickIdFalse,+          text ">(",+          ppr exp, text ")"]+ppr_expr (HsTickPragma _ _ externalSrcLoc _ exp)+  = pprTicks (ppr exp) $+    hcat [text "tickpragma<",+          pprExternalSrcLoc externalSrcLoc,+          text ">(",+          ppr exp,+          text ")"]++ppr_expr (HsRecFld _ f) = ppr f+ppr_expr (XExpr x) = ppr x++ppr_infix_expr :: (OutputableBndrId p) => HsExpr (GhcPass p) -> Maybe SDoc+ppr_infix_expr (HsVar _ (L _ v))    = Just (pprInfixOcc v)+ppr_infix_expr (HsConLikeOut _ c)   = Just (pprInfixOcc (conLikeName c))+ppr_infix_expr (HsRecFld _ f)       = Just (pprInfixOcc f)+ppr_infix_expr (HsUnboundVar _ h@TrueExprHole{}) = Just (pprInfixOcc (unboundVarOcc h))+ppr_infix_expr (HsWrap _ _ e)       = ppr_infix_expr e+ppr_infix_expr _                    = Nothing++ppr_apps :: (OutputableBndrId p)+         => HsExpr (GhcPass p)+         -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))]+         -> SDoc+ppr_apps (HsApp _ (L _ fun) arg)        args+  = ppr_apps fun (Left arg : args)+ppr_apps (HsAppType _ (L _ fun) arg)    args+  = ppr_apps fun (Right arg : args)+ppr_apps fun args = hang (ppr_expr fun) 2 (fsep (map pp args))+  where+    pp (Left arg)                             = ppr arg+    -- pp (Right (LHsWcTypeX (HsWC { hswc_body = L _ arg })))+    --   = char '@' <> pprHsType arg+    pp (Right arg)+      = char '@' <> ppr arg++pprExternalSrcLoc :: (StringLiteral,(Int,Int),(Int,Int)) -> SDoc+pprExternalSrcLoc (StringLiteral _ src,(n1,n2),(n3,n4))+  = ppr (src,(n1,n2),(n3,n4))++{-+HsSyn records exactly where the user put parens, with HsPar.+So generally speaking we print without adding any parens.+However, some code is internally generated, and in some places+parens are absolutely required; so for these places we use+pprParendLExpr (but don't print double parens of course).++For operator applications we don't add parens, because the operator+fixities should do the job, except in debug mode (-dppr-debug) so we+can see the structure of the parse tree.+-}++pprDebugParendExpr :: (OutputableBndrId p)+                   => PprPrec -> LHsExpr (GhcPass p) -> SDoc+pprDebugParendExpr p expr+  = getPprStyle (\sty ->+    if debugStyle sty then pprParendLExpr p expr+                      else pprLExpr      expr)++pprParendLExpr :: (OutputableBndrId p)+               => PprPrec -> LHsExpr (GhcPass p) -> SDoc+pprParendLExpr p (L _ e) = pprParendExpr p e++pprParendExpr :: (OutputableBndrId p)+              => PprPrec -> HsExpr (GhcPass p) -> SDoc+pprParendExpr p expr+  | hsExprNeedsParens p expr = parens (pprExpr expr)+  | otherwise                = pprExpr expr+        -- Using pprLExpr makes sure that we go 'deeper'+        -- I think that is usually (always?) right++-- | @'hsExprNeedsParens' p e@ returns 'True' if the expression @e@ needs+-- parentheses under precedence @p@.+hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool+hsExprNeedsParens p = go+  where+    go (HsVar{})                      = False+    go (HsUnboundVar{})               = False+    go (HsConLikeOut{})               = False+    go (HsIPVar{})                    = False+    go (HsOverLabel{})                = False+    go (HsLit _ l)                    = hsLitNeedsParens p l+    go (HsOverLit _ ol)               = hsOverLitNeedsParens p ol+    go (HsPar{})                      = False+    go (HsCoreAnn _ _ _ (L _ e))      = go e+    go (HsApp{})                      = p >= appPrec+    go (HsAppType {})                 = p >= appPrec+    go (OpApp{})                      = p >= opPrec+    go (NegApp{})                     = p > topPrec+    go (SectionL{})                   = True+    go (SectionR{})                   = True+    go (ExplicitTuple{})              = False+    go (ExplicitSum{})                = False+    go (HsLam{})                      = p > topPrec+    go (HsLamCase{})                  = p > topPrec+    go (HsCase{})                     = p > topPrec+    go (HsIf{})                       = p > topPrec+    go (HsMultiIf{})                  = p > topPrec+    go (HsLet{})                      = p > topPrec+    go (HsDo _ sc _)+      | isComprehensionContext sc     = False+      | otherwise                     = p > topPrec+    go (ExplicitList{})               = False+    go (RecordUpd{})                  = False+    go (ExprWithTySig{})              = p >= sigPrec+    go (ArithSeq{})                   = False+    go (HsSCC{})                      = p >= appPrec+    go (HsWrap _ _ e)                 = go e+    go (HsSpliceE{})                  = False+    go (HsBracket{})                  = False+    go (HsRnBracketOut{})             = False+    go (HsTcBracketOut{})             = False+    go (HsProc{})                     = p > topPrec+    go (HsStatic{})                   = p >= appPrec+    go (HsTick _ _ (L _ e))           = go e+    go (HsBinTick _ _ _ (L _ e))      = go e+    go (HsTickPragma _ _ _ _ (L _ e)) = go e+    go (RecordCon{})                  = False+    go (HsRecFld{})                   = False+    go (XExpr{})                      = True++-- | @'parenthesizeHsExpr' p e@ checks if @'hsExprNeedsParens' p e@ is true,+-- and if so, surrounds @e@ with an 'HsPar'. Otherwise, it simply returns @e@.+parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)+parenthesizeHsExpr p le@(L loc e)+  | hsExprNeedsParens p e = L loc (HsPar noExtField le)+  | otherwise             = le++isAtomicHsExpr :: HsExpr id -> Bool+-- True of a single token+isAtomicHsExpr (HsVar {})        = True+isAtomicHsExpr (HsConLikeOut {}) = True+isAtomicHsExpr (HsLit {})        = True+isAtomicHsExpr (HsOverLit {})    = True+isAtomicHsExpr (HsIPVar {})      = True+isAtomicHsExpr (HsOverLabel {})  = True+isAtomicHsExpr (HsUnboundVar {}) = True+isAtomicHsExpr (HsWrap _ _ e)    = isAtomicHsExpr e+isAtomicHsExpr (HsPar _ e)       = isAtomicHsExpr (unLoc e)+isAtomicHsExpr (HsRecFld{})      = True+isAtomicHsExpr _                 = False++{-+************************************************************************+*                                                                      *+\subsection{Commands (in arrow abstractions)}+*                                                                      *+************************************************************************++We re-use HsExpr to represent these.+-}++-- | Located Haskell Command (for arrow syntax)+type LHsCmd id = Located (HsCmd id)++-- | Haskell Command (e.g. a "statement" in an Arrow proc block)+data HsCmd id+  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.Annlarrowtail',+  --          'ApiAnnotation.Annrarrowtail','ApiAnnotation.AnnLarrowtail',+  --          'ApiAnnotation.AnnRarrowtail'++  -- For details on above see note [Api annotations] in ApiAnnotation+  = HsCmdArrApp          -- Arrow tail, or arrow application (f -< arg)+        (XCmdArrApp id)  -- type of the arrow expressions f,+                         -- of the form a t t', where arg :: t+        (LHsExpr id)     -- arrow expression, f+        (LHsExpr id)     -- input expression, arg+        HsArrAppType     -- higher-order (-<<) or first-order (-<)+        Bool             -- True => right-to-left (f -< arg)+                         -- False => left-to-right (arg >- f)++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpenB' @'(|'@,+  --         'ApiAnnotation.AnnCloseB' @'|)'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | HsCmdArrForm         -- Command formation,  (| e cmd1 .. cmdn |)+        (XCmdArrForm id)+        (LHsExpr id)     -- The operator.+                         -- After type-checking, a type abstraction to be+                         -- applied to the type of the local environment tuple+        LexicalFixity    -- Whether the operator appeared prefix or infix when+                         -- parsed.+        (Maybe Fixity)   -- fixity (filled in by the renamer), for forms that+                         -- were converted from OpApp's by the renamer+        [LHsCmdTop id]   -- argument commands++  | HsCmdApp    (XCmdApp id)+                (LHsCmd id)+                (LHsExpr id)++  | HsCmdLam    (XCmdLam id)+                (MatchGroup id (LHsCmd id))     -- kappa+       -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',+       --       'ApiAnnotation.AnnRarrow',++       -- For details on above see note [Api annotations] in ApiAnnotation++  | HsCmdPar    (XCmdPar id)+                (LHsCmd id)                     -- parenthesised command+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,+    --             'ApiAnnotation.AnnClose' @')'@++    -- For details on above see note [Api annotations] in ApiAnnotation++  | HsCmdCase   (XCmdCase id)+                (LHsExpr id)+                (MatchGroup id (LHsCmd id))     -- bodies are HsCmd's+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnCase',+    --       'ApiAnnotation.AnnOf','ApiAnnotation.AnnOpen' @'{'@,+    --       'ApiAnnotation.AnnClose' @'}'@++    -- For details on above see note [Api annotations] in ApiAnnotation++  | HsCmdIf     (XCmdIf id)+                (Maybe (SyntaxExpr id))         -- cond function+                (LHsExpr id)                    -- predicate+                (LHsCmd id)                     -- then part+                (LHsCmd id)                     -- else part+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnIf',+    --       'ApiAnnotation.AnnSemi',+    --       'ApiAnnotation.AnnThen','ApiAnnotation.AnnSemi',+    --       'ApiAnnotation.AnnElse',++    -- For details on above see note [Api annotations] in ApiAnnotation++  | HsCmdLet    (XCmdLet id)+                (LHsLocalBinds id)      -- let(rec)+                (LHsCmd  id)+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet',+    --       'ApiAnnotation.AnnOpen' @'{'@,+    --       'ApiAnnotation.AnnClose' @'}'@,'ApiAnnotation.AnnIn'++    -- For details on above see note [Api annotations] in ApiAnnotation++  | HsCmdDo     (XCmdDo id)                     -- Type of the whole expression+                (Located [CmdLStmt id])+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDo',+    --             'ApiAnnotation.AnnOpen', 'ApiAnnotation.AnnSemi',+    --             'ApiAnnotation.AnnVbar',+    --             'ApiAnnotation.AnnClose'++    -- For details on above see note [Api annotations] in ApiAnnotation++  | HsCmdWrap   (XCmdWrap id)+                HsWrapper+                (HsCmd id)     -- If   cmd :: arg1 --> res+                               --      wrap :: arg1 "->" arg2+                               -- Then (HsCmdWrap wrap cmd) :: arg2 --> res+  | XCmd        (XXCmd id)     -- Note [Trees that Grow] extension point++type instance XCmdArrApp  GhcPs = NoExtField+type instance XCmdArrApp  GhcRn = NoExtField+type instance XCmdArrApp  GhcTc = Type++type instance XCmdArrForm (GhcPass _) = NoExtField+type instance XCmdApp     (GhcPass _) = NoExtField+type instance XCmdLam     (GhcPass _) = NoExtField+type instance XCmdPar     (GhcPass _) = NoExtField+type instance XCmdCase    (GhcPass _) = NoExtField+type instance XCmdIf      (GhcPass _) = NoExtField+type instance XCmdLet     (GhcPass _) = NoExtField++type instance XCmdDo      GhcPs = NoExtField+type instance XCmdDo      GhcRn = NoExtField+type instance XCmdDo      GhcTc = Type++type instance XCmdWrap    (GhcPass _) = NoExtField+type instance XXCmd       (GhcPass _) = NoExtCon++-- | Haskell Array Application Type+data HsArrAppType = HsHigherOrderApp | HsFirstOrderApp+  deriving Data+++{- | Top-level command, introducing a new arrow.+This may occur inside a proc (where the stack is empty) or as an+argument of a command-forming operator.+-}++-- | Located Haskell Top-level Command+type LHsCmdTop p = Located (HsCmdTop p)++-- | Haskell Top-level Command+data HsCmdTop p+  = HsCmdTop (XCmdTop p)+             (LHsCmd p)+  | XCmdTop (XXCmdTop p)        -- Note [Trees that Grow] extension point++data CmdTopTc+  = CmdTopTc Type    -- Nested tuple of inputs on the command's stack+             Type    -- return type of the command+             (CmdSyntaxTable GhcTc) -- See Note [CmdSyntaxTable]++type instance XCmdTop  GhcPs = NoExtField+type instance XCmdTop  GhcRn = CmdSyntaxTable GhcRn -- See Note [CmdSyntaxTable]+type instance XCmdTop  GhcTc = CmdTopTc++type instance XXCmdTop (GhcPass _) = NoExtCon++instance (OutputableBndrId p) => Outputable (HsCmd (GhcPass p)) where+    ppr cmd = pprCmd cmd++-----------------------+-- pprCmd and pprLCmd call pprDeeper;+-- the underscore versions do not+pprLCmd :: (OutputableBndrId p) => LHsCmd (GhcPass p) -> SDoc+pprLCmd (L _ c) = pprCmd c++pprCmd :: (OutputableBndrId p) => HsCmd (GhcPass p) -> SDoc+pprCmd c | isQuietHsCmd c =            ppr_cmd c+         | otherwise      = pprDeeper (ppr_cmd c)++isQuietHsCmd :: HsCmd id -> Bool+-- Parentheses do display something, but it gives little info and+-- if we go deeper when we go inside them then we get ugly things+-- like (...)+isQuietHsCmd (HsCmdPar {}) = True+-- applications don't display anything themselves+isQuietHsCmd (HsCmdApp {}) = True+isQuietHsCmd _ = False++-----------------------+ppr_lcmd :: (OutputableBndrId p) => LHsCmd (GhcPass p) -> SDoc+ppr_lcmd c = ppr_cmd (unLoc c)++ppr_cmd :: forall p. (OutputableBndrId p) => HsCmd (GhcPass p) -> SDoc+ppr_cmd (HsCmdPar _ c) = parens (ppr_lcmd c)++ppr_cmd (HsCmdApp _ c e)+  = let (fun, args) = collect_args c [e] in+    hang (ppr_lcmd fun) 2 (sep (map ppr args))+  where+    collect_args (L _ (HsCmdApp _ fun arg)) args = collect_args fun (arg:args)+    collect_args fun args = (fun, args)++ppr_cmd (HsCmdLam _ matches)+  = pprMatches matches++ppr_cmd (HsCmdCase _ expr matches)+  = sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of")],+          nest 2 (pprMatches matches) ]++ppr_cmd (HsCmdIf _ _ e ct ce)+  = sep [hsep [text "if", nest 2 (ppr e), ptext (sLit "then")],+         nest 4 (ppr ct),+         text "else",+         nest 4 (ppr ce)]++-- special case: let ... in let ...+ppr_cmd (HsCmdLet _ (L _ binds) cmd@(L _ (HsCmdLet {})))+  = sep [hang (text "let") 2 (hsep [pprBinds binds, ptext (sLit "in")]),+         ppr_lcmd cmd]++ppr_cmd (HsCmdLet _ (L _ binds) cmd)+  = sep [hang (text "let") 2 (pprBinds binds),+         hang (text "in")  2 (ppr cmd)]++ppr_cmd (HsCmdDo _ (L _ stmts))  = pprDo ArrowExpr stmts++ppr_cmd (HsCmdWrap _ w cmd)+  = pprHsWrapper w (\_ -> parens (ppr_cmd cmd))+ppr_cmd (HsCmdArrApp _ arrow arg HsFirstOrderApp True)+  = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]+ppr_cmd (HsCmdArrApp _ arrow arg HsFirstOrderApp False)+  = hsep [ppr_lexpr arg, arrowt, ppr_lexpr arrow]+ppr_cmd (HsCmdArrApp _ arrow arg HsHigherOrderApp True)+  = hsep [ppr_lexpr arrow, larrowtt, ppr_lexpr arg]+ppr_cmd (HsCmdArrApp _ arrow arg HsHigherOrderApp False)+  = hsep [ppr_lexpr arg, arrowtt, ppr_lexpr arrow]++ppr_cmd (HsCmdArrForm _ (L _ (HsVar _ (L _ v))) _ (Just _) [arg1, arg2])+  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc v+                                         , pprCmdArg (unLoc arg2)])+ppr_cmd (HsCmdArrForm _ (L _ (HsVar _ (L _ v))) Infix _    [arg1, arg2])+  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc v+                                         , pprCmdArg (unLoc arg2)])+ppr_cmd (HsCmdArrForm _ (L _ (HsConLikeOut _ c)) _ (Just _) [arg1, arg2])+  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc (conLikeName c)+                                         , pprCmdArg (unLoc arg2)])+ppr_cmd (HsCmdArrForm _ (L _ (HsConLikeOut _ c)) Infix _    [arg1, arg2])+  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc (conLikeName c)+                                         , pprCmdArg (unLoc arg2)])+ppr_cmd (HsCmdArrForm _ op _ _ args)+  = hang (text "(|" <+> ppr_lexpr op)+         4 (sep (map (pprCmdArg.unLoc) args) <+> text "|)")+ppr_cmd (XCmd x) = ppr x++pprCmdArg :: (OutputableBndrId p) => HsCmdTop (GhcPass p) -> SDoc+pprCmdArg (HsCmdTop _ cmd)+  = ppr_lcmd cmd+pprCmdArg (XCmdTop x) = ppr x++instance (OutputableBndrId p) => Outputable (HsCmdTop (GhcPass p)) where+    ppr = pprCmdArg++{-+************************************************************************+*                                                                      *+\subsection{Record binds}+*                                                                      *+************************************************************************+-}++-- | Haskell Record Bindings+type HsRecordBinds p = HsRecFields p (LHsExpr p)++{-+************************************************************************+*                                                                      *+\subsection{@Match@, @GRHSs@, and @GRHS@ datatypes}+*                                                                      *+************************************************************************++@Match@es are sets of pattern bindings and right hand sides for+functions, patterns or case branches. For example, if a function @g@+is defined as:+\begin{verbatim}+g (x,y) = y+g ((x:ys),y) = y+1,+\end{verbatim}+then \tr{g} has two @Match@es: @(x,y) = y@ and @((x:ys),y) = y+1@.++It is always the case that each element of an @[Match]@ list has the+same number of @pats@s inside it.  This corresponds to saying that+a function defined by pattern matching must have the same number of+patterns in each equation.+-}++data MatchGroup p body+  = MG { mg_ext     :: XMG p body -- Post-typechecker, types of args and result+       , mg_alts    :: Located [LMatch p body]  -- The alternatives+       , mg_origin  :: Origin }+     -- The type is the type of the entire group+     --      t1 -> ... -> tn -> tr+     -- where there are n patterns+  | XMatchGroup (XXMatchGroup p body)++data MatchGroupTc+  = MatchGroupTc+       { mg_arg_tys :: [Type]  -- Types of the arguments, t1..tn+       , mg_res_ty  :: Type    -- Type of the result, tr+       } deriving Data++type instance XMG         GhcPs b = NoExtField+type instance XMG         GhcRn b = NoExtField+type instance XMG         GhcTc b = MatchGroupTc++type instance XXMatchGroup (GhcPass _) b = NoExtCon++-- | Located Match+type LMatch id body = Located (Match id body)+-- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a+--   list++-- For details on above see note [Api annotations] in ApiAnnotation+data Match p body+  = Match {+        m_ext :: XCMatch p body,+        m_ctxt :: HsMatchContext (NameOrRdrName (IdP p)),+          -- See note [m_ctxt in Match]+        m_pats :: [LPat p], -- The patterns+        m_grhss :: (GRHSs p body)+  }+  | XMatch (XXMatch p body)++type instance XCMatch (GhcPass _) b = NoExtField+type instance XXMatch (GhcPass _) b = NoExtCon++instance (OutputableBndrId pr, Outputable body)+            => Outputable (Match (GhcPass pr) body) where+  ppr = pprMatch++{-+Note [m_ctxt in Match]+~~~~~~~~~~~~~~~~~~~~~~++A Match can occur in a number of contexts, such as a FunBind, HsCase, HsLam and+so on.++In order to simplify tooling processing and pretty print output, the provenance+is captured in an HsMatchContext.++This is particularly important for the API Annotations for a multi-equation+FunBind.++The parser initially creates a FunBind with a single Match in it for+every function definition it sees.++These are then grouped together by getMonoBind into a single FunBind,+where all the Matches are combined.++In the process, all the original FunBind fun_id's bar one are+discarded, including the locations.++This causes a problem for source to source conversions via API+Annotations, so the original fun_ids and infix flags are preserved in+the Match, when it originates from a FunBind.++Example infix function definition requiring individual API Annotations++    (&&&  ) [] [] =  []+    xs    &&&   [] =  xs+    (  &&&  ) [] ys =  ys++++-}+++isInfixMatch :: Match id body -> Bool+isInfixMatch match = case m_ctxt match of+  FunRhs {mc_fixity = Infix} -> True+  _                          -> False++isEmptyMatchGroup :: MatchGroup id body -> Bool+isEmptyMatchGroup (MG { mg_alts = ms }) = null $ unLoc ms+isEmptyMatchGroup (XMatchGroup {})      = False++-- | Is there only one RHS in this list of matches?+isSingletonMatchGroup :: [LMatch id body] -> Bool+isSingletonMatchGroup matches+  | [L _ match] <- matches+  , Match { m_grhss = GRHSs { grhssGRHSs = [_] } } <- match+  = True+  | otherwise+  = False++matchGroupArity :: MatchGroup (GhcPass id) body -> Arity+-- Precondition: MatchGroup is non-empty+-- This is called before type checking, when mg_arg_tys is not set+matchGroupArity (MG { mg_alts = alts })+  | L _ (alt1:_) <- alts = length (hsLMatchPats alt1)+  | otherwise        = panic "matchGroupArity"+matchGroupArity (XMatchGroup nec) = noExtCon nec++hsLMatchPats :: LMatch (GhcPass id) body -> [LPat (GhcPass id)]+hsLMatchPats (L _ (Match { m_pats = pats })) = pats+hsLMatchPats (L _ (XMatch nec)) = noExtCon nec++-- | Guarded Right-Hand Sides+--+-- GRHSs are used both for pattern bindings and for Matches+--+--  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnVbar',+--        'ApiAnnotation.AnnEqual','ApiAnnotation.AnnWhere',+--        'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'+--        'ApiAnnotation.AnnRarrow','ApiAnnotation.AnnSemi'++-- For details on above see note [Api annotations] in ApiAnnotation+data GRHSs p body+  = GRHSs {+      grhssExt :: XCGRHSs p body,+      grhssGRHSs :: [LGRHS p body],      -- ^ Guarded RHSs+      grhssLocalBinds :: LHsLocalBinds p -- ^ The where clause+    }+  | XGRHSs (XXGRHSs p body)++type instance XCGRHSs (GhcPass _) b = NoExtField+type instance XXGRHSs (GhcPass _) b = NoExtCon++-- | Located Guarded Right-Hand Side+type LGRHS id body = Located (GRHS id body)++-- | Guarded Right Hand Side.+data GRHS p body = GRHS (XCGRHS p body)+                        [GuardLStmt p] -- Guards+                        body           -- Right hand side+                  | XGRHS (XXGRHS p body)++type instance XCGRHS (GhcPass _) b = NoExtField+type instance XXGRHS (GhcPass _) b = NoExtCon++-- We know the list must have at least one @Match@ in it.++pprMatches :: (OutputableBndrId idR, Outputable body)+           => MatchGroup (GhcPass idR) body -> SDoc+pprMatches MG { mg_alts = matches }+    = vcat (map pprMatch (map unLoc (unLoc matches)))+      -- Don't print the type; it's only a place-holder before typechecking+pprMatches (XMatchGroup x) = ppr x++-- Exported to GHC.Hs.Binds, which can't see the defn of HsMatchContext+pprFunBind :: (OutputableBndrId idR, Outputable body)+           => MatchGroup (GhcPass idR) body -> SDoc+pprFunBind matches = pprMatches matches++-- Exported to GHC.Hs.Binds, which can't see the defn of HsMatchContext+pprPatBind :: forall bndr p body. (OutputableBndrId bndr,+                                   OutputableBndrId p,+                                   Outputable body)+           => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc+pprPatBind pat (grhss)+ = sep [ppr pat,+       nest 2 (pprGRHSs (PatBindRhs :: HsMatchContext (IdP (GhcPass p))) grhss)]++pprMatch :: (OutputableBndrId idR, Outputable body)+         => Match (GhcPass idR) body -> SDoc+pprMatch match+  = sep [ sep (herald : map (nest 2 . pprParendLPat appPrec) other_pats)+        , nest 2 (pprGRHSs ctxt (m_grhss match)) ]+  where+    ctxt = m_ctxt match+    (herald, other_pats)+        = case ctxt of+            FunRhs {mc_fun=L _ fun, mc_fixity=fixity, mc_strictness=strictness}+                | strictness == SrcStrict -> ASSERT(null $ m_pats match)+                                             (char '!'<>pprPrefixOcc fun, m_pats match)+                        -- a strict variable binding+                | fixity == Prefix -> (pprPrefixOcc fun, m_pats match)+                        -- f x y z = e+                        -- Not pprBndr; the AbsBinds will+                        -- have printed the signature++                | null pats2 -> (pp_infix, [])+                        -- x &&& y = e++                | otherwise -> (parens pp_infix, pats2)+                        -- (x &&& y) z = e+                where+                  pp_infix = pprParendLPat opPrec pat1+                         <+> pprInfixOcc fun+                         <+> pprParendLPat opPrec pat2++            LambdaExpr -> (char '\\', m_pats match)++            _  -> if null (m_pats match)+                     then (empty, [])+                     else ASSERT2( null pats1, ppr ctxt $$ ppr pat1 $$ ppr pats1 )+                          (ppr pat1, [])        -- No parens around the single pat++    (pat1:pats1) = m_pats match+    (pat2:pats2) = pats1++pprGRHSs :: (OutputableBndrId idR, Outputable body)+         => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc+pprGRHSs ctxt (GRHSs _ grhss (L _ binds))+  = vcat (map (pprGRHS ctxt . unLoc) grhss)+  -- Print the "where" even if the contents of the binds is empty. Only+  -- EmptyLocalBinds means no "where" keyword+ $$ ppUnless (eqEmptyLocalBinds binds)+      (text "where" $$ nest 4 (pprBinds binds))+pprGRHSs _ (XGRHSs x) = ppr x++pprGRHS :: (OutputableBndrId idR, Outputable body)+        => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc+pprGRHS ctxt (GRHS _ [] body)+ =  pp_rhs ctxt body++pprGRHS ctxt (GRHS _ guards body)+ = sep [vbar <+> interpp'SP guards, pp_rhs ctxt body]++pprGRHS _ (XGRHS x) = ppr x++pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc+pp_rhs ctxt rhs = matchSeparator ctxt <+> pprDeeper (ppr rhs)++{-+************************************************************************+*                                                                      *+\subsection{Do stmts and list comprehensions}+*                                                                      *+************************************************************************+-}++-- | Located @do@ block Statement+type LStmt id body = Located (StmtLR id id body)++-- | Located Statement with separate Left and Right id's+type LStmtLR idL idR body = Located (StmtLR idL idR body)++-- | @do@ block Statement+type Stmt id body = StmtLR id id body++-- | Command Located Statement+type CmdLStmt   id = LStmt id (LHsCmd  id)++-- | Command Statement+type CmdStmt    id = Stmt  id (LHsCmd  id)++-- | Expression Located Statement+type ExprLStmt  id = LStmt id (LHsExpr id)++-- | Expression Statement+type ExprStmt   id = Stmt  id (LHsExpr id)++-- | Guard Located Statement+type GuardLStmt id = LStmt id (LHsExpr id)++-- | Guard Statement+type GuardStmt  id = Stmt  id (LHsExpr id)++-- | Ghci Located Statement+type GhciLStmt  id = LStmt id (LHsExpr id)++-- | Ghci Statement+type GhciStmt   id = Stmt  id (LHsExpr id)++-- The SyntaxExprs in here are used *only* for do-notation and monad+-- comprehensions, which have rebindable syntax. Otherwise they are unused.+-- | API Annotations when in qualifier lists or guards+--  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnVbar',+--         'ApiAnnotation.AnnComma','ApiAnnotation.AnnThen',+--         'ApiAnnotation.AnnBy','ApiAnnotation.AnnBy',+--         'ApiAnnotation.AnnGroup','ApiAnnotation.AnnUsing'++-- For details on above see note [Api annotations] in ApiAnnotation+data StmtLR idL idR body -- body should always be (LHs**** idR)+  = LastStmt  -- Always the last Stmt in ListComp, MonadComp,+              -- and (after the renamer, see RnExpr.checkLastStmt) DoExpr, MDoExpr+              -- Not used for GhciStmtCtxt, PatGuard, which scope over other stuff+          (XLastStmt idL idR body)+          body+          Bool               -- True <=> return was stripped by ApplicativeDo+          (SyntaxExpr idR)   -- The return operator+            -- The return operator is used only for MonadComp+            -- For ListComp we use the baked-in 'return'+            -- For DoExpr, MDoExpr, we don't apply a 'return' at all+            -- See Note [Monad Comprehensions]+            -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLarrow'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | BindStmt (XBindStmt idL idR body) -- Post typechecking,+                                -- result type of the function passed to bind;+                                -- that is, S in (>>=) :: Q -> (R -> S) -> T+             (LPat idL)+             body+             (SyntaxExpr idR) -- The (>>=) operator; see Note [The type of bind in Stmts]+             (SyntaxExpr idR) -- The fail operator+             -- The fail operator is noSyntaxExpr+             -- if the pattern match can't fail++  -- | 'ApplicativeStmt' represents an applicative expression built with+  -- '<$>' and '<*>'.  It is generated by the renamer, and is desugared into the+  -- appropriate applicative expression by the desugarer, but it is intended+  -- to be invisible in error messages.+  --+  -- For full details, see Note [ApplicativeDo] in RnExpr+  --+  | ApplicativeStmt+             (XApplicativeStmt idL idR body) -- Post typecheck, Type of the body+             [ ( SyntaxExpr idR+               , ApplicativeArg idL) ]+                      -- [(<$>, e1), (<*>, e2), ..., (<*>, en)]+             (Maybe (SyntaxExpr idR))  -- 'join', if necessary++  | BodyStmt (XBodyStmt idL idR body) -- Post typecheck, element type+                                      -- of the RHS (used for arrows)+             body              -- See Note [BodyStmt]+             (SyntaxExpr idR)  -- The (>>) operator+             (SyntaxExpr idR)  -- The `guard` operator; used only in MonadComp+                               -- See notes [Monad Comprehensions]++  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet'+  --          'ApiAnnotation.AnnOpen' @'{'@,'ApiAnnotation.AnnClose' @'}'@,++  -- For details on above see note [Api annotations] in ApiAnnotation+  | LetStmt  (XLetStmt idL idR body) (LHsLocalBindsLR idL idR)++  -- ParStmts only occur in a list/monad comprehension+  | ParStmt  (XParStmt idL idR body)    -- Post typecheck,+                                        -- S in (>>=) :: Q -> (R -> S) -> T+             [ParStmtBlock idL idR]+             (HsExpr idR)               -- Polymorphic `mzip` for monad comprehensions+             (SyntaxExpr idR)           -- The `>>=` operator+                                        -- See notes [Monad Comprehensions]+            -- After renaming, the ids are the binders+            -- bound by the stmts and used after themp++  | TransStmt {+      trS_ext   :: XTransStmt idL idR body, -- Post typecheck,+                                            -- R in (>>=) :: Q -> (R -> S) -> T+      trS_form  :: TransForm,+      trS_stmts :: [ExprLStmt idL],   -- Stmts to the *left* of the 'group'+                                      -- which generates the tuples to be grouped++      trS_bndrs :: [(IdP idR, IdP idR)], -- See Note [TransStmt binder map]++      trS_using :: LHsExpr idR,+      trS_by :: Maybe (LHsExpr idR),  -- "by e" (optional)+        -- Invariant: if trS_form = GroupBy, then grp_by = Just e++      trS_ret :: SyntaxExpr idR,      -- The monomorphic 'return' function for+                                      -- the inner monad comprehensions+      trS_bind :: SyntaxExpr idR,     -- The '(>>=)' operator+      trS_fmap :: HsExpr idR          -- The polymorphic 'fmap' function for desugaring+                                      -- Only for 'group' forms+                                      -- Just a simple HsExpr, because it's+                                      -- too polymorphic for tcSyntaxOp+    }                                 -- See Note [Monad Comprehensions]++  -- Recursive statement (see Note [How RecStmt works] below)+  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRec'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | RecStmt+     { recS_ext :: XRecStmt idL idR body+     , recS_stmts :: [LStmtLR idL idR body]++        -- The next two fields are only valid after renaming+     , recS_later_ids :: [IdP idR]+                         -- The ids are a subset of the variables bound by the+                         -- stmts that are used in stmts that follow the RecStmt++     , recS_rec_ids :: [IdP idR]+                         -- Ditto, but these variables are the "recursive" ones,+                         -- that are used before they are bound in the stmts of+                         -- the RecStmt.+        -- An Id can be in both groups+        -- Both sets of Ids are (now) treated monomorphically+        -- See Note [How RecStmt works] for why they are separate++        -- Rebindable syntax+     , recS_bind_fn :: SyntaxExpr idR -- The bind function+     , recS_ret_fn  :: SyntaxExpr idR -- The return function+     , recS_mfix_fn :: SyntaxExpr idR -- The mfix function+      }+  | XStmtLR (XXStmtLR idL idR body)++-- Extra fields available post typechecking for RecStmt.+data RecStmtTc =+  RecStmtTc+     { recS_bind_ty :: Type       -- S in (>>=) :: Q -> (R -> S) -> T+     , recS_later_rets :: [PostTcExpr] -- (only used in the arrow version)+     , recS_rec_rets :: [PostTcExpr] -- These expressions correspond 1-to-1+                                  -- with recS_later_ids and recS_rec_ids,+                                  -- and are the expressions that should be+                                  -- returned by the recursion.+                                  -- They may not quite be the Ids themselves,+                                  -- because the Id may be *polymorphic*, but+                                  -- the returned thing has to be *monomorphic*,+                                  -- so they may be type applications++      , recS_ret_ty :: Type        -- The type of+                                   -- do { stmts; return (a,b,c) }+                                   -- With rebindable syntax the type might not+                                   -- be quite as simple as (m (tya, tyb, tyc)).+      }+++type instance XLastStmt        (GhcPass _) (GhcPass _) b = NoExtField++type instance XBindStmt        (GhcPass _) GhcPs b = NoExtField+type instance XBindStmt        (GhcPass _) GhcRn b = NoExtField+type instance XBindStmt        (GhcPass _) GhcTc b = Type++type instance XApplicativeStmt (GhcPass _) GhcPs b = NoExtField+type instance XApplicativeStmt (GhcPass _) GhcRn b = NoExtField+type instance XApplicativeStmt (GhcPass _) GhcTc b = Type++type instance XBodyStmt        (GhcPass _) GhcPs b = NoExtField+type instance XBodyStmt        (GhcPass _) GhcRn b = NoExtField+type instance XBodyStmt        (GhcPass _) GhcTc b = Type++type instance XLetStmt         (GhcPass _) (GhcPass _) b = NoExtField++type instance XParStmt         (GhcPass _) GhcPs b = NoExtField+type instance XParStmt         (GhcPass _) GhcRn b = NoExtField+type instance XParStmt         (GhcPass _) GhcTc b = Type++type instance XTransStmt       (GhcPass _) GhcPs b = NoExtField+type instance XTransStmt       (GhcPass _) GhcRn b = NoExtField+type instance XTransStmt       (GhcPass _) GhcTc b = Type++type instance XRecStmt         (GhcPass _) GhcPs b = NoExtField+type instance XRecStmt         (GhcPass _) GhcRn b = NoExtField+type instance XRecStmt         (GhcPass _) GhcTc b = RecStmtTc++type instance XXStmtLR         (GhcPass _) (GhcPass _) b = NoExtCon++data TransForm   -- The 'f' below is the 'using' function, 'e' is the by function+  = ThenForm     -- then f               or    then f by e             (depending on trS_by)+  | GroupForm    -- then group using f   or    then group by e using f (depending on trS_by)+  deriving Data++-- | Parenthesised Statement Block+data ParStmtBlock idL idR+  = ParStmtBlock+        (XParStmtBlock idL idR)+        [ExprLStmt idL]+        [IdP idR]          -- The variables to be returned+        (SyntaxExpr idR)   -- The return operator+  | XParStmtBlock (XXParStmtBlock idL idR)++type instance XParStmtBlock  (GhcPass pL) (GhcPass pR) = NoExtField+type instance XXParStmtBlock (GhcPass pL) (GhcPass pR) = NoExtCon++-- | Applicative Argument+data ApplicativeArg idL+  = ApplicativeArgOne      -- A single statement (BindStmt or BodyStmt)+    { xarg_app_arg_one  :: (XApplicativeArgOne idL)+    , app_arg_pattern   :: (LPat idL) -- WildPat if it was a BodyStmt (see below)+    , arg_expr          :: (LHsExpr idL)+    , is_body_stmt      :: Bool -- True <=> was a BodyStmt+                              -- False <=> was a BindStmt+                              -- See Note [Applicative BodyStmt]+    , fail_operator     :: (SyntaxExpr idL) -- The fail operator+                         -- The fail operator is needed if this is a BindStmt+                         -- where the pattern can fail. E.g.:+                         -- (Just a) <- stmt+                         -- The fail operator will be invoked if the pattern+                         -- match fails.+                         -- The fail operator is noSyntaxExpr+                         -- if the pattern match can't fail+    }+  | ApplicativeArgMany     -- do { stmts; return vars }+    { xarg_app_arg_many :: (XApplicativeArgMany idL)+    , app_stmts         :: [ExprLStmt idL] -- stmts+    , final_expr        :: (HsExpr idL)    -- return (v1,..,vn), or just (v1,..,vn)+    , bv_pattern        :: (LPat idL)      -- (v1,...,vn)+    }+  | XApplicativeArg (XXApplicativeArg idL)++type instance XApplicativeArgOne  (GhcPass _) = NoExtField+type instance XApplicativeArgMany (GhcPass _) = NoExtField+type instance XXApplicativeArg    (GhcPass _) = NoExtCon++{-+Note [The type of bind in Stmts]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Some Stmts, notably BindStmt, keep the (>>=) bind operator.+We do NOT assume that it has type+    (>>=) :: m a -> (a -> m b) -> m b+In some cases (see #303, #1537) it might have a more+exotic type, such as+    (>>=) :: m i j a -> (a -> m j k b) -> m i k b+So we must be careful not to make assumptions about the type.+In particular, the monad may not be uniform throughout.++Note [TransStmt binder map]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+The [(idR,idR)] in a TransStmt behaves as follows:++  * Before renaming: []++  * After renaming:+          [ (x27,x27), ..., (z35,z35) ]+    These are the variables+       bound by the stmts to the left of the 'group'+       and used either in the 'by' clause,+                or     in the stmts following the 'group'+    Each item is a pair of identical variables.++  * After typechecking:+          [ (x27:Int, x27:[Int]), ..., (z35:Bool, z35:[Bool]) ]+    Each pair has the same unique, but different *types*.++Note [BodyStmt]+~~~~~~~~~~~~~~~+BodyStmts are a bit tricky, because what they mean+depends on the context.  Consider the following contexts:++        A do expression of type (m res_ty)+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+        * BodyStmt E any_ty:   do { ....; E; ... }+                E :: m any_ty+          Translation: E >> ...++        A list comprehensions of type [elt_ty]+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+        * BodyStmt E Bool:   [ .. | .... E ]+                        [ .. | ..., E, ... ]+                        [ .. | .... | ..., E | ... ]+                E :: Bool+          Translation: if E then fail else ...++        A guard list, guarding a RHS of type rhs_ty+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+        * BodyStmt E BooParStmtBlockl:   f x | ..., E, ... = ...rhs...+                E :: Bool+          Translation: if E then fail else ...++        A monad comprehension of type (m res_ty)+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+        * BodyStmt E Bool:   [ .. | .... E ]+                E :: Bool+          Translation: guard E >> ...++Array comprehensions are handled like list comprehensions.++Note [How RecStmt works]+~~~~~~~~~~~~~~~~~~~~~~~~+Example:+   HsDo [ BindStmt x ex++        , RecStmt { recS_rec_ids   = [a, c]+                  , recS_stmts     = [ BindStmt b (return (a,c))+                                     , LetStmt a = ...b...+                                     , BindStmt c ec ]+                  , recS_later_ids = [a, b]++        , return (a b) ]++Here, the RecStmt binds a,b,c; but+  - Only a,b are used in the stmts *following* the RecStmt,+  - Only a,c are used in the stmts *inside* the RecStmt+        *before* their bindings++Why do we need *both* rec_ids and later_ids?  For monads they could be+combined into a single set of variables, but not for arrows.  That+follows from the types of the respective feedback operators:++        mfix :: MonadFix m => (a -> m a) -> m a+        loop :: ArrowLoop a => a (b,d) (c,d) -> a b c++* For mfix, the 'a' covers the union of the later_ids and the rec_ids+* For 'loop', 'c' is the later_ids and 'd' is the rec_ids++Note [Typing a RecStmt]+~~~~~~~~~~~~~~~~~~~~~~~+A (RecStmt stmts) types as if you had written++  (v1,..,vn, _, ..., _) <- mfix (\~(_, ..., _, r1, ..., rm) ->+                                 do { stmts+                                    ; return (v1,..vn, r1, ..., rm) })++where v1..vn are the later_ids+      r1..rm are the rec_ids++Note [Monad Comprehensions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Monad comprehensions require separate functions like 'return' and+'>>=' for desugaring. These functions are stored in the statements+used in monad comprehensions. For example, the 'return' of the 'LastStmt'+expression is used to lift the body of the monad comprehension:++  [ body | stmts ]+   =>+  stmts >>= \bndrs -> return body++In transform and grouping statements ('then ..' and 'then group ..') the+'return' function is required for nested monad comprehensions, for example:++  [ body | stmts, then f, rest ]+   =>+  f [ env | stmts ] >>= \bndrs -> [ body | rest ]++BodyStmts require the 'Control.Monad.guard' function for boolean+expressions:++  [ body | exp, stmts ]+   =>+  guard exp >> [ body | stmts ]++Parallel statements require the 'Control.Monad.Zip.mzip' function:++  [ body | stmts1 | stmts2 | .. ]+   =>+  mzip stmts1 (mzip stmts2 (..)) >>= \(bndrs1, (bndrs2, ..)) -> return body++In any other context than 'MonadComp', the fields for most of these+'SyntaxExpr's stay bottom.+++Note [Applicative BodyStmt]++(#12143) For the purposes of ApplicativeDo, we treat any BodyStmt+as if it was a BindStmt with a wildcard pattern.  For example,++  do+    x <- A+    B+    return x++is transformed as if it were++  do+    x <- A+    _ <- B+    return x++so it transforms to++  (\(x,_) -> x) <$> A <*> B++But we have to remember when we treat a BodyStmt like a BindStmt,+because in error messages we want to emit the original syntax the user+wrote, not our internal representation.  So ApplicativeArgOne has a+Bool flag that is True when the original statement was a BodyStmt, so+that we can pretty-print it correctly.+-}++instance (Outputable (StmtLR idL idL (LHsExpr idL)),+          Outputable (XXParStmtBlock idL idR))+        => Outputable (ParStmtBlock idL idR) where+  ppr (ParStmtBlock _ stmts _ _) = interpp'SP stmts+  ppr (XParStmtBlock x)          = ppr x++instance (OutputableBndrId pl, OutputableBndrId pr,+          Outputable body)+         => Outputable (StmtLR (GhcPass pl) (GhcPass pr) body) where+    ppr stmt = pprStmt stmt++pprStmt :: forall idL idR body . (OutputableBndrId idL,+                                  OutputableBndrId idR,+                                  Outputable body)+        => (StmtLR (GhcPass idL) (GhcPass idR) body) -> SDoc+pprStmt (LastStmt _ expr ret_stripped _)+  = whenPprDebug (text "[last]") <+>+       (if ret_stripped then text "return" else empty) <+>+       ppr expr+pprStmt (BindStmt _ pat expr _ _) = hsep [ppr pat, larrow, ppr expr]+pprStmt (LetStmt _ (L _ binds))   = hsep [text "let", pprBinds binds]+pprStmt (BodyStmt _ expr _ _)     = ppr expr+pprStmt (ParStmt _ stmtss _ _)   = sep (punctuate (text " | ") (map ppr stmtss))++pprStmt (TransStmt { trS_stmts = stmts, trS_by = by+                   , trS_using = using, trS_form = form })+  = sep $ punctuate comma (map ppr stmts ++ [pprTransStmt by using form])++pprStmt (RecStmt { recS_stmts = segment, recS_rec_ids = rec_ids+                 , recS_later_ids = later_ids })+  = text "rec" <+>+    vcat [ ppr_do_stmts segment+         , whenPprDebug (vcat [ text "rec_ids=" <> ppr rec_ids+                            , text "later_ids=" <> ppr later_ids])]++pprStmt (ApplicativeStmt _ args mb_join)+  = getPprStyle $ \style ->+      if userStyle style+         then pp_for_user+         else pp_debug+  where+  -- make all the Applicative stuff invisible in error messages by+  -- flattening the whole ApplicativeStmt nest back to a sequence+  -- of statements.+   pp_for_user = vcat $ concatMap flattenArg args++   -- ppr directly rather than transforming here, because we need to+   -- inject a "return" which is hard when we're polymorphic in the id+   -- type.+   flattenStmt :: ExprLStmt (GhcPass idL) -> [SDoc]+   flattenStmt (L _ (ApplicativeStmt _ args _)) = concatMap flattenArg args+   flattenStmt stmt = [ppr stmt]++   flattenArg :: forall a . (a, ApplicativeArg (GhcPass idL)) -> [SDoc]+   flattenArg (_, ApplicativeArgOne _ pat expr isBody _)+     | isBody =  -- See Note [Applicative BodyStmt]+     [ppr (BodyStmt (panic "pprStmt") expr noSyntaxExpr noSyntaxExpr+             :: ExprStmt (GhcPass idL))]+     | otherwise =+     [ppr (BindStmt (panic "pprStmt") pat expr noSyntaxExpr noSyntaxExpr+             :: ExprStmt (GhcPass idL))]+   flattenArg (_, ApplicativeArgMany _ stmts _ _) =+     concatMap flattenStmt stmts+   flattenArg (_, XApplicativeArg nec) = noExtCon nec++   pp_debug =+     let+         ap_expr = sep (punctuate (text " |") (map pp_arg args))+     in+       if isNothing mb_join+          then ap_expr+          else text "join" <+> parens ap_expr++   pp_arg :: (a, ApplicativeArg (GhcPass idL)) -> SDoc+   pp_arg (_, applicativeArg) = ppr applicativeArg++pprStmt (XStmtLR x) = ppr x+++instance (OutputableBndrId idL)+      => Outputable (ApplicativeArg (GhcPass idL)) where+  ppr = pprArg++pprArg :: forall idL . (OutputableBndrId idL) => ApplicativeArg (GhcPass idL) -> SDoc+pprArg (ApplicativeArgOne _ pat expr isBody _)+  | isBody =  -- See Note [Applicative BodyStmt]+    ppr (BodyStmt (panic "pprStmt") expr noSyntaxExpr noSyntaxExpr+            :: ExprStmt (GhcPass idL))+  | otherwise =+    ppr (BindStmt (panic "pprStmt") pat expr noSyntaxExpr noSyntaxExpr+            :: ExprStmt (GhcPass idL))+pprArg (ApplicativeArgMany _ stmts return pat) =+     ppr pat <+>+     text "<-" <+>+     ppr (HsDo (panic "pprStmt") DoExpr (noLoc+               (stmts +++                   [noLoc (LastStmt noExtField (noLoc return) False noSyntaxExpr)])))+pprArg (XApplicativeArg x) = ppr x++pprTransformStmt :: (OutputableBndrId p)+                 => [IdP (GhcPass p)] -> LHsExpr (GhcPass p)+                 -> Maybe (LHsExpr (GhcPass p)) -> SDoc+pprTransformStmt bndrs using by+  = sep [ text "then" <+> whenPprDebug (braces (ppr bndrs))+        , nest 2 (ppr using)+        , nest 2 (pprBy by)]++pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc+pprTransStmt by using ThenForm+  = sep [ text "then", nest 2 (ppr using), nest 2 (pprBy by)]+pprTransStmt by using GroupForm+  = sep [ text "then group", nest 2 (pprBy by), nest 2 (ptext (sLit "using") <+> ppr using)]++pprBy :: Outputable body => Maybe body -> SDoc+pprBy Nothing  = empty+pprBy (Just e) = text "by" <+> ppr e++pprDo :: (OutputableBndrId p, Outputable body)+      => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc+pprDo DoExpr        stmts = text "do"  <+> ppr_do_stmts stmts+pprDo GhciStmtCtxt  stmts = text "do"  <+> ppr_do_stmts stmts+pprDo ArrowExpr     stmts = text "do"  <+> ppr_do_stmts stmts+pprDo MDoExpr       stmts = text "mdo" <+> ppr_do_stmts stmts+pprDo ListComp      stmts = brackets    $ pprComp stmts+pprDo MonadComp     stmts = brackets    $ pprComp stmts+pprDo _             _     = panic "pprDo" -- PatGuard, ParStmtCxt++ppr_do_stmts :: (OutputableBndrId idL, OutputableBndrId idR,+                 Outputable body)+             => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc+-- Print a bunch of do stmts+ppr_do_stmts stmts = pprDeeperList vcat (map ppr stmts)++pprComp :: (OutputableBndrId p, Outputable body)+        => [LStmt (GhcPass p) body] -> SDoc+pprComp quals     -- Prints:  body | qual1, ..., qualn+  | Just (initStmts, L _ (LastStmt _ body _ _)) <- snocView quals+  = if null initStmts+       -- If there are no statements in a list comprehension besides the last+       -- one, we simply treat it like a normal list. This does arise+       -- occasionally in code that GHC generates, e.g., in implementations of+       -- 'range' for derived 'Ix' instances for product datatypes with exactly+       -- one constructor (e.g., see #12583).+       then ppr body+       else hang (ppr body <+> vbar) 2 (pprQuals initStmts)+  | otherwise+  = pprPanic "pprComp" (pprQuals quals)++pprQuals :: (OutputableBndrId p, Outputable body)+         => [LStmt (GhcPass p) body] -> SDoc+-- Show list comprehension qualifiers separated by commas+pprQuals quals = interpp'SP quals++{-+************************************************************************+*                                                                      *+                Template Haskell quotation brackets+*                                                                      *+************************************************************************+-}++-- | Haskell Splice+data HsSplice id+   = HsTypedSplice       --  $$z  or $$(f 4)+        (XTypedSplice id)+        SpliceDecoration -- Whether $$( ) variant found, for pretty printing+        (IdP id)         -- A unique name to identify this splice point+        (LHsExpr id)     -- See Note [Pending Splices]++   | HsUntypedSplice     --  $z  or $(f 4)+        (XUntypedSplice id)+        SpliceDecoration -- Whether $( ) variant found, for pretty printing+        (IdP id)         -- A unique name to identify this splice point+        (LHsExpr id)     -- See Note [Pending Splices]++   | HsQuasiQuote        -- See Note [Quasi-quote overview] in TcSplice+        (XQuasiQuote id)+        (IdP id)         -- Splice point+        (IdP id)         -- Quoter+        SrcSpan          -- The span of the enclosed string+        FastString       -- The enclosed string++   -- AZ:TODO: use XSplice instead of HsSpliced+   | HsSpliced  -- See Note [Delaying modFinalizers in untyped splices] in+                -- RnSplice.+                -- This is the result of splicing a splice. It is produced by+                -- the renamer and consumed by the typechecker. It lives only+                -- between the two.+        (XSpliced id)+        ThModFinalizers     -- TH finalizers produced by the splice.+        (HsSplicedThing id) -- The result of splicing+   | HsSplicedT+      DelayedSplice+   | XSplice (XXSplice id)  -- Note [Trees that Grow] extension point++type instance XTypedSplice   (GhcPass _) = NoExtField+type instance XUntypedSplice (GhcPass _) = NoExtField+type instance XQuasiQuote    (GhcPass _) = NoExtField+type instance XSpliced       (GhcPass _) = NoExtField+type instance XXSplice       (GhcPass _) = NoExtCon++-- | A splice can appear with various decorations wrapped around it. This data+-- type captures explicitly how it was originally written, for use in the pretty+-- printer.+data SpliceDecoration+  = HasParens -- ^ $( splice ) or $$( splice )+  | HasDollar -- ^ $splice or $$splice+  | NoParens  -- ^ bare splice+  deriving (Data, Eq, Show)++instance Outputable SpliceDecoration where+  ppr x = text $ show x+++isTypedSplice :: HsSplice id -> Bool+isTypedSplice (HsTypedSplice {}) = True+isTypedSplice _                  = False   -- Quasi-quotes are untyped splices++-- | Finalizers produced by a splice with+-- 'Language.Haskell.TH.Syntax.addModFinalizer'+--+-- See Note [Delaying modFinalizers in untyped splices] in RnSplice. For how+-- this is used.+--+newtype ThModFinalizers = ThModFinalizers [ForeignRef (TH.Q ())]++-- A Data instance which ignores the argument of 'ThModFinalizers'.+instance Data ThModFinalizers where+  gunfold _ z _ = z $ ThModFinalizers []+  toConstr  a   = mkConstr (dataTypeOf a) "ThModFinalizers" [] Data.Prefix+  dataTypeOf a  = mkDataType "HsExpr.ThModFinalizers" [toConstr a]++-- See Note [Running typed splices in the zonker]+-- These are the arguments that are passed to `TcSplice.runTopSplice`+data DelayedSplice =+  DelayedSplice+    TcLclEnv          -- The local environment to run the splice in+    (LHsExpr GhcRn)   -- The original renamed expression+    TcType            -- The result type of running the splice, unzonked+    (LHsExpr GhcTcId) -- The typechecked expression to run and splice in the result++-- A Data instance which ignores the argument of 'DelayedSplice'.+instance Data DelayedSplice where+  gunfold _ _ _ = panic "DelayedSplice"+  toConstr  a   = mkConstr (dataTypeOf a) "DelayedSplice" [] Data.Prefix+  dataTypeOf a  = mkDataType "HsExpr.DelayedSplice" [toConstr a]++-- | Haskell Spliced Thing+--+-- Values that can result from running a splice.+data HsSplicedThing id+    = HsSplicedExpr (HsExpr id) -- ^ Haskell Spliced Expression+    | HsSplicedTy   (HsType id) -- ^ Haskell Spliced Type+    | HsSplicedPat  (Pat id)    -- ^ Haskell Spliced Pattern+++-- See Note [Pending Splices]+type SplicePointName = Name++-- | Pending Renamer Splice+data PendingRnSplice+  = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn)++data UntypedSpliceFlavour+  = UntypedExpSplice+  | UntypedPatSplice+  | UntypedTypeSplice+  | UntypedDeclSplice+  deriving Data++-- | Pending Type-checker Splice+data PendingTcSplice+  = PendingTcSplice SplicePointName (LHsExpr GhcTc)++{-+Note [Pending Splices]+~~~~~~~~~~~~~~~~~~~~~~+When we rename an untyped bracket, we name and lift out all the nested+splices, so that when the typechecker hits the bracket, it can+typecheck those nested splices without having to walk over the untyped+bracket code.  So for example+    [| f $(g x) |]+looks like++    HsBracket (HsApp (HsVar "f") (HsSpliceE _ (g x)))++which the renamer rewrites to++    HsRnBracketOut (HsApp (HsVar f) (HsSpliceE sn (g x)))+                   [PendingRnSplice UntypedExpSplice sn (g x)]++* The 'sn' is the Name of the splice point, the SplicePointName++* The PendingRnExpSplice gives the splice that splice-point name maps to;+  and the typechecker can now conveniently find these sub-expressions++* The other copy of the splice, in the second argument of HsSpliceE+                                in the renamed first arg of HsRnBracketOut+  is used only for pretty printing++There are four varieties of pending splices generated by the renamer,+distinguished by their UntypedSpliceFlavour++ * Pending expression splices (UntypedExpSplice), e.g.,+       [|$(f x) + 2|]++   UntypedExpSplice is also used for+     * quasi-quotes, where the pending expression expands to+          $(quoter "...blah...")+       (see RnSplice.makePending, HsQuasiQuote case)++     * cross-stage lifting, where the pending expression expands to+          $(lift x)+       (see RnSplice.checkCrossStageLifting)++ * Pending pattern splices (UntypedPatSplice), e.g.,+       [| \$(f x) -> x |]++ * Pending type splices (UntypedTypeSplice), e.g.,+       [| f :: $(g x) |]++ * Pending declaration (UntypedDeclSplice), e.g.,+       [| let $(f x) in ... |]++There is a fifth variety of pending splice, which is generated by the type+checker:++  * Pending *typed* expression splices, (PendingTcSplice), e.g.,+        [||1 + $$(f 2)||]++It would be possible to eliminate HsRnBracketOut and use HsBracketOut for the+output of the renamer. However, when pretty printing the output of the renamer,+e.g., in a type error message, we *do not* want to print out the pending+splices. In contrast, when pretty printing the output of the type checker, we+*do* want to print the pending splices. So splitting them up seems to make+sense, although I hate to add another constructor to HsExpr.+-}++instance OutputableBndrId p+       => Outputable (HsSplicedThing (GhcPass p)) where+  ppr (HsSplicedExpr e) = ppr_expr e+  ppr (HsSplicedTy   t) = ppr t+  ppr (HsSplicedPat  p) = ppr p++instance (OutputableBndrId p) => Outputable (HsSplice (GhcPass p)) where+  ppr s = pprSplice s++pprPendingSplice :: (OutputableBndrId p)+                 => SplicePointName -> LHsExpr (GhcPass p) -> SDoc+pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e)++pprSpliceDecl ::  (OutputableBndrId p)+          => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc+pprSpliceDecl e@HsQuasiQuote{} _ = pprSplice e+pprSpliceDecl e ExplicitSplice   = text "$(" <> ppr_splice_decl e <> text ")"+pprSpliceDecl e ImplicitSplice   = ppr_splice_decl e++ppr_splice_decl :: (OutputableBndrId p)+                => HsSplice (GhcPass p) -> SDoc+ppr_splice_decl (HsUntypedSplice _ _ n e) = ppr_splice empty n e empty+ppr_splice_decl e = pprSplice e++pprSplice :: (OutputableBndrId p) => HsSplice (GhcPass p) -> SDoc+pprSplice (HsTypedSplice _ HasParens  n e)+  = ppr_splice (text "$$(") n e (text ")")+pprSplice (HsTypedSplice _ HasDollar n e)+  = ppr_splice (text "$$") n e empty+pprSplice (HsTypedSplice _ NoParens n e)+  = ppr_splice empty n e empty+pprSplice (HsUntypedSplice _ HasParens  n e)+  = ppr_splice (text "$(") n e (text ")")+pprSplice (HsUntypedSplice _ HasDollar n e)+  = ppr_splice (text "$")  n e empty+pprSplice (HsUntypedSplice _ NoParens n e)+  = ppr_splice empty  n e empty+pprSplice (HsQuasiQuote _ n q _ s)      = ppr_quasi n q s+pprSplice (HsSpliced _ _ thing)         = ppr thing+pprSplice (HsSplicedT {})               = text "Unevaluated typed splice"+pprSplice (XSplice x)                   = ppr x++ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc+ppr_quasi n quoter quote = whenPprDebug (brackets (ppr n)) <>+                           char '[' <> ppr quoter <> vbar <>+                           ppr quote <> text "|]"++ppr_splice :: (OutputableBndrId p)+           => SDoc -> (IdP (GhcPass p)) -> LHsExpr (GhcPass p) -> SDoc -> SDoc+ppr_splice herald n e trail+    = herald <> whenPprDebug (brackets (ppr n)) <> ppr e <> trail++-- | Haskell Bracket+data HsBracket p+  = ExpBr  (XExpBr p)   (LHsExpr p)    -- [|  expr  |]+  | PatBr  (XPatBr p)   (LPat p)      -- [p| pat   |]+  | DecBrL (XDecBrL p)  [LHsDecl p]   -- [d| decls |]; result of parser+  | DecBrG (XDecBrG p)  (HsGroup p)   -- [d| decls |]; result of renamer+  | TypBr  (XTypBr p)   (LHsType p)   -- [t| type  |]+  | VarBr  (XVarBr p)   Bool (IdP p)  -- True: 'x, False: ''T+                                -- (The Bool flag is used only in pprHsBracket)+  | TExpBr (XTExpBr p) (LHsExpr p)    -- [||  expr  ||]+  | XBracket (XXBracket p)            -- Note [Trees that Grow] extension point++type instance XExpBr      (GhcPass _) = NoExtField+type instance XPatBr      (GhcPass _) = NoExtField+type instance XDecBrL     (GhcPass _) = NoExtField+type instance XDecBrG     (GhcPass _) = NoExtField+type instance XTypBr      (GhcPass _) = NoExtField+type instance XVarBr      (GhcPass _) = NoExtField+type instance XTExpBr     (GhcPass _) = NoExtField+type instance XXBracket   (GhcPass _) = NoExtCon++isTypedBracket :: HsBracket id -> Bool+isTypedBracket (TExpBr {}) = True+isTypedBracket _           = False++instance OutputableBndrId p+          => Outputable (HsBracket (GhcPass p)) where+  ppr = pprHsBracket+++pprHsBracket :: (OutputableBndrId p) => HsBracket (GhcPass p) -> SDoc+pprHsBracket (ExpBr _ e)   = thBrackets empty (ppr e)+pprHsBracket (PatBr _ p)   = thBrackets (char 'p') (ppr p)+pprHsBracket (DecBrG _ gp) = thBrackets (char 'd') (ppr gp)+pprHsBracket (DecBrL _ ds) = thBrackets (char 'd') (vcat (map ppr ds))+pprHsBracket (TypBr _ t)   = thBrackets (char 't') (ppr t)+pprHsBracket (VarBr _ True n)+  = char '\'' <> pprPrefixOcc n+pprHsBracket (VarBr _ False n)+  = text "''" <> pprPrefixOcc n+pprHsBracket (TExpBr _ e)  = thTyBrackets (ppr e)+pprHsBracket (XBracket e)  = ppr e++thBrackets :: SDoc -> SDoc -> SDoc+thBrackets pp_kind pp_body = char '[' <> pp_kind <> vbar <+>+                             pp_body <+> text "|]"++thTyBrackets :: SDoc -> SDoc+thTyBrackets pp_body = text "[||" <+> pp_body <+> ptext (sLit "||]")++instance Outputable PendingRnSplice where+  ppr (PendingRnSplice _ n e) = pprPendingSplice n e++instance Outputable PendingTcSplice where+  ppr (PendingTcSplice n e) = pprPendingSplice n e++{-+************************************************************************+*                                                                      *+\subsection{Enumerations and list comprehensions}+*                                                                      *+************************************************************************+-}++-- | Arithmetic Sequence Information+data ArithSeqInfo id+  = From            (LHsExpr id)+  | FromThen        (LHsExpr id)+                    (LHsExpr id)+  | FromTo          (LHsExpr id)+                    (LHsExpr id)+  | FromThenTo      (LHsExpr id)+                    (LHsExpr id)+                    (LHsExpr id)+-- AZ: Sould ArithSeqInfo have a TTG extension?++instance OutputableBndrId p+         => Outputable (ArithSeqInfo (GhcPass p)) where+    ppr (From e1)             = hcat [ppr e1, pp_dotdot]+    ppr (FromThen e1 e2)      = hcat [ppr e1, comma, space, ppr e2, pp_dotdot]+    ppr (FromTo e1 e3)        = hcat [ppr e1, pp_dotdot, ppr e3]+    ppr (FromThenTo e1 e2 e3)+      = hcat [ppr e1, comma, space, ppr e2, pp_dotdot, ppr e3]++pp_dotdot :: SDoc+pp_dotdot = text " .. "++{-+************************************************************************+*                                                                      *+\subsection{HsMatchCtxt}+*                                                                      *+************************************************************************+-}++-- | Haskell Match Context+--+-- Context of a pattern match. This is more subtle than it would seem. See Note+-- [Varieties of pattern matches].+data HsMatchContext id -- Not an extensible tag+  = FunRhs { mc_fun        :: Located id    -- ^ function binder of @f@+           , mc_fixity     :: LexicalFixity -- ^ fixing of @f@+           , mc_strictness :: SrcStrictness -- ^ was @f@ banged?+                                            -- See Note [FunBind vs PatBind]+           }+                                -- ^A pattern matching on an argument of a+                                -- function binding+  | LambdaExpr                  -- ^Patterns of a lambda+  | CaseAlt                     -- ^Patterns and guards on a case alternative+  | IfAlt                       -- ^Guards of a multi-way if alternative+  | ProcExpr                    -- ^Patterns of a proc+  | PatBindRhs                  -- ^A pattern binding  eg [y] <- e = e+  | PatBindGuards               -- ^Guards of pattern bindings, e.g.,+                                --    (Just b) | Just _ <- x = e+                                --             | otherwise   = e'++  | RecUpd                      -- ^Record update [used only in DsExpr to+                                --    tell matchWrapper what sort of+                                --    runtime error message to generate]++  | StmtCtxt (HsStmtContext id) -- ^Pattern of a do-stmt, list comprehension,+                                -- pattern guard, etc++  | ThPatSplice            -- ^A Template Haskell pattern splice+  | ThPatQuote             -- ^A Template Haskell pattern quotation [p| (a,b) |]+  | PatSyn                 -- ^A pattern synonym declaration+  deriving Functor+deriving instance (Data id) => Data (HsMatchContext id)++instance OutputableBndr id => Outputable (HsMatchContext id) where+  ppr m@(FunRhs{})          = text "FunRhs" <+> ppr (mc_fun m) <+> ppr (mc_fixity m)+  ppr LambdaExpr            = text "LambdaExpr"+  ppr CaseAlt               = text "CaseAlt"+  ppr IfAlt                 = text "IfAlt"+  ppr ProcExpr              = text "ProcExpr"+  ppr PatBindRhs            = text "PatBindRhs"+  ppr PatBindGuards         = text "PatBindGuards"+  ppr RecUpd                = text "RecUpd"+  ppr (StmtCtxt _)          = text "StmtCtxt _"+  ppr ThPatSplice           = text "ThPatSplice"+  ppr ThPatQuote            = text "ThPatQuote"+  ppr PatSyn                = text "PatSyn"++isPatSynCtxt :: HsMatchContext id -> Bool+isPatSynCtxt ctxt =+  case ctxt of+    PatSyn -> True+    _      -> False++-- | Haskell Statement Context. It expects to be parameterised with one of+-- 'RdrName', 'Name' or 'Id'+data HsStmtContext id+  = ListComp+  | MonadComp++  | DoExpr                           -- ^do { ... }+  | MDoExpr                          -- ^mdo { ... }  ie recursive do-expression+  | ArrowExpr                        -- ^do-notation in an arrow-command context++  | GhciStmtCtxt                     -- ^A command-line Stmt in GHCi pat <- rhs+  | PatGuard (HsMatchContext id)     -- ^Pattern guard for specified thing+  | ParStmtCtxt (HsStmtContext id)   -- ^A branch of a parallel stmt+  | TransStmtCtxt (HsStmtContext id) -- ^A branch of a transform stmt+  deriving Functor+deriving instance (Data id) => Data (HsStmtContext id)++isComprehensionContext :: HsStmtContext id -> Bool+-- Uses comprehension syntax [ e | quals ]+isComprehensionContext ListComp          = True+isComprehensionContext MonadComp         = True+isComprehensionContext (ParStmtCtxt c)   = isComprehensionContext c+isComprehensionContext (TransStmtCtxt c) = isComprehensionContext c+isComprehensionContext _ = False++-- | Should pattern match failure in a 'HsStmtContext' be desugared using+-- 'MonadFail'?+isMonadFailStmtContext :: HsStmtContext id -> Bool+isMonadFailStmtContext MonadComp            = True+isMonadFailStmtContext DoExpr               = True+isMonadFailStmtContext MDoExpr              = True+isMonadFailStmtContext GhciStmtCtxt         = True+isMonadFailStmtContext (ParStmtCtxt ctxt)   = isMonadFailStmtContext ctxt+isMonadFailStmtContext (TransStmtCtxt ctxt) = isMonadFailStmtContext ctxt+isMonadFailStmtContext _ = False -- ListComp, PatGuard, ArrowExpr++isMonadCompContext :: HsStmtContext id -> Bool+isMonadCompContext MonadComp = True+isMonadCompContext _         = False++matchSeparator :: HsMatchContext id -> SDoc+matchSeparator (FunRhs {})   = text "="+matchSeparator CaseAlt       = text "->"+matchSeparator IfAlt         = text "->"+matchSeparator LambdaExpr    = text "->"+matchSeparator ProcExpr      = text "->"+matchSeparator PatBindRhs    = text "="+matchSeparator PatBindGuards = text "="+matchSeparator (StmtCtxt _)  = text "<-"+matchSeparator RecUpd        = text "=" -- This can be printed by the pattern+                                       -- match checker trace+matchSeparator ThPatSplice  = panic "unused"+matchSeparator ThPatQuote   = panic "unused"+matchSeparator PatSyn       = panic "unused"++pprMatchContext :: (Outputable (NameOrRdrName id),Outputable id)+                => HsMatchContext id -> SDoc+pprMatchContext ctxt+  | want_an ctxt = text "an" <+> pprMatchContextNoun ctxt+  | otherwise    = text "a"  <+> pprMatchContextNoun ctxt+  where+    want_an (FunRhs {}) = True  -- Use "an" in front+    want_an ProcExpr    = True+    want_an _           = False++pprMatchContextNoun :: (Outputable (NameOrRdrName id),Outputable id)+                    => HsMatchContext id -> SDoc+pprMatchContextNoun (FunRhs {mc_fun=L _ fun})+                                    = text "equation for"+                                      <+> quotes (ppr fun)+pprMatchContextNoun CaseAlt         = text "case alternative"+pprMatchContextNoun IfAlt           = text "multi-way if alternative"+pprMatchContextNoun RecUpd          = text "record-update construct"+pprMatchContextNoun ThPatSplice     = text "Template Haskell pattern splice"+pprMatchContextNoun ThPatQuote      = text "Template Haskell pattern quotation"+pprMatchContextNoun PatBindRhs      = text "pattern binding"+pprMatchContextNoun PatBindGuards   = text "pattern binding guards"+pprMatchContextNoun LambdaExpr      = text "lambda abstraction"+pprMatchContextNoun ProcExpr        = text "arrow abstraction"+pprMatchContextNoun (StmtCtxt ctxt) = text "pattern binding in"+                                      $$ pprAStmtContext ctxt+pprMatchContextNoun PatSyn          = text "pattern synonym declaration"++-----------------+pprAStmtContext, pprStmtContext :: (Outputable id,+                                    Outputable (NameOrRdrName id))+                                => HsStmtContext id -> SDoc+pprAStmtContext ctxt = article <+> pprStmtContext ctxt+  where+    pp_an = text "an"+    pp_a  = text "a"+    article = case ctxt of+                  MDoExpr       -> pp_an+                  GhciStmtCtxt  -> pp_an+                  _             -> pp_a+++-----------------+pprStmtContext GhciStmtCtxt    = text "interactive GHCi command"+pprStmtContext DoExpr          = text "'do' block"+pprStmtContext MDoExpr         = text "'mdo' block"+pprStmtContext ArrowExpr       = text "'do' block in an arrow command"+pprStmtContext ListComp        = text "list comprehension"+pprStmtContext MonadComp       = text "monad comprehension"+pprStmtContext (PatGuard ctxt) = text "pattern guard for" $$ pprMatchContext ctxt++-- Drop the inner contexts when reporting errors, else we get+--     Unexpected transform statement+--     in a transformed branch of+--          transformed branch of+--          transformed branch of monad comprehension+pprStmtContext (ParStmtCtxt c) =+  ifPprDebug (sep [text "parallel branch of", pprAStmtContext c])+             (pprStmtContext c)+pprStmtContext (TransStmtCtxt c) =+  ifPprDebug (sep [text "transformed branch of", pprAStmtContext c])+             (pprStmtContext c)++instance (Outputable (GhcPass p), Outputable (NameOrRdrName (GhcPass p)))+      => Outputable (HsStmtContext (GhcPass p)) where+    ppr = pprStmtContext++-- Used to generate the string for a *runtime* error message+matchContextErrString :: Outputable id+                      => HsMatchContext id -> SDoc+matchContextErrString (FunRhs{mc_fun=L _ fun})   = text "function" <+> ppr fun+matchContextErrString CaseAlt                    = text "case"+matchContextErrString IfAlt                      = text "multi-way if"+matchContextErrString PatBindRhs                 = text "pattern binding"+matchContextErrString PatBindGuards              = text "pattern binding guards"+matchContextErrString RecUpd                     = text "record update"+matchContextErrString LambdaExpr                 = text "lambda"+matchContextErrString ProcExpr                   = text "proc"+matchContextErrString ThPatSplice                = panic "matchContextErrString"  -- Not used at runtime+matchContextErrString ThPatQuote                 = panic "matchContextErrString"  -- Not used at runtime+matchContextErrString PatSyn                     = panic "matchContextErrString"  -- Not used at runtime+matchContextErrString (StmtCtxt (ParStmtCtxt c))   = matchContextErrString (StmtCtxt c)+matchContextErrString (StmtCtxt (TransStmtCtxt c)) = matchContextErrString (StmtCtxt c)+matchContextErrString (StmtCtxt (PatGuard _))      = text "pattern guard"+matchContextErrString (StmtCtxt GhciStmtCtxt)      = text "interactive GHCi command"+matchContextErrString (StmtCtxt DoExpr)            = text "'do' block"+matchContextErrString (StmtCtxt ArrowExpr)         = text "'do' block"+matchContextErrString (StmtCtxt MDoExpr)           = text "'mdo' block"+matchContextErrString (StmtCtxt ListComp)          = text "list comprehension"+matchContextErrString (StmtCtxt MonadComp)         = text "monad comprehension"++pprMatchInCtxt :: (OutputableBndrId idR,+                   -- TODO:AZ these constraints do not make sense+                 Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))),+                 Outputable body)+               => Match (GhcPass idR) body -> SDoc+pprMatchInCtxt match  = hang (text "In" <+> pprMatchContext (m_ctxt match)+                                        <> colon)+                             4 (pprMatch match)++pprStmtInCtxt :: (OutputableBndrId idL,+                  OutputableBndrId idR,+                  Outputable body)+              => HsStmtContext (IdP (GhcPass idL))+              -> StmtLR (GhcPass idL) (GhcPass idR) body+              -> SDoc+pprStmtInCtxt ctxt (LastStmt _ e _ _)+  | isComprehensionContext ctxt      -- For [ e | .. ], do not mutter about "stmts"+  = hang (text "In the expression:") 2 (ppr e)++pprStmtInCtxt ctxt stmt+  = hang (text "In a stmt of" <+> pprAStmtContext ctxt <> colon)+       2 (ppr_stmt stmt)+  where+    -- For Group and Transform Stmts, don't print the nested stmts!+    ppr_stmt (TransStmt { trS_by = by, trS_using = using+                        , trS_form = form }) = pprTransStmt by using form+    ppr_stmt stmt = pprStmt stmt
+ GHC/Hs/Expr.hs-boot view
@@ -0,0 +1,52 @@+{-# LANGUAGE CPP, KindSignatures #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE RoleAnnotations #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE TypeFamilies #-}++module GHC.Hs.Expr where++import SrcLoc     ( Located )+import Outputable ( SDoc, Outputable )+import {-# SOURCE #-} GHC.Hs.Pat  ( LPat )+import BasicTypes ( SpliceExplicitFlag(..))+import GHC.Hs.Extension ( OutputableBndrId, GhcPass )++type role HsExpr nominal+type role HsCmd nominal+type role MatchGroup nominal nominal+type role GRHSs nominal nominal+type role HsSplice nominal+type role SyntaxExpr nominal+data HsExpr (i :: *)+data HsCmd  (i :: *)+data HsSplice (i :: *)+data MatchGroup (a :: *) (body :: *)+data GRHSs (a :: *) (body :: *)+data SyntaxExpr (i :: *)++instance OutputableBndrId p => Outputable (HsExpr (GhcPass p))+instance OutputableBndrId p => Outputable (HsCmd (GhcPass p))++type LHsExpr a = Located (HsExpr a)++pprLExpr :: (OutputableBndrId p) => LHsExpr (GhcPass p) -> SDoc++pprExpr :: (OutputableBndrId p) => HsExpr (GhcPass p) -> SDoc++pprSplice :: (OutputableBndrId p) => HsSplice (GhcPass p) -> SDoc++pprSpliceDecl ::  (OutputableBndrId p)+          => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc++pprPatBind :: forall bndr p body. (OutputableBndrId bndr,+                                   OutputableBndrId p,+                                   Outputable body)+           => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc++pprFunBind :: (OutputableBndrId idR, Outputable body)+           => MatchGroup (GhcPass idR) body -> SDoc
+ GHC/Hs/Extension.hs view
@@ -0,0 +1,1181 @@+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE EmptyCase #-}+{-# LANGUAGE EmptyDataDeriving #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FunctionalDependencies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeFamilyDependencies #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder++module GHC.Hs.Extension where++-- This module captures the type families to precisely identify the extension+-- points for GHC.Hs syntax++import GhcPrelude++import Data.Data hiding ( Fixity )+import GHC.Hs.PlaceHolder+import Name+import RdrName+import Var+import Outputable+import SrcLoc (Located)++import Data.Kind++{-+Note [Trees that grow]+~~~~~~~~~~~~~~~~~~~~~~++See https://gitlab.haskell.org/ghc/ghc/wikis/implementing-trees-that-grow++The hsSyn AST is reused across multiple compiler passes. We also have the+Template Haskell AST, and the haskell-src-exts one (outside of GHC)++Supporting multiple passes means the AST has various warts on it to cope with+the specifics for the phases, such as the 'ValBindsOut', 'ConPatOut',+'SigPatOut' etc.++The growable AST will allow each of these variants to be captured explicitly,+such that they only exist in the given compiler pass AST, as selected by the+type parameter to the AST.++In addition it will allow tool writers to define their own extensions to capture+additional information for the tool, in a natural way.++A further goal is to provide a means to harmonise the Template Haskell and+haskell-src-exts ASTs as well.++-}++-- | A placeholder type for TTG extension points that are not currently+-- unused to represent any particular value.+--+-- This should not be confused with 'NoExtCon', which are found in unused+-- extension /constructors/ and therefore should never be inhabited. In+-- contrast, 'NoExtField' is used in extension /points/ (e.g., as the field of+-- some constructor), so it must have an inhabitant to construct AST passes+-- that manipulate fields with that extension point as their type.+data NoExtField = NoExtField+  deriving (Data,Eq,Ord)++instance Outputable NoExtField where+  ppr _ = text "NoExtField"++-- | Used when constructing a term with an unused extension point.+noExtField :: NoExtField+noExtField = NoExtField++-- | Used in TTG extension constructors that have yet to be extended with+-- anything. If an extension constructor has 'NoExtCon' as its field, it is+-- not intended to ever be constructed anywhere, and any function that consumes+-- the extension constructor can eliminate it by way of 'noExtCon'.+--+-- This should not be confused with 'NoExtField', which are found in unused+-- extension /points/ (not /constructors/) and therefore can be inhabited.++-- See also [NoExtCon and strict fields].+data NoExtCon+  deriving (Data,Eq,Ord)++instance Outputable NoExtCon where+  ppr = noExtCon++-- | Eliminate a 'NoExtCon'. Much like 'Data.Void.absurd'.+noExtCon :: NoExtCon -> a+noExtCon x = case x of {}++{-+Note [NoExtCon and strict fields]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Currently, any unused TTG extension constructor will generally look like the+following:++  type instance XXHsDecl (GhcPass _) = NoExtCon+  data HsDecl p+    = ...+    | XHsDecl (XXHsDecl p)++This means that any function that wishes to consume an HsDecl will need to+have a case for XHsDecl. This might look like this:++  ex :: HsDecl GhcPs -> HsDecl GhcRn+  ...+  ex (XHsDecl nec) = noExtCon nec++Ideally, we wouldn't need a case for XHsDecl at all (it /is/ supposed to be+an unused extension constructor, after all). There is a way to achieve this+on GHC 8.8 or later: make the field of XHsDecl strict:++  data HsDecl p+    = ...+    | XHsDecl !(XXHsDecl p)++If this is done, GHC's pattern-match coverage checker is clever enough to+figure out that the XHsDecl case of `ex` is unreachable, so it can simply be+omitted. (See Note [Extensions to GADTs Meet Their Match] in Check for more on+how this works.)++When GHC drops support for bootstrapping with GHC 8.6 and earlier, we can make+the strict field changes described above and delete gobs of code involving+`noExtCon`. Until then, it is necessary to use, so be aware of it when writing+code that consumes unused extension constructors.+-}++-- | Used as a data type index for the hsSyn AST+data GhcPass (c :: Pass)+deriving instance Eq (GhcPass c)+deriving instance Typeable c => Data (GhcPass c)++data Pass = Parsed | Renamed | Typechecked+         deriving (Data)++-- Type synonyms as a shorthand for tagging+type GhcPs   = GhcPass 'Parsed      -- Old 'RdrName' type param+type GhcRn   = GhcPass 'Renamed     -- Old 'Name' type param+type GhcTc   = GhcPass 'Typechecked -- Old 'Id' type para,+type GhcTcId = GhcTc                -- Old 'TcId' type param++-- | GHC's L prefixed variants wrap their vanilla variant in this type family,+-- to add 'SrcLoc' info via 'Located'. Other passes than 'GhcPass' not+-- interested in location information can define this instance as @f p@.+type family XRec p (f :: * -> *) = r | r -> p f+type instance XRec (GhcPass p) f = Located (f (GhcPass p))++-- | Maps the "normal" id type for a given pass+type family IdP p+type instance IdP GhcPs = RdrName+type instance IdP GhcRn = Name+type instance IdP GhcTc = Id++type LIdP p = Located (IdP p)++-- | Marks that a field uses the GhcRn variant even when the pass+-- parameter is GhcTc. Useful for storing HsTypes in GHC.Hs.Exprs, say, because+-- HsType GhcTc should never occur.+type family NoGhcTc (p :: Type) where+    -- this way, GHC can figure out that the result is a GhcPass+  NoGhcTc (GhcPass pass) = GhcPass (NoGhcTcPass pass)+  NoGhcTc other          = other++type family NoGhcTcPass (p :: Pass) :: Pass where+  NoGhcTcPass 'Typechecked = 'Renamed+  NoGhcTcPass other        = other++-- =====================================================================+-- Type families for the HsBinds extension points++-- HsLocalBindsLR type families+type family XHsValBinds      x x'+type family XHsIPBinds       x x'+type family XEmptyLocalBinds x x'+type family XXHsLocalBindsLR x x'++type ForallXHsLocalBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) =+       ( c (XHsValBinds      x x')+       , c (XHsIPBinds       x x')+       , c (XEmptyLocalBinds x x')+       , c (XXHsLocalBindsLR x x')+       )++-- ValBindsLR type families+type family XValBinds    x x'+type family XXValBindsLR x x'++type ForallXValBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) =+       ( c (XValBinds    x x')+       , c (XXValBindsLR x x')+       )+++-- HsBindsLR type families+type family XFunBind    x x'+type family XPatBind    x x'+type family XVarBind    x x'+type family XAbsBinds   x x'+type family XPatSynBind x x'+type family XXHsBindsLR x x'++type ForallXHsBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) =+       ( c (XFunBind    x x')+       , c (XPatBind    x x')+       , c (XVarBind    x x')+       , c (XAbsBinds   x x')+       , c (XPatSynBind x x')+       , c (XXHsBindsLR x x')+       )++-- ABExport type families+type family XABE x+type family XXABExport x++type ForallXABExport (c :: * -> Constraint) (x :: *) =+       ( c (XABE       x)+       , c (XXABExport x)+       )++-- PatSynBind type families+type family XPSB x x'+type family XXPatSynBind x x'++type ForallXPatSynBind  (c :: * -> Constraint) (x :: *) (x' :: *) =+       ( c (XPSB         x x')+       , c (XXPatSynBind x x')+       )++-- HsIPBinds type families+type family XIPBinds    x+type family XXHsIPBinds x++type ForallXHsIPBinds (c :: * -> Constraint) (x :: *) =+       ( c (XIPBinds    x)+       , c (XXHsIPBinds x)+       )++-- IPBind type families+type family XCIPBind x+type family XXIPBind x++type ForallXIPBind (c :: * -> Constraint) (x :: *) =+       ( c (XCIPBind x)+       , c (XXIPBind x)+       )++-- Sig type families+type family XTypeSig          x+type family XPatSynSig        x+type family XClassOpSig       x+type family XIdSig            x+type family XFixSig           x+type family XInlineSig        x+type family XSpecSig          x+type family XSpecInstSig      x+type family XMinimalSig       x+type family XSCCFunSig        x+type family XCompleteMatchSig x+type family XXSig             x++type ForallXSig (c :: * -> Constraint) (x :: *) =+       ( c (XTypeSig          x)+       , c (XPatSynSig        x)+       , c (XClassOpSig       x)+       , c (XIdSig            x)+       , c (XFixSig           x)+       , c (XInlineSig        x)+       , c (XSpecSig          x)+       , c (XSpecInstSig      x)+       , c (XMinimalSig       x)+       , c (XSCCFunSig        x)+       , c (XCompleteMatchSig x)+       , c (XXSig             x)+       )++-- FixitySig type families+type family XFixitySig          x+type family XXFixitySig         x++type ForallXFixitySig (c :: * -> Constraint) (x :: *) =+       ( c (XFixitySig         x)+       , c (XXFixitySig        x)+       )++-- StandaloneKindSig type families+type family XStandaloneKindSig  x+type family XXStandaloneKindSig x++-- =====================================================================+-- Type families for the HsDecls extension points++-- HsDecl type families+type family XTyClD       x+type family XInstD       x+type family XDerivD      x+type family XValD        x+type family XSigD        x+type family XKindSigD    x+type family XDefD        x+type family XForD        x+type family XWarningD    x+type family XAnnD        x+type family XRuleD       x+type family XSpliceD     x+type family XDocD        x+type family XRoleAnnotD  x+type family XXHsDecl     x++type ForallXHsDecl (c :: * -> Constraint) (x :: *) =+       ( c (XTyClD       x)+       , c (XInstD       x)+       , c (XDerivD      x)+       , c (XValD        x)+       , c (XSigD        x)+       , c (XKindSigD    x)+       , c (XDefD        x)+       , c (XForD        x)+       , c (XWarningD    x)+       , c (XAnnD        x)+       , c (XRuleD       x)+       , c (XSpliceD     x)+       , c (XDocD        x)+       , c (XRoleAnnotD  x)+       , c (XXHsDecl    x)+       )++-- -------------------------------------+-- HsGroup type families+type family XCHsGroup      x+type family XXHsGroup      x++type ForallXHsGroup (c :: * -> Constraint) (x :: *) =+       ( c (XCHsGroup       x)+       , c (XXHsGroup       x)+       )++-- -------------------------------------+-- SpliceDecl type families+type family XSpliceDecl       x+type family XXSpliceDecl      x++type ForallXSpliceDecl (c :: * -> Constraint) (x :: *) =+       ( c (XSpliceDecl        x)+       , c (XXSpliceDecl       x)+       )++-- -------------------------------------+-- TyClDecl type families+type family XFamDecl       x+type family XSynDecl       x+type family XDataDecl      x+type family XClassDecl     x+type family XXTyClDecl     x++type ForallXTyClDecl (c :: * -> Constraint) (x :: *) =+       ( c (XFamDecl       x)+       , c (XSynDecl       x)+       , c (XDataDecl      x)+       , c (XClassDecl     x)+       , c (XXTyClDecl     x)+       )++-- -------------------------------------+-- TyClGroup type families+type family XCTyClGroup      x+type family XXTyClGroup      x++type ForallXTyClGroup (c :: * -> Constraint) (x :: *) =+       ( c (XCTyClGroup       x)+       , c (XXTyClGroup       x)+       )++-- -------------------------------------+-- FamilyResultSig type families+type family XNoSig            x+type family XCKindSig         x -- Clashes with XKindSig above+type family XTyVarSig         x+type family XXFamilyResultSig x++type ForallXFamilyResultSig (c :: * -> Constraint) (x :: *) =+       ( c (XNoSig            x)+       , c (XCKindSig         x)+       , c (XTyVarSig         x)+       , c (XXFamilyResultSig x)+       )++-- -------------------------------------+-- FamilyDecl type families+type family XCFamilyDecl      x+type family XXFamilyDecl      x++type ForallXFamilyDecl (c :: * -> Constraint) (x :: *) =+       ( c (XCFamilyDecl       x)+       , c (XXFamilyDecl       x)+       )++-- -------------------------------------+-- HsDataDefn type families+type family XCHsDataDefn      x+type family XXHsDataDefn      x++type ForallXHsDataDefn (c :: * -> Constraint) (x :: *) =+       ( c (XCHsDataDefn       x)+       , c (XXHsDataDefn       x)+       )++-- -------------------------------------+-- HsDerivingClause type families+type family XCHsDerivingClause      x+type family XXHsDerivingClause      x++type ForallXHsDerivingClause (c :: * -> Constraint) (x :: *) =+       ( c (XCHsDerivingClause       x)+       , c (XXHsDerivingClause       x)+       )++-- -------------------------------------+-- ConDecl type families+type family XConDeclGADT   x+type family XConDeclH98    x+type family XXConDecl      x++type ForallXConDecl (c :: * -> Constraint) (x :: *) =+       ( c (XConDeclGADT    x)+       , c (XConDeclH98     x)+       , c (XXConDecl       x)+       )++-- -------------------------------------+-- FamEqn type families+type family XCFamEqn      x r+type family XXFamEqn      x r++type ForallXFamEqn (c :: * -> Constraint) (x :: *) (r :: *) =+       ( c (XCFamEqn       x r)+       , c (XXFamEqn       x r)+       )++-- -------------------------------------+-- ClsInstDecl type families+type family XCClsInstDecl      x+type family XXClsInstDecl      x++type ForallXClsInstDecl (c :: * -> Constraint) (x :: *) =+       ( c (XCClsInstDecl       x)+       , c (XXClsInstDecl       x)+       )++-- -------------------------------------+-- ClsInstDecl type families+type family XClsInstD      x+type family XDataFamInstD  x+type family XTyFamInstD    x+type family XXInstDecl     x++type ForallXInstDecl (c :: * -> Constraint) (x :: *) =+       ( c (XClsInstD       x)+       , c (XDataFamInstD   x)+       , c (XTyFamInstD     x)+       , c (XXInstDecl      x)+       )++-- -------------------------------------+-- DerivDecl type families+type family XCDerivDecl      x+type family XXDerivDecl      x++type ForallXDerivDecl (c :: * -> Constraint) (x :: *) =+       ( c (XCDerivDecl       x)+       , c (XXDerivDecl       x)+       )++-- -------------------------------------+-- DerivStrategy type family+type family XViaStrategy x++-- -------------------------------------+-- DefaultDecl type families+type family XCDefaultDecl      x+type family XXDefaultDecl      x++type ForallXDefaultDecl (c :: * -> Constraint) (x :: *) =+       ( c (XCDefaultDecl       x)+       , c (XXDefaultDecl       x)+       )++-- -------------------------------------+-- DefaultDecl type families+type family XForeignImport     x+type family XForeignExport     x+type family XXForeignDecl      x++type ForallXForeignDecl (c :: * -> Constraint) (x :: *) =+       ( c (XForeignImport      x)+       , c (XForeignExport      x)+       , c (XXForeignDecl       x)+       )++-- -------------------------------------+-- RuleDecls type families+type family XCRuleDecls      x+type family XXRuleDecls      x++type ForallXRuleDecls (c :: * -> Constraint) (x :: *) =+       ( c (XCRuleDecls       x)+       , c (XXRuleDecls       x)+       )+++-- -------------------------------------+-- RuleDecl type families+type family XHsRule          x+type family XXRuleDecl       x++type ForallXRuleDecl (c :: * -> Constraint) (x :: *) =+       ( c (XHsRule           x)+       , c (XXRuleDecl        x)+       )++-- -------------------------------------+-- RuleBndr type families+type family XCRuleBndr      x+type family XRuleBndrSig    x+type family XXRuleBndr      x++type ForallXRuleBndr (c :: * -> Constraint) (x :: *) =+       ( c (XCRuleBndr       x)+       , c (XRuleBndrSig     x)+       , c (XXRuleBndr       x)+       )++-- -------------------------------------+-- WarnDecls type families+type family XWarnings        x+type family XXWarnDecls      x++type ForallXWarnDecls (c :: * -> Constraint) (x :: *) =+       ( c (XWarnings        x)+       , c (XXWarnDecls      x)+       )++-- -------------------------------------+-- AnnDecl type families+type family XWarning        x+type family XXWarnDecl      x++type ForallXWarnDecl (c :: * -> Constraint) (x :: *) =+       ( c (XWarning        x)+       , c (XXWarnDecl      x)+       )++-- -------------------------------------+-- AnnDecl type families+type family XHsAnnotation  x+type family XXAnnDecl      x++type ForallXAnnDecl (c :: * -> Constraint) (x :: *) =+       ( c (XHsAnnotation  x)+       , c (XXAnnDecl      x)+       )++-- -------------------------------------+-- RoleAnnotDecl type families+type family XCRoleAnnotDecl  x+type family XXRoleAnnotDecl  x++type ForallXRoleAnnotDecl (c :: * -> Constraint) (x :: *) =+       ( c (XCRoleAnnotDecl  x)+       , c (XXRoleAnnotDecl  x)+       )++-- =====================================================================+-- Type families for the HsExpr extension points++type family XVar            x+type family XUnboundVar     x+type family XConLikeOut     x+type family XRecFld         x+type family XOverLabel      x+type family XIPVar          x+type family XOverLitE       x+type family XLitE           x+type family XLam            x+type family XLamCase        x+type family XApp            x+type family XAppTypeE       x+type family XOpApp          x+type family XNegApp         x+type family XPar            x+type family XSectionL       x+type family XSectionR       x+type family XExplicitTuple  x+type family XExplicitSum    x+type family XCase           x+type family XIf             x+type family XMultiIf        x+type family XLet            x+type family XDo             x+type family XExplicitList   x+type family XRecordCon      x+type family XRecordUpd      x+type family XExprWithTySig  x+type family XArithSeq       x+type family XSCC            x+type family XCoreAnn        x+type family XBracket        x+type family XRnBracketOut   x+type family XTcBracketOut   x+type family XSpliceE        x+type family XProc           x+type family XStatic         x+type family XTick           x+type family XBinTick        x+type family XTickPragma     x+type family XWrap           x+type family XXExpr          x++type ForallXExpr (c :: * -> Constraint) (x :: *) =+       ( c (XVar            x)+       , c (XUnboundVar     x)+       , c (XConLikeOut     x)+       , c (XRecFld         x)+       , c (XOverLabel      x)+       , c (XIPVar          x)+       , c (XOverLitE       x)+       , c (XLitE           x)+       , c (XLam            x)+       , c (XLamCase        x)+       , c (XApp            x)+       , c (XAppTypeE       x)+       , c (XOpApp          x)+       , c (XNegApp         x)+       , c (XPar            x)+       , c (XSectionL       x)+       , c (XSectionR       x)+       , c (XExplicitTuple  x)+       , c (XExplicitSum    x)+       , c (XCase           x)+       , c (XIf             x)+       , c (XMultiIf        x)+       , c (XLet            x)+       , c (XDo             x)+       , c (XExplicitList   x)+       , c (XRecordCon      x)+       , c (XRecordUpd      x)+       , c (XExprWithTySig  x)+       , c (XArithSeq       x)+       , c (XSCC            x)+       , c (XCoreAnn        x)+       , c (XBracket        x)+       , c (XRnBracketOut   x)+       , c (XTcBracketOut   x)+       , c (XSpliceE        x)+       , c (XProc           x)+       , c (XStatic         x)+       , c (XTick           x)+       , c (XBinTick        x)+       , c (XTickPragma     x)+       , c (XWrap           x)+       , c (XXExpr          x)+       )+-- ---------------------------------------------------------------------++type family XUnambiguous        x+type family XAmbiguous          x+type family XXAmbiguousFieldOcc x++type ForallXAmbiguousFieldOcc (c :: * -> Constraint) (x :: *) =+       ( c (XUnambiguous        x)+       , c (XAmbiguous          x)+       , c (XXAmbiguousFieldOcc x)+       )++-- ----------------------------------------------------------------------++type family XPresent  x+type family XMissing  x+type family XXTupArg  x++type ForallXTupArg (c :: * -> Constraint) (x :: *) =+       ( c (XPresent x)+       , c (XMissing x)+       , c (XXTupArg x)+       )++-- ---------------------------------------------------------------------++type family XTypedSplice   x+type family XUntypedSplice x+type family XQuasiQuote    x+type family XSpliced       x+type family XXSplice       x++type ForallXSplice (c :: * -> Constraint) (x :: *) =+       ( c (XTypedSplice   x)+       , c (XUntypedSplice x)+       , c (XQuasiQuote    x)+       , c (XSpliced       x)+       , c (XXSplice       x)+       )++-- ---------------------------------------------------------------------++type family XExpBr      x+type family XPatBr      x+type family XDecBrL     x+type family XDecBrG     x+type family XTypBr      x+type family XVarBr      x+type family XTExpBr     x+type family XXBracket   x++type ForallXBracket (c :: * -> Constraint) (x :: *) =+       ( c (XExpBr      x)+       , c (XPatBr      x)+       , c (XDecBrL     x)+       , c (XDecBrG     x)+       , c (XTypBr      x)+       , c (XVarBr      x)+       , c (XTExpBr     x)+       , c (XXBracket   x)+       )++-- ---------------------------------------------------------------------++type family XCmdTop  x+type family XXCmdTop x++type ForallXCmdTop (c :: * -> Constraint) (x :: *) =+       ( c (XCmdTop  x)+       , c (XXCmdTop x)+       )++-- -------------------------------------++type family XMG           x b+type family XXMatchGroup  x b++type ForallXMatchGroup (c :: * -> Constraint) (x :: *) (b :: *) =+       ( c (XMG          x b)+       , c (XXMatchGroup x b)+       )++-- -------------------------------------++type family XCMatch  x b+type family XXMatch  x b++type ForallXMatch (c :: * -> Constraint) (x :: *) (b :: *) =+       ( c (XCMatch  x b)+       , c (XXMatch  x b)+       )++-- -------------------------------------++type family XCGRHSs  x b+type family XXGRHSs  x b++type ForallXGRHSs (c :: * -> Constraint) (x :: *) (b :: *) =+       ( c (XCGRHSs  x b)+       , c (XXGRHSs  x b)+       )++-- -------------------------------------++type family XCGRHS  x b+type family XXGRHS  x b++type ForallXGRHS (c :: * -> Constraint) (x :: *) (b :: *) =+       ( c (XCGRHS  x b)+       , c (XXGRHS  x b)+       )++-- -------------------------------------++type family XLastStmt        x x' b+type family XBindStmt        x x' b+type family XApplicativeStmt x x' b+type family XBodyStmt        x x' b+type family XLetStmt         x x' b+type family XParStmt         x x' b+type family XTransStmt       x x' b+type family XRecStmt         x x' b+type family XXStmtLR         x x' b++type ForallXStmtLR (c :: * -> Constraint) (x :: *)  (x' :: *) (b :: *) =+       ( c (XLastStmt         x x' b)+       , c (XBindStmt         x x' b)+       , c (XApplicativeStmt  x x' b)+       , c (XBodyStmt         x x' b)+       , c (XLetStmt          x x' b)+       , c (XParStmt          x x' b)+       , c (XTransStmt        x x' b)+       , c (XRecStmt          x x' b)+       , c (XXStmtLR          x x' b)+       )++-- ---------------------------------------------------------------------++type family XCmdArrApp  x+type family XCmdArrForm x+type family XCmdApp     x+type family XCmdLam     x+type family XCmdPar     x+type family XCmdCase    x+type family XCmdIf      x+type family XCmdLet     x+type family XCmdDo      x+type family XCmdWrap    x+type family XXCmd       x++type ForallXCmd (c :: * -> Constraint) (x :: *) =+       ( c (XCmdArrApp  x)+       , c (XCmdArrForm x)+       , c (XCmdApp     x)+       , c (XCmdLam     x)+       , c (XCmdPar     x)+       , c (XCmdCase    x)+       , c (XCmdIf      x)+       , c (XCmdLet     x)+       , c (XCmdDo      x)+       , c (XCmdWrap    x)+       , c (XXCmd       x)+       )++-- ---------------------------------------------------------------------++type family XParStmtBlock  x x'+type family XXParStmtBlock x x'++type ForallXParStmtBlock (c :: * -> Constraint) (x :: *) (x' :: *) =+       ( c (XParStmtBlock  x x')+       , c (XXParStmtBlock x x')+       )++-- ---------------------------------------------------------------------++type family XApplicativeArgOne   x+type family XApplicativeArgMany  x+type family XXApplicativeArg     x++type ForallXApplicativeArg (c :: * -> Constraint) (x :: *) =+       ( c (XApplicativeArgOne   x)+       , c (XApplicativeArgMany  x)+       , c (XXApplicativeArg     x)+       )++-- =====================================================================+-- Type families for the HsImpExp extension points++-- TODO++-- =====================================================================+-- Type families for the HsLit extension points++-- We define a type family for each extension point. This is based on prepending+-- 'X' to the constructor name, for ease of reference.+type family XHsChar x+type family XHsCharPrim x+type family XHsString x+type family XHsStringPrim x+type family XHsInt x+type family XHsIntPrim x+type family XHsWordPrim x+type family XHsInt64Prim x+type family XHsWord64Prim x+type family XHsInteger x+type family XHsRat x+type family XHsFloatPrim x+type family XHsDoublePrim x+type family XXLit x++-- | Helper to apply a constraint to all extension points. It has one+-- entry per extension point type family.+type ForallXHsLit (c :: * -> Constraint) (x :: *) =+  ( c (XHsChar       x)+  , c (XHsCharPrim   x)+  , c (XHsDoublePrim x)+  , c (XHsFloatPrim  x)+  , c (XHsInt        x)+  , c (XHsInt64Prim  x)+  , c (XHsIntPrim    x)+  , c (XHsInteger    x)+  , c (XHsRat        x)+  , c (XHsString     x)+  , c (XHsStringPrim x)+  , c (XHsWord64Prim x)+  , c (XHsWordPrim   x)+  , c (XXLit         x)+  )++type family XOverLit  x+type family XXOverLit x++type ForallXOverLit (c :: * -> Constraint) (x :: *) =+       ( c (XOverLit  x)+       , c (XXOverLit x)+       )++-- =====================================================================+-- Type families for the HsPat extension points++type family XWildPat   x+type family XVarPat    x+type family XLazyPat   x+type family XAsPat     x+type family XParPat    x+type family XBangPat   x+type family XListPat   x+type family XTuplePat  x+type family XSumPat    x+type family XConPat    x+type family XViewPat   x+type family XSplicePat x+type family XLitPat    x+type family XNPat      x+type family XNPlusKPat x+type family XSigPat    x+type family XCoPat     x+type family XXPat      x+++type ForallXPat (c :: * -> Constraint) (x :: *) =+       ( c (XWildPat   x)+       , c (XVarPat    x)+       , c (XLazyPat   x)+       , c (XAsPat     x)+       , c (XParPat    x)+       , c (XBangPat   x)+       , c (XListPat   x)+       , c (XTuplePat  x)+       , c (XSumPat    x)+       , c (XViewPat   x)+       , c (XSplicePat x)+       , c (XLitPat    x)+       , c (XNPat      x)+       , c (XNPlusKPat x)+       , c (XSigPat    x)+       , c (XCoPat     x)+       , c (XXPat      x)+       )++-- =====================================================================+-- Type families for the HsTypes type families++type family XHsQTvs       x+type family XXLHsQTyVars  x++type ForallXLHsQTyVars (c :: * -> Constraint) (x :: *) =+       ( c (XHsQTvs       x)+       , c (XXLHsQTyVars  x)+       )++-- -------------------------------------++type family XHsIB              x b+type family XXHsImplicitBndrs  x b++type ForallXHsImplicitBndrs (c :: * -> Constraint) (x :: *) (b :: *) =+       ( c (XHsIB              x b)+       , c (XXHsImplicitBndrs  x b)+       )++-- -------------------------------------++type family XHsWC              x b+type family XXHsWildCardBndrs  x b++type ForallXHsWildCardBndrs(c :: * -> Constraint) (x :: *) (b :: *) =+       ( c (XHsWC              x b)+       , c (XXHsWildCardBndrs  x b)+       )++-- -------------------------------------++type family XForAllTy        x+type family XQualTy          x+type family XTyVar           x+type family XAppTy           x+type family XAppKindTy       x+type family XFunTy           x+type family XListTy          x+type family XTupleTy         x+type family XSumTy           x+type family XOpTy            x+type family XParTy           x+type family XIParamTy        x+type family XStarTy          x+type family XKindSig         x+type family XSpliceTy        x+type family XDocTy           x+type family XBangTy          x+type family XRecTy           x+type family XExplicitListTy  x+type family XExplicitTupleTy x+type family XTyLit           x+type family XWildCardTy      x+type family XXType           x++-- | Helper to apply a constraint to all extension points. It has one+-- entry per extension point type family.+type ForallXType (c :: * -> Constraint) (x :: *) =+       ( c (XForAllTy        x)+       , c (XQualTy          x)+       , c (XTyVar           x)+       , c (XAppTy           x)+       , c (XAppKindTy       x)+       , c (XFunTy           x)+       , c (XListTy          x)+       , c (XTupleTy         x)+       , c (XSumTy           x)+       , c (XOpTy            x)+       , c (XParTy           x)+       , c (XIParamTy        x)+       , c (XStarTy          x)+       , c (XKindSig         x)+       , c (XSpliceTy        x)+       , c (XDocTy           x)+       , c (XBangTy          x)+       , c (XRecTy           x)+       , c (XExplicitListTy  x)+       , c (XExplicitTupleTy x)+       , c (XTyLit           x)+       , c (XWildCardTy      x)+       , c (XXType           x)+       )++-- ---------------------------------------------------------------------++type family XUserTyVar   x+type family XKindedTyVar x+type family XXTyVarBndr  x++type ForallXTyVarBndr (c :: * -> Constraint) (x :: *) =+       ( c (XUserTyVar      x)+       , c (XKindedTyVar    x)+       , c (XXTyVarBndr     x)+       )++-- ---------------------------------------------------------------------++type family XConDeclField  x+type family XXConDeclField x++type ForallXConDeclField (c :: * -> Constraint) (x :: *) =+       ( c (XConDeclField  x)+       , c (XXConDeclField x)+       )++-- ---------------------------------------------------------------------++type family XCFieldOcc x+type family XXFieldOcc x++type ForallXFieldOcc (c :: * -> Constraint) (x :: *) =+       ( c (XCFieldOcc x)+       , c (XXFieldOcc x)+       )+++-- =====================================================================+-- Type families for the HsImpExp type families++type family XCImportDecl       x+type family XXImportDecl       x++type ForallXImportDecl (c :: * -> Constraint) (x :: *) =+       ( c (XCImportDecl x)+       , c (XXImportDecl x)+       )++-- -------------------------------------++type family XIEVar             x+type family XIEThingAbs        x+type family XIEThingAll        x+type family XIEThingWith       x+type family XIEModuleContents  x+type family XIEGroup           x+type family XIEDoc             x+type family XIEDocNamed        x+type family XXIE               x++type ForallXIE (c :: * -> Constraint) (x :: *) =+       ( c (XIEVar x)+       , c (XIEThingAbs        x)+       , c (XIEThingAll        x)+       , c (XIEThingWith       x)+       , c (XIEModuleContents  x)+       , c (XIEGroup           x)+       , c (XIEDoc             x)+       , c (XIEDocNamed        x)+       , c (XXIE               x)+       )++-- -------------------------------------+++-- =====================================================================+-- End of Type family definitions+-- =====================================================================++-- ----------------------------------------------------------------------+-- | Conversion of annotations from one type index to another. This is required+-- where the AST is converted from one pass to another, and the extension values+-- need to be brought along if possible. So for example a 'SourceText' is+-- converted via 'id', but needs a type signature to keep the type checker+-- happy.+class Convertable a b  | a -> b where+  convert :: a -> b++instance Convertable a a where+  convert = id++-- | A constraint capturing all the extension points that can be converted via+-- @instance Convertable a a@+type ConvertIdX a b =+  (XHsDoublePrim a ~ XHsDoublePrim b,+   XHsFloatPrim a ~ XHsFloatPrim b,+   XHsRat a ~ XHsRat b,+   XHsInteger a ~ XHsInteger b,+   XHsWord64Prim a ~ XHsWord64Prim b,+   XHsInt64Prim a ~ XHsInt64Prim b,+   XHsWordPrim a ~ XHsWordPrim b,+   XHsIntPrim a ~ XHsIntPrim b,+   XHsInt a ~ XHsInt b,+   XHsStringPrim a ~ XHsStringPrim b,+   XHsString a ~ XHsString b,+   XHsCharPrim a ~ XHsCharPrim b,+   XHsChar a ~ XHsChar b,+   XXLit a ~ XXLit b)++-- ----------------------------------------------------------------------++-- Note [OutputableX]+-- ~~~~~~~~~~~~~~~~~~+--+-- is required because the type family resolution+-- process cannot determine that all cases are handled for a `GhcPass p`+-- case where the cases are listed separately.+--+-- So+--+--   type instance XXHsIPBinds    (GhcPass p) = NoExtCon+--+-- will correctly deduce Outputable for (GhcPass p), but+--+--   type instance XIPBinds       GhcPs = NoExt+--   type instance XIPBinds       GhcRn = NoExt+--   type instance XIPBinds       GhcTc = TcEvBinds+--+-- will not.+++-- | Provide a summary constraint that gives all am Outputable constraint to+-- extension points needing one+type OutputableX p = -- See Note [OutputableX]+  ( Outputable (XIPBinds    p)+  , Outputable (XViaStrategy p)+  , Outputable (XViaStrategy GhcRn)+  )+-- TODO: Should OutputableX be included in OutputableBndrId?++-- ----------------------------------------------------------------------++-- |Constraint type to bundle up the requirement for 'OutputableBndr' on both+-- the @p@ and the 'NameOrRdrName' type for it+type OutputableBndrId pass =+  ( OutputableBndr (NameOrRdrName (IdP (GhcPass pass)))+  , OutputableBndr (IdP (GhcPass pass))+  , OutputableBndr (NameOrRdrName (IdP (NoGhcTc (GhcPass pass))))+  , OutputableBndr (IdP (NoGhcTc (GhcPass pass)))+  , NoGhcTc (GhcPass pass) ~ NoGhcTc (NoGhcTc (GhcPass pass))+  , OutputableX (GhcPass pass)+  , OutputableX (NoGhcTc (GhcPass pass))+  )
+ GHC/Hs/ImpExp.hs view
@@ -0,0 +1,367 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+++GHC.Hs.ImpExp: Abstract syntax: imports, exports, interfaces+-}++{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder++module GHC.Hs.ImpExp where++import GhcPrelude++import Module           ( ModuleName )+import GHC.Hs.Doc       ( HsDocString )+import OccName          ( HasOccName(..), isTcOcc, isSymOcc )+import BasicTypes       ( SourceText(..), StringLiteral(..), pprWithSourceText )+import FieldLabel       ( FieldLbl(..) )++import Outputable+import FastString+import SrcLoc+import GHC.Hs.Extension++import Data.Data+import Data.Maybe++{-+************************************************************************+*                                                                      *+\subsection{Import and export declaration lists}+*                                                                      *+************************************************************************++One per \tr{import} declaration in a module.+-}++-- | Located Import Declaration+type LImportDecl pass = Located (ImportDecl pass)+        -- ^ When in a list this may have+        --+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'++        -- For details on above see note [Api annotations] in ApiAnnotation++-- | If/how an import is 'qualified'.+data ImportDeclQualifiedStyle+  = QualifiedPre  -- ^ 'qualified' appears in prepositive position.+  | QualifiedPost -- ^ 'qualified' appears in postpositive position.+  | NotQualified  -- ^ Not qualified.+  deriving (Eq, Data)++-- | Given two possible located 'qualified' tokens, compute a style+-- (in a conforming Haskell program only one of the two can be not+-- 'Nothing'). This is called from 'Parser.y'.+importDeclQualifiedStyle :: Maybe (Located a)+                         -> Maybe (Located a)+                         -> ImportDeclQualifiedStyle+importDeclQualifiedStyle mPre mPost =+  if isJust mPre then QualifiedPre+  else if isJust mPost then QualifiedPost else NotQualified++-- | Convenience function to answer the question if an import decl. is+-- qualified.+isImportDeclQualified :: ImportDeclQualifiedStyle -> Bool+isImportDeclQualified NotQualified = False+isImportDeclQualified _ = True++-- | Import Declaration+--+-- A single Haskell @import@ declaration.+data ImportDecl pass+  = ImportDecl {+      ideclExt       :: XCImportDecl pass,+      ideclSourceSrc :: SourceText,+                                 -- Note [Pragma source text] in BasicTypes+      ideclName      :: Located ModuleName, -- ^ Module name.+      ideclPkgQual   :: Maybe StringLiteral,  -- ^ Package qualifier.+      ideclSource    :: Bool,          -- ^ True <=> {-\# SOURCE \#-} import+      ideclSafe      :: Bool,          -- ^ True => safe import+      ideclQualified :: ImportDeclQualifiedStyle, -- ^ If/how the import is qualified.+      ideclImplicit  :: Bool,          -- ^ True => implicit import (of Prelude)+      ideclAs        :: Maybe (Located ModuleName),  -- ^ as Module+      ideclHiding    :: Maybe (Bool, Located [LIE pass])+                                       -- ^ (True => hiding, names)+    }+  | XImportDecl (XXImportDecl pass)+     -- ^+     --  'ApiAnnotation.AnnKeywordId's+     --+     --  - 'ApiAnnotation.AnnImport'+     --+     --  - 'ApiAnnotation.AnnOpen', 'ApiAnnotation.AnnClose' for ideclSource+     --+     --  - 'ApiAnnotation.AnnSafe','ApiAnnotation.AnnQualified',+     --    'ApiAnnotation.AnnPackageName','ApiAnnotation.AnnAs',+     --    'ApiAnnotation.AnnVal'+     --+     --  - 'ApiAnnotation.AnnHiding','ApiAnnotation.AnnOpen',+     --    'ApiAnnotation.AnnClose' attached+     --     to location in ideclHiding++     -- For details on above see note [Api annotations] in ApiAnnotation++type instance XCImportDecl  (GhcPass _) = NoExtField+type instance XXImportDecl  (GhcPass _) = NoExtCon++simpleImportDecl :: ModuleName -> ImportDecl (GhcPass p)+simpleImportDecl mn = ImportDecl {+      ideclExt       = noExtField,+      ideclSourceSrc = NoSourceText,+      ideclName      = noLoc mn,+      ideclPkgQual   = Nothing,+      ideclSource    = False,+      ideclSafe      = False,+      ideclImplicit  = False,+      ideclQualified = NotQualified,+      ideclAs        = Nothing,+      ideclHiding    = Nothing+    }++instance OutputableBndrId p+       => Outputable (ImportDecl (GhcPass p)) where+    ppr (ImportDecl { ideclSourceSrc = mSrcText, ideclName = mod'+                    , ideclPkgQual = pkg+                    , ideclSource = from, ideclSafe = safe+                    , ideclQualified = qual, ideclImplicit = implicit+                    , ideclAs = as, ideclHiding = spec })+      = hang (hsep [text "import", ppr_imp from, pp_implicit implicit, pp_safe safe,+                    pp_qual qual False, pp_pkg pkg, ppr mod', pp_qual qual True, pp_as as])+             4 (pp_spec spec)+      where+        pp_implicit False = empty+        pp_implicit True = ptext (sLit ("(implicit)"))++        pp_pkg Nothing                    = empty+        pp_pkg (Just (StringLiteral st p))+          = pprWithSourceText st (doubleQuotes (ftext p))++        pp_qual QualifiedPre False = text "qualified" -- Prepositive qualifier/prepositive position.+        pp_qual QualifiedPost True = text "qualified" -- Postpositive qualifier/postpositive position.+        pp_qual QualifiedPre True = empty -- Prepositive qualifier/postpositive position.+        pp_qual QualifiedPost False = empty -- Postpositive qualifier/prepositive position.+        pp_qual NotQualified _ = empty++        pp_safe False   = empty+        pp_safe True    = text "safe"++        pp_as Nothing   = empty+        pp_as (Just a)  = text "as" <+> ppr a++        ppr_imp True  = case mSrcText of+                          NoSourceText   -> text "{-# SOURCE #-}"+                          SourceText src -> text src <+> text "#-}"+        ppr_imp False = empty++        pp_spec Nothing             = empty+        pp_spec (Just (False, (L _ ies))) = ppr_ies ies+        pp_spec (Just (True, (L _ ies))) = text "hiding" <+> ppr_ies ies++        ppr_ies []  = text "()"+        ppr_ies ies = char '(' <+> interpp'SP ies <+> char ')'+    ppr (XImportDecl x) = ppr x++{-+************************************************************************+*                                                                      *+\subsection{Imported and exported entities}+*                                                                      *+************************************************************************+-}++-- | A name in an import or export specification which may have adornments. Used+-- primarily for accurate pretty printing of ParsedSource, and API Annotation+-- placement.+data IEWrappedName name+  = IEName    (Located name)  -- ^ no extra+  | IEPattern (Located name)  -- ^ pattern X+  | IEType    (Located name)  -- ^ type (:+:)+  deriving (Eq,Data)++-- | Located name with possible adornment+-- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnType',+--         'ApiAnnotation.AnnPattern'+type LIEWrappedName name = Located (IEWrappedName name)+-- For details on above see note [Api annotations] in ApiAnnotation+++-- | Located Import or Export+type LIE pass = Located (IE pass)+        -- ^ When in a list this may have+        --+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'++        -- For details on above see note [Api annotations] in ApiAnnotation++-- | Imported or exported entity.+data IE pass+  = IEVar       (XIEVar pass) (LIEWrappedName (IdP pass))+        -- ^ Imported or Exported Variable++  | IEThingAbs  (XIEThingAbs pass) (LIEWrappedName (IdP pass))+        -- ^ Imported or exported Thing with Absent list+        --+        -- The thing is a Class/Type (can't tell)+        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnPattern',+        --             'ApiAnnotation.AnnType','ApiAnnotation.AnnVal'++        -- For details on above see note [Api annotations] in ApiAnnotation+        -- See Note [Located RdrNames] in GHC.Hs.Expr+  | IEThingAll  (XIEThingAll pass) (LIEWrappedName (IdP pass))+        -- ^ Imported or exported Thing with All imported or exported+        --+        -- The thing is a Class/Type and the All refers to methods/constructors+        --+        -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen',+        --       'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose',+        --                                 'ApiAnnotation.AnnType'++        -- For details on above see note [Api annotations] in ApiAnnotation+        -- See Note [Located RdrNames] in GHC.Hs.Expr++  | IEThingWith (XIEThingWith pass)+                (LIEWrappedName (IdP pass))+                IEWildcard+                [LIEWrappedName (IdP pass)]+                [Located (FieldLbl (IdP pass))]+        -- ^ Imported or exported Thing With given imported or exported+        --+        -- The thing is a Class/Type and the imported or exported things are+        -- methods/constructors and record fields; see Note [IEThingWith]+        -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen',+        --                                   'ApiAnnotation.AnnClose',+        --                                   'ApiAnnotation.AnnComma',+        --                                   'ApiAnnotation.AnnType'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | IEModuleContents  (XIEModuleContents pass) (Located ModuleName)+        -- ^ Imported or exported module contents+        --+        -- (Export Only)+        --+        -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnModule'++        -- For details on above see note [Api annotations] in ApiAnnotation+  | IEGroup             (XIEGroup pass) Int HsDocString -- ^ Doc section heading+  | IEDoc               (XIEDoc pass) HsDocString       -- ^ Some documentation+  | IEDocNamed          (XIEDocNamed pass) String    -- ^ Reference to named doc+  | XIE (XXIE pass)++type instance XIEVar             (GhcPass _) = NoExtField+type instance XIEThingAbs        (GhcPass _) = NoExtField+type instance XIEThingAll        (GhcPass _) = NoExtField+type instance XIEThingWith       (GhcPass _) = NoExtField+type instance XIEModuleContents  (GhcPass _) = NoExtField+type instance XIEGroup           (GhcPass _) = NoExtField+type instance XIEDoc             (GhcPass _) = NoExtField+type instance XIEDocNamed        (GhcPass _) = NoExtField+type instance XXIE               (GhcPass _) = NoExtCon++-- | Imported or Exported Wildcard+data IEWildcard = NoIEWildcard | IEWildcard Int deriving (Eq, Data)++{-+Note [IEThingWith]+~~~~~~~~~~~~~~~~~~++A definition like++    module M ( T(MkT, x) ) where+      data T = MkT { x :: Int }++gives rise to++    IEThingWith T [MkT] [FieldLabel "x" False x)]           (without DuplicateRecordFields)+    IEThingWith T [MkT] [FieldLabel "x" True $sel:x:MkT)]   (with    DuplicateRecordFields)++See Note [Representing fields in AvailInfo] in Avail for more details.+-}++ieName :: IE (GhcPass p) -> IdP (GhcPass p)+ieName (IEVar _ (L _ n))              = ieWrappedName n+ieName (IEThingAbs  _ (L _ n))        = ieWrappedName n+ieName (IEThingWith _ (L _ n) _ _ _)  = ieWrappedName n+ieName (IEThingAll  _ (L _ n))        = ieWrappedName n+ieName _ = panic "ieName failed pattern match!"++ieNames :: IE (GhcPass p) -> [IdP (GhcPass p)]+ieNames (IEVar       _ (L _ n)   )     = [ieWrappedName n]+ieNames (IEThingAbs  _ (L _ n)   )     = [ieWrappedName n]+ieNames (IEThingAll  _ (L _ n)   )     = [ieWrappedName n]+ieNames (IEThingWith _ (L _ n) _ ns _) = ieWrappedName n+                                       : map (ieWrappedName . unLoc) ns+ieNames (IEModuleContents {})     = []+ieNames (IEGroup          {})     = []+ieNames (IEDoc            {})     = []+ieNames (IEDocNamed       {})     = []+ieNames (XIE nec) = noExtCon nec++ieWrappedName :: IEWrappedName name -> name+ieWrappedName (IEName    (L _ n)) = n+ieWrappedName (IEPattern (L _ n)) = n+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)+replaceWrappedName (IEType    (L l _)) n = IEType    (L l n)++replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2+replaceLWrappedName (L l n) n' = L l (replaceWrappedName n n')++instance OutputableBndrId p => Outputable (IE (GhcPass p)) where+    ppr (IEVar       _     var) = ppr (unLoc var)+    ppr (IEThingAbs  _   thing) = ppr (unLoc thing)+    ppr (IEThingAll  _   thing) = hcat [ppr (unLoc thing), text "(..)"]+    ppr (IEThingWith _ thing wc withs flds)+        = ppr (unLoc thing) <> parens (fsep (punctuate comma+                                              (ppWiths +++                                              map (ppr . flLabel . unLoc) flds)))+      where+        ppWiths =+          case wc of+              NoIEWildcard ->+                map (ppr . unLoc) withs+              IEWildcard pos ->+                let (bs, as) = splitAt pos (map (ppr . unLoc) withs)+                in bs ++ [text ".."] ++ as+    ppr (IEModuleContents _ mod')+        = text "module" <+> ppr mod'+    ppr (IEGroup _ n _)           = text ("<IEGroup: " ++ show n ++ ">")+    ppr (IEDoc _ doc)             = ppr doc+    ppr (IEDocNamed _ string)     = text ("<IEDocNamed: " ++ string ++ ">")+    ppr (XIE x) = ppr x++instance (HasOccName name) => HasOccName (IEWrappedName name) where+  occName w = occName (ieWrappedName w)++instance (OutputableBndr name) => OutputableBndr (IEWrappedName name) where+  pprBndr bs   w = pprBndr bs   (ieWrappedName w)+  pprPrefixOcc w = pprPrefixOcc (ieWrappedName w)+  pprInfixOcc  w = pprInfixOcc  (ieWrappedName w)++instance (OutputableBndr name) => Outputable (IEWrappedName name) where+  ppr (IEName    n) = pprPrefixOcc (unLoc n)+  ppr (IEPattern n) = text "pattern" <+> pprPrefixOcc (unLoc n)+  ppr (IEType    n) = text "type"    <+> pprPrefixOcc (unLoc n)++pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc+pprImpExp name = type_pref <+> pprPrefixOcc name+    where+    occ = occName name+    type_pref | isTcOcc occ && isSymOcc occ = text "type"+              | otherwise                   = empty
+ GHC/Hs/Instances.hs view
@@ -0,0 +1,425 @@+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}+module GHC.Hs.Instances where++-- This module defines the Data instances for the hsSyn AST.++-- It happens here to avoid massive constraint types on the AST with concomitant+-- slow GHC bootstrap times.++-- UndecidableInstances ?++import Data.Data hiding ( Fixity )++import GhcPrelude+import GHC.Hs.Extension+import GHC.Hs.Binds+import GHC.Hs.Decls+import GHC.Hs.Expr+import GHC.Hs.Lit+import GHC.Hs.Types+import GHC.Hs.Pat+import GHC.Hs.ImpExp++-- ---------------------------------------------------------------------+-- Data derivations from GHC.Hs-----------------------------------------++-- ---------------------------------------------------------------------+-- Data derivations from GHC.Hs.Binds ----------------------------------++-- deriving instance (DataIdLR pL pR) => Data (HsLocalBindsLR pL pR)+deriving instance Data (HsLocalBindsLR GhcPs GhcPs)+deriving instance Data (HsLocalBindsLR GhcPs GhcRn)+deriving instance Data (HsLocalBindsLR GhcRn GhcRn)+deriving instance Data (HsLocalBindsLR GhcTc GhcTc)++-- deriving instance (DataIdLR pL pR) => Data (HsValBindsLR pL pR)+deriving instance Data (HsValBindsLR GhcPs GhcPs)+deriving instance Data (HsValBindsLR GhcPs GhcRn)+deriving instance Data (HsValBindsLR GhcRn GhcRn)+deriving instance Data (HsValBindsLR GhcTc GhcTc)++-- deriving instance (DataIdLR pL pL) => Data (NHsValBindsLR pL)+deriving instance Data (NHsValBindsLR GhcPs)+deriving instance Data (NHsValBindsLR GhcRn)+deriving instance Data (NHsValBindsLR GhcTc)++-- deriving instance (DataIdLR pL pR) => Data (HsBindLR pL pR)+deriving instance Data (HsBindLR GhcPs GhcPs)+deriving instance Data (HsBindLR GhcPs GhcRn)+deriving instance Data (HsBindLR GhcRn GhcRn)+deriving instance Data (HsBindLR GhcTc GhcTc)++-- deriving instance (DataId p)       => Data (ABExport p)+deriving instance Data (ABExport GhcPs)+deriving instance Data (ABExport GhcRn)+deriving instance Data (ABExport GhcTc)++-- deriving instance (DataIdLR pL pR) => Data (PatSynBind pL pR)+deriving instance Data (PatSynBind GhcPs GhcPs)+deriving instance Data (PatSynBind GhcPs GhcRn)+deriving instance Data (PatSynBind GhcRn GhcRn)+deriving instance Data (PatSynBind GhcTc GhcTc)++-- deriving instance (DataIdLR p p)   => Data (HsIPBinds p)+deriving instance Data (HsIPBinds GhcPs)+deriving instance Data (HsIPBinds GhcRn)+deriving instance Data (HsIPBinds GhcTc)++-- deriving instance (DataIdLR p p)   => Data (IPBind p)+deriving instance Data (IPBind GhcPs)+deriving instance Data (IPBind GhcRn)+deriving instance Data (IPBind GhcTc)++-- deriving instance (DataIdLR p p)   => Data (Sig p)+deriving instance Data (Sig GhcPs)+deriving instance Data (Sig GhcRn)+deriving instance Data (Sig GhcTc)++-- deriving instance (DataId p)       => Data (FixitySig p)+deriving instance Data (FixitySig GhcPs)+deriving instance Data (FixitySig GhcRn)+deriving instance Data (FixitySig GhcTc)++-- deriving instance (DataId p)       => Data (StandaloneKindSig p)+deriving instance Data (StandaloneKindSig GhcPs)+deriving instance Data (StandaloneKindSig GhcRn)+deriving instance Data (StandaloneKindSig GhcTc)++-- deriving instance (DataIdLR p p)   => Data (HsPatSynDir p)+deriving instance Data (HsPatSynDir GhcPs)+deriving instance Data (HsPatSynDir GhcRn)+deriving instance Data (HsPatSynDir GhcTc)++-- ---------------------------------------------------------------------+-- Data derivations from GHC.Hs.Decls ----------------------------------++-- deriving instance (DataIdLR p p) => Data (HsDecl p)+deriving instance Data (HsDecl GhcPs)+deriving instance Data (HsDecl GhcRn)+deriving instance Data (HsDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsGroup p)+deriving instance Data (HsGroup GhcPs)+deriving instance Data (HsGroup GhcRn)+deriving instance Data (HsGroup GhcTc)++-- deriving instance (DataIdLR p p) => Data (SpliceDecl p)+deriving instance Data (SpliceDecl GhcPs)+deriving instance Data (SpliceDecl GhcRn)+deriving instance Data (SpliceDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (TyClDecl p)+deriving instance Data (TyClDecl GhcPs)+deriving instance Data (TyClDecl GhcRn)+deriving instance Data (TyClDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (TyClGroup p)+deriving instance Data (TyClGroup GhcPs)+deriving instance Data (TyClGroup GhcRn)+deriving instance Data (TyClGroup GhcTc)++-- deriving instance (DataIdLR p p) => Data (FamilyResultSig p)+deriving instance Data (FamilyResultSig GhcPs)+deriving instance Data (FamilyResultSig GhcRn)+deriving instance Data (FamilyResultSig GhcTc)++-- deriving instance (DataIdLR p p) => Data (FamilyDecl p)+deriving instance Data (FamilyDecl GhcPs)+deriving instance Data (FamilyDecl GhcRn)+deriving instance Data (FamilyDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (InjectivityAnn p)+deriving instance Data (InjectivityAnn GhcPs)+deriving instance Data (InjectivityAnn GhcRn)+deriving instance Data (InjectivityAnn GhcTc)++-- deriving instance (DataIdLR p p) => Data (FamilyInfo p)+deriving instance Data (FamilyInfo GhcPs)+deriving instance Data (FamilyInfo GhcRn)+deriving instance Data (FamilyInfo GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsDataDefn p)+deriving instance Data (HsDataDefn GhcPs)+deriving instance Data (HsDataDefn GhcRn)+deriving instance Data (HsDataDefn GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsDerivingClause p)+deriving instance Data (HsDerivingClause GhcPs)+deriving instance Data (HsDerivingClause GhcRn)+deriving instance Data (HsDerivingClause GhcTc)++-- deriving instance (DataIdLR p p) => Data (ConDecl p)+deriving instance Data (ConDecl GhcPs)+deriving instance Data (ConDecl GhcRn)+deriving instance Data (ConDecl GhcTc)++-- deriving instance DataIdLR p p   => Data (TyFamInstDecl p)+deriving instance Data (TyFamInstDecl GhcPs)+deriving instance Data (TyFamInstDecl GhcRn)+deriving instance Data (TyFamInstDecl GhcTc)++-- deriving instance DataIdLR p p   => Data (DataFamInstDecl p)+deriving instance Data (DataFamInstDecl GhcPs)+deriving instance Data (DataFamInstDecl GhcRn)+deriving instance Data (DataFamInstDecl GhcTc)++-- deriving instance (DataIdLR p p,Data rhs)=>Data (FamEqn p rhs)+deriving instance Data rhs => Data (FamEqn GhcPs rhs)+deriving instance Data rhs => Data (FamEqn GhcRn rhs)+deriving instance Data rhs => Data (FamEqn GhcTc rhs)++-- deriving instance (DataIdLR p p) => Data (ClsInstDecl p)+deriving instance Data (ClsInstDecl GhcPs)+deriving instance Data (ClsInstDecl GhcRn)+deriving instance Data (ClsInstDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (InstDecl p)+deriving instance Data (InstDecl GhcPs)+deriving instance Data (InstDecl GhcRn)+deriving instance Data (InstDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (DerivDecl p)+deriving instance Data (DerivDecl GhcPs)+deriving instance Data (DerivDecl GhcRn)+deriving instance Data (DerivDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (DerivStrategy p)+deriving instance Data (DerivStrategy GhcPs)+deriving instance Data (DerivStrategy GhcRn)+deriving instance Data (DerivStrategy GhcTc)++-- deriving instance (DataIdLR p p) => Data (DefaultDecl p)+deriving instance Data (DefaultDecl GhcPs)+deriving instance Data (DefaultDecl GhcRn)+deriving instance Data (DefaultDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (ForeignDecl p)+deriving instance Data (ForeignDecl GhcPs)+deriving instance Data (ForeignDecl GhcRn)+deriving instance Data (ForeignDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (RuleDecls p)+deriving instance Data (RuleDecls GhcPs)+deriving instance Data (RuleDecls GhcRn)+deriving instance Data (RuleDecls GhcTc)++-- deriving instance (DataIdLR p p) => Data (RuleDecl p)+deriving instance Data (RuleDecl GhcPs)+deriving instance Data (RuleDecl GhcRn)+deriving instance Data (RuleDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (RuleBndr p)+deriving instance Data (RuleBndr GhcPs)+deriving instance Data (RuleBndr GhcRn)+deriving instance Data (RuleBndr GhcTc)++-- deriving instance (DataId p)     => Data (WarnDecls p)+deriving instance Data (WarnDecls GhcPs)+deriving instance Data (WarnDecls GhcRn)+deriving instance Data (WarnDecls GhcTc)++-- deriving instance (DataId p)     => Data (WarnDecl p)+deriving instance Data (WarnDecl GhcPs)+deriving instance Data (WarnDecl GhcRn)+deriving instance Data (WarnDecl GhcTc)++-- deriving instance (DataIdLR p p) => Data (AnnDecl p)+deriving instance Data (AnnDecl GhcPs)+deriving instance Data (AnnDecl GhcRn)+deriving instance Data (AnnDecl GhcTc)++-- deriving instance (DataId p)     => Data (RoleAnnotDecl p)+deriving instance Data (RoleAnnotDecl GhcPs)+deriving instance Data (RoleAnnotDecl GhcRn)+deriving instance Data (RoleAnnotDecl GhcTc)++-- ---------------------------------------------------------------------+-- Data derivations from GHC.Hs.Expr -----------------------------------++-- deriving instance (DataIdLR p p) => Data (SyntaxExpr p)+deriving instance Data (SyntaxExpr GhcPs)+deriving instance Data (SyntaxExpr GhcRn)+deriving instance Data (SyntaxExpr GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsExpr p)+deriving instance Data (HsExpr GhcPs)+deriving instance Data (HsExpr GhcRn)+deriving instance Data (HsExpr GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsTupArg p)+deriving instance Data (HsTupArg GhcPs)+deriving instance Data (HsTupArg GhcRn)+deriving instance Data (HsTupArg GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsCmd p)+deriving instance Data (HsCmd GhcPs)+deriving instance Data (HsCmd GhcRn)+deriving instance Data (HsCmd GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsCmdTop p)+deriving instance Data (HsCmdTop GhcPs)+deriving instance Data (HsCmdTop GhcRn)+deriving instance Data (HsCmdTop GhcTc)++-- deriving instance (DataIdLR p p,Data body) => Data (MatchGroup p body)+deriving instance (Data body) => Data (MatchGroup GhcPs body)+deriving instance (Data body) => Data (MatchGroup GhcRn body)+deriving instance (Data body) => Data (MatchGroup GhcTc body)++-- deriving instance (DataIdLR p p,Data body) => Data (Match      p body)+deriving instance (Data body) => Data (Match      GhcPs body)+deriving instance (Data body) => Data (Match      GhcRn body)+deriving instance (Data body) => Data (Match      GhcTc body)++-- deriving instance (DataIdLR p p,Data body) => Data (GRHSs      p body)+deriving instance (Data body) => Data (GRHSs     GhcPs body)+deriving instance (Data body) => Data (GRHSs     GhcRn body)+deriving instance (Data body) => Data (GRHSs     GhcTc body)++-- deriving instance (DataIdLR p p,Data body) => Data (GRHS       p body)+deriving instance (Data body) => Data (GRHS     GhcPs body)+deriving instance (Data body) => Data (GRHS     GhcRn body)+deriving instance (Data body) => Data (GRHS     GhcTc body)++-- deriving instance (DataIdLR p p,Data body) => Data (StmtLR   p p body)+deriving instance (Data body) => Data (StmtLR   GhcPs GhcPs body)+deriving instance (Data body) => Data (StmtLR   GhcPs GhcRn body)+deriving instance (Data body) => Data (StmtLR   GhcRn GhcRn body)+deriving instance (Data body) => Data (StmtLR   GhcTc GhcTc body)++deriving instance Data RecStmtTc++-- deriving instance (DataIdLR p p) => Data (ParStmtBlock p p)+deriving instance Data (ParStmtBlock GhcPs GhcPs)+deriving instance Data (ParStmtBlock GhcPs GhcRn)+deriving instance Data (ParStmtBlock GhcRn GhcRn)+deriving instance Data (ParStmtBlock GhcTc GhcTc)++-- deriving instance (DataIdLR p p) => Data (ApplicativeArg p)+deriving instance Data (ApplicativeArg GhcPs)+deriving instance Data (ApplicativeArg GhcRn)+deriving instance Data (ApplicativeArg GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsSplice p)+deriving instance Data (HsSplice GhcPs)+deriving instance Data (HsSplice GhcRn)+deriving instance Data (HsSplice GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsSplicedThing p)+deriving instance Data (HsSplicedThing GhcPs)+deriving instance Data (HsSplicedThing GhcRn)+deriving instance Data (HsSplicedThing GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsBracket p)+deriving instance Data (HsBracket GhcPs)+deriving instance Data (HsBracket GhcRn)+deriving instance Data (HsBracket GhcTc)++-- deriving instance (DataIdLR p p) => Data (ArithSeqInfo p)+deriving instance Data (ArithSeqInfo GhcPs)+deriving instance Data (ArithSeqInfo GhcRn)+deriving instance Data (ArithSeqInfo GhcTc)++deriving instance                   Data RecordConTc+deriving instance                   Data CmdTopTc+deriving instance                   Data PendingRnSplice+deriving instance                   Data PendingTcSplice++-- ---------------------------------------------------------------------+-- Data derivations from GHC.Hs.Lit ------------------------------------++-- deriving instance (DataId p) => Data (HsLit p)+deriving instance Data (HsLit GhcPs)+deriving instance Data (HsLit GhcRn)+deriving instance Data (HsLit GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsOverLit p)+deriving instance Data (HsOverLit GhcPs)+deriving instance Data (HsOverLit GhcRn)+deriving instance Data (HsOverLit GhcTc)++-- ---------------------------------------------------------------------+-- Data derivations from GHC.Hs.Pat ------------------------------------++-- deriving instance (DataIdLR p p) => Data (Pat p)+deriving instance Data (Pat GhcPs)+deriving instance Data (Pat GhcRn)+deriving instance Data (Pat GhcTc)++deriving instance Data ListPatTc++-- deriving instance (DataIdLR p p, Data body) => Data (HsRecFields p body)+deriving instance (Data body) => Data (HsRecFields GhcPs body)+deriving instance (Data body) => Data (HsRecFields GhcRn body)+deriving instance (Data body) => Data (HsRecFields GhcTc body)++-- ---------------------------------------------------------------------+-- Data derivations from GHC.Hs.Types ----------------------------------++-- deriving instance (DataIdLR p p) => Data (LHsQTyVars p)+deriving instance Data (LHsQTyVars GhcPs)+deriving instance Data (LHsQTyVars GhcRn)+deriving instance Data (LHsQTyVars GhcTc)++-- deriving instance (DataIdLR p p, Data thing) =>Data (HsImplicitBndrs p thing)+deriving instance (Data thing) => Data (HsImplicitBndrs GhcPs thing)+deriving instance (Data thing) => Data (HsImplicitBndrs GhcRn thing)+deriving instance (Data thing) => Data (HsImplicitBndrs GhcTc thing)++-- deriving instance (DataIdLR p p, Data thing) =>Data (HsWildCardBndrs p thing)+deriving instance (Data thing) => Data (HsWildCardBndrs GhcPs thing)+deriving instance (Data thing) => Data (HsWildCardBndrs GhcRn thing)+deriving instance (Data thing) => Data (HsWildCardBndrs GhcTc thing)++-- deriving instance (DataIdLR p p) => Data (HsTyVarBndr p)+deriving instance Data (HsTyVarBndr GhcPs)+deriving instance Data (HsTyVarBndr GhcRn)+deriving instance Data (HsTyVarBndr GhcTc)++-- deriving instance (DataIdLR p p) => Data (HsType p)+deriving instance Data (HsType GhcPs)+deriving instance Data (HsType GhcRn)+deriving instance Data (HsType GhcTc)++deriving instance Data (LHsTypeArg GhcPs)+deriving instance Data (LHsTypeArg GhcRn)+deriving instance Data (LHsTypeArg GhcTc)++-- deriving instance (DataIdLR p p) => Data (ConDeclField p)+deriving instance Data (ConDeclField GhcPs)+deriving instance Data (ConDeclField GhcRn)+deriving instance Data (ConDeclField GhcTc)++-- deriving instance (DataId p)     => Data (FieldOcc p)+deriving instance Data (FieldOcc GhcPs)+deriving instance Data (FieldOcc GhcRn)+deriving instance Data (FieldOcc GhcTc)++-- deriving instance DataId p       => Data (AmbiguousFieldOcc p)+deriving instance Data (AmbiguousFieldOcc GhcPs)+deriving instance Data (AmbiguousFieldOcc GhcRn)+deriving instance Data (AmbiguousFieldOcc GhcTc)+++-- deriving instance (DataId name) => Data (ImportDecl name)+deriving instance Data (ImportDecl GhcPs)+deriving instance Data (ImportDecl GhcRn)+deriving instance Data (ImportDecl GhcTc)++-- deriving instance (DataId name)             => Data (IE name)+deriving instance Data (IE GhcPs)+deriving instance Data (IE GhcRn)+deriving instance Data (IE GhcTc)++-- deriving instance (Eq name, Eq (IdP name)) => Eq (IE name)+deriving instance Eq (IE GhcPs)+deriving instance Eq (IE GhcRn)+deriving instance Eq (IE GhcTc)++-- ---------------------------------------------------------------------
+ GHC/Hs/Lit.hs view
@@ -0,0 +1,316 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998++\section[HsLit]{Abstract syntax: source-language literals}+-}++{-# LANGUAGE CPP, DeriveDataTypeable #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE TypeFamilies #-}++module GHC.Hs.Lit where++#include "HsVersions.h"++import GhcPrelude++import {-# SOURCE #-} GHC.Hs.Expr( HsExpr, pprExpr )+import BasicTypes ( IntegralLit(..),FractionalLit(..),negateIntegralLit,+                    negateFractionalLit,SourceText(..),pprWithSourceText,+                    PprPrec(..), topPrec )+import Type+import Outputable+import FastString+import GHC.Hs.Extension++import Data.ByteString (ByteString)+import Data.Data hiding ( Fixity )++{-+************************************************************************+*                                                                      *+\subsection[HsLit]{Literals}+*                                                                      *+************************************************************************+-}++-- Note [Literal source text] in BasicTypes for SourceText fields in+-- the following+-- Note [Trees that grow] in GHC.Hs.Extension for the Xxxxx fields in the following+-- | Haskell Literal+data HsLit x+  = HsChar (XHsChar x) {- SourceText -} Char+      -- ^ Character+  | HsCharPrim (XHsCharPrim x) {- SourceText -} Char+      -- ^ Unboxed character+  | HsString (XHsString x) {- SourceText -} FastString+      -- ^ String+  | HsStringPrim (XHsStringPrim x) {- SourceText -} ByteString+      -- ^ Packed bytes+  | HsInt (XHsInt x)  IntegralLit+      -- ^ Genuinely an Int; arises from+      -- @TcGenDeriv@, and from TRANSLATION+  | HsIntPrim (XHsIntPrim x) {- SourceText -} Integer+      -- ^ literal @Int#@+  | HsWordPrim (XHsWordPrim x) {- SourceText -} Integer+      -- ^ literal @Word#@+  | HsInt64Prim (XHsInt64Prim x) {- SourceText -} Integer+      -- ^ literal @Int64#@+  | HsWord64Prim (XHsWord64Prim x) {- SourceText -} Integer+      -- ^ literal @Word64#@+  | HsInteger (XHsInteger x) {- SourceText -} Integer Type+      -- ^ Genuinely an integer; arises only+      -- from TRANSLATION (overloaded+      -- literals are done with HsOverLit)+  | HsRat (XHsRat x)  FractionalLit Type+      -- ^ Genuinely a rational; arises only from+      -- TRANSLATION (overloaded literals are+      -- done with HsOverLit)+  | HsFloatPrim (XHsFloatPrim x)   FractionalLit+      -- ^ Unboxed Float+  | HsDoublePrim (XHsDoublePrim x) FractionalLit+      -- ^ Unboxed Double++  | XLit (XXLit x)++type instance XHsChar       (GhcPass _) = SourceText+type instance XHsCharPrim   (GhcPass _) = SourceText+type instance XHsString     (GhcPass _) = SourceText+type instance XHsStringPrim (GhcPass _) = SourceText+type instance XHsInt        (GhcPass _) = NoExtField+type instance XHsIntPrim    (GhcPass _) = SourceText+type instance XHsWordPrim   (GhcPass _) = SourceText+type instance XHsInt64Prim  (GhcPass _) = SourceText+type instance XHsWord64Prim (GhcPass _) = SourceText+type instance XHsInteger    (GhcPass _) = SourceText+type instance XHsRat        (GhcPass _) = NoExtField+type instance XHsFloatPrim  (GhcPass _) = NoExtField+type instance XHsDoublePrim (GhcPass _) = NoExtField+type instance XXLit         (GhcPass _) = NoExtCon++instance Eq (HsLit x) where+  (HsChar _ x1)       == (HsChar _ x2)       = x1==x2+  (HsCharPrim _ x1)   == (HsCharPrim _ x2)   = x1==x2+  (HsString _ x1)     == (HsString _ x2)     = x1==x2+  (HsStringPrim _ x1) == (HsStringPrim _ x2) = x1==x2+  (HsInt _ x1)        == (HsInt _ x2)        = x1==x2+  (HsIntPrim _ x1)    == (HsIntPrim _ x2)    = x1==x2+  (HsWordPrim _ x1)   == (HsWordPrim _ x2)   = x1==x2+  (HsInt64Prim _ x1)  == (HsInt64Prim _ x2)  = x1==x2+  (HsWord64Prim _ x1) == (HsWord64Prim _ x2) = x1==x2+  (HsInteger _ x1 _)  == (HsInteger _ x2 _)  = x1==x2+  (HsRat _ x1 _)      == (HsRat _ x2 _)      = x1==x2+  (HsFloatPrim _ x1)  == (HsFloatPrim _ x2)  = x1==x2+  (HsDoublePrim _ x1) == (HsDoublePrim _ x2) = x1==x2+  _                   == _                   = False++-- | Haskell Overloaded Literal+data HsOverLit p+  = OverLit {+      ol_ext :: (XOverLit p),+      ol_val :: OverLitVal,+      ol_witness :: HsExpr p}         -- Note [Overloaded literal witnesses]++  | XOverLit+      (XXOverLit p)++data OverLitTc+  = OverLitTc {+        ol_rebindable :: Bool, -- Note [ol_rebindable]+        ol_type :: Type }+  deriving Data++type instance XOverLit GhcPs = NoExtField+type instance XOverLit GhcRn = Bool            -- Note [ol_rebindable]+type instance XOverLit GhcTc = OverLitTc++type instance XXOverLit (GhcPass _) = NoExtCon++-- Note [Literal source text] in BasicTypes for SourceText fields in+-- the following+-- | Overloaded Literal Value+data OverLitVal+  = HsIntegral   !IntegralLit            -- ^ Integer-looking literals;+  | HsFractional !FractionalLit          -- ^ Frac-looking literals+  | HsIsString   !SourceText !FastString -- ^ String-looking literals+  deriving Data++negateOverLitVal :: OverLitVal -> OverLitVal+negateOverLitVal (HsIntegral i) = HsIntegral (negateIntegralLit i)+negateOverLitVal (HsFractional f) = HsFractional (negateFractionalLit f)+negateOverLitVal _ = panic "negateOverLitVal: argument is not a number"++overLitType :: HsOverLit GhcTc -> Type+overLitType (OverLit (OverLitTc _ ty) _ _) = ty+overLitType (XOverLit nec) = noExtCon nec++-- | Convert a literal from one index type to another, updating the annotations+-- according to the relevant 'Convertable' instance+convertLit :: (ConvertIdX a b) => HsLit a -> HsLit b+convertLit (HsChar a x)       = (HsChar (convert a) x)+convertLit (HsCharPrim a x)   = (HsCharPrim (convert a) x)+convertLit (HsString a x)     = (HsString (convert a) x)+convertLit (HsStringPrim a x) = (HsStringPrim (convert a) x)+convertLit (HsInt a x)        = (HsInt (convert a) x)+convertLit (HsIntPrim a x)    = (HsIntPrim (convert a) x)+convertLit (HsWordPrim a x)   = (HsWordPrim (convert a) x)+convertLit (HsInt64Prim a x)  = (HsInt64Prim (convert a) x)+convertLit (HsWord64Prim a x) = (HsWord64Prim (convert a) x)+convertLit (HsInteger a x b)  = (HsInteger (convert a) x b)+convertLit (HsRat a x b)      = (HsRat (convert a) x b)+convertLit (HsFloatPrim a x)  = (HsFloatPrim (convert a) x)+convertLit (HsDoublePrim a x) = (HsDoublePrim (convert a) x)+convertLit (XLit a)           = (XLit (convert a))++{-+Note [ol_rebindable]+~~~~~~~~~~~~~~~~~~~~+The ol_rebindable field is True if this literal is actually+using rebindable syntax.  Specifically:++  False iff ol_witness is the standard one+  True  iff ol_witness is non-standard++Equivalently it's True if+  a) RebindableSyntax is on+  b) the witness for fromInteger/fromRational/fromString+     that happens to be in scope isn't the standard one++Note [Overloaded literal witnesses]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+*Before* type checking, the HsExpr in an HsOverLit is the+name of the coercion function, 'fromInteger' or 'fromRational'.+*After* type checking, it is a witness for the literal, such as+        (fromInteger 3) or lit_78+This witness should replace the literal.++This dual role is unusual, because we're replacing 'fromInteger' with+a call to fromInteger.  Reason: it allows commoning up of the fromInteger+calls, which wouldn't be possible if the desugarer made the application.++The PostTcType in each branch records the type the overload literal is+found to have.+-}++-- Comparison operations are needed when grouping literals+-- for compiling pattern-matching (module MatchLit)+instance (Eq (XXOverLit p)) => Eq (HsOverLit p) where+  (OverLit _ val1 _) == (OverLit _ val2 _) = val1 == val2+  (XOverLit  val1)   == (XOverLit  val2)   = val1 == val2+  _ == _ = panic "Eq HsOverLit"++instance Eq OverLitVal where+  (HsIntegral   i1)   == (HsIntegral   i2)   = i1 == i2+  (HsFractional f1)   == (HsFractional f2)   = f1 == f2+  (HsIsString _ s1)   == (HsIsString _ s2)   = s1 == s2+  _                   == _                   = False++instance (Ord (XXOverLit p)) => Ord (HsOverLit p) where+  compare (OverLit _ val1 _) (OverLit _ val2 _) = val1 `compare` val2+  compare (XOverLit  val1)   (XOverLit  val2)   = val1 `compare` val2+  compare _ _ = panic "Ord HsOverLit"++instance Ord OverLitVal where+  compare (HsIntegral i1)     (HsIntegral i2)     = i1 `compare` i2+  compare (HsIntegral _)      (HsFractional _)    = LT+  compare (HsIntegral _)      (HsIsString _ _)    = LT+  compare (HsFractional f1)   (HsFractional f2)   = f1 `compare` f2+  compare (HsFractional _)    (HsIntegral   _)    = GT+  compare (HsFractional _)    (HsIsString _ _)    = LT+  compare (HsIsString _ s1)   (HsIsString _ s2)   = s1 `compare` s2+  compare (HsIsString _ _)    (HsIntegral   _)    = GT+  compare (HsIsString _ _)    (HsFractional _)    = GT++-- Instance specific to GhcPs, need the SourceText+instance Outputable (HsLit (GhcPass p)) where+    ppr (HsChar st c)       = pprWithSourceText st (pprHsChar c)+    ppr (HsCharPrim st c)   = pp_st_suffix st primCharSuffix (pprPrimChar c)+    ppr (HsString st s)     = pprWithSourceText st (pprHsString s)+    ppr (HsStringPrim st s) = pprWithSourceText st (pprHsBytes s)+    ppr (HsInt _ i)+      = pprWithSourceText (il_text i) (integer (il_value i))+    ppr (HsInteger st i _)  = pprWithSourceText st (integer i)+    ppr (HsRat _ f _)       = ppr f+    ppr (HsFloatPrim _ f)   = ppr f <> primFloatSuffix+    ppr (HsDoublePrim _ d)  = ppr d <> primDoubleSuffix+    ppr (HsIntPrim st i)    = pprWithSourceText st (pprPrimInt i)+    ppr (HsWordPrim st w)   = pprWithSourceText st (pprPrimWord w)+    ppr (HsInt64Prim st i)  = pp_st_suffix st primInt64Suffix  (pprPrimInt64 i)+    ppr (HsWord64Prim st w) = pp_st_suffix st primWord64Suffix (pprPrimWord64 w)+    ppr (XLit x) = ppr x++pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc+pp_st_suffix NoSourceText         _ doc = doc+pp_st_suffix (SourceText st) suffix _   = text st <> suffix++-- in debug mode, print the expression that it's resolved to, too+instance OutputableBndrId p+       => Outputable (HsOverLit (GhcPass p)) where+  ppr (OverLit {ol_val=val, ol_witness=witness})+        = ppr val <+> (whenPprDebug (parens (pprExpr witness)))+  ppr (XOverLit x) = ppr x++instance Outputable OverLitVal where+  ppr (HsIntegral i)     = pprWithSourceText (il_text i) (integer (il_value i))+  ppr (HsFractional f)   = ppr f+  ppr (HsIsString st s)  = pprWithSourceText st (pprHsString s)++-- | pmPprHsLit pretty prints literals and is used when pretty printing pattern+-- match warnings. All are printed the same (i.e., without hashes if they are+-- primitive and not wrapped in constructors if they are boxed). This happens+-- mainly for too reasons:+--  * We do not want to expose their internal representation+--  * The warnings become too messy+pmPprHsLit :: HsLit (GhcPass x) -> SDoc+pmPprHsLit (HsChar _ c)       = pprHsChar c+pmPprHsLit (HsCharPrim _ c)   = pprHsChar c+pmPprHsLit (HsString st s)    = pprWithSourceText st (pprHsString s)+pmPprHsLit (HsStringPrim _ s) = pprHsBytes s+pmPprHsLit (HsInt _ i)        = integer (il_value i)+pmPprHsLit (HsIntPrim _ i)    = integer i+pmPprHsLit (HsWordPrim _ w)   = integer w+pmPprHsLit (HsInt64Prim _ i)  = integer i+pmPprHsLit (HsWord64Prim _ w) = integer w+pmPprHsLit (HsInteger _ i _)  = integer i+pmPprHsLit (HsRat _ f _)      = ppr f+pmPprHsLit (HsFloatPrim _ f)  = ppr f+pmPprHsLit (HsDoublePrim _ d) = ppr d+pmPprHsLit (XLit x)           = ppr x++-- | @'hsLitNeedsParens' p l@ returns 'True' if a literal @l@ needs+-- to be parenthesized under precedence @p@.+hsLitNeedsParens :: PprPrec -> HsLit x -> Bool+hsLitNeedsParens p = go+  where+    go (HsChar {})        = False+    go (HsCharPrim {})    = False+    go (HsString {})      = False+    go (HsStringPrim {})  = False+    go (HsInt _ x)        = p > topPrec && il_neg x+    go (HsIntPrim _ x)    = p > topPrec && x < 0+    go (HsWordPrim {})    = False+    go (HsInt64Prim _ x)  = p > topPrec && x < 0+    go (HsWord64Prim {})  = False+    go (HsInteger _ x _)  = p > topPrec && x < 0+    go (HsRat _ x _)      = p > topPrec && fl_neg x+    go (HsFloatPrim _ x)  = p > topPrec && fl_neg x+    go (HsDoublePrim _ x) = p > topPrec && fl_neg x+    go (XLit _)           = False++-- | @'hsOverLitNeedsParens' p ol@ returns 'True' if an overloaded literal+-- @ol@ needs to be parenthesized under precedence @p@.+hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool+hsOverLitNeedsParens p (OverLit { ol_val = olv }) = go olv+  where+    go :: OverLitVal -> Bool+    go (HsIntegral x)   = p > topPrec && il_neg x+    go (HsFractional x) = p > topPrec && fl_neg x+    go (HsIsString {})  = False+hsOverLitNeedsParens _ (XOverLit { }) = False
+ GHC/Hs/Pat.hs view
@@ -0,0 +1,826 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998++\section[PatSyntax]{Abstract Haskell syntax---patterns}+-}++{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE DeriveFoldable #-}+{-# LANGUAGE DeriveTraversable #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns      #-}+{-# LANGUAGE FlexibleInstances #-}++module GHC.Hs.Pat (+        Pat(..), InPat, OutPat, LPat,+        ListPatTc(..),++        HsConPatDetails, hsConPatArgs,+        HsRecFields(..), HsRecField'(..), LHsRecField',+        HsRecField, LHsRecField,+        HsRecUpdField, LHsRecUpdField,+        hsRecFields, hsRecFieldSel, hsRecFieldId, hsRecFieldsArgs,+        hsRecUpdFieldId, hsRecUpdFieldOcc, hsRecUpdFieldRdr,++        mkPrefixConPat, mkCharLitPat, mkNilPat,++        looksLazyPatBind,+        isBangedLPat,+        patNeedsParens, parenthesizePat,+        isIrrefutableHsPat,++        collectEvVarsPat, collectEvVarsPats,++        pprParendLPat, pprConArgs+    ) where++import GhcPrelude++import {-# SOURCE #-} GHC.Hs.Expr (SyntaxExpr, LHsExpr, HsSplice, pprLExpr, pprSplice)++-- friends:+import GHC.Hs.Binds+import GHC.Hs.Lit+import GHC.Hs.Extension+import GHC.Hs.Types+import TcEvidence+import BasicTypes+-- others:+import PprCore          ( {- instance OutputableBndr TyVar -} )+import TysWiredIn+import Var+import RdrName ( RdrName )+import ConLike+import DataCon+import TyCon+import Outputable+import Type+import SrcLoc+import Bag -- collect ev vars from pats+import DynFlags( gopt, GeneralFlag(..) )+import Maybes+-- libraries:+import Data.Data hiding (TyCon,Fixity)++type InPat p  = LPat p        -- No 'Out' constructors+type OutPat p = LPat p        -- No 'In' constructors++type LPat p = XRec p Pat++-- | Pattern+--+-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnBang'++-- For details on above see note [Api annotations] in ApiAnnotation+data Pat p+  =     ------------ Simple patterns ---------------+    WildPat     (XWildPat p)        -- ^ Wildcard Pattern+        -- The sole reason for a type on a WildPat is to+        -- support hsPatType :: Pat Id -> Type++       -- AZ:TODO above comment needs to be updated+  | VarPat      (XVarPat p)+                (Located (IdP p))  -- ^ Variable Pattern++                             -- See Note [Located RdrNames] in GHC.Hs.Expr+  | LazyPat     (XLazyPat p)+                (LPat p)                -- ^ Lazy Pattern+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnTilde'++    -- For details on above see note [Api annotations] in ApiAnnotation++  | AsPat       (XAsPat p)+                (Located (IdP p)) (LPat p)    -- ^ As pattern+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnAt'++    -- For details on above see note [Api annotations] in ApiAnnotation++  | ParPat      (XParPat p)+                (LPat p)                -- ^ Parenthesised pattern+                                        -- See Note [Parens in HsSyn] in GHC.Hs.Expr+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,+    --                                    'ApiAnnotation.AnnClose' @')'@++    -- For details on above see note [Api annotations] in ApiAnnotation+  | BangPat     (XBangPat p)+                (LPat p)                -- ^ Bang pattern+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnBang'++    -- For details on above see note [Api annotations] in ApiAnnotation++        ------------ Lists, tuples, arrays ---------------+  | ListPat     (XListPat p)+                [LPat p]+                   -- For OverloadedLists a Just (ty,fn) gives+                   -- overall type of the pattern, and the toList+-- function to convert the scrutinee to a list value++    -- ^ Syntactic List+    --+    -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,+    --                                    'ApiAnnotation.AnnClose' @']'@++    -- For details on above see note [Api annotations] in ApiAnnotation++  | TuplePat    (XTuplePat p)+                  -- after typechecking, holds the types of the tuple components+                [LPat p]         -- Tuple sub-patterns+                Boxity           -- UnitPat is TuplePat []+        -- You might think that the post typechecking Type was redundant,+        -- because we can get the pattern type by getting the types of the+        -- sub-patterns.+        -- But it's essential+        --      data T a where+        --        T1 :: Int -> T Int+        --      f :: (T a, a) -> Int+        --      f (T1 x, z) = z+        -- When desugaring, we must generate+        --      f = /\a. \v::a.  case v of (t::T a, w::a) ->+        --                       case t of (T1 (x::Int)) ->+        -- Note the (w::a), NOT (w::Int), because we have not yet+        -- refined 'a' to Int.  So we must know that the second component+        -- of the tuple is of type 'a' not Int.  See selectMatchVar+        -- (June 14: I'm not sure this comment is right; the sub-patterns+        --           will be wrapped in CoPats, no?)+    -- ^ Tuple sub-patterns+    --+    -- - 'ApiAnnotation.AnnKeywordId' :+    --            'ApiAnnotation.AnnOpen' @'('@ or @'(#'@,+    --            'ApiAnnotation.AnnClose' @')'@ or  @'#)'@++  | SumPat      (XSumPat p)        -- GHC.Hs.PlaceHolder before typechecker, filled in+                                   -- afterwards with the types of the+                                   -- alternative+                (LPat p)           -- Sum sub-pattern+                ConTag             -- Alternative (one-based)+                Arity              -- Arity (INVARIANT: ≥ 2)+    -- ^ Anonymous sum pattern+    --+    -- - 'ApiAnnotation.AnnKeywordId' :+    --            'ApiAnnotation.AnnOpen' @'(#'@,+    --            'ApiAnnotation.AnnClose' @'#)'@++    -- For details on above see note [Api annotations] in ApiAnnotation++        ------------ Constructor patterns ---------------+  | ConPatIn    (Located (IdP p))+                (HsConPatDetails p)+    -- ^ Constructor Pattern In++  | ConPatOut {+        pat_con     :: Located ConLike,+        pat_arg_tys :: [Type],          -- The universal arg types, 1-1 with the universal+                                        -- tyvars of the constructor/pattern synonym+                                        --   Use (conLikeResTy pat_con pat_arg_tys) to get+                                        --   the type of the pattern++        pat_tvs   :: [TyVar],           -- Existentially bound type variables+                                        -- in correctly-scoped order e.g. [k:*, x:k]+        pat_dicts :: [EvVar],           -- Ditto *coercion variables* and *dictionaries*+                                        -- One reason for putting coercion variable here, I think,+                                        --      is to ensure their kinds are zonked++        pat_binds :: TcEvBinds,         -- Bindings involving those dictionaries+        pat_args  :: HsConPatDetails p,+        pat_wrap  :: HsWrapper          -- Extra wrapper to pass to the matcher+                                        -- Only relevant for pattern-synonyms;+                                        --   ignored for data cons+    }+    -- ^ Constructor Pattern Out++        ------------ View patterns ---------------+  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | ViewPat       (XViewPat p)     -- The overall type of the pattern+                                   -- (= the argument type of the view function)+                                   -- for hsPatType.+                  (LHsExpr p)+                  (LPat p)+    -- ^ View Pattern++        ------------ Pattern splices ---------------+  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'$('@+  --        'ApiAnnotation.AnnClose' @')'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | SplicePat       (XSplicePat p)+                    (HsSplice p)    -- ^ Splice Pattern (Includes quasi-quotes)++        ------------ Literal and n+k patterns ---------------+  | LitPat          (XLitPat p)+                    (HsLit p)           -- ^ Literal Pattern+                                        -- Used for *non-overloaded* literal patterns:+                                        -- Int#, Char#, Int, Char, String, etc.++  | NPat                -- Natural Pattern+                        -- Used for all overloaded literals,+                        -- including overloaded strings with -XOverloadedStrings+                    (XNPat p)            -- Overall type of pattern. Might be+                                         -- different than the literal's type+                                         -- if (==) or negate changes the type+                    (Located (HsOverLit p))     -- ALWAYS positive+                    (Maybe (SyntaxExpr p)) -- Just (Name of 'negate') for+                                           -- negative patterns, Nothing+                                           -- otherwise+                    (SyntaxExpr p)       -- Equality checker, of type t->t->Bool++  -- ^ Natural Pattern+  --+  -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnVal' @'+'@++  -- For details on above see note [Api annotations] in ApiAnnotation+  | NPlusKPat       (XNPlusKPat p)           -- Type of overall pattern+                    (Located (IdP p))        -- n+k pattern+                    (Located (HsOverLit p))  -- It'll always be an HsIntegral+                    (HsOverLit p)       -- See Note [NPlusK patterns] in TcPat+                     -- NB: This could be (PostTc ...), but that induced a+                     -- a new hs-boot file. Not worth it.++                    (SyntaxExpr p)   -- (>=) function, of type t1->t2->Bool+                    (SyntaxExpr p)   -- Name of '-' (see RnEnv.lookupSyntaxName)+  -- ^ n+k pattern++        ------------ Pattern type signatures ---------------+  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'++  -- For details on above see note [Api annotations] in ApiAnnotation+  | SigPat          (XSigPat p)             -- After typechecker: Type+                    (LPat p)                -- Pattern with a type signature+                    (LHsSigWcType (NoGhcTc p)) --  Signature can bind both+                                               --  kind and type vars++    -- ^ Pattern with a type signature++        ------------ Pattern coercions (translation only) ---------------+  | CoPat       (XCoPat p)+                HsWrapper           -- Coercion Pattern+                                    -- If co :: t1 ~ t2, p :: t2,+                                    -- then (CoPat co p) :: t1+                (Pat p)             -- Why not LPat?  Ans: existing locn will do+                Type                -- Type of whole pattern, t1+        -- During desugaring a (CoPat co pat) turns into a cast with 'co' on+        -- the scrutinee, followed by a match on 'pat'+    -- ^ Coercion Pattern++  -- | Trees that Grow extension point for new constructors+  | XPat+      (XXPat p)++-- ---------------------------------------------------------------------++data ListPatTc+  = ListPatTc+      Type                             -- The type of the elements+      (Maybe (Type, SyntaxExpr GhcTc)) -- For rebindable syntax++type instance XWildPat GhcPs = NoExtField+type instance XWildPat GhcRn = NoExtField+type instance XWildPat GhcTc = Type++type instance XVarPat  (GhcPass _) = NoExtField+type instance XLazyPat (GhcPass _) = NoExtField+type instance XAsPat   (GhcPass _) = NoExtField+type instance XParPat  (GhcPass _) = NoExtField+type instance XBangPat (GhcPass _) = NoExtField++-- Note: XListPat cannot be extended when using GHC 8.0.2 as the bootstrap+-- compiler, as it triggers https://gitlab.haskell.org/ghc/ghc/issues/14396 for+-- `SyntaxExpr`+type instance XListPat GhcPs = NoExtField+type instance XListPat GhcRn = Maybe (SyntaxExpr GhcRn)+type instance XListPat GhcTc = ListPatTc++type instance XTuplePat GhcPs = NoExtField+type instance XTuplePat GhcRn = NoExtField+type instance XTuplePat GhcTc = [Type]++type instance XSumPat GhcPs = NoExtField+type instance XSumPat GhcRn = NoExtField+type instance XSumPat GhcTc = [Type]++type instance XViewPat GhcPs = NoExtField+type instance XViewPat GhcRn = NoExtField+type instance XViewPat GhcTc = Type++type instance XSplicePat (GhcPass _) = NoExtField+type instance XLitPat    (GhcPass _) = NoExtField++type instance XNPat GhcPs = NoExtField+type instance XNPat GhcRn = NoExtField+type instance XNPat GhcTc = Type++type instance XNPlusKPat GhcPs = NoExtField+type instance XNPlusKPat GhcRn = NoExtField+type instance XNPlusKPat GhcTc = Type++type instance XSigPat GhcPs = NoExtField+type instance XSigPat GhcRn = NoExtField+type instance XSigPat GhcTc = Type++type instance XCoPat  (GhcPass _) = NoExtField++type instance XXPat   (GhcPass _) = NoExtCon++-- ---------------------------------------------------------------------+++-- | Haskell Constructor Pattern Details+type HsConPatDetails p = HsConDetails (LPat p) (HsRecFields p (LPat p))++hsConPatArgs :: HsConPatDetails p -> [LPat p]+hsConPatArgs (PrefixCon ps)   = ps+hsConPatArgs (RecCon fs)      = map (hsRecFieldArg . unLoc) (rec_flds fs)+hsConPatArgs (InfixCon p1 p2) = [p1,p2]++-- | Haskell Record Fields+--+-- HsRecFields is used only for patterns and expressions (not data type+-- declarations)+data HsRecFields p arg         -- A bunch of record fields+                                --      { x = 3, y = True }+        -- Used for both expressions and patterns+  = HsRecFields { rec_flds   :: [LHsRecField p arg],+                  rec_dotdot :: Maybe (Located Int) }  -- Note [DotDot fields]+  deriving (Functor, Foldable, Traversable)+++-- Note [DotDot fields]+-- ~~~~~~~~~~~~~~~~~~~~+-- The rec_dotdot field means this:+--   Nothing => the normal case+--   Just n  => the group uses ".." notation,+--+-- In the latter case:+--+--   *before* renamer: rec_flds are exactly the n user-written fields+--+--   *after* renamer:  rec_flds includes *all* fields, with+--                     the first 'n' being the user-written ones+--                     and the remainder being 'filled in' implicitly++-- | Located Haskell Record Field+type LHsRecField' p arg = Located (HsRecField' p arg)++-- | Located Haskell Record Field+type LHsRecField  p arg = Located (HsRecField  p arg)++-- | Located Haskell Record Update Field+type LHsRecUpdField p   = Located (HsRecUpdField p)++-- | Haskell Record Field+type HsRecField    p arg = HsRecField' (FieldOcc p) arg++-- | Haskell Record Update Field+type HsRecUpdField p     = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p)++-- | Haskell Record Field+--+-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual',+--+-- For details on above see note [Api annotations] in ApiAnnotation+data HsRecField' id arg = HsRecField {+        hsRecFieldLbl :: Located id,+        hsRecFieldArg :: arg,           -- ^ Filled in by renamer when punning+        hsRecPun      :: Bool           -- ^ Note [Punning]+  } deriving (Data, Functor, Foldable, Traversable)+++-- Note [Punning]+-- ~~~~~~~~~~~~~~+-- If you write T { x, y = v+1 }, the HsRecFields will be+--      HsRecField x x True ...+--      HsRecField y (v+1) False ...+-- That is, for "punned" field x is expanded (in the renamer)+-- to x=x; but with a punning flag so we can detect it later+-- (e.g. when pretty printing)+--+-- If the original field was qualified, we un-qualify it, thus+--    T { A.x } means T { A.x = x }+++-- Note [HsRecField and HsRecUpdField]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++-- A HsRecField (used for record construction and pattern matching)+-- contains an unambiguous occurrence of a field (i.e. a FieldOcc).+-- We can't just store the Name, because thanks to+-- DuplicateRecordFields this may not correspond to the label the user+-- wrote.+--+-- A HsRecUpdField (used for record update) contains a potentially+-- ambiguous occurrence of a field (an AmbiguousFieldOcc).  The+-- renamer will fill in the selector function if it can, but if the+-- selector is ambiguous the renamer will defer to the typechecker.+-- After the typechecker, a unique selector will have been determined.+--+-- The renamer produces an Unambiguous result if it can, rather than+-- just doing the lookup in the typechecker, so that completely+-- unambiguous updates can be represented by 'DsMeta.repUpdFields'.+--+-- For example, suppose we have:+--+--     data S = MkS { x :: Int }+--     data T = MkT { x :: Int }+--+--     f z = (z { x = 3 }) :: S+--+-- The parsed HsRecUpdField corresponding to the record update will have:+--+--     hsRecFieldLbl = Unambiguous "x" noExtField :: AmbiguousFieldOcc RdrName+--+-- After the renamer, this will become:+--+--     hsRecFieldLbl = Ambiguous   "x" noExtField :: AmbiguousFieldOcc Name+--+-- (note that the Unambiguous constructor is not type-correct here).+-- The typechecker will determine the particular selector:+--+--     hsRecFieldLbl = Unambiguous "x" $sel:x:MkS  :: AmbiguousFieldOcc Id+--+-- See also Note [Disambiguating record fields] in TcExpr.++hsRecFields :: HsRecFields p arg -> [XCFieldOcc p]+hsRecFields rbinds = map (unLoc . hsRecFieldSel . unLoc) (rec_flds rbinds)++-- Probably won't typecheck at once, things have changed :/+hsRecFieldsArgs :: HsRecFields p arg -> [arg]+hsRecFieldsArgs rbinds = map (hsRecFieldArg . unLoc) (rec_flds rbinds)++hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)+hsRecFieldSel = fmap extFieldOcc . hsRecFieldLbl++hsRecFieldId :: HsRecField GhcTc arg -> Located Id+hsRecFieldId = hsRecFieldSel++hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName+hsRecUpdFieldRdr = fmap rdrNameAmbiguousFieldOcc . hsRecFieldLbl++hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id+hsRecUpdFieldId = fmap extFieldOcc . hsRecUpdFieldOcc++hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc+hsRecUpdFieldOcc = fmap unambiguousFieldOcc . hsRecFieldLbl+++{-+************************************************************************+*                                                                      *+*              Printing patterns+*                                                                      *+************************************************************************+-}++instance OutputableBndrId p => Outputable (Pat (GhcPass p)) where+    ppr = pprPat++pprPatBndr :: OutputableBndr name => name -> SDoc+pprPatBndr var                  -- Print with type info if -dppr-debug is on+  = getPprStyle $ \ sty ->+    if debugStyle sty then+        parens (pprBndr LambdaBind var)         -- Could pass the site to pprPat+                                                -- but is it worth it?+    else+        pprPrefixOcc var++pprParendLPat :: (OutputableBndrId p)+              => PprPrec -> LPat (GhcPass p) -> SDoc+pprParendLPat p = pprParendPat p . unLoc++pprParendPat :: (OutputableBndrId p)+             => PprPrec -> Pat (GhcPass p) -> SDoc+pprParendPat p pat = sdocWithDynFlags $ \ dflags ->+                     if need_parens dflags pat+                     then parens (pprPat pat)+                     else  pprPat pat+  where+    need_parens dflags pat+      | CoPat {} <- pat = gopt Opt_PrintTypecheckerElaboration dflags+      | otherwise       = patNeedsParens p pat+      -- For a CoPat we need parens if we are going to show it, which+      -- we do if -fprint-typechecker-elaboration is on (c.f. pprHsWrapper)+      -- But otherwise the CoPat is discarded, so it+      -- is the pattern inside that matters.  Sigh.++pprPat :: (OutputableBndrId p) => Pat (GhcPass p) -> SDoc+pprPat (VarPat _ lvar)          = pprPatBndr (unLoc lvar)+pprPat (WildPat _)              = char '_'+pprPat (LazyPat _ pat)          = char '~' <> pprParendLPat appPrec pat+pprPat (BangPat _ pat)          = char '!' <> pprParendLPat appPrec pat+pprPat (AsPat _ name pat)       = hcat [pprPrefixOcc (unLoc name), char '@',+                                        pprParendLPat appPrec pat]+pprPat (ViewPat _ expr pat)     = hcat [pprLExpr expr, text " -> ", ppr pat]+pprPat (ParPat _ pat)           = parens (ppr pat)+pprPat (LitPat _ s)             = ppr s+pprPat (NPat _ l Nothing  _)    = ppr l+pprPat (NPat _ l (Just _) _)    = char '-' <> ppr l+pprPat (NPlusKPat _ n k _ _ _)  = hcat [ppr n, char '+', ppr k]+pprPat (SplicePat _ splice)     = pprSplice splice+pprPat (CoPat _ co pat _)       = pprHsWrapper co $ \parens+                                            -> if parens+                                                 then pprParendPat appPrec pat+                                                 else pprPat pat+pprPat (SigPat _ pat ty)        = ppr pat <+> dcolon <+> ppr ty+pprPat (ListPat _ pats)         = brackets (interpp'SP pats)+pprPat (TuplePat _ pats bx)+    -- Special-case unary boxed tuples so that they are pretty-printed as+    -- `Unit x`, not `(x)`+  | [pat] <- pats+  , Boxed <- bx+  = hcat [text (mkTupleStr Boxed 1), pprParendLPat appPrec pat]+  | otherwise+  = tupleParens (boxityTupleSort bx) (pprWithCommas ppr pats)+pprPat (SumPat _ pat alt arity) = sumParens (pprAlternative ppr pat alt arity)+pprPat (ConPatIn con details)   = pprUserCon (unLoc con) details+pprPat (ConPatOut { pat_con = con+                  , pat_tvs = tvs+                  , pat_dicts = dicts+                  , pat_binds = binds+                  , pat_args = details })+  = sdocWithDynFlags $ \dflags ->+       -- Tiresome; in TcBinds.tcRhs we print out a+       -- typechecked Pat in an error message,+       -- and we want to make sure it prints nicely+    if gopt Opt_PrintTypecheckerElaboration dflags then+        ppr con+          <> braces (sep [ hsep (map pprPatBndr (tvs ++ dicts))+                         , ppr binds])+          <+> pprConArgs details+    else pprUserCon (unLoc con) details+pprPat (XPat n)                 = noExtCon n+++pprUserCon :: (OutputableBndr con, OutputableBndrId p)+           => con -> HsConPatDetails (GhcPass p) -> SDoc+pprUserCon c (InfixCon p1 p2) = ppr p1 <+> pprInfixOcc c <+> ppr p2+pprUserCon c details          = pprPrefixOcc c <+> pprConArgs details++pprConArgs :: (OutputableBndrId p)+           => HsConPatDetails (GhcPass p) -> SDoc+pprConArgs (PrefixCon pats) = fsep (map (pprParendLPat appPrec) pats)+pprConArgs (InfixCon p1 p2) = sep [ pprParendLPat appPrec p1+                                  , pprParendLPat appPrec p2 ]+pprConArgs (RecCon rpats)   = ppr rpats++instance (Outputable arg)+      => Outputable (HsRecFields p arg) where+  ppr (HsRecFields { rec_flds = flds, rec_dotdot = Nothing })+        = braces (fsep (punctuate comma (map ppr flds)))+  ppr (HsRecFields { rec_flds = flds, rec_dotdot = Just (unLoc -> n) })+        = braces (fsep (punctuate comma (map ppr (take n flds) ++ [dotdot])))+        where+          dotdot = text ".." <+> whenPprDebug (ppr (drop n flds))++instance (Outputable p, Outputable arg)+      => Outputable (HsRecField' p arg) where+  ppr (HsRecField { hsRecFieldLbl = f, hsRecFieldArg = arg,+                    hsRecPun = pun })+    = ppr f <+> (ppUnless pun $ equals <+> ppr arg)+++{-+************************************************************************+*                                                                      *+*              Building patterns+*                                                                      *+************************************************************************+-}++mkPrefixConPat :: DataCon ->+                  [OutPat (GhcPass p)] -> [Type] -> OutPat (GhcPass p)+-- Make a vanilla Prefix constructor pattern+mkPrefixConPat dc pats tys+  = noLoc $ ConPatOut { pat_con = noLoc (RealDataCon dc)+                      , pat_tvs = []+                      , pat_dicts = []+                      , pat_binds = emptyTcEvBinds+                      , pat_args = PrefixCon pats+                      , pat_arg_tys = tys+                      , pat_wrap = idHsWrapper }++mkNilPat :: Type -> OutPat (GhcPass p)+mkNilPat ty = mkPrefixConPat nilDataCon [] [ty]++mkCharLitPat :: SourceText -> Char -> OutPat (GhcPass p)+mkCharLitPat src c = mkPrefixConPat charDataCon+                          [noLoc $ LitPat noExtField (HsCharPrim src c)] []++{-+************************************************************************+*                                                                      *+* Predicates for checking things about pattern-lists in EquationInfo   *+*                                                                      *+************************************************************************++\subsection[Pat-list-predicates]{Look for interesting things in patterns}++Unlike in the Wadler chapter, where patterns are either ``variables''+or ``constructors,'' here we distinguish between:+\begin{description}+\item[unfailable:]+Patterns that cannot fail to match: variables, wildcards, and lazy+patterns.++These are the irrefutable patterns; the two other categories+are refutable patterns.++\item[constructor:]+A non-literal constructor pattern (see next category).++\item[literal patterns:]+At least the numeric ones may be overloaded.+\end{description}++A pattern is in {\em exactly one} of the above three categories; `as'+patterns are treated specially, of course.++The 1.3 report defines what ``irrefutable'' and ``failure-free'' patterns are.+-}++isBangedLPat :: LPat (GhcPass p) -> Bool+isBangedLPat = isBangedPat . unLoc++isBangedPat :: Pat (GhcPass p) -> Bool+isBangedPat (ParPat _ p) = isBangedLPat p+isBangedPat (BangPat {}) = True+isBangedPat _            = False++looksLazyPatBind :: HsBind (GhcPass p) -> Bool+-- Returns True of anything *except*+--     a StrictHsBind (as above) or+--     a VarPat+-- In particular, returns True of a pattern binding with a compound pattern, like (I# x)+-- Looks through AbsBinds+looksLazyPatBind (PatBind { pat_lhs = p })+  = looksLazyLPat p+looksLazyPatBind (AbsBinds { abs_binds = binds })+  = anyBag (looksLazyPatBind . unLoc) binds+looksLazyPatBind _+  = False++looksLazyLPat :: LPat (GhcPass p) -> Bool+looksLazyLPat = looksLazyPat . unLoc++looksLazyPat :: Pat (GhcPass p) -> Bool+looksLazyPat (ParPat _ p)  = looksLazyLPat p+looksLazyPat (AsPat _ _ p) = looksLazyLPat p+looksLazyPat (BangPat {})  = False+looksLazyPat (VarPat {})   = False+looksLazyPat (WildPat {})  = False+looksLazyPat _             = True++isIrrefutableHsPat :: (OutputableBndrId p) => LPat (GhcPass p) -> Bool+-- (isIrrefutableHsPat p) is true if matching against p cannot fail,+-- in the sense of falling through to the next pattern.+--      (NB: this is not quite the same as the (silly) defn+--      in 3.17.2 of the Haskell 98 report.)+--+-- WARNING: isIrrefutableHsPat returns False if it's in doubt.+-- Specifically on a ConPatIn, which is what it sees for a+-- (LPat Name) in the renamer, it doesn't know the size of the+-- constructor family, so it returns False.  Result: only+-- tuple patterns are considered irrefuable at the renamer stage.+--+-- But if it returns True, the pattern is definitely irrefutable+isIrrefutableHsPat+  = goL+  where+    goL = go . unLoc++    go (WildPat {})        = True+    go (VarPat {})         = True+    go (LazyPat {})        = True+    go (BangPat _ pat)     = goL pat+    go (CoPat _ _ pat _)   = go  pat+    go (ParPat _ pat)      = goL pat+    go (AsPat _ _ pat)     = goL pat+    go (ViewPat _ _ pat)   = goL pat+    go (SigPat _ pat _)    = goL pat+    go (TuplePat _ pats _) = all goL pats+    go (SumPat {})         = False+                    -- See Note [Unboxed sum patterns aren't irrefutable]+    go (ListPat {})        = False++    go (ConPatIn {})       = False     -- Conservative+    go (ConPatOut+        { pat_con  = (dL->L _ (RealDataCon con))+        , pat_args = details })+                           =+      isJust (tyConSingleDataCon_maybe (dataConTyCon con))+      -- NB: tyConSingleDataCon_maybe, *not* isProductTyCon, because+      -- the latter is false of existentials. See #4439+      && all goL (hsConPatArgs details)+    go (ConPatOut+        { pat_con = (dL->L _ (PatSynCon _pat)) })+                           = False -- Conservative+    go (ConPatOut{})       = panic "ConPatOut:Impossible Match" -- due to #15884+    go (LitPat {})         = False+    go (NPat {})           = False+    go (NPlusKPat {})      = False++    -- We conservatively assume that no TH splices are irrefutable+    -- since we cannot know until the splice is evaluated.+    go (SplicePat {})      = False++    go (XPat {})           = False++{- Note [Unboxed sum patterns aren't irrefutable]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Unlike unboxed tuples, unboxed sums are *not* irrefutable when used as+patterns. A simple example that demonstrates this is from #14228:++  pattern Just' x = (# x | #)+  pattern Nothing' = (# | () #)++  foo x = case x of+    Nothing' -> putStrLn "nothing"+    Just'    -> putStrLn "just"++In foo, the pattern Nothing' (that is, (# x | #)) is certainly not irrefutable,+as does not match an unboxed sum value of the same arity—namely, (# | y #)+(covered by Just'). In fact, no unboxed sum pattern is irrefutable, since the+minimum unboxed sum arity is 2.++Failing to mark unboxed sum patterns as non-irrefutable would cause the Just'+case in foo to be unreachable, as GHC would mistakenly believe that Nothing'+is the only thing that could possibly be matched!+-}++-- | @'patNeedsParens' p pat@ returns 'True' if the pattern @pat@ needs+-- parentheses under precedence @p@.+patNeedsParens :: PprPrec -> Pat p -> Bool+patNeedsParens p = go+  where+    go (NPlusKPat {})    = p > opPrec+    go (SplicePat {})    = False+    go (ConPatIn _ ds)   = conPatNeedsParens p ds+    go cp@(ConPatOut {}) = conPatNeedsParens p (pat_args cp)+    go (SigPat {})       = p >= sigPrec+    go (ViewPat {})      = True+    go (CoPat _ _ p _)   = go p+    go (WildPat {})      = False+    go (VarPat {})       = False+    go (LazyPat {})      = False+    go (BangPat {})      = False+    go (ParPat {})       = False+    go (AsPat {})        = False+    go (TuplePat {})     = False+    go (SumPat {})       = False+    go (ListPat {})      = False+    go (LitPat _ l)      = hsLitNeedsParens p l+    go (NPat _ lol _ _)  = hsOverLitNeedsParens p (unLoc lol)+    go (XPat {})         = True -- conservative default++-- | @'conPatNeedsParens' p cp@ returns 'True' if the constructor patterns @cp@+-- needs parentheses under precedence @p@.+conPatNeedsParens :: PprPrec -> HsConDetails a b -> Bool+conPatNeedsParens p = go+  where+    go (PrefixCon args) = p >= appPrec && not (null args)+    go (InfixCon {})    = p >= opPrec+    go (RecCon {})      = False++-- | @'parenthesizePat' p pat@ checks if @'patNeedsParens' p pat@ is true, and+-- if so, surrounds @pat@ with a 'ParPat'. Otherwise, it simply returns @pat@.+parenthesizePat :: PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)+parenthesizePat p lpat@(dL->L loc pat)+  | patNeedsParens p pat = cL loc (ParPat noExtField lpat)+  | otherwise            = lpat++{-+% Collect all EvVars from all constructor patterns+-}++-- May need to add more cases+collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar+collectEvVarsPats = unionManyBags . map collectEvVarsPat++collectEvVarsLPat :: LPat GhcTc -> Bag EvVar+collectEvVarsLPat = collectEvVarsPat . unLoc++collectEvVarsPat :: Pat GhcTc -> Bag EvVar+collectEvVarsPat pat =+  case pat of+    LazyPat _ p      -> collectEvVarsLPat p+    AsPat _ _ p      -> collectEvVarsLPat p+    ParPat  _ p      -> collectEvVarsLPat p+    BangPat _ p      -> collectEvVarsLPat p+    ListPat _ ps     -> unionManyBags $ map collectEvVarsLPat ps+    TuplePat _ ps _  -> unionManyBags $ map collectEvVarsLPat ps+    SumPat _ p _ _   -> collectEvVarsLPat p+    ConPatOut {pat_dicts = dicts, pat_args  = args}+                     -> unionBags (listToBag dicts)+                                   $ unionManyBags+                                   $ map collectEvVarsLPat+                                   $ hsConPatArgs args+    SigPat  _ p _    -> collectEvVarsLPat p+    CoPat _ _ p _    -> collectEvVarsPat  p+    ConPatIn _  _    -> panic "foldMapPatBag: ConPatIn"+    _other_pat       -> emptyBag
+ GHC/Hs/Pat.hs-boot view
@@ -0,0 +1,19 @@+{-# LANGUAGE CPP, KindSignatures #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE RoleAnnotations #-}+{-# LANGUAGE TypeFamilies #-}++module GHC.Hs.Pat where++import Outputable+import GHC.Hs.Extension ( OutputableBndrId, GhcPass, XRec )++type role Pat nominal+data Pat (i :: *)+type LPat i = XRec i Pat++instance OutputableBndrId p => Outputable (Pat (GhcPass p))
+ GHC/Hs/PlaceHolder.hs view
@@ -0,0 +1,70 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE StandaloneDeriving #-}++module GHC.Hs.PlaceHolder where++import Name+import NameSet+import RdrName+import Var++++{-+%************************************************************************+%*                                                                      *+\subsection{Annotating the syntax}+%*                                                                      *+%************************************************************************+-}++-- NB: These are intentionally open, allowing API consumers (like Haddock)+-- to declare new instances++placeHolderNamesTc :: NameSet+placeHolderNamesTc = emptyNameSet++{-+TODO:AZ: remove this, and check if we still need all the UndecidableInstances++Note [Pass sensitive types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Since the same AST types are re-used through parsing,renaming and type+checking there are naturally some places in the AST that do not have+any meaningful value prior to the pass they are assigned a value.++Historically these have been filled in with place holder values of the form++  panic "error message"++This has meant the AST is difficult to traverse using standard generic+programming techniques. The problem is addressed by introducing+pass-specific data types, implemented as a pair of open type families,+one for PostTc and one for PostRn. These are then explicitly populated+with a PlaceHolder value when they do not yet have meaning.++In terms of actual usage, we have the following++  PostTc id Kind+  PostTc id Type++  PostRn id Fixity+  PostRn id NameSet++TcId and Var are synonyms for Id++Unfortunately the type checker termination checking conditions fail for the+DataId constraint type based on this, so even though it is safe the+UndecidableInstances pragma is required where this is used.+-}+++-- |Follow the @id@, but never beyond Name. This is used in a 'HsMatchContext',+-- for printing messages related to a 'Match'+type family NameOrRdrName id where+  NameOrRdrName Id      = Name+  NameOrRdrName Name    = Name+  NameOrRdrName RdrName = RdrName
+ GHC/Hs/Types.hs view
@@ -0,0 +1,1739 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+++GHC.Hs.Types: Abstract syntax: user-defined types+-}++{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]+                                      -- in module GHC.Hs.PlaceHolder+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE TypeFamilies #-}++module GHC.Hs.Types (+        HsType(..), NewHsTypeX(..), LHsType, HsKind, LHsKind,+        HsTyVarBndr(..), LHsTyVarBndr, ForallVisFlag(..),+        LHsQTyVars(..),+        HsImplicitBndrs(..),+        HsWildCardBndrs(..),+        LHsSigType, LHsSigWcType, LHsWcType,+        HsTupleSort(..),+        HsContext, LHsContext, noLHsContext,+        HsTyLit(..),+        HsIPName(..), hsIPNameFS,+        HsArg(..), numVisibleArgs,+        LHsTypeArg,++        LBangType, BangType,+        HsSrcBang(..), HsImplBang(..),+        SrcStrictness(..), SrcUnpackedness(..),+        getBangType, getBangStrictness,++        ConDeclField(..), LConDeclField, pprConDeclFields,++        HsConDetails(..),++        FieldOcc(..), LFieldOcc, mkFieldOcc,+        AmbiguousFieldOcc(..), mkAmbiguousFieldOcc,+        rdrNameAmbiguousFieldOcc, selectorAmbiguousFieldOcc,+        unambiguousFieldOcc, ambiguousFieldOcc,++        mkAnonWildCardTy, pprAnonWildCard,++        mkHsImplicitBndrs, mkHsWildCardBndrs, hsImplicitBody,+        mkEmptyImplicitBndrs, mkEmptyWildCardBndrs,+        mkHsQTvs, hsQTvExplicit, emptyLHsQTvs, isEmptyLHsQTvs,+        isHsKindedTyVar, hsTvbAllKinded, isLHsForAllTy,+        hsScopedTvs, hsWcScopedTvs, dropWildCards,+        hsTyVarName, hsAllLTyVarNames, hsLTyVarLocNames,+        hsLTyVarName, hsLTyVarNames, hsLTyVarLocName, hsExplicitLTyVarNames,+        splitLHsInstDeclTy, getLHsInstDeclHead, getLHsInstDeclClass_maybe,+        splitLHsPatSynTy,+        splitLHsForAllTyInvis, splitLHsQualTy, splitLHsSigmaTyInvis,+        splitHsFunType, hsTyGetAppHead_maybe,+        mkHsOpTy, mkHsAppTy, mkHsAppTys, mkHsAppKindTy,+        ignoreParens, hsSigType, hsSigWcType,+        hsLTyVarBndrToType, hsLTyVarBndrsToTypes,+        hsTyKindSig,+        hsConDetailsArgs,++        -- Printing+        pprHsType, pprHsForAll, pprHsForAllExtra, pprHsExplicitForAll,+        pprLHsContext,+        hsTypeNeedsParens, parenthesizeHsType, parenthesizeHsContext+    ) where++#include "HsVersions.h"++import GhcPrelude++import {-# SOURCE #-} GHC.Hs.Expr ( HsSplice, pprSplice )++import GHC.Hs.Extension++import Id ( Id )+import Name( Name, NamedThing(getName) )+import RdrName ( RdrName )+import DataCon( HsSrcBang(..), HsImplBang(..),+                SrcStrictness(..), SrcUnpackedness(..) )+import TysPrim( funTyConName )+import TysWiredIn( mkTupleStr )+import Type+import GHC.Hs.Doc+import BasicTypes+import SrcLoc+import Outputable+import FastString+import Maybes( isJust )+import Util ( count, debugIsOn )++import Data.Data hiding ( Fixity, Prefix, Infix )++{-+************************************************************************+*                                                                      *+\subsection{Bang annotations}+*                                                                      *+************************************************************************+-}++-- | Located Bang Type+type LBangType pass = Located (BangType pass)++-- | Bang Type+--+-- In the parser, strictness and packedness annotations bind more tightly+-- than docstrings. This means that when consuming a 'BangType' (and looking+-- for 'HsBangTy') we must be ready to peer behind a potential layer of+-- 'HsDocTy'. See #15206 for motivation and 'getBangType' for an example.+type BangType pass  = HsType pass       -- Bangs are in the HsType data type++getBangType :: LHsType a -> LHsType a+getBangType                 (L _ (HsBangTy _ _ lty))       = lty+getBangType (L _ (HsDocTy x (L _ (HsBangTy _ _ lty)) lds)) =+  addCLoc lty lds (HsDocTy x lty lds)+getBangType lty                                            = lty++getBangStrictness :: LHsType a -> HsSrcBang+getBangStrictness                 (L _ (HsBangTy _ s _))     = s+getBangStrictness (L _ (HsDocTy _ (L _ (HsBangTy _ s _)) _)) = s+getBangStrictness _ = (HsSrcBang NoSourceText NoSrcUnpack NoSrcStrict)++{-+************************************************************************+*                                                                      *+\subsection{Data types}+*                                                                      *+************************************************************************++This is the syntax for types as seen in type signatures.++Note [HsBSig binder lists]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider a binder (or pattern) decorated with a type or kind,+   \ (x :: a -> a). blah+   forall (a :: k -> *) (b :: k). blah+Then we use a LHsBndrSig on the binder, so that the+renamer can decorate it with the variables bound+by the pattern ('a' in the first example, 'k' in the second),+assuming that neither of them is in scope already+See also Note [Kind and type-variable binders] in RnTypes++Note [HsType binders]+~~~~~~~~~~~~~~~~~~~~~+The system for recording type and kind-variable binders in HsTypes+is a bit complicated.  Here's how it works.++* In a HsType,+     HsForAllTy   represents an /explicit, user-written/ 'forall'+                   e.g.   forall a b.   {...} or+                          forall a b -> {...}+     HsQualTy     represents an /explicit, user-written/ context+                   e.g.   (Eq a, Show a) => ...+                  The context can be empty if that's what the user wrote+  These constructors represent what the user wrote, no more+  and no less.++* The ForallVisFlag field of HsForAllTy represents whether a forall is+  invisible (e.g., forall a b. {...}, with a dot) or visible+  (e.g., forall a b -> {...}, with an arrow).++* HsTyVarBndr describes a quantified type variable written by the+  user.  For example+     f :: forall a (b :: *).  blah+  here 'a' and '(b::*)' are each a HsTyVarBndr.  A HsForAllTy has+  a list of LHsTyVarBndrs.++* HsImplicitBndrs is a wrapper that gives the implicitly-quantified+  kind and type variables of the wrapped thing.  It is filled in by+  the renamer. For example, if the user writes+     f :: a -> a+  the HsImplicitBinders binds the 'a' (not a HsForAllTy!).+  NB: this implicit quantification is purely lexical: we bind any+      type or kind variables that are not in scope. The type checker+      may subsequently quantify over further kind variables.++* HsWildCardBndrs is a wrapper that binds the wildcard variables+  of the wrapped thing.  It is filled in by the renamer+     f :: _a -> _+  The enclosing HsWildCardBndrs binds the wildcards _a and _.++* The explicit presence of these wrappers specifies, in the HsSyn,+  exactly where implicit quantification is allowed, and where+  wildcards are allowed.++* LHsQTyVars is used in data/class declarations, where the user gives+  explicit *type* variable bindings, but we need to implicitly bind+  *kind* variables.  For example+      class C (a :: k -> *) where ...+  The 'k' is implicitly bound in the hsq_tvs field of LHsQTyVars++Note [The wildcard story for types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Types can have wildcards in them, to support partial type signatures,+like       f :: Int -> (_ , _a) -> _a++A wildcard in a type can be++  * An anonymous wildcard,+        written '_'+    In HsType this is represented by HsWildCardTy.+    The renamer leaves it untouched, and it is later given fresh meta tyvars in+    the typechecker.++  * A named wildcard,+        written '_a', '_foo', etc+    In HsType this is represented by (HsTyVar "_a")+    i.e. a perfectly ordinary type variable that happens+         to start with an underscore++Note carefully:++* When NamedWildCards is off, type variables that start with an+  underscore really /are/ ordinary type variables.  And indeed, even+  when NamedWildCards is on you can bind _a explicitly as an ordinary+  type variable:+        data T _a _b = MkT _b _a+  Or even:+        f :: forall _a. _a -> _b+  Here _a is an ordinary forall'd binder, but (With NamedWildCards)+  _b is a named wildcard.  (See the comments in #10982)++* Named wildcards are bound by the HsWildCardBndrs construct, which wraps+  types that are allowed to have wildcards. Unnamed wildcards however are left+  unchanged until typechecking, where we give them fresh wild tyavrs and+  determine whether or not to emit hole constraints on each wildcard+  (we don't if it's a visible type/kind argument or a type family pattern).+  See related notes Note [Wildcards in visible kind application]+  and Note [Wildcards in visible type application] in TcHsType.hs++* After type checking is done, we report what types the wildcards+  got unified with.++Note [Ordering of implicit variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Since the advent of -XTypeApplications, GHC makes promises about the ordering+of implicit variable quantification. Specifically, we offer that implicitly+quantified variables (such as those in const :: a -> b -> a, without a `forall`)+will occur in left-to-right order of first occurrence. Here are a few examples:++  const :: a -> b -> a       -- forall a b. ...+  f :: Eq a => b -> a -> a   -- forall a b. ...  contexts are included++  type a <-< b = b -> a+  g :: a <-< b               -- forall a b. ...  type synonyms matter++  class Functor f where+    fmap :: (a -> b) -> f a -> f b   -- forall f a b. ...+    -- The f is quantified by the class, so only a and b are considered in fmap++This simple story is complicated by the possibility of dependency: all variables+must come after any variables mentioned in their kinds.++  typeRep :: Typeable a => TypeRep (a :: k)   -- forall k a. ...++The k comes first because a depends on k, even though the k appears later than+the a in the code. Thus, GHC does a *stable topological sort* on the variables.+By "stable", we mean that any two variables who do not depend on each other+preserve their existing left-to-right ordering.++Implicitly bound variables are collected by the extract- family of functions+(extractHsTysRdrTyVars, extractHsTyVarBndrsKVs, etc.) in RnTypes.+These functions thus promise to keep left-to-right ordering.+Look for pointers to this note to see the places where the action happens.++Note that we also maintain this ordering in kind signatures. Even though+there's no visible kind application (yet), having implicit variables be+quantified in left-to-right order in kind signatures is nice since:++* It's consistent with the treatment for type signatures.+* It can affect how types are displayed with -fprint-explicit-kinds (see+  #15568 for an example), which is a situation where knowing the order in+  which implicit variables are quantified can be useful.+* In the event that visible kind application is implemented, the order in+  which we would expect implicit variables to be ordered in kinds will have+  already been established.+-}++-- | Located Haskell Context+type LHsContext pass = Located (HsContext pass)+      -- ^ 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnUnit'+      -- For details on above see note [Api annotations] in ApiAnnotation++noLHsContext :: LHsContext pass+-- Use this when there is no context in the original program+-- It would really be more kosher to use a Maybe, to distinguish+--     class () => C a where ...+-- from+--     class C a where ...+noLHsContext = noLoc []++-- | Haskell Context+type HsContext pass = [LHsType pass]++-- | Located Haskell Type+type LHsType pass = Located (HsType pass)+      -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when+      --   in a list++      -- For details on above see note [Api annotations] in ApiAnnotation++-- | Haskell Kind+type HsKind pass = HsType pass++-- | Located Haskell Kind+type LHsKind pass = Located (HsKind pass)+      -- ^ 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'++      -- For details on above see note [Api annotations] in ApiAnnotation++--------------------------------------------------+--             LHsQTyVars+--  The explicitly-quantified binders in a data/type declaration++-- | Located Haskell Type Variable Binder+type LHsTyVarBndr pass = Located (HsTyVarBndr pass)+                         -- See Note [HsType binders]++-- | Located Haskell Quantified Type Variables+data LHsQTyVars pass   -- See Note [HsType binders]+  = HsQTvs { hsq_ext :: XHsQTvs pass++           , hsq_explicit :: [LHsTyVarBndr pass]+                -- Explicit variables, written by the user+                -- See Note [HsForAllTy tyvar binders]+    }+  | XLHsQTyVars (XXLHsQTyVars pass)++type HsQTvsRn = [Name]  -- Implicit variables+  -- For example, in   data T (a :: k1 -> k2) = ...+  -- the 'a' is explicit while 'k1', 'k2' are implicit++type instance XHsQTvs GhcPs = NoExtField+type instance XHsQTvs GhcRn = HsQTvsRn+type instance XHsQTvs GhcTc = HsQTvsRn++type instance XXLHsQTyVars  (GhcPass _) = NoExtCon++mkHsQTvs :: [LHsTyVarBndr GhcPs] -> LHsQTyVars GhcPs+mkHsQTvs tvs = HsQTvs { hsq_ext = noExtField, hsq_explicit = tvs }++hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr pass]+hsQTvExplicit = hsq_explicit++emptyLHsQTvs :: LHsQTyVars GhcRn+emptyLHsQTvs = HsQTvs { hsq_ext = [], hsq_explicit = [] }++isEmptyLHsQTvs :: LHsQTyVars GhcRn -> Bool+isEmptyLHsQTvs (HsQTvs { hsq_ext = imp, hsq_explicit = exp })+  = null imp && null exp+isEmptyLHsQTvs _ = False++------------------------------------------------+--            HsImplicitBndrs+-- Used to quantify the implicit binders of a type+--    * Implicit binders of a type signature (LHsSigType/LHsSigWcType)+--    * Patterns in a type/data family instance (HsTyPats)++-- | Haskell Implicit Binders+data HsImplicitBndrs pass thing   -- See Note [HsType binders]+  = HsIB { hsib_ext  :: XHsIB pass thing -- after renamer: [Name]+                                         -- Implicitly-bound kind & type vars+                                         -- Order is important; see+                                         -- Note [Ordering of implicit variables]+                                         -- in RnTypes++         , hsib_body :: thing            -- Main payload (type or list of types)+    }+  | XHsImplicitBndrs (XXHsImplicitBndrs pass thing)++type instance XHsIB              GhcPs _ = NoExtField+type instance XHsIB              GhcRn _ = [Name]+type instance XHsIB              GhcTc _ = [Name]++type instance XXHsImplicitBndrs  (GhcPass _) _ = NoExtCon++-- | Haskell Wildcard Binders+data HsWildCardBndrs pass thing+    -- See Note [HsType binders]+    -- See Note [The wildcard story for types]+  = HsWC { hswc_ext :: XHsWC pass thing+                -- after the renamer+                -- Wild cards, only named+                -- See Note [Wildcards in visible kind application]++         , hswc_body :: thing+                -- Main payload (type or list of types)+                -- If there is an extra-constraints wildcard,+                -- it's still there in the hsc_body.+    }+  | XHsWildCardBndrs (XXHsWildCardBndrs pass thing)++type instance XHsWC              GhcPs b = NoExtField+type instance XHsWC              GhcRn b = [Name]+type instance XHsWC              GhcTc b = [Name]++type instance XXHsWildCardBndrs  (GhcPass _) b = NoExtCon++-- | Located Haskell Signature Type+type LHsSigType   pass = HsImplicitBndrs pass (LHsType pass)    -- Implicit only++-- | Located Haskell Wildcard Type+type LHsWcType    pass = HsWildCardBndrs pass (LHsType pass)    -- Wildcard only++-- | Located Haskell Signature Wildcard Type+type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) -- Both++-- See Note [Representing type signatures]++hsImplicitBody :: HsImplicitBndrs (GhcPass p) thing -> thing+hsImplicitBody (HsIB { hsib_body = body }) = body+hsImplicitBody (XHsImplicitBndrs nec) = noExtCon nec++hsSigType :: LHsSigType (GhcPass p) -> LHsType (GhcPass p)+hsSigType = hsImplicitBody++hsSigWcType :: LHsSigWcType pass -> LHsType pass+hsSigWcType sig_ty = hsib_body (hswc_body sig_ty)++dropWildCards :: LHsSigWcType pass -> LHsSigType pass+-- Drop the wildcard part of a LHsSigWcType+dropWildCards sig_ty = hswc_body sig_ty++{- Note [Representing type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+HsSigType is used to represent an explicit user type signature+such as   f :: a -> a+     or   g (x :: a -> a) = x++A HsSigType is just a HsImplicitBndrs wrapping a LHsType.+ * The HsImplicitBndrs binds the /implicitly/ quantified tyvars+ * The LHsType binds the /explicitly/ quantified tyvars++E.g. For a signature like+   f :: forall (a::k). blah+we get+   HsIB { hsib_vars = [k]+        , hsib_body = HsForAllTy { hst_bndrs = [(a::*)]+                                 , hst_body = blah }+The implicit kind variable 'k' is bound by the HsIB;+the explicitly forall'd tyvar 'a' is bound by the HsForAllTy+-}++mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing+mkHsImplicitBndrs x = HsIB { hsib_ext  = noExtField+                           , hsib_body = x }++mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing+mkHsWildCardBndrs x = HsWC { hswc_body = x+                           , hswc_ext  = noExtField }++-- Add empty binders.  This is a bit suspicious; what if+-- the wrapped thing had free type variables?+mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing+mkEmptyImplicitBndrs x = HsIB { hsib_ext = []+                              , hsib_body = x }++mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing+mkEmptyWildCardBndrs x = HsWC { hswc_body = x+                              , hswc_ext  = [] }+++--------------------------------------------------+-- | These names are used early on to store the names of implicit+-- parameters.  They completely disappear after type-checking.+newtype HsIPName = HsIPName FastString+  deriving( Eq, Data )++hsIPNameFS :: HsIPName -> FastString+hsIPNameFS (HsIPName n) = n++instance Outputable HsIPName where+    ppr (HsIPName n) = char '?' <> ftext n -- Ordinary implicit parameters++instance OutputableBndr HsIPName where+    pprBndr _ n   = ppr n         -- Simple for now+    pprInfixOcc  n = ppr n+    pprPrefixOcc n = ppr n++--------------------------------------------------++-- | Haskell Type Variable Binder+data HsTyVarBndr pass+  = UserTyVar        -- no explicit kinding+         (XUserTyVar pass)+         (Located (IdP pass))+        -- See Note [Located RdrNames] in GHC.Hs.Expr+  | KindedTyVar+         (XKindedTyVar pass)+         (Located (IdP pass))+         (LHsKind pass)  -- The user-supplied kind signature+        -- ^+        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',+        --          'ApiAnnotation.AnnDcolon', 'ApiAnnotation.AnnClose'++        -- For details on above see note [Api annotations] in ApiAnnotation++  | XTyVarBndr+      (XXTyVarBndr pass)++type instance XUserTyVar    (GhcPass _) = NoExtField+type instance XKindedTyVar  (GhcPass _) = NoExtField++type instance XXTyVarBndr   (GhcPass _) = NoExtCon++-- | Does this 'HsTyVarBndr' come with an explicit kind annotation?+isHsKindedTyVar :: HsTyVarBndr pass -> Bool+isHsKindedTyVar (UserTyVar {})   = False+isHsKindedTyVar (KindedTyVar {}) = True+isHsKindedTyVar (XTyVarBndr {})  = False++-- | Do all type variables in this 'LHsQTyVars' come with kind annotations?+hsTvbAllKinded :: LHsQTyVars pass -> Bool+hsTvbAllKinded = all (isHsKindedTyVar . unLoc) . hsQTvExplicit++instance NamedThing (HsTyVarBndr GhcRn) where+  getName (UserTyVar _ v) = unLoc v+  getName (KindedTyVar _ v _) = unLoc v+  getName (XTyVarBndr nec) = noExtCon nec++-- | Haskell Type+data HsType pass+  = HsForAllTy   -- See Note [HsType binders]+      { hst_xforall :: XForAllTy pass+      , hst_fvf     :: ForallVisFlag -- Is this `forall a -> {...}` or+                                     --         `forall a. {...}`?+      , hst_bndrs   :: [LHsTyVarBndr pass]+                                       -- Explicit, user-supplied 'forall a b c'+      , hst_body    :: LHsType pass      -- body type+      }+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnForall',+      --         'ApiAnnotation.AnnDot','ApiAnnotation.AnnDarrow'+      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsQualTy   -- See Note [HsType binders]+      { hst_xqual :: XQualTy pass+      , hst_ctxt  :: LHsContext pass       -- Context C => blah+      , hst_body  :: LHsType pass }++  | HsTyVar  (XTyVar pass)+              PromotionFlag    -- Whether explicitly promoted,+                               -- for the pretty printer+             (Located (IdP pass))+                  -- Type variable, type constructor, or data constructor+                  -- see Note [Promotions (HsTyVar)]+                  -- See Note [Located RdrNames] in GHC.Hs.Expr+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsAppTy             (XAppTy pass)+                        (LHsType pass)+                        (LHsType pass)+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsAppKindTy         (XAppKindTy pass) -- type level type app+                        (LHsType pass)+                        (LHsKind pass)++  | HsFunTy             (XFunTy pass)+                        (LHsType pass)   -- function type+                        (LHsType pass)+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow',++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsListTy            (XListTy pass)+                        (LHsType pass)  -- Element type+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,+      --         'ApiAnnotation.AnnClose' @']'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsTupleTy           (XTupleTy pass)+                        HsTupleSort+                        [LHsType pass]  -- Element types (length gives arity)+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'(' or '(#'@,+    --         'ApiAnnotation.AnnClose' @')' or '#)'@++    -- For details on above see note [Api annotations] in ApiAnnotation++  | HsSumTy             (XSumTy pass)+                        [LHsType pass]  -- Element types (length gives arity)+    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'(#'@,+    --         'ApiAnnotation.AnnClose' '#)'@++    -- For details on above see note [Api annotations] in ApiAnnotation++  | HsOpTy              (XOpTy pass)+                        (LHsType pass) (Located (IdP pass)) (LHsType pass)+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsParTy             (XParTy pass)+                        (LHsType pass)   -- See Note [Parens in HsSyn] in GHC.Hs.Expr+        -- Parenthesis preserved for the precedence re-arrangement in RnTypes+        -- It's important that a * (b + c) doesn't get rearranged to (a*b) + c!+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,+      --         'ApiAnnotation.AnnClose' @')'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsIParamTy          (XIParamTy pass)+                        (Located HsIPName) -- (?x :: ty)+                        (LHsType pass)   -- Implicit parameters as they occur in+                                         -- contexts+      -- ^+      -- > (?x :: ty)+      --+      -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsStarTy            (XStarTy pass)+                        Bool             -- Is this the Unicode variant?+                                         -- Note [HsStarTy]+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++  | HsKindSig           (XKindSig pass)+                        (LHsType pass)  -- (ty :: kind)+                        (LHsKind pass)  -- A type with a kind signature+      -- ^+      -- > (ty :: kind)+      --+      -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,+      --         'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnClose' @')'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsSpliceTy          (XSpliceTy pass)+                        (HsSplice pass)   -- Includes quasi-quotes+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'$('@,+      --         'ApiAnnotation.AnnClose' @')'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsDocTy             (XDocTy pass)+                        (LHsType pass) LHsDocString -- A documented type+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsBangTy    (XBangTy pass)+                HsSrcBang (LHsType pass)   -- Bang-style type annotations+      -- ^ - 'ApiAnnotation.AnnKeywordId' :+      --         'ApiAnnotation.AnnOpen' @'{-\# UNPACK' or '{-\# NOUNPACK'@,+      --         'ApiAnnotation.AnnClose' @'#-}'@+      --         'ApiAnnotation.AnnBang' @\'!\'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsRecTy     (XRecTy pass)+                [LConDeclField pass]    -- Only in data type declarations+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,+      --         'ApiAnnotation.AnnClose' @'}'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  -- | HsCoreTy (XCoreTy pass) Type -- An escape hatch for tunnelling a *closed*+  --                                -- Core Type through HsSyn.+  --     -- ^ - 'ApiAnnotation.AnnKeywordId' : None++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsExplicitListTy       -- A promoted explicit list+        (XExplicitListTy pass)+        PromotionFlag      -- whether explcitly promoted, for pretty printer+        [LHsType pass]+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'["@,+      --         'ApiAnnotation.AnnClose' @']'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsExplicitTupleTy      -- A promoted explicit tuple+        (XExplicitTupleTy pass)+        [LHsType pass]+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'("@,+      --         'ApiAnnotation.AnnClose' @')'@++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsTyLit (XTyLit pass) HsTyLit      -- A promoted numeric literal.+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++      -- For details on above see note [Api annotations] in ApiAnnotation++  | HsWildCardTy (XWildCardTy pass)  -- A type wildcard+      -- See Note [The wildcard story for types]+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++      -- For details on above see note [Api annotations] in ApiAnnotation++  -- For adding new constructors via Trees that Grow+  | XHsType+      (XXType pass)++data NewHsTypeX+  = NHsCoreTy Type -- An escape hatch for tunnelling a *closed*+                   -- Core Type through HsSyn.+    deriving Data+      -- ^ - 'ApiAnnotation.AnnKeywordId' : None++instance Outputable NewHsTypeX where+  ppr (NHsCoreTy ty) = ppr ty++type instance XForAllTy        (GhcPass _) = NoExtField+type instance XQualTy          (GhcPass _) = NoExtField+type instance XTyVar           (GhcPass _) = NoExtField+type instance XAppTy           (GhcPass _) = NoExtField+type instance XFunTy           (GhcPass _) = NoExtField+type instance XListTy          (GhcPass _) = NoExtField+type instance XTupleTy         (GhcPass _) = NoExtField+type instance XSumTy           (GhcPass _) = NoExtField+type instance XOpTy            (GhcPass _) = NoExtField+type instance XParTy           (GhcPass _) = NoExtField+type instance XIParamTy        (GhcPass _) = NoExtField+type instance XStarTy          (GhcPass _) = NoExtField+type instance XKindSig         (GhcPass _) = NoExtField++type instance XAppKindTy       (GhcPass _) = SrcSpan -- Where the `@` lives++type instance XSpliceTy        GhcPs = NoExtField+type instance XSpliceTy        GhcRn = NoExtField+type instance XSpliceTy        GhcTc = Kind++type instance XDocTy           (GhcPass _) = NoExtField+type instance XBangTy          (GhcPass _) = NoExtField+type instance XRecTy           (GhcPass _) = NoExtField++type instance XExplicitListTy  GhcPs = NoExtField+type instance XExplicitListTy  GhcRn = NoExtField+type instance XExplicitListTy  GhcTc = Kind++type instance XExplicitTupleTy GhcPs = NoExtField+type instance XExplicitTupleTy GhcRn = NoExtField+type instance XExplicitTupleTy GhcTc = [Kind]++type instance XTyLit           (GhcPass _) = NoExtField++type instance XWildCardTy      (GhcPass _) = NoExtField++type instance XXType         (GhcPass _) = NewHsTypeX+++-- Note [Literal source text] in BasicTypes for SourceText fields in+-- the following+-- | Haskell Type Literal+data HsTyLit+  = HsNumTy SourceText Integer+  | HsStrTy SourceText FastString+    deriving Data+++{-+Note [HsForAllTy tyvar binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+After parsing:+  * Implicit => empty+    Explicit => the variables the user wrote++After renaming+  * Implicit => the *type* variables free in the type+    Explicit => the variables the user wrote (renamed)++Qualified currently behaves exactly as Implicit,+but it is deprecated to use it for implicit quantification.+In this case, GHC 7.10 gives a warning; see+Note [Context quantification] in RnTypes, and #4426.+In GHC 8.0, Qualified will no longer bind variables+and this will become an error.++The kind variables bound in the hsq_implicit field come both+  a) from the kind signatures on the kind vars (eg k1)+  b) from the scope of the forall (eg k2)+Example:   f :: forall (a::k1) b. T a (b::k2)+++Note [Unit tuples]+~~~~~~~~~~~~~~~~~~+Consider the type+    type instance F Int = ()+We want to parse that "()"+    as HsTupleTy HsBoxedOrConstraintTuple [],+NOT as HsTyVar unitTyCon++Why? Because F might have kind (* -> Constraint), so we when parsing we+don't know if that tuple is going to be a constraint tuple or an ordinary+unit tuple.  The HsTupleSort flag is specifically designed to deal with+that, but it has to work for unit tuples too.++Note [Promotions (HsTyVar)]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+HsTyVar: A name in a type or kind.+  Here are the allowed namespaces for the name.+    In a type:+      Var: not allowed+      Data: promoted data constructor+      Tv: type variable+      TcCls before renamer: type constructor, class constructor, or promoted data constructor+      TcCls after renamer: type constructor or class constructor+    In a kind:+      Var, Data: not allowed+      Tv: kind variable+      TcCls: kind constructor or promoted type constructor++  The 'Promoted' field in an HsTyVar captures whether the type was promoted in+  the source code by prefixing an apostrophe.++Note [HsStarTy]+~~~~~~~~~~~~~~~+When the StarIsType extension is enabled, we want to treat '*' and its Unicode+variant identically to 'Data.Kind.Type'. Unfortunately, doing so in the parser+would mean that when we pretty-print it back, we don't know whether the user+wrote '*' or 'Type', and lose the parse/ppr roundtrip property.++As a workaround, we parse '*' as HsStarTy (if it stands for 'Data.Kind.Type')+and then desugar it to 'Data.Kind.Type' in the typechecker (see tc_hs_type).+When '*' is a regular type operator (StarIsType is disabled), HsStarTy is not+involved.+++Note [Promoted lists and tuples]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Notice the difference between+   HsListTy    HsExplicitListTy+   HsTupleTy   HsExplicitListTupleTy++E.g.    f :: [Int]                      HsListTy++        g3  :: T '[]                   All these use+        g2  :: T '[True]                  HsExplicitListTy+        g1  :: T '[True,False]+        g1a :: T [True,False]             (can omit ' where unambiguous)++  kind of T :: [Bool] -> *        This kind uses HsListTy!++E.g.    h :: (Int,Bool)                 HsTupleTy; f is a pair+        k :: S '(True,False)            HsExplicitTypleTy; S is indexed by+                                           a type-level pair of booleans+        kind of S :: (Bool,Bool) -> *   This kind uses HsExplicitTupleTy++Note [Distinguishing tuple kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Apart from promotion, tuples can have one of three different kinds:++        x :: (Int, Bool)                -- Regular boxed tuples+        f :: Int# -> (# Int#, Int# #)   -- Unboxed tuples+        g :: (Eq a, Ord a) => a         -- Constraint tuples++For convenience, internally we use a single constructor for all of these,+namely HsTupleTy, but keep track of the tuple kind (in the first argument to+HsTupleTy, a HsTupleSort). We can tell if a tuple is unboxed while parsing,+because of the #. However, with -XConstraintKinds we can only distinguish+between constraint and boxed tuples during type checking, in general. Hence the+four constructors of HsTupleSort:++        HsUnboxedTuple                  -> Produced by the parser+        HsBoxedTuple                    -> Certainly a boxed tuple+        HsConstraintTuple               -> Certainly a constraint tuple+        HsBoxedOrConstraintTuple        -> Could be a boxed or a constraint+                                        tuple. Produced by the parser only,+                                        disappears after type checking+-}++-- | Haskell Tuple Sort+data HsTupleSort = HsUnboxedTuple+                 | HsBoxedTuple+                 | HsConstraintTuple+                 | HsBoxedOrConstraintTuple+                 deriving Data++-- | Located Constructor Declaration Field+type LConDeclField pass = Located (ConDeclField pass)+      -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when+      --   in a list++      -- For details on above see note [Api annotations] in ApiAnnotation++-- | Constructor Declaration Field+data ConDeclField pass  -- Record fields have Haddoc docs on them+  = ConDeclField { cd_fld_ext  :: XConDeclField pass,+                   cd_fld_names :: [LFieldOcc pass],+                                   -- ^ See Note [ConDeclField passs]+                   cd_fld_type :: LBangType pass,+                   cd_fld_doc  :: Maybe LHsDocString }+      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'++      -- For details on above see note [Api annotations] in ApiAnnotation+  | XConDeclField (XXConDeclField pass)++type instance XConDeclField  (GhcPass _) = NoExtField+type instance XXConDeclField (GhcPass _) = NoExtCon++instance OutputableBndrId p+       => Outputable (ConDeclField (GhcPass p)) where+  ppr (ConDeclField _ fld_n fld_ty _) = ppr fld_n <+> dcolon <+> ppr fld_ty+  ppr (XConDeclField x) = ppr x++-- HsConDetails is used for patterns/expressions *and* for data type+-- declarations+-- | Haskell Constructor Details+data HsConDetails arg rec+  = PrefixCon [arg]             -- C p1 p2 p3+  | RecCon    rec               -- C { x = p1, y = p2 }+  | InfixCon  arg arg           -- p1 `C` p2+  deriving Data++instance (Outputable arg, Outputable rec)+         => Outputable (HsConDetails arg rec) where+  ppr (PrefixCon args) = text "PrefixCon" <+> ppr args+  ppr (RecCon rec)     = text "RecCon:" <+> ppr rec+  ppr (InfixCon l r)   = text "InfixCon:" <+> ppr [l, r]++hsConDetailsArgs ::+     HsConDetails (LHsType a) (Located [LConDeclField a])+  -> [LHsType a]+hsConDetailsArgs details = case details of+  InfixCon a b -> [a,b]+  PrefixCon xs -> xs+  RecCon r -> map (cd_fld_type . unLoc) (unLoc r)++{-+Note [ConDeclField passs]+~~~~~~~~~~~~~~~~~~~~~~~~~++A ConDeclField contains a list of field occurrences: these always+include the field label as the user wrote it.  After the renamer, it+will additionally contain the identity of the selector function in the+second component.++Due to DuplicateRecordFields, the OccName of the selector function+may have been mangled, which is why we keep the original field label+separately.  For example, when DuplicateRecordFields is enabled++    data T = MkT { x :: Int }++gives++    ConDeclField { cd_fld_names = [L _ (FieldOcc "x" $sel:x:MkT)], ... }.+-}++-----------------------+-- A valid type must have a for-all at the top of the type, or of the fn arg+-- types++---------------------+hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]+-- Get the lexically-scoped type variables of a HsSigType+--  - the explicitly-given forall'd type variables+--  - the named wildcars; see Note [Scoping of named wildcards]+-- because they scope in the same way+hsWcScopedTvs sig_ty+  | HsWC { hswc_ext = nwcs, hswc_body = sig_ty1 }  <- sig_ty+  , HsIB { hsib_ext = vars+         , hsib_body = sig_ty2 } <- sig_ty1+  = case sig_ty2 of+      L _ (HsForAllTy { hst_fvf = vis_flag+                      , hst_bndrs = tvs }) ->+        ASSERT( vis_flag == ForallInvis ) -- See Note [hsScopedTvs vis_flag]+        vars ++ nwcs ++ hsLTyVarNames tvs+      _                                    -> nwcs+hsWcScopedTvs (HsWC _ (XHsImplicitBndrs nec)) = noExtCon nec+hsWcScopedTvs (XHsWildCardBndrs nec) = noExtCon nec++hsScopedTvs :: LHsSigType GhcRn -> [Name]+-- Same as hsWcScopedTvs, but for a LHsSigType+hsScopedTvs sig_ty+  | HsIB { hsib_ext = vars+         , hsib_body = sig_ty2 } <- sig_ty+  , L _ (HsForAllTy { hst_fvf = vis_flag+                    , hst_bndrs = tvs }) <- sig_ty2+  = ASSERT( vis_flag == ForallInvis ) -- See Note [hsScopedTvs vis_flag]+    vars ++ hsLTyVarNames tvs+  | otherwise+  = []++{- Note [Scoping of named wildcards]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  f :: _a -> _a+  f x = let g :: _a -> _a+            g = ...+        in ...++Currently, for better or worse, the "_a" variables are all the same. So+although there is no explicit forall, the "_a" scopes over the definition.+I don't know if this is a good idea, but there it is.+-}++{- Note [hsScopedTvs vis_flag]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-XScopedTypeVariables can be defined in terms of a desugaring to+-XTypeAbstractions (GHC Proposal #50):++    fn :: forall a b c. tau(a,b,c)            fn :: forall a b c. tau(a,b,c)+    fn = defn(a,b,c)                   ==>    fn @x @y @z = defn(x,y,z)++That is, for every type variable of the leading 'forall' in the type signature,+we add an invisible binder at term level.++This model does not extend to visible forall, as discussed here:++* https://gitlab.haskell.org/ghc/ghc/issues/16734#note_203412+* https://github.com/ghc-proposals/ghc-proposals/pull/238++The conclusion of these discussions can be summarized as follows:++  > Assuming support for visible 'forall' in terms, consider this example:+  >+  >     vfn :: forall x y -> tau(x,y)+  >     vfn = \a b -> ...+  >+  > The user has written their own binders 'a' and 'b' to stand for 'x' and+  > 'y', and we definitely should not desugar this into:+  >+  >     vfn :: forall x y -> tau(x,y)+  >     vfn x y = \a b -> ...         -- bad!++At the moment, GHC does not support visible 'forall' in terms, so we simply cement+our assumptions with an assert:++    hsScopedTvs (HsForAllTy { hst_fvf = vis_flag, ... }) =+      ASSERT( vis_flag == ForallInvis )+      ...++In the future, this assert can be safely turned into a pattern match to support+visible forall in terms:++    hsScopedTvs (HsForAllTy { hst_fvf = ForallInvis, ... }) = ...+-}++---------------------+hsTyVarName :: HsTyVarBndr (GhcPass p) -> IdP (GhcPass p)+hsTyVarName (UserTyVar _ (L _ n))     = n+hsTyVarName (KindedTyVar _ (L _ n) _) = n+hsTyVarName (XTyVarBndr nec) = noExtCon nec++hsLTyVarName :: LHsTyVarBndr (GhcPass p) -> IdP (GhcPass p)+hsLTyVarName = hsTyVarName . unLoc++hsLTyVarNames :: [LHsTyVarBndr (GhcPass p)] -> [IdP (GhcPass p)]+hsLTyVarNames = map hsLTyVarName++hsExplicitLTyVarNames :: LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)]+-- Explicit variables only+hsExplicitLTyVarNames qtvs = map hsLTyVarName (hsQTvExplicit qtvs)++hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]+-- All variables+hsAllLTyVarNames (HsQTvs { hsq_ext = kvs+                         , hsq_explicit = tvs })+  = kvs ++ hsLTyVarNames tvs+hsAllLTyVarNames (XLHsQTyVars nec) = noExtCon nec++hsLTyVarLocName :: LHsTyVarBndr (GhcPass p) -> Located (IdP (GhcPass p))+hsLTyVarLocName = onHasSrcSpan hsTyVarName++hsLTyVarLocNames :: LHsQTyVars (GhcPass p) -> [Located (IdP (GhcPass p))]+hsLTyVarLocNames qtvs = map hsLTyVarLocName (hsQTvExplicit qtvs)++-- | Convert a LHsTyVarBndr to an equivalent LHsType.+hsLTyVarBndrToType :: LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p)+hsLTyVarBndrToType = onHasSrcSpan cvt+  where cvt (UserTyVar _ n) = HsTyVar noExtField NotPromoted n+        cvt (KindedTyVar _ (L name_loc n) kind)+          = HsKindSig noExtField+                   (L name_loc (HsTyVar noExtField NotPromoted (L name_loc n))) kind+        cvt (XTyVarBndr nec) = noExtCon nec++-- | Convert a LHsTyVarBndrs to a list of types.+-- Works on *type* variable only, no kind vars.+hsLTyVarBndrsToTypes :: LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)]+hsLTyVarBndrsToTypes (HsQTvs { hsq_explicit = tvbs }) = map hsLTyVarBndrToType tvbs+hsLTyVarBndrsToTypes (XLHsQTyVars nec) = noExtCon nec++-- | Get the kind signature of a type, ignoring parentheses:+--+--   hsTyKindSig   `Maybe                    `   =   Nothing+--   hsTyKindSig   `Maybe ::   Type -> Type  `   =   Just  `Type -> Type`+--   hsTyKindSig   `Maybe :: ((Type -> Type))`   =   Just  `Type -> Type`+--+-- This is used to extract the result kind of type synonyms with a CUSK:+--+--  type S = (F :: res_kind)+--                 ^^^^^^^^+--+hsTyKindSig :: LHsType pass -> Maybe (LHsKind pass)+hsTyKindSig lty =+  case unLoc lty of+    HsParTy _ lty'    -> hsTyKindSig lty'+    HsKindSig _ _ k   -> Just k+    _                 -> Nothing++---------------------+ignoreParens :: LHsType pass -> LHsType pass+ignoreParens (L _ (HsParTy _ ty)) = ignoreParens ty+ignoreParens ty                   = ty++isLHsForAllTy :: LHsType p -> Bool+isLHsForAllTy (L _ (HsForAllTy {})) = True+isLHsForAllTy _                     = False++{-+************************************************************************+*                                                                      *+                Building types+*                                                                      *+************************************************************************+-}++mkAnonWildCardTy :: HsType GhcPs+mkAnonWildCardTy = HsWildCardTy noExtField++mkHsOpTy :: LHsType (GhcPass p) -> Located (IdP (GhcPass p))+         -> LHsType (GhcPass p) -> HsType (GhcPass p)+mkHsOpTy ty1 op ty2 = HsOpTy noExtField ty1 op ty2++mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)+mkHsAppTy t1 t2+  = addCLoc t1 t2 (HsAppTy noExtField t1 (parenthesizeHsType appPrec t2))++mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)]+           -> LHsType (GhcPass p)+mkHsAppTys = foldl' mkHsAppTy++mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)+              -> LHsType (GhcPass p)+mkHsAppKindTy ext ty k+  = addCLoc ty k (HsAppKindTy ext ty k)++{-+************************************************************************+*                                                                      *+                Decomposing HsTypes+*                                                                      *+************************************************************************+-}++---------------------------------+-- splitHsFunType decomposes a type (t1 -> t2 ... -> tn)+-- Breaks up any parens in the result type:+--      splitHsFunType (a -> (b -> c)) = ([a,b], c)+-- Also deals with (->) t1 t2; that is why it only works on LHsType Name+--   (see #9096)+splitHsFunType :: LHsType GhcRn -> ([LHsType GhcRn], LHsType GhcRn)+splitHsFunType (L _ (HsParTy _ ty))+  = splitHsFunType ty++splitHsFunType (L _ (HsFunTy _ x y))+  | (args, res) <- splitHsFunType y+  = (x:args, res)+{- This is not so correct, because it won't work with visible kind app, in case+  someone wants to write '(->) @k1 @k2 t1 t2'. Fixing this would require changing+  ConDeclGADT abstract syntax -}+splitHsFunType orig_ty@(L _ (HsAppTy _ t1 t2))+  = go t1 [t2]+  where  -- Look for (->) t1 t2, possibly with parenthesisation+    go (L _ (HsTyVar _ _ (L _ fn))) tys | fn == funTyConName+                                 , [t1,t2] <- tys+                                 , (args, res) <- splitHsFunType t2+                                 = (t1:args, res)+    go (L _ (HsAppTy _ t1 t2)) tys = go t1 (t2:tys)+    go (L _ (HsParTy _ ty))    tys = go ty tys+    go _                       _   = ([], orig_ty)  -- Failure to match++splitHsFunType other = ([], other)++-- retrieve the name of the "head" of a nested type application+-- somewhat like splitHsAppTys, but a little more thorough+-- used to examine the result of a GADT-like datacon, so it doesn't handle+-- *all* cases (like lists, tuples, (~), etc.)+hsTyGetAppHead_maybe :: LHsType (GhcPass p)+                     -> Maybe (Located (IdP (GhcPass p)))+hsTyGetAppHead_maybe = go+  where+    go (L _ (HsTyVar _ _ ln))          = Just ln+    go (L _ (HsAppTy _ l _))           = go l+    go (L _ (HsAppKindTy _ t _))       = go t+    go (L _ (HsOpTy _ _ (L loc n) _))  = Just (L loc n)+    go (L _ (HsParTy _ t))             = go t+    go (L _ (HsKindSig _ t _))         = go t+    go _                               = Nothing++------------------------------------------------------------+-- Arguments in an expression/type after splitting+data HsArg tm ty+  = HsValArg tm   -- Argument is an ordinary expression     (f arg)+  | HsTypeArg SrcSpan ty -- Argument is a visible type application (f @ty)+                         -- SrcSpan is location of the `@`+  | HsArgPar SrcSpan -- See Note [HsArgPar]++numVisibleArgs :: [HsArg tm ty] -> Arity+numVisibleArgs = count is_vis+  where is_vis (HsValArg _) = True+        is_vis _            = False++-- type level equivalent+type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)++instance (Outputable tm, Outputable ty) => Outputable (HsArg tm ty) where+  ppr (HsValArg tm)    = ppr tm+  ppr (HsTypeArg _ ty) = char '@' <> ppr ty+  ppr (HsArgPar sp)    = text "HsArgPar"  <+> ppr sp+{-+Note [HsArgPar]+A HsArgPar indicates that everything to the left of this in the argument list is+enclosed in parentheses together with the function itself. It is necessary so+that we can recreate the parenthesis structure in the original source after+typechecking the arguments.++The SrcSpan is the span of the original HsPar++((f arg1) arg2 arg3) results in an input argument list of+[HsValArg arg1, HsArgPar span1, HsValArg arg2, HsValArg arg3, HsArgPar span2]++-}++--------------------------------++-- | Decompose a pattern synonym type signature into its constituent parts.+--+-- Note that this function looks through parentheses, so it will work on types+-- such as @(forall a. <...>)@. The downside to this is that it is not+-- generally possible to take the returned types and reconstruct the original+-- type (parentheses and all) from them.+splitLHsPatSynTy :: LHsType pass+                 -> ( [LHsTyVarBndr pass]    -- universals+                    , LHsContext pass        -- required constraints+                    , [LHsTyVarBndr pass]    -- existentials+                    , LHsContext pass        -- provided constraints+                    , LHsType pass)          -- body type+splitLHsPatSynTy ty = (univs, reqs, exis, provs, ty4)+  where+    (univs, ty1) = splitLHsForAllTyInvis ty+    (reqs,  ty2) = splitLHsQualTy ty1+    (exis,  ty3) = splitLHsForAllTyInvis ty2+    (provs, ty4) = splitLHsQualTy ty3++-- | Decompose a sigma type (of the form @forall <tvs>. context => body@)+-- into its constituent parts. Note that only /invisible/ @forall@s+-- (i.e., @forall a.@, with a dot) are split apart; /visible/ @forall@s+-- (i.e., @forall a ->@, with an arrow) are left untouched.+--+-- This function is used to split apart certain types, such as instance+-- declaration types, which disallow visible @forall@s. For instance, if GHC+-- split apart the @forall@ in @instance forall a -> Show (Blah a)@, then that+-- declaration would mistakenly be accepted!+--+-- Note that this function looks through parentheses, so it will work on types+-- such as @(forall a. <...>)@. The downside to this is that it is not+-- generally possible to take the returned types and reconstruct the original+-- type (parentheses and all) from them.+splitLHsSigmaTyInvis :: LHsType pass+                     -> ([LHsTyVarBndr pass], LHsContext pass, LHsType pass)+splitLHsSigmaTyInvis ty+  | (tvs,  ty1) <- splitLHsForAllTyInvis ty+  , (ctxt, ty2) <- splitLHsQualTy ty1+  = (tvs, ctxt, ty2)++-- | Decompose a type of the form @forall <tvs>. body@ into its constituent+-- parts. Note that only /invisible/ @forall@s+-- (i.e., @forall a.@, with a dot) are split apart; /visible/ @forall@s+-- (i.e., @forall a ->@, with an arrow) are left untouched.+--+-- This function is used to split apart certain types, such as instance+-- declaration types, which disallow visible @forall@s. For instance, if GHC+-- split apart the @forall@ in @instance forall a -> Show (Blah a)@, then that+-- declaration would mistakenly be accepted!+--+-- Note that this function looks through parentheses, so it will work on types+-- such as @(forall a. <...>)@. The downside to this is that it is not+-- generally possible to take the returned types and reconstruct the original+-- type (parentheses and all) from them.+splitLHsForAllTyInvis :: LHsType pass -> ([LHsTyVarBndr pass], LHsType pass)+splitLHsForAllTyInvis lty@(L _ ty) =+  case ty of+    HsParTy _ ty' -> splitLHsForAllTyInvis ty'+    HsForAllTy { hst_fvf = fvf', hst_bndrs = tvs', hst_body = body' }+      |  fvf' == ForallInvis+      -> (tvs', body')+    _ -> ([], lty)++-- | Decompose a type of the form @context => body@ into its constituent parts.+--+-- Note that this function looks through parentheses, so it will work on types+-- such as @(context => <...>)@. The downside to this is that it is not+-- generally possible to take the returned types and reconstruct the original+-- type (parentheses and all) from them.+splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass)+splitLHsQualTy (L _ (HsParTy _ ty)) = splitLHsQualTy ty+splitLHsQualTy (L _ (HsQualTy { hst_ctxt = ctxt, hst_body = body })) = (ctxt,     body)+splitLHsQualTy body              = (noLHsContext, body)++-- | Decompose a type class instance type (of the form+-- @forall <tvs>. context => instance_head@) into its constituent parts.+--+-- Note that this function looks through parentheses, so it will work on types+-- such as @(forall <tvs>. <...>)@. The downside to this is that it is not+-- generally possible to take the returned types and reconstruct the original+-- type (parentheses and all) from them.+splitLHsInstDeclTy :: LHsSigType GhcRn+                   -> ([Name], LHsContext GhcRn, LHsType GhcRn)+-- Split up an instance decl type, returning the pieces+splitLHsInstDeclTy (HsIB { hsib_ext = itkvs+                         , hsib_body = inst_ty })+  | (tvs, cxt, body_ty) <- splitLHsSigmaTyInvis inst_ty+  = (itkvs ++ hsLTyVarNames tvs, cxt, body_ty)+         -- Return implicitly bound type and kind vars+         -- For an instance decl, all of them are in scope+splitLHsInstDeclTy (XHsImplicitBndrs nec) = noExtCon nec++getLHsInstDeclHead :: LHsSigType (GhcPass p) -> LHsType (GhcPass p)+getLHsInstDeclHead inst_ty+  | (_tvs, _cxt, body_ty) <- splitLHsSigmaTyInvis (hsSigType inst_ty)+  = body_ty++getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p)+                          -> Maybe (Located (IdP (GhcPass p)))+-- Works on (HsSigType RdrName)+getLHsInstDeclClass_maybe inst_ty+  = do { let head_ty = getLHsInstDeclHead inst_ty+       ; cls <- hsTyGetAppHead_maybe head_ty+       ; return cls }++{-+************************************************************************+*                                                                      *+                FieldOcc+*                                                                      *+************************************************************************+-}++-- | Located Field Occurrence+type LFieldOcc pass = Located (FieldOcc pass)++-- | Field Occurrence+--+-- Represents an *occurrence* of an unambiguous field.  We store+-- both the 'RdrName' the user originally wrote, and after the+-- renamer, the selector function.+data FieldOcc pass = FieldOcc { extFieldOcc     :: XCFieldOcc pass+                              , rdrNameFieldOcc :: Located RdrName+                                 -- ^ See Note [Located RdrNames] in GHC.Hs.Expr+                              }++  | XFieldOcc+      (XXFieldOcc pass)+deriving instance Eq  (XCFieldOcc (GhcPass p)) => Eq  (FieldOcc (GhcPass p))+deriving instance Ord (XCFieldOcc (GhcPass p)) => Ord (FieldOcc (GhcPass p))++type instance XCFieldOcc GhcPs = NoExtField+type instance XCFieldOcc GhcRn = Name+type instance XCFieldOcc GhcTc = Id++type instance XXFieldOcc (GhcPass _) = NoExtCon++instance Outputable (FieldOcc pass) where+  ppr = ppr . rdrNameFieldOcc++mkFieldOcc :: Located RdrName -> FieldOcc GhcPs+mkFieldOcc rdr = FieldOcc noExtField rdr+++-- | Ambiguous Field Occurrence+--+-- Represents an *occurrence* of a field that is potentially+-- ambiguous after the renamer, with the ambiguity resolved by the+-- typechecker.  We always store the 'RdrName' that the user+-- originally wrote, and store the selector function after the renamer+-- (for unambiguous occurrences) or the typechecker (for ambiguous+-- occurrences).+--+-- See Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat and+-- Note [Disambiguating record fields] in TcExpr.+-- See Note [Located RdrNames] in GHC.Hs.Expr+data AmbiguousFieldOcc pass+  = Unambiguous (XUnambiguous pass) (Located RdrName)+  | Ambiguous   (XAmbiguous pass)   (Located RdrName)+  | XAmbiguousFieldOcc (XXAmbiguousFieldOcc pass)++type instance XUnambiguous GhcPs = NoExtField+type instance XUnambiguous GhcRn = Name+type instance XUnambiguous GhcTc = Id++type instance XAmbiguous GhcPs = NoExtField+type instance XAmbiguous GhcRn = NoExtField+type instance XAmbiguous GhcTc = Id++type instance XXAmbiguousFieldOcc (GhcPass _) = NoExtCon++instance Outputable (AmbiguousFieldOcc (GhcPass p)) where+  ppr = ppr . rdrNameAmbiguousFieldOcc++instance OutputableBndr (AmbiguousFieldOcc (GhcPass p)) where+  pprInfixOcc  = pprInfixOcc . rdrNameAmbiguousFieldOcc+  pprPrefixOcc = pprPrefixOcc . rdrNameAmbiguousFieldOcc++mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs+mkAmbiguousFieldOcc rdr = Unambiguous noExtField rdr++rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName+rdrNameAmbiguousFieldOcc (Unambiguous _ (L _ rdr)) = rdr+rdrNameAmbiguousFieldOcc (Ambiguous   _ (L _ rdr)) = rdr+rdrNameAmbiguousFieldOcc (XAmbiguousFieldOcc nec)+  = noExtCon nec++selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id+selectorAmbiguousFieldOcc (Unambiguous sel _) = sel+selectorAmbiguousFieldOcc (Ambiguous   sel _) = sel+selectorAmbiguousFieldOcc (XAmbiguousFieldOcc nec)+  = noExtCon nec++unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc+unambiguousFieldOcc (Unambiguous rdr sel) = FieldOcc rdr sel+unambiguousFieldOcc (Ambiguous   rdr sel) = FieldOcc rdr sel+unambiguousFieldOcc (XAmbiguousFieldOcc nec) = noExtCon nec++ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc+ambiguousFieldOcc (FieldOcc sel rdr) = Unambiguous sel rdr+ambiguousFieldOcc (XFieldOcc nec) = noExtCon nec++{-+************************************************************************+*                                                                      *+\subsection{Pretty printing}+*                                                                      *+************************************************************************+-}++instance OutputableBndrId p => Outputable (HsType (GhcPass p)) where+    ppr ty = pprHsType ty++instance Outputable HsTyLit where+    ppr = ppr_tylit++instance OutputableBndrId p+       => Outputable (LHsQTyVars (GhcPass p)) where+    ppr (HsQTvs { hsq_explicit = tvs }) = interppSP tvs+    ppr (XLHsQTyVars x) = ppr x++instance OutputableBndrId p+       => Outputable (HsTyVarBndr (GhcPass p)) where+    ppr (UserTyVar _ n)     = ppr n+    ppr (KindedTyVar _ n k) = parens $ hsep [ppr n, dcolon, ppr k]+    ppr (XTyVarBndr nec)    = noExtCon nec++instance Outputable thing+       => Outputable (HsImplicitBndrs (GhcPass p) thing) where+    ppr (HsIB { hsib_body = ty }) = ppr ty+    ppr (XHsImplicitBndrs x) = ppr x++instance Outputable thing+       => Outputable (HsWildCardBndrs (GhcPass p) thing) where+    ppr (HsWC { hswc_body = ty }) = ppr ty+    ppr (XHsWildCardBndrs x) = ppr x++pprAnonWildCard :: SDoc+pprAnonWildCard = char '_'++-- | Prints a forall; When passed an empty list, prints @forall .@/@forall ->@+-- only when @-dppr-debug@ is enabled.+pprHsForAll :: (OutputableBndrId p)+            => ForallVisFlag -> [LHsTyVarBndr (GhcPass p)]+            -> LHsContext (GhcPass p) -> SDoc+pprHsForAll = pprHsForAllExtra Nothing++-- | Version of 'pprHsForAll' that can also print an extra-constraints+-- wildcard, e.g. @_ => a -> Bool@ or @(Show a, _) => a -> String@. This+-- underscore will be printed when the 'Maybe SrcSpan' argument is a 'Just'+-- containing the location of the extra-constraints wildcard. A special+-- function for this is needed, as the extra-constraints wildcard is removed+-- from the actual context and type, and stored in a separate field, thus just+-- printing the type will not print the extra-constraints wildcard.+pprHsForAllExtra :: (OutputableBndrId p)+                 => Maybe SrcSpan -> ForallVisFlag+                 -> [LHsTyVarBndr (GhcPass p)]+                 -> LHsContext (GhcPass p) -> SDoc+pprHsForAllExtra extra fvf qtvs cxt+  = pp_forall <+> pprLHsContextExtra (isJust extra) cxt+  where+    pp_forall | null qtvs = whenPprDebug (forAllLit <> separator)+              | otherwise = forAllLit <+> interppSP qtvs <> separator++    separator = ppr_forall_separator fvf++-- | Version of 'pprHsForAll' or 'pprHsForAllExtra' that will always print+-- @forall.@ when passed @Just []@. Prints nothing if passed 'Nothing'+pprHsExplicitForAll :: (OutputableBndrId p)+                    => ForallVisFlag+                    -> Maybe [LHsTyVarBndr (GhcPass p)] -> SDoc+pprHsExplicitForAll fvf (Just qtvs) = forAllLit <+> interppSP qtvs+                                                 <> ppr_forall_separator fvf+pprHsExplicitForAll _   Nothing     = empty++-- | Prints an arrow for visible @forall@s (e.g., @forall a ->@) and a dot for+-- invisible @forall@s (e.g., @forall a.@).+ppr_forall_separator :: ForallVisFlag -> SDoc+ppr_forall_separator ForallVis   = space <> arrow+ppr_forall_separator ForallInvis = dot++pprLHsContext :: (OutputableBndrId p)+              => LHsContext (GhcPass p) -> SDoc+pprLHsContext lctxt+  | null (unLoc lctxt) = empty+  | otherwise          = pprLHsContextAlways lctxt++-- For use in a HsQualTy, which always gets printed if it exists.+pprLHsContextAlways :: (OutputableBndrId p)+                    => LHsContext (GhcPass p) -> SDoc+pprLHsContextAlways (L _ ctxt)+  = case ctxt of+      []       -> parens empty             <+> darrow+      [L _ ty] -> ppr_mono_ty ty           <+> darrow+      _        -> parens (interpp'SP ctxt) <+> darrow++-- True <=> print an extra-constraints wildcard, e.g. @(Show a, _) =>@+pprLHsContextExtra :: (OutputableBndrId p)+                   => Bool -> LHsContext (GhcPass p) -> SDoc+pprLHsContextExtra show_extra lctxt@(L _ ctxt)+  | not show_extra = pprLHsContext lctxt+  | null ctxt      = char '_' <+> darrow+  | otherwise      = parens (sep (punctuate comma ctxt')) <+> darrow+  where+    ctxt' = map ppr ctxt ++ [char '_']++pprConDeclFields :: (OutputableBndrId p)+                 => [LConDeclField (GhcPass p)] -> SDoc+pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields)))+  where+    ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty,+                                 cd_fld_doc = doc }))+        = ppr_names ns <+> dcolon <+> ppr ty <+> ppr_mbDoc doc+    ppr_fld (L _ (XConDeclField x)) = ppr x+    ppr_names [n] = ppr n+    ppr_names ns = sep (punctuate comma (map ppr ns))++{-+Note [Printing KindedTyVars]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+#3830 reminded me that we should really only print the kind+signature on a KindedTyVar if the kind signature was put there by the+programmer.  During kind inference GHC now adds a PostTcKind to UserTyVars,+rather than converting to KindedTyVars as before.++(As it happens, the message in #3830 comes out a different way now,+and the problem doesn't show up; but having the flag on a KindedTyVar+seems like the Right Thing anyway.)+-}++-- Printing works more-or-less as for Types++pprHsType :: (OutputableBndrId p) => HsType (GhcPass p) -> SDoc+pprHsType ty = ppr_mono_ty ty++ppr_mono_lty :: (OutputableBndrId p) => LHsType (GhcPass p) -> SDoc+ppr_mono_lty ty = ppr_mono_ty (unLoc ty)++ppr_mono_ty :: (OutputableBndrId p) => HsType (GhcPass p) -> SDoc+ppr_mono_ty (HsForAllTy { hst_fvf = fvf, hst_bndrs = tvs, hst_body = ty })+  = sep [pprHsForAll fvf tvs noLHsContext, ppr_mono_lty ty]++ppr_mono_ty (HsQualTy { hst_ctxt = ctxt, hst_body = ty })+  = sep [pprLHsContextAlways ctxt, ppr_mono_lty ty]++ppr_mono_ty (HsBangTy _ b ty)   = ppr b <> ppr_mono_lty ty+ppr_mono_ty (HsRecTy _ flds)      = pprConDeclFields flds+ppr_mono_ty (HsTyVar _ prom (L _ name))+  | isPromoted prom = quote (pprPrefixOcc name)+  | otherwise       = pprPrefixOcc name+ppr_mono_ty (HsFunTy _ ty1 ty2)   = ppr_fun_ty ty1 ty2+ppr_mono_ty (HsTupleTy _ con tys)+    -- Special-case unary boxed tuples so that they are pretty-printed as+    -- `Unit x`, not `(x)`+  | [ty] <- tys+  , BoxedTuple <- std_con+  = sep [text (mkTupleStr Boxed 1), ppr_mono_lty ty]+  | otherwise+  = tupleParens std_con (pprWithCommas ppr tys)+  where std_con = case con of+                    HsUnboxedTuple -> UnboxedTuple+                    _              -> BoxedTuple+ppr_mono_ty (HsSumTy _ tys)+  = tupleParens UnboxedTuple (pprWithBars ppr tys)+ppr_mono_ty (HsKindSig _ ty kind)+  = ppr_mono_lty ty <+> dcolon <+> ppr kind+ppr_mono_ty (HsListTy _ ty)       = brackets (ppr_mono_lty ty)+ppr_mono_ty (HsIParamTy _ n ty)   = (ppr n <+> dcolon <+> ppr_mono_lty ty)+ppr_mono_ty (HsSpliceTy _ s)      = pprSplice s+ppr_mono_ty (HsExplicitListTy _ prom tys)+  | isPromoted prom = quote $ brackets (maybeAddSpace tys $ interpp'SP tys)+  | otherwise       = brackets (interpp'SP tys)+ppr_mono_ty (HsExplicitTupleTy _ tys)+    -- Special-case unary boxed tuples so that they are pretty-printed as+    -- `'Unit x`, not `'(x)`+  | [ty] <- tys+  = quote $ sep [text (mkTupleStr Boxed 1), ppr_mono_lty ty]+  | otherwise+  = quote $ parens (maybeAddSpace tys $ interpp'SP tys)+ppr_mono_ty (HsTyLit _ t)       = ppr_tylit t+ppr_mono_ty (HsWildCardTy {})   = char '_'++ppr_mono_ty (HsStarTy _ isUni)  = char (if isUni then '★' else '*')++ppr_mono_ty (HsAppTy _ fun_ty arg_ty)+  = hsep [ppr_mono_lty fun_ty, ppr_mono_lty arg_ty]+ppr_mono_ty (HsAppKindTy _ ty k)+  = ppr_mono_lty ty <+> char '@' <> ppr_mono_lty k+ppr_mono_ty (HsOpTy _ ty1 (L _ op) ty2)+  = sep [ ppr_mono_lty ty1+        , sep [pprInfixOcc op, ppr_mono_lty ty2 ] ]++ppr_mono_ty (HsParTy _ ty)+  = parens (ppr_mono_lty ty)+  -- Put the parens in where the user did+  -- But we still use the precedence stuff to add parens because+  --    toHsType doesn't put in any HsParTys, so we may still need them++ppr_mono_ty (HsDocTy _ ty doc)+  -- AZ: Should we add parens?  Should we introduce "-- ^"?+  = ppr_mono_lty ty <+> ppr (unLoc doc)+  -- we pretty print Haddock comments on types as if they were+  -- postfix operators++ppr_mono_ty (XHsType t) = ppr t++--------------------------+ppr_fun_ty :: (OutputableBndrId p)+           => LHsType (GhcPass p) -> LHsType (GhcPass p) -> SDoc+ppr_fun_ty ty1 ty2+  = let p1 = ppr_mono_lty ty1+        p2 = ppr_mono_lty ty2+    in+    sep [p1, arrow <+> p2]++--------------------------+ppr_tylit :: HsTyLit -> SDoc+ppr_tylit (HsNumTy _ i) = integer i+ppr_tylit (HsStrTy _ s) = text (show s)+++-- | @'hsTypeNeedsParens' p t@ returns 'True' if the type @t@ needs parentheses+-- under precedence @p@.+hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool+hsTypeNeedsParens p = go+  where+    go (HsForAllTy{})        = p >= funPrec+    go (HsQualTy{})          = p >= funPrec+    go (HsBangTy{})          = p > topPrec+    go (HsRecTy{})           = False+    go (HsTyVar{})           = False+    go (HsFunTy{})           = p >= funPrec+    go (HsTupleTy{})         = False+    go (HsSumTy{})           = False+    go (HsKindSig{})         = p >= sigPrec+    go (HsListTy{})          = False+    go (HsIParamTy{})        = p > topPrec+    go (HsSpliceTy{})        = False+    go (HsExplicitListTy{})  = False+    go (HsExplicitTupleTy{}) = False+    go (HsTyLit{})           = False+    go (HsWildCardTy{})      = False+    go (HsStarTy{})          = False+    go (HsAppTy{})           = p >= appPrec+    go (HsAppKindTy{})       = p >= appPrec+    go (HsOpTy{})            = p >= opPrec+    go (HsParTy{})           = False+    go (HsDocTy _ (L _ t) _) = go t+    go (XHsType{})           = False++maybeAddSpace :: [LHsType pass] -> SDoc -> SDoc+-- See Note [Printing promoted type constructors]+-- in IfaceType.  This code implements the same+-- logic for printing HsType+maybeAddSpace tys doc+  | (ty : _) <- tys+  , lhsTypeHasLeadingPromotionQuote ty = space <> doc+  | otherwise                          = doc++lhsTypeHasLeadingPromotionQuote :: LHsType pass -> Bool+lhsTypeHasLeadingPromotionQuote ty+  = goL ty+  where+    goL (L _ ty) = go ty++    go (HsForAllTy{})        = False+    go (HsQualTy{ hst_ctxt = ctxt, hst_body = body})+      | L _ (c:_) <- ctxt    = goL c+      | otherwise            = goL body+    go (HsBangTy{})          = False+    go (HsRecTy{})           = False+    go (HsTyVar _ p _)       = isPromoted p+    go (HsFunTy _ arg _)     = goL arg+    go (HsListTy{})          = False+    go (HsTupleTy{})         = False+    go (HsSumTy{})           = False+    go (HsOpTy _ t1 _ _)     = goL t1+    go (HsKindSig _ t _)     = goL t+    go (HsIParamTy{})        = False+    go (HsSpliceTy{})        = False+    go (HsExplicitListTy _ p _) = isPromoted p+    go (HsExplicitTupleTy{}) = True+    go (HsTyLit{})           = False+    go (HsWildCardTy{})      = False+    go (HsStarTy{})          = False+    go (HsAppTy _ t _)       = goL t+    go (HsAppKindTy _ t _)   = goL t+    go (HsParTy{})           = False+    go (HsDocTy _ t _)       = goL t+    go (XHsType{})           = False++-- | @'parenthesizeHsType' p ty@ checks if @'hsTypeNeedsParens' p ty@ is+-- true, and if so, surrounds @ty@ with an 'HsParTy'. Otherwise, it simply+-- returns @ty@.+parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)+parenthesizeHsType p lty@(L loc ty)+  | hsTypeNeedsParens p ty = L loc (HsParTy noExtField lty)+  | otherwise              = lty++-- | @'parenthesizeHsContext' p ctxt@ checks if @ctxt@ is a single constraint+-- @c@ such that @'hsTypeNeedsParens' p c@ is true, and if so, surrounds @c@+-- with an 'HsParTy' to form a parenthesized @ctxt@. Otherwise, it simply+-- returns @ctxt@ unchanged.+parenthesizeHsContext :: PprPrec+                      -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)+parenthesizeHsContext p lctxt@(L loc ctxt) =+  case ctxt of+    [c] -> L loc [parenthesizeHsType p c]+    _   -> lctxt -- Other contexts are already "parenthesized" by virtue of+                 -- being tuples.
+ GHC/Hs/Utils.hs view
@@ -0,0 +1,1428 @@+{-|+Module      : GHC.Hs.Utils+Description : Generic helpers for the HsSyn type.+Copyright   : (c) The University of Glasgow, 1992-2006++Here we collect a variety of helper functions that construct or+analyse HsSyn.  All these functions deal with generic HsSyn; functions+which deal with the instantiated versions are located elsewhere:++   Parameterised by          Module+   ----------------          -------------+   GhcPs/RdrName             parser/RdrHsSyn+   GhcRn/Name                rename/RnHsSyn+   GhcTc/Id                  typecheck/TcHsSyn++The @mk*@ functions attempt to construct a not-completely-useless SrcSpan+from their components, compared with the @nl*@ functions which+just attach noSrcSpan to everything.++-}++{-# LANGUAGE CPP #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns #-}++module GHC.Hs.Utils(+  -- * Terms+  mkHsPar, mkHsApp, mkHsAppType, mkHsAppTypes, mkHsCaseAlt,+  mkSimpleMatch, unguardedGRHSs, unguardedRHS,+  mkMatchGroup, mkMatch, mkPrefixFunRhs, mkHsLam, mkHsIf,+  mkHsWrap, mkLHsWrap, mkHsWrapCo, mkHsWrapCoR, mkLHsWrapCo,+  mkHsDictLet, mkHsLams,+  mkHsOpApp, mkHsDo, mkHsComp, mkHsWrapPat, mkHsWrapPatCo,+  mkLHsPar, mkHsCmdWrap, mkLHsCmdWrap,+  mkHsCmdIf,++  nlHsTyApp, nlHsTyApps, nlHsVar, nlHsDataCon,+  nlHsLit, nlHsApp, nlHsApps, nlHsSyntaxApps,+  nlHsIntLit, nlHsVarApps,+  nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList,+  mkLHsTupleExpr, mkLHsVarTuple, missingTupArg,+  typeToLHsType,++  -- * Constructing general big tuples+  -- $big_tuples+  mkChunkified, chunkify,++  -- * Bindings+  mkFunBind, mkVarBind, mkHsVarBind, mkSimpleGeneratedFunBind, mkTopFunBind,+  mkPatSynBind,+  isInfixFunBind,++  -- * Literals+  mkHsIntegral, mkHsFractional, mkHsIsString, mkHsString, mkHsStringPrimLit,++  -- * Patterns+  mkNPat, mkNPlusKPat, nlVarPat, nlLitPat, nlConVarPat, nlConVarPatName, nlConPat,+  nlConPatName, nlInfixConPat, nlNullaryConPat, nlWildConPat, nlWildPat,+  nlWildPatName, nlTuplePat, mkParPat, nlParPat,+  mkBigLHsVarTup, mkBigLHsTup, mkBigLHsVarPatTup, mkBigLHsPatTup,++  -- * Types+  mkHsAppTy, mkHsAppKindTy,+  mkLHsSigType, mkLHsSigWcType, mkClassOpSigs, mkHsSigEnv,+  nlHsAppTy, nlHsAppKindTy, nlHsTyVar, nlHsFunTy, nlHsParTy, nlHsTyConApp,++  -- * Stmts+  mkTransformStmt, mkTransformByStmt, mkBodyStmt, mkBindStmt, mkTcBindStmt,+  mkLastStmt,+  emptyTransStmt, mkGroupUsingStmt, mkGroupByUsingStmt,+  emptyRecStmt, emptyRecStmtName, emptyRecStmtId, mkRecStmt,+  unitRecStmtTc,++  -- * Template Haskell+  mkUntypedSplice, mkTypedSplice,+  mkHsQuasiQuote, unqualQuasiQuote,++  -- * Collecting binders+  isUnliftedHsBind, isBangedHsBind,++  collectLocalBinders, collectHsValBinders, collectHsBindListBinders,+  collectHsIdBinders,+  collectHsBindsBinders, collectHsBindBinders, collectMethodBinders,+  collectPatBinders, collectPatsBinders,+  collectLStmtsBinders, collectStmtsBinders,+  collectLStmtBinders, collectStmtBinders,++  hsLTyClDeclBinders, hsTyClForeignBinders,+  hsPatSynSelectors, getPatSynBinds,+  hsForeignDeclsBinders, hsGroupBinders, hsDataFamInstBinders,++  -- * Collecting implicit binders+  lStmtsImplicits, hsValBindsImplicits, lPatImplicits+  ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.Hs.Decls+import GHC.Hs.Binds+import GHC.Hs.Expr+import GHC.Hs.Pat+import GHC.Hs.Types+import GHC.Hs.Lit+import GHC.Hs.PlaceHolder+import GHC.Hs.Extension++import TcEvidence+import RdrName+import Var+import TyCoRep+import Type   ( appTyArgFlags, splitAppTys, tyConArgFlags, tyConAppNeedsKindSig )+import TysWiredIn ( unitTy )+import TcType+import DataCon+import ConLike+import Id+import Name+import NameSet hiding ( unitFV )+import NameEnv+import BasicTypes+import SrcLoc+import FastString+import Util+import Bag+import Outputable+import Constants++import Data.Either+import Data.Function+import Data.List++{-+************************************************************************+*                                                                      *+        Some useful helpers for constructing syntax+*                                                                      *+************************************************************************++These functions attempt to construct a not-completely-useless 'SrcSpan'+from their components, compared with the @nl*@ functions below which+just attach 'noSrcSpan' to everything.+-}++-- | e => (e)+mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+mkHsPar e = cL (getLoc e) (HsPar noExtField e)++mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p)))+              -> [LPat (GhcPass p)] -> Located (body (GhcPass p))+              -> LMatch (GhcPass p) (Located (body (GhcPass p)))+mkSimpleMatch ctxt pats rhs+  = cL loc $+    Match { m_ext = noExtField, m_ctxt = ctxt, m_pats = pats+          , m_grhss = unguardedGRHSs rhs }+  where+    loc = case pats of+                []      -> getLoc rhs+                (pat:_) -> combineSrcSpans (getLoc pat) (getLoc rhs)++unguardedGRHSs :: Located (body (GhcPass p))+               -> GRHSs (GhcPass p) (Located (body (GhcPass p)))+unguardedGRHSs rhs@(dL->L loc _)+  = GRHSs noExtField (unguardedRHS loc rhs) (noLoc emptyLocalBinds)++unguardedRHS :: SrcSpan -> Located (body (GhcPass p))+             -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))]+unguardedRHS loc rhs = [cL loc (GRHS noExtField [] rhs)]++mkMatchGroup :: (XMG name (Located (body name)) ~ NoExtField)+             => Origin -> [LMatch name (Located (body name))]+             -> MatchGroup name (Located (body name))+mkMatchGroup origin matches = MG { mg_ext = noExtField+                                 , mg_alts = mkLocatedList matches+                                 , mg_origin = origin }++mkLocatedList ::  [Located a] -> Located [Located a]+mkLocatedList [] = noLoc []+mkLocatedList ms = cL (combineLocs (head ms) (last ms)) ms++mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+mkHsApp e1 e2 = addCLoc e1 e2 (HsApp noExtField e1 e2)++mkHsAppType :: (NoGhcTc (GhcPass id) ~ GhcRn)+            => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id)+mkHsAppType e t = addCLoc e t_body (HsAppType noExtField e paren_wct)+  where+    t_body    = hswc_body t+    paren_wct = t { hswc_body = parenthesizeHsType appPrec t_body }++mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn+mkHsAppTypes = foldl' mkHsAppType++mkHsLam :: (XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExtField) =>+  [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)+mkHsLam pats body = mkHsPar (cL (getLoc body) (HsLam noExtField matches))+  where+    matches = mkMatchGroup Generated+                           [mkSimpleMatch LambdaExpr pats' body]+    pats' = map (parenthesizePat appPrec) pats++mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc+mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars+                                       <.> mkWpLams dicts) expr++-- |A simple case alternative with a single pattern, no binds, no guards;+-- pre-typechecking+mkHsCaseAlt :: LPat (GhcPass p) -> (Located (body (GhcPass p)))+            -> LMatch (GhcPass p) (Located (body (GhcPass p)))+mkHsCaseAlt pat expr+  = mkSimpleMatch CaseAlt [pat] expr++nlHsTyApp :: IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id)+nlHsTyApp fun_id tys+  = noLoc (mkHsWrap (mkWpTyApps tys) (HsVar noExtField (noLoc fun_id)))++nlHsTyApps :: IdP (GhcPass id) -> [Type] -> [LHsExpr (GhcPass id)]+           -> LHsExpr (GhcPass id)+nlHsTyApps fun_id tys xs = foldl' nlHsApp (nlHsTyApp fun_id tys) xs++--------- Adding parens ---------+-- | Wrap in parens if (hsExprNeedsParens appPrec) says it needs them+-- So   'f x'  becomes '(f x)', but '3' stays as '3'+mkLHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+mkLHsPar le@(dL->L loc e)+  | hsExprNeedsParens appPrec e = cL loc (HsPar noExtField le)+  | otherwise                   = le++mkParPat :: LPat (GhcPass name) -> LPat (GhcPass name)+mkParPat lp@(dL->L loc p)+  | patNeedsParens appPrec p = cL loc (ParPat noExtField lp)+  | otherwise                = lp++nlParPat :: LPat (GhcPass name) -> LPat (GhcPass name)+nlParPat p = noLoc (ParPat noExtField p)++-------------------------------+-- These are the bits of syntax that contain rebindable names+-- See RnEnv.lookupSyntaxName++mkHsIntegral   :: IntegralLit -> HsOverLit GhcPs+mkHsFractional :: FractionalLit -> HsOverLit GhcPs+mkHsIsString   :: SourceText -> FastString -> HsOverLit GhcPs+mkHsDo         :: HsStmtContext Name -> [ExprLStmt GhcPs] -> HsExpr GhcPs+mkHsComp       :: HsStmtContext Name -> [ExprLStmt GhcPs] -> LHsExpr GhcPs+               -> HsExpr GhcPs++mkNPat      :: Located (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs)+            -> Pat GhcPs+mkNPlusKPat :: Located RdrName -> Located (HsOverLit GhcPs) -> Pat GhcPs++mkLastStmt :: Located (bodyR (GhcPass idR))+           -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))+mkBodyStmt :: Located (bodyR GhcPs)+           -> StmtLR (GhcPass idL) GhcPs (Located (bodyR GhcPs))+mkBindStmt :: (XBindStmt (GhcPass idL) (GhcPass idR)+                         (Located (bodyR (GhcPass idR))) ~ NoExtField)+           => LPat (GhcPass idL) -> Located (bodyR (GhcPass idR))+           -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))+mkTcBindStmt :: LPat GhcTc -> Located (bodyR GhcTc)+             -> StmtLR GhcTc GhcTc (Located (bodyR GhcTc))++emptyRecStmt     :: StmtLR (GhcPass idL) GhcPs bodyR+emptyRecStmtName :: StmtLR GhcRn GhcRn bodyR+emptyRecStmtId   :: StmtLR GhcTc GhcTc bodyR+mkRecStmt        :: [LStmtLR (GhcPass idL) GhcPs bodyR]+                 -> StmtLR (GhcPass idL) GhcPs bodyR+++mkHsIntegral     i  = OverLit noExtField (HsIntegral       i) noExpr+mkHsFractional   f  = OverLit noExtField (HsFractional     f) noExpr+mkHsIsString src s  = OverLit noExtField (HsIsString   src s) noExpr++mkHsDo ctxt stmts = HsDo noExtField ctxt (mkLocatedList stmts)+mkHsComp ctxt stmts expr = mkHsDo ctxt (stmts ++ [last_stmt])+  where+    last_stmt = cL (getLoc expr) $ mkLastStmt expr++mkHsIf :: LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)+       -> HsExpr (GhcPass p)+mkHsIf c a b = HsIf noExtField (Just noSyntaxExpr) c a b++mkHsCmdIf :: LHsExpr (GhcPass p) -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p)+       -> HsCmd (GhcPass p)+mkHsCmdIf c a b = HsCmdIf noExtField (Just noSyntaxExpr) c a b++mkNPat lit neg     = NPat noExtField lit neg noSyntaxExpr+mkNPlusKPat id lit+  = NPlusKPat noExtField id lit (unLoc lit) noSyntaxExpr noSyntaxExpr++mkTransformStmt    :: [ExprLStmt GhcPs] -> LHsExpr GhcPs+                   -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)+mkTransformByStmt  :: [ExprLStmt GhcPs] -> LHsExpr GhcPs+                   -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)+mkGroupUsingStmt   :: [ExprLStmt GhcPs] -> LHsExpr GhcPs+                   -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)+mkGroupByUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs+                   -> LHsExpr GhcPs+                   -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)++emptyTransStmt :: StmtLR GhcPs GhcPs (LHsExpr GhcPs)+emptyTransStmt = TransStmt { trS_ext = noExtField+                           , trS_form = panic "emptyTransStmt: form"+                           , trS_stmts = [], trS_bndrs = []+                           , trS_by = Nothing, trS_using = noLoc noExpr+                           , trS_ret = noSyntaxExpr, trS_bind = noSyntaxExpr+                           , trS_fmap = noExpr }+mkTransformStmt    ss u   = emptyTransStmt { trS_form = ThenForm,  trS_stmts = ss, trS_using = u }+mkTransformByStmt  ss u b = emptyTransStmt { trS_form = ThenForm,  trS_stmts = ss, trS_using = u, trS_by = Just b }+mkGroupUsingStmt   ss u   = emptyTransStmt { trS_form = GroupForm, trS_stmts = ss, trS_using = u }+mkGroupByUsingStmt ss b u = emptyTransStmt { trS_form = GroupForm, trS_stmts = ss, trS_using = u, trS_by = Just b }++mkLastStmt body = LastStmt noExtField body False noSyntaxExpr+mkBodyStmt body+  = BodyStmt noExtField body noSyntaxExpr noSyntaxExpr+mkBindStmt pat body+  = BindStmt noExtField pat body noSyntaxExpr noSyntaxExpr+mkTcBindStmt pat body = BindStmt unitTy pat body noSyntaxExpr noSyntaxExpr+  -- don't use placeHolderTypeTc above, because that panics during zonking++emptyRecStmt' :: forall idL idR body.+                 XRecStmt (GhcPass idL) (GhcPass idR) body+              -> StmtLR (GhcPass idL) (GhcPass idR) body+emptyRecStmt' tyVal =+   RecStmt+     { recS_stmts = [], recS_later_ids = []+     , recS_rec_ids = []+     , recS_ret_fn = noSyntaxExpr+     , recS_mfix_fn = noSyntaxExpr+     , recS_bind_fn = noSyntaxExpr+     , recS_ext = tyVal }++unitRecStmtTc :: RecStmtTc+unitRecStmtTc = RecStmtTc { recS_bind_ty = unitTy+                          , recS_later_rets = []+                          , recS_rec_rets = []+                          , recS_ret_ty = unitTy }++emptyRecStmt     = emptyRecStmt' noExtField+emptyRecStmtName = emptyRecStmt' noExtField+emptyRecStmtId   = emptyRecStmt' unitRecStmtTc+                                        -- a panic might trigger during zonking+mkRecStmt stmts  = emptyRecStmt { recS_stmts = stmts }++-------------------------------+-- | A useful function for building @OpApps@.  The operator is always a+-- variable, and we don't know the fixity yet.+mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs+mkHsOpApp e1 op e2 = OpApp noExtField e1 (noLoc (HsVar noExtField (noLoc op))) e2++unqualSplice :: RdrName+unqualSplice = mkRdrUnqual (mkVarOccFS (fsLit "splice"))++mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs+mkUntypedSplice hasParen e = HsUntypedSplice noExtField hasParen unqualSplice e++mkTypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs+mkTypedSplice hasParen e = HsTypedSplice noExtField hasParen unqualSplice e++mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs+mkHsQuasiQuote quoter span quote+  = HsQuasiQuote noExtField unqualSplice quoter span quote++unqualQuasiQuote :: RdrName+unqualQuasiQuote = mkRdrUnqual (mkVarOccFS (fsLit "quasiquote"))+                -- A name (uniquified later) to+                -- identify the quasi-quote++mkHsString :: String -> HsLit (GhcPass p)+mkHsString s = HsString NoSourceText (mkFastString s)++mkHsStringPrimLit :: FastString -> HsLit (GhcPass p)+mkHsStringPrimLit fs = HsStringPrim NoSourceText (bytesFS fs)+++{-+************************************************************************+*                                                                      *+        Constructing syntax with no location info+*                                                                      *+************************************************************************+-}++nlHsVar :: IdP (GhcPass id) -> LHsExpr (GhcPass id)+nlHsVar n = noLoc (HsVar noExtField (noLoc n))++-- | NB: Only for LHsExpr **Id**+nlHsDataCon :: DataCon -> LHsExpr GhcTc+nlHsDataCon con = noLoc (HsConLikeOut noExtField (RealDataCon con))++nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)+nlHsLit n = noLoc (HsLit noExtField n)++nlHsIntLit :: Integer -> LHsExpr (GhcPass p)+nlHsIntLit n = noLoc (HsLit noExtField (HsInt noExtField (mkIntegralLit n)))++nlVarPat :: IdP (GhcPass id) -> LPat (GhcPass id)+nlVarPat n = noLoc (VarPat noExtField (noLoc n))++nlLitPat :: HsLit GhcPs -> LPat GhcPs+nlLitPat l = noLoc (LitPat noExtField l)++nlHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+nlHsApp f x = noLoc (HsApp noExtField f (mkLHsPar x))++nlHsSyntaxApps :: SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)]+               -> LHsExpr (GhcPass id)+nlHsSyntaxApps (SyntaxExpr { syn_expr      = fun+                           , syn_arg_wraps = arg_wraps+                           , syn_res_wrap  = res_wrap }) args+  | [] <- arg_wraps   -- in the noSyntaxExpr case+  = ASSERT( isIdHsWrapper res_wrap )+    foldl' nlHsApp (noLoc fun) args++  | otherwise+  = mkLHsWrap res_wrap (foldl' nlHsApp (noLoc fun) (zipWithEqual "nlHsSyntaxApps"+                                                     mkLHsWrap arg_wraps args))++nlHsApps :: IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)+nlHsApps f xs = foldl' nlHsApp (nlHsVar f) xs++nlHsVarApps :: IdP (GhcPass id) -> [IdP (GhcPass id)] -> LHsExpr (GhcPass id)+nlHsVarApps f xs = noLoc (foldl' mk (HsVar noExtField (noLoc f))+                                               (map ((HsVar noExtField) . noLoc) xs))+                 where+                   mk f a = HsApp noExtField (noLoc f) (noLoc a)++nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs+nlConVarPat con vars = nlConPat con (map nlVarPat vars)++nlConVarPatName :: Name -> [Name] -> LPat GhcRn+nlConVarPatName con vars = nlConPatName con (map nlVarPat vars)++nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs+nlInfixConPat con l r = noLoc (ConPatIn (noLoc con)+                              (InfixCon (parenthesizePat opPrec l)+                                        (parenthesizePat opPrec r)))++nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs+nlConPat con pats =+  noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))++nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn+nlConPatName con pats =+  noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))++nlNullaryConPat :: IdP (GhcPass p) -> LPat (GhcPass p)+nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon []))++nlWildConPat :: DataCon -> LPat GhcPs+nlWildConPat con = noLoc (ConPatIn (noLoc (getRdrName con))+                         (PrefixCon (replicate (dataConSourceArity con)+                                             nlWildPat)))++-- | Wildcard pattern - after parsing+nlWildPat :: LPat GhcPs+nlWildPat  = noLoc (WildPat noExtField )++-- | Wildcard pattern - after renaming+nlWildPatName :: LPat GhcRn+nlWildPatName  = noLoc (WildPat noExtField )++nlHsDo :: HsStmtContext Name -> [LStmt GhcPs (LHsExpr GhcPs)]+       -> LHsExpr GhcPs+nlHsDo ctxt stmts = noLoc (mkHsDo ctxt stmts)++nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs+nlHsOpApp e1 op e2 = noLoc (mkHsOpApp e1 op e2)++nlHsLam  :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs+nlHsPar  :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+nlHsIf   :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+         -> LHsExpr (GhcPass id)+nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)]+         -> LHsExpr GhcPs+nlList   :: [LHsExpr GhcPs] -> LHsExpr GhcPs++nlHsLam match          = noLoc (HsLam noExtField (mkMatchGroup Generated [match]))+nlHsPar e              = noLoc (HsPar noExtField e)++-- | Note [Rebindable nlHsIf]+-- nlHsIf should generate if-expressions which are NOT subject to+-- RebindableSyntax, so the first field of HsIf is Nothing. (#12080)+nlHsIf cond true false = noLoc (HsIf noExtField Nothing cond true false)++nlHsCase expr matches+  = noLoc (HsCase noExtField expr (mkMatchGroup Generated matches))+nlList exprs          = noLoc (ExplicitList noExtField Nothing exprs)++nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)+nlHsTyVar :: IdP (GhcPass p)                            -> LHsType (GhcPass p)+nlHsFunTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)+nlHsParTy :: LHsType (GhcPass p)                        -> LHsType (GhcPass p)++nlHsAppTy f t = noLoc (HsAppTy noExtField f (parenthesizeHsType appPrec t))+nlHsTyVar x   = noLoc (HsTyVar noExtField NotPromoted (noLoc x))+nlHsFunTy a b = noLoc (HsFunTy noExtField (parenthesizeHsType funPrec a) b)+nlHsParTy t   = noLoc (HsParTy noExtField t)++nlHsTyConApp :: IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)+nlHsTyConApp tycon tys  = foldl' nlHsAppTy (nlHsTyVar tycon) tys++nlHsAppKindTy ::+  LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)+nlHsAppKindTy f k+  = noLoc (HsAppKindTy noSrcSpan f (parenthesizeHsType appPrec k))++{-+Tuples.  All these functions are *pre-typechecker* because they lack+types on the tuple.+-}++mkLHsTupleExpr :: [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a)+-- Makes a pre-typechecker boxed tuple, deals with 1 case+mkLHsTupleExpr [e] = e+mkLHsTupleExpr es+  = noLoc $ ExplicitTuple noExtField (map (noLoc . (Present noExtField)) es) Boxed++mkLHsVarTuple :: [IdP (GhcPass a)] -> LHsExpr (GhcPass a)+mkLHsVarTuple ids  = mkLHsTupleExpr (map nlHsVar ids)++nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs+nlTuplePat pats box = noLoc (TuplePat noExtField pats box)++missingTupArg :: HsTupArg GhcPs+missingTupArg = Missing noExtField++mkLHsPatTup :: [LPat GhcRn] -> LPat GhcRn+mkLHsPatTup []     = noLoc $ TuplePat noExtField [] Boxed+mkLHsPatTup [lpat] = lpat+mkLHsPatTup lpats  = cL (getLoc (head lpats)) $ TuplePat noExtField lpats Boxed++-- | The Big equivalents for the source tuple expressions+mkBigLHsVarTup :: [IdP (GhcPass id)] -> LHsExpr (GhcPass id)+mkBigLHsVarTup ids = mkBigLHsTup (map nlHsVar ids)++mkBigLHsTup :: [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)+mkBigLHsTup = mkChunkified mkLHsTupleExpr++-- | The Big equivalents for the source tuple patterns+mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn+mkBigLHsVarPatTup bs = mkBigLHsPatTup (map nlVarPat bs)++mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn+mkBigLHsPatTup = mkChunkified mkLHsPatTup++-- $big_tuples+-- #big_tuples#+--+-- GHCs built in tuples can only go up to 'mAX_TUPLE_SIZE' in arity, but+-- we might concievably want to build such a massive tuple as part of the+-- output of a desugaring stage (notably that for list comprehensions).+--+-- We call tuples above this size \"big tuples\", and emulate them by+-- creating and pattern matching on >nested< tuples that are expressible+-- by GHC.+--+-- Nesting policy: it's better to have a 2-tuple of 10-tuples (3 objects)+-- than a 10-tuple of 2-tuples (11 objects), so we want the leaves of any+-- construction to be big.+--+-- If you just use the 'mkBigCoreTup', 'mkBigCoreVarTupTy', 'mkTupleSelector'+-- and 'mkTupleCase' functions to do all your work with tuples you should be+-- fine, and not have to worry about the arity limitation at all.++-- | Lifts a \"small\" constructor into a \"big\" constructor by recursive decompositon+mkChunkified :: ([a] -> a)      -- ^ \"Small\" constructor function, of maximum input arity 'mAX_TUPLE_SIZE'+             -> [a]             -- ^ Possible \"big\" list of things to construct from+             -> a               -- ^ Constructed thing made possible by recursive decomposition+mkChunkified small_tuple as = mk_big_tuple (chunkify as)+  where+        -- Each sub-list is short enough to fit in a tuple+    mk_big_tuple [as] = small_tuple as+    mk_big_tuple as_s = mk_big_tuple (chunkify (map small_tuple as_s))++chunkify :: [a] -> [[a]]+-- ^ Split a list into lists that are small enough to have a corresponding+-- tuple arity. The sub-lists of the result all have length <= 'mAX_TUPLE_SIZE'+-- But there may be more than 'mAX_TUPLE_SIZE' sub-lists+chunkify xs+  | n_xs <= mAX_TUPLE_SIZE = [xs]+  | otherwise              = split xs+  where+    n_xs     = length xs+    split [] = []+    split xs = take mAX_TUPLE_SIZE xs : split (drop mAX_TUPLE_SIZE xs)++{-+************************************************************************+*                                                                      *+        LHsSigType and LHsSigWcType+*                                                                      *+********************************************************************* -}++mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs+mkLHsSigType ty = mkHsImplicitBndrs ty++mkLHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs+mkLHsSigWcType ty = mkHsWildCardBndrs (mkHsImplicitBndrs ty)++mkHsSigEnv :: forall a. (LSig GhcRn -> Maybe ([Located Name], a))+                     -> [LSig GhcRn]+                     -> NameEnv a+mkHsSigEnv get_info sigs+  = mkNameEnv          (mk_pairs ordinary_sigs)+   `extendNameEnvList` (mk_pairs gen_dm_sigs)+   -- The subtlety is this: in a class decl with a+   -- default-method signature as well as a method signature+   -- we want the latter to win (#12533)+   --    class C x where+   --       op :: forall a . x a -> x a+   --       default op :: forall b . x b -> x b+   --       op x = ...(e :: b -> b)...+   -- The scoped type variables of the 'default op', namely 'b',+   -- scope over the code for op.   The 'forall a' does not!+   -- This applies both in the renamer and typechecker, both+   -- of which use this function+  where+    (gen_dm_sigs, ordinary_sigs) = partition is_gen_dm_sig sigs+    is_gen_dm_sig (dL->L _ (ClassOpSig _ True _ _)) = True+    is_gen_dm_sig _                                 = False++    mk_pairs :: [LSig GhcRn] -> [(Name, a)]+    mk_pairs sigs = [ (n,a) | Just (ns,a) <- map get_info sigs+                            , (dL->L _ n) <- ns ]++mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]+-- ^ Convert TypeSig to ClassOpSig+-- The former is what is parsed, but the latter is+-- what we need in class/instance declarations+mkClassOpSigs sigs+  = map fiddle sigs+  where+    fiddle (dL->L loc (TypeSig _ nms ty))+      = cL loc (ClassOpSig noExtField False nms (dropWildCards ty))+    fiddle sig = sig++typeToLHsType :: Type -> LHsType GhcPs+-- ^ Converting a Type to an HsType RdrName+-- This is needed to implement GeneralizedNewtypeDeriving.+--+-- Note that we use 'getRdrName' extensively, which+-- generates Exact RdrNames rather than strings.+typeToLHsType ty+  = go ty+  where+    go :: Type -> LHsType GhcPs+    go ty@(FunTy { ft_af = af, ft_arg = arg, ft_res = res })+      = case af of+          VisArg   -> nlHsFunTy (go arg) (go res)+          InvisArg | (theta, tau) <- tcSplitPhiTy ty+                   -> noLoc (HsQualTy { hst_ctxt = noLoc (map go theta)+                                      , hst_xqual = noExtField+                                      , hst_body = go tau })++    go ty@(ForAllTy (Bndr _ argf) _)+      | (tvs, tau) <- tcSplitForAllTysSameVis argf ty+      = noLoc (HsForAllTy { hst_fvf = argToForallVisFlag argf+                          , hst_bndrs = map go_tv tvs+                          , hst_xforall = noExtField+                          , hst_body = go tau })+    go (TyVarTy tv)         = nlHsTyVar (getRdrName tv)+    go (LitTy (NumTyLit n))+      = noLoc $ HsTyLit noExtField (HsNumTy NoSourceText n)+    go (LitTy (StrTyLit s))+      = noLoc $ HsTyLit noExtField (HsStrTy NoSourceText s)+    go ty@(TyConApp tc args)+      | tyConAppNeedsKindSig True tc (length args)+        -- We must produce an explicit kind signature here to make certain+        -- programs kind-check. See Note [Kind signatures in typeToLHsType].+      = nlHsParTy $ noLoc $ HsKindSig noExtField ty' (go (tcTypeKind ty))+      | otherwise = ty'+       where+        ty' :: LHsType GhcPs+        ty' = go_app (nlHsTyVar (getRdrName tc)) args (tyConArgFlags tc args)+    go ty@(AppTy {})        = go_app (go head) args (appTyArgFlags head args)+      where+        head :: Type+        args :: [Type]+        (head, args) = splitAppTys ty+    go (CastTy ty _)        = go ty+    go (CoercionTy co)      = pprPanic "toLHsSigWcType" (ppr co)++         -- Source-language types have _invisible_ kind arguments,+         -- so we must remove them here (#8563)++    go_app :: LHsType GhcPs -- The type being applied+           -> [Type]        -- The argument types+           -> [ArgFlag]     -- The argument types' visibilities+           -> LHsType GhcPs+    go_app head args arg_flags =+      foldl' (\f (arg, flag) ->+               let arg' = go arg in+               case flag of+                 Inferred  -> f+                 Specified -> f `nlHsAppKindTy` arg'+                 Required  -> f `nlHsAppTy`     arg')+             head (zip args arg_flags)++    go_tv :: TyVar -> LHsTyVarBndr GhcPs+    go_tv tv = noLoc $ KindedTyVar noExtField (noLoc (getRdrName tv))+                                   (go (tyVarKind tv))++{-+Note [Kind signatures in typeToLHsType]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There are types that typeToLHsType can produce which require explicit kind+signatures in order to kind-check. Here is an example from #14579:++  -- type P :: forall {k} {t :: k}. Proxy t+  type P = 'Proxy++  -- type Wat :: forall a. Proxy a -> *+  newtype Wat (x :: Proxy (a :: Type)) = MkWat (Maybe a)+    deriving Eq++  -- type Wat2 :: forall {a}. Proxy a -> *+  type Wat2 = Wat++  -- type Glurp :: * -> *+  newtype Glurp a = MkGlurp (Wat2 (P :: Proxy a))+    deriving Eq++The derived Eq instance for Glurp (without any kind signatures) would be:++  instance Eq a => Eq (Glurp a) where+    (==) = coerce @(Wat2 P  -> Wat2 P  -> Bool)+                  @(Glurp a -> Glurp a -> Bool)+                  (==) :: Glurp a -> Glurp a -> Bool++(Where the visible type applications use types produced by typeToLHsType.)++The type P (in Wat2 P) has an underspecified kind, so we must ensure that+typeToLHsType ascribes it with its kind: Wat2 (P :: Proxy a). To accomplish+this, whenever we see an application of a tycon to some arguments, we use+the tyConAppNeedsKindSig function to determine if it requires an explicit kind+signature to resolve some ambiguity. (See Note+Note [When does a tycon application need an explicit kind signature?] for a+more detailed explanation of how this works.)++Note that we pass True to tyConAppNeedsKindSig since we are generated code with+visible kind applications, so even specified arguments count towards injective+positions in the kind of the tycon.+-}++{- *********************************************************************+*                                                                      *+    --------- HsWrappers: type args, dict args, casts ---------+*                                                                      *+********************************************************************* -}++mkLHsWrap :: HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+mkLHsWrap co_fn (dL->L loc e) = cL loc (mkHsWrap co_fn e)++-- | Avoid (HsWrap co (HsWrap co' _)).+-- See Note [Detecting forced eta expansion] in DsExpr+mkHsWrap :: HsWrapper -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)+mkHsWrap co_fn e | isIdHsWrapper co_fn = e+mkHsWrap co_fn (HsWrap _ co_fn' e)     = mkHsWrap (co_fn <.> co_fn') e+mkHsWrap co_fn e                       = HsWrap noExtField co_fn e++mkHsWrapCo :: TcCoercionN   -- A Nominal coercion  a ~N b+           -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)+mkHsWrapCo co e = mkHsWrap (mkWpCastN co) e++mkHsWrapCoR :: TcCoercionR   -- A Representational coercion  a ~R b+            -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)+mkHsWrapCoR co e = mkHsWrap (mkWpCastR co) e++mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+mkLHsWrapCo co (dL->L loc e) = cL loc (mkHsWrapCo co e)++mkHsCmdWrap :: HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p)+mkHsCmdWrap w cmd | isIdHsWrapper w = cmd+                  | otherwise       = HsCmdWrap noExtField w cmd++mkLHsCmdWrap :: HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p)+mkLHsCmdWrap w (dL->L loc c) = cL loc (mkHsCmdWrap w c)++mkHsWrapPat :: HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)+mkHsWrapPat co_fn p ty | isIdHsWrapper co_fn = p+                       | otherwise           = CoPat noExtField co_fn p ty++mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)+mkHsWrapPatCo co pat ty | isTcReflCo co = pat+                        | otherwise    = CoPat noExtField (mkWpCastN co) pat ty++mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc+mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr++{-+l+************************************************************************+*                                                                      *+                Bindings; with a location at the top+*                                                                      *+************************************************************************+-}++mkFunBind :: Origin -> Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)]+          -> HsBind GhcPs+-- ^ Not infix, with place holders for coercion and free vars+mkFunBind origin fn ms+  = FunBind { fun_id = fn+            , fun_matches = mkMatchGroup origin ms+            , fun_co_fn = idHsWrapper+            , fun_ext = noExtField+            , fun_tick = [] }++mkTopFunBind :: Origin -> Located Name -> [LMatch GhcRn (LHsExpr GhcRn)]+             -> HsBind GhcRn+-- ^ In Name-land, with empty bind_fvs+mkTopFunBind origin fn ms = FunBind { fun_id = fn+                                    , fun_matches = mkMatchGroup origin ms+                                    , fun_co_fn = idHsWrapper+                                    , fun_ext  = emptyNameSet -- NB: closed+                                                              --     binding+                                    , fun_tick = [] }++mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs+mkHsVarBind loc var rhs = mkSimpleGeneratedFunBind loc var [] rhs++mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)+mkVarBind var rhs = cL (getLoc rhs) $+                    VarBind { var_ext = noExtField,+                              var_id = var, var_rhs = rhs, var_inline = False }++mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName)+             -> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs+mkPatSynBind name details lpat dir = PatSynBind noExtField psb+  where+    psb = PSB{ psb_ext = noExtField+             , psb_id = name+             , psb_args = details+             , psb_def = lpat+             , psb_dir = dir }++-- |If any of the matches in the 'FunBind' are infix, the 'FunBind' is+-- considered infix.+isInfixFunBind :: HsBindLR id1 id2 -> Bool+isInfixFunBind (FunBind _ _ (MG _ matches _) _ _)+  = any (isInfixMatch . unLoc) (unLoc matches)+isInfixFunBind _ = False+++------------+-- | Convenience function using 'mkFunBind'.+-- This is for generated bindings only, do not use for user-written code.+mkSimpleGeneratedFunBind :: SrcSpan -> RdrName -> [LPat GhcPs]+                -> LHsExpr GhcPs -> LHsBind GhcPs+mkSimpleGeneratedFunBind loc fun pats expr+  = cL loc $ mkFunBind Generated (cL loc fun)+              [mkMatch (mkPrefixFunRhs (cL loc fun)) pats expr+                       (noLoc emptyLocalBinds)]++-- | Make a prefix, non-strict function 'HsMatchContext'+mkPrefixFunRhs :: Located id -> HsMatchContext id+mkPrefixFunRhs n = FunRhs { mc_fun = n+                          , mc_fixity = Prefix+                          , mc_strictness = NoSrcStrict }++------------+mkMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p)))+        -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p)+        -> Located (HsLocalBinds (GhcPass p))+        -> LMatch (GhcPass p) (LHsExpr (GhcPass p))+mkMatch ctxt pats expr lbinds+  = noLoc (Match { m_ext   = noExtField+                 , m_ctxt  = ctxt+                 , m_pats  = map paren pats+                 , m_grhss = GRHSs noExtField (unguardedRHS noSrcSpan expr) lbinds })+  where+    paren lp@(dL->L l p)+      | patNeedsParens appPrec p = cL l (ParPat noExtField lp)+      | otherwise                = lp++{-+************************************************************************+*                                                                      *+        Collecting binders+*                                                                      *+************************************************************************++Get all the binders in some HsBindGroups, IN THE ORDER OF APPEARANCE. eg.++...+where+  (x, y) = ...+  f i j  = ...+  [a, b] = ...++it should return [x, y, f, a, b] (remember, order important).++Note [Collect binders only after renaming]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+These functions should only be used on HsSyn *after* the renamer,+to return a [Name] or [Id].  Before renaming the record punning+and wild-card mechanism makes it hard to know what is bound.+So these functions should not be applied to (HsSyn RdrName)++Note [Unlifted id check in isUnliftedHsBind]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The function isUnliftedHsBind is used to complain if we make a top-level+binding for a variable of unlifted type.++Such a binding is illegal if the top-level binding would be unlifted;+but also if the local letrec generated by desugaring AbsBinds would be.+E.g.+      f :: Num a => (# a, a #)+      g :: Num a => a -> a+      f = ...g...+      g = ...g...++The top-level bindings for f,g are not unlifted (because of the Num a =>),+but the local, recursive, monomorphic bindings are:++      t = /\a \(d:Num a).+         letrec fm :: (# a, a #) = ...g...+                gm :: a -> a = ...f...+         in (fm, gm)++Here the binding for 'fm' is illegal.  So generally we check the abe_mono types.++BUT we have a special case when abs_sig is true;+  see Note [The abs_sig field of AbsBinds] in GHC.Hs.Binds+-}++----------------- Bindings --------------------------++-- | Should we treat this as an unlifted bind? This will be true for any+-- bind that binds an unlifted variable, but we must be careful around+-- AbsBinds. See Note [Unlifted id check in isUnliftedHsBind]. For usage+-- information, see Note [Strict binds check] is DsBinds.+isUnliftedHsBind :: HsBind GhcTc -> Bool  -- works only over typechecked binds+isUnliftedHsBind bind+  | AbsBinds { abs_exports = exports, abs_sig = has_sig } <- bind+  = if has_sig+    then any (is_unlifted_id . abe_poly) exports+    else any (is_unlifted_id . abe_mono) exports+    -- If has_sig is True we wil never generate a binding for abe_mono,+    -- so we don't need to worry about it being unlifted. The abe_poly+    -- binding might not be: e.g. forall a. Num a => (# a, a #)++  | otherwise+  = any is_unlifted_id (collectHsBindBinders bind)+  where+    is_unlifted_id id = isUnliftedType (idType id)++-- | Is a binding a strict variable or pattern bind (e.g. @!x = ...@)?+isBangedHsBind :: HsBind GhcTc -> Bool+isBangedHsBind (AbsBinds { abs_binds = binds })+  = anyBag (isBangedHsBind . unLoc) binds+isBangedHsBind (FunBind {fun_matches = matches})+  | [dL->L _ match] <- unLoc $ mg_alts matches+  , FunRhs{mc_strictness = SrcStrict} <- m_ctxt match+  = True+isBangedHsBind (PatBind {pat_lhs = pat})+  = isBangedLPat pat+isBangedHsBind _+  = False++collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR)+                    -> [IdP (GhcPass idL)]+collectLocalBinders (HsValBinds _ binds) = collectHsIdBinders binds+                                         -- No pattern synonyms here+collectLocalBinders (HsIPBinds {})      = []+collectLocalBinders (EmptyLocalBinds _) = []+collectLocalBinders (XHsLocalBindsLR _) = []++collectHsIdBinders, collectHsValBinders+  :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]+-- ^ Collect Id binders only, or Ids + pattern synonyms, respectively+collectHsIdBinders  = collect_hs_val_binders True+collectHsValBinders = collect_hs_val_binders False++collectHsBindBinders :: (SrcSpanLess (LPat p) ~ Pat p, HasSrcSpan (LPat p))=>+                        HsBindLR p idR -> [IdP p]+-- ^ Collect both Ids and pattern-synonym binders+collectHsBindBinders b = collect_bind False b []++collectHsBindsBinders :: LHsBindsLR (GhcPass p) idR -> [IdP (GhcPass p)]+collectHsBindsBinders binds = collect_binds False binds []++collectHsBindListBinders :: [LHsBindLR (GhcPass p) idR] -> [IdP (GhcPass p)]+-- ^ Same as collectHsBindsBinders, but works over a list of bindings+collectHsBindListBinders = foldr (collect_bind False . unLoc) []++collect_hs_val_binders :: Bool -> HsValBindsLR (GhcPass idL) (GhcPass idR)+                       -> [IdP (GhcPass idL)]+collect_hs_val_binders ps (ValBinds _ binds _) = collect_binds ps binds []+collect_hs_val_binders ps (XValBindsLR (NValBinds binds _))+  = collect_out_binds ps binds++collect_out_binds :: Bool -> [(RecFlag, LHsBinds (GhcPass p))] ->+                     [IdP (GhcPass p)]+collect_out_binds ps = foldr (collect_binds ps . snd) []++collect_binds :: Bool -> LHsBindsLR (GhcPass p) idR ->+                 [IdP (GhcPass p)] -> [IdP (GhcPass p)]+-- ^ Collect Ids, or Ids + pattern synonyms, depending on boolean flag+collect_binds ps binds acc = foldr (collect_bind ps . unLoc) acc binds++collect_bind :: (SrcSpanLess (LPat p) ~ Pat p , HasSrcSpan (LPat p)) =>+                Bool -> HsBindLR p idR -> [IdP p] -> [IdP p]+collect_bind _ (PatBind { pat_lhs = p })           acc = collect_lpat p acc+collect_bind _ (FunBind { fun_id = (dL->L _ f) })  acc = f : acc+collect_bind _ (VarBind { var_id = f })            acc = f : acc+collect_bind _ (AbsBinds { abs_exports = dbinds }) acc = map abe_poly dbinds ++ acc+        -- I don't think we want the binders from the abe_binds++        -- binding (hence see AbsBinds) is in zonking in TcHsSyn+collect_bind omitPatSyn (PatSynBind _ (PSB { psb_id = (dL->L _ ps) })) acc+  | omitPatSyn                  = acc+  | otherwise                   = ps : acc+collect_bind _ (PatSynBind _ (XPatSynBind _)) acc = acc+collect_bind _ (XHsBindsLR _) acc = acc++collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)]+-- ^ Used exclusively for the bindings of an instance decl which are all FunBinds+collectMethodBinders binds = foldr (get . unLoc) [] binds+  where+    get (FunBind { fun_id = f }) fs = f : fs+    get _                        fs = fs+       -- Someone else complains about non-FunBinds++----------------- Statements --------------------------+collectLStmtsBinders :: [LStmtLR (GhcPass idL) (GhcPass idR) body]+                     -> [IdP (GhcPass idL)]+collectLStmtsBinders = concatMap collectLStmtBinders++collectStmtsBinders :: [StmtLR (GhcPass idL) (GhcPass idR) body]+                    -> [IdP (GhcPass idL)]+collectStmtsBinders = concatMap collectStmtBinders++collectLStmtBinders :: LStmtLR (GhcPass idL) (GhcPass idR) body+                    -> [IdP (GhcPass idL)]+collectLStmtBinders = collectStmtBinders . unLoc++collectStmtBinders :: StmtLR (GhcPass idL) (GhcPass idR) body+                   -> [IdP (GhcPass idL)]+  -- Id Binders for a Stmt... [but what about pattern-sig type vars]?+collectStmtBinders (BindStmt _ pat _ _ _)  = collectPatBinders pat+collectStmtBinders (LetStmt _  binds)      = collectLocalBinders (unLoc binds)+collectStmtBinders (BodyStmt {})           = []+collectStmtBinders (LastStmt {})           = []+collectStmtBinders (ParStmt _ xs _ _)      = collectLStmtsBinders+                                    $ [s | ParStmtBlock _ ss _ _ <- xs, s <- ss]+collectStmtBinders (TransStmt { trS_stmts = stmts }) = collectLStmtsBinders stmts+collectStmtBinders (RecStmt { recS_stmts = ss })     = collectLStmtsBinders ss+collectStmtBinders (ApplicativeStmt _ args _) = concatMap collectArgBinders args+ where+  collectArgBinders (_, ApplicativeArgOne { app_arg_pattern = pat }) = collectPatBinders pat+  collectArgBinders (_, ApplicativeArgMany { bv_pattern = pat }) = collectPatBinders pat+  collectArgBinders _ = []+collectStmtBinders (XStmtLR nec) = noExtCon nec+++----------------- Patterns --------------------------+collectPatBinders :: LPat (GhcPass p) -> [IdP (GhcPass p)]+collectPatBinders pat = collect_lpat pat []++collectPatsBinders :: [LPat (GhcPass p)] -> [IdP (GhcPass p)]+collectPatsBinders pats = foldr collect_lpat [] pats++-------------+collect_lpat :: (SrcSpanLess (LPat p) ~ Pat p , HasSrcSpan (LPat p)) =>+                 LPat p -> [IdP p] -> [IdP p]+collect_lpat p bndrs+  = go (unLoc p)+  where+    go (VarPat _ var)             = unLoc var : bndrs+    go (WildPat _)                = bndrs+    go (LazyPat _ pat)            = collect_lpat pat bndrs+    go (BangPat _ pat)            = collect_lpat pat bndrs+    go (AsPat _ a pat)            = unLoc a : collect_lpat pat bndrs+    go (ViewPat _ _ pat)          = collect_lpat pat bndrs+    go (ParPat _ pat)             = collect_lpat pat bndrs++    go (ListPat _ pats)           = foldr collect_lpat bndrs pats+    go (TuplePat _ pats _)        = foldr collect_lpat bndrs pats+    go (SumPat _ pat _ _)         = collect_lpat pat bndrs++    go (ConPatIn _ ps)            = foldr collect_lpat bndrs (hsConPatArgs ps)+    go (ConPatOut {pat_args=ps})  = foldr collect_lpat bndrs (hsConPatArgs ps)+        -- See Note [Dictionary binders in ConPatOut]+    go (LitPat _ _)               = bndrs+    go (NPat {})                  = bndrs+    go (NPlusKPat _ n _ _ _ _)    = unLoc n : bndrs++    go (SigPat _ pat _)           = collect_lpat pat bndrs++    go (SplicePat _ (HsSpliced _ _ (HsSplicedPat pat)))+                                  = go pat+    go (SplicePat _ _)            = bndrs+    go (CoPat _ _ pat _)          = go pat+    go (XPat {})                  = bndrs++{-+Note [Dictionary binders in ConPatOut] See also same Note in DsArrows+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Do *not* gather (a) dictionary and (b) dictionary bindings as binders+of a ConPatOut pattern.  For most calls it doesn't matter, because+it's pre-typechecker and there are no ConPatOuts.  But it does matter+more in the desugarer; for example, DsUtils.mkSelectorBinds uses+collectPatBinders.  In a lazy pattern, for example f ~(C x y) = ...,+we want to generate bindings for x,y but not for dictionaries bound by+C.  (The type checker ensures they would not be used.)++Desugaring of arrow case expressions needs these bindings (see DsArrows+and arrowcase1), but SPJ (Jan 2007) says it's safer for it to use its+own pat-binder-collector:++Here's the problem.  Consider++data T a where+   C :: Num a => a -> Int -> T a++f ~(C (n+1) m) = (n,m)++Here, the pattern (C (n+1)) binds a hidden dictionary (d::Num a),+and *also* uses that dictionary to match the (n+1) pattern.  Yet, the+variables bound by the lazy pattern are n,m, *not* the dictionary d.+So in mkSelectorBinds in DsUtils, we want just m,n as the variables bound.+-}++hsGroupBinders :: HsGroup GhcRn -> [Name]+hsGroupBinders (HsGroup { hs_valds = val_decls, hs_tyclds = tycl_decls,+                          hs_fords = foreign_decls })+  =  collectHsValBinders val_decls+  ++ hsTyClForeignBinders tycl_decls foreign_decls+hsGroupBinders (XHsGroup nec) = noExtCon nec++hsTyClForeignBinders :: [TyClGroup GhcRn]+                     -> [LForeignDecl GhcRn]+                     -> [Name]+-- We need to look at instance declarations too,+-- because their associated types may bind data constructors+hsTyClForeignBinders tycl_decls foreign_decls+  =    map unLoc (hsForeignDeclsBinders foreign_decls)+    ++ getSelectorNames+         (foldMap (foldMap hsLTyClDeclBinders . group_tyclds) tycl_decls+         `mappend`+         foldMap (foldMap hsLInstDeclBinders . group_instds) tycl_decls)+  where+    getSelectorNames :: ([Located Name], [LFieldOcc GhcRn]) -> [Name]+    getSelectorNames (ns, fs) = map unLoc ns ++ map (extFieldOcc . unLoc) fs++-------------------+hsLTyClDeclBinders :: Located (TyClDecl (GhcPass p))+                   -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+-- ^ Returns all the /binding/ names of the decl.  The first one is+-- guaranteed to be the name of the decl. The first component+-- represents all binding names except record fields; the second+-- represents field occurrences. For record fields mentioned in+-- multiple constructors, the SrcLoc will be from the first occurrence.+--+-- Each returned (Located name) has a SrcSpan for the /whole/ declaration.+-- See Note [SrcSpan for binders]++hsLTyClDeclBinders (dL->L loc (FamDecl { tcdFam = FamilyDecl+                                            { fdLName = (dL->L _ name) } }))+  = ([cL loc name], [])+hsLTyClDeclBinders (dL->L _ (FamDecl { tcdFam = XFamilyDecl nec }))+  = noExtCon nec+hsLTyClDeclBinders (dL->L loc (SynDecl+                               { tcdLName = (dL->L _ name) }))+  = ([cL loc name], [])+hsLTyClDeclBinders (dL->L loc (ClassDecl+                               { tcdLName = (dL->L _ cls_name)+                               , tcdSigs  = sigs+                               , tcdATs   = ats }))+  = (cL loc cls_name :+     [ cL fam_loc fam_name | (dL->L fam_loc (FamilyDecl+                                        { fdLName = L _ fam_name })) <- ats ]+     +++     [ cL mem_loc mem_name | (dL->L mem_loc (ClassOpSig _ False ns _)) <- sigs+                           , (dL->L _ mem_name) <- ns ]+    , [])+hsLTyClDeclBinders (dL->L loc (DataDecl    { tcdLName = (dL->L _ name)+                                           , tcdDataDefn = defn }))+  = (\ (xs, ys) -> (cL loc name : xs, ys)) $ hsDataDefnBinders defn+hsLTyClDeclBinders (dL->L _ (XTyClDecl nec)) = noExtCon nec+hsLTyClDeclBinders _ = panic "hsLTyClDeclBinders: Impossible Match"+                             -- due to #15884+++-------------------+hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)]+-- ^ See Note [SrcSpan for binders]+hsForeignDeclsBinders foreign_decls+  = [ cL decl_loc n+    | (dL->L decl_loc (ForeignImport { fd_name = (dL->L _ n) }))+        <- foreign_decls]+++-------------------+hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)]+-- ^ Collects record pattern-synonym selectors only; the pattern synonym+-- names are collected by collectHsValBinders.+hsPatSynSelectors (ValBinds _ _ _) = panic "hsPatSynSelectors"+hsPatSynSelectors (XValBindsLR (NValBinds binds _))+  = foldr addPatSynSelector [] . unionManyBags $ map snd binds++addPatSynSelector:: LHsBind p -> [IdP p] -> [IdP p]+addPatSynSelector bind sels+  | PatSynBind _ (PSB { psb_args = RecCon as }) <- unLoc bind+  = map (unLoc . recordPatSynSelectorId) as ++ sels+  | otherwise = sels++getPatSynBinds :: [(RecFlag, LHsBinds id)] -> [PatSynBind id id]+getPatSynBinds binds+  = [ psb | (_, lbinds) <- binds+          , (dL->L _ (PatSynBind _ psb)) <- bagToList lbinds ]++-------------------+hsLInstDeclBinders :: LInstDecl (GhcPass p)+                   -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+hsLInstDeclBinders (dL->L _ (ClsInstD+                             { cid_inst = ClsInstDecl+                                          { cid_datafam_insts = dfis }}))+  = foldMap (hsDataFamInstBinders . unLoc) dfis+hsLInstDeclBinders (dL->L _ (DataFamInstD { dfid_inst = fi }))+  = hsDataFamInstBinders fi+hsLInstDeclBinders (dL->L _ (TyFamInstD {})) = mempty+hsLInstDeclBinders (dL->L _ (ClsInstD _ (XClsInstDecl nec)))+  = noExtCon nec+hsLInstDeclBinders (dL->L _ (XInstDecl nec))+  = noExtCon nec+hsLInstDeclBinders _ = panic "hsLInstDeclBinders: Impossible Match"+                             -- due to #15884++-------------------+-- | the SrcLoc returned are for the whole declarations, not just the names+hsDataFamInstBinders :: DataFamInstDecl (GhcPass p)+                     -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+hsDataFamInstBinders (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =+                       FamEqn { feqn_rhs = defn }}})+  = hsDataDefnBinders defn+  -- There can't be repeated symbols because only data instances have binders+hsDataFamInstBinders (DataFamInstDecl+                                    { dfid_eqn = HsIB { hsib_body = XFamEqn nec}})+  = noExtCon nec+hsDataFamInstBinders (DataFamInstDecl (XHsImplicitBndrs nec))+  = noExtCon nec++-------------------+-- | the SrcLoc returned are for the whole declarations, not just the names+hsDataDefnBinders :: HsDataDefn (GhcPass p)+                  -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+hsDataDefnBinders (HsDataDefn { dd_cons = cons })+  = hsConDeclsBinders cons+  -- See Note [Binders in family instances]+hsDataDefnBinders (XHsDataDefn nec) = noExtCon nec++-------------------+type Seen p = [LFieldOcc (GhcPass p)] -> [LFieldOcc (GhcPass p)]+                 -- Filters out ones that have already been seen++hsConDeclsBinders :: [LConDecl (GhcPass p)]+                  -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+   -- See hsLTyClDeclBinders for what this does+   -- The function is boringly complicated because of the records+   -- And since we only have equality, we have to be a little careful+hsConDeclsBinders cons+  = go id cons+  where+    go :: Seen p -> [LConDecl (GhcPass p)]+       -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])+    go _ [] = ([], [])+    go remSeen (r:rs)+      -- Don't re-mangle the location of field names, because we don't+      -- have a record of the full location of the field declaration anyway+      = let loc = getLoc r+        in case unLoc r of+           -- remove only the first occurrence of any seen field in order to+           -- avoid circumventing detection of duplicate fields (#9156)+           ConDeclGADT { con_names = names, con_args = args }+             -> (map (cL loc . unLoc) names ++ ns, flds ++ fs)+             where+                (remSeen', flds) = get_flds remSeen args+                (ns, fs) = go remSeen' rs++           ConDeclH98 { con_name = name, con_args = args }+             -> ([cL loc (unLoc name)] ++ ns, flds ++ fs)+             where+                (remSeen', flds) = get_flds remSeen args+                (ns, fs) = go remSeen' rs++           XConDecl nec -> noExtCon nec++    get_flds :: Seen p -> HsConDeclDetails (GhcPass p)+             -> (Seen p, [LFieldOcc (GhcPass p)])+    get_flds remSeen (RecCon flds)+       = (remSeen', fld_names)+       where+          fld_names = remSeen (concatMap (cd_fld_names . unLoc) (unLoc flds))+          remSeen' = foldr (.) remSeen+                               [deleteBy ((==) `on` unLoc . rdrNameFieldOcc . unLoc) v+                               | v <- fld_names]+    get_flds remSeen _+       = (remSeen, [])++{-++Note [SrcSpan for binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~+When extracting the (Located RdrNme) for a binder, at least for the+main name (the TyCon of a type declaration etc), we want to give it+the @SrcSpan@ of the whole /declaration/, not just the name itself+(which is how it appears in the syntax tree).  This SrcSpan (for the+entire declaration) is used as the SrcSpan for the Name that is+finally produced, and hence for error messages.  (See #8607.)++Note [Binders in family instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In a type or data family instance declaration, the type+constructor is an *occurrence* not a binding site+    type instance T Int = Int -> Int   -- No binders+    data instance S Bool = S1 | S2     -- Binders are S1,S2+++************************************************************************+*                                                                      *+        Collecting binders the user did not write+*                                                                      *+************************************************************************++The job of this family of functions is to run through binding sites and find the set of all Names+that were defined "implicitly", without being explicitly written by the user.++The main purpose is to find names introduced by record wildcards so that we can avoid+warning the user when they don't use those names (#4404)++Since the addition of -Wunused-record-wildcards, this function returns a pair+of [(SrcSpan, [Name])]. Each element of the list is one set of implicit+binders, the first component of the tuple is the document describes the possible+fix to the problem (by removing the ..).++This means there is some unfortunate coupling between this function and where it+is used but it's only used for one specific purpose in one place so it seemed+easier.+-}++lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))]+                -> [(SrcSpan, [Name])]+lStmtsImplicits = hs_lstmts+  where+    hs_lstmts :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))]+              -> [(SrcSpan, [Name])]+    hs_lstmts = concatMap (hs_stmt . unLoc)++    hs_stmt :: StmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))+            -> [(SrcSpan, [Name])]+    hs_stmt (BindStmt _ pat _ _ _) = lPatImplicits pat+    hs_stmt (ApplicativeStmt _ args _) = concatMap do_arg args+      where do_arg (_, ApplicativeArgOne { app_arg_pattern = pat }) = lPatImplicits pat+            do_arg (_, ApplicativeArgMany { app_stmts = stmts }) = hs_lstmts stmts+            do_arg (_, XApplicativeArg nec) = noExtCon nec+    hs_stmt (LetStmt _ binds)     = hs_local_binds (unLoc binds)+    hs_stmt (BodyStmt {})         = []+    hs_stmt (LastStmt {})         = []+    hs_stmt (ParStmt _ xs _ _)    = hs_lstmts [s | ParStmtBlock _ ss _ _ <- xs+                                                , s <- ss]+    hs_stmt (TransStmt { trS_stmts = stmts }) = hs_lstmts stmts+    hs_stmt (RecStmt { recS_stmts = ss })     = hs_lstmts ss+    hs_stmt (XStmtLR nec)         = noExtCon nec++    hs_local_binds (HsValBinds _ val_binds) = hsValBindsImplicits val_binds+    hs_local_binds (HsIPBinds {})           = []+    hs_local_binds (EmptyLocalBinds _)      = []+    hs_local_binds (XHsLocalBindsLR _)      = []++hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> [(SrcSpan, [Name])]+hsValBindsImplicits (XValBindsLR (NValBinds binds _))+  = concatMap (lhsBindsImplicits . snd) binds+hsValBindsImplicits (ValBinds _ binds _)+  = lhsBindsImplicits binds++lhsBindsImplicits :: LHsBindsLR GhcRn idR -> [(SrcSpan, [Name])]+lhsBindsImplicits = foldBag (++) (lhs_bind . unLoc) []+  where+    lhs_bind (PatBind { pat_lhs = lpat }) = lPatImplicits lpat+    lhs_bind _ = []++lPatImplicits :: LPat GhcRn -> [(SrcSpan, [Name])]+lPatImplicits = hs_lpat+  where+    hs_lpat lpat = hs_pat (unLoc lpat)++    hs_lpats = foldr (\pat rest -> hs_lpat pat ++ rest) []++    hs_pat (LazyPat _ pat)      = hs_lpat pat+    hs_pat (BangPat _ pat)      = hs_lpat pat+    hs_pat (AsPat _ _ pat)      = hs_lpat pat+    hs_pat (ViewPat _ _ pat)    = hs_lpat pat+    hs_pat (ParPat _ pat)       = hs_lpat pat+    hs_pat (ListPat _ pats)     = hs_lpats pats+    hs_pat (TuplePat _ pats _)  = hs_lpats pats++    hs_pat (SigPat _ pat _)     = hs_lpat pat+    hs_pat (CoPat _ _ pat _)    = hs_pat pat++    hs_pat (ConPatIn n ps)           = details n ps+    hs_pat (ConPatOut {pat_con=con, pat_args=ps}) = details (fmap conLikeName con) ps++    hs_pat _ = []++    details :: Located Name -> HsConPatDetails GhcRn -> [(SrcSpan, [Name])]+    details _ (PrefixCon ps)   = hs_lpats ps+    details n (RecCon fs)      =+      [(err_loc, collectPatsBinders implicit_pats) | Just{} <- [rec_dotdot fs] ]+        ++ hs_lpats explicit_pats++      where implicit_pats = map (hsRecFieldArg . unLoc) implicit+            explicit_pats = map (hsRecFieldArg . unLoc) explicit+++            (explicit, implicit) = partitionEithers [if pat_explicit then Left fld else Right fld+                                                    | (i, fld) <- [0..] `zip` rec_flds fs+                                                    ,  let  pat_explicit =+                                                              maybe True ((i<) . unLoc)+                                                                         (rec_dotdot fs)]+            err_loc = maybe (getLoc n) getLoc (rec_dotdot fs)++    details _ (InfixCon p1 p2) = hs_lpat p1 ++ hs_lpat p2
+ GHC/HsToCore/PmCheck.hs view
@@ -0,0 +1,1375 @@+{-+Author: George Karachalias <george.karachalias@cs.kuleuven.be>++Pattern Matching Coverage Checking.+-}++{-# LANGUAGE CPP            #-}+{-# LANGUAGE GADTs          #-}+{-# LANGUAGE TupleSections  #-}+{-# LANGUAGE ViewPatterns   #-}+{-# LANGUAGE MultiWayIf     #-}+{-# LANGUAGE LambdaCase     #-}++module GHC.HsToCore.PmCheck (+        -- Checking and printing+        checkSingle, checkMatches, checkGuardMatches,+        needToRunPmCheck, isMatchContextPmChecked,++        -- See Note [Type and Term Equality Propagation]+        addTyCsDs, addScrutTmCs, addPatTmCs+    ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.HsToCore.PmCheck.Types+import GHC.HsToCore.PmCheck.Oracle+import GHC.HsToCore.PmCheck.Ppr+import BasicTypes (Origin, isGenerated)+import CoreSyn (CoreExpr, Expr(Var,App))+import FastString (unpackFS, lengthFS)+import DynFlags+import GHC.Hs+import TcHsSyn+import Id+import ConLike+import Name+import FamInst+import TysWiredIn+import SrcLoc+import Util+import Outputable+import DataCon+import TyCon+import Var (EvVar)+import Coercion+import TcEvidence+import {-# SOURCE #-} DsExpr (dsExpr, dsLExpr, dsSyntaxExpr)+import {-# SOURCE #-} DsBinds (dsHsWrapper)+import DsUtils (selectMatchVar)+import MatchLit (dsLit, dsOverLit)+import DsMonad+import Bag+import TyCoRep+import Type+import DsUtils       (isTrueLHsExpr)+import Maybes+import qualified GHC.LanguageExtensions as LangExt++import Control.Monad (when, forM_, zipWithM)+import Data.List (elemIndex)+import qualified Data.Semigroup as Semi++{-+This module checks pattern matches for:+\begin{enumerate}+  \item Equations that are redundant+  \item Equations with inaccessible right-hand-side+  \item Exhaustiveness+\end{enumerate}++The algorithm is based on the paper:++  "GADTs Meet Their Match:+     Pattern-matching Warnings That Account for GADTs, Guards, and Laziness"++    http://people.cs.kuleuven.be/~george.karachalias/papers/p424-karachalias.pdf++%************************************************************************+%*                                                                      *+                     Pattern Match Check Types+%*                                                                      *+%************************************************************************+-}++-- | A very simple language for pattern guards. Let bindings, bang patterns,+-- and matching variables against flat constructor patterns.+data PmGrd+  = -- | @PmCon x K tvs dicts args@ corresponds to a+    -- @K tvs dicts args <- x@ guard. The @tvs@ and @args@ are bound in this+    -- construct, the @x@ is just a use.+    -- For the arguments' meaning see 'GHC.Hs.Pat.ConPatOut'.+    PmCon {+      pm_id          :: !Id,+      pm_con_con     :: !PmAltCon,+      pm_con_tvs     :: ![TyVar],+      pm_con_dicts   :: ![EvVar],+      pm_con_args    :: ![Id]+    }++    -- | @PmBang x@ corresponds to a @seq x True@ guard.+  | PmBang {+      pm_id          :: !Id+    }++    -- | @PmLet x expr@ corresponds to a @let x = expr@ guard. This actually+    -- /binds/ @x@.+  | PmLet {+      pm_id       :: !Id,+      pm_let_expr :: !CoreExpr+    }++-- | Should not be user-facing.+instance Outputable PmGrd where+  ppr (PmCon x alt _con_tvs _con_dicts con_args)+    = hsep [ppr alt, hsep (map ppr con_args), text "<-", ppr x]+  ppr (PmBang x) = char '!' <> ppr x+  ppr (PmLet x expr) = hsep [text "let", ppr x, text "=", ppr expr]++type GrdVec = [PmGrd]++-- | Each 'Delta' is proof (i.e., a model of the fact) that some values are not+-- covered by a pattern match. E.g. @f Nothing = <rhs>@ might be given an+-- uncovered set @[x :-> Just y]@ or @[x /= Nothing]@, where @x@ is the variable+-- matching against @f@'s first argument.+type Uncovered = [Delta]++-- Instead of keeping the whole sets in memory, we keep a boolean for both the+-- covered and the divergent set (we store the uncovered set though, since we+-- want to print it). For both the covered and the divergent we have:+--+--   True <=> The set is non-empty+--+-- hence:+--  C = True             ==> Useful clause (no warning)+--  C = False, D = True  ==> Clause with inaccessible RHS+--  C = False, D = False ==> Redundant clause++data Covered = Covered | NotCovered+  deriving Show++instance Outputable Covered where+  ppr = text . show++-- Like the or monoid for booleans+-- Covered = True, Uncovered = False+instance Semi.Semigroup Covered where+  Covered <> _ = Covered+  _ <> Covered = Covered+  NotCovered <> NotCovered = NotCovered++instance Monoid Covered where+  mempty = NotCovered+  mappend = (Semi.<>)++data Diverged = Diverged | NotDiverged+  deriving Show++instance Outputable Diverged where+  ppr = text . show++instance Semi.Semigroup Diverged where+  Diverged <> _ = Diverged+  _ <> Diverged = Diverged+  NotDiverged <> NotDiverged = NotDiverged++instance Monoid Diverged where+  mempty = NotDiverged+  mappend = (Semi.<>)++data Precision = Approximate | Precise+  deriving (Eq, Show)++instance Outputable Precision where+  ppr = text . show++instance Semi.Semigroup Precision where+  Approximate <> _ = Approximate+  _ <> Approximate = Approximate+  Precise <> Precise = Precise++instance Monoid Precision where+  mempty = Precise+  mappend = (Semi.<>)++-- | A triple <C,U,D> of covered, uncovered, and divergent sets.+--+-- Also stores a flag 'presultApprox' denoting whether we ran into the+-- 'maxPmCheckModels' limit for the purpose of hints in warning messages to+-- maybe increase the limit.+data PartialResult = PartialResult {+                        presultCovered   :: Covered+                      , presultUncovered :: Uncovered+                      , presultDivergent :: Diverged+                      , presultApprox    :: Precision }++emptyPartialResult :: PartialResult+emptyPartialResult = PartialResult { presultUncovered = mempty+                                   , presultCovered   = mempty+                                   , presultDivergent = mempty+                                   , presultApprox    = mempty }++combinePartialResults :: PartialResult -> PartialResult -> PartialResult+combinePartialResults (PartialResult cs1 vsa1 ds1 ap1) (PartialResult cs2 vsa2 ds2 ap2)+  = PartialResult (cs1 Semi.<> cs2)+                  (vsa1 Semi.<> vsa2)+                  (ds1 Semi.<> ds2)+                  (ap1 Semi.<> ap2) -- the result is approximate if either is++instance Outputable PartialResult where+  ppr (PartialResult c unc d pc)+    = hang (text "PartialResult" <+> ppr c <+> ppr d <+> ppr pc) 2 (ppr_unc unc)+    where+      ppr_unc = braces . fsep . punctuate comma . map ppr++instance Semi.Semigroup PartialResult where+  (<>) = combinePartialResults++instance Monoid PartialResult where+  mempty = emptyPartialResult+  mappend = (Semi.<>)++-- | Pattern check result+--+-- * Redundant clauses+-- * Not-covered clauses (or their type, if no pattern is available)+-- * Clauses with inaccessible RHS+-- * A flag saying whether we ran into the 'maxPmCheckModels' limit for the+--   purpose of suggesting to crank it up in the warning message+--+-- More details about the classification of clauses into useful, redundant+-- and with inaccessible right hand side can be found here:+--+--     https://gitlab.haskell.org/ghc/ghc/wikis/pattern-match-check+--+data PmResult =+  PmResult {+      pmresultRedundant    :: [Located [LPat GhcTc]]+    , pmresultUncovered    :: [Delta]+    , pmresultInaccessible :: [Located [LPat GhcTc]]+    , pmresultApproximate  :: Precision }++instance Outputable PmResult where+  ppr pmr = hang (text "PmResult") 2 $ vcat+    [ text "pmresultRedundant" <+> ppr (pmresultRedundant pmr)+    , text "pmresultUncovered" <+> ppr (pmresultUncovered pmr)+    , text "pmresultInaccessible" <+> ppr (pmresultInaccessible pmr)+    , text "pmresultApproximate" <+> ppr (pmresultApproximate pmr)+    ]++{-+%************************************************************************+%*                                                                      *+       Entry points to the checker: checkSingle and checkMatches+%*                                                                      *+%************************************************************************+-}++-- | Check a single pattern binding (let)+checkSingle :: DynFlags -> DsMatchContext -> Id -> Pat GhcTc -> DsM ()+checkSingle dflags ctxt@(DsMatchContext _ locn) var p = do+  tracePm "checkSingle" (vcat [ppr ctxt, ppr var, ppr p])+  res <- checkSingle' locn var p+  dsPmWarn dflags ctxt [var] res++-- | Check a single pattern binding (let)+checkSingle' :: SrcSpan -> Id -> Pat GhcTc -> DsM PmResult+checkSingle' locn var p = do+  fam_insts <- dsGetFamInstEnvs+  grds      <- translatePat fam_insts var p+  missing   <- getPmDelta+  tracePm "checkSingle': missing" (ppr missing)+  PartialResult cs us ds pc <- pmCheck grds [] 1 missing+  dflags <- getDynFlags+  us' <- getNFirstUncovered [var] (maxUncoveredPatterns dflags + 1) us+  let plain = PmResult { pmresultRedundant    = []+                       , pmresultUncovered    = us'+                       , pmresultInaccessible = []+                       , pmresultApproximate  = pc }+  return $ case (cs,ds) of+    (Covered   , _          ) -> plain                              -- useful+    (NotCovered, NotDiverged) -> plain { pmresultRedundant = m    } -- redundant+    (NotCovered, Diverged   ) -> plain { pmresultInaccessible = m } -- inaccessible rhs+  where m = [cL locn [cL locn p]]++-- | Exhaustive for guard matches, is used for guards in pattern bindings and+-- in @MultiIf@ expressions.+checkGuardMatches :: HsMatchContext Name          -- Match context+                  -> GRHSs GhcTc (LHsExpr GhcTc)  -- Guarded RHSs+                  -> DsM ()+checkGuardMatches hs_ctx guards@(GRHSs _ grhss _) = do+    dflags <- getDynFlags+    let combinedLoc = foldl1 combineSrcSpans (map getLoc grhss)+        dsMatchContext = DsMatchContext hs_ctx combinedLoc+        match = cL combinedLoc $+                  Match { m_ext = noExtField+                        , m_ctxt = hs_ctx+                        , m_pats = []+                        , m_grhss = guards }+    checkMatches dflags dsMatchContext [] [match]+checkGuardMatches _ (XGRHSs nec) = noExtCon nec++-- | Check a matchgroup (case, functions, etc.)+checkMatches :: DynFlags -> DsMatchContext+             -> [Id] -> [LMatch GhcTc (LHsExpr GhcTc)] -> DsM ()+checkMatches dflags ctxt vars matches = do+  tracePm "checkMatches" (hang (vcat [ppr ctxt+                               , ppr vars+                               , text "Matches:"])+                               2+                               (vcat (map ppr matches)))+  res <- checkMatches' vars matches+  dsPmWarn dflags ctxt vars res++-- | Check a matchgroup (case, functions, etc.).+checkMatches' :: [Id] -> [LMatch GhcTc (LHsExpr GhcTc)] -> DsM PmResult+checkMatches' vars matches = do+  init_delta <- getPmDelta+  missing <- case matches of+    -- This must be an -XEmptyCase. See Note [Checking EmptyCase]+    [] | [var] <- vars -> maybeToList <$> addTmCt init_delta (TmVarNonVoid var)+    _                  -> pure [init_delta]+  tracePm "checkMatches': missing" (ppr missing)+  (rs,us,ds,pc) <- go matches missing+  dflags <- getDynFlags+  us' <- getNFirstUncovered vars (maxUncoveredPatterns dflags + 1) us+  return $ PmResult {+                pmresultRedundant    = map hsLMatchToLPats rs+              , pmresultUncovered    = us'+              , pmresultInaccessible = map hsLMatchToLPats ds+              , pmresultApproximate  = pc }+  where+    go :: [LMatch GhcTc (LHsExpr GhcTc)] -> Uncovered+       -> DsM ( [LMatch GhcTc (LHsExpr GhcTc)]+              , Uncovered+              , [LMatch GhcTc (LHsExpr GhcTc)]+              , Precision)+    go []     missing = return ([], missing, [], Precise)+    go (m:ms) missing = do+      tracePm "checkMatches': go" (ppr m)+      dflags             <- getDynFlags+      fam_insts          <- dsGetFamInstEnvs+      (clause, guards)   <- translateMatch fam_insts vars m+      let limit                     = maxPmCheckModels dflags+          n_siblings                = length missing+          throttled_check delta     =+            snd <$> throttle limit (pmCheck clause guards) n_siblings delta++      r@(PartialResult cs missing' ds pc1) <- runMany throttled_check missing++      tracePm "checkMatches': go: res" (ppr r)+      (rs, final_u, is, pc2)  <- go ms missing'+      return $ case (cs, ds) of+        -- useful+        (Covered,  _    )        -> (rs, final_u,    is, pc1 Semi.<> pc2)+        -- redundant+        (NotCovered, NotDiverged) -> (m:rs, final_u, is, pc1 Semi.<> pc2)+        -- inaccessible+        (NotCovered, Diverged )   -> (rs, final_u, m:is, pc1 Semi.<> pc2)++    hsLMatchToLPats :: LMatch id body -> Located [LPat id]+    hsLMatchToLPats (dL->L l (Match { m_pats = pats })) = cL l pats+    hsLMatchToLPats _                                   = panic "checkMatches'"++getNFirstUncovered :: [Id] -> Int -> [Delta] -> DsM [Delta]+getNFirstUncovered _    0 _              = pure []+getNFirstUncovered _    _ []             = pure []+getNFirstUncovered vars n (delta:deltas) = do+  front <- provideEvidence vars n delta+  back <- getNFirstUncovered vars (n - length front) deltas+  pure (front ++ back)++{- Note [Checking EmptyCase]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-XEmptyCase is useful for matching on empty data types like 'Void'. For example,+the following is a complete match:++    f :: Void -> ()+    f x = case x of {}++Really, -XEmptyCase is the only way to write a program that at the same time is+safe (@f _ = error "boom"@ is not because of ⊥), doesn't trigger a warning+(@f !_ = error "inaccessible" has inaccessible RHS) and doesn't turn an+exception into divergence (@f x = f x@).++Semantically, unlike every other case expression, -XEmptyCase is strict in its+match var x, which rules out ⊥ as an inhabitant. So we add x /~ ⊥ to the+initial Delta and check if there are any values left to match on.+-}++{-+%************************************************************************+%*                                                                      *+              Transform source syntax to *our* syntax+%*                                                                      *+%************************************************************************+-}++-- -----------------------------------------------------------------------+-- * Utilities++-- | Smart constructor that eliminates trivial lets+mkPmLetVar :: Id -> Id -> GrdVec+mkPmLetVar x y | x == y = []+mkPmLetVar x y          = [PmLet x (Var y)]++-- | ADT constructor pattern => no existentials, no local constraints+vanillaConGrd :: Id -> DataCon -> [Id] -> PmGrd+vanillaConGrd scrut con arg_ids =+  PmCon { pm_id = scrut, pm_con_con = PmAltConLike (RealDataCon con)+        , pm_con_tvs = [], pm_con_dicts = [], pm_con_args = arg_ids }++-- | Creates a 'GrdVec' refining a match var of list type to a list,+-- where list fields are matched against the incoming tagged 'GrdVec's.+-- For example:+--   @mkListGrds "a" "[(x, True <- x),(y, !y)]"@+-- to+--   @"[(x:b) <- a, True <- x, (y:c) <- b, seq y True, [] <- c]"@+-- where b,c are freshly allocated in @mkListGrds@ and a is the match variable.+mkListGrds :: Id -> [(Id, GrdVec)] -> DsM GrdVec+-- See Note [Order of guards matter] for why we need to intertwine guards+-- on list elements.+mkListGrds a []                  = pure [vanillaConGrd a nilDataCon []]+mkListGrds a ((x, head_grds):xs) = do+  b <- mkPmId (idType a)+  tail_grds <- mkListGrds b xs+  pure $ vanillaConGrd a consDataCon [x, b] : head_grds ++ tail_grds++-- | Create a 'GrdVec' refining a match variable to a 'PmLit'.+mkPmLitGrds :: Id -> PmLit -> DsM GrdVec+mkPmLitGrds x (PmLit _ (PmLitString s)) = do+  -- We translate String literals to list literals for better overlap reasoning.+  -- It's a little unfortunate we do this here rather than in+  -- 'GHC.HsToCore.PmCheck.Oracle.trySolve' and 'GHC.HsToCore.PmCheck.Oracle.addRefutableAltCon', but it's so much+  -- simpler here.+  -- See Note [Representation of Strings in TmState] in GHC.HsToCore.PmCheck.Oracle+  vars <- traverse mkPmId (take (lengthFS s) (repeat charTy))+  let mk_char_lit y c = mkPmLitGrds y (PmLit charTy (PmLitChar c))+  char_grdss <- zipWithM mk_char_lit vars (unpackFS s)+  mkListGrds x (zip vars char_grdss)+mkPmLitGrds x lit = do+  let grd = PmCon { pm_id = x+                  , pm_con_con = PmAltLit lit+                  , pm_con_tvs = []+                  , pm_con_dicts = []+                  , pm_con_args = [] }+  pure [grd]++-- -----------------------------------------------------------------------+-- * Transform (Pat Id) into GrdVec++-- | @translatePat _ x pat@ transforms @pat@ into a 'GrdVec', where+-- the variable representing the match is @x@.+translatePat :: FamInstEnvs -> Id -> Pat GhcTc -> DsM GrdVec+translatePat fam_insts x pat = case pat of+  WildPat  _ty -> pure []+  VarPat _ y   -> pure (mkPmLetVar (unLoc y) x)+  ParPat _ p   -> translateLPat fam_insts x p+  LazyPat _ _  -> pure [] -- like a wildcard+  BangPat _ p  ->+    -- Add the bang in front of the list, because it will happen before any+    -- nested stuff.+    (PmBang x :) <$> translateLPat fam_insts x p++  -- (x@pat)   ==>   Translate pat with x as match var and handle impedance+  --                 mismatch with incoming match var+  AsPat _ (dL->L _ y) p -> (mkPmLetVar y x ++) <$> translateLPat fam_insts y p++  SigPat _ p _ty -> translateLPat fam_insts x p++  -- See Note [Translate CoPats]+  -- Generally the translation is+  -- pat |> co   ===>   let y = x |> co, pat <- y  where y is a match var of pat+  CoPat _ wrapper p _ty+    | isIdHsWrapper wrapper                   -> translatePat fam_insts x p+    | WpCast co <-  wrapper, isReflexiveCo co -> translatePat fam_insts x p+    | otherwise -> do+        (y, grds) <- translatePatV fam_insts p+        wrap_rhs_y <- dsHsWrapper wrapper+        pure (PmLet y (wrap_rhs_y (Var x)) : grds)++  -- (n + k)  ===>   let b = x >= k, True <- b, let n = x-k+  NPlusKPat _pat_ty (dL->L _ n) k1 k2 ge minus -> do+    b <- mkPmId boolTy+    let grd_b = vanillaConGrd b trueDataCon []+    [ke1, ke2] <- traverse dsOverLit [unLoc k1, k2]+    rhs_b <- dsSyntaxExpr ge    [Var x, ke1]+    rhs_n <- dsSyntaxExpr minus [Var x, ke2]+    pure [PmLet b rhs_b, grd_b, PmLet n rhs_n]++  -- (fun -> pat)   ===>   let y = fun x, pat <- y where y is a match var of pat+  ViewPat _arg_ty lexpr pat -> do+    (y, grds) <- translateLPatV fam_insts pat+    fun <- dsLExpr lexpr+    pure $ PmLet y (App fun (Var x)) : grds++  -- list+  ListPat (ListPatTc _elem_ty Nothing) ps ->+    translateListPat fam_insts x ps++  -- overloaded list+  ListPat (ListPatTc elem_ty (Just (pat_ty, to_list))) pats -> do+    dflags <- getDynFlags+    case splitListTyConApp_maybe pat_ty of+      Just _e_ty+        | not (xopt LangExt.RebindableSyntax dflags)+        -- Just translate it as a regular ListPat+        -> translateListPat fam_insts x pats+      _ -> do+        y <- mkPmId (mkListTy elem_ty)+        grds <- translateListPat fam_insts y pats+        rhs_y <- dsSyntaxExpr to_list [Var x]+        pure $ PmLet y rhs_y : grds++    -- (a) In the presence of RebindableSyntax, we don't know anything about+    --     `toList`, we should treat `ListPat` as any other view pattern.+    --+    -- (b) In the absence of RebindableSyntax,+    --     - If the pat_ty is `[a]`, then we treat the overloaded list pattern+    --       as ordinary list pattern. Although we can give an instance+    --       `IsList [Int]` (more specific than the default `IsList [a]`), in+    --       practice, we almost never do that. We assume the `to_list` is+    --       the `toList` from `instance IsList [a]`.+    --+    --     - Otherwise, we treat the `ListPat` as ordinary view pattern.+    --+    -- See #14547, especially comment#9 and comment#10.++  ConPatOut { pat_con     = (dL->L _ con)+            , pat_arg_tys = arg_tys+            , pat_tvs     = ex_tvs+            , pat_dicts   = dicts+            , pat_args    = ps } -> do+    translateConPatOut fam_insts x con arg_tys ex_tvs dicts ps++  NPat ty (dL->L _ olit) mb_neg _ -> do+    -- See Note [Literal short cut] in MatchLit.hs+    -- We inline the Literal short cut for @ty@ here, because @ty@ is more+    -- precise than the field of OverLitTc, which is all that dsOverLit (which+    -- normally does the literal short cut) can look at. Also @ty@ matches the+    -- type of the scrutinee, so info on both pattern and scrutinee (for which+    -- short cutting in dsOverLit works properly) is overloaded iff either is.+    dflags <- getDynFlags+    core_expr <- case olit of+      OverLit{ ol_val = val, ol_ext = OverLitTc rebindable _ }+        | not rebindable+        , Just expr <- shortCutLit dflags val ty+        -> dsExpr expr+      _ -> dsOverLit olit+    let lit  = expectJust "failed to detect OverLit" (coreExprAsPmLit core_expr)+    let lit' = case mb_neg of+          Just _  -> expectJust "failed to negate lit" (negatePmLit lit)+          Nothing -> lit+    mkPmLitGrds x lit'++  LitPat _ lit -> do+    core_expr <- dsLit (convertLit lit)+    let lit = expectJust "failed to detect Lit" (coreExprAsPmLit core_expr)+    mkPmLitGrds x lit++  TuplePat _tys pats boxity -> do+    (vars, grdss) <- mapAndUnzipM (translateLPatV fam_insts) pats+    let tuple_con = tupleDataCon boxity (length vars)+    pure $ vanillaConGrd x tuple_con vars : concat grdss++  SumPat _ty p alt arity -> do+    (y, grds) <- translateLPatV fam_insts p+    let sum_con = sumDataCon alt arity+    -- See Note [Unboxed tuple RuntimeRep vars] in TyCon+    pure $ vanillaConGrd x sum_con [y] : grds++  -- --------------------------------------------------------------------------+  -- Not supposed to happen+  ConPatIn  {} -> panic "Check.translatePat: ConPatIn"+  SplicePat {} -> panic "Check.translatePat: SplicePat"+  XPat      n  -> noExtCon n++-- | 'translatePat', but also select and return a new match var.+translatePatV :: FamInstEnvs -> Pat GhcTc -> DsM (Id, GrdVec)+translatePatV fam_insts pat = do+  x <- selectMatchVar pat+  grds <- translatePat fam_insts x pat+  pure (x, grds)++translateLPat :: FamInstEnvs -> Id -> LPat GhcTc -> DsM GrdVec+translateLPat fam_insts x = translatePat fam_insts x . unLoc++-- | 'translateLPat', but also select and return a new match var.+translateLPatV :: FamInstEnvs -> LPat GhcTc -> DsM (Id, GrdVec)+translateLPatV fam_insts = translatePatV fam_insts . unLoc++-- | @translateListPat _ x [p1, ..., pn]@ is basically+--   @translateConPatOut _ x $(mkListConPatOuts [p1, ..., pn]>@ without ever+-- constructing the 'ConPatOut's.+translateListPat :: FamInstEnvs -> Id -> [LPat GhcTc] -> DsM GrdVec+translateListPat fam_insts x pats = do+  vars_and_grdss <- traverse (translateLPatV fam_insts) pats+  mkListGrds x vars_and_grdss++-- | Translate a constructor pattern+translateConPatOut :: FamInstEnvs -> Id -> ConLike -> [Type] -> [TyVar]+                   -> [EvVar] -> HsConPatDetails GhcTc -> DsM GrdVec+translateConPatOut fam_insts x con univ_tys ex_tvs dicts = \case+    PrefixCon ps                 -> go_field_pats (zip [0..] ps)+    InfixCon  p1 p2              -> go_field_pats (zip [0..] [p1,p2])+    RecCon    (HsRecFields fs _) -> go_field_pats (rec_field_ps fs)+  where+    -- The actual argument types (instantiated)+    arg_tys     = conLikeInstOrigArgTys con (univ_tys ++ mkTyVarTys ex_tvs)++    -- Extract record field patterns tagged by field index from a list of+    -- LHsRecField+    rec_field_ps fs = map (tagged_pat . unLoc) fs+      where+        tagged_pat f = (lbl_to_index (getName (hsRecFieldId f)), hsRecFieldArg f)+        -- Unfortunately the label info is empty when the DataCon wasn't defined+        -- with record field labels, hence we translate to field index.+        orig_lbls        = map flSelector $ conLikeFieldLabels con+        lbl_to_index lbl = expectJust "lbl_to_index" $ elemIndex lbl orig_lbls++    go_field_pats tagged_pats = do+      -- The fields that appear might not be in the correct order. So first+      -- do a PmCon match, then force according to field strictness and then+      -- force evaluation of the field patterns in the order given by+      -- the first field of @tagged_pats@.+      -- See Note [Field match order for RecCon]++      -- Translate the mentioned field patterns. We're doing this first to get+      -- the Ids for pm_con_args.+      let trans_pat (n, pat) = do+            (var, pvec) <- translateLPatV fam_insts pat+            pure ((n, var), pvec)+      (tagged_vars, arg_grdss) <- mapAndUnzipM trans_pat tagged_pats++      let get_pat_id n ty = case lookup n tagged_vars of+            Just var -> pure var+            Nothing  -> mkPmId ty++      -- 1. the constructor pattern match itself+      arg_ids <- zipWithM get_pat_id [0..] arg_tys+      let con_grd = PmCon x (PmAltConLike con) ex_tvs dicts arg_ids++      -- 2. bang strict fields+      let arg_is_banged = map isBanged $ conLikeImplBangs con+          bang_grds     = map PmBang   $ filterByList arg_is_banged arg_ids++      -- 3. guards from field selector patterns+      let arg_grds = concat arg_grdss++      -- tracePm "ConPatOut" (ppr x $$ ppr con $$ ppr arg_ids)+      --+      -- Store the guards in exactly that order+      --      1.         2.           3.+      pure (con_grd : bang_grds ++ arg_grds)++-- Translate a single match+translateMatch :: FamInstEnvs -> [Id] -> LMatch GhcTc (LHsExpr GhcTc)+               -> DsM (GrdVec, [GrdVec])+translateMatch fam_insts vars (dL->L _ (Match { m_pats = pats, m_grhss = grhss }))+  = do+      pats'   <- concat <$> zipWithM (translateLPat fam_insts) vars pats+      guards' <- mapM (translateGuards fam_insts) guards+      -- tracePm "translateMatch" (vcat [ppr pats, ppr pats', ppr guards, ppr guards'])+      return (pats', guards')+      where+        extractGuards :: LGRHS GhcTc (LHsExpr GhcTc) -> [GuardStmt GhcTc]+        extractGuards (dL->L _ (GRHS _ gs _)) = map unLoc gs+        extractGuards _                       = panic "translateMatch"++        guards = map extractGuards (grhssGRHSs grhss)+translateMatch _ _ _ = panic "translateMatch"++-- -----------------------------------------------------------------------+-- * Transform source guards (GuardStmt Id) to simpler PmGrds++-- | Translate a list of guard statements to a 'GrdVec'+translateGuards :: FamInstEnvs -> [GuardStmt GhcTc] -> DsM GrdVec+translateGuards fam_insts guards =+  concat <$> mapM (translateGuard fam_insts) guards++-- | Translate a guard statement to a 'GrdVec'+translateGuard :: FamInstEnvs -> GuardStmt GhcTc -> DsM GrdVec+translateGuard fam_insts guard = case guard of+  BodyStmt _   e _ _ -> translateBoolGuard e+  LetStmt  _   binds -> translateLet (unLoc binds)+  BindStmt _ p e _ _ -> translateBind fam_insts p e+  LastStmt        {} -> panic "translateGuard LastStmt"+  ParStmt         {} -> panic "translateGuard ParStmt"+  TransStmt       {} -> panic "translateGuard TransStmt"+  RecStmt         {} -> panic "translateGuard RecStmt"+  ApplicativeStmt {} -> panic "translateGuard ApplicativeLastStmt"+  XStmtLR nec        -> noExtCon nec++-- | Translate let-bindings+translateLet :: HsLocalBinds GhcTc -> DsM GrdVec+translateLet _binds = return []++-- | Translate a pattern guard+--   @pat <- e ==>  let x = e;  <guards for pat <- x>@+translateBind :: FamInstEnvs -> LPat GhcTc -> LHsExpr GhcTc -> DsM GrdVec+translateBind fam_insts p e = dsLExpr e >>= \case+  Var y+    | Nothing <- isDataConId_maybe y+    -- RHS is a variable, so that will allow us to omit the let+    -> translateLPat fam_insts y p+  rhs -> do+    (x, grds) <- translateLPatV fam_insts p+    pure (PmLet x rhs : grds)++-- | Translate a boolean guard+--   @e ==>  let x = e; True <- x@+translateBoolGuard :: LHsExpr GhcTc -> DsM GrdVec+translateBoolGuard e+  | isJust (isTrueLHsExpr e) = return []+    -- The formal thing to do would be to generate (True <- True)+    -- but it is trivial to solve so instead we give back an empty+    -- GrdVec for efficiency+  | otherwise = dsLExpr e >>= \case+      Var y+        | Nothing <- isDataConId_maybe y+        -- Omit the let by matching on y+        -> pure [vanillaConGrd y trueDataCon []]+      rhs -> do+        x <- mkPmId boolTy+        pure $ [PmLet x rhs, vanillaConGrd x trueDataCon []]++{- Note [Field match order for RecCon]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The order for RecCon field patterns actually determines evaluation order of+the pattern match. For example:++  data T = T { a :: !Bool, b :: Char, c :: Int }+  f :: T -> ()+  f T{ c = 42, b = 'b' } = ()++Then+  * @f (T (error "a") (error "b") (error "c"))@ errors out with "a" because of+    the strict field.+  * @f (T True        (error "b") (error "c"))@ errors out with "c" because it+    is mentioned frist in the pattern match.++This means we can't just desugar the pattern match to the PatVec+@[T !_ 'b' 42]@. Instead we have to generate variable matches that have+strictness according to the field declarations and afterwards force them in the+right order. As a result, we get the PatVec @[T !_ b c, 42 <- c, 'b' <- b]@.++Of course, when the labels occur in the order they are defined, we can just use+the simpler desugaring.++Note [Order of guards matters]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Similar to Note [Field match order for RecCon], the order in which the guards+for a pattern match appear matter. Consider a situation similar to T5117:++  f (0:_)  = ()+  f (0:[]) = ()++The latter clause is clearly redundant. Yet if we translate the second clause as++  [x:xs' <- xs, [] <- xs', 0 <- x]++We will say that the second clause only has an inaccessible RHS. That's because+we force the tail of the list before comparing its head! So the correct+translation would have been++  [x:xs' <- xs, 0 <- x, [] <- xs']++And we have to take in the guards on list cells into @mkListGrds@.++Note [Countering exponential blowup]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Precise pattern match exhaustiveness checking is necessarily exponential in+the size of some input programs. We implement a counter-measure in the form of+the -fmax-pmcheck-models flag, limiting the number of Deltas we check against+each pattern by a constant.++How do we do that? Consider++  f True True = ()+  f True True = ()++And imagine we set our limit to 1 for the sake of the example. The first clause+will be checked against the initial Delta, {}. Doing so will produce an+Uncovered set of size 2, containing the models {x/~True} and {x~True,y/~True}.+Also we find the first clause to cover the model {x~True,y~True}.++But the Uncovered set we get out of the match is too huge! We somehow have to+ensure not to make things worse as they are already, so we continue checking+with a singleton Uncovered set of the initial Delta {}. Why is this+sound (wrt. notion of the GADTs Meet their Match paper)? Well, it basically+amounts to forgetting that we matched against the first clause. The values+represented by {} are a superset of those represented by its two refinements+{x/~True} and {x~True,y/~True}.++This forgetfulness becomes very apparent in the example above: By continuing+with {} we don't detect the second clause as redundant, as it again covers the+same non-empty subset of {}. So we don't flag everything as redundant anymore,+but still will never flag something as redundant that isn't.++For exhaustivity, the converse applies: We will report @f@ as non-exhaustive+and report @f _ _@ as missing, which is a superset of the actual missing+matches. But soundness means we will never fail to report a missing match.++This mechanism is implemented in the higher-order function 'throttle'.++Note [Combinatorial explosion in guards]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Function with many clauses and deeply nested guards like in #11195 tend to+overwhelm the checker because they lead to exponential splitting behavior.+See the comments on #11195 on refinement trees. Every guard refines the+disjunction of Deltas by another split. This no different than the ConVar case,+but in stark contrast we mostly don't get any useful information out of that+split! Hence splitting k-fold just means having k-fold more work. The problem+exacerbates for larger k, because it gets even more unlikely that we can handle+all of the arising Deltas better than just continue working on the original+Delta.++We simply apply the same mechanism as in Note [Countering exponential blowup].+But we don't want to forget about actually useful info from pattern match+clauses just because we had one clause with many guards. So we set the limit for+guards much lower.++Note [Translate CoPats]+~~~~~~~~~~~~~~~~~~~~~~~+The pattern match checker did not know how to handle coerced patterns `CoPat`+efficiently, which gave rise to #11276. The original approach translated+`CoPat`s:++    pat |> co    ===>    x (pat <- (x |> co))++Why did we do this seemingly unnecessary expansion in the first place?+The reason is that the type of @pat |> co@ (which is the type of the value+abstraction we match against) might be different than that of @pat@. Data+instances such as @Sing (a :: Bool)@ are a good example of this: If we would+just drop the coercion, we'd get a type error when matching @pat@ against its+value abstraction, with the result being that pmIsSatisfiable decides that every+possible data constructor fitting @pat@ is rejected as uninhabitated, leading to+a lot of false warnings.++But we can check whether the coercion is a hole or if it is just refl, in+which case we can drop it.++%************************************************************************+%*                                                                      *+                 Utilities for Pattern Match Checking+%*                                                                      *+%************************************************************************+-}++-- ----------------------------------------------------------------------------+-- * Basic utilities++{-+Note [Extensions to GADTs Meet Their Match]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The GADTs Meet Their Match paper presents the formalism that GHC's coverage+checker adheres to. Since the paper's publication, there have been some+additional features added to the coverage checker which are not described in+the paper. This Note serves as a reference for these new features.++* Value abstractions are severely simplified to the point where they are just+  variables. The information about the shape of a variable is encoded in+  the oracle state 'Delta' instead.+* Handling of uninhabited fields like `!Void`.+  See Note [Strict argument type constraints] in GHC.HsToCore.PmCheck.Oracle.+* Efficient handling of literal splitting, large enumerations and accurate+  redundancy warnings for `COMPLETE` groups through the oracle.++Note [Filtering out non-matching COMPLETE sets]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Currently, conlikes in a COMPLETE set are simply grouped by the+type constructor heading the return type. This is nice and simple, but it does+mean that there are scenarios when a COMPLETE set might be incompatible with+the type of a scrutinee. For instance, consider (from #14135):++  data Foo a = Foo1 a | Foo2 a++  pattern MyFoo2 :: Int -> Foo Int+  pattern MyFoo2 i = Foo2 i++  {-# COMPLETE Foo1, MyFoo2 #-}++  f :: Foo a -> a+  f (Foo1 x) = x++`f` has an incomplete pattern-match, so when choosing which constructors to+report as unmatched in a warning, GHC must choose between the original set of+data constructors {Foo1, Foo2} and the COMPLETE set {Foo1, MyFoo2}. But observe+that GHC shouldn't even consider the COMPLETE set as a possibility: the return+type of MyFoo2, Foo Int, does not match the type of the scrutinee, Foo a, since+there's no substitution `s` such that s(Foo Int) = Foo a.++To ensure that GHC doesn't pick this COMPLETE set, it checks each pattern+synonym constructor's return type matches the type of the scrutinee, and if one+doesn't, then we remove the whole COMPLETE set from consideration.++One might wonder why GHC only checks /pattern synonym/ constructors, and not+/data/ constructors as well. The reason is because that the type of a+GADT constructor very well may not match the type of a scrutinee, and that's+OK. Consider this example (from #14059):++  data SBool (z :: Bool) where+    SFalse :: SBool False+    STrue  :: SBool True++  pattern STooGoodToBeTrue :: forall (z :: Bool). ()+                           => z ~ True+                           => SBool z+  pattern STooGoodToBeTrue = STrue+  {-# COMPLETE SFalse, STooGoodToBeTrue #-}++  wobble :: SBool z -> Bool+  wobble STooGoodToBeTrue = True++In the incomplete pattern match for `wobble`, we /do/ want to warn that SFalse+should be matched against, even though its type, SBool False, does not match+the scrutinee type, SBool z.++SG: Another angle at this is that the implied constraints when we instantiate+universal type variables in the return type of a GADT will lead to *provided*+thetas, whereas when we instantiate the return type of a pattern synonym that+corresponds to a *required* theta. See Note [Pattern synonym result type] in+PatSyn. Note how isValidCompleteMatches will successfully filter out++    pattern Just42 :: Maybe Int+    pattern Just42 = Just 42++But fail to filter out the equivalent++    pattern Just'42 :: (a ~ Int) => Maybe a+    pattern Just'42 = Just 42++Which seems fine as far as tcMatchTy is concerned, but it raises a few eye+brows.+-}++{-+%************************************************************************+%*                                                                      *+            Heart of the algorithm: Function pmCheck+%*                                                                      *+%************************************************************************++Main functions are:++* pmCheck :: PatVec -> [PatVec] -> ValVec -> Delta -> DsM PartialResult++  This function implements functions `covered`, `uncovered` and+  `divergent` from the paper at once. Calls out to the auxilary function+  `pmCheckGuards` for handling (possibly multiple) guarded RHSs when the whole+  clause is checked. Slightly different from the paper because it does not even+  produce the covered and uncovered sets. Since we only care about whether a+  clause covers SOMETHING or if it may forces ANY argument, we only store a+  boolean in both cases, for efficiency.++* pmCheckGuards :: [PatVec] -> ValVec -> Delta -> DsM PartialResult++  Processes the guards.+-}++-- | @throttle limit f n delta@ executes the pattern match action @f@ but+-- replaces the 'Uncovered' set by @[delta]@ if not doing so would lead to+-- too many Deltas to check.+--+-- See Note [Countering exponential blowup] and+-- Note [Combinatorial explosion in guards]+--+-- How many is "too many"? @throttle@ assumes that the pattern match action+-- will be executed against @n@ similar other Deltas, its "siblings". Now, by+-- observing the branching factor (i.e. the number of children) of executing+-- the action, we can estimate how many Deltas there would be in the next+-- generation. If we find that this number exceeds @limit@, we do+-- "birth control": We simply don't allow a branching factor of more than 1.+-- Otherwise we just return the singleton set of the original @delta@.+-- This amounts to forgetting about the refined facts we got from running the+-- action.+throttle :: Int -> (Int -> Delta -> DsM PartialResult) -> Int -> Delta -> DsM (Int, PartialResult)+throttle limit f n_siblings delta = do+  res <- f n_siblings delta+  let n_own_children = length (presultUncovered res)+  let n_next_gen = n_siblings * n_own_children+  -- Birth control!+  if n_next_gen <= limit || n_own_children <= 1+    then pure (n_next_gen, res)+    else pure (n_siblings, res { presultUncovered = [delta], presultApprox = Approximate })++-- | Map a pattern matching action processing a single 'Delta' over a+-- 'Uncovered' set and return the combined 'PartialResult's.+runMany :: (Delta -> DsM PartialResult) -> Uncovered -> DsM PartialResult+runMany f unc = mconcat <$> traverse f unc++-- | Print diagnostic info and actually call 'pmCheck''.+pmCheck :: GrdVec -> [GrdVec] -> Int -> Delta -> DsM PartialResult+pmCheck ps guards n delta = do+  tracePm "pmCheck {" $ vcat [ ppr n <> colon+                           , hang (text "patterns:") 2 (ppr ps)+                           , hang (text "guards:") 2 (ppr guards)+                           , ppr delta ]+  res <- pmCheck' ps guards n delta+  tracePm "}:" (ppr res) -- braces are easier to match by tooling+  return res++-- | Lifts 'pmCheck' over a 'DsM (Maybe Delta)'.+pmCheckM :: GrdVec -> [GrdVec] -> Int -> DsM (Maybe Delta) -> DsM PartialResult+pmCheckM ps guards n m_mb_delta = m_mb_delta >>= \case+  Nothing    -> pure mempty+  Just delta -> pmCheck ps guards n delta++-- | Check the list of mutually exclusive guards+pmCheckGuards :: [GrdVec] -> Int -> Delta -> DsM PartialResult+pmCheckGuards []       _ delta = return (usimple delta)+pmCheckGuards (gv:gvs) n delta = do+  dflags <- getDynFlags+  let limit = maxPmCheckModels dflags `div` 5+  (n', PartialResult cs unc ds pc) <- throttle limit (pmCheck gv []) n delta+  (PartialResult css uncs dss pcs) <- runMany (pmCheckGuards gvs n') unc+  return $ PartialResult (cs `mappend` css)+                         uncs+                         (ds `mappend` dss)+                         (pc `mappend` pcs)++-- | Matching function: Check simultaneously a clause (takes separately the+-- patterns and the list of guards) for exhaustiveness, redundancy and+-- inaccessibility.+pmCheck'+  :: GrdVec   -- ^ Patterns of the clause+  -> [GrdVec] -- ^ (Possibly multiple) guards of the clause+  -> Int      -- ^ Estimate on the number of similar 'Delta's to handle.+              --   See 6. in Note [Countering exponential blowup]+  -> Delta    -- ^ Oracle state giving meaning to the identifiers in the ValVec+  -> DsM PartialResult+pmCheck' [] guards n delta+  | null guards = return $ mempty { presultCovered = Covered }+  | otherwise   = pmCheckGuards guards n delta++-- let x = e: Add x ~ e to the oracle+pmCheck' (PmLet { pm_id = x, pm_let_expr = e } : ps) guards n delta = do+  tracePm "PmLet" (vcat [ppr x, ppr e])+  -- x is fresh because it's bound by the let+  delta' <- expectJust "x is fresh" <$> addVarCoreCt delta x e+  pmCheck ps guards n delta'++-- Bang x: Add x /~ _|_ to the oracle+pmCheck' (PmBang x : ps) guards n delta = do+  tracePm "PmBang" (ppr x)+  pr <- pmCheckM ps guards n (addTmCt delta (TmVarNonVoid x))+  pure (forceIfCanDiverge delta x pr)++-- Con: Add x ~ K ys to the Covered set and x /~ K to the Uncovered set+pmCheck' (p : ps) guards n delta+  | PmCon{ pm_id = x, pm_con_con = con, pm_con_args = args+         , pm_con_dicts = dicts } <- p = do+  -- E.g   f (K p q) = <rhs>+  --       <next equation>+  -- Split delta into two refinements:+  --    * one for <rhs>, binding x to (K p q)+  --    * one for <next equation>, recording that x is /not/ (K _ _)++  -- Stuff for <rhs>+  pr_pos <- pmCheckM ps guards n (addPmConCts delta x con dicts args)++  -- The var is forced regardless of whether @con@ was satisfiable+  -- See Note [Divergence of Newtype matches]+  let pr_pos' = addConMatchStrictness delta x con pr_pos++  -- Stuff for <next equation>+  pr_neg <- addRefutableAltCon delta x con >>= \case+    Nothing     -> pure mempty+    Just delta' -> pure (usimple delta')++  tracePm "PmCon" (vcat [ppr p, ppr x, ppr pr_pos', ppr pr_neg])++  -- Combine both into a single PartialResult+  let pr = mkUnion pr_pos' pr_neg+  pure pr++addPmConCts :: Delta -> Id -> PmAltCon -> [EvVar] -> [Id] -> DsM (Maybe Delta)+addPmConCts delta x con dicts fields = runMaybeT $ do+  delta_ty    <- MaybeT $ addTypeEvidence delta (listToBag dicts)+  delta_tm_ty <- MaybeT $ addTmCt delta_ty (TmVarCon x con fields)+  pure delta_tm_ty++-- ----------------------------------------------------------------------------+-- * Utilities for main checking++-- | Initialise with default values for covering and divergent information and+-- a singleton uncovered set.+usimple :: Delta -> PartialResult+usimple delta = mempty { presultUncovered = [delta] }++-- | Get the union of two covered, uncovered and divergent value set+-- abstractions. Since the covered and divergent sets are represented by a+-- boolean, union means computing the logical or (at least one of the two is+-- non-empty).++mkUnion :: PartialResult -> PartialResult -> PartialResult+mkUnion = mappend++-- | Set the divergent set to not empty+forces :: PartialResult -> PartialResult+forces pres = pres { presultDivergent = Diverged }++-- | Set the divergent set to non-empty if the variable has not been forced yet+forceIfCanDiverge :: Delta -> Id -> PartialResult -> PartialResult+forceIfCanDiverge delta x+  | canDiverge delta x = forces+  | otherwise          = id++-- | 'forceIfCanDiverge' if the 'PmAltCon' was not a Newtype.+-- See Note [Divergence of Newtype matches].+addConMatchStrictness :: Delta -> Id -> PmAltCon -> PartialResult -> PartialResult+addConMatchStrictness _     _ (PmAltConLike (RealDataCon dc)) res+  | isNewTyCon (dataConTyCon dc) = res+addConMatchStrictness delta x _ res = forceIfCanDiverge delta x res++-- ----------------------------------------------------------------------------+-- * Propagation of term constraints inwards when checking nested matches++{- Note [Type and Term Equality Propagation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When checking a match it would be great to have all type and term information+available so we can get more precise results. For this reason we have functions+`addDictsDs' and `addTmVarCsDs' in DsMonad that store in the environment type and+term constraints (respectively) as we go deeper.++The type constraints we propagate inwards are collected by `collectEvVarsPats'+in GHC.Hs.Pat. This handles bug #4139 ( see example+  https://gitlab.haskell.org/ghc/ghc/snippets/672 )+where this is needed.++For term equalities we do less, we just generate equalities for HsCase. For+example we accurately give 2 redundancy warnings for the marked cases:++f :: [a] -> Bool+f x = case x of++  []    -> case x of        -- brings (x ~ []) in scope+             []    -> True+             (_:_) -> False -- can't happen++  (_:_) -> case x of        -- brings (x ~ (_:_)) in scope+             (_:_) -> True+             []    -> False -- can't happen++Functions `addScrutTmCs' and `addPatTmCs' are responsible for generating+these constraints.+-}++locallyExtendPmDelta :: (Delta -> DsM (Maybe Delta)) -> DsM a -> DsM a+locallyExtendPmDelta ext k = getPmDelta >>= ext >>= \case+  -- If adding a constraint would lead to a contradiction, don't add it.+  -- See @Note [Recovering from unsatisfiable pattern-matching constraints]@+  -- for why this is done.+  Nothing     -> k+  Just delta' -> updPmDelta delta' k++-- | Add in-scope type constraints+addTyCsDs :: Bag EvVar -> DsM a -> DsM a+addTyCsDs ev_vars =+  locallyExtendPmDelta (\delta -> addTypeEvidence delta ev_vars)++-- | Add equalities for the scrutinee to the local 'DsM' environment when+-- checking a case expression:+--     case e of x { matches }+-- When checking matches we record that (x ~ e) where x is the initial+-- uncovered. All matches will have to satisfy this equality.+addScrutTmCs :: Maybe (LHsExpr GhcTc) -> [Id] -> DsM a -> DsM a+addScrutTmCs Nothing    _   k = k+addScrutTmCs (Just scr) [x] k = do+  scr_e <- dsLExpr scr+  locallyExtendPmDelta (\delta -> addVarCoreCt delta x scr_e) k+addScrutTmCs _   _   _ = panic "addScrutTmCs: HsCase with more than one case binder"++-- | Add equalities to the local 'DsM' environment when checking the RHS of a+-- case expression:+--     case e of x { p1 -> e1; ... pn -> en }+-- When we go deeper to check e.g. e1 we record (x ~ p1).+addPatTmCs :: [Pat GhcTc]           -- LHS       (should have length 1)+           -> [Id]                  -- MatchVars (should have length 1)+           -> DsM a+           -> DsM a+-- Computes an approximation of the Covered set for p1 (which pmCheck currently+-- discards).+addPatTmCs ps xs k = do+  fam_insts <- dsGetFamInstEnvs+  grds <- concat <$> zipWithM (translatePat fam_insts) xs ps+  locallyExtendPmDelta (\delta -> computeCovered grds delta) k++-- | A dead simple version of 'pmCheck' that only computes the Covered set.+-- So it only cares about collecting positive info.+-- We use it to collect info from a pattern when we check its RHS.+-- See 'addPatTmCs'.+computeCovered :: GrdVec -> Delta -> DsM (Maybe Delta)+-- The duplication with 'pmCheck' is really unfortunate, but it's simpler than+-- separating out the common cases with 'pmCheck', because that would make the+-- ConVar case harder to understand.+computeCovered [] delta = pure (Just delta)+computeCovered (PmLet { pm_id = x, pm_let_expr = e } : ps) delta = do+  delta' <- expectJust "x is fresh" <$> addVarCoreCt delta x e+  computeCovered ps delta'+computeCovered (PmBang{} : ps) delta = do+  computeCovered ps delta+computeCovered (p : ps) delta+  | PmCon{ pm_id = x, pm_con_con = con, pm_con_args = args+         , pm_con_dicts = dicts } <- p+  = addPmConCts delta x con dicts args >>= \case+      Nothing     -> pure Nothing+      Just delta' -> computeCovered ps delta'++{-+%************************************************************************+%*                                                                      *+      Pretty printing of exhaustiveness/redundancy check warnings+%*                                                                      *+%************************************************************************+-}++-- | Check whether any part of pattern match checking is enabled for this+-- 'HsMatchContext' (does not matter whether it is the redundancy check or the+-- exhaustiveness check).+isMatchContextPmChecked :: DynFlags -> Origin -> HsMatchContext id -> Bool+isMatchContextPmChecked dflags origin kind+  | isGenerated origin+  = False+  | otherwise+  = wopt Opt_WarnOverlappingPatterns dflags || exhaustive dflags kind++-- | Return True when any of the pattern match warnings ('allPmCheckWarnings')+-- are enabled, in which case we need to run the pattern match checker.+needToRunPmCheck :: DynFlags -> Origin -> Bool+needToRunPmCheck dflags origin+  | isGenerated origin+  = False+  | otherwise+  = notNull (filter (`wopt` dflags) allPmCheckWarnings)++-- | Issue all the warnings (coverage, exhaustiveness, inaccessibility)+dsPmWarn :: DynFlags -> DsMatchContext -> [Id] -> PmResult -> DsM ()+dsPmWarn dflags ctx@(DsMatchContext kind loc) vars pm_result+  = when (flag_i || flag_u) $ do+      let exists_r = flag_i && notNull redundant+          exists_i = flag_i && notNull inaccessible && not is_rec_upd+          exists_u = flag_u && notNull uncovered+          approx   = precision == Approximate++      when (approx && (exists_u || exists_i)) $+        putSrcSpanDs loc (warnDs NoReason approx_msg)++      when exists_r $ forM_ redundant $ \(dL->L l q) -> do+        putSrcSpanDs l (warnDs (Reason Opt_WarnOverlappingPatterns)+                               (pprEqn q "is redundant"))+      when exists_i $ forM_ inaccessible $ \(dL->L l q) -> do+        putSrcSpanDs l (warnDs (Reason Opt_WarnOverlappingPatterns)+                               (pprEqn q "has inaccessible right hand side"))+      when exists_u $ putSrcSpanDs loc $ warnDs flag_u_reason $+        pprEqns vars uncovered+  where+    PmResult+      { pmresultRedundant = redundant+      , pmresultUncovered = uncovered+      , pmresultInaccessible = inaccessible+      , pmresultApproximate = precision } = pm_result++    flag_i = wopt Opt_WarnOverlappingPatterns dflags+    flag_u = exhaustive dflags kind+    flag_u_reason = maybe NoReason Reason (exhaustiveWarningFlag kind)++    is_rec_upd = case kind of { RecUpd -> True; _ -> False }+       -- See Note [Inaccessible warnings for record updates]++    maxPatterns = maxUncoveredPatterns dflags++    -- Print a single clause (for redundant/with-inaccessible-rhs)+    pprEqn q txt = pprContext True ctx (text txt) $ \f ->+      f (pprPats kind (map unLoc q))++    -- Print several clauses (for uncovered clauses)+    pprEqns vars deltas = pprContext False ctx (text "are non-exhaustive") $ \_ ->+      case vars of -- See #11245+           [] -> text "Guards do not cover entire pattern space"+           _  -> let us = map (\delta -> pprUncovered delta vars) deltas+                 in  hang (text "Patterns not matched:") 4+                       (vcat (take maxPatterns us) $$ dots maxPatterns us)++    approx_msg = vcat+      [ hang+          (text "Pattern match checker ran into -fmax-pmcheck-models="+            <> int (maxPmCheckModels dflags)+            <> text " limit, so")+          2+          (  bullet <+> text "Redundant clauses might not be reported at all"+          $$ bullet <+> text "Redundant clauses might be reported as inaccessible"+          $$ bullet <+> text "Patterns reported as unmatched might actually be matched")+      , text "Increase the limit or resolve the warnings to suppress this message." ]++{- Note [Inaccessible warnings for record updates]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#12957)+  data T a where+    T1 :: { x :: Int } -> T Bool+    T2 :: { x :: Int } -> T a+    T3 :: T a++  f :: T Char -> T a+  f r = r { x = 3 }++The desugarer will (conservatively generate a case for T1 even though+it's impossible:+  f r = case r of+          T1 x -> T1 3   -- Inaccessible branch+          T2 x -> T2 3+          _    -> error "Missing"++We don't want to warn about the inaccessible branch because the programmer+didn't put it there!  So we filter out the warning here.+-}++dots :: Int -> [a] -> SDoc+dots maxPatterns qs+    | qs `lengthExceeds` maxPatterns = text "..."+    | otherwise                      = empty++-- | All warning flags that need to run the pattern match checker.+allPmCheckWarnings :: [WarningFlag]+allPmCheckWarnings =+  [ Opt_WarnIncompletePatterns+  , Opt_WarnIncompleteUniPatterns+  , Opt_WarnIncompletePatternsRecUpd+  , Opt_WarnOverlappingPatterns+  ]++-- | Check whether the exhaustiveness checker should run (exhaustiveness only)+exhaustive :: DynFlags -> HsMatchContext id -> Bool+exhaustive  dflags = maybe False (`wopt` dflags) . exhaustiveWarningFlag++-- | Denotes whether an exhaustiveness check is supported, and if so,+-- via which 'WarningFlag' it's controlled.+-- Returns 'Nothing' if check is not supported.+exhaustiveWarningFlag :: HsMatchContext id -> Maybe WarningFlag+exhaustiveWarningFlag (FunRhs {})   = Just Opt_WarnIncompletePatterns+exhaustiveWarningFlag CaseAlt       = Just Opt_WarnIncompletePatterns+exhaustiveWarningFlag IfAlt         = Just Opt_WarnIncompletePatterns+exhaustiveWarningFlag LambdaExpr    = Just Opt_WarnIncompleteUniPatterns+exhaustiveWarningFlag PatBindRhs    = Just Opt_WarnIncompleteUniPatterns+exhaustiveWarningFlag PatBindGuards = Just Opt_WarnIncompletePatterns+exhaustiveWarningFlag ProcExpr      = Just Opt_WarnIncompleteUniPatterns+exhaustiveWarningFlag RecUpd        = Just Opt_WarnIncompletePatternsRecUpd+exhaustiveWarningFlag ThPatSplice   = Nothing+exhaustiveWarningFlag PatSyn        = Nothing+exhaustiveWarningFlag ThPatQuote    = Nothing+exhaustiveWarningFlag (StmtCtxt {}) = Nothing -- Don't warn about incomplete patterns+                                       -- in list comprehensions, pattern guards+                                       -- etc. They are often *supposed* to be+                                       -- incomplete++-- True <==> singular+pprContext :: Bool -> DsMatchContext -> SDoc -> ((SDoc -> SDoc) -> SDoc) -> SDoc+pprContext singular (DsMatchContext kind _loc) msg rest_of_msg_fun+  = vcat [text txt <+> msg,+          sep [ text "In" <+> ppr_match <> char ':'+              , nest 4 (rest_of_msg_fun pref)]]+  where+    txt | singular  = "Pattern match"+        | otherwise = "Pattern match(es)"++    (ppr_match, pref)+        = case kind of+             FunRhs { mc_fun = (dL->L _ fun) }+                  -> (pprMatchContext kind, \ pp -> ppr fun <+> pp)+             _    -> (pprMatchContext kind, \ pp -> pp)++pprPats :: HsMatchContext Name -> [Pat GhcTc] -> SDoc+pprPats kind pats+  = sep [sep (map ppr pats), matchSeparator kind, text "..."]
+ GHC/HsToCore/PmCheck/Oracle.hs view
@@ -0,0 +1,1651 @@+{-+Authors: George Karachalias <george.karachalias@cs.kuleuven.be>+         Sebastian Graf <sgraf1337@gmail.com>+         Ryan Scott <ryan.gl.scott@gmail.com>+-}++{-# LANGUAGE CPP, LambdaCase, TupleSections, PatternSynonyms, ViewPatterns, MultiWayIf #-}++-- | The pattern match oracle. The main export of the module are the functions+-- 'addTmCt', 'addVarCoreCt', 'addRefutableAltCon' and 'addTypeEvidence' for+-- adding facts to the oracle, and 'provideEvidence' to turn a+-- 'Delta' into a concrete evidence for an equation.+module GHC.HsToCore.PmCheck.Oracle (++        DsM, tracePm, mkPmId,+        Delta, initDelta, lookupRefuts, lookupSolution,++        TmCt(..),+        addTypeEvidence,    -- Add type equalities+        addRefutableAltCon, -- Add a negative term equality+        addTmCt,            -- Add a positive term equality x ~ e+        addVarCoreCt,       -- Add a positive term equality x ~ core_expr+        canDiverge,         -- Try to add the term equality x ~ ⊥+        provideEvidence,+    ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.HsToCore.PmCheck.Types++import DynFlags+import Outputable+import ErrUtils+import Util+import Bag+import UniqSet+import UniqDSet+import Unique+import Id+import VarEnv+import UniqDFM+import Var           (EvVar)+import Name+import CoreSyn+import CoreFVs ( exprFreeVars )+import CoreMap+import CoreOpt (simpleOptExpr, exprIsConApp_maybe)+import CoreUtils (exprType)+import MkCore (mkListExpr, mkCharExpr)+import UniqSupply+import FastString+import SrcLoc+import ListSetOps (unionLists)+import Maybes+import ConLike+import DataCon+import PatSyn+import TyCon+import TysWiredIn+import TysPrim (tYPETyCon)+import TyCoRep+import Type+import TcSimplify    (tcNormalise, tcCheckSatisfiability)+import TcType        (evVarPred)+import Unify         (tcMatchTy)+import TcRnTypes     (completeMatchConLikes)+import Coercion+import MonadUtils hiding (foldlM)+import DsMonad hiding (foldlM)+import FamInst+import FamInstEnv++import Control.Monad (guard, mzero)+import Control.Monad.Trans.Class (lift)+import Control.Monad.Trans.State.Strict+import Data.Bifunctor (second)+import Data.Foldable (foldlM, minimumBy)+import Data.List     (find)+import qualified Data.List.NonEmpty as NonEmpty+import Data.Ord      (comparing)+import qualified Data.Semigroup as Semigroup+import Data.Tuple    (swap)++-- Debugging Infrastructre++tracePm :: String -> SDoc -> DsM ()+tracePm herald doc = do+  dflags <- getDynFlags+  printer <- mkPrintUnqualifiedDs+  liftIO $ dumpIfSet_dyn_printer printer dflags+            Opt_D_dump_ec_trace (text herald $$ (nest 2 doc))++-- | Generate a fresh `Id` of a given type+mkPmId :: Type -> DsM Id+mkPmId ty = getUniqueM >>= \unique ->+  let occname = mkVarOccFS $ fsLit "pm"+      name    = mkInternalName unique occname noSrcSpan+  in  return (mkLocalId name ty)++-----------------------------------------------+-- * Caching possible matches of a COMPLETE set++markMatched :: ConLike -> PossibleMatches -> PossibleMatches+markMatched _   NoPM    = NoPM+markMatched con (PM ms) = PM (del_one_con con <$> ms)+  where+    del_one_con = flip delOneFromUniqDSet++---------------------------------------------------+-- * Instantiating constructors, types and evidence++-- | Instantiate a 'ConLike' given its universal type arguments. Instantiates+-- existential and term binders with fresh variables of appropriate type.+-- Returns instantiated term variables from the match, type evidence and the+-- types of strict constructor fields.+mkOneConFull :: [Type] -> ConLike -> DsM ([Id], Bag TyCt, [Type])+--  * 'con' K is a ConLike+--       - In the case of DataCons and most PatSynCons, these+--         are associated with a particular TyCon T+--       - But there are PatSynCons for this is not the case! See #11336, #17112+--+--  * 'arg_tys' tys are the types K's universally quantified type+--     variables should be instantiated to.+--       - For DataCons and most PatSyns these are the arguments of their TyCon+--       - For cases like the PatSyns in #11336, #17112, we can't easily guess+--         these, so don't call this function.+--+-- After instantiating the universal tyvars of K to tys we get+--          K @tys :: forall bs. Q => s1 .. sn -> T tys+-- Note that if K is a PatSynCon, depending on arg_tys, T might not necessarily+-- be a concrete TyCon.+--+-- Suppose y1 is a strict field. Then we get+-- Results: [y1,..,yn]+--          Q+--          [s1]+mkOneConFull arg_tys con = do+  let (univ_tvs, ex_tvs, eq_spec, thetas, _req_theta , field_tys, _con_res_ty)+        = conLikeFullSig con+  -- pprTrace "mkOneConFull" (ppr con $$ ppr arg_tys $$ ppr univ_tvs $$ ppr _con_res_ty) (return ())+  -- Substitute universals for type arguments+  let subst_univ = zipTvSubst univ_tvs arg_tys+  -- Instantiate fresh existentials as arguments to the contructor. This is+  -- important for instantiating the Thetas and field types.+  (subst, _) <- cloneTyVarBndrs subst_univ ex_tvs <$> getUniqueSupplyM+  let field_tys' = substTys subst field_tys+  -- Instantiate fresh term variables (VAs) as arguments to the constructor+  vars <- mapM mkPmId field_tys'+  -- All constraints bound by the constructor (alpha-renamed), these are added+  -- to the type oracle+  let ty_cs = map TyCt (substTheta subst (eqSpecPreds eq_spec ++ thetas))+  -- Figure out the types of strict constructor fields+  let arg_is_strict+        | RealDataCon dc <- con+        , isNewTyCon (dataConTyCon dc)+        = [True] -- See Note [Divergence of Newtype matches]+        | otherwise+        = map isBanged $ conLikeImplBangs con+      strict_arg_tys = filterByList arg_is_strict field_tys'+  return (vars, listToBag ty_cs, strict_arg_tys)++-------------------------+-- * Pattern match oracle+++{- Note [Recovering from unsatisfiable pattern-matching constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the following code (see #12957 and #15450):++  f :: Int ~ Bool => ()+  f = case True of { False -> () }++We want to warn that the pattern-matching in `f` is non-exhaustive. But GHC+used not to do this; in fact, it would warn that the match was /redundant/!+This is because the constraint (Int ~ Bool) in `f` is unsatisfiable, and the+coverage checker deems any matches with unsatifiable constraint sets to be+unreachable.++We decide to better than this. When beginning coverage checking, we first+check if the constraints in scope are unsatisfiable, and if so, we start+afresh with an empty set of constraints. This way, we'll get the warnings+that we expect.+-}++-------------------------------------+-- * Composable satisfiability checks++-- | Given a 'Delta', check if it is compatible with new facts encoded in this+-- this check. If so, return 'Just' a potentially extended 'Delta'. Return+-- 'Nothing' if unsatisfiable.+--+-- There are three essential SatisfiabilityChecks:+--   1. 'tmIsSatisfiable', adding term oracle facts+--   2. 'tyIsSatisfiable', adding type oracle facts+--   3. 'tysAreNonVoid', checks if the given types have an inhabitant+-- Functions like 'pmIsSatisfiable', 'nonVoid' and 'testInhabited' plug these+-- together as they see fit.+newtype SatisfiabilityCheck = SC (Delta -> DsM (Maybe Delta))++-- | Check the given 'Delta' for satisfiability by the the given+-- 'SatisfiabilityCheck'. Return 'Just' a new, potentially extended, 'Delta' if+-- successful, and 'Nothing' otherwise.+runSatisfiabilityCheck :: Delta -> SatisfiabilityCheck -> DsM (Maybe Delta)+runSatisfiabilityCheck delta (SC chk) = chk delta++-- | Allowing easy composition of 'SatisfiabilityCheck's.+instance Semigroup SatisfiabilityCheck where+  -- This is @a >=> b@ from MaybeT DsM+  SC a <> SC b = SC c+    where+      c delta = a delta >>= \case+        Nothing     -> pure Nothing+        Just delta' -> b delta'++instance Monoid SatisfiabilityCheck where+  -- We only need this because of mconcat (which we use in place of sconcat,+  -- which requires NonEmpty lists as argument, making all call sites ugly)+  mempty = SC (pure . Just)++-------------------------------+-- * Oracle transition function++-- | Given a conlike's term constraints, type constraints, and strict argument+-- types, check if they are satisfiable.+-- (In other words, this is the ⊢_Sat oracle judgment from the GADTs Meet+-- Their Match paper.)+--+-- Taking strict argument types into account is something which was not+-- discussed in GADTs Meet Their Match. For an explanation of what role they+-- serve, see @Note [Strict argument type constraints]@.+pmIsSatisfiable+  :: Delta       -- ^ The ambient term and type constraints+                 --   (known to be satisfiable).+  -> Bag TmCt    -- ^ The new term constraints.+  -> Bag TyCt    -- ^ The new type constraints.+  -> [Type]      -- ^ The strict argument types.+  -> DsM (Maybe Delta)+                 -- ^ @'Just' delta@ if the constraints (@delta@) are+                 -- satisfiable, and each strict argument type is inhabitable.+                 -- 'Nothing' otherwise.+pmIsSatisfiable amb_cs new_tm_cs new_ty_cs strict_arg_tys =+  -- The order is important here! Check the new type constraints before we check+  -- whether strict argument types are inhabited given those constraints.+  runSatisfiabilityCheck amb_cs $ mconcat+    [ tyIsSatisfiable True new_ty_cs+    , tmIsSatisfiable new_tm_cs+    , tysAreNonVoid initRecTc strict_arg_tys+    ]++-----------------------+-- * Type normalisation++-- | The return value of 'pmTopNormaliseType'+data TopNormaliseTypeResult+  = NoChange Type+  -- ^ 'tcNormalise' failed to simplify the type and 'topNormaliseTypeX' was+  -- unable to reduce the outermost type application, so the type came out+  -- unchanged.+  | NormalisedByConstraints Type+  -- ^ 'tcNormalise' was able to simplify the type with some local constraint+  -- from the type oracle, but 'topNormaliseTypeX' couldn't identify a type+  -- redex.+  | HadRedexes Type [(Type, DataCon, Type)] Type+  -- ^ 'tcNormalise' may or may not been able to simplify the type, but+  -- 'topNormaliseTypeX' made progress either way and got rid of at least one+  -- outermost type or data family redex or newtype.+  -- The first field is the last type that was reduced solely through type+  -- family applications (possibly just the 'tcNormalise'd type). This is the+  -- one that is equal (in source Haskell) to the initial type.+  -- The third field is the type that we get when also looking through data+  -- family applications and newtypes. This would be the representation type in+  -- Core (modulo casts).+  -- The second field is the list of Newtype 'DataCon's that we looked through+  -- in the chain of reduction steps between the Source type and the Core type.+  -- We also keep the type of the DataCon application and its field, so that we+  -- don't have to reconstruct it in 'inhabitationCandidates' and+  -- 'provideEvidence'.+  -- For an example, see Note [Type normalisation].++-- | Just give me the potentially normalised source type, unchanged or not!+normalisedSourceType :: TopNormaliseTypeResult -> Type+normalisedSourceType (NoChange ty)                = ty+normalisedSourceType (NormalisedByConstraints ty) = ty+normalisedSourceType (HadRedexes ty _ _)          = ty++-- | Return the fields of 'HadRedexes'. Returns appropriate defaults in the+-- other cases.+tntrGuts :: TopNormaliseTypeResult -> (Type, [(Type, DataCon, Type)], Type)+tntrGuts (NoChange ty)                  = (ty,     [],      ty)+tntrGuts (NormalisedByConstraints ty)   = (ty,     [],      ty)+tntrGuts (HadRedexes src_ty ds core_ty) = (src_ty, ds, core_ty)++instance Outputable TopNormaliseTypeResult where+  ppr (NoChange ty)                  = text "NoChange" <+> ppr ty+  ppr (NormalisedByConstraints ty)   = text "NormalisedByConstraints" <+> ppr ty+  ppr (HadRedexes src_ty ds core_ty) = text "HadRedexes" <+> braces fields+    where+      fields = fsep (punctuate comma [ text "src_ty =" <+> ppr src_ty+                                     , text "newtype_dcs =" <+> ppr ds+                                     , text "core_ty =" <+> ppr core_ty ])++pmTopNormaliseType :: TyState -> Type -> DsM TopNormaliseTypeResult+-- ^ Get rid of *outermost* (or toplevel)+--      * type function redex+--      * data family redex+--      * newtypes+--+-- Behaves like `topNormaliseType_maybe`, but instead of returning a+-- coercion, it returns useful information for issuing pattern matching+-- warnings. See Note [Type normalisation] for details.+-- It also initially 'tcNormalise's the type with the bag of local constraints.+--+-- See 'TopNormaliseTypeResult' for the meaning of the return value.+--+-- NB: Normalisation can potentially change kinds, if the head of the type+-- is a type family with a variable result kind. I (Richard E) can't think+-- of a way to cause trouble here, though.+pmTopNormaliseType (TySt inert) typ+  = do env <- dsGetFamInstEnvs+       -- Before proceeding, we chuck typ into the constraint solver, in case+       -- solving for given equalities may reduce typ some. See+       -- "Wrinkle: local equalities" in Note [Type normalisation].+       (_, mb_typ') <- initTcDsForSolver $ tcNormalise inert typ+       -- If tcNormalise didn't manage to simplify the type, continue anyway.+       -- We might be able to reduce type applications nonetheless!+       let typ' = fromMaybe typ mb_typ'+       -- Now we look with topNormaliseTypeX through type and data family+       -- applications and newtypes, which tcNormalise does not do.+       -- See also 'TopNormaliseTypeResult'.+       pure $ case topNormaliseTypeX (stepper env) comb typ' of+         Nothing+           | Nothing <- mb_typ' -> NoChange typ+           | otherwise          -> NormalisedByConstraints typ'+         Just ((ty_f,tm_f), ty) -> HadRedexes src_ty newtype_dcs core_ty+           where+             src_ty = eq_src_ty ty (typ' : ty_f [ty])+             newtype_dcs = tm_f []+             core_ty = ty+  where+    -- Find the first type in the sequence of rewrites that is a data type,+    -- newtype, or a data family application (not the representation tycon!).+    -- This is the one that is equal (in source Haskell) to the initial type.+    -- If none is found in the list, then all of them are type family+    -- applications, so we simply return the last one, which is the *simplest*.+    eq_src_ty :: Type -> [Type] -> Type+    eq_src_ty ty tys = maybe ty id (find is_closed_or_data_family tys)++    is_closed_or_data_family :: Type -> Bool+    is_closed_or_data_family ty = pmIsClosedType ty || isDataFamilyAppType ty++    -- For efficiency, represent both lists as difference lists.+    -- comb performs the concatenation, for both lists.+    comb (tyf1, tmf1) (tyf2, tmf2) = (tyf1 . tyf2, tmf1 . tmf2)++    stepper env = newTypeStepper `composeSteppers` tyFamStepper env++    -- A 'NormaliseStepper' that unwraps newtypes, careful not to fall into+    -- a loop. If it would fall into a loop, it produces 'NS_Abort'.+    newTypeStepper :: NormaliseStepper ([Type] -> [Type],[(Type, DataCon, Type)] -> [(Type, DataCon, Type)])+    newTypeStepper rec_nts tc tys+      | Just (ty', _co) <- instNewTyCon_maybe tc tys+      , let orig_ty = TyConApp tc tys+      = case checkRecTc rec_nts tc of+          Just rec_nts' -> let tyf = (orig_ty:)+                               tmf = ((orig_ty, tyConSingleDataCon tc, ty'):)+                           in  NS_Step rec_nts' ty' (tyf, tmf)+          Nothing       -> NS_Abort+      | otherwise+      = NS_Done++    tyFamStepper :: FamInstEnvs -> NormaliseStepper ([Type] -> [Type], a -> a)+    tyFamStepper env rec_nts tc tys  -- Try to step a type/data family+      = let (_args_co, ntys, _res_co) = normaliseTcArgs env Representational tc tys in+          -- NB: It's OK to use normaliseTcArgs here instead of+          -- normalise_tc_args (which takes the LiftingContext described+          -- in Note [Normalising types]) because the reduceTyFamApp below+          -- works only at top level. We'll never recur in this function+          -- after reducing the kind of a bound tyvar.++        case reduceTyFamApp_maybe env Representational tc ntys of+          Just (_co, rhs) -> NS_Step rec_nts rhs ((rhs:), id)+          _               -> NS_Done++-- | Returns 'True' if the argument 'Type' is a fully saturated application of+-- a closed type constructor.+--+-- Closed type constructors are those with a fixed right hand side, as+-- opposed to e.g. associated types. These are of particular interest for+-- pattern-match coverage checking, because GHC can exhaustively consider all+-- possible forms that values of a closed type can take on.+--+-- Note that this function is intended to be used to check types of value-level+-- patterns, so as a consequence, the 'Type' supplied as an argument to this+-- function should be of kind @Type@.+pmIsClosedType :: Type -> Bool+pmIsClosedType ty+  = case splitTyConApp_maybe ty of+      Just (tc, ty_args)+             | is_algebraic_like tc && not (isFamilyTyCon tc)+             -> ASSERT2( ty_args `lengthIs` tyConArity tc, ppr ty ) True+      _other -> False+  where+    -- This returns True for TyCons which /act like/ algebraic types.+    -- (See "Type#type_classification" for what an algebraic type is.)+    --+    -- This is qualified with \"like\" because of a particular special+    -- case: TYPE (the underlyind kind behind Type, among others). TYPE+    -- is conceptually a datatype (and thus algebraic), but in practice it is+    -- a primitive builtin type, so we must check for it specially.+    --+    -- NB: it makes sense to think of TYPE as a closed type in a value-level,+    -- pattern-matching context. However, at the kind level, TYPE is certainly+    -- not closed! Since this function is specifically tailored towards pattern+    -- matching, however, it's OK to label TYPE as closed.+    is_algebraic_like :: TyCon -> Bool+    is_algebraic_like tc = isAlgTyCon tc || tc == tYPETyCon++{- Note [Type normalisation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Constructs like -XEmptyCase or a previous unsuccessful pattern match on a data+constructor place a non-void constraint on the matched thing. This means that it+boils down to checking whether the type of the scrutinee is inhabited. Function+pmTopNormaliseType gets rid of the outermost type function/data family redex and+newtypes, in search of an algebraic type constructor, which is easier to check+for inhabitation.++It returns 3 results instead of one, because there are 2 subtle points:+1. Newtypes are isomorphic to the underlying type in core but not in the source+   language,+2. The representational data family tycon is used internally but should not be+   shown to the user++Hence, if pmTopNormaliseType env ty_cs ty = Just (src_ty, dcs, core_ty),+then+  (a) src_ty is the rewritten type which we can show to the user. That is, the+      type we get if we rewrite type families but not data families or+      newtypes.+  (b) dcs is the list of newtype constructors "skipped", every time we normalise+      a newtype to its core representation, we keep track of the source data+      constructor. For convenienve, we also track the type we unwrap and the+      type of its field. Example: @Down 42@ => @[(Down @Int, Down, Int)]+  (c) core_ty is the rewritten type. That is,+        pmTopNormaliseType env ty_cs ty = Just (src_ty, dcs, core_ty)+      implies+        topNormaliseType_maybe env ty = Just (co, core_ty)+      for some coercion co.++To see how all cases come into play, consider the following example:++  data family T a :: *+  data instance T Int = T1 | T2 Bool+  -- Which gives rise to FC:+  --   data T a+  --   data R:TInt = T1 | T2 Bool+  --   axiom ax_ti : T Int ~R R:TInt++  newtype G1 = MkG1 (T Int)+  newtype G2 = MkG2 G1++  type instance F Int  = F Char+  type instance F Char = G2++In this case pmTopNormaliseType env ty_cs (F Int) results in++  Just (G2, [(G2,MkG2,G1),(G1,MkG1,T Int)], R:TInt)++Which means that in source Haskell:+  - G2 is equivalent to F Int (in contrast, G1 isn't).+  - if (x : R:TInt) then (MkG2 (MkG1 x) : F Int).++-----+-- Wrinkle: Local equalities+-----++Given the following type family:++  type family F a+  type instance F Int = Void++Should the following program (from #14813) be considered exhaustive?++  f :: (i ~ Int) => F i -> a+  f x = case x of {}++You might think "of course, since `x` is obviously of type Void". But the+idType of `x` is technically F i, not Void, so if we pass F i to+inhabitationCandidates, we'll mistakenly conclude that `f` is non-exhaustive.+In order to avoid this pitfall, we need to normalise the type passed to+pmTopNormaliseType, using the constraint solver to solve for any local+equalities (such as i ~ Int) that may be in scope.+-}++----------------+-- * Type oracle++-- | Wraps a 'PredType', which is a constraint type.+newtype TyCt = TyCt PredType++instance Outputable TyCt where+  ppr (TyCt pred_ty) = ppr pred_ty++-- | Allocates a fresh 'EvVar' name for 'PredTyCt's, or simply returns the+-- wrapped 'EvVar' for 'EvVarTyCt's.+nameTyCt :: TyCt -> DsM EvVar+nameTyCt (TyCt pred_ty) = do+  unique <- getUniqueM+  let occname = mkVarOccFS (fsLit ("pm_"++show unique))+      idname  = mkInternalName unique occname noSrcSpan+  return (mkLocalId idname pred_ty)++-- | Add some extra type constraints to the 'TyState'; return 'Nothing' if we+-- find a contradiction (e.g. @Int ~ Bool@).+tyOracle :: TyState -> Bag TyCt -> DsM (Maybe TyState)+tyOracle (TySt inert) cts+  = do { evs <- traverse nameTyCt cts+       ; let new_inert = inert `unionBags` evs+       ; tracePm "tyOracle" (ppr cts)+       ; ((_warns, errs), res) <- initTcDsForSolver $ tcCheckSatisfiability new_inert+       ; case res of+            -- Note how this implicitly gives all former PredTyCts a name, so+            -- that we don't needlessly re-allocate them every time!+            Just True  -> return (Just (TySt new_inert))+            Just False -> return Nothing+            Nothing    -> pprPanic "tyOracle" (vcat $ pprErrMsgBagWithLoc errs) }++-- | A 'SatisfiabilityCheck' based on new type-level constraints.+-- Returns a new 'Delta' if the new constraints are compatible with existing+-- ones. Doesn't bother calling out to the type oracle if the bag of new type+-- constraints was empty. Will only recheck 'PossibleMatches' in the term oracle+-- for emptiness if the first argument is 'True'.+tyIsSatisfiable :: Bool -> Bag TyCt -> SatisfiabilityCheck+tyIsSatisfiable recheck_complete_sets new_ty_cs = SC $ \delta ->+  if isEmptyBag new_ty_cs+    then pure (Just delta)+    else tyOracle (delta_ty_st delta) new_ty_cs >>= \case+      Nothing                   -> pure Nothing+      Just ty_st'               -> do+        let delta' = delta{ delta_ty_st = ty_st' }+        if recheck_complete_sets+          then ensureAllPossibleMatchesInhabited delta'+          else pure (Just delta')+++{- *********************************************************************+*                                                                      *+              DIdEnv with sharing+*                                                                      *+********************************************************************* -}+++{- *********************************************************************+*                                                                      *+                 TmState+          What we know about terms+*                                                                      *+********************************************************************* -}++{- Note [The Pos/Neg invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Invariant applying to each VarInfo: Whenever we have @(C, [y,z])@ in 'vi_pos',+any entry in 'vi_neg' must be incomparable to C (return Nothing) according to+'eqPmAltCons'. Those entries that are comparable either lead to a refutation+or are redudant. Examples:+* @x ~ Just y@, @x /~ [Just]@. 'eqPmAltCon' returns @Equal@, so refute.+* @x ~ Nothing@, @x /~ [Just]@. 'eqPmAltCon' returns @Disjoint@, so negative+  info is redundant and should be discarded.+* @x ~ I# y@, @x /~ [4,2]@. 'eqPmAltCon' returns @PossiblyOverlap@, so orthogal.+  We keep this info in order to be able to refute a redundant match on i.e. 4+  later on.++This carries over to pattern synonyms and overloaded literals. Say, we have+    pattern Just42 = Just 42+    case Just42 of x+      Nothing -> ()+      Just _  -> ()+Even though we had a solution for the value abstraction called x here in form+of a PatSynCon (Just42,[]), this solution is incomparable to both Nothing and+Just. Hence we retain the info in vi_neg, which eventually allows us to detect+the complete pattern match.++The Pos/Neg invariant extends to vi_cache, which stores essentially positive+information. We make sure that vi_neg and vi_cache never overlap. This isn't+strictly necessary since vi_cache is just a cache, so doesn't need to be+accurate: Every suggestion of a possible ConLike from vi_cache might be+refutable by the type oracle anyway. But it helps to maintain sanity while+debugging traces.++Note [Why record both positive and negative info?]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+You might think that knowing positive info (like x ~ Just y) would render+negative info irrelevant, but not so because of pattern synonyms.  E.g we might+know that x cannot match (Foo 4), where pattern Foo p = Just p++Also overloaded literals themselves behave like pattern synonyms. E.g if+postively we know that (x ~ I# y), we might also negatively want to record that+x does not match 45 f 45       = e2 f (I# 22#) = e3 f 45       = e4  --+Overlapped++Note [TmState invariants]+~~~~~~~~~~~~~~~~~~~~~~~~~+The term oracle state is never obviously (i.e., without consulting the type+oracle) contradictory. This implies a few invariants:+* Whenever vi_pos overlaps with vi_neg according to 'eqPmAltCon', we refute.+  This is implied by the Note [Pos/Neg invariant].+* Whenever vi_neg subsumes a COMPLETE set, we refute. We consult vi_cache to+  detect this, but we could just compare whole COMPLETE sets to vi_neg every+  time, if it weren't for performance.++Maintaining these invariants in 'addVarVarCt' (the core of the term oracle) and+'addRefutableAltCon' is subtle.+* Merging VarInfos. Example: Add the fact @x ~ y@ (see 'equate').+  - (COMPLETE) If we had @x /~ True@ and @y /~ False@, then we get+    @x /~ [True,False]@. This is vacuous by matter of comparing to the built-in+    COMPLETE set, so should refute.+  - (Pos/Neg) If we had @x /~ True@ and @y ~ True@, we have to refute.+* Adding positive information. Example: Add the fact @x ~ K ys@ (see 'addVarConCt')+  - (Neg) If we had @x /~ K@, refute.+  - (Pos) If we had @x ~ K2@, and that contradicts the new solution according to+    'eqPmAltCon' (ex. K2 is [] and K is (:)), then refute.+  - (Refine) If we had @x /~ K zs@, unify each y with each z in turn.+* Adding negative information. Example: Add the fact @x /~ Nothing@ (see 'addRefutableAltCon')+  - (Refut) If we have @x ~ K ys@, refute.+  - (Redundant) If we have @x ~ K2@ and @eqPmAltCon K K2 == Disjoint@+    (ex. Just and Nothing), the info is redundant and can be+    discarded.+  - (COMPLETE) If K=Nothing and we had @x /~ Just@, then we get+    @x /~ [Just,Nothing]@. This is vacuous by matter of comparing to the built-in+    COMPLETE set, so should refute.++Note that merging VarInfo in equate can be done by calling out to 'addVarConCt' and+'addRefutableAltCon' for each of the facts individually.++Note [Representation of Strings in TmState]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Instead of treating regular String literals as a PmLits, we treat it as a list+of characters in the oracle for better overlap reasoning. The following example+shows why:++  f :: String -> ()+  f ('f':_) = ()+  f "foo"   = ()+  f _       = ()++The second case is redundant, and we like to warn about it. Therefore either+the oracle will have to do some smart conversion between the list and literal+representation or treat is as the list it really is at runtime.++The "smart conversion" has the advantage of leveraging the more compact literal+representation wherever possible, but is really nasty to get right with negative+equalities: Just think of how to encode @x /= "foo"@.+The "list" option is far simpler, but incurs some overhead in representation and+warning messages (which can be alleviated by someone with enough dedication).+-}++-- | A 'SatisfiabilityCheck' based on new term-level constraints.+-- Returns a new 'Delta' if the new constraints are compatible with existing+-- ones.+tmIsSatisfiable :: Bag TmCt -> SatisfiabilityCheck+tmIsSatisfiable new_tm_cs = SC $ \delta -> runMaybeT $ foldlM go delta new_tm_cs+  where+    go delta ct = MaybeT (addTmCt delta ct)++-----------------------+-- * Looking up VarInfo++emptyVarInfo :: Id -> VarInfo+emptyVarInfo x = VI (idType x) [] [] NoPM++lookupVarInfo :: TmState -> Id -> VarInfo+-- (lookupVarInfo tms x) tells what we know about 'x'+lookupVarInfo (TmSt env _) x = fromMaybe (emptyVarInfo x) (lookupSDIE env x)++initPossibleMatches :: TyState -> VarInfo -> DsM VarInfo+initPossibleMatches ty_st vi@VI{ vi_ty = ty, vi_cache = NoPM } = do+  -- New evidence might lead to refined info on ty, in turn leading to discovery+  -- of a COMPLETE set.+  res <- pmTopNormaliseType ty_st ty+  let ty' = normalisedSourceType res+  case splitTyConApp_maybe ty' of+    Nothing -> pure vi{ vi_ty = ty' }+    Just (tc, [_])+      | tc == tYPETyCon+      -- TYPE acts like an empty data type on the term-level (#14086), but+      -- it is a PrimTyCon, so tyConDataCons_maybe returns Nothing. Hence a+      -- special case.+      -> pure vi{ vi_ty = ty', vi_cache = PM (pure emptyUniqDSet) }+    Just (tc, tc_args) -> do+      -- See Note [COMPLETE sets on data families]+      (tc_rep, tc_fam) <- case tyConFamInst_maybe tc of+        Just (tc_fam, _) -> pure (tc, tc_fam)+        Nothing -> do+          env <- dsGetFamInstEnvs+          let (tc_rep, _tc_rep_args, _co) = tcLookupDataFamInst env tc tc_args+          pure (tc_rep, tc)+      -- Note that the common case here is tc_rep == tc_fam+      let mb_rdcs = map RealDataCon <$> tyConDataCons_maybe tc_rep+      let rdcs = maybeToList mb_rdcs+      -- NB: tc_fam, because COMPLETE sets are associated with the parent data+      -- family TyCon+      pragmas <- dsGetCompleteMatches tc_fam+      let fams = mapM dsLookupConLike . completeMatchConLikes+      pscs <- mapM fams pragmas+      -- pprTrace "initPossibleMatches" (ppr ty $$ ppr ty' $$ ppr tc_rep <+> ppr tc_fam <+> ppr tc_args $$ ppr (rdcs ++ pscs)) (return ())+      case NonEmpty.nonEmpty (rdcs ++ pscs) of+        Nothing -> pure vi{ vi_ty = ty' } -- Didn't find any COMPLETE sets+        Just cs -> pure vi{ vi_ty = ty', vi_cache = PM (mkUniqDSet <$> cs) }+initPossibleMatches _     vi                                   = pure vi++-- | @initLookupVarInfo ts x@ looks up the 'VarInfo' for @x@ in @ts@ and tries+-- to initialise the 'vi_cache' component if it was 'NoPM' through+-- 'initPossibleMatches'.+initLookupVarInfo :: Delta -> Id -> DsM VarInfo+initLookupVarInfo MkDelta{ delta_tm_st = ts, delta_ty_st = ty_st } x+  = initPossibleMatches ty_st (lookupVarInfo ts x)++{- Note [COMPLETE sets on data families]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+User-defined COMPLETE sets involving data families are attached to the family+TyCon, whereas the built-in COMPLETE set is attached to a data family instance's+representation TyCon. This matters for COMPLETE sets involving both DataCons+and PatSyns (from #17207):++  data family T a+  data family instance T () = A | B+  pattern C = B+  {-# COMPLETE A, C #-}+  f :: T () -> ()+  f A = ()+  f C = ()++The match on A is actually wrapped in a CoPat, matching impedance between T ()+and its representation TyCon, which we translate as+@x | let y = x |> co, A <- y@ in PmCheck.++Which TyCon should we use for looking up the COMPLETE set? The representation+TyCon from the match on A would only reveal the built-in COMPLETE set, while the+data family TyCon would only give the user-defined one. But when initialising+the PossibleMatches for a given Type, we want to do so only once, because+merging different COMPLETE sets after the fact is very complicated and possibly+inefficient.++So in fact, we just *drop* the coercion arising from the CoPat when handling+handling the constraint @y ~ x |> co@ in addVarCoreCt, just equating @y ~ x@.+We then handle the fallout in initPossibleMatches, which has to get a hand at+both the representation TyCon tc_rep and the parent data family TyCon tc_fam.+It considers three cases after having established that the Type is a TyConApp:++1. The TyCon is a vanilla data type constructor+2. The TyCon is tc_rep+3. The TyCon is tc_fam++1. is simple and subsumed by the handling of the other two.+We check for case 2. by 'tyConFamInst_maybe' and get the tc_fam out.+Otherwise (3.), we try to lookup the data family instance at that particular+type to get out the tc_rep. In case 1., this will just return the original+TyCon, so tc_rep = tc_fam afterwards.+-}++------------------------------------------------+-- * Exported utility functions querying 'Delta'++-- | Check whether adding a constraint @x ~ BOT@ to 'Delta' succeeds.+canDiverge :: Delta -> Id -> Bool+canDiverge delta@MkDelta{ delta_tm_st = ts } x+  | VI _ pos neg _ <- lookupVarInfo ts x+  = null neg && all pos_can_diverge pos+  where+    pos_can_diverge (PmAltConLike (RealDataCon dc), [y])+      -- See Note [Divergence of Newtype matches]+      | isNewTyCon (dataConTyCon dc) = canDiverge delta y+    pos_can_diverge _ = False++{- Note [Divergence of Newtype matches]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Newtypes behave rather strangely when compared to ordinary DataCons. In a+pattern-match, they behave like a irrefutable (lazy) match, but for inhabitation+testing purposes (e.g. at construction sites), they behave rather like a DataCon+with a *strict* field, because they don't contribute their own bottom and are+inhabited iff the wrapped type is inhabited.++This distinction becomes apparent in #17248:++  newtype T2 a = T2 a+  g _      True = ()+  g (T2 _) True = ()+  g !_     True = ()++If we treat Newtypes like we treat regular DataCons, we would mark the third+clause as redundant, which clearly is unsound. The solution:+1. When checking the PmCon in 'pmCheck', never mark the result as Divergent if+   it's a Newtype match.+2. Regard @T2 x@ as 'canDiverge' iff @x@ 'canDiverge'. E.g. @T2 x ~ _|_@ <=>+   @x ~ _|_@. This way, the third clause will still be marked as inaccessible+   RHS instead of redundant.+3. When testing for inhabitants ('mkOneConFull'), we regard the newtype field as+   strict, so that the newtype is inhabited iff its field is inhabited.+-}++lookupRefuts :: Uniquable k => Delta -> k -> [PmAltCon]+-- Unfortunately we need the extra bit of polymorphism and the unfortunate+-- duplication of lookupVarInfo here.+lookupRefuts MkDelta{ delta_tm_st = ts@(TmSt (SDIE env) _) } k =+  case lookupUDFM env k of+    Nothing -> []+    Just (Indirect y) -> vi_neg (lookupVarInfo ts y)+    Just (Entry vi)   -> vi_neg vi++isDataConSolution :: (PmAltCon, [Id]) -> Bool+isDataConSolution (PmAltConLike (RealDataCon _), _) = True+isDataConSolution _                                 = False++-- @lookupSolution delta x@ picks a single solution ('vi_pos') of @x@ from+-- possibly many, preferring 'RealDataCon' solutions whenever possible.+lookupSolution :: Delta -> Id -> Maybe (PmAltCon, [Id])+lookupSolution delta x = case vi_pos (lookupVarInfo (delta_tm_st delta) x) of+  []                                         -> Nothing+  pos+    | Just sol <- find isDataConSolution pos -> Just sol+    | otherwise                              -> Just (head pos)++-------------------------------+-- * Adding facts to the oracle++-- | A term constraint. Either equates two variables or a variable with a+-- 'PmAltCon' application.+data TmCt+  = TmVarVar     !Id !Id+  | TmVarCon     !Id !PmAltCon ![Id]+  | TmVarNonVoid !Id++instance Outputable TmCt where+  ppr (TmVarVar x y)        = ppr x <+> char '~' <+> ppr y+  ppr (TmVarCon x con args) = ppr x <+> char '~' <+> hsep (ppr con : map ppr args)+  ppr (TmVarNonVoid x)      = ppr x <+> text "/~ ⊥"++-- | Add type equalities to 'Delta'.+addTypeEvidence :: Delta -> Bag EvVar -> DsM (Maybe Delta)+addTypeEvidence delta dicts+  = runSatisfiabilityCheck delta (tyIsSatisfiable True (TyCt . evVarPred <$> dicts))++-- | Tries to equate two representatives in 'Delta'.+-- See Note [TmState invariants].+addTmCt :: Delta -> TmCt -> DsM (Maybe Delta)+addTmCt delta ct = runMaybeT $ case ct of+  TmVarVar x y        -> addVarVarCt delta (x, y)+  TmVarCon x con args -> addVarConCt delta x con args+  TmVarNonVoid x      -> addVarNonVoidCt delta x++-- | Record that a particular 'Id' can't take the shape of a 'PmAltCon' in the+-- 'Delta' and return @Nothing@ if that leads to a contradiction.+-- See Note [TmState invariants].+addRefutableAltCon :: Delta -> Id -> PmAltCon -> DsM (Maybe Delta)+addRefutableAltCon delta@MkDelta{ delta_tm_st = TmSt env reps } x nalt = runMaybeT $ do+  vi@(VI _ pos neg pm) <- lift (initLookupVarInfo delta x)+  -- 1. Bail out quickly when nalt contradicts a solution+  let contradicts nalt (cl, _args) = eqPmAltCon cl nalt == Equal+  guard (not (any (contradicts nalt) pos))+  -- 2. Only record the new fact when it's not already implied by one of the+  -- solutions+  let implies nalt (cl, _args) = eqPmAltCon cl nalt == Disjoint+  let neg'+        | any (implies nalt) pos = neg+        -- See Note [Completeness checking with required Thetas]+        | hasRequiredTheta nalt  = neg+        | otherwise              = unionLists neg [nalt]+  let vi_ext = vi{ vi_neg = neg' }+  -- 3. Make sure there's at least one other possible constructor+  vi' <- case nalt of+    PmAltConLike cl+      -> MaybeT (ensureInhabited delta vi_ext{ vi_cache = markMatched cl pm })+    _ -> pure vi_ext+  pure delta{ delta_tm_st = TmSt (setEntrySDIE env x vi') reps }++hasRequiredTheta :: PmAltCon -> Bool+hasRequiredTheta (PmAltConLike cl) = notNull req_theta+  where+    (_,_,_,_,req_theta,_,_) = conLikeFullSig cl+hasRequiredTheta _                 = False++{- Note [Completeness checking with required Thetas]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the situation in #11224++    import Text.Read (readMaybe)+    pattern PRead :: Read a => () => a -> String+    pattern PRead x <- (readMaybe -> Just x)+    f :: String -> Int+    f (PRead x)  = x+    f (PRead xs) = length xs+    f _          = 0++Is the first match exhaustive on the PRead synonym? Should the second line thus+deemed redundant? The answer is, of course, No! The required theta is like a+hidden parameter which must be supplied at the pattern match site, so PRead+is much more like a view pattern (where behavior depends on the particular value+passed in).+The simple solution here is to forget in 'addRefutableAltCon' that we matched+on synonyms with a required Theta like @PRead@, so that subsequent matches on+the same constructor are never flagged as redundant. The consequence is that+we no longer detect the actually redundant match in++    g :: String -> Int+    g (PRead x) = x+    g (PRead y) = y -- redundant!+    g _         = 0++But that's a small price to pay, compared to the proper solution here involving+storing required arguments along with the PmAltConLike in 'vi_neg'.+-}++-- | Guess the universal argument types of a ConLike from an instantiation of+-- its result type. Rather easy for DataCons, but not so much for PatSynCons.+-- See Note [Pattern synonym result type] in PatSyn.hs.+guessConLikeUnivTyArgsFromResTy :: FamInstEnvs -> Type -> ConLike -> Maybe [Type]+guessConLikeUnivTyArgsFromResTy env res_ty (RealDataCon _) = do+  (tc, tc_args) <- splitTyConApp_maybe res_ty+  -- Consider data families: In case of a DataCon, we need to translate to+  -- the representation TyCon. For PatSyns, they are relative to the data+  -- family TyCon, so we don't need to translate them.+  let (_, tc_args', _) = tcLookupDataFamInst env tc tc_args+  Just tc_args'+guessConLikeUnivTyArgsFromResTy _   res_ty (PatSynCon ps)  = do+  -- We are successful if we managed to instantiate *every* univ_tv of con.+  -- This is difficult and bound to fail in some cases, see+  -- Note [Pattern synonym result type] in PatSyn.hs. So we just try our best+  -- here and be sure to return an instantiation when we can substitute every+  -- universally quantified type variable.+  -- We *could* instantiate all the other univ_tvs just to fresh variables, I+  -- suppose, but that means we get weird field types for which we don't know+  -- anything. So we prefer to keep it simple here.+  let (univ_tvs,_,_,_,_,con_res_ty) = patSynSig ps+  subst <- tcMatchTy con_res_ty res_ty+  traverse (lookupTyVar subst) univ_tvs++-- | Kind of tries to add a non-void contraint to 'Delta', but doesn't really+-- commit to upholding that constraint in the future. This will be rectified+-- in a follow-up patch. The status quo should work good enough for now.+addVarNonVoidCt :: Delta -> Id -> MaybeT DsM Delta+addVarNonVoidCt delta@MkDelta{ delta_tm_st = TmSt env reps } x = do+  vi  <- lift $ initLookupVarInfo delta x+  vi' <- MaybeT $ ensureInhabited delta vi+  -- vi' has probably constructed and then thinned out some PossibleMatches.+  -- We want to cache that work+  pure delta{ delta_tm_st = TmSt (setEntrySDIE env x vi') reps}++ensureInhabited :: Delta -> VarInfo -> DsM (Maybe VarInfo)+   -- Returns (Just vi) if at least one member of each ConLike in the COMPLETE+   -- set satisfies the oracle+   --+   -- Internally uses and updates the ConLikeSets in vi_cache.+   --+   -- NB: Does /not/ filter each ConLikeSet with the oracle; members may+   --     remain that do not statisfy it.  This lazy approach just+   --     avoids doing unnecessary work.+ensureInhabited delta vi = fmap (set_cache vi) <$> test (vi_cache vi) -- This would be much less tedious with lenses+  where+    set_cache vi cache = vi { vi_cache = cache }++    test NoPM    = pure (Just NoPM)+    test (PM ms) = runMaybeT (PM <$> traverse one_set ms)++    one_set cs = find_one_inh cs (uniqDSetToList cs)++    find_one_inh :: ConLikeSet -> [ConLike] -> MaybeT DsM ConLikeSet+    -- (find_one_inh cs cls) iterates over cls, deleting from cs+    -- any uninhabited elements of cls.  Stop (returning Just cs)+    -- when you see an inhabited element; return Nothing if all+    -- are uninhabited+    find_one_inh _  [] = mzero+    find_one_inh cs (con:cons) = lift (inh_test con) >>= \case+      True  -> pure cs+      False -> find_one_inh (delOneFromUniqDSet cs con) cons++    inh_test :: ConLike -> DsM Bool+    -- @inh_test K@ Returns False if a non-bottom value @v::ty@ cannot possibly+    -- be of form @K _ _ _@. Returning True is always sound.+    --+    -- It's like 'DataCon.dataConCannotMatch', but more clever because it takes+    -- the facts in Delta into account.+    inh_test con = do+      env <- dsGetFamInstEnvs+      case guessConLikeUnivTyArgsFromResTy env (vi_ty vi) con of+        Nothing -> pure True -- be conservative about this+        Just arg_tys -> do+          (_vars, ty_cs, strict_arg_tys) <- mkOneConFull arg_tys con+          tracePm "inh_test" (ppr con $$ ppr ty_cs)+          -- No need to run the term oracle compared to pmIsSatisfiable+          fmap isJust <$> runSatisfiabilityCheck delta $ mconcat+            -- Important to pass False to tyIsSatisfiable here, so that we won't+            -- recursively call ensureAllPossibleMatchesInhabited, leading to an+            -- endless recursion.+            [ tyIsSatisfiable False ty_cs+            , tysAreNonVoid initRecTc strict_arg_tys+            ]++-- | Checks if every 'VarInfo' in the term oracle has still an inhabited+-- 'vi_cache', considering the current type information in 'Delta'.+-- This check is necessary after having matched on a GADT con to weed out+-- impossible matches.+ensureAllPossibleMatchesInhabited :: Delta -> DsM (Maybe Delta)+ensureAllPossibleMatchesInhabited delta@MkDelta{ delta_tm_st = TmSt env reps }+  = runMaybeT (set_tm_cs_env delta <$> traverseSDIE go env)+  where+    set_tm_cs_env delta env = delta{ delta_tm_st = TmSt env reps }+    go vi = MaybeT (ensureInhabited delta vi)++--------------------------------------+-- * Term oracle unification procedure++-- | Try to unify two 'Id's and record the gained knowledge in 'Delta'.+--+-- Returns @Nothing@ when there's a contradiction. Returns @Just delta@+-- when the constraint was compatible with prior facts, in which case @delta@+-- has integrated the knowledge from the equality constraint.+--+-- See Note [TmState invariants].+addVarVarCt :: Delta -> (Id, Id) -> MaybeT DsM Delta+addVarVarCt delta@MkDelta{ delta_tm_st = TmSt env _ } (x, y)+  -- It's important that we never @equate@ two variables of the same equivalence+  -- class, otherwise we might get cyclic substitutions.+  -- Cf. 'extendSubstAndSolve' and+  -- @testsuite/tests/pmcheck/should_compile/CyclicSubst.hs@.+  | sameRepresentativeSDIE env x y = pure delta+  | otherwise                      = equate delta x y++-- | @equate ts@(TmSt env) x y@ merges the equivalence classes of @x@ and @y@ by+-- adding an indirection to the environment.+-- Makes sure that the positive and negative facts of @x@ and @y@ are+-- compatible.+-- Preconditions: @not (sameRepresentativeSDIE env x y)@+--+-- See Note [TmState invariants].+equate :: Delta -> Id -> Id -> MaybeT DsM Delta+equate delta@MkDelta{ delta_tm_st = TmSt env reps } x y+  = ASSERT( not (sameRepresentativeSDIE env x y) )+    case (lookupSDIE env x, lookupSDIE env y) of+      (Nothing, _) -> pure (delta{ delta_tm_st = TmSt (setIndirectSDIE env x y) reps })+      (_, Nothing) -> pure (delta{ delta_tm_st = TmSt (setIndirectSDIE env y x) reps })+      -- Merge the info we have for x into the info for y+      (Just vi_x, Just vi_y) -> do+        -- This assert will probably trigger at some point...+        -- We should decide how to break the tie+        MASSERT2( vi_ty vi_x `eqType` vi_ty vi_y, text "Not same type" )+        -- First assume that x and y are in the same equivalence class+        let env_ind = setIndirectSDIE env x y+        -- Then sum up the refinement counters+        let env_refs = setEntrySDIE env_ind y vi_y+        let delta_refs = delta{ delta_tm_st = TmSt env_refs reps }+        -- and then gradually merge every positive fact we have on x into y+        let add_fact delta (cl, args) = addVarConCt delta y cl args+        delta_pos <- foldlM add_fact delta_refs (vi_pos vi_x)+        -- Do the same for negative info+        let add_refut delta nalt = MaybeT (addRefutableAltCon delta y nalt)+        delta_neg <- foldlM add_refut delta_pos (vi_neg vi_x)+        -- vi_cache will be updated in addRefutableAltCon, so we are good to+        -- go!+        pure delta_neg++-- | @addVarConCt x alt args ts@ extends the substitution with a solution+-- @x :-> (alt, args)@ if compatible with refutable shapes of @x@ and its+-- other solutions, reject (@Nothing@) otherwise.+--+-- See Note [TmState invariants].+addVarConCt :: Delta -> Id -> PmAltCon -> [Id] -> MaybeT DsM Delta+addVarConCt delta@MkDelta{ delta_tm_st = TmSt env reps } x alt args = do+  VI ty pos neg cache <- lift (initLookupVarInfo delta x)+  -- First try to refute with a negative fact+  guard (all ((/= Equal) . eqPmAltCon alt) neg)+  -- Then see if any of the other solutions (remember: each of them is an+  -- additional refinement of the possible values x could take) indicate a+  -- contradiction+  guard (all ((/= Disjoint) . eqPmAltCon alt . fst) pos)+  -- Now we should be good! Add (alt, args) as a possible solution, or refine an+  -- existing one+  case find ((== Equal) . eqPmAltCon alt . fst) pos of+    Just (_, other_args) -> do+      foldlM addVarVarCt delta (zip args other_args)+    Nothing -> do+      -- Filter out redundant negative facts (those that compare Just False to+      -- the new solution)+      let neg' = filter ((== PossiblyOverlap) . eqPmAltCon alt) neg+      let pos' = (alt,args):pos+      pure delta{ delta_tm_st = TmSt (setEntrySDIE env x (VI ty pos' neg' cache)) reps}++----------------------------------------+-- * Enumerating inhabitation candidates++-- | Information about a conlike that is relevant to coverage checking.+-- It is called an \"inhabitation candidate\" since it is a value which may+-- possibly inhabit some type, but only if its term constraints ('ic_tm_cs')+-- and type constraints ('ic_ty_cs') are permitting, and if all of its strict+-- argument types ('ic_strict_arg_tys') are inhabitable.+-- See @Note [Strict argument type constraints]@.+data InhabitationCandidate =+  InhabitationCandidate+  { ic_tm_cs          :: Bag TmCt+  , ic_ty_cs          :: Bag TyCt+  , ic_strict_arg_tys :: [Type]+  }++instance Outputable InhabitationCandidate where+  ppr (InhabitationCandidate tm_cs ty_cs strict_arg_tys) =+    text "InhabitationCandidate" <+>+      vcat [ text "ic_tm_cs          =" <+> ppr tm_cs+           , text "ic_ty_cs          =" <+> ppr ty_cs+           , text "ic_strict_arg_tys =" <+> ppr strict_arg_tys ]++mkInhabitationCandidate :: Id -> DataCon -> DsM InhabitationCandidate+-- Precondition: idType x is a TyConApp, so that tyConAppArgs in here is safe.+mkInhabitationCandidate x dc = do+  let cl = RealDataCon dc+  let tc_args = tyConAppArgs (idType x)+  (arg_vars, ty_cs, strict_arg_tys) <- mkOneConFull tc_args cl+  pure InhabitationCandidate+        { ic_tm_cs = unitBag (TmVarCon x (PmAltConLike cl) arg_vars)+        , ic_ty_cs = ty_cs+        , ic_strict_arg_tys = strict_arg_tys+        }++-- | Generate all 'InhabitationCandidate's for a given type. The result is+-- either @'Left' ty@, if the type cannot be reduced to a closed algebraic type+-- (or if it's one trivially inhabited, like 'Int'), or @'Right' candidates@,+-- if it can. In this case, the candidates are the signature of the tycon, each+-- one accompanied by the term- and type- constraints it gives rise to.+-- See also Note [Checking EmptyCase Expressions]+inhabitationCandidates :: Delta -> Type+                       -> DsM (Either Type (TyCon, Id, [InhabitationCandidate]))+inhabitationCandidates MkDelta{ delta_ty_st = ty_st } ty = do+  pmTopNormaliseType ty_st ty >>= \case+    NoChange _                    -> alts_to_check ty     ty      []+    NormalisedByConstraints ty'   -> alts_to_check ty'    ty'     []+    HadRedexes src_ty dcs core_ty -> alts_to_check src_ty core_ty dcs+  where+    build_newtype :: (Type, DataCon, Type) -> Id -> DsM (Id, TmCt)+    build_newtype (ty, dc, _arg_ty) x = do+      -- ty is the type of @dc x@. It's a @dataConTyCon dc@ application.+      y <- mkPmId ty+      pure (y, TmVarCon y (PmAltConLike (RealDataCon dc)) [x])++    build_newtypes :: Id -> [(Type, DataCon, Type)] -> DsM (Id, [TmCt])+    build_newtypes x = foldrM (\dc (x, cts) -> go dc x cts) (x, [])+      where+        go dc x cts = second (:cts) <$> build_newtype dc x++    -- Inhabitation candidates, using the result of pmTopNormaliseType+    alts_to_check :: Type -> Type -> [(Type, DataCon, Type)]+                  -> DsM (Either Type (TyCon, Id, [InhabitationCandidate]))+    alts_to_check src_ty core_ty dcs = case splitTyConApp_maybe core_ty of+      Just (tc, _)+        |  isTyConTriviallyInhabited tc+        -> case dcs of+             []    -> return (Left src_ty)+             (_:_) -> do inner <- mkPmId core_ty+                         (outer, new_tm_cts) <- build_newtypes inner dcs+                         return $ Right (tc, outer, [InhabitationCandidate+                           { ic_tm_cs = listToBag new_tm_cts+                           , ic_ty_cs = emptyBag, ic_strict_arg_tys = [] }])++        |  pmIsClosedType core_ty && not (isAbstractTyCon tc)+           -- Don't consider abstract tycons since we don't know what their+           -- constructors are, which makes the results of coverage checking+           -- them extremely misleading.+        -> do+             inner <- mkPmId core_ty -- it would be wrong to unify inner+             alts <- mapM (mkInhabitationCandidate inner) (tyConDataCons tc)+             (outer, new_tm_cts) <- build_newtypes inner dcs+             let wrap_dcs alt = alt{ ic_tm_cs = listToBag new_tm_cts `unionBags` ic_tm_cs alt}+             return $ Right (tc, outer, map wrap_dcs alts)+      -- For other types conservatively assume that they are inhabited.+      _other -> return (Left src_ty)++-- | All these types are trivially inhabited+triviallyInhabitedTyCons :: UniqSet TyCon+triviallyInhabitedTyCons = mkUniqSet [+    charTyCon, doubleTyCon, floatTyCon, intTyCon, wordTyCon, word8TyCon+  ]++isTyConTriviallyInhabited :: TyCon -> Bool+isTyConTriviallyInhabited tc = elementOfUniqSet tc triviallyInhabitedTyCons++----------------------------+-- * Detecting vacuous types++{- Note [Checking EmptyCase Expressions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Empty case expressions are strict on the scrutinee. That is, `case x of {}`+will force argument `x`. Hence, `checkMatches` is not sufficient for checking+empty cases, because it assumes that the match is not strict (which is true+for all other cases, apart from EmptyCase). This gave rise to #10746. Instead,+we do the following:++1. We normalise the outermost type family redex, data family redex or newtype,+   using pmTopNormaliseType (in types/FamInstEnv.hs). This computes 3+   things:+   (a) A normalised type src_ty, which is equal to the type of the scrutinee in+       source Haskell (does not normalise newtypes or data families)+   (b) The actual normalised type core_ty, which coincides with the result+       topNormaliseType_maybe. This type is not necessarily equal to the input+       type in source Haskell. And this is precicely the reason we compute (a)+       and (c): the reasoning happens with the underlying types, but both the+       patterns and types we print should respect newtypes and also show the+       family type constructors and not the representation constructors.++   (c) A list of all newtype data constructors dcs, each one corresponding to a+       newtype rewrite performed in (b).++   For an example see also Note [Type normalisation]+   in types/FamInstEnv.hs.++2. Function Check.checkEmptyCase' performs the check:+   - If core_ty is not an algebraic type, then we cannot check for+     inhabitation, so we emit (_ :: src_ty) as missing, conservatively assuming+     that the type is inhabited.+   - If core_ty is an algebraic type, then we unfold the scrutinee to all+     possible constructor patterns, using inhabitationCandidates, and then+     check each one for constraint satisfiability, same as we do for normal+     pattern match checking.+-}++-- | A 'SatisfiabilityCheck' based on "NonVoid ty" constraints, e.g. Will+-- check if the @strict_arg_tys@ are actually all inhabited.+-- Returns the old 'Delta' if all the types are non-void according to 'Delta'.+tysAreNonVoid :: RecTcChecker -> [Type] -> SatisfiabilityCheck+tysAreNonVoid rec_env strict_arg_tys = SC $ \delta -> do+  all_non_void <- checkAllNonVoid rec_env delta strict_arg_tys+  -- Check if each strict argument type is inhabitable+  pure $ if all_non_void+            then Just delta+            else Nothing++-- | Implements two performance optimizations, as described in+-- @Note [Strict argument type constraints]@.+checkAllNonVoid :: RecTcChecker -> Delta -> [Type] -> DsM Bool+checkAllNonVoid rec_ts amb_cs strict_arg_tys = do+  let definitely_inhabited = definitelyInhabitedType (delta_ty_st amb_cs)+  tys_to_check <- filterOutM definitely_inhabited strict_arg_tys+  let rec_max_bound | tys_to_check `lengthExceeds` 1+                    = 1+                    | otherwise+                    = defaultRecTcMaxBound+      rec_ts' = setRecTcMaxBound rec_max_bound rec_ts+  allM (nonVoid rec_ts' amb_cs) tys_to_check++-- | Checks if a strict argument type of a conlike is inhabitable by a+-- terminating value (i.e, an 'InhabitationCandidate').+-- See @Note [Strict argument type constraints]@.+nonVoid+  :: RecTcChecker -- ^ The per-'TyCon' recursion depth limit.+  -> Delta        -- ^ The ambient term/type constraints (known to be+                  --   satisfiable).+  -> Type         -- ^ The strict argument type.+  -> DsM Bool     -- ^ 'True' if the strict argument type might be inhabited by+                  --   a terminating value (i.e., an 'InhabitationCandidate').+                  --   'False' if it is definitely uninhabitable by anything+                  --   (except bottom).+nonVoid rec_ts amb_cs strict_arg_ty = do+  mb_cands <- inhabitationCandidates amb_cs strict_arg_ty+  case mb_cands of+    Right (tc, _, cands)+      |  Just rec_ts' <- checkRecTc rec_ts tc+      -> anyM (cand_is_inhabitable rec_ts' amb_cs) cands+           -- A strict argument type is inhabitable by a terminating value if+           -- at least one InhabitationCandidate is inhabitable.+    _ -> pure True+           -- Either the type is trivially inhabited or we have exceeded the+           -- recursion depth for some TyCon (so bail out and conservatively+           -- claim the type is inhabited).+  where+    -- Checks if an InhabitationCandidate for a strict argument type:+    --+    -- (1) Has satisfiable term and type constraints.+    -- (2) Has 'nonVoid' strict argument types (we bail out of this+    --     check if recursion is detected).+    --+    -- See Note [Strict argument type constraints]+    cand_is_inhabitable :: RecTcChecker -> Delta+                        -> InhabitationCandidate -> DsM Bool+    cand_is_inhabitable rec_ts amb_cs+      (InhabitationCandidate{ ic_tm_cs          = new_tm_cs+                            , ic_ty_cs          = new_ty_cs+                            , ic_strict_arg_tys = new_strict_arg_tys }) =+        fmap isJust $ runSatisfiabilityCheck amb_cs $ mconcat+          [ tyIsSatisfiable False new_ty_cs+          , tmIsSatisfiable new_tm_cs+          , tysAreNonVoid rec_ts new_strict_arg_tys+          ]++-- | @'definitelyInhabitedType' ty@ returns 'True' if @ty@ has at least one+-- constructor @C@ such that:+--+-- 1. @C@ has no equality constraints.+-- 2. @C@ has no strict argument types.+--+-- See the @Note [Strict argument type constraints]@.+definitelyInhabitedType :: TyState -> Type -> DsM Bool+definitelyInhabitedType ty_st ty = do+  res <- pmTopNormaliseType ty_st ty+  pure $ case res of+           HadRedexes _ cons _ -> any meets_criteria cons+           _                   -> False+  where+    meets_criteria :: (Type, DataCon, Type) -> Bool+    meets_criteria (_, con, _) =+      null (dataConEqSpec con) && -- (1)+      null (dataConImplBangs con) -- (2)++{- Note [Strict argument type constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In the ConVar case of clause processing, each conlike K traditionally+generates two different forms of constraints:++* A term constraint (e.g., x ~ K y1 ... yn)+* Type constraints from the conlike's context (e.g., if K has type+  forall bs. Q => s1 .. sn -> T tys, then Q would be its type constraints)++As it turns out, these alone are not enough to detect a certain class of+unreachable code. Consider the following example (adapted from #15305):++  data K = K1 | K2 !Void++  f :: K -> ()+  f K1 = ()++Even though `f` doesn't match on `K2`, `f` is exhaustive in its patterns. Why?+Because it's impossible to construct a terminating value of type `K` using the+`K2` constructor, and thus it's impossible for `f` to ever successfully match+on `K2`.++The reason is because `K2`'s field of type `Void` is //strict//. Because there+are no terminating values of type `Void`, any attempt to construct something+using `K2` will immediately loop infinitely or throw an exception due to the+strictness annotation. (If the field were not strict, then `f` could match on,+say, `K2 undefined` or `K2 (let x = x in x)`.)++Since neither the term nor type constraints mentioned above take strict+argument types into account, we make use of the `nonVoid` function to+determine whether a strict type is inhabitable by a terminating value or not.++`nonVoid ty` returns True when either:+1. `ty` has at least one InhabitationCandidate for which both its term and type+   constraints are satifiable, and `nonVoid` returns `True` for all of the+   strict argument types in that InhabitationCandidate.+2. We're unsure if it's inhabited by a terminating value.++`nonVoid ty` returns False when `ty` is definitely uninhabited by anything+(except bottom). Some examples:++* `nonVoid Void` returns False, since Void has no InhabitationCandidates.+  (This is what lets us discard the `K2` constructor in the earlier example.)+* `nonVoid (Int :~: Int)` returns True, since it has an InhabitationCandidate+  (through the Refl constructor), and its term constraint (x ~ Refl) and+  type constraint (Int ~ Int) are satisfiable.+* `nonVoid (Int :~: Bool)` returns False. Although it has an+  InhabitationCandidate (by way of Refl), its type constraint (Int ~ Bool) is+  not satisfiable.+* Given the following definition of `MyVoid`:++    data MyVoid = MkMyVoid !Void++  `nonVoid MyVoid` returns False. The InhabitationCandidate for the MkMyVoid+  constructor contains Void as a strict argument type, and since `nonVoid Void`+  returns False, that InhabitationCandidate is discarded, leaving no others.++* Performance considerations++We must be careful when recursively calling `nonVoid` on the strict argument+types of an InhabitationCandidate, because doing so naïvely can cause GHC to+fall into an infinite loop. Consider the following example:++  data Abyss = MkAbyss !Abyss++  stareIntoTheAbyss :: Abyss -> a+  stareIntoTheAbyss x = case x of {}++In principle, stareIntoTheAbyss is exhaustive, since there is no way to+construct a terminating value using MkAbyss. However, both the term and type+constraints for MkAbyss are satisfiable, so the only way one could determine+that MkAbyss is unreachable is to check if `nonVoid Abyss` returns False.+There is only one InhabitationCandidate for Abyss—MkAbyss—and both its term+and type constraints are satisfiable, so we'd need to check if `nonVoid Abyss`+returns False... and now we've entered an infinite loop!++To avoid this sort of conundrum, `nonVoid` uses a simple test to detect the+presence of recursive types (through `checkRecTc`), and if recursion is+detected, we bail out and conservatively assume that the type is inhabited by+some terminating value. This avoids infinite loops at the expense of making+the coverage checker incomplete with respect to functions like+stareIntoTheAbyss above. Then again, the same problem occurs with recursive+newtypes, like in the following code:++  newtype Chasm = MkChasm Chasm++  gazeIntoTheChasm :: Chasm -> a+  gazeIntoTheChasm x = case x of {} -- Erroneously warned as non-exhaustive++So this limitation is somewhat understandable.++Note that even with this recursion detection, there is still a possibility that+`nonVoid` can run in exponential time. Consider the following data type:++  data T = MkT !T !T !T++If we call `nonVoid` on each of its fields, that will require us to once again+check if `MkT` is inhabitable in each of those three fields, which in turn will+require us to check if `MkT` is inhabitable again... As you can see, the+branching factor adds up quickly, and if the recursion depth limit is, say,+100, then `nonVoid T` will effectively take forever.++To mitigate this, we check the branching factor every time we are about to call+`nonVoid` on a list of strict argument types. If the branching factor exceeds 1+(i.e., if there is potential for exponential runtime), then we limit the+maximum recursion depth to 1 to mitigate the problem. If the branching factor+is exactly 1 (i.e., we have a linear chain instead of a tree), then it's okay+to stick with a larger maximum recursion depth.++Another microoptimization applies to data types like this one:++  data S a = ![a] !T++Even though there is a strict field of type [a], it's quite silly to call+nonVoid on it, since it's "obvious" that it is inhabitable. To make this+intuition formal, we say that a type is definitely inhabitable (DI) if:++  * It has at least one constructor C such that:+    1. C has no equality constraints (since they might be unsatisfiable)+    2. C has no strict argument types (since they might be uninhabitable)++It's relatively cheap to check if a type is DI, so before we call `nonVoid`+on a list of strict argument types, we filter out all of the DI ones.+-}++--------------------------------------------+-- * Providing positive evidence for a Delta++-- | @provideEvidence vs n delta@ returns a list of+-- at most @n@ (but perhaps empty) refinements of @delta@ that instantiate+-- @vs@ to compatible constructor applications or wildcards.+-- Negative information is only retained if literals are involved or when+-- for recursive GADTs.+provideEvidence :: [Id] -> Int -> Delta -> DsM [Delta]+provideEvidence = go+  where+    go _      0 _     = pure []+    go []     _ delta = pure [delta]+    go (x:xs) n delta = do+      tracePm "provideEvidence" (ppr x $$ ppr xs $$ ppr delta $$ ppr n)+      VI _ pos neg _ <- initLookupVarInfo delta x+      case pos of+        _:_ -> do+          -- All solutions must be valid at once. Try to find candidates for their+          -- fields. Example:+          --   f x@(Just _) True = case x of SomePatSyn _ -> ()+          -- after this clause, we want to report that+          --   * @f Nothing _@ is uncovered+          --   * @f x False@ is uncovered+          -- where @x@ will have two possibly compatible solutions, @Just y@ for+          -- some @y@ and @SomePatSyn z@ for some @z@. We must find evidence for @y@+          -- and @z@ that is valid at the same time. These constitute arg_vas below.+          let arg_vas = concatMap (\(_cl, args) -> args) pos+          go (arg_vas ++ xs) n delta+        []+          -- When there are literals involved, just print negative info+          -- instead of listing missed constructors+          | notNull [ l | PmAltLit l <- neg ]+          -> go xs n delta+        [] -> try_instantiate x xs n delta++    -- | Tries to instantiate a variable by possibly following the chain of+    -- newtypes and then instantiating to all ConLikes of the wrapped type's+    -- minimal residual COMPLETE set.+    try_instantiate :: Id -> [Id] -> Int -> Delta -> DsM [Delta]+    -- Convention: x binds the outer constructor in the chain, y the inner one.+    try_instantiate x xs n delta = do+      (_src_ty, dcs, core_ty) <- tntrGuts <$> pmTopNormaliseType (delta_ty_st delta) (idType x)+      let build_newtype (x, delta) (_ty, dc, arg_ty) = do+            y <- lift $ mkPmId arg_ty+            delta' <- addVarConCt delta x (PmAltConLike (RealDataCon dc)) [y]+            pure (y, delta')+      runMaybeT (foldlM build_newtype (x, delta) dcs) >>= \case+        Nothing -> pure []+        Just (y, newty_delta) -> do+          -- Pick a COMPLETE set and instantiate it (n at max). Take care of ⊥.+          pm     <- vi_cache <$> initLookupVarInfo newty_delta y+          mb_cls <- pickMinimalCompleteSet newty_delta pm+          case uniqDSetToList <$> mb_cls of+            Just cls@(_:_) -> instantiate_cons y core_ty xs n newty_delta cls+            Just [] | not (canDiverge newty_delta y) -> pure []+            -- Either ⊥ is still possible (think Void) or there are no COMPLETE+            -- sets available, so we can assume it's inhabited+            _ -> go xs n newty_delta++    instantiate_cons :: Id -> Type -> [Id] -> Int -> Delta -> [ConLike] -> DsM [Delta]+    instantiate_cons _ _  _  _ _     []       = pure []+    instantiate_cons _ _  _  0 _     _        = pure []+    instantiate_cons _ ty xs n delta _+      -- We don't want to expose users to GHC-specific constructors for Int etc.+      | fmap (isTyConTriviallyInhabited . fst) (splitTyConApp_maybe ty) == Just True+      = go xs n delta+    instantiate_cons x ty xs n delta (cl:cls) = do+      env <- dsGetFamInstEnvs+      case guessConLikeUnivTyArgsFromResTy env ty cl of+        Nothing -> pure [delta] -- No idea idea how to refine this one, so just finish off with a wildcard+        Just arg_tys -> do+          (arg_vars, new_ty_cs, strict_arg_tys) <- mkOneConFull arg_tys cl+          let new_tm_cs = unitBag (TmVarCon x (PmAltConLike cl) arg_vars)+          -- Now check satifiability+          mb_delta <- pmIsSatisfiable delta new_tm_cs new_ty_cs strict_arg_tys+          tracePm "instantiate_cons" (vcat [ ppr x+                                           , ppr (idType x)+                                           , ppr ty+                                           , ppr cl+                                           , ppr arg_tys+                                           , ppr new_tm_cs+                                           , ppr new_ty_cs+                                           , ppr strict_arg_tys+                                           , ppr delta+                                           , ppr mb_delta+                                           , ppr n ])+          con_deltas <- case mb_delta of+            Nothing     -> pure []+            -- NB: We don't prepend arg_vars as we don't have any evidence on+            -- them and we only want to split once on a data type. They are+            -- inhabited, otherwise pmIsSatisfiable would have refuted.+            Just delta' -> go xs n delta'+          other_cons_deltas <- instantiate_cons x ty xs (n - length con_deltas) delta cls+          pure (con_deltas ++ other_cons_deltas)++pickMinimalCompleteSet :: Delta -> PossibleMatches -> DsM (Maybe ConLikeSet)+pickMinimalCompleteSet _ NoPM      = pure Nothing+-- TODO: First prune sets with type info in delta. But this is good enough for+-- now and less costly. See #17386.+pickMinimalCompleteSet _ (PM clss) = do+  tracePm "pickMinimalCompleteSet" (ppr $ NonEmpty.toList clss)+  pure (Just (minimumBy (comparing sizeUniqDSet) clss))++-- | See if we already encountered a semantically equivalent expression and+-- return its representative.+representCoreExpr :: Delta -> CoreExpr -> DsM (Delta, Id)+representCoreExpr delta@MkDelta{ delta_tm_st = ts@TmSt{ ts_reps = reps } } e = do+  dflags <- getDynFlags+  let e' = simpleOptExpr dflags e+  case lookupCoreMap reps e' of+    Just rep -> pure (delta, rep)+    Nothing  -> do+      rep <- mkPmId (exprType e')+      let reps'  = extendCoreMap reps e' rep+      let delta' = delta{ delta_tm_st = ts{ ts_reps = reps' } }+      pure (delta', rep)++-- Most of our actions thread around a delta from one computation to the next,+-- thereby potentially failing. This is expressed in the following Monad:+-- type PmM a = StateT Delta (MaybeT DsM) a++-- | Records that a variable @x@ is equal to a 'CoreExpr' @e@.+addVarCoreCt :: Delta -> Id -> CoreExpr -> DsM (Maybe Delta)+addVarCoreCt delta x e = runMaybeT (execStateT (core_expr x e) delta)+  where+    -- | Takes apart a 'CoreExpr' and tries to extract as much information about+    -- literals and constructor applications as possible.+    core_expr :: Id -> CoreExpr -> StateT Delta (MaybeT DsM) ()+    -- TODO: Handle newtypes properly, by wrapping the expression in a DataCon+    -- This is the right thing for casts involving data family instances and+    -- their representation TyCon, though (which are not visible in source+    -- syntax). See Note [COMPLETE sets on data families]+    -- core_expr x e | pprTrace "core_expr" (ppr x $$ ppr e) False = undefined+    core_expr x (Cast e _co) = core_expr x e+    core_expr x (Tick _t e) = core_expr x e+    core_expr x e+      | Just (pmLitAsStringLit -> Just s) <- coreExprAsPmLit e+      , expr_ty `eqType` stringTy+      -- See Note [Representation of Strings in TmState]+      = case unpackFS s of+          -- We need this special case to break a loop with coreExprAsPmLit+          -- Otherwise we alternate endlessly between [] and ""+          [] -> data_con_app x nilDataCon []+          s' -> core_expr x (mkListExpr charTy (map mkCharExpr s'))+      | Just lit <- coreExprAsPmLit e+      = pm_lit x lit+      | Just (_in_scope, _empty_floats@[], dc, _arg_tys, args)+            <- exprIsConApp_maybe in_scope_env e+      = do { arg_ids <- traverse bind_expr args+           ; data_con_app x dc arg_ids }+      -- See Note [Detecting pattern synonym applications in expressions]+      | Var y <- e, Nothing <- isDataConId_maybe x+      -- We don't consider DataCons flexible variables+      = modifyT (\delta -> addVarVarCt delta (x, y))+      | otherwise+      -- Any other expression. Try to find other uses of a semantically+      -- equivalent expression and represent them by the same variable!+      = do { rep <- represent_expr e+           ; modifyT (\delta -> addVarVarCt delta (x, rep)) }+      where+        expr_ty       = exprType e+        expr_in_scope = mkInScopeSet (exprFreeVars e)+        in_scope_env  = (expr_in_scope, const NoUnfolding)+        -- It's inconvenient to get hold of a global in-scope set+        -- here, but it'll only be needed if exprIsConApp_maybe ends+        -- up substituting inside a forall or lambda (i.e. seldom)+        -- so using exprFreeVars seems fine.   See MR !1647.++        bind_expr :: CoreExpr -> StateT Delta (MaybeT DsM) Id+        bind_expr e = do+          x <- lift (lift (mkPmId (exprType e)))+          core_expr x e+          pure x++        -- See if we already encountered a semantically equivalent expression+        -- and return its representative+        represent_expr :: CoreExpr -> StateT Delta (MaybeT DsM) Id+        represent_expr e = StateT $ \delta ->+          swap <$> lift (representCoreExpr delta e)++    data_con_app :: Id -> DataCon -> [Id] -> StateT Delta (MaybeT DsM) ()+    data_con_app x dc args = pm_alt_con_app x (PmAltConLike (RealDataCon dc)) args++    pm_lit :: Id -> PmLit -> StateT Delta (MaybeT DsM) ()+    pm_lit x lit = pm_alt_con_app x (PmAltLit lit) []++    -- | Adds the given constructor application as a solution for @x@.+    pm_alt_con_app :: Id -> PmAltCon -> [Id] -> StateT Delta (MaybeT DsM) ()+    pm_alt_con_app x con args = modifyT $ \delta -> addVarConCt delta x con args++-- | Like 'modify', but with an effectful modifier action+modifyT :: Monad m => (s -> m s) -> StateT s m ()+modifyT f = StateT $ fmap ((,) ()) . f++{- Note [Detecting pattern synonym applications in expressions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+At the moment we fail to detect pattern synonyms in scrutinees and RHS of+guards. This could be alleviated with considerable effort and complexity, but+the returns are meager. Consider:++    pattern P+    pattern Q+    case P 15 of+      Q _  -> ...+      P 15 ->++Compared to the situation where P and Q are DataCons, the lack of generativity+means we could never flag Q as redundant.+(also see Note [Undecidable Equality for PmAltCons] in PmTypes.)+On the other hand, if we fail to recognise the pattern synonym, we flag the+pattern match as inexhaustive. That wouldn't happen if we had knowledge about+the scrutinee, in which case the oracle basically knows "If it's a P, then its+field is 15".++This is a pretty narrow use case and I don't think we should to try to fix it+until a user complains energetically.+-}
+ GHC/HsToCore/PmCheck/Ppr.hs view
@@ -0,0 +1,220 @@+{-# LANGUAGE CPP, ViewPatterns #-}++-- | Provides factilities for pretty-printing 'Delta's in a way appropriate for+-- user facing pattern match warnings.+module GHC.HsToCore.PmCheck.Ppr (+        pprUncovered+    ) where++#include "HsVersions.h"++import GhcPrelude++import BasicTypes+import Id+import VarEnv+import UniqDFM+import ConLike+import DataCon+import TysWiredIn+import Outputable+import Control.Monad.Trans.RWS.CPS+import Util+import Maybes+import Data.List.NonEmpty (NonEmpty, nonEmpty, toList)++import GHC.HsToCore.PmCheck.Types+import GHC.HsToCore.PmCheck.Oracle++-- | Pretty-print the guts of an uncovered value vector abstraction, i.e., its+-- components and refutable shapes associated to any mentioned variables.+--+-- Example for @([Just p, q], [p :-> [3,4], q :-> [0,5]]):+--+-- @+-- (Just p) q+--     where p is not one of {3, 4}+--           q is not one of {0, 5}+-- @+--+-- When the set of refutable shapes contains more than 3 elements, the+-- additional elements are indicated by "...".+pprUncovered :: Delta -> [Id] -> SDoc+pprUncovered delta vas+  | isNullUDFM refuts = fsep vec -- there are no refutations+  | otherwise         = hang (fsep vec) 4 $+                          text "where" <+> vcat (map (pprRefutableShapes . snd) (udfmToList refuts))+  where+    init_prec+      -- No outer parentheses when it's a unary pattern by assuming lowest+      -- precedence+      | [_] <- vas   = topPrec+      | otherwise    = appPrec+    ppr_action       = mapM (pprPmVar init_prec) vas+    (vec, renamings) = runPmPpr delta ppr_action+    refuts           = prettifyRefuts delta renamings++-- | Output refutable shapes of a variable in the form of @var is not one of {2,+-- Nothing, 3}@. Will never print more than 3 refutable shapes, the tail is+-- indicated by an ellipsis.+pprRefutableShapes :: (SDoc,[PmAltCon]) -> SDoc+pprRefutableShapes (var, alts)+  = var <+> text "is not one of" <+> format_alts alts+  where+    format_alts = braces . fsep . punctuate comma . shorten . map ppr_alt+    shorten (a:b:c:_:_)       = a:b:c:[text "..."]+    shorten xs                = xs+    ppr_alt (PmAltConLike cl) = ppr cl+    ppr_alt (PmAltLit lit)    = ppr lit++{- 1. Literals+~~~~~~~~~~~~~~+Starting with a function definition like:++    f :: Int -> Bool+    f 5 = True+    f 6 = True++The uncovered set looks like:+    { var |> var /= 5, var /= 6 }++Yet, we would like to print this nicely as follows:+   x , where x not one of {5,6}++Since these variables will be shown to the programmer, we give them better names+(t1, t2, ..) in 'prettifyRefuts', hence the SDoc in 'PrettyPmRefutEnv'.++2. Residual Constraints+~~~~~~~~~~~~~~~~~~~~~~~+Unhandled constraints that refer to HsExpr are typically ignored by the solver+(it does not even substitute in HsExpr so they are even printed as wildcards).+Additionally, the oracle returns a substitution if it succeeds so we apply this+substitution to the vectors before printing them out (see function `pprOne' in+Check.hs) to be more precise.+-}++-- | Extract and assigns pretty names to constraint variables with refutable+-- shapes.+prettifyRefuts :: Delta -> DIdEnv SDoc -> DIdEnv (SDoc, [PmAltCon])+prettifyRefuts delta = listToUDFM . map attach_refuts . udfmToList+  where+    attach_refuts (u, sdoc) = (u, (sdoc, lookupRefuts delta u))+++type PmPprM a = RWS Delta () (DIdEnv SDoc, [SDoc]) a++-- Try nice names p,q,r,s,t before using the (ugly) t_i+nameList :: [SDoc]+nameList = map text ["p","q","r","s","t"] +++            [ text ('t':show u) | u <- [(0 :: Int)..] ]++runPmPpr :: Delta -> PmPprM a -> (a, DIdEnv SDoc)+runPmPpr delta m = case runRWS m delta (emptyDVarEnv, nameList) of+  (a, (renamings, _), _) -> (a, renamings)++-- | Allocates a new, clean name for the given 'Id' if it doesn't already have+-- one.+getCleanName :: Id -> PmPprM SDoc+getCleanName x = do+  (renamings, name_supply) <- get+  let (clean_name:name_supply') = name_supply+  case lookupDVarEnv renamings x of+    Just nm -> pure nm+    Nothing -> do+      put (extendDVarEnv renamings x clean_name, name_supply')+      pure clean_name++checkRefuts :: Id -> PmPprM (Maybe SDoc) -- the clean name if it has negative info attached+checkRefuts x = do+  delta <- ask+  case lookupRefuts delta x of+    [] -> pure Nothing -- Will just be a wildcard later on+    _  -> Just <$> getCleanName x++-- | Pretty print a variable, but remember to prettify the names of the variables+-- that refer to neg-literals. The ones that cannot be shown are printed as+-- underscores. Even with a type signature, if it's not too noisy.+pprPmVar :: PprPrec -> Id -> PmPprM SDoc+-- Type signature is "too noisy" by my definition if it needs to parenthesize.+-- I like           "not matched: _ :: Proxy (DIdEnv SDoc)",+-- but I don't like "not matched: (_ :: stuff) (_:_) (_ :: Proxy (DIdEnv SDoc))"+-- The useful information in the latter case is the constructor that we missed,+-- not the types of the wildcards in the places that aren't matched as a result.+pprPmVar prec x = do+  delta <- ask+  case lookupSolution delta x of+    Just (alt, args) -> pprPmAltCon prec alt args+    Nothing          -> fromMaybe typed_wildcard <$> checkRefuts x+      where+        -- if we have no info about the parameter and would just print a+        -- wildcard, also show its type.+        typed_wildcard+          | prec <= sigPrec+          = underscore <+> text "::" <+> ppr (idType x)+          | otherwise+          = underscore++pprPmAltCon :: PprPrec -> PmAltCon -> [Id] -> PmPprM SDoc+pprPmAltCon _prec (PmAltLit l)      _    = pure (ppr l)+pprPmAltCon prec  (PmAltConLike cl) args = do+  delta <- ask+  pprConLike delta prec cl args++pprConLike :: Delta -> PprPrec -> ConLike -> [Id] -> PmPprM SDoc+pprConLike delta _prec cl args+  | Just pm_expr_list <- pmExprAsList delta (PmAltConLike cl) args+  = case pm_expr_list of+      NilTerminated list ->+        brackets . fsep . punctuate comma <$> mapM (pprPmVar appPrec) list+      WcVarTerminated pref x ->+        parens   . fcat . punctuate colon <$> mapM (pprPmVar appPrec) (toList pref ++ [x])+pprConLike _delta _prec (RealDataCon con) args+  | isUnboxedTupleCon con+  , let hash_parens doc = text "(#" <+> doc <+> text "#)"+  = hash_parens . fsep . punctuate comma <$> mapM (pprPmVar appPrec) args+  | isTupleDataCon con+  = parens . fsep . punctuate comma <$> mapM (pprPmVar appPrec) args+pprConLike _delta prec cl args+  | conLikeIsInfix cl = case args of+      [x, y] -> do x' <- pprPmVar funPrec x+                   y' <- pprPmVar funPrec y+                   return (cparen (prec > opPrec) (x' <+> ppr cl <+> y'))+      -- can it be infix but have more than two arguments?+      list   -> pprPanic "pprConLike:" (ppr list)+  | null args = return (ppr cl)+  | otherwise = do args' <- mapM (pprPmVar appPrec) args+                   return (cparen (prec > funPrec) (fsep (ppr cl : args')))++-- | The result of 'pmExprAsList'.+data PmExprList+  = NilTerminated [Id]+  | WcVarTerminated (NonEmpty Id) Id++-- | Extract a list of 'Id's out of a sequence of cons cells, optionally+-- terminated by a wildcard variable instead of @[]@. Some examples:+--+-- * @pmExprAsList (1:2:[]) == Just ('NilTerminated' [1,2])@, a regular,+--   @[]@-terminated list. Should be pretty-printed as @[1,2]@.+-- * @pmExprAsList (1:2:x) == Just ('WcVarTerminated' [1,2] x)@, a list prefix+--   ending in a wildcard variable x (of list type). Should be pretty-printed as+--   (1:2:_).+-- * @pmExprAsList [] == Just ('NilTerminated' [])@+pmExprAsList :: Delta -> PmAltCon -> [Id] -> Maybe PmExprList+pmExprAsList delta = go_con []+  where+    go_var rev_pref x+      | Just (alt, args) <- lookupSolution delta x+      = go_con rev_pref alt args+    go_var rev_pref x+      | Just pref <- nonEmpty (reverse rev_pref)+      = Just (WcVarTerminated pref x)+    go_var _ _+      = Nothing++    go_con rev_pref (PmAltConLike (RealDataCon c)) es+      | c == nilDataCon+      = ASSERT( null es ) Just (NilTerminated (reverse rev_pref))+      | c == consDataCon+      = ASSERT( length es == 2 ) go_var (es !! 0 : rev_pref) (es !! 1)+    go_con _ _ _+      = Nothing
+ GHC/HsToCore/PmCheck/Types.hs view
@@ -0,0 +1,539 @@+{-+Author: George Karachalias <george.karachalias@cs.kuleuven.be>+        Sebastian Graf <sgraf1337@gmail.com>+-}++{-# LANGUAGE CPP #-}+{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE TupleSections #-}++-- | Types used through-out pattern match checking. This module is mostly there+-- to be imported from "TcRnTypes". The exposed API is that of+-- "GHC.HsToCore.PmCheck.Oracle" and "GHC.HsToCore.PmCheck".+module GHC.HsToCore.PmCheck.Types (+        -- * Representations for Literals and AltCons+        PmLit(..), PmLitValue(..), PmAltCon(..), pmLitType, pmAltConType,++        -- ** Equality on 'PmAltCon's+        PmEquality(..), eqPmAltCon,++        -- ** Operations on 'PmLit'+        literalToPmLit, negatePmLit, overloadPmLit,+        pmLitAsStringLit, coreExprAsPmLit,++        -- * Caching partially matched COMPLETE sets+        ConLikeSet, PossibleMatches(..),++        -- * A 'DIdEnv' where entries may be shared+        Shared(..), SharedDIdEnv(..), emptySDIE, lookupSDIE, sameRepresentativeSDIE,+        setIndirectSDIE, setEntrySDIE, traverseSDIE,++        -- * The pattern match oracle+        VarInfo(..), TmState(..), TyState(..), Delta(..), initDelta+    ) where++#include "HsVersions.h"++import GhcPrelude++import Util+import Bag+import FastString+import Var (EvVar)+import Id+import VarEnv+import UniqDSet+import UniqDFM+import Name+import DataCon+import ConLike+import Outputable+import Maybes+import Type+import TyCon+import Literal+import CoreSyn+import CoreMap+import CoreUtils (exprType)+import PrelNames+import TysWiredIn+import TysPrim+import TcType (evVarPred)++import Numeric (fromRat)+import Data.Foldable (find)+import qualified Data.List.NonEmpty as NonEmpty+import Data.Ratio++-- | Literals (simple and overloaded ones) for pattern match checking.+--+-- See Note [Undecidable Equality for PmAltCons]+data PmLit = PmLit+           { pm_lit_ty  :: Type+           , pm_lit_val :: PmLitValue }++data PmLitValue+  = PmLitInt Integer+  | PmLitRat Rational+  | PmLitChar Char+  -- We won't actually see PmLitString in the oracle since we desugar strings to+  -- lists+  | PmLitString FastString+  | PmLitOverInt Int {- How often Negated? -} Integer+  | PmLitOverRat Int {- How often Negated? -} Rational+  | PmLitOverString FastString++-- | Undecidable semantic equality result.+-- See Note [Undecidable Equality for PmAltCons]+data PmEquality+  = Equal+  | Disjoint+  | PossiblyOverlap+  deriving (Eq, Show)++-- | When 'PmEquality' can be decided. @True <=> Equal@, @False <=> Disjoint@.+decEquality :: Bool -> PmEquality+decEquality True  = Equal+decEquality False = Disjoint++-- | Undecidable equality for values represented by 'PmLit's.+-- See Note [Undecidable Equality for PmAltCons]+--+-- * @Just True@ ==> Surely equal+-- * @Just False@ ==> Surely different (non-overlapping, even!)+-- * @Nothing@ ==> Equality relation undecidable+eqPmLit :: PmLit -> PmLit -> PmEquality+eqPmLit (PmLit t1 v1) (PmLit t2 v2)+  -- no haddock | pprTrace "eqPmLit" (ppr t1 <+> ppr v1 $$ ppr t2 <+> ppr v2) False = undefined+  | not (t1 `eqType` t2) = Disjoint+  | otherwise            = go v1 v2+  where+    go (PmLitInt i1)        (PmLitInt i2)        = decEquality (i1 == i2)+    go (PmLitRat r1)        (PmLitRat r2)        = decEquality (r1 == r2)+    go (PmLitChar c1)       (PmLitChar c2)       = decEquality (c1 == c2)+    go (PmLitString s1)     (PmLitString s2)     = decEquality (s1 == s2)+    go (PmLitOverInt n1 i1) (PmLitOverInt n2 i2)+      | n1 == n2 && i1 == i2                     = Equal+    go (PmLitOverRat n1 r1) (PmLitOverRat n2 r2)+      | n1 == n2 && r1 == r2                     = Equal+    go (PmLitOverString s1) (PmLitOverString s2)+      | s1 == s2                                 = Equal+    go _                    _                    = PossiblyOverlap++-- | Syntactic equality.+instance Eq PmLit where+  a == b = eqPmLit a b == Equal++-- | Type of a 'PmLit'+pmLitType :: PmLit -> Type+pmLitType (PmLit ty _) = ty++-- | Undecidable equality for values represented by 'ConLike's.+-- See Note [Undecidable Equality for PmAltCons].+-- 'PatSynCon's aren't enforced to be generative, so two syntactically different+-- 'PatSynCon's might match the exact same values. Without looking into and+-- reasoning about the pattern synonym's definition, we can't decide if their+-- sets of matched values is different.+--+-- * @Just True@ ==> Surely equal+-- * @Just False@ ==> Surely different (non-overlapping, even!)+-- * @Nothing@ ==> Equality relation undecidable+eqConLike :: ConLike -> ConLike -> PmEquality+eqConLike (RealDataCon dc1) (RealDataCon dc2) = decEquality (dc1 == dc2)+eqConLike (PatSynCon psc1)  (PatSynCon psc2)+  | psc1 == psc2+  = Equal+eqConLike _                 _                 = PossiblyOverlap++-- | Represents the head of a match against a 'ConLike' or literal.+-- Really similar to 'CoreSyn.AltCon'.+data PmAltCon = PmAltConLike ConLike+              | PmAltLit     PmLit++-- | We can't in general decide whether two 'PmAltCon's match the same set of+-- values. In addition to the reasons in 'eqPmLit' and 'eqConLike', a+-- 'PmAltConLike' might or might not represent the same value as a 'PmAltLit'.+-- See Note [Undecidable Equality for PmAltCons].+--+-- * @Just True@ ==> Surely equal+-- * @Just False@ ==> Surely different (non-overlapping, even!)+-- * @Nothing@ ==> Equality relation undecidable+--+-- Examples (omitting some constructor wrapping):+--+-- * @eqPmAltCon (LitInt 42) (LitInt 1) == Just False@: Lit equality is+--   decidable+-- * @eqPmAltCon (DataCon A) (DataCon B) == Just False@: DataCon equality is+--   decidable+-- * @eqPmAltCon (LitOverInt 42) (LitOverInt 1) == Nothing@: OverLit equality+--   is undecidable+-- * @eqPmAltCon (PatSyn PA) (PatSyn PB) == Nothing@: PatSyn equality is+--   undecidable+-- * @eqPmAltCon (DataCon I#) (LitInt 1) == Nothing@: DataCon to Lit+--   comparisons are undecidable without reasoning about the wrapped @Int#@+-- * @eqPmAltCon (LitOverInt 1) (LitOverInt 1) == Just True@: We assume+--   reflexivity for overloaded literals+-- * @eqPmAltCon (PatSyn PA) (PatSyn PA) == Just True@: We assume reflexivity+--   for Pattern Synonyms+eqPmAltCon :: PmAltCon -> PmAltCon -> PmEquality+eqPmAltCon (PmAltConLike cl1) (PmAltConLike cl2) = eqConLike cl1 cl2+eqPmAltCon (PmAltLit     l1)  (PmAltLit     l2)  = eqPmLit l1 l2+eqPmAltCon _                  _                  = PossiblyOverlap++-- | Syntactic equality.+instance Eq PmAltCon where+  a == b = eqPmAltCon a b == Equal++-- | Type of a 'PmAltCon'+pmAltConType :: PmAltCon -> [Type] -> Type+pmAltConType (PmAltLit lit)     _arg_tys = ASSERT( null _arg_tys ) pmLitType lit+pmAltConType (PmAltConLike con) arg_tys  = conLikeResTy con arg_tys++{- Note [Undecidable Equality for PmAltCons]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Equality on overloaded literals is undecidable in the general case. Consider+the following example:++  instance Num Bool where+    ...+    fromInteger 0 = False -- C-like representation of booleans+    fromInteger _ = True++    f :: Bool -> ()+    f 1 = ()        -- Clause A+    f 2 = ()        -- Clause B++Clause B is redundant but to detect this, we must decide the constraint:+@fromInteger 2 ~ fromInteger 1@ which means that we+have to look through function @fromInteger@, whose implementation could+be anything. This poses difficulties for:++1. The expressive power of the check.+   We cannot expect a reasonable implementation of pattern matching to detect+   that @fromInteger 2 ~ fromInteger 1@ is True, unless we unfold function+   fromInteger. This puts termination at risk and is undecidable in the+   general case.++2. Error messages/Warnings.+   What should our message for @f@ above be? A reasonable approach would be+   to issue:++     Pattern matches are (potentially) redundant:+       f 2 = ...    under the assumption that 1 == 2++   but seems to complex and confusing for the user.++We choose to equate only obviously equal overloaded literals, in all other cases+we signal undecidability by returning Nothing from 'eqPmAltCons'. We do+better for non-overloaded literals, because we know their fromInteger/fromString+implementation is actually injective, allowing us to simplify the constraint+@fromInteger 1 ~ fromInteger 2@ to @1 ~ 2@, which is trivially unsatisfiable.++The impact of this treatment of overloaded literals is the following:++  * Redundancy checking is rather conservative, since it cannot see that clause+    B above is redundant.++  * We have instant equality check for overloaded literals (we do not rely on+    the term oracle which is rather expensive, both in terms of performance and+    memory). This significantly improves the performance of functions `covered`+    `uncovered` and `divergent` in deSugar/Check.hs and effectively addresses+    #11161.++  * The warnings issued are simpler.++Similar reasoning applies to pattern synonyms: In contrast to data constructors,+which are generative, constraints like F a ~ G b for two different pattern+synonyms F and G aren't immediately unsatisfiable. We assume F a ~ F a, though.+-}++literalToPmLit :: Type -> Literal -> Maybe PmLit+literalToPmLit ty l = PmLit ty <$> go l+  where+    go (LitChar c)       = Just (PmLitChar c)+    go (LitFloat r)      = Just (PmLitRat r)+    go (LitDouble r)     = Just (PmLitRat r)+    go (LitString s)     = Just (PmLitString (mkFastStringByteString s))+    go (LitNumber _ i _) = Just (PmLitInt i)+    go _                 = Nothing++negatePmLit :: PmLit -> Maybe PmLit+negatePmLit (PmLit ty v) = PmLit ty <$> go v+  where+    go (PmLitInt i)       = Just (PmLitInt (-i))+    go (PmLitRat r)       = Just (PmLitRat (-r))+    go (PmLitOverInt n i) = Just (PmLitOverInt (n+1) i)+    go (PmLitOverRat n r) = Just (PmLitOverRat (n+1) r)+    go _                  = Nothing++overloadPmLit :: Type -> PmLit -> Maybe PmLit+overloadPmLit ty (PmLit _ v) = PmLit ty <$> go v+  where+    go (PmLitInt i)          = Just (PmLitOverInt 0 i)+    go (PmLitRat r)          = Just (PmLitOverRat 0 r)+    go (PmLitString s)+      | ty `eqType` stringTy = Just v+      | otherwise            = Just (PmLitOverString s)+    go _               = Nothing++pmLitAsStringLit :: PmLit -> Maybe FastString+pmLitAsStringLit (PmLit _ (PmLitString s)) = Just s+pmLitAsStringLit _                         = Nothing++coreExprAsPmLit :: CoreExpr -> Maybe PmLit+-- coreExprAsPmLit e | pprTrace "coreExprAsPmLit" (ppr e) False = undefined+coreExprAsPmLit (Tick _t e) = coreExprAsPmLit e+coreExprAsPmLit (Lit l) = literalToPmLit (literalType l) l+coreExprAsPmLit e = case collectArgs e of+  (Var x, [Lit l])+    | Just dc <- isDataConWorkId_maybe x+    , dc `elem` [intDataCon, wordDataCon, charDataCon, floatDataCon, doubleDataCon]+    -> literalToPmLit (exprType e) l+  (Var x, [_ty, Lit n, Lit d])+    | Just dc <- isDataConWorkId_maybe x+    , dataConName dc == ratioDataConName+    -- HACK: just assume we have a literal double. This case only occurs for+    --       overloaded lits anyway, so we immediately override type information+    -> literalToPmLit (exprType e) (mkLitDouble (litValue n % litValue d))+  (Var x, args)+    -- Take care of -XRebindableSyntax. The last argument should be the (only)+    -- integer literal, otherwise we can't really do much about it.+    | [Lit l] <- dropWhile (not . is_lit) args+    -- getOccFS because of -XRebindableSyntax+    , getOccFS (idName x) == getOccFS fromIntegerName+    -> literalToPmLit (literalType l) l >>= overloadPmLit (exprType e)+  (Var x, args)+    -- Similar to fromInteger case+    | [r] <- dropWhile (not . is_ratio) args+    , getOccFS (idName x) == getOccFS fromRationalName+    -> coreExprAsPmLit r >>= overloadPmLit (exprType e)+  (Var x, [Type _ty, _dict, s])+    | idName x == fromStringName+    -- NB: Calls coreExprAsPmLit and then overloadPmLit, so that we return PmLitOverStrings+    -> coreExprAsPmLit s >>= overloadPmLit (exprType e)+  -- These last two cases handle String literals+  (Var x, [Type ty])+    | Just dc <- isDataConWorkId_maybe x+    , dc == nilDataCon+    , ty `eqType` charTy+    -> literalToPmLit stringTy (mkLitString "")+  (Var x, [Lit l])+    | idName x `elem` [unpackCStringName, unpackCStringUtf8Name]+    -> literalToPmLit stringTy l+  _ -> Nothing+  where+    is_lit Lit{} = True+    is_lit _     = False+    is_ratio (Type _) = False+    is_ratio r+      | Just (tc, _) <- splitTyConApp_maybe (exprType r)+      = tyConName tc == ratioTyConName+      | otherwise+      = False++instance Outputable PmLitValue where+  ppr (PmLitInt i)        = ppr i+  ppr (PmLitRat r)        = ppr (double (fromRat r)) -- good enough+  ppr (PmLitChar c)       = pprHsChar c+  ppr (PmLitString s)     = pprHsString s+  ppr (PmLitOverInt n i)  = minuses n (ppr i)+  ppr (PmLitOverRat n r)  = minuses n (ppr (double (fromRat r)))+  ppr (PmLitOverString s) = pprHsString s++-- Take care of negated literals+minuses :: Int -> SDoc -> SDoc+minuses n sdoc = iterate (\sdoc -> parens (char '-' <> sdoc)) sdoc !! n++instance Outputable PmLit where+  ppr (PmLit ty v) = ppr v <> suffix+    where+      -- Some ad-hoc hackery for displaying proper lit suffixes based on type+      tbl = [ (intPrimTy, primIntSuffix)+            , (int64PrimTy, primInt64Suffix)+            , (wordPrimTy, primWordSuffix)+            , (word64PrimTy, primWord64Suffix)+            , (charPrimTy, primCharSuffix)+            , (floatPrimTy, primFloatSuffix)+            , (doublePrimTy, primDoubleSuffix) ]+      suffix = fromMaybe empty (snd <$> find (eqType ty . fst) tbl)++instance Outputable PmAltCon where+  ppr (PmAltConLike cl) = ppr cl+  ppr (PmAltLit l)      = ppr l++instance Outputable PmEquality where+  ppr = text . show++type ConLikeSet = UniqDSet ConLike++-- | A data type caching the results of 'completeMatchConLikes' with support for+-- deletion of constructors that were already matched on.+data PossibleMatches+  = PM (NonEmpty.NonEmpty ConLikeSet)+  -- ^ Each ConLikeSet is a (subset of) the constructors in a COMPLETE set+  -- 'NonEmpty' because the empty case would mean that the type has no COMPLETE+  -- set at all, for which we have 'NoPM'.+  | NoPM+  -- ^ No COMPLETE set for this type (yet). Think of overloaded literals.++instance Outputable PossibleMatches where+  ppr (PM cs) = ppr (NonEmpty.toList cs)+  ppr NoPM = text "<NoPM>"++-- | Either @Indirect x@, meaning the value is represented by that of @x@, or+-- an @Entry@ containing containing the actual value it represents.+data Shared a+  = Indirect Id+  | Entry a++-- | A 'DIdEnv' in which entries can be shared by multiple 'Id's.+-- Merge equivalence classes of two Ids by 'setIndirectSDIE' and set the entry+-- of an Id with 'setEntrySDIE'.+newtype SharedDIdEnv a+  = SDIE { unSDIE :: DIdEnv (Shared a) }++emptySDIE :: SharedDIdEnv a+emptySDIE = SDIE emptyDVarEnv++lookupReprAndEntrySDIE :: SharedDIdEnv a -> Id -> (Id, Maybe a)+lookupReprAndEntrySDIE sdie@(SDIE env) x = case lookupDVarEnv env x of+  Nothing           -> (x, Nothing)+  Just (Indirect y) -> lookupReprAndEntrySDIE sdie y+  Just (Entry a)    -> (x, Just a)++-- | @lookupSDIE env x@ looks up an entry for @x@, looking through all+-- 'Indirect's until it finds a shared 'Entry'.+lookupSDIE :: SharedDIdEnv a -> Id -> Maybe a+lookupSDIE sdie x = snd (lookupReprAndEntrySDIE sdie x)++-- | Check if two variables are part of the same equivalence class.+sameRepresentativeSDIE :: SharedDIdEnv a -> Id -> Id -> Bool+sameRepresentativeSDIE sdie x y =+  fst (lookupReprAndEntrySDIE sdie x) == fst (lookupReprAndEntrySDIE sdie y)++-- | @setIndirectSDIE env x y@ sets @x@'s 'Entry' to @Indirect y@, thereby+-- merging @x@'s equivalence class into @y@'s. This will discard all info on+-- @x@!+setIndirectSDIE :: SharedDIdEnv a -> Id -> Id -> SharedDIdEnv a+setIndirectSDIE sdie@(SDIE env) x y =+  SDIE $ extendDVarEnv env (fst (lookupReprAndEntrySDIE sdie x)) (Indirect y)++-- | @setEntrySDIE env x a@ sets the 'Entry' @x@ is associated with to @a@,+-- thereby modifying its whole equivalence class.+setEntrySDIE :: SharedDIdEnv a -> Id -> a -> SharedDIdEnv a+setEntrySDIE sdie@(SDIE env) x a =+  SDIE $ extendDVarEnv env (fst (lookupReprAndEntrySDIE sdie x)) (Entry a)++traverseSDIE :: Applicative f => (a -> f b) -> SharedDIdEnv a -> f (SharedDIdEnv b)+traverseSDIE f = fmap (SDIE . listToUDFM) . traverse g . udfmToList . unSDIE+  where+    g (u, Indirect y) = pure (u,Indirect y)+    g (u, Entry a)    = (u,) . Entry <$> f a++instance Outputable a => Outputable (Shared a) where+  ppr (Indirect x) = ppr x+  ppr (Entry a)    = ppr a++instance Outputable a => Outputable (SharedDIdEnv a) where+  ppr (SDIE env) = ppr env++-- | The term oracle state. Stores 'VarInfo' for encountered 'Id's. These+-- entries are possibly shared when we figure out that two variables must be+-- equal, thus represent the same set of values.+--+-- See Note [TmState invariants] in Oracle.+data TmState+  = TmSt+  { ts_facts :: !(SharedDIdEnv VarInfo)+  -- ^ Facts about term variables. Deterministic env, so that we generate+  -- deterministic error messages.+  , ts_reps  :: !(CoreMap Id)+  -- ^ An environment for looking up whether we already encountered semantically+  -- equivalent expressions that we want to represent by the same 'Id'+  -- representative.+  }++-- | Information about an 'Id'. Stores positive ('vi_pos') facts, like @x ~ Just 42@,+-- and negative ('vi_neg') facts, like "x is not (:)".+-- Also caches the type ('vi_ty'), the 'PossibleMatches' of a COMPLETE set+-- ('vi_cache').+--+-- Subject to Note [The Pos/Neg invariant] in PmOracle.+data VarInfo+  = VI+  { vi_ty  :: !Type+  -- ^ The type of the variable. Important for rejecting possible GADT+  -- constructors or incompatible pattern synonyms (@Just42 :: Maybe Int@).++  , vi_pos :: ![(PmAltCon, [Id])]+  -- ^ Positive info: 'PmAltCon' apps it is (i.e. @x ~ [Just y, PatSyn z]@), all+  -- at the same time (i.e. conjunctive).  We need a list because of nested+  -- pattern matches involving pattern synonym+  --    case x of { Just y -> case x of PatSyn z -> ... }+  -- However, no more than one RealDataCon in the list, otherwise contradiction+  -- because of generativity.++  , vi_neg :: ![PmAltCon]+  -- ^ Negative info: A list of 'PmAltCon's that it cannot match.+  -- Example, assuming+  --+  -- @+  --     data T = Leaf Int | Branch T T | Node Int T+  -- @+  --+  -- then @x /~ [Leaf, Node]@ means that @x@ cannot match a @Leaf@ or @Node@,+  -- and hence can only match @Branch@. Is orthogonal to anything from 'vi_pos',+  -- in the sense that 'eqPmAltCon' returns @PossiblyOverlap@ for any pairing+  -- between 'vi_pos' and 'vi_neg'.++  -- See Note [Why record both positive and negative info?]++  , vi_cache :: !PossibleMatches+  -- ^ A cache of the associated COMPLETE sets. At any time a superset of+  -- possible constructors of each COMPLETE set. So, if it's not in here, we+  -- can't possibly match on it. Complementary to 'vi_neg'. We still need it+  -- to recognise completion of a COMPLETE set efficiently for large enums.+  }++-- | Not user-facing.+instance Outputable TmState where+  ppr (TmSt state reps) = ppr state $$ ppr reps++-- | Not user-facing.+instance Outputable VarInfo where+  ppr (VI ty pos neg cache)+    = braces (hcat (punctuate comma [ppr ty, ppr pos, ppr neg, ppr cache]))++-- | Initial state of the term oracle.+initTmState :: TmState+initTmState = TmSt emptySDIE emptyCoreMap++-- | The type oracle state. A poor man's 'TcSMonad.InsertSet': The invariant is+-- that all constraints in there are mutually compatible.+newtype TyState = TySt (Bag EvVar)++-- | Not user-facing.+instance Outputable TyState where+  ppr (TySt evs)+    = braces $ hcat $ punctuate comma $ map (ppr . evVarPred) $ bagToList evs++initTyState :: TyState+initTyState = TySt emptyBag++-- | Term and type constraints to accompany each value vector abstraction.+-- For efficiency, we store the term oracle state instead of the term+-- constraints.+data Delta = MkDelta { delta_ty_st :: TyState    -- Type oracle; things like a~Int+                     , delta_tm_st :: TmState }  -- Term oracle; things like x~Nothing++-- | An initial delta that is always satisfiable+initDelta :: Delta+initDelta = MkDelta initTyState initTmState++instance Outputable Delta where+  ppr delta = vcat [+      -- intentionally formatted this way enable the dev to comment in only+      -- the info she needs+      ppr (delta_tm_st delta),+      ppr (delta_ty_st delta)+    ]
+ GHC/HsToCore/PmCheck/Types.hs-boot view
@@ -0,0 +1,7 @@+module GHC.HsToCore.PmCheck.Types where++import GhcPrelude ()++data Delta++initDelta :: Delta
+ GHC/Platform/ARM.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.ARM where++import GhcPrelude++#define MACHREGS_NO_REGS 0+#define MACHREGS_arm 1+#include "CodeGen.Platform.hs"+
+ GHC/Platform/ARM64.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.ARM64 where++import GhcPrelude++#define MACHREGS_NO_REGS 0+#define MACHREGS_aarch64 1+#include "CodeGen.Platform.hs"+
+ GHC/Platform/NoRegs.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.NoRegs where++import GhcPrelude++#define MACHREGS_NO_REGS 1+#include "CodeGen.Platform.hs"+
+ GHC/Platform/PPC.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.PPC where++import GhcPrelude++#define MACHREGS_NO_REGS 0+#define MACHREGS_powerpc 1+#include "CodeGen.Platform.hs"+
+ GHC/Platform/Regs.hs view
@@ -0,0 +1,113 @@++module GHC.Platform.Regs+       (callerSaves, activeStgRegs, haveRegBase, globalRegMaybe, freeReg)+       where++import GhcPrelude++import CmmExpr+import GHC.Platform+import Reg++import qualified GHC.Platform.ARM        as ARM+import qualified GHC.Platform.ARM64      as ARM64+import qualified GHC.Platform.PPC        as PPC+import qualified GHC.Platform.S390X      as S390X+import qualified GHC.Platform.SPARC      as SPARC+import qualified GHC.Platform.X86        as X86+import qualified GHC.Platform.X86_64     as X86_64+import qualified GHC.Platform.NoRegs     as NoRegs++-- | Returns 'True' if this global register is stored in a caller-saves+-- machine register.++callerSaves :: Platform -> GlobalReg -> Bool+callerSaves platform+ | platformUnregisterised platform = NoRegs.callerSaves+ | otherwise+ = case platformArch platform of+   ArchX86    -> X86.callerSaves+   ArchX86_64 -> X86_64.callerSaves+   ArchS390X  -> S390X.callerSaves+   ArchSPARC  -> SPARC.callerSaves+   ArchARM {} -> ARM.callerSaves+   ArchARM64  -> ARM64.callerSaves+   arch+    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->+        PPC.callerSaves++    | otherwise -> NoRegs.callerSaves++-- | Here is where the STG register map is defined for each target arch.+-- The order matters (for the llvm backend anyway)! We must make sure to+-- maintain the order here with the order used in the LLVM calling conventions.+-- Note that also, this isn't all registers, just the ones that are currently+-- possbily mapped to real registers.+activeStgRegs :: Platform -> [GlobalReg]+activeStgRegs platform+ | platformUnregisterised platform = NoRegs.activeStgRegs+ | otherwise+ = case platformArch platform of+   ArchX86    -> X86.activeStgRegs+   ArchX86_64 -> X86_64.activeStgRegs+   ArchS390X  -> S390X.activeStgRegs+   ArchSPARC  -> SPARC.activeStgRegs+   ArchARM {} -> ARM.activeStgRegs+   ArchARM64  -> ARM64.activeStgRegs+   arch+    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->+        PPC.activeStgRegs++    | otherwise -> NoRegs.activeStgRegs++haveRegBase :: Platform -> Bool+haveRegBase platform+ | platformUnregisterised platform = NoRegs.haveRegBase+ | otherwise+ = case platformArch platform of+   ArchX86    -> X86.haveRegBase+   ArchX86_64 -> X86_64.haveRegBase+   ArchS390X  -> S390X.haveRegBase+   ArchSPARC  -> SPARC.haveRegBase+   ArchARM {} -> ARM.haveRegBase+   ArchARM64  -> ARM64.haveRegBase+   arch+    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->+        PPC.haveRegBase++    | otherwise -> NoRegs.haveRegBase++globalRegMaybe :: Platform -> GlobalReg -> Maybe RealReg+globalRegMaybe platform+ | platformUnregisterised platform = NoRegs.globalRegMaybe+ | otherwise+ = case platformArch platform of+   ArchX86    -> X86.globalRegMaybe+   ArchX86_64 -> X86_64.globalRegMaybe+   ArchS390X  -> S390X.globalRegMaybe+   ArchSPARC  -> SPARC.globalRegMaybe+   ArchARM {} -> ARM.globalRegMaybe+   ArchARM64  -> ARM64.globalRegMaybe+   arch+    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->+        PPC.globalRegMaybe++    | otherwise -> NoRegs.globalRegMaybe++freeReg :: Platform -> RegNo -> Bool+freeReg platform+ | platformUnregisterised platform = NoRegs.freeReg+ | otherwise+ = case platformArch platform of+   ArchX86    -> X86.freeReg+   ArchX86_64 -> X86_64.freeReg+   ArchS390X  -> S390X.freeReg+   ArchSPARC  -> SPARC.freeReg+   ArchARM {} -> ARM.freeReg+   ArchARM64  -> ARM64.freeReg+   arch+    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->+        PPC.freeReg++    | otherwise -> NoRegs.freeReg+
+ GHC/Platform/S390X.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.S390X where++import GhcPrelude++#define MACHREGS_NO_REGS 0+#define MACHREGS_s390x 1+#include "CodeGen.Platform.hs"+
+ GHC/Platform/SPARC.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.SPARC where++import GhcPrelude++#define MACHREGS_NO_REGS 0+#define MACHREGS_sparc 1+#include "CodeGen.Platform.hs"+
+ GHC/Platform/X86.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.X86 where++import GhcPrelude++#define MACHREGS_NO_REGS 0+#define MACHREGS_i386 1+#include "CodeGen.Platform.hs"+
+ GHC/Platform/X86_64.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE CPP #-}++module GHC.Platform.X86_64 where++import GhcPrelude++#define MACHREGS_NO_REGS 0+#define MACHREGS_x86_64 1+#include "CodeGen.Platform.hs"+
+ GHC/StgToCmm.hs view
@@ -0,0 +1,223 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE DataKinds #-}++-----------------------------------------------------------------------------+--+-- Stg to C-- code generation+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm ( codeGen ) where++#include "HsVersions.h"++import GhcPrelude as Prelude++import GHC.StgToCmm.Prof (initCostCentres, ldvEnter)+import GHC.StgToCmm.Monad+import GHC.StgToCmm.Env+import GHC.StgToCmm.Bind+import GHC.StgToCmm.DataCon+import GHC.StgToCmm.Layout+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Closure+import GHC.StgToCmm.Hpc+import GHC.StgToCmm.Ticky++import Cmm+import CmmUtils+import CLabel++import StgSyn+import DynFlags+import ErrUtils++import HscTypes+import CostCentre+import Id+import IdInfo+import RepType+import DataCon+import TyCon+import Module+import Outputable+import Stream+import BasicTypes+import VarSet ( isEmptyDVarSet )++import OrdList+import MkGraph++import Data.IORef+import Control.Monad (when,void)+import Util++codeGen :: DynFlags+        -> Module+        -> [TyCon]+        -> CollectedCCs                -- (Local/global) cost-centres needing declaring/registering.+        -> [CgStgTopBinding]           -- Bindings to convert+        -> HpcInfo+        -> Stream IO CmmGroup ()       -- Output as a stream, so codegen can+                                       -- be interleaved with output++codeGen dflags this_mod data_tycons+        cost_centre_info stg_binds hpc_info+  = do  {     -- cg: run the code generator, and yield the resulting CmmGroup+              -- Using an IORef to store the state is a bit crude, but otherwise+              -- we would need to add a state monad layer.+        ; cgref <- liftIO $ newIORef =<< initC+        ; let cg :: FCode () -> Stream IO CmmGroup ()+              cg fcode = do+                cmm <- liftIO . withTimingSilent dflags (text "STG -> Cmm") (`seq` ()) $ do+                         st <- readIORef cgref+                         let (a,st') = runC dflags this_mod st (getCmm fcode)++                         -- NB. stub-out cgs_tops and cgs_stmts.  This fixes+                         -- a big space leak.  DO NOT REMOVE!+                         writeIORef cgref $! st'{ cgs_tops = nilOL,+                                                  cgs_stmts = mkNop }+                         return a+                yield cmm++               -- Note [codegen-split-init] the cmm_init block must come+               -- FIRST.  This is because when -split-objs is on we need to+               -- combine this block with its initialisation routines; see+               -- Note [pipeline-split-init].+        ; cg (mkModuleInit cost_centre_info this_mod hpc_info)++        ; mapM_ (cg . cgTopBinding dflags) stg_binds++                -- Put datatype_stuff after code_stuff, because the+                -- datatype closure table (for enumeration types) to+                -- (say) PrelBase_True_closure, which is defined in+                -- code_stuff+        ; let do_tycon tycon = do+                -- Generate a table of static closures for an+                -- enumeration type Note that the closure pointers are+                -- tagged.+                 when (isEnumerationTyCon tycon) $ cg (cgEnumerationTyCon tycon)+                 mapM_ (cg . cgDataCon) (tyConDataCons tycon)++        ; mapM_ do_tycon data_tycons+        }++---------------------------------------------------------------+--      Top-level bindings+---------------------------------------------------------------++{- 'cgTopBinding' is only used for top-level bindings, since they need+to be allocated statically (not in the heap) and need to be labelled.+No unboxed bindings can happen at top level.++In the code below, the static bindings are accumulated in the+@MkCgState@, and transferred into the ``statics'' slot by @forkStatics@.+This is so that we can write the top level processing in a compositional+style, with the increasing static environment being plumbed as a state+variable. -}++cgTopBinding :: DynFlags -> CgStgTopBinding -> FCode ()+cgTopBinding dflags (StgTopLifted (StgNonRec id rhs))+  = do  { let (info, fcode) = cgTopRhs dflags NonRecursive id rhs+        ; fcode+        ; addBindC info+        }++cgTopBinding dflags (StgTopLifted (StgRec pairs))+  = do  { let (bndrs, rhss) = unzip pairs+        ; let pairs' = zip bndrs rhss+              r = unzipWith (cgTopRhs dflags Recursive) pairs'+              (infos, fcodes) = unzip r+        ; addBindsC infos+        ; sequence_ fcodes+        }++cgTopBinding dflags (StgTopStringLit id str)+  = do  { let label = mkBytesLabel (idName id)+        ; let (lit, decl) = mkByteStringCLit label str+        ; emitDecl decl+        ; addBindC (litIdInfo dflags id mkLFStringLit lit)+        }++cgTopRhs :: DynFlags -> RecFlag -> Id -> CgStgRhs -> (CgIdInfo, FCode ())+        -- The Id is passed along for setting up a binding...++cgTopRhs dflags _rec bndr (StgRhsCon _cc con args)+  = cgTopRhsCon dflags bndr con (assertNonVoidStgArgs args)+      -- con args are always non-void,+      -- see Note [Post-unarisation invariants] in UnariseStg++cgTopRhs dflags rec bndr (StgRhsClosure fvs cc upd_flag args body)+  = ASSERT(isEmptyDVarSet fvs)    -- There should be no free variables+    cgTopRhsClosure dflags rec bndr cc upd_flag args body+++---------------------------------------------------------------+--      Module initialisation code+---------------------------------------------------------------++mkModuleInit+        :: CollectedCCs         -- cost centre info+        -> Module+        -> HpcInfo+        -> FCode ()++mkModuleInit cost_centre_info this_mod hpc_info+  = do  { initHpc this_mod hpc_info+        ; initCostCentres cost_centre_info+        }+++---------------------------------------------------------------+--      Generating static stuff for algebraic data types+---------------------------------------------------------------+++cgEnumerationTyCon :: TyCon -> FCode ()+cgEnumerationTyCon tycon+  = do dflags <- getDynFlags+       emitRODataLits (mkLocalClosureTableLabel (tyConName tycon) NoCafRefs)+             [ CmmLabelOff (mkLocalClosureLabel (dataConName con) NoCafRefs)+                           (tagForCon dflags con)+             | con <- tyConDataCons tycon]+++cgDataCon :: DataCon -> FCode ()+-- Generate the entry code, info tables, and (for niladic constructor)+-- the static closure, for a constructor.+cgDataCon data_con+  = do  { dflags <- getDynFlags+        ; let+            (tot_wds, --  #ptr_wds + #nonptr_wds+             ptr_wds) --  #ptr_wds+              = mkVirtConstrSizes dflags arg_reps++            nonptr_wds   = tot_wds - ptr_wds++            dyn_info_tbl =+              mkDataConInfoTable dflags data_con False ptr_wds nonptr_wds++            -- We're generating info tables, so we don't know and care about+            -- what the actual arguments are. Using () here as the place holder.+            arg_reps :: [NonVoid PrimRep]+            arg_reps = [ NonVoid rep_ty+                       | ty <- dataConRepArgTys data_con+                       , rep_ty <- typePrimRep ty+                       , not (isVoidRep rep_ty) ]++        ; emitClosureAndInfoTable dyn_info_tbl NativeDirectCall [] $+            -- NB: the closure pointer is assumed *untagged* on+            -- entry to a constructor.  If the pointer is tagged,+            -- then we should not be entering it.  This assumption+            -- is used in ldvEnter and when tagging the pointer to+            -- return it.+            -- NB 2: We don't set CC when entering data (WDP 94/06)+            do { tickyEnterDynCon+               ; ldvEnter (CmmReg nodeReg)+               ; tickyReturnOldCon (length arg_reps)+               ; void $ emitReturn [cmmOffsetB dflags (CmmReg nodeReg) (tagForCon dflags data_con)]+               }+                    -- The case continuation code expects a tagged pointer+        }
+ GHC/StgToCmm/ArgRep.hs view
@@ -0,0 +1,160 @@+-----------------------------------------------------------------------------+--+-- Argument representations used in GHC.StgToCmm.Layout.+--+-- (c) The University of Glasgow 2013+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.ArgRep (+        ArgRep(..), toArgRep, argRepSizeW,++        argRepString, isNonV, idArgRep,++        slowCallPattern,++        ) where++import GhcPrelude++import GHC.StgToCmm.Closure ( idPrimRep )++import SMRep            ( WordOff )+import Id               ( Id )+import TyCon            ( PrimRep(..), primElemRepSizeB )+import BasicTypes       ( RepArity )+import Constants        ( wORD64_SIZE )+import DynFlags++import Outputable+import FastString++-- I extricated this code as this new module in order to avoid a+-- cyclic dependency between GHC.StgToCmm.Layout and GHC.StgToCmm.Ticky.+--+-- NSF 18 Feb 2013++-------------------------------------------------------------------------+--      Classifying arguments: ArgRep+-------------------------------------------------------------------------++-- ArgRep is re-exported by GHC.StgToCmm.Layout, but only for use in the+-- byte-code generator which also needs to know about the+-- classification of arguments.++data ArgRep = P   -- GC Ptr+            | N   -- Word-sized non-ptr+            | L   -- 64-bit non-ptr (long)+            | V   -- Void+            | F   -- Float+            | D   -- Double+            | V16 -- 16-byte (128-bit) vectors of Float/Double/Int8/Word32/etc.+            | V32 -- 32-byte (256-bit) vectors of Float/Double/Int8/Word32/etc.+            | V64 -- 64-byte (512-bit) vectors of Float/Double/Int8/Word32/etc.+instance Outputable ArgRep where ppr = text . argRepString++argRepString :: ArgRep -> String+argRepString P = "P"+argRepString N = "N"+argRepString L = "L"+argRepString V = "V"+argRepString F = "F"+argRepString D = "D"+argRepString V16 = "V16"+argRepString V32 = "V32"+argRepString V64 = "V64"++toArgRep :: PrimRep -> ArgRep+toArgRep VoidRep           = V+toArgRep LiftedRep         = P+toArgRep UnliftedRep       = P+toArgRep IntRep            = N+toArgRep WordRep           = N+toArgRep Int8Rep           = N  -- Gets widened to native word width for calls+toArgRep Word8Rep          = N  -- Gets widened to native word width for calls+toArgRep Int16Rep          = N  -- Gets widened to native word width for calls+toArgRep Word16Rep         = N  -- Gets widened to native word width for calls+toArgRep Int32Rep          = N  -- Gets widened to native word width for calls+toArgRep Word32Rep         = N  -- Gets widened to native word width for calls+toArgRep AddrRep           = N+toArgRep Int64Rep          = L+toArgRep Word64Rep         = L+toArgRep FloatRep          = F+toArgRep DoubleRep         = D+toArgRep (VecRep len elem) = case len*primElemRepSizeB elem of+                               16 -> V16+                               32 -> V32+                               64 -> V64+                               _  -> error "toArgRep: bad vector primrep"++isNonV :: ArgRep -> Bool+isNonV V = False+isNonV _ = True++argRepSizeW :: DynFlags -> ArgRep -> WordOff                -- Size in words+argRepSizeW _      N   = 1+argRepSizeW _      P   = 1+argRepSizeW _      F   = 1+argRepSizeW dflags L   = wORD64_SIZE        `quot` wORD_SIZE dflags+argRepSizeW dflags D   = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags+argRepSizeW _      V   = 0+argRepSizeW dflags V16 = 16                 `quot` wORD_SIZE dflags+argRepSizeW dflags V32 = 32                 `quot` wORD_SIZE dflags+argRepSizeW dflags V64 = 64                 `quot` wORD_SIZE dflags++idArgRep :: Id -> ArgRep+idArgRep = toArgRep . idPrimRep++-- This list of argument patterns should be kept in sync with at least+-- the following:+--+--  * GHC.StgToCmm.Layout.stdPattern maybe to some degree?+--+--  * the RTS_RET(stg_ap_*) and RTS_FUN_DECL(stg_ap_*_fast)+--  declarations in includes/stg/MiscClosures.h+--+--  * the SLOW_CALL_*_ctr declarations in includes/stg/Ticky.h,+--+--  * the TICK_SLOW_CALL_*() #defines in includes/Cmm.h,+--+--  * the PR_CTR(SLOW_CALL_*_ctr) calls in rts/Ticky.c,+--+--  * and the SymI_HasProto(stg_ap_*_{ret,info,fast}) calls and+--  SymI_HasProto(SLOW_CALL_*_ctr) calls in rts/Linker.c+--+-- There may be more places that I haven't found; I merely igrep'd for+-- pppppp and excluded things that seemed ghci-specific.+--+-- Also, it seems at the moment that ticky counters with void+-- arguments will never be bumped, but I'm still declaring those+-- counters, defensively.+--+-- NSF 6 Mar 2013++slowCallPattern :: [ArgRep] -> (FastString, RepArity)+-- Returns the generic apply function and arity+--+-- The first batch of cases match (some) specialised entries+-- The last group deals exhaustively with the cases for the first argument+--   (and the zero-argument case)+--+-- In 99% of cases this function will match *all* the arguments in one batch++slowCallPattern (P: P: P: P: P: P: _) = (fsLit "stg_ap_pppppp", 6)+slowCallPattern (P: P: P: P: P: _)    = (fsLit "stg_ap_ppppp", 5)+slowCallPattern (P: P: P: P: _)       = (fsLit "stg_ap_pppp", 4)+slowCallPattern (P: P: P: V: _)       = (fsLit "stg_ap_pppv", 4)+slowCallPattern (P: P: P: _)          = (fsLit "stg_ap_ppp", 3)+slowCallPattern (P: P: V: _)          = (fsLit "stg_ap_ppv", 3)+slowCallPattern (P: P: _)             = (fsLit "stg_ap_pp", 2)+slowCallPattern (P: V: _)             = (fsLit "stg_ap_pv", 2)+slowCallPattern (P: _)                = (fsLit "stg_ap_p", 1)+slowCallPattern (V: _)                = (fsLit "stg_ap_v", 1)+slowCallPattern (N: _)                = (fsLit "stg_ap_n", 1)+slowCallPattern (F: _)                = (fsLit "stg_ap_f", 1)+slowCallPattern (D: _)                = (fsLit "stg_ap_d", 1)+slowCallPattern (L: _)                = (fsLit "stg_ap_l", 1)+slowCallPattern (V16: _)              = (fsLit "stg_ap_v16", 1)+slowCallPattern (V32: _)              = (fsLit "stg_ap_v32", 1)+slowCallPattern (V64: _)              = (fsLit "stg_ap_v64", 1)+slowCallPattern []                    = (fsLit "stg_ap_0", 0)
+ GHC/StgToCmm/Bind.hs view
@@ -0,0 +1,754 @@+-----------------------------------------------------------------------------+--+-- Stg to C-- code generation: bindings+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Bind (+        cgTopRhsClosure,+        cgBind,+        emitBlackHoleCode,+        pushUpdateFrame, emitUpdateFrame+  ) where++import GhcPrelude hiding ((<*>))++import GHC.StgToCmm.Expr+import GHC.StgToCmm.Monad+import GHC.StgToCmm.Env+import GHC.StgToCmm.DataCon+import GHC.StgToCmm.Heap+import GHC.StgToCmm.Prof (ldvEnterClosure, enterCostCentreFun, enterCostCentreThunk,+                   initUpdFrameProf)+import GHC.StgToCmm.Ticky+import GHC.StgToCmm.Layout+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Closure+import GHC.StgToCmm.Foreign    (emitPrimCall)++import MkGraph+import CoreSyn          ( AltCon(..), tickishIsCode )+import BlockId+import SMRep+import Cmm+import CmmInfo+import CmmUtils+import CLabel+import StgSyn+import CostCentre+import Id+import IdInfo+import Name+import Module+import ListSetOps+import Util+import VarSet+import BasicTypes+import Outputable+import FastString+import DynFlags++import Control.Monad++------------------------------------------------------------------------+--              Top-level bindings+------------------------------------------------------------------------++-- For closures bound at top level, allocate in static space.+-- They should have no free variables.++cgTopRhsClosure :: DynFlags+                -> RecFlag              -- member of a recursive group?+                -> Id+                -> CostCentreStack      -- Optional cost centre annotation+                -> UpdateFlag+                -> [Id]                 -- Args+                -> CgStgExpr+                -> (CgIdInfo, FCode ())++cgTopRhsClosure dflags rec id ccs upd_flag args body =+  let closure_label = mkLocalClosureLabel (idName id) (idCafInfo id)+      cg_id_info    = litIdInfo dflags id lf_info (CmmLabel closure_label)+      lf_info       = mkClosureLFInfo dflags id TopLevel [] upd_flag args+  in (cg_id_info, gen_code dflags lf_info closure_label)+  where+  -- special case for a indirection (f = g).  We create an IND_STATIC+  -- closure pointing directly to the indirectee.  This is exactly+  -- what the CAF will eventually evaluate to anyway, we're just+  -- shortcutting the whole process, and generating a lot less code+  -- (#7308). Eventually the IND_STATIC closure will be eliminated+  -- by assembly '.equiv' directives, where possible (#15155).+  -- See note [emit-time elimination of static indirections] in CLabel.+  --+  -- Note: we omit the optimisation when this binding is part of a+  -- recursive group, because the optimisation would inhibit the black+  -- hole detection from working in that case.  Test+  -- concurrent/should_run/4030 fails, for instance.+  --+  gen_code dflags _ closure_label+    | StgApp f [] <- body, null args, isNonRec rec+    = do+         cg_info <- getCgIdInfo f+         let closure_rep   = mkStaticClosureFields dflags+                                    indStaticInfoTable ccs MayHaveCafRefs+                                    [unLit (idInfoToAmode cg_info)]+         emitDataLits closure_label closure_rep+         return ()++  gen_code dflags lf_info _closure_label+   = do { let name = idName id+        ; mod_name <- getModuleName+        ; let descr         = closureDescription dflags mod_name name+              closure_info  = mkClosureInfo dflags True id lf_info 0 0 descr++        -- We don't generate the static closure here, because we might+        -- want to add references to static closures to it later.  The+        -- static closure is generated by CmmBuildInfoTables.updInfoSRTs,+        -- See Note [SRTs], specifically the [FUN] optimisation.++        ; let fv_details :: [(NonVoid Id, ByteOff)]+              header = if isLFThunk lf_info then ThunkHeader else StdHeader+              (_, _, fv_details) = mkVirtHeapOffsets dflags header []+        -- Don't drop the non-void args until the closure info has been made+        ; forkClosureBody (closureCodeBody True id closure_info ccs+                                (nonVoidIds args) (length args) body fv_details)++        ; return () }++  unLit (CmmLit l) = l+  unLit _ = panic "unLit"++------------------------------------------------------------------------+--              Non-top-level bindings+------------------------------------------------------------------------++cgBind :: CgStgBinding -> FCode ()+cgBind (StgNonRec name rhs)+  = do  { (info, fcode) <- cgRhs name rhs+        ; addBindC info+        ; init <- fcode+        ; emit init }+        -- init cannot be used in body, so slightly better to sink it eagerly++cgBind (StgRec pairs)+  = do  {  r <- sequence $ unzipWith cgRhs pairs+        ;  let (id_infos, fcodes) = unzip r+        ;  addBindsC id_infos+        ;  (inits, body) <- getCodeR $ sequence fcodes+        ;  emit (catAGraphs inits <*> body) }++{- Note [cgBind rec]++   Recursive let-bindings are tricky.+   Consider the following pseudocode:++     let x = \_ ->  ... y ...+         y = \_ ->  ... z ...+         z = \_ ->  ... x ...+     in ...++   For each binding, we need to allocate a closure, and each closure must+   capture the address of the other closures.+   We want to generate the following C-- code:+     // Initialization Code+     x = hp - 24; // heap address of x's closure+     y = hp - 40; // heap address of x's closure+     z = hp - 64; // heap address of x's closure+     // allocate and initialize x+     m[hp-8]   = ...+     m[hp-16]  = y       // the closure for x captures y+     m[hp-24] = x_info;+     // allocate and initialize y+     m[hp-32] = z;       // the closure for y captures z+     m[hp-40] = y_info;+     // allocate and initialize z+     ...++   For each closure, we must generate not only the code to allocate and+   initialize the closure itself, but also some initialization Code that+   sets a variable holding the closure pointer.++   We could generate a pair of the (init code, body code), but since+   the bindings are recursive we also have to initialise the+   environment with the CgIdInfo for all the bindings before compiling+   anything.  So we do this in 3 stages:++     1. collect all the CgIdInfos and initialise the environment+     2. compile each binding into (init, body) code+     3. emit all the inits, and then all the bodies++   We'd rather not have separate functions to do steps 1 and 2 for+   each binding, since in pratice they share a lot of code.  So we+   have just one function, cgRhs, that returns a pair of the CgIdInfo+   for step 1, and a monadic computation to generate the code in step+   2.++   The alternative to separating things in this way is to use a+   fixpoint.  That's what we used to do, but it introduces a+   maintenance nightmare because there is a subtle dependency on not+   being too strict everywhere.  Doing things this way means that the+   FCode monad can be strict, for example.+ -}++cgRhs :: Id+      -> CgStgRhs+      -> FCode (+                 CgIdInfo         -- The info for this binding+               , FCode CmmAGraph  -- A computation which will generate the+                                  -- code for the binding, and return an+                                  -- assignent of the form "x = Hp - n"+                                  -- (see above)+               )++cgRhs id (StgRhsCon cc con args)+  = withNewTickyCounterCon (idName id) $+    buildDynCon id True cc con (assertNonVoidStgArgs args)+      -- con args are always non-void,+      -- see Note [Post-unarisation invariants] in UnariseStg++{- See Note [GC recovery] in compiler/GHC.StgToCmm/Closure.hs -}+cgRhs id (StgRhsClosure fvs cc upd_flag args body)+  = do dflags <- getDynFlags+       mkRhsClosure dflags id cc (nonVoidIds (dVarSetElems fvs)) upd_flag args body++------------------------------------------------------------------------+--              Non-constructor right hand sides+------------------------------------------------------------------------++mkRhsClosure :: DynFlags -> Id -> CostCentreStack+             -> [NonVoid Id]                    -- Free vars+             -> UpdateFlag+             -> [Id]                            -- Args+             -> CgStgExpr+             -> FCode (CgIdInfo, FCode CmmAGraph)++{- mkRhsClosure looks for two special forms of the right-hand side:+        a) selector thunks+        b) AP thunks++If neither happens, it just calls mkClosureLFInfo.  You might think+that mkClosureLFInfo should do all this, but it seems wrong for the+latter to look at the structure of an expression++Note [Selectors]+~~~~~~~~~~~~~~~~+We look at the body of the closure to see if it's a selector---turgid,+but nothing deep.  We are looking for a closure of {\em exactly} the+form:++...  = [the_fv] \ u [] ->+         case the_fv of+           con a_1 ... a_n -> a_i++Note [Ap thunks]+~~~~~~~~~~~~~~~~+A more generic AP thunk of the form++        x = [ x_1...x_n ] \.. [] -> x_1 ... x_n++A set of these is compiled statically into the RTS, so we just use+those.  We could extend the idea to thunks where some of the x_i are+global ids (and hence not free variables), but this would entail+generating a larger thunk.  It might be an option for non-optimising+compilation, though.++We only generate an Ap thunk if all the free variables are pointers,+for semi-obvious reasons.++-}++---------- Note [Selectors] ------------------+mkRhsClosure    dflags bndr _cc+                [NonVoid the_fv]                -- Just one free var+                upd_flag                -- Updatable thunk+                []                      -- A thunk+                expr+  | let strip = stripStgTicksTopE (not . tickishIsCode)+  , StgCase (StgApp scrutinee [{-no args-}])+         _   -- ignore bndr+         (AlgAlt _)+         [(DataAlt _, params, sel_expr)] <- strip expr+  , StgApp selectee [{-no args-}] <- strip sel_expr+  , the_fv == scrutinee                -- Scrutinee is the only free variable++  , let (_, _, params_w_offsets) = mkVirtConstrOffsets dflags (addIdReps (assertNonVoidIds params))+                                   -- pattern binders are always non-void,+                                   -- see Note [Post-unarisation invariants] in UnariseStg+  , Just the_offset <- assocMaybe params_w_offsets (NonVoid selectee)++  , let offset_into_int = bytesToWordsRoundUp dflags the_offset+                          - fixedHdrSizeW dflags+  , offset_into_int <= mAX_SPEC_SELECTEE_SIZE dflags -- Offset is small enough+  = -- NOT TRUE: ASSERT(is_single_constructor)+    -- The simplifier may have statically determined that the single alternative+    -- is the only possible case and eliminated the others, even if there are+    -- other constructors in the datatype.  It's still ok to make a selector+    -- thunk in this case, because we *know* which constructor the scrutinee+    -- will evaluate to.+    --+    -- srt is discarded; it must be empty+    let lf_info = mkSelectorLFInfo bndr offset_into_int (isUpdatable upd_flag)+    in cgRhsStdThunk bndr lf_info [StgVarArg the_fv]++---------- Note [Ap thunks] ------------------+mkRhsClosure    dflags bndr _cc+                fvs+                upd_flag+                []                      -- No args; a thunk+                (StgApp fun_id args)++  -- We are looking for an "ApThunk"; see data con ApThunk in GHC.StgToCmm.Closure+  -- of form (x1 x2 .... xn), where all the xi are locals (not top-level)+  -- So the xi will all be free variables+  | args `lengthIs` (n_fvs-1)  -- This happens only if the fun_id and+                               -- args are all distinct local variables+                               -- The "-1" is for fun_id+    -- Missed opportunity:   (f x x) is not detected+  , all (isGcPtrRep . idPrimRep . fromNonVoid) fvs+  , isUpdatable upd_flag+  , n_fvs <= mAX_SPEC_AP_SIZE dflags+  , not (gopt Opt_SccProfilingOn dflags)+                         -- not when profiling: we don't want to+                         -- lose information about this particular+                         -- thunk (e.g. its type) (#949)+  , idArity fun_id == unknownArity -- don't spoil a known call++          -- Ha! an Ap thunk+  = cgRhsStdThunk bndr lf_info payload++  where+    n_fvs   = length fvs+    lf_info = mkApLFInfo bndr upd_flag n_fvs+    -- the payload has to be in the correct order, hence we can't+    -- just use the fvs.+    payload = StgVarArg fun_id : args++---------- Default case ------------------+mkRhsClosure dflags bndr cc fvs upd_flag args body+  = do  { let lf_info = mkClosureLFInfo dflags bndr NotTopLevel fvs upd_flag args+        ; (id_info, reg) <- rhsIdInfo bndr lf_info+        ; return (id_info, gen_code lf_info reg) }+ where+ gen_code lf_info reg+  = do  {       -- LAY OUT THE OBJECT+        -- If the binder is itself a free variable, then don't store+        -- it in the closure.  Instead, just bind it to Node on entry.+        -- NB we can be sure that Node will point to it, because we+        -- haven't told mkClosureLFInfo about this; so if the binder+        -- _was_ a free var of its RHS, mkClosureLFInfo thinks it *is*+        -- stored in the closure itself, so it will make sure that+        -- Node points to it...+        ; let   reduced_fvs = filter (NonVoid bndr /=) fvs++        -- MAKE CLOSURE INFO FOR THIS CLOSURE+        ; mod_name <- getModuleName+        ; dflags <- getDynFlags+        ; let   name  = idName bndr+                descr = closureDescription dflags mod_name name+                fv_details :: [(NonVoid Id, ByteOff)]+                header = if isLFThunk lf_info then ThunkHeader else StdHeader+                (tot_wds, ptr_wds, fv_details)+                   = mkVirtHeapOffsets dflags header (addIdReps reduced_fvs)+                closure_info = mkClosureInfo dflags False       -- Not static+                                             bndr lf_info tot_wds ptr_wds+                                             descr++        -- BUILD ITS INFO TABLE AND CODE+        ; forkClosureBody $+                -- forkClosureBody: (a) ensure that bindings in here are not seen elsewhere+                --                  (b) ignore Sequel from context; use empty Sequel+                -- And compile the body+                closureCodeBody False bndr closure_info cc (nonVoidIds args)+                                (length args) body fv_details++        -- BUILD THE OBJECT+--      ; (use_cc, blame_cc) <- chooseDynCostCentres cc args body+        ; let use_cc = cccsExpr; blame_cc = cccsExpr+        ; emit (mkComment $ mkFastString "calling allocDynClosure")+        ; let toVarArg (NonVoid a, off) = (NonVoid (StgVarArg a), off)+        ; let info_tbl = mkCmmInfo closure_info bndr currentCCS+        ; hp_plus_n <- allocDynClosure (Just bndr) info_tbl lf_info use_cc blame_cc+                                         (map toVarArg fv_details)++        -- RETURN+        ; return (mkRhsInit dflags reg lf_info hp_plus_n) }++-------------------------+cgRhsStdThunk+        :: Id+        -> LambdaFormInfo+        -> [StgArg]             -- payload+        -> FCode (CgIdInfo, FCode CmmAGraph)++cgRhsStdThunk bndr lf_info payload+ = do  { (id_info, reg) <- rhsIdInfo bndr lf_info+       ; return (id_info, gen_code reg)+       }+ where+ gen_code reg  -- AHA!  A STANDARD-FORM THUNK+  = withNewTickyCounterStdThunk (lfUpdatable lf_info) (idName bndr) $+    do+  {     -- LAY OUT THE OBJECT+    mod_name <- getModuleName+  ; dflags <- getDynFlags+  ; let header = if isLFThunk lf_info then ThunkHeader else StdHeader+        (tot_wds, ptr_wds, payload_w_offsets)+            = mkVirtHeapOffsets dflags header+                (addArgReps (nonVoidStgArgs payload))++        descr = closureDescription dflags mod_name (idName bndr)+        closure_info = mkClosureInfo dflags False       -- Not static+                                     bndr lf_info tot_wds ptr_wds+                                     descr++--  ; (use_cc, blame_cc) <- chooseDynCostCentres cc [{- no args-}] body+  ; let use_cc = cccsExpr; blame_cc = cccsExpr+++        -- BUILD THE OBJECT+  ; let info_tbl = mkCmmInfo closure_info bndr currentCCS+  ; hp_plus_n <- allocDynClosure (Just bndr) info_tbl lf_info+                                   use_cc blame_cc payload_w_offsets++        -- RETURN+  ; return (mkRhsInit dflags reg lf_info hp_plus_n) }+++mkClosureLFInfo :: DynFlags+                -> Id           -- The binder+                -> TopLevelFlag -- True of top level+                -> [NonVoid Id] -- Free vars+                -> UpdateFlag   -- Update flag+                -> [Id]         -- Args+                -> LambdaFormInfo+mkClosureLFInfo dflags bndr top fvs upd_flag args+  | null args =+        mkLFThunk (idType bndr) top (map fromNonVoid fvs) upd_flag+  | otherwise =+        mkLFReEntrant top (map fromNonVoid fvs) args (mkArgDescr dflags args)+++------------------------------------------------------------------------+--              The code for closures+------------------------------------------------------------------------++closureCodeBody :: Bool            -- whether this is a top-level binding+                -> Id              -- the closure's name+                -> ClosureInfo     -- Lots of information about this closure+                -> CostCentreStack -- Optional cost centre attached to closure+                -> [NonVoid Id]    -- incoming args to the closure+                -> Int             -- arity, including void args+                -> CgStgExpr+                -> [(NonVoid Id, ByteOff)] -- the closure's free vars+                -> FCode ()++{- There are two main cases for the code for closures.++* If there are *no arguments*, then the closure is a thunk, and not in+  normal form. So it should set up an update frame (if it is+  shared). NB: Thunks cannot have a primitive type!++* If there is *at least one* argument, then this closure is in+  normal form, so there is no need to set up an update frame.+-}++closureCodeBody top_lvl bndr cl_info cc _args arity body fv_details+  | arity == 0 -- No args i.e. thunk+  = withNewTickyCounterThunk+        (isStaticClosure cl_info)+        (closureUpdReqd cl_info)+        (closureName cl_info) $+    emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl [] $+      \(_, node, _) -> thunkCode cl_info fv_details cc node arity body+   where+     lf_info  = closureLFInfo cl_info+     info_tbl = mkCmmInfo cl_info bndr cc++closureCodeBody top_lvl bndr cl_info cc args arity body fv_details+  = -- Note: args may be [], if all args are Void+    withNewTickyCounterFun+        (closureSingleEntry cl_info)+        (closureName cl_info)+        args $ do {++        ; let+             lf_info  = closureLFInfo cl_info+             info_tbl = mkCmmInfo cl_info bndr cc++        -- Emit the main entry code+        ; emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl args $+            \(_offset, node, arg_regs) -> do+                -- Emit slow-entry code (for entering a closure through a PAP)+                { mkSlowEntryCode bndr cl_info arg_regs+                ; dflags <- getDynFlags+                ; let node_points = nodeMustPointToIt dflags lf_info+                      node' = if node_points then Just node else Nothing+                ; loop_header_id <- newBlockId+                -- Extend reader monad with information that+                -- self-recursive tail calls can be optimized into local+                -- jumps. See Note [Self-recursive tail calls] in GHC.StgToCmm.Expr.+                ; withSelfLoop (bndr, loop_header_id, arg_regs) $ do+                {+                -- Main payload+                ; entryHeapCheck cl_info node' arity arg_regs $ do+                { -- emit LDV code when profiling+                  when node_points (ldvEnterClosure cl_info (CmmLocal node))+                -- ticky after heap check to avoid double counting+                ; tickyEnterFun cl_info+                ; enterCostCentreFun cc+                    (CmmMachOp (mo_wordSub dflags)+                         [ CmmReg (CmmLocal node) -- See [NodeReg clobbered with loopification]+                         , mkIntExpr dflags (funTag dflags cl_info) ])+                ; fv_bindings <- mapM bind_fv fv_details+                -- Load free vars out of closure *after*+                -- heap check, to reduce live vars over check+                ; when node_points $ load_fvs node lf_info fv_bindings+                ; void $ cgExpr body+                }}}++  }++-- Note [NodeReg clobbered with loopification]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- Previously we used to pass nodeReg (aka R1) here. With profiling, upon+-- entering a closure, enterFunCCS was called with R1 passed to it. But since R1+-- may get clobbered inside the body of a closure, and since a self-recursive+-- tail call does not restore R1, a subsequent call to enterFunCCS received a+-- possibly bogus value from R1. The solution is to not pass nodeReg (aka R1) to+-- enterFunCCS. Instead, we pass node, the callee-saved temporary that stores+-- the original value of R1. This way R1 may get modified but loopification will+-- not care.++-- A function closure pointer may be tagged, so we+-- must take it into account when accessing the free variables.+bind_fv :: (NonVoid Id, ByteOff) -> FCode (LocalReg, ByteOff)+bind_fv (id, off) = do { reg <- rebindToReg id; return (reg, off) }++load_fvs :: LocalReg -> LambdaFormInfo -> [(LocalReg, ByteOff)] -> FCode ()+load_fvs node lf_info = mapM_ (\ (reg, off) ->+   do dflags <- getDynFlags+      let tag = lfDynTag dflags lf_info+      emit $ mkTaggedObjectLoad dflags reg node off tag)++-----------------------------------------+-- The "slow entry" code for a function.  This entry point takes its+-- arguments on the stack.  It loads the arguments into registers+-- according to the calling convention, and jumps to the function's+-- normal entry point.  The function's closure is assumed to be in+-- R1/node.+--+-- The slow entry point is used for unknown calls: eg. stg_PAP_entry++mkSlowEntryCode :: Id -> ClosureInfo -> [LocalReg] -> FCode ()+-- If this function doesn't have a specialised ArgDescr, we need+-- to generate the function's arg bitmap and slow-entry code.+-- Here, we emit the slow-entry code.+mkSlowEntryCode bndr cl_info arg_regs -- function closure is already in `Node'+  | Just (_, ArgGen _) <- closureFunInfo cl_info+  = do dflags <- getDynFlags+       let node = idToReg dflags (NonVoid bndr)+           slow_lbl = closureSlowEntryLabel  cl_info+           fast_lbl = closureLocalEntryLabel dflags cl_info+           -- mkDirectJump does not clobber `Node' containing function closure+           jump = mkJump dflags NativeNodeCall+                                (mkLblExpr fast_lbl)+                                (map (CmmReg . CmmLocal) (node : arg_regs))+                                (initUpdFrameOff dflags)+       tscope <- getTickScope+       emitProcWithConvention Slow Nothing slow_lbl+         (node : arg_regs) (jump, tscope)+  | otherwise = return ()++-----------------------------------------+thunkCode :: ClosureInfo -> [(NonVoid Id, ByteOff)] -> CostCentreStack+          -> LocalReg -> Int -> CgStgExpr -> FCode ()+thunkCode cl_info fv_details _cc node arity body+  = do { dflags <- getDynFlags+       ; let node_points = nodeMustPointToIt dflags (closureLFInfo cl_info)+             node'       = if node_points then Just node else Nothing+        ; ldvEnterClosure cl_info (CmmLocal node) -- NB: Node always points when profiling++        -- Heap overflow check+        ; entryHeapCheck cl_info node' arity [] $ do+        { -- Overwrite with black hole if necessary+          -- but *after* the heap-overflow check+        ; tickyEnterThunk cl_info+        ; when (blackHoleOnEntry cl_info && node_points)+                (blackHoleIt node)++          -- Push update frame+        ; setupUpdate cl_info node $+            -- We only enter cc after setting up update so+            -- that cc of enclosing scope will be recorded+            -- in update frame CAF/DICT functions will be+            -- subsumed by this enclosing cc+            do { enterCostCentreThunk (CmmReg nodeReg)+               ; let lf_info = closureLFInfo cl_info+               ; fv_bindings <- mapM bind_fv fv_details+               ; load_fvs node lf_info fv_bindings+               ; void $ cgExpr body }}}+++------------------------------------------------------------------------+--              Update and black-hole wrappers+------------------------------------------------------------------------++blackHoleIt :: LocalReg -> FCode ()+-- Only called for closures with no args+-- Node points to the closure+blackHoleIt node_reg+  = emitBlackHoleCode (CmmReg (CmmLocal node_reg))++emitBlackHoleCode :: CmmExpr -> FCode ()+emitBlackHoleCode node = do+  dflags <- getDynFlags++  -- Eager blackholing is normally disabled, but can be turned on with+  -- -feager-blackholing.  When it is on, we replace the info pointer+  -- of the thunk with stg_EAGER_BLACKHOLE_info on entry.++  -- If we wanted to do eager blackholing with slop filling, we'd need+  -- to do it at the *end* of a basic block, otherwise we overwrite+  -- the free variables in the thunk that we still need.  We have a+  -- patch for this from Andy Cheadle, but not incorporated yet. --SDM+  -- [6/2004]+  --+  -- Previously, eager blackholing was enabled when ticky-ticky was+  -- on. But it didn't work, and it wasn't strictly necessary to bring+  -- back minimal ticky-ticky, so now EAGER_BLACKHOLING is+  -- unconditionally disabled. -- krc 1/2007++  -- Note the eager-blackholing check is here rather than in blackHoleOnEntry,+  -- because emitBlackHoleCode is called from CmmParse.++  let  eager_blackholing =  not (gopt Opt_SccProfilingOn dflags)+                         && gopt Opt_EagerBlackHoling dflags+             -- Profiling needs slop filling (to support LDV+             -- profiling), so currently eager blackholing doesn't+             -- work with profiling.++  when eager_blackholing $ do+    whenUpdRemSetEnabled dflags $ emitUpdRemSetPushThunk node+    emitStore (cmmOffsetW dflags node (fixedHdrSizeW dflags)) currentTSOExpr+    -- See Note [Heap memory barriers] in SMP.h.+    emitPrimCall [] MO_WriteBarrier []+    emitStore node (CmmReg (CmmGlobal EagerBlackholeInfo))++setupUpdate :: ClosureInfo -> LocalReg -> FCode () -> FCode ()+        -- Nota Bene: this function does not change Node (even if it's a CAF),+        -- so that the cost centre in the original closure can still be+        -- extracted by a subsequent enterCostCentre+setupUpdate closure_info node body+  | not (lfUpdatable (closureLFInfo closure_info))+  = body++  | not (isStaticClosure closure_info)+  = if not (closureUpdReqd closure_info)+      then do tickyUpdateFrameOmitted; body+      else do+          tickyPushUpdateFrame+          dflags <- getDynFlags+          let+              bh = blackHoleOnEntry closure_info &&+                   not (gopt Opt_SccProfilingOn dflags) &&+                   gopt Opt_EagerBlackHoling dflags++              lbl | bh        = mkBHUpdInfoLabel+                  | otherwise = mkUpdInfoLabel++          pushUpdateFrame lbl (CmmReg (CmmLocal node)) body++  | otherwise   -- A static closure+  = do  { tickyUpdateBhCaf closure_info++        ; if closureUpdReqd closure_info+          then do       -- Blackhole the (updatable) CAF:+                { upd_closure <- link_caf node+                ; pushUpdateFrame mkBHUpdInfoLabel upd_closure body }+          else do {tickyUpdateFrameOmitted; body}+    }++-----------------------------------------------------------------------------+-- Setting up update frames++-- Push the update frame on the stack in the Entry area,+-- leaving room for the return address that is already+-- at the old end of the area.+--+pushUpdateFrame :: CLabel -> CmmExpr -> FCode () -> FCode ()+pushUpdateFrame lbl updatee body+  = do+       updfr  <- getUpdFrameOff+       dflags <- getDynFlags+       let+           hdr         = fixedHdrSize dflags+           frame       = updfr + hdr + sIZEOF_StgUpdateFrame_NoHdr dflags+       --+       emitUpdateFrame dflags (CmmStackSlot Old frame) lbl updatee+       withUpdFrameOff frame body++emitUpdateFrame :: DynFlags -> CmmExpr -> CLabel -> CmmExpr -> FCode ()+emitUpdateFrame dflags frame lbl updatee = do+  let+           hdr         = fixedHdrSize dflags+           off_updatee = hdr + oFFSET_StgUpdateFrame_updatee dflags+  --+  emitStore frame (mkLblExpr lbl)+  emitStore (cmmOffset dflags frame off_updatee) updatee+  initUpdFrameProf frame++-----------------------------------------------------------------------------+-- Entering a CAF+--+-- See Note [CAF management] in rts/sm/Storage.c++link_caf :: LocalReg           -- pointer to the closure+         -> FCode CmmExpr      -- Returns amode for closure to be updated+-- This function returns the address of the black hole, so it can be+-- updated with the new value when available.+link_caf node = do+  { dflags <- getDynFlags+        -- Call the RTS function newCAF, returning the newly-allocated+        -- blackhole indirection closure+  ; let newCAF_lbl = mkForeignLabel (fsLit "newCAF") Nothing+                                    ForeignLabelInExternalPackage IsFunction+  ; bh <- newTemp (bWord dflags)+  ; emitRtsCallGen [(bh,AddrHint)] newCAF_lbl+      [ (baseExpr,  AddrHint),+        (CmmReg (CmmLocal node), AddrHint) ]+      False++  -- see Note [atomic CAF entry] in rts/sm/Storage.c+  ; updfr  <- getUpdFrameOff+  ; let target = entryCode dflags (closureInfoPtr dflags (CmmReg (CmmLocal node)))+  ; emit =<< mkCmmIfThen+      (cmmEqWord dflags (CmmReg (CmmLocal bh)) (zeroExpr dflags))+        -- re-enter the CAF+       (mkJump dflags NativeNodeCall target [] updfr)++  ; return (CmmReg (CmmLocal bh)) }++------------------------------------------------------------------------+--              Profiling+------------------------------------------------------------------------++-- For "global" data constructors the description is simply occurrence+-- name of the data constructor itself.  Otherwise it is determined by+-- @closureDescription@ from the let binding information.++closureDescription :: DynFlags+           -> Module            -- Module+                   -> Name              -- Id of closure binding+                   -> String+        -- Not called for StgRhsCon which have global info tables built in+        -- CgConTbls.hs with a description generated from the data constructor+closureDescription dflags mod_name name+  = showSDocDump dflags (char '<' <>+                    (if isExternalName name+                      then ppr name -- ppr will include the module name prefix+                      else pprModule mod_name <> char '.' <> ppr name) <>+                    char '>')+   -- showSDocDump, because we want to see the unique on the Name.
+ GHC/StgToCmm/Bind.hs-boot view
@@ -0,0 +1,6 @@+module GHC.StgToCmm.Bind where++import GHC.StgToCmm.Monad( FCode )+import StgSyn( CgStgBinding )++cgBind :: CgStgBinding -> FCode ()
+ GHC/StgToCmm/CgUtils.hs view
@@ -0,0 +1,186 @@+{-# LANGUAGE GADTs #-}++-----------------------------------------------------------------------------+--+-- Code generator utilities; mostly monadic+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.CgUtils (+        fixStgRegisters,+        baseRegOffset,+        get_Regtable_addr_from_offset,+        regTableOffset,+        get_GlobalReg_addr,+  ) where++import GhcPrelude++import GHC.Platform.Regs+import Cmm+import Hoopl.Block+import Hoopl.Graph+import CmmUtils+import CLabel+import DynFlags+import Outputable++-- -----------------------------------------------------------------------------+-- Information about global registers++baseRegOffset :: DynFlags -> GlobalReg -> Int++baseRegOffset dflags (VanillaReg 1 _)    = oFFSET_StgRegTable_rR1 dflags+baseRegOffset dflags (VanillaReg 2 _)    = oFFSET_StgRegTable_rR2 dflags+baseRegOffset dflags (VanillaReg 3 _)    = oFFSET_StgRegTable_rR3 dflags+baseRegOffset dflags (VanillaReg 4 _)    = oFFSET_StgRegTable_rR4 dflags+baseRegOffset dflags (VanillaReg 5 _)    = oFFSET_StgRegTable_rR5 dflags+baseRegOffset dflags (VanillaReg 6 _)    = oFFSET_StgRegTable_rR6 dflags+baseRegOffset dflags (VanillaReg 7 _)    = oFFSET_StgRegTable_rR7 dflags+baseRegOffset dflags (VanillaReg 8 _)    = oFFSET_StgRegTable_rR8 dflags+baseRegOffset dflags (VanillaReg 9 _)    = oFFSET_StgRegTable_rR9 dflags+baseRegOffset dflags (VanillaReg 10 _)   = oFFSET_StgRegTable_rR10 dflags+baseRegOffset _      (VanillaReg n _)    = panic ("Registers above R10 are not supported (tried to use R" ++ show n ++ ")")+baseRegOffset dflags (FloatReg  1)       = oFFSET_StgRegTable_rF1 dflags+baseRegOffset dflags (FloatReg  2)       = oFFSET_StgRegTable_rF2 dflags+baseRegOffset dflags (FloatReg  3)       = oFFSET_StgRegTable_rF3 dflags+baseRegOffset dflags (FloatReg  4)       = oFFSET_StgRegTable_rF4 dflags+baseRegOffset dflags (FloatReg  5)       = oFFSET_StgRegTable_rF5 dflags+baseRegOffset dflags (FloatReg  6)       = oFFSET_StgRegTable_rF6 dflags+baseRegOffset _      (FloatReg  n)       = panic ("Registers above F6 are not supported (tried to use F" ++ show n ++ ")")+baseRegOffset dflags (DoubleReg 1)       = oFFSET_StgRegTable_rD1 dflags+baseRegOffset dflags (DoubleReg 2)       = oFFSET_StgRegTable_rD2 dflags+baseRegOffset dflags (DoubleReg 3)       = oFFSET_StgRegTable_rD3 dflags+baseRegOffset dflags (DoubleReg 4)       = oFFSET_StgRegTable_rD4 dflags+baseRegOffset dflags (DoubleReg 5)       = oFFSET_StgRegTable_rD5 dflags+baseRegOffset dflags (DoubleReg 6)       = oFFSET_StgRegTable_rD6 dflags+baseRegOffset _      (DoubleReg n)       = panic ("Registers above D6 are not supported (tried to use D" ++ show n ++ ")")+baseRegOffset dflags (XmmReg 1)          = oFFSET_StgRegTable_rXMM1 dflags+baseRegOffset dflags (XmmReg 2)          = oFFSET_StgRegTable_rXMM2 dflags+baseRegOffset dflags (XmmReg 3)          = oFFSET_StgRegTable_rXMM3 dflags+baseRegOffset dflags (XmmReg 4)          = oFFSET_StgRegTable_rXMM4 dflags+baseRegOffset dflags (XmmReg 5)          = oFFSET_StgRegTable_rXMM5 dflags+baseRegOffset dflags (XmmReg 6)          = oFFSET_StgRegTable_rXMM6 dflags+baseRegOffset _      (XmmReg n)          = panic ("Registers above XMM6 are not supported (tried to use XMM" ++ show n ++ ")")+baseRegOffset dflags (YmmReg 1)          = oFFSET_StgRegTable_rYMM1 dflags+baseRegOffset dflags (YmmReg 2)          = oFFSET_StgRegTable_rYMM2 dflags+baseRegOffset dflags (YmmReg 3)          = oFFSET_StgRegTable_rYMM3 dflags+baseRegOffset dflags (YmmReg 4)          = oFFSET_StgRegTable_rYMM4 dflags+baseRegOffset dflags (YmmReg 5)          = oFFSET_StgRegTable_rYMM5 dflags+baseRegOffset dflags (YmmReg 6)          = oFFSET_StgRegTable_rYMM6 dflags+baseRegOffset _      (YmmReg n)          = panic ("Registers above YMM6 are not supported (tried to use YMM" ++ show n ++ ")")+baseRegOffset dflags (ZmmReg 1)          = oFFSET_StgRegTable_rZMM1 dflags+baseRegOffset dflags (ZmmReg 2)          = oFFSET_StgRegTable_rZMM2 dflags+baseRegOffset dflags (ZmmReg 3)          = oFFSET_StgRegTable_rZMM3 dflags+baseRegOffset dflags (ZmmReg 4)          = oFFSET_StgRegTable_rZMM4 dflags+baseRegOffset dflags (ZmmReg 5)          = oFFSET_StgRegTable_rZMM5 dflags+baseRegOffset dflags (ZmmReg 6)          = oFFSET_StgRegTable_rZMM6 dflags+baseRegOffset _      (ZmmReg n)          = panic ("Registers above ZMM6 are not supported (tried to use ZMM" ++ show n ++ ")")+baseRegOffset dflags Sp                  = oFFSET_StgRegTable_rSp dflags+baseRegOffset dflags SpLim               = oFFSET_StgRegTable_rSpLim dflags+baseRegOffset dflags (LongReg 1)         = oFFSET_StgRegTable_rL1 dflags+baseRegOffset _      (LongReg n)         = panic ("Registers above L1 are not supported (tried to use L" ++ show n ++ ")")+baseRegOffset dflags Hp                  = oFFSET_StgRegTable_rHp dflags+baseRegOffset dflags HpLim               = oFFSET_StgRegTable_rHpLim dflags+baseRegOffset dflags CCCS                = oFFSET_StgRegTable_rCCCS dflags+baseRegOffset dflags CurrentTSO          = oFFSET_StgRegTable_rCurrentTSO dflags+baseRegOffset dflags CurrentNursery      = oFFSET_StgRegTable_rCurrentNursery dflags+baseRegOffset dflags HpAlloc             = oFFSET_StgRegTable_rHpAlloc dflags+baseRegOffset dflags EagerBlackholeInfo  = oFFSET_stgEagerBlackholeInfo dflags+baseRegOffset dflags GCEnter1            = oFFSET_stgGCEnter1 dflags+baseRegOffset dflags GCFun               = oFFSET_stgGCFun dflags+baseRegOffset _      BaseReg             = panic "CgUtils.baseRegOffset:BaseReg"+baseRegOffset _      PicBaseReg          = panic "CgUtils.baseRegOffset:PicBaseReg"+baseRegOffset _      MachSp              = panic "CgUtils.baseRegOffset:MachSp"+baseRegOffset _      UnwindReturnReg     = panic "CgUtils.baseRegOffset:UnwindReturnReg"+++-- -----------------------------------------------------------------------------+--+-- STG/Cmm GlobalReg+--+-- -----------------------------------------------------------------------------++-- | We map STG registers onto appropriate CmmExprs.  Either they map+-- to real machine registers or stored as offsets from BaseReg.  Given+-- a GlobalReg, get_GlobalReg_addr always produces the+-- register table address for it.+get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr+get_GlobalReg_addr dflags BaseReg = regTableOffset dflags 0+get_GlobalReg_addr dflags mid+    = get_Regtable_addr_from_offset dflags (baseRegOffset dflags mid)++-- Calculate a literal representing an offset into the register table.+-- Used when we don't have an actual BaseReg to offset from.+regTableOffset :: DynFlags -> Int -> CmmExpr+regTableOffset dflags n =+  CmmLit (CmmLabelOff mkMainCapabilityLabel (oFFSET_Capability_r dflags + n))++get_Regtable_addr_from_offset :: DynFlags -> Int -> CmmExpr+get_Regtable_addr_from_offset dflags offset =+    if haveRegBase (targetPlatform dflags)+    then CmmRegOff baseReg offset+    else regTableOffset dflags offset++-- | Fixup global registers so that they assign to locations within the+-- RegTable if they aren't pinned for the current target.+fixStgRegisters :: DynFlags -> RawCmmDecl -> RawCmmDecl+fixStgRegisters _ top@(CmmData _ _) = top++fixStgRegisters dflags (CmmProc info lbl live graph) =+  let graph' = modifyGraph (mapGraphBlocks (fixStgRegBlock dflags)) graph+  in CmmProc info lbl live graph'++fixStgRegBlock :: DynFlags -> Block CmmNode e x -> Block CmmNode e x+fixStgRegBlock dflags block = mapBlock (fixStgRegStmt dflags) block++fixStgRegStmt :: DynFlags -> CmmNode e x -> CmmNode e x+fixStgRegStmt dflags stmt = fixAssign $ mapExpDeep fixExpr stmt+  where+    platform = targetPlatform dflags++    fixAssign stmt =+      case stmt of+        CmmAssign (CmmGlobal reg) src+          -- MachSp isn't an STG register; it's merely here for tracking unwind+          -- information+          | reg == MachSp -> stmt+          | otherwise ->+            let baseAddr = get_GlobalReg_addr dflags reg+            in case reg `elem` activeStgRegs (targetPlatform dflags) of+                True  -> CmmAssign (CmmGlobal reg) src+                False -> CmmStore baseAddr src+        other_stmt -> other_stmt++    fixExpr expr = case expr of+        -- MachSp isn't an STG; it's merely here for tracking unwind information+        CmmReg (CmmGlobal MachSp) -> expr+        CmmReg (CmmGlobal reg) ->+            -- Replace register leaves with appropriate StixTrees for+            -- the given target.  MagicIds which map to a reg on this+            -- arch are left unchanged.  For the rest, BaseReg is taken+            -- to mean the address of the reg table in MainCapability,+            -- and for all others we generate an indirection to its+            -- location in the register table.+            case reg `elem` activeStgRegs platform of+                True  -> expr+                False ->+                    let baseAddr = get_GlobalReg_addr dflags reg+                    in case reg of+                        BaseReg -> baseAddr+                        _other  -> CmmLoad baseAddr (globalRegType dflags reg)++        CmmRegOff (CmmGlobal reg) offset ->+            -- RegOf leaves are just a shorthand form. If the reg maps+            -- to a real reg, we keep the shorthand, otherwise, we just+            -- expand it and defer to the above code.+            case reg `elem` activeStgRegs platform of+                True  -> expr+                False -> CmmMachOp (MO_Add (wordWidth dflags)) [+                                    fixExpr (CmmReg (CmmGlobal reg)),+                                    CmmLit (CmmInt (fromIntegral offset)+                                                   (wordWidth dflags))]++        other_expr -> other_expr
+ GHC/StgToCmm/Closure.hs view
@@ -0,0 +1,1005 @@+{-# LANGUAGE CPP, RecordWildCards #-}++-----------------------------------------------------------------------------+--+-- Stg to C-- code generation:+--+-- The types   LambdaFormInfo+--             ClosureInfo+--+-- Nothing monadic in here!+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Closure (+        DynTag,  tagForCon, isSmallFamily,++        idPrimRep, isVoidRep, isGcPtrRep, addIdReps, addArgReps,+        argPrimRep,++        NonVoid(..), fromNonVoid, nonVoidIds, nonVoidStgArgs,+        assertNonVoidIds, assertNonVoidStgArgs,++        -- * LambdaFormInfo+        LambdaFormInfo,         -- Abstract+        StandardFormInfo,        -- ...ditto...+        mkLFThunk, mkLFReEntrant, mkConLFInfo, mkSelectorLFInfo,+        mkApLFInfo, mkLFImported, mkLFArgument, mkLFLetNoEscape,+        mkLFStringLit,+        lfDynTag,+        isLFThunk, isLFReEntrant, lfUpdatable,++        -- * Used by other modules+        CgLoc(..), SelfLoopInfo, CallMethod(..),+        nodeMustPointToIt, isKnownFun, funTag, tagForArity, getCallMethod,++        -- * ClosureInfo+        ClosureInfo,+        mkClosureInfo,+        mkCmmInfo,++        -- ** Inspection+        closureLFInfo, closureName,++        -- ** Labels+        -- These just need the info table label+        closureInfoLabel, staticClosureLabel,+        closureSlowEntryLabel, closureLocalEntryLabel,++        -- ** Predicates+        -- These are really just functions on LambdaFormInfo+        closureUpdReqd, closureSingleEntry,+        closureReEntrant, closureFunInfo,+        isToplevClosure,++        blackHoleOnEntry,  -- Needs LambdaFormInfo and SMRep+        isStaticClosure,   -- Needs SMPre++        -- * InfoTables+        mkDataConInfoTable,+        cafBlackHoleInfoTable,+        indStaticInfoTable,+        staticClosureNeedsLink,+    ) where++#include "HsVersions.h"++import GhcPrelude++import StgSyn+import SMRep+import Cmm+import PprCmmExpr() -- For Outputable instances++import CostCentre+import BlockId+import CLabel+import Id+import IdInfo+import DataCon+import Name+import Type+import TyCoRep+import TcType+import TyCon+import RepType+import BasicTypes+import Outputable+import DynFlags+import Util++import Data.Coerce (coerce)+import qualified Data.ByteString.Char8 as BS8++-----------------------------------------------------------------------------+--                Data types and synonyms+-----------------------------------------------------------------------------++-- These data types are mostly used by other modules, especially+-- GHC.StgToCmm.Monad, but we define them here because some functions in this+-- module need to have access to them as well++data CgLoc+  = CmmLoc CmmExpr      -- A stable CmmExpr; that is, one not mentioning+                        -- Hp, so that it remains valid across calls++  | LneLoc BlockId [LocalReg]             -- A join point+        -- A join point (= let-no-escape) should only+        -- be tail-called, and in a saturated way.+        -- To tail-call it, assign to these locals,+        -- and branch to the block id++instance Outputable CgLoc where+  ppr (CmmLoc e)    = text "cmm" <+> ppr e+  ppr (LneLoc b rs) = text "lne" <+> ppr b <+> ppr rs++type SelfLoopInfo = (Id, BlockId, [LocalReg])++-- used by ticky profiling+isKnownFun :: LambdaFormInfo -> Bool+isKnownFun LFReEntrant{} = True+isKnownFun LFLetNoEscape = True+isKnownFun _             = False+++-------------------------------------+--        Non-void types+-------------------------------------+-- We frequently need the invariant that an Id or a an argument+-- is of a non-void type. This type is a witness to the invariant.++newtype NonVoid a = NonVoid a+  deriving (Eq, Show)++fromNonVoid :: NonVoid a -> a+fromNonVoid (NonVoid a) = a++instance (Outputable a) => Outputable (NonVoid a) where+  ppr (NonVoid a) = ppr a++nonVoidIds :: [Id] -> [NonVoid Id]+nonVoidIds ids = [NonVoid id | id <- ids, not (isVoidTy (idType id))]++-- | Used in places where some invariant ensures that all these Ids are+-- non-void; e.g. constructor field binders in case expressions.+-- See Note [Post-unarisation invariants] in UnariseStg.+assertNonVoidIds :: [Id] -> [NonVoid Id]+assertNonVoidIds ids = ASSERT(not (any (isVoidTy . idType) ids))+                       coerce ids++nonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]+nonVoidStgArgs args = [NonVoid arg | arg <- args, not (isVoidTy (stgArgType arg))]++-- | Used in places where some invariant ensures that all these arguments are+-- non-void; e.g. constructor arguments.+-- See Note [Post-unarisation invariants] in UnariseStg.+assertNonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]+assertNonVoidStgArgs args = ASSERT(not (any (isVoidTy . stgArgType) args))+                            coerce args+++-----------------------------------------------------------------------------+--                Representations+-----------------------------------------------------------------------------++-- Why are these here?++-- | Assumes that there is precisely one 'PrimRep' of the type. This assumption+-- holds after unarise.+-- See Note [Post-unarisation invariants]+idPrimRep :: Id -> PrimRep+idPrimRep id = typePrimRep1 (idType id)+    -- See also Note [VoidRep] in RepType++-- | Assumes that Ids have one PrimRep, which holds after unarisation.+-- See Note [Post-unarisation invariants]+addIdReps :: [NonVoid Id] -> [NonVoid (PrimRep, Id)]+addIdReps = map (\id -> let id' = fromNonVoid id+                         in NonVoid (idPrimRep id', id'))++-- | Assumes that arguments have one PrimRep, which holds after unarisation.+-- See Note [Post-unarisation invariants]+addArgReps :: [NonVoid StgArg] -> [NonVoid (PrimRep, StgArg)]+addArgReps = map (\arg -> let arg' = fromNonVoid arg+                           in NonVoid (argPrimRep arg', arg'))++-- | Assumes that the argument has one PrimRep, which holds after unarisation.+-- See Note [Post-unarisation invariants]+argPrimRep :: StgArg -> PrimRep+argPrimRep arg = typePrimRep1 (stgArgType arg)+++-----------------------------------------------------------------------------+--                LambdaFormInfo+-----------------------------------------------------------------------------++-- Information about an identifier, from the code generator's point of+-- view.  Every identifier is bound to a LambdaFormInfo in the+-- environment, which gives the code generator enough info to be able to+-- tail call or return that identifier.++data LambdaFormInfo+  = LFReEntrant         -- Reentrant closure (a function)+        TopLevelFlag    -- True if top level+        OneShotInfo+        !RepArity       -- Arity. Invariant: always > 0+        !Bool           -- True <=> no fvs+        ArgDescr        -- Argument descriptor (should really be in ClosureInfo)++  | LFThunk             -- Thunk (zero arity)+        TopLevelFlag+        !Bool           -- True <=> no free vars+        !Bool           -- True <=> updatable (i.e., *not* single-entry)+        StandardFormInfo+        !Bool           -- True <=> *might* be a function type++  | LFCon               -- A saturated constructor application+        DataCon         -- The constructor++  | LFUnknown           -- Used for function arguments and imported things.+                        -- We know nothing about this closure.+                        -- Treat like updatable "LFThunk"...+                        -- Imported things which we *do* know something about use+                        -- one of the other LF constructors (eg LFReEntrant for+                        -- known functions)+        !Bool           -- True <=> *might* be a function type+                        --      The False case is good when we want to enter it,+                        --        because then we know the entry code will do+                        --        For a function, the entry code is the fast entry point++  | LFUnlifted          -- A value of unboxed type;+                        -- always a value, needs evaluation++  | LFLetNoEscape       -- See LetNoEscape module for precise description+++-------------------------+-- StandardFormInfo tells whether this thunk has one of+-- a small number of standard forms++data StandardFormInfo+  = NonStandardThunk+        -- The usual case: not of the standard forms++  | SelectorThunk+        -- A SelectorThunk is of form+        --      case x of+        --           con a1,..,an -> ak+        -- and the constructor is from a single-constr type.+       WordOff          -- 0-origin offset of ak within the "goods" of+                        -- constructor (Recall that the a1,...,an may be laid+                        -- out in the heap in a non-obvious order.)++  | ApThunk+        -- An ApThunk is of form+        --        x1 ... xn+        -- The code for the thunk just pushes x2..xn on the stack and enters x1.+        -- There are a few of these (for 1 <= n <= MAX_SPEC_AP_SIZE) pre-compiled+        -- in the RTS to save space.+        RepArity                -- Arity, n+++------------------------------------------------------+--                Building LambdaFormInfo+------------------------------------------------------++mkLFArgument :: Id -> LambdaFormInfo+mkLFArgument id+  | isUnliftedType ty      = LFUnlifted+  | might_be_a_function ty = LFUnknown True+  | otherwise              = LFUnknown False+  where+    ty = idType id++-------------+mkLFLetNoEscape :: LambdaFormInfo+mkLFLetNoEscape = LFLetNoEscape++-------------+mkLFReEntrant :: TopLevelFlag    -- True of top level+              -> [Id]            -- Free vars+              -> [Id]            -- Args+              -> ArgDescr        -- Argument descriptor+              -> LambdaFormInfo++mkLFReEntrant _ _ [] _+  = pprPanic "mkLFReEntrant" empty+mkLFReEntrant top fvs args arg_descr+  = LFReEntrant top os_info (length args) (null fvs) arg_descr+  where os_info = idOneShotInfo (head args)++-------------+mkLFThunk :: Type -> TopLevelFlag -> [Id] -> UpdateFlag -> LambdaFormInfo+mkLFThunk thunk_ty top fvs upd_flag+  = ASSERT( not (isUpdatable upd_flag) || not (isUnliftedType thunk_ty) )+    LFThunk top (null fvs)+            (isUpdatable upd_flag)+            NonStandardThunk+            (might_be_a_function thunk_ty)++--------------+might_be_a_function :: Type -> Bool+-- Return False only if we are *sure* it's a data type+-- Look through newtypes etc as much as poss+might_be_a_function ty+  | [LiftedRep] <- typePrimRep ty+  , Just tc <- tyConAppTyCon_maybe (unwrapType ty)+  , isDataTyCon tc+  = False+  | otherwise+  = True++-------------+mkConLFInfo :: DataCon -> LambdaFormInfo+mkConLFInfo con = LFCon con++-------------+mkSelectorLFInfo :: Id -> Int -> Bool -> LambdaFormInfo+mkSelectorLFInfo id offset updatable+  = LFThunk NotTopLevel False updatable (SelectorThunk offset)+        (might_be_a_function (idType id))++-------------+mkApLFInfo :: Id -> UpdateFlag -> Arity -> LambdaFormInfo+mkApLFInfo id upd_flag arity+  = LFThunk NotTopLevel (arity == 0) (isUpdatable upd_flag) (ApThunk arity)+        (might_be_a_function (idType id))++-------------+mkLFImported :: Id -> LambdaFormInfo+mkLFImported id+  | Just con <- isDataConWorkId_maybe id+  , isNullaryRepDataCon con+  = LFCon con   -- An imported nullary constructor+                -- We assume that the constructor is evaluated so that+                -- the id really does point directly to the constructor++  | arity > 0+  = LFReEntrant TopLevel noOneShotInfo arity True (panic "arg_descr")++  | otherwise+  = mkLFArgument id -- Not sure of exact arity+  where+    arity = idFunRepArity id++-------------+mkLFStringLit :: LambdaFormInfo+mkLFStringLit = LFUnlifted++-----------------------------------------------------+--                Dynamic pointer tagging+-----------------------------------------------------++type DynTag = Int       -- The tag on a *pointer*+                        -- (from the dynamic-tagging paper)++-- Note [Data constructor dynamic tags]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- The family size of a data type (the number of constructors+-- or the arity of a function) can be either:+--    * small, if the family size < 2**tag_bits+--    * big, otherwise.+--+-- Small families can have the constructor tag in the tag bits.+-- Big families always use the tag values 1..mAX_PTR_TAG to represent+-- evaluatedness, the last one lumping together all overflowing ones.+-- We don't have very many tag bits: for example, we have 2 bits on+-- x86-32 and 3 bits on x86-64.+--+-- Also see Note [Tagging big families] in GHC.StgToCmm.Expr++isSmallFamily :: DynFlags -> Int -> Bool+isSmallFamily dflags fam_size = fam_size <= mAX_PTR_TAG dflags++tagForCon :: DynFlags -> DataCon -> DynTag+tagForCon dflags con = min (dataConTag con) (mAX_PTR_TAG dflags)+-- NB: 1-indexed++tagForArity :: DynFlags -> RepArity -> DynTag+tagForArity dflags arity+ | isSmallFamily dflags arity = arity+ | otherwise                  = 0++lfDynTag :: DynFlags -> LambdaFormInfo -> DynTag+-- Return the tag in the low order bits of a variable bound+-- to this LambdaForm+lfDynTag dflags (LFCon con)                 = tagForCon dflags con+lfDynTag dflags (LFReEntrant _ _ arity _ _) = tagForArity dflags arity+lfDynTag _      _other                      = 0+++-----------------------------------------------------------------------------+--                Observing LambdaFormInfo+-----------------------------------------------------------------------------++------------+isLFThunk :: LambdaFormInfo -> Bool+isLFThunk (LFThunk {})  = True+isLFThunk _ = False++isLFReEntrant :: LambdaFormInfo -> Bool+isLFReEntrant (LFReEntrant {}) = True+isLFReEntrant _                = False++-----------------------------------------------------------------------------+--                Choosing SM reps+-----------------------------------------------------------------------------++lfClosureType :: LambdaFormInfo -> ClosureTypeInfo+lfClosureType (LFReEntrant _ _ arity _ argd) = Fun arity argd+lfClosureType (LFCon con)                    = Constr (dataConTagZ con)+                                                      (dataConIdentity con)+lfClosureType (LFThunk _ _ _ is_sel _)       = thunkClosureType is_sel+lfClosureType _                              = panic "lfClosureType"++thunkClosureType :: StandardFormInfo -> ClosureTypeInfo+thunkClosureType (SelectorThunk off) = ThunkSelector off+thunkClosureType _                   = Thunk++-- We *do* get non-updatable top-level thunks sometimes.  eg. f = g+-- gets compiled to a jump to g (if g has non-zero arity), instead of+-- messing around with update frames and PAPs.  We set the closure type+-- to FUN_STATIC in this case.++-----------------------------------------------------------------------------+--                nodeMustPointToIt+-----------------------------------------------------------------------------++nodeMustPointToIt :: DynFlags -> LambdaFormInfo -> Bool+-- If nodeMustPointToIt is true, then the entry convention for+-- this closure has R1 (the "Node" register) pointing to the+-- closure itself --- the "self" argument++nodeMustPointToIt _ (LFReEntrant top _ _ no_fvs _)+  =  not no_fvs          -- Certainly if it has fvs we need to point to it+  || isNotTopLevel top   -- See Note [GC recovery]+        -- For lex_profiling we also access the cost centre for a+        -- non-inherited (i.e. non-top-level) function.+        -- The isNotTopLevel test above ensures this is ok.++nodeMustPointToIt dflags (LFThunk top no_fvs updatable NonStandardThunk _)+  =  not no_fvs            -- Self parameter+  || isNotTopLevel top     -- Note [GC recovery]+  || updatable             -- Need to push update frame+  || gopt Opt_SccProfilingOn dflags+          -- For the non-updatable (single-entry case):+          --+          -- True if has fvs (in which case we need access to them, and we+          --                    should black-hole it)+          -- or profiling (in which case we need to recover the cost centre+          --                 from inside it)  ToDo: do we need this even for+          --                                    top-level thunks? If not,+          --                                    isNotTopLevel subsumes this++nodeMustPointToIt _ (LFThunk {})        -- Node must point to a standard-form thunk+  = True++nodeMustPointToIt _ (LFCon _) = True++        -- Strictly speaking, the above two don't need Node to point+        -- to it if the arity = 0.  But this is a *really* unlikely+        -- situation.  If we know it's nil (say) and we are entering+        -- it. Eg: let x = [] in x then we will certainly have inlined+        -- x, since nil is a simple atom.  So we gain little by not+        -- having Node point to known zero-arity things.  On the other+        -- hand, we do lose something; Patrick's code for figuring out+        -- when something has been updated but not entered relies on+        -- having Node point to the result of an update.  SLPJ+        -- 27/11/92.++nodeMustPointToIt _ (LFUnknown _)   = True+nodeMustPointToIt _ LFUnlifted      = False+nodeMustPointToIt _ LFLetNoEscape   = False++{- Note [GC recovery]+~~~~~~~~~~~~~~~~~~~~~+If we a have a local let-binding (function or thunk)+   let f = <body> in ...+AND <body> allocates, then the heap-overflow check needs to know how+to re-start the evaluation.  It uses the "self" pointer to do this.+So even if there are no free variables in <body>, we still make+nodeMustPointToIt be True for non-top-level bindings.++Why do any such bindings exist?  After all, let-floating should have+floated them out.  Well, a clever optimiser might leave one there to+avoid a space leak, deliberately recomputing a thunk.  Also (and this+really does happen occasionally) let-floating may make a function f smaller+so it can be inlined, so now (f True) may generate a local no-fv closure.+This actually happened during bootstrapping GHC itself, with f=mkRdrFunBind+in TcGenDeriv.) -}++-----------------------------------------------------------------------------+--                getCallMethod+-----------------------------------------------------------------------------++{- The entry conventions depend on the type of closure being entered,+whether or not it has free variables, and whether we're running+sequentially or in parallel.++Closure                           Node   Argument   Enter+Characteristics              Par   Req'd  Passing    Via+---------------------------------------------------------------------------+Unknown                     & no  & yes & stack     & node+Known fun (>1 arg), no fvs  & no  & no  & registers & fast entry (enough args)+                                                    & slow entry (otherwise)+Known fun (>1 arg), fvs     & no  & yes & registers & fast entry (enough args)+0 arg, no fvs \r,\s         & no  & no  & n/a       & direct entry+0 arg, no fvs \u            & no  & yes & n/a       & node+0 arg, fvs \r,\s,selector   & no  & yes & n/a       & node+0 arg, fvs \r,\s            & no  & yes & n/a       & direct entry+0 arg, fvs \u               & no  & yes & n/a       & node+Unknown                     & yes & yes & stack     & node+Known fun (>1 arg), no fvs  & yes & no  & registers & fast entry (enough args)+                                                    & slow entry (otherwise)+Known fun (>1 arg), fvs     & yes & yes & registers & node+0 arg, fvs \r,\s,selector   & yes & yes & n/a       & node+0 arg, no fvs \r,\s         & yes & no  & n/a       & direct entry+0 arg, no fvs \u            & yes & yes & n/a       & node+0 arg, fvs \r,\s            & yes & yes & n/a       & node+0 arg, fvs \u               & yes & yes & n/a       & node++When black-holing, single-entry closures could also be entered via node+(rather than directly) to catch double-entry. -}++data CallMethod+  = EnterIt             -- No args, not a function++  | JumpToIt BlockId [LocalReg] -- A join point or a header of a local loop++  | ReturnIt            -- It's a value (function, unboxed value,+                        -- or constructor), so just return it.++  | SlowCall                -- Unknown fun, or known fun with+                        -- too few args.++  | DirectEntry         -- Jump directly, with args in regs+        CLabel          --   The code label+        RepArity        --   Its arity++getCallMethod :: DynFlags+              -> Name           -- Function being applied+              -> Id             -- Function Id used to chech if it can refer to+                                -- CAF's and whether the function is tail-calling+                                -- itself+              -> LambdaFormInfo -- Its info+              -> RepArity       -- Number of available arguments+              -> RepArity       -- Number of them being void arguments+              -> CgLoc          -- Passed in from cgIdApp so that we can+                                -- handle let-no-escape bindings and self-recursive+                                -- tail calls using the same data constructor,+                                -- JumpToIt. This saves us one case branch in+                                -- cgIdApp+              -> Maybe SelfLoopInfo -- can we perform a self-recursive tail call?+              -> CallMethod++getCallMethod dflags _ id _ n_args v_args _cg_loc+              (Just (self_loop_id, block_id, args))+  | gopt Opt_Loopification dflags+  , id == self_loop_id+  , args `lengthIs` (n_args - v_args)+  -- If these patterns match then we know that:+  --   * loopification optimisation is turned on+  --   * function is performing a self-recursive call in a tail position+  --   * number of non-void parameters of the function matches functions arity.+  -- See Note [Self-recursive tail calls] and Note [Void arguments in+  -- self-recursive tail calls] in GHC.StgToCmm.Expr for more details+  = JumpToIt block_id args++getCallMethod dflags name id (LFReEntrant _ _ arity _ _) n_args _v_args _cg_loc+              _self_loop_info+  | n_args == 0 -- No args at all+  && not (gopt Opt_SccProfilingOn dflags)+     -- See Note [Evaluating functions with profiling] in rts/Apply.cmm+  = ASSERT( arity /= 0 ) ReturnIt+  | n_args < arity = SlowCall        -- Not enough args+  | otherwise      = DirectEntry (enterIdLabel dflags name (idCafInfo id)) arity++getCallMethod _ _name _ LFUnlifted n_args _v_args _cg_loc _self_loop_info+  = ASSERT( n_args == 0 ) ReturnIt++getCallMethod _ _name _ (LFCon _) n_args _v_args _cg_loc _self_loop_info+  = ASSERT( n_args == 0 ) ReturnIt+    -- n_args=0 because it'd be ill-typed to apply a saturated+    --          constructor application to anything++getCallMethod dflags name id (LFThunk _ _ updatable std_form_info is_fun)+              n_args _v_args _cg_loc _self_loop_info+  | is_fun      -- it *might* be a function, so we must "call" it (which is always safe)+  = SlowCall    -- We cannot just enter it [in eval/apply, the entry code+                -- is the fast-entry code]++  -- Since is_fun is False, we are *definitely* looking at a data value+  | updatable || gopt Opt_Ticky dflags -- to catch double entry+      {- OLD: || opt_SMP+         I decided to remove this, because in SMP mode it doesn't matter+         if we enter the same thunk multiple times, so the optimisation+         of jumping directly to the entry code is still valid.  --SDM+        -}+  = EnterIt++  -- even a non-updatable selector thunk can be updated by the garbage+  -- collector, so we must enter it. (#8817)+  | SelectorThunk{} <- std_form_info+  = EnterIt++    -- We used to have ASSERT( n_args == 0 ), but actually it is+    -- possible for the optimiser to generate+    --   let bot :: Int = error Int "urk"+    --   in (bot `cast` unsafeCoerce Int (Int -> Int)) 3+    -- This happens as a result of the case-of-error transformation+    -- So the right thing to do is just to enter the thing++  | otherwise        -- Jump direct to code for single-entry thunks+  = ASSERT( n_args == 0 )+    DirectEntry (thunkEntryLabel dflags name (idCafInfo id) std_form_info+                updatable) 0++getCallMethod _ _name _ (LFUnknown True) _n_arg _v_args _cg_locs _self_loop_info+  = SlowCall -- might be a function++getCallMethod _ name _ (LFUnknown False) n_args _v_args _cg_loc _self_loop_info+  = ASSERT2( n_args == 0, ppr name <+> ppr n_args )+    EnterIt -- Not a function++getCallMethod _ _name _ LFLetNoEscape _n_args _v_args (LneLoc blk_id lne_regs)+              _self_loop_info+  = JumpToIt blk_id lne_regs++getCallMethod _ _ _ _ _ _ _ _ = panic "Unknown call method"++-----------------------------------------------------------------------------+--              Data types for closure information+-----------------------------------------------------------------------------+++{- ClosureInfo: information about a binding++   We make a ClosureInfo for each let binding (both top level and not),+   but not bindings for data constructors: for those we build a CmmInfoTable+   directly (see mkDataConInfoTable).++   To a first approximation:+       ClosureInfo = (LambdaFormInfo, CmmInfoTable)++   A ClosureInfo has enough information+     a) to construct the info table itself, and build other things+        related to the binding (e.g. slow entry points for a function)+     b) to allocate a closure containing that info pointer (i.e.+           it knows the info table label)+-}++data ClosureInfo+  = ClosureInfo {+        closureName :: !Name,           -- The thing bound to this closure+           -- we don't really need this field: it's only used in generating+           -- code for ticky and profiling, and we could pass the information+           -- around separately, but it doesn't do much harm to keep it here.++        closureLFInfo :: !LambdaFormInfo, -- NOTE: not an LFCon+          -- this tells us about what the closure contains: it's right-hand-side.++          -- the rest is just an unpacked CmmInfoTable.+        closureInfoLabel :: !CLabel,+        closureSMRep     :: !SMRep,          -- representation used by storage mgr+        closureProf      :: !ProfilingInfo+    }++-- | Convert from 'ClosureInfo' to 'CmmInfoTable'.+mkCmmInfo :: ClosureInfo -> Id -> CostCentreStack -> CmmInfoTable+mkCmmInfo ClosureInfo {..} id ccs+  = CmmInfoTable { cit_lbl  = closureInfoLabel+                 , cit_rep  = closureSMRep+                 , cit_prof = closureProf+                 , cit_srt  = Nothing+                 , cit_clo  = if isStaticRep closureSMRep+                                then Just (id,ccs)+                                else Nothing }++--------------------------------------+--        Building ClosureInfos+--------------------------------------++mkClosureInfo :: DynFlags+              -> Bool                -- Is static+              -> Id+              -> LambdaFormInfo+              -> Int -> Int        -- Total and pointer words+              -> String         -- String descriptor+              -> ClosureInfo+mkClosureInfo dflags is_static id lf_info tot_wds ptr_wds val_descr+  = ClosureInfo { closureName      = name+                , closureLFInfo    = lf_info+                , closureInfoLabel = info_lbl   -- These three fields are+                , closureSMRep     = sm_rep     -- (almost) an info table+                , closureProf      = prof }     -- (we don't have an SRT yet)+  where+    name       = idName id+    sm_rep     = mkHeapRep dflags is_static ptr_wds nonptr_wds (lfClosureType lf_info)+    prof       = mkProfilingInfo dflags id val_descr+    nonptr_wds = tot_wds - ptr_wds++    info_lbl = mkClosureInfoTableLabel id lf_info++--------------------------------------+--   Other functions over ClosureInfo+--------------------------------------++-- Eager blackholing is normally disabled, but can be turned on with+-- -feager-blackholing.  When it is on, we replace the info pointer of+-- the thunk with stg_EAGER_BLACKHOLE_info on entry.++-- If we wanted to do eager blackholing with slop filling,+-- we'd need to do it at the *end* of a basic block, otherwise+-- we overwrite the free variables in the thunk that we still+-- need.  We have a patch for this from Andy Cheadle, but not+-- incorporated yet. --SDM [6/2004]+--+-- Previously, eager blackholing was enabled when ticky-ticky+-- was on. But it didn't work, and it wasn't strictly necessary+-- to bring back minimal ticky-ticky, so now EAGER_BLACKHOLING+-- is unconditionally disabled. -- krc 1/2007+--+-- Static closures are never themselves black-holed.++blackHoleOnEntry :: ClosureInfo -> Bool+blackHoleOnEntry cl_info+  | isStaticRep (closureSMRep cl_info)+  = False        -- Never black-hole a static closure++  | otherwise+  = case closureLFInfo cl_info of+      LFReEntrant {}            -> False+      LFLetNoEscape             -> False+      LFThunk _ _no_fvs upd _ _ -> upd   -- See Note [Black-holing non-updatable thunks]+      _other -> panic "blackHoleOnEntry"++{- Note [Black-holing non-updatable thunks]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We must not black-hole non-updatable (single-entry) thunks otherwise+we run into issues like #10414. Specifically:++  * There is no reason to black-hole a non-updatable thunk: it should+    not be competed for by multiple threads++  * It could, conceivably, cause a space leak if we don't black-hole+    it, if there was a live but never-followed pointer pointing to it.+    Let's hope that doesn't happen.++  * It is dangerous to black-hole a non-updatable thunk because+     - is not updated (of course)+     - hence, if it is black-holed and another thread tries to evaluate+       it, that thread will block forever+    This actually happened in #10414.  So we do not black-hole+    non-updatable thunks.++  * How could two threads evaluate the same non-updatable (single-entry)+    thunk?  See Reid Barton's example below.++  * Only eager blackholing could possibly black-hole a non-updatable+    thunk, because lazy black-holing only affects thunks with an+    update frame on the stack.++Here is and example due to Reid Barton (#10414):+    x = \u []  concat [[1], []]+with the following definitions,++    concat x = case x of+        []       -> []+        (:) x xs -> (++) x (concat xs)++    (++) xs ys = case xs of+        []         -> ys+        (:) x rest -> (:) x ((++) rest ys)++Where we use the syntax @\u []@ to denote an updatable thunk and @\s []@ to+denote a single-entry (i.e. non-updatable) thunk. After a thread evaluates @x@+to WHNF and calls @(++)@ the heap will contain the following thunks,++    x = 1 : y+    y = \u []  (++) [] z+    z = \s []  concat []++Now that the stage is set, consider the follow evaluations by two racing threads+A and B,++  1. Both threads enter @y@ before either is able to replace it with an+     indirection++  2. Thread A does the case analysis in @(++)@ and consequently enters @z@,+     replacing it with a black-hole++  3. At some later point thread B does the same case analysis and also attempts+     to enter @z@. However, it finds that it has been replaced with a black-hole+     so it blocks.++  4. Thread A eventually finishes evaluating @z@ (to @[]@) and updates @y@+     accordingly. It does *not* update @z@, however, as it is single-entry. This+     leaves Thread B blocked forever on a black-hole which will never be+     updated.++To avoid this sort of condition we never black-hole non-updatable thunks.+-}++isStaticClosure :: ClosureInfo -> Bool+isStaticClosure cl_info = isStaticRep (closureSMRep cl_info)++closureUpdReqd :: ClosureInfo -> Bool+closureUpdReqd ClosureInfo{ closureLFInfo = lf_info } = lfUpdatable lf_info++lfUpdatable :: LambdaFormInfo -> Bool+lfUpdatable (LFThunk _ _ upd _ _)  = upd+lfUpdatable _ = False++closureSingleEntry :: ClosureInfo -> Bool+closureSingleEntry (ClosureInfo { closureLFInfo = LFThunk _ _ upd _ _}) = not upd+closureSingleEntry (ClosureInfo { closureLFInfo = LFReEntrant _ OneShotLam _ _ _}) = True+closureSingleEntry _ = False++closureReEntrant :: ClosureInfo -> Bool+closureReEntrant (ClosureInfo { closureLFInfo = LFReEntrant {} }) = True+closureReEntrant _ = False++closureFunInfo :: ClosureInfo -> Maybe (RepArity, ArgDescr)+closureFunInfo (ClosureInfo { closureLFInfo = lf_info }) = lfFunInfo lf_info++lfFunInfo :: LambdaFormInfo ->  Maybe (RepArity, ArgDescr)+lfFunInfo (LFReEntrant _ _ arity _ arg_desc)  = Just (arity, arg_desc)+lfFunInfo _                                   = Nothing++funTag :: DynFlags -> ClosureInfo -> DynTag+funTag dflags (ClosureInfo { closureLFInfo = lf_info })+    = lfDynTag dflags lf_info++isToplevClosure :: ClosureInfo -> Bool+isToplevClosure (ClosureInfo { closureLFInfo = lf_info })+  = case lf_info of+      LFReEntrant TopLevel _ _ _ _ -> True+      LFThunk TopLevel _ _ _ _     -> True+      _other                       -> False++--------------------------------------+--   Label generation+--------------------------------------++staticClosureLabel :: ClosureInfo -> CLabel+staticClosureLabel = toClosureLbl .  closureInfoLabel++closureSlowEntryLabel :: ClosureInfo -> CLabel+closureSlowEntryLabel = toSlowEntryLbl . closureInfoLabel++closureLocalEntryLabel :: DynFlags -> ClosureInfo -> CLabel+closureLocalEntryLabel dflags+  | tablesNextToCode dflags = toInfoLbl  . closureInfoLabel+  | otherwise               = toEntryLbl . closureInfoLabel++mkClosureInfoTableLabel :: Id -> LambdaFormInfo -> CLabel+mkClosureInfoTableLabel id lf_info+  = case lf_info of+        LFThunk _ _ upd_flag (SelectorThunk offset) _+                      -> mkSelectorInfoLabel upd_flag offset++        LFThunk _ _ upd_flag (ApThunk arity) _+                      -> mkApInfoTableLabel upd_flag arity++        LFThunk{}     -> std_mk_lbl name cafs+        LFReEntrant{} -> std_mk_lbl name cafs+        _other        -> panic "closureInfoTableLabel"++  where+    name = idName id++    std_mk_lbl | is_local  = mkLocalInfoTableLabel+               | otherwise = mkInfoTableLabel++    cafs     = idCafInfo id+    is_local = isDataConWorkId id+       -- Make the _info pointer for the implicit datacon worker+       -- binding local. The reason we can do this is that importing+       -- code always either uses the _closure or _con_info. By the+       -- invariants in CorePrep anything else gets eta expanded.+++thunkEntryLabel :: DynFlags -> Name -> CafInfo -> StandardFormInfo -> Bool -> CLabel+-- thunkEntryLabel is a local help function, not exported.  It's used from+-- getCallMethod.+thunkEntryLabel dflags _thunk_id _ (ApThunk arity) upd_flag+  = enterApLabel dflags upd_flag arity+thunkEntryLabel dflags _thunk_id _ (SelectorThunk offset) upd_flag+  = enterSelectorLabel dflags upd_flag offset+thunkEntryLabel dflags thunk_id c _ _+  = enterIdLabel dflags thunk_id c++enterApLabel :: DynFlags -> Bool -> Arity -> CLabel+enterApLabel dflags is_updatable arity+  | tablesNextToCode dflags = mkApInfoTableLabel is_updatable arity+  | otherwise               = mkApEntryLabel is_updatable arity++enterSelectorLabel :: DynFlags -> Bool -> WordOff -> CLabel+enterSelectorLabel dflags upd_flag offset+  | tablesNextToCode dflags = mkSelectorInfoLabel upd_flag offset+  | otherwise               = mkSelectorEntryLabel upd_flag offset++enterIdLabel :: DynFlags -> Name -> CafInfo -> CLabel+enterIdLabel dflags id c+  | tablesNextToCode dflags = mkInfoTableLabel id c+  | otherwise               = mkEntryLabel id c+++--------------------------------------+--   Profiling+--------------------------------------++-- Profiling requires two pieces of information to be determined for+-- each closure's info table --- description and type.++-- The description is stored directly in the @CClosureInfoTable@ when the+-- info table is built.++-- The type is determined from the type information stored with the @Id@+-- in the closure info using @closureTypeDescr@.++mkProfilingInfo :: DynFlags -> Id -> String -> ProfilingInfo+mkProfilingInfo dflags id val_descr+  | not (gopt Opt_SccProfilingOn dflags) = NoProfilingInfo+  | otherwise = ProfilingInfo ty_descr_w8 (BS8.pack val_descr)+  where+    ty_descr_w8  = BS8.pack (getTyDescription (idType id))++getTyDescription :: Type -> String+getTyDescription ty+  = case (tcSplitSigmaTy ty) of { (_, _, tau_ty) ->+    case tau_ty of+      TyVarTy _              -> "*"+      AppTy fun _            -> getTyDescription fun+      TyConApp tycon _       -> getOccString tycon+      FunTy {}              -> '-' : fun_result tau_ty+      ForAllTy _  ty         -> getTyDescription ty+      LitTy n                -> getTyLitDescription n+      CastTy ty _            -> getTyDescription ty+      CoercionTy co          -> pprPanic "getTyDescription" (ppr co)+    }+  where+    fun_result (FunTy { ft_res = res }) = '>' : fun_result res+    fun_result other                    = getTyDescription other++getTyLitDescription :: TyLit -> String+getTyLitDescription l =+  case l of+    NumTyLit n -> show n+    StrTyLit n -> show n++--------------------------------------+--   CmmInfoTable-related things+--------------------------------------++mkDataConInfoTable :: DynFlags -> DataCon -> Bool -> Int -> Int -> CmmInfoTable+mkDataConInfoTable dflags data_con is_static ptr_wds nonptr_wds+ = CmmInfoTable { cit_lbl  = info_lbl+                , cit_rep  = sm_rep+                , cit_prof = prof+                , cit_srt  = Nothing+                , cit_clo  = Nothing }+ where+   name = dataConName data_con+   info_lbl = mkConInfoTableLabel name NoCafRefs+   sm_rep = mkHeapRep dflags is_static ptr_wds nonptr_wds cl_type+   cl_type = Constr (dataConTagZ data_con) (dataConIdentity data_con)+                  -- We keep the *zero-indexed* tag in the srt_len field+                  -- of the info table of a data constructor.++   prof | not (gopt Opt_SccProfilingOn dflags) = NoProfilingInfo+        | otherwise                            = ProfilingInfo ty_descr val_descr++   ty_descr  = BS8.pack $ occNameString $ getOccName $ dataConTyCon data_con+   val_descr = BS8.pack $ occNameString $ getOccName data_con++-- We need a black-hole closure info to pass to @allocDynClosure@ when we+-- want to allocate the black hole on entry to a CAF.++cafBlackHoleInfoTable :: CmmInfoTable+cafBlackHoleInfoTable+  = CmmInfoTable { cit_lbl  = mkCAFBlackHoleInfoTableLabel+                 , cit_rep  = blackHoleRep+                 , cit_prof = NoProfilingInfo+                 , cit_srt  = Nothing+                 , cit_clo  = Nothing }++indStaticInfoTable :: CmmInfoTable+indStaticInfoTable+  = CmmInfoTable { cit_lbl  = mkIndStaticInfoLabel+                 , cit_rep  = indStaticRep+                 , cit_prof = NoProfilingInfo+                 , cit_srt  = Nothing+                 , cit_clo  = Nothing }++staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool+-- A static closure needs a link field to aid the GC when traversing+-- the static closure graph.  But it only needs such a field if either+--        a) it has an SRT+--        b) it's a constructor with one or more pointer fields+-- In case (b), the constructor's fields themselves play the role+-- of the SRT.+staticClosureNeedsLink has_srt CmmInfoTable{ cit_rep = smrep }+  | isConRep smrep         = not (isStaticNoCafCon smrep)+  | otherwise              = has_srt
+ GHC/StgToCmm/DataCon.hs view
@@ -0,0 +1,285 @@+{-# LANGUAGE CPP #-}++-----------------------------------------------------------------------------+--+-- Stg to C--: code generation for constructors+--+-- This module provides the support code for StgToCmm to deal with with+-- constructors on the RHSs of let(rec)s.+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.DataCon (+        cgTopRhsCon, buildDynCon, bindConArgs+    ) where++#include "HsVersions.h"++import GhcPrelude++import StgSyn+import CoreSyn  ( AltCon(..) )++import GHC.StgToCmm.Monad+import GHC.StgToCmm.Env+import GHC.StgToCmm.Heap+import GHC.StgToCmm.Layout+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Closure++import CmmExpr+import CmmUtils+import CLabel+import MkGraph+import SMRep+import CostCentre+import Module+import DataCon+import DynFlags+import FastString+import Id+import RepType (countConRepArgs)+import Literal+import PrelInfo+import Outputable+import GHC.Platform+import Util+import MonadUtils (mapMaybeM)++import Control.Monad+import Data.Char++++---------------------------------------------------------------+--      Top-level constructors+---------------------------------------------------------------++cgTopRhsCon :: DynFlags+            -> Id               -- Name of thing bound to this RHS+            -> DataCon          -- Id+            -> [NonVoid StgArg] -- Args+            -> (CgIdInfo, FCode ())+cgTopRhsCon dflags id con args =+    let id_info = litIdInfo dflags id (mkConLFInfo con) (CmmLabel closure_label)+    in (id_info, gen_code)+  where+   name          = idName id+   caffy         = idCafInfo id -- any stgArgHasCafRefs args+   closure_label = mkClosureLabel name caffy++   gen_code =+     do { this_mod <- getModuleName+        ; when (platformOS (targetPlatform dflags) == OSMinGW32) $+              -- Windows DLLs have a problem with static cross-DLL refs.+              MASSERT( not (isDllConApp dflags this_mod con (map fromNonVoid args)) )+        ; ASSERT( args `lengthIs` countConRepArgs con ) return ()++        -- LAY IT OUT+        ; let+            (tot_wds, --  #ptr_wds + #nonptr_wds+             ptr_wds, --  #ptr_wds+             nv_args_w_offsets) =+                 mkVirtHeapOffsetsWithPadding dflags StdHeader (addArgReps args)++            mk_payload (Padding len _) = return (CmmInt 0 (widthFromBytes len))+            mk_payload (FieldOff arg _) = do+                amode <- getArgAmode arg+                case amode of+                  CmmLit lit -> return lit+                  _          -> panic "GHC.StgToCmm.DataCon.cgTopRhsCon"++            nonptr_wds = tot_wds - ptr_wds++             -- we're not really going to emit an info table, so having+             -- to make a CmmInfoTable is a bit overkill, but mkStaticClosureFields+             -- needs to poke around inside it.+            info_tbl = mkDataConInfoTable dflags con True ptr_wds nonptr_wds+++        ; payload <- mapM mk_payload nv_args_w_offsets+                -- NB1: nv_args_w_offsets is sorted into ptrs then non-ptrs+                -- NB2: all the amodes should be Lits!+                --      TODO (osa): Why?++        ; let closure_rep = mkStaticClosureFields+                             dflags+                             info_tbl+                             dontCareCCS                -- Because it's static data+                             caffy                      -- Has CAF refs+                             payload++                -- BUILD THE OBJECT+        ; emitDataLits closure_label closure_rep++        ; return () }+++---------------------------------------------------------------+--      Lay out and allocate non-top-level constructors+---------------------------------------------------------------++buildDynCon :: Id                 -- Name of the thing to which this constr will+                                  -- be bound+            -> Bool               -- is it genuinely bound to that name, or just+                                  -- for profiling?+            -> CostCentreStack    -- Where to grab cost centre from;+                                  -- current CCS if currentOrSubsumedCCS+            -> DataCon            -- The data constructor+            -> [NonVoid StgArg]   -- Its args+            -> FCode (CgIdInfo, FCode CmmAGraph)+               -- Return details about how to find it and initialization code+buildDynCon binder actually_bound cc con args+    = do dflags <- getDynFlags+         buildDynCon' dflags (targetPlatform dflags) binder actually_bound cc con args+++buildDynCon' :: DynFlags+             -> Platform+             -> Id -> Bool+             -> CostCentreStack+             -> DataCon+             -> [NonVoid StgArg]+             -> FCode (CgIdInfo, FCode CmmAGraph)++{- We used to pass a boolean indicating whether all the+args were of size zero, so we could use a static+constructor; but I concluded that it just isn't worth it.+Now I/O uses unboxed tuples there just aren't any constructors+with all size-zero args.++The reason for having a separate argument, rather than looking at+the addr modes of the args is that we may be in a "knot", and+premature looking at the args will cause the compiler to black-hole!+-}+++-------- buildDynCon': Nullary constructors --------------+-- First we deal with the case of zero-arity constructors.  They+-- will probably be unfolded, so we don't expect to see this case much,+-- if at all, but it does no harm, and sets the scene for characters.+--+-- In the case of zero-arity constructors, or, more accurately, those+-- which have exclusively size-zero (VoidRep) args, we generate no code+-- at all.++buildDynCon' dflags _ binder _ _cc con []+  | isNullaryRepDataCon con+  = return (litIdInfo dflags binder (mkConLFInfo con)+                (CmmLabel (mkClosureLabel (dataConName con) (idCafInfo binder))),+            return mkNop)++-------- buildDynCon': Charlike and Intlike constructors -----------+{- The following three paragraphs about @Char@-like and @Int@-like+closures are obsolete, but I don't understand the details well enough+to properly word them, sorry. I've changed the treatment of @Char@s to+be analogous to @Int@s: only a subset is preallocated, because @Char@+has now 31 bits. Only literals are handled here. -- Qrczak++Now for @Char@-like closures.  We generate an assignment of the+address of the closure to a temporary.  It would be possible simply to+generate no code, and record the addressing mode in the environment,+but we'd have to be careful if the argument wasn't a constant --- so+for simplicity we just always assign to a temporary.++Last special case: @Int@-like closures.  We only special-case the+situation in which the argument is a literal in the range+@mIN_INTLIKE@..@mAX_INTLILKE@.  NB: for @Char@-like closures we can+work with any old argument, but for @Int@-like ones the argument has+to be a literal.  Reason: @Char@ like closures have an argument type+which is guaranteed in range.++Because of this, we use can safely return an addressing mode.++We don't support this optimisation when compiling into Windows DLLs yet+because they don't support cross package data references well.+-}++buildDynCon' dflags platform binder _ _cc con [arg]+  | maybeIntLikeCon con+  , platformOS platform /= OSMinGW32 || not (positionIndependent dflags)+  , NonVoid (StgLitArg (LitNumber LitNumInt val _)) <- arg+  , val <= fromIntegral (mAX_INTLIKE dflags) -- Comparisons at type Integer!+  , val >= fromIntegral (mIN_INTLIKE dflags) -- ...ditto...+  = do  { let intlike_lbl   = mkCmmClosureLabel rtsUnitId (fsLit "stg_INTLIKE")+              val_int = fromIntegral val :: Int+              offsetW = (val_int - mIN_INTLIKE dflags) * (fixedHdrSizeW dflags + 1)+                -- INTLIKE closures consist of a header and one word payload+              intlike_amode = cmmLabelOffW dflags intlike_lbl offsetW+        ; return ( litIdInfo dflags binder (mkConLFInfo con) intlike_amode+                 , return mkNop) }++buildDynCon' dflags platform binder _ _cc con [arg]+  | maybeCharLikeCon con+  , platformOS platform /= OSMinGW32 || not (positionIndependent dflags)+  , NonVoid (StgLitArg (LitChar val)) <- arg+  , let val_int = ord val :: Int+  , val_int <= mAX_CHARLIKE dflags+  , val_int >= mIN_CHARLIKE dflags+  = do  { let charlike_lbl   = mkCmmClosureLabel rtsUnitId (fsLit "stg_CHARLIKE")+              offsetW = (val_int - mIN_CHARLIKE dflags) * (fixedHdrSizeW dflags + 1)+                -- CHARLIKE closures consist of a header and one word payload+              charlike_amode = cmmLabelOffW dflags charlike_lbl offsetW+        ; return ( litIdInfo dflags binder (mkConLFInfo con) charlike_amode+                 , return mkNop) }++-------- buildDynCon': the general case -----------+buildDynCon' dflags _ binder actually_bound ccs con args+  = do  { (id_info, reg) <- rhsIdInfo binder lf_info+        ; return (id_info, gen_code reg)+        }+ where+  lf_info = mkConLFInfo con++  gen_code reg+    = do  { let (tot_wds, ptr_wds, args_w_offsets)+                  = mkVirtConstrOffsets dflags (addArgReps args)+                nonptr_wds = tot_wds - ptr_wds+                info_tbl = mkDataConInfoTable dflags con False+                                ptr_wds nonptr_wds+          ; let ticky_name | actually_bound = Just binder+                           | otherwise = Nothing++          ; hp_plus_n <- allocDynClosure ticky_name info_tbl lf_info+                                          use_cc blame_cc args_w_offsets+          ; return (mkRhsInit dflags reg lf_info hp_plus_n) }+    where+      use_cc      -- cost-centre to stick in the object+        | isCurrentCCS ccs = cccsExpr+        | otherwise        = panic "buildDynCon: non-current CCS not implemented"++      blame_cc = use_cc -- cost-centre on which to blame the alloc (same)+++---------------------------------------------------------------+--      Binding constructor arguments+---------------------------------------------------------------++bindConArgs :: AltCon -> LocalReg -> [NonVoid Id] -> FCode [LocalReg]+-- bindConArgs is called from cgAlt of a case+-- (bindConArgs con args) augments the environment with bindings for the+-- binders args, assuming that we have just returned from a 'case' which+-- found a con+bindConArgs (DataAlt con) base args+  = ASSERT(not (isUnboxedTupleCon con))+    do dflags <- getDynFlags+       let (_, _, args_w_offsets) = mkVirtConstrOffsets dflags (addIdReps args)+           tag = tagForCon dflags con++           -- The binding below forces the masking out of the tag bits+           -- when accessing the constructor field.+           bind_arg :: (NonVoid Id, ByteOff) -> FCode (Maybe LocalReg)+           bind_arg (arg@(NonVoid b), offset)+             | isDeadBinder b  -- See Note [Dead-binder optimisation] in GHC.StgToCmm.Expr+             = return Nothing+             | otherwise+             = do { emit $ mkTaggedObjectLoad dflags (idToReg dflags arg)+                                              base offset tag+                  ; Just <$> bindArgToReg arg }++       mapMaybeM bind_arg args_w_offsets++bindConArgs _other_con _base args+  = ASSERT( null args ) return []
+ GHC/StgToCmm/Env.hs view
@@ -0,0 +1,208 @@+{-# LANGUAGE CPP #-}++-----------------------------------------------------------------------------+--+-- Stg to C-- code generation: the binding environment+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------+module GHC.StgToCmm.Env (+        CgIdInfo,++        litIdInfo, lneIdInfo, rhsIdInfo, mkRhsInit,+        idInfoToAmode,++        addBindC, addBindsC,++        bindArgsToRegs, bindToReg, rebindToReg,+        bindArgToReg, idToReg,+        getArgAmode, getNonVoidArgAmodes,+        getCgIdInfo,+        maybeLetNoEscape,+    ) where++#include "HsVersions.h"++import GhcPrelude++import TyCon+import GHC.StgToCmm.Monad+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Closure++import CLabel++import BlockId+import CmmExpr+import CmmUtils+import DynFlags+import Id+import MkGraph+import Name+import Outputable+import StgSyn+import Type+import TysPrim+import UniqFM+import Util+import VarEnv++-------------------------------------+--        Manipulating CgIdInfo+-------------------------------------++mkCgIdInfo :: Id -> LambdaFormInfo -> CmmExpr -> CgIdInfo+mkCgIdInfo id lf expr+  = CgIdInfo { cg_id = id, cg_lf = lf+             , cg_loc = CmmLoc expr }++litIdInfo :: DynFlags -> Id -> LambdaFormInfo -> CmmLit -> CgIdInfo+litIdInfo dflags id lf lit+  = CgIdInfo { cg_id = id, cg_lf = lf+             , cg_loc = CmmLoc (addDynTag dflags (CmmLit lit) tag) }+  where+    tag = lfDynTag dflags lf++lneIdInfo :: DynFlags -> Id -> [NonVoid Id] -> CgIdInfo+lneIdInfo dflags id regs+  = CgIdInfo { cg_id = id, cg_lf = lf+             , cg_loc = LneLoc blk_id (map (idToReg dflags) regs) }+  where+    lf     = mkLFLetNoEscape+    blk_id = mkBlockId (idUnique id)+++rhsIdInfo :: Id -> LambdaFormInfo -> FCode (CgIdInfo, LocalReg)+rhsIdInfo id lf_info+  = do dflags <- getDynFlags+       reg <- newTemp (gcWord dflags)+       return (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)), reg)++mkRhsInit :: DynFlags -> LocalReg -> LambdaFormInfo -> CmmExpr -> CmmAGraph+mkRhsInit dflags reg lf_info expr+  = mkAssign (CmmLocal reg) (addDynTag dflags expr (lfDynTag dflags lf_info))++idInfoToAmode :: CgIdInfo -> CmmExpr+-- Returns a CmmExpr for the *tagged* pointer+idInfoToAmode (CgIdInfo { cg_loc = CmmLoc e }) = e+idInfoToAmode cg_info+  = pprPanic "idInfoToAmode" (ppr (cg_id cg_info))        -- LneLoc++addDynTag :: DynFlags -> CmmExpr -> DynTag -> CmmExpr+-- A tag adds a byte offset to the pointer+addDynTag dflags expr tag = cmmOffsetB dflags expr tag++maybeLetNoEscape :: CgIdInfo -> Maybe (BlockId, [LocalReg])+maybeLetNoEscape (CgIdInfo { cg_loc = LneLoc blk_id args}) = Just (blk_id, args)+maybeLetNoEscape _other                                      = Nothing++++---------------------------------------------------------+--        The binding environment+--+-- There are three basic routines, for adding (addBindC),+-- modifying(modifyBindC) and looking up (getCgIdInfo) bindings.+---------------------------------------------------------++addBindC :: CgIdInfo -> FCode ()+addBindC stuff_to_bind = do+        binds <- getBinds+        setBinds $ extendVarEnv binds (cg_id stuff_to_bind) stuff_to_bind++addBindsC :: [CgIdInfo] -> FCode ()+addBindsC new_bindings = do+        binds <- getBinds+        let new_binds = foldl' (\ binds info -> extendVarEnv binds (cg_id info) info)+                               binds+                               new_bindings+        setBinds new_binds++getCgIdInfo :: Id -> FCode CgIdInfo+getCgIdInfo id+  = do  { dflags <- getDynFlags+        ; local_binds <- getBinds -- Try local bindings first+        ; case lookupVarEnv local_binds id of {+            Just info -> return info ;+            Nothing   -> do {++                -- Should be imported; make up a CgIdInfo for it+          let name = idName id+        ; if isExternalName name then+              let ext_lbl+                      | isUnliftedType (idType id) =+                          -- An unlifted external Id must refer to a top-level+                          -- string literal. See Note [Bytes label] in CLabel.+                          ASSERT( idType id `eqType` addrPrimTy )+                          mkBytesLabel name+                      | otherwise = mkClosureLabel name $ idCafInfo id+              in return $+                  litIdInfo dflags id (mkLFImported id) (CmmLabel ext_lbl)+          else+              cgLookupPanic id -- Bug+        }}}++cgLookupPanic :: Id -> FCode a+cgLookupPanic id+  = do  local_binds <- getBinds+        pprPanic "GHC.StgToCmm.Env: variable not found"+                (vcat [ppr id,+                text "local binds for:",+                pprUFM local_binds $ \infos ->+                  vcat [ ppr (cg_id info) | info <- infos ]+              ])+++--------------------+getArgAmode :: NonVoid StgArg -> FCode CmmExpr+getArgAmode (NonVoid (StgVarArg var)) = idInfoToAmode <$> getCgIdInfo var+getArgAmode (NonVoid (StgLitArg lit)) = CmmLit <$> cgLit lit++getNonVoidArgAmodes :: [StgArg] -> FCode [CmmExpr]+-- NB: Filters out void args,+--     so the result list may be shorter than the argument list+getNonVoidArgAmodes [] = return []+getNonVoidArgAmodes (arg:args)+  | isVoidRep (argPrimRep arg) = getNonVoidArgAmodes args+  | otherwise = do { amode  <- getArgAmode (NonVoid arg)+                   ; amodes <- getNonVoidArgAmodes args+                   ; return ( amode : amodes ) }+++------------------------------------------------------------------------+--        Interface functions for binding and re-binding names+------------------------------------------------------------------------++bindToReg :: NonVoid Id -> LambdaFormInfo -> FCode LocalReg+-- Bind an Id to a fresh LocalReg+bindToReg nvid@(NonVoid id) lf_info+  = do dflags <- getDynFlags+       let reg = idToReg dflags nvid+       addBindC (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)))+       return reg++rebindToReg :: NonVoid Id -> FCode LocalReg+-- Like bindToReg, but the Id is already in scope, so+-- get its LF info from the envt+rebindToReg nvid@(NonVoid id)+  = do  { info <- getCgIdInfo id+        ; bindToReg nvid (cg_lf info) }++bindArgToReg :: NonVoid Id -> FCode LocalReg+bindArgToReg nvid@(NonVoid id) = bindToReg nvid (mkLFArgument id)++bindArgsToRegs :: [NonVoid Id] -> FCode [LocalReg]+bindArgsToRegs args = mapM bindArgToReg args++idToReg :: DynFlags -> NonVoid Id -> LocalReg+-- Make a register from an Id, typically a function argument,+-- free variable, or case binder+--+-- We re-use the Unique from the Id to make it easier to see what is going on+--+-- By now the Ids should be uniquely named; else one would worry+-- about accidental collision+idToReg dflags (NonVoid id)+             = LocalReg (idUnique id)+                        (primRepCmmType dflags (idPrimRep id))
+ GHC/StgToCmm/Expr.hs view
@@ -0,0 +1,1158 @@+{-# LANGUAGE CPP, BangPatterns #-}++-----------------------------------------------------------------------------+--+-- Stg to C-- code generation: expressions+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Expr ( cgExpr ) where++#include "HsVersions.h"++import GhcPrelude hiding ((<*>))++import {-# SOURCE #-} GHC.StgToCmm.Bind ( cgBind )++import GHC.StgToCmm.Monad+import GHC.StgToCmm.Heap+import GHC.StgToCmm.Env+import GHC.StgToCmm.DataCon+import GHC.StgToCmm.Prof (saveCurrentCostCentre, restoreCurrentCostCentre, emitSetCCC)+import GHC.StgToCmm.Layout+import GHC.StgToCmm.Prim+import GHC.StgToCmm.Hpc+import GHC.StgToCmm.Ticky+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Closure++import StgSyn++import MkGraph+import BlockId+import Cmm hiding ( succ )+import CmmInfo+import CoreSyn+import DataCon+import DynFlags         ( mAX_PTR_TAG )+import ForeignCall+import Id+import PrimOp+import TyCon+import Type             ( isUnliftedType )+import RepType          ( isVoidTy, countConRepArgs )+import CostCentre       ( CostCentreStack, currentCCS )+import Maybes+import Util+import FastString+import Outputable++import Control.Monad ( unless, void )+import Control.Arrow ( first )+import Data.List     ( partition )++------------------------------------------------------------------------+--              cgExpr: the main function+------------------------------------------------------------------------++cgExpr  :: CgStgExpr -> FCode ReturnKind++cgExpr (StgApp fun args)     = cgIdApp fun args++-- seq# a s ==> a+-- See Note [seq# magic] in PrelRules+cgExpr (StgOpApp (StgPrimOp SeqOp) [StgVarArg a, _] _res_ty) =+  cgIdApp a []++-- dataToTag# :: a -> Int#+-- See Note [dataToTag#] in primops.txt.pp+cgExpr (StgOpApp (StgPrimOp DataToTagOp) [StgVarArg a] _res_ty) = do+  dflags <- getDynFlags+  emitComment (mkFastString "dataToTag#")+  tmp <- newTemp (bWord dflags)+  _ <- withSequel (AssignTo [tmp] False) (cgIdApp a [])+  -- TODO: For small types look at the tag bits instead of reading info table+  emitReturn [getConstrTag dflags (cmmUntag dflags (CmmReg (CmmLocal tmp)))]++cgExpr (StgOpApp op args ty) = cgOpApp op args ty+cgExpr (StgConApp con args _)= cgConApp con args+cgExpr (StgTick t e)         = cgTick t >> cgExpr e+cgExpr (StgLit lit)       = do cmm_lit <- cgLit lit+                               emitReturn [CmmLit cmm_lit]++cgExpr (StgLet _ binds expr) = do { cgBind binds;     cgExpr expr }+cgExpr (StgLetNoEscape _ binds expr) =+  do { u <- newUnique+     ; let join_id = mkBlockId u+     ; cgLneBinds join_id binds+     ; r <- cgExpr expr+     ; emitLabel join_id+     ; return r }++cgExpr (StgCase expr bndr alt_type alts) =+  cgCase expr bndr alt_type alts++cgExpr (StgLam {}) = panic "cgExpr: StgLam"++------------------------------------------------------------------------+--              Let no escape+------------------------------------------------------------------------++{- Generating code for a let-no-escape binding, aka join point is very+very similar to what we do for a case expression.  The duality is+between+        let-no-escape x = b+        in e+and+        case e of ... -> b++That is, the RHS of 'x' (ie 'b') will execute *later*, just like+the alternative of the case; it needs to be compiled in an environment+in which all volatile bindings are forgotten, and the free vars are+bound only to stable things like stack locations..  The 'e' part will+execute *next*, just like the scrutinee of a case. -}++-------------------------+cgLneBinds :: BlockId -> CgStgBinding -> FCode ()+cgLneBinds join_id (StgNonRec bndr rhs)+  = do  { local_cc <- saveCurrentCostCentre+                -- See Note [Saving the current cost centre]+        ; (info, fcode) <- cgLetNoEscapeRhs join_id local_cc bndr rhs+        ; fcode+        ; addBindC info }++cgLneBinds join_id (StgRec pairs)+  = do  { local_cc <- saveCurrentCostCentre+        ; r <- sequence $ unzipWith (cgLetNoEscapeRhs join_id local_cc) pairs+        ; let (infos, fcodes) = unzip r+        ; addBindsC infos+        ; sequence_ fcodes+        }++-------------------------+cgLetNoEscapeRhs+    :: BlockId          -- join point for successor of let-no-escape+    -> Maybe LocalReg   -- Saved cost centre+    -> Id+    -> CgStgRhs+    -> FCode (CgIdInfo, FCode ())++cgLetNoEscapeRhs join_id local_cc bndr rhs =+  do { (info, rhs_code) <- cgLetNoEscapeRhsBody local_cc bndr rhs+     ; let (bid, _) = expectJust "cgLetNoEscapeRhs" $ maybeLetNoEscape info+     ; let code = do { (_, body) <- getCodeScoped rhs_code+                     ; emitOutOfLine bid (first (<*> mkBranch join_id) body) }+     ; return (info, code)+     }++cgLetNoEscapeRhsBody+    :: Maybe LocalReg   -- Saved cost centre+    -> Id+    -> CgStgRhs+    -> FCode (CgIdInfo, FCode ())+cgLetNoEscapeRhsBody local_cc bndr (StgRhsClosure _ cc _upd args body)+  = cgLetNoEscapeClosure bndr local_cc cc (nonVoidIds args) body+cgLetNoEscapeRhsBody local_cc bndr (StgRhsCon cc con args)+  = cgLetNoEscapeClosure bndr local_cc cc []+      (StgConApp con args (pprPanic "cgLetNoEscapeRhsBody" $+                           text "StgRhsCon doesn't have type args"))+        -- For a constructor RHS we want to generate a single chunk of+        -- code which can be jumped to from many places, which will+        -- return the constructor. It's easy; just behave as if it+        -- was an StgRhsClosure with a ConApp inside!++-------------------------+cgLetNoEscapeClosure+        :: Id                   -- binder+        -> Maybe LocalReg       -- Slot for saved current cost centre+        -> CostCentreStack      -- XXX: *** NOT USED *** why not?+        -> [NonVoid Id]         -- Args (as in \ args -> body)+        -> CgStgExpr            -- Body (as in above)+        -> FCode (CgIdInfo, FCode ())++cgLetNoEscapeClosure bndr cc_slot _unused_cc args body+  = do dflags <- getDynFlags+       return ( lneIdInfo dflags bndr args+              , code )+  where+   code = forkLneBody $ do {+            ; withNewTickyCounterLNE (idName bndr) args $ do+            ; restoreCurrentCostCentre cc_slot+            ; arg_regs <- bindArgsToRegs args+            ; void $ noEscapeHeapCheck arg_regs (tickyEnterLNE >> cgExpr body) }+++------------------------------------------------------------------------+--              Case expressions+------------------------------------------------------------------------++{- Note [Compiling case expressions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It is quite interesting to decide whether to put a heap-check at the+start of each alternative.  Of course we certainly have to do so if+the case forces an evaluation, or if there is a primitive op which can+trigger GC.++A more interesting situation is this (a Plan-B situation)++        !P!;+        ...P...+        case x# of+          0#      -> !Q!; ...Q...+          default -> !R!; ...R...++where !x! indicates a possible heap-check point. The heap checks+in the alternatives *can* be omitted, in which case the topmost+heapcheck will take their worst case into account.++In favour of omitting !Q!, !R!:++ - *May* save a heap overflow test,+   if ...P... allocates anything.++ - We can use relative addressing from a single Hp to+   get at all the closures so allocated.++ - No need to save volatile vars etc across heap checks+   in !Q!, !R!++Against omitting !Q!, !R!++  - May put a heap-check into the inner loop.  Suppose+        the main loop is P -> R -> P -> R...+        Q is the loop exit, and only it does allocation.+    This only hurts us if P does no allocation.  If P allocates,+    then there is a heap check in the inner loop anyway.++  - May do more allocation than reqd.  This sometimes bites us+    badly.  For example, nfib (ha!) allocates about 30\% more space if the+    worst-casing is done, because many many calls to nfib are leaf calls+    which don't need to allocate anything.++    We can un-allocate, but that costs an instruction++Neither problem hurts us if there is only one alternative.++Suppose the inner loop is P->R->P->R etc.  Then here is+how many heap checks we get in the *inner loop* under various+conditions++  Alloc   Heap check in branches (!Q!, !R!)?+  P Q R      yes     no (absorb to !P!)+--------------------------------------+  n n n      0          0+  n y n      0          1+  n . y      1          1+  y . y      2          1+  y . n      1          1++Best choices: absorb heap checks from Q and R into !P! iff+  a) P itself does some allocation+or+  b) P does allocation, or there is exactly one alternative++We adopt (b) because that is more likely to put the heap check at the+entry to a function, when not many things are live.  After a bunch of+single-branch cases, we may have lots of things live++Hence: two basic plans for++        case e of r { alts }++------ Plan A: the general case ---------++        ...save current cost centre...++        ...code for e,+           with sequel (SetLocals r)++        ...restore current cost centre...+        ...code for alts...+        ...alts do their own heap checks++------ Plan B: special case when ---------+  (i)  e does not allocate or call GC+  (ii) either upstream code performs allocation+       or there is just one alternative++  Then heap allocation in the (single) case branch+  is absorbed by the upstream check.+  Very common example: primops on unboxed values++        ...code for e,+           with sequel (SetLocals r)...++        ...code for alts...+        ...no heap check...+-}++++-------------------------------------+data GcPlan+  = GcInAlts            -- Put a GC check at the start the case alternatives,+        [LocalReg]      -- which binds these registers+  | NoGcInAlts          -- The scrutinee is a primitive value, or a call to a+                        -- primitive op which does no GC.  Absorb the allocation+                        -- of the case alternative(s) into the upstream check++-------------------------------------+cgCase :: CgStgExpr -> Id -> AltType -> [CgStgAlt] -> FCode ReturnKind++cgCase (StgOpApp (StgPrimOp op) args _) bndr (AlgAlt tycon) alts+  | isEnumerationTyCon tycon -- Note [case on bool]+  = do { tag_expr <- do_enum_primop op args++       -- If the binder is not dead, convert the tag to a constructor+       -- and assign it. See Note [Dead-binder optimisation]+       ; unless (isDeadBinder bndr) $ do+            { dflags <- getDynFlags+            ; tmp_reg <- bindArgToReg (NonVoid bndr)+            ; emitAssign (CmmLocal tmp_reg)+                         (tagToClosure dflags tycon tag_expr) }++       ; (mb_deflt, branches) <- cgAlgAltRhss (NoGcInAlts,AssignedDirectly)+                                              (NonVoid bndr) alts+                                 -- See Note [GC for conditionals]+       ; emitSwitch tag_expr branches mb_deflt 0 (tyConFamilySize tycon - 1)+       ; return AssignedDirectly+       }+  where+    do_enum_primop :: PrimOp -> [StgArg] -> FCode CmmExpr+    do_enum_primop TagToEnumOp [arg]  -- No code!+      = getArgAmode (NonVoid arg)+    do_enum_primop primop args+      = do dflags <- getDynFlags+           tmp <- newTemp (bWord dflags)+           cgPrimOp [tmp] primop args+           return (CmmReg (CmmLocal tmp))++{-+Note [case on bool]+~~~~~~~~~~~~~~~~~~~+This special case handles code like++  case a <# b of+    True ->+    False ->++-->  case tagToEnum# (a <$# b) of+        True -> .. ; False -> ...++--> case (a <$# b) of r ->+    case tagToEnum# r of+        True -> .. ; False -> ...++If we let the ordinary case code handle it, we'll get something like++ tmp1 = a < b+ tmp2 = Bool_closure_tbl[tmp1]+ if (tmp2 & 7 != 0) then ... // normal tagged case++but this junk won't optimise away.  What we really want is just an+inline comparison:++ if (a < b) then ...++So we add a special case to generate++ tmp1 = a < b+ if (tmp1 == 0) then ...++and later optimisations will further improve this.++Now that #6135 has been resolved it should be possible to remove that+special case. The idea behind this special case and pre-6135 implementation+of Bool-returning primops was that tagToEnum# was added implicitly in the+codegen and then optimized away. Now the call to tagToEnum# is explicit+in the source code, which allows to optimize it away at the earlier stages+of compilation (i.e. at the Core level).++Note [Scrutinising VoidRep]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have this STG code:+   f = \[s : State# RealWorld] ->+       case s of _ -> blah+This is very odd.  Why are we scrutinising a state token?  But it+can arise with bizarre NOINLINE pragmas (#9964)+    crash :: IO ()+    crash = IO (\s -> let {-# NOINLINE s' #-}+                          s' = s+                      in (# s', () #))++Now the trouble is that 's' has VoidRep, and we do not bind void+arguments in the environment; they don't live anywhere.  See the+calls to nonVoidIds in various places.  So we must not look up+'s' in the environment.  Instead, just evaluate the RHS!  Simple.++Note [Dead-binder optimisation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A case-binder, or data-constructor argument, may be marked as dead,+because we preserve occurrence-info on binders in CoreTidy (see+CoreTidy.tidyIdBndr).++If the binder is dead, we can sometimes eliminate a load.  While+CmmSink will eliminate that load, it's very easy to kill it at source+(giving CmmSink less work to do), and in any case CmmSink only runs+with -O. Since the majority of case binders are dead, this+optimisation probably still has a great benefit-cost ratio and we want+to keep it for -O0. See also Phab:D5358.++This probably also was the reason for occurrence hack in Phab:D5339 to+exist, perhaps because the occurrence information preserved by+'CoreTidy.tidyIdBndr' was insufficient.  But now that CmmSink does the+job we deleted the hacks.+-}++cgCase (StgApp v []) _ (PrimAlt _) alts+  | isVoidRep (idPrimRep v)  -- See Note [Scrutinising VoidRep]+  , [(DEFAULT, _, rhs)] <- alts+  = cgExpr rhs++{- Note [Dodgy unsafeCoerce 1]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+    case (x :: HValue) |> co of (y :: MutVar# Int)+        DEFAULT -> ...+We want to generate an assignment+     y := x+We want to allow this assignment to be generated in the case when the+types are compatible, because this allows some slightly-dodgy but+occasionally-useful casts to be used, such as in RtClosureInspect+where we cast an HValue to a MutVar# so we can print out the contents+of the MutVar#.  If instead we generate code that enters the HValue,+then we'll get a runtime panic, because the HValue really is a+MutVar#.  The types are compatible though, so we can just generate an+assignment.+-}+cgCase (StgApp v []) bndr alt_type@(PrimAlt _) alts+  | isUnliftedType (idType v)  -- Note [Dodgy unsafeCoerce 1]+  = -- assignment suffices for unlifted types+    do { dflags <- getDynFlags+       ; unless (reps_compatible dflags) $+           pprPanic "cgCase: reps do not match, perhaps a dodgy unsafeCoerce?"+                    (pp_bndr v $$ pp_bndr bndr)+       ; v_info <- getCgIdInfo v+       ; emitAssign (CmmLocal (idToReg dflags (NonVoid bndr)))+                    (idInfoToAmode v_info)+       -- Add bndr to the environment+       ; _ <- bindArgToReg (NonVoid bndr)+       ; cgAlts (NoGcInAlts,AssignedDirectly) (NonVoid bndr) alt_type alts }+  where+    reps_compatible dflags = primRepCompatible dflags (idPrimRep v) (idPrimRep bndr)++    pp_bndr id = ppr id <+> dcolon <+> ppr (idType id) <+> parens (ppr (idPrimRep id))++{- Note [Dodgy unsafeCoerce 2, #3132]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In all other cases of a lifted Id being cast to an unlifted type, the+Id should be bound to bottom, otherwise this is an unsafe use of+unsafeCoerce.  We can generate code to enter the Id and assume that+it will never return.  Hence, we emit the usual enter/return code, and+because bottom must be untagged, it will be entered.  The Sequel is a+type-correct assignment, albeit bogus.  The (dead) continuation loops;+it would be better to invoke some kind of panic function here.+-}+cgCase scrut@(StgApp v []) _ (PrimAlt _) _+  = do { dflags <- getDynFlags+       ; mb_cc <- maybeSaveCostCentre True+       ; _ <- withSequel+                  (AssignTo [idToReg dflags (NonVoid v)] False) (cgExpr scrut)+       ; restoreCurrentCostCentre mb_cc+       ; emitComment $ mkFastString "should be unreachable code"+       ; l <- newBlockId+       ; emitLabel l+       ; emit (mkBranch l)  -- an infinite loop+       ; return AssignedDirectly+       }++{- Note [Handle seq#]+~~~~~~~~~~~~~~~~~~~~~+See Note [seq# magic] in PrelRules.+The special case for seq# in cgCase does this:++  case seq# a s of v+    (# s', a' #) -> e+==>+  case a of v+    (# s', a' #) -> e++(taking advantage of the fact that the return convention for (# State#, a #)+is the same as the return convention for just 'a')+-}++cgCase (StgOpApp (StgPrimOp SeqOp) [StgVarArg a, _] _) bndr alt_type alts+  = -- Note [Handle seq#]+    -- And see Note [seq# magic] in PrelRules+    -- Use the same return convention as vanilla 'a'.+    cgCase (StgApp a []) bndr alt_type alts++cgCase scrut bndr alt_type alts+  = -- the general case+    do { dflags <- getDynFlags+       ; up_hp_usg <- getVirtHp        -- Upstream heap usage+       ; let ret_bndrs = chooseReturnBndrs bndr alt_type alts+             alt_regs  = map (idToReg dflags) ret_bndrs+       ; simple_scrut <- isSimpleScrut scrut alt_type+       ; let do_gc  | is_cmp_op scrut  = False  -- See Note [GC for conditionals]+                    | not simple_scrut = True+                    | isSingleton alts = False+                    | up_hp_usg > 0    = False+                    | otherwise        = True+               -- cf Note [Compiling case expressions]+             gc_plan = if do_gc then GcInAlts alt_regs else NoGcInAlts++       ; mb_cc <- maybeSaveCostCentre simple_scrut++       ; let sequel = AssignTo alt_regs do_gc{- Note [scrut sequel] -}+       ; ret_kind <- withSequel sequel (cgExpr scrut)+       ; restoreCurrentCostCentre mb_cc+       ; _ <- bindArgsToRegs ret_bndrs+       ; cgAlts (gc_plan,ret_kind) (NonVoid bndr) alt_type alts+       }+  where+    is_cmp_op (StgOpApp (StgPrimOp op) _ _) = isComparisonPrimOp op+    is_cmp_op _                             = False++{- Note [GC for conditionals]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For boolean conditionals it seems that we have always done NoGcInAlts.+That is, we have always done the GC check before the conditional.+This is enshrined in the special case for+   case tagToEnum# (a>b) of ...+See Note [case on bool]++It's odd, and it's flagrantly inconsistent with the rules described+Note [Compiling case expressions].  However, after eliminating the+tagToEnum# (#13397) we will have:+   case (a>b) of ...+Rather than make it behave quite differently, I am testing for a+comparison operator here in in the general case as well.++ToDo: figure out what the Right Rule should be.++Note [scrut sequel]+~~~~~~~~~~~~~~~~~~~+The job of the scrutinee is to assign its value(s) to alt_regs.+Additionally, if we plan to do a heap-check in the alternatives (see+Note [Compiling case expressions]), then we *must* retreat Hp to+recover any unused heap before passing control to the sequel.  If we+don't do this, then any unused heap will become slop because the heap+check will reset the heap usage. Slop in the heap breaks LDV profiling+(+RTS -hb) which needs to do a linear sweep through the nursery.+++Note [Inlining out-of-line primops and heap checks]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If shouldInlinePrimOp returns True when called from GHC.StgToCmm.Expr for the+purpose of heap check placement, we *must* inline the primop later in+GHC.StgToCmm.Prim. If we don't things will go wrong.+-}++-----------------+maybeSaveCostCentre :: Bool -> FCode (Maybe LocalReg)+maybeSaveCostCentre simple_scrut+  | simple_scrut = return Nothing+  | otherwise    = saveCurrentCostCentre+++-----------------+isSimpleScrut :: CgStgExpr -> AltType -> FCode Bool+-- Simple scrutinee, does not block or allocate; hence safe to amalgamate+-- heap usage from alternatives into the stuff before the case+-- NB: if you get this wrong, and claim that the expression doesn't allocate+--     when it does, you'll deeply mess up allocation+isSimpleScrut (StgOpApp op args _) _       = isSimpleOp op args+isSimpleScrut (StgLit _)       _           = return True       -- case 1# of { 0# -> ..; ... }+isSimpleScrut (StgApp _ [])    (PrimAlt _) = return True       -- case x# of { 0# -> ..; ... }+isSimpleScrut _                _           = return False++isSimpleOp :: StgOp -> [StgArg] -> FCode Bool+-- True iff the op cannot block or allocate+isSimpleOp (StgFCallOp (CCall (CCallSpec _ _ safe)) _) _ = return $! not (playSafe safe)+-- dataToTag# evalautes its argument, see Note [dataToTag#] in primops.txt.pp+isSimpleOp (StgPrimOp DataToTagOp) _ = return False+isSimpleOp (StgPrimOp op) stg_args                  = do+    arg_exprs <- getNonVoidArgAmodes stg_args+    dflags <- getDynFlags+    -- See Note [Inlining out-of-line primops and heap checks]+    return $! shouldInlinePrimOp dflags op arg_exprs+isSimpleOp (StgPrimCallOp _) _                           = return False++-----------------+chooseReturnBndrs :: Id -> AltType -> [CgStgAlt] -> [NonVoid Id]+-- These are the binders of a case that are assigned by the evaluation of the+-- scrutinee.+-- They're non-void, see Note [Post-unarisation invariants] in UnariseStg.+chooseReturnBndrs bndr (PrimAlt _) _alts+  = assertNonVoidIds [bndr]++chooseReturnBndrs _bndr (MultiValAlt n) [(_, ids, _)]+  = ASSERT2(ids `lengthIs` n, ppr n $$ ppr ids $$ ppr _bndr)+    assertNonVoidIds ids     -- 'bndr' is not assigned!++chooseReturnBndrs bndr (AlgAlt _) _alts+  = assertNonVoidIds [bndr]  -- Only 'bndr' is assigned++chooseReturnBndrs bndr PolyAlt _alts+  = assertNonVoidIds [bndr]  -- Only 'bndr' is assigned++chooseReturnBndrs _ _ _ = panic "chooseReturnBndrs"+                             -- MultiValAlt has only one alternative++-------------------------------------+cgAlts :: (GcPlan,ReturnKind) -> NonVoid Id -> AltType -> [CgStgAlt]+       -> FCode ReturnKind+-- At this point the result of the case are in the binders+cgAlts gc_plan _bndr PolyAlt [(_, _, rhs)]+  = maybeAltHeapCheck gc_plan (cgExpr rhs)++cgAlts gc_plan _bndr (MultiValAlt _) [(_, _, rhs)]+  = maybeAltHeapCheck gc_plan (cgExpr rhs)+        -- Here bndrs are *already* in scope, so don't rebind them++cgAlts gc_plan bndr (PrimAlt _) alts+  = do  { dflags <- getDynFlags++        ; tagged_cmms <- cgAltRhss gc_plan bndr alts++        ; let bndr_reg = CmmLocal (idToReg dflags bndr)+              (DEFAULT,deflt) = head tagged_cmms+                -- PrimAlts always have a DEFAULT case+                -- and it always comes first++              tagged_cmms' = [(lit,code)+                             | (LitAlt lit, code) <- tagged_cmms]+        ; emitCmmLitSwitch (CmmReg bndr_reg) tagged_cmms' deflt+        ; return AssignedDirectly }++cgAlts gc_plan bndr (AlgAlt tycon) alts+  = do  { dflags <- getDynFlags++        ; (mb_deflt, branches) <- cgAlgAltRhss gc_plan bndr alts++        ; let !fam_sz   = tyConFamilySize tycon+              !bndr_reg = CmmLocal (idToReg dflags bndr)+              !ptag_expr = cmmConstrTag1 dflags (CmmReg bndr_reg)+              !branches' = first succ <$> branches+              !maxpt = mAX_PTR_TAG dflags+              (!via_ptr, !via_info) = partition ((< maxpt) . fst) branches'+              !small = isSmallFamily dflags fam_sz++                -- Is the constructor tag in the node reg?+                -- See Note [Tagging big families]+        ; if small || null via_info+           then -- Yes, bndr_reg has constructor tag in ls bits+               emitSwitch ptag_expr branches' mb_deflt 1+                 (if small then fam_sz else maxpt)++           else -- No, the get exact tag from info table when mAX_PTR_TAG+                -- See Note [Double switching for big families]+              do+                let !untagged_ptr = cmmUntag dflags (CmmReg bndr_reg)+                    !itag_expr = getConstrTag dflags untagged_ptr+                    !info0 = first pred <$> via_info+                if null via_ptr then+                  emitSwitch itag_expr info0 mb_deflt 0 (fam_sz - 1)+                else do+                  infos_lbl <- newBlockId+                  infos_scp <- getTickScope++                  let spillover = (maxpt, (mkBranch infos_lbl, infos_scp))++                  (mb_shared_deflt, mb_shared_branch) <- case mb_deflt of+                      (Just (stmts, scp)) ->+                          do lbl <- newBlockId+                             return ( Just (mkLabel lbl scp <*> stmts, scp)+                                    , Just (mkBranch lbl, scp))+                      _ -> return (Nothing, Nothing)+                  -- Switch on pointer tag+                  emitSwitch ptag_expr (spillover : via_ptr) mb_shared_deflt 1 maxpt+                  join_lbl <- newBlockId+                  emit (mkBranch join_lbl)+                  -- Switch on info table tag+                  emitLabel infos_lbl+                  emitSwitch itag_expr info0 mb_shared_branch+                    (maxpt - 1) (fam_sz - 1)+                  emitLabel join_lbl++        ; return AssignedDirectly }++cgAlts _ _ _ _ = panic "cgAlts"+        -- UbxTupAlt and PolyAlt have only one alternative++-- Note [Double switching for big families]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- An algebraic data type can have a n >= 0 summands+-- (or alternatives), which are identified (labeled) by+-- constructors. In memory they are kept apart by tags+-- (see Note [Data constructor dynamic tags] in GHC.StgToCmm.Closure).+-- Due to the characteristics of the platform that+-- contribute to the alignment of memory objects, there+-- is a natural limit of information about constructors+-- that can be encoded in the pointer tag. When the mapping+-- of constructors to the pointer tag range 1..mAX_PTR_TAG+-- is not injective, then we have a "big data type", also+-- called a "big (constructor) family" in the literature.+-- Constructor tags residing in the info table are injective,+-- but considerably more expensive to obtain, due to additional+-- memory access(es).+--+-- When doing case analysis on a value of a "big data type"+-- we need two nested switch statements to make up for the lack+-- of injectivity of pointer tagging, also taking the info+-- table tag into account. The exact mechanism is described next.+--+-- In the general case, switching on big family alternatives+-- is done by two nested switch statements. According to+-- Note [Tagging big families], the outer switch+-- looks at the pointer tag and the inner dereferences the+-- pointer and switches on the info table tag.+--+-- We can handle a simple case first, namely when none+-- of the case alternatives mention a constructor having+-- a pointer tag of 1..mAX_PTR_TAG-1. In this case we+-- simply emit a switch on the info table tag.+-- Note that the other simple case is when all mentioned+-- alternatives lie in 1..mAX_PTR_TAG-1, in which case we can+-- switch on the ptr tag only, just like in the small family case.+--+-- There is a single intricacy with a nested switch:+-- Both should branch to the same default alternative, and as such+-- avoid duplicate codegen of potentially heavy code. The outer+-- switch generates the actual code with a prepended fresh label,+-- while the inner one only generates a jump to that label.+--+-- For example, let's assume a 64-bit architecture, so that all+-- heap objects are 8-byte aligned, and hence the address of a+-- heap object ends in `000` (three zero bits).+--+-- Then consider the following data type+--+--   > data Big = T0 | T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8+--   Ptr tag:      1    2    3    4    5    6    7    7    7+--   As bits:    001  010  011  100  101  110  111  111  111+--   Info pointer tag (zero based):+--                 0    1    2    3    4    5    6    7    8+--+-- Then     \case T2 -> True; T8 -> True; _ -> False+-- will result in following code (slightly cleaned-up and+-- commented -ddump-cmm-from-stg):+{-+           R1 = _sqI::P64;  -- scrutinee+           if (R1 & 7 != 0) goto cqO; else goto cqP;+       cqP: // global       -- enter+           call (I64[R1])(R1) returns to cqO, args: 8, res: 8, upd: 8;+       cqO: // global       -- already WHNF+           _sqJ::P64 = R1;+           _cqX::P64 = _sqJ::P64 & 7;  -- extract pointer tag+           switch [1 .. 7] _cqX::P64 {+               case 3 : goto cqW;+               case 7 : goto cqR;+               default: {goto cqS;}+           }+       cqR: // global+           _cr2 = I32[I64[_sqJ::P64 & (-8)] - 4]; -- tag from info pointer+           switch [6 .. 8] _cr2::I64 {+               case 8 : goto cr1;+               default: {goto cr0;}+           }+       cr1: // global+           R1 = GHC.Types.True_closure+2;+           call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;+       cr0: // global     -- technically necessary label+           goto cqS;+       cqW: // global+           R1 = GHC.Types.True_closure+2;+           call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;+       cqS: // global+           R1 = GHC.Types.False_closure+1;+           call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;+-}+--+-- For 32-bit systems we only have 2 tag bits in the pointers at our disposal,+-- so the performance win is dubious, especially in face of the increased code+-- size due to double switching. But we can take the viewpoint that 32-bit+-- architectures are not relevant for performance any more, so this can be+-- considered as moot.+++-- Note [alg-alt heap check]+--+-- In an algebraic case with more than one alternative, we will have+-- code like+--+-- L0:+--   x = R1+--   goto L1+-- L1:+--   if (x & 7 >= 2) then goto L2 else goto L3+-- L2:+--   Hp = Hp + 16+--   if (Hp > HpLim) then goto L4+--   ...+-- L4:+--   call gc() returns to L5+-- L5:+--   x = R1+--   goto L1+++-- Note [Tagging big families]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- Both the big and the small constructor families are tagged,+-- that is, greater unions which overflow the tag space of TAG_BITS+-- (i.e. 3 on 32 resp. 7 constructors on 64 bit archs).+--+-- For example, let's assume a 64-bit architecture, so that all+-- heap objects are 8-byte aligned, and hence the address of a+-- heap object ends in `000` (three zero bits).  Then consider+-- > data Maybe a = Nothing | Just a+-- > data Day a = Mon | Tue | Wed | Thu | Fri | Sat | Sun+-- > data Grade = G1 | G2 | G3 | G4 | G5 | G6 | G7 | G8 | G9 | G10+--+-- Since `Grade` has more than 7 constructors, it counts as a+-- "big data type" (also referred to as "big constructor family" in papers).+-- On the other hand, `Maybe` and `Day` have 7 constructors or fewer, so they+-- are "small data types".+--+-- Then+--   * A pointer to an unevaluated thunk of type `Maybe Int`, `Day` or `Grade` will end in `000`+--   * A tagged pointer to a `Nothing`, `Mon` or `G1` will end in `001`+--   * A tagged pointer to a `Just x`, `Tue` or `G2`  will end in `010`+--   * A tagged pointer to `Wed` or `G3` will end in `011`+--       ...+--   * A tagged pointer to `Sat` or `G6` will end in `110`+--   * A tagged pointer to `Sun` or `G7` or `G8` or `G9` or `G10` will end in `111`+--+-- For big families we employ a mildly clever way of combining pointer and+-- info-table tagging. We use 1..MAX_PTR_TAG-1 as pointer-resident tags where+-- the tags in the pointer and the info table are in a one-to-one+-- relation, whereas tag MAX_PTR_TAG is used as "spill over", signifying+-- we have to fall back and get the precise constructor tag from the+-- info-table.+--+-- Consequently we now cascade switches, because we have to check+-- the pointer tag first, and when it is MAX_PTR_TAG, fetch the precise+-- tag from the info table, and switch on that. The only technically+-- tricky part is that the default case needs (logical) duplication.+-- To do this we emit an extra label for it and branch to that from+-- the second switch. This avoids duplicated codegen. See Trac #14373.+-- See note [Double switching for big families] for the mechanics+-- involved.+--+-- Also see note [Data constructor dynamic tags]+-- and the wiki https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/haskell-execution/pointer-tagging+--++-------------------+cgAlgAltRhss :: (GcPlan,ReturnKind) -> NonVoid Id -> [CgStgAlt]+             -> FCode ( Maybe CmmAGraphScoped+                      , [(ConTagZ, CmmAGraphScoped)] )+cgAlgAltRhss gc_plan bndr alts+  = do { tagged_cmms <- cgAltRhss gc_plan bndr alts++       ; let { mb_deflt = case tagged_cmms of+                           ((DEFAULT,rhs) : _) -> Just rhs+                           _other              -> Nothing+                            -- DEFAULT is always first, if present++              ; branches = [ (dataConTagZ con, cmm)+                           | (DataAlt con, cmm) <- tagged_cmms ]+              }++       ; return (mb_deflt, branches)+       }+++-------------------+cgAltRhss :: (GcPlan,ReturnKind) -> NonVoid Id -> [CgStgAlt]+          -> FCode [(AltCon, CmmAGraphScoped)]+cgAltRhss gc_plan bndr alts = do+  dflags <- getDynFlags+  let+    base_reg = idToReg dflags bndr+    cg_alt :: CgStgAlt -> FCode (AltCon, CmmAGraphScoped)+    cg_alt (con, bndrs, rhs)+      = getCodeScoped             $+        maybeAltHeapCheck gc_plan $+        do { _ <- bindConArgs con base_reg (assertNonVoidIds bndrs)+                    -- alt binders are always non-void,+                    -- see Note [Post-unarisation invariants] in UnariseStg+           ; _ <- cgExpr rhs+           ; return con }+  forkAlts (map cg_alt alts)++maybeAltHeapCheck :: (GcPlan,ReturnKind) -> FCode a -> FCode a+maybeAltHeapCheck (NoGcInAlts,_)  code = code+maybeAltHeapCheck (GcInAlts regs, AssignedDirectly) code =+  altHeapCheck regs code+maybeAltHeapCheck (GcInAlts regs, ReturnedTo lret off) code =+  altHeapCheckReturnsTo regs lret off code++-----------------------------------------------------------------------------+--      Tail calls+-----------------------------------------------------------------------------++cgConApp :: DataCon -> [StgArg] -> FCode ReturnKind+cgConApp con stg_args+  | isUnboxedTupleCon con       -- Unboxed tuple: assign and return+  = do { arg_exprs <- getNonVoidArgAmodes stg_args+       ; tickyUnboxedTupleReturn (length arg_exprs)+       ; emitReturn arg_exprs }++  | otherwise   --  Boxed constructors; allocate and return+  = ASSERT2( stg_args `lengthIs` countConRepArgs con, ppr con <> parens (ppr (countConRepArgs con)) <+> ppr stg_args )+    do  { (idinfo, fcode_init) <- buildDynCon (dataConWorkId con) False+                                     currentCCS con (assertNonVoidStgArgs stg_args)+                                     -- con args are always non-void,+                                     -- see Note [Post-unarisation invariants] in UnariseStg+                -- The first "con" says that the name bound to this+                -- closure is "con", which is a bit of a fudge, but+                -- it only affects profiling (hence the False)++        ; emit =<< fcode_init+        ; tickyReturnNewCon (length stg_args)+        ; emitReturn [idInfoToAmode idinfo] }++cgIdApp :: Id -> [StgArg] -> FCode ReturnKind+cgIdApp fun_id args = do+    dflags         <- getDynFlags+    fun_info       <- getCgIdInfo fun_id+    self_loop_info <- getSelfLoop+    let fun_arg     = StgVarArg fun_id+        fun_name    = idName    fun_id+        fun         = idInfoToAmode fun_info+        lf_info     = cg_lf         fun_info+        n_args      = length args+        v_args      = length $ filter (isVoidTy . stgArgType) args+        node_points dflags = nodeMustPointToIt dflags lf_info+    case getCallMethod dflags fun_name fun_id lf_info n_args v_args (cg_loc fun_info) self_loop_info of+            -- A value in WHNF, so we can just return it.+        ReturnIt+          | isVoidTy (idType fun_id) -> emitReturn []+          | otherwise                -> emitReturn [fun]+          -- ToDo: does ReturnIt guarantee tagged?++        EnterIt -> ASSERT( null args )  -- Discarding arguments+                   emitEnter fun++        SlowCall -> do      -- A slow function call via the RTS apply routines+                { tickySlowCall lf_info args+                ; emitComment $ mkFastString "slowCall"+                ; slowCall fun args }++        -- A direct function call (possibly with some left-over arguments)+        DirectEntry lbl arity -> do+                { tickyDirectCall arity args+                ; if node_points dflags+                     then directCall NativeNodeCall   lbl arity (fun_arg:args)+                     else directCall NativeDirectCall lbl arity args }++        -- Let-no-escape call or self-recursive tail-call+        JumpToIt blk_id lne_regs -> do+          { adjustHpBackwards -- always do this before a tail-call+          ; cmm_args <- getNonVoidArgAmodes args+          ; emitMultiAssign lne_regs cmm_args+          ; emit (mkBranch blk_id)+          ; return AssignedDirectly }++-- Note [Self-recursive tail calls]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- Self-recursive tail calls can be optimized into a local jump in the same+-- way as let-no-escape bindings (see Note [What is a non-escaping let] in+-- stgSyn/CoreToStg.hs). Consider this:+--+-- foo.info:+--     a = R1  // calling convention+--     b = R2+--     goto L1+-- L1: ...+--     ...+-- ...+-- L2: R1 = x+--     R2 = y+--     call foo(R1,R2)+--+-- Instead of putting x and y into registers (or other locations required by the+-- calling convention) and performing a call we can put them into local+-- variables a and b and perform jump to L1:+--+-- foo.info:+--     a = R1+--     b = R2+--     goto L1+-- L1: ...+--     ...+-- ...+-- L2: a = x+--     b = y+--     goto L1+--+-- This can be done only when function is calling itself in a tail position+-- and only if the call passes number of parameters equal to function's arity.+-- Note that this cannot be performed if a function calls itself with a+-- continuation.+--+-- This in fact implements optimization known as "loopification". It was+-- described in "Low-level code optimizations in the Glasgow Haskell Compiler"+-- by Krzysztof Woś, though we use different approach. Krzysztof performed his+-- optimization at the Cmm level, whereas we perform ours during code generation+-- (Stg-to-Cmm pass) essentially making sure that optimized Cmm code is+-- generated in the first place.+--+-- Implementation is spread across a couple of places in the code:+--+--   * FCode monad stores additional information in its reader environment+--     (cgd_self_loop field). This information tells us which function can+--     tail call itself in an optimized way (it is the function currently+--     being compiled), what is the label of a loop header (L1 in example above)+--     and information about local registers in which we should arguments+--     before making a call (this would be a and b in example above).+--+--   * Whenever we are compiling a function, we set that information to reflect+--     the fact that function currently being compiled can be jumped to, instead+--     of called. This is done in closureCodyBody in GHC.StgToCmm.Bind.+--+--   * We also have to emit a label to which we will be jumping. We make sure+--     that the label is placed after a stack check but before the heap+--     check. The reason is that making a recursive tail-call does not increase+--     the stack so we only need to check once. But it may grow the heap, so we+--     have to repeat the heap check in every self-call. This is done in+--     do_checks in GHC.StgToCmm.Heap.+--+--   * When we begin compilation of another closure we remove the additional+--     information from the environment. This is done by forkClosureBody+--     in GHC.StgToCmm.Monad. Other functions that duplicate the environment -+--     forkLneBody, forkAlts, codeOnly - duplicate that information. In other+--     words, we only need to clean the environment of the self-loop information+--     when compiling right hand side of a closure (binding).+--+--   * When compiling a call (cgIdApp) we use getCallMethod to decide what kind+--     of call will be generated. getCallMethod decides to generate a self+--     recursive tail call when (a) environment stores information about+--     possible self tail-call; (b) that tail call is to a function currently+--     being compiled; (c) number of passed non-void arguments is equal to+--     function's arity. (d) loopification is turned on via -floopification+--     command-line option.+--+--   * Command line option to turn loopification on and off is implemented in+--     DynFlags.+--+--+-- Note [Void arguments in self-recursive tail calls]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- State# tokens can get in the way of the loopification optimization as seen in+-- #11372. Consider this:+--+-- foo :: [a]+--     -> (a -> State# s -> (# State s, Bool #))+--     -> State# s+--     -> (# State# s, Maybe a #)+-- foo [] f s = (# s, Nothing #)+-- foo (x:xs) f s = case f x s of+--      (# s', b #) -> case b of+--          True -> (# s', Just x #)+--          False -> foo xs f s'+--+-- We would like to compile the call to foo as a local jump instead of a call+-- (see Note [Self-recursive tail calls]). However, the generated function has+-- an arity of 2 while we apply it to 3 arguments, one of them being of void+-- type. Thus, we mustn't count arguments of void type when checking whether+-- we can turn a call into a self-recursive jump.+--++emitEnter :: CmmExpr -> FCode ReturnKind+emitEnter fun = do+  { dflags <- getDynFlags+  ; adjustHpBackwards+  ; sequel <- getSequel+  ; updfr_off <- getUpdFrameOff+  ; case sequel of+      -- For a return, we have the option of generating a tag-test or+      -- not.  If the value is tagged, we can return directly, which+      -- is quicker than entering the value.  This is a code+      -- size/speed trade-off: when optimising for speed rather than+      -- size we could generate the tag test.+      --+      -- Right now, we do what the old codegen did, and omit the tag+      -- test, just generating an enter.+      Return -> do+        { let entry = entryCode dflags $ closureInfoPtr dflags $ CmmReg nodeReg+        ; emit $ mkJump dflags NativeNodeCall entry+                        [cmmUntag dflags fun] updfr_off+        ; return AssignedDirectly+        }++      -- The result will be scrutinised in the sequel.  This is where+      -- we generate a tag-test to avoid entering the closure if+      -- possible.+      --+      -- The generated code will be something like this:+      --+      --    R1 = fun  -- copyout+      --    if (fun & 7 != 0) goto Lret else goto Lcall+      --  Lcall:+      --    call [fun] returns to Lret+      --  Lret:+      --    fun' = R1  -- copyin+      --    ...+      --+      -- Note in particular that the label Lret is used as a+      -- destination by both the tag-test and the call.  This is+      -- because Lret will necessarily be a proc-point, and we want to+      -- ensure that we generate only one proc-point for this+      -- sequence.+      --+      -- Furthermore, we tell the caller that we generated a native+      -- return continuation by returning (ReturnedTo Lret off), so+      -- that the continuation can be reused by the heap-check failure+      -- code in the enclosing case expression.+      --+      AssignTo res_regs _ -> do+       { lret <- newBlockId+       ; let (off, _, copyin) = copyInOflow dflags NativeReturn (Young lret) res_regs []+       ; lcall <- newBlockId+       ; updfr_off <- getUpdFrameOff+       ; let area = Young lret+       ; let (outArgs, regs, copyout) = copyOutOflow dflags NativeNodeCall Call area+                                          [fun] updfr_off []+         -- refer to fun via nodeReg after the copyout, to avoid having+         -- both live simultaneously; this sometimes enables fun to be+         -- inlined in the RHS of the R1 assignment.+       ; let entry = entryCode dflags (closureInfoPtr dflags (CmmReg nodeReg))+             the_call = toCall entry (Just lret) updfr_off off outArgs regs+       ; tscope <- getTickScope+       ; emit $+           copyout <*>+           mkCbranch (cmmIsTagged dflags (CmmReg nodeReg))+                     lret lcall Nothing <*>+           outOfLine lcall (the_call,tscope) <*>+           mkLabel lret tscope <*>+           copyin+       ; return (ReturnedTo lret off)+       }+  }++------------------------------------------------------------------------+--              Ticks+------------------------------------------------------------------------++-- | Generate Cmm code for a tick. Depending on the type of Tickish,+-- this will either generate actual Cmm instrumentation code, or+-- simply pass on the annotation as a @CmmTickish@.+cgTick :: Tickish Id -> FCode ()+cgTick tick+  = do { dflags <- getDynFlags+       ; case tick of+           ProfNote   cc t p -> emitSetCCC cc t p+           HpcTick    m n    -> emit (mkTickBox dflags m n)+           SourceNote s n    -> emitTick $ SourceNote s n+           _other            -> return () -- ignore+       }
+ GHC/StgToCmm/ExtCode.hs view
@@ -0,0 +1,252 @@+{-# LANGUAGE DeriveFunctor #-}+-- | Our extended FCode monad.++-- We add a mapping from names to CmmExpr, to support local variable names in+-- the concrete C-- code.  The unique supply of the underlying FCode monad+-- is used to grab a new unique for each local variable.++-- In C--, a local variable can be declared anywhere within a proc,+-- and it scopes from the beginning of the proc to the end.  Hence, we have+-- to collect declarations as we parse the proc, and feed the environment+-- back in circularly (to avoid a two-pass algorithm).++module GHC.StgToCmm.ExtCode (+        CmmParse, unEC,+        Named(..), Env,++        loopDecls,+        getEnv,++        withName,+        getName,++        newLocal,+        newLabel,+        newBlockId,+        newFunctionName,+        newImport,+        lookupLabel,+        lookupName,++        code,+        emit, emitLabel, emitAssign, emitStore,+        getCode, getCodeR, getCodeScoped,+        emitOutOfLine,+        withUpdFrameOff, getUpdFrameOff+)++where++import GhcPrelude++import qualified GHC.StgToCmm.Monad as F+import GHC.StgToCmm.Monad (FCode, newUnique)++import Cmm+import CLabel+import MkGraph++import BlockId+import DynFlags+import FastString+import Module+import UniqFM+import Unique+import UniqSupply++import Control.Monad (ap)++-- | The environment contains variable definitions or blockids.+data Named+        = VarN CmmExpr          -- ^ Holds CmmLit(CmmLabel ..) which gives the label type,+                                --      eg, RtsLabel, ForeignLabel, CmmLabel etc.++        | FunN   UnitId      -- ^ A function name from this package+        | LabelN BlockId                -- ^ A blockid of some code or data.++-- | An environment of named things.+type Env        = UniqFM Named++-- | Local declarations that are in scope during code generation.+type Decls      = [(FastString,Named)]++-- | Does a computation in the FCode monad, with a current environment+--      and a list of local declarations. Returns the resulting list of declarations.+newtype CmmParse a+        = EC { unEC :: String -> Env -> Decls -> FCode (Decls, a) }+    deriving (Functor)++type ExtCode = CmmParse ()++returnExtFC :: a -> CmmParse a+returnExtFC a   = EC $ \_ _ s -> return (s, a)++thenExtFC :: CmmParse a -> (a -> CmmParse b) -> CmmParse b+thenExtFC (EC m) k = EC $ \c e s -> do (s',r) <- m c e s; unEC (k r) c e s'++instance Applicative CmmParse where+      pure = returnExtFC+      (<*>) = ap++instance Monad CmmParse where+  (>>=) = thenExtFC++instance MonadUnique CmmParse where+  getUniqueSupplyM = code getUniqueSupplyM+  getUniqueM = EC $ \_ _ decls -> do+    u <- getUniqueM+    return (decls, u)++instance HasDynFlags CmmParse where+    getDynFlags = EC (\_ _ d -> do dflags <- getDynFlags+                                   return (d, dflags))+++-- | Takes the variable decarations and imports from the monad+--      and makes an environment, which is looped back into the computation.+--      In this way, we can have embedded declarations that scope over the whole+--      procedure, and imports that scope over the entire module.+--      Discards the local declaration contained within decl'+--+loopDecls :: CmmParse a -> CmmParse a+loopDecls (EC fcode) =+      EC $ \c e globalDecls -> do+        (_, a) <- F.fixC $ \ ~(decls, _) ->+          fcode c (addListToUFM e decls) globalDecls+        return (globalDecls, a)+++-- | Get the current environment from the monad.+getEnv :: CmmParse Env+getEnv  = EC $ \_ e s -> return (s, e)++-- | Get the current context name from the monad+getName :: CmmParse String+getName  = EC $ \c _ s -> return (s, c)++-- | Set context name for a sub-parse+withName :: String -> CmmParse a -> CmmParse a+withName c' (EC fcode) = EC $ \_ e s -> fcode c' e s++addDecl :: FastString -> Named -> ExtCode+addDecl name named = EC $ \_ _ s -> return ((name, named) : s, ())+++-- | Add a new variable to the list of local declarations.+--      The CmmExpr says where the value is stored.+addVarDecl :: FastString -> CmmExpr -> ExtCode+addVarDecl var expr = addDecl var (VarN expr)++-- | Add a new label to the list of local declarations.+addLabel :: FastString -> BlockId -> ExtCode+addLabel name block_id = addDecl name (LabelN block_id)+++-- | Create a fresh local variable of a given type.+newLocal+        :: CmmType              -- ^ data type+        -> FastString           -- ^ name of variable+        -> CmmParse LocalReg    -- ^ register holding the value++newLocal ty name = do+   u <- code newUnique+   let reg = LocalReg u ty+   addVarDecl name (CmmReg (CmmLocal reg))+   return reg+++-- | Allocate a fresh label.+newLabel :: FastString -> CmmParse BlockId+newLabel name = do+   u <- code newUnique+   addLabel name (mkBlockId u)+   return (mkBlockId u)++-- | Add add a local function to the environment.+newFunctionName+        :: FastString   -- ^ name of the function+        -> UnitId    -- ^ package of the current module+        -> ExtCode++newFunctionName name pkg = addDecl name (FunN pkg)+++-- | Add an imported foreign label to the list of local declarations.+--      If this is done at the start of the module the declaration will scope+--      over the whole module.+newImport+        :: (FastString, CLabel)+        -> CmmParse ()++newImport (name, cmmLabel)+   = addVarDecl name (CmmLit (CmmLabel cmmLabel))+++-- | Lookup the BlockId bound to the label with this name.+--      If one hasn't been bound yet, create a fresh one based on the+--      Unique of the name.+lookupLabel :: FastString -> CmmParse BlockId+lookupLabel name = do+  env <- getEnv+  return $+     case lookupUFM env name of+        Just (LabelN l) -> l+        _other          -> mkBlockId (newTagUnique (getUnique name) 'L')+++-- | Lookup the location of a named variable.+--      Unknown names are treated as if they had been 'import'ed from the runtime system.+--      This saves us a lot of bother in the RTS sources, at the expense of+--      deferring some errors to link time.+lookupName :: FastString -> CmmParse CmmExpr+lookupName name = do+  env    <- getEnv+  return $+     case lookupUFM env name of+        Just (VarN e)   -> e+        Just (FunN pkg) -> CmmLit (CmmLabel (mkCmmCodeLabel pkg          name))+        _other          -> CmmLit (CmmLabel (mkCmmCodeLabel rtsUnitId name))+++-- | Lift an FCode computation into the CmmParse monad+code :: FCode a -> CmmParse a+code fc = EC $ \_ _ s -> do+                r <- fc+                return (s, r)++emit :: CmmAGraph -> CmmParse ()+emit = code . F.emit++emitLabel :: BlockId -> CmmParse ()+emitLabel = code . F.emitLabel++emitAssign :: CmmReg  -> CmmExpr -> CmmParse ()+emitAssign l r = code (F.emitAssign l r)++emitStore :: CmmExpr  -> CmmExpr -> CmmParse ()+emitStore l r = code (F.emitStore l r)++getCode :: CmmParse a -> CmmParse CmmAGraph+getCode (EC ec) = EC $ \c e s -> do+  ((s',_), gr) <- F.getCodeR (ec c e s)+  return (s', gr)++getCodeR :: CmmParse a -> CmmParse (a, CmmAGraph)+getCodeR (EC ec) = EC $ \c e s -> do+  ((s', r), gr) <- F.getCodeR (ec c e s)+  return (s', (r,gr))++getCodeScoped :: CmmParse a -> CmmParse (a, CmmAGraphScoped)+getCodeScoped (EC ec) = EC $ \c e s -> do+  ((s', r), gr) <- F.getCodeScoped (ec c e s)+  return (s', (r,gr))++emitOutOfLine :: BlockId -> CmmAGraphScoped -> CmmParse ()+emitOutOfLine l g = code (F.emitOutOfLine l g)++withUpdFrameOff :: UpdFrameOffset -> CmmParse () -> CmmParse ()+withUpdFrameOff size inner+  = EC $ \c e s -> F.withUpdFrameOff size $ (unEC inner) c e s++getUpdFrameOff :: CmmParse UpdFrameOffset+getUpdFrameOff = code $ F.getUpdFrameOff
+ GHC/StgToCmm/Foreign.hs view
@@ -0,0 +1,627 @@+-----------------------------------------------------------------------------+--+-- Code generation for foreign calls.+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Foreign (+  cgForeignCall,+  emitPrimCall, emitCCall,+  emitForeignCall,     -- For CmmParse+  emitSaveThreadState,+  saveThreadState,+  emitLoadThreadState,+  loadThreadState,+  emitOpenNursery,+  emitCloseNursery,+ ) where++import GhcPrelude hiding( succ, (<*>) )++import StgSyn+import GHC.StgToCmm.Prof (storeCurCCS, ccsType)+import GHC.StgToCmm.Env+import GHC.StgToCmm.Monad+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Closure+import GHC.StgToCmm.Layout++import BlockId (newBlockId)+import Cmm+import CmmUtils+import MkGraph+import Type+import RepType+import CLabel+import SMRep+import ForeignCall+import DynFlags+import Maybes+import Outputable+import UniqSupply+import BasicTypes++import TyCoRep+import TysPrim+import Util (zipEqual)++import Control.Monad++-----------------------------------------------------------------------------+-- Code generation for Foreign Calls+-----------------------------------------------------------------------------++-- | Emit code for a foreign call, and return the results to the sequel.+-- Precondition: the length of the arguments list is the same as the+-- arity of the foreign function.+cgForeignCall :: ForeignCall            -- the op+              -> Type                   -- type of foreign function+              -> [StgArg]               -- x,y    arguments+              -> Type                   -- result type+              -> FCode ReturnKind++cgForeignCall (CCall (CCallSpec target cconv safety)) typ stg_args res_ty+  = do  { dflags <- getDynFlags+        ; let -- in the stdcall calling convention, the symbol needs @size appended+              -- to it, where size is the total number of bytes of arguments.  We+              -- attach this info to the CLabel here, and the CLabel pretty printer+              -- will generate the suffix when the label is printed.+            call_size args+              | StdCallConv <- cconv = Just (sum (map arg_size args))+              | otherwise            = Nothing++              -- ToDo: this might not be correct for 64-bit API+            arg_size (arg, _) = max (widthInBytes $ typeWidth $ cmmExprType dflags arg)+                                     (wORD_SIZE dflags)+        ; cmm_args <- getFCallArgs stg_args typ+        ; (res_regs, res_hints) <- newUnboxedTupleRegs res_ty+        ; let ((call_args, arg_hints), cmm_target)+                = case target of+                   StaticTarget _ _   _      False ->+                       panic "cgForeignCall: unexpected FFI value import"+                   StaticTarget _ lbl mPkgId True+                     -> let labelSource+                                = case mPkgId of+                                        Nothing         -> ForeignLabelInThisPackage+                                        Just pkgId      -> ForeignLabelInPackage pkgId+                            size = call_size cmm_args+                        in  ( unzip cmm_args+                            , CmmLit (CmmLabel+                                        (mkForeignLabel lbl size labelSource IsFunction)))++                   DynamicTarget    ->  case cmm_args of+                                           (fn,_):rest -> (unzip rest, fn)+                                           [] -> panic "cgForeignCall []"+              fc = ForeignConvention cconv arg_hints res_hints CmmMayReturn+              call_target = ForeignTarget cmm_target fc++        -- we want to emit code for the call, and then emitReturn.+        -- However, if the sequel is AssignTo, we shortcut a little+        -- and generate a foreign call that assigns the results+        -- directly.  Otherwise we end up generating a bunch of+        -- useless "r = r" assignments, which are not merely annoying:+        -- they prevent the common block elimination from working correctly+        -- in the case of a safe foreign call.+        -- See Note [safe foreign call convention]+        --+        ; sequel <- getSequel+        ; case sequel of+            AssignTo assign_to_these _ ->+                emitForeignCall safety assign_to_these call_target call_args++            _something_else ->+                do { _ <- emitForeignCall safety res_regs call_target call_args+                   ; emitReturn (map (CmmReg . CmmLocal) res_regs)+                   }+         }++{- Note [safe foreign call convention]++The simple thing to do for a safe foreign call would be the same as an+unsafe one: just++    emitForeignCall ...+    emitReturn ...++but consider what happens in this case++   case foo x y z of+     (# s, r #) -> ...++The sequel is AssignTo [r].  The call to newUnboxedTupleRegs picks [r]+as the result reg, and we generate++  r = foo(x,y,z) returns to L1  -- emitForeignCall+ L1:+  r = r  -- emitReturn+  goto L2+L2:+  ...++Now L1 is a proc point (by definition, it is the continuation of the+safe foreign call).  If L2 does a heap check, then L2 will also be a+proc point.++Furthermore, the stack layout algorithm has to arrange to save r+somewhere between the call and the jump to L1, which is annoying: we+would have to treat r differently from the other live variables, which+have to be saved *before* the call.++So we adopt a special convention for safe foreign calls: the results+are copied out according to the NativeReturn convention by the call,+and the continuation of the call should copyIn the results.  (The+copyOut code is actually inserted when the safe foreign call is+lowered later).  The result regs attached to the safe foreign call are+only used temporarily to hold the results before they are copied out.++We will now generate this:++  r = foo(x,y,z) returns to L1+ L1:+  r = R1  -- copyIn, inserted by mkSafeCall+  goto L2+ L2:+  ... r ...++And when the safe foreign call is lowered later (see Note [lower safe+foreign calls]) we get this:++  suspendThread()+  r = foo(x,y,z)+  resumeThread()+  R1 = r  -- copyOut, inserted by lowerSafeForeignCall+  jump L1+ L1:+  r = R1  -- copyIn, inserted by mkSafeCall+  goto L2+ L2:+  ... r ...++Now consider what happens if L2 does a heap check: the Adams+optimisation kicks in and commons up L1 with the heap-check+continuation, resulting in just one proc point instead of two. Yay!+-}+++emitCCall :: [(CmmFormal,ForeignHint)]+          -> CmmExpr+          -> [(CmmActual,ForeignHint)]+          -> FCode ()+emitCCall hinted_results fn hinted_args+  = void $ emitForeignCall PlayRisky results target args+  where+    (args, arg_hints) = unzip hinted_args+    (results, result_hints) = unzip hinted_results+    target = ForeignTarget fn fc+    fc = ForeignConvention CCallConv arg_hints result_hints CmmMayReturn+++emitPrimCall :: [CmmFormal] -> CallishMachOp -> [CmmActual] -> FCode ()+emitPrimCall res op args+  = void $ emitForeignCall PlayRisky res (PrimTarget op) args++-- alternative entry point, used by CmmParse+emitForeignCall+        :: Safety+        -> [CmmFormal]          -- where to put the results+        -> ForeignTarget        -- the op+        -> [CmmActual]          -- arguments+        -> FCode ReturnKind+emitForeignCall safety results target args+  | not (playSafe safety) = do+    dflags <- getDynFlags+    let (caller_save, caller_load) = callerSaveVolatileRegs dflags+    emit caller_save+    target' <- load_target_into_temp target+    args' <- mapM maybe_assign_temp args+    emit $ mkUnsafeCall target' results args'+    emit caller_load+    return AssignedDirectly++  | otherwise = do+    dflags <- getDynFlags+    updfr_off <- getUpdFrameOff+    target' <- load_target_into_temp target+    args' <- mapM maybe_assign_temp args+    k <- newBlockId+    let (off, _, copyout) = copyInOflow dflags NativeReturn (Young k) results []+       -- see Note [safe foreign call convention]+    tscope <- getTickScope+    emit $+           (    mkStore (CmmStackSlot (Young k) (widthInBytes (wordWidth dflags)))+                        (CmmLit (CmmBlock k))+            <*> mkLast (CmmForeignCall { tgt  = target'+                                       , res  = results+                                       , args = args'+                                       , succ = k+                                       , ret_args = off+                                       , ret_off = updfr_off+                                       , intrbl = playInterruptible safety })+            <*> mkLabel k tscope+            <*> copyout+           )+    return (ReturnedTo k off)++load_target_into_temp :: ForeignTarget -> FCode ForeignTarget+load_target_into_temp (ForeignTarget expr conv) = do+  tmp <- maybe_assign_temp expr+  return (ForeignTarget tmp conv)+load_target_into_temp other_target@(PrimTarget _) =+  return other_target++-- What we want to do here is create a new temporary for the foreign+-- call argument if it is not safe to use the expression directly,+-- because the expression mentions caller-saves GlobalRegs (see+-- Note [Register Parameter Passing]).+--+-- However, we can't pattern-match on the expression here, because+-- this is used in a loop by CmmParse, and testing the expression+-- results in a black hole.  So we always create a temporary, and rely+-- on CmmSink to clean it up later.  (Yuck, ToDo).  The generated code+-- ends up being the same, at least for the RTS .cmm code.+--+maybe_assign_temp :: CmmExpr -> FCode CmmExpr+maybe_assign_temp e = do+  dflags <- getDynFlags+  reg <- newTemp (cmmExprType dflags e)+  emitAssign (CmmLocal reg) e+  return (CmmReg (CmmLocal reg))++-- -----------------------------------------------------------------------------+-- Save/restore the thread state in the TSO++-- This stuff can't be done in suspendThread/resumeThread, because it+-- refers to global registers which aren't available in the C world.++emitSaveThreadState :: FCode ()+emitSaveThreadState = do+  dflags <- getDynFlags+  code <- saveThreadState dflags+  emit code++-- | Produce code to save the current thread state to @CurrentTSO@+saveThreadState :: MonadUnique m => DynFlags -> m CmmAGraph+saveThreadState dflags = do+  tso <- newTemp (gcWord dflags)+  close_nursery <- closeNursery dflags tso+  pure $ catAGraphs [+    -- tso = CurrentTSO;+    mkAssign (CmmLocal tso) currentTSOExpr,+    -- tso->stackobj->sp = Sp;+    mkStore (cmmOffset dflags+                       (CmmLoad (cmmOffset dflags+                                           (CmmReg (CmmLocal tso))+                                           (tso_stackobj dflags))+                                (bWord dflags))+                       (stack_SP dflags))+            spExpr,+    close_nursery,+    -- and save the current cost centre stack in the TSO when profiling:+    if gopt Opt_SccProfilingOn dflags then+        mkStore (cmmOffset dflags (CmmReg (CmmLocal tso)) (tso_CCCS dflags)) cccsExpr+      else mkNop+    ]++emitCloseNursery :: FCode ()+emitCloseNursery = do+  dflags <- getDynFlags+  tso <- newTemp (bWord dflags)+  code <- closeNursery dflags tso+  emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code++{- |+@closeNursery dflags tso@ produces code to close the nursery.+A local register holding the value of @CurrentTSO@ is expected for+efficiency.++Closing the nursery corresponds to the following code:++@+  tso = CurrentTSO;+  cn = CurrentNuresry;++  // Update the allocation limit for the current thread.  We don't+  // check to see whether it has overflowed at this point, that check is+  // made when we run out of space in the current heap block (stg_gc_noregs)+  // and in the scheduler when context switching (schedulePostRunThread).+  tso->alloc_limit -= Hp + WDS(1) - cn->start;++  // Set cn->free to the next unoccupied word in the block+  cn->free = Hp + WDS(1);+@+-}+closeNursery :: MonadUnique m => DynFlags -> LocalReg -> m CmmAGraph+closeNursery df tso = do+  let tsoreg  = CmmLocal tso+  cnreg      <- CmmLocal <$> newTemp (bWord df)+  pure $ catAGraphs [+    mkAssign cnreg currentNurseryExpr,++    -- CurrentNursery->free = Hp+1;+    mkStore (nursery_bdescr_free df cnreg) (cmmOffsetW df hpExpr 1),++    let alloc =+           CmmMachOp (mo_wordSub df)+              [ cmmOffsetW df hpExpr 1+              , CmmLoad (nursery_bdescr_start df cnreg) (bWord df)+              ]++        alloc_limit = cmmOffset df (CmmReg tsoreg) (tso_alloc_limit df)+    in++    -- tso->alloc_limit += alloc+    mkStore alloc_limit (CmmMachOp (MO_Sub W64)+                               [ CmmLoad alloc_limit b64+                               , CmmMachOp (mo_WordTo64 df) [alloc] ])+   ]++emitLoadThreadState :: FCode ()+emitLoadThreadState = do+  dflags <- getDynFlags+  code <- loadThreadState dflags+  emit code++-- | Produce code to load the current thread state from @CurrentTSO@+loadThreadState :: MonadUnique m => DynFlags -> m CmmAGraph+loadThreadState dflags = do+  tso <- newTemp (gcWord dflags)+  stack <- newTemp (gcWord dflags)+  open_nursery <- openNursery dflags tso+  pure $ catAGraphs [+    -- tso = CurrentTSO;+    mkAssign (CmmLocal tso) currentTSOExpr,+    -- stack = tso->stackobj;+    mkAssign (CmmLocal stack) (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal tso)) (tso_stackobj dflags)) (bWord dflags)),+    -- Sp = stack->sp;+    mkAssign spReg (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal stack)) (stack_SP dflags)) (bWord dflags)),+    -- SpLim = stack->stack + RESERVED_STACK_WORDS;+    mkAssign spLimReg (cmmOffsetW dflags (cmmOffset dflags (CmmReg (CmmLocal stack)) (stack_STACK dflags))+                                (rESERVED_STACK_WORDS dflags)),+    -- HpAlloc = 0;+    --   HpAlloc is assumed to be set to non-zero only by a failed+    --   a heap check, see HeapStackCheck.cmm:GC_GENERIC+    mkAssign hpAllocReg (zeroExpr dflags),+    open_nursery,+    -- and load the current cost centre stack from the TSO when profiling:+    if gopt Opt_SccProfilingOn dflags+       then storeCurCCS+              (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal tso))+                 (tso_CCCS dflags)) (ccsType dflags))+       else mkNop+   ]+++emitOpenNursery :: FCode ()+emitOpenNursery = do+  dflags <- getDynFlags+  tso <- newTemp (bWord dflags)+  code <- openNursery dflags tso+  emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code++{- |+@openNursery dflags tso@ produces code to open the nursery. A local register+holding the value of @CurrentTSO@ is expected for efficiency.++Opening the nursery corresponds to the following code:++@+   tso = CurrentTSO;+   cn = CurrentNursery;+   bdfree = CurrentNursery->free;+   bdstart = CurrentNursery->start;++   // We *add* the currently occupied portion of the nursery block to+   // the allocation limit, because we will subtract it again in+   // closeNursery.+   tso->alloc_limit += bdfree - bdstart;++   // Set Hp to the last occupied word of the heap block.  Why not the+   // next unocupied word?  Doing it this way means that we get to use+   // an offset of zero more often, which might lead to slightly smaller+   // code on some architectures.+   Hp = bdfree - WDS(1);++   // Set HpLim to the end of the current nursery block (note that this block+   // might be a block group, consisting of several adjacent blocks.+   HpLim = bdstart + CurrentNursery->blocks*BLOCK_SIZE_W - 1;+@+-}+openNursery :: MonadUnique m => DynFlags -> LocalReg -> m CmmAGraph+openNursery df tso = do+  let tsoreg =  CmmLocal tso+  cnreg      <- CmmLocal <$> newTemp (bWord df)+  bdfreereg  <- CmmLocal <$> newTemp (bWord df)+  bdstartreg <- CmmLocal <$> newTemp (bWord df)++  -- These assignments are carefully ordered to reduce register+  -- pressure and generate not completely awful code on x86.  To see+  -- what code we generate, look at the assembly for+  -- stg_returnToStackTop in rts/StgStartup.cmm.+  pure $ catAGraphs [+     mkAssign cnreg currentNurseryExpr,+     mkAssign bdfreereg  (CmmLoad (nursery_bdescr_free df cnreg)  (bWord df)),++     -- Hp = CurrentNursery->free - 1;+     mkAssign hpReg (cmmOffsetW df (CmmReg bdfreereg) (-1)),++     mkAssign bdstartreg (CmmLoad (nursery_bdescr_start df cnreg) (bWord df)),++     -- HpLim = CurrentNursery->start ++     --              CurrentNursery->blocks*BLOCK_SIZE_W - 1;+     mkAssign hpLimReg+         (cmmOffsetExpr df+             (CmmReg bdstartreg)+             (cmmOffset df+               (CmmMachOp (mo_wordMul df) [+                 CmmMachOp (MO_SS_Conv W32 (wordWidth df))+                   [CmmLoad (nursery_bdescr_blocks df cnreg) b32],+                 mkIntExpr df (bLOCK_SIZE df)+                ])+               (-1)+             )+         ),++     -- alloc = bd->free - bd->start+     let alloc =+           CmmMachOp (mo_wordSub df) [CmmReg bdfreereg, CmmReg bdstartreg]++         alloc_limit = cmmOffset df (CmmReg tsoreg) (tso_alloc_limit df)+     in++     -- tso->alloc_limit += alloc+     mkStore alloc_limit (CmmMachOp (MO_Add W64)+                               [ CmmLoad alloc_limit b64+                               , CmmMachOp (mo_WordTo64 df) [alloc] ])++   ]++nursery_bdescr_free, nursery_bdescr_start, nursery_bdescr_blocks+  :: DynFlags -> CmmReg -> CmmExpr+nursery_bdescr_free   dflags cn =+  cmmOffset dflags (CmmReg cn) (oFFSET_bdescr_free dflags)+nursery_bdescr_start  dflags cn =+  cmmOffset dflags (CmmReg cn) (oFFSET_bdescr_start dflags)+nursery_bdescr_blocks dflags cn =+  cmmOffset dflags (CmmReg cn) (oFFSET_bdescr_blocks dflags)++tso_stackobj, tso_CCCS, tso_alloc_limit, stack_STACK, stack_SP :: DynFlags -> ByteOff+tso_stackobj dflags = closureField dflags (oFFSET_StgTSO_stackobj dflags)+tso_alloc_limit dflags = closureField dflags (oFFSET_StgTSO_alloc_limit dflags)+tso_CCCS     dflags = closureField dflags (oFFSET_StgTSO_cccs dflags)+stack_STACK  dflags = closureField dflags (oFFSET_StgStack_stack dflags)+stack_SP     dflags = closureField dflags (oFFSET_StgStack_sp dflags)+++closureField :: DynFlags -> ByteOff -> ByteOff+closureField dflags off = off + fixedHdrSize dflags++-- Note [Unlifted boxed arguments to foreign calls]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- For certain types passed to foreign calls, we adjust the actual+-- value passed to the call.  For ByteArray#, Array#, SmallArray#,+-- and ArrayArray#, we pass the address of the array's payload, not+-- the address of the heap object. For example, consider+--   foreign import "c_foo" foo :: ByteArray# -> Int# -> IO ()+-- At a Haskell call like `foo x y`, we'll generate a C call that+-- is more like+--   c_foo( x+8, y )+-- where the "+8" takes the heap pointer (x :: ByteArray#) and moves+-- it past the header words of the ByteArray object to point directly+-- to the data inside the ByteArray#. (The exact offset depends+-- on the target architecture and on profiling) By contrast, (y :: Int#)+-- requires no such adjustment.+--+-- This adjustment is performed by 'add_shim'. The size of the+-- adjustment depends on the type of heap object. But+-- how can we determine that type? There are two available options.+-- We could use the types of the actual values that the foreign call+-- has been applied to, or we could use the types present in the+-- foreign function's type. Prior to GHC 8.10, we used the former+-- strategy since it's a little more simple. However, in issue #16650+-- and more compellingly in the comments of+-- https://gitlab.haskell.org/ghc/ghc/merge_requests/939, it was+-- demonstrated that this leads to bad behavior in the presence+-- of unsafeCoerce#. Returning to the above example, suppose the+-- Haskell call looked like+--   foo (unsafeCoerce# p)+-- where the types of expressions comprising the arguments are+--   p :: (Any :: TYPE 'UnliftedRep)+--   i :: Int#+-- so that the unsafe-coerce is between Any and ByteArray#.+-- These two types have the same kind (they are both represented by+-- a heap pointer) so no GC errors will occur if we do this unsafe coerce.+-- By the time this gets to the code generator the cast has been+-- discarded so we have+--   foo p y+-- But we *must* adjust the pointer to p by a ByteArray# shim,+-- *not* by an Any shim (the Any shim involves no offset at all).+--+-- To avoid this bad behavior, we adopt the second strategy: use+-- the types present in the foreign function's type.+-- In collectStgFArgTypes, we convert the foreign function's+-- type to a list of StgFArgType. Then, in add_shim, we interpret+-- these as numeric offsets.++getFCallArgs ::+     [StgArg]+  -> Type -- the type of the foreign function+  -> FCode [(CmmExpr, ForeignHint)]+-- (a) Drop void args+-- (b) Add foreign-call shim code+-- It's (b) that makes this differ from getNonVoidArgAmodes+-- Precondition: args and typs have the same length+-- See Note [Unlifted boxed arguments to foreign calls]+getFCallArgs args typ+  = do  { mb_cmms <- mapM get (zipEqual "getFCallArgs" args (collectStgFArgTypes typ))+        ; return (catMaybes mb_cmms) }+  where+    get (arg,typ)+      | null arg_reps+      = return Nothing+      | otherwise+      = do { cmm <- getArgAmode (NonVoid arg)+           ; dflags <- getDynFlags+           ; return (Just (add_shim dflags typ cmm, hint)) }+      where+        arg_ty   = stgArgType arg+        arg_reps = typePrimRep arg_ty+        hint     = typeForeignHint arg_ty++-- The minimum amount of information needed to determine+-- the offset to apply to an argument to a foreign call.+-- See Note [Unlifted boxed arguments to foreign calls]+data StgFArgType+  = StgPlainType+  | StgArrayType+  | StgSmallArrayType+  | StgByteArrayType++-- See Note [Unlifted boxed arguments to foreign calls]+add_shim :: DynFlags -> StgFArgType -> CmmExpr -> CmmExpr+add_shim dflags ty expr = case ty of+  StgPlainType -> expr+  StgArrayType -> cmmOffsetB dflags expr (arrPtrsHdrSize dflags)+  StgSmallArrayType -> cmmOffsetB dflags expr (smallArrPtrsHdrSize dflags)+  StgByteArrayType -> cmmOffsetB dflags expr (arrWordsHdrSize dflags)++-- From a function, extract information needed to determine+-- the offset of each argument when used as a C FFI argument.+-- See Note [Unlifted boxed arguments to foreign calls]+collectStgFArgTypes :: Type -> [StgFArgType]+collectStgFArgTypes = go []+  where+    -- Skip foralls+    go bs (ForAllTy _ res) = go bs res+    go bs (AppTy{}) = reverse bs+    go bs (TyConApp{}) = reverse bs+    go bs (LitTy{}) = reverse bs+    go bs (TyVarTy{}) = reverse bs+    go  _ (CastTy{}) = panic "myCollectTypeArgs: CastTy"+    go  _ (CoercionTy{}) = panic "myCollectTypeArgs: CoercionTy"+    go bs (FunTy {ft_arg = arg, ft_res=res}) =+      go (typeToStgFArgType arg:bs) res++-- Choose the offset based on the type. For anything other+-- than an unlifted boxed type, there is no offset.+-- See Note [Unlifted boxed arguments to foreign calls]+typeToStgFArgType :: Type -> StgFArgType+typeToStgFArgType typ+  | tycon == arrayPrimTyCon = StgArrayType+  | tycon == mutableArrayPrimTyCon = StgArrayType+  | tycon == arrayArrayPrimTyCon = StgArrayType+  | tycon == mutableArrayArrayPrimTyCon = StgArrayType+  | tycon == smallArrayPrimTyCon = StgSmallArrayType+  | tycon == smallMutableArrayPrimTyCon = StgSmallArrayType+  | tycon == byteArrayPrimTyCon = StgByteArrayType+  | tycon == mutableByteArrayPrimTyCon = StgByteArrayType+  | otherwise = StgPlainType+  where+  -- Should be a tycon app, since this is a foreign call. We look+  -- through newtypes so the offset does not change if a user replaces+  -- a type in a foreign function signature with a representationally+  -- equivalent newtype.+  tycon = tyConAppTyCon (unwrapType typ)+
+ GHC/StgToCmm/Heap.hs view
@@ -0,0 +1,680 @@+-----------------------------------------------------------------------------+--+-- Stg to C--: heap management functions+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Heap (+        getVirtHp, setVirtHp, setRealHp,+        getHpRelOffset,++        entryHeapCheck, altHeapCheck, noEscapeHeapCheck, altHeapCheckReturnsTo,+        heapStackCheckGen,+        entryHeapCheck',++        mkStaticClosureFields, mkStaticClosure,++        allocDynClosure, allocDynClosureCmm, allocHeapClosure,+        emitSetDynHdr+    ) where++import GhcPrelude hiding ((<*>))++import StgSyn+import CLabel+import GHC.StgToCmm.Layout+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Monad+import GHC.StgToCmm.Prof (profDynAlloc, dynProfHdr, staticProfHdr)+import GHC.StgToCmm.Ticky+import GHC.StgToCmm.Closure+import GHC.StgToCmm.Env++import MkGraph++import Hoopl.Label+import SMRep+import BlockId+import Cmm+import CmmUtils+import CostCentre+import IdInfo( CafInfo(..), mayHaveCafRefs )+import Id ( Id )+import Module+import DynFlags+import FastString( mkFastString, fsLit )+import Panic( sorry )++import Control.Monad (when)+import Data.Maybe (isJust)++-----------------------------------------------------------+--              Initialise dynamic heap objects+-----------------------------------------------------------++allocDynClosure+        :: Maybe Id+        -> CmmInfoTable+        -> LambdaFormInfo+        -> CmmExpr              -- Cost Centre to stick in the object+        -> CmmExpr              -- Cost Centre to blame for this alloc+                                -- (usually the same; sometimes "OVERHEAD")++        -> [(NonVoid StgArg, VirtualHpOffset)]  -- Offsets from start of object+                                                -- ie Info ptr has offset zero.+                                                -- No void args in here+        -> FCode CmmExpr -- returns Hp+n++allocDynClosureCmm+        :: Maybe Id -> CmmInfoTable -> LambdaFormInfo -> CmmExpr -> CmmExpr+        -> [(CmmExpr, ByteOff)]+        -> FCode CmmExpr -- returns Hp+n++-- allocDynClosure allocates the thing in the heap,+-- and modifies the virtual Hp to account for this.+-- The second return value is the graph that sets the value of the+-- returned LocalReg, which should point to the closure after executing+-- the graph.++-- allocDynClosure returns an (Hp+8) CmmExpr, and hence the result is+-- only valid until Hp is changed.  The caller should assign the+-- result to a LocalReg if it is required to remain live.+--+-- The reason we don't assign it to a LocalReg here is that the caller+-- is often about to call regIdInfo, which immediately assigns the+-- result of allocDynClosure to a new temp in order to add the tag.+-- So by not generating a LocalReg here we avoid a common source of+-- new temporaries and save some compile time.  This can be quite+-- significant - see test T4801.+++allocDynClosure mb_id info_tbl lf_info use_cc _blame_cc args_w_offsets = do+  let (args, offsets) = unzip args_w_offsets+  cmm_args <- mapM getArgAmode args     -- No void args+  allocDynClosureCmm mb_id info_tbl lf_info+                     use_cc _blame_cc (zip cmm_args offsets)+++allocDynClosureCmm mb_id info_tbl lf_info use_cc _blame_cc amodes_w_offsets = do+  -- SAY WHAT WE ARE ABOUT TO DO+  let rep = cit_rep info_tbl+  tickyDynAlloc mb_id rep lf_info+  let info_ptr = CmmLit (CmmLabel (cit_lbl info_tbl))+  allocHeapClosure rep info_ptr use_cc amodes_w_offsets+++-- | Low-level heap object allocation.+allocHeapClosure+  :: SMRep                            -- ^ representation of the object+  -> CmmExpr                          -- ^ info pointer+  -> CmmExpr                          -- ^ cost centre+  -> [(CmmExpr,ByteOff)]              -- ^ payload+  -> FCode CmmExpr                    -- ^ returns the address of the object+allocHeapClosure rep info_ptr use_cc payload = do+  profDynAlloc rep use_cc++  virt_hp <- getVirtHp++  -- Find the offset of the info-ptr word+  let info_offset = virt_hp + 1+            -- info_offset is the VirtualHpOffset of the first+            -- word of the new object+            -- Remember, virtHp points to last allocated word,+            -- ie 1 *before* the info-ptr word of new object.++  base <- getHpRelOffset info_offset+  emitComment $ mkFastString "allocHeapClosure"+  emitSetDynHdr base info_ptr use_cc++  -- Fill in the fields+  hpStore base payload++  -- Bump the virtual heap pointer+  dflags <- getDynFlags+  setVirtHp (virt_hp + heapClosureSizeW dflags rep)++  return base+++emitSetDynHdr :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()+emitSetDynHdr base info_ptr ccs+  = do dflags <- getDynFlags+       hpStore base (zip (header dflags) [0, wORD_SIZE dflags ..])+  where+    header :: DynFlags -> [CmmExpr]+    header dflags = [info_ptr] ++ dynProfHdr dflags ccs+        -- ToDo: Parallel stuff+        -- No ticky header++-- Store the item (expr,off) in base[off]+hpStore :: CmmExpr -> [(CmmExpr, ByteOff)] -> FCode ()+hpStore base vals = do+  dflags <- getDynFlags+  sequence_ $+    [ emitStore (cmmOffsetB dflags base off) val | (val,off) <- vals ]++-----------------------------------------------------------+--              Layout of static closures+-----------------------------------------------------------++-- Make a static closure, adding on any extra padding needed for CAFs,+-- and adding a static link field if necessary.++mkStaticClosureFields+        :: DynFlags+        -> CmmInfoTable+        -> CostCentreStack+        -> CafInfo+        -> [CmmLit]             -- Payload+        -> [CmmLit]             -- The full closure+mkStaticClosureFields dflags info_tbl ccs caf_refs payload+  = mkStaticClosure dflags info_lbl ccs payload padding+        static_link_field saved_info_field+  where+    info_lbl = cit_lbl info_tbl++    -- CAFs must have consistent layout, regardless of whether they+    -- are actually updatable or not.  The layout of a CAF is:+    --+    --        3 saved_info+    --        2 static_link+    --        1 indirectee+    --        0 info ptr+    --+    -- the static_link and saved_info fields must always be in the+    -- same place.  So we use isThunkRep rather than closureUpdReqd+    -- here:++    is_caf = isThunkRep (cit_rep info_tbl)++    padding+        | is_caf && null payload = [mkIntCLit dflags 0]+        | otherwise = []++    static_link_field+        | is_caf || staticClosureNeedsLink (mayHaveCafRefs caf_refs) info_tbl+        = [static_link_value]+        | otherwise+        = []++    saved_info_field+        | is_caf     = [mkIntCLit dflags 0]+        | otherwise  = []++        -- For a static constructor which has NoCafRefs, we set the+        -- static link field to a non-zero value so the garbage+        -- collector will ignore it.+    static_link_value+        | mayHaveCafRefs caf_refs  = mkIntCLit dflags 0+        | otherwise                = mkIntCLit dflags 3  -- No CAF refs+                                      -- See Note [STATIC_LINK fields]+                                      -- in rts/sm/Storage.h++mkStaticClosure :: DynFlags -> CLabel -> CostCentreStack -> [CmmLit]+  -> [CmmLit] -> [CmmLit] -> [CmmLit] -> [CmmLit]+mkStaticClosure dflags info_lbl ccs payload padding static_link_field saved_info_field+  =  [CmmLabel info_lbl]+  ++ staticProfHdr dflags ccs+  ++ payload+  ++ padding+  ++ static_link_field+  ++ saved_info_field++-----------------------------------------------------------+--              Heap overflow checking+-----------------------------------------------------------++{- Note [Heap checks]+   ~~~~~~~~~~~~~~~~~~+Heap checks come in various forms.  We provide the following entry+points to the runtime system, all of which use the native C-- entry+convention.++  * gc() performs garbage collection and returns+    nothing to its caller++  * A series of canned entry points like+        r = gc_1p( r )+    where r is a pointer.  This performs gc, and+    then returns its argument r to its caller.++  * A series of canned entry points like+        gcfun_2p( f, x, y )+    where f is a function closure of arity 2+    This performs garbage collection, keeping alive the+    three argument ptrs, and then tail-calls f(x,y)++These are used in the following circumstances++* entryHeapCheck: Function entry+    (a) With a canned GC entry sequence+        f( f_clo, x:ptr, y:ptr ) {+             Hp = Hp+8+             if Hp > HpLim goto L+             ...+          L: HpAlloc = 8+             jump gcfun_2p( f_clo, x, y ) }+     Note the tail call to the garbage collector;+     it should do no register shuffling++    (b) No canned sequence+        f( f_clo, x:ptr, y:ptr, ...etc... ) {+          T: Hp = Hp+8+             if Hp > HpLim goto L+             ...+          L: HpAlloc = 8+             call gc()  -- Needs an info table+             goto T }++* altHeapCheck: Immediately following an eval+  Started as+        case f x y of r { (p,q) -> rhs }+  (a) With a canned sequence for the results of f+       (which is the very common case since+       all boxed cases return just one pointer+           ...+           r = f( x, y )+        K:      -- K needs an info table+           Hp = Hp+8+           if Hp > HpLim goto L+           ...code for rhs...++        L: r = gc_1p( r )+           goto K }++        Here, the info table needed by the call+        to gc_1p should be the *same* as the+        one for the call to f; the C-- optimiser+        spots this sharing opportunity)++   (b) No canned sequence for results of f+       Note second info table+           ...+           (r1,r2,r3) = call f( x, y )+        K:+           Hp = Hp+8+           if Hp > HpLim goto L+           ...code for rhs...++        L: call gc()    -- Extra info table here+           goto K++* generalHeapCheck: Anywhere else+  e.g. entry to thunk+       case branch *not* following eval,+       or let-no-escape+  Exactly the same as the previous case:++        K:      -- K needs an info table+           Hp = Hp+8+           if Hp > HpLim goto L+           ...++        L: call gc()+           goto K+-}++--------------------------------------------------------------+-- A heap/stack check at a function or thunk entry point.++entryHeapCheck :: ClosureInfo+               -> Maybe LocalReg -- Function (closure environment)+               -> Int            -- Arity -- not same as len args b/c of voids+               -> [LocalReg]     -- Non-void args (empty for thunk)+               -> FCode ()+               -> FCode ()++entryHeapCheck cl_info nodeSet arity args code+  = entryHeapCheck' is_fastf node arity args code+  where+    node = case nodeSet of+              Just r  -> CmmReg (CmmLocal r)+              Nothing -> CmmLit (CmmLabel $ staticClosureLabel cl_info)++    is_fastf = case closureFunInfo cl_info of+                 Just (_, ArgGen _) -> False+                 _otherwise         -> True++-- | lower-level version for CmmParse+entryHeapCheck' :: Bool           -- is a known function pattern+                -> CmmExpr        -- expression for the closure pointer+                -> Int            -- Arity -- not same as len args b/c of voids+                -> [LocalReg]     -- Non-void args (empty for thunk)+                -> FCode ()+                -> FCode ()+entryHeapCheck' is_fastf node arity args code+  = do dflags <- getDynFlags+       let is_thunk = arity == 0++           args' = map (CmmReg . CmmLocal) args+           stg_gc_fun    = CmmReg (CmmGlobal GCFun)+           stg_gc_enter1 = CmmReg (CmmGlobal GCEnter1)++           {- Thunks:          jump stg_gc_enter_1++              Function (fast): call (NativeNode) stg_gc_fun(fun, args)++              Function (slow): call (slow) stg_gc_fun(fun, args)+           -}+           gc_call upd+               | is_thunk+                 = mkJump dflags NativeNodeCall stg_gc_enter1 [node] upd++               | is_fastf+                 = mkJump dflags NativeNodeCall stg_gc_fun (node : args') upd++               | otherwise+                 = mkJump dflags Slow stg_gc_fun (node : args') upd++       updfr_sz <- getUpdFrameOff++       loop_id <- newBlockId+       emitLabel loop_id+       heapCheck True True (gc_call updfr_sz <*> mkBranch loop_id) code++-- ------------------------------------------------------------+-- A heap/stack check in a case alternative+++-- If there are multiple alts and we need to GC, but don't have a+-- continuation already (the scrut was simple), then we should+-- pre-generate the continuation.  (if there are multiple alts it is+-- always a canned GC point).++-- altHeapCheck:+-- If we have a return continuation,+--   then if it is a canned GC pattern,+--           then we do mkJumpReturnsTo+--           else we do a normal call to stg_gc_noregs+--   else if it is a canned GC pattern,+--           then generate the continuation and do mkCallReturnsTo+--           else we do a normal call to stg_gc_noregs++altHeapCheck :: [LocalReg] -> FCode a -> FCode a+altHeapCheck regs code = altOrNoEscapeHeapCheck False regs code++altOrNoEscapeHeapCheck :: Bool -> [LocalReg] -> FCode a -> FCode a+altOrNoEscapeHeapCheck checkYield regs code = do+    dflags <- getDynFlags+    case cannedGCEntryPoint dflags regs of+      Nothing -> genericGC checkYield code+      Just gc -> do+        lret <- newBlockId+        let (off, _, copyin) = copyInOflow dflags NativeReturn (Young lret) regs []+        lcont <- newBlockId+        tscope <- getTickScope+        emitOutOfLine lret (copyin <*> mkBranch lcont, tscope)+        emitLabel lcont+        cannedGCReturnsTo checkYield False gc regs lret off code++altHeapCheckReturnsTo :: [LocalReg] -> Label -> ByteOff -> FCode a -> FCode a+altHeapCheckReturnsTo regs lret off code+  = do dflags <- getDynFlags+       case cannedGCEntryPoint dflags regs of+           Nothing -> genericGC False code+           Just gc -> cannedGCReturnsTo False True gc regs lret off code++-- noEscapeHeapCheck is implemented identically to altHeapCheck (which+-- is more efficient), but cannot be optimized away in the non-allocating+-- case because it may occur in a loop+noEscapeHeapCheck :: [LocalReg] -> FCode a -> FCode a+noEscapeHeapCheck regs code = altOrNoEscapeHeapCheck True regs code++cannedGCReturnsTo :: Bool -> Bool -> CmmExpr -> [LocalReg] -> Label -> ByteOff+                  -> FCode a+                  -> FCode a+cannedGCReturnsTo checkYield cont_on_stack gc regs lret off code+  = do dflags <- getDynFlags+       updfr_sz <- getUpdFrameOff+       heapCheck False checkYield (gc_call dflags gc updfr_sz) code+  where+    reg_exprs = map (CmmReg . CmmLocal) regs+      -- Note [stg_gc arguments]++      -- NB. we use the NativeReturn convention for passing arguments+      -- to the canned heap-check routines, because we are in a case+      -- alternative and hence the [LocalReg] was passed to us in the+      -- NativeReturn convention.+    gc_call dflags label sp+      | cont_on_stack+      = mkJumpReturnsTo dflags label NativeReturn reg_exprs lret off sp+      | otherwise+      = mkCallReturnsTo dflags label NativeReturn reg_exprs lret off sp []++genericGC :: Bool -> FCode a -> FCode a+genericGC checkYield code+  = do updfr_sz <- getUpdFrameOff+       lretry <- newBlockId+       emitLabel lretry+       call <- mkCall generic_gc (GC, GC) [] [] updfr_sz []+       heapCheck False checkYield (call <*> mkBranch lretry) code++cannedGCEntryPoint :: DynFlags -> [LocalReg] -> Maybe CmmExpr+cannedGCEntryPoint dflags regs+  = case map localRegType regs of+      []  -> Just (mkGcLabel "stg_gc_noregs")+      [ty]+          | isGcPtrType ty -> Just (mkGcLabel "stg_gc_unpt_r1")+          | isFloatType ty -> case width of+                                  W32       -> Just (mkGcLabel "stg_gc_f1")+                                  W64       -> Just (mkGcLabel "stg_gc_d1")+                                  _         -> Nothing++          | width == wordWidth dflags -> Just (mkGcLabel "stg_gc_unbx_r1")+          | width == W64              -> Just (mkGcLabel "stg_gc_l1")+          | otherwise                 -> Nothing+          where+              width = typeWidth ty+      [ty1,ty2]+          |  isGcPtrType ty1+          && isGcPtrType ty2 -> Just (mkGcLabel "stg_gc_pp")+      [ty1,ty2,ty3]+          |  isGcPtrType ty1+          && isGcPtrType ty2+          && isGcPtrType ty3 -> Just (mkGcLabel "stg_gc_ppp")+      [ty1,ty2,ty3,ty4]+          |  isGcPtrType ty1+          && isGcPtrType ty2+          && isGcPtrType ty3+          && isGcPtrType ty4 -> Just (mkGcLabel "stg_gc_pppp")+      _otherwise -> Nothing++-- Note [stg_gc arguments]+-- It might seem that we could avoid passing the arguments to the+-- stg_gc function, because they are already in the right registers.+-- While this is usually the case, it isn't always.  Sometimes the+-- code generator has cleverly avoided the eval in a case, e.g. in+-- ffi/should_run/4221.hs we found+--+--   case a_r1mb of z+--     FunPtr x y -> ...+--+-- where a_r1mb is bound a top-level constructor, and is known to be+-- evaluated.  The codegen just assigns x, y and z, and continues;+-- R1 is never assigned.+--+-- So we'll have to rely on optimisations to eliminatethese+-- assignments where possible.+++-- | The generic GC procedure; no params, no results+generic_gc :: CmmExpr+generic_gc = mkGcLabel "stg_gc_noregs"++-- | Create a CLabel for calling a garbage collector entry point+mkGcLabel :: String -> CmmExpr+mkGcLabel s = CmmLit (CmmLabel (mkCmmCodeLabel rtsUnitId (fsLit s)))++-------------------------------+heapCheck :: Bool -> Bool -> CmmAGraph -> FCode a -> FCode a+heapCheck checkStack checkYield do_gc code+  = getHeapUsage $ \ hpHw ->+    -- Emit heap checks, but be sure to do it lazily so+    -- that the conditionals on hpHw don't cause a black hole+    do  { dflags <- getDynFlags+        ; let mb_alloc_bytes+                 | hpHw > mBLOCK_SIZE = sorry $ unlines+                    [" Trying to allocate more than "++show mBLOCK_SIZE++" bytes.",+                     "",+                     "This is currently not possible due to a limitation of GHC's code generator.",+                     "See https://gitlab.haskell.org/ghc/ghc/issues/4505 for details.",+                     "Suggestion: read data from a file instead of having large static data",+                     "structures in code."]+                 | hpHw > 0  = Just (mkIntExpr dflags (hpHw * (wORD_SIZE dflags)))+                 | otherwise = Nothing+                 where mBLOCK_SIZE = bLOCKS_PER_MBLOCK dflags * bLOCK_SIZE_W dflags+              stk_hwm | checkStack = Just (CmmLit CmmHighStackMark)+                      | otherwise  = Nothing+        ; codeOnly $ do_checks stk_hwm checkYield mb_alloc_bytes do_gc+        ; tickyAllocHeap True hpHw+        ; setRealHp hpHw+        ; code }++heapStackCheckGen :: Maybe CmmExpr -> Maybe CmmExpr -> FCode ()+heapStackCheckGen stk_hwm mb_bytes+  = do updfr_sz <- getUpdFrameOff+       lretry <- newBlockId+       emitLabel lretry+       call <- mkCall generic_gc (GC, GC) [] [] updfr_sz []+       do_checks stk_hwm False mb_bytes (call <*> mkBranch lretry)++-- Note [Single stack check]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~+-- When compiling a function we can determine how much stack space it+-- will use. We therefore need to perform only a single stack check at+-- the beginning of a function to see if we have enough stack space.+--+-- The check boils down to comparing Sp-N with SpLim, where N is the+-- amount of stack space needed (see Note [Stack usage] below).  *BUT*+-- at this stage of the pipeline we are not supposed to refer to Sp+-- itself, because the stack is not yet manifest, so we don't quite+-- know where Sp pointing.++-- So instead of referring directly to Sp - as we used to do in the+-- past - the code generator uses (old + 0) in the stack check. That+-- is the address of the first word of the old area, so if we add N+-- we'll get the address of highest used word.+--+-- This makes the check robust.  For example, while we need to perform+-- only one stack check for each function, we could in theory place+-- more stack checks later in the function. They would be redundant,+-- but not incorrect (in a sense that they should not change program+-- behaviour). We need to make sure however that a stack check+-- inserted after incrementing the stack pointer checks for a+-- respectively smaller stack space. This would not be the case if the+-- code generator produced direct references to Sp. By referencing+-- (old + 0) we make sure that we always check for a correct amount of+-- stack: when converting (old + 0) to Sp the stack layout phase takes+-- into account changes already made to stack pointer. The idea for+-- this change came from observations made while debugging #8275.++-- Note [Stack usage]+-- ~~~~~~~~~~~~~~~~~~+-- At the moment we convert from STG to Cmm we don't know N, the+-- number of bytes of stack that the function will use, so we use a+-- special late-bound CmmLit, namely+--       CmmHighStackMark+-- to stand for the number of bytes needed. When the stack is made+-- manifest, the number of bytes needed is calculated, and used to+-- replace occurrences of CmmHighStackMark+--+-- The (Maybe CmmExpr) passed to do_checks is usually+--     Just (CmmLit CmmHighStackMark)+-- but can also (in certain hand-written RTS functions)+--     Just (CmmLit 8)  or some other fixed valuet+-- If it is Nothing, we don't generate a stack check at all.++do_checks :: Maybe CmmExpr    -- Should we check the stack?+                              -- See Note [Stack usage]+          -> Bool             -- Should we check for preemption?+          -> Maybe CmmExpr    -- Heap headroom (bytes)+          -> CmmAGraph        -- What to do on failure+          -> FCode ()+do_checks mb_stk_hwm checkYield mb_alloc_lit do_gc = do+  dflags <- getDynFlags+  gc_id <- newBlockId++  let+    Just alloc_lit = mb_alloc_lit++    bump_hp   = cmmOffsetExprB dflags hpExpr alloc_lit++    -- Sp overflow if ((old + 0) - CmmHighStack < SpLim)+    -- At the beginning of a function old + 0 = Sp+    -- See Note [Single stack check]+    sp_oflo sp_hwm =+         CmmMachOp (mo_wordULt dflags)+                  [CmmMachOp (MO_Sub (typeWidth (cmmRegType dflags spReg)))+                             [CmmStackSlot Old 0, sp_hwm],+                   CmmReg spLimReg]++    -- Hp overflow if (Hp > HpLim)+    -- (Hp has been incremented by now)+    -- HpLim points to the LAST WORD of valid allocation space.+    hp_oflo = CmmMachOp (mo_wordUGt dflags) [hpExpr, hpLimExpr]++    alloc_n = mkAssign hpAllocReg alloc_lit++  case mb_stk_hwm of+    Nothing -> return ()+    Just stk_hwm -> tickyStackCheck+      >> (emit =<< mkCmmIfGoto' (sp_oflo stk_hwm) gc_id (Just False) )++  -- Emit new label that might potentially be a header+  -- of a self-recursive tail call.+  -- See Note [Self-recursive loop header].+  self_loop_info <- getSelfLoop+  case self_loop_info of+    Just (_, loop_header_id, _)+        | checkYield && isJust mb_stk_hwm -> emitLabel loop_header_id+    _otherwise -> return ()++  if (isJust mb_alloc_lit)+    then do+     tickyHeapCheck+     emitAssign hpReg bump_hp+     emit =<< mkCmmIfThen' hp_oflo (alloc_n <*> mkBranch gc_id) (Just False)+    else do+      when (checkYield && not (gopt Opt_OmitYields dflags)) $ do+         -- Yielding if HpLim == 0+         let yielding = CmmMachOp (mo_wordEq dflags)+                                  [CmmReg hpLimReg,+                                   CmmLit (zeroCLit dflags)]+         emit =<< mkCmmIfGoto' yielding gc_id (Just False)++  tscope <- getTickScope+  emitOutOfLine gc_id+   (do_gc, tscope) -- this is expected to jump back somewhere++                -- Test for stack pointer exhaustion, then+                -- bump heap pointer, and test for heap exhaustion+                -- Note that we don't move the heap pointer unless the+                -- stack check succeeds.  Otherwise we might end up+                -- with slop at the end of the current block, which can+                -- confuse the LDV profiler.++-- Note [Self-recursive loop header]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- Self-recursive loop header is required by loopification optimization (See+-- Note [Self-recursive tail calls] in GHC.StgToCmm.Expr). We emit it if:+--+--  1. There is information about self-loop in the FCode environment. We don't+--     check the binder (first component of the self_loop_info) because we are+--     certain that if the self-loop info is present then we are compiling the+--     binder body. Reason: the only possible way to get here with the+--     self_loop_info present is from closureCodeBody.+--+--  2. checkYield && isJust mb_stk_hwm. checkYield tells us that it is possible+--     to preempt the heap check (see #367 for motivation behind this check). It+--     is True for heap checks placed at the entry to a function and+--     let-no-escape heap checks but false for other heap checks (eg. in case+--     alternatives or created from hand-written high-level Cmm). The second+--     check (isJust mb_stk_hwm) is true for heap checks at the entry to a+--     function and some heap checks created in hand-written Cmm. Otherwise it+--     is Nothing. In other words the only situation when both conditions are+--     true is when compiling stack and heap checks at the entry to a+--     function. This is the only situation when we want to emit a self-loop+--     label.
+ GHC/StgToCmm/Hpc.hs view
@@ -0,0 +1,48 @@+-----------------------------------------------------------------------------+--+-- Code generation for coverage+--+-- (c) Galois Connections, Inc. 2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Hpc ( initHpc, mkTickBox ) where++import GhcPrelude++import GHC.StgToCmm.Monad++import MkGraph+import CmmExpr+import CLabel+import Module+import CmmUtils+import GHC.StgToCmm.Utils+import HscTypes+import DynFlags++import Control.Monad++mkTickBox :: DynFlags -> Module -> Int -> CmmAGraph+mkTickBox dflags mod n+  = mkStore tick_box (CmmMachOp (MO_Add W64)+                                [ CmmLoad tick_box b64+                                , CmmLit (CmmInt 1 W64)+                                ])+  where+    tick_box = cmmIndex dflags W64+                        (CmmLit $ CmmLabel $ mkHpcTicksLabel $ mod)+                        n++initHpc :: Module -> HpcInfo -> FCode ()+-- Emit top-level tables for HPC and return code to initialise+initHpc _ (NoHpcInfo {})+  = return ()+initHpc this_mod (HpcInfo tickCount _hashNo)+  = do dflags <- getDynFlags+       when (gopt Opt_Hpc dflags) $+           do emitDataLits (mkHpcTicksLabel this_mod)+                           [ (CmmInt 0 W64)+                           | _ <- take tickCount [0 :: Int ..]+                           ]+
+ GHC/StgToCmm/Layout.hs view
@@ -0,0 +1,623 @@+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}++-----------------------------------------------------------------------------+--+-- Building info tables.+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Layout (+        mkArgDescr,+        emitCall, emitReturn, adjustHpBackwards,++        emitClosureProcAndInfoTable,+        emitClosureAndInfoTable,++        slowCall, directCall,++        FieldOffOrPadding(..),+        ClosureHeader(..),+        mkVirtHeapOffsets,+        mkVirtHeapOffsetsWithPadding,+        mkVirtConstrOffsets,+        mkVirtConstrSizes,+        getHpRelOffset,++        ArgRep(..), toArgRep, argRepSizeW -- re-exported from GHC.StgToCmm.ArgRep+  ) where+++#include "HsVersions.h"++import GhcPrelude hiding ((<*>))++import GHC.StgToCmm.Closure+import GHC.StgToCmm.Env+import GHC.StgToCmm.ArgRep -- notably: ( slowCallPattern )+import GHC.StgToCmm.Ticky+import GHC.StgToCmm.Monad+import GHC.StgToCmm.Utils++import MkGraph+import SMRep+import BlockId+import Cmm+import CmmUtils+import CmmInfo+import CLabel+import StgSyn+import Id+import TyCon             ( PrimRep(..), primRepSizeB )+import BasicTypes        ( RepArity )+import DynFlags+import Module++import Util+import Data.List+import Outputable+import FastString+import Control.Monad++------------------------------------------------------------------------+--                Call and return sequences+------------------------------------------------------------------------++-- | Return multiple values to the sequel+--+-- If the sequel is @Return@+--+-- >     return (x,y)+--+-- If the sequel is @AssignTo [p,q]@+--+-- >    p=x; q=y;+--+emitReturn :: [CmmExpr] -> FCode ReturnKind+emitReturn results+  = do { dflags    <- getDynFlags+       ; sequel    <- getSequel+       ; updfr_off <- getUpdFrameOff+       ; case sequel of+           Return ->+             do { adjustHpBackwards+                ; let e = CmmLoad (CmmStackSlot Old updfr_off) (gcWord dflags)+                ; emit (mkReturn dflags (entryCode dflags e) results updfr_off)+                }+           AssignTo regs adjust ->+             do { when adjust adjustHpBackwards+                ; emitMultiAssign  regs results }+       ; return AssignedDirectly+       }+++-- | @emitCall conv fun args@ makes a call to the entry-code of @fun@,+-- using the call/return convention @conv@, passing @args@, and+-- returning the results to the current sequel.+--+emitCall :: (Convention, Convention) -> CmmExpr -> [CmmExpr] -> FCode ReturnKind+emitCall convs fun args+  = emitCallWithExtraStack convs fun args noExtraStack+++-- | @emitCallWithExtraStack conv fun args stack@ makes a call to the+-- entry-code of @fun@, using the call/return convention @conv@,+-- passing @args@, pushing some extra stack frames described by+-- @stack@, and returning the results to the current sequel.+--+emitCallWithExtraStack+   :: (Convention, Convention) -> CmmExpr -> [CmmExpr]+   -> [CmmExpr] -> FCode ReturnKind+emitCallWithExtraStack (callConv, retConv) fun args extra_stack+  = do  { dflags <- getDynFlags+        ; adjustHpBackwards+        ; sequel <- getSequel+        ; updfr_off <- getUpdFrameOff+        ; case sequel of+            Return -> do+              emit $ mkJumpExtra dflags callConv fun args updfr_off extra_stack+              return AssignedDirectly+            AssignTo res_regs _ -> do+              k <- newBlockId+              let area = Young k+                  (off, _, copyin) = copyInOflow dflags retConv area res_regs []+                  copyout = mkCallReturnsTo dflags fun callConv args k off updfr_off+                                   extra_stack+              tscope <- getTickScope+              emit (copyout <*> mkLabel k tscope <*> copyin)+              return (ReturnedTo k off)+      }+++adjustHpBackwards :: FCode ()+-- This function adjusts the heap pointer just before a tail call or+-- return.  At a call or return, the virtual heap pointer may be less+-- than the real Hp, because the latter was advanced to deal with+-- the worst-case branch of the code, and we may be in a better-case+-- branch.  In that case, move the real Hp *back* and retract some+-- ticky allocation count.+--+-- It *does not* deal with high-water-mark adjustment.  That's done by+-- functions which allocate heap.+adjustHpBackwards+  = do  { hp_usg <- getHpUsage+        ; let rHp = realHp hp_usg+              vHp = virtHp hp_usg+              adjust_words = vHp -rHp+        ; new_hp <- getHpRelOffset vHp++        ; emit (if adjust_words == 0+                then mkNop+                else mkAssign hpReg new_hp) -- Generates nothing when vHp==rHp++        ; tickyAllocHeap False adjust_words -- ...ditto++        ; setRealHp vHp+        }+++-------------------------------------------------------------------------+--        Making calls: directCall and slowCall+-------------------------------------------------------------------------++-- General plan is:+--   - we'll make *one* fast call, either to the function itself+--     (directCall) or to stg_ap_<pat>_fast (slowCall)+--     Any left-over arguments will be pushed on the stack,+--+--     e.g. Sp[old+8]  = arg1+--          Sp[old+16] = arg2+--          Sp[old+32] = stg_ap_pp_info+--          R2 = arg3+--          R3 = arg4+--          call f() return to Nothing updfr_off: 32+++directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind+-- (directCall f n args)+-- calls f(arg1, ..., argn), and applies the result to the remaining args+-- The function f has arity n, and there are guaranteed at least n args+-- Both arity and args include void args+directCall conv lbl arity stg_args+  = do  { argreps <- getArgRepsAmodes stg_args+        ; direct_call "directCall" conv lbl arity argreps }+++slowCall :: CmmExpr -> [StgArg] -> FCode ReturnKind+-- (slowCall fun args) applies fun to args, returning the results to Sequel+slowCall fun stg_args+  = do  dflags <- getDynFlags+        argsreps <- getArgRepsAmodes stg_args+        let (rts_fun, arity) = slowCallPattern (map fst argsreps)++        (r, slow_code) <- getCodeR $ do+           r <- direct_call "slow_call" NativeNodeCall+                 (mkRtsApFastLabel rts_fun) arity ((P,Just fun):argsreps)+           emitComment $ mkFastString ("slow_call for " +++                                      showSDoc dflags (ppr fun) +++                                      " with pat " ++ unpackFS rts_fun)+           return r++        -- Note [avoid intermediate PAPs]+        let n_args = length stg_args+        if n_args > arity && optLevel dflags >= 2+           then do+             funv <- (CmmReg . CmmLocal) `fmap` assignTemp fun+             fun_iptr <- (CmmReg . CmmLocal) `fmap`+                    assignTemp (closureInfoPtr dflags (cmmUntag dflags funv))++             -- ToDo: we could do slightly better here by reusing the+             -- continuation from the slow call, which we have in r.+             -- Also we'd like to push the continuation on the stack+             -- before the branch, so that we only get one copy of the+             -- code that saves all the live variables across the+             -- call, but that might need some improvements to the+             -- special case in the stack layout code to handle this+             -- (see Note [diamond proc point]).++             fast_code <- getCode $+                emitCall (NativeNodeCall, NativeReturn)+                  (entryCode dflags fun_iptr)+                  (nonVArgs ((P,Just funv):argsreps))++             slow_lbl <- newBlockId+             fast_lbl <- newBlockId+             is_tagged_lbl <- newBlockId+             end_lbl <- newBlockId++             let correct_arity = cmmEqWord dflags (funInfoArity dflags fun_iptr)+                                                  (mkIntExpr dflags n_args)++             tscope <- getTickScope+             emit (mkCbranch (cmmIsTagged dflags funv)+                             is_tagged_lbl slow_lbl (Just True)+                   <*> mkLabel is_tagged_lbl tscope+                   <*> mkCbranch correct_arity fast_lbl slow_lbl (Just True)+                   <*> mkLabel fast_lbl tscope+                   <*> fast_code+                   <*> mkBranch end_lbl+                   <*> mkLabel slow_lbl tscope+                   <*> slow_code+                   <*> mkLabel end_lbl tscope)+             return r++           else do+             emit slow_code+             return r+++-- Note [avoid intermediate PAPs]+--+-- A slow call which needs multiple generic apply patterns will be+-- almost guaranteed to create one or more intermediate PAPs when+-- applied to a function that takes the correct number of arguments.+-- We try to avoid this situation by generating code to test whether+-- we are calling a function with the correct number of arguments+-- first, i.e.:+--+--   if (TAG(f) != 0} {  // f is not a thunk+--      if (f->info.arity == n) {+--         ... make a fast call to f ...+--      }+--   }+--   ... otherwise make the slow call ...+--+-- We *only* do this when the call requires multiple generic apply+-- functions, which requires pushing extra stack frames and probably+-- results in intermediate PAPs.  (I say probably, because it might be+-- that we're over-applying a function, but that seems even less+-- likely).+--+-- This very rarely applies, but if it does happen in an inner loop it+-- can have a severe impact on performance (#6084).+++--------------+direct_call :: String+            -> Convention     -- e.g. NativeNodeCall or NativeDirectCall+            -> CLabel -> RepArity+            -> [(ArgRep,Maybe CmmExpr)] -> FCode ReturnKind+direct_call caller call_conv lbl arity args+  | debugIsOn && args `lengthLessThan` real_arity  -- Too few args+  = do -- Caller should ensure that there enough args!+       pprPanic "direct_call" $+            text caller <+> ppr arity <+>+            ppr lbl <+> ppr (length args) <+>+            ppr (map snd args) <+> ppr (map fst args)++  | null rest_args  -- Precisely the right number of arguments+  = emitCall (call_conv, NativeReturn) target (nonVArgs args)++  | otherwise       -- Note [over-saturated calls]+  = do dflags <- getDynFlags+       emitCallWithExtraStack (call_conv, NativeReturn)+                              target+                              (nonVArgs fast_args)+                              (nonVArgs (stack_args dflags))+  where+    target = CmmLit (CmmLabel lbl)+    (fast_args, rest_args) = splitAt real_arity args+    stack_args dflags = slowArgs dflags rest_args+    real_arity = case call_conv of+                   NativeNodeCall -> arity+1+                   _              -> arity+++-- When constructing calls, it is easier to keep the ArgReps and the+-- CmmExprs zipped together.  However, a void argument has no+-- representation, so we need to use Maybe CmmExpr (the alternative of+-- using zeroCLit or even undefined would work, but would be ugly).+--+getArgRepsAmodes :: [StgArg] -> FCode [(ArgRep, Maybe CmmExpr)]+getArgRepsAmodes = mapM getArgRepAmode+  where getArgRepAmode arg+           | V <- rep  = return (V, Nothing)+           | otherwise = do expr <- getArgAmode (NonVoid arg)+                            return (rep, Just expr)+           where rep = toArgRep (argPrimRep arg)++nonVArgs :: [(ArgRep, Maybe CmmExpr)] -> [CmmExpr]+nonVArgs [] = []+nonVArgs ((_,Nothing)  : args) = nonVArgs args+nonVArgs ((_,Just arg) : args) = arg : nonVArgs args++{-+Note [over-saturated calls]++The natural thing to do for an over-saturated call would be to call+the function with the correct number of arguments, and then apply the+remaining arguments to the value returned, e.g.++  f a b c d   (where f has arity 2)+  -->+  r = call f(a,b)+  call r(c,d)++but this entails+  - saving c and d on the stack+  - making a continuation info table+  - at the continuation, loading c and d off the stack into regs+  - finally, call r++Note that since there are a fixed number of different r's+(e.g.  stg_ap_pp_fast), we can also pre-compile continuations+that correspond to each of them, rather than generating a fresh+one for each over-saturated call.++Not only does this generate much less code, it is faster too.  We will+generate something like:++Sp[old+16] = c+Sp[old+24] = d+Sp[old+32] = stg_ap_pp_info+call f(a,b) -- usual calling convention++For the purposes of the CmmCall node, we count this extra stack as+just more arguments that we are passing on the stack (cml_args).+-}++-- | 'slowArgs' takes a list of function arguments and prepares them for+-- pushing on the stack for "extra" arguments to a function which requires+-- fewer arguments than we currently have.+slowArgs :: DynFlags -> [(ArgRep, Maybe CmmExpr)] -> [(ArgRep, Maybe CmmExpr)]+slowArgs _ [] = []+slowArgs dflags args -- careful: reps contains voids (V), but args does not+  | gopt Opt_SccProfilingOn dflags+              = save_cccs ++ this_pat ++ slowArgs dflags rest_args+  | otherwise =              this_pat ++ slowArgs dflags rest_args+  where+    (arg_pat, n)            = slowCallPattern (map fst args)+    (call_args, rest_args)  = splitAt n args++    stg_ap_pat = mkCmmRetInfoLabel rtsUnitId arg_pat+    this_pat   = (N, Just (mkLblExpr stg_ap_pat)) : call_args+    save_cccs  = [(N, Just (mkLblExpr save_cccs_lbl)), (N, Just cccsExpr)]+    save_cccs_lbl = mkCmmRetInfoLabel rtsUnitId (fsLit "stg_restore_cccs")++-------------------------------------------------------------------------+----        Laying out objects on the heap and stack+-------------------------------------------------------------------------++-- The heap always grows upwards, so hpRel is easy to compute+hpRel :: VirtualHpOffset         -- virtual offset of Hp+      -> VirtualHpOffset         -- virtual offset of The Thing+      -> WordOff                -- integer word offset+hpRel hp off = off - hp++getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr+-- See Note [Virtual and real heap pointers] in GHC.StgToCmm.Monad+getHpRelOffset virtual_offset+  = do dflags <- getDynFlags+       hp_usg <- getHpUsage+       return (cmmRegOffW dflags hpReg (hpRel (realHp hp_usg) virtual_offset))++data FieldOffOrPadding a+    = FieldOff (NonVoid a) -- Something that needs an offset.+               ByteOff     -- Offset in bytes.+    | Padding ByteOff  -- Length of padding in bytes.+              ByteOff  -- Offset in bytes.++-- | Used to tell the various @mkVirtHeapOffsets@ functions what kind+-- of header the object has.  This will be accounted for in the+-- offsets of the fields returned.+data ClosureHeader+  = NoHeader+  | StdHeader+  | ThunkHeader++mkVirtHeapOffsetsWithPadding+  :: DynFlags+  -> ClosureHeader            -- What kind of header to account for+  -> [NonVoid (PrimRep, a)]   -- Things to make offsets for+  -> ( WordOff                -- Total number of words allocated+     , WordOff                -- Number of words allocated for *pointers*+     , [FieldOffOrPadding a]  -- Either an offset or padding.+     )++-- Things with their offsets from start of object in order of+-- increasing offset; BUT THIS MAY BE DIFFERENT TO INPUT ORDER+-- First in list gets lowest offset, which is initial offset + 1.+--+-- mkVirtHeapOffsetsWithPadding always returns boxed things with smaller offsets+-- than the unboxed things++mkVirtHeapOffsetsWithPadding dflags header things =+    ASSERT(not (any (isVoidRep . fst . fromNonVoid) things))+    ( tot_wds+    , bytesToWordsRoundUp dflags bytes_of_ptrs+    , concat (ptrs_w_offsets ++ non_ptrs_w_offsets) ++ final_pad+    )+  where+    hdr_words = case header of+      NoHeader -> 0+      StdHeader -> fixedHdrSizeW dflags+      ThunkHeader -> thunkHdrSize dflags+    hdr_bytes = wordsToBytes dflags hdr_words++    (ptrs, non_ptrs) = partition (isGcPtrRep . fst . fromNonVoid) things++    (bytes_of_ptrs, ptrs_w_offsets) =+       mapAccumL computeOffset 0 ptrs+    (tot_bytes, non_ptrs_w_offsets) =+       mapAccumL computeOffset bytes_of_ptrs non_ptrs++    tot_wds = bytesToWordsRoundUp dflags tot_bytes++    final_pad_size = tot_wds * word_size - tot_bytes+    final_pad+        | final_pad_size > 0 = [(Padding final_pad_size+                                         (hdr_bytes + tot_bytes))]+        | otherwise          = []++    word_size = wORD_SIZE dflags++    computeOffset bytes_so_far nv_thing =+        (new_bytes_so_far, with_padding field_off)+      where+        (rep, thing) = fromNonVoid nv_thing++        -- Size of the field in bytes.+        !sizeB = primRepSizeB dflags rep++        -- Align the start offset (eg, 2-byte value should be 2-byte aligned).+        -- But not more than to a word.+        !align = min word_size sizeB+        !start = roundUpTo bytes_so_far align+        !padding = start - bytes_so_far++        -- Final offset is:+        --   size of header + bytes_so_far + padding+        !final_offset = hdr_bytes + bytes_so_far + padding+        !new_bytes_so_far = start + sizeB+        field_off = FieldOff (NonVoid thing) final_offset++        with_padding field_off+            | padding == 0 = [field_off]+            | otherwise    = [ Padding padding (hdr_bytes + bytes_so_far)+                             , field_off+                             ]+++mkVirtHeapOffsets+  :: DynFlags+  -> ClosureHeader            -- What kind of header to account for+  -> [NonVoid (PrimRep,a)]    -- Things to make offsets for+  -> (WordOff,                -- _Total_ number of words allocated+      WordOff,                -- Number of words allocated for *pointers*+      [(NonVoid a, ByteOff)])+mkVirtHeapOffsets dflags header things =+    ( tot_wds+    , ptr_wds+    , [ (field, offset) | (FieldOff field offset) <- things_offsets ]+    )+  where+   (tot_wds, ptr_wds, things_offsets) =+       mkVirtHeapOffsetsWithPadding dflags header things++-- | Just like mkVirtHeapOffsets, but for constructors+mkVirtConstrOffsets+  :: DynFlags -> [NonVoid (PrimRep, a)]+  -> (WordOff, WordOff, [(NonVoid a, ByteOff)])+mkVirtConstrOffsets dflags = mkVirtHeapOffsets dflags StdHeader++-- | Just like mkVirtConstrOffsets, but used when we don't have the actual+-- arguments. Useful when e.g. generating info tables; we just need to know+-- sizes of pointer and non-pointer fields.+mkVirtConstrSizes :: DynFlags -> [NonVoid PrimRep] -> (WordOff, WordOff)+mkVirtConstrSizes dflags field_reps+  = (tot_wds, ptr_wds)+  where+    (tot_wds, ptr_wds, _) =+       mkVirtConstrOffsets dflags+         (map (\nv_rep -> NonVoid (fromNonVoid nv_rep, ())) field_reps)++-------------------------------------------------------------------------+--+--        Making argument descriptors+--+--  An argument descriptor describes the layout of args on the stack,+--  both for         * GC (stack-layout) purposes, and+--                * saving/restoring registers when a heap-check fails+--+-- Void arguments aren't important, therefore (contrast constructSlowCall)+--+-------------------------------------------------------------------------++-- bring in ARG_P, ARG_N, etc.+#include "rts/storage/FunTypes.h"++mkArgDescr :: DynFlags -> [Id] -> ArgDescr+mkArgDescr dflags args+  = let arg_bits = argBits dflags arg_reps+        arg_reps = filter isNonV (map idArgRep args)+           -- Getting rid of voids eases matching of standard patterns+    in case stdPattern arg_reps of+         Just spec_id -> ArgSpec spec_id+         Nothing      -> ArgGen  arg_bits++argBits :: DynFlags -> [ArgRep] -> [Bool]        -- True for non-ptr, False for ptr+argBits _      []           = []+argBits dflags (P   : args) = False : argBits dflags args+argBits dflags (arg : args) = take (argRepSizeW dflags arg) (repeat True)+                    ++ argBits dflags args++----------------------+stdPattern :: [ArgRep] -> Maybe Int+stdPattern reps+  = case reps of+        []    -> Just ARG_NONE        -- just void args, probably+        [N]   -> Just ARG_N+        [P]   -> Just ARG_P+        [F]   -> Just ARG_F+        [D]   -> Just ARG_D+        [L]   -> Just ARG_L+        [V16] -> Just ARG_V16+        [V32] -> Just ARG_V32+        [V64] -> Just ARG_V64++        [N,N] -> Just ARG_NN+        [N,P] -> Just ARG_NP+        [P,N] -> Just ARG_PN+        [P,P] -> Just ARG_PP++        [N,N,N] -> Just ARG_NNN+        [N,N,P] -> Just ARG_NNP+        [N,P,N] -> Just ARG_NPN+        [N,P,P] -> Just ARG_NPP+        [P,N,N] -> Just ARG_PNN+        [P,N,P] -> Just ARG_PNP+        [P,P,N] -> Just ARG_PPN+        [P,P,P] -> Just ARG_PPP++        [P,P,P,P]     -> Just ARG_PPPP+        [P,P,P,P,P]   -> Just ARG_PPPPP+        [P,P,P,P,P,P] -> Just ARG_PPPPPP++        _ -> Nothing++-------------------------------------------------------------------------+--+--        Generating the info table and code for a closure+--+-------------------------------------------------------------------------++-- Here we make an info table of type 'CmmInfo'.  The concrete+-- representation as a list of 'CmmAddr' is handled later+-- in the pipeline by 'cmmToRawCmm'.+-- When loading the free variables, a function closure pointer may be tagged,+-- so we must take it into account.++emitClosureProcAndInfoTable :: Bool                    -- top-level?+                            -> Id                      -- name of the closure+                            -> LambdaFormInfo+                            -> CmmInfoTable+                            -> [NonVoid Id]            -- incoming arguments+                            -> ((Int, LocalReg, [LocalReg]) -> FCode ()) -- function body+                            -> FCode ()+emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl args body+ = do   { dflags <- getDynFlags+        -- Bind the binder itself, but only if it's not a top-level+        -- binding. We need non-top let-bindings to refer to the+        -- top-level binding, which this binding would incorrectly shadow.+        ; node <- if top_lvl then return $ idToReg dflags (NonVoid bndr)+                  else bindToReg (NonVoid bndr) lf_info+        ; let node_points = nodeMustPointToIt dflags lf_info+        ; arg_regs <- bindArgsToRegs args+        ; let args' = if node_points then (node : arg_regs) else arg_regs+              conv  = if nodeMustPointToIt dflags lf_info then NativeNodeCall+                                                          else NativeDirectCall+              (offset, _, _) = mkCallEntry dflags conv args' []+        ; emitClosureAndInfoTable info_tbl conv args' $ body (offset, node, arg_regs)+        }++-- Data constructors need closures, but not with all the argument handling+-- needed for functions. The shared part goes here.+emitClosureAndInfoTable ::+  CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode ()+emitClosureAndInfoTable info_tbl conv args body+  = do { (_, blks) <- getCodeScoped body+       ; let entry_lbl = toEntryLbl (cit_lbl info_tbl)+       ; emitProcWithConvention conv (Just info_tbl) entry_lbl args blks+       }
+ GHC/StgToCmm/Monad.hs view
@@ -0,0 +1,861 @@+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE GADTs #-}++-----------------------------------------------------------------------------+--+-- Monad for Stg to C-- code generation+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Monad (+        FCode,        -- type++        initC, runC, fixC,+        newUnique,++        emitLabel,++        emit, emitDecl,+        emitProcWithConvention, emitProcWithStackFrame,+        emitOutOfLine, emitAssign, emitStore,+        emitComment, emitTick, emitUnwind,++        getCmm, aGraphToGraph,+        getCodeR, getCode, getCodeScoped, getHeapUsage,++        mkCmmIfThenElse, mkCmmIfThen, mkCmmIfGoto,+        mkCmmIfThenElse', mkCmmIfThen', mkCmmIfGoto',++        mkCall, mkCmmCall,++        forkClosureBody, forkLneBody, forkAlts, forkAltPair, codeOnly,++        ConTagZ,++        Sequel(..), ReturnKind(..),+        withSequel, getSequel,++        setTickyCtrLabel, getTickyCtrLabel,+        tickScope, getTickScope,++        withUpdFrameOff, getUpdFrameOff, initUpdFrameOff,++        HeapUsage(..), VirtualHpOffset,        initHpUsage,+        getHpUsage,  setHpUsage, heapHWM,+        setVirtHp, getVirtHp, setRealHp,++        getModuleName,++        -- ideally we wouldn't export these, but some other modules access internal state+        getState, setState, getSelfLoop, withSelfLoop, getInfoDown, getDynFlags, getThisPackage,++        -- more localised access to monad state+        CgIdInfo(..),+        getBinds, setBinds,++        -- out of general friendliness, we also export ...+        CgInfoDownwards(..), CgState(..)        -- non-abstract+    ) where++import GhcPrelude hiding( sequence, succ )++import Cmm+import GHC.StgToCmm.Closure+import DynFlags+import Hoopl.Collections+import MkGraph+import BlockId+import CLabel+import SMRep+import Module+import Id+import VarEnv+import OrdList+import BasicTypes( ConTagZ )+import Unique+import UniqSupply+import FastString+import Outputable+import Util++import Control.Monad+import Data.List++++--------------------------------------------------------+-- The FCode monad and its types+--+-- FCode is the monad plumbed through the Stg->Cmm code generator, and+-- the Cmm parser.  It contains the following things:+--+--  - A writer monad, collecting:+--    - code for the current function, in the form of a CmmAGraph.+--      The function "emit" appends more code to this.+--    - the top-level CmmDecls accumulated so far+--+--  - A state monad with:+--    - the local bindings in scope+--    - the current heap usage+--    - a UniqSupply+--+--  - A reader monad, for CgInfoDownwards, containing+--    - DynFlags,+--    - the current Module+--    - the update-frame offset+--    - the ticky counter label+--    - the Sequel (the continuation to return to)+--    - the self-recursive tail call information++--------------------------------------------------------++newtype FCode a = FCode { doFCode :: CgInfoDownwards -> CgState -> (a, CgState) }+    deriving (Functor)++instance Applicative FCode where+    pure val = FCode (\_info_down state -> (val, state))+    {-# INLINE pure #-}+    (<*>) = ap++instance Monad FCode where+    FCode m >>= k = FCode $+        \info_down state ->+            case m info_down state of+              (m_result, new_state) ->+                 case k m_result of+                   FCode kcode -> kcode info_down new_state+    {-# INLINE (>>=) #-}++instance MonadUnique FCode where+  getUniqueSupplyM = cgs_uniqs <$> getState+  getUniqueM = FCode $ \_ st ->+    let (u, us') = takeUniqFromSupply (cgs_uniqs st)+    in (u, st { cgs_uniqs = us' })++initC :: IO CgState+initC  = do { uniqs <- mkSplitUniqSupply 'c'+            ; return (initCgState uniqs) }++runC :: DynFlags -> Module -> CgState -> FCode a -> (a,CgState)+runC dflags mod st fcode = doFCode fcode (initCgInfoDown dflags mod) st++fixC :: (a -> FCode a) -> FCode a+fixC fcode = FCode $+    \info_down state -> let (v, s) = doFCode (fcode v) info_down state+                        in (v, s)++--------------------------------------------------------+--        The code generator environment+--------------------------------------------------------++-- This monadery has some information that it only passes+-- *downwards*, as well as some ``state'' which is modified+-- as we go along.++data CgInfoDownwards        -- information only passed *downwards* by the monad+  = MkCgInfoDown {+        cgd_dflags    :: DynFlags,+        cgd_mod       :: Module,            -- Module being compiled+        cgd_updfr_off :: UpdFrameOffset,    -- Size of current update frame+        cgd_ticky     :: CLabel,            -- Current destination for ticky counts+        cgd_sequel    :: Sequel,            -- What to do at end of basic block+        cgd_self_loop :: Maybe SelfLoopInfo,-- Which tail calls can be compiled+                                            -- as local jumps? See Note+                                            -- [Self-recursive tail calls] in+                                            -- GHC.StgToCmm.Expr+        cgd_tick_scope:: CmmTickScope       -- Tick scope for new blocks & ticks+  }++type CgBindings = IdEnv CgIdInfo++data CgIdInfo+  = CgIdInfo+        { cg_id :: Id   -- Id that this is the info for+        , cg_lf  :: LambdaFormInfo+        , cg_loc :: CgLoc                     -- CmmExpr for the *tagged* value+        }++instance Outputable CgIdInfo where+  ppr (CgIdInfo { cg_id = id, cg_loc = loc })+    = ppr id <+> text "-->" <+> ppr loc++-- Sequel tells what to do with the result of this expression+data Sequel+  = Return              -- Return result(s) to continuation found on the stack.++  | AssignTo+        [LocalReg]      -- Put result(s) in these regs and fall through+                        -- NB: no void arguments here+                        --+        Bool            -- Should we adjust the heap pointer back to+                        -- recover space that's unused on this path?+                        -- We need to do this only if the expression+                        -- may allocate (e.g. it's a foreign call or+                        -- allocating primOp)++instance Outputable Sequel where+    ppr Return = text "Return"+    ppr (AssignTo regs b) = text "AssignTo" <+> ppr regs <+> ppr b++-- See Note [sharing continuations] below+data ReturnKind+  = AssignedDirectly+  | ReturnedTo BlockId ByteOff++-- Note [sharing continuations]+--+-- ReturnKind says how the expression being compiled returned its+-- results: either by assigning directly to the registers specified+-- by the Sequel, or by returning to a continuation that does the+-- assignments.  The point of this is we might be able to re-use the+-- continuation in a subsequent heap-check.  Consider:+--+--    case f x of z+--      True  -> <True code>+--      False -> <False code>+--+-- Naively we would generate+--+--    R2 = x   -- argument to f+--    Sp[young(L1)] = L1+--    call f returns to L1+--  L1:+--    z = R1+--    if (z & 1) then Ltrue else Lfalse+--  Ltrue:+--    Hp = Hp + 24+--    if (Hp > HpLim) then L4 else L7+--  L4:+--    HpAlloc = 24+--    goto L5+--  L5:+--    R1 = z+--    Sp[young(L6)] = L6+--    call stg_gc_unpt_r1 returns to L6+--  L6:+--    z = R1+--    goto L1+--  L7:+--    <True code>+--  Lfalse:+--    <False code>+--+-- We want the gc call in L4 to return to L1, and discard L6.  Note+-- that not only can we share L1 and L6, but the assignment of the+-- return address in L4 is unnecessary because the return address for+-- L1 is already on the stack.  We used to catch the sharing of L1 and+-- L6 in the common-block-eliminator, but not the unnecessary return+-- address assignment.+--+-- Since this case is so common I decided to make it more explicit and+-- robust by programming the sharing directly, rather than relying on+-- the common-block eliminator to catch it.  This makes+-- common-block-elimination an optional optimisation, and furthermore+-- generates less code in the first place that we have to subsequently+-- clean up.+--+-- There are some rarer cases of common blocks that we don't catch+-- this way, but that's ok.  Common-block-elimination is still available+-- to catch them when optimisation is enabled.  Some examples are:+--+--   - when both the True and False branches do a heap check, we+--     can share the heap-check failure code L4a and maybe L4+--+--   - in a case-of-case, there might be multiple continuations that+--     we can common up.+--+-- It is always safe to use AssignedDirectly.  Expressions that jump+-- to the continuation from multiple places (e.g. case expressions)+-- fall back to AssignedDirectly.+--+++initCgInfoDown :: DynFlags -> Module -> CgInfoDownwards+initCgInfoDown dflags mod+  = MkCgInfoDown { cgd_dflags    = dflags+                 , cgd_mod       = mod+                 , cgd_updfr_off = initUpdFrameOff dflags+                 , cgd_ticky     = mkTopTickyCtrLabel+                 , cgd_sequel    = initSequel+                 , cgd_self_loop = Nothing+                 , cgd_tick_scope= GlobalScope }++initSequel :: Sequel+initSequel = Return++initUpdFrameOff :: DynFlags -> UpdFrameOffset+initUpdFrameOff dflags = widthInBytes (wordWidth dflags) -- space for the RA+++--------------------------------------------------------+--        The code generator state+--------------------------------------------------------++data CgState+  = MkCgState {+     cgs_stmts :: CmmAGraph,          -- Current procedure++     cgs_tops  :: OrdList CmmDecl,+        -- Other procedures and data blocks in this compilation unit+        -- Both are ordered only so that we can+        -- reduce forward references, when it's easy to do so++     cgs_binds :: CgBindings,++     cgs_hp_usg  :: HeapUsage,++     cgs_uniqs :: UniqSupply }++data HeapUsage   -- See Note [Virtual and real heap pointers]+  = HeapUsage {+        virtHp :: VirtualHpOffset,       -- Virtual offset of highest-allocated word+                                         --   Incremented whenever we allocate+        realHp :: VirtualHpOffset        -- realHp: Virtual offset of real heap ptr+                                         --   Used in instruction addressing modes+    }++type VirtualHpOffset = WordOff+++{- Note [Virtual and real heap pointers]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The code generator can allocate one or more objects contiguously, performing+one heap check to cover allocation of all the objects at once.  Let's call+this little chunk of heap space an "allocation chunk".  The code generator+will emit code to+  * Perform a heap-exhaustion check+  * Move the heap pointer to the end of the allocation chunk+  * Allocate multiple objects within the chunk++The code generator uses VirtualHpOffsets to address words within a+single allocation chunk; these start at one and increase positively.+The first word of the chunk has VirtualHpOffset=1, the second has+VirtualHpOffset=2, and so on.++ * The field realHp tracks (the VirtualHpOffset) where the real Hp+   register is pointing.  Typically it'll be pointing to the end of the+   allocation chunk.++ * The field virtHp gives the VirtualHpOffset of the highest-allocated+   word so far.  It starts at zero (meaning no word has been allocated),+   and increases whenever an object is allocated.++The difference between realHp and virtHp gives the offset from the+real Hp register of a particular word in the allocation chunk. This+is what getHpRelOffset does.  Since the returned offset is relative+to the real Hp register, it is valid only until you change the real+Hp register.  (Changing virtHp doesn't matter.)+-}+++initCgState :: UniqSupply -> CgState+initCgState uniqs+  = MkCgState { cgs_stmts  = mkNop+              , cgs_tops   = nilOL+              , cgs_binds  = emptyVarEnv+              , cgs_hp_usg = initHpUsage+              , cgs_uniqs  = uniqs }++stateIncUsage :: CgState -> CgState -> CgState+-- stateIncUsage@ e1 e2 incorporates in e1+-- the heap high water mark found in e2.+stateIncUsage s1 s2@(MkCgState { cgs_hp_usg = hp_usg })+     = s1 { cgs_hp_usg  = cgs_hp_usg  s1 `maxHpHw`  virtHp hp_usg }+       `addCodeBlocksFrom` s2++addCodeBlocksFrom :: CgState -> CgState -> CgState+-- Add code blocks from the latter to the former+-- (The cgs_stmts will often be empty, but not always; see codeOnly)+s1 `addCodeBlocksFrom` s2+  = s1 { cgs_stmts = cgs_stmts s1 MkGraph.<*> cgs_stmts s2,+         cgs_tops  = cgs_tops  s1 `appOL` cgs_tops  s2 }+++-- The heap high water mark is the larger of virtHp and hwHp.  The latter is+-- only records the high water marks of forked-off branches, so to find the+-- heap high water mark you have to take the max of virtHp and hwHp.  Remember,+-- virtHp never retreats!+--+-- Note Jan 04: ok, so why do we only look at the virtual Hp??++heapHWM :: HeapUsage -> VirtualHpOffset+heapHWM = virtHp++initHpUsage :: HeapUsage+initHpUsage = HeapUsage { virtHp = 0, realHp = 0 }++maxHpHw :: HeapUsage -> VirtualHpOffset -> HeapUsage+hp_usg `maxHpHw` hw = hp_usg { virtHp = virtHp hp_usg `max` hw }++--------------------------------------------------------+-- Operators for getting and setting the state and "info_down".+--------------------------------------------------------++getState :: FCode CgState+getState = FCode $ \_info_down state -> (state, state)++setState :: CgState -> FCode ()+setState state = FCode $ \_info_down _ -> ((), state)++getHpUsage :: FCode HeapUsage+getHpUsage = do+        state <- getState+        return $ cgs_hp_usg state++setHpUsage :: HeapUsage -> FCode ()+setHpUsage new_hp_usg = do+        state <- getState+        setState $ state {cgs_hp_usg = new_hp_usg}++setVirtHp :: VirtualHpOffset -> FCode ()+setVirtHp new_virtHp+  = do  { hp_usage <- getHpUsage+        ; setHpUsage (hp_usage {virtHp = new_virtHp}) }++getVirtHp :: FCode VirtualHpOffset+getVirtHp+  = do  { hp_usage <- getHpUsage+        ; return (virtHp hp_usage) }++setRealHp ::  VirtualHpOffset -> FCode ()+setRealHp new_realHp+  = do  { hp_usage <- getHpUsage+        ; setHpUsage (hp_usage {realHp = new_realHp}) }++getBinds :: FCode CgBindings+getBinds = do+        state <- getState+        return $ cgs_binds state++setBinds :: CgBindings -> FCode ()+setBinds new_binds = do+        state <- getState+        setState $ state {cgs_binds = new_binds}++withState :: FCode a -> CgState -> FCode (a,CgState)+withState (FCode fcode) newstate = FCode $ \info_down state ->+  case fcode info_down newstate of+    (retval, state2) -> ((retval,state2), state)++newUniqSupply :: FCode UniqSupply+newUniqSupply = do+        state <- getState+        let (us1, us2) = splitUniqSupply (cgs_uniqs state)+        setState $ state { cgs_uniqs = us1 }+        return us2++newUnique :: FCode Unique+newUnique = do+        state <- getState+        let (u,us') = takeUniqFromSupply (cgs_uniqs state)+        setState $ state { cgs_uniqs = us' }+        return u++------------------+getInfoDown :: FCode CgInfoDownwards+getInfoDown = FCode $ \info_down state -> (info_down,state)++getSelfLoop :: FCode (Maybe SelfLoopInfo)+getSelfLoop = do+        info_down <- getInfoDown+        return $ cgd_self_loop info_down++withSelfLoop :: SelfLoopInfo -> FCode a -> FCode a+withSelfLoop self_loop code = do+        info_down <- getInfoDown+        withInfoDown code (info_down {cgd_self_loop = Just self_loop})++instance HasDynFlags FCode where+    getDynFlags = liftM cgd_dflags getInfoDown++getThisPackage :: FCode UnitId+getThisPackage = liftM thisPackage getDynFlags++withInfoDown :: FCode a -> CgInfoDownwards -> FCode a+withInfoDown (FCode fcode) info_down = FCode $ \_ state -> fcode info_down state++-- ----------------------------------------------------------------------------+-- Get the current module name++getModuleName :: FCode Module+getModuleName = do { info <- getInfoDown; return (cgd_mod info) }++-- ----------------------------------------------------------------------------+-- Get/set the end-of-block info++withSequel :: Sequel -> FCode a -> FCode a+withSequel sequel code+  = do  { info  <- getInfoDown+        ; withInfoDown code (info {cgd_sequel = sequel, cgd_self_loop = Nothing }) }++getSequel :: FCode Sequel+getSequel = do  { info <- getInfoDown+                ; return (cgd_sequel info) }++-- ----------------------------------------------------------------------------+-- Get/set the size of the update frame++-- We keep track of the size of the update frame so that we+-- can set the stack pointer to the proper address on return+-- (or tail call) from the closure.+-- There should be at most one update frame for each closure.+-- Note: I'm including the size of the original return address+-- in the size of the update frame -- hence the default case on `get'.++withUpdFrameOff :: UpdFrameOffset -> FCode a -> FCode a+withUpdFrameOff size code+  = do  { info  <- getInfoDown+        ; withInfoDown code (info {cgd_updfr_off = size }) }++getUpdFrameOff :: FCode UpdFrameOffset+getUpdFrameOff+  = do  { info  <- getInfoDown+        ; return $ cgd_updfr_off info }++-- ----------------------------------------------------------------------------+-- Get/set the current ticky counter label++getTickyCtrLabel :: FCode CLabel+getTickyCtrLabel = do+        info <- getInfoDown+        return (cgd_ticky info)++setTickyCtrLabel :: CLabel -> FCode a -> FCode a+setTickyCtrLabel ticky code = do+        info <- getInfoDown+        withInfoDown code (info {cgd_ticky = ticky})++-- ----------------------------------------------------------------------------+-- Manage tick scopes++-- | The current tick scope. We will assign this to generated blocks.+getTickScope :: FCode CmmTickScope+getTickScope = do+        info <- getInfoDown+        return (cgd_tick_scope info)++-- | Places blocks generated by the given code into a fresh+-- (sub-)scope. This will make sure that Cmm annotations in our scope+-- will apply to the Cmm blocks generated therein - but not the other+-- way around.+tickScope :: FCode a -> FCode a+tickScope code = do+        info <- getInfoDown+        if debugLevel (cgd_dflags info) == 0 then code else do+          u <- newUnique+          let scope' = SubScope u (cgd_tick_scope info)+          withInfoDown code info{ cgd_tick_scope = scope' }+++--------------------------------------------------------+--                 Forking+--------------------------------------------------------++forkClosureBody :: FCode () -> FCode ()+-- forkClosureBody compiles body_code in environment where:+--   - sequel, update stack frame and self loop info are+--     set to fresh values+--   - state is set to a fresh value, except for local bindings+--     that are passed in unchanged. It's up to the enclosed code to+--     re-bind the free variables to a field of the closure.++forkClosureBody body_code+  = do  { dflags <- getDynFlags+        ; info   <- getInfoDown+        ; us     <- newUniqSupply+        ; state  <- getState+        ; let body_info_down = info { cgd_sequel    = initSequel+                                    , cgd_updfr_off = initUpdFrameOff dflags+                                    , cgd_self_loop = Nothing }+              fork_state_in = (initCgState us) { cgs_binds = cgs_binds state }+              ((),fork_state_out) = doFCode body_code body_info_down fork_state_in+        ; setState $ state `addCodeBlocksFrom` fork_state_out }++forkLneBody :: FCode a -> FCode a+-- 'forkLneBody' takes a body of let-no-escape binding and compiles+-- it in the *current* environment, returning the graph thus constructed.+--+-- The current environment is passed on completely unchanged to+-- the successor.  In particular, any heap usage from the enclosed+-- code is discarded; it should deal with its own heap consumption.+forkLneBody body_code+  = do  { info_down <- getInfoDown+        ; us        <- newUniqSupply+        ; state     <- getState+        ; let fork_state_in = (initCgState us) { cgs_binds = cgs_binds state }+              (result, fork_state_out) = doFCode body_code info_down fork_state_in+        ; setState $ state `addCodeBlocksFrom` fork_state_out+        ; return result }++codeOnly :: FCode () -> FCode ()+-- Emit any code from the inner thing into the outer thing+-- Do not affect anything else in the outer state+-- Used in almost-circular code to prevent false loop dependencies+codeOnly body_code+  = do  { info_down <- getInfoDown+        ; us        <- newUniqSupply+        ; state     <- getState+        ; let   fork_state_in = (initCgState us) { cgs_binds   = cgs_binds state+                                                 , cgs_hp_usg  = cgs_hp_usg state }+                ((), fork_state_out) = doFCode body_code info_down fork_state_in+        ; setState $ state `addCodeBlocksFrom` fork_state_out }++forkAlts :: [FCode a] -> FCode [a]+-- (forkAlts' bs d) takes fcodes 'bs' for the branches of a 'case', and+-- an fcode for the default case 'd', and compiles each in the current+-- environment.  The current environment is passed on unmodified, except+-- that the virtual Hp is moved on to the worst virtual Hp for the branches++forkAlts branch_fcodes+  = do  { info_down <- getInfoDown+        ; us <- newUniqSupply+        ; state <- getState+        ; let compile us branch+                = (us2, doFCode branch info_down branch_state)+                where+                  (us1,us2) = splitUniqSupply us+                  branch_state = (initCgState us1) {+                                        cgs_binds  = cgs_binds state+                                      , cgs_hp_usg = cgs_hp_usg state }+              (_us, results) = mapAccumL compile us branch_fcodes+              (branch_results, branch_out_states) = unzip results+        ; setState $ foldl' stateIncUsage state branch_out_states+                -- NB foldl.  state is the *left* argument to stateIncUsage+        ; return branch_results }++forkAltPair :: FCode a -> FCode a -> FCode (a,a)+-- Most common use of 'forkAlts'; having this helper function avoids+-- accidental use of failible pattern-matches in @do@-notation+forkAltPair x y = do+  xy' <- forkAlts [x,y]+  case xy' of+    [x',y'] -> return (x',y')+    _ -> panic "forkAltPair"++-- collect the code emitted by an FCode computation+getCodeR :: FCode a -> FCode (a, CmmAGraph)+getCodeR fcode+  = do  { state1 <- getState+        ; (a, state2) <- withState fcode (state1 { cgs_stmts = mkNop })+        ; setState $ state2 { cgs_stmts = cgs_stmts state1  }+        ; return (a, cgs_stmts state2) }++getCode :: FCode a -> FCode CmmAGraph+getCode fcode = do { (_,stmts) <- getCodeR fcode; return stmts }++-- | Generate code into a fresh tick (sub-)scope and gather generated code+getCodeScoped :: FCode a -> FCode (a, CmmAGraphScoped)+getCodeScoped fcode+  = do  { state1 <- getState+        ; ((a, tscope), state2) <-+            tickScope $+            flip withState state1 { cgs_stmts = mkNop } $+            do { a   <- fcode+               ; scp <- getTickScope+               ; return (a, scp) }+        ; setState $ state2 { cgs_stmts = cgs_stmts state1  }+        ; return (a, (cgs_stmts state2, tscope)) }+++-- 'getHeapUsage' applies a function to the amount of heap that it uses.+-- It initialises the heap usage to zeros, and passes on an unchanged+-- heap usage.+--+-- It is usually a prelude to performing a GC check, so everything must+-- be in a tidy and consistent state.+--+-- Note the slightly subtle fixed point behaviour needed here++getHeapUsage :: (VirtualHpOffset -> FCode a) -> FCode a+getHeapUsage fcode+  = do  { info_down <- getInfoDown+        ; state <- getState+        ; let   fstate_in = state { cgs_hp_usg  = initHpUsage }+                (r, fstate_out) = doFCode (fcode hp_hw) info_down fstate_in+                hp_hw = heapHWM (cgs_hp_usg fstate_out)        -- Loop here!++        ; setState $ fstate_out { cgs_hp_usg = cgs_hp_usg state }+        ; return r }++-- ----------------------------------------------------------------------------+-- Combinators for emitting code++emitCgStmt :: CgStmt -> FCode ()+emitCgStmt stmt+  = do  { state <- getState+        ; setState $ state { cgs_stmts = cgs_stmts state `snocOL` stmt }+        }++emitLabel :: BlockId -> FCode ()+emitLabel id = do tscope <- getTickScope+                  emitCgStmt (CgLabel id tscope)++emitComment :: FastString -> FCode ()+emitComment s+  | debugIsOn = emitCgStmt (CgStmt (CmmComment s))+  | otherwise = return ()++emitTick :: CmmTickish -> FCode ()+emitTick = emitCgStmt . CgStmt . CmmTick++emitUnwind :: [(GlobalReg, Maybe CmmExpr)] -> FCode ()+emitUnwind regs = do+  dflags <- getDynFlags+  when (debugLevel dflags > 0) $ do+     emitCgStmt $ CgStmt $ CmmUnwind regs++emitAssign :: CmmReg  -> CmmExpr -> FCode ()+emitAssign l r = emitCgStmt (CgStmt (CmmAssign l r))++emitStore :: CmmExpr  -> CmmExpr -> FCode ()+emitStore l r = emitCgStmt (CgStmt (CmmStore l r))++emit :: CmmAGraph -> FCode ()+emit ag+  = do  { state <- getState+        ; setState $ state { cgs_stmts = cgs_stmts state MkGraph.<*> ag } }++emitDecl :: CmmDecl -> FCode ()+emitDecl decl+  = do  { state <- getState+        ; setState $ state { cgs_tops = cgs_tops state `snocOL` decl } }++emitOutOfLine :: BlockId -> CmmAGraphScoped -> FCode ()+emitOutOfLine l (stmts, tscope) = emitCgStmt (CgFork l stmts tscope)++emitProcWithStackFrame+   :: Convention                        -- entry convention+   -> Maybe CmmInfoTable                -- info table?+   -> CLabel                            -- label for the proc+   -> [CmmFormal]                       -- stack frame+   -> [CmmFormal]                       -- arguments+   -> CmmAGraphScoped                   -- code+   -> Bool                              -- do stack layout?+   -> FCode ()++emitProcWithStackFrame _conv mb_info lbl _stk_args [] blocks False+  = do  { dflags <- getDynFlags+        ; emitProc mb_info lbl [] blocks (widthInBytes (wordWidth dflags)) False+        }+emitProcWithStackFrame conv mb_info lbl stk_args args (graph, tscope) True+        -- do layout+  = do  { dflags <- getDynFlags+        ; let (offset, live, entry) = mkCallEntry dflags conv args stk_args+              graph' = entry MkGraph.<*> graph+        ; emitProc mb_info lbl live (graph', tscope) offset True+        }+emitProcWithStackFrame _ _ _ _ _ _ _ = panic "emitProcWithStackFrame"++emitProcWithConvention :: Convention -> Maybe CmmInfoTable -> CLabel+                       -> [CmmFormal]+                       -> CmmAGraphScoped+                       -> FCode ()+emitProcWithConvention conv mb_info lbl args blocks+  = emitProcWithStackFrame conv mb_info lbl [] args blocks True++emitProc :: Maybe CmmInfoTable -> CLabel -> [GlobalReg] -> CmmAGraphScoped+         -> Int -> Bool -> FCode ()+emitProc mb_info lbl live blocks offset do_layout+  = do  { dflags <- getDynFlags+        ; l <- newBlockId+        ; let+              blks :: CmmGraph+              blks = labelAGraph l blocks++              infos | Just info <- mb_info = mapSingleton (g_entry blks) info+                    | otherwise            = mapEmpty++              sinfo = StackInfo { arg_space = offset+                                , updfr_space = Just (initUpdFrameOff dflags)+                                , do_layout = do_layout }++              tinfo = TopInfo { info_tbls = infos+                              , stack_info=sinfo}++              proc_block = CmmProc tinfo lbl live blks++        ; state <- getState+        ; setState $ state { cgs_tops = cgs_tops state `snocOL` proc_block } }++getCmm :: FCode () -> FCode CmmGroup+-- Get all the CmmTops (there should be no stmts)+-- Return a single Cmm which may be split from other Cmms by+-- object splitting (at a later stage)+getCmm code+  = do  { state1 <- getState+        ; ((), state2) <- withState code (state1 { cgs_tops  = nilOL })+        ; setState $ state2 { cgs_tops = cgs_tops state1 }+        ; return (fromOL (cgs_tops state2)) }+++mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> FCode CmmAGraph+mkCmmIfThenElse e tbranch fbranch = mkCmmIfThenElse' e tbranch fbranch Nothing++mkCmmIfThenElse' :: CmmExpr -> CmmAGraph -> CmmAGraph+                 -> Maybe Bool -> FCode CmmAGraph+mkCmmIfThenElse' e tbranch fbranch likely = do+  tscp  <- getTickScope+  endif <- newBlockId+  tid   <- newBlockId+  fid   <- newBlockId++  let+    (test, then_, else_, likely') = case likely of+      Just False | Just e' <- maybeInvertCmmExpr e+        -- currently NCG doesn't know about likely+        -- annotations. We manually switch then and+        -- else branch so the likely false branch+        -- becomes a fallthrough.+        -> (e', fbranch, tbranch, Just True)+      _ -> (e, tbranch, fbranch, likely)++  return $ catAGraphs [ mkCbranch test tid fid likely'+                      , mkLabel tid tscp, then_, mkBranch endif+                      , mkLabel fid tscp, else_, mkLabel endif tscp ]++mkCmmIfGoto :: CmmExpr -> BlockId -> FCode CmmAGraph+mkCmmIfGoto e tid = mkCmmIfGoto' e tid Nothing++mkCmmIfGoto' :: CmmExpr -> BlockId -> Maybe Bool -> FCode CmmAGraph+mkCmmIfGoto' e tid l = do+  endif <- newBlockId+  tscp  <- getTickScope+  return $ catAGraphs [ mkCbranch e tid endif l, mkLabel endif tscp ]++mkCmmIfThen :: CmmExpr -> CmmAGraph -> FCode CmmAGraph+mkCmmIfThen e tbranch = mkCmmIfThen' e tbranch Nothing++mkCmmIfThen' :: CmmExpr -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph+mkCmmIfThen' e tbranch l = do+  endif <- newBlockId+  tid   <- newBlockId+  tscp  <- getTickScope+  return $ catAGraphs [ mkCbranch e tid endif l+                      , mkLabel tid tscp, tbranch, mkLabel endif tscp ]++mkCall :: CmmExpr -> (Convention, Convention) -> [CmmFormal] -> [CmmExpr]+       -> UpdFrameOffset -> [CmmExpr] -> FCode CmmAGraph+mkCall f (callConv, retConv) results actuals updfr_off extra_stack = do+  dflags <- getDynFlags+  k      <- newBlockId+  tscp   <- getTickScope+  let area = Young k+      (off, _, copyin) = copyInOflow dflags retConv area results []+      copyout = mkCallReturnsTo dflags f callConv actuals k off updfr_off extra_stack+  return $ catAGraphs [copyout, mkLabel k tscp, copyin]++mkCmmCall :: CmmExpr -> [CmmFormal] -> [CmmExpr] -> UpdFrameOffset+          -> FCode CmmAGraph+mkCmmCall f results actuals updfr_off+   = mkCall f (NativeDirectCall, NativeReturn) results actuals updfr_off []+++-- ----------------------------------------------------------------------------+-- turn CmmAGraph into CmmGraph, for making a new proc.++aGraphToGraph :: CmmAGraphScoped -> FCode CmmGraph+aGraphToGraph stmts+  = do  { l <- newBlockId+        ; return (labelAGraph l stmts) }
+ GHC/StgToCmm/Prim.hs view
@@ -0,0 +1,3008 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE LambdaCase #-}++#if __GLASGOW_HASKELL__ <= 808+-- GHC 8.10 deprecates this flag, but GHC 8.8 needs it+-- emitPrimOp is quite large+{-# OPTIONS_GHC -fmax-pmcheck-iterations=4000000 #-}+#endif++----------------------------------------------------------------------------+--+-- Stg to C--: primitive operations+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Prim (+   cgOpApp,+   cgPrimOp, -- internal(ish), used by cgCase to get code for a+             -- comparison without also turning it into a Bool.+   shouldInlinePrimOp+ ) where++#include "HsVersions.h"++import GhcPrelude hiding ((<*>))++import GHC.StgToCmm.Layout+import GHC.StgToCmm.Foreign+import GHC.StgToCmm.Env+import GHC.StgToCmm.Monad+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Ticky+import GHC.StgToCmm.Heap+import GHC.StgToCmm.Prof ( costCentreFrom )++import DynFlags+import GHC.Platform+import BasicTypes+import BlockId+import MkGraph+import StgSyn+import Cmm+import Module   ( rtsUnitId )+import Type     ( Type, tyConAppTyCon )+import TyCon+import CLabel+import CmmUtils+import PrimOp+import SMRep+import FastString+import Outputable+import Util+import Data.Maybe++import Data.Bits ((.&.), bit)+import Control.Monad (liftM, when, unless)++------------------------------------------------------------------------+--      Primitive operations and foreign calls+------------------------------------------------------------------------++{- Note [Foreign call results]+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~+A foreign call always returns an unboxed tuple of results, one+of which is the state token.  This seems to happen even for pure+calls.++Even if we returned a single result for pure calls, it'd still be+right to wrap it in a singleton unboxed tuple, because the result+might be a Haskell closure pointer, we don't want to evaluate it. -}++----------------------------------+cgOpApp :: StgOp        -- The op+        -> [StgArg]     -- Arguments+        -> Type         -- Result type (always an unboxed tuple)+        -> FCode ReturnKind++-- Foreign calls+cgOpApp (StgFCallOp fcall ty) stg_args res_ty+  = cgForeignCall fcall ty stg_args res_ty+      -- Note [Foreign call results]++cgOpApp (StgPrimOp primop) args res_ty = do+    dflags <- getDynFlags+    cmm_args <- getNonVoidArgAmodes args+    case emitPrimOp dflags primop cmm_args of+        PrimopCmmEmit_External -> do  -- out-of-line+          let fun = CmmLit (CmmLabel (mkRtsPrimOpLabel primop))+          emitCall (NativeNodeCall, NativeReturn) fun cmm_args++        PrimopCmmEmit_Raw f -> do+          exprs <- f res_ty+          emitReturn exprs++        PrimopCmmEmit_IntoRegs f  -- inline+          | ReturnsPrim VoidRep <- result_info+          -> do f []+                emitReturn []++          | ReturnsPrim rep <- result_info+          -> do dflags <- getDynFlags+                res <- newTemp (primRepCmmType dflags rep)+                f [res]+                emitReturn [CmmReg (CmmLocal res)]++          | ReturnsAlg tycon <- result_info, isUnboxedTupleTyCon tycon+          -> do (regs, _hints) <- newUnboxedTupleRegs res_ty+                f regs+                emitReturn (map (CmmReg . CmmLocal) regs)++          | otherwise -> panic "cgPrimop"+          where+             result_info = getPrimOpResultInfo primop++cgOpApp (StgPrimCallOp primcall) args _res_ty+  = do  { cmm_args <- getNonVoidArgAmodes args+        ; let fun = CmmLit (CmmLabel (mkPrimCallLabel primcall))+        ; emitCall (NativeNodeCall, NativeReturn) fun cmm_args }++-- | Interpret the argument as an unsigned value, assuming the value+-- is given in two-complement form in the given width.+--+-- Example: @asUnsigned W64 (-1)@ is 18446744073709551615.+--+-- This function is used to work around the fact that many array+-- primops take Int# arguments, but we interpret them as unsigned+-- quantities in the code gen. This means that we have to be careful+-- every time we work on e.g. a CmmInt literal that corresponds to the+-- array size, as it might contain a negative Integer value if the+-- user passed a value larger than 2^(wORD_SIZE_IN_BITS-1) as the Int#+-- literal.+asUnsigned :: Width -> Integer -> Integer+asUnsigned w n = n .&. (bit (widthInBits w) - 1)++---------------------------------------------------+cgPrimOp   :: [LocalReg]        -- where to put the results+           -> PrimOp            -- the op+           -> [StgArg]          -- arguments+           -> FCode ()++cgPrimOp results op args = do+  dflags <- getDynFlags+  arg_exprs <- getNonVoidArgAmodes args+  case emitPrimOp dflags op arg_exprs of+    PrimopCmmEmit_External -> panic "External prim op"+    PrimopCmmEmit_Raw _ -> panic "caller should handle TagToEnum themselves"+    PrimopCmmEmit_IntoRegs f -> f results+++------------------------------------------------------------------------+--      Emitting code for a primop+------------------------------------------------------------------------++shouldInlinePrimOp :: DynFlags -> PrimOp -> [CmmExpr] -> Bool+shouldInlinePrimOp dflags op args = case emitPrimOp dflags op args of+  PrimopCmmEmit_External -> False+  PrimopCmmEmit_IntoRegs _ -> True+  PrimopCmmEmit_Raw _ -> True++-- TODO: Several primop implementations (e.g. 'doNewByteArrayOp') use+-- ByteOff (or some other fixed width signed type) to represent+-- array sizes or indices. This means that these will overflow for+-- large enough sizes.++-- TODO: Several primops, such as 'copyArray#', only have an inline+-- implementation (below) but could possibly have both an inline+-- implementation and an out-of-line implementation, just like+-- 'newArray#'. This would lower the amount of code generated,+-- hopefully without a performance impact (needs to be measured).++-- | The big function handling all the primops.+--+-- In the simple case, there is just one implementation, and we emit that.+--+-- In more complex cases, there is a foreign call (out of line) fallback. This+-- might happen e.g. if there's enough static information, such as statically+-- know arguments.+emitPrimOp+  :: DynFlags+  -> PrimOp            -- ^ The primop+  -> [CmmExpr]         -- ^ The primop arguments+  -> PrimopCmmEmit+emitPrimOp dflags = \case+  NewByteArrayOp_Char -> \case+    [(CmmLit (CmmInt n w))]+      | asUnsigned w n <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone  $ \ [res] -> doNewByteArrayOp res (fromInteger n)+    _ -> PrimopCmmEmit_External++  NewArrayOp -> \case+    [(CmmLit (CmmInt n w)), init]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \[res] -> doNewArrayOp res (arrPtrsRep dflags (fromInteger n)) mkMAP_DIRTY_infoLabel+        [ (mkIntExpr dflags (fromInteger n),+           fixedHdrSize dflags + oFFSET_StgMutArrPtrs_ptrs dflags)+        , (mkIntExpr dflags (nonHdrSizeW (arrPtrsRep dflags (fromInteger n))),+           fixedHdrSize dflags + oFFSET_StgMutArrPtrs_size dflags)+        ]+        (fromInteger n) init+    _ -> PrimopCmmEmit_External++  CopyArrayOp -> \case+    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] ->+      opAllDone $ \ [] -> doCopyArrayOp src src_off dst dst_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CopyMutableArrayOp -> \case+    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] ->+      opAllDone $ \ [] -> doCopyMutableArrayOp src src_off dst dst_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CopyArrayArrayOp -> \case+    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] ->+      opAllDone $ \ [] -> doCopyArrayOp src src_off dst dst_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CopyMutableArrayArrayOp -> \case+    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] ->+      opAllDone $ \ [] -> doCopyMutableArrayOp src src_off dst dst_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CloneArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneArray mkMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CloneMutableArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneArray mkMAP_DIRTY_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  FreezeArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneArray mkMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  ThawArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneArray mkMAP_DIRTY_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  NewSmallArrayOp -> \case+    [(CmmLit (CmmInt n w)), init]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] ->+        doNewArrayOp res (smallArrPtrsRep (fromInteger n)) mkSMAP_DIRTY_infoLabel+        [ (mkIntExpr dflags (fromInteger n),+           fixedHdrSize dflags + oFFSET_StgSmallMutArrPtrs_ptrs dflags)+        ]+        (fromInteger n) init+    _ -> PrimopCmmEmit_External++  CopySmallArrayOp -> \case+    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] ->+      opAllDone $ \ [] -> doCopySmallArrayOp src src_off dst dst_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CopySmallMutableArrayOp -> \case+    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] ->+      opAllDone $ \ [] -> doCopySmallMutableArrayOp src src_off dst dst_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CloneSmallArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  CloneSmallMutableArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneSmallArray mkSMAP_DIRTY_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  FreezeSmallArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++  ThawSmallArrayOp -> \case+    [src, src_off, (CmmLit (CmmInt n w))]+      | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags)+      -> opAllDone $ \ [res] -> emitCloneSmallArray mkSMAP_DIRTY_infoLabel res src src_off (fromInteger n)+    _ -> PrimopCmmEmit_External++-- First we handle various awkward cases specially.++  ParOp -> \[arg] -> opAllDone $ \[res] -> do+    -- for now, just implement this in a C function+    -- later, we might want to inline it.+    emitCCall+        [(res,NoHint)]+        (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))+        [(baseExpr, AddrHint), (arg,AddrHint)]++  SparkOp -> \[arg] -> opAllDone $ \[res] -> do+    -- returns the value of arg in res.  We're going to therefore+    -- refer to arg twice (once to pass to newSpark(), and once to+    -- assign to res), so put it in a temporary.+    tmp <- assignTemp arg+    tmp2 <- newTemp (bWord dflags)+    emitCCall+        [(tmp2,NoHint)]+        (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))+        [(baseExpr, AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)]+    emitAssign (CmmLocal res) (CmmReg (CmmLocal tmp))++  GetCCSOfOp -> \[arg] -> opAllDone $ \[res] -> do+    let+      val+       | gopt Opt_SccProfilingOn dflags = costCentreFrom dflags (cmmUntag dflags arg)+       | otherwise                      = CmmLit (zeroCLit dflags)+    emitAssign (CmmLocal res) val++  GetCurrentCCSOp -> \[_] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) cccsExpr++  MyThreadIdOp -> \[] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) currentTSOExpr++  ReadMutVarOp -> \[mutv] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) (cmmLoadIndexW dflags mutv (fixedHdrSizeW dflags) (gcWord dflags))++  WriteMutVarOp -> \[mutv, var] -> opAllDone $ \res@[] -> do+    old_val <- CmmLocal <$> newTemp (cmmExprType dflags var)+    emitAssign old_val (cmmLoadIndexW dflags mutv (fixedHdrSizeW dflags) (gcWord dflags))++    -- Without this write barrier, other CPUs may see this pointer before+    -- the writes for the closure it points to have occurred.+    -- Note that this also must come after we read the old value to ensure+    -- that the read of old_val comes before another core's write to the+    -- MutVar's value.+    emitPrimCall res MO_WriteBarrier []+    emitStore (cmmOffsetW dflags mutv (fixedHdrSizeW dflags)) var+    emitCCall+            [{-no results-}]+            (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))+            [(baseExpr, AddrHint), (mutv, AddrHint), (CmmReg old_val, AddrHint)]++--  #define sizzeofByteArrayzh(r,a) \+--     r = ((StgArrBytes *)(a))->bytes+  SizeofByteArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emit $ mkAssign (CmmLocal res) (cmmLoadIndexW dflags arg (fixedHdrSizeW dflags) (bWord dflags))++--  #define sizzeofMutableByteArrayzh(r,a) \+--      r = ((StgArrBytes *)(a))->bytes+  SizeofMutableByteArrayOp -> emitPrimOp dflags SizeofByteArrayOp++--  #define getSizzeofMutableByteArrayzh(r,a) \+--      r = ((StgArrBytes *)(a))->bytes+  GetSizeofMutableByteArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) (cmmLoadIndexW dflags arg (fixedHdrSizeW dflags) (bWord dflags))+++--  #define touchzh(o)                  /* nothing */+  TouchOp -> \args@[_] -> opAllDone $ \res@[] -> do+    emitPrimCall res MO_Touch args++--  #define byteArrayContentszh(r,a) r = BYTE_ARR_CTS(a)+  ByteArrayContents_Char -> \[arg] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) (cmmOffsetB dflags arg (arrWordsHdrSize dflags))++--  #define stableNameToIntzh(r,s)   (r = ((StgStableName *)s)->sn)+  StableNameToIntOp -> \[arg] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) (cmmLoadIndexW dflags arg (fixedHdrSizeW dflags) (bWord dflags))++  ReallyUnsafePtrEqualityOp -> \[arg1, arg2] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) (CmmMachOp (mo_wordEq dflags) [arg1,arg2])++--  #define addrToHValuezh(r,a) r=(P_)a+  AddrToAnyOp -> \[arg] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) arg++--  #define hvalueToAddrzh(r, a) r=(W_)a+  AnyToAddrOp -> \[arg] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) arg++{- Freezing arrays-of-ptrs requires changing an info table, for the+   benefit of the generational collector.  It needs to scavenge mutable+   objects, even if they are in old space.  When they become immutable,+   they can be removed from this scavenge list.  -}++--  #define unsafeFreezzeArrayzh(r,a)+--      {+--        SET_INFO((StgClosure *)a,&stg_MUT_ARR_PTRS_FROZEN_DIRTY_info);+--        r = a;+--      }+  UnsafeFreezeArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emit $ catAGraphs+      [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN_DIRTY_infoLabel)),+        mkAssign (CmmLocal res) arg ]+  UnsafeFreezeArrayArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emit $ catAGraphs+      [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN_DIRTY_infoLabel)),+        mkAssign (CmmLocal res) arg ]+  UnsafeFreezeSmallArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emit $ catAGraphs+      [ setInfo arg (CmmLit (CmmLabel mkSMAP_FROZEN_DIRTY_infoLabel)),+        mkAssign (CmmLocal res) arg ]++--  #define unsafeFreezzeByteArrayzh(r,a)       r=(a)+  UnsafeFreezeByteArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emitAssign (CmmLocal res) arg++-- Reading/writing pointer arrays++  ReadArrayOp -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  IndexArrayOp -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  WriteArrayOp -> \[obj, ix, v] -> opAllDone $ \[] -> do+    doWritePtrArrayOp obj ix v++  IndexArrayArrayOp_ByteArray -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  IndexArrayArrayOp_ArrayArray -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  ReadArrayArrayOp_ByteArray -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  ReadArrayArrayOp_MutableByteArray -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  ReadArrayArrayOp_ArrayArray -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  ReadArrayArrayOp_MutableArrayArray -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadPtrArrayOp res obj ix+  WriteArrayArrayOp_ByteArray -> \[obj,ix,v] -> opAllDone $ \[] -> do+    doWritePtrArrayOp obj ix v+  WriteArrayArrayOp_MutableByteArray -> \[obj,ix,v] -> opAllDone $ \[] -> do+    doWritePtrArrayOp obj ix v+  WriteArrayArrayOp_ArrayArray -> \[obj,ix,v] -> opAllDone $ \[] -> do+    doWritePtrArrayOp obj ix v+  WriteArrayArrayOp_MutableArrayArray -> \[obj,ix,v] -> opAllDone $ \[] -> do+    doWritePtrArrayOp obj ix v++  ReadSmallArrayOp -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadSmallPtrArrayOp res obj ix+  IndexSmallArrayOp -> \[obj, ix] -> opAllDone $ \[res] -> do+    doReadSmallPtrArrayOp res obj ix+  WriteSmallArrayOp -> \[obj,ix,v] -> opAllDone $ \[] -> do+    doWriteSmallPtrArrayOp obj ix v++-- Getting the size of pointer arrays++  SizeofArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emit $ mkAssign (CmmLocal res) (cmmLoadIndexW dflags arg+      (fixedHdrSizeW dflags + bytesToWordsRoundUp dflags (oFFSET_StgMutArrPtrs_ptrs dflags))+        (bWord dflags))+  SizeofMutableArrayOp -> emitPrimOp dflags SizeofArrayOp+  SizeofArrayArrayOp -> emitPrimOp dflags SizeofArrayOp+  SizeofMutableArrayArrayOp -> emitPrimOp dflags SizeofArrayOp+  SizeofSmallArrayOp -> \[arg] -> opAllDone $ \[res] -> do+    emit $ mkAssign (CmmLocal res)+     (cmmLoadIndexW dflags arg+     (fixedHdrSizeW dflags + bytesToWordsRoundUp dflags (oFFSET_StgSmallMutArrPtrs_ptrs dflags))+        (bWord dflags))++  SizeofSmallMutableArrayOp -> emitPrimOp dflags SizeofSmallArrayOp+  GetSizeofSmallMutableArrayOp -> emitPrimOp dflags SizeofSmallArrayOp++-- IndexXXXoffAddr++  IndexOffAddrOp_Char -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8 res args+  IndexOffAddrOp_WideChar -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args+  IndexOffAddrOp_Int -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  IndexOffAddrOp_Word -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  IndexOffAddrOp_Addr -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  IndexOffAddrOp_Float -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing f32 res args+  IndexOffAddrOp_Double -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing f64 res args+  IndexOffAddrOp_StablePtr -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  IndexOffAddrOp_Int8 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_s_8ToWord dflags)) b8  res args+  IndexOffAddrOp_Int16 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_s_16ToWord dflags)) b16 res args+  IndexOffAddrOp_Int32 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_s_32ToWord dflags)) b32 res args+  IndexOffAddrOp_Int64 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing b64 res args+  IndexOffAddrOp_Word8 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8  res args+  IndexOffAddrOp_Word16 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_16ToWord dflags)) b16 res args+  IndexOffAddrOp_Word32 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args+  IndexOffAddrOp_Word64 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing b64 res args++-- ReadXXXoffAddr, which are identical, for our purposes, to IndexXXXoffAddr.++  ReadOffAddrOp_Char -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8 res args+  ReadOffAddrOp_WideChar -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args+  ReadOffAddrOp_Int -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  ReadOffAddrOp_Word -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  ReadOffAddrOp_Addr -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  ReadOffAddrOp_Float -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing f32 res args+  ReadOffAddrOp_Double -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing f64 res args+  ReadOffAddrOp_StablePtr -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing (bWord dflags) res args+  ReadOffAddrOp_Int8 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_s_8ToWord dflags)) b8  res args+  ReadOffAddrOp_Int16 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_s_16ToWord dflags)) b16 res args+  ReadOffAddrOp_Int32 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_s_32ToWord dflags)) b32 res args+  ReadOffAddrOp_Int64 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing b64 res args+  ReadOffAddrOp_Word8 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8  res args+  ReadOffAddrOp_Word16 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_16ToWord dflags)) b16 res args+  ReadOffAddrOp_Word32 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args+  ReadOffAddrOp_Word64 -> \args -> opAllDone $ \res -> do+    doIndexOffAddrOp   Nothing b64 res args++-- IndexXXXArray++  IndexByteArrayOp_Char -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8 res args+  IndexByteArrayOp_WideChar -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32 res args+  IndexByteArrayOp_Int -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  IndexByteArrayOp_Word -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  IndexByteArrayOp_Addr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  IndexByteArrayOp_Float -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing f32 res args+  IndexByteArrayOp_Double -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing f64 res args+  IndexByteArrayOp_StablePtr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  IndexByteArrayOp_Int8 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_s_8ToWord dflags)) b8  res args+  IndexByteArrayOp_Int16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_s_16ToWord dflags)) b16  res args+  IndexByteArrayOp_Int32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_s_32ToWord dflags)) b32  res args+  IndexByteArrayOp_Int64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing b64  res args+  IndexByteArrayOp_Word8 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8  res args+  IndexByteArrayOp_Word16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_16ToWord dflags)) b16  res args+  IndexByteArrayOp_Word32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32  res args+  IndexByteArrayOp_Word64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing b64  res args++-- ReadXXXArray, identical to IndexXXXArray.++  ReadByteArrayOp_Char -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8 res args+  ReadByteArrayOp_WideChar -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32 res args+  ReadByteArrayOp_Int -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  ReadByteArrayOp_Word -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  ReadByteArrayOp_Addr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  ReadByteArrayOp_Float -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing f32 res args+  ReadByteArrayOp_Double -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing f64 res args+  ReadByteArrayOp_StablePtr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing (bWord dflags) res args+  ReadByteArrayOp_Int8 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_s_8ToWord dflags)) b8  res args+  ReadByteArrayOp_Int16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_s_16ToWord dflags)) b16  res args+  ReadByteArrayOp_Int32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_s_32ToWord dflags)) b32  res args+  ReadByteArrayOp_Int64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing b64  res args+  ReadByteArrayOp_Word8 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8  res args+  ReadByteArrayOp_Word16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_16ToWord dflags)) b16  res args+  ReadByteArrayOp_Word32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32  res args+  ReadByteArrayOp_Word64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOp   Nothing b64  res args++-- IndexWord8ArrayAsXXX++  IndexByteArrayOp_Word8AsChar -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_8ToWord dflags)) b8 b8 res args+  IndexByteArrayOp_Word8AsWideChar -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args+  IndexByteArrayOp_Word8AsInt -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  IndexByteArrayOp_Word8AsWord -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  IndexByteArrayOp_Word8AsAddr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  IndexByteArrayOp_Word8AsFloat -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing f32 b8 res args+  IndexByteArrayOp_Word8AsDouble -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing f64 b8 res args+  IndexByteArrayOp_Word8AsStablePtr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  IndexByteArrayOp_Word8AsInt16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_s_16ToWord dflags)) b16 b8 res args+  IndexByteArrayOp_Word8AsInt32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_s_32ToWord dflags)) b32 b8 res args+  IndexByteArrayOp_Word8AsInt64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing b64 b8 res args+  IndexByteArrayOp_Word8AsWord16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_16ToWord dflags)) b16 b8 res args+  IndexByteArrayOp_Word8AsWord32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args+  IndexByteArrayOp_Word8AsWord64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing b64 b8 res args++-- ReadInt8ArrayAsXXX, identical to IndexInt8ArrayAsXXX++  ReadByteArrayOp_Word8AsChar -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_8ToWord dflags)) b8 b8 res args+  ReadByteArrayOp_Word8AsWideChar -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args+  ReadByteArrayOp_Word8AsInt -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  ReadByteArrayOp_Word8AsWord -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  ReadByteArrayOp_Word8AsAddr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  ReadByteArrayOp_Word8AsFloat -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing f32 b8 res args+  ReadByteArrayOp_Word8AsDouble -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing f64 b8 res args+  ReadByteArrayOp_Word8AsStablePtr -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args+  ReadByteArrayOp_Word8AsInt16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_s_16ToWord dflags)) b16 b8 res args+  ReadByteArrayOp_Word8AsInt32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_s_32ToWord dflags)) b32 b8 res args+  ReadByteArrayOp_Word8AsInt64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing b64 b8 res args+  ReadByteArrayOp_Word8AsWord16 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_16ToWord dflags)) b16 b8 res args+  ReadByteArrayOp_Word8AsWord32 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args+  ReadByteArrayOp_Word8AsWord64 -> \args -> opAllDone $ \res -> do+    doIndexByteArrayOpAs   Nothing b64 b8 res args++-- WriteXXXoffAddr++  WriteOffAddrOp_Char -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo8 dflags))  b8 res args+  WriteOffAddrOp_WideChar -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args+  WriteOffAddrOp_Int -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing (bWord dflags) res args+  WriteOffAddrOp_Word -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing (bWord dflags) res args+  WriteOffAddrOp_Addr -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing (bWord dflags) res args+  WriteOffAddrOp_Float -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing f32 res args+  WriteOffAddrOp_Double -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing f64 res args+  WriteOffAddrOp_StablePtr -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing (bWord dflags) res args+  WriteOffAddrOp_Int8 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo8 dflags))  b8 res args+  WriteOffAddrOp_Int16 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo16 dflags)) b16 res args+  WriteOffAddrOp_Int32 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args+  WriteOffAddrOp_Int64 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing b64 res args+  WriteOffAddrOp_Word8 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo8 dflags))  b8 res args+  WriteOffAddrOp_Word16 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo16 dflags)) b16 res args+  WriteOffAddrOp_Word32 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args+  WriteOffAddrOp_Word64 -> \args -> opAllDone $ \res -> do+    doWriteOffAddrOp Nothing b64 res args++-- WriteXXXArray++  WriteByteArrayOp_Char -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8 res args+  WriteByteArrayOp_WideChar -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args+  WriteByteArrayOp_Int -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing (bWord dflags) res args+  WriteByteArrayOp_Word -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing (bWord dflags) res args+  WriteByteArrayOp_Addr -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing (bWord dflags) res args+  WriteByteArrayOp_Float -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing f32 res args+  WriteByteArrayOp_Double -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing f64 res args+  WriteByteArrayOp_StablePtr -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing (bWord dflags) res args+  WriteByteArrayOp_Int8 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8 res args+  WriteByteArrayOp_Int16 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b16 res args+  WriteByteArrayOp_Int32 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args+  WriteByteArrayOp_Int64 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b64 res args+  WriteByteArrayOp_Word8 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8  res args+  WriteByteArrayOp_Word16 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b16 res args+  WriteByteArrayOp_Word32 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args+  WriteByteArrayOp_Word64 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b64 res args++-- WriteInt8ArrayAsXXX++  WriteByteArrayOp_Word8AsChar -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8 res args+  WriteByteArrayOp_Word8AsWideChar -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b8 res args+  WriteByteArrayOp_Word8AsInt -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args+  WriteByteArrayOp_Word8AsWord -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args+  WriteByteArrayOp_Word8AsAddr -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args+  WriteByteArrayOp_Word8AsFloat -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args+  WriteByteArrayOp_Word8AsDouble -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args+  WriteByteArrayOp_Word8AsStablePtr -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args+  WriteByteArrayOp_Word8AsInt16 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b8 res args+  WriteByteArrayOp_Word8AsInt32 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b8 res args+  WriteByteArrayOp_Word8AsInt64 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args+  WriteByteArrayOp_Word8AsWord16 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b8 res args+  WriteByteArrayOp_Word8AsWord32 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b8 res args+  WriteByteArrayOp_Word8AsWord64 -> \args -> opAllDone $ \res -> do+    doWriteByteArrayOp Nothing b8 res args++-- Copying and setting byte arrays+  CopyByteArrayOp -> \[src,src_off,dst,dst_off,n] -> opAllDone $ \[] -> do+    doCopyByteArrayOp src src_off dst dst_off n+  CopyMutableByteArrayOp -> \[src,src_off,dst,dst_off,n] -> opAllDone $ \[] -> do+    doCopyMutableByteArrayOp src src_off dst dst_off n+  CopyByteArrayToAddrOp -> \[src,src_off,dst,n] -> opAllDone $ \[] -> do+    doCopyByteArrayToAddrOp src src_off dst n+  CopyMutableByteArrayToAddrOp -> \[src,src_off,dst,n] -> opAllDone $ \[] -> do+    doCopyMutableByteArrayToAddrOp src src_off dst n+  CopyAddrToByteArrayOp -> \[src,dst,dst_off,n] -> opAllDone $ \[] -> do+    doCopyAddrToByteArrayOp src dst dst_off n+  SetByteArrayOp -> \[ba,off,len,c] -> opAllDone $ \[] -> do+    doSetByteArrayOp ba off len c++-- Comparing byte arrays+  CompareByteArraysOp -> \[ba1,ba1_off,ba2,ba2_off,n] -> opAllDone $ \[res] -> do+    doCompareByteArraysOp res ba1 ba1_off ba2 ba2_off n++  BSwap16Op -> \[w] -> opAllDone $ \[res] -> do+    emitBSwapCall res w W16+  BSwap32Op -> \[w] -> opAllDone $ \[res] -> do+    emitBSwapCall res w W32+  BSwap64Op -> \[w] -> opAllDone $ \[res] -> do+    emitBSwapCall res w W64+  BSwapOp -> \[w] -> opAllDone $ \[res] -> do+    emitBSwapCall res w (wordWidth dflags)++  BRev8Op -> \[w] -> opAllDone $ \[res] -> do+    emitBRevCall res w W8+  BRev16Op -> \[w] -> opAllDone $ \[res] -> do+    emitBRevCall res w W16+  BRev32Op -> \[w] -> opAllDone $ \[res] -> do+    emitBRevCall res w W32+  BRev64Op -> \[w] -> opAllDone $ \[res] -> do+    emitBRevCall res w W64+  BRevOp -> \[w] -> opAllDone $ \[res] -> do+    emitBRevCall res w (wordWidth dflags)++-- Population count+  PopCnt8Op -> \[w] -> opAllDone $ \[res] -> do+    emitPopCntCall res w W8+  PopCnt16Op -> \[w] -> opAllDone $ \[res] -> do+    emitPopCntCall res w W16+  PopCnt32Op -> \[w] -> opAllDone $ \[res] -> do+    emitPopCntCall res w W32+  PopCnt64Op -> \[w] -> opAllDone $ \[res] -> do+    emitPopCntCall res w W64+  PopCntOp -> \[w] -> opAllDone $ \[res] -> do+    emitPopCntCall res w (wordWidth dflags)++-- Parallel bit deposit+  Pdep8Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPdepCall res src mask W8+  Pdep16Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPdepCall res src mask W16+  Pdep32Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPdepCall res src mask W32+  Pdep64Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPdepCall res src mask W64+  PdepOp -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPdepCall res src mask (wordWidth dflags)++-- Parallel bit extract+  Pext8Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPextCall res src mask W8+  Pext16Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPextCall res src mask W16+  Pext32Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPextCall res src mask W32+  Pext64Op -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPextCall res src mask W64+  PextOp -> \[src, mask] -> opAllDone $ \[res] -> do+    emitPextCall res src mask (wordWidth dflags)++-- count leading zeros+  Clz8Op -> \[w] -> opAllDone $ \[res] -> do+    emitClzCall res w W8+  Clz16Op -> \[w] -> opAllDone $ \[res] -> do+    emitClzCall res w W16+  Clz32Op -> \[w] -> opAllDone $ \[res] -> do+    emitClzCall res w W32+  Clz64Op -> \[w] -> opAllDone $ \[res] -> do+    emitClzCall res w W64+  ClzOp -> \[w] -> opAllDone $ \[res] -> do+    emitClzCall res w (wordWidth dflags)++-- count trailing zeros+  Ctz8Op -> \[w] -> opAllDone $ \[res] -> do+    emitCtzCall res w W8+  Ctz16Op -> \[w] -> opAllDone $ \[res] -> do+    emitCtzCall res w W16+  Ctz32Op -> \[w] -> opAllDone $ \[res] -> do+    emitCtzCall res w W32+  Ctz64Op -> \[w] -> opAllDone $ \[res] -> do+    emitCtzCall res w W64+  CtzOp -> \[w] -> opAllDone $ \[res] -> do+    emitCtzCall res w (wordWidth dflags)++-- Unsigned int to floating point conversions+  Word2FloatOp -> \[w] -> opAllDone $ \[res] -> do+    emitPrimCall [res] (MO_UF_Conv W32) [w]+  Word2DoubleOp -> \[w] -> opAllDone $ \[res] -> do+    emitPrimCall [res] (MO_UF_Conv W64) [w]++-- SIMD primops+  (VecBroadcastOp vcat n w) -> \[e] -> opAllDone $ \[res] -> do+    checkVecCompatibility dflags vcat n w+    doVecPackOp (vecElemInjectCast dflags vcat w) ty zeros (replicate n e) res+   where+    zeros :: CmmExpr+    zeros = CmmLit $ CmmVec (replicate n zero)++    zero :: CmmLit+    zero = case vcat of+             IntVec   -> CmmInt 0 w+             WordVec  -> CmmInt 0 w+             FloatVec -> CmmFloat 0 w++    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecPackOp vcat n w) -> \es -> opAllDone $ \[res] -> do+    checkVecCompatibility dflags vcat n w+    when (es `lengthIsNot` n) $+        panic "emitPrimOp: VecPackOp has wrong number of arguments"+    doVecPackOp (vecElemInjectCast dflags vcat w) ty zeros es res+   where+    zeros :: CmmExpr+    zeros = CmmLit $ CmmVec (replicate n zero)++    zero :: CmmLit+    zero = case vcat of+             IntVec   -> CmmInt 0 w+             WordVec  -> CmmInt 0 w+             FloatVec -> CmmFloat 0 w++    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecUnpackOp vcat n w) -> \[arg] -> opAllDone $ \res -> do+    checkVecCompatibility dflags vcat n w+    when (res `lengthIsNot` n) $+        panic "emitPrimOp: VecUnpackOp has wrong number of results"+    doVecUnpackOp (vecElemProjectCast dflags vcat w) ty arg res+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecInsertOp vcat n w) -> \[v,e,i] -> opAllDone $ \[res] -> do+    checkVecCompatibility dflags vcat n w+    doVecInsertOp (vecElemInjectCast dflags vcat w) ty v e i res+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecIndexByteArrayOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexByteArrayOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecReadByteArrayOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexByteArrayOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecWriteByteArrayOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doWriteByteArrayOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecIndexOffAddrOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexOffAddrOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecReadOffAddrOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexOffAddrOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecWriteOffAddrOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doWriteOffAddrOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecVmmType vcat n w++  (VecIndexScalarByteArrayOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexByteArrayOpAs Nothing vecty ty res0 args+   where+    vecty :: CmmType+    vecty = vecVmmType vcat n w++    ty :: CmmType+    ty = vecCmmCat vcat w++  (VecReadScalarByteArrayOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexByteArrayOpAs Nothing vecty ty res0 args+   where+    vecty :: CmmType+    vecty = vecVmmType vcat n w++    ty :: CmmType+    ty = vecCmmCat vcat w++  (VecWriteScalarByteArrayOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doWriteByteArrayOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecCmmCat vcat w++  (VecIndexScalarOffAddrOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexOffAddrOpAs Nothing vecty ty res0 args+   where+    vecty :: CmmType+    vecty = vecVmmType vcat n w++    ty :: CmmType+    ty = vecCmmCat vcat w++  (VecReadScalarOffAddrOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doIndexOffAddrOpAs Nothing vecty ty res0 args+   where+    vecty :: CmmType+    vecty = vecVmmType vcat n w++    ty :: CmmType+    ty = vecCmmCat vcat w++  (VecWriteScalarOffAddrOp vcat n w) -> \args -> opAllDone $ \res0 -> do+    checkVecCompatibility dflags vcat n w+    doWriteOffAddrOp Nothing ty res0 args+   where+    ty :: CmmType+    ty = vecCmmCat vcat w++-- Prefetch+  PrefetchByteArrayOp3         -> \args -> opAllDone $ \[] -> do+    doPrefetchByteArrayOp 3  args+  PrefetchMutableByteArrayOp3  -> \args -> opAllDone $ \[] -> do+    doPrefetchMutableByteArrayOp 3  args+  PrefetchAddrOp3              -> \args -> opAllDone $ \[] -> do+    doPrefetchAddrOp  3  args+  PrefetchValueOp3             -> \args -> opAllDone $ \[] -> do+    doPrefetchValueOp 3 args++  PrefetchByteArrayOp2         -> \args -> opAllDone $ \[] -> do+    doPrefetchByteArrayOp 2  args+  PrefetchMutableByteArrayOp2  -> \args -> opAllDone $ \[] -> do+    doPrefetchMutableByteArrayOp 2  args+  PrefetchAddrOp2              -> \args -> opAllDone $ \[] -> do+    doPrefetchAddrOp 2  args+  PrefetchValueOp2             -> \args -> opAllDone $ \[] -> do+    doPrefetchValueOp 2 args+  PrefetchByteArrayOp1         -> \args -> opAllDone $ \[] -> do+    doPrefetchByteArrayOp 1  args+  PrefetchMutableByteArrayOp1  -> \args -> opAllDone $ \[] -> do+    doPrefetchMutableByteArrayOp 1  args+  PrefetchAddrOp1              -> \args -> opAllDone $ \[] -> do+    doPrefetchAddrOp 1  args+  PrefetchValueOp1             -> \args -> opAllDone $ \[] -> do+    doPrefetchValueOp 1 args++  PrefetchByteArrayOp0         -> \args -> opAllDone $ \[] -> do+    doPrefetchByteArrayOp 0  args+  PrefetchMutableByteArrayOp0  -> \args -> opAllDone $ \[] -> do+    doPrefetchMutableByteArrayOp 0  args+  PrefetchAddrOp0              -> \args -> opAllDone $ \[] -> do+    doPrefetchAddrOp 0  args+  PrefetchValueOp0             -> \args -> opAllDone $ \[] -> do+    doPrefetchValueOp 0 args++-- Atomic read-modify-write+  FetchAddByteArrayOp_Int -> \[mba, ix, n] -> opAllDone $ \[res] -> do+    doAtomicRMW res AMO_Add mba ix (bWord dflags) n+  FetchSubByteArrayOp_Int -> \[mba, ix, n] -> opAllDone $ \[res] -> do+    doAtomicRMW res AMO_Sub mba ix (bWord dflags) n+  FetchAndByteArrayOp_Int -> \[mba, ix, n] -> opAllDone $ \[res] -> do+    doAtomicRMW res AMO_And mba ix (bWord dflags) n+  FetchNandByteArrayOp_Int -> \[mba, ix, n] -> opAllDone $ \[res] -> do+    doAtomicRMW res AMO_Nand mba ix (bWord dflags) n+  FetchOrByteArrayOp_Int -> \[mba, ix, n] -> opAllDone $ \[res] -> do+    doAtomicRMW res AMO_Or mba ix (bWord dflags) n+  FetchXorByteArrayOp_Int -> \[mba, ix, n] -> opAllDone $ \[res] -> do+    doAtomicRMW res AMO_Xor mba ix (bWord dflags) n+  AtomicReadByteArrayOp_Int -> \[mba, ix] -> opAllDone $ \[res] -> do+    doAtomicReadByteArray res mba ix (bWord dflags)+  AtomicWriteByteArrayOp_Int -> \[mba, ix, val] -> opAllDone $ \[] -> do+    doAtomicWriteByteArray mba ix (bWord dflags) val+  CasByteArrayOp_Int -> \[mba, ix, old, new] -> opAllDone $ \[res] -> do+    doCasByteArray res mba ix (bWord dflags) old new++-- The rest just translate straightforwardly++  Int2WordOp      -> \args -> opNop args+  Word2IntOp      -> \args -> opNop args+  Int2AddrOp      -> \args -> opNop args+  Addr2IntOp      -> \args -> opNop args+  ChrOp           -> \args -> opNop args  -- Int# and Char# are rep'd the same+  OrdOp           -> \args -> opNop args++  Narrow8IntOp   -> \args -> opNarrow dflags args (MO_SS_Conv, W8)+  Narrow16IntOp  -> \args -> opNarrow dflags args (MO_SS_Conv, W16)+  Narrow32IntOp  -> \args -> opNarrow dflags args (MO_SS_Conv, W32)+  Narrow8WordOp  -> \args -> opNarrow dflags args (MO_UU_Conv, W8)+  Narrow16WordOp -> \args -> opNarrow dflags args (MO_UU_Conv, W16)+  Narrow32WordOp -> \args -> opNarrow dflags args (MO_UU_Conv, W32)++  DoublePowerOp  -> \args -> opCallish args MO_F64_Pwr+  DoubleSinOp    -> \args -> opCallish args MO_F64_Sin+  DoubleCosOp    -> \args -> opCallish args MO_F64_Cos+  DoubleTanOp    -> \args -> opCallish args MO_F64_Tan+  DoubleSinhOp   -> \args -> opCallish args MO_F64_Sinh+  DoubleCoshOp   -> \args -> opCallish args MO_F64_Cosh+  DoubleTanhOp   -> \args -> opCallish args MO_F64_Tanh+  DoubleAsinOp   -> \args -> opCallish args MO_F64_Asin+  DoubleAcosOp   -> \args -> opCallish args MO_F64_Acos+  DoubleAtanOp   -> \args -> opCallish args MO_F64_Atan+  DoubleAsinhOp  -> \args -> opCallish args MO_F64_Asinh+  DoubleAcoshOp  -> \args -> opCallish args MO_F64_Acosh+  DoubleAtanhOp  -> \args -> opCallish args MO_F64_Atanh+  DoubleLogOp    -> \args -> opCallish args MO_F64_Log+  DoubleLog1POp  -> \args -> opCallish args MO_F64_Log1P+  DoubleExpOp    -> \args -> opCallish args MO_F64_Exp+  DoubleExpM1Op  -> \args -> opCallish args MO_F64_ExpM1+  DoubleSqrtOp   -> \args -> opCallish args MO_F64_Sqrt++  FloatPowerOp   -> \args -> opCallish args MO_F32_Pwr+  FloatSinOp     -> \args -> opCallish args MO_F32_Sin+  FloatCosOp     -> \args -> opCallish args MO_F32_Cos+  FloatTanOp     -> \args -> opCallish args MO_F32_Tan+  FloatSinhOp    -> \args -> opCallish args MO_F32_Sinh+  FloatCoshOp    -> \args -> opCallish args MO_F32_Cosh+  FloatTanhOp    -> \args -> opCallish args MO_F32_Tanh+  FloatAsinOp    -> \args -> opCallish args MO_F32_Asin+  FloatAcosOp    -> \args -> opCallish args MO_F32_Acos+  FloatAtanOp    -> \args -> opCallish args MO_F32_Atan+  FloatAsinhOp   -> \args -> opCallish args MO_F32_Asinh+  FloatAcoshOp   -> \args -> opCallish args MO_F32_Acosh+  FloatAtanhOp   -> \args -> opCallish args MO_F32_Atanh+  FloatLogOp     -> \args -> opCallish args MO_F32_Log+  FloatLog1POp   -> \args -> opCallish args MO_F32_Log1P+  FloatExpOp     -> \args -> opCallish args MO_F32_Exp+  FloatExpM1Op   -> \args -> opCallish args MO_F32_ExpM1+  FloatSqrtOp    -> \args -> opCallish args MO_F32_Sqrt++-- Native word signless ops++  IntAddOp       -> \args -> opTranslate args (mo_wordAdd dflags)+  IntSubOp       -> \args -> opTranslate args (mo_wordSub dflags)+  WordAddOp      -> \args -> opTranslate args (mo_wordAdd dflags)+  WordSubOp      -> \args -> opTranslate args (mo_wordSub dflags)+  AddrAddOp      -> \args -> opTranslate args (mo_wordAdd dflags)+  AddrSubOp      -> \args -> opTranslate args (mo_wordSub dflags)++  IntEqOp        -> \args -> opTranslate args (mo_wordEq dflags)+  IntNeOp        -> \args -> opTranslate args (mo_wordNe dflags)+  WordEqOp       -> \args -> opTranslate args (mo_wordEq dflags)+  WordNeOp       -> \args -> opTranslate args (mo_wordNe dflags)+  AddrEqOp       -> \args -> opTranslate args (mo_wordEq dflags)+  AddrNeOp       -> \args -> opTranslate args (mo_wordNe dflags)++  AndOp          -> \args -> opTranslate args (mo_wordAnd dflags)+  OrOp           -> \args -> opTranslate args (mo_wordOr dflags)+  XorOp          -> \args -> opTranslate args (mo_wordXor dflags)+  NotOp          -> \args -> opTranslate args (mo_wordNot dflags)+  SllOp          -> \args -> opTranslate args (mo_wordShl dflags)+  SrlOp          -> \args -> opTranslate args (mo_wordUShr dflags)++  AddrRemOp      -> \args -> opTranslate args (mo_wordURem dflags)++-- Native word signed ops++  IntMulOp        -> \args -> opTranslate args (mo_wordMul dflags)+  IntMulMayOfloOp -> \args -> opTranslate args (MO_S_MulMayOflo (wordWidth dflags))+  IntQuotOp       -> \args -> opTranslate args (mo_wordSQuot dflags)+  IntRemOp        -> \args -> opTranslate args (mo_wordSRem dflags)+  IntNegOp        -> \args -> opTranslate args (mo_wordSNeg dflags)++  IntGeOp        -> \args -> opTranslate args (mo_wordSGe dflags)+  IntLeOp        -> \args -> opTranslate args (mo_wordSLe dflags)+  IntGtOp        -> \args -> opTranslate args (mo_wordSGt dflags)+  IntLtOp        -> \args -> opTranslate args (mo_wordSLt dflags)++  AndIOp         -> \args -> opTranslate args (mo_wordAnd dflags)+  OrIOp          -> \args -> opTranslate args (mo_wordOr dflags)+  XorIOp         -> \args -> opTranslate args (mo_wordXor dflags)+  NotIOp         -> \args -> opTranslate args (mo_wordNot dflags)+  ISllOp         -> \args -> opTranslate args (mo_wordShl dflags)+  ISraOp         -> \args -> opTranslate args (mo_wordSShr dflags)+  ISrlOp         -> \args -> opTranslate args (mo_wordUShr dflags)++-- Native word unsigned ops++  WordGeOp       -> \args -> opTranslate args (mo_wordUGe dflags)+  WordLeOp       -> \args -> opTranslate args (mo_wordULe dflags)+  WordGtOp       -> \args -> opTranslate args (mo_wordUGt dflags)+  WordLtOp       -> \args -> opTranslate args (mo_wordULt dflags)++  WordMulOp      -> \args -> opTranslate args (mo_wordMul dflags)+  WordQuotOp     -> \args -> opTranslate args (mo_wordUQuot dflags)+  WordRemOp      -> \args -> opTranslate args (mo_wordURem dflags)++  AddrGeOp       -> \args -> opTranslate args (mo_wordUGe dflags)+  AddrLeOp       -> \args -> opTranslate args (mo_wordULe dflags)+  AddrGtOp       -> \args -> opTranslate args (mo_wordUGt dflags)+  AddrLtOp       -> \args -> opTranslate args (mo_wordULt dflags)++-- Int8# signed ops++  Int8Extend     -> \args -> opTranslate args (MO_SS_Conv W8 (wordWidth dflags))+  Int8Narrow     -> \args -> opTranslate args (MO_SS_Conv (wordWidth dflags) W8)+  Int8NegOp      -> \args -> opTranslate args (MO_S_Neg W8)+  Int8AddOp      -> \args -> opTranslate args (MO_Add W8)+  Int8SubOp      -> \args -> opTranslate args (MO_Sub W8)+  Int8MulOp      -> \args -> opTranslate args (MO_Mul W8)+  Int8QuotOp     -> \args -> opTranslate args (MO_S_Quot W8)+  Int8RemOp      -> \args -> opTranslate args (MO_S_Rem W8)++  Int8EqOp       -> \args -> opTranslate args (MO_Eq W8)+  Int8GeOp       -> \args -> opTranslate args (MO_S_Ge W8)+  Int8GtOp       -> \args -> opTranslate args (MO_S_Gt W8)+  Int8LeOp       -> \args -> opTranslate args (MO_S_Le W8)+  Int8LtOp       -> \args -> opTranslate args (MO_S_Lt W8)+  Int8NeOp       -> \args -> opTranslate args (MO_Ne W8)++-- Word8# unsigned ops++  Word8Extend     -> \args -> opTranslate args (MO_UU_Conv W8 (wordWidth dflags))+  Word8Narrow     -> \args -> opTranslate args (MO_UU_Conv (wordWidth dflags) W8)+  Word8NotOp      -> \args -> opTranslate args (MO_Not W8)+  Word8AddOp      -> \args -> opTranslate args (MO_Add W8)+  Word8SubOp      -> \args -> opTranslate args (MO_Sub W8)+  Word8MulOp      -> \args -> opTranslate args (MO_Mul W8)+  Word8QuotOp     -> \args -> opTranslate args (MO_U_Quot W8)+  Word8RemOp      -> \args -> opTranslate args (MO_U_Rem W8)++  Word8EqOp       -> \args -> opTranslate args (MO_Eq W8)+  Word8GeOp       -> \args -> opTranslate args (MO_U_Ge W8)+  Word8GtOp       -> \args -> opTranslate args (MO_U_Gt W8)+  Word8LeOp       -> \args -> opTranslate args (MO_U_Le W8)+  Word8LtOp       -> \args -> opTranslate args (MO_U_Lt W8)+  Word8NeOp       -> \args -> opTranslate args (MO_Ne W8)++-- Int16# signed ops++  Int16Extend     -> \args -> opTranslate args (MO_SS_Conv W16 (wordWidth dflags))+  Int16Narrow     -> \args -> opTranslate args (MO_SS_Conv (wordWidth dflags) W16)+  Int16NegOp      -> \args -> opTranslate args (MO_S_Neg W16)+  Int16AddOp      -> \args -> opTranslate args (MO_Add W16)+  Int16SubOp      -> \args -> opTranslate args (MO_Sub W16)+  Int16MulOp      -> \args -> opTranslate args (MO_Mul W16)+  Int16QuotOp     -> \args -> opTranslate args (MO_S_Quot W16)+  Int16RemOp      -> \args -> opTranslate args (MO_S_Rem W16)++  Int16EqOp       -> \args -> opTranslate args (MO_Eq W16)+  Int16GeOp       -> \args -> opTranslate args (MO_S_Ge W16)+  Int16GtOp       -> \args -> opTranslate args (MO_S_Gt W16)+  Int16LeOp       -> \args -> opTranslate args (MO_S_Le W16)+  Int16LtOp       -> \args -> opTranslate args (MO_S_Lt W16)+  Int16NeOp       -> \args -> opTranslate args (MO_Ne W16)++-- Word16# unsigned ops++  Word16Extend     -> \args -> opTranslate args (MO_UU_Conv W16 (wordWidth dflags))+  Word16Narrow     -> \args -> opTranslate args (MO_UU_Conv (wordWidth dflags) W16)+  Word16NotOp      -> \args -> opTranslate args (MO_Not W16)+  Word16AddOp      -> \args -> opTranslate args (MO_Add W16)+  Word16SubOp      -> \args -> opTranslate args (MO_Sub W16)+  Word16MulOp      -> \args -> opTranslate args (MO_Mul W16)+  Word16QuotOp     -> \args -> opTranslate args (MO_U_Quot W16)+  Word16RemOp      -> \args -> opTranslate args (MO_U_Rem W16)++  Word16EqOp       -> \args -> opTranslate args (MO_Eq W16)+  Word16GeOp       -> \args -> opTranslate args (MO_U_Ge W16)+  Word16GtOp       -> \args -> opTranslate args (MO_U_Gt W16)+  Word16LeOp       -> \args -> opTranslate args (MO_U_Le W16)+  Word16LtOp       -> \args -> opTranslate args (MO_U_Lt W16)+  Word16NeOp       -> \args -> opTranslate args (MO_Ne W16)++-- Char# ops++  CharEqOp       -> \args -> opTranslate args (MO_Eq (wordWidth dflags))+  CharNeOp       -> \args -> opTranslate args (MO_Ne (wordWidth dflags))+  CharGeOp       -> \args -> opTranslate args (MO_U_Ge (wordWidth dflags))+  CharLeOp       -> \args -> opTranslate args (MO_U_Le (wordWidth dflags))+  CharGtOp       -> \args -> opTranslate args (MO_U_Gt (wordWidth dflags))+  CharLtOp       -> \args -> opTranslate args (MO_U_Lt (wordWidth dflags))++-- Double ops++  DoubleEqOp     -> \args -> opTranslate args (MO_F_Eq W64)+  DoubleNeOp     -> \args -> opTranslate args (MO_F_Ne W64)+  DoubleGeOp     -> \args -> opTranslate args (MO_F_Ge W64)+  DoubleLeOp     -> \args -> opTranslate args (MO_F_Le W64)+  DoubleGtOp     -> \args -> opTranslate args (MO_F_Gt W64)+  DoubleLtOp     -> \args -> opTranslate args (MO_F_Lt W64)++  DoubleAddOp    -> \args -> opTranslate args (MO_F_Add W64)+  DoubleSubOp    -> \args -> opTranslate args (MO_F_Sub W64)+  DoubleMulOp    -> \args -> opTranslate args (MO_F_Mul W64)+  DoubleDivOp    -> \args -> opTranslate args (MO_F_Quot W64)+  DoubleNegOp    -> \args -> opTranslate args (MO_F_Neg W64)++-- Float ops++  FloatEqOp     -> \args -> opTranslate args (MO_F_Eq W32)+  FloatNeOp     -> \args -> opTranslate args (MO_F_Ne W32)+  FloatGeOp     -> \args -> opTranslate args (MO_F_Ge W32)+  FloatLeOp     -> \args -> opTranslate args (MO_F_Le W32)+  FloatGtOp     -> \args -> opTranslate args (MO_F_Gt W32)+  FloatLtOp     -> \args -> opTranslate args (MO_F_Lt W32)++  FloatAddOp    -> \args -> opTranslate args (MO_F_Add  W32)+  FloatSubOp    -> \args -> opTranslate args (MO_F_Sub  W32)+  FloatMulOp    -> \args -> opTranslate args (MO_F_Mul  W32)+  FloatDivOp    -> \args -> opTranslate args (MO_F_Quot W32)+  FloatNegOp    -> \args -> opTranslate args (MO_F_Neg  W32)++-- Vector ops++  (VecAddOp  FloatVec n w) -> \args -> opTranslate args (MO_VF_Add  n w)+  (VecSubOp  FloatVec n w) -> \args -> opTranslate args (MO_VF_Sub  n w)+  (VecMulOp  FloatVec n w) -> \args -> opTranslate args (MO_VF_Mul  n w)+  (VecDivOp  FloatVec n w) -> \args -> opTranslate args (MO_VF_Quot n w)+  (VecQuotOp FloatVec _ _) -> \_ -> panic "unsupported primop"+  (VecRemOp  FloatVec _ _) -> \_ -> panic "unsupported primop"+  (VecNegOp  FloatVec n w) -> \args -> opTranslate args (MO_VF_Neg  n w)++  (VecAddOp  IntVec n w) -> \args -> opTranslate args (MO_V_Add   n w)+  (VecSubOp  IntVec n w) -> \args -> opTranslate args (MO_V_Sub   n w)+  (VecMulOp  IntVec n w) -> \args -> opTranslate args (MO_V_Mul   n w)+  (VecDivOp  IntVec _ _) -> \_ -> panic "unsupported primop"+  (VecQuotOp IntVec n w) -> \args -> opTranslate args (MO_VS_Quot n w)+  (VecRemOp  IntVec n w) -> \args -> opTranslate args (MO_VS_Rem  n w)+  (VecNegOp  IntVec n w) -> \args -> opTranslate args (MO_VS_Neg  n w)++  (VecAddOp  WordVec n w) -> \args -> opTranslate args (MO_V_Add   n w)+  (VecSubOp  WordVec n w) -> \args -> opTranslate args (MO_V_Sub   n w)+  (VecMulOp  WordVec n w) -> \args -> opTranslate args (MO_V_Mul   n w)+  (VecDivOp  WordVec _ _) -> \_ -> panic "unsupported primop"+  (VecQuotOp WordVec n w) -> \args -> opTranslate args (MO_VU_Quot n w)+  (VecRemOp  WordVec n w) -> \args -> opTranslate args (MO_VU_Rem  n w)+  (VecNegOp  WordVec _ _) -> \_ -> panic "unsupported primop"++-- Conversions++  Int2DoubleOp   -> \args -> opTranslate args (MO_SF_Conv (wordWidth dflags) W64)+  Double2IntOp   -> \args -> opTranslate args (MO_FS_Conv W64 (wordWidth dflags))++  Int2FloatOp    -> \args -> opTranslate args (MO_SF_Conv (wordWidth dflags) W32)+  Float2IntOp    -> \args -> opTranslate args (MO_FS_Conv W32 (wordWidth dflags))++  Float2DoubleOp -> \args -> opTranslate args (MO_FF_Conv W32 W64)+  Double2FloatOp -> \args -> opTranslate args (MO_FF_Conv W64 W32)++-- Word comparisons masquerading as more exotic things.++  SameMutVarOp            -> \args -> opTranslate args (mo_wordEq dflags)+  SameMVarOp              -> \args -> opTranslate args (mo_wordEq dflags)+  SameMutableArrayOp      -> \args -> opTranslate args (mo_wordEq dflags)+  SameMutableByteArrayOp  -> \args -> opTranslate args (mo_wordEq dflags)+  SameMutableArrayArrayOp -> \args -> opTranslate args (mo_wordEq dflags)+  SameSmallMutableArrayOp -> \args -> opTranslate args (mo_wordEq dflags)+  SameTVarOp              -> \args -> opTranslate args (mo_wordEq dflags)+  EqStablePtrOp           -> \args -> opTranslate args (mo_wordEq dflags)+-- See Note [Comparing stable names]+  EqStableNameOp          -> \args -> opTranslate args (mo_wordEq dflags)++  IntQuotRemOp -> \args -> opCallishHandledLater args $+    if ncg && (x86ish || ppc) && not (quotRemCanBeOptimized args)+    then Left (MO_S_QuotRem  (wordWidth dflags))+    else Right (genericIntQuotRemOp (wordWidth dflags))++  Int8QuotRemOp -> \args -> opCallishHandledLater args $+    if ncg && (x86ish || ppc) && not (quotRemCanBeOptimized args)+    then Left (MO_S_QuotRem W8)+    else Right (genericIntQuotRemOp W8)++  Int16QuotRemOp -> \args -> opCallishHandledLater args $+    if ncg && (x86ish || ppc) && not (quotRemCanBeOptimized args)+    then Left (MO_S_QuotRem W16)+    else Right (genericIntQuotRemOp W16)++  WordQuotRemOp -> \args -> opCallishHandledLater args $+    if ncg && (x86ish || ppc) && not (quotRemCanBeOptimized args)+    then Left (MO_U_QuotRem  (wordWidth dflags))+    else Right (genericWordQuotRemOp (wordWidth dflags))++  WordQuotRem2Op -> \args -> opCallishHandledLater args $+    if (ncg && (x86ish || ppc)) || llvm+    then Left (MO_U_QuotRem2 (wordWidth dflags))+    else Right (genericWordQuotRem2Op dflags)++  Word8QuotRemOp -> \args -> opCallishHandledLater args $+    if ncg && (x86ish || ppc) && not (quotRemCanBeOptimized args)+    then Left (MO_U_QuotRem W8)+    else Right (genericWordQuotRemOp W8)++  Word16QuotRemOp -> \args -> opCallishHandledLater args $+    if ncg && (x86ish || ppc) && not (quotRemCanBeOptimized args)+    then Left (MO_U_QuotRem W16)+    else Right (genericWordQuotRemOp W16)++  WordAdd2Op -> \args -> opCallishHandledLater args $+    if (ncg && (x86ish || ppc)) || llvm+    then Left (MO_Add2       (wordWidth dflags))+    else Right genericWordAdd2Op++  WordAddCOp -> \args -> opCallishHandledLater args $+    if (ncg && (x86ish || ppc)) || llvm+    then Left (MO_AddWordC   (wordWidth dflags))+    else Right genericWordAddCOp++  WordSubCOp -> \args -> opCallishHandledLater args $+    if (ncg && (x86ish || ppc)) || llvm+    then Left (MO_SubWordC   (wordWidth dflags))+    else Right genericWordSubCOp++  IntAddCOp -> \args -> opCallishHandledLater args $+    if (ncg && (x86ish || ppc)) || llvm+    then Left (MO_AddIntC    (wordWidth dflags))+    else Right genericIntAddCOp++  IntSubCOp -> \args -> opCallishHandledLater args $+    if (ncg && (x86ish || ppc)) || llvm+    then Left (MO_SubIntC    (wordWidth dflags))+    else Right genericIntSubCOp++  WordMul2Op -> \args -> opCallishHandledLater args $+    if ncg && (x86ish || ppc) || llvm+    then Left (MO_U_Mul2     (wordWidth dflags))+    else Right genericWordMul2Op++  FloatFabsOp -> \args -> opCallishHandledLater args $+    if (ncg && x86ish || ppc) || llvm+    then Left MO_F32_Fabs+    else Right $ genericFabsOp W32++  DoubleFabsOp -> \args -> opCallishHandledLater args $+    if (ncg && x86ish || ppc) || llvm+    then Left MO_F64_Fabs+    else Right $ genericFabsOp W64++  -- tagToEnum# is special: we need to pull the constructor+  -- out of the table, and perform an appropriate return.+  TagToEnumOp -> \[amode] -> PrimopCmmEmit_Raw $ \res_ty -> do+    -- If you're reading this code in the attempt to figure+    -- out why the compiler panic'ed here, it is probably because+    -- you used tagToEnum# in a non-monomorphic setting, e.g.,+    --         intToTg :: Enum a => Int -> a ; intToTg (I# x#) = tagToEnum# x#+    -- That won't work.+    let tycon = tyConAppTyCon res_ty+    MASSERT(isEnumerationTyCon tycon)+    dflags <- getDynFlags+    pure [tagToClosure dflags tycon amode]++-- Out of line primops.+-- TODO compiler need not know about these++  UnsafeThawArrayOp -> alwaysExternal+  CasArrayOp -> alwaysExternal+  UnsafeThawSmallArrayOp -> alwaysExternal+  CasSmallArrayOp -> alwaysExternal+  NewPinnedByteArrayOp_Char -> alwaysExternal+  NewAlignedPinnedByteArrayOp_Char -> alwaysExternal+  MutableByteArrayIsPinnedOp -> alwaysExternal+  DoubleDecode_2IntOp -> alwaysExternal+  DoubleDecode_Int64Op -> alwaysExternal+  FloatDecode_IntOp -> alwaysExternal+  ByteArrayIsPinnedOp -> alwaysExternal+  ShrinkMutableByteArrayOp_Char -> alwaysExternal+  ResizeMutableByteArrayOp_Char -> alwaysExternal+  ShrinkSmallMutableArrayOp_Char -> alwaysExternal+  NewArrayArrayOp -> alwaysExternal+  NewMutVarOp -> alwaysExternal+  AtomicModifyMutVar2Op -> alwaysExternal+  AtomicModifyMutVar_Op -> alwaysExternal+  CasMutVarOp -> alwaysExternal+  CatchOp -> alwaysExternal+  RaiseOp -> alwaysExternal+  RaiseIOOp -> alwaysExternal+  MaskAsyncExceptionsOp -> alwaysExternal+  MaskUninterruptibleOp -> alwaysExternal+  UnmaskAsyncExceptionsOp -> alwaysExternal+  MaskStatus -> alwaysExternal+  AtomicallyOp -> alwaysExternal+  RetryOp -> alwaysExternal+  CatchRetryOp -> alwaysExternal+  CatchSTMOp -> alwaysExternal+  NewTVarOp -> alwaysExternal+  ReadTVarOp -> alwaysExternal+  ReadTVarIOOp -> alwaysExternal+  WriteTVarOp -> alwaysExternal+  NewMVarOp -> alwaysExternal+  TakeMVarOp -> alwaysExternal+  TryTakeMVarOp -> alwaysExternal+  PutMVarOp -> alwaysExternal+  TryPutMVarOp -> alwaysExternal+  ReadMVarOp -> alwaysExternal+  TryReadMVarOp -> alwaysExternal+  IsEmptyMVarOp -> alwaysExternal+  DelayOp -> alwaysExternal+  WaitReadOp -> alwaysExternal+  WaitWriteOp -> alwaysExternal+  ForkOp -> alwaysExternal+  ForkOnOp -> alwaysExternal+  KillThreadOp -> alwaysExternal+  YieldOp -> alwaysExternal+  LabelThreadOp -> alwaysExternal+  IsCurrentThreadBoundOp -> alwaysExternal+  NoDuplicateOp -> alwaysExternal+  ThreadStatusOp -> alwaysExternal+  MkWeakOp -> alwaysExternal+  MkWeakNoFinalizerOp -> alwaysExternal+  AddCFinalizerToWeakOp -> alwaysExternal+  DeRefWeakOp -> alwaysExternal+  FinalizeWeakOp -> alwaysExternal+  MakeStablePtrOp -> alwaysExternal+  DeRefStablePtrOp -> alwaysExternal+  MakeStableNameOp -> alwaysExternal+  CompactNewOp -> alwaysExternal+  CompactResizeOp -> alwaysExternal+  CompactContainsOp -> alwaysExternal+  CompactContainsAnyOp -> alwaysExternal+  CompactGetFirstBlockOp -> alwaysExternal+  CompactGetNextBlockOp -> alwaysExternal+  CompactAllocateBlockOp -> alwaysExternal+  CompactFixupPointersOp -> alwaysExternal+  CompactAdd -> alwaysExternal+  CompactAddWithSharing -> alwaysExternal+  CompactSize -> alwaysExternal+  SeqOp -> alwaysExternal+  GetSparkOp -> alwaysExternal+  NumSparks -> alwaysExternal+  DataToTagOp -> alwaysExternal+  MkApUpd0_Op -> alwaysExternal+  NewBCOOp -> alwaysExternal+  UnpackClosureOp -> alwaysExternal+  ClosureSizeOp -> alwaysExternal+  GetApStackValOp -> alwaysExternal+  ClearCCSOp -> alwaysExternal+  TraceEventOp -> alwaysExternal+  TraceEventBinaryOp -> alwaysExternal+  TraceMarkerOp -> alwaysExternal+  SetThreadAllocationCounter -> alwaysExternal++ where+  alwaysExternal = \_ -> PrimopCmmEmit_External+  -- Note [QuotRem optimization]+  -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~+  --+  -- `quot` and `rem` with constant divisor can be implemented with fast bit-ops+  -- (shift, .&.).+  --+  -- Currently we only support optimization (performed in CmmOpt) when the+  -- constant is a power of 2. #9041 tracks the implementation of the general+  -- optimization.+  --+  -- `quotRem` can be optimized in the same way. However as it returns two values,+  -- it is implemented as a "callish" primop which is harder to match and+  -- to transform later on. For simplicity, the current implementation detects cases+  -- that can be optimized (see `quotRemCanBeOptimized`) and converts STG quotRem+  -- primop into two CMM quot and rem primops.+  quotRemCanBeOptimized = \case+    [_, CmmLit (CmmInt n _) ] -> isJust (exactLog2 n)+    _                         -> False++  ncg = case hscTarget dflags of+           HscAsm -> True+           _      -> False+  llvm = case hscTarget dflags of+           HscLlvm -> True+           _       -> False+  x86ish = case platformArch (targetPlatform dflags) of+             ArchX86    -> True+             ArchX86_64 -> True+             _          -> False+  ppc = case platformArch (targetPlatform dflags) of+          ArchPPC      -> True+          ArchPPC_64 _ -> True+          _            -> False++data PrimopCmmEmit+  = PrimopCmmEmit_External+  | PrimopCmmEmit_IntoRegs ([LocalReg] -- where to put the results+                           -> FCode ())+  -- | Manual escape hatch, this is just for the '@TagToEnum@'+  -- primop for now. It would be nice to remove this special case but that is+  -- future work.+  | PrimopCmmEmit_Raw (Type -- the return type, some primops are specialized to it+                       -> FCode [CmmExpr]) -- just for TagToEnum for now++opNop :: [CmmExpr] -> PrimopCmmEmit+opNop args = PrimopCmmEmit_IntoRegs $ \[res] -> emitAssign (CmmLocal res) arg+  where [arg] = args++opNarrow+  :: DynFlags+  -> [CmmExpr]+  -> (Width -> Width -> MachOp, Width)+  -> PrimopCmmEmit+opNarrow dflags args (mop, rep) = PrimopCmmEmit_IntoRegs $ \[res] -> emitAssign (CmmLocal res) $+  CmmMachOp (mop rep (wordWidth dflags)) [CmmMachOp (mop (wordWidth dflags) rep) [arg]]+  where [arg] = args++-- | These primops are implemented by CallishMachOps, because they sometimes+-- turn into foreign calls depending on the backend.+opCallish :: [CmmExpr] -> CallishMachOp -> PrimopCmmEmit+opCallish args prim = PrimopCmmEmit_IntoRegs $ \[res] -> emitPrimCall [res] prim args++opTranslate :: [CmmExpr] -> MachOp -> PrimopCmmEmit+opTranslate args mop = PrimopCmmEmit_IntoRegs $ \[res] -> do+  let stmt = mkAssign (CmmLocal res) (CmmMachOp mop args)+  emit stmt++-- | Basically a "manual" case, rather than one of the common repetitive forms+-- above. The results are a parameter to the returned function so we know the+-- choice of variant never depends on them.+opCallishHandledLater+  :: [CmmExpr]+  -> Either CallishMachOp GenericOp+  -> PrimopCmmEmit+opCallishHandledLater args callOrNot = PrimopCmmEmit_IntoRegs $ \res0 -> case callOrNot of+  Left op   -> emit $ mkUnsafeCall (PrimTarget op) res0 args+  Right gen -> gen res0 args++opAllDone+  :: ([LocalReg] -- where to put the results+      -> FCode ())+  -> PrimopCmmEmit+opAllDone f = PrimopCmmEmit_IntoRegs $ f++type GenericOp = [CmmFormal] -> [CmmActual] -> FCode ()++genericIntQuotRemOp :: Width -> GenericOp+genericIntQuotRemOp width [res_q, res_r] [arg_x, arg_y]+   = emit $ mkAssign (CmmLocal res_q)+              (CmmMachOp (MO_S_Quot width) [arg_x, arg_y]) <*>+            mkAssign (CmmLocal res_r)+              (CmmMachOp (MO_S_Rem  width) [arg_x, arg_y])+genericIntQuotRemOp _ _ _ = panic "genericIntQuotRemOp"++genericWordQuotRemOp :: Width -> GenericOp+genericWordQuotRemOp width [res_q, res_r] [arg_x, arg_y]+    = emit $ mkAssign (CmmLocal res_q)+               (CmmMachOp (MO_U_Quot width) [arg_x, arg_y]) <*>+             mkAssign (CmmLocal res_r)+               (CmmMachOp (MO_U_Rem  width) [arg_x, arg_y])+genericWordQuotRemOp _ _ _ = panic "genericWordQuotRemOp"++genericWordQuotRem2Op :: DynFlags -> GenericOp+genericWordQuotRem2Op dflags [res_q, res_r] [arg_x_high, arg_x_low, arg_y]+    = emit =<< f (widthInBits (wordWidth dflags)) zero arg_x_high arg_x_low+    where    ty = cmmExprType dflags arg_x_high+             shl   x i = CmmMachOp (MO_Shl   (wordWidth dflags)) [x, i]+             shr   x i = CmmMachOp (MO_U_Shr (wordWidth dflags)) [x, i]+             or    x y = CmmMachOp (MO_Or    (wordWidth dflags)) [x, y]+             ge    x y = CmmMachOp (MO_U_Ge  (wordWidth dflags)) [x, y]+             ne    x y = CmmMachOp (MO_Ne    (wordWidth dflags)) [x, y]+             minus x y = CmmMachOp (MO_Sub   (wordWidth dflags)) [x, y]+             times x y = CmmMachOp (MO_Mul   (wordWidth dflags)) [x, y]+             zero   = lit 0+             one    = lit 1+             negone = lit (fromIntegral (widthInBits (wordWidth dflags)) - 1)+             lit i = CmmLit (CmmInt i (wordWidth dflags))++             f :: Int -> CmmExpr -> CmmExpr -> CmmExpr -> FCode CmmAGraph+             f 0 acc high _ = return (mkAssign (CmmLocal res_q) acc <*>+                                      mkAssign (CmmLocal res_r) high)+             f i acc high low =+                 do roverflowedBit <- newTemp ty+                    rhigh'         <- newTemp ty+                    rhigh''        <- newTemp ty+                    rlow'          <- newTemp ty+                    risge          <- newTemp ty+                    racc'          <- newTemp ty+                    let high'         = CmmReg (CmmLocal rhigh')+                        isge          = CmmReg (CmmLocal risge)+                        overflowedBit = CmmReg (CmmLocal roverflowedBit)+                    let this = catAGraphs+                               [mkAssign (CmmLocal roverflowedBit)+                                          (shr high negone),+                                mkAssign (CmmLocal rhigh')+                                          (or (shl high one) (shr low negone)),+                                mkAssign (CmmLocal rlow')+                                          (shl low one),+                                mkAssign (CmmLocal risge)+                                          (or (overflowedBit `ne` zero)+                                              (high' `ge` arg_y)),+                                mkAssign (CmmLocal rhigh'')+                                          (high' `minus` (arg_y `times` isge)),+                                mkAssign (CmmLocal racc')+                                          (or (shl acc one) isge)]+                    rest <- f (i - 1) (CmmReg (CmmLocal racc'))+                                      (CmmReg (CmmLocal rhigh''))+                                      (CmmReg (CmmLocal rlow'))+                    return (this <*> rest)+genericWordQuotRem2Op _ _ _ = panic "genericWordQuotRem2Op"++genericWordAdd2Op :: GenericOp+genericWordAdd2Op [res_h, res_l] [arg_x, arg_y]+  = do dflags <- getDynFlags+       r1 <- newTemp (cmmExprType dflags arg_x)+       r2 <- newTemp (cmmExprType dflags arg_x)+       let topHalf x = CmmMachOp (MO_U_Shr (wordWidth dflags)) [x, hww]+           toTopHalf x = CmmMachOp (MO_Shl (wordWidth dflags)) [x, hww]+           bottomHalf x = CmmMachOp (MO_And (wordWidth dflags)) [x, hwm]+           add x y = CmmMachOp (MO_Add (wordWidth dflags)) [x, y]+           or x y = CmmMachOp (MO_Or (wordWidth dflags)) [x, y]+           hww = CmmLit (CmmInt (fromIntegral (widthInBits (halfWordWidth dflags)))+                                (wordWidth dflags))+           hwm = CmmLit (CmmInt (halfWordMask dflags) (wordWidth dflags))+       emit $ catAGraphs+          [mkAssign (CmmLocal r1)+               (add (bottomHalf arg_x) (bottomHalf arg_y)),+           mkAssign (CmmLocal r2)+               (add (topHalf (CmmReg (CmmLocal r1)))+                    (add (topHalf arg_x) (topHalf arg_y))),+           mkAssign (CmmLocal res_h)+               (topHalf (CmmReg (CmmLocal r2))),+           mkAssign (CmmLocal res_l)+               (or (toTopHalf (CmmReg (CmmLocal r2)))+                   (bottomHalf (CmmReg (CmmLocal r1))))]+genericWordAdd2Op _ _ = panic "genericWordAdd2Op"++-- | Implements branchless recovery of the carry flag @c@ by checking the+-- leftmost bits of both inputs @a@ and @b@ and result @r = a + b@:+--+-- @+--    c = a&b | (a|b)&~r+-- @+--+-- https://brodowsky.it-sky.net/2015/04/02/how-to-recover-the-carry-bit/+genericWordAddCOp :: GenericOp+genericWordAddCOp [res_r, res_c] [aa, bb]+ = do dflags <- getDynFlags+      emit $ catAGraphs [+        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordAdd dflags) [aa,bb]),+        mkAssign (CmmLocal res_c) $+          CmmMachOp (mo_wordUShr dflags) [+            CmmMachOp (mo_wordOr dflags) [+              CmmMachOp (mo_wordAnd dflags) [aa,bb],+              CmmMachOp (mo_wordAnd dflags) [+                CmmMachOp (mo_wordOr dflags) [aa,bb],+                CmmMachOp (mo_wordNot dflags) [CmmReg (CmmLocal res_r)]+              ]+            ],+            mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)+          ]+        ]+genericWordAddCOp _ _ = panic "genericWordAddCOp"++-- | Implements branchless recovery of the carry flag @c@ by checking the+-- leftmost bits of both inputs @a@ and @b@ and result @r = a - b@:+--+-- @+--    c = ~a&b | (~a|b)&r+-- @+--+-- https://brodowsky.it-sky.net/2015/04/02/how-to-recover-the-carry-bit/+genericWordSubCOp :: GenericOp+genericWordSubCOp [res_r, res_c] [aa, bb]+ = do dflags <- getDynFlags+      emit $ catAGraphs [+        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordSub dflags) [aa,bb]),+        mkAssign (CmmLocal res_c) $+          CmmMachOp (mo_wordUShr dflags) [+            CmmMachOp (mo_wordOr dflags) [+              CmmMachOp (mo_wordAnd dflags) [+                CmmMachOp (mo_wordNot dflags) [aa],+                bb+              ],+              CmmMachOp (mo_wordAnd dflags) [+                CmmMachOp (mo_wordOr dflags) [+                  CmmMachOp (mo_wordNot dflags) [aa],+                  bb+                ],+                CmmReg (CmmLocal res_r)+              ]+            ],+            mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)+          ]+        ]+genericWordSubCOp _ _ = panic "genericWordSubCOp"++genericIntAddCOp :: GenericOp+genericIntAddCOp [res_r, res_c] [aa, bb]+{-+   With some bit-twiddling, we can define int{Add,Sub}Czh portably in+   C, and without needing any comparisons.  This may not be the+   fastest way to do it - if you have better code, please send it! --SDM++   Return : r = a + b,  c = 0 if no overflow, 1 on overflow.++   We currently don't make use of the r value if c is != 0 (i.e.+   overflow), we just convert to big integers and try again.  This+   could be improved by making r and c the correct values for+   plugging into a new J#.++   { r = ((I_)(a)) + ((I_)(b));                                 \+     c = ((StgWord)(~(((I_)(a))^((I_)(b))) & (((I_)(a))^r)))    \+         >> (BITS_IN (I_) - 1);                                 \+   }+   Wading through the mass of bracketry, it seems to reduce to:+   c = ( (~(a^b)) & (a^r) ) >>unsigned (BITS_IN(I_)-1)++-}+ = do dflags <- getDynFlags+      emit $ catAGraphs [+        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordAdd dflags) [aa,bb]),+        mkAssign (CmmLocal res_c) $+          CmmMachOp (mo_wordUShr dflags) [+                CmmMachOp (mo_wordAnd dflags) [+                    CmmMachOp (mo_wordNot dflags) [CmmMachOp (mo_wordXor dflags) [aa,bb]],+                    CmmMachOp (mo_wordXor dflags) [aa, CmmReg (CmmLocal res_r)]+                ],+                mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)+          ]+        ]+genericIntAddCOp _ _ = panic "genericIntAddCOp"++genericIntSubCOp :: GenericOp+genericIntSubCOp [res_r, res_c] [aa, bb]+{- Similarly:+   #define subIntCzh(r,c,a,b)                                   \+   { r = ((I_)(a)) - ((I_)(b));                                 \+     c = ((StgWord)((((I_)(a))^((I_)(b))) & (((I_)(a))^r)))     \+         >> (BITS_IN (I_) - 1);                                 \+   }++   c =  ((a^b) & (a^r)) >>unsigned (BITS_IN(I_)-1)+-}+ = do dflags <- getDynFlags+      emit $ catAGraphs [+        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordSub dflags) [aa,bb]),+        mkAssign (CmmLocal res_c) $+          CmmMachOp (mo_wordUShr dflags) [+                CmmMachOp (mo_wordAnd dflags) [+                    CmmMachOp (mo_wordXor dflags) [aa,bb],+                    CmmMachOp (mo_wordXor dflags) [aa, CmmReg (CmmLocal res_r)]+                ],+                mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)+          ]+        ]+genericIntSubCOp _ _ = panic "genericIntSubCOp"++genericWordMul2Op :: GenericOp+genericWordMul2Op [res_h, res_l] [arg_x, arg_y]+ = do dflags <- getDynFlags+      let t = cmmExprType dflags arg_x+      xlyl <- liftM CmmLocal $ newTemp t+      xlyh <- liftM CmmLocal $ newTemp t+      xhyl <- liftM CmmLocal $ newTemp t+      r    <- liftM CmmLocal $ newTemp t+      -- This generic implementation is very simple and slow. We might+      -- well be able to do better, but for now this at least works.+      let topHalf x = CmmMachOp (MO_U_Shr (wordWidth dflags)) [x, hww]+          toTopHalf x = CmmMachOp (MO_Shl (wordWidth dflags)) [x, hww]+          bottomHalf x = CmmMachOp (MO_And (wordWidth dflags)) [x, hwm]+          add x y = CmmMachOp (MO_Add (wordWidth dflags)) [x, y]+          sum = foldl1 add+          mul x y = CmmMachOp (MO_Mul (wordWidth dflags)) [x, y]+          or x y = CmmMachOp (MO_Or (wordWidth dflags)) [x, y]+          hww = CmmLit (CmmInt (fromIntegral (widthInBits (halfWordWidth dflags)))+                               (wordWidth dflags))+          hwm = CmmLit (CmmInt (halfWordMask dflags) (wordWidth dflags))+      emit $ catAGraphs+             [mkAssign xlyl+                  (mul (bottomHalf arg_x) (bottomHalf arg_y)),+              mkAssign xlyh+                  (mul (bottomHalf arg_x) (topHalf arg_y)),+              mkAssign xhyl+                  (mul (topHalf arg_x) (bottomHalf arg_y)),+              mkAssign r+                  (sum [topHalf    (CmmReg xlyl),+                        bottomHalf (CmmReg xhyl),+                        bottomHalf (CmmReg xlyh)]),+              mkAssign (CmmLocal res_l)+                  (or (bottomHalf (CmmReg xlyl))+                      (toTopHalf (CmmReg r))),+              mkAssign (CmmLocal res_h)+                  (sum [mul (topHalf arg_x) (topHalf arg_y),+                        topHalf (CmmReg xhyl),+                        topHalf (CmmReg xlyh),+                        topHalf (CmmReg r)])]+genericWordMul2Op _ _ = panic "genericWordMul2Op"++-- This replicates what we had in libraries/base/GHC/Float.hs:+--+--    abs x    | x == 0    = 0 -- handles (-0.0)+--             | x >  0    = x+--             | otherwise = negateFloat x+genericFabsOp :: Width -> GenericOp+genericFabsOp w [res_r] [aa]+ = do dflags <- getDynFlags+      let zero   = CmmLit (CmmFloat 0 w)++          eq x y = CmmMachOp (MO_F_Eq w) [x, y]+          gt x y = CmmMachOp (MO_F_Gt w) [x, y]++          neg x  = CmmMachOp (MO_F_Neg w) [x]++          g1 = catAGraphs [mkAssign (CmmLocal res_r) zero]+          g2 = catAGraphs [mkAssign (CmmLocal res_r) aa]++      res_t <- CmmLocal <$> newTemp (cmmExprType dflags aa)+      let g3 = catAGraphs [mkAssign res_t aa,+                           mkAssign (CmmLocal res_r) (neg (CmmReg res_t))]++      g4 <- mkCmmIfThenElse (gt aa zero) g2 g3++      emit =<< mkCmmIfThenElse (eq aa zero) g1 g4++genericFabsOp _ _ _ = panic "genericFabsOp"++-- Note [Comparing stable names]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- A StableName# is actually a pointer to a stable name object (SNO)+-- containing an index into the stable name table (SNT). We+-- used to compare StableName#s by following the pointers to the+-- SNOs and checking whether they held the same SNT indices. However,+-- this is not necessary: there is a one-to-one correspondence+-- between SNOs and entries in the SNT, so simple pointer equality+-- does the trick.++------------------------------------------------------------------------------+-- Helpers for translating various minor variants of array indexing.++doIndexOffAddrOp :: Maybe MachOp+                 -> CmmType+                 -> [LocalReg]+                 -> [CmmExpr]+                 -> FCode ()+doIndexOffAddrOp maybe_post_read_cast rep [res] [addr,idx]+   = mkBasicIndexedRead 0 maybe_post_read_cast rep res addr rep idx+doIndexOffAddrOp _ _ _ _+   = panic "GHC.StgToCmm.Prim: doIndexOffAddrOp"++doIndexOffAddrOpAs :: Maybe MachOp+                   -> CmmType+                   -> CmmType+                   -> [LocalReg]+                   -> [CmmExpr]+                   -> FCode ()+doIndexOffAddrOpAs maybe_post_read_cast rep idx_rep [res] [addr,idx]+   = mkBasicIndexedRead 0 maybe_post_read_cast rep res addr idx_rep idx+doIndexOffAddrOpAs _ _ _ _ _+   = panic "GHC.StgToCmm.Prim: doIndexOffAddrOpAs"++doIndexByteArrayOp :: Maybe MachOp+                   -> CmmType+                   -> [LocalReg]+                   -> [CmmExpr]+                   -> FCode ()+doIndexByteArrayOp maybe_post_read_cast rep [res] [addr,idx]+   = do dflags <- getDynFlags+        mkBasicIndexedRead (arrWordsHdrSize dflags) maybe_post_read_cast rep res addr rep idx+doIndexByteArrayOp _ _ _ _+   = panic "GHC.StgToCmm.Prim: doIndexByteArrayOp"++doIndexByteArrayOpAs :: Maybe MachOp+                    -> CmmType+                    -> CmmType+                    -> [LocalReg]+                    -> [CmmExpr]+                    -> FCode ()+doIndexByteArrayOpAs maybe_post_read_cast rep idx_rep [res] [addr,idx]+   = do dflags <- getDynFlags+        mkBasicIndexedRead (arrWordsHdrSize dflags) maybe_post_read_cast rep res addr idx_rep idx+doIndexByteArrayOpAs _ _ _ _ _+   = panic "GHC.StgToCmm.Prim: doIndexByteArrayOpAs"++doReadPtrArrayOp :: LocalReg+                 -> CmmExpr+                 -> CmmExpr+                 -> FCode ()+doReadPtrArrayOp res addr idx+   = do dflags <- getDynFlags+        mkBasicIndexedRead (arrPtrsHdrSize dflags) Nothing (gcWord dflags) res addr (gcWord dflags) idx++doWriteOffAddrOp :: Maybe MachOp+                 -> CmmType+                 -> [LocalReg]+                 -> [CmmExpr]+                 -> FCode ()+doWriteOffAddrOp maybe_pre_write_cast idx_ty [] [addr,idx,val]+   = mkBasicIndexedWrite 0 maybe_pre_write_cast addr idx_ty idx val+doWriteOffAddrOp _ _ _ _+   = panic "GHC.StgToCmm.Prim: doWriteOffAddrOp"++doWriteByteArrayOp :: Maybe MachOp+                   -> CmmType+                   -> [LocalReg]+                   -> [CmmExpr]+                   -> FCode ()+doWriteByteArrayOp maybe_pre_write_cast idx_ty [] [addr,idx,val]+   = do dflags <- getDynFlags+        mkBasicIndexedWrite (arrWordsHdrSize dflags) maybe_pre_write_cast addr idx_ty idx val+doWriteByteArrayOp _ _ _ _+   = panic "GHC.StgToCmm.Prim: doWriteByteArrayOp"++doWritePtrArrayOp :: CmmExpr+                  -> CmmExpr+                  -> CmmExpr+                  -> FCode ()+doWritePtrArrayOp addr idx val+  = do dflags <- getDynFlags+       let ty = cmmExprType dflags val+           hdr_size = arrPtrsHdrSize dflags+       -- Update remembered set for non-moving collector+       whenUpdRemSetEnabled dflags+           $ emitUpdRemSetPush (cmmLoadIndexOffExpr dflags hdr_size ty addr ty idx)+       -- This write barrier is to ensure that the heap writes to the object+       -- referred to by val have happened before we write val into the array.+       -- See #12469 for details.+       emitPrimCall [] MO_WriteBarrier []+       mkBasicIndexedWrite hdr_size Nothing addr ty idx val+       emit (setInfo addr (CmmLit (CmmLabel mkMAP_DIRTY_infoLabel)))+       -- the write barrier.  We must write a byte into the mark table:+       -- bits8[a + header_size + StgMutArrPtrs_size(a) + x >> N]+       emit $ mkStore (+         cmmOffsetExpr dflags+          (cmmOffsetExprW dflags (cmmOffsetB dflags addr hdr_size)+                         (loadArrPtrsSize dflags addr))+          (CmmMachOp (mo_wordUShr dflags) [idx,+                                           mkIntExpr dflags (mUT_ARR_PTRS_CARD_BITS dflags)])+         ) (CmmLit (CmmInt 1 W8))++loadArrPtrsSize :: DynFlags -> CmmExpr -> CmmExpr+loadArrPtrsSize dflags addr = CmmLoad (cmmOffsetB dflags addr off) (bWord dflags)+ where off = fixedHdrSize dflags + oFFSET_StgMutArrPtrs_ptrs dflags++mkBasicIndexedRead :: ByteOff      -- Initial offset in bytes+                   -> Maybe MachOp -- Optional result cast+                   -> CmmType      -- Type of element we are accessing+                   -> LocalReg     -- Destination+                   -> CmmExpr      -- Base address+                   -> CmmType      -- Type of element by which we are indexing+                   -> CmmExpr      -- Index+                   -> FCode ()+mkBasicIndexedRead off Nothing ty res base idx_ty idx+   = do dflags <- getDynFlags+        emitAssign (CmmLocal res) (cmmLoadIndexOffExpr dflags off ty base idx_ty idx)+mkBasicIndexedRead off (Just cast) ty res base idx_ty idx+   = do dflags <- getDynFlags+        emitAssign (CmmLocal res) (CmmMachOp cast [+                                   cmmLoadIndexOffExpr dflags off ty base idx_ty idx])++mkBasicIndexedWrite :: ByteOff      -- Initial offset in bytes+                    -> Maybe MachOp -- Optional value cast+                    -> CmmExpr      -- Base address+                    -> CmmType      -- Type of element by which we are indexing+                    -> CmmExpr      -- Index+                    -> CmmExpr      -- Value to write+                    -> FCode ()+mkBasicIndexedWrite off Nothing base idx_ty idx val+   = do dflags <- getDynFlags+        emitStore (cmmIndexOffExpr dflags off (typeWidth idx_ty) base idx) val+mkBasicIndexedWrite off (Just cast) base idx_ty idx val+   = mkBasicIndexedWrite off Nothing base idx_ty idx (CmmMachOp cast [val])++-- ----------------------------------------------------------------------------+-- Misc utils++cmmIndexOffExpr :: DynFlags+                -> ByteOff  -- Initial offset in bytes+                -> Width    -- Width of element by which we are indexing+                -> CmmExpr  -- Base address+                -> CmmExpr  -- Index+                -> CmmExpr+cmmIndexOffExpr dflags off width base idx+   = cmmIndexExpr dflags width (cmmOffsetB dflags base off) idx++cmmLoadIndexOffExpr :: DynFlags+                    -> ByteOff  -- Initial offset in bytes+                    -> CmmType  -- Type of element we are accessing+                    -> CmmExpr  -- Base address+                    -> CmmType  -- Type of element by which we are indexing+                    -> CmmExpr  -- Index+                    -> CmmExpr+cmmLoadIndexOffExpr dflags off ty base idx_ty idx+   = CmmLoad (cmmIndexOffExpr dflags off (typeWidth idx_ty) base idx) ty++setInfo :: CmmExpr -> CmmExpr -> CmmAGraph+setInfo closure_ptr info_ptr = mkStore closure_ptr info_ptr++------------------------------------------------------------------------------+-- Helpers for translating vector primops.++vecVmmType :: PrimOpVecCat -> Length -> Width -> CmmType+vecVmmType pocat n w = vec n (vecCmmCat pocat w)++vecCmmCat :: PrimOpVecCat -> Width -> CmmType+vecCmmCat IntVec   = cmmBits+vecCmmCat WordVec  = cmmBits+vecCmmCat FloatVec = cmmFloat++vecElemInjectCast :: DynFlags -> PrimOpVecCat -> Width -> Maybe MachOp+vecElemInjectCast _      FloatVec _   =  Nothing+vecElemInjectCast dflags IntVec   W8  =  Just (mo_WordTo8  dflags)+vecElemInjectCast dflags IntVec   W16 =  Just (mo_WordTo16 dflags)+vecElemInjectCast dflags IntVec   W32 =  Just (mo_WordTo32 dflags)+vecElemInjectCast _      IntVec   W64 =  Nothing+vecElemInjectCast dflags WordVec  W8  =  Just (mo_WordTo8  dflags)+vecElemInjectCast dflags WordVec  W16 =  Just (mo_WordTo16 dflags)+vecElemInjectCast dflags WordVec  W32 =  Just (mo_WordTo32 dflags)+vecElemInjectCast _      WordVec  W64 =  Nothing+vecElemInjectCast _      _        _   =  Nothing++vecElemProjectCast :: DynFlags -> PrimOpVecCat -> Width -> Maybe MachOp+vecElemProjectCast _      FloatVec _   =  Nothing+vecElemProjectCast dflags IntVec   W8  =  Just (mo_s_8ToWord  dflags)+vecElemProjectCast dflags IntVec   W16 =  Just (mo_s_16ToWord dflags)+vecElemProjectCast dflags IntVec   W32 =  Just (mo_s_32ToWord dflags)+vecElemProjectCast _      IntVec   W64 =  Nothing+vecElemProjectCast dflags WordVec  W8  =  Just (mo_u_8ToWord  dflags)+vecElemProjectCast dflags WordVec  W16 =  Just (mo_u_16ToWord dflags)+vecElemProjectCast dflags WordVec  W32 =  Just (mo_u_32ToWord dflags)+vecElemProjectCast _      WordVec  W64 =  Nothing+vecElemProjectCast _      _        _   =  Nothing+++-- NOTE [SIMD Design for the future]+-- Check to make sure that we can generate code for the specified vector type+-- given the current set of dynamic flags.+-- Currently these checks are specific to x86 and x86_64 architecture.+-- This should be fixed!+-- In particular,+-- 1) Add better support for other architectures! (this may require a redesign)+-- 2) Decouple design choices from LLVM's pseudo SIMD model!+--   The high level LLVM naive rep makes per CPU family SIMD generation is own+--   optimization problem, and hides important differences in eg ARM vs x86_64 simd+-- 3) Depending on the architecture, the SIMD registers may also support general+--    computations on Float/Double/Word/Int scalars, but currently on+--    for example x86_64, we always put Word/Int (or sized) in GPR+--    (general purpose) registers. Would relaxing that allow for+--    useful optimization opportunities?+--      Phrased differently, it is worth experimenting with supporting+--    different register mapping strategies than we currently have, especially if+--    someday we want SIMD to be a first class denizen in GHC along with scalar+--    values!+--      The current design with respect to register mapping of scalars could+--    very well be the best,but exploring the  design space and doing careful+--    measurments is the only only way to validate that.+--      In some next generation CPU ISAs, notably RISC V, the SIMD extension+--    includes  support for a sort of run time CPU dependent vectorization parameter,+--    where a loop may act upon a single scalar each iteration OR some 2,4,8 ...+--    element chunk! Time will tell if that direction sees wide adoption,+--    but it is from that context that unifying our handling of simd and scalars+--    may benefit. It is not likely to benefit current architectures, though+--    it may very well be a design perspective that helps guide improving the NCG.+++checkVecCompatibility :: DynFlags -> PrimOpVecCat -> Length -> Width -> FCode ()+checkVecCompatibility dflags vcat l w = do+    when (hscTarget dflags /= HscLlvm) $ do+        sorry $ unlines ["SIMD vector instructions require the LLVM back-end."+                         ,"Please use -fllvm."]+    check vecWidth vcat l w+  where+    check :: Width -> PrimOpVecCat -> Length -> Width -> FCode ()+    check W128 FloatVec 4 W32 | not (isSseEnabled dflags) =+        sorry $ "128-bit wide single-precision floating point " +++                "SIMD vector instructions require at least -msse."+    check W128 _ _ _ | not (isSse2Enabled dflags) =+        sorry $ "128-bit wide integer and double precision " +++                "SIMD vector instructions require at least -msse2."+    check W256 FloatVec _ _ | not (isAvxEnabled dflags) =+        sorry $ "256-bit wide floating point " +++                "SIMD vector instructions require at least -mavx."+    check W256 _ _ _ | not (isAvx2Enabled dflags) =+        sorry $ "256-bit wide integer " +++                "SIMD vector instructions require at least -mavx2."+    check W512 _ _ _ | not (isAvx512fEnabled dflags) =+        sorry $ "512-bit wide " +++                "SIMD vector instructions require -mavx512f."+    check _ _ _ _ = return ()++    vecWidth = typeWidth (vecVmmType vcat l w)++------------------------------------------------------------------------------+-- Helpers for translating vector packing and unpacking.++doVecPackOp :: Maybe MachOp  -- Cast from element to vector component+            -> CmmType       -- Type of vector+            -> CmmExpr       -- Initial vector+            -> [CmmExpr]     -- Elements+            -> CmmFormal     -- Destination for result+            -> FCode ()+doVecPackOp maybe_pre_write_cast ty z es res = do+    dst <- newTemp ty+    emitAssign (CmmLocal dst) z+    vecPack dst es 0+  where+    vecPack :: CmmFormal -> [CmmExpr] -> Int -> FCode ()+    vecPack src [] _ =+        emitAssign (CmmLocal res) (CmmReg (CmmLocal src))++    vecPack src (e : es) i = do+        dst <- newTemp ty+        if isFloatType (vecElemType ty)+          then emitAssign (CmmLocal dst) (CmmMachOp (MO_VF_Insert len wid)+                                                    [CmmReg (CmmLocal src), cast e, iLit])+          else emitAssign (CmmLocal dst) (CmmMachOp (MO_V_Insert len wid)+                                                    [CmmReg (CmmLocal src), cast e, iLit])+        vecPack dst es (i + 1)+      where+        -- vector indices are always 32-bits+        iLit = CmmLit (CmmInt (toInteger i) W32)++    cast :: CmmExpr -> CmmExpr+    cast val = case maybe_pre_write_cast of+                 Nothing   -> val+                 Just cast -> CmmMachOp cast [val]++    len :: Length+    len = vecLength ty++    wid :: Width+    wid = typeWidth (vecElemType ty)++doVecUnpackOp :: Maybe MachOp  -- Cast from vector component to element result+              -> CmmType       -- Type of vector+              -> CmmExpr       -- Vector+              -> [CmmFormal]   -- Element results+              -> FCode ()+doVecUnpackOp maybe_post_read_cast ty e res =+    vecUnpack res 0+  where+    vecUnpack :: [CmmFormal] -> Int -> FCode ()+    vecUnpack [] _ =+        return ()++    vecUnpack (r : rs) i = do+        if isFloatType (vecElemType ty)+          then emitAssign (CmmLocal r) (cast (CmmMachOp (MO_VF_Extract len wid)+                                             [e, iLit]))+          else emitAssign (CmmLocal r) (cast (CmmMachOp (MO_V_Extract len wid)+                                             [e, iLit]))+        vecUnpack rs (i + 1)+      where+        -- vector indices are always 32-bits+        iLit = CmmLit (CmmInt (toInteger i) W32)++    cast :: CmmExpr -> CmmExpr+    cast val = case maybe_post_read_cast of+                 Nothing   -> val+                 Just cast -> CmmMachOp cast [val]++    len :: Length+    len = vecLength ty++    wid :: Width+    wid = typeWidth (vecElemType ty)++doVecInsertOp :: Maybe MachOp  -- Cast from element to vector component+              -> CmmType       -- Vector type+              -> CmmExpr       -- Source vector+              -> CmmExpr       -- Element+              -> CmmExpr       -- Index at which to insert element+              -> CmmFormal     -- Destination for result+              -> FCode ()+doVecInsertOp maybe_pre_write_cast ty src e idx res = do+    dflags <- getDynFlags+    -- vector indices are always 32-bits+    let idx' :: CmmExpr+        idx' = CmmMachOp (MO_SS_Conv (wordWidth dflags) W32) [idx]+    if isFloatType (vecElemType ty)+      then emitAssign (CmmLocal res) (CmmMachOp (MO_VF_Insert len wid) [src, cast e, idx'])+      else emitAssign (CmmLocal res) (CmmMachOp (MO_V_Insert len wid) [src, cast e, idx'])+  where+    cast :: CmmExpr -> CmmExpr+    cast val = case maybe_pre_write_cast of+                 Nothing   -> val+                 Just cast -> CmmMachOp cast [val]++    len :: Length+    len = vecLength ty++    wid :: Width+    wid = typeWidth (vecElemType ty)++------------------------------------------------------------------------------+-- Helpers for translating prefetching.+++-- | Translate byte array prefetch operations into proper primcalls.+doPrefetchByteArrayOp :: Int+                      -> [CmmExpr]+                      -> FCode ()+doPrefetchByteArrayOp locality  [addr,idx]+   = do dflags <- getDynFlags+        mkBasicPrefetch locality (arrWordsHdrSize dflags)  addr idx+doPrefetchByteArrayOp _ _+   = panic "GHC.StgToCmm.Prim: doPrefetchByteArrayOp"++-- | Translate mutable byte array prefetch operations into proper primcalls.+doPrefetchMutableByteArrayOp :: Int+                      -> [CmmExpr]+                      -> FCode ()+doPrefetchMutableByteArrayOp locality  [addr,idx]+   = do dflags <- getDynFlags+        mkBasicPrefetch locality (arrWordsHdrSize dflags)  addr idx+doPrefetchMutableByteArrayOp _ _+   = panic "GHC.StgToCmm.Prim: doPrefetchByteArrayOp"++-- | Translate address prefetch operations into proper primcalls.+doPrefetchAddrOp ::Int+                 -> [CmmExpr]+                 -> FCode ()+doPrefetchAddrOp locality   [addr,idx]+   = mkBasicPrefetch locality 0  addr idx+doPrefetchAddrOp _ _+   = panic "GHC.StgToCmm.Prim: doPrefetchAddrOp"++-- | Translate value prefetch operations into proper primcalls.+doPrefetchValueOp :: Int+                 -> [CmmExpr]+                 -> FCode ()+doPrefetchValueOp  locality   [addr]+  =  do dflags <- getDynFlags+        mkBasicPrefetch locality 0 addr  (CmmLit (CmmInt 0 (wordWidth dflags)))+doPrefetchValueOp _ _+  = panic "GHC.StgToCmm.Prim: doPrefetchValueOp"++-- | helper to generate prefetch primcalls+mkBasicPrefetch :: Int          -- Locality level 0-3+                -> ByteOff      -- Initial offset in bytes+                -> CmmExpr      -- Base address+                -> CmmExpr      -- Index+                -> FCode ()+mkBasicPrefetch locality off base idx+   = do dflags <- getDynFlags+        emitPrimCall [] (MO_Prefetch_Data locality) [cmmIndexExpr dflags W8 (cmmOffsetB dflags base off) idx]+        return ()++-- ----------------------------------------------------------------------------+-- Allocating byte arrays++-- | Takes a register to return the newly allocated array in and the+-- size of the new array in bytes. Allocates a new+-- 'MutableByteArray#'.+doNewByteArrayOp :: CmmFormal -> ByteOff -> FCode ()+doNewByteArrayOp res_r n = do+    dflags <- getDynFlags++    let info_ptr = mkLblExpr mkArrWords_infoLabel+        rep = arrWordsRep dflags n++    tickyAllocPrim (mkIntExpr dflags (arrWordsHdrSize dflags))+        (mkIntExpr dflags (nonHdrSize dflags rep))+        (zeroExpr dflags)++    let hdr_size = fixedHdrSize dflags++    base <- allocHeapClosure rep info_ptr cccsExpr+                     [ (mkIntExpr dflags n,+                        hdr_size + oFFSET_StgArrBytes_bytes dflags)+                     ]++    emit $ mkAssign (CmmLocal res_r) base++-- ----------------------------------------------------------------------------+-- Comparing byte arrays++doCompareByteArraysOp :: LocalReg -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+                     -> FCode ()+doCompareByteArraysOp res ba1 ba1_off ba2 ba2_off n = do+    dflags <- getDynFlags+    ba1_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba1 (arrWordsHdrSize dflags)) ba1_off+    ba2_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba2 (arrWordsHdrSize dflags)) ba2_off++    -- short-cut in case of equal pointers avoiding a costly+    -- subroutine call to the memcmp(3) routine; the Cmm logic below+    -- results in assembly code being generated for+    --+    --   cmpPrefix10 :: ByteArray# -> ByteArray# -> Int#+    --   cmpPrefix10 ba1 ba2 = compareByteArrays# ba1 0# ba2 0# 10#+    --+    -- that looks like+    --+    --          leaq 16(%r14),%rax+    --          leaq 16(%rsi),%rbx+    --          xorl %ecx,%ecx+    --          cmpq %rbx,%rax+    --          je l_ptr_eq+    --+    --          ; NB: the common case (unequal pointers) falls-through+    --          ; the conditional jump, and therefore matches the+    --          ; usual static branch prediction convention of modern cpus+    --+    --          subq $8,%rsp+    --          movq %rbx,%rsi+    --          movq %rax,%rdi+    --          movl $10,%edx+    --          xorl %eax,%eax+    --          call memcmp+    --          addq $8,%rsp+    --          movslq %eax,%rax+    --          movq %rax,%rcx+    --  l_ptr_eq:+    --          movq %rcx,%rbx+    --          jmp *(%rbp)++    l_ptr_eq <- newBlockId+    l_ptr_ne <- newBlockId++    emit (mkAssign (CmmLocal res) (zeroExpr dflags))+    emit (mkCbranch (cmmEqWord dflags ba1_p ba2_p)+                    l_ptr_eq l_ptr_ne (Just False))++    emitLabel l_ptr_ne+    emitMemcmpCall res ba1_p ba2_p n 1++    emitLabel l_ptr_eq++-- ----------------------------------------------------------------------------+-- Copying byte arrays++-- | Takes a source 'ByteArray#', an offset in the source array, a+-- destination 'MutableByteArray#', an offset into the destination+-- array, and the number of bytes to copy.  Copies the given number of+-- bytes from the source array to the destination array.+doCopyByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+                  -> FCode ()+doCopyByteArrayOp = emitCopyByteArray copy+  where+    -- Copy data (we assume the arrays aren't overlapping since+    -- they're of different types)+    copy _src _dst dst_p src_p bytes align =+        emitMemcpyCall dst_p src_p bytes align++-- | Takes a source 'MutableByteArray#', an offset in the source+-- array, a destination 'MutableByteArray#', an offset into the+-- destination array, and the number of bytes to copy.  Copies the+-- given number of bytes from the source array to the destination+-- array.+doCopyMutableByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+                         -> FCode ()+doCopyMutableByteArrayOp = emitCopyByteArray copy+  where+    -- The only time the memory might overlap is when the two arrays+    -- we were provided are the same array!+    -- TODO: Optimize branch for common case of no aliasing.+    copy src dst dst_p src_p bytes align = do+        dflags <- getDynFlags+        (moveCall, cpyCall) <- forkAltPair+            (getCode $ emitMemmoveCall dst_p src_p bytes align)+            (getCode $ emitMemcpyCall  dst_p src_p bytes align)+        emit =<< mkCmmIfThenElse (cmmEqWord dflags src dst) moveCall cpyCall++emitCopyByteArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+                      -> Alignment -> FCode ())+                  -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+                  -> FCode ()+emitCopyByteArray copy src src_off dst dst_off n = do+    dflags <- getDynFlags+    let byteArrayAlignment = wordAlignment dflags+        srcOffAlignment = cmmExprAlignment src_off+        dstOffAlignment = cmmExprAlignment dst_off+        align = minimum [byteArrayAlignment, srcOffAlignment, dstOffAlignment]+    dst_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags dst (arrWordsHdrSize dflags)) dst_off+    src_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags src (arrWordsHdrSize dflags)) src_off+    copy src dst dst_p src_p n align++-- | Takes a source 'ByteArray#', an offset in the source array, a+-- destination 'Addr#', and the number of bytes to copy.  Copies the given+-- number of bytes from the source array to the destination memory region.+doCopyByteArrayToAddrOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> FCode ()+doCopyByteArrayToAddrOp src src_off dst_p bytes = do+    -- Use memcpy (we are allowed to assume the arrays aren't overlapping)+    dflags <- getDynFlags+    src_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags src (arrWordsHdrSize dflags)) src_off+    emitMemcpyCall dst_p src_p bytes (mkAlignment 1)++-- | Takes a source 'MutableByteArray#', an offset in the source array, a+-- destination 'Addr#', and the number of bytes to copy.  Copies the given+-- number of bytes from the source array to the destination memory region.+doCopyMutableByteArrayToAddrOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+                               -> FCode ()+doCopyMutableByteArrayToAddrOp = doCopyByteArrayToAddrOp++-- | Takes a source 'Addr#', a destination 'MutableByteArray#', an offset into+-- the destination array, and the number of bytes to copy.  Copies the given+-- number of bytes from the source memory region to the destination array.+doCopyAddrToByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> FCode ()+doCopyAddrToByteArrayOp src_p dst dst_off bytes = do+    -- Use memcpy (we are allowed to assume the arrays aren't overlapping)+    dflags <- getDynFlags+    dst_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags dst (arrWordsHdrSize dflags)) dst_off+    emitMemcpyCall dst_p src_p bytes (mkAlignment 1)+++-- ----------------------------------------------------------------------------+-- Setting byte arrays++-- | Takes a 'MutableByteArray#', an offset into the array, a length,+-- and a byte, and sets each of the selected bytes in the array to the+-- character.+doSetByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr+                 -> FCode ()+doSetByteArrayOp ba off len c = do+    dflags <- getDynFlags++    let byteArrayAlignment = wordAlignment dflags -- known since BA is allocated on heap+        offsetAlignment = cmmExprAlignment off+        align = min byteArrayAlignment offsetAlignment++    p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba (arrWordsHdrSize dflags)) off+    emitMemsetCall p c len align++-- ----------------------------------------------------------------------------+-- Allocating arrays++-- | Allocate a new array.+doNewArrayOp :: CmmFormal             -- ^ return register+             -> SMRep                 -- ^ representation of the array+             -> CLabel                -- ^ info pointer+             -> [(CmmExpr, ByteOff)]  -- ^ header payload+             -> WordOff               -- ^ array size+             -> CmmExpr               -- ^ initial element+             -> FCode ()+doNewArrayOp res_r rep info payload n init = do+    dflags <- getDynFlags++    let info_ptr = mkLblExpr info++    tickyAllocPrim (mkIntExpr dflags (hdrSize dflags rep))+        (mkIntExpr dflags (nonHdrSize dflags rep))+        (zeroExpr dflags)++    base <- allocHeapClosure rep info_ptr cccsExpr payload++    arr <- CmmLocal `fmap` newTemp (bWord dflags)+    emit $ mkAssign arr base++    -- Initialise all elements of the array+    let mkOff off = cmmOffsetW dflags (CmmReg arr) (hdrSizeW dflags rep + off)+        initialization = [ mkStore (mkOff off) init | off <- [0.. n - 1] ]+    emit (catAGraphs initialization)++    emit $ mkAssign (CmmLocal res_r) (CmmReg arr)++-- ----------------------------------------------------------------------------+-- Copying pointer arrays++-- EZY: This code has an unusually high amount of assignTemp calls, seen+-- nowhere else in the code generator.  This is mostly because these+-- "primitive" ops result in a surprisingly large amount of code.  It+-- will likely be worthwhile to optimize what is emitted here, so that+-- our optimization passes don't waste time repeatedly optimizing the+-- same bits of code.++-- More closely imitates 'assignTemp' from the old code generator, which+-- returns a CmmExpr rather than a LocalReg.+assignTempE :: CmmExpr -> FCode CmmExpr+assignTempE e = do+    t <- assignTemp e+    return (CmmReg (CmmLocal t))++-- | Takes a source 'Array#', an offset in the source array, a+-- destination 'MutableArray#', an offset into the destination array,+-- and the number of elements to copy.  Copies the given number of+-- elements from the source array to the destination array.+doCopyArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff+              -> FCode ()+doCopyArrayOp = emitCopyArray copy+  where+    -- Copy data (we assume the arrays aren't overlapping since+    -- they're of different types)+    copy _src _dst dst_p src_p bytes =+        do dflags <- getDynFlags+           emitMemcpyCall dst_p src_p (mkIntExpr dflags bytes)+               (wordAlignment dflags)+++-- | Takes a source 'MutableArray#', an offset in the source array, a+-- destination 'MutableArray#', an offset into the destination array,+-- and the number of elements to copy.  Copies the given number of+-- elements from the source array to the destination array.+doCopyMutableArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff+                     -> FCode ()+doCopyMutableArrayOp = emitCopyArray copy+  where+    -- The only time the memory might overlap is when the two arrays+    -- we were provided are the same array!+    -- TODO: Optimize branch for common case of no aliasing.+    copy src dst dst_p src_p bytes = do+        dflags <- getDynFlags+        (moveCall, cpyCall) <- forkAltPair+            (getCode $ emitMemmoveCall dst_p src_p (mkIntExpr dflags bytes)+             (wordAlignment dflags))+            (getCode $ emitMemcpyCall  dst_p src_p (mkIntExpr dflags bytes)+             (wordAlignment dflags))+        emit =<< mkCmmIfThenElse (cmmEqWord dflags src dst) moveCall cpyCall++emitCopyArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> ByteOff+                  -> FCode ())  -- ^ copy function+              -> CmmExpr        -- ^ source array+              -> CmmExpr        -- ^ offset in source array+              -> CmmExpr        -- ^ destination array+              -> CmmExpr        -- ^ offset in destination array+              -> WordOff        -- ^ number of elements to copy+              -> FCode ()+emitCopyArray copy src0 src_off dst0 dst_off0 n =+    when (n /= 0) $ do+        dflags <- getDynFlags++        -- Passed as arguments (be careful)+        src     <- assignTempE src0+        dst     <- assignTempE dst0+        dst_off <- assignTempE dst_off0++        -- Nonmoving collector write barrier+        emitCopyUpdRemSetPush dflags (arrPtrsHdrSizeW dflags) dst dst_off n++        -- Set the dirty bit in the header.+        emit (setInfo dst (CmmLit (CmmLabel mkMAP_DIRTY_infoLabel)))++        dst_elems_p <- assignTempE $ cmmOffsetB dflags dst+                       (arrPtrsHdrSize dflags)+        dst_p <- assignTempE $ cmmOffsetExprW dflags dst_elems_p dst_off+        src_p <- assignTempE $ cmmOffsetExprW dflags+                 (cmmOffsetB dflags src (arrPtrsHdrSize dflags)) src_off+        let bytes = wordsToBytes dflags n++        copy src dst dst_p src_p bytes++        -- The base address of the destination card table+        dst_cards_p <- assignTempE $ cmmOffsetExprW dflags dst_elems_p+                       (loadArrPtrsSize dflags dst)++        emitSetCards dst_off dst_cards_p n++doCopySmallArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff+                   -> FCode ()+doCopySmallArrayOp = emitCopySmallArray copy+  where+    -- Copy data (we assume the arrays aren't overlapping since+    -- they're of different types)+    copy _src _dst dst_p src_p bytes =+        do dflags <- getDynFlags+           emitMemcpyCall dst_p src_p (mkIntExpr dflags bytes)+               (wordAlignment dflags)+++doCopySmallMutableArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff+                          -> FCode ()+doCopySmallMutableArrayOp = emitCopySmallArray copy+  where+    -- The only time the memory might overlap is when the two arrays+    -- we were provided are the same array!+    -- TODO: Optimize branch for common case of no aliasing.+    copy src dst dst_p src_p bytes = do+        dflags <- getDynFlags+        (moveCall, cpyCall) <- forkAltPair+            (getCode $ emitMemmoveCall dst_p src_p (mkIntExpr dflags bytes)+             (wordAlignment dflags))+            (getCode $ emitMemcpyCall  dst_p src_p (mkIntExpr dflags bytes)+             (wordAlignment dflags))+        emit =<< mkCmmIfThenElse (cmmEqWord dflags src dst) moveCall cpyCall++emitCopySmallArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> ByteOff+                       -> FCode ())  -- ^ copy function+                   -> CmmExpr        -- ^ source array+                   -> CmmExpr        -- ^ offset in source array+                   -> CmmExpr        -- ^ destination array+                   -> CmmExpr        -- ^ offset in destination array+                   -> WordOff        -- ^ number of elements to copy+                   -> FCode ()+emitCopySmallArray copy src0 src_off dst0 dst_off n =+    when (n /= 0) $ do+        dflags <- getDynFlags++        -- Passed as arguments (be careful)+        src     <- assignTempE src0+        dst     <- assignTempE dst0++        -- Nonmoving collector write barrier+        emitCopyUpdRemSetPush dflags (smallArrPtrsHdrSizeW dflags) dst dst_off n++        -- Set the dirty bit in the header.+        emit (setInfo dst (CmmLit (CmmLabel mkSMAP_DIRTY_infoLabel)))++        dst_p <- assignTempE $ cmmOffsetExprW dflags+                 (cmmOffsetB dflags dst (smallArrPtrsHdrSize dflags)) dst_off+        src_p <- assignTempE $ cmmOffsetExprW dflags+                 (cmmOffsetB dflags src (smallArrPtrsHdrSize dflags)) src_off+        let bytes = wordsToBytes dflags n++        copy src dst dst_p src_p bytes++-- | Takes an info table label, a register to return the newly+-- allocated array in, a source array, an offset in the source array,+-- and the number of elements to copy. Allocates a new array and+-- initializes it from the source array.+emitCloneArray :: CLabel -> CmmFormal -> CmmExpr -> CmmExpr -> WordOff+               -> FCode ()+emitCloneArray info_p res_r src src_off n = do+    dflags <- getDynFlags++    let info_ptr = mkLblExpr info_p+        rep = arrPtrsRep dflags n++    tickyAllocPrim (mkIntExpr dflags (arrPtrsHdrSize dflags))+        (mkIntExpr dflags (nonHdrSize dflags rep))+        (zeroExpr dflags)++    let hdr_size = fixedHdrSize dflags++    base <- allocHeapClosure rep info_ptr cccsExpr+                     [ (mkIntExpr dflags n,+                        hdr_size + oFFSET_StgMutArrPtrs_ptrs dflags)+                     , (mkIntExpr dflags (nonHdrSizeW rep),+                        hdr_size + oFFSET_StgMutArrPtrs_size dflags)+                     ]++    arr <- CmmLocal `fmap` newTemp (bWord dflags)+    emit $ mkAssign arr base++    dst_p <- assignTempE $ cmmOffsetB dflags (CmmReg arr)+             (arrPtrsHdrSize dflags)+    src_p <- assignTempE $ cmmOffsetExprW dflags src+             (cmmAddWord dflags+              (mkIntExpr dflags (arrPtrsHdrSizeW dflags)) src_off)++    emitMemcpyCall dst_p src_p (mkIntExpr dflags (wordsToBytes dflags n))+        (wordAlignment dflags)++    emit $ mkAssign (CmmLocal res_r) (CmmReg arr)++-- | Takes an info table label, a register to return the newly+-- allocated array in, a source array, an offset in the source array,+-- and the number of elements to copy. Allocates a new array and+-- initializes it from the source array.+emitCloneSmallArray :: CLabel -> CmmFormal -> CmmExpr -> CmmExpr -> WordOff+                    -> FCode ()+emitCloneSmallArray info_p res_r src src_off n = do+    dflags <- getDynFlags++    let info_ptr = mkLblExpr info_p+        rep = smallArrPtrsRep n++    tickyAllocPrim (mkIntExpr dflags (smallArrPtrsHdrSize dflags))+        (mkIntExpr dflags (nonHdrSize dflags rep))+        (zeroExpr dflags)++    let hdr_size = fixedHdrSize dflags++    base <- allocHeapClosure rep info_ptr cccsExpr+                     [ (mkIntExpr dflags n,+                        hdr_size + oFFSET_StgSmallMutArrPtrs_ptrs dflags)+                     ]++    arr <- CmmLocal `fmap` newTemp (bWord dflags)+    emit $ mkAssign arr base++    dst_p <- assignTempE $ cmmOffsetB dflags (CmmReg arr)+             (smallArrPtrsHdrSize dflags)+    src_p <- assignTempE $ cmmOffsetExprW dflags src+             (cmmAddWord dflags+              (mkIntExpr dflags (smallArrPtrsHdrSizeW dflags)) src_off)++    emitMemcpyCall dst_p src_p (mkIntExpr dflags (wordsToBytes dflags n))+        (wordAlignment dflags)++    emit $ mkAssign (CmmLocal res_r) (CmmReg arr)++-- | Takes and offset in the destination array, the base address of+-- the card table, and the number of elements affected (*not* the+-- number of cards). The number of elements may not be zero.+-- Marks the relevant cards as dirty.+emitSetCards :: CmmExpr -> CmmExpr -> WordOff -> FCode ()+emitSetCards dst_start dst_cards_start n = do+    dflags <- getDynFlags+    start_card <- assignTempE $ cardCmm dflags dst_start+    let end_card = cardCmm dflags+                   (cmmSubWord dflags+                    (cmmAddWord dflags dst_start (mkIntExpr dflags n))+                    (mkIntExpr dflags 1))+    emitMemsetCall (cmmAddWord dflags dst_cards_start start_card)+        (mkIntExpr dflags 1)+        (cmmAddWord dflags (cmmSubWord dflags end_card start_card) (mkIntExpr dflags 1))+        (mkAlignment 1) -- no alignment (1 byte)++-- Convert an element index to a card index+cardCmm :: DynFlags -> CmmExpr -> CmmExpr+cardCmm dflags i =+    cmmUShrWord dflags i (mkIntExpr dflags (mUT_ARR_PTRS_CARD_BITS dflags))++------------------------------------------------------------------------------+-- SmallArray PrimOp implementations++doReadSmallPtrArrayOp :: LocalReg+                      -> CmmExpr+                      -> CmmExpr+                      -> FCode ()+doReadSmallPtrArrayOp res addr idx = do+    dflags <- getDynFlags+    mkBasicIndexedRead (smallArrPtrsHdrSize dflags) Nothing (gcWord dflags) res addr+        (gcWord dflags) idx++doWriteSmallPtrArrayOp :: CmmExpr+                       -> CmmExpr+                       -> CmmExpr+                       -> FCode ()+doWriteSmallPtrArrayOp addr idx val = do+    dflags <- getDynFlags+    let ty = cmmExprType dflags val++    -- Update remembered set for non-moving collector+    tmp <- newTemp ty+    mkBasicIndexedRead (smallArrPtrsHdrSize dflags) Nothing ty tmp addr ty idx+    whenUpdRemSetEnabled dflags $ emitUpdRemSetPush (CmmReg (CmmLocal tmp))++    emitPrimCall [] MO_WriteBarrier [] -- #12469+    mkBasicIndexedWrite (smallArrPtrsHdrSize dflags) Nothing addr ty idx val+    emit (setInfo addr (CmmLit (CmmLabel mkSMAP_DIRTY_infoLabel)))++------------------------------------------------------------------------------+-- Atomic read-modify-write++-- | Emit an atomic modification to a byte array element. The result+-- reg contains that previous value of the element. Implies a full+-- memory barrier.+doAtomicRMW :: LocalReg      -- ^ Result reg+            -> AtomicMachOp  -- ^ Atomic op (e.g. add)+            -> CmmExpr       -- ^ MutableByteArray#+            -> CmmExpr       -- ^ Index+            -> CmmType       -- ^ Type of element by which we are indexing+            -> CmmExpr       -- ^ Op argument (e.g. amount to add)+            -> FCode ()+doAtomicRMW res amop mba idx idx_ty n = do+    dflags <- getDynFlags+    let width = typeWidth idx_ty+        addr  = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)+                width mba idx+    emitPrimCall+        [ res ]+        (MO_AtomicRMW width amop)+        [ addr, n ]++-- | Emit an atomic read to a byte array that acts as a memory barrier.+doAtomicReadByteArray+    :: LocalReg  -- ^ Result reg+    -> CmmExpr   -- ^ MutableByteArray#+    -> CmmExpr   -- ^ Index+    -> CmmType   -- ^ Type of element by which we are indexing+    -> FCode ()+doAtomicReadByteArray res mba idx idx_ty = do+    dflags <- getDynFlags+    let width = typeWidth idx_ty+        addr  = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)+                width mba idx+    emitPrimCall+        [ res ]+        (MO_AtomicRead width)+        [ addr ]++-- | Emit an atomic write to a byte array that acts as a memory barrier.+doAtomicWriteByteArray+    :: CmmExpr   -- ^ MutableByteArray#+    -> CmmExpr   -- ^ Index+    -> CmmType   -- ^ Type of element by which we are indexing+    -> CmmExpr   -- ^ Value to write+    -> FCode ()+doAtomicWriteByteArray mba idx idx_ty val = do+    dflags <- getDynFlags+    let width = typeWidth idx_ty+        addr  = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)+                width mba idx+    emitPrimCall+        [ {- no results -} ]+        (MO_AtomicWrite width)+        [ addr, val ]++doCasByteArray+    :: LocalReg  -- ^ Result reg+    -> CmmExpr   -- ^ MutableByteArray#+    -> CmmExpr   -- ^ Index+    -> CmmType   -- ^ Type of element by which we are indexing+    -> CmmExpr   -- ^ Old value+    -> CmmExpr   -- ^ New value+    -> FCode ()+doCasByteArray res mba idx idx_ty old new = do+    dflags <- getDynFlags+    let width = (typeWidth idx_ty)+        addr = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)+               width mba idx+    emitPrimCall+        [ res ]+        (MO_Cmpxchg width)+        [ addr, old, new ]++------------------------------------------------------------------------------+-- Helpers for emitting function calls++-- | Emit a call to @memcpy@.+emitMemcpyCall :: CmmExpr -> CmmExpr -> CmmExpr -> Alignment -> FCode ()+emitMemcpyCall dst src n align = do+    emitPrimCall+        [ {-no results-} ]+        (MO_Memcpy (alignmentBytes align))+        [ dst, src, n ]++-- | Emit a call to @memmove@.+emitMemmoveCall :: CmmExpr -> CmmExpr -> CmmExpr -> Alignment -> FCode ()+emitMemmoveCall dst src n align = do+    emitPrimCall+        [ {- no results -} ]+        (MO_Memmove (alignmentBytes align))+        [ dst, src, n ]++-- | Emit a call to @memset@.  The second argument must fit inside an+-- unsigned char.+emitMemsetCall :: CmmExpr -> CmmExpr -> CmmExpr -> Alignment -> FCode ()+emitMemsetCall dst c n align = do+    emitPrimCall+        [ {- no results -} ]+        (MO_Memset (alignmentBytes align))+        [ dst, c, n ]++emitMemcmpCall :: LocalReg -> CmmExpr -> CmmExpr -> CmmExpr -> Int -> FCode ()+emitMemcmpCall res ptr1 ptr2 n align = do+    -- 'MO_Memcmp' is assumed to return an 32bit 'CInt' because all+    -- code-gens currently call out to the @memcmp(3)@ C function.+    -- This was easier than moving the sign-extensions into+    -- all the code-gens.+    dflags <- getDynFlags+    let is32Bit = typeWidth (localRegType res) == W32++    cres <- if is32Bit+              then return res+              else newTemp b32++    emitPrimCall+        [ cres ]+        (MO_Memcmp align)+        [ ptr1, ptr2, n ]++    unless is32Bit $ do+      emit $ mkAssign (CmmLocal res)+                      (CmmMachOp+                         (mo_s_32ToWord dflags)+                         [(CmmReg (CmmLocal cres))])++emitBSwapCall :: LocalReg -> CmmExpr -> Width -> FCode ()+emitBSwapCall res x width = do+    emitPrimCall+        [ res ]+        (MO_BSwap width)+        [ x ]++emitBRevCall :: LocalReg -> CmmExpr -> Width -> FCode ()+emitBRevCall res x width = do+    emitPrimCall+        [ res ]+        (MO_BRev width)+        [ x ]++emitPopCntCall :: LocalReg -> CmmExpr -> Width -> FCode ()+emitPopCntCall res x width = do+    emitPrimCall+        [ res ]+        (MO_PopCnt width)+        [ x ]++emitPdepCall :: LocalReg -> CmmExpr -> CmmExpr -> Width -> FCode ()+emitPdepCall res x y width = do+    emitPrimCall+        [ res ]+        (MO_Pdep width)+        [ x, y ]++emitPextCall :: LocalReg -> CmmExpr -> CmmExpr -> Width -> FCode ()+emitPextCall res x y width = do+    emitPrimCall+        [ res ]+        (MO_Pext width)+        [ x, y ]++emitClzCall :: LocalReg -> CmmExpr -> Width -> FCode ()+emitClzCall res x width = do+    emitPrimCall+        [ res ]+        (MO_Clz width)+        [ x ]++emitCtzCall :: LocalReg -> CmmExpr -> Width -> FCode ()+emitCtzCall res x width = do+    emitPrimCall+        [ res ]+        (MO_Ctz width)+        [ x ]++---------------------------------------------------------------------------+-- Pushing to the update remembered set+---------------------------------------------------------------------------++-- | Push a range of pointer-array elements that are about to be copied over to+-- the update remembered set.+emitCopyUpdRemSetPush :: DynFlags+                      -> WordOff    -- ^ array header size+                      -> CmmExpr    -- ^ destination array+                      -> CmmExpr    -- ^ offset in destination array (in words)+                      -> Int        -- ^ number of elements to copy+                      -> FCode ()+emitCopyUpdRemSetPush _dflags _hdr_size _dst _dst_off 0 = return ()+emitCopyUpdRemSetPush dflags hdr_size dst dst_off n =+    whenUpdRemSetEnabled dflags $ do+        updfr_off <- getUpdFrameOff+        graph <- mkCall lbl (NativeNodeCall,NativeReturn) [] args updfr_off []+        emit graph+  where+    lbl = mkLblExpr $ mkPrimCallLabel+          $ PrimCall (fsLit "stg_copyArray_barrier") rtsUnitId+    args =+      [ mkIntExpr dflags hdr_size+      , dst+      , dst_off+      , mkIntExpr dflags n+      ]
+ GHC/StgToCmm/Prof.hs view
@@ -0,0 +1,360 @@+-----------------------------------------------------------------------------+--+-- Code generation for profiling+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Prof (+        initCostCentres, ccType, ccsType,+        mkCCostCentre, mkCCostCentreStack,++        -- Cost-centre Profiling+        dynProfHdr, profDynAlloc, profAlloc, staticProfHdr, initUpdFrameProf,+        enterCostCentreThunk, enterCostCentreFun,+        costCentreFrom,+        storeCurCCS,+        emitSetCCC,++        saveCurrentCostCentre, restoreCurrentCostCentre,++        -- Lag/drag/void stuff+        ldvEnter, ldvEnterClosure, ldvRecordCreate+  ) where++import GhcPrelude++import GHC.StgToCmm.Closure+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Monad+import SMRep++import MkGraph+import Cmm+import CmmUtils+import CLabel++import CostCentre+import DynFlags+import FastString+import Module+import Outputable++import Control.Monad+import Data.Char (ord)++-----------------------------------------------------------------------------+--+-- Cost-centre-stack Profiling+--+-----------------------------------------------------------------------------++-- Expression representing the current cost centre stack+ccsType :: DynFlags -> CmmType -- Type of a cost-centre stack+ccsType = bWord++ccType :: DynFlags -> CmmType -- Type of a cost centre+ccType = bWord++storeCurCCS :: CmmExpr -> CmmAGraph+storeCurCCS e = mkAssign cccsReg e++mkCCostCentre :: CostCentre -> CmmLit+mkCCostCentre cc = CmmLabel (mkCCLabel cc)++mkCCostCentreStack :: CostCentreStack -> CmmLit+mkCCostCentreStack ccs = CmmLabel (mkCCSLabel ccs)++costCentreFrom :: DynFlags+               -> CmmExpr         -- A closure pointer+               -> CmmExpr        -- The cost centre from that closure+costCentreFrom dflags cl = CmmLoad (cmmOffsetB dflags cl (oFFSET_StgHeader_ccs dflags)) (ccsType dflags)++-- | The profiling header words in a static closure+staticProfHdr :: DynFlags -> CostCentreStack -> [CmmLit]+staticProfHdr dflags ccs+ = ifProfilingL dflags [mkCCostCentreStack ccs, staticLdvInit dflags]++-- | Profiling header words in a dynamic closure+dynProfHdr :: DynFlags -> CmmExpr -> [CmmExpr]+dynProfHdr dflags ccs = ifProfilingL dflags [ccs, dynLdvInit dflags]++-- | Initialise the profiling field of an update frame+initUpdFrameProf :: CmmExpr -> FCode ()+initUpdFrameProf frame+  = ifProfiling $        -- frame->header.prof.ccs = CCCS+    do dflags <- getDynFlags+       emitStore (cmmOffset dflags frame (oFFSET_StgHeader_ccs dflags)) cccsExpr+        -- frame->header.prof.hp.rs = NULL (or frame-header.prof.hp.ldvw = 0)+        -- is unnecessary because it is not used anyhow.++---------------------------------------------------------------------------+--         Saving and restoring the current cost centre+---------------------------------------------------------------------------++{-        Note [Saving the current cost centre]+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The current cost centre is like a global register.  Like other+global registers, it's a caller-saves one.  But consider+        case (f x) of (p,q) -> rhs+Since 'f' may set the cost centre, we must restore it+before resuming rhs.  So we want code like this:+        local_cc = CCC  -- save+        r = f( x )+        CCC = local_cc  -- restore+That is, we explicitly "save" the current cost centre in+a LocalReg, local_cc; and restore it after the call. The+C-- infrastructure will arrange to save local_cc across the+call.++The same goes for join points;+        let j x = join-stuff+        in blah-blah+We want this kind of code:+        local_cc = CCC  -- save+        blah-blah+     J:+        CCC = local_cc  -- restore+-}++saveCurrentCostCentre :: FCode (Maybe LocalReg)+        -- Returns Nothing if profiling is off+saveCurrentCostCentre+  = do dflags <- getDynFlags+       if not (gopt Opt_SccProfilingOn dflags)+           then return Nothing+           else do local_cc <- newTemp (ccType dflags)+                   emitAssign (CmmLocal local_cc) cccsExpr+                   return (Just local_cc)++restoreCurrentCostCentre :: Maybe LocalReg -> FCode ()+restoreCurrentCostCentre Nothing+  = return ()+restoreCurrentCostCentre (Just local_cc)+  = emit (storeCurCCS (CmmReg (CmmLocal local_cc)))+++-------------------------------------------------------------------------------+-- Recording allocation in a cost centre+-------------------------------------------------------------------------------++-- | Record the allocation of a closure.  The CmmExpr is the cost+-- centre stack to which to attribute the allocation.+profDynAlloc :: SMRep -> CmmExpr -> FCode ()+profDynAlloc rep ccs+  = ifProfiling $+    do dflags <- getDynFlags+       profAlloc (mkIntExpr dflags (heapClosureSizeW dflags rep)) ccs++-- | Record the allocation of a closure (size is given by a CmmExpr)+-- The size must be in words, because the allocation counter in a CCS counts+-- in words.+profAlloc :: CmmExpr -> CmmExpr -> FCode ()+profAlloc words ccs+  = ifProfiling $+        do dflags <- getDynFlags+           let alloc_rep = rEP_CostCentreStack_mem_alloc dflags+           emit (addToMemE alloc_rep+                       (cmmOffsetB dflags ccs (oFFSET_CostCentreStack_mem_alloc dflags))+                       (CmmMachOp (MO_UU_Conv (wordWidth dflags) (typeWidth alloc_rep)) $+                         [CmmMachOp (mo_wordSub dflags) [words,+                                                         mkIntExpr dflags (profHdrSize dflags)]]))+                       -- subtract the "profiling overhead", which is the+                       -- profiling header in a closure.++-- -----------------------------------------------------------------------+-- Setting the current cost centre on entry to a closure++enterCostCentreThunk :: CmmExpr -> FCode ()+enterCostCentreThunk closure =+  ifProfiling $ do+      dflags <- getDynFlags+      emit $ storeCurCCS (costCentreFrom dflags closure)++enterCostCentreFun :: CostCentreStack -> CmmExpr -> FCode ()+enterCostCentreFun ccs closure =+  ifProfiling $ do+    if isCurrentCCS ccs+       then do dflags <- getDynFlags+               emitRtsCall rtsUnitId (fsLit "enterFunCCS")+                   [(baseExpr, AddrHint),+                    (costCentreFrom dflags closure, AddrHint)] False+       else return () -- top-level function, nothing to do++ifProfiling :: FCode () -> FCode ()+ifProfiling code+  = do dflags <- getDynFlags+       if gopt Opt_SccProfilingOn dflags+           then code+           else return ()++ifProfilingL :: DynFlags -> [a] -> [a]+ifProfilingL dflags xs+  | gopt Opt_SccProfilingOn dflags = xs+  | otherwise                      = []+++---------------------------------------------------------------+--        Initialising Cost Centres & CCSs+---------------------------------------------------------------++initCostCentres :: CollectedCCs -> FCode ()+-- Emit the declarations+initCostCentres (local_CCs, singleton_CCSs)+  = do dflags <- getDynFlags+       when (gopt Opt_SccProfilingOn dflags) $+           do mapM_ emitCostCentreDecl local_CCs+              mapM_ emitCostCentreStackDecl singleton_CCSs+++emitCostCentreDecl :: CostCentre -> FCode ()+emitCostCentreDecl cc = do+  { dflags <- getDynFlags+  ; let is_caf | isCafCC cc = mkIntCLit dflags (ord 'c') -- 'c' == is a CAF+               | otherwise  = zero dflags+                        -- NB. bytesFS: we want the UTF-8 bytes here (#5559)+  ; label <- newByteStringCLit (bytesFS $ costCentreUserNameFS cc)+  ; modl  <- newByteStringCLit (bytesFS $ Module.moduleNameFS+                                        $ Module.moduleName+                                        $ cc_mod cc)+  ; loc <- newByteStringCLit $ bytesFS $ mkFastString $+                   showPpr dflags (costCentreSrcSpan cc)+           -- XXX going via FastString to get UTF-8 encoding is silly+  ; let+     lits = [ zero dflags,           -- StgInt ccID,+              label,        -- char *label,+              modl,        -- char *module,+              loc,      -- char *srcloc,+              zero64,   -- StgWord64 mem_alloc+              zero dflags,     -- StgWord time_ticks+              is_caf,   -- StgInt is_caf+              zero dflags      -- struct _CostCentre *link+            ]+  ; emitDataLits (mkCCLabel cc) lits+  }++emitCostCentreStackDecl :: CostCentreStack -> FCode ()+emitCostCentreStackDecl ccs+  = case maybeSingletonCCS ccs of+    Just cc ->+        do dflags <- getDynFlags+           let mk_lits cc = zero dflags :+                            mkCCostCentre cc :+                            replicate (sizeof_ccs_words dflags - 2) (zero dflags)+                -- Note: to avoid making any assumptions about how the+                -- C compiler (that compiles the RTS, in particular) does+                -- layouts of structs containing long-longs, simply+                -- pad out the struct with zero words until we hit the+                -- size of the overall struct (which we get via DerivedConstants.h)+           emitDataLits (mkCCSLabel ccs) (mk_lits cc)+    Nothing -> pprPanic "emitCostCentreStackDecl" (ppr ccs)++zero :: DynFlags -> CmmLit+zero dflags = mkIntCLit dflags 0+zero64 :: CmmLit+zero64 = CmmInt 0 W64++sizeof_ccs_words :: DynFlags -> Int+sizeof_ccs_words dflags+    -- round up to the next word.+  | ms == 0   = ws+  | otherwise = ws + 1+  where+   (ws,ms) = sIZEOF_CostCentreStack dflags `divMod` wORD_SIZE dflags++-- ---------------------------------------------------------------------------+-- Set the current cost centre stack++emitSetCCC :: CostCentre -> Bool -> Bool -> FCode ()+emitSetCCC cc tick push+ = do dflags <- getDynFlags+      if not (gopt Opt_SccProfilingOn dflags)+          then return ()+          else do tmp <- newTemp (ccsType dflags)+                  pushCostCentre tmp cccsExpr cc+                  when tick $ emit (bumpSccCount dflags (CmmReg (CmmLocal tmp)))+                  when push $ emit (storeCurCCS (CmmReg (CmmLocal tmp)))++pushCostCentre :: LocalReg -> CmmExpr -> CostCentre -> FCode ()+pushCostCentre result ccs cc+  = emitRtsCallWithResult result AddrHint+        rtsUnitId+        (fsLit "pushCostCentre") [(ccs,AddrHint),+                                (CmmLit (mkCCostCentre cc), AddrHint)]+        False++bumpSccCount :: DynFlags -> CmmExpr -> CmmAGraph+bumpSccCount dflags ccs+  = addToMem (rEP_CostCentreStack_scc_count dflags)+         (cmmOffsetB dflags ccs (oFFSET_CostCentreStack_scc_count dflags)) 1++-----------------------------------------------------------------------------+--+--                Lag/drag/void stuff+--+-----------------------------------------------------------------------------++--+-- Initial value for the LDV field in a static closure+--+staticLdvInit :: DynFlags -> CmmLit+staticLdvInit = zeroCLit++--+-- Initial value of the LDV field in a dynamic closure+--+dynLdvInit :: DynFlags -> CmmExpr+dynLdvInit dflags =     -- (era << LDV_SHIFT) | LDV_STATE_CREATE+  CmmMachOp (mo_wordOr dflags) [+      CmmMachOp (mo_wordShl dflags) [loadEra dflags, mkIntExpr dflags (lDV_SHIFT dflags)],+      CmmLit (mkWordCLit dflags (iLDV_STATE_CREATE dflags))+  ]++--+-- Initialise the LDV word of a new closure+--+ldvRecordCreate :: CmmExpr -> FCode ()+ldvRecordCreate closure = do+  dflags <- getDynFlags+  emit $ mkStore (ldvWord dflags closure) (dynLdvInit dflags)++--+-- | Called when a closure is entered, marks the closure as having+-- been "used".  The closure is not an "inherently used" one.  The+-- closure is not @IND@ because that is not considered for LDV profiling.+--+ldvEnterClosure :: ClosureInfo -> CmmReg -> FCode ()+ldvEnterClosure closure_info node_reg = do+    dflags <- getDynFlags+    let tag = funTag dflags closure_info+    -- don't forget to substract node's tag+    ldvEnter (cmmOffsetB dflags (CmmReg node_reg) (-tag))++ldvEnter :: CmmExpr -> FCode ()+-- Argument is a closure pointer+ldvEnter cl_ptr = do+    dflags <- getDynFlags+    let -- don't forget to substract node's tag+        ldv_wd = ldvWord dflags cl_ptr+        new_ldv_wd = cmmOrWord dflags (cmmAndWord dflags (CmmLoad ldv_wd (bWord dflags))+                                                         (CmmLit (mkWordCLit dflags (iLDV_CREATE_MASK dflags))))+                                      (cmmOrWord dflags (loadEra dflags) (CmmLit (mkWordCLit dflags (iLDV_STATE_USE dflags))))+    ifProfiling $+         -- if (era > 0) {+         --    LDVW((c)) = (LDVW((c)) & LDV_CREATE_MASK) |+         --                era | LDV_STATE_USE }+        emit =<< mkCmmIfThenElse (CmmMachOp (mo_wordUGt dflags) [loadEra dflags, CmmLit (zeroCLit dflags)])+                     (mkStore ldv_wd new_ldv_wd)+                     mkNop++loadEra :: DynFlags -> CmmExpr+loadEra dflags = CmmMachOp (MO_UU_Conv (cIntWidth dflags) (wordWidth dflags))+    [CmmLoad (mkLblExpr (mkCmmDataLabel rtsUnitId (fsLit "era")))+             (cInt dflags)]++ldvWord :: DynFlags -> CmmExpr -> CmmExpr+-- Takes the address of a closure, and returns+-- the address of the LDV word in the closure+ldvWord dflags closure_ptr+    = cmmOffsetB dflags closure_ptr (oFFSET_StgHeader_ldvw dflags)
+ GHC/StgToCmm/Ticky.hs view
@@ -0,0 +1,682 @@+{-# LANGUAGE BangPatterns #-}++-----------------------------------------------------------------------------+--+-- Code generation for ticky-ticky profiling+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++{- OVERVIEW: ticky ticky profiling++Please see+https://gitlab.haskell.org/ghc/ghc/wikis/debugging/ticky-ticky and also+edit it and the rest of this comment to keep them up-to-date if you+change ticky-ticky. Thanks!++ *** All allocation ticky numbers are in bytes. ***++Some of the relevant source files:++       ***not necessarily an exhaustive list***++  * some codeGen/ modules import this one++  * this module imports cmm/CLabel.hs to manage labels++  * cmm/CmmParse.y expands some macros using generators defined in+    this module++  * includes/stg/Ticky.h declares all of the global counters++  * includes/rts/Ticky.h declares the C data type for an+    STG-declaration's counters++  * some macros defined in includes/Cmm.h (and used within the RTS's+    CMM code) update the global ticky counters++  * at the end of execution rts/Ticky.c generates the final report+    +RTS -r<report-file> -RTS++The rts/Ticky.c function that generates the report includes an+STG-declaration's ticky counters if++  * that declaration was entered, or++  * it was allocated (if -ticky-allocd)++On either of those events, the counter is "registered" by adding it to+a linked list; cf the CMM generated by registerTickyCtr.++Ticky-ticky profiling has evolved over many years. Many of the+counters from its most sophisticated days are no longer+active/accurate. As the RTS has changed, sometimes the ticky code for+relevant counters was not accordingly updated. Unfortunately, neither+were the comments.++As of March 2013, there still exist deprecated code and comments in+the code generator as well as the RTS because:++  * I don't know what is out-of-date versus merely commented out for+    momentary convenience, and++  * someone else might know how to repair it!++-}++module GHC.StgToCmm.Ticky (+  withNewTickyCounterFun,+  withNewTickyCounterLNE,+  withNewTickyCounterThunk,+  withNewTickyCounterStdThunk,+  withNewTickyCounterCon,++  tickyDynAlloc,+  tickyAllocHeap,++  tickyAllocPrim,+  tickyAllocThunk,+  tickyAllocPAP,+  tickyHeapCheck,+  tickyStackCheck,++  tickyUnknownCall, tickyDirectCall,++  tickyPushUpdateFrame,+  tickyUpdateFrameOmitted,++  tickyEnterDynCon,+  tickyEnterStaticCon,+  tickyEnterViaNode,++  tickyEnterFun,+  tickyEnterThunk, tickyEnterStdThunk,        -- dynamic non-value+                                              -- thunks only+  tickyEnterLNE,++  tickyUpdateBhCaf,+  tickyBlackHole,+  tickyUnboxedTupleReturn,+  tickyReturnOldCon, tickyReturnNewCon,++  tickyKnownCallTooFewArgs, tickyKnownCallExact, tickyKnownCallExtraArgs,+  tickySlowCall, tickySlowCallPat,+  ) where++import GhcPrelude++import GHC.StgToCmm.ArgRep    ( slowCallPattern , toArgRep , argRepString )+import GHC.StgToCmm.Closure+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Monad++import StgSyn+import CmmExpr+import MkGraph+import CmmUtils+import CLabel+import SMRep++import Module+import Name+import Id+import BasicTypes+import FastString+import Outputable+import Util++import DynFlags++-- Turgid imports for showTypeCategory+import PrelNames+import TcType+import TyCon+import Predicate++import Data.Maybe+import qualified Data.Char+import Control.Monad ( when )++-----------------------------------------------------------------------------+--+-- Ticky-ticky profiling+--+-----------------------------------------------------------------------------++data TickyClosureType+    = TickyFun+        Bool -- True <-> single entry+    | TickyCon+    | TickyThunk+        Bool -- True <-> updateable+        Bool -- True <-> standard thunk (AP or selector), has no entry counter+    | TickyLNE++withNewTickyCounterFun :: Bool -> Name  -> [NonVoid Id] -> FCode a -> FCode a+withNewTickyCounterFun single_entry = withNewTickyCounter (TickyFun single_entry)++withNewTickyCounterLNE :: Name  -> [NonVoid Id] -> FCode a -> FCode a+withNewTickyCounterLNE nm args code = do+  b <- tickyLNEIsOn+  if not b then code else withNewTickyCounter TickyLNE nm args code++thunkHasCounter :: Bool -> FCode Bool+thunkHasCounter isStatic = do+  b <- tickyDynThunkIsOn+  pure (not isStatic && b)++withNewTickyCounterThunk+  :: Bool -- ^ static+  -> Bool -- ^ updateable+  -> Name+  -> FCode a+  -> FCode a+withNewTickyCounterThunk isStatic isUpdatable name code = do+    has_ctr <- thunkHasCounter isStatic+    if not has_ctr+      then code+      else withNewTickyCounter (TickyThunk isUpdatable False) name [] code++withNewTickyCounterStdThunk+  :: Bool -- ^ updateable+  -> Name+  -> FCode a+  -> FCode a+withNewTickyCounterStdThunk isUpdatable name code = do+    has_ctr <- thunkHasCounter False+    if not has_ctr+      then code+      else withNewTickyCounter (TickyThunk isUpdatable True) name [] code++withNewTickyCounterCon+  :: Name+  -> FCode a+  -> FCode a+withNewTickyCounterCon name code = do+    has_ctr <- thunkHasCounter False+    if not has_ctr+      then code+      else withNewTickyCounter TickyCon name [] code++-- args does not include the void arguments+withNewTickyCounter :: TickyClosureType -> Name -> [NonVoid Id] -> FCode a -> FCode a+withNewTickyCounter cloType name args m = do+  lbl <- emitTickyCounter cloType name args+  setTickyCtrLabel lbl m++emitTickyCounter :: TickyClosureType -> Name -> [NonVoid Id] -> FCode CLabel+emitTickyCounter cloType name args+  = let ctr_lbl = mkRednCountsLabel name in+    (>> return ctr_lbl) $+    ifTicky $ do+        { dflags <- getDynFlags+        ; parent <- getTickyCtrLabel+        ; mod_name <- getModuleName++          -- When printing the name of a thing in a ticky file, we+          -- want to give the module name even for *local* things.  We+          -- print just "x (M)" rather that "M.x" to distinguish them+          -- from the global kind.+        ; let ppr_for_ticky_name :: SDoc+              ppr_for_ticky_name =+                let n = ppr name+                    ext = case cloType of+                              TickyFun single_entry -> parens $ hcat $ punctuate comma $+                                  [text "fun"] ++ [text "se"|single_entry]+                              TickyCon -> parens (text "con")+                              TickyThunk upd std -> parens $ hcat $ punctuate comma $+                                  [text "thk"] ++ [text "se"|not upd] ++ [text "std"|std]+                              TickyLNE | isInternalName name -> parens (text "LNE")+                                       | otherwise -> panic "emitTickyCounter: how is this an external LNE?"+                    p = case hasHaskellName parent of+                            -- NB the default "top" ticky ctr does not+                            -- have a Haskell name+                          Just pname -> text "in" <+> ppr (nameUnique pname)+                          _ -> empty+                in if isInternalName name+                   then n <+> parens (ppr mod_name) <+> ext <+> p+                   else n <+> ext <+> p++        ; fun_descr_lit <- newStringCLit $ showSDocDebug dflags ppr_for_ticky_name+        ; arg_descr_lit <- newStringCLit $ map (showTypeCategory . idType . fromNonVoid) args+        ; emitDataLits ctr_lbl+        -- Must match layout of includes/rts/Ticky.h's StgEntCounter+        --+        -- krc: note that all the fields are I32 now; some were I16+        -- before, but the code generator wasn't handling that+        -- properly and it led to chaos, panic and disorder.+            [ mkIntCLit dflags 0,               -- registered?+              mkIntCLit dflags (length args),   -- Arity+              mkIntCLit dflags 0,               -- Heap allocated for this thing+              fun_descr_lit,+              arg_descr_lit,+              zeroCLit dflags,          -- Entries into this thing+              zeroCLit dflags,          -- Heap allocated by this thing+              zeroCLit dflags                   -- Link to next StgEntCounter+            ]+        }++-- -----------------------------------------------------------------------------+-- Ticky stack frames++tickyPushUpdateFrame, tickyUpdateFrameOmitted :: FCode ()+tickyPushUpdateFrame    = ifTicky $ bumpTickyCounter (fsLit "UPDF_PUSHED_ctr")+tickyUpdateFrameOmitted = ifTicky $ bumpTickyCounter (fsLit "UPDF_OMITTED_ctr")++-- -----------------------------------------------------------------------------+-- Ticky entries++-- NB the name-specific entries are only available for names that have+-- dedicated Cmm code. As far as I know, this just rules out+-- constructor thunks. For them, there is no CMM code block to put the+-- bump of name-specific ticky counter into. On the other hand, we can+-- still track allocation their allocation.++tickyEnterDynCon, tickyEnterStaticCon, tickyEnterViaNode :: FCode ()+tickyEnterDynCon      = ifTicky $ bumpTickyCounter (fsLit "ENT_DYN_CON_ctr")+tickyEnterStaticCon   = ifTicky $ bumpTickyCounter (fsLit "ENT_STATIC_CON_ctr")+tickyEnterViaNode     = ifTicky $ bumpTickyCounter (fsLit "ENT_VIA_NODE_ctr")++tickyEnterThunk :: ClosureInfo -> FCode ()+tickyEnterThunk cl_info+  = ifTicky $ do+    { bumpTickyCounter ctr+    ; has_ctr <- thunkHasCounter static+    ; when has_ctr $ do+      ticky_ctr_lbl <- getTickyCtrLabel+      registerTickyCtrAtEntryDyn ticky_ctr_lbl+      bumpTickyEntryCount ticky_ctr_lbl }+  where+    updatable = closureSingleEntry cl_info+    static    = isStaticClosure cl_info++    ctr | static    = if updatable then fsLit "ENT_STATIC_THK_SINGLE_ctr"+                                   else fsLit "ENT_STATIC_THK_MANY_ctr"+        | otherwise = if updatable then fsLit "ENT_DYN_THK_SINGLE_ctr"+                                   else fsLit "ENT_DYN_THK_MANY_ctr"++tickyEnterStdThunk :: ClosureInfo -> FCode ()+tickyEnterStdThunk = tickyEnterThunk++tickyBlackHole :: Bool{-updatable-} -> FCode ()+tickyBlackHole updatable+  = ifTicky (bumpTickyCounter ctr)+  where+    ctr | updatable = (fsLit "UPD_BH_SINGLE_ENTRY_ctr")+        | otherwise = (fsLit "UPD_BH_UPDATABLE_ctr")++tickyUpdateBhCaf :: ClosureInfo -> FCode ()+tickyUpdateBhCaf cl_info+  = ifTicky (bumpTickyCounter ctr)+  where+    ctr | closureUpdReqd cl_info = (fsLit "UPD_CAF_BH_SINGLE_ENTRY_ctr")+        | otherwise              = (fsLit "UPD_CAF_BH_UPDATABLE_ctr")++tickyEnterFun :: ClosureInfo -> FCode ()+tickyEnterFun cl_info = ifTicky $ do+  ctr_lbl <- getTickyCtrLabel++  if isStaticClosure cl_info+    then do bumpTickyCounter (fsLit "ENT_STATIC_FUN_DIRECT_ctr")+            registerTickyCtr ctr_lbl+    else do bumpTickyCounter (fsLit "ENT_DYN_FUN_DIRECT_ctr")+            registerTickyCtrAtEntryDyn ctr_lbl++  bumpTickyEntryCount ctr_lbl++tickyEnterLNE :: FCode ()+tickyEnterLNE = ifTicky $ do+  bumpTickyCounter (fsLit "ENT_LNE_ctr")+  ifTickyLNE $ do+    ctr_lbl <- getTickyCtrLabel+    registerTickyCtr ctr_lbl+    bumpTickyEntryCount ctr_lbl++-- needn't register a counter upon entry if+--+-- 1) it's for a dynamic closure, and+--+-- 2) -ticky-allocd is on+--+-- since the counter was registered already upon being alloc'd+registerTickyCtrAtEntryDyn :: CLabel -> FCode ()+registerTickyCtrAtEntryDyn ctr_lbl = do+  already_registered <- tickyAllocdIsOn+  when (not already_registered) $ registerTickyCtr ctr_lbl++registerTickyCtr :: CLabel -> FCode ()+-- Register a ticky counter+--   if ( ! f_ct.registeredp ) {+--          f_ct.link = ticky_entry_ctrs;       /* hook this one onto the front of the list */+--          ticky_entry_ctrs = & (f_ct);        /* mark it as "registered" */+--          f_ct.registeredp = 1 }+registerTickyCtr ctr_lbl = do+  dflags <- getDynFlags+  let+    -- krc: code generator doesn't handle Not, so we test for Eq 0 instead+    test = CmmMachOp (MO_Eq (wordWidth dflags))+              [CmmLoad (CmmLit (cmmLabelOffB ctr_lbl+                                (oFFSET_StgEntCounter_registeredp dflags))) (bWord dflags),+               zeroExpr dflags]+    register_stmts+      = [ mkStore (CmmLit (cmmLabelOffB ctr_lbl (oFFSET_StgEntCounter_link dflags)))+                   (CmmLoad ticky_entry_ctrs (bWord dflags))+        , mkStore ticky_entry_ctrs (mkLblExpr ctr_lbl)+        , mkStore (CmmLit (cmmLabelOffB ctr_lbl+                                (oFFSET_StgEntCounter_registeredp dflags)))+                   (mkIntExpr dflags 1) ]+    ticky_entry_ctrs = mkLblExpr (mkCmmDataLabel rtsUnitId (fsLit "ticky_entry_ctrs"))+  emit =<< mkCmmIfThen test (catAGraphs register_stmts)++tickyReturnOldCon, tickyReturnNewCon :: RepArity -> FCode ()+tickyReturnOldCon arity+  = ifTicky $ do { bumpTickyCounter (fsLit "RET_OLD_ctr")+                 ; bumpHistogram    (fsLit "RET_OLD_hst") arity }+tickyReturnNewCon arity+  = ifTicky $ do { bumpTickyCounter (fsLit "RET_NEW_ctr")+                 ; bumpHistogram    (fsLit "RET_NEW_hst") arity }++tickyUnboxedTupleReturn :: RepArity -> FCode ()+tickyUnboxedTupleReturn arity+  = ifTicky $ do { bumpTickyCounter (fsLit "RET_UNBOXED_TUP_ctr")+                 ; bumpHistogram    (fsLit "RET_UNBOXED_TUP_hst") arity }++-- -----------------------------------------------------------------------------+-- Ticky calls++-- Ticks at a *call site*:+tickyDirectCall :: RepArity -> [StgArg] -> FCode ()+tickyDirectCall arity args+  | args `lengthIs` arity = tickyKnownCallExact+  | otherwise = do tickyKnownCallExtraArgs+                   tickySlowCallPat (map argPrimRep (drop arity args))++tickyKnownCallTooFewArgs :: FCode ()+tickyKnownCallTooFewArgs = ifTicky $ bumpTickyCounter (fsLit "KNOWN_CALL_TOO_FEW_ARGS_ctr")++tickyKnownCallExact :: FCode ()+tickyKnownCallExact      = ifTicky $ bumpTickyCounter (fsLit "KNOWN_CALL_ctr")++tickyKnownCallExtraArgs :: FCode ()+tickyKnownCallExtraArgs  = ifTicky $ bumpTickyCounter (fsLit "KNOWN_CALL_EXTRA_ARGS_ctr")++tickyUnknownCall :: FCode ()+tickyUnknownCall         = ifTicky $ bumpTickyCounter (fsLit "UNKNOWN_CALL_ctr")++-- Tick for the call pattern at slow call site (i.e. in addition to+-- tickyUnknownCall, tickyKnownCallExtraArgs, etc.)+tickySlowCall :: LambdaFormInfo -> [StgArg] -> FCode ()+tickySlowCall _ [] = return ()+tickySlowCall lf_info args = do+ -- see Note [Ticky for slow calls]+ if isKnownFun lf_info+   then tickyKnownCallTooFewArgs+   else tickyUnknownCall+ tickySlowCallPat (map argPrimRep args)++tickySlowCallPat :: [PrimRep] -> FCode ()+tickySlowCallPat args = ifTicky $+  let argReps = map toArgRep args+      (_, n_matched) = slowCallPattern argReps+  in if n_matched > 0 && args `lengthIs` n_matched+     then bumpTickyLbl $ mkRtsSlowFastTickyCtrLabel $ concatMap (map Data.Char.toLower . argRepString) argReps+     else bumpTickyCounter $ fsLit "VERY_SLOW_CALL_ctr"++{-++Note [Ticky for slow calls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Terminology is unfortunately a bit mixed up for these calls. codeGen+uses "slow call" to refer to unknown calls and under-saturated known+calls.++Nowadays, though (ie as of the eval/apply paper), the significantly+slower calls are actually just a subset of these: the ones with no+built-in argument pattern (cf GHC.StgToCmm.ArgRep.slowCallPattern)++So for ticky profiling, we split slow calls into+"SLOW_CALL_fast_<pattern>_ctr" (those matching a built-in pattern) and+VERY_SLOW_CALL_ctr (those without a built-in pattern; these are very+bad for both space and time).++-}++-- -----------------------------------------------------------------------------+-- Ticky allocation++tickyDynAlloc :: Maybe Id -> SMRep -> LambdaFormInfo -> FCode ()+-- Called when doing a dynamic heap allocation; the LambdaFormInfo+-- used to distinguish between closure types+--+-- TODO what else to count while we're here?+tickyDynAlloc mb_id rep lf = ifTicky $ getDynFlags >>= \dflags ->+  let bytes = wORD_SIZE dflags * heapClosureSizeW dflags rep++      countGlobal tot ctr = do+        bumpTickyCounterBy tot bytes+        bumpTickyCounter   ctr+      countSpecific = ifTickyAllocd $ case mb_id of+        Nothing -> return ()+        Just id -> do+          let ctr_lbl = mkRednCountsLabel (idName id)+          registerTickyCtr ctr_lbl+          bumpTickyAllocd ctr_lbl bytes++  -- TODO are we still tracking "good stuff" (_gds) versus+  -- administrative (_adm) versus slop (_slp)? I'm going with all _gds+  -- for now, since I don't currently know neither if we do nor how to+  -- distinguish. NSF Mar 2013++  in case () of+    _ | isConRep rep   ->+          ifTickyDynThunk countSpecific >>+          countGlobal (fsLit "ALLOC_CON_gds") (fsLit "ALLOC_CON_ctr")+      | isThunkRep rep ->+          ifTickyDynThunk countSpecific >>+          if lfUpdatable lf+          then countGlobal (fsLit "ALLOC_THK_gds") (fsLit "ALLOC_UP_THK_ctr")+          else countGlobal (fsLit "ALLOC_THK_gds") (fsLit "ALLOC_SE_THK_ctr")+      | isFunRep   rep ->+          countSpecific >>+          countGlobal (fsLit "ALLOC_FUN_gds") (fsLit "ALLOC_FUN_ctr")+      | otherwise      -> panic "How is this heap object not a con, thunk, or fun?"++++tickyAllocHeap ::+  Bool -> -- is this a genuine allocation? As opposed to+          -- GHC.StgToCmm.Layout.adjustHpBackwards+  VirtualHpOffset -> FCode ()+-- Called when doing a heap check [TICK_ALLOC_HEAP]+-- Must be lazy in the amount of allocation!+tickyAllocHeap genuine hp+  = ifTicky $+    do  { dflags <- getDynFlags+        ; ticky_ctr <- getTickyCtrLabel+        ; emit $ catAGraphs $+            -- only test hp from within the emit so that the monadic+            -- computation itself is not strict in hp (cf knot in+            -- GHC.StgToCmm.Monad.getHeapUsage)+          if hp == 0 then []+          else let !bytes = wORD_SIZE dflags * hp in [+            -- Bump the allocation total in the closure's StgEntCounter+            addToMem (rEP_StgEntCounter_allocs dflags)+                     (CmmLit (cmmLabelOffB ticky_ctr (oFFSET_StgEntCounter_allocs dflags)))+                     bytes,+            -- Bump the global allocation total ALLOC_HEAP_tot+            addToMemLbl (bWord dflags)+                        (mkCmmDataLabel rtsUnitId (fsLit "ALLOC_HEAP_tot"))+                        bytes,+            -- Bump the global allocation counter ALLOC_HEAP_ctr+            if not genuine then mkNop+            else addToMemLbl (bWord dflags)+                             (mkCmmDataLabel rtsUnitId (fsLit "ALLOC_HEAP_ctr"))+                             1+            ]}+++--------------------------------------------------------------------------------+-- these three are only called from CmmParse.y (ie ultimately from the RTS)++-- the units are bytes++tickyAllocPrim :: CmmExpr  -- ^ size of the full header, in bytes+               -> CmmExpr  -- ^ size of the payload, in bytes+               -> CmmExpr -> FCode ()+tickyAllocPrim _hdr _goods _slop = ifTicky $ do+  bumpTickyCounter    (fsLit "ALLOC_PRIM_ctr")+  bumpTickyCounterByE (fsLit "ALLOC_PRIM_adm") _hdr+  bumpTickyCounterByE (fsLit "ALLOC_PRIM_gds") _goods+  bumpTickyCounterByE (fsLit "ALLOC_PRIM_slp") _slop++tickyAllocThunk :: CmmExpr -> CmmExpr -> FCode ()+tickyAllocThunk _goods _slop = ifTicky $ do+    -- TODO is it ever called with a Single-Entry thunk?+  bumpTickyCounter    (fsLit "ALLOC_UP_THK_ctr")+  bumpTickyCounterByE (fsLit "ALLOC_THK_gds") _goods+  bumpTickyCounterByE (fsLit "ALLOC_THK_slp") _slop++tickyAllocPAP :: CmmExpr -> CmmExpr -> FCode ()+tickyAllocPAP _goods _slop = ifTicky $ do+  bumpTickyCounter    (fsLit "ALLOC_PAP_ctr")+  bumpTickyCounterByE (fsLit "ALLOC_PAP_gds") _goods+  bumpTickyCounterByE (fsLit "ALLOC_PAP_slp") _slop++tickyHeapCheck :: FCode ()+tickyHeapCheck = ifTicky $ bumpTickyCounter (fsLit "HEAP_CHK_ctr")++tickyStackCheck :: FCode ()+tickyStackCheck = ifTicky $ bumpTickyCounter (fsLit "STK_CHK_ctr")++-- -----------------------------------------------------------------------------+-- Ticky utils++ifTicky :: FCode () -> FCode ()+ifTicky code =+  getDynFlags >>= \dflags -> when (gopt Opt_Ticky dflags) code++tickyAllocdIsOn :: FCode Bool+tickyAllocdIsOn = gopt Opt_Ticky_Allocd `fmap` getDynFlags++tickyLNEIsOn :: FCode Bool+tickyLNEIsOn = gopt Opt_Ticky_LNE `fmap` getDynFlags++tickyDynThunkIsOn :: FCode Bool+tickyDynThunkIsOn = gopt Opt_Ticky_Dyn_Thunk `fmap` getDynFlags++ifTickyAllocd :: FCode () -> FCode ()+ifTickyAllocd code = tickyAllocdIsOn >>= \b -> when b code++ifTickyLNE :: FCode () -> FCode ()+ifTickyLNE code = tickyLNEIsOn >>= \b -> when b code++ifTickyDynThunk :: FCode () -> FCode ()+ifTickyDynThunk code = tickyDynThunkIsOn >>= \b -> when b code++bumpTickyCounter :: FastString -> FCode ()+bumpTickyCounter lbl = bumpTickyLbl (mkCmmDataLabel rtsUnitId lbl)++bumpTickyCounterBy :: FastString -> Int -> FCode ()+bumpTickyCounterBy lbl = bumpTickyLblBy (mkCmmDataLabel rtsUnitId lbl)++bumpTickyCounterByE :: FastString -> CmmExpr -> FCode ()+bumpTickyCounterByE lbl = bumpTickyLblByE (mkCmmDataLabel rtsUnitId lbl)++bumpTickyEntryCount :: CLabel -> FCode ()+bumpTickyEntryCount lbl = do+  dflags <- getDynFlags+  bumpTickyLit (cmmLabelOffB lbl (oFFSET_StgEntCounter_entry_count dflags))++bumpTickyAllocd :: CLabel -> Int -> FCode ()+bumpTickyAllocd lbl bytes = do+  dflags <- getDynFlags+  bumpTickyLitBy (cmmLabelOffB lbl (oFFSET_StgEntCounter_allocd dflags)) bytes++bumpTickyLbl :: CLabel -> FCode ()+bumpTickyLbl lhs = bumpTickyLitBy (cmmLabelOffB lhs 0) 1++bumpTickyLblBy :: CLabel -> Int -> FCode ()+bumpTickyLblBy lhs = bumpTickyLitBy (cmmLabelOffB lhs 0)++bumpTickyLblByE :: CLabel -> CmmExpr -> FCode ()+bumpTickyLblByE lhs = bumpTickyLitByE (cmmLabelOffB lhs 0)++bumpTickyLit :: CmmLit -> FCode ()+bumpTickyLit lhs = bumpTickyLitBy lhs 1++bumpTickyLitBy :: CmmLit -> Int -> FCode ()+bumpTickyLitBy lhs n = do+  dflags <- getDynFlags+  emit (addToMem (bWord dflags) (CmmLit lhs) n)++bumpTickyLitByE :: CmmLit -> CmmExpr -> FCode ()+bumpTickyLitByE lhs e = do+  dflags <- getDynFlags+  emit (addToMemE (bWord dflags) (CmmLit lhs) e)++bumpHistogram :: FastString -> Int -> FCode ()+bumpHistogram lbl n = do+    dflags <- getDynFlags+    let offset = n `min` (tICKY_BIN_COUNT dflags - 1)+    emit (addToMem (bWord dflags)+           (cmmIndexExpr dflags+                (wordWidth dflags)+                (CmmLit (CmmLabel (mkCmmDataLabel rtsUnitId lbl)))+                (CmmLit (CmmInt (fromIntegral offset) (wordWidth dflags))))+           1)++------------------------------------------------------------------+-- Showing the "type category" for ticky-ticky profiling++showTypeCategory :: Type -> Char+  {-+        +           dictionary++        >           function++        {C,I,F,D,W} char, int, float, double, word+        {c,i,f,d,w} unboxed ditto++        T           tuple++        P           other primitive type+        p           unboxed ditto++        L           list+        E           enumeration type+        S           other single-constructor type+        M           other multi-constructor data-con type++        .           other type++        -           reserved for others to mark as "uninteresting"++  Accurate as of Mar 2013, but I eliminated the Array category instead+  of updating it, for simplicity. It's in P/p, I think --NSF++    -}+showTypeCategory ty+  | isDictTy ty = '+'+  | otherwise = case tcSplitTyConApp_maybe ty of+  Nothing -> '.'+  Just (tycon, _) ->+    (if isUnliftedTyCon tycon then Data.Char.toLower else id) $+    let anyOf us = getUnique tycon `elem` us in+    case () of+      _ | anyOf [funTyConKey] -> '>'+        | anyOf [charPrimTyConKey, charTyConKey] -> 'C'+        | anyOf [doublePrimTyConKey, doubleTyConKey] -> 'D'+        | anyOf [floatPrimTyConKey, floatTyConKey] -> 'F'+        | anyOf [intPrimTyConKey, int32PrimTyConKey, int64PrimTyConKey,+                 intTyConKey, int8TyConKey, int16TyConKey, int32TyConKey, int64TyConKey+                ] -> 'I'+        | anyOf [wordPrimTyConKey, word32PrimTyConKey, word64PrimTyConKey, wordTyConKey,+                 word8TyConKey, word16TyConKey, word32TyConKey, word64TyConKey+                ] -> 'W'+        | anyOf [listTyConKey] -> 'L'+        | isTupleTyCon tycon       -> 'T'+        | isPrimTyCon tycon        -> 'P'+        | isEnumerationTyCon tycon -> 'E'+        | isJust (tyConSingleDataCon_maybe tycon) -> 'S'+        | otherwise -> 'M' -- oh, well...
+ GHC/StgToCmm/Utils.hs view
@@ -0,0 +1,620 @@+{-# LANGUAGE CPP #-}++-----------------------------------------------------------------------------+--+-- Code generator utilities; mostly monadic+--+-- (c) The University of Glasgow 2004-2006+--+-----------------------------------------------------------------------------++module GHC.StgToCmm.Utils (+        cgLit, mkSimpleLit,+        emitDataLits, mkDataLits,+        emitRODataLits, mkRODataLits,+        emitRtsCall, emitRtsCallWithResult, emitRtsCallGen,+        assignTemp, newTemp,++        newUnboxedTupleRegs,++        emitMultiAssign, emitCmmLitSwitch, emitSwitch,++        tagToClosure, mkTaggedObjectLoad,++        callerSaves, callerSaveVolatileRegs, get_GlobalReg_addr,++        cmmAndWord, cmmOrWord, cmmNegate, cmmEqWord, cmmNeWord,+        cmmUGtWord, cmmSubWord, cmmMulWord, cmmAddWord, cmmUShrWord,+        cmmOffsetExprW, cmmOffsetExprB,+        cmmRegOffW, cmmRegOffB,+        cmmLabelOffW, cmmLabelOffB,+        cmmOffsetW, cmmOffsetB,+        cmmOffsetLitW, cmmOffsetLitB,+        cmmLoadIndexW,+        cmmConstrTag1,++        cmmUntag, cmmIsTagged,++        addToMem, addToMemE, addToMemLblE, addToMemLbl,+        mkWordCLit,+        newStringCLit, newByteStringCLit,+        blankWord,++        -- * Update remembered set operations+        whenUpdRemSetEnabled,+        emitUpdRemSetPush,+        emitUpdRemSetPushThunk,+  ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.StgToCmm.Monad+import GHC.StgToCmm.Closure+import Cmm+import BlockId+import MkGraph+import GHC.Platform.Regs+import CLabel+import CmmUtils+import CmmSwitch+import GHC.StgToCmm.CgUtils++import ForeignCall+import IdInfo+import Type+import TyCon+import SMRep+import Module+import Literal+import Digraph+import Util+import Unique+import UniqSupply (MonadUnique(..))+import DynFlags+import FastString+import Outputable+import RepType++import Data.ByteString (ByteString)+import qualified Data.ByteString.Char8 as BS8+import qualified Data.Map as M+import Data.Char+import Data.List+import Data.Ord+++-------------------------------------------------------------------------+--+--      Literals+--+-------------------------------------------------------------------------++cgLit :: Literal -> FCode CmmLit+cgLit (LitString s) = newByteStringCLit s+ -- not unpackFS; we want the UTF-8 byte stream.+cgLit other_lit     = do dflags <- getDynFlags+                         return (mkSimpleLit dflags other_lit)++mkSimpleLit :: DynFlags -> Literal -> CmmLit+mkSimpleLit dflags (LitChar   c)                = CmmInt (fromIntegral (ord c))+                                                         (wordWidth dflags)+mkSimpleLit dflags LitNullAddr                  = zeroCLit dflags+mkSimpleLit dflags (LitNumber LitNumInt i _)    = CmmInt i (wordWidth dflags)+mkSimpleLit _      (LitNumber LitNumInt64 i _)  = CmmInt i W64+mkSimpleLit dflags (LitNumber LitNumWord i _)   = CmmInt i (wordWidth dflags)+mkSimpleLit _      (LitNumber LitNumWord64 i _) = CmmInt i W64+mkSimpleLit _      (LitFloat r)                 = CmmFloat r W32+mkSimpleLit _      (LitDouble r)                = CmmFloat r W64+mkSimpleLit _      (LitLabel fs ms fod)+  = let -- TODO: Literal labels might not actually be in the current package...+        labelSrc = ForeignLabelInThisPackage+    in CmmLabel (mkForeignLabel fs ms labelSrc fod)+-- NB: LitRubbish should have been lowered in "CoreToStg"+mkSimpleLit _      other = pprPanic "mkSimpleLit" (ppr other)++--------------------------------------------------------------------------+--+-- Incrementing a memory location+--+--------------------------------------------------------------------------++addToMemLbl :: CmmType -> CLabel -> Int -> CmmAGraph+addToMemLbl rep lbl n = addToMem rep (CmmLit (CmmLabel lbl)) n++addToMemLblE :: CmmType -> CLabel -> CmmExpr -> CmmAGraph+addToMemLblE rep lbl = addToMemE rep (CmmLit (CmmLabel lbl))++addToMem :: CmmType     -- rep of the counter+         -> CmmExpr     -- Address+         -> Int         -- What to add (a word)+         -> CmmAGraph+addToMem rep ptr n = addToMemE rep ptr (CmmLit (CmmInt (toInteger n) (typeWidth rep)))++addToMemE :: CmmType    -- rep of the counter+          -> CmmExpr    -- Address+          -> CmmExpr    -- What to add (a word-typed expression)+          -> CmmAGraph+addToMemE rep ptr n+  = mkStore ptr (CmmMachOp (MO_Add (typeWidth rep)) [CmmLoad ptr rep, n])+++-------------------------------------------------------------------------+--+--      Loading a field from an object,+--      where the object pointer is itself tagged+--+-------------------------------------------------------------------------++mkTaggedObjectLoad+  :: DynFlags -> LocalReg -> LocalReg -> ByteOff -> DynTag -> CmmAGraph+-- (loadTaggedObjectField reg base off tag) generates assignment+--      reg = bitsK[ base + off - tag ]+-- where K is fixed by 'reg'+mkTaggedObjectLoad dflags reg base offset tag+  = mkAssign (CmmLocal reg)+             (CmmLoad (cmmOffsetB dflags+                                  (CmmReg (CmmLocal base))+                                  (offset - tag))+                      (localRegType reg))++-------------------------------------------------------------------------+--+--      Converting a closure tag to a closure for enumeration types+--      (this is the implementation of tagToEnum#).+--+-------------------------------------------------------------------------++tagToClosure :: DynFlags -> TyCon -> CmmExpr -> CmmExpr+tagToClosure dflags tycon tag+  = CmmLoad (cmmOffsetExprW dflags closure_tbl tag) (bWord dflags)+  where closure_tbl = CmmLit (CmmLabel lbl)+        lbl = mkClosureTableLabel (tyConName tycon) NoCafRefs++-------------------------------------------------------------------------+--+--      Conditionals and rts calls+--+-------------------------------------------------------------------------++emitRtsCall :: UnitId -> FastString -> [(CmmExpr,ForeignHint)] -> Bool -> FCode ()+emitRtsCall pkg fun args safe = emitRtsCallGen [] (mkCmmCodeLabel pkg fun) args safe++emitRtsCallWithResult :: LocalReg -> ForeignHint -> UnitId -> FastString+        -> [(CmmExpr,ForeignHint)] -> Bool -> FCode ()+emitRtsCallWithResult res hint pkg fun args safe+   = emitRtsCallGen [(res,hint)] (mkCmmCodeLabel pkg fun) args safe++-- Make a call to an RTS C procedure+emitRtsCallGen+   :: [(LocalReg,ForeignHint)]+   -> CLabel+   -> [(CmmExpr,ForeignHint)]+   -> Bool -- True <=> CmmSafe call+   -> FCode ()+emitRtsCallGen res lbl args safe+  = do { dflags <- getDynFlags+       ; updfr_off <- getUpdFrameOff+       ; let (caller_save, caller_load) = callerSaveVolatileRegs dflags+       ; emit caller_save+       ; call updfr_off+       ; emit caller_load }+  where+    call updfr_off =+      if safe then+        emit =<< mkCmmCall fun_expr res' args' updfr_off+      else do+        let conv = ForeignConvention CCallConv arg_hints res_hints CmmMayReturn+        emit $ mkUnsafeCall (ForeignTarget fun_expr conv) res' args'+    (args', arg_hints) = unzip args+    (res',  res_hints) = unzip res+    fun_expr = mkLblExpr lbl+++-----------------------------------------------------------------------------+--+--      Caller-Save Registers+--+-----------------------------------------------------------------------------++-- Here we generate the sequence of saves/restores required around a+-- foreign call instruction.++-- TODO: reconcile with includes/Regs.h+--  * Regs.h claims that BaseReg should be saved last and loaded first+--    * This might not have been tickled before since BaseReg is callee save+--  * Regs.h saves SparkHd, ParkT1, SparkBase and SparkLim+--+-- This code isn't actually used right now, because callerSaves+-- only ever returns true in the current universe for registers NOT in+-- system_regs (just do a grep for CALLER_SAVES in+-- includes/stg/MachRegs.h).  It's all one giant no-op, and for+-- good reason: having to save system registers on every foreign call+-- would be very expensive, so we avoid assigning them to those+-- registers when we add support for an architecture.+--+-- Note that the old code generator actually does more work here: it+-- also saves other global registers.  We can't (nor want) to do that+-- here, as we don't have liveness information.  And really, we+-- shouldn't be doing the workaround at this point in the pipeline, see+-- Note [Register parameter passing] and the ToDo on CmmCall in+-- cmm/CmmNode.hs.  Right now the workaround is to avoid inlining across+-- unsafe foreign calls in rewriteAssignments, but this is strictly+-- temporary.+callerSaveVolatileRegs :: DynFlags -> (CmmAGraph, CmmAGraph)+callerSaveVolatileRegs dflags = (caller_save, caller_load)+  where+    platform = targetPlatform dflags++    caller_save = catAGraphs (map callerSaveGlobalReg    regs_to_save)+    caller_load = catAGraphs (map callerRestoreGlobalReg regs_to_save)++    system_regs = [ Sp,SpLim,Hp,HpLim,CCCS,CurrentTSO,CurrentNursery+                    {- ,SparkHd,SparkTl,SparkBase,SparkLim -}+                  , BaseReg ]++    regs_to_save = filter (callerSaves platform) system_regs++    callerSaveGlobalReg reg+        = mkStore (get_GlobalReg_addr dflags reg) (CmmReg (CmmGlobal reg))++    callerRestoreGlobalReg reg+        = mkAssign (CmmGlobal reg)+                   (CmmLoad (get_GlobalReg_addr dflags reg) (globalRegType dflags reg))+++-------------------------------------------------------------------------+--+--      Strings generate a top-level data block+--+-------------------------------------------------------------------------++emitDataLits :: CLabel -> [CmmLit] -> FCode ()+-- Emit a data-segment data block+emitDataLits lbl lits = emitDecl (mkDataLits (Section Data lbl) lbl lits)++emitRODataLits :: CLabel -> [CmmLit] -> FCode ()+-- Emit a read-only data block+emitRODataLits lbl lits = emitDecl (mkRODataLits lbl lits)++newStringCLit :: String -> FCode CmmLit+-- Make a global definition for the string,+-- and return its label+newStringCLit str = newByteStringCLit (BS8.pack str)++newByteStringCLit :: ByteString -> FCode CmmLit+newByteStringCLit bytes+  = do  { uniq <- newUnique+        ; let (lit, decl) = mkByteStringCLit (mkStringLitLabel uniq) bytes+        ; emitDecl decl+        ; return lit }++-------------------------------------------------------------------------+--+--      Assigning expressions to temporaries+--+-------------------------------------------------------------------------++assignTemp :: CmmExpr -> FCode LocalReg+-- Make sure the argument is in a local register.+-- We don't bother being particularly aggressive with avoiding+-- unnecessary local registers, since we can rely on a later+-- optimization pass to inline as necessary (and skipping out+-- on things like global registers can be a little dangerous+-- due to them being trashed on foreign calls--though it means+-- the optimization pass doesn't have to do as much work)+assignTemp (CmmReg (CmmLocal reg)) = return reg+assignTemp e = do { dflags <- getDynFlags+                  ; uniq <- newUnique+                  ; let reg = LocalReg uniq (cmmExprType dflags e)+                  ; emitAssign (CmmLocal reg) e+                  ; return reg }++newTemp :: MonadUnique m => CmmType -> m LocalReg+newTemp rep = do { uniq <- getUniqueM+                 ; return (LocalReg uniq rep) }++newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])+-- Choose suitable local regs to use for the components+-- of an unboxed tuple that we are about to return to+-- the Sequel.  If the Sequel is a join point, using the+-- regs it wants will save later assignments.+newUnboxedTupleRegs res_ty+  = ASSERT( isUnboxedTupleType res_ty )+    do  { dflags <- getDynFlags+        ; sequel <- getSequel+        ; regs <- choose_regs dflags sequel+        ; ASSERT( regs `equalLength` reps )+          return (regs, map primRepForeignHint reps) }+  where+    reps = typePrimRep res_ty+    choose_regs _ (AssignTo regs _) = return regs+    choose_regs dflags _            = mapM (newTemp . primRepCmmType dflags) reps++++-------------------------------------------------------------------------+--      emitMultiAssign+-------------------------------------------------------------------------++emitMultiAssign :: [LocalReg] -> [CmmExpr] -> FCode ()+-- Emit code to perform the assignments in the+-- input simultaneously, using temporary variables when necessary.++type Key  = Int+type Vrtx = (Key, Stmt) -- Give each vertex a unique number,+                        -- for fast comparison+type Stmt = (LocalReg, CmmExpr) -- r := e++-- We use the strongly-connected component algorithm, in which+--      * the vertices are the statements+--      * an edge goes from s1 to s2 iff+--              s1 assigns to something s2 uses+--        that is, if s1 should *follow* s2 in the final order++emitMultiAssign []    []    = return ()+emitMultiAssign [reg] [rhs] = emitAssign (CmmLocal reg) rhs+emitMultiAssign regs rhss   = do+  dflags <- getDynFlags+  ASSERT2( equalLength regs rhss, ppr regs $$ ppr rhss )+    unscramble dflags ([1..] `zip` (regs `zip` rhss))++unscramble :: DynFlags -> [Vrtx] -> FCode ()+unscramble dflags vertices = mapM_ do_component components+  where+        edges :: [ Node Key Vrtx ]+        edges = [ DigraphNode vertex key1 (edges_from stmt1)+                | vertex@(key1, stmt1) <- vertices ]++        edges_from :: Stmt -> [Key]+        edges_from stmt1 = [ key2 | (key2, stmt2) <- vertices,+                                    stmt1 `mustFollow` stmt2 ]++        components :: [SCC Vrtx]+        components = stronglyConnCompFromEdgedVerticesUniq edges++        -- do_components deal with one strongly-connected component+        -- Not cyclic, or singleton?  Just do it+        do_component :: SCC Vrtx -> FCode ()+        do_component (AcyclicSCC (_,stmt))  = mk_graph stmt+        do_component (CyclicSCC [])         = panic "do_component"+        do_component (CyclicSCC [(_,stmt)]) = mk_graph stmt++                -- Cyclic?  Then go via temporaries.  Pick one to+                -- break the loop and try again with the rest.+        do_component (CyclicSCC ((_,first_stmt) : rest)) = do+            dflags <- getDynFlags+            u <- newUnique+            let (to_tmp, from_tmp) = split dflags u first_stmt+            mk_graph to_tmp+            unscramble dflags rest+            mk_graph from_tmp++        split :: DynFlags -> Unique -> Stmt -> (Stmt, Stmt)+        split dflags uniq (reg, rhs)+          = ((tmp, rhs), (reg, CmmReg (CmmLocal tmp)))+          where+            rep = cmmExprType dflags rhs+            tmp = LocalReg uniq rep++        mk_graph :: Stmt -> FCode ()+        mk_graph (reg, rhs) = emitAssign (CmmLocal reg) rhs++        mustFollow :: Stmt -> Stmt -> Bool+        (reg, _) `mustFollow` (_, rhs) = regUsedIn dflags (CmmLocal reg) rhs++-------------------------------------------------------------------------+--      mkSwitch+-------------------------------------------------------------------------+++emitSwitch :: CmmExpr                      -- Tag to switch on+           -> [(ConTagZ, CmmAGraphScoped)] -- Tagged branches+           -> Maybe CmmAGraphScoped        -- Default branch (if any)+           -> ConTagZ -> ConTagZ           -- Min and Max possible values;+                                           -- behaviour outside this range is+                                           -- undefined+           -> FCode ()++-- First, two rather common cases in which there is no work to do+emitSwitch _ []         (Just code) _ _ = emit (fst code)+emitSwitch _ [(_,code)] Nothing     _ _ = emit (fst code)++-- Right, off we go+emitSwitch tag_expr branches mb_deflt lo_tag hi_tag = do+    join_lbl      <- newBlockId+    mb_deflt_lbl  <- label_default join_lbl mb_deflt+    branches_lbls <- label_branches join_lbl branches+    tag_expr'     <- assignTemp' tag_expr++    -- Sort the branches before calling mk_discrete_switch+    let branches_lbls' = [ (fromIntegral i, l) | (i,l) <- sortBy (comparing fst) branches_lbls ]+    let range = (fromIntegral lo_tag, fromIntegral hi_tag)++    emit $ mk_discrete_switch False tag_expr' branches_lbls' mb_deflt_lbl range++    emitLabel join_lbl++mk_discrete_switch :: Bool -- ^ Use signed comparisons+          -> CmmExpr+          -> [(Integer, BlockId)]+          -> Maybe BlockId+          -> (Integer, Integer)+          -> CmmAGraph++-- SINGLETON TAG RANGE: no case analysis to do+mk_discrete_switch _ _tag_expr [(tag, lbl)] _ (lo_tag, hi_tag)+  | lo_tag == hi_tag+  = ASSERT( tag == lo_tag )+    mkBranch lbl++-- SINGLETON BRANCH, NO DEFAULT: no case analysis to do+mk_discrete_switch _ _tag_expr [(_tag,lbl)] Nothing _+  = mkBranch lbl+        -- The simplifier might have eliminated a case+        --       so we may have e.g. case xs of+        --                               [] -> e+        -- In that situation we can be sure the (:) case+        -- can't happen, so no need to test++-- SOMETHING MORE COMPLICATED: defer to CmmImplementSwitchPlans+-- See Note [Cmm Switches, the general plan] in CmmSwitch+mk_discrete_switch signed tag_expr branches mb_deflt range+  = mkSwitch tag_expr $ mkSwitchTargets signed range mb_deflt (M.fromList branches)++divideBranches :: Ord a => [(a,b)] -> ([(a,b)], a, [(a,b)])+divideBranches branches = (lo_branches, mid, hi_branches)+  where+    -- 2 branches => n_branches `div` 2 = 1+    --            => branches !! 1 give the *second* tag+    -- There are always at least 2 branches here+    (mid,_) = branches !! (length branches `div` 2)+    (lo_branches, hi_branches) = span is_lo branches+    is_lo (t,_) = t < mid++--------------+emitCmmLitSwitch :: CmmExpr                    -- Tag to switch on+               -> [(Literal, CmmAGraphScoped)] -- Tagged branches+               -> CmmAGraphScoped              -- Default branch (always)+               -> FCode ()                     -- Emit the code+emitCmmLitSwitch _scrut []       deflt = emit $ fst deflt+emitCmmLitSwitch scrut  branches deflt = do+    scrut' <- assignTemp' scrut+    join_lbl <- newBlockId+    deflt_lbl <- label_code join_lbl deflt+    branches_lbls <- label_branches join_lbl branches++    dflags <- getDynFlags+    let cmm_ty = cmmExprType dflags scrut+        rep = typeWidth cmm_ty++    -- We find the necessary type information in the literals in the branches+    let signed = case head branches of+                    (LitNumber nt _ _, _) -> litNumIsSigned nt+                    _ -> False++    let range | signed    = (tARGET_MIN_INT dflags, tARGET_MAX_INT dflags)+              | otherwise = (0, tARGET_MAX_WORD dflags)++    if isFloatType cmm_ty+    then emit =<< mk_float_switch rep scrut' deflt_lbl noBound branches_lbls+    else emit $ mk_discrete_switch+        signed+        scrut'+        [(litValue lit,l) | (lit,l) <- branches_lbls]+        (Just deflt_lbl)+        range+    emitLabel join_lbl++-- | lower bound (inclusive), upper bound (exclusive)+type LitBound = (Maybe Literal, Maybe Literal)++noBound :: LitBound+noBound = (Nothing, Nothing)++mk_float_switch :: Width -> CmmExpr -> BlockId+              -> LitBound+              -> [(Literal,BlockId)]+              -> FCode CmmAGraph+mk_float_switch rep scrut deflt _bounds [(lit,blk)]+  = do dflags <- getDynFlags+       return $ mkCbranch (cond dflags) deflt blk Nothing+  where+    cond dflags = CmmMachOp ne [scrut, CmmLit cmm_lit]+      where+        cmm_lit = mkSimpleLit dflags lit+        ne      = MO_F_Ne rep++mk_float_switch rep scrut deflt_blk_id (lo_bound, hi_bound) branches+  = do dflags <- getDynFlags+       lo_blk <- mk_float_switch rep scrut deflt_blk_id bounds_lo lo_branches+       hi_blk <- mk_float_switch rep scrut deflt_blk_id bounds_hi hi_branches+       mkCmmIfThenElse (cond dflags) lo_blk hi_blk+  where+    (lo_branches, mid_lit, hi_branches) = divideBranches branches++    bounds_lo = (lo_bound, Just mid_lit)+    bounds_hi = (Just mid_lit, hi_bound)++    cond dflags = CmmMachOp lt [scrut, CmmLit cmm_lit]+      where+        cmm_lit = mkSimpleLit dflags mid_lit+        lt      = MO_F_Lt rep+++--------------+label_default :: BlockId -> Maybe CmmAGraphScoped -> FCode (Maybe BlockId)+label_default _ Nothing+  = return Nothing+label_default join_lbl (Just code)+  = do lbl <- label_code join_lbl code+       return (Just lbl)++--------------+label_branches :: BlockId -> [(a,CmmAGraphScoped)] -> FCode [(a,BlockId)]+label_branches _join_lbl []+  = return []+label_branches join_lbl ((tag,code):branches)+  = do lbl <- label_code join_lbl code+       branches' <- label_branches join_lbl branches+       return ((tag,lbl):branches')++--------------+label_code :: BlockId -> CmmAGraphScoped -> FCode BlockId+--  label_code J code+--      generates+--  [L: code; goto J]+-- and returns L+label_code join_lbl (code,tsc) = do+    lbl <- newBlockId+    emitOutOfLine lbl (code MkGraph.<*> mkBranch join_lbl, tsc)+    return lbl++--------------+assignTemp' :: CmmExpr -> FCode CmmExpr+assignTemp' e+  | isTrivialCmmExpr e = return e+  | otherwise = do+       dflags <- getDynFlags+       lreg <- newTemp (cmmExprType dflags e)+       let reg = CmmLocal lreg+       emitAssign reg e+       return (CmmReg reg)+++---------------------------------------------------------------------------+-- Pushing to the update remembered set+---------------------------------------------------------------------------++whenUpdRemSetEnabled :: DynFlags -> FCode a -> FCode ()+whenUpdRemSetEnabled dflags code = do+    do_it <- getCode code+    the_if <- mkCmmIfThenElse' is_enabled do_it mkNop (Just False)+    emit the_if+  where+    enabled = CmmLoad (CmmLit $ CmmLabel mkNonmovingWriteBarrierEnabledLabel) (bWord dflags)+    zero = zeroExpr dflags+    is_enabled = cmmNeWord dflags enabled zero++-- | Emit code to add an entry to a now-overwritten pointer to the update+-- remembered set.+emitUpdRemSetPush :: CmmExpr   -- ^ value of pointer which was overwritten+                  -> FCode ()+emitUpdRemSetPush ptr = do+    emitRtsCall+      rtsUnitId+      (fsLit "updateRemembSetPushClosure_")+      [(CmmReg (CmmGlobal BaseReg), AddrHint),+       (ptr, AddrHint)]+      False++emitUpdRemSetPushThunk :: CmmExpr -- ^ the thunk+                       -> FCode ()+emitUpdRemSetPushThunk ptr = do+    emitRtsCall+      rtsUnitId+      (fsLit "updateRemembSetPushThunk_")+      [(CmmReg (CmmGlobal BaseReg), AddrHint),+       (ptr, AddrHint)]+      False
+ GHC/ThToHs.hs view
@@ -0,0 +1,2027 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+++This module converts Template Haskell syntax into Hs syntax+-}++{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns #-}++module GHC.ThToHs+   ( convertToHsExpr+   , convertToPat+   , convertToHsDecls+   , convertToHsType+   , thRdrNameGuesses+   )+where++import GhcPrelude++import GHC.Hs as Hs+import PrelNames+import RdrName+import qualified Name+import Module+import RdrHsSyn+import OccName+import SrcLoc+import Type+import qualified Coercion ( Role(..) )+import TysWiredIn+import BasicTypes as Hs+import ForeignCall+import Unique+import ErrUtils+import Bag+import Lexeme+import Util+import FastString+import Outputable+import MonadUtils ( foldrM )++import qualified Data.ByteString as BS+import Control.Monad( unless, ap )++import Data.Maybe( catMaybes, isNothing )+import Language.Haskell.TH as TH hiding (sigP)+import Language.Haskell.TH.Syntax as TH+import Foreign.ForeignPtr+import Foreign.Ptr+import System.IO.Unsafe++-------------------------------------------------------------------+--              The external interface++convertToHsDecls :: Origin -> SrcSpan -> [TH.Dec] -> Either MsgDoc [LHsDecl GhcPs]+convertToHsDecls origin loc ds = initCvt origin loc (fmap catMaybes (mapM cvt_dec ds))+  where+    cvt_dec d = wrapMsg "declaration" d (cvtDec d)++convertToHsExpr :: Origin -> SrcSpan -> TH.Exp -> Either MsgDoc (LHsExpr GhcPs)+convertToHsExpr origin loc e+  = initCvt origin loc $ wrapMsg "expression" e $ cvtl e++convertToPat :: Origin -> SrcSpan -> TH.Pat -> Either MsgDoc (LPat GhcPs)+convertToPat origin loc p+  = initCvt origin loc $ wrapMsg "pattern" p $ cvtPat p++convertToHsType :: Origin -> SrcSpan -> TH.Type -> Either MsgDoc (LHsType GhcPs)+convertToHsType origin loc t+  = initCvt origin loc $ wrapMsg "type" t $ cvtType t++-------------------------------------------------------------------+newtype CvtM a = CvtM { unCvtM :: Origin -> SrcSpan -> Either MsgDoc (SrcSpan, a) }+    deriving (Functor)+        -- Push down the Origin (that is configurable by+        -- -fenable-th-splice-warnings) and source location;+        -- Can fail, with a single error message++-- NB: If the conversion succeeds with (Right x), there should+--     be no exception values hiding in x+-- Reason: so a (head []) in TH code doesn't subsequently+--         make GHC crash when it tries to walk the generated tree++-- Use the loc everywhere, for lack of anything better+-- In particular, we want it on binding locations, so that variables bound in+-- the spliced-in declarations get a location that at least relates to the splice point++instance Applicative CvtM where+    pure x = CvtM $ \_ loc -> Right (loc,x)+    (<*>) = ap++instance Monad CvtM where+  (CvtM m) >>= k = CvtM $ \origin loc -> case m origin loc of+    Left err -> Left err+    Right (loc',v) -> unCvtM (k v) origin loc'++initCvt :: Origin -> SrcSpan -> CvtM a -> Either MsgDoc a+initCvt origin loc (CvtM m) = fmap snd (m origin loc)++force :: a -> CvtM ()+force a = a `seq` return ()++failWith :: MsgDoc -> CvtM a+failWith m = CvtM (\_ _ -> Left m)++getOrigin :: CvtM Origin+getOrigin = CvtM (\origin loc -> Right (loc,origin))++getL :: CvtM SrcSpan+getL = CvtM (\_ loc -> Right (loc,loc))++setL :: SrcSpan -> CvtM ()+setL loc = CvtM (\_ _ -> Right (loc, ()))++returnL :: HasSrcSpan a => SrcSpanLess a -> CvtM a+returnL x = CvtM (\_ loc -> Right (loc, cL loc x))++returnJustL :: HasSrcSpan a => SrcSpanLess a -> CvtM (Maybe a)+returnJustL = fmap Just . returnL++wrapParL :: HasSrcSpan a =>+            (a -> SrcSpanLess a) -> SrcSpanLess a -> CvtM (SrcSpanLess  a)+wrapParL add_par x = CvtM (\_ loc -> Right (loc, add_par (cL loc x)))++wrapMsg :: (Show a, TH.Ppr a) => String -> a -> CvtM b -> CvtM b+-- E.g  wrapMsg "declaration" dec thing+wrapMsg what item (CvtM m)+  = CvtM $ \origin loc -> case m origin loc of+      Left err -> Left (err $$ getPprStyle msg)+      Right v  -> Right v+  where+        -- Show the item in pretty syntax normally,+        -- but with all its constructors if you say -dppr-debug+    msg sty = hang (text "When splicing a TH" <+> text what <> colon)+                 2 (if debugStyle sty+                    then text (show item)+                    else text (pprint item))++wrapL :: HasSrcSpan a => CvtM (SrcSpanLess a) -> CvtM a+wrapL (CvtM m) = CvtM $ \origin loc -> case m origin loc of+  Left err -> Left err+  Right (loc',v) -> Right (loc',cL loc v)++-------------------------------------------------------------------+cvtDecs :: [TH.Dec] -> CvtM [LHsDecl GhcPs]+cvtDecs = fmap catMaybes . mapM cvtDec++cvtDec :: TH.Dec -> CvtM (Maybe (LHsDecl GhcPs))+cvtDec (TH.ValD pat body ds)+  | TH.VarP s <- pat+  = do  { s' <- vNameL s+        ; cl' <- cvtClause (mkPrefixFunRhs s') (Clause [] body ds)+        ; th_origin <- getOrigin+        ; returnJustL $ Hs.ValD noExtField $ mkFunBind th_origin s' [cl'] }++  | otherwise+  = do  { pat' <- cvtPat pat+        ; body' <- cvtGuard body+        ; ds' <- cvtLocalDecs (text "a where clause") ds+        ; returnJustL $ Hs.ValD noExtField $+          PatBind { pat_lhs = pat'+                  , pat_rhs = GRHSs noExtField body' (noLoc ds')+                  , pat_ext = noExtField+                  , pat_ticks = ([],[]) } }++cvtDec (TH.FunD nm cls)+  | null cls+  = failWith (text "Function binding for"+                 <+> quotes (text (TH.pprint nm))+                 <+> text "has no equations")+  | otherwise+  = do  { nm' <- vNameL nm+        ; cls' <- mapM (cvtClause (mkPrefixFunRhs nm')) cls+        ; th_origin <- getOrigin+        ; returnJustL $ Hs.ValD noExtField $ mkFunBind th_origin nm' cls' }++cvtDec (TH.SigD nm typ)+  = do  { nm' <- vNameL nm+        ; ty' <- cvtType typ+        ; returnJustL $ Hs.SigD noExtField+                                    (TypeSig noExtField [nm'] (mkLHsSigWcType ty')) }++cvtDec (TH.KiSigD nm ki)+  = do  { nm' <- tconNameL nm+        ; ki' <- cvtType ki+        ; let sig' = StandaloneKindSig noExtField nm' (mkLHsSigType ki')+        ; returnJustL $ Hs.KindSigD noExtField sig' }++cvtDec (TH.InfixD fx nm)+  -- Fixity signatures are allowed for variables, constructors, and types+  -- the renamer automatically looks for types during renaming, even when+  -- the RdrName says it's a variable or a constructor. So, just assume+  -- it's a variable or constructor and proceed.+  = do { nm' <- vcNameL nm+       ; returnJustL (Hs.SigD noExtField (FixSig noExtField+                                      (FixitySig noExtField [nm'] (cvtFixity fx)))) }++cvtDec (PragmaD prag)+  = cvtPragmaD prag++cvtDec (TySynD tc tvs rhs)+  = do  { (_, tc', tvs') <- cvt_tycl_hdr [] tc tvs+        ; rhs' <- cvtType rhs+        ; returnJustL $ TyClD noExtField $+          SynDecl { tcdSExt = noExtField, tcdLName = tc', tcdTyVars = tvs'+                  , tcdFixity = Prefix+                  , tcdRhs = rhs' } }++cvtDec (DataD ctxt tc tvs ksig constrs derivs)+  = do  { let isGadtCon (GadtC    _ _ _) = True+              isGadtCon (RecGadtC _ _ _) = True+              isGadtCon (ForallC  _ _ c) = isGadtCon c+              isGadtCon _                = False+              isGadtDecl  = all isGadtCon constrs+              isH98Decl   = all (not . isGadtCon) constrs+        ; unless (isGadtDecl || isH98Decl)+                 (failWith (text "Cannot mix GADT constructors with Haskell 98"+                        <+> text "constructors"))+        ; unless (isNothing ksig || isGadtDecl)+                 (failWith (text "Kind signatures are only allowed on GADTs"))+        ; (ctxt', tc', tvs') <- cvt_tycl_hdr ctxt tc tvs+        ; ksig' <- cvtKind `traverse` ksig+        ; cons' <- mapM cvtConstr constrs+        ; derivs' <- cvtDerivs derivs+        ; let defn = HsDataDefn { dd_ext = noExtField+                                , dd_ND = DataType, dd_cType = Nothing+                                , dd_ctxt = ctxt'+                                , dd_kindSig = ksig'+                                , dd_cons = cons', dd_derivs = derivs' }+        ; returnJustL $ TyClD noExtField $+          DataDecl { tcdDExt = noExtField+                   , tcdLName = tc', tcdTyVars = tvs'+                   , tcdFixity = Prefix+                   , tcdDataDefn = defn } }++cvtDec (NewtypeD ctxt tc tvs ksig constr derivs)+  = do  { (ctxt', tc', tvs') <- cvt_tycl_hdr ctxt tc tvs+        ; ksig' <- cvtKind `traverse` ksig+        ; con' <- cvtConstr constr+        ; derivs' <- cvtDerivs derivs+        ; let defn = HsDataDefn { dd_ext = noExtField+                                , dd_ND = NewType, dd_cType = Nothing+                                , dd_ctxt = ctxt'+                                , dd_kindSig = ksig'+                                , dd_cons = [con']+                                , dd_derivs = derivs' }+        ; returnJustL $ TyClD noExtField $+          DataDecl { tcdDExt = noExtField+                   , tcdLName = tc', tcdTyVars = tvs'+                   , tcdFixity = Prefix+                   , tcdDataDefn = defn } }++cvtDec (ClassD ctxt cl tvs fds decs)+  = do  { (cxt', tc', tvs') <- cvt_tycl_hdr ctxt cl tvs+        ; fds'  <- mapM cvt_fundep fds+        ; (binds', sigs', fams', at_defs', adts') <- cvt_ci_decs (text "a class declaration") decs+        ; unless (null adts')+            (failWith $ (text "Default data instance declarations"+                     <+> text "are not allowed:")+                   $$ (Outputable.ppr adts'))+        ; returnJustL $ TyClD noExtField $+          ClassDecl { tcdCExt = noExtField+                    , tcdCtxt = cxt', tcdLName = tc', tcdTyVars = tvs'+                    , tcdFixity = Prefix+                    , tcdFDs = fds', tcdSigs = Hs.mkClassOpSigs sigs'+                    , tcdMeths = binds'+                    , tcdATs = fams', tcdATDefs = at_defs', tcdDocs = [] }+                              -- no docs in TH ^^+        }++cvtDec (InstanceD o ctxt ty decs)+  = do  { let doc = text "an instance declaration"+        ; (binds', sigs', fams', ats', adts') <- cvt_ci_decs doc decs+        ; unless (null fams') (failWith (mkBadDecMsg doc fams'))+        ; ctxt' <- cvtContext funPrec ctxt+        ; (dL->L loc ty') <- cvtType ty+        ; let inst_ty' = mkHsQualTy ctxt loc ctxt' $ cL loc ty'+        ; returnJustL $ InstD noExtField $ ClsInstD noExtField $+          ClsInstDecl { cid_ext = noExtField, cid_poly_ty = mkLHsSigType inst_ty'+                      , cid_binds = binds'+                      , cid_sigs = Hs.mkClassOpSigs sigs'+                      , cid_tyfam_insts = ats', cid_datafam_insts = adts'+                      , cid_overlap_mode = fmap (cL loc . overlap) o } }+  where+  overlap pragma =+    case pragma of+      TH.Overlaps      -> Hs.Overlaps     (SourceText "OVERLAPS")+      TH.Overlappable  -> Hs.Overlappable (SourceText "OVERLAPPABLE")+      TH.Overlapping   -> Hs.Overlapping  (SourceText "OVERLAPPING")+      TH.Incoherent    -> Hs.Incoherent   (SourceText "INCOHERENT")+++++cvtDec (ForeignD ford)+  = do { ford' <- cvtForD ford+       ; returnJustL $ ForD noExtField ford' }++cvtDec (DataFamilyD tc tvs kind)+  = do { (_, tc', tvs') <- cvt_tycl_hdr [] tc tvs+       ; result <- cvtMaybeKindToFamilyResultSig kind+       ; returnJustL $ TyClD noExtField $ FamDecl noExtField $+         FamilyDecl noExtField DataFamily tc' tvs' Prefix result Nothing }++cvtDec (DataInstD ctxt bndrs tys ksig constrs derivs)+  = do { (ctxt', tc', bndrs', typats') <- cvt_datainst_hdr ctxt bndrs tys+       ; ksig' <- cvtKind `traverse` ksig+       ; cons' <- mapM cvtConstr constrs+       ; derivs' <- cvtDerivs derivs+       ; let defn = HsDataDefn { dd_ext = noExtField+                               , dd_ND = DataType, dd_cType = Nothing+                               , dd_ctxt = ctxt'+                               , dd_kindSig = ksig'+                               , dd_cons = cons', dd_derivs = derivs' }++       ; returnJustL $ InstD noExtField $ DataFamInstD+           { dfid_ext = noExtField+           , dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $+                           FamEqn { feqn_ext = noExtField+                                  , feqn_tycon = tc'+                                  , feqn_bndrs = bndrs'+                                  , feqn_pats = typats'+                                  , feqn_rhs = defn+                                  , feqn_fixity = Prefix } }}}++cvtDec (NewtypeInstD ctxt bndrs tys ksig constr derivs)+  = do { (ctxt', tc', bndrs', typats') <- cvt_datainst_hdr ctxt bndrs tys+       ; ksig' <- cvtKind `traverse` ksig+       ; con' <- cvtConstr constr+       ; derivs' <- cvtDerivs derivs+       ; let defn = HsDataDefn { dd_ext = noExtField+                               , dd_ND = NewType, dd_cType = Nothing+                               , dd_ctxt = ctxt'+                               , dd_kindSig = ksig'+                               , dd_cons = [con'], dd_derivs = derivs' }+       ; returnJustL $ InstD noExtField $ DataFamInstD+           { dfid_ext = noExtField+           , dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $+                           FamEqn { feqn_ext = noExtField+                                  , feqn_tycon = tc'+                                  , feqn_bndrs = bndrs'+                                  , feqn_pats = typats'+                                  , feqn_rhs = defn+                                  , feqn_fixity = Prefix } }}}++cvtDec (TySynInstD eqn)+  = do  { (dL->L _ eqn') <- cvtTySynEqn eqn+        ; returnJustL $ InstD noExtField $ TyFamInstD+            { tfid_ext = noExtField+            , tfid_inst = TyFamInstDecl { tfid_eqn = eqn' } } }++cvtDec (OpenTypeFamilyD head)+  = do { (tc', tyvars', result', injectivity') <- cvt_tyfam_head head+       ; returnJustL $ TyClD noExtField $ FamDecl noExtField $+         FamilyDecl noExtField OpenTypeFamily tc' tyvars' Prefix result' injectivity'+       }++cvtDec (ClosedTypeFamilyD head eqns)+  = do { (tc', tyvars', result', injectivity') <- cvt_tyfam_head head+       ; eqns' <- mapM cvtTySynEqn eqns+       ; returnJustL $ TyClD noExtField $ FamDecl noExtField $+         FamilyDecl noExtField (ClosedTypeFamily (Just eqns')) tc' tyvars' Prefix+                           result' injectivity' }++cvtDec (TH.RoleAnnotD tc roles)+  = do { tc' <- tconNameL tc+       ; let roles' = map (noLoc . cvtRole) roles+       ; returnJustL $ Hs.RoleAnnotD noExtField (RoleAnnotDecl noExtField tc' roles') }++cvtDec (TH.StandaloneDerivD ds cxt ty)+  = do { cxt' <- cvtContext funPrec cxt+       ; ds'  <- traverse cvtDerivStrategy ds+       ; (dL->L loc ty') <- cvtType ty+       ; let inst_ty' = mkHsQualTy cxt loc cxt' $ cL loc ty'+       ; returnJustL $ DerivD noExtField $+         DerivDecl { deriv_ext =noExtField+                   , deriv_strategy = ds'+                   , deriv_type = mkLHsSigWcType inst_ty'+                   , deriv_overlap_mode = Nothing } }++cvtDec (TH.DefaultSigD nm typ)+  = do { nm' <- vNameL nm+       ; ty' <- cvtType typ+       ; returnJustL $ Hs.SigD noExtField+                     $ ClassOpSig noExtField True [nm'] (mkLHsSigType ty')}++cvtDec (TH.PatSynD nm args dir pat)+  = do { nm'   <- cNameL nm+       ; args' <- cvtArgs args+       ; dir'  <- cvtDir nm' dir+       ; pat'  <- cvtPat pat+       ; returnJustL $ Hs.ValD noExtField $ PatSynBind noExtField $+           PSB noExtField nm' args' pat' dir' }+  where+    cvtArgs (TH.PrefixPatSyn args) = Hs.PrefixCon <$> mapM vNameL args+    cvtArgs (TH.InfixPatSyn a1 a2) = Hs.InfixCon <$> vNameL a1 <*> vNameL a2+    cvtArgs (TH.RecordPatSyn sels)+      = do { sels' <- mapM vNameL sels+           ; vars' <- mapM (vNameL . mkNameS . nameBase) sels+           ; return $ Hs.RecCon $ zipWith RecordPatSynField sels' vars' }++    cvtDir _ Unidir          = return Unidirectional+    cvtDir _ ImplBidir       = return ImplicitBidirectional+    cvtDir n (ExplBidir cls) =+      do { ms <- mapM (cvtClause (mkPrefixFunRhs n)) cls+         ; th_origin <- getOrigin+         ; return $ ExplicitBidirectional $ mkMatchGroup th_origin ms }++cvtDec (TH.PatSynSigD nm ty)+  = do { nm' <- cNameL nm+       ; ty' <- cvtPatSynSigTy ty+       ; returnJustL $ Hs.SigD noExtField $ PatSynSig noExtField [nm'] (mkLHsSigType ty')}++-- Implicit parameter bindings are handled in cvtLocalDecs and+-- cvtImplicitParamBind. They are not allowed in any other scope, so+-- reaching this case indicates an error.+cvtDec (TH.ImplicitParamBindD _ _)+  = failWith (text "Implicit parameter binding only allowed in let or where")++----------------+cvtTySynEqn :: TySynEqn -> CvtM (LTyFamInstEqn GhcPs)+cvtTySynEqn (TySynEqn mb_bndrs lhs rhs)+  = do { mb_bndrs' <- traverse (mapM cvt_tv) mb_bndrs+       ; (head_ty, args) <- split_ty_app lhs+       ; case head_ty of+           ConT nm -> do { nm' <- tconNameL nm+                         ; rhs' <- cvtType rhs+                         ; let args' = map wrap_tyarg args+                         ; returnL $ mkHsImplicitBndrs+                            $ FamEqn { feqn_ext    = noExtField+                                     , feqn_tycon  = nm'+                                     , feqn_bndrs  = mb_bndrs'+                                     , feqn_pats   = args'+                                     , feqn_fixity = Prefix+                                     , feqn_rhs    = rhs' } }+           InfixT t1 nm t2 -> do { nm' <- tconNameL nm+                                 ; args' <- mapM cvtType [t1,t2]+                                 ; rhs' <- cvtType rhs+                                 ; returnL $ mkHsImplicitBndrs+                                      $ FamEqn { feqn_ext    = noExtField+                                               , feqn_tycon  = nm'+                                               , feqn_bndrs  = mb_bndrs'+                                               , feqn_pats   =+                                                (map HsValArg args') ++ args+                                               , feqn_fixity = Hs.Infix+                                               , feqn_rhs    = rhs' } }+           _ -> failWith $ text "Invalid type family instance LHS:"+                          <+> text (show lhs)+        }++----------------+cvt_ci_decs :: MsgDoc -> [TH.Dec]+            -> CvtM (LHsBinds GhcPs,+                     [LSig GhcPs],+                     [LFamilyDecl GhcPs],+                     [LTyFamInstDecl GhcPs],+                     [LDataFamInstDecl GhcPs])+-- Convert the declarations inside a class or instance decl+-- ie signatures, bindings, and associated types+cvt_ci_decs doc decs+  = do  { decs' <- cvtDecs decs+        ; let (ats', bind_sig_decs') = partitionWith is_tyfam_inst decs'+        ; let (adts', no_ats')       = partitionWith is_datafam_inst bind_sig_decs'+        ; let (sigs', prob_binds')   = partitionWith is_sig no_ats'+        ; let (binds', prob_fams')   = partitionWith is_bind prob_binds'+        ; let (fams', bads)          = partitionWith is_fam_decl prob_fams'+        ; unless (null bads) (failWith (mkBadDecMsg doc bads))+        ; return (listToBag binds', sigs', fams', ats', adts') }++----------------+cvt_tycl_hdr :: TH.Cxt -> TH.Name -> [TH.TyVarBndr]+             -> CvtM ( LHsContext GhcPs+                     , Located RdrName+                     , LHsQTyVars GhcPs)+cvt_tycl_hdr cxt tc tvs+  = do { cxt' <- cvtContext funPrec cxt+       ; tc'  <- tconNameL tc+       ; tvs' <- cvtTvs tvs+       ; return (cxt', tc', tvs')+       }++cvt_datainst_hdr :: TH.Cxt -> Maybe [TH.TyVarBndr] -> TH.Type+               -> CvtM ( LHsContext GhcPs+                       , Located RdrName+                       , Maybe [LHsTyVarBndr GhcPs]+                       , HsTyPats GhcPs)+cvt_datainst_hdr cxt bndrs tys+  = do { cxt' <- cvtContext funPrec cxt+       ; bndrs' <- traverse (mapM cvt_tv) bndrs+       ; (head_ty, args) <- split_ty_app tys+       ; case head_ty of+          ConT nm -> do { nm' <- tconNameL nm+                        ; let args' = map wrap_tyarg args+                        ; return (cxt', nm', bndrs', args') }+          InfixT t1 nm t2 -> do { nm' <- tconNameL nm+                                ; args' <- mapM cvtType [t1,t2]+                                ; return (cxt', nm', bndrs',+                                         ((map HsValArg args') ++ args)) }+          _ -> failWith $ text "Invalid type instance header:"+                          <+> text (show tys) }++----------------+cvt_tyfam_head :: TypeFamilyHead+               -> CvtM ( Located RdrName+                       , LHsQTyVars GhcPs+                       , Hs.LFamilyResultSig GhcPs+                       , Maybe (Hs.LInjectivityAnn GhcPs))++cvt_tyfam_head (TypeFamilyHead tc tyvars result injectivity)+  = do {(_, tc', tyvars') <- cvt_tycl_hdr [] tc tyvars+       ; result' <- cvtFamilyResultSig result+       ; injectivity' <- traverse cvtInjectivityAnnotation injectivity+       ; return (tc', tyvars', result', injectivity') }++-------------------------------------------------------------------+--              Partitioning declarations+-------------------------------------------------------------------++is_fam_decl :: LHsDecl GhcPs -> Either (LFamilyDecl GhcPs) (LHsDecl GhcPs)+is_fam_decl (dL->L loc (TyClD _ (FamDecl { tcdFam = d }))) = Left (cL loc d)+is_fam_decl decl = Right decl++is_tyfam_inst :: LHsDecl GhcPs -> Either (LTyFamInstDecl GhcPs) (LHsDecl GhcPs)+is_tyfam_inst (dL->L loc (Hs.InstD _ (TyFamInstD { tfid_inst = d })))+  = Left (cL loc d)+is_tyfam_inst decl+  = Right decl++is_datafam_inst :: LHsDecl GhcPs+                -> Either (LDataFamInstDecl GhcPs) (LHsDecl GhcPs)+is_datafam_inst (dL->L loc (Hs.InstD  _ (DataFamInstD { dfid_inst = d })))+  = Left (cL loc d)+is_datafam_inst decl+  = Right decl++is_sig :: LHsDecl GhcPs -> Either (LSig GhcPs) (LHsDecl GhcPs)+is_sig (dL->L loc (Hs.SigD _ sig)) = Left (cL loc sig)+is_sig decl                        = Right decl++is_bind :: LHsDecl GhcPs -> Either (LHsBind GhcPs) (LHsDecl GhcPs)+is_bind (dL->L loc (Hs.ValD _ bind)) = Left (cL loc bind)+is_bind decl                         = Right decl++is_ip_bind :: TH.Dec -> Either (String, TH.Exp) TH.Dec+is_ip_bind (TH.ImplicitParamBindD n e) = Left (n, e)+is_ip_bind decl             = Right decl++mkBadDecMsg :: Outputable a => MsgDoc -> [a] -> MsgDoc+mkBadDecMsg doc bads+  = sep [ text "Illegal declaration(s) in" <+> doc <> colon+        , nest 2 (vcat (map Outputable.ppr bads)) ]++---------------------------------------------------+--      Data types+---------------------------------------------------++cvtConstr :: TH.Con -> CvtM (LConDecl GhcPs)++cvtConstr (NormalC c strtys)+  = do  { c'   <- cNameL c+        ; tys' <- mapM cvt_arg strtys+        ; returnL $ mkConDeclH98 c' Nothing Nothing (PrefixCon tys') }++cvtConstr (RecC c varstrtys)+  = do  { c'    <- cNameL c+        ; args' <- mapM cvt_id_arg varstrtys+        ; returnL $ mkConDeclH98 c' Nothing Nothing+                                   (RecCon (noLoc args')) }++cvtConstr (InfixC st1 c st2)+  = do  { c'   <- cNameL c+        ; st1' <- cvt_arg st1+        ; st2' <- cvt_arg st2+        ; returnL $ mkConDeclH98 c' Nothing Nothing (InfixCon st1' st2') }++cvtConstr (ForallC tvs ctxt con)+  = do  { tvs'      <- cvtTvs tvs+        ; ctxt'     <- cvtContext funPrec ctxt+        ; (dL->L _ con')  <- cvtConstr con+        ; returnL $ add_forall tvs' ctxt' con' }+  where+    add_cxt lcxt         Nothing           = Just lcxt+    add_cxt (dL->L loc cxt1) (Just (dL->L _ cxt2))+      = Just (cL loc (cxt1 ++ cxt2))++    add_forall tvs' cxt' con@(ConDeclGADT { con_qvars = qvars, con_mb_cxt = cxt })+      = con { con_forall = noLoc $ not (null all_tvs)+            , con_qvars  = mkHsQTvs all_tvs+            , con_mb_cxt = add_cxt cxt' cxt }+      where+        all_tvs = hsQTvExplicit tvs' ++ hsQTvExplicit qvars++    add_forall tvs' cxt' con@(ConDeclH98 { con_ex_tvs = ex_tvs, con_mb_cxt = cxt })+      = con { con_forall = noLoc $ not (null all_tvs)+            , con_ex_tvs = all_tvs+            , con_mb_cxt = add_cxt cxt' cxt }+      where+        all_tvs = hsQTvExplicit tvs' ++ ex_tvs++    add_forall _ _ (XConDecl nec) = noExtCon nec++cvtConstr (GadtC [] _strtys _ty)+  = failWith (text "GadtC must have at least one constructor name")++cvtConstr (GadtC c strtys ty)+  = do  { c'      <- mapM cNameL c+        ; args    <- mapM cvt_arg strtys+        ; (dL->L _ ty') <- cvtType ty+        ; c_ty    <- mk_arr_apps args ty'+        ; returnL $ fst $ mkGadtDecl c' c_ty}++cvtConstr (RecGadtC [] _varstrtys _ty)+  = failWith (text "RecGadtC must have at least one constructor name")++cvtConstr (RecGadtC c varstrtys ty)+  = do  { c'       <- mapM cNameL c+        ; ty'      <- cvtType ty+        ; rec_flds <- mapM cvt_id_arg varstrtys+        ; let rec_ty = noLoc (HsFunTy noExtField+                                           (noLoc $ HsRecTy noExtField rec_flds) ty')+        ; returnL $ fst $ mkGadtDecl c' rec_ty }++cvtSrcUnpackedness :: TH.SourceUnpackedness -> SrcUnpackedness+cvtSrcUnpackedness NoSourceUnpackedness = NoSrcUnpack+cvtSrcUnpackedness SourceNoUnpack       = SrcNoUnpack+cvtSrcUnpackedness SourceUnpack         = SrcUnpack++cvtSrcStrictness :: TH.SourceStrictness -> SrcStrictness+cvtSrcStrictness NoSourceStrictness = NoSrcStrict+cvtSrcStrictness SourceLazy         = SrcLazy+cvtSrcStrictness SourceStrict       = SrcStrict++cvt_arg :: (TH.Bang, TH.Type) -> CvtM (LHsType GhcPs)+cvt_arg (Bang su ss, ty)+  = do { ty'' <- cvtType ty+       ; let ty' = parenthesizeHsType appPrec ty''+             su' = cvtSrcUnpackedness su+             ss' = cvtSrcStrictness ss+       ; returnL $ HsBangTy noExtField (HsSrcBang NoSourceText su' ss') ty' }++cvt_id_arg :: (TH.Name, TH.Bang, TH.Type) -> CvtM (LConDeclField GhcPs)+cvt_id_arg (i, str, ty)+  = do  { (dL->L li i') <- vNameL i+        ; ty' <- cvt_arg (str,ty)+        ; return $ noLoc (ConDeclField+                          { cd_fld_ext = noExtField+                          , cd_fld_names+                              = [cL li $ FieldOcc noExtField (cL li i')]+                          , cd_fld_type =  ty'+                          , cd_fld_doc = Nothing}) }++cvtDerivs :: [TH.DerivClause] -> CvtM (HsDeriving GhcPs)+cvtDerivs cs = do { cs' <- mapM cvtDerivClause cs+                  ; returnL cs' }++cvt_fundep :: FunDep -> CvtM (LHsFunDep GhcPs)+cvt_fundep (FunDep xs ys) = do { xs' <- mapM tNameL xs+                               ; ys' <- mapM tNameL ys+                               ; returnL (xs', ys') }+++------------------------------------------+--      Foreign declarations+------------------------------------------++cvtForD :: Foreign -> CvtM (ForeignDecl GhcPs)+cvtForD (ImportF callconv safety from nm ty)+  -- the prim and javascript calling conventions do not support headers+  -- and are inserted verbatim, analogous to mkImport in RdrHsSyn+  | callconv == TH.Prim || callconv == TH.JavaScript+  = mk_imp (CImport (noLoc (cvt_conv callconv)) (noLoc safety') Nothing+                    (CFunction (StaticTarget (SourceText from)+                                             (mkFastString from) Nothing+                                             True))+                    (noLoc $ quotedSourceText from))+  | Just impspec <- parseCImport (noLoc (cvt_conv callconv)) (noLoc safety')+                                 (mkFastString (TH.nameBase nm))+                                 from (noLoc $ quotedSourceText from)+  = mk_imp impspec+  | otherwise+  = failWith $ text (show from) <+> text "is not a valid ccall impent"+  where+    mk_imp impspec+      = do { nm' <- vNameL nm+           ; ty' <- cvtType ty+           ; return (ForeignImport { fd_i_ext = noExtField+                                   , fd_name = nm'+                                   , fd_sig_ty = mkLHsSigType ty'+                                   , fd_fi = impspec })+           }+    safety' = case safety of+                     Unsafe     -> PlayRisky+                     Safe       -> PlaySafe+                     Interruptible -> PlayInterruptible++cvtForD (ExportF callconv as nm ty)+  = do  { nm' <- vNameL nm+        ; ty' <- cvtType ty+        ; let e = CExport (noLoc (CExportStatic (SourceText as)+                                                (mkFastString as)+                                                (cvt_conv callconv)))+                                                (noLoc (SourceText as))+        ; return $ ForeignExport { fd_e_ext = noExtField+                                 , fd_name = nm'+                                 , fd_sig_ty = mkLHsSigType ty'+                                 , fd_fe = e } }++cvt_conv :: TH.Callconv -> CCallConv+cvt_conv TH.CCall      = CCallConv+cvt_conv TH.StdCall    = StdCallConv+cvt_conv TH.CApi       = CApiConv+cvt_conv TH.Prim       = PrimCallConv+cvt_conv TH.JavaScript = JavaScriptCallConv++------------------------------------------+--              Pragmas+------------------------------------------++cvtPragmaD :: Pragma -> CvtM (Maybe (LHsDecl GhcPs))+cvtPragmaD (InlineP nm inline rm phases)+  = do { nm' <- vNameL nm+       ; let dflt = dfltActivation inline+       ; let src TH.NoInline  = "{-# NOINLINE"+             src TH.Inline    = "{-# INLINE"+             src TH.Inlinable = "{-# INLINABLE"+       ; let ip   = InlinePragma { inl_src    = SourceText $ src inline+                                 , inl_inline = cvtInline inline+                                 , inl_rule   = cvtRuleMatch rm+                                 , inl_act    = cvtPhases phases dflt+                                 , inl_sat    = Nothing }+       ; returnJustL $ Hs.SigD noExtField $ InlineSig noExtField nm' ip }++cvtPragmaD (SpecialiseP nm ty inline phases)+  = do { nm' <- vNameL nm+       ; ty' <- cvtType ty+       ; let src TH.NoInline  = "{-# SPECIALISE NOINLINE"+             src TH.Inline    = "{-# SPECIALISE INLINE"+             src TH.Inlinable = "{-# SPECIALISE INLINE"+       ; let (inline', dflt,srcText) = case inline of+               Just inline1 -> (cvtInline inline1, dfltActivation inline1,+                                src inline1)+               Nothing      -> (NoUserInline,   AlwaysActive,+                                "{-# SPECIALISE")+       ; let ip = InlinePragma { inl_src    = SourceText srcText+                               , inl_inline = inline'+                               , inl_rule   = Hs.FunLike+                               , inl_act    = cvtPhases phases dflt+                               , inl_sat    = Nothing }+       ; returnJustL $ Hs.SigD noExtField $ SpecSig noExtField nm' [mkLHsSigType ty'] ip }++cvtPragmaD (SpecialiseInstP ty)+  = do { ty' <- cvtType ty+       ; returnJustL $ Hs.SigD noExtField $+         SpecInstSig noExtField (SourceText "{-# SPECIALISE") (mkLHsSigType ty') }++cvtPragmaD (RuleP nm ty_bndrs tm_bndrs lhs rhs phases)+  = do { let nm' = mkFastString nm+       ; let act = cvtPhases phases AlwaysActive+       ; ty_bndrs' <- traverse (mapM cvt_tv) ty_bndrs+       ; tm_bndrs' <- mapM cvtRuleBndr tm_bndrs+       ; lhs'   <- cvtl lhs+       ; rhs'   <- cvtl rhs+       ; returnJustL $ Hs.RuleD noExtField+            $ HsRules { rds_ext = noExtField+                      , rds_src = SourceText "{-# RULES"+                      , rds_rules = [noLoc $+                          HsRule { rd_ext  = noExtField+                                 , rd_name = (noLoc (quotedSourceText nm,nm'))+                                 , rd_act  = act+                                 , rd_tyvs = ty_bndrs'+                                 , rd_tmvs = tm_bndrs'+                                 , rd_lhs  = lhs'+                                 , rd_rhs  = rhs' }] }++          }++cvtPragmaD (AnnP target exp)+  = do { exp' <- cvtl exp+       ; target' <- case target of+         ModuleAnnotation  -> return ModuleAnnProvenance+         TypeAnnotation n  -> do+           n' <- tconName n+           return (TypeAnnProvenance  (noLoc n'))+         ValueAnnotation n -> do+           n' <- vcName n+           return (ValueAnnProvenance (noLoc n'))+       ; returnJustL $ Hs.AnnD noExtField+                     $ HsAnnotation noExtField (SourceText "{-# ANN") target' exp'+       }++cvtPragmaD (LineP line file)+  = do { setL (srcLocSpan (mkSrcLoc (fsLit file) line 1))+       ; return Nothing+       }+cvtPragmaD (CompleteP cls mty)+  = do { cls' <- noLoc <$> mapM cNameL cls+       ; mty'  <- traverse tconNameL mty+       ; returnJustL $ Hs.SigD noExtField+                   $ CompleteMatchSig noExtField NoSourceText cls' mty' }++dfltActivation :: TH.Inline -> Activation+dfltActivation TH.NoInline = NeverActive+dfltActivation _           = AlwaysActive++cvtInline :: TH.Inline -> Hs.InlineSpec+cvtInline TH.NoInline  = Hs.NoInline+cvtInline TH.Inline    = Hs.Inline+cvtInline TH.Inlinable = Hs.Inlinable++cvtRuleMatch :: TH.RuleMatch -> RuleMatchInfo+cvtRuleMatch TH.ConLike = Hs.ConLike+cvtRuleMatch TH.FunLike = Hs.FunLike++cvtPhases :: TH.Phases -> Activation -> Activation+cvtPhases AllPhases       dflt = dflt+cvtPhases (FromPhase i)   _    = ActiveAfter NoSourceText i+cvtPhases (BeforePhase i) _    = ActiveBefore NoSourceText i++cvtRuleBndr :: TH.RuleBndr -> CvtM (Hs.LRuleBndr GhcPs)+cvtRuleBndr (RuleVar n)+  = do { n' <- vNameL n+       ; return $ noLoc $ Hs.RuleBndr noExtField n' }+cvtRuleBndr (TypedRuleVar n ty)+  = do { n'  <- vNameL n+       ; ty' <- cvtType ty+       ; return $ noLoc $ Hs.RuleBndrSig noExtField n' $ mkLHsSigWcType ty' }++---------------------------------------------------+--              Declarations+---------------------------------------------------++cvtLocalDecs :: MsgDoc -> [TH.Dec] -> CvtM (HsLocalBinds GhcPs)+cvtLocalDecs doc ds+  = case partitionWith is_ip_bind ds of+      ([], []) -> return (EmptyLocalBinds noExtField)+      ([], _) -> do+        ds' <- cvtDecs ds+        let (binds, prob_sigs) = partitionWith is_bind ds'+        let (sigs, bads) = partitionWith is_sig prob_sigs+        unless (null bads) (failWith (mkBadDecMsg doc bads))+        return (HsValBinds noExtField (ValBinds noExtField (listToBag binds) sigs))+      (ip_binds, []) -> do+        binds <- mapM (uncurry cvtImplicitParamBind) ip_binds+        return (HsIPBinds noExtField (IPBinds noExtField binds))+      ((_:_), (_:_)) ->+        failWith (text "Implicit parameters mixed with other bindings")++cvtClause :: HsMatchContext RdrName+          -> TH.Clause -> CvtM (Hs.LMatch GhcPs (LHsExpr GhcPs))+cvtClause ctxt (Clause ps body wheres)+  = do  { ps' <- cvtPats ps+        ; let pps = map (parenthesizePat appPrec) ps'+        ; g'  <- cvtGuard body+        ; ds' <- cvtLocalDecs (text "a where clause") wheres+        ; returnL $ Hs.Match noExtField ctxt pps (GRHSs noExtField g' (noLoc ds')) }++cvtImplicitParamBind :: String -> TH.Exp -> CvtM (LIPBind GhcPs)+cvtImplicitParamBind n e = do+    n' <- wrapL (ipName n)+    e' <- cvtl e+    returnL (IPBind noExtField (Left n') e')++-------------------------------------------------------------------+--              Expressions+-------------------------------------------------------------------++cvtl :: TH.Exp -> CvtM (LHsExpr GhcPs)+cvtl e = wrapL (cvt e)+  where+    cvt (VarE s)        = do { s' <- vName s; return $ HsVar noExtField (noLoc s') }+    cvt (ConE s)        = do { s' <- cName s; return $ HsVar noExtField (noLoc s') }+    cvt (LitE l)+      | overloadedLit l = go cvtOverLit (HsOverLit noExtField)+                             (hsOverLitNeedsParens appPrec)+      | otherwise       = go cvtLit (HsLit noExtField)+                             (hsLitNeedsParens appPrec)+      where+        go :: (Lit -> CvtM (l GhcPs))+           -> (l GhcPs -> HsExpr GhcPs)+           -> (l GhcPs -> Bool)+           -> CvtM (HsExpr GhcPs)+        go cvt_lit mk_expr is_compound_lit = do+          l' <- cvt_lit l+          let e' = mk_expr l'+          return $ if is_compound_lit l' then HsPar noExtField (noLoc e') else e'+    cvt (AppE x@(LamE _ _) y) = do { x' <- cvtl x; y' <- cvtl y+                                   ; return $ HsApp noExtField (mkLHsPar x')+                                                          (mkLHsPar y')}+    cvt (AppE x y)            = do { x' <- cvtl x; y' <- cvtl y+                                   ; return $ HsApp noExtField (mkLHsPar x')+                                                          (mkLHsPar y')}+    cvt (AppTypeE e t) = do { e' <- cvtl e+                            ; t' <- cvtType t+                            ; let tp = parenthesizeHsType appPrec t'+                            ; return $ HsAppType noExtField e'+                                     $ mkHsWildCardBndrs tp }+    cvt (LamE [] e)    = cvt e -- Degenerate case. We convert the body as its+                               -- own expression to avoid pretty-printing+                               -- oddities that can result from zero-argument+                               -- lambda expressions. See #13856.+    cvt (LamE ps e)    = do { ps' <- cvtPats ps; e' <- cvtl e+                            ; let pats = map (parenthesizePat appPrec) ps'+                            ; th_origin <- getOrigin+                            ; return $ HsLam noExtField (mkMatchGroup th_origin+                                             [mkSimpleMatch LambdaExpr+                                             pats e'])}+    cvt (LamCaseE ms)  = do { ms' <- mapM (cvtMatch CaseAlt) ms+                            ; th_origin <- getOrigin+                            ; return $ HsLamCase noExtField+                                                   (mkMatchGroup th_origin ms')+                            }+    cvt (TupE es)        = cvt_tup es Boxed+    cvt (UnboxedTupE es) = cvt_tup es Unboxed+    cvt (UnboxedSumE e alt arity) = do { e' <- cvtl e+                                       ; unboxedSumChecks alt arity+                                       ; return $ ExplicitSum noExtField+                                                                   alt arity e'}+    cvt (CondE x y z)  = do { x' <- cvtl x; y' <- cvtl y; z' <- cvtl z;+                            ; return $ HsIf noExtField (Just noSyntaxExpr) x' y' z' }+    cvt (MultiIfE alts)+      | null alts      = failWith (text "Multi-way if-expression with no alternatives")+      | otherwise      = do { alts' <- mapM cvtpair alts+                            ; return $ HsMultiIf noExtField alts' }+    cvt (LetE ds e)    = do { ds' <- cvtLocalDecs (text "a let expression") ds+                            ; e' <- cvtl e; return $ HsLet noExtField (noLoc ds') e'}+    cvt (CaseE e ms)   = do { e' <- cvtl e; ms' <- mapM (cvtMatch CaseAlt) ms+                            ; th_origin <- getOrigin+                            ; return $ HsCase noExtField e'+                                                 (mkMatchGroup th_origin ms') }+    cvt (DoE ss)       = cvtHsDo DoExpr ss+    cvt (MDoE ss)      = cvtHsDo MDoExpr ss+    cvt (CompE ss)     = cvtHsDo ListComp ss+    cvt (ArithSeqE dd) = do { dd' <- cvtDD dd+                            ; return $ ArithSeq noExtField Nothing dd' }+    cvt (ListE xs)+      | Just s <- allCharLs xs       = do { l' <- cvtLit (StringL s)+                                          ; return (HsLit noExtField l') }+             -- Note [Converting strings]+      | otherwise       = do { xs' <- mapM cvtl xs+                             ; return $ ExplicitList noExtField Nothing xs'+                             }++    -- Infix expressions+    cvt (InfixE (Just x) s (Just y)) = ensureValidOpExp s $+      do { x' <- cvtl x+         ; s' <- cvtl s+         ; y' <- cvtl y+         ; let px = parenthesizeHsExpr opPrec x'+               py = parenthesizeHsExpr opPrec y'+         ; wrapParL (HsPar noExtField)+           $ OpApp noExtField px s' py }+           -- Parenthesise both arguments and result,+           -- to ensure this operator application does+           -- does not get re-associated+           -- See Note [Operator association]+    cvt (InfixE Nothing  s (Just y)) = ensureValidOpExp s $+                                       do { s' <- cvtl s; y' <- cvtl y+                                          ; wrapParL (HsPar noExtField) $+                                                          SectionR noExtField s' y' }+                                            -- See Note [Sections in HsSyn] in GHC.Hs.Expr+    cvt (InfixE (Just x) s Nothing ) = ensureValidOpExp s $+                                       do { x' <- cvtl x; s' <- cvtl s+                                          ; wrapParL (HsPar noExtField) $+                                                          SectionL noExtField x' s' }++    cvt (InfixE Nothing  s Nothing ) = ensureValidOpExp s $+                                       do { s' <- cvtl s+                                          ; return $ HsPar noExtField s' }+                                       -- Can I indicate this is an infix thing?+                                       -- Note [Dropping constructors]++    cvt (UInfixE x s y)  = ensureValidOpExp s $+                           do { x' <- cvtl x+                              ; let x'' = case unLoc x' of+                                            OpApp {} -> x'+                                            _ -> mkLHsPar x'+                              ; cvtOpApp x'' s y } --  Note [Converting UInfix]++    cvt (ParensE e)      = do { e' <- cvtl e; return $ HsPar noExtField e' }+    cvt (SigE e t)       = do { e' <- cvtl e; t' <- cvtType t+                              ; let pe = parenthesizeHsExpr sigPrec e'+                              ; return $ ExprWithTySig noExtField pe (mkLHsSigWcType t') }+    cvt (RecConE c flds) = do { c' <- cNameL c+                              ; flds' <- mapM (cvtFld (mkFieldOcc . noLoc)) flds+                              ; return $ mkRdrRecordCon c' (HsRecFields flds' Nothing) }+    cvt (RecUpdE e flds) = do { e' <- cvtl e+                              ; flds'+                                  <- mapM (cvtFld (mkAmbiguousFieldOcc . noLoc))+                                           flds+                              ; return $ mkRdrRecordUpd e' flds' }+    cvt (StaticE e)      = fmap (HsStatic noExtField) $ cvtl e+    cvt (UnboundVarE s)  = do -- Use of 'vcName' here instead of 'vName' is+                              -- important, because UnboundVarE may contain+                              -- constructor names - see #14627.+                              { s' <- vcName s+                              ; return $ HsVar noExtField (noLoc s') }+    cvt (LabelE s)       = do { return $ HsOverLabel noExtField Nothing (fsLit s) }+    cvt (ImplicitParamVarE n) = do { n' <- ipName n; return $ HsIPVar noExtField n' }++{- | #16895 Ensure an infix expression's operator is a variable/constructor.+Consider this example:++  $(uInfixE [|1|] [|id id|] [|2|])++This infix expression is obviously ill-formed so we use this helper function+to reject such programs outright.++The constructors `ensureValidOpExp` permits should be in sync with `pprInfixExp`+in Language.Haskell.TH.Ppr from the template-haskell library.+-}+ensureValidOpExp :: TH.Exp -> CvtM a -> CvtM a+ensureValidOpExp (VarE _n) m = m+ensureValidOpExp (ConE _n) m = m+ensureValidOpExp (UnboundVarE _n) m = m+ensureValidOpExp _e _m =+    failWith (text "Non-variable expression is not allowed in an infix expression")++{- Note [Dropping constructors]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we drop constructors from the input, we must insert parentheses around the+argument. For example:++  UInfixE x * (AppE (InfixE (Just y) + Nothing) z)++If we convert the InfixE expression to an operator section but don't insert+parentheses, the above expression would be reassociated to++  OpApp (OpApp x * y) + z++which we don't want.+-}++cvtFld :: (RdrName -> t) -> (TH.Name, TH.Exp)+       -> CvtM (LHsRecField' t (LHsExpr GhcPs))+cvtFld f (v,e)+  = do  { v' <- vNameL v; e' <- cvtl e+        ; return (noLoc $ HsRecField { hsRecFieldLbl = fmap f v'+                                     , hsRecFieldArg = e'+                                     , hsRecPun      = False}) }++cvtDD :: Range -> CvtM (ArithSeqInfo GhcPs)+cvtDD (FromR x)           = do { x' <- cvtl x; return $ From x' }+cvtDD (FromThenR x y)     = do { x' <- cvtl x; y' <- cvtl y; return $ FromThen x' y' }+cvtDD (FromToR x y)       = do { x' <- cvtl x; y' <- cvtl y; return $ FromTo x' y' }+cvtDD (FromThenToR x y z) = do { x' <- cvtl x; y' <- cvtl y; z' <- cvtl z; return $ FromThenTo x' y' z' }++cvt_tup :: [Maybe Exp] -> Boxity -> CvtM (HsExpr GhcPs)+cvt_tup es boxity = do { let cvtl_maybe Nothing  = return missingTupArg+                             cvtl_maybe (Just e) = fmap (Present noExtField) (cvtl e)+                       ; es' <- mapM cvtl_maybe es+                       ; return $ ExplicitTuple+                                    noExtField+                                    (map noLoc es')+                                    boxity }++{- Note [Operator assocation]+We must be quite careful about adding parens:+  * Infix (UInfix ...) op arg      Needs parens round the first arg+  * Infix (Infix ...) op arg       Needs parens round the first arg+  * UInfix (UInfix ...) op arg     No parens for first arg+  * UInfix (Infix ...) op arg      Needs parens round first arg+++Note [Converting UInfix]+~~~~~~~~~~~~~~~~~~~~~~~~+When converting @UInfixE@, @UInfixP@, and @UInfixT@ values, we want to readjust+the trees to reflect the fixities of the underlying operators:++  UInfixE x * (UInfixE y + z) ---> (x * y) + z++This is done by the renamer (see @mkOppAppRn@, @mkConOppPatRn@, and+@mkHsOpTyRn@ in RnTypes), which expects that the input will be completely+right-biased for types and left-biased for everything else. So we left-bias the+trees of @UInfixP@ and @UInfixE@ and right-bias the trees of @UInfixT@.++Sample input:++  UInfixE+   (UInfixE x op1 y)+   op2+   (UInfixE z op3 w)++Sample output:++  OpApp+    (OpApp+      (OpApp x op1 y)+      op2+      z)+    op3+    w++The functions @cvtOpApp@, @cvtOpAppP@, and @cvtOpAppT@ are responsible for this+biasing.+-}++{- | @cvtOpApp x op y@ converts @op@ and @y@ and produces the operator application @x `op` y@.+The produced tree of infix expressions will be left-biased, provided @x@ is.++We can see that @cvtOpApp@ is correct as follows. The inductive hypothesis+is that @cvtOpApp x op y@ is left-biased, provided @x@ is. It is clear that+this holds for both branches (of @cvtOpApp@), provided we assume it holds for+the recursive calls to @cvtOpApp@.++When we call @cvtOpApp@ from @cvtl@, the first argument will always be left-biased+since we have already run @cvtl@ on it.+-}+cvtOpApp :: LHsExpr GhcPs -> TH.Exp -> TH.Exp -> CvtM (HsExpr GhcPs)+cvtOpApp x op1 (UInfixE y op2 z)+  = do { l <- wrapL $ cvtOpApp x op1 y+       ; cvtOpApp l op2 z }+cvtOpApp x op y+  = do { op' <- cvtl op+       ; y' <- cvtl y+       ; return (OpApp noExtField x op' y') }++-------------------------------------+--      Do notation and statements+-------------------------------------++cvtHsDo :: HsStmtContext Name.Name -> [TH.Stmt] -> CvtM (HsExpr GhcPs)+cvtHsDo do_or_lc stmts+  | null stmts = failWith (text "Empty stmt list in do-block")+  | otherwise+  = do  { stmts' <- cvtStmts stmts+        ; let Just (stmts'', last') = snocView stmts'++        ; last'' <- case last' of+                    (dL->L loc (BodyStmt _ body _ _))+                      -> return (cL loc (mkLastStmt body))+                    _ -> failWith (bad_last last')++        ; return $ HsDo noExtField do_or_lc (noLoc (stmts'' ++ [last''])) }+  where+    bad_last stmt = vcat [ text "Illegal last statement of" <+> pprAStmtContext do_or_lc <> colon+                         , nest 2 $ Outputable.ppr stmt+                         , text "(It should be an expression.)" ]++cvtStmts :: [TH.Stmt] -> CvtM [Hs.LStmt GhcPs (LHsExpr GhcPs)]+cvtStmts = mapM cvtStmt++cvtStmt :: TH.Stmt -> CvtM (Hs.LStmt GhcPs (LHsExpr GhcPs))+cvtStmt (NoBindS e)    = do { e' <- cvtl e; returnL $ mkBodyStmt e' }+cvtStmt (TH.BindS p e) = do { p' <- cvtPat p; e' <- cvtl e; returnL $ mkBindStmt p' e' }+cvtStmt (TH.LetS ds)   = do { ds' <- cvtLocalDecs (text "a let binding") ds+                            ; returnL $ LetStmt noExtField (noLoc ds') }+cvtStmt (TH.ParS dss)  = do { dss' <- mapM cvt_one dss+                            ; returnL $ ParStmt noExtField dss' noExpr noSyntaxExpr }+  where+    cvt_one ds = do { ds' <- cvtStmts ds+                    ; return (ParStmtBlock noExtField ds' undefined noSyntaxExpr) }+cvtStmt (TH.RecS ss) = do { ss' <- mapM cvtStmt ss; returnL (mkRecStmt ss') }++cvtMatch :: HsMatchContext RdrName+         -> TH.Match -> CvtM (Hs.LMatch GhcPs (LHsExpr GhcPs))+cvtMatch ctxt (TH.Match p body decs)+  = do  { p' <- cvtPat p+        ; let lp = case p' of+                     (dL->L loc SigPat{}) -> cL loc (ParPat noExtField p') -- #14875+                     _                    -> p'+        ; g' <- cvtGuard body+        ; decs' <- cvtLocalDecs (text "a where clause") decs+        ; returnL $ Hs.Match noExtField ctxt [lp] (GRHSs noExtField g' (noLoc decs')) }++cvtGuard :: TH.Body -> CvtM [LGRHS GhcPs (LHsExpr GhcPs)]+cvtGuard (GuardedB pairs) = mapM cvtpair pairs+cvtGuard (NormalB e)      = do { e' <- cvtl e+                               ; g' <- returnL $ GRHS noExtField [] e'; return [g'] }++cvtpair :: (TH.Guard, TH.Exp) -> CvtM (LGRHS GhcPs (LHsExpr GhcPs))+cvtpair (NormalG ge,rhs) = do { ge' <- cvtl ge; rhs' <- cvtl rhs+                              ; g' <- returnL $ mkBodyStmt ge'+                              ; returnL $ GRHS noExtField [g'] rhs' }+cvtpair (PatG gs,rhs)    = do { gs' <- cvtStmts gs; rhs' <- cvtl rhs+                              ; returnL $ GRHS noExtField gs' rhs' }++cvtOverLit :: Lit -> CvtM (HsOverLit GhcPs)+cvtOverLit (IntegerL i)+  = do { force i; return $ mkHsIntegral   (mkIntegralLit i) }+cvtOverLit (RationalL r)+  = do { force r; return $ mkHsFractional (mkFractionalLit r) }+cvtOverLit (StringL s)+  = do { let { s' = mkFastString s }+       ; force s'+       ; return $ mkHsIsString (quotedSourceText s) s'+       }+cvtOverLit _ = panic "Convert.cvtOverLit: Unexpected overloaded literal"+-- An Integer is like an (overloaded) '3' in a Haskell source program+-- Similarly 3.5 for fractionals++{- Note [Converting strings]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we get (ListE [CharL 'x', CharL 'y']) we'd like to convert to+a string literal for "xy".  Of course, we might hope to get+(LitE (StringL "xy")), but not always, and allCharLs fails quickly+if it isn't a literal string+-}++allCharLs :: [TH.Exp] -> Maybe String+-- Note [Converting strings]+-- NB: only fire up this setup for a non-empty list, else+--     there's a danger of returning "" for [] :: [Int]!+allCharLs xs+  = case xs of+      LitE (CharL c) : ys -> go [c] ys+      _                   -> Nothing+  where+    go cs []                    = Just (reverse cs)+    go cs (LitE (CharL c) : ys) = go (c:cs) ys+    go _  _                     = Nothing++cvtLit :: Lit -> CvtM (HsLit GhcPs)+cvtLit (IntPrimL i)    = do { force i; return $ HsIntPrim NoSourceText i }+cvtLit (WordPrimL w)   = do { force w; return $ HsWordPrim NoSourceText w }+cvtLit (FloatPrimL f)+  = do { force f; return $ HsFloatPrim noExtField (mkFractionalLit f) }+cvtLit (DoublePrimL f)+  = do { force f; return $ HsDoublePrim noExtField (mkFractionalLit f) }+cvtLit (CharL c)       = do { force c; return $ HsChar NoSourceText c }+cvtLit (CharPrimL c)   = do { force c; return $ HsCharPrim NoSourceText c }+cvtLit (StringL s)     = do { let { s' = mkFastString s }+                            ; force s'+                            ; return $ HsString (quotedSourceText s) s' }+cvtLit (StringPrimL s) = do { let { s' = BS.pack s }+                            ; force s'+                            ; return $ HsStringPrim NoSourceText s' }+cvtLit (BytesPrimL (Bytes fptr off sz)) = do+  let bs = unsafePerformIO $ withForeignPtr fptr $ \ptr ->+             BS.packCStringLen (ptr `plusPtr` fromIntegral off, fromIntegral sz)+  force bs+  return $ HsStringPrim NoSourceText bs+cvtLit _ = panic "Convert.cvtLit: Unexpected literal"+        -- cvtLit should not be called on IntegerL, RationalL+        -- That precondition is established right here in+        -- Convert.hs, hence panic++quotedSourceText :: String -> SourceText+quotedSourceText s = SourceText $ "\"" ++ s ++ "\""++cvtPats :: [TH.Pat] -> CvtM [Hs.LPat GhcPs]+cvtPats pats = mapM cvtPat pats++cvtPat :: TH.Pat -> CvtM (Hs.LPat GhcPs)+cvtPat pat = wrapL (cvtp pat)++cvtp :: TH.Pat -> CvtM (Hs.Pat GhcPs)+cvtp (TH.LitP l)+  | overloadedLit l    = do { l' <- cvtOverLit l+                            ; return (mkNPat (noLoc l') Nothing) }+                                  -- Not right for negative patterns;+                                  -- need to think about that!+  | otherwise          = do { l' <- cvtLit l; return $ Hs.LitPat noExtField l' }+cvtp (TH.VarP s)       = do { s' <- vName s+                            ; return $ Hs.VarPat noExtField (noLoc s') }+cvtp (TupP ps)         = do { ps' <- cvtPats ps+                            ; return $ TuplePat noExtField ps' Boxed }+cvtp (UnboxedTupP ps)  = do { ps' <- cvtPats ps+                            ; return $ TuplePat noExtField ps' Unboxed }+cvtp (UnboxedSumP p alt arity)+                       = do { p' <- cvtPat p+                            ; unboxedSumChecks alt arity+                            ; return $ SumPat noExtField p' alt arity }+cvtp (ConP s ps)       = do { s' <- cNameL s; ps' <- cvtPats ps+                            ; let pps = map (parenthesizePat appPrec) ps'+                            ; return $ ConPatIn s' (PrefixCon pps) }+cvtp (InfixP p1 s p2)  = do { s' <- cNameL s; p1' <- cvtPat p1; p2' <- cvtPat p2+                            ; wrapParL (ParPat noExtField) $+                              ConPatIn s' $+                              InfixCon (parenthesizePat opPrec p1')+                                       (parenthesizePat opPrec p2') }+                            -- See Note [Operator association]+cvtp (UInfixP p1 s p2) = do { p1' <- cvtPat p1; cvtOpAppP p1' s p2 } -- Note [Converting UInfix]+cvtp (ParensP p)       = do { p' <- cvtPat p;+                            ; case unLoc p' of  -- may be wrapped ConPatIn+                                ParPat {} -> return $ unLoc p'+                                _         -> return $ ParPat noExtField p' }+cvtp (TildeP p)        = do { p' <- cvtPat p; return $ LazyPat noExtField p' }+cvtp (BangP p)         = do { p' <- cvtPat p; return $ BangPat noExtField p' }+cvtp (TH.AsP s p)      = do { s' <- vNameL s; p' <- cvtPat p+                            ; return $ AsPat noExtField s' p' }+cvtp TH.WildP          = return $ WildPat noExtField+cvtp (RecP c fs)       = do { c' <- cNameL c; fs' <- mapM cvtPatFld fs+                            ; return $ ConPatIn c'+                                     $ Hs.RecCon (HsRecFields fs' Nothing) }+cvtp (ListP ps)        = do { ps' <- cvtPats ps+                            ; return+                                   $ ListPat noExtField ps'}+cvtp (SigP p t)        = do { p' <- cvtPat p; t' <- cvtType t+                            ; return $ SigPat noExtField p' (mkLHsSigWcType t') }+cvtp (ViewP e p)       = do { e' <- cvtl e; p' <- cvtPat p+                            ; return $ ViewPat noExtField e' p'}++cvtPatFld :: (TH.Name, TH.Pat) -> CvtM (LHsRecField GhcPs (LPat GhcPs))+cvtPatFld (s,p)+  = do  { (dL->L ls s') <- vNameL s+        ; p' <- cvtPat p+        ; return (noLoc $ HsRecField { hsRecFieldLbl+                                         = cL ls $ mkFieldOcc (cL ls s')+                                     , hsRecFieldArg = p'+                                     , hsRecPun      = False}) }++{- | @cvtOpAppP x op y@ converts @op@ and @y@ and produces the operator application @x `op` y@.+The produced tree of infix patterns will be left-biased, provided @x@ is.++See the @cvtOpApp@ documentation for how this function works.+-}+cvtOpAppP :: Hs.LPat GhcPs -> TH.Name -> TH.Pat -> CvtM (Hs.Pat GhcPs)+cvtOpAppP x op1 (UInfixP y op2 z)+  = do { l <- wrapL $ cvtOpAppP x op1 y+       ; cvtOpAppP l op2 z }+cvtOpAppP x op y+  = do { op' <- cNameL op+       ; y' <- cvtPat y+       ; return (ConPatIn op' (InfixCon x y')) }++-----------------------------------------------------------+--      Types and type variables++cvtTvs :: [TH.TyVarBndr] -> CvtM (LHsQTyVars GhcPs)+cvtTvs tvs = do { tvs' <- mapM cvt_tv tvs; return (mkHsQTvs tvs') }++cvt_tv :: TH.TyVarBndr -> CvtM (LHsTyVarBndr GhcPs)+cvt_tv (TH.PlainTV nm)+  = do { nm' <- tNameL nm+       ; returnL $ UserTyVar noExtField nm' }+cvt_tv (TH.KindedTV nm ki)+  = do { nm' <- tNameL nm+       ; ki' <- cvtKind ki+       ; returnL $ KindedTyVar noExtField nm' ki' }++cvtRole :: TH.Role -> Maybe Coercion.Role+cvtRole TH.NominalR          = Just Coercion.Nominal+cvtRole TH.RepresentationalR = Just Coercion.Representational+cvtRole TH.PhantomR          = Just Coercion.Phantom+cvtRole TH.InferR            = Nothing++cvtContext :: PprPrec -> TH.Cxt -> CvtM (LHsContext GhcPs)+cvtContext p tys = do { preds' <- mapM cvtPred tys+                      ; parenthesizeHsContext p <$> returnL preds' }++cvtPred :: TH.Pred -> CvtM (LHsType GhcPs)+cvtPred = cvtType++cvtDerivClause :: TH.DerivClause+               -> CvtM (LHsDerivingClause GhcPs)+cvtDerivClause (TH.DerivClause ds ctxt)+  = do { ctxt' <- fmap (map mkLHsSigType) <$> cvtContext appPrec ctxt+       ; ds'   <- traverse cvtDerivStrategy ds+       ; returnL $ HsDerivingClause noExtField ds' ctxt' }++cvtDerivStrategy :: TH.DerivStrategy -> CvtM (Hs.LDerivStrategy GhcPs)+cvtDerivStrategy TH.StockStrategy    = returnL Hs.StockStrategy+cvtDerivStrategy TH.AnyclassStrategy = returnL Hs.AnyclassStrategy+cvtDerivStrategy TH.NewtypeStrategy  = returnL Hs.NewtypeStrategy+cvtDerivStrategy (TH.ViaStrategy ty) = do+  ty' <- cvtType ty+  returnL $ Hs.ViaStrategy (mkLHsSigType ty')++cvtType :: TH.Type -> CvtM (LHsType GhcPs)+cvtType = cvtTypeKind "type"++cvtTypeKind :: String -> TH.Type -> CvtM (LHsType GhcPs)+cvtTypeKind ty_str ty+  = do { (head_ty, tys') <- split_ty_app ty+       ; let m_normals = mapM extract_normal tys'+                                where extract_normal (HsValArg ty) = Just ty+                                      extract_normal _ = Nothing++       ; case head_ty of+           TupleT n+            | Just normals <- m_normals+            , normals `lengthIs` n         -- Saturated+            -> returnL (HsTupleTy noExtField HsBoxedOrConstraintTuple normals)+            | otherwise+            -> mk_apps+               (HsTyVar noExtField NotPromoted (noLoc (getRdrName (tupleTyCon Boxed n))))+               tys'+           UnboxedTupleT n+             | Just normals <- m_normals+             , normals `lengthIs` n               -- Saturated+             -> returnL (HsTupleTy noExtField HsUnboxedTuple normals)+             | otherwise+             -> mk_apps+                (HsTyVar noExtField NotPromoted (noLoc (getRdrName (tupleTyCon Unboxed n))))+                tys'+           UnboxedSumT n+             | n < 2+            -> failWith $+                   vcat [ text "Illegal sum arity:" <+> text (show n)+                        , nest 2 $+                            text "Sums must have an arity of at least 2" ]+             | Just normals <- m_normals+             , normals `lengthIs` n -- Saturated+             -> returnL (HsSumTy noExtField normals)+             | otherwise+             -> mk_apps+                (HsTyVar noExtField NotPromoted (noLoc (getRdrName (sumTyCon n))))+                tys'+           ArrowT+             | Just normals <- m_normals+             , [x',y'] <- normals -> do+                 x'' <- case unLoc x' of+                          HsFunTy{}    -> returnL (HsParTy noExtField x')+                          HsForAllTy{} -> returnL (HsParTy noExtField x') -- #14646+                          HsQualTy{}   -> returnL (HsParTy noExtField x') -- #15324+                          _            -> return $+                                          parenthesizeHsType sigPrec x'+                 let y'' = parenthesizeHsType sigPrec y'+                 returnL (HsFunTy noExtField x'' y'')+             | otherwise+             -> mk_apps+                (HsTyVar noExtField NotPromoted (noLoc (getRdrName funTyCon)))+                tys'+           ListT+             | Just normals <- m_normals+             , [x'] <- normals -> do+                returnL (HsListTy noExtField x')+             | otherwise+             -> mk_apps+                (HsTyVar noExtField NotPromoted (noLoc (getRdrName listTyCon)))+                tys'++           VarT nm -> do { nm' <- tNameL nm+                         ; mk_apps (HsTyVar noExtField NotPromoted nm') tys' }+           ConT nm -> do { nm' <- tconName nm+                         ; let prom = name_promotedness nm'+                         ; mk_apps (HsTyVar noExtField prom (noLoc nm')) tys'}++           ForallT tvs cxt ty+             | null tys'+             -> do { tvs' <- cvtTvs tvs+                   ; cxt' <- cvtContext funPrec cxt+                   ; ty'  <- cvtType ty+                   ; loc <- getL+                   ; let hs_ty  = mkHsForAllTy tvs loc ForallInvis tvs' rho_ty+                         rho_ty = mkHsQualTy cxt loc cxt' ty'++                   ; return hs_ty }++           ForallVisT tvs ty+             | null tys'+             -> do { tvs' <- cvtTvs tvs+                   ; ty'  <- cvtType ty+                   ; loc  <- getL+                   ; pure $ mkHsForAllTy tvs loc ForallVis tvs' ty' }++           SigT ty ki+             -> do { ty' <- cvtType ty+                   ; ki' <- cvtKind ki+                   ; mk_apps (HsKindSig noExtField ty' ki') tys'+                   }++           LitT lit+             -> mk_apps (HsTyLit noExtField (cvtTyLit lit)) tys'++           WildCardT+             -> mk_apps mkAnonWildCardTy tys'++           InfixT t1 s t2+             -> do { s'  <- tconName s+                   ; t1' <- cvtType t1+                   ; t2' <- cvtType t2+                   ; let prom = name_promotedness s'+                   ; mk_apps+                      (HsTyVar noExtField prom (noLoc s'))+                      ([HsValArg t1', HsValArg t2'] ++ tys')+                   }++           UInfixT t1 s t2+             -> do { t2' <- cvtType t2+                   ; t <- cvtOpAppT t1 s t2'+                   ; mk_apps (unLoc t) tys'+                   } -- Note [Converting UInfix]++           ParensT t+             -> do { t' <- cvtType t+                   ; mk_apps (HsParTy noExtField t') tys'+                   }++           PromotedT nm -> do { nm' <- cName nm+                              ; mk_apps (HsTyVar noExtField IsPromoted (noLoc nm'))+                                        tys' }+                 -- Promoted data constructor; hence cName++           PromotedTupleT n+              | Just normals <- m_normals+              , normals `lengthIs` n   -- Saturated+              -> returnL (HsExplicitTupleTy noExtField normals)+              | otherwise+              -> mk_apps+                 (HsTyVar noExtField IsPromoted (noLoc (getRdrName (tupleDataCon Boxed n))))+                 tys'++           PromotedNilT+             -> mk_apps (HsExplicitListTy noExtField IsPromoted []) tys'++           PromotedConsT  -- See Note [Representing concrete syntax in types]+                          -- in Language.Haskell.TH.Syntax+              | Just normals <- m_normals+              , [ty1, dL->L _ (HsExplicitListTy _ ip tys2)] <- normals+              -> do+                  returnL (HsExplicitListTy noExtField ip (ty1:tys2))+              | otherwise+              -> mk_apps+                 (HsTyVar noExtField IsPromoted (noLoc (getRdrName consDataCon)))+                 tys'++           StarT+             -> mk_apps+                (HsTyVar noExtField NotPromoted (noLoc (getRdrName liftedTypeKindTyCon)))+                tys'++           ConstraintT+             -> mk_apps+                (HsTyVar noExtField NotPromoted (noLoc (getRdrName constraintKindTyCon)))+                tys'++           EqualityT+             | Just normals <- m_normals+             , [x',y'] <- normals ->+                   let px = parenthesizeHsType opPrec x'+                       py = parenthesizeHsType opPrec y'+                   in returnL (HsOpTy noExtField px (noLoc eqTyCon_RDR) py)+               -- The long-term goal is to remove the above case entirely and+               -- subsume it under the case for InfixT. See #15815, comment:6,+               -- for more details.++             | otherwise ->+                   mk_apps (HsTyVar noExtField NotPromoted+                            (noLoc eqTyCon_RDR)) tys'+           ImplicitParamT n t+             -> do { n' <- wrapL $ ipName n+                   ; t' <- cvtType t+                   ; returnL (HsIParamTy noExtField n' t')+                   }++           _ -> failWith (ptext (sLit ("Malformed " ++ ty_str)) <+> text (show ty))+    }++-- ConT/InfixT can contain both data constructor (i.e., promoted) names and+-- other (i.e, unpromoted) names, as opposed to PromotedT, which can only+-- contain data constructor names. See #15572/#17394. We use this function to+-- determine whether to mark a name as promoted/unpromoted when dealing with+-- ConT/InfixT.+name_promotedness :: RdrName -> Hs.PromotionFlag+name_promotedness nm+  | isRdrDataCon nm = IsPromoted+  | otherwise       = NotPromoted++-- | Constructs an application of a type to arguments passed in a list.+mk_apps :: HsType GhcPs -> [LHsTypeArg GhcPs] -> CvtM (LHsType GhcPs)+mk_apps head_ty type_args = do+  head_ty' <- returnL head_ty+  -- We must parenthesize the function type in case of an explicit+  -- signature. For instance, in `(Maybe :: Type -> Type) Int`, there+  -- _must_ be parentheses around `Maybe :: Type -> Type`.+  let phead_ty :: LHsType GhcPs+      phead_ty = parenthesizeHsType sigPrec head_ty'++      go :: [LHsTypeArg GhcPs] -> CvtM (LHsType GhcPs)+      go [] = pure head_ty'+      go (arg:args) =+        case arg of+          HsValArg ty  -> do p_ty <- add_parens ty+                             mk_apps (HsAppTy noExtField phead_ty p_ty) args+          HsTypeArg l ki -> do p_ki <- add_parens ki+                               mk_apps (HsAppKindTy l phead_ty p_ki) args+          HsArgPar _   -> mk_apps (HsParTy noExtField phead_ty) args++  go type_args+   where+    -- See Note [Adding parens for splices]+    add_parens lt@(dL->L _ t)+      | hsTypeNeedsParens appPrec t = returnL (HsParTy noExtField lt)+      | otherwise                   = return lt++wrap_tyarg :: LHsTypeArg GhcPs -> LHsTypeArg GhcPs+wrap_tyarg (HsValArg ty)    = HsValArg  $ parenthesizeHsType appPrec ty+wrap_tyarg (HsTypeArg l ki) = HsTypeArg l $ parenthesizeHsType appPrec ki+wrap_tyarg ta@(HsArgPar {}) = ta -- Already parenthesized++-- ---------------------------------------------------------------------+-- Note [Adding parens for splices]+{-+The hsSyn representation of parsed source explicitly contains all the original+parens, as written in the source.++When a Template Haskell (TH) splice is evaluated, the original splice is first+renamed and type checked and then finally converted to core in DsMeta. This core+is then run in the TH engine, and the result comes back as a TH AST.++In the process, all parens are stripped out, as they are not needed.++This Convert module then converts the TH AST back to hsSyn AST.++In order to pretty-print this hsSyn AST, parens need to be adde back at certain+points so that the code is readable with its original meaning.++So scattered through Convert.hs are various points where parens are added.++See (among other closed issued) https://gitlab.haskell.org/ghc/ghc/issues/14289+-}+-- ---------------------------------------------------------------------++-- | Constructs an arrow type with a specified return type+mk_arr_apps :: [LHsType GhcPs] -> HsType GhcPs -> CvtM (LHsType GhcPs)+mk_arr_apps tys return_ty = foldrM go return_ty tys >>= returnL+    where go :: LHsType GhcPs -> HsType GhcPs -> CvtM (HsType GhcPs)+          go arg ret_ty = do { ret_ty_l <- returnL ret_ty+                             ; return (HsFunTy noExtField arg ret_ty_l) }++split_ty_app :: TH.Type -> CvtM (TH.Type, [LHsTypeArg GhcPs])+split_ty_app ty = go ty []+  where+    go (AppT f a) as' = do { a' <- cvtType a; go f (HsValArg a':as') }+    go (AppKindT ty ki) as' = do { ki' <- cvtKind ki+                                 ; go ty (HsTypeArg noSrcSpan ki':as') }+    go (ParensT t) as' = do { loc <- getL; go t (HsArgPar loc: as') }+    go f as           = return (f,as)++cvtTyLit :: TH.TyLit -> HsTyLit+cvtTyLit (TH.NumTyLit i) = HsNumTy NoSourceText i+cvtTyLit (TH.StrTyLit s) = HsStrTy NoSourceText (fsLit s)++{- | @cvtOpAppT x op y@ converts @op@ and @y@ and produces the operator+application @x `op` y@. The produced tree of infix types will be right-biased,+provided @y@ is.++See the @cvtOpApp@ documentation for how this function works.+-}+cvtOpAppT :: TH.Type -> TH.Name -> LHsType GhcPs -> CvtM (LHsType GhcPs)+cvtOpAppT (UInfixT x op2 y) op1 z+  = do { l <- cvtOpAppT y op1 z+       ; cvtOpAppT x op2 l }+cvtOpAppT x op y+  = do { op' <- tconNameL op+       ; x' <- cvtType x+       ; returnL (mkHsOpTy x' op' y) }++cvtKind :: TH.Kind -> CvtM (LHsKind GhcPs)+cvtKind = cvtTypeKind "kind"++-- | Convert Maybe Kind to a type family result signature. Used with data+-- families where naming of the result is not possible (thus only kind or no+-- signature is possible).+cvtMaybeKindToFamilyResultSig :: Maybe TH.Kind+                              -> CvtM (LFamilyResultSig GhcPs)+cvtMaybeKindToFamilyResultSig Nothing   = returnL (Hs.NoSig noExtField)+cvtMaybeKindToFamilyResultSig (Just ki) = do { ki' <- cvtKind ki+                                             ; returnL (Hs.KindSig noExtField ki') }++-- | Convert type family result signature. Used with both open and closed type+-- families.+cvtFamilyResultSig :: TH.FamilyResultSig -> CvtM (Hs.LFamilyResultSig GhcPs)+cvtFamilyResultSig TH.NoSig           = returnL (Hs.NoSig noExtField)+cvtFamilyResultSig (TH.KindSig ki)    = do { ki' <- cvtKind ki+                                           ; returnL (Hs.KindSig noExtField  ki') }+cvtFamilyResultSig (TH.TyVarSig bndr) = do { tv <- cvt_tv bndr+                                           ; returnL (Hs.TyVarSig noExtField tv) }++-- | Convert injectivity annotation of a type family.+cvtInjectivityAnnotation :: TH.InjectivityAnn+                         -> CvtM (Hs.LInjectivityAnn GhcPs)+cvtInjectivityAnnotation (TH.InjectivityAnn annLHS annRHS)+  = do { annLHS' <- tNameL annLHS+       ; annRHS' <- mapM tNameL annRHS+       ; returnL (Hs.InjectivityAnn annLHS' annRHS') }++cvtPatSynSigTy :: TH.Type -> CvtM (LHsType GhcPs)+-- pattern synonym types are of peculiar shapes, which is why we treat+-- them separately from regular types;+-- see Note [Pattern synonym type signatures and Template Haskell]+cvtPatSynSigTy (ForallT univs reqs (ForallT exis provs ty))+  | null exis, null provs = cvtType (ForallT univs reqs ty)+  | null univs, null reqs = do { l   <- getL+                               ; ty' <- cvtType (ForallT exis provs ty)+                               ; return $ cL l (HsQualTy { hst_ctxt = cL l []+                                                         , hst_xqual = noExtField+                                                         , hst_body = ty' }) }+  | null reqs             = do { l      <- getL+                               ; univs' <- hsQTvExplicit <$> cvtTvs univs+                               ; ty'    <- cvtType (ForallT exis provs ty)+                               ; let forTy = HsForAllTy+                                              { hst_fvf = ForallInvis+                                              , hst_bndrs = univs'+                                              , hst_xforall = noExtField+                                              , hst_body = cL l cxtTy }+                                     cxtTy = HsQualTy { hst_ctxt = cL l []+                                                      , hst_xqual = noExtField+                                                      , hst_body = ty' }+                               ; return $ cL l forTy }+  | otherwise             = cvtType (ForallT univs reqs (ForallT exis provs ty))+cvtPatSynSigTy ty         = cvtType ty++-----------------------------------------------------------+cvtFixity :: TH.Fixity -> Hs.Fixity+cvtFixity (TH.Fixity prec dir) = Hs.Fixity NoSourceText prec (cvt_dir dir)+   where+     cvt_dir TH.InfixL = Hs.InfixL+     cvt_dir TH.InfixR = Hs.InfixR+     cvt_dir TH.InfixN = Hs.InfixN++-----------------------------------------------------------+++-----------------------------------------------------------+-- some useful things++overloadedLit :: Lit -> Bool+-- True for literals that Haskell treats as overloaded+overloadedLit (IntegerL  _) = True+overloadedLit (RationalL _) = True+overloadedLit _             = False++-- Checks that are performed when converting unboxed sum expressions and+-- patterns alike.+unboxedSumChecks :: TH.SumAlt -> TH.SumArity -> CvtM ()+unboxedSumChecks alt arity+    | alt > arity+    = failWith $ text "Sum alternative"    <+> text (show alt)+             <+> text "exceeds its arity," <+> text (show arity)+    | alt <= 0+    = failWith $ vcat [ text "Illegal sum alternative:" <+> text (show alt)+                      , nest 2 $ text "Sum alternatives must start from 1" ]+    | arity < 2+    = failWith $ vcat [ text "Illegal sum arity:" <+> text (show arity)+                      , nest 2 $ text "Sums must have an arity of at least 2" ]+    | otherwise+    = return ()++-- | If passed an empty list of 'TH.TyVarBndr's, this simply returns the+-- third argument (an 'LHsType'). Otherwise, return an 'HsForAllTy'+-- using the provided 'LHsQTyVars' and 'LHsType'.+mkHsForAllTy :: [TH.TyVarBndr]+             -- ^ The original Template Haskell type variable binders+             -> SrcSpan+             -- ^ The location of the returned 'LHsType' if it needs an+             --   explicit forall+             -> ForallVisFlag+             -- ^ Whether this is @forall@ is visible (e.g., @forall a ->@)+             --   or invisible (e.g., @forall a.@)+             -> LHsQTyVars GhcPs+             -- ^ The converted type variable binders+             -> LHsType GhcPs+             -- ^ The converted rho type+             -> LHsType GhcPs+             -- ^ The complete type, quantified with a forall if necessary+mkHsForAllTy tvs loc fvf tvs' rho_ty+  | null tvs  = rho_ty+  | otherwise = cL loc $ HsForAllTy { hst_fvf = fvf+                                    , hst_bndrs = hsQTvExplicit tvs'+                                    , hst_xforall = noExtField+                                    , hst_body = rho_ty }++-- | If passed an empty 'TH.Cxt', this simply returns the third argument+-- (an 'LHsType'). Otherwise, return an 'HsQualTy' using the provided+-- 'LHsContext' and 'LHsType'.++-- It's important that we don't build an HsQualTy if the context is empty,+-- as the pretty-printer for HsType _always_ prints contexts, even if+-- they're empty. See #13183.+mkHsQualTy :: TH.Cxt+           -- ^ The original Template Haskell context+           -> SrcSpan+           -- ^ The location of the returned 'LHsType' if it needs an+           --   explicit context+           -> LHsContext GhcPs+           -- ^ The converted context+           -> LHsType GhcPs+           -- ^ The converted tau type+           -> LHsType GhcPs+           -- ^ The complete type, qualified with a context if necessary+mkHsQualTy ctxt loc ctxt' ty+  | null ctxt = ty+  | otherwise = cL loc $ HsQualTy { hst_xqual = noExtField+                                  , hst_ctxt  = ctxt'+                                  , hst_body  = ty }++--------------------------------------------------------------------+--      Turning Name back into RdrName+--------------------------------------------------------------------++-- variable names+vNameL, cNameL, vcNameL, tNameL, tconNameL :: TH.Name -> CvtM (Located RdrName)+vName,  cName,  vcName,  tName,  tconName  :: TH.Name -> CvtM RdrName++-- Variable names+vNameL n = wrapL (vName n)+vName n = cvtName OccName.varName n++-- Constructor function names; this is Haskell source, hence srcDataName+cNameL n = wrapL (cName n)+cName n = cvtName OccName.dataName n++-- Variable *or* constructor names; check by looking at the first char+vcNameL n = wrapL (vcName n)+vcName n = if isVarName n then vName n else cName n++-- Type variable names+tNameL n = wrapL (tName n)+tName n = cvtName OccName.tvName n++-- Type Constructor names+tconNameL n = wrapL (tconName n)+tconName n = cvtName OccName.tcClsName n++ipName :: String -> CvtM HsIPName+ipName n+  = do { unless (okVarOcc n) (failWith (badOcc OccName.varName n))+       ; return (HsIPName (fsLit n)) }++cvtName :: OccName.NameSpace -> TH.Name -> CvtM RdrName+cvtName ctxt_ns (TH.Name occ flavour)+  | not (okOcc ctxt_ns occ_str) = failWith (badOcc ctxt_ns occ_str)+  | otherwise+  = do { loc <- getL+       ; let rdr_name = thRdrName loc ctxt_ns occ_str flavour+       ; force rdr_name+       ; return rdr_name }+  where+    occ_str = TH.occString occ++okOcc :: OccName.NameSpace -> String -> Bool+okOcc ns str+  | OccName.isVarNameSpace ns     = okVarOcc str+  | OccName.isDataConNameSpace ns = okConOcc str+  | otherwise                     = okTcOcc  str++-- Determine the name space of a name in a type+--+isVarName :: TH.Name -> Bool+isVarName (TH.Name occ _)+  = case TH.occString occ of+      ""    -> False+      (c:_) -> startsVarId c || startsVarSym c++badOcc :: OccName.NameSpace -> String -> SDoc+badOcc ctxt_ns occ+  = text "Illegal" <+> pprNameSpace ctxt_ns+        <+> text "name:" <+> quotes (text occ)++thRdrName :: SrcSpan -> OccName.NameSpace -> String -> TH.NameFlavour -> RdrName+-- This turns a TH Name into a RdrName; used for both binders and occurrences+-- See Note [Binders in Template Haskell]+-- The passed-in name space tells what the context is expecting;+--      use it unless the TH name knows what name-space it comes+--      from, in which case use the latter+--+-- We pass in a SrcSpan (gotten from the monad) because this function+-- is used for *binders* and if we make an Exact Name we want it+-- to have a binding site inside it.  (cf #5434)+--+-- ToDo: we may generate silly RdrNames, by passing a name space+--       that doesn't match the string, like VarName ":+",+--       which will give confusing error messages later+--+-- The strict applications ensure that any buried exceptions get forced+thRdrName loc ctxt_ns th_occ th_name+  = case th_name of+     TH.NameG th_ns pkg mod -> thOrigRdrName th_occ th_ns pkg mod+     TH.NameQ mod  -> (mkRdrQual  $! mk_mod mod) $! occ+     TH.NameL uniq -> nameRdrName $! (((Name.mkInternalName $! mk_uniq (fromInteger uniq)) $! occ) loc)+     TH.NameU uniq -> nameRdrName $! (((Name.mkSystemNameAt $! mk_uniq (fromInteger uniq)) $! occ) loc)+     TH.NameS | Just name <- isBuiltInOcc_maybe occ -> nameRdrName $! name+              | otherwise                           -> mkRdrUnqual $! occ+              -- We check for built-in syntax here, because the TH+              -- user might have written a (NameS "(,,)"), for example+  where+    occ :: OccName.OccName+    occ = mk_occ ctxt_ns th_occ++-- Return an unqualified exact RdrName if we're dealing with built-in syntax.+-- See #13776.+thOrigRdrName :: String -> TH.NameSpace -> PkgName -> ModName -> RdrName+thOrigRdrName occ th_ns pkg mod =+  let occ' = mk_occ (mk_ghc_ns th_ns) occ+  in case isBuiltInOcc_maybe occ' of+       Just name -> nameRdrName name+       Nothing   -> (mkOrig $! (mkModule (mk_pkg pkg) (mk_mod mod))) $! occ'++thRdrNameGuesses :: TH.Name -> [RdrName]+thRdrNameGuesses (TH.Name occ flavour)+  -- This special case for NameG ensures that we don't generate duplicates in the output list+  | TH.NameG th_ns pkg mod <- flavour = [ thOrigRdrName occ_str th_ns pkg mod]+  | otherwise                         = [ thRdrName noSrcSpan gns occ_str flavour+                                        | gns <- guessed_nss]+  where+    -- guessed_ns are the name spaces guessed from looking at the TH name+    guessed_nss+      | isLexCon (mkFastString occ_str) = [OccName.tcName,  OccName.dataName]+      | otherwise                       = [OccName.varName, OccName.tvName]+    occ_str = TH.occString occ++-- The packing and unpacking is rather turgid :-(+mk_occ :: OccName.NameSpace -> String -> OccName.OccName+mk_occ ns occ = OccName.mkOccName ns occ++mk_ghc_ns :: TH.NameSpace -> OccName.NameSpace+mk_ghc_ns TH.DataName  = OccName.dataName+mk_ghc_ns TH.TcClsName = OccName.tcClsName+mk_ghc_ns TH.VarName   = OccName.varName++mk_mod :: TH.ModName -> ModuleName+mk_mod mod = mkModuleName (TH.modString mod)++mk_pkg :: TH.PkgName -> UnitId+mk_pkg pkg = stringToUnitId (TH.pkgString pkg)++mk_uniq :: Int -> Unique+mk_uniq u = mkUniqueGrimily u++{-+Note [Binders in Template Haskell]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this TH term construction:+  do { x1 <- TH.newName "x"   -- newName :: String -> Q TH.Name+     ; x2 <- TH.newName "x"   -- Builds a NameU+     ; x3 <- TH.newName "x"++     ; let x = mkName "x"     -- mkName :: String -> TH.Name+                              -- Builds a NameS++     ; return (LamE (..pattern [x1,x2]..) $+               LamE (VarPat x3) $+               ..tuple (x1,x2,x3,x)) }++It represents the term   \[x1,x2]. \x3. (x1,x2,x3,x)++a) We don't want to complain about "x" being bound twice in+   the pattern [x1,x2]+b) We don't want x3 to shadow the x1,x2+c) We *do* want 'x' (dynamically bound with mkName) to bind+   to the innermost binding of "x", namely x3.+d) When pretty printing, we want to print a unique with x1,x2+   etc, else they'll all print as "x" which isn't very helpful++When we convert all this to HsSyn, the TH.Names are converted with+thRdrName.  To achieve (b) we want the binders to be Exact RdrNames.+Achieving (a) is a bit awkward, because+   - We must check for duplicate and shadowed names on Names,+     not RdrNames, *after* renaming.+     See Note [Collect binders only after renaming] in GHC.Hs.Utils++   - But to achieve (a) we must distinguish between the Exact+     RdrNames arising from TH and the Unqual RdrNames that would+     come from a user writing \[x,x] -> blah++So in Convert.thRdrName we translate+   TH Name                          RdrName+   --------------------------------------------------------+   NameU (arising from newName) --> Exact (Name{ System })+   NameS (arising from mkName)  --> Unqual++Notice that the NameUs generate *System* Names.  Then, when+figuring out shadowing and duplicates, we can filter out+System Names.++This use of System Names fits with other uses of System Names, eg for+temporary variables "a". Since there are lots of things called "a" we+usually want to print the name with the unique, and that is indeed+the way System Names are printed.++There's a small complication of course; see Note [Looking up Exact+RdrNames] in RnEnv.+-}++{-+Note [Pattern synonym type signatures and Template Haskell]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++In general, the type signature of a pattern synonym++  pattern P x1 x2 .. xn = <some-pattern>++is of the form++   forall univs. reqs => forall exis. provs => t1 -> t2 -> ... -> tn -> t++with the following parts:++   1) the (possibly empty lists of) universally quantified type+      variables `univs` and required constraints `reqs` on them.+   2) the (possibly empty lists of) existentially quantified type+      variables `exis` and the provided constraints `provs` on them.+   3) the types `t1`, `t2`, .., `tn` of the pattern synonym's arguments x1,+      x2, .., xn, respectively+   4) the type `t` of <some-pattern>, mentioning only universals from `univs`.++Due to the two forall quantifiers and constraint contexts (either of+which might be empty), pattern synonym type signatures are treated+specially in `deSugar/DsMeta.hs`, `hsSyn/Convert.hs`, and+`typecheck/TcSplice.hs`:++   (a) When desugaring a pattern synonym from HsSyn to TH.Dec in+       `deSugar/DsMeta.hs`, we represent its *full* type signature in TH, i.e.:++           ForallT univs reqs (ForallT exis provs ty)+              (where ty is the AST representation of t1 -> t2 -> ... -> tn -> t)++   (b) When converting pattern synonyms from TH.Dec to HsSyn in+       `hsSyn/Convert.hs`, we convert their TH type signatures back to an+       appropriate Haskell pattern synonym type of the form++         forall univs. reqs => forall exis. provs => t1 -> t2 -> ... -> tn -> t++       where initial empty `univs` type variables or an empty `reqs`+       constraint context are represented *explicitly* as `() =>`.++   (c) When reifying a pattern synonym in `typecheck/TcSplice.hs`, we always+       return its *full* type, i.e.:++           ForallT univs reqs (ForallT exis provs ty)+              (where ty is the AST representation of t1 -> t2 -> ... -> tn -> t)++The key point is to always represent a pattern synonym's *full* type+in cases (a) and (c) to make it clear which of the two forall+quantifiers and/or constraint contexts are specified, and which are+not. See GHC's user's guide on pattern synonyms for more information+about pattern synonym type signatures.++-}
HsVersions.h view
@@ -1,5 +1,8 @@ #pragma once +-- For GHC_STAGE+#include "ghcplatform.h"+ #if 0  IMPORTANT!  If you put extra tabs/spaces in these macro definitions,@@ -8,18 +11,6 @@ (This is cpp-dependent, of course)  #endif--/* Useful in the headers that we share with the RTS */-#define COMPILING_GHC 1--/* Pull in all the platform defines for this build (foo_TARGET_ARCH etc.) */-#include "ghc_boot_platform.h"--/* Pull in the autoconf defines (HAVE_FOO), but don't include- * ghcconfig.h, because that will include ghcplatform.h which has the- * wrong platform settings for the compiler (it has the platform- * settings for the target plat instead). */-#include "ghcautoconf.h"  #define GLOBAL_VAR(name,value,ty)  \ {-# NOINLINE name #-};             \
autogen/CodeGen.Platform.hs view
@@ -6,7 +6,6 @@ #endif import Reg -#include "ghcautoconf.h" #include "stg/MachRegs.h"  #if defined(MACHREGS_i386) || defined(MACHREGS_x86_64)@@ -41,65 +40,59 @@ #  define r15   15 # endif -# define fake0 16-# define fake1 17-# define fake2 18-# define fake3 19-# define fake4 20-# define fake5 21  -- N.B. XMM, YMM, and ZMM are all aliased to the same hardware registers hence -- being assigned the same RegNos.-# define xmm0  24-# define xmm1  25-# define xmm2  26-# define xmm3  27-# define xmm4  28-# define xmm5  29-# define xmm6  30-# define xmm7  31-# define xmm8  32-# define xmm9  33-# define xmm10 34-# define xmm11 35-# define xmm12 36-# define xmm13 37-# define xmm14 38-# define xmm15 39+# define xmm0  16+# define xmm1  17+# define xmm2  18+# define xmm3  19+# define xmm4  20+# define xmm5  21+# define xmm6  22+# define xmm7  23+# define xmm8  24+# define xmm9  25+# define xmm10 26+# define xmm11 27+# define xmm12 28+# define xmm13 29+# define xmm14 30+# define xmm15 31 -# define ymm0  24-# define ymm1  25-# define ymm2  26-# define ymm3  27-# define ymm4  28-# define ymm5  29-# define ymm6  30-# define ymm7  31-# define ymm8  32-# define ymm9  33-# define ymm10 34-# define ymm11 35-# define ymm12 36-# define ymm13 37-# define ymm14 38-# define ymm15 39+# define ymm0  16+# define ymm1  17+# define ymm2  18+# define ymm3  19+# define ymm4  20+# define ymm5  21+# define ymm6  22+# define ymm7  23+# define ymm8  24+# define ymm9  25+# define ymm10 26+# define ymm11 27+# define ymm12 28+# define ymm13 29+# define ymm14 30+# define ymm15 31 -# define zmm0  24-# define zmm1  25-# define zmm2  26-# define zmm3  27-# define zmm4  28-# define zmm5  29-# define zmm6  30-# define zmm7  31-# define zmm8  32-# define zmm9  33-# define zmm10 34-# define zmm11 35-# define zmm12 36-# define zmm13 37-# define zmm14 38-# define zmm15 39+# define zmm0  16+# define zmm1  17+# define zmm2  18+# define zmm3  19+# define zmm4  20+# define zmm5  21+# define zmm6  22+# define zmm7  23+# define zmm8  24+# define zmm9  25+# define zmm10 26+# define zmm11 27+# define zmm12 28+# define zmm13 29+# define zmm14 30+# define zmm15 31  -- Note: these are only needed for ARM/ARM64 because globalRegMaybe is now used in CmmSink.hs. -- Since it's only used to check 'isJust', the actual values don't matter, thus@@ -351,6 +344,42 @@ # define f30 62 # define f31 63 +#elif defined(MACHREGS_s390x)++# define r0   0+# define r1   1+# define r2   2+# define r3   3+# define r4   4+# define r5   5+# define r6   6+# define r7   7+# define r8   8+# define r9   9+# define r10 10+# define r11 11+# define r12 12+# define r13 13+# define r14 14+# define r15 15++# define f0  16+# define f1  17+# define f2  18+# define f3  19+# define f4  20+# define f5  21+# define f6  22+# define f7  23+# define f8  24+# define f9  25+# define f10 26+# define f11 27+# define f12 28+# define f13 29+# define f14 30+# define f15 31+ #endif  callerSaves :: GlobalReg -> Bool@@ -637,7 +666,8 @@ globalRegMaybe :: GlobalReg -> Maybe RealReg #if defined(MACHREGS_i386) || defined(MACHREGS_x86_64) \     || defined(MACHREGS_sparc) || defined(MACHREGS_powerpc) \-    || defined(MACHREGS_arm) || defined(MACHREGS_aarch64)+    || defined(MACHREGS_arm) || defined(MACHREGS_aarch64) \+    || defined(MACHREGS_s390x) # if defined(REG_Base) globalRegMaybe BaseReg                  = Just (RealRegSingle REG_Base) # endif@@ -904,78 +934,9 @@ # if defined(REG_Base) freeReg REG_Base  = False # endif-# if defined(REG_R1)-freeReg REG_R1    = False-# endif-# if defined(REG_R2)-freeReg REG_R2    = False-# endif-# if defined(REG_R3)-freeReg REG_R3    = False-# endif-# if defined(REG_R4)-freeReg REG_R4    = False-# endif-# if defined(REG_R5)-freeReg REG_R5    = False-# endif-# if defined(REG_R6)-freeReg REG_R6    = False-# endif-# if defined(REG_R7)-freeReg REG_R7    = False-# endif-# if defined(REG_R8)-freeReg REG_R8    = False-# endif-# if defined(REG_R9)-freeReg REG_R9    = False-# endif-# if defined(REG_R10)-freeReg REG_R10   = False-# endif-# if defined(REG_F1)-freeReg REG_F1    = False-# endif-# if defined(REG_F2)-freeReg REG_F2    = False-# endif-# if defined(REG_F3)-freeReg REG_F3    = False-# endif-# if defined(REG_F4)-freeReg REG_F4    = False-# endif-# if defined(REG_F5)-freeReg REG_F5    = False-# endif-# if defined(REG_F6)-freeReg REG_F6    = False-# endif-# if defined(REG_D1)-freeReg REG_D1    = False-# endif-# if defined(REG_D2)-freeReg REG_D2    = False-# endif-# if defined(REG_D3)-freeReg REG_D3    = False-# endif-# if defined(REG_D4)-freeReg REG_D4    = False-# endif-# if defined(REG_D5)-freeReg REG_D5    = False-# endif-# if defined(REG_D6)-freeReg REG_D6    = False-# endif # if defined(REG_Sp) freeReg REG_Sp    = False # endif-# if defined(REG_Su)-freeReg REG_Su    = False-# endif # if defined(REG_SpLim) freeReg REG_SpLim = False # endif@@ -1118,9 +1079,6 @@ # endif # if defined(REG_Sp) freeReg REG_Sp    = False-# endif-# if defined(REG_Su)-freeReg REG_Su    = False # endif # if defined(REG_SpLim) freeReg REG_SpLim = False
autogen/Config.hs view
@@ -1,64 +1,28 @@ {-# LANGUAGE CPP #-}-module Config where+module Config+  ( module GHC.Version+  , cBuildPlatformString+  , cHostPlatformString+  , cProjectName+  , cBooterVersion+  , cStage+  ) where  import GhcPrelude -#include "ghc_boot_platform.h"--data IntegerLibrary = IntegerGMP-                    | IntegerSimple-                    deriving Eq+import GHC.Version  cBuildPlatformString :: String-cBuildPlatformString = BuildPlatform_NAME+cBuildPlatformString = "x86_64-unknown-linux"+ cHostPlatformString :: String-cHostPlatformString = HostPlatform_NAME-cTargetPlatformString :: String-cTargetPlatformString = TargetPlatform_NAME+cHostPlatformString = "x86_64-unknown-linux"  cProjectName          :: String cProjectName          = "The Glorious Glasgow Haskell Compilation System"-cProjectGitCommitId   :: String-cProjectGitCommitId   = "d0bab2e3419e49cdbb1201d4650572b57f33420c"-cProjectVersion       :: String-cProjectVersion       = "8.8.3"-cProjectVersionInt    :: String-cProjectVersionInt    = "808"-cProjectPatchLevel    :: String-cProjectPatchLevel    = "3"-cProjectPatchLevel1   :: String-cProjectPatchLevel1   = "3"-cProjectPatchLevel2   :: String-cProjectPatchLevel2   = ""+ cBooterVersion        :: String-cBooterVersion        = "8.8.3"+cBooterVersion        = "8.10.1"+ cStage                :: String-cStage                = show (STAGE :: Int)-cIntegerLibraryType   :: IntegerLibrary-cIntegerLibraryType   = IntegerGMP-cSupportsSplitObjs    :: String-cSupportsSplitObjs    = "YES"-cGhcWithInterpreter   :: String-cGhcWithInterpreter   = "YES"-cGhcWithNativeCodeGen :: String-cGhcWithNativeCodeGen = "YES"-cGhcWithSMP           :: String-cGhcWithSMP           = "YES"-cGhcRTSWays           :: String-cGhcRTSWays           = "l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn thr_debug_p debug_p"-cGhcRtsWithLibdw      :: Bool-cGhcRtsWithLibdw      = False-cGhcEnableTablesNextToCode :: String-cGhcEnableTablesNextToCode = "YES"-cLeadingUnderscore    :: String-cLeadingUnderscore    = "NO"-cGHC_UNLIT_PGM        :: String-cGHC_UNLIT_PGM        = "unlit"-cGHC_SPLIT_PGM        :: String-cGHC_SPLIT_PGM        = "ghc-split"-cLibFFI               :: Bool-cLibFFI               = False-cGhcThreaded :: Bool-cGhcThreaded = True-cGhcDebugged :: Bool-cGhcDebugged = False+cStage                = show (2 :: Int)
autogen/GHCConstantsHaskellType.hs view
@@ -1,134 +1,133 @@ data PlatformConstants = PlatformConstants {-    pc_platformConstants :: ()-    , pc_CONTROL_GROUP_CONST_291 :: Int-    , pc_STD_HDR_SIZE :: Int-    , pc_PROF_HDR_SIZE :: Int-    , pc_BLOCK_SIZE :: Int-    , pc_BLOCKS_PER_MBLOCK :: Int-    , pc_TICKY_BIN_COUNT :: Int-    , pc_OFFSET_StgRegTable_rR1 :: Int-    , pc_OFFSET_StgRegTable_rR2 :: Int-    , pc_OFFSET_StgRegTable_rR3 :: Int-    , pc_OFFSET_StgRegTable_rR4 :: Int-    , pc_OFFSET_StgRegTable_rR5 :: Int-    , pc_OFFSET_StgRegTable_rR6 :: Int-    , pc_OFFSET_StgRegTable_rR7 :: Int-    , pc_OFFSET_StgRegTable_rR8 :: Int-    , pc_OFFSET_StgRegTable_rR9 :: Int-    , pc_OFFSET_StgRegTable_rR10 :: Int-    , pc_OFFSET_StgRegTable_rF1 :: Int-    , pc_OFFSET_StgRegTable_rF2 :: Int-    , pc_OFFSET_StgRegTable_rF3 :: Int-    , pc_OFFSET_StgRegTable_rF4 :: Int-    , pc_OFFSET_StgRegTable_rF5 :: Int-    , pc_OFFSET_StgRegTable_rF6 :: Int-    , pc_OFFSET_StgRegTable_rD1 :: Int-    , pc_OFFSET_StgRegTable_rD2 :: Int-    , pc_OFFSET_StgRegTable_rD3 :: Int-    , pc_OFFSET_StgRegTable_rD4 :: Int-    , pc_OFFSET_StgRegTable_rD5 :: Int-    , pc_OFFSET_StgRegTable_rD6 :: Int-    , pc_OFFSET_StgRegTable_rXMM1 :: Int-    , pc_OFFSET_StgRegTable_rXMM2 :: Int-    , pc_OFFSET_StgRegTable_rXMM3 :: Int-    , pc_OFFSET_StgRegTable_rXMM4 :: Int-    , pc_OFFSET_StgRegTable_rXMM5 :: Int-    , pc_OFFSET_StgRegTable_rXMM6 :: Int-    , pc_OFFSET_StgRegTable_rYMM1 :: Int-    , pc_OFFSET_StgRegTable_rYMM2 :: Int-    , pc_OFFSET_StgRegTable_rYMM3 :: Int-    , pc_OFFSET_StgRegTable_rYMM4 :: Int-    , pc_OFFSET_StgRegTable_rYMM5 :: Int-    , pc_OFFSET_StgRegTable_rYMM6 :: Int-    , pc_OFFSET_StgRegTable_rZMM1 :: Int-    , pc_OFFSET_StgRegTable_rZMM2 :: Int-    , pc_OFFSET_StgRegTable_rZMM3 :: Int-    , pc_OFFSET_StgRegTable_rZMM4 :: Int-    , pc_OFFSET_StgRegTable_rZMM5 :: Int-    , pc_OFFSET_StgRegTable_rZMM6 :: Int-    , pc_OFFSET_StgRegTable_rL1 :: Int-    , pc_OFFSET_StgRegTable_rSp :: Int-    , pc_OFFSET_StgRegTable_rSpLim :: Int-    , pc_OFFSET_StgRegTable_rHp :: Int-    , pc_OFFSET_StgRegTable_rHpLim :: Int-    , pc_OFFSET_StgRegTable_rCCCS :: Int-    , pc_OFFSET_StgRegTable_rCurrentTSO :: Int-    , pc_OFFSET_StgRegTable_rCurrentNursery :: Int-    , pc_OFFSET_StgRegTable_rHpAlloc :: Int-    , pc_OFFSET_stgEagerBlackholeInfo :: Int-    , pc_OFFSET_stgGCEnter1 :: Int-    , pc_OFFSET_stgGCFun :: Int-    , pc_OFFSET_Capability_r :: Int-    , pc_OFFSET_bdescr_start :: Int-    , pc_OFFSET_bdescr_free :: Int-    , pc_OFFSET_bdescr_blocks :: Int-    , pc_OFFSET_bdescr_flags :: Int-    , pc_SIZEOF_CostCentreStack :: Int-    , pc_OFFSET_CostCentreStack_mem_alloc :: Int-    , pc_REP_CostCentreStack_mem_alloc :: Int-    , pc_OFFSET_CostCentreStack_scc_count :: Int-    , pc_REP_CostCentreStack_scc_count :: Int-    , pc_OFFSET_StgHeader_ccs :: Int-    , pc_OFFSET_StgHeader_ldvw :: Int-    , pc_SIZEOF_StgSMPThunkHeader :: Int-    , pc_OFFSET_StgEntCounter_allocs :: Int-    , pc_REP_StgEntCounter_allocs :: Int-    , pc_OFFSET_StgEntCounter_allocd :: Int-    , pc_REP_StgEntCounter_allocd :: Int-    , pc_OFFSET_StgEntCounter_registeredp :: Int-    , pc_OFFSET_StgEntCounter_link :: Int-    , pc_OFFSET_StgEntCounter_entry_count :: Int-    , pc_SIZEOF_StgUpdateFrame_NoHdr :: Int-    , pc_SIZEOF_StgMutArrPtrs_NoHdr :: Int-    , pc_OFFSET_StgMutArrPtrs_ptrs :: Int-    , pc_OFFSET_StgMutArrPtrs_size :: Int-    , pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: Int-    , pc_OFFSET_StgSmallMutArrPtrs_ptrs :: Int-    , pc_SIZEOF_StgArrBytes_NoHdr :: Int-    , pc_OFFSET_StgArrBytes_bytes :: Int-    , pc_OFFSET_StgTSO_alloc_limit :: Int-    , pc_OFFSET_StgTSO_cccs :: Int-    , pc_OFFSET_StgTSO_stackobj :: Int-    , pc_OFFSET_StgStack_sp :: Int-    , pc_OFFSET_StgStack_stack :: Int-    , pc_OFFSET_StgUpdateFrame_updatee :: Int-    , pc_OFFSET_StgFunInfoExtraFwd_arity :: Int-    , pc_REP_StgFunInfoExtraFwd_arity :: Int-    , pc_SIZEOF_StgFunInfoExtraRev :: Int-    , pc_OFFSET_StgFunInfoExtraRev_arity :: Int-    , pc_REP_StgFunInfoExtraRev_arity :: Int-    , pc_MAX_SPEC_SELECTEE_SIZE :: Int-    , pc_MAX_SPEC_AP_SIZE :: Int-    , pc_MIN_PAYLOAD_SIZE :: Int-    , pc_MIN_INTLIKE :: Int-    , pc_MAX_INTLIKE :: Int-    , pc_MIN_CHARLIKE :: Int-    , pc_MAX_CHARLIKE :: Int-    , pc_MUT_ARR_PTRS_CARD_BITS :: Int-    , pc_MAX_Vanilla_REG :: Int-    , pc_MAX_Float_REG :: Int-    , pc_MAX_Double_REG :: Int-    , pc_MAX_Long_REG :: Int-    , pc_MAX_XMM_REG :: Int-    , pc_MAX_Real_Vanilla_REG :: Int-    , pc_MAX_Real_Float_REG :: Int-    , pc_MAX_Real_Double_REG :: Int-    , pc_MAX_Real_XMM_REG :: Int-    , pc_MAX_Real_Long_REG :: Int-    , pc_RESERVED_C_STACK_BYTES :: Int-    , pc_RESERVED_STACK_WORDS :: Int-    , pc_AP_STACK_SPLIM :: Int-    , pc_WORD_SIZE :: Int-    , pc_DOUBLE_SIZE :: Int-    , pc_CINT_SIZE :: Int-    , pc_CLONG_SIZE :: Int-    , pc_CLONG_LONG_SIZE :: Int-    , pc_BITMAP_BITS_SHIFT :: Int-    , pc_TAG_BITS :: Int-    , pc_WORDS_BIGENDIAN :: Bool-    , pc_DYNAMIC_BY_DEFAULT :: Bool-    , pc_LDV_SHIFT :: Int-    , pc_ILDV_CREATE_MASK :: Integer-    , pc_ILDV_STATE_CREATE :: Integer-    , pc_ILDV_STATE_USE :: Integer+      pc_CONTROL_GROUP_CONST_291 :: Int,+      pc_STD_HDR_SIZE :: Int,+      pc_PROF_HDR_SIZE :: Int,+      pc_BLOCK_SIZE :: Int,+      pc_BLOCKS_PER_MBLOCK :: Int,+      pc_TICKY_BIN_COUNT :: Int,+      pc_OFFSET_StgRegTable_rR1 :: Int,+      pc_OFFSET_StgRegTable_rR2 :: Int,+      pc_OFFSET_StgRegTable_rR3 :: Int,+      pc_OFFSET_StgRegTable_rR4 :: Int,+      pc_OFFSET_StgRegTable_rR5 :: Int,+      pc_OFFSET_StgRegTable_rR6 :: Int,+      pc_OFFSET_StgRegTable_rR7 :: Int,+      pc_OFFSET_StgRegTable_rR8 :: Int,+      pc_OFFSET_StgRegTable_rR9 :: Int,+      pc_OFFSET_StgRegTable_rR10 :: Int,+      pc_OFFSET_StgRegTable_rF1 :: Int,+      pc_OFFSET_StgRegTable_rF2 :: Int,+      pc_OFFSET_StgRegTable_rF3 :: Int,+      pc_OFFSET_StgRegTable_rF4 :: Int,+      pc_OFFSET_StgRegTable_rF5 :: Int,+      pc_OFFSET_StgRegTable_rF6 :: Int,+      pc_OFFSET_StgRegTable_rD1 :: Int,+      pc_OFFSET_StgRegTable_rD2 :: Int,+      pc_OFFSET_StgRegTable_rD3 :: Int,+      pc_OFFSET_StgRegTable_rD4 :: Int,+      pc_OFFSET_StgRegTable_rD5 :: Int,+      pc_OFFSET_StgRegTable_rD6 :: Int,+      pc_OFFSET_StgRegTable_rXMM1 :: Int,+      pc_OFFSET_StgRegTable_rXMM2 :: Int,+      pc_OFFSET_StgRegTable_rXMM3 :: Int,+      pc_OFFSET_StgRegTable_rXMM4 :: Int,+      pc_OFFSET_StgRegTable_rXMM5 :: Int,+      pc_OFFSET_StgRegTable_rXMM6 :: Int,+      pc_OFFSET_StgRegTable_rYMM1 :: Int,+      pc_OFFSET_StgRegTable_rYMM2 :: Int,+      pc_OFFSET_StgRegTable_rYMM3 :: Int,+      pc_OFFSET_StgRegTable_rYMM4 :: Int,+      pc_OFFSET_StgRegTable_rYMM5 :: Int,+      pc_OFFSET_StgRegTable_rYMM6 :: Int,+      pc_OFFSET_StgRegTable_rZMM1 :: Int,+      pc_OFFSET_StgRegTable_rZMM2 :: Int,+      pc_OFFSET_StgRegTable_rZMM3 :: Int,+      pc_OFFSET_StgRegTable_rZMM4 :: Int,+      pc_OFFSET_StgRegTable_rZMM5 :: Int,+      pc_OFFSET_StgRegTable_rZMM6 :: Int,+      pc_OFFSET_StgRegTable_rL1 :: Int,+      pc_OFFSET_StgRegTable_rSp :: Int,+      pc_OFFSET_StgRegTable_rSpLim :: Int,+      pc_OFFSET_StgRegTable_rHp :: Int,+      pc_OFFSET_StgRegTable_rHpLim :: Int,+      pc_OFFSET_StgRegTable_rCCCS :: Int,+      pc_OFFSET_StgRegTable_rCurrentTSO :: Int,+      pc_OFFSET_StgRegTable_rCurrentNursery :: Int,+      pc_OFFSET_StgRegTable_rHpAlloc :: Int,+      pc_OFFSET_stgEagerBlackholeInfo :: Int,+      pc_OFFSET_stgGCEnter1 :: Int,+      pc_OFFSET_stgGCFun :: Int,+      pc_OFFSET_Capability_r :: Int,+      pc_OFFSET_bdescr_start :: Int,+      pc_OFFSET_bdescr_free :: Int,+      pc_OFFSET_bdescr_blocks :: Int,+      pc_OFFSET_bdescr_flags :: Int,+      pc_SIZEOF_CostCentreStack :: Int,+      pc_OFFSET_CostCentreStack_mem_alloc :: Int,+      pc_REP_CostCentreStack_mem_alloc :: Int,+      pc_OFFSET_CostCentreStack_scc_count :: Int,+      pc_REP_CostCentreStack_scc_count :: Int,+      pc_OFFSET_StgHeader_ccs :: Int,+      pc_OFFSET_StgHeader_ldvw :: Int,+      pc_SIZEOF_StgSMPThunkHeader :: Int,+      pc_OFFSET_StgEntCounter_allocs :: Int,+      pc_REP_StgEntCounter_allocs :: Int,+      pc_OFFSET_StgEntCounter_allocd :: Int,+      pc_REP_StgEntCounter_allocd :: Int,+      pc_OFFSET_StgEntCounter_registeredp :: Int,+      pc_OFFSET_StgEntCounter_link :: Int,+      pc_OFFSET_StgEntCounter_entry_count :: Int,+      pc_SIZEOF_StgUpdateFrame_NoHdr :: Int,+      pc_SIZEOF_StgMutArrPtrs_NoHdr :: Int,+      pc_OFFSET_StgMutArrPtrs_ptrs :: Int,+      pc_OFFSET_StgMutArrPtrs_size :: Int,+      pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: Int,+      pc_OFFSET_StgSmallMutArrPtrs_ptrs :: Int,+      pc_SIZEOF_StgArrBytes_NoHdr :: Int,+      pc_OFFSET_StgArrBytes_bytes :: Int,+      pc_OFFSET_StgTSO_alloc_limit :: Int,+      pc_OFFSET_StgTSO_cccs :: Int,+      pc_OFFSET_StgTSO_stackobj :: Int,+      pc_OFFSET_StgStack_sp :: Int,+      pc_OFFSET_StgStack_stack :: Int,+      pc_OFFSET_StgUpdateFrame_updatee :: Int,+      pc_OFFSET_StgFunInfoExtraFwd_arity :: Int,+      pc_REP_StgFunInfoExtraFwd_arity :: Int,+      pc_SIZEOF_StgFunInfoExtraRev :: Int,+      pc_OFFSET_StgFunInfoExtraRev_arity :: Int,+      pc_REP_StgFunInfoExtraRev_arity :: Int,+      pc_MAX_SPEC_SELECTEE_SIZE :: Int,+      pc_MAX_SPEC_AP_SIZE :: Int,+      pc_MIN_PAYLOAD_SIZE :: Int,+      pc_MIN_INTLIKE :: Int,+      pc_MAX_INTLIKE :: Int,+      pc_MIN_CHARLIKE :: Int,+      pc_MAX_CHARLIKE :: Int,+      pc_MUT_ARR_PTRS_CARD_BITS :: Int,+      pc_MAX_Vanilla_REG :: Int,+      pc_MAX_Float_REG :: Int,+      pc_MAX_Double_REG :: Int,+      pc_MAX_Long_REG :: Int,+      pc_MAX_XMM_REG :: Int,+      pc_MAX_Real_Vanilla_REG :: Int,+      pc_MAX_Real_Float_REG :: Int,+      pc_MAX_Real_Double_REG :: Int,+      pc_MAX_Real_XMM_REG :: Int,+      pc_MAX_Real_Long_REG :: Int,+      pc_RESERVED_C_STACK_BYTES :: Int,+      pc_RESERVED_STACK_WORDS :: Int,+      pc_AP_STACK_SPLIM :: Int,+      pc_WORD_SIZE :: Int,+      pc_DOUBLE_SIZE :: Int,+      pc_CINT_SIZE :: Int,+      pc_CLONG_SIZE :: Int,+      pc_CLONG_LONG_SIZE :: Int,+      pc_BITMAP_BITS_SHIFT :: Int,+      pc_TAG_BITS :: Int,+      pc_WORDS_BIGENDIAN :: Bool,+      pc_DYNAMIC_BY_DEFAULT :: Bool,+      pc_LDV_SHIFT :: Int,+      pc_ILDV_CREATE_MASK :: Integer,+      pc_ILDV_STATE_CREATE :: Integer,+      pc_ILDV_STATE_USE :: Integer   } deriving Read
autogen/GHCConstantsHaskellWrappers.hs view
@@ -1,250 +1,250 @@ cONTROL_GROUP_CONST_291 :: DynFlags -> Int-cONTROL_GROUP_CONST_291 dflags = pc_CONTROL_GROUP_CONST_291 (sPlatformConstants (settings dflags))+cONTROL_GROUP_CONST_291 dflags = pc_CONTROL_GROUP_CONST_291 (platformConstants dflags) sTD_HDR_SIZE :: DynFlags -> Int-sTD_HDR_SIZE dflags = pc_STD_HDR_SIZE (sPlatformConstants (settings dflags))+sTD_HDR_SIZE dflags = pc_STD_HDR_SIZE (platformConstants dflags) pROF_HDR_SIZE :: DynFlags -> Int-pROF_HDR_SIZE dflags = pc_PROF_HDR_SIZE (sPlatformConstants (settings dflags))+pROF_HDR_SIZE dflags = pc_PROF_HDR_SIZE (platformConstants dflags) bLOCK_SIZE :: DynFlags -> Int-bLOCK_SIZE dflags = pc_BLOCK_SIZE (sPlatformConstants (settings dflags))+bLOCK_SIZE dflags = pc_BLOCK_SIZE (platformConstants dflags) bLOCKS_PER_MBLOCK :: DynFlags -> Int-bLOCKS_PER_MBLOCK dflags = pc_BLOCKS_PER_MBLOCK (sPlatformConstants (settings dflags))+bLOCKS_PER_MBLOCK dflags = pc_BLOCKS_PER_MBLOCK (platformConstants dflags) tICKY_BIN_COUNT :: DynFlags -> Int-tICKY_BIN_COUNT dflags = pc_TICKY_BIN_COUNT (sPlatformConstants (settings dflags))+tICKY_BIN_COUNT dflags = pc_TICKY_BIN_COUNT (platformConstants dflags) oFFSET_StgRegTable_rR1 :: DynFlags -> Int-oFFSET_StgRegTable_rR1 dflags = pc_OFFSET_StgRegTable_rR1 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR1 dflags = pc_OFFSET_StgRegTable_rR1 (platformConstants dflags) oFFSET_StgRegTable_rR2 :: DynFlags -> Int-oFFSET_StgRegTable_rR2 dflags = pc_OFFSET_StgRegTable_rR2 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR2 dflags = pc_OFFSET_StgRegTable_rR2 (platformConstants dflags) oFFSET_StgRegTable_rR3 :: DynFlags -> Int-oFFSET_StgRegTable_rR3 dflags = pc_OFFSET_StgRegTable_rR3 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR3 dflags = pc_OFFSET_StgRegTable_rR3 (platformConstants dflags) oFFSET_StgRegTable_rR4 :: DynFlags -> Int-oFFSET_StgRegTable_rR4 dflags = pc_OFFSET_StgRegTable_rR4 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR4 dflags = pc_OFFSET_StgRegTable_rR4 (platformConstants dflags) oFFSET_StgRegTable_rR5 :: DynFlags -> Int-oFFSET_StgRegTable_rR5 dflags = pc_OFFSET_StgRegTable_rR5 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR5 dflags = pc_OFFSET_StgRegTable_rR5 (platformConstants dflags) oFFSET_StgRegTable_rR6 :: DynFlags -> Int-oFFSET_StgRegTable_rR6 dflags = pc_OFFSET_StgRegTable_rR6 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR6 dflags = pc_OFFSET_StgRegTable_rR6 (platformConstants dflags) oFFSET_StgRegTable_rR7 :: DynFlags -> Int-oFFSET_StgRegTable_rR7 dflags = pc_OFFSET_StgRegTable_rR7 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR7 dflags = pc_OFFSET_StgRegTable_rR7 (platformConstants dflags) oFFSET_StgRegTable_rR8 :: DynFlags -> Int-oFFSET_StgRegTable_rR8 dflags = pc_OFFSET_StgRegTable_rR8 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR8 dflags = pc_OFFSET_StgRegTable_rR8 (platformConstants dflags) oFFSET_StgRegTable_rR9 :: DynFlags -> Int-oFFSET_StgRegTable_rR9 dflags = pc_OFFSET_StgRegTable_rR9 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR9 dflags = pc_OFFSET_StgRegTable_rR9 (platformConstants dflags) oFFSET_StgRegTable_rR10 :: DynFlags -> Int-oFFSET_StgRegTable_rR10 dflags = pc_OFFSET_StgRegTable_rR10 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rR10 dflags = pc_OFFSET_StgRegTable_rR10 (platformConstants dflags) oFFSET_StgRegTable_rF1 :: DynFlags -> Int-oFFSET_StgRegTable_rF1 dflags = pc_OFFSET_StgRegTable_rF1 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rF1 dflags = pc_OFFSET_StgRegTable_rF1 (platformConstants dflags) oFFSET_StgRegTable_rF2 :: DynFlags -> Int-oFFSET_StgRegTable_rF2 dflags = pc_OFFSET_StgRegTable_rF2 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rF2 dflags = pc_OFFSET_StgRegTable_rF2 (platformConstants dflags) oFFSET_StgRegTable_rF3 :: DynFlags -> Int-oFFSET_StgRegTable_rF3 dflags = pc_OFFSET_StgRegTable_rF3 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rF3 dflags = pc_OFFSET_StgRegTable_rF3 (platformConstants dflags) oFFSET_StgRegTable_rF4 :: DynFlags -> Int-oFFSET_StgRegTable_rF4 dflags = pc_OFFSET_StgRegTable_rF4 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rF4 dflags = pc_OFFSET_StgRegTable_rF4 (platformConstants dflags) oFFSET_StgRegTable_rF5 :: DynFlags -> Int-oFFSET_StgRegTable_rF5 dflags = pc_OFFSET_StgRegTable_rF5 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rF5 dflags = pc_OFFSET_StgRegTable_rF5 (platformConstants dflags) oFFSET_StgRegTable_rF6 :: DynFlags -> Int-oFFSET_StgRegTable_rF6 dflags = pc_OFFSET_StgRegTable_rF6 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rF6 dflags = pc_OFFSET_StgRegTable_rF6 (platformConstants dflags) oFFSET_StgRegTable_rD1 :: DynFlags -> Int-oFFSET_StgRegTable_rD1 dflags = pc_OFFSET_StgRegTable_rD1 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rD1 dflags = pc_OFFSET_StgRegTable_rD1 (platformConstants dflags) oFFSET_StgRegTable_rD2 :: DynFlags -> Int-oFFSET_StgRegTable_rD2 dflags = pc_OFFSET_StgRegTable_rD2 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rD2 dflags = pc_OFFSET_StgRegTable_rD2 (platformConstants dflags) oFFSET_StgRegTable_rD3 :: DynFlags -> Int-oFFSET_StgRegTable_rD3 dflags = pc_OFFSET_StgRegTable_rD3 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rD3 dflags = pc_OFFSET_StgRegTable_rD3 (platformConstants dflags) oFFSET_StgRegTable_rD4 :: DynFlags -> Int-oFFSET_StgRegTable_rD4 dflags = pc_OFFSET_StgRegTable_rD4 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rD4 dflags = pc_OFFSET_StgRegTable_rD4 (platformConstants dflags) oFFSET_StgRegTable_rD5 :: DynFlags -> Int-oFFSET_StgRegTable_rD5 dflags = pc_OFFSET_StgRegTable_rD5 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rD5 dflags = pc_OFFSET_StgRegTable_rD5 (platformConstants dflags) oFFSET_StgRegTable_rD6 :: DynFlags -> Int-oFFSET_StgRegTable_rD6 dflags = pc_OFFSET_StgRegTable_rD6 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rD6 dflags = pc_OFFSET_StgRegTable_rD6 (platformConstants dflags) oFFSET_StgRegTable_rXMM1 :: DynFlags -> Int-oFFSET_StgRegTable_rXMM1 dflags = pc_OFFSET_StgRegTable_rXMM1 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rXMM1 dflags = pc_OFFSET_StgRegTable_rXMM1 (platformConstants dflags) oFFSET_StgRegTable_rXMM2 :: DynFlags -> Int-oFFSET_StgRegTable_rXMM2 dflags = pc_OFFSET_StgRegTable_rXMM2 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rXMM2 dflags = pc_OFFSET_StgRegTable_rXMM2 (platformConstants dflags) oFFSET_StgRegTable_rXMM3 :: DynFlags -> Int-oFFSET_StgRegTable_rXMM3 dflags = pc_OFFSET_StgRegTable_rXMM3 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rXMM3 dflags = pc_OFFSET_StgRegTable_rXMM3 (platformConstants dflags) oFFSET_StgRegTable_rXMM4 :: DynFlags -> Int-oFFSET_StgRegTable_rXMM4 dflags = pc_OFFSET_StgRegTable_rXMM4 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rXMM4 dflags = pc_OFFSET_StgRegTable_rXMM4 (platformConstants dflags) oFFSET_StgRegTable_rXMM5 :: DynFlags -> Int-oFFSET_StgRegTable_rXMM5 dflags = pc_OFFSET_StgRegTable_rXMM5 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rXMM5 dflags = pc_OFFSET_StgRegTable_rXMM5 (platformConstants dflags) oFFSET_StgRegTable_rXMM6 :: DynFlags -> Int-oFFSET_StgRegTable_rXMM6 dflags = pc_OFFSET_StgRegTable_rXMM6 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rXMM6 dflags = pc_OFFSET_StgRegTable_rXMM6 (platformConstants dflags) oFFSET_StgRegTable_rYMM1 :: DynFlags -> Int-oFFSET_StgRegTable_rYMM1 dflags = pc_OFFSET_StgRegTable_rYMM1 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rYMM1 dflags = pc_OFFSET_StgRegTable_rYMM1 (platformConstants dflags) oFFSET_StgRegTable_rYMM2 :: DynFlags -> Int-oFFSET_StgRegTable_rYMM2 dflags = pc_OFFSET_StgRegTable_rYMM2 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rYMM2 dflags = pc_OFFSET_StgRegTable_rYMM2 (platformConstants dflags) oFFSET_StgRegTable_rYMM3 :: DynFlags -> Int-oFFSET_StgRegTable_rYMM3 dflags = pc_OFFSET_StgRegTable_rYMM3 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rYMM3 dflags = pc_OFFSET_StgRegTable_rYMM3 (platformConstants dflags) oFFSET_StgRegTable_rYMM4 :: DynFlags -> Int-oFFSET_StgRegTable_rYMM4 dflags = pc_OFFSET_StgRegTable_rYMM4 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rYMM4 dflags = pc_OFFSET_StgRegTable_rYMM4 (platformConstants dflags) oFFSET_StgRegTable_rYMM5 :: DynFlags -> Int-oFFSET_StgRegTable_rYMM5 dflags = pc_OFFSET_StgRegTable_rYMM5 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rYMM5 dflags = pc_OFFSET_StgRegTable_rYMM5 (platformConstants dflags) oFFSET_StgRegTable_rYMM6 :: DynFlags -> Int-oFFSET_StgRegTable_rYMM6 dflags = pc_OFFSET_StgRegTable_rYMM6 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rYMM6 dflags = pc_OFFSET_StgRegTable_rYMM6 (platformConstants dflags) oFFSET_StgRegTable_rZMM1 :: DynFlags -> Int-oFFSET_StgRegTable_rZMM1 dflags = pc_OFFSET_StgRegTable_rZMM1 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rZMM1 dflags = pc_OFFSET_StgRegTable_rZMM1 (platformConstants dflags) oFFSET_StgRegTable_rZMM2 :: DynFlags -> Int-oFFSET_StgRegTable_rZMM2 dflags = pc_OFFSET_StgRegTable_rZMM2 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rZMM2 dflags = pc_OFFSET_StgRegTable_rZMM2 (platformConstants dflags) oFFSET_StgRegTable_rZMM3 :: DynFlags -> Int-oFFSET_StgRegTable_rZMM3 dflags = pc_OFFSET_StgRegTable_rZMM3 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rZMM3 dflags = pc_OFFSET_StgRegTable_rZMM3 (platformConstants dflags) oFFSET_StgRegTable_rZMM4 :: DynFlags -> Int-oFFSET_StgRegTable_rZMM4 dflags = pc_OFFSET_StgRegTable_rZMM4 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rZMM4 dflags = pc_OFFSET_StgRegTable_rZMM4 (platformConstants dflags) oFFSET_StgRegTable_rZMM5 :: DynFlags -> Int-oFFSET_StgRegTable_rZMM5 dflags = pc_OFFSET_StgRegTable_rZMM5 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rZMM5 dflags = pc_OFFSET_StgRegTable_rZMM5 (platformConstants dflags) oFFSET_StgRegTable_rZMM6 :: DynFlags -> Int-oFFSET_StgRegTable_rZMM6 dflags = pc_OFFSET_StgRegTable_rZMM6 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rZMM6 dflags = pc_OFFSET_StgRegTable_rZMM6 (platformConstants dflags) oFFSET_StgRegTable_rL1 :: DynFlags -> Int-oFFSET_StgRegTable_rL1 dflags = pc_OFFSET_StgRegTable_rL1 (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rL1 dflags = pc_OFFSET_StgRegTable_rL1 (platformConstants dflags) oFFSET_StgRegTable_rSp :: DynFlags -> Int-oFFSET_StgRegTable_rSp dflags = pc_OFFSET_StgRegTable_rSp (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rSp dflags = pc_OFFSET_StgRegTable_rSp (platformConstants dflags) oFFSET_StgRegTable_rSpLim :: DynFlags -> Int-oFFSET_StgRegTable_rSpLim dflags = pc_OFFSET_StgRegTable_rSpLim (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rSpLim dflags = pc_OFFSET_StgRegTable_rSpLim (platformConstants dflags) oFFSET_StgRegTable_rHp :: DynFlags -> Int-oFFSET_StgRegTable_rHp dflags = pc_OFFSET_StgRegTable_rHp (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rHp dflags = pc_OFFSET_StgRegTable_rHp (platformConstants dflags) oFFSET_StgRegTable_rHpLim :: DynFlags -> Int-oFFSET_StgRegTable_rHpLim dflags = pc_OFFSET_StgRegTable_rHpLim (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rHpLim dflags = pc_OFFSET_StgRegTable_rHpLim (platformConstants dflags) oFFSET_StgRegTable_rCCCS :: DynFlags -> Int-oFFSET_StgRegTable_rCCCS dflags = pc_OFFSET_StgRegTable_rCCCS (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rCCCS dflags = pc_OFFSET_StgRegTable_rCCCS (platformConstants dflags) oFFSET_StgRegTable_rCurrentTSO :: DynFlags -> Int-oFFSET_StgRegTable_rCurrentTSO dflags = pc_OFFSET_StgRegTable_rCurrentTSO (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rCurrentTSO dflags = pc_OFFSET_StgRegTable_rCurrentTSO (platformConstants dflags) oFFSET_StgRegTable_rCurrentNursery :: DynFlags -> Int-oFFSET_StgRegTable_rCurrentNursery dflags = pc_OFFSET_StgRegTable_rCurrentNursery (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rCurrentNursery dflags = pc_OFFSET_StgRegTable_rCurrentNursery (platformConstants dflags) oFFSET_StgRegTable_rHpAlloc :: DynFlags -> Int-oFFSET_StgRegTable_rHpAlloc dflags = pc_OFFSET_StgRegTable_rHpAlloc (sPlatformConstants (settings dflags))+oFFSET_StgRegTable_rHpAlloc dflags = pc_OFFSET_StgRegTable_rHpAlloc (platformConstants dflags) oFFSET_stgEagerBlackholeInfo :: DynFlags -> Int-oFFSET_stgEagerBlackholeInfo dflags = pc_OFFSET_stgEagerBlackholeInfo (sPlatformConstants (settings dflags))+oFFSET_stgEagerBlackholeInfo dflags = pc_OFFSET_stgEagerBlackholeInfo (platformConstants dflags) oFFSET_stgGCEnter1 :: DynFlags -> Int-oFFSET_stgGCEnter1 dflags = pc_OFFSET_stgGCEnter1 (sPlatformConstants (settings dflags))+oFFSET_stgGCEnter1 dflags = pc_OFFSET_stgGCEnter1 (platformConstants dflags) oFFSET_stgGCFun :: DynFlags -> Int-oFFSET_stgGCFun dflags = pc_OFFSET_stgGCFun (sPlatformConstants (settings dflags))+oFFSET_stgGCFun dflags = pc_OFFSET_stgGCFun (platformConstants dflags) oFFSET_Capability_r :: DynFlags -> Int-oFFSET_Capability_r dflags = pc_OFFSET_Capability_r (sPlatformConstants (settings dflags))+oFFSET_Capability_r dflags = pc_OFFSET_Capability_r (platformConstants dflags) oFFSET_bdescr_start :: DynFlags -> Int-oFFSET_bdescr_start dflags = pc_OFFSET_bdescr_start (sPlatformConstants (settings dflags))+oFFSET_bdescr_start dflags = pc_OFFSET_bdescr_start (platformConstants dflags) oFFSET_bdescr_free :: DynFlags -> Int-oFFSET_bdescr_free dflags = pc_OFFSET_bdescr_free (sPlatformConstants (settings dflags))+oFFSET_bdescr_free dflags = pc_OFFSET_bdescr_free (platformConstants dflags) oFFSET_bdescr_blocks :: DynFlags -> Int-oFFSET_bdescr_blocks dflags = pc_OFFSET_bdescr_blocks (sPlatformConstants (settings dflags))+oFFSET_bdescr_blocks dflags = pc_OFFSET_bdescr_blocks (platformConstants dflags) oFFSET_bdescr_flags :: DynFlags -> Int-oFFSET_bdescr_flags dflags = pc_OFFSET_bdescr_flags (sPlatformConstants (settings dflags))+oFFSET_bdescr_flags dflags = pc_OFFSET_bdescr_flags (platformConstants dflags) sIZEOF_CostCentreStack :: DynFlags -> Int-sIZEOF_CostCentreStack dflags = pc_SIZEOF_CostCentreStack (sPlatformConstants (settings dflags))+sIZEOF_CostCentreStack dflags = pc_SIZEOF_CostCentreStack (platformConstants dflags) oFFSET_CostCentreStack_mem_alloc :: DynFlags -> Int-oFFSET_CostCentreStack_mem_alloc dflags = pc_OFFSET_CostCentreStack_mem_alloc (sPlatformConstants (settings dflags))+oFFSET_CostCentreStack_mem_alloc dflags = pc_OFFSET_CostCentreStack_mem_alloc (platformConstants dflags) oFFSET_CostCentreStack_scc_count :: DynFlags -> Int-oFFSET_CostCentreStack_scc_count dflags = pc_OFFSET_CostCentreStack_scc_count (sPlatformConstants (settings dflags))+oFFSET_CostCentreStack_scc_count dflags = pc_OFFSET_CostCentreStack_scc_count (platformConstants dflags) oFFSET_StgHeader_ccs :: DynFlags -> Int-oFFSET_StgHeader_ccs dflags = pc_OFFSET_StgHeader_ccs (sPlatformConstants (settings dflags))+oFFSET_StgHeader_ccs dflags = pc_OFFSET_StgHeader_ccs (platformConstants dflags) oFFSET_StgHeader_ldvw :: DynFlags -> Int-oFFSET_StgHeader_ldvw dflags = pc_OFFSET_StgHeader_ldvw (sPlatformConstants (settings dflags))+oFFSET_StgHeader_ldvw dflags = pc_OFFSET_StgHeader_ldvw (platformConstants dflags) sIZEOF_StgSMPThunkHeader :: DynFlags -> Int-sIZEOF_StgSMPThunkHeader dflags = pc_SIZEOF_StgSMPThunkHeader (sPlatformConstants (settings dflags))+sIZEOF_StgSMPThunkHeader dflags = pc_SIZEOF_StgSMPThunkHeader (platformConstants dflags) oFFSET_StgEntCounter_allocs :: DynFlags -> Int-oFFSET_StgEntCounter_allocs dflags = pc_OFFSET_StgEntCounter_allocs (sPlatformConstants (settings dflags))+oFFSET_StgEntCounter_allocs dflags = pc_OFFSET_StgEntCounter_allocs (platformConstants dflags) oFFSET_StgEntCounter_allocd :: DynFlags -> Int-oFFSET_StgEntCounter_allocd dflags = pc_OFFSET_StgEntCounter_allocd (sPlatformConstants (settings dflags))+oFFSET_StgEntCounter_allocd dflags = pc_OFFSET_StgEntCounter_allocd (platformConstants dflags) oFFSET_StgEntCounter_registeredp :: DynFlags -> Int-oFFSET_StgEntCounter_registeredp dflags = pc_OFFSET_StgEntCounter_registeredp (sPlatformConstants (settings dflags))+oFFSET_StgEntCounter_registeredp dflags = pc_OFFSET_StgEntCounter_registeredp (platformConstants dflags) oFFSET_StgEntCounter_link :: DynFlags -> Int-oFFSET_StgEntCounter_link dflags = pc_OFFSET_StgEntCounter_link (sPlatformConstants (settings dflags))+oFFSET_StgEntCounter_link dflags = pc_OFFSET_StgEntCounter_link (platformConstants dflags) oFFSET_StgEntCounter_entry_count :: DynFlags -> Int-oFFSET_StgEntCounter_entry_count dflags = pc_OFFSET_StgEntCounter_entry_count (sPlatformConstants (settings dflags))+oFFSET_StgEntCounter_entry_count dflags = pc_OFFSET_StgEntCounter_entry_count (platformConstants dflags) sIZEOF_StgUpdateFrame_NoHdr :: DynFlags -> Int-sIZEOF_StgUpdateFrame_NoHdr dflags = pc_SIZEOF_StgUpdateFrame_NoHdr (sPlatformConstants (settings dflags))+sIZEOF_StgUpdateFrame_NoHdr dflags = pc_SIZEOF_StgUpdateFrame_NoHdr (platformConstants dflags) sIZEOF_StgMutArrPtrs_NoHdr :: DynFlags -> Int-sIZEOF_StgMutArrPtrs_NoHdr dflags = pc_SIZEOF_StgMutArrPtrs_NoHdr (sPlatformConstants (settings dflags))+sIZEOF_StgMutArrPtrs_NoHdr dflags = pc_SIZEOF_StgMutArrPtrs_NoHdr (platformConstants dflags) oFFSET_StgMutArrPtrs_ptrs :: DynFlags -> Int-oFFSET_StgMutArrPtrs_ptrs dflags = pc_OFFSET_StgMutArrPtrs_ptrs (sPlatformConstants (settings dflags))+oFFSET_StgMutArrPtrs_ptrs dflags = pc_OFFSET_StgMutArrPtrs_ptrs (platformConstants dflags) oFFSET_StgMutArrPtrs_size :: DynFlags -> Int-oFFSET_StgMutArrPtrs_size dflags = pc_OFFSET_StgMutArrPtrs_size (sPlatformConstants (settings dflags))+oFFSET_StgMutArrPtrs_size dflags = pc_OFFSET_StgMutArrPtrs_size (platformConstants dflags) sIZEOF_StgSmallMutArrPtrs_NoHdr :: DynFlags -> Int-sIZEOF_StgSmallMutArrPtrs_NoHdr dflags = pc_SIZEOF_StgSmallMutArrPtrs_NoHdr (sPlatformConstants (settings dflags))+sIZEOF_StgSmallMutArrPtrs_NoHdr dflags = pc_SIZEOF_StgSmallMutArrPtrs_NoHdr (platformConstants dflags) oFFSET_StgSmallMutArrPtrs_ptrs :: DynFlags -> Int-oFFSET_StgSmallMutArrPtrs_ptrs dflags = pc_OFFSET_StgSmallMutArrPtrs_ptrs (sPlatformConstants (settings dflags))+oFFSET_StgSmallMutArrPtrs_ptrs dflags = pc_OFFSET_StgSmallMutArrPtrs_ptrs (platformConstants dflags) sIZEOF_StgArrBytes_NoHdr :: DynFlags -> Int-sIZEOF_StgArrBytes_NoHdr dflags = pc_SIZEOF_StgArrBytes_NoHdr (sPlatformConstants (settings dflags))+sIZEOF_StgArrBytes_NoHdr dflags = pc_SIZEOF_StgArrBytes_NoHdr (platformConstants dflags) oFFSET_StgArrBytes_bytes :: DynFlags -> Int-oFFSET_StgArrBytes_bytes dflags = pc_OFFSET_StgArrBytes_bytes (sPlatformConstants (settings dflags))+oFFSET_StgArrBytes_bytes dflags = pc_OFFSET_StgArrBytes_bytes (platformConstants dflags) oFFSET_StgTSO_alloc_limit :: DynFlags -> Int-oFFSET_StgTSO_alloc_limit dflags = pc_OFFSET_StgTSO_alloc_limit (sPlatformConstants (settings dflags))+oFFSET_StgTSO_alloc_limit dflags = pc_OFFSET_StgTSO_alloc_limit (platformConstants dflags) oFFSET_StgTSO_cccs :: DynFlags -> Int-oFFSET_StgTSO_cccs dflags = pc_OFFSET_StgTSO_cccs (sPlatformConstants (settings dflags))+oFFSET_StgTSO_cccs dflags = pc_OFFSET_StgTSO_cccs (platformConstants dflags) oFFSET_StgTSO_stackobj :: DynFlags -> Int-oFFSET_StgTSO_stackobj dflags = pc_OFFSET_StgTSO_stackobj (sPlatformConstants (settings dflags))+oFFSET_StgTSO_stackobj dflags = pc_OFFSET_StgTSO_stackobj (platformConstants dflags) oFFSET_StgStack_sp :: DynFlags -> Int-oFFSET_StgStack_sp dflags = pc_OFFSET_StgStack_sp (sPlatformConstants (settings dflags))+oFFSET_StgStack_sp dflags = pc_OFFSET_StgStack_sp (platformConstants dflags) oFFSET_StgStack_stack :: DynFlags -> Int-oFFSET_StgStack_stack dflags = pc_OFFSET_StgStack_stack (sPlatformConstants (settings dflags))+oFFSET_StgStack_stack dflags = pc_OFFSET_StgStack_stack (platformConstants dflags) oFFSET_StgUpdateFrame_updatee :: DynFlags -> Int-oFFSET_StgUpdateFrame_updatee dflags = pc_OFFSET_StgUpdateFrame_updatee (sPlatformConstants (settings dflags))+oFFSET_StgUpdateFrame_updatee dflags = pc_OFFSET_StgUpdateFrame_updatee (platformConstants dflags) oFFSET_StgFunInfoExtraFwd_arity :: DynFlags -> Int-oFFSET_StgFunInfoExtraFwd_arity dflags = pc_OFFSET_StgFunInfoExtraFwd_arity (sPlatformConstants (settings dflags))+oFFSET_StgFunInfoExtraFwd_arity dflags = pc_OFFSET_StgFunInfoExtraFwd_arity (platformConstants dflags) sIZEOF_StgFunInfoExtraRev :: DynFlags -> Int-sIZEOF_StgFunInfoExtraRev dflags = pc_SIZEOF_StgFunInfoExtraRev (sPlatformConstants (settings dflags))+sIZEOF_StgFunInfoExtraRev dflags = pc_SIZEOF_StgFunInfoExtraRev (platformConstants dflags) oFFSET_StgFunInfoExtraRev_arity :: DynFlags -> Int-oFFSET_StgFunInfoExtraRev_arity dflags = pc_OFFSET_StgFunInfoExtraRev_arity (sPlatformConstants (settings dflags))+oFFSET_StgFunInfoExtraRev_arity dflags = pc_OFFSET_StgFunInfoExtraRev_arity (platformConstants dflags) mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int-mAX_SPEC_SELECTEE_SIZE dflags = pc_MAX_SPEC_SELECTEE_SIZE (sPlatformConstants (settings dflags))+mAX_SPEC_SELECTEE_SIZE dflags = pc_MAX_SPEC_SELECTEE_SIZE (platformConstants dflags) mAX_SPEC_AP_SIZE :: DynFlags -> Int-mAX_SPEC_AP_SIZE dflags = pc_MAX_SPEC_AP_SIZE (sPlatformConstants (settings dflags))+mAX_SPEC_AP_SIZE dflags = pc_MAX_SPEC_AP_SIZE (platformConstants dflags) mIN_PAYLOAD_SIZE :: DynFlags -> Int-mIN_PAYLOAD_SIZE dflags = pc_MIN_PAYLOAD_SIZE (sPlatformConstants (settings dflags))+mIN_PAYLOAD_SIZE dflags = pc_MIN_PAYLOAD_SIZE (platformConstants dflags) mIN_INTLIKE :: DynFlags -> Int-mIN_INTLIKE dflags = pc_MIN_INTLIKE (sPlatformConstants (settings dflags))+mIN_INTLIKE dflags = pc_MIN_INTLIKE (platformConstants dflags) mAX_INTLIKE :: DynFlags -> Int-mAX_INTLIKE dflags = pc_MAX_INTLIKE (sPlatformConstants (settings dflags))+mAX_INTLIKE dflags = pc_MAX_INTLIKE (platformConstants dflags) mIN_CHARLIKE :: DynFlags -> Int-mIN_CHARLIKE dflags = pc_MIN_CHARLIKE (sPlatformConstants (settings dflags))+mIN_CHARLIKE dflags = pc_MIN_CHARLIKE (platformConstants dflags) mAX_CHARLIKE :: DynFlags -> Int-mAX_CHARLIKE dflags = pc_MAX_CHARLIKE (sPlatformConstants (settings dflags))+mAX_CHARLIKE dflags = pc_MAX_CHARLIKE (platformConstants dflags) mUT_ARR_PTRS_CARD_BITS :: DynFlags -> Int-mUT_ARR_PTRS_CARD_BITS dflags = pc_MUT_ARR_PTRS_CARD_BITS (sPlatformConstants (settings dflags))+mUT_ARR_PTRS_CARD_BITS dflags = pc_MUT_ARR_PTRS_CARD_BITS (platformConstants dflags) mAX_Vanilla_REG :: DynFlags -> Int-mAX_Vanilla_REG dflags = pc_MAX_Vanilla_REG (sPlatformConstants (settings dflags))+mAX_Vanilla_REG dflags = pc_MAX_Vanilla_REG (platformConstants dflags) mAX_Float_REG :: DynFlags -> Int-mAX_Float_REG dflags = pc_MAX_Float_REG (sPlatformConstants (settings dflags))+mAX_Float_REG dflags = pc_MAX_Float_REG (platformConstants dflags) mAX_Double_REG :: DynFlags -> Int-mAX_Double_REG dflags = pc_MAX_Double_REG (sPlatformConstants (settings dflags))+mAX_Double_REG dflags = pc_MAX_Double_REG (platformConstants dflags) mAX_Long_REG :: DynFlags -> Int-mAX_Long_REG dflags = pc_MAX_Long_REG (sPlatformConstants (settings dflags))+mAX_Long_REG dflags = pc_MAX_Long_REG (platformConstants dflags) mAX_XMM_REG :: DynFlags -> Int-mAX_XMM_REG dflags = pc_MAX_XMM_REG (sPlatformConstants (settings dflags))+mAX_XMM_REG dflags = pc_MAX_XMM_REG (platformConstants dflags) mAX_Real_Vanilla_REG :: DynFlags -> Int-mAX_Real_Vanilla_REG dflags = pc_MAX_Real_Vanilla_REG (sPlatformConstants (settings dflags))+mAX_Real_Vanilla_REG dflags = pc_MAX_Real_Vanilla_REG (platformConstants dflags) mAX_Real_Float_REG :: DynFlags -> Int-mAX_Real_Float_REG dflags = pc_MAX_Real_Float_REG (sPlatformConstants (settings dflags))+mAX_Real_Float_REG dflags = pc_MAX_Real_Float_REG (platformConstants dflags) mAX_Real_Double_REG :: DynFlags -> Int-mAX_Real_Double_REG dflags = pc_MAX_Real_Double_REG (sPlatformConstants (settings dflags))+mAX_Real_Double_REG dflags = pc_MAX_Real_Double_REG (platformConstants dflags) mAX_Real_XMM_REG :: DynFlags -> Int-mAX_Real_XMM_REG dflags = pc_MAX_Real_XMM_REG (sPlatformConstants (settings dflags))+mAX_Real_XMM_REG dflags = pc_MAX_Real_XMM_REG (platformConstants dflags) mAX_Real_Long_REG :: DynFlags -> Int-mAX_Real_Long_REG dflags = pc_MAX_Real_Long_REG (sPlatformConstants (settings dflags))+mAX_Real_Long_REG dflags = pc_MAX_Real_Long_REG (platformConstants dflags) rESERVED_C_STACK_BYTES :: DynFlags -> Int-rESERVED_C_STACK_BYTES dflags = pc_RESERVED_C_STACK_BYTES (sPlatformConstants (settings dflags))+rESERVED_C_STACK_BYTES dflags = pc_RESERVED_C_STACK_BYTES (platformConstants dflags) rESERVED_STACK_WORDS :: DynFlags -> Int-rESERVED_STACK_WORDS dflags = pc_RESERVED_STACK_WORDS (sPlatformConstants (settings dflags))+rESERVED_STACK_WORDS dflags = pc_RESERVED_STACK_WORDS (platformConstants dflags) aP_STACK_SPLIM :: DynFlags -> Int-aP_STACK_SPLIM dflags = pc_AP_STACK_SPLIM (sPlatformConstants (settings dflags))+aP_STACK_SPLIM dflags = pc_AP_STACK_SPLIM (platformConstants dflags) wORD_SIZE :: DynFlags -> Int-wORD_SIZE dflags = pc_WORD_SIZE (sPlatformConstants (settings dflags))+wORD_SIZE dflags = pc_WORD_SIZE (platformConstants dflags) dOUBLE_SIZE :: DynFlags -> Int-dOUBLE_SIZE dflags = pc_DOUBLE_SIZE (sPlatformConstants (settings dflags))+dOUBLE_SIZE dflags = pc_DOUBLE_SIZE (platformConstants dflags) cINT_SIZE :: DynFlags -> Int-cINT_SIZE dflags = pc_CINT_SIZE (sPlatformConstants (settings dflags))+cINT_SIZE dflags = pc_CINT_SIZE (platformConstants dflags) cLONG_SIZE :: DynFlags -> Int-cLONG_SIZE dflags = pc_CLONG_SIZE (sPlatformConstants (settings dflags))+cLONG_SIZE dflags = pc_CLONG_SIZE (platformConstants dflags) cLONG_LONG_SIZE :: DynFlags -> Int-cLONG_LONG_SIZE dflags = pc_CLONG_LONG_SIZE (sPlatformConstants (settings dflags))+cLONG_LONG_SIZE dflags = pc_CLONG_LONG_SIZE (platformConstants dflags) bITMAP_BITS_SHIFT :: DynFlags -> Int-bITMAP_BITS_SHIFT dflags = pc_BITMAP_BITS_SHIFT (sPlatformConstants (settings dflags))+bITMAP_BITS_SHIFT dflags = pc_BITMAP_BITS_SHIFT (platformConstants dflags) tAG_BITS :: DynFlags -> Int-tAG_BITS dflags = pc_TAG_BITS (sPlatformConstants (settings dflags))+tAG_BITS dflags = pc_TAG_BITS (platformConstants dflags) wORDS_BIGENDIAN :: DynFlags -> Bool-wORDS_BIGENDIAN dflags = pc_WORDS_BIGENDIAN (sPlatformConstants (settings dflags))+wORDS_BIGENDIAN dflags = pc_WORDS_BIGENDIAN (platformConstants dflags) dYNAMIC_BY_DEFAULT :: DynFlags -> Bool-dYNAMIC_BY_DEFAULT dflags = pc_DYNAMIC_BY_DEFAULT (sPlatformConstants (settings dflags))+dYNAMIC_BY_DEFAULT dflags = pc_DYNAMIC_BY_DEFAULT (platformConstants dflags) lDV_SHIFT :: DynFlags -> Int-lDV_SHIFT dflags = pc_LDV_SHIFT (sPlatformConstants (settings dflags))+lDV_SHIFT dflags = pc_LDV_SHIFT (platformConstants dflags) iLDV_CREATE_MASK :: DynFlags -> Integer-iLDV_CREATE_MASK dflags = pc_ILDV_CREATE_MASK (sPlatformConstants (settings dflags))+iLDV_CREATE_MASK dflags = pc_ILDV_CREATE_MASK (platformConstants dflags) iLDV_STATE_CREATE :: DynFlags -> Integer-iLDV_STATE_CREATE dflags = pc_ILDV_STATE_CREATE (sPlatformConstants (settings dflags))+iLDV_STATE_CREATE dflags = pc_ILDV_STATE_CREATE (platformConstants dflags) iLDV_STATE_USE :: DynFlags -> Integer-iLDV_STATE_USE dflags = pc_ILDV_STATE_USE (sPlatformConstants (settings dflags))+iLDV_STATE_USE dflags = pc_ILDV_STATE_USE (platformConstants dflags)
− autogen/ghc_boot_platform.h
@@ -1,34 +0,0 @@-#ifndef __PLATFORM_H__-#define __PLATFORM_H__--#define BuildPlatform_NAME  "x86_64-unknown-linux"-#define HostPlatform_NAME   "x86_64-unknown-linux"-#define TargetPlatform_NAME "x86_64-unknown-linux"--#define x86_64_unknown_linux_BUILD 1-#define x86_64_unknown_linux_HOST 1-#define x86_64_unknown_linux_TARGET 1--#define x86_64_BUILD_ARCH 1-#define x86_64_HOST_ARCH 1-#define x86_64_TARGET_ARCH 1-#define BUILD_ARCH "x86_64"-#define HOST_ARCH "x86_64"-#define TARGET_ARCH "x86_64"-#define LLVM_TARGET "x86_64-unknown-linux"--#define linux_BUILD_OS 1-#define linux_HOST_OS 1-#define linux_TARGET_OS 1-#define BUILD_OS "linux"-#define HOST_OS "linux"-#define TARGET_OS "linux"--#define unknown_BUILD_VENDOR 1-#define unknown_HOST_VENDOR 1-#define unknown_TARGET_VENDOR  1-#define BUILD_VENDOR "unknown"-#define HOST_VENDOR "unknown"-#define TARGET_VENDOR "unknown"--#endif /* __PLATFORM_H__ */
autogen/primop-can-fail.hs-incl view
@@ -19,10 +19,12 @@ primOpCanFail WordQuotRem2Op = True primOpCanFail DoubleDivOp = True primOpCanFail DoubleLogOp = True+primOpCanFail DoubleLog1POp = True primOpCanFail DoubleAsinOp = True primOpCanFail DoubleAcosOp = True primOpCanFail FloatDivOp = True primOpCanFail FloatLogOp = True+primOpCanFail FloatLog1POp = True primOpCanFail FloatAsinOp = True primOpCanFail FloatAcosOp = True primOpCanFail ReadArrayOp = True
autogen/primop-code-size.hs-incl view
@@ -8,7 +8,9 @@ primOpCodeSize WordAdd2Op = 2 primOpCodeSize Word2IntOp = 0 primOpCodeSize DoubleExpOp =  primOpCodeSizeForeignCall +primOpCodeSize DoubleExpM1Op =  primOpCodeSizeForeignCall  primOpCodeSize DoubleLogOp =  primOpCodeSizeForeignCall +primOpCodeSize DoubleLog1POp =  primOpCodeSizeForeignCall  primOpCodeSize DoubleSqrtOp =  primOpCodeSizeForeignCall  primOpCodeSize DoubleSinOp =  primOpCodeSizeForeignCall  primOpCodeSize DoubleCosOp =  primOpCodeSizeForeignCall @@ -24,7 +26,9 @@ primOpCodeSize DoubleAtanhOp =  primOpCodeSizeForeignCall  primOpCodeSize DoublePowerOp =  primOpCodeSizeForeignCall  primOpCodeSize FloatExpOp =  primOpCodeSizeForeignCall +primOpCodeSize FloatExpM1Op =  primOpCodeSizeForeignCall  primOpCodeSize FloatLogOp =  primOpCodeSizeForeignCall +primOpCodeSize FloatLog1POp =  primOpCodeSizeForeignCall  primOpCodeSize FloatSqrtOp =  primOpCodeSizeForeignCall  primOpCodeSize FloatSinOp =  primOpCodeSizeForeignCall  primOpCodeSize FloatCosOp =  primOpCodeSizeForeignCall 
autogen/primop-data-decl.hs-incl view
@@ -148,6 +148,11 @@    | BSwap32Op    | BSwap64Op    | BSwapOp+   | BRev8Op+   | BRev16Op+   | BRev32Op+   | BRev64Op+   | BRevOp    | Narrow8IntOp    | Narrow16IntOp    | Narrow32IntOp@@ -169,7 +174,9 @@    | Double2IntOp    | Double2FloatOp    | DoubleExpOp+   | DoubleExpM1Op    | DoubleLogOp+   | DoubleLog1POp    | DoubleSqrtOp    | DoubleSinOp    | DoubleCosOp@@ -200,7 +207,9 @@    | FloatFabsOp    | Float2IntOp    | FloatExpOp+   | FloatExpM1Op    | FloatLogOp+   | FloatLog1POp    | FloatSqrtOp    | FloatSinOp    | FloatCosOp@@ -235,10 +244,12 @@    | CasArrayOp    | NewSmallArrayOp    | SameSmallMutableArrayOp+   | ShrinkSmallMutableArrayOp_Char    | ReadSmallArrayOp    | WriteSmallArrayOp    | SizeofSmallArrayOp    | SizeofSmallMutableArrayOp+   | GetSizeofSmallMutableArrayOp    | IndexSmallArrayOp    | UnsafeFreezeSmallArrayOp    | UnsafeThawSmallArrayOp@@ -524,6 +535,7 @@    | MkApUpd0_Op    | NewBCOOp    | UnpackClosureOp+   | ClosureSizeOp    | GetApStackValOp    | GetCCSOfOp    | GetCurrentCCSOp@@ -531,7 +543,6 @@    | TraceEventOp    | TraceEventBinaryOp    | TraceMarkerOp-   | GetThreadAllocationCounter    | SetThreadAllocationCounter    | VecBroadcastOp PrimOpVecCat Length Width    | VecPackOp PrimOpVecCat Length Width
autogen/primop-has-side-effects.hs-incl view
@@ -11,6 +11,7 @@ primOpHasSideEffects ThawArrayOp = True primOpHasSideEffects CasArrayOp = True primOpHasSideEffects NewSmallArrayOp = True+primOpHasSideEffects ShrinkSmallMutableArrayOp_Char = True primOpHasSideEffects ReadSmallArrayOp = True primOpHasSideEffects WriteSmallArrayOp = True primOpHasSideEffects UnsafeFreezeSmallArrayOp = True@@ -213,7 +214,6 @@ primOpHasSideEffects TraceEventOp = True primOpHasSideEffects TraceEventBinaryOp = True primOpHasSideEffects TraceMarkerOp = True-primOpHasSideEffects GetThreadAllocationCounter = True primOpHasSideEffects SetThreadAllocationCounter = True primOpHasSideEffects (VecReadByteArrayOp _ _ _) = True primOpHasSideEffects (VecWriteByteArrayOp _ _ _) = True
autogen/primop-list.hs-incl view
@@ -147,6 +147,11 @@    , BSwap32Op    , BSwap64Op    , BSwapOp+   , BRev8Op+   , BRev16Op+   , BRev32Op+   , BRev64Op+   , BRevOp    , Narrow8IntOp    , Narrow16IntOp    , Narrow32IntOp@@ -168,7 +173,9 @@    , Double2IntOp    , Double2FloatOp    , DoubleExpOp+   , DoubleExpM1Op    , DoubleLogOp+   , DoubleLog1POp    , DoubleSqrtOp    , DoubleSinOp    , DoubleCosOp@@ -199,7 +206,9 @@    , FloatFabsOp    , Float2IntOp    , FloatExpOp+   , FloatExpM1Op    , FloatLogOp+   , FloatLog1POp    , FloatSqrtOp    , FloatSinOp    , FloatCosOp@@ -234,10 +243,12 @@    , CasArrayOp    , NewSmallArrayOp    , SameSmallMutableArrayOp+   , ShrinkSmallMutableArrayOp_Char    , ReadSmallArrayOp    , WriteSmallArrayOp    , SizeofSmallArrayOp    , SizeofSmallMutableArrayOp+   , GetSizeofSmallMutableArrayOp    , IndexSmallArrayOp    , UnsafeFreezeSmallArrayOp    , UnsafeThawSmallArrayOp@@ -523,6 +534,7 @@    , MkApUpd0_Op    , NewBCOOp    , UnpackClosureOp+   , ClosureSizeOp    , GetApStackValOp    , GetCCSOfOp    , GetCurrentCCSOp@@ -530,7 +542,6 @@    , TraceEventOp    , TraceEventBinaryOp    , TraceMarkerOp-   , GetThreadAllocationCounter    , SetThreadAllocationCounter    , (VecBroadcastOp IntVec 16 W8)    , (VecBroadcastOp IntVec 8 W16)
autogen/primop-out-of-line.hs-incl view
@@ -11,6 +11,7 @@ primOpOutOfLine ThawArrayOp = True primOpOutOfLine CasArrayOp = True primOpOutOfLine NewSmallArrayOp = True+primOpOutOfLine ShrinkSmallMutableArrayOp_Char = True primOpOutOfLine UnsafeThawSmallArrayOp = True primOpOutOfLine CopySmallArrayOp = True primOpOutOfLine CopySmallMutableArrayOp = True@@ -91,11 +92,11 @@ primOpOutOfLine MkApUpd0_Op = True primOpOutOfLine NewBCOOp = True primOpOutOfLine UnpackClosureOp = True+primOpOutOfLine ClosureSizeOp = True primOpOutOfLine GetApStackValOp = True primOpOutOfLine ClearCCSOp = True primOpOutOfLine TraceEventOp = True primOpOutOfLine TraceEventBinaryOp = True primOpOutOfLine TraceMarkerOp = True-primOpOutOfLine GetThreadAllocationCounter = True primOpOutOfLine SetThreadAllocationCounter = True primOpOutOfLine _ = False
autogen/primop-primop-info.hs-incl view
@@ -147,6 +147,11 @@ primOpInfo BSwap32Op = mkMonadic (fsLit "byteSwap32#") wordPrimTy primOpInfo BSwap64Op = mkMonadic (fsLit "byteSwap64#") wordPrimTy primOpInfo BSwapOp = mkMonadic (fsLit "byteSwap#") wordPrimTy+primOpInfo BRev8Op = mkMonadic (fsLit "bitReverse8#") wordPrimTy+primOpInfo BRev16Op = mkMonadic (fsLit "bitReverse16#") wordPrimTy+primOpInfo BRev32Op = mkMonadic (fsLit "bitReverse32#") wordPrimTy+primOpInfo BRev64Op = mkMonadic (fsLit "bitReverse64#") wordPrimTy+primOpInfo BRevOp = mkMonadic (fsLit "bitReverse#") wordPrimTy primOpInfo Narrow8IntOp = mkMonadic (fsLit "narrow8Int#") intPrimTy primOpInfo Narrow16IntOp = mkMonadic (fsLit "narrow16Int#") intPrimTy primOpInfo Narrow32IntOp = mkMonadic (fsLit "narrow32Int#") intPrimTy@@ -168,7 +173,9 @@ primOpInfo Double2IntOp = mkGenPrimOp (fsLit "double2Int#")  [] [doublePrimTy] (intPrimTy) primOpInfo Double2FloatOp = mkGenPrimOp (fsLit "double2Float#")  [] [doublePrimTy] (floatPrimTy) primOpInfo DoubleExpOp = mkMonadic (fsLit "expDouble#") doublePrimTy+primOpInfo DoubleExpM1Op = mkMonadic (fsLit "expm1Double#") doublePrimTy primOpInfo DoubleLogOp = mkMonadic (fsLit "logDouble#") doublePrimTy+primOpInfo DoubleLog1POp = mkMonadic (fsLit "log1pDouble#") doublePrimTy primOpInfo DoubleSqrtOp = mkMonadic (fsLit "sqrtDouble#") doublePrimTy primOpInfo DoubleSinOp = mkMonadic (fsLit "sinDouble#") doublePrimTy primOpInfo DoubleCosOp = mkMonadic (fsLit "cosDouble#") doublePrimTy@@ -199,7 +206,9 @@ primOpInfo FloatFabsOp = mkMonadic (fsLit "fabsFloat#") floatPrimTy primOpInfo Float2IntOp = mkGenPrimOp (fsLit "float2Int#")  [] [floatPrimTy] (intPrimTy) primOpInfo FloatExpOp = mkMonadic (fsLit "expFloat#") floatPrimTy+primOpInfo FloatExpM1Op = mkMonadic (fsLit "expm1Float#") floatPrimTy primOpInfo FloatLogOp = mkMonadic (fsLit "logFloat#") floatPrimTy+primOpInfo FloatLog1POp = mkMonadic (fsLit "log1pFloat#") floatPrimTy primOpInfo FloatSqrtOp = mkMonadic (fsLit "sqrtFloat#") floatPrimTy primOpInfo FloatSinOp = mkMonadic (fsLit "sinFloat#") floatPrimTy primOpInfo FloatCosOp = mkMonadic (fsLit "cosFloat#") floatPrimTy@@ -234,10 +243,12 @@ primOpInfo CasArrayOp = mkGenPrimOp (fsLit "casArray#")  [deltaTyVar, alphaTyVar] [mkMutableArrayPrimTy deltaTy alphaTy, intPrimTy, alphaTy, alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy, alphaTy])) primOpInfo NewSmallArrayOp = mkGenPrimOp (fsLit "newSmallArray#")  [alphaTyVar, deltaTyVar] [intPrimTy, alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, mkSmallMutableArrayPrimTy deltaTy alphaTy])) primOpInfo SameSmallMutableArrayOp = mkGenPrimOp (fsLit "sameSmallMutableArray#")  [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, mkSmallMutableArrayPrimTy deltaTy alphaTy] (intPrimTy)+primOpInfo ShrinkSmallMutableArrayOp_Char = mkGenPrimOp (fsLit "shrinkSmallMutableArray#")  [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo ReadSmallArrayOp = mkGenPrimOp (fsLit "readSmallArray#")  [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy])) primOpInfo WriteSmallArrayOp = mkGenPrimOp (fsLit "writeSmallArray#")  [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, intPrimTy, alphaTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo SizeofSmallArrayOp = mkGenPrimOp (fsLit "sizeofSmallArray#")  [alphaTyVar] [mkSmallArrayPrimTy alphaTy] (intPrimTy) primOpInfo SizeofSmallMutableArrayOp = mkGenPrimOp (fsLit "sizeofSmallMutableArray#")  [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy] (intPrimTy)+primOpInfo GetSizeofSmallMutableArrayOp = mkGenPrimOp (fsLit "getSizeofSmallMutableArray#")  [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy])) primOpInfo IndexSmallArrayOp = mkGenPrimOp (fsLit "indexSmallArray#")  [alphaTyVar] [mkSmallArrayPrimTy alphaTy, intPrimTy] ((mkTupleTy Unboxed [alphaTy])) primOpInfo UnsafeFreezeSmallArrayOp = mkGenPrimOp (fsLit "unsafeFreezeSmallArray#")  [deltaTyVar, alphaTyVar] [mkSmallMutableArrayPrimTy deltaTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, mkSmallArrayPrimTy alphaTy])) primOpInfo UnsafeThawSmallArrayOp = mkGenPrimOp (fsLit "unsafeThawSmallArray#")  [alphaTyVar, deltaTyVar] [mkSmallArrayPrimTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, mkSmallMutableArrayPrimTy deltaTy alphaTy]))@@ -447,20 +458,20 @@ primOpInfo ReadMutVarOp = mkGenPrimOp (fsLit "readMutVar#")  [deltaTyVar, alphaTyVar] [mkMutVarPrimTy deltaTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy])) primOpInfo WriteMutVarOp = mkGenPrimOp (fsLit "writeMutVar#")  [deltaTyVar, alphaTyVar] [mkMutVarPrimTy deltaTy alphaTy, alphaTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo SameMutVarOp = mkGenPrimOp (fsLit "sameMutVar#")  [deltaTyVar, alphaTyVar] [mkMutVarPrimTy deltaTy alphaTy, mkMutVarPrimTy deltaTy alphaTy] (intPrimTy)-primOpInfo AtomicModifyMutVar2Op = mkGenPrimOp (fsLit "atomicModifyMutVar2#")  [deltaTyVar, alphaTyVar, gammaTyVar] [mkMutVarPrimTy deltaTy alphaTy, (mkFunTy (alphaTy) (gammaTy)), mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy, gammaTy]))-primOpInfo AtomicModifyMutVar_Op = mkGenPrimOp (fsLit "atomicModifyMutVar_#")  [deltaTyVar, alphaTyVar] [mkMutVarPrimTy deltaTy alphaTy, (mkFunTy (alphaTy) (alphaTy)), mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy, alphaTy]))+primOpInfo AtomicModifyMutVar2Op = mkGenPrimOp (fsLit "atomicModifyMutVar2#")  [deltaTyVar, alphaTyVar, gammaTyVar] [mkMutVarPrimTy deltaTy alphaTy, (mkVisFunTy (alphaTy) (gammaTy)), mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy, gammaTy]))+primOpInfo AtomicModifyMutVar_Op = mkGenPrimOp (fsLit "atomicModifyMutVar_#")  [deltaTyVar, alphaTyVar] [mkMutVarPrimTy deltaTy alphaTy, (mkVisFunTy (alphaTy) (alphaTy)), mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy, alphaTy])) primOpInfo CasMutVarOp = mkGenPrimOp (fsLit "casMutVar#")  [deltaTyVar, alphaTyVar] [mkMutVarPrimTy deltaTy alphaTy, alphaTy, alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy, alphaTy]))-primOpInfo CatchOp = mkGenPrimOp (fsLit "catch#")  [alphaTyVar, betaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), (mkFunTy (betaTy) ((mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))+primOpInfo CatchOp = mkGenPrimOp (fsLit "catch#")  [alphaTyVar, betaTyVar] [(mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), (mkVisFunTy (betaTy) ((mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy])) primOpInfo RaiseOp = mkGenPrimOp (fsLit "raise#")  [betaTyVar, runtimeRep1TyVar, openAlphaTyVar] [betaTy] (openAlphaTy) primOpInfo RaiseIOOp = mkGenPrimOp (fsLit "raiseIO#")  [alphaTyVar, betaTyVar] [alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, betaTy]))-primOpInfo MaskAsyncExceptionsOp = mkGenPrimOp (fsLit "maskAsyncExceptions#")  [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))-primOpInfo MaskUninterruptibleOp = mkGenPrimOp (fsLit "maskUninterruptible#")  [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))-primOpInfo UnmaskAsyncExceptionsOp = mkGenPrimOp (fsLit "unmaskAsyncExceptions#")  [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))+primOpInfo MaskAsyncExceptionsOp = mkGenPrimOp (fsLit "maskAsyncExceptions#")  [alphaTyVar] [(mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))+primOpInfo MaskUninterruptibleOp = mkGenPrimOp (fsLit "maskUninterruptible#")  [alphaTyVar] [(mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))+primOpInfo UnmaskAsyncExceptionsOp = mkGenPrimOp (fsLit "unmaskAsyncExceptions#")  [alphaTyVar] [(mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy])) primOpInfo MaskStatus = mkGenPrimOp (fsLit "getMaskingState#")  [] [mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy]))-primOpInfo AtomicallyOp = mkGenPrimOp (fsLit "atomically#")  [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))+primOpInfo AtomicallyOp = mkGenPrimOp (fsLit "atomically#")  [alphaTyVar] [(mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy])) primOpInfo RetryOp = mkGenPrimOp (fsLit "retry#")  [alphaTyVar] [mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))-primOpInfo CatchRetryOp = mkGenPrimOp (fsLit "catchRetry#")  [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))-primOpInfo CatchSTMOp = mkGenPrimOp (fsLit "catchSTM#")  [alphaTyVar, betaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), (mkFunTy (betaTy) ((mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))+primOpInfo CatchRetryOp = mkGenPrimOp (fsLit "catchRetry#")  [alphaTyVar] [(mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), (mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))+primOpInfo CatchSTMOp = mkGenPrimOp (fsLit "catchSTM#")  [alphaTyVar, betaTyVar] [(mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), (mkVisFunTy (betaTy) ((mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy])) primOpInfo NewTVarOp = mkGenPrimOp (fsLit "newTVar#")  [alphaTyVar, deltaTyVar] [alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, mkTVarPrimTy deltaTy alphaTy])) primOpInfo ReadTVarOp = mkGenPrimOp (fsLit "readTVar#")  [deltaTyVar, alphaTyVar] [mkTVarPrimTy deltaTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy])) primOpInfo ReadTVarIOOp = mkGenPrimOp (fsLit "readTVarIO#")  [deltaTyVar, alphaTyVar] [mkTVarPrimTy deltaTy alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy]))@@ -487,11 +498,11 @@ primOpInfo IsCurrentThreadBoundOp = mkGenPrimOp (fsLit "isCurrentThreadBound#")  [] [mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy])) primOpInfo NoDuplicateOp = mkGenPrimOp (fsLit "noDuplicate#")  [deltaTyVar] [mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo ThreadStatusOp = mkGenPrimOp (fsLit "threadStatus#")  [] [threadIdPrimTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy, intPrimTy, intPrimTy]))-primOpInfo MkWeakOp = mkGenPrimOp (fsLit "mkWeak#")  [runtimeRep1TyVar, openAlphaTyVar, betaTyVar, gammaTyVar] [openAlphaTy, betaTy, (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, gammaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, mkWeakPrimTy betaTy]))+primOpInfo MkWeakOp = mkGenPrimOp (fsLit "mkWeak#")  [runtimeRep1TyVar, openAlphaTyVar, betaTyVar, gammaTyVar] [openAlphaTy, betaTy, (mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, gammaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, mkWeakPrimTy betaTy])) primOpInfo MkWeakNoFinalizerOp = mkGenPrimOp (fsLit "mkWeakNoFinalizer#")  [runtimeRep1TyVar, openAlphaTyVar, betaTyVar] [openAlphaTy, betaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, mkWeakPrimTy betaTy])) primOpInfo AddCFinalizerToWeakOp = mkGenPrimOp (fsLit "addCFinalizerToWeak#")  [betaTyVar] [addrPrimTy, addrPrimTy, intPrimTy, addrPrimTy, mkWeakPrimTy betaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy])) primOpInfo DeRefWeakOp = mkGenPrimOp (fsLit "deRefWeak#")  [alphaTyVar] [mkWeakPrimTy alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy, alphaTy]))-primOpInfo FinalizeWeakOp = mkGenPrimOp (fsLit "finalizeWeak#")  [alphaTyVar, betaTyVar] [mkWeakPrimTy alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy, (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, betaTy])))]))+primOpInfo FinalizeWeakOp = mkGenPrimOp (fsLit "finalizeWeak#")  [alphaTyVar, betaTyVar] [mkWeakPrimTy alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy, (mkVisFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, betaTy])))])) primOpInfo TouchOp = mkGenPrimOp (fsLit "touch#")  [runtimeRep1TyVar, openAlphaTyVar] [openAlphaTy, mkStatePrimTy realWorldTy] (mkStatePrimTy realWorldTy) primOpInfo MakeStablePtrOp = mkGenPrimOp (fsLit "makeStablePtr#")  [alphaTyVar] [alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, mkStablePtrPrimTy alphaTy])) primOpInfo DeRefStablePtrOp = mkGenPrimOp (fsLit "deRefStablePtr#")  [alphaTyVar] [mkStablePtrPrimTy alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))@@ -523,14 +534,14 @@ primOpInfo MkApUpd0_Op = mkGenPrimOp (fsLit "mkApUpd0#")  [alphaTyVar] [bcoPrimTy] ((mkTupleTy Unboxed [alphaTy])) primOpInfo NewBCOOp = mkGenPrimOp (fsLit "newBCO#")  [alphaTyVar, deltaTyVar] [byteArrayPrimTy, byteArrayPrimTy, mkArrayPrimTy alphaTy, intPrimTy, byteArrayPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, bcoPrimTy])) primOpInfo UnpackClosureOp = mkGenPrimOp (fsLit "unpackClosure#")  [alphaTyVar, betaTyVar] [alphaTy] ((mkTupleTy Unboxed [addrPrimTy, byteArrayPrimTy, mkArrayPrimTy betaTy]))+primOpInfo ClosureSizeOp = mkGenPrimOp (fsLit "closureSize#")  [alphaTyVar] [alphaTy] (intPrimTy) primOpInfo GetApStackValOp = mkGenPrimOp (fsLit "getApStackVal#")  [alphaTyVar, betaTyVar] [alphaTy, intPrimTy] ((mkTupleTy Unboxed [intPrimTy, betaTy])) primOpInfo GetCCSOfOp = mkGenPrimOp (fsLit "getCCSOf#")  [alphaTyVar, deltaTyVar] [alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, addrPrimTy])) primOpInfo GetCurrentCCSOp = mkGenPrimOp (fsLit "getCurrentCCS#")  [alphaTyVar, deltaTyVar] [alphaTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, addrPrimTy]))-primOpInfo ClearCCSOp = mkGenPrimOp (fsLit "clearCCS#")  [deltaTyVar, alphaTyVar] [(mkFunTy (mkStatePrimTy deltaTy) ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy]))), mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy]))+primOpInfo ClearCCSOp = mkGenPrimOp (fsLit "clearCCS#")  [deltaTyVar, alphaTyVar] [(mkVisFunTy (mkStatePrimTy deltaTy) ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy]))), mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, alphaTy])) primOpInfo TraceEventOp = mkGenPrimOp (fsLit "traceEvent#")  [deltaTyVar] [addrPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo TraceEventBinaryOp = mkGenPrimOp (fsLit "traceBinaryEvent#")  [deltaTyVar] [addrPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo TraceMarkerOp = mkGenPrimOp (fsLit "traceMarker#")  [deltaTyVar] [addrPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)-primOpInfo GetThreadAllocationCounter = mkGenPrimOp (fsLit "getThreadAllocationCounter#")  [] [mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, intPrimTy])) primOpInfo SetThreadAllocationCounter = mkGenPrimOp (fsLit "setThreadAllocationCounter#")  [] [intPrimTy, mkStatePrimTy realWorldTy] (mkStatePrimTy realWorldTy) primOpInfo (VecBroadcastOp IntVec 16 W8) = mkGenPrimOp (fsLit "broadcastInt8X16#")  [] [intPrimTy] (int8X16PrimTy) primOpInfo (VecBroadcastOp IntVec 8 W16) = mkGenPrimOp (fsLit "broadcastInt16X8#")  [] [intPrimTy] (int16X8PrimTy)
autogen/primop-strictness.hs-incl view
@@ -1,13 +1,13 @@ primOpStrictness CatchOp =  \ _arity -> mkClosedStrictSig [ lazyApply1Dmd                                                  , lazyApply2Dmd                                                  , topDmd] topRes -primOpStrictness RaiseOp =  \ _arity -> mkClosedStrictSig [topDmd] exnRes -primOpStrictness RaiseIOOp =  \ _arity -> mkClosedStrictSig [topDmd, topDmd] exnRes +primOpStrictness RaiseOp =  \ _arity -> mkClosedStrictSig [topDmd] botRes +primOpStrictness RaiseIOOp =  \ _arity -> mkClosedStrictSig [topDmd, topDmd] botRes  primOpStrictness MaskAsyncExceptionsOp =  \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes  primOpStrictness MaskUninterruptibleOp =  \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes  primOpStrictness UnmaskAsyncExceptionsOp =  \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes  primOpStrictness AtomicallyOp =  \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes -primOpStrictness RetryOp =  \ _arity -> mkClosedStrictSig [topDmd] exnRes +primOpStrictness RetryOp =  \ _arity -> mkClosedStrictSig [topDmd] botRes  primOpStrictness CatchRetryOp =  \ _arity -> mkClosedStrictSig [ lazyApply1Dmd                                                  , lazyApply1Dmd                                                  , topDmd ] topRes 
autogen/primop-tag.hs-incl view
@@ -1,1195 +1,1206 @@ maxPrimOpTag :: Int-maxPrimOpTag = 1192-primOpTag :: PrimOp -> Int-primOpTag CharGtOp = 1-primOpTag CharGeOp = 2-primOpTag CharEqOp = 3-primOpTag CharNeOp = 4-primOpTag CharLtOp = 5-primOpTag CharLeOp = 6-primOpTag OrdOp = 7-primOpTag IntAddOp = 8-primOpTag IntSubOp = 9-primOpTag IntMulOp = 10-primOpTag IntMulMayOfloOp = 11-primOpTag IntQuotOp = 12-primOpTag IntRemOp = 13-primOpTag IntQuotRemOp = 14-primOpTag AndIOp = 15-primOpTag OrIOp = 16-primOpTag XorIOp = 17-primOpTag NotIOp = 18-primOpTag IntNegOp = 19-primOpTag IntAddCOp = 20-primOpTag IntSubCOp = 21-primOpTag IntGtOp = 22-primOpTag IntGeOp = 23-primOpTag IntEqOp = 24-primOpTag IntNeOp = 25-primOpTag IntLtOp = 26-primOpTag IntLeOp = 27-primOpTag ChrOp = 28-primOpTag Int2WordOp = 29-primOpTag Int2FloatOp = 30-primOpTag Int2DoubleOp = 31-primOpTag Word2FloatOp = 32-primOpTag Word2DoubleOp = 33-primOpTag ISllOp = 34-primOpTag ISraOp = 35-primOpTag ISrlOp = 36-primOpTag Int8Extend = 37-primOpTag Int8Narrow = 38-primOpTag Int8NegOp = 39-primOpTag Int8AddOp = 40-primOpTag Int8SubOp = 41-primOpTag Int8MulOp = 42-primOpTag Int8QuotOp = 43-primOpTag Int8RemOp = 44-primOpTag Int8QuotRemOp = 45-primOpTag Int8EqOp = 46-primOpTag Int8GeOp = 47-primOpTag Int8GtOp = 48-primOpTag Int8LeOp = 49-primOpTag Int8LtOp = 50-primOpTag Int8NeOp = 51-primOpTag Word8Extend = 52-primOpTag Word8Narrow = 53-primOpTag Word8NotOp = 54-primOpTag Word8AddOp = 55-primOpTag Word8SubOp = 56-primOpTag Word8MulOp = 57-primOpTag Word8QuotOp = 58-primOpTag Word8RemOp = 59-primOpTag Word8QuotRemOp = 60-primOpTag Word8EqOp = 61-primOpTag Word8GeOp = 62-primOpTag Word8GtOp = 63-primOpTag Word8LeOp = 64-primOpTag Word8LtOp = 65-primOpTag Word8NeOp = 66-primOpTag Int16Extend = 67-primOpTag Int16Narrow = 68-primOpTag Int16NegOp = 69-primOpTag Int16AddOp = 70-primOpTag Int16SubOp = 71-primOpTag Int16MulOp = 72-primOpTag Int16QuotOp = 73-primOpTag Int16RemOp = 74-primOpTag Int16QuotRemOp = 75-primOpTag Int16EqOp = 76-primOpTag Int16GeOp = 77-primOpTag Int16GtOp = 78-primOpTag Int16LeOp = 79-primOpTag Int16LtOp = 80-primOpTag Int16NeOp = 81-primOpTag Word16Extend = 82-primOpTag Word16Narrow = 83-primOpTag Word16NotOp = 84-primOpTag Word16AddOp = 85-primOpTag Word16SubOp = 86-primOpTag Word16MulOp = 87-primOpTag Word16QuotOp = 88-primOpTag Word16RemOp = 89-primOpTag Word16QuotRemOp = 90-primOpTag Word16EqOp = 91-primOpTag Word16GeOp = 92-primOpTag Word16GtOp = 93-primOpTag Word16LeOp = 94-primOpTag Word16LtOp = 95-primOpTag Word16NeOp = 96-primOpTag WordAddOp = 97-primOpTag WordAddCOp = 98-primOpTag WordSubCOp = 99-primOpTag WordAdd2Op = 100-primOpTag WordSubOp = 101-primOpTag WordMulOp = 102-primOpTag WordMul2Op = 103-primOpTag WordQuotOp = 104-primOpTag WordRemOp = 105-primOpTag WordQuotRemOp = 106-primOpTag WordQuotRem2Op = 107-primOpTag AndOp = 108-primOpTag OrOp = 109-primOpTag XorOp = 110-primOpTag NotOp = 111-primOpTag SllOp = 112-primOpTag SrlOp = 113-primOpTag Word2IntOp = 114-primOpTag WordGtOp = 115-primOpTag WordGeOp = 116-primOpTag WordEqOp = 117-primOpTag WordNeOp = 118-primOpTag WordLtOp = 119-primOpTag WordLeOp = 120-primOpTag PopCnt8Op = 121-primOpTag PopCnt16Op = 122-primOpTag PopCnt32Op = 123-primOpTag PopCnt64Op = 124-primOpTag PopCntOp = 125-primOpTag Pdep8Op = 126-primOpTag Pdep16Op = 127-primOpTag Pdep32Op = 128-primOpTag Pdep64Op = 129-primOpTag PdepOp = 130-primOpTag Pext8Op = 131-primOpTag Pext16Op = 132-primOpTag Pext32Op = 133-primOpTag Pext64Op = 134-primOpTag PextOp = 135-primOpTag Clz8Op = 136-primOpTag Clz16Op = 137-primOpTag Clz32Op = 138-primOpTag Clz64Op = 139-primOpTag ClzOp = 140-primOpTag Ctz8Op = 141-primOpTag Ctz16Op = 142-primOpTag Ctz32Op = 143-primOpTag Ctz64Op = 144-primOpTag CtzOp = 145-primOpTag BSwap16Op = 146-primOpTag BSwap32Op = 147-primOpTag BSwap64Op = 148-primOpTag BSwapOp = 149-primOpTag Narrow8IntOp = 150-primOpTag Narrow16IntOp = 151-primOpTag Narrow32IntOp = 152-primOpTag Narrow8WordOp = 153-primOpTag Narrow16WordOp = 154-primOpTag Narrow32WordOp = 155-primOpTag DoubleGtOp = 156-primOpTag DoubleGeOp = 157-primOpTag DoubleEqOp = 158-primOpTag DoubleNeOp = 159-primOpTag DoubleLtOp = 160-primOpTag DoubleLeOp = 161-primOpTag DoubleAddOp = 162-primOpTag DoubleSubOp = 163-primOpTag DoubleMulOp = 164-primOpTag DoubleDivOp = 165-primOpTag DoubleNegOp = 166-primOpTag DoubleFabsOp = 167-primOpTag Double2IntOp = 168-primOpTag Double2FloatOp = 169-primOpTag DoubleExpOp = 170-primOpTag DoubleLogOp = 171-primOpTag DoubleSqrtOp = 172-primOpTag DoubleSinOp = 173-primOpTag DoubleCosOp = 174-primOpTag DoubleTanOp = 175-primOpTag DoubleAsinOp = 176-primOpTag DoubleAcosOp = 177-primOpTag DoubleAtanOp = 178-primOpTag DoubleSinhOp = 179-primOpTag DoubleCoshOp = 180-primOpTag DoubleTanhOp = 181-primOpTag DoubleAsinhOp = 182-primOpTag DoubleAcoshOp = 183-primOpTag DoubleAtanhOp = 184-primOpTag DoublePowerOp = 185-primOpTag DoubleDecode_2IntOp = 186-primOpTag DoubleDecode_Int64Op = 187-primOpTag FloatGtOp = 188-primOpTag FloatGeOp = 189-primOpTag FloatEqOp = 190-primOpTag FloatNeOp = 191-primOpTag FloatLtOp = 192-primOpTag FloatLeOp = 193-primOpTag FloatAddOp = 194-primOpTag FloatSubOp = 195-primOpTag FloatMulOp = 196-primOpTag FloatDivOp = 197-primOpTag FloatNegOp = 198-primOpTag FloatFabsOp = 199-primOpTag Float2IntOp = 200-primOpTag FloatExpOp = 201-primOpTag FloatLogOp = 202-primOpTag FloatSqrtOp = 203-primOpTag FloatSinOp = 204-primOpTag FloatCosOp = 205-primOpTag FloatTanOp = 206-primOpTag FloatAsinOp = 207-primOpTag FloatAcosOp = 208-primOpTag FloatAtanOp = 209-primOpTag FloatSinhOp = 210-primOpTag FloatCoshOp = 211-primOpTag FloatTanhOp = 212-primOpTag FloatAsinhOp = 213-primOpTag FloatAcoshOp = 214-primOpTag FloatAtanhOp = 215-primOpTag FloatPowerOp = 216-primOpTag Float2DoubleOp = 217-primOpTag FloatDecode_IntOp = 218-primOpTag NewArrayOp = 219-primOpTag SameMutableArrayOp = 220-primOpTag ReadArrayOp = 221-primOpTag WriteArrayOp = 222-primOpTag SizeofArrayOp = 223-primOpTag SizeofMutableArrayOp = 224-primOpTag IndexArrayOp = 225-primOpTag UnsafeFreezeArrayOp = 226-primOpTag UnsafeThawArrayOp = 227-primOpTag CopyArrayOp = 228-primOpTag CopyMutableArrayOp = 229-primOpTag CloneArrayOp = 230-primOpTag CloneMutableArrayOp = 231-primOpTag FreezeArrayOp = 232-primOpTag ThawArrayOp = 233-primOpTag CasArrayOp = 234-primOpTag NewSmallArrayOp = 235-primOpTag SameSmallMutableArrayOp = 236-primOpTag ReadSmallArrayOp = 237-primOpTag WriteSmallArrayOp = 238-primOpTag SizeofSmallArrayOp = 239-primOpTag SizeofSmallMutableArrayOp = 240-primOpTag IndexSmallArrayOp = 241-primOpTag UnsafeFreezeSmallArrayOp = 242-primOpTag UnsafeThawSmallArrayOp = 243-primOpTag CopySmallArrayOp = 244-primOpTag CopySmallMutableArrayOp = 245-primOpTag CloneSmallArrayOp = 246-primOpTag CloneSmallMutableArrayOp = 247-primOpTag FreezeSmallArrayOp = 248-primOpTag ThawSmallArrayOp = 249-primOpTag CasSmallArrayOp = 250-primOpTag NewByteArrayOp_Char = 251-primOpTag NewPinnedByteArrayOp_Char = 252-primOpTag NewAlignedPinnedByteArrayOp_Char = 253-primOpTag MutableByteArrayIsPinnedOp = 254-primOpTag ByteArrayIsPinnedOp = 255-primOpTag ByteArrayContents_Char = 256-primOpTag SameMutableByteArrayOp = 257-primOpTag ShrinkMutableByteArrayOp_Char = 258-primOpTag ResizeMutableByteArrayOp_Char = 259-primOpTag UnsafeFreezeByteArrayOp = 260-primOpTag SizeofByteArrayOp = 261-primOpTag SizeofMutableByteArrayOp = 262-primOpTag GetSizeofMutableByteArrayOp = 263-primOpTag IndexByteArrayOp_Char = 264-primOpTag IndexByteArrayOp_WideChar = 265-primOpTag IndexByteArrayOp_Int = 266-primOpTag IndexByteArrayOp_Word = 267-primOpTag IndexByteArrayOp_Addr = 268-primOpTag IndexByteArrayOp_Float = 269-primOpTag IndexByteArrayOp_Double = 270-primOpTag IndexByteArrayOp_StablePtr = 271-primOpTag IndexByteArrayOp_Int8 = 272-primOpTag IndexByteArrayOp_Int16 = 273-primOpTag IndexByteArrayOp_Int32 = 274-primOpTag IndexByteArrayOp_Int64 = 275-primOpTag IndexByteArrayOp_Word8 = 276-primOpTag IndexByteArrayOp_Word16 = 277-primOpTag IndexByteArrayOp_Word32 = 278-primOpTag IndexByteArrayOp_Word64 = 279-primOpTag IndexByteArrayOp_Word8AsChar = 280-primOpTag IndexByteArrayOp_Word8AsWideChar = 281-primOpTag IndexByteArrayOp_Word8AsAddr = 282-primOpTag IndexByteArrayOp_Word8AsFloat = 283-primOpTag IndexByteArrayOp_Word8AsDouble = 284-primOpTag IndexByteArrayOp_Word8AsStablePtr = 285-primOpTag IndexByteArrayOp_Word8AsInt16 = 286-primOpTag IndexByteArrayOp_Word8AsInt32 = 287-primOpTag IndexByteArrayOp_Word8AsInt64 = 288-primOpTag IndexByteArrayOp_Word8AsInt = 289-primOpTag IndexByteArrayOp_Word8AsWord16 = 290-primOpTag IndexByteArrayOp_Word8AsWord32 = 291-primOpTag IndexByteArrayOp_Word8AsWord64 = 292-primOpTag IndexByteArrayOp_Word8AsWord = 293-primOpTag ReadByteArrayOp_Char = 294-primOpTag ReadByteArrayOp_WideChar = 295-primOpTag ReadByteArrayOp_Int = 296-primOpTag ReadByteArrayOp_Word = 297-primOpTag ReadByteArrayOp_Addr = 298-primOpTag ReadByteArrayOp_Float = 299-primOpTag ReadByteArrayOp_Double = 300-primOpTag ReadByteArrayOp_StablePtr = 301-primOpTag ReadByteArrayOp_Int8 = 302-primOpTag ReadByteArrayOp_Int16 = 303-primOpTag ReadByteArrayOp_Int32 = 304-primOpTag ReadByteArrayOp_Int64 = 305-primOpTag ReadByteArrayOp_Word8 = 306-primOpTag ReadByteArrayOp_Word16 = 307-primOpTag ReadByteArrayOp_Word32 = 308-primOpTag ReadByteArrayOp_Word64 = 309-primOpTag ReadByteArrayOp_Word8AsChar = 310-primOpTag ReadByteArrayOp_Word8AsWideChar = 311-primOpTag ReadByteArrayOp_Word8AsAddr = 312-primOpTag ReadByteArrayOp_Word8AsFloat = 313-primOpTag ReadByteArrayOp_Word8AsDouble = 314-primOpTag ReadByteArrayOp_Word8AsStablePtr = 315-primOpTag ReadByteArrayOp_Word8AsInt16 = 316-primOpTag ReadByteArrayOp_Word8AsInt32 = 317-primOpTag ReadByteArrayOp_Word8AsInt64 = 318-primOpTag ReadByteArrayOp_Word8AsInt = 319-primOpTag ReadByteArrayOp_Word8AsWord16 = 320-primOpTag ReadByteArrayOp_Word8AsWord32 = 321-primOpTag ReadByteArrayOp_Word8AsWord64 = 322-primOpTag ReadByteArrayOp_Word8AsWord = 323-primOpTag WriteByteArrayOp_Char = 324-primOpTag WriteByteArrayOp_WideChar = 325-primOpTag WriteByteArrayOp_Int = 326-primOpTag WriteByteArrayOp_Word = 327-primOpTag WriteByteArrayOp_Addr = 328-primOpTag WriteByteArrayOp_Float = 329-primOpTag WriteByteArrayOp_Double = 330-primOpTag WriteByteArrayOp_StablePtr = 331-primOpTag WriteByteArrayOp_Int8 = 332-primOpTag WriteByteArrayOp_Int16 = 333-primOpTag WriteByteArrayOp_Int32 = 334-primOpTag WriteByteArrayOp_Int64 = 335-primOpTag WriteByteArrayOp_Word8 = 336-primOpTag WriteByteArrayOp_Word16 = 337-primOpTag WriteByteArrayOp_Word32 = 338-primOpTag WriteByteArrayOp_Word64 = 339-primOpTag WriteByteArrayOp_Word8AsChar = 340-primOpTag WriteByteArrayOp_Word8AsWideChar = 341-primOpTag WriteByteArrayOp_Word8AsAddr = 342-primOpTag WriteByteArrayOp_Word8AsFloat = 343-primOpTag WriteByteArrayOp_Word8AsDouble = 344-primOpTag WriteByteArrayOp_Word8AsStablePtr = 345-primOpTag WriteByteArrayOp_Word8AsInt16 = 346-primOpTag WriteByteArrayOp_Word8AsInt32 = 347-primOpTag WriteByteArrayOp_Word8AsInt64 = 348-primOpTag WriteByteArrayOp_Word8AsInt = 349-primOpTag WriteByteArrayOp_Word8AsWord16 = 350-primOpTag WriteByteArrayOp_Word8AsWord32 = 351-primOpTag WriteByteArrayOp_Word8AsWord64 = 352-primOpTag WriteByteArrayOp_Word8AsWord = 353-primOpTag CompareByteArraysOp = 354-primOpTag CopyByteArrayOp = 355-primOpTag CopyMutableByteArrayOp = 356-primOpTag CopyByteArrayToAddrOp = 357-primOpTag CopyMutableByteArrayToAddrOp = 358-primOpTag CopyAddrToByteArrayOp = 359-primOpTag SetByteArrayOp = 360-primOpTag AtomicReadByteArrayOp_Int = 361-primOpTag AtomicWriteByteArrayOp_Int = 362-primOpTag CasByteArrayOp_Int = 363-primOpTag FetchAddByteArrayOp_Int = 364-primOpTag FetchSubByteArrayOp_Int = 365-primOpTag FetchAndByteArrayOp_Int = 366-primOpTag FetchNandByteArrayOp_Int = 367-primOpTag FetchOrByteArrayOp_Int = 368-primOpTag FetchXorByteArrayOp_Int = 369-primOpTag NewArrayArrayOp = 370-primOpTag SameMutableArrayArrayOp = 371-primOpTag UnsafeFreezeArrayArrayOp = 372-primOpTag SizeofArrayArrayOp = 373-primOpTag SizeofMutableArrayArrayOp = 374-primOpTag IndexArrayArrayOp_ByteArray = 375-primOpTag IndexArrayArrayOp_ArrayArray = 376-primOpTag ReadArrayArrayOp_ByteArray = 377-primOpTag ReadArrayArrayOp_MutableByteArray = 378-primOpTag ReadArrayArrayOp_ArrayArray = 379-primOpTag ReadArrayArrayOp_MutableArrayArray = 380-primOpTag WriteArrayArrayOp_ByteArray = 381-primOpTag WriteArrayArrayOp_MutableByteArray = 382-primOpTag WriteArrayArrayOp_ArrayArray = 383-primOpTag WriteArrayArrayOp_MutableArrayArray = 384-primOpTag CopyArrayArrayOp = 385-primOpTag CopyMutableArrayArrayOp = 386-primOpTag AddrAddOp = 387-primOpTag AddrSubOp = 388-primOpTag AddrRemOp = 389-primOpTag Addr2IntOp = 390-primOpTag Int2AddrOp = 391-primOpTag AddrGtOp = 392-primOpTag AddrGeOp = 393-primOpTag AddrEqOp = 394-primOpTag AddrNeOp = 395-primOpTag AddrLtOp = 396-primOpTag AddrLeOp = 397-primOpTag IndexOffAddrOp_Char = 398-primOpTag IndexOffAddrOp_WideChar = 399-primOpTag IndexOffAddrOp_Int = 400-primOpTag IndexOffAddrOp_Word = 401-primOpTag IndexOffAddrOp_Addr = 402-primOpTag IndexOffAddrOp_Float = 403-primOpTag IndexOffAddrOp_Double = 404-primOpTag IndexOffAddrOp_StablePtr = 405-primOpTag IndexOffAddrOp_Int8 = 406-primOpTag IndexOffAddrOp_Int16 = 407-primOpTag IndexOffAddrOp_Int32 = 408-primOpTag IndexOffAddrOp_Int64 = 409-primOpTag IndexOffAddrOp_Word8 = 410-primOpTag IndexOffAddrOp_Word16 = 411-primOpTag IndexOffAddrOp_Word32 = 412-primOpTag IndexOffAddrOp_Word64 = 413-primOpTag ReadOffAddrOp_Char = 414-primOpTag ReadOffAddrOp_WideChar = 415-primOpTag ReadOffAddrOp_Int = 416-primOpTag ReadOffAddrOp_Word = 417-primOpTag ReadOffAddrOp_Addr = 418-primOpTag ReadOffAddrOp_Float = 419-primOpTag ReadOffAddrOp_Double = 420-primOpTag ReadOffAddrOp_StablePtr = 421-primOpTag ReadOffAddrOp_Int8 = 422-primOpTag ReadOffAddrOp_Int16 = 423-primOpTag ReadOffAddrOp_Int32 = 424-primOpTag ReadOffAddrOp_Int64 = 425-primOpTag ReadOffAddrOp_Word8 = 426-primOpTag ReadOffAddrOp_Word16 = 427-primOpTag ReadOffAddrOp_Word32 = 428-primOpTag ReadOffAddrOp_Word64 = 429-primOpTag WriteOffAddrOp_Char = 430-primOpTag WriteOffAddrOp_WideChar = 431-primOpTag WriteOffAddrOp_Int = 432-primOpTag WriteOffAddrOp_Word = 433-primOpTag WriteOffAddrOp_Addr = 434-primOpTag WriteOffAddrOp_Float = 435-primOpTag WriteOffAddrOp_Double = 436-primOpTag WriteOffAddrOp_StablePtr = 437-primOpTag WriteOffAddrOp_Int8 = 438-primOpTag WriteOffAddrOp_Int16 = 439-primOpTag WriteOffAddrOp_Int32 = 440-primOpTag WriteOffAddrOp_Int64 = 441-primOpTag WriteOffAddrOp_Word8 = 442-primOpTag WriteOffAddrOp_Word16 = 443-primOpTag WriteOffAddrOp_Word32 = 444-primOpTag WriteOffAddrOp_Word64 = 445-primOpTag NewMutVarOp = 446-primOpTag ReadMutVarOp = 447-primOpTag WriteMutVarOp = 448-primOpTag SameMutVarOp = 449-primOpTag AtomicModifyMutVar2Op = 450-primOpTag AtomicModifyMutVar_Op = 451-primOpTag CasMutVarOp = 452-primOpTag CatchOp = 453-primOpTag RaiseOp = 454-primOpTag RaiseIOOp = 455-primOpTag MaskAsyncExceptionsOp = 456-primOpTag MaskUninterruptibleOp = 457-primOpTag UnmaskAsyncExceptionsOp = 458-primOpTag MaskStatus = 459-primOpTag AtomicallyOp = 460-primOpTag RetryOp = 461-primOpTag CatchRetryOp = 462-primOpTag CatchSTMOp = 463-primOpTag NewTVarOp = 464-primOpTag ReadTVarOp = 465-primOpTag ReadTVarIOOp = 466-primOpTag WriteTVarOp = 467-primOpTag SameTVarOp = 468-primOpTag NewMVarOp = 469-primOpTag TakeMVarOp = 470-primOpTag TryTakeMVarOp = 471-primOpTag PutMVarOp = 472-primOpTag TryPutMVarOp = 473-primOpTag ReadMVarOp = 474-primOpTag TryReadMVarOp = 475-primOpTag SameMVarOp = 476-primOpTag IsEmptyMVarOp = 477-primOpTag DelayOp = 478-primOpTag WaitReadOp = 479-primOpTag WaitWriteOp = 480-primOpTag ForkOp = 481-primOpTag ForkOnOp = 482-primOpTag KillThreadOp = 483-primOpTag YieldOp = 484-primOpTag MyThreadIdOp = 485-primOpTag LabelThreadOp = 486-primOpTag IsCurrentThreadBoundOp = 487-primOpTag NoDuplicateOp = 488-primOpTag ThreadStatusOp = 489-primOpTag MkWeakOp = 490-primOpTag MkWeakNoFinalizerOp = 491-primOpTag AddCFinalizerToWeakOp = 492-primOpTag DeRefWeakOp = 493-primOpTag FinalizeWeakOp = 494-primOpTag TouchOp = 495-primOpTag MakeStablePtrOp = 496-primOpTag DeRefStablePtrOp = 497-primOpTag EqStablePtrOp = 498-primOpTag MakeStableNameOp = 499-primOpTag EqStableNameOp = 500-primOpTag StableNameToIntOp = 501-primOpTag CompactNewOp = 502-primOpTag CompactResizeOp = 503-primOpTag CompactContainsOp = 504-primOpTag CompactContainsAnyOp = 505-primOpTag CompactGetFirstBlockOp = 506-primOpTag CompactGetNextBlockOp = 507-primOpTag CompactAllocateBlockOp = 508-primOpTag CompactFixupPointersOp = 509-primOpTag CompactAdd = 510-primOpTag CompactAddWithSharing = 511-primOpTag CompactSize = 512-primOpTag ReallyUnsafePtrEqualityOp = 513-primOpTag ParOp = 514-primOpTag SparkOp = 515-primOpTag SeqOp = 516-primOpTag GetSparkOp = 517-primOpTag NumSparks = 518-primOpTag DataToTagOp = 519-primOpTag TagToEnumOp = 520-primOpTag AddrToAnyOp = 521-primOpTag AnyToAddrOp = 522-primOpTag MkApUpd0_Op = 523-primOpTag NewBCOOp = 524-primOpTag UnpackClosureOp = 525-primOpTag GetApStackValOp = 526-primOpTag GetCCSOfOp = 527-primOpTag GetCurrentCCSOp = 528-primOpTag ClearCCSOp = 529-primOpTag TraceEventOp = 530-primOpTag TraceEventBinaryOp = 531-primOpTag TraceMarkerOp = 532-primOpTag GetThreadAllocationCounter = 533-primOpTag SetThreadAllocationCounter = 534-primOpTag (VecBroadcastOp IntVec 16 W8) = 535-primOpTag (VecBroadcastOp IntVec 8 W16) = 536-primOpTag (VecBroadcastOp IntVec 4 W32) = 537-primOpTag (VecBroadcastOp IntVec 2 W64) = 538-primOpTag (VecBroadcastOp IntVec 32 W8) = 539-primOpTag (VecBroadcastOp IntVec 16 W16) = 540-primOpTag (VecBroadcastOp IntVec 8 W32) = 541-primOpTag (VecBroadcastOp IntVec 4 W64) = 542-primOpTag (VecBroadcastOp IntVec 64 W8) = 543-primOpTag (VecBroadcastOp IntVec 32 W16) = 544-primOpTag (VecBroadcastOp IntVec 16 W32) = 545-primOpTag (VecBroadcastOp IntVec 8 W64) = 546-primOpTag (VecBroadcastOp WordVec 16 W8) = 547-primOpTag (VecBroadcastOp WordVec 8 W16) = 548-primOpTag (VecBroadcastOp WordVec 4 W32) = 549-primOpTag (VecBroadcastOp WordVec 2 W64) = 550-primOpTag (VecBroadcastOp WordVec 32 W8) = 551-primOpTag (VecBroadcastOp WordVec 16 W16) = 552-primOpTag (VecBroadcastOp WordVec 8 W32) = 553-primOpTag (VecBroadcastOp WordVec 4 W64) = 554-primOpTag (VecBroadcastOp WordVec 64 W8) = 555-primOpTag (VecBroadcastOp WordVec 32 W16) = 556-primOpTag (VecBroadcastOp WordVec 16 W32) = 557-primOpTag (VecBroadcastOp WordVec 8 W64) = 558-primOpTag (VecBroadcastOp FloatVec 4 W32) = 559-primOpTag (VecBroadcastOp FloatVec 2 W64) = 560-primOpTag (VecBroadcastOp FloatVec 8 W32) = 561-primOpTag (VecBroadcastOp FloatVec 4 W64) = 562-primOpTag (VecBroadcastOp FloatVec 16 W32) = 563-primOpTag (VecBroadcastOp FloatVec 8 W64) = 564-primOpTag (VecPackOp IntVec 16 W8) = 565-primOpTag (VecPackOp IntVec 8 W16) = 566-primOpTag (VecPackOp IntVec 4 W32) = 567-primOpTag (VecPackOp IntVec 2 W64) = 568-primOpTag (VecPackOp IntVec 32 W8) = 569-primOpTag (VecPackOp IntVec 16 W16) = 570-primOpTag (VecPackOp IntVec 8 W32) = 571-primOpTag (VecPackOp IntVec 4 W64) = 572-primOpTag (VecPackOp IntVec 64 W8) = 573-primOpTag (VecPackOp IntVec 32 W16) = 574-primOpTag (VecPackOp IntVec 16 W32) = 575-primOpTag (VecPackOp IntVec 8 W64) = 576-primOpTag (VecPackOp WordVec 16 W8) = 577-primOpTag (VecPackOp WordVec 8 W16) = 578-primOpTag (VecPackOp WordVec 4 W32) = 579-primOpTag (VecPackOp WordVec 2 W64) = 580-primOpTag (VecPackOp WordVec 32 W8) = 581-primOpTag (VecPackOp WordVec 16 W16) = 582-primOpTag (VecPackOp WordVec 8 W32) = 583-primOpTag (VecPackOp WordVec 4 W64) = 584-primOpTag (VecPackOp WordVec 64 W8) = 585-primOpTag (VecPackOp WordVec 32 W16) = 586-primOpTag (VecPackOp WordVec 16 W32) = 587-primOpTag (VecPackOp WordVec 8 W64) = 588-primOpTag (VecPackOp FloatVec 4 W32) = 589-primOpTag (VecPackOp FloatVec 2 W64) = 590-primOpTag (VecPackOp FloatVec 8 W32) = 591-primOpTag (VecPackOp FloatVec 4 W64) = 592-primOpTag (VecPackOp FloatVec 16 W32) = 593-primOpTag (VecPackOp FloatVec 8 W64) = 594-primOpTag (VecUnpackOp IntVec 16 W8) = 595-primOpTag (VecUnpackOp IntVec 8 W16) = 596-primOpTag (VecUnpackOp IntVec 4 W32) = 597-primOpTag (VecUnpackOp IntVec 2 W64) = 598-primOpTag (VecUnpackOp IntVec 32 W8) = 599-primOpTag (VecUnpackOp IntVec 16 W16) = 600-primOpTag (VecUnpackOp IntVec 8 W32) = 601-primOpTag (VecUnpackOp IntVec 4 W64) = 602-primOpTag (VecUnpackOp IntVec 64 W8) = 603-primOpTag (VecUnpackOp IntVec 32 W16) = 604-primOpTag (VecUnpackOp IntVec 16 W32) = 605-primOpTag (VecUnpackOp IntVec 8 W64) = 606-primOpTag (VecUnpackOp WordVec 16 W8) = 607-primOpTag (VecUnpackOp WordVec 8 W16) = 608-primOpTag (VecUnpackOp WordVec 4 W32) = 609-primOpTag (VecUnpackOp WordVec 2 W64) = 610-primOpTag (VecUnpackOp WordVec 32 W8) = 611-primOpTag (VecUnpackOp WordVec 16 W16) = 612-primOpTag (VecUnpackOp WordVec 8 W32) = 613-primOpTag (VecUnpackOp WordVec 4 W64) = 614-primOpTag (VecUnpackOp WordVec 64 W8) = 615-primOpTag (VecUnpackOp WordVec 32 W16) = 616-primOpTag (VecUnpackOp WordVec 16 W32) = 617-primOpTag (VecUnpackOp WordVec 8 W64) = 618-primOpTag (VecUnpackOp FloatVec 4 W32) = 619-primOpTag (VecUnpackOp FloatVec 2 W64) = 620-primOpTag (VecUnpackOp FloatVec 8 W32) = 621-primOpTag (VecUnpackOp FloatVec 4 W64) = 622-primOpTag (VecUnpackOp FloatVec 16 W32) = 623-primOpTag (VecUnpackOp FloatVec 8 W64) = 624-primOpTag (VecInsertOp IntVec 16 W8) = 625-primOpTag (VecInsertOp IntVec 8 W16) = 626-primOpTag (VecInsertOp IntVec 4 W32) = 627-primOpTag (VecInsertOp IntVec 2 W64) = 628-primOpTag (VecInsertOp IntVec 32 W8) = 629-primOpTag (VecInsertOp IntVec 16 W16) = 630-primOpTag (VecInsertOp IntVec 8 W32) = 631-primOpTag (VecInsertOp IntVec 4 W64) = 632-primOpTag (VecInsertOp IntVec 64 W8) = 633-primOpTag (VecInsertOp IntVec 32 W16) = 634-primOpTag (VecInsertOp IntVec 16 W32) = 635-primOpTag (VecInsertOp IntVec 8 W64) = 636-primOpTag (VecInsertOp WordVec 16 W8) = 637-primOpTag (VecInsertOp WordVec 8 W16) = 638-primOpTag (VecInsertOp WordVec 4 W32) = 639-primOpTag (VecInsertOp WordVec 2 W64) = 640-primOpTag (VecInsertOp WordVec 32 W8) = 641-primOpTag (VecInsertOp WordVec 16 W16) = 642-primOpTag (VecInsertOp WordVec 8 W32) = 643-primOpTag (VecInsertOp WordVec 4 W64) = 644-primOpTag (VecInsertOp WordVec 64 W8) = 645-primOpTag (VecInsertOp WordVec 32 W16) = 646-primOpTag (VecInsertOp WordVec 16 W32) = 647-primOpTag (VecInsertOp WordVec 8 W64) = 648-primOpTag (VecInsertOp FloatVec 4 W32) = 649-primOpTag (VecInsertOp FloatVec 2 W64) = 650-primOpTag (VecInsertOp FloatVec 8 W32) = 651-primOpTag (VecInsertOp FloatVec 4 W64) = 652-primOpTag (VecInsertOp FloatVec 16 W32) = 653-primOpTag (VecInsertOp FloatVec 8 W64) = 654-primOpTag (VecAddOp IntVec 16 W8) = 655-primOpTag (VecAddOp IntVec 8 W16) = 656-primOpTag (VecAddOp IntVec 4 W32) = 657-primOpTag (VecAddOp IntVec 2 W64) = 658-primOpTag (VecAddOp IntVec 32 W8) = 659-primOpTag (VecAddOp IntVec 16 W16) = 660-primOpTag (VecAddOp IntVec 8 W32) = 661-primOpTag (VecAddOp IntVec 4 W64) = 662-primOpTag (VecAddOp IntVec 64 W8) = 663-primOpTag (VecAddOp IntVec 32 W16) = 664-primOpTag (VecAddOp IntVec 16 W32) = 665-primOpTag (VecAddOp IntVec 8 W64) = 666-primOpTag (VecAddOp WordVec 16 W8) = 667-primOpTag (VecAddOp WordVec 8 W16) = 668-primOpTag (VecAddOp WordVec 4 W32) = 669-primOpTag (VecAddOp WordVec 2 W64) = 670-primOpTag (VecAddOp WordVec 32 W8) = 671-primOpTag (VecAddOp WordVec 16 W16) = 672-primOpTag (VecAddOp WordVec 8 W32) = 673-primOpTag (VecAddOp WordVec 4 W64) = 674-primOpTag (VecAddOp WordVec 64 W8) = 675-primOpTag (VecAddOp WordVec 32 W16) = 676-primOpTag (VecAddOp WordVec 16 W32) = 677-primOpTag (VecAddOp WordVec 8 W64) = 678-primOpTag (VecAddOp FloatVec 4 W32) = 679-primOpTag (VecAddOp FloatVec 2 W64) = 680-primOpTag (VecAddOp FloatVec 8 W32) = 681-primOpTag (VecAddOp FloatVec 4 W64) = 682-primOpTag (VecAddOp FloatVec 16 W32) = 683-primOpTag (VecAddOp FloatVec 8 W64) = 684-primOpTag (VecSubOp IntVec 16 W8) = 685-primOpTag (VecSubOp IntVec 8 W16) = 686-primOpTag (VecSubOp IntVec 4 W32) = 687-primOpTag (VecSubOp IntVec 2 W64) = 688-primOpTag (VecSubOp IntVec 32 W8) = 689-primOpTag (VecSubOp IntVec 16 W16) = 690-primOpTag (VecSubOp IntVec 8 W32) = 691-primOpTag (VecSubOp IntVec 4 W64) = 692-primOpTag (VecSubOp IntVec 64 W8) = 693-primOpTag (VecSubOp IntVec 32 W16) = 694-primOpTag (VecSubOp IntVec 16 W32) = 695-primOpTag (VecSubOp IntVec 8 W64) = 696-primOpTag (VecSubOp WordVec 16 W8) = 697-primOpTag (VecSubOp WordVec 8 W16) = 698-primOpTag (VecSubOp WordVec 4 W32) = 699-primOpTag (VecSubOp WordVec 2 W64) = 700-primOpTag (VecSubOp WordVec 32 W8) = 701-primOpTag (VecSubOp WordVec 16 W16) = 702-primOpTag (VecSubOp WordVec 8 W32) = 703-primOpTag (VecSubOp WordVec 4 W64) = 704-primOpTag (VecSubOp WordVec 64 W8) = 705-primOpTag (VecSubOp WordVec 32 W16) = 706-primOpTag (VecSubOp WordVec 16 W32) = 707-primOpTag (VecSubOp WordVec 8 W64) = 708-primOpTag (VecSubOp FloatVec 4 W32) = 709-primOpTag (VecSubOp FloatVec 2 W64) = 710-primOpTag (VecSubOp FloatVec 8 W32) = 711-primOpTag (VecSubOp FloatVec 4 W64) = 712-primOpTag (VecSubOp FloatVec 16 W32) = 713-primOpTag (VecSubOp FloatVec 8 W64) = 714-primOpTag (VecMulOp IntVec 16 W8) = 715-primOpTag (VecMulOp IntVec 8 W16) = 716-primOpTag (VecMulOp IntVec 4 W32) = 717-primOpTag (VecMulOp IntVec 2 W64) = 718-primOpTag (VecMulOp IntVec 32 W8) = 719-primOpTag (VecMulOp IntVec 16 W16) = 720-primOpTag (VecMulOp IntVec 8 W32) = 721-primOpTag (VecMulOp IntVec 4 W64) = 722-primOpTag (VecMulOp IntVec 64 W8) = 723-primOpTag (VecMulOp IntVec 32 W16) = 724-primOpTag (VecMulOp IntVec 16 W32) = 725-primOpTag (VecMulOp IntVec 8 W64) = 726-primOpTag (VecMulOp WordVec 16 W8) = 727-primOpTag (VecMulOp WordVec 8 W16) = 728-primOpTag (VecMulOp WordVec 4 W32) = 729-primOpTag (VecMulOp WordVec 2 W64) = 730-primOpTag (VecMulOp WordVec 32 W8) = 731-primOpTag (VecMulOp WordVec 16 W16) = 732-primOpTag (VecMulOp WordVec 8 W32) = 733-primOpTag (VecMulOp WordVec 4 W64) = 734-primOpTag (VecMulOp WordVec 64 W8) = 735-primOpTag (VecMulOp WordVec 32 W16) = 736-primOpTag (VecMulOp WordVec 16 W32) = 737-primOpTag (VecMulOp WordVec 8 W64) = 738-primOpTag (VecMulOp FloatVec 4 W32) = 739-primOpTag (VecMulOp FloatVec 2 W64) = 740-primOpTag (VecMulOp FloatVec 8 W32) = 741-primOpTag (VecMulOp FloatVec 4 W64) = 742-primOpTag (VecMulOp FloatVec 16 W32) = 743-primOpTag (VecMulOp FloatVec 8 W64) = 744-primOpTag (VecDivOp FloatVec 4 W32) = 745-primOpTag (VecDivOp FloatVec 2 W64) = 746-primOpTag (VecDivOp FloatVec 8 W32) = 747-primOpTag (VecDivOp FloatVec 4 W64) = 748-primOpTag (VecDivOp FloatVec 16 W32) = 749-primOpTag (VecDivOp FloatVec 8 W64) = 750-primOpTag (VecQuotOp IntVec 16 W8) = 751-primOpTag (VecQuotOp IntVec 8 W16) = 752-primOpTag (VecQuotOp IntVec 4 W32) = 753-primOpTag (VecQuotOp IntVec 2 W64) = 754-primOpTag (VecQuotOp IntVec 32 W8) = 755-primOpTag (VecQuotOp IntVec 16 W16) = 756-primOpTag (VecQuotOp IntVec 8 W32) = 757-primOpTag (VecQuotOp IntVec 4 W64) = 758-primOpTag (VecQuotOp IntVec 64 W8) = 759-primOpTag (VecQuotOp IntVec 32 W16) = 760-primOpTag (VecQuotOp IntVec 16 W32) = 761-primOpTag (VecQuotOp IntVec 8 W64) = 762-primOpTag (VecQuotOp WordVec 16 W8) = 763-primOpTag (VecQuotOp WordVec 8 W16) = 764-primOpTag (VecQuotOp WordVec 4 W32) = 765-primOpTag (VecQuotOp WordVec 2 W64) = 766-primOpTag (VecQuotOp WordVec 32 W8) = 767-primOpTag (VecQuotOp WordVec 16 W16) = 768-primOpTag (VecQuotOp WordVec 8 W32) = 769-primOpTag (VecQuotOp WordVec 4 W64) = 770-primOpTag (VecQuotOp WordVec 64 W8) = 771-primOpTag (VecQuotOp WordVec 32 W16) = 772-primOpTag (VecQuotOp WordVec 16 W32) = 773-primOpTag (VecQuotOp WordVec 8 W64) = 774-primOpTag (VecRemOp IntVec 16 W8) = 775-primOpTag (VecRemOp IntVec 8 W16) = 776-primOpTag (VecRemOp IntVec 4 W32) = 777-primOpTag (VecRemOp IntVec 2 W64) = 778-primOpTag (VecRemOp IntVec 32 W8) = 779-primOpTag (VecRemOp IntVec 16 W16) = 780-primOpTag (VecRemOp IntVec 8 W32) = 781-primOpTag (VecRemOp IntVec 4 W64) = 782-primOpTag (VecRemOp IntVec 64 W8) = 783-primOpTag (VecRemOp IntVec 32 W16) = 784-primOpTag (VecRemOp IntVec 16 W32) = 785-primOpTag (VecRemOp IntVec 8 W64) = 786-primOpTag (VecRemOp WordVec 16 W8) = 787-primOpTag (VecRemOp WordVec 8 W16) = 788-primOpTag (VecRemOp WordVec 4 W32) = 789-primOpTag (VecRemOp WordVec 2 W64) = 790-primOpTag (VecRemOp WordVec 32 W8) = 791-primOpTag (VecRemOp WordVec 16 W16) = 792-primOpTag (VecRemOp WordVec 8 W32) = 793-primOpTag (VecRemOp WordVec 4 W64) = 794-primOpTag (VecRemOp WordVec 64 W8) = 795-primOpTag (VecRemOp WordVec 32 W16) = 796-primOpTag (VecRemOp WordVec 16 W32) = 797-primOpTag (VecRemOp WordVec 8 W64) = 798-primOpTag (VecNegOp IntVec 16 W8) = 799-primOpTag (VecNegOp IntVec 8 W16) = 800-primOpTag (VecNegOp IntVec 4 W32) = 801-primOpTag (VecNegOp IntVec 2 W64) = 802-primOpTag (VecNegOp IntVec 32 W8) = 803-primOpTag (VecNegOp IntVec 16 W16) = 804-primOpTag (VecNegOp IntVec 8 W32) = 805-primOpTag (VecNegOp IntVec 4 W64) = 806-primOpTag (VecNegOp IntVec 64 W8) = 807-primOpTag (VecNegOp IntVec 32 W16) = 808-primOpTag (VecNegOp IntVec 16 W32) = 809-primOpTag (VecNegOp IntVec 8 W64) = 810-primOpTag (VecNegOp FloatVec 4 W32) = 811-primOpTag (VecNegOp FloatVec 2 W64) = 812-primOpTag (VecNegOp FloatVec 8 W32) = 813-primOpTag (VecNegOp FloatVec 4 W64) = 814-primOpTag (VecNegOp FloatVec 16 W32) = 815-primOpTag (VecNegOp FloatVec 8 W64) = 816-primOpTag (VecIndexByteArrayOp IntVec 16 W8) = 817-primOpTag (VecIndexByteArrayOp IntVec 8 W16) = 818-primOpTag (VecIndexByteArrayOp IntVec 4 W32) = 819-primOpTag (VecIndexByteArrayOp IntVec 2 W64) = 820-primOpTag (VecIndexByteArrayOp IntVec 32 W8) = 821-primOpTag (VecIndexByteArrayOp IntVec 16 W16) = 822-primOpTag (VecIndexByteArrayOp IntVec 8 W32) = 823-primOpTag (VecIndexByteArrayOp IntVec 4 W64) = 824-primOpTag (VecIndexByteArrayOp IntVec 64 W8) = 825-primOpTag (VecIndexByteArrayOp IntVec 32 W16) = 826-primOpTag (VecIndexByteArrayOp IntVec 16 W32) = 827-primOpTag (VecIndexByteArrayOp IntVec 8 W64) = 828-primOpTag (VecIndexByteArrayOp WordVec 16 W8) = 829-primOpTag (VecIndexByteArrayOp WordVec 8 W16) = 830-primOpTag (VecIndexByteArrayOp WordVec 4 W32) = 831-primOpTag (VecIndexByteArrayOp WordVec 2 W64) = 832-primOpTag (VecIndexByteArrayOp WordVec 32 W8) = 833-primOpTag (VecIndexByteArrayOp WordVec 16 W16) = 834-primOpTag (VecIndexByteArrayOp WordVec 8 W32) = 835-primOpTag (VecIndexByteArrayOp WordVec 4 W64) = 836-primOpTag (VecIndexByteArrayOp WordVec 64 W8) = 837-primOpTag (VecIndexByteArrayOp WordVec 32 W16) = 838-primOpTag (VecIndexByteArrayOp WordVec 16 W32) = 839-primOpTag (VecIndexByteArrayOp WordVec 8 W64) = 840-primOpTag (VecIndexByteArrayOp FloatVec 4 W32) = 841-primOpTag (VecIndexByteArrayOp FloatVec 2 W64) = 842-primOpTag (VecIndexByteArrayOp FloatVec 8 W32) = 843-primOpTag (VecIndexByteArrayOp FloatVec 4 W64) = 844-primOpTag (VecIndexByteArrayOp FloatVec 16 W32) = 845-primOpTag (VecIndexByteArrayOp FloatVec 8 W64) = 846-primOpTag (VecReadByteArrayOp IntVec 16 W8) = 847-primOpTag (VecReadByteArrayOp IntVec 8 W16) = 848-primOpTag (VecReadByteArrayOp IntVec 4 W32) = 849-primOpTag (VecReadByteArrayOp IntVec 2 W64) = 850-primOpTag (VecReadByteArrayOp IntVec 32 W8) = 851-primOpTag (VecReadByteArrayOp IntVec 16 W16) = 852-primOpTag (VecReadByteArrayOp IntVec 8 W32) = 853-primOpTag (VecReadByteArrayOp IntVec 4 W64) = 854-primOpTag (VecReadByteArrayOp IntVec 64 W8) = 855-primOpTag (VecReadByteArrayOp IntVec 32 W16) = 856-primOpTag (VecReadByteArrayOp IntVec 16 W32) = 857-primOpTag (VecReadByteArrayOp IntVec 8 W64) = 858-primOpTag (VecReadByteArrayOp WordVec 16 W8) = 859-primOpTag (VecReadByteArrayOp WordVec 8 W16) = 860-primOpTag (VecReadByteArrayOp WordVec 4 W32) = 861-primOpTag (VecReadByteArrayOp WordVec 2 W64) = 862-primOpTag (VecReadByteArrayOp WordVec 32 W8) = 863-primOpTag (VecReadByteArrayOp WordVec 16 W16) = 864-primOpTag (VecReadByteArrayOp WordVec 8 W32) = 865-primOpTag (VecReadByteArrayOp WordVec 4 W64) = 866-primOpTag (VecReadByteArrayOp WordVec 64 W8) = 867-primOpTag (VecReadByteArrayOp WordVec 32 W16) = 868-primOpTag (VecReadByteArrayOp WordVec 16 W32) = 869-primOpTag (VecReadByteArrayOp WordVec 8 W64) = 870-primOpTag (VecReadByteArrayOp FloatVec 4 W32) = 871-primOpTag (VecReadByteArrayOp FloatVec 2 W64) = 872-primOpTag (VecReadByteArrayOp FloatVec 8 W32) = 873-primOpTag (VecReadByteArrayOp FloatVec 4 W64) = 874-primOpTag (VecReadByteArrayOp FloatVec 16 W32) = 875-primOpTag (VecReadByteArrayOp FloatVec 8 W64) = 876-primOpTag (VecWriteByteArrayOp IntVec 16 W8) = 877-primOpTag (VecWriteByteArrayOp IntVec 8 W16) = 878-primOpTag (VecWriteByteArrayOp IntVec 4 W32) = 879-primOpTag (VecWriteByteArrayOp IntVec 2 W64) = 880-primOpTag (VecWriteByteArrayOp IntVec 32 W8) = 881-primOpTag (VecWriteByteArrayOp IntVec 16 W16) = 882-primOpTag (VecWriteByteArrayOp IntVec 8 W32) = 883-primOpTag (VecWriteByteArrayOp IntVec 4 W64) = 884-primOpTag (VecWriteByteArrayOp IntVec 64 W8) = 885-primOpTag (VecWriteByteArrayOp IntVec 32 W16) = 886-primOpTag (VecWriteByteArrayOp IntVec 16 W32) = 887-primOpTag (VecWriteByteArrayOp IntVec 8 W64) = 888-primOpTag (VecWriteByteArrayOp WordVec 16 W8) = 889-primOpTag (VecWriteByteArrayOp WordVec 8 W16) = 890-primOpTag (VecWriteByteArrayOp WordVec 4 W32) = 891-primOpTag (VecWriteByteArrayOp WordVec 2 W64) = 892-primOpTag (VecWriteByteArrayOp WordVec 32 W8) = 893-primOpTag (VecWriteByteArrayOp WordVec 16 W16) = 894-primOpTag (VecWriteByteArrayOp WordVec 8 W32) = 895-primOpTag (VecWriteByteArrayOp WordVec 4 W64) = 896-primOpTag (VecWriteByteArrayOp WordVec 64 W8) = 897-primOpTag (VecWriteByteArrayOp WordVec 32 W16) = 898-primOpTag (VecWriteByteArrayOp WordVec 16 W32) = 899-primOpTag (VecWriteByteArrayOp WordVec 8 W64) = 900-primOpTag (VecWriteByteArrayOp FloatVec 4 W32) = 901-primOpTag (VecWriteByteArrayOp FloatVec 2 W64) = 902-primOpTag (VecWriteByteArrayOp FloatVec 8 W32) = 903-primOpTag (VecWriteByteArrayOp FloatVec 4 W64) = 904-primOpTag (VecWriteByteArrayOp FloatVec 16 W32) = 905-primOpTag (VecWriteByteArrayOp FloatVec 8 W64) = 906-primOpTag (VecIndexOffAddrOp IntVec 16 W8) = 907-primOpTag (VecIndexOffAddrOp IntVec 8 W16) = 908-primOpTag (VecIndexOffAddrOp IntVec 4 W32) = 909-primOpTag (VecIndexOffAddrOp IntVec 2 W64) = 910-primOpTag (VecIndexOffAddrOp IntVec 32 W8) = 911-primOpTag (VecIndexOffAddrOp IntVec 16 W16) = 912-primOpTag (VecIndexOffAddrOp IntVec 8 W32) = 913-primOpTag (VecIndexOffAddrOp IntVec 4 W64) = 914-primOpTag (VecIndexOffAddrOp IntVec 64 W8) = 915-primOpTag (VecIndexOffAddrOp IntVec 32 W16) = 916-primOpTag (VecIndexOffAddrOp IntVec 16 W32) = 917-primOpTag (VecIndexOffAddrOp IntVec 8 W64) = 918-primOpTag (VecIndexOffAddrOp WordVec 16 W8) = 919-primOpTag (VecIndexOffAddrOp WordVec 8 W16) = 920-primOpTag (VecIndexOffAddrOp WordVec 4 W32) = 921-primOpTag (VecIndexOffAddrOp WordVec 2 W64) = 922-primOpTag (VecIndexOffAddrOp WordVec 32 W8) = 923-primOpTag (VecIndexOffAddrOp WordVec 16 W16) = 924-primOpTag (VecIndexOffAddrOp WordVec 8 W32) = 925-primOpTag (VecIndexOffAddrOp WordVec 4 W64) = 926-primOpTag (VecIndexOffAddrOp WordVec 64 W8) = 927-primOpTag (VecIndexOffAddrOp WordVec 32 W16) = 928-primOpTag (VecIndexOffAddrOp WordVec 16 W32) = 929-primOpTag (VecIndexOffAddrOp WordVec 8 W64) = 930-primOpTag (VecIndexOffAddrOp FloatVec 4 W32) = 931-primOpTag (VecIndexOffAddrOp FloatVec 2 W64) = 932-primOpTag (VecIndexOffAddrOp FloatVec 8 W32) = 933-primOpTag (VecIndexOffAddrOp FloatVec 4 W64) = 934-primOpTag (VecIndexOffAddrOp FloatVec 16 W32) = 935-primOpTag (VecIndexOffAddrOp FloatVec 8 W64) = 936-primOpTag (VecReadOffAddrOp IntVec 16 W8) = 937-primOpTag (VecReadOffAddrOp IntVec 8 W16) = 938-primOpTag (VecReadOffAddrOp IntVec 4 W32) = 939-primOpTag (VecReadOffAddrOp IntVec 2 W64) = 940-primOpTag (VecReadOffAddrOp IntVec 32 W8) = 941-primOpTag (VecReadOffAddrOp IntVec 16 W16) = 942-primOpTag (VecReadOffAddrOp IntVec 8 W32) = 943-primOpTag (VecReadOffAddrOp IntVec 4 W64) = 944-primOpTag (VecReadOffAddrOp IntVec 64 W8) = 945-primOpTag (VecReadOffAddrOp IntVec 32 W16) = 946-primOpTag (VecReadOffAddrOp IntVec 16 W32) = 947-primOpTag (VecReadOffAddrOp IntVec 8 W64) = 948-primOpTag (VecReadOffAddrOp WordVec 16 W8) = 949-primOpTag (VecReadOffAddrOp WordVec 8 W16) = 950-primOpTag (VecReadOffAddrOp WordVec 4 W32) = 951-primOpTag (VecReadOffAddrOp WordVec 2 W64) = 952-primOpTag (VecReadOffAddrOp WordVec 32 W8) = 953-primOpTag (VecReadOffAddrOp WordVec 16 W16) = 954-primOpTag (VecReadOffAddrOp WordVec 8 W32) = 955-primOpTag (VecReadOffAddrOp WordVec 4 W64) = 956-primOpTag (VecReadOffAddrOp WordVec 64 W8) = 957-primOpTag (VecReadOffAddrOp WordVec 32 W16) = 958-primOpTag (VecReadOffAddrOp WordVec 16 W32) = 959-primOpTag (VecReadOffAddrOp WordVec 8 W64) = 960-primOpTag (VecReadOffAddrOp FloatVec 4 W32) = 961-primOpTag (VecReadOffAddrOp FloatVec 2 W64) = 962-primOpTag (VecReadOffAddrOp FloatVec 8 W32) = 963-primOpTag (VecReadOffAddrOp FloatVec 4 W64) = 964-primOpTag (VecReadOffAddrOp FloatVec 16 W32) = 965-primOpTag (VecReadOffAddrOp FloatVec 8 W64) = 966-primOpTag (VecWriteOffAddrOp IntVec 16 W8) = 967-primOpTag (VecWriteOffAddrOp IntVec 8 W16) = 968-primOpTag (VecWriteOffAddrOp IntVec 4 W32) = 969-primOpTag (VecWriteOffAddrOp IntVec 2 W64) = 970-primOpTag (VecWriteOffAddrOp IntVec 32 W8) = 971-primOpTag (VecWriteOffAddrOp IntVec 16 W16) = 972-primOpTag (VecWriteOffAddrOp IntVec 8 W32) = 973-primOpTag (VecWriteOffAddrOp IntVec 4 W64) = 974-primOpTag (VecWriteOffAddrOp IntVec 64 W8) = 975-primOpTag (VecWriteOffAddrOp IntVec 32 W16) = 976-primOpTag (VecWriteOffAddrOp IntVec 16 W32) = 977-primOpTag (VecWriteOffAddrOp IntVec 8 W64) = 978-primOpTag (VecWriteOffAddrOp WordVec 16 W8) = 979-primOpTag (VecWriteOffAddrOp WordVec 8 W16) = 980-primOpTag (VecWriteOffAddrOp WordVec 4 W32) = 981-primOpTag (VecWriteOffAddrOp WordVec 2 W64) = 982-primOpTag (VecWriteOffAddrOp WordVec 32 W8) = 983-primOpTag (VecWriteOffAddrOp WordVec 16 W16) = 984-primOpTag (VecWriteOffAddrOp WordVec 8 W32) = 985-primOpTag (VecWriteOffAddrOp WordVec 4 W64) = 986-primOpTag (VecWriteOffAddrOp WordVec 64 W8) = 987-primOpTag (VecWriteOffAddrOp WordVec 32 W16) = 988-primOpTag (VecWriteOffAddrOp WordVec 16 W32) = 989-primOpTag (VecWriteOffAddrOp WordVec 8 W64) = 990-primOpTag (VecWriteOffAddrOp FloatVec 4 W32) = 991-primOpTag (VecWriteOffAddrOp FloatVec 2 W64) = 992-primOpTag (VecWriteOffAddrOp FloatVec 8 W32) = 993-primOpTag (VecWriteOffAddrOp FloatVec 4 W64) = 994-primOpTag (VecWriteOffAddrOp FloatVec 16 W32) = 995-primOpTag (VecWriteOffAddrOp FloatVec 8 W64) = 996-primOpTag (VecIndexScalarByteArrayOp IntVec 16 W8) = 997-primOpTag (VecIndexScalarByteArrayOp IntVec 8 W16) = 998-primOpTag (VecIndexScalarByteArrayOp IntVec 4 W32) = 999-primOpTag (VecIndexScalarByteArrayOp IntVec 2 W64) = 1000-primOpTag (VecIndexScalarByteArrayOp IntVec 32 W8) = 1001-primOpTag (VecIndexScalarByteArrayOp IntVec 16 W16) = 1002-primOpTag (VecIndexScalarByteArrayOp IntVec 8 W32) = 1003-primOpTag (VecIndexScalarByteArrayOp IntVec 4 W64) = 1004-primOpTag (VecIndexScalarByteArrayOp IntVec 64 W8) = 1005-primOpTag (VecIndexScalarByteArrayOp IntVec 32 W16) = 1006-primOpTag (VecIndexScalarByteArrayOp IntVec 16 W32) = 1007-primOpTag (VecIndexScalarByteArrayOp IntVec 8 W64) = 1008-primOpTag (VecIndexScalarByteArrayOp WordVec 16 W8) = 1009-primOpTag (VecIndexScalarByteArrayOp WordVec 8 W16) = 1010-primOpTag (VecIndexScalarByteArrayOp WordVec 4 W32) = 1011-primOpTag (VecIndexScalarByteArrayOp WordVec 2 W64) = 1012-primOpTag (VecIndexScalarByteArrayOp WordVec 32 W8) = 1013-primOpTag (VecIndexScalarByteArrayOp WordVec 16 W16) = 1014-primOpTag (VecIndexScalarByteArrayOp WordVec 8 W32) = 1015-primOpTag (VecIndexScalarByteArrayOp WordVec 4 W64) = 1016-primOpTag (VecIndexScalarByteArrayOp WordVec 64 W8) = 1017-primOpTag (VecIndexScalarByteArrayOp WordVec 32 W16) = 1018-primOpTag (VecIndexScalarByteArrayOp WordVec 16 W32) = 1019-primOpTag (VecIndexScalarByteArrayOp WordVec 8 W64) = 1020-primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W32) = 1021-primOpTag (VecIndexScalarByteArrayOp FloatVec 2 W64) = 1022-primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W32) = 1023-primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W64) = 1024-primOpTag (VecIndexScalarByteArrayOp FloatVec 16 W32) = 1025-primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W64) = 1026-primOpTag (VecReadScalarByteArrayOp IntVec 16 W8) = 1027-primOpTag (VecReadScalarByteArrayOp IntVec 8 W16) = 1028-primOpTag (VecReadScalarByteArrayOp IntVec 4 W32) = 1029-primOpTag (VecReadScalarByteArrayOp IntVec 2 W64) = 1030-primOpTag (VecReadScalarByteArrayOp IntVec 32 W8) = 1031-primOpTag (VecReadScalarByteArrayOp IntVec 16 W16) = 1032-primOpTag (VecReadScalarByteArrayOp IntVec 8 W32) = 1033-primOpTag (VecReadScalarByteArrayOp IntVec 4 W64) = 1034-primOpTag (VecReadScalarByteArrayOp IntVec 64 W8) = 1035-primOpTag (VecReadScalarByteArrayOp IntVec 32 W16) = 1036-primOpTag (VecReadScalarByteArrayOp IntVec 16 W32) = 1037-primOpTag (VecReadScalarByteArrayOp IntVec 8 W64) = 1038-primOpTag (VecReadScalarByteArrayOp WordVec 16 W8) = 1039-primOpTag (VecReadScalarByteArrayOp WordVec 8 W16) = 1040-primOpTag (VecReadScalarByteArrayOp WordVec 4 W32) = 1041-primOpTag (VecReadScalarByteArrayOp WordVec 2 W64) = 1042-primOpTag (VecReadScalarByteArrayOp WordVec 32 W8) = 1043-primOpTag (VecReadScalarByteArrayOp WordVec 16 W16) = 1044-primOpTag (VecReadScalarByteArrayOp WordVec 8 W32) = 1045-primOpTag (VecReadScalarByteArrayOp WordVec 4 W64) = 1046-primOpTag (VecReadScalarByteArrayOp WordVec 64 W8) = 1047-primOpTag (VecReadScalarByteArrayOp WordVec 32 W16) = 1048-primOpTag (VecReadScalarByteArrayOp WordVec 16 W32) = 1049-primOpTag (VecReadScalarByteArrayOp WordVec 8 W64) = 1050-primOpTag (VecReadScalarByteArrayOp FloatVec 4 W32) = 1051-primOpTag (VecReadScalarByteArrayOp FloatVec 2 W64) = 1052-primOpTag (VecReadScalarByteArrayOp FloatVec 8 W32) = 1053-primOpTag (VecReadScalarByteArrayOp FloatVec 4 W64) = 1054-primOpTag (VecReadScalarByteArrayOp FloatVec 16 W32) = 1055-primOpTag (VecReadScalarByteArrayOp FloatVec 8 W64) = 1056-primOpTag (VecWriteScalarByteArrayOp IntVec 16 W8) = 1057-primOpTag (VecWriteScalarByteArrayOp IntVec 8 W16) = 1058-primOpTag (VecWriteScalarByteArrayOp IntVec 4 W32) = 1059-primOpTag (VecWriteScalarByteArrayOp IntVec 2 W64) = 1060-primOpTag (VecWriteScalarByteArrayOp IntVec 32 W8) = 1061-primOpTag (VecWriteScalarByteArrayOp IntVec 16 W16) = 1062-primOpTag (VecWriteScalarByteArrayOp IntVec 8 W32) = 1063-primOpTag (VecWriteScalarByteArrayOp IntVec 4 W64) = 1064-primOpTag (VecWriteScalarByteArrayOp IntVec 64 W8) = 1065-primOpTag (VecWriteScalarByteArrayOp IntVec 32 W16) = 1066-primOpTag (VecWriteScalarByteArrayOp IntVec 16 W32) = 1067-primOpTag (VecWriteScalarByteArrayOp IntVec 8 W64) = 1068-primOpTag (VecWriteScalarByteArrayOp WordVec 16 W8) = 1069-primOpTag (VecWriteScalarByteArrayOp WordVec 8 W16) = 1070-primOpTag (VecWriteScalarByteArrayOp WordVec 4 W32) = 1071-primOpTag (VecWriteScalarByteArrayOp WordVec 2 W64) = 1072-primOpTag (VecWriteScalarByteArrayOp WordVec 32 W8) = 1073-primOpTag (VecWriteScalarByteArrayOp WordVec 16 W16) = 1074-primOpTag (VecWriteScalarByteArrayOp WordVec 8 W32) = 1075-primOpTag (VecWriteScalarByteArrayOp WordVec 4 W64) = 1076-primOpTag (VecWriteScalarByteArrayOp WordVec 64 W8) = 1077-primOpTag (VecWriteScalarByteArrayOp WordVec 32 W16) = 1078-primOpTag (VecWriteScalarByteArrayOp WordVec 16 W32) = 1079-primOpTag (VecWriteScalarByteArrayOp WordVec 8 W64) = 1080-primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W32) = 1081-primOpTag (VecWriteScalarByteArrayOp FloatVec 2 W64) = 1082-primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W32) = 1083-primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W64) = 1084-primOpTag (VecWriteScalarByteArrayOp FloatVec 16 W32) = 1085-primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W64) = 1086-primOpTag (VecIndexScalarOffAddrOp IntVec 16 W8) = 1087-primOpTag (VecIndexScalarOffAddrOp IntVec 8 W16) = 1088-primOpTag (VecIndexScalarOffAddrOp IntVec 4 W32) = 1089-primOpTag (VecIndexScalarOffAddrOp IntVec 2 W64) = 1090-primOpTag (VecIndexScalarOffAddrOp IntVec 32 W8) = 1091-primOpTag (VecIndexScalarOffAddrOp IntVec 16 W16) = 1092-primOpTag (VecIndexScalarOffAddrOp IntVec 8 W32) = 1093-primOpTag (VecIndexScalarOffAddrOp IntVec 4 W64) = 1094-primOpTag (VecIndexScalarOffAddrOp IntVec 64 W8) = 1095-primOpTag (VecIndexScalarOffAddrOp IntVec 32 W16) = 1096-primOpTag (VecIndexScalarOffAddrOp IntVec 16 W32) = 1097-primOpTag (VecIndexScalarOffAddrOp IntVec 8 W64) = 1098-primOpTag (VecIndexScalarOffAddrOp WordVec 16 W8) = 1099-primOpTag (VecIndexScalarOffAddrOp WordVec 8 W16) = 1100-primOpTag (VecIndexScalarOffAddrOp WordVec 4 W32) = 1101-primOpTag (VecIndexScalarOffAddrOp WordVec 2 W64) = 1102-primOpTag (VecIndexScalarOffAddrOp WordVec 32 W8) = 1103-primOpTag (VecIndexScalarOffAddrOp WordVec 16 W16) = 1104-primOpTag (VecIndexScalarOffAddrOp WordVec 8 W32) = 1105-primOpTag (VecIndexScalarOffAddrOp WordVec 4 W64) = 1106-primOpTag (VecIndexScalarOffAddrOp WordVec 64 W8) = 1107-primOpTag (VecIndexScalarOffAddrOp WordVec 32 W16) = 1108-primOpTag (VecIndexScalarOffAddrOp WordVec 16 W32) = 1109-primOpTag (VecIndexScalarOffAddrOp WordVec 8 W64) = 1110-primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W32) = 1111-primOpTag (VecIndexScalarOffAddrOp FloatVec 2 W64) = 1112-primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W32) = 1113-primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W64) = 1114-primOpTag (VecIndexScalarOffAddrOp FloatVec 16 W32) = 1115-primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W64) = 1116-primOpTag (VecReadScalarOffAddrOp IntVec 16 W8) = 1117-primOpTag (VecReadScalarOffAddrOp IntVec 8 W16) = 1118-primOpTag (VecReadScalarOffAddrOp IntVec 4 W32) = 1119-primOpTag (VecReadScalarOffAddrOp IntVec 2 W64) = 1120-primOpTag (VecReadScalarOffAddrOp IntVec 32 W8) = 1121-primOpTag (VecReadScalarOffAddrOp IntVec 16 W16) = 1122-primOpTag (VecReadScalarOffAddrOp IntVec 8 W32) = 1123-primOpTag (VecReadScalarOffAddrOp IntVec 4 W64) = 1124-primOpTag (VecReadScalarOffAddrOp IntVec 64 W8) = 1125-primOpTag (VecReadScalarOffAddrOp IntVec 32 W16) = 1126-primOpTag (VecReadScalarOffAddrOp IntVec 16 W32) = 1127-primOpTag (VecReadScalarOffAddrOp IntVec 8 W64) = 1128-primOpTag (VecReadScalarOffAddrOp WordVec 16 W8) = 1129-primOpTag (VecReadScalarOffAddrOp WordVec 8 W16) = 1130-primOpTag (VecReadScalarOffAddrOp WordVec 4 W32) = 1131-primOpTag (VecReadScalarOffAddrOp WordVec 2 W64) = 1132-primOpTag (VecReadScalarOffAddrOp WordVec 32 W8) = 1133-primOpTag (VecReadScalarOffAddrOp WordVec 16 W16) = 1134-primOpTag (VecReadScalarOffAddrOp WordVec 8 W32) = 1135-primOpTag (VecReadScalarOffAddrOp WordVec 4 W64) = 1136-primOpTag (VecReadScalarOffAddrOp WordVec 64 W8) = 1137-primOpTag (VecReadScalarOffAddrOp WordVec 32 W16) = 1138-primOpTag (VecReadScalarOffAddrOp WordVec 16 W32) = 1139-primOpTag (VecReadScalarOffAddrOp WordVec 8 W64) = 1140-primOpTag (VecReadScalarOffAddrOp FloatVec 4 W32) = 1141-primOpTag (VecReadScalarOffAddrOp FloatVec 2 W64) = 1142-primOpTag (VecReadScalarOffAddrOp FloatVec 8 W32) = 1143-primOpTag (VecReadScalarOffAddrOp FloatVec 4 W64) = 1144-primOpTag (VecReadScalarOffAddrOp FloatVec 16 W32) = 1145-primOpTag (VecReadScalarOffAddrOp FloatVec 8 W64) = 1146-primOpTag (VecWriteScalarOffAddrOp IntVec 16 W8) = 1147-primOpTag (VecWriteScalarOffAddrOp IntVec 8 W16) = 1148-primOpTag (VecWriteScalarOffAddrOp IntVec 4 W32) = 1149-primOpTag (VecWriteScalarOffAddrOp IntVec 2 W64) = 1150-primOpTag (VecWriteScalarOffAddrOp IntVec 32 W8) = 1151-primOpTag (VecWriteScalarOffAddrOp IntVec 16 W16) = 1152-primOpTag (VecWriteScalarOffAddrOp IntVec 8 W32) = 1153-primOpTag (VecWriteScalarOffAddrOp IntVec 4 W64) = 1154-primOpTag (VecWriteScalarOffAddrOp IntVec 64 W8) = 1155-primOpTag (VecWriteScalarOffAddrOp IntVec 32 W16) = 1156-primOpTag (VecWriteScalarOffAddrOp IntVec 16 W32) = 1157-primOpTag (VecWriteScalarOffAddrOp IntVec 8 W64) = 1158-primOpTag (VecWriteScalarOffAddrOp WordVec 16 W8) = 1159-primOpTag (VecWriteScalarOffAddrOp WordVec 8 W16) = 1160-primOpTag (VecWriteScalarOffAddrOp WordVec 4 W32) = 1161-primOpTag (VecWriteScalarOffAddrOp WordVec 2 W64) = 1162-primOpTag (VecWriteScalarOffAddrOp WordVec 32 W8) = 1163-primOpTag (VecWriteScalarOffAddrOp WordVec 16 W16) = 1164-primOpTag (VecWriteScalarOffAddrOp WordVec 8 W32) = 1165-primOpTag (VecWriteScalarOffAddrOp WordVec 4 W64) = 1166-primOpTag (VecWriteScalarOffAddrOp WordVec 64 W8) = 1167-primOpTag (VecWriteScalarOffAddrOp WordVec 32 W16) = 1168-primOpTag (VecWriteScalarOffAddrOp WordVec 16 W32) = 1169-primOpTag (VecWriteScalarOffAddrOp WordVec 8 W64) = 1170-primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W32) = 1171-primOpTag (VecWriteScalarOffAddrOp FloatVec 2 W64) = 1172-primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W32) = 1173-primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W64) = 1174-primOpTag (VecWriteScalarOffAddrOp FloatVec 16 W32) = 1175-primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W64) = 1176-primOpTag PrefetchByteArrayOp3 = 1177-primOpTag PrefetchMutableByteArrayOp3 = 1178-primOpTag PrefetchAddrOp3 = 1179-primOpTag PrefetchValueOp3 = 1180-primOpTag PrefetchByteArrayOp2 = 1181-primOpTag PrefetchMutableByteArrayOp2 = 1182-primOpTag PrefetchAddrOp2 = 1183-primOpTag PrefetchValueOp2 = 1184-primOpTag PrefetchByteArrayOp1 = 1185-primOpTag PrefetchMutableByteArrayOp1 = 1186-primOpTag PrefetchAddrOp1 = 1187-primOpTag PrefetchValueOp1 = 1188-primOpTag PrefetchByteArrayOp0 = 1189-primOpTag PrefetchMutableByteArrayOp0 = 1190-primOpTag PrefetchAddrOp0 = 1191-primOpTag PrefetchValueOp0 = 1192+maxPrimOpTag = 1203+primOpTag :: PrimOp -> Int+primOpTag CharGtOp = 1+primOpTag CharGeOp = 2+primOpTag CharEqOp = 3+primOpTag CharNeOp = 4+primOpTag CharLtOp = 5+primOpTag CharLeOp = 6+primOpTag OrdOp = 7+primOpTag IntAddOp = 8+primOpTag IntSubOp = 9+primOpTag IntMulOp = 10+primOpTag IntMulMayOfloOp = 11+primOpTag IntQuotOp = 12+primOpTag IntRemOp = 13+primOpTag IntQuotRemOp = 14+primOpTag AndIOp = 15+primOpTag OrIOp = 16+primOpTag XorIOp = 17+primOpTag NotIOp = 18+primOpTag IntNegOp = 19+primOpTag IntAddCOp = 20+primOpTag IntSubCOp = 21+primOpTag IntGtOp = 22+primOpTag IntGeOp = 23+primOpTag IntEqOp = 24+primOpTag IntNeOp = 25+primOpTag IntLtOp = 26+primOpTag IntLeOp = 27+primOpTag ChrOp = 28+primOpTag Int2WordOp = 29+primOpTag Int2FloatOp = 30+primOpTag Int2DoubleOp = 31+primOpTag Word2FloatOp = 32+primOpTag Word2DoubleOp = 33+primOpTag ISllOp = 34+primOpTag ISraOp = 35+primOpTag ISrlOp = 36+primOpTag Int8Extend = 37+primOpTag Int8Narrow = 38+primOpTag Int8NegOp = 39+primOpTag Int8AddOp = 40+primOpTag Int8SubOp = 41+primOpTag Int8MulOp = 42+primOpTag Int8QuotOp = 43+primOpTag Int8RemOp = 44+primOpTag Int8QuotRemOp = 45+primOpTag Int8EqOp = 46+primOpTag Int8GeOp = 47+primOpTag Int8GtOp = 48+primOpTag Int8LeOp = 49+primOpTag Int8LtOp = 50+primOpTag Int8NeOp = 51+primOpTag Word8Extend = 52+primOpTag Word8Narrow = 53+primOpTag Word8NotOp = 54+primOpTag Word8AddOp = 55+primOpTag Word8SubOp = 56+primOpTag Word8MulOp = 57+primOpTag Word8QuotOp = 58+primOpTag Word8RemOp = 59+primOpTag Word8QuotRemOp = 60+primOpTag Word8EqOp = 61+primOpTag Word8GeOp = 62+primOpTag Word8GtOp = 63+primOpTag Word8LeOp = 64+primOpTag Word8LtOp = 65+primOpTag Word8NeOp = 66+primOpTag Int16Extend = 67+primOpTag Int16Narrow = 68+primOpTag Int16NegOp = 69+primOpTag Int16AddOp = 70+primOpTag Int16SubOp = 71+primOpTag Int16MulOp = 72+primOpTag Int16QuotOp = 73+primOpTag Int16RemOp = 74+primOpTag Int16QuotRemOp = 75+primOpTag Int16EqOp = 76+primOpTag Int16GeOp = 77+primOpTag Int16GtOp = 78+primOpTag Int16LeOp = 79+primOpTag Int16LtOp = 80+primOpTag Int16NeOp = 81+primOpTag Word16Extend = 82+primOpTag Word16Narrow = 83+primOpTag Word16NotOp = 84+primOpTag Word16AddOp = 85+primOpTag Word16SubOp = 86+primOpTag Word16MulOp = 87+primOpTag Word16QuotOp = 88+primOpTag Word16RemOp = 89+primOpTag Word16QuotRemOp = 90+primOpTag Word16EqOp = 91+primOpTag Word16GeOp = 92+primOpTag Word16GtOp = 93+primOpTag Word16LeOp = 94+primOpTag Word16LtOp = 95+primOpTag Word16NeOp = 96+primOpTag WordAddOp = 97+primOpTag WordAddCOp = 98+primOpTag WordSubCOp = 99+primOpTag WordAdd2Op = 100+primOpTag WordSubOp = 101+primOpTag WordMulOp = 102+primOpTag WordMul2Op = 103+primOpTag WordQuotOp = 104+primOpTag WordRemOp = 105+primOpTag WordQuotRemOp = 106+primOpTag WordQuotRem2Op = 107+primOpTag AndOp = 108+primOpTag OrOp = 109+primOpTag XorOp = 110+primOpTag NotOp = 111+primOpTag SllOp = 112+primOpTag SrlOp = 113+primOpTag Word2IntOp = 114+primOpTag WordGtOp = 115+primOpTag WordGeOp = 116+primOpTag WordEqOp = 117+primOpTag WordNeOp = 118+primOpTag WordLtOp = 119+primOpTag WordLeOp = 120+primOpTag PopCnt8Op = 121+primOpTag PopCnt16Op = 122+primOpTag PopCnt32Op = 123+primOpTag PopCnt64Op = 124+primOpTag PopCntOp = 125+primOpTag Pdep8Op = 126+primOpTag Pdep16Op = 127+primOpTag Pdep32Op = 128+primOpTag Pdep64Op = 129+primOpTag PdepOp = 130+primOpTag Pext8Op = 131+primOpTag Pext16Op = 132+primOpTag Pext32Op = 133+primOpTag Pext64Op = 134+primOpTag PextOp = 135+primOpTag Clz8Op = 136+primOpTag Clz16Op = 137+primOpTag Clz32Op = 138+primOpTag Clz64Op = 139+primOpTag ClzOp = 140+primOpTag Ctz8Op = 141+primOpTag Ctz16Op = 142+primOpTag Ctz32Op = 143+primOpTag Ctz64Op = 144+primOpTag CtzOp = 145+primOpTag BSwap16Op = 146+primOpTag BSwap32Op = 147+primOpTag BSwap64Op = 148+primOpTag BSwapOp = 149+primOpTag BRev8Op = 150+primOpTag BRev16Op = 151+primOpTag BRev32Op = 152+primOpTag BRev64Op = 153+primOpTag BRevOp = 154+primOpTag Narrow8IntOp = 155+primOpTag Narrow16IntOp = 156+primOpTag Narrow32IntOp = 157+primOpTag Narrow8WordOp = 158+primOpTag Narrow16WordOp = 159+primOpTag Narrow32WordOp = 160+primOpTag DoubleGtOp = 161+primOpTag DoubleGeOp = 162+primOpTag DoubleEqOp = 163+primOpTag DoubleNeOp = 164+primOpTag DoubleLtOp = 165+primOpTag DoubleLeOp = 166+primOpTag DoubleAddOp = 167+primOpTag DoubleSubOp = 168+primOpTag DoubleMulOp = 169+primOpTag DoubleDivOp = 170+primOpTag DoubleNegOp = 171+primOpTag DoubleFabsOp = 172+primOpTag Double2IntOp = 173+primOpTag Double2FloatOp = 174+primOpTag DoubleExpOp = 175+primOpTag DoubleExpM1Op = 176+primOpTag DoubleLogOp = 177+primOpTag DoubleLog1POp = 178+primOpTag DoubleSqrtOp = 179+primOpTag DoubleSinOp = 180+primOpTag DoubleCosOp = 181+primOpTag DoubleTanOp = 182+primOpTag DoubleAsinOp = 183+primOpTag DoubleAcosOp = 184+primOpTag DoubleAtanOp = 185+primOpTag DoubleSinhOp = 186+primOpTag DoubleCoshOp = 187+primOpTag DoubleTanhOp = 188+primOpTag DoubleAsinhOp = 189+primOpTag DoubleAcoshOp = 190+primOpTag DoubleAtanhOp = 191+primOpTag DoublePowerOp = 192+primOpTag DoubleDecode_2IntOp = 193+primOpTag DoubleDecode_Int64Op = 194+primOpTag FloatGtOp = 195+primOpTag FloatGeOp = 196+primOpTag FloatEqOp = 197+primOpTag FloatNeOp = 198+primOpTag FloatLtOp = 199+primOpTag FloatLeOp = 200+primOpTag FloatAddOp = 201+primOpTag FloatSubOp = 202+primOpTag FloatMulOp = 203+primOpTag FloatDivOp = 204+primOpTag FloatNegOp = 205+primOpTag FloatFabsOp = 206+primOpTag Float2IntOp = 207+primOpTag FloatExpOp = 208+primOpTag FloatExpM1Op = 209+primOpTag FloatLogOp = 210+primOpTag FloatLog1POp = 211+primOpTag FloatSqrtOp = 212+primOpTag FloatSinOp = 213+primOpTag FloatCosOp = 214+primOpTag FloatTanOp = 215+primOpTag FloatAsinOp = 216+primOpTag FloatAcosOp = 217+primOpTag FloatAtanOp = 218+primOpTag FloatSinhOp = 219+primOpTag FloatCoshOp = 220+primOpTag FloatTanhOp = 221+primOpTag FloatAsinhOp = 222+primOpTag FloatAcoshOp = 223+primOpTag FloatAtanhOp = 224+primOpTag FloatPowerOp = 225+primOpTag Float2DoubleOp = 226+primOpTag FloatDecode_IntOp = 227+primOpTag NewArrayOp = 228+primOpTag SameMutableArrayOp = 229+primOpTag ReadArrayOp = 230+primOpTag WriteArrayOp = 231+primOpTag SizeofArrayOp = 232+primOpTag SizeofMutableArrayOp = 233+primOpTag IndexArrayOp = 234+primOpTag UnsafeFreezeArrayOp = 235+primOpTag UnsafeThawArrayOp = 236+primOpTag CopyArrayOp = 237+primOpTag CopyMutableArrayOp = 238+primOpTag CloneArrayOp = 239+primOpTag CloneMutableArrayOp = 240+primOpTag FreezeArrayOp = 241+primOpTag ThawArrayOp = 242+primOpTag CasArrayOp = 243+primOpTag NewSmallArrayOp = 244+primOpTag SameSmallMutableArrayOp = 245+primOpTag ShrinkSmallMutableArrayOp_Char = 246+primOpTag ReadSmallArrayOp = 247+primOpTag WriteSmallArrayOp = 248+primOpTag SizeofSmallArrayOp = 249+primOpTag SizeofSmallMutableArrayOp = 250+primOpTag GetSizeofSmallMutableArrayOp = 251+primOpTag IndexSmallArrayOp = 252+primOpTag UnsafeFreezeSmallArrayOp = 253+primOpTag UnsafeThawSmallArrayOp = 254+primOpTag CopySmallArrayOp = 255+primOpTag CopySmallMutableArrayOp = 256+primOpTag CloneSmallArrayOp = 257+primOpTag CloneSmallMutableArrayOp = 258+primOpTag FreezeSmallArrayOp = 259+primOpTag ThawSmallArrayOp = 260+primOpTag CasSmallArrayOp = 261+primOpTag NewByteArrayOp_Char = 262+primOpTag NewPinnedByteArrayOp_Char = 263+primOpTag NewAlignedPinnedByteArrayOp_Char = 264+primOpTag MutableByteArrayIsPinnedOp = 265+primOpTag ByteArrayIsPinnedOp = 266+primOpTag ByteArrayContents_Char = 267+primOpTag SameMutableByteArrayOp = 268+primOpTag ShrinkMutableByteArrayOp_Char = 269+primOpTag ResizeMutableByteArrayOp_Char = 270+primOpTag UnsafeFreezeByteArrayOp = 271+primOpTag SizeofByteArrayOp = 272+primOpTag SizeofMutableByteArrayOp = 273+primOpTag GetSizeofMutableByteArrayOp = 274+primOpTag IndexByteArrayOp_Char = 275+primOpTag IndexByteArrayOp_WideChar = 276+primOpTag IndexByteArrayOp_Int = 277+primOpTag IndexByteArrayOp_Word = 278+primOpTag IndexByteArrayOp_Addr = 279+primOpTag IndexByteArrayOp_Float = 280+primOpTag IndexByteArrayOp_Double = 281+primOpTag IndexByteArrayOp_StablePtr = 282+primOpTag IndexByteArrayOp_Int8 = 283+primOpTag IndexByteArrayOp_Int16 = 284+primOpTag IndexByteArrayOp_Int32 = 285+primOpTag IndexByteArrayOp_Int64 = 286+primOpTag IndexByteArrayOp_Word8 = 287+primOpTag IndexByteArrayOp_Word16 = 288+primOpTag IndexByteArrayOp_Word32 = 289+primOpTag IndexByteArrayOp_Word64 = 290+primOpTag IndexByteArrayOp_Word8AsChar = 291+primOpTag IndexByteArrayOp_Word8AsWideChar = 292+primOpTag IndexByteArrayOp_Word8AsAddr = 293+primOpTag IndexByteArrayOp_Word8AsFloat = 294+primOpTag IndexByteArrayOp_Word8AsDouble = 295+primOpTag IndexByteArrayOp_Word8AsStablePtr = 296+primOpTag IndexByteArrayOp_Word8AsInt16 = 297+primOpTag IndexByteArrayOp_Word8AsInt32 = 298+primOpTag IndexByteArrayOp_Word8AsInt64 = 299+primOpTag IndexByteArrayOp_Word8AsInt = 300+primOpTag IndexByteArrayOp_Word8AsWord16 = 301+primOpTag IndexByteArrayOp_Word8AsWord32 = 302+primOpTag IndexByteArrayOp_Word8AsWord64 = 303+primOpTag IndexByteArrayOp_Word8AsWord = 304+primOpTag ReadByteArrayOp_Char = 305+primOpTag ReadByteArrayOp_WideChar = 306+primOpTag ReadByteArrayOp_Int = 307+primOpTag ReadByteArrayOp_Word = 308+primOpTag ReadByteArrayOp_Addr = 309+primOpTag ReadByteArrayOp_Float = 310+primOpTag ReadByteArrayOp_Double = 311+primOpTag ReadByteArrayOp_StablePtr = 312+primOpTag ReadByteArrayOp_Int8 = 313+primOpTag ReadByteArrayOp_Int16 = 314+primOpTag ReadByteArrayOp_Int32 = 315+primOpTag ReadByteArrayOp_Int64 = 316+primOpTag ReadByteArrayOp_Word8 = 317+primOpTag ReadByteArrayOp_Word16 = 318+primOpTag ReadByteArrayOp_Word32 = 319+primOpTag ReadByteArrayOp_Word64 = 320+primOpTag ReadByteArrayOp_Word8AsChar = 321+primOpTag ReadByteArrayOp_Word8AsWideChar = 322+primOpTag ReadByteArrayOp_Word8AsAddr = 323+primOpTag ReadByteArrayOp_Word8AsFloat = 324+primOpTag ReadByteArrayOp_Word8AsDouble = 325+primOpTag ReadByteArrayOp_Word8AsStablePtr = 326+primOpTag ReadByteArrayOp_Word8AsInt16 = 327+primOpTag ReadByteArrayOp_Word8AsInt32 = 328+primOpTag ReadByteArrayOp_Word8AsInt64 = 329+primOpTag ReadByteArrayOp_Word8AsInt = 330+primOpTag ReadByteArrayOp_Word8AsWord16 = 331+primOpTag ReadByteArrayOp_Word8AsWord32 = 332+primOpTag ReadByteArrayOp_Word8AsWord64 = 333+primOpTag ReadByteArrayOp_Word8AsWord = 334+primOpTag WriteByteArrayOp_Char = 335+primOpTag WriteByteArrayOp_WideChar = 336+primOpTag WriteByteArrayOp_Int = 337+primOpTag WriteByteArrayOp_Word = 338+primOpTag WriteByteArrayOp_Addr = 339+primOpTag WriteByteArrayOp_Float = 340+primOpTag WriteByteArrayOp_Double = 341+primOpTag WriteByteArrayOp_StablePtr = 342+primOpTag WriteByteArrayOp_Int8 = 343+primOpTag WriteByteArrayOp_Int16 = 344+primOpTag WriteByteArrayOp_Int32 = 345+primOpTag WriteByteArrayOp_Int64 = 346+primOpTag WriteByteArrayOp_Word8 = 347+primOpTag WriteByteArrayOp_Word16 = 348+primOpTag WriteByteArrayOp_Word32 = 349+primOpTag WriteByteArrayOp_Word64 = 350+primOpTag WriteByteArrayOp_Word8AsChar = 351+primOpTag WriteByteArrayOp_Word8AsWideChar = 352+primOpTag WriteByteArrayOp_Word8AsAddr = 353+primOpTag WriteByteArrayOp_Word8AsFloat = 354+primOpTag WriteByteArrayOp_Word8AsDouble = 355+primOpTag WriteByteArrayOp_Word8AsStablePtr = 356+primOpTag WriteByteArrayOp_Word8AsInt16 = 357+primOpTag WriteByteArrayOp_Word8AsInt32 = 358+primOpTag WriteByteArrayOp_Word8AsInt64 = 359+primOpTag WriteByteArrayOp_Word8AsInt = 360+primOpTag WriteByteArrayOp_Word8AsWord16 = 361+primOpTag WriteByteArrayOp_Word8AsWord32 = 362+primOpTag WriteByteArrayOp_Word8AsWord64 = 363+primOpTag WriteByteArrayOp_Word8AsWord = 364+primOpTag CompareByteArraysOp = 365+primOpTag CopyByteArrayOp = 366+primOpTag CopyMutableByteArrayOp = 367+primOpTag CopyByteArrayToAddrOp = 368+primOpTag CopyMutableByteArrayToAddrOp = 369+primOpTag CopyAddrToByteArrayOp = 370+primOpTag SetByteArrayOp = 371+primOpTag AtomicReadByteArrayOp_Int = 372+primOpTag AtomicWriteByteArrayOp_Int = 373+primOpTag CasByteArrayOp_Int = 374+primOpTag FetchAddByteArrayOp_Int = 375+primOpTag FetchSubByteArrayOp_Int = 376+primOpTag FetchAndByteArrayOp_Int = 377+primOpTag FetchNandByteArrayOp_Int = 378+primOpTag FetchOrByteArrayOp_Int = 379+primOpTag FetchXorByteArrayOp_Int = 380+primOpTag NewArrayArrayOp = 381+primOpTag SameMutableArrayArrayOp = 382+primOpTag UnsafeFreezeArrayArrayOp = 383+primOpTag SizeofArrayArrayOp = 384+primOpTag SizeofMutableArrayArrayOp = 385+primOpTag IndexArrayArrayOp_ByteArray = 386+primOpTag IndexArrayArrayOp_ArrayArray = 387+primOpTag ReadArrayArrayOp_ByteArray = 388+primOpTag ReadArrayArrayOp_MutableByteArray = 389+primOpTag ReadArrayArrayOp_ArrayArray = 390+primOpTag ReadArrayArrayOp_MutableArrayArray = 391+primOpTag WriteArrayArrayOp_ByteArray = 392+primOpTag WriteArrayArrayOp_MutableByteArray = 393+primOpTag WriteArrayArrayOp_ArrayArray = 394+primOpTag WriteArrayArrayOp_MutableArrayArray = 395+primOpTag CopyArrayArrayOp = 396+primOpTag CopyMutableArrayArrayOp = 397+primOpTag AddrAddOp = 398+primOpTag AddrSubOp = 399+primOpTag AddrRemOp = 400+primOpTag Addr2IntOp = 401+primOpTag Int2AddrOp = 402+primOpTag AddrGtOp = 403+primOpTag AddrGeOp = 404+primOpTag AddrEqOp = 405+primOpTag AddrNeOp = 406+primOpTag AddrLtOp = 407+primOpTag AddrLeOp = 408+primOpTag IndexOffAddrOp_Char = 409+primOpTag IndexOffAddrOp_WideChar = 410+primOpTag IndexOffAddrOp_Int = 411+primOpTag IndexOffAddrOp_Word = 412+primOpTag IndexOffAddrOp_Addr = 413+primOpTag IndexOffAddrOp_Float = 414+primOpTag IndexOffAddrOp_Double = 415+primOpTag IndexOffAddrOp_StablePtr = 416+primOpTag IndexOffAddrOp_Int8 = 417+primOpTag IndexOffAddrOp_Int16 = 418+primOpTag IndexOffAddrOp_Int32 = 419+primOpTag IndexOffAddrOp_Int64 = 420+primOpTag IndexOffAddrOp_Word8 = 421+primOpTag IndexOffAddrOp_Word16 = 422+primOpTag IndexOffAddrOp_Word32 = 423+primOpTag IndexOffAddrOp_Word64 = 424+primOpTag ReadOffAddrOp_Char = 425+primOpTag ReadOffAddrOp_WideChar = 426+primOpTag ReadOffAddrOp_Int = 427+primOpTag ReadOffAddrOp_Word = 428+primOpTag ReadOffAddrOp_Addr = 429+primOpTag ReadOffAddrOp_Float = 430+primOpTag ReadOffAddrOp_Double = 431+primOpTag ReadOffAddrOp_StablePtr = 432+primOpTag ReadOffAddrOp_Int8 = 433+primOpTag ReadOffAddrOp_Int16 = 434+primOpTag ReadOffAddrOp_Int32 = 435+primOpTag ReadOffAddrOp_Int64 = 436+primOpTag ReadOffAddrOp_Word8 = 437+primOpTag ReadOffAddrOp_Word16 = 438+primOpTag ReadOffAddrOp_Word32 = 439+primOpTag ReadOffAddrOp_Word64 = 440+primOpTag WriteOffAddrOp_Char = 441+primOpTag WriteOffAddrOp_WideChar = 442+primOpTag WriteOffAddrOp_Int = 443+primOpTag WriteOffAddrOp_Word = 444+primOpTag WriteOffAddrOp_Addr = 445+primOpTag WriteOffAddrOp_Float = 446+primOpTag WriteOffAddrOp_Double = 447+primOpTag WriteOffAddrOp_StablePtr = 448+primOpTag WriteOffAddrOp_Int8 = 449+primOpTag WriteOffAddrOp_Int16 = 450+primOpTag WriteOffAddrOp_Int32 = 451+primOpTag WriteOffAddrOp_Int64 = 452+primOpTag WriteOffAddrOp_Word8 = 453+primOpTag WriteOffAddrOp_Word16 = 454+primOpTag WriteOffAddrOp_Word32 = 455+primOpTag WriteOffAddrOp_Word64 = 456+primOpTag NewMutVarOp = 457+primOpTag ReadMutVarOp = 458+primOpTag WriteMutVarOp = 459+primOpTag SameMutVarOp = 460+primOpTag AtomicModifyMutVar2Op = 461+primOpTag AtomicModifyMutVar_Op = 462+primOpTag CasMutVarOp = 463+primOpTag CatchOp = 464+primOpTag RaiseOp = 465+primOpTag RaiseIOOp = 466+primOpTag MaskAsyncExceptionsOp = 467+primOpTag MaskUninterruptibleOp = 468+primOpTag UnmaskAsyncExceptionsOp = 469+primOpTag MaskStatus = 470+primOpTag AtomicallyOp = 471+primOpTag RetryOp = 472+primOpTag CatchRetryOp = 473+primOpTag CatchSTMOp = 474+primOpTag NewTVarOp = 475+primOpTag ReadTVarOp = 476+primOpTag ReadTVarIOOp = 477+primOpTag WriteTVarOp = 478+primOpTag SameTVarOp = 479+primOpTag NewMVarOp = 480+primOpTag TakeMVarOp = 481+primOpTag TryTakeMVarOp = 482+primOpTag PutMVarOp = 483+primOpTag TryPutMVarOp = 484+primOpTag ReadMVarOp = 485+primOpTag TryReadMVarOp = 486+primOpTag SameMVarOp = 487+primOpTag IsEmptyMVarOp = 488+primOpTag DelayOp = 489+primOpTag WaitReadOp = 490+primOpTag WaitWriteOp = 491+primOpTag ForkOp = 492+primOpTag ForkOnOp = 493+primOpTag KillThreadOp = 494+primOpTag YieldOp = 495+primOpTag MyThreadIdOp = 496+primOpTag LabelThreadOp = 497+primOpTag IsCurrentThreadBoundOp = 498+primOpTag NoDuplicateOp = 499+primOpTag ThreadStatusOp = 500+primOpTag MkWeakOp = 501+primOpTag MkWeakNoFinalizerOp = 502+primOpTag AddCFinalizerToWeakOp = 503+primOpTag DeRefWeakOp = 504+primOpTag FinalizeWeakOp = 505+primOpTag TouchOp = 506+primOpTag MakeStablePtrOp = 507+primOpTag DeRefStablePtrOp = 508+primOpTag EqStablePtrOp = 509+primOpTag MakeStableNameOp = 510+primOpTag EqStableNameOp = 511+primOpTag StableNameToIntOp = 512+primOpTag CompactNewOp = 513+primOpTag CompactResizeOp = 514+primOpTag CompactContainsOp = 515+primOpTag CompactContainsAnyOp = 516+primOpTag CompactGetFirstBlockOp = 517+primOpTag CompactGetNextBlockOp = 518+primOpTag CompactAllocateBlockOp = 519+primOpTag CompactFixupPointersOp = 520+primOpTag CompactAdd = 521+primOpTag CompactAddWithSharing = 522+primOpTag CompactSize = 523+primOpTag ReallyUnsafePtrEqualityOp = 524+primOpTag ParOp = 525+primOpTag SparkOp = 526+primOpTag SeqOp = 527+primOpTag GetSparkOp = 528+primOpTag NumSparks = 529+primOpTag DataToTagOp = 530+primOpTag TagToEnumOp = 531+primOpTag AddrToAnyOp = 532+primOpTag AnyToAddrOp = 533+primOpTag MkApUpd0_Op = 534+primOpTag NewBCOOp = 535+primOpTag UnpackClosureOp = 536+primOpTag ClosureSizeOp = 537+primOpTag GetApStackValOp = 538+primOpTag GetCCSOfOp = 539+primOpTag GetCurrentCCSOp = 540+primOpTag ClearCCSOp = 541+primOpTag TraceEventOp = 542+primOpTag TraceEventBinaryOp = 543+primOpTag TraceMarkerOp = 544+primOpTag SetThreadAllocationCounter = 545+primOpTag (VecBroadcastOp IntVec 16 W8) = 546+primOpTag (VecBroadcastOp IntVec 8 W16) = 547+primOpTag (VecBroadcastOp IntVec 4 W32) = 548+primOpTag (VecBroadcastOp IntVec 2 W64) = 549+primOpTag (VecBroadcastOp IntVec 32 W8) = 550+primOpTag (VecBroadcastOp IntVec 16 W16) = 551+primOpTag (VecBroadcastOp IntVec 8 W32) = 552+primOpTag (VecBroadcastOp IntVec 4 W64) = 553+primOpTag (VecBroadcastOp IntVec 64 W8) = 554+primOpTag (VecBroadcastOp IntVec 32 W16) = 555+primOpTag (VecBroadcastOp IntVec 16 W32) = 556+primOpTag (VecBroadcastOp IntVec 8 W64) = 557+primOpTag (VecBroadcastOp WordVec 16 W8) = 558+primOpTag (VecBroadcastOp WordVec 8 W16) = 559+primOpTag (VecBroadcastOp WordVec 4 W32) = 560+primOpTag (VecBroadcastOp WordVec 2 W64) = 561+primOpTag (VecBroadcastOp WordVec 32 W8) = 562+primOpTag (VecBroadcastOp WordVec 16 W16) = 563+primOpTag (VecBroadcastOp WordVec 8 W32) = 564+primOpTag (VecBroadcastOp WordVec 4 W64) = 565+primOpTag (VecBroadcastOp WordVec 64 W8) = 566+primOpTag (VecBroadcastOp WordVec 32 W16) = 567+primOpTag (VecBroadcastOp WordVec 16 W32) = 568+primOpTag (VecBroadcastOp WordVec 8 W64) = 569+primOpTag (VecBroadcastOp FloatVec 4 W32) = 570+primOpTag (VecBroadcastOp FloatVec 2 W64) = 571+primOpTag (VecBroadcastOp FloatVec 8 W32) = 572+primOpTag (VecBroadcastOp FloatVec 4 W64) = 573+primOpTag (VecBroadcastOp FloatVec 16 W32) = 574+primOpTag (VecBroadcastOp FloatVec 8 W64) = 575+primOpTag (VecPackOp IntVec 16 W8) = 576+primOpTag (VecPackOp IntVec 8 W16) = 577+primOpTag (VecPackOp IntVec 4 W32) = 578+primOpTag (VecPackOp IntVec 2 W64) = 579+primOpTag (VecPackOp IntVec 32 W8) = 580+primOpTag (VecPackOp IntVec 16 W16) = 581+primOpTag (VecPackOp IntVec 8 W32) = 582+primOpTag (VecPackOp IntVec 4 W64) = 583+primOpTag (VecPackOp IntVec 64 W8) = 584+primOpTag (VecPackOp IntVec 32 W16) = 585+primOpTag (VecPackOp IntVec 16 W32) = 586+primOpTag (VecPackOp IntVec 8 W64) = 587+primOpTag (VecPackOp WordVec 16 W8) = 588+primOpTag (VecPackOp WordVec 8 W16) = 589+primOpTag (VecPackOp WordVec 4 W32) = 590+primOpTag (VecPackOp WordVec 2 W64) = 591+primOpTag (VecPackOp WordVec 32 W8) = 592+primOpTag (VecPackOp WordVec 16 W16) = 593+primOpTag (VecPackOp WordVec 8 W32) = 594+primOpTag (VecPackOp WordVec 4 W64) = 595+primOpTag (VecPackOp WordVec 64 W8) = 596+primOpTag (VecPackOp WordVec 32 W16) = 597+primOpTag (VecPackOp WordVec 16 W32) = 598+primOpTag (VecPackOp WordVec 8 W64) = 599+primOpTag (VecPackOp FloatVec 4 W32) = 600+primOpTag (VecPackOp FloatVec 2 W64) = 601+primOpTag (VecPackOp FloatVec 8 W32) = 602+primOpTag (VecPackOp FloatVec 4 W64) = 603+primOpTag (VecPackOp FloatVec 16 W32) = 604+primOpTag (VecPackOp FloatVec 8 W64) = 605+primOpTag (VecUnpackOp IntVec 16 W8) = 606+primOpTag (VecUnpackOp IntVec 8 W16) = 607+primOpTag (VecUnpackOp IntVec 4 W32) = 608+primOpTag (VecUnpackOp IntVec 2 W64) = 609+primOpTag (VecUnpackOp IntVec 32 W8) = 610+primOpTag (VecUnpackOp IntVec 16 W16) = 611+primOpTag (VecUnpackOp IntVec 8 W32) = 612+primOpTag (VecUnpackOp IntVec 4 W64) = 613+primOpTag (VecUnpackOp IntVec 64 W8) = 614+primOpTag (VecUnpackOp IntVec 32 W16) = 615+primOpTag (VecUnpackOp IntVec 16 W32) = 616+primOpTag (VecUnpackOp IntVec 8 W64) = 617+primOpTag (VecUnpackOp WordVec 16 W8) = 618+primOpTag (VecUnpackOp WordVec 8 W16) = 619+primOpTag (VecUnpackOp WordVec 4 W32) = 620+primOpTag (VecUnpackOp WordVec 2 W64) = 621+primOpTag (VecUnpackOp WordVec 32 W8) = 622+primOpTag (VecUnpackOp WordVec 16 W16) = 623+primOpTag (VecUnpackOp WordVec 8 W32) = 624+primOpTag (VecUnpackOp WordVec 4 W64) = 625+primOpTag (VecUnpackOp WordVec 64 W8) = 626+primOpTag (VecUnpackOp WordVec 32 W16) = 627+primOpTag (VecUnpackOp WordVec 16 W32) = 628+primOpTag (VecUnpackOp WordVec 8 W64) = 629+primOpTag (VecUnpackOp FloatVec 4 W32) = 630+primOpTag (VecUnpackOp FloatVec 2 W64) = 631+primOpTag (VecUnpackOp FloatVec 8 W32) = 632+primOpTag (VecUnpackOp FloatVec 4 W64) = 633+primOpTag (VecUnpackOp FloatVec 16 W32) = 634+primOpTag (VecUnpackOp FloatVec 8 W64) = 635+primOpTag (VecInsertOp IntVec 16 W8) = 636+primOpTag (VecInsertOp IntVec 8 W16) = 637+primOpTag (VecInsertOp IntVec 4 W32) = 638+primOpTag (VecInsertOp IntVec 2 W64) = 639+primOpTag (VecInsertOp IntVec 32 W8) = 640+primOpTag (VecInsertOp IntVec 16 W16) = 641+primOpTag (VecInsertOp IntVec 8 W32) = 642+primOpTag (VecInsertOp IntVec 4 W64) = 643+primOpTag (VecInsertOp IntVec 64 W8) = 644+primOpTag (VecInsertOp IntVec 32 W16) = 645+primOpTag (VecInsertOp IntVec 16 W32) = 646+primOpTag (VecInsertOp IntVec 8 W64) = 647+primOpTag (VecInsertOp WordVec 16 W8) = 648+primOpTag (VecInsertOp WordVec 8 W16) = 649+primOpTag (VecInsertOp WordVec 4 W32) = 650+primOpTag (VecInsertOp WordVec 2 W64) = 651+primOpTag (VecInsertOp WordVec 32 W8) = 652+primOpTag (VecInsertOp WordVec 16 W16) = 653+primOpTag (VecInsertOp WordVec 8 W32) = 654+primOpTag (VecInsertOp WordVec 4 W64) = 655+primOpTag (VecInsertOp WordVec 64 W8) = 656+primOpTag (VecInsertOp WordVec 32 W16) = 657+primOpTag (VecInsertOp WordVec 16 W32) = 658+primOpTag (VecInsertOp WordVec 8 W64) = 659+primOpTag (VecInsertOp FloatVec 4 W32) = 660+primOpTag (VecInsertOp FloatVec 2 W64) = 661+primOpTag (VecInsertOp FloatVec 8 W32) = 662+primOpTag (VecInsertOp FloatVec 4 W64) = 663+primOpTag (VecInsertOp FloatVec 16 W32) = 664+primOpTag (VecInsertOp FloatVec 8 W64) = 665+primOpTag (VecAddOp IntVec 16 W8) = 666+primOpTag (VecAddOp IntVec 8 W16) = 667+primOpTag (VecAddOp IntVec 4 W32) = 668+primOpTag (VecAddOp IntVec 2 W64) = 669+primOpTag (VecAddOp IntVec 32 W8) = 670+primOpTag (VecAddOp IntVec 16 W16) = 671+primOpTag (VecAddOp IntVec 8 W32) = 672+primOpTag (VecAddOp IntVec 4 W64) = 673+primOpTag (VecAddOp IntVec 64 W8) = 674+primOpTag (VecAddOp IntVec 32 W16) = 675+primOpTag (VecAddOp IntVec 16 W32) = 676+primOpTag (VecAddOp IntVec 8 W64) = 677+primOpTag (VecAddOp WordVec 16 W8) = 678+primOpTag (VecAddOp WordVec 8 W16) = 679+primOpTag (VecAddOp WordVec 4 W32) = 680+primOpTag (VecAddOp WordVec 2 W64) = 681+primOpTag (VecAddOp WordVec 32 W8) = 682+primOpTag (VecAddOp WordVec 16 W16) = 683+primOpTag (VecAddOp WordVec 8 W32) = 684+primOpTag (VecAddOp WordVec 4 W64) = 685+primOpTag (VecAddOp WordVec 64 W8) = 686+primOpTag (VecAddOp WordVec 32 W16) = 687+primOpTag (VecAddOp WordVec 16 W32) = 688+primOpTag (VecAddOp WordVec 8 W64) = 689+primOpTag (VecAddOp FloatVec 4 W32) = 690+primOpTag (VecAddOp FloatVec 2 W64) = 691+primOpTag (VecAddOp FloatVec 8 W32) = 692+primOpTag (VecAddOp FloatVec 4 W64) = 693+primOpTag (VecAddOp FloatVec 16 W32) = 694+primOpTag (VecAddOp FloatVec 8 W64) = 695+primOpTag (VecSubOp IntVec 16 W8) = 696+primOpTag (VecSubOp IntVec 8 W16) = 697+primOpTag (VecSubOp IntVec 4 W32) = 698+primOpTag (VecSubOp IntVec 2 W64) = 699+primOpTag (VecSubOp IntVec 32 W8) = 700+primOpTag (VecSubOp IntVec 16 W16) = 701+primOpTag (VecSubOp IntVec 8 W32) = 702+primOpTag (VecSubOp IntVec 4 W64) = 703+primOpTag (VecSubOp IntVec 64 W8) = 704+primOpTag (VecSubOp IntVec 32 W16) = 705+primOpTag (VecSubOp IntVec 16 W32) = 706+primOpTag (VecSubOp IntVec 8 W64) = 707+primOpTag (VecSubOp WordVec 16 W8) = 708+primOpTag (VecSubOp WordVec 8 W16) = 709+primOpTag (VecSubOp WordVec 4 W32) = 710+primOpTag (VecSubOp WordVec 2 W64) = 711+primOpTag (VecSubOp WordVec 32 W8) = 712+primOpTag (VecSubOp WordVec 16 W16) = 713+primOpTag (VecSubOp WordVec 8 W32) = 714+primOpTag (VecSubOp WordVec 4 W64) = 715+primOpTag (VecSubOp WordVec 64 W8) = 716+primOpTag (VecSubOp WordVec 32 W16) = 717+primOpTag (VecSubOp WordVec 16 W32) = 718+primOpTag (VecSubOp WordVec 8 W64) = 719+primOpTag (VecSubOp FloatVec 4 W32) = 720+primOpTag (VecSubOp FloatVec 2 W64) = 721+primOpTag (VecSubOp FloatVec 8 W32) = 722+primOpTag (VecSubOp FloatVec 4 W64) = 723+primOpTag (VecSubOp FloatVec 16 W32) = 724+primOpTag (VecSubOp FloatVec 8 W64) = 725+primOpTag (VecMulOp IntVec 16 W8) = 726+primOpTag (VecMulOp IntVec 8 W16) = 727+primOpTag (VecMulOp IntVec 4 W32) = 728+primOpTag (VecMulOp IntVec 2 W64) = 729+primOpTag (VecMulOp IntVec 32 W8) = 730+primOpTag (VecMulOp IntVec 16 W16) = 731+primOpTag (VecMulOp IntVec 8 W32) = 732+primOpTag (VecMulOp IntVec 4 W64) = 733+primOpTag (VecMulOp IntVec 64 W8) = 734+primOpTag (VecMulOp IntVec 32 W16) = 735+primOpTag (VecMulOp IntVec 16 W32) = 736+primOpTag (VecMulOp IntVec 8 W64) = 737+primOpTag (VecMulOp WordVec 16 W8) = 738+primOpTag (VecMulOp WordVec 8 W16) = 739+primOpTag (VecMulOp WordVec 4 W32) = 740+primOpTag (VecMulOp WordVec 2 W64) = 741+primOpTag (VecMulOp WordVec 32 W8) = 742+primOpTag (VecMulOp WordVec 16 W16) = 743+primOpTag (VecMulOp WordVec 8 W32) = 744+primOpTag (VecMulOp WordVec 4 W64) = 745+primOpTag (VecMulOp WordVec 64 W8) = 746+primOpTag (VecMulOp WordVec 32 W16) = 747+primOpTag (VecMulOp WordVec 16 W32) = 748+primOpTag (VecMulOp WordVec 8 W64) = 749+primOpTag (VecMulOp FloatVec 4 W32) = 750+primOpTag (VecMulOp FloatVec 2 W64) = 751+primOpTag (VecMulOp FloatVec 8 W32) = 752+primOpTag (VecMulOp FloatVec 4 W64) = 753+primOpTag (VecMulOp FloatVec 16 W32) = 754+primOpTag (VecMulOp FloatVec 8 W64) = 755+primOpTag (VecDivOp FloatVec 4 W32) = 756+primOpTag (VecDivOp FloatVec 2 W64) = 757+primOpTag (VecDivOp FloatVec 8 W32) = 758+primOpTag (VecDivOp FloatVec 4 W64) = 759+primOpTag (VecDivOp FloatVec 16 W32) = 760+primOpTag (VecDivOp FloatVec 8 W64) = 761+primOpTag (VecQuotOp IntVec 16 W8) = 762+primOpTag (VecQuotOp IntVec 8 W16) = 763+primOpTag (VecQuotOp IntVec 4 W32) = 764+primOpTag (VecQuotOp IntVec 2 W64) = 765+primOpTag (VecQuotOp IntVec 32 W8) = 766+primOpTag (VecQuotOp IntVec 16 W16) = 767+primOpTag (VecQuotOp IntVec 8 W32) = 768+primOpTag (VecQuotOp IntVec 4 W64) = 769+primOpTag (VecQuotOp IntVec 64 W8) = 770+primOpTag (VecQuotOp IntVec 32 W16) = 771+primOpTag (VecQuotOp IntVec 16 W32) = 772+primOpTag (VecQuotOp IntVec 8 W64) = 773+primOpTag (VecQuotOp WordVec 16 W8) = 774+primOpTag (VecQuotOp WordVec 8 W16) = 775+primOpTag (VecQuotOp WordVec 4 W32) = 776+primOpTag (VecQuotOp WordVec 2 W64) = 777+primOpTag (VecQuotOp WordVec 32 W8) = 778+primOpTag (VecQuotOp WordVec 16 W16) = 779+primOpTag (VecQuotOp WordVec 8 W32) = 780+primOpTag (VecQuotOp WordVec 4 W64) = 781+primOpTag (VecQuotOp WordVec 64 W8) = 782+primOpTag (VecQuotOp WordVec 32 W16) = 783+primOpTag (VecQuotOp WordVec 16 W32) = 784+primOpTag (VecQuotOp WordVec 8 W64) = 785+primOpTag (VecRemOp IntVec 16 W8) = 786+primOpTag (VecRemOp IntVec 8 W16) = 787+primOpTag (VecRemOp IntVec 4 W32) = 788+primOpTag (VecRemOp IntVec 2 W64) = 789+primOpTag (VecRemOp IntVec 32 W8) = 790+primOpTag (VecRemOp IntVec 16 W16) = 791+primOpTag (VecRemOp IntVec 8 W32) = 792+primOpTag (VecRemOp IntVec 4 W64) = 793+primOpTag (VecRemOp IntVec 64 W8) = 794+primOpTag (VecRemOp IntVec 32 W16) = 795+primOpTag (VecRemOp IntVec 16 W32) = 796+primOpTag (VecRemOp IntVec 8 W64) = 797+primOpTag (VecRemOp WordVec 16 W8) = 798+primOpTag (VecRemOp WordVec 8 W16) = 799+primOpTag (VecRemOp WordVec 4 W32) = 800+primOpTag (VecRemOp WordVec 2 W64) = 801+primOpTag (VecRemOp WordVec 32 W8) = 802+primOpTag (VecRemOp WordVec 16 W16) = 803+primOpTag (VecRemOp WordVec 8 W32) = 804+primOpTag (VecRemOp WordVec 4 W64) = 805+primOpTag (VecRemOp WordVec 64 W8) = 806+primOpTag (VecRemOp WordVec 32 W16) = 807+primOpTag (VecRemOp WordVec 16 W32) = 808+primOpTag (VecRemOp WordVec 8 W64) = 809+primOpTag (VecNegOp IntVec 16 W8) = 810+primOpTag (VecNegOp IntVec 8 W16) = 811+primOpTag (VecNegOp IntVec 4 W32) = 812+primOpTag (VecNegOp IntVec 2 W64) = 813+primOpTag (VecNegOp IntVec 32 W8) = 814+primOpTag (VecNegOp IntVec 16 W16) = 815+primOpTag (VecNegOp IntVec 8 W32) = 816+primOpTag (VecNegOp IntVec 4 W64) = 817+primOpTag (VecNegOp IntVec 64 W8) = 818+primOpTag (VecNegOp IntVec 32 W16) = 819+primOpTag (VecNegOp IntVec 16 W32) = 820+primOpTag (VecNegOp IntVec 8 W64) = 821+primOpTag (VecNegOp FloatVec 4 W32) = 822+primOpTag (VecNegOp FloatVec 2 W64) = 823+primOpTag (VecNegOp FloatVec 8 W32) = 824+primOpTag (VecNegOp FloatVec 4 W64) = 825+primOpTag (VecNegOp FloatVec 16 W32) = 826+primOpTag (VecNegOp FloatVec 8 W64) = 827+primOpTag (VecIndexByteArrayOp IntVec 16 W8) = 828+primOpTag (VecIndexByteArrayOp IntVec 8 W16) = 829+primOpTag (VecIndexByteArrayOp IntVec 4 W32) = 830+primOpTag (VecIndexByteArrayOp IntVec 2 W64) = 831+primOpTag (VecIndexByteArrayOp IntVec 32 W8) = 832+primOpTag (VecIndexByteArrayOp IntVec 16 W16) = 833+primOpTag (VecIndexByteArrayOp IntVec 8 W32) = 834+primOpTag (VecIndexByteArrayOp IntVec 4 W64) = 835+primOpTag (VecIndexByteArrayOp IntVec 64 W8) = 836+primOpTag (VecIndexByteArrayOp IntVec 32 W16) = 837+primOpTag (VecIndexByteArrayOp IntVec 16 W32) = 838+primOpTag (VecIndexByteArrayOp IntVec 8 W64) = 839+primOpTag (VecIndexByteArrayOp WordVec 16 W8) = 840+primOpTag (VecIndexByteArrayOp WordVec 8 W16) = 841+primOpTag (VecIndexByteArrayOp WordVec 4 W32) = 842+primOpTag (VecIndexByteArrayOp WordVec 2 W64) = 843+primOpTag (VecIndexByteArrayOp WordVec 32 W8) = 844+primOpTag (VecIndexByteArrayOp WordVec 16 W16) = 845+primOpTag (VecIndexByteArrayOp WordVec 8 W32) = 846+primOpTag (VecIndexByteArrayOp WordVec 4 W64) = 847+primOpTag (VecIndexByteArrayOp WordVec 64 W8) = 848+primOpTag (VecIndexByteArrayOp WordVec 32 W16) = 849+primOpTag (VecIndexByteArrayOp WordVec 16 W32) = 850+primOpTag (VecIndexByteArrayOp WordVec 8 W64) = 851+primOpTag (VecIndexByteArrayOp FloatVec 4 W32) = 852+primOpTag (VecIndexByteArrayOp FloatVec 2 W64) = 853+primOpTag (VecIndexByteArrayOp FloatVec 8 W32) = 854+primOpTag (VecIndexByteArrayOp FloatVec 4 W64) = 855+primOpTag (VecIndexByteArrayOp FloatVec 16 W32) = 856+primOpTag (VecIndexByteArrayOp FloatVec 8 W64) = 857+primOpTag (VecReadByteArrayOp IntVec 16 W8) = 858+primOpTag (VecReadByteArrayOp IntVec 8 W16) = 859+primOpTag (VecReadByteArrayOp IntVec 4 W32) = 860+primOpTag (VecReadByteArrayOp IntVec 2 W64) = 861+primOpTag (VecReadByteArrayOp IntVec 32 W8) = 862+primOpTag (VecReadByteArrayOp IntVec 16 W16) = 863+primOpTag (VecReadByteArrayOp IntVec 8 W32) = 864+primOpTag (VecReadByteArrayOp IntVec 4 W64) = 865+primOpTag (VecReadByteArrayOp IntVec 64 W8) = 866+primOpTag (VecReadByteArrayOp IntVec 32 W16) = 867+primOpTag (VecReadByteArrayOp IntVec 16 W32) = 868+primOpTag (VecReadByteArrayOp IntVec 8 W64) = 869+primOpTag (VecReadByteArrayOp WordVec 16 W8) = 870+primOpTag (VecReadByteArrayOp WordVec 8 W16) = 871+primOpTag (VecReadByteArrayOp WordVec 4 W32) = 872+primOpTag (VecReadByteArrayOp WordVec 2 W64) = 873+primOpTag (VecReadByteArrayOp WordVec 32 W8) = 874+primOpTag (VecReadByteArrayOp WordVec 16 W16) = 875+primOpTag (VecReadByteArrayOp WordVec 8 W32) = 876+primOpTag (VecReadByteArrayOp WordVec 4 W64) = 877+primOpTag (VecReadByteArrayOp WordVec 64 W8) = 878+primOpTag (VecReadByteArrayOp WordVec 32 W16) = 879+primOpTag (VecReadByteArrayOp WordVec 16 W32) = 880+primOpTag (VecReadByteArrayOp WordVec 8 W64) = 881+primOpTag (VecReadByteArrayOp FloatVec 4 W32) = 882+primOpTag (VecReadByteArrayOp FloatVec 2 W64) = 883+primOpTag (VecReadByteArrayOp FloatVec 8 W32) = 884+primOpTag (VecReadByteArrayOp FloatVec 4 W64) = 885+primOpTag (VecReadByteArrayOp FloatVec 16 W32) = 886+primOpTag (VecReadByteArrayOp FloatVec 8 W64) = 887+primOpTag (VecWriteByteArrayOp IntVec 16 W8) = 888+primOpTag (VecWriteByteArrayOp IntVec 8 W16) = 889+primOpTag (VecWriteByteArrayOp IntVec 4 W32) = 890+primOpTag (VecWriteByteArrayOp IntVec 2 W64) = 891+primOpTag (VecWriteByteArrayOp IntVec 32 W8) = 892+primOpTag (VecWriteByteArrayOp IntVec 16 W16) = 893+primOpTag (VecWriteByteArrayOp IntVec 8 W32) = 894+primOpTag (VecWriteByteArrayOp IntVec 4 W64) = 895+primOpTag (VecWriteByteArrayOp IntVec 64 W8) = 896+primOpTag (VecWriteByteArrayOp IntVec 32 W16) = 897+primOpTag (VecWriteByteArrayOp IntVec 16 W32) = 898+primOpTag (VecWriteByteArrayOp IntVec 8 W64) = 899+primOpTag (VecWriteByteArrayOp WordVec 16 W8) = 900+primOpTag (VecWriteByteArrayOp WordVec 8 W16) = 901+primOpTag (VecWriteByteArrayOp WordVec 4 W32) = 902+primOpTag (VecWriteByteArrayOp WordVec 2 W64) = 903+primOpTag (VecWriteByteArrayOp WordVec 32 W8) = 904+primOpTag (VecWriteByteArrayOp WordVec 16 W16) = 905+primOpTag (VecWriteByteArrayOp WordVec 8 W32) = 906+primOpTag (VecWriteByteArrayOp WordVec 4 W64) = 907+primOpTag (VecWriteByteArrayOp WordVec 64 W8) = 908+primOpTag (VecWriteByteArrayOp WordVec 32 W16) = 909+primOpTag (VecWriteByteArrayOp WordVec 16 W32) = 910+primOpTag (VecWriteByteArrayOp WordVec 8 W64) = 911+primOpTag (VecWriteByteArrayOp FloatVec 4 W32) = 912+primOpTag (VecWriteByteArrayOp FloatVec 2 W64) = 913+primOpTag (VecWriteByteArrayOp FloatVec 8 W32) = 914+primOpTag (VecWriteByteArrayOp FloatVec 4 W64) = 915+primOpTag (VecWriteByteArrayOp FloatVec 16 W32) = 916+primOpTag (VecWriteByteArrayOp FloatVec 8 W64) = 917+primOpTag (VecIndexOffAddrOp IntVec 16 W8) = 918+primOpTag (VecIndexOffAddrOp IntVec 8 W16) = 919+primOpTag (VecIndexOffAddrOp IntVec 4 W32) = 920+primOpTag (VecIndexOffAddrOp IntVec 2 W64) = 921+primOpTag (VecIndexOffAddrOp IntVec 32 W8) = 922+primOpTag (VecIndexOffAddrOp IntVec 16 W16) = 923+primOpTag (VecIndexOffAddrOp IntVec 8 W32) = 924+primOpTag (VecIndexOffAddrOp IntVec 4 W64) = 925+primOpTag (VecIndexOffAddrOp IntVec 64 W8) = 926+primOpTag (VecIndexOffAddrOp IntVec 32 W16) = 927+primOpTag (VecIndexOffAddrOp IntVec 16 W32) = 928+primOpTag (VecIndexOffAddrOp IntVec 8 W64) = 929+primOpTag (VecIndexOffAddrOp WordVec 16 W8) = 930+primOpTag (VecIndexOffAddrOp WordVec 8 W16) = 931+primOpTag (VecIndexOffAddrOp WordVec 4 W32) = 932+primOpTag (VecIndexOffAddrOp WordVec 2 W64) = 933+primOpTag (VecIndexOffAddrOp WordVec 32 W8) = 934+primOpTag (VecIndexOffAddrOp WordVec 16 W16) = 935+primOpTag (VecIndexOffAddrOp WordVec 8 W32) = 936+primOpTag (VecIndexOffAddrOp WordVec 4 W64) = 937+primOpTag (VecIndexOffAddrOp WordVec 64 W8) = 938+primOpTag (VecIndexOffAddrOp WordVec 32 W16) = 939+primOpTag (VecIndexOffAddrOp WordVec 16 W32) = 940+primOpTag (VecIndexOffAddrOp WordVec 8 W64) = 941+primOpTag (VecIndexOffAddrOp FloatVec 4 W32) = 942+primOpTag (VecIndexOffAddrOp FloatVec 2 W64) = 943+primOpTag (VecIndexOffAddrOp FloatVec 8 W32) = 944+primOpTag (VecIndexOffAddrOp FloatVec 4 W64) = 945+primOpTag (VecIndexOffAddrOp FloatVec 16 W32) = 946+primOpTag (VecIndexOffAddrOp FloatVec 8 W64) = 947+primOpTag (VecReadOffAddrOp IntVec 16 W8) = 948+primOpTag (VecReadOffAddrOp IntVec 8 W16) = 949+primOpTag (VecReadOffAddrOp IntVec 4 W32) = 950+primOpTag (VecReadOffAddrOp IntVec 2 W64) = 951+primOpTag (VecReadOffAddrOp IntVec 32 W8) = 952+primOpTag (VecReadOffAddrOp IntVec 16 W16) = 953+primOpTag (VecReadOffAddrOp IntVec 8 W32) = 954+primOpTag (VecReadOffAddrOp IntVec 4 W64) = 955+primOpTag (VecReadOffAddrOp IntVec 64 W8) = 956+primOpTag (VecReadOffAddrOp IntVec 32 W16) = 957+primOpTag (VecReadOffAddrOp IntVec 16 W32) = 958+primOpTag (VecReadOffAddrOp IntVec 8 W64) = 959+primOpTag (VecReadOffAddrOp WordVec 16 W8) = 960+primOpTag (VecReadOffAddrOp WordVec 8 W16) = 961+primOpTag (VecReadOffAddrOp WordVec 4 W32) = 962+primOpTag (VecReadOffAddrOp WordVec 2 W64) = 963+primOpTag (VecReadOffAddrOp WordVec 32 W8) = 964+primOpTag (VecReadOffAddrOp WordVec 16 W16) = 965+primOpTag (VecReadOffAddrOp WordVec 8 W32) = 966+primOpTag (VecReadOffAddrOp WordVec 4 W64) = 967+primOpTag (VecReadOffAddrOp WordVec 64 W8) = 968+primOpTag (VecReadOffAddrOp WordVec 32 W16) = 969+primOpTag (VecReadOffAddrOp WordVec 16 W32) = 970+primOpTag (VecReadOffAddrOp WordVec 8 W64) = 971+primOpTag (VecReadOffAddrOp FloatVec 4 W32) = 972+primOpTag (VecReadOffAddrOp FloatVec 2 W64) = 973+primOpTag (VecReadOffAddrOp FloatVec 8 W32) = 974+primOpTag (VecReadOffAddrOp FloatVec 4 W64) = 975+primOpTag (VecReadOffAddrOp FloatVec 16 W32) = 976+primOpTag (VecReadOffAddrOp FloatVec 8 W64) = 977+primOpTag (VecWriteOffAddrOp IntVec 16 W8) = 978+primOpTag (VecWriteOffAddrOp IntVec 8 W16) = 979+primOpTag (VecWriteOffAddrOp IntVec 4 W32) = 980+primOpTag (VecWriteOffAddrOp IntVec 2 W64) = 981+primOpTag (VecWriteOffAddrOp IntVec 32 W8) = 982+primOpTag (VecWriteOffAddrOp IntVec 16 W16) = 983+primOpTag (VecWriteOffAddrOp IntVec 8 W32) = 984+primOpTag (VecWriteOffAddrOp IntVec 4 W64) = 985+primOpTag (VecWriteOffAddrOp IntVec 64 W8) = 986+primOpTag (VecWriteOffAddrOp IntVec 32 W16) = 987+primOpTag (VecWriteOffAddrOp IntVec 16 W32) = 988+primOpTag (VecWriteOffAddrOp IntVec 8 W64) = 989+primOpTag (VecWriteOffAddrOp WordVec 16 W8) = 990+primOpTag (VecWriteOffAddrOp WordVec 8 W16) = 991+primOpTag (VecWriteOffAddrOp WordVec 4 W32) = 992+primOpTag (VecWriteOffAddrOp WordVec 2 W64) = 993+primOpTag (VecWriteOffAddrOp WordVec 32 W8) = 994+primOpTag (VecWriteOffAddrOp WordVec 16 W16) = 995+primOpTag (VecWriteOffAddrOp WordVec 8 W32) = 996+primOpTag (VecWriteOffAddrOp WordVec 4 W64) = 997+primOpTag (VecWriteOffAddrOp WordVec 64 W8) = 998+primOpTag (VecWriteOffAddrOp WordVec 32 W16) = 999+primOpTag (VecWriteOffAddrOp WordVec 16 W32) = 1000+primOpTag (VecWriteOffAddrOp WordVec 8 W64) = 1001+primOpTag (VecWriteOffAddrOp FloatVec 4 W32) = 1002+primOpTag (VecWriteOffAddrOp FloatVec 2 W64) = 1003+primOpTag (VecWriteOffAddrOp FloatVec 8 W32) = 1004+primOpTag (VecWriteOffAddrOp FloatVec 4 W64) = 1005+primOpTag (VecWriteOffAddrOp FloatVec 16 W32) = 1006+primOpTag (VecWriteOffAddrOp FloatVec 8 W64) = 1007+primOpTag (VecIndexScalarByteArrayOp IntVec 16 W8) = 1008+primOpTag (VecIndexScalarByteArrayOp IntVec 8 W16) = 1009+primOpTag (VecIndexScalarByteArrayOp IntVec 4 W32) = 1010+primOpTag (VecIndexScalarByteArrayOp IntVec 2 W64) = 1011+primOpTag (VecIndexScalarByteArrayOp IntVec 32 W8) = 1012+primOpTag (VecIndexScalarByteArrayOp IntVec 16 W16) = 1013+primOpTag (VecIndexScalarByteArrayOp IntVec 8 W32) = 1014+primOpTag (VecIndexScalarByteArrayOp IntVec 4 W64) = 1015+primOpTag (VecIndexScalarByteArrayOp IntVec 64 W8) = 1016+primOpTag (VecIndexScalarByteArrayOp IntVec 32 W16) = 1017+primOpTag (VecIndexScalarByteArrayOp IntVec 16 W32) = 1018+primOpTag (VecIndexScalarByteArrayOp IntVec 8 W64) = 1019+primOpTag (VecIndexScalarByteArrayOp WordVec 16 W8) = 1020+primOpTag (VecIndexScalarByteArrayOp WordVec 8 W16) = 1021+primOpTag (VecIndexScalarByteArrayOp WordVec 4 W32) = 1022+primOpTag (VecIndexScalarByteArrayOp WordVec 2 W64) = 1023+primOpTag (VecIndexScalarByteArrayOp WordVec 32 W8) = 1024+primOpTag (VecIndexScalarByteArrayOp WordVec 16 W16) = 1025+primOpTag (VecIndexScalarByteArrayOp WordVec 8 W32) = 1026+primOpTag (VecIndexScalarByteArrayOp WordVec 4 W64) = 1027+primOpTag (VecIndexScalarByteArrayOp WordVec 64 W8) = 1028+primOpTag (VecIndexScalarByteArrayOp WordVec 32 W16) = 1029+primOpTag (VecIndexScalarByteArrayOp WordVec 16 W32) = 1030+primOpTag (VecIndexScalarByteArrayOp WordVec 8 W64) = 1031+primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W32) = 1032+primOpTag (VecIndexScalarByteArrayOp FloatVec 2 W64) = 1033+primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W32) = 1034+primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W64) = 1035+primOpTag (VecIndexScalarByteArrayOp FloatVec 16 W32) = 1036+primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W64) = 1037+primOpTag (VecReadScalarByteArrayOp IntVec 16 W8) = 1038+primOpTag (VecReadScalarByteArrayOp IntVec 8 W16) = 1039+primOpTag (VecReadScalarByteArrayOp IntVec 4 W32) = 1040+primOpTag (VecReadScalarByteArrayOp IntVec 2 W64) = 1041+primOpTag (VecReadScalarByteArrayOp IntVec 32 W8) = 1042+primOpTag (VecReadScalarByteArrayOp IntVec 16 W16) = 1043+primOpTag (VecReadScalarByteArrayOp IntVec 8 W32) = 1044+primOpTag (VecReadScalarByteArrayOp IntVec 4 W64) = 1045+primOpTag (VecReadScalarByteArrayOp IntVec 64 W8) = 1046+primOpTag (VecReadScalarByteArrayOp IntVec 32 W16) = 1047+primOpTag (VecReadScalarByteArrayOp IntVec 16 W32) = 1048+primOpTag (VecReadScalarByteArrayOp IntVec 8 W64) = 1049+primOpTag (VecReadScalarByteArrayOp WordVec 16 W8) = 1050+primOpTag (VecReadScalarByteArrayOp WordVec 8 W16) = 1051+primOpTag (VecReadScalarByteArrayOp WordVec 4 W32) = 1052+primOpTag (VecReadScalarByteArrayOp WordVec 2 W64) = 1053+primOpTag (VecReadScalarByteArrayOp WordVec 32 W8) = 1054+primOpTag (VecReadScalarByteArrayOp WordVec 16 W16) = 1055+primOpTag (VecReadScalarByteArrayOp WordVec 8 W32) = 1056+primOpTag (VecReadScalarByteArrayOp WordVec 4 W64) = 1057+primOpTag (VecReadScalarByteArrayOp WordVec 64 W8) = 1058+primOpTag (VecReadScalarByteArrayOp WordVec 32 W16) = 1059+primOpTag (VecReadScalarByteArrayOp WordVec 16 W32) = 1060+primOpTag (VecReadScalarByteArrayOp WordVec 8 W64) = 1061+primOpTag (VecReadScalarByteArrayOp FloatVec 4 W32) = 1062+primOpTag (VecReadScalarByteArrayOp FloatVec 2 W64) = 1063+primOpTag (VecReadScalarByteArrayOp FloatVec 8 W32) = 1064+primOpTag (VecReadScalarByteArrayOp FloatVec 4 W64) = 1065+primOpTag (VecReadScalarByteArrayOp FloatVec 16 W32) = 1066+primOpTag (VecReadScalarByteArrayOp FloatVec 8 W64) = 1067+primOpTag (VecWriteScalarByteArrayOp IntVec 16 W8) = 1068+primOpTag (VecWriteScalarByteArrayOp IntVec 8 W16) = 1069+primOpTag (VecWriteScalarByteArrayOp IntVec 4 W32) = 1070+primOpTag (VecWriteScalarByteArrayOp IntVec 2 W64) = 1071+primOpTag (VecWriteScalarByteArrayOp IntVec 32 W8) = 1072+primOpTag (VecWriteScalarByteArrayOp IntVec 16 W16) = 1073+primOpTag (VecWriteScalarByteArrayOp IntVec 8 W32) = 1074+primOpTag (VecWriteScalarByteArrayOp IntVec 4 W64) = 1075+primOpTag (VecWriteScalarByteArrayOp IntVec 64 W8) = 1076+primOpTag (VecWriteScalarByteArrayOp IntVec 32 W16) = 1077+primOpTag (VecWriteScalarByteArrayOp IntVec 16 W32) = 1078+primOpTag (VecWriteScalarByteArrayOp IntVec 8 W64) = 1079+primOpTag (VecWriteScalarByteArrayOp WordVec 16 W8) = 1080+primOpTag (VecWriteScalarByteArrayOp WordVec 8 W16) = 1081+primOpTag (VecWriteScalarByteArrayOp WordVec 4 W32) = 1082+primOpTag (VecWriteScalarByteArrayOp WordVec 2 W64) = 1083+primOpTag (VecWriteScalarByteArrayOp WordVec 32 W8) = 1084+primOpTag (VecWriteScalarByteArrayOp WordVec 16 W16) = 1085+primOpTag (VecWriteScalarByteArrayOp WordVec 8 W32) = 1086+primOpTag (VecWriteScalarByteArrayOp WordVec 4 W64) = 1087+primOpTag (VecWriteScalarByteArrayOp WordVec 64 W8) = 1088+primOpTag (VecWriteScalarByteArrayOp WordVec 32 W16) = 1089+primOpTag (VecWriteScalarByteArrayOp WordVec 16 W32) = 1090+primOpTag (VecWriteScalarByteArrayOp WordVec 8 W64) = 1091+primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W32) = 1092+primOpTag (VecWriteScalarByteArrayOp FloatVec 2 W64) = 1093+primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W32) = 1094+primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W64) = 1095+primOpTag (VecWriteScalarByteArrayOp FloatVec 16 W32) = 1096+primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W64) = 1097+primOpTag (VecIndexScalarOffAddrOp IntVec 16 W8) = 1098+primOpTag (VecIndexScalarOffAddrOp IntVec 8 W16) = 1099+primOpTag (VecIndexScalarOffAddrOp IntVec 4 W32) = 1100+primOpTag (VecIndexScalarOffAddrOp IntVec 2 W64) = 1101+primOpTag (VecIndexScalarOffAddrOp IntVec 32 W8) = 1102+primOpTag (VecIndexScalarOffAddrOp IntVec 16 W16) = 1103+primOpTag (VecIndexScalarOffAddrOp IntVec 8 W32) = 1104+primOpTag (VecIndexScalarOffAddrOp IntVec 4 W64) = 1105+primOpTag (VecIndexScalarOffAddrOp IntVec 64 W8) = 1106+primOpTag (VecIndexScalarOffAddrOp IntVec 32 W16) = 1107+primOpTag (VecIndexScalarOffAddrOp IntVec 16 W32) = 1108+primOpTag (VecIndexScalarOffAddrOp IntVec 8 W64) = 1109+primOpTag (VecIndexScalarOffAddrOp WordVec 16 W8) = 1110+primOpTag (VecIndexScalarOffAddrOp WordVec 8 W16) = 1111+primOpTag (VecIndexScalarOffAddrOp WordVec 4 W32) = 1112+primOpTag (VecIndexScalarOffAddrOp WordVec 2 W64) = 1113+primOpTag (VecIndexScalarOffAddrOp WordVec 32 W8) = 1114+primOpTag (VecIndexScalarOffAddrOp WordVec 16 W16) = 1115+primOpTag (VecIndexScalarOffAddrOp WordVec 8 W32) = 1116+primOpTag (VecIndexScalarOffAddrOp WordVec 4 W64) = 1117+primOpTag (VecIndexScalarOffAddrOp WordVec 64 W8) = 1118+primOpTag (VecIndexScalarOffAddrOp WordVec 32 W16) = 1119+primOpTag (VecIndexScalarOffAddrOp WordVec 16 W32) = 1120+primOpTag (VecIndexScalarOffAddrOp WordVec 8 W64) = 1121+primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W32) = 1122+primOpTag (VecIndexScalarOffAddrOp FloatVec 2 W64) = 1123+primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W32) = 1124+primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W64) = 1125+primOpTag (VecIndexScalarOffAddrOp FloatVec 16 W32) = 1126+primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W64) = 1127+primOpTag (VecReadScalarOffAddrOp IntVec 16 W8) = 1128+primOpTag (VecReadScalarOffAddrOp IntVec 8 W16) = 1129+primOpTag (VecReadScalarOffAddrOp IntVec 4 W32) = 1130+primOpTag (VecReadScalarOffAddrOp IntVec 2 W64) = 1131+primOpTag (VecReadScalarOffAddrOp IntVec 32 W8) = 1132+primOpTag (VecReadScalarOffAddrOp IntVec 16 W16) = 1133+primOpTag (VecReadScalarOffAddrOp IntVec 8 W32) = 1134+primOpTag (VecReadScalarOffAddrOp IntVec 4 W64) = 1135+primOpTag (VecReadScalarOffAddrOp IntVec 64 W8) = 1136+primOpTag (VecReadScalarOffAddrOp IntVec 32 W16) = 1137+primOpTag (VecReadScalarOffAddrOp IntVec 16 W32) = 1138+primOpTag (VecReadScalarOffAddrOp IntVec 8 W64) = 1139+primOpTag (VecReadScalarOffAddrOp WordVec 16 W8) = 1140+primOpTag (VecReadScalarOffAddrOp WordVec 8 W16) = 1141+primOpTag (VecReadScalarOffAddrOp WordVec 4 W32) = 1142+primOpTag (VecReadScalarOffAddrOp WordVec 2 W64) = 1143+primOpTag (VecReadScalarOffAddrOp WordVec 32 W8) = 1144+primOpTag (VecReadScalarOffAddrOp WordVec 16 W16) = 1145+primOpTag (VecReadScalarOffAddrOp WordVec 8 W32) = 1146+primOpTag (VecReadScalarOffAddrOp WordVec 4 W64) = 1147+primOpTag (VecReadScalarOffAddrOp WordVec 64 W8) = 1148+primOpTag (VecReadScalarOffAddrOp WordVec 32 W16) = 1149+primOpTag (VecReadScalarOffAddrOp WordVec 16 W32) = 1150+primOpTag (VecReadScalarOffAddrOp WordVec 8 W64) = 1151+primOpTag (VecReadScalarOffAddrOp FloatVec 4 W32) = 1152+primOpTag (VecReadScalarOffAddrOp FloatVec 2 W64) = 1153+primOpTag (VecReadScalarOffAddrOp FloatVec 8 W32) = 1154+primOpTag (VecReadScalarOffAddrOp FloatVec 4 W64) = 1155+primOpTag (VecReadScalarOffAddrOp FloatVec 16 W32) = 1156+primOpTag (VecReadScalarOffAddrOp FloatVec 8 W64) = 1157+primOpTag (VecWriteScalarOffAddrOp IntVec 16 W8) = 1158+primOpTag (VecWriteScalarOffAddrOp IntVec 8 W16) = 1159+primOpTag (VecWriteScalarOffAddrOp IntVec 4 W32) = 1160+primOpTag (VecWriteScalarOffAddrOp IntVec 2 W64) = 1161+primOpTag (VecWriteScalarOffAddrOp IntVec 32 W8) = 1162+primOpTag (VecWriteScalarOffAddrOp IntVec 16 W16) = 1163+primOpTag (VecWriteScalarOffAddrOp IntVec 8 W32) = 1164+primOpTag (VecWriteScalarOffAddrOp IntVec 4 W64) = 1165+primOpTag (VecWriteScalarOffAddrOp IntVec 64 W8) = 1166+primOpTag (VecWriteScalarOffAddrOp IntVec 32 W16) = 1167+primOpTag (VecWriteScalarOffAddrOp IntVec 16 W32) = 1168+primOpTag (VecWriteScalarOffAddrOp IntVec 8 W64) = 1169+primOpTag (VecWriteScalarOffAddrOp WordVec 16 W8) = 1170+primOpTag (VecWriteScalarOffAddrOp WordVec 8 W16) = 1171+primOpTag (VecWriteScalarOffAddrOp WordVec 4 W32) = 1172+primOpTag (VecWriteScalarOffAddrOp WordVec 2 W64) = 1173+primOpTag (VecWriteScalarOffAddrOp WordVec 32 W8) = 1174+primOpTag (VecWriteScalarOffAddrOp WordVec 16 W16) = 1175+primOpTag (VecWriteScalarOffAddrOp WordVec 8 W32) = 1176+primOpTag (VecWriteScalarOffAddrOp WordVec 4 W64) = 1177+primOpTag (VecWriteScalarOffAddrOp WordVec 64 W8) = 1178+primOpTag (VecWriteScalarOffAddrOp WordVec 32 W16) = 1179+primOpTag (VecWriteScalarOffAddrOp WordVec 16 W32) = 1180+primOpTag (VecWriteScalarOffAddrOp WordVec 8 W64) = 1181+primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W32) = 1182+primOpTag (VecWriteScalarOffAddrOp FloatVec 2 W64) = 1183+primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W32) = 1184+primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W64) = 1185+primOpTag (VecWriteScalarOffAddrOp FloatVec 16 W32) = 1186+primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W64) = 1187+primOpTag PrefetchByteArrayOp3 = 1188+primOpTag PrefetchMutableByteArrayOp3 = 1189+primOpTag PrefetchAddrOp3 = 1190+primOpTag PrefetchValueOp3 = 1191+primOpTag PrefetchByteArrayOp2 = 1192+primOpTag PrefetchMutableByteArrayOp2 = 1193+primOpTag PrefetchAddrOp2 = 1194+primOpTag PrefetchValueOp2 = 1195+primOpTag PrefetchByteArrayOp1 = 1196+primOpTag PrefetchMutableByteArrayOp1 = 1197+primOpTag PrefetchAddrOp1 = 1198+primOpTag PrefetchValueOp1 = 1199+primOpTag PrefetchByteArrayOp0 = 1200+primOpTag PrefetchMutableByteArrayOp0 = 1201+primOpTag PrefetchAddrOp0 = 1202+primOpTag PrefetchValueOp0 = 1203
backpack/BkpSyn.hs view
@@ -12,14 +12,14 @@     HsComponentId(..),     LHsUnit, HsUnit(..),     LHsUnitDecl, HsUnitDecl(..),-    HsDeclType(..),     IncludeDecl(..),     LRenaming, Renaming(..),     ) where  import GhcPrelude -import HsSyn+import DriverPhases+import GHC.Hs import SrcLoc import Outputable import Module@@ -60,9 +60,8 @@  -- | A declaration in a package, e.g. a module or signature definition, -- or an include.-data HsDeclType = ModuleD | SignatureD data HsUnitDecl n-    = DeclD   HsDeclType (Located ModuleName) (Maybe (Located (HsModule GhcPs)))+    = DeclD   HscSource (Located ModuleName) (Maybe (Located (HsModule GhcPs)))     | IncludeD   (IncludeDecl n) type LHsUnitDecl n = Located (HsUnitDecl n) 
backpack/DriverBkp.hs view
@@ -54,7 +54,7 @@ import qualified GHC.LanguageExtensions as LangExt  import Panic-import Data.List+import Data.List ( partition ) import System.Exit import Control.Monad import System.FilePath@@ -82,8 +82,7 @@     buf <- liftIO $ hGetStringBuffer src_filename     let loc = mkRealSrcLoc (mkFastString src_filename) 1 1 -- TODO: not great     case unP parseBackpack (mkPState dflags buf loc) of-        PFailed _ span err -> do-            liftIO $ throwOneError (mkPlainErrMsg dflags span err)+        PFailed pst -> throwErrors (getErrorMessages pst dflags)         POk _ pkgname_bkp -> do             -- OK, so we have an LHsUnit PackageName, but we want an             -- LHsUnit HsComponentId.  So let's rename it.@@ -107,8 +106,9 @@   where     cid = hsComponentId (unLoc (hsunitName unit))     reqs = uniqDSetToList (unionManyUniqDSets (map (get_reqs . unLoc) (hsunitBody unit)))-    get_reqs (DeclD SignatureD (L _ modname) _) = unitUniqDSet modname-    get_reqs (DeclD ModuleD _ _) = emptyUniqDSet+    get_reqs (DeclD HsigFile (L _ modname) _) = unitUniqDSet modname+    get_reqs (DeclD HsSrcFile _ _) = emptyUniqDSet+    get_reqs (DeclD HsBootFile _ _) = emptyUniqDSet     get_reqs (IncludeD (IncludeDecl (L _ hsuid) _ _)) =         unitIdFreeHoles (convertHsUnitId hsuid) @@ -643,10 +643,7 @@      --  1. Create a HsSrcFile/HsigFile summary for every     --  explicitly mentioned module/signature.-    let get_decl (L _ (DeclD dt lmodname mb_hsmod)) = do-          let hsc_src = case dt of-                          ModuleD    -> HsSrcFile-                          SignatureD -> HsigFile+    let get_decl (L _ (DeclD hsc_src lmodname mb_hsmod)) = do           Just `fmap` summariseDecl pn hsc_src lmodname mb_hsmod         get_decl _ = return Nothing     nodes <- catMaybes `fmap` mapM get_decl decls
backpack/RnModIface.hs view
@@ -721,10 +721,8 @@ rnIfaceType (IfaceAppTy t1 t2)     = IfaceAppTy <$> rnIfaceType t1 <*> rnIfaceAppArgs t2 rnIfaceType (IfaceLitTy l)         = return (IfaceLitTy l)-rnIfaceType (IfaceFunTy t1 t2)-    = IfaceFunTy <$> rnIfaceType t1 <*> rnIfaceType t2-rnIfaceType (IfaceDFunTy t1 t2)-    = IfaceDFunTy <$> rnIfaceType t1 <*> rnIfaceType t2+rnIfaceType (IfaceFunTy af t1 t2)+    = IfaceFunTy af <$> rnIfaceType t1 <*> rnIfaceType t2 rnIfaceType (IfaceTupleTy s i tks)     = IfaceTupleTy s i <$> rnIfaceAppArgs tks rnIfaceType (IfaceTyConApp tc tks)
basicTypes/BasicTypes.hs view
@@ -26,7 +26,7 @@          Arity, RepArity, JoinArity, -        Alignment,+        Alignment, mkAlignment, alignmentOf, alignmentBytes,          PromotionFlag(..), isPromoted,         FunctionOrData(..),@@ -106,7 +106,9 @@          IntWithInf, infinity, treatZeroAsInf, mkIntWithInf, intGtLimit, -        SpliceExplicitFlag(..)+        SpliceExplicitFlag(..),++        TypeOrKind(..), isTypeLevel, isKindLevel    ) where  import GhcPrelude@@ -116,6 +118,7 @@ import SrcLoc ( Located,unLoc ) import Data.Data hiding (Fixity, Prefix, Infix) import Data.Function (on)+import Data.Bits  {- ************************************************************************@@ -196,8 +199,39 @@ ************************************************************************ -} -type Alignment = Int -- align to next N-byte boundary (N must be a power of 2).+-- | A power-of-two alignment+newtype Alignment = Alignment { alignmentBytes :: Int } deriving (Eq, Ord) +-- Builds an alignment, throws on non power of 2 input. This is not+-- ideal, but convenient for internal use and better then silently+-- passing incorrect data.+mkAlignment :: Int -> Alignment+mkAlignment n+  | n == 1 = Alignment 1+  | n == 2 = Alignment 2+  | n == 4 = Alignment 4+  | n == 8 = Alignment 8+  | n == 16 = Alignment 16+  | n == 32 = Alignment 32+  | n == 64 = Alignment 64+  | n == 128 = Alignment 128+  | n == 256 = Alignment 256+  | n == 512 = Alignment 512+  | otherwise = panic "mkAlignment: received either a non power of 2 argument or > 512"++-- Calculates an alignment of a number. x is aligned at N bytes means+-- the remainder from x / N is zero. Currently, interested in N <= 8,+-- but can be expanded to N <= 16 or N <= 32 if used within SSE or AVX+-- context.+alignmentOf :: Int -> Alignment+alignmentOf x = case x .&. 7 of+  0 -> Alignment 8+  4 -> Alignment 4+  2 -> Alignment 2+  _ -> Alignment 1++instance Outputable Alignment where+  ppr (Alignment m) = ppr m {- ************************************************************************ *                                                                      *@@ -756,6 +790,13 @@   | ConstraintTuple   deriving( Eq, Data ) +instance Outputable TupleSort where+  ppr ts = text $+    case ts of+      BoxedTuple      -> "BoxedTuple"+      UnboxedTuple    -> "UnboxedTuple"+      ConstraintTuple -> "ConstraintTuple"+ tupleSortBoxity :: TupleSort -> Boxity tupleSortBoxity BoxedTuple      = Boxed tupleSortBoxity UnboxedTuple    = Unboxed@@ -1179,7 +1220,7 @@                 | ActiveAfter SourceText PhaseNum                   -- Active in this phase and later                 deriving( Eq, Data )-                  -- Eq used in comparing rules in HsDecls+                  -- Eq used in comparing rules in GHC.Hs.Decls  -- | Rule Match Information data RuleMatchInfo = ConLike                    -- See Note [CONLIKE pragma]@@ -1612,3 +1653,25 @@           = ExplicitSplice | -- ^ <=> $(f x y)             ImplicitSplice   -- ^ <=> f x y,  i.e. a naked top level expression     deriving Data++{- *********************************************************************+*                                                                      *+                        Types vs Kinds+*                                                                      *+********************************************************************* -}++-- | Flag to see whether we're type-checking terms or kind-checking types+data TypeOrKind = TypeLevel | KindLevel+  deriving Eq++instance Outputable TypeOrKind where+  ppr TypeLevel = text "TypeLevel"+  ppr KindLevel = text "KindLevel"++isTypeLevel :: TypeOrKind -> Bool+isTypeLevel TypeLevel = True+isTypeLevel KindLevel = False++isKindLevel :: TypeOrKind -> Bool+isKindLevel TypeLevel = False+isKindLevel KindLevel = True
basicTypes/DataCon.hs view
@@ -73,6 +73,7 @@ import Class import Name import PrelNames+import Predicate import Var import VarSet( emptyVarSet ) import Outputable@@ -84,9 +85,11 @@ import UniqSet import Unique( mkAlphaTyVarUnique ) +import Data.ByteString (ByteString)+import qualified Data.ByteString.Builder as BSB+import qualified Data.ByteString.Lazy    as LBS import qualified Data.Data as Data import Data.Char-import Data.Word import Data.List( find )  {-@@ -957,36 +960,33 @@         -- If the DataCon has a wrapper, then the worker's type is never seen         -- by the user. The visibilities we pick do not matter here.         DCR{} -> mkInvForAllTys univ_tvs $ mkTyCoInvForAllTys ex_tvs $-                 mkFunTys rep_arg_tys $+                 mkVisFunTys rep_arg_tys $                  mkTyConApp rep_tycon (mkTyVarTys univ_tvs)        -- See Note [Promoted data constructors] in TyCon     prom_tv_bndrs = [ mkNamedTyConBinder vis tv                     | Bndr tv vis <- user_tvbs ] -    prom_arg_bndrs = mkCleanAnonTyConBinders prom_tv_bndrs (theta ++ orig_arg_tys)-    prom_res_kind  = orig_res_ty-    promoted       = mkPromotedDataCon con name prom_info-                                       (prom_tv_bndrs ++ prom_arg_bndrs)-                                       prom_res_kind roles rep_info+    fresh_names = freshNames (map getName user_tvbs)+      -- fresh_names: make sure that the "anonymous" tyvars don't+      -- clash in name or unique with the universal/existential ones.+      -- Tiresome!  And unnecessary because these tyvars are never looked at+    prom_theta_bndrs = [ mkAnonTyConBinder InvisArg (mkTyVar n t)+     {- Invisible -}   | (n,t) <- fresh_names `zip` theta ]+    prom_arg_bndrs   = [ mkAnonTyConBinder VisArg (mkTyVar n t)+     {- Visible -}     | (n,t) <- dropList theta fresh_names `zip` orig_arg_tys ]+    prom_bndrs       = prom_tv_bndrs ++ prom_theta_bndrs ++ prom_arg_bndrs+    prom_res_kind    = orig_res_ty+    promoted         = mkPromotedDataCon con name prom_info prom_bndrs+                                         prom_res_kind roles rep_info      roles = map (\tv -> if isTyVar tv then Nominal else Phantom)                 (univ_tvs ++ ex_tvs)-            ++ map (const Representational) orig_arg_tys--mkCleanAnonTyConBinders :: [TyConBinder] -> [Type] -> [TyConBinder]--- Make sure that the "anonymous" tyvars don't clash in--- name or unique with the universal/existential ones.--- Tiresome!  And unnecessary because these tyvars are never looked at-mkCleanAnonTyConBinders tc_bndrs tys-  = [ mkAnonTyConBinder (mkTyVar name ty)-    | (name, ty) <- fresh_names `zip` tys ]-  where-    fresh_names = freshNames (map getName (binderVars tc_bndrs))+            ++ map (const Representational) (theta ++ orig_arg_tys)  freshNames :: [Name] -> [Name]--- Make names whose Uniques and OccNames differ from--- those in the 'avoid' list+-- Make an infinite list of Names whose Uniques and OccNames+-- differ from those in the 'avoid' list freshNames avoids   = [ mkSystemName uniq occ     | n <- [0..]@@ -1297,8 +1297,8 @@                           dcOtherTheta = theta, dcOrigArgTys = arg_tys,                           dcOrigResTy = res_ty })   = mkForAllTys user_tvbs $-    mkFunTys theta $-    mkFunTys arg_tys $+    mkInvisFunTys theta $+    mkVisFunTys arg_tys $     res_ty  -- | Finds the instantiated types of the arguments required to construct a@@ -1356,11 +1356,15 @@  -- | The string @package:module.name@ identifying a constructor, which is attached -- to its info table and used by the GHCi debugger and the heap profiler-dataConIdentity :: DataCon -> [Word8]+dataConIdentity :: DataCon -> ByteString -- We want this string to be UTF-8, so we get the bytes directly from the FastStrings.-dataConIdentity dc = bytesFS (unitIdFS (moduleUnitId mod)) ++-                  fromIntegral (ord ':') : bytesFS (moduleNameFS (moduleName mod)) ++-                  fromIntegral (ord '.') : bytesFS (occNameFS (nameOccName name))+dataConIdentity dc = LBS.toStrict $ BSB.toLazyByteString $ mconcat+   [ BSB.byteString $ bytesFS (unitIdFS (moduleUnitId mod))+   , BSB.int8 $ fromIntegral (ord ':')+   , BSB.byteString $ bytesFS (moduleNameFS (moduleName mod))+   , BSB.int8 $ fromIntegral (ord '.')+   , BSB.byteString $ bytesFS (occNameFS (nameOccName name))+   ]   where name = dataConName dc         mod  = ASSERT( isExternalName name ) nameModule name @@ -1400,10 +1404,13 @@      -- TODO: could gather equalities from superclasses too     predEqs pred = case classifyPredType pred of-                     EqPred NomEq ty1 ty2       -> [(ty1, ty2)]-                     ClassPred eq [_, ty1, ty2]-                       | eq `hasKey` eqTyConKey -> [(ty1, ty2)]-                     _                          -> []+                     EqPred NomEq ty1 ty2         -> [(ty1, ty2)]+                     ClassPred eq args+                       | eq `hasKey` eqTyConKey+                       , [_, ty1, ty2] <- args    -> [(ty1, ty2)]+                       | eq `hasKey` heqTyConKey+                       , [_, _, ty1, ty2] <- args -> [(ty1, ty2)]+                     _                            -> []  -- | Were the type variables of the data con written in a different order -- than the regular order (universal tyvars followed by existential tyvars)?
basicTypes/Demand.hs view
@@ -16,14 +16,13 @@         absDmd, topDmd, botDmd, seqDmd,         lubDmd, bothDmd,         lazyApply1Dmd, lazyApply2Dmd, strictApply1Dmd,-        catchArgDmd,         isTopDmd, isAbsDmd, isSeqDmd,         peelUseCall, cleanUseDmd_maybe, strictenDmd, bothCleanDmd,         addCaseBndrDmd,          DmdType(..), dmdTypeDepth, lubDmdType, bothDmdType,         nopDmdType, botDmdType, mkDmdType,-        addDemand, removeDmdTyArgs,+        addDemand, ensureArgs,         BothDmdArg, mkBothDmdArg, toBothDmdArg,          DmdEnv, emptyDmdEnv,@@ -31,12 +30,12 @@          DmdResult, CPRResult,         isBotRes, isTopRes,-        topRes, botRes, exnRes, cprProdRes,+        topRes, botRes, cprProdRes,         vanillaCprProdRes, cprSumRes,         appIsBottom, isBottomingSig, pprIfaceStrictSig,         trimCPRInfo, returnsCPR_maybe,-        StrictSig(..), mkStrictSig, mkClosedStrictSig,-        nopSig, botSig, exnSig, cprProdSig,+        StrictSig(..), mkStrictSigForArity, mkClosedStrictSig,+        nopSig, botSig, cprProdSig,         isTopSig, hasDemandEnvSig,         splitStrictSig, strictSigDmdEnv,         increaseStrictSigArity, etaExpandStrictSig,@@ -48,10 +47,10 @@         deferAfterIO,         postProcessUnsat, postProcessDmdType, -        splitProdDmd_maybe, peelCallDmd, peelManyCalls, mkCallDmd,+        splitProdDmd_maybe, peelCallDmd, peelManyCalls, mkCallDmd, mkCallDmds,         mkWorkerDemand, dmdTransformSig, dmdTransformDataConSig,         dmdTransformDictSelSig, argOneShots, argsOneShots, saturatedByOneShots,-        trimToType, TypeShape(..),+        TypeShape(..), peelTsFuns, trimToType,          useCount, isUsedOnce, reuseEnv,         killUsageDemand, killUsageSig, zapUsageDemand, zapUsageEnvSig,@@ -114,105 +113,76 @@ *                                                                      * ************************************************************************ -        Lazy-         |-  ExnStr x -+          Lazy            |         HeadStr         /     \     SCall      SProd-        \      /+        \     /         HyperStr  Note [Exceptions and strictness] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Exceptions need rather careful treatment, especially because of 'catch'-('catch#'), 'catchSTM' ('catchSTM#'), and 'orElse' ('catchRetry#').-See Trac #11555, #10712 and #13330, and for some more background, #11222.--There are three main pieces.--* The Termination type includes ThrowsExn, meaning "under the given-  demand this expression either diverges or throws an exception".--  This is relatively uncontroversial. The primops raise# and-  raiseIO# both return ThrowsExn; nothing else does.--* An ArgStr has an ExnStr flag to say how to process the Termination-  result of the argument.  If the ExnStr flag is ExnStr, we squash-  ThrowsExn to topRes.  (This is done in postProcessDmdResult.)--Here is the key example+We used to smart about catching exceptions, but we aren't anymore.+See #14998 for the way it's resolved at the moment. -    catchRetry# (\s -> retry# s) blah+Here's a historic breakdown: -We analyse the argument (\s -> retry# s) with demand-    Str ExnStr (SCall HeadStr)-i.e. with the ExnStr flag set.-  - First we analyse the argument with the "clean-demand" (SCall-    HeadStr), getting a DmdResult of ThrowsExn from the saturated-    application of retry#.-  - Then we apply the post-processing for the shell, squashing the-    ThrowsExn to topRes.+Apparently, exception handling prim-ops didn't use to have any special+strictness signatures, thus defaulting to topSig, which assumes they use their+arguments lazily. Joachim was the first to realise that we could provide richer+information. Thus, in 0558911f91c (Dec 13), he added signatures to+primops.txt.pp indicating that functions like `catch#` and `catchRetry#` call+their argument, which is useful information for usage analysis. Still with a+'Lazy' strictness demand (i.e. 'lazyApply1Dmd'), though, and the world was fine. -This also applies uniformly to free variables.  Consider+In 7c0fff4 (July 15), Simon argued that giving `catch#` et al. a+'strictApply1Dmd' leads to substantial performance gains. That was at the cost+of correctness, as #10712 proved. So, back to 'lazyApply1Dmd' in+28638dfe79e (Dec 15). -    let r = \st -> retry# st-    in catchRetry# (\s -> ...(r s')..) handler st+Motivated to reproduce the gains of 7c0fff4 without the breakage of #10712,+Ben opened #11222. Simon made the demand analyser "understand catch" in+9915b656 (Jan 16) by adding a new 'catchArgDmd', which basically said to call+its argument strictly, but also swallow any thrown exceptions in+'postProcessDmdResult'. This was realized by extending the 'Str' constructor of+'ArgStr' with a 'ExnStr' field, indicating that it catches the exception, and+adding a 'ThrowsExn' constructor to the 'Termination' lattice as an element+between 'Dunno' and 'Diverges'. Then along came #11555 and finally #13330,+so we had to revert to 'lazyApply1Dmd' again in 701256df88c (Mar 17). -If we give the first argument of catch a strict signature, we'll get a demand-'C(S)' for 'r'; that is, 'r' is definitely called with one argument, which-indeed it is.  But when we post-process the free-var demands on catchRetry#'s-argument (in postProcessDmdEnv), we'll give 'r' a demand of (Str ExnStr (SCall-HeadStr)); and if we feed that into r's RHS (which would be reasonable) we'll-squash the retry just as if we'd inlined 'r'.+This left the other variants like 'catchRetry#' having 'catchArgDmd', which is+where #14998 picked up. Item 1 was concerned with measuring the impact of also+making `catchRetry#` and `catchSTM#` have 'lazyApply1Dmd'. The result was that+there was none. We removed the last usages of 'catchArgDmd' in 00b8ecb7+(Apr 18). There was a lot of dead code resulting from that change, that we+removed in ef6b283 (Jan 19): We got rid of 'ThrowsExn' and 'ExnStr' again and+removed any code that was dealing with the peculiarities. -* We don't try to get clever about 'catch#' and 'catchSTM#' at the moment. We-previously (#11222) tried to take advantage of the fact that 'catch#' calls its-first argument eagerly. See especially commit-9915b6564403a6d17651e9969e9ea5d7d7e78e7f. We analyzed that first argument with-a strict demand, and then performed a post-processing step at the end to change-ThrowsExn to TopRes.  The trouble, I believe, is that to use this approach-correctly, we'd need somewhat different information about that argument.-Diverges, ThrowsExn (i.e., diverges or throws an exception), and Dunno are the-wrong split here.  In order to evaluate part of the argument speculatively,-we'd need to know that it *does not throw an exception*. That is, that it-either diverges or succeeds. But we don't currently have a way to talk about-that. Abstractly and approximately,+Where did the speed-ups vanish to? In #14998, item 3 established that+turning 'catch#' strict in its first argument didn't bring back any of the+alleged performance benefits. Item 2 of that ticket finally found out that it+was entirely due to 'catchException's new (since #11555) definition, which+was simply -catch# m f s = case ORACLE m s of-  DivergesOrSucceeds -> m s-  Fails exc -> f exc s+    catchException !io handler = catch io handler -where the magical ORACLE determines whether or not (m s) throws an exception-when run, and if so which one. If we want, we can safely consider (catch# m f s)-strict in anything that both branches are strict in (by performing demand-analysis for 'catch#' in the same way we do for case). We could also safely-consider it strict in anything demanded by (m s) that is guaranteed not to-throw an exception under that demand, but I don't know if we have the means-to express that.+While 'catchException' is arguably the saner semantics for 'catch', it is an+internal helper function in "GHC.IO". Its use in+"GHC.IO.Handle.Internals.do_operation" made for the huge allocation differences:+Remove the bang and you find the regressions we originally wanted to avoid with+'catchArgDmd'. See also #exceptions_and_strictness# in "GHC.IO". -My mind keeps turning to this model (not as an actual change to the type, but-as a way to think about what's going on in the analysis):+So history keeps telling us that the only possibly correct strictness annotation+for the first argument of 'catch#' is 'lazyApply1Dmd', because 'catch#' really+is not strict in its argument: Just try this in GHCi -newtype IO a = IO {unIO :: State# s -> (# s, (# SomeException | a #) #)}-instance Monad IO where-  return a = IO $ \s -> (# s, (# | a #) #)-  IO m >>= f = IO $ \s -> case m s of-    (# s', (# e | #) #) -> (# s', e #)-    (# s', (# | a #) #) -> unIO (f a) s-raiseIO# e s = (# s, (# e | #) #)-catch# m f s = case m s of-  (# s', (# e | #) #) -> f e s'-  res -> res+  :set -XScopedTypeVariables+  import Control.Exception+  catch undefined (\(_ :: SomeException) -> putStrLn "you'll see this") -Thinking about it this way seems likely to be productive for analyzing IO-exception behavior, but imprecise exceptions and asynchronous exceptions remain-quite slippery beasts. Can we incorporate them? I think we can. We can imagine-applying 'seq#' to evaluate @m s@, determining whether it throws an imprecise-or asynchronous exception or whether it succeeds or throws an IO exception.-This confines the peculiarities to 'seq#', which is indeed rather essentially-peculiar.+Any analysis that assumes otherwise will be broken in some way or another+(beyond `-fno-pendantic-bottoms`). -}  -- | Vanilla strictness domain@@ -238,22 +208,13 @@ type ArgStr = Str StrDmd  -- | Strictness demand.-data Str s = Lazy         -- ^ Lazy (top of the lattice)-           | Str ExnStr s -- ^ Strict+data Str s = Lazy  -- ^ Lazy (top of the lattice)+           | Str s -- ^ Strict   deriving ( Eq, Show ) --- | How are exceptions handled for strict demands?-data ExnStr  -- See Note [Exceptions and strictness]-  = VanStr   -- ^ "Vanilla" case, ordinary strictness--  | ExnStr   -- ^ @Str ExnStr d@ means be strict like @d@ but then degrade-             -- the 'Termination' info 'ThrowsExn' to 'Dunno'.-             -- e.g. the first argument of @catch@ has this strictness.-  deriving( Eq, Show )- -- Well-formedness preserving constructors for the Strictness domain strBot, strTop :: ArgStr-strBot = Str VanStr HyperStr+strBot = Str HyperStr strTop = Lazy  mkSCall :: StrDmd -> StrDmd@@ -271,8 +232,8 @@ isLazy (Str {}) = False  isHyperStr :: ArgStr -> Bool-isHyperStr (Str _ HyperStr) = True-isHyperStr _                = False+isHyperStr (Str HyperStr) = True+isHyperStr _              = False  -- Pretty-printing instance Outputable StrDmd where@@ -282,18 +243,13 @@   ppr (SProd sx)    = char 'S' <> parens (hcat (map ppr sx))  instance Outputable ArgStr where-  ppr (Str x s)     = (case x of VanStr -> empty; ExnStr -> char 'x')-                      <> ppr s-  ppr Lazy          = char 'L'+  ppr (Str s) = ppr s+  ppr Lazy    = char 'L'  lubArgStr :: ArgStr -> ArgStr -> ArgStr-lubArgStr Lazy        _           = Lazy-lubArgStr _           Lazy        = Lazy-lubArgStr (Str x1 s1) (Str x2 s2) = Str (x1 `lubExnStr` x2) (s1 `lubStr` s2)--lubExnStr :: ExnStr -> ExnStr -> ExnStr-lubExnStr VanStr VanStr = VanStr-lubExnStr _      _      = ExnStr   -- ExnStr is lazier+lubArgStr Lazy     _        = Lazy+lubArgStr _        Lazy     = Lazy+lubArgStr (Str s1) (Str s2) = Str (s1 `lubStr` s2)  lubStr :: StrDmd -> StrDmd -> StrDmd lubStr HyperStr s              = s@@ -310,13 +266,9 @@ lubStr HeadStr   _             = HeadStr  bothArgStr :: ArgStr -> ArgStr -> ArgStr-bothArgStr Lazy        s           = s-bothArgStr s           Lazy        = s-bothArgStr (Str x1 s1) (Str x2 s2) = Str (x1 `bothExnStr` x2) (s1 `bothStr` s2)--bothExnStr :: ExnStr -> ExnStr -> ExnStr-bothExnStr ExnStr ExnStr = ExnStr-bothExnStr _      _      = VanStr+bothArgStr Lazy     s        = s+bothArgStr s        Lazy     = s+bothArgStr (Str s1) (Str s2) = Str (s1 `bothStr` s2)  bothStr :: StrDmd -> StrDmd -> StrDmd bothStr HyperStr _             = HyperStr@@ -344,13 +296,13 @@ seqStrDmdList (d:ds) = seqArgStr d `seq` seqStrDmdList ds  seqArgStr :: ArgStr -> ()-seqArgStr Lazy      = ()-seqArgStr (Str x s) = x `seq` seqStrDmd s+seqArgStr Lazy    = ()+seqArgStr (Str s) = seqStrDmd s  -- Splitting polymorphic demands splitArgStrProdDmd :: Int -> ArgStr -> Maybe [ArgStr]-splitArgStrProdDmd n Lazy      = Just (replicate n Lazy)-splitArgStrProdDmd n (Str _ s) = splitStrProdDmd n s+splitArgStrProdDmd n Lazy    = Just (replicate n Lazy)+splitArgStrProdDmd n (Str s) = splitStrProdDmd n s  splitStrProdDmd :: Int -> StrDmd -> Maybe [ArgStr] splitStrProdDmd n HyperStr   = Just (replicate n strBot)@@ -360,7 +312,7 @@                                Just ds splitStrProdDmd _ (SCall {}) = Nothing       -- This can happen when the programmer uses unsafeCoerce,-      -- and we don't then want to crash the compiler (Trac #9208)+      -- and we don't then want to crash the compiler (#9208)  {- ************************************************************************@@ -530,7 +482,7 @@ The demand on a binder in a case alternative comes   (a) From the demand on the binder itself   (b) From the demand on the case binder-Forgetting (b) led directly to Trac #10148.+Forgetting (b) led directly to #10148.  Example. Source code:   f x@(p,_) = if p then foo x else True@@ -548,7 +500,7 @@         True -> foo wild_X7 }  It's true that ds_dnz is *itself* absent, but the use of wild_X7 means-that it is very much alive and demanded.  See Trac #10148 for how the+that it is very much alive and demanded.  See #10148 for how the consequences play out.  This is needed even for non-product types, in case the case-binder@@ -651,7 +603,7 @@                                 Just ds splitUseProdDmd _ (UCall _ _) = Nothing       -- This can happen when the programmer uses unsafeCoerce,-      -- and we don't then want to crash the compiler (Trac #9208)+      -- and we don't then want to crash the compiler (#9208)  useCount :: Use u -> Count useCount Abs         = One@@ -675,7 +627,7 @@    both strict    and  used In particular, it is False for <HyperStr, Abs>, which can and does-arise in, say (Trac #7319)+arise in, say (#7319)    f x = raise# <some exception> Then 'x' is not used, so f gets strictness <HyperStr,Abs> -> . Now the w/w generates@@ -685,7 +637,7 @@    fx = case absentError "unused" of x -> raise <some exception> Since the program is going to diverge, this swaps one error for another, but it's really a bad idea to *ever* evaluate an absent argument.-In Trac #7319 we get+In #7319 we get    T7319.exe: Oops!  Entered absent arg w_s1Hd{v} [lid] [base:GHC.Base.String{tc 36u}]  Note [Dealing with call demands]@@ -711,22 +663,27 @@ mkHeadStrict cd = cd { sd = HeadStr }  mkOnceUsedDmd, mkManyUsedDmd :: CleanDemand -> Demand-mkOnceUsedDmd (JD {sd = s,ud = a}) = JD { sd = Str VanStr s, ud = Use One a }-mkManyUsedDmd (JD {sd = s,ud = a}) = JD { sd = Str VanStr s, ud = Use Many a }+mkOnceUsedDmd (JD {sd = s,ud = a}) = JD { sd = Str s, ud = Use One a }+mkManyUsedDmd (JD {sd = s,ud = a}) = JD { sd = Str s, ud = Use Many a }  evalDmd :: Demand -- Evaluated strictly, and used arbitrarily deeply-evalDmd = JD { sd = Str VanStr HeadStr, ud = useTop }+evalDmd = JD { sd = Str HeadStr, ud = useTop }  mkProdDmd :: [Demand] -> CleanDemand mkProdDmd dx   = JD { sd = mkSProd $ map getStrDmd dx        , ud = mkUProd $ map getUseDmd dx } +-- | Wraps the 'CleanDemand' with a one-shot call demand: @d@ -> @C1(d)@. mkCallDmd :: CleanDemand -> CleanDemand mkCallDmd (JD {sd = d, ud = u})   = JD { sd = mkSCall d, ud = mkUCall One u } +-- | @mkCallDmds n d@ returns @C1(C1...(C1 d))@ where there are @n@ @C1@'s.+mkCallDmds :: Arity -> CleanDemand -> CleanDemand+mkCallDmds arity cd = iterate mkCallDmd cd !! arity+ -- See Note [Demand on the worker] in WorkWrap mkWorkerDemand :: Int -> Demand mkWorkerDemand n = JD { sd = Lazy, ud = Use One (go n) }@@ -760,17 +717,11 @@  = JD { sd = s1 `bothArgStr` s2       , ud = a1 `bothArgUse` a2 } -lazyApply1Dmd, lazyApply2Dmd, strictApply1Dmd, catchArgDmd :: Demand+lazyApply1Dmd, lazyApply2Dmd, strictApply1Dmd :: Demand -strictApply1Dmd = JD { sd = Str VanStr (SCall HeadStr)+strictApply1Dmd = JD { sd = Str (SCall HeadStr)                      , ud = Use Many (UCall One Used) } --- First argument of catchRetry# and catchSTM#:---    uses its arg once, applies it once---    and catches exceptions (the ExnStr) part-catchArgDmd = JD { sd = Str ExnStr (SCall HeadStr)-                 , ud = Use One (UCall One Used) }- lazyApply1Dmd = JD { sd = Lazy                    , ud = Use One (UCall One Used) } @@ -790,7 +741,7 @@ botDmd = JD { sd = strBot, ud = useBot }  seqDmd :: Demand-seqDmd = JD { sd = Str VanStr HeadStr, ud = Use One UHead }+seqDmd = JD { sd = Str HeadStr, ud = Use One UHead }  oneifyDmd :: JointDmd s (Use u) -> JointDmd s (Use u) oneifyDmd (JD { sd = s, ud = Use _ a }) = JD { sd = s, ud = Use One a }@@ -806,7 +757,7 @@ isAbsDmd _               = False  -- for a bottom demand  isSeqDmd :: Demand -> Bool-isSeqDmd (JD {sd = Str VanStr HeadStr, ud = Use _ UHead}) = True+isSeqDmd (JD {sd = Str HeadStr, ud = Use _ UHead}) = True isSeqDmd _                                                = False  isUsedOnce :: JointDmd (Str s) (Use u) -> Bool@@ -858,14 +809,21 @@   ppr (TsFun ts)   = text "TsFun" <> parens (ppr ts)   ppr (TsProd tss) = parens (hsep $ punctuate comma $ map ppr tss) +-- | @peelTsFuns n ts@ tries to peel off @n@ 'TsFun' constructors from @ts@ and+-- returns 'Just' the wrapped 'TypeShape' on success, and 'Nothing' otherwise.+peelTsFuns :: Arity -> TypeShape -> Maybe TypeShape+peelTsFuns 0 ts         = Just ts+peelTsFuns n (TsFun ts) = peelTsFuns (n-1) ts+peelTsFuns _ _          = Nothing+ trimToType :: Demand -> TypeShape -> Demand -- See Note [Trimming a demand to a type] trimToType (JD { sd = ms, ud = mu }) ts   = JD (go_ms ms ts) (go_mu mu ts)   where     go_ms :: ArgStr -> TypeShape -> ArgStr-    go_ms Lazy      _  = Lazy-    go_ms (Str x s) ts = Str x (go_s s ts)+    go_ms Lazy    _  = Lazy+    go_ms (Str s) ts = Str (go_s s ts)      go_s :: StrDmd -> TypeShape -> StrDmd     go_s HyperStr    _            = HyperStr@@ -898,7 +856,7 @@ where A,B are the constructors of a GADT.  We'll get a U(U,U) demand on x from the A branch, but that's a stupid demand for x itself, which has type 'a'. Indeed we get ASSERTs going off (notably in-splitUseProdDmd, Trac #8569).+splitUseProdDmd, #8569).  Bottom line: we really don't want to have a binder whose demand is more deeply-nested than its type.  There are various ways to tackle this.@@ -931,11 +889,11 @@ -- The demand is not necessarily strict! splitProdDmd_maybe (JD { sd = s, ud = u })   = case (s,u) of-      (Str _ (SProd sx), Use _ u) | Just ux <- splitUseProdDmd (length sx) u-                                  -> Just (mkJointDmds sx ux)-      (Str _ s, Use _ (UProd ux)) | Just sx <- splitStrProdDmd (length ux) s-                                  -> Just (mkJointDmds sx ux)-      (Lazy,    Use _ (UProd ux)) -> Just (mkJointDmds (replicate (length ux) Lazy) ux)+      (Str (SProd sx), Use _ u) | Just ux <- splitUseProdDmd (length sx) u+                                -> Just (mkJointDmds sx ux)+      (Str s, Use _ (UProd ux)) | Just sx <- splitStrProdDmd (length ux) s+                                -> Just (mkJointDmds sx ux)+      (Lazy,  Use _ (UProd ux)) -> Just (mkJointDmds (replicate (length ux) Lazy) ux)       _ -> Nothing  {-@@ -948,9 +906,7 @@  DmdResult:     Dunno CPRResult                /-           ThrowsExn-             /-        Diverges+          Diverges   CPRResult:         NoCPR@@ -969,10 +925,12 @@  data Termination r   = Diverges    -- Definitely diverges-  | ThrowsExn   -- Definitely throws an exception or diverges   | Dunno r     -- Might diverge or converge   deriving( Eq, Show ) +-- At this point, Termination is just the 'Lifted' lattice over 'r'+-- (https://hackage.haskell.org/package/lattices/docs/Algebra-Lattice-Lifted.html)+ type DmdResult = Termination CPRResult  data CPRResult = NoCPR          -- Top of the lattice@@ -988,10 +946,7 @@  lubDmdResult :: DmdResult -> DmdResult -> DmdResult lubDmdResult Diverges       r              = r-lubDmdResult ThrowsExn      Diverges       = ThrowsExn-lubDmdResult ThrowsExn      r              = r-lubDmdResult (Dunno c1)     Diverges       = Dunno c1-lubDmdResult (Dunno c1)     ThrowsExn      = Dunno c1+lubDmdResult r              Diverges       = r lubDmdResult (Dunno c1)     (Dunno c2)     = Dunno (c1 `lubCPR` c2) -- This needs to commute with defaultDmd, i.e. -- defaultDmd (r1 `lubDmdResult` r2) = defaultDmd r1 `lubDmd` defaultDmd r2@@ -1000,7 +955,6 @@ bothDmdResult :: DmdResult -> Termination () -> DmdResult -- See Note [Asymmetry of 'both' for DmdType and DmdResult] bothDmdResult _ Diverges   = Diverges-bothDmdResult r ThrowsExn  = case r of { Diverges -> r; _ -> ThrowsExn } bothDmdResult r (Dunno {}) = r -- This needs to commute with defaultDmd, i.e. -- defaultDmd (r1 `bothDmdResult` r2) = defaultDmd r1 `bothDmd` defaultDmd r2@@ -1008,7 +962,6 @@  instance Outputable r => Outputable (Termination r) where   ppr Diverges      = char 'b'-  ppr ThrowsExn     = char 'x'   ppr (Dunno c)     = ppr c  instance Outputable CPRResult where@@ -1018,7 +971,6 @@  seqDmdResult :: DmdResult -> () seqDmdResult Diverges  = ()-seqDmdResult ThrowsExn = () seqDmdResult (Dunno c) = seqCPRResult c  seqCPRResult :: CPRResult -> ()@@ -1033,9 +985,8 @@  -- [cprRes] lets us switch off CPR analysis -- by making sure that everything uses TopRes-topRes, exnRes, botRes :: DmdResult+topRes, botRes :: DmdResult topRes = Dunno NoCPR-exnRes = ThrowsExn botRes = Diverges  cprSumRes :: ConTag -> DmdResult@@ -1051,10 +1002,9 @@ isTopRes (Dunno NoCPR) = True isTopRes _             = False +-- | True if the result diverges or throws an exception isBotRes :: DmdResult -> Bool--- True if the result diverges or throws an exception isBotRes Diverges   = True-isBotRes ThrowsExn  = True isBotRes (Dunno {}) = False  trimCPRInfo :: Bool -> Bool -> DmdResult -> DmdResult@@ -1083,7 +1033,7 @@ -- and [defaultDmd vs. resTypeArgDmd] defaultDmd :: Termination r -> Demand defaultDmd (Dunno {}) = absDmd-defaultDmd _          = botDmd  -- Diverges or ThrowsExn+defaultDmd _          = botDmd  -- Diverges  resTypeArgDmd :: Termination r -> Demand -- TopRes and BotRes are polymorphic, so that@@ -1092,7 +1042,7 @@ -- This function makes that concrete -- Also see Note [defaultDmd vs. resTypeArgDmd] resTypeArgDmd (Dunno _) = topDmd-resTypeArgDmd _         = botDmd   -- Diverges or ThrowsExn+resTypeArgDmd _         = botDmd   -- Diverges  {- Note [defaultDmd and resTypeArgDmd]@@ -1221,7 +1171,6 @@ toBothDmdArg (DmdType fv _ r) = (fv, go r)   where     go (Dunno {}) = Dunno ()-    go ThrowsExn  = ThrowsExn     go Diverges   = Diverges  bothDmdType :: DmdType -> BothDmdArg -> DmdType@@ -1251,10 +1200,9 @@ -- (lazy, absent, no CPR information, no termination information). -- Note that it is ''not'' the top of the lattice (which would be "may use everything"), -- so it is (no longer) called topDmd-nopDmdType, botDmdType, exnDmdType :: DmdType+nopDmdType, botDmdType :: DmdType nopDmdType = DmdType emptyDmdEnv [] topRes botDmdType = DmdType emptyDmdEnv [] botRes-exnDmdType = DmdType emptyDmdEnv [] exnRes  cprProdDmdType :: Arity -> DmdType cprProdDmdType arity@@ -1271,12 +1219,8 @@ dmdTypeDepth :: DmdType -> Arity dmdTypeDepth (DmdType _ ds _) = length ds --- Remove any demand on arguments. This is used in dmdAnalRhs on the body-removeDmdTyArgs :: DmdType -> DmdType-removeDmdTyArgs = ensureArgs 0---- This makes sure we can use the demand type with n arguments,--- It extends the argument list with the correct resTypeArgDmd+-- | This makes sure we can use the demand type with n arguments.+-- It extends the argument list with the correct resTypeArgDmd. -- It also adjusts the DmdResult: Divergence survives additional arguments, -- CPR information does not (and definite converge also would not). ensureArgs :: Arity -> DmdType -> DmdType@@ -1319,14 +1263,14 @@         DmdType fv ds _ -> DmdType fv ds (defer_res res)   where   defer_res r@(Dunno {}) = r-  defer_res _            = topRes  -- Diverges and ThrowsExn+  defer_res _            = topRes  -- Diverges  strictenDmd :: Demand -> CleanDemand strictenDmd (JD { sd = s, ud = u})   = JD { sd = poke_s s, ud = poke_u u }   where     poke_s Lazy      = HeadStr-    poke_s (Str _ s) = s+    poke_s (Str s)   = s     poke_u Abs       = UHead     poke_u (Use _ u) = u @@ -1344,8 +1288,8 @@     -- See Note [Analysing with absent demand]   where     (ss, s') = case s of-                Str x s' -> (Str x (), s')-                Lazy     -> (Lazy,     HeadStr)+                Str s' -> (Str (), s')+                Lazy   -> (Lazy,   HeadStr)      (us, u') = case u of                  Use c u' -> (Use c (), u')@@ -1361,14 +1305,11 @@     where        term_info = case postProcessDmdResult ss res_ty of                      Dunno _   -> Dunno ()-                     ThrowsExn -> ThrowsExn                      Diverges  -> Diverges  postProcessDmdResult :: Str () -> DmdResult -> DmdResult-postProcessDmdResult Lazy           _         = topRes-postProcessDmdResult (Str ExnStr _) ThrowsExn = topRes  -- Key point!--- Note that only ThrowsExn results can be caught, not Diverges-postProcessDmdResult _              res       = res+postProcessDmdResult Lazy _   = topRes+postProcessDmdResult _    res = res  postProcessDmdEnv :: DmdShell -> DmdEnv -> DmdEnv postProcessDmdEnv ds@(JD { sd = ss, ud = us }) env@@ -1376,7 +1317,7 @@     -- In this case (postProcessDmd ds) == id; avoid a redundant rebuild     -- of the environment. Be careful, bad things will happen if this doesn't     -- match postProcessDmd (see #13977).-  | Str VanStr _ <- ss+  | Str _ <- ss   , Use One _ <- us = env   | otherwise       = mapVarEnv (postProcessDmd ds) env   -- For the Absent case just discard all usage information@@ -1385,7 +1326,7 @@  reuseEnv :: DmdEnv -> DmdEnv reuseEnv = mapVarEnv (postProcessDmd-                        (JD { sd = Str VanStr (), ud = Use Many () }))+                        (JD { sd = Str (), ud = Use Many () }))  postProcessUnsat :: DmdShell -> DmdType -> DmdType postProcessUnsat ds@(JD { sd = ss }) (DmdType fv args res_ty)@@ -1398,18 +1339,13 @@   = JD { sd = s', ud = a' }   where     s' = case ss of-           Lazy         -> Lazy-           Str ExnStr _ -> markExnStr s-           Str VanStr _ -> s+           Lazy  -> Lazy+           Str _ -> s     a' = case us of            Abs        -> Abs            Use Many _ -> markReusedDmd a            Use One  _ -> a -markExnStr :: ArgStr -> ArgStr-markExnStr (Str VanStr s) = Str ExnStr s-markExnStr s              = s- -- Peels one call level from the demand, and also returns -- whether it was unsaturated (separately for strictness and usage) peelCallDmd :: CleanDemand -> (CleanDemand, DmdShell)@@ -1420,8 +1356,8 @@   = (JD { sd = s', ud = u' }, JD { sd = ss, ud = us })   where     (s', ss) = case s of-                 SCall s' -> (s',       Str VanStr ())-                 HyperStr -> (HyperStr, Str VanStr ())+                 SCall s' -> (s',       Str ())+                 HyperStr -> (HyperStr, Str ())                  _        -> (HeadStr,  Lazy)     (u', us) = case u of                  UCall c u' -> (u',   Use c    ())@@ -1438,8 +1374,8 @@   = JD { sd = go_str n str, ud = go_abs n abs }   where     go_str :: Int -> StrDmd -> Str ()  -- True <=> unsaturated, defer-    go_str 0 _          = Str VanStr ()-    go_str _ HyperStr   = Str VanStr () -- == go_str (n-1) HyperStr, as HyperStr = Call(HyperStr)+    go_str 0 _          = Str ()+    go_str _ HyperStr   = Str () -- == go_str (n-1) HyperStr, as HyperStr = Call(HyperStr)     go_str n (SCall d') = go_str (n-1) d'     go_str _ _          = Lazy @@ -1573,7 +1509,7 @@  * In a previous incarnation of GHC we needed to be extra careful in the   case of an *unlifted type*, because unlifted values are evaluated-  even if they are not used.  Example (see Trac #9254):+  even if they are not used.  Example (see #9254):      f :: (() -> (# Int#, () #)) -> ()           -- Strictness signature is           --    <C(S(LS)), 1*C1(U(A,1*U()))>@@ -1639,8 +1575,56 @@  If this same function is applied to one arg, all we can say is that it uses x with <L,U>, and its arg with demand <L,U>.++Note [Understanding DmdType and StrictSig]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Demand types are sound approximations of an expression's semantics relative to+the incoming demand we put the expression under. Consider the following+expression:++    \x y -> x `seq` (y, 2*x)++Here is a table with demand types resulting from different incoming demands we+put that expression under. Note the monotonicity; a stronger incoming demand+yields a more precise demand type:++    incoming demand                  |  demand type+    ----------------------------------------------------+    <S           ,HU              >  |  <L,U><L,U>{}+    <C(C(S     )),C1(C1(U       ))>  |  <S,U><L,U>{}+    <C(C(S(S,L))),C1(C1(U(1*U,A)))>  |  <S,1*HU><S,1*U>{}++Note that in the first example, the depth of the demand type was *higher* than+the arity of the incoming call demand due to the anonymous lambda.+The converse is also possible and happens when we unleash demand signatures.+In @f x y@, the incoming call demand on f has arity 2. But if all we have is a+demand signature with depth 1 for @f@ (which we can safely unleash, see below),+the demand type of @f@ under a call demand of arity 2 has a *lower* depth of 1.++So: Demand types are elicited by putting an expression under an incoming (call)+demand, the arity of which can be lower or higher than the depth of the+resulting demand type.+In contrast, a demand signature summarises a function's semantics *without*+immediately specifying the incoming demand it was produced under. Despite StrSig+being a newtype wrapper around DmdType, it actually encodes two things:++  * The threshold (i.e., minimum arity) to unleash the signature+  * A demand type that is sound to unleash when the minimum arity requirement is+    met.++Here comes the subtle part: The threshold is encoded in the wrapped demand+type's depth! So in mkStrictSigForArity we make sure to trim the list of+argument demands to the given threshold arity. Call sites will make sure that+this corresponds to the arity of the call demand that elicited the wrapped+demand type. See also Note [What are demand signatures?] in DmdAnal.++Besides trimming argument demands, mkStrictSigForArity will also trim CPR+information if necessary. -} +-- | The depth of the wrapped 'DmdType' encodes the arity at which it is safe+-- to unleash. Better construct this through 'mkStrictSigForArity'.+-- See Note [Understanding DmdType and StrictSig] newtype StrictSig = StrictSig DmdType                   deriving( Eq ) @@ -1652,34 +1636,43 @@ pprIfaceStrictSig (StrictSig (DmdType _ dmds res))   = hcat (map ppr dmds) <> ppr res -mkStrictSig :: DmdType -> StrictSig-mkStrictSig dmd_ty = StrictSig dmd_ty+-- | Turns a 'DmdType' computed for the particular 'Arity' into a 'StrictSig'+-- unleashable at that arity. See Note [Understanding DmdType and StrictSig]+mkStrictSigForArity :: Arity -> DmdType -> StrictSig+mkStrictSigForArity arity dmd_ty = StrictSig (ensureArgs arity dmd_ty)  mkClosedStrictSig :: [Demand] -> DmdResult -> StrictSig-mkClosedStrictSig ds res = mkStrictSig (DmdType emptyDmdEnv ds res)+mkClosedStrictSig ds res = mkStrictSigForArity (length ds) (DmdType emptyDmdEnv ds res)  splitStrictSig :: StrictSig -> ([Demand], DmdResult) splitStrictSig (StrictSig (DmdType _ dmds res)) = (dmds, res)  increaseStrictSigArity :: Int -> StrictSig -> StrictSig--- Add extra arguments to a strictness signature+-- ^ Add extra arguments to a strictness signature.+-- In contrast to 'etaExpandStrictSig', this /prepends/ additional argument+-- demands and leaves CPR info intact. increaseStrictSigArity arity_increase sig@(StrictSig dmd_ty@(DmdType env dmds res))   | isTopDmdType dmd_ty = sig-  | arity_increase <= 0 = sig+  | arity_increase == 0 = sig+  | arity_increase < 0  = WARN( True, text "increaseStrictSigArity:"+                                  <+> text "negative arity increase"+                                  <+> ppr arity_increase )+                          nopSig   | otherwise           = StrictSig (DmdType env dmds' res)   where     dmds' = replicate arity_increase topDmd ++ dmds  etaExpandStrictSig :: Arity -> StrictSig -> StrictSig--- We are expanding (\x y. e) to (\x y z. e z)--- Add exta demands to the /end/ of the arg demands if necessary-etaExpandStrictSig arity sig@(StrictSig dmd_ty@(DmdType env dmds res))-  | isTopDmdType dmd_ty = sig-  | arity_increase <= 0 = sig-  | otherwise           = StrictSig (DmdType env dmds' res)-  where-    arity_increase = arity - length dmds-    dmds' = dmds ++ replicate arity_increase topDmd+-- ^ We are expanding (\x y. e) to (\x y z. e z).+-- In contrast to 'increaseStrictSigArity', this /appends/ extra arg demands if+-- necessary, potentially destroying the signature's CPR property.+etaExpandStrictSig arity (StrictSig dmd_ty)+  | arity < dmdTypeDepth dmd_ty+  -- an arity decrease must zap the whole signature, because it was possibly+  -- computed for a higher incoming call demand.+  = nopSig+  | otherwise+  = StrictSig $ ensureArgs arity dmd_ty  isTopSig :: StrictSig -> Bool isTopSig (StrictSig ty) = isTopDmdType ty@@ -1690,14 +1683,13 @@ strictSigDmdEnv :: StrictSig -> DmdEnv strictSigDmdEnv (StrictSig (DmdType env _ _)) = env +-- | True if the signature diverges or throws an exception isBottomingSig :: StrictSig -> Bool--- True if the signature diverges or throws an exception isBottomingSig (StrictSig (DmdType _ _ res)) = isBotRes res -nopSig, botSig, exnSig :: StrictSig+nopSig, botSig :: StrictSig nopSig = StrictSig nopDmdType botSig = StrictSig botDmdType-exnSig = StrictSig exnDmdType  cprProdSig :: Arity -> StrictSig cprProdSig arity = StrictSig (cprProdDmdType arity)@@ -1769,7 +1761,7 @@ so we'll have inlined 'op' into a cast.  So we can bale out in a conservative way, returning nopDmdType. -It is (just.. Trac #8329) possible to be running strictness analysis *without*+It is (just.. #8329) possible to be running strictness analysis *without* having inlined class ops from single-method classes.  Suppose you are using ghc --make; and the first module has a local -O0 flag.  So you may load a class without interface pragmas, ie (currently) without an unfolding for the class@@ -1831,7 +1823,7 @@ binders \pqr and \xyz; see Note [Use one-shot information] in OccurAnal. -} --- appIsBottom returns true if an application to n args+-- | Returns true if an application to n args -- would diverge or throw an exception -- See Note [Unsaturated applications] appIsBottom :: StrictSig -> Int -> Bool@@ -1954,14 +1946,14 @@              --              -- TODO revisit this if we ever do boxity analysis            | otherwise -> case mkProdDmd $ zipWith strictifyDictDmd inst_con_arg_tys dmds of-               JD {sd = s,ud = a} -> JD (Str VanStr s) (Use n a)+               JD {sd = s,ud = a} -> JD (Str s) (Use n a)              -- TODO could optimize with an aborting variant of zipWith since              -- the superclass dicts are always a prefix   _ -> dmd -- unused or not a dictionary  strictifyDmd :: Demand -> Demand strictifyDmd dmd@(JD { sd = str })-  = dmd { sd = str `bothArgStr` Str VanStr HeadStr }+  = dmd { sd = str `bothArgStr` Str HeadStr }  {- Note [HyperStr and Use demands]@@ -2002,30 +1994,19 @@            _ -> do sx <- get bh                    return (SProd sx) -instance Binary ExnStr where-  put_ bh VanStr = putByte bh 0-  put_ bh ExnStr = putByte bh 1--  get bh = do h <- getByte bh-              return (case h of-                        0 -> VanStr-                        _ -> ExnStr)- instance Binary ArgStr where     put_ bh Lazy         = do             putByte bh 0-    put_ bh (Str x s)    = do+    put_ bh (Str s)    = do             putByte bh 1-            put_ bh x             put_ bh s      get  bh = do             h <- getByte bh             case h of               0 -> return Lazy-              _ -> do x <- get bh-                      s  <- get bh-                      return $ Str x s+              _ -> do s  <- get bh+                      return $ Str s  instance Binary Count where     put_ bh One  = do putByte bh 0@@ -2102,13 +2083,11 @@  instance Binary DmdResult where   put_ bh (Dunno c)     = do { putByte bh 0; put_ bh c }-  put_ bh ThrowsExn     = putByte bh 1-  put_ bh Diverges      = putByte bh 2+  put_ bh Diverges      = putByte bh 1    get bh = do { h <- getByte bh               ; case h of                   0 -> do { c <- get bh; return (Dunno c) }-                  1 -> return ThrowsExn                   _ -> return Diverges }  instance Binary CPRResult where
basicTypes/Id.hs view
@@ -66,13 +66,13 @@         isClassOpId_maybe, isDFunId,         isPrimOpId, isPrimOpId_maybe,         isFCallId, isFCallId_maybe,-        isDataConWorkId, isDataConWorkId_maybe, isDataConId_maybe, idDataCon,+        isDataConWorkId, isDataConWorkId_maybe,+        isDataConWrapId, isDataConWrapId_maybe,+        isDataConId_maybe,+        idDataCon,         isConLikeId, isBottomingId, idIsFrom,         hasNoBinding, -        -- ** Evidence variables-        DictId, isDictId, isEvVar,-         -- ** Join variables         JoinId, isJoinId, isJoinId_maybe, idJoinArity,         asJoinId, asJoinId_maybe, zapJoinId,@@ -126,7 +126,7 @@ import BasicTypes  -- Imported and re-exported-import Var( Id, CoVar, DictId, JoinId,+import Var( Id, CoVar, JoinId,             InId,  InVar,             OutId, OutVar,             idInfo, idDetails, setIdDetails, globaliseId, varType,@@ -383,7 +383,7 @@  * Look them up in the current substitution when we come across    occurrences of them (in Subst.lookupIdSubst). Lacking this we    can get an out-of-date unfolding, which can in turn make the-   simplifier go into an infinite loop (Trac #9857)+   simplifier go into an infinite loop (#9857)   * Ensure that for dfuns that the specialiser does not float dict uses    above their defns, which would prevent good simplifications happening.@@ -419,12 +419,14 @@ isPrimOpId              :: Id -> Bool isFCallId               :: Id -> Bool isDataConWorkId         :: Id -> Bool+isDataConWrapId         :: Id -> Bool isDFunId                :: Id -> Bool  isClassOpId_maybe       :: Id -> Maybe Class isPrimOpId_maybe        :: Id -> Maybe PrimOp isFCallId_maybe         :: Id -> Maybe ForeignCall isDataConWorkId_maybe   :: Id -> Maybe DataCon+isDataConWrapId_maybe   :: Id -> Maybe DataCon  isRecordSelector id = case Var.idDetails id of                         RecSelId {}     -> True@@ -474,6 +476,14 @@                         DataConWorkId con -> Just con                         _                 -> Nothing +isDataConWrapId id = case Var.idDetails id of+                       DataConWrapId _ -> True+                       _               -> False++isDataConWrapId_maybe id = case Var.idDetails id of+                        DataConWrapId con -> Just con+                        _                 -> Nothing+ isDataConId_maybe :: Id -> Maybe DataCon isDataConId_maybe id = case Var.idDetails id of                          DataConWorkId con -> Just con@@ -555,16 +565,16 @@  This has a compulsory unfolding because we can't lambda-bind those arguments.  But the compulsory unfolding may leave levity-polymorphic-lambdas if it is not applied to enough arguments; e.g. (Trac #14561)+lambdas if it is not applied to enough arguments; e.g. (#14561)   bad :: forall (a :: TYPE r). a -> a   bad = unsafeCoerce#  The desugar has special magic to detect such cases: DsExpr.badUseOfLevPolyPrimop. And we want that magic to apply to levity-polymorphic compulsory-inline things. The easiest way to do this is for hasNoBinding to return True of all things-that have compulsory unfolding.  A very Ids with a compulsory unfolding also+that have compulsory unfolding.  Some Ids with a compulsory unfolding also have a binding, but it does not harm to say they don't here, and its a very-simple way to fix Trac #14561.+simple way to fix #14561. -}  isDeadBinder :: Id -> Bool@@ -574,20 +584,6 @@ {- ************************************************************************ *                                                                      *-              Evidence variables-*                                                                      *-************************************************************************--}--isEvVar :: Var -> Bool-isEvVar var = isEvVarType (varType var)--isDictId :: Id -> Bool-isDictId id = isDictTy (idType id)--{--************************************************************************-*                                                                      *               Join variables *                                                                      * ************************************************************************@@ -650,6 +646,7 @@   | isId v    = isBottomingSig (idStrictness v)   | otherwise = False +-- | Accesses the 'Id''s 'strictnessInfo'. idStrictness :: Id -> StrictSig idStrictness id = strictnessInfo (idInfo id) @@ -924,7 +921,7 @@  where g' is also marked as LoopBreaker.  If not, terrible things can happen if we re-simplify the binding (and the Simplifier does-sometimes simplify a term twice); see Trac #4345.+sometimes simplify a term twice); see #4345.  It's not so simple to retain   * worker info
basicTypes/IdInfo.hs view
@@ -237,22 +237,34 @@ -- too big. data IdInfo   = IdInfo {-        arityInfo       :: !ArityInfo,          -- ^ 'Id' arity-        ruleInfo        :: RuleInfo,            -- ^ Specialisations of the 'Id's function which exist-                                                -- See Note [Specialisations and RULES in IdInfo]-        unfoldingInfo   :: Unfolding,           -- ^ The 'Id's unfolding-        cafInfo         :: CafInfo,             -- ^ 'Id' CAF info-        oneShotInfo     :: OneShotInfo,         -- ^ Info about a lambda-bound variable, if the 'Id' is one-        inlinePragInfo  :: InlinePragma,        -- ^ Any inline pragma atached to the 'Id'-        occInfo         :: OccInfo,             -- ^ How the 'Id' occurs in the program--        strictnessInfo  :: StrictSig,      --  ^ A strictness signature--        demandInfo      :: Demand,       -- ^ ID demand information-        callArityInfo   :: !ArityInfo,   -- ^ How this is called.-                                         -- n <=> all calls have at least n arguments--        levityInfo      :: LevityInfo    -- ^ when applied, will this Id ever have a levity-polymorphic type?+        arityInfo       :: !ArityInfo,+        -- ^ 'Id' arity, as computed by 'CoreArity'. Specifies how many+        -- arguments this 'Id' has to be applied to before it doesn any+        -- meaningful work.+        ruleInfo        :: RuleInfo,+        -- ^ Specialisations of the 'Id's function which exist.+        -- See Note [Specialisations and RULES in IdInfo]+        unfoldingInfo   :: Unfolding,+        -- ^ The 'Id's unfolding+        cafInfo         :: CafInfo,+        -- ^ 'Id' CAF info+        oneShotInfo     :: OneShotInfo,+        -- ^ Info about a lambda-bound variable, if the 'Id' is one+        inlinePragInfo  :: InlinePragma,+        -- ^ Any inline pragma atached to the 'Id'+        occInfo         :: OccInfo,+        -- ^ How the 'Id' occurs in the program+        strictnessInfo  :: StrictSig,+        -- ^ A strictness signature. Digests how a function uses its arguments+        -- if applied to at least 'arityInfo' arguments.+        demandInfo      :: Demand,+        -- ^ ID demand information+        callArityInfo   :: !ArityInfo,+        -- ^ How this is called. This is the number of arguments to which a+        -- binding can be eta-expanded without losing any sharing.+        -- n <=> all calls have at least n arguments+        levityInfo      :: LevityInfo+        -- ^ when applied, will this Id ever have a levity-polymorphic type?     }  -- Setters
basicTypes/Lexeme.hs view
@@ -159,9 +159,9 @@                  is_tuple_name1 True  str ||                    -- Is it a boxed tuple...                  is_tuple_name1 False str ||-                   -- ...or an unboxed tuple (Trac #12407)...+                   -- ...or an unboxed tuple (#12407)...                  is_sum_name1 str-                   -- ...or an unboxed sum (Trac #12514)?+                   -- ...or an unboxed sum (#12514)?   where     -- check for tuple name, starting at the beginning     is_tuple_name1 True  ('(' : rest)       = is_tuple_name2 True  rest
basicTypes/Literal.hs view
@@ -61,7 +61,7 @@ import Binary import Constants import DynFlags-import Platform+import GHC.Platform import UniqFM import Util @@ -110,7 +110,9 @@    | LitNumber !LitNumType !Integer Type                                 -- ^ Any numeric literal that can be-                                -- internally represented with an Integer+                                -- internally represented with an Integer.+                                -- See Note [Types of LitNumbers] below for the+                                -- Type field.    | LitString  ByteString       -- ^ A string-literal: stored and emitted                                 -- UTF-8 encoded, we'll arrange to decode it@@ -188,6 +190,20 @@ ~~~~~~~~~~~~~~~~~~~~~~~ Similar to Integer literals. +Note [String literals]+~~~~~~~~~~~~~~~~~~~~~~++String literals are UTF-8 encoded and stored into ByteStrings in the following+ASTs: Haskell, Core, Stg, Cmm. TH can also emit ByteString based string literals+with the BytesPrimL constructor (see #14741).++It wasn't true before as [Word8] was used in Cmm AST and in TH which was quite+bad for performance with large strings (see #16198 and #14741).++To include string literals into output objects, the assembler code generator has+to embed the UTF-8 encoded binary blob. See Note [Embedding large binary blobs]+for more details.+ -}  instance Binary LitNumType where@@ -237,6 +253,7 @@               6 -> do                     nt <- get bh                     i  <- get bh+                    -- Note [Types of LitNumbers]                     let t = case nt of                             LitNumInt     -> intPrimTy                             LitNumInt64   -> int64PrimTy@@ -253,20 +270,15 @@                     return (LitRubbish)  instance Outputable Literal where-    ppr lit = pprLiteral (\d -> d) lit+    ppr = pprLiteral id  instance Eq Literal where-    a == b = case (a `compare` b) of { EQ -> True;   _ -> False }-    a /= b = case (a `compare` b) of { EQ -> False;  _ -> True  }+    a == b = compare a b == EQ  -- | Needed for the @Ord@ instance of 'AltCon', which in turn is needed in -- 'TrieMap.CoreMap'. instance Ord Literal where-    a <= b = case (a `compare` b) of { LT -> True;  EQ -> True;  GT -> False }-    a <  b = case (a `compare` b) of { LT -> True;  EQ -> False; GT -> False }-    a >= b = case (a `compare` b) of { LT -> False; EQ -> True;  GT -> True  }-    a >  b = case (a `compare` b) of { LT -> False; EQ -> False; GT -> True  }-    compare a b = cmpLit a b+    compare = cmpLit  {-         Construction@@ -295,13 +307,11 @@ wrapLitNumber :: DynFlags -> Literal -> Literal wrapLitNumber dflags v@(LitNumber nt i t) = case nt of   LitNumInt -> case platformWordSize (targetPlatform dflags) of-    4 -> LitNumber nt (toInteger (fromIntegral i :: Int32)) t-    8 -> LitNumber nt (toInteger (fromIntegral i :: Int64)) t-    w -> panic ("wrapLitNumber: Unknown platformWordSize: " ++ show w)+    PW4 -> LitNumber nt (toInteger (fromIntegral i :: Int32)) t+    PW8 -> LitNumber nt (toInteger (fromIntegral i :: Int64)) t   LitNumWord -> case platformWordSize (targetPlatform dflags) of-    4 -> LitNumber nt (toInteger (fromIntegral i :: Word32)) t-    8 -> LitNumber nt (toInteger (fromIntegral i :: Word64)) t-    w -> panic ("wrapLitNumber: Unknown platformWordSize: " ++ show w)+    PW4 -> LitNumber nt (toInteger (fromIntegral i :: Word32)) t+    PW8 -> LitNumber nt (toInteger (fromIntegral i :: Word64)) t   LitNumInt64   -> LitNumber nt (toInteger (fromIntegral i :: Int64)) t   LitNumWord64  -> LitNumber nt (toInteger (fromIntegral i :: Word64)) t   LitNumInteger -> v@@ -418,7 +428,7 @@ -- e.g. some of the \"error\" functions in GHC.Err such as @GHC.Err.runtimeError@ mkLitString :: String -> Literal -- stored UTF-8 encoded-mkLitString s = LitString (fastStringToByteString $ mkFastString s)+mkLitString s = LitString (bytesFS $ mkFastString s)  mkLitInteger :: Integer -> Type -> Literal mkLitInteger x ty = LitNumber LitNumInteger x ty@@ -630,6 +640,26 @@ {-         Types         ~~~~~++Note [Types of LitNumbers]+~~~~~~~~~~~~~~~~~~~~~~~~~~++A LitNumber's type is always known from its LitNumType:++  LitNumInteger -> Integer+  LitNumNatural -> Natural+  LitNumInt     -> Int# (intPrimTy)+  LitNumInt64   -> Int64# (int64PrimTy)+  LitNumWord    -> Word# (wordPrimTy)+  LitNumWord64  -> Word64# (word64PrimTy)++The reason why we have a Type field is because Integer and Natural types live+outside of GHC (in the libraries), so we have to get the actual Type via+lookupTyCon, tcIfaceTyConByName etc. that's too inconvenient in the call sites+of literalType, so we do that when creating these literals, and literalType+simply reads the field.++(But see also Note [Integer literals] and Note [Natural literals]) -}  -- | Find the Haskell 'Type' the literal occupies@@ -640,7 +670,7 @@ literalType (LitFloat _)      = floatPrimTy literalType (LitDouble _)     = doublePrimTy literalType (LitLabel _ _ _)  = addrPrimTy-literalType (LitNumber _ _ t) = t+literalType (LitNumber _ _ t) = t -- Note [Types of LitNumbers] literalType (LitRubbish)      = mkForAllTy a Inferred (mkTyVarTy a)   where     a = alphaTyVarUnliftedRep
basicTypes/MkId.hs view
@@ -29,6 +29,7 @@         nullAddrId, seqId, lazyId, lazyIdKey,         coercionTokenId, magicDictId, coerceId,         proxyHashId, noinlineId, noinlineIdName,+        coerceName,          -- Re-export error Ids         module PrelRules@@ -47,7 +48,7 @@ import Coercion import TcType import MkCore-import CoreUtils        ( exprType, mkCast )+import CoreUtils        ( mkCast, mkDefaultCase ) import CoreUnfold import Literal import TyCon@@ -71,6 +72,7 @@ import Outputable import FastString import ListSetOps+import Var (VarBndr(Bndr)) import qualified GHC.LanguageExtensions as LangExt  import Data.Maybe       ( maybeToList )@@ -298,7 +300,72 @@ predicate (C a).  But now we treat that as an ordinary argument, not part of the theta-type, so all is well. +Note [Newtype workers]+~~~~~~~~~~~~~~~~~~~~~~+A newtype does not really have a worker. Instead, newtype constructors+just unfold into a cast. But we need *something* for, say, MkAge to refer+to. So, we do this: +* The Id used as the newtype worker will have a compulsory unfolding to+  a cast. See Note [Compulsory newtype unfolding]++* This Id is labeled as a DataConWrapId. We don't want to use a DataConWorkId,+  as those have special treatment in the back end.++* There is no top-level binding, because the compulsory unfolding+  means that it will be inlined (to a cast) at every call site.++We probably should have a NewtypeWorkId, but these Ids disappear as soon as+we desugar anyway, so it seems a step too far.++Note [Compulsory newtype unfolding]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Newtype wrappers, just like workers, have compulsory unfoldings.+This is needed so that two optimizations involving newtypes have the same+effect whether a wrapper is present or not:++(1) Case-of-known constructor.+    See Note [beta-reduction in exprIsConApp_maybe].++(2) Matching against the map/coerce RULE. Suppose we have the RULE++    {-# RULE "map/coerce" map coerce = ... #-}++    As described in Note [Getting the map/coerce RULE to work],+    the occurrence of 'coerce' is transformed into:++    {-# RULE "map/coerce" forall (c :: T1 ~R# T2).+                          map ((\v -> v) `cast` c) = ... #-}++    We'd like 'map Age' to match the LHS. For this to happen, Age+    must be unfolded, otherwise we'll be stuck. This is tested in T16208.++It also allows for the posssibility of levity polymorphic newtypes+with wrappers (with -XUnliftedNewtypes):++  newtype N (a :: TYPE r) = MkN a++With -XUnliftedNewtypes, this is allowed -- even though MkN is levity-+polymorphic. It's OK because MkN evaporates in the compiled code, becoming+just a cast. That is, it has a compulsory unfolding. As long as its+argument is not levity-polymorphic (which it can't be, according to+Note [Levity polymorphism invariants] in CoreSyn), and it's saturated,+no levity-polymorphic code ends up in the code generator. The saturation+condition is effectively checked by Note [Detecting forced eta expansion]+in DsExpr.++However, if we make a *wrapper* for a newtype, we get into trouble.+The saturation condition is no longer checked (because hasNoBinding+returns False) and indeed we generate a forbidden levity-polymorphic+binding.++The solution is simple, though: just make the newtype wrappers+as ephemeral as the newtype workers. In other words, give the wrappers+compulsory unfoldings and no bindings. The compulsory unfolding is given+in wrap_unf in mkDataConRep, and the lack of a binding happens in+TidyPgm.getTyConImplicitBinds, where we say that a newtype has no implicit+bindings.+ ************************************************************************ *                                                                      * \subsection{Dictionary selectors}@@ -337,7 +404,7 @@     val_index      = assoc "MkId.mkDictSelId" (sel_names `zip` [0..]) name      sel_ty = mkForAllTys tyvars $-             mkFunTy (mkClassPred clas (mkTyVarTys (binderVars tyvars))) $+             mkInvisFunTy (mkClassPred clas (mkTyVarTys (binderVars tyvars))) $              getNth arg_tys val_index      base_info = noCafIdInfo@@ -396,8 +463,8 @@      rhs_body | new_tycon = unwrapNewTypeBody tycon (mkTyVarTys tyvars)                                                    (Var dict_id)-             | otherwise = Case (Var dict_id) dict_id (idType the_arg_id)-                                [(DataAlt data_con, arg_ids, varToCoreExpr the_arg_id)]+             | otherwise = mkSingleAltCase (Var dict_id) dict_id (DataAlt data_con)+                                           arg_ids (varToCoreExpr the_arg_id)                                 -- varToCoreExpr needed for equality superclass selectors                                 --   sel a b d = case x of { MkC _ (g:a~b) _ -> CO g } @@ -409,8 +476,8 @@ -- dictSelRule val_index n_ty_args _ id_unf _ args   | (dict_arg : _) <- drop n_ty_args args-  , Just (_, _, con_args) <- exprIsConApp_maybe id_unf dict_arg-  = Just (getNth con_args val_index)+  , Just (_, floats, _, _, con_args) <- exprIsConApp_maybe id_unf dict_arg+  = Just (wrapFloats floats $ getNth con_args val_index)   | otherwise   = Nothing @@ -426,6 +493,8 @@ mkDataConWorkId wkr_name data_con   | isNewTyCon tycon   = mkGlobalId (DataConWrapId data_con) wkr_name wkr_ty nt_work_info+      -- See Note [Newtype workers]+   | otherwise   = mkGlobalId (DataConWorkId data_con) wkr_name wkr_ty alg_wkr_info @@ -554,6 +623,7 @@    map (\a. case i of I# i# a -> Foo i# a) (f a)  and now case-of-known-constructor eliminates the redundant allocation.+ -}  mkDataConRep :: DynFlags@@ -583,7 +653,7 @@                              -- We need to get the CAF info right here because TidyPgm                              -- does not tidy the IdInfo of implicit bindings (like the wrapper)                              -- so it not make sure that the CAF info is sane-                         `setNeverLevPoly`      wrap_ty+                         `setLevityInfoWithType` wrap_ty               wrap_sig = mkClosedStrictSig wrap_arg_dmds (dataConCPR data_con) @@ -596,7 +666,7 @@                         | otherwise           = topDmd               wrap_prag = alwaysInlinePragma `setInlinePragmaActivation`-                         activeAfterInitial+                         activeDuringFinal                          -- See Note [Activation for data constructor wrappers]               -- The wrapper will usually be inlined (see wrap_unf), so its@@ -607,7 +677,9 @@              -- See Note [Inline partially-applied constructor wrappers]              -- Passing Nothing here allows the wrapper to inline when              -- unsaturated.-             wrap_unf = mkInlineUnfolding wrap_rhs+             wrap_unf | isNewTyCon tycon = mkCompulsoryUnfolding wrap_rhs+                        -- See Note [Compulsory newtype unfolding]+                      | otherwise        = mkInlineUnfolding wrap_rhs              wrap_rhs = mkLams wrap_tvs $                         mkLams wrap_args $                         wrapFamInstBody tycon res_ty_args $@@ -706,18 +778,26 @@  {- Note [Activation for data constructor wrappers] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The Activation on a data constructor wrapper allows it to inline in-Phase 2 and later (1, 0).  But not in the InitialPhase.  That gives-rewrite rules a chance to fire (in the InitialPhase) if they mention-a data constructor on the left+The Activation on a data constructor wrapper allows it to inline only in Phase+0. This way rules have a chance to fire if they mention a data constructor on+the left    RULE "foo"  f (K a b) = ... Since the LHS of rules are simplified with InitialPhase, we won't inline the wrapper on the LHS either. -People have asked for this before, but now that even the InitialPhase-does some inlining, it has become important.+On the other hand, this means that exprIsConApp_maybe must be able to deal+with wrappers so that case-of-constructor is not delayed; see+Note [exprIsConApp_maybe on data constructors with wrappers] for details. +It used to activate in phases 2 (afterInitial) and later, but it makes it+awkward to write a RULE[1] with a constructor on the left: it would work if a+constructor has no wrapper, but whether a constructor has a wrapper depends, for+instance, on the order of type argument of that constructors. Therefore changing+the order of type argument could make previously working RULEs fail. +See also https://gitlab.haskell.org/ghc/ghc/issues/15840 .++ Note [Bangs on imported data constructors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -747,7 +827,7 @@ For a start, it's still to generate a no-op.  But worse, since wrappers are currently injected at TidyCore, we don't even optimise it away! So the stupid case expression stays there.  This actually happened for-the Integer data type (see Trac #1600 comment:66)!+the Integer data type (see #1600 comment:66)!  Note [Data con wrappers and GADT syntax] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -790,7 +870,7 @@ there is an exception to this rule: newtype constructors. You might not think that newtypes would pose a challenge, since newtypes are seemingly forbidden from having strictness annotations in the first place. But consider this-(from Trac #16141):+(from #16141):    {-# LANGUAGE StrictData #-}   {-# OPTIONS_GHC -O #-}@@ -907,7 +987,7 @@  ------------------------ seqUnboxer :: Unboxer-seqUnboxer v = return ([v], \e -> Case (Var v) v (exprType e) [(DEFAULT, [], e)])+seqUnboxer v = return ([v], mkDefaultCase (Var v) v)  unitUnboxer :: Unboxer unitUnboxer v = return ([v], \e -> e)@@ -934,8 +1014,8 @@     ,( \ arg_id ->        do { rep_ids <- mapM newLocal rep_tys           ; let unbox_fn body-                  = Case (Var arg_id) arg_id (exprType body)-                         [(DataAlt con, rep_ids, body)]+                  = mkSingleAltCase (Var arg_id) arg_id+                             (DataAlt con) rep_ids body           ; return (rep_ids, unbox_fn) }      , Boxer $ \ subst ->        do { rep_ids <- mapM (newLocal . TcType.substTyUnchecked subst) rep_tys@@ -1014,7 +1094,7 @@ too, but that would require a bit more plumbing, so currently we don't.  So for now we require: null (dataConExTyCoVars data_con)-See Trac #14978+See #14978  Note [Unpack one-wide fields] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1129,7 +1209,7 @@   = id   where     (tyvars,arg_tys,res_ty, arity, strict_sig) = primOpSig prim_op-    ty   = mkSpecForAllTys tyvars (mkFunTys arg_tys res_ty)+    ty   = mkSpecForAllTys tyvars (mkVisFunTys arg_tys res_ty)     name = mkWiredInName gHC_PRIM (primOpOcc prim_op)                          (mkPrimOpIdUnique (primOpTag prim_op))                          (AnId id) UserSyntax@@ -1144,7 +1224,7 @@                -- We give PrimOps a NOINLINE pragma so that we don't                -- get silly warnings from Desugar.dsRule (the inline_shadows_rule                -- test) about a RULE conflicting with a possible inlining-               -- cf Trac #7287+               -- cf #7287  -- For each ccall we manufacture a separate CCallOpId, giving it -- a fresh unique, a type that is correct for this particular ccall,@@ -1178,7 +1258,7 @@     strict_sig = mkClosedStrictSig (replicate arity topDmd) topRes     -- the call does not claim to be strict in its arguments, since they     -- may be lifted (foreign import prim) and the called code doesn't-    -- necessarily force them. See Trac #11076.+    -- necessarily force them. See #11076. {- ************************************************************************ *                                                                      *@@ -1264,10 +1344,14 @@        (noCafIdInfo `setUnfoldingInfo` evaldUnfolding -- Note [evaldUnfoldings]                     `setNeverLevPoly`  ty )   where-    -- proxy# :: forall k (a:k). Proxy# k a-    bndrs   = mkTemplateKiTyVars [liftedTypeKind] id-    [k,t]   = mkTyVarTys bndrs-    ty      = mkSpecForAllTys bndrs (mkProxyPrimTy k t)+    -- proxy# :: forall {k} (a:k). Proxy# k a+    --+    -- The visibility of the `k` binder is Inferred to match the type of the+    -- Proxy data constructor (#16293).+    [kv,tv] = mkTemplateKiTyVars [liftedTypeKind] id+    kv_ty   = mkTyVarTy kv+    tv_ty   = mkTyVarTy tv+    ty      = mkInvForAllTy kv $ mkSpecForAllTy tv $ mkProxyPrimTy kv_ty tv_ty  ------------------------------------------------ unsafeCoerceId :: Id@@ -1285,7 +1369,7 @@      [_, _, a, b] = mkTyVarTys bndrs -    ty  = mkSpecForAllTys bndrs (mkFunTy a b)+    ty  = mkSpecForAllTys bndrs (mkVisFunTy a b)      [x] = mkTemplateLocals [a]     rhs = mkLams (bndrs ++ [x]) $@@ -1308,7 +1392,6 @@   where     info = noCafIdInfo `setInlinePragInfo` inline_prag                        `setUnfoldingInfo`  mkCompulsoryUnfolding rhs-                       `setNeverLevPoly`   ty      inline_prag          = alwaysInlinePragma `setInlinePragmaActivation` ActiveAfter@@ -1318,24 +1401,28 @@                   -- LHS of rules.  That way we can have rules for 'seq';                   -- see Note [seqId magic] -    ty  = mkSpecForAllTys [alphaTyVar,betaTyVar]-                          (mkFunTy alphaTy (mkFunTy betaTy betaTy))+    -- seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b+    ty  =+      mkInvForAllTy runtimeRep2TyVar+      $ mkSpecForAllTys [alphaTyVar, openBetaTyVar]+      $ mkVisFunTy alphaTy (mkVisFunTy openBetaTy openBetaTy) -    [x,y] = mkTemplateLocals [alphaTy, betaTy]-    rhs = mkLams [alphaTyVar,betaTyVar,x,y] (Case (Var x) x betaTy [(DEFAULT, [], Var y)])+    [x,y] = mkTemplateLocals [alphaTy, openBetaTy]+    rhs = mkLams ([runtimeRep2TyVar, alphaTyVar, openBetaTyVar, x, y]) $+          Case (Var x) x openBetaTy [(DEFAULT, [], Var y)]  ------------------------------------------------ lazyId :: Id    -- See Note [lazyId magic] lazyId = pcMiscPrelId lazyIdName ty info   where     info = noCafIdInfo `setNeverLevPoly` ty-    ty  = mkSpecForAllTys [alphaTyVar] (mkFunTy alphaTy alphaTy)+    ty  = mkSpecForAllTys [alphaTyVar] (mkVisFunTy alphaTy alphaTy)  noinlineId :: Id -- See Note [noinlineId magic] noinlineId = pcMiscPrelId noinlineIdName ty info   where     info = noCafIdInfo `setNeverLevPoly` ty-    ty  = mkSpecForAllTys [alphaTyVar] (mkFunTy alphaTy alphaTy)+    ty  = mkSpecForAllTys [alphaTyVar] (mkVisFunTy alphaTy alphaTy)  oneShotId :: Id -- See Note [The oneShot function] oneShotId = pcMiscPrelId oneShotName ty info@@ -1344,8 +1431,8 @@                        `setUnfoldingInfo`  mkCompulsoryUnfolding rhs     ty  = mkSpecForAllTys [ runtimeRep1TyVar, runtimeRep2TyVar                           , openAlphaTyVar, openBetaTyVar ]-                          (mkFunTy fun_ty fun_ty)-    fun_ty = mkFunTy openAlphaTy openBetaTy+                          (mkVisFunTy fun_ty fun_ty)+    fun_ty = mkVisFunTy openAlphaTy openBetaTy     [body, x] = mkTemplateLocals [fun_ty, openAlphaTy]     x' = setOneShotLambda x  -- Here is the magic bit!     rhs = mkLams [ runtimeRep1TyVar, runtimeRep2TyVar@@ -1368,18 +1455,23 @@   where     info = noCafIdInfo `setInlinePragInfo` alwaysInlinePragma                        `setUnfoldingInfo`  mkCompulsoryUnfolding rhs-                       `setNeverLevPoly`   ty-    eqRTy     = mkTyConApp coercibleTyCon [ liftedTypeKind-                                          , alphaTy, betaTy ]-    eqRPrimTy = mkTyConApp eqReprPrimTyCon [ liftedTypeKind-                                           , liftedTypeKind-                                           , alphaTy, betaTy ]-    ty        = mkSpecForAllTys [alphaTyVar, betaTyVar] $-                mkFunTys [eqRTy, alphaTy] betaTy+    eqRTy     = mkTyConApp coercibleTyCon [ tYPE r , a, b ]+    eqRPrimTy = mkTyConApp eqReprPrimTyCon [ tYPE r, tYPE r, a, b ]+    ty        = mkForAllTys [ Bndr rv Inferred+                            , Bndr av Specified+                            , Bndr bv Specified+                            ] $+                mkInvisFunTy eqRTy $+                mkVisFunTy a b -    [eqR,x,eq] = mkTemplateLocals [eqRTy, alphaTy, eqRPrimTy]-    rhs = mkLams [alphaTyVar, betaTyVar, eqR, x] $-          mkWildCase (Var eqR) eqRTy betaTy $+    bndrs@[rv,av,bv] = mkTemplateKiTyVar runtimeRepTy+                        (\r -> [tYPE r, tYPE r])++    [r, a, b] = mkTyVarTys bndrs++    [eqR,x,eq] = mkTemplateLocals [eqRTy, a, eqRPrimTy]+    rhs = mkLams (bndrs ++ [eqR, x]) $+          mkWildCase (Var eqR) eqRTy b $           [(DataAlt coercibleDataCon, [eq], Cast (Var x) (mkCoVarCo eq))]  {-@@ -1403,20 +1495,21 @@ ~~~~~~~~~~~~~~~~~~ 'GHC.Prim.seq' is special in several ways. -a) In source Haskell its second arg can have an unboxed type-      x `seq` (v +# w)-   But see Note [Typing rule for seq] in TcExpr, which-   explains why we give seq itself an ordinary type-         seq :: forall a b. a -> b -> b-   and treat it as a language construct from a typing point of view.--b) Its fixity is set in LoadIface.ghcPrimIface+a) Its fixity is set in LoadIface.ghcPrimIface -c) It has quite a bit of desugaring magic.+b) It has quite a bit of desugaring magic.    See DsUtils.hs Note [Desugaring seq (1)] and (2) and (3) -d) There is some special rule handing: Note [User-defined RULES for seq]+c) There is some special rule handing: Note [User-defined RULES for seq] +Historical note:+    In TcExpr we used to need a special typing rule for 'seq', to handle calls+    whose second argument had an unboxed type, e.g.  x `seq` 3#++    However, with levity polymorphism we can now give seq the type seq ::+    forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b which handles this+    case without special treatment in the typechecker.+ Note [User-defined RULES for seq] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Roman found situations where he had@@ -1441,13 +1534,16 @@   RULE "f/seq" forall n e.  seq (f n) e = seq n e with rule arity 2, then two bad things would happen: -  - The magical desugaring done in Note [seqId magic] item (c)+  - The magical desugaring done in Note [seqId magic] item (b)     for saturated application of 'seq' would turn the LHS into     a case expression!    - The code in Simplify.rebuildCase would need to actually supply     the value argument, which turns out to be awkward. +See also: Note [User-defined RULES for seq] in Simplify.++ Note [lazyId magic] ~~~~~~~~~~~~~~~~~~~ lazy :: forall a?. a? -> a?   (i.e. works for unboxed types too)@@ -1463,7 +1559,7 @@   Again, it's clear that 'a' will be evaluated strictly (and indeed   applied to a state token) but we want to make sure that any exceptions   arising from the evaluation of 'a' are caught by the catch (see-  Trac #11555).+  #11555).  Implementing 'lazy' is a bit tricky: @@ -1477,7 +1573,7 @@   are exposed in the interface file.  Otherwise, the unfolding for   (say) pseq in the interface file will not mention 'lazy', so if we   inline 'pseq' we'll totally miss the very thing that 'lazy' was-  there for in the first place. See Trac #3259 for a real world+  there for in the first place. See #3259 for a real world   example.  * Suppose CorePrep sees (catch# (lazy e) b).  At all costs we must@@ -1506,6 +1602,14 @@ when we serialize an expression to the interface format. See Note [Inlining and hs-boot files] in ToIface +Note that noinline as currently implemented can hide some simplifications since+it hides strictness from the demand analyser. Specifically, the demand analyser+will treat 'noinline f x' as lazy in 'x', even if the demand signature of 'f'+specifies that it is strict in its argument. We considered fixing this this by adding a+special case to the demand analyser to address #16588. However, the special+case seemed like a large and expensive hammer to address a rare case and+consequently we rather opted to use a more minimal solution.+ Note [The oneShot function] ~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the context of making left-folds fuse somewhat okish (see ticket #7994@@ -1514,7 +1618,7 @@ called at most once. The oneShot function allows that.  'oneShot' is levity-polymorphic, i.e. the type variables can refer to unlifted-types as well (Trac #10744); e.g.+types as well (#10744); e.g.    oneShot (\x:Int# -> x +# 1#)  Like most magic functions it has a compulsory unfolding, so there is no need@@ -1535,7 +1639,7 @@ particular it must make it into the interface in unfoldings. See Note [Preserve OneShotInfo] in CoreTidy. -Also see https://ghc.haskell.org/trac/ghc/wiki/OneShot.+Also see https://gitlab.haskell.org/ghc/ghc/wikis/one-shot.   Note [magicDictId magic]@@ -1615,7 +1719,7 @@ voidArgId = mkSysLocal (fsLit "void") voidArgIdKey voidPrimTy  coercionTokenId :: Id         -- :: () ~ ()-coercionTokenId -- Used to replace Coercion terms when we go to STG+coercionTokenId -- See Note [Coercion tokens] in CoreToStg.hs   = pcMiscPrelId coercionTokenName                  (mkTyConApp eqPrimTyCon [liftedTypeKind, liftedTypeKind, unitTy, unitTy])                  noCafIdInfo
basicTypes/Module.hs view
@@ -146,7 +146,7 @@ import FastString import Binary import Util-import Data.List+import Data.List (sortBy, sort) import Data.Ord import GHC.PackageDb (BinaryStringRep(..), DbUnitIdModuleRep(..), DbModule(..), DbUnitId(..)) import Fingerprint@@ -177,7 +177,7 @@ -- Unit IDs, installed package IDs, ABI hashes, package names, -- versions, there are a *lot* of different identifiers for closely -- related things.  What do they all mean? Here's what.  (See also--- https://ghc.haskell.org/trac/ghc/wiki/Commentary/Packages/Concepts )+-- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/packages/concepts ) -- -- THE IMPORTANT ONES --@@ -199,7 +199,7 @@ --        only ever ComponentIds, and some ComponentIds happen to have --        more information (UnitIds). --      - Same as Language.Haskell.TH.Syntax:PkgName, see---          https://ghc.haskell.org/trac/ghc/ticket/10279+--          https://gitlab.haskell.org/ghc/ghc/issues/10279 --      - The same as PackageKey in GHC 7.10 (we renamed it because --        they don't necessarily identify packages anymore.) --      - Same as -this-package-key/-package-name flags@@ -217,7 +217,7 @@ -- PackageName: The "name" field in a Cabal file, something like "lens". --      - Same as Distribution.Package.PackageName --      - DIFFERENT FROM Language.Haskell.TH.Syntax:PkgName, see---          https://ghc.haskell.org/trac/ghc/ticket/10279+--          https://gitlab.haskell.org/ghc/ghc/issues/10279 --      - DIFFERENT FROM -package-name flag --      - DIFFERENT FROM the 'name' field in an installed package --        information.  This field could more accurately be described@@ -344,7 +344,7 @@  instance BinaryStringRep ModuleName where   fromStringRep = mkModuleNameFS . mkFastStringByteString-  toStringRep   = fastStringToByteString . moduleNameFS+  toStringRep   = bytesFS . moduleNameFS  instance Data ModuleName where   -- don't traverse?@@ -519,7 +519,7 @@  instance BinaryStringRep ComponentId where   fromStringRep = ComponentId . mkFastStringByteString-  toStringRep (ComponentId s) = fastStringToByteString s+  toStringRep (ComponentId s) = bytesFS s  instance Uniquable ComponentId where   getUnique (ComponentId n) = getUnique n@@ -849,7 +849,7 @@   . BS.concat $ do         (m, b) <- sorted_holes         [ toStringRep m,                BS.Char8.singleton ' ',-          fastStringToByteString (unitIdFS (moduleUnitId b)), BS.Char8.singleton ':',+          bytesFS (unitIdFS (moduleUnitId b)), BS.Char8.singleton ':',           toStringRep (moduleName b),   BS.Char8.singleton '\n']  fingerprintUnitId :: BS.ByteString -> Fingerprint -> BS.ByteString
basicTypes/Name.hs view
@@ -50,7 +50,7 @@          -- ** Manipulating and deconstructing 'Name's         nameUnique, setNameUnique,-        nameOccName, nameModule, nameModule_maybe,+        nameOccName, nameNameSpace, nameModule, nameModule_maybe,         setNameLoc,         tidyNameOcc,         localiseName,@@ -196,14 +196,16 @@  nameUnique              :: Name -> Unique nameOccName             :: Name -> OccName+nameNameSpace           :: Name -> NameSpace nameModule              :: HasDebugCallStack => Name -> Module nameSrcLoc              :: Name -> SrcLoc nameSrcSpan             :: Name -> SrcSpan -nameUnique  name = n_uniq name-nameOccName name = n_occ  name-nameSrcLoc  name = srcSpanStart (n_loc name)-nameSrcSpan name = n_loc  name+nameUnique    name = n_uniq name+nameOccName   name = n_occ  name+nameNameSpace name = occNameSpace (n_occ name)+nameSrcLoc    name = srcSpanStart (n_loc name)+nameSrcSpan   name = n_loc  name  type instance SrcSpanLess Name = Name instance HasSrcSpan Name where
basicTypes/NameCache.hs view
@@ -68,7 +68,7 @@   * Template Haskell turns a BuiltInSyntax Name into a TH.NameG     (DsMeta.globalVar), and parses a NameG into an Orig RdrName     (Convert.thRdrName).  So, e.g. $(do { reify '(,); ... }) will-    go this route (Trac #8954).+    go this route (#8954).  -} 
basicTypes/NameEnv.hs view
@@ -11,7 +11,7 @@         NameEnv,          -- ** Manipulating these environments-        mkNameEnv,+        mkNameEnv, mkNameEnvWith,         emptyNameEnv, isEmptyNameEnv,         unitNameEnv, nameEnvElts,         extendNameEnv_C, extendNameEnv_Acc, extendNameEnv,@@ -25,8 +25,9 @@          emptyDNameEnv,         lookupDNameEnv,+        delFromDNameEnv, filterDNameEnv,         mapDNameEnv,-        alterDNameEnv,+        adjustDNameEnv, alterDNameEnv, extendDNameEnv,         -- ** Dependency analysis         depAnal     ) where@@ -91,6 +92,7 @@ emptyNameEnv       :: NameEnv a isEmptyNameEnv     :: NameEnv a -> Bool mkNameEnv          :: [(Name,a)] -> NameEnv a+mkNameEnvWith      :: (a -> Name) -> [a] -> NameEnv a nameEnvElts        :: NameEnv a -> [a] alterNameEnv       :: (Maybe a-> Maybe a) -> NameEnv a -> Name -> NameEnv a extendNameEnv_C    :: (a->a->a) -> NameEnv a -> Name -> a -> NameEnv a@@ -120,6 +122,7 @@ lookupNameEnv x y     = lookupUFM x y alterNameEnv          = alterUFM mkNameEnv     l       = listToUFM l+mkNameEnvWith f       = mkNameEnv . map (\a -> (f a, a)) elemNameEnv x y          = elemUFM x y plusNameEnv x y          = plusUFM x y plusNameEnv_C f x y      = plusUFM_C f x y@@ -147,8 +150,20 @@ lookupDNameEnv :: DNameEnv a -> Name -> Maybe a lookupDNameEnv = lookupUDFM +delFromDNameEnv :: DNameEnv a -> Name -> DNameEnv a+delFromDNameEnv = delFromUDFM++filterDNameEnv :: (a -> Bool) -> DNameEnv a -> DNameEnv a+filterDNameEnv = filterUDFM+ mapDNameEnv :: (a -> b) -> DNameEnv a -> DNameEnv b mapDNameEnv = mapUDFM +adjustDNameEnv :: (a -> a) -> DNameEnv a -> Name -> DNameEnv a+adjustDNameEnv = adjustUDFM+ alterDNameEnv :: (Maybe a -> Maybe a) -> DNameEnv a -> Name -> DNameEnv a alterDNameEnv = alterUDFM++extendDNameEnv :: DNameEnv a -> Name -> a -> DNameEnv a+extendDNameEnv = addToUDFM
basicTypes/NameSet.hs view
@@ -36,6 +36,7 @@ import GhcPrelude  import Name+import OrdList import UniqSet import Data.List (sortBy) @@ -160,19 +161,19 @@  -- | A number of 'DefUse's in dependency order: earlier 'Defs' scope over later 'Uses' --   In a single (def, use) pair, the defs also scope over the uses-type DefUses = [DefUse]+type DefUses = OrdList DefUse  emptyDUs :: DefUses-emptyDUs = []+emptyDUs = nilOL  usesOnly :: Uses -> DefUses-usesOnly uses = [(Nothing, uses)]+usesOnly uses = unitOL (Nothing, uses)  mkDUs :: [(Defs,Uses)] -> DefUses-mkDUs pairs = [(Just defs, uses) | (defs,uses) <- pairs]+mkDUs pairs = toOL [(Just defs, uses) | (defs,uses) <- pairs]  plusDU :: DefUses -> DefUses -> DefUses-plusDU = (++)+plusDU = appOL  duDefs :: DefUses -> Defs duDefs dus = foldr get emptyNameSet dus
basicTypes/OccName.hs view
@@ -790,7 +790,7 @@      - We use trailing digits to subtly indicate a unification variable        in typechecker error message; see TypeRep.tidyTyVarBndr -We have to take care though! Consider a machine-generated module (Trac #10370)+We have to take care though! Consider a machine-generated module (#10370)   module Foo where      a1 = e1      a2 = e2@@ -806,7 +806,7 @@ after we allocate a new one.  -Node [Tidying multiple names at once]+Note [Tidying multiple names at once] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Consider
basicTypes/PatSyn.hs view
@@ -27,6 +27,7 @@ import GhcPrelude  import Type+import TyCoPpr import Name import Outputable import Unique@@ -37,7 +38,7 @@  import qualified Data.Data as Data import Data.Function-import Data.List+import Data.List (find)  {- ************************************************************************@@ -118,7 +119,7 @@ Note that the "required" context comes first, then the "provided" context.  Moreover, the "required" context must not mention existentially-bound type variables; that is, ones not mentioned in-res_ty.  See lots of discussion in Trac #10928.+res_ty.  See lots of discussion in #10928.  If there is no "provided" context, you can omit it; but you can't omit the "required" part (unless you omit both).@@ -184,7 +185,21 @@ This is very unlike DataCons, where univ tyvars match 1-1 the arguments of the TyCon. +Side note: I (SG) get the impression that instantiated return types should+generate a *required* constraint for pattern synonyms, rather than a *provided*+constraint like it's the case for GADTs. For example, I'd expect these+declarations to have identical semantics: +    pattern Just42 :: Maybe Int+    pattern Just42 = Just 42++    pattern Just'42 :: (a ~ Int) => Maybe a+    pattern Just'42 = Just 42++The latter generates the proper required constraint, the former does not.+Also rather different to GADTs is the fact that Just42 doesn't have any+universally quantified type variables, whereas Just'42 or MkS above has.+ Note [Pattern synonym representation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider the following pattern synonym declaration@@ -464,6 +479,6 @@         , pprType sigma_ty ]   where     sigma_ty = mkForAllTys ex_tvs  $-               mkFunTys prov_theta $-               mkFunTys orig_args orig_res_ty+               mkInvisFunTys prov_theta $+               mkVisFunTys orig_args orig_res_ty     insert_empty_ctxt = null req_theta && not (null prov_theta && null ex_tvs)
+ basicTypes/Predicate.hs view
@@ -0,0 +1,228 @@+{-++Describes predicates as they are considered by the solver.++-}++module Predicate (+  Pred(..), classifyPredType,+  isPredTy, isEvVarType,++  -- Equality predicates+  EqRel(..), eqRelRole,+  isEqPrimPred, isEqPred,+  getEqPredTys, getEqPredTys_maybe, getEqPredRole,+  predTypeEqRel,+  mkPrimEqPred, mkReprPrimEqPred, mkPrimEqPredRole,+  mkHeteroPrimEqPred, mkHeteroReprPrimEqPred,++  -- Class predicates+  mkClassPred, isDictTy,+  isClassPred, isEqPredClass, isCTupleClass,+  getClassPredTys, getClassPredTys_maybe,++  -- Implicit parameters+  isIPPred, isIPPred_maybe, isIPTyCon, isIPClass, hasIPPred,++  -- Evidence variables+  DictId, isEvVar, isDictId+  ) where++import GhcPrelude++import Type+import Class+import TyCon+import Var+import Coercion++import PrelNames++import FastString+import Outputable+import Util++import Control.Monad ( guard )++-- | A predicate in the solver. The solver tries to prove Wanted predicates+-- from Given ones.+data Pred+  = ClassPred Class [Type]+  | EqPred EqRel Type Type+  | IrredPred PredType+  | ForAllPred [TyCoVarBinder] [PredType] PredType+     -- ForAllPred: see Note [Quantified constraints] in TcCanonical+  -- NB: There is no TuplePred case+  --     Tuple predicates like (Eq a, Ord b) are just treated+  --     as ClassPred, as if we had a tuple class with two superclasses+  --        class (c1, c2) => (%,%) c1 c2++classifyPredType :: PredType -> Pred+classifyPredType ev_ty = case splitTyConApp_maybe ev_ty of+    Just (tc, [_, _, ty1, ty2])+      | tc `hasKey` eqReprPrimTyConKey -> EqPred ReprEq ty1 ty2+      | tc `hasKey` eqPrimTyConKey     -> EqPred NomEq ty1 ty2++    Just (tc, tys)+      | Just clas <- tyConClass_maybe tc+      -> ClassPred clas tys++    _ | (tvs, rho) <- splitForAllVarBndrs ev_ty+      , (theta, pred) <- splitFunTys rho+      , not (null tvs && null theta)+      -> ForAllPred tvs theta pred++      | otherwise+      -> IrredPred ev_ty++-- --------------------- Dictionary types ---------------------------------++mkClassPred :: Class -> [Type] -> PredType+mkClassPred clas tys = mkTyConApp (classTyCon clas) tys++isDictTy :: Type -> Bool+isDictTy = isClassPred++getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])+getClassPredTys ty = case getClassPredTys_maybe ty of+        Just (clas, tys) -> (clas, tys)+        Nothing          -> pprPanic "getClassPredTys" (ppr ty)++getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])+getClassPredTys_maybe ty = case splitTyConApp_maybe ty of+        Just (tc, tys) | Just clas <- tyConClass_maybe tc -> Just (clas, tys)+        _ -> Nothing++-- --------------------- Equality predicates ---------------------------------++-- | A choice of equality relation. This is separate from the type 'Role'+-- because 'Phantom' does not define a (non-trivial) equality relation.+data EqRel = NomEq | ReprEq+  deriving (Eq, Ord)++instance Outputable EqRel where+  ppr NomEq  = text "nominal equality"+  ppr ReprEq = text "representational equality"++eqRelRole :: EqRel -> Role+eqRelRole NomEq  = Nominal+eqRelRole ReprEq = Representational++getEqPredTys :: PredType -> (Type, Type)+getEqPredTys ty+  = case splitTyConApp_maybe ty of+      Just (tc, [_, _, ty1, ty2])+        |  tc `hasKey` eqPrimTyConKey+        || tc `hasKey` eqReprPrimTyConKey+        -> (ty1, ty2)+      _ -> pprPanic "getEqPredTys" (ppr ty)++getEqPredTys_maybe :: PredType -> Maybe (Role, Type, Type)+getEqPredTys_maybe ty+  = case splitTyConApp_maybe ty of+      Just (tc, [_, _, ty1, ty2])+        | tc `hasKey` eqPrimTyConKey     -> Just (Nominal, ty1, ty2)+        | tc `hasKey` eqReprPrimTyConKey -> Just (Representational, ty1, ty2)+      _ -> Nothing++getEqPredRole :: PredType -> Role+getEqPredRole ty = eqRelRole (predTypeEqRel ty)++-- | Get the equality relation relevant for a pred type.+predTypeEqRel :: PredType -> EqRel+predTypeEqRel ty+  | Just (tc, _) <- splitTyConApp_maybe ty+  , tc `hasKey` eqReprPrimTyConKey+  = ReprEq+  | otherwise+  = NomEq++{-------------------------------------------+Predicates on PredType+--------------------------------------------}++{-+Note [Evidence for quantified constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The superclass mechanism in TcCanonical.makeSuperClasses risks+taking a quantified constraint like+   (forall a. C a => a ~ b)+and generate superclass evidence+   (forall a. C a => a ~# b)++This is a funny thing: neither isPredTy nor isCoVarType are true+of it.  So we are careful not to generate it in the first place:+see Note [Equality superclasses in quantified constraints]+in TcCanonical.+-}++isEvVarType :: Type -> Bool+-- True of (a) predicates, of kind Constraint, such as (Eq a), and (a ~ b)+--         (b) coercion types, such as (t1 ~# t2) or (t1 ~R# t2)+-- See Note [Types for coercions, predicates, and evidence] in TyCoRep+-- See Note [Evidence for quantified constraints]+isEvVarType ty = isCoVarType ty || isPredTy ty++isEqPredClass :: Class -> Bool+-- True of (~) and (~~)+isEqPredClass cls =  cls `hasKey` eqTyConKey+                  || cls `hasKey` heqTyConKey++isClassPred, isEqPred, isEqPrimPred, isIPPred :: PredType -> Bool+isClassPred ty = case tyConAppTyCon_maybe ty of+    Just tyCon | isClassTyCon tyCon -> True+    _                               -> False++isEqPred ty  -- True of (a ~ b) and (a ~~ b)+             -- ToDo: should we check saturation?+  | Just tc <- tyConAppTyCon_maybe ty+  , Just cls <- tyConClass_maybe tc+  = isEqPredClass cls+  | otherwise+  = False++isEqPrimPred ty = isCoVarType ty+  -- True of (a ~# b) (a ~R# b)++isIPPred ty = case tyConAppTyCon_maybe ty of+    Just tc -> isIPTyCon tc+    _       -> False++isIPTyCon :: TyCon -> Bool+isIPTyCon tc = tc `hasKey` ipClassKey+  -- Class and its corresponding TyCon have the same Unique++isIPClass :: Class -> Bool+isIPClass cls = cls `hasKey` ipClassKey++isCTupleClass :: Class -> Bool+isCTupleClass cls = isTupleTyCon (classTyCon cls)++isIPPred_maybe :: Type -> Maybe (FastString, Type)+isIPPred_maybe ty =+  do (tc,[t1,t2]) <- splitTyConApp_maybe ty+     guard (isIPTyCon tc)+     x <- isStrLitTy t1+     return (x,t2)++hasIPPred :: PredType -> Bool+hasIPPred pred+  = case classifyPredType pred of+      ClassPred cls tys+        | isIPClass     cls -> True+        | isCTupleClass cls -> any hasIPPred tys+      _other -> False++{-+************************************************************************+*                                                                      *+              Evidence variables+*                                                                      *+************************************************************************+-}++isEvVar :: Var -> Bool+isEvVar var = isEvVarType (varType var)++isDictId :: Id -> Bool+isDictId id = isDictTy (varType id)
basicTypes/RdrName.hs view
@@ -509,7 +509,7 @@  It is just possible to have *both* if there is a module loop: a Name is defined locally in A, and also brought into scope by importing a-module that SOURCE-imported A.  Exapmle (Trac #7672):+module that SOURCE-imported A.  Exapmle (#7672):   A.hs-boot   module A where                data T@@ -1216,7 +1216,7 @@ {- Note [Choosing the best import declaration] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When reporting unused import declarations we use the following rules.-   (see [wiki:Commentary/Compiler/UnusedImports])+   (see [wiki:commentary/compiler/unused-imports])  Say that an import-item is either   * an entire import-all decl (eg import Foo), or@@ -1256,7 +1256,7 @@ The unqualified 'x' can only come from import #2.  The qualified 'M.x' could come from either, but bestImport picks import #2, because it is more likely to be useful in other imports, as indeed it is in this-case (see Trac #5211 for a concrete example).+case (see #5211 for a concrete example).  But the rules are not perfect; consider    import qualified M  -- Import #1
basicTypes/SrcLoc.hs view
@@ -77,6 +77,9 @@         getLoc, unLoc,         unRealSrcSpan, getRealSrcSpan, +        -- ** Modifying Located+        mapLoc,+         -- ** Combining and comparing Located values         eqLocated, cmpLocated, combineLocs, addCLoc,         leftmost_smallest, leftmost_largest, rightmost,@@ -97,7 +100,7 @@ import Control.DeepSeq import Data.Bits import Data.Data-import Data.List+import Data.List (sortBy, intercalate) import Data.Ord  {-@@ -526,6 +529,9 @@  type Located = GenLocated SrcSpan type RealLocated = GenLocated RealSrcSpan++mapLoc :: (a -> b) -> GenLocated l a -> GenLocated l b+mapLoc = fmap  unLoc :: HasSrcSpan a => a -> SrcSpanLess a unLoc (dL->L _ e) = e
basicTypes/UniqSupply.hs view
@@ -4,7 +4,9 @@ -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE BangPatterns #-}  #if !defined(GHC_LOADED_INTO_GHCI) {-# LANGUAGE UnboxedTuples #-}@@ -16,19 +18,16 @@          -- ** Operations on supplies         uniqFromSupply, uniqsFromSupply, -- basic ops-        takeUniqFromSupply,+        takeUniqFromSupply, uniqFromMask,          mkSplitUniqSupply,         splitUniqSupply, listSplitUniqSupply,-        splitUniqSupply3, splitUniqSupply4,          -- * Unique supply monad and its abstraction-        UniqSM, MonadUnique(..), liftUs,+        UniqSM, MonadUnique(..),          -- ** Operations on the monad         initUs, initUs_,-        lazyThenUs, lazyMapUs,-        getUniqueSupplyM3,          -- * Set supply strategy         initUniqSupply@@ -85,9 +84,14 @@ takeUniqFromSupply :: UniqSupply -> (Unique, UniqSupply) -- ^ Obtain the 'Unique' from this particular 'UniqSupply', and a new supply +uniqFromMask :: Char -> IO Unique+uniqFromMask mask+  = do { uqNum <- genSym+       ; return $! mkUnique mask uqNum }+ mkSplitUniqSupply c   = case ord c `shiftL` uNIQUE_BITS of-     mask -> let+     !mask -> let         -- here comes THE MAGIC:          -- This is one of the most hammered bits in the whole compiler@@ -112,22 +116,6 @@ uniqsFromSupply (MkSplitUniqSupply n _ s2) = mkUniqueGrimily n : uniqsFromSupply s2 takeUniqFromSupply (MkSplitUniqSupply n s1 _) = (mkUniqueGrimily n, s1) --- | Build three 'UniqSupply' from a single one,--- each of which can supply its own unique-splitUniqSupply3 :: UniqSupply -> (UniqSupply, UniqSupply, UniqSupply)-splitUniqSupply3 us = (us1, us2, us3)-  where-    (us1, us') = splitUniqSupply us-    (us2, us3) = splitUniqSupply us'---- | Build four 'UniqSupply' from a single one,--- each of which can supply its own unique-splitUniqSupply4 :: UniqSupply -> (UniqSupply, UniqSupply, UniqSupply, UniqSupply)-splitUniqSupply4 us = (us1, us2, us3, us4)-  where-    (us1, us2, us') = splitUniqSupply3 us-    (us3, us4)      = splitUniqSupply us'- {- ************************************************************************ *                                                                      *@@ -148,20 +136,18 @@ #else  data UniqResult result = UniqResult !result {-# UNPACK #-} !UniqSupply+  deriving (Functor)  #endif  -- | A monad which just gives the ability to obtain 'Unique's newtype UniqSM result = USM { unUSM :: UniqSupply -> UniqResult result }+    deriving (Functor)  instance Monad UniqSM where   (>>=) = thenUs   (>>)  = (*>) -instance Functor UniqSM where-    fmap f (USM x) = USM (\us0 -> case x us0 of-                                 UniqResult r us1 -> UniqResult (f r) us1)- instance Applicative UniqSM where     pure = returnUs     (USM f) <*> (USM x) = USM $ \us0 -> case f us0 of@@ -182,7 +168,6 @@ initUs_ init_us m = case unUSM m init_us of { UniqResult r _ -> r }  {-# INLINE thenUs #-}-{-# INLINE lazyThenUs #-} {-# INLINE returnUs #-} {-# INLINE splitUniqSupply #-} @@ -199,10 +184,6 @@   = USM (\us0 -> case (expr us0) of                    UniqResult result us1 -> unUSM (cont result) us1) -lazyThenUs :: UniqSM a -> (a -> UniqSM b) -> UniqSM b-lazyThenUs expr cont-  = USM (\us0 -> let (result, us1) = liftUSM expr us0 in unUSM (cont result) us1)- thenUs_ :: UniqSM a -> UniqSM b -> UniqSM b thenUs_ (USM expr) (USM cont)   = USM (\us0 -> case (expr us0) of { UniqResult _ us1 -> cont us1 })@@ -234,12 +215,6 @@     getUniqueM  = getUniqueUs     getUniquesM = getUniquesUs -getUniqueSupplyM3 :: MonadUnique m => m (UniqSupply, UniqSupply, UniqSupply)-getUniqueSupplyM3 = liftM3 (,,) getUniqueSupplyM getUniqueSupplyM getUniqueSupplyM--liftUs :: MonadUnique m => UniqSM a -> m a-liftUs m = getUniqueSupplyM >>= return . flip initUs_ m- getUniqueUs :: UniqSM Unique getUniqueUs = USM (\us0 -> case takeUniqFromSupply us0 of                            (u,us1) -> UniqResult u us1)@@ -247,14 +222,3 @@ getUniquesUs :: UniqSM [Unique] getUniquesUs = USM (\us0 -> case splitUniqSupply us0 of                             (us1,us2) -> UniqResult (uniqsFromSupply us1) us2)---- {-# SPECIALIZE mapM          :: (a -> UniqSM b) -> [a] -> UniqSM [b] #-}--- {-# SPECIALIZE mapAndUnzipM  :: (a -> UniqSM (b,c))   -> [a] -> UniqSM ([b],[c]) #-}--- {-# SPECIALIZE mapAndUnzip3M :: (a -> UniqSM (b,c,d)) -> [a] -> UniqSM ([b],[c],[d]) #-}--lazyMapUs :: (a -> UniqSM b) -> [a] -> UniqSM [b]-lazyMapUs _ []     = returnUs []-lazyMapUs f (x:xs)-  = f x             `lazyThenUs` \ r  ->-    lazyMapUs f xs  `lazyThenUs` \ rs ->-    returnUs (r:rs)
basicTypes/Unique.hs view
@@ -223,11 +223,11 @@ -- -- As such, to get deterministic builds, the order of the allocated -- @Uniques@ should not affect the final result.--- see also wiki/DeterministicBuilds+-- see also wiki/deterministic-builds -- -- Note [Unique Determinism and code generation] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- The goal of the deterministic builds (wiki/DeterministicBuilds, #4012)+-- The goal of the deterministic builds (wiki/deterministic-builds, #4012) -- is to get ABI compatible binaries given the same inputs and environment. -- The motivation behind that is that if the ABI doesn't change the -- binaries can be safely reused.
basicTypes/Var.hs view
@@ -60,10 +60,13 @@         isGlobalId, isExportedId,         mustHaveLocalBinding, +        -- * ArgFlags+        ArgFlag(..), isVisibleArgFlag, isInvisibleArgFlag, sameVis,+        AnonArgFlag(..), ForallVisFlag(..), argToForallVisFlag,+         -- * TyVar's-        VarBndr(..), ArgFlag(..), TyCoVarBinder, TyVarBinder,+        VarBndr(..), TyCoVarBinder, TyVarBinder,         binderVar, binderVars, binderArgFlag, binderType,-        isVisibleArgFlag, isInvisibleArgFlag, sameVis,         mkTyCoVarBinder, mkTyCoVarBinders,         mkTyVarBinder, mkTyVarBinders,         isTyVarBinder,@@ -86,7 +89,8 @@  import GhcPrelude -import {-# SOURCE #-}   TyCoRep( Type, Kind, pprKind )+import {-# SOURCE #-}   TyCoRep( Type, Kind )+import {-# SOURCE #-}   TyCoPpr( pprKind ) import {-# SOURCE #-}   TcType( TcTyVarDetails, pprTcTyVarDetails, vanillaSkolemTv ) import {-# SOURCE #-}   IdInfo( IdDetails, IdInfo, coVarDetails, isCoVarDetails,                                 vanillaIdInfo, pprIdDetails )@@ -422,6 +426,74 @@       1 -> return Specified       _ -> return Inferred +-- | The non-dependent version of 'ArgFlag'.++-- Appears here partly so that it's together with its friend ArgFlag,+-- but also because it is used in IfaceType, rather early in the+-- compilation chain+-- See Note [AnonArgFlag vs. ForallVisFlag]+data AnonArgFlag+  = VisArg    -- ^ Used for @(->)@: an ordinary non-dependent arrow.+              --   The argument is visible in source code.+  | InvisArg  -- ^ Used for @(=>)@: a non-dependent predicate arrow.+              --   The argument is invisible in source code.+  deriving (Eq, Ord, Data)++instance Outputable AnonArgFlag where+  ppr VisArg   = text "[vis]"+  ppr InvisArg = text "[invis]"++instance Binary AnonArgFlag where+  put_ bh VisArg   = putByte bh 0+  put_ bh InvisArg = putByte bh 1++  get bh = do+    h <- getByte bh+    case h of+      0 -> return VisArg+      _ -> return InvisArg++-- | Is a @forall@ invisible (e.g., @forall a b. {...}@, with a dot) or visible+-- (e.g., @forall a b -> {...}@, with an arrow)?++-- See Note [AnonArgFlag vs. ForallVisFlag]+data ForallVisFlag+  = ForallVis   -- ^ A visible @forall@ (with an arrow)+  | ForallInvis -- ^ An invisible @forall@ (with a dot)+  deriving (Eq, Ord, Data)++instance Outputable ForallVisFlag where+  ppr f = text $ case f of+                   ForallVis   -> "ForallVis"+                   ForallInvis -> "ForallInvis"++-- | Convert an 'ArgFlag' to its corresponding 'ForallVisFlag'.+argToForallVisFlag :: ArgFlag -> ForallVisFlag+argToForallVisFlag Required  = ForallVis+argToForallVisFlag Specified = ForallInvis+argToForallVisFlag Inferred  = ForallInvis++{-+Note [AnonArgFlag vs. ForallVisFlag]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The AnonArgFlag and ForallVisFlag data types are quite similar at a first+glance:++  data AnonArgFlag   = VisArg    | InvisArg+  data ForallVisFlag = ForallVis | ForallInvis++Both data types keep track of visibility of some sort. AnonArgFlag tracks+whether a FunTy has a visible argument (->) or an invisible predicate argument+(=>). ForallVisFlag tracks whether a `forall` quantifier is visible+(forall a -> {...}) or invisible (forall a. {...}).++Given their similarities, it's tempting to want to combine these two data types+into one, but they actually represent distinct concepts. AnonArgFlag reflects a+property of *Core* types, whereas ForallVisFlag reflects a property of the GHC+AST. In other words, AnonArgFlag is all about internals, whereas ForallVisFlag+is all about surface syntax. Therefore, they are kept as separate data types.+-}+ {- ********************************************************************* *                                                                      * *                   VarBndr, TyCoVarBinder@@ -629,6 +701,8 @@ ************************************************************************ -} +-- | Is this a type-level (i.e., computationally irrelevant, thus erasable)+-- variable? Satisfies @isTyVar = not . isId@. isTyVar :: Var -> Bool        -- True of both TyVar and TcTyVar isTyVar (TyVar {})   = True isTyVar (TcTyVar {}) = True@@ -641,17 +715,21 @@ isTyCoVar :: Var -> Bool isTyCoVar v = isTyVar v || isCoVar v +-- | Is this a value-level (i.e., computationally relevant) 'Id'entifier?+-- Satisfies @isId = not . isTyVar@. isId :: Var -> Bool isId (Id {}) = True isId _       = False +-- | Is this a coercion variable?+-- Satisfies @'isId' v ==> 'isCoVar' v == not ('isNonCoVarId' v)@. isCoVar :: Var -> Bool--- A coercion variable isCoVar (Id { id_details = details }) = isCoVarDetails details isCoVar _                             = False +-- | Is this a term variable ('Id') that is /not/ a coercion variable?+-- Satisfies @'isId' v ==> 'isCoVar' v == not ('isNonCoVarId' v)@. isNonCoVarId :: Var -> Bool--- A term variable (Id) that is /not/ a coercion variable isNonCoVarId (Id { id_details = details }) = not (isCoVarDetails details) isNonCoVarId _                             = False 
+ basicTypes/Var.hs-boot view
@@ -0,0 +1,15 @@+-- Var.hs-boot is Imported (only) by TyCoRep.hs-boot+module Var where++import GhcPrelude ()+  -- We compile this module with -XNoImplicitPrelude (for some+  -- reason), so if there are no imports it does not seem to+  -- depend on anything.  But it does! We must, for example,+  -- compile GHC.Types in the ghc-prim library first.+  -- So this otherwise-unnecessary import tells the build system+  -- that this module depends on GhcPrelude, which ensures+  -- that GHC.Type is built first.++data ArgFlag+data AnonArgFlag+data Var
basicTypes/VarEnv.hs view
@@ -98,10 +98,13 @@ -- "Secrets of the Glasgow Haskell Compiler inliner" Section 3.2 provides -- the motivation for this abstraction. data InScopeSet = InScope VarSet {-# UNPACK #-} !Int-        -- We store a VarSet here, but we use this for lookups rather than-        -- just membership tests. Typically the InScopeSet contains the-        -- canonical version of the variable (e.g. with an informative-        -- unfolding), so this lookup is useful.+        -- Note [Lookups in in-scope set]+        -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+        -- We store a VarSet here, but we use this for lookups rather than just+        -- membership tests. Typically the InScopeSet contains the canonical+        -- version of the variable (e.g. with an informative unfolding), so this+        -- lookup is useful (see, for instance, Note [In-scope set as a+        -- substitution]).         --         -- The Int is a kind of hash-value used by uniqAway         -- For example, it might be the size of the set
cbits/genSym.c view
@@ -1,5 +1,5 @@+#include <Rts.h> #include <assert.h>-#include "Rts.h" #include "Unique.h"  static HsInt GenSymCounter = 0;
cmm/CLabel.hs view
@@ -39,8 +39,8 @@         mkAsmTempEndLabel,         mkAsmTempDieLabel, -        mkSplitMarkerLabel,         mkDirty_MUT_VAR_Label,+        mkNonmovingWriteBarrierEnabledLabel,         mkUpdInfoLabel,         mkBHUpdInfoLabel,         mkIndStaticInfoLabel,@@ -99,7 +99,7 @@         needsCDecl, maybeLocalBlockLabel, externallyVisibleCLabel,         isMathFun,         isCFunctionLabel, isGcPtrLabel, labelDynamic,-        isLocalCLabel,+        isLocalCLabel, mayRedirectTo,          -- * Conversions         toClosureLbl, toSlowEntryLbl, toEntryLbl, toInfoLbl, hasHaskellName,@@ -121,12 +121,11 @@ import Name import Unique import PrimOp-import Config import CostCentre import Outputable import FastString import DynFlags-import Platform+import GHC.Platform import UniqSet import Util import PprCore ( {- instances -} )@@ -486,7 +485,9 @@                                -- See Note [Proc-point local block entry-point].  -- Constructing Cmm Labels-mkDirty_MUT_VAR_Label, mkSplitMarkerLabel, mkUpdInfoLabel,+mkDirty_MUT_VAR_Label,+    mkNonmovingWriteBarrierEnabledLabel,+    mkUpdInfoLabel,     mkBHUpdInfoLabel, mkIndStaticInfoLabel, mkMainCapabilityLabel,     mkMAP_FROZEN_CLEAN_infoLabel, mkMAP_FROZEN_DIRTY_infoLabel,     mkMAP_DIRTY_infoLabel,@@ -496,7 +497,8 @@     mkSMAP_FROZEN_CLEAN_infoLabel, mkSMAP_FROZEN_DIRTY_infoLabel,     mkSMAP_DIRTY_infoLabel, mkBadAlignmentLabel :: CLabel mkDirty_MUT_VAR_Label           = mkForeignLabel (fsLit "dirty_MUT_VAR") Nothing ForeignLabelInExternalPackage IsFunction-mkSplitMarkerLabel              = CmmLabel rtsUnitId (fsLit "__stg_split_marker")    CmmCode+mkNonmovingWriteBarrierEnabledLabel+                                = CmmLabel rtsUnitId (fsLit "nonmoving_write_barrier_enabled") CmmData mkUpdInfoLabel                  = CmmLabel rtsUnitId (fsLit "stg_upd_frame")         CmmInfo mkBHUpdInfoLabel                = CmmLabel rtsUnitId (fsLit "stg_bh_upd_frame" )     CmmInfo mkIndStaticInfoLabel            = CmmLabel rtsUnitId (fsLit "stg_IND_STATIC")        CmmInfo@@ -582,8 +584,7 @@         -> FunctionOrData         -> CLabel -mkForeignLabel str mb_sz src fod-    = ForeignLabel str mb_sz src  fod+mkForeignLabel = ForeignLabel   -- | Update the label size field in a ForeignLabel@@ -762,7 +763,7 @@ -- ----------------------------------------------------------------------------- -- Does a CLabel need declaring before use or not? ----- See wiki:Commentary/Compiler/Backends/PprC#Prototypes+-- See wiki:commentary/compiler/backends/ppr-c#prototypes  needsCDecl :: CLabel -> Bool   -- False <=> it's pre-declared; don't bother@@ -1153,35 +1154,35 @@ -}  instance Outputable CLabel where-  ppr c = sdocWithPlatform $ \platform -> pprCLabel platform c+  ppr c = sdocWithDynFlags $ \dynFlags -> pprCLabel dynFlags c -pprCLabel :: Platform -> CLabel -> SDoc+pprCLabel :: DynFlags -> CLabel -> SDoc  pprCLabel _ (LocalBlockLabel u)   =  tempLabelPrefixOrUnderscore <> pprUniqueAlways u -pprCLabel platform (AsmTempLabel u)- | not (platformUnregisterised platform)+pprCLabel dynFlags (AsmTempLabel u)+ | not (platformUnregisterised $ targetPlatform dynFlags)   =  tempLabelPrefixOrUnderscore <> pprUniqueAlways u -pprCLabel platform (AsmTempDerivedLabel l suf)- | cGhcWithNativeCodeGen == "YES"-   = ptext (asmTempLabelPrefix platform)+pprCLabel dynFlags (AsmTempDerivedLabel l suf)+ | platformMisc_ghcWithNativeCodeGen $ platformMisc dynFlags+   = ptext (asmTempLabelPrefix $ targetPlatform dynFlags)      <> case l of AsmTempLabel u    -> pprUniqueAlways u                   LocalBlockLabel u -> pprUniqueAlways u-                  _other            -> pprCLabel platform l+                  _other            -> pprCLabel dynFlags l      <> ftext suf -pprCLabel platform (DynamicLinkerLabel info lbl)- | cGhcWithNativeCodeGen == "YES"-   = pprDynamicLinkerAsmLabel platform info lbl+pprCLabel dynFlags (DynamicLinkerLabel info lbl)+ | platformMisc_ghcWithNativeCodeGen $ platformMisc dynFlags+   = pprDynamicLinkerAsmLabel (targetPlatform dynFlags) info lbl -pprCLabel _ PicBaseLabel- | cGhcWithNativeCodeGen == "YES"+pprCLabel dynFlags PicBaseLabel+ | platformMisc_ghcWithNativeCodeGen $ platformMisc dynFlags    = text "1b" -pprCLabel platform (DeadStripPreventer lbl)- | cGhcWithNativeCodeGen == "YES"+pprCLabel dynFlags (DeadStripPreventer lbl)+ | platformMisc_ghcWithNativeCodeGen $ platformMisc dynFlags    =    {-       `lbl` can be temp one but we need to ensure that dsp label will stay@@ -1189,23 +1190,24 @@       optional `_` (underscore) because this is how you mark non-temp symbols       on some platforms (Darwin)    -}-   maybe_underscore $ text "dsp_"-   <> pprCLabel platform lbl <> text "_dsp"+   maybe_underscore dynFlags $ text "dsp_"+   <> pprCLabel dynFlags lbl <> text "_dsp" -pprCLabel _ (StringLitLabel u)- | cGhcWithNativeCodeGen == "YES"+pprCLabel dynFlags (StringLitLabel u)+ | platformMisc_ghcWithNativeCodeGen $ platformMisc dynFlags   = pprUniqueAlways u <> ptext (sLit "_str") -pprCLabel platform lbl+pprCLabel dynFlags lbl    = getPprStyle $ \ sty ->-     if cGhcWithNativeCodeGen == "YES" && asmStyle sty-     then maybe_underscore (pprAsmCLbl platform lbl)+     if platformMisc_ghcWithNativeCodeGen (platformMisc dynFlags) && asmStyle sty+     then maybe_underscore dynFlags $ pprAsmCLbl (targetPlatform dynFlags) lbl      else pprCLbl lbl -maybe_underscore :: SDoc -> SDoc-maybe_underscore doc-  | underscorePrefix = pp_cSEP <> doc-  | otherwise        = doc+maybe_underscore :: DynFlags -> SDoc -> SDoc+maybe_underscore dynFlags doc =+  if platformMisc_leadingUnderscore $ platformMisc dynFlags+  then pp_cSEP <> doc+  else doc  pprAsmCLbl :: Platform -> CLabel -> SDoc pprAsmCLbl platform (ForeignLabel fs (Just sz) _ _)@@ -1365,9 +1367,6 @@ -- ----------------------------------------------------------------------------- -- Machine-dependent knowledge about labels. -underscorePrefix :: Bool   -- leading underscore on assembler labels?-underscorePrefix = (cLeadingUnderscore == "YES")- asmTempLabelPrefix :: Platform -> PtrString  -- for formatting labels asmTempLabelPrefix platform = case platformOS platform of     OSDarwin -> sLit "L"@@ -1434,3 +1433,139 @@           SymbolPtr       -> text ".LC_" <> ppr lbl           GotSymbolPtr    -> ppr lbl <> text "@got"           GotSymbolOffset -> ppr lbl <> text "@gotoff"++-- Figure out whether `symbol` may serve as an alias+-- to `target` within one compilation unit.+--+-- This is true if any of these holds:+-- * `target` is a module-internal haskell name.+-- * `target` is an exported name, but comes from the same+--   module as `symbol`+--+-- These are sufficient conditions for establishing e.g. a+-- GNU assembly alias ('.equiv' directive). Sadly, there is+-- no such thing as an alias to an imported symbol (conf.+-- http://blog.omega-prime.co.uk/2011/07/06/the-sad-state-of-symbol-aliases/)+-- See note [emit-time elimination of static indirections].+--+-- Precondition is that both labels represent the+-- same semantic value.++mayRedirectTo :: CLabel -> CLabel -> Bool+mayRedirectTo symbol target+ | Just nam <- haskellName+ , staticClosureLabel+ , isExternalName nam+ , Just mod <- nameModule_maybe nam+ , Just anam <- hasHaskellName symbol+ , Just amod <- nameModule_maybe anam+ = amod == mod++ | Just nam <- haskellName+ , staticClosureLabel+ , isInternalName nam+ = True++ | otherwise = False+   where staticClosureLabel = isStaticClosureLabel target+         haskellName = hasHaskellName target+++{-+Note [emit-time elimination of static indirections]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As described in #15155, certain static values are repesentationally+equivalent, e.g. 'cast'ed values (when created by 'newtype' wrappers).++             newtype A = A Int+             {-# NOINLINE a #-}+             a = A 42++a1_rYB :: Int+[GblId, Caf=NoCafRefs, Unf=OtherCon []]+a1_rYB = GHC.Types.I# 42#++a [InlPrag=NOINLINE] :: A+[GblId, Unf=OtherCon []]+a = a1_rYB `cast` (Sym (T15155.N:A[0]) :: Int ~R# A)++Formerly we created static indirections for these (IND_STATIC), which+consist of a statically allocated forwarding closure that contains+the (possibly tagged) indirectee. (See CMM/assembly below.)+This approach is suboptimal for two reasons:+  (a) they occupy extra space,+  (b) they need to be entered in order to obtain the indirectee,+      thus they cannot be tagged.++Fortunately there is a common case where static indirections can be+eliminated while emitting assembly (native or LLVM), viz. when the+indirectee is in the same module (object file) as the symbol that+points to it. In this case an assembly-level identification can+be created ('.equiv' directive), and as such the same object will+be assigned two names in the symbol table. Any of the identified+symbols can be referenced by a tagged pointer.++Currently the 'mayRedirectTo' predicate will+give a clue whether a label can be equated with another, already+emitted, label (which can in turn be an alias). The general mechanics+is that we identify data (IND_STATIC closures) that are amenable+to aliasing while pretty-printing of assembly output, and emit the+'.equiv' directive instead of static data in such a case.++Here is a sketch how the output is massaged:++                     Consider+newtype A = A Int+{-# NOINLINE a #-}+a = A 42                                -- I# 42# is the indirectee+                                        -- 'a' is exported++                 results in STG++a1_rXq :: GHC.Types.Int+[GblId, Caf=NoCafRefs, Unf=OtherCon []] =+    CCS_DONT_CARE GHC.Types.I#! [42#];++T15155.a [InlPrag=NOINLINE] :: T15155.A+[GblId, Unf=OtherCon []] =+    CAF_ccs  \ u  []  a1_rXq;++                 and CMM++[section ""data" . a1_rXq_closure" {+     a1_rXq_closure:+         const GHC.Types.I#_con_info;+         const 42;+ }]++[section ""data" . T15155.a_closure" {+     T15155.a_closure:+         const stg_IND_STATIC_info;+         const a1_rXq_closure+1;+         const 0;+         const 0;+ }]++The emitted assembly is++#### INDIRECTEE+a1_rXq_closure:                         -- module local haskell value+        .quad   GHC.Types.I#_con_info   -- an Int+        .quad   42++#### BEFORE+.globl T15155.a_closure                 -- exported newtype wrapped value+T15155.a_closure:+        .quad   stg_IND_STATIC_info     -- the closure info+        .quad   a1_rXq_closure+1        -- indirectee ('+1' being the tag)+        .quad   0+        .quad   0++#### AFTER+.globl T15155.a_closure                 -- exported newtype wrapped value+.equiv a1_rXq_closure,T15155.a_closure  -- both are shared++The transformation is performed because+     T15155.a_closure `mayRedirectTo` a1_rXq_closure+1+returns True.+-}
cmm/Cmm.hs view
@@ -39,8 +39,7 @@ import Hoopl.Graph import Hoopl.Label import Outputable--import Data.Word        ( Word8 )+import Data.ByteString (ByteString)  ----------------------------------------------------------------------------- --  Cmm, GenCmm@@ -110,6 +109,8 @@ --     Info Tables ----------------------------------------------------------------------------- +-- | CmmTopInfo is attached to each CmmDecl (see defn of CmmGroup), and contains+-- the extra info (beyond the executable code) that belongs to that CmmDecl. data CmmTopInfo   = TopInfo { info_tbls  :: LabelMap CmmInfoTable                             , stack_info :: CmmStackInfo } @@ -121,8 +122,8 @@    = StackInfo {        arg_space :: ByteOff,                -- number of bytes of arguments on the stack on entry to the-               -- the proc.  This is filled in by StgCmm.codeGen, and used-               -- by the stack allocator later.+               -- the proc.  This is filled in by GHC.StgToCmm.codeGen, and+               -- used by the stack allocator later.        updfr_space :: Maybe ByteOff,                -- XXX: this never contains anything useful, but it should.                -- See comment in CmmLayoutStack.@@ -159,7 +160,7 @@  data ProfilingInfo   = NoProfilingInfo-  | ProfilingInfo [Word8] [Word8] -- closure_type, closure_desc+  | ProfilingInfo ByteString ByteString -- closure_type, closure_desc  ----------------------------------------------------------------------------- --              Static Data@@ -195,7 +196,7 @@         -- a literal value, size given by cmmLitRep of the literal.   | CmmUninitialised Int         -- uninitialised data, N bytes long-  | CmmString [Word8]+  | CmmString ByteString         -- string of 8-bit values only, not zero terminated.  data CmmStatics
cmm/CmmBuildInfoTables.hs view
@@ -16,10 +16,9 @@ import Hoopl.Collections import Hoopl.Dataflow import Module-import Platform+import GHC.Platform import Digraph import CLabel-import PprCmmDecl () import Cmm import CmmUtils import DynFlags@@ -28,9 +27,8 @@ import SMRep import UniqSupply import CostCentre-import StgCmmHeap+import GHC.StgToCmm.Heap -import PprCmm() import Control.Monad import Data.Map (Map) import qualified Data.Map as Map@@ -707,18 +705,16 @@      -- First resolve all the CAFLabels to SRTEntries     -- Implements the [Inline] optimisation.-    resolved =-       Set.fromList $-       catMaybes (map (resolveCAF srtMap) (Set.toList nonRec))+    resolved = mapMaybe (resolveCAF srtMap) (Set.toList nonRec)      -- The set of all SRTEntries in SRTs that we refer to from here.     allBelow =-      Set.unions [ lbls | caf <- Set.toList resolved+      Set.unions [ lbls | caf <- resolved                         , Just lbls <- [Map.lookup caf (flatSRTs topSRT)] ]      -- Remove SRTEntries that are also in an SRT that we refer to.     -- Implements the [Filter] optimisation.-    filtered = Set.difference resolved allBelow+    filtered = Set.difference (Set.fromList resolved) allBelow    srtTrace "oneSRT:"      (ppr cafs <+> ppr resolved <+> ppr allBelow <+> ppr filtered) $ return ()@@ -731,7 +727,7 @@     -- important that we don't do this for static functions or CAFs,     -- see Note [Invalid optimisation: shortcutting].     updateSRTMap srtEntry =-      when (not isCAF && not isStaticFun) $ do+      when (not isCAF && (not isStaticFun || isNothing srtEntry)) $ do         let newSRTMap = Map.fromList [(cafLbl, srtEntry) | cafLbl <- lbls]         put (Map.union newSRTMap srtMap) 
cmm/CmmCallConv.hs view
@@ -10,10 +10,10 @@ import CmmExpr import SMRep import Cmm (Convention(..))-import PprCmm ()+import PprCmm () -- For Outputable instances  import DynFlags-import Platform+import GHC.Platform import Outputable  -- Calculate the 'GlobalReg' or stack locations for function call@@ -81,7 +81,6 @@                             | passFloatInXmm          -> k (RegisterParam (DoubleReg s), (vs, fs, ds, ls, ss))                         (W64, (vs, fs, d:ds, ls, ss))                             | not passFloatInXmm      -> k (RegisterParam d, (vs, fs, ds, ls, ss))-                        (W80, _) -> panic "F80 unsupported register type"                         _ -> (assts, (r:rs))               int = case (w, regs) of                       (W128, _) -> panic "W128 unsupported register type"@@ -100,6 +99,7 @@ passFloatArgsInXmm :: DynFlags -> Bool passFloatArgsInXmm dflags = case platformArch (targetPlatform dflags) of                               ArchX86_64 -> True+                              ArchX86    -> False                               _          -> False  -- We used to spill vector registers to the stack since the LLVM backend didn't
cmm/CmmCommonBlockElim.hs view
@@ -13,7 +13,6 @@ import CmmUtils import CmmSwitch (eqSwitchTargetWith) import CmmContFlowOpt--- import PprCmm ()  import Hoopl.Block import Hoopl.Graph
cmm/CmmContFlowOpt.hs view
@@ -18,7 +18,7 @@ import BlockId import Cmm import CmmUtils-import CmmSwitch (mapSwitchTargets)+import CmmSwitch (mapSwitchTargets, switchTargetsToList) import Maybes import Panic import Util@@ -294,6 +294,13 @@             , likelyTrue l || (numPreds f > 1)             , Just cond' <- maybeInvertCmmExpr cond             = CmmCondBranch cond' f t (invertLikeliness l)++            -- If all jump destinations of a switch go to the+            -- same target eliminate the switch.+            | CmmSwitch _expr targets <- shortcut_last+            , (t:ts) <- switchTargetsToList targets+            , all (== t) ts+            = CmmBranch t              | otherwise             = shortcut_last
cmm/CmmExpr.hs view
@@ -5,7 +5,7 @@ {-# LANGUAGE UndecidableInstances #-}  module CmmExpr-    ( CmmExpr(..), cmmExprType, cmmExprWidth, maybeInvertCmmExpr+    ( CmmExpr(..), cmmExprType, cmmExprWidth, cmmExprAlignment, maybeInvertCmmExpr     , CmmReg(..), cmmRegType, cmmRegWidth     , CmmLit(..), cmmLitType     , LocalReg(..), localRegType@@ -43,6 +43,8 @@ import Data.Set (Set) import qualified Data.Set as Set +import BasicTypes (Alignment, mkAlignment, alignmentOf)+ ----------------------------------------------------------------------------- --              CmmExpr -- An expression.  Expressions have no side effects.@@ -239,6 +241,13 @@ cmmExprWidth :: DynFlags -> CmmExpr -> Width cmmExprWidth dflags e = typeWidth (cmmExprType dflags e) +-- | Returns an alignment in bytes of a CmmExpr when it's a statically+-- known integer constant, otherwise returns an alignment of 1 byte.+-- The caller is responsible for using with a sensible CmmExpr+-- argument.+cmmExprAlignment :: CmmExpr -> Alignment+cmmExprAlignment (CmmLit (CmmInt intOff _)) = alignmentOf (fromInteger intOff)+cmmExprAlignment _                          = mkAlignment 1 -------- --- Negation for conditional branches @@ -474,6 +483,9 @@    FloatReg i == FloatReg j = i==j    DoubleReg i == DoubleReg j = i==j    LongReg i == LongReg j = i==j+   -- NOTE: XMM, YMM, ZMM registers actually are the same registers+   -- at least with respect to store at YMM i and then read from XMM i+   -- and similarly for ZMM etc.    XmmReg i == XmmReg j = i==j    YmmReg i == YmmReg j = i==j    ZmmReg i == ZmmReg j = i==j@@ -584,6 +596,9 @@ globalRegType _      (FloatReg _)      = cmmFloat W32 globalRegType _      (DoubleReg _)     = cmmFloat W64 globalRegType _      (LongReg _)       = cmmBits W64+-- TODO: improve the internal model of SIMD/vectorized registers+-- the right design SHOULd improve handling of float and double code too.+-- see remarks in "NOTE [SIMD Design for the future]"" in GHC.StgToCmm.Prim globalRegType _      (XmmReg _)        = cmmVec 4 (cmmBits W32) globalRegType _      (YmmReg _)        = cmmVec 8 (cmmBits W32) globalRegType _      (ZmmReg _)        = cmmVec 16 (cmmBits W32)
cmm/CmmImplementSwitchPlans.hs view
@@ -32,6 +32,7 @@ -- code generation. cmmImplementSwitchPlans :: DynFlags -> CmmGraph -> UniqSM CmmGraph cmmImplementSwitchPlans dflags g+    -- Switch generation done by backend (LLVM/C)     | targetSupportsSwitch (hscTarget dflags) = return g     | otherwise = do     blocks' <- concat `fmap` mapM (visitSwitches dflags) (toBlockList g)@@ -39,18 +40,41 @@  visitSwitches :: DynFlags -> CmmBlock -> UniqSM [CmmBlock] visitSwitches dflags block-  | (entry@(CmmEntry _ scope), middle, CmmSwitch expr ids) <- blockSplit block+  | (entry@(CmmEntry _ scope), middle, CmmSwitch vanillaExpr ids) <- blockSplit block   = do     let plan = createSwitchPlan ids+    -- See Note [Floating switch expressions]+    (assignSimple, simpleExpr) <- floatSwitchExpr dflags vanillaExpr -    (newTail, newBlocks) <- implementSwitchPlan dflags scope expr plan+    (newTail, newBlocks) <- implementSwitchPlan dflags scope simpleExpr plan -    let block' = entry `blockJoinHead` middle `blockAppend` newTail+    let block' = entry `blockJoinHead` middle `blockAppend` assignSimple `blockAppend` newTail      return $ block' : newBlocks    | otherwise   = return [block]++-- Note [Floating switch expressions]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++-- When we translate a sparse switch into a search tree we would like+-- to compute the value we compare against only once.++-- For this purpose we assign the switch expression to a local register+-- and then use this register when constructing the actual binary tree.++-- This is important as the expression could contain expensive code like+-- memory loads or divisions which we REALLY don't want to duplicate.++-- This happened in parts of the handwritten RTS Cmm code. See also #16933++-- See Note [Floating switch expressions]+floatSwitchExpr :: DynFlags -> CmmExpr -> UniqSM (Block CmmNode O O, CmmExpr)+floatSwitchExpr _      reg@(CmmReg {})  = return (emptyBlock, reg)+floatSwitchExpr dflags expr             = do+  (assign, expr') <- cmmMkAssign dflags expr <$> getUniqueM+  return (BMiddle assign, expr')   -- Implementing a switch plan (returning a tail block)
cmm/CmmInfo.hs view
@@ -45,17 +45,18 @@ import qualified Stream import Hoopl.Collections -import Platform+import GHC.Platform import Maybes import DynFlags+import ErrUtils (withTimingSilent) import Panic import UniqSupply import MonadUtils import Util import Outputable +import Data.ByteString (ByteString) import Data.Bits-import Data.Word  -- When we split at proc points, we need an empty info table. mkEmptyContInfoTable :: CLabel -> CmmInfoTable@@ -66,17 +67,23 @@                  , cit_srt  = Nothing                  , cit_clo  = Nothing } -cmmToRawCmm :: DynFlags -> Stream IO CmmGroup ()-            -> IO (Stream IO RawCmmGroup ())+cmmToRawCmm :: DynFlags -> Stream IO CmmGroup a+            -> IO (Stream IO RawCmmGroup a) cmmToRawCmm dflags cmms   = do { uniqs <- mkSplitUniqSupply 'i'-       ; let do_one uniqs cmm = do-                case initUs uniqs $ concatMapM (mkInfoTable dflags) cmm of-                  (b,uniqs') -> return (uniqs',b)-                  -- NB. strictness fixes a space leak.  DO NOT REMOVE.-       ; return (Stream.mapAccumL do_one uniqs cmms >> return ())+       ; let do_one :: UniqSupply -> [CmmDecl] -> IO (UniqSupply, [RawCmmDecl])+             do_one uniqs cmm =+               -- NB. strictness fixes a space leak.  DO NOT REMOVE.+               withTimingSilent dflags (text "Cmm -> Raw Cmm")+                                forceRes $+                 case initUs uniqs $ concatMapM (mkInfoTable dflags) cmm of+                   (b,uniqs') -> return (uniqs',b)+       ; return (snd <$> Stream.mapAccumL_ do_one uniqs cmms)        } +    where forceRes (uniqs, rawcmms) =+            uniqs `seq` foldr (\decl r -> decl `seq` r) () rawcmms+ -- Make a concrete info table, represented as a list of CmmStatic -- (it can't be simply a list of Word, because the SRT field is -- represented by a label+offset expression).@@ -416,7 +423,7 @@        ; (cd_lit, cd_decl) <- newStringLit cd        ; return ((td_lit,cd_lit), [td_decl,cd_decl]) } -newStringLit :: [Word8] -> UniqSM (CmmLit, GenCmmDecl CmmStatics info stmt)+newStringLit :: ByteString -> UniqSM (CmmLit, GenCmmDecl CmmStatics info stmt) newStringLit bytes   = do { uniq <- getUniqueM        ; return (mkByteStringCLit (mkStringLitLabel uniq) bytes) }@@ -531,7 +538,7 @@     | otherwise               = ( pc_REP_StgFunInfoExtraFwd_arity pc                                 , oFFSET_StgFunInfoExtraFwd_arity dflags ) -   pc = sPlatformConstants (settings dflags)+   pc = platformConstants dflags  ----------------------------------------------------------------------------- --@@ -572,7 +579,7 @@ stdSrtBitmapOffset :: DynFlags -> ByteOff -- Byte offset of the SRT bitmap half-word which is -- in the *higher-addressed* part of the type_lit-stdSrtBitmapOffset dflags = stdInfoTableSizeB dflags - hALF_WORD_SIZE dflags+stdSrtBitmapOffset dflags = stdInfoTableSizeB dflags - halfWordSize dflags  stdClosureTypeOffset :: DynFlags -> ByteOff -- Byte offset of the closure type half-word@@ -580,7 +587,7 @@  stdPtrsOffset, stdNonPtrsOffset :: DynFlags -> ByteOff stdPtrsOffset    dflags = stdInfoTableSizeB dflags - 2 * wORD_SIZE dflags-stdNonPtrsOffset dflags = stdInfoTableSizeB dflags - 2 * wORD_SIZE dflags + hALF_WORD_SIZE dflags+stdNonPtrsOffset dflags = stdInfoTableSizeB dflags - 2 * wORD_SIZE dflags + halfWordSize dflags  conInfoTableSizeB :: DynFlags -> Int conInfoTableSizeB dflags = stdInfoTableSizeB dflags + wORD_SIZE dflags
cmm/CmmLayoutStack.hs view
@@ -5,8 +5,8 @@  import GhcPrelude hiding ((<*>)) -import StgCmmUtils      ( callerSaveVolatileRegs ) -- XXX layering violation-import StgCmmForeign    ( saveThreadState, loadThreadState ) -- XXX layering violation+import GHC.StgToCmm.Utils      ( callerSaveVolatileRegs, newTemp  ) -- XXX layering violation+import GHC.StgToCmm.Foreign    ( saveThreadState, loadThreadState ) -- XXX layering violation  import BasicTypes import Cmm@@ -25,7 +25,6 @@ import Hoopl.Graph import Hoopl.Label import UniqSupply-import StgCmmUtils      ( newTemp ) import Maybes import UniqFM import Util@@ -918,7 +917,7 @@ areaToSp dflags _ sp_hwm _ (CmmLit CmmHighStackMark)   = mkIntExpr dflags sp_hwm     -- Replace CmmHighStackMark with the number of bytes of stack used,-    -- the sp_hwm.   See Note [Stack usage] in StgCmmHeap+    -- the sp_hwm.   See Note [Stack usage] in GHC.StgToCmm.Heap  areaToSp dflags _ _ _ (CmmMachOp (MO_U_Lt _) args)   | falseStackCheck args
cmm/CmmLint.hs view
@@ -5,6 +5,7 @@ -- CmmLint: checking the correctness of Cmm statements and expressions -- -----------------------------------------------------------------------------+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GADTs #-} module CmmLint (     cmmLint, cmmLintGraph@@ -20,11 +21,11 @@ import CmmUtils import CmmLive import CmmSwitch (switchTargetsToList)-import PprCmm ()+import PprCmm () -- For Outputable instances import Outputable import DynFlags -import Control.Monad (liftM, ap)+import Control.Monad (ap)  -- Things to check: --     - invariant on CmmBlock in CmmExpr (see comment there)@@ -212,9 +213,7 @@ -- just a basic error monad:  newtype CmmLint a = CmmLint { unCL :: DynFlags -> Either SDoc a }--instance Functor CmmLint where-      fmap = liftM+    deriving (Functor)  instance Applicative CmmLint where       pure a = CmmLint (\_ -> Right a)
cmm/CmmLive.hs view
@@ -17,7 +17,7 @@ import DynFlags import BlockId import Cmm-import PprCmmExpr ()+import PprCmmExpr () -- For Outputable instances import Hoopl.Block import Hoopl.Collections import Hoopl.Dataflow
cmm/CmmMachOp.hs view
@@ -556,7 +556,9 @@   | MO_F64_Acosh   | MO_F64_Atanh   | MO_F64_Log+  | MO_F64_Log1P   | MO_F64_Exp+  | MO_F64_ExpM1   | MO_F64_Fabs   | MO_F64_Sqrt   | MO_F32_Pwr@@ -573,7 +575,9 @@   | MO_F32_Acosh   | MO_F32_Atanh   | MO_F32_Log+  | MO_F32_Log1P   | MO_F32_Exp+  | MO_F32_ExpM1   | MO_F32_Fabs   | MO_F32_Sqrt @@ -618,6 +622,7 @@   | MO_Ctz Width    | MO_BSwap Width+  | MO_BRev Width    -- Atomic read-modify-write.   | MO_AtomicRMW Width AtomicMachOp
cmm/CmmMonad.hs view
@@ -50,7 +50,7 @@ (PD m) `thenPD` k = PD $ \d s ->         case m d s of                 POk s1 a         -> unPD (k a) d s1-                PFailed warnFn span err -> PFailed warnFn span err+                PFailed s1 -> PFailed s1  failPD :: String -> PD a failPD = liftP . fail
cmm/CmmNode.hs view
@@ -26,7 +26,7 @@  import GhcPrelude hiding (succ) -import CodeGen.Platform+import GHC.Platform.Regs import CmmExpr import CmmSwitch import DynFlags@@ -90,7 +90,7 @@       -- See Note [Unsafe foreign calls clobber caller-save registers]       --       -- Invariant: the arguments and the ForeignTarget must not-      -- mention any registers for which CodeGen.Platform.callerSaves+      -- mention any registers for which GHC.Platform.callerSaves       -- is True.  See Note [Register Parameter Passing].    CmmBranch :: ULabel -> CmmNode O C@@ -114,7 +114,7 @@       cml_cont :: Maybe Label,           -- Label of continuation (Nothing for return or tail call)           ---          -- Note [Continuation BlockId]: these BlockIds are called+          -- Note [Continuation BlockIds]: these BlockIds are called           -- Continuation BlockIds, and are the only BlockIds that can           -- occur in CmmExprs, namely as (CmmLit (CmmBlock b)) or           -- (CmmStackSlot (Young b) _).@@ -199,7 +199,7 @@  A foreign call is defined to clobber any GlobalRegs that are mapped to caller-saves machine registers (according to the prevailing C ABI).-StgCmmUtils.callerSaves tells you which GlobalRegs are caller-saves.+GHC.StgToCmm.Utils.callerSaves tells you which GlobalRegs are caller-saves.  This is a design choice that makes it easier to generate code later. We could instead choose to say that foreign calls do *not* clobber@@ -221,7 +221,7 @@ argument passing.  These are registers R3-R6, which our generated code may also be using; as a result, it's necessary to save these values before doing a foreign call.  This is done during initial-code generation in callerSaveVolatileRegs in StgCmmUtils.hs.  However,+code generation in callerSaveVolatileRegs in GHC.StgToCmm.Utils.  However, one result of doing this is that the contents of these registers may mysteriously change if referenced inside the arguments.  This is dangerous, so you'll need to disable inlining much in the same
cmm/CmmOpt.hs view
@@ -1,7 +1,3 @@--- The default iteration limit is a bit too low for the definitions--- in this module.-{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}- ----------------------------------------------------------------------------- -- -- Cmm optimisation@@ -25,7 +21,7 @@ import Util  import Outputable-import Platform+import GHC.Platform  import Data.Bits import Data.Maybe
cmm/CmmParse.hs view
@@ -3,25 +3,27 @@ #if __GLASGOW_HASKELL__ >= 710 {-# OPTIONS_GHC -XPartialTypeSignatures #-} #endif+{-# LANGUAGE TupleSections #-}+ module CmmParse ( parseCmmFile ) where  import GhcPrelude -import StgCmmExtCode+import GHC.StgToCmm.ExtCode import CmmCallConv-import StgCmmProf-import StgCmmHeap-import StgCmmMonad hiding ( getCode, getCodeR, getCodeScoped, emitLabel, emit, emitStore-                          , emitAssign, emitOutOfLine, withUpdFrameOff-                          , getUpdFrameOff )-import qualified StgCmmMonad as F-import StgCmmUtils-import StgCmmForeign-import StgCmmExpr-import StgCmmClosure-import StgCmmLayout     hiding (ArgRep(..))-import StgCmmTicky-import StgCmmBind       ( emitBlackHoleCode, emitUpdateFrame )+import GHC.StgToCmm.Prof+import GHC.StgToCmm.Heap+import GHC.StgToCmm.Monad hiding ( getCode, getCodeR, getCodeScoped, emitLabel, emit+                               , emitStore, emitAssign, emitOutOfLine, withUpdFrameOff+                               , getUpdFrameOff )+import qualified GHC.StgToCmm.Monad as F+import GHC.StgToCmm.Utils+import GHC.StgToCmm.Foreign+import GHC.StgToCmm.Expr+import GHC.StgToCmm.Closure+import GHC.StgToCmm.Layout     hiding (ArgRep(..))+import GHC.StgToCmm.Ticky+import GHC.StgToCmm.Bind  ( emitBlackHoleCode, emitUpdateFrame ) import CoreSyn          ( Tickish(SourceNote) )  import CmmOpt@@ -40,7 +42,7 @@ import CostCentre import ForeignCall import Module-import Platform+import GHC.Platform import Literal import Unique import UniqFM@@ -62,6 +64,7 @@ import System.Exit import Data.Maybe import qualified Data.Map as M+import qualified Data.ByteString.Char8 as BS8  #include "HsVersions.h" import qualified Data.Array as Happy_Data_Array@@ -820,7 +823,7 @@ 	happyRest) 	 = case happyOutTok happy_x_3 of { (L _ (CmmT_Int         happy_var_3)) ->  	happyIn9-		 (return [CmmUninitialised +		 (return [CmmUninitialised                                                         (fromIntegral happy_var_3)] 	) `HappyStk` happyRest} @@ -835,8 +838,8 @@ 	 = case happyOut57 happy_x_1 of { (HappyWrap57 happy_var_1) ->  	case happyOutTok happy_x_3 of { (L _ (CmmT_Int         happy_var_3)) ->  	happyIn9-		 (return [CmmUninitialised -                                                (widthInBytes (typeWidth happy_var_1) * +		 (return [CmmUninitialised+                                                (widthInBytes (typeWidth happy_var_1) *                                                         fromIntegral happy_var_3)] 	) `HappyStk` happyRest}} @@ -1054,7 +1057,7 @@                    do dflags <- getDynFlags                       let prof = profilingInfo dflags happy_var_13 happy_var_15                           ty  = Constr (fromIntegral happy_var_9)  -- Tag-                                       (stringToWord8s happy_var_13)+                                       (BS8.pack happy_var_13)                           rep = mkRTSRep (fromIntegral happy_var_11) $                                   mkHeapRep dflags False (fromIntegral happy_var_5)                                                   (fromIntegral happy_var_7) ty@@ -1654,7 +1657,7 @@ 	 =  case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) ->  	case happyOut25 happy_x_3 of { (HappyWrap25 happy_var_3) ->  	happyIn26-		 (do e1 <- happy_var_1; e2 <- happy_var_3; +		 (do e1 <- happy_var_1; e2 <- happy_var_3;                                           return (BoolAnd e1 e2) 	)}} @@ -1666,7 +1669,7 @@ 	 =  case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) ->  	case happyOut25 happy_x_3 of { (HappyWrap25 happy_var_3) ->  	happyIn26-		 (do e1 <- happy_var_1; e2 <- happy_var_3; +		 (do e1 <- happy_var_1; e2 <- happy_var_3;                                           return (BoolOr e1 e2) 	)}} @@ -2153,7 +2156,7 @@ happyReduction_122 happy_x_1 	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_String      happy_var_1)) ->  	happyIn39-		 (do s <- code (newStringCLit happy_var_1); +		 (do s <- code (newStringCLit happy_var_1);                                       return (CmmLit s) 	)} @@ -2370,7 +2373,7 @@ happyReduction_146 happy_x_1 	 =  case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) ->  	happyIn49-		 (do e <- happy_var_1; return (e, (inferCmmHint (CmmReg (CmmLocal e))))+		 (do e <- happy_var_1; return (e, inferCmmHint (CmmReg (CmmLocal e))) 	)}  happyReduce_147 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )@@ -2392,7 +2395,7 @@ 	happyIn50 		 (do e <- lookupName happy_var_1;                                      return $-                                       case e of +                                       case e of                                         CmmReg (CmmLocal r) -> r                                         other -> pprPanic "CmmParse:" (ftext happy_var_1 <> text " not a local register") 	)}@@ -2404,7 +2407,7 @@ 	happyIn51 		 (do e <- lookupName happy_var_1;                                      return $-                                       case e of +                                       case e of                                         CmmReg r -> r                                         other -> pprPanic "CmmParse:" (ftext happy_var_1 <> text " not a register") 	)}@@ -2683,7 +2686,7 @@ section s           = OtherSection s  mkString :: String -> CmmStatic-mkString s = CmmString (map (fromIntegral.ord) s)+mkString s = CmmString (BS8.pack s)  -- | -- Given an info table, decide what the entry convention for the proc@@ -2813,37 +2816,37 @@ callishMachOps :: UniqFM ([CmmExpr] -> (CallishMachOp, [CmmExpr])) callishMachOps = listToUFM $         map (\(x, y) -> (mkFastString x, y)) [-        ( "read_barrier", (,) MO_ReadBarrier ),-        ( "write_barrier", (,) MO_WriteBarrier ),+        ( "read_barrier", (MO_ReadBarrier,)),+        ( "write_barrier", (MO_WriteBarrier,)),         ( "memcpy", memcpyLikeTweakArgs MO_Memcpy ),         ( "memset", memcpyLikeTweakArgs MO_Memset ),         ( "memmove", memcpyLikeTweakArgs MO_Memmove ),         ( "memcmp", memcpyLikeTweakArgs MO_Memcmp ), -        ("prefetch0", (,) $ MO_Prefetch_Data 0),-        ("prefetch1", (,) $ MO_Prefetch_Data 1),-        ("prefetch2", (,) $ MO_Prefetch_Data 2),-        ("prefetch3", (,) $ MO_Prefetch_Data 3),+        ("prefetch0", (MO_Prefetch_Data 0,)),+        ("prefetch1", (MO_Prefetch_Data 1,)),+        ("prefetch2", (MO_Prefetch_Data 2,)),+        ("prefetch3", (MO_Prefetch_Data 3,)), -        ( "popcnt8",  (,) $ MO_PopCnt W8  ),-        ( "popcnt16", (,) $ MO_PopCnt W16 ),-        ( "popcnt32", (,) $ MO_PopCnt W32 ),-        ( "popcnt64", (,) $ MO_PopCnt W64 ),+        ( "popcnt8",  (MO_PopCnt W8,)),+        ( "popcnt16", (MO_PopCnt W16,)),+        ( "popcnt32", (MO_PopCnt W32,)),+        ( "popcnt64", (MO_PopCnt W64,)), -        ( "pdep8",  (,) $ MO_Pdep W8  ),-        ( "pdep16", (,) $ MO_Pdep W16 ),-        ( "pdep32", (,) $ MO_Pdep W32 ),-        ( "pdep64", (,) $ MO_Pdep W64 ),+        ( "pdep8",  (MO_Pdep W8,)),+        ( "pdep16", (MO_Pdep W16,)),+        ( "pdep32", (MO_Pdep W32,)),+        ( "pdep64", (MO_Pdep W64,)), -        ( "pext8",  (,) $ MO_Pext W8  ),-        ( "pext16", (,) $ MO_Pext W16 ),-        ( "pext32", (,) $ MO_Pext W32 ),-        ( "pext64", (,) $ MO_Pext W64 ),+        ( "pext8",  (MO_Pext W8,)),+        ( "pext16", (MO_Pext W16,)),+        ( "pext32", (MO_Pext W32,)),+        ( "pext64", (MO_Pext W64,)), -        ( "cmpxchg8",  (,) $ MO_Cmpxchg W8  ),-        ( "cmpxchg16", (,) $ MO_Cmpxchg W16 ),-        ( "cmpxchg32", (,) $ MO_Cmpxchg W32 ),-        ( "cmpxchg64", (,) $ MO_Cmpxchg W64 )+        ( "cmpxchg8",  (MO_Cmpxchg W8,)),+        ( "cmpxchg16", (MO_Cmpxchg W16,)),+        ( "cmpxchg32", (MO_Cmpxchg W32,)),+        ( "cmpxchg64", (MO_Cmpxchg W64,))          -- ToDo: the rest, maybe         -- edit: which rest?@@ -2981,8 +2984,7 @@ profilingInfo dflags desc_str ty_str   = if not (gopt Opt_SccProfilingOn dflags)     then NoProfilingInfo-    else ProfilingInfo (stringToWord8s desc_str)-                       (stringToWord8s ty_str)+    else ProfilingInfo (BS8.pack desc_str) (BS8.pack ty_str)  staticClosure :: UnitId -> FastString -> FastString -> [CmmLit] -> CmmParse () staticClosure pkg cl_label info payload@@ -3189,7 +3191,7 @@ doSwitch mb_range scrut arms deflt    = do         -- Compile code for the default branch-        dflt_entry <- +        dflt_entry <-                 case deflt of                   Nothing -> return Nothing                   Just e  -> do b <- forkLabelledCode e; return (Just b)@@ -3232,7 +3234,7 @@   ]  parseCmmFile :: DynFlags -> FilePath -> IO (Messages, Maybe CmmGroup)-parseCmmFile dflags filename = withTiming (pure dflags) (text "ParseCmm"<+>brackets (text filename)) (\_ -> ()) $ do+parseCmmFile dflags filename = withTiming dflags (text "ParseCmm"<+>brackets (text filename)) (\_ -> ()) $ do   buf <- hGetStringBuffer filename   let         init_loc = mkRealSrcLoc (mkFastString filename) 1 1@@ -3240,11 +3242,8 @@                 -- reset the lex_state: the Lexer monad leaves some stuff                 -- in there we don't want.   case unPD cmmParse dflags init_state of-    PFailed warnFn span err -> do-        let msg = mkPlainErrMsg dflags span err-            errMsgs = (emptyBag, unitBag msg)-            warnMsgs = warnFn dflags-        return (unionMessages warnMsgs errMsgs, Nothing)+    PFailed pst ->+        return (getMessages pst dflags, Nothing)     POk pst code -> do         st <- initC         let fcode = getCmm $ unEC code "global" (initEnv dflags) [] >> return ()@@ -3259,10 +3258,10 @@ {-# LINE 1 "templates/GenericTemplate.hs" #-} {-# LINE 1 "<built-in>" #-} {-# LINE 1 "<command-line>" #-}-{-# LINE 10 "<command-line>" #-}-# 1 "/usr/include/stdc-predef.h" 1 3 4+{-# LINE 11 "<command-line>" #-}+# 1 "/nix/store/jk3nrdm3jd67i897db9dcpam75gh3iw6-glibc-2.27-dev/include/stdc-predef.h" 1 3 4 -# 17 "/usr/include/stdc-predef.h" 3 4+# 17 "/nix/store/jk3nrdm3jd67i897db9dcpam75gh3iw6-glibc-2.27-dev/include/stdc-predef.h" 3 4   @@ -3308,9 +3307,9 @@   -{-# LINE 10 "<command-line>" #-}-{-# LINE 1 "/opt/ghc/8.4.4/lib/ghc-8.4.4/include/ghcversion.h" #-} +{-# LINE 11 "<command-line>" #-}+{-# LINE 1 "/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/include/ghcversion.h" #-}   @@ -3325,7 +3324,202 @@   -{-# LINE 10 "<command-line>" #-}++{-# LINE 11 "<command-line>" #-}+{-# LINE 1 "/build/ghc807_0/ghc_2.h" #-}+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++{-# LINE 11 "<command-line>" #-} {-# LINE 1 "templates/GenericTemplate.hs" #-} -- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp  
cmm/CmmPipeline.hs view
@@ -26,7 +26,7 @@ import HscTypes import Control.Monad import Outputable-import Platform+import GHC.Platform  ----------------------------------------------------------------------------- -- | Top level driver for C-- pipeline@@ -39,7 +39,7 @@  -> CmmGroup             -- Input C-- with Procedures  -> IO (ModuleSRTInfo, CmmGroup) -- Output CPS transformed C-- -cmmPipeline hsc_env srtInfo prog =+cmmPipeline hsc_env srtInfo prog = withTimingSilent dflags (text "Cmm pipeline") forceRes $   do let dflags = hsc_dflags hsc_env       tops <- {-# SCC "tops" #-} mapM (cpsTop hsc_env) prog@@ -49,7 +49,11 @@       return (srtInfo, cmms) +  where forceRes (info, group) =+          info `seq` foldr (\decl r -> decl `seq` r) () group +        dflags = hsc_dflags hsc_env+ cpsTop :: HscEnv -> CmmDecl -> IO (CAFEnv, [CmmDecl]) cpsTop _ p@(CmmData {}) = return (mapEmpty, [p]) cpsTop hsc_env proc =@@ -75,6 +79,7 @@        -- Any work storing block Labels must be performed _after_        -- elimCommonBlocks +       ----------- Implement switches ------------------------------------------        g <- {-# SCC "createSwitchPlans" #-}             runUniqSM $ cmmImplementSwitchPlans dflags g        dump Opt_D_dump_cmm_switch "Post switch plan" g@@ -352,9 +357,10 @@  dumpWith :: DynFlags -> DumpFlag -> String -> SDoc -> IO () dumpWith dflags flag txt sdoc = do-         -- ToDo: No easy way of say "dump all the cmm, *and* split-         -- them into files."  Also, -ddump-cmm-verbose doesn't play-         -- nicely with -ddump-to-file, since the headers get omitted.-   dumpIfSet_dyn dflags flag txt sdoc-   when (not (dopt flag dflags)) $-      dumpIfSet_dyn dflags Opt_D_dump_cmm_verbose txt sdoc+  dumpIfSet_dyn dflags flag txt sdoc+  when (not (dopt flag dflags)) $+    -- If `-ddump-cmm-verbose -ddump-to-file` is specified,+    -- dump each Cmm pipeline stage output to a separate file.  #16930+    when (dopt Opt_D_dump_cmm_verbose dflags)+      $ dumpSDoc dflags alwaysQualify flag txt sdoc+  dumpIfSet_dyn dflags Opt_D_dump_cmm_verbose_by_proc txt sdoc
cmm/CmmProcPoint.hs view
@@ -14,7 +14,7 @@ import BlockId import CLabel import Cmm-import PprCmm ()+import PprCmm () -- For Outputable instances import CmmUtils import CmmInfo import CmmLive@@ -23,7 +23,7 @@ import Maybes import Control.Monad import Outputable-import Platform+import GHC.Platform import UniqSupply import Hoopl.Block import Hoopl.Collections
cmm/CmmSink.hs view
@@ -13,13 +13,12 @@ import Hoopl.Label import Hoopl.Collections import Hoopl.Graph-import CodeGen.Platform-import Platform (isARM, platformArch)+import GHC.Platform.Regs+import GHC.Platform (isARM, platformArch)  import DynFlags import Unique import UniqFM-import PprCmm ()  import qualified Data.IntSet as IntSet import Data.List (partition)@@ -133,7 +132,7 @@ -- -- a nice loop, but we didn't eliminate the silly assignment at the end. -- See Note [dependent assignments], which would probably fix this.--- This is #8336 on Trac.+-- This is #8336. -- -- ----------- -- (2) From stg_atomically_frame in PrimOps.cmm@@ -566,7 +565,7 @@ -- clashing with C argument-passing registers, really the back-end -- ought to be able to handle it properly, but currently neither PprC -- nor the NCG can do it.  See Note [Register parameter passing]--- See also StgCmmForeign:load_args_into_temps.+-- See also GHC.StgToCmm.Foreign.load_args_into_temps. okToInline :: DynFlags -> CmmExpr -> CmmNode e x -> Bool okToInline dflags expr node@(CmmUnsafeForeignCall{}) =     not (globalRegistersConflict dflags expr node)
cmm/CmmSwitch.hs view
@@ -32,7 +32,7 @@ -- -- The overall plan is: --  * The Stg → Cmm transformation creates a single `SwitchTargets` in---    emitSwitch and emitCmmLitSwitch in StgCmmUtils.hs.+--    emitSwitch and emitCmmLitSwitch in GHC.StgToCmm/Utils.hs. --    At this stage, they are unsuitable for code generation. --  * A dedicated Cmm transformation (CmmImplementSwitchPlans) replaces these --    switch statements with code that is suitable for code generation, i.e.
cmm/CmmType.hs view
@@ -166,9 +166,6 @@ -----------------------------------------------------------------------------  data Width   = W8 | W16 | W32 | W64-             | W80      -- Extended double-precision float,-                        -- used in x86 native codegen only.-                        -- (we use Ord, so it'd better be in this order)              | W128              | W256              | W512@@ -185,9 +182,9 @@ mrStr W128 = sLit("W128") mrStr W256 = sLit("W256") mrStr W512 = sLit("W512")-mrStr W80  = sLit("W80")  + -------- Common Widths  ------------ wordWidth :: DynFlags -> Width wordWidth dflags@@ -222,8 +219,8 @@ widthInBits W128 = 128 widthInBits W256 = 256 widthInBits W512 = 512-widthInBits W80  = 80 + widthInBytes :: Width -> Int widthInBytes W8   = 1 widthInBytes W16  = 2@@ -232,8 +229,8 @@ widthInBytes W128 = 16 widthInBytes W256 = 32 widthInBytes W512 = 64-widthInBytes W80  = 10 + widthFromBytes :: Int -> Width widthFromBytes 1  = W8 widthFromBytes 2  = W16@@ -242,7 +239,7 @@ widthFromBytes 16 = W128 widthFromBytes 32 = W256 widthFromBytes 64 = W512-widthFromBytes 10 = W80+ widthFromBytes n  = pprPanic "no width for given number of bytes" (ppr n)  -- log_2 of the width in bytes, useful for generating shifts.@@ -254,8 +251,8 @@ widthInLog W128 = 4 widthInLog W256 = 5 widthInLog W512 = 6-widthInLog W80  = panic "widthInLog: F80" + -- widening / narrowing  narrowU :: Width -> Integer -> Integer@@ -338,22 +335,22 @@ rEP_CostCentreStack_mem_alloc :: DynFlags -> CmmType rEP_CostCentreStack_mem_alloc dflags     = cmmBits (widthFromBytes (pc_REP_CostCentreStack_mem_alloc pc))-    where pc = sPlatformConstants (settings dflags)+    where pc = platformConstants dflags  rEP_CostCentreStack_scc_count :: DynFlags -> CmmType rEP_CostCentreStack_scc_count dflags     = cmmBits (widthFromBytes (pc_REP_CostCentreStack_scc_count pc))-    where pc = sPlatformConstants (settings dflags)+    where pc = platformConstants dflags  rEP_StgEntCounter_allocs :: DynFlags -> CmmType rEP_StgEntCounter_allocs dflags     = cmmBits (widthFromBytes (pc_REP_StgEntCounter_allocs pc))-    where pc = sPlatformConstants (settings dflags)+    where pc = platformConstants dflags  rEP_StgEntCounter_allocd :: DynFlags -> CmmType rEP_StgEntCounter_allocd dflags     = cmmBits (widthFromBytes (pc_REP_StgEntCounter_allocd pc))-    where pc = sPlatformConstants (settings dflags)+    where pc = platformConstants dflags  ------------------------------------------------------------------------- {-      Note [Signed vs unsigned]
cmm/CmmUtils.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE GADTs, RankNTypes #-}+{-# LANGUAGE BangPatterns #-}  ----------------------------------------------------------------------------- --@@ -35,6 +36,8 @@         cmmSubWord, cmmAddWord, cmmMulWord, cmmQuotWord,         cmmToWord, +        cmmMkAssign,+         isTrivialCmmExpr, hasNoGlobalRegs, isLit, isComparisonExpr,          baseExpr, spExpr, hpExpr, spLimExpr, hpLimExpr,@@ -76,9 +79,11 @@ import CLabel import Outputable import DynFlags-import CodeGen.Platform+import Unique+import GHC.Platform.Regs -import Data.Word+import Data.ByteString (ByteString)+import qualified Data.ByteString as BS import Data.Bits import Hoopl.Graph import Hoopl.Label@@ -101,6 +106,8 @@ primRepCmmType _      Word8Rep         = b8 primRepCmmType _      Int16Rep         = b16 primRepCmmType _      Word16Rep        = b16+primRepCmmType _      Int32Rep         = b32+primRepCmmType _      Word32Rep        = b32 primRepCmmType _      Int64Rep         = b64 primRepCmmType _      Word64Rep        = b64 primRepCmmType dflags AddrRep          = bWord dflags@@ -137,10 +144,12 @@ primRepForeignHint IntRep       = SignedHint primRepForeignHint Int8Rep      = SignedHint primRepForeignHint Int16Rep     = SignedHint+primRepForeignHint Int32Rep     = SignedHint primRepForeignHint Int64Rep     = SignedHint primRepForeignHint WordRep      = NoHint primRepForeignHint Word8Rep     = NoHint primRepForeignHint Word16Rep    = NoHint+primRepForeignHint Word32Rep    = NoHint primRepForeignHint Word64Rep    = NoHint primRepForeignHint AddrRep      = AddrHint -- NB! AddrHint, but NonPtrArg primRepForeignHint FloatRep     = NoHint@@ -181,7 +190,7 @@ mkWordCLit dflags wd = CmmInt wd (wordWidth dflags)  mkByteStringCLit-  :: CLabel -> [Word8] -> (CmmLit, GenCmmDecl CmmStatics info stmt)+  :: CLabel -> ByteString -> (CmmLit, GenCmmDecl CmmStatics info stmt) -- We have to make a top-level decl for the string, -- and return a literal pointing to it mkByteStringCLit lbl bytes@@ -189,7 +198,7 @@   where     -- This can not happen for String literals (as there \NUL is replaced by     -- C0 80). However, it can happen with Addr# literals.-    sec = if 0 `elem` bytes then ReadOnlyData else CString+    sec = if 0 `BS.elem` bytes then ReadOnlyData else CString  mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt -- Build a data-segment data block@@ -218,8 +227,8 @@ --       but be careful: that's vulnerable when reversed packHalfWordsCLit dflags lower_half_word upper_half_word    = if wORDS_BIGENDIAN dflags-     then mkWordCLit dflags ((l `shiftL` hALF_WORD_SIZE_IN_BITS dflags) .|. u)-     else mkWordCLit dflags (l .|. (u `shiftL` hALF_WORD_SIZE_IN_BITS dflags))+     then mkWordCLit dflags ((l `shiftL` halfWordSizeInBits dflags) .|. u)+     else mkWordCLit dflags (l .|. (u `shiftL` halfWordSizeInBits dflags))     where l = fromStgHalfWord lower_half_word           u = fromStgHalfWord upper_half_word @@ -371,6 +380,13 @@     w = cmmExprWidth dflags e     word = wordWidth dflags +cmmMkAssign :: DynFlags -> CmmExpr -> Unique -> (CmmNode O O, CmmExpr)+cmmMkAssign dflags expr uq =+  let !ty = cmmExprType dflags expr+      reg = (CmmLocal (LocalReg uq ty))+  in  (CmmAssign reg expr, CmmReg reg)++ --------------------------------------------------- -- --      CmmExpr predicates@@ -447,7 +463,7 @@ -- -- We must check for overlapping registers and not just equal -- registers here, otherwise CmmSink may incorrectly reorder--- assignments that conflict due to overlap. See Trac #10521 and Note+-- assignments that conflict due to overlap. See #10521 and Note -- [Overlapping global registers]. regUsedIn :: DynFlags -> CmmReg -> CmmExpr -> Bool regUsedIn dflags = regUsedIn_ where
cmm/Debug.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE GADTs #-}+{-# LANGUAGE MultiWayIf #-}  ----------------------------------------------------------------------------- --@@ -11,7 +12,7 @@  module Debug ( -  DebugBlock(..), dblIsEntry,+  DebugBlock(..),   cmmDebugGen,   cmmDebugLabels,   cmmDebugLink,@@ -32,7 +33,6 @@ import FastString      ( nilFS, mkFastString ) import Module import Outputable-import PprCore         () import PprCmmExpr      ( pprExpr ) import SrcLoc import Util            ( seqList )@@ -59,8 +59,7 @@   , dblParent     :: !(Maybe DebugBlock)     -- ^ The parent of this proc. See Note [Splitting DebugBlocks]   , dblTicks      :: ![CmmTickish] -- ^ Ticks defined in this block-  , dblSourceTick-            :: !(Maybe CmmTickish) -- ^ Best source tick covering block+  , dblSourceTick :: !(Maybe CmmTickish) -- ^ Best source tick covering block   , dblPosition   :: !(Maybe Int)  -- ^ Output position relative to                                    -- other blocks. @Nothing@ means                                    -- the block was optimized out@@ -68,22 +67,19 @@   , dblBlocks     :: ![DebugBlock] -- ^ Nested blocks   } --- | Is this the entry block?-dblIsEntry :: DebugBlock -> Bool-dblIsEntry blk = dblProcedure blk == dblLabel blk- instance Outputable DebugBlock where-  ppr blk = (if dblProcedure blk == dblLabel blk-             then text "proc "-             else if dblHasInfoTbl blk-                  then text "pp-blk "-                  else text "blk ") <>+  ppr blk = (if | dblProcedure blk == dblLabel blk+                -> text "proc"+                | dblHasInfoTbl blk+                -> text "pp-blk"+                | otherwise+                -> text "blk") <+>             ppr (dblLabel blk) <+> parens (ppr (dblCLabel blk)) <+>             (maybe empty ppr (dblSourceTick blk)) <+>             (maybe (text "removed") ((text "pos " <>) . ppr)                    (dblPosition blk)) <+>-            (ppr (dblUnwind blk)) <+>-            (if null (dblBlocks blk) then empty else ppr (dblBlocks blk))+            (ppr (dblUnwind blk)) $+$+            (if null (dblBlocks blk) then empty else nest 4 (ppr (dblBlocks blk)))  -- | Intermediate data structure holding debug-relevant context information -- about a block.@@ -369,7 +365,7 @@  The flow of unwinding information through the compiler is a bit convoluted: - * C-- begins life in StgCmm without any unwind information. This is because we+ * C-- begins life in StgToCmm without any unwind information. This is because we    haven't actually done any register assignment or stack layout yet, so there    is no need for unwind information. 
cmm/Hoopl/Block.hs view
@@ -1,10 +1,15 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GADTs #-}+{-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} module Hoopl.Block-    ( C+    ( Extensibility (..)     , O+    , C     , MaybeO(..)     , IndexedCO     , Block(..)@@ -38,19 +43,21 @@ -- ----------------------------------------------------------------------------- -- Shapes: Open and Closed --- | Used at the type level to indicate an "open" structure with--- a unique, unnamed control-flow edge flowing in or out.--- "Fallthrough" and concatenation are permitted at an open point.-data O+-- | Used at the type level to indicate "open" vs "closed" structure.+data Extensibility+  -- | An "open" structure with a unique, unnamed control-flow edge flowing in+  -- or out. "Fallthrough" and concatenation are permitted at an open point.+  = Open+  -- | A "closed" structure which supports control transfer only through the use+  -- of named labels---no "fallthrough" is permitted. The number of control-flow+  -- edges is unconstrained.+  | Closed --- | Used at the type level to indicate a "closed" structure which--- supports control transfer only through the use of named--- labels---no "fallthrough" is permitted.  The number of control-flow--- edges is unconstrained.-data C+type O = 'Open+type C = 'Closed  -- | Either type indexed by closed/open using type families-type family IndexedCO ex a b :: *+type family IndexedCO (ex :: Extensibility) (a :: k) (b :: k) :: k type instance IndexedCO C a _b = a type instance IndexedCO O _a b = b @@ -64,14 +71,8 @@   JustC    :: t -> MaybeC C t   NothingC ::      MaybeC O t --instance Functor (MaybeO ex) where-  fmap _ NothingO = NothingO-  fmap f (JustO a) = JustO (f a)--instance Functor (MaybeC ex) where-  fmap _ NothingC = NothingC-  fmap f (JustC a) = JustC (f a)+deriving instance Functor (MaybeO ex)+deriving instance Functor (MaybeC ex)  -- ----------------------------------------------------------------------------- -- The Block type
cmm/Hoopl/Dataflow.hs view
@@ -1,10 +1,10 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses  #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-}-{-# OPTIONS_GHC -fprof-auto-top #-}  -- -- Copyright (c) 2010, João Dias, Simon Marlow, Simon Peyton Jones,@@ -49,7 +49,7 @@ import Hoopl.Collections import Hoopl.Label -type family   Fact x f :: *+type family   Fact (x :: Extensibility) f :: * type instance Fact C f = FactBase f type instance Fact O f = f @@ -106,6 +106,7 @@     -> FactBase f     -> FactBase f analyzeCmm dir lattice transfer cmmGraph initFact =+    {-# SCC analyzeCmm #-}     let entry = g_entry cmmGraph         hooplGraph = g_graph cmmGraph         blockMap =@@ -167,7 +168,7 @@     -> CmmGraph     -> FactBase f     -> UniqSM (CmmGraph, FactBase f)-rewriteCmm dir lattice rwFun cmmGraph initFact = do+rewriteCmm dir lattice rwFun cmmGraph initFact = {-# SCC rewriteCmm #-} do     let entry = g_entry cmmGraph         hooplGraph = g_graph cmmGraph         blockMap1 =
cmm/Hoopl/Graph.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-}@@ -30,7 +31,7 @@ type Body n = LabelMap (Block n C C)  -- | @Body@ abstracted over @block@-type Body' block (n :: * -> * -> *) = LabelMap (block n C C)+type Body' block (n :: Extensibility -> Extensibility -> *) = LabelMap (block n C C)  ------------------------------- -- | Gives access to the anchor points for@@ -75,7 +76,7 @@ -- | @Graph'@ is abstracted over the block type, so that we can build -- graphs of annotated blocks for example (Compiler.Hoopl.Dataflow -- needs this).-data Graph' block (n :: * -> * -> *) e x where+data Graph' block (n :: Extensibility -> Extensibility -> *) e x where   GNil  :: Graph' block n O O   GUnit :: block n O O -> Graph' block n O O   GMany :: MaybeO e (block n O C)
cmm/MkGraph.hs view
@@ -335,8 +335,8 @@           local = CmmLocal reg           width = cmmRegWidth dflags local           expr  = CmmMachOp (MO_XX_Conv (wordWidth dflags) width) [stack_slot]-        in CmmAssign local expr -         +        in CmmAssign local expr+       | otherwise =          CmmAssign (CmmLocal reg) (CmmLoad (CmmStackSlot area off) ty)          where ty = localRegType reg
cmm/PprC.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, GADTs #-}+{-# LANGUAGE CPP, DeriveFunctor, GADTs, PatternSynonyms #-}  ----------------------------------------------------------------------------- --@@ -8,7 +8,7 @@ -- -- Print Cmm as real C, for -fvia-C ----- See wiki:Commentary/Compiler/Backends/PprC+-- See wiki:commentary/compiler/backends/ppr-c -- -- This is simpler than the old PprAbsC, because Cmm is "macro-expanded" -- relative to the old AbstractC, and many oddities/decorations have@@ -19,8 +19,7 @@ -----------------------------------------------------------------------------  module PprC (-        writeCs,-        pprStringInCStyle+        writeC   ) where  #include "HsVersions.h"@@ -32,7 +31,7 @@ import CLabel import ForeignCall import Cmm hiding (pprBBlock)-import PprCmm ()+import PprCmm () -- For Outputable instances import Hoopl.Block import Hoopl.Collections import Hoopl.Graph@@ -44,35 +43,32 @@ import DynFlags import FastString import Outputable-import Platform+import GHC.Platform import UniqSet import UniqFM import Unique import Util  -- The rest+import Data.ByteString (ByteString)+import qualified Data.ByteString as BS import Control.Monad.ST import Data.Bits import Data.Char-import Data.List+import Data.List (intersperse) import Data.Map (Map) import Data.Word import System.IO import qualified Data.Map as Map-import Control.Monad (liftM, ap)+import Control.Monad (ap) import qualified Data.Array.Unsafe as U ( castSTUArray ) import Data.Array.ST  -- -------------------------------------------------------------------------- -- Top level -pprCs :: [RawCmmGroup] -> SDoc-pprCs cmms- = pprCode CStyle (vcat $ map pprC cmms)--writeCs :: DynFlags -> Handle -> [RawCmmGroup] -> IO ()-writeCs dflags handle cmms-  = printForC dflags handle (pprCs cmms)+writeC :: DynFlags -> Handle -> RawCmmGroup -> IO ()+writeC dflags handle cmm = printForC dflags handle (pprC cmm $$ blankLine)  -- -------------------------------------------------------------------------- -- Now do some real work@@ -177,7 +173,7 @@ -- -- It's a reasonable assumption also known as natural alignment. -- Although some architectures have different alignment rules.--- One of known exceptions is m68k (Trac #11395, comment:16) where:+-- One of known exceptions is m68k (#11395, comment:16) where: --   __alignof__(StgWord) == 2, sizeof(StgWord) == 4 -- -- Thus we explicitly increase alignment by using@@ -238,7 +234,7 @@          cast_fn = parens (cCast (pprCFunType (char '*') cconv hresults hargs) fn) -        -- See wiki:Commentary/Compiler/Backends/PprC#Prototypes+        -- See wiki:commentary/compiler/backends/ppr-c#prototypes         fnCall =             case fn of               CmmLit (CmmLabel lbl)@@ -786,7 +782,9 @@         MO_F64_Acosh    -> text "acosh"         MO_F64_Atan     -> text "atan"         MO_F64_Log      -> text "log"+        MO_F64_Log1P    -> text "log1p"         MO_F64_Exp      -> text "exp"+        MO_F64_ExpM1    -> text "expm1"         MO_F64_Sqrt     -> text "sqrt"         MO_F64_Fabs     -> text "fabs"         MO_F32_Pwr      -> text "powf"@@ -803,7 +801,9 @@         MO_F32_Acosh    -> text "acoshf"         MO_F32_Atanh    -> text "atanhf"         MO_F32_Log      -> text "logf"+        MO_F32_Log1P    -> text "log1pf"         MO_F32_Exp      -> text "expf"+        MO_F32_ExpM1    -> text "expm1f"         MO_F32_Sqrt     -> text "sqrtf"         MO_F32_Fabs     -> text "fabsf"         MO_ReadBarrier  -> text "load_load_barrier"@@ -813,6 +813,7 @@         MO_Memmove _    -> text "memmove"         MO_Memcmp _     -> text "memcmp"         (MO_BSwap w)    -> ptext (sLit $ bSwapLabel w)+        (MO_BRev w)     -> ptext (sLit $ bRevLabel w)         (MO_PopCnt w)   -> ptext (sLit $ popCntLabel w)         (MO_Pext w)     -> ptext (sLit $ pextLabel w)         (MO_Pdep w)     -> ptext (sLit $ pdepLabel w)@@ -1076,10 +1077,7 @@         <> semi  type TEState = (UniqSet LocalReg, Map CLabel ())-newtype TE a = TE { unTE :: TEState -> (a, TEState) }--instance Functor TE where-      fmap = liftM+newtype TE a = TE { unTE :: TEState -> (a, TEState) } deriving (Functor)  instance Applicative TE where       pure a = TE $ \s -> (a, s)@@ -1225,8 +1223,8 @@ -- --------------------------------------------------------------------- -- print strings as valid C strings -pprStringInCStyle :: [Word8] -> SDoc-pprStringInCStyle s = doubleQuotes (text (concatMap charToC s))+pprStringInCStyle :: ByteString -> SDoc+pprStringInCStyle s = doubleQuotes (text (concatMap charToC (BS.unpack s)))  -- --------------------------------------------------------------------------- -- Initialising static objects with floating-point numbers.  We can't
cmm/PprCmm.hs view
@@ -41,7 +41,6 @@  import GhcPrelude hiding (succ) -import BlockId () import CLabel import Cmm import CmmUtils@@ -52,7 +51,6 @@ import PprCmmDecl import PprCmmExpr import Util-import PprCore ()  import BasicTypes import Hoopl.Block
cmm/PprCmmDecl.hs view
@@ -50,8 +50,7 @@ import Data.List import System.IO --- Temp Jan08-import SMRep+import qualified Data.ByteString as BS   pprCmms :: (Outputable info, Outputable g)@@ -95,7 +94,7 @@  pprTop (CmmProc info lbl live graph) -  = vcat [ ppr lbl <> lparen <> rparen <+> text "// " <+> ppr live+  = vcat [ ppr lbl <> lparen <> rparen <+> lbrace <+> text "// " <+> ppr live          , nest 8 $ lbrace <+> ppr info $$ rbrace          , nest 4 $ ppr graph          , rbrace ]@@ -121,8 +120,8 @@          , case prof_info of              NoProfilingInfo -> empty              ProfilingInfo ct cd ->-               vcat [ text "type: " <> pprWord8String ct-                    , text "desc: " <> pprWord8String cd ]+               vcat [ text "type: " <> text (show (BS.unpack ct))+                    , text "desc: " <> text (show (BS.unpack cd)) ]          , text "srt: " <> ppr srt ]  instance Outputable ForeignHint where
cmm/SMRep.hs view
@@ -13,7 +13,7 @@          StgWord, fromStgWord, toStgWord,         StgHalfWord, fromStgHalfWord, toStgHalfWord,-        hALF_WORD_SIZE, hALF_WORD_SIZE_IN_BITS,+        halfWordSize, halfWordSizeInBits,          -- * Closure repesentation         SMRep(..), -- CmmInfo sees the rep; no one else does@@ -41,10 +41,7 @@         aRG_GEN, aRG_GEN_BIG,          -- ** Arrays-        card, cardRoundUp, cardTableSizeB, cardTableSizeW,--        -- * Operations over [Word8] strings that don't belong here-        pprWord8String, stringToWord8s+        card, cardRoundUp, cardTableSizeB, cardTableSizeW     ) where  import GhcPrelude@@ -52,12 +49,12 @@ import BasicTypes( ConTagZ ) import DynFlags import Outputable-import Platform+import GHC.Platform import FastString -import Data.Char( ord ) import Data.Word import Data.Bits+import Data.ByteString (ByteString)  {- ************************************************************************@@ -110,9 +107,8 @@     = case platformWordSize (targetPlatform dflags) of       -- These conversions mean that things like toStgWord (-1)       -- do the right thing-      4 -> StgWord (fromIntegral (fromInteger i :: Word32))-      8 -> StgWord (fromInteger i :: Word64)-      w -> panic ("toStgWord: Unknown platformWordSize: " ++ show w)+      PW4 -> StgWord (fromIntegral (fromInteger i :: Word32))+      PW8 -> StgWord (fromInteger i)  instance Outputable StgWord where     ppr (StgWord i) = integer (toInteger i)@@ -132,18 +128,19 @@     = case platformWordSize (targetPlatform dflags) of       -- These conversions mean that things like toStgHalfWord (-1)       -- do the right thing-      4 -> StgHalfWord (fromIntegral (fromInteger i :: Word16))-      8 -> StgHalfWord (fromInteger i :: Word32)-      w -> panic ("toStgHalfWord: Unknown platformWordSize: " ++ show w)+      PW4 -> StgHalfWord (fromIntegral (fromInteger i :: Word16))+      PW8 -> StgHalfWord (fromInteger i :: Word32)  instance Outputable StgHalfWord where     ppr (StgHalfWord w) = integer (toInteger w) -hALF_WORD_SIZE :: DynFlags -> ByteOff-hALF_WORD_SIZE dflags = platformWordSize (targetPlatform dflags) `shiftR` 1-hALF_WORD_SIZE_IN_BITS :: DynFlags -> Int-hALF_WORD_SIZE_IN_BITS dflags = platformWordSize (targetPlatform dflags) `shiftL` 2+-- | Half word size in bytes+halfWordSize :: DynFlags -> ByteOff+halfWordSize dflags = platformWordSizeInBytes (targetPlatform dflags) `div` 2 +halfWordSizeInBits :: DynFlags -> Int+halfWordSizeInBits dflags = platformWordSizeInBits (targetPlatform dflags) `div` 2+ {- ************************************************************************ *                                                                      *@@ -195,7 +192,7 @@   | BlackHole   | IndStatic -type ConstrDescription = [Word8] -- result of dataConIdentity+type ConstrDescription = ByteString -- result of dataConIdentity type FunArity          = Int type SelectorOffset    = Int @@ -564,11 +561,3 @@ pprTypeInfo Thunk     = text "Thunk" pprTypeInfo BlackHole = text "BlackHole" pprTypeInfo IndStatic = text "IndStatic"---- XXX Does not belong here!!-stringToWord8s :: String -> [Word8]-stringToWord8s s = map (fromIntegral . ord) s--pprWord8String :: [Word8] -> SDoc--- Debug printing.  Not very clever right now.-pprWord8String ws = text (show ws)
− codeGen/CgUtils.hs
@@ -1,182 +0,0 @@-{-# LANGUAGE GADTs #-}------------------------------------------------------------------------------------- Code generator utilities; mostly monadic------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module CgUtils ( fixStgRegisters ) where--import GhcPrelude--import CodeGen.Platform-import Cmm-import Hoopl.Block-import Hoopl.Graph-import CmmUtils-import CLabel-import DynFlags-import Outputable---- -------------------------------------------------------------------------------- Information about global registers--baseRegOffset :: DynFlags -> GlobalReg -> Int--baseRegOffset dflags (VanillaReg 1 _)    = oFFSET_StgRegTable_rR1 dflags-baseRegOffset dflags (VanillaReg 2 _)    = oFFSET_StgRegTable_rR2 dflags-baseRegOffset dflags (VanillaReg 3 _)    = oFFSET_StgRegTable_rR3 dflags-baseRegOffset dflags (VanillaReg 4 _)    = oFFSET_StgRegTable_rR4 dflags-baseRegOffset dflags (VanillaReg 5 _)    = oFFSET_StgRegTable_rR5 dflags-baseRegOffset dflags (VanillaReg 6 _)    = oFFSET_StgRegTable_rR6 dflags-baseRegOffset dflags (VanillaReg 7 _)    = oFFSET_StgRegTable_rR7 dflags-baseRegOffset dflags (VanillaReg 8 _)    = oFFSET_StgRegTable_rR8 dflags-baseRegOffset dflags (VanillaReg 9 _)    = oFFSET_StgRegTable_rR9 dflags-baseRegOffset dflags (VanillaReg 10 _)   = oFFSET_StgRegTable_rR10 dflags-baseRegOffset _      (VanillaReg n _)    = panic ("Registers above R10 are not supported (tried to use R" ++ show n ++ ")")-baseRegOffset dflags (FloatReg  1)       = oFFSET_StgRegTable_rF1 dflags-baseRegOffset dflags (FloatReg  2)       = oFFSET_StgRegTable_rF2 dflags-baseRegOffset dflags (FloatReg  3)       = oFFSET_StgRegTable_rF3 dflags-baseRegOffset dflags (FloatReg  4)       = oFFSET_StgRegTable_rF4 dflags-baseRegOffset dflags (FloatReg  5)       = oFFSET_StgRegTable_rF5 dflags-baseRegOffset dflags (FloatReg  6)       = oFFSET_StgRegTable_rF6 dflags-baseRegOffset _      (FloatReg  n)       = panic ("Registers above F6 are not supported (tried to use F" ++ show n ++ ")")-baseRegOffset dflags (DoubleReg 1)       = oFFSET_StgRegTable_rD1 dflags-baseRegOffset dflags (DoubleReg 2)       = oFFSET_StgRegTable_rD2 dflags-baseRegOffset dflags (DoubleReg 3)       = oFFSET_StgRegTable_rD3 dflags-baseRegOffset dflags (DoubleReg 4)       = oFFSET_StgRegTable_rD4 dflags-baseRegOffset dflags (DoubleReg 5)       = oFFSET_StgRegTable_rD5 dflags-baseRegOffset dflags (DoubleReg 6)       = oFFSET_StgRegTable_rD6 dflags-baseRegOffset _      (DoubleReg n)       = panic ("Registers above D6 are not supported (tried to use D" ++ show n ++ ")")-baseRegOffset dflags (XmmReg 1)          = oFFSET_StgRegTable_rXMM1 dflags-baseRegOffset dflags (XmmReg 2)          = oFFSET_StgRegTable_rXMM2 dflags-baseRegOffset dflags (XmmReg 3)          = oFFSET_StgRegTable_rXMM3 dflags-baseRegOffset dflags (XmmReg 4)          = oFFSET_StgRegTable_rXMM4 dflags-baseRegOffset dflags (XmmReg 5)          = oFFSET_StgRegTable_rXMM5 dflags-baseRegOffset dflags (XmmReg 6)          = oFFSET_StgRegTable_rXMM6 dflags-baseRegOffset _      (XmmReg n)          = panic ("Registers above XMM6 are not supported (tried to use XMM" ++ show n ++ ")")-baseRegOffset dflags (YmmReg 1)          = oFFSET_StgRegTable_rYMM1 dflags-baseRegOffset dflags (YmmReg 2)          = oFFSET_StgRegTable_rYMM2 dflags-baseRegOffset dflags (YmmReg 3)          = oFFSET_StgRegTable_rYMM3 dflags-baseRegOffset dflags (YmmReg 4)          = oFFSET_StgRegTable_rYMM4 dflags-baseRegOffset dflags (YmmReg 5)          = oFFSET_StgRegTable_rYMM5 dflags-baseRegOffset dflags (YmmReg 6)          = oFFSET_StgRegTable_rYMM6 dflags-baseRegOffset _      (YmmReg n)          = panic ("Registers above YMM6 are not supported (tried to use YMM" ++ show n ++ ")")-baseRegOffset dflags (ZmmReg 1)          = oFFSET_StgRegTable_rZMM1 dflags-baseRegOffset dflags (ZmmReg 2)          = oFFSET_StgRegTable_rZMM2 dflags-baseRegOffset dflags (ZmmReg 3)          = oFFSET_StgRegTable_rZMM3 dflags-baseRegOffset dflags (ZmmReg 4)          = oFFSET_StgRegTable_rZMM4 dflags-baseRegOffset dflags (ZmmReg 5)          = oFFSET_StgRegTable_rZMM5 dflags-baseRegOffset dflags (ZmmReg 6)          = oFFSET_StgRegTable_rZMM6 dflags-baseRegOffset _      (ZmmReg n)          = panic ("Registers above ZMM6 are not supported (tried to use ZMM" ++ show n ++ ")")-baseRegOffset dflags Sp                  = oFFSET_StgRegTable_rSp dflags-baseRegOffset dflags SpLim               = oFFSET_StgRegTable_rSpLim dflags-baseRegOffset dflags (LongReg 1)         = oFFSET_StgRegTable_rL1 dflags-baseRegOffset _      (LongReg n)         = panic ("Registers above L1 are not supported (tried to use L" ++ show n ++ ")")-baseRegOffset dflags Hp                  = oFFSET_StgRegTable_rHp dflags-baseRegOffset dflags HpLim               = oFFSET_StgRegTable_rHpLim dflags-baseRegOffset dflags CCCS                = oFFSET_StgRegTable_rCCCS dflags-baseRegOffset dflags CurrentTSO          = oFFSET_StgRegTable_rCurrentTSO dflags-baseRegOffset dflags CurrentNursery      = oFFSET_StgRegTable_rCurrentNursery dflags-baseRegOffset dflags HpAlloc             = oFFSET_StgRegTable_rHpAlloc dflags-baseRegOffset dflags EagerBlackholeInfo  = oFFSET_stgEagerBlackholeInfo dflags-baseRegOffset dflags GCEnter1            = oFFSET_stgGCEnter1 dflags-baseRegOffset dflags GCFun               = oFFSET_stgGCFun dflags-baseRegOffset _      BaseReg             = panic "CgUtils.baseRegOffset:BaseReg"-baseRegOffset _      PicBaseReg          = panic "CgUtils.baseRegOffset:PicBaseReg"-baseRegOffset _      MachSp              = panic "CgUtils.baseRegOffset:MachSp"-baseRegOffset _      UnwindReturnReg     = panic "CgUtils.baseRegOffset:UnwindReturnReg"----- ----------------------------------------------------------------------------------- STG/Cmm GlobalReg------ --------------------------------------------------------------------------------- | We map STG registers onto appropriate CmmExprs.  Either they map--- to real machine registers or stored as offsets from BaseReg.  Given--- a GlobalReg, get_GlobalReg_addr always produces the--- register table address for it.-get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr-get_GlobalReg_addr dflags BaseReg = regTableOffset dflags 0-get_GlobalReg_addr dflags mid-    = get_Regtable_addr_from_offset dflags-                                    (globalRegType dflags mid) (baseRegOffset dflags mid)---- Calculate a literal representing an offset into the register table.--- Used when we don't have an actual BaseReg to offset from.-regTableOffset :: DynFlags -> Int -> CmmExpr-regTableOffset dflags n =-  CmmLit (CmmLabelOff mkMainCapabilityLabel (oFFSET_Capability_r dflags + n))--get_Regtable_addr_from_offset :: DynFlags -> CmmType -> Int -> CmmExpr-get_Regtable_addr_from_offset dflags _ offset =-    if haveRegBase (targetPlatform dflags)-    then CmmRegOff baseReg offset-    else regTableOffset dflags offset---- | Fixup global registers so that they assign to locations within the--- RegTable if they aren't pinned for the current target.-fixStgRegisters :: DynFlags -> RawCmmDecl -> RawCmmDecl-fixStgRegisters _ top@(CmmData _ _) = top--fixStgRegisters dflags (CmmProc info lbl live graph) =-  let graph' = modifyGraph (mapGraphBlocks (fixStgRegBlock dflags)) graph-  in CmmProc info lbl live graph'--fixStgRegBlock :: DynFlags -> Block CmmNode e x -> Block CmmNode e x-fixStgRegBlock dflags block = mapBlock (fixStgRegStmt dflags) block--fixStgRegStmt :: DynFlags -> CmmNode e x -> CmmNode e x-fixStgRegStmt dflags stmt = fixAssign $ mapExpDeep fixExpr stmt-  where-    platform = targetPlatform dflags--    fixAssign stmt =-      case stmt of-        CmmAssign (CmmGlobal reg) src-          -- MachSp isn't an STG register; it's merely here for tracking unwind-          -- information-          | reg == MachSp -> stmt-          | otherwise ->-            let baseAddr = get_GlobalReg_addr dflags reg-            in case reg `elem` activeStgRegs (targetPlatform dflags) of-                True  -> CmmAssign (CmmGlobal reg) src-                False -> CmmStore baseAddr src-        other_stmt -> other_stmt--    fixExpr expr = case expr of-        -- MachSp isn't an STG; it's merely here for tracking unwind information-        CmmReg (CmmGlobal MachSp) -> expr-        CmmReg (CmmGlobal reg) ->-            -- Replace register leaves with appropriate StixTrees for-            -- the given target.  MagicIds which map to a reg on this-            -- arch are left unchanged.  For the rest, BaseReg is taken-            -- to mean the address of the reg table in MainCapability,-            -- and for all others we generate an indirection to its-            -- location in the register table.-            case reg `elem` activeStgRegs platform of-                True  -> expr-                False ->-                    let baseAddr = get_GlobalReg_addr dflags reg-                    in case reg of-                        BaseReg -> baseAddr-                        _other  -> CmmLoad baseAddr (globalRegType dflags reg)--        CmmRegOff (CmmGlobal reg) offset ->-            -- RegOf leaves are just a shorthand form. If the reg maps-            -- to a real reg, we keep the shorthand, otherwise, we just-            -- expand it and defer to the above code.-            case reg `elem` activeStgRegs platform of-                True  -> expr-                False -> CmmMachOp (MO_Add (wordWidth dflags)) [-                                    fixExpr (CmmReg (CmmGlobal reg)),-                                    CmmLit (CmmInt (fromIntegral offset)-                                                   (wordWidth dflags))]--        other_expr -> other_expr-
− codeGen/CodeGen/Platform.hs
@@ -1,107 +0,0 @@--module CodeGen.Platform-       (callerSaves, activeStgRegs, haveRegBase, globalRegMaybe, freeReg)-       where--import GhcPrelude--import CmmExpr-import Platform-import Reg--import qualified CodeGen.Platform.ARM        as ARM-import qualified CodeGen.Platform.ARM64      as ARM64-import qualified CodeGen.Platform.PPC        as PPC-import qualified CodeGen.Platform.SPARC      as SPARC-import qualified CodeGen.Platform.X86        as X86-import qualified CodeGen.Platform.X86_64     as X86_64-import qualified CodeGen.Platform.NoRegs     as NoRegs---- | Returns 'True' if this global register is stored in a caller-saves--- machine register.--callerSaves :: Platform -> GlobalReg -> Bool-callerSaves platform- | platformUnregisterised platform = NoRegs.callerSaves- | otherwise- = case platformArch platform of-   ArchX86    -> X86.callerSaves-   ArchX86_64 -> X86_64.callerSaves-   ArchSPARC  -> SPARC.callerSaves-   ArchARM {} -> ARM.callerSaves-   ArchARM64  -> ARM64.callerSaves-   arch-    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->-        PPC.callerSaves--    | otherwise -> NoRegs.callerSaves---- | Here is where the STG register map is defined for each target arch.--- The order matters (for the llvm backend anyway)! We must make sure to--- maintain the order here with the order used in the LLVM calling conventions.--- Note that also, this isn't all registers, just the ones that are currently--- possbily mapped to real registers.-activeStgRegs :: Platform -> [GlobalReg]-activeStgRegs platform- | platformUnregisterised platform = NoRegs.activeStgRegs- | otherwise- = case platformArch platform of-   ArchX86    -> X86.activeStgRegs-   ArchX86_64 -> X86_64.activeStgRegs-   ArchSPARC  -> SPARC.activeStgRegs-   ArchARM {} -> ARM.activeStgRegs-   ArchARM64  -> ARM64.activeStgRegs-   arch-    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->-        PPC.activeStgRegs--    | otherwise -> NoRegs.activeStgRegs--haveRegBase :: Platform -> Bool-haveRegBase platform- | platformUnregisterised platform = NoRegs.haveRegBase- | otherwise- = case platformArch platform of-   ArchX86    -> X86.haveRegBase-   ArchX86_64 -> X86_64.haveRegBase-   ArchSPARC  -> SPARC.haveRegBase-   ArchARM {} -> ARM.haveRegBase-   ArchARM64  -> ARM64.haveRegBase-   arch-    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->-        PPC.haveRegBase--    | otherwise -> NoRegs.haveRegBase--globalRegMaybe :: Platform -> GlobalReg -> Maybe RealReg-globalRegMaybe platform- | platformUnregisterised platform = NoRegs.globalRegMaybe- | otherwise- = case platformArch platform of-   ArchX86    -> X86.globalRegMaybe-   ArchX86_64 -> X86_64.globalRegMaybe-   ArchSPARC  -> SPARC.globalRegMaybe-   ArchARM {} -> ARM.globalRegMaybe-   ArchARM64  -> ARM64.globalRegMaybe-   arch-    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->-        PPC.globalRegMaybe--    | otherwise -> NoRegs.globalRegMaybe--freeReg :: Platform -> RegNo -> Bool-freeReg platform- | platformUnregisterised platform = NoRegs.freeReg- | otherwise- = case platformArch platform of-   ArchX86    -> X86.freeReg-   ArchX86_64 -> X86_64.freeReg-   ArchSPARC  -> SPARC.freeReg-   ArchARM {} -> ARM.freeReg-   ArchARM64  -> ARM64.freeReg-   arch-    | arch `elem` [ArchPPC, ArchPPC_64 ELF_V1, ArchPPC_64 ELF_V2] ->-        PPC.freeReg--    | otherwise -> NoRegs.freeReg-
− codeGen/CodeGen/Platform/ARM.hs
@@ -1,10 +0,0 @@-{-# LANGUAGE CPP #-}--module CodeGen.Platform.ARM where--import GhcPrelude--#define MACHREGS_NO_REGS 0-#define MACHREGS_arm 1-#include "CodeGen.Platform.hs"-
− codeGen/CodeGen/Platform/ARM64.hs
@@ -1,10 +0,0 @@-{-# LANGUAGE CPP #-}--module CodeGen.Platform.ARM64 where--import GhcPrelude--#define MACHREGS_NO_REGS 0-#define MACHREGS_aarch64 1-#include "CodeGen.Platform.hs"-
− codeGen/CodeGen/Platform/NoRegs.hs
@@ -1,9 +0,0 @@-{-# LANGUAGE CPP #-}--module CodeGen.Platform.NoRegs where--import GhcPrelude--#define MACHREGS_NO_REGS 1-#include "CodeGen.Platform.hs"-
− codeGen/CodeGen/Platform/PPC.hs
@@ -1,10 +0,0 @@-{-# LANGUAGE CPP #-}--module CodeGen.Platform.PPC where--import GhcPrelude--#define MACHREGS_NO_REGS 0-#define MACHREGS_powerpc 1-#include "CodeGen.Platform.hs"-
− codeGen/CodeGen/Platform/SPARC.hs
@@ -1,10 +0,0 @@-{-# LANGUAGE CPP #-}--module CodeGen.Platform.SPARC where--import GhcPrelude--#define MACHREGS_NO_REGS 0-#define MACHREGS_sparc 1-#include "CodeGen.Platform.hs"-
− codeGen/CodeGen/Platform/X86.hs
@@ -1,10 +0,0 @@-{-# LANGUAGE CPP #-}--module CodeGen.Platform.X86 where--import GhcPrelude--#define MACHREGS_NO_REGS 0-#define MACHREGS_i386 1-#include "CodeGen.Platform.hs"-
− codeGen/CodeGen/Platform/X86_64.hs
@@ -1,10 +0,0 @@-{-# LANGUAGE CPP #-}--module CodeGen.Platform.X86_64 where--import GhcPrelude--#define MACHREGS_NO_REGS 0-#define MACHREGS_x86_64 1-#include "CodeGen.Platform.hs"-
− codeGen/StgCmm.hs
@@ -1,251 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE DataKinds #-}------------------------------------------------------------------------------------- Stg to C-- code generation------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmm ( codeGen ) where--#include "HsVersions.h"--import GhcPrelude as Prelude--import StgCmmProf (initCostCentres, ldvEnter)-import StgCmmMonad-import StgCmmEnv-import StgCmmBind-import StgCmmCon-import StgCmmLayout-import StgCmmUtils-import StgCmmClosure-import StgCmmHpc-import StgCmmTicky--import Cmm-import CmmUtils-import CLabel--import StgSyn-import DynFlags--import HscTypes-import CostCentre-import Id-import IdInfo-import RepType-import DataCon-import Name-import TyCon-import Module-import Outputable-import Stream-import BasicTypes-import VarSet ( isEmptyDVarSet )--import OrdList-import MkGraph--import qualified Data.ByteString as BS-import Data.IORef-import Control.Monad (when,void)-import Util--codeGen :: DynFlags-        -> Module-        -> [TyCon]-        -> CollectedCCs                -- (Local/global) cost-centres needing declaring/registering.-        -> [CgStgTopBinding]           -- Bindings to convert-        -> HpcInfo-        -> Stream IO CmmGroup ()       -- Output as a stream, so codegen can-                                       -- be interleaved with output--codeGen dflags this_mod data_tycons-        cost_centre_info stg_binds hpc_info-  = do  {     -- cg: run the code generator, and yield the resulting CmmGroup-              -- Using an IORef to store the state is a bit crude, but otherwise-              -- we would need to add a state monad layer.-        ; cgref <- liftIO $ newIORef =<< initC-        ; let cg :: FCode () -> Stream IO CmmGroup ()-              cg fcode = do-                cmm <- liftIO $ do-                         st <- readIORef cgref-                         let (a,st') = runC dflags this_mod st (getCmm fcode)--                         -- NB. stub-out cgs_tops and cgs_stmts.  This fixes-                         -- a big space leak.  DO NOT REMOVE!-                         writeIORef cgref $! st'{ cgs_tops = nilOL,-                                                  cgs_stmts = mkNop }-                         return a-                yield cmm--               -- Note [codegen-split-init] the cmm_init block must come-               -- FIRST.  This is because when -split-objs is on we need to-               -- combine this block with its initialisation routines; see-               -- Note [pipeline-split-init].-        ; cg (mkModuleInit cost_centre_info this_mod hpc_info)--        ; mapM_ (cg . cgTopBinding dflags) stg_binds--                -- Put datatype_stuff after code_stuff, because the-                -- datatype closure table (for enumeration types) to-                -- (say) PrelBase_True_closure, which is defined in-                -- code_stuff-        ; let do_tycon tycon = do-                -- Generate a table of static closures for an-                -- enumeration type Note that the closure pointers are-                -- tagged.-                 when (isEnumerationTyCon tycon) $ cg (cgEnumerationTyCon tycon)-                 mapM_ (cg . cgDataCon) (tyConDataCons tycon)--        ; mapM_ do_tycon data_tycons-        }--------------------------------------------------------------------      Top-level bindings------------------------------------------------------------------{- 'cgTopBinding' is only used for top-level bindings, since they need-to be allocated statically (not in the heap) and need to be labelled.-No unboxed bindings can happen at top level.--In the code below, the static bindings are accumulated in the-@MkCgState@, and transferred into the ``statics'' slot by @forkStatics@.-This is so that we can write the top level processing in a compositional-style, with the increasing static environment being plumbed as a state-variable. -}--cgTopBinding :: DynFlags -> CgStgTopBinding -> FCode ()-cgTopBinding dflags (StgTopLifted (StgNonRec id rhs))-  = do  { id' <- maybeExternaliseId dflags id-        ; let (info, fcode) = cgTopRhs dflags NonRecursive id' rhs-        ; fcode-        ; addBindC info -- Add the *un-externalised* Id to the envt,-                        -- so we find it when we look up occurrences-        }--cgTopBinding dflags (StgTopLifted (StgRec pairs))-  = do  { let (bndrs, rhss) = unzip pairs-        ; bndrs' <- Prelude.mapM (maybeExternaliseId dflags) bndrs-        ; let pairs' = zip bndrs' rhss-              r = unzipWith (cgTopRhs dflags Recursive) pairs'-              (infos, fcodes) = unzip r-        ; addBindsC infos-        ; sequence_ fcodes-        }--cgTopBinding dflags (StgTopStringLit id str)-  = do  { id' <- maybeExternaliseId dflags id-        ; let label = mkBytesLabel (idName id')-        ; let (lit, decl) = mkByteStringCLit label (BS.unpack str)-        ; emitDecl decl-        ; addBindC (litIdInfo dflags id' mkLFStringLit lit)-        }--cgTopRhs :: DynFlags -> RecFlag -> Id -> CgStgRhs -> (CgIdInfo, FCode ())-        -- The Id is passed along for setting up a binding...-        -- It's already been externalised if necessary--cgTopRhs dflags _rec bndr (StgRhsCon _cc con args)-  = cgTopRhsCon dflags bndr con (assertNonVoidStgArgs args)-      -- con args are always non-void,-      -- see Note [Post-unarisation invariants] in UnariseStg--cgTopRhs dflags rec bndr (StgRhsClosure fvs cc upd_flag args body)-  = ASSERT(isEmptyDVarSet fvs)    -- There should be no free variables-    cgTopRhsClosure dflags rec bndr cc upd_flag args body---------------------------------------------------------------------      Module initialisation code------------------------------------------------------------------mkModuleInit-        :: CollectedCCs         -- cost centre info-        -> Module-        -> HpcInfo-        -> FCode ()--mkModuleInit cost_centre_info this_mod hpc_info-  = do  { initHpc this_mod hpc_info-        ; initCostCentres cost_centre_info-        }---------------------------------------------------------------------      Generating static stuff for algebraic data types-------------------------------------------------------------------cgEnumerationTyCon :: TyCon -> FCode ()-cgEnumerationTyCon tycon-  = do dflags <- getDynFlags-       emitRODataLits (mkLocalClosureTableLabel (tyConName tycon) NoCafRefs)-             [ CmmLabelOff (mkLocalClosureLabel (dataConName con) NoCafRefs)-                           (tagForCon dflags con)-             | con <- tyConDataCons tycon]---cgDataCon :: DataCon -> FCode ()--- Generate the entry code, info tables, and (for niladic constructor)--- the static closure, for a constructor.-cgDataCon data_con-  = do  { dflags <- getDynFlags-        ; let-            (tot_wds, --  #ptr_wds + #nonptr_wds-             ptr_wds) --  #ptr_wds-              = mkVirtConstrSizes dflags arg_reps--            nonptr_wds   = tot_wds - ptr_wds--            dyn_info_tbl =-              mkDataConInfoTable dflags data_con False ptr_wds nonptr_wds--            -- We're generating info tables, so we don't know and care about-            -- what the actual arguments are. Using () here as the place holder.-            arg_reps :: [NonVoid PrimRep]-            arg_reps = [ NonVoid rep_ty-                       | ty <- dataConRepArgTys data_con-                       , rep_ty <- typePrimRep ty-                       , not (isVoidRep rep_ty) ]--        ; emitClosureAndInfoTable dyn_info_tbl NativeDirectCall [] $-            -- NB: the closure pointer is assumed *untagged* on-            -- entry to a constructor.  If the pointer is tagged,-            -- then we should not be entering it.  This assumption-            -- is used in ldvEnter and when tagging the pointer to-            -- return it.-            -- NB 2: We don't set CC when entering data (WDP 94/06)-            do { tickyEnterDynCon-               ; ldvEnter (CmmReg nodeReg)-               ; tickyReturnOldCon (length arg_reps)-               ; void $ emitReturn [cmmOffsetB dflags (CmmReg nodeReg) (tagForCon dflags data_con)]-               }-                    -- The case continuation code expects a tagged pointer-        }--------------------------------------------------------------------      Stuff to support splitting------------------------------------------------------------------maybeExternaliseId :: DynFlags -> Id -> FCode Id-maybeExternaliseId dflags id-  | gopt Opt_SplitObjs dflags,  -- See Note [Externalise when splitting]-                                -- in StgCmmMonad-    isInternalName name = do { mod <- getModuleName-                             ; return (setIdName id (externalise mod)) }-  | otherwise           = return id-  where-    externalise mod = mkExternalName uniq mod new_occ loc-    name    = idName id-    uniq    = nameUnique name-    new_occ = mkLocalOcc uniq (nameOccName name)-    loc     = nameSrcSpan name-        -- We want to conjure up a name that can't clash with any-        -- existing name.  So we generate-        --      Mod_$L243foo-        -- where 243 is the unique.
− codeGen/StgCmmArgRep.hs
@@ -1,158 +0,0 @@------------------------------------------------------------------------------------ Argument representations used in StgCmmLayout.------ (c) The University of Glasgow 2013-----------------------------------------------------------------------------------module StgCmmArgRep (-        ArgRep(..), toArgRep, argRepSizeW,--        argRepString, isNonV, idArgRep,--        slowCallPattern,--        ) where--import GhcPrelude--import StgCmmClosure    ( idPrimRep )--import SMRep            ( WordOff )-import Id               ( Id )-import TyCon            ( PrimRep(..), primElemRepSizeB )-import BasicTypes       ( RepArity )-import Constants        ( wORD64_SIZE )-import DynFlags--import Outputable-import FastString---- I extricated this code as this new module in order to avoid a--- cyclic dependency between StgCmmLayout and StgCmmTicky.------ NSF 18 Feb 2013------------------------------------------------------------------------------      Classifying arguments: ArgRep------------------------------------------------------------------------------ ArgRep is re-exported by StgCmmLayout, but only for use in the--- byte-code generator which also needs to know about the--- classification of arguments.--data ArgRep = P   -- GC Ptr-            | N   -- Word-sized non-ptr-            | L   -- 64-bit non-ptr (long)-            | V   -- Void-            | F   -- Float-            | D   -- Double-            | V16 -- 16-byte (128-bit) vectors of Float/Double/Int8/Word32/etc.-            | V32 -- 32-byte (256-bit) vectors of Float/Double/Int8/Word32/etc.-            | V64 -- 64-byte (512-bit) vectors of Float/Double/Int8/Word32/etc.-instance Outputable ArgRep where ppr = text . argRepString--argRepString :: ArgRep -> String-argRepString P = "P"-argRepString N = "N"-argRepString L = "L"-argRepString V = "V"-argRepString F = "F"-argRepString D = "D"-argRepString V16 = "V16"-argRepString V32 = "V32"-argRepString V64 = "V64"--toArgRep :: PrimRep -> ArgRep-toArgRep VoidRep           = V-toArgRep LiftedRep         = P-toArgRep UnliftedRep       = P-toArgRep IntRep            = N-toArgRep WordRep           = N-toArgRep Int8Rep           = N  -- Gets widened to native word width for calls-toArgRep Word8Rep          = N  -- Gets widened to native word width for calls-toArgRep Int16Rep          = N  -- Gets widened to native word width for calls-toArgRep Word16Rep         = N  -- Gets widened to native word width for calls-toArgRep AddrRep           = N-toArgRep Int64Rep          = L-toArgRep Word64Rep         = L-toArgRep FloatRep          = F-toArgRep DoubleRep         = D-toArgRep (VecRep len elem) = case len*primElemRepSizeB elem of-                               16 -> V16-                               32 -> V32-                               64 -> V64-                               _  -> error "toArgRep: bad vector primrep"--isNonV :: ArgRep -> Bool-isNonV V = False-isNonV _ = True--argRepSizeW :: DynFlags -> ArgRep -> WordOff                -- Size in words-argRepSizeW _      N   = 1-argRepSizeW _      P   = 1-argRepSizeW _      F   = 1-argRepSizeW dflags L   = wORD64_SIZE        `quot` wORD_SIZE dflags-argRepSizeW dflags D   = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags-argRepSizeW _      V   = 0-argRepSizeW dflags V16 = 16                 `quot` wORD_SIZE dflags-argRepSizeW dflags V32 = 32                 `quot` wORD_SIZE dflags-argRepSizeW dflags V64 = 64                 `quot` wORD_SIZE dflags--idArgRep :: Id -> ArgRep-idArgRep = toArgRep . idPrimRep---- This list of argument patterns should be kept in sync with at least--- the following:------  * StgCmmLayout.stdPattern maybe to some degree?------  * the RTS_RET(stg_ap_*) and RTS_FUN_DECL(stg_ap_*_fast)---  declarations in includes/stg/MiscClosures.h------  * the SLOW_CALL_*_ctr declarations in includes/stg/Ticky.h,------  * the TICK_SLOW_CALL_*() #defines in includes/Cmm.h,------  * the PR_CTR(SLOW_CALL_*_ctr) calls in rts/Ticky.c,------  * and the SymI_HasProto(stg_ap_*_{ret,info,fast}) calls and---  SymI_HasProto(SLOW_CALL_*_ctr) calls in rts/Linker.c------ There may be more places that I haven't found; I merely igrep'd for--- pppppp and excluded things that seemed ghci-specific.------ Also, it seems at the moment that ticky counters with void--- arguments will never be bumped, but I'm still declaring those--- counters, defensively.------ NSF 6 Mar 2013--slowCallPattern :: [ArgRep] -> (FastString, RepArity)--- Returns the generic apply function and arity------ The first batch of cases match (some) specialised entries--- The last group deals exhaustively with the cases for the first argument---   (and the zero-argument case)------ In 99% of cases this function will match *all* the arguments in one batch--slowCallPattern (P: P: P: P: P: P: _) = (fsLit "stg_ap_pppppp", 6)-slowCallPattern (P: P: P: P: P: _)    = (fsLit "stg_ap_ppppp", 5)-slowCallPattern (P: P: P: P: _)       = (fsLit "stg_ap_pppp", 4)-slowCallPattern (P: P: P: V: _)       = (fsLit "stg_ap_pppv", 4)-slowCallPattern (P: P: P: _)          = (fsLit "stg_ap_ppp", 3)-slowCallPattern (P: P: V: _)          = (fsLit "stg_ap_ppv", 3)-slowCallPattern (P: P: _)             = (fsLit "stg_ap_pp", 2)-slowCallPattern (P: V: _)             = (fsLit "stg_ap_pv", 2)-slowCallPattern (P: _)                = (fsLit "stg_ap_p", 1)-slowCallPattern (V: _)                = (fsLit "stg_ap_v", 1)-slowCallPattern (N: _)                = (fsLit "stg_ap_n", 1)-slowCallPattern (F: _)                = (fsLit "stg_ap_f", 1)-slowCallPattern (D: _)                = (fsLit "stg_ap_d", 1)-slowCallPattern (L: _)                = (fsLit "stg_ap_l", 1)-slowCallPattern (V16: _)              = (fsLit "stg_ap_v16", 1)-slowCallPattern (V32: _)              = (fsLit "stg_ap_v32", 1)-slowCallPattern (V64: _)              = (fsLit "stg_ap_v64", 1)-slowCallPattern []                    = (fsLit "stg_ap_0", 0)
− codeGen/StgCmmBind.hs
@@ -1,752 +0,0 @@------------------------------------------------------------------------------------ Stg to C-- code generation: bindings------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmBind (-        cgTopRhsClosure,-        cgBind,-        emitBlackHoleCode,-        pushUpdateFrame, emitUpdateFrame-  ) where--import GhcPrelude hiding ((<*>))--import StgCmmExpr-import StgCmmMonad-import StgCmmEnv-import StgCmmCon-import StgCmmHeap-import StgCmmProf (ldvEnterClosure, enterCostCentreFun, enterCostCentreThunk,-                   initUpdFrameProf)-import StgCmmTicky-import StgCmmLayout-import StgCmmUtils-import StgCmmClosure-import StgCmmForeign    (emitPrimCall)--import MkGraph-import CoreSyn          ( AltCon(..), tickishIsCode )-import BlockId-import SMRep-import Cmm-import CmmInfo-import CmmUtils-import CLabel-import StgSyn-import CostCentre-import Id-import IdInfo-import Name-import Module-import ListSetOps-import Util-import VarSet-import BasicTypes-import Outputable-import FastString-import DynFlags--import Control.Monad-----------------------------------------------------------------------------              Top-level bindings----------------------------------------------------------------------------- For closures bound at top level, allocate in static space.--- They should have no free variables.--cgTopRhsClosure :: DynFlags-                -> RecFlag              -- member of a recursive group?-                -> Id-                -> CostCentreStack      -- Optional cost centre annotation-                -> UpdateFlag-                -> [Id]                 -- Args-                -> CgStgExpr-                -> (CgIdInfo, FCode ())--cgTopRhsClosure dflags rec id ccs upd_flag args body =-  let closure_label = mkLocalClosureLabel (idName id) (idCafInfo id)-      cg_id_info    = litIdInfo dflags id lf_info (CmmLabel closure_label)-      lf_info       = mkClosureLFInfo dflags id TopLevel [] upd_flag args-  in (cg_id_info, gen_code dflags lf_info closure_label)-  where-  -- special case for a indirection (f = g).  We create an IND_STATIC-  -- closure pointing directly to the indirectee.  This is exactly-  -- what the CAF will eventually evaluate to anyway, we're just-  -- shortcutting the whole process, and generating a lot less code-  -- (#7308)-  ---  -- Note: we omit the optimisation when this binding is part of a-  -- recursive group, because the optimisation would inhibit the black-  -- hole detection from working in that case.  Test-  -- concurrent/should_run/4030 fails, for instance.-  ---  gen_code dflags _ closure_label-    | StgApp f [] <- body, null args, isNonRec rec-    = do-         cg_info <- getCgIdInfo f-         let closure_rep   = mkStaticClosureFields dflags-                                    indStaticInfoTable ccs MayHaveCafRefs-                                    [unLit (idInfoToAmode cg_info)]-         emitDataLits closure_label closure_rep-         return ()--  gen_code dflags lf_info _closure_label-   = do { let name = idName id-        ; mod_name <- getModuleName-        ; let descr         = closureDescription dflags mod_name name-              closure_info  = mkClosureInfo dflags True id lf_info 0 0 descr--        -- We don't generate the static closure here, because we might-        -- want to add references to static closures to it later.  The-        -- static closure is generated by CmmBuildInfoTables.updInfoSRTs,-        -- See Note [SRTs], specifically the [FUN] optimisation.--        ; let fv_details :: [(NonVoid Id, ByteOff)]-              header = if isLFThunk lf_info then ThunkHeader else StdHeader-              (_, _, fv_details) = mkVirtHeapOffsets dflags header []-        -- Don't drop the non-void args until the closure info has been made-        ; forkClosureBody (closureCodeBody True id closure_info ccs-                                (nonVoidIds args) (length args) body fv_details)--        ; return () }--  unLit (CmmLit l) = l-  unLit _ = panic "unLit"-----------------------------------------------------------------------------              Non-top-level bindings---------------------------------------------------------------------------cgBind :: CgStgBinding -> FCode ()-cgBind (StgNonRec name rhs)-  = do  { (info, fcode) <- cgRhs name rhs-        ; addBindC info-        ; init <- fcode-        ; emit init }-        -- init cannot be used in body, so slightly better to sink it eagerly--cgBind (StgRec pairs)-  = do  {  r <- sequence $ unzipWith cgRhs pairs-        ;  let (id_infos, fcodes) = unzip r-        ;  addBindsC id_infos-        ;  (inits, body) <- getCodeR $ sequence fcodes-        ;  emit (catAGraphs inits <*> body) }--{- Note [cgBind rec]--   Recursive let-bindings are tricky.-   Consider the following pseudocode:--     let x = \_ ->  ... y ...-         y = \_ ->  ... z ...-         z = \_ ->  ... x ...-     in ...--   For each binding, we need to allocate a closure, and each closure must-   capture the address of the other closures.-   We want to generate the following C-- code:-     // Initialization Code-     x = hp - 24; // heap address of x's closure-     y = hp - 40; // heap address of x's closure-     z = hp - 64; // heap address of x's closure-     // allocate and initialize x-     m[hp-8]   = ...-     m[hp-16]  = y       // the closure for x captures y-     m[hp-24] = x_info;-     // allocate and initialize y-     m[hp-32] = z;       // the closure for y captures z-     m[hp-40] = y_info;-     // allocate and initialize z-     ...--   For each closure, we must generate not only the code to allocate and-   initialize the closure itself, but also some initialization Code that-   sets a variable holding the closure pointer.--   We could generate a pair of the (init code, body code), but since-   the bindings are recursive we also have to initialise the-   environment with the CgIdInfo for all the bindings before compiling-   anything.  So we do this in 3 stages:--     1. collect all the CgIdInfos and initialise the environment-     2. compile each binding into (init, body) code-     3. emit all the inits, and then all the bodies--   We'd rather not have separate functions to do steps 1 and 2 for-   each binding, since in pratice they share a lot of code.  So we-   have just one function, cgRhs, that returns a pair of the CgIdInfo-   for step 1, and a monadic computation to generate the code in step-   2.--   The alternative to separating things in this way is to use a-   fixpoint.  That's what we used to do, but it introduces a-   maintenance nightmare because there is a subtle dependency on not-   being too strict everywhere.  Doing things this way means that the-   FCode monad can be strict, for example.- -}--cgRhs :: Id-      -> CgStgRhs-      -> FCode (-                 CgIdInfo         -- The info for this binding-               , FCode CmmAGraph  -- A computation which will generate the-                                  -- code for the binding, and return an-                                  -- assignent of the form "x = Hp - n"-                                  -- (see above)-               )--cgRhs id (StgRhsCon cc con args)-  = withNewTickyCounterCon (idName id) $-    buildDynCon id True cc con (assertNonVoidStgArgs args)-      -- con args are always non-void,-      -- see Note [Post-unarisation invariants] in UnariseStg--{- See Note [GC recovery] in compiler/codeGen/StgCmmClosure.hs -}-cgRhs id (StgRhsClosure fvs cc upd_flag args body)-  = do dflags <- getDynFlags-       mkRhsClosure dflags id cc (nonVoidIds (dVarSetElems fvs)) upd_flag args body-----------------------------------------------------------------------------              Non-constructor right hand sides---------------------------------------------------------------------------mkRhsClosure :: DynFlags -> Id -> CostCentreStack-             -> [NonVoid Id]                    -- Free vars-             -> UpdateFlag-             -> [Id]                            -- Args-             -> CgStgExpr-             -> FCode (CgIdInfo, FCode CmmAGraph)--{- mkRhsClosure looks for two special forms of the right-hand side:-        a) selector thunks-        b) AP thunks--If neither happens, it just calls mkClosureLFInfo.  You might think-that mkClosureLFInfo should do all this, but it seems wrong for the-latter to look at the structure of an expression--Note [Selectors]-~~~~~~~~~~~~~~~~-We look at the body of the closure to see if it's a selector---turgid,-but nothing deep.  We are looking for a closure of {\em exactly} the-form:--...  = [the_fv] \ u [] ->-         case the_fv of-           con a_1 ... a_n -> a_i--Note [Ap thunks]-~~~~~~~~~~~~~~~~-A more generic AP thunk of the form--        x = [ x_1...x_n ] \.. [] -> x_1 ... x_n--A set of these is compiled statically into the RTS, so we just use-those.  We could extend the idea to thunks where some of the x_i are-global ids (and hence not free variables), but this would entail-generating a larger thunk.  It might be an option for non-optimising-compilation, though.--We only generate an Ap thunk if all the free variables are pointers,-for semi-obvious reasons.---}------------ Note [Selectors] -------------------mkRhsClosure    dflags bndr _cc-                [NonVoid the_fv]                -- Just one free var-                upd_flag                -- Updatable thunk-                []                      -- A thunk-                expr-  | let strip = snd . stripStgTicksTop (not . tickishIsCode)-  , StgCase (StgApp scrutinee [{-no args-}])-         _   -- ignore bndr-         (AlgAlt _)-         [(DataAlt _, params, sel_expr)] <- strip expr-  , StgApp selectee [{-no args-}] <- strip sel_expr-  , the_fv == scrutinee                -- Scrutinee is the only free variable--  , let (_, _, params_w_offsets) = mkVirtConstrOffsets dflags (addIdReps (assertNonVoidIds params))-                                   -- pattern binders are always non-void,-                                   -- see Note [Post-unarisation invariants] in UnariseStg-  , Just the_offset <- assocMaybe params_w_offsets (NonVoid selectee)--  , let offset_into_int = bytesToWordsRoundUp dflags the_offset-                          - fixedHdrSizeW dflags-  , offset_into_int <= mAX_SPEC_SELECTEE_SIZE dflags -- Offset is small enough-  = -- NOT TRUE: ASSERT(is_single_constructor)-    -- The simplifier may have statically determined that the single alternative-    -- is the only possible case and eliminated the others, even if there are-    -- other constructors in the datatype.  It's still ok to make a selector-    -- thunk in this case, because we *know* which constructor the scrutinee-    -- will evaluate to.-    ---    -- srt is discarded; it must be empty-    let lf_info = mkSelectorLFInfo bndr offset_into_int (isUpdatable upd_flag)-    in cgRhsStdThunk bndr lf_info [StgVarArg the_fv]------------ Note [Ap thunks] -------------------mkRhsClosure    dflags bndr _cc-                fvs-                upd_flag-                []                      -- No args; a thunk-                (StgApp fun_id args)--  -- We are looking for an "ApThunk"; see data con ApThunk in StgCmmClosure-  -- of form (x1 x2 .... xn), where all the xi are locals (not top-level)-  -- So the xi will all be free variables-  | args `lengthIs` (n_fvs-1)  -- This happens only if the fun_id and-                               -- args are all distinct local variables-                               -- The "-1" is for fun_id-    -- Missed opportunity:   (f x x) is not detected-  , all (isGcPtrRep . idPrimRep . fromNonVoid) fvs-  , isUpdatable upd_flag-  , n_fvs <= mAX_SPEC_AP_SIZE dflags-  , not (gopt Opt_SccProfilingOn dflags)-                         -- not when profiling: we don't want to-                         -- lose information about this particular-                         -- thunk (e.g. its type) (#949)-  , idArity fun_id == unknownArity -- don't spoil a known call--          -- Ha! an Ap thunk-  = cgRhsStdThunk bndr lf_info payload--  where-    n_fvs   = length fvs-    lf_info = mkApLFInfo bndr upd_flag n_fvs-    -- the payload has to be in the correct order, hence we can't-    -- just use the fvs.-    payload = StgVarArg fun_id : args------------ Default case -------------------mkRhsClosure dflags bndr cc fvs upd_flag args body-  = do  { let lf_info = mkClosureLFInfo dflags bndr NotTopLevel fvs upd_flag args-        ; (id_info, reg) <- rhsIdInfo bndr lf_info-        ; return (id_info, gen_code lf_info reg) }- where- gen_code lf_info reg-  = do  {       -- LAY OUT THE OBJECT-        -- If the binder is itself a free variable, then don't store-        -- it in the closure.  Instead, just bind it to Node on entry.-        -- NB we can be sure that Node will point to it, because we-        -- haven't told mkClosureLFInfo about this; so if the binder-        -- _was_ a free var of its RHS, mkClosureLFInfo thinks it *is*-        -- stored in the closure itself, so it will make sure that-        -- Node points to it...-        ; let   reduced_fvs = filter (NonVoid bndr /=) fvs--        -- MAKE CLOSURE INFO FOR THIS CLOSURE-        ; mod_name <- getModuleName-        ; dflags <- getDynFlags-        ; let   name  = idName bndr-                descr = closureDescription dflags mod_name name-                fv_details :: [(NonVoid Id, ByteOff)]-                header = if isLFThunk lf_info then ThunkHeader else StdHeader-                (tot_wds, ptr_wds, fv_details)-                   = mkVirtHeapOffsets dflags header (addIdReps reduced_fvs)-                closure_info = mkClosureInfo dflags False       -- Not static-                                             bndr lf_info tot_wds ptr_wds-                                             descr--        -- BUILD ITS INFO TABLE AND CODE-        ; forkClosureBody $-                -- forkClosureBody: (a) ensure that bindings in here are not seen elsewhere-                --                  (b) ignore Sequel from context; use empty Sequel-                -- And compile the body-                closureCodeBody False bndr closure_info cc (nonVoidIds args)-                                (length args) body fv_details--        -- BUILD THE OBJECT---      ; (use_cc, blame_cc) <- chooseDynCostCentres cc args body-        ; let use_cc = cccsExpr; blame_cc = cccsExpr-        ; emit (mkComment $ mkFastString "calling allocDynClosure")-        ; let toVarArg (NonVoid a, off) = (NonVoid (StgVarArg a), off)-        ; let info_tbl = mkCmmInfo closure_info bndr currentCCS-        ; hp_plus_n <- allocDynClosure (Just bndr) info_tbl lf_info use_cc blame_cc-                                         (map toVarArg fv_details)--        -- RETURN-        ; return (mkRhsInit dflags reg lf_info hp_plus_n) }----------------------------cgRhsStdThunk-        :: Id-        -> LambdaFormInfo-        -> [StgArg]             -- payload-        -> FCode (CgIdInfo, FCode CmmAGraph)--cgRhsStdThunk bndr lf_info payload- = do  { (id_info, reg) <- rhsIdInfo bndr lf_info-       ; return (id_info, gen_code reg)-       }- where- gen_code reg  -- AHA!  A STANDARD-FORM THUNK-  = withNewTickyCounterStdThunk (lfUpdatable lf_info) (idName bndr) $-    do-  {     -- LAY OUT THE OBJECT-    mod_name <- getModuleName-  ; dflags <- getDynFlags-  ; let header = if isLFThunk lf_info then ThunkHeader else StdHeader-        (tot_wds, ptr_wds, payload_w_offsets)-            = mkVirtHeapOffsets dflags header-                (addArgReps (nonVoidStgArgs payload))--        descr = closureDescription dflags mod_name (idName bndr)-        closure_info = mkClosureInfo dflags False       -- Not static-                                     bndr lf_info tot_wds ptr_wds-                                     descr----  ; (use_cc, blame_cc) <- chooseDynCostCentres cc [{- no args-}] body-  ; let use_cc = cccsExpr; blame_cc = cccsExpr---        -- BUILD THE OBJECT-  ; let info_tbl = mkCmmInfo closure_info bndr currentCCS-  ; hp_plus_n <- allocDynClosure (Just bndr) info_tbl lf_info-                                   use_cc blame_cc payload_w_offsets--        -- RETURN-  ; return (mkRhsInit dflags reg lf_info hp_plus_n) }---mkClosureLFInfo :: DynFlags-                -> Id           -- The binder-                -> TopLevelFlag -- True of top level-                -> [NonVoid Id] -- Free vars-                -> UpdateFlag   -- Update flag-                -> [Id]         -- Args-                -> LambdaFormInfo-mkClosureLFInfo dflags bndr top fvs upd_flag args-  | null args =-        mkLFThunk (idType bndr) top (map fromNonVoid fvs) upd_flag-  | otherwise =-        mkLFReEntrant top (map fromNonVoid fvs) args (mkArgDescr dflags args)------------------------------------------------------------------------------              The code for closures---------------------------------------------------------------------------closureCodeBody :: Bool            -- whether this is a top-level binding-                -> Id              -- the closure's name-                -> ClosureInfo     -- Lots of information about this closure-                -> CostCentreStack -- Optional cost centre attached to closure-                -> [NonVoid Id]    -- incoming args to the closure-                -> Int             -- arity, including void args-                -> CgStgExpr-                -> [(NonVoid Id, ByteOff)] -- the closure's free vars-                -> FCode ()--{- There are two main cases for the code for closures.--* If there are *no arguments*, then the closure is a thunk, and not in-  normal form. So it should set up an update frame (if it is-  shared). NB: Thunks cannot have a primitive type!--* If there is *at least one* argument, then this closure is in-  normal form, so there is no need to set up an update frame.--}--closureCodeBody top_lvl bndr cl_info cc _args arity body fv_details-  | arity == 0 -- No args i.e. thunk-  = withNewTickyCounterThunk-        (isStaticClosure cl_info)-        (closureUpdReqd cl_info)-        (closureName cl_info) $-    emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl [] $-      \(_, node, _) -> thunkCode cl_info fv_details cc node arity body-   where-     lf_info  = closureLFInfo cl_info-     info_tbl = mkCmmInfo cl_info bndr cc--closureCodeBody top_lvl bndr cl_info cc args arity body fv_details-  = -- Note: args may be [], if all args are Void-    withNewTickyCounterFun-        (closureSingleEntry cl_info)-        (closureName cl_info)-        args $ do {--        ; let-             lf_info  = closureLFInfo cl_info-             info_tbl = mkCmmInfo cl_info bndr cc--        -- Emit the main entry code-        ; emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl args $-            \(_offset, node, arg_regs) -> do-                -- Emit slow-entry code (for entering a closure through a PAP)-                { mkSlowEntryCode bndr cl_info arg_regs-                ; dflags <- getDynFlags-                ; let node_points = nodeMustPointToIt dflags lf_info-                      node' = if node_points then Just node else Nothing-                ; loop_header_id <- newBlockId-                -- Extend reader monad with information that-                -- self-recursive tail calls can be optimized into local-                -- jumps. See Note [Self-recursive tail calls] in StgCmmExpr.-                ; withSelfLoop (bndr, loop_header_id, arg_regs) $ do-                {-                -- Main payload-                ; entryHeapCheck cl_info node' arity arg_regs $ do-                { -- emit LDV code when profiling-                  when node_points (ldvEnterClosure cl_info (CmmLocal node))-                -- ticky after heap check to avoid double counting-                ; tickyEnterFun cl_info-                ; enterCostCentreFun cc-                    (CmmMachOp (mo_wordSub dflags)-                         [ CmmReg (CmmLocal node) -- See [NodeReg clobbered with loopification]-                         , mkIntExpr dflags (funTag dflags cl_info) ])-                ; fv_bindings <- mapM bind_fv fv_details-                -- Load free vars out of closure *after*-                -- heap check, to reduce live vars over check-                ; when node_points $ load_fvs node lf_info fv_bindings-                ; void $ cgExpr body-                }}}--  }---- Note [NodeReg clobbered with loopification]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ Previously we used to pass nodeReg (aka R1) here. With profiling, upon--- entering a closure, enterFunCCS was called with R1 passed to it. But since R1--- may get clobbered inside the body of a closure, and since a self-recursive--- tail call does not restore R1, a subsequent call to enterFunCCS received a--- possibly bogus value from R1. The solution is to not pass nodeReg (aka R1) to--- enterFunCCS. Instead, we pass node, the callee-saved temporary that stores--- the original value of R1. This way R1 may get modified but loopification will--- not care.---- A function closure pointer may be tagged, so we--- must take it into account when accessing the free variables.-bind_fv :: (NonVoid Id, ByteOff) -> FCode (LocalReg, ByteOff)-bind_fv (id, off) = do { reg <- rebindToReg id; return (reg, off) }--load_fvs :: LocalReg -> LambdaFormInfo -> [(LocalReg, ByteOff)] -> FCode ()-load_fvs node lf_info = mapM_ (\ (reg, off) ->-   do dflags <- getDynFlags-      let tag = lfDynTag dflags lf_info-      emit $ mkTaggedObjectLoad dflags reg node off tag)---------------------------------------------- The "slow entry" code for a function.  This entry point takes its--- arguments on the stack.  It loads the arguments into registers--- according to the calling convention, and jumps to the function's--- normal entry point.  The function's closure is assumed to be in--- R1/node.------ The slow entry point is used for unknown calls: eg. stg_PAP_entry--mkSlowEntryCode :: Id -> ClosureInfo -> [LocalReg] -> FCode ()--- If this function doesn't have a specialised ArgDescr, we need--- to generate the function's arg bitmap and slow-entry code.--- Here, we emit the slow-entry code.-mkSlowEntryCode bndr cl_info arg_regs -- function closure is already in `Node'-  | Just (_, ArgGen _) <- closureFunInfo cl_info-  = do dflags <- getDynFlags-       let node = idToReg dflags (NonVoid bndr)-           slow_lbl = closureSlowEntryLabel  cl_info-           fast_lbl = closureLocalEntryLabel dflags cl_info-           -- mkDirectJump does not clobber `Node' containing function closure-           jump = mkJump dflags NativeNodeCall-                                (mkLblExpr fast_lbl)-                                (map (CmmReg . CmmLocal) (node : arg_regs))-                                (initUpdFrameOff dflags)-       tscope <- getTickScope-       emitProcWithConvention Slow Nothing slow_lbl-         (node : arg_regs) (jump, tscope)-  | otherwise = return ()--------------------------------------------thunkCode :: ClosureInfo -> [(NonVoid Id, ByteOff)] -> CostCentreStack-          -> LocalReg -> Int -> CgStgExpr -> FCode ()-thunkCode cl_info fv_details _cc node arity body-  = do { dflags <- getDynFlags-       ; let node_points = nodeMustPointToIt dflags (closureLFInfo cl_info)-             node'       = if node_points then Just node else Nothing-        ; ldvEnterClosure cl_info (CmmLocal node) -- NB: Node always points when profiling--        -- Heap overflow check-        ; entryHeapCheck cl_info node' arity [] $ do-        { -- Overwrite with black hole if necessary-          -- but *after* the heap-overflow check-        ; tickyEnterThunk cl_info-        ; when (blackHoleOnEntry cl_info && node_points)-                (blackHoleIt node)--          -- Push update frame-        ; setupUpdate cl_info node $-            -- We only enter cc after setting up update so-            -- that cc of enclosing scope will be recorded-            -- in update frame CAF/DICT functions will be-            -- subsumed by this enclosing cc-            do { enterCostCentreThunk (CmmReg nodeReg)-               ; let lf_info = closureLFInfo cl_info-               ; fv_bindings <- mapM bind_fv fv_details-               ; load_fvs node lf_info fv_bindings-               ; void $ cgExpr body }}}------------------------------------------------------------------------------              Update and black-hole wrappers---------------------------------------------------------------------------blackHoleIt :: LocalReg -> FCode ()--- Only called for closures with no args--- Node points to the closure-blackHoleIt node_reg-  = emitBlackHoleCode (CmmReg (CmmLocal node_reg))--emitBlackHoleCode :: CmmExpr -> FCode ()-emitBlackHoleCode node = do-  dflags <- getDynFlags--  -- Eager blackholing is normally disabled, but can be turned on with-  -- -feager-blackholing.  When it is on, we replace the info pointer-  -- of the thunk with stg_EAGER_BLACKHOLE_info on entry.--  -- If we wanted to do eager blackholing with slop filling, we'd need-  -- to do it at the *end* of a basic block, otherwise we overwrite-  -- the free variables in the thunk that we still need.  We have a-  -- patch for this from Andy Cheadle, but not incorporated yet. --SDM-  -- [6/2004]-  ---  -- Previously, eager blackholing was enabled when ticky-ticky was-  -- on. But it didn't work, and it wasn't strictly necessary to bring-  -- back minimal ticky-ticky, so now EAGER_BLACKHOLING is-  -- unconditionally disabled. -- krc 1/2007--  -- Note the eager-blackholing check is here rather than in blackHoleOnEntry,-  -- because emitBlackHoleCode is called from CmmParse.--  let  eager_blackholing =  not (gopt Opt_SccProfilingOn dflags)-                         && gopt Opt_EagerBlackHoling dflags-             -- Profiling needs slop filling (to support LDV-             -- profiling), so currently eager blackholing doesn't-             -- work with profiling.--  when eager_blackholing $ do-    emitStore (cmmOffsetW dflags node (fixedHdrSizeW dflags)) currentTSOExpr-    -- See Note [Heap memory barriers] in SMP.h.-    emitPrimCall [] MO_WriteBarrier []-    emitStore node (CmmReg (CmmGlobal EagerBlackholeInfo))--setupUpdate :: ClosureInfo -> LocalReg -> FCode () -> FCode ()-        -- Nota Bene: this function does not change Node (even if it's a CAF),-        -- so that the cost centre in the original closure can still be-        -- extracted by a subsequent enterCostCentre-setupUpdate closure_info node body-  | not (lfUpdatable (closureLFInfo closure_info))-  = body--  | not (isStaticClosure closure_info)-  = if not (closureUpdReqd closure_info)-      then do tickyUpdateFrameOmitted; body-      else do-          tickyPushUpdateFrame-          dflags <- getDynFlags-          let-              bh = blackHoleOnEntry closure_info &&-                   not (gopt Opt_SccProfilingOn dflags) &&-                   gopt Opt_EagerBlackHoling dflags--              lbl | bh        = mkBHUpdInfoLabel-                  | otherwise = mkUpdInfoLabel--          pushUpdateFrame lbl (CmmReg (CmmLocal node)) body--  | otherwise   -- A static closure-  = do  { tickyUpdateBhCaf closure_info--        ; if closureUpdReqd closure_info-          then do       -- Blackhole the (updatable) CAF:-                { upd_closure <- link_caf node True-                ; pushUpdateFrame mkBHUpdInfoLabel upd_closure body }-          else do {tickyUpdateFrameOmitted; body}-    }---------------------------------------------------------------------------------- Setting up update frames---- Push the update frame on the stack in the Entry area,--- leaving room for the return address that is already--- at the old end of the area.----pushUpdateFrame :: CLabel -> CmmExpr -> FCode () -> FCode ()-pushUpdateFrame lbl updatee body-  = do-       updfr  <- getUpdFrameOff-       dflags <- getDynFlags-       let-           hdr         = fixedHdrSize dflags-           frame       = updfr + hdr + sIZEOF_StgUpdateFrame_NoHdr dflags-       ---       emitUpdateFrame dflags (CmmStackSlot Old frame) lbl updatee-       withUpdFrameOff frame body--emitUpdateFrame :: DynFlags -> CmmExpr -> CLabel -> CmmExpr -> FCode ()-emitUpdateFrame dflags frame lbl updatee = do-  let-           hdr         = fixedHdrSize dflags-           off_updatee = hdr + oFFSET_StgUpdateFrame_updatee dflags-  ---  emitStore frame (mkLblExpr lbl)-  emitStore (cmmOffset dflags frame off_updatee) updatee-  initUpdFrameProf frame---------------------------------------------------------------------------------- Entering a CAF------ See Note [CAF management] in rts/sm/Storage.c--link_caf :: LocalReg           -- pointer to the closure-         -> Bool               -- True <=> updatable, False <=> single-entry-         -> FCode CmmExpr      -- Returns amode for closure to be updated--- This function returns the address of the black hole, so it can be--- updated with the new value when available.-link_caf node _is_upd = do-  { dflags <- getDynFlags-        -- Call the RTS function newCAF, returning the newly-allocated-        -- blackhole indirection closure-  ; let newCAF_lbl = mkForeignLabel (fsLit "newCAF") Nothing-                                    ForeignLabelInExternalPackage IsFunction-  ; bh <- newTemp (bWord dflags)-  ; emitRtsCallGen [(bh,AddrHint)] newCAF_lbl-      [ (baseExpr,  AddrHint),-        (CmmReg (CmmLocal node), AddrHint) ]-      False--  -- see Note [atomic CAF entry] in rts/sm/Storage.c-  ; updfr  <- getUpdFrameOff-  ; let target = entryCode dflags (closureInfoPtr dflags (CmmReg (CmmLocal node)))-  ; emit =<< mkCmmIfThen-      (cmmEqWord dflags (CmmReg (CmmLocal bh)) (zeroExpr dflags))-        -- re-enter the CAF-       (mkJump dflags NativeNodeCall target [] updfr)--  ; return (CmmReg (CmmLocal bh)) }-----------------------------------------------------------------------------              Profiling----------------------------------------------------------------------------- For "global" data constructors the description is simply occurrence--- name of the data constructor itself.  Otherwise it is determined by--- @closureDescription@ from the let binding information.--closureDescription :: DynFlags-           -> Module            -- Module-                   -> Name              -- Id of closure binding-                   -> String-        -- Not called for StgRhsCon which have global info tables built in-        -- CgConTbls.hs with a description generated from the data constructor-closureDescription dflags mod_name name-  = showSDocDump dflags (char '<' <>-                    (if isExternalName name-                      then ppr name -- ppr will include the module name prefix-                      else pprModule mod_name <> char '.' <> ppr name) <>-                    char '>')-   -- showSDocDump, because we want to see the unique on the Name.
− codeGen/StgCmmBind.hs-boot
@@ -1,6 +0,0 @@-module StgCmmBind where--import StgCmmMonad( FCode )-import StgSyn( CgStgBinding )--cgBind :: CgStgBinding -> FCode ()
− codeGen/StgCmmClosure.hs
@@ -1,999 +0,0 @@-{-# LANGUAGE CPP, RecordWildCards #-}------------------------------------------------------------------------------------- Stg to C-- code generation:------ The types   LambdaFormInfo---             ClosureInfo------ Nothing monadic in here!-----------------------------------------------------------------------------------module StgCmmClosure (-        DynTag,  tagForCon, isSmallFamily,--        idPrimRep, isVoidRep, isGcPtrRep, addIdReps, addArgReps,-        argPrimRep,--        NonVoid(..), fromNonVoid, nonVoidIds, nonVoidStgArgs,-        assertNonVoidIds, assertNonVoidStgArgs,--        -- * LambdaFormInfo-        LambdaFormInfo,         -- Abstract-        StandardFormInfo,        -- ...ditto...-        mkLFThunk, mkLFReEntrant, mkConLFInfo, mkSelectorLFInfo,-        mkApLFInfo, mkLFImported, mkLFArgument, mkLFLetNoEscape,-        mkLFStringLit,-        lfDynTag,-        isLFThunk, isLFReEntrant, lfUpdatable,--        -- * Used by other modules-        CgLoc(..), SelfLoopInfo, CallMethod(..),-        nodeMustPointToIt, isKnownFun, funTag, tagForArity, getCallMethod,--        -- * ClosureInfo-        ClosureInfo,-        mkClosureInfo,-        mkCmmInfo,--        -- ** Inspection-        closureLFInfo, closureName,--        -- ** Labels-        -- These just need the info table label-        closureInfoLabel, staticClosureLabel,-        closureSlowEntryLabel, closureLocalEntryLabel,--        -- ** Predicates-        -- These are really just functions on LambdaFormInfo-        closureUpdReqd, closureSingleEntry,-        closureReEntrant, closureFunInfo,-        isToplevClosure,--        blackHoleOnEntry,  -- Needs LambdaFormInfo and SMRep-        isStaticClosure,   -- Needs SMPre--        -- * InfoTables-        mkDataConInfoTable,-        cafBlackHoleInfoTable,-        indStaticInfoTable,-        staticClosureNeedsLink,-    ) where--#include "MachDeps.h"--#include "HsVersions.h"--import GhcPrelude--import StgSyn-import SMRep-import Cmm-import PprCmmExpr()--import CostCentre-import BlockId-import CLabel-import Id-import IdInfo-import DataCon-import Name-import Type-import TyCoRep-import TcType-import TyCon-import RepType-import BasicTypes-import Outputable-import DynFlags-import Util--import Data.Coerce (coerce)----------------------------------------------------------------------------------                Data types and synonyms---------------------------------------------------------------------------------- These data types are mostly used by other modules, especially StgCmmMonad,--- but we define them here because some functions in this module need to--- have access to them as well--data CgLoc-  = CmmLoc CmmExpr      -- A stable CmmExpr; that is, one not mentioning-                        -- Hp, so that it remains valid across calls--  | LneLoc BlockId [LocalReg]             -- A join point-        -- A join point (= let-no-escape) should only-        -- be tail-called, and in a saturated way.-        -- To tail-call it, assign to these locals,-        -- and branch to the block id--instance Outputable CgLoc where-  ppr (CmmLoc e)    = text "cmm" <+> ppr e-  ppr (LneLoc b rs) = text "lne" <+> ppr b <+> ppr rs--type SelfLoopInfo = (Id, BlockId, [LocalReg])---- used by ticky profiling-isKnownFun :: LambdaFormInfo -> Bool-isKnownFun LFReEntrant{} = True-isKnownFun LFLetNoEscape = True-isKnownFun _             = False-------------------------------------------        Non-void types----------------------------------------- We frequently need the invariant that an Id or a an argument--- is of a non-void type. This type is a witness to the invariant.--newtype NonVoid a = NonVoid a-  deriving (Eq, Show)--fromNonVoid :: NonVoid a -> a-fromNonVoid (NonVoid a) = a--instance (Outputable a) => Outputable (NonVoid a) where-  ppr (NonVoid a) = ppr a--nonVoidIds :: [Id] -> [NonVoid Id]-nonVoidIds ids = [NonVoid id | id <- ids, not (isVoidTy (idType id))]---- | Used in places where some invariant ensures that all these Ids are--- non-void; e.g. constructor field binders in case expressions.--- See Note [Post-unarisation invariants] in UnariseStg.-assertNonVoidIds :: [Id] -> [NonVoid Id]-assertNonVoidIds ids = ASSERT(not (any (isVoidTy . idType) ids))-                       coerce ids--nonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]-nonVoidStgArgs args = [NonVoid arg | arg <- args, not (isVoidTy (stgArgType arg))]---- | Used in places where some invariant ensures that all these arguments are--- non-void; e.g. constructor arguments.--- See Note [Post-unarisation invariants] in UnariseStg.-assertNonVoidStgArgs :: [StgArg] -> [NonVoid StgArg]-assertNonVoidStgArgs args = ASSERT(not (any (isVoidTy . stgArgType) args))-                            coerce args-----------------------------------------------------------------------------------                Representations---------------------------------------------------------------------------------- Why are these here?--idPrimRep :: Id -> PrimRep-idPrimRep id = typePrimRep1 (idType id)-    -- NB: typePrimRep1 fails on unboxed tuples,-    --     but by StgCmm no Ids have unboxed tuple type--addIdReps :: [NonVoid Id] -> [NonVoid (PrimRep, Id)]-addIdReps = map (\id -> let id' = fromNonVoid id-                         in NonVoid (idPrimRep id', id'))--addArgReps :: [NonVoid StgArg] -> [NonVoid (PrimRep, StgArg)]-addArgReps = map (\arg -> let arg' = fromNonVoid arg-                           in NonVoid (argPrimRep arg', arg'))--argPrimRep :: StgArg -> PrimRep-argPrimRep arg = typePrimRep1 (stgArgType arg)-----------------------------------------------------------------------------------                LambdaFormInfo---------------------------------------------------------------------------------- Information about an identifier, from the code generator's point of--- view.  Every identifier is bound to a LambdaFormInfo in the--- environment, which gives the code generator enough info to be able to--- tail call or return that identifier.--data LambdaFormInfo-  = LFReEntrant         -- Reentrant closure (a function)-        TopLevelFlag    -- True if top level-        OneShotInfo-        !RepArity       -- Arity. Invariant: always > 0-        !Bool           -- True <=> no fvs-        ArgDescr        -- Argument descriptor (should really be in ClosureInfo)--  | LFThunk             -- Thunk (zero arity)-        TopLevelFlag-        !Bool           -- True <=> no free vars-        !Bool           -- True <=> updatable (i.e., *not* single-entry)-        StandardFormInfo-        !Bool           -- True <=> *might* be a function type--  | LFCon               -- A saturated constructor application-        DataCon         -- The constructor--  | LFUnknown           -- Used for function arguments and imported things.-                        -- We know nothing about this closure.-                        -- Treat like updatable "LFThunk"...-                        -- Imported things which we *do* know something about use-                        -- one of the other LF constructors (eg LFReEntrant for-                        -- known functions)-        !Bool           -- True <=> *might* be a function type-                        --      The False case is good when we want to enter it,-                        --        because then we know the entry code will do-                        --        For a function, the entry code is the fast entry point--  | LFUnlifted          -- A value of unboxed type;-                        -- always a value, needs evaluation--  | LFLetNoEscape       -- See LetNoEscape module for precise description------------------------------- StandardFormInfo tells whether this thunk has one of--- a small number of standard forms--data StandardFormInfo-  = NonStandardThunk-        -- The usual case: not of the standard forms--  | SelectorThunk-        -- A SelectorThunk is of form-        --      case x of-        --           con a1,..,an -> ak-        -- and the constructor is from a single-constr type.-       WordOff          -- 0-origin offset of ak within the "goods" of-                        -- constructor (Recall that the a1,...,an may be laid-                        -- out in the heap in a non-obvious order.)--  | ApThunk-        -- An ApThunk is of form-        --        x1 ... xn-        -- The code for the thunk just pushes x2..xn on the stack and enters x1.-        -- There are a few of these (for 1 <= n <= MAX_SPEC_AP_SIZE) pre-compiled-        -- in the RTS to save space.-        RepArity                -- Arity, n------------------------------------------------------------                Building LambdaFormInfo---------------------------------------------------------mkLFArgument :: Id -> LambdaFormInfo-mkLFArgument id-  | isUnliftedType ty      = LFUnlifted-  | might_be_a_function ty = LFUnknown True-  | otherwise              = LFUnknown False-  where-    ty = idType id----------------mkLFLetNoEscape :: LambdaFormInfo-mkLFLetNoEscape = LFLetNoEscape----------------mkLFReEntrant :: TopLevelFlag    -- True of top level-              -> [Id]            -- Free vars-              -> [Id]            -- Args-              -> ArgDescr        -- Argument descriptor-              -> LambdaFormInfo--mkLFReEntrant _ _ [] _-  = pprPanic "mkLFReEntrant" empty-mkLFReEntrant top fvs args arg_descr-  = LFReEntrant top os_info (length args) (null fvs) arg_descr-  where os_info = idOneShotInfo (head args)----------------mkLFThunk :: Type -> TopLevelFlag -> [Id] -> UpdateFlag -> LambdaFormInfo-mkLFThunk thunk_ty top fvs upd_flag-  = ASSERT( not (isUpdatable upd_flag) || not (isUnliftedType thunk_ty) )-    LFThunk top (null fvs)-            (isUpdatable upd_flag)-            NonStandardThunk-            (might_be_a_function thunk_ty)-----------------might_be_a_function :: Type -> Bool--- Return False only if we are *sure* it's a data type--- Look through newtypes etc as much as poss-might_be_a_function ty-  | [LiftedRep] <- typePrimRep ty-  , Just tc <- tyConAppTyCon_maybe (unwrapType ty)-  , isDataTyCon tc-  = False-  | otherwise-  = True----------------mkConLFInfo :: DataCon -> LambdaFormInfo-mkConLFInfo con = LFCon con----------------mkSelectorLFInfo :: Id -> Int -> Bool -> LambdaFormInfo-mkSelectorLFInfo id offset updatable-  = LFThunk NotTopLevel False updatable (SelectorThunk offset)-        (might_be_a_function (idType id))----------------mkApLFInfo :: Id -> UpdateFlag -> Arity -> LambdaFormInfo-mkApLFInfo id upd_flag arity-  = LFThunk NotTopLevel (arity == 0) (isUpdatable upd_flag) (ApThunk arity)-        (might_be_a_function (idType id))----------------mkLFImported :: Id -> LambdaFormInfo-mkLFImported id-  | Just con <- isDataConWorkId_maybe id-  , isNullaryRepDataCon con-  = LFCon con   -- An imported nullary constructor-                -- We assume that the constructor is evaluated so that-                -- the id really does point directly to the constructor--  | arity > 0-  = LFReEntrant TopLevel noOneShotInfo arity True (panic "arg_descr")--  | otherwise-  = mkLFArgument id -- Not sure of exact arity-  where-    arity = idFunRepArity id----------------mkLFStringLit :: LambdaFormInfo-mkLFStringLit = LFUnlifted----------------------------------------------------------                Dynamic pointer tagging--------------------------------------------------------type DynTag = Int       -- The tag on a *pointer*-                        -- (from the dynamic-tagging paper)---- Note [Data constructor dynamic tags]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ The family size of a data type (the number of constructors--- or the arity of a function) can be either:---    * small, if the family size < 2**tag_bits---    * big, otherwise.------ Small families can have the constructor tag in the tag bits.--- Big families always use the tag values 1..mAX_PTR_TAG to represent--- evaluatedness, the last one lumping together all overflowing ones.--- We don't have very many tag bits: for example, we have 2 bits on--- x86-32 and 3 bits on x86-64.------ Also see Note [Tagging big families] in GHC.StgToCmm.Expr--isSmallFamily :: DynFlags -> Int -> Bool-isSmallFamily dflags fam_size = fam_size <= mAX_PTR_TAG dflags--tagForCon :: DynFlags -> DataCon -> DynTag-tagForCon dflags con = min (dataConTag con) (mAX_PTR_TAG dflags)--- NB: 1-indexed--tagForArity :: DynFlags -> RepArity -> DynTag-tagForArity dflags arity- | isSmallFamily dflags arity = arity- | otherwise                  = 0--lfDynTag :: DynFlags -> LambdaFormInfo -> DynTag--- Return the tag in the low order bits of a variable bound--- to this LambdaForm-lfDynTag dflags (LFCon con)                 = tagForCon dflags con-lfDynTag dflags (LFReEntrant _ _ arity _ _) = tagForArity dflags arity-lfDynTag _      _other                      = 0-----------------------------------------------------------------------------------                Observing LambdaFormInfo---------------------------------------------------------------------------------------------isLFThunk :: LambdaFormInfo -> Bool-isLFThunk (LFThunk {})  = True-isLFThunk _ = False--isLFReEntrant :: LambdaFormInfo -> Bool-isLFReEntrant (LFReEntrant {}) = True-isLFReEntrant _                = False----------------------------------------------------------------------------------                Choosing SM reps--------------------------------------------------------------------------------lfClosureType :: LambdaFormInfo -> ClosureTypeInfo-lfClosureType (LFReEntrant _ _ arity _ argd) = Fun arity argd-lfClosureType (LFCon con)                    = Constr (dataConTagZ con)-                                                      (dataConIdentity con)-lfClosureType (LFThunk _ _ _ is_sel _)       = thunkClosureType is_sel-lfClosureType _                              = panic "lfClosureType"--thunkClosureType :: StandardFormInfo -> ClosureTypeInfo-thunkClosureType (SelectorThunk off) = ThunkSelector off-thunkClosureType _                   = Thunk---- We *do* get non-updatable top-level thunks sometimes.  eg. f = g--- gets compiled to a jump to g (if g has non-zero arity), instead of--- messing around with update frames and PAPs.  We set the closure type--- to FUN_STATIC in this case.----------------------------------------------------------------------------------                nodeMustPointToIt--------------------------------------------------------------------------------nodeMustPointToIt :: DynFlags -> LambdaFormInfo -> Bool--- If nodeMustPointToIt is true, then the entry convention for--- this closure has R1 (the "Node" register) pointing to the--- closure itself --- the "self" argument--nodeMustPointToIt _ (LFReEntrant top _ _ no_fvs _)-  =  not no_fvs          -- Certainly if it has fvs we need to point to it-  || isNotTopLevel top   -- See Note [GC recovery]-        -- For lex_profiling we also access the cost centre for a-        -- non-inherited (i.e. non-top-level) function.-        -- The isNotTopLevel test above ensures this is ok.--nodeMustPointToIt dflags (LFThunk top no_fvs updatable NonStandardThunk _)-  =  not no_fvs            -- Self parameter-  || isNotTopLevel top     -- Note [GC recovery]-  || updatable             -- Need to push update frame-  || gopt Opt_SccProfilingOn dflags-          -- For the non-updatable (single-entry case):-          ---          -- True if has fvs (in which case we need access to them, and we-          --                    should black-hole it)-          -- or profiling (in which case we need to recover the cost centre-          --                 from inside it)  ToDo: do we need this even for-          --                                    top-level thunks? If not,-          --                                    isNotTopLevel subsumes this--nodeMustPointToIt _ (LFThunk {})        -- Node must point to a standard-form thunk-  = True--nodeMustPointToIt _ (LFCon _) = True--        -- Strictly speaking, the above two don't need Node to point-        -- to it if the arity = 0.  But this is a *really* unlikely-        -- situation.  If we know it's nil (say) and we are entering-        -- it. Eg: let x = [] in x then we will certainly have inlined-        -- x, since nil is a simple atom.  So we gain little by not-        -- having Node point to known zero-arity things.  On the other-        -- hand, we do lose something; Patrick's code for figuring out-        -- when something has been updated but not entered relies on-        -- having Node point to the result of an update.  SLPJ-        -- 27/11/92.--nodeMustPointToIt _ (LFUnknown _)   = True-nodeMustPointToIt _ LFUnlifted      = False-nodeMustPointToIt _ LFLetNoEscape   = False--{- Note [GC recovery]-~~~~~~~~~~~~~~~~~~~~~-If we a have a local let-binding (function or thunk)-   let f = <body> in ...-AND <body> allocates, then the heap-overflow check needs to know how-to re-start the evaluation.  It uses the "self" pointer to do this.-So even if there are no free variables in <body>, we still make-nodeMustPointToIt be True for non-top-level bindings.--Why do any such bindings exist?  After all, let-floating should have-floated them out.  Well, a clever optimiser might leave one there to-avoid a space leak, deliberately recomputing a thunk.  Also (and this-really does happen occasionally) let-floating may make a function f smaller-so it can be inlined, so now (f True) may generate a local no-fv closure.-This actually happened during bootstrapping GHC itself, with f=mkRdrFunBind-in TcGenDeriv.) -}----------------------------------------------------------------------------------                getCallMethod--------------------------------------------------------------------------------{- The entry conventions depend on the type of closure being entered,-whether or not it has free variables, and whether we're running-sequentially or in parallel.--Closure                           Node   Argument   Enter-Characteristics              Par   Req'd  Passing    Via-----------------------------------------------------------------------------Unknown                     & no  & yes & stack     & node-Known fun (>1 arg), no fvs  & no  & no  & registers & fast entry (enough args)-                                                    & slow entry (otherwise)-Known fun (>1 arg), fvs     & no  & yes & registers & fast entry (enough args)-0 arg, no fvs \r,\s         & no  & no  & n/a       & direct entry-0 arg, no fvs \u            & no  & yes & n/a       & node-0 arg, fvs \r,\s,selector   & no  & yes & n/a       & node-0 arg, fvs \r,\s            & no  & yes & n/a       & direct entry-0 arg, fvs \u               & no  & yes & n/a       & node-Unknown                     & yes & yes & stack     & node-Known fun (>1 arg), no fvs  & yes & no  & registers & fast entry (enough args)-                                                    & slow entry (otherwise)-Known fun (>1 arg), fvs     & yes & yes & registers & node-0 arg, fvs \r,\s,selector   & yes & yes & n/a       & node-0 arg, no fvs \r,\s         & yes & no  & n/a       & direct entry-0 arg, no fvs \u            & yes & yes & n/a       & node-0 arg, fvs \r,\s            & yes & yes & n/a       & node-0 arg, fvs \u               & yes & yes & n/a       & node--When black-holing, single-entry closures could also be entered via node-(rather than directly) to catch double-entry. -}--data CallMethod-  = EnterIt             -- No args, not a function--  | JumpToIt BlockId [LocalReg] -- A join point or a header of a local loop--  | ReturnIt            -- It's a value (function, unboxed value,-                        -- or constructor), so just return it.--  | SlowCall                -- Unknown fun, or known fun with-                        -- too few args.--  | DirectEntry         -- Jump directly, with args in regs-        CLabel          --   The code label-        RepArity        --   Its arity--getCallMethod :: DynFlags-              -> Name           -- Function being applied-              -> Id             -- Function Id used to chech if it can refer to-                                -- CAF's and whether the function is tail-calling-                                -- itself-              -> LambdaFormInfo -- Its info-              -> RepArity       -- Number of available arguments-              -> RepArity       -- Number of them being void arguments-              -> CgLoc          -- Passed in from cgIdApp so that we can-                                -- handle let-no-escape bindings and self-recursive-                                -- tail calls using the same data constructor,-                                -- JumpToIt. This saves us one case branch in-                                -- cgIdApp-              -> Maybe SelfLoopInfo -- can we perform a self-recursive tail call?-              -> CallMethod--getCallMethod dflags _ id _ n_args v_args _cg_loc-              (Just (self_loop_id, block_id, args))-  | gopt Opt_Loopification dflags-  , id == self_loop_id-  , args `lengthIs` (n_args - v_args)-  -- If these patterns match then we know that:-  --   * loopification optimisation is turned on-  --   * function is performing a self-recursive call in a tail position-  --   * number of non-void parameters of the function matches functions arity.-  -- See Note [Self-recursive tail calls] and Note [Void arguments in-  -- self-recursive tail calls] in StgCmmExpr for more details-  = JumpToIt block_id args--getCallMethod dflags name id (LFReEntrant _ _ arity _ _) n_args _v_args _cg_loc-              _self_loop_info-  | n_args == 0 -- No args at all-  && not (gopt Opt_SccProfilingOn dflags)-     -- See Note [Evaluating functions with profiling] in rts/Apply.cmm-  = ASSERT( arity /= 0 ) ReturnIt-  | n_args < arity = SlowCall        -- Not enough args-  | otherwise      = DirectEntry (enterIdLabel dflags name (idCafInfo id)) arity--getCallMethod _ _name _ LFUnlifted n_args _v_args _cg_loc _self_loop_info-  = ASSERT( n_args == 0 ) ReturnIt--getCallMethod _ _name _ (LFCon _) n_args _v_args _cg_loc _self_loop_info-  = ASSERT( n_args == 0 ) ReturnIt-    -- n_args=0 because it'd be ill-typed to apply a saturated-    --          constructor application to anything--getCallMethod dflags name id (LFThunk _ _ updatable std_form_info is_fun)-              n_args _v_args _cg_loc _self_loop_info-  | is_fun      -- it *might* be a function, so we must "call" it (which is always safe)-  = SlowCall    -- We cannot just enter it [in eval/apply, the entry code-                -- is the fast-entry code]--  -- Since is_fun is False, we are *definitely* looking at a data value-  | updatable || gopt Opt_Ticky dflags -- to catch double entry-      {- OLD: || opt_SMP-         I decided to remove this, because in SMP mode it doesn't matter-         if we enter the same thunk multiple times, so the optimisation-         of jumping directly to the entry code is still valid.  --SDM-        -}-  = EnterIt--  -- even a non-updatable selector thunk can be updated by the garbage-  -- collector, so we must enter it. (#8817)-  | SelectorThunk{} <- std_form_info-  = EnterIt--    -- We used to have ASSERT( n_args == 0 ), but actually it is-    -- possible for the optimiser to generate-    --   let bot :: Int = error Int "urk"-    --   in (bot `cast` unsafeCoerce Int (Int -> Int)) 3-    -- This happens as a result of the case-of-error transformation-    -- So the right thing to do is just to enter the thing--  | otherwise        -- Jump direct to code for single-entry thunks-  = ASSERT( n_args == 0 )-    DirectEntry (thunkEntryLabel dflags name (idCafInfo id) std_form_info-                updatable) 0--getCallMethod _ _name _ (LFUnknown True) _n_arg _v_args _cg_locs _self_loop_info-  = SlowCall -- might be a function--getCallMethod _ name _ (LFUnknown False) n_args _v_args _cg_loc _self_loop_info-  = ASSERT2( n_args == 0, ppr name <+> ppr n_args )-    EnterIt -- Not a function--getCallMethod _ _name _ LFLetNoEscape _n_args _v_args (LneLoc blk_id lne_regs)-              _self_loop_info-  = JumpToIt blk_id lne_regs--getCallMethod _ _ _ _ _ _ _ _ = panic "Unknown call method"----------------------------------------------------------------------------------              Data types for closure information---------------------------------------------------------------------------------{- ClosureInfo: information about a binding--   We make a ClosureInfo for each let binding (both top level and not),-   but not bindings for data constructors: for those we build a CmmInfoTable-   directly (see mkDataConInfoTable).--   To a first approximation:-       ClosureInfo = (LambdaFormInfo, CmmInfoTable)--   A ClosureInfo has enough information-     a) to construct the info table itself, and build other things-        related to the binding (e.g. slow entry points for a function)-     b) to allocate a closure containing that info pointer (i.e.-           it knows the info table label)--}--data ClosureInfo-  = ClosureInfo {-        closureName :: !Name,           -- The thing bound to this closure-           -- we don't really need this field: it's only used in generating-           -- code for ticky and profiling, and we could pass the information-           -- around separately, but it doesn't do much harm to keep it here.--        closureLFInfo :: !LambdaFormInfo, -- NOTE: not an LFCon-          -- this tells us about what the closure contains: it's right-hand-side.--          -- the rest is just an unpacked CmmInfoTable.-        closureInfoLabel :: !CLabel,-        closureSMRep     :: !SMRep,          -- representation used by storage mgr-        closureProf      :: !ProfilingInfo-    }---- | Convert from 'ClosureInfo' to 'CmmInfoTable'.-mkCmmInfo :: ClosureInfo -> Id -> CostCentreStack -> CmmInfoTable-mkCmmInfo ClosureInfo {..} id ccs-  = CmmInfoTable { cit_lbl  = closureInfoLabel-                 , cit_rep  = closureSMRep-                 , cit_prof = closureProf-                 , cit_srt  = Nothing-                 , cit_clo  = if isStaticRep closureSMRep-                                then Just (id,ccs)-                                else Nothing }-------------------------------------------        Building ClosureInfos-----------------------------------------mkClosureInfo :: DynFlags-              -> Bool                -- Is static-              -> Id-              -> LambdaFormInfo-              -> Int -> Int        -- Total and pointer words-              -> String         -- String descriptor-              -> ClosureInfo-mkClosureInfo dflags is_static id lf_info tot_wds ptr_wds val_descr-  = ClosureInfo { closureName      = name-                , closureLFInfo    = lf_info-                , closureInfoLabel = info_lbl   -- These three fields are-                , closureSMRep     = sm_rep     -- (almost) an info table-                , closureProf      = prof }     -- (we don't have an SRT yet)-  where-    name       = idName id-    sm_rep     = mkHeapRep dflags is_static ptr_wds nonptr_wds (lfClosureType lf_info)-    prof       = mkProfilingInfo dflags id val_descr-    nonptr_wds = tot_wds - ptr_wds--    info_lbl = mkClosureInfoTableLabel id lf_info-------------------------------------------   Other functions over ClosureInfo------------------------------------------- Eager blackholing is normally disabled, but can be turned on with--- -feager-blackholing.  When it is on, we replace the info pointer of--- the thunk with stg_EAGER_BLACKHOLE_info on entry.---- If we wanted to do eager blackholing with slop filling,--- we'd need to do it at the *end* of a basic block, otherwise--- we overwrite the free variables in the thunk that we still--- need.  We have a patch for this from Andy Cheadle, but not--- incorporated yet. --SDM [6/2004]------ Previously, eager blackholing was enabled when ticky-ticky--- was on. But it didn't work, and it wasn't strictly necessary--- to bring back minimal ticky-ticky, so now EAGER_BLACKHOLING--- is unconditionally disabled. -- krc 1/2007------ Static closures are never themselves black-holed.--blackHoleOnEntry :: ClosureInfo -> Bool-blackHoleOnEntry cl_info-  | isStaticRep (closureSMRep cl_info)-  = False        -- Never black-hole a static closure--  | otherwise-  = case closureLFInfo cl_info of-      LFReEntrant {}            -> False-      LFLetNoEscape             -> False-      LFThunk _ _no_fvs upd _ _ -> upd   -- See Note [Black-holing non-updatable thunks]-      _other -> panic "blackHoleOnEntry"--{- Note [Black-holing non-updatable thunks]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We must not black-hole non-updatable (single-entry) thunks otherwise-we run into issues like Trac #10414. Specifically:--  * There is no reason to black-hole a non-updatable thunk: it should-    not be competed for by multiple threads--  * It could, conceivably, cause a space leak if we don't black-hole-    it, if there was a live but never-followed pointer pointing to it.-    Let's hope that doesn't happen.--  * It is dangerous to black-hole a non-updatable thunk because-     - is not updated (of course)-     - hence, if it is black-holed and another thread tries to evaluate-       it, that thread will block forever-    This actually happened in Trac #10414.  So we do not black-hole-    non-updatable thunks.--  * How could two threads evaluate the same non-updatable (single-entry)-    thunk?  See Reid Barton's example below.--  * Only eager blackholing could possibly black-hole a non-updatable-    thunk, because lazy black-holing only affects thunks with an-    update frame on the stack.--Here is and example due to Reid Barton (Trac #10414):-    x = \u []  concat [[1], []]-with the following definitions,--    concat x = case x of-        []       -> []-        (:) x xs -> (++) x (concat xs)--    (++) xs ys = case xs of-        []         -> ys-        (:) x rest -> (:) x ((++) rest ys)--Where we use the syntax @\u []@ to denote an updatable thunk and @\s []@ to-denote a single-entry (i.e. non-updatable) thunk. After a thread evaluates @x@-to WHNF and calls @(++)@ the heap will contain the following thunks,--    x = 1 : y-    y = \u []  (++) [] z-    z = \s []  concat []--Now that the stage is set, consider the follow evaluations by two racing threads-A and B,--  1. Both threads enter @y@ before either is able to replace it with an-     indirection--  2. Thread A does the case analysis in @(++)@ and consequently enters @z@,-     replacing it with a black-hole--  3. At some later point thread B does the same case analysis and also attempts-     to enter @z@. However, it finds that it has been replaced with a black-hole-     so it blocks.--  4. Thread A eventually finishes evaluating @z@ (to @[]@) and updates @y@-     accordingly. It does *not* update @z@, however, as it is single-entry. This-     leaves Thread B blocked forever on a black-hole which will never be-     updated.--To avoid this sort of condition we never black-hole non-updatable thunks.--}--isStaticClosure :: ClosureInfo -> Bool-isStaticClosure cl_info = isStaticRep (closureSMRep cl_info)--closureUpdReqd :: ClosureInfo -> Bool-closureUpdReqd ClosureInfo{ closureLFInfo = lf_info } = lfUpdatable lf_info--lfUpdatable :: LambdaFormInfo -> Bool-lfUpdatable (LFThunk _ _ upd _ _)  = upd-lfUpdatable _ = False--closureSingleEntry :: ClosureInfo -> Bool-closureSingleEntry (ClosureInfo { closureLFInfo = LFThunk _ _ upd _ _}) = not upd-closureSingleEntry (ClosureInfo { closureLFInfo = LFReEntrant _ OneShotLam _ _ _}) = True-closureSingleEntry _ = False--closureReEntrant :: ClosureInfo -> Bool-closureReEntrant (ClosureInfo { closureLFInfo = LFReEntrant {} }) = True-closureReEntrant _ = False--closureFunInfo :: ClosureInfo -> Maybe (RepArity, ArgDescr)-closureFunInfo (ClosureInfo { closureLFInfo = lf_info }) = lfFunInfo lf_info--lfFunInfo :: LambdaFormInfo ->  Maybe (RepArity, ArgDescr)-lfFunInfo (LFReEntrant _ _ arity _ arg_desc)  = Just (arity, arg_desc)-lfFunInfo _                                   = Nothing--funTag :: DynFlags -> ClosureInfo -> DynTag-funTag dflags (ClosureInfo { closureLFInfo = lf_info })-    = lfDynTag dflags lf_info--isToplevClosure :: ClosureInfo -> Bool-isToplevClosure (ClosureInfo { closureLFInfo = lf_info })-  = case lf_info of-      LFReEntrant TopLevel _ _ _ _ -> True-      LFThunk TopLevel _ _ _ _     -> True-      _other                       -> False-------------------------------------------   Label generation-----------------------------------------staticClosureLabel :: ClosureInfo -> CLabel-staticClosureLabel = toClosureLbl .  closureInfoLabel--closureSlowEntryLabel :: ClosureInfo -> CLabel-closureSlowEntryLabel = toSlowEntryLbl . closureInfoLabel--closureLocalEntryLabel :: DynFlags -> ClosureInfo -> CLabel-closureLocalEntryLabel dflags-  | tablesNextToCode dflags = toInfoLbl  . closureInfoLabel-  | otherwise               = toEntryLbl . closureInfoLabel--mkClosureInfoTableLabel :: Id -> LambdaFormInfo -> CLabel-mkClosureInfoTableLabel id lf_info-  = case lf_info of-        LFThunk _ _ upd_flag (SelectorThunk offset) _-                      -> mkSelectorInfoLabel upd_flag offset--        LFThunk _ _ upd_flag (ApThunk arity) _-                      -> mkApInfoTableLabel upd_flag arity--        LFThunk{}     -> std_mk_lbl name cafs-        LFReEntrant{} -> std_mk_lbl name cafs-        _other        -> panic "closureInfoTableLabel"--  where-    name = idName id--    std_mk_lbl | is_local  = mkLocalInfoTableLabel-               | otherwise = mkInfoTableLabel--    cafs     = idCafInfo id-    is_local = isDataConWorkId id-       -- Make the _info pointer for the implicit datacon worker-       -- binding local. The reason we can do this is that importing-       -- code always either uses the _closure or _con_info. By the-       -- invariants in CorePrep anything else gets eta expanded.---thunkEntryLabel :: DynFlags -> Name -> CafInfo -> StandardFormInfo -> Bool -> CLabel--- thunkEntryLabel is a local help function, not exported.  It's used from--- getCallMethod.-thunkEntryLabel dflags _thunk_id _ (ApThunk arity) upd_flag-  = enterApLabel dflags upd_flag arity-thunkEntryLabel dflags _thunk_id _ (SelectorThunk offset) upd_flag-  = enterSelectorLabel dflags upd_flag offset-thunkEntryLabel dflags thunk_id c _ _-  = enterIdLabel dflags thunk_id c--enterApLabel :: DynFlags -> Bool -> Arity -> CLabel-enterApLabel dflags is_updatable arity-  | tablesNextToCode dflags = mkApInfoTableLabel is_updatable arity-  | otherwise               = mkApEntryLabel is_updatable arity--enterSelectorLabel :: DynFlags -> Bool -> WordOff -> CLabel-enterSelectorLabel dflags upd_flag offset-  | tablesNextToCode dflags = mkSelectorInfoLabel upd_flag offset-  | otherwise               = mkSelectorEntryLabel upd_flag offset--enterIdLabel :: DynFlags -> Name -> CafInfo -> CLabel-enterIdLabel dflags id c-  | tablesNextToCode dflags = mkInfoTableLabel id c-  | otherwise               = mkEntryLabel id c--------------------------------------------   Profiling------------------------------------------- Profiling requires two pieces of information to be determined for--- each closure's info table --- description and type.---- The description is stored directly in the @CClosureInfoTable@ when the--- info table is built.---- The type is determined from the type information stored with the @Id@--- in the closure info using @closureTypeDescr@.--mkProfilingInfo :: DynFlags -> Id -> String -> ProfilingInfo-mkProfilingInfo dflags id val_descr-  | not (gopt Opt_SccProfilingOn dflags) = NoProfilingInfo-  | otherwise = ProfilingInfo ty_descr_w8 val_descr_w8-  where-    ty_descr_w8  = stringToWord8s (getTyDescription (idType id))-    val_descr_w8 = stringToWord8s val_descr--getTyDescription :: Type -> String-getTyDescription ty-  = case (tcSplitSigmaTy ty) of { (_, _, tau_ty) ->-    case tau_ty of-      TyVarTy _              -> "*"-      AppTy fun _            -> getTyDescription fun-      TyConApp tycon _       -> getOccString tycon-      FunTy _ res            -> '-' : '>' : fun_result res-      ForAllTy _  ty         -> getTyDescription ty-      LitTy n                -> getTyLitDescription n-      CastTy ty _            -> getTyDescription ty-      CoercionTy co          -> pprPanic "getTyDescription" (ppr co)-    }-  where-    fun_result (FunTy _ res) = '>' : fun_result res-    fun_result other         = getTyDescription other--getTyLitDescription :: TyLit -> String-getTyLitDescription l =-  case l of-    NumTyLit n -> show n-    StrTyLit n -> show n-------------------------------------------   CmmInfoTable-related things-----------------------------------------mkDataConInfoTable :: DynFlags -> DataCon -> Bool -> Int -> Int -> CmmInfoTable-mkDataConInfoTable dflags data_con is_static ptr_wds nonptr_wds- = CmmInfoTable { cit_lbl  = info_lbl-                , cit_rep  = sm_rep-                , cit_prof = prof-                , cit_srt  = Nothing-                , cit_clo  = Nothing }- where-   name = dataConName data_con-   info_lbl = mkConInfoTableLabel name NoCafRefs-   sm_rep = mkHeapRep dflags is_static ptr_wds nonptr_wds cl_type-   cl_type = Constr (dataConTagZ data_con) (dataConIdentity data_con)-                  -- We keep the *zero-indexed* tag in the srt_len field-                  -- of the info table of a data constructor.--   prof | not (gopt Opt_SccProfilingOn dflags) = NoProfilingInfo-        | otherwise                            = ProfilingInfo ty_descr val_descr--   ty_descr  = stringToWord8s $ occNameString $ getOccName $ dataConTyCon data_con-   val_descr = stringToWord8s $ occNameString $ getOccName data_con---- We need a black-hole closure info to pass to @allocDynClosure@ when we--- want to allocate the black hole on entry to a CAF.--cafBlackHoleInfoTable :: CmmInfoTable-cafBlackHoleInfoTable-  = CmmInfoTable { cit_lbl  = mkCAFBlackHoleInfoTableLabel-                 , cit_rep  = blackHoleRep-                 , cit_prof = NoProfilingInfo-                 , cit_srt  = Nothing-                 , cit_clo  = Nothing }--indStaticInfoTable :: CmmInfoTable-indStaticInfoTable-  = CmmInfoTable { cit_lbl  = mkIndStaticInfoLabel-                 , cit_rep  = indStaticRep-                 , cit_prof = NoProfilingInfo-                 , cit_srt  = Nothing-                 , cit_clo  = Nothing }--staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool--- A static closure needs a link field to aid the GC when traversing--- the static closure graph.  But it only needs such a field if either---        a) it has an SRT---        b) it's a constructor with one or more pointer fields--- In case (b), the constructor's fields themselves play the role--- of the SRT.-staticClosureNeedsLink has_srt CmmInfoTable{ cit_rep = smrep }-  | isConRep smrep         = not (isStaticNoCafCon smrep)-  | otherwise              = has_srt
− codeGen/StgCmmCon.hs
@@ -1,285 +0,0 @@-{-# LANGUAGE CPP #-}------------------------------------------------------------------------------------- Stg to C--: code generation for constructors------ This module provides the support code for StgCmm to deal with with--- constructors on the RHSs of let(rec)s.------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmCon (-        cgTopRhsCon, buildDynCon, bindConArgs-    ) where--#include "HsVersions.h"--import GhcPrelude--import StgSyn-import CoreSyn  ( AltCon(..) )--import StgCmmMonad-import StgCmmEnv-import StgCmmHeap-import StgCmmLayout-import StgCmmUtils-import StgCmmClosure--import CmmExpr-import CmmUtils-import CLabel-import MkGraph-import SMRep-import CostCentre-import Module-import DataCon-import DynFlags-import FastString-import Id-import RepType (countConRepArgs)-import Literal-import PrelInfo-import Outputable-import Platform-import Util-import MonadUtils (mapMaybeM)--import Control.Monad-import Data.Char----------------------------------------------------------------------      Top-level constructors------------------------------------------------------------------cgTopRhsCon :: DynFlags-            -> Id               -- Name of thing bound to this RHS-            -> DataCon          -- Id-            -> [NonVoid StgArg] -- Args-            -> (CgIdInfo, FCode ())-cgTopRhsCon dflags id con args =-    let id_info = litIdInfo dflags id (mkConLFInfo con) (CmmLabel closure_label)-    in (id_info, gen_code)-  where-   name          = idName id-   caffy         = idCafInfo id -- any stgArgHasCafRefs args-   closure_label = mkClosureLabel name caffy--   gen_code =-     do { this_mod <- getModuleName-        ; when (platformOS (targetPlatform dflags) == OSMinGW32) $-              -- Windows DLLs have a problem with static cross-DLL refs.-              MASSERT( not (isDllConApp dflags this_mod con (map fromNonVoid args)) )-        ; ASSERT( args `lengthIs` countConRepArgs con ) return ()--        -- LAY IT OUT-        ; let-            (tot_wds, --  #ptr_wds + #nonptr_wds-             ptr_wds, --  #ptr_wds-             nv_args_w_offsets) =-                 mkVirtHeapOffsetsWithPadding dflags StdHeader (addArgReps args)--            mk_payload (Padding len _) = return (CmmInt 0 (widthFromBytes len))-            mk_payload (FieldOff arg _) = do-                amode <- getArgAmode arg-                case amode of-                  CmmLit lit -> return lit-                  _          -> panic "StgCmmCon.cgTopRhsCon"--            nonptr_wds = tot_wds - ptr_wds--             -- we're not really going to emit an info table, so having-             -- to make a CmmInfoTable is a bit overkill, but mkStaticClosureFields-             -- needs to poke around inside it.-            info_tbl = mkDataConInfoTable dflags con True ptr_wds nonptr_wds---        ; payload <- mapM mk_payload nv_args_w_offsets-                -- NB1: nv_args_w_offsets is sorted into ptrs then non-ptrs-                -- NB2: all the amodes should be Lits!-                --      TODO (osa): Why?--        ; let closure_rep = mkStaticClosureFields-                             dflags-                             info_tbl-                             dontCareCCS                -- Because it's static data-                             caffy                      -- Has CAF refs-                             payload--                -- BUILD THE OBJECT-        ; emitDataLits closure_label closure_rep--        ; return () }---------------------------------------------------------------------      Lay out and allocate non-top-level constructors------------------------------------------------------------------buildDynCon :: Id                 -- Name of the thing to which this constr will-                                  -- be bound-            -> Bool               -- is it genuinely bound to that name, or just-                                  -- for profiling?-            -> CostCentreStack    -- Where to grab cost centre from;-                                  -- current CCS if currentOrSubsumedCCS-            -> DataCon            -- The data constructor-            -> [NonVoid StgArg]   -- Its args-            -> FCode (CgIdInfo, FCode CmmAGraph)-               -- Return details about how to find it and initialization code-buildDynCon binder actually_bound cc con args-    = do dflags <- getDynFlags-         buildDynCon' dflags (targetPlatform dflags) binder actually_bound cc con args---buildDynCon' :: DynFlags-             -> Platform-             -> Id -> Bool-             -> CostCentreStack-             -> DataCon-             -> [NonVoid StgArg]-             -> FCode (CgIdInfo, FCode CmmAGraph)--{- We used to pass a boolean indicating whether all the-args were of size zero, so we could use a static-constructor; but I concluded that it just isn't worth it.-Now I/O uses unboxed tuples there just aren't any constructors-with all size-zero args.--The reason for having a separate argument, rather than looking at-the addr modes of the args is that we may be in a "knot", and-premature looking at the args will cause the compiler to black-hole!--}----------- buildDynCon': Nullary constructors ----------------- First we deal with the case of zero-arity constructors.  They--- will probably be unfolded, so we don't expect to see this case much,--- if at all, but it does no harm, and sets the scene for characters.------ In the case of zero-arity constructors, or, more accurately, those--- which have exclusively size-zero (VoidRep) args, we generate no code--- at all.--buildDynCon' dflags _ binder _ _cc con []-  | isNullaryRepDataCon con-  = return (litIdInfo dflags binder (mkConLFInfo con)-                (CmmLabel (mkClosureLabel (dataConName con) (idCafInfo binder))),-            return mkNop)---------- buildDynCon': Charlike and Intlike constructors ------------{- The following three paragraphs about @Char@-like and @Int@-like-closures are obsolete, but I don't understand the details well enough-to properly word them, sorry. I've changed the treatment of @Char@s to-be analogous to @Int@s: only a subset is preallocated, because @Char@-has now 31 bits. Only literals are handled here. -- Qrczak--Now for @Char@-like closures.  We generate an assignment of the-address of the closure to a temporary.  It would be possible simply to-generate no code, and record the addressing mode in the environment,-but we'd have to be careful if the argument wasn't a constant --- so-for simplicity we just always assign to a temporary.--Last special case: @Int@-like closures.  We only special-case the-situation in which the argument is a literal in the range-@mIN_INTLIKE@..@mAX_INTLILKE@.  NB: for @Char@-like closures we can-work with any old argument, but for @Int@-like ones the argument has-to be a literal.  Reason: @Char@ like closures have an argument type-which is guaranteed in range.--Because of this, we use can safely return an addressing mode.--We don't support this optimisation when compiling into Windows DLLs yet-because they don't support cross package data references well.--}--buildDynCon' dflags platform binder _ _cc con [arg]-  | maybeIntLikeCon con-  , platformOS platform /= OSMinGW32 || not (positionIndependent dflags)-  , NonVoid (StgLitArg (LitNumber LitNumInt val _)) <- arg-  , val <= fromIntegral (mAX_INTLIKE dflags) -- Comparisons at type Integer!-  , val >= fromIntegral (mIN_INTLIKE dflags) -- ...ditto...-  = do  { let intlike_lbl   = mkCmmClosureLabel rtsUnitId (fsLit "stg_INTLIKE")-              val_int = fromIntegral val :: Int-              offsetW = (val_int - mIN_INTLIKE dflags) * (fixedHdrSizeW dflags + 1)-                -- INTLIKE closures consist of a header and one word payload-              intlike_amode = cmmLabelOffW dflags intlike_lbl offsetW-        ; return ( litIdInfo dflags binder (mkConLFInfo con) intlike_amode-                 , return mkNop) }--buildDynCon' dflags platform binder _ _cc con [arg]-  | maybeCharLikeCon con-  , platformOS platform /= OSMinGW32 || not (positionIndependent dflags)-  , NonVoid (StgLitArg (LitChar val)) <- arg-  , let val_int = ord val :: Int-  , val_int <= mAX_CHARLIKE dflags-  , val_int >= mIN_CHARLIKE dflags-  = do  { let charlike_lbl   = mkCmmClosureLabel rtsUnitId (fsLit "stg_CHARLIKE")-              offsetW = (val_int - mIN_CHARLIKE dflags) * (fixedHdrSizeW dflags + 1)-                -- CHARLIKE closures consist of a header and one word payload-              charlike_amode = cmmLabelOffW dflags charlike_lbl offsetW-        ; return ( litIdInfo dflags binder (mkConLFInfo con) charlike_amode-                 , return mkNop) }---------- buildDynCon': the general case ------------buildDynCon' dflags _ binder actually_bound ccs con args-  = do  { (id_info, reg) <- rhsIdInfo binder lf_info-        ; return (id_info, gen_code reg)-        }- where-  lf_info = mkConLFInfo con--  gen_code reg-    = do  { let (tot_wds, ptr_wds, args_w_offsets)-                  = mkVirtConstrOffsets dflags (addArgReps args)-                nonptr_wds = tot_wds - ptr_wds-                info_tbl = mkDataConInfoTable dflags con False-                                ptr_wds nonptr_wds-          ; let ticky_name | actually_bound = Just binder-                           | otherwise = Nothing--          ; hp_plus_n <- allocDynClosure ticky_name info_tbl lf_info-                                          use_cc blame_cc args_w_offsets-          ; return (mkRhsInit dflags reg lf_info hp_plus_n) }-    where-      use_cc      -- cost-centre to stick in the object-        | isCurrentCCS ccs = cccsExpr-        | otherwise        = panic "buildDynCon: non-current CCS not implemented"--      blame_cc = use_cc -- cost-centre on which to blame the alloc (same)---------------------------------------------------------------------      Binding constructor arguments------------------------------------------------------------------bindConArgs :: AltCon -> LocalReg -> [NonVoid Id] -> FCode [LocalReg]--- bindConArgs is called from cgAlt of a case--- (bindConArgs con args) augments the environment with bindings for the--- binders args, assuming that we have just returned from a 'case' which--- found a con-bindConArgs (DataAlt con) base args-  = ASSERT(not (isUnboxedTupleCon con))-    do dflags <- getDynFlags-       let (_, _, args_w_offsets) = mkVirtConstrOffsets dflags (addIdReps args)-           tag = tagForCon dflags con--           -- The binding below forces the masking out of the tag bits-           -- when accessing the constructor field.-           bind_arg :: (NonVoid Id, ByteOff) -> FCode (Maybe LocalReg)-           bind_arg (arg@(NonVoid b), offset)-             | isDeadBinder b  -- See Note [Dead-binder optimisation] in StgCmmExpr-             = return Nothing-             | otherwise-             = do { emit $ mkTaggedObjectLoad dflags (idToReg dflags arg)-                                              base offset tag-                  ; Just <$> bindArgToReg arg }--       mapMaybeM bind_arg args_w_offsets--bindConArgs _other_con _base args-  = ASSERT( null args ) return []
− codeGen/StgCmmEnv.hs
@@ -1,208 +0,0 @@-{-# LANGUAGE CPP #-}------------------------------------------------------------------------------------- Stg to C-- code generation: the binding environment------ (c) The University of Glasgow 2004-2006----------------------------------------------------------------------------------module StgCmmEnv (-        CgIdInfo,--        litIdInfo, lneIdInfo, rhsIdInfo, mkRhsInit,-        idInfoToAmode,--        addBindC, addBindsC,--        bindArgsToRegs, bindToReg, rebindToReg,-        bindArgToReg, idToReg,-        getArgAmode, getNonVoidArgAmodes,-        getCgIdInfo,-        maybeLetNoEscape,-    ) where--#include "HsVersions.h"--import GhcPrelude--import TyCon-import StgCmmMonad-import StgCmmUtils-import StgCmmClosure--import CLabel--import BlockId-import CmmExpr-import CmmUtils-import DynFlags-import Id-import MkGraph-import Name-import Outputable-import StgSyn-import Type-import TysPrim-import UniqFM-import Util-import VarEnv------------------------------------------        Manipulating CgIdInfo----------------------------------------mkCgIdInfo :: Id -> LambdaFormInfo -> CmmExpr -> CgIdInfo-mkCgIdInfo id lf expr-  = CgIdInfo { cg_id = id, cg_lf = lf-             , cg_loc = CmmLoc expr }--litIdInfo :: DynFlags -> Id -> LambdaFormInfo -> CmmLit -> CgIdInfo-litIdInfo dflags id lf lit-  = CgIdInfo { cg_id = id, cg_lf = lf-             , cg_loc = CmmLoc (addDynTag dflags (CmmLit lit) tag) }-  where-    tag = lfDynTag dflags lf--lneIdInfo :: DynFlags -> Id -> [NonVoid Id] -> CgIdInfo-lneIdInfo dflags id regs-  = CgIdInfo { cg_id = id, cg_lf = lf-             , cg_loc = LneLoc blk_id (map (idToReg dflags) regs) }-  where-    lf     = mkLFLetNoEscape-    blk_id = mkBlockId (idUnique id)---rhsIdInfo :: Id -> LambdaFormInfo -> FCode (CgIdInfo, LocalReg)-rhsIdInfo id lf_info-  = do dflags <- getDynFlags-       reg <- newTemp (gcWord dflags)-       return (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)), reg)--mkRhsInit :: DynFlags -> LocalReg -> LambdaFormInfo -> CmmExpr -> CmmAGraph-mkRhsInit dflags reg lf_info expr-  = mkAssign (CmmLocal reg) (addDynTag dflags expr (lfDynTag dflags lf_info))--idInfoToAmode :: CgIdInfo -> CmmExpr--- Returns a CmmExpr for the *tagged* pointer-idInfoToAmode (CgIdInfo { cg_loc = CmmLoc e }) = e-idInfoToAmode cg_info-  = pprPanic "idInfoToAmode" (ppr (cg_id cg_info))        -- LneLoc--addDynTag :: DynFlags -> CmmExpr -> DynTag -> CmmExpr--- A tag adds a byte offset to the pointer-addDynTag dflags expr tag = cmmOffsetB dflags expr tag--maybeLetNoEscape :: CgIdInfo -> Maybe (BlockId, [LocalReg])-maybeLetNoEscape (CgIdInfo { cg_loc = LneLoc blk_id args}) = Just (blk_id, args)-maybeLetNoEscape _other                                      = Nothing----------------------------------------------------------------        The binding environment------ There are three basic routines, for adding (addBindC),--- modifying(modifyBindC) and looking up (getCgIdInfo) bindings.------------------------------------------------------------addBindC :: CgIdInfo -> FCode ()-addBindC stuff_to_bind = do-        binds <- getBinds-        setBinds $ extendVarEnv binds (cg_id stuff_to_bind) stuff_to_bind--addBindsC :: [CgIdInfo] -> FCode ()-addBindsC new_bindings = do-        binds <- getBinds-        let new_binds = foldl' (\ binds info -> extendVarEnv binds (cg_id info) info)-                               binds-                               new_bindings-        setBinds new_binds--getCgIdInfo :: Id -> FCode CgIdInfo-getCgIdInfo id-  = do  { dflags <- getDynFlags-        ; local_binds <- getBinds -- Try local bindings first-        ; case lookupVarEnv local_binds id of {-            Just info -> return info ;-            Nothing   -> do {--                -- Should be imported; make up a CgIdInfo for it-          let name = idName id-        ; if isExternalName name then-              let ext_lbl-                      | isUnliftedType (idType id) =-                          -- An unlifted external Id must refer to a top-level-                          -- string literal. See Note [Bytes label] in CLabel.-                          ASSERT( idType id `eqType` addrPrimTy )-                          mkBytesLabel name-                      | otherwise = mkClosureLabel name $ idCafInfo id-              in return $-                  litIdInfo dflags id (mkLFImported id) (CmmLabel ext_lbl)-          else-              cgLookupPanic id -- Bug-        }}}--cgLookupPanic :: Id -> FCode a-cgLookupPanic id-  = do  local_binds <- getBinds-        pprPanic "StgCmmEnv: variable not found"-                (vcat [ppr id,-                text "local binds for:",-                pprUFM local_binds $ \infos ->-                  vcat [ ppr (cg_id info) | info <- infos ]-              ])------------------------getArgAmode :: NonVoid StgArg -> FCode CmmExpr-getArgAmode (NonVoid (StgVarArg var)) = idInfoToAmode <$> getCgIdInfo var-getArgAmode (NonVoid (StgLitArg lit)) = CmmLit <$> cgLit lit--getNonVoidArgAmodes :: [StgArg] -> FCode [CmmExpr]--- NB: Filters out void args,---     so the result list may be shorter than the argument list-getNonVoidArgAmodes [] = return []-getNonVoidArgAmodes (arg:args)-  | isVoidRep (argPrimRep arg) = getNonVoidArgAmodes args-  | otherwise = do { amode  <- getArgAmode (NonVoid arg)-                   ; amodes <- getNonVoidArgAmodes args-                   ; return ( amode : amodes ) }------------------------------------------------------------------------------        Interface functions for binding and re-binding names---------------------------------------------------------------------------bindToReg :: NonVoid Id -> LambdaFormInfo -> FCode LocalReg--- Bind an Id to a fresh LocalReg-bindToReg nvid@(NonVoid id) lf_info-  = do dflags <- getDynFlags-       let reg = idToReg dflags nvid-       addBindC (mkCgIdInfo id lf_info (CmmReg (CmmLocal reg)))-       return reg--rebindToReg :: NonVoid Id -> FCode LocalReg--- Like bindToReg, but the Id is already in scope, so--- get its LF info from the envt-rebindToReg nvid@(NonVoid id)-  = do  { info <- getCgIdInfo id-        ; bindToReg nvid (cg_lf info) }--bindArgToReg :: NonVoid Id -> FCode LocalReg-bindArgToReg nvid@(NonVoid id) = bindToReg nvid (mkLFArgument id)--bindArgsToRegs :: [NonVoid Id] -> FCode [LocalReg]-bindArgsToRegs args = mapM bindArgToReg args--idToReg :: DynFlags -> NonVoid Id -> LocalReg--- Make a register from an Id, typically a function argument,--- free variable, or case binder------ We re-use the Unique from the Id to make it easier to see what is going on------ By now the Ids should be uniquely named; else one would worry--- about accidental collision-idToReg dflags (NonVoid id)-             = LocalReg (idUnique id)-                        (primRepCmmType dflags (idPrimRep id))
− codeGen/StgCmmExpr.hs
@@ -1,1171 +0,0 @@-{-# LANGUAGE CPP, BangPatterns #-}------------------------------------------------------------------------------------- Stg to C-- code generation: expressions------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmExpr ( cgExpr ) where--#include "HsVersions.h"--import GhcPrelude hiding ((<*>))--import {-# SOURCE #-} StgCmmBind ( cgBind )--import StgCmmMonad-import StgCmmHeap-import StgCmmEnv-import StgCmmCon-import StgCmmProf (saveCurrentCostCentre, restoreCurrentCostCentre, emitSetCCC)-import StgCmmLayout-import StgCmmPrim-import StgCmmHpc-import StgCmmTicky-import StgCmmUtils-import StgCmmClosure--import StgSyn--import MkGraph-import BlockId-import Cmm hiding ( succ )-import CmmInfo-import CoreSyn-import DataCon-import ForeignCall-import Id-import PrimOp-import TyCon-import Type             ( isUnliftedType )-import RepType          ( isVoidTy, countConRepArgs, primRepSlot )-import CostCentre       ( CostCentreStack, currentCCS )-import Maybes-import Util-import FastString-import Outputable-import DynFlags--import Control.Monad ( unless, void )-import Control.Arrow ( first )-import Data.Function ( on )-import Data.List     ( partition )-----------------------------------------------------------------------------              cgExpr: the main function---------------------------------------------------------------------------cgExpr  :: CgStgExpr -> FCode ReturnKind--cgExpr (StgApp fun args)     = cgIdApp fun args---- seq# a s ==> a--- See Note [seq# magic] in PrelRules-cgExpr (StgOpApp (StgPrimOp SeqOp) [StgVarArg a, _] _res_ty) =-  cgIdApp a []---- dataToTag# :: a -> Int#--- See Note [dataToTag#] in primops.txt.pp-cgExpr (StgOpApp (StgPrimOp DataToTagOp) [StgVarArg a] _res_ty) = do-  dflags <- getDynFlags-  emitComment (mkFastString "dataToTag#")-  tmp <- newTemp (bWord dflags)-  _ <- withSequel (AssignTo [tmp] False) (cgIdApp a [])-  -- TODO: For small types look at the tag bits instead of reading info table-  emitReturn [getConstrTag dflags (cmmUntag dflags (CmmReg (CmmLocal tmp)))]--cgExpr (StgOpApp op args ty) = cgOpApp op args ty-cgExpr (StgConApp con args _)= cgConApp con args-cgExpr (StgTick t e)         = cgTick t >> cgExpr e-cgExpr (StgLit lit)       = do cmm_lit <- cgLit lit-                               emitReturn [CmmLit cmm_lit]--cgExpr (StgLet _ binds expr) = do { cgBind binds;     cgExpr expr }-cgExpr (StgLetNoEscape _ binds expr) =-  do { u <- newUnique-     ; let join_id = mkBlockId u-     ; cgLneBinds join_id binds-     ; r <- cgExpr expr-     ; emitLabel join_id-     ; return r }--cgExpr (StgCase expr bndr alt_type alts) =-  cgCase expr bndr alt_type alts--cgExpr (StgLam {}) = panic "cgExpr: StgLam"-----------------------------------------------------------------------------              Let no escape---------------------------------------------------------------------------{- Generating code for a let-no-escape binding, aka join point is very-very similar to what we do for a case expression.  The duality is-between-        let-no-escape x = b-        in e-and-        case e of ... -> b--That is, the RHS of 'x' (ie 'b') will execute *later*, just like-the alternative of the case; it needs to be compiled in an environment-in which all volatile bindings are forgotten, and the free vars are-bound only to stable things like stack locations..  The 'e' part will-execute *next*, just like the scrutinee of a case. -}----------------------------cgLneBinds :: BlockId -> CgStgBinding -> FCode ()-cgLneBinds join_id (StgNonRec bndr rhs)-  = do  { local_cc <- saveCurrentCostCentre-                -- See Note [Saving the current cost centre]-        ; (info, fcode) <- cgLetNoEscapeRhs join_id local_cc bndr rhs-        ; fcode-        ; addBindC info }--cgLneBinds join_id (StgRec pairs)-  = do  { local_cc <- saveCurrentCostCentre-        ; r <- sequence $ unzipWith (cgLetNoEscapeRhs join_id local_cc) pairs-        ; let (infos, fcodes) = unzip r-        ; addBindsC infos-        ; sequence_ fcodes-        }----------------------------cgLetNoEscapeRhs-    :: BlockId          -- join point for successor of let-no-escape-    -> Maybe LocalReg   -- Saved cost centre-    -> Id-    -> CgStgRhs-    -> FCode (CgIdInfo, FCode ())--cgLetNoEscapeRhs join_id local_cc bndr rhs =-  do { (info, rhs_code) <- cgLetNoEscapeRhsBody local_cc bndr rhs-     ; let (bid, _) = expectJust "cgLetNoEscapeRhs" $ maybeLetNoEscape info-     ; let code = do { (_, body) <- getCodeScoped rhs_code-                     ; emitOutOfLine bid (first (<*> mkBranch join_id) body) }-     ; return (info, code)-     }--cgLetNoEscapeRhsBody-    :: Maybe LocalReg   -- Saved cost centre-    -> Id-    -> CgStgRhs-    -> FCode (CgIdInfo, FCode ())-cgLetNoEscapeRhsBody local_cc bndr (StgRhsClosure _ cc _upd args body)-  = cgLetNoEscapeClosure bndr local_cc cc (nonVoidIds args) body-cgLetNoEscapeRhsBody local_cc bndr (StgRhsCon cc con args)-  = cgLetNoEscapeClosure bndr local_cc cc []-      (StgConApp con args (pprPanic "cgLetNoEscapeRhsBody" $-                           text "StgRhsCon doesn't have type args"))-        -- For a constructor RHS we want to generate a single chunk of-        -- code which can be jumped to from many places, which will-        -- return the constructor. It's easy; just behave as if it-        -- was an StgRhsClosure with a ConApp inside!----------------------------cgLetNoEscapeClosure-        :: Id                   -- binder-        -> Maybe LocalReg       -- Slot for saved current cost centre-        -> CostCentreStack      -- XXX: *** NOT USED *** why not?-        -> [NonVoid Id]         -- Args (as in \ args -> body)-        -> CgStgExpr            -- Body (as in above)-        -> FCode (CgIdInfo, FCode ())--cgLetNoEscapeClosure bndr cc_slot _unused_cc args body-  = do dflags <- getDynFlags-       return ( lneIdInfo dflags bndr args-              , code )-  where-   code = forkLneBody $ do {-            ; withNewTickyCounterLNE (idName bndr) args $ do-            ; restoreCurrentCostCentre cc_slot-            ; arg_regs <- bindArgsToRegs args-            ; void $ noEscapeHeapCheck arg_regs (tickyEnterLNE >> cgExpr body) }------------------------------------------------------------------------------              Case expressions---------------------------------------------------------------------------{- Note [Compiling case expressions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It is quite interesting to decide whether to put a heap-check at the-start of each alternative.  Of course we certainly have to do so if-the case forces an evaluation, or if there is a primitive op which can-trigger GC.--A more interesting situation is this (a Plan-B situation)--        !P!;-        ...P...-        case x# of-          0#      -> !Q!; ...Q...-          default -> !R!; ...R...--where !x! indicates a possible heap-check point. The heap checks-in the alternatives *can* be omitted, in which case the topmost-heapcheck will take their worst case into account.--In favour of omitting !Q!, !R!:-- - *May* save a heap overflow test,-   if ...P... allocates anything.-- - We can use relative addressing from a single Hp to-   get at all the closures so allocated.-- - No need to save volatile vars etc across heap checks-   in !Q!, !R!--Against omitting !Q!, !R!--  - May put a heap-check into the inner loop.  Suppose-        the main loop is P -> R -> P -> R...-        Q is the loop exit, and only it does allocation.-    This only hurts us if P does no allocation.  If P allocates,-    then there is a heap check in the inner loop anyway.--  - May do more allocation than reqd.  This sometimes bites us-    badly.  For example, nfib (ha!) allocates about 30\% more space if the-    worst-casing is done, because many many calls to nfib are leaf calls-    which don't need to allocate anything.--    We can un-allocate, but that costs an instruction--Neither problem hurts us if there is only one alternative.--Suppose the inner loop is P->R->P->R etc.  Then here is-how many heap checks we get in the *inner loop* under various-conditions--  Alloc   Heap check in branches (!Q!, !R!)?-  P Q R      yes     no (absorb to !P!)----------------------------------------  n n n      0          0-  n y n      0          1-  n . y      1          1-  y . y      2          1-  y . n      1          1--Best choices: absorb heap checks from Q and R into !P! iff-  a) P itself does some allocation-or-  b) P does allocation, or there is exactly one alternative--We adopt (b) because that is more likely to put the heap check at the-entry to a function, when not many things are live.  After a bunch of-single-branch cases, we may have lots of things live--Hence: two basic plans for--        case e of r { alts }-------- Plan A: the general case -----------        ...save current cost centre...--        ...code for e,-           with sequel (SetLocals r)--        ...restore current cost centre...-        ...code for alts...-        ...alts do their own heap checks-------- Plan B: special case when ----------  (i)  e does not allocate or call GC-  (ii) either upstream code performs allocation-       or there is just one alternative--  Then heap allocation in the (single) case branch-  is absorbed by the upstream check.-  Very common example: primops on unboxed values--        ...code for e,-           with sequel (SetLocals r)...--        ...code for alts...-        ...no heap check...--}------------------------------------------data GcPlan-  = GcInAlts            -- Put a GC check at the start the case alternatives,-        [LocalReg]      -- which binds these registers-  | NoGcInAlts          -- The scrutinee is a primitive value, or a call to a-                        -- primitive op which does no GC.  Absorb the allocation-                        -- of the case alternative(s) into the upstream check----------------------------------------cgCase :: CgStgExpr -> Id -> AltType -> [CgStgAlt] -> FCode ReturnKind--cgCase (StgOpApp (StgPrimOp op) args _) bndr (AlgAlt tycon) alts-  | isEnumerationTyCon tycon -- Note [case on bool]-  = do { tag_expr <- do_enum_primop op args--       -- If the binder is not dead, convert the tag to a constructor-       -- and assign it. See Note [Dead-binder optimisation]-       ; unless (isDeadBinder bndr) $ do-            { dflags <- getDynFlags-            ; tmp_reg <- bindArgToReg (NonVoid bndr)-            ; emitAssign (CmmLocal tmp_reg)-                         (tagToClosure dflags tycon tag_expr) }--       ; (mb_deflt, branches) <- cgAlgAltRhss (NoGcInAlts,AssignedDirectly)-                                              (NonVoid bndr) alts-                                 -- See Note [GC for conditionals]-       ; emitSwitch tag_expr branches mb_deflt 0 (tyConFamilySize tycon - 1)-       ; return AssignedDirectly-       }-  where-    do_enum_primop :: PrimOp -> [StgArg] -> FCode CmmExpr-    do_enum_primop TagToEnumOp [arg]  -- No code!-      = getArgAmode (NonVoid arg)-    do_enum_primop primop args-      = do dflags <- getDynFlags-           tmp <- newTemp (bWord dflags)-           cgPrimOp [tmp] primop args-           return (CmmReg (CmmLocal tmp))--{--Note [case on bool]-~~~~~~~~~~~~~~~~~~~-This special case handles code like--  case a <# b of-    True ->-    False ->---->  case tagToEnum# (a <$# b) of-        True -> .. ; False -> ...----> case (a <$# b) of r ->-    case tagToEnum# r of-        True -> .. ; False -> ...--If we let the ordinary case code handle it, we'll get something like-- tmp1 = a < b- tmp2 = Bool_closure_tbl[tmp1]- if (tmp2 & 7 != 0) then ... // normal tagged case--but this junk won't optimise away.  What we really want is just an-inline comparison:-- if (a < b) then ...--So we add a special case to generate-- tmp1 = a < b- if (tmp1 == 0) then ...--and later optimisations will further improve this.--Now that #6135 has been resolved it should be possible to remove that-special case. The idea behind this special case and pre-6135 implementation-of Bool-returning primops was that tagToEnum# was added implicitly in the-codegen and then optimized away. Now the call to tagToEnum# is explicit-in the source code, which allows to optimize it away at the earlier stages-of compilation (i.e. at the Core level).--Note [Scrutinising VoidRep]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have this STG code:-   f = \[s : State# RealWorld] ->-       case s of _ -> blah-This is very odd.  Why are we scrutinising a state token?  But it-can arise with bizarre NOINLINE pragmas (Trac #9964)-    crash :: IO ()-    crash = IO (\s -> let {-# NOINLINE s' #-}-                          s' = s-                      in (# s', () #))--Now the trouble is that 's' has VoidRep, and we do not bind void-arguments in the environment; they don't live anywhere.  See the-calls to nonVoidIds in various places.  So we must not look up-'s' in the environment.  Instead, just evaluate the RHS!  Simple.--Note [Dead-binder optimisation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A case-binder, or data-constructor argument, may be marked as dead,-because we preserve occurrence-info on binders in CoreTidy (see-CoreTidy.tidyIdBndr).--If the binder is dead, we can sometimes eliminate a load.  While-CmmSink will eliminate that load, it's very easy to kill it at source-(giving CmmSink less work to do), and in any case CmmSink only runs-with -O. Since the majority of case binders are dead, this-optimisation probably still has a great benefit-cost ratio and we want-to keep it for -O0. See also Phab:D5358.--This probably also was the reason for occurrence hack in Phab:D5339 to-exist, perhaps because the occurrence information preserved by-'CoreTidy.tidyIdBndr' was insufficient.  But now that CmmSink does the-job we deleted the hacks.--}--cgCase (StgApp v []) _ (PrimAlt _) alts-  | isVoidRep (idPrimRep v)  -- See Note [Scrutinising VoidRep]-  , [(DEFAULT, _, rhs)] <- alts-  = cgExpr rhs--{- Note [Dodgy unsafeCoerce 1]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-    case (x :: HValue) |> co of (y :: MutVar# Int)-        DEFAULT -> ...-We want to gnerate an assignment-     y := x-We want to allow this assignment to be generated in the case when the-types are compatible, because this allows some slightly-dodgy but-occasionally-useful casts to be used, such as in RtClosureInspect-where we cast an HValue to a MutVar# so we can print out the contents-of the MutVar#.  If instead we generate code that enters the HValue,-then we'll get a runtime panic, because the HValue really is a-MutVar#.  The types are compatible though, so we can just generate an-assignment.--}-cgCase (StgApp v []) bndr alt_type@(PrimAlt _) alts-  | isUnliftedType (idType v)  -- Note [Dodgy unsafeCoerce 1]-  || reps_compatible-  = -- assignment suffices for unlifted types-    do { dflags <- getDynFlags-       ; unless reps_compatible $-           pprPanic "cgCase: reps do not match, perhaps a dodgy unsafeCoerce?"-                    (pp_bndr v $$ pp_bndr bndr)-       ; v_info <- getCgIdInfo v-       ; emitAssign (CmmLocal (idToReg dflags (NonVoid bndr)))-                    (idInfoToAmode v_info)-       -- Add bndr to the environment-       ; _ <- bindArgToReg (NonVoid bndr)-       ; cgAlts (NoGcInAlts,AssignedDirectly) (NonVoid bndr) alt_type alts }-  where-    reps_compatible = ((==) `on` (primRepSlot . idPrimRep)) v bndr-      -- Must compare SlotTys, not proper PrimReps, because with unboxed sums,-      -- the types of the binders are generated from slotPrimRep and might not-      -- match. Test case:-      --   swap :: (# Int | Int #) -> (# Int | Int #)-      --   swap (# x | #) = (# | x #)-      --   swap (# | y #) = (# y | #)--    pp_bndr id = ppr id <+> dcolon <+> ppr (idType id) <+> parens (ppr (idPrimRep id))--{- Note [Dodgy unsafeCoerce 2, #3132]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In all other cases of a lifted Id being cast to an unlifted type, the-Id should be bound to bottom, otherwise this is an unsafe use of-unsafeCoerce.  We can generate code to enter the Id and assume that-it will never return.  Hence, we emit the usual enter/return code, and-because bottom must be untagged, it will be entered.  The Sequel is a-type-correct assignment, albeit bogus.  The (dead) continuation loops;-it would be better to invoke some kind of panic function here.--}-cgCase scrut@(StgApp v []) _ (PrimAlt _) _-  = do { dflags <- getDynFlags-       ; mb_cc <- maybeSaveCostCentre True-       ; _ <- withSequel-                  (AssignTo [idToReg dflags (NonVoid v)] False) (cgExpr scrut)-       ; restoreCurrentCostCentre mb_cc-       ; emitComment $ mkFastString "should be unreachable code"-       ; l <- newBlockId-       ; emitLabel l-       ; emit (mkBranch l)  -- an infinite loop-       ; return AssignedDirectly-       }--{- Note [Handle seq#]-~~~~~~~~~~~~~~~~~~~~~-See Note [seq# magic] in PrelRules.-The special case for seq# in cgCase does this:--  case seq# a s of v-    (# s', a' #) -> e-==>-  case a of v-    (# s', a' #) -> e--(taking advantage of the fact that the return convention for (# State#, a #)-is the same as the return convention for just 'a')--}--cgCase (StgOpApp (StgPrimOp SeqOp) [StgVarArg a, _] _) bndr alt_type alts-  = -- Note [Handle seq#]-    -- And see Note [seq# magic] in PrelRules-    -- Use the same return convention as vanilla 'a'.-    cgCase (StgApp a []) bndr alt_type alts--cgCase scrut bndr alt_type alts-  = -- the general case-    do { dflags <- getDynFlags-       ; up_hp_usg <- getVirtHp        -- Upstream heap usage-       ; let ret_bndrs = chooseReturnBndrs bndr alt_type alts-             alt_regs  = map (idToReg dflags) ret_bndrs-       ; simple_scrut <- isSimpleScrut scrut alt_type-       ; let do_gc  | is_cmp_op scrut  = False  -- See Note [GC for conditionals]-                    | not simple_scrut = True-                    | isSingleton alts = False-                    | up_hp_usg > 0    = False-                    | otherwise        = True-               -- cf Note [Compiling case expressions]-             gc_plan = if do_gc then GcInAlts alt_regs else NoGcInAlts--       ; mb_cc <- maybeSaveCostCentre simple_scrut--       ; let sequel = AssignTo alt_regs do_gc{- Note [scrut sequel] -}-       ; ret_kind <- withSequel sequel (cgExpr scrut)-       ; restoreCurrentCostCentre mb_cc-       ; _ <- bindArgsToRegs ret_bndrs-       ; cgAlts (gc_plan,ret_kind) (NonVoid bndr) alt_type alts-       }-  where-    is_cmp_op (StgOpApp (StgPrimOp op) _ _) = isComparisonPrimOp op-    is_cmp_op _                             = False--{- Note [GC for conditionals]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For boolean conditionals it seems that we have always done NoGcInAlts.-That is, we have always done the GC check before the conditional.-This is enshrined in the special case for-   case tagToEnum# (a>b) of ...-See Note [case on bool]--It's odd, and it's flagrantly inconsistent with the rules described-Note [Compiling case expressions].  However, after eliminating the-tagToEnum# (Trac #13397) we will have:-   case (a>b) of ...-Rather than make it behave quite differently, I am testing for a-comparison operator here in in the general case as well.--ToDo: figure out what the Right Rule should be.--Note [scrut sequel]-~~~~~~~~~~~~~~~~~~~-The job of the scrutinee is to assign its value(s) to alt_regs.-Additionally, if we plan to do a heap-check in the alternatives (see-Note [Compiling case expressions]), then we *must* retreat Hp to-recover any unused heap before passing control to the sequel.  If we-don't do this, then any unused heap will become slop because the heap-check will reset the heap usage. Slop in the heap breaks LDV profiling-(+RTS -hb) which needs to do a linear sweep through the nursery.---Note [Inlining out-of-line primops and heap checks]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If shouldInlinePrimOp returns True when called from StgCmmExpr for the-purpose of heap check placement, we *must* inline the primop later in-StgCmmPrim. If we don't things will go wrong.--}--------------------maybeSaveCostCentre :: Bool -> FCode (Maybe LocalReg)-maybeSaveCostCentre simple_scrut-  | simple_scrut = return Nothing-  | otherwise    = saveCurrentCostCentre---------------------isSimpleScrut :: CgStgExpr -> AltType -> FCode Bool--- Simple scrutinee, does not block or allocate; hence safe to amalgamate--- heap usage from alternatives into the stuff before the case--- NB: if you get this wrong, and claim that the expression doesn't allocate---     when it does, you'll deeply mess up allocation-isSimpleScrut (StgOpApp op args _) _       = isSimpleOp op args-isSimpleScrut (StgLit _)       _           = return True       -- case 1# of { 0# -> ..; ... }-isSimpleScrut (StgApp _ [])    (PrimAlt _) = return True       -- case x# of { 0# -> ..; ... }-isSimpleScrut _                _           = return False--isSimpleOp :: StgOp -> [StgArg] -> FCode Bool--- True iff the op cannot block or allocate-isSimpleOp (StgFCallOp (CCall (CCallSpec _ _ safe)) _) _ = return $! not (playSafe safe)--- dataToTag# evalautes its argument, see Note [dataToTag#] in primops.txt.pp-isSimpleOp (StgPrimOp DataToTagOp) _ = return False-isSimpleOp (StgPrimOp op) stg_args                  = do-    arg_exprs <- getNonVoidArgAmodes stg_args-    dflags <- getDynFlags-    -- See Note [Inlining out-of-line primops and heap checks]-    return $! isJust $ shouldInlinePrimOp dflags op arg_exprs-isSimpleOp (StgPrimCallOp _) _                           = return False--------------------chooseReturnBndrs :: Id -> AltType -> [CgStgAlt] -> [NonVoid Id]--- These are the binders of a case that are assigned by the evaluation of the--- scrutinee.--- They're non-void, see Note [Post-unarisation invariants] in UnariseStg.-chooseReturnBndrs bndr (PrimAlt _) _alts-  = assertNonVoidIds [bndr]--chooseReturnBndrs _bndr (MultiValAlt n) [(_, ids, _)]-  = ASSERT2(ids `lengthIs` n, ppr n $$ ppr ids $$ ppr _bndr)-    assertNonVoidIds ids     -- 'bndr' is not assigned!--chooseReturnBndrs bndr (AlgAlt _) _alts-  = assertNonVoidIds [bndr]  -- Only 'bndr' is assigned--chooseReturnBndrs bndr PolyAlt _alts-  = assertNonVoidIds [bndr]  -- Only 'bndr' is assigned--chooseReturnBndrs _ _ _ = panic "chooseReturnBndrs"-                             -- MultiValAlt has only one alternative----------------------------------------cgAlts :: (GcPlan,ReturnKind) -> NonVoid Id -> AltType -> [CgStgAlt]-       -> FCode ReturnKind--- At this point the result of the case are in the binders-cgAlts gc_plan _bndr PolyAlt [(_, _, rhs)]-  = maybeAltHeapCheck gc_plan (cgExpr rhs)--cgAlts gc_plan _bndr (MultiValAlt _) [(_, _, rhs)]-  = maybeAltHeapCheck gc_plan (cgExpr rhs)-        -- Here bndrs are *already* in scope, so don't rebind them--cgAlts gc_plan bndr (PrimAlt _) alts-  = do  { dflags <- getDynFlags--        ; tagged_cmms <- cgAltRhss gc_plan bndr alts--        ; let bndr_reg = CmmLocal (idToReg dflags bndr)-              (DEFAULT,deflt) = head tagged_cmms-                -- PrimAlts always have a DEFAULT case-                -- and it always comes first--              tagged_cmms' = [(lit,code)-                             | (LitAlt lit, code) <- tagged_cmms]-        ; emitCmmLitSwitch (CmmReg bndr_reg) tagged_cmms' deflt-        ; return AssignedDirectly }--cgAlts gc_plan bndr (AlgAlt tycon) alts-  = do  { dflags <- getDynFlags--        ; (mb_deflt, branches) <- cgAlgAltRhss gc_plan bndr alts--        ; let !fam_sz   = tyConFamilySize tycon-              !bndr_reg = CmmLocal (idToReg dflags bndr)-              !ptag_expr = cmmConstrTag1 dflags (CmmReg bndr_reg)-              !branches' = first succ <$> branches-              !maxpt = mAX_PTR_TAG dflags-              (!via_ptr, !via_info) = partition ((< maxpt) . fst) branches'-              !small = isSmallFamily dflags fam_sz--                -- Is the constructor tag in the node reg?-                -- See Note [Tagging big families]-        ; if small || null via_info-           then -- Yes, bndr_reg has constructor tag in ls bits-               emitSwitch ptag_expr branches' mb_deflt 1-                 (if small then fam_sz else maxpt)--           else -- No, the get exact tag from info table when mAX_PTR_TAG-                -- See Note [Double switching for big families]-              do-                let !untagged_ptr = cmmUntag dflags (CmmReg bndr_reg)-                    !itag_expr = getConstrTag dflags untagged_ptr-                    !info0 = first pred <$> via_info-                if null via_ptr then-                  emitSwitch itag_expr info0 mb_deflt 0 (fam_sz - 1)-                else do-                  infos_lbl <- newBlockId-                  infos_scp <- getTickScope--                  let spillover = (maxpt, (mkBranch infos_lbl, infos_scp))--                  (mb_shared_deflt, mb_shared_branch) <- case mb_deflt of-                      (Just (stmts, scp)) ->-                          do lbl <- newBlockId-                             return ( Just (mkLabel lbl scp <*> stmts, scp)-                                    , Just (mkBranch lbl, scp))-                      _ -> return (Nothing, Nothing)-                  -- Switch on pointer tag-                  emitSwitch ptag_expr (spillover : via_ptr) mb_shared_deflt 1 maxpt-                  join_lbl <- newBlockId-                  emit (mkBranch join_lbl)-                  -- Switch on info table tag-                  emitLabel infos_lbl-                  emitSwitch itag_expr info0 mb_shared_branch-                    (maxpt - 1) (fam_sz - 1)-                  emitLabel join_lbl--        ; return AssignedDirectly }--cgAlts _ _ _ _ = panic "cgAlts"-        -- UbxTupAlt and PolyAlt have only one alternative---- Note [Double switching for big families]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ An algebraic data type can have a n >= 0 summands--- (or alternatives), which are identified (labeled) by--- constructors. In memory they are kept apart by tags--- (see Note [Data constructor dynamic tags] in GHC.StgToCmm.Closure).--- Due to the characteristics of the platform that--- contribute to the alignment of memory objects, there--- is a natural limit of information about constructors--- that can be encoded in the pointer tag. When the mapping--- of constructors to the pointer tag range 1..mAX_PTR_TAG--- is not injective, then we have a "big data type", also--- called a "big (constructor) family" in the literature.--- Constructor tags residing in the info table are injective,--- but considerably more expensive to obtain, due to additional--- memory access(es).------ When doing case analysis on a value of a "big data type"--- we need two nested switch statements to make up for the lack--- of injectivity of pointer tagging, also taking the info--- table tag into account. The exact mechanism is described next.------ In the general case, switching on big family alternatives--- is done by two nested switch statements. According to--- Note [Tagging big families], the outer switch--- looks at the pointer tag and the inner dereferences the--- pointer and switches on the info table tag.------ We can handle a simple case first, namely when none--- of the case alternatives mention a constructor having--- a pointer tag of 1..mAX_PTR_TAG-1. In this case we--- simply emit a switch on the info table tag.--- Note that the other simple case is when all mentioned--- alternatives lie in 1..mAX_PTR_TAG-1, in which case we can--- switch on the ptr tag only, just like in the small family case.------ There is a single intricacy with a nested switch:--- Both should branch to the same default alternative, and as such--- avoid duplicate codegen of potentially heavy code. The outer--- switch generates the actual code with a prepended fresh label,--- while the inner one only generates a jump to that label.------ For example, let's assume a 64-bit architecture, so that all--- heap objects are 8-byte aligned, and hence the address of a--- heap object ends in `000` (three zero bits).------ Then consider the following data type------   > data Big = T0 | T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8---   Ptr tag:      1    2    3    4    5    6    7    7    7---   As bits:    001  010  011  100  101  110  111  111  111---   Info pointer tag (zero based):---                 0    1    2    3    4    5    6    7    8------ Then     \case T2 -> True; T8 -> True; _ -> False--- will result in following code (slightly cleaned-up and--- commented -ddump-cmm-from-stg):-{--           R1 = _sqI::P64;  -- scrutinee-           if (R1 & 7 != 0) goto cqO; else goto cqP;-       cqP: // global       -- enter-           call (I64[R1])(R1) returns to cqO, args: 8, res: 8, upd: 8;-       cqO: // global       -- already WHNF-           _sqJ::P64 = R1;-           _cqX::P64 = _sqJ::P64 & 7;  -- extract pointer tag-           switch [1 .. 7] _cqX::P64 {-               case 3 : goto cqW;-               case 7 : goto cqR;-               default: {goto cqS;}-           }-       cqR: // global-           _cr2 = I32[I64[_sqJ::P64 & (-8)] - 4]; -- tag from info pointer-           switch [6 .. 8] _cr2::I64 {-               case 8 : goto cr1;-               default: {goto cr0;}-           }-       cr1: // global-           R1 = GHC.Types.True_closure+2;-           call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;-       cr0: // global     -- technically necessary label-           goto cqS;-       cqW: // global-           R1 = GHC.Types.True_closure+2;-           call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;-       cqS: // global-           R1 = GHC.Types.False_closure+1;-           call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;--}------ For 32-bit systems we only have 2 tag bits in the pointers at our disposal,--- so the performance win is dubious, especially in face of the increased code--- size due to double switching. But we can take the viewpoint that 32-bit--- architectures are not relevant for performance any more, so this can be--- considered as moot.----- Note [alg-alt heap check]------ In an algebraic case with more than one alternative, we will have--- code like------ L0:---   x = R1---   goto L1--- L1:---   if (x & 7 >= 2) then goto L2 else goto L3--- L2:---   Hp = Hp + 16---   if (Hp > HpLim) then goto L4---   ...--- L4:---   call gc() returns to L5--- L5:---   x = R1---   goto L1----- Note [Tagging big families]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~------ Both the big and the small constructor families are tagged,--- that is, greater unions which overflow the tag space of TAG_BITS--- (i.e. 3 on 32 resp. 7 constructors on 64 bit archs).------ For example, let's assume a 64-bit architecture, so that all--- heap objects are 8-byte aligned, and hence the address of a--- heap object ends in `000` (three zero bits).  Then consider--- > data Maybe a = Nothing | Just a--- > data Day a = Mon | Tue | Wed | Thu | Fri | Sat | Sun--- > data Grade = G1 | G2 | G3 | G4 | G5 | G6 | G7 | G8 | G9 | G10------ Since `Grade` has more than 7 constructors, it counts as a--- "big data type" (also referred to as "big constructor family" in papers).--- On the other hand, `Maybe` and `Day` have 7 constructors or fewer, so they--- are "small data types".------ Then---   * A pointer to an unevaluated thunk of type `Maybe Int`, `Day` or `Grade` will end in `000`---   * A tagged pointer to a `Nothing`, `Mon` or `G1` will end in `001`---   * A tagged pointer to a `Just x`, `Tue` or `G2`  will end in `010`---   * A tagged pointer to `Wed` or `G3` will end in `011`---       ...---   * A tagged pointer to `Sat` or `G6` will end in `110`---   * A tagged pointer to `Sun` or `G7` or `G8` or `G9` or `G10` will end in `111`------ For big families we employ a mildly clever way of combining pointer and--- info-table tagging. We use 1..MAX_PTR_TAG-1 as pointer-resident tags where--- the tags in the pointer and the info table are in a one-to-one--- relation, whereas tag MAX_PTR_TAG is used as "spill over", signifying--- we have to fall back and get the precise constructor tag from the--- info-table.------ Consequently we now cascade switches, because we have to check--- the pointer tag first, and when it is MAX_PTR_TAG, fetch the precise--- tag from the info table, and switch on that. The only technically--- tricky part is that the default case needs (logical) duplication.--- To do this we emit an extra label for it and branch to that from--- the second switch. This avoids duplicated codegen. See Trac #14373.--- See note [Double switching for big families] for the mechanics--- involved.------ Also see note [Data constructor dynamic tags]--- and the wiki https://gitlab.haskell.org/ghc/ghc/wikis/commentary/rts/haskell-execution/pointer-tagging-------------------------cgAlgAltRhss :: (GcPlan,ReturnKind) -> NonVoid Id -> [CgStgAlt]-             -> FCode ( Maybe CmmAGraphScoped-                      , [(ConTagZ, CmmAGraphScoped)] )-cgAlgAltRhss gc_plan bndr alts-  = do { tagged_cmms <- cgAltRhss gc_plan bndr alts--       ; let { mb_deflt = case tagged_cmms of-                           ((DEFAULT,rhs) : _) -> Just rhs-                           _other              -> Nothing-                            -- DEFAULT is always first, if present--              ; branches = [ (dataConTagZ con, cmm)-                           | (DataAlt con, cmm) <- tagged_cmms ]-              }--       ; return (mb_deflt, branches)-       }-----------------------cgAltRhss :: (GcPlan,ReturnKind) -> NonVoid Id -> [CgStgAlt]-          -> FCode [(AltCon, CmmAGraphScoped)]-cgAltRhss gc_plan bndr alts = do-  dflags <- getDynFlags-  let-    base_reg = idToReg dflags bndr-    cg_alt :: CgStgAlt -> FCode (AltCon, CmmAGraphScoped)-    cg_alt (con, bndrs, rhs)-      = getCodeScoped             $-        maybeAltHeapCheck gc_plan $-        do { _ <- bindConArgs con base_reg (assertNonVoidIds bndrs)-                    -- alt binders are always non-void,-                    -- see Note [Post-unarisation invariants] in UnariseStg-           ; _ <- cgExpr rhs-           ; return con }-  forkAlts (map cg_alt alts)--maybeAltHeapCheck :: (GcPlan,ReturnKind) -> FCode a -> FCode a-maybeAltHeapCheck (NoGcInAlts,_)  code = code-maybeAltHeapCheck (GcInAlts regs, AssignedDirectly) code =-  altHeapCheck regs code-maybeAltHeapCheck (GcInAlts regs, ReturnedTo lret off) code =-  altHeapCheckReturnsTo regs lret off code----------------------------------------------------------------------------------      Tail calls--------------------------------------------------------------------------------cgConApp :: DataCon -> [StgArg] -> FCode ReturnKind-cgConApp con stg_args-  | isUnboxedTupleCon con       -- Unboxed tuple: assign and return-  = do { arg_exprs <- getNonVoidArgAmodes stg_args-       ; tickyUnboxedTupleReturn (length arg_exprs)-       ; emitReturn arg_exprs }--  | otherwise   --  Boxed constructors; allocate and return-  = ASSERT2( stg_args `lengthIs` countConRepArgs con, ppr con <> parens (ppr (countConRepArgs con)) <+> ppr stg_args )-    do  { (idinfo, fcode_init) <- buildDynCon (dataConWorkId con) False-                                     currentCCS con (assertNonVoidStgArgs stg_args)-                                     -- con args are always non-void,-                                     -- see Note [Post-unarisation invariants] in UnariseStg-                -- The first "con" says that the name bound to this-                -- closure is "con", which is a bit of a fudge, but-                -- it only affects profiling (hence the False)--        ; emit =<< fcode_init-        ; tickyReturnNewCon (length stg_args)-        ; emitReturn [idInfoToAmode idinfo] }--cgIdApp :: Id -> [StgArg] -> FCode ReturnKind-cgIdApp fun_id args = do-    dflags         <- getDynFlags-    fun_info       <- getCgIdInfo fun_id-    self_loop_info <- getSelfLoop-    let cg_fun_id   = cg_id fun_info-           -- NB: use (cg_id fun_info) instead of fun_id, because-           -- the former may be externalised for -split-objs.-           -- See Note [Externalise when splitting] in StgCmmMonad--        fun_arg     = StgVarArg cg_fun_id-        fun_name    = idName    cg_fun_id-        fun         = idInfoToAmode fun_info-        lf_info     = cg_lf         fun_info-        n_args      = length args-        v_args      = length $ filter (isVoidTy . stgArgType) args-        node_points dflags = nodeMustPointToIt dflags lf_info-    case getCallMethod dflags fun_name cg_fun_id lf_info n_args v_args (cg_loc fun_info) self_loop_info of-            -- A value in WHNF, so we can just return it.-        ReturnIt-          | isVoidTy (idType fun_id) -> emitReturn []-          | otherwise                -> emitReturn [fun]-          -- ToDo: does ReturnIt guarantee tagged?--        EnterIt -> ASSERT( null args )  -- Discarding arguments-                   emitEnter fun--        SlowCall -> do      -- A slow function call via the RTS apply routines-                { tickySlowCall lf_info args-                ; emitComment $ mkFastString "slowCall"-                ; slowCall fun args }--        -- A direct function call (possibly with some left-over arguments)-        DirectEntry lbl arity -> do-                { tickyDirectCall arity args-                ; if node_points dflags-                     then directCall NativeNodeCall   lbl arity (fun_arg:args)-                     else directCall NativeDirectCall lbl arity args }--        -- Let-no-escape call or self-recursive tail-call-        JumpToIt blk_id lne_regs -> do-          { adjustHpBackwards -- always do this before a tail-call-          ; cmm_args <- getNonVoidArgAmodes args-          ; emitMultiAssign lne_regs cmm_args-          ; emit (mkBranch blk_id)-          ; return AssignedDirectly }---- Note [Self-recursive tail calls]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ Self-recursive tail calls can be optimized into a local jump in the same--- way as let-no-escape bindings (see Note [What is a non-escaping let] in--- stgSyn/CoreToStg.hs). Consider this:------ foo.info:---     a = R1  // calling convention---     b = R2---     goto L1--- L1: ...---     ...--- ...--- L2: R1 = x---     R2 = y---     call foo(R1,R2)------ Instead of putting x and y into registers (or other locations required by the--- calling convention) and performing a call we can put them into local--- variables a and b and perform jump to L1:------ foo.info:---     a = R1---     b = R2---     goto L1--- L1: ...---     ...--- ...--- L2: a = x---     b = y---     goto L1------ This can be done only when function is calling itself in a tail position--- and only if the call passes number of parameters equal to function's arity.--- Note that this cannot be performed if a function calls itself with a--- continuation.------ This in fact implements optimization known as "loopification". It was--- described in "Low-level code optimizations in the Glasgow Haskell Compiler"--- by Krzysztof Woś, though we use different approach. Krzysztof performed his--- optimization at the Cmm level, whereas we perform ours during code generation--- (Stg-to-Cmm pass) essentially making sure that optimized Cmm code is--- generated in the first place.------ Implementation is spread across a couple of places in the code:------   * FCode monad stores additional information in its reader environment---     (cgd_self_loop field). This information tells us which function can---     tail call itself in an optimized way (it is the function currently---     being compiled), what is the label of a loop header (L1 in example above)---     and information about local registers in which we should arguments---     before making a call (this would be a and b in example above).------   * Whenever we are compiling a function, we set that information to reflect---     the fact that function currently being compiled can be jumped to, instead---     of called. This is done in closureCodyBody in StgCmmBind.------   * We also have to emit a label to which we will be jumping. We make sure---     that the label is placed after a stack check but before the heap---     check. The reason is that making a recursive tail-call does not increase---     the stack so we only need to check once. But it may grow the heap, so we---     have to repeat the heap check in every self-call. This is done in---     do_checks in StgCmmHeap.------   * When we begin compilation of another closure we remove the additional---     information from the environment. This is done by forkClosureBody---     in StgCmmMonad. Other functions that duplicate the environment ----     forkLneBody, forkAlts, codeOnly - duplicate that information. In other---     words, we only need to clean the environment of the self-loop information---     when compiling right hand side of a closure (binding).------   * When compiling a call (cgIdApp) we use getCallMethod to decide what kind---     of call will be generated. getCallMethod decides to generate a self---     recursive tail call when (a) environment stores information about---     possible self tail-call; (b) that tail call is to a function currently---     being compiled; (c) number of passed non-void arguments is equal to---     function's arity. (d) loopification is turned on via -floopification---     command-line option.------   * Command line option to turn loopification on and off is implemented in---     DynFlags.--------- Note [Void arguments in self-recursive tail calls]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ State# tokens can get in the way of the loopification optimization as seen in--- #11372. Consider this:------ foo :: [a]---     -> (a -> State# s -> (# State s, Bool #))---     -> State# s---     -> (# State# s, Maybe a #)--- foo [] f s = (# s, Nothing #)--- foo (x:xs) f s = case f x s of---      (# s', b #) -> case b of---          True -> (# s', Just x #)---          False -> foo xs f s'------ We would like to compile the call to foo as a local jump instead of a call--- (see Note [Self-recursive tail calls]). However, the generated function has--- an arity of 2 while we apply it to 3 arguments, one of them being of void--- type. Thus, we mustn't count arguments of void type when checking whether--- we can turn a call into a self-recursive jump.-----emitEnter :: CmmExpr -> FCode ReturnKind-emitEnter fun = do-  { dflags <- getDynFlags-  ; adjustHpBackwards-  ; sequel <- getSequel-  ; updfr_off <- getUpdFrameOff-  ; case sequel of-      -- For a return, we have the option of generating a tag-test or-      -- not.  If the value is tagged, we can return directly, which-      -- is quicker than entering the value.  This is a code-      -- size/speed trade-off: when optimising for speed rather than-      -- size we could generate the tag test.-      ---      -- Right now, we do what the old codegen did, and omit the tag-      -- test, just generating an enter.-      Return -> do-        { let entry = entryCode dflags $ closureInfoPtr dflags $ CmmReg nodeReg-        ; emit $ mkJump dflags NativeNodeCall entry-                        [cmmUntag dflags fun] updfr_off-        ; return AssignedDirectly-        }--      -- The result will be scrutinised in the sequel.  This is where-      -- we generate a tag-test to avoid entering the closure if-      -- possible.-      ---      -- The generated code will be something like this:-      ---      --    R1 = fun  -- copyout-      --    if (fun & 7 != 0) goto Lret else goto Lcall-      --  Lcall:-      --    call [fun] returns to Lret-      --  Lret:-      --    fun' = R1  -- copyin-      --    ...-      ---      -- Note in particular that the label Lret is used as a-      -- destination by both the tag-test and the call.  This is-      -- because Lret will necessarily be a proc-point, and we want to-      -- ensure that we generate only one proc-point for this-      -- sequence.-      ---      -- Furthermore, we tell the caller that we generated a native-      -- return continuation by returning (ReturnedTo Lret off), so-      -- that the continuation can be reused by the heap-check failure-      -- code in the enclosing case expression.-      ---      AssignTo res_regs _ -> do-       { lret <- newBlockId-       ; let (off, _, copyin) = copyInOflow dflags NativeReturn (Young lret) res_regs []-       ; lcall <- newBlockId-       ; updfr_off <- getUpdFrameOff-       ; let area = Young lret-       ; let (outArgs, regs, copyout) = copyOutOflow dflags NativeNodeCall Call area-                                          [fun] updfr_off []-         -- refer to fun via nodeReg after the copyout, to avoid having-         -- both live simultaneously; this sometimes enables fun to be-         -- inlined in the RHS of the R1 assignment.-       ; let entry = entryCode dflags (closureInfoPtr dflags (CmmReg nodeReg))-             the_call = toCall entry (Just lret) updfr_off off outArgs regs-       ; tscope <- getTickScope-       ; emit $-           copyout <*>-           mkCbranch (cmmIsTagged dflags (CmmReg nodeReg))-                     lret lcall Nothing <*>-           outOfLine lcall (the_call,tscope) <*>-           mkLabel lret tscope <*>-           copyin-       ; return (ReturnedTo lret off)-       }-  }-----------------------------------------------------------------------------              Ticks----------------------------------------------------------------------------- | Generate Cmm code for a tick. Depending on the type of Tickish,--- this will either generate actual Cmm instrumentation code, or--- simply pass on the annotation as a @CmmTickish@.-cgTick :: Tickish Id -> FCode ()-cgTick tick-  = do { dflags <- getDynFlags-       ; case tick of-           ProfNote   cc t p -> emitSetCCC cc t p-           HpcTick    m n    -> emit (mkTickBox dflags m n)-           SourceNote s n    -> emitTick $ SourceNote s n-           _other            -> return () -- ignore-       }
− codeGen/StgCmmExtCode.hs
@@ -1,253 +0,0 @@--- | Our extended FCode monad.---- We add a mapping from names to CmmExpr, to support local variable names in--- the concrete C-- code.  The unique supply of the underlying FCode monad--- is used to grab a new unique for each local variable.---- In C--, a local variable can be declared anywhere within a proc,--- and it scopes from the beginning of the proc to the end.  Hence, we have--- to collect declarations as we parse the proc, and feed the environment--- back in circularly (to avoid a two-pass algorithm).--module StgCmmExtCode (-        CmmParse, unEC,-        Named(..), Env,--        loopDecls,-        getEnv,--        withName,-        getName,--        newLocal,-        newLabel,-        newBlockId,-        newFunctionName,-        newImport,-        lookupLabel,-        lookupName,--        code,-        emit, emitLabel, emitAssign, emitStore,-        getCode, getCodeR, getCodeScoped,-        emitOutOfLine,-        withUpdFrameOff, getUpdFrameOff-)--where--import GhcPrelude--import qualified StgCmmMonad as F-import StgCmmMonad (FCode, newUnique)--import Cmm-import CLabel-import MkGraph--import BlockId-import DynFlags-import FastString-import Module-import UniqFM-import Unique-import UniqSupply--import Control.Monad (liftM, ap)---- | The environment contains variable definitions or blockids.-data Named-        = VarN CmmExpr          -- ^ Holds CmmLit(CmmLabel ..) which gives the label type,-                                --      eg, RtsLabel, ForeignLabel, CmmLabel etc.--        | FunN   UnitId      -- ^ A function name from this package-        | LabelN BlockId                -- ^ A blockid of some code or data.---- | An environment of named things.-type Env        = UniqFM Named---- | Local declarations that are in scope during code generation.-type Decls      = [(FastString,Named)]---- | Does a computation in the FCode monad, with a current environment---      and a list of local declarations. Returns the resulting list of declarations.-newtype CmmParse a-        = EC { unEC :: String -> Env -> Decls -> FCode (Decls, a) }--type ExtCode = CmmParse ()--returnExtFC :: a -> CmmParse a-returnExtFC a   = EC $ \_ _ s -> return (s, a)--thenExtFC :: CmmParse a -> (a -> CmmParse b) -> CmmParse b-thenExtFC (EC m) k = EC $ \c e s -> do (s',r) <- m c e s; unEC (k r) c e s'--instance Functor CmmParse where-      fmap = liftM--instance Applicative CmmParse where-      pure = returnExtFC-      (<*>) = ap--instance Monad CmmParse where-  (>>=) = thenExtFC--instance MonadUnique CmmParse where-  getUniqueSupplyM = code getUniqueSupplyM-  getUniqueM = EC $ \_ _ decls -> do-    u <- getUniqueM-    return (decls, u)--instance HasDynFlags CmmParse where-    getDynFlags = EC (\_ _ d -> do dflags <- getDynFlags-                                   return (d, dflags))----- | Takes the variable decarations and imports from the monad---      and makes an environment, which is looped back into the computation.---      In this way, we can have embedded declarations that scope over the whole---      procedure, and imports that scope over the entire module.---      Discards the local declaration contained within decl'----loopDecls :: CmmParse a -> CmmParse a-loopDecls (EC fcode) =-      EC $ \c e globalDecls -> do-        (_, a) <- F.fixC $ \ ~(decls, _) ->-          fcode c (addListToUFM e decls) globalDecls-        return (globalDecls, a)----- | Get the current environment from the monad.-getEnv :: CmmParse Env-getEnv  = EC $ \_ e s -> return (s, e)---- | Get the current context name from the monad-getName :: CmmParse String-getName  = EC $ \c _ s -> return (s, c)---- | Set context name for a sub-parse-withName :: String -> CmmParse a -> CmmParse a-withName c' (EC fcode) = EC $ \_ e s -> fcode c' e s--addDecl :: FastString -> Named -> ExtCode-addDecl name named = EC $ \_ _ s -> return ((name, named) : s, ())----- | Add a new variable to the list of local declarations.---      The CmmExpr says where the value is stored.-addVarDecl :: FastString -> CmmExpr -> ExtCode-addVarDecl var expr = addDecl var (VarN expr)---- | Add a new label to the list of local declarations.-addLabel :: FastString -> BlockId -> ExtCode-addLabel name block_id = addDecl name (LabelN block_id)----- | Create a fresh local variable of a given type.-newLocal-        :: CmmType              -- ^ data type-        -> FastString           -- ^ name of variable-        -> CmmParse LocalReg    -- ^ register holding the value--newLocal ty name = do-   u <- code newUnique-   let reg = LocalReg u ty-   addVarDecl name (CmmReg (CmmLocal reg))-   return reg----- | Allocate a fresh label.-newLabel :: FastString -> CmmParse BlockId-newLabel name = do-   u <- code newUnique-   addLabel name (mkBlockId u)-   return (mkBlockId u)---- | Add add a local function to the environment.-newFunctionName-        :: FastString   -- ^ name of the function-        -> UnitId    -- ^ package of the current module-        -> ExtCode--newFunctionName name pkg = addDecl name (FunN pkg)----- | Add an imported foreign label to the list of local declarations.---      If this is done at the start of the module the declaration will scope---      over the whole module.-newImport-        :: (FastString, CLabel)-        -> CmmParse ()--newImport (name, cmmLabel)-   = addVarDecl name (CmmLit (CmmLabel cmmLabel))----- | Lookup the BlockId bound to the label with this name.---      If one hasn't been bound yet, create a fresh one based on the---      Unique of the name.-lookupLabel :: FastString -> CmmParse BlockId-lookupLabel name = do-  env <- getEnv-  return $-     case lookupUFM env name of-        Just (LabelN l) -> l-        _other          -> mkBlockId (newTagUnique (getUnique name) 'L')----- | Lookup the location of a named variable.---      Unknown names are treated as if they had been 'import'ed from the runtime system.---      This saves us a lot of bother in the RTS sources, at the expense of---      deferring some errors to link time.-lookupName :: FastString -> CmmParse CmmExpr-lookupName name = do-  env    <- getEnv-  return $-     case lookupUFM env name of-        Just (VarN e)   -> e-        Just (FunN pkg) -> CmmLit (CmmLabel (mkCmmCodeLabel pkg          name))-        _other          -> CmmLit (CmmLabel (mkCmmCodeLabel rtsUnitId name))----- | Lift an FCode computation into the CmmParse monad-code :: FCode a -> CmmParse a-code fc = EC $ \_ _ s -> do-                r <- fc-                return (s, r)--emit :: CmmAGraph -> CmmParse ()-emit = code . F.emit--emitLabel :: BlockId -> CmmParse ()-emitLabel = code . F.emitLabel--emitAssign :: CmmReg  -> CmmExpr -> CmmParse ()-emitAssign l r = code (F.emitAssign l r)--emitStore :: CmmExpr  -> CmmExpr -> CmmParse ()-emitStore l r = code (F.emitStore l r)--getCode :: CmmParse a -> CmmParse CmmAGraph-getCode (EC ec) = EC $ \c e s -> do-  ((s',_), gr) <- F.getCodeR (ec c e s)-  return (s', gr)--getCodeR :: CmmParse a -> CmmParse (a, CmmAGraph)-getCodeR (EC ec) = EC $ \c e s -> do-  ((s', r), gr) <- F.getCodeR (ec c e s)-  return (s', (r,gr))--getCodeScoped :: CmmParse a -> CmmParse (a, CmmAGraphScoped)-getCodeScoped (EC ec) = EC $ \c e s -> do-  ((s', r), gr) <- F.getCodeScoped (ec c e s)-  return (s', (r,gr))--emitOutOfLine :: BlockId -> CmmAGraphScoped -> CmmParse ()-emitOutOfLine l g = code (F.emitOutOfLine l g)--withUpdFrameOff :: UpdFrameOffset -> CmmParse () -> CmmParse ()-withUpdFrameOff size inner-  = EC $ \c e s -> F.withUpdFrameOff size $ (unEC inner) c e s--getUpdFrameOff :: CmmParse UpdFrameOffset-getUpdFrameOff = code $ F.getUpdFrameOff
− codeGen/StgCmmForeign.hs
@@ -1,534 +0,0 @@------------------------------------------------------------------------------------ Code generation for foreign calls.------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmForeign (-  cgForeignCall,-  emitPrimCall, emitCCall,-  emitForeignCall,     -- For CmmParse-  emitSaveThreadState,-  saveThreadState,-  emitLoadThreadState,-  loadThreadState,-  emitOpenNursery,-  emitCloseNursery,- ) where--import GhcPrelude hiding( succ, (<*>) )--import StgSyn-import StgCmmProf (storeCurCCS, ccsType)-import StgCmmEnv-import StgCmmMonad-import StgCmmUtils-import StgCmmClosure-import StgCmmLayout--import BlockId (newBlockId)-import Cmm-import CmmUtils-import MkGraph-import Type-import RepType-import TysPrim-import CLabel-import SMRep-import ForeignCall-import DynFlags-import Maybes-import Outputable-import UniqSupply-import BasicTypes--import Control.Monad---------------------------------------------------------------------------------- Code generation for Foreign Calls---------------------------------------------------------------------------------- | emit code for a foreign call, and return the results to the sequel.----cgForeignCall :: ForeignCall            -- the op-              -> [StgArg]               -- x,y    arguments-              -> Type                   -- result type-              -> FCode ReturnKind--cgForeignCall (CCall (CCallSpec target cconv safety)) stg_args res_ty-  = do  { dflags <- getDynFlags-        ; let -- in the stdcall calling convention, the symbol needs @size appended-              -- to it, where size is the total number of bytes of arguments.  We-              -- attach this info to the CLabel here, and the CLabel pretty printer-              -- will generate the suffix when the label is printed.-            call_size args-              | StdCallConv <- cconv = Just (sum (map arg_size args))-              | otherwise            = Nothing--              -- ToDo: this might not be correct for 64-bit API-            arg_size (arg, _) = max (widthInBytes $ typeWidth $ cmmExprType dflags arg)-                                     (wORD_SIZE dflags)-        ; cmm_args <- getFCallArgs stg_args-        ; (res_regs, res_hints) <- newUnboxedTupleRegs res_ty-        ; let ((call_args, arg_hints), cmm_target)-                = case target of-                   StaticTarget _ _   _      False ->-                       panic "cgForeignCall: unexpected FFI value import"-                   StaticTarget _ lbl mPkgId True-                     -> let labelSource-                                = case mPkgId of-                                        Nothing         -> ForeignLabelInThisPackage-                                        Just pkgId      -> ForeignLabelInPackage pkgId-                            size = call_size cmm_args-                        in  ( unzip cmm_args-                            , CmmLit (CmmLabel-                                        (mkForeignLabel lbl size labelSource IsFunction)))--                   DynamicTarget    ->  case cmm_args of-                                           (fn,_):rest -> (unzip rest, fn)-                                           [] -> panic "cgForeignCall []"-              fc = ForeignConvention cconv arg_hints res_hints CmmMayReturn-              call_target = ForeignTarget cmm_target fc--        -- we want to emit code for the call, and then emitReturn.-        -- However, if the sequel is AssignTo, we shortcut a little-        -- and generate a foreign call that assigns the results-        -- directly.  Otherwise we end up generating a bunch of-        -- useless "r = r" assignments, which are not merely annoying:-        -- they prevent the common block elimination from working correctly-        -- in the case of a safe foreign call.-        -- See Note [safe foreign call convention]-        ---        ; sequel <- getSequel-        ; case sequel of-            AssignTo assign_to_these _ ->-                emitForeignCall safety assign_to_these call_target call_args--            _something_else ->-                do { _ <- emitForeignCall safety res_regs call_target call_args-                   ; emitReturn (map (CmmReg . CmmLocal) res_regs)-                   }-         }--{- Note [safe foreign call convention]--The simple thing to do for a safe foreign call would be the same as an-unsafe one: just--    emitForeignCall ...-    emitReturn ...--but consider what happens in this case--   case foo x y z of-     (# s, r #) -> ...--The sequel is AssignTo [r].  The call to newUnboxedTupleRegs picks [r]-as the result reg, and we generate--  r = foo(x,y,z) returns to L1  -- emitForeignCall- L1:-  r = r  -- emitReturn-  goto L2-L2:-  ...--Now L1 is a proc point (by definition, it is the continuation of the-safe foreign call).  If L2 does a heap check, then L2 will also be a-proc point.--Furthermore, the stack layout algorithm has to arrange to save r-somewhere between the call and the jump to L1, which is annoying: we-would have to treat r differently from the other live variables, which-have to be saved *before* the call.--So we adopt a special convention for safe foreign calls: the results-are copied out according to the NativeReturn convention by the call,-and the continuation of the call should copyIn the results.  (The-copyOut code is actually inserted when the safe foreign call is-lowered later).  The result regs attached to the safe foreign call are-only used temporarily to hold the results before they are copied out.--We will now generate this:--  r = foo(x,y,z) returns to L1- L1:-  r = R1  -- copyIn, inserted by mkSafeCall-  goto L2- L2:-  ... r ...--And when the safe foreign call is lowered later (see Note [lower safe-foreign calls]) we get this:--  suspendThread()-  r = foo(x,y,z)-  resumeThread()-  R1 = r  -- copyOut, inserted by lowerSafeForeignCall-  jump L1- L1:-  r = R1  -- copyIn, inserted by mkSafeCall-  goto L2- L2:-  ... r ...--Now consider what happens if L2 does a heap check: the Adams-optimisation kicks in and commons up L1 with the heap-check-continuation, resulting in just one proc point instead of two. Yay!--}---emitCCall :: [(CmmFormal,ForeignHint)]-          -> CmmExpr-          -> [(CmmActual,ForeignHint)]-          -> FCode ()-emitCCall hinted_results fn hinted_args-  = void $ emitForeignCall PlayRisky results target args-  where-    (args, arg_hints) = unzip hinted_args-    (results, result_hints) = unzip hinted_results-    target = ForeignTarget fn fc-    fc = ForeignConvention CCallConv arg_hints result_hints CmmMayReturn---emitPrimCall :: [CmmFormal] -> CallishMachOp -> [CmmActual] -> FCode ()-emitPrimCall res op args-  = void $ emitForeignCall PlayRisky res (PrimTarget op) args---- alternative entry point, used by CmmParse-emitForeignCall-        :: Safety-        -> [CmmFormal]          -- where to put the results-        -> ForeignTarget        -- the op-        -> [CmmActual]          -- arguments-        -> FCode ReturnKind-emitForeignCall safety results target args-  | not (playSafe safety) = do-    dflags <- getDynFlags-    let (caller_save, caller_load) = callerSaveVolatileRegs dflags-    emit caller_save-    target' <- load_target_into_temp target-    args' <- mapM maybe_assign_temp args-    emit $ mkUnsafeCall target' results args'-    emit caller_load-    return AssignedDirectly--  | otherwise = do-    dflags <- getDynFlags-    updfr_off <- getUpdFrameOff-    target' <- load_target_into_temp target-    args' <- mapM maybe_assign_temp args-    k <- newBlockId-    let (off, _, copyout) = copyInOflow dflags NativeReturn (Young k) results []-       -- see Note [safe foreign call convention]-    tscope <- getTickScope-    emit $-           (    mkStore (CmmStackSlot (Young k) (widthInBytes (wordWidth dflags)))-                        (CmmLit (CmmBlock k))-            <*> mkLast (CmmForeignCall { tgt  = target'-                                       , res  = results-                                       , args = args'-                                       , succ = k-                                       , ret_args = off-                                       , ret_off = updfr_off-                                       , intrbl = playInterruptible safety })-            <*> mkLabel k tscope-            <*> copyout-           )-    return (ReturnedTo k off)--load_target_into_temp :: ForeignTarget -> FCode ForeignTarget-load_target_into_temp (ForeignTarget expr conv) = do-  tmp <- maybe_assign_temp expr-  return (ForeignTarget tmp conv)-load_target_into_temp other_target@(PrimTarget _) =-  return other_target---- What we want to do here is create a new temporary for the foreign--- call argument if it is not safe to use the expression directly,--- because the expression mentions caller-saves GlobalRegs (see--- Note [Register Parameter Passing]).------ However, we can't pattern-match on the expression here, because--- this is used in a loop by CmmParse, and testing the expression--- results in a black hole.  So we always create a temporary, and rely--- on CmmSink to clean it up later.  (Yuck, ToDo).  The generated code--- ends up being the same, at least for the RTS .cmm code.----maybe_assign_temp :: CmmExpr -> FCode CmmExpr-maybe_assign_temp e = do-  dflags <- getDynFlags-  reg <- newTemp (cmmExprType dflags e)-  emitAssign (CmmLocal reg) e-  return (CmmReg (CmmLocal reg))---- -------------------------------------------------------------------------------- Save/restore the thread state in the TSO---- This stuff can't be done in suspendThread/resumeThread, because it--- refers to global registers which aren't available in the C world.--emitSaveThreadState :: FCode ()-emitSaveThreadState = do-  dflags <- getDynFlags-  code <- saveThreadState dflags-  emit code---- | Produce code to save the current thread state to @CurrentTSO@-saveThreadState :: MonadUnique m => DynFlags -> m CmmAGraph-saveThreadState dflags = do-  tso <- newTemp (gcWord dflags)-  close_nursery <- closeNursery dflags tso-  pure $ catAGraphs [-    -- tso = CurrentTSO;-    mkAssign (CmmLocal tso) currentTSOExpr,-    -- tso->stackobj->sp = Sp;-    mkStore (cmmOffset dflags-                       (CmmLoad (cmmOffset dflags-                                           (CmmReg (CmmLocal tso))-                                           (tso_stackobj dflags))-                                (bWord dflags))-                       (stack_SP dflags))-            spExpr,-    close_nursery,-    -- and save the current cost centre stack in the TSO when profiling:-    if gopt Opt_SccProfilingOn dflags then-        mkStore (cmmOffset dflags (CmmReg (CmmLocal tso)) (tso_CCCS dflags)) cccsExpr-      else mkNop-    ]--emitCloseNursery :: FCode ()-emitCloseNursery = do-  dflags <- getDynFlags-  tso <- newTemp (bWord dflags)-  code <- closeNursery dflags tso-  emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code--{- |-@closeNursery dflags tso@ produces code to close the nursery.-A local register holding the value of @CurrentTSO@ is expected for-efficiency.--Closing the nursery corresponds to the following code:--@-  tso = CurrentTSO;-  cn = CurrentNuresry;--  // Update the allocation limit for the current thread.  We don't-  // check to see whether it has overflowed at this point, that check is-  // made when we run out of space in the current heap block (stg_gc_noregs)-  // and in the scheduler when context switching (schedulePostRunThread).-  tso->alloc_limit -= Hp + WDS(1) - cn->start;--  // Set cn->free to the next unoccupied word in the block-  cn->free = Hp + WDS(1);-@--}-closeNursery :: MonadUnique m => DynFlags -> LocalReg -> m CmmAGraph-closeNursery df tso = do-  let tsoreg  = CmmLocal tso-  cnreg      <- CmmLocal <$> newTemp (bWord df)-  pure $ catAGraphs [-    mkAssign cnreg currentNurseryExpr,--    -- CurrentNursery->free = Hp+1;-    mkStore (nursery_bdescr_free df cnreg) (cmmOffsetW df hpExpr 1),--    let alloc =-           CmmMachOp (mo_wordSub df)-              [ cmmOffsetW df hpExpr 1-              , CmmLoad (nursery_bdescr_start df cnreg) (bWord df)-              ]--        alloc_limit = cmmOffset df (CmmReg tsoreg) (tso_alloc_limit df)-    in--    -- tso->alloc_limit += alloc-    mkStore alloc_limit (CmmMachOp (MO_Sub W64)-                               [ CmmLoad alloc_limit b64-                               , CmmMachOp (mo_WordTo64 df) [alloc] ])-   ]--emitLoadThreadState :: FCode ()-emitLoadThreadState = do-  dflags <- getDynFlags-  code <- loadThreadState dflags-  emit code---- | Produce code to load the current thread state from @CurrentTSO@-loadThreadState :: MonadUnique m => DynFlags -> m CmmAGraph-loadThreadState dflags = do-  tso <- newTemp (gcWord dflags)-  stack <- newTemp (gcWord dflags)-  open_nursery <- openNursery dflags tso-  pure $ catAGraphs [-    -- tso = CurrentTSO;-    mkAssign (CmmLocal tso) currentTSOExpr,-    -- stack = tso->stackobj;-    mkAssign (CmmLocal stack) (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal tso)) (tso_stackobj dflags)) (bWord dflags)),-    -- Sp = stack->sp;-    mkAssign spReg (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal stack)) (stack_SP dflags)) (bWord dflags)),-    -- SpLim = stack->stack + RESERVED_STACK_WORDS;-    mkAssign spLimReg (cmmOffsetW dflags (cmmOffset dflags (CmmReg (CmmLocal stack)) (stack_STACK dflags))-                                (rESERVED_STACK_WORDS dflags)),-    -- HpAlloc = 0;-    --   HpAlloc is assumed to be set to non-zero only by a failed-    --   a heap check, see HeapStackCheck.cmm:GC_GENERIC-    mkAssign hpAllocReg (zeroExpr dflags),-    open_nursery,-    -- and load the current cost centre stack from the TSO when profiling:-    if gopt Opt_SccProfilingOn dflags-       then storeCurCCS-              (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal tso))-                 (tso_CCCS dflags)) (ccsType dflags))-       else mkNop-   ]---emitOpenNursery :: FCode ()-emitOpenNursery = do-  dflags <- getDynFlags-  tso <- newTemp (bWord dflags)-  code <- openNursery dflags tso-  emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code--{- |-@openNursery dflags tso@ produces code to open the nursery. A local register-holding the value of @CurrentTSO@ is expected for efficiency.--Opening the nursery corresponds to the following code:--@-   tso = CurrentTSO;-   cn = CurrentNursery;-   bdfree = CurrentNursery->free;-   bdstart = CurrentNursery->start;--   // We *add* the currently occupied portion of the nursery block to-   // the allocation limit, because we will subtract it again in-   // closeNursery.-   tso->alloc_limit += bdfree - bdstart;--   // Set Hp to the last occupied word of the heap block.  Why not the-   // next unocupied word?  Doing it this way means that we get to use-   // an offset of zero more often, which might lead to slightly smaller-   // code on some architectures.-   Hp = bdfree - WDS(1);--   // Set HpLim to the end of the current nursery block (note that this block-   // might be a block group, consisting of several adjacent blocks.-   HpLim = bdstart + CurrentNursery->blocks*BLOCK_SIZE_W - 1;-@--}-openNursery :: MonadUnique m => DynFlags -> LocalReg -> m CmmAGraph-openNursery df tso = do-  let tsoreg =  CmmLocal tso-  cnreg      <- CmmLocal <$> newTemp (bWord df)-  bdfreereg  <- CmmLocal <$> newTemp (bWord df)-  bdstartreg <- CmmLocal <$> newTemp (bWord df)--  -- These assignments are carefully ordered to reduce register-  -- pressure and generate not completely awful code on x86.  To see-  -- what code we generate, look at the assembly for-  -- stg_returnToStackTop in rts/StgStartup.cmm.-  pure $ catAGraphs [-     mkAssign cnreg currentNurseryExpr,-     mkAssign bdfreereg  (CmmLoad (nursery_bdescr_free df cnreg)  (bWord df)),--     -- Hp = CurrentNursery->free - 1;-     mkAssign hpReg (cmmOffsetW df (CmmReg bdfreereg) (-1)),--     mkAssign bdstartreg (CmmLoad (nursery_bdescr_start df cnreg) (bWord df)),--     -- HpLim = CurrentNursery->start +-     --              CurrentNursery->blocks*BLOCK_SIZE_W - 1;-     mkAssign hpLimReg-         (cmmOffsetExpr df-             (CmmReg bdstartreg)-             (cmmOffset df-               (CmmMachOp (mo_wordMul df) [-                 CmmMachOp (MO_SS_Conv W32 (wordWidth df))-                   [CmmLoad (nursery_bdescr_blocks df cnreg) b32],-                 mkIntExpr df (bLOCK_SIZE df)-                ])-               (-1)-             )-         ),--     -- alloc = bd->free - bd->start-     let alloc =-           CmmMachOp (mo_wordSub df) [CmmReg bdfreereg, CmmReg bdstartreg]--         alloc_limit = cmmOffset df (CmmReg tsoreg) (tso_alloc_limit df)-     in--     -- tso->alloc_limit += alloc-     mkStore alloc_limit (CmmMachOp (MO_Add W64)-                               [ CmmLoad alloc_limit b64-                               , CmmMachOp (mo_WordTo64 df) [alloc] ])--   ]--nursery_bdescr_free, nursery_bdescr_start, nursery_bdescr_blocks-  :: DynFlags -> CmmReg -> CmmExpr-nursery_bdescr_free   dflags cn =-  cmmOffset dflags (CmmReg cn) (oFFSET_bdescr_free dflags)-nursery_bdescr_start  dflags cn =-  cmmOffset dflags (CmmReg cn) (oFFSET_bdescr_start dflags)-nursery_bdescr_blocks dflags cn =-  cmmOffset dflags (CmmReg cn) (oFFSET_bdescr_blocks dflags)--tso_stackobj, tso_CCCS, tso_alloc_limit, stack_STACK, stack_SP :: DynFlags -> ByteOff-tso_stackobj dflags = closureField dflags (oFFSET_StgTSO_stackobj dflags)-tso_alloc_limit dflags = closureField dflags (oFFSET_StgTSO_alloc_limit dflags)-tso_CCCS     dflags = closureField dflags (oFFSET_StgTSO_cccs dflags)-stack_STACK  dflags = closureField dflags (oFFSET_StgStack_stack dflags)-stack_SP     dflags = closureField dflags (oFFSET_StgStack_sp dflags)---closureField :: DynFlags -> ByteOff -> ByteOff-closureField dflags off = off + fixedHdrSize dflags---- -------------------------------------------------------------------------------- For certain types passed to foreign calls, we adjust the actual--- value passed to the call.  For ByteArray#/Array# we pass the--- address of the actual array, not the address of the heap object.--getFCallArgs :: [StgArg] -> FCode [(CmmExpr, ForeignHint)]--- (a) Drop void args--- (b) Add foreign-call shim code--- It's (b) that makes this differ from getNonVoidArgAmodes--getFCallArgs args-  = do  { mb_cmms <- mapM get args-        ; return (catMaybes mb_cmms) }-  where-    get arg | null arg_reps-            = return Nothing-            | otherwise-            = do { cmm <- getArgAmode (NonVoid arg)-                 ; dflags <- getDynFlags-                 ; return (Just (add_shim dflags arg_ty cmm, hint)) }-            where-              arg_ty   = stgArgType arg-              arg_reps = typePrimRep arg_ty-              hint     = typeForeignHint arg_ty--add_shim :: DynFlags -> Type -> CmmExpr -> CmmExpr-add_shim dflags arg_ty expr-  | tycon == arrayPrimTyCon || tycon == mutableArrayPrimTyCon-  = cmmOffsetB dflags expr (arrPtrsHdrSize dflags)--  | tycon == smallArrayPrimTyCon || tycon == smallMutableArrayPrimTyCon-  = cmmOffsetB dflags expr (smallArrPtrsHdrSize dflags)--  | tycon == byteArrayPrimTyCon || tycon == mutableByteArrayPrimTyCon-  = cmmOffsetB dflags expr (arrWordsHdrSize dflags)--  | otherwise = expr-  where-    tycon           = tyConAppTyCon (unwrapType arg_ty)-        -- should be a tycon app, since this is a foreign call
− codeGen/StgCmmHeap.hs
@@ -1,680 +0,0 @@------------------------------------------------------------------------------------ Stg to C--: heap management functions------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmHeap (-        getVirtHp, setVirtHp, setRealHp,-        getHpRelOffset,--        entryHeapCheck, altHeapCheck, noEscapeHeapCheck, altHeapCheckReturnsTo,-        heapStackCheckGen,-        entryHeapCheck',--        mkStaticClosureFields, mkStaticClosure,--        allocDynClosure, allocDynClosureCmm, allocHeapClosure,-        emitSetDynHdr-    ) where--import GhcPrelude hiding ((<*>))--import StgSyn-import CLabel-import StgCmmLayout-import StgCmmUtils-import StgCmmMonad-import StgCmmProf (profDynAlloc, dynProfHdr, staticProfHdr)-import StgCmmTicky-import StgCmmClosure-import StgCmmEnv--import MkGraph--import Hoopl.Label-import SMRep-import BlockId-import Cmm-import CmmUtils-import CostCentre-import IdInfo( CafInfo(..), mayHaveCafRefs )-import Id ( Id )-import Module-import DynFlags-import FastString( mkFastString, fsLit )-import Panic( sorry )--import Control.Monad (when)-import Data.Maybe (isJust)----------------------------------------------------------------              Initialise dynamic heap objects--------------------------------------------------------------allocDynClosure-        :: Maybe Id-        -> CmmInfoTable-        -> LambdaFormInfo-        -> CmmExpr              -- Cost Centre to stick in the object-        -> CmmExpr              -- Cost Centre to blame for this alloc-                                -- (usually the same; sometimes "OVERHEAD")--        -> [(NonVoid StgArg, VirtualHpOffset)]  -- Offsets from start of object-                                                -- ie Info ptr has offset zero.-                                                -- No void args in here-        -> FCode CmmExpr -- returns Hp+n--allocDynClosureCmm-        :: Maybe Id -> CmmInfoTable -> LambdaFormInfo -> CmmExpr -> CmmExpr-        -> [(CmmExpr, ByteOff)]-        -> FCode CmmExpr -- returns Hp+n---- allocDynClosure allocates the thing in the heap,--- and modifies the virtual Hp to account for this.--- The second return value is the graph that sets the value of the--- returned LocalReg, which should point to the closure after executing--- the graph.---- allocDynClosure returns an (Hp+8) CmmExpr, and hence the result is--- only valid until Hp is changed.  The caller should assign the--- result to a LocalReg if it is required to remain live.------ The reason we don't assign it to a LocalReg here is that the caller--- is often about to call regIdInfo, which immediately assigns the--- result of allocDynClosure to a new temp in order to add the tag.--- So by not generating a LocalReg here we avoid a common source of--- new temporaries and save some compile time.  This can be quite--- significant - see test T4801.---allocDynClosure mb_id info_tbl lf_info use_cc _blame_cc args_w_offsets = do-  let (args, offsets) = unzip args_w_offsets-  cmm_args <- mapM getArgAmode args     -- No void args-  allocDynClosureCmm mb_id info_tbl lf_info-                     use_cc _blame_cc (zip cmm_args offsets)---allocDynClosureCmm mb_id info_tbl lf_info use_cc _blame_cc amodes_w_offsets = do-  -- SAY WHAT WE ARE ABOUT TO DO-  let rep = cit_rep info_tbl-  tickyDynAlloc mb_id rep lf_info-  let info_ptr = CmmLit (CmmLabel (cit_lbl info_tbl))-  allocHeapClosure rep info_ptr use_cc amodes_w_offsets----- | Low-level heap object allocation.-allocHeapClosure-  :: SMRep                            -- ^ representation of the object-  -> CmmExpr                          -- ^ info pointer-  -> CmmExpr                          -- ^ cost centre-  -> [(CmmExpr,ByteOff)]              -- ^ payload-  -> FCode CmmExpr                    -- ^ returns the address of the object-allocHeapClosure rep info_ptr use_cc payload = do-  profDynAlloc rep use_cc--  virt_hp <- getVirtHp--  -- Find the offset of the info-ptr word-  let info_offset = virt_hp + 1-            -- info_offset is the VirtualHpOffset of the first-            -- word of the new object-            -- Remember, virtHp points to last allocated word,-            -- ie 1 *before* the info-ptr word of new object.--  base <- getHpRelOffset info_offset-  emitComment $ mkFastString "allocHeapClosure"-  emitSetDynHdr base info_ptr use_cc--  -- Fill in the fields-  hpStore base payload--  -- Bump the virtual heap pointer-  dflags <- getDynFlags-  setVirtHp (virt_hp + heapClosureSizeW dflags rep)--  return base---emitSetDynHdr :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()-emitSetDynHdr base info_ptr ccs-  = do dflags <- getDynFlags-       hpStore base (zip (header dflags) [0, wORD_SIZE dflags ..])-  where-    header :: DynFlags -> [CmmExpr]-    header dflags = [info_ptr] ++ dynProfHdr dflags ccs-        -- ToDo: Parallel stuff-        -- No ticky header---- Store the item (expr,off) in base[off]-hpStore :: CmmExpr -> [(CmmExpr, ByteOff)] -> FCode ()-hpStore base vals = do-  dflags <- getDynFlags-  sequence_ $-    [ emitStore (cmmOffsetB dflags base off) val | (val,off) <- vals ]----------------------------------------------------------------              Layout of static closures---------------------------------------------------------------- Make a static closure, adding on any extra padding needed for CAFs,--- and adding a static link field if necessary.--mkStaticClosureFields-        :: DynFlags-        -> CmmInfoTable-        -> CostCentreStack-        -> CafInfo-        -> [CmmLit]             -- Payload-        -> [CmmLit]             -- The full closure-mkStaticClosureFields dflags info_tbl ccs caf_refs payload-  = mkStaticClosure dflags info_lbl ccs payload padding-        static_link_field saved_info_field-  where-    info_lbl = cit_lbl info_tbl--    -- CAFs must have consistent layout, regardless of whether they-    -- are actually updatable or not.  The layout of a CAF is:-    ---    --        3 saved_info-    --        2 static_link-    --        1 indirectee-    --        0 info ptr-    ---    -- the static_link and saved_info fields must always be in the-    -- same place.  So we use isThunkRep rather than closureUpdReqd-    -- here:--    is_caf = isThunkRep (cit_rep info_tbl)--    padding-        | is_caf && null payload = [mkIntCLit dflags 0]-        | otherwise = []--    static_link_field-        | is_caf || staticClosureNeedsLink (mayHaveCafRefs caf_refs) info_tbl-        = [static_link_value]-        | otherwise-        = []--    saved_info_field-        | is_caf     = [mkIntCLit dflags 0]-        | otherwise  = []--        -- For a static constructor which has NoCafRefs, we set the-        -- static link field to a non-zero value so the garbage-        -- collector will ignore it.-    static_link_value-        | mayHaveCafRefs caf_refs  = mkIntCLit dflags 0-        | otherwise                = mkIntCLit dflags 3  -- No CAF refs-                                      -- See Note [STATIC_LINK fields]-                                      -- in rts/sm/Storage.h--mkStaticClosure :: DynFlags -> CLabel -> CostCentreStack -> [CmmLit]-  -> [CmmLit] -> [CmmLit] -> [CmmLit] -> [CmmLit]-mkStaticClosure dflags info_lbl ccs payload padding static_link_field saved_info_field-  =  [CmmLabel info_lbl]-  ++ staticProfHdr dflags ccs-  ++ payload-  ++ padding-  ++ static_link_field-  ++ saved_info_field----------------------------------------------------------------              Heap overflow checking--------------------------------------------------------------{- Note [Heap checks]-   ~~~~~~~~~~~~~~~~~~-Heap checks come in various forms.  We provide the following entry-points to the runtime system, all of which use the native C-- entry-convention.--  * gc() performs garbage collection and returns-    nothing to its caller--  * A series of canned entry points like-        r = gc_1p( r )-    where r is a pointer.  This performs gc, and-    then returns its argument r to its caller.--  * A series of canned entry points like-        gcfun_2p( f, x, y )-    where f is a function closure of arity 2-    This performs garbage collection, keeping alive the-    three argument ptrs, and then tail-calls f(x,y)--These are used in the following circumstances--* entryHeapCheck: Function entry-    (a) With a canned GC entry sequence-        f( f_clo, x:ptr, y:ptr ) {-             Hp = Hp+8-             if Hp > HpLim goto L-             ...-          L: HpAlloc = 8-             jump gcfun_2p( f_clo, x, y ) }-     Note the tail call to the garbage collector;-     it should do no register shuffling--    (b) No canned sequence-        f( f_clo, x:ptr, y:ptr, ...etc... ) {-          T: Hp = Hp+8-             if Hp > HpLim goto L-             ...-          L: HpAlloc = 8-             call gc()  -- Needs an info table-             goto T }--* altHeapCheck: Immediately following an eval-  Started as-        case f x y of r { (p,q) -> rhs }-  (a) With a canned sequence for the results of f-       (which is the very common case since-       all boxed cases return just one pointer-           ...-           r = f( x, y )-        K:      -- K needs an info table-           Hp = Hp+8-           if Hp > HpLim goto L-           ...code for rhs...--        L: r = gc_1p( r )-           goto K }--        Here, the info table needed by the call-        to gc_1p should be the *same* as the-        one for the call to f; the C-- optimiser-        spots this sharing opportunity)--   (b) No canned sequence for results of f-       Note second info table-           ...-           (r1,r2,r3) = call f( x, y )-        K:-           Hp = Hp+8-           if Hp > HpLim goto L-           ...code for rhs...--        L: call gc()    -- Extra info table here-           goto K--* generalHeapCheck: Anywhere else-  e.g. entry to thunk-       case branch *not* following eval,-       or let-no-escape-  Exactly the same as the previous case:--        K:      -- K needs an info table-           Hp = Hp+8-           if Hp > HpLim goto L-           ...--        L: call gc()-           goto K--}------------------------------------------------------------------- A heap/stack check at a function or thunk entry point.--entryHeapCheck :: ClosureInfo-               -> Maybe LocalReg -- Function (closure environment)-               -> Int            -- Arity -- not same as len args b/c of voids-               -> [LocalReg]     -- Non-void args (empty for thunk)-               -> FCode ()-               -> FCode ()--entryHeapCheck cl_info nodeSet arity args code-  = entryHeapCheck' is_fastf node arity args code-  where-    node = case nodeSet of-              Just r  -> CmmReg (CmmLocal r)-              Nothing -> CmmLit (CmmLabel $ staticClosureLabel cl_info)--    is_fastf = case closureFunInfo cl_info of-                 Just (_, ArgGen _) -> False-                 _otherwise         -> True---- | lower-level version for CmmParse-entryHeapCheck' :: Bool           -- is a known function pattern-                -> CmmExpr        -- expression for the closure pointer-                -> Int            -- Arity -- not same as len args b/c of voids-                -> [LocalReg]     -- Non-void args (empty for thunk)-                -> FCode ()-                -> FCode ()-entryHeapCheck' is_fastf node arity args code-  = do dflags <- getDynFlags-       let is_thunk = arity == 0--           args' = map (CmmReg . CmmLocal) args-           stg_gc_fun    = CmmReg (CmmGlobal GCFun)-           stg_gc_enter1 = CmmReg (CmmGlobal GCEnter1)--           {- Thunks:          jump stg_gc_enter_1--              Function (fast): call (NativeNode) stg_gc_fun(fun, args)--              Function (slow): call (slow) stg_gc_fun(fun, args)-           -}-           gc_call upd-               | is_thunk-                 = mkJump dflags NativeNodeCall stg_gc_enter1 [node] upd--               | is_fastf-                 = mkJump dflags NativeNodeCall stg_gc_fun (node : args') upd--               | otherwise-                 = mkJump dflags Slow stg_gc_fun (node : args') upd--       updfr_sz <- getUpdFrameOff--       loop_id <- newBlockId-       emitLabel loop_id-       heapCheck True True (gc_call updfr_sz <*> mkBranch loop_id) code---- --------------------------------------------------------------- A heap/stack check in a case alternative----- If there are multiple alts and we need to GC, but don't have a--- continuation already (the scrut was simple), then we should--- pre-generate the continuation.  (if there are multiple alts it is--- always a canned GC point).---- altHeapCheck:--- If we have a return continuation,---   then if it is a canned GC pattern,---           then we do mkJumpReturnsTo---           else we do a normal call to stg_gc_noregs---   else if it is a canned GC pattern,---           then generate the continuation and do mkCallReturnsTo---           else we do a normal call to stg_gc_noregs--altHeapCheck :: [LocalReg] -> FCode a -> FCode a-altHeapCheck regs code = altOrNoEscapeHeapCheck False regs code--altOrNoEscapeHeapCheck :: Bool -> [LocalReg] -> FCode a -> FCode a-altOrNoEscapeHeapCheck checkYield regs code = do-    dflags <- getDynFlags-    case cannedGCEntryPoint dflags regs of-      Nothing -> genericGC checkYield code-      Just gc -> do-        lret <- newBlockId-        let (off, _, copyin) = copyInOflow dflags NativeReturn (Young lret) regs []-        lcont <- newBlockId-        tscope <- getTickScope-        emitOutOfLine lret (copyin <*> mkBranch lcont, tscope)-        emitLabel lcont-        cannedGCReturnsTo checkYield False gc regs lret off code--altHeapCheckReturnsTo :: [LocalReg] -> Label -> ByteOff -> FCode a -> FCode a-altHeapCheckReturnsTo regs lret off code-  = do dflags <- getDynFlags-       case cannedGCEntryPoint dflags regs of-           Nothing -> genericGC False code-           Just gc -> cannedGCReturnsTo False True gc regs lret off code---- noEscapeHeapCheck is implemented identically to altHeapCheck (which--- is more efficient), but cannot be optimized away in the non-allocating--- case because it may occur in a loop-noEscapeHeapCheck :: [LocalReg] -> FCode a -> FCode a-noEscapeHeapCheck regs code = altOrNoEscapeHeapCheck True regs code--cannedGCReturnsTo :: Bool -> Bool -> CmmExpr -> [LocalReg] -> Label -> ByteOff-                  -> FCode a-                  -> FCode a-cannedGCReturnsTo checkYield cont_on_stack gc regs lret off code-  = do dflags <- getDynFlags-       updfr_sz <- getUpdFrameOff-       heapCheck False checkYield (gc_call dflags gc updfr_sz) code-  where-    reg_exprs = map (CmmReg . CmmLocal) regs-      -- Note [stg_gc arguments]--      -- NB. we use the NativeReturn convention for passing arguments-      -- to the canned heap-check routines, because we are in a case-      -- alternative and hence the [LocalReg] was passed to us in the-      -- NativeReturn convention.-    gc_call dflags label sp-      | cont_on_stack-      = mkJumpReturnsTo dflags label NativeReturn reg_exprs lret off sp-      | otherwise-      = mkCallReturnsTo dflags label NativeReturn reg_exprs lret off sp []--genericGC :: Bool -> FCode a -> FCode a-genericGC checkYield code-  = do updfr_sz <- getUpdFrameOff-       lretry <- newBlockId-       emitLabel lretry-       call <- mkCall generic_gc (GC, GC) [] [] updfr_sz []-       heapCheck False checkYield (call <*> mkBranch lretry) code--cannedGCEntryPoint :: DynFlags -> [LocalReg] -> Maybe CmmExpr-cannedGCEntryPoint dflags regs-  = case map localRegType regs of-      []  -> Just (mkGcLabel "stg_gc_noregs")-      [ty]-          | isGcPtrType ty -> Just (mkGcLabel "stg_gc_unpt_r1")-          | isFloatType ty -> case width of-                                  W32       -> Just (mkGcLabel "stg_gc_f1")-                                  W64       -> Just (mkGcLabel "stg_gc_d1")-                                  _         -> Nothing--          | width == wordWidth dflags -> Just (mkGcLabel "stg_gc_unbx_r1")-          | width == W64              -> Just (mkGcLabel "stg_gc_l1")-          | otherwise                 -> Nothing-          where-              width = typeWidth ty-      [ty1,ty2]-          |  isGcPtrType ty1-          && isGcPtrType ty2 -> Just (mkGcLabel "stg_gc_pp")-      [ty1,ty2,ty3]-          |  isGcPtrType ty1-          && isGcPtrType ty2-          && isGcPtrType ty3 -> Just (mkGcLabel "stg_gc_ppp")-      [ty1,ty2,ty3,ty4]-          |  isGcPtrType ty1-          && isGcPtrType ty2-          && isGcPtrType ty3-          && isGcPtrType ty4 -> Just (mkGcLabel "stg_gc_pppp")-      _otherwise -> Nothing---- Note [stg_gc arguments]--- It might seem that we could avoid passing the arguments to the--- stg_gc function, because they are already in the right registers.--- While this is usually the case, it isn't always.  Sometimes the--- code generator has cleverly avoided the eval in a case, e.g. in--- ffi/should_run/4221.hs we found------   case a_r1mb of z---     FunPtr x y -> ...------ where a_r1mb is bound a top-level constructor, and is known to be--- evaluated.  The codegen just assigns x, y and z, and continues;--- R1 is never assigned.------ So we'll have to rely on optimisations to eliminatethese--- assignments where possible.----- | The generic GC procedure; no params, no results-generic_gc :: CmmExpr-generic_gc = mkGcLabel "stg_gc_noregs"---- | Create a CLabel for calling a garbage collector entry point-mkGcLabel :: String -> CmmExpr-mkGcLabel s = CmmLit (CmmLabel (mkCmmCodeLabel rtsUnitId (fsLit s)))----------------------------------heapCheck :: Bool -> Bool -> CmmAGraph -> FCode a -> FCode a-heapCheck checkStack checkYield do_gc code-  = getHeapUsage $ \ hpHw ->-    -- Emit heap checks, but be sure to do it lazily so-    -- that the conditionals on hpHw don't cause a black hole-    do  { dflags <- getDynFlags-        ; let mb_alloc_bytes-                 | hpHw > mBLOCK_SIZE = sorry $ unlines-                    [" Trying to allocate more than "++show mBLOCK_SIZE++" bytes.",-                     "",-                     "This is currently not possible due to a limitation of GHC's code generator.",-                     "See http://ghc.haskell.org/trac/ghc/ticket/4505 for details.",-                     "Suggestion: read data from a file instead of having large static data",-                     "structures in code."]-                 | hpHw > 0  = Just (mkIntExpr dflags (hpHw * (wORD_SIZE dflags)))-                 | otherwise = Nothing-                 where mBLOCK_SIZE = bLOCKS_PER_MBLOCK dflags * bLOCK_SIZE_W dflags-              stk_hwm | checkStack = Just (CmmLit CmmHighStackMark)-                      | otherwise  = Nothing-        ; codeOnly $ do_checks stk_hwm checkYield mb_alloc_bytes do_gc-        ; tickyAllocHeap True hpHw-        ; setRealHp hpHw-        ; code }--heapStackCheckGen :: Maybe CmmExpr -> Maybe CmmExpr -> FCode ()-heapStackCheckGen stk_hwm mb_bytes-  = do updfr_sz <- getUpdFrameOff-       lretry <- newBlockId-       emitLabel lretry-       call <- mkCall generic_gc (GC, GC) [] [] updfr_sz []-       do_checks stk_hwm False mb_bytes (call <*> mkBranch lretry)---- Note [Single stack check]--- ~~~~~~~~~~~~~~~~~~~~~~~~~--- When compiling a function we can determine how much stack space it--- will use. We therefore need to perform only a single stack check at--- the beginning of a function to see if we have enough stack space.------ The check boils down to comparing Sp-N with SpLim, where N is the--- amount of stack space needed (see Note [Stack usage] below).  *BUT*--- at this stage of the pipeline we are not supposed to refer to Sp--- itself, because the stack is not yet manifest, so we don't quite--- know where Sp pointing.---- So instead of referring directly to Sp - as we used to do in the--- past - the code generator uses (old + 0) in the stack check. That--- is the address of the first word of the old area, so if we add N--- we'll get the address of highest used word.------ This makes the check robust.  For example, while we need to perform--- only one stack check for each function, we could in theory place--- more stack checks later in the function. They would be redundant,--- but not incorrect (in a sense that they should not change program--- behaviour). We need to make sure however that a stack check--- inserted after incrementing the stack pointer checks for a--- respectively smaller stack space. This would not be the case if the--- code generator produced direct references to Sp. By referencing--- (old + 0) we make sure that we always check for a correct amount of--- stack: when converting (old + 0) to Sp the stack layout phase takes--- into account changes already made to stack pointer. The idea for--- this change came from observations made while debugging #8275.---- Note [Stack usage]--- ~~~~~~~~~~~~~~~~~~--- At the moment we convert from STG to Cmm we don't know N, the--- number of bytes of stack that the function will use, so we use a--- special late-bound CmmLit, namely---       CmmHighStackMark--- to stand for the number of bytes needed. When the stack is made--- manifest, the number of bytes needed is calculated, and used to--- replace occurrences of CmmHighStackMark------ The (Maybe CmmExpr) passed to do_checks is usually---     Just (CmmLit CmmHighStackMark)--- but can also (in certain hand-written RTS functions)---     Just (CmmLit 8)  or some other fixed valuet--- If it is Nothing, we don't generate a stack check at all.--do_checks :: Maybe CmmExpr    -- Should we check the stack?-                              -- See Note [Stack usage]-          -> Bool             -- Should we check for preemption?-          -> Maybe CmmExpr    -- Heap headroom (bytes)-          -> CmmAGraph        -- What to do on failure-          -> FCode ()-do_checks mb_stk_hwm checkYield mb_alloc_lit do_gc = do-  dflags <- getDynFlags-  gc_id <- newBlockId--  let-    Just alloc_lit = mb_alloc_lit--    bump_hp   = cmmOffsetExprB dflags hpExpr alloc_lit--    -- Sp overflow if ((old + 0) - CmmHighStack < SpLim)-    -- At the beginning of a function old + 0 = Sp-    -- See Note [Single stack check]-    sp_oflo sp_hwm =-         CmmMachOp (mo_wordULt dflags)-                  [CmmMachOp (MO_Sub (typeWidth (cmmRegType dflags spReg)))-                             [CmmStackSlot Old 0, sp_hwm],-                   CmmReg spLimReg]--    -- Hp overflow if (Hp > HpLim)-    -- (Hp has been incremented by now)-    -- HpLim points to the LAST WORD of valid allocation space.-    hp_oflo = CmmMachOp (mo_wordUGt dflags) [hpExpr, hpLimExpr]--    alloc_n = mkAssign hpAllocReg alloc_lit--  case mb_stk_hwm of-    Nothing -> return ()-    Just stk_hwm -> tickyStackCheck-      >> (emit =<< mkCmmIfGoto' (sp_oflo stk_hwm) gc_id (Just False) )--  -- Emit new label that might potentially be a header-  -- of a self-recursive tail call.-  -- See Note [Self-recursive loop header].-  self_loop_info <- getSelfLoop-  case self_loop_info of-    Just (_, loop_header_id, _)-        | checkYield && isJust mb_stk_hwm -> emitLabel loop_header_id-    _otherwise -> return ()--  if (isJust mb_alloc_lit)-    then do-     tickyHeapCheck-     emitAssign hpReg bump_hp-     emit =<< mkCmmIfThen' hp_oflo (alloc_n <*> mkBranch gc_id) (Just False)-    else do-      when (checkYield && not (gopt Opt_OmitYields dflags)) $ do-         -- Yielding if HpLim == 0-         let yielding = CmmMachOp (mo_wordEq dflags)-                                  [CmmReg hpLimReg,-                                   CmmLit (zeroCLit dflags)]-         emit =<< mkCmmIfGoto' yielding gc_id (Just False)--  tscope <- getTickScope-  emitOutOfLine gc_id-   (do_gc, tscope) -- this is expected to jump back somewhere--                -- Test for stack pointer exhaustion, then-                -- bump heap pointer, and test for heap exhaustion-                -- Note that we don't move the heap pointer unless the-                -- stack check succeeds.  Otherwise we might end up-                -- with slop at the end of the current block, which can-                -- confuse the LDV profiler.---- Note [Self-recursive loop header]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ Self-recursive loop header is required by loopification optimization (See--- Note [Self-recursive tail calls] in StgCmmExpr). We emit it if:------  1. There is information about self-loop in the FCode environment. We don't---     check the binder (first component of the self_loop_info) because we are---     certain that if the self-loop info is present then we are compiling the---     binder body. Reason: the only possible way to get here with the---     self_loop_info present is from closureCodeBody.------  2. checkYield && isJust mb_stk_hwm. checkYield tells us that it is possible---     to preempt the heap check (see #367 for motivation behind this check). It---     is True for heap checks placed at the entry to a function and---     let-no-escape heap checks but false for other heap checks (eg. in case---     alternatives or created from hand-written high-level Cmm). The second---     check (isJust mb_stk_hwm) is true for heap checks at the entry to a---     function and some heap checks created in hand-written Cmm. Otherwise it---     is Nothing. In other words the only situation when both conditions are---     true is when compiling stack and heap checks at the entry to a---     function. This is the only situation when we want to emit a self-loop---     label.
− codeGen/StgCmmHpc.hs
@@ -1,48 +0,0 @@------------------------------------------------------------------------------------ Code generation for coverage------ (c) Galois Connections, Inc. 2006-----------------------------------------------------------------------------------module StgCmmHpc ( initHpc, mkTickBox ) where--import GhcPrelude--import StgCmmMonad--import MkGraph-import CmmExpr-import CLabel-import Module-import CmmUtils-import StgCmmUtils-import HscTypes-import DynFlags--import Control.Monad--mkTickBox :: DynFlags -> Module -> Int -> CmmAGraph-mkTickBox dflags mod n-  = mkStore tick_box (CmmMachOp (MO_Add W64)-                                [ CmmLoad tick_box b64-                                , CmmLit (CmmInt 1 W64)-                                ])-  where-    tick_box = cmmIndex dflags W64-                        (CmmLit $ CmmLabel $ mkHpcTicksLabel $ mod)-                        n--initHpc :: Module -> HpcInfo -> FCode ()--- Emit top-level tables for HPC and return code to initialise-initHpc _ (NoHpcInfo {})-  = return ()-initHpc this_mod (HpcInfo tickCount _hashNo)-  = do dflags <- getDynFlags-       when (gopt Opt_Hpc dflags) $-           do emitDataLits (mkHpcTicksLabel this_mod)-                           [ (CmmInt 0 W64)-                           | _ <- take tickCount [0 :: Int ..]-                           ]-
− codeGen/StgCmmLayout.hs
@@ -1,623 +0,0 @@-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE CPP #-}------------------------------------------------------------------------------------- Building info tables.------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmLayout (-        mkArgDescr,-        emitCall, emitReturn, adjustHpBackwards,--        emitClosureProcAndInfoTable,-        emitClosureAndInfoTable,--        slowCall, directCall,--        FieldOffOrPadding(..),-        ClosureHeader(..),-        mkVirtHeapOffsets,-        mkVirtHeapOffsetsWithPadding,-        mkVirtConstrOffsets,-        mkVirtConstrSizes,-        getHpRelOffset,--        ArgRep(..), toArgRep, argRepSizeW -- re-exported from StgCmmArgRep-  ) where---#include "HsVersions.h"--import GhcPrelude hiding ((<*>))--import StgCmmClosure-import StgCmmEnv-import StgCmmArgRep -- notably: ( slowCallPattern )-import StgCmmTicky-import StgCmmMonad-import StgCmmUtils--import MkGraph-import SMRep-import BlockId-import Cmm-import CmmUtils-import CmmInfo-import CLabel-import StgSyn-import Id-import TyCon             ( PrimRep(..), primRepSizeB )-import BasicTypes        ( RepArity )-import DynFlags-import Module--import Util-import Data.List-import Outputable-import FastString-import Control.Monad-----------------------------------------------------------------------------                Call and return sequences----------------------------------------------------------------------------- | Return multiple values to the sequel------ If the sequel is @Return@------ >     return (x,y)------ If the sequel is @AssignTo [p,q]@------ >    p=x; q=y;----emitReturn :: [CmmExpr] -> FCode ReturnKind-emitReturn results-  = do { dflags    <- getDynFlags-       ; sequel    <- getSequel-       ; updfr_off <- getUpdFrameOff-       ; case sequel of-           Return ->-             do { adjustHpBackwards-                ; let e = CmmLoad (CmmStackSlot Old updfr_off) (gcWord dflags)-                ; emit (mkReturn dflags (entryCode dflags e) results updfr_off)-                }-           AssignTo regs adjust ->-             do { when adjust adjustHpBackwards-                ; emitMultiAssign  regs results }-       ; return AssignedDirectly-       }----- | @emitCall conv fun args@ makes a call to the entry-code of @fun@,--- using the call/return convention @conv@, passing @args@, and--- returning the results to the current sequel.----emitCall :: (Convention, Convention) -> CmmExpr -> [CmmExpr] -> FCode ReturnKind-emitCall convs fun args-  = emitCallWithExtraStack convs fun args noExtraStack----- | @emitCallWithExtraStack conv fun args stack@ makes a call to the--- entry-code of @fun@, using the call/return convention @conv@,--- passing @args@, pushing some extra stack frames described by--- @stack@, and returning the results to the current sequel.----emitCallWithExtraStack-   :: (Convention, Convention) -> CmmExpr -> [CmmExpr]-   -> [CmmExpr] -> FCode ReturnKind-emitCallWithExtraStack (callConv, retConv) fun args extra_stack-  = do  { dflags <- getDynFlags-        ; adjustHpBackwards-        ; sequel <- getSequel-        ; updfr_off <- getUpdFrameOff-        ; case sequel of-            Return -> do-              emit $ mkJumpExtra dflags callConv fun args updfr_off extra_stack-              return AssignedDirectly-            AssignTo res_regs _ -> do-              k <- newBlockId-              let area = Young k-                  (off, _, copyin) = copyInOflow dflags retConv area res_regs []-                  copyout = mkCallReturnsTo dflags fun callConv args k off updfr_off-                                   extra_stack-              tscope <- getTickScope-              emit (copyout <*> mkLabel k tscope <*> copyin)-              return (ReturnedTo k off)-      }---adjustHpBackwards :: FCode ()--- This function adjusts the heap pointer just before a tail call or--- return.  At a call or return, the virtual heap pointer may be less--- than the real Hp, because the latter was advanced to deal with--- the worst-case branch of the code, and we may be in a better-case--- branch.  In that case, move the real Hp *back* and retract some--- ticky allocation count.------ It *does not* deal with high-water-mark adjustment.  That's done by--- functions which allocate heap.-adjustHpBackwards-  = do  { hp_usg <- getHpUsage-        ; let rHp = realHp hp_usg-              vHp = virtHp hp_usg-              adjust_words = vHp -rHp-        ; new_hp <- getHpRelOffset vHp--        ; emit (if adjust_words == 0-                then mkNop-                else mkAssign hpReg new_hp) -- Generates nothing when vHp==rHp--        ; tickyAllocHeap False adjust_words -- ...ditto--        ; setRealHp vHp-        }-------------------------------------------------------------------------------        Making calls: directCall and slowCall------------------------------------------------------------------------------ General plan is:---   - we'll make *one* fast call, either to the function itself---     (directCall) or to stg_ap_<pat>_fast (slowCall)---     Any left-over arguments will be pushed on the stack,------     e.g. Sp[old+8]  = arg1---          Sp[old+16] = arg2---          Sp[old+32] = stg_ap_pp_info---          R2 = arg3---          R3 = arg4---          call f() return to Nothing updfr_off: 32---directCall :: Convention -> CLabel -> RepArity -> [StgArg] -> FCode ReturnKind--- (directCall f n args)--- calls f(arg1, ..., argn), and applies the result to the remaining args--- The function f has arity n, and there are guaranteed at least n args--- Both arity and args include void args-directCall conv lbl arity stg_args-  = do  { argreps <- getArgRepsAmodes stg_args-        ; direct_call "directCall" conv lbl arity argreps }---slowCall :: CmmExpr -> [StgArg] -> FCode ReturnKind--- (slowCall fun args) applies fun to args, returning the results to Sequel-slowCall fun stg_args-  = do  dflags <- getDynFlags-        argsreps <- getArgRepsAmodes stg_args-        let (rts_fun, arity) = slowCallPattern (map fst argsreps)--        (r, slow_code) <- getCodeR $ do-           r <- direct_call "slow_call" NativeNodeCall-                 (mkRtsApFastLabel rts_fun) arity ((P,Just fun):argsreps)-           emitComment $ mkFastString ("slow_call for " ++-                                      showSDoc dflags (ppr fun) ++-                                      " with pat " ++ unpackFS rts_fun)-           return r--        -- Note [avoid intermediate PAPs]-        let n_args = length stg_args-        if n_args > arity && optLevel dflags >= 2-           then do-             funv <- (CmmReg . CmmLocal) `fmap` assignTemp fun-             fun_iptr <- (CmmReg . CmmLocal) `fmap`-                    assignTemp (closureInfoPtr dflags (cmmUntag dflags funv))--             -- ToDo: we could do slightly better here by reusing the-             -- continuation from the slow call, which we have in r.-             -- Also we'd like to push the continuation on the stack-             -- before the branch, so that we only get one copy of the-             -- code that saves all the live variables across the-             -- call, but that might need some improvements to the-             -- special case in the stack layout code to handle this-             -- (see Note [diamond proc point]).--             fast_code <- getCode $-                emitCall (NativeNodeCall, NativeReturn)-                  (entryCode dflags fun_iptr)-                  (nonVArgs ((P,Just funv):argsreps))--             slow_lbl <- newBlockId-             fast_lbl <- newBlockId-             is_tagged_lbl <- newBlockId-             end_lbl <- newBlockId--             let correct_arity = cmmEqWord dflags (funInfoArity dflags fun_iptr)-                                                  (mkIntExpr dflags n_args)--             tscope <- getTickScope-             emit (mkCbranch (cmmIsTagged dflags funv)-                             is_tagged_lbl slow_lbl (Just True)-                   <*> mkLabel is_tagged_lbl tscope-                   <*> mkCbranch correct_arity fast_lbl slow_lbl (Just True)-                   <*> mkLabel fast_lbl tscope-                   <*> fast_code-                   <*> mkBranch end_lbl-                   <*> mkLabel slow_lbl tscope-                   <*> slow_code-                   <*> mkLabel end_lbl tscope)-             return r--           else do-             emit slow_code-             return r----- Note [avoid intermediate PAPs]------ A slow call which needs multiple generic apply patterns will be--- almost guaranteed to create one or more intermediate PAPs when--- applied to a function that takes the correct number of arguments.--- We try to avoid this situation by generating code to test whether--- we are calling a function with the correct number of arguments--- first, i.e.:------   if (TAG(f) != 0} {  // f is not a thunk---      if (f->info.arity == n) {---         ... make a fast call to f ...---      }---   }---   ... otherwise make the slow call ...------ We *only* do this when the call requires multiple generic apply--- functions, which requires pushing extra stack frames and probably--- results in intermediate PAPs.  (I say probably, because it might be--- that we're over-applying a function, but that seems even less--- likely).------ This very rarely applies, but if it does happen in an inner loop it--- can have a severe impact on performance (#6084).------------------direct_call :: String-            -> Convention     -- e.g. NativeNodeCall or NativeDirectCall-            -> CLabel -> RepArity-            -> [(ArgRep,Maybe CmmExpr)] -> FCode ReturnKind-direct_call caller call_conv lbl arity args-  | debugIsOn && args `lengthLessThan` real_arity  -- Too few args-  = do -- Caller should ensure that there enough args!-       pprPanic "direct_call" $-            text caller <+> ppr arity <+>-            ppr lbl <+> ppr (length args) <+>-            ppr (map snd args) <+> ppr (map fst args)--  | null rest_args  -- Precisely the right number of arguments-  = emitCall (call_conv, NativeReturn) target (nonVArgs args)--  | otherwise       -- Note [over-saturated calls]-  = do dflags <- getDynFlags-       emitCallWithExtraStack (call_conv, NativeReturn)-                              target-                              (nonVArgs fast_args)-                              (nonVArgs (stack_args dflags))-  where-    target = CmmLit (CmmLabel lbl)-    (fast_args, rest_args) = splitAt real_arity args-    stack_args dflags = slowArgs dflags rest_args-    real_arity = case call_conv of-                   NativeNodeCall -> arity+1-                   _              -> arity----- When constructing calls, it is easier to keep the ArgReps and the--- CmmExprs zipped together.  However, a void argument has no--- representation, so we need to use Maybe CmmExpr (the alternative of--- using zeroCLit or even undefined would work, but would be ugly).----getArgRepsAmodes :: [StgArg] -> FCode [(ArgRep, Maybe CmmExpr)]-getArgRepsAmodes = mapM getArgRepAmode-  where getArgRepAmode arg-           | V <- rep  = return (V, Nothing)-           | otherwise = do expr <- getArgAmode (NonVoid arg)-                            return (rep, Just expr)-           where rep = toArgRep (argPrimRep arg)--nonVArgs :: [(ArgRep, Maybe CmmExpr)] -> [CmmExpr]-nonVArgs [] = []-nonVArgs ((_,Nothing)  : args) = nonVArgs args-nonVArgs ((_,Just arg) : args) = arg : nonVArgs args--{--Note [over-saturated calls]--The natural thing to do for an over-saturated call would be to call-the function with the correct number of arguments, and then apply the-remaining arguments to the value returned, e.g.--  f a b c d   (where f has arity 2)-  -->-  r = call f(a,b)-  call r(c,d)--but this entails-  - saving c and d on the stack-  - making a continuation info table-  - at the continuation, loading c and d off the stack into regs-  - finally, call r--Note that since there are a fixed number of different r's-(e.g.  stg_ap_pp_fast), we can also pre-compile continuations-that correspond to each of them, rather than generating a fresh-one for each over-saturated call.--Not only does this generate much less code, it is faster too.  We will-generate something like:--Sp[old+16] = c-Sp[old+24] = d-Sp[old+32] = stg_ap_pp_info-call f(a,b) -- usual calling convention--For the purposes of the CmmCall node, we count this extra stack as-just more arguments that we are passing on the stack (cml_args).--}---- | 'slowArgs' takes a list of function arguments and prepares them for--- pushing on the stack for "extra" arguments to a function which requires--- fewer arguments than we currently have.-slowArgs :: DynFlags -> [(ArgRep, Maybe CmmExpr)] -> [(ArgRep, Maybe CmmExpr)]-slowArgs _ [] = []-slowArgs dflags args -- careful: reps contains voids (V), but args does not-  | gopt Opt_SccProfilingOn dflags-              = save_cccs ++ this_pat ++ slowArgs dflags rest_args-  | otherwise =              this_pat ++ slowArgs dflags rest_args-  where-    (arg_pat, n)            = slowCallPattern (map fst args)-    (call_args, rest_args)  = splitAt n args--    stg_ap_pat = mkCmmRetInfoLabel rtsUnitId arg_pat-    this_pat   = (N, Just (mkLblExpr stg_ap_pat)) : call_args-    save_cccs  = [(N, Just (mkLblExpr save_cccs_lbl)), (N, Just cccsExpr)]-    save_cccs_lbl = mkCmmRetInfoLabel rtsUnitId (fsLit "stg_restore_cccs")--------------------------------------------------------------------------------        Laying out objects on the heap and stack------------------------------------------------------------------------------ The heap always grows upwards, so hpRel is easy to compute-hpRel :: VirtualHpOffset         -- virtual offset of Hp-      -> VirtualHpOffset         -- virtual offset of The Thing-      -> WordOff                -- integer word offset-hpRel hp off = off - hp--getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr--- See Note [Virtual and real heap pointers] in StgCmmMonad-getHpRelOffset virtual_offset-  = do dflags <- getDynFlags-       hp_usg <- getHpUsage-       return (cmmRegOffW dflags hpReg (hpRel (realHp hp_usg) virtual_offset))--data FieldOffOrPadding a-    = FieldOff (NonVoid a) -- Something that needs an offset.-               ByteOff     -- Offset in bytes.-    | Padding ByteOff  -- Length of padding in bytes.-              ByteOff  -- Offset in bytes.---- | Used to tell the various @mkVirtHeapOffsets@ functions what kind--- of header the object has.  This will be accounted for in the--- offsets of the fields returned.-data ClosureHeader-  = NoHeader-  | StdHeader-  | ThunkHeader--mkVirtHeapOffsetsWithPadding-  :: DynFlags-  -> ClosureHeader            -- What kind of header to account for-  -> [NonVoid (PrimRep, a)]   -- Things to make offsets for-  -> ( WordOff                -- Total number of words allocated-     , WordOff                -- Number of words allocated for *pointers*-     , [FieldOffOrPadding a]  -- Either an offset or padding.-     )---- Things with their offsets from start of object in order of--- increasing offset; BUT THIS MAY BE DIFFERENT TO INPUT ORDER--- First in list gets lowest offset, which is initial offset + 1.------ mkVirtHeapOffsetsWithPadding always returns boxed things with smaller offsets--- than the unboxed things--mkVirtHeapOffsetsWithPadding dflags header things =-    ASSERT(not (any (isVoidRep . fst . fromNonVoid) things))-    ( tot_wds-    , bytesToWordsRoundUp dflags bytes_of_ptrs-    , concat (ptrs_w_offsets ++ non_ptrs_w_offsets) ++ final_pad-    )-  where-    hdr_words = case header of-      NoHeader -> 0-      StdHeader -> fixedHdrSizeW dflags-      ThunkHeader -> thunkHdrSize dflags-    hdr_bytes = wordsToBytes dflags hdr_words--    (ptrs, non_ptrs) = partition (isGcPtrRep . fst . fromNonVoid) things--    (bytes_of_ptrs, ptrs_w_offsets) =-       mapAccumL computeOffset 0 ptrs-    (tot_bytes, non_ptrs_w_offsets) =-       mapAccumL computeOffset bytes_of_ptrs non_ptrs--    tot_wds = bytesToWordsRoundUp dflags tot_bytes--    final_pad_size = tot_wds * word_size - tot_bytes-    final_pad-        | final_pad_size > 0 = [(Padding final_pad_size-                                         (hdr_bytes + tot_bytes))]-        | otherwise          = []--    word_size = wORD_SIZE dflags--    computeOffset bytes_so_far nv_thing =-        (new_bytes_so_far, with_padding field_off)-      where-        (rep, thing) = fromNonVoid nv_thing--        -- Size of the field in bytes.-        !sizeB = primRepSizeB dflags rep--        -- Align the start offset (eg, 2-byte value should be 2-byte aligned).-        -- But not more than to a word.-        !align = min word_size sizeB-        !start = roundUpTo bytes_so_far align-        !padding = start - bytes_so_far--        -- Final offset is:-        --   size of header + bytes_so_far + padding-        !final_offset = hdr_bytes + bytes_so_far + padding-        !new_bytes_so_far = start + sizeB-        field_off = FieldOff (NonVoid thing) final_offset--        with_padding field_off-            | padding == 0 = [field_off]-            | otherwise    = [ Padding padding (hdr_bytes + bytes_so_far)-                             , field_off-                             ]---mkVirtHeapOffsets-  :: DynFlags-  -> ClosureHeader            -- What kind of header to account for-  -> [NonVoid (PrimRep,a)]    -- Things to make offsets for-  -> (WordOff,                -- _Total_ number of words allocated-      WordOff,                -- Number of words allocated for *pointers*-      [(NonVoid a, ByteOff)])-mkVirtHeapOffsets dflags header things =-    ( tot_wds-    , ptr_wds-    , [ (field, offset) | (FieldOff field offset) <- things_offsets ]-    )-  where-   (tot_wds, ptr_wds, things_offsets) =-       mkVirtHeapOffsetsWithPadding dflags header things---- | Just like mkVirtHeapOffsets, but for constructors-mkVirtConstrOffsets-  :: DynFlags -> [NonVoid (PrimRep, a)]-  -> (WordOff, WordOff, [(NonVoid a, ByteOff)])-mkVirtConstrOffsets dflags = mkVirtHeapOffsets dflags StdHeader---- | Just like mkVirtConstrOffsets, but used when we don't have the actual--- arguments. Useful when e.g. generating info tables; we just need to know--- sizes of pointer and non-pointer fields.-mkVirtConstrSizes :: DynFlags -> [NonVoid PrimRep] -> (WordOff, WordOff)-mkVirtConstrSizes dflags field_reps-  = (tot_wds, ptr_wds)-  where-    (tot_wds, ptr_wds, _) =-       mkVirtConstrOffsets dflags-         (map (\nv_rep -> NonVoid (fromNonVoid nv_rep, ())) field_reps)---------------------------------------------------------------------------------        Making argument descriptors------  An argument descriptor describes the layout of args on the stack,---  both for         * GC (stack-layout) purposes, and---                * saving/restoring registers when a heap-check fails------ Void arguments aren't important, therefore (contrast constructSlowCall)--------------------------------------------------------------------------------- bring in ARG_P, ARG_N, etc.-#include "rts/storage/FunTypes.h"--mkArgDescr :: DynFlags -> [Id] -> ArgDescr-mkArgDescr dflags args-  = let arg_bits = argBits dflags arg_reps-        arg_reps = filter isNonV (map idArgRep args)-           -- Getting rid of voids eases matching of standard patterns-    in case stdPattern arg_reps of-         Just spec_id -> ArgSpec spec_id-         Nothing      -> ArgGen  arg_bits--argBits :: DynFlags -> [ArgRep] -> [Bool]        -- True for non-ptr, False for ptr-argBits _      []           = []-argBits dflags (P   : args) = False : argBits dflags args-argBits dflags (arg : args) = take (argRepSizeW dflags arg) (repeat True)-                    ++ argBits dflags args-------------------------stdPattern :: [ArgRep] -> Maybe Int-stdPattern reps-  = case reps of-        []    -> Just ARG_NONE        -- just void args, probably-        [N]   -> Just ARG_N-        [P]   -> Just ARG_P-        [F]   -> Just ARG_F-        [D]   -> Just ARG_D-        [L]   -> Just ARG_L-        [V16] -> Just ARG_V16-        [V32] -> Just ARG_V32-        [V64] -> Just ARG_V64--        [N,N] -> Just ARG_NN-        [N,P] -> Just ARG_NP-        [P,N] -> Just ARG_PN-        [P,P] -> Just ARG_PP--        [N,N,N] -> Just ARG_NNN-        [N,N,P] -> Just ARG_NNP-        [N,P,N] -> Just ARG_NPN-        [N,P,P] -> Just ARG_NPP-        [P,N,N] -> Just ARG_PNN-        [P,N,P] -> Just ARG_PNP-        [P,P,N] -> Just ARG_PPN-        [P,P,P] -> Just ARG_PPP--        [P,P,P,P]     -> Just ARG_PPPP-        [P,P,P,P,P]   -> Just ARG_PPPPP-        [P,P,P,P,P,P] -> Just ARG_PPPPPP--        _ -> Nothing---------------------------------------------------------------------------------        Generating the info table and code for a closure--------------------------------------------------------------------------------- Here we make an info table of type 'CmmInfo'.  The concrete--- representation as a list of 'CmmAddr' is handled later--- in the pipeline by 'cmmToRawCmm'.--- When loading the free variables, a function closure pointer may be tagged,--- so we must take it into account.--emitClosureProcAndInfoTable :: Bool                    -- top-level?-                            -> Id                      -- name of the closure-                            -> LambdaFormInfo-                            -> CmmInfoTable-                            -> [NonVoid Id]            -- incoming arguments-                            -> ((Int, LocalReg, [LocalReg]) -> FCode ()) -- function body-                            -> FCode ()-emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl args body- = do   { dflags <- getDynFlags-        -- Bind the binder itself, but only if it's not a top-level-        -- binding. We need non-top let-bindings to refer to the-        -- top-level binding, which this binding would incorrectly shadow.-        ; node <- if top_lvl then return $ idToReg dflags (NonVoid bndr)-                  else bindToReg (NonVoid bndr) lf_info-        ; let node_points = nodeMustPointToIt dflags lf_info-        ; arg_regs <- bindArgsToRegs args-        ; let args' = if node_points then (node : arg_regs) else arg_regs-              conv  = if nodeMustPointToIt dflags lf_info then NativeNodeCall-                                                          else NativeDirectCall-              (offset, _, _) = mkCallEntry dflags conv args' []-        ; emitClosureAndInfoTable info_tbl conv args' $ body (offset, node, arg_regs)-        }---- Data constructors need closures, but not with all the argument handling--- needed for functions. The shared part goes here.-emitClosureAndInfoTable ::-  CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode ()-emitClosureAndInfoTable info_tbl conv args body-  = do { (_, blks) <- getCodeScoped body-       ; let entry_lbl = toEntryLbl (cit_lbl info_tbl)-       ; emitProcWithConvention conv (Just info_tbl) entry_lbl args blks-       }
− codeGen/StgCmmMonad.hs
@@ -1,876 +0,0 @@-{-# LANGUAGE GADTs #-}------------------------------------------------------------------------------------- Monad for Stg to C-- code generation------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmMonad (-        FCode,        -- type--        initC, runC, fixC,-        newUnique,--        emitLabel,--        emit, emitDecl, emitProc,-        emitProcWithConvention, emitProcWithStackFrame,-        emitOutOfLine, emitAssign, emitStore,-        emitComment, emitTick, emitUnwind,--        getCmm, aGraphToGraph,-        getCodeR, getCode, getCodeScoped, getHeapUsage,--        mkCmmIfThenElse, mkCmmIfThen, mkCmmIfGoto,-        mkCmmIfThenElse', mkCmmIfThen', mkCmmIfGoto',--        mkCall, mkCmmCall,--        forkClosureBody, forkLneBody, forkAlts, forkAltPair, codeOnly,--        ConTagZ,--        Sequel(..), ReturnKind(..),-        withSequel, getSequel,--        setTickyCtrLabel, getTickyCtrLabel,-        tickScope, getTickScope,--        withUpdFrameOff, getUpdFrameOff, initUpdFrameOff,--        HeapUsage(..), VirtualHpOffset,        initHpUsage,-        getHpUsage,  setHpUsage, heapHWM,-        setVirtHp, getVirtHp, setRealHp,--        getModuleName,--        -- ideally we wouldn't export these, but some other modules access internal state-        getState, setState, getSelfLoop, withSelfLoop, getInfoDown, getDynFlags, getThisPackage,--        -- more localised access to monad state-        CgIdInfo(..),-        getBinds, setBinds,--        -- out of general friendliness, we also export ...-        CgInfoDownwards(..), CgState(..)        -- non-abstract-    ) where--import GhcPrelude hiding( sequence, succ )--import Cmm-import StgCmmClosure-import DynFlags-import Hoopl.Collections-import MkGraph-import BlockId-import CLabel-import SMRep-import Module-import Id-import VarEnv-import OrdList-import BasicTypes( ConTagZ )-import Unique-import UniqSupply-import FastString-import Outputable-import Util--import Control.Monad-import Data.List--------------------------------------------------------------- The FCode monad and its types------ FCode is the monad plumbed through the Stg->Cmm code generator, and--- the Cmm parser.  It contains the following things:------  - A writer monad, collecting:---    - code for the current function, in the form of a CmmAGraph.---      The function "emit" appends more code to this.---    - the top-level CmmDecls accumulated so far------  - A state monad with:---    - the local bindings in scope---    - the current heap usage---    - a UniqSupply------  - A reader monad, for CgInfoDownwards, containing---    - DynFlags,---    - the current Module---    - the update-frame offset---    - the ticky counter label---    - the Sequel (the continuation to return to)---    - the self-recursive tail call information------------------------------------------------------------newtype FCode a = FCode { doFCode :: CgInfoDownwards -> CgState -> (a, CgState) }--instance Functor FCode where-    fmap f (FCode g) = FCode $ \i s -> case g i s of (a, s') -> (f a, s')--instance Applicative FCode where-    pure val = FCode (\_info_down state -> (val, state))-    {-# INLINE pure #-}-    (<*>) = ap--instance Monad FCode where-    FCode m >>= k = FCode $-        \info_down state ->-            case m info_down state of-              (m_result, new_state) ->-                 case k m_result of-                   FCode kcode -> kcode info_down new_state-    {-# INLINE (>>=) #-}--instance MonadUnique FCode where-  getUniqueSupplyM = cgs_uniqs <$> getState-  getUniqueM = FCode $ \_ st ->-    let (u, us') = takeUniqFromSupply (cgs_uniqs st)-    in (u, st { cgs_uniqs = us' })--initC :: IO CgState-initC  = do { uniqs <- mkSplitUniqSupply 'c'-            ; return (initCgState uniqs) }--runC :: DynFlags -> Module -> CgState -> FCode a -> (a,CgState)-runC dflags mod st fcode = doFCode fcode (initCgInfoDown dflags mod) st--fixC :: (a -> FCode a) -> FCode a-fixC fcode = FCode $-    \info_down state -> let (v, s) = doFCode (fcode v) info_down state-                        in (v, s)-------------------------------------------------------------        The code generator environment------------------------------------------------------------- This monadery has some information that it only passes--- *downwards*, as well as some ``state'' which is modified--- as we go along.--data CgInfoDownwards        -- information only passed *downwards* by the monad-  = MkCgInfoDown {-        cgd_dflags    :: DynFlags,-        cgd_mod       :: Module,            -- Module being compiled-        cgd_updfr_off :: UpdFrameOffset,    -- Size of current update frame-        cgd_ticky     :: CLabel,            -- Current destination for ticky counts-        cgd_sequel    :: Sequel,            -- What to do at end of basic block-        cgd_self_loop :: Maybe SelfLoopInfo,-- Which tail calls can be compiled-                                            -- as local jumps? See Note-                                            -- [Self-recursive tail calls] in-                                            -- StgCmmExpr-        cgd_tick_scope:: CmmTickScope       -- Tick scope for new blocks & ticks-  }--type CgBindings = IdEnv CgIdInfo--data CgIdInfo-  = CgIdInfo-        { cg_id :: Id   -- Id that this is the info for-                        -- Can differ from the Id at occurrence sites by-                        -- virtue of being externalised, for splittable C-                        -- See Note [Externalise when splitting]-        , cg_lf  :: LambdaFormInfo-        , cg_loc :: CgLoc                     -- CmmExpr for the *tagged* value-        }---- Note [Externalise when splitting]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- If we're splitting the object with -fsplit-objs, we need to--- externalise *all* the top-level names, and then make sure we only--- use the externalised one in any C label we use which refers to this--- name.--instance Outputable CgIdInfo where-  ppr (CgIdInfo { cg_id = id, cg_loc = loc })-    = ppr id <+> text "-->" <+> ppr loc---- Sequel tells what to do with the result of this expression-data Sequel-  = Return              -- Return result(s) to continuation found on the stack.--  | AssignTo-        [LocalReg]      -- Put result(s) in these regs and fall through-                        -- NB: no void arguments here-                        ---        Bool            -- Should we adjust the heap pointer back to-                        -- recover space that's unused on this path?-                        -- We need to do this only if the expression-                        -- may allocate (e.g. it's a foreign call or-                        -- allocating primOp)--instance Outputable Sequel where-    ppr Return = text "Return"-    ppr (AssignTo regs b) = text "AssignTo" <+> ppr regs <+> ppr b---- See Note [sharing continuations] below-data ReturnKind-  = AssignedDirectly-  | ReturnedTo BlockId ByteOff---- Note [sharing continuations]------ ReturnKind says how the expression being compiled returned its--- results: either by assigning directly to the registers specified--- by the Sequel, or by returning to a continuation that does the--- assignments.  The point of this is we might be able to re-use the--- continuation in a subsequent heap-check.  Consider:------    case f x of z---      True  -> <True code>---      False -> <False code>------ Naively we would generate------    R2 = x   -- argument to f---    Sp[young(L1)] = L1---    call f returns to L1---  L1:---    z = R1---    if (z & 1) then Ltrue else Lfalse---  Ltrue:---    Hp = Hp + 24---    if (Hp > HpLim) then L4 else L7---  L4:---    HpAlloc = 24---    goto L5---  L5:---    R1 = z---    Sp[young(L6)] = L6---    call stg_gc_unpt_r1 returns to L6---  L6:---    z = R1---    goto L1---  L7:---    <True code>---  Lfalse:---    <False code>------ We want the gc call in L4 to return to L1, and discard L6.  Note--- that not only can we share L1 and L6, but the assignment of the--- return address in L4 is unnecessary because the return address for--- L1 is already on the stack.  We used to catch the sharing of L1 and--- L6 in the common-block-eliminator, but not the unnecessary return--- address assignment.------ Since this case is so common I decided to make it more explicit and--- robust by programming the sharing directly, rather than relying on--- the common-block eliminator to catch it.  This makes--- common-block-elimination an optional optimisation, and furthermore--- generates less code in the first place that we have to subsequently--- clean up.------ There are some rarer cases of common blocks that we don't catch--- this way, but that's ok.  Common-block-elimination is still available--- to catch them when optimisation is enabled.  Some examples are:------   - when both the True and False branches do a heap check, we---     can share the heap-check failure code L4a and maybe L4------   - in a case-of-case, there might be multiple continuations that---     we can common up.------ It is always safe to use AssignedDirectly.  Expressions that jump--- to the continuation from multiple places (e.g. case expressions)--- fall back to AssignedDirectly.------initCgInfoDown :: DynFlags -> Module -> CgInfoDownwards-initCgInfoDown dflags mod-  = MkCgInfoDown { cgd_dflags    = dflags-                 , cgd_mod       = mod-                 , cgd_updfr_off = initUpdFrameOff dflags-                 , cgd_ticky     = mkTopTickyCtrLabel-                 , cgd_sequel    = initSequel-                 , cgd_self_loop = Nothing-                 , cgd_tick_scope= GlobalScope }--initSequel :: Sequel-initSequel = Return--initUpdFrameOff :: DynFlags -> UpdFrameOffset-initUpdFrameOff dflags = widthInBytes (wordWidth dflags) -- space for the RA--------------------------------------------------------------        The code generator state-----------------------------------------------------------data CgState-  = MkCgState {-     cgs_stmts :: CmmAGraph,          -- Current procedure--     cgs_tops  :: OrdList CmmDecl,-        -- Other procedures and data blocks in this compilation unit-        -- Both are ordered only so that we can-        -- reduce forward references, when it's easy to do so--     cgs_binds :: CgBindings,--     cgs_hp_usg  :: HeapUsage,--     cgs_uniqs :: UniqSupply }--data HeapUsage   -- See Note [Virtual and real heap pointers]-  = HeapUsage {-        virtHp :: VirtualHpOffset,       -- Virtual offset of highest-allocated word-                                         --   Incremented whenever we allocate-        realHp :: VirtualHpOffset        -- realHp: Virtual offset of real heap ptr-                                         --   Used in instruction addressing modes-    }--type VirtualHpOffset = WordOff---{- Note [Virtual and real heap pointers]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The code generator can allocate one or more objects contiguously, performing-one heap check to cover allocation of all the objects at once.  Let's call-this little chunk of heap space an "allocation chunk".  The code generator-will emit code to-  * Perform a heap-exhaustion check-  * Move the heap pointer to the end of the allocation chunk-  * Allocate multiple objects within the chunk--The code generator uses VirtualHpOffsets to address words within a-single allocation chunk; these start at one and increase positively.-The first word of the chunk has VirtualHpOffset=1, the second has-VirtualHpOffset=2, and so on.-- * The field realHp tracks (the VirtualHpOffset) where the real Hp-   register is pointing.  Typically it'll be pointing to the end of the-   allocation chunk.-- * The field virtHp gives the VirtualHpOffset of the highest-allocated-   word so far.  It starts at zero (meaning no word has been allocated),-   and increases whenever an object is allocated.--The difference between realHp and virtHp gives the offset from the-real Hp register of a particular word in the allocation chunk. This-is what getHpRelOffset does.  Since the returned offset is relative-to the real Hp register, it is valid only until you change the real-Hp register.  (Changing virtHp doesn't matter.)--}---initCgState :: UniqSupply -> CgState-initCgState uniqs-  = MkCgState { cgs_stmts  = mkNop-              , cgs_tops   = nilOL-              , cgs_binds  = emptyVarEnv-              , cgs_hp_usg = initHpUsage-              , cgs_uniqs  = uniqs }--stateIncUsage :: CgState -> CgState -> CgState--- stateIncUsage@ e1 e2 incorporates in e1--- the heap high water mark found in e2.-stateIncUsage s1 s2@(MkCgState { cgs_hp_usg = hp_usg })-     = s1 { cgs_hp_usg  = cgs_hp_usg  s1 `maxHpHw`  virtHp hp_usg }-       `addCodeBlocksFrom` s2--addCodeBlocksFrom :: CgState -> CgState -> CgState--- Add code blocks from the latter to the former--- (The cgs_stmts will often be empty, but not always; see codeOnly)-s1 `addCodeBlocksFrom` s2-  = s1 { cgs_stmts = cgs_stmts s1 MkGraph.<*> cgs_stmts s2,-         cgs_tops  = cgs_tops  s1 `appOL` cgs_tops  s2 }----- The heap high water mark is the larger of virtHp and hwHp.  The latter is--- only records the high water marks of forked-off branches, so to find the--- heap high water mark you have to take the max of virtHp and hwHp.  Remember,--- virtHp never retreats!------ Note Jan 04: ok, so why do we only look at the virtual Hp??--heapHWM :: HeapUsage -> VirtualHpOffset-heapHWM = virtHp--initHpUsage :: HeapUsage-initHpUsage = HeapUsage { virtHp = 0, realHp = 0 }--maxHpHw :: HeapUsage -> VirtualHpOffset -> HeapUsage-hp_usg `maxHpHw` hw = hp_usg { virtHp = virtHp hp_usg `max` hw }------------------------------------------------------------- Operators for getting and setting the state and "info_down".-----------------------------------------------------------getState :: FCode CgState-getState = FCode $ \_info_down state -> (state, state)--setState :: CgState -> FCode ()-setState state = FCode $ \_info_down _ -> ((), state)--getHpUsage :: FCode HeapUsage-getHpUsage = do-        state <- getState-        return $ cgs_hp_usg state--setHpUsage :: HeapUsage -> FCode ()-setHpUsage new_hp_usg = do-        state <- getState-        setState $ state {cgs_hp_usg = new_hp_usg}--setVirtHp :: VirtualHpOffset -> FCode ()-setVirtHp new_virtHp-  = do  { hp_usage <- getHpUsage-        ; setHpUsage (hp_usage {virtHp = new_virtHp}) }--getVirtHp :: FCode VirtualHpOffset-getVirtHp-  = do  { hp_usage <- getHpUsage-        ; return (virtHp hp_usage) }--setRealHp ::  VirtualHpOffset -> FCode ()-setRealHp new_realHp-  = do  { hp_usage <- getHpUsage-        ; setHpUsage (hp_usage {realHp = new_realHp}) }--getBinds :: FCode CgBindings-getBinds = do-        state <- getState-        return $ cgs_binds state--setBinds :: CgBindings -> FCode ()-setBinds new_binds = do-        state <- getState-        setState $ state {cgs_binds = new_binds}--withState :: FCode a -> CgState -> FCode (a,CgState)-withState (FCode fcode) newstate = FCode $ \info_down state ->-  case fcode info_down newstate of-    (retval, state2) -> ((retval,state2), state)--newUniqSupply :: FCode UniqSupply-newUniqSupply = do-        state <- getState-        let (us1, us2) = splitUniqSupply (cgs_uniqs state)-        setState $ state { cgs_uniqs = us1 }-        return us2--newUnique :: FCode Unique-newUnique = do-        state <- getState-        let (u,us') = takeUniqFromSupply (cgs_uniqs state)-        setState $ state { cgs_uniqs = us' }-        return u---------------------getInfoDown :: FCode CgInfoDownwards-getInfoDown = FCode $ \info_down state -> (info_down,state)--getSelfLoop :: FCode (Maybe SelfLoopInfo)-getSelfLoop = do-        info_down <- getInfoDown-        return $ cgd_self_loop info_down--withSelfLoop :: SelfLoopInfo -> FCode a -> FCode a-withSelfLoop self_loop code = do-        info_down <- getInfoDown-        withInfoDown code (info_down {cgd_self_loop = Just self_loop})--instance HasDynFlags FCode where-    getDynFlags = liftM cgd_dflags getInfoDown--getThisPackage :: FCode UnitId-getThisPackage = liftM thisPackage getDynFlags--withInfoDown :: FCode a -> CgInfoDownwards -> FCode a-withInfoDown (FCode fcode) info_down = FCode $ \_ state -> fcode info_down state---- ------------------------------------------------------------------------------- Get the current module name--getModuleName :: FCode Module-getModuleName = do { info <- getInfoDown; return (cgd_mod info) }---- ------------------------------------------------------------------------------- Get/set the end-of-block info--withSequel :: Sequel -> FCode a -> FCode a-withSequel sequel code-  = do  { info  <- getInfoDown-        ; withInfoDown code (info {cgd_sequel = sequel, cgd_self_loop = Nothing }) }--getSequel :: FCode Sequel-getSequel = do  { info <- getInfoDown-                ; return (cgd_sequel info) }---- ------------------------------------------------------------------------------- Get/set the size of the update frame---- We keep track of the size of the update frame so that we--- can set the stack pointer to the proper address on return--- (or tail call) from the closure.--- There should be at most one update frame for each closure.--- Note: I'm including the size of the original return address--- in the size of the update frame -- hence the default case on `get'.--withUpdFrameOff :: UpdFrameOffset -> FCode a -> FCode a-withUpdFrameOff size code-  = do  { info  <- getInfoDown-        ; withInfoDown code (info {cgd_updfr_off = size }) }--getUpdFrameOff :: FCode UpdFrameOffset-getUpdFrameOff-  = do  { info  <- getInfoDown-        ; return $ cgd_updfr_off info }---- ------------------------------------------------------------------------------- Get/set the current ticky counter label--getTickyCtrLabel :: FCode CLabel-getTickyCtrLabel = do-        info <- getInfoDown-        return (cgd_ticky info)--setTickyCtrLabel :: CLabel -> FCode a -> FCode a-setTickyCtrLabel ticky code = do-        info <- getInfoDown-        withInfoDown code (info {cgd_ticky = ticky})---- ------------------------------------------------------------------------------- Manage tick scopes---- | The current tick scope. We will assign this to generated blocks.-getTickScope :: FCode CmmTickScope-getTickScope = do-        info <- getInfoDown-        return (cgd_tick_scope info)---- | Places blocks generated by the given code into a fresh--- (sub-)scope. This will make sure that Cmm annotations in our scope--- will apply to the Cmm blocks generated therein - but not the other--- way around.-tickScope :: FCode a -> FCode a-tickScope code = do-        info <- getInfoDown-        if debugLevel (cgd_dflags info) == 0 then code else do-          u <- newUnique-          let scope' = SubScope u (cgd_tick_scope info)-          withInfoDown code info{ cgd_tick_scope = scope' }--------------------------------------------------------------                 Forking-----------------------------------------------------------forkClosureBody :: FCode () -> FCode ()--- forkClosureBody compiles body_code in environment where:---   - sequel, update stack frame and self loop info are---     set to fresh values---   - state is set to a fresh value, except for local bindings---     that are passed in unchanged. It's up to the enclosed code to---     re-bind the free variables to a field of the closure.--forkClosureBody body_code-  = do  { dflags <- getDynFlags-        ; info   <- getInfoDown-        ; us     <- newUniqSupply-        ; state  <- getState-        ; let body_info_down = info { cgd_sequel    = initSequel-                                    , cgd_updfr_off = initUpdFrameOff dflags-                                    , cgd_self_loop = Nothing }-              fork_state_in = (initCgState us) { cgs_binds = cgs_binds state }-              ((),fork_state_out) = doFCode body_code body_info_down fork_state_in-        ; setState $ state `addCodeBlocksFrom` fork_state_out }--forkLneBody :: FCode a -> FCode a--- 'forkLneBody' takes a body of let-no-escape binding and compiles--- it in the *current* environment, returning the graph thus constructed.------ The current environment is passed on completely unchanged to--- the successor.  In particular, any heap usage from the enclosed--- code is discarded; it should deal with its own heap consumption.-forkLneBody body_code-  = do  { info_down <- getInfoDown-        ; us        <- newUniqSupply-        ; state     <- getState-        ; let fork_state_in = (initCgState us) { cgs_binds = cgs_binds state }-              (result, fork_state_out) = doFCode body_code info_down fork_state_in-        ; setState $ state `addCodeBlocksFrom` fork_state_out-        ; return result }--codeOnly :: FCode () -> FCode ()--- Emit any code from the inner thing into the outer thing--- Do not affect anything else in the outer state--- Used in almost-circular code to prevent false loop dependencies-codeOnly body_code-  = do  { info_down <- getInfoDown-        ; us        <- newUniqSupply-        ; state     <- getState-        ; let   fork_state_in = (initCgState us) { cgs_binds   = cgs_binds state-                                                 , cgs_hp_usg  = cgs_hp_usg state }-                ((), fork_state_out) = doFCode body_code info_down fork_state_in-        ; setState $ state `addCodeBlocksFrom` fork_state_out }--forkAlts :: [FCode a] -> FCode [a]--- (forkAlts' bs d) takes fcodes 'bs' for the branches of a 'case', and--- an fcode for the default case 'd', and compiles each in the current--- environment.  The current environment is passed on unmodified, except--- that the virtual Hp is moved on to the worst virtual Hp for the branches--forkAlts branch_fcodes-  = do  { info_down <- getInfoDown-        ; us <- newUniqSupply-        ; state <- getState-        ; let compile us branch-                = (us2, doFCode branch info_down branch_state)-                where-                  (us1,us2) = splitUniqSupply us-                  branch_state = (initCgState us1) {-                                        cgs_binds  = cgs_binds state-                                      , cgs_hp_usg = cgs_hp_usg state }-              (_us, results) = mapAccumL compile us branch_fcodes-              (branch_results, branch_out_states) = unzip results-        ; setState $ foldl' stateIncUsage state branch_out_states-                -- NB foldl.  state is the *left* argument to stateIncUsage-        ; return branch_results }--forkAltPair :: FCode a -> FCode a -> FCode (a,a)--- Most common use of 'forkAlts'; having this helper function avoids--- accidental use of failible pattern-matches in @do@-notation-forkAltPair x y = do-  xy' <- forkAlts [x,y]-  case xy' of-    [x',y'] -> return (x',y')-    _ -> panic "forkAltPair"---- collect the code emitted by an FCode computation-getCodeR :: FCode a -> FCode (a, CmmAGraph)-getCodeR fcode-  = do  { state1 <- getState-        ; (a, state2) <- withState fcode (state1 { cgs_stmts = mkNop })-        ; setState $ state2 { cgs_stmts = cgs_stmts state1  }-        ; return (a, cgs_stmts state2) }--getCode :: FCode a -> FCode CmmAGraph-getCode fcode = do { (_,stmts) <- getCodeR fcode; return stmts }---- | Generate code into a fresh tick (sub-)scope and gather generated code-getCodeScoped :: FCode a -> FCode (a, CmmAGraphScoped)-getCodeScoped fcode-  = do  { state1 <- getState-        ; ((a, tscope), state2) <--            tickScope $-            flip withState state1 { cgs_stmts = mkNop } $-            do { a   <- fcode-               ; scp <- getTickScope-               ; return (a, scp) }-        ; setState $ state2 { cgs_stmts = cgs_stmts state1  }-        ; return (a, (cgs_stmts state2, tscope)) }----- 'getHeapUsage' applies a function to the amount of heap that it uses.--- It initialises the heap usage to zeros, and passes on an unchanged--- heap usage.------ It is usually a prelude to performing a GC check, so everything must--- be in a tidy and consistent state.------ Note the slightly subtle fixed point behaviour needed here--getHeapUsage :: (VirtualHpOffset -> FCode a) -> FCode a-getHeapUsage fcode-  = do  { info_down <- getInfoDown-        ; state <- getState-        ; let   fstate_in = state { cgs_hp_usg  = initHpUsage }-                (r, fstate_out) = doFCode (fcode hp_hw) info_down fstate_in-                hp_hw = heapHWM (cgs_hp_usg fstate_out)        -- Loop here!--        ; setState $ fstate_out { cgs_hp_usg = cgs_hp_usg state }-        ; return r }---- ------------------------------------------------------------------------------- Combinators for emitting code--emitCgStmt :: CgStmt -> FCode ()-emitCgStmt stmt-  = do  { state <- getState-        ; setState $ state { cgs_stmts = cgs_stmts state `snocOL` stmt }-        }--emitLabel :: BlockId -> FCode ()-emitLabel id = do tscope <- getTickScope-                  emitCgStmt (CgLabel id tscope)--emitComment :: FastString -> FCode ()-emitComment s-  | debugIsOn = emitCgStmt (CgStmt (CmmComment s))-  | otherwise = return ()--emitTick :: CmmTickish -> FCode ()-emitTick = emitCgStmt . CgStmt . CmmTick--emitUnwind :: [(GlobalReg, Maybe CmmExpr)] -> FCode ()-emitUnwind regs = do-  dflags <- getDynFlags-  when (debugLevel dflags > 0) $ do-     emitCgStmt $ CgStmt $ CmmUnwind regs--emitAssign :: CmmReg  -> CmmExpr -> FCode ()-emitAssign l r = emitCgStmt (CgStmt (CmmAssign l r))--emitStore :: CmmExpr  -> CmmExpr -> FCode ()-emitStore l r = emitCgStmt (CgStmt (CmmStore l r))--emit :: CmmAGraph -> FCode ()-emit ag-  = do  { state <- getState-        ; setState $ state { cgs_stmts = cgs_stmts state MkGraph.<*> ag } }--emitDecl :: CmmDecl -> FCode ()-emitDecl decl-  = do  { state <- getState-        ; setState $ state { cgs_tops = cgs_tops state `snocOL` decl } }--emitOutOfLine :: BlockId -> CmmAGraphScoped -> FCode ()-emitOutOfLine l (stmts, tscope) = emitCgStmt (CgFork l stmts tscope)--emitProcWithStackFrame-   :: Convention                        -- entry convention-   -> Maybe CmmInfoTable                -- info table?-   -> CLabel                            -- label for the proc-   -> [CmmFormal]                       -- stack frame-   -> [CmmFormal]                       -- arguments-   -> CmmAGraphScoped                   -- code-   -> Bool                              -- do stack layout?-   -> FCode ()--emitProcWithStackFrame _conv mb_info lbl _stk_args [] blocks False-  = do  { dflags <- getDynFlags-        ; emitProc_ mb_info lbl [] blocks (widthInBytes (wordWidth dflags)) False-        }-emitProcWithStackFrame conv mb_info lbl stk_args args (graph, tscope) True-        -- do layout-  = do  { dflags <- getDynFlags-        ; let (offset, live, entry) = mkCallEntry dflags conv args stk_args-              graph' = entry MkGraph.<*> graph-        ; emitProc_ mb_info lbl live (graph', tscope) offset True-        }-emitProcWithStackFrame _ _ _ _ _ _ _ = panic "emitProcWithStackFrame"--emitProcWithConvention :: Convention -> Maybe CmmInfoTable -> CLabel-                       -> [CmmFormal]-                       -> CmmAGraphScoped-                       -> FCode ()-emitProcWithConvention conv mb_info lbl args blocks-  = emitProcWithStackFrame conv mb_info lbl [] args blocks True--emitProc :: Maybe CmmInfoTable -> CLabel -> [GlobalReg] -> CmmAGraphScoped-         -> Int -> FCode ()-emitProc  mb_info lbl live blocks offset- = emitProc_ mb_info lbl live blocks offset True--emitProc_ :: Maybe CmmInfoTable -> CLabel -> [GlobalReg] -> CmmAGraphScoped-          -> Int -> Bool -> FCode ()-emitProc_ mb_info lbl live blocks offset do_layout-  = do  { dflags <- getDynFlags-        ; l <- newBlockId-        ; let-              blks = labelAGraph l blocks--              infos | Just info <- mb_info = mapSingleton (g_entry blks) info-                    | otherwise            = mapEmpty--              sinfo = StackInfo { arg_space = offset-                                , updfr_space = Just (initUpdFrameOff dflags)-                                , do_layout = do_layout }--              tinfo = TopInfo { info_tbls = infos-                              , stack_info=sinfo}--              proc_block = CmmProc tinfo lbl live blks--        ; state <- getState-        ; setState $ state { cgs_tops = cgs_tops state `snocOL` proc_block } }--getCmm :: FCode () -> FCode CmmGroup--- Get all the CmmTops (there should be no stmts)--- Return a single Cmm which may be split from other Cmms by--- object splitting (at a later stage)-getCmm code-  = do  { state1 <- getState-        ; ((), state2) <- withState code (state1 { cgs_tops  = nilOL })-        ; setState $ state2 { cgs_tops = cgs_tops state1 }-        ; return (fromOL (cgs_tops state2)) }---mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> FCode CmmAGraph-mkCmmIfThenElse e tbranch fbranch = mkCmmIfThenElse' e tbranch fbranch Nothing--mkCmmIfThenElse' :: CmmExpr -> CmmAGraph -> CmmAGraph-                 -> Maybe Bool -> FCode CmmAGraph-mkCmmIfThenElse' e tbranch fbranch likely = do-  tscp  <- getTickScope-  endif <- newBlockId-  tid   <- newBlockId-  fid   <- newBlockId--  let-    (test, then_, else_, likely') = case likely of-      Just False | Just e' <- maybeInvertCmmExpr e-        -- currently NCG doesn't know about likely-        -- annotations. We manually switch then and-        -- else branch so the likely false branch-        -- becomes a fallthrough.-        -> (e', fbranch, tbranch, Just True)-      _ -> (e, tbranch, fbranch, likely)--  return $ catAGraphs [ mkCbranch test tid fid likely'-                      , mkLabel tid tscp, then_, mkBranch endif-                      , mkLabel fid tscp, else_, mkLabel endif tscp ]--mkCmmIfGoto :: CmmExpr -> BlockId -> FCode CmmAGraph-mkCmmIfGoto e tid = mkCmmIfGoto' e tid Nothing--mkCmmIfGoto' :: CmmExpr -> BlockId -> Maybe Bool -> FCode CmmAGraph-mkCmmIfGoto' e tid l = do-  endif <- newBlockId-  tscp  <- getTickScope-  return $ catAGraphs [ mkCbranch e tid endif l, mkLabel endif tscp ]--mkCmmIfThen :: CmmExpr -> CmmAGraph -> FCode CmmAGraph-mkCmmIfThen e tbranch = mkCmmIfThen' e tbranch Nothing--mkCmmIfThen' :: CmmExpr -> CmmAGraph -> Maybe Bool -> FCode CmmAGraph-mkCmmIfThen' e tbranch l = do-  endif <- newBlockId-  tid   <- newBlockId-  tscp  <- getTickScope-  return $ catAGraphs [ mkCbranch e tid endif l-                      , mkLabel tid tscp, tbranch, mkLabel endif tscp ]--mkCall :: CmmExpr -> (Convention, Convention) -> [CmmFormal] -> [CmmExpr]-       -> UpdFrameOffset -> [CmmExpr] -> FCode CmmAGraph-mkCall f (callConv, retConv) results actuals updfr_off extra_stack = do-  dflags <- getDynFlags-  k      <- newBlockId-  tscp   <- getTickScope-  let area = Young k-      (off, _, copyin) = copyInOflow dflags retConv area results []-      copyout = mkCallReturnsTo dflags f callConv actuals k off updfr_off extra_stack-  return $ catAGraphs [copyout, mkLabel k tscp, copyin]--mkCmmCall :: CmmExpr -> [CmmFormal] -> [CmmExpr] -> UpdFrameOffset-          -> FCode CmmAGraph-mkCmmCall f results actuals updfr_off-   = mkCall f (NativeDirectCall, NativeReturn) results actuals updfr_off []----- ------------------------------------------------------------------------------- turn CmmAGraph into CmmGraph, for making a new proc.--aGraphToGraph :: CmmAGraphScoped -> FCode CmmGraph-aGraphToGraph stmts-  = do  { l <- newBlockId-        ; return (labelAGraph l stmts) }
− codeGen/StgCmmPrim.hs
@@ -1,2545 +0,0 @@-{-# LANGUAGE CPP #-}--- emitPrimOp is quite large-{-# OPTIONS_GHC -fmax-pmcheck-iterations=4000000 #-}------------------------------------------------------------------------------------ Stg to C--: primitive operations------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmPrim (-   cgOpApp,-   cgPrimOp, -- internal(ish), used by cgCase to get code for a-             -- comparison without also turning it into a Bool.-   shouldInlinePrimOp- ) where--#include "HsVersions.h"--import GhcPrelude hiding ((<*>))--import StgCmmLayout-import StgCmmForeign-import StgCmmEnv-import StgCmmMonad-import StgCmmUtils-import StgCmmTicky-import StgCmmHeap-import StgCmmProf ( costCentreFrom )--import DynFlags-import Platform-import BasicTypes-import BlockId-import MkGraph-import StgSyn-import Cmm-import Type     ( Type, tyConAppTyCon )-import TyCon-import CLabel-import CmmUtils-import PrimOp-import SMRep-import FastString-import Outputable-import Util--import Data.Bits ((.&.), bit)-import Control.Monad (liftM, when, unless)-----------------------------------------------------------------------------      Primitive operations and foreign calls---------------------------------------------------------------------------{- Note [Foreign call results]-   ~~~~~~~~~~~~~~~~~~~~~~~~~~~-A foreign call always returns an unboxed tuple of results, one-of which is the state token.  This seems to happen even for pure-calls.--Even if we returned a single result for pure calls, it'd still be-right to wrap it in a singleton unboxed tuple, because the result-might be a Haskell closure pointer, we don't want to evaluate it. -}-------------------------------------cgOpApp :: StgOp        -- The op-        -> [StgArg]     -- Arguments-        -> Type         -- Result type (always an unboxed tuple)-        -> FCode ReturnKind---- Foreign calls-cgOpApp (StgFCallOp fcall _) stg_args res_ty-  = cgForeignCall fcall stg_args res_ty-      -- Note [Foreign call results]---- tagToEnum# is special: we need to pull the constructor--- out of the table, and perform an appropriate return.--cgOpApp (StgPrimOp TagToEnumOp) [arg] res_ty-  = ASSERT(isEnumerationTyCon tycon)-    do  { dflags <- getDynFlags-        ; args' <- getNonVoidArgAmodes [arg]-        ; let amode = case args' of [amode] -> amode-                                    _ -> panic "TagToEnumOp had void arg"-        ; emitReturn [tagToClosure dflags tycon amode] }-   where-          -- If you're reading this code in the attempt to figure-          -- out why the compiler panic'ed here, it is probably because-          -- you used tagToEnum# in a non-monomorphic setting, e.g.,-          --         intToTg :: Enum a => Int -> a ; intToTg (I# x#) = tagToEnum# x#-          -- That won't work.-        tycon = tyConAppTyCon res_ty--cgOpApp (StgPrimOp primop) args res_ty = do-    dflags <- getDynFlags-    cmm_args <- getNonVoidArgAmodes args-    case shouldInlinePrimOp dflags primop cmm_args of-        Nothing -> do  -- out-of-line-          let fun = CmmLit (CmmLabel (mkRtsPrimOpLabel primop))-          emitCall (NativeNodeCall, NativeReturn) fun cmm_args--        Just f  -- inline-          | ReturnsPrim VoidRep <- result_info-          -> do f []-                emitReturn []--          | ReturnsPrim rep <- result_info-          -> do dflags <- getDynFlags-                res <- newTemp (primRepCmmType dflags rep)-                f [res]-                emitReturn [CmmReg (CmmLocal res)]--          | ReturnsAlg tycon <- result_info, isUnboxedTupleTyCon tycon-          -> do (regs, _hints) <- newUnboxedTupleRegs res_ty-                f regs-                emitReturn (map (CmmReg . CmmLocal) regs)--          | otherwise -> panic "cgPrimop"-          where-             result_info = getPrimOpResultInfo primop--cgOpApp (StgPrimCallOp primcall) args _res_ty-  = do  { cmm_args <- getNonVoidArgAmodes args-        ; let fun = CmmLit (CmmLabel (mkPrimCallLabel primcall))-        ; emitCall (NativeNodeCall, NativeReturn) fun cmm_args }---- | Interpret the argument as an unsigned value, assuming the value--- is given in two-complement form in the given width.------ Example: @asUnsigned W64 (-1)@ is 18446744073709551615.------ This function is used to work around the fact that many array--- primops take Int# arguments, but we interpret them as unsigned--- quantities in the code gen. This means that we have to be careful--- every time we work on e.g. a CmmInt literal that corresponds to the--- array size, as it might contain a negative Integer value if the--- user passed a value larger than 2^(wORD_SIZE_IN_BITS-1) as the Int#--- literal.-asUnsigned :: Width -> Integer -> Integer-asUnsigned w n = n .&. (bit (widthInBits w) - 1)---- TODO: Several primop implementations (e.g. 'doNewByteArrayOp') use---     ByteOff (or some other fixed width signed type) to represent---     array sizes or indices. This means that these will overflow for---     large enough sizes.---- | Decide whether an out-of-line primop should be replaced by an--- inline implementation. This might happen e.g. if there's enough--- static information, such as statically know arguments, to emit a--- more efficient implementation inline.------ Returns 'Nothing' if this primop should use its out-of-line--- implementation (defined elsewhere) and 'Just' together with a code--- generating function that takes the output regs as arguments--- otherwise.-shouldInlinePrimOp :: DynFlags-                   -> PrimOp     -- ^ The primop-                   -> [CmmExpr]  -- ^ The primop arguments-                   -> Maybe ([LocalReg] -> FCode ())--shouldInlinePrimOp dflags NewByteArrayOp_Char [(CmmLit (CmmInt n w))]-  | asUnsigned w n <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> doNewByteArrayOp res (fromInteger n)--shouldInlinePrimOp dflags NewArrayOp [(CmmLit (CmmInt n w)), init]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] ->-      doNewArrayOp res (arrPtrsRep dflags (fromInteger n)) mkMAP_DIRTY_infoLabel-      [ (mkIntExpr dflags (fromInteger n),-         fixedHdrSize dflags + oFFSET_StgMutArrPtrs_ptrs dflags)-      , (mkIntExpr dflags (nonHdrSizeW (arrPtrsRep dflags (fromInteger n))),-         fixedHdrSize dflags + oFFSET_StgMutArrPtrs_size dflags)-      ]-      (fromInteger n) init--shouldInlinePrimOp _ CopyArrayOp-    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =-        Just $ \ [] -> doCopyArrayOp src src_off dst dst_off (fromInteger n)--shouldInlinePrimOp _ CopyMutableArrayOp-    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =-        Just $ \ [] -> doCopyMutableArrayOp src src_off dst dst_off (fromInteger n)--shouldInlinePrimOp _ CopyArrayArrayOp-    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =-        Just $ \ [] -> doCopyArrayOp src src_off dst dst_off (fromInteger n)--shouldInlinePrimOp _ CopyMutableArrayArrayOp-    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =-        Just $ \ [] -> doCopyMutableArrayOp src src_off dst dst_off (fromInteger n)--shouldInlinePrimOp dflags CloneArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneArray mkMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags CloneMutableArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneArray mkMAP_DIRTY_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags FreezeArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneArray mkMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags ThawArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneArray mkMAP_DIRTY_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags NewSmallArrayOp [(CmmLit (CmmInt n w)), init]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] ->-      doNewArrayOp res (smallArrPtrsRep (fromInteger n)) mkSMAP_DIRTY_infoLabel-      [ (mkIntExpr dflags (fromInteger n),-         fixedHdrSize dflags + oFFSET_StgSmallMutArrPtrs_ptrs dflags)-      ]-      (fromInteger n) init--shouldInlinePrimOp _ CopySmallArrayOp-    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =-        Just $ \ [] -> doCopySmallArrayOp src src_off dst dst_off (fromInteger n)--shouldInlinePrimOp _ CopySmallMutableArrayOp-    [src, src_off, dst, dst_off, (CmmLit (CmmInt n _))] =-        Just $ \ [] -> doCopySmallMutableArrayOp src src_off dst dst_off (fromInteger n)--shouldInlinePrimOp dflags CloneSmallArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags CloneSmallMutableArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneSmallArray mkSMAP_DIRTY_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags FreezeSmallArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_CLEAN_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags ThawSmallArrayOp [src, src_off, (CmmLit (CmmInt n w))]-  | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneSmallArray mkSMAP_DIRTY_infoLabel res src src_off (fromInteger n)--shouldInlinePrimOp dflags primop args-  | primOpOutOfLine primop = Nothing-  | otherwise = Just $ \ regs -> emitPrimOp dflags regs primop args---- TODO: Several primops, such as 'copyArray#', only have an inline--- implementation (below) but could possibly have both an inline--- implementation and an out-of-line implementation, just like--- 'newArray#'. This would lower the amount of code generated,--- hopefully without a performance impact (needs to be measured).------------------------------------------------------cgPrimOp   :: [LocalReg]        -- where to put the results-           -> PrimOp            -- the op-           -> [StgArg]          -- arguments-           -> FCode ()--cgPrimOp results op args-  = do dflags <- getDynFlags-       arg_exprs <- getNonVoidArgAmodes args-       emitPrimOp dflags results op arg_exprs------------------------------------------------------------------------------      Emitting code for a primop---------------------------------------------------------------------------emitPrimOp :: DynFlags-           -> [LocalReg]        -- where to put the results-           -> PrimOp            -- the op-           -> [CmmExpr]         -- arguments-           -> FCode ()---- First we handle various awkward cases specially.  The remaining--- easy cases are then handled by translateOp, defined below.--emitPrimOp _ [res] ParOp [arg]-  =-        -- for now, just implement this in a C function-        -- later, we might want to inline it.-    emitCCall-        [(res,NoHint)]-        (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))-        [(baseExpr, AddrHint), (arg,AddrHint)]--emitPrimOp dflags [res] SparkOp [arg]-  = do-        -- returns the value of arg in res.  We're going to therefore-        -- refer to arg twice (once to pass to newSpark(), and once to-        -- assign to res), so put it in a temporary.-        tmp <- assignTemp arg-        tmp2 <- newTemp (bWord dflags)-        emitCCall-            [(tmp2,NoHint)]-            (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))-            [(baseExpr, AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)]-        emitAssign (CmmLocal res) (CmmReg (CmmLocal tmp))--emitPrimOp dflags [res] GetCCSOfOp [arg]-  = emitAssign (CmmLocal res) val-  where-    val-     | gopt Opt_SccProfilingOn dflags = costCentreFrom dflags (cmmUntag dflags arg)-     | otherwise                      = CmmLit (zeroCLit dflags)--emitPrimOp _ [res] GetCurrentCCSOp [_dummy_arg]-   = emitAssign (CmmLocal res) cccsExpr--emitPrimOp _ [res] MyThreadIdOp []-   = emitAssign (CmmLocal res) currentTSOExpr--emitPrimOp dflags [res] ReadMutVarOp [mutv]-   = emitAssign (CmmLocal res) (cmmLoadIndexW dflags mutv (fixedHdrSizeW dflags) (gcWord dflags))--emitPrimOp dflags res@[] WriteMutVarOp [mutv,var]-   = do -- Without this write barrier, other CPUs may see this pointer before-        -- the writes for the closure it points to have occurred.-        emitPrimCall res MO_WriteBarrier []-        emitStore (cmmOffsetW dflags mutv (fixedHdrSizeW dflags)) var-        emitCCall-                [{-no results-}]-                (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))-                [(baseExpr, AddrHint), (mutv,AddrHint)]----  #define sizzeofByteArrayzh(r,a) \---     r = ((StgArrBytes *)(a))->bytes-emitPrimOp dflags [res] SizeofByteArrayOp [arg]-   = emit $ mkAssign (CmmLocal res) (cmmLoadIndexW dflags arg (fixedHdrSizeW dflags) (bWord dflags))----  #define sizzeofMutableByteArrayzh(r,a) \---      r = ((StgArrBytes *)(a))->bytes-emitPrimOp dflags [res] SizeofMutableByteArrayOp [arg]-   = emitPrimOp dflags [res] SizeofByteArrayOp [arg]----  #define getSizzeofMutableByteArrayzh(r,a) \---      r = ((StgArrBytes *)(a))->bytes-emitPrimOp dflags [res] GetSizeofMutableByteArrayOp [arg]-   = emitAssign (CmmLocal res) (cmmLoadIndexW dflags arg (fixedHdrSizeW dflags) (bWord dflags))-----  #define touchzh(o)                  /* nothing */-emitPrimOp _ res@[] TouchOp args@[_arg]-   = do emitPrimCall res MO_Touch args----  #define byteArrayContentszh(r,a) r = BYTE_ARR_CTS(a)-emitPrimOp dflags [res] ByteArrayContents_Char [arg]-   = emitAssign (CmmLocal res) (cmmOffsetB dflags arg (arrWordsHdrSize dflags))----  #define stableNameToIntzh(r,s)   (r = ((StgStableName *)s)->sn)-emitPrimOp dflags [res] StableNameToIntOp [arg]-   = emitAssign (CmmLocal res) (cmmLoadIndexW dflags arg (fixedHdrSizeW dflags) (bWord dflags))--emitPrimOp dflags [res] ReallyUnsafePtrEqualityOp [arg1,arg2]-   = emitAssign (CmmLocal res) (CmmMachOp (mo_wordEq dflags) [arg1,arg2])----  #define addrToHValuezh(r,a) r=(P_)a-emitPrimOp _      [res] AddrToAnyOp [arg]-   = emitAssign (CmmLocal res) arg----  #define hvalueToAddrzh(r, a) r=(W_)a-emitPrimOp _      [res] AnyToAddrOp [arg]-   = emitAssign (CmmLocal res) arg--{- Freezing arrays-of-ptrs requires changing an info table, for the-   benefit of the generational collector.  It needs to scavenge mutable-   objects, even if they are in old space.  When they become immutable,-   they can be removed from this scavenge list.  -}----  #define unsafeFreezzeArrayzh(r,a)---      {---        SET_INFO((StgClosure *)a,&stg_MUT_ARR_PTRS_FROZEN_DIRTY_info);---        r = a;---      }-emitPrimOp _      [res] UnsafeFreezeArrayOp [arg]-   = emit $ catAGraphs-   [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN_DIRTY_infoLabel)),-     mkAssign (CmmLocal res) arg ]-emitPrimOp _      [res] UnsafeFreezeArrayArrayOp [arg]-   = emit $ catAGraphs-   [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN_DIRTY_infoLabel)),-     mkAssign (CmmLocal res) arg ]-emitPrimOp _      [res] UnsafeFreezeSmallArrayOp [arg]-   = emit $ catAGraphs-   [ setInfo arg (CmmLit (CmmLabel mkSMAP_FROZEN_DIRTY_infoLabel)),-     mkAssign (CmmLocal res) arg ]----  #define unsafeFreezzeByteArrayzh(r,a)       r=(a)-emitPrimOp _      [res] UnsafeFreezeByteArrayOp [arg]-   = emitAssign (CmmLocal res) arg---- Reading/writing pointer arrays--emitPrimOp _      [res] ReadArrayOp  [obj,ix]    = doReadPtrArrayOp res obj ix-emitPrimOp _      [res] IndexArrayOp [obj,ix]    = doReadPtrArrayOp res obj ix-emitPrimOp _      []  WriteArrayOp [obj,ix,v]  = doWritePtrArrayOp obj ix v--emitPrimOp _      [res] IndexArrayArrayOp_ByteArray         [obj,ix]   = doReadPtrArrayOp res obj ix-emitPrimOp _      [res] IndexArrayArrayOp_ArrayArray        [obj,ix]   = doReadPtrArrayOp res obj ix-emitPrimOp _      [res] ReadArrayArrayOp_ByteArray          [obj,ix]   = doReadPtrArrayOp res obj ix-emitPrimOp _      [res] ReadArrayArrayOp_MutableByteArray   [obj,ix]   = doReadPtrArrayOp res obj ix-emitPrimOp _      [res] ReadArrayArrayOp_ArrayArray         [obj,ix]   = doReadPtrArrayOp res obj ix-emitPrimOp _      [res] ReadArrayArrayOp_MutableArrayArray  [obj,ix]   = doReadPtrArrayOp res obj ix-emitPrimOp _      []  WriteArrayArrayOp_ByteArray         [obj,ix,v] = doWritePtrArrayOp obj ix v-emitPrimOp _      []  WriteArrayArrayOp_MutableByteArray  [obj,ix,v] = doWritePtrArrayOp obj ix v-emitPrimOp _      []  WriteArrayArrayOp_ArrayArray        [obj,ix,v] = doWritePtrArrayOp obj ix v-emitPrimOp _      []  WriteArrayArrayOp_MutableArrayArray [obj,ix,v] = doWritePtrArrayOp obj ix v--emitPrimOp _      [res] ReadSmallArrayOp  [obj,ix] = doReadSmallPtrArrayOp res obj ix-emitPrimOp _      [res] IndexSmallArrayOp [obj,ix] = doReadSmallPtrArrayOp res obj ix-emitPrimOp _      []  WriteSmallArrayOp [obj,ix,v] = doWriteSmallPtrArrayOp obj ix v---- Getting the size of pointer arrays--emitPrimOp dflags [res] SizeofArrayOp [arg]-   = emit $ mkAssign (CmmLocal res) (cmmLoadIndexW dflags arg-    (fixedHdrSizeW dflags + bytesToWordsRoundUp dflags (oFFSET_StgMutArrPtrs_ptrs dflags))-        (bWord dflags))-emitPrimOp dflags [res] SizeofMutableArrayOp [arg]-   = emitPrimOp dflags [res] SizeofArrayOp [arg]-emitPrimOp dflags [res] SizeofArrayArrayOp [arg]-   = emitPrimOp dflags [res] SizeofArrayOp [arg]-emitPrimOp dflags [res] SizeofMutableArrayArrayOp [arg]-   = emitPrimOp dflags [res] SizeofArrayOp [arg]--emitPrimOp dflags [res] SizeofSmallArrayOp [arg] =-    emit $ mkAssign (CmmLocal res)-    (cmmLoadIndexW dflags arg-     (fixedHdrSizeW dflags + bytesToWordsRoundUp dflags (oFFSET_StgSmallMutArrPtrs_ptrs dflags))-        (bWord dflags))-emitPrimOp dflags [res] SizeofSmallMutableArrayOp [arg] =-    emitPrimOp dflags [res] SizeofSmallArrayOp [arg]---- IndexXXXoffAddr--emitPrimOp dflags res IndexOffAddrOp_Char             args = doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8 res args-emitPrimOp dflags res IndexOffAddrOp_WideChar         args = doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args-emitPrimOp dflags res IndexOffAddrOp_Int              args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp dflags res IndexOffAddrOp_Word             args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp dflags res IndexOffAddrOp_Addr             args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp _      res IndexOffAddrOp_Float            args = doIndexOffAddrOp   Nothing f32 res args-emitPrimOp _      res IndexOffAddrOp_Double           args = doIndexOffAddrOp   Nothing f64 res args-emitPrimOp dflags res IndexOffAddrOp_StablePtr        args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp dflags res IndexOffAddrOp_Int8             args = doIndexOffAddrOp   (Just (mo_s_8ToWord dflags)) b8  res args-emitPrimOp dflags res IndexOffAddrOp_Int16            args = doIndexOffAddrOp   (Just (mo_s_16ToWord dflags)) b16 res args-emitPrimOp dflags res IndexOffAddrOp_Int32            args = doIndexOffAddrOp   (Just (mo_s_32ToWord dflags)) b32 res args-emitPrimOp _      res IndexOffAddrOp_Int64            args = doIndexOffAddrOp   Nothing b64 res args-emitPrimOp dflags res IndexOffAddrOp_Word8            args = doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8  res args-emitPrimOp dflags res IndexOffAddrOp_Word16           args = doIndexOffAddrOp   (Just (mo_u_16ToWord dflags)) b16 res args-emitPrimOp dflags res IndexOffAddrOp_Word32           args = doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args-emitPrimOp _      res IndexOffAddrOp_Word64           args = doIndexOffAddrOp   Nothing b64 res args---- ReadXXXoffAddr, which are identical, for our purposes, to IndexXXXoffAddr.--emitPrimOp dflags res ReadOffAddrOp_Char             args = doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8 res args-emitPrimOp dflags res ReadOffAddrOp_WideChar         args = doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args-emitPrimOp dflags res ReadOffAddrOp_Int              args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp dflags res ReadOffAddrOp_Word             args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp dflags res ReadOffAddrOp_Addr             args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp _      res ReadOffAddrOp_Float            args = doIndexOffAddrOp   Nothing f32 res args-emitPrimOp _      res ReadOffAddrOp_Double           args = doIndexOffAddrOp   Nothing f64 res args-emitPrimOp dflags res ReadOffAddrOp_StablePtr        args = doIndexOffAddrOp   Nothing (bWord dflags) res args-emitPrimOp dflags res ReadOffAddrOp_Int8             args = doIndexOffAddrOp   (Just (mo_s_8ToWord dflags)) b8  res args-emitPrimOp dflags res ReadOffAddrOp_Int16            args = doIndexOffAddrOp   (Just (mo_s_16ToWord dflags)) b16 res args-emitPrimOp dflags res ReadOffAddrOp_Int32            args = doIndexOffAddrOp   (Just (mo_s_32ToWord dflags)) b32 res args-emitPrimOp _      res ReadOffAddrOp_Int64            args = doIndexOffAddrOp   Nothing b64 res args-emitPrimOp dflags res ReadOffAddrOp_Word8            args = doIndexOffAddrOp   (Just (mo_u_8ToWord dflags)) b8  res args-emitPrimOp dflags res ReadOffAddrOp_Word16           args = doIndexOffAddrOp   (Just (mo_u_16ToWord dflags)) b16 res args-emitPrimOp dflags res ReadOffAddrOp_Word32           args = doIndexOffAddrOp   (Just (mo_u_32ToWord dflags)) b32 res args-emitPrimOp _      res ReadOffAddrOp_Word64           args = doIndexOffAddrOp   Nothing b64 res args---- IndexXXXArray--emitPrimOp dflags res IndexByteArrayOp_Char             args = doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8 res args-emitPrimOp dflags res IndexByteArrayOp_WideChar         args = doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32 res args-emitPrimOp dflags res IndexByteArrayOp_Int              args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp dflags res IndexByteArrayOp_Word             args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp dflags res IndexByteArrayOp_Addr             args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp _      res IndexByteArrayOp_Float            args = doIndexByteArrayOp   Nothing f32 res args-emitPrimOp _      res IndexByteArrayOp_Double           args = doIndexByteArrayOp   Nothing f64 res args-emitPrimOp dflags res IndexByteArrayOp_StablePtr        args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp dflags res IndexByteArrayOp_Int8             args = doIndexByteArrayOp   (Just (mo_s_8ToWord dflags)) b8  res args-emitPrimOp dflags res IndexByteArrayOp_Int16            args = doIndexByteArrayOp   (Just (mo_s_16ToWord dflags)) b16  res args-emitPrimOp dflags res IndexByteArrayOp_Int32            args = doIndexByteArrayOp   (Just (mo_s_32ToWord dflags)) b32  res args-emitPrimOp _      res IndexByteArrayOp_Int64            args = doIndexByteArrayOp   Nothing b64  res args-emitPrimOp dflags res IndexByteArrayOp_Word8            args = doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8  res args-emitPrimOp dflags res IndexByteArrayOp_Word16           args = doIndexByteArrayOp   (Just (mo_u_16ToWord dflags)) b16  res args-emitPrimOp dflags res IndexByteArrayOp_Word32           args = doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32  res args-emitPrimOp _      res IndexByteArrayOp_Word64           args = doIndexByteArrayOp   Nothing b64  res args---- ReadXXXArray, identical to IndexXXXArray.--emitPrimOp dflags res ReadByteArrayOp_Char             args = doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8 res args-emitPrimOp dflags res ReadByteArrayOp_WideChar         args = doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32 res args-emitPrimOp dflags res ReadByteArrayOp_Int              args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp dflags res ReadByteArrayOp_Word             args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp dflags res ReadByteArrayOp_Addr             args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp _      res ReadByteArrayOp_Float            args = doIndexByteArrayOp   Nothing f32 res args-emitPrimOp _      res ReadByteArrayOp_Double           args = doIndexByteArrayOp   Nothing f64 res args-emitPrimOp dflags res ReadByteArrayOp_StablePtr        args = doIndexByteArrayOp   Nothing (bWord dflags) res args-emitPrimOp dflags res ReadByteArrayOp_Int8             args = doIndexByteArrayOp   (Just (mo_s_8ToWord dflags)) b8  res args-emitPrimOp dflags res ReadByteArrayOp_Int16            args = doIndexByteArrayOp   (Just (mo_s_16ToWord dflags)) b16  res args-emitPrimOp dflags res ReadByteArrayOp_Int32            args = doIndexByteArrayOp   (Just (mo_s_32ToWord dflags)) b32  res args-emitPrimOp _      res ReadByteArrayOp_Int64            args = doIndexByteArrayOp   Nothing b64  res args-emitPrimOp dflags res ReadByteArrayOp_Word8            args = doIndexByteArrayOp   (Just (mo_u_8ToWord dflags)) b8  res args-emitPrimOp dflags res ReadByteArrayOp_Word16           args = doIndexByteArrayOp   (Just (mo_u_16ToWord dflags)) b16  res args-emitPrimOp dflags res ReadByteArrayOp_Word32           args = doIndexByteArrayOp   (Just (mo_u_32ToWord dflags)) b32  res args-emitPrimOp _      res ReadByteArrayOp_Word64           args = doIndexByteArrayOp   Nothing b64  res args---- IndexWord8ArrayAsXXX--emitPrimOp dflags res IndexByteArrayOp_Word8AsChar      args = doIndexByteArrayOpAs   (Just (mo_u_8ToWord dflags)) b8 b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsWideChar  args = doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsInt       args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsWord      args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsAddr      args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp _      res IndexByteArrayOp_Word8AsFloat     args = doIndexByteArrayOpAs   Nothing f32 b8 res args-emitPrimOp _      res IndexByteArrayOp_Word8AsDouble    args = doIndexByteArrayOpAs   Nothing f64 b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsStablePtr args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsInt16     args = doIndexByteArrayOpAs   (Just (mo_s_16ToWord dflags)) b16 b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsInt32     args = doIndexByteArrayOpAs   (Just (mo_s_32ToWord dflags)) b32 b8 res args-emitPrimOp _      res IndexByteArrayOp_Word8AsInt64     args = doIndexByteArrayOpAs   Nothing b64 b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsWord16    args = doIndexByteArrayOpAs   (Just (mo_u_16ToWord dflags)) b16 b8 res args-emitPrimOp dflags res IndexByteArrayOp_Word8AsWord32    args = doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args-emitPrimOp _      res IndexByteArrayOp_Word8AsWord64    args = doIndexByteArrayOpAs   Nothing b64 b8 res args---- ReadInt8ArrayAsXXX, identical to IndexInt8ArrayAsXXX--emitPrimOp dflags res ReadByteArrayOp_Word8AsChar      args = doIndexByteArrayOpAs   (Just (mo_u_8ToWord dflags)) b8 b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsWideChar  args = doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsInt       args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsWord      args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsAddr      args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp _      res ReadByteArrayOp_Word8AsFloat     args = doIndexByteArrayOpAs   Nothing f32 b8 res args-emitPrimOp _      res ReadByteArrayOp_Word8AsDouble    args = doIndexByteArrayOpAs   Nothing f64 b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsStablePtr args = doIndexByteArrayOpAs   Nothing (bWord dflags) b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsInt16     args = doIndexByteArrayOpAs   (Just (mo_s_16ToWord dflags)) b16 b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsInt32     args = doIndexByteArrayOpAs   (Just (mo_s_32ToWord dflags)) b32 b8 res args-emitPrimOp _      res ReadByteArrayOp_Word8AsInt64     args = doIndexByteArrayOpAs   Nothing b64 b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsWord16    args = doIndexByteArrayOpAs   (Just (mo_u_16ToWord dflags)) b16 b8 res args-emitPrimOp dflags res ReadByteArrayOp_Word8AsWord32    args = doIndexByteArrayOpAs   (Just (mo_u_32ToWord dflags)) b32 b8 res args-emitPrimOp _      res ReadByteArrayOp_Word8AsWord64    args = doIndexByteArrayOpAs   Nothing b64 b8 res args---- WriteXXXoffAddr--emitPrimOp dflags res WriteOffAddrOp_Char             args = doWriteOffAddrOp (Just (mo_WordTo8 dflags))  b8 res args-emitPrimOp dflags res WriteOffAddrOp_WideChar         args = doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args-emitPrimOp dflags res WriteOffAddrOp_Int              args = doWriteOffAddrOp Nothing (bWord dflags) res args-emitPrimOp dflags res WriteOffAddrOp_Word             args = doWriteOffAddrOp Nothing (bWord dflags) res args-emitPrimOp dflags res WriteOffAddrOp_Addr             args = doWriteOffAddrOp Nothing (bWord dflags) res args-emitPrimOp _      res WriteOffAddrOp_Float            args = doWriteOffAddrOp Nothing f32 res args-emitPrimOp _      res WriteOffAddrOp_Double           args = doWriteOffAddrOp Nothing f64 res args-emitPrimOp dflags res WriteOffAddrOp_StablePtr        args = doWriteOffAddrOp Nothing (bWord dflags) res args-emitPrimOp dflags res WriteOffAddrOp_Int8             args = doWriteOffAddrOp (Just (mo_WordTo8 dflags))  b8 res args-emitPrimOp dflags res WriteOffAddrOp_Int16            args = doWriteOffAddrOp (Just (mo_WordTo16 dflags)) b16 res args-emitPrimOp dflags res WriteOffAddrOp_Int32            args = doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args-emitPrimOp _      res WriteOffAddrOp_Int64            args = doWriteOffAddrOp Nothing b64 res args-emitPrimOp dflags res WriteOffAddrOp_Word8            args = doWriteOffAddrOp (Just (mo_WordTo8 dflags))  b8 res args-emitPrimOp dflags res WriteOffAddrOp_Word16           args = doWriteOffAddrOp (Just (mo_WordTo16 dflags)) b16 res args-emitPrimOp dflags res WriteOffAddrOp_Word32           args = doWriteOffAddrOp (Just (mo_WordTo32 dflags)) b32 res args-emitPrimOp _      res WriteOffAddrOp_Word64           args = doWriteOffAddrOp Nothing b64 res args---- WriteXXXArray--emitPrimOp dflags res WriteByteArrayOp_Char             args = doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8 res args-emitPrimOp dflags res WriteByteArrayOp_WideChar         args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args-emitPrimOp dflags res WriteByteArrayOp_Int              args = doWriteByteArrayOp Nothing (bWord dflags) res args-emitPrimOp dflags res WriteByteArrayOp_Word             args = doWriteByteArrayOp Nothing (bWord dflags) res args-emitPrimOp dflags res WriteByteArrayOp_Addr             args = doWriteByteArrayOp Nothing (bWord dflags) res args-emitPrimOp _      res WriteByteArrayOp_Float            args = doWriteByteArrayOp Nothing f32 res args-emitPrimOp _      res WriteByteArrayOp_Double           args = doWriteByteArrayOp Nothing f64 res args-emitPrimOp dflags res WriteByteArrayOp_StablePtr        args = doWriteByteArrayOp Nothing (bWord dflags) res args-emitPrimOp dflags res WriteByteArrayOp_Int8             args = doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8 res args-emitPrimOp dflags res WriteByteArrayOp_Int16            args = doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b16 res args-emitPrimOp dflags res WriteByteArrayOp_Int32            args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args-emitPrimOp _      res WriteByteArrayOp_Int64            args = doWriteByteArrayOp Nothing b64 res args-emitPrimOp dflags res WriteByteArrayOp_Word8            args = doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8  res args-emitPrimOp dflags res WriteByteArrayOp_Word16           args = doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b16 res args-emitPrimOp dflags res WriteByteArrayOp_Word32           args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b32 res args-emitPrimOp _      res WriteByteArrayOp_Word64           args = doWriteByteArrayOp Nothing b64 res args---- WriteInt8ArrayAsXXX--emitPrimOp dflags res WriteByteArrayOp_Word8AsChar       args = doWriteByteArrayOp (Just (mo_WordTo8 dflags))  b8 res args-emitPrimOp dflags res WriteByteArrayOp_Word8AsWideChar   args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsInt        args = doWriteByteArrayOp Nothing b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsWord       args = doWriteByteArrayOp Nothing b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsAddr       args = doWriteByteArrayOp Nothing b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsFloat      args = doWriteByteArrayOp Nothing b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsDouble     args = doWriteByteArrayOp Nothing b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsStablePtr  args = doWriteByteArrayOp Nothing b8 res args-emitPrimOp dflags res WriteByteArrayOp_Word8AsInt16      args = doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b8 res args-emitPrimOp dflags res WriteByteArrayOp_Word8AsInt32      args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsInt64      args = doWriteByteArrayOp Nothing b8 res args-emitPrimOp dflags res WriteByteArrayOp_Word8AsWord16     args = doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b8 res args-emitPrimOp dflags res WriteByteArrayOp_Word8AsWord32     args = doWriteByteArrayOp (Just (mo_WordTo32 dflags)) b8 res args-emitPrimOp _      res WriteByteArrayOp_Word8AsWord64     args = doWriteByteArrayOp Nothing b8 res args---- Copying and setting byte arrays-emitPrimOp _      [] CopyByteArrayOp [src,src_off,dst,dst_off,n] =-    doCopyByteArrayOp src src_off dst dst_off n-emitPrimOp _      [] CopyMutableByteArrayOp [src,src_off,dst,dst_off,n] =-    doCopyMutableByteArrayOp src src_off dst dst_off n-emitPrimOp _      [] CopyByteArrayToAddrOp [src,src_off,dst,n] =-    doCopyByteArrayToAddrOp src src_off dst n-emitPrimOp _      [] CopyMutableByteArrayToAddrOp [src,src_off,dst,n] =-    doCopyMutableByteArrayToAddrOp src src_off dst n-emitPrimOp _      [] CopyAddrToByteArrayOp [src,dst,dst_off,n] =-    doCopyAddrToByteArrayOp src dst dst_off n-emitPrimOp _      [] SetByteArrayOp [ba,off,len,c] =-    doSetByteArrayOp ba off len c---- Comparing byte arrays-emitPrimOp _      [res] CompareByteArraysOp [ba1,ba1_off,ba2,ba2_off,n] =-    doCompareByteArraysOp res ba1 ba1_off ba2 ba2_off n--emitPrimOp _      [res] BSwap16Op [w] = emitBSwapCall res w W16-emitPrimOp _      [res] BSwap32Op [w] = emitBSwapCall res w W32-emitPrimOp _      [res] BSwap64Op [w] = emitBSwapCall res w W64-emitPrimOp dflags [res] BSwapOp   [w] = emitBSwapCall res w (wordWidth dflags)---- Population count-emitPrimOp _      [res] PopCnt8Op  [w] = emitPopCntCall res w W8-emitPrimOp _      [res] PopCnt16Op [w] = emitPopCntCall res w W16-emitPrimOp _      [res] PopCnt32Op [w] = emitPopCntCall res w W32-emitPrimOp _      [res] PopCnt64Op [w] = emitPopCntCall res w W64-emitPrimOp dflags [res] PopCntOp   [w] = emitPopCntCall res w (wordWidth dflags)---- Parallel bit deposit-emitPrimOp _      [res] Pdep8Op  [src, mask] = emitPdepCall res src mask W8-emitPrimOp _      [res] Pdep16Op [src, mask] = emitPdepCall res src mask W16-emitPrimOp _      [res] Pdep32Op [src, mask] = emitPdepCall res src mask W32-emitPrimOp _      [res] Pdep64Op [src, mask] = emitPdepCall res src mask W64-emitPrimOp dflags [res] PdepOp   [src, mask] = emitPdepCall res src mask (wordWidth dflags)---- Parallel bit extract-emitPrimOp _      [res] Pext8Op  [src, mask] = emitPextCall res src mask W8-emitPrimOp _      [res] Pext16Op [src, mask] = emitPextCall res src mask W16-emitPrimOp _      [res] Pext32Op [src, mask] = emitPextCall res src mask W32-emitPrimOp _      [res] Pext64Op [src, mask] = emitPextCall res src mask W64-emitPrimOp dflags [res] PextOp   [src, mask] = emitPextCall res src mask (wordWidth dflags)---- count leading zeros-emitPrimOp _      [res] Clz8Op  [w] = emitClzCall res w W8-emitPrimOp _      [res] Clz16Op [w] = emitClzCall res w W16-emitPrimOp _      [res] Clz32Op [w] = emitClzCall res w W32-emitPrimOp _      [res] Clz64Op [w] = emitClzCall res w W64-emitPrimOp dflags [res] ClzOp   [w] = emitClzCall res w (wordWidth dflags)---- count trailing zeros-emitPrimOp _      [res] Ctz8Op [w]  = emitCtzCall res w W8-emitPrimOp _      [res] Ctz16Op [w] = emitCtzCall res w W16-emitPrimOp _      [res] Ctz32Op [w] = emitCtzCall res w W32-emitPrimOp _      [res] Ctz64Op [w] = emitCtzCall res w W64-emitPrimOp dflags [res] CtzOp   [w] = emitCtzCall res w (wordWidth dflags)---- Unsigned int to floating point conversions-emitPrimOp _      [res] Word2FloatOp  [w] = emitPrimCall [res]-                                            (MO_UF_Conv W32) [w]-emitPrimOp _      [res] Word2DoubleOp [w] = emitPrimCall [res]-                                            (MO_UF_Conv W64) [w]---- SIMD primops-emitPrimOp dflags [res] (VecBroadcastOp vcat n w) [e] = do-    checkVecCompatibility dflags vcat n w-    doVecPackOp (vecElemInjectCast dflags vcat w) ty zeros (replicate n e) res-  where-    zeros :: CmmExpr-    zeros = CmmLit $ CmmVec (replicate n zero)--    zero :: CmmLit-    zero = case vcat of-             IntVec   -> CmmInt 0 w-             WordVec  -> CmmInt 0 w-             FloatVec -> CmmFloat 0 w--    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags [res] (VecPackOp vcat n w) es = do-    checkVecCompatibility dflags vcat n w-    when (es `lengthIsNot` n) $-        panic "emitPrimOp: VecPackOp has wrong number of arguments"-    doVecPackOp (vecElemInjectCast dflags vcat w) ty zeros es res-  where-    zeros :: CmmExpr-    zeros = CmmLit $ CmmVec (replicate n zero)--    zero :: CmmLit-    zero = case vcat of-             IntVec   -> CmmInt 0 w-             WordVec  -> CmmInt 0 w-             FloatVec -> CmmFloat 0 w--    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecUnpackOp vcat n w) [arg] = do-    checkVecCompatibility dflags vcat n w-    when (res `lengthIsNot` n) $-        panic "emitPrimOp: VecUnpackOp has wrong number of results"-    doVecUnpackOp (vecElemProjectCast dflags vcat w) ty arg res-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags [res] (VecInsertOp vcat n w) [v,e,i] = do-    checkVecCompatibility dflags vcat n w-    doVecInsertOp (vecElemInjectCast dflags vcat w) ty v e i res-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecIndexByteArrayOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexByteArrayOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecReadByteArrayOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexByteArrayOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecWriteByteArrayOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doWriteByteArrayOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecIndexOffAddrOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexOffAddrOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecReadOffAddrOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexOffAddrOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecWriteOffAddrOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doWriteOffAddrOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecVmmType vcat n w--emitPrimOp dflags res (VecIndexScalarByteArrayOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexByteArrayOpAs Nothing vecty ty res args-  where-    vecty :: CmmType-    vecty = vecVmmType vcat n w--    ty :: CmmType-    ty = vecCmmCat vcat w--emitPrimOp dflags res (VecReadScalarByteArrayOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexByteArrayOpAs Nothing vecty ty res args-  where-    vecty :: CmmType-    vecty = vecVmmType vcat n w--    ty :: CmmType-    ty = vecCmmCat vcat w--emitPrimOp dflags res (VecWriteScalarByteArrayOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doWriteByteArrayOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecCmmCat vcat w--emitPrimOp dflags res (VecIndexScalarOffAddrOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexOffAddrOpAs Nothing vecty ty res args-  where-    vecty :: CmmType-    vecty = vecVmmType vcat n w--    ty :: CmmType-    ty = vecCmmCat vcat w--emitPrimOp dflags res (VecReadScalarOffAddrOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doIndexOffAddrOpAs Nothing vecty ty res args-  where-    vecty :: CmmType-    vecty = vecVmmType vcat n w--    ty :: CmmType-    ty = vecCmmCat vcat w--emitPrimOp dflags res (VecWriteScalarOffAddrOp vcat n w) args = do-    checkVecCompatibility dflags vcat n w-    doWriteOffAddrOp Nothing ty res args-  where-    ty :: CmmType-    ty = vecCmmCat vcat w---- Prefetch-emitPrimOp _ [] PrefetchByteArrayOp3        args = doPrefetchByteArrayOp 3  args-emitPrimOp _ [] PrefetchMutableByteArrayOp3 args = doPrefetchMutableByteArrayOp 3  args-emitPrimOp _ [] PrefetchAddrOp3             args = doPrefetchAddrOp  3  args-emitPrimOp _ [] PrefetchValueOp3            args = doPrefetchValueOp 3 args--emitPrimOp _ [] PrefetchByteArrayOp2        args = doPrefetchByteArrayOp 2  args-emitPrimOp _ [] PrefetchMutableByteArrayOp2 args = doPrefetchMutableByteArrayOp 2  args-emitPrimOp _ [] PrefetchAddrOp2             args = doPrefetchAddrOp 2  args-emitPrimOp _ [] PrefetchValueOp2           args = doPrefetchValueOp 2 args--emitPrimOp _ [] PrefetchByteArrayOp1        args = doPrefetchByteArrayOp 1  args-emitPrimOp _ [] PrefetchMutableByteArrayOp1 args = doPrefetchMutableByteArrayOp 1  args-emitPrimOp _ [] PrefetchAddrOp1             args = doPrefetchAddrOp 1  args-emitPrimOp _ [] PrefetchValueOp1            args = doPrefetchValueOp 1 args--emitPrimOp _ [] PrefetchByteArrayOp0        args = doPrefetchByteArrayOp 0  args-emitPrimOp _ [] PrefetchMutableByteArrayOp0 args = doPrefetchMutableByteArrayOp 0  args-emitPrimOp _ [] PrefetchAddrOp0             args = doPrefetchAddrOp 0  args-emitPrimOp _ [] PrefetchValueOp0            args = doPrefetchValueOp 0 args---- Atomic read-modify-write-emitPrimOp dflags [res] FetchAddByteArrayOp_Int [mba, ix, n] =-    doAtomicRMW res AMO_Add mba ix (bWord dflags) n-emitPrimOp dflags [res] FetchSubByteArrayOp_Int [mba, ix, n] =-    doAtomicRMW res AMO_Sub mba ix (bWord dflags) n-emitPrimOp dflags [res] FetchAndByteArrayOp_Int [mba, ix, n] =-    doAtomicRMW res AMO_And mba ix (bWord dflags) n-emitPrimOp dflags [res] FetchNandByteArrayOp_Int [mba, ix, n] =-    doAtomicRMW res AMO_Nand mba ix (bWord dflags) n-emitPrimOp dflags [res] FetchOrByteArrayOp_Int [mba, ix, n] =-    doAtomicRMW res AMO_Or mba ix (bWord dflags) n-emitPrimOp dflags [res] FetchXorByteArrayOp_Int [mba, ix, n] =-    doAtomicRMW res AMO_Xor mba ix (bWord dflags) n-emitPrimOp dflags [res] AtomicReadByteArrayOp_Int [mba, ix] =-    doAtomicReadByteArray res mba ix (bWord dflags)-emitPrimOp dflags [] AtomicWriteByteArrayOp_Int [mba, ix, val] =-    doAtomicWriteByteArray mba ix (bWord dflags) val-emitPrimOp dflags [res] CasByteArrayOp_Int [mba, ix, old, new] =-    doCasByteArray res mba ix (bWord dflags) old new---- The rest just translate straightforwardly-emitPrimOp dflags [res] op [arg]-   | nopOp op-   = emitAssign (CmmLocal res) arg--   | Just (mop,rep) <- narrowOp op-   = emitAssign (CmmLocal res) $-           CmmMachOp (mop rep (wordWidth dflags)) [CmmMachOp (mop (wordWidth dflags) rep) [arg]]--emitPrimOp dflags r@[res] op args-   | Just prim <- callishOp op-   = do emitPrimCall r prim args--   | Just mop <- translateOp dflags op-   = let stmt = mkAssign (CmmLocal res) (CmmMachOp mop args) in-     emit stmt--emitPrimOp dflags results op args-   = case callishPrimOpSupported dflags op of-          Left op   -> emit $ mkUnsafeCall (PrimTarget op) results args-          Right gen -> gen results args--type GenericOp = [CmmFormal] -> [CmmActual] -> FCode ()--callishPrimOpSupported :: DynFlags -> PrimOp -> Either CallishMachOp GenericOp-callishPrimOpSupported dflags op-  = case op of-      IntQuotRemOp   | ncg && (x86ish || ppc) ->-                         Left (MO_S_QuotRem  (wordWidth dflags))-                     | otherwise              ->-                         Right (genericIntQuotRemOp (wordWidth dflags))--      Int8QuotRemOp  | ncg && (x86ish || ppc)-                                     -> Left (MO_S_QuotRem W8)-                     | otherwise     -> Right (genericIntQuotRemOp W8)--      Int16QuotRemOp | ncg && (x86ish || ppc)-                                     -> Left (MO_S_QuotRem W16)-                     | otherwise     -> Right (genericIntQuotRemOp W16)---      WordQuotRemOp  | ncg && (x86ish || ppc) ->-                         Left (MO_U_QuotRem  (wordWidth dflags))-                     | otherwise      ->-                         Right (genericWordQuotRemOp (wordWidth dflags))--      WordQuotRem2Op | (ncg && (x86ish || ppc))-                          || llvm     -> Left (MO_U_QuotRem2 (wordWidth dflags))-                     | otherwise      -> Right (genericWordQuotRem2Op dflags)--      Word8QuotRemOp | ncg && (x86ish || ppc)-                                      -> Left (MO_U_QuotRem W8)-                     | otherwise      -> Right (genericWordQuotRemOp W8)--      Word16QuotRemOp| ncg && (x86ish || ppc)-                                     -> Left (MO_U_QuotRem W16)-                     | otherwise     -> Right (genericWordQuotRemOp W16)--      WordAdd2Op     | (ncg && (x86ish || ppc))-                         || llvm      -> Left (MO_Add2       (wordWidth dflags))-                     | otherwise      -> Right genericWordAdd2Op--      WordAddCOp     | (ncg && (x86ish || ppc))-                         || llvm      -> Left (MO_AddWordC   (wordWidth dflags))-                     | otherwise      -> Right genericWordAddCOp--      WordSubCOp     | (ncg && (x86ish || ppc))-                         || llvm      -> Left (MO_SubWordC   (wordWidth dflags))-                     | otherwise      -> Right genericWordSubCOp--      IntAddCOp      | (ncg && (x86ish || ppc))-                         || llvm      -> Left (MO_AddIntC    (wordWidth dflags))-                     | otherwise      -> Right genericIntAddCOp--      IntSubCOp      | (ncg && (x86ish || ppc))-                         || llvm      -> Left (MO_SubIntC    (wordWidth dflags))-                     | otherwise      -> Right genericIntSubCOp--      WordMul2Op     | ncg && (x86ish || ppc)-                         || llvm      -> Left (MO_U_Mul2     (wordWidth dflags))-                     | otherwise      -> Right genericWordMul2Op-      FloatFabsOp    | (ncg && x86ish || ppc)-                         || llvm      -> Left MO_F32_Fabs-                     | otherwise      -> Right $ genericFabsOp W32-      DoubleFabsOp   | (ncg && x86ish || ppc)-                         || llvm      -> Left MO_F64_Fabs-                     | otherwise      -> Right $ genericFabsOp W64--      _ -> pprPanic "emitPrimOp: can't translate PrimOp " (ppr op)- where-  ncg = case hscTarget dflags of-           HscAsm -> True-           _      -> False-  llvm = case hscTarget dflags of-           HscLlvm -> True-           _       -> False-  x86ish = case platformArch (targetPlatform dflags) of-             ArchX86    -> True-             ArchX86_64 -> True-             _          -> False-  ppc = case platformArch (targetPlatform dflags) of-          ArchPPC      -> True-          ArchPPC_64 _ -> True-          _            -> False--genericIntQuotRemOp :: Width -> GenericOp-genericIntQuotRemOp width [res_q, res_r] [arg_x, arg_y]-   = emit $ mkAssign (CmmLocal res_q)-              (CmmMachOp (MO_S_Quot width) [arg_x, arg_y]) <*>-            mkAssign (CmmLocal res_r)-              (CmmMachOp (MO_S_Rem  width) [arg_x, arg_y])-genericIntQuotRemOp _ _ _ = panic "genericIntQuotRemOp"--genericWordQuotRemOp :: Width -> GenericOp-genericWordQuotRemOp width [res_q, res_r] [arg_x, arg_y]-    = emit $ mkAssign (CmmLocal res_q)-               (CmmMachOp (MO_U_Quot width) [arg_x, arg_y]) <*>-             mkAssign (CmmLocal res_r)-               (CmmMachOp (MO_U_Rem  width) [arg_x, arg_y])-genericWordQuotRemOp _ _ _ = panic "genericWordQuotRemOp"--genericWordQuotRem2Op :: DynFlags -> GenericOp-genericWordQuotRem2Op dflags [res_q, res_r] [arg_x_high, arg_x_low, arg_y]-    = emit =<< f (widthInBits (wordWidth dflags)) zero arg_x_high arg_x_low-    where    ty = cmmExprType dflags arg_x_high-             shl   x i = CmmMachOp (MO_Shl   (wordWidth dflags)) [x, i]-             shr   x i = CmmMachOp (MO_U_Shr (wordWidth dflags)) [x, i]-             or    x y = CmmMachOp (MO_Or    (wordWidth dflags)) [x, y]-             ge    x y = CmmMachOp (MO_U_Ge  (wordWidth dflags)) [x, y]-             ne    x y = CmmMachOp (MO_Ne    (wordWidth dflags)) [x, y]-             minus x y = CmmMachOp (MO_Sub   (wordWidth dflags)) [x, y]-             times x y = CmmMachOp (MO_Mul   (wordWidth dflags)) [x, y]-             zero   = lit 0-             one    = lit 1-             negone = lit (fromIntegral (widthInBits (wordWidth dflags)) - 1)-             lit i = CmmLit (CmmInt i (wordWidth dflags))--             f :: Int -> CmmExpr -> CmmExpr -> CmmExpr -> FCode CmmAGraph-             f 0 acc high _ = return (mkAssign (CmmLocal res_q) acc <*>-                                      mkAssign (CmmLocal res_r) high)-             f i acc high low =-                 do roverflowedBit <- newTemp ty-                    rhigh'         <- newTemp ty-                    rhigh''        <- newTemp ty-                    rlow'          <- newTemp ty-                    risge          <- newTemp ty-                    racc'          <- newTemp ty-                    let high'         = CmmReg (CmmLocal rhigh')-                        isge          = CmmReg (CmmLocal risge)-                        overflowedBit = CmmReg (CmmLocal roverflowedBit)-                    let this = catAGraphs-                               [mkAssign (CmmLocal roverflowedBit)-                                          (shr high negone),-                                mkAssign (CmmLocal rhigh')-                                          (or (shl high one) (shr low negone)),-                                mkAssign (CmmLocal rlow')-                                          (shl low one),-                                mkAssign (CmmLocal risge)-                                          (or (overflowedBit `ne` zero)-                                              (high' `ge` arg_y)),-                                mkAssign (CmmLocal rhigh'')-                                          (high' `minus` (arg_y `times` isge)),-                                mkAssign (CmmLocal racc')-                                          (or (shl acc one) isge)]-                    rest <- f (i - 1) (CmmReg (CmmLocal racc'))-                                      (CmmReg (CmmLocal rhigh''))-                                      (CmmReg (CmmLocal rlow'))-                    return (this <*> rest)-genericWordQuotRem2Op _ _ _ = panic "genericWordQuotRem2Op"--genericWordAdd2Op :: GenericOp-genericWordAdd2Op [res_h, res_l] [arg_x, arg_y]-  = do dflags <- getDynFlags-       r1 <- newTemp (cmmExprType dflags arg_x)-       r2 <- newTemp (cmmExprType dflags arg_x)-       let topHalf x = CmmMachOp (MO_U_Shr (wordWidth dflags)) [x, hww]-           toTopHalf x = CmmMachOp (MO_Shl (wordWidth dflags)) [x, hww]-           bottomHalf x = CmmMachOp (MO_And (wordWidth dflags)) [x, hwm]-           add x y = CmmMachOp (MO_Add (wordWidth dflags)) [x, y]-           or x y = CmmMachOp (MO_Or (wordWidth dflags)) [x, y]-           hww = CmmLit (CmmInt (fromIntegral (widthInBits (halfWordWidth dflags)))-                                (wordWidth dflags))-           hwm = CmmLit (CmmInt (halfWordMask dflags) (wordWidth dflags))-       emit $ catAGraphs-          [mkAssign (CmmLocal r1)-               (add (bottomHalf arg_x) (bottomHalf arg_y)),-           mkAssign (CmmLocal r2)-               (add (topHalf (CmmReg (CmmLocal r1)))-                    (add (topHalf arg_x) (topHalf arg_y))),-           mkAssign (CmmLocal res_h)-               (topHalf (CmmReg (CmmLocal r2))),-           mkAssign (CmmLocal res_l)-               (or (toTopHalf (CmmReg (CmmLocal r2)))-                   (bottomHalf (CmmReg (CmmLocal r1))))]-genericWordAdd2Op _ _ = panic "genericWordAdd2Op"---- | Implements branchless recovery of the carry flag @c@ by checking the--- leftmost bits of both inputs @a@ and @b@ and result @r = a + b@:------ @---    c = a&b | (a|b)&~r--- @------ https://brodowsky.it-sky.net/2015/04/02/how-to-recover-the-carry-bit/-genericWordAddCOp :: GenericOp-genericWordAddCOp [res_r, res_c] [aa, bb]- = do dflags <- getDynFlags-      emit $ catAGraphs [-        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordAdd dflags) [aa,bb]),-        mkAssign (CmmLocal res_c) $-          CmmMachOp (mo_wordUShr dflags) [-            CmmMachOp (mo_wordOr dflags) [-              CmmMachOp (mo_wordAnd dflags) [aa,bb],-              CmmMachOp (mo_wordAnd dflags) [-                CmmMachOp (mo_wordOr dflags) [aa,bb],-                CmmMachOp (mo_wordNot dflags) [CmmReg (CmmLocal res_r)]-              ]-            ],-            mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)-          ]-        ]-genericWordAddCOp _ _ = panic "genericWordAddCOp"---- | Implements branchless recovery of the carry flag @c@ by checking the--- leftmost bits of both inputs @a@ and @b@ and result @r = a - b@:------ @---    c = ~a&b | (~a|b)&r--- @------ https://brodowsky.it-sky.net/2015/04/02/how-to-recover-the-carry-bit/-genericWordSubCOp :: GenericOp-genericWordSubCOp [res_r, res_c] [aa, bb]- = do dflags <- getDynFlags-      emit $ catAGraphs [-        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordSub dflags) [aa,bb]),-        mkAssign (CmmLocal res_c) $-          CmmMachOp (mo_wordUShr dflags) [-            CmmMachOp (mo_wordOr dflags) [-              CmmMachOp (mo_wordAnd dflags) [-                CmmMachOp (mo_wordNot dflags) [aa],-                bb-              ],-              CmmMachOp (mo_wordAnd dflags) [-                CmmMachOp (mo_wordOr dflags) [-                  CmmMachOp (mo_wordNot dflags) [aa],-                  bb-                ],-                CmmReg (CmmLocal res_r)-              ]-            ],-            mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)-          ]-        ]-genericWordSubCOp _ _ = panic "genericWordSubCOp"--genericIntAddCOp :: GenericOp-genericIntAddCOp [res_r, res_c] [aa, bb]-{--   With some bit-twiddling, we can define int{Add,Sub}Czh portably in-   C, and without needing any comparisons.  This may not be the-   fastest way to do it - if you have better code, please send it! --SDM--   Return : r = a + b,  c = 0 if no overflow, 1 on overflow.--   We currently don't make use of the r value if c is != 0 (i.e.-   overflow), we just convert to big integers and try again.  This-   could be improved by making r and c the correct values for-   plugging into a new J#.--   { r = ((I_)(a)) + ((I_)(b));                                 \-     c = ((StgWord)(~(((I_)(a))^((I_)(b))) & (((I_)(a))^r)))    \-         >> (BITS_IN (I_) - 1);                                 \-   }-   Wading through the mass of bracketry, it seems to reduce to:-   c = ( (~(a^b)) & (a^r) ) >>unsigned (BITS_IN(I_)-1)---}- = do dflags <- getDynFlags-      emit $ catAGraphs [-        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordAdd dflags) [aa,bb]),-        mkAssign (CmmLocal res_c) $-          CmmMachOp (mo_wordUShr dflags) [-                CmmMachOp (mo_wordAnd dflags) [-                    CmmMachOp (mo_wordNot dflags) [CmmMachOp (mo_wordXor dflags) [aa,bb]],-                    CmmMachOp (mo_wordXor dflags) [aa, CmmReg (CmmLocal res_r)]-                ],-                mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)-          ]-        ]-genericIntAddCOp _ _ = panic "genericIntAddCOp"--genericIntSubCOp :: GenericOp-genericIntSubCOp [res_r, res_c] [aa, bb]-{- Similarly:-   #define subIntCzh(r,c,a,b)                                   \-   { r = ((I_)(a)) - ((I_)(b));                                 \-     c = ((StgWord)((((I_)(a))^((I_)(b))) & (((I_)(a))^r)))     \-         >> (BITS_IN (I_) - 1);                                 \-   }--   c =  ((a^b) & (a^r)) >>unsigned (BITS_IN(I_)-1)--}- = do dflags <- getDynFlags-      emit $ catAGraphs [-        mkAssign (CmmLocal res_r) (CmmMachOp (mo_wordSub dflags) [aa,bb]),-        mkAssign (CmmLocal res_c) $-          CmmMachOp (mo_wordUShr dflags) [-                CmmMachOp (mo_wordAnd dflags) [-                    CmmMachOp (mo_wordXor dflags) [aa,bb],-                    CmmMachOp (mo_wordXor dflags) [aa, CmmReg (CmmLocal res_r)]-                ],-                mkIntExpr dflags (wORD_SIZE_IN_BITS dflags - 1)-          ]-        ]-genericIntSubCOp _ _ = panic "genericIntSubCOp"--genericWordMul2Op :: GenericOp-genericWordMul2Op [res_h, res_l] [arg_x, arg_y]- = do dflags <- getDynFlags-      let t = cmmExprType dflags arg_x-      xlyl <- liftM CmmLocal $ newTemp t-      xlyh <- liftM CmmLocal $ newTemp t-      xhyl <- liftM CmmLocal $ newTemp t-      r    <- liftM CmmLocal $ newTemp t-      -- This generic implementation is very simple and slow. We might-      -- well be able to do better, but for now this at least works.-      let topHalf x = CmmMachOp (MO_U_Shr (wordWidth dflags)) [x, hww]-          toTopHalf x = CmmMachOp (MO_Shl (wordWidth dflags)) [x, hww]-          bottomHalf x = CmmMachOp (MO_And (wordWidth dflags)) [x, hwm]-          add x y = CmmMachOp (MO_Add (wordWidth dflags)) [x, y]-          sum = foldl1 add-          mul x y = CmmMachOp (MO_Mul (wordWidth dflags)) [x, y]-          or x y = CmmMachOp (MO_Or (wordWidth dflags)) [x, y]-          hww = CmmLit (CmmInt (fromIntegral (widthInBits (halfWordWidth dflags)))-                               (wordWidth dflags))-          hwm = CmmLit (CmmInt (halfWordMask dflags) (wordWidth dflags))-      emit $ catAGraphs-             [mkAssign xlyl-                  (mul (bottomHalf arg_x) (bottomHalf arg_y)),-              mkAssign xlyh-                  (mul (bottomHalf arg_x) (topHalf arg_y)),-              mkAssign xhyl-                  (mul (topHalf arg_x) (bottomHalf arg_y)),-              mkAssign r-                  (sum [topHalf    (CmmReg xlyl),-                        bottomHalf (CmmReg xhyl),-                        bottomHalf (CmmReg xlyh)]),-              mkAssign (CmmLocal res_l)-                  (or (bottomHalf (CmmReg xlyl))-                      (toTopHalf (CmmReg r))),-              mkAssign (CmmLocal res_h)-                  (sum [mul (topHalf arg_x) (topHalf arg_y),-                        topHalf (CmmReg xhyl),-                        topHalf (CmmReg xlyh),-                        topHalf (CmmReg r)])]-genericWordMul2Op _ _ = panic "genericWordMul2Op"---- This replicates what we had in libraries/base/GHC/Float.hs:------    abs x    | x == 0    = 0 -- handles (-0.0)---             | x >  0    = x---             | otherwise = negateFloat x-genericFabsOp :: Width -> GenericOp-genericFabsOp w [res_r] [aa]- = do dflags <- getDynFlags-      let zero   = CmmLit (CmmFloat 0 w)--          eq x y = CmmMachOp (MO_F_Eq w) [x, y]-          gt x y = CmmMachOp (MO_F_Gt w) [x, y]--          neg x  = CmmMachOp (MO_F_Neg w) [x]--          g1 = catAGraphs [mkAssign (CmmLocal res_r) zero]-          g2 = catAGraphs [mkAssign (CmmLocal res_r) aa]--      res_t <- CmmLocal <$> newTemp (cmmExprType dflags aa)-      let g3 = catAGraphs [mkAssign res_t aa,-                           mkAssign (CmmLocal res_r) (neg (CmmReg res_t))]--      g4 <- mkCmmIfThenElse (gt aa zero) g2 g3--      emit =<< mkCmmIfThenElse (eq aa zero) g1 g4--genericFabsOp _ _ _ = panic "genericFabsOp"---- These PrimOps are NOPs in Cmm--nopOp :: PrimOp -> Bool-nopOp Int2WordOp     = True-nopOp Word2IntOp     = True-nopOp Int2AddrOp     = True-nopOp Addr2IntOp     = True-nopOp ChrOp          = True  -- Int# and Char# are rep'd the same-nopOp OrdOp          = True-nopOp _              = False---- These PrimOps turn into double casts--narrowOp :: PrimOp -> Maybe (Width -> Width -> MachOp, Width)-narrowOp Narrow8IntOp   = Just (MO_SS_Conv, W8)-narrowOp Narrow16IntOp  = Just (MO_SS_Conv, W16)-narrowOp Narrow32IntOp  = Just (MO_SS_Conv, W32)-narrowOp Narrow8WordOp  = Just (MO_UU_Conv, W8)-narrowOp Narrow16WordOp = Just (MO_UU_Conv, W16)-narrowOp Narrow32WordOp = Just (MO_UU_Conv, W32)-narrowOp _              = Nothing---- Native word signless ops--translateOp :: DynFlags -> PrimOp -> Maybe MachOp-translateOp dflags IntAddOp       = Just (mo_wordAdd dflags)-translateOp dflags IntSubOp       = Just (mo_wordSub dflags)-translateOp dflags WordAddOp      = Just (mo_wordAdd dflags)-translateOp dflags WordSubOp      = Just (mo_wordSub dflags)-translateOp dflags AddrAddOp      = Just (mo_wordAdd dflags)-translateOp dflags AddrSubOp      = Just (mo_wordSub dflags)--translateOp dflags IntEqOp        = Just (mo_wordEq dflags)-translateOp dflags IntNeOp        = Just (mo_wordNe dflags)-translateOp dflags WordEqOp       = Just (mo_wordEq dflags)-translateOp dflags WordNeOp       = Just (mo_wordNe dflags)-translateOp dflags AddrEqOp       = Just (mo_wordEq dflags)-translateOp dflags AddrNeOp       = Just (mo_wordNe dflags)--translateOp dflags AndOp          = Just (mo_wordAnd dflags)-translateOp dflags OrOp           = Just (mo_wordOr dflags)-translateOp dflags XorOp          = Just (mo_wordXor dflags)-translateOp dflags NotOp          = Just (mo_wordNot dflags)-translateOp dflags SllOp          = Just (mo_wordShl dflags)-translateOp dflags SrlOp          = Just (mo_wordUShr dflags)--translateOp dflags AddrRemOp      = Just (mo_wordURem dflags)---- Native word signed ops--translateOp dflags IntMulOp        = Just (mo_wordMul dflags)-translateOp dflags IntMulMayOfloOp = Just (MO_S_MulMayOflo (wordWidth dflags))-translateOp dflags IntQuotOp       = Just (mo_wordSQuot dflags)-translateOp dflags IntRemOp        = Just (mo_wordSRem dflags)-translateOp dflags IntNegOp        = Just (mo_wordSNeg dflags)---translateOp dflags IntGeOp        = Just (mo_wordSGe dflags)-translateOp dflags IntLeOp        = Just (mo_wordSLe dflags)-translateOp dflags IntGtOp        = Just (mo_wordSGt dflags)-translateOp dflags IntLtOp        = Just (mo_wordSLt dflags)--translateOp dflags AndIOp         = Just (mo_wordAnd dflags)-translateOp dflags OrIOp          = Just (mo_wordOr dflags)-translateOp dflags XorIOp         = Just (mo_wordXor dflags)-translateOp dflags NotIOp         = Just (mo_wordNot dflags)-translateOp dflags ISllOp         = Just (mo_wordShl dflags)-translateOp dflags ISraOp         = Just (mo_wordSShr dflags)-translateOp dflags ISrlOp         = Just (mo_wordUShr dflags)---- Native word unsigned ops--translateOp dflags WordGeOp       = Just (mo_wordUGe dflags)-translateOp dflags WordLeOp       = Just (mo_wordULe dflags)-translateOp dflags WordGtOp       = Just (mo_wordUGt dflags)-translateOp dflags WordLtOp       = Just (mo_wordULt dflags)--translateOp dflags WordMulOp      = Just (mo_wordMul dflags)-translateOp dflags WordQuotOp     = Just (mo_wordUQuot dflags)-translateOp dflags WordRemOp      = Just (mo_wordURem dflags)--translateOp dflags AddrGeOp       = Just (mo_wordUGe dflags)-translateOp dflags AddrLeOp       = Just (mo_wordULe dflags)-translateOp dflags AddrGtOp       = Just (mo_wordUGt dflags)-translateOp dflags AddrLtOp       = Just (mo_wordULt dflags)---- Int8# signed ops--translateOp dflags Int8Extend     = Just (MO_SS_Conv W8 (wordWidth dflags))-translateOp dflags Int8Narrow     = Just (MO_SS_Conv (wordWidth dflags) W8)-translateOp _      Int8NegOp      = Just (MO_S_Neg W8)-translateOp _      Int8AddOp      = Just (MO_Add W8)-translateOp _      Int8SubOp      = Just (MO_Sub W8)-translateOp _      Int8MulOp      = Just (MO_Mul W8)-translateOp _      Int8QuotOp     = Just (MO_S_Quot W8)-translateOp _      Int8RemOp      = Just (MO_S_Rem W8)--translateOp _      Int8EqOp       = Just (MO_Eq W8)-translateOp _      Int8GeOp       = Just (MO_S_Ge W8)-translateOp _      Int8GtOp       = Just (MO_S_Gt W8)-translateOp _      Int8LeOp       = Just (MO_S_Le W8)-translateOp _      Int8LtOp       = Just (MO_S_Lt W8)-translateOp _      Int8NeOp       = Just (MO_Ne W8)---- Word8# unsigned ops--translateOp dflags Word8Extend     = Just (MO_UU_Conv W8 (wordWidth dflags))-translateOp dflags Word8Narrow     = Just (MO_UU_Conv (wordWidth dflags) W8)-translateOp _      Word8NotOp      = Just (MO_Not W8)-translateOp _      Word8AddOp      = Just (MO_Add W8)-translateOp _      Word8SubOp      = Just (MO_Sub W8)-translateOp _      Word8MulOp      = Just (MO_Mul W8)-translateOp _      Word8QuotOp     = Just (MO_U_Quot W8)-translateOp _      Word8RemOp      = Just (MO_U_Rem W8)--translateOp _      Word8EqOp       = Just (MO_Eq W8)-translateOp _      Word8GeOp       = Just (MO_U_Ge W8)-translateOp _      Word8GtOp       = Just (MO_U_Gt W8)-translateOp _      Word8LeOp       = Just (MO_U_Le W8)-translateOp _      Word8LtOp       = Just (MO_U_Lt W8)-translateOp _      Word8NeOp       = Just (MO_Ne W8)---- Int16# signed ops--translateOp dflags Int16Extend     = Just (MO_SS_Conv W16 (wordWidth dflags))-translateOp dflags Int16Narrow     = Just (MO_SS_Conv (wordWidth dflags) W16)-translateOp _      Int16NegOp      = Just (MO_S_Neg W16)-translateOp _      Int16AddOp      = Just (MO_Add W16)-translateOp _      Int16SubOp      = Just (MO_Sub W16)-translateOp _      Int16MulOp      = Just (MO_Mul W16)-translateOp _      Int16QuotOp     = Just (MO_S_Quot W16)-translateOp _      Int16RemOp      = Just (MO_S_Rem W16)--translateOp _      Int16EqOp       = Just (MO_Eq W16)-translateOp _      Int16GeOp       = Just (MO_S_Ge W16)-translateOp _      Int16GtOp       = Just (MO_S_Gt W16)-translateOp _      Int16LeOp       = Just (MO_S_Le W16)-translateOp _      Int16LtOp       = Just (MO_S_Lt W16)-translateOp _      Int16NeOp       = Just (MO_Ne W16)---- Word16# unsigned ops--translateOp dflags Word16Extend     = Just (MO_UU_Conv W16 (wordWidth dflags))-translateOp dflags Word16Narrow     = Just (MO_UU_Conv (wordWidth dflags) W16)-translateOp _      Word16NotOp      = Just (MO_Not W16)-translateOp _      Word16AddOp      = Just (MO_Add W16)-translateOp _      Word16SubOp      = Just (MO_Sub W16)-translateOp _      Word16MulOp      = Just (MO_Mul W16)-translateOp _      Word16QuotOp     = Just (MO_U_Quot W16)-translateOp _      Word16RemOp      = Just (MO_U_Rem W16)--translateOp _      Word16EqOp       = Just (MO_Eq W16)-translateOp _      Word16GeOp       = Just (MO_U_Ge W16)-translateOp _      Word16GtOp       = Just (MO_U_Gt W16)-translateOp _      Word16LeOp       = Just (MO_U_Le W16)-translateOp _      Word16LtOp       = Just (MO_U_Lt W16)-translateOp _      Word16NeOp       = Just (MO_Ne W16)---- Char# ops--translateOp dflags CharEqOp       = Just (MO_Eq (wordWidth dflags))-translateOp dflags CharNeOp       = Just (MO_Ne (wordWidth dflags))-translateOp dflags CharGeOp       = Just (MO_U_Ge (wordWidth dflags))-translateOp dflags CharLeOp       = Just (MO_U_Le (wordWidth dflags))-translateOp dflags CharGtOp       = Just (MO_U_Gt (wordWidth dflags))-translateOp dflags CharLtOp       = Just (MO_U_Lt (wordWidth dflags))---- Double ops--translateOp _      DoubleEqOp     = Just (MO_F_Eq W64)-translateOp _      DoubleNeOp     = Just (MO_F_Ne W64)-translateOp _      DoubleGeOp     = Just (MO_F_Ge W64)-translateOp _      DoubleLeOp     = Just (MO_F_Le W64)-translateOp _      DoubleGtOp     = Just (MO_F_Gt W64)-translateOp _      DoubleLtOp     = Just (MO_F_Lt W64)--translateOp _      DoubleAddOp    = Just (MO_F_Add W64)-translateOp _      DoubleSubOp    = Just (MO_F_Sub W64)-translateOp _      DoubleMulOp    = Just (MO_F_Mul W64)-translateOp _      DoubleDivOp    = Just (MO_F_Quot W64)-translateOp _      DoubleNegOp    = Just (MO_F_Neg W64)---- Float ops--translateOp _      FloatEqOp     = Just (MO_F_Eq W32)-translateOp _      FloatNeOp     = Just (MO_F_Ne W32)-translateOp _      FloatGeOp     = Just (MO_F_Ge W32)-translateOp _      FloatLeOp     = Just (MO_F_Le W32)-translateOp _      FloatGtOp     = Just (MO_F_Gt W32)-translateOp _      FloatLtOp     = Just (MO_F_Lt W32)--translateOp _      FloatAddOp    = Just (MO_F_Add  W32)-translateOp _      FloatSubOp    = Just (MO_F_Sub  W32)-translateOp _      FloatMulOp    = Just (MO_F_Mul  W32)-translateOp _      FloatDivOp    = Just (MO_F_Quot W32)-translateOp _      FloatNegOp    = Just (MO_F_Neg  W32)---- Vector ops--translateOp _ (VecAddOp FloatVec n w) = Just (MO_VF_Add  n w)-translateOp _ (VecSubOp FloatVec n w) = Just (MO_VF_Sub  n w)-translateOp _ (VecMulOp FloatVec n w) = Just (MO_VF_Mul  n w)-translateOp _ (VecDivOp FloatVec n w) = Just (MO_VF_Quot n w)-translateOp _ (VecNegOp FloatVec n w) = Just (MO_VF_Neg  n w)--translateOp _ (VecAddOp  IntVec n w) = Just (MO_V_Add   n w)-translateOp _ (VecSubOp  IntVec n w) = Just (MO_V_Sub   n w)-translateOp _ (VecMulOp  IntVec n w) = Just (MO_V_Mul   n w)-translateOp _ (VecQuotOp IntVec n w) = Just (MO_VS_Quot n w)-translateOp _ (VecRemOp  IntVec n w) = Just (MO_VS_Rem  n w)-translateOp _ (VecNegOp  IntVec n w) = Just (MO_VS_Neg  n w)--translateOp _ (VecAddOp  WordVec n w) = Just (MO_V_Add   n w)-translateOp _ (VecSubOp  WordVec n w) = Just (MO_V_Sub   n w)-translateOp _ (VecMulOp  WordVec n w) = Just (MO_V_Mul   n w)-translateOp _ (VecQuotOp WordVec n w) = Just (MO_VU_Quot n w)-translateOp _ (VecRemOp  WordVec n w) = Just (MO_VU_Rem  n w)---- Conversions--translateOp dflags Int2DoubleOp   = Just (MO_SF_Conv (wordWidth dflags) W64)-translateOp dflags Double2IntOp   = Just (MO_FS_Conv W64 (wordWidth dflags))--translateOp dflags Int2FloatOp    = Just (MO_SF_Conv (wordWidth dflags) W32)-translateOp dflags Float2IntOp    = Just (MO_FS_Conv W32 (wordWidth dflags))--translateOp _      Float2DoubleOp = Just (MO_FF_Conv W32 W64)-translateOp _      Double2FloatOp = Just (MO_FF_Conv W64 W32)---- Word comparisons masquerading as more exotic things.--translateOp dflags SameMutVarOp           = Just (mo_wordEq dflags)-translateOp dflags SameMVarOp             = Just (mo_wordEq dflags)-translateOp dflags SameMutableArrayOp     = Just (mo_wordEq dflags)-translateOp dflags SameMutableByteArrayOp = Just (mo_wordEq dflags)-translateOp dflags SameMutableArrayArrayOp= Just (mo_wordEq dflags)-translateOp dflags SameSmallMutableArrayOp= Just (mo_wordEq dflags)-translateOp dflags SameTVarOp             = Just (mo_wordEq dflags)-translateOp dflags EqStablePtrOp          = Just (mo_wordEq dflags)--- See Note [Comparing stable names]-translateOp dflags EqStableNameOp         = Just (mo_wordEq dflags)--translateOp _      _ = Nothing---- Note [Comparing stable names]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ A StableName# is actually a pointer to a stable name object (SNO)--- containing an index into the stable name table (SNT). We--- used to compare StableName#s by following the pointers to the--- SNOs and checking whether they held the same SNT indices. However,--- this is not necessary: there is a one-to-one correspondence--- between SNOs and entries in the SNT, so simple pointer equality--- does the trick.---- These primops are implemented by CallishMachOps, because they sometimes--- turn into foreign calls depending on the backend.--callishOp :: PrimOp -> Maybe CallishMachOp-callishOp DoublePowerOp  = Just MO_F64_Pwr-callishOp DoubleSinOp    = Just MO_F64_Sin-callishOp DoubleCosOp    = Just MO_F64_Cos-callishOp DoubleTanOp    = Just MO_F64_Tan-callishOp DoubleSinhOp   = Just MO_F64_Sinh-callishOp DoubleCoshOp   = Just MO_F64_Cosh-callishOp DoubleTanhOp   = Just MO_F64_Tanh-callishOp DoubleAsinOp   = Just MO_F64_Asin-callishOp DoubleAcosOp   = Just MO_F64_Acos-callishOp DoubleAtanOp   = Just MO_F64_Atan-callishOp DoubleAsinhOp  = Just MO_F64_Asinh-callishOp DoubleAcoshOp  = Just MO_F64_Acosh-callishOp DoubleAtanhOp  = Just MO_F64_Atanh-callishOp DoubleLogOp    = Just MO_F64_Log-callishOp DoubleExpOp    = Just MO_F64_Exp-callishOp DoubleSqrtOp   = Just MO_F64_Sqrt--callishOp FloatPowerOp  = Just MO_F32_Pwr-callishOp FloatSinOp    = Just MO_F32_Sin-callishOp FloatCosOp    = Just MO_F32_Cos-callishOp FloatTanOp    = Just MO_F32_Tan-callishOp FloatSinhOp   = Just MO_F32_Sinh-callishOp FloatCoshOp   = Just MO_F32_Cosh-callishOp FloatTanhOp   = Just MO_F32_Tanh-callishOp FloatAsinOp   = Just MO_F32_Asin-callishOp FloatAcosOp   = Just MO_F32_Acos-callishOp FloatAtanOp   = Just MO_F32_Atan-callishOp FloatAsinhOp  = Just MO_F32_Asinh-callishOp FloatAcoshOp  = Just MO_F32_Acosh-callishOp FloatAtanhOp  = Just MO_F32_Atanh-callishOp FloatLogOp    = Just MO_F32_Log-callishOp FloatExpOp    = Just MO_F32_Exp-callishOp FloatSqrtOp   = Just MO_F32_Sqrt--callishOp _ = Nothing----------------------------------------------------------------------------------- Helpers for translating various minor variants of array indexing.--doIndexOffAddrOp :: Maybe MachOp-                 -> CmmType-                 -> [LocalReg]-                 -> [CmmExpr]-                 -> FCode ()-doIndexOffAddrOp maybe_post_read_cast rep [res] [addr,idx]-   = mkBasicIndexedRead 0 maybe_post_read_cast rep res addr rep idx-doIndexOffAddrOp _ _ _ _-   = panic "StgCmmPrim: doIndexOffAddrOp"--doIndexOffAddrOpAs :: Maybe MachOp-                   -> CmmType-                   -> CmmType-                   -> [LocalReg]-                   -> [CmmExpr]-                   -> FCode ()-doIndexOffAddrOpAs maybe_post_read_cast rep idx_rep [res] [addr,idx]-   = mkBasicIndexedRead 0 maybe_post_read_cast rep res addr idx_rep idx-doIndexOffAddrOpAs _ _ _ _ _-   = panic "StgCmmPrim: doIndexOffAddrOpAs"--doIndexByteArrayOp :: Maybe MachOp-                   -> CmmType-                   -> [LocalReg]-                   -> [CmmExpr]-                   -> FCode ()-doIndexByteArrayOp maybe_post_read_cast rep [res] [addr,idx]-   = do dflags <- getDynFlags-        mkBasicIndexedRead (arrWordsHdrSize dflags) maybe_post_read_cast rep res addr rep idx-doIndexByteArrayOp _ _ _ _-   = panic "StgCmmPrim: doIndexByteArrayOp"--doIndexByteArrayOpAs :: Maybe MachOp-                    -> CmmType-                    -> CmmType-                    -> [LocalReg]-                    -> [CmmExpr]-                    -> FCode ()-doIndexByteArrayOpAs maybe_post_read_cast rep idx_rep [res] [addr,idx]-   = do dflags <- getDynFlags-        mkBasicIndexedRead (arrWordsHdrSize dflags) maybe_post_read_cast rep res addr idx_rep idx-doIndexByteArrayOpAs _ _ _ _ _-   = panic "StgCmmPrim: doIndexByteArrayOpAs"--doReadPtrArrayOp :: LocalReg-                 -> CmmExpr-                 -> CmmExpr-                 -> FCode ()-doReadPtrArrayOp res addr idx-   = do dflags <- getDynFlags-        mkBasicIndexedRead (arrPtrsHdrSize dflags) Nothing (gcWord dflags) res addr (gcWord dflags) idx--doWriteOffAddrOp :: Maybe MachOp-                 -> CmmType-                 -> [LocalReg]-                 -> [CmmExpr]-                 -> FCode ()-doWriteOffAddrOp maybe_pre_write_cast idx_ty [] [addr,idx,val]-   = mkBasicIndexedWrite 0 maybe_pre_write_cast addr idx_ty idx val-doWriteOffAddrOp _ _ _ _-   = panic "StgCmmPrim: doWriteOffAddrOp"--doWriteByteArrayOp :: Maybe MachOp-                   -> CmmType-                   -> [LocalReg]-                   -> [CmmExpr]-                   -> FCode ()-doWriteByteArrayOp maybe_pre_write_cast idx_ty [] [addr,idx,val]-   = do dflags <- getDynFlags-        mkBasicIndexedWrite (arrWordsHdrSize dflags) maybe_pre_write_cast addr idx_ty idx val-doWriteByteArrayOp _ _ _ _-   = panic "StgCmmPrim: doWriteByteArrayOp"--doWritePtrArrayOp :: CmmExpr-                  -> CmmExpr-                  -> CmmExpr-                  -> FCode ()-doWritePtrArrayOp addr idx val-  = do dflags <- getDynFlags-       let ty = cmmExprType dflags val-       -- This write barrier is to ensure that the heap writes to the object-       -- referred to by val have happened before we write val into the array.-       -- See #12469 for details.-       emitPrimCall [] MO_WriteBarrier []-       mkBasicIndexedWrite (arrPtrsHdrSize dflags) Nothing addr ty idx val-       emit (setInfo addr (CmmLit (CmmLabel mkMAP_DIRTY_infoLabel)))-  -- the write barrier.  We must write a byte into the mark table:-  -- bits8[a + header_size + StgMutArrPtrs_size(a) + x >> N]-       emit $ mkStore (-         cmmOffsetExpr dflags-          (cmmOffsetExprW dflags (cmmOffsetB dflags addr (arrPtrsHdrSize dflags))-                         (loadArrPtrsSize dflags addr))-          (CmmMachOp (mo_wordUShr dflags) [idx,-                                           mkIntExpr dflags (mUT_ARR_PTRS_CARD_BITS dflags)])-         ) (CmmLit (CmmInt 1 W8))--loadArrPtrsSize :: DynFlags -> CmmExpr -> CmmExpr-loadArrPtrsSize dflags addr = CmmLoad (cmmOffsetB dflags addr off) (bWord dflags)- where off = fixedHdrSize dflags + oFFSET_StgMutArrPtrs_ptrs dflags--mkBasicIndexedRead :: ByteOff      -- Initial offset in bytes-                   -> Maybe MachOp -- Optional result cast-                   -> CmmType      -- Type of element we are accessing-                   -> LocalReg     -- Destination-                   -> CmmExpr      -- Base address-                   -> CmmType      -- Type of element by which we are indexing-                   -> CmmExpr      -- Index-                   -> FCode ()-mkBasicIndexedRead off Nothing ty res base idx_ty idx-   = do dflags <- getDynFlags-        emitAssign (CmmLocal res) (cmmLoadIndexOffExpr dflags off ty base idx_ty idx)-mkBasicIndexedRead off (Just cast) ty res base idx_ty idx-   = do dflags <- getDynFlags-        emitAssign (CmmLocal res) (CmmMachOp cast [-                                   cmmLoadIndexOffExpr dflags off ty base idx_ty idx])--mkBasicIndexedWrite :: ByteOff      -- Initial offset in bytes-                    -> Maybe MachOp -- Optional value cast-                    -> CmmExpr      -- Base address-                    -> CmmType      -- Type of element by which we are indexing-                    -> CmmExpr      -- Index-                    -> CmmExpr      -- Value to write-                    -> FCode ()-mkBasicIndexedWrite off Nothing base idx_ty idx val-   = do dflags <- getDynFlags-        emitStore (cmmIndexOffExpr dflags off (typeWidth idx_ty) base idx) val-mkBasicIndexedWrite off (Just cast) base idx_ty idx val-   = mkBasicIndexedWrite off Nothing base idx_ty idx (CmmMachOp cast [val])---- ------------------------------------------------------------------------------- Misc utils--cmmIndexOffExpr :: DynFlags-                -> ByteOff  -- Initial offset in bytes-                -> Width    -- Width of element by which we are indexing-                -> CmmExpr  -- Base address-                -> CmmExpr  -- Index-                -> CmmExpr-cmmIndexOffExpr dflags off width base idx-   = cmmIndexExpr dflags width (cmmOffsetB dflags base off) idx--cmmLoadIndexOffExpr :: DynFlags-                    -> ByteOff  -- Initial offset in bytes-                    -> CmmType  -- Type of element we are accessing-                    -> CmmExpr  -- Base address-                    -> CmmType  -- Type of element by which we are indexing-                    -> CmmExpr  -- Index-                    -> CmmExpr-cmmLoadIndexOffExpr dflags off ty base idx_ty idx-   = CmmLoad (cmmIndexOffExpr dflags off (typeWidth idx_ty) base idx) ty--setInfo :: CmmExpr -> CmmExpr -> CmmAGraph-setInfo closure_ptr info_ptr = mkStore closure_ptr info_ptr----------------------------------------------------------------------------------- Helpers for translating vector primops.--vecVmmType :: PrimOpVecCat -> Length -> Width -> CmmType-vecVmmType pocat n w = vec n (vecCmmCat pocat w)--vecCmmCat :: PrimOpVecCat -> Width -> CmmType-vecCmmCat IntVec   = cmmBits-vecCmmCat WordVec  = cmmBits-vecCmmCat FloatVec = cmmFloat--vecElemInjectCast :: DynFlags -> PrimOpVecCat -> Width -> Maybe MachOp-vecElemInjectCast _      FloatVec _   =  Nothing-vecElemInjectCast dflags IntVec   W8  =  Just (mo_WordTo8  dflags)-vecElemInjectCast dflags IntVec   W16 =  Just (mo_WordTo16 dflags)-vecElemInjectCast dflags IntVec   W32 =  Just (mo_WordTo32 dflags)-vecElemInjectCast _      IntVec   W64 =  Nothing-vecElemInjectCast dflags WordVec  W8  =  Just (mo_WordTo8  dflags)-vecElemInjectCast dflags WordVec  W16 =  Just (mo_WordTo16 dflags)-vecElemInjectCast dflags WordVec  W32 =  Just (mo_WordTo32 dflags)-vecElemInjectCast _      WordVec  W64 =  Nothing-vecElemInjectCast _      _        _   =  Nothing--vecElemProjectCast :: DynFlags -> PrimOpVecCat -> Width -> Maybe MachOp-vecElemProjectCast _      FloatVec _   =  Nothing-vecElemProjectCast dflags IntVec   W8  =  Just (mo_s_8ToWord  dflags)-vecElemProjectCast dflags IntVec   W16 =  Just (mo_s_16ToWord dflags)-vecElemProjectCast dflags IntVec   W32 =  Just (mo_s_32ToWord dflags)-vecElemProjectCast _      IntVec   W64 =  Nothing-vecElemProjectCast dflags WordVec  W8  =  Just (mo_u_8ToWord  dflags)-vecElemProjectCast dflags WordVec  W16 =  Just (mo_u_16ToWord dflags)-vecElemProjectCast dflags WordVec  W32 =  Just (mo_u_32ToWord dflags)-vecElemProjectCast _      WordVec  W64 =  Nothing-vecElemProjectCast _      _        _   =  Nothing---- Check to make sure that we can generate code for the specified vector type--- given the current set of dynamic flags.-checkVecCompatibility :: DynFlags -> PrimOpVecCat -> Length -> Width -> FCode ()-checkVecCompatibility dflags vcat l w = do-    when (hscTarget dflags /= HscLlvm) $ do-        sorry $ unlines ["SIMD vector instructions require the LLVM back-end."-                         ,"Please use -fllvm."]-    check vecWidth vcat l w-  where-    check :: Width -> PrimOpVecCat -> Length -> Width -> FCode ()-    check W128 FloatVec 4 W32 | not (isSseEnabled dflags) =-        sorry $ "128-bit wide single-precision floating point " ++-                "SIMD vector instructions require at least -msse."-    check W128 _ _ _ | not (isSse2Enabled dflags) =-        sorry $ "128-bit wide integer and double precision " ++-                "SIMD vector instructions require at least -msse2."-    check W256 FloatVec _ _ | not (isAvxEnabled dflags) =-        sorry $ "256-bit wide floating point " ++-                "SIMD vector instructions require at least -mavx."-    check W256 _ _ _ | not (isAvx2Enabled dflags) =-        sorry $ "256-bit wide integer " ++-                "SIMD vector instructions require at least -mavx2."-    check W512 _ _ _ | not (isAvx512fEnabled dflags) =-        sorry $ "512-bit wide " ++-                "SIMD vector instructions require -mavx512f."-    check _ _ _ _ = return ()--    vecWidth = typeWidth (vecVmmType vcat l w)----------------------------------------------------------------------------------- Helpers for translating vector packing and unpacking.--doVecPackOp :: Maybe MachOp  -- Cast from element to vector component-            -> CmmType       -- Type of vector-            -> CmmExpr       -- Initial vector-            -> [CmmExpr]     -- Elements-            -> CmmFormal     -- Destination for result-            -> FCode ()-doVecPackOp maybe_pre_write_cast ty z es res = do-    dst <- newTemp ty-    emitAssign (CmmLocal dst) z-    vecPack dst es 0-  where-    vecPack :: CmmFormal -> [CmmExpr] -> Int -> FCode ()-    vecPack src [] _ =-        emitAssign (CmmLocal res) (CmmReg (CmmLocal src))--    vecPack src (e : es) i = do-        dst <- newTemp ty-        if isFloatType (vecElemType ty)-          then emitAssign (CmmLocal dst) (CmmMachOp (MO_VF_Insert len wid)-                                                    [CmmReg (CmmLocal src), cast e, iLit])-          else emitAssign (CmmLocal dst) (CmmMachOp (MO_V_Insert len wid)-                                                    [CmmReg (CmmLocal src), cast e, iLit])-        vecPack dst es (i + 1)-      where-        -- vector indices are always 32-bits-        iLit = CmmLit (CmmInt (toInteger i) W32)--    cast :: CmmExpr -> CmmExpr-    cast val = case maybe_pre_write_cast of-                 Nothing   -> val-                 Just cast -> CmmMachOp cast [val]--    len :: Length-    len = vecLength ty--    wid :: Width-    wid = typeWidth (vecElemType ty)--doVecUnpackOp :: Maybe MachOp  -- Cast from vector component to element result-              -> CmmType       -- Type of vector-              -> CmmExpr       -- Vector-              -> [CmmFormal]   -- Element results-              -> FCode ()-doVecUnpackOp maybe_post_read_cast ty e res =-    vecUnpack res 0-  where-    vecUnpack :: [CmmFormal] -> Int -> FCode ()-    vecUnpack [] _ =-        return ()--    vecUnpack (r : rs) i = do-        if isFloatType (vecElemType ty)-          then emitAssign (CmmLocal r) (cast (CmmMachOp (MO_VF_Extract len wid)-                                             [e, iLit]))-          else emitAssign (CmmLocal r) (cast (CmmMachOp (MO_V_Extract len wid)-                                             [e, iLit]))-        vecUnpack rs (i + 1)-      where-        -- vector indices are always 32-bits-        iLit = CmmLit (CmmInt (toInteger i) W32)--    cast :: CmmExpr -> CmmExpr-    cast val = case maybe_post_read_cast of-                 Nothing   -> val-                 Just cast -> CmmMachOp cast [val]--    len :: Length-    len = vecLength ty--    wid :: Width-    wid = typeWidth (vecElemType ty)--doVecInsertOp :: Maybe MachOp  -- Cast from element to vector component-              -> CmmType       -- Vector type-              -> CmmExpr       -- Source vector-              -> CmmExpr       -- Element-              -> CmmExpr       -- Index at which to insert element-              -> CmmFormal     -- Destination for result-              -> FCode ()-doVecInsertOp maybe_pre_write_cast ty src e idx res = do-    dflags <- getDynFlags-    -- vector indices are always 32-bits-    let idx' :: CmmExpr-        idx' = CmmMachOp (MO_SS_Conv (wordWidth dflags) W32) [idx]-    if isFloatType (vecElemType ty)-      then emitAssign (CmmLocal res) (CmmMachOp (MO_VF_Insert len wid) [src, cast e, idx'])-      else emitAssign (CmmLocal res) (CmmMachOp (MO_V_Insert len wid) [src, cast e, idx'])-  where-    cast :: CmmExpr -> CmmExpr-    cast val = case maybe_pre_write_cast of-                 Nothing   -> val-                 Just cast -> CmmMachOp cast [val]--    len :: Length-    len = vecLength ty--    wid :: Width-    wid = typeWidth (vecElemType ty)----------------------------------------------------------------------------------- Helpers for translating prefetching.----- | Translate byte array prefetch operations into proper primcalls.-doPrefetchByteArrayOp :: Int-                      -> [CmmExpr]-                      -> FCode ()-doPrefetchByteArrayOp locality  [addr,idx]-   = do dflags <- getDynFlags-        mkBasicPrefetch locality (arrWordsHdrSize dflags)  addr idx-doPrefetchByteArrayOp _ _-   = panic "StgCmmPrim: doPrefetchByteArrayOp"---- | Translate mutable byte array prefetch operations into proper primcalls.-doPrefetchMutableByteArrayOp :: Int-                      -> [CmmExpr]-                      -> FCode ()-doPrefetchMutableByteArrayOp locality  [addr,idx]-   = do dflags <- getDynFlags-        mkBasicPrefetch locality (arrWordsHdrSize dflags)  addr idx-doPrefetchMutableByteArrayOp _ _-   = panic "StgCmmPrim: doPrefetchByteArrayOp"---- | Translate address prefetch operations into proper primcalls.-doPrefetchAddrOp ::Int-                 -> [CmmExpr]-                 -> FCode ()-doPrefetchAddrOp locality   [addr,idx]-   = mkBasicPrefetch locality 0  addr idx-doPrefetchAddrOp _ _-   = panic "StgCmmPrim: doPrefetchAddrOp"---- | Translate value prefetch operations into proper primcalls.-doPrefetchValueOp :: Int-                 -> [CmmExpr]-                 -> FCode ()-doPrefetchValueOp  locality   [addr]-  =  do dflags <- getDynFlags-        mkBasicPrefetch locality 0 addr  (CmmLit (CmmInt 0 (wordWidth dflags)))-doPrefetchValueOp _ _-  = panic "StgCmmPrim: doPrefetchValueOp"---- | helper to generate prefetch primcalls-mkBasicPrefetch :: Int          -- Locality level 0-3-                -> ByteOff      -- Initial offset in bytes-                -> CmmExpr      -- Base address-                -> CmmExpr      -- Index-                -> FCode ()-mkBasicPrefetch locality off base idx-   = do dflags <- getDynFlags-        emitPrimCall [] (MO_Prefetch_Data locality) [cmmIndexExpr dflags W8 (cmmOffsetB dflags base off) idx]-        return ()---- ------------------------------------------------------------------------------- Allocating byte arrays---- | Takes a register to return the newly allocated array in and the--- size of the new array in bytes. Allocates a new--- 'MutableByteArray#'.-doNewByteArrayOp :: CmmFormal -> ByteOff -> FCode ()-doNewByteArrayOp res_r n = do-    dflags <- getDynFlags--    let info_ptr = mkLblExpr mkArrWords_infoLabel-        rep = arrWordsRep dflags n--    tickyAllocPrim (mkIntExpr dflags (arrWordsHdrSize dflags))-        (mkIntExpr dflags (nonHdrSize dflags rep))-        (zeroExpr dflags)--    let hdr_size = fixedHdrSize dflags--    base <- allocHeapClosure rep info_ptr cccsExpr-                     [ (mkIntExpr dflags n,-                        hdr_size + oFFSET_StgArrBytes_bytes dflags)-                     ]--    emit $ mkAssign (CmmLocal res_r) base---- ------------------------------------------------------------------------------- Comparing byte arrays--doCompareByteArraysOp :: LocalReg -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr-                     -> FCode ()-doCompareByteArraysOp res ba1 ba1_off ba2 ba2_off n = do-    dflags <- getDynFlags-    ba1_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba1 (arrWordsHdrSize dflags)) ba1_off-    ba2_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba2 (arrWordsHdrSize dflags)) ba2_off--    -- short-cut in case of equal pointers avoiding a costly-    -- subroutine call to the memcmp(3) routine; the Cmm logic below-    -- results in assembly code being generated for-    ---    --   cmpPrefix10 :: ByteArray# -> ByteArray# -> Int#-    --   cmpPrefix10 ba1 ba2 = compareByteArrays# ba1 0# ba2 0# 10#-    ---    -- that looks like-    ---    --          leaq 16(%r14),%rax-    --          leaq 16(%rsi),%rbx-    --          xorl %ecx,%ecx-    --          cmpq %rbx,%rax-    --          je l_ptr_eq-    ---    --          ; NB: the common case (unequal pointers) falls-through-    --          ; the conditional jump, and therefore matches the-    --          ; usual static branch prediction convention of modern cpus-    ---    --          subq $8,%rsp-    --          movq %rbx,%rsi-    --          movq %rax,%rdi-    --          movl $10,%edx-    --          xorl %eax,%eax-    --          call memcmp-    --          addq $8,%rsp-    --          movslq %eax,%rax-    --          movq %rax,%rcx-    --  l_ptr_eq:-    --          movq %rcx,%rbx-    --          jmp *(%rbp)--    l_ptr_eq <- newBlockId-    l_ptr_ne <- newBlockId--    emit (mkAssign (CmmLocal res) (zeroExpr dflags))-    emit (mkCbranch (cmmEqWord dflags ba1_p ba2_p)-                    l_ptr_eq l_ptr_ne (Just False))--    emitLabel l_ptr_ne-    emitMemcmpCall res ba1_p ba2_p n 1--    emitLabel l_ptr_eq---- ------------------------------------------------------------------------------- Copying byte arrays---- | Takes a source 'ByteArray#', an offset in the source array, a--- destination 'MutableByteArray#', an offset into the destination--- array, and the number of bytes to copy.  Copies the given number of--- bytes from the source array to the destination array.-doCopyByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr-                  -> FCode ()-doCopyByteArrayOp = emitCopyByteArray copy-  where-    -- Copy data (we assume the arrays aren't overlapping since-    -- they're of different types)-    copy _src _dst dst_p src_p bytes =-        emitMemcpyCall dst_p src_p bytes 1---- | Takes a source 'MutableByteArray#', an offset in the source--- array, a destination 'MutableByteArray#', an offset into the--- destination array, and the number of bytes to copy.  Copies the--- given number of bytes from the source array to the destination--- array.-doCopyMutableByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr-                         -> FCode ()-doCopyMutableByteArrayOp = emitCopyByteArray copy-  where-    -- The only time the memory might overlap is when the two arrays-    -- we were provided are the same array!-    -- TODO: Optimize branch for common case of no aliasing.-    copy src dst dst_p src_p bytes = do-        dflags <- getDynFlags-        (moveCall, cpyCall) <- forkAltPair-            (getCode $ emitMemmoveCall dst_p src_p bytes 1)-            (getCode $ emitMemcpyCall  dst_p src_p bytes 1)-        emit =<< mkCmmIfThenElse (cmmEqWord dflags src dst) moveCall cpyCall--emitCopyByteArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr-                      -> FCode ())-                  -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr-                  -> FCode ()-emitCopyByteArray copy src src_off dst dst_off n = do-    dflags <- getDynFlags-    dst_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags dst (arrWordsHdrSize dflags)) dst_off-    src_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags src (arrWordsHdrSize dflags)) src_off-    copy src dst dst_p src_p n---- | Takes a source 'ByteArray#', an offset in the source array, a--- destination 'Addr#', and the number of bytes to copy.  Copies the given--- number of bytes from the source array to the destination memory region.-doCopyByteArrayToAddrOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> FCode ()-doCopyByteArrayToAddrOp src src_off dst_p bytes = do-    -- Use memcpy (we are allowed to assume the arrays aren't overlapping)-    dflags <- getDynFlags-    src_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags src (arrWordsHdrSize dflags)) src_off-    emitMemcpyCall dst_p src_p bytes 1---- | Takes a source 'MutableByteArray#', an offset in the source array, a--- destination 'Addr#', and the number of bytes to copy.  Copies the given--- number of bytes from the source array to the destination memory region.-doCopyMutableByteArrayToAddrOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr-                               -> FCode ()-doCopyMutableByteArrayToAddrOp = doCopyByteArrayToAddrOp---- | Takes a source 'Addr#', a destination 'MutableByteArray#', an offset into--- the destination array, and the number of bytes to copy.  Copies the given--- number of bytes from the source memory region to the destination array.-doCopyAddrToByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> FCode ()-doCopyAddrToByteArrayOp src_p dst dst_off bytes = do-    -- Use memcpy (we are allowed to assume the arrays aren't overlapping)-    dflags <- getDynFlags-    dst_p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags dst (arrWordsHdrSize dflags)) dst_off-    emitMemcpyCall dst_p src_p bytes 1----- ------------------------------------------------------------------------------- Setting byte arrays---- | Takes a 'MutableByteArray#', an offset into the array, a length,--- and a byte, and sets each of the selected bytes in the array to the--- character.-doSetByteArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr-                 -> FCode ()-doSetByteArrayOp ba off len c-    = do dflags <- getDynFlags-         p <- assignTempE $ cmmOffsetExpr dflags (cmmOffsetB dflags ba (arrWordsHdrSize dflags)) off-         emitMemsetCall p c len 1---- ------------------------------------------------------------------------------- Allocating arrays---- | Allocate a new array.-doNewArrayOp :: CmmFormal             -- ^ return register-             -> SMRep                 -- ^ representation of the array-             -> CLabel                -- ^ info pointer-             -> [(CmmExpr, ByteOff)]  -- ^ header payload-             -> WordOff               -- ^ array size-             -> CmmExpr               -- ^ initial element-             -> FCode ()-doNewArrayOp res_r rep info payload n init = do-    dflags <- getDynFlags--    let info_ptr = mkLblExpr info--    tickyAllocPrim (mkIntExpr dflags (hdrSize dflags rep))-        (mkIntExpr dflags (nonHdrSize dflags rep))-        (zeroExpr dflags)--    base <- allocHeapClosure rep info_ptr cccsExpr payload--    arr <- CmmLocal `fmap` newTemp (bWord dflags)-    emit $ mkAssign arr base--    -- Initialise all elements of the array-    p <- assignTemp $ cmmOffsetB dflags (CmmReg arr) (hdrSize dflags rep)-    for <- newBlockId-    emitLabel for-    let loopBody =-            [ mkStore (CmmReg (CmmLocal p)) init-            , mkAssign (CmmLocal p) (cmmOffsetW dflags (CmmReg (CmmLocal p)) 1)-            , mkBranch for ]-    emit =<< mkCmmIfThen-        (cmmULtWord dflags (CmmReg (CmmLocal p))-         (cmmOffsetW dflags (CmmReg arr)-          (hdrSizeW dflags rep + n)))-        (catAGraphs loopBody)--    emit $ mkAssign (CmmLocal res_r) (CmmReg arr)---- ------------------------------------------------------------------------------- Copying pointer arrays---- EZY: This code has an unusually high amount of assignTemp calls, seen--- nowhere else in the code generator.  This is mostly because these--- "primitive" ops result in a surprisingly large amount of code.  It--- will likely be worthwhile to optimize what is emitted here, so that--- our optimization passes don't waste time repeatedly optimizing the--- same bits of code.---- More closely imitates 'assignTemp' from the old code generator, which--- returns a CmmExpr rather than a LocalReg.-assignTempE :: CmmExpr -> FCode CmmExpr-assignTempE e = do-    t <- assignTemp e-    return (CmmReg (CmmLocal t))---- | Takes a source 'Array#', an offset in the source array, a--- destination 'MutableArray#', an offset into the destination array,--- and the number of elements to copy.  Copies the given number of--- elements from the source array to the destination array.-doCopyArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff-              -> FCode ()-doCopyArrayOp = emitCopyArray copy-  where-    -- Copy data (we assume the arrays aren't overlapping since-    -- they're of different types)-    copy _src _dst dst_p src_p bytes =-        do dflags <- getDynFlags-           emitMemcpyCall dst_p src_p (mkIntExpr dflags bytes)-               (wORD_SIZE dflags)----- | Takes a source 'MutableArray#', an offset in the source array, a--- destination 'MutableArray#', an offset into the destination array,--- and the number of elements to copy.  Copies the given number of--- elements from the source array to the destination array.-doCopyMutableArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff-                     -> FCode ()-doCopyMutableArrayOp = emitCopyArray copy-  where-    -- The only time the memory might overlap is when the two arrays-    -- we were provided are the same array!-    -- TODO: Optimize branch for common case of no aliasing.-    copy src dst dst_p src_p bytes = do-        dflags <- getDynFlags-        (moveCall, cpyCall) <- forkAltPair-            (getCode $ emitMemmoveCall dst_p src_p (mkIntExpr dflags bytes)-             (wORD_SIZE dflags))-            (getCode $ emitMemcpyCall  dst_p src_p (mkIntExpr dflags bytes)-             (wORD_SIZE dflags))-        emit =<< mkCmmIfThenElse (cmmEqWord dflags src dst) moveCall cpyCall--emitCopyArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> ByteOff-                  -> FCode ())  -- ^ copy function-              -> CmmExpr        -- ^ source array-              -> CmmExpr        -- ^ offset in source array-              -> CmmExpr        -- ^ destination array-              -> CmmExpr        -- ^ offset in destination array-              -> WordOff        -- ^ number of elements to copy-              -> FCode ()-emitCopyArray copy src0 src_off dst0 dst_off0 n = do-    dflags <- getDynFlags-    when (n /= 0) $ do-        -- Passed as arguments (be careful)-        src     <- assignTempE src0-        dst     <- assignTempE dst0-        dst_off <- assignTempE dst_off0--        -- Set the dirty bit in the header.-        emit (setInfo dst (CmmLit (CmmLabel mkMAP_DIRTY_infoLabel)))--        dst_elems_p <- assignTempE $ cmmOffsetB dflags dst-                       (arrPtrsHdrSize dflags)-        dst_p <- assignTempE $ cmmOffsetExprW dflags dst_elems_p dst_off-        src_p <- assignTempE $ cmmOffsetExprW dflags-                 (cmmOffsetB dflags src (arrPtrsHdrSize dflags)) src_off-        let bytes = wordsToBytes dflags n--        copy src dst dst_p src_p bytes--        -- The base address of the destination card table-        dst_cards_p <- assignTempE $ cmmOffsetExprW dflags dst_elems_p-                       (loadArrPtrsSize dflags dst)--        emitSetCards dst_off dst_cards_p n--doCopySmallArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff-                   -> FCode ()-doCopySmallArrayOp = emitCopySmallArray copy-  where-    -- Copy data (we assume the arrays aren't overlapping since-    -- they're of different types)-    copy _src _dst dst_p src_p bytes =-        do dflags <- getDynFlags-           emitMemcpyCall dst_p src_p (mkIntExpr dflags bytes)-               (wORD_SIZE dflags)---doCopySmallMutableArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> WordOff-                          -> FCode ()-doCopySmallMutableArrayOp = emitCopySmallArray copy-  where-    -- The only time the memory might overlap is when the two arrays-    -- we were provided are the same array!-    -- TODO: Optimize branch for common case of no aliasing.-    copy src dst dst_p src_p bytes = do-        dflags <- getDynFlags-        (moveCall, cpyCall) <- forkAltPair-            (getCode $ emitMemmoveCall dst_p src_p (mkIntExpr dflags bytes)-             (wORD_SIZE dflags))-            (getCode $ emitMemcpyCall  dst_p src_p (mkIntExpr dflags bytes)-             (wORD_SIZE dflags))-        emit =<< mkCmmIfThenElse (cmmEqWord dflags src dst) moveCall cpyCall--emitCopySmallArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> ByteOff-                       -> FCode ())  -- ^ copy function-                   -> CmmExpr        -- ^ source array-                   -> CmmExpr        -- ^ offset in source array-                   -> CmmExpr        -- ^ destination array-                   -> CmmExpr        -- ^ offset in destination array-                   -> WordOff        -- ^ number of elements to copy-                   -> FCode ()-emitCopySmallArray copy src0 src_off dst0 dst_off n = do-    dflags <- getDynFlags--    -- Passed as arguments (be careful)-    src     <- assignTempE src0-    dst     <- assignTempE dst0--    -- Set the dirty bit in the header.-    emit (setInfo dst (CmmLit (CmmLabel mkSMAP_DIRTY_infoLabel)))--    dst_p <- assignTempE $ cmmOffsetExprW dflags-             (cmmOffsetB dflags dst (smallArrPtrsHdrSize dflags)) dst_off-    src_p <- assignTempE $ cmmOffsetExprW dflags-             (cmmOffsetB dflags src (smallArrPtrsHdrSize dflags)) src_off-    let bytes = wordsToBytes dflags n--    copy src dst dst_p src_p bytes---- | Takes an info table label, a register to return the newly--- allocated array in, a source array, an offset in the source array,--- and the number of elements to copy. Allocates a new array and--- initializes it from the source array.-emitCloneArray :: CLabel -> CmmFormal -> CmmExpr -> CmmExpr -> WordOff-               -> FCode ()-emitCloneArray info_p res_r src src_off n = do-    dflags <- getDynFlags--    let info_ptr = mkLblExpr info_p-        rep = arrPtrsRep dflags n--    tickyAllocPrim (mkIntExpr dflags (arrPtrsHdrSize dflags))-        (mkIntExpr dflags (nonHdrSize dflags rep))-        (zeroExpr dflags)--    let hdr_size = fixedHdrSize dflags--    base <- allocHeapClosure rep info_ptr cccsExpr-                     [ (mkIntExpr dflags n,-                        hdr_size + oFFSET_StgMutArrPtrs_ptrs dflags)-                     , (mkIntExpr dflags (nonHdrSizeW rep),-                        hdr_size + oFFSET_StgMutArrPtrs_size dflags)-                     ]--    arr <- CmmLocal `fmap` newTemp (bWord dflags)-    emit $ mkAssign arr base--    dst_p <- assignTempE $ cmmOffsetB dflags (CmmReg arr)-             (arrPtrsHdrSize dflags)-    src_p <- assignTempE $ cmmOffsetExprW dflags src-             (cmmAddWord dflags-              (mkIntExpr dflags (arrPtrsHdrSizeW dflags)) src_off)--    emitMemcpyCall dst_p src_p (mkIntExpr dflags (wordsToBytes dflags n))-        (wORD_SIZE dflags)--    emit $ mkAssign (CmmLocal res_r) (CmmReg arr)---- | Takes an info table label, a register to return the newly--- allocated array in, a source array, an offset in the source array,--- and the number of elements to copy. Allocates a new array and--- initializes it from the source array.-emitCloneSmallArray :: CLabel -> CmmFormal -> CmmExpr -> CmmExpr -> WordOff-                    -> FCode ()-emitCloneSmallArray info_p res_r src src_off n = do-    dflags <- getDynFlags--    let info_ptr = mkLblExpr info_p-        rep = smallArrPtrsRep n--    tickyAllocPrim (mkIntExpr dflags (smallArrPtrsHdrSize dflags))-        (mkIntExpr dflags (nonHdrSize dflags rep))-        (zeroExpr dflags)--    let hdr_size = fixedHdrSize dflags--    base <- allocHeapClosure rep info_ptr cccsExpr-                     [ (mkIntExpr dflags n,-                        hdr_size + oFFSET_StgSmallMutArrPtrs_ptrs dflags)-                     ]--    arr <- CmmLocal `fmap` newTemp (bWord dflags)-    emit $ mkAssign arr base--    dst_p <- assignTempE $ cmmOffsetB dflags (CmmReg arr)-             (smallArrPtrsHdrSize dflags)-    src_p <- assignTempE $ cmmOffsetExprW dflags src-             (cmmAddWord dflags-              (mkIntExpr dflags (smallArrPtrsHdrSizeW dflags)) src_off)--    emitMemcpyCall dst_p src_p (mkIntExpr dflags (wordsToBytes dflags n))-        (wORD_SIZE dflags)--    emit $ mkAssign (CmmLocal res_r) (CmmReg arr)---- | Takes and offset in the destination array, the base address of--- the card table, and the number of elements affected (*not* the--- number of cards). The number of elements may not be zero.--- Marks the relevant cards as dirty.-emitSetCards :: CmmExpr -> CmmExpr -> WordOff -> FCode ()-emitSetCards dst_start dst_cards_start n = do-    dflags <- getDynFlags-    start_card <- assignTempE $ cardCmm dflags dst_start-    let end_card = cardCmm dflags-                   (cmmSubWord dflags-                    (cmmAddWord dflags dst_start (mkIntExpr dflags n))-                    (mkIntExpr dflags 1))-    emitMemsetCall (cmmAddWord dflags dst_cards_start start_card)-        (mkIntExpr dflags 1)-        (cmmAddWord dflags (cmmSubWord dflags end_card start_card) (mkIntExpr dflags 1))-        1 -- no alignment (1 byte)---- Convert an element index to a card index-cardCmm :: DynFlags -> CmmExpr -> CmmExpr-cardCmm dflags i =-    cmmUShrWord dflags i (mkIntExpr dflags (mUT_ARR_PTRS_CARD_BITS dflags))----------------------------------------------------------------------------------- SmallArray PrimOp implementations--doReadSmallPtrArrayOp :: LocalReg-                      -> CmmExpr-                      -> CmmExpr-                      -> FCode ()-doReadSmallPtrArrayOp res addr idx = do-    dflags <- getDynFlags-    mkBasicIndexedRead (smallArrPtrsHdrSize dflags) Nothing (gcWord dflags) res addr-        (gcWord dflags) idx--doWriteSmallPtrArrayOp :: CmmExpr-                       -> CmmExpr-                       -> CmmExpr-                       -> FCode ()-doWriteSmallPtrArrayOp addr idx val = do-    dflags <- getDynFlags-    let ty = cmmExprType dflags val-    emitPrimCall [] MO_WriteBarrier [] -- #12469-    mkBasicIndexedWrite (smallArrPtrsHdrSize dflags) Nothing addr ty idx val-    emit (setInfo addr (CmmLit (CmmLabel mkSMAP_DIRTY_infoLabel)))----------------------------------------------------------------------------------- Atomic read-modify-write---- | Emit an atomic modification to a byte array element. The result--- reg contains that previous value of the element. Implies a full--- memory barrier.-doAtomicRMW :: LocalReg      -- ^ Result reg-            -> AtomicMachOp  -- ^ Atomic op (e.g. add)-            -> CmmExpr       -- ^ MutableByteArray#-            -> CmmExpr       -- ^ Index-            -> CmmType       -- ^ Type of element by which we are indexing-            -> CmmExpr       -- ^ Op argument (e.g. amount to add)-            -> FCode ()-doAtomicRMW res amop mba idx idx_ty n = do-    dflags <- getDynFlags-    let width = typeWidth idx_ty-        addr  = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)-                width mba idx-    emitPrimCall-        [ res ]-        (MO_AtomicRMW width amop)-        [ addr, n ]---- | Emit an atomic read to a byte array that acts as a memory barrier.-doAtomicReadByteArray-    :: LocalReg  -- ^ Result reg-    -> CmmExpr   -- ^ MutableByteArray#-    -> CmmExpr   -- ^ Index-    -> CmmType   -- ^ Type of element by which we are indexing-    -> FCode ()-doAtomicReadByteArray res mba idx idx_ty = do-    dflags <- getDynFlags-    let width = typeWidth idx_ty-        addr  = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)-                width mba idx-    emitPrimCall-        [ res ]-        (MO_AtomicRead width)-        [ addr ]---- | Emit an atomic write to a byte array that acts as a memory barrier.-doAtomicWriteByteArray-    :: CmmExpr   -- ^ MutableByteArray#-    -> CmmExpr   -- ^ Index-    -> CmmType   -- ^ Type of element by which we are indexing-    -> CmmExpr   -- ^ Value to write-    -> FCode ()-doAtomicWriteByteArray mba idx idx_ty val = do-    dflags <- getDynFlags-    let width = typeWidth idx_ty-        addr  = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)-                width mba idx-    emitPrimCall-        [ {- no results -} ]-        (MO_AtomicWrite width)-        [ addr, val ]--doCasByteArray-    :: LocalReg  -- ^ Result reg-    -> CmmExpr   -- ^ MutableByteArray#-    -> CmmExpr   -- ^ Index-    -> CmmType   -- ^ Type of element by which we are indexing-    -> CmmExpr   -- ^ Old value-    -> CmmExpr   -- ^ New value-    -> FCode ()-doCasByteArray res mba idx idx_ty old new = do-    dflags <- getDynFlags-    let width = (typeWidth idx_ty)-        addr = cmmIndexOffExpr dflags (arrWordsHdrSize dflags)-               width mba idx-    emitPrimCall-        [ res ]-        (MO_Cmpxchg width)-        [ addr, old, new ]----------------------------------------------------------------------------------- Helpers for emitting function calls---- | Emit a call to @memcpy@.-emitMemcpyCall :: CmmExpr -> CmmExpr -> CmmExpr -> Int -> FCode ()-emitMemcpyCall dst src n align = do-    emitPrimCall-        [ {-no results-} ]-        (MO_Memcpy align)-        [ dst, src, n ]---- | Emit a call to @memmove@.-emitMemmoveCall :: CmmExpr -> CmmExpr -> CmmExpr -> Int -> FCode ()-emitMemmoveCall dst src n align = do-    emitPrimCall-        [ {- no results -} ]-        (MO_Memmove align)-        [ dst, src, n ]---- | Emit a call to @memset@.  The second argument must fit inside an--- unsigned char.-emitMemsetCall :: CmmExpr -> CmmExpr -> CmmExpr -> Int -> FCode ()-emitMemsetCall dst c n align = do-    emitPrimCall-        [ {- no results -} ]-        (MO_Memset align)-        [ dst, c, n ]--emitMemcmpCall :: LocalReg -> CmmExpr -> CmmExpr -> CmmExpr -> Int -> FCode ()-emitMemcmpCall res ptr1 ptr2 n align = do-    -- 'MO_Memcmp' is assumed to return an 32bit 'CInt' because all-    -- code-gens currently call out to the @memcmp(3)@ C function.-    -- This was easier than moving the sign-extensions into-    -- all the code-gens.-    dflags <- getDynFlags-    let is32Bit = typeWidth (localRegType res) == W32--    cres <- if is32Bit-              then return res-              else newTemp b32--    emitPrimCall-        [ cres ]-        (MO_Memcmp align)-        [ ptr1, ptr2, n ]--    unless is32Bit $ do-      emit $ mkAssign (CmmLocal res)-                      (CmmMachOp-                         (mo_s_32ToWord dflags)-                         [(CmmReg (CmmLocal cres))])--emitBSwapCall :: LocalReg -> CmmExpr -> Width -> FCode ()-emitBSwapCall res x width = do-    emitPrimCall-        [ res ]-        (MO_BSwap width)-        [ x ]--emitPopCntCall :: LocalReg -> CmmExpr -> Width -> FCode ()-emitPopCntCall res x width = do-    emitPrimCall-        [ res ]-        (MO_PopCnt width)-        [ x ]--emitPdepCall :: LocalReg -> CmmExpr -> CmmExpr -> Width -> FCode ()-emitPdepCall res x y width = do-    emitPrimCall-        [ res ]-        (MO_Pdep width)-        [ x, y ]--emitPextCall :: LocalReg -> CmmExpr -> CmmExpr -> Width -> FCode ()-emitPextCall res x y width = do-    emitPrimCall-        [ res ]-        (MO_Pext width)-        [ x, y ]--emitClzCall :: LocalReg -> CmmExpr -> Width -> FCode ()-emitClzCall res x width = do-    emitPrimCall-        [ res ]-        (MO_Clz width)-        [ x ]--emitCtzCall :: LocalReg -> CmmExpr -> Width -> FCode ()-emitCtzCall res x width = do-    emitPrimCall-        [ res ]-        (MO_Ctz width)-        [ x ]
− codeGen/StgCmmProf.hs
@@ -1,360 +0,0 @@------------------------------------------------------------------------------------ Code generation for profiling------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmProf (-        initCostCentres, ccType, ccsType,-        mkCCostCentre, mkCCostCentreStack,--        -- Cost-centre Profiling-        dynProfHdr, profDynAlloc, profAlloc, staticProfHdr, initUpdFrameProf,-        enterCostCentreThunk, enterCostCentreFun,-        costCentreFrom,-        storeCurCCS,-        emitSetCCC,--        saveCurrentCostCentre, restoreCurrentCostCentre,--        -- Lag/drag/void stuff-        ldvEnter, ldvEnterClosure, ldvRecordCreate-  ) where--import GhcPrelude--import StgCmmClosure-import StgCmmUtils-import StgCmmMonad-import SMRep--import MkGraph-import Cmm-import CmmUtils-import CLabel--import CostCentre-import DynFlags-import FastString-import Module-import Outputable--import Control.Monad-import Data.Char (ord)------------------------------------------------------------------------------------- Cost-centre-stack Profiling------------------------------------------------------------------------------------- Expression representing the current cost centre stack-ccsType :: DynFlags -> CmmType -- Type of a cost-centre stack-ccsType = bWord--ccType :: DynFlags -> CmmType -- Type of a cost centre-ccType = bWord--storeCurCCS :: CmmExpr -> CmmAGraph-storeCurCCS e = mkAssign cccsReg e--mkCCostCentre :: CostCentre -> CmmLit-mkCCostCentre cc = CmmLabel (mkCCLabel cc)--mkCCostCentreStack :: CostCentreStack -> CmmLit-mkCCostCentreStack ccs = CmmLabel (mkCCSLabel ccs)--costCentreFrom :: DynFlags-               -> CmmExpr         -- A closure pointer-               -> CmmExpr        -- The cost centre from that closure-costCentreFrom dflags cl = CmmLoad (cmmOffsetB dflags cl (oFFSET_StgHeader_ccs dflags)) (ccsType dflags)---- | The profiling header words in a static closure-staticProfHdr :: DynFlags -> CostCentreStack -> [CmmLit]-staticProfHdr dflags ccs- = ifProfilingL dflags [mkCCostCentreStack ccs, staticLdvInit dflags]---- | Profiling header words in a dynamic closure-dynProfHdr :: DynFlags -> CmmExpr -> [CmmExpr]-dynProfHdr dflags ccs = ifProfilingL dflags [ccs, dynLdvInit dflags]---- | Initialise the profiling field of an update frame-initUpdFrameProf :: CmmExpr -> FCode ()-initUpdFrameProf frame-  = ifProfiling $        -- frame->header.prof.ccs = CCCS-    do dflags <- getDynFlags-       emitStore (cmmOffset dflags frame (oFFSET_StgHeader_ccs dflags)) cccsExpr-        -- frame->header.prof.hp.rs = NULL (or frame-header.prof.hp.ldvw = 0)-        -- is unnecessary because it is not used anyhow.--------------------------------------------------------------------------------         Saving and restoring the current cost centre------------------------------------------------------------------------------{-        Note [Saving the current cost centre]-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The current cost centre is like a global register.  Like other-global registers, it's a caller-saves one.  But consider-        case (f x) of (p,q) -> rhs-Since 'f' may set the cost centre, we must restore it-before resuming rhs.  So we want code like this:-        local_cc = CCC  -- save-        r = f( x )-        CCC = local_cc  -- restore-That is, we explicitly "save" the current cost centre in-a LocalReg, local_cc; and restore it after the call. The-C-- infrastructure will arrange to save local_cc across the-call.--The same goes for join points;-        let j x = join-stuff-        in blah-blah-We want this kind of code:-        local_cc = CCC  -- save-        blah-blah-     J:-        CCC = local_cc  -- restore--}--saveCurrentCostCentre :: FCode (Maybe LocalReg)-        -- Returns Nothing if profiling is off-saveCurrentCostCentre-  = do dflags <- getDynFlags-       if not (gopt Opt_SccProfilingOn dflags)-           then return Nothing-           else do local_cc <- newTemp (ccType dflags)-                   emitAssign (CmmLocal local_cc) cccsExpr-                   return (Just local_cc)--restoreCurrentCostCentre :: Maybe LocalReg -> FCode ()-restoreCurrentCostCentre Nothing-  = return ()-restoreCurrentCostCentre (Just local_cc)-  = emit (storeCurCCS (CmmReg (CmmLocal local_cc)))------------------------------------------------------------------------------------- Recording allocation in a cost centre------------------------------------------------------------------------------------ | Record the allocation of a closure.  The CmmExpr is the cost--- centre stack to which to attribute the allocation.-profDynAlloc :: SMRep -> CmmExpr -> FCode ()-profDynAlloc rep ccs-  = ifProfiling $-    do dflags <- getDynFlags-       profAlloc (mkIntExpr dflags (heapClosureSizeW dflags rep)) ccs---- | Record the allocation of a closure (size is given by a CmmExpr)--- The size must be in words, because the allocation counter in a CCS counts--- in words.-profAlloc :: CmmExpr -> CmmExpr -> FCode ()-profAlloc words ccs-  = ifProfiling $-        do dflags <- getDynFlags-           let alloc_rep = rEP_CostCentreStack_mem_alloc dflags-           emit (addToMemE alloc_rep-                       (cmmOffsetB dflags ccs (oFFSET_CostCentreStack_mem_alloc dflags))-                       (CmmMachOp (MO_UU_Conv (wordWidth dflags) (typeWidth alloc_rep)) $-                         [CmmMachOp (mo_wordSub dflags) [words,-                                                         mkIntExpr dflags (profHdrSize dflags)]]))-                       -- subtract the "profiling overhead", which is the-                       -- profiling header in a closure.---- -------------------------------------------------------------------------- Setting the current cost centre on entry to a closure--enterCostCentreThunk :: CmmExpr -> FCode ()-enterCostCentreThunk closure =-  ifProfiling $ do-      dflags <- getDynFlags-      emit $ storeCurCCS (costCentreFrom dflags closure)--enterCostCentreFun :: CostCentreStack -> CmmExpr -> FCode ()-enterCostCentreFun ccs closure =-  ifProfiling $ do-    if isCurrentCCS ccs-       then do dflags <- getDynFlags-               emitRtsCall rtsUnitId (fsLit "enterFunCCS")-                   [(baseExpr, AddrHint),-                    (costCentreFrom dflags closure, AddrHint)] False-       else return () -- top-level function, nothing to do--ifProfiling :: FCode () -> FCode ()-ifProfiling code-  = do dflags <- getDynFlags-       if gopt Opt_SccProfilingOn dflags-           then code-           else return ()--ifProfilingL :: DynFlags -> [a] -> [a]-ifProfilingL dflags xs-  | gopt Opt_SccProfilingOn dflags = xs-  | otherwise                      = []---------------------------------------------------------------------        Initialising Cost Centres & CCSs------------------------------------------------------------------initCostCentres :: CollectedCCs -> FCode ()--- Emit the declarations-initCostCentres (local_CCs, singleton_CCSs)-  = do dflags <- getDynFlags-       when (gopt Opt_SccProfilingOn dflags) $-           do mapM_ emitCostCentreDecl local_CCs-              mapM_ emitCostCentreStackDecl singleton_CCSs---emitCostCentreDecl :: CostCentre -> FCode ()-emitCostCentreDecl cc = do-  { dflags <- getDynFlags-  ; let is_caf | isCafCC cc = mkIntCLit dflags (ord 'c') -- 'c' == is a CAF-               | otherwise  = zero dflags-                        -- NB. bytesFS: we want the UTF-8 bytes here (#5559)-  ; label <- newByteStringCLit (bytesFS $ costCentreUserNameFS cc)-  ; modl  <- newByteStringCLit (bytesFS $ Module.moduleNameFS-                                        $ Module.moduleName-                                        $ cc_mod cc)-  ; loc <- newByteStringCLit $ bytesFS $ mkFastString $-                   showPpr dflags (costCentreSrcSpan cc)-           -- XXX going via FastString to get UTF-8 encoding is silly-  ; let-     lits = [ zero dflags,           -- StgInt ccID,-              label,        -- char *label,-              modl,        -- char *module,-              loc,      -- char *srcloc,-              zero64,   -- StgWord64 mem_alloc-              zero dflags,     -- StgWord time_ticks-              is_caf,   -- StgInt is_caf-              zero dflags      -- struct _CostCentre *link-            ]-  ; emitDataLits (mkCCLabel cc) lits-  }--emitCostCentreStackDecl :: CostCentreStack -> FCode ()-emitCostCentreStackDecl ccs-  = case maybeSingletonCCS ccs of-    Just cc ->-        do dflags <- getDynFlags-           let mk_lits cc = zero dflags :-                            mkCCostCentre cc :-                            replicate (sizeof_ccs_words dflags - 2) (zero dflags)-                -- Note: to avoid making any assumptions about how the-                -- C compiler (that compiles the RTS, in particular) does-                -- layouts of structs containing long-longs, simply-                -- pad out the struct with zero words until we hit the-                -- size of the overall struct (which we get via DerivedConstants.h)-           emitDataLits (mkCCSLabel ccs) (mk_lits cc)-    Nothing -> pprPanic "emitCostCentreStackDecl" (ppr ccs)--zero :: DynFlags -> CmmLit-zero dflags = mkIntCLit dflags 0-zero64 :: CmmLit-zero64 = CmmInt 0 W64--sizeof_ccs_words :: DynFlags -> Int-sizeof_ccs_words dflags-    -- round up to the next word.-  | ms == 0   = ws-  | otherwise = ws + 1-  where-   (ws,ms) = sIZEOF_CostCentreStack dflags `divMod` wORD_SIZE dflags---- ------------------------------------------------------------------------------ Set the current cost centre stack--emitSetCCC :: CostCentre -> Bool -> Bool -> FCode ()-emitSetCCC cc tick push- = do dflags <- getDynFlags-      if not (gopt Opt_SccProfilingOn dflags)-          then return ()-          else do tmp <- newTemp (ccsType dflags)-                  pushCostCentre tmp cccsExpr cc-                  when tick $ emit (bumpSccCount dflags (CmmReg (CmmLocal tmp)))-                  when push $ emit (storeCurCCS (CmmReg (CmmLocal tmp)))--pushCostCentre :: LocalReg -> CmmExpr -> CostCentre -> FCode ()-pushCostCentre result ccs cc-  = emitRtsCallWithResult result AddrHint-        rtsUnitId-        (fsLit "pushCostCentre") [(ccs,AddrHint),-                                (CmmLit (mkCCostCentre cc), AddrHint)]-        False--bumpSccCount :: DynFlags -> CmmExpr -> CmmAGraph-bumpSccCount dflags ccs-  = addToMem (rEP_CostCentreStack_scc_count dflags)-         (cmmOffsetB dflags ccs (oFFSET_CostCentreStack_scc_count dflags)) 1-------------------------------------------------------------------------------------                Lag/drag/void stuff---------------------------------------------------------------------------------------- Initial value for the LDV field in a static closure----staticLdvInit :: DynFlags -> CmmLit-staticLdvInit = zeroCLit------- Initial value of the LDV field in a dynamic closure----dynLdvInit :: DynFlags -> CmmExpr-dynLdvInit dflags =     -- (era << LDV_SHIFT) | LDV_STATE_CREATE-  CmmMachOp (mo_wordOr dflags) [-      CmmMachOp (mo_wordShl dflags) [loadEra dflags, mkIntExpr dflags (lDV_SHIFT dflags)],-      CmmLit (mkWordCLit dflags (iLDV_STATE_CREATE dflags))-  ]------- Initialise the LDV word of a new closure----ldvRecordCreate :: CmmExpr -> FCode ()-ldvRecordCreate closure = do-  dflags <- getDynFlags-  emit $ mkStore (ldvWord dflags closure) (dynLdvInit dflags)------- | Called when a closure is entered, marks the closure as having--- been "used".  The closure is not an "inherently used" one.  The--- closure is not @IND@ because that is not considered for LDV profiling.----ldvEnterClosure :: ClosureInfo -> CmmReg -> FCode ()-ldvEnterClosure closure_info node_reg = do-    dflags <- getDynFlags-    let tag = funTag dflags closure_info-    -- don't forget to substract node's tag-    ldvEnter (cmmOffsetB dflags (CmmReg node_reg) (-tag))--ldvEnter :: CmmExpr -> FCode ()--- Argument is a closure pointer-ldvEnter cl_ptr = do-    dflags <- getDynFlags-    let -- don't forget to substract node's tag-        ldv_wd = ldvWord dflags cl_ptr-        new_ldv_wd = cmmOrWord dflags (cmmAndWord dflags (CmmLoad ldv_wd (bWord dflags))-                                                         (CmmLit (mkWordCLit dflags (iLDV_CREATE_MASK dflags))))-                                      (cmmOrWord dflags (loadEra dflags) (CmmLit (mkWordCLit dflags (iLDV_STATE_USE dflags))))-    ifProfiling $-         -- if (era > 0) {-         --    LDVW((c)) = (LDVW((c)) & LDV_CREATE_MASK) |-         --                era | LDV_STATE_USE }-        emit =<< mkCmmIfThenElse (CmmMachOp (mo_wordUGt dflags) [loadEra dflags, CmmLit (zeroCLit dflags)])-                     (mkStore ldv_wd new_ldv_wd)-                     mkNop--loadEra :: DynFlags -> CmmExpr-loadEra dflags = CmmMachOp (MO_UU_Conv (cIntWidth dflags) (wordWidth dflags))-    [CmmLoad (mkLblExpr (mkCmmDataLabel rtsUnitId (fsLit "era")))-             (cInt dflags)]--ldvWord :: DynFlags -> CmmExpr -> CmmExpr--- Takes the address of a closure, and returns--- the address of the LDV word in the closure-ldvWord dflags closure_ptr-    = cmmOffsetB dflags closure_ptr (oFFSET_StgHeader_ldvw dflags)
− codeGen/StgCmmTicky.hs
@@ -1,682 +0,0 @@-{-# LANGUAGE BangPatterns #-}------------------------------------------------------------------------------------- Code generation for ticky-ticky profiling------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------{- OVERVIEW: ticky ticky profiling--Please see-http://ghc.haskell.org/trac/ghc/wiki/Debugging/TickyTicky and also-edit it and the rest of this comment to keep them up-to-date if you-change ticky-ticky. Thanks!-- *** All allocation ticky numbers are in bytes. ***--Some of the relevant source files:--       ***not necessarily an exhaustive list***--  * some codeGen/ modules import this one--  * this module imports cmm/CLabel.hs to manage labels--  * cmm/CmmParse.y expands some macros using generators defined in-    this module--  * includes/stg/Ticky.h declares all of the global counters--  * includes/rts/Ticky.h declares the C data type for an-    STG-declaration's counters--  * some macros defined in includes/Cmm.h (and used within the RTS's-    CMM code) update the global ticky counters--  * at the end of execution rts/Ticky.c generates the final report-    +RTS -r<report-file> -RTS--The rts/Ticky.c function that generates the report includes an-STG-declaration's ticky counters if--  * that declaration was entered, or--  * it was allocated (if -ticky-allocd)--On either of those events, the counter is "registered" by adding it to-a linked list; cf the CMM generated by registerTickyCtr.--Ticky-ticky profiling has evolved over many years. Many of the-counters from its most sophisticated days are no longer-active/accurate. As the RTS has changed, sometimes the ticky code for-relevant counters was not accordingly updated. Unfortunately, neither-were the comments.--As of March 2013, there still exist deprecated code and comments in-the code generator as well as the RTS because:--  * I don't know what is out-of-date versus merely commented out for-    momentary convenience, and--  * someone else might know how to repair it!---}--module StgCmmTicky (-  withNewTickyCounterFun,-  withNewTickyCounterLNE,-  withNewTickyCounterThunk,-  withNewTickyCounterStdThunk,-  withNewTickyCounterCon,--  tickyDynAlloc,-  tickyAllocHeap,--  tickyAllocPrim,-  tickyAllocThunk,-  tickyAllocPAP,-  tickyHeapCheck,-  tickyStackCheck,--  tickyUnknownCall, tickyDirectCall,--  tickyPushUpdateFrame,-  tickyUpdateFrameOmitted,--  tickyEnterDynCon,-  tickyEnterStaticCon,-  tickyEnterViaNode,--  tickyEnterFun,-  tickyEnterThunk, tickyEnterStdThunk,        -- dynamic non-value-                                              -- thunks only-  tickyEnterLNE,--  tickyUpdateBhCaf,-  tickyBlackHole,-  tickyUnboxedTupleReturn,-  tickyReturnOldCon, tickyReturnNewCon,--  tickyKnownCallTooFewArgs, tickyKnownCallExact, tickyKnownCallExtraArgs,-  tickySlowCall, tickySlowCallPat,-  ) where--import GhcPrelude--import StgCmmArgRep    ( slowCallPattern , toArgRep , argRepString )-import StgCmmClosure-import StgCmmUtils-import StgCmmMonad--import StgSyn-import CmmExpr-import MkGraph-import CmmUtils-import CLabel-import SMRep--import Module-import Name-import Id-import BasicTypes-import FastString-import Outputable-import Util--import DynFlags---- Turgid imports for showTypeCategory-import PrelNames-import TcType-import Type-import TyCon--import Data.Maybe-import qualified Data.Char-import Control.Monad ( when )------------------------------------------------------------------------------------- Ticky-ticky profiling-----------------------------------------------------------------------------------data TickyClosureType-    = TickyFun-        Bool -- True <-> single entry-    | TickyCon-    | TickyThunk-        Bool -- True <-> updateable-        Bool -- True <-> standard thunk (AP or selector), has no entry counter-    | TickyLNE--withNewTickyCounterFun :: Bool -> Name  -> [NonVoid Id] -> FCode a -> FCode a-withNewTickyCounterFun single_entry = withNewTickyCounter (TickyFun single_entry)--withNewTickyCounterLNE :: Name  -> [NonVoid Id] -> FCode a -> FCode a-withNewTickyCounterLNE nm args code = do-  b <- tickyLNEIsOn-  if not b then code else withNewTickyCounter TickyLNE nm args code--thunkHasCounter :: Bool -> FCode Bool-thunkHasCounter isStatic = do-  b <- tickyDynThunkIsOn-  pure (not isStatic && b)--withNewTickyCounterThunk-  :: Bool -- ^ static-  -> Bool -- ^ updateable-  -> Name-  -> FCode a-  -> FCode a-withNewTickyCounterThunk isStatic isUpdatable name code = do-    has_ctr <- thunkHasCounter isStatic-    if not has_ctr-      then code-      else withNewTickyCounter (TickyThunk isUpdatable False) name [] code--withNewTickyCounterStdThunk-  :: Bool -- ^ updateable-  -> Name-  -> FCode a-  -> FCode a-withNewTickyCounterStdThunk isUpdatable name code = do-    has_ctr <- thunkHasCounter False-    if not has_ctr-      then code-      else withNewTickyCounter (TickyThunk isUpdatable True) name [] code--withNewTickyCounterCon-  :: Name-  -> FCode a-  -> FCode a-withNewTickyCounterCon name code = do-    has_ctr <- thunkHasCounter False-    if not has_ctr-      then code-      else withNewTickyCounter TickyCon name [] code---- args does not include the void arguments-withNewTickyCounter :: TickyClosureType -> Name -> [NonVoid Id] -> FCode a -> FCode a-withNewTickyCounter cloType name args m = do-  lbl <- emitTickyCounter cloType name args-  setTickyCtrLabel lbl m--emitTickyCounter :: TickyClosureType -> Name -> [NonVoid Id] -> FCode CLabel-emitTickyCounter cloType name args-  = let ctr_lbl = mkRednCountsLabel name in-    (>> return ctr_lbl) $-    ifTicky $ do-        { dflags <- getDynFlags-        ; parent <- getTickyCtrLabel-        ; mod_name <- getModuleName--          -- When printing the name of a thing in a ticky file, we-          -- want to give the module name even for *local* things.  We-          -- print just "x (M)" rather that "M.x" to distinguish them-          -- from the global kind.-        ; let ppr_for_ticky_name :: SDoc-              ppr_for_ticky_name =-                let n = ppr name-                    ext = case cloType of-                              TickyFun single_entry -> parens $ hcat $ punctuate comma $-                                  [text "fun"] ++ [text "se"|single_entry]-                              TickyCon -> parens (text "con")-                              TickyThunk upd std -> parens $ hcat $ punctuate comma $-                                  [text "thk"] ++ [text "se"|not upd] ++ [text "std"|std]-                              TickyLNE | isInternalName name -> parens (text "LNE")-                                       | otherwise -> panic "emitTickyCounter: how is this an external LNE?"-                    p = case hasHaskellName parent of-                            -- NB the default "top" ticky ctr does not-                            -- have a Haskell name-                          Just pname -> text "in" <+> ppr (nameUnique pname)-                          _ -> empty-                in if isInternalName name-                   then n <+> parens (ppr mod_name) <+> ext <+> p-                   else n <+> ext <+> p--        ; fun_descr_lit <- newStringCLit $ showSDocDebug dflags ppr_for_ticky_name-        ; arg_descr_lit <- newStringCLit $ map (showTypeCategory . idType . fromNonVoid) args-        ; emitDataLits ctr_lbl-        -- Must match layout of includes/rts/Ticky.h's StgEntCounter-        ---        -- krc: note that all the fields are I32 now; some were I16-        -- before, but the code generator wasn't handling that-        -- properly and it led to chaos, panic and disorder.-            [ mkIntCLit dflags 0,               -- registered?-              mkIntCLit dflags (length args),   -- Arity-              mkIntCLit dflags 0,               -- Heap allocated for this thing-              fun_descr_lit,-              arg_descr_lit,-              zeroCLit dflags,          -- Entries into this thing-              zeroCLit dflags,          -- Heap allocated by this thing-              zeroCLit dflags                   -- Link to next StgEntCounter-            ]-        }---- -------------------------------------------------------------------------------- Ticky stack frames--tickyPushUpdateFrame, tickyUpdateFrameOmitted :: FCode ()-tickyPushUpdateFrame    = ifTicky $ bumpTickyCounter (fsLit "UPDF_PUSHED_ctr")-tickyUpdateFrameOmitted = ifTicky $ bumpTickyCounter (fsLit "UPDF_OMITTED_ctr")---- -------------------------------------------------------------------------------- Ticky entries---- NB the name-specific entries are only available for names that have--- dedicated Cmm code. As far as I know, this just rules out--- constructor thunks. For them, there is no CMM code block to put the--- bump of name-specific ticky counter into. On the other hand, we can--- still track allocation their allocation.--tickyEnterDynCon, tickyEnterStaticCon, tickyEnterViaNode :: FCode ()-tickyEnterDynCon      = ifTicky $ bumpTickyCounter (fsLit "ENT_DYN_CON_ctr")-tickyEnterStaticCon   = ifTicky $ bumpTickyCounter (fsLit "ENT_STATIC_CON_ctr")-tickyEnterViaNode     = ifTicky $ bumpTickyCounter (fsLit "ENT_VIA_NODE_ctr")--tickyEnterThunk :: ClosureInfo -> FCode ()-tickyEnterThunk cl_info-  = ifTicky $ do-    { bumpTickyCounter ctr-    ; has_ctr <- thunkHasCounter static-    ; when has_ctr $ do-      ticky_ctr_lbl <- getTickyCtrLabel-      registerTickyCtrAtEntryDyn ticky_ctr_lbl-      bumpTickyEntryCount ticky_ctr_lbl }-  where-    updatable = closureSingleEntry cl_info-    static    = isStaticClosure cl_info--    ctr | static    = if updatable then fsLit "ENT_STATIC_THK_SINGLE_ctr"-                                   else fsLit "ENT_STATIC_THK_MANY_ctr"-        | otherwise = if updatable then fsLit "ENT_DYN_THK_SINGLE_ctr"-                                   else fsLit "ENT_DYN_THK_MANY_ctr"--tickyEnterStdThunk :: ClosureInfo -> FCode ()-tickyEnterStdThunk = tickyEnterThunk--tickyBlackHole :: Bool{-updatable-} -> FCode ()-tickyBlackHole updatable-  = ifTicky (bumpTickyCounter ctr)-  where-    ctr | updatable = (fsLit "UPD_BH_SINGLE_ENTRY_ctr")-        | otherwise = (fsLit "UPD_BH_UPDATABLE_ctr")--tickyUpdateBhCaf :: ClosureInfo -> FCode ()-tickyUpdateBhCaf cl_info-  = ifTicky (bumpTickyCounter ctr)-  where-    ctr | closureUpdReqd cl_info = (fsLit "UPD_CAF_BH_SINGLE_ENTRY_ctr")-        | otherwise              = (fsLit "UPD_CAF_BH_UPDATABLE_ctr")--tickyEnterFun :: ClosureInfo -> FCode ()-tickyEnterFun cl_info = ifTicky $ do-  ctr_lbl <- getTickyCtrLabel--  if isStaticClosure cl_info-    then do bumpTickyCounter (fsLit "ENT_STATIC_FUN_DIRECT_ctr")-            registerTickyCtr ctr_lbl-    else do bumpTickyCounter (fsLit "ENT_DYN_FUN_DIRECT_ctr")-            registerTickyCtrAtEntryDyn ctr_lbl--  bumpTickyEntryCount ctr_lbl--tickyEnterLNE :: FCode ()-tickyEnterLNE = ifTicky $ do-  bumpTickyCounter (fsLit "ENT_LNE_ctr")-  ifTickyLNE $ do-    ctr_lbl <- getTickyCtrLabel-    registerTickyCtr ctr_lbl-    bumpTickyEntryCount ctr_lbl---- needn't register a counter upon entry if------ 1) it's for a dynamic closure, and------ 2) -ticky-allocd is on------ since the counter was registered already upon being alloc'd-registerTickyCtrAtEntryDyn :: CLabel -> FCode ()-registerTickyCtrAtEntryDyn ctr_lbl = do-  already_registered <- tickyAllocdIsOn-  when (not already_registered) $ registerTickyCtr ctr_lbl--registerTickyCtr :: CLabel -> FCode ()--- Register a ticky counter---   if ( ! f_ct.registeredp ) {---          f_ct.link = ticky_entry_ctrs;       /* hook this one onto the front of the list */---          ticky_entry_ctrs = & (f_ct);        /* mark it as "registered" */---          f_ct.registeredp = 1 }-registerTickyCtr ctr_lbl = do-  dflags <- getDynFlags-  let-    -- krc: code generator doesn't handle Not, so we test for Eq 0 instead-    test = CmmMachOp (MO_Eq (wordWidth dflags))-              [CmmLoad (CmmLit (cmmLabelOffB ctr_lbl-                                (oFFSET_StgEntCounter_registeredp dflags))) (bWord dflags),-               zeroExpr dflags]-    register_stmts-      = [ mkStore (CmmLit (cmmLabelOffB ctr_lbl (oFFSET_StgEntCounter_link dflags)))-                   (CmmLoad ticky_entry_ctrs (bWord dflags))-        , mkStore ticky_entry_ctrs (mkLblExpr ctr_lbl)-        , mkStore (CmmLit (cmmLabelOffB ctr_lbl-                                (oFFSET_StgEntCounter_registeredp dflags)))-                   (mkIntExpr dflags 1) ]-    ticky_entry_ctrs = mkLblExpr (mkCmmDataLabel rtsUnitId (fsLit "ticky_entry_ctrs"))-  emit =<< mkCmmIfThen test (catAGraphs register_stmts)--tickyReturnOldCon, tickyReturnNewCon :: RepArity -> FCode ()-tickyReturnOldCon arity-  = ifTicky $ do { bumpTickyCounter (fsLit "RET_OLD_ctr")-                 ; bumpHistogram    (fsLit "RET_OLD_hst") arity }-tickyReturnNewCon arity-  = ifTicky $ do { bumpTickyCounter (fsLit "RET_NEW_ctr")-                 ; bumpHistogram    (fsLit "RET_NEW_hst") arity }--tickyUnboxedTupleReturn :: RepArity -> FCode ()-tickyUnboxedTupleReturn arity-  = ifTicky $ do { bumpTickyCounter (fsLit "RET_UNBOXED_TUP_ctr")-                 ; bumpHistogram    (fsLit "RET_UNBOXED_TUP_hst") arity }---- -------------------------------------------------------------------------------- Ticky calls---- Ticks at a *call site*:-tickyDirectCall :: RepArity -> [StgArg] -> FCode ()-tickyDirectCall arity args-  | args `lengthIs` arity = tickyKnownCallExact-  | otherwise = do tickyKnownCallExtraArgs-                   tickySlowCallPat (map argPrimRep (drop arity args))--tickyKnownCallTooFewArgs :: FCode ()-tickyKnownCallTooFewArgs = ifTicky $ bumpTickyCounter (fsLit "KNOWN_CALL_TOO_FEW_ARGS_ctr")--tickyKnownCallExact :: FCode ()-tickyKnownCallExact      = ifTicky $ bumpTickyCounter (fsLit "KNOWN_CALL_ctr")--tickyKnownCallExtraArgs :: FCode ()-tickyKnownCallExtraArgs  = ifTicky $ bumpTickyCounter (fsLit "KNOWN_CALL_EXTRA_ARGS_ctr")--tickyUnknownCall :: FCode ()-tickyUnknownCall         = ifTicky $ bumpTickyCounter (fsLit "UNKNOWN_CALL_ctr")---- Tick for the call pattern at slow call site (i.e. in addition to--- tickyUnknownCall, tickyKnownCallExtraArgs, etc.)-tickySlowCall :: LambdaFormInfo -> [StgArg] -> FCode ()-tickySlowCall _ [] = return ()-tickySlowCall lf_info args = do- -- see Note [Ticky for slow calls]- if isKnownFun lf_info-   then tickyKnownCallTooFewArgs-   else tickyUnknownCall- tickySlowCallPat (map argPrimRep args)--tickySlowCallPat :: [PrimRep] -> FCode ()-tickySlowCallPat args = ifTicky $-  let argReps = map toArgRep args-      (_, n_matched) = slowCallPattern argReps-  in if n_matched > 0 && args `lengthIs` n_matched-     then bumpTickyLbl $ mkRtsSlowFastTickyCtrLabel $ concatMap (map Data.Char.toLower . argRepString) argReps-     else bumpTickyCounter $ fsLit "VERY_SLOW_CALL_ctr"--{---Note [Ticky for slow calls]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Terminology is unfortunately a bit mixed up for these calls. codeGen-uses "slow call" to refer to unknown calls and under-saturated known-calls.--Nowadays, though (ie as of the eval/apply paper), the significantly-slower calls are actually just a subset of these: the ones with no-built-in argument pattern (cf StgCmmArgRep.slowCallPattern)--So for ticky profiling, we split slow calls into-"SLOW_CALL_fast_<pattern>_ctr" (those matching a built-in pattern) and-VERY_SLOW_CALL_ctr (those without a built-in pattern; these are very-bad for both space and time).---}---- -------------------------------------------------------------------------------- Ticky allocation--tickyDynAlloc :: Maybe Id -> SMRep -> LambdaFormInfo -> FCode ()--- Called when doing a dynamic heap allocation; the LambdaFormInfo--- used to distinguish between closure types------ TODO what else to count while we're here?-tickyDynAlloc mb_id rep lf = ifTicky $ getDynFlags >>= \dflags ->-  let bytes = wORD_SIZE dflags * heapClosureSizeW dflags rep--      countGlobal tot ctr = do-        bumpTickyCounterBy tot bytes-        bumpTickyCounter   ctr-      countSpecific = ifTickyAllocd $ case mb_id of-        Nothing -> return ()-        Just id -> do-          let ctr_lbl = mkRednCountsLabel (idName id)-          registerTickyCtr ctr_lbl-          bumpTickyAllocd ctr_lbl bytes--  -- TODO are we still tracking "good stuff" (_gds) versus-  -- administrative (_adm) versus slop (_slp)? I'm going with all _gds-  -- for now, since I don't currently know neither if we do nor how to-  -- distinguish. NSF Mar 2013--  in case () of-    _ | isConRep rep   ->-          ifTickyDynThunk countSpecific >>-          countGlobal (fsLit "ALLOC_CON_gds") (fsLit "ALLOC_CON_ctr")-      | isThunkRep rep ->-          ifTickyDynThunk countSpecific >>-          if lfUpdatable lf-          then countGlobal (fsLit "ALLOC_THK_gds") (fsLit "ALLOC_UP_THK_ctr")-          else countGlobal (fsLit "ALLOC_THK_gds") (fsLit "ALLOC_SE_THK_ctr")-      | isFunRep   rep ->-          countSpecific >>-          countGlobal (fsLit "ALLOC_FUN_gds") (fsLit "ALLOC_FUN_ctr")-      | otherwise      -> panic "How is this heap object not a con, thunk, or fun?"----tickyAllocHeap ::-  Bool -> -- is this a genuine allocation? As opposed to-          -- StgCmmLayout.adjustHpBackwards-  VirtualHpOffset -> FCode ()--- Called when doing a heap check [TICK_ALLOC_HEAP]--- Must be lazy in the amount of allocation!-tickyAllocHeap genuine hp-  = ifTicky $-    do  { dflags <- getDynFlags-        ; ticky_ctr <- getTickyCtrLabel-        ; emit $ catAGraphs $-            -- only test hp from within the emit so that the monadic-            -- computation itself is not strict in hp (cf knot in-            -- StgCmmMonad.getHeapUsage)-          if hp == 0 then []-          else let !bytes = wORD_SIZE dflags * hp in [-            -- Bump the allocation total in the closure's StgEntCounter-            addToMem (rEP_StgEntCounter_allocs dflags)-                     (CmmLit (cmmLabelOffB ticky_ctr (oFFSET_StgEntCounter_allocs dflags)))-                     bytes,-            -- Bump the global allocation total ALLOC_HEAP_tot-            addToMemLbl (bWord dflags)-                        (mkCmmDataLabel rtsUnitId (fsLit "ALLOC_HEAP_tot"))-                        bytes,-            -- Bump the global allocation counter ALLOC_HEAP_ctr-            if not genuine then mkNop-            else addToMemLbl (bWord dflags)-                             (mkCmmDataLabel rtsUnitId (fsLit "ALLOC_HEAP_ctr"))-                             1-            ]}-------------------------------------------------------------------------------------- these three are only called from CmmParse.y (ie ultimately from the RTS)---- the units are bytes--tickyAllocPrim :: CmmExpr  -- ^ size of the full header, in bytes-               -> CmmExpr  -- ^ size of the payload, in bytes-               -> CmmExpr -> FCode ()-tickyAllocPrim _hdr _goods _slop = ifTicky $ do-  bumpTickyCounter    (fsLit "ALLOC_PRIM_ctr")-  bumpTickyCounterByE (fsLit "ALLOC_PRIM_adm") _hdr-  bumpTickyCounterByE (fsLit "ALLOC_PRIM_gds") _goods-  bumpTickyCounterByE (fsLit "ALLOC_PRIM_slp") _slop--tickyAllocThunk :: CmmExpr -> CmmExpr -> FCode ()-tickyAllocThunk _goods _slop = ifTicky $ do-    -- TODO is it ever called with a Single-Entry thunk?-  bumpTickyCounter    (fsLit "ALLOC_UP_THK_ctr")-  bumpTickyCounterByE (fsLit "ALLOC_THK_gds") _goods-  bumpTickyCounterByE (fsLit "ALLOC_THK_slp") _slop--tickyAllocPAP :: CmmExpr -> CmmExpr -> FCode ()-tickyAllocPAP _goods _slop = ifTicky $ do-  bumpTickyCounter    (fsLit "ALLOC_PAP_ctr")-  bumpTickyCounterByE (fsLit "ALLOC_PAP_gds") _goods-  bumpTickyCounterByE (fsLit "ALLOC_PAP_slp") _slop--tickyHeapCheck :: FCode ()-tickyHeapCheck = ifTicky $ bumpTickyCounter (fsLit "HEAP_CHK_ctr")--tickyStackCheck :: FCode ()-tickyStackCheck = ifTicky $ bumpTickyCounter (fsLit "STK_CHK_ctr")---- -------------------------------------------------------------------------------- Ticky utils--ifTicky :: FCode () -> FCode ()-ifTicky code =-  getDynFlags >>= \dflags -> when (gopt Opt_Ticky dflags) code--tickyAllocdIsOn :: FCode Bool-tickyAllocdIsOn = gopt Opt_Ticky_Allocd `fmap` getDynFlags--tickyLNEIsOn :: FCode Bool-tickyLNEIsOn = gopt Opt_Ticky_LNE `fmap` getDynFlags--tickyDynThunkIsOn :: FCode Bool-tickyDynThunkIsOn = gopt Opt_Ticky_Dyn_Thunk `fmap` getDynFlags--ifTickyAllocd :: FCode () -> FCode ()-ifTickyAllocd code = tickyAllocdIsOn >>= \b -> when b code--ifTickyLNE :: FCode () -> FCode ()-ifTickyLNE code = tickyLNEIsOn >>= \b -> when b code--ifTickyDynThunk :: FCode () -> FCode ()-ifTickyDynThunk code = tickyDynThunkIsOn >>= \b -> when b code--bumpTickyCounter :: FastString -> FCode ()-bumpTickyCounter lbl = bumpTickyLbl (mkCmmDataLabel rtsUnitId lbl)--bumpTickyCounterBy :: FastString -> Int -> FCode ()-bumpTickyCounterBy lbl = bumpTickyLblBy (mkCmmDataLabel rtsUnitId lbl)--bumpTickyCounterByE :: FastString -> CmmExpr -> FCode ()-bumpTickyCounterByE lbl = bumpTickyLblByE (mkCmmDataLabel rtsUnitId lbl)--bumpTickyEntryCount :: CLabel -> FCode ()-bumpTickyEntryCount lbl = do-  dflags <- getDynFlags-  bumpTickyLit (cmmLabelOffB lbl (oFFSET_StgEntCounter_entry_count dflags))--bumpTickyAllocd :: CLabel -> Int -> FCode ()-bumpTickyAllocd lbl bytes = do-  dflags <- getDynFlags-  bumpTickyLitBy (cmmLabelOffB lbl (oFFSET_StgEntCounter_allocd dflags)) bytes--bumpTickyLbl :: CLabel -> FCode ()-bumpTickyLbl lhs = bumpTickyLitBy (cmmLabelOffB lhs 0) 1--bumpTickyLblBy :: CLabel -> Int -> FCode ()-bumpTickyLblBy lhs = bumpTickyLitBy (cmmLabelOffB lhs 0)--bumpTickyLblByE :: CLabel -> CmmExpr -> FCode ()-bumpTickyLblByE lhs = bumpTickyLitByE (cmmLabelOffB lhs 0)--bumpTickyLit :: CmmLit -> FCode ()-bumpTickyLit lhs = bumpTickyLitBy lhs 1--bumpTickyLitBy :: CmmLit -> Int -> FCode ()-bumpTickyLitBy lhs n = do-  dflags <- getDynFlags-  emit (addToMem (bWord dflags) (CmmLit lhs) n)--bumpTickyLitByE :: CmmLit -> CmmExpr -> FCode ()-bumpTickyLitByE lhs e = do-  dflags <- getDynFlags-  emit (addToMemE (bWord dflags) (CmmLit lhs) e)--bumpHistogram :: FastString -> Int -> FCode ()-bumpHistogram lbl n = do-    dflags <- getDynFlags-    let offset = n `min` (tICKY_BIN_COUNT dflags - 1)-    emit (addToMem (bWord dflags)-           (cmmIndexExpr dflags-                (wordWidth dflags)-                (CmmLit (CmmLabel (mkCmmDataLabel rtsUnitId lbl)))-                (CmmLit (CmmInt (fromIntegral offset) (wordWidth dflags))))-           1)----------------------------------------------------------------------- Showing the "type category" for ticky-ticky profiling--showTypeCategory :: Type -> Char-  {--        +           dictionary--        >           function--        {C,I,F,D,W} char, int, float, double, word-        {c,i,f,d,w} unboxed ditto--        T           tuple--        P           other primitive type-        p           unboxed ditto--        L           list-        E           enumeration type-        S           other single-constructor type-        M           other multi-constructor data-con type--        .           other type--        -           reserved for others to mark as "uninteresting"--  Accurate as of Mar 2013, but I eliminated the Array category instead-  of updating it, for simplicity. It's in P/p, I think --NSF--    -}-showTypeCategory ty-  | isDictTy ty = '+'-  | otherwise = case tcSplitTyConApp_maybe ty of-  Nothing -> '.'-  Just (tycon, _) ->-    (if isUnliftedTyCon tycon then Data.Char.toLower else id) $-    let anyOf us = getUnique tycon `elem` us in-    case () of-      _ | anyOf [funTyConKey] -> '>'-        | anyOf [charPrimTyConKey, charTyConKey] -> 'C'-        | anyOf [doublePrimTyConKey, doubleTyConKey] -> 'D'-        | anyOf [floatPrimTyConKey, floatTyConKey] -> 'F'-        | anyOf [intPrimTyConKey, int32PrimTyConKey, int64PrimTyConKey,-                 intTyConKey, int8TyConKey, int16TyConKey, int32TyConKey, int64TyConKey-                ] -> 'I'-        | anyOf [wordPrimTyConKey, word32PrimTyConKey, word64PrimTyConKey, wordTyConKey,-                 word8TyConKey, word16TyConKey, word32TyConKey, word64TyConKey-                ] -> 'W'-        | anyOf [listTyConKey] -> 'L'-        | isTupleTyCon tycon       -> 'T'-        | isPrimTyCon tycon        -> 'P'-        | isEnumerationTyCon tycon -> 'E'-        | isJust (tyConSingleDataCon_maybe tycon) -> 'S'-        | otherwise -> 'M' -- oh, well...
− codeGen/StgCmmUtils.hs
@@ -1,622 +0,0 @@-{-# LANGUAGE CPP #-}------------------------------------------------------------------------------------- Code generator utilities; mostly monadic------ (c) The University of Glasgow 2004-2006-----------------------------------------------------------------------------------module StgCmmUtils (-        cgLit, mkSimpleLit,-        emitDataLits, mkDataLits,-        emitRODataLits, mkRODataLits,-        emitRtsCall, emitRtsCallWithResult, emitRtsCallGen,-        assignTemp, newTemp,--        newUnboxedTupleRegs,--        emitMultiAssign, emitCmmLitSwitch, emitSwitch,--        tagToClosure, mkTaggedObjectLoad,--        callerSaves, callerSaveVolatileRegs, get_GlobalReg_addr,--        cmmAndWord, cmmOrWord, cmmNegate, cmmEqWord, cmmNeWord,-        cmmUGtWord, cmmSubWord, cmmMulWord, cmmAddWord, cmmUShrWord,-        cmmOffsetExprW, cmmOffsetExprB,-        cmmRegOffW, cmmRegOffB,-        cmmLabelOffW, cmmLabelOffB,-        cmmOffsetW, cmmOffsetB,-        cmmOffsetLitW, cmmOffsetLitB,-        cmmLoadIndexW,-        cmmConstrTag1,--        cmmUntag, cmmIsTagged,--        addToMem, addToMemE, addToMemLblE, addToMemLbl,-        mkWordCLit,-        newStringCLit, newByteStringCLit,-        blankWord,-  ) where--#include "HsVersions.h"--import GhcPrelude--import StgCmmMonad-import StgCmmClosure-import Cmm-import BlockId-import MkGraph-import CodeGen.Platform-import CLabel-import CmmUtils-import CmmSwitch--import ForeignCall-import IdInfo-import Type-import TyCon-import SMRep-import Module-import Literal-import Digraph-import Util-import Unique-import UniqSupply (MonadUnique(..))-import DynFlags-import FastString-import Outputable-import RepType--import qualified Data.ByteString as BS-import qualified Data.Map as M-import Data.Char-import Data.List-import Data.Ord-import Data.Word----------------------------------------------------------------------------------      Literals-------------------------------------------------------------------------------cgLit :: Literal -> FCode CmmLit-cgLit (LitString s) = newByteStringCLit (BS.unpack s)- -- not unpackFS; we want the UTF-8 byte stream.-cgLit other_lit     = do dflags <- getDynFlags-                         return (mkSimpleLit dflags other_lit)--mkSimpleLit :: DynFlags -> Literal -> CmmLit-mkSimpleLit dflags (LitChar   c)                = CmmInt (fromIntegral (ord c))-                                                         (wordWidth dflags)-mkSimpleLit dflags LitNullAddr                  = zeroCLit dflags-mkSimpleLit dflags (LitNumber LitNumInt i _)    = CmmInt i (wordWidth dflags)-mkSimpleLit _      (LitNumber LitNumInt64 i _)  = CmmInt i W64-mkSimpleLit dflags (LitNumber LitNumWord i _)   = CmmInt i (wordWidth dflags)-mkSimpleLit _      (LitNumber LitNumWord64 i _) = CmmInt i W64-mkSimpleLit _      (LitFloat r)                 = CmmFloat r W32-mkSimpleLit _      (LitDouble r)                = CmmFloat r W64-mkSimpleLit _      (LitLabel fs ms fod)-  = let -- TODO: Literal labels might not actually be in the current package...-        labelSrc = ForeignLabelInThisPackage-    in CmmLabel (mkForeignLabel fs ms labelSrc fod)--- NB: LitRubbish should have been lowered in "CoreToStg"-mkSimpleLit _      other = pprPanic "mkSimpleLit" (ppr other)---------------------------------------------------------------------------------- Incrementing a memory location--------------------------------------------------------------------------------addToMemLbl :: CmmType -> CLabel -> Int -> CmmAGraph-addToMemLbl rep lbl n = addToMem rep (CmmLit (CmmLabel lbl)) n--addToMemLblE :: CmmType -> CLabel -> CmmExpr -> CmmAGraph-addToMemLblE rep lbl = addToMemE rep (CmmLit (CmmLabel lbl))--addToMem :: CmmType     -- rep of the counter-         -> CmmExpr     -- Address-         -> Int         -- What to add (a word)-         -> CmmAGraph-addToMem rep ptr n = addToMemE rep ptr (CmmLit (CmmInt (toInteger n) (typeWidth rep)))--addToMemE :: CmmType    -- rep of the counter-          -> CmmExpr    -- Address-          -> CmmExpr    -- What to add (a word-typed expression)-          -> CmmAGraph-addToMemE rep ptr n-  = mkStore ptr (CmmMachOp (MO_Add (typeWidth rep)) [CmmLoad ptr rep, n])----------------------------------------------------------------------------------      Loading a field from an object,---      where the object pointer is itself tagged-------------------------------------------------------------------------------mkTaggedObjectLoad-  :: DynFlags -> LocalReg -> LocalReg -> ByteOff -> DynTag -> CmmAGraph--- (loadTaggedObjectField reg base off tag) generates assignment---      reg = bitsK[ base + off - tag ]--- where K is fixed by 'reg'-mkTaggedObjectLoad dflags reg base offset tag-  = mkAssign (CmmLocal reg)-             (CmmLoad (cmmOffsetB dflags-                                  (CmmReg (CmmLocal base))-                                  (offset - tag))-                      (localRegType reg))---------------------------------------------------------------------------------      Converting a closure tag to a closure for enumeration types---      (this is the implementation of tagToEnum#).-------------------------------------------------------------------------------tagToClosure :: DynFlags -> TyCon -> CmmExpr -> CmmExpr-tagToClosure dflags tycon tag-  = CmmLoad (cmmOffsetExprW dflags closure_tbl tag) (bWord dflags)-  where closure_tbl = CmmLit (CmmLabel lbl)-        lbl = mkClosureTableLabel (tyConName tycon) NoCafRefs---------------------------------------------------------------------------------      Conditionals and rts calls-------------------------------------------------------------------------------emitRtsCall :: UnitId -> FastString -> [(CmmExpr,ForeignHint)] -> Bool -> FCode ()-emitRtsCall pkg fun args safe = emitRtsCallGen [] (mkCmmCodeLabel pkg fun) args safe--emitRtsCallWithResult :: LocalReg -> ForeignHint -> UnitId -> FastString-        -> [(CmmExpr,ForeignHint)] -> Bool -> FCode ()-emitRtsCallWithResult res hint pkg fun args safe-   = emitRtsCallGen [(res,hint)] (mkCmmCodeLabel pkg fun) args safe---- Make a call to an RTS C procedure-emitRtsCallGen-   :: [(LocalReg,ForeignHint)]-   -> CLabel-   -> [(CmmExpr,ForeignHint)]-   -> Bool -- True <=> CmmSafe call-   -> FCode ()-emitRtsCallGen res lbl args safe-  = do { dflags <- getDynFlags-       ; updfr_off <- getUpdFrameOff-       ; let (caller_save, caller_load) = callerSaveVolatileRegs dflags-       ; emit caller_save-       ; call updfr_off-       ; emit caller_load }-  where-    call updfr_off =-      if safe then-        emit =<< mkCmmCall fun_expr res' args' updfr_off-      else do-        let conv = ForeignConvention CCallConv arg_hints res_hints CmmMayReturn-        emit $ mkUnsafeCall (ForeignTarget fun_expr conv) res' args'-    (args', arg_hints) = unzip args-    (res',  res_hints) = unzip res-    fun_expr = mkLblExpr lbl--------------------------------------------------------------------------------------      Caller-Save Registers------------------------------------------------------------------------------------- Here we generate the sequence of saves/restores required around a--- foreign call instruction.---- TODO: reconcile with includes/Regs.h---  * Regs.h claims that BaseReg should be saved last and loaded first---    * This might not have been tickled before since BaseReg is callee save---  * Regs.h saves SparkHd, ParkT1, SparkBase and SparkLim------ This code isn't actually used right now, because callerSaves--- only ever returns true in the current universe for registers NOT in--- system_regs (just do a grep for CALLER_SAVES in--- includes/stg/MachRegs.h).  It's all one giant no-op, and for--- good reason: having to save system registers on every foreign call--- would be very expensive, so we avoid assigning them to those--- registers when we add support for an architecture.------ Note that the old code generator actually does more work here: it--- also saves other global registers.  We can't (nor want) to do that--- here, as we don't have liveness information.  And really, we--- shouldn't be doing the workaround at this point in the pipeline, see--- Note [Register parameter passing] and the ToDo on CmmCall in--- cmm/CmmNode.hs.  Right now the workaround is to avoid inlining across--- unsafe foreign calls in rewriteAssignments, but this is strictly--- temporary.-callerSaveVolatileRegs :: DynFlags -> (CmmAGraph, CmmAGraph)-callerSaveVolatileRegs dflags = (caller_save, caller_load)-  where-    platform = targetPlatform dflags--    caller_save = catAGraphs (map callerSaveGlobalReg    regs_to_save)-    caller_load = catAGraphs (map callerRestoreGlobalReg regs_to_save)--    system_regs = [ Sp,SpLim,Hp,HpLim,CCCS,CurrentTSO,CurrentNursery-                    {- ,SparkHd,SparkTl,SparkBase,SparkLim -}-                  , BaseReg ]--    regs_to_save = filter (callerSaves platform) system_regs--    callerSaveGlobalReg reg-        = mkStore (get_GlobalReg_addr dflags reg) (CmmReg (CmmGlobal reg))--    callerRestoreGlobalReg reg-        = mkAssign (CmmGlobal reg)-                   (CmmLoad (get_GlobalReg_addr dflags reg) (globalRegType dflags reg))---- -------------------------------------------------------------------------------- Global registers---- We map STG registers onto appropriate CmmExprs.  Either they map--- to real machine registers or stored as offsets from BaseReg.  Given--- a GlobalReg, get_GlobalReg_addr always produces the--- register table address for it.--- (See also get_GlobalReg_reg_or_addr in MachRegs)--get_GlobalReg_addr :: DynFlags -> GlobalReg -> CmmExpr-get_GlobalReg_addr dflags BaseReg = regTableOffset dflags 0-get_GlobalReg_addr dflags mid-    = get_Regtable_addr_from_offset dflags-                                    (globalRegType dflags mid) (baseRegOffset dflags mid)---- Calculate a literal representing an offset into the register table.--- Used when we don't have an actual BaseReg to offset from.-regTableOffset :: DynFlags -> Int -> CmmExpr-regTableOffset dflags n =-  CmmLit (CmmLabelOff mkMainCapabilityLabel (oFFSET_Capability_r dflags + n))--get_Regtable_addr_from_offset :: DynFlags -> CmmType -> Int -> CmmExpr-get_Regtable_addr_from_offset dflags _rep offset =-    if haveRegBase (targetPlatform dflags)-    then CmmRegOff baseReg offset-    else regTableOffset dflags offset----- -------------------------------------------------------------------------------- Information about global registers--baseRegOffset :: DynFlags -> GlobalReg -> Int--baseRegOffset dflags Sp             = oFFSET_StgRegTable_rSp dflags-baseRegOffset dflags SpLim          = oFFSET_StgRegTable_rSpLim dflags-baseRegOffset dflags (LongReg 1)    = oFFSET_StgRegTable_rL1 dflags-baseRegOffset dflags Hp             = oFFSET_StgRegTable_rHp dflags-baseRegOffset dflags HpLim          = oFFSET_StgRegTable_rHpLim dflags-baseRegOffset dflags CCCS           = oFFSET_StgRegTable_rCCCS dflags-baseRegOffset dflags CurrentTSO     = oFFSET_StgRegTable_rCurrentTSO dflags-baseRegOffset dflags CurrentNursery = oFFSET_StgRegTable_rCurrentNursery dflags-baseRegOffset dflags HpAlloc        = oFFSET_StgRegTable_rHpAlloc dflags-baseRegOffset dflags GCEnter1       = oFFSET_stgGCEnter1 dflags-baseRegOffset dflags GCFun          = oFFSET_stgGCFun dflags-baseRegOffset _      reg            = pprPanic "StgCmmUtils.baseRegOffset:" (ppr reg)---------------------------------------------------------------------------------      Strings generate a top-level data block-------------------------------------------------------------------------------emitDataLits :: CLabel -> [CmmLit] -> FCode ()--- Emit a data-segment data block-emitDataLits lbl lits = emitDecl (mkDataLits (Section Data lbl) lbl lits)--emitRODataLits :: CLabel -> [CmmLit] -> FCode ()--- Emit a read-only data block-emitRODataLits lbl lits = emitDecl (mkRODataLits lbl lits)--newStringCLit :: String -> FCode CmmLit--- Make a global definition for the string,--- and return its label-newStringCLit str = newByteStringCLit (map (fromIntegral . ord) str)--newByteStringCLit :: [Word8] -> FCode CmmLit-newByteStringCLit bytes-  = do  { uniq <- newUnique-        ; let (lit, decl) = mkByteStringCLit (mkStringLitLabel uniq) bytes-        ; emitDecl decl-        ; return lit }---------------------------------------------------------------------------------      Assigning expressions to temporaries-------------------------------------------------------------------------------assignTemp :: CmmExpr -> FCode LocalReg--- Make sure the argument is in a local register.--- We don't bother being particularly aggressive with avoiding--- unnecessary local registers, since we can rely on a later--- optimization pass to inline as necessary (and skipping out--- on things like global registers can be a little dangerous--- due to them being trashed on foreign calls--though it means--- the optimization pass doesn't have to do as much work)-assignTemp (CmmReg (CmmLocal reg)) = return reg-assignTemp e = do { dflags <- getDynFlags-                  ; uniq <- newUnique-                  ; let reg = LocalReg uniq (cmmExprType dflags e)-                  ; emitAssign (CmmLocal reg) e-                  ; return reg }--newTemp :: MonadUnique m => CmmType -> m LocalReg-newTemp rep = do { uniq <- getUniqueM-                 ; return (LocalReg uniq rep) }--newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])--- Choose suitable local regs to use for the components--- of an unboxed tuple that we are about to return to--- the Sequel.  If the Sequel is a join point, using the--- regs it wants will save later assignments.-newUnboxedTupleRegs res_ty-  = ASSERT( isUnboxedTupleType res_ty )-    do  { dflags <- getDynFlags-        ; sequel <- getSequel-        ; regs <- choose_regs dflags sequel-        ; ASSERT( regs `equalLength` reps )-          return (regs, map primRepForeignHint reps) }-  where-    reps = typePrimRep res_ty-    choose_regs _ (AssignTo regs _) = return regs-    choose_regs dflags _            = mapM (newTemp . primRepCmmType dflags) reps--------------------------------------------------------------------------------      emitMultiAssign----------------------------------------------------------------------------emitMultiAssign :: [LocalReg] -> [CmmExpr] -> FCode ()--- Emit code to perform the assignments in the--- input simultaneously, using temporary variables when necessary.--type Key  = Int-type Vrtx = (Key, Stmt) -- Give each vertex a unique number,-                        -- for fast comparison-type Stmt = (LocalReg, CmmExpr) -- r := e---- We use the strongly-connected component algorithm, in which---      * the vertices are the statements---      * an edge goes from s1 to s2 iff---              s1 assigns to something s2 uses---        that is, if s1 should *follow* s2 in the final order--emitMultiAssign []    []    = return ()-emitMultiAssign [reg] [rhs] = emitAssign (CmmLocal reg) rhs-emitMultiAssign regs rhss   = do-  dflags <- getDynFlags-  ASSERT2( equalLength regs rhss, ppr regs $$ ppr rhss )-    unscramble dflags ([1..] `zip` (regs `zip` rhss))--unscramble :: DynFlags -> [Vrtx] -> FCode ()-unscramble dflags vertices = mapM_ do_component components-  where-        edges :: [ Node Key Vrtx ]-        edges = [ DigraphNode vertex key1 (edges_from stmt1)-                | vertex@(key1, stmt1) <- vertices ]--        edges_from :: Stmt -> [Key]-        edges_from stmt1 = [ key2 | (key2, stmt2) <- vertices,-                                    stmt1 `mustFollow` stmt2 ]--        components :: [SCC Vrtx]-        components = stronglyConnCompFromEdgedVerticesUniq edges--        -- do_components deal with one strongly-connected component-        -- Not cyclic, or singleton?  Just do it-        do_component :: SCC Vrtx -> FCode ()-        do_component (AcyclicSCC (_,stmt))  = mk_graph stmt-        do_component (CyclicSCC [])         = panic "do_component"-        do_component (CyclicSCC [(_,stmt)]) = mk_graph stmt--                -- Cyclic?  Then go via temporaries.  Pick one to-                -- break the loop and try again with the rest.-        do_component (CyclicSCC ((_,first_stmt) : rest)) = do-            dflags <- getDynFlags-            u <- newUnique-            let (to_tmp, from_tmp) = split dflags u first_stmt-            mk_graph to_tmp-            unscramble dflags rest-            mk_graph from_tmp--        split :: DynFlags -> Unique -> Stmt -> (Stmt, Stmt)-        split dflags uniq (reg, rhs)-          = ((tmp, rhs), (reg, CmmReg (CmmLocal tmp)))-          where-            rep = cmmExprType dflags rhs-            tmp = LocalReg uniq rep--        mk_graph :: Stmt -> FCode ()-        mk_graph (reg, rhs) = emitAssign (CmmLocal reg) rhs--        mustFollow :: Stmt -> Stmt -> Bool-        (reg, _) `mustFollow` (_, rhs) = regUsedIn dflags (CmmLocal reg) rhs------------------------------------------------------------------------------      mkSwitch-----------------------------------------------------------------------------emitSwitch :: CmmExpr                      -- Tag to switch on-           -> [(ConTagZ, CmmAGraphScoped)] -- Tagged branches-           -> Maybe CmmAGraphScoped        -- Default branch (if any)-           -> ConTagZ -> ConTagZ           -- Min and Max possible values;-                                           -- behaviour outside this range is-                                           -- undefined-           -> FCode ()---- First, two rather common cases in which there is no work to do-emitSwitch _ []         (Just code) _ _ = emit (fst code)-emitSwitch _ [(_,code)] Nothing     _ _ = emit (fst code)---- Right, off we go-emitSwitch tag_expr branches mb_deflt lo_tag hi_tag = do-    join_lbl      <- newBlockId-    mb_deflt_lbl  <- label_default join_lbl mb_deflt-    branches_lbls <- label_branches join_lbl branches-    tag_expr'     <- assignTemp' tag_expr--    -- Sort the branches before calling mk_discrete_switch-    let branches_lbls' = [ (fromIntegral i, l) | (i,l) <- sortBy (comparing fst) branches_lbls ]-    let range = (fromIntegral lo_tag, fromIntegral hi_tag)--    emit $ mk_discrete_switch False tag_expr' branches_lbls' mb_deflt_lbl range--    emitLabel join_lbl--mk_discrete_switch :: Bool -- ^ Use signed comparisons-          -> CmmExpr-          -> [(Integer, BlockId)]-          -> Maybe BlockId-          -> (Integer, Integer)-          -> CmmAGraph---- SINGLETON TAG RANGE: no case analysis to do-mk_discrete_switch _ _tag_expr [(tag, lbl)] _ (lo_tag, hi_tag)-  | lo_tag == hi_tag-  = ASSERT( tag == lo_tag )-    mkBranch lbl---- SINGLETON BRANCH, NO DEFAULT: no case analysis to do-mk_discrete_switch _ _tag_expr [(_tag,lbl)] Nothing _-  = mkBranch lbl-        -- The simplifier might have eliminated a case-        --       so we may have e.g. case xs of-        --                               [] -> e-        -- In that situation we can be sure the (:) case-        -- can't happen, so no need to test---- SOMETHING MORE COMPLICATED: defer to CmmImplementSwitchPlans--- See Note [Cmm Switches, the general plan] in CmmSwitch-mk_discrete_switch signed tag_expr branches mb_deflt range-  = mkSwitch tag_expr $ mkSwitchTargets signed range mb_deflt (M.fromList branches)--divideBranches :: Ord a => [(a,b)] -> ([(a,b)], a, [(a,b)])-divideBranches branches = (lo_branches, mid, hi_branches)-  where-    -- 2 branches => n_branches `div` 2 = 1-    --            => branches !! 1 give the *second* tag-    -- There are always at least 2 branches here-    (mid,_) = branches !! (length branches `div` 2)-    (lo_branches, hi_branches) = span is_lo branches-    is_lo (t,_) = t < mid-----------------emitCmmLitSwitch :: CmmExpr                    -- Tag to switch on-               -> [(Literal, CmmAGraphScoped)] -- Tagged branches-               -> CmmAGraphScoped              -- Default branch (always)-               -> FCode ()                     -- Emit the code-emitCmmLitSwitch _scrut []       deflt = emit $ fst deflt-emitCmmLitSwitch scrut  branches deflt = do-    scrut' <- assignTemp' scrut-    join_lbl <- newBlockId-    deflt_lbl <- label_code join_lbl deflt-    branches_lbls <- label_branches join_lbl branches--    dflags <- getDynFlags-    let cmm_ty = cmmExprType dflags scrut-        rep = typeWidth cmm_ty--    -- We find the necessary type information in the literals in the branches-    let signed = case head branches of-                    (LitNumber nt _ _, _) -> litNumIsSigned nt-                    _ -> False--    let range | signed    = (tARGET_MIN_INT dflags, tARGET_MAX_INT dflags)-              | otherwise = (0, tARGET_MAX_WORD dflags)--    if isFloatType cmm_ty-    then emit =<< mk_float_switch rep scrut' deflt_lbl noBound branches_lbls-    else emit $ mk_discrete_switch-        signed-        scrut'-        [(litValue lit,l) | (lit,l) <- branches_lbls]-        (Just deflt_lbl)-        range-    emitLabel join_lbl---- | lower bound (inclusive), upper bound (exclusive)-type LitBound = (Maybe Literal, Maybe Literal)--noBound :: LitBound-noBound = (Nothing, Nothing)--mk_float_switch :: Width -> CmmExpr -> BlockId-              -> LitBound-              -> [(Literal,BlockId)]-              -> FCode CmmAGraph-mk_float_switch rep scrut deflt _bounds [(lit,blk)]-  = do dflags <- getDynFlags-       return $ mkCbranch (cond dflags) deflt blk Nothing-  where-    cond dflags = CmmMachOp ne [scrut, CmmLit cmm_lit]-      where-        cmm_lit = mkSimpleLit dflags lit-        ne      = MO_F_Ne rep--mk_float_switch rep scrut deflt_blk_id (lo_bound, hi_bound) branches-  = do dflags <- getDynFlags-       lo_blk <- mk_float_switch rep scrut deflt_blk_id bounds_lo lo_branches-       hi_blk <- mk_float_switch rep scrut deflt_blk_id bounds_hi hi_branches-       mkCmmIfThenElse (cond dflags) lo_blk hi_blk-  where-    (lo_branches, mid_lit, hi_branches) = divideBranches branches--    bounds_lo = (lo_bound, Just mid_lit)-    bounds_hi = (Just mid_lit, hi_bound)--    cond dflags = CmmMachOp lt [scrut, CmmLit cmm_lit]-      where-        cmm_lit = mkSimpleLit dflags mid_lit-        lt      = MO_F_Lt rep------------------label_default :: BlockId -> Maybe CmmAGraphScoped -> FCode (Maybe BlockId)-label_default _ Nothing-  = return Nothing-label_default join_lbl (Just code)-  = do lbl <- label_code join_lbl code-       return (Just lbl)-----------------label_branches :: BlockId -> [(a,CmmAGraphScoped)] -> FCode [(a,BlockId)]-label_branches _join_lbl []-  = return []-label_branches join_lbl ((tag,code):branches)-  = do lbl <- label_code join_lbl code-       branches' <- label_branches join_lbl branches-       return ((tag,lbl):branches')-----------------label_code :: BlockId -> CmmAGraphScoped -> FCode BlockId---  label_code J code---      generates---  [L: code; goto J]--- and returns L-label_code join_lbl (code,tsc) = do-    lbl <- newBlockId-    emitOutOfLine lbl (code MkGraph.<*> mkBranch join_lbl, tsc)-    return lbl-----------------assignTemp' :: CmmExpr -> FCode CmmExpr-assignTemp' e-  | isTrivialCmmExpr e = return e-  | otherwise = do-       dflags <- getDynFlags-       lreg <- newTemp (cmmExprType dflags e)-       let reg = CmmLocal lreg-       emitAssign reg e-       return (CmmReg reg)
coreSyn/CoreArity.hs view
@@ -30,6 +30,7 @@ import Id import Type import TyCon    ( initRecTc, checkRecTc )+import Predicate ( isDictTy ) import Coercion import BasicTypes import Unique@@ -153,14 +154,12 @@         Just ar -> Just (ar, sig ar)   where     env    = AE { ae_ped_bot = True, ae_cheap_fn = \ _ _ -> False }-    sig ar = mkClosedStrictSig (replicate ar topDmd) exnRes-                  -- For this purpose we can be very simple-                  -- exnRes is a bit less aggressive than botRes+    sig ar = mkClosedStrictSig (replicate ar topDmd) botRes  {- Note [exprArity invariant] ~~~~~~~~~~~~~~~~~~~~~~~~~~-exprArity has the following invariant:+exprArity has the following invariants:    (1) If typeArity (exprType e) = n,       then manifestArity (etaExpand e n) = n@@ -222,7 +221,7 @@ Now we want the built-in op/$dfList rule will fire to give    blah = $copList dCInt -But with eta-expansion 'blah' might (and in Trac #3772, which is+But with eta-expansion 'blah' might (and in #3772, which is slightly more complicated, does) turn into     blah = op (\eta. ($dfList dCInt |> sym co) eta)@@ -304,7 +303,7 @@ This should diverge!  But if we eta-expand, it won't.  We ignore this "problem" (unless -fpedantic-bottoms is on), because being scrupulous would lose an important transformation for many programs. (See-Trac #5587 for an example.)+#5587 for an example.)  Consider also         f = \x -> error "foo"@@ -324,7 +323,7 @@   (1) Do NOT move a lambda outside a known-bottom case expression        case undefined of { (a,b) -> \y -> e }-     This showed up in Trac #5557+     This showed up in #5557   (2) Do NOT move a lambda outside a case if all the branches of      the case are known to return bottom.@@ -336,7 +335,7 @@  (3) Do NOT move a lambda outside a case unless      (a) The scrutinee is ok-for-speculation, or      (b) more liberally: the scrutinee is cheap (e.g. a variable), and-         -fpedantic-bottoms is not enforced (see Trac #2915 for an example)+         -fpedantic-bottoms is not enforced (see #2915 for an example)  Of course both (1) and (2) are readily defeated by disguising the bottoms. @@ -383,7 +382,7 @@ Note [State hack and bottoming functions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a terrible idea to use the state hack on a bottoming function.-Here's what happens (Trac #2861):+Here's what happens (#2861):    f :: String -> IO T   f = \p. error "..."@@ -412,7 +411,7 @@ And now we can repeat the whole loop.  Aargh!  The bug is in applying the state hack to a function which then swallows the argument. -This arose in another guise in Trac #3959.  Here we had+This arose in another guise in #3959.  Here we had       catch# (throw exn >> return ()) @@ -519,7 +518,7 @@   = \e mb_ty -> exprIsCheapX cheap_app e              || case mb_ty of                   Nothing -> False-                  Just ty -> isDictLikeTy ty+                  Just ty -> isDictTy ty   ----------------------@@ -592,7 +591,7 @@  This example happens a lot; it first showed up in Andy Gill's thesis, fifteen years ago!  It also shows up in the code for 'rnf' on lists-in Trac #4138.+in #4138.  The analysis is easy to achieve because exprEtaExpandArity takes an argument@@ -626,9 +625,6 @@ One could go further and make exprIsCheap reply True to any dictionary-typed expression, but that's more work. -See Note [Dictionary-like types] in TcType.hs for why we use-isDictLikeTy here rather than isDictTy- Note [Eta expanding thunks] ~~~~~~~~~~~~~~~~~~~~~~~~~~~ We don't eta-expand@@ -696,7 +692,7 @@                            False -> \s(one-shot). e1            in go2 x We *really* want to eta-expand go and go2.-When combining the barnches of the case we have+When combining the branches of the case we have      ATop [] `andAT` ATop [OneShotLam] and we want to get ATop [OneShotLam].  But if the inner lambda wasn't one-shot we don't want to do this.@@ -752,7 +748,7 @@     -- See Note [exprArity invariant] (2); must be true of     -- arityType too, since that is how we compute the arity     -- of variables, and they in turn affect result of exprArity-    -- Trac #5441 is a nice demo+    -- #5441 is a nice demo     -- However, do make sure that ATop -> ATop and ABot -> ABot!     --   Casts don't affect that part. Getting this wrong provoked #5475 @@ -885,7 +881,7 @@ has an unfolding we have to push it into there too.  AND j might be recursive... -So for now I'm abandonig the no-crap rule in this case. I think+So for now I'm abandoning the no-crap rule in this case. I think that for the use in CorePrep it really doesn't matter; and if it does, then CoreToStg.myCollectArgs will fall over. @@ -1192,7 +1188,7 @@ freshEtaId n subst ty       = (subst', eta_id')       where-        ty'     = Type.substTy subst ty+        ty'     = Type.substTyUnchecked subst ty         eta_id' = uniqAway (getTCvInScope subst) $                   mkSysLocalOrCoVar (fsLit "eta") (mkBuiltinUnique n) ty'         subst'  = extendTCvInScope subst eta_id'
coreSyn/CoreFVs.hs view
@@ -72,6 +72,7 @@ import Var import Type import TyCoRep+import TyCoFVs import TyCon import CoAxiom import FamInstEnv@@ -346,14 +347,14 @@  orphNamesOfType :: Type -> NameSet orphNamesOfType ty | Just ty' <- coreView ty = orphNamesOfType ty'-                -- Look through type synonyms (Trac #4912)+                -- Look through type synonyms (#4912) orphNamesOfType (TyVarTy _)          = emptyNameSet orphNamesOfType (LitTy {})           = emptyNameSet orphNamesOfType (TyConApp tycon tys) = orphNamesOfTyCon tycon                                        `unionNameSet` orphNamesOfTypes tys orphNamesOfType (ForAllTy bndr res)  = orphNamesOfType (binderType bndr)                                        `unionNameSet` orphNamesOfType res-orphNamesOfType (FunTy arg res)      = unitNameSet funTyConName    -- NB!  See Trac #8535+orphNamesOfType (FunTy _ arg res)    = unitNameSet funTyConName    -- NB!  See #8535                                        `unionNameSet` orphNamesOfType arg                                        `unionNameSet` orphNamesOfType res orphNamesOfType (AppTy fun arg)      = orphNamesOfType fun `unionNameSet` orphNamesOfType arg
coreSyn/CoreLint.hs view
@@ -3,10 +3,12 @@ (c) The GRASP/AQUA Project, Glasgow University, 1993-1998  -A ``lint'' pass to check for Core correctness+A ``lint'' pass to check for Core correctness.+See Note [Core Lint guarantee]. -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-}  module CoreLint (     lintCoreBindings, lintUnfolding,@@ -44,10 +46,12 @@ import ErrUtils import Coercion import SrcLoc-import Kind import Type import RepType import TyCoRep       -- checks validity of types/coercions+import TyCoSubst+import TyCoFVs+import TyCoPpr ( pprTyVar ) import TyCon import CoAxiom import BasicTypes@@ -59,7 +63,6 @@ import Util import InstEnv     ( instanceDFunId ) import OptCoercion ( checkAxInstCo )-import UniqSupply import CoreArity ( typeArity ) import Demand ( splitStrictSig, isBotRes ) @@ -75,6 +78,23 @@ import qualified GHC.LanguageExtensions as LangExt  {-+Note [Core Lint guarantee]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Core Lint is the type-checker for Core. Using it, we get the following guarantee:++If all of:+1. Core Lint passes,+2. there are no unsafe coercions (i.e. UnsafeCoerceProv),+3. all plugin-supplied coercions (i.e. PluginProv) are valid, and+4. all case-matches are complete+then running the compiled program will not seg-fault, assuming no bugs downstream+(e.g. in the code generator). This guarantee is quite powerful, in that it allows us+to decouple the safety of the resulting program from the type inference algorithm.++However, do note point (4) above. Core Lint does not check for incomplete case-matches;+see Note [Case expression invariants] in CoreSyn, invariant (4). As explained there,+an incomplete case-match might slip by Core Lint and cause trouble at runtime.+ Note [GHC Formalism] ~~~~~~~~~~~~~~~~~~~~ This file implements the type-checking algorithm for System FC, the "official"@@ -159,7 +179,7 @@  Note [Bad unsafe coercion] ~~~~~~~~~~~~~~~~~~~~~~~~~~-For discussion see https://ghc.haskell.org/trac/ghc/wiki/BadUnsafeCoercions+For discussion see https://gitlab.haskell.org/ghc/ghc/wikis/bad-unsafe-coercions Linter introduces additional rules that checks improper coercion between different types, called bad coercions. Following coercions are forbidden: @@ -373,7 +393,7 @@ -- When we are not in GHCi, the interactive context (hsc_IC hsc_env) is empty -- so this is a (cheap) no-op. ----- See Trac #8215 for an example+-- See #8215 for an example interactiveInScope hsc_env   = tyvars ++ ids   where@@ -389,6 +409,7 @@               --   f :: [t] -> [t]               -- where t is a RuntimeUnk (see TcType) +-- | Type-check a 'CoreProgram'. See Note [Core Lint guarantee]. lintCoreBindings :: DynFlags -> CoreToDo -> [Var] -> CoreProgram -> (Bag MsgDoc, Bag MsgDoc) --   Returns (warnings, errors) -- If you edit this function, you may need to update the GHC formalism@@ -570,15 +591,9 @@               (addWarnL (text "INLINE binder is (non-rule) loop breaker:" <+> ppr binder))               -- Only non-rule loop breakers inhibit inlining -      -- Check whether arity and demand type are consistent (only if demand analysis-      -- already happened)-      ---      -- Note (Apr 2014): this is actually ok.  See Note [Demand analysis for trivial right-hand sides]-      --                  in DmdAnal.  After eta-expansion in CorePrep the rhs is no longer trivial.-      --       ; let dmdTy = idStrictness binder-      --       ; checkL (case dmdTy of-      --                  StrictSig dmd_ty -> idArity binder >= dmdTypeDepth dmd_ty || exprIsTrivial rhs)-      --           (mkArityMsg binder)+       -- We used to check that the dmdTypeDepth of a demand signature never+       -- exceeds idArity, but that is an unnecessary complication, see+       -- Note [idArity varies independently of dmdTypeDepth] in DmdAnal         -- Check that the binder's arity is within the bounds imposed by        -- the type and the strictness signature. See Note [exprArity invariant]@@ -656,7 +671,7 @@         )         -- imitate @lintCoreExpr (App ...)@         (do fun_ty <- lintCoreExpr fun-            addLoc (AnExpr rhs') $ lintCoreArgs fun_ty [Type t, info, e]+            lintCoreArgs fun_ty [Type t, info, e]         )         binders0     go _ = markAllJoinsBad $ lintCoreExpr rhs@@ -776,8 +791,7 @@     (_, dups) = removeDups compare bndrs  lintCoreExpr e@(App _ _)-  = addLoc (AnExpr e) $-    do { fun_ty <- lintCoreFun fun (length args)+  = do { fun_ty <- lintCoreFun fun (length args)        ; lintCoreArgs fun_ty args }   where     (fun, args) = collectArgs e@@ -789,50 +803,8 @@     do { body_ty <- lintCoreExpr expr        ; return $ mkLamType var' body_ty } -lintCoreExpr e@(Case scrut var alt_ty alts) =-       -- Check the scrutinee-  do { scrut_ty <- markAllJoinsBad $ lintCoreExpr scrut-          -- See Note [Join points are less general than the paper]-          -- in CoreSyn--     ; (alt_ty, _) <- lintInTy alt_ty-     ; (var_ty, _) <- lintInTy (idType var)--     -- We used to try to check whether a case expression with no-     -- alternatives was legitimate, but this didn't work.-     -- See Note [No alternatives lint check] for details.--     -- See Note [Rules for floating-point comparisons] in PrelRules-     ; let isLitPat (LitAlt _, _ , _) = True-           isLitPat _                 = False-     ; checkL (not $ isFloatingTy scrut_ty && any isLitPat alts)-         (ptext (sLit $ "Lint warning: Scrutinising floating-point " ++-                        "expression with literal pattern in case " ++-                        "analysis (see Trac #9238).")-          $$ text "scrut" <+> ppr scrut)--     ; case tyConAppTyCon_maybe (idType var) of-         Just tycon-              | debugIsOn-              , isAlgTyCon tycon-              , not (isAbstractTyCon tycon)-              , null (tyConDataCons tycon)-              , not (exprIsBottom scrut)-              -> pprTrace "Lint warning: case binder's type has no constructors" (ppr var <+> ppr (idType var))-                        -- This can legitimately happen for type families-                      $ return ()-         _otherwise -> return ()--        -- Don't use lintIdBndr on var, because unboxed tuple is legitimate--     ; subst <- getTCvSubst-     ; ensureEqTys var_ty scrut_ty (mkScrutMsg var var_ty scrut_ty subst)--     ; lintBinder CaseBind var $ \_ ->-       do { -- Check the alternatives-            mapM_ (lintCoreAlt scrut_ty alt_ty) alts-          ; checkCaseAlts e scrut_ty alts-          ; return alt_ty } }+lintCoreExpr (Case scrut var alt_ty alts)+  = lintCaseExpr scrut var alt_ty alts  -- This case can't happen; linting types in expressions gets routed through -- lintCoreArgs@@ -930,7 +902,7 @@ Note [No alternatives lint check] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Case expressions with no alternatives are odd beasts, and it would seem-like they would worth be looking at in the linter (cf Trac #10180). We+like they would worth be looking at in the linter (cf #10180). We used to check two things:  * exprIsHNF is false: it would *seem* to be terribly wrong if@@ -940,7 +912,7 @@   scrutinee is diverging for sure.  It was already known that the second test was not entirely reliable.-Unfortunately (Trac #13990), the first test turned out not to be reliable+Unfortunately (#13990), the first test turned out not to be reliable either. Getting the checks right turns out to be somewhat complicated.  For example, suppose we have (comment 8)@@ -1056,7 +1028,7 @@         ; in_scope <- getInScope         -- substTy needs the set of tyvars in scope to avoid generating         -- uniques that are already in scope.-        -- See Note [The substitution invariant] in TyCoRep+        -- See Note [The substitution invariant] in TyCoSubst         ; return (substTyWithInScope in_scope [tv] [arg_ty] body_ty) }    | otherwise@@ -1098,6 +1070,60 @@ ************************************************************************ -} +lintCaseExpr :: CoreExpr -> Id -> Type -> [CoreAlt] -> LintM OutType+lintCaseExpr scrut var alt_ty alts =+  do { let e = Case scrut var alt_ty alts   -- Just for error messages++     -- Check the scrutinee+     ; scrut_ty <- markAllJoinsBad $ lintCoreExpr scrut+          -- See Note [Join points are less general than the paper]+          -- in CoreSyn++     ; (alt_ty, _) <- addLoc (CaseTy scrut) $+                      lintInTy alt_ty+     ; (var_ty, _) <- addLoc (IdTy var) $+                      lintInTy (idType var)++     -- We used to try to check whether a case expression with no+     -- alternatives was legitimate, but this didn't work.+     -- See Note [No alternatives lint check] for details.++     -- Check that the scrutinee is not a floating-point type+     -- if there are any literal alternatives+     -- See CoreSyn Note [Case expression invariants] item (5)+     -- See Note [Rules for floating-point comparisons] in PrelRules+     ; let isLitPat (LitAlt _, _ , _) = True+           isLitPat _                 = False+     ; checkL (not $ isFloatingTy scrut_ty && any isLitPat alts)+         (ptext (sLit $ "Lint warning: Scrutinising floating-point " +++                        "expression with literal pattern in case " +++                        "analysis (see #9238).")+          $$ text "scrut" <+> ppr scrut)++     ; case tyConAppTyCon_maybe (idType var) of+         Just tycon+              | debugIsOn+              , isAlgTyCon tycon+              , not (isAbstractTyCon tycon)+              , null (tyConDataCons tycon)+              , not (exprIsBottom scrut)+              -> pprTrace "Lint warning: case binder's type has no constructors" (ppr var <+> ppr (idType var))+                        -- This can legitimately happen for type families+                      $ return ()+         _otherwise -> return ()++        -- Don't use lintIdBndr on var, because unboxed tuple is legitimate++     ; subst <- getTCvSubst+     ; ensureEqTys var_ty scrut_ty (mkScrutMsg var var_ty scrut_ty subst)+       -- See CoreSyn Note [Case expression invariants] item (7)++     ; lintBinder CaseBind var $ \_ ->+       do { -- Check the alternatives+            mapM_ (lintCoreAlt scrut_ty alt_ty) alts+          ; checkCaseAlts e scrut_ty alts+          ; return alt_ty } }+ checkCaseAlts :: CoreExpr -> OutType -> [CoreAlt] -> LintM () -- a) Check that the alts are non-empty -- b1) Check that the DEFAULT comes first, if it exists@@ -1109,7 +1135,10 @@  checkCaseAlts e ty alts =   do { checkL (all non_deflt con_alts) (mkNonDefltMsg e)+         -- See CoreSyn Note [Case expression invariants] item (2)+      ; checkL (increasing_tag con_alts) (mkNonIncreasingAltsMsg e)+         -- See CoreSyn Note [Case expression invariants] item (3)            -- For types Int#, Word# with an infinite (well, large!) number of           -- possible values, there should usually be a DEFAULT case@@ -1139,6 +1168,7 @@ lintAltExpr expr ann_ty   = do { actual_ty <- lintCoreExpr expr        ; ensureEqTys actual_ty ann_ty (mkCaseAltMsg expr actual_ty ann_ty) }+         -- See CoreSyn Note [Case expression invariants] item (6)  lintCoreAlt :: OutType          -- Type of scrutinee             -> OutType          -- Type of the alternative@@ -1249,7 +1279,8 @@        ; checkL (not (isExternalName (Var.varName id)) || is_top_lvl)            (mkNonTopExternalNameMsg id) -       ; (ty, k) <- lintInTy (idType id)+       ; (ty, k) <- addLoc (IdTy id) $+                    lintInTy (idType id)            -- See Note [Levity polymorphism invariants] in CoreSyn        ; lintL (isJoinId id || not (isKindLevPoly k))@@ -1352,7 +1383,7 @@  -- arrows can related *unlifted* kinds, so this has to be separate from -- a dependent forall.-lintType ty@(FunTy t1 t2)+lintType ty@(FunTy _ t1 t2)   = do { k1 <- lintType t1        ; k2 <- lintType t2        ; lintArrow (text "type or kind" <+> quotes (ppr ty)) k1 k2 }@@ -1398,7 +1429,7 @@  {- Note [Stupid type synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #14939)+Consider (#14939)    type Alg cls ob = ob    f :: forall (cls :: * -> Constraint) (b :: Alg cls *). b @@ -1500,7 +1531,7 @@ lint_app doc kfn kas     = do { in_scope <- getInScope          -- We need the in_scope set to satisfy the invariant in-         -- Note [The substitution invariant] in TyCoRep+         -- Note [The substitution invariant] in TyCoSubst          ; foldlM (go_app in_scope) kfn kas }   where     fail_msg extra = vcat [ hang (text "Kind application error in") 2 doc@@ -1512,7 +1543,7 @@       | Just kfn' <- coreView kfn       = go_app in_scope kfn' tka -    go_app _ (FunTy kfa kfb) tka@(_,ka)+    go_app _ (FunTy _ kfa kfb) tka@(_,ka)       = do { unless (ka `eqType` kfa) $              addErrL (fail_msg (text "Fun:" <+> (ppr kfa $$ ppr tka)))            ; return kfb }@@ -1575,18 +1606,18 @@ It's very bad if simplifying a rule means that one of the template variables (ru_bndrs) that /is/ mentioned on the RHS becomes not-mentioned in the LHS (ru_args).  How can that happen?  Well, in-Trac #10602, SpecConstr stupidly constructed a rule like+#10602, SpecConstr stupidly constructed a rule like    forall x,c1,c2.      f (x |> c1 |> c2) = ....  But simplExpr collapses those coercions into one.  (Indeed in-Trac #10602, it collapsed to the identity and was removed altogether.)+#10602, it collapsed to the identity and was removed altogether.)  We don't have a great story for what to do here, but at least this check will nail it. -NB (Trac #11643): it's possible that a variable listed in the+NB (#11643): it's possible that a variable listed in the binders becomes not-mentioned on both LHS and RHS.  Here's a silly example:    RULE forall x y. f (g x y) = g (x+1) (y-1)@@ -1722,7 +1753,7 @@                      -- scope. All the free vars of `t2` and `kind_co` should                      -- already be in `in_scope`, because they've been                      -- linted and `tv2` has the same unique as `tv1`.-                     -- See Note [The substitution invariant]+                     -- See Note [The substitution invariant] in TyCoSubst.                      unitVarEnv tv1 (TyVarTy tv2 `mkCastTy` mkSymCo kind_co)              tyr = mkInvForAllTy tv2 $                    substTy subst t2@@ -1753,7 +1784,7 @@                      -- scope. All the free vars of `t2` and `kind_co` should                      -- already be in `in_scope`, because they've been                      -- linted and `cv2` has the same unique as `cv1`.-                     -- See Note [The substitution invariant]+                     -- See Note [The substitution invariant] in TyCoSubst.                      unitVarEnv cv1 (eta1 `mkTransCo` (mkCoVarCo cv2)                                           `mkTransCo` (mkSymCo eta2))              tyr = mkTyCoInvForAllTy cv2 $@@ -1768,7 +1799,7 @@        ; k' <- lintArrow (text "coercion" <+> quotes (ppr co)) k'1 k'2        ; lintRole co1 r r1        ; lintRole co2 r r2-       ; return (k, k', mkFunTy s1 s2, mkFunTy t1 t2, r) }+       ; return (k, k', mkVisFunTy s1 s2, mkVisFunTy t1 t2, r) }  lintCoercion (CoVarCo cv)   | not (isCoVar cv)@@ -2083,15 +2114,16 @@ newtype LintM a =    LintM { unLintM ::             LintEnv ->-            WarnsAndErrs ->           -- Error and warning messages so far+            WarnsAndErrs ->           -- Warning and error messages so far             (Maybe a, WarnsAndErrs) } -- Result and messages (if any)+   deriving (Functor)  type WarnsAndErrs = (Bag MsgDoc, Bag MsgDoc)  {- Note [Checking for global Ids] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Before CoreTidy, all locally-bound Ids must be LocalIds, even-top-level ones. See Note [Exported LocalIds] and Trac #9857.+top-level ones. See Note [Exported LocalIds] and #9857.  Note [Checking StaticPtrs] ~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2127,7 +2159,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When linting a type-synonym, or type-family, application   S ty1 .. tyn-we behave as follows (Trac #15057, #T15664):+we behave as follows (#15057, #T15664):  * If lf_report_unsat_syns = True, and S has arity < n,   complain about an unsaturated type synonym or type family@@ -2155,9 +2187,6 @@   when the type is expanded. -} -instance Functor LintM where-      fmap = liftM- instance Applicative LintM where       pure x = LintM $ \ _ errs -> (Just x, errs)       (<*>) = ap@@ -2185,6 +2214,9 @@   | BodyOfLetRec [Id]   -- One of the binders   | CaseAlt CoreAlt     -- Case alternative   | CasePat CoreAlt     -- The *pattern* of the case alternative+  | CaseTy CoreExpr     -- The type field of a case expression+                        -- with this scrutinee+  | IdTy Id             -- The type field of an Id binder   | AnExpr CoreExpr     -- Some expression   | ImportedUnfolding SrcLoc -- Some imported unfolding (ToDo: say which)   | TopLevelBindings@@ -2192,10 +2224,13 @@   | InCo   Coercion     -- Inside a coercion  initL :: DynFlags -> LintFlags -> InScopeSet-       -> LintM a -> WarnsAndErrs    -- Errors and warnings+       -> LintM a -> WarnsAndErrs    -- Warnings and errors initL dflags flags in_scope m   = case unLintM m env (emptyBag, emptyBag) of-      (_, errs) -> errs+      (Just _, errs) -> errs+      (Nothing, errs@(_, e)) | not (isEmptyBag e) -> errs+                             | otherwise -> pprPanic ("Bug in Lint: a failure occurred " +++                                                      "without reporting an error message") empty   where     env = LE { le_flags = flags              , le_subst = mkEmptyTCvSubst in_scope@@ -2227,30 +2262,39 @@  failWithL :: MsgDoc -> LintM a failWithL msg = LintM $ \ env (warns,errs) ->-                (Nothing, (warns, addMsg env errs msg))+                (Nothing, (warns, addMsg True env errs msg))  addErrL :: MsgDoc -> LintM () addErrL msg = LintM $ \ env (warns,errs) ->-              (Just (), (warns, addMsg env errs msg))+              (Just (), (warns, addMsg True env errs msg))  addWarnL :: MsgDoc -> LintM () addWarnL msg = LintM $ \ env (warns,errs) ->-              (Just (), (addMsg env warns msg, errs))+              (Just (), (addMsg False env warns msg, errs)) -addMsg :: LintEnv ->  Bag MsgDoc -> MsgDoc -> Bag MsgDoc-addMsg env msgs msg-  = ASSERT( notNull locs )+addMsg :: Bool -> LintEnv ->  Bag MsgDoc -> MsgDoc -> Bag MsgDoc+addMsg is_error env msgs msg+  = ASSERT( notNull loc_msgs )     msgs `snocBag` mk_msg msg   where-   locs = le_loc env-   (loc, cxt1) = dumpLoc (head locs)-   cxts        = [snd (dumpLoc loc) | loc <- locs]-   context     = ifPprDebug (vcat (reverse cxts) $$ cxt1 $$-                             text "Substitution:" <+> ppr (le_subst env))-                            cxt1+   loc_msgs :: [(SrcLoc, SDoc)]  -- Innermost first+   loc_msgs = map dumpLoc (le_loc env) -   mk_msg msg = mkLocMessage SevWarning (mkSrcSpan loc loc) (context $$ msg)+   cxt_doc = vcat [ vcat $ reverse $ map snd loc_msgs+                  , text "Substitution:" <+> ppr (le_subst env) ]+   context | is_error  = cxt_doc+           | otherwise = whenPprDebug cxt_doc+     -- Print voluminous info for Lint errors+     -- but not for warnings +   msg_span = case [ span | (loc,_) <- loc_msgs+                          , let span = srcLocSpan loc+                          , isGoodSrcSpan span ] of+               []    -> noSrcSpan+               (s:_) -> s+   mk_msg msg = mkLocMessage SevWarning msg_span+                             (msg $$ context)+ addLoc :: LintLocInfo -> LintM a -> LintM a addLoc extra_loc m   = LintM $ \ env errs ->@@ -2347,7 +2391,8 @@ lintTyCoVarInScope var   = do { subst <- getTCvSubst        ; lintL (var `isInScope` subst)-               (pprBndr LetBind var <+> text "is out of scope") }+               (hang (text "The variable" <+> pprBndr LetBind var)+                   2 (text "is out of scope")) }  ensureEqTys :: OutType -> OutType -> MsgDoc -> LintM () -- check ty2 is subtype of ty1 (ie, has same structure but usage@@ -2377,19 +2422,19 @@ dumpLoc :: LintLocInfo -> (SrcLoc, SDoc)  dumpLoc (RhsOf v)-  = (getSrcLoc v, brackets (text "RHS of" <+> pp_binders [v]))+  = (getSrcLoc v, text "In the RHS of" <+> pp_binders [v])  dumpLoc (LambdaBodyOf b)-  = (getSrcLoc b, brackets (text "in body of lambda with binder" <+> pp_binder b))+  = (getSrcLoc b, text "In the body of lambda with binder" <+> pp_binder b)  dumpLoc (UnfoldingOf b)-  = (getSrcLoc b, brackets (text "in the unfolding of" <+> pp_binder b))+  = (getSrcLoc b, text "In the unfolding of" <+> pp_binder b)  dumpLoc (BodyOfLetRec [])-  = (noSrcLoc, brackets (text "In body of a letrec with no binders"))+  = (noSrcLoc, text "In body of a letrec with no binders")  dumpLoc (BodyOfLetRec bs@(_:_))-  = ( getSrcLoc (head bs), brackets (text "in body of letrec with binders" <+> pp_binders bs))+  = ( getSrcLoc (head bs), text "In the body of letrec with binders" <+> pp_binders bs)  dumpLoc (AnExpr e)   = (noSrcLoc, text "In the expression:" <+> ppr e)@@ -2400,8 +2445,15 @@ dumpLoc (CasePat (con, args, _))   = (noSrcLoc, text "In the pattern of a case alternative:" <+> parens (ppr con <+> pp_binders args)) +dumpLoc (CaseTy scrut)+  = (noSrcLoc, hang (text "In the result-type of a case with scrutinee:")+                  2 (ppr scrut))++dumpLoc (IdTy b)+  = (getSrcLoc b, text "In the type of a binder:" <+> ppr b)+ dumpLoc (ImportedUnfolding locn)-  = (locn, brackets (text "in an imported unfolding"))+  = (locn, text "In an imported unfolding") dumpLoc TopLevelBindings   = (noSrcLoc, Outputable.empty) dumpLoc (InType ty)@@ -2562,20 +2614,6 @@           hang (text "Arg type:")                  4 (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))] -{- Not needed now-mkArityMsg :: Id -> MsgDoc-mkArityMsg binder-  = vcat [hsep [text "Demand type has",-                ppr (dmdTypeDepth dmd_ty),-                text "arguments, rhs has",-                ppr (idArity binder),-                text "arguments,",-                ppr binder],-              hsep [text "Binder's strictness signature:", ppr dmd_ty]--         ]-           where (StrictSig dmd_ty) = idStrictness binder--} mkCastErr :: CoreExpr -> Coercion -> Type -> Type -> MsgDoc mkCastErr expr = mk_cast_err "expression" "type" (ppr expr) @@ -2739,8 +2777,9 @@   dflags <- getDynFlags   let removeFlag env = env{ hsc_dflags = dflags{ debugLevel = 0} }       withoutFlag corem =+          -- TODO: supply tag here as well ?         liftIO =<< runCoreM <$> fmap removeFlag getHscEnv <*> getRuleBase <*>-                                getUniqueSupplyM <*> getModule <*>+                                getUniqMask <*> getModule <*>                                 getVisibleOrphanMods <*>                                 getPrintUnqualified <*> getSrcSpanM <*>                                 pure corem
coreSyn/CoreMap.hs view
@@ -3,12 +3,14 @@ (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} +{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-}+ module CoreMap(    -- * Maps over Core expressions    CoreMap, emptyCoreMap, extendCoreMap, lookupCoreMap, foldCoreMap,@@ -33,6 +35,8 @@    (>.>), (|>), (|>>),  ) where +#include "HsVersions.h"+ import GhcPrelude  import TrieMap@@ -129,7 +133,7 @@ * For a key (Case e b ty []) we MUST look at the return type 'ty', because   otherwise (Case (error () "urk") _ Int  []) would compare equal to             (Case (error () "urk") _ Bool [])-  which is utterly wrong (Trac #6097)+  which is utterly wrong (#6097)  We could compare the return type regardless, but the wildly common case is that it's unnecessary, so we have two fields (cm_case and cm_ecase)@@ -516,7 +520,7 @@             -> D env t1 == D env' t1' && D env t2 == D env' t2'         (s, AppTy t1' t2') | Just (t1, t2) <- repSplitAppTy_maybe s             -> D env t1 == D env' t1' && D env t2 == D env' t2'-        (FunTy t1 t2, FunTy t1' t2')+        (FunTy _ t1 t2, FunTy _ t1' t2')             -> D env t1 == D env' t1' && D env t2 == D env' t2'         (TyConApp tc tys, TyConApp tc' tys')             -> tc == tc' && D env tys == D env' tys'
coreSyn/CoreOpt.hs view
@@ -28,10 +28,13 @@ import CoreSubst import CoreUtils import CoreFVs+import {-#SOURCE #-} CoreUnfold ( mkUnfolding )+import MkCore ( FloatBind(..) ) import PprCore  ( pprCoreBindings, pprRules ) import OccurAnal( occurAnalyseExpr, occurAnalysePgm ) import Literal  ( Literal(LitString) ) import Id+import IdInfo   ( unfoldingInfo, setUnfoldingInfo, setRuleInfo, IdInfo (..) ) import Var      ( isNonCoVarId ) import VarSet import VarEnv@@ -152,7 +155,7 @@              -- hence paying just a substitution      do_one (env, binds') bind-      = case simple_opt_bind env bind of+      = case simple_opt_bind env bind TopLevel of           (env', Nothing)    -> (env', binds')           (env', Just bind') -> (env', bind':binds') @@ -199,7 +202,7 @@ simple_opt_clo env (e_env, e)   = simple_opt_expr (soeSetInScope env e_env) e -simple_opt_expr :: SimpleOptEnv -> InExpr -> OutExpr+simple_opt_expr :: HasCallStack => SimpleOptEnv -> InExpr -> OutExpr simple_opt_expr env expr   = go expr   where@@ -223,21 +226,22 @@                         where                           co' = optCoercion (soe_dflags env) (getTCvSubst subst) co -    go (Let bind body) = case simple_opt_bind env bind of-                           (env', Nothing)   -> simple_opt_expr env' body-                           (env', Just bind) -> Let bind (simple_opt_expr env' body)+    go (Let bind body)  = case simple_opt_bind env bind NotTopLevel of+                             (env', Nothing)   -> simple_opt_expr env' body+                             (env', Just bind) -> Let bind (simple_opt_expr env' body)      go lam@(Lam {})     = go_lam env [] lam     go (Case e b ty as)        -- See Note [Getting the map/coerce RULE to work]       | isDeadBinder b-      , Just (con, _tys, es) <- exprIsConApp_maybe in_scope_env e'+      , Just (_, [], con, _tys, es) <- exprIsConApp_maybe in_scope_env e'+        -- We don't need to be concerned about floats when looking for coerce.       , Just (altcon, bs, rhs) <- findAlt (DataAlt con) as       = case altcon of           DEFAULT -> go rhs           _       -> foldr wrapLet (simple_opt_expr env' rhs) mb_prs             where-              (env', mb_prs) = mapAccumL simple_out_bind env $+              (env', mb_prs) = mapAccumL (simple_out_bind NotTopLevel) env $                                zipEqual "simpleOptExpr" bs es           -- Note [Getting the map/coerce RULE to work]@@ -299,13 +303,29 @@ simple_app env (Lam b e) (a:as)   = wrapLet mb_pr (simple_app env' e as)   where-     (env', mb_pr) = simple_bind_pair env b Nothing a+     (env', mb_pr) = simple_bind_pair env b Nothing a NotTopLevel  simple_app env (Tick t e) as   -- Okay to do "(Tick t e) x ==> Tick t (e x)"?   | t `tickishScopesLike` SoftScope   = mkTick t $ simple_app env e as +-- (let x = e in b) a1 .. an  =>  let x = e in (b a1 .. an)+-- The let might appear there as a result of inlining+-- e.g.   let f = let x = e in b+--        in f a1 a2+--   (#13208)+-- However, do /not/ do this transformation for join points+--    See Note [simple_app and join points]+simple_app env (Let bind body) args+  = case simple_opt_bind env bind NotTopLevel of+      (env', Nothing)   -> simple_app env' body args+      (env', Just bind')+        | isJoinBind bind' -> finish_app env expr' args+        | otherwise        -> Let bind' (simple_app env' body args)+        where+          expr' = Let bind' (simple_opt_expr env' body)+ simple_app env e as   = finish_app env (simple_opt_expr env e) as @@ -316,17 +336,17 @@   = finish_app env (App fun (simple_opt_clo env arg)) args  -----------------------simple_opt_bind :: SimpleOptEnv -> InBind+simple_opt_bind :: SimpleOptEnv -> InBind -> TopLevelFlag                 -> (SimpleOptEnv, Maybe OutBind)-simple_opt_bind env (NonRec b r)+simple_opt_bind env (NonRec b r) top_level   = (env', case mb_pr of             Nothing    -> Nothing             Just (b,r) -> Just (NonRec b r))   where     (b', r') = joinPointBinding_maybe b r `orElse` (b, r)-    (env', mb_pr) = simple_bind_pair env b' Nothing (env,r')+    (env', mb_pr) = simple_bind_pair env b' Nothing (env,r') top_level -simple_opt_bind env (Rec prs)+simple_opt_bind env (Rec prs) top_level   = (env'', res_bind)   where     res_bind          = Just (Rec (reverse rev_prs'))@@ -338,18 +358,20 @@                   Just pr -> pr : prs                   Nothing -> prs)        where-         (env', mb_pr) = simple_bind_pair env b (Just b') (env,r)+         (env', mb_pr) = simple_bind_pair env b (Just b') (env,r) top_level  ---------------------- simple_bind_pair :: SimpleOptEnv                  -> InVar -> Maybe OutVar                  -> SimpleClo+                 -> TopLevelFlag                  -> (SimpleOptEnv, Maybe (OutVar, OutExpr))     -- (simple_bind_pair subst in_var out_rhs)     --   either extends subst with (in_var -> out_rhs)     --   or     returns Nothing simple_bind_pair env@(SOE { soe_inl = inl_env, soe_subst = subst })                  in_bndr mb_out_bndr clo@(rhs_env, in_rhs)+                 top_level   | Type ty <- in_rhs        -- let a::* = TYPE ty in <body>   , let out_ty = substTy (soe_subst rhs_env) ty   = ASSERT( isTyVar in_bndr )@@ -368,7 +390,7 @@    | otherwise   = simple_out_bind_pair env in_bndr mb_out_bndr out_rhs-                         occ active stable_unf+                         occ active stable_unf top_level   where     stable_unf = isStableUnfolding (idUnfolding in_bndr)     active     = isAlwaysActive (idInlineActivation in_bndr)@@ -403,9 +425,11 @@     safe_to_inline (ManyOccs {})        = False  --------------------simple_out_bind :: SimpleOptEnv -> (InVar, OutExpr)+simple_out_bind :: TopLevelFlag+                -> SimpleOptEnv+                -> (InVar, OutExpr)                 -> (SimpleOptEnv, Maybe (OutVar, OutExpr))-simple_out_bind env@(SOE { soe_subst = subst }) (in_bndr, out_rhs)+simple_out_bind top_level env@(SOE { soe_subst = subst }) (in_bndr, out_rhs)   | Type out_ty <- out_rhs   = ASSERT( isTyVar in_bndr )     (env { soe_subst = extendTvSubst subst in_bndr out_ty }, Nothing)@@ -416,15 +440,15 @@    | otherwise   = simple_out_bind_pair env in_bndr Nothing out_rhs-                         (idOccInfo in_bndr) True False+                         (idOccInfo in_bndr) True False top_level  ------------------- simple_out_bind_pair :: SimpleOptEnv                      -> InId -> Maybe OutId -> OutExpr-                     -> OccInfo -> Bool -> Bool+                     -> OccInfo -> Bool -> Bool -> TopLevelFlag                      -> (SimpleOptEnv, Maybe (OutVar, OutExpr)) simple_out_bind_pair env in_bndr mb_out_bndr out_rhs-                     occ_info active stable_unf+                     occ_info active stable_unf top_level   | ASSERT2( isNonCoVarId in_bndr, ppr in_bndr )     -- Type and coercion bindings are caught earlier     -- See Note [CoreSyn type and coercion invariant]@@ -438,7 +462,7 @@     (env', bndr1) = case mb_out_bndr of                       Just out_bndr -> (env, out_bndr)                       Nothing       -> subst_opt_bndr env in_bndr-    out_bndr = add_info env' in_bndr bndr1+    out_bndr = add_info env' in_bndr top_level out_rhs bndr1      post_inline_unconditionally :: Bool     post_inline_unconditionally@@ -478,10 +502,57 @@ Note [Preserve join-binding arity] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Be careful /not/ to eta-reduce the RHS of a join point, lest we lose-the join-point arity invariant.  Trac #15108 was caused by simplifying+the join-point arity invariant.  #15108 was caused by simplifying the RHS with simple_opt_expr, which does eta-reduction.  Solution: simplify the RHS of a join point by simplifying under the lambdas (which of course should be there).++Note [simple_app and join points]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In general for let-bindings we can do this:+   (let { x = e } in b) a  ==>  let { x = e } in b a++But not for join points!  For two reasons:++- We would need to push the continuation into the RHS:+   (join { j = e } in b) a  ==>  let { j' = e a } in b[j'/j] a+                                      NB ----^^+  and also change the type of j, hence j'.+  That's a bit sophisticated for the very simple optimiser.++- We might end up with something like+    join { j' = e a } in+    (case blah of        )+    (  True  -> j' void# ) a+    (  False -> blah     )+  and now the call to j' doesn't look like a tail call, and+  Lint may reject.  I say "may" because this is /explicitly/+  allowed in the "Compiling without Continuations" paper+  (Section 3, "Managing \Delta").  But GHC currently does not+  allow this slightly-more-flexible form.  See CoreSyn+  Note [Join points are less general than the paper].++The simple thing to do is to disable this transformation+for join points in the simple optimiser++Note [The Let-Unfoldings Invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A program has the Let-Unfoldings property iff:++- For every let-bound variable f, whether top-level or nested, whether+  recursive or not:+  - Both the binding Id of f, and every occurence Id of f, has an idUnfolding.+  - For non-INLINE things, that unfolding will be f's right hand sids+  - For INLINE things (which have a "stable" unfolding) that unfolding is+    semantically equivalent to f's RHS, but derived from the original RHS of f+    rather that its current RHS.++Informally, we can say that in a program that has the Let-Unfoldings property,+all let-bound Id's have an explicit unfolding attached to them.++Currently, the simplifier guarantees the Let-Unfoldings invariant for anything+it outputs.+ -}  ----------------------@@ -499,8 +570,9 @@     (subst_cv, cv') = substCoVarBndr subst bndr  subst_opt_id_bndr :: SimpleOptEnv -> InId -> (SimpleOptEnv, OutId)--- Nuke all fragile IdInfo, unfolding, and RULES;---    it gets added back later by add_info+-- Nuke all fragile IdInfo, unfolding, and RULES; it gets added back later by+-- add_info.+-- -- Rather like SimplEnv.substIdBndr -- -- It's important to zap fragile OccInfo (which CoreSubst.substIdBndr@@ -531,14 +603,36 @@     new_inl   = delVarEnv inl old_id  -----------------------add_info :: SimpleOptEnv -> InVar -> OutVar -> OutVar-add_info env old_bndr new_bndr+add_info :: SimpleOptEnv -> InVar -> TopLevelFlag -> OutExpr -> OutVar -> OutVar+add_info env old_bndr top_level new_rhs new_bndr  | isTyVar old_bndr = new_bndr- | otherwise        = maybeModifyIdInfo mb_new_info new_bndr+ | otherwise        = lazySetIdInfo new_bndr new_info  where-   subst = soe_subst env-   mb_new_info = substIdInfo subst new_bndr (idInfo old_bndr)+   subst    = soe_subst env+   dflags   = soe_dflags env+   old_info = idInfo old_bndr +   -- Add back in the rules and unfolding which were+   -- removed by zapFragileIdInfo in subst_opt_id_bndr.+   --+   -- See Note [The Let-Unfoldings Invariant]+   new_info = idInfo new_bndr `setRuleInfo`      new_rules+                              `setUnfoldingInfo` new_unfolding++   old_rules = ruleInfo old_info+   new_rules = substSpec subst new_bndr old_rules++   old_unfolding = unfoldingInfo old_info+   new_unfolding | isStableUnfolding old_unfolding+                 = substUnfolding subst old_unfolding+                 | otherwise+                 = unfolding_from_rhs++   unfolding_from_rhs = mkUnfolding dflags InlineRhs+                                    (isTopLevel top_level)+                                    False -- may be bottom or not+                                    new_rhs+ simpleUnfoldingFun :: IdUnfoldingFun simpleUnfoldingFun id   | isAlwaysActive (idInlineActivation id) = idUnfolding id@@ -698,7 +792,7 @@     f = \x. error ".." -and again its arity increses (Trac #15517)+and again its arity increases (#15517) -}  {- *********************************************************************@@ -747,7 +841,7 @@  Note [Push coercions in exprIsConApp_maybe] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In Trac #13025 I found a case where we had+In #13025 I found a case where we had     op (df @t1 @t2)     -- op is a ClassOp where     df = (/\a b. K e1 e2) |> g@@ -756,52 +850,199 @@    ((/\a b. K e1 e2) |> g) @t1 @t2  Hence the use of pushCoArgs.++Note [exprIsConApp_maybe on data constructors with wrappers]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Problem:+- some data constructors have wrappers+- these wrappers inline late (see MkId Note [Activation for data constructor wrappers])+- but we still want case-of-known-constructor to fire early.++Example:+   data T = MkT !Int+   $WMkT n = case n of n' -> MkT n'   -- Wrapper for MkT+   foo x = case $WMkT e of MkT y -> blah++Here we want the case-of-known-constructor transformation to fire, giving+   foo x = case e of x' -> let y = x' in blah++Here's how exprIsConApp_maybe achieves this:++0.  Start with scrutinee = $WMkT e++1.  Inline $WMkT on-the-fly.  That's why data-constructor wrappers are marked+    as expandable. (See CoreUtils.isExpandableApp.) Now we have+      scrutinee = (\n. case n of n' -> MkT n') e++2.  Beta-reduce the application, generating a floated 'let'.+    See Note [beta-reduction in exprIsConApp_maybe] below.  Now we have+      scrutinee = case n of n' -> MkT n'+      with floats {Let n = e}++3.  Float the "case x of x' ->" binding out.  Now we have+      scrutinee = MkT n'+      with floats {Let n = e; case n of n' ->}++And now we have a known-constructor MkT that we can return.++Notice that both (2) and (3) require exprIsConApp_maybe to gather and return+a bunch of floats, both let and case bindings.++Note [beta-reduction in exprIsConApp_maybe]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The unfolding a definition (_e.g._ a let-bound variable or a datacon wrapper) is+typically a function. For instance, take the wrapper for MkT in Note+[exprIsConApp_maybe on data constructors with wrappers]:++    $WMkT n = case n of { n' -> T n' }++If `exprIsConApp_maybe` is trying to analyse `$MkT arg`, upon unfolding of $MkT,+it will see++   (\n -> case n of { n' -> T n' }) arg++In order to go progress, `exprIsConApp_maybe` must perform a beta-reduction.++We don't want to blindly substitute `arg` in the body of the function, because+it duplicates work. We can (and, in fact, used to) substitute `arg` in the body,+but only when `arg` is a variable (or something equally work-free).++But, because of Note [exprIsConApp_maybe on data constructors with wrappers],+'exprIsConApp_maybe' now returns floats. So, instead, we can beta-reduce+_always_:++    (\x -> body) arg++Is transformed into++   let x = arg in body++Which, effectively, means emitting a float `let x = arg` and recursively+analysing the body.++For newtypes, this strategy requires that their wrappers have compulsory unfoldings.+Suppose we have+   newtype T a b where+     MkT :: a -> T b a   -- Note args swapped++This defines a worker function MkT, a wrapper function $WMkT, and an axT:+   $WMkT :: forall a b. a -> T b a+   $WMkT = /\b a. \(x:a). MkT a b x    -- A real binding++   MkT :: forall a b. a -> T a b+   MkT = /\a b. \(x:a). x |> (ax a b)  -- A compulsory unfolding++   axiom axT :: a ~R# T a b++Now we are optimising+   case $WMkT (I# 3) |> sym axT of I# y -> ...+we clearly want to simplify this. If $WMkT did not have a compulsory+unfolding, we would end up with+   let a = I#3 in case a of I# y -> ...+because in general, we do this on-the-fly beta-reduction+   (\x. e) blah  -->  let x = blah in e+and then float the the let.  (Substitution would risk duplicating 'blah'.)++But if the case-of-known-constructor doesn't actually fire (i.e.+exprIsConApp_maybe does not return Just) then nothing happens, and nothing+will happen the next time either.++See test T16254, which checks the behavior of newtypes. -}  data ConCont = CC [CoreExpr] Coercion                   -- Substitution already applied --- | Returns @Just (dc, [t1..tk], [x1..xn])@ if the argument expression is--- a *saturated* constructor application of the form @dc t1..tk x1 .. xn@,--- where t1..tk are the *universally-quantified* type args of 'dc'-exprIsConApp_maybe :: InScopeEnv -> CoreExpr -> Maybe (DataCon, [Type], [CoreExpr])+-- | Returns @Just ([b1..bp], dc, [t1..tk], [x1..xn])@ if the argument+-- expression is a *saturated* constructor application of the form @let b1 in+-- .. let bp in dc t1..tk x1 .. xn@, where t1..tk are the+-- *universally-quantified* type args of 'dc'. Floats can also be (and most+-- likely are) single-alternative case expressions. Why does+-- 'exprIsConApp_maybe' return floats? We may have to look through lets and+-- cases to detect that we are in the presence of a data constructor wrapper. In+-- this case, we need to return the lets and cases that we traversed. See Note+-- [exprIsConApp_maybe on data constructors with wrappers]. Data constructor wrappers+-- are unfolded late, but we really want to trigger case-of-known-constructor as+-- early as possible. See also Note [Activation for data constructor wrappers]+-- in MkId.+--+-- We also return the incoming InScopeSet, augmented with+-- the binders from any [FloatBind] that we return+exprIsConApp_maybe :: InScopeEnv -> CoreExpr+                   -> Maybe (InScopeSet, [FloatBind], DataCon, [Type], [CoreExpr]) exprIsConApp_maybe (in_scope, id_unf) expr-  = go (Left in_scope) expr (CC [] (mkRepReflCo (exprType expr)))+  = go (Left in_scope) [] expr (CC [] (mkRepReflCo (exprType expr)))   where     go :: Either InScopeSet Subst              -- Left in-scope  means "empty substitution"              -- Right subst    means "apply this substitution to the CoreExpr"-       -> CoreExpr -> ConCont-       -> Maybe (DataCon, [Type], [CoreExpr])-    go subst (Tick t expr) cont-       | not (tickishIsCode t) = go subst expr cont-    go subst (Cast expr co1) (CC args co2)+             -- NB: in the call (go subst floats expr cont)+             --     the substitution applies to 'expr', but /not/ to 'floats' or 'cont'+       -> [FloatBind] -> CoreExpr -> ConCont+             -- Notice that the floats here are in reverse order+       -> Maybe (InScopeSet, [FloatBind], DataCon, [Type], [CoreExpr])+    go subst floats (Tick t expr) cont+       | not (tickishIsCode t) = go subst floats expr cont++    go subst floats (Cast expr co1) (CC args co2)        | Just (args', m_co1') <- pushCoArgs (subst_co subst co1) args             -- See Note [Push coercions in exprIsConApp_maybe]        = case m_co1' of-           MCo co1' -> go subst expr (CC args' (co1' `mkTransCo` co2))-           MRefl    -> go subst expr (CC args' co2)-    go subst (App fun arg) (CC args co)-       = go subst fun (CC (subst_arg subst arg : args) co)-    go subst (Lam var body) (CC (arg:args) co)+           MCo co1' -> go subst floats expr (CC args' (co1' `mkTransCo` co2))+           MRefl    -> go subst floats expr (CC args' co2)++    go subst floats (App fun arg) (CC args co)+       = go subst floats fun (CC (subst_expr subst arg : args) co)++    go subst floats (Lam bndr body) (CC (arg:args) co)        | exprIsTrivial arg          -- Don't duplicate stuff!-       = go (extend subst var arg) body (CC args co)-    go (Right sub) (Var v) cont+       = go (extend subst bndr arg) floats body (CC args co)+       | otherwise+       = let (subst', bndr') = subst_bndr subst bndr+             float           = FloatLet (NonRec bndr' arg)+         in go subst' (float:floats) body (CC args co)++    go subst floats (Let (NonRec bndr rhs) expr) cont+       = let rhs'            = subst_expr subst rhs+             (subst', bndr') = subst_bndr subst bndr+             float           = FloatLet (NonRec bndr' rhs')+         in go subst' (float:floats) expr cont++    go subst floats (Case scrut b _ [(con, vars, expr)]) cont+       = let+          scrut'           = subst_expr subst scrut+          (subst', b')     = subst_bndr subst b+          (subst'', vars') = subst_bndrs subst' vars+          float            = FloatCase scrut' b' con vars'+         in+           go subst'' (float:floats) expr cont++    go (Right sub) floats (Var v) cont        = go (Left (substInScope sub))+            floats             (lookupIdSubst (text "exprIsConApp" <+> ppr expr) sub v)             cont -    go (Left in_scope) (Var fun) cont@(CC args co)+    go (Left in_scope) floats (Var fun) cont@(CC args co)          | Just con <- isDataConWorkId_maybe fun         , count isValArg args == idArity fun-        = pushCoDataCon con args co+        = succeedWith in_scope floats $+          pushCoDataCon con args co +        -- Look through data constructor wrappers: they inline late (See Note+        -- [Activation for data constructor wrappers]) but we want to do+        -- case-of-known-constructor optimisation eagerly.+        | isDataConWrapId fun+        , let rhs = uf_tmpl (realIdUnfolding fun)+        = go (Left in_scope) floats rhs cont+         -- Look through dictionary functions; see Note [Unfolding DFuns]         | DFunUnfolding { df_bndrs = bndrs, df_con = con, df_args = dfun_args } <- unfolding         , bndrs `equalLength` args    -- See Note [DFun arity check]         , let subst = mkOpenSubst in_scope (bndrs `zip` args)-        = pushCoDataCon con (map (substExpr (text "exprIsConApp1") subst) dfun_args) co+        = succeedWith in_scope floats $+          pushCoDataCon con (map (substExpr (text "exprIsConApp1") subst) dfun_args) co          -- Look through unfoldings, but only arity-zero one;         -- if arity > 0 we are effectively inlining a function call,@@ -811,28 +1052,47 @@         | idArity fun == 0         , Just rhs <- expandUnfolding_maybe unfolding         , let in_scope' = extendInScopeSetSet in_scope (exprFreeVars rhs)-        = go (Left in_scope') rhs cont+        = go (Left in_scope') floats rhs cont          -- See Note [exprIsConApp_maybe on literal strings]         | (fun `hasKey` unpackCStringIdKey) ||           (fun `hasKey` unpackCStringUtf8IdKey)-        , [arg]                <- args+        , [arg]              <- args         , Just (LitString str) <- exprIsLiteral_maybe (in_scope, id_unf) arg-        = dealWithStringLiteral fun str co+        = succeedWith in_scope floats $+          dealWithStringLiteral fun str co         where           unfolding = id_unf fun -    go _ _ _ = Nothing+    go _ _ _ _ = Nothing +    succeedWith :: InScopeSet -> [FloatBind]+                -> Maybe (DataCon, [Type], [CoreExpr])+                -> Maybe (InScopeSet, [FloatBind], DataCon, [Type], [CoreExpr])+    succeedWith in_scope rev_floats x+      = do { (con, tys, args) <- x+           ; let floats = reverse rev_floats+           ; return (in_scope, floats, con, tys, args) }+     ----------------------------     -- Operations on the (Either InScopeSet CoreSubst)     -- The Left case is wildly dominant     subst_co (Left {}) co = co     subst_co (Right s) co = CoreSubst.substCo s co -    subst_arg (Left {}) e = e-    subst_arg (Right s) e = substExpr (text "exprIsConApp2") s e+    subst_expr (Left {}) e = e+    subst_expr (Right s) e = substExpr (text "exprIsConApp2") s e +    subst_bndr msubst bndr+      = (Right subst', bndr')+      where+        (subst', bndr') = substBndr subst bndr+        subst = case msubst of+                  Left in_scope -> mkEmptySubst in_scope+                  Right subst   -> subst++    subst_bndrs subst bs = mapAccumL subst_bndr subst bs+     extend (Left in_scope) v e = Right (extendSubst (mkEmptySubst in_scope) v e)     extend (Right s)       v e = Right (extendSubst s v e) @@ -852,7 +1112,7 @@   = let strFS = mkFastStringByteString str          char = mkConApp charDataCon [mkCharLit (headFS strFS)]-        charTail = fastStringToByteString (tailFS strFS)+        charTail = bytesFS (tailFS strFS)          -- In singleton strings, just add [] instead of unpackCstring# ""#.         rest = if BS.null charTail@@ -1003,7 +1263,7 @@ -- it's faster not to compute it, though. pushCoTyArg co ty   -- The following is inefficient - don't do `eqType` here, the coercion-  -- optimizer will take care of it. See Trac #14737.+  -- optimizer will take care of it. See #14737.   -- -- | tyL `eqType` tyR   -- -- = Just (ty, Nothing) @@ -1041,7 +1301,7 @@ -- the returned coercion would have been reflexive. pushCoValArg co   -- The following is inefficient - don't do `eqType` here, the coercion-  -- optimizer will take care of it. See Trac #14737.+  -- optimizer will take care of it. See #14737.   -- -- | tyL `eqType` tyR   -- -- = Just (mkRepReflCo arg, Nothing) @@ -1201,10 +1461,13 @@        | otherwise = (reverse bs, mkCast (Lam b e) co) -{- Note [collectBindersPushingCo]+{-++Note [collectBindersPushingCo] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We just look for coercions of form    <type> -> blah (and similarly for foralls) to keep this function simple.  We could do more elaborate stuff, but it'd involve substitution etc.+ -}
coreSyn/CorePrep.hs view
@@ -53,9 +53,8 @@ import Util import Pair import Outputable-import Platform+import GHC.Platform import FastString-import Config import Name             ( NamedThing(..), nameSrcSpan ) import SrcLoc           ( SrcSpan(..), realSrcLocSpan, mkRealSrcLoc ) import Data.Bits@@ -179,7 +178,7 @@ corePrepPgm :: HscEnv -> Module -> ModLocation -> CoreProgram -> [TyCon]             -> IO (CoreProgram, S.Set CostCentre) corePrepPgm hsc_env this_mod mod_loc binds data_tycons =-    withTiming (pure dflags)+    withTiming dflags                (text "CorePrep"<+>brackets (ppr this_mod))                (const ()) $ do     us <- mkSplitUniqSupply 's'@@ -207,7 +206,7 @@  corePrepExpr :: DynFlags -> HscEnv -> CoreExpr -> IO CoreExpr corePrepExpr dflags hsc_env expr =-    withTiming (pure dflags) (text "CorePrep [expr]") (const ()) $ do+    withTiming dflags (text "CorePrep [expr]") (const ()) $ do     us <- mkSplitUniqSupply 's'     initialCorePrepEnv <- mkInitialCorePrepEnv dflags hsc_env     let new_expr = initUs_ us (cpeBodyNF initialCorePrepEnv expr)@@ -344,7 +343,7 @@  Note [Dead code in CorePrep] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Imagine that we got an input program like this (see Trac #4962):+Imagine that we got an input program like this (see #4962):    f :: Show b => Int -> (Int, b -> Maybe Int -> Int)   f x = (g True (Just x) + g () (Just x), g)@@ -561,6 +560,7 @@ cpeJoinPair :: CorePrepEnv -> JoinId -> CoreExpr             -> UniqSM (JoinId, CpeRhs) -- Used for all join bindings+-- No eta-expansion: see Note [Do not eta-expand join points] in SimplUtils cpeJoinPair env bndr rhs   = ASSERT(isJoinId bndr)     do { let Just join_arity = isJoinId_maybe bndr@@ -790,7 +790,7 @@ ~~~~~~~~~~~~~~~~~~~ If we got, say    runRW# (case bot of {})-which happened in Trac #11291, we do /not/ want to turn it into+which happened in #11291, we do /not/ want to turn it into    (case bot of {}) realWorldPrimId# because that gives a panic in CoreToStg.myCollectArgs, which expects only variables in function position.  But if we are sure to make@@ -1051,7 +1051,7 @@ Consider    C (let v* = expensive in v)  where the "*" indicates "will be demanded".  Usually v will have been-inlined by now, but let's suppose it hasn't (see Trac #2756).  Then we+inlined by now, but let's suppose it hasn't (see #2756).  Then we do *not* want to get       let v* = expensive in C v@@ -1267,7 +1267,7 @@ wrapBinds (Floats _ binds) body   = foldrOL mk_bind body binds   where-    mk_bind (FloatCase bndr rhs _) body = Case rhs bndr (exprType body) [(DEFAULT, [], body)]+    mk_bind (FloatCase bndr rhs _) body = mkDefaultCase rhs bndr body     mk_bind (FloatLet bind)        body = Let bind body     mk_bind (FloatTick tickish)    body = mkTick tickish body 
coreSyn/CoreSubst.hs view
@@ -61,7 +61,6 @@ import Maybes import Util import Outputable-import PprCore          ()              -- Instances import Data.List  @@ -79,9 +78,9 @@ -- -- Some invariants apply to how you use the substitution: ----- 1. Note [The substitution invariant] in TyCoRep+-- 1. Note [The substitution invariant] in TyCoSubst ----- 2. Note [Substitutions apply only once] in TyCoRep+-- 2. Note [Substitutions apply only once] in TyCoSubst data Subst   = Subst InScopeSet  -- Variables in in scope (both Ids and TyVars) /after/                       -- applying the substitution@@ -89,7 +88,7 @@           TvSubstEnv  -- Substitution from TyVars to Types           CvSubstEnv  -- Substitution from CoVars to Coercions -        -- INVARIANT 1: See TyCoRep Note [The substitution invariant]+        -- INVARIANT 1: See TyCoSubst Note [The substitution invariant]         -- This is what lets us deal with name capture properly         -- It's a hard invariant to check...         --@@ -104,7 +103,7 @@ For a core Subst, which binds Ids as well, we make a different choice for Ids than we do for TyVars. -For TyVars, see Note [Extending the TCvSubst] with Type.TvSubstEnv+For TyVars, see Note [Extending the TCvSubst] in TyCoSubst.  For Ids, we have a different invariant         The IdSubstEnv is extended *only* when the Unique on an Id changes@@ -171,7 +170,7 @@ mkSubst :: InScopeSet -> TvSubstEnv -> CvSubstEnv -> IdSubstEnv -> Subst mkSubst in_scope tvs cvs ids = Subst in_scope ids tvs cvs --- | Find the in-scope set: see TyCoRep Note [The substitution invariant]+-- | Find the in-scope set: see TyCoSubst Note [The substitution invariant] substInScope :: Subst -> InScopeSet substInScope (Subst in_scope _ _ _) = in_scope @@ -181,7 +180,7 @@ zapSubstEnv (Subst in_scope _ _ _) = Subst in_scope emptyVarEnv emptyVarEnv emptyVarEnv  -- | Add a substitution for an 'Id' to the 'Subst': you must ensure that the in-scope set is--- such that TyCoRep Note [The substitution invariant]+-- such that TyCoSubst Note [The substitution invariant] -- holds after extending the substitution like this extendIdSubst :: Subst -> Id -> CoreExpr -> Subst -- ToDo: add an ASSERT that fvs(subst-result) is already in the in-scope set@@ -198,7 +197,7 @@ -- | Add a substitution for a 'TyVar' to the 'Subst' -- The 'TyVar' *must* be a real TyVar, and not a CoVar -- You must ensure that the in-scope set is such that--- TyCoRep Note [The substitution invariant] holds+-- TyCoSubst Note [The substitution invariant] holds -- after extending the substitution like this. extendTvSubst :: Subst -> TyVar -> Type -> Subst extendTvSubst (Subst in_scope ids tvs cvs) tv ty@@ -214,7 +213,7 @@  -- | Add a substitution from a 'CoVar' to a 'Coercion' to the 'Subst': -- you must ensure that the in-scope set satisfies--- TyCoRep Note [The substitution invariant]+-- TyCoSubst Note [The substitution invariant] -- after extending the substitution like this extendCvSubst :: Subst -> CoVar -> Coercion -> Subst extendCvSubst (Subst in_scope ids tvs cvs) v r@@ -339,7 +338,7 @@  -- | Apply a substitution to an entire 'CoreExpr'. Remember, you may only -- apply the substitution /once/:--- see Note [Substitutions apply only once] in TyCoRep+-- See Note [Substitutions apply only once] in TyCoSubst -- -- Do *not* attempt to short-cut in the case of an empty substitution! -- See Note [Extending the Subst]@@ -586,7 +585,7 @@ getTCvSubst (Subst in_scope _ tenv cenv) = TCvSubst in_scope tenv cenv  -- | See 'Coercion.substCo'-substCo :: Subst -> Coercion -> Coercion+substCo :: HasCallStack => Subst -> Coercion -> Coercion substCo subst co = Coercion.substCo (getTCvSubst subst) co  {-@@ -718,7 +717,7 @@ The functions that substitute over IdInfo must be pretty lazy, because they are knot-tied by substRecBndrs. -One case in point was Trac #10627 in which a rule for a function 'f'+One case in point was #10627 in which a rule for a function 'f' referred to 'f' (at a different type) on the RHS.  But instead of just substituting in the rhs of the rule, we were calling simpleOptExpr, which looked at the idInfo for 'f'; result <<loop>>.
coreSyn/CoreSyn.hs view
@@ -142,7 +142,7 @@ -- We get from Haskell source to this Core language in a number of stages: -- -- 1. The source code is parsed into an abstract syntax tree, which is represented---    by the data type 'HsExpr.HsExpr' with the names being 'RdrName.RdrNames'+--    by the data type 'GHC.Hs.Expr.HsExpr' with the names being 'RdrName.RdrNames' -- -- 2. This syntax tree is /renamed/, which attaches a 'Unique.Unique' to every 'RdrName.RdrName' --    (yielding a 'Name.Name') to disambiguate identifiers which are lexically identical.@@ -162,9 +162,9 @@ --    But see Note [Shadowing] below. -- -- 3. The resulting syntax tree undergoes type checking (which also deals with instantiating---    type class arguments) to yield a 'HsExpr.HsExpr' type that has 'Id.Id' as it's names.+--    type class arguments) to yield a 'GHC.Hs.Expr.HsExpr' type that has 'Id.Id' as it's names. ----- 4. Finally the syntax tree is /desugared/ from the expressive 'HsExpr.HsExpr' type into+-- 4. Finally the syntax tree is /desugared/ from the expressive 'GHC.Hs.Expr.HsExpr' type into --    this 'Expr' type, which has far fewer constructors and hence is easier to perform --    optimization, analysis and code generation on. --@@ -201,40 +201,7 @@ --    The binder gets bound to the value of the scrutinee, --    and the 'Type' must be that of all the case alternatives -----    #case_invariants#---    This is one of the more complicated elements of the Core language,---    and comes with a number of restrictions:------    1. The list of alternatives may be empty;---       See Note [Empty case alternatives]------    2. The 'DEFAULT' case alternative must be first in the list,---       if it occurs at all.------    3. The remaining cases are in order of increasing---         tag  (for 'DataAlts') or---         lit  (for 'LitAlts').---       This makes finding the relevant constructor easy,---       and makes comparison easier too.------    4. The list of alternatives must be exhaustive. An /exhaustive/ case---       does not necessarily mention all constructors:------       @---            data Foo = Red | Green | Blue---       ... case x of---            Red   -> True---            other -> f (case x of---                            Green -> ...---                            Blue  -> ... ) ...---       @------       The inner case does not need a @Red@ alternative, because @x@---       can't be @Red@ at that program point.------    5. Floating-point values must not be scrutinised against literals.---       See Trac #9238 and Note [Rules for floating-point comparisons]---       in PrelRules for rationale.+--    IMPORTANT: see Note [Case expression invariants] -- -- *  Cast an expression to a particular type. --    This is used to implement @newtype@s (a @newtype@ constructor or@@ -247,6 +214,41 @@ -- -- *  A coercion +{- Note [Why does Case have a 'Type' field?]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The obvious alternative is+   exprType (Case scrut bndr alts)+     | (_,_,rhs1):_ <- alts+     = exprType rhs1++But caching the type in the Case constructor+  exprType (Case scrut bndr ty alts) = ty+is better for at least three reasons:++* It works when there are no alternatives (see case invarant 1 above)++* It might be faster in deeply-nested situations.++* It might not be quite the same as (exprType rhs) for one+  of the RHSs in alts. Consider a phantom type synonym+       type S a = Int+   and we want to form the case expression+        case x of { K (a::*) -> (e :: S a) }+   Then exprType of the RHS is (S a), but we cannot make that be+   the 'ty' in the Case constructor because 'a' is simply not in+   scope there. Instead we must expand the synonym to Int before+   putting it in the Case constructor.  See CoreUtils.mkSingleAltCase.++   So we'd have to do synonym expansion in exprType which would+   be inefficient.++* The type stored in the case is checked with lintInTy. This checks+  (among other things) that it does not mention any variables that are+  not in scope. If we did not have the type there, it would be a bit+  harder for Core Lint to reject case blah of Ex x -> x where+      data Ex = forall a. Ex a.+-}+ -- If you edit this type, you may need to update the GHC formalism -- See Note [GHC Formalism] in coreSyn/CoreLint.hs data Expr b@@ -255,7 +257,8 @@   | App   (Expr b) (Arg b)   | Lam   b (Expr b)   | Let   (Bind b) (Expr b)-  | Case  (Expr b) b Type [Alt b]       -- See #case_invariants#+  | Case  (Expr b) b Type [Alt b]   -- See Note [Case expression invariants]+                                    -- and Note [Why does Case have a 'Type' field?]   | Cast  (Expr b) Coercion   | Tick  (Tickish Id) (Expr b)   | Type  Type@@ -338,7 +341,7 @@ Literal alternatives (LitAlt lit) are always for *un-lifted* literals. We have one literal, a literal Integer, that is lifted, and we don't allow in a LitAlt, because LitAlt cases don't do any evaluation. Also-(see Trac #5603) if you say+(see #5603) if you say     case 3 of       S# x -> ...       J# _ _ -> ...@@ -348,7 +351,7 @@ an unlifted literal, like all the others.  Also, we do not permit case analysis with literal patterns on floating-point-types. See Trac #9238 and Note [Rules for floating-point comparisons] in+types. See #9238 and Note [Rules for floating-point comparisons] in PrelRules for the rationale for this restriction.  -------------------------- CoreSyn INVARIANTS ---------------------------@@ -386,7 +389,7 @@  In order to be able to inline `f`, we would like to float `a` to the top. Another option would be to inline `a`, but that would lead to duplicating string-literals, which we want to avoid. See Trac #8472.+literals, which we want to avoid. See #8472.  The solution is simply to allow top-level unlifted binders. We can't allow arbitrary unlifted expression at the top-level though, unlifted binders cannot@@ -395,7 +398,7 @@ We allow the top-level primitive string literals to be wrapped in Ticks in the same way they can be wrapped when nested in an expression. CoreToSTG currently discards Ticks around top-level primitive string literals.-See Trac #14779.+See #14779.  Also see Note [Compilation plan for top-level string literals]. @@ -448,6 +451,71 @@ For discussion of some implications of the let/app invariant primops see Note [Checking versus non-checking primops] in PrimOp. +Note [Case expression invariants]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Case expressions are one of the more complicated elements of the Core+language, and come with a number of invariants.  All of them should be+checked by Core Lint.++1. The list of alternatives may be empty;+   See Note [Empty case alternatives]++2. The 'DEFAULT' case alternative must be first in the list,+   if it occurs at all.  Checked in CoreLint.checkCaseAlts.++3. The remaining cases are in order of (strictly) increasing+     tag  (for 'DataAlts') or+     lit  (for 'LitAlts').+   This makes finding the relevant constructor easy, and makes+   comparison easier too.   Checked in CoreLint.checkCaseAlts.++4. The list of alternatives must be exhaustive. An /exhaustive/ case+   does not necessarily mention all constructors:++   @+        data Foo = Red | Green | Blue+        ... case x of+              Red   -> True+              other -> f (case x of+                              Green -> ...+                              Blue  -> ... ) ...+   @++   The inner case does not need a @Red@ alternative, because @x@+   can't be @Red@ at that program point.++   This is not checked by Core Lint -- it's very hard to do so.+   E.g. suppose that inner case was floated out, thus:+         let a = case x of+                   Green -> ...+                   Blue  -> ... )+         case x of+           Red   -> True+           other -> f a+   Now it's really hard to see that the Green/Blue case is+   exhaustive.  But it is.++   If you have a case-expression that really /isn't/ exhaustive,+   we may generate seg-faults.  Consider the Green/Blue case+   above.  Since there are only two branches we may generate+   code that tests for Green, and if not Green simply /assumes/+   Blue (since, if the case is exhaustive, that's all that+   remains).  Of course, if it's not Blue and we start fetching+   fields that should be in a Blue constructor, we may die+   horribly. See also Note [Core Lint guarantee] in CoreLint.++5. Floating-point values must not be scrutinised against literals.+   See #9238 and Note [Rules for floating-point comparisons]+   in PrelRules for rationale.  Checked in lintCaseExpr;+   see the call to isFloatingTy.++6. The 'ty' field of (Case scrut bndr ty alts) is the type of the+   /entire/ case expression.  Checked in lintAltExpr.+   See also Note [Why does Case have a 'Type' field?].++7. The type of the scrutinee must be the same as the type+   of the case binder, obviously.  Checked in lintCaseExpr.+ Note [CoreSyn type and coercion invariant] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We allow a /non-recursive/, /non-top-level/ let to bind type and@@ -521,7 +589,7 @@   we do NOT want to replace     case (x::T) of Bool {}   -->   error Bool "Inaccessible case"   because x might raise an exception, and *that*'s what we want to see!-  (Trac #6067 is an example.) To preserve semantics we'd have to say+  (#6067 is an example.) To preserve semantics we'd have to say      x `seq` error Bool "Inaccessible case"   but the 'seq' is just a case, so we are back to square 1.  Or I suppose   we could say@@ -613,10 +681,22 @@   2. For join arity n, the right-hand side must begin with at least n lambdas.      No ticks, no casts, just lambdas!  C.f. CoreUtils.joinRhsArity. -  2a. Moreover, this same constraint applies to any unfolding of the binder.-     Reason: if we want to push a continuation into the RHS we must push it-     into the unfolding as well.+     2a. Moreover, this same constraint applies to any unfolding of+         the binder.  Reason: if we want to push a continuation into+         the RHS we must push it into the unfolding as well. +     2b. The Arity (in the IdInfo) of a join point is the number of value+         binders in the top n lambdas, where n is the join arity.++         So arity <= join arity; the former counts only value binders+         while the latter counts all binders.+         e.g. Suppose $j has join arity 1+               let j = \x y. e in case x of { A -> j 1; B -> j 2 }+         Then its ordinary arity is also 1, not 2.++         The arity of a join point isn't very important; but short of setting+         it to zero, it is helpful to have an invariant.  E.g. #17294.+   3. If the binding is recursive, then all other bindings in the recursive group      must also be join points. @@ -631,7 +711,7 @@    6. A join point can have a levity-polymorphic RHS      e.g.  let j :: r :: TYPE l = fail void# in ...-     This happened in an intermediate program Trac #13394+     This happened in an intermediate program #13394  Examples: @@ -655,6 +735,16 @@  Invariant 4 is subtle; see Note [The polymorphism rule of join points]. +Invariant 6 is to enable code like this:++  f = \(r :: RuntimeRep) (a :: TYPE r) (x :: T).+      join j :: a+           j = error @r @a "bloop"+      in case x of+           A -> j+           B -> j+           C -> error @r @a "blurp"+ Core Lint will check these invariants, anticipating that any binder whose OccInfo is marked AlwaysTailCalled will become a join point as soon as the simplifier (or simpleOptPgm) runs.@@ -1138,7 +1228,7 @@ -- Something (rule, instance) is relate to all the Names in this -- list. Choose one of them to be an "anchor" for the orphan.  We make -- the choice deterministic to avoid gratuitious changes in the ABI--- hash (Trac #4012).  Specifically, use lexicographic comparison of+-- hash (#4012).  Specifically, use lexicographic comparison of -- OccName rather than comparing Uniques -- -- NB: 'minimum' use Ord, and (Ord OccName) works lexicographically@@ -1666,7 +1756,7 @@     OtherCon {}    If we know this binder (say a lambda binder) will be                   bound to an evaluated thing, we want to retain that-                  info in simpleOptExpr; see Trac #13077.+                  info in simpleOptExpr; see #13077.  We consider even a StableUnfolding as fragile, because it needs substitution. @@ -1738,8 +1828,8 @@  cmpAltCon :: AltCon -> AltCon -> Ordering -- ^ Compares 'AltCon's within a single list of alternatives--- DEFAULT comes out smallest, so that sorting by AltCon--- puts alternatives in the order required by #case_invariants#+-- DEFAULT comes out smallest, so that sorting by AltCon puts+-- alternatives in the order required: see Note [Case expression invariants] cmpAltCon DEFAULT      DEFAULT     = EQ cmpAltCon DEFAULT      _           = LT 
coreSyn/CoreTidy.hs view
@@ -9,7 +9,7 @@  {-# LANGUAGE CPP #-} module CoreTidy (-        tidyExpr, tidyRule, tidyRules, tidyUnfolding+        tidyExpr, tidyRules, tidyUnfolding     ) where  #include "HsVersions.h"@@ -18,7 +18,6 @@  import CoreSyn import CoreSeq ( seqUnfolding )-import CoreArity import Id import IdInfo import Demand ( zapUsageEnvSig )@@ -45,14 +44,15 @@          ->  (TidyEnv, CoreBind)  tidyBind env (NonRec bndr rhs)-  = tidyLetBndr env env (bndr,rhs) =: \ (env', bndr') ->+  = tidyLetBndr env env bndr =: \ (env', bndr') ->     (env', NonRec bndr' (tidyExpr env' rhs))  tidyBind env (Rec prs)   = let-       (env', bndrs') = mapAccumL (tidyLetBndr env') env prs+       (bndrs, rhss)  = unzip prs+       (env', bndrs') = mapAccumL (tidyLetBndr env') env bndrs     in-    map (tidyExpr env') (map snd prs)   =: \ rhss' ->+    map (tidyExpr env') rhss =: \ rhss' ->     (env', Rec (zip bndrs' rhss'))  @@ -166,10 +166,10 @@  tidyLetBndr :: TidyEnv         -- Knot-tied version for unfoldings             -> TidyEnv         -- The one to extend-            -> (Id, CoreExpr) -> (TidyEnv, Var)+            -> Id -> (TidyEnv, Id) -- Used for local (non-top-level) let(rec)s -- Just like tidyIdBndr above, but with more IdInfo-tidyLetBndr rec_tidy_env env@(tidy_env, var_env) (id,rhs)+tidyLetBndr rec_tidy_env env@(tidy_env, var_env) id   = case tidyOccName tidy_env (getOccName id) of { (tidy_env', occ') ->     let         ty'      = tidyType env (idType id)@@ -193,13 +193,15 @@         --      (See Note [Zapping DmdEnv after Demand Analyzer] in WorkWrap)         --         -- Similarly arity info for eta expansion in CorePrep+        -- Don't attempt to recompute arity here; this is just tidying!+        -- Trying to do so led to #17294         --         -- Set inline-prag info so that we preseve it across         -- separate compilation boundaries         old_info = idInfo id         new_info = vanillaIdInfo                     `setOccInfo`        occInfo old_info-                    `setArityInfo`      exprArity rhs+                    `setArityInfo`      arityInfo old_info                     `setStrictnessInfo` zapUsageEnvSig (strictnessInfo old_info)                     `setDemandInfo`     demandInfo old_info                     `setInlinePragInfo` inlinePragInfo old_info@@ -209,6 +211,7 @@         new_unf | isStableUnfolding old_unf = tidyUnfolding rec_tidy_env old_unf old_unf                 | otherwise                 = zapUnfolding old_unf                                               -- See Note [Preserve evaluatedness]+     in     ((tidy_env', var_env'), id') } 
coreSyn/CoreUnfold.hs view
@@ -46,8 +46,7 @@  import DynFlags import CoreSyn-import PprCore          ()      -- Instances-import OccurAnal        ( occurAnalyseExpr )+import OccurAnal        ( occurAnalyseExpr_NoBinderSwap ) import CoreOpt import CoreArity       ( manifestArity ) import CoreUtils@@ -101,7 +100,7 @@ mkDFunUnfolding bndrs con ops   = DFunUnfolding { df_bndrs = bndrs                   , df_con = con-                  , df_args = map occurAnalyseExpr ops }+                  , df_args = map occurAnalyseExpr_NoBinderSwap ops }                   -- See Note [Occurrence analysis of unfoldings]  mkWwInlineRule :: DynFlags -> CoreExpr -> Arity -> Unfolding@@ -260,7 +259,7 @@  In the example, x's ug_arity is 0, so we should inline it at every use site.  It's rare to have such an INLINE pragma (usually INLINE Is on-functions), but it's occasionally very important (Trac #15578, #15519).+functions), but it's occasionally very important (#15578, #15519). In #15519 we had something like    x = case (g a b) of I# r -> T r    {-# INLINE x #-}@@ -311,7 +310,7 @@                 -> UnfoldingGuidance -> Unfolding -- Occurrence-analyses the expression before capturing it mkCoreUnfolding src top_lvl expr guidance-  = CoreUnfolding { uf_tmpl         = occurAnalyseExpr expr,+  = CoreUnfolding { uf_tmpl         = occurAnalyseExpr_NoBinderSwap expr,                       -- See Note [Occurrence analysis of unfoldings]                     uf_src          = src,                     uf_is_top       = top_lvl,@@ -330,7 +329,7 @@ -- Calculates unfolding guidance -- Occurrence-analyses the expression before capturing it mkUnfolding dflags src is_top_lvl is_bottoming expr-  = CoreUnfolding { uf_tmpl         = occurAnalyseExpr expr,+  = CoreUnfolding { uf_tmpl         = occurAnalyseExpr_NoBinderSwap expr,                       -- See Note [Occurrence analysis of unfoldings]                     uf_src          = src,                     uf_is_top       = is_top_lvl,@@ -342,7 +341,7 @@   where     is_top_bottoming = is_top_lvl && is_bottoming     guidance         = calcUnfoldingGuidance dflags is_top_bottoming expr-        -- NB: *not* (calcUnfoldingGuidance (occurAnalyseExpr expr))!+        -- NB: *not* (calcUnfoldingGuidance (occurAnalyseExpr_NoBinderSwap expr))!         -- See Note [Calculate unfolding guidance on the non-occ-anal'd expression]  {-@@ -357,13 +356,46 @@ where g* is (for some strange reason) the loop breaker.  If we don't occ-anal it when reading it in, we won't mark g as a loop breaker, and we may inline g entirely in body, dropping its binding, and leaving-the occurrence in f out of scope. This happened in Trac #8892, where+the occurrence in f out of scope. This happened in #8892, where the unfolding in question was a DFun unfolding.  But more generally, the simplifier is designed on the basis that it is looking at occurrence-analysed expressions, so better ensure that they acutally are. +We use occurAnalyseExpr_NoBinderSwap instead of occurAnalyseExpr;+see Note [No binder swap in unfoldings].++Note [No binder swap in unfoldings]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The binder swap can temporarily violate Core Lint, by assinging+a LocalId binding to a GlobalId. For example, if A.foo{r872}+is a GlobalId with unique r872, then++ case A.foo{r872} of bar {+   K x -> ...(A.foo{r872})...+ }++gets transformed to++  case A.foo{r872} of bar {+    K x -> let foo{r872} = bar+           in ...(A.foo{r872})...++This is usually not a problem, because the simplifier will transform+this to:++  case A.foo{r872} of bar {+    K x -> ...(bar)...++However, after occurrence analysis but before simplification, this extra 'let'+violates the Core Lint invariant that we do not have local 'let' bindings for+GlobalIds.  That seems (just) tolerable for the occurrence analysis that happens+just before the Simplifier, but not for unfoldings, which are Linted+independently.+As a quick workaround, we disable binder swap in this module.+See #16288 and #16296 for further plans.+ Note [Calculate unfolding guidance on the non-occ-anal'd expression] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Notice that we give the non-occur-analysed expression to@@ -409,10 +441,11 @@     go :: Int -> CoreExpr -> Bool     go credit (Lam x e) | isId x           = go (credit+1) e                         | otherwise        = go credit e+        -- See Note [Count coercion arguments in boring contexts]     go credit (App f (Type {}))            = go credit f     go credit (App f a) | credit > 0                         , exprIsTrivial a  = go (credit-1) f-    go credit (Tick _ e)                 = go credit e -- dubious+    go credit (Tick _ e)                   = go credit e -- dubious     go credit (Cast e _)                   = go credit e     go _      (Var {})                     = boringCxtOk     go _      _                            = boringCxtNotOk@@ -450,7 +483,7 @@     n_val_bndrs = length val_bndrs      mk_discount :: Bag (Id,Int) -> Id -> Int-    mk_discount cbs bndr = foldlBag combine 0 cbs+    mk_discount cbs bndr = foldl' combine 0 cbs            where              combine acc (bndr', disc)                | bndr == bndr' = acc `plus_disc` disc@@ -556,6 +589,29 @@     NB: you might think that PostInlineUnconditionally would do this     but it doesn't fire for top-level things; see SimplUtils     Note [Top level and postInlineUnconditionally]++Note [Count coercion arguments in boring contexts]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In inlineBoringOK, we ignore type arguments when deciding whether an+expression is okay to inline into boring contexts. This is good, since+if we have a definition like++  let y = x @Int in f y y++there’s no reason not to inline y at both use sites — no work is+actually duplicated. It may seem like the same reasoning applies to+coercion arguments, and indeed, in #17182 we changed inlineBoringOK to+treat coercions the same way.++However, this isn’t a good idea: unlike type arguments, which have+no runtime representation, coercion arguments *do* have a runtime+representation (albeit the zero-width VoidRep, see Note [Coercion tokens]+in CoreToStg.hs). This caused trouble in #17787 for DataCon wrappers for+nullary GADT constructors: the wrappers would be inlined and each use of+the constructor would lead to a separate allocation instead of just+sharing the wrapper closure.++The solution: don’t ignore coercion arguments after all. -}  uncondInline :: CoreExpr -> Arity -> Int -> Bool@@ -877,7 +933,7 @@ and said it was an "unambiguous win", but its terribly dangerous because a function with many many case branches, each finishing with a constructor, can have an arbitrarily large discount.  This led to-terrible code bloat: see Trac #6099.+terrible code bloat: see #6099.  Note [Unboxed tuple size and result discount] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -903,10 +959,10 @@ quite important.  But we don't want a big discount when a function is called many times-(see the detailed comments with Trac #6048) because if the function is+(see the detailed comments with #6048) because if the function is big it won't be inlined at its many call sites and no benefit results. Indeed, we can get exponentially big inlinings this way; that is what-Trac #6048 is about.+#6048 is about.  On the other hand, for data-valued arguments, if there are lots of case expressions in the body, each one will get smaller if we apply@@ -1085,13 +1141,14 @@ ----------------  certainlyWillInline :: DynFlags -> IdInfo -> Maybe Unfolding--- Sees if the unfolding is pretty certain to inline--- If so, return a *stable* unfolding for it, that will always inline+-- ^ Sees if the unfolding is pretty certain to inline.+-- If so, return a *stable* unfolding for it, that will always inline. certainlyWillInline dflags fn_info   = case unfoldingInfo fn_info of       CoreUnfolding { uf_tmpl = e, uf_guidance = g }-        | loop_breaker -> Nothing       -- Won't inline, so try w/w-        | otherwise    -> do_cunf e g   -- Depends on size, so look at that+        | loop_breaker -> Nothing      -- Won't inline, so try w/w+        | noinline     -> Nothing      -- See Note [Worker-wrapper for NOINLINE functions]+        | otherwise    -> do_cunf e g  -- Depends on size, so look at that        DFunUnfolding {} -> Just fn_unf  -- Don't w/w DFuns; it never makes sense                                        -- to do so, and even if it is currently a@@ -1101,6 +1158,7 @@    where     loop_breaker = isStrongLoopBreaker (occInfo fn_info)+    noinline     = inlinePragmaSpec (inlinePragInfo fn_info) == NoInline     fn_unf       = unfoldingInfo fn_info      do_cunf :: CoreExpr -> UnfoldingGuidance -> Maybe Unfolding@@ -1114,18 +1172,15 @@         -- INLINABLE functions come via this path         --    See Note [certainlyWillInline: INLINABLE]     do_cunf expr (UnfIfGoodArgs { ug_size = size, ug_args = args })-      | not (null args)  -- See Note [certainlyWillInline: be careful of thunks]-      , case inlinePragmaSpec (inlinePragInfo fn_info) of-          NoInline -> False -- NOINLINE; do not say certainlyWillInline!-          _        -> True  -- INLINE, INLINABLE, or nothing+      | arityInfo fn_info > 0  -- See Note [certainlyWillInline: be careful of thunks]       , not (isBottomingSig (strictnessInfo fn_info))               -- Do not unconditionally inline a bottoming functions even if               -- it seems smallish. We've carefully lifted it out to top level,               -- so we don't want to re-inline it.-      , let arity = length args-      , size - (10 * (arity + 1)) <= ufUseThreshold dflags+      , let unf_arity = length args+      , size - (10 * (unf_arity + 1)) <= ufUseThreshold dflags       = Just (fn_unf { uf_src      = InlineStable-                     , uf_guidance = UnfWhen { ug_arity     = arity+                     , uf_guidance = UnfWhen { ug_arity     = unf_arity                                              , ug_unsat_ok  = unSaturatedOk                                              , ug_boring_ok = inlineBoringOk expr } })              -- Note the "unsaturatedOk". A function like  f = \ab. a@@ -1138,11 +1193,22 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Don't claim that thunks will certainly inline, because that risks work duplication.  Even if the work duplication is not great (eg is_cheap-holds), it can make a big difference in an inner loop In Trac #5623 we+holds), it can make a big difference in an inner loop In #5623 we found that the WorkWrap phase thought that        y = case x of F# v -> F# (v +# v) was certainlyWillInline, so the addition got duplicated. +Note that we check arityInfo instead of the arity of the unfolding to detect+this case. This is so that we don't accidentally fail to inline small partial+applications, like `f = g 42` (where `g` recurses into `f`) where g has arity 2+(say). Here there is no risk of work duplication, and the RHS is tiny, so+certainlyWillInline should return True. But `unf_arity` is zero! However f's+arity, gotten from `arityInfo fn_info`, is 1.++Failing to say that `f` will inline forces W/W to generate a potentially huge+worker for f that will immediately cancel with `g`'s wrapper anyway, causing+unnecessary churn in the Simplifier while arriving at the same result.+ Note [certainlyWillInline: INLINABLE] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ certainlyWillInline /must/ return Nothing for a large INLINABLE thing,@@ -1245,6 +1311,20 @@  | otherwise  = result +-- | This is an awful but temporary workaround for #17615, where the+-- case analysis from the 'ufVeryAggressive' selector causes the entire+-- 'DynFlags' to be unpacked into local bindings (due to binder swap). This+-- results in a tremendous amount of stack spillage, severely bloating the code+-- generated for 'callSiteInline'.+--+-- The right solution here is likely to fix binder swap to avoid this terrible+-- behavior (since there are likely other instances of this as well) but this+-- case was serious enough that it showed up in a CPU profile and consequently+-- I wanted to fix it for 8.10.+very_aggressive :: DynFlags -> Bool+very_aggressive = ufVeryAggressive+{-# NOINLINE very_aggressive #-}+ tryUnfolding :: DynFlags -> Id -> Bool -> [ArgSummary] -> CallCtxt              -> CoreExpr -> Bool -> Bool -> UnfoldingGuidance              -> Maybe CoreExpr@@ -1255,7 +1335,7 @@      UnfNever -> traceInline dflags id str (text "UnfNever") Nothing       UnfWhen { ug_arity = uf_arity, ug_unsat_ok = unsat_ok, ug_boring_ok = boring_ok }-        | enough_args && (boring_ok || some_benefit || ufVeryAggressive dflags)+        | enough_args && (boring_ok || some_benefit || very_aggressive dflags)                 -- See Note [INLINE for small functions (3)]         -> traceInline dflags id str (mk_doc some_benefit empty True) (Just unf_template)         | otherwise@@ -1265,7 +1345,7 @@           enough_args = (n_val_args >= uf_arity) || (unsat_ok && n_val_args > 0)       UnfIfGoodArgs { ug_args = arg_discounts, ug_res = res_discount, ug_size = size }-        | ufVeryAggressive dflags+        | very_aggressive dflags         -> traceInline dflags id str (mk_doc some_benefit extra_doc True) (Just unf_template)         | is_wf && some_benefit && small_enough         -> traceInline dflags id str (mk_doc some_benefit extra_doc True) (Just unf_template)
+ coreSyn/CoreUnfold.hs-boot view
@@ -0,0 +1,14 @@+module CoreUnfold (+        mkUnfolding+    ) where++import GhcPrelude+import CoreSyn+import DynFlags++mkUnfolding :: DynFlags+            -> UnfoldingSource+            -> Bool+            -> Bool+            -> CoreExpr+            -> Unfolding
coreSyn/CoreUtils.hs view
@@ -14,7 +14,7 @@         mkCast,         mkTick, mkTicks, mkTickNoHNF, tickHNFArgs,         bindNonRec, needsCaseBinding,-        mkAltExpr,+        mkAltExpr, mkDefaultCase, mkSingleAltCase,          -- * Taking expressions apart         findDefault, addDefault, findAlt, isDefaultAlt,@@ -77,6 +77,7 @@ import IdInfo import PrelNames( absentErrorIdKey ) import Type+import Predicate import TyCoRep( TyCoBinder(..), TyBinder ) import Coercion import TyCon@@ -88,7 +89,7 @@ import Maybes import ListSetOps       ( minusList ) import BasicTypes       ( Arity, isConLike )-import Platform+import GHC.Platform import Util import Pair import Data.ByteString     ( ByteString )@@ -190,7 +191,7 @@ Example:      let a = Int in (\x:a. x) Given this, exprType must be careful to substitute 'a' in the-result type (Trac #8522).+result type (#8522).  Note [Existential variables and silly type synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -202,7 +203,7 @@  Now, the type of 'x' is (Funny a), where 'a' is existentially quantified. That means that 'exprType' and 'coreAltsType' may give a result that *appears*-to mention an out-of-scope type variable.  See Trac #3409 for a more real-world+to mention an out-of-scope type variable.  See #3409 for a more real-world example.  Various possibilities suggest themselves:@@ -488,7 +489,7 @@   | needsCaseBinding (idType bndr) rhs = case_bind   | otherwise                          = let_bind   where-    case_bind = Case rhs bndr (exprType body) [(DEFAULT, [], body)]+    case_bind = mkDefaultCase rhs bndr body     let_bind  = Let (NonRec bndr rhs) body  -- | Tests whether we have to use a @case@ rather than @let@ binding for this expression@@ -512,8 +513,45 @@ mkAltExpr (LitAlt _) _ _ = panic "mkAltExpr LitAlt" mkAltExpr DEFAULT _ _ = panic "mkAltExpr DEFAULT" -{- Note [Binding coercions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~+mkDefaultCase :: CoreExpr -> Id -> CoreExpr -> CoreExpr+-- Make (case x of y { DEFAULT -> e }+mkDefaultCase scrut case_bndr body+  = Case scrut case_bndr (exprType body) [(DEFAULT, [], body)]++mkSingleAltCase :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr+-- Use this function if possible, when building a case,+-- because it ensures that the type on the Case itself+-- doesn't mention variables bound by the case+-- See Note [Care with the type of a case expression]+mkSingleAltCase scrut case_bndr con bndrs body+  = Case scrut case_bndr case_ty [(con,bndrs,body)]+  where+    body_ty = exprType body++    case_ty -- See Note [Care with the type of a case expression]+      | Just body_ty' <- occCheckExpand bndrs body_ty+      = body_ty'++      | otherwise+      = pprPanic "mkSingleAltCase" (ppr scrut $$ ppr bndrs $$ ppr body_ty)++{- Note [Care with the type of a case expression]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider a phantom type synonym+   type S a = Int+and we want to form the case expression+   case x of K (a::*) -> (e :: S a)++We must not make the type field of the case-expression (S a) because+'a' isn't in scope.  Hence the call to occCheckExpand.  This caused+issue #17056.++NB: this situation can only arise with type synonyms, which can+falsely "mention" type variables that aren't "really there", and which+can be eliminated by expanding the synonym.++Note [Binding coercions]+~~~~~~~~~~~~~~~~~~~~~~~~ Consider binding a CoVar, c = e.  Then, we must atisfy Note [CoreSyn type and coercion invariant] in CoreSyn, which allows only (Coercion co) on the RHS.@@ -571,7 +609,7 @@  Suppose that for some silly reason, x isn't substituted in the case expression.  (Perhaps there's a NOINLINE on it, or profiling SCC stuff-gets in the way; cf Trac #3118.)  Then the full-lazines pass might produce+gets in the way; cf #3118.)  Then the full-lazines pass might produce this       x = Red@@ -827,11 +865,11 @@ NB: it's important that all this is done in [InAlt], *before* we work on the alternatives themselves, because Simplify.simplAlt may zap the occurrence info on the binders in the alternatives, which in turn-defeats combineIdenticalAlts (see Trac #7360).+defeats combineIdenticalAlts (see #7360).  Note [Care with impossible-constructors when combining alternatives] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have (Trac #10538)+Suppose we have (#10538)    data T = A | B | C | D        case x::T of   (Imposs-default-cons {A,B})@@ -867,7 +905,7 @@  Note that we have a new DEFAULT branch that we didn't have before.  So we need delete from the "impossible-default-constructors" all the-known-con alternatives that we have eliminated. (In Trac #11172 we+known-con alternatives that we have eliminated. (In #11172 we missed the first one.)  -}@@ -950,7 +988,7 @@    let v = case x of {} in ... and after CoreToSTG that gives    let v = x in ...-and that confuses the code generator (Trac #11155). So best to kill+and that confuses the code generator (#11155). So best to kill it off at source. -} @@ -1102,7 +1140,7 @@ dupAppSize = 8   -- Size of term we are prepared to duplicate                  -- This is *just* big enough to make test MethSharing                  -- inline enough join points.  Really it should be-                 -- smaller, and could be if we fixed Trac #4960.+                 -- smaller, and could be if we fixed #4960.  {- ************************************************************************@@ -1116,7 +1154,7 @@ exprIsWorkFree is used when deciding whether to inline something; we don't inline it if doing so might duplicate work, by peeling off a complete copy of the expression.  Here we do not want even to-duplicate a primop (Trac #5623):+duplicate a primop (#5623):    eg   let x = a #+ b in x +# x    we do not want to inline/duplicate x @@ -1276,7 +1314,7 @@  * False of case-expressions.  If we have     let x = case ... in ...(case x of ...)...-  we won't simplify.  We have to inline x.  See Trac #14688.+  we won't simplify.  We have to inline x.  See #14688.  * False of let-expressions (same reason); and in any case we   float lets out of an RHS if doing so will reveal an expandable@@ -1379,9 +1417,10 @@        = True         | Just (bndr, ty) <- splitPiTy_maybe ty-       = caseBinder bndr-           (\_tv -> all_pred_args n_val_args ty)-           (\bndr_ty -> isPredTy bndr_ty && all_pred_args (n_val_args-1) ty)+       = case bndr of+           Named {}        -> all_pred_args n_val_args ty+           Anon InvisArg _ -> all_pred_args (n_val_args-1) ty+           Anon VisArg _   -> False         | otherwise        = False@@ -1577,7 +1616,7 @@      primop_arg_ok :: TyBinder -> CoreExpr -> Bool     primop_arg_ok (Named _) _ = True   -- A type argument-    primop_arg_ok (Anon ty) arg        -- A term argument+    primop_arg_ok (Anon _ ty) arg      -- A term argument        | isUnliftedType ty = expr_ok primop_ok arg        | otherwise         = True  -- See Note [Primops with lifted arguments] @@ -1656,7 +1695,7 @@   add unlifted algebraic types in due course.  ------ Historical note: Trac #15696: --------+----- Historical note: #15696: --------   Previously SetLevels used exprOkForSpeculation to guide   floating of single-alternative cases; it now uses exprIsHNF   Note [Floating single-alternative cases].@@ -1675,9 +1714,9 @@     ...(case x of y             A -> ...             _ -> ...blah...)...-  which is utterly bogus (seg fault); see Trac #5453.+  which is utterly bogus (seg fault); see #5453. ------ Historical note: Trac #3717: --------+----- Historical note: #3717: --------     foo :: Int -> Int     foo 0 = 0     foo n = (if n < 5 then 1 else 2) `seq` foo (n-1)@@ -1702,7 +1741,7 @@  Note [Primops with lifted arguments] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Is this ok-for-speculation (see Trac #13027)?+Is this ok-for-speculation (see #13027)?    reallyUnsafePtrEq# a b Well, yes.  The primop accepts lifted arguments and does not evaluate them.  Indeed, in general primops are, well, primitive@@ -1879,7 +1918,9 @@ -- Top-level literal strings can't even be wrapped in ticks --   see Note [CoreSyn top-level string literals] in CoreSyn exprIsTopLevelBindable expr ty-  = not (isUnliftedType ty)+  = not (mightBeUnliftedType ty)+    -- Note that 'expr' may be levity polymorphic here consequently we must use+    -- 'mightBeUnliftedType' rather than 'isUnliftedType' as the latter would panic.   || exprIsTickedString expr  -- | Check if the expression is zero or more Ticks wrapped around a literal@@ -2278,7 +2319,7 @@   *keeps* arity 1 (perhaps also wrongly).  So CorePrep eta-expands   the definition again, so that it does not termninate after all.   Result: seg-fault because the boolean case actually gets a function value.-  See Trac #1947.+  See #1947.    So it's important to do the right thing. @@ -2435,7 +2476,7 @@   * f is not bottom we can eta-reduce    \x. f x  ===>  f -This turned up in Trac #7542.+This turned up in #7542.   ************************************************************************
coreSyn/MkCore.hs view
@@ -7,6 +7,7 @@         mkCoreApp, mkCoreApps, mkCoreConApps,         mkCoreLams, mkWildCase, mkIfThenElse,         mkWildValBinder, mkWildEvBinder,+        mkSingleAltCase,         sortQuantVars, castBottomExpr,          -- * Constructing boxed literals@@ -17,10 +18,10 @@         mkCharExpr, mkStringExpr, mkStringExprFS, mkStringExprFSWith,          -- * Floats-        FloatBind(..), wrapFloat,+        FloatBind(..), wrapFloat, wrapFloats, floatBindings,          -- * Constructing small tuples-        mkCoreVarTup, mkCoreVarTupTy, mkCoreTup, mkCoreUbxTup,+        mkCoreVarTupTy, mkCoreTup, mkCoreUbxTup,         mkCoreTupBoxity, unitExpr,          -- * Constructing big tuples@@ -57,14 +58,14 @@ import Var      ( EvVar, setTyVarUnique )  import CoreSyn-import CoreUtils        ( exprType, needsCaseBinding, bindNonRec )+import CoreUtils        ( exprType, needsCaseBinding, mkSingleAltCase, bindNonRec ) import Literal import HscTypes  import TysWiredIn import PrelNames -import HsUtils          ( mkChunkified, chunkify )+import GHC.Hs.Utils     ( mkChunkified, chunkify ) import Type import Coercion         ( isCoVar ) import TysPrim@@ -111,29 +112,34 @@ mkCoreLet bind body   = Let bind body +-- | Create a lambda where the given expression has a number of variables+-- bound over it. The leftmost binder is that bound by the outermost+-- lambda in the result+mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr+mkCoreLams = mkLams+ -- | Bind a list of binding groups over an expression. The leftmost binding -- group becomes the outermost group in the resulting expression mkCoreLets :: [CoreBind] -> CoreExpr -> CoreExpr mkCoreLets binds body = foldr mkCoreLet body binds --- | Construct an expression which represents the application of one expression--- paired with its type to an argument. The result is paired with its type. This--- function is not exported and used in the definition of 'mkCoreApp' and--- 'mkCoreApps'.+-- | Construct an expression which represents the application of a number of+-- expressions to that of a data constructor expression. The leftmost expression+-- in the list is applied first+mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr+mkCoreConApps con args = mkCoreApps (Var (dataConWorkId con)) args++-- | Construct an expression which represents the application of a number of+-- expressions to another. The leftmost expression in the list is applied first -- Respects the let/app invariant by building a case expression where necessary --   See CoreSyn Note [CoreSyn let/app invariant]-mkCoreAppTyped :: SDoc -> (CoreExpr, Type) -> CoreExpr -> (CoreExpr, Type)-mkCoreAppTyped _ (fun, fun_ty) (Type ty)-  = (App fun (Type ty), piResultTy fun_ty ty)-mkCoreAppTyped _ (fun, fun_ty) (Coercion co)-  = (App fun (Coercion co), res_ty)-  where-    (_, res_ty) = splitFunTy fun_ty-mkCoreAppTyped d (fun, fun_ty) arg-  = ASSERT2( isFunTy fun_ty, ppr fun $$ ppr arg $$ d )-    (mk_val_app fun arg arg_ty res_ty, res_ty)+mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr+mkCoreApps fun args+  = fst $+    foldl' (mkCoreAppTyped doc_string) (fun, fun_ty) args   where-    (arg_ty, res_ty) = splitFunTy fun_ty+    doc_string = ppr fun_ty $$ ppr fun $$ ppr args+    fun_ty = exprType fun  -- | Construct an expression which represents the application of one expression -- to the other@@ -143,47 +149,40 @@ mkCoreApp s fun arg   = fst $ mkCoreAppTyped s (fun, exprType fun) arg --- | Construct an expression which represents the application of a number of--- expressions to another. The leftmost expression in the list is applied first+-- | Construct an expression which represents the application of one expression+-- paired with its type to an argument. The result is paired with its type. This+-- function is not exported and used in the definition of 'mkCoreApp' and+-- 'mkCoreApps'. -- Respects the let/app invariant by building a case expression where necessary --   See CoreSyn Note [CoreSyn let/app invariant]-mkCoreApps :: CoreExpr -> [CoreExpr] -> CoreExpr-mkCoreApps fun args-  = fst $-    foldl' (mkCoreAppTyped doc_string) (fun, fun_ty) args+mkCoreAppTyped :: SDoc -> (CoreExpr, Type) -> CoreExpr -> (CoreExpr, Type)+mkCoreAppTyped _ (fun, fun_ty) (Type ty)+  = (App fun (Type ty), piResultTy fun_ty ty)+mkCoreAppTyped _ (fun, fun_ty) (Coercion co)+  = (App fun (Coercion co), funResultTy fun_ty)+mkCoreAppTyped d (fun, fun_ty) arg+  = ASSERT2( isFunTy fun_ty, ppr fun $$ ppr arg $$ d )+    (mkValApp fun arg arg_ty res_ty, res_ty)   where-    doc_string = ppr fun_ty $$ ppr fun $$ ppr args-    fun_ty = exprType fun---- | Construct an expression which represents the application of a number of--- expressions to that of a data constructor expression. The leftmost expression--- in the list is applied first-mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr-mkCoreConApps con args = mkCoreApps (Var (dataConWorkId con)) args+    (arg_ty, res_ty) = splitFunTy fun_ty -mk_val_app :: CoreExpr -> CoreExpr -> Type -> Type -> CoreExpr+mkValApp :: CoreExpr -> CoreExpr -> Type -> Type -> CoreExpr -- Build an application (e1 e2), -- or a strict binding  (case e2 of x -> e1 x) -- using the latter when necessary to respect the let/app invariant --   See Note [CoreSyn let/app invariant]-mk_val_app fun arg arg_ty res_ty+mkValApp fun arg arg_ty res_ty   | not (needsCaseBinding arg_ty arg)   = App fun arg                -- The vastly common case-   | otherwise-  = Case arg arg_id res_ty [(DEFAULT,[],App fun (Var arg_id))]-  where-    arg_id = mkWildValBinder arg_ty-        -- Lots of shadowing, but it doesn't matter,-        -- because 'fun ' should not have a free wild-id-        ---        -- This is Dangerous.  But this is the only place we play this-        -- game, mk_val_app returns an expression that does not have-        -- a free wild-id.  So the only thing that can go wrong-        -- is if you take apart this case expression, and pass a-        -- fragment of it as the fun part of a 'mk_val_app'.+  = mkStrictApp fun arg arg_ty res_ty ------------+{- *********************************************************************+*                                                                      *+              Building case expressions+*                                                                      *+********************************************************************* -}+ mkWildEvBinder :: PredType -> EvVar mkWildEvBinder pred = mkWildValBinder pred @@ -197,10 +196,29 @@  mkWildCase :: CoreExpr -> Type -> Type -> [CoreAlt] -> CoreExpr -- Make a case expression whose case binder is unused--- The alts should not have any occurrences of WildId+-- The alts and res_ty should not have any occurrences of WildId mkWildCase scrut scrut_ty res_ty alts   = Case scrut (mkWildValBinder scrut_ty) res_ty alts +mkStrictApp :: CoreExpr -> CoreExpr -> Type -> Type -> CoreExpr+-- Build a strict application (case e2 of x -> e1 x)+mkStrictApp fun arg arg_ty res_ty+  = Case arg arg_id res_ty [(DEFAULT,[],App fun (Var arg_id))]+       -- mkDefaultCase looks attractive here, and would be sound.+       -- But it uses (exprType alt_rhs) to compute the result type,+       -- whereas here we already know that the result type is res_ty+  where+    arg_id = mkWildValBinder arg_ty+        -- Lots of shadowing, but it doesn't matter,+        -- because 'fun' and 'res_ty' should not have a free wild-id+        --+        -- This is Dangerous.  But this is the only place we play this+        -- game, mkStrictApp returns an expression that does not have+        -- a free wild-id.  So the only way 'fun' could get a free wild-id+        -- would be if you take apart this case expression (or some other+        -- expression that uses mkWildValBinder, of which there are not+        -- many), and pass a fragment of it as the fun part of a 'mkStrictApp'.+ mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr mkIfThenElse guard then_expr else_expr -- Not going to be refining, so okay to take the type of the "then" clause@@ -219,17 +237,6 @@     e_ty = exprType e  {--The functions from this point don't really do anything cleverer than-their counterparts in CoreSyn, but they are here for consistency--}---- | Create a lambda where the given expression has a number of variables--- bound over it. The leftmost binder is that bound by the outermost--- lambda in the result-mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr-mkCoreLams = mkLams--{- ************************************************************************ *                                                                      * \subsection{Making literals}@@ -302,7 +309,7 @@   where     chars = unpackFS str     safeChar c = ord c >= 1 && ord c <= 0x7F-    lit = Lit (LitString (fastStringToByteString str))+    lit = Lit (LitString (bytesFS str))  {- ************************************************************************@@ -337,13 +344,23 @@   We use a suffix "1" to indicate this.  Usually we want the former, but occasionally the latter.--} --- | Build a small tuple holding the specified variables--- One-tuples are flattened; see Note [Flattening one-tuples]-mkCoreVarTup :: [Id] -> CoreExpr-mkCoreVarTup ids = mkCoreTup (map Var ids)+NB: The logic in tupleDataCon knows about () and Unit and (,), etc. +Note [Don't flatten tuples from HsSyn]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we get an explicit 1-tuple from HsSyn somehow (likely: Template Haskell),+we should treat it really as a 1-tuple, without flattening. Note that a+1-tuple and a flattened value have different performance and laziness+characteristics, so should just do what we're asked.++This arose from discussions in #16881.++One-tuples that arise internally depend on the circumstance; often flattening+is a good idea. Decisions are made on a case-by-case basis.++-}+ -- | Build the type of a small tuple that holds the specified variables -- One-tuples are flattened; see Note [Flattening one-tuples] mkCoreVarTupTy :: [Id] -> Type@@ -352,9 +369,14 @@ -- | Build a small tuple holding the specified expressions -- One-tuples are flattened; see Note [Flattening one-tuples] mkCoreTup :: [CoreExpr] -> CoreExpr-mkCoreTup []  = Var unitDataConId mkCoreTup [c] = c-mkCoreTup cs  = mkCoreConApps (tupleDataCon Boxed (length cs))+mkCoreTup cs  = mkCoreTup1 cs   -- non-1-tuples are uniform++-- | Build a small tuple holding the specified expressions+-- One-tuples are *not* flattened; see Note [Flattening one-tuples]+-- See also Note [Don't flatten tuples from HsSyn]+mkCoreTup1 :: [CoreExpr] -> CoreExpr+mkCoreTup1 cs = mkCoreConApps (tupleDataCon Boxed (length cs))                               (map (Type . exprType) cs ++ cs)  -- | Build a small unboxed tuple holding the specified expressions,@@ -368,9 +390,9 @@     mkCoreConApps (tupleDataCon Unboxed (length tys))              (map (Type . getRuntimeRep) tys ++ map Type tys ++ exps) --- | Make a core tuple of the given boxity+-- | Make a core tuple of the given boxity; don't flatten 1-tuples mkCoreTupBoxity :: Boxity -> [CoreExpr] -> CoreExpr-mkCoreTupBoxity Boxed   exps = mkCoreTup exps+mkCoreTupBoxity Boxed   exps = mkCoreTup1 exps mkCoreTupBoxity Unboxed exps = mkCoreUbxTup (map exprType exps) exps  -- | Build a big tuple holding the specified variables@@ -558,8 +580,21 @@  wrapFloat :: FloatBind -> CoreExpr -> CoreExpr wrapFloat (FloatLet defns)       body = Let defns body-wrapFloat (FloatCase e b con bs) body = Case e b (exprType body) [(con, bs, body)]+wrapFloat (FloatCase e b con bs) body = mkSingleAltCase e b con bs body +-- | Applies the floats from right to left. That is @wrapFloats [b1, b2, …, bn]+-- u = let b1 in let b2 in … in let bn in u@+wrapFloats :: [FloatBind] -> CoreExpr -> CoreExpr+wrapFloats floats expr = foldr wrapFloat expr floats++bindBindings :: CoreBind -> [Var]+bindBindings (NonRec b _) = [b]+bindBindings (Rec bnds) = map fst bnds++floatBindings :: FloatBind -> [Var]+floatBindings (FloatLet bnd) = bindBindings bnd+floatBindings (FloatCase _ b _ bs) = b:bs+ {- ************************************************************************ *                                                                      *@@ -609,7 +644,7 @@ mkBuildExpr elt_ty mk_build_inside = do     [n_tyvar] <- newTyVars [alphaTyVar]     let n_ty = mkTyVarTy n_tyvar-        c_ty = mkFunTys [elt_ty, n_ty] n_ty+        c_ty = mkVisFunTys [elt_ty, n_ty] n_ty     [c, n] <- sequence [mkSysLocalM (fsLit "c") c_ty, mkSysLocalM (fsLit "n") n_ty]      build_inside <- mk_build_inside (c, c_ty) (n, n_ty)@@ -758,7 +793,7 @@ aBSENT_SUM_FIELD_ERROR_ID   = mkVanillaGlobalWithInfo absentSumFieldErrorName       (mkSpecForAllTys [alphaTyVar] (mkTyVarTy alphaTyVar)) -- forall a . a-      (vanillaIdInfo `setStrictnessInfo` mkClosedStrictSig [] exnRes+      (vanillaIdInfo `setStrictnessInfo` mkClosedStrictSig [] botRes                      `setArityInfo` 0                      `setCafInfo` NoCafRefs) -- #15038 @@ -785,14 +820,13 @@         -- any pc_bottoming_Id will itself have CafRefs, which bloats         -- SRTs. -    strict_sig = mkClosedStrictSig [evalDmd] exnRes-              -- exnRes: these throw an exception, not just diverge+    strict_sig = mkClosedStrictSig [evalDmd] botRes  runtimeErrorTy :: Type -- forall (rr :: RuntimeRep) (a :: rr). Addr# -> a --   See Note [Error and friends have an "open-tyvar" forall] runtimeErrorTy = mkSpecForAllTys [runtimeRep1TyVar, openAlphaTyVar]-                                 (mkFunTy addrPrimTy openAlphaTy)+                                 (mkVisFunTy addrPrimTy openAlphaTy)  {- Note [Error and friends have an "open-tyvar" forall] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -828,7 +862,7 @@ After some simplification, the (absentError "blah") thunk goes away.  ------ Tricky wrinkle --------Trac #14285 had, roughly+#14285 had, roughly     data T a = MkT a !a    {-# INLINABLE f #-}@@ -882,7 +916,7 @@ aBSENT_ERROR_ID  = mkVanillaGlobalWithInfo absentErrorName absent_ty arity_info  where-   absent_ty = mkSpecForAllTys [alphaTyVar] (mkFunTy addrPrimTy alphaTy)+   absent_ty = mkSpecForAllTys [alphaTyVar] (mkVisFunTy addrPrimTy alphaTy)    -- Not runtime-rep polymorphic. aBSENT_ERROR_ID is only used for    -- lifted-type things; see Note [Absent errors] in WwLib    arity_info = vanillaIdInfo `setArityInfo` 1
coreSyn/PprCore.hs view
@@ -27,7 +27,7 @@ import Demand import DataCon import TyCon-import Type+import TyCoPpr import Coercion import DynFlags import BasicTypes
− deSugar/Check.hs
@@ -1,2711 +0,0 @@-{--Author: George Karachalias <george.karachalias@cs.kuleuven.be>--Pattern Matching Coverage Checking.--}--{-# LANGUAGE CPP, GADTs, DataKinds, KindSignatures #-}-{-# LANGUAGE TupleSections #-}-{-# LANGUAGE ViewPatterns  #-}--module Check (-        -- Checking and printing-        checkSingle, checkMatches, checkGuardMatches, isAnyPmCheckEnabled,--        -- See Note [Type and Term Equality Propagation]-        genCaseTmCs1, genCaseTmCs2-    ) where--#include "HsVersions.h"--import GhcPrelude--import TmOracle-import Unify( tcMatchTy )-import DynFlags-import HsSyn-import TcHsSyn-import Id-import ConLike-import Name-import FamInstEnv-import TysPrim (tYPETyCon)-import TysWiredIn-import TyCon-import SrcLoc-import Util-import Outputable-import FastString-import DataCon-import PatSyn-import HscTypes (CompleteMatch(..))-import BasicTypes (Boxity(..))--import DsMonad-import TcSimplify    (tcCheckSatisfiability)-import TcType        (isStringTy)-import Bag-import ErrUtils-import Var           (EvVar)-import TyCoRep-import Type-import UniqSupply-import DsUtils       (isTrueLHsExpr)-import qualified GHC.LanguageExtensions as LangExt--import Data.List     (find)-import Data.Maybe    (catMaybes, isJust, fromMaybe)-import Control.Monad (forM, when, forM_, zipWithM)-import Coercion-import TcEvidence-import TcSimplify    (tcNormalise)-import IOEnv-import qualified Data.Semigroup as Semi--import ListT (ListT(..), fold, select)--{--This module checks pattern matches for:-\begin{enumerate}-  \item Equations that are redundant-  \item Equations with inaccessible right-hand-side-  \item Exhaustiveness-\end{enumerate}--The algorithm is based on the paper:--  "GADTs Meet Their Match:-     Pattern-matching Warnings That Account for GADTs, Guards, and Laziness"--    http://people.cs.kuleuven.be/~george.karachalias/papers/p424-karachalias.pdf--%************************************************************************-%*                                                                      *-                     Pattern Match Check Types-%*                                                                      *-%************************************************************************--}---- We use the non-determinism monad to apply the algorithm to several--- possible sets of constructors. Users can specify complete sets of--- constructors by using COMPLETE pragmas.--- The algorithm only picks out constructor--- sets deep in the bowels which makes a simpler `mapM` more difficult to--- implement. The non-determinism is only used in one place, see the ConVar--- case in `pmCheckHd`.--type PmM a = ListT DsM a--liftD :: DsM a -> PmM a-liftD m = ListT $ \sk fk -> m >>= \a -> sk a fk---- Pick the first match complete covered match or otherwise the "best" match.--- The best match is the one with the least uncovered clauses, ties broken--- by the number of inaccessible clauses followed by number of redundant--- clauses.------ This is specified in the--- "Disambiguating between multiple ``COMPLETE`` pragmas" section of the--- users' guide. If you update the implementation of this function, make sure--- to update that section of the users' guide as well.-getResult :: PmM PmResult -> DsM PmResult-getResult ls-  = do { res <- fold ls goM (pure Nothing)-       ; case res of-            Nothing -> panic "getResult is empty"-            Just a  -> return a }-  where-    goM :: PmResult -> DsM (Maybe PmResult) -> DsM (Maybe PmResult)-    goM mpm dpm = do { pmr <- dpm-                     ; return $ Just $ go pmr mpm }--    -- Careful not to force unecessary results-    go :: Maybe PmResult -> PmResult -> PmResult-    go Nothing rs = rs-    go (Just old@(PmResult prov rs (UncoveredPatterns us) is)) new-      | null us && null rs && null is = old-      | otherwise =-        let PmResult prov' rs' (UncoveredPatterns us') is' = new-        in case compareLength us us'-                `mappend` (compareLength is is')-                `mappend` (compareLength rs rs')-                `mappend` (compare prov prov') of-              GT  -> new-              EQ  -> new-              LT  -> old-    go (Just (PmResult _ _ (TypeOfUncovered _) _)) _new-      = panic "getResult: No inhabitation candidates"--data PatTy = PAT | VA -- Used only as a kind, to index PmPat---- The *arity* of a PatVec [p1,..,pn] is--- the number of p1..pn that are not Guards--data PmPat :: PatTy -> * where-  PmCon  :: { pm_con_con     :: ConLike-            , pm_con_arg_tys :: [Type]-            , pm_con_tvs     :: [TyVar]-            , pm_con_dicts   :: [EvVar]-            , pm_con_args    :: [PmPat t] } -> PmPat t-            -- For PmCon arguments' meaning see @ConPatOut@ in hsSyn/HsPat.hs-  PmVar  :: { pm_var_id   :: Id } -> PmPat t-  PmLit  :: { pm_lit_lit  :: PmLit } -> PmPat t -- See Note [Literals in PmPat]-  PmNLit :: { pm_lit_id   :: Id-            , pm_lit_not  :: [PmLit] } -> PmPat 'VA-  PmGrd  :: { pm_grd_pv   :: PatVec-            , pm_grd_expr :: PmExpr  } -> PmPat 'PAT--instance Outputable (PmPat a) where-  ppr = pprPmPatDebug---- data T a where---     MkT :: forall p q. (Eq p, Ord q) => p -> q -> T [p]--- or  MkT :: forall p q r. (Eq p, Ord q, [p] ~ r) => p -> q -> T r--type Pattern = PmPat 'PAT -- ^ Patterns-type ValAbs  = PmPat 'VA  -- ^ Value Abstractions--type PatVec = [Pattern]             -- ^ Pattern Vectors-data ValVec = ValVec [ValAbs] Delta -- ^ Value Vector Abstractions---- | Term and type constraints to accompany each value vector abstraction.--- For efficiency, we store the term oracle state instead of the term--- constraints. TODO: Do the same for the type constraints?-data Delta = MkDelta { delta_ty_cs :: Bag EvVar-                     , delta_tm_cs :: TmState }--type ValSetAbs = [ValVec]  -- ^ Value Set Abstractions-type Uncovered = ValSetAbs---- Instead of keeping the whole sets in memory, we keep a boolean for both the--- covered and the divergent set (we store the uncovered set though, since we--- want to print it). For both the covered and the divergent we have:------   True <=> The set is non-empty------ hence:---  C = True             ==> Useful clause (no warning)---  C = False, D = True  ==> Clause with inaccessible RHS---  C = False, D = False ==> Redundant clause--data Covered = Covered | NotCovered-  deriving Show--instance Outputable Covered where-  ppr (Covered) = text "Covered"-  ppr (NotCovered) = text "NotCovered"---- Like the or monoid for booleans--- Covered = True, Uncovered = False-instance Semi.Semigroup Covered where-  Covered <> _ = Covered-  _ <> Covered = Covered-  NotCovered <> NotCovered = NotCovered--instance Monoid Covered where-  mempty = NotCovered-  mappend = (Semi.<>)--data Diverged = Diverged | NotDiverged-  deriving Show--instance Outputable Diverged where-  ppr Diverged = text "Diverged"-  ppr NotDiverged = text "NotDiverged"--instance Semi.Semigroup Diverged where-  Diverged <> _ = Diverged-  _ <> Diverged = Diverged-  NotDiverged <> NotDiverged = NotDiverged--instance Monoid Diverged where-  mempty = NotDiverged-  mappend = (Semi.<>)---- | When we learned that a given match group is complete-data Provenance =-                  FromBuiltin -- ^  From the original definition of the type-                              --    constructor.-                | FromComplete -- ^ From a user-provided @COMPLETE@ pragma-  deriving (Show, Eq, Ord)--instance Outputable Provenance where-  ppr  = text . show--instance Semi.Semigroup Provenance where-  FromComplete <> _ = FromComplete-  _ <> FromComplete = FromComplete-  _ <> _ = FromBuiltin--instance Monoid Provenance where-  mempty = FromBuiltin-  mappend = (Semi.<>)--data PartialResult = PartialResult {-                        presultProvenance :: Provenance-                         -- keep track of provenance because we don't want-                         -- to warn about redundant matches if the result-                         -- is contaminated with a COMPLETE pragma-                      , presultCovered :: Covered-                      , presultUncovered :: Uncovered-                      , presultDivergent :: Diverged }--instance Outputable PartialResult where-  ppr (PartialResult prov c vsa d)-           = text "PartialResult" <+> ppr prov <+> ppr c-                                  <+> ppr d <+> ppr vsa---instance Semi.Semigroup PartialResult where-  (PartialResult prov1 cs1 vsa1 ds1)-    <> (PartialResult prov2 cs2 vsa2 ds2)-      = PartialResult (prov1 Semi.<> prov2)-                      (cs1 Semi.<> cs2)-                      (vsa1 Semi.<> vsa2)-                      (ds1 Semi.<> ds2)---instance Monoid PartialResult where-  mempty = PartialResult mempty mempty [] mempty-  mappend = (Semi.<>)---- newtype ChoiceOf a = ChoiceOf [a]---- | Pattern check result------ * Redundant clauses--- * Not-covered clauses (or their type, if no pattern is available)--- * Clauses with inaccessible RHS------ More details about the classification of clauses into useful, redundant--- and with inaccessible right hand side can be found here:------     https://ghc.haskell.org/trac/ghc/wiki/PatternMatchCheck----data PmResult =-  PmResult {-      pmresultProvenance   :: Provenance-    , pmresultRedundant    :: [Located [LPat GhcTc]]-    , pmresultUncovered    :: UncoveredCandidates-    , pmresultInaccessible :: [Located [LPat GhcTc]] }---- | Either a list of patterns that are not covered, or their type, in case we--- have no patterns at hand. Not having patterns at hand can arise when--- handling EmptyCase expressions, in two cases:------ * The type of the scrutinee is a trivially inhabited type (like Int or Char)--- * The type of the scrutinee cannot be reduced to WHNF.------ In both these cases we have no inhabitation candidates for the type at hand,--- but we don't want to issue just a wildcard as missing. Instead, we print a--- type annotated wildcard, so that the user knows what kind of patterns is--- expected (e.g. (_ :: Int), or (_ :: F Int), where F Int does not reduce).-data UncoveredCandidates = UncoveredPatterns Uncovered-                         | TypeOfUncovered Type---- | The empty pattern check result-emptyPmResult :: PmResult-emptyPmResult = PmResult FromBuiltin [] (UncoveredPatterns []) []---- | Non-exhaustive empty case with unknown/trivial inhabitants-uncoveredWithTy :: Type -> PmResult-uncoveredWithTy ty = PmResult FromBuiltin [] (TypeOfUncovered ty) []--{--%************************************************************************-%*                                                                      *-       Entry points to the checker: checkSingle and checkMatches-%*                                                                      *-%************************************************************************--}---- | Check a single pattern binding (let)-checkSingle :: DynFlags -> DsMatchContext -> Id -> Pat GhcTc -> DsM ()-checkSingle dflags ctxt@(DsMatchContext _ locn) var p = do-  tracePmD "checkSingle" (vcat [ppr ctxt, ppr var, ppr p])-  mb_pm_res <- tryM (getResult (checkSingle' locn var p))-  case mb_pm_res of-    Left  _   -> warnPmIters dflags ctxt-    Right res -> dsPmWarn dflags ctxt res---- | Check a single pattern binding (let)-checkSingle' :: SrcSpan -> Id -> Pat GhcTc -> PmM PmResult-checkSingle' locn var p = do-  liftD resetPmIterDs -- set the iter-no to zero-  fam_insts <- liftD dsGetFamInstEnvs-  clause    <- liftD $ translatePat fam_insts p-  missing   <- mkInitialUncovered [var]-  tracePm "checkSingle: missing" (vcat (map pprValVecDebug missing))-                                 -- no guards-  PartialResult prov cs us ds <- runMany (pmcheckI clause []) missing-  let us' = UncoveredPatterns us-  return $ case (cs,ds) of-    (Covered,  _    )         -> PmResult prov [] us' [] -- useful-    (NotCovered, NotDiverged) -> PmResult prov m  us' [] -- redundant-    (NotCovered, Diverged )   -> PmResult prov [] us' m  -- inaccessible rhs-  where m = [cL locn [cL locn p]]---- | Exhaustive for guard matches, is used for guards in pattern bindings and--- in @MultiIf@ expressions.-checkGuardMatches :: HsMatchContext Name          -- Match context-                  -> GRHSs GhcTc (LHsExpr GhcTc)  -- Guarded RHSs-                  -> DsM ()-checkGuardMatches hs_ctx guards@(GRHSs _ grhss _) = do-    dflags <- getDynFlags-    let combinedLoc = foldl1 combineSrcSpans (map getLoc grhss)-        dsMatchContext = DsMatchContext hs_ctx combinedLoc-        match = cL combinedLoc $-                  Match { m_ext = noExt-                        , m_ctxt = hs_ctx-                        , m_pats = []-                        , m_grhss = guards }-    checkMatches dflags dsMatchContext [] [match]-checkGuardMatches _ (XGRHSs _) = panic "checkGuardMatches"---- | Check a matchgroup (case, functions, etc.)-checkMatches :: DynFlags -> DsMatchContext-             -> [Id] -> [LMatch GhcTc (LHsExpr GhcTc)] -> DsM ()-checkMatches dflags ctxt vars matches = do-  tracePmD "checkMatches" (hang (vcat [ppr ctxt-                               , ppr vars-                               , text "Matches:"])-                               2-                               (vcat (map ppr matches)))-  mb_pm_res <- tryM $ getResult $ case matches of-    -- Check EmptyCase separately-    -- See Note [Checking EmptyCase Expressions]-    [] | [var] <- vars -> checkEmptyCase' var-    _normal_match      -> checkMatches' vars matches-  case mb_pm_res of-    Left  _   -> warnPmIters dflags ctxt-    Right res -> dsPmWarn dflags ctxt res---- | Check a matchgroup (case, functions, etc.). To be called on a non-empty--- list of matches. For empty case expressions, use checkEmptyCase' instead.-checkMatches' :: [Id] -> [LMatch GhcTc (LHsExpr GhcTc)] -> PmM PmResult-checkMatches' vars matches-  | null matches = panic "checkMatches': EmptyCase"-  | otherwise = do-      liftD resetPmIterDs -- set the iter-no to zero-      missing    <- mkInitialUncovered vars-      tracePm "checkMatches': missing" (vcat (map pprValVecDebug missing))-      (prov, rs,us,ds) <- go matches missing-      return $ PmResult {-                   pmresultProvenance   = prov-                 , pmresultRedundant    = map hsLMatchToLPats rs-                 , pmresultUncovered    = UncoveredPatterns us-                 , pmresultInaccessible = map hsLMatchToLPats ds }-  where-    go :: [LMatch GhcTc (LHsExpr GhcTc)] -> Uncovered-       -> PmM (Provenance-              , [LMatch GhcTc (LHsExpr GhcTc)]-              , Uncovered-              , [LMatch GhcTc (LHsExpr GhcTc)])-    go []     missing = return (mempty, [], missing, [])-    go (m:ms) missing = do-      tracePm "checMatches': go" (ppr m $$ ppr missing)-      fam_insts          <- liftD dsGetFamInstEnvs-      (clause, guards)   <- liftD $ translateMatch fam_insts m-      r@(PartialResult prov cs missing' ds)-        <- runMany (pmcheckI clause guards) missing-      tracePm "checMatches': go: res" (ppr r)-      (ms_prov, rs, final_u, is)  <- go ms missing'-      let final_prov = prov `mappend` ms_prov-      return $ case (cs, ds) of-        -- useful-        (Covered,  _    )        -> (final_prov,  rs, final_u,   is)-        -- redundant-        (NotCovered, NotDiverged) -> (final_prov, m:rs, final_u,is)-        -- inaccessible-        (NotCovered, Diverged )   -> (final_prov,  rs, final_u, m:is)--    hsLMatchToLPats :: LMatch id body -> Located [LPat id]-    hsLMatchToLPats (dL->L l (Match { m_pats = pats })) = cL l pats-    hsLMatchToLPats _                                   = panic "checMatches'"---- | Check an empty case expression. Since there are no clauses to process, we---   only compute the uncovered set. See Note [Checking EmptyCase Expressions]---   for details.-checkEmptyCase' :: Id -> PmM PmResult-checkEmptyCase' var = do-  tm_ty_css     <- pmInitialTmTyCs-  mb_candidates <- inhabitationCandidates (delta_ty_cs tm_ty_css) (idType var)-  case mb_candidates of-    -- Inhabitation checking failed / the type is trivially inhabited-    Left ty -> return (uncoveredWithTy ty)--    -- A list of inhabitant candidates is available: Check for each-    -- one for the satisfiability of the constraints it gives rise to.-    Right (_, candidates) -> do-      missing_m <- flip mapMaybeM candidates $-          \InhabitationCandidate{ ic_val_abs = va, ic_tm_ct = tm_ct-                                , ic_ty_cs = ty_cs-                                , ic_strict_arg_tys = strict_arg_tys } -> do-        mb_sat <- pmIsSatisfiable tm_ty_css tm_ct ty_cs strict_arg_tys-        pure $ fmap (ValVec [va]) mb_sat-      return $ if null missing_m-        then emptyPmResult-        else PmResult FromBuiltin [] (UncoveredPatterns missing_m) []---- | Returns 'True' if the argument 'Type' is a fully saturated application of--- a closed type constructor.------ Closed type constructors are those with a fixed right hand side, as--- opposed to e.g. associated types. These are of particular interest for--- pattern-match coverage checking, because GHC can exhaustively consider all--- possible forms that values of a closed type can take on.------ Note that this function is intended to be used to check types of value-level--- patterns, so as a consequence, the 'Type' supplied as an argument to this--- function should be of kind @Type@.-pmIsClosedType :: Type -> Bool-pmIsClosedType ty-  = case splitTyConApp_maybe ty of-      Just (tc, ty_args)-             | is_algebraic_like tc && not (isFamilyTyCon tc)-             -> ASSERT2( ty_args `lengthIs` tyConArity tc, ppr ty ) True-      _other -> False-  where-    -- This returns True for TyCons which /act like/ algebraic types.-    -- (See "Type#type_classification" for what an algebraic type is.)-    ---    -- This is qualified with \"like\" because of a particular special-    -- case: TYPE (the underlyind kind behind Type, among others). TYPE-    -- is conceptually a datatype (and thus algebraic), but in practice it is-    -- a primitive builtin type, so we must check for it specially.-    ---    -- NB: it makes sense to think of TYPE as a closed type in a value-level,-    -- pattern-matching context. However, at the kind level, TYPE is certainly-    -- not closed! Since this function is specifically tailored towards pattern-    -- matching, however, it's OK to label TYPE as closed.-    is_algebraic_like :: TyCon -> Bool-    is_algebraic_like tc = isAlgTyCon tc || tc == tYPETyCon--pmTopNormaliseType_maybe :: FamInstEnvs -> Bag EvVar -> Type-                         -> PmM (Maybe (Type, [DataCon], Type))--- ^ Get rid of *outermost* (or toplevel)---      * type function redex---      * data family redex---      * newtypes------ Behaves exactly like `topNormaliseType_maybe`, but instead of returning a--- coercion, it returns useful information for issuing pattern matching--- warnings. See Note [Type normalisation for EmptyCase] for details.------ NB: Normalisation can potentially change kinds, if the head of the type--- is a type family with a variable result kind. I (Richard E) can't think--- of a way to cause trouble here, though.-pmTopNormaliseType_maybe env ty_cs typ-  = do (_, mb_typ') <- liftD $ initTcDsForSolver $ tcNormalise ty_cs typ-         -- Before proceeding, we chuck typ into the constraint solver, in case-         -- solving for given equalities may reduce typ some. See-         -- "Wrinkle: local equalities" in-         -- Note [Type normalisation for EmptyCase].-       pure $ do typ' <- mb_typ'-                 ((ty_f,tm_f), ty) <- topNormaliseTypeX stepper comb typ'-                 -- We need to do topNormaliseTypeX in addition to tcNormalise,-                 -- since topNormaliseX looks through newtypes, which-                 -- tcNormalise does not do.-                 Just (eq_src_ty ty (typ' : ty_f [ty]), tm_f [], ty)-  where-    -- Find the first type in the sequence of rewrites that is a data type,-    -- newtype, or a data family application (not the representation tycon!).-    -- This is the one that is equal (in source Haskell) to the initial type.-    -- If none is found in the list, then all of them are type family-    -- applications, so we simply return the last one, which is the *simplest*.-    eq_src_ty :: Type -> [Type] -> Type-    eq_src_ty ty tys = maybe ty id (find is_closed_or_data_family tys)--    is_closed_or_data_family :: Type -> Bool-    is_closed_or_data_family ty = pmIsClosedType ty || isDataFamilyAppType ty--    -- For efficiency, represent both lists as difference lists.-    -- comb performs the concatenation, for both lists.-    comb (tyf1, tmf1) (tyf2, tmf2) = (tyf1 . tyf2, tmf1 . tmf2)--    stepper = newTypeStepper `composeSteppers` tyFamStepper--    -- A 'NormaliseStepper' that unwraps newtypes, careful not to fall into-    -- a loop. If it would fall into a loop, it produces 'NS_Abort'.-    newTypeStepper :: NormaliseStepper ([Type] -> [Type],[DataCon] -> [DataCon])-    newTypeStepper rec_nts tc tys-      | Just (ty', _co) <- instNewTyCon_maybe tc tys-      = case checkRecTc rec_nts tc of-          Just rec_nts' -> let tyf = ((TyConApp tc tys):)-                               tmf = ((tyConSingleDataCon tc):)-                           in  NS_Step rec_nts' ty' (tyf, tmf)-          Nothing       -> NS_Abort-      | otherwise-      = NS_Done--    tyFamStepper :: NormaliseStepper ([Type] -> [Type], [DataCon] -> [DataCon])-    tyFamStepper rec_nts tc tys  -- Try to step a type/data family-      = let (_args_co, ntys, _res_co) = normaliseTcArgs env Representational tc tys in-          -- NB: It's OK to use normaliseTcArgs here instead of-          -- normalise_tc_args (which takes the LiftingContext described-          -- in Note [Normalising types]) because the reduceTyFamApp below-          -- works only at top level. We'll never recur in this function-          -- after reducing the kind of a bound tyvar.--        case reduceTyFamApp_maybe env Representational tc ntys of-          Just (_co, rhs) -> NS_Step rec_nts rhs ((rhs:), id)-          _               -> NS_Done---- | Determine suitable constraints to use at the beginning of pattern-match--- coverage checking by consulting the sets of term and type constraints--- currently in scope. If one of these sets of constraints is unsatisfiable,--- use an empty set in its place. (See--- @Note [Recovering from unsatisfiable pattern-matching constraints]@--- for why this is done.)-pmInitialTmTyCs :: PmM Delta-pmInitialTmTyCs = do-  ty_cs  <- liftD getDictsDs-  tm_cs  <- map toComplex . bagToList <$> liftD getTmCsDs-  sat_ty <- tyOracle ty_cs-  let initTyCs = if sat_ty then ty_cs else emptyBag-      initTmState = fromMaybe initialTmState (tmOracle initialTmState tm_cs)-  pure $ MkDelta{ delta_tm_cs = initTmState, delta_ty_cs = initTyCs }--{--Note [Recovering from unsatisfiable pattern-matching constraints]-~~~~~~~~~~~~~~~~-Consider the following code (see #12957 and #15450):--  f :: Int ~ Bool => ()-  f = case True of { False -> () }--We want to warn that the pattern-matching in `f` is non-exhaustive. But GHC-used not to do this; in fact, it would warn that the match was /redundant/!-This is because the constraint (Int ~ Bool) in `f` is unsatisfiable, and the-coverage checker deems any matches with unsatifiable constraint sets to be-unreachable.--We decide to better than this. When beginning coverage checking, we first-check if the constraints in scope are unsatisfiable, and if so, we start-afresh with an empty set of constraints. This way, we'll get the warnings-that we expect.--}---- | Given a conlike's term constraints, type constraints, and strict argument--- types, check if they are satisfiable.--- (In other words, this is the ⊢_Sat oracle judgment from the GADTs Meet--- Their Match paper.)------ For the purposes of efficiency, this takes as separate arguments the--- ambient term and type constraints (which are known beforehand to be--- satisfiable), as well as the new term and type constraints (which may not--- be satisfiable). This lets us implement two mini-optimizations:------ * If there are no new type constraints, then don't bother initializing---   the type oracle, since it's redundant to do so.--- * Since the new term constraint is a separate argument, we only need to---   execute one iteration of the term oracle (instead of traversing the---   entire set of term constraints).------ Taking strict argument types into account is something which was not--- discussed in GADTs Meet Their Match. For an explanation of what role they--- serve, see @Note [Extensions to GADTs Meet Their Match]@.-pmIsSatisfiable-  :: Delta     -- ^ The ambient term and type constraints-               --   (known to be satisfiable).-  -> ComplexEq -- ^ The new term constraint.-  -> Bag EvVar -- ^ The new type constraints.-  -> [Type]    -- ^ The strict argument types.-  -> PmM (Maybe Delta)-               -- ^ @'Just' delta@ if the constraints (@delta@) are-               -- satisfiable, and each strict argument type is inhabitable.-               -- 'Nothing' otherwise.-pmIsSatisfiable amb_cs new_tm_c new_ty_cs strict_arg_tys = do-  mb_sat <- tmTyCsAreSatisfiable amb_cs new_tm_c new_ty_cs-  case mb_sat of-    Nothing -> pure Nothing-    Just delta -> do-      -- We know that the term and type constraints are inhabitable, so now-      -- check if each strict argument type is inhabitable.-      all_non_void <- checkAllNonVoid initRecTc delta strict_arg_tys-      pure $ if all_non_void -- Check if each strict argument type-                             -- is inhabitable-                then Just delta-                else Nothing---- | Like 'pmIsSatisfiable', but only checks if term and type constraints are--- satisfiable, and doesn't bother checking anything related to strict argument--- types.-tmTyCsAreSatisfiable-  :: Delta     -- ^ The ambient term and type constraints-               --   (known to be satisfiable).-  -> ComplexEq -- ^ The new term constraint.-  -> Bag EvVar -- ^ The new type constraints.-  -> PmM (Maybe Delta)-       -- ^ @'Just' delta@ if the constraints (@delta@) are-       -- satisfiable. 'Nothing' otherwise.-tmTyCsAreSatisfiable-    (MkDelta{ delta_tm_cs = amb_tm_cs, delta_ty_cs = amb_ty_cs })-    new_tm_c new_ty_cs = do-  let ty_cs = new_ty_cs `unionBags` amb_ty_cs-  sat_ty <- if isEmptyBag new_ty_cs-               then pure True-               else tyOracle ty_cs-  pure $ case (sat_ty, solveOneEq amb_tm_cs new_tm_c) of-           (True, Just term_cs) -> Just $ MkDelta{ delta_ty_cs = ty_cs-                                                 , delta_tm_cs = term_cs }-           _unsat               -> Nothing---- | Implements two performance optimizations, as described in the--- \"Strict argument type constraints\" section of--- @Note [Extensions to GADTs Meet Their Match]@.-checkAllNonVoid :: RecTcChecker -> Delta -> [Type] -> PmM Bool-checkAllNonVoid rec_ts amb_cs strict_arg_tys = do-  fam_insts <- liftD dsGetFamInstEnvs-  let definitely_inhabited =-        definitelyInhabitedType fam_insts (delta_ty_cs amb_cs)-  tys_to_check <- filterOutM definitely_inhabited strict_arg_tys-  let rec_max_bound | tys_to_check `lengthExceeds` 1-                    = 1-                    | otherwise-                    = defaultRecTcMaxBound-      rec_ts' = setRecTcMaxBound rec_max_bound rec_ts-  allM (nonVoid rec_ts' amb_cs) tys_to_check---- | Checks if a strict argument type of a conlike is inhabitable by a--- terminating value (i.e, an 'InhabitationCandidate').--- See @Note [Extensions to GADTs Meet Their Match]@.-nonVoid-  :: RecTcChecker -- ^ The per-'TyCon' recursion depth limit.-  -> Delta        -- ^ The ambient term/type constraints (known to be-                  --   satisfiable).-  -> Type         -- ^ The strict argument type.-  -> PmM Bool     -- ^ 'True' if the strict argument type might be inhabited by-                  --   a terminating value (i.e., an 'InhabitationCandidate').-                  --   'False' if it is definitely uninhabitable by anything-                  --   (except bottom).-nonVoid rec_ts amb_cs strict_arg_ty = do-  mb_cands <- inhabitationCandidates (delta_ty_cs amb_cs) strict_arg_ty-  case mb_cands of-    Right (tc, cands)-      |  Just rec_ts' <- checkRecTc rec_ts tc-      -> anyM (cand_is_inhabitable rec_ts' amb_cs) cands-           -- A strict argument type is inhabitable by a terminating value if-           -- at least one InhabitationCandidate is inhabitable.-    _ -> pure True-           -- Either the type is trivially inhabited or we have exceeded the-           -- recursion depth for some TyCon (so bail out and conservatively-           -- claim the type is inhabited).-  where-    -- Checks if an InhabitationCandidate for a strict argument type:-    ---    -- (1) Has satisfiable term and type constraints.-    -- (2) Has 'nonVoid' strict argument types (we bail out of this-    --     check if recursion is detected).-    ---    -- See Note [Extensions to GADTs Meet Their Match]-    cand_is_inhabitable :: RecTcChecker -> Delta-                        -> InhabitationCandidate -> PmM Bool-    cand_is_inhabitable rec_ts amb_cs-      (InhabitationCandidate{ ic_tm_ct          = new_term_c-                            , ic_ty_cs          = new_ty_cs-                            , ic_strict_arg_tys = new_strict_arg_tys }) = do-        mb_sat <- tmTyCsAreSatisfiable amb_cs new_term_c new_ty_cs-        case mb_sat of-          Nothing -> pure False-          Just new_delta -> do-            checkAllNonVoid rec_ts new_delta new_strict_arg_tys---- | @'definitelyInhabitedType' ty@ returns 'True' if @ty@ has at least one--- constructor @C@ such that:------ 1. @C@ has no equality constraints.--- 2. @C@ has no strict argument types.------ See the \"Strict argument type constraints\" section of--- @Note [Extensions to GADTs Meet Their Match]@.-definitelyInhabitedType :: FamInstEnvs -> Bag EvVar -> Type -> PmM Bool-definitelyInhabitedType env ty_cs ty = do-  mb_res <- pmTopNormaliseType_maybe env ty_cs ty-  pure $ case mb_res of-           Just (_, cons, _) -> any meets_criteria cons-           Nothing           -> False-  where-    meets_criteria :: DataCon -> Bool-    meets_criteria con =-      null (dataConEqSpec con) && -- (1)-      null (dataConImplBangs con) -- (2)--{- Note [Type normalisation for EmptyCase]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-EmptyCase is an exception for pattern matching, since it is strict. This means-that it boils down to checking whether the type of the scrutinee is inhabited.-Function pmTopNormaliseType_maybe gets rid of the outermost type function/data-family redex and newtypes, in search of an algebraic type constructor, which is-easier to check for inhabitation.--It returns 3 results instead of one, because there are 2 subtle points:-1. Newtypes are isomorphic to the underlying type in core but not in the source-   language,-2. The representational data family tycon is used internally but should not be-   shown to the user--Hence, if pmTopNormaliseType_maybe env ty_cs ty = Just (src_ty, dcs, core_ty),-then-  (a) src_ty is the rewritten type which we can show to the user. That is, the-      type we get if we rewrite type families but not data families or-      newtypes.-  (b) dcs is the list of data constructors "skipped", every time we normalise a-      newtype to its core representation, we keep track of the source data-      constructor.-  (c) core_ty is the rewritten type. That is,-        pmTopNormaliseType_maybe env ty_cs ty = Just (src_ty, dcs, core_ty)-      implies-        topNormaliseType_maybe env ty = Just (co, core_ty)-      for some coercion co.--To see how all cases come into play, consider the following example:--  data family T a :: *-  data instance T Int = T1 | T2 Bool-  -- Which gives rise to FC:-  --   data T a-  --   data R:TInt = T1 | T2 Bool-  --   axiom ax_ti : T Int ~R R:TInt--  newtype G1 = MkG1 (T Int)-  newtype G2 = MkG2 G1--  type instance F Int  = F Char-  type instance F Char = G2--In this case pmTopNormaliseType_maybe env ty_cs (F Int) results in--  Just (G2, [MkG2,MkG1], R:TInt)--Which means that in source Haskell:-  - G2 is equivalent to F Int (in contrast, G1 isn't).-  - if (x : R:TInt) then (MkG2 (MkG1 x) : F Int).---------- Wrinkle: Local equalities--------Given the following type family:--  type family F a-  type instance F Int = Void--Should the following program (from #14813) be considered exhaustive?--  f :: (i ~ Int) => F i -> a-  f x = case x of {}--You might think "of course, since `x` is obviously of type Void". But the-idType of `x` is technically F i, not Void, so if we pass F i to-inhabitationCandidates, we'll mistakenly conclude that `f` is non-exhaustive.-In order to avoid this pitfall, we need to normalise the type passed to-pmTopNormaliseType_maybe, using the constraint solver to solve for any local-equalities (such as i ~ Int) that may be in scope.--}---- | Generate all 'InhabitationCandidate's for a given type. The result is--- either @'Left' ty@, if the type cannot be reduced to a closed algebraic type--- (or if it's one trivially inhabited, like 'Int'), or @'Right' candidates@,--- if it can. In this case, the candidates are the signature of the tycon, each--- one accompanied by the term- and type- constraints it gives rise to.--- See also Note [Checking EmptyCase Expressions]-inhabitationCandidates :: Bag EvVar -> Type-                       -> PmM (Either Type (TyCon, [InhabitationCandidate]))-inhabitationCandidates ty_cs ty = do-  fam_insts   <- liftD dsGetFamInstEnvs-  mb_norm_res <- pmTopNormaliseType_maybe fam_insts ty_cs ty-  case mb_norm_res of-    Just (src_ty, dcs, core_ty) -> alts_to_check src_ty core_ty dcs-    Nothing                     -> alts_to_check ty     ty      []-  where-    -- All these types are trivially inhabited-    trivially_inhabited = [ charTyCon, doubleTyCon, floatTyCon-                          , intTyCon, wordTyCon, word8TyCon ]--    -- Note: At the moment we leave all the typing and constraint fields of-    -- PmCon empty, since we know that they are not gonna be used. Is the-    -- right-thing-to-do to actually create them, even if they are never used?-    build_tm :: ValAbs -> [DataCon] -> ValAbs-    build_tm = foldr (\dc e -> PmCon (RealDataCon dc) [] [] [] [e])--    -- Inhabitation candidates, using the result of pmTopNormaliseType_maybe-    alts_to_check :: Type -> Type -> [DataCon]-                  -> PmM (Either Type (TyCon, [InhabitationCandidate]))-    alts_to_check src_ty core_ty dcs = case splitTyConApp_maybe core_ty of-      Just (tc, tc_args)-        |  tc `elem` trivially_inhabited-        -> case dcs of-             []    -> return (Left src_ty)-             (_:_) -> do var <- liftD $ mkPmId core_ty-                         let va = build_tm (PmVar var) dcs-                         return $ Right (tc, [InhabitationCandidate-                           { ic_val_abs = va, ic_tm_ct = mkIdEq var-                           , ic_ty_cs = emptyBag, ic_strict_arg_tys = [] }])--        |  pmIsClosedType core_ty && not (isAbstractTyCon tc)-           -- Don't consider abstract tycons since we don't know what their-           -- constructors are, which makes the results of coverage checking-           -- them extremely misleading.-        -> liftD $ do-             var  <- mkPmId core_ty -- it would be wrong to unify x-             alts <- mapM (mkOneConFull var tc_args . RealDataCon) (tyConDataCons tc)-             return $ Right-               (tc, [ alt{ic_val_abs = build_tm (ic_val_abs alt) dcs}-                    | alt <- alts ])-      -- For other types conservatively assume that they are inhabited.-      _other -> return (Left src_ty)--{- Note [Checking EmptyCase Expressions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Empty case expressions are strict on the scrutinee. That is, `case x of {}`-will force argument `x`. Hence, `checkMatches` is not sufficient for checking-empty cases, because it assumes that the match is not strict (which is true-for all other cases, apart from EmptyCase). This gave rise to #10746. Instead,-we do the following:--1. We normalise the outermost type family redex, data family redex or newtype,-   using pmTopNormaliseType_maybe (in types/FamInstEnv.hs). This computes 3-   things:-   (a) A normalised type src_ty, which is equal to the type of the scrutinee in-       source Haskell (does not normalise newtypes or data families)-   (b) The actual normalised type core_ty, which coincides with the result-       topNormaliseType_maybe. This type is not necessarily equal to the input-       type in source Haskell. And this is precicely the reason we compute (a)-       and (c): the reasoning happens with the underlying types, but both the-       patterns and types we print should respect newtypes and also show the-       family type constructors and not the representation constructors.--   (c) A list of all newtype data constructors dcs, each one corresponding to a-       newtype rewrite performed in (b).--   For an example see also Note [Type normalisation for EmptyCase]-   in types/FamInstEnv.hs.--2. Function checkEmptyCase' performs the check:-   - If core_ty is not an algebraic type, then we cannot check for-     inhabitation, so we emit (_ :: src_ty) as missing, conservatively assuming-     that the type is inhabited.-   - If core_ty is an algebraic type, then we unfold the scrutinee to all-     possible constructor patterns, using inhabitationCandidates, and then-     check each one for constraint satisfiability, same as we for normal-     pattern match checking.--%************************************************************************-%*                                                                      *-              Transform source syntax to *our* syntax-%*                                                                      *-%************************************************************************--}---- -------------------------------------------------------------------------- * Utilities--nullaryConPattern :: ConLike -> Pattern--- Nullary data constructor and nullary type constructor-nullaryConPattern con =-  PmCon { pm_con_con = con, pm_con_arg_tys = []-        , pm_con_tvs = [], pm_con_dicts = [], pm_con_args = [] }-{-# INLINE nullaryConPattern #-}--truePattern :: Pattern-truePattern = nullaryConPattern (RealDataCon trueDataCon)-{-# INLINE truePattern #-}---- | A fake guard pattern (True <- _) used to represent cases we cannot handle-fake_pat :: Pattern-fake_pat = PmGrd { pm_grd_pv   = [truePattern]-                 , pm_grd_expr = PmExprOther (EWildPat noExt) }-{-# INLINE fake_pat #-}---- | Check whether a guard pattern is generated by the checker (unhandled)-isFakeGuard :: [Pattern] -> PmExpr -> Bool-isFakeGuard [PmCon { pm_con_con = RealDataCon c }] (PmExprOther (EWildPat _))-  | c == trueDataCon = True-  | otherwise        = False-isFakeGuard _pats _e = False---- | Generate a `canFail` pattern vector of a specific type-mkCanFailPmPat :: Type -> DsM PatVec-mkCanFailPmPat ty = do-  var <- mkPmVar ty-  return [var, fake_pat]--vanillaConPattern :: ConLike -> [Type] -> PatVec -> Pattern--- ADT constructor pattern => no existentials, no local constraints-vanillaConPattern con arg_tys args =-  PmCon { pm_con_con = con, pm_con_arg_tys = arg_tys-        , pm_con_tvs = [], pm_con_dicts = [], pm_con_args = args }-{-# INLINE vanillaConPattern #-}---- | Create an empty list pattern of a given type-nilPattern :: Type -> Pattern-nilPattern ty =-  PmCon { pm_con_con = RealDataCon nilDataCon, pm_con_arg_tys = [ty]-        , pm_con_tvs = [], pm_con_dicts = []-        , pm_con_args = [] }-{-# INLINE nilPattern #-}--mkListPatVec :: Type -> PatVec -> PatVec -> PatVec-mkListPatVec ty xs ys = [PmCon { pm_con_con = RealDataCon consDataCon-                               , pm_con_arg_tys = [ty]-                               , pm_con_tvs = [], pm_con_dicts = []-                               , pm_con_args = xs++ys }]-{-# INLINE mkListPatVec #-}---- | Create a (non-overloaded) literal pattern-mkLitPattern :: HsLit GhcTc -> Pattern-mkLitPattern lit = PmLit { pm_lit_lit = PmSLit lit }-{-# INLINE mkLitPattern #-}---- -------------------------------------------------------------------------- * Transform (Pat Id) into of (PmPat Id)--translatePat :: FamInstEnvs -> Pat GhcTc -> DsM PatVec-translatePat fam_insts pat = case pat of-  WildPat  ty  -> mkPmVars [ty]-  VarPat _ id  -> return [PmVar (unLoc id)]-  ParPat _ p   -> translatePat fam_insts (unLoc p)-  LazyPat _ _  -> mkPmVars [hsPatType pat] -- like a variable--  -- ignore strictness annotations for now-  BangPat _ p  -> translatePat fam_insts (unLoc p)--  AsPat _ lid p -> do-     -- Note [Translating As Patterns]-    ps <- translatePat fam_insts (unLoc p)-    let [e] = map vaToPmExpr (coercePatVec ps)-        g   = PmGrd [PmVar (unLoc lid)] e-    return (ps ++ [g])--  SigPat _ p _ty -> translatePat fam_insts (unLoc p)--  -- See Note [Translate CoPats]-  CoPat _ wrapper p ty-    | isIdHsWrapper wrapper                   -> translatePat fam_insts p-    | WpCast co <-  wrapper, isReflexiveCo co -> translatePat fam_insts p-    | otherwise -> do-        ps      <- translatePat fam_insts p-        (xp,xe) <- mkPmId2Forms ty-        let g = mkGuard ps (mkHsWrap wrapper (unLoc xe))-        return [xp,g]--  -- (n + k)  ===>   x (True <- x >= k) (n <- x-k)-  NPlusKPat ty (dL->L _ _n) _k1 _k2 _ge _minus -> mkCanFailPmPat ty--  -- (fun -> pat)   ===>   x (pat <- fun x)-  ViewPat arg_ty lexpr lpat -> do-    ps <- translatePat fam_insts (unLoc lpat)-    -- See Note [Guards and Approximation]-    case all cantFailPattern ps of-      True  -> do-        (xp,xe) <- mkPmId2Forms arg_ty-        let g = mkGuard ps (HsApp noExt lexpr xe)-        return [xp,g]-      False -> mkCanFailPmPat arg_ty--  -- list-  ListPat (ListPatTc ty Nothing) ps -> do-    foldr (mkListPatVec ty) [nilPattern ty]-      <$> translatePatVec fam_insts (map unLoc ps)--  -- overloaded list-  ListPat (ListPatTc _elem_ty (Just (pat_ty, _to_list))) lpats -> do-    dflags <- getDynFlags-    if xopt LangExt.RebindableSyntax dflags-       then mkCanFailPmPat pat_ty-       else case splitListTyConApp_maybe pat_ty of-              Just e_ty -> translatePat fam_insts-                                        (ListPat (ListPatTc e_ty Nothing) lpats)-              Nothing   -> mkCanFailPmPat pat_ty-    -- (a) In the presence of RebindableSyntax, we don't know anything about-    --     `toList`, we should treat `ListPat` as any other view pattern.-    ---    -- (b) In the absence of RebindableSyntax,-    --     - If the pat_ty is `[a]`, then we treat the overloaded list pattern-    --       as ordinary list pattern. Although we can give an instance-    --       `IsList [Int]` (more specific than the default `IsList [a]`), in-    --       practice, we almost never do that. We assume the `_to_list` is-    --       the `toList` from `instance IsList [a]`.-    ---    --     - Otherwise, we treat the `ListPat` as ordinary view pattern.-    ---    -- See Trac #14547, especially comment#9 and comment#10.-    ---    -- Here we construct CanFailPmPat directly, rather can construct a view-    -- pattern and do further translation as an optimization, for the reason,-    -- see Note [Guards and Approximation].--  ConPatOut { pat_con     = (dL->L _ con)-            , pat_arg_tys = arg_tys-            , pat_tvs     = ex_tvs-            , pat_dicts   = dicts-            , pat_args    = ps } -> do-    groups <- allCompleteMatches con arg_tys-    case groups of-      [] -> mkCanFailPmPat (conLikeResTy con arg_tys)-      _  -> do-        args <- translateConPatVec fam_insts arg_tys ex_tvs con ps-        return [PmCon { pm_con_con     = con-                      , pm_con_arg_tys = arg_tys-                      , pm_con_tvs     = ex_tvs-                      , pm_con_dicts   = dicts-                      , pm_con_args    = args }]--  -- See Note [Translate Overloaded Literal for Exhaustiveness Checking]-  NPat _ (dL->L _ olit) mb_neg _-    | OverLit (OverLitTc False ty) (HsIsString src s) _ <- olit-    , isStringTy ty ->-        foldr (mkListPatVec charTy) [nilPattern charTy] <$>-          translatePatVec fam_insts-            (map (LitPat noExt . HsChar src) (unpackFS s))-    | otherwise -> return [PmLit { pm_lit_lit = PmOLit (isJust mb_neg) olit }]--  -- See Note [Translate Overloaded Literal for Exhaustiveness Checking]-  LitPat _ lit-    | HsString src s <- lit ->-        foldr (mkListPatVec charTy) [nilPattern charTy] <$>-          translatePatVec fam_insts-            (map (LitPat noExt . HsChar src) (unpackFS s))-    | otherwise -> return [mkLitPattern lit]--  TuplePat tys ps boxity -> do-    tidy_ps <- translatePatVec fam_insts (map unLoc ps)-    let tuple_con = RealDataCon (tupleDataCon boxity (length ps))-        tys' = case boxity of-                 Boxed -> tys-                 -- See Note [Unboxed tuple RuntimeRep vars] in TyCon-                 Unboxed -> map getRuntimeRep tys ++ tys-    return [vanillaConPattern tuple_con tys' (concat tidy_ps)]--  SumPat ty p alt arity -> do-    tidy_p <- translatePat fam_insts (unLoc p)-    let sum_con = RealDataCon (sumDataCon alt arity)-    -- See Note [Unboxed tuple RuntimeRep vars] in TyCon-    return [vanillaConPattern sum_con (map getRuntimeRep ty ++ ty) tidy_p]--  -- ---------------------------------------------------------------------------  -- Not supposed to happen-  ConPatIn  {} -> panic "Check.translatePat: ConPatIn"-  SplicePat {} -> panic "Check.translatePat: SplicePat"-  XPat      {} -> panic "Check.translatePat: XPat"--{- Note [Translate Overloaded Literal for Exhaustiveness Checking]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The translation of @NPat@ in exhaustiveness checker is a bit different-from translation in pattern matcher.--  * In pattern matcher (see `tidyNPat' in deSugar/MatchLit.hs), we-    translate integral literals to HsIntPrim or HsWordPrim and translate-    overloaded strings to HsString.--  * In exhaustiveness checker, in `genCaseTmCs1/genCaseTmCs2`, we use-    `lhsExprToPmExpr` to generate uncovered set. In `hsExprToPmExpr`,-    however we generate `PmOLit` for HsOverLit, rather than refine-    `HsOverLit` inside `NPat` to HsIntPrim/HsWordPrim. If we do-    the same thing in `translatePat` as in `tidyNPat`, the exhaustiveness-    checker will fail to match the literals patterns correctly. See-    Trac #14546.--  In Note [Undecidable Equality for Overloaded Literals], we say: "treat-  overloaded literals that look different as different", but previously we-  didn't do such things.--  Now, we translate the literal value to match and the literal patterns-  consistently:--  * For integral literals, we parse both the integral literal value and-    the patterns as OverLit HsIntegral. For example:--      case 0::Int of-          0 -> putStrLn "A"-          1 -> putStrLn "B"-          _ -> putStrLn "C"--    When checking the exhaustiveness of pattern matching, we translate the 0-    in value position as PmOLit, but translate the 0 and 1 in pattern position-    as PmSLit. The inconsistency leads to the failure of eqPmLit to detect the-    equality and report warning of "Pattern match is redundant" on pattern 0,-    as reported in Trac #14546. In this patch we remove the specialization of-    OverLit patterns, and keep the overloaded number literal in pattern as it-    is to maintain the consistency. We know nothing about the `fromInteger`-    method (see Note [Undecidable Equality for Overloaded Literals]). Now we-    can capture the exhaustiveness of pattern 0 and the redundancy of pattern-    1 and _.--  * For string literals, we parse the string literals as HsString. When-    OverloadedStrings is enabled, it further be turned as HsOverLit HsIsString.-    For example:--      case "foo" of-          "foo" -> putStrLn "A"-          "bar" -> putStrLn "B"-          "baz" -> putStrLn "C"--    Previously, the overloaded string values are translated to PmOLit and the-    non-overloaded string values are translated to PmSLit. However the string-    patterns, both overloaded and non-overloaded, are translated to list of-    characters. The inconsistency leads to wrong warnings about redundant and-    non-exhaustive pattern matching warnings, as reported in Trac #14546.--    In order to catch the redundant pattern in following case:--      case "foo" of-          ('f':_) -> putStrLn "A"-          "bar" -> putStrLn "B"--    in this patch, we translate non-overloaded string literals, both in value-    position and pattern position, as list of characters. For overloaded string-    literals, we only translate it to list of characters only when it's type-    is stringTy, since we know nothing about the toString methods. But we know-    that if two overloaded strings are syntax equal, then they are equal. Then-    if it's type is not stringTy, we just translate it to PmOLit. We can still-    capture the exhaustiveness of pattern "foo" and the redundancy of pattern-    "bar" and "baz" in the following code:--      {-# LANGUAGE OverloadedStrings #-}-      main = do-        case "foo" of-            "foo" -> putStrLn "A"-            "bar" -> putStrLn "B"-            "baz" -> putStrLn "C"--  We must ensure that doing the same translation to literal values and patterns-  in `translatePat` and `hsExprToPmExpr`. The previous inconsistent work led to-  Trac #14546.--}---- | Translate a list of patterns (Note: each pattern is translated--- to a pattern vector but we do not concatenate the results).-translatePatVec :: FamInstEnvs -> [Pat GhcTc] -> DsM [PatVec]-translatePatVec fam_insts pats = mapM (translatePat fam_insts) pats---- | Translate a constructor pattern-translateConPatVec :: FamInstEnvs -> [Type] -> [TyVar]-                   -> ConLike -> HsConPatDetails GhcTc -> DsM PatVec-translateConPatVec fam_insts _univ_tys _ex_tvs _ (PrefixCon ps)-  = concat <$> translatePatVec fam_insts (map unLoc ps)-translateConPatVec fam_insts _univ_tys _ex_tvs _ (InfixCon p1 p2)-  = concat <$> translatePatVec fam_insts (map unLoc [p1,p2])-translateConPatVec fam_insts  univ_tys  ex_tvs c (RecCon (HsRecFields fs _))-    -- Nothing matched. Make up some fresh term variables-  | null fs        = mkPmVars arg_tys-    -- The data constructor was not defined using record syntax. For the-    -- pattern to be in record syntax it should be empty (e.g. Just {}).-    -- So just like the previous case.-  | null orig_lbls = ASSERT(null matched_lbls) mkPmVars arg_tys-    -- Some of the fields appear, in the original order (there may be holes).-    -- Generate a simple constructor pattern and make up fresh variables for-    -- the rest of the fields-  | matched_lbls `subsetOf` orig_lbls-  = ASSERT(orig_lbls `equalLength` arg_tys)-      let translateOne (lbl, ty) = case lookup lbl matched_pats of-            Just p  -> translatePat fam_insts p-            Nothing -> mkPmVars [ty]-      in  concatMapM translateOne (zip orig_lbls arg_tys)-    -- The fields that appear are not in the correct order. Make up fresh-    -- variables for all fields and add guards after matching, to force the-    -- evaluation in the correct order.-  | otherwise = do-      arg_var_pats    <- mkPmVars arg_tys-      translated_pats <- forM matched_pats $ \(x,pat) -> do-        pvec <- translatePat fam_insts pat-        return (x, pvec)--      let zipped = zip orig_lbls [ x | PmVar x <- arg_var_pats ]-          guards = map (\(name,pvec) -> case lookup name zipped of-                            Just x  -> PmGrd pvec (PmExprVar (idName x))-                            Nothing -> panic "translateConPatVec: lookup")-                       translated_pats--      return (arg_var_pats ++ guards)-  where-    -- The actual argument types (instantiated)-    arg_tys = conLikeInstOrigArgTys c (univ_tys ++ mkTyVarTys ex_tvs)--    -- Some label information-    orig_lbls    = map flSelector $ conLikeFieldLabels c-    matched_pats = [ (getName (unLoc (hsRecFieldId x)), unLoc (hsRecFieldArg x))-                   | (dL->L _ x) <- fs]-    matched_lbls = [ name | (name, _pat) <- matched_pats ]--    subsetOf :: Eq a => [a] -> [a] -> Bool-    subsetOf []     _  = True-    subsetOf (_:_)  [] = False-    subsetOf (x:xs) (y:ys)-      | x == y    = subsetOf    xs  ys-      | otherwise = subsetOf (x:xs) ys---- Translate a single match-translateMatch :: FamInstEnvs -> LMatch GhcTc (LHsExpr GhcTc)-               -> DsM (PatVec,[PatVec])-translateMatch fam_insts (dL->L _ (Match { m_pats = lpats, m_grhss = grhss })) =-  do-  pats'   <- concat <$> translatePatVec fam_insts pats-  guards' <- mapM (translateGuards fam_insts) guards-  return (pats', guards')-  where-    extractGuards :: LGRHS GhcTc (LHsExpr GhcTc) -> [GuardStmt GhcTc]-    extractGuards (dL->L _ (GRHS _ gs _)) = map unLoc gs-    extractGuards _                       = panic "translateMatch"--    pats   = map unLoc lpats-    guards = map extractGuards (grhssGRHSs grhss)-translateMatch _ _ = panic "translateMatch"---- -------------------------------------------------------------------------- * Transform source guards (GuardStmt Id) to PmPats (Pattern)---- | Translate a list of guard statements to a pattern vector-translateGuards :: FamInstEnvs -> [GuardStmt GhcTc] -> DsM PatVec-translateGuards fam_insts guards = do-  all_guards <- concat <$> mapM (translateGuard fam_insts) guards-  return (replace_unhandled all_guards)-  -- It should have been (return all_guards) but it is too expressive.-  -- Since the term oracle does not handle all constraints we generate,-  -- we (hackily) replace all constraints the oracle cannot handle with a-  -- single one (we need to know if there is a possibility of falure).-  -- See Note [Guards and Approximation] for all guard-related approximations-  -- we implement.-  where-    replace_unhandled :: PatVec -> PatVec-    replace_unhandled gv-      | any_unhandled gv = fake_pat : [ p | p <- gv, shouldKeep p ]-      | otherwise        = gv--    any_unhandled :: PatVec -> Bool-    any_unhandled gv = any (not . shouldKeep) gv--    shouldKeep :: Pattern -> Bool-    shouldKeep p-      | PmVar {} <- p      = True-      | PmCon {} <- p      = singleConstructor (pm_con_con p)-                             && all shouldKeep (pm_con_args p)-    shouldKeep (PmGrd pv e)-      | all shouldKeep pv  = True-      | isNotPmExprOther e = True  -- expensive but we want it-    shouldKeep _other_pat  = False -- let the rest..---- | Check whether a pattern can fail to match-cantFailPattern :: Pattern -> Bool-cantFailPattern p-  | PmVar {} <- p = True-  | PmCon {} <- p = singleConstructor (pm_con_con p)-                    && all cantFailPattern (pm_con_args p)-cantFailPattern (PmGrd pv _e)-                  = all cantFailPattern pv-cantFailPattern _ = False---- | Translate a guard statement to Pattern-translateGuard :: FamInstEnvs -> GuardStmt GhcTc -> DsM PatVec-translateGuard fam_insts guard = case guard of-  BodyStmt _   e _ _ -> translateBoolGuard e-  LetStmt  _   binds -> translateLet (unLoc binds)-  BindStmt _ p e _ _ -> translateBind fam_insts p e-  LastStmt        {} -> panic "translateGuard LastStmt"-  ParStmt         {} -> panic "translateGuard ParStmt"-  TransStmt       {} -> panic "translateGuard TransStmt"-  RecStmt         {} -> panic "translateGuard RecStmt"-  ApplicativeStmt {} -> panic "translateGuard ApplicativeLastStmt"-  XStmtLR         {} -> panic "translateGuard RecStmt"---- | Translate let-bindings-translateLet :: HsLocalBinds GhcTc -> DsM PatVec-translateLet _binds = return []---- | Translate a pattern guard-translateBind :: FamInstEnvs -> LPat GhcTc -> LHsExpr GhcTc -> DsM PatVec-translateBind fam_insts (dL->L _ p) e = do-  ps <- translatePat fam_insts p-  return [mkGuard ps (unLoc e)]---- | Translate a boolean guard-translateBoolGuard :: LHsExpr GhcTc -> DsM PatVec-translateBoolGuard e-  | isJust (isTrueLHsExpr e) = return []-    -- The formal thing to do would be to generate (True <- True)-    -- but it is trivial to solve so instead we give back an empty-    -- PatVec for efficiency-  | otherwise = return [mkGuard [truePattern] (unLoc e)]--{- Note [Guards and Approximation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Even if the algorithm is really expressive, the term oracle we use is not.-Hence, several features are not translated *properly* but we approximate.-The list includes:--1. View Patterns------------------A view pattern @(f -> p)@ should be translated to @x (p <- f x)@. The term-oracle does not handle function applications so we know that the generated-constraints will not be handled at the end. Hence, we distinguish between two-cases:-  a) Pattern @p@ cannot fail. Then this is just a binding and we do the *right-     thing*.-  b) Pattern @p@ can fail. This means that when checking the guard, we will-     generate several cases, with no useful information. E.g.:--       h (f -> [a,b]) = ...-       h x ([a,b] <- f x) = ...--       uncovered set = { [x |> { False ~ (f x ~ [])            }]-                       , [x |> { False ~ (f x ~ (t1:[]))       }]-                       , [x |> { False ~ (f x ~ (t1:t2:t3:t4)) }] }--     So we have two problems:-       1) Since we do not print the constraints in the general case (they may-          be too many), the warning will look like this:--            Pattern match(es) are non-exhaustive-            In an equation for `h':-                Patterns not matched:-                    _-                    _-                    _-          Which is not short and not more useful than a single underscore.-       2) The size of the uncovered set increases a lot, without gaining more-          expressivity in our warnings.--     Hence, in this case, we replace the guard @([a,b] <- f x)@ with a *dummy*-     @fake_pat@: @True <- _@. That is, we record that there is a possibility-     of failure but we minimize it to a True/False. This generates a single-     warning and much smaller uncovered sets.--2. Overloaded Lists---------------------An overloaded list @[...]@ should be translated to @x ([...] <- toList x)@. The-problem is exactly like above, as its solution. For future reference, the code-below is the *right thing to do*:--   ListPat (ListPatTc elem_ty (Just (pat_ty, _to_list))) lpats-     otherwise -> do-       (xp, xe) <- mkPmId2Forms pat_ty-       ps       <- translatePatVec (map unLoc lpats)-       let pats = foldr (mkListPatVec elem_ty) [nilPattern elem_ty] ps-           g    = mkGuard pats (HsApp (noLoc to_list) xe)-       return [xp,g]--3. Overloaded Literals------------------------The case with literals is a bit different. a literal @l@ should be translated-to @x (True <- x == from l)@. Since we want to have better warnings for-overloaded literals as it is a very common feature, we treat them differently.-They are mainly covered in Note [Undecidable Equality for Overloaded Literals]-in PmExpr.--4. N+K Patterns & Pattern Synonyms-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-An n+k pattern (n+k) should be translated to @x (True <- x >= k) (n <- x-k)@.-Since the only pattern of the three that causes failure is guard @(n <- x-k)@,-and has two possible outcomes. Hence, there is no benefit in using a dummy and-we implement the proper thing. Pattern synonyms are simply not implemented yet.-Hence, to be conservative, we generate a dummy pattern, assuming that the-pattern can fail.--5. Actual Guards------------------During translation, boolean guards and pattern guards are translated properly.-Let bindings though are omitted by function @translateLet@. Since they are lazy-bindings, we do not actually want to generate a (strict) equality (like we do-in the pattern bind case). Hence, we safely drop them.--Additionally, top-level guard translation (performed by @translateGuards@)-replaces guards that cannot be reasoned about (like the ones we described in-1-4) with a single @fake_pat@ to record the possibility of failure to match.--Note [Translate CoPats]-~~~~~~~~~~~~~~~~~~~~~~~-The pattern match checker did not know how to handle coerced patterns `CoPat`-efficiently, which gave rise to #11276. The original approach translated-`CoPat`s:--    pat |> co    ===>    x (pat <- (e |> co))--Instead, we now check whether the coercion is a hole or if it is just refl, in-which case we can drop it. Unfortunately, data families generate useful-coercions so guards are still generated in these cases and checking data-families is not really efficient.--%************************************************************************-%*                                                                      *-                 Utilities for Pattern Match Checking-%*                                                                      *-%************************************************************************--}---- ------------------------------------------------------------------------------- * Basic utilities---- | Get the type out of a PmPat. For guard patterns (ps <- e) we use the type--- of the first (or the single -WHEREVER IT IS- valid to use?) pattern-pmPatType :: PmPat p -> Type-pmPatType (PmCon { pm_con_con = con, pm_con_arg_tys = tys })-  = conLikeResTy con tys-pmPatType (PmVar  { pm_var_id  = x }) = idType x-pmPatType (PmLit  { pm_lit_lit = l }) = pmLitType l-pmPatType (PmNLit { pm_lit_id  = x }) = idType x-pmPatType (PmGrd  { pm_grd_pv  = pv })-  = ASSERT(patVecArity pv == 1) (pmPatType p)-  where Just p = find ((==1) . patternArity) pv---- | Information about a conlike that is relevant to coverage checking.--- It is called an \"inhabitation candidate\" since it is a value which may--- possibly inhabit some type, but only if its term constraint ('ic_tm_ct')--- and type constraints ('ic_ty_cs') are permitting, and if all of its strict--- argument types ('ic_strict_arg_tys') are inhabitable.--- See @Note [Extensions to GADTs Meet Their Match]@.-data InhabitationCandidate =-  InhabitationCandidate-  { ic_val_abs        :: ValAbs-  , ic_tm_ct          :: ComplexEq-  , ic_ty_cs          :: Bag EvVar-  , ic_strict_arg_tys :: [Type]-  }--{--Note [Extensions to GADTs Meet Their Match]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The GADTs Meet Their Match paper presents the formalism that GHC's coverage-checker adheres to. Since the paper's publication, there have been some-additional features added to the coverage checker which are not described in-the paper. This Note serves as a reference for these new features.---------- Strict argument type constraints--------In the ConVar case of clause processing, each conlike K traditionally-generates two different forms of constraints:--* A term constraint (e.g., x ~ K y1 ... yn)-* Type constraints from the conlike's context (e.g., if K has type-  forall bs. Q => s1 .. sn -> T tys, then Q would be its type constraints)--As it turns out, these alone are not enough to detect a certain class of-unreachable code. Consider the following example (adapted from #15305):--  data K = K1 | K2 !Void--  f :: K -> ()-  f K1 = ()--Even though `f` doesn't match on `K2`, `f` is exhaustive in its patterns. Why?-Because it's impossible to construct a terminating value of type `K` using the-`K2` constructor, and thus it's impossible for `f` to ever successfully match-on `K2`.--The reason is because `K2`'s field of type `Void` is //strict//. Because there-are no terminating values of type `Void`, any attempt to construct something-using `K2` will immediately loop infinitely or throw an exception due to the-strictness annotation. (If the field were not strict, then `f` could match on,-say, `K2 undefined` or `K2 (let x = x in x)`.)--Since neither the term nor type constraints mentioned above take strict-argument types into account, we make use of the `nonVoid` function to-determine whether a strict type is inhabitable by a terminating value or not.--`nonVoid ty` returns True when either:-1. `ty` has at least one InhabitationCandidate for which both its term and type-   constraints are satifiable, and `nonVoid` returns `True` for all of the-   strict argument types in that InhabitationCandidate.-2. We're unsure if it's inhabited by a terminating value.--`nonVoid ty` returns False when `ty` is definitely uninhabited by anything-(except bottom). Some examples:--* `nonVoid Void` returns False, since Void has no InhabitationCandidates.-  (This is what lets us discard the `K2` constructor in the earlier example.)-* `nonVoid (Int :~: Int)` returns True, since it has an InhabitationCandidate-  (through the Refl constructor), and its term constraint (x ~ Refl) and-  type constraint (Int ~ Int) are satisfiable.-* `nonVoid (Int :~: Bool)` returns False. Although it has an-  InhabitationCandidate (by way of Refl), its type constraint (Int ~ Bool) is-  not satisfiable.-* Given the following definition of `MyVoid`:--    data MyVoid = MkMyVoid !Void--  `nonVoid MyVoid` returns False. The InhabitationCandidate for the MkMyVoid-  constructor contains Void as a strict argument type, and since `nonVoid Void`-  returns False, that InhabitationCandidate is discarded, leaving no others.--* Performance considerations--We must be careful when recursively calling `nonVoid` on the strict argument-types of an InhabitationCandidate, because doing so naïvely can cause GHC to-fall into an infinite loop. Consider the following example:--  data Abyss = MkAbyss !Abyss--  stareIntoTheAbyss :: Abyss -> a-  stareIntoTheAbyss x = case x of {}--In principle, stareIntoTheAbyss is exhaustive, since there is no way to-construct a terminating value using MkAbyss. However, both the term and type-constraints for MkAbyss are satisfiable, so the only way one could determine-that MkAbyss is unreachable is to check if `nonVoid Abyss` returns False.-There is only one InhabitationCandidate for Abyss—MkAbyss—and both its term-and type constraints are satisfiable, so we'd need to check if `nonVoid Abyss`-returns False... and now we've entered an infinite loop!--To avoid this sort of conundrum, `nonVoid` uses a simple test to detect the-presence of recursive types (through `checkRecTc`), and if recursion is-detected, we bail out and conservatively assume that the type is inhabited by-some terminating value. This avoids infinite loops at the expense of making-the coverage checker incomplete with respect to functions like-stareIntoTheAbyss above. Then again, the same problem occurs with recursive-newtypes, like in the following code:--  newtype Chasm = MkChasm Chasm--  gazeIntoTheChasm :: Chasm -> a-  gazeIntoTheChasm x = case x of {} -- Erroneously warned as non-exhaustive--So this limitation is somewhat understandable.--Note that even with this recursion detection, there is still a possibility that-`nonVoid` can run in exponential time. Consider the following data type:--  data T = MkT !T !T !T--If we call `nonVoid` on each of its fields, that will require us to once again-check if `MkT` is inhabitable in each of those three fields, which in turn will-require us to check if `MkT` is inhabitable again... As you can see, the-branching factor adds up quickly, and if the recursion depth limit is, say,-100, then `nonVoid T` will effectively take forever.--To mitigate this, we check the branching factor every time we are about to call-`nonVoid` on a list of strict argument types. If the branching factor exceeds 1-(i.e., if there is potential for exponential runtime), then we limit the-maximum recursion depth to 1 to mitigate the problem. If the branching factor-is exactly 1 (i.e., we have a linear chain instead of a tree), then it's okay-to stick with a larger maximum recursion depth.--Another microoptimization applies to data types like this one:--  data S a = ![a] !T--Even though there is a strict field of type [a], it's quite silly to call-nonVoid on it, since it's "obvious" that it is inhabitable. To make this-intuition formal, we say that a type is definitely inhabitable (DI) if:--  * It has at least one constructor C such that:-    1. C has no equality constraints (since they might be unsatisfiable)-    2. C has no strict argument types (since they might be uninhabitable)--It's relatively cheap to cheap if a type is DI, so before we call `nonVoid`-on a list of strict argument types, we filter out all of the DI ones.--}--instance Outputable InhabitationCandidate where-  ppr (InhabitationCandidate { ic_val_abs = va, ic_tm_ct = tm_ct-                             , ic_ty_cs = ty_cs-                             , ic_strict_arg_tys = strict_arg_tys }) =-    text "InhabitationCandidate" <+>-      vcat [ text "ic_val_abs        =" <+> ppr va-           , text "ic_tm_ct          =" <+> ppr tm_ct-           , text "ic_ty_cs          =" <+> ppr ty_cs-           , text "ic_strict_arg_tys =" <+> ppr strict_arg_tys ]---- | Generate an 'InhabitationCandidate' for a given conlike (generate--- fresh variables of the appropriate type for arguments)-mkOneConFull :: Id -> [Type] -> ConLike -> DsM InhabitationCandidate---  * 'con' K is a conlike of algebraic data type 'T tys'----  * 'tc_args' are the type arguments of the 'con's TyCon T------  *  'x' is the variable for which we encode an equality constraint---     in the term oracle------ After instantiating the universal tyvars of K to tc_args we get---          K @tys :: forall bs. Q => s1 .. sn -> T tys------ Suppose y1 is a strict field. Then we get--- Results: ic_val_abs:        K (y1::s1) .. (yn::sn)---          ic_tm_ct:          x ~ K y1..yn---          ic_ty_cs:          Q---          ic_strict_arg_tys: [s1]-mkOneConFull x tc_args con = do-  let (univ_tvs, ex_tvs, eq_spec, thetas, _req_theta , arg_tys, _con_res_ty)-        = conLikeFullSig con-      arg_is_banged = map isBanged $ conLikeImplBangs con-      subst1  = zipTvSubst univ_tvs tc_args--  (subst, ex_tvs') <- cloneTyVarBndrs subst1 ex_tvs <$> getUniqueSupplyM--  -- Field types-  let arg_tys' = substTys subst arg_tys-  -- Fresh term variables (VAs) as arguments to the constructor-  arguments <-  mapM mkPmVar arg_tys'-  -- All constraints bound by the constructor (alpha-renamed)-  let theta_cs = substTheta subst (eqSpecPreds eq_spec ++ thetas)-  evvars <- mapM (nameType "pm") theta_cs-  let con_abs  = PmCon { pm_con_con     = con-                       , pm_con_arg_tys = tc_args-                       , pm_con_tvs     = ex_tvs'-                       , pm_con_dicts   = evvars-                       , pm_con_args    = arguments }-      strict_arg_tys = filterByList arg_is_banged arg_tys'-  return $ InhabitationCandidate-           { ic_val_abs        = con_abs-           , ic_tm_ct          = (PmExprVar (idName x), vaToPmExpr con_abs)-           , ic_ty_cs          = listToBag evvars-           , ic_strict_arg_tys = strict_arg_tys-           }---- ------------------------------------------------------------------------------- * More smart constructors and fresh variable generation---- | Create a guard pattern-mkGuard :: PatVec -> HsExpr GhcTc -> Pattern-mkGuard pv e-  | all cantFailPattern pv = PmGrd pv expr-  | PmExprOther {} <- expr = fake_pat-  | otherwise              = PmGrd pv expr-  where-    expr = hsExprToPmExpr e---- | Create a term equality of the form: `(False ~ (x ~ lit))`-mkNegEq :: Id -> PmLit -> ComplexEq-mkNegEq x l = (falsePmExpr, PmExprVar (idName x) `PmExprEq` PmExprLit l)-{-# INLINE mkNegEq #-}---- | Create a term equality of the form: `(x ~ lit)`-mkPosEq :: Id -> PmLit -> ComplexEq-mkPosEq x l = (PmExprVar (idName x), PmExprLit l)-{-# INLINE mkPosEq #-}---- | Create a term equality of the form: `(x ~ x)`--- (always discharged by the term oracle)-mkIdEq :: Id -> ComplexEq-mkIdEq x = (PmExprVar name, PmExprVar name)-  where name = idName x-{-# INLINE mkIdEq #-}---- | Generate a variable pattern of a given type-mkPmVar :: Type -> DsM (PmPat p)-mkPmVar ty = PmVar <$> mkPmId ty-{-# INLINE mkPmVar #-}---- | Generate many variable patterns, given a list of types-mkPmVars :: [Type] -> DsM PatVec-mkPmVars tys = mapM mkPmVar tys-{-# INLINE mkPmVars #-}---- | Generate a fresh `Id` of a given type-mkPmId :: Type -> DsM Id-mkPmId ty = getUniqueM >>= \unique ->-  let occname = mkVarOccFS $ fsLit "$pm"-      name    = mkInternalName unique occname noSrcSpan-  in  return (mkLocalId name ty)---- | Generate a fresh term variable of a given and return it in two forms:--- * A variable pattern--- * A variable expression-mkPmId2Forms :: Type -> DsM (Pattern, LHsExpr GhcTc)-mkPmId2Forms ty = do-  x <- mkPmId ty-  return (PmVar x, noLoc (HsVar noExt (noLoc x)))---- ------------------------------------------------------------------------------- * Converting between Value Abstractions, Patterns and PmExpr---- | Convert a value abstraction an expression-vaToPmExpr :: ValAbs -> PmExpr-vaToPmExpr (PmCon  { pm_con_con = c, pm_con_args = ps })-  = PmExprCon c (map vaToPmExpr ps)-vaToPmExpr (PmVar  { pm_var_id  = x }) = PmExprVar (idName x)-vaToPmExpr (PmLit  { pm_lit_lit = l }) = PmExprLit l-vaToPmExpr (PmNLit { pm_lit_id  = x }) = PmExprVar (idName x)---- | Convert a pattern vector to a list of value abstractions by dropping the--- guards (See Note [Translating As Patterns])-coercePatVec :: PatVec -> [ValAbs]-coercePatVec pv = concatMap coercePmPat pv---- | Convert a pattern to a list of value abstractions (will be either an empty--- list if the pattern is a guard pattern, or a singleton list in all other--- cases) by dropping the guards (See Note [Translating As Patterns])-coercePmPat :: Pattern -> [ValAbs]-coercePmPat (PmVar { pm_var_id  = x }) = [PmVar { pm_var_id  = x }]-coercePmPat (PmLit { pm_lit_lit = l }) = [PmLit { pm_lit_lit = l }]-coercePmPat (PmCon { pm_con_con = con, pm_con_arg_tys = arg_tys-                   , pm_con_tvs = tvs, pm_con_dicts = dicts-                   , pm_con_args = args })-  = [PmCon { pm_con_con  = con, pm_con_arg_tys = arg_tys-           , pm_con_tvs  = tvs, pm_con_dicts = dicts-           , pm_con_args = coercePatVec args }]-coercePmPat (PmGrd {}) = [] -- drop the guards---- | Check whether a data constructor is the only way to construct--- a data type.-singleConstructor :: ConLike -> Bool-singleConstructor (RealDataCon dc) =-  case tyConDataCons (dataConTyCon dc) of-    [_] -> True-    _   -> False-singleConstructor _ = False---- | For a given conlike, finds all the sets of patterns which could--- be relevant to that conlike by consulting the result type.------ These come from two places.---  1. From data constructors defined with the result type constructor.---  2. From `COMPLETE` pragmas which have the same type as the result---     type constructor. Note that we only use `COMPLETE` pragmas---     *all* of whose pattern types match. See #14135-allCompleteMatches :: ConLike -> [Type] -> DsM [(Provenance, [ConLike])]-allCompleteMatches cl tys = do-  let fam = case cl of-           RealDataCon dc ->-            [(FromBuiltin, map RealDataCon (tyConDataCons (dataConTyCon dc)))]-           PatSynCon _    -> []-      ty  = conLikeResTy cl tys-  pragmas <- case splitTyConApp_maybe ty of-               Just (tc, _) -> dsGetCompleteMatches tc-               Nothing      -> return []-  let fams cm = (FromComplete,) <$>-                mapM dsLookupConLike (completeMatchConLikes cm)-  from_pragma <- filter (\(_,m) -> isValidCompleteMatch ty m) <$>-                mapM fams pragmas-  let final_groups = fam ++ from_pragma-  return final_groups-    where-      -- Check that all the pattern synonym return types in a `COMPLETE`-      -- pragma subsume the type we're matching.-      -- See Note [Filtering out non-matching COMPLETE sets]-      isValidCompleteMatch :: Type -> [ConLike] -> Bool-      isValidCompleteMatch ty = all go-        where-          go (RealDataCon {}) = True-          go (PatSynCon psc)  = isJust $ flip tcMatchTy ty $ patSynResTy-                                       $ patSynSig psc--          patSynResTy (_, _, _, _, _, res_ty) = res_ty--{--Note [Filtering out non-matching COMPLETE sets]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Currently, conlikes in a COMPLETE set are simply grouped by the-type constructor heading the return type. This is nice and simple, but it does-mean that there are scenarios when a COMPLETE set might be incompatible with-the type of a scrutinee. For instance, consider (from #14135):--  data Foo a = Foo1 a | Foo2 a--  pattern MyFoo2 :: Int -> Foo Int-  pattern MyFoo2 i = Foo2 i--  {-# COMPLETE Foo1, MyFoo2 #-}--  f :: Foo a -> a-  f (Foo1 x) = x--`f` has an incomplete pattern-match, so when choosing which constructors to-report as unmatched in a warning, GHC must choose between the original set of-data constructors {Foo1, Foo2} and the COMPLETE set {Foo1, MyFoo2}. But observe-that GHC shouldn't even consider the COMPLETE set as a possibility: the return-type of MyFoo2, Foo Int, does not match the type of the scrutinee, Foo a, since-there's no substitution `s` such that s(Foo Int) = Foo a.--To ensure that GHC doesn't pick this COMPLETE set, it checks each pattern-synonym constructor's return type matches the type of the scrutinee, and if one-doesn't, then we remove the whole COMPLETE set from consideration.--One might wonder why GHC only checks /pattern synonym/ constructors, and not-/data/ constructors as well. The reason is because that the type of a-GADT constructor very well may not match the type of a scrutinee, and that's-OK. Consider this example (from #14059):--  data SBool (z :: Bool) where-    SFalse :: SBool False-    STrue  :: SBool True--  pattern STooGoodToBeTrue :: forall (z :: Bool). ()-                           => z ~ True-                           => SBool z-  pattern STooGoodToBeTrue = STrue-  {-# COMPLETE SFalse, STooGoodToBeTrue #-}--  wobble :: SBool z -> Bool-  wobble STooGoodToBeTrue = True--In the incomplete pattern match for `wobble`, we /do/ want to warn that SFalse-should be matched against, even though its type, SBool False, does not match-the scrutinee type, SBool z.--}---- -------------------------------------------------------------------------- * Types and constraints--newEvVar :: Name -> Type -> EvVar-newEvVar name ty = mkLocalId name ty--nameType :: String -> Type -> DsM EvVar-nameType name ty = do-  unique <- getUniqueM-  let occname = mkVarOccFS (fsLit (name++"_"++show unique))-      idname  = mkInternalName unique occname noSrcSpan-  return (newEvVar idname ty)--{--%************************************************************************-%*                                                                      *-                              The type oracle-%*                                                                      *-%************************************************************************--}---- | Check whether a set of type constraints is satisfiable.-tyOracle :: Bag EvVar -> PmM Bool-tyOracle evs-  = liftD $-    do { ((_warns, errs), res) <- initTcDsForSolver $ tcCheckSatisfiability evs-       ; case res of-            Just sat -> return sat-            Nothing  -> pprPanic "tyOracle" (vcat $ pprErrMsgBagWithLoc errs) }--{--%************************************************************************-%*                                                                      *-                             Sanity Checks-%*                                                                      *-%************************************************************************--}---- | The arity of a pattern/pattern vector is the--- number of top-level patterns that are not guards-type PmArity = Int---- | Compute the arity of a pattern vector-patVecArity :: PatVec -> PmArity-patVecArity = sum . map patternArity---- | Compute the arity of a pattern-patternArity :: Pattern -> PmArity-patternArity (PmGrd {}) = 0-patternArity _other_pat = 1--{--%************************************************************************-%*                                                                      *-            Heart of the algorithm: Function pmcheck-%*                                                                      *-%************************************************************************--Main functions are:--* mkInitialUncovered :: [Id] -> PmM Uncovered--  Generates the initial uncovered set. Term and type constraints in scope-  are checked, if they are inconsistent, the set is empty, otherwise, the-  set contains only a vector of variables with the constraints in scope.--* pmcheck :: PatVec -> [PatVec] -> ValVec -> PmM PartialResult--  Checks redundancy, coverage and inaccessibility, using auxilary functions-  `pmcheckGuards` and `pmcheckHd`. Mainly handles the guard case which is-  common in all three checks (see paper) and calls `pmcheckGuards` when the-  whole clause is checked, or `pmcheckHd` when the pattern vector does not-  start with a guard.--* pmcheckGuards :: [PatVec] -> ValVec -> PmM PartialResult--  Processes the guards.--* pmcheckHd :: Pattern -> PatVec -> [PatVec]-          -> ValAbs -> ValVec -> PmM PartialResult--  Worker: This function implements functions `covered`, `uncovered` and-  `divergent` from the paper at once. Slightly different from the paper because-  it does not even produce the covered and uncovered sets. Since we only care-  about whether a clause covers SOMETHING or if it may forces ANY argument, we-  only store a boolean in both cases, for efficiency.--}---- | Lift a pattern matching action from a single value vector abstration to a--- value set abstraction, but calling it on every vector and the combining the--- results.-runMany :: (ValVec -> PmM PartialResult) -> (Uncovered -> PmM PartialResult)-runMany _ [] = return mempty-runMany pm (m:ms) = mappend <$> pm m <*> runMany pm ms---- | Generate the initial uncovered set. It initializes the--- delta with all term and type constraints in scope.-mkInitialUncovered :: [Id] -> PmM Uncovered-mkInitialUncovered vars = do-  delta <- pmInitialTmTyCs-  let patterns = map PmVar vars-  return [ValVec patterns delta]---- | Increase the counter for elapsed algorithm iterations, check that the--- limit is not exceeded and call `pmcheck`-pmcheckI :: PatVec -> [PatVec] -> ValVec -> PmM PartialResult-pmcheckI ps guards vva = do-  n <- liftD incrCheckPmIterDs-  tracePm "pmCheck" (ppr n <> colon <+> pprPatVec ps-                        $$ hang (text "guards:") 2 (vcat (map pprPatVec guards))-                        $$ pprValVecDebug vva)-  res <- pmcheck ps guards vva-  tracePm "pmCheckResult:" (ppr res)-  return res-{-# INLINE pmcheckI #-}---- | Increase the counter for elapsed algorithm iterations, check that the--- limit is not exceeded and call `pmcheckGuards`-pmcheckGuardsI :: [PatVec] -> ValVec -> PmM PartialResult-pmcheckGuardsI gvs vva = liftD incrCheckPmIterDs >> pmcheckGuards gvs vva-{-# INLINE pmcheckGuardsI #-}---- | Increase the counter for elapsed algorithm iterations, check that the--- limit is not exceeded and call `pmcheckHd`-pmcheckHdI :: Pattern -> PatVec -> [PatVec] -> ValAbs -> ValVec-           -> PmM PartialResult-pmcheckHdI p ps guards va vva = do-  n <- liftD incrCheckPmIterDs-  tracePm "pmCheckHdI" (ppr n <> colon <+> pprPmPatDebug p-                        $$ pprPatVec ps-                        $$ hang (text "guards:") 2 (vcat (map pprPatVec guards))-                        $$ pprPmPatDebug va-                        $$ pprValVecDebug vva)--  res <- pmcheckHd p ps guards va vva-  tracePm "pmCheckHdI: res" (ppr res)-  return res-{-# INLINE pmcheckHdI #-}---- | Matching function: Check simultaneously a clause (takes separately the--- patterns and the list of guards) for exhaustiveness, redundancy and--- inaccessibility.-pmcheck :: PatVec -> [PatVec] -> ValVec -> PmM PartialResult-pmcheck [] guards vva@(ValVec [] _)-  | null guards = return $ mempty { presultCovered = Covered }-  | otherwise   = pmcheckGuardsI guards vva---- Guard-pmcheck (p@(PmGrd pv e) : ps) guards vva@(ValVec vas delta)-    -- short-circuit if the guard pattern is useless.-    -- we just have two possible outcomes: fail here or match and recurse-    -- none of the two contains any useful information about the failure-    -- though. So just have these two cases but do not do all the boilerplate-  | isFakeGuard pv e = forces . mkCons vva <$> pmcheckI ps guards vva-  | otherwise = do-      y <- liftD $ mkPmId (pmPatType p)-      let tm_state = extendSubst y e (delta_tm_cs delta)-          delta'   = delta { delta_tm_cs = tm_state }-      utail <$> pmcheckI (pv ++ ps) guards (ValVec (PmVar y : vas) delta')--pmcheck [] _ (ValVec (_:_) _) = panic "pmcheck: nil-cons"-pmcheck (_:_) _ (ValVec [] _) = panic "pmcheck: cons-nil"--pmcheck (p:ps) guards (ValVec (va:vva) delta)-  = pmcheckHdI p ps guards va (ValVec vva delta)---- | Check the list of guards-pmcheckGuards :: [PatVec] -> ValVec -> PmM PartialResult-pmcheckGuards []       vva = return (usimple [vva])-pmcheckGuards (gv:gvs) vva = do-  (PartialResult prov1 cs vsa ds) <- pmcheckI gv [] vva-  (PartialResult prov2 css vsas dss) <- runMany (pmcheckGuardsI gvs) vsa-  return $ PartialResult (prov1 `mappend` prov2)-                         (cs `mappend` css)-                         vsas-                         (ds `mappend` dss)---- | Worker function: Implements all cases described in the paper for all three--- functions (`covered`, `uncovered` and `divergent`) apart from the `Guard`--- cases which are handled by `pmcheck`-pmcheckHd :: Pattern -> PatVec -> [PatVec] -> ValAbs -> ValVec-          -> PmM PartialResult---- Var-pmcheckHd (PmVar x) ps guards va (ValVec vva delta)-  | Just tm_state <- solveOneEq (delta_tm_cs delta)-                                (PmExprVar (idName x), vaToPmExpr va)-  = ucon va <$> pmcheckI ps guards (ValVec vva (delta {delta_tm_cs = tm_state}))-  | otherwise = return mempty---- ConCon-pmcheckHd ( p@(PmCon { pm_con_con = c1, pm_con_tvs = ex_tvs1-                     , pm_con_args = args1})) ps guards-          (va@(PmCon { pm_con_con = c2, pm_con_tvs = ex_tvs2-                     , pm_con_args = args2})) (ValVec vva delta)-  | c1 /= c2  =-    return (usimple [ValVec (va:vva) delta])-  | otherwise = do-    let to_evvar tv1 tv2 = nameType "pmConCon" $-                           mkPrimEqPred (mkTyVarTy tv1) (mkTyVarTy tv2)-        mb_to_evvar tv1 tv2-            -- If we have identical constructors but different existential-            -- tyvars, then generate extra equality constraints to ensure the-            -- existential tyvars.-            -- See Note [Coverage checking and existential tyvars].-          | tv1 == tv2 = pure Nothing-          | otherwise  = Just <$> to_evvar tv1 tv2-    evvars <- (listToBag . catMaybes) <$>-              ASSERT(ex_tvs1 `equalLength` ex_tvs2)-              liftD (zipWithM mb_to_evvar ex_tvs1 ex_tvs2)-    let delta' = delta { delta_ty_cs = evvars `unionBags` delta_ty_cs delta }-    kcon c1 (pm_con_arg_tys p) (pm_con_tvs p) (pm_con_dicts p)-      <$> pmcheckI (args1 ++ ps) guards (ValVec (args2 ++ vva) delta')---- LitLit-pmcheckHd (PmLit l1) ps guards (va@(PmLit l2)) vva =-  case eqPmLit l1 l2 of-    True  -> ucon va <$> pmcheckI ps guards vva-    False -> return $ ucon va (usimple [vva])---- ConVar-pmcheckHd (p@(PmCon { pm_con_con = con, pm_con_arg_tys = tys }))-          ps guards-          (PmVar x) (ValVec vva delta) = do-  (prov, complete_match) <- select =<< liftD (allCompleteMatches con tys)--  cons_cs <- mapM (liftD . mkOneConFull x tys) complete_match--  inst_vsa <- flip mapMaybeM cons_cs $-      \InhabitationCandidate{ ic_val_abs = va, ic_tm_ct = tm_ct-                            , ic_ty_cs = ty_cs-                            , ic_strict_arg_tys = strict_arg_tys } -> do-    mb_sat <- pmIsSatisfiable delta tm_ct ty_cs strict_arg_tys-    pure $ fmap (ValVec (va:vva)) mb_sat--  set_provenance prov .-    force_if (canDiverge (idName x) (delta_tm_cs delta)) <$>-      runMany (pmcheckI (p:ps) guards) inst_vsa---- LitVar-pmcheckHd (p@(PmLit l)) ps guards (PmVar x) (ValVec vva delta)-  = force_if (canDiverge (idName x) (delta_tm_cs delta)) <$>-      mkUnion non_matched <$>-        case solveOneEq (delta_tm_cs delta) (mkPosEq x l) of-          Just tm_state -> pmcheckHdI p ps guards (PmLit l) $-                             ValVec vva (delta {delta_tm_cs = tm_state})-          Nothing       -> return mempty-  where-    us | Just tm_state <- solveOneEq (delta_tm_cs delta) (mkNegEq x l)-       = [ValVec (PmNLit x [l] : vva) (delta { delta_tm_cs = tm_state })]-       | otherwise = []--    non_matched = usimple us---- LitNLit-pmcheckHd (p@(PmLit l)) ps guards-          (PmNLit { pm_lit_id = x, pm_lit_not = lits }) (ValVec vva delta)-  | all (not . eqPmLit l) lits-  , Just tm_state <- solveOneEq (delta_tm_cs delta) (mkPosEq x l)-    -- Both guards check the same so it would be sufficient to have only-    -- the second one. Nevertheless, it is much cheaper to check whether-    -- the literal is in the list so we check it first, to avoid calling-    -- the term oracle (`solveOneEq`) if possible-  = mkUnion non_matched <$>-      pmcheckHdI p ps guards (PmLit l)-                (ValVec vva (delta { delta_tm_cs = tm_state }))-  | otherwise = return non_matched-  where-    us | Just tm_state <- solveOneEq (delta_tm_cs delta) (mkNegEq x l)-       = [ValVec (PmNLit x (l:lits) : vva) (delta { delta_tm_cs = tm_state })]-       | otherwise = []--    non_matched = usimple us---- ------------------------------------------------------------------------------- The following three can happen only in cases like #322 where constructors--- and overloaded literals appear in the same match. The general strategy is--- to replace the literal (positive/negative) by a variable and recurse. The--- fact that the variable is equal to the literal is recorded in `delta` so--- no information is lost---- LitCon-pmcheckHd (PmLit l) ps guards (va@(PmCon {})) (ValVec vva delta)-  = do y <- liftD $ mkPmId (pmPatType va)-       let tm_state = extendSubst y (PmExprLit l) (delta_tm_cs delta)-           delta'   = delta { delta_tm_cs = tm_state }-       pmcheckHdI (PmVar y) ps guards va (ValVec vva delta')---- ConLit-pmcheckHd (p@(PmCon {})) ps guards (PmLit l) (ValVec vva delta)-  = do y <- liftD $ mkPmId (pmPatType p)-       let tm_state = extendSubst y (PmExprLit l) (delta_tm_cs delta)-           delta'   = delta { delta_tm_cs = tm_state }-       pmcheckHdI p ps guards (PmVar y) (ValVec vva delta')---- ConNLit-pmcheckHd (p@(PmCon {})) ps guards (PmNLit { pm_lit_id = x }) vva-  = pmcheckHdI p ps guards (PmVar x) vva---- Impossible: handled by pmcheck-pmcheckHd (PmGrd {}) _ _ _ _ = panic "pmcheckHd: Guard"--{--Note [Coverage checking and existential tyvars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-GHC's implementation of the pattern-match coverage algorithm (as described in-the GADTs Meet Their Match paper) must take some care to emit enough type-constraints when handling data constructors with exisentially quantified type-variables. To better explain what the challenge is, consider a constructor K-of the form:--  K @e_1 ... @e_m ev_1 ... ev_v ty_1 ... ty_n :: T u_1 ... u_p--Where:--* e_1, ..., e_m are the existentially bound type variables.-* ev_1, ..., ev_v are evidence variables, which may inhabit a dictionary type-  (e.g., Eq) or an equality constraint (e.g., e_1 ~ Int).-* ty_1, ..., ty_n are the types of K's fields.-* T u_1 ... u_p is the return type, where T is the data type constructor, and-  u_1, ..., u_p are the universally quantified type variables.--In the ConVar case, the coverage algorithm will have in hand the constructor-K as well as a list of type arguments [t_1, ..., t_n] to substitute T's-universally quantified type variables u_1, ..., u_n for. It's crucial to take-these in as arguments, as it is non-trivial to derive them just from the result-type of a pattern synonym and the ambient type of the match (#11336, #17112).-The type checker already did the hard work, so we should just make use of it.--The presence of existentially quantified type variables adds a significant-wrinkle. We always grab e_1, ..., e_m from the definition of K to begin with,-but we don't want them to appear in the final PmCon, because then-calling (mkOneConFull K) for other pattern variables might reuse the same-existential tyvars, which is certainly wrong.--Previously, GHC's solution to this wrinkle was to always create fresh names-for the existential tyvars and put them into the PmCon. This works well for-many cases, but it can break down if you nest GADT pattern matches in just-the right way. For instance, consider the following program:--    data App f a where-      App :: f a -> App f (Maybe a)--    data Ty a where-      TBool :: Ty Bool-      TInt  :: Ty Int--    data T f a where-      C :: T Ty (Maybe Bool)--    foo :: T f a -> App f a -> ()-    foo C (App TBool) = ()--foo is a total program, but with the previous approach to handling existential-tyvars, GHC would mark foo's patterns as non-exhaustive.--When foo is desugared to Core, it looks roughly like so:--    foo @f @a (C co1 _co2) (App @a1 _co3 (TBool |> co1)) = ()--(Where `a1` is an existential tyvar.)--That, in turn, is processed by the coverage checker to become:--    foo @f @a (C co1 _co2) (App @a1 _co3 (pmvar123 :: f a1))-      | TBool <- pmvar123 |> co1-      = ()--Note that the type of pmvar123 is `f a1`—this will be important later.--Now, we proceed with coverage-checking as usual. When we come to the-ConVar case for App, we create a fresh variable `a2` to represent its-existential tyvar. At this point, we have the equality constraints-`(a ~ Maybe a2, a ~ Maybe Bool, f ~ Ty)` in scope.--However, when we check the guard, it will use the type of pmvar123, which is-`f a1`. Thus, when considering if pmvar123 can match the constructor TInt,-it will generate the constraint `a1 ~ Int`. This means our final set of-equality constraints would be:--    f  ~ Ty-    a  ~ Maybe Bool-    a  ~ Maybe a2-    a1 ~ Int--Which is satisfiable! Freshening the existential tyvar `a` to `a2` doomed us,-because GHC is unable to relate `a2` to `a1`, which really should be the same-tyvar.--Luckily, we can avoid this pitfall. Recall that the ConVar case was where we-generated a PmCon with too-fresh existentials. But after ConVar, we have the-ConCon case, which considers whether each constructor of a particular data type-can be matched on in a particular spot.--In the case of App, when we get to the ConCon case, we will compare our-original App PmCon (from the source program) to the App PmCon created from the-ConVar case. In the former PmCon, we have `a1` in hand, which is exactly the-existential tyvar we want! Thus, we can force `a1` to be the same as `a2` here-by emitting an additional `a1 ~ a2` constraint. Now our final set of equality-constraints will be:--    f  ~ Ty-    a  ~ Maybe Bool-    a  ~ Maybe a2-    a1 ~ Int-    a1 ~ a2--Which is unsatisfiable, as we desired, since we now have that-Int ~ a1 ~ a2 ~ Bool.--In general, App might have more than one constructor, in which case we-couldn't reuse the existential tyvar for App for a different constructor. This-means that we can only use this trick in ConCon when the constructors are the-same. But this is fine, since this is the only scenario where this situation-arises in the first place!--}---- ------------------------------------------------------------------------------- * Utilities for main checking--updateVsa :: (ValSetAbs -> ValSetAbs) -> (PartialResult -> PartialResult)-updateVsa f p@(PartialResult { presultUncovered = old })-  = p { presultUncovered = f old }----- | Initialise with default values for covering and divergent information.-usimple :: ValSetAbs -> PartialResult-usimple vsa = mempty { presultUncovered = vsa }---- | Take the tail of all value vector abstractions in the uncovered set-utail :: PartialResult -> PartialResult-utail = updateVsa upd-  where upd vsa = [ ValVec vva delta | ValVec (_:vva) delta <- vsa ]---- | Prepend a value abstraction to all value vector abstractions in the--- uncovered set-ucon :: ValAbs -> PartialResult -> PartialResult-ucon va = updateVsa upd-  where-    upd vsa = [ ValVec (va:vva) delta | ValVec vva delta <- vsa ]---- | Given a data constructor of arity `a` and an uncovered set containing--- value vector abstractions of length `(a+n)`, pass the first `n` value--- abstractions to the constructor (Hence, the resulting value vector--- abstractions will have length `n+1`)-kcon :: ConLike -> [Type] -> [TyVar] -> [EvVar]-     -> PartialResult -> PartialResult-kcon con arg_tys ex_tvs dicts-  = let n = conLikeArity con-        upd vsa =-          [ ValVec (va:vva) delta-          | ValVec vva' delta <- vsa-          , let (args, vva) = splitAt n vva'-          , let va = PmCon { pm_con_con     = con-                            , pm_con_arg_tys = arg_tys-                            , pm_con_tvs     = ex_tvs-                            , pm_con_dicts   = dicts-                            , pm_con_args    = args } ]-    in updateVsa upd---- | Get the union of two covered, uncovered and divergent value set--- abstractions. Since the covered and divergent sets are represented by a--- boolean, union means computing the logical or (at least one of the two is--- non-empty).--mkUnion :: PartialResult -> PartialResult -> PartialResult-mkUnion = mappend---- | Add a value vector abstraction to a value set abstraction (uncovered).-mkCons :: ValVec -> PartialResult -> PartialResult-mkCons vva = updateVsa (vva:)---- | Set the divergent set to not empty-forces :: PartialResult -> PartialResult-forces pres = pres { presultDivergent = Diverged }---- | Set the divergent set to non-empty if the flag is `True`-force_if :: Bool -> PartialResult -> PartialResult-force_if True  pres = forces pres-force_if False pres = pres--set_provenance :: Provenance -> PartialResult -> PartialResult-set_provenance prov pr = pr { presultProvenance = prov }---- ------------------------------------------------------------------------------- * Propagation of term constraints inwards when checking nested matches--{- Note [Type and Term Equality Propagation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When checking a match it would be great to have all type and term information-available so we can get more precise results. For this reason we have functions-`addDictsDs' and `addTmCsDs' in PmMonad that store in the environment type and-term constraints (respectively) as we go deeper.--The type constraints we propagate inwards are collected by `collectEvVarsPats'-in HsPat.hs. This handles bug #4139 ( see example-  https://ghc.haskell.org/trac/ghc/attachment/ticket/4139/GADTbug.hs )-where this is needed.--For term equalities we do less, we just generate equalities for HsCase. For-example we accurately give 2 redundancy warnings for the marked cases:--f :: [a] -> Bool-f x = case x of--  []    -> case x of        -- brings (x ~ []) in scope-             []    -> True-             (_:_) -> False -- can't happen--  (_:_) -> case x of        -- brings (x ~ (_:_)) in scope-             (_:_) -> True-             []    -> False -- can't happen--Functions `genCaseTmCs1' and `genCaseTmCs2' are responsible for generating-these constraints.--}---- | Generate equalities when checking a case expression:---     case x of { p1 -> e1; ... pn -> en }--- When we go deeper to check e.g. e1 we record two equalities:--- (x ~ y), where y is the initial uncovered when checking (p1; .. ; pn)--- and (x ~ p1).-genCaseTmCs2 :: Maybe (LHsExpr GhcTc) -- Scrutinee-             -> [Pat GhcTc]           -- LHS       (should have length 1)-             -> [Id]                  -- MatchVars (should have length 1)-             -> DsM (Bag SimpleEq)-genCaseTmCs2 Nothing _ _ = return emptyBag-genCaseTmCs2 (Just scr) [p] [var] = do-  fam_insts <- dsGetFamInstEnvs-  [e] <- map vaToPmExpr . coercePatVec <$> translatePat fam_insts p-  let scr_e = lhsExprToPmExpr scr-  return $ listToBag [(var, e), (var, scr_e)]-genCaseTmCs2 _ _ _ = panic "genCaseTmCs2: HsCase"---- | Generate a simple equality when checking a case expression:---     case x of { matches }--- When checking matches we record that (x ~ y) where y is the initial--- uncovered. All matches will have to satisfy this equality.-genCaseTmCs1 :: Maybe (LHsExpr GhcTc) -> [Id] -> Bag SimpleEq-genCaseTmCs1 Nothing     _    = emptyBag-genCaseTmCs1 (Just scr) [var] = unitBag (var, lhsExprToPmExpr scr)-genCaseTmCs1 _ _              = panic "genCaseTmCs1: HsCase"--{- Note [Literals in PmPat]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Instead of translating a literal to a variable accompanied with a guard, we-treat them like constructor patterns. The following example from-"./libraries/base/GHC/IO/Encoding.hs" shows why:--mkTextEncoding' :: CodingFailureMode -> String -> IO TextEncoding-mkTextEncoding' cfm enc = case [toUpper c | c <- enc, c /= '-'] of-    "UTF8"    -> return $ UTF8.mkUTF8 cfm-    "UTF16"   -> return $ UTF16.mkUTF16 cfm-    "UTF16LE" -> return $ UTF16.mkUTF16le cfm-    ...--Each clause gets translated to a list of variables with an equal number of-guards. For every guard we generate two cases (equals True/equals False) which-means that we generate 2^n cases to feed the oracle with, where n is the sum of-the length of all strings that appear in the patterns. For this particular-example this means over 2^40 cases. Instead, by representing them like with-constructor we get the following:-  1. We exploit the common prefix with our representation of VSAs-  2. We prune immediately non-reachable cases-     (e.g. False == (x == "U"), True == (x == "U"))--Note [Translating As Patterns]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Instead of translating x@p as:  x (p <- x)-we instead translate it as:     p (x <- coercePattern p)-for performance reasons. For example:--  f x@True  = 1-  f y@False = 2--Gives the following with the first translation:--  x |> {x == False, x == y, y == True}--If we use the second translation we get an empty set, independently of the-oracle. Since the pattern `p' may contain guard patterns though, it cannot be-used as an expression. That's why we call `coercePatVec' to drop the guard and-`vaToPmExpr' to transform the value abstraction to an expression in the-guard pattern (value abstractions are a subset of expressions). We keep the-guards in the first pattern `p' though.---%************************************************************************-%*                                                                      *-      Pretty printing of exhaustiveness/redundancy check warnings-%*                                                                      *-%************************************************************************--}---- | Check whether any part of pattern match checking is enabled (does not--- matter whether it is the redundancy check or the exhaustiveness check).-isAnyPmCheckEnabled :: DynFlags -> DsMatchContext -> Bool-isAnyPmCheckEnabled dflags (DsMatchContext kind _loc)-  = wopt Opt_WarnOverlappingPatterns dflags || exhaustive dflags kind--instance Outputable ValVec where-  ppr (ValVec vva delta)-    = let (residual_eqs, subst) = wrapUpTmState (delta_tm_cs delta)-          vector                = substInValAbs subst vva-      in  ppr_uncovered (vector, residual_eqs)---- | Apply a term substitution to a value vector abstraction. All VAs are--- transformed to PmExpr (used only before pretty printing).-substInValAbs :: PmVarEnv -> [ValAbs] -> [PmExpr]-substInValAbs subst = map (exprDeepLookup subst . vaToPmExpr)---- | Wrap up the term oracle's state once solving is complete. Drop any--- information about unhandled constraints (involving HsExprs) and flatten--- (height 1) the substitution.-wrapUpTmState :: TmState -> ([ComplexEq], PmVarEnv)-wrapUpTmState (residual, (_, subst)) = (residual, flattenPmVarEnv subst)---- | Issue all the warnings (coverage, exhaustiveness, inaccessibility)-dsPmWarn :: DynFlags -> DsMatchContext -> PmResult -> DsM ()-dsPmWarn dflags ctx@(DsMatchContext kind loc) pm_result-  = when (flag_i || flag_u) $ do-      let exists_r = flag_i && notNull redundant && onlyBuiltin-          exists_i = flag_i && notNull inaccessible && onlyBuiltin && not is_rec_upd-          exists_u = flag_u && (case uncovered of-                                  TypeOfUncovered   _ -> True-                                  UncoveredPatterns u -> notNull u)--      when exists_r $ forM_ redundant $ \(dL->L l q) -> do-        putSrcSpanDs l (warnDs (Reason Opt_WarnOverlappingPatterns)-                               (pprEqn q "is redundant"))-      when exists_i $ forM_ inaccessible $ \(dL->L l q) -> do-        putSrcSpanDs l (warnDs (Reason Opt_WarnOverlappingPatterns)-                               (pprEqn q "has inaccessible right hand side"))-      when exists_u $ putSrcSpanDs loc $ warnDs flag_u_reason $-        case uncovered of-          TypeOfUncovered ty           -> warnEmptyCase ty-          UncoveredPatterns candidates -> pprEqns candidates-  where-    PmResult-      { pmresultProvenance = prov-      , pmresultRedundant = redundant-      , pmresultUncovered = uncovered-      , pmresultInaccessible = inaccessible } = pm_result--    flag_i = wopt Opt_WarnOverlappingPatterns dflags-    flag_u = exhaustive dflags kind-    flag_u_reason = maybe NoReason Reason (exhaustiveWarningFlag kind)--    is_rec_upd = case kind of { RecUpd -> True; _ -> False }-       -- See Note [Inaccessible warnings for record updates]--    onlyBuiltin = prov == FromBuiltin--    maxPatterns = maxUncoveredPatterns dflags--    -- Print a single clause (for redundant/with-inaccessible-rhs)-    pprEqn q txt = pp_context True ctx (text txt) $ \f -> ppr_eqn f kind q--    -- Print several clauses (for uncovered clauses)-    pprEqns qs = pp_context False ctx (text "are non-exhaustive") $ \_ ->-      case qs of -- See #11245-           [ValVec [] _]-                    -> text "Guards do not cover entire pattern space"-           _missing -> let us = map ppr qs-                       in  hang (text "Patterns not matched:") 4-                                (vcat (take maxPatterns us)-                                 $$ dots maxPatterns us)--    -- Print a type-annotated wildcard (for non-exhaustive `EmptyCase`s for-    -- which we only know the type and have no inhabitants at hand)-    warnEmptyCase ty = pp_context False ctx (text "are non-exhaustive") $ \_ ->-      hang (text "Patterns not matched:") 4 (underscore <+> dcolon <+> ppr ty)--{- Note [Inaccessible warnings for record updates]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #12957)-  data T a where-    T1 :: { x :: Int } -> T Bool-    T2 :: { x :: Int } -> T a-    T3 :: T a--  f :: T Char -> T a-  f r = r { x = 3 }--The desugarer will (conservatively generate a case for T1 even though-it's impossible:-  f r = case r of-          T1 x -> T1 3   -- Inaccessible branch-          T2 x -> T2 3-          _    -> error "Missing"--We don't want to warn about the inaccessible branch because the programmer-didn't put it there!  So we filter out the warning here.--}---- | Issue a warning when the predefined number of iterations is exceeded--- for the pattern match checker-warnPmIters :: DynFlags -> DsMatchContext -> DsM ()-warnPmIters dflags (DsMatchContext kind loc)-  = when (flag_i || flag_u) $ do-      iters <- maxPmCheckIterations <$> getDynFlags-      putSrcSpanDs loc (warnDs NoReason (msg iters))-  where-    ctxt   = pprMatchContext kind-    msg is = fsep [ text "Pattern match checker exceeded"-                  , parens (ppr is), text "iterations in", ctxt <> dot-                  , text "(Use -fmax-pmcheck-iterations=n"-                  , text "to set the maximum number of iterations to n)" ]--    flag_i = wopt Opt_WarnOverlappingPatterns dflags-    flag_u = exhaustive dflags kind--dots :: Int -> [a] -> SDoc-dots maxPatterns qs-    | qs `lengthExceeds` maxPatterns = text "..."-    | otherwise                      = empty---- | Check whether the exhaustiveness checker should run (exhaustiveness only)-exhaustive :: DynFlags -> HsMatchContext id -> Bool-exhaustive  dflags = maybe False (`wopt` dflags) . exhaustiveWarningFlag---- | Denotes whether an exhaustiveness check is supported, and if so,--- via which 'WarningFlag' it's controlled.--- Returns 'Nothing' if check is not supported.-exhaustiveWarningFlag :: HsMatchContext id -> Maybe WarningFlag-exhaustiveWarningFlag (FunRhs {})   = Just Opt_WarnIncompletePatterns-exhaustiveWarningFlag CaseAlt       = Just Opt_WarnIncompletePatterns-exhaustiveWarningFlag IfAlt         = Just Opt_WarnIncompletePatterns-exhaustiveWarningFlag LambdaExpr    = Just Opt_WarnIncompleteUniPatterns-exhaustiveWarningFlag PatBindRhs    = Just Opt_WarnIncompleteUniPatterns-exhaustiveWarningFlag PatBindGuards = Just Opt_WarnIncompletePatterns-exhaustiveWarningFlag ProcExpr      = Just Opt_WarnIncompleteUniPatterns-exhaustiveWarningFlag RecUpd        = Just Opt_WarnIncompletePatternsRecUpd-exhaustiveWarningFlag ThPatSplice   = Nothing-exhaustiveWarningFlag PatSyn        = Nothing-exhaustiveWarningFlag ThPatQuote    = Nothing-exhaustiveWarningFlag (StmtCtxt {}) = Nothing -- Don't warn about incomplete patterns-                                       -- in list comprehensions, pattern guards-                                       -- etc. They are often *supposed* to be-                                       -- incomplete---- True <==> singular-pp_context :: Bool -> DsMatchContext -> SDoc -> ((SDoc -> SDoc) -> SDoc) -> SDoc-pp_context singular (DsMatchContext kind _loc) msg rest_of_msg_fun-  = vcat [text txt <+> msg,-          sep [ text "In" <+> ppr_match <> char ':'-              , nest 4 (rest_of_msg_fun pref)]]-  where-    txt | singular  = "Pattern match"-        | otherwise = "Pattern match(es)"--    (ppr_match, pref)-        = case kind of-             FunRhs { mc_fun = (dL->L _ fun) }-                  -> (pprMatchContext kind, \ pp -> ppr fun <+> pp)-             _    -> (pprMatchContext kind, \ pp -> pp)--ppr_pats :: HsMatchContext Name -> [Pat GhcTc] -> SDoc-ppr_pats kind pats-  = sep [sep (map ppr pats), matchSeparator kind, text "..."]--ppr_eqn :: (SDoc -> SDoc) -> HsMatchContext Name -> [LPat GhcTc] -> SDoc-ppr_eqn prefixF kind eqn = prefixF (ppr_pats kind (map unLoc eqn))--ppr_constraint :: (SDoc,[PmLit]) -> SDoc-ppr_constraint (var, lits) = var <+> text "is not one of"-                                 <+> braces (pprWithCommas ppr lits)--ppr_uncovered :: ([PmExpr], [ComplexEq]) -> SDoc-ppr_uncovered (expr_vec, complex)-  | null cs   = fsep vec -- there are no literal constraints-  | otherwise = hang (fsep vec) 4 $-                  text "where" <+> vcat (map ppr_constraint cs)-  where-    sdoc_vec = mapM pprPmExprWithParens expr_vec-    (vec,cs) = runPmPprM sdoc_vec (filterComplex complex)--{- Note [Representation of Term Equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In the paper, term constraints always take the form (x ~ e). Of course, a more-general constraint of the form (e1 ~ e1) can always be transformed to an-equivalent set of the former constraints, by introducing a fresh, intermediate-variable: { y ~ e1, y ~ e1 }. Yet, implementing this representation gave rise-to #11160 (incredibly bad performance for literal pattern matching). Two are-the main sources of this problem (the actual problem is how these two interact-with each other):--1. Pattern matching on literals generates twice as many constraints as needed.-   Consider the following (tests/ghci/should_run/ghcirun004):--    foo :: Int -> Int-    foo 1    = 0-    ...-    foo 5000 = 4999--   The covered and uncovered set *should* look like:-     U0 = { x |> {} }--     C1  = { 1  |> { x ~ 1 } }-     U1  = { x  |> { False ~ (x ~ 1) } }-     ...-     C10 = { 10 |> { False ~ (x ~ 1), .., False ~ (x ~ 9), x ~ 10 } }-     U10 = { x  |> { False ~ (x ~ 1), .., False ~ (x ~ 9), False ~ (x ~ 10) } }-     ...--     If we replace { False ~ (x ~ 1) } with { y ~ False, y ~ (x ~ 1) }-     we get twice as many constraints. Also note that half of them are just the-     substitution [x |-> False].--2. The term oracle (`tmOracle` in deSugar/TmOracle) uses equalities of the form-   (x ~ e) as substitutions [x |-> e]. More specifically, function-   `extendSubstAndSolve` applies such substitutions in the residual constraints-   and partitions them in the affected and non-affected ones, which are the new-   worklist. Essentially, this gives quadradic behaviour on the number of the-   residual constraints. (This would not be the case if the term oracle used-   mutable variables but, since we use it to handle disjunctions on value set-   abstractions (`Union` case), we chose a pure, incremental interface).--Now the problem becomes apparent (e.g. for clause 300):-  * Set U300 contains 300 substituting constraints [y_i |-> False] and 300-    constraints that we know that will not reduce (stay in the worklist).-  * To check for consistency, we apply the substituting constraints ONE BY ONE-    (since `tmOracle` is called incrementally, it does not have all of them-    available at once). Hence, we go through the (non-progressing) constraints-    over and over, achieving over-quadradic behaviour.--If instead we allow constraints of the form (e ~ e),-  * All uncovered sets Ui contain no substituting constraints and i-    non-progressing constraints of the form (False ~ (x ~ lit)) so the oracle-    behaves linearly.-  * All covered sets Ci contain exactly (i-1) non-progressing constraints and-    a single substituting constraint. So the term oracle goes through the-    constraints only once.--The performance improvement becomes even more important when more arguments are-involved.--}---- Debugging Infrastructre--tracePm :: String -> SDoc -> PmM ()-tracePm herald doc = liftD $ tracePmD herald doc---tracePmD :: String -> SDoc -> DsM ()-tracePmD herald doc = do-  dflags <- getDynFlags-  printer <- mkPrintUnqualifiedDs-  liftIO $ dumpIfSet_dyn_printer printer dflags-            Opt_D_dump_ec_trace (text herald $$ (nest 2 doc))---pprPmPatDebug :: PmPat a -> SDoc-pprPmPatDebug (PmCon cc _arg_tys _con_tvs _con_dicts con_args)-  = hsep [text "PmCon", ppr cc, hsep (map pprPmPatDebug con_args)]-pprPmPatDebug (PmVar vid) = text "PmVar" <+> ppr vid-pprPmPatDebug (PmLit li)  = text "PmLit" <+> ppr li-pprPmPatDebug (PmNLit i nl) = text "PmNLit" <+> ppr i <+> ppr nl-pprPmPatDebug (PmGrd pv ge) = text "PmGrd" <+> hsep (map pprPmPatDebug pv)-                                           <+> ppr ge--pprPatVec :: PatVec -> SDoc-pprPatVec ps = hang (text "Pattern:") 2-                (brackets $ sep-                  $ punctuate (comma <> char '\n') (map pprPmPatDebug ps))--pprValAbs :: [ValAbs] -> SDoc-pprValAbs ps = hang (text "ValAbs:") 2-                (brackets $ sep-                  $ punctuate (comma) (map pprPmPatDebug ps))--pprValVecDebug :: ValVec -> SDoc-pprValVecDebug (ValVec vas _d) = text "ValVec" <+>-                                  parens (pprValAbs vas)
deSugar/Coverage.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE NondecreasingIndentation, RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE DeriveFunctor #-}  module Coverage (addTicksToBinds, hpcInitCode) where @@ -17,7 +18,7 @@ import ByteCodeTypes import GHC.Stack.CCS import Type-import HsSyn+import GHC.Hs import Module import Outputable import DynFlags@@ -49,6 +50,7 @@ import Trace.Hpc.Mix import Trace.Hpc.Util +import qualified Data.ByteString as BS import Data.Map (Map) import qualified Data.Map as Map @@ -119,7 +121,7 @@ guessSourceFile binds orig_file =      -- Try look for a file generated from a .hsc file to a      -- .hs file, by peeking ahead.-     let top_pos = catMaybes $ foldrBag (\ (dL->L pos _) rest ->+     let top_pos = catMaybes $ foldr (\ (dL->L pos _) rest ->                                  srcSpanFileName_maybe pos : rest) [] binds      in      case top_pos of@@ -325,7 +327,7 @@    where    -- a binding is a simple pattern binding if it is a funbind with    -- zero patterns-   isSimplePatBind :: HsBind a -> Bool+   isSimplePatBind :: HsBind GhcTc -> Bool    isSimplePatBind funBind = matchGroupArity (fun_matches funBind) == 0  -- TODO: Revisit this@@ -638,7 +640,7 @@ addTickTupArg (dL->L l (Present x e))  = do { e' <- addTickLHsExpr e                                             ; return (cL l (Present x e')) } addTickTupArg (dL->L l (Missing ty)) = return (cL l (Missing ty))-addTickTupArg (dL->L _ (XTupArg _)) = panic "addTickTupArg"+addTickTupArg (dL->L _ (XTupArg nec)) = noExtCon nec addTickTupArg _  = panic "addTickTupArg: Impossible Match" -- due to #15884  @@ -648,7 +650,7 @@   let isOneOfMany = matchesOneOfMany matches   matches' <- mapM (liftL (addTickMatch isOneOfMany is_lam)) matches   return $ mg { mg_alts = cL l matches' }-addTickMatchGroup _ (XMatchGroup _) = panic "addTickMatchGroup"+addTickMatchGroup _ (XMatchGroup nec) = noExtCon nec  addTickMatch :: Bool -> Bool -> Match GhcTc (LHsExpr GhcTc)              -> TM (Match GhcTc (LHsExpr GhcTc))@@ -657,7 +659,7 @@   bindLocals (collectPatsBinders pats) $ do     gRHSs' <- addTickGRHSs isOneOfMany isLambda gRHSs     return $ match { m_grhss = gRHSs' }-addTickMatch _ _ (XMatch _) = panic "addTickMatch"+addTickMatch _ _ (XMatch nec) = noExtCon nec  addTickGRHSs :: Bool -> Bool -> GRHSs GhcTc (LHsExpr GhcTc)              -> TM (GRHSs GhcTc (LHsExpr GhcTc))@@ -668,7 +670,7 @@     return $ GRHSs x guarded' (cL l local_binds')   where     binders = collectLocalBinders local_binds-addTickGRHSs _ _ (XGRHSs _) = panic "addTickGRHSs"+addTickGRHSs _ _ (XGRHSs nec) = noExtCon nec  addTickGRHS :: Bool -> Bool -> GRHS GhcTc (LHsExpr GhcTc)             -> TM (GRHS GhcTc (LHsExpr GhcTc))@@ -676,7 +678,7 @@   (stmts',expr') <- addTickLStmts' (Just $ BinBox $ GuardBinBox) stmts                         (addTickGRHSBody isOneOfMany isLambda expr)   return $ GRHS x stmts' expr'-addTickGRHS _ _ (XGRHS _) = panic "addTickGRHS"+addTickGRHS _ _ (XGRHS nec) = noExtCon nec  addTickGRHSBody :: Bool -> Bool -> LHsExpr GhcTc -> TM (LHsExpr GhcTc) addTickGRHSBody isOneOfMany isLambda expr@(dL->L pos e0) = do@@ -755,7 +757,7 @@        ; return (stmt { recS_stmts = stmts', recS_ret_fn = ret'                       , recS_mfix_fn = mfix', recS_bind_fn = bind' }) } -addTickStmt _ (XStmtLR _) = panic "addTickStmt"+addTickStmt _ (XStmtLR nec) = noExtCon nec  addTick :: Maybe (Bool -> BoxLabel) -> LHsExpr GhcTc -> TM (LHsExpr GhcTc) addTick isGuard e | Just fn <- isGuard = addBinTickLHsExpr fn e@@ -767,17 +769,18 @@ addTickApplicativeArg isGuard (op, arg) =   liftM2 (,) (addTickSyntaxExpr hpcSrcSpan op) (addTickArg arg)  where-  addTickArg (ApplicativeArgOne x pat expr isBody) =+  addTickArg (ApplicativeArgOne x pat expr isBody fail) =     (ApplicativeArgOne x)       <$> addTickLPat pat       <*> addTickLHsExpr expr       <*> pure isBody+      <*> addTickSyntaxExpr hpcSrcSpan fail   addTickArg (ApplicativeArgMany x stmts ret pat) =     (ApplicativeArgMany x)       <$> addTickLStmts isGuard stmts       <*> (unLoc <$> addTickLHsExpr (cL hpcSrcSpan ret))       <*> addTickLPat pat-  addTickArg (XApplicativeArg _) = panic "addTickApplicativeArg"+  addTickArg (XApplicativeArg nec) = noExtCon nec  addTickStmtAndBinders :: Maybe (Bool -> BoxLabel) -> ParStmtBlock GhcTc GhcTc                       -> TM (ParStmtBlock GhcTc GhcTc)@@ -786,7 +789,7 @@         (addTickLStmts isGuard stmts)         (return ids)         (addTickSyntaxExpr hpcSrcSpan returnExpr)-addTickStmtAndBinders _ (XParStmtBlock{}) = panic "addTickStmtAndBinders"+addTickStmtAndBinders _ (XParStmtBlock nec) = noExtCon nec  addTickHsLocalBinds :: HsLocalBinds GhcTc -> TM (HsLocalBinds GhcTc) addTickHsLocalBinds (HsValBinds x binds) =@@ -839,7 +842,7 @@         liftM2 HsCmdTop                 (return x)                 (addTickLHsCmd cmd)-addTickHsCmdTop (XCmdTop{}) = panic "addTickHsCmdTop"+addTickHsCmdTop (XCmdTop nec) = noExtCon nec  addTickLHsCmd ::  LHsCmd GhcTc -> TM (LHsCmd GhcTc) addTickLHsCmd (dL->L pos c0) = do@@ -895,7 +898,7 @@ addTickHsCmd (HsCmdWrap x w cmd)   = liftM2 (HsCmdWrap x) (return w) (addTickHsCmd cmd) -addTickHsCmd e@(XCmd {})  = pprPanic "addTickHsCmd" (ppr e)+addTickHsCmd (XCmd nec) = noExtCon nec  -- Others should never happen in a command context. --addTickHsCmd e  = pprPanic "addTickHsCmd" (ppr e)@@ -905,14 +908,14 @@ addTickCmdMatchGroup mg@(MG { mg_alts = (dL->L l matches) }) = do   matches' <- mapM (liftL addTickCmdMatch) matches   return $ mg { mg_alts = cL l matches' }-addTickCmdMatchGroup (XMatchGroup _) = panic "addTickCmdMatchGroup"+addTickCmdMatchGroup (XMatchGroup nec) = noExtCon nec  addTickCmdMatch :: Match GhcTc (LHsCmd GhcTc) -> TM (Match GhcTc (LHsCmd GhcTc)) addTickCmdMatch match@(Match { m_pats = pats, m_grhss = gRHSs }) =   bindLocals (collectPatsBinders pats) $ do     gRHSs' <- addTickCmdGRHSs gRHSs     return $ match { m_grhss = gRHSs' }-addTickCmdMatch (XMatch _) = panic "addTickCmdMatch"+addTickCmdMatch (XMatch nec) = noExtCon nec  addTickCmdGRHSs :: GRHSs GhcTc (LHsCmd GhcTc) -> TM (GRHSs GhcTc (LHsCmd GhcTc)) addTickCmdGRHSs (GRHSs x guarded (dL->L l local_binds)) = do@@ -922,7 +925,7 @@     return $ GRHSs x guarded' (cL l local_binds')   where     binders = collectLocalBinders local_binds-addTickCmdGRHSs (XGRHSs _) = panic "addTickCmdGRHSs"+addTickCmdGRHSs (XGRHSs nec) = noExtCon nec  addTickCmdGRHS :: GRHS GhcTc (LHsCmd GhcTc) -> TM (GRHS GhcTc (LHsCmd GhcTc)) -- The *guards* are *not* Cmds, although the body is@@ -931,7 +934,7 @@   = do { (stmts',expr') <- addTickLStmts' (Just $ BinBox $ GuardBinBox)                                    stmts (addTickLHsCmd cmd)        ; return $ GRHS x stmts' expr' }-addTickCmdGRHS (XGRHS _) = panic "addTickCmdGRHS"+addTickCmdGRHS (XGRHS nec) = noExtCon nec  addTickLCmdStmts :: [LStmt GhcTc (LHsCmd GhcTc)]                  -> TM [LStmt GhcTc (LHsCmd GhcTc)]@@ -978,8 +981,8 @@                       , recS_mfix_fn = mfix', recS_bind_fn = bind' }) } addTickCmdStmt ApplicativeStmt{} =   panic "ToDo: addTickCmdStmt ApplicativeLastStmt"-addTickCmdStmt XStmtLR{} =-  panic "addTickCmdStmt XStmtLR"+addTickCmdStmt (XStmtLR nec) =+  noExtCon nec  -- Others should never happen in a command context. addTickCmdStmt stmt  = pprPanic "addTickHsCmd" (ppr stmt)@@ -1069,13 +1072,11 @@ --   to filter additions to the latter.  This gives us complete control --   over what free variables we track. -data TM a = TM { unTM :: TickTransEnv -> TickTransState -> (a,FreeVars,TickTransState) }+newtype TM a = TM { unTM :: TickTransEnv -> TickTransState -> (a,FreeVars,TickTransState) }+    deriving (Functor)         -- a combination of a state monad (TickTransState) and a writer         -- monad (FreeVars). -instance Functor TM where-    fmap = liftM- instance Applicative TM where     pure a = TM $ \ _env st -> (a,noFVs,st)     (<*>) = ap@@ -1175,7 +1176,7 @@     (fvs, e) <- getFreeVars m     env <- getEnv     tickish <- mkTickish boxLabel countEntries topOnly pos fvs (declPath env)-    return (cL pos (HsTick noExt tickish (cL pos e)))+    return (cL pos (HsTick noExtField tickish (cL pos e)))   ) (do     e <- m     return (cL pos e)@@ -1262,8 +1263,8 @@       c = tickBoxCount st       mes = mixEntries st   in-     ( cL pos $ HsTick noExt (HpcTick (this_mod env) c)-          $ cL pos $ HsBinTick noExt (c+1) (c+2) e+     ( cL pos $ HsTick noExtField (HpcTick (this_mod env) c)+          $ cL pos $ HsBinTick noExtField (c+1) (c+2) e    -- notice that F and T are reversed,    -- because we are building the list in    -- reverse...@@ -1292,9 +1293,9 @@   where         matchCount (dL->L _ (Match { m_grhss = GRHSs _ grhss _ }))           = length grhss-        matchCount (dL->L _ (Match { m_grhss = XGRHSs _ }))-          = panic "matchesOneOfMany"-        matchCount (dL->L _ (XMatch _)) = panic "matchesOneOfMany"+        matchCount (dL->L _ (Match { m_grhss = XGRHSs nec }))+          = noExtCon nec+        matchCount (dL->L _ (XMatch nec)) = noExtCon nec         matchCount _ = panic "matchCount: Impossible Match" -- due to #15884  type MixEntry_ = (SrcSpan, [String], [OccName], BoxLabel)@@ -1352,9 +1353,9 @@   where     tickboxes = ppr (mkHpcTicksLabel $ this_mod) -    module_name  = hcat (map (text.charToC) $+    module_name  = hcat (map (text.charToC) $ BS.unpack $                          bytesFS (moduleNameFS (Module.moduleName this_mod)))-    package_name = hcat (map (text.charToC) $+    package_name = hcat (map (text.charToC) $ BS.unpack $                          bytesFS (unitIdFS  (moduleUnitId this_mod)))     full_name_str        | moduleUnitId this_mod == mainUnitId
deSugar/Desugar.hs view
@@ -22,7 +22,7 @@ import DsUsage import DynFlags import HscTypes-import HsSyn+import GHC.Hs import TcRnTypes import TcRnMonad  ( finalSafeMode, fixSafeInstances ) import TcRnDriver ( runTcInteractive )@@ -114,7 +114,7 @@    = do { let dflags = hsc_dflags hsc_env              print_unqual = mkPrintUnqualified dflags rdr_env-        ; withTiming (pure dflags)+        ; withTiming dflags                      (text "Desugar"<+>brackets (ppr mod))                      (const ()) $      do { -- Desugar the program@@ -412,7 +412,7 @@          ; return (Just rule)         } } }-dsRule (dL->L _ (XRuleDecl _)) = panic "dsRule"+dsRule (dL->L _ (XRuleDecl nec)) = noExtCon nec dsRule _ = panic "dsRule: Impossible Match" -- due to #15884  warnRuleShadowing :: RuleName -> Activation -> Id -> [Id] -> DsM ()@@ -533,7 +533,7 @@  Class methods have a built-in RULE to select the method from the dictionary, so you can't change the phase on this.  That makes id very dubious to-match on class methods in RULE lhs's.   See Trac #10595.   I'm not happy+match on class methods in RULE lhs's.   See #10595.   I'm not happy about this. For example in Control.Arrow we have  {-# RULES "compose/arr"   forall f g .
deSugar/DsArrows.hs view
@@ -20,11 +20,11 @@ import DsUtils import DsMonad -import HsSyn    hiding (collectPatBinders, collectPatsBinders,+import GHC.Hs   hiding (collectPatBinders, collectPatsBinders,                         collectLStmtsBinders, collectLStmtBinders,                         collectStmtBinders ) import TcHsSyn-import qualified HsUtils+import qualified GHC.Hs.Utils as HsUtils  -- NB: The desugarer, which straddles the source and Core worlds, sometimes --     needs to see source types (newtypes etc), and sometimes not@@ -50,7 +50,6 @@ import BasicTypes import PrelNames import Outputable-import Bag import VarSet import SrcLoc import ListSetOps( assocMaybe )@@ -63,7 +62,7 @@     }  mkCmdEnv :: CmdSyntaxTable GhcTc -> DsM ([CoreBind], DsCmdEnv)--- See Note [CmdSyntaxTable] in HsExpr+-- See Note [CmdSyntaxTable] in GHC.Hs.Expr mkCmdEnv tc_meths   = do { (meth_binds, prs) <- mapAndUnzipM mk_bind tc_meths @@ -592,11 +591,11 @@     left_con <- dsLookupDataCon leftDataConName     right_con <- dsLookupDataCon rightDataConName     let-        left_id  = HsConLikeOut noExt (RealDataCon left_con)-        right_id = HsConLikeOut noExt (RealDataCon right_con)-        left_expr  ty1 ty2 e = noLoc $ HsApp noExt+        left_id  = HsConLikeOut noExtField (RealDataCon left_con)+        right_id = HsConLikeOut noExtField (RealDataCon right_con)+        left_expr  ty1 ty2 e = noLoc $ HsApp noExtField                            (noLoc $ mkHsWrap (mkWpTyApps [ty1, ty2]) left_id ) e-        right_expr ty1 ty2 e = noLoc $ HsApp noExt+        right_expr ty1 ty2 e = noLoc $ HsApp noExtField                            (noLoc $ mkHsWrap (mkWpTyApps [ty1, ty2]) right_id) e          -- Prefix each tuple with a distinct series of Left's and Right's,@@ -616,7 +615,7 @@         (_, matches') = mapAccumL (replaceLeavesMatch res_ty) leaves' matches         in_ty = envStackType env_ids stack_ty -    core_body <- dsExpr (HsCase noExt exp+    core_body <- dsExpr (HsCase noExtField exp                          (MG { mg_alts = cL l matches'                              , mg_ext = MatchGroupTc arg_tys sum_ty                              , mg_origin = origin }))@@ -1167,7 +1166,7 @@   = let         (leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss     in-    (leaves', cL loc (match { m_ext = noExt, m_grhss = GRHSs x grhss' binds }))+    (leaves', cL loc (match { m_ext = noExtField, m_grhss = GRHSs x grhss' binds })) replaceLeavesMatch _ _ _ = panic "replaceLeavesMatch"  replaceLeavesGRHS@@ -1192,10 +1191,10 @@     fold_pairs (x1:x2:xs) = f x1 x2:fold_pairs xs  {--Note [Dictionary binders in ConPatOut] See also same Note in HsUtils+Note [Dictionary binders in ConPatOut] See also same Note in GHC.Hs.Utils ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following functions to collect value variables from patterns are-copied from HsUtils, with one change: we also collect the dictionary+copied from GHC.Hs.Utils, with one change: we also collect the dictionary bindings (pat_binds) from ConPatOut.  We need them for cases like  h :: Arrow a => Int -> a (Int,Int) Int@@ -1209,7 +1208,7 @@  Here p77 is a local binding for the (+) operation. -See comments in HsUtils for why the other version does not include+See comments in GHC.Hs.Utils for why the other version does not include these bindings. -} @@ -1251,7 +1250,7 @@     go p@(XPat {})                = pprPanic "collectl/go" (ppr p)  collectEvBinders :: TcEvBinds -> [Id]-collectEvBinders (EvBinds bs)   = foldrBag add_ev_bndr [] bs+collectEvBinders (EvBinds bs)   = foldr add_ev_bndr [] bs collectEvBinders (TcEvBinds {}) = panic "ToDo: collectEvBinders"  add_ev_bndr :: EvBind -> [Id] -> [Id]
deSugar/DsBinds.hs view
@@ -29,9 +29,9 @@ import DsMonad import DsGRHSs import DsUtils-import Check ( checkGuardMatches )+import GHC.HsToCore.PmCheck ( needToRunPmCheck, addTyCsDs, checkGuardMatches ) -import HsSyn            -- lots of things+import GHC.Hs           -- lots of things import CoreSyn          -- lots of things import CoreOpt          ( simpleOptExpr ) import OccurAnal        ( occurAnalyseExpr )@@ -41,6 +41,7 @@ import CoreUnfold import CoreFVs import Digraph+import Predicate  import PrelNames import TyCon@@ -186,11 +187,15 @@                           , abs_exports = exports                           , abs_ev_binds = ev_binds                           , abs_binds = binds, abs_sig = has_sig })-  = do { ds_binds <- addDictsDs (listToBag dicts) $-                     dsLHsBinds binds-                         -- addDictsDs: push type constraints deeper-                         --             for inner pattern match check-                         -- See Check, Note [Type and Term Equality Propagation]+  = do { ds_binds <- applyWhen (needToRunPmCheck dflags FromSource)+                               -- FromSource might not be accurate, but at worst+                               -- we do superfluous calls to the pattern match+                               -- oracle.+                               -- addTyCsDs: push type constraints deeper+                               --            for inner pattern match check+                               -- See Check, Note [Type and Term Equality Propagation]+                               (addTyCsDs (listToBag dicts))+                               (dsLHsBinds binds)         ; ds_ev_binds <- dsTcEvBinds_s ev_binds @@ -198,7 +203,7 @@        ; dsAbsBinds dflags tyvars dicts exports ds_ev_binds ds_binds has_sig }  dsHsBind _ (PatSynBind{}) = panic "dsHsBind: PatSynBind"-dsHsBind _ (XHsBindsLR{}) = panic "dsHsBind: XHsBindsLR"+dsHsBind _ (XHsBindsLR nec) = noExtCon nec   -----------------------@@ -258,7 +263,7 @@                    ; return (makeCorePair dflags global                                           (isDefaultMethod prags)                                           0 (core_wrap (Var local))) }-             mk_bind (XABExport _) = panic "dsAbsBinds"+             mk_bind (XABExport nec) = noExtCon nec        ; main_binds <- mapM mk_bind exports         ; return (force_vars, flattenBinds ds_ev_binds ++ bind_prs ++ main_binds) }@@ -303,7 +308,7 @@                            -- the user written (local) function.  The global                            -- Id is just the selector.  Hmm.                      ; return ((global', rhs) : fromOL spec_binds) }-             mk_bind (XABExport _) = panic "dsAbsBinds"+             mk_bind (XABExport nec) = noExtCon nec         ; export_binds_s <- mapM mk_bind (exports ++ extra_exports) @@ -351,7 +356,7 @@     mk_export local =       do global <- newSysLocalDs                      (exprType (mkLams tyvars (mkLams dicts (Var local))))-         return (ABE { abe_ext   = noExt+         return (ABE { abe_ext   = noExtField                      , abe_poly  = global                      , abe_mono  = local                      , abe_wrap  = WpHole@@ -530,7 +535,7 @@  Note [Desugar Strict binds] ~~~~~~~~~~~~~~~~~~~~~~~~~~~-See https://ghc.haskell.org/trac/ghc/wiki/StrictPragma+See https://gitlab.haskell.org/ghc/ghc/wikis/strict-pragma  Desugaring strict variable bindings looks as follows (core below ==>) @@ -598,7 +603,7 @@   in tm `seq` <body>  -See https://ghc.haskell.org/trac/ghc/wiki/StrictPragma for a more+See https://gitlab.haskell.org/ghc/ghc/wikis/strict-pragma for a more detailed explanation of the desugaring of strict bindings.  Note [Strict binds checks]@@ -614,9 +619,9 @@   x :: Char   (# True, x #) = blah -is *not* an unlifted bind. Unlifted binds are detected by HsUtils.isUnliftedHsBind.+is *not* an unlifted bind. Unlifted binds are detected by GHC.Hs.Utils.isUnliftedHsBind. -Define a "banged bind" to have a top-level bang. Detected by HsPat.isBangedHsBind.+Define a "banged bind" to have a top-level bang. Detected by GHC.Hs.Pat.isBangedHsBind. Define a "strict bind" to be either an unlifted bind or a banged bind.  The restrictions are:@@ -776,7 +781,7 @@  We might want to specialise 'f' so that we in turn specialise '$wf'. We can't even /name/ '$wf' in the source code, so we can't specialise-it even if we wanted to.  Trac #10721 is a case in point.+it even if we wanted to.  #10721 is a case in point.  Note [Activation pragmas for SPECIALISE] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -792,7 +797,7 @@ * Activation of RULE: from SPECIALISE pragma (if activation given)                       otherwise from f's inline pragma -This is not obvious (see Trac #5237)!+This is not obvious (see #5237)!  Examples      Rule activation   Inline prag on spec'd fn ---------------------------------------------------------------------@@ -875,7 +880,7 @@                            , not (v `elemVarSet` orig_bndr_set)                            , not (v == fn_id) ]          -- fn_id: do not quantify over the function itself, which may-         -- itself be a dictionary (in pathological cases, Trac #10251)+         -- itself be a dictionary (in pathological cases, #10251)     decompose (Var fn_id) args       | not (fn_id `elemVarSet` orig_bndr_set)@@ -1018,7 +1023,7 @@      NB3: In the common case of a non-overloaded, but perhaps-polymorphic          specialisation, we don't need to bind *any* dictionaries for use-         in the RHS. For example (Trac #8331)+         in the RHS. For example (#8331)              {-# SPECIALIZE INLINE useAbstractMonad :: ReaderST s Int #-}              useAbstractMonad :: MonadAbstractIOST m => m Int          Here, deriving (MonadAbstractIOST (ReaderST s)) is a lot of code@@ -1026,7 +1031,7 @@              RULE forall s (d :: MonadAbstractIOST (ReaderT s)).                 useAbstractMonad (ReaderT s) d = $suseAbstractMonad s -   Trac #8848 is a good example of where there are some interesting+   #8848 is a good example of where there are some interesting    dictionary bindings to discard.  The drop_dicts algorithm is based on these observations:@@ -1068,12 +1073,6 @@        otherwise we don't match when given an argument like           augment (\a. h a a) (build h) -Note [Matching seqId]-~~~~~~~~~~~~~~~~~~~-The desugarer turns (seq e r) into (case e of _ -> r), via a special-case hack-and this code turns it back into an application of seq!-See Note [Rules for seq] in MkId for the details.- Note [Unused spec binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider@@ -1164,7 +1163,7 @@   = map ds_scc (stronglyConnCompFromEdgedVerticesUniq edges)   where     edges :: [ Node EvVar (EvVar,CoreExpr) ]-    edges = foldrBag ((:) . mk_node) [] ds_binds+    edges = foldr ((:) . mk_node) [] ds_binds      mk_node :: (Id, CoreExpr) -> Node EvVar (EvVar,CoreExpr)     mk_node b@(var, rhs)
+ deSugar/DsBinds.hs-boot view
@@ -0,0 +1,6 @@+module DsBinds where+import DsMonad     ( DsM )+import CoreSyn     ( CoreExpr )+import TcEvidence (HsWrapper)++dsHsWrapper :: HsWrapper -> DsM (CoreExpr -> CoreExpr)
deSugar/DsCCall.hs view
@@ -120,7 +120,7 @@     mkApps (mkVarApps (Var the_fcall_id) tyvars) val_args   where     arg_tys = map exprType val_args-    body_ty = (mkFunTys arg_tys res_ty)+    body_ty = (mkVisFunTys arg_tys res_ty)     tyvars  = tyCoVarsOfTypeWellScoped body_ty     ty      = mkInvForAllTys tyvars body_ty     the_fcall_id = mkFCallId dflags uniq the_fcall ty@@ -251,7 +251,7 @@                                              [the_alt]                                      ] -        ; return (realWorldStatePrimTy `mkFunTy` ccall_res_ty, wrap) }+        ; return (realWorldStatePrimTy `mkVisFunTy` ccall_res_ty, wrap) }  boxResult result_ty   = do -- It isn't IO, so do unsafePerformIO@@ -263,7 +263,7 @@                                            ccall_res_ty                                            (coreAltType the_alt)                                            [the_alt]-       return (realWorldStatePrimTy `mkFunTy` ccall_res_ty, wrap)+       return (realWorldStatePrimTy `mkVisFunTy` ccall_res_ty, wrap)   where     return_result _ [ans] = ans     return_result _ _     = panic "return_result: expected single result"
deSugar/DsExpr.hs view
@@ -25,19 +25,18 @@ import DsUtils import DsArrows import DsMonad-import Check ( checkGuardMatches )+import GHC.HsToCore.PmCheck ( checkGuardMatches ) import Name import NameEnv import FamInstEnv( topNormaliseType ) import DsMeta-import HsSyn+import GHC.Hs  -- NB: The desugarer, which straddles the source and Core worlds, sometimes --     needs to see source types import TcType import TcEvidence import TcRnMonad-import TcHsSyn import Type import CoreSyn import CoreUtils@@ -50,6 +49,7 @@ import Module import ConLike import DataCon+import TyCoPpr( pprWithTYPE ) import TysWiredIn import PrelNames import BasicTypes@@ -98,7 +98,7 @@       = do e' <- dsLExpr e            return (Let (NonRec n e') body)     ds_ip_bind _ _ = panic "dsIPBinds"-dsIPBinds (XHsIPBinds _) _ = panic "dsIPBinds"+dsIPBinds (XHsIPBinds nec) _ = noExtCon nec  ------------------------- -- caller sets location@@ -122,7 +122,7 @@             -- f x = let p@(Ptr y) = ... in ...             -- Here the binding for 'p' is polymorphic, but does             -- not mix with an unlifted binding for 'y'.  You should-            -- use a bang pattern.  Trac #6078.+            -- use a bang pattern.  #6078.      else do { when (looksLazyPatBind bind) $               warnIfSetDs Opt_WarnUnbangedStrictPatterns (unlifted_must_be_bang bind)@@ -187,7 +187,7 @@                , abs_binds = lbinds }) body   = do { let body1 = foldr bind_export body exports              bind_export export b = bindNonRec (abe_poly export) (Var (abe_mono export)) b-       ; body2 <- foldlBagM (\body lbind -> dsUnliftedBind (unLoc lbind) body)+       ; body2 <- foldlM (\body lbind -> dsUnliftedBind (unLoc lbind) body)                             body1 lbinds        ; ds_binds <- dsTcEvBinds_s ev_binds        ; return (mkCoreLets ds_binds body2) }@@ -393,6 +393,7 @@                 -- The reverse is because foldM goes left-to-right                       (\(lam_vars, args) -> mkCoreLams lam_vars $                                             mkCoreTupBoxity boxity args) }+                        -- See Note [Don't flatten tuples from HsSyn] in MkCore  ds_expr _ (ExplicitSum types alt arity expr)   = do { dsWhenNoErrs (dsLExprNoLP expr)@@ -451,7 +452,7 @@   | otherwise   = do { match_result <- liftM (foldr1 combineMatchResults)                                (mapM (dsGRHS IfAlt res_ty) alts)-       ; checkGuardMatches IfAlt (GRHSs noExt alts (noLoc emptyLocalBinds))+       ; checkGuardMatches IfAlt (GRHSs noExtField alts (noLoc emptyLocalBinds))        ; error_expr   <- mkErrorExpr        ; extractMatchResult match_result error_expr }   where@@ -622,7 +623,7 @@       -- Clone the Id in the HsRecField, because its Name is that       -- of the record selector, and we must not make that a local binder       -- else we shadow other uses of the record selector-      -- Hence 'lcl_id'.  Cf Trac #2735+      -- Hence 'lcl_id'.  Cf #2735     ds_field (dL->L _ rec_field)       = do { rhs <- dsLExpr (hsRecFieldArg rec_field)            ; let fld_id = unLoc (hsRecUpdFieldId rec_field)@@ -663,7 +664,7 @@                  mk_val_arg fl pat_arg_id                      = nlHsVar (lookupNameEnv upd_fld_env (flSelector fl) `orElse` pat_arg_id) -                 inst_con = noLoc $ mkHsWrap wrap (HsConLikeOut noExt con)+                 inst_con = noLoc $ mkHsWrap wrap (HsConLikeOut noExtField con)                         -- Reconstruct with the WrapId so that unpacking happens                  wrap = mkWpEvVarApps theta_vars                                <.>                         dict_req_wrap                                           <.>@@ -752,15 +753,9 @@  -- HsSyn constructs that just shouldn't be here: ds_expr _ (HsBracket     {})  = panic "dsExpr:HsBracket"-ds_expr _ (HsArrApp      {})  = panic "dsExpr:HsArrApp"-ds_expr _ (HsArrForm     {})  = panic "dsExpr:HsArrForm"-ds_expr _ (EWildPat      {})  = panic "dsExpr:EWildPat"-ds_expr _ (EAsPat        {})  = panic "dsExpr:EAsPat"-ds_expr _ (EViewPat      {})  = panic "dsExpr:EViewPat"-ds_expr _ (ELazyPat      {})  = panic "dsExpr:ELazyPat" ds_expr _ (HsDo          {})  = panic "dsExpr:HsDo" ds_expr _ (HsRecFld      {})  = panic "dsExpr:HsRecFld"-ds_expr _ (XExpr         {})  = panic "dsExpr: XExpr"+ds_expr _ (XExpr nec)         = noExtCon nec   ------------------------------@@ -929,25 +924,26 @@              let                (pats, rhss) = unzip (map (do_arg . snd) args) -               do_arg (ApplicativeArgOne _ pat expr _) =-                 (pat, dsLExpr expr)+               do_arg (ApplicativeArgOne _ pat expr _ fail_op) =+                 ((pat, fail_op), dsLExpr expr)                do_arg (ApplicativeArgMany _ stmts ret pat) =-                 (pat, dsDo (stmts ++ [noLoc $ mkLastStmt (noLoc ret)]))-               do_arg (XApplicativeArg _) = panic "dsDo"--               arg_tys = map hsLPatType pats+                 ((pat, noSyntaxExpr), dsDo (stmts ++ [noLoc $ mkLastStmt (noLoc ret)]))+               do_arg (XApplicativeArg nec) = noExtCon nec             ; rhss' <- sequence rhss -           ; let body' = noLoc $ HsDo body_ty DoExpr (noLoc stmts)+           ; body' <- dsLExpr $ noLoc $ HsDo body_ty DoExpr (noLoc stmts) -           ; let fun = cL noSrcSpan $ HsLam noExt $-                   MG { mg_alts = noLoc [mkSimpleMatch LambdaExpr pats-                                                       body']-                      , mg_ext = MatchGroupTc arg_tys body_ty-                      , mg_origin = Generated }+           ; let match_args (pat, fail_op) (vs,body)+                   = do { var   <- selectSimpleMatchVarL pat+                        ; match <- matchSinglePatVar var (StmtCtxt DoExpr) pat+                                   body_ty (cantFailMatchResult body)+                        ; match_code <- handle_failure pat match fail_op+                        ; return (var:vs, match_code)+                        } -           ; fun' <- dsLExpr fun+           ; (vars, body) <- foldrM match_args ([],body') pats+           ; let fun' = mkLams vars body            ; let mk_ap_call l (op,r) = dsSyntaxExpr op [l,r]            ; expr <- foldlM mk_ap_call fun' (zip (map fst args) rhss')            ; case mb_join of@@ -973,13 +969,13 @@         later_pats   = rec_tup_pats         rets         = map noLoc rec_rets         mfix_app     = nlHsSyntaxApps mfix_op [mfix_arg]-        mfix_arg     = noLoc $ HsLam noExt+        mfix_arg     = noLoc $ HsLam noExtField                            (MG { mg_alts = noLoc [mkSimpleMatch                                                     LambdaExpr                                                     [mfix_pat] body]                                , mg_ext = MatchGroupTc [tup_ty] body_ty                                , mg_origin = Generated })-        mfix_pat     = noLoc $ LazyPat noExt $ mkBigLHsPatTupId rec_tup_pats+        mfix_pat     = noLoc $ LazyPat noExtField $ mkBigLHsPatTupId rec_tup_pats         body         = noLoc $ HsDo body_ty                                 DoExpr (noLoc (rec_stmts ++ [ret_stmt]))         ret_app      = nlHsSyntaxApps return_op [mkBigLHsTupId rets]@@ -990,7 +986,7 @@      go _ (ParStmt   {}) _ = panic "dsDo ParStmt"     go _ (TransStmt {}) _ = panic "dsDo TransStmt"-    go _ (XStmtLR   {}) _ = panic "dsDo XStmtLR"+    go _ (XStmtLR nec)  _ = noExtCon nec  handle_failure :: LPat GhcTc -> MatchResult -> SyntaxExpr GhcTc -> DsM CoreExpr     -- In a do expression, pattern-match failure just calls@@ -1097,7 +1093,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We cannot have levity polymorphic function arguments. See Note [Levity polymorphism invariants] in CoreSyn. But we *can* have-functions that take levity polymorphism arguments, as long as these+functions that take levity polymorphic arguments, as long as these functions are eta-reduced. (See #12708 for an example.)  However, we absolutely cannot do this for functions that have no@@ -1168,7 +1164,11 @@  levPolyPrimopErr :: Id -> Type -> [Type] -> DsM () levPolyPrimopErr primop ty bad_tys-  = errDs $ vcat [ hang (text "Cannot use primitive with levity-polymorphic arguments:")-                      2 (ppr primop <+> dcolon <+> pprWithTYPE ty)-                 , hang (text "Levity-polymorphic arguments:")-                      2 (vcat (map (\t -> pprWithTYPE t <+> dcolon <+> pprWithTYPE (typeKind t)) bad_tys)) ]+  = errDs $ vcat+    [ hang (text "Cannot use function with levity-polymorphic arguments:")+         2 (ppr primop <+> dcolon <+> pprWithTYPE ty)+    , hang (text "Levity-polymorphic arguments:")+         2 $ vcat $ map+           (\t -> pprWithTYPE t <+> dcolon <+> pprWithTYPE (typeKind t))+           bad_tys+    ]
deSugar/DsExpr.hs-boot view
@@ -1,8 +1,8 @@ module DsExpr where-import HsSyn       ( HsExpr, LHsExpr, LHsLocalBinds, SyntaxExpr )+import GHC.Hs      ( HsExpr, LHsExpr, LHsLocalBinds, SyntaxExpr ) import DsMonad     ( DsM ) import CoreSyn     ( CoreExpr )-import HsExtension ( GhcTc)+import GHC.Hs.Extension ( GhcTc)  dsExpr  :: HsExpr GhcTc -> DsM CoreExpr dsLExpr, dsLExprNoLP :: LHsExpr GhcTc -> DsM CoreExpr
deSugar/DsForeign.hs view
@@ -23,7 +23,7 @@ import DsCCall import DsMonad -import HsSyn+import GHC.Hs import DataCon import CoreUnfold import Id@@ -49,8 +49,7 @@ import Outputable import FastString import DynFlags-import Platform-import Config+import GHC.Platform import OrdList import Pair import Util@@ -113,7 +112,7 @@                               (dL->L _ (CExportStatic _ ext_nm cconv)) _ }) = do       (h, c, _, _) <- dsFExport id co ext_nm cconv False       return (h, c, [id], [])-   do_decl (XForeignDecl _) = panic "dsForeigns'"+   do_decl (XForeignDecl nec) = noExtCon nec  {- ************************************************************************@@ -271,7 +270,7 @@                   return (fcall, empty)     let         -- Build the worker-        worker_ty     = mkForAllTys tv_bndrs (mkFunTys (map idType work_arg_ids) ccall_result_ty)+        worker_ty     = mkForAllTys tv_bndrs (mkVisFunTys (map idType work_arg_ids) ccall_result_ty)         tvs           = map binderVar tv_bndrs         the_ccall_app = mkFCall dflags ccall_uniq fcall' val_args ccall_result_ty         work_rhs      = mkLams tvs (mkLams work_arg_ids the_ccall_app)@@ -431,7 +430,7 @@     stable_ptr_tycon <- dsLookupTyCon stablePtrTyConName     let         stable_ptr_ty = mkTyConApp stable_ptr_tycon [arg_ty]-        export_ty     = mkFunTy stable_ptr_ty arg_ty+        export_ty     = mkVisFunTy stable_ptr_ty arg_ty     bindIOId <- dsLookupGlobalId bindIOName     stbl_value <- newSysLocalDs stable_ptr_ty     (h_code, c_code, typestring, args_size) <- dsFExport id (mkRepReflCo export_ty) fe_nm cconv True@@ -542,7 +541,7 @@         | otherwise = text ('a':show n)    -- generate a libffi-style stub if this is a "wrapper" and libffi is enabled-  libffi = cLibFFI && isNothing maybe_target+  libffi = platformMisc_libFFI (platformMisc dflags) && isNothing maybe_target    type_string       -- libffi needs to know the result type too:
deSugar/DsGRHSs.hs view
@@ -18,12 +18,14 @@ import {-# SOURCE #-} DsExpr  ( dsLExpr, dsLocalBinds ) import {-# SOURCE #-} Match   ( matchSinglePatVar ) -import HsSyn+import GHC.Hs import MkCore import CoreSyn import CoreUtils (bindNonRec) -import Check (genCaseTmCs2)+import BasicTypes (Origin(FromSource))+import DynFlags+import GHC.HsToCore.PmCheck (needToRunPmCheck, addTyCsDs, addPatTmCs, addScrutTmCs) import DsMonad import DsUtils import Type   ( Type )@@ -64,13 +66,13 @@              match_result2 = adjustMatchResultDs (dsLocalBinds binds) match_result1                              -- NB: nested dsLet inside matchResult        ; return match_result2 }-dsGRHSs _ (XGRHSs _) _ = panic "dsGRHSs"+dsGRHSs _ (XGRHSs nec) _ = noExtCon nec  dsGRHS :: HsMatchContext Name -> Type -> LGRHS GhcTc (LHsExpr GhcTc)        -> DsM MatchResult dsGRHS hs_ctx rhs_ty (dL->L _ (GRHS _ guards rhs))   = matchGuards (map unLoc guards) (PatGuard hs_ctx) rhs rhs_ty-dsGRHS _ _ (dL->L _ (XGRHS _)) = panic "dsGRHS"+dsGRHS _ _ (dL->L _ (XGRHS nec)) = noExtCon nec dsGRHS _ _ _ = panic "dsGRHS: Impossible Match" -- due to #15884  {-@@ -122,11 +124,16 @@     let upat = unLoc pat         dicts = collectEvVarsPat upat     match_var <- selectMatchVar upat-    tm_cs <- genCaseTmCs2 (Just bind_rhs) [upat] [match_var]-    match_result <- addDictsDs dicts $-                    addTmCsDs tm_cs  $-                      -- See Note [Type and Term Equality Propagation] in Check-                    matchGuards stmts ctx rhs rhs_ty++    dflags <- getDynFlags+    match_result <-+      -- See Note [Type and Term Equality Propagation] in Check+      applyWhen (needToRunPmCheck dflags FromSource)+                -- FromSource might not be accurate, but at worst+                -- we do superfluous calls to the pattern match+                -- oracle.+                (addTyCsDs dicts . addScrutTmCs (Just bind_rhs) [match_var] . addPatTmCs [upat] [match_var])+                (matchGuards stmts ctx rhs rhs_ty)     core_rhs <- dsLExpr bind_rhs     match_result' <- matchSinglePatVar match_var (StmtCtxt ctx) pat rhs_ty                                        match_result@@ -138,8 +145,8 @@ matchGuards (RecStmt   {} : _) _ _ _ = panic "matchGuards RecStmt" matchGuards (ApplicativeStmt {} : _) _ _ _ =   panic "matchGuards ApplicativeLastStmt"-matchGuards (XStmtLR {} : _) _ _ _ =-  panic "matchGuards XStmtLR"+matchGuards (XStmtLR nec : _) _ _ _ =+  noExtCon nec  {- Should {\em fail} if @e@ returns @D@
deSugar/DsListComp.hs view
@@ -18,7 +18,7 @@  import {-# SOURCE #-} DsExpr ( dsExpr, dsLExpr, dsLExprNoLP, dsLocalBinds, dsSyntaxExpr ) -import HsSyn+import GHC.Hs import TcHsSyn import CoreSyn import MkCore@@ -91,7 +91,7 @@        ; expr <- dsListComp (stmts ++ [noLoc $ mkLastStmt (mkBigLHsVarTupId bndrs)]) list_ty         ; return (expr, bndrs_tuple_type) }-dsInnerListComp (XParStmtBlock{}) = panic "dsInnerListComp"+dsInnerListComp (XParStmtBlock nec) = noExtCon nec  -- This function factors out commonality between the desugaring strategies for GroupStmt. -- Given such a statement it gives you back an expression representing how to compute the transformed@@ -107,7 +107,7 @@         to_bndrs_tup_ty = mkBigCoreTupTy to_bndrs_tys      -- Desugar an inner comprehension which outputs a list of tuples of the "from" binders-    (expr', from_tup_ty) <- dsInnerListComp (ParStmtBlock noExt stmts+    (expr', from_tup_ty) <- dsInnerListComp (ParStmtBlock noExtField stmts                                                         from_bndrs noSyntaxExpr)      -- Work out what arguments should be supplied to that expression: i.e. is an extraction@@ -267,8 +267,8 @@ deListComp (ApplicativeStmt {} : _) _ =   panic "deListComp ApplicativeStmt" -deListComp (XStmtLR {} : _) _ =-  panic "deListComp XStmtLR"+deListComp (XStmtLR nec : _) _ =+  noExtCon nec  deBindComp :: OutPat GhcTc            -> CoreExpr@@ -282,7 +282,7 @@     let u2_ty = hsLPatType pat      let res_ty = exprType core_list2-        h_ty   = u1_ty `mkFunTy` res_ty+        h_ty   = u1_ty `mkVisFunTy` res_ty         -- no levity polymorphism here, as list comprehensions don't work        -- with RebindableSyntax. NB: These are *not* monad comps.@@ -364,8 +364,8 @@ dfListComp _ _ (RecStmt {} : _) = panic "dfListComp RecStmt" dfListComp _ _ (ApplicativeStmt {} : _) =   panic "dfListComp ApplicativeStmt"-dfListComp _ _ (XStmtLR {} : _) =-  panic "dfListComp XStmtLR"+dfListComp _ _ (XStmtLR nec : _) =+  noExtCon nec  dfBindComp :: Id -> Id             -- 'c' and 'n'            -> (LPat GhcTc, CoreExpr)@@ -425,7 +425,7 @@     elt_tuple_ty      = mkBigCoreTupTy elt_tys     elt_tuple_list_ty = mkListTy elt_tuple_ty -    zip_fn_ty         = mkFunTys elt_list_tys elt_tuple_list_ty+    zip_fn_ty         = mkVisFunTys elt_list_tys elt_tuple_list_ty      mk_case (as, a', as') rest           = Case (Var as) as elt_tuple_list_ty@@ -473,7 +473,7 @@     elt_list_tys       = map mkListTy elt_tys     elt_list_tuple_ty  = mkBigCoreTupTy elt_list_tys -    unzip_fn_ty        = elt_tuple_list_ty `mkFunTy` elt_list_tuple_ty+    unzip_fn_ty        = elt_tuple_list_ty `mkVisFunTy` elt_list_tuple_ty      mkConcatExpression (list_element_ty, head, tail) = mkConsExpr list_element_ty head tail @@ -596,7 +596,7 @@     ds_inner (ParStmtBlock _ stmts bndrs return_op)        = do { exp <- dsInnerMonadComp stmts bndrs return_op             ; return (exp, mkBigCoreVarTupTy bndrs) }-    ds_inner (XParStmtBlock{}) = panic "dsMcStmt"+    ds_inner (XParStmtBlock nec) = noExtCon nec  dsMcStmt stmt _ = pprPanic "dsMcStmt: unexpected stmt" (ppr stmt) @@ -655,7 +655,7 @@                  -> DsM CoreExpr dsInnerMonadComp stmts bndrs ret_op   = dsMcStmts (stmts ++-                 [noLoc (LastStmt noExt (mkBigLHsVarTupId bndrs) False ret_op)])+                 [noLoc (LastStmt noExtField (mkBigLHsVarTupId bndrs) False ret_op)])   -- The `unzip` function for `GroupStmt` in a monad comprehensions
deSugar/DsMeta.hs view
@@ -30,7 +30,7 @@  import qualified Language.Haskell.TH as TH -import HsSyn+import GHC.Hs import PrelNames -- To avoid clashes with DsMeta.varName we must make a local alias for -- OccName.varName we do this by removing varName from the import of@@ -43,7 +43,6 @@ import Name hiding( isVarOcc, isTcOcc, varName, tcName ) import THNames import NameEnv-import NameSet import TcType import TyCon import TysWiredIn@@ -85,7 +84,7 @@     do_brack (DecBrG _ gp) = do { MkC ds1 <- repTopDs gp ; return ds1 }     do_brack (DecBrL {})   = panic "dsBracket: unexpected DecBrL"     do_brack (TExpBr _ e)  = do { MkC e1  <- repLE e     ; return e1 }-    do_brack (XBracket {}) = panic "dsBracket: unexpected XBracket"+    do_brack (XBracket nec) = noExtCon nec  {- -------------- Examples -------------------- @@ -141,6 +140,7 @@                      ; _        <- mapM no_splice splcds                      ; tycl_ds  <- mapM repTyClD (tyClGroupTyClDecls tyclds)                      ; role_ds  <- mapM repRoleD (concatMap group_roles tyclds)+                     ; kisig_ds <- mapM repKiSigD (concatMap group_kisigs tyclds)                      ; inst_ds  <- mapM repInstD instds                      ; deriv_ds <- mapM repStandaloneDerivD derivds                      ; fix_ds   <- mapM repFixD fixds@@ -156,6 +156,7 @@                         -- more needed                      ;  return (de_loc $ sort_by_loc $                                 val_ds ++ catMaybes tycl_ds ++ role_ds+                                       ++ kisig_ds                                        ++ (concat fix_ds)                                        ++ inst_ds ++ rule_ds ++ for_ds                                        ++ ann_ds ++ deriv_ds) }) ;@@ -179,7 +180,7 @@     no_warn _ = panic "repTopDs"     no_doc (dL->L loc _)       = notHandledL loc "Haddock documentation" empty-repTopDs (XHsGroup _) = panic "repTopDs"+repTopDs (XHsGroup nec) = noExtCon nec  hsScopedTvBinders :: HsValBinds GhcRn -> [Name] -- See Note [Scoped type variables in bindings]@@ -207,10 +208,10 @@       --    here 'k' scopes too       | HsIB { hsib_ext = implicit_vars              , hsib_body = hs_ty } <- sig-      , (explicit_vars, _) <- splitLHsForAllTy hs_ty-      = implicit_vars ++ map hsLTyVarName explicit_vars-    get_scoped_tvs_from_sig (XHsImplicitBndrs _)-      = panic "get_scoped_tvs_from_sig"+      , (explicit_vars, _) <- splitLHsForAllTyInvis hs_ty+      = implicit_vars ++ hsLTyVarNames explicit_vars+    get_scoped_tvs_from_sig (XHsImplicitBndrs nec)+      = noExtCon nec  {- Notes @@ -329,7 +330,7 @@               ; (ss, sigs_binds) <- rep_sigs_binds sigs meth_binds               ; fds1   <- repLFunDeps fds               ; ats1   <- repFamilyDecls ats-              ; atds1  <- repAssocTyFamDefaults atds+              ; atds1  <- mapM (repAssocTyFamDefaultD . unLoc) atds               ; decls1 <- coreList decQTyConName (ats1 ++ atds1 ++ sigs_binds)               ; decls2 <- repClass cxt1 cls1 bndrs fds1 decls1               ; wrapGenSyms ss decls2 }@@ -349,6 +350,13 @@ repRoleD _ = panic "repRoleD"  -------------------------+repKiSigD :: LStandaloneKindSig GhcRn -> DsM (SrcSpan, Core TH.DecQ)+repKiSigD (dL->L loc kisig) =+  case kisig of+    StandaloneKindSig _ v ki -> rep_ty_sig kiSigDName loc ki v+    XStandaloneKindSig nec -> noExtCon nec++------------------------- repDataDefn :: Core TH.Name             -> Either (Core [TH.TyVarBndrQ])                         -- the repTyClD case@@ -375,7 +383,7 @@                                ; repData cxt1 tc opts ksig' cons1                                          derivs1 }        }-repDataDefn _ _ (XHsDataDefn _) = panic "repDataDefn"+repDataDefn _ _ (XHsDataDefn nec) = noExtCon nec  repSynDecl :: Core TH.Name -> Core [TH.TyVarBndrQ]            -> LHsType GhcRn@@ -392,9 +400,7 @@                                           , fdInjectivityAnn = injectivity }))   = do { tc1 <- lookupLOcc tc           -- See note [Binders and occurrences]        ; let mkHsQTvs :: [LHsTyVarBndr GhcRn] -> LHsQTyVars GhcRn-             mkHsQTvs tvs = HsQTvs { hsq_ext = HsQTvsRn-                                                { hsq_implicit = []-                                                , hsq_dependent = emptyNameSet }+             mkHsQTvs tvs = HsQTvs { hsq_ext = []                                    , hsq_explicit = tvs }              resTyVar = case resultSig of                      TyVarSig _ bndr -> mkHsQTvs [bndr]@@ -428,7 +434,7 @@                                           ; repKindSig ki' } repFamilyResultSig (TyVarSig _ bndr) = do { bndr' <- repTyVarBndr bndr                                           ; repTyVarSig bndr' }-repFamilyResultSig (XFamilyResultSig _) = panic "repFamilyResultSig"+repFamilyResultSig (XFamilyResultSig nec) = noExtCon nec  -- | Represent result signature using a Maybe Kind. Used with data families, -- where the result signature can be either missing or a kind but never a named@@ -457,35 +463,8 @@ repFamilyDecls :: [LFamilyDecl GhcRn] -> DsM [Core TH.DecQ] repFamilyDecls fds = liftM de_loc (mapM repFamilyDecl fds) -repAssocTyFamDefaults :: [LTyFamDefltEqn GhcRn] -> DsM [Core TH.DecQ]-repAssocTyFamDefaults = mapM rep_deflt-  where-     -- very like repTyFamEqn, but different in the details-    rep_deflt :: LTyFamDefltEqn GhcRn -> DsM (Core TH.DecQ)-    rep_deflt (dL->L _ (FamEqn { feqn_tycon = tc-                               , feqn_bndrs = bndrs-                               , feqn_pats  = tys-                               , feqn_fixity = fixity-                               , feqn_rhs   = rhs }))-      = addTyClTyVarBinds tys $ \ _ ->-        do { tc1  <- lookupLOcc tc-           ; no_bndrs <- ASSERT( isNothing bndrs )-                         coreNothingList tyVarBndrQTyConName-           ; tys1 <- repLTys (hsLTyVarBndrsToTypes tys)-           ; lhs <- case fixity of-                      Prefix -> do { head_ty <- repNamedTyCon tc1-                                   ; repTapps head_ty tys1 }-                      Infix -> do { (t1:t2:args) <- checkTys tys1-                                  ; head_ty <- repTInfix t1 tc1 t2-                                  ; repTapps head_ty args }-           ; rhs1 <- repLTy rhs-           ; eqn1 <- repTySynEqn no_bndrs lhs rhs1-           ; repTySynInst eqn1 }-    rep_deflt _ = panic "repAssocTyFamDefaults"--    checkTys :: [Core TH.TypeQ] -> DsM [Core TH.TypeQ]-    checkTys tys@(_:_:_) = return tys-    checkTys _ = panic "repAssocTyFamDefaults:checkTys"+repAssocTyFamDefaultD :: TyFamDefltDecl GhcRn -> DsM (Core TH.DecQ)+repAssocTyFamDefaultD = repTyFamInstD  ------------------------- -- represent fundeps@@ -527,7 +506,7 @@             -- But we do NOT bring the binders of 'binds' into scope             -- because they are properly regarded as occurrences             -- For example, the method names should be bound to-            -- the selector Ids, not to fresh names (Trac #5410)+            -- the selector Ids, not to fresh names (#5410)             --             do { cxt1     <- repLContext cxt                ; inst_ty1 <- repLTy inst_ty@@ -541,7 +520,7 @@                ; wrapGenSyms ss decls2 }  where    (tvs, cxt, inst_ty) = splitLHsInstDeclTy ty-repClsInstD (XClsInstDecl _) = panic "repClsInstD"+repClsInstD (XClsInstDecl nec) = noExtCon nec  repStandaloneDerivD :: LDerivDecl GhcRn -> DsM (SrcSpan, Core TH.DecQ) repStandaloneDerivD (dL->L loc (DerivDecl { deriv_strategy = strat@@ -569,9 +548,7 @@                                        , feqn_fixity = fixity                                        , feqn_rhs  = rhs }})   = do { tc <- lookupLOcc tc_name     -- See note [Binders and occurrences]-       ; let hs_tvs = HsQTvs { hsq_ext = HsQTvsRn-                               { hsq_implicit = var_names-                               , hsq_dependent = emptyNameSet }   -- Yuk+       ; let hs_tvs = HsQTvs { hsq_ext = var_names                              , hsq_explicit = fromMaybe [] mb_bndrs }        ; addTyClTyVarBinds hs_tvs $ \ _ ->          do { mb_bndrs1 <- repMaybeList tyVarBndrQTyConName@@ -588,8 +565,8 @@      where checkTys :: [LHsTypeArg GhcRn] -> DsM [LHsTypeArg GhcRn]            checkTys tys@(HsValArg _:HsValArg _:_) = return tys            checkTys _ = panic "repTyFamEqn:checkTys"-repTyFamEqn (XHsImplicitBndrs _) = panic "repTyFamEqn"-repTyFamEqn (HsIB _ (XFamEqn _)) = panic "repTyFamEqn"+repTyFamEqn (XHsImplicitBndrs nec) = noExtCon nec+repTyFamEqn (HsIB _ (XFamEqn nec)) = noExtCon nec  repTyArgs :: DsM (Core TH.TypeQ) -> [LHsTypeArg GhcRn] -> DsM (Core TH.TypeQ) repTyArgs f [] = f@@ -610,9 +587,7 @@                                              , feqn_fixity = fixity                                              , feqn_rhs   = defn }})})   = do { tc <- lookupLOcc tc_name         -- See note [Binders and occurrences]-       ; let hs_tvs = HsQTvs { hsq_ext = HsQTvsRn-                                 { hsq_implicit = var_names-                                 , hsq_dependent = emptyNameSet }   -- Yuk+       ; let hs_tvs = HsQTvs { hsq_ext = var_names                              , hsq_explicit = fromMaybe [] mb_bndrs }        ; addTyClTyVarBinds hs_tvs $ \ _ ->          do { mb_bndrs1 <- repMaybeList tyVarBndrQTyConName@@ -630,10 +605,10 @@             checkTys tys@(HsValArg _: HsValArg _: _) = return tys             checkTys _ = panic "repDataFamInstD:checkTys" -repDataFamInstD (DataFamInstDecl (XHsImplicitBndrs _))-  = panic "repDataFamInstD"-repDataFamInstD (DataFamInstDecl (HsIB _ (XFamEqn _)))-  = panic "repDataFamInstD"+repDataFamInstD (DataFamInstDecl (XHsImplicitBndrs nec))+  = noExtCon nec+repDataFamInstD (DataFamInstDecl (HsIB _ (XFamEqn nec)))+  = noExtCon nec  repForD :: Located (ForeignDecl GhcRn) -> DsM (SrcSpan, Core TH.DecQ) repForD (dL->L loc (ForeignImport { fd_name = name, fd_sig_ty = typ@@ -728,7 +703,7 @@   = panic "ruleBndrNames" ruleBndrNames (dL->L _ (RuleBndrSig _ _ (XHsWildCardBndrs _)))   = panic "ruleBndrNames"-ruleBndrNames (dL->L _ (XRuleBndr _)) = panic "ruleBndrNames"+ruleBndrNames (dL->L _ (XRuleBndr nec)) = noExtCon nec ruleBndrNames _ = panic "ruleBndrNames: Impossible Match" -- due to #15884  repRuleBndr :: LRuleBndr GhcRn -> DsM (Core TH.RuleBndrQ)@@ -904,7 +879,7 @@ -- and Note [Don't quantify implicit type variables in quotes] rep_ty_sig mk_sig loc sig_ty nm   | HsIB { hsib_body = hs_ty } <- sig_ty-  , (explicit_tvs, ctxt, ty) <- splitLHsSigmaTy hs_ty+  , (explicit_tvs, ctxt, ty) <- splitLHsSigmaTyInvis hs_ty   = do { nm1 <- lookupLOcc nm        ; let rep_in_scope_tv tv = do { name <- lookupBinder (hsLTyVarName tv)                                      ; repTyVarBndrWithKind tv name }@@ -921,7 +896,7 @@                        else repTForall th_explicit_tvs th_ctxt th_ty        ; sig     <- repProto mk_sig nm1 ty1        ; return (loc, sig) }-rep_ty_sig _ _ (XHsImplicitBndrs _) _ = panic "rep_ty_sig"+rep_ty_sig _ _ (XHsImplicitBndrs nec) _ = noExtCon nec  rep_patsyn_ty_sig :: SrcSpan -> LHsSigType GhcRn -> Located Name                   -> DsM (SrcSpan, Core TH.DecQ)@@ -950,7 +925,7 @@                        repTForall th_exis th_provs th_ty        ; sig      <- repProto patSynSigDName nm1 ty1        ; return (loc, sig) }-rep_patsyn_ty_sig _ (XHsImplicitBndrs _) _ = panic "rep_patsyn_ty_sig"+rep_patsyn_ty_sig _ (XHsImplicitBndrs nec) _ = noExtCon nec  rep_wc_ty_sig :: Name -> SrcSpan -> LHsSigWcType GhcRn -> Located Name               -> DsM (SrcSpan, Core TH.DecQ)@@ -1037,7 +1012,7 @@                 -> (Core [TH.TyVarBndrQ] -> DsM (Core (TH.Q a)))  -- action in the ext env                 -> DsM (Core (TH.Q a)) addHsTyVarBinds exp_tvs thing_inside-  = do { fresh_exp_names <- mkGenSyms (map hsLTyVarName exp_tvs)+  = do { fresh_exp_names <- mkGenSyms (hsLTyVarNames exp_tvs)        ; term <- addBinds fresh_exp_names $                  do { kbs <- repList tyVarBndrQTyConName mk_tv_bndr                                      (exp_tvs `zip` fresh_exp_names)@@ -1052,13 +1027,13 @@ -- gensym a list of type variables and enter them into the meta environment; -- the computations passed as the second argument is executed in that extended -- meta environment and gets the *new* names on Core-level as an argument-addTyVarBinds (HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = imp_tvs}+addTyVarBinds (HsQTvs { hsq_ext = imp_tvs                       , hsq_explicit = exp_tvs })               thing_inside   = addSimpleTyVarBinds imp_tvs $     addHsTyVarBinds exp_tvs $     thing_inside-addTyVarBinds (XLHsQTyVars _) _ = panic "addTyVarBinds"+addTyVarBinds (XLHsQTyVars nec) _ = noExtCon nec  addTyClTyVarBinds :: LHsQTyVars GhcRn                   -> (Core [TH.TyVarBndrQ] -> DsM (Core (TH.Q a)))@@ -1120,7 +1095,7 @@ repHsSigType :: LHsSigType GhcRn -> DsM (Core TH.TypeQ) repHsSigType (HsIB { hsib_ext = implicit_tvs                    , hsib_body = body })-  | (explicit_tvs, ctxt, ty) <- splitLHsSigmaTy body+  | (explicit_tvs, ctxt, ty) <- splitLHsSigmaTyInvis body   = addSimpleTyVarBinds implicit_tvs $       -- See Note [Don't quantify implicit type variables in quotes]     addHsTyVarBinds explicit_tvs $ \ th_explicit_tvs ->@@ -1129,12 +1104,12 @@        ; if null explicit_tvs && null (unLoc ctxt)          then return th_ty          else repTForall th_explicit_tvs th_ctxt th_ty }-repHsSigType (XHsImplicitBndrs _) = panic "repHsSigType"+repHsSigType (XHsImplicitBndrs nec) = noExtCon nec  repHsSigWcType :: LHsSigWcType GhcRn -> DsM (Core TH.TypeQ) repHsSigWcType (HsWC { hswc_body = sig1 })   = repHsSigType sig1-repHsSigWcType (XHsWildCardBndrs _) = panic "repHsSigWcType"+repHsSigWcType (XHsWildCardBndrs nec) = noExtCon nec  -- yield the representation of a list of types repLTys :: [LHsType GhcRn] -> DsM [Core TH.TypeQ]@@ -1144,18 +1119,29 @@ repLTy :: LHsType GhcRn -> DsM (Core TH.TypeQ) repLTy ty = repTy (unLoc ty) -repForall :: HsType GhcRn -> DsM (Core TH.TypeQ)--- Arg of repForall is always HsForAllTy or HsQualTy-repForall ty- | (tvs, ctxt, tau) <- splitLHsSigmaTy (noLoc ty)+-- Desugar a type headed by an invisible forall (e.g., @forall a. a@) or+-- a context (e.g., @Show a => a@) into a ForallT from L.H.TH.Syntax.+-- In other words, the argument to this function is always an+-- @HsForAllTy ForallInvis@ or @HsQualTy@.+-- Types headed by visible foralls (which are desugared to ForallVisT) are+-- handled separately in repTy.+repForallT :: HsType GhcRn -> DsM (Core TH.TypeQ)+repForallT ty+ | (tvs, ctxt, tau) <- splitLHsSigmaTyInvis (noLoc ty)  = addHsTyVarBinds tvs $ \bndrs ->    do { ctxt1  <- repLContext ctxt-      ; ty1    <- repLTy tau-      ; repTForall bndrs ctxt1 ty1 }+      ; tau1   <- repLTy tau+      ; repTForall bndrs ctxt1 tau1 -- forall a. C a => {...}+      }  repTy :: HsType GhcRn -> DsM (Core TH.TypeQ)-repTy ty@(HsForAllTy {}) = repForall ty-repTy ty@(HsQualTy {})   = repForall ty+repTy ty@(HsForAllTy { hst_fvf = fvf, hst_bndrs = tvs, hst_body = body }) =+  case fvf of+    ForallInvis -> repForallT ty+    ForallVis   -> addHsTyVarBinds tvs $ \bndrs ->+                   do body1 <- repLTy body+                      repTForallVis bndrs body1+repTy ty@(HsQualTy {}) = repForallT ty  repTy (HsTyVar _ _ (dL->L _ n))   | isLiftedTypeKindTyConName n       = repTStar@@ -1256,7 +1242,7 @@ repSplice (HsQuasiQuote _ n _ _ _)  = rep_splice n repSplice e@(HsSpliced {})          = pprPanic "repSplice" (ppr e) repSplice e@(HsSplicedT {})         = pprPanic "repSpliceT" (ppr e)-repSplice e@(XSplice {})            = pprPanic "repSplice" (ppr e)+repSplice (XSplice nec)             = noExtCon nec  rep_splice :: Name -> DsM (Core a) rep_splice splice_name@@ -1293,7 +1279,7 @@ repE (HsOverLabel _ _ s) = repOverLabel s  repE e@(HsRecFld _ f) = case f of-  Unambiguous x _ -> repE (HsVar noExt (noLoc x))+  Unambiguous x _ -> repE (HsVar noExtField (noLoc x))   Ambiguous{}     -> notHandled "Ambiguous record selectors" (ppr e)   XAmbiguousFieldOcc{} -> notHandled "XAmbiguous record selectors" (ppr e) @@ -1363,13 +1349,21 @@   = notHandled "monad comprehension and [: :]" (ppr e)  repE (ExplicitList _ _ es) = do { xs <- repLEs es; repListExp xs }-repE e@(ExplicitTuple _ es boxed)-  | not (all tupArgPresent es) = notHandled "Tuple sections" (ppr e)-  | isBoxed boxed = do { xs <- repLEs [e | (dL->L _ (Present _ e)) <- es]-                       ; repTup xs }-  | otherwise     = do { xs <- repLEs [e | (dL->L _ (Present _ e)) <- es]-                       ; repUnboxedTup xs }+repE (ExplicitTuple _ es boxity) =+  let tupArgToCoreExp :: LHsTupArg GhcRn -> DsM (Core (Maybe TH.ExpQ))+      tupArgToCoreExp a+        | L _ (Present _ e) <- dL a = do { e' <- repLE e+                                         ; coreJust expQTyConName e' }+        | otherwise = coreNothing expQTyConName +  in do { args <- mapM tupArgToCoreExp es+        ; expQTy <- lookupType expQTyConName+        ; let maybeExpQTy = mkTyConApp maybeTyCon [expQTy]+              listArg = coreList' maybeExpQTy args+        ; if isBoxed boxity+          then repTup listArg+          else repUnboxedTup listArg }+ repE (ExplicitSum _ alt arity e)  = do { e1 <- repLE e       ; repUnboxedSum e1 alt arity }@@ -1444,7 +1438,7 @@        gs <- repGuards guards      ; clause <- repClause ps1 gs ds      ; wrapGenSyms (ss1++ss2) clause }}}-repClauseTup (dL->L _ (Match _ _ _ (XGRHSs _))) = panic "repClauseTup"+repClauseTup (dL->L _ (Match _ _ _ (XGRHSs nec))) = noExtCon nec repClauseTup _ = panic "repClauseTup"  repGuards ::  [LGRHS GhcRn (LHsExpr GhcRn)] ->  DsM (Core TH.BodyQ)@@ -1551,7 +1545,7 @@        do { (ss1, zs) <- repSts (map unLoc stmts)           ; zs1 <- coreList stmtQTyConName zs           ; return (ss1, zs1) }-     rep_stmt_block (XParStmtBlock{}) = panic "repSts"+     rep_stmt_block (XParStmtBlock nec) = noExtCon nec repSts [LastStmt _ e _ _]   = do { e2 <- repLE e        ; z <- repNoBindSt e2@@ -1661,7 +1655,7 @@         ; ans <- repFun fn' (nonEmptyCoreList ms1)         ; return (loc, ans) } -rep_bind (dL->L _ (FunBind { fun_matches = XMatchGroup _ })) = panic "rep_bind"+rep_bind (dL->L _ (FunBind { fun_matches = XMatchGroup nec })) = noExtCon nec  rep_bind (dL->L loc (PatBind { pat_lhs = pat                              , pat_rhs = GRHSs _ guards (dL->L _ wheres) }))@@ -1671,7 +1665,7 @@         ; ans  <- repVal patcore guardcore wherecore         ; ans' <- wrapGenSyms ss ans         ; return (loc, ans') }-rep_bind (dL->L _ (PatBind _ _ (XGRHSs _) _)) = panic "rep_bind"+rep_bind (dL->L _ (PatBind _ _ (XGRHSs nec) _)) = noExtCon nec  rep_bind (dL->L _ (VarBind { var_id = v, var_rhs = e}))  =   do { v' <- lookupBinder v@@ -1721,9 +1715,9 @@     wrapGenArgSyms (RecCon _) _  dec = return dec     wrapGenArgSyms _          ss dec = wrapGenSyms ss dec -rep_bind (dL->L _ (PatSynBind _ (XPatSynBind _)))-  = panic "rep_bind: XPatSynBind"-rep_bind (dL->L _ (XHsBindsLR {}))  = panic "rep_bind: XHsBindsLR"+rep_bind (dL->L _ (PatSynBind _ (XPatSynBind nec)))+  = noExtCon nec+rep_bind (dL->L _ (XHsBindsLR nec)) = noExtCon nec rep_bind _                          = panic "rep_bind: Impossible match!"                                       -- due to #15884 @@ -1764,7 +1758,7 @@ repPatSynDir (ExplicitBidirectional (MG { mg_alts = (dL->L _ clauses) }))   = do { clauses' <- mapM repClauseTup clauses        ; repExplBidirPatSynDir (nonEmptyCoreList clauses') }-repPatSynDir (ExplicitBidirectional (XMatchGroup _)) = panic "repPatSynDir"+repPatSynDir (ExplicitBidirectional (XMatchGroup nec)) = noExtCon nec  repExplBidirPatSynDir :: Core [TH.ClauseQ] -> DsM (Core TH.PatSynDirQ) repExplBidirPatSynDir (MkC cls) = rep2 explBidirPatSynName [cls]@@ -1804,7 +1798,7 @@                 do { xs <- repLPs ps; body <- repLE e; repLam xs body })       ; wrapGenSyms ss lam } -repLambda (dL->L _ m) = notHandled "Guarded labmdas" (pprMatch m)+repLambda (dL->L _ m) = notHandled "Guarded lambdas" (pprMatch m)   -----------------------------------------------------------------------------@@ -1951,7 +1945,7 @@         ; rep2 mk_varg [pkg,mod,occ] }   | otherwise   = do  { MkC occ <- nameLit name-        ; MkC uni <- coreIntLit (getKey (getUnique name))+        ; MkC uni <- coreIntegerLit (toInteger $ getKey (getUnique name))         ; rep2 mkNameLName [occ,uni] }   where       mod = ASSERT( isExternalName name) nameModule name@@ -2108,10 +2102,10 @@ repLamCase :: Core [TH.MatchQ] -> DsM (Core TH.ExpQ) repLamCase (MkC ms) = rep2 lamCaseEName [ms] -repTup :: Core [TH.ExpQ] -> DsM (Core TH.ExpQ)+repTup :: Core [Maybe TH.ExpQ] -> DsM (Core TH.ExpQ) repTup (MkC es) = rep2 tupEName [es] -repUnboxedTup :: Core [TH.ExpQ] -> DsM (Core TH.ExpQ)+repUnboxedTup :: Core [Maybe TH.ExpQ] -> DsM (Core TH.ExpQ) repUnboxedTup (MkC es) = rep2 unboxedTupEName [es]  repUnboxedSum :: Core TH.ExpQ -> TH.SumAlt -> TH.SumArity -> DsM (Core TH.ExpQ)@@ -2131,7 +2125,7 @@ repLetE :: Core [TH.DecQ] -> Core TH.ExpQ -> DsM (Core TH.ExpQ) repLetE (MkC ds) (MkC e) = rep2 letEName [ds, e] -repCaseE :: Core TH.ExpQ -> Core [TH.MatchQ] -> DsM( Core TH.ExpQ)+repCaseE :: Core TH.ExpQ -> Core [TH.MatchQ] -> DsM (Core TH.ExpQ) repCaseE (MkC e) (MkC ms) = rep2 caseEName [e, ms]  repDoE :: Core [TH.StmtQ] -> DsM (Core TH.ExpQ)@@ -2467,6 +2461,10 @@ repTForall (MkC tvars) (MkC ctxt) (MkC ty)     = rep2 forallTName [tvars, ctxt, ty] +repTForallVis :: Core [TH.TyVarBndrQ] -> Core TH.TypeQ+              -> DsM (Core TH.TypeQ)+repTForallVis (MkC tvars) (MkC ty) = rep2 forallVisTName [tvars, ty]+ repTvar :: Core TH.Name -> DsM (Core TH.TypeQ) repTvar (MkC s) = rep2 varTName [s] @@ -2616,7 +2614,7 @@  mk_rational :: FractionalLit -> DsM (HsLit GhcRn) mk_rational r = do rat_ty <- lookupType rationalTyConName-                   return $ HsRat noExt r rat_ty+                   return $ HsRat noExtField r rat_ty mk_string :: FastString -> DsM (HsLit GhcRn) mk_string s = return $ HsString NoSourceText s @@ -2629,7 +2627,7 @@         -- The type Rational will be in the environment, because         -- the smart constructor 'TH.Syntax.rationalL' uses it in its type,         -- and rationalL is sucked in when any TH stuff is used-repOverloadedLiteral XOverLit{} = panic "repOverloadedLiteral"+repOverloadedLiteral (XOverLit nec) = noExtCon nec  mk_lit :: OverLitVal -> DsM (HsLit GhcRn) mk_lit (HsIntegral i)     = mk_integer  (il_value i)@@ -2743,6 +2741,9 @@ coreIntLit :: Int -> DsM (Core Int) coreIntLit i = do dflags <- getDynFlags                   return (MkC (mkIntExprInt dflags i))++coreIntegerLit :: Integer -> DsM (Core Integer)+coreIntegerLit i = fmap MkC (mkIntegerExpr i)  coreVar :: Id -> Core TH.Name   -- The Id has type Name coreVar id = MkC (Var id)
deSugar/DsMonad.hs view
@@ -29,11 +29,11 @@          DsMetaEnv, DsMetaVal(..), dsGetMetaEnv, dsLookupMetaEnv, dsExtendMetaEnv, -        -- Getting and setting EvVars and term constraints in local environment-        getDictsDs, addDictsDs, getTmCsDs, addTmCsDs,+        -- Getting and setting pattern match oracle states+        getPmDelta, updPmDelta, -        -- Iterations for pm checking-        incrCheckPmIterDs, resetPmIterDs, dsGetCompleteMatches,+        -- Get COMPLETE sets of a TyCon+        dsGetCompleteMatches,          -- Warnings and errors         DsWarning, warnDs, warnIfSetDs, errDs, errDsCoreExpr,@@ -59,7 +59,7 @@ import CoreSyn import MkCore    ( unitExpr ) import CoreUtils ( exprType, isExprLevPoly )-import HsSyn+import GHC.Hs import TcIface import TcMType ( checkForLevPolyX, formatLevPolyErr ) import PrelNames@@ -70,7 +70,7 @@ import DataCon import ConLike import TyCon-import PmExpr+import GHC.HsToCore.PmCheck.Types import Id import Module import Outputable@@ -82,7 +82,6 @@ import DynFlags import ErrUtils import FastString-import Var (EvVar) import UniqFM ( lookupWithDefaultUFM ) import Literal ( mkLitString ) import CostCentreState@@ -191,8 +190,7 @@                   => HscEnv -> IORef Messages -> TcGblEnv                   -> m (DsGblEnv, DsLclEnv) mkDsEnvsFromTcGbl hsc_env msg_var tcg_env-  = do { pm_iter_var <- liftIO $ newIORef 0-       ; cc_st_var   <- liftIO $ newIORef newCostCentreState+  = do { cc_st_var   <- liftIO $ newIORef newCostCentreState        ; let dflags   = hsc_dflags hsc_env              this_mod = tcg_mod tcg_env              type_env = tcg_type_env tcg_env@@ -201,7 +199,7 @@              complete_matches = hptCompleteSigs hsc_env                                 ++ tcg_complete_matches tcg_env        ; return $ mkDsEnvs dflags this_mod rdr_env type_env fam_inst_env-                           msg_var pm_iter_var cc_st_var complete_matches+                           msg_var cc_st_var complete_matches        }  runDs :: HscEnv -> (DsGblEnv, DsLclEnv) -> DsM a -> IO (Messages, Maybe a)@@ -220,8 +218,7 @@ -- | Run a 'DsM' action in the context of an existing 'ModGuts' initDsWithModGuts :: HscEnv -> ModGuts -> DsM a -> IO (Messages, Maybe a) initDsWithModGuts hsc_env guts thing_inside-  = do { pm_iter_var <- newIORef 0-       ; cc_st_var   <- newIORef newCostCentreState+  = do { cc_st_var   <- newIORef newCostCentreState        ; msg_var <- newIORef emptyMessages        ; let dflags   = hsc_dflags hsc_env              type_env = typeEnvFromEntities ids (mg_tcs guts) (mg_fam_insts guts)@@ -236,8 +233,8 @@              ids = concatMap bindsToIds (mg_binds guts)               envs  = mkDsEnvs dflags this_mod rdr_env type_env-                              fam_inst_env msg_var pm_iter_var-                              cc_st_var complete_matches+                              fam_inst_env msg_var cc_st_var+                              complete_matches        ; runDs hsc_env envs thing_inside        } @@ -265,9 +262,9 @@          thing_inside }  mkDsEnvs :: DynFlags -> Module -> GlobalRdrEnv -> TypeEnv -> FamInstEnv-         -> IORef Messages -> IORef Int -> IORef CostCentreState-         -> [CompleteMatch] -> (DsGblEnv, DsLclEnv)-mkDsEnvs dflags mod rdr_env type_env fam_inst_env msg_var pmvar cc_st_var+         -> IORef Messages -> IORef CostCentreState -> [CompleteMatch]+         -> (DsGblEnv, DsLclEnv)+mkDsEnvs dflags mod rdr_env type_env fam_inst_env msg_var cc_st_var          complete_matches   = let if_genv = IfGblEnv { if_doc       = text "mkDsEnvs",                              if_rec_types = Just (mod, return type_env) }@@ -285,9 +282,7 @@                            }         lcl_env = DsLclEnv { dsl_meta    = emptyNameEnv                            , dsl_loc     = real_span-                           , dsl_dicts   = emptyBag-                           , dsl_tm_cs   = emptyBag-                           , dsl_pm_iter = pmvar+                           , dsl_delta   = initDelta                            }     in (gbl_env, lcl_env) @@ -386,39 +381,14 @@ getGhcModeDs :: DsM GhcMode getGhcModeDs =  getDynFlags >>= return . ghcMode --- | Get in-scope type constraints (pm check)-getDictsDs :: DsM (Bag EvVar)-getDictsDs = do { env <- getLclEnv; return (dsl_dicts env) }---- | Add in-scope type constraints (pm check)-addDictsDs :: Bag EvVar -> DsM a -> DsM a-addDictsDs ev_vars-  = updLclEnv (\env -> env { dsl_dicts = unionBags ev_vars (dsl_dicts env) })---- | Get in-scope term constraints (pm check)-getTmCsDs :: DsM (Bag SimpleEq)-getTmCsDs = do { env <- getLclEnv; return (dsl_tm_cs env) }---- | Add in-scope term constraints (pm check)-addTmCsDs :: Bag SimpleEq -> DsM a -> DsM a-addTmCsDs tm_cs-  = updLclEnv (\env -> env { dsl_tm_cs = unionBags tm_cs (dsl_tm_cs env) })---- | Increase the counter for elapsed pattern match check iterations.--- If the current counter is already over the limit, fail-incrCheckPmIterDs :: DsM Int-incrCheckPmIterDs = do-  env <- getLclEnv-  cnt <- readTcRef (dsl_pm_iter env)-  max_iters <- maxPmCheckIterations <$> getDynFlags-  if cnt >= max_iters-    then failM-    else updTcRef (dsl_pm_iter env) (+1)-  return cnt+-- | Get the current pattern match oracle state. See 'dsl_delta'.+getPmDelta :: DsM Delta+getPmDelta = do { env <- getLclEnv; return (dsl_delta env) } --- | Reset the counter for pattern match check iterations to zero-resetPmIterDs :: DsM ()-resetPmIterDs = do { env <- getLclEnv; writeTcRef (dsl_pm_iter env) 0 }+-- | Set the pattern match oracle state within the scope of the given action.+-- See 'dsl_delta'.+updPmDelta :: Delta -> DsM a -> DsM a+updPmDelta delta = updLclEnv (\env -> env { dsl_delta = delta })  getSrcSpanDs :: DsM SrcSpan getSrcSpanDs = do { env <- getLclEnv@@ -486,7 +456,7 @@       ; env <- getGblEnv       ; mb_res <- tryM $  -- Be careful to catch exceptions                           -- so that we propagate errors correctly-                          -- (Trac #13642)+                          -- (#13642)                   setGblEnv (env { ds_msgs = errs_var }) $                   thing_inside 
deSugar/DsUsage.hs view
@@ -50,7 +50,7 @@ Consequently, A will contain itself in its imp_orphs due to its import of B. This fact would end up being recorded in A's interface file. This would then break the invariant asserted by calculateAvails that a module does not itself in-its dep_orphs. This was the cause of Trac #14128.+its dep_orphs. This was the cause of #14128.  -} @@ -314,15 +314,15 @@                       usg_entities = Map.toList ent_hashs,                       usg_safe     = imp_safe }       where-        maybe_iface  = lookupIfaceByModule dflags hpt pit mod+        maybe_iface  = lookupIfaceByModule hpt pit mod                 -- In one-shot mode, the interfaces for home-package                 -- modules accumulate in the PIT not HPT.  Sigh.          Just iface   = maybe_iface-        finsts_mod   = mi_finsts    iface-        hash_env     = mi_hash_fn   iface-        mod_hash     = mi_mod_hash  iface-        export_hash | depend_on_exports = Just (mi_exp_hash iface)+        finsts_mod   = mi_finsts (mi_final_exts iface)+        hash_env     = mi_hash_fn (mi_final_exts iface)+        mod_hash     = mi_mod_hash (mi_final_exts iface)+        export_hash | depend_on_exports = Just (mi_exp_hash (mi_final_exts iface))                     | otherwise         = Nothing          by_is_safe (ImportedByUser imv) = imv_is_safe imv
deSugar/DsUtils.hs view
@@ -32,7 +32,7 @@         seqVar,          -- LHs tuples-        mkLHsVarPatTup, mkLHsPatTup, mkVanillaTuplePat,+        mkLHsPatTup, mkVanillaTuplePat,         mkBigLHsVarTupId, mkBigLHsTupId, mkBigLHsVarPatTupId, mkBigLHsPatTupId,          mkSelectorBinds,@@ -49,7 +49,7 @@ import {-# SOURCE #-} Match  ( matchSimply ) import {-# SOURCE #-} DsExpr ( dsLExpr ) -import HsSyn+import GHC.Hs import TcHsSyn import TcType( tcSplitTyConApp ) import CoreSyn@@ -243,8 +243,7 @@   | otherwise   = Let (NonRec new (varToCoreExpr old)) body  seqVar :: Var -> CoreExpr -> CoreExpr-seqVar var body = Case (Var var) var (exprType body)-                        [(DEFAULT, [], body)]+seqVar var body = mkDefaultCase (Var var) var body  mkCoLetMatchResult :: CoreBind -> MatchResult -> MatchResult mkCoLetMatchResult bind = adjustMatchResult (mkCoreLet bind)@@ -409,82 +408,88 @@     return (mkApps (Var err_id) [Type (getRuntimeRep ty), Type ty, core_msg])  {--'mkCoreAppDs' and 'mkCoreAppsDs' hand the special-case desugaring of 'seq'.+'mkCoreAppDs' and 'mkCoreAppsDs' handle the special-case desugaring of 'seq'. -Note [Desugaring seq (1)]  cf Trac #1031-~~~~~~~~~~~~~~~~~~~~~~~~~-   f x y = x `seq` (y `seq` (# x,y #))+Note [Desugaring seq]+~~~~~~~~~~~~~~~~~~~~~ -The [CoreSyn let/app invariant] means that, other things being equal, because-the argument to the outer 'seq' has an unlifted type, we'll use call-by-value thus:+There are a few subtleties in the desugaring of `seq`: -   f x y = case (y `seq` (# x,y #)) of v -> x `seq` v+ 1. (as described in #1031) -But that is bad for two reasons:-  (a) we now evaluate y before x, and-  (b) we can't bind v to an unboxed pair+    Consider,+       f x y = x `seq` (y `seq` (# x,y #)) -Seq is very, very special!  So we recognise it right here, and desugar to-        case x of _ -> case y of _ -> (# x,y #)+    The [CoreSyn let/app invariant] means that, other things being equal, because+    the argument to the outer 'seq' has an unlifted type, we'll use call-by-value thus: -Note [Desugaring seq (2)]  cf Trac #2273-~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-   let chp = case b of { True -> fst x; False -> 0 }-   in chp `seq` ...chp...-Here the seq is designed to plug the space leak of retaining (snd x)-for too long.+       f x y = case (y `seq` (# x,y #)) of v -> x `seq` v -If we rely on the ordinary inlining of seq, we'll get-   let chp = case b of { True -> fst x; False -> 0 }-   case chp of _ { I# -> ...chp... }+    But that is bad for two reasons:+      (a) we now evaluate y before x, and+      (b) we can't bind v to an unboxed pair -But since chp is cheap, and the case is an alluring contet, we'll-inline chp into the case scrutinee.  Now there is only one use of chp,-so we'll inline a second copy.  Alas, we've now ruined the purpose of-the seq, by re-introducing the space leak:-    case (case b of {True -> fst x; False -> 0}) of-      I# _ -> ...case b of {True -> fst x; False -> 0}...+    Seq is very, very special!  So we recognise it right here, and desugar to+            case x of _ -> case y of _ -> (# x,y #) -We can try to avoid doing this by ensuring that the binder-swap in the-case happens, so we get his at an early stage:-   case chp of chp2 { I# -> ...chp2... }-But this is fragile.  The real culprit is the source program.  Perhaps we-should have said explicitly-   let !chp2 = chp in ...chp2...+ 2. (as described in #2273) -But that's painful.  So the code here does a little hack to make seq-more robust: a saturated application of 'seq' is turned *directly* into-the case expression, thus:-   x  `seq` e2 ==> case x of x -> e2    -- Note shadowing!-   e1 `seq` e2 ==> case x of _ -> e2+    Consider+       let chp = case b of { True -> fst x; False -> 0 }+       in chp `seq` ...chp...+    Here the seq is designed to plug the space leak of retaining (snd x)+    for too long. -So we desugar our example to:-   let chp = case b of { True -> fst x; False -> 0 }-   case chp of chp { I# -> ...chp... }-And now all is well.+    If we rely on the ordinary inlining of seq, we'll get+       let chp = case b of { True -> fst x; False -> 0 }+       case chp of _ { I# -> ...chp... } -The reason it's a hack is because if you define mySeq=seq, the hack-won't work on mySeq.+    But since chp is cheap, and the case is an alluring contet, we'll+    inline chp into the case scrutinee.  Now there is only one use of chp,+    so we'll inline a second copy.  Alas, we've now ruined the purpose of+    the seq, by re-introducing the space leak:+        case (case b of {True -> fst x; False -> 0}) of+          I# _ -> ...case b of {True -> fst x; False -> 0}... -Note [Desugaring seq (3)] cf Trac #2409-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The isLocalId ensures that we don't turn-        True `seq` e-into-        case True of True { ... }-which stupidly tries to bind the datacon 'True'.+    We can try to avoid doing this by ensuring that the binder-swap in the+    case happens, so we get his at an early stage:+       case chp of chp2 { I# -> ...chp2... }+    But this is fragile.  The real culprit is the source program.  Perhaps we+    should have said explicitly+       let !chp2 = chp in ...chp2...++    But that's painful.  So the code here does a little hack to make seq+    more robust: a saturated application of 'seq' is turned *directly* into+    the case expression, thus:+       x  `seq` e2 ==> case x of x -> e2    -- Note shadowing!+       e1 `seq` e2 ==> case x of _ -> e2++    So we desugar our example to:+       let chp = case b of { True -> fst x; False -> 0 }+       case chp of chp { I# -> ...chp... }+    And now all is well.++    The reason it's a hack is because if you define mySeq=seq, the hack+    won't work on mySeq.++ 3. (as described in #2409)++    The isLocalId ensures that we don't turn+            True `seq` e+    into+            case True of True { ... }+    which stupidly tries to bind the datacon 'True'. -}  -- NB: Make sure the argument is not levity polymorphic mkCoreAppDs  :: SDoc -> CoreExpr -> CoreExpr -> CoreExpr-mkCoreAppDs _ (Var f `App` Type ty1 `App` Type ty2 `App` arg1) arg2-  | f `hasKey` seqIdKey            -- Note [Desugaring seq (1), (2)]+mkCoreAppDs _ (Var f `App` Type _r `App` Type ty1 `App` Type ty2 `App` arg1) arg2+  | f `hasKey` seqIdKey            -- Note [Desugaring seq], points (1) and (2)   = Case arg1 case_bndr ty2 [(DEFAULT,[],arg2)]   where     case_bndr = case arg1 of                    Var v1 | isInternalName (idName v1)-                          -> v1        -- Note [Desugaring seq (2) and (3)]+                          -> v1        -- Note [Desugaring seq], points (2) and (3)                    _      -> mkWildValBinder ty1  mkCoreAppDs s fun arg = mkCoreApp s fun arg  -- The rest is done in MkCore@@ -747,7 +752,7 @@ *                                                                      *   Creating big tuples and their types for full Haskell expressions.   They work over *Ids*, and create tuples replete with their types,-  which is whey they are not in HsUtils.+  which is whey they are not in GHC.Hs.Utils. *                                                                      * ********************************************************************* -} @@ -757,9 +762,6 @@ mkLHsPatTup lpats  = cL (getLoc (head lpats)) $                      mkVanillaTuplePat lpats Boxed -mkLHsVarPatTup :: [Id] -> LPat GhcTc-mkLHsVarPatTup bs  = mkLHsPatTup (map nlVarPat bs)- mkVanillaTuplePat :: [OutPat GhcTc] -> Boxity -> Pat GhcTc -- A vanilla tuple pattern simply gets its type from its sub-patterns mkVanillaTuplePat pats box = TuplePat (map hsLPatType pats) pats box@@ -849,7 +851,7 @@                       CoreExpr) -- Fail variable applied to realWorld# -- See Note [Failure thunks and CPR] mkFailurePair expr-  = do { fail_fun_var <- newFailLocalDs (voidPrimTy `mkFunTy` ty)+  = do { fail_fun_var <- newFailLocalDs (voidPrimTy `mkVisFunTy` ty)        ; fail_fun_arg <- newSysLocalDs voidPrimTy        ; let real_arg = setOneShotLambda fail_fun_arg        ; return (NonRec fail_fun_var (Lam real_arg expr),@@ -879,7 +881,7 @@ entered at most once.  Adding a dummy 'realWorld' token argument makes it clear that sharing is not an issue.  And that in turn makes it more CPR-friendly.  This matters a lot: if you don't get it right, you lose-the tail call property.  For example, see Trac #3403.+the tail call property.  For example, see #3403.   ************************************************************************@@ -955,7 +957,7 @@            ParPat x p    -> cL l (ParPat x (go p))            LazyPat _ lp' -> lp'            BangPat _ _   -> lp-           _             -> cL l (BangPat noExt lp)+           _             -> cL l (BangPat noExtField lp)  -- | Unconditionally make a 'Pat' strict. addBang :: LPat GhcTc -- ^ Original pattern@@ -965,10 +967,10 @@     go lp@(dL->L l p)       = case p of            ParPat x p    -> cL l (ParPat x (go p))-           LazyPat _ lp' -> cL l (BangPat noExt lp')+           LazyPat _ lp' -> cL l (BangPat noExtField lp')                                   -- Should we bring the extension value over?            BangPat _ _   -> lp-           _             -> cL l (BangPat noExt lp)+           _             -> cL l (BangPat noExtField lp)  isTrueLHsExpr :: LHsExpr GhcTc -> Maybe (CoreExpr -> DsM CoreExpr) 
deSugar/ExtractDocs.hs view
@@ -8,18 +8,19 @@  import GhcPrelude import Bag-import HsBinds-import HsDoc-import HsDecls-import HsExtension-import HsTypes-import HsUtils+import GHC.Hs.Binds+import GHC.Hs.Doc+import GHC.Hs.Decls+import GHC.Hs.Extension+import GHC.Hs.Types+import GHC.Hs.Utils import Name import NameSet import SrcLoc import TcRnTypes  import Control.Applicative+import Data.Bifunctor (first) import Data.List import Data.Map (Map) import qualified Data.Map as M@@ -136,7 +137,7 @@ -- Extract the source location where an instance is defined. This is used -- to correlate InstDecls with their Instance/CoAxiom Names, via the -- instanceMap.-getInstLoc :: InstDecl name -> SrcSpan+getInstLoc :: InstDecl (GhcPass p) -> SrcSpan getInstLoc = \case   ClsInstD _ (ClsInstDecl { cid_poly_ty = ty }) -> getLoc (hsSigType ty)   DataFamInstD _ (DataFamInstDecl@@ -191,11 +192,22 @@                   , (dL->L _ (ConDeclField _ ns _ doc)) <- (unLoc flds)                   , (dL->L _ n) <- ns ]         derivs  = [ (instName, [unLoc doc], M.empty)-                  | HsIB { hsib_body = (dL->L l (HsDocTy _ _ doc)) }-                      <- concatMap (unLoc . deriv_clause_tys . unLoc) $-                           unLoc $ dd_derivs dd+                  | (l, doc) <- mapMaybe (extract_deriv_ty . hsib_body) $+                                concatMap (unLoc . deriv_clause_tys . unLoc) $+                                unLoc $ dd_derivs dd                   , Just instName <- [M.lookup l instMap] ] +        extract_deriv_ty :: LHsType GhcRn -> Maybe (SrcSpan, LHsDocString)+        extract_deriv_ty ty =+          case dL ty of+            -- deriving (forall a. C a {- ^ Doc comment -})+            L l (HsForAllTy{ hst_fvf = ForallInvis+                           , hst_body = dL->L _ (HsDocTy _ _ doc) })+                                  -> Just (l, doc)+            -- deriving (C a {- ^ Doc comment -})+            L l (HsDocTy _ _ doc) -> Just (l, doc)+            _                     -> Nothing+ -- | Extract constructor argument docs from inside constructor decls. conArgDocs :: ConDecl GhcRn -> Map Int (HsDocString) conArgDocs con = case getConArgs con of@@ -203,9 +215,10 @@                    InfixCon arg1 arg2 -> go 0 ([unLoc arg1, unLoc arg2] ++ ret)                    RecCon _ -> go 1 ret   where-    go n (HsDocTy _ _ (dL->L _ ds) : tys) = M.insert n ds $ go (n+1) tys-    go n (_ : tys) = go (n+1) tys-    go _ [] = M.empty+    go n = M.fromList . catMaybes . zipWith f [n..]+      where+        f n (HsDocTy _ _ lds) = Just (n, unLoc lds)+        f _ _ = Nothing      ret = case con of             ConDeclGADT { con_res_ty = res_ty } -> [ unLoc res_ty ]@@ -221,10 +234,10 @@ classDecls class_ = filterDecls . collectDocs . sortByLoc $ decls   where     decls = docs ++ defs ++ sigs ++ ats-    docs  = mkDecls tcdDocs (DocD noExt) class_-    defs  = mkDecls (bagToList . tcdMeths) (ValD noExt) class_-    sigs  = mkDecls tcdSigs (SigD noExt) class_-    ats   = mkDecls tcdATs (TyClD noExt . FamDecl noExt) class_+    docs  = mkDecls tcdDocs (DocD noExtField) class_+    defs  = mkDecls (bagToList . tcdMeths) (ValD noExtField) class_+    sigs  = mkDecls tcdSigs (SigD noExtField) class_+    ats   = mkDecls tcdATs (TyClD noExtField . FamDecl noExtField) class_  -- | Extract function argument docs from inside top-level decls. declTypeDocs :: HsDecl GhcRn -> Map Int (HsDocString)@@ -251,14 +264,13 @@ typeDocs :: HsType GhcRn -> Map Int (HsDocString) typeDocs = go 0   where-    go n (HsForAllTy { hst_body = ty }) = go n (unLoc ty)-    go n (HsQualTy   { hst_body = ty }) = go n (unLoc ty)-    go n (HsFunTy _ (dL->L _-                      (HsDocTy _ _ (dL->L _ x))) (dL->L _ ty)) =-       M.insert n x $ go (n+1) ty-    go n (HsFunTy _ _ ty) = go (n+1) (unLoc ty)-    go n (HsDocTy _ _ (dL->L _ doc)) = M.singleton n doc-    go _ _ = M.empty+    go n = \case+      HsForAllTy { hst_body = ty }        -> go n (unLoc ty)+      HsQualTy   { hst_body = ty }        -> go n (unLoc ty)+      HsFunTy _ (unLoc->HsDocTy _ _ x) ty -> M.insert n (unLoc x) $ go (n+1) (unLoc ty)+      HsFunTy _ _ ty                      -> go (n+1) (unLoc ty)+      HsDocTy _ _ doc                     -> M.singleton n (unLoc doc)+      _                                   -> M.empty  -- | The top-level declarations of a module that we care about, -- ordered by source location, with documentation attached if it exists.@@ -268,21 +280,21 @@ -- | Take all declarations except pragmas, infix decls, rules from an 'HsGroup'. ungroup :: HsGroup GhcRn -> [LHsDecl GhcRn] ungroup group_ =-  mkDecls (tyClGroupTyClDecls . hs_tyclds) (TyClD noExt)  group_ ++-  mkDecls hs_derivds             (DerivD noExt) group_ ++-  mkDecls hs_defds               (DefD noExt)   group_ ++-  mkDecls hs_fords               (ForD noExt)   group_ ++-  mkDecls hs_docs                (DocD noExt)   group_ ++-  mkDecls (tyClGroupInstDecls . hs_tyclds) (InstD noExt)  group_ ++-  mkDecls (typesigs . hs_valds)  (SigD noExt)   group_ ++-  mkDecls (valbinds . hs_valds)  (ValD noExt)   group_+  mkDecls (tyClGroupTyClDecls . hs_tyclds) (TyClD noExtField)  group_ +++  mkDecls hs_derivds             (DerivD noExtField) group_ +++  mkDecls hs_defds               (DefD noExtField)   group_ +++  mkDecls hs_fords               (ForD noExtField)   group_ +++  mkDecls hs_docs                (DocD noExtField)   group_ +++  mkDecls (tyClGroupInstDecls . hs_tyclds) (InstD noExtField)  group_ +++  mkDecls (typesigs . hs_valds)  (SigD noExtField)   group_ +++  mkDecls (valbinds . hs_valds)  (ValD noExtField)   group_   where-    typesigs (XValBindsLR (NValBinds _ sigs)) = filter (isUserSig . unLoc) sigs-    typesigs _ = error "expected ValBindsOut"+    typesigs (XValBindsLR (NValBinds _ sig)) = filter (isUserSig . unLoc) sig+    typesigs ValBinds{} = error "expected XValBindsLR"      valbinds (XValBindsLR (NValBinds binds _)) =       concatMap bagToList . snd . unzip $ binds-    valbinds _ = error "expected ValBindsOut"+    valbinds ValBinds{} = error "expected XValBindsLR"  -- | Sort by source location sortByLoc :: [Located a] -> [Located a]@@ -293,17 +305,16 @@ -- A declaration may have multiple doc strings attached to it. collectDocs :: [LHsDecl pass] -> [(LHsDecl pass, [HsDocString])] -- ^ This is an example.-collectDocs = go Nothing []+collectDocs = go [] Nothing   where-    go Nothing _ [] = []-    go (Just prev) docs [] = finished prev docs []-    go prev docs ((dL->L _ (DocD _ (DocCommentNext str))) : ds)-      | Nothing <- prev = go Nothing (str:docs) ds-      | Just decl <- prev = finished decl docs (go Nothing [str] ds)-    go prev docs ((dL->L _ (DocD _ (DocCommentPrev str))) : ds) =-      go prev (str:docs) ds-    go Nothing docs (d:ds) = go (Just d) docs ds-    go (Just prev) docs (d:ds) = finished prev docs (go (Just d) [] ds)+    go docs mprev decls = case (decls, mprev) of+      ((unLoc->DocD _ (DocCommentNext s)) : ds, Nothing)   -> go (s:docs) Nothing ds+      ((unLoc->DocD _ (DocCommentNext s)) : ds, Just prev) -> finished prev docs $ go [s] Nothing ds+      ((unLoc->DocD _ (DocCommentPrev s)) : ds, mprev)     -> go (s:docs) mprev ds+      (d                                  : ds, Nothing)   -> go docs (Just d) ds+      (d                                  : ds, Just prev) -> finished prev docs $ go [] (Just d) ds+      ([]                                     , Nothing)   -> []+      ([]                                     , Just prev) -> finished prev docs []      finished decl docs rest = (decl, reverse docs) : rest @@ -324,13 +335,12 @@  -- | Go through all class declarations and filter their sub-declarations filterClasses :: [(LHsDecl a, doc)] -> [(LHsDecl a, doc)]-filterClasses decls = [ if isClassD d then (cL loc (filterClass d), doc) else x-                      | x@(dL->L loc d, doc) <- decls ]+filterClasses = map (first (mapLoc filterClass))   where-    filterClass (TyClD x c) =+    filterClass (TyClD x c@(ClassDecl {})) =       TyClD x $ c { tcdSigs =         filter (liftA2 (||) (isUserSig . unLoc) isMinimalLSig) (tcdSigs c) }-    filterClass _ = error "expected TyClD"+    filterClass d = d  -- | Was this signature given by the user? isUserSig :: Sig name -> Bool@@ -339,12 +349,10 @@ isUserSig PatSynSig {}  = True isUserSig _             = False -isClassD :: HsDecl a -> Bool-isClassD (TyClD _ d) = isClassDecl d-isClassD _ = False- -- | Take a field of declarations from a data structure and create HsDecls -- using the given constructor-mkDecls :: (a -> [Located b]) -> (b -> c) -> a -> [Located c]-mkDecls field con struct = [ cL loc (con decl)-                           | (dL->L loc decl) <- field struct ]+mkDecls :: (struct -> [Located decl])+        -> (decl -> hsDecl)+        -> struct+        -> [Located hsDecl]+mkDecls field con = map (mapLoc con) . field
deSugar/Match.hs view
@@ -21,11 +21,11 @@  import BasicTypes ( Origin(..) ) import DynFlags-import HsSyn+import GHC.Hs import TcHsSyn import TcEvidence import TcRnMonad-import Check+import GHC.HsToCore.PmCheck import CoreSyn import Literal import CoreUtils@@ -154,7 +154,7 @@ is the scrutinee(s) of the match. The desugared expression may sometimes use that Id in a local binding or as a case binder.  So it should not have an External name; Lint rejects non-top-level binders-with External names (Trac #13043).+with External names (#13043).  See also Note [Localise pattern binders] in DsUtils -}@@ -501,9 +501,9 @@ -- Push the bang-pattern inwards, in the hope that -- it may disappear next time tidy_bang_pat v o l (AsPat x v' p)-  = tidy1 v o (AsPat x v' (cL l (BangPat noExt p)))+  = tidy1 v o (AsPat x v' (cL l (BangPat noExtField p))) tidy_bang_pat v o l (CoPat x w p t)-  = tidy1 v o (CoPat x w (BangPat noExt (cL l p)) t)+  = tidy1 v o (CoPat x w (BangPat noExtField (cL l p)) t)  -- Discard bang around strict pattern tidy_bang_pat v o _ p@(LitPat {})    = tidy1 v o p@@ -515,7 +515,7 @@ tidy_bang_pat v o l p@(ConPatOut { pat_con = (dL->L _ (RealDataCon dc))                                  , pat_args = args                                  , pat_arg_tys = arg_tys })-  -- Newtypes: push bang inwards (Trac #9844)+  -- Newtypes: push bang inwards (#9844)   =     if isNewTyCon (dataConTyCon dc)       then tidy1 v o (p { pat_args = push_bang_into_newtype_arg l ty args })@@ -534,11 +534,11 @@ --    NPlusKPat -- -- For LazyPat, remember that it's semantically like a VarPat---  i.e.  !(~p) is not like ~p, or p!  (Trac #8952)+--  i.e.  !(~p) is not like ~p, or p!  (#8952) -- -- NB: SigPatIn, ConPatIn should not happen -tidy_bang_pat _ _ l p = return (idDsWrapper, BangPat noExt (cL l p))+tidy_bang_pat _ _ l p = return (idDsWrapper, BangPat noExtField (cL l p))  ------------------- push_bang_into_newtype_arg :: SrcSpan@@ -549,16 +549,16 @@ -- We are transforming   !(N p)   into   (N !p) push_bang_into_newtype_arg l _ty (PrefixCon (arg:args))   = ASSERT( null args)-    PrefixCon [cL l (BangPat noExt arg)]+    PrefixCon [cL l (BangPat noExtField arg)] push_bang_into_newtype_arg l _ty (RecCon rf)   | HsRecFields { rec_flds = (dL->L lf fld) : flds } <- rf   , HsRecField { hsRecFieldArg = arg } <- fld   = ASSERT( null flds)     RecCon (rf { rec_flds = [cL lf (fld { hsRecFieldArg-                                           = cL l (BangPat noExt arg) })] })+                                           = cL l (BangPat noExtField arg) })] }) push_bang_into_newtype_arg l ty (RecCon rf) -- If a user writes !(T {})   | HsRecFields { rec_flds = [] } <- rf-  = PrefixCon [cL l (BangPat noExt (noLoc (WildPat ty)))]+  = PrefixCon [cL l (BangPat noExtField (noLoc (WildPat ty)))] push_bang_into_newtype_arg _ _ cd   = pprPanic "push_bang_into_newtype_arg" (pprConArgs cd) @@ -568,7 +568,7 @@ For the pattern  !(Just pat)  we can discard the bang, because the pattern is strict anyway. But for !(N pat), where   newtype NT = N Int-we definitely can't discard the bang.  Trac #9844.+we definitely can't discard the bang.  #9844.  So what we do is to push the bang inwards, in the hope that it will get discarded there.  So we transform@@ -690,7 +690,13 @@  matchWrapper   :: HsMatchContext Name               -- ^ For shadowing warning messages-  -> Maybe (LHsExpr GhcTc)             -- ^ Scrutinee, if we check a case expr+  -> Maybe (LHsExpr GhcTc)             -- ^ Scrutinee. (Just scrut) for a case expr+                                       --      case scrut of { p1 -> e1 ... }+                                       --   (and in this case the MatchGroup will+                                       --    have all singleton patterns)+                                       --   Nothing for a function definition+                                       --      f p1 q1 = ...  -- No "scrutinee"+                                       --      f p2 q2 = ...  -- in this case   -> MatchGroup GhcTc (LHsExpr GhcTc)  -- ^ Matches being desugared   -> DsM ([Id], CoreExpr)              -- ^ Results (usually passed to 'match') @@ -730,35 +736,40 @@          ; eqns_info   <- mapM (mk_eqn_info new_vars) matches -        -- pattern match check warnings-        ; unless (isGenerated origin) $-          when (isAnyPmCheckEnabled dflags (DsMatchContext ctxt locn)) $-          addTmCsDs (genCaseTmCs1 mb_scr new_vars) $-              -- See Note [Type and Term Equality Propagation]-          checkMatches dflags (DsMatchContext ctxt locn) new_vars matches+        -- Pattern match check warnings for /this match-group/+        ; when (isMatchContextPmChecked dflags origin ctxt) $+            addScrutTmCs mb_scr new_vars $+            -- See Note [Type and Term Equality Propagation]+            checkMatches dflags (DsMatchContext ctxt locn) new_vars matches          ; result_expr <- handleWarnings $                          matchEquations ctxt new_vars eqns_info rhs_ty         ; return (new_vars, result_expr) }   where+    -- Called once per equation in the match, or alternative in the case     mk_eqn_info vars (dL->L _ (Match { m_pats = pats, m_grhss = grhss }))       = do { dflags <- getDynFlags            ; let upats = map (unLoc . decideBangHood dflags) pats                  dicts = collectEvVarsPats upats-           ; tm_cs <- genCaseTmCs2 mb_scr upats vars-           ; match_result <- addDictsDs dicts $ -- See Note [Type and Term Equality Propagation]-                             addTmCsDs tm_cs  $ -- See Note [Type and Term Equality Propagation]-                             dsGRHSs ctxt grhss rhs_ty++           ; match_result <-+              -- Extend the environment with knowledge about+              -- the matches before desguaring the RHS+              -- See Note [Type and Term Equality Propagation]+              applyWhen (needToRunPmCheck dflags origin)+                        (addTyCsDs dicts . addScrutTmCs mb_scr vars . addPatTmCs upats vars)+                        (dsGRHSs ctxt grhss rhs_ty)+            ; return (EqnInfo { eqn_pats = upats                              , eqn_orig = FromSource                              , eqn_rhs = match_result }) }-    mk_eqn_info _ (dL->L _ (XMatch _)) = panic "matchWrapper"+    mk_eqn_info _ (dL->L _ (XMatch nec)) = noExtCon nec     mk_eqn_info _ _  = panic "mk_eqn_info: Impossible Match" -- due to #15884      handleWarnings = if isGenerated origin                      then discardWarningsDs                      else id-matchWrapper _ _ (XMatchGroup _) = panic "matchWrapper"+matchWrapper _ _ (XMatchGroup nec) = noExtCon nec  matchEquations  :: HsMatchContext Name                 -> [MatchId] -> [EquationInfo] -> Type@@ -926,7 +937,7 @@     ... where P is a pattern synonym, can we put (P a -> e1) and (P b -> e2) in the same group?  We can if P is a constructor, but /not/ if P is a pattern synonym.-Consider (Trac #11224)+Consider (#11224)    -- readMaybe :: Read a => String -> Maybe a    pattern PRead :: Read a => () => a -> String    pattern PRead a <- (readMaybe -> Just a)
deSugar/Match.hs-boot view
@@ -5,9 +5,9 @@ import TcType   ( Type ) import DsMonad  ( DsM, EquationInfo, MatchResult ) import CoreSyn  ( CoreExpr )-import HsSyn    ( LPat, HsMatchContext, MatchGroup, LHsExpr )+import GHC.Hs   ( LPat, HsMatchContext, MatchGroup, LHsExpr ) import Name     ( Name )-import HsExtension ( GhcTc )+import GHC.Hs.Extension ( GhcTc )  match   :: [Id]         -> Type
deSugar/MatchCon.hs view
@@ -18,7 +18,7 @@  import {-# SOURCE #-} Match     ( match ) -import HsSyn+import GHC.Hs import DsBinds import ConLike import BasicTypes ( Origin(..) )@@ -242,7 +242,7 @@          f (T { y=True, x=False }) = ...  We must match the patterns IN THE ORDER GIVEN, thus for the first-one we match y=True before x=False.  See Trac #246; or imagine+one we match y=True before x=False.  See #246; or imagine matching against (T { y=False, x=undefined }): should fail without touching the undefined. 
deSugar/MatchLit.hs view
@@ -27,7 +27,7 @@ import DsMonad import DsUtils -import HsSyn+import GHC.Hs  import Id import CoreSyn@@ -95,7 +95,7 @@     HsString _ str   -> mkStringExprFS str     HsInteger _ i _  -> mkIntegerExpr i     HsInt _ i        -> return (mkIntExpr dflags (il_value i))-    XLit x           -> pprPanic "dsLit" (ppr x)+    XLit nec         -> noExtCon nec     HsRat _ (FL _ _ val) ty -> do       num   <- mkIntegerExpr (numerator val)       denom <- mkIntegerExpr (denominator val)@@ -116,7 +116,7 @@   case shortCutLit dflags val ty of     Just expr | not rebindable -> dsExpr expr        -- Note [Literal short cut]     _                          -> dsExpr witness-dsOverLit XOverLit{} = panic "dsOverLit"+dsOverLit (XOverLit nec) = noExtCon nec {- Note [Literal short cut] ~~~~~~~~~~~~~~~~~~~~~~~~@@ -287,7 +287,7 @@  getLHsIntegralLit :: LHsExpr GhcTc -> Maybe (Integer, Name) -- ^ See if the expression is an 'Integral' literal.--- Remember to look through automatically-added tick-boxes! (Trac #8384)+-- Remember to look through automatically-added tick-boxes! (#8384) getLHsIntegralLit (dL->L _ (HsPar _ e))            = getLHsIntegralLit e getLHsIntegralLit (dL->L _ (HsTick _ _ e))         = getLHsIntegralLit e getLHsIntegralLit (dL->L _ (HsBinTick _ _ _ e))    = getLHsIntegralLit e@@ -337,7 +337,7 @@                   (mkNilPat charTy) (unpackFS s)         -- The stringTy is the type of the whole pattern, not         -- the type to instantiate (:) or [] with!-tidyLitPat lit = LitPat noExt lit+tidyLitPat lit = LitPat noExtField lit  ---------------- tidyNPat :: HsOverLit GhcTc -> Maybe (SyntaxExpr GhcTc) -> SyntaxExpr GhcTc@@ -349,7 +349,7 @@         -- Once that is settled, look for cases where the type of the         -- entire overloaded literal matches the type of the underlying literal,         -- and in that case take the short cut-        -- NB: Watch out for weird cases like Trac #3382+        -- NB: Watch out for weird cases like #3382         --        f :: Int -> Int         --        f "blah" = 4         --     which might be ok if we have 'instance IsString Int'@@ -363,7 +363,7 @@      -- NB: do /not/ convert Float or Double literals to F# 3.8 or D# 5.3      -- If we do convert to the constructor form, we'll generate a case      -- expression on a Float# or Double# and that's not allowed in Core; see-     -- Trac #9238 and Note [Rules for floating-point comparisons] in PrelRules+     -- #9238 and Note [Rules for floating-point comparisons] in PrelRules   where     -- Sometimes (like in test case     -- overloadedlists/should_run/overloadedlistsrun04), the SyntaxExprs include@@ -373,7 +373,7 @@      mk_con_pat :: DataCon -> HsLit GhcTc -> Pat GhcTc     mk_con_pat con lit-      = unLoc (mkPrefixConPat con [noLoc $ LitPat noExt lit] [])+      = unLoc (mkPrefixConPat con [noLoc $ LitPat noExtField lit] [])      mb_int_lit :: Maybe Integer     mb_int_lit = case (mb_neg, val) of@@ -456,7 +456,7 @@ hsLitKey _      (HsCharPrim   _ c) = mkLitChar            c hsLitKey _      (HsFloatPrim  _ f) = mkLitFloat           (fl_value f) hsLitKey _      (HsDoublePrim _ d) = mkLitDouble          (fl_value d)-hsLitKey _      (HsString _ s)     = LitString (fastStringToByteString s)+hsLitKey _      (HsString _ s)     = LitString (bytesFS s) hsLitKey _      l                  = pprPanic "hsLitKey" (ppr l)  {-
− deSugar/PmExpr.hs
@@ -1,466 +0,0 @@-{--Author: George Karachalias <george.karachalias@cs.kuleuven.be>--Haskell expressions (as used by the pattern matching checker) and utilities.--}--{-# LANGUAGE CPP #-}-{-# LANGUAGE ViewPatterns #-}--module PmExpr (-        PmExpr(..), PmLit(..), SimpleEq, ComplexEq, toComplex, eqPmLit,-        truePmExpr, falsePmExpr, isTruePmExpr, isFalsePmExpr, isNotPmExprOther,-        lhsExprToPmExpr, hsExprToPmExpr, substComplexEq, filterComplex,-        pprPmExprWithParens, runPmPprM-    ) where--#include "HsVersions.h"--import GhcPrelude--import BasicTypes (SourceText)-import FastString (FastString, unpackFS)-import HsSyn-import Id-import Name-import NameSet-import DataCon-import ConLike-import TcType (isStringTy)-import TysWiredIn-import Outputable-import Util-import SrcLoc--import Data.Maybe (mapMaybe)-import Data.List (groupBy, sortBy, nubBy)-import Control.Monad.Trans.State.Lazy--{--%************************************************************************-%*                                                                      *-                         Lifted Expressions-%*                                                                      *-%************************************************************************--}--{- Note [PmExprOther in PmExpr]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Since there is no plan to extend the (currently pretty naive) term oracle in-the near future, instead of playing with the verbose (HsExpr Id), we lift it to-PmExpr. All expressions the term oracle does not handle are wrapped by the-constructor PmExprOther. Note that we do not perform substitution in-PmExprOther. Because of this, we do not even print PmExprOther, since they may-refer to variables that are otherwise substituted away.--}---- ------------------------------------------------------------------------------- ** Types---- | Lifted expressions for pattern match checking.-data PmExpr = PmExprVar   Name-            | PmExprCon   ConLike [PmExpr]-            | PmExprLit   PmLit-            | PmExprEq    PmExpr PmExpr  -- Syntactic equality-            | PmExprOther (HsExpr GhcTc)  -- Note [PmExprOther in PmExpr]---mkPmExprData :: DataCon -> [PmExpr] -> PmExpr-mkPmExprData dc args = PmExprCon (RealDataCon dc) args---- | Literals (simple and overloaded ones) for pattern match checking.-data PmLit = PmSLit (HsLit GhcTc)                               -- simple-           | PmOLit Bool {- is it negated? -} (HsOverLit GhcTc) -- overloaded---- | Equality between literals for pattern match checking.-eqPmLit :: PmLit -> PmLit -> Bool-eqPmLit (PmSLit    l1) (PmSLit    l2) = l1 == l2-eqPmLit (PmOLit b1 l1) (PmOLit b2 l2) = b1 == b2 && l1 == l2-  -- See Note [Undecidable Equality for Overloaded Literals]-eqPmLit _              _              = False--{- Note [Undecidable Equality for Overloaded Literals]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Equality on overloaded literals is undecidable in the general case. Consider-the following example:--  instance Num Bool where-    ...-    fromInteger 0 = False -- C-like representation of booleans-    fromInteger _ = True--    f :: Bool -> ()-    f 1 = ()        -- Clause A-    f 2 = ()        -- Clause B--Clause B is redundant but to detect this, we should be able to solve the-constraint: False ~ (fromInteger 2 ~ fromInteger 1) which means that we-have to look through function `fromInteger`, whose implementation could-be anything. This poses difficulties for:--1. The expressive power of the check.-   We cannot expect a reasonable implementation of pattern matching to detect-   that fromInteger 2 ~ fromInteger 1 is True, unless we unfold function-   fromInteger. This puts termination at risk and is undecidable in the-   general case.--2. Performance.-   Having an unresolved constraint False ~ (fromInteger 2 ~ fromInteger 1)-   lying around could become expensive really fast. Ticket #11161 illustrates-   how heavy use of overloaded literals can generate plenty of those-   constraints, effectively undermining the term oracle's performance.--3. Error nessages/Warnings.-   What should our message for `f` above be? A reasonable approach would be-   to issue:--     Pattern matches are (potentially) redundant:-       f 2 = ...    under the assumption that 1 == 2--   but seems to complex and confusing for the user.--We choose to treat overloaded literals that look different as different. The-impact of this is the following:--  * Redundancy checking is rather conservative, since it cannot see that clause-    B above is redundant.--  * We have instant equality check for overloaded literals (we do not rely on-    the term oracle which is rather expensive, both in terms of performance and-    memory). This significantly improves the performance of functions `covered`-    `uncovered` and `divergent` in deSugar/Check.hs and effectively addresses-    #11161.--  * The warnings issued are simpler.--  * We do not play on the safe side, strictly speaking. The assumption that-    1 /= 2 makes the redundancy check more conservative but at the same time-    makes its dual (exhaustiveness check) unsafe. This we can live with, mainly-    for two reasons:-    1. At the moment we do not use the results of the check during compilation-       where this would be a disaster (could result in runtime errors even if-       our function was deemed exhaustive).-    2. Pattern matcing on literals can never be considered exhaustive unless we-       have a catch-all clause. Hence, this assumption affects mainly the-       appearance of the warnings and is, in practice safe.--}--nubPmLit :: [PmLit] -> [PmLit]-nubPmLit = nubBy eqPmLit---- | Term equalities-type SimpleEq  = (Id, PmExpr) -- We always use this orientation-type ComplexEq = (PmExpr, PmExpr)---- | Lift a `SimpleEq` to a `ComplexEq`-toComplex :: SimpleEq -> ComplexEq-toComplex (x,e) = (PmExprVar (idName x), e)---- | Expression `True'-truePmExpr :: PmExpr-truePmExpr = mkPmExprData trueDataCon []---- | Expression `False'-falsePmExpr :: PmExpr-falsePmExpr = mkPmExprData falseDataCon []---- ------------------------------------------------------------------------------- ** Predicates on PmExpr---- | Check if an expression is lifted or not-isNotPmExprOther :: PmExpr -> Bool-isNotPmExprOther (PmExprOther _) = False-isNotPmExprOther _expr           = True---- | Check whether a literal is negated-isNegatedPmLit :: PmLit -> Bool-isNegatedPmLit (PmOLit b _) = b-isNegatedPmLit _other_lit   = False---- | Check whether a PmExpr is syntactically equal to term `True'.-isTruePmExpr :: PmExpr -> Bool-isTruePmExpr (PmExprCon c []) = c == RealDataCon trueDataCon-isTruePmExpr _other_expr      = False---- | Check whether a PmExpr is syntactically equal to term `False'.-isFalsePmExpr :: PmExpr -> Bool-isFalsePmExpr (PmExprCon c []) = c == RealDataCon falseDataCon-isFalsePmExpr _other_expr      = False---- | Check whether a PmExpr is syntactically e-isNilPmExpr :: PmExpr -> Bool-isNilPmExpr (PmExprCon c _) = c == RealDataCon nilDataCon-isNilPmExpr _other_expr     = False---- | Check whether a PmExpr is syntactically equal to (x == y).--- Since (==) is overloaded and can have an arbitrary implementation, we use--- the PmExprEq constructor to represent only equalities with non-overloaded--- literals where it coincides with a syntactic equality check.-isPmExprEq :: PmExpr -> Maybe (PmExpr, PmExpr)-isPmExprEq (PmExprEq e1 e2) = Just (e1,e2)-isPmExprEq _other_expr      = Nothing---- | Check if a DataCon is (:).-isConsDataCon :: DataCon -> Bool-isConsDataCon con = consDataCon == con---- ------------------------------------------------------------------------------- ** Substitution in PmExpr---- | We return a boolean along with the expression. Hence, if substitution was--- a no-op, we know that the expression still cannot progress.-substPmExpr :: Name -> PmExpr -> PmExpr -> (PmExpr, Bool)-substPmExpr x e1 e =-  case e of-    PmExprVar z | x == z    -> (e1, True)-                | otherwise -> (e, False)-    PmExprCon c ps -> let (ps', bs) = mapAndUnzip (substPmExpr x e1) ps-                      in  (PmExprCon c ps', or bs)-    PmExprEq ex ey -> let (ex', bx) = substPmExpr x e1 ex-                          (ey', by) = substPmExpr x e1 ey-                      in  (PmExprEq ex' ey', bx || by)-    _other_expr    -> (e, False) -- The rest are terminals (We silently ignore-                                 -- Other). See Note [PmExprOther in PmExpr]---- | Substitute in a complex equality. We return (Left eq) if the substitution--- affected the equality or (Right eq) if nothing happened.-substComplexEq :: Name -> PmExpr -> ComplexEq -> Either ComplexEq ComplexEq-substComplexEq x e (ex, ey)-  | bx || by  = Left  (ex', ey')-  | otherwise = Right (ex', ey')-  where-    (ex', bx) = substPmExpr x e ex-    (ey', by) = substPmExpr x e ey---- -------------------------------------------------------------------------- ** Lift source expressions (HsExpr Id) to PmExpr--lhsExprToPmExpr :: LHsExpr GhcTc -> PmExpr-lhsExprToPmExpr (dL->L _ e) = hsExprToPmExpr e--hsExprToPmExpr :: HsExpr GhcTc -> PmExpr--hsExprToPmExpr (HsVar        _ x) = PmExprVar (idName (unLoc x))-hsExprToPmExpr (HsConLikeOut _ c) = PmExprVar (conLikeName c)---- Desugar literal strings as a list of characters. For other literal values,--- keep it as it is.--- See `translatePat` in Check.hs (the `NPat` and `LitPat` case), and--- Note [Translate Overloaded Literal for Exhaustiveness Checking].-hsExprToPmExpr (HsOverLit _ olit)-  | OverLit (OverLitTc False ty) (HsIsString src s) _ <- olit, isStringTy ty-  = stringExprToList src s-  | otherwise = PmExprLit (PmOLit False olit)-hsExprToPmExpr (HsLit     _ lit)-  | HsString src s <- lit-  = stringExprToList src s-  | otherwise = PmExprLit (PmSLit lit)--hsExprToPmExpr e@(NegApp _ (dL->L _ neg_expr) _)-  | PmExprLit (PmOLit False olit) <- hsExprToPmExpr neg_expr-    -- NB: DON'T simply @(NegApp (NegApp olit))@ as @x@. when extension-    -- @RebindableSyntax@ enabled, (-(-x)) may not equals to x.-  = PmExprLit (PmOLit True olit)-  | otherwise = PmExprOther e--hsExprToPmExpr (HsPar _ (dL->L _ e)) = hsExprToPmExpr e--hsExprToPmExpr e@(ExplicitTuple _ ps boxity)-  | all tupArgPresent ps = mkPmExprData tuple_con tuple_args-  | otherwise            = PmExprOther e-  where-    tuple_con  = tupleDataCon boxity (length ps)-    tuple_args = [ lhsExprToPmExpr e | (dL->L _ (Present _ e)) <- ps ]--hsExprToPmExpr e@(ExplicitList _  mb_ol elems)-  | Nothing <- mb_ol = foldr cons nil (map lhsExprToPmExpr elems)-  | otherwise        = PmExprOther e {- overloaded list: No PmExprApp -}-  where-    cons x xs = mkPmExprData consDataCon [x,xs]-    nil       = mkPmExprData nilDataCon  []---- we want this but we would have to make everything monadic :/--- ./compiler/deSugar/DsMonad.hs:397:dsLookupDataCon :: Name -> DsM DataCon------ hsExprToPmExpr (RecordCon   c _ binds) = do---   con  <- dsLookupDataCon (unLoc c)---   args <- mapM lhsExprToPmExpr (hsRecFieldsArgs binds)---   return (PmExprCon con args)-hsExprToPmExpr e@(RecordCon {}) = PmExprOther e--hsExprToPmExpr (HsTick           _ _ e) = lhsExprToPmExpr e-hsExprToPmExpr (HsBinTick      _ _ _ e) = lhsExprToPmExpr e-hsExprToPmExpr (HsTickPragma _ _ _ _ e) = lhsExprToPmExpr e-hsExprToPmExpr (HsSCC          _ _ _ e) = lhsExprToPmExpr e-hsExprToPmExpr (HsCoreAnn      _ _ _ e) = lhsExprToPmExpr e-hsExprToPmExpr (ExprWithTySig    _ e _) = lhsExprToPmExpr e-hsExprToPmExpr (HsWrap           _ _ e) =  hsExprToPmExpr e-hsExprToPmExpr e = PmExprOther e -- the rest are not handled by the oracle--stringExprToList :: SourceText -> FastString -> PmExpr-stringExprToList src s = foldr cons nil (map charToPmExpr (unpackFS s))-  where-    cons x xs      = mkPmExprData consDataCon [x,xs]-    nil            = mkPmExprData nilDataCon  []-    charToPmExpr c = PmExprLit (PmSLit (HsChar src c))--{--%************************************************************************-%*                                                                      *-                            Pretty printing-%*                                                                      *-%************************************************************************--}--{- 1. Literals-~~~~~~~~~~~~~~-Starting with a function definition like:--    f :: Int -> Bool-    f 5 = True-    f 6 = True--The uncovered set looks like:-    { var |> False == (var == 5), False == (var == 6) }--Yet, we would like to print this nicely as follows:-   x , where x not one of {5,6}--Function `filterComplex' takes the set of residual constraints and packs-together the negative constraints that refer to the same variable so we can do-just this. Since these variables will be shown to the programmer, we also give-them better names (t1, t2, ..), hence the SDoc in PmNegLitCt.--2. Residual Constraints-~~~~~~~~~~~~~~~~~~~~~~~-Unhandled constraints that refer to HsExpr are typically ignored by the solver-(it does not even substitute in HsExpr so they are even printed as wildcards).-Additionally, the oracle returns a substitution if it succeeds so we apply this-substitution to the vectors before printing them out (see function `pprOne' in-Check.hs) to be more precice.--}---- -------------------------------------------------------------------------------- ** Transform residual constraints in appropriate form for pretty printing--type PmNegLitCt = (Name, (SDoc, [PmLit]))--filterComplex :: [ComplexEq] -> [PmNegLitCt]-filterComplex = zipWith rename nameList . map mkGroup-              . groupBy name . sortBy order . mapMaybe isNegLitCs-  where-    order x y = compare (fst x) (fst y)-    name  x y = fst x == fst y-    mkGroup l = (fst (head l), nubPmLit $ map snd l)-    rename new (old, lits) = (old, (new, lits))--    isNegLitCs (e1,e2)-      | isFalsePmExpr e1, Just (x,y) <- isPmExprEq e2 = isNegLitCs' x y-      | isFalsePmExpr e2, Just (x,y) <- isPmExprEq e1 = isNegLitCs' x y-      | otherwise = Nothing--    isNegLitCs' (PmExprVar x) (PmExprLit l) = Just (x, l)-    isNegLitCs' (PmExprLit l) (PmExprVar x) = Just (x, l)-    isNegLitCs' _ _             = Nothing--    -- Try nice names p,q,r,s,t before using the (ugly) t_i-    nameList :: [SDoc]-    nameList = map text ["p","q","r","s","t"] ++-                 [ text ('t':show u) | u <- [(0 :: Int)..] ]---- ------------------------------------------------------------------------------runPmPprM :: PmPprM a -> [PmNegLitCt] -> (a, [(SDoc,[PmLit])])-runPmPprM m lit_env = (result, mapMaybe is_used lit_env)-  where-    (result, (_lit_env, used)) = runState m (lit_env, emptyNameSet)--    is_used (x,(name, lits))-      | elemNameSet x used = Just (name, lits)-      | otherwise         = Nothing--type PmPprM a = State ([PmNegLitCt], NameSet) a--- (the first part of the state is read only. make it a reader?)--addUsed :: Name -> PmPprM ()-addUsed x = modify (\(negated, used) -> (negated, extendNameSet used x))--checkNegation :: Name -> PmPprM (Maybe SDoc) -- the clean name if it is negated-checkNegation x = do-  negated <- gets fst-  return $ case lookup x negated of-    Just (new, _) -> Just new-    Nothing       -> Nothing---- | Pretty print a pmexpr, but remember to prettify the names of the variables--- that refer to neg-literals. The ones that cannot be shown are printed as--- underscores.-pprPmExpr :: PmExpr -> PmPprM SDoc-pprPmExpr (PmExprVar x) = do-  mb_name <- checkNegation x-  case mb_name of-    Just name -> addUsed x >> return name-    Nothing   -> return underscore--pprPmExpr (PmExprCon con args) = pprPmExprCon con args-pprPmExpr (PmExprLit l)        = return (ppr l)-pprPmExpr (PmExprEq _ _)       = return underscore -- don't show-pprPmExpr (PmExprOther _)      = return underscore -- don't show--needsParens :: PmExpr -> Bool-needsParens (PmExprVar   {}) = False-needsParens (PmExprLit    l) = isNegatedPmLit l-needsParens (PmExprEq    {}) = False -- will become a wildcard-needsParens (PmExprOther {}) = False -- will become a wildcard-needsParens (PmExprCon (RealDataCon c) es)-  | isTupleDataCon c-  || isConsDataCon c || null es = False-  | otherwise                   = True-needsParens (PmExprCon (PatSynCon _) es) = not (null es)--pprPmExprWithParens :: PmExpr -> PmPprM SDoc-pprPmExprWithParens expr-  | needsParens expr = parens <$> pprPmExpr expr-  | otherwise        =            pprPmExpr expr--pprPmExprCon :: ConLike -> [PmExpr] -> PmPprM SDoc-pprPmExprCon (RealDataCon con) args-  | isTupleDataCon con = mkTuple <$> mapM pprPmExpr args-  | isConsDataCon con  = pretty_list-  where-    mkTuple :: [SDoc] -> SDoc-    mkTuple = parens     . fsep . punctuate comma--    -- lazily, to be used in the list case only-    pretty_list :: PmPprM SDoc-    pretty_list = case isNilPmExpr (last list) of-      True  -> brackets . fsep . punctuate comma <$> mapM pprPmExpr (init list)-      False -> parens   . hcat . punctuate colon <$> mapM pprPmExpr list--    list = list_elements args--    list_elements [x,y]-      | PmExprCon c es <- y,  RealDataCon nilDataCon == c-          = ASSERT(null es) [x,y]-      | PmExprCon c es <- y, RealDataCon consDataCon == c-          = x : list_elements es-      | otherwise = [x,y]-    list_elements list  = pprPanic "list_elements:" (ppr list)-pprPmExprCon cl args-  | conLikeIsInfix cl = case args of-      [x, y] -> do x' <- pprPmExprWithParens x-                   y' <- pprPmExprWithParens y-                   return (x' <+> ppr cl <+> y')-      -- can it be infix but have more than two arguments?-      list   -> pprPanic "pprPmExprCon:" (ppr list)-  | null args = return (ppr cl)-  | otherwise = do args' <- mapM pprPmExprWithParens args-                   return (fsep (ppr cl : args'))--instance Outputable PmLit where-  ppr (PmSLit     l) = pmPprHsLit l-  ppr (PmOLit neg l) = (if neg then char '-' else empty) <> ppr l---- not really useful for pmexprs per se-instance Outputable PmExpr where-  ppr e = fst $ runPmPprM (pprPmExpr e) []
− deSugar/TmOracle.hs
@@ -1,263 +0,0 @@-{--Author: George Karachalias <george.karachalias@cs.kuleuven.be>--The term equality oracle. The main export of the module is function `tmOracle'.--}--{-# LANGUAGE CPP, MultiWayIf #-}--module TmOracle (--        -- re-exported from PmExpr-        PmExpr(..), PmLit(..), SimpleEq, ComplexEq, PmVarEnv, falsePmExpr,-        eqPmLit, filterComplex, isNotPmExprOther, runPmPprM, lhsExprToPmExpr,-        hsExprToPmExpr, pprPmExprWithParens,--        -- the term oracle-        tmOracle, TmState, initialTmState, solveOneEq, extendSubst, canDiverge,--        -- misc.-        toComplex, exprDeepLookup, pmLitType, flattenPmVarEnv-    ) where--#include "HsVersions.h"--import GhcPrelude--import PmExpr--import Id-import Name-import Type-import HsLit-import TcHsSyn-import MonadUtils-import Util--import NameEnv--{--%************************************************************************-%*                                                                      *-                      The term equality oracle-%*                                                                      *-%************************************************************************--}---- | The type of substitutions.-type PmVarEnv = NameEnv PmExpr---- | The environment of the oracle contains---     1. A Bool (are there any constraints we cannot handle? (PmExprOther)).---     2. A substitution we extend with every step and return as a result.-type TmOracleEnv = (Bool, PmVarEnv)---- | Check whether a constraint (x ~ BOT) can succeed,--- given the resulting state of the term oracle.-canDiverge :: Name -> TmState -> Bool-canDiverge x (standby, (_unhandled, env))-  -- If the variable seems not evaluated, there is a possibility for-  -- constraint x ~ BOT to be satisfiable.-  | PmExprVar y <- varDeepLookup env x -- seems not forced-  -- If it is involved (directly or indirectly) in any equality in the-  -- worklist, we can assume that it is already indirectly evaluated,-  -- as a side-effect of equality checking. If not, then we can assume-  -- that the constraint is satisfiable.-  = not $ any (isForcedByEq x) standby || any (isForcedByEq y) standby-  -- Variable x is already in WHNF so the constraint is non-satisfiable-  | otherwise = False--  where-    isForcedByEq :: Name -> ComplexEq -> Bool-    isForcedByEq y (e1, e2) = varIn y e1 || varIn y e2---- | Check whether a variable is in the free variables of an expression-varIn :: Name -> PmExpr -> Bool-varIn x e = case e of-  PmExprVar y    -> x == y-  PmExprCon _ es -> any (x `varIn`) es-  PmExprLit _    -> False-  PmExprEq e1 e2 -> (x `varIn` e1) || (x `varIn` e2)-  PmExprOther _  -> False---- | Flatten the DAG (Could be improved in terms of performance.).-flattenPmVarEnv :: PmVarEnv -> PmVarEnv-flattenPmVarEnv env = mapNameEnv (exprDeepLookup env) env---- | The state of the term oracle (includes complex constraints that cannot--- progress unless we get more information).-type TmState = ([ComplexEq], TmOracleEnv)---- | Initial state of the oracle.-initialTmState :: TmState-initialTmState = ([], (False, emptyNameEnv))---- | Solve a complex equality (top-level).-solveOneEq :: TmState -> ComplexEq -> Maybe TmState-solveOneEq solver_env@(_,(_,env)) complex-  = solveComplexEq solver_env -- do the actual *merging* with existing state-  $ simplifyComplexEq               -- simplify as much as you can-  $ applySubstComplexEq env complex -- replace everything we already know---- | Solve a complex equality.--- Nothing => definitely unsatisfiable--- Just tms => I have added the complex equality and added---             it to the tmstate; the result may or may not be---             satisfiable-solveComplexEq :: TmState -> ComplexEq -> Maybe TmState-solveComplexEq solver_state@(standby, (unhandled, env)) eq@(e1, e2) = case eq of-  -- We cannot do a thing about these cases-  (PmExprOther _,_)            -> Just (standby, (True, env))-  (_,PmExprOther _)            -> Just (standby, (True, env))--  (PmExprLit l1, PmExprLit l2) -> case eqPmLit l1 l2 of-    -- See Note [Undecidable Equality for Overloaded Literals]-    True  -> Just solver_state-    False -> Nothing--  (PmExprCon c1 ts1, PmExprCon c2 ts2)-    | c1 == c2  -> foldlM solveComplexEq solver_state (zip ts1 ts2)-    | otherwise -> Nothing-  (PmExprCon _ [], PmExprEq t1 t2)-    | isTruePmExpr e1  -> solveComplexEq solver_state (t1, t2)-    | isFalsePmExpr e1 -> Just (eq:standby, (unhandled, env))-  (PmExprEq t1 t2, PmExprCon _ [])-    | isTruePmExpr e2   -> solveComplexEq solver_state (t1, t2)-    | isFalsePmExpr e2  -> Just (eq:standby, (unhandled, env))--  (PmExprVar x, PmExprVar y)-    | x == y    -> Just solver_state-    | otherwise -> extendSubstAndSolve x e2 solver_state--  (PmExprVar x, _) -> extendSubstAndSolve x e2 solver_state-  (_, PmExprVar x) -> extendSubstAndSolve x e1 solver_state--  (PmExprEq _ _, PmExprEq _ _) -> Just (eq:standby, (unhandled, env))--  _ -> Just (standby, (True, env)) -- I HATE CATCH-ALLS---- | Extend the substitution and solve the (possibly updated) constraints.-extendSubstAndSolve :: Name -> PmExpr -> TmState -> Maybe TmState-extendSubstAndSolve x e (standby, (unhandled, env))-  = foldlM solveComplexEq new_incr_state (map simplifyComplexEq changed)-  where-    -- Apply the substitution to the worklist and partition them to the ones-    -- that had some progress and the rest. Then, recurse over the ones that-    -- had some progress. Careful about performance:-    -- See Note [Representation of Term Equalities] in deSugar/Check.hs-    (changed, unchanged) = partitionWith (substComplexEq x e) standby-    new_incr_state       = (unchanged, (unhandled, extendNameEnv env x e))---- | When we know that a variable is fresh, we do not actually have to--- check whether anything changes, we know that nothing does. Hence,--- `extendSubst` simply extends the substitution, unlike what--- `extendSubstAndSolve` does.-extendSubst :: Id -> PmExpr -> TmState -> TmState-extendSubst y e (standby, (unhandled, env))-  | isNotPmExprOther simpl_e-  = (standby, (unhandled, extendNameEnv env x simpl_e))-  | otherwise = (standby, (True, env))-  where-    x = idName y-    simpl_e = fst $ simplifyPmExpr $ exprDeepLookup env e---- | Simplify a complex equality.-simplifyComplexEq :: ComplexEq -> ComplexEq-simplifyComplexEq (e1, e2) = (fst $ simplifyPmExpr e1, fst $ simplifyPmExpr e2)---- | Simplify an expression. The boolean indicates if there has been any--- simplification or if the operation was a no-op.-simplifyPmExpr :: PmExpr -> (PmExpr, Bool)--- See Note [Deep equalities]-simplifyPmExpr e = case e of-  PmExprCon c ts -> case mapAndUnzip simplifyPmExpr ts of-                      (ts', bs) -> (PmExprCon c ts', or bs)-  PmExprEq t1 t2 -> simplifyEqExpr t1 t2-  _other_expr    -> (e, False) -- the others are terminals---- | Simplify an equality expression. The equality is given in parts.-simplifyEqExpr :: PmExpr -> PmExpr -> (PmExpr, Bool)--- See Note [Deep equalities]-simplifyEqExpr e1 e2 = case (e1, e2) of-  -- Varables-  (PmExprVar x, PmExprVar y)-    | x == y -> (truePmExpr, True)--  -- Literals-  (PmExprLit l1, PmExprLit l2) -> case eqPmLit l1 l2 of-    -- See Note [Undecidable Equality for Overloaded Literals]-    True  -> (truePmExpr,  True)-    False -> (falsePmExpr, True)--  -- Can potentially be simplified-  (PmExprEq {}, _) -> case (simplifyPmExpr e1, simplifyPmExpr e2) of-    ((e1', True ), (e2', _    )) -> simplifyEqExpr e1' e2'-    ((e1', _    ), (e2', True )) -> simplifyEqExpr e1' e2'-    ((e1', False), (e2', False)) -> (PmExprEq e1' e2', False) -- cannot progress-  (_, PmExprEq {}) -> case (simplifyPmExpr e1, simplifyPmExpr e2) of-    ((e1', True ), (e2', _    )) -> simplifyEqExpr e1' e2'-    ((e1', _    ), (e2', True )) -> simplifyEqExpr e1' e2'-    ((e1', False), (e2', False)) -> (PmExprEq e1' e2', False) -- cannot progress--  -- Constructors-  (PmExprCon c1 ts1, PmExprCon c2 ts2)-    | c1 == c2 ->-        let (ts1', bs1) = mapAndUnzip simplifyPmExpr ts1-            (ts2', bs2) = mapAndUnzip simplifyPmExpr ts2-            (tss, _bss) = zipWithAndUnzip simplifyEqExpr ts1' ts2'-            worst_case  = PmExprEq (PmExprCon c1 ts1') (PmExprCon c2 ts2')-        in  if | not (or bs1 || or bs2) -> (worst_case, False) -- no progress-               | all isTruePmExpr  tss  -> (truePmExpr, True)-               | any isFalsePmExpr tss  -> (falsePmExpr, True)-               | otherwise              -> (worst_case, False)-    | otherwise -> (falsePmExpr, True)--  -- We cannot do anything about the rest..-  _other_equality -> (original, False)--  where-    original = PmExprEq e1 e2 -- reconstruct equality---- | Apply an (un-flattened) substitution to a simple equality.-applySubstComplexEq :: PmVarEnv -> ComplexEq -> ComplexEq-applySubstComplexEq env (e1,e2) = (exprDeepLookup env e1, exprDeepLookup env e2)---- | Apply an (un-flattened) substitution to a variable.-varDeepLookup :: PmVarEnv -> Name -> PmExpr-varDeepLookup env x-  | Just e <- lookupNameEnv env x = exprDeepLookup env e -- go deeper-  | otherwise                  = PmExprVar x          -- terminal-{-# INLINE varDeepLookup #-}---- | Apply an (un-flattened) substitution to an expression.-exprDeepLookup :: PmVarEnv -> PmExpr -> PmExpr-exprDeepLookup env (PmExprVar x)    = varDeepLookup env x-exprDeepLookup env (PmExprCon c es) = PmExprCon c (map (exprDeepLookup env) es)-exprDeepLookup env (PmExprEq e1 e2) = PmExprEq (exprDeepLookup env e1)-                                               (exprDeepLookup env e2)-exprDeepLookup _   other_expr       = other_expr -- PmExprLit, PmExprOther---- | External interface to the term oracle.-tmOracle :: TmState -> [ComplexEq] -> Maybe TmState-tmOracle tm_state eqs = foldlM solveOneEq tm_state eqs---- | Type of a PmLit-pmLitType :: PmLit -> Type -- should be in PmExpr but gives cyclic imports :(-pmLitType (PmSLit   lit) = hsLitType   lit-pmLitType (PmOLit _ lit) = overLitType lit--{- Note [Deep equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~-Solving nested equalities is the most difficult part. The general strategy-is the following:--  * Equalities of the form (True ~ (e1 ~ e2)) are transformed to just-    (e1 ~ e2) and then treated recursively.--  * Equalities of the form (False ~ (e1 ~ e2)) cannot be analyzed unless-    we know more about the inner equality (e1 ~ e2). That's exactly what-    `simplifyEqExpr' tries to do: It takes e1 and e2 and either returns-    truePmExpr, falsePmExpr or (e1' ~ e2') in case it is uncertain. Note-    that it is not e but rather e', since it may perform some-    simplifications deeper.--}
ghc.cabal view
@@ -1,8 +1,8 @@-Cabal-Version: 2.0-Name: ghc-Version: 8.8.3+cabal-version: 3.0+name: ghc+version: 8.10.1 -License: BSD3+License: BSD-3-Clause License-File: LICENSE Author: The GHC Team Maintainer: glasgow-haskell-users@haskell.org@@ -20,13 +20,10 @@ Build-Type: Simple  extra-source-files:-    utils/md5.h     Unique.h     HsVersions.h-    nativeGen/NCG.h     parser/cutils.h -    autogen/ghc_boot_platform.h     autogen/CodeGen.Platform.hs     autogen/Config.hs     autogen/GHCConstantsHaskellExports.hs@@ -52,7 +49,7 @@  Flag buildable     Description: Make this package buildable /(experimental tech preview)/.-                 .+                                    See [reinstallable lib:ghc announcement](https://mail.haskell.org/pipermail/ghc-devs/2017-July/014424.html) for more information.     Default: False     Manual: True@@ -65,7 +62,7 @@ Library     -- The generated code in autogen/ has been generated for a linux/x86_64 target     -- So everything else is definitely not working...-    if !(os(linux) && arch(x86_64) && impl(ghc == 8.8.3))+    if !(os(linux) && arch(x86_64) && impl(ghc == 8.10.1))       build-depends: base<0      -- ...while this package may in theory allow to reinstall lib:ghc@@ -80,7 +77,7 @@     Default-Language: Haskell2010     Exposed: False -    Build-Depends: base       == 4.13.*,+    Build-Depends: base       == 4.14.*,                    deepseq    >= 1.4 && < 1.5,                    directory  >= 1   && < 1.4,                    process    >= 1   && < 1.7,@@ -90,13 +87,13 @@                    containers >= 0.5 && < 0.7,                    array      >= 0.1 && < 0.6,                    filepath   >= 1   && < 1.5,-                   template-haskell == 2.15.*,+                   template-haskell == 2.16.*,                    hpc        == 0.6.*,                    transformers == 0.5.*,-                   ghc-boot   == 8.8.3,-                   ghc-boot-th == 8.8.3,-                   ghc-heap   == 8.8.3,-                   ghci == 8.8.3+                   ghc-boot   == 8.10.1,+                   ghc-boot-th == 8.10.1,+                   ghc-heap   == 8.10.1,+                   ghci == 8.10.1      if os(windows)         Build-Depends: Win32  >= 2.3 && < 2.7@@ -113,7 +110,7 @@                  -Wnoncanonical-monoid-instances      -- if flag(ghci)-    --    CPP-Options: -DGHCI+    --    CPP-Options: -DHAVE_INTERNAL_INTERPRETER     --    Include-Dirs: ../rts/dist/build       -- sanity-check to ensure not more than one integer flag is set@@ -167,7 +164,7 @@      cpp-options: -DSTAGE=2 -    Install-Includes: HsVersions.h, ghc_boot_platform.h+    Install-Includes: HsVersions.h      c-sources:         parser/cutils.c@@ -181,14 +178,13 @@         autogen      hs-source-dirs:+        .         backpack         basicTypes         cmm-        codeGen         coreSyn         deSugar         ghci-        hsSyn         iface         llvmGen         main@@ -211,9 +207,6 @@     Default-Extensions:         NoImplicitPrelude -    Other-Modules:-        GhcPrelude-     Exposed-Modules:         HieTypes         HieDebug@@ -240,6 +233,7 @@         Hooks         Id         IdInfo+        Predicate         Lexeme         Literal         Llvm@@ -294,7 +288,10 @@         CmmType         CmmUtils         CmmLayoutStack+        CliOption         EnumSet+        GhcNameVersion+        FileSettings         MkGraph         PprBase         PprC@@ -302,32 +299,33 @@         PprCmmDecl         PprCmmExpr         Bitmap-        CodeGen.Platform-        CodeGen.Platform.ARM-        CodeGen.Platform.ARM64-        CodeGen.Platform.NoRegs-        CodeGen.Platform.PPC-        CodeGen.Platform.SPARC-        CodeGen.Platform.X86-        CodeGen.Platform.X86_64-        CgUtils-        StgCmm-        StgCmmBind-        StgCmmClosure-        StgCmmCon-        StgCmmEnv-        StgCmmExpr-        StgCmmForeign-        StgCmmHeap-        StgCmmHpc-        StgCmmArgRep-        StgCmmLayout-        StgCmmMonad-        StgCmmPrim-        StgCmmProf-        StgCmmTicky-        StgCmmUtils-        StgCmmExtCode+        GHC.Platform.Regs+        GHC.Platform.ARM+        GHC.Platform.ARM64+        GHC.Platform.NoRegs+        GHC.Platform.PPC+        GHC.Platform.S390X+        GHC.Platform.SPARC+        GHC.Platform.X86+        GHC.Platform.X86_64+        GHC.StgToCmm.CgUtils+        GHC.StgToCmm+        GHC.StgToCmm.Bind+        GHC.StgToCmm.Closure+        GHC.StgToCmm.DataCon+        GHC.StgToCmm.Env+        GHC.StgToCmm.Expr+        GHC.StgToCmm.Foreign+        GHC.StgToCmm.Heap+        GHC.StgToCmm.Hpc+        GHC.StgToCmm.ArgRep+        GHC.StgToCmm.Layout+        GHC.StgToCmm.Monad+        GHC.StgToCmm.Prim+        GHC.StgToCmm.Prof+        GHC.StgToCmm.Ticky+        GHC.StgToCmm.Utils+        GHC.StgToCmm.ExtCode         SMRep         CoreArity         CoreFVs@@ -345,9 +343,10 @@         CoreStats         MkCore         PprCore-        PmExpr-        TmOracle-        Check+        GHC.HsToCore.PmCheck.Oracle+        GHC.HsToCore.PmCheck.Ppr+        GHC.HsToCore.PmCheck.Types+        GHC.HsToCore.PmCheck         Coverage         Desugar         DsArrows@@ -364,20 +363,20 @@         Match         MatchCon         MatchLit-        HsBinds-        HsDecls-        HsDoc-        HsExpr-        HsImpExp-        HsLit-        PlaceHolder-        HsExtension-        HsInstances-        HsPat-        HsSyn-        HsTypes-        HsUtils-        HsDumpAst+        GHC.Hs+        GHC.Hs.Binds+        GHC.Hs.Decls+        GHC.Hs.Doc+        GHC.Hs.Expr+        GHC.Hs.ImpExp+        GHC.Hs.Lit+        GHC.Hs.PlaceHolder+        GHC.Hs.Extension+        GHC.Hs.Instances+        GHC.Hs.Pat+        GHC.Hs.Types+        GHC.Hs.Utils+        GHC.Hs.Dump         BinIface         BinFingerprint         BuildTyCl@@ -404,6 +403,7 @@         GHC         GhcMake         GhcPlugins+        GhcPrelude         DynamicLoading         HeaderInfo         HscMain@@ -417,6 +417,7 @@         Plugins         TcPluginM         PprTyThing+        Settings         StaticPtrTable         SysTools         SysTools.BaseDir@@ -425,6 +426,7 @@         SysTools.Info         SysTools.Process         SysTools.Tasks+        SysTools.Settings         Elf         TidyPgm         Ctype@@ -440,6 +442,7 @@         PrelNames         PrelRules         PrimOp+        ToolSettings         TysPrim         TysWiredIn         CostCentre@@ -523,14 +526,16 @@         TcRnExports         TcRnMonad         TcRnTypes+        Constraint+        TcOrigin         TcRules         TcSimplify         TcHoleErrors+        TcHoleFitTypes         TcErrors         TcTyClsDecls         TcTyDecls         TcTypeable-        TcTypeableValidity         TcType         TcEvidence         TcEvTerm@@ -550,9 +555,12 @@         InstEnv         TyCon         CoAxiom-        Kind         Type         TyCoRep+        TyCoFVs+        TyCoSubst+        TyCoPpr+        TyCoTidy         Unify         Bag         Binary@@ -574,7 +582,6 @@         IOEnv         Json         ListSetOps-        ListT         Maybes         MonadUtils         OrdList@@ -608,11 +615,11 @@             Instruction             BlockLayout             CFG+            Dominators             Format             Reg             RegClass             PIC-            Platform             CPrim             X86.Regs             X86.RegInfo@@ -667,7 +674,7 @@             Dwarf             Dwarf.Types             Dwarf.Constants-            Convert+            GHC.ThToHs             ByteCodeTypes             ByteCodeAsm             ByteCodeGen@@ -675,6 +682,7 @@             ByteCodeItbls             ByteCodeLink             Debugger+            LinkerTypes             Linker             RtClosureInspect             GHCi
ghci/ByteCodeAsm.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE BangPatterns, CPP, MagicHash, RecordWildCards #-}+{-# LANGUAGE BangPatterns, CPP, DeriveFunctor, MagicHash, RecordWildCards #-} {-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-} -- --  (c) The University of Glasgow 2002-2006@@ -29,11 +29,11 @@ import Literal import TyCon import FastString-import StgCmmLayout     ( ArgRep(..) )+import GHC.StgToCmm.Layout     ( ArgRep(..) ) import SMRep import DynFlags import Outputable-import Platform+import GHC.Platform import Util import Unique import UniqDSet@@ -55,7 +55,7 @@  import Foreign import Data.Char        ( ord )-import Data.List+import Data.List        ( genericLength ) import Data.Map (Map) import Data.Maybe (fromMaybe) import qualified Data.Map as Map@@ -228,9 +228,7 @@   | AllocLabel Word16 (Assembler a)   | Emit Word16 [Operand] (Assembler a)   | NullAsm a--instance Functor Assembler where-    fmap = liftM+  deriving (Functor)  instance Applicative Assembler where     pure = NullAsm
ghci/ByteCodeGen.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP, MagicHash, RecordWildCards, BangPatterns #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -fprof-auto-top #-} --@@ -22,7 +23,7 @@ import BasicTypes import DynFlags import Outputable-import Platform+import GHC.Platform import Name import MkId import Id@@ -37,18 +38,18 @@ import CoreFVs import Type import RepType-import Kind            ( isLiftedTypeKind ) import DataCon import TyCon import Util import VarSet import TysPrim+import TyCoPpr         ( pprType ) import ErrUtils import Unique import FastString import Panic-import StgCmmClosure    ( NonVoid(..), fromNonVoid, nonVoidIds )-import StgCmmLayout+import GHC.StgToCmm.Closure    ( NonVoid(..), fromNonVoid, nonVoidIds )+import GHC.StgToCmm.Layout import SMRep hiding (WordOff, ByteOff, wordsToBytes) import Bitmap import OrdList@@ -85,7 +86,7 @@             -> Maybe ModBreaks             -> IO CompiledByteCode byteCodeGen hsc_env this_mod binds tycs mb_modBreaks-   = withTiming (pure dflags)+   = withTiming dflags                 (text "ByteCodeGen"<+>brackets (ppr this_mod))                 (const ()) $ do         -- Split top-level binds into strings and others.@@ -157,7 +158,7 @@                -> CoreExpr                -> IO UnlinkedBCO coreExprToBCOs hsc_env this_mod expr- = withTiming (pure dflags)+ = withTiming dflags               (text "ByteCodeGen"<+>brackets (ppr this_mod))               (const ()) $ do       -- create a totally bogus name for the top-level BCO; this@@ -496,16 +497,10 @@ schemeE d s p e@(AnnCoercion {}) = returnUnboxedAtom d s p e V  schemeE d s p e@(AnnVar v)-      -- See Note [Levity-polymorphic join points], step 3.-    | isLPJoinPoint v           = schemeT d s p $-                                  AnnApp (bogus_fvs, AnnVar (protectLPJoinPointId v))-                                         (bogus_fvs, AnnVar voidPrimId)-                         -- schemeT will call splitApp, dropping the fvs.-+      -- See Note [Not-necessarily-lifted join points], step 3.+    | isNNLJoinPoint v          = doTailCall d s p (protectNNLJoinPointId v) [AnnVar voidPrimId]     | isUnliftedType (idType v) = returnUnboxedAtom d s p e (bcIdArgRep v)     | otherwise                 = schemeT d s p e-    where-      bogus_fvs = pprPanic "schemeE bogus_fvs" (ppr v)  schemeE d s p (AnnLet (AnnNonRec x (_,rhs)) (_,body))    | (AnnVar v, args_r_to_l) <- splitApp rhs,@@ -530,8 +525,8 @@           fvss  = map (fvsToEnv p' . fst) rhss -           -- See Note [Levity-polymorphic join points], step 2.-         (xs',rhss') = zipWithAndUnzip protectLPJoinPointBind xs rhss+           -- See Note [Not-necessarily-lifted join points], step 2.+         (xs',rhss') = zipWithAndUnzip protectNNLJoinPointBind xs rhss           -- Sizes of free vars          size_w = trunc16W . idSizeW dflags@@ -613,7 +608,7 @@           -- type and hence won't be bound in the environment, but the           -- breakpoint will otherwise work fine.           ---          -- NB (Trac #12007) this /also/ applies for if (ty :: TYPE r), where+          -- NB (#12007) this /also/ applies for if (ty :: TYPE r), where           --    r :: RuntimeRep is a variable. This can happen in the           --    continuations for a pattern-synonym matcher           --    match = /\(r::RuntimeRep) /\(a::TYPE r).@@ -622,7 +617,7 @@           -- Here (k n) :: a :: Type r, so we don't know if it's lifted           -- or not; but that should be fine provided we add that void arg. -          id <- newId (mkFunTy realWorldStatePrimTy ty)+          id <- newId (mkVisFunTy realWorldStatePrimTy ty)           st <- newId realWorldStatePrimTy           let letExp = AnnLet (AnnNonRec id (fvs, AnnLam st (emptyDVarSet, exp)))                               (emptyDVarSet, (AnnApp (emptyDVarSet, AnnVar id)@@ -680,29 +675,29 @@    = pprPanic "ByteCodeGen.schemeE: unhandled case"                (pprCoreExpr (deAnnotate' expr)) --- Is this Id a levity-polymorphic join point?--- See Note [Levity-polymorphic join points], step 1-isLPJoinPoint :: Id -> Bool-isLPJoinPoint x = isJoinId x &&-                  isNothing (isLiftedType_maybe (idType x))+-- Is this Id a not-necessarily-lifted join point?+-- See Note [Not-necessarily-lifted join points], step 1+isNNLJoinPoint :: Id -> Bool+isNNLJoinPoint x = isJoinId x &&+                   Just True /= isLiftedType_maybe (idType x) --- If necessary, modify this Id and body to protect levity-polymorphic join points.--- See Note [Levity-polymorphic join points], step 2.-protectLPJoinPointBind :: Id -> AnnExpr Id DVarSet -> (Id, AnnExpr Id DVarSet)-protectLPJoinPointBind x rhs@(fvs, _)-  | isLPJoinPoint x-  = (protectLPJoinPointId x, (fvs, AnnLam voidArgId rhs))+-- If necessary, modify this Id and body to protect not-necessarily-lifted join points.+-- See Note [Not-necessarily-lifted join points], step 2.+protectNNLJoinPointBind :: Id -> AnnExpr Id DVarSet -> (Id, AnnExpr Id DVarSet)+protectNNLJoinPointBind x rhs@(fvs, _)+  | isNNLJoinPoint x+  = (protectNNLJoinPointId x, (fvs, AnnLam voidArgId rhs))    | otherwise   = (x, rhs)  -- Update an Id's type to take a Void# argument.--- Precondition: the Id is a levity-polymorphic join point.--- See Note [Levity-polymorphic join points]-protectLPJoinPointId :: Id -> Id-protectLPJoinPointId x-  = ASSERT( isLPJoinPoint x )-    updateVarType (voidPrimTy `mkFunTy`) x+-- Precondition: the Id is a not-necessarily-lifted join point.+-- See Note [Not-necessarily-lifted join points]+protectNNLJoinPointId :: Id -> Id+protectNNLJoinPointId x+  = ASSERT( isNNLJoinPoint x )+    updateVarType (voidPrimTy `mkVisFunTy`) x  {-    Ticked Expressions@@ -712,8 +707,8 @@   the code. When we find such a thing, we pull out the useful information,   and then compile the code as if it was just the expression E. -Note [Levity-polymorphic join points]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note [Not-necessarily-lifted join points]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A join point variable is essentially a goto-label: it is, for example, never used as an argument to another function, and it is called only in tail position. See Note [Join points] and Note [Invariants on join points],@@ -727,23 +722,46 @@ or not; they are all treated uniformly. (Perhaps there is a missed optimization opportunity here, but that is beyond the scope of my (Richard E's) Thursday.) -We thus must have *some* strategy for dealing with levity-polymorphic join-points (LPJPs), because we cannot have a levity-polymorphic variable.-(Not having such a strategy led to #16509, which panicked in the isUnliftedType-check in the AnnVar case of schemeE.) Here is the strategy:+We thus must have *some* strategy for dealing with levity-polymorphic and+unlifted join points. Levity-polymorphic variables are generally not allowed+(though levity-polymorphic join points *are*; see Note [Invariants on join points]+in CoreSyn, point 6), and we don't wish to evaluate unlifted join points eagerly.+The questionable join points are *not-necessarily-lifted join points*+(NNLJPs). (Not having such a strategy led to #16509, which panicked in the+isUnliftedType check in the AnnVar case of schemeE.) Here is the strategy: -1. Detect LPJPs. This is done in isLPJoinPoint.+1. Detect NNLJPs. This is done in isNNLJoinPoint. -2. When binding an LPJP, add a `\ (_ :: Void#) ->` to its RHS, and modify the+2. When binding an NNLJP, add a `\ (_ :: Void#) ->` to its RHS, and modify the    type to tack on a `Void# ->`. (Void# is written voidPrimTy within GHC.)    Note that functions are never levity-polymorphic, so this transformation-   changes an LPJP to a non-levity-polymorphic join point. This is done-   in protectLPJoinPointBind, called from the AnnLet case of schemeE.+   changes an NNLJP to a non-levity-polymorphic join point. This is done+   in protectNNLJoinPointBind, called from the AnnLet case of schemeE. -3. At an occurrence of an LPJP, add an application to void# (called voidPrimId),-   being careful to note the new type of the LPJP. This is done in the AnnVar-   case of schemeE, with help from protectLPJoinPointId.+3. At an occurrence of an NNLJP, add an application to void# (called voidPrimId),+   being careful to note the new type of the NNLJP. This is done in the AnnVar+   case of schemeE, with help from protectNNLJoinPointId. +Here is an example. Suppose we have++  f = \(r :: RuntimeRep) (a :: TYPE r) (x :: T).+      join j :: a+           j = error @r @a "bloop"+      in case x of+           A -> j+           B -> j+           C -> error @r @a "blurp"++Our plan is to behave is if the code was++  f = \(r :: RuntimeRep) (a :: TYPE r) (x :: T).+      let j :: (Void# -> a)+          j = \ _ -> error @r @a "bloop"+      in case x of+           A -> j void#+           B -> j void#+           C -> error @r @a "blurp"+ It's a bit hacky, but it works well in practice and is local. I suspect the Right Fix is to take advantage of join points as goto-labels. @@ -1020,7 +1038,7 @@                 return (my_discr alt, rhs_code)            -- If an alt attempts to match on an unboxed tuple or sum, we must            -- bail out, as the bytecode compiler can't handle them.-           -- (See Trac #14608.)+           -- (See #14608.)            | any (\bndr -> typePrimRep (idType bndr) `lengthExceeds` 1) bndrs            = multiValException            -- algebraic alt with some binders@@ -1201,7 +1219,7 @@          push_args    = concatOL pushs_arg          !d_after_args = d0 + wordsToBytes dflags a_reps_sizeW          a_reps_pushed_RAW-            | null a_reps_pushed_r_to_l || head a_reps_pushed_r_to_l /= VoidRep+            | null a_reps_pushed_r_to_l || not (isVoidRep (head a_reps_pushed_r_to_l))             = panic "ByteCodeGen.generateCCall: missing or invalid World token?"             | otherwise             = reverse (tail a_reps_pushed_r_to_l)@@ -1456,7 +1474,7 @@ tested.  This is very weird, but it's the way it is right now.  See Interpreter.c.  We don't acutally need an info-table here; we just need to have the argument to be one-from-top on the stack, hence pushing-a 1-word null. See Trac #8383.+a 1-word null. See #8383. -}  @@ -1883,10 +1901,11 @@ atomPrimRep (AnnVar v)              = bcIdPrimRep v atomPrimRep (AnnLit l)              = typePrimRep1 (literalType l) --- Trac #12128:+-- #12128: -- A case expression can be an atom because empty cases evaluate to bottom. -- See Note [Empty case alternatives] in coreSyn/CoreSyn.hs-atomPrimRep (AnnCase _ _ ty _)      = ASSERT(typePrimRep ty == [LiftedRep]) LiftedRep+atomPrimRep (AnnCase _ _ ty _)      =+  ASSERT(case typePrimRep ty of [LiftedRep] -> True; _ -> False) LiftedRep atomPrimRep (AnnCoercion {})        = VoidRep atomPrimRep other = pprPanic "atomPrimRep" (ppr (deAnnotate' other)) @@ -1919,7 +1938,7 @@           -- See Note [generating code for top-level string literal bindings].         } -newtype BcM r = BcM (BcM_State -> IO (BcM_State, r))+newtype BcM r = BcM (BcM_State -> IO (BcM_State, r)) deriving (Functor)  ioToBc :: IO a -> BcM a ioToBc io = BcM $ \st -> do@@ -1948,9 +1967,6 @@  returnBc :: a -> BcM a returnBc result = BcM $ \st -> (return (st, result))--instance Functor BcM where-    fmap = liftM  instance Applicative BcM where     pure = returnBc
ghci/ByteCodeInstr.hs view
@@ -10,14 +10,13 @@   ) where  #include "HsVersions.h"-#include "MachDeps.h"  import GhcPrelude  import ByteCodeTypes import GHCi.RemoteTypes import GHCi.FFI (C_ffi_cif)-import StgCmmLayout     ( ArgRep(..) )+import GHC.StgToCmm.Layout     ( ArgRep(..) ) import PprCore import Outputable import FastString
ghci/ByteCodeItbls.hs view
@@ -20,8 +20,8 @@ import DataCon          ( DataCon, dataConRepArgTys, dataConIdentity ) import TyCon            ( TyCon, tyConFamilySize, isDataTyCon, tyConDataCons ) import RepType-import StgCmmLayout     ( mkVirtConstrSizes )-import StgCmmClosure    ( tagForCon, NonVoid (..) )+import GHC.StgToCmm.Layout  ( mkVirtConstrSizes )+import GHC.StgToCmm.Closure ( tagForCon, NonVoid (..) ) import Util import Panic 
ghci/ByteCodeLink.hs view
@@ -154,8 +154,8 @@                 , "the missing library using the -L/path/to/object/dir and -lmissinglibname"                 , "flags, or simply by naming the relevant files on the GHCi command line."                 , "Alternatively, this link failure might indicate a bug in GHCi."-                , "If you suspect the latter, please send a bug report to:"-                , "  glasgow-haskell-bugs@haskell.org"+                , "If you suspect the latter, please report this as a GHC bug:"+                , "  https://www.haskell.org/ghc/reportabug"                 ])  
ghci/Debugger.hs view
@@ -40,7 +40,7 @@ import Exception  import Control.Monad-import Data.List+import Data.List ( (\\) ) import Data.Maybe import Data.IORef @@ -74,11 +74,11 @@    -- Do the obtainTerm--bindSuspensions-computeSubstitution dance    go :: GhcMonad m => TCvSubst -> Id -> m (TCvSubst, Term)    go subst id = do-       let id' = id `setIdType` substTy subst (idType id)+       let id_ty' = substTy subst (idType id)+           id'    = id `setIdType` id_ty'        term_    <- GHC.obtainTermFromId maxBound force id'        term     <- tidyTermTyVars term_-       term'    <- if bindThings &&-                      (not (isUnliftedType (termType term)))+       term'    <- if bindThings                      then bindSuspensions term                      else return term      -- Before leaving, we compare the type obtained to see if it's more specific@@ -86,13 +86,14 @@      --  mapping the old tyvars to the reconstructed types.        let reconstructed_type = termType term        hsc_env <- getSession-       case (improveRTTIType hsc_env (idType id) (reconstructed_type)) of+       case (improveRTTIType hsc_env id_ty' reconstructed_type) of          Nothing     -> return (subst, term')          Just subst' -> do { dflags <- GHC.getSessionDynFlags                            ; liftIO $                                dumpIfSet_dyn dflags Opt_D_dump_rtti "RTTI"                                  (fsep $ [text "RTTI Improvement for", ppr id,-                                  text "is the substitution:" , ppr subst'])+                                  text "old substitution:" , ppr subst,+                                  text "new substitution:" , ppr subst'])                            ; return (subst `unionTCvSubst` subst', term')}     tidyTermTyVars :: GhcMonad m => Term -> m Term@@ -124,7 +125,8 @@       let ids = [ mkVanillaGlobal name ty                 | (name,ty) <- zip names tys]           new_ic = extendInteractiveContextWithIds ictxt ids-      liftIO $ extendLinkEnv (zip names fhvs)+          dl = hsc_dynLinker hsc_env+      liftIO $ extendLinkEnv dl (zip names fhvs)       setSession hsc_env {hsc_IC = new_ic }       return t'      where@@ -178,8 +180,10 @@                expr = "Prelude.return (Prelude.show " ++                          showPpr dflags bname ++                       ") :: Prelude.IO Prelude.String"+               dl   = hsc_dynLinker hsc_env            _ <- GHC.setSessionDynFlags dflags{log_action=noop_log}-           txt_ <- withExtendedLinkEnv [(bname, fhv)]+           txt_ <- withExtendedLinkEnv dl+                                       [(bname, fhv)]                                        (GHC.compileExprRemote expr)            let myprec = 10 -- application precedence. TODO Infix constructors            txt <- liftIO $ evalString hsc_env txt_
ghci/GHCi.hs view
@@ -51,7 +51,7 @@ import GhcPrelude  import GHCi.Message-#if defined(GHCI)+#if defined(HAVE_INTERNAL_INTERPRETER) import GHCi.Run #endif import GHCi.RemoteTypes@@ -117,7 +117,7 @@   taking the performance hit on the compiler that profiling would   entail. -For other reasons see RemoteGHCi on the wiki.+For other reasons see remote-GHCi on the wiki.  Implementation Overview ~~~~~~~~~~~~~~~~~~~~~~~@@ -152,12 +152,12 @@ Other Notes on Remote GHCi ~~~~~~~~~~~~~~~~~~~~~~~~~~   * This wiki page has an implementation overview:-    https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/ExternalInterpreter+    https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/external-interpreter   * Note [External GHCi pointers] in compiler/ghci/GHCi.hs   * Note [Remote Template Haskell] in libraries/ghci/GHCi/TH.hs -} -#if !defined(GHCI)+#if !defined(HAVE_INTERNAL_INTERPRETER) needExtInt :: IO a needExtInt = throwIO   (InstallationError "this operation requires -fexternal-interpreter")@@ -175,7 +175,7 @@        uninterruptibleMask_ $ do -- Note [uninterruptibleMask_]          iservCall iserv msg  | otherwise = -- Just run it directly-#if defined(GHCI)+#if defined(HAVE_INTERNAL_INTERPRETER)    run msg #else    needExtInt@@ -391,7 +391,7 @@                writeIORef iservLookupSymbolCache $! addToUFM cache str p                return (Just p)  | otherwise =-#if defined(GHCI)+#if defined(HAVE_INTERNAL_INTERPRETER)    fmap fromRemotePtr <$> run (LookupSymbol (unpackFS str)) #else    needExtInt@@ -642,7 +642,7 @@   | gopt Opt_ExternalInterpreter dflags   = throwIO (InstallationError       "this operation requires -fno-external-interpreter")-#if defined(GHCI)+#if defined(HAVE_INTERNAL_INTERPRETER)   | otherwise   = localRef _r #else
ghci/Linker.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE CPP, NondecreasingIndentation, TupleSections, RecordWildCards #-} {-# LANGUAGE BangPatterns #-}-{-# OPTIONS_GHC -fno-cse #-}--- -fno-cse is needed for GLOBAL_VAR's to behave properly  -- --  (c) The University of Glasgow 2002-2006@@ -15,8 +13,9 @@                 linkExpr, linkDecls, unload, withExtendedLinkEnv,                 extendLinkEnv, deleteFromLinkEnv,                 extendLoadedPkgs,-                linkPackages,initDynLinker,linkModule,-                linkCmdLineLibs+                linkPackages, initDynLinker, linkModule,+                linkCmdLineLibs,+                uninitializedLinker         ) where  #include "HsVersions.h"@@ -38,6 +37,7 @@ import NameEnv import Module import ListSetOps+import LinkerTypes (DynLinker(..), LinkerUnitId, PersistentLinkerState(..)) import DynFlags import BasicTypes import Outputable@@ -48,7 +48,7 @@ import qualified Maybes import UniqDSet import FastString-import Platform+import GHC.Platform import SysTools import FileCleanup @@ -57,7 +57,7 @@  import Data.Char (isSpace) import Data.IORef-import Data.List+import Data.List (intercalate, isPrefixOf, isSuffixOf, nub, partition) import Data.Maybe import Control.Concurrent.MVar @@ -72,11 +72,6 @@  import Exception --- needed for 2nd stage-#if STAGE >= 2-import Foreign (Ptr)-#endif- {- **********************************************************************                          The Linker's state@@ -85,76 +80,40 @@  {- The persistent linker state *must* match the actual state of the-C dynamic linker at all times, so we keep it in a private global variable.+C dynamic linker at all times. -The global IORef used for PersistentLinkerState actually contains another MVar,-which in turn contains a Maybe PersistentLinkerState. The MVar serves to ensure-mutual exclusion between multiple loaded copies of the GHC library. The Maybe-may be Nothing to indicate that the linker has not yet been initialised.+The MVar used to hold the PersistentLinkerState contains a Maybe+PersistentLinkerState. The MVar serves to ensure mutual exclusion between+multiple loaded copies of the GHC library. The Maybe may be Nothing to+indicate that the linker has not yet been initialised.  The PersistentLinkerState maps Names to actual closures (for interpreted code only), for use during linking. -}-#if STAGE < 2-GLOBAL_VAR_M( v_PersistentLinkerState-            , newMVar Nothing-            , MVar (Maybe PersistentLinkerState))-#else-SHARED_GLOBAL_VAR_M( v_PersistentLinkerState-                   , getOrSetLibHSghcPersistentLinkerState-                   , "getOrSetLibHSghcPersistentLinkerState"-                   , newMVar Nothing-                   , MVar (Maybe PersistentLinkerState))-#endif +uninitializedLinker :: IO DynLinker+uninitializedLinker =+  newMVar Nothing >>= (pure . DynLinker)+ uninitialised :: a uninitialised = panic "Dynamic linker not initialised" -modifyPLS_ :: (PersistentLinkerState -> IO PersistentLinkerState) -> IO ()-modifyPLS_ f = readIORef v_PersistentLinkerState-  >>= flip modifyMVar_ (fmap pure . f . fromMaybe uninitialised)+modifyPLS_ :: DynLinker -> (PersistentLinkerState -> IO PersistentLinkerState) -> IO ()+modifyPLS_ dl f =+  modifyMVar_ (dl_mpls dl) (fmap pure . f . fromMaybe uninitialised) -modifyPLS :: (PersistentLinkerState -> IO (PersistentLinkerState, a)) -> IO a-modifyPLS f = readIORef v_PersistentLinkerState-  >>= flip modifyMVar (fmapFst pure . f . fromMaybe uninitialised)+modifyPLS :: DynLinker -> (PersistentLinkerState -> IO (PersistentLinkerState, a)) -> IO a+modifyPLS dl f =+  modifyMVar (dl_mpls dl) (fmapFst pure . f . fromMaybe uninitialised)   where fmapFst f = fmap (\(x, y) -> (f x, y)) -readPLS :: IO PersistentLinkerState-readPLS = readIORef v_PersistentLinkerState-  >>= fmap (fromMaybe uninitialised) . readMVar+readPLS :: DynLinker -> IO PersistentLinkerState+readPLS dl =+  (fmap (fromMaybe uninitialised) . readMVar) (dl_mpls dl)  modifyMbPLS_-  :: (Maybe PersistentLinkerState -> IO (Maybe PersistentLinkerState)) -> IO ()-modifyMbPLS_ f = readIORef v_PersistentLinkerState >>= flip modifyMVar_ f--data PersistentLinkerState-   = PersistentLinkerState {--        -- Current global mapping from Names to their true values-        closure_env :: ClosureEnv,--        -- The current global mapping from RdrNames of DataCons to-        -- info table addresses.-        -- When a new Unlinked is linked into the running image, or an existing-        -- module in the image is replaced, the itbl_env must be updated-        -- appropriately.-        itbl_env    :: !ItblEnv,--        -- The currently loaded interpreted modules (home package)-        bcos_loaded :: ![Linkable],--        -- And the currently-loaded compiled modules (home package)-        objs_loaded :: ![Linkable],--        -- The currently-loaded packages; always object code-        -- Held, as usual, in dependency order; though I am not sure if-        -- that is really important-        pkgs_loaded :: ![LinkerUnitId],--        -- we need to remember the name of previous temporary DLL/.so-        -- libraries so we can link them (see #10322)-        temp_sos :: ![(FilePath, String)] }-+  :: DynLinker -> (Maybe PersistentLinkerState -> IO (Maybe PersistentLinkerState)) -> IO ()+modifyMbPLS_ dl f = modifyMVar_ (dl_mpls dl) f  emptyPLS :: DynFlags -> PersistentLinkerState emptyPLS _ = PersistentLinkerState {@@ -172,22 +131,21 @@   -- explicit list.  See rts/Linker.c for details.   where init_pkgs = map toInstalledUnitId [rtsUnitId] --extendLoadedPkgs :: [InstalledUnitId] -> IO ()-extendLoadedPkgs pkgs =-  modifyPLS_ $ \s ->+extendLoadedPkgs :: DynLinker -> [InstalledUnitId] -> IO ()+extendLoadedPkgs dl pkgs =+  modifyPLS_ dl $ \s ->       return s{ pkgs_loaded = pkgs ++ pkgs_loaded s } -extendLinkEnv :: [(Name,ForeignHValue)] -> IO ()-extendLinkEnv new_bindings =-  modifyPLS_ $ \pls@PersistentLinkerState{..} -> do+extendLinkEnv :: DynLinker -> [(Name,ForeignHValue)] -> IO ()+extendLinkEnv dl new_bindings =+  modifyPLS_ dl $ \pls@PersistentLinkerState{..} -> do     let new_ce = extendClosureEnv closure_env new_bindings     return $! pls{ closure_env = new_ce }     -- strictness is important for not retaining old copies of the pls -deleteFromLinkEnv :: [Name] -> IO ()-deleteFromLinkEnv to_remove =-  modifyPLS_ $ \pls -> do+deleteFromLinkEnv :: DynLinker -> [Name] -> IO ()+deleteFromLinkEnv dl to_remove =+  modifyPLS_ dl $ \pls -> do     let ce = closure_env pls     let new_ce = delListFromNameEnv ce to_remove     return pls{ closure_env = new_ce }@@ -199,8 +157,9 @@ -- Throws a 'ProgramError' if loading fails or the name cannot be found. getHValue :: HscEnv -> Name -> IO ForeignHValue getHValue hsc_env name = do+  let dl = hsc_dynLinker hsc_env   initDynLinker hsc_env-  pls <- modifyPLS $ \pls -> do+  pls <- modifyPLS dl $ \pls -> do            if (isExternalName name) then do              (pls', ok) <- linkDependencies hsc_env pls noSrcSpan                               [nameModule name]@@ -223,7 +182,7 @@                  -> SrcSpan -> [Module]                  -> IO (PersistentLinkerState, SuccessFlag) linkDependencies hsc_env pls span needed_mods = do---   initDynLinker (hsc_dflags hsc_env)+--   initDynLinker (hsc_dflags hsc_env) dl    let hpt = hsc_HPT hsc_env        dflags = hsc_dflags hsc_env    -- The interpreter and dynamic linker can only handle object code built@@ -244,9 +203,9 @@ -- | Temporarily extend the linker state.  withExtendedLinkEnv :: (ExceptionMonad m) =>-                       [(Name,ForeignHValue)] -> m a -> m a-withExtendedLinkEnv new_env action-    = gbracket (liftIO $ extendLinkEnv new_env)+                       DynLinker -> [(Name,ForeignHValue)] -> m a -> m a+withExtendedLinkEnv dl new_env action+    = gbracket (liftIO $ extendLinkEnv dl new_env)                (\_ -> reset_old_env)                (\_ -> action)     where@@ -256,16 +215,16 @@         -- package), so the reset action only removes the names we         -- added earlier.           reset_old_env = liftIO $ do-            modifyPLS_ $ \pls ->+            modifyPLS_ dl $ \pls ->                 let cur = closure_env pls                     new = delListFromNameEnv cur (map fst new_env)                 in return pls{ closure_env = new }   -- | Display the persistent linker state.-showLinkerState :: DynFlags -> IO ()-showLinkerState dflags-  = do pls <- readPLS+showLinkerState :: DynLinker -> DynFlags -> IO ()+showLinkerState dl dflags+  = do pls <- readPLS dl        putLogMsg dflags NoReason SevDump noSrcSpan           (defaultDumpStyle dflags)                  (vcat [text "----- Linker state -----",@@ -299,8 +258,9 @@ -- trying to link. -- initDynLinker :: HscEnv -> IO ()-initDynLinker hsc_env =-  modifyMbPLS_ $ \pls -> do+initDynLinker hsc_env = do+  let dl = hsc_dynLinker hsc_env+  modifyMbPLS_ dl $ \pls -> do     case pls of       Just  _ -> return pls       Nothing -> Just <$> reallyInitDynLinker hsc_env@@ -323,8 +283,9 @@  linkCmdLineLibs :: HscEnv -> IO () linkCmdLineLibs hsc_env = do+  let dl = hsc_dynLinker hsc_env   initDynLinker hsc_env-  modifyPLS_ $ \pls -> do+  modifyPLS_ dl $ \pls -> do     linkCmdLineLibs' hsc_env pls  linkCmdLineLibs' :: HscEnv -> PersistentLinkerState -> IO PersistentLinkerState@@ -341,7 +302,7 @@       -- However because we don't know the actual name of pthread's dll we       -- need to defer this to the locateLib call so we can't initialize it       -- inside of the rts. Instead we do it here to be able to find the-      -- import library for pthreads. See Trac #13210.+      -- import library for pthreads. See #13210.       let platform = targetPlatform dflags           os       = platformOS platform           minus_ls = case os of@@ -380,7 +341,7 @@        -- Add directories to library search paths, this only has an effect       -- on Windows. On Unix OSes this function is a NOP.-      let all_paths = let paths = takeDirectory (fst $ sPgm_c $ settings dflags)+      let all_paths = let paths = takeDirectory (pgm_c dflags)                                 : framework_paths                                ++ lib_paths_base                                ++ [ takeDirectory dll | DLLPath dll <- libspecs ]@@ -563,8 +524,11 @@      -- Initialise the linker (if it's not been done already)    ; initDynLinker hsc_env +     -- Extract the DynLinker value for passing into required places+   ; let dl = hsc_dynLinker hsc_env+      -- Take lock for the actual work.-   ; modifyPLS $ \pls0 -> do {+   ; modifyPLS dl $ \pls0 -> do {       -- Link the packages and modules required    ; (pls, ok) <- linkDependencies hsc_env pls0 span needed_mods@@ -793,8 +757,11 @@     -- Initialise the linker (if it's not been done already)     initDynLinker hsc_env +    -- Extract the DynLinker for passing into required places+    let dl = hsc_dynLinker hsc_env+     -- Take lock for the actual work.-    modifyPLS $ \pls0 -> do+    modifyPLS dl $ \pls0 -> do      -- Link the packages and modules required     (pls, ok) <- linkDependencies hsc_env pls0 span needed_mods@@ -835,7 +802,8 @@ linkModule :: HscEnv -> Module -> IO () linkModule hsc_env mod = do   initDynLinker hsc_env-  modifyPLS_ $ \pls -> do+  let dl = hsc_dynLinker hsc_env+  modifyPLS_ dl $ \pls -> do     (pls', ok) <- linkDependencies hsc_env pls noSrcSpan [mod]     if (failed ok) then throwGhcExceptionIO (ProgramError "could not link module")       else return pls'@@ -926,8 +894,8 @@  dynLoadObjs :: HscEnv -> PersistentLinkerState -> [FilePath]             -> IO PersistentLinkerState-dynLoadObjs _       pls []   = return pls-dynLoadObjs hsc_env pls objs = do+dynLoadObjs _       pls                           []   = return pls+dynLoadObjs hsc_env pls@PersistentLinkerState{..} objs = do     let dflags = hsc_dflags hsc_env     let platform = targetPlatform dflags     let minus_ls = [ lib | Option ('-':'l':lib) <- ldInputs dflags ]@@ -944,13 +912,13 @@                       -- library.                       ldInputs =                            concatMap (\l -> [ Option ("-l" ++ l) ])-                                     (nub $ snd <$> temp_sos pls)+                                     (nub $ snd <$> temp_sos)                         ++ concatMap (\lp -> [ Option ("-L" ++ lp)                                                     , Option "-Xlinker"                                                     , Option "-rpath"                                                     , Option "-Xlinker"                                                     , Option lp ])-                                     (nub $ fst <$> temp_sos pls)+                                     (nub $ fst <$> temp_sos)                         ++ concatMap                              (\lp ->                                  [ Option ("-L" ++ lp)@@ -978,13 +946,13 @@     -- link all "loaded packages" so symbols in those can be resolved     -- Note: We are loading packages with local scope, so to see the     -- symbols in this link we must link all loaded packages again.-    linkDynLib dflags2 objs (pkgs_loaded pls)+    linkDynLib dflags2 objs pkgs_loaded      -- if we got this far, extend the lifetime of the library file     changeTempFilesLifetime dflags TFL_GhcSession [soFile]     m <- loadDLL hsc_env soFile     case m of-        Nothing -> return pls { temp_sos = (libPath, libName) : temp_sos pls }+        Nothing -> return $! pls { temp_sos = (libPath, libName) : temp_sos }         Just err -> panic ("Loading temp shared object failed: " ++ err)  rmDupLinkables :: [Linkable]    -- Already loaded@@ -1099,8 +1067,11 @@         -- Initialise the linker (if it's not been done already)         initDynLinker hsc_env +        -- Extract DynLinker for passing into required places+        let dl = hsc_dynLinker hsc_env+         new_pls-            <- modifyPLS $ \pls -> do+            <- modifyPLS dl $ \pls -> do                  pls1 <- unload_wkr hsc_env linkables pls                  return (pls1, pls1) @@ -1165,7 +1136,10 @@         -- We don't do any cleanup when linking objects with the         -- dynamic linker.  Doing so introduces extra complexity for         -- not much benefit.-      | otherwise++      -- Code unloading currently disabled due to instability.+      -- See #16841.+      | False -- otherwise       = mapM_ (unloadObj hsc_env) [f | DotO f <- linkableUnlinked lnk]                 -- The components of a BCO linkable may contain                 -- dot-o files.  Which is very confusing.@@ -1173,6 +1147,7 @@                 -- But the BCO parts can be unlinked just by                 -- letting go of them (plus of course depopulating                 -- the symbol table which is done in the main body)+      | otherwise = return () -- see #16841  {- ********************************************************************** @@ -1201,6 +1176,13 @@     | Framework String   -- Only used for darwin, but does no harm +instance Outputable LibrarySpec where+  ppr (Objects objs) = text "Objects" <+> ppr objs+  ppr (Archive a) = text "Archive" <+> text a+  ppr (DLL s) = text "DLL" <+> text s+  ppr (DLLPath f) = text "DLLPath" <+> text f+  ppr (Framework s) = text "Framework" <+> text s+ -- If this package is already part of the GHCi binary, we'll already -- have the right DLLs for this package loaded, so don't try to -- load them again.@@ -1223,9 +1205,6 @@ showLS (DLLPath nm)   = "(dynamic) " ++ nm showLS (Framework nm) = "(framework) " ++ nm --- TODO: Make this type more precise-type LinkerUnitId = InstalledUnitId- -- | Link exactly the specified packages, and their dependents (unless of -- course they are already linked).  The dependents are linked -- automatically, and it doesn't matter what order you specify the input@@ -1244,7 +1223,8 @@   -- It's probably not safe to try to load packages concurrently, so we take   -- a lock.   initDynLinker hsc_env-  modifyPLS_ $ \pls -> do+  let dl = hsc_dynLinker hsc_env+  modifyPLS_ dl $ \pls -> do     linkPackages' hsc_env new_pkgs pls  linkPackages' :: HscEnv -> [LinkerUnitId] -> PersistentLinkerState@@ -1549,10 +1529,25 @@                         in apply (map implib import_libs)                        _         -> return Nothing -     assumeDll   = return (DLL lib)+     -- TH Makes use of the interpreter so this failure is not obvious.+     -- So we are nice and warn/inform users why we fail before we do.+     -- But only for haskell libraries, as C libraries don't have a+     -- profiling/non-profiling distinction to begin with.+     assumeDll+      | is_hs+      , not loading_dynamic_hs_libs+      , interpreterProfiled dflags+      = do+          warningMsg dflags+            (text "Interpreter failed to load profiled static library" <+> text lib <> char '.' $$+              text " \tTrying dynamic library instead. If this fails try to rebuild" <+>+              text "libraries with profiling support.")+          return (DLL lib)+      | otherwise = return (DLL lib)      infixr `orElse`      f `orElse` g = f >>= maybe g return +     apply :: [IO (Maybe a)] -> IO (Maybe a)      apply []     = return Nothing      apply (x:xs) = do x' <- x                        if isJust x'
+ ghci/LinkerTypes.hs view
@@ -0,0 +1,112 @@+-----------------------------------------------------------------------------+--+-- Types for the Dynamic Linker+--+-- (c) The University of Glasgow 2019+--+-----------------------------------------------------------------------------++module LinkerTypes (+      DynLinker(..),+      PersistentLinkerState(..),+      LinkerUnitId,+      Linkable(..),+      Unlinked(..),+      SptEntry(..)+    ) where++import GhcPrelude              ( FilePath, String, show )+import Data.Time               ( UTCTime )+import Data.Maybe              ( Maybe )+import Control.Concurrent.MVar ( MVar )+import Module                  ( InstalledUnitId, Module )+import ByteCodeTypes           ( ItblEnv, CompiledByteCode )+import Outputable+import Var                     ( Id )+import GHC.Fingerprint.Type    ( Fingerprint )+import NameEnv                 ( NameEnv )+import Name                    ( Name )+import GHCi.RemoteTypes        ( ForeignHValue )++type ClosureEnv = NameEnv (Name, ForeignHValue)++newtype DynLinker =+  DynLinker { dl_mpls :: MVar (Maybe PersistentLinkerState) }++data PersistentLinkerState+  = PersistentLinkerState {++       -- Current global mapping from Names to their true values+       closure_env :: ClosureEnv,++       -- The current global mapping from RdrNames of DataCons to+       -- info table addresses.+       -- When a new Unlinked is linked into the running image, or an existing+       -- module in the image is replaced, the itbl_env must be updated+       -- appropriately.+       itbl_env    :: !ItblEnv,++       -- The currently loaded interpreted modules (home package)+       bcos_loaded :: ![Linkable],++       -- And the currently-loaded compiled modules (home package)+       objs_loaded :: ![Linkable],++       -- The currently-loaded packages; always object code+       -- Held, as usual, in dependency order; though I am not sure if+       -- that is really important+       pkgs_loaded :: ![LinkerUnitId],++       -- we need to remember the name of previous temporary DLL/.so+       -- libraries so we can link them (see #10322)+       temp_sos :: ![(FilePath, String)] }++-- TODO: Make this type more precise+type LinkerUnitId = InstalledUnitId++-- | Information we can use to dynamically link modules into the compiler+data Linkable = LM {+  linkableTime     :: UTCTime,          -- ^ Time at which this linkable was built+                                        -- (i.e. when the bytecodes were produced,+                                        --       or the mod date on the files)+  linkableModule   :: Module,           -- ^ The linkable module itself+  linkableUnlinked :: [Unlinked]+    -- ^ Those files and chunks of code we have yet to link.+    --+    -- INVARIANT: A valid linkable always has at least one 'Unlinked' item.+    -- If this list is empty, the Linkable represents a fake linkable, which+    -- is generated in HscNothing mode to avoid recompiling modules.+    --+    -- ToDo: Do items get removed from this list when they get linked?+ }++instance Outputable Linkable where+  ppr (LM when_made mod unlinkeds)+     = (text "LinkableM" <+> parens (text (show when_made)) <+> ppr mod)+       $$ nest 3 (ppr unlinkeds)++-- | Objects which have yet to be linked by the compiler+data Unlinked+  = DotO FilePath      -- ^ An object file (.o)+  | DotA FilePath      -- ^ Static archive file (.a)+  | DotDLL FilePath    -- ^ Dynamically linked library file (.so, .dll, .dylib)+  | BCOs CompiledByteCode+         [SptEntry]    -- ^ A byte-code object, lives only in memory. Also+                       -- carries some static pointer table entries which+                       -- should be loaded along with the BCOs.+                       -- See Note [Grant plan for static forms] in+                       -- StaticPtrTable.++instance Outputable Unlinked where+  ppr (DotO path)   = text "DotO" <+> text path+  ppr (DotA path)   = text "DotA" <+> text path+  ppr (DotDLL path) = text "DotDLL" <+> text path+  ppr (BCOs bcos spt) = text "BCOs" <+> ppr bcos <+> ppr spt++-- | An entry to be inserted into a module's static pointer table.+-- See Note [Grand plan for static forms] in StaticPtrTable.+data SptEntry = SptEntry Id Fingerprint++instance Outputable SptEntry where+  ppr (SptEntry id fpr) = ppr id <> colon <+> ppr fpr+
ghci/RtClosureInspect.hs view
@@ -62,7 +62,7 @@  import Control.Monad import Data.Maybe-import Data.List+import Data.List ((\\)) #if defined(INTEGER_GMP) import GHC.Exts import Data.Array.Base@@ -752,9 +752,9 @@          traceTR (text "Following a MutVar")          contents_tv <- newVar liftedTypeKind          MASSERT(isUnliftedType my_ty)-         (mutvar_ty,_) <- instScheme $ quantifyType $ mkFunTy+         (mutvar_ty,_) <- instScheme $ quantifyType $ mkVisFunTy                             contents_ty (mkTyConApp tycon [world,contents_ty])-         addConstraint (mkFunTy contents_tv my_ty) mutvar_ty+         addConstraint (mkVisFunTy contents_tv my_ty) mutvar_ty          x <- go (pred max_depth) contents_tv contents_ty contents          return (RefWrap my_ty x) @@ -856,7 +856,7 @@       | otherwise = do           -- This is a bit involved since we allow packing multiple fields           -- within a single word. See also-          -- StgCmmLayout.mkVirtHeapOffsetsWithPadding+          -- GHC.StgToCmm.Layout.mkVirtHeapOffsetsWithPadding           dflags <- getDynFlags           let word_size = wORD_SIZE dflags               big_endian = wORDS_BIGENDIAN dflags@@ -864,7 +864,7 @@               -- Align the start offset (eg, 2-byte value should be 2-byte               -- aligned). But not more than to a word. The offset calculation               -- should be the same with the offset calculation in-              -- StgCmmLayout.mkVirtHeapOffsetsWithPadding.+              -- GHC.StgToCmm.Layout.mkVirtHeapOffsetsWithPadding.               !aligned_idx = roundUpTo arr_i (min word_size size_b)               !new_arr_i = aligned_idx + size_b               ws | size_b < word_size =@@ -1056,7 +1056,7 @@  {- Note [Constructor arg types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider a GADT (cf Trac #7386)+Consider a GADT (cf #7386)    data family D a b    data instance D [a] a where      MkT :: a -> D [a] (Maybe a)@@ -1259,7 +1259,7 @@     , Just (r1,r2) <- splitFunTy_maybe r     = do r2' <- go l2 r2          r1' <- go l1 r1-         return (mkFunTy r1' r2')+         return (mkVisFunTy r1' r2') -- TyconApp Inductive case; this is the interesting bit.     | Just (tycon_l, _) <- tcSplitTyConApp_maybe lhs     , Just (tycon_r, _) <- tcSplitTyConApp_maybe rhs
ghci/keepCAFsForGHCi.c view
@@ -1,4 +1,4 @@-#include "Rts.h"+#include <Rts.h>  // This file is only included in the dynamic library. // It contains an __attribute__((constructor)) function (run prior to main())
hieFile/HieAst.hs view
@@ -25,18 +25,20 @@ import ConLike                    ( conLikeName ) import Desugar                    ( deSugarExpr ) import FieldLabel-import HsSyn+import GHC.Hs import HscTypes import Module                     ( ModuleName, ml_hs_file ) import MonadUtils                 ( concatMapM, liftIO ) import Name                       ( Name, nameSrcSpan, setNameLoc )+import NameEnv                    ( NameEnv, emptyNameEnv, extendNameEnv, lookupNameEnv ) import SrcLoc import TcHsSyn                    ( hsLitType, hsPatType )-import Type                       ( mkFunTys, Type )+import Type                       ( mkVisFunTys, Type ) import TysWiredIn                 ( mkListTy, mkSumTy ) import Var                        ( Id, Var, setVarName, varName, varType ) import TcRnTypes import MkIface                    ( mkIfaceExports )+import Panic  import HieTypes import HieUtils@@ -51,6 +53,134 @@ import Control.Monad.Trans.Reader import Control.Monad.Trans.Class  ( lift ) +{- Note [Updating HieAst for changes in the GHC AST]++When updating the code in this file for changes in the GHC AST, you+need to pay attention to the following things:++1) Symbols (Names/Vars/Modules) in the following categories:++   a) Symbols that appear in the source file that directly correspond to+   something the user typed+   b) Symbols that don't appear in the source, but should be in some sense+   "visible" to a user, particularly via IDE tooling or the like. This+   includes things like the names introduced by RecordWildcards (We record+   all the names introduced by a (..) in HIE files), and will include implicit+   parameters and evidence variables after one of my pending MRs lands.++2) Subtrees that may contain such symbols, or correspond to a SrcSpan in+   the file. This includes all `Located` things++For 1), you need to call `toHie` for one of the following instances++instance ToHie (Context (Located Name)) where ...+instance ToHie (Context (Located Var)) where ...+instance ToHie (IEContext (Located ModuleName)) where ...++`Context` is a data type that looks like:++data Context a = C ContextInfo a -- Used for names and bindings++`ContextInfo` is defined in `HieTypes`, and looks like++data ContextInfo+  = Use                -- ^ regular variable+  | MatchBind+  | IEThing IEType     -- ^ import/export+  | TyDecl+  -- | Value binding+  | ValBind+      BindType     -- ^ whether or not the binding is in an instance+      Scope        -- ^ scope over which the value is bound+      (Maybe Span) -- ^ span of entire binding+  ...++It is used to annotate symbols in the .hie files with some extra information on+the context in which they occur and should be fairly self explanatory. You need+to select one that looks appropriate for the symbol usage. In very rare cases,+you might need to extend this sum type if none of the cases seem appropriate.++So, given a `Located Name` that is just being "used", and not defined at a+particular location, you would do the following:++   toHie $ C Use located_name++If you select one that corresponds to a binding site, you will need to+provide a `Scope` and a `Span` for your binding. Both of these are basically+`SrcSpans`.++The `SrcSpan` in the `Scope` is supposed to span over the part of the source+where the symbol can be legally allowed to occur. For more details on how to+calculate this, see Note [Capturing Scopes and other non local information]+in HieAst.++The binding `Span` is supposed to be the span of the entire binding for+the name.++For a function definition `foo`:++foo x = x + y+  where y = x^2++The binding `Span` is the span of the entire function definition from `foo x`+to `x^2`.  For a class definition, this is the span of the entire class, and+so on.  If this isn't well defined for your bit of syntax (like a variable+bound by a lambda), then you can just supply a `Nothing`++There is a test that checks that all symbols in the resulting HIE file+occur inside their stated `Scope`. This can be turned on by passing the+-fvalidate-ide-info flag to ghc along with -fwrite-ide-info to generate the+.hie file.++You may also want to provide a test in testsuite/test/hiefile that includes+a file containing your new construction, and tests that the calculated scope+is valid (by using -fvalidate-ide-info)++For subtrees in the AST that may contain symbols, the procedure is fairly+straightforward.  If you are extending the GHC AST, you will need to provide a+`ToHie` instance for any new types you may have introduced in the AST.++Here are is an extract from the `ToHie` instance for (LHsExpr (GhcPass p)):++  toHie e@(L mspan oexpr) = concatM $ getTypeNode e : case oexpr of+      HsVar _ (L _ var) ->+        [ toHie $ C Use (L mspan var)+             -- Patch up var location since typechecker removes it+        ]+      HsConLikeOut _ con ->+        [ toHie $ C Use $ L mspan $ conLikeName con+        ]+      ...+      HsApp _ a b ->+        [ toHie a+        , toHie b+        ]++If your subtree is `Located` or has a `SrcSpan` available, the output list+should contain a HieAst `Node` corresponding to the subtree. You can use+either `makeNode` or `getTypeNode` for this purpose, depending on whether it+makes sense to assign a `Type` to the subtree. After this, you just need+to concatenate the result of calling `toHie` on all subexpressions and+appropriately annotated symbols contained in the subtree.++The code above from the ToHie instance of `LhsExpr (GhcPass p)` is supposed+to work for both the renamed and typechecked source. `getTypeNode` is from+the `HasType` class defined in this file, and it has different instances+for `GhcTc` and `GhcRn` that allow it to access the type of the expression+when given a typechecked AST:++class Data a => HasType a where+  getTypeNode :: a -> HieM [HieAST Type]+instance HasType (LHsExpr GhcTc) where+  getTypeNode e@(L spn e') = ... -- Actually get the type for this expression+instance HasType (LHsExpr GhcRn) where+  getTypeNode (L spn e) = makeNode e spn -- Fallback to a regular `makeNode` without recording the type++If your subtree doesn't have a span available, you can omit the `makeNode`+call and just recurse directly in to the subexpressions.++-}+ -- These synonyms match those defined in main/GHC.hs type RenamedSource     = ( HsGroup GhcRn, [LImportDecl GhcRn]                          , Maybe [(LIE GhcRn, Avails)]@@ -64,11 +194,11 @@ so we replace all occurrences of the mono name with the poly name. -} newtype HieState = HieState-  { name_remapping :: M.Map Name Id+  { name_remapping :: NameEnv Id   }  initState :: HieState-initState = HieState M.empty+initState = HieState emptyNameEnv  class ModifyState a where -- See Note [Name Remapping]   addSubstitution :: a -> a -> HieState -> HieState@@ -78,7 +208,7 @@  instance ModifyState Id where   addSubstitution mono poly hs =-    hs{name_remapping = M.insert (varName mono) poly (name_remapping hs)}+    hs{name_remapping = extendNameEnv (name_remapping hs) (varName mono) poly}  modifyState :: ModifyState (IdP p) => [ABExport p] -> HieState -> HieState modifyState = foldr go id@@ -160,7 +290,7 @@  grhss_span :: GRHSs p body -> SrcSpan grhss_span (GRHSs _ xs bs) = foldl' combineSrcSpans (getLoc bs) (map getLoc xs)-grhss_span (XGRHSs _) = error "XGRHS has no span"+grhss_span (XGRHSs _) = panic "XGRHS has no span"  bindingsOnly :: [Context Name] -> [HieAST a] bindingsOnly [] = []@@ -244,7 +374,7 @@   -> [LPat (GhcPass p)]   -> [PScoped (LPat (GhcPass p))] patScopes rsp useScope patScope xs =-  map (\(RS sc a) -> PS rsp useScope sc (unLoc a)) $+  map (\(RS sc a) -> PS rsp useScope sc (composeSrcSpan a)) $     listScopes patScope (map dL xs)  -- | 'listScopes' specialised to 'TVScoped' things@@ -282,7 +412,7 @@   ProtectedSig GhcRn = HsWildCardBndrs GhcRn (HsImplicitBndrs                                                 GhcRn                                                 (Shielded (LHsType GhcRn)))-  ProtectedSig GhcTc = NoExt+  ProtectedSig GhcTc = NoExtField  class ProtectSig a where   protectSig :: Scope -> LHsSigWcType (NoGhcTc a) -> ProtectedSig a@@ -294,12 +424,13 @@   toHie (TS _ (SH sc a)) = toHie (TS (ResolvedScopes [sc]) a)  instance ProtectSig GhcTc where-  protectSig _ _ = NoExt+  protectSig _ _ = noExtField  instance ProtectSig GhcRn where   protectSig sc (HsWC a (HsIB b sig)) =     HsWC a (HsIB b (SH sc sig))-  protectSig _ _ = error "protectSig not given HsWC (HsIB)"+  protectSig _ (HsWC _ (XHsImplicitBndrs nec)) = noExtCon nec+  protectSig _ (XHsWildCardBndrs nec) = noExtCon nec  class HasLoc a where   -- ^ defined so that HsImplicitBndrs and HsWildCardBndrs can@@ -331,7 +462,7 @@   loc [] = noSrcSpan   loc xs = foldl1' combineSrcSpans $ map loc xs -instance (HasLoc a, HasLoc b) => HasLoc (FamEqn s a b) where+instance HasLoc a => HasLoc (FamEqn s a) where   loc (FamEqn _ a Nothing b _ c) = foldl1' combineSrcSpans [loc a, loc b, loc c]   loc (FamEqn _ a (Just tvs) b _ c) = foldl1' combineSrcSpans                                               [loc a, loc tvs, loc b, loc c]@@ -347,10 +478,24 @@     -- Most probably the rest will be unhelpful anyway   loc _ = noSrcSpan -instance HasLoc (Pat (GhcPass a)) where-  loc (dL -> L l _) = l+{- Note [Real DataCon Name]+The typechecker subtitutes the conLikeWrapId for the name, but we don't want+this showing up in the hieFile, so we replace the name in the Id with the+original datacon name+See also Note [Data Constructor Naming]+-}+class HasRealDataConName p where+  getRealDataCon :: XRecordCon p -> Located (IdP p) -> Located (IdP p) +instance HasRealDataConName GhcRn where+  getRealDataCon _ n = n+instance HasRealDataConName GhcTc where+  getRealDataCon RecordConTc{rcon_con_like = con} (L sp var) =+    L sp (setVarName var (conLikeName con))+ -- | The main worker class+-- See Note [Updating HieAst for changes in the GHC AST] for more information+-- on how to add/modify instances for this. class ToHie a where   toHie :: a -> HieM [HieAST Type] @@ -367,10 +512,10 @@ instance (ToHie a) => ToHie (Maybe a) where   toHie = maybe (pure []) toHie -instance ToHie (Context (Located NoExt)) where+instance ToHie (Context (Located NoExtField)) where   toHie _ = pure [] -instance ToHie (TScoped NoExt) where+instance ToHie (TScoped NoExtField) where   toHie _ = pure []  instance ToHie (IEContext (Located ModuleName)) where@@ -385,7 +530,9 @@       C context (L (RealSrcSpan span) name')         -> do         m <- asks name_remapping-        let name = M.findWithDefault name' (varName name') m+        let name = case lookupNameEnv m (varName name') of+              Just var -> var+              Nothing-> name'         pure           [Node             (NodeInfo S.empty [] $@@ -400,7 +547,7 @@   toHie c = case c of       C context (L (RealSrcSpan span) name') -> do         m <- asks name_remapping-        let name = case M.lookup name' m of+        let name = case lookupNameEnv m name' of               Just var -> varName var               Nothing -> name'         pure@@ -431,10 +578,10 @@       FunBind{fun_id = name} -> makeTypeNode bind spn (varType $ unLoc name)       _ -> makeNode bind spn -instance HasType (LPat GhcRn) where+instance HasType (Located (Pat GhcRn)) where   getTypeNode (dL -> L spn pat) = makeNode pat spn -instance HasType (LPat GhcTc) where+instance HasType (Located (Pat GhcTc)) where   getTypeNode (dL -> L spn opat) = makeTypeNode opat spn (hsPatType opat)  instance HasType (LHsExpr GhcRn) where@@ -475,7 +622,9 @@      in     case tyOpt of-      _ | skipDesugaring e' -> fallback+      Just t -> makeTypeNode e' spn t+      Nothing+        | skipDesugaring e' -> fallback         | otherwise -> do             hs_env <- Hsc $ \e w -> return (e,w)             (_,mbe) <- liftIO $ deSugarExpr hs_env e@@ -484,7 +633,7 @@       fallback = makeNode e' spn        matchGroupType :: MatchGroupTc -> Type-      matchGroupType (MatchGroupTc args res) = mkFunTys args res+      matchGroupType (MatchGroupTc args res) = mkVisFunTys args res        -- | Skip desugaring of these expressions for performance reasons.       --@@ -616,7 +765,7 @@          , ToHie (TScoped (ProtectedSig a))          , HasType (LPat a)          , Data (HsSplice a)-         ) => ToHie (PScoped (LPat (GhcPass p))) where+         ) => ToHie (PScoped (Located (Pat (GhcPass p)))) where   toHie (PS rsp scope pscope lpat@(dL -> L ospan opat)) =     concatM $ getTypeNode lpat : case opat of       WildPat _ ->@@ -732,6 +881,7 @@          , Data (HsSplice a)          , Data (HsTupArg a)          , Data (AmbiguousFieldOcc a)+         , (HasRealDataConName a)          ) => ToHie (LHsExpr (GhcPass p)) where   toHie e@(L mspan oexpr) = concatM $ getTypeNode e : case oexpr of       HsVar _ (L _ var) ->@@ -812,8 +962,9 @@       ExplicitList _ _ exprs ->         [ toHie exprs         ]-      RecordCon {rcon_con_name = name, rcon_flds = binds}->-        [ toHie $ C Use name+      RecordCon {rcon_ext = mrealcon, rcon_con_name = name, rcon_flds = binds} ->+        [ toHie $ C Use (getRealDataCon @a mrealcon name)+            -- See Note [Real DataCon Name]         , toHie $ RC RecFieldAssign $ binds         ]       RecordUpd {rupd_expr = expr, rupd_flds = upds}->@@ -840,14 +991,6 @@       HsStatic _ expr ->         [ toHie expr         ]-      HsArrApp _ a b _ _ ->-        [ toHie a-        , toHie b-        ]-      HsArrForm _ expr _ cmds ->-        [ toHie expr-        , toHie cmds-        ]       HsTick _ _ expr ->         [ toHie expr         ]@@ -874,18 +1017,6 @@       HsSpliceE _ x ->         [ toHie $ L mspan x         ]-      EWildPat _ -> []-      EAsPat _ a b ->-        [ toHie $ C Use a-        , toHie b-        ]-      EViewPat _ a b ->-        [ toHie a-        , toHie b-        ]-      ELazyPat _ a ->-        [ toHie a-        ]       XExpr _ -> []  instance ( a ~ GhcPass p@@ -1043,7 +1174,7 @@          , Data (StmtLR a a (Located (HsExpr a)))          , Data (HsLocalBinds a)          ) => ToHie (RScoped (ApplicativeArg (GhcPass p))) where-  toHie (RS sc (ApplicativeArgOne _ pat expr _)) = concatM+  toHie (RS sc (ApplicativeArgOne _ pat expr _ _)) = concatM     [ toHie $ PS Nothing sc NoScope pat     , toHie expr     ]@@ -1120,8 +1251,13 @@       XCmd _ -> []  instance ToHie (TyClGroup GhcRn) where-  toHie (TyClGroup _ classes roles instances) = concatM+  toHie TyClGroup{ group_tyclds = classes+                 , group_roles  = roles+                 , group_kisigs = sigs+                 , group_instds = instances } =+    concatM     [ toHie classes+    , toHie sigs     , toHie roles     , toHie instances     ]@@ -1165,18 +1301,12 @@         , toHie $ fmap (BC InstanceBind ModuleScope) meths         , toHie typs         , concatMapM (pure . locOnly . getLoc) deftyps-        , toHie $ map (go . unLoc) deftyps+        , toHie deftyps         ]         where           context_scope = mkLScope context           rhs_scope = foldl1' combineScopes $ map mkScope             [ loc deps, loc sigs, loc (bagToList meths), loc typs, loc deftyps]--          go :: TyFamDefltEqn GhcRn-             -> FamEqn GhcRn (TScoped (LHsQTyVars GhcRn)) (LHsType GhcRn)-          go (FamEqn a var bndrs pat b rhs) =-             FamEqn a var bndrs (TS (ResolvedScopes [mkLScope rhs]) pat) b rhs-          go (XFamEqn NoExt) = XFamEqn NoExt       XTyClDecl _ -> []  instance ToHie (LFamilyDecl GhcRn) where@@ -1222,15 +1352,12 @@     , toHie $ map (C Use) rhs     ] -instance (ToHie pats, ToHie rhs, HasLoc pats, HasLoc rhs)-    => ToHie (TScoped (FamEqn GhcRn pats rhs)) where+instance (ToHie rhs, HasLoc rhs)+    => ToHie (TScoped (FamEqn GhcRn rhs)) where   toHie (TS _ f) = toHie f -instance ( ToHie pats-         , ToHie rhs-         , HasLoc pats-         , HasLoc rhs-         ) => ToHie (FamEqn GhcRn pats rhs) where+instance (ToHie rhs, HasLoc rhs)+    => ToHie (FamEqn GhcRn rhs) where   toHie fe@(FamEqn _ var tybndrs pats _ rhs) = concatM $     [ toHie $ C (Decl InstDec $ getRealSpan $ loc fe) var     , toHie $ fmap (tvScopes (ResolvedScopes []) scope) tybndrs@@ -1341,6 +1468,17 @@     where span = loc a   toHie (TS _ (XHsWildCardBndrs _)) = pure [] +instance ToHie (LStandaloneKindSig GhcRn) where+  toHie (L sp sig) = concatM [makeNode sig sp, toHie sig]++instance ToHie (StandaloneKindSig GhcRn) where+  toHie sig = concatM $ case sig of+    StandaloneKindSig _ name typ ->+      [ toHie $ C TyDecl name+      , toHie $ TS (ResolvedScopes []) typ+      ]+    XStandaloneKindSig _ -> []+ instance ToHie (SigContext (LSig GhcRn)) where   toHie (SC (SI styp msp) (L sp sig)) = concatM $ makeNode sig sp : case sig of       TypeSig _ names typ ->@@ -1390,7 +1528,7 @@  instance ToHie (TScoped (LHsType GhcRn)) where   toHie (TS tsc (L span t)) = concatM $ makeNode t span : case t of-      HsForAllTy _ bndrs body ->+      HsForAllTy _ _ bndrs body ->         [ toHie $ tvScopes tsc (mkScope $ getLoc body) bndrs         , toHie body         ]@@ -1478,7 +1616,7 @@       XTyVarBndr _ -> []  instance ToHie (TScoped (LHsQTyVars GhcRn)) where-  toHie (TS sc (HsQTvs (HsQTvsRn implicits _) vars)) = concatM $+  toHie (TS sc (HsQTvs implicits vars)) = concatM $     [ pure $ bindingsOnly bindings     , toHie $ tvScopes sc NoScope vars     ]
hieFile/HieBin.hs view
@@ -2,8 +2,10 @@ Binary serialization for .hie files. -} {-# LANGUAGE ScopedTypeVariables #-}-module HieBin ( readHieFile, readHieFileWithVersion, HieHeader, writeHieFile, HieName(..), toHieName, HieFileResult(..), hieMagic) where+module HieBin ( readHieFile, readHieFileWithVersion, HieHeader, writeHieFile, HieName(..), toHieName, HieFileResult(..), hieMagic, hieNameOcc) where +import GHC.Settings               ( maybeRead )+ import Config                     ( cProjectVersion ) import GhcPrelude import Binary@@ -17,7 +19,6 @@ import PrelInfo import SrcLoc import UniqSupply                 ( takeUniqFromSupply )-import Util                       ( maybeRead ) import Unique import UniqFM @@ -57,6 +58,15 @@   ppr (ExternalName m n sp) = text "ExternalName" <+> ppr m <+> ppr n <+> ppr sp   ppr (LocalName n sp) = text "LocalName" <+> ppr n <+> ppr sp   ppr (KnownKeyName u) = text "KnownKeyName" <+> ppr u++hieNameOcc :: HieName -> OccName+hieNameOcc (ExternalName _ occ _) = occ+hieNameOcc (LocalName occ _) = occ+hieNameOcc (KnownKeyName u) =+  case lookupKnownKeyName u of+    Just n -> nameOccName n+    Nothing -> pprPanic "hieNameOcc:unknown known-key unique"+                        (ppr (unpkUnique u))   data HieSymbolTable = HieSymbolTable
hieFile/HieDebug.hs view
@@ -16,6 +16,7 @@ import HieTypes import HieBin import HieUtils+import Name  import qualified Data.Map as M import qualified Data.Set as S@@ -56,20 +57,30 @@ diffFile :: Diff HieFile diffFile = diffAsts eqDiff `on` (getAsts . hie_asts) -diffAsts :: (Outputable a, Eq a) => Diff a -> Diff (M.Map FastString (HieAST a))+diffAsts :: (Outputable a, Eq a, Ord a) => Diff a -> Diff (M.Map FastString (HieAST a)) diffAsts f = diffList (diffAst f) `on` M.elems -diffAst :: (Outputable a, Eq a) => Diff a -> Diff (HieAST a)+diffAst :: (Outputable a, Eq a,Ord a) => Diff a -> Diff (HieAST a) diffAst diffType (Node info1 span1 xs1) (Node info2 span2 xs2) =     infoDiff ++ spanDiff ++ diffList (diffAst diffType) xs1 xs2   where     spanDiff       | span1 /= span2 = [hsep ["Spans", ppr span1, "and", ppr span2, "differ"]]       | otherwise = []-    infoDiff+    infoDiff'       = (diffList eqDiff `on` (S.toAscList . nodeAnnotations)) info1 info2      ++ (diffList diffType `on` nodeType) info1 info2      ++ (diffIdents `on` nodeIdentifiers) info1 info2+    infoDiff = case infoDiff' of+      [] -> []+      xs -> xs ++ [vcat ["In Node:",ppr (nodeIdentifiers info1,span1)+                           , "and", ppr (nodeIdentifiers info2,span2)+                        , "While comparing"+                        , ppr (normalizeIdents $ nodeIdentifiers info1), "and"+                        , ppr (normalizeIdents $ nodeIdentifiers info2)+                        ]+                  ]+     diffIdents a b = (diffList diffIdent `on` normalizeIdents) a b     diffIdent (a,b) (c,d) = diffName a c                          ++ eqDiff b d@@ -81,10 +92,11 @@  type DiffIdent = Either ModuleName HieName -normalizeIdents :: NodeIdentifiers a -> [(DiffIdent,IdentifierDetails a)]-normalizeIdents = sortOn fst . map (first toHieName) . M.toList+normalizeIdents :: Ord a => NodeIdentifiers a -> [(DiffIdent,IdentifierDetails a)]+normalizeIdents = sortOn go . map (first toHieName) . M.toList   where     first f (a,b) = (fmap f a, b)+    go (a,b) = (hieNameOcc <$> a,identInfo b,identType b)  diffList :: Diff a -> Diff [a] diffList f xs ys@@ -122,10 +134,14 @@  -- | Look for any identifiers which occur outside of their supposed scopes. -- Returns a list of error messages.-validateScopes :: M.Map FastString (HieAST a) -> [SDoc]-validateScopes asts = M.foldrWithKey (\k a b -> valid k a ++ b) [] refMap+validateScopes :: Module -> M.Map FastString (HieAST a) -> [SDoc]+validateScopes mod asts = validScopes   where     refMap = generateReferencesMap asts+    -- We use a refmap for most of the computation++    -- Check if all the names occur in their calculated scopes+    validScopes = M.foldrWithKey (\k a b -> valid k a ++ b) [] refMap     valid (Left _) _ = []     valid (Right n) refs = concatMap inScope refs       where@@ -134,13 +150,22 @@           Just xs -> xs           Nothing -> []         inScope (sp, dets)-          |  definedInAsts asts n+          |  (definedInAsts asts n)           && any isOccurrence (identInfo dets)+          -- We validate scopes for names which are defined locally, and occur+          -- in this span             = case scopes of-              [] -> []+              [] | (nameIsLocalOrFrom mod n+                   && not (isDerivedOccName $ nameOccName n))+                   -- If we don't get any scopes for a local name then its an error.+                   -- We can ignore derived names.+                   -> return $ hsep $+                     [ "Locally defined Name", ppr n,pprDefinedAt n , "at position", ppr sp+                     , "Doesn't have a calculated scope: ", ppr scopes]+                 | otherwise -> []               _ -> if any (`scopeContainsSpan` sp) scopes                    then []                    else return $ hsep $-                     [ "Name", ppr n, "at position", ppr sp+                     [ "Name", ppr n, pprDefinedAt n, "at position", ppr sp                      , "doesn't occur in calculated scope", ppr scopes]           | otherwise = []
hieFile/HieUtils.hs view
@@ -63,7 +63,7 @@       where         ts' = go (extendTvSubst env tv t) res ts -    go env (FunTy _ res) (t:ts) -- No type-class args in tycon apps+    go env (FunTy { ft_res = res }) (t:ts) -- No type-class args in tycon apps       = (True,t) : (go env res ts)      go env (TyVarTy tv) ts@@ -81,8 +81,8 @@     go (HLitTy l) = IfaceLitTy l     go (HForAllTy ((n,k),af) t) = let b = (occNameFS $ getOccName n, k)                                   in IfaceForAllTy (Bndr (IfaceTvBndr b) af) t-    go (HFunTy a b) = IfaceFunTy a b-    go (HQualTy pred b) = IfaceDFunTy pred b+    go (HFunTy a b)     = IfaceFunTy VisArg   a    b+    go (HQualTy pred b) = IfaceFunTy InvisArg pred b     go (HCastTy a) = a     go HCoercionTy = IfaceTyVar "<coercion type>"     go (HTyConApp a xs) = IfaceTyConApp a (hieToIfaceArgs xs)@@ -158,12 +158,12 @@       k <- getTypeIndex (varType v)       i <- getTypeIndex t       return $ HForAllTy ((varName v,k),a) i-    go (FunTy a b) = do+    go (FunTy { ft_af = af, ft_arg = a, ft_res = b }) = do       ai <- getTypeIndex a       bi <- getTypeIndex b-      return $ if isPredTy a-                  then HQualTy ai bi-                  else HFunTy ai bi+      return $ case af of+                 InvisArg -> HQualTy ai bi+                 VisArg   -> HFunTy ai bi     go (LitTy a) = return $ HLitTy $ toIfaceTyLit a     go (CastTy t _) = do       i <- getTypeIndex t
− hsSyn/Convert.hs
@@ -1,1973 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998---This module converts Template Haskell syntax into HsSyn--}--{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE ViewPatterns #-}--module Convert( convertToHsExpr, convertToPat, convertToHsDecls,-                convertToHsType,-                thRdrNameGuesses ) where--import GhcPrelude--import HsSyn as Hs-import PrelNames-import RdrName-import qualified Name-import Module-import RdrHsSyn-import OccName-import SrcLoc-import Type-import qualified Coercion ( Role(..) )-import TysWiredIn-import BasicTypes as Hs-import ForeignCall-import Unique-import ErrUtils-import Bag-import Lexeme-import Util-import FastString-import Outputable-import MonadUtils ( foldrM )--import qualified Data.ByteString as BS-import Control.Monad( unless, liftM, ap )--import Data.Maybe( catMaybes, isNothing )-import Language.Haskell.TH as TH hiding (sigP)-import Language.Haskell.TH.Syntax as TH------------------------------------------------------------------------              The external interface--convertToHsDecls :: SrcSpan -> [TH.Dec] -> Either MsgDoc [LHsDecl GhcPs]-convertToHsDecls loc ds = initCvt loc (fmap catMaybes (mapM cvt_dec ds))-  where-    cvt_dec d = wrapMsg "declaration" d (cvtDec d)--convertToHsExpr :: SrcSpan -> TH.Exp -> Either MsgDoc (LHsExpr GhcPs)-convertToHsExpr loc e-  = initCvt loc $ wrapMsg "expression" e $ cvtl e--convertToPat :: SrcSpan -> TH.Pat -> Either MsgDoc (LPat GhcPs)-convertToPat loc p-  = initCvt loc $ wrapMsg "pattern" p $ cvtPat p--convertToHsType :: SrcSpan -> TH.Type -> Either MsgDoc (LHsType GhcPs)-convertToHsType loc t-  = initCvt loc $ wrapMsg "type" t $ cvtType t----------------------------------------------------------------------newtype CvtM a = CvtM { unCvtM :: SrcSpan -> Either MsgDoc (SrcSpan, a) }-        -- Push down the source location;-        -- Can fail, with a single error message---- NB: If the conversion succeeds with (Right x), there should---     be no exception values hiding in x--- Reason: so a (head []) in TH code doesn't subsequently---         make GHC crash when it tries to walk the generated tree---- Use the loc everywhere, for lack of anything better--- In particular, we want it on binding locations, so that variables bound in--- the spliced-in declarations get a location that at least relates to the splice point--instance Functor CvtM where-    fmap = liftM--instance Applicative CvtM where-    pure x = CvtM $ \loc -> Right (loc,x)-    (<*>) = ap--instance Monad CvtM where-  (CvtM m) >>= k = CvtM $ \loc -> case m loc of-                                  Left err -> Left err-                                  Right (loc',v) -> unCvtM (k v) loc'--initCvt :: SrcSpan -> CvtM a -> Either MsgDoc a-initCvt loc (CvtM m) = fmap snd (m loc)--force :: a -> CvtM ()-force a = a `seq` return ()--failWith :: MsgDoc -> CvtM a-failWith m = CvtM (\_ -> Left m)--getL :: CvtM SrcSpan-getL = CvtM (\loc -> Right (loc,loc))--setL :: SrcSpan -> CvtM ()-setL loc = CvtM (\_ -> Right (loc, ()))--returnL :: HasSrcSpan a => SrcSpanLess a -> CvtM a-returnL x = CvtM (\loc -> Right (loc, cL loc x))--returnJustL :: HasSrcSpan a => SrcSpanLess a -> CvtM (Maybe a)-returnJustL = fmap Just . returnL--wrapParL :: HasSrcSpan a =>-            (a -> SrcSpanLess a) -> SrcSpanLess a -> CvtM (SrcSpanLess  a)-wrapParL add_par x = CvtM (\loc -> Right (loc, add_par (cL loc x)))--wrapMsg :: (Show a, TH.Ppr a) => String -> a -> CvtM b -> CvtM b--- E.g  wrapMsg "declaration" dec thing-wrapMsg what item (CvtM m)-  = CvtM (\loc -> case m loc of-                     Left err -> Left (err $$ getPprStyle msg)-                     Right v  -> Right v)-  where-        -- Show the item in pretty syntax normally,-        -- but with all its constructors if you say -dppr-debug-    msg sty = hang (text "When splicing a TH" <+> text what <> colon)-                 2 (if debugStyle sty-                    then text (show item)-                    else text (pprint item))--wrapL :: HasSrcSpan a => CvtM (SrcSpanLess a) -> CvtM a-wrapL (CvtM m) = CvtM (\loc -> case m loc of-                               Left err -> Left err-                               Right (loc',v) -> Right (loc',cL loc v))----------------------------------------------------------------------cvtDecs :: [TH.Dec] -> CvtM [LHsDecl GhcPs]-cvtDecs = fmap catMaybes . mapM cvtDec--cvtDec :: TH.Dec -> CvtM (Maybe (LHsDecl GhcPs))-cvtDec (TH.ValD pat body ds)-  | TH.VarP s <- pat-  = do  { s' <- vNameL s-        ; cl' <- cvtClause (mkPrefixFunRhs s') (Clause [] body ds)-        ; returnJustL $ Hs.ValD noExt $ mkFunBind s' [cl'] }--  | otherwise-  = do  { pat' <- cvtPat pat-        ; body' <- cvtGuard body-        ; ds' <- cvtLocalDecs (text "a where clause") ds-        ; returnJustL $ Hs.ValD noExt $-          PatBind { pat_lhs = pat'-                  , pat_rhs = GRHSs noExt body' (noLoc ds')-                  , pat_ext = noExt-                  , pat_ticks = ([],[]) } }--cvtDec (TH.FunD nm cls)-  | null cls-  = failWith (text "Function binding for"-                 <+> quotes (text (TH.pprint nm))-                 <+> text "has no equations")-  | otherwise-  = do  { nm' <- vNameL nm-        ; cls' <- mapM (cvtClause (mkPrefixFunRhs nm')) cls-        ; returnJustL $ Hs.ValD noExt $ mkFunBind nm' cls' }--cvtDec (TH.SigD nm typ)-  = do  { nm' <- vNameL nm-        ; ty' <- cvtType typ-        ; returnJustL $ Hs.SigD noExt-                                    (TypeSig noExt [nm'] (mkLHsSigWcType ty')) }--cvtDec (TH.InfixD fx nm)-  -- Fixity signatures are allowed for variables, constructors, and types-  -- the renamer automatically looks for types during renaming, even when-  -- the RdrName says it's a variable or a constructor. So, just assume-  -- it's a variable or constructor and proceed.-  = do { nm' <- vcNameL nm-       ; returnJustL (Hs.SigD noExt (FixSig noExt-                                      (FixitySig noExt [nm'] (cvtFixity fx)))) }--cvtDec (PragmaD prag)-  = cvtPragmaD prag--cvtDec (TySynD tc tvs rhs)-  = do  { (_, tc', tvs') <- cvt_tycl_hdr [] tc tvs-        ; rhs' <- cvtType rhs-        ; returnJustL $ TyClD noExt $-          SynDecl { tcdSExt = noExt, tcdLName = tc', tcdTyVars = tvs'-                  , tcdFixity = Prefix-                  , tcdRhs = rhs' } }--cvtDec (DataD ctxt tc tvs ksig constrs derivs)-  = do  { let isGadtCon (GadtC    _ _ _) = True-              isGadtCon (RecGadtC _ _ _) = True-              isGadtCon (ForallC  _ _ c) = isGadtCon c-              isGadtCon _                = False-              isGadtDecl  = all isGadtCon constrs-              isH98Decl   = all (not . isGadtCon) constrs-        ; unless (isGadtDecl || isH98Decl)-                 (failWith (text "Cannot mix GADT constructors with Haskell 98"-                        <+> text "constructors"))-        ; unless (isNothing ksig || isGadtDecl)-                 (failWith (text "Kind signatures are only allowed on GADTs"))-        ; (ctxt', tc', tvs') <- cvt_tycl_hdr ctxt tc tvs-        ; ksig' <- cvtKind `traverse` ksig-        ; cons' <- mapM cvtConstr constrs-        ; derivs' <- cvtDerivs derivs-        ; let defn = HsDataDefn { dd_ext = noExt-                                , dd_ND = DataType, dd_cType = Nothing-                                , dd_ctxt = ctxt'-                                , dd_kindSig = ksig'-                                , dd_cons = cons', dd_derivs = derivs' }-        ; returnJustL $ TyClD noExt (DataDecl-                                        { tcdDExt = noExt-                                        , tcdLName = tc', tcdTyVars = tvs'-                                        , tcdFixity = Prefix-                                        , tcdDataDefn = defn }) }--cvtDec (NewtypeD ctxt tc tvs ksig constr derivs)-  = do  { (ctxt', tc', tvs') <- cvt_tycl_hdr ctxt tc tvs-        ; ksig' <- cvtKind `traverse` ksig-        ; con' <- cvtConstr constr-        ; derivs' <- cvtDerivs derivs-        ; let defn = HsDataDefn { dd_ext = noExt-                                , dd_ND = NewType, dd_cType = Nothing-                                , dd_ctxt = ctxt'-                                , dd_kindSig = ksig'-                                , dd_cons = [con']-                                , dd_derivs = derivs' }-        ; returnJustL $ TyClD noExt (DataDecl-                                    { tcdDExt = noExt-                                    , tcdLName = tc', tcdTyVars = tvs'-                                    , tcdFixity = Prefix-                                    , tcdDataDefn = defn }) }--cvtDec (ClassD ctxt cl tvs fds decs)-  = do  { (cxt', tc', tvs') <- cvt_tycl_hdr ctxt cl tvs-        ; fds'  <- mapM cvt_fundep fds-        ; (binds', sigs', fams', ats', adts') <- cvt_ci_decs (text "a class declaration") decs-        ; unless (null adts')-            (failWith $ (text "Default data instance declarations"-                     <+> text "are not allowed:")-                   $$ (Outputable.ppr adts'))-        ; at_defs <- mapM cvt_at_def ats'-        ; returnJustL $ TyClD noExt $-          ClassDecl { tcdCExt = noExt-                    , tcdCtxt = cxt', tcdLName = tc', tcdTyVars = tvs'-                    , tcdFixity = Prefix-                    , tcdFDs = fds', tcdSigs = Hs.mkClassOpSigs sigs'-                    , tcdMeths = binds'-                    , tcdATs = fams', tcdATDefs = at_defs, tcdDocs = [] }-                              -- no docs in TH ^^-        }-  where-    cvt_at_def :: LTyFamInstDecl GhcPs -> CvtM (LTyFamDefltEqn GhcPs)-    -- Very similar to what happens in RdrHsSyn.mkClassDecl-    cvt_at_def decl = case RdrHsSyn.mkATDefault decl of-                        Right (def, _) -> return def-                        Left (_, msg) -> failWith msg--cvtDec (InstanceD o ctxt ty decs)-  = do  { let doc = text "an instance declaration"-        ; (binds', sigs', fams', ats', adts') <- cvt_ci_decs doc decs-        ; unless (null fams') (failWith (mkBadDecMsg doc fams'))-        ; ctxt' <- cvtContext ctxt-        ; (dL->L loc ty') <- cvtType ty-        ; let inst_ty' = mkHsQualTy ctxt loc ctxt' $ cL loc ty'-        ; returnJustL $ InstD noExt $ ClsInstD noExt $-          ClsInstDecl { cid_ext = noExt, cid_poly_ty = mkLHsSigType inst_ty'-                      , cid_binds = binds'-                      , cid_sigs = Hs.mkClassOpSigs sigs'-                      , cid_tyfam_insts = ats', cid_datafam_insts = adts'-                      , cid_overlap_mode = fmap (cL loc . overlap) o } }-  where-  overlap pragma =-    case pragma of-      TH.Overlaps      -> Hs.Overlaps     (SourceText "OVERLAPS")-      TH.Overlappable  -> Hs.Overlappable (SourceText "OVERLAPPABLE")-      TH.Overlapping   -> Hs.Overlapping  (SourceText "OVERLAPPING")-      TH.Incoherent    -> Hs.Incoherent   (SourceText "INCOHERENT")-----cvtDec (ForeignD ford)-  = do { ford' <- cvtForD ford-       ; returnJustL $ ForD noExt ford' }--cvtDec (DataFamilyD tc tvs kind)-  = do { (_, tc', tvs') <- cvt_tycl_hdr [] tc tvs-       ; result <- cvtMaybeKindToFamilyResultSig kind-       ; returnJustL $ TyClD noExt $ FamDecl noExt $-         FamilyDecl noExt DataFamily tc' tvs' Prefix result Nothing }--cvtDec (DataInstD ctxt bndrs tys ksig constrs derivs)-  = do { (ctxt', tc', bndrs', typats') <- cvt_datainst_hdr ctxt bndrs tys-       ; ksig' <- cvtKind `traverse` ksig-       ; cons' <- mapM cvtConstr constrs-       ; derivs' <- cvtDerivs derivs-       ; let defn = HsDataDefn { dd_ext = noExt-                               , dd_ND = DataType, dd_cType = Nothing-                               , dd_ctxt = ctxt'-                               , dd_kindSig = ksig'-                               , dd_cons = cons', dd_derivs = derivs' }--       ; returnJustL $ InstD noExt $ DataFamInstD-           { dfid_ext = noExt-           , dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $-                           FamEqn { feqn_ext = noExt-                                  , feqn_tycon = tc'-                                  , feqn_bndrs = bndrs'-                                  , feqn_pats = typats'-                                  , feqn_rhs = defn-                                  , feqn_fixity = Prefix } }}}--cvtDec (NewtypeInstD ctxt bndrs tys ksig constr derivs)-  = do { (ctxt', tc', bndrs', typats') <- cvt_datainst_hdr ctxt bndrs tys-       ; ksig' <- cvtKind `traverse` ksig-       ; con' <- cvtConstr constr-       ; derivs' <- cvtDerivs derivs-       ; let defn = HsDataDefn { dd_ext = noExt-                               , dd_ND = NewType, dd_cType = Nothing-                               , dd_ctxt = ctxt'-                               , dd_kindSig = ksig'-                               , dd_cons = [con'], dd_derivs = derivs' }-       ; returnJustL $ InstD noExt $ DataFamInstD-           { dfid_ext = noExt-           , dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $-                           FamEqn { feqn_ext = noExt-                                  , feqn_tycon = tc'-                                  , feqn_bndrs = bndrs'-                                  , feqn_pats = typats'-                                  , feqn_rhs = defn-                                  , feqn_fixity = Prefix } }}}--cvtDec (TySynInstD eqn)-  = do  { (dL->L _ eqn') <- cvtTySynEqn eqn-        ; returnJustL $ InstD noExt $ TyFamInstD-            { tfid_ext = noExt-            , tfid_inst = TyFamInstDecl { tfid_eqn = eqn' } } }--cvtDec (OpenTypeFamilyD head)-  = do { (tc', tyvars', result', injectivity') <- cvt_tyfam_head head-       ; returnJustL $ TyClD noExt $ FamDecl noExt $-         FamilyDecl noExt OpenTypeFamily tc' tyvars' Prefix result' injectivity'-       }--cvtDec (ClosedTypeFamilyD head eqns)-  = do { (tc', tyvars', result', injectivity') <- cvt_tyfam_head head-       ; eqns' <- mapM cvtTySynEqn eqns-       ; returnJustL $ TyClD noExt $ FamDecl noExt $-         FamilyDecl noExt (ClosedTypeFamily (Just eqns')) tc' tyvars' Prefix-                           result' injectivity' }--cvtDec (TH.RoleAnnotD tc roles)-  = do { tc' <- tconNameL tc-       ; let roles' = map (noLoc . cvtRole) roles-       ; returnJustL $ Hs.RoleAnnotD noExt (RoleAnnotDecl noExt tc' roles') }--cvtDec (TH.StandaloneDerivD ds cxt ty)-  = do { cxt' <- cvtContext cxt-       ; ds'  <- traverse cvtDerivStrategy ds-       ; (dL->L loc ty') <- cvtType ty-       ; let inst_ty' = mkHsQualTy cxt loc cxt' $ cL loc ty'-       ; returnJustL $ DerivD noExt $-         DerivDecl { deriv_ext =noExt-                   , deriv_strategy = ds'-                   , deriv_type = mkLHsSigWcType inst_ty'-                   , deriv_overlap_mode = Nothing } }--cvtDec (TH.DefaultSigD nm typ)-  = do { nm' <- vNameL nm-       ; ty' <- cvtType typ-       ; returnJustL $ Hs.SigD noExt-                     $ ClassOpSig noExt True [nm'] (mkLHsSigType ty')}--cvtDec (TH.PatSynD nm args dir pat)-  = do { nm'   <- cNameL nm-       ; args' <- cvtArgs args-       ; dir'  <- cvtDir nm' dir-       ; pat'  <- cvtPat pat-       ; returnJustL $ Hs.ValD noExt $ PatSynBind noExt $-           PSB noExt nm' args' pat' dir' }-  where-    cvtArgs (TH.PrefixPatSyn args) = Hs.PrefixCon <$> mapM vNameL args-    cvtArgs (TH.InfixPatSyn a1 a2) = Hs.InfixCon <$> vNameL a1 <*> vNameL a2-    cvtArgs (TH.RecordPatSyn sels)-      = do { sels' <- mapM vNameL sels-           ; vars' <- mapM (vNameL . mkNameS . nameBase) sels-           ; return $ Hs.RecCon $ zipWith RecordPatSynField sels' vars' }--    cvtDir _ Unidir          = return Unidirectional-    cvtDir _ ImplBidir       = return ImplicitBidirectional-    cvtDir n (ExplBidir cls) =-      do { ms <- mapM (cvtClause (mkPrefixFunRhs n)) cls-         ; return $ ExplicitBidirectional $ mkMatchGroup FromSource ms }--cvtDec (TH.PatSynSigD nm ty)-  = do { nm' <- cNameL nm-       ; ty' <- cvtPatSynSigTy ty-       ; returnJustL $ Hs.SigD noExt $ PatSynSig noExt [nm'] (mkLHsSigType ty')}---- Implicit parameter bindings are handled in cvtLocalDecs and--- cvtImplicitParamBind. They are not allowed in any other scope, so--- reaching this case indicates an error.-cvtDec (TH.ImplicitParamBindD _ _)-  = failWith (text "Implicit parameter binding only allowed in let or where")-------------------cvtTySynEqn :: TySynEqn -> CvtM (LTyFamInstEqn GhcPs)-cvtTySynEqn (TySynEqn mb_bndrs lhs rhs)-  = do { mb_bndrs' <- traverse (mapM cvt_tv) mb_bndrs-       ; (head_ty, args) <- split_ty_app lhs-       ; case head_ty of-           ConT nm -> do { nm' <- tconNameL nm-                         ; rhs' <- cvtType rhs-                         ; let args' = map wrap_tyarg args-                         ; returnL $ mkHsImplicitBndrs-                            $ FamEqn { feqn_ext    = noExt-                                     , feqn_tycon  = nm'-                                     , feqn_bndrs  = mb_bndrs'-                                     , feqn_pats   = args'-                                     , feqn_fixity = Prefix-                                     , feqn_rhs    = rhs' } }-           InfixT t1 nm t2 -> do { nm' <- tconNameL nm-                                 ; args' <- mapM cvtType [t1,t2]-                                 ; rhs' <- cvtType rhs-                                 ; returnL $ mkHsImplicitBndrs-                                      $ FamEqn { feqn_ext    = noExt-                                               , feqn_tycon  = nm'-                                               , feqn_bndrs  = mb_bndrs'-                                               , feqn_pats   =-                                                (map HsValArg args') ++ args-                                               , feqn_fixity = Hs.Infix-                                               , feqn_rhs    = rhs' } }-           _ -> failWith $ text "Invalid type family instance LHS:"-                          <+> text (show lhs)-        }-------------------cvt_ci_decs :: MsgDoc -> [TH.Dec]-            -> CvtM (LHsBinds GhcPs,-                     [LSig GhcPs],-                     [LFamilyDecl GhcPs],-                     [LTyFamInstDecl GhcPs],-                     [LDataFamInstDecl GhcPs])--- Convert the declarations inside a class or instance decl--- ie signatures, bindings, and associated types-cvt_ci_decs doc decs-  = do  { decs' <- cvtDecs decs-        ; let (ats', bind_sig_decs') = partitionWith is_tyfam_inst decs'-        ; let (adts', no_ats')       = partitionWith is_datafam_inst bind_sig_decs'-        ; let (sigs', prob_binds')   = partitionWith is_sig no_ats'-        ; let (binds', prob_fams')   = partitionWith is_bind prob_binds'-        ; let (fams', bads)          = partitionWith is_fam_decl prob_fams'-        ; unless (null bads) (failWith (mkBadDecMsg doc bads))-          --We use FromSource as the origin of the bind-          -- because the TH declaration is user-written-        ; return (listToBag binds', sigs', fams', ats', adts') }-------------------cvt_tycl_hdr :: TH.Cxt -> TH.Name -> [TH.TyVarBndr]-             -> CvtM ( LHsContext GhcPs-                     , Located RdrName-                     , LHsQTyVars GhcPs)-cvt_tycl_hdr cxt tc tvs-  = do { cxt' <- cvtContext cxt-       ; tc'  <- tconNameL tc-       ; tvs' <- cvtTvs tvs-       ; return (cxt', tc', tvs')-       }--cvt_datainst_hdr :: TH.Cxt -> Maybe [TH.TyVarBndr] -> TH.Type-               -> CvtM ( LHsContext GhcPs-                       , Located RdrName-                       , Maybe [LHsTyVarBndr GhcPs]-                       , HsTyPats GhcPs)-cvt_datainst_hdr cxt bndrs tys-  = do { cxt' <- cvtContext cxt-       ; bndrs' <- traverse (mapM cvt_tv) bndrs-       ; (head_ty, args) <- split_ty_app tys-       ; case head_ty of-          ConT nm -> do { nm' <- tconNameL nm-                        ; let args' = map wrap_tyarg args-                        ; return (cxt', nm', bndrs', args') }-          InfixT t1 nm t2 -> do { nm' <- tconNameL nm-                                ; args' <- mapM cvtType [t1,t2]-                                ; return (cxt', nm', bndrs',-                                         ((map HsValArg args') ++ args)) }-          _ -> failWith $ text "Invalid type instance header:"-                          <+> text (show tys) }-------------------cvt_tyfam_head :: TypeFamilyHead-               -> CvtM ( Located RdrName-                       , LHsQTyVars GhcPs-                       , Hs.LFamilyResultSig GhcPs-                       , Maybe (Hs.LInjectivityAnn GhcPs))--cvt_tyfam_head (TypeFamilyHead tc tyvars result injectivity)-  = do {(_, tc', tyvars') <- cvt_tycl_hdr [] tc tyvars-       ; result' <- cvtFamilyResultSig result-       ; injectivity' <- traverse cvtInjectivityAnnotation injectivity-       ; return (tc', tyvars', result', injectivity') }------------------------------------------------------------------------              Partitioning declarations----------------------------------------------------------------------is_fam_decl :: LHsDecl GhcPs -> Either (LFamilyDecl GhcPs) (LHsDecl GhcPs)-is_fam_decl (dL->L loc (TyClD _ (FamDecl { tcdFam = d }))) = Left (cL loc d)-is_fam_decl decl = Right decl--is_tyfam_inst :: LHsDecl GhcPs -> Either (LTyFamInstDecl GhcPs) (LHsDecl GhcPs)-is_tyfam_inst (dL->L loc (Hs.InstD _ (TyFamInstD { tfid_inst = d })))-  = Left (cL loc d)-is_tyfam_inst decl-  = Right decl--is_datafam_inst :: LHsDecl GhcPs-                -> Either (LDataFamInstDecl GhcPs) (LHsDecl GhcPs)-is_datafam_inst (dL->L loc (Hs.InstD  _ (DataFamInstD { dfid_inst = d })))-  = Left (cL loc d)-is_datafam_inst decl-  = Right decl--is_sig :: LHsDecl GhcPs -> Either (LSig GhcPs) (LHsDecl GhcPs)-is_sig (dL->L loc (Hs.SigD _ sig)) = Left (cL loc sig)-is_sig decl                        = Right decl--is_bind :: LHsDecl GhcPs -> Either (LHsBind GhcPs) (LHsDecl GhcPs)-is_bind (dL->L loc (Hs.ValD _ bind)) = Left (cL loc bind)-is_bind decl                         = Right decl--is_ip_bind :: TH.Dec -> Either (String, TH.Exp) TH.Dec-is_ip_bind (TH.ImplicitParamBindD n e) = Left (n, e)-is_ip_bind decl             = Right decl--mkBadDecMsg :: Outputable a => MsgDoc -> [a] -> MsgDoc-mkBadDecMsg doc bads-  = sep [ text "Illegal declaration(s) in" <+> doc <> colon-        , nest 2 (vcat (map Outputable.ppr bads)) ]--------------------------------------------------------      Data types------------------------------------------------------cvtConstr :: TH.Con -> CvtM (LConDecl GhcPs)--cvtConstr (NormalC c strtys)-  = do  { c'   <- cNameL c-        ; tys' <- mapM cvt_arg strtys-        ; returnL $ mkConDeclH98 c' Nothing Nothing (PrefixCon tys') }--cvtConstr (RecC c varstrtys)-  = do  { c'    <- cNameL c-        ; args' <- mapM cvt_id_arg varstrtys-        ; returnL $ mkConDeclH98 c' Nothing Nothing-                                   (RecCon (noLoc args')) }--cvtConstr (InfixC st1 c st2)-  = do  { c'   <- cNameL c-        ; st1' <- cvt_arg st1-        ; st2' <- cvt_arg st2-        ; returnL $ mkConDeclH98 c' Nothing Nothing (InfixCon st1' st2') }--cvtConstr (ForallC tvs ctxt con)-  = do  { tvs'      <- cvtTvs tvs-        ; ctxt'     <- cvtContext ctxt-        ; (dL->L _ con')  <- cvtConstr con-        ; returnL $ add_forall tvs' ctxt' con' }-  where-    add_cxt lcxt         Nothing           = Just lcxt-    add_cxt (dL->L loc cxt1) (Just (dL->L _ cxt2))-      = Just (cL loc (cxt1 ++ cxt2))--    add_forall tvs' cxt' con@(ConDeclGADT { con_qvars = qvars, con_mb_cxt = cxt })-      = con { con_forall = noLoc $ not (null all_tvs)-            , con_qvars  = mkHsQTvs all_tvs-            , con_mb_cxt = add_cxt cxt' cxt }-      where-        all_tvs = hsQTvExplicit tvs' ++ hsQTvExplicit qvars--    add_forall tvs' cxt' con@(ConDeclH98 { con_ex_tvs = ex_tvs, con_mb_cxt = cxt })-      = con { con_forall = noLoc $ not (null all_tvs)-            , con_ex_tvs = all_tvs-            , con_mb_cxt = add_cxt cxt' cxt }-      where-        all_tvs = hsQTvExplicit tvs' ++ ex_tvs--    add_forall _ _ (XConDecl _) = panic "cvtConstr"--cvtConstr (GadtC c strtys ty)-  = do  { c'      <- mapM cNameL c-        ; args    <- mapM cvt_arg strtys-        ; (dL->L _ ty') <- cvtType ty-        ; c_ty    <- mk_arr_apps args ty'-        ; returnL $ fst $ mkGadtDecl c' c_ty}--cvtConstr (RecGadtC c varstrtys ty)-  = do  { c'       <- mapM cNameL c-        ; ty'      <- cvtType ty-        ; rec_flds <- mapM cvt_id_arg varstrtys-        ; let rec_ty = noLoc (HsFunTy noExt-                                           (noLoc $ HsRecTy noExt rec_flds) ty')-        ; returnL $ fst $ mkGadtDecl c' rec_ty }--cvtSrcUnpackedness :: TH.SourceUnpackedness -> SrcUnpackedness-cvtSrcUnpackedness NoSourceUnpackedness = NoSrcUnpack-cvtSrcUnpackedness SourceNoUnpack       = SrcNoUnpack-cvtSrcUnpackedness SourceUnpack         = SrcUnpack--cvtSrcStrictness :: TH.SourceStrictness -> SrcStrictness-cvtSrcStrictness NoSourceStrictness = NoSrcStrict-cvtSrcStrictness SourceLazy         = SrcLazy-cvtSrcStrictness SourceStrict       = SrcStrict--cvt_arg :: (TH.Bang, TH.Type) -> CvtM (LHsType GhcPs)-cvt_arg (Bang su ss, ty)-  = do { ty'' <- cvtType ty-       ; let ty' = parenthesizeHsType appPrec ty''-             su' = cvtSrcUnpackedness su-             ss' = cvtSrcStrictness ss-       ; returnL $ HsBangTy noExt (HsSrcBang NoSourceText su' ss') ty' }--cvt_id_arg :: (TH.Name, TH.Bang, TH.Type) -> CvtM (LConDeclField GhcPs)-cvt_id_arg (i, str, ty)-  = do  { (dL->L li i') <- vNameL i-        ; ty' <- cvt_arg (str,ty)-        ; return $ noLoc (ConDeclField-                          { cd_fld_ext = noExt-                          , cd_fld_names-                              = [cL li $ FieldOcc noExt (cL li i')]-                          , cd_fld_type =  ty'-                          , cd_fld_doc = Nothing}) }--cvtDerivs :: [TH.DerivClause] -> CvtM (HsDeriving GhcPs)-cvtDerivs cs = do { cs' <- mapM cvtDerivClause cs-                  ; returnL cs' }--cvt_fundep :: FunDep -> CvtM (LHsFunDep GhcPs)-cvt_fundep (FunDep xs ys) = do { xs' <- mapM tNameL xs-                               ; ys' <- mapM tNameL ys-                               ; returnL (xs', ys') }------------------------------------------------      Foreign declarations---------------------------------------------cvtForD :: Foreign -> CvtM (ForeignDecl GhcPs)-cvtForD (ImportF callconv safety from nm ty)-  -- the prim and javascript calling conventions do not support headers-  -- and are inserted verbatim, analogous to mkImport in RdrHsSyn-  | callconv == TH.Prim || callconv == TH.JavaScript-  = mk_imp (CImport (noLoc (cvt_conv callconv)) (noLoc safety') Nothing-                    (CFunction (StaticTarget (SourceText from)-                                             (mkFastString from) Nothing-                                             True))-                    (noLoc $ quotedSourceText from))-  | Just impspec <- parseCImport (noLoc (cvt_conv callconv)) (noLoc safety')-                                 (mkFastString (TH.nameBase nm))-                                 from (noLoc $ quotedSourceText from)-  = mk_imp impspec-  | otherwise-  = failWith $ text (show from) <+> text "is not a valid ccall impent"-  where-    mk_imp impspec-      = do { nm' <- vNameL nm-           ; ty' <- cvtType ty-           ; return (ForeignImport { fd_i_ext = noExt-                                   , fd_name = nm'-                                   , fd_sig_ty = mkLHsSigType ty'-                                   , fd_fi = impspec })-           }-    safety' = case safety of-                     Unsafe     -> PlayRisky-                     Safe       -> PlaySafe-                     Interruptible -> PlayInterruptible--cvtForD (ExportF callconv as nm ty)-  = do  { nm' <- vNameL nm-        ; ty' <- cvtType ty-        ; let e = CExport (noLoc (CExportStatic (SourceText as)-                                                (mkFastString as)-                                                (cvt_conv callconv)))-                                                (noLoc (SourceText as))-        ; return $ ForeignExport { fd_e_ext = noExt-                                 , fd_name = nm'-                                 , fd_sig_ty = mkLHsSigType ty'-                                 , fd_fe = e } }--cvt_conv :: TH.Callconv -> CCallConv-cvt_conv TH.CCall      = CCallConv-cvt_conv TH.StdCall    = StdCallConv-cvt_conv TH.CApi       = CApiConv-cvt_conv TH.Prim       = PrimCallConv-cvt_conv TH.JavaScript = JavaScriptCallConv-----------------------------------------------              Pragmas---------------------------------------------cvtPragmaD :: Pragma -> CvtM (Maybe (LHsDecl GhcPs))-cvtPragmaD (InlineP nm inline rm phases)-  = do { nm' <- vNameL nm-       ; let dflt = dfltActivation inline-       ; let src TH.NoInline  = "{-# NOINLINE"-             src TH.Inline    = "{-# INLINE"-             src TH.Inlinable = "{-# INLINABLE"-       ; let ip   = InlinePragma { inl_src    = SourceText $ src inline-                                 , inl_inline = cvtInline inline-                                 , inl_rule   = cvtRuleMatch rm-                                 , inl_act    = cvtPhases phases dflt-                                 , inl_sat    = Nothing }-       ; returnJustL $ Hs.SigD noExt $ InlineSig noExt nm' ip }--cvtPragmaD (SpecialiseP nm ty inline phases)-  = do { nm' <- vNameL nm-       ; ty' <- cvtType ty-       ; let src TH.NoInline  = "{-# SPECIALISE NOINLINE"-             src TH.Inline    = "{-# SPECIALISE INLINE"-             src TH.Inlinable = "{-# SPECIALISE INLINE"-       ; let (inline', dflt,srcText) = case inline of-               Just inline1 -> (cvtInline inline1, dfltActivation inline1,-                                src inline1)-               Nothing      -> (NoUserInline,   AlwaysActive,-                                "{-# SPECIALISE")-       ; let ip = InlinePragma { inl_src    = SourceText srcText-                               , inl_inline = inline'-                               , inl_rule   = Hs.FunLike-                               , inl_act    = cvtPhases phases dflt-                               , inl_sat    = Nothing }-       ; returnJustL $ Hs.SigD noExt $ SpecSig noExt nm' [mkLHsSigType ty'] ip }--cvtPragmaD (SpecialiseInstP ty)-  = do { ty' <- cvtType ty-       ; returnJustL $ Hs.SigD noExt $-         SpecInstSig noExt (SourceText "{-# SPECIALISE") (mkLHsSigType ty') }--cvtPragmaD (RuleP nm ty_bndrs tm_bndrs lhs rhs phases)-  = do { let nm' = mkFastString nm-       ; let act = cvtPhases phases AlwaysActive-       ; ty_bndrs' <- traverse (mapM cvt_tv) ty_bndrs-       ; tm_bndrs' <- mapM cvtRuleBndr tm_bndrs-       ; lhs'   <- cvtl lhs-       ; rhs'   <- cvtl rhs-       ; returnJustL $ Hs.RuleD noExt-            $ HsRules { rds_ext = noExt-                      , rds_src = SourceText "{-# RULES"-                      , rds_rules = [noLoc $-                          HsRule { rd_ext  = noExt-                                 , rd_name = (noLoc (quotedSourceText nm,nm'))-                                 , rd_act  = act-                                 , rd_tyvs = ty_bndrs'-                                 , rd_tmvs = tm_bndrs'-                                 , rd_lhs  = lhs'-                                 , rd_rhs  = rhs' }] }--          }--cvtPragmaD (AnnP target exp)-  = do { exp' <- cvtl exp-       ; target' <- case target of-         ModuleAnnotation  -> return ModuleAnnProvenance-         TypeAnnotation n  -> do-           n' <- tconName n-           return (TypeAnnProvenance  (noLoc n'))-         ValueAnnotation n -> do-           n' <- vcName n-           return (ValueAnnProvenance (noLoc n'))-       ; returnJustL $ Hs.AnnD noExt-                     $ HsAnnotation noExt (SourceText "{-# ANN") target' exp'-       }--cvtPragmaD (LineP line file)-  = do { setL (srcLocSpan (mkSrcLoc (fsLit file) line 1))-       ; return Nothing-       }-cvtPragmaD (CompleteP cls mty)-  = do { cls' <- noLoc <$> mapM cNameL cls-       ; mty'  <- traverse tconNameL mty-       ; returnJustL $ Hs.SigD noExt-                   $ CompleteMatchSig noExt NoSourceText cls' mty' }--dfltActivation :: TH.Inline -> Activation-dfltActivation TH.NoInline = NeverActive-dfltActivation _           = AlwaysActive--cvtInline :: TH.Inline -> Hs.InlineSpec-cvtInline TH.NoInline  = Hs.NoInline-cvtInline TH.Inline    = Hs.Inline-cvtInline TH.Inlinable = Hs.Inlinable--cvtRuleMatch :: TH.RuleMatch -> RuleMatchInfo-cvtRuleMatch TH.ConLike = Hs.ConLike-cvtRuleMatch TH.FunLike = Hs.FunLike--cvtPhases :: TH.Phases -> Activation -> Activation-cvtPhases AllPhases       dflt = dflt-cvtPhases (FromPhase i)   _    = ActiveAfter NoSourceText i-cvtPhases (BeforePhase i) _    = ActiveBefore NoSourceText i--cvtRuleBndr :: TH.RuleBndr -> CvtM (Hs.LRuleBndr GhcPs)-cvtRuleBndr (RuleVar n)-  = do { n' <- vNameL n-       ; return $ noLoc $ Hs.RuleBndr noExt n' }-cvtRuleBndr (TypedRuleVar n ty)-  = do { n'  <- vNameL n-       ; ty' <- cvtType ty-       ; return $ noLoc $ Hs.RuleBndrSig noExt n' $ mkLHsSigWcType ty' }--------------------------------------------------------              Declarations------------------------------------------------------cvtLocalDecs :: MsgDoc -> [TH.Dec] -> CvtM (HsLocalBinds GhcPs)-cvtLocalDecs doc ds-  = case partitionWith is_ip_bind ds of-      ([], []) -> return (EmptyLocalBinds noExt)-      ([], _) -> do-        ds' <- cvtDecs ds-        let (binds, prob_sigs) = partitionWith is_bind ds'-        let (sigs, bads) = partitionWith is_sig prob_sigs-        unless (null bads) (failWith (mkBadDecMsg doc bads))-        return (HsValBinds noExt (ValBinds noExt (listToBag binds) sigs))-      (ip_binds, []) -> do-        binds <- mapM (uncurry cvtImplicitParamBind) ip_binds-        return (HsIPBinds noExt (IPBinds noExt binds))-      ((_:_), (_:_)) ->-        failWith (text "Implicit parameters mixed with other bindings")--cvtClause :: HsMatchContext RdrName-          -> TH.Clause -> CvtM (Hs.LMatch GhcPs (LHsExpr GhcPs))-cvtClause ctxt (Clause ps body wheres)-  = do  { ps' <- cvtPats ps-        ; let pps = map (parenthesizePat appPrec) ps'-        ; g'  <- cvtGuard body-        ; ds' <- cvtLocalDecs (text "a where clause") wheres-        ; returnL $ Hs.Match noExt ctxt pps (GRHSs noExt g' (noLoc ds')) }--cvtImplicitParamBind :: String -> TH.Exp -> CvtM (LIPBind GhcPs)-cvtImplicitParamBind n e = do-    n' <- wrapL (ipName n)-    e' <- cvtl e-    returnL (IPBind noExt (Left n') e')------------------------------------------------------------------------              Expressions----------------------------------------------------------------------cvtl :: TH.Exp -> CvtM (LHsExpr GhcPs)-cvtl e = wrapL (cvt e)-  where-    cvt (VarE s)        = do { s' <- vName s; return $ HsVar noExt (noLoc s') }-    cvt (ConE s)        = do { s' <- cName s; return $ HsVar noExt (noLoc s') }-    cvt (LitE l)-      | overloadedLit l = go cvtOverLit (HsOverLit noExt)-                             (hsOverLitNeedsParens appPrec)-      | otherwise       = go cvtLit (HsLit noExt)-                             (hsLitNeedsParens appPrec)-      where-        go :: (Lit -> CvtM (l GhcPs))-           -> (l GhcPs -> HsExpr GhcPs)-           -> (l GhcPs -> Bool)-           -> CvtM (HsExpr GhcPs)-        go cvt_lit mk_expr is_compound_lit = do-          l' <- cvt_lit l-          let e' = mk_expr l'-          return $ if is_compound_lit l' then HsPar noExt (noLoc e') else e'-    cvt (AppE x@(LamE _ _) y) = do { x' <- cvtl x; y' <- cvtl y-                                   ; return $ HsApp noExt (mkLHsPar x')-                                                          (mkLHsPar y')}-    cvt (AppE x y)            = do { x' <- cvtl x; y' <- cvtl y-                                   ; return $ HsApp noExt (mkLHsPar x')-                                                          (mkLHsPar y')}-    cvt (AppTypeE e t) = do { e' <- cvtl e-                            ; t' <- cvtType t-                            ; let tp = parenthesizeHsType appPrec t'-                            ; return $ HsAppType noExt e'-                                     $ mkHsWildCardBndrs tp }-    cvt (LamE [] e)    = cvt e -- Degenerate case. We convert the body as its-                               -- own expression to avoid pretty-printing-                               -- oddities that can result from zero-argument-                               -- lambda expressions. See #13856.-    cvt (LamE ps e)    = do { ps' <- cvtPats ps; e' <- cvtl e-                            ; let pats = map (parenthesizePat appPrec) ps'-                            ; return $ HsLam noExt (mkMatchGroup FromSource-                                             [mkSimpleMatch LambdaExpr-                                             pats e'])}-    cvt (LamCaseE ms)  = do { ms' <- mapM (cvtMatch CaseAlt) ms-                            ; return $ HsLamCase noExt-                                                   (mkMatchGroup FromSource ms')-                            }-    cvt (TupE [e])     = do { e' <- cvtl e; return $ HsPar noExt e' }-                                 -- Note [Dropping constructors]-                                 -- Singleton tuples treated like nothing (just parens)-    cvt (TupE es)      = do { es' <- mapM cvtl es-                            ; return $ ExplicitTuple noExt-                                             (map (noLoc . (Present noExt)) es')-                                                                         Boxed }-    cvt (UnboxedTupE es)      = do { es' <- mapM cvtl es-                                   ; return $ ExplicitTuple noExt-                                           (map (noLoc . (Present noExt)) es')-                                                                       Unboxed }-    cvt (UnboxedSumE e alt arity) = do { e' <- cvtl e-                                       ; unboxedSumChecks alt arity-                                       ; return $ ExplicitSum noExt-                                                                   alt arity e'}-    cvt (CondE x y z)  = do { x' <- cvtl x; y' <- cvtl y; z' <- cvtl z;-                            ; return $ HsIf noExt (Just noSyntaxExpr) x' y' z' }-    cvt (MultiIfE alts)-      | null alts      = failWith (text "Multi-way if-expression with no alternatives")-      | otherwise      = do { alts' <- mapM cvtpair alts-                            ; return $ HsMultiIf noExt alts' }-    cvt (LetE ds e)    = do { ds' <- cvtLocalDecs (text "a let expression") ds-                            ; e' <- cvtl e; return $ HsLet noExt (noLoc ds') e'}-    cvt (CaseE e ms)   = do { e' <- cvtl e; ms' <- mapM (cvtMatch CaseAlt) ms-                            ; return $ HsCase noExt e'-                                                 (mkMatchGroup FromSource ms') }-    cvt (DoE ss)       = cvtHsDo DoExpr ss-    cvt (MDoE ss)      = cvtHsDo MDoExpr ss-    cvt (CompE ss)     = cvtHsDo ListComp ss-    cvt (ArithSeqE dd) = do { dd' <- cvtDD dd-                            ; return $ ArithSeq noExt Nothing dd' }-    cvt (ListE xs)-      | Just s <- allCharLs xs       = do { l' <- cvtLit (StringL s)-                                          ; return (HsLit noExt l') }-             -- Note [Converting strings]-      | otherwise       = do { xs' <- mapM cvtl xs-                             ; return $ ExplicitList noExt Nothing xs'-                             }--    -- Infix expressions-    cvt (InfixE (Just x) s (Just y)) =-      do { x' <- cvtl x-         ; s' <- cvtl s-         ; y' <- cvtl y-         ; let px = parenthesizeHsExpr opPrec x'-               py = parenthesizeHsExpr opPrec y'-         ; wrapParL (HsPar noExt)-           $ OpApp noExt px s' py }-           -- Parenthesise both arguments and result,-           -- to ensure this operator application does-           -- does not get re-associated-           -- See Note [Operator association]-    cvt (InfixE Nothing  s (Just y)) = do { s' <- cvtl s; y' <- cvtl y-                                          ; wrapParL (HsPar noExt) $-                                                          SectionR noExt s' y' }-                                            -- See Note [Sections in HsSyn] in HsExpr-    cvt (InfixE (Just x) s Nothing ) = do { x' <- cvtl x; s' <- cvtl s-                                          ; wrapParL (HsPar noExt) $-                                                          SectionL noExt x' s' }--    cvt (InfixE Nothing  s Nothing ) = do { s' <- cvtl s-                                          ; return $ HsPar noExt s' }-                                       -- Can I indicate this is an infix thing?-                                       -- Note [Dropping constructors]--    cvt (UInfixE x s y)  = do { x' <- cvtl x-                              ; let x'' = case unLoc x' of-                                            OpApp {} -> x'-                                            _ -> mkLHsPar x'-                              ; cvtOpApp x'' s y } --  Note [Converting UInfix]--    cvt (ParensE e)      = do { e' <- cvtl e; return $ HsPar noExt e' }-    cvt (SigE e t)       = do { e' <- cvtl e; t' <- cvtType t-                              ; let pe = parenthesizeHsExpr sigPrec e'-                              ; return $ ExprWithTySig noExt pe (mkLHsSigWcType t') }-    cvt (RecConE c flds) = do { c' <- cNameL c-                              ; flds' <- mapM (cvtFld (mkFieldOcc . noLoc)) flds-                              ; return $ mkRdrRecordCon c' (HsRecFields flds' Nothing) }-    cvt (RecUpdE e flds) = do { e' <- cvtl e-                              ; flds'-                                  <- mapM (cvtFld (mkAmbiguousFieldOcc . noLoc))-                                           flds-                              ; return $ mkRdrRecordUpd e' flds' }-    cvt (StaticE e)      = fmap (HsStatic noExt) $ cvtl e-    cvt (UnboundVarE s)  = do -- Use of 'vcName' here instead of 'vName' is-                              -- important, because UnboundVarE may contain-                              -- constructor names - see #14627.-                              { s' <- vcName s-                              ; return $ HsVar noExt (noLoc s') }-    cvt (LabelE s)       = do { return $ HsOverLabel noExt Nothing (fsLit s) }-    cvt (ImplicitParamVarE n) = do { n' <- ipName n; return $ HsIPVar noExt n' }--{- Note [Dropping constructors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we drop constructors from the input (for instance, when we encounter @TupE [e]@)-we must insert parentheses around the argument. Otherwise, @UInfix@ constructors in @e@-could meet @UInfix@ constructors containing the @TupE [e]@. For example:--  UInfixE x * (TupE [UInfixE y + z])--If we drop the singleton tuple but don't insert parentheses, the @UInfixE@s would meet-and the above expression would be reassociated to--  OpApp (OpApp x * y) + z--which we don't want.--}--cvtFld :: (RdrName -> t) -> (TH.Name, TH.Exp)-       -> CvtM (LHsRecField' t (LHsExpr GhcPs))-cvtFld f (v,e)-  = do  { v' <- vNameL v; e' <- cvtl e-        ; return (noLoc $ HsRecField { hsRecFieldLbl = fmap f v'-                                     , hsRecFieldArg = e'-                                     , hsRecPun      = False}) }--cvtDD :: Range -> CvtM (ArithSeqInfo GhcPs)-cvtDD (FromR x)           = do { x' <- cvtl x; return $ From x' }-cvtDD (FromThenR x y)     = do { x' <- cvtl x; y' <- cvtl y; return $ FromThen x' y' }-cvtDD (FromToR x y)       = do { x' <- cvtl x; y' <- cvtl y; return $ FromTo x' y' }-cvtDD (FromThenToR x y z) = do { x' <- cvtl x; y' <- cvtl y; z' <- cvtl z; return $ FromThenTo x' y' z' }--{- Note [Operator assocation]-We must be quite careful about adding parens:-  * Infix (UInfix ...) op arg      Needs parens round the first arg-  * Infix (Infix ...) op arg       Needs parens round the first arg-  * UInfix (UInfix ...) op arg     No parens for first arg-  * UInfix (Infix ...) op arg      Needs parens round first arg---Note [Converting UInfix]-~~~~~~~~~~~~~~~~~~~~~~~~-When converting @UInfixE@, @UInfixP@, and @UInfixT@ values, we want to readjust-the trees to reflect the fixities of the underlying operators:--  UInfixE x * (UInfixE y + z) ---> (x * y) + z--This is done by the renamer (see @mkOppAppRn@, @mkConOppPatRn@, and-@mkHsOpTyRn@ in RnTypes), which expects that the input will be completely-right-biased for types and left-biased for everything else. So we left-bias the-trees of @UInfixP@ and @UInfixE@ and right-bias the trees of @UInfixT@.--Sample input:--  UInfixE-   (UInfixE x op1 y)-   op2-   (UInfixE z op3 w)--Sample output:--  OpApp-    (OpApp-      (OpApp x op1 y)-      op2-      z)-    op3-    w--The functions @cvtOpApp@, @cvtOpAppP@, and @cvtOpAppT@ are responsible for this-biasing.--}--{- | @cvtOpApp x op y@ converts @op@ and @y@ and produces the operator application @x `op` y@.-The produced tree of infix expressions will be left-biased, provided @x@ is.--We can see that @cvtOpApp@ is correct as follows. The inductive hypothesis-is that @cvtOpApp x op y@ is left-biased, provided @x@ is. It is clear that-this holds for both branches (of @cvtOpApp@), provided we assume it holds for-the recursive calls to @cvtOpApp@.--When we call @cvtOpApp@ from @cvtl@, the first argument will always be left-biased-since we have already run @cvtl@ on it.--}-cvtOpApp :: LHsExpr GhcPs -> TH.Exp -> TH.Exp -> CvtM (HsExpr GhcPs)-cvtOpApp x op1 (UInfixE y op2 z)-  = do { l <- wrapL $ cvtOpApp x op1 y-       ; cvtOpApp l op2 z }-cvtOpApp x op y-  = do { op' <- cvtl op-       ; y' <- cvtl y-       ; return (OpApp noExt x op' y') }------------------------------------------      Do notation and statements----------------------------------------cvtHsDo :: HsStmtContext Name.Name -> [TH.Stmt] -> CvtM (HsExpr GhcPs)-cvtHsDo do_or_lc stmts-  | null stmts = failWith (text "Empty stmt list in do-block")-  | otherwise-  = do  { stmts' <- cvtStmts stmts-        ; let Just (stmts'', last') = snocView stmts'--        ; last'' <- case last' of-                    (dL->L loc (BodyStmt _ body _ _))-                      -> return (cL loc (mkLastStmt body))-                    _ -> failWith (bad_last last')--        ; return $ HsDo noExt do_or_lc (noLoc (stmts'' ++ [last''])) }-  where-    bad_last stmt = vcat [ text "Illegal last statement of" <+> pprAStmtContext do_or_lc <> colon-                         , nest 2 $ Outputable.ppr stmt-                         , text "(It should be an expression.)" ]--cvtStmts :: [TH.Stmt] -> CvtM [Hs.LStmt GhcPs (LHsExpr GhcPs)]-cvtStmts = mapM cvtStmt--cvtStmt :: TH.Stmt -> CvtM (Hs.LStmt GhcPs (LHsExpr GhcPs))-cvtStmt (NoBindS e)    = do { e' <- cvtl e; returnL $ mkBodyStmt e' }-cvtStmt (TH.BindS p e) = do { p' <- cvtPat p; e' <- cvtl e; returnL $ mkBindStmt p' e' }-cvtStmt (TH.LetS ds)   = do { ds' <- cvtLocalDecs (text "a let binding") ds-                            ; returnL $ LetStmt noExt (noLoc ds') }-cvtStmt (TH.ParS dss)  = do { dss' <- mapM cvt_one dss-                            ; returnL $ ParStmt noExt dss' noExpr noSyntaxExpr }-  where-    cvt_one ds = do { ds' <- cvtStmts ds-                    ; return (ParStmtBlock noExt ds' undefined noSyntaxExpr) }-cvtStmt (TH.RecS ss) = do { ss' <- mapM cvtStmt ss; returnL (mkRecStmt ss') }--cvtMatch :: HsMatchContext RdrName-         -> TH.Match -> CvtM (Hs.LMatch GhcPs (LHsExpr GhcPs))-cvtMatch ctxt (TH.Match p body decs)-  = do  { p' <- cvtPat p-        ; let lp = case p' of-                     (dL->L loc SigPat{}) -> cL loc (ParPat NoExt p') -- #14875-                     _                    -> p'-        ; g' <- cvtGuard body-        ; decs' <- cvtLocalDecs (text "a where clause") decs-        ; returnL $ Hs.Match noExt ctxt [lp] (GRHSs noExt g' (noLoc decs')) }--cvtGuard :: TH.Body -> CvtM [LGRHS GhcPs (LHsExpr GhcPs)]-cvtGuard (GuardedB pairs) = mapM cvtpair pairs-cvtGuard (NormalB e)      = do { e' <- cvtl e-                               ; g' <- returnL $ GRHS noExt [] e'; return [g'] }--cvtpair :: (TH.Guard, TH.Exp) -> CvtM (LGRHS GhcPs (LHsExpr GhcPs))-cvtpair (NormalG ge,rhs) = do { ge' <- cvtl ge; rhs' <- cvtl rhs-                              ; g' <- returnL $ mkBodyStmt ge'-                              ; returnL $ GRHS noExt [g'] rhs' }-cvtpair (PatG gs,rhs)    = do { gs' <- cvtStmts gs; rhs' <- cvtl rhs-                              ; returnL $ GRHS noExt gs' rhs' }--cvtOverLit :: Lit -> CvtM (HsOverLit GhcPs)-cvtOverLit (IntegerL i)-  = do { force i; return $ mkHsIntegral   (mkIntegralLit i) }-cvtOverLit (RationalL r)-  = do { force r; return $ mkHsFractional (mkFractionalLit r) }-cvtOverLit (StringL s)-  = do { let { s' = mkFastString s }-       ; force s'-       ; return $ mkHsIsString (quotedSourceText s) s'-       }-cvtOverLit _ = panic "Convert.cvtOverLit: Unexpected overloaded literal"--- An Integer is like an (overloaded) '3' in a Haskell source program--- Similarly 3.5 for fractionals--{- Note [Converting strings]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If we get (ListE [CharL 'x', CharL 'y']) we'd like to convert to-a string literal for "xy".  Of course, we might hope to get-(LitE (StringL "xy")), but not always, and allCharLs fails quickly-if it isn't a literal string--}--allCharLs :: [TH.Exp] -> Maybe String--- Note [Converting strings]--- NB: only fire up this setup for a non-empty list, else---     there's a danger of returning "" for [] :: [Int]!-allCharLs xs-  = case xs of-      LitE (CharL c) : ys -> go [c] ys-      _                   -> Nothing-  where-    go cs []                    = Just (reverse cs)-    go cs (LitE (CharL c) : ys) = go (c:cs) ys-    go _  _                     = Nothing--cvtLit :: Lit -> CvtM (HsLit GhcPs)-cvtLit (IntPrimL i)    = do { force i; return $ HsIntPrim NoSourceText i }-cvtLit (WordPrimL w)   = do { force w; return $ HsWordPrim NoSourceText w }-cvtLit (FloatPrimL f)-  = do { force f; return $ HsFloatPrim noExt (mkFractionalLit f) }-cvtLit (DoublePrimL f)-  = do { force f; return $ HsDoublePrim noExt (mkFractionalLit f) }-cvtLit (CharL c)       = do { force c; return $ HsChar NoSourceText c }-cvtLit (CharPrimL c)   = do { force c; return $ HsCharPrim NoSourceText c }-cvtLit (StringL s)     = do { let { s' = mkFastString s }-                            ; force s'-                            ; return $ HsString (quotedSourceText s) s' }-cvtLit (StringPrimL s) = do { let { s' = BS.pack s }-                            ; force s'-                            ; return $ HsStringPrim NoSourceText s' }-cvtLit _ = panic "Convert.cvtLit: Unexpected literal"-        -- cvtLit should not be called on IntegerL, RationalL-        -- That precondition is established right here in-        -- Convert.hs, hence panic--quotedSourceText :: String -> SourceText-quotedSourceText s = SourceText $ "\"" ++ s ++ "\""--cvtPats :: [TH.Pat] -> CvtM [Hs.LPat GhcPs]-cvtPats pats = mapM cvtPat pats--cvtPat :: TH.Pat -> CvtM (Hs.LPat GhcPs)-cvtPat pat = wrapL (cvtp pat)--cvtp :: TH.Pat -> CvtM (Hs.Pat GhcPs)-cvtp (TH.LitP l)-  | overloadedLit l    = do { l' <- cvtOverLit l-                            ; return (mkNPat (noLoc l') Nothing) }-                                  -- Not right for negative patterns;-                                  -- need to think about that!-  | otherwise          = do { l' <- cvtLit l; return $ Hs.LitPat noExt l' }-cvtp (TH.VarP s)       = do { s' <- vName s-                            ; return $ Hs.VarPat noExt (noLoc s') }-cvtp (TupP [p])        = do { p' <- cvtPat p; return $ ParPat noExt p' }-                                         -- Note [Dropping constructors]-cvtp (TupP ps)         = do { ps' <- cvtPats ps-                            ; return $ TuplePat noExt ps' Boxed }-cvtp (UnboxedTupP ps)  = do { ps' <- cvtPats ps-                            ; return $ TuplePat noExt ps' Unboxed }-cvtp (UnboxedSumP p alt arity)-                       = do { p' <- cvtPat p-                            ; unboxedSumChecks alt arity-                            ; return $ SumPat noExt p' alt arity }-cvtp (ConP s ps)       = do { s' <- cNameL s; ps' <- cvtPats ps-                            ; let pps = map (parenthesizePat appPrec) ps'-                            ; return $ ConPatIn s' (PrefixCon pps) }-cvtp (InfixP p1 s p2)  = do { s' <- cNameL s; p1' <- cvtPat p1; p2' <- cvtPat p2-                            ; wrapParL (ParPat noExt) $-                              ConPatIn s' $-                              InfixCon (parenthesizePat opPrec p1')-                                       (parenthesizePat opPrec p2') }-                            -- See Note [Operator association]-cvtp (UInfixP p1 s p2) = do { p1' <- cvtPat p1; cvtOpAppP p1' s p2 } -- Note [Converting UInfix]-cvtp (ParensP p)       = do { p' <- cvtPat p;-                            ; case unLoc p' of  -- may be wrapped ConPatIn-                                ParPat {} -> return $ unLoc p'-                                _         -> return $ ParPat noExt p' }-cvtp (TildeP p)        = do { p' <- cvtPat p; return $ LazyPat noExt p' }-cvtp (BangP p)         = do { p' <- cvtPat p; return $ BangPat noExt p' }-cvtp (TH.AsP s p)      = do { s' <- vNameL s; p' <- cvtPat p-                            ; return $ AsPat noExt s' p' }-cvtp TH.WildP          = return $ WildPat noExt-cvtp (RecP c fs)       = do { c' <- cNameL c; fs' <- mapM cvtPatFld fs-                            ; return $ ConPatIn c'-                                     $ Hs.RecCon (HsRecFields fs' Nothing) }-cvtp (ListP ps)        = do { ps' <- cvtPats ps-                            ; return-                                   $ ListPat noExt ps'}-cvtp (SigP p t)        = do { p' <- cvtPat p; t' <- cvtType t-                            ; return $ SigPat noExt p' (mkLHsSigWcType t') }-cvtp (ViewP e p)       = do { e' <- cvtl e; p' <- cvtPat p-                            ; return $ ViewPat noExt e' p'}--cvtPatFld :: (TH.Name, TH.Pat) -> CvtM (LHsRecField GhcPs (LPat GhcPs))-cvtPatFld (s,p)-  = do  { (dL->L ls s') <- vNameL s-        ; p' <- cvtPat p-        ; return (noLoc $ HsRecField { hsRecFieldLbl-                                         = cL ls $ mkFieldOcc (cL ls s')-                                     , hsRecFieldArg = p'-                                     , hsRecPun      = False}) }--{- | @cvtOpAppP x op y@ converts @op@ and @y@ and produces the operator application @x `op` y@.-The produced tree of infix patterns will be left-biased, provided @x@ is.--See the @cvtOpApp@ documentation for how this function works.--}-cvtOpAppP :: Hs.LPat GhcPs -> TH.Name -> TH.Pat -> CvtM (Hs.Pat GhcPs)-cvtOpAppP x op1 (UInfixP y op2 z)-  = do { l <- wrapL $ cvtOpAppP x op1 y-       ; cvtOpAppP l op2 z }-cvtOpAppP x op y-  = do { op' <- cNameL op-       ; y' <- cvtPat y-       ; return (ConPatIn op' (InfixCon x y')) }----------------------------------------------------------------      Types and type variables--cvtTvs :: [TH.TyVarBndr] -> CvtM (LHsQTyVars GhcPs)-cvtTvs tvs = do { tvs' <- mapM cvt_tv tvs; return (mkHsQTvs tvs') }--cvt_tv :: TH.TyVarBndr -> CvtM (LHsTyVarBndr GhcPs)-cvt_tv (TH.PlainTV nm)-  = do { nm' <- tNameL nm-       ; returnL $ UserTyVar noExt nm' }-cvt_tv (TH.KindedTV nm ki)-  = do { nm' <- tNameL nm-       ; ki' <- cvtKind ki-       ; returnL $ KindedTyVar noExt nm' ki' }--cvtRole :: TH.Role -> Maybe Coercion.Role-cvtRole TH.NominalR          = Just Coercion.Nominal-cvtRole TH.RepresentationalR = Just Coercion.Representational-cvtRole TH.PhantomR          = Just Coercion.Phantom-cvtRole TH.InferR            = Nothing--cvtContext :: TH.Cxt -> CvtM (LHsContext GhcPs)-cvtContext tys = do { preds' <- mapM cvtPred tys; returnL preds' }--cvtPred :: TH.Pred -> CvtM (LHsType GhcPs)-cvtPred = cvtType--cvtDerivClause :: TH.DerivClause-               -> CvtM (LHsDerivingClause GhcPs)-cvtDerivClause (TH.DerivClause ds ctxt)-  = do { ctxt' <- fmap (map mkLHsSigType) <$> cvtContext ctxt-       ; ds'   <- traverse cvtDerivStrategy ds-       ; returnL $ HsDerivingClause noExt ds' ctxt' }--cvtDerivStrategy :: TH.DerivStrategy -> CvtM (Hs.LDerivStrategy GhcPs)-cvtDerivStrategy TH.StockStrategy    = returnL Hs.StockStrategy-cvtDerivStrategy TH.AnyclassStrategy = returnL Hs.AnyclassStrategy-cvtDerivStrategy TH.NewtypeStrategy  = returnL Hs.NewtypeStrategy-cvtDerivStrategy (TH.ViaStrategy ty) = do-  ty' <- cvtType ty-  returnL $ Hs.ViaStrategy (mkLHsSigType ty')--cvtType :: TH.Type -> CvtM (LHsType GhcPs)-cvtType = cvtTypeKind "type"--cvtTypeKind :: String -> TH.Type -> CvtM (LHsType GhcPs)-cvtTypeKind ty_str ty-  = do { (head_ty, tys') <- split_ty_app ty-       ; let m_normals = mapM extract_normal tys'-                                where extract_normal (HsValArg ty) = Just ty-                                      extract_normal _ = Nothing--       ; case head_ty of-           TupleT n-            | Just normals <- m_normals-            , normals `lengthIs` n         -- Saturated-               -> if n==1 then return (head normals) -- Singleton tuples treated-                                                     -- like nothing (ie just parens)-                          else returnL (HsTupleTy noExt-                                        HsBoxedOrConstraintTuple normals)-            | n == 1-               -> failWith (ptext (sLit ("Illegal 1-tuple " ++ ty_str ++ " constructor")))-            | otherwise-            -> mk_apps-               (HsTyVar noExt NotPromoted (noLoc (getRdrName (tupleTyCon Boxed n))))-               tys'-           UnboxedTupleT n-             | Just normals <- m_normals-             , normals `lengthIs` n               -- Saturated-             -> returnL (HsTupleTy noExt HsUnboxedTuple normals)-             | otherwise-             -> mk_apps-                (HsTyVar noExt NotPromoted (noLoc (getRdrName (tupleTyCon Unboxed n))))-                tys'-           UnboxedSumT n-             | n < 2-            -> failWith $-                   vcat [ text "Illegal sum arity:" <+> text (show n)-                        , nest 2 $-                            text "Sums must have an arity of at least 2" ]-             | Just normals <- m_normals-             , normals `lengthIs` n -- Saturated-             -> returnL (HsSumTy noExt normals)-             | otherwise-             -> mk_apps-                (HsTyVar noExt NotPromoted (noLoc (getRdrName (sumTyCon n))))-                tys'-           ArrowT-             | Just normals <- m_normals-             , [x',y'] <- normals -> do-                 x'' <- case unLoc x' of-                          HsFunTy{}    -> returnL (HsParTy noExt x')-                          HsForAllTy{} -> returnL (HsParTy noExt x') -- #14646-                          HsQualTy{}   -> returnL (HsParTy noExt x') -- #15324-                          _            -> return $-                                          parenthesizeHsType sigPrec x'-                 let y'' = parenthesizeHsType sigPrec y'-                 returnL (HsFunTy noExt x'' y'')-             | otherwise-             -> mk_apps-                (HsTyVar noExt NotPromoted (noLoc (getRdrName funTyCon)))-                tys'-           ListT-             | Just normals <- m_normals-             , [x'] <- normals -> do-                returnL (HsListTy noExt x')-             | otherwise-             -> mk_apps-                (HsTyVar noExt NotPromoted (noLoc (getRdrName listTyCon)))-                tys'--           VarT nm -> do { nm' <- tNameL nm-                         ; mk_apps (HsTyVar noExt NotPromoted nm') tys' }-           ConT nm -> do { nm' <- tconName nm-                         ; -- ConT can contain both data constructor (i.e.,-                           -- promoted) names and other (i.e, unpromoted)-                           -- names, as opposed to PromotedT, which can only-                           -- contain data constructor names. See #15572.-                           let prom = if isRdrDataCon nm'-                                      then IsPromoted-                                      else NotPromoted-                         ; mk_apps (HsTyVar noExt prom (noLoc nm')) tys'}--           ForallT tvs cxt ty-             | null tys'-             -> do { tvs' <- cvtTvs tvs-                   ; cxt' <- cvtContext cxt-                   ; let pcxt = parenthesizeHsContext funPrec cxt'-                   ; ty'  <- cvtType ty-                   ; loc <- getL-                   ; let hs_ty  = mkHsForAllTy tvs loc tvs' rho_ty-                         rho_ty = mkHsQualTy cxt loc pcxt ty'--                   ; return hs_ty }--           SigT ty ki-             -> do { ty' <- cvtType ty-                   ; ki' <- cvtKind ki-                   ; mk_apps (HsKindSig noExt ty' ki') tys'-                   }--           LitT lit-             -> mk_apps (HsTyLit noExt (cvtTyLit lit)) tys'--           WildCardT-             -> mk_apps mkAnonWildCardTy tys'--           InfixT t1 s t2-             -> do { s'  <- tconName s-                   ; t1' <- cvtType t1-                   ; t2' <- cvtType t2-                   ; mk_apps-                      (HsTyVar noExt NotPromoted (noLoc s'))-                      ([HsValArg t1', HsValArg t2'] ++ tys')-                   }--           UInfixT t1 s t2-             -> do { t2' <- cvtType t2-                   ; t <- cvtOpAppT t1 s t2'-                   ; mk_apps (unLoc t) tys'-                   } -- Note [Converting UInfix]--           ParensT t-             -> do { t' <- cvtType t-                   ; mk_apps (HsParTy noExt t') tys'-                   }--           PromotedT nm -> do { nm' <- cName nm-                              ; mk_apps (HsTyVar noExt IsPromoted (noLoc nm'))-                                        tys' }-                 -- Promoted data constructor; hence cName--           PromotedTupleT n-              | n == 1-              -> failWith (ptext (sLit ("Illegal promoted 1-tuple " ++ ty_str)))-              | Just normals <- m_normals-              , normals `lengthIs` n   -- Saturated-              -> returnL (HsExplicitTupleTy noExt normals)-              | otherwise-              -> mk_apps-                 (HsTyVar noExt IsPromoted (noLoc (getRdrName (tupleDataCon Boxed n))))-                 tys'--           PromotedNilT-             -> mk_apps (HsExplicitListTy noExt IsPromoted []) tys'--           PromotedConsT  -- See Note [Representing concrete syntax in types]-                          -- in Language.Haskell.TH.Syntax-              | Just normals <- m_normals-              , [ty1, dL->L _ (HsExplicitListTy _ ip tys2)] <- normals-              -> do-                  returnL (HsExplicitListTy noExt ip (ty1:tys2))-              | otherwise-              -> mk_apps-                 (HsTyVar noExt IsPromoted (noLoc (getRdrName consDataCon)))-                 tys'--           StarT-             -> mk_apps-                (HsTyVar noExt NotPromoted (noLoc (getRdrName liftedTypeKindTyCon)))-                tys'--           ConstraintT-             -> mk_apps-                (HsTyVar noExt NotPromoted (noLoc (getRdrName constraintKindTyCon)))-                tys'--           EqualityT-             | Just normals <- m_normals-             , [x',y'] <- normals ->-                   let px = parenthesizeHsType opPrec x'-                       py = parenthesizeHsType opPrec y'-                   in returnL (HsOpTy noExt px (noLoc eqTyCon_RDR) py)-               -- The long-term goal is to remove the above case entirely and-               -- subsume it under the case for InfixT. See #15815, comment:6,-               -- for more details.--             | otherwise ->-                   mk_apps (HsTyVar noExt NotPromoted-                            (noLoc eqTyCon_RDR)) tys'-           ImplicitParamT n t-             -> do { n' <- wrapL $ ipName n-                   ; t' <- cvtType t-                   ; returnL (HsIParamTy noExt n' t')-                   }--           _ -> failWith (ptext (sLit ("Malformed " ++ ty_str)) <+> text (show ty))-    }---- | Constructs an application of a type to arguments passed in a list.-mk_apps :: HsType GhcPs -> [LHsTypeArg GhcPs] -> CvtM (LHsType GhcPs)-mk_apps head_ty type_args = do-  head_ty' <- returnL head_ty-  -- We must parenthesize the function type in case of an explicit-  -- signature. For instance, in `(Maybe :: Type -> Type) Int`, there-  -- _must_ be parentheses around `Maybe :: Type -> Type`.-  let phead_ty :: LHsType GhcPs-      phead_ty = parenthesizeHsType sigPrec head_ty'--      go :: [LHsTypeArg GhcPs] -> CvtM (LHsType GhcPs)-      go [] = pure head_ty'-      go (arg:args) =-        case arg of-          HsValArg ty  -> do p_ty <- add_parens ty-                             mk_apps (HsAppTy noExt phead_ty p_ty) args-          HsTypeArg l ki -> do p_ki <- add_parens ki-                               mk_apps (HsAppKindTy l phead_ty p_ki) args-          HsArgPar _   -> mk_apps (HsParTy noExt phead_ty) args--  go type_args-   where-    -- See Note [Adding parens for splices]-    add_parens lt@(dL->L _ t)-      | hsTypeNeedsParens appPrec t = returnL (HsParTy noExt lt)-      | otherwise                   = return lt--wrap_tyarg :: LHsTypeArg GhcPs -> LHsTypeArg GhcPs-wrap_tyarg (HsValArg ty)    = HsValArg  $ parenthesizeHsType appPrec ty-wrap_tyarg (HsTypeArg l ki) = HsTypeArg l $ parenthesizeHsType appPrec ki-wrap_tyarg ta@(HsArgPar {}) = ta -- Already parenthesized---- ------------------------------------------------------------------------ Note [Adding parens for splices]-{--The hsSyn representation of parsed source explicitly contains all the original-parens, as written in the source.--When a Template Haskell (TH) splice is evaluated, the original splice is first-renamed and type checked and then finally converted to core in DsMeta. This core-is then run in the TH engine, and the result comes back as a TH AST.--In the process, all parens are stripped out, as they are not needed.--This Convert module then converts the TH AST back to hsSyn AST.--In order to pretty-print this hsSyn AST, parens need to be adde back at certain-points so that the code is readable with its original meaning.--So scattered through Convert.hs are various points where parens are added.--See (among other closed issued) https://ghc.haskell.org/trac/ghc/ticket/14289--}--- ------------------------------------------------------------------------- | Constructs an arrow type with a specified return type-mk_arr_apps :: [LHsType GhcPs] -> HsType GhcPs -> CvtM (LHsType GhcPs)-mk_arr_apps tys return_ty = foldrM go return_ty tys >>= returnL-    where go :: LHsType GhcPs -> HsType GhcPs -> CvtM (HsType GhcPs)-          go arg ret_ty = do { ret_ty_l <- returnL ret_ty-                             ; return (HsFunTy noExt arg ret_ty_l) }--split_ty_app :: TH.Type -> CvtM (TH.Type, [LHsTypeArg GhcPs])-split_ty_app ty = go ty []-  where-    go (AppT f a) as' = do { a' <- cvtType a; go f (HsValArg a':as') }-    go (AppKindT ty ki) as' = do { ki' <- cvtKind ki-                                 ; go ty (HsTypeArg noSrcSpan ki':as') }-    go (ParensT t) as' = do { loc <- getL; go t (HsArgPar loc: as') }-    go f as           = return (f,as)--cvtTyLit :: TH.TyLit -> HsTyLit-cvtTyLit (TH.NumTyLit i) = HsNumTy NoSourceText i-cvtTyLit (TH.StrTyLit s) = HsStrTy NoSourceText (fsLit s)--{- | @cvtOpAppT x op y@ converts @op@ and @y@ and produces the operator-application @x `op` y@. The produced tree of infix types will be right-biased,-provided @y@ is.--See the @cvtOpApp@ documentation for how this function works.--}-cvtOpAppT :: TH.Type -> TH.Name -> LHsType GhcPs -> CvtM (LHsType GhcPs)-cvtOpAppT (UInfixT x op2 y) op1 z-  = do { l <- cvtOpAppT y op1 z-       ; cvtOpAppT x op2 l }-cvtOpAppT x op y-  = do { op' <- tconNameL op-       ; x' <- cvtType x-       ; returnL (mkHsOpTy x' op' y) }--cvtKind :: TH.Kind -> CvtM (LHsKind GhcPs)-cvtKind = cvtTypeKind "kind"---- | Convert Maybe Kind to a type family result signature. Used with data--- families where naming of the result is not possible (thus only kind or no--- signature is possible).-cvtMaybeKindToFamilyResultSig :: Maybe TH.Kind-                              -> CvtM (LFamilyResultSig GhcPs)-cvtMaybeKindToFamilyResultSig Nothing   = returnL (Hs.NoSig noExt)-cvtMaybeKindToFamilyResultSig (Just ki) = do { ki' <- cvtKind ki-                                             ; returnL (Hs.KindSig noExt ki') }---- | Convert type family result signature. Used with both open and closed type--- families.-cvtFamilyResultSig :: TH.FamilyResultSig -> CvtM (Hs.LFamilyResultSig GhcPs)-cvtFamilyResultSig TH.NoSig           = returnL (Hs.NoSig noExt)-cvtFamilyResultSig (TH.KindSig ki)    = do { ki' <- cvtKind ki-                                           ; returnL (Hs.KindSig noExt  ki') }-cvtFamilyResultSig (TH.TyVarSig bndr) = do { tv <- cvt_tv bndr-                                           ; returnL (Hs.TyVarSig noExt tv) }---- | Convert injectivity annotation of a type family.-cvtInjectivityAnnotation :: TH.InjectivityAnn-                         -> CvtM (Hs.LInjectivityAnn GhcPs)-cvtInjectivityAnnotation (TH.InjectivityAnn annLHS annRHS)-  = do { annLHS' <- tNameL annLHS-       ; annRHS' <- mapM tNameL annRHS-       ; returnL (Hs.InjectivityAnn annLHS' annRHS') }--cvtPatSynSigTy :: TH.Type -> CvtM (LHsType GhcPs)--- pattern synonym types are of peculiar shapes, which is why we treat--- them separately from regular types;--- see Note [Pattern synonym type signatures and Template Haskell]-cvtPatSynSigTy (ForallT univs reqs (ForallT exis provs ty))-  | null exis, null provs = cvtType (ForallT univs reqs ty)-  | null univs, null reqs = do { l   <- getL-                               ; ty' <- cvtType (ForallT exis provs ty)-                               ; return $ cL l (HsQualTy { hst_ctxt = cL l []-                                                         , hst_xqual = noExt-                                                         , hst_body = ty' }) }-  | null reqs             = do { l      <- getL-                               ; univs' <- hsQTvExplicit <$> cvtTvs univs-                               ; ty'    <- cvtType (ForallT exis provs ty)-                               ; let forTy = HsForAllTy-                                              { hst_bndrs = univs'-                                              , hst_xforall = noExt-                                              , hst_body = cL l cxtTy }-                                     cxtTy = HsQualTy { hst_ctxt = cL l []-                                                      , hst_xqual = noExt-                                                      , hst_body = ty' }-                               ; return $ cL l forTy }-  | otherwise             = cvtType (ForallT univs reqs (ForallT exis provs ty))-cvtPatSynSigTy ty         = cvtType ty--------------------------------------------------------------cvtFixity :: TH.Fixity -> Hs.Fixity-cvtFixity (TH.Fixity prec dir) = Hs.Fixity NoSourceText prec (cvt_dir dir)-   where-     cvt_dir TH.InfixL = Hs.InfixL-     cvt_dir TH.InfixR = Hs.InfixR-     cvt_dir TH.InfixN = Hs.InfixN------------------------------------------------------------------------------------------------------------------------------ some useful things--overloadedLit :: Lit -> Bool--- True for literals that Haskell treats as overloaded-overloadedLit (IntegerL  _) = True-overloadedLit (RationalL _) = True-overloadedLit _             = False---- Checks that are performed when converting unboxed sum expressions and--- patterns alike.-unboxedSumChecks :: TH.SumAlt -> TH.SumArity -> CvtM ()-unboxedSumChecks alt arity-    | alt > arity-    = failWith $ text "Sum alternative"    <+> text (show alt)-             <+> text "exceeds its arity," <+> text (show arity)-    | alt <= 0-    = failWith $ vcat [ text "Illegal sum alternative:" <+> text (show alt)-                      , nest 2 $ text "Sum alternatives must start from 1" ]-    | arity < 2-    = failWith $ vcat [ text "Illegal sum arity:" <+> text (show arity)-                      , nest 2 $ text "Sums must have an arity of at least 2" ]-    | otherwise-    = return ()---- | If passed an empty list of 'TH.TyVarBndr's, this simply returns the--- third argument (an 'LHsType'). Otherwise, return an 'HsForAllTy'--- using the provided 'LHsQTyVars' and 'LHsType'.-mkHsForAllTy :: [TH.TyVarBndr]-             -- ^ The original Template Haskell type variable binders-             -> SrcSpan-             -- ^ The location of the returned 'LHsType' if it needs an-             --   explicit forall-             -> LHsQTyVars GhcPs-             -- ^ The converted type variable binders-             -> LHsType GhcPs-             -- ^ The converted rho type-             -> LHsType GhcPs-             -- ^ The complete type, quantified with a forall if necessary-mkHsForAllTy tvs loc tvs' rho_ty-  | null tvs  = rho_ty-  | otherwise = cL loc $ HsForAllTy { hst_bndrs = hsQTvExplicit tvs'-                                    , hst_xforall = noExt-                                    , hst_body = rho_ty }---- | If passed an empty 'TH.Cxt', this simply returns the third argument--- (an 'LHsType'). Otherwise, return an 'HsQualTy' using the provided--- 'LHsContext' and 'LHsType'.---- It's important that we don't build an HsQualTy if the context is empty,--- as the pretty-printer for HsType _always_ prints contexts, even if--- they're empty. See Trac #13183.-mkHsQualTy :: TH.Cxt-           -- ^ The original Template Haskell context-           -> SrcSpan-           -- ^ The location of the returned 'LHsType' if it needs an-           --   explicit context-           -> LHsContext GhcPs-           -- ^ The converted context-           -> LHsType GhcPs-           -- ^ The converted tau type-           -> LHsType GhcPs-           -- ^ The complete type, qualified with a context if necessary-mkHsQualTy ctxt loc ctxt' ty-  | null ctxt = ty-  | otherwise = cL loc $ HsQualTy { hst_xqual = noExt-                                  , hst_ctxt  = ctxt'-                                  , hst_body  = ty }-------------------------------------------------------------------------      Turning Name back into RdrName------------------------------------------------------------------------- variable names-vNameL, cNameL, vcNameL, tNameL, tconNameL :: TH.Name -> CvtM (Located RdrName)-vName,  cName,  vcName,  tName,  tconName  :: TH.Name -> CvtM RdrName---- Variable names-vNameL n = wrapL (vName n)-vName n = cvtName OccName.varName n---- Constructor function names; this is Haskell source, hence srcDataName-cNameL n = wrapL (cName n)-cName n = cvtName OccName.dataName n---- Variable *or* constructor names; check by looking at the first char-vcNameL n = wrapL (vcName n)-vcName n = if isVarName n then vName n else cName n---- Type variable names-tNameL n = wrapL (tName n)-tName n = cvtName OccName.tvName n---- Type Constructor names-tconNameL n = wrapL (tconName n)-tconName n = cvtName OccName.tcClsName n--ipName :: String -> CvtM HsIPName-ipName n-  = do { unless (okVarOcc n) (failWith (badOcc OccName.varName n))-       ; return (HsIPName (fsLit n)) }--cvtName :: OccName.NameSpace -> TH.Name -> CvtM RdrName-cvtName ctxt_ns (TH.Name occ flavour)-  | not (okOcc ctxt_ns occ_str) = failWith (badOcc ctxt_ns occ_str)-  | otherwise-  = do { loc <- getL-       ; let rdr_name = thRdrName loc ctxt_ns occ_str flavour-       ; force rdr_name-       ; return rdr_name }-  where-    occ_str = TH.occString occ--okOcc :: OccName.NameSpace -> String -> Bool-okOcc ns str-  | OccName.isVarNameSpace ns     = okVarOcc str-  | OccName.isDataConNameSpace ns = okConOcc str-  | otherwise                     = okTcOcc  str---- Determine the name space of a name in a type----isVarName :: TH.Name -> Bool-isVarName (TH.Name occ _)-  = case TH.occString occ of-      ""    -> False-      (c:_) -> startsVarId c || startsVarSym c--badOcc :: OccName.NameSpace -> String -> SDoc-badOcc ctxt_ns occ-  = text "Illegal" <+> pprNameSpace ctxt_ns-        <+> text "name:" <+> quotes (text occ)--thRdrName :: SrcSpan -> OccName.NameSpace -> String -> TH.NameFlavour -> RdrName--- This turns a TH Name into a RdrName; used for both binders and occurrences--- See Note [Binders in Template Haskell]--- The passed-in name space tells what the context is expecting;---      use it unless the TH name knows what name-space it comes---      from, in which case use the latter------ We pass in a SrcSpan (gotten from the monad) because this function--- is used for *binders* and if we make an Exact Name we want it--- to have a binding site inside it.  (cf Trac #5434)------ ToDo: we may generate silly RdrNames, by passing a name space---       that doesn't match the string, like VarName ":+",---       which will give confusing error messages later------ The strict applications ensure that any buried exceptions get forced-thRdrName loc ctxt_ns th_occ th_name-  = case th_name of-     TH.NameG th_ns pkg mod -> thOrigRdrName th_occ th_ns pkg mod-     TH.NameQ mod  -> (mkRdrQual  $! mk_mod mod) $! occ-     TH.NameL uniq -> nameRdrName $! (((Name.mkInternalName $! mk_uniq uniq) $! occ) loc)-     TH.NameU uniq -> nameRdrName $! (((Name.mkSystemNameAt $! mk_uniq uniq) $! occ) loc)-     TH.NameS | Just name <- isBuiltInOcc_maybe occ -> nameRdrName $! name-              | otherwise                           -> mkRdrUnqual $! occ-              -- We check for built-in syntax here, because the TH-              -- user might have written a (NameS "(,,)"), for example-  where-    occ :: OccName.OccName-    occ = mk_occ ctxt_ns th_occ---- Return an unqualified exact RdrName if we're dealing with built-in syntax.--- See Trac #13776.-thOrigRdrName :: String -> TH.NameSpace -> PkgName -> ModName -> RdrName-thOrigRdrName occ th_ns pkg mod =-  let occ' = mk_occ (mk_ghc_ns th_ns) occ-  in case isBuiltInOcc_maybe occ' of-       Just name -> nameRdrName name-       Nothing   -> (mkOrig $! (mkModule (mk_pkg pkg) (mk_mod mod))) $! occ'--thRdrNameGuesses :: TH.Name -> [RdrName]-thRdrNameGuesses (TH.Name occ flavour)-  -- This special case for NameG ensures that we don't generate duplicates in the output list-  | TH.NameG th_ns pkg mod <- flavour = [ thOrigRdrName occ_str th_ns pkg mod]-  | otherwise                         = [ thRdrName noSrcSpan gns occ_str flavour-                                        | gns <- guessed_nss]-  where-    -- guessed_ns are the name spaces guessed from looking at the TH name-    guessed_nss-      | isLexCon (mkFastString occ_str) = [OccName.tcName,  OccName.dataName]-      | otherwise                       = [OccName.varName, OccName.tvName]-    occ_str = TH.occString occ---- The packing and unpacking is rather turgid :-(-mk_occ :: OccName.NameSpace -> String -> OccName.OccName-mk_occ ns occ = OccName.mkOccName ns occ--mk_ghc_ns :: TH.NameSpace -> OccName.NameSpace-mk_ghc_ns TH.DataName  = OccName.dataName-mk_ghc_ns TH.TcClsName = OccName.tcClsName-mk_ghc_ns TH.VarName   = OccName.varName--mk_mod :: TH.ModName -> ModuleName-mk_mod mod = mkModuleName (TH.modString mod)--mk_pkg :: TH.PkgName -> UnitId-mk_pkg pkg = stringToUnitId (TH.pkgString pkg)--mk_uniq :: Int -> Unique-mk_uniq u = mkUniqueGrimily u--{--Note [Binders in Template Haskell]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this TH term construction:-  do { x1 <- TH.newName "x"   -- newName :: String -> Q TH.Name-     ; x2 <- TH.newName "x"   -- Builds a NameU-     ; x3 <- TH.newName "x"--     ; let x = mkName "x"     -- mkName :: String -> TH.Name-                              -- Builds a NameS--     ; return (LamE (..pattern [x1,x2]..) $-               LamE (VarPat x3) $-               ..tuple (x1,x2,x3,x)) }--It represents the term   \[x1,x2]. \x3. (x1,x2,x3,x)--a) We don't want to complain about "x" being bound twice in-   the pattern [x1,x2]-b) We don't want x3 to shadow the x1,x2-c) We *do* want 'x' (dynamically bound with mkName) to bind-   to the innermost binding of "x", namely x3.-d) When pretty printing, we want to print a unique with x1,x2-   etc, else they'll all print as "x" which isn't very helpful--When we convert all this to HsSyn, the TH.Names are converted with-thRdrName.  To achieve (b) we want the binders to be Exact RdrNames.-Achieving (a) is a bit awkward, because-   - We must check for duplicate and shadowed names on Names,-     not RdrNames, *after* renaming.-     See Note [Collect binders only after renaming] in HsUtils--   - But to achieve (a) we must distinguish between the Exact-     RdrNames arising from TH and the Unqual RdrNames that would-     come from a user writing \[x,x] -> blah--So in Convert.thRdrName we translate-   TH Name                          RdrName-   ---------------------------------------------------------   NameU (arising from newName) --> Exact (Name{ System })-   NameS (arising from mkName)  --> Unqual--Notice that the NameUs generate *System* Names.  Then, when-figuring out shadowing and duplicates, we can filter out-System Names.--This use of System Names fits with other uses of System Names, eg for-temporary variables "a". Since there are lots of things called "a" we-usually want to print the name with the unique, and that is indeed-the way System Names are printed.--There's a small complication of course; see Note [Looking up Exact-RdrNames] in RnEnv.--}--{--Note [Pattern synonym type signatures and Template Haskell]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--In general, the type signature of a pattern synonym--  pattern P x1 x2 .. xn = <some-pattern>--is of the form--   forall univs. reqs => forall exis. provs => t1 -> t2 -> ... -> tn -> t--with the following parts:--   1) the (possibly empty lists of) universally quantified type-      variables `univs` and required constraints `reqs` on them.-   2) the (possibly empty lists of) existentially quantified type-      variables `exis` and the provided constraints `provs` on them.-   3) the types `t1`, `t2`, .., `tn` of the pattern synonym's arguments x1,-      x2, .., xn, respectively-   4) the type `t` of <some-pattern>, mentioning only universals from `univs`.--Due to the two forall quantifiers and constraint contexts (either of-which might be empty), pattern synonym type signatures are treated-specially in `deSugar/DsMeta.hs`, `hsSyn/Convert.hs`, and-`typecheck/TcSplice.hs`:--   (a) When desugaring a pattern synonym from HsSyn to TH.Dec in-       `deSugar/DsMeta.hs`, we represent its *full* type signature in TH, i.e.:--           ForallT univs reqs (ForallT exis provs ty)-              (where ty is the AST representation of t1 -> t2 -> ... -> tn -> t)--   (b) When converting pattern synonyms from TH.Dec to HsSyn in-       `hsSyn/Convert.hs`, we convert their TH type signatures back to an-       appropriate Haskell pattern synonym type of the form--         forall univs. reqs => forall exis. provs => t1 -> t2 -> ... -> tn -> t--       where initial empty `univs` type variables or an empty `reqs`-       constraint context are represented *explicitly* as `() =>`.--   (c) When reifying a pattern synonym in `typecheck/TcSplice.hs`, we always-       return its *full* type, i.e.:--           ForallT univs reqs (ForallT exis provs ty)-              (where ty is the AST representation of t1 -> t2 -> ... -> tn -> t)--The key point is to always represent a pattern synonym's *full* type-in cases (a) and (c) to make it clear which of the two forall-quantifiers and/or constraint contexts are specified, and which are-not. See GHC's user's guide on pattern synonyms for more information-about pattern synonym type signatures.---}
− hsSyn/HsBinds.hs
@@ -1,1316 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--\section[HsBinds]{Abstract syntax: top-level bindings and signatures}--Datatype for: @BindGroup@, @Bind@, @Sig@, @Bind@.--}--{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE TypeFamilies #-}--module HsBinds where--import GhcPrelude--import {-# SOURCE #-} HsExpr ( pprExpr, LHsExpr,-                               MatchGroup, pprFunBind,-                               GRHSs, pprPatBind )-import {-# SOURCE #-} HsPat  ( LPat )--import HsExtension-import HsTypes-import PprCore ()-import CoreSyn-import TcEvidence-import Type-import NameSet-import BasicTypes-import Outputable-import SrcLoc-import Var-import Bag-import FastString-import BooleanFormula (LBooleanFormula)-import DynFlags--import Data.Data hiding ( Fixity )-import Data.List hiding ( foldr )-import Data.Ord--{--************************************************************************-*                                                                      *-\subsection{Bindings: @BindGroup@}-*                                                                      *-************************************************************************--Global bindings (where clauses)--}---- During renaming, we need bindings where the left-hand sides--- have been renamed but the right-hand sides have not.--- the ...LR datatypes are parametrized by two id types,--- one for the left and one for the right.--- Other than during renaming, these will be the same.---- | Haskell Local Bindings-type HsLocalBinds id = HsLocalBindsLR id id---- | Located Haskell local bindings-type LHsLocalBinds id = Located (HsLocalBinds id)---- | Haskell Local Bindings with separate Left and Right identifier types------ Bindings in a 'let' expression--- or a 'where' clause-data HsLocalBindsLR idL idR-  = HsValBinds-        (XHsValBinds idL idR)-        (HsValBindsLR idL idR)-      -- ^ Haskell Value Bindings--         -- There should be no pattern synonyms in the HsValBindsLR-         -- These are *local* (not top level) bindings-         -- The parser accepts them, however, leaving the-         -- renamer to report them--  | HsIPBinds-        (XHsIPBinds idL idR)-        (HsIPBinds idR)-      -- ^ Haskell Implicit Parameter Bindings--  | EmptyLocalBinds (XEmptyLocalBinds idL idR)-      -- ^ Empty Local Bindings--  | XHsLocalBindsLR-        (XXHsLocalBindsLR idL idR)--type instance XHsValBinds      (GhcPass pL) (GhcPass pR) = NoExt-type instance XHsIPBinds       (GhcPass pL) (GhcPass pR) = NoExt-type instance XEmptyLocalBinds (GhcPass pL) (GhcPass pR) = NoExt-type instance XXHsLocalBindsLR (GhcPass pL) (GhcPass pR) = NoExt--type LHsLocalBindsLR idL idR = Located (HsLocalBindsLR idL idR)----- | Haskell Value Bindings-type HsValBinds id = HsValBindsLR id id---- | Haskell Value bindings with separate Left and Right identifier types--- (not implicit parameters)--- Used for both top level and nested bindings--- May contain pattern synonym bindings-data HsValBindsLR idL idR-  = -- | Value Bindings In-    ---    -- Before renaming RHS; idR is always RdrName-    -- Not dependency analysed-    -- Recursive by default-    ValBinds-        (XValBinds idL idR)-        (LHsBindsLR idL idR) [LSig idR]--    -- | Value Bindings Out-    ---    -- After renaming RHS; idR can be Name or Id Dependency analysed,-    -- later bindings in the list may depend on earlier ones.-  | XValBindsLR-      (XXValBindsLR idL idR)---- ------------------------------------------------------------------------ Deal with ValBindsOut---- TODO: make this the only type for ValBinds-data NHsValBindsLR idL-  = NValBinds-      [(RecFlag, LHsBinds idL)]-      [LSig GhcRn]--type instance XValBinds    (GhcPass pL) (GhcPass pR) = NoExt-type instance XXValBindsLR (GhcPass pL) (GhcPass pR)-            = NHsValBindsLR (GhcPass pL)---- ------------------------------------------------------------------------- | Located Haskell Binding-type LHsBind  id = LHsBindLR  id id---- | Located Haskell Bindings-type LHsBinds id = LHsBindsLR id id---- | Haskell Binding-type HsBind   id = HsBindLR   id id---- | Located Haskell Bindings with separate Left and Right identifier types-type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)---- | Located Haskell Binding with separate Left and Right identifier types-type LHsBindLR  idL idR = Located (HsBindLR idL idR)--{- Note [FunBind vs PatBind]-   ~~~~~~~~~~~~~~~~~~~~~~~~~-The distinction between FunBind and PatBind is a bit subtle. FunBind covers-patterns which resemble function bindings and simple variable bindings.--    f x = e-    f !x = e-    f = e-    !x = e          -- FunRhs has SrcStrict-    x `f` y = e     -- FunRhs has Infix--The actual patterns and RHSs of a FunBind are encoding in fun_matches.-The m_ctxt field of each Match in fun_matches will be FunRhs and carries-two bits of information about the match,--  * The mc_fixity field on each Match describes the fixity of the-    function binder in that match.  E.g. this is legal:-         f True False  = e1-         True `f` True = e2--  * The mc_strictness field is used /only/ for nullary FunBinds: ones-    with one Match, which has no pats. For these, it describes whether-    the match is decorated with a bang (e.g. `!x = e`).--By contrast, PatBind represents data constructor patterns, as well as a few-other interesting cases. Namely,--    Just x = e-    (x) = e-    x :: Ty = e--}---- | Haskell Binding with separate Left and Right id's-data HsBindLR idL idR-  = -- | Function-like Binding-    ---    -- FunBind is used for both functions     @f x = e@-    -- and variables                          @f = \x -> e@-    -- and strict variables                   @!x = x + 1@-    ---    -- Reason 1: Special case for type inference: see 'TcBinds.tcMonoBinds'.-    ---    -- Reason 2: Instance decls can only have FunBinds, which is convenient.-    --           If you change this, you'll need to change e.g. rnMethodBinds-    ---    -- But note that the form                 @f :: a->a = ...@-    -- parses as a pattern binding, just like-    --                                        @(f :: a -> a) = ... @-    ---    -- Strict bindings have their strictness recorded in the 'SrcStrictness' of their-    -- 'MatchContext'. See Note [FunBind vs PatBind] for-    -- details about the relationship between FunBind and PatBind.-    ---    --  'ApiAnnotation.AnnKeywordId's-    ---    --  - 'ApiAnnotation.AnnFunId', attached to each element of fun_matches-    ---    --  - 'ApiAnnotation.AnnEqual','ApiAnnotation.AnnWhere',-    --    'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',--    -- For details on above see note [Api annotations] in ApiAnnotation-    FunBind {--        fun_ext :: XFunBind idL idR, -- ^ After the renamer, this contains-                                --  the locally-bound-                                -- free variables of this defn.-                                -- See Note [Bind free vars]--        fun_id :: Located (IdP idL), -- Note [fun_id in Match] in HsExpr--        fun_matches :: MatchGroup idR (LHsExpr idR),  -- ^ The payload--        fun_co_fn :: HsWrapper, -- ^ Coercion from the type of the MatchGroup to the type of-                                -- the Id.  Example:-                                ---                                -- @-                                --      f :: Int -> forall a. a -> a-                                --      f x y = y-                                -- @-                                ---                                -- Then the MatchGroup will have type (Int -> a' -> a')-                                -- (with a free type variable a').  The coercion will take-                                -- a CoreExpr of this type and convert it to a CoreExpr of-                                -- type         Int -> forall a'. a' -> a'-                                -- Notice that the coercion captures the free a'.--        fun_tick :: [Tickish Id] -- ^ Ticks to put on the rhs, if any-    }--  -- | Pattern Binding-  ---  -- The pattern is never a simple variable;-  -- That case is done by FunBind.-  -- See Note [FunBind vs PatBind] for details about the-  -- relationship between FunBind and PatBind.--  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnBang',-  --       'ApiAnnotation.AnnEqual','ApiAnnotation.AnnWhere',-  --       'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',--  -- For details on above see note [Api annotations] in ApiAnnotation-  | PatBind {-        pat_ext    :: XPatBind idL idR, -- ^ See Note [Bind free vars]-        pat_lhs    :: LPat idL,-        pat_rhs    :: GRHSs idR (LHsExpr idR),-        pat_ticks  :: ([Tickish Id], [[Tickish Id]])-               -- ^ Ticks to put on the rhs, if any, and ticks to put on-               -- the bound variables.-    }--  -- | Variable Binding-  ---  -- Dictionary binding and suchlike.-  -- All VarBinds are introduced by the type checker-  | VarBind {-        var_ext    :: XVarBind idL idR,-        var_id     :: IdP idL,-        var_rhs    :: LHsExpr idR,   -- ^ Located only for consistency-        var_inline :: Bool           -- ^ True <=> inline this binding regardless-                                     -- (used for implication constraints only)-    }--  -- | Abstraction Bindings-  | AbsBinds {                      -- Binds abstraction; TRANSLATION-        abs_ext     :: XAbsBinds idL idR,-        abs_tvs     :: [TyVar],-        abs_ev_vars :: [EvVar],  -- ^ Includes equality constraints--       -- | AbsBinds only gets used when idL = idR after renaming,-       -- but these need to be idL's for the collect... code in HsUtil-       -- to have the right type-        abs_exports :: [ABExport idL],--        -- | Evidence bindings-        -- Why a list? See TcInstDcls-        -- Note [Typechecking plan for instance declarations]-        abs_ev_binds :: [TcEvBinds],--        -- | Typechecked user bindings-        abs_binds    :: LHsBinds idL,--        abs_sig :: Bool  -- See Note [The abs_sig field of AbsBinds]-    }--  -- | Patterns Synonym Binding-  | PatSynBind-        (XPatSynBind idL idR)-        (PatSynBind idL idR)-        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',-        --          'ApiAnnotation.AnnLarrow','ApiAnnotation.AnnEqual',-        --          'ApiAnnotation.AnnWhere'-        --          'ApiAnnotation.AnnOpen' @'{'@,'ApiAnnotation.AnnClose' @'}'@--        -- For details on above see note [Api annotations] in ApiAnnotation--  | XHsBindsLR (XXHsBindsLR idL idR)--data NPatBindTc = NPatBindTc {-     pat_fvs :: NameSet, -- ^ Free variables-     pat_rhs_ty :: Type  -- ^ Type of the GRHSs-     } deriving Data--type instance XFunBind    (GhcPass pL) GhcPs = NoExt-type instance XFunBind    (GhcPass pL) GhcRn = NameSet -- Free variables-type instance XFunBind    (GhcPass pL) GhcTc = NameSet -- Free variables--type instance XPatBind    GhcPs (GhcPass pR) = NoExt-type instance XPatBind    GhcRn (GhcPass pR) = NameSet -- Free variables-type instance XPatBind    GhcTc (GhcPass pR) = NPatBindTc--type instance XVarBind    (GhcPass pL) (GhcPass pR) = NoExt-type instance XAbsBinds   (GhcPass pL) (GhcPass pR) = NoExt-type instance XPatSynBind (GhcPass pL) (GhcPass pR) = NoExt-type instance XXHsBindsLR (GhcPass pL) (GhcPass pR) = NoExt---        -- Consider (AbsBinds tvs ds [(ftvs, poly_f, mono_f) binds]-        ---        -- Creates bindings for (polymorphic, overloaded) poly_f-        -- in terms of monomorphic, non-overloaded mono_f-        ---        -- Invariants:-        --      1. 'binds' binds mono_f-        --      2. ftvs is a subset of tvs-        --      3. ftvs includes all tyvars free in ds-        ---        -- See Note [AbsBinds]---- | Abtraction Bindings Export-data ABExport p-  = ABE { abe_ext       :: XABE p-        , abe_poly      :: IdP p -- ^ Any INLINE pragma is attached to this Id-        , abe_mono      :: IdP p-        , abe_wrap      :: HsWrapper    -- ^ See Note [ABExport wrapper]-             -- Shape: (forall abs_tvs. abs_ev_vars => abe_mono) ~ abe_poly-        , abe_prags     :: TcSpecPrags  -- ^ SPECIALISE pragmas-        }-   | XABExport (XXABExport p)--type instance XABE       (GhcPass p) = NoExt-type instance XXABExport (GhcPass p) = NoExt----- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',---             'ApiAnnotation.AnnEqual','ApiAnnotation.AnnLarrow'---             'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpen' @'{'@,---             'ApiAnnotation.AnnClose' @'}'@,---- For details on above see note [Api annotations] in ApiAnnotation---- | Pattern Synonym binding-data PatSynBind idL idR-  = PSB { psb_ext  :: XPSB idL idR,            -- ^ Post renaming, FVs.-                                               -- See Note [Bind free vars]-          psb_id   :: Located (IdP idL),       -- ^ Name of the pattern synonym-          psb_args :: HsPatSynDetails (Located (IdP idR)),-                                               -- ^ Formal parameter names-          psb_def  :: LPat idR,                -- ^ Right-hand side-          psb_dir  :: HsPatSynDir idR          -- ^ Directionality-     }-   | XPatSynBind (XXPatSynBind idL idR)--type instance XPSB         (GhcPass idL) GhcPs = NoExt-type instance XPSB         (GhcPass idL) GhcRn = NameSet-type instance XPSB         (GhcPass idL) GhcTc = NameSet--type instance XXPatSynBind (GhcPass idL) (GhcPass idR) = NoExt--{--Note [AbsBinds]-~~~~~~~~~~~~~~~-The AbsBinds constructor is used in the output of the type checker, to-record *typechecked* and *generalised* bindings.  Specifically--         AbsBinds { abs_tvs      = tvs-                  , abs_ev_vars  = [d1,d2]-                  , abs_exports  = [ABE { abe_poly = fp, abe_mono = fm-                                        , abe_wrap = fwrap }-                                    ABE { slly for g } ]-                  , abs_ev_binds = DBINDS-                  , abs_binds    = BIND[fm,gm] }--where 'BIND' binds the monomorphic Ids 'fm' and 'gm', means--        fp = fwrap [/\ tvs. \d1 d2. letrec { DBINDS        ]-                   [                       ; BIND[fm,gm] } ]-                   [                 in fm                 ]--        gp = ...same again, with gm instead of fm--The 'fwrap' is an impedence-matcher that typically does nothing; see-Note [ABExport wrapper].--This is a pretty bad translation, because it duplicates all the bindings.-So the desugarer tries to do a better job:--        fp = /\ [a,b] -> \ [d1,d2] -> case tp [a,b] [d1,d2] of-                                        (fm,gm) -> fm-        ..ditto for gp..--        tp = /\ [a,b] -> \ [d1,d2] -> letrec { DBINDS; BIND }-                                      in (fm,gm)--In general:--  * abs_tvs are the type variables over which the binding group is-    generalised-  * abs_ev_var are the evidence variables (usually dictionaries)-    over which the binding group is generalised-  * abs_binds are the monomorphic bindings-  * abs_ex_binds are the evidence bindings that wrap the abs_binds-  * abs_exports connects the monomorphic Ids bound by abs_binds-    with the polymorphic Ids bound by the AbsBinds itself.--For example, consider a module M, with this top-level binding, where-there is no type signature for M.reverse,-    M.reverse []     = []-    M.reverse (x:xs) = M.reverse xs ++ [x]--In Hindley-Milner, a recursive binding is typechecked with the-*recursive* uses being *monomorphic*.  So after typechecking *and*-desugaring we will get something like this--    M.reverse :: forall a. [a] -> [a]-      = /\a. letrec-                reverse :: [a] -> [a] = \xs -> case xs of-                                                []     -> []-                                                (x:xs) -> reverse xs ++ [x]-             in reverse--Notice that 'M.reverse' is polymorphic as expected, but there is a local-definition for plain 'reverse' which is *monomorphic*.  The type variable-'a' scopes over the entire letrec.--That's after desugaring.  What about after type checking but before-desugaring?  That's where AbsBinds comes in.  It looks like this:--   AbsBinds { abs_tvs     = [a]-            , abs_ev_vars = []-            , abs_exports = [ABE { abe_poly = M.reverse :: forall a. [a] -> [a],-                                 , abe_mono = reverse :: [a] -> [a]}]-            , abs_ev_binds = {}-            , abs_binds = { reverse :: [a] -> [a]-                               = \xs -> case xs of-                                            []     -> []-                                            (x:xs) -> reverse xs ++ [x] } }--Here,--  * abs_tvs says what type variables are abstracted over the binding-    group, just 'a' in this case.-  * abs_binds is the *monomorphic* bindings of the group-  * abs_exports describes how to get the polymorphic Id 'M.reverse'-    from the monomorphic one 'reverse'--Notice that the *original* function (the polymorphic one you thought-you were defining) appears in the abe_poly field of the-abs_exports. The bindings in abs_binds are for fresh, local, Ids with-a *monomorphic* Id.--If there is a group of mutually recursive (see Note [Polymorphic-recursion]) functions without type signatures, we get one AbsBinds-with the monomorphic versions of the bindings in abs_binds, and one-element of abe_exports for each variable bound in the mutually-recursive group.  This is true even for pattern bindings.  Example:-        (f,g) = (\x -> x, f)-After type checking we get-   AbsBinds { abs_tvs     = [a]-            , abs_exports = [ ABE { abe_poly = M.f :: forall a. a -> a-                                  , abe_mono = f :: a -> a }-                            , ABE { abe_poly = M.g :: forall a. a -> a-                                  , abe_mono = g :: a -> a }]-            , abs_binds = { (f,g) = (\x -> x, f) }--Note [Polymorphic recursion]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-   Rec { f x = ...(g ef)...--       ; g :: forall a. [a] -> [a]-       ; g y = ...(f eg)...  }--These bindings /are/ mutually recursive (f calls g, and g calls f).-But we can use the type signature for g to break the recursion,-like this:--  1. Add g :: forall a. [a] -> [a] to the type environment--  2. Typecheck the definition of f, all by itself,-     including generalising it to find its most general-     type, say f :: forall b. b -> b -> [b]--  3. Extend the type environment with that type for f--  4. Typecheck the definition of g, all by itself,-     checking that it has the type claimed by its signature--Steps 2 and 4 each generate a separate AbsBinds, so we end-up with-   Rec { AbsBinds { ...for f ... }-       ; AbsBinds { ...for g ... } }--This approach allows both f and to call each other-polymorphically, even though only g has a signature.--We get an AbsBinds that encompasses multiple source-program-bindings only when- * Each binding in the group has at least one binder that-   lacks a user type signature- * The group forms a strongly connected component---Note [The abs_sig field of AbsBinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The abs_sig field supports a couple of special cases for bindings.-Consider--  x :: Num a => (# a, a #)-  x = (# 3, 4 #)--The general desugaring for AbsBinds would give--  x = /\a. \ ($dNum :: Num a) ->-      letrec xm = (# fromInteger $dNum 3, fromInteger $dNum 4 #) in-      xm--But that has an illegal let-binding for an unboxed tuple.  In this-case we'd prefer to generate the (more direct)--  x = /\ a. \ ($dNum :: Num a) ->-     (# fromInteger $dNum 3, fromInteger $dNum 4 #)--A similar thing happens with representation-polymorphic defns-(Trac #11405):--  undef :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a-  undef = error "undef"--Again, the vanilla desugaring gives a local let-binding for a-representation-polymorphic (undefm :: a), which is illegal.  But-again we can desugar without a let:--  undef = /\ a. \ (d:HasCallStack) -> error a d "undef"--The abs_sig field supports this direct desugaring, with no local-let-bining.  When abs_sig = True-- * the abs_binds is single FunBind-- * the abs_exports is a singleton-- * we have a complete type sig for binder-   and hence the abs_binds is non-recursive-   (it binds the mono_id but refers to the poly_id--These properties are exploited in DsBinds.dsAbsBinds to-generate code without a let-binding.--Note [ABExport wrapper]-~~~~~~~~~~~~~~~~~~~~~~~-Consider-   (f,g) = (\x.x, \y.y)-This ultimately desugars to something like this:-   tup :: forall a b. (a->a, b->b)-   tup = /\a b. (\x:a.x, \y:b.y)-   f :: forall a. a -> a-   f = /\a. case tup a Any of-               (fm::a->a,gm:Any->Any) -> fm-   ...similarly for g...--The abe_wrap field deals with impedance-matching between-    (/\a b. case tup a b of { (f,g) -> f })-and the thing we really want, which may have fewer type-variables.  The action happens in TcBinds.mkExport.--Note [Bind free vars]-~~~~~~~~~~~~~~~~~~~~~-The bind_fvs field of FunBind and PatBind records the free variables-of the definition.  It is used for the following purposes--a) Dependency analysis prior to type checking-    (see TcBinds.tc_group)--b) Deciding whether we can do generalisation of the binding-    (see TcBinds.decideGeneralisationPlan)--c) Deciding whether the binding can be used in static forms-    (see TcExpr.checkClosedInStaticForm for the HsStatic case and-     TcBinds.isClosedBndrGroup).--Specifically,--  * bind_fvs includes all free vars that are defined in this module-    (including top-level things and lexically scoped type variables)--  * bind_fvs excludes imported vars; this is just to keep the set smaller--  * Before renaming, and after typechecking, the field is unused;-    it's just an error thunk--}--instance (idL ~ GhcPass pl, idR ~ GhcPass pr,-          OutputableBndrId idL, OutputableBndrId idR)-        => Outputable (HsLocalBindsLR idL idR) where-  ppr (HsValBinds _ bs)   = ppr bs-  ppr (HsIPBinds _ bs)    = ppr bs-  ppr (EmptyLocalBinds _) = empty-  ppr (XHsLocalBindsLR x) = ppr x--instance (idL ~ GhcPass pl, idR ~ GhcPass pr,-          OutputableBndrId idL, OutputableBndrId idR)-        => Outputable (HsValBindsLR idL idR) where-  ppr (ValBinds _ binds sigs)-   = pprDeclList (pprLHsBindsForUser binds sigs)--  ppr (XValBindsLR (NValBinds sccs sigs))-    = getPprStyle $ \ sty ->-      if debugStyle sty then    -- Print with sccs showing-        vcat (map ppr sigs) $$ vcat (map ppr_scc sccs)-     else-        pprDeclList (pprLHsBindsForUser (unionManyBags (map snd sccs)) sigs)-   where-     ppr_scc (rec_flag, binds) = pp_rec rec_flag <+> pprLHsBinds binds-     pp_rec Recursive    = text "rec"-     pp_rec NonRecursive = text "nonrec"--pprLHsBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR))-            => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc-pprLHsBinds binds-  | isEmptyLHsBinds binds = empty-  | otherwise = pprDeclList (map ppr (bagToList binds))--pprLHsBindsForUser :: (OutputableBndrId (GhcPass idL),-                       OutputableBndrId (GhcPass idR),-                       OutputableBndrId (GhcPass id2))-     => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]---  pprLHsBindsForUser is different to pprLHsBinds because---  a) No braces: 'let' and 'where' include a list of HsBindGroups---     and we don't want several groups of bindings each---     with braces around---  b) Sort by location before printing---  c) Include signatures-pprLHsBindsForUser binds sigs-  = map snd (sort_by_loc decls)-  where--    decls :: [(SrcSpan, SDoc)]-    decls = [(loc, ppr sig)  | L loc sig <- sigs] ++-            [(loc, ppr bind) | L loc bind <- bagToList binds]--    sort_by_loc decls = sortBy (comparing fst) decls--pprDeclList :: [SDoc] -> SDoc   -- Braces with a space--- Print a bunch of declarations--- One could choose  { d1; d2; ... }, using 'sep'--- or      d1---         d2---         ..---    using vcat--- At the moment we chose the latter--- Also we do the 'pprDeeperList' thing.-pprDeclList ds = pprDeeperList vcat ds---------------emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)-emptyLocalBinds = EmptyLocalBinds noExt---- AZ:These functions do not seem to be used at all?-isEmptyLocalBindsTc :: HsLocalBindsLR (GhcPass a) GhcTc -> Bool-isEmptyLocalBindsTc (HsValBinds _ ds)   = isEmptyValBinds ds-isEmptyLocalBindsTc (HsIPBinds _ ds)    = isEmptyIPBindsTc ds-isEmptyLocalBindsTc (EmptyLocalBinds _) = True-isEmptyLocalBindsTc (XHsLocalBindsLR _) = True--isEmptyLocalBindsPR :: HsLocalBindsLR (GhcPass a) (GhcPass b) -> Bool-isEmptyLocalBindsPR (HsValBinds _ ds)   = isEmptyValBinds ds-isEmptyLocalBindsPR (HsIPBinds _ ds)    = isEmptyIPBindsPR ds-isEmptyLocalBindsPR (EmptyLocalBinds _) = True-isEmptyLocalBindsPR (XHsLocalBindsLR _) = True--eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool-eqEmptyLocalBinds (EmptyLocalBinds _) = True-eqEmptyLocalBinds _                   = False--isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool-isEmptyValBinds (ValBinds _ ds sigs)  = isEmptyLHsBinds ds && null sigs-isEmptyValBinds (XValBindsLR (NValBinds ds sigs)) = null ds && null sigs--emptyValBindsIn, emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)-emptyValBindsIn  = ValBinds noExt emptyBag []-emptyValBindsOut = XValBindsLR (NValBinds [] [])--emptyLHsBinds :: LHsBindsLR idL idR-emptyLHsBinds = emptyBag--isEmptyLHsBinds :: LHsBindsLR idL idR -> Bool-isEmptyLHsBinds = isEmptyBag---------------plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)-               -> HsValBinds(GhcPass a)-plusHsValBinds (ValBinds _ ds1 sigs1) (ValBinds _ ds2 sigs2)-  = ValBinds noExt (ds1 `unionBags` ds2) (sigs1 ++ sigs2)-plusHsValBinds (XValBindsLR (NValBinds ds1 sigs1))-               (XValBindsLR (NValBinds ds2 sigs2))-  = XValBindsLR (NValBinds (ds1 ++ ds2) (sigs1 ++ sigs2))-plusHsValBinds _ _-  = panic "HsBinds.plusHsValBinds"--instance (idL ~ GhcPass pl, idR ~ GhcPass pr,-          OutputableBndrId idL, OutputableBndrId idR)-         => Outputable (HsBindLR idL idR) where-    ppr mbind = ppr_monobind mbind--ppr_monobind :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR))-             => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc--ppr_monobind (PatBind { pat_lhs = pat, pat_rhs = grhss })-  = pprPatBind pat grhss-ppr_monobind (VarBind { var_id = var, var_rhs = rhs })-  = sep [pprBndr CasePatBind var, nest 2 $ equals <+> pprExpr (unLoc rhs)]-ppr_monobind (FunBind { fun_id = fun,-                        fun_co_fn = wrap,-                        fun_matches = matches,-                        fun_tick = ticks })-  = pprTicks empty (if null ticks then empty-                    else text "-- ticks = " <> ppr ticks)-    $$  whenPprDebug (pprBndr LetBind (unLoc fun))-    $$  pprFunBind  matches-    $$  whenPprDebug (ppr wrap)-ppr_monobind (PatSynBind _ psb) = ppr psb-ppr_monobind (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dictvars-                       , abs_exports = exports, abs_binds = val_binds-                       , abs_ev_binds = ev_binds })-  = sdocWithDynFlags $ \ dflags ->-    if gopt Opt_PrintTypecheckerElaboration dflags then-      -- Show extra information (bug number: #10662)-      hang (text "AbsBinds" <+> brackets (interpp'SP tyvars)-                                    <+> brackets (interpp'SP dictvars))-         2 $ braces $ vcat-      [ text "Exports:" <+>-          brackets (sep (punctuate comma (map ppr exports)))-      , text "Exported types:" <+>-          vcat [pprBndr LetBind (abe_poly ex) | ex <- exports]-      , text "Binds:" <+> pprLHsBinds val_binds-      , text "Evidence:" <+> ppr ev_binds ]-    else-      pprLHsBinds val_binds-ppr_monobind (XHsBindsLR x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (ABExport p) where-  ppr (ABE { abe_wrap = wrap, abe_poly = gbl, abe_mono = lcl, abe_prags = prags })-    = vcat [ ppr gbl <+> text "<=" <+> ppr lcl-           , nest 2 (pprTcSpecPrags prags)-           , nest 2 (text "wrap:" <+> ppr wrap)]-  ppr (XABExport x) = ppr x--instance (idR ~ GhcPass pr,OutputableBndrId idL, OutputableBndrId idR,-         Outputable (XXPatSynBind idL idR))-          => Outputable (PatSynBind idL idR) where-  ppr (PSB{ psb_id = (L _ psyn), psb_args = details, psb_def = pat,-            psb_dir = dir })-      = ppr_lhs <+> ppr_rhs-    where-      ppr_lhs = text "pattern" <+> ppr_details-      ppr_simple syntax = syntax <+> ppr pat--      ppr_details = case details of-          InfixCon v1 v2 -> hsep [ppr v1, pprInfixOcc psyn, ppr v2]-          PrefixCon vs   -> hsep (pprPrefixOcc psyn : map ppr vs)-          RecCon vs      -> pprPrefixOcc psyn-                            <> braces (sep (punctuate comma (map ppr vs)))--      ppr_rhs = case dir of-          Unidirectional           -> ppr_simple (text "<-")-          ImplicitBidirectional    -> ppr_simple equals-          ExplicitBidirectional mg -> ppr_simple (text "<-") <+> ptext (sLit "where") $$-                                      (nest 2 $ pprFunBind mg)-  ppr (XPatSynBind x) = ppr x--pprTicks :: SDoc -> SDoc -> SDoc--- Print stuff about ticks only when -dppr-debug is on, to avoid--- them appearing in error messages (from the desugarer); see Trac # 3263--- Also print ticks in dumpStyle, so that -ddump-hpc actually does--- something useful.-pprTicks pp_no_debug pp_when_debug-  = getPprStyle (\ sty -> if debugStyle sty || dumpStyle sty-                             then pp_when_debug-                             else pp_no_debug)--{--************************************************************************-*                                                                      *-                Implicit parameter bindings-*                                                                      *-************************************************************************--}---- | Haskell Implicit Parameter Bindings-data HsIPBinds id-  = IPBinds-        (XIPBinds id)-        [LIPBind id]-        -- TcEvBinds       -- Only in typechecker output; binds-        --                 -- uses of the implicit parameters-  | XHsIPBinds (XXHsIPBinds id)--type instance XIPBinds       GhcPs = NoExt-type instance XIPBinds       GhcRn = NoExt-type instance XIPBinds       GhcTc = TcEvBinds -- binds uses of the-                                               -- implicit parameters---type instance XXHsIPBinds    (GhcPass p) = NoExt--isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool-isEmptyIPBindsPR (IPBinds _ is) = null is-isEmptyIPBindsPR (XHsIPBinds _) = True--isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool-isEmptyIPBindsTc (IPBinds ds is) = null is && isEmptyTcEvBinds ds-isEmptyIPBindsTc (XHsIPBinds _) = True---- | Located Implicit Parameter Binding-type LIPBind id = Located (IPBind id)--- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a---   list---- For details on above see note [Api annotations] in ApiAnnotation---- | Implicit parameter bindings.------ These bindings start off as (Left "x") in the parser and stay--- that way until after type-checking when they are replaced with--- (Right d), where "d" is the name of the dictionary holding the--- evidence for the implicit parameter.------ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual'---- For details on above see note [Api annotations] in ApiAnnotation-data IPBind id-  = IPBind-        (XCIPBind id)-        (Either (Located HsIPName) (IdP id))-        (LHsExpr id)-  | XIPBind (XXIPBind id)--type instance XCIPBind    (GhcPass p) = NoExt-type instance XXIPBind    (GhcPass p) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (HsIPBinds p) where-  ppr (IPBinds ds bs) = pprDeeperList vcat (map ppr bs)-                        $$ whenPprDebug (ppr ds)-  ppr (XHsIPBinds x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (IPBind p) where-  ppr (IPBind _ lr rhs) = name <+> equals <+> pprExpr (unLoc rhs)-    where name = case lr of-                   Left (L _ ip) -> pprBndr LetBind ip-                   Right     id  -> pprBndr LetBind id-  ppr (XIPBind x) = ppr x--{--************************************************************************-*                                                                      *-\subsection{@Sig@: type signatures and value-modifying user pragmas}-*                                                                      *-************************************************************************--It is convenient to lump ``value-modifying'' user-pragmas (e.g.,-``specialise this function to these four types...'') in with type-signatures.  Then all the machinery to move them into place, etc.,-serves for both.--}---- | Located Signature-type LSig pass = Located (Sig pass)---- | Signatures and pragmas-data Sig pass-  =   -- | An ordinary type signature-      ---      -- > f :: Num a => a -> a-      ---      -- After renaming, this list of Names contains the named-      -- wildcards brought into scope by this signature. For a signature-      -- @_ -> _a -> Bool@, the renamer will leave the unnamed wildcard @_@-      -- untouched, and the named wildcard @_a@ is then replaced with-      -- fresh meta vars in the type. Their names are stored in the type-      -- signature that brought them into scope, in this third field to be-      -- more specific.-      ---      --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon',-      --          'ApiAnnotation.AnnComma'--      -- For details on above see note [Api annotations] in ApiAnnotation-    TypeSig-       (XTypeSig pass)-       [Located (IdP pass)]  -- LHS of the signature; e.g.  f,g,h :: blah-       (LHsSigWcType pass)   -- RHS of the signature; can have wildcards--      -- | A pattern synonym type signature-      ---      -- > pattern Single :: () => (Show a) => a -> [a]-      ---      --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',-      --           'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnForall'-      --           'ApiAnnotation.AnnDot','ApiAnnotation.AnnDarrow'--      -- For details on above see note [Api annotations] in ApiAnnotation-  | PatSynSig (XPatSynSig pass) [Located (IdP pass)] (LHsSigType pass)-      -- P :: forall a b. Req => Prov => ty--      -- | A signature for a class method-      --   False: ordinary class-method signature-      --   True:  generic-default class method signature-      -- e.g.   class C a where-      --          op :: a -> a                   -- Ordinary-      --          default op :: Eq a => a -> a   -- Generic default-      -- No wildcards allowed here-      ---      --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDefault',-      --           'ApiAnnotation.AnnDcolon'-  | ClassOpSig (XClassOpSig pass) Bool [Located (IdP pass)] (LHsSigType pass)--        -- | A type signature in generated code, notably the code-        -- generated for record selectors.  We simply record-        -- the desired Id itself, replete with its name, type-        -- and IdDetails.  Otherwise it's just like a type-        -- signature: there should be an accompanying binding-  | IdSig (XIdSig pass) Id--        -- | An ordinary fixity declaration-        ---        -- >     infixl 8 ***-        ---        ---        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnInfix',-        --           'ApiAnnotation.AnnVal'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | FixSig (XFixSig pass) (FixitySig pass)--        -- | An inline pragma-        ---        -- > {#- INLINE f #-}-        ---        --  - 'ApiAnnotation.AnnKeywordId' :-        --       'ApiAnnotation.AnnOpen' @'{-\# INLINE'@ and @'['@,-        --       'ApiAnnotation.AnnClose','ApiAnnotation.AnnOpen',-        --       'ApiAnnotation.AnnVal','ApiAnnotation.AnnTilde',-        --       'ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | InlineSig   (XInlineSig pass)-                (Located (IdP pass)) -- Function name-                InlinePragma         -- Never defaultInlinePragma--        -- | A specialisation pragma-        ---        -- > {-# SPECIALISE f :: Int -> Int #-}-        ---        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --      'ApiAnnotation.AnnOpen' @'{-\# SPECIALISE'@ and @'['@,-        --      'ApiAnnotation.AnnTilde',-        --      'ApiAnnotation.AnnVal',-        --      'ApiAnnotation.AnnClose' @']'@ and @'\#-}'@,-        --      'ApiAnnotation.AnnDcolon'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | SpecSig     (XSpecSig pass)-                (Located (IdP pass)) -- Specialise a function or datatype  ...-                [LHsSigType pass]  -- ... to these types-                InlinePragma       -- The pragma on SPECIALISE_INLINE form.-                                   -- If it's just defaultInlinePragma, then we said-                                   --    SPECIALISE, not SPECIALISE_INLINE--        -- | A specialisation pragma for instance declarations only-        ---        -- > {-# SPECIALISE instance Eq [Int] #-}-        ---        -- (Class tys); should be a specialisation of the-        -- current instance declaration-        ---        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --      'ApiAnnotation.AnnInstance','ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)-                  -- Note [Pragma source text] in BasicTypes--        -- | A minimal complete definition pragma-        ---        -- > {-# MINIMAL a | (b, c | (d | e)) #-}-        ---        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --      'ApiAnnotation.AnnVbar','ApiAnnotation.AnnComma',-        --      'ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | MinimalSig (XMinimalSig pass)-               SourceText (LBooleanFormula (Located (IdP pass)))-               -- Note [Pragma source text] in BasicTypes--        -- | A "set cost centre" pragma for declarations-        ---        -- > {-# SCC funName #-}-        ---        -- or-        ---        -- > {-# SCC funName "cost_centre_name" #-}--  | SCCFunSig  (XSCCFunSig pass)-               SourceText      -- Note [Pragma source text] in BasicTypes-               (Located (IdP pass))  -- Function name-               (Maybe (Located StringLiteral))-       -- | A complete match pragma-       ---       -- > {-# COMPLETE C, D [:: T] #-}-       ---       -- Used to inform the pattern match checker about additional-       -- complete matchings which, for example, arise from pattern-       -- synonym definitions.-  | CompleteMatchSig (XCompleteMatchSig pass)-                     SourceText-                     (Located [Located (IdP pass)])-                     (Maybe (Located (IdP pass)))-  | XSig (XXSig pass)--type instance XTypeSig          (GhcPass p) = NoExt-type instance XPatSynSig        (GhcPass p) = NoExt-type instance XClassOpSig       (GhcPass p) = NoExt-type instance XIdSig            (GhcPass p) = NoExt-type instance XFixSig           (GhcPass p) = NoExt-type instance XInlineSig        (GhcPass p) = NoExt-type instance XSpecSig          (GhcPass p) = NoExt-type instance XSpecInstSig      (GhcPass p) = NoExt-type instance XMinimalSig       (GhcPass p) = NoExt-type instance XSCCFunSig        (GhcPass p) = NoExt-type instance XCompleteMatchSig (GhcPass p) = NoExt-type instance XXSig             (GhcPass p) = NoExt---- | Located Fixity Signature-type LFixitySig pass = Located (FixitySig pass)---- | Fixity Signature-data FixitySig pass = FixitySig (XFixitySig pass) [Located (IdP pass)] Fixity-                    | XFixitySig (XXFixitySig pass)--type instance XFixitySig  (GhcPass p) = NoExt-type instance XXFixitySig (GhcPass p) = NoExt---- | Type checker Specialisation Pragmas------ 'TcSpecPrags' conveys @SPECIALISE@ pragmas from the type checker to the desugarer-data TcSpecPrags-  = IsDefaultMethod     -- ^ Super-specialised: a default method should-                        -- be macro-expanded at every call site-  | SpecPrags [LTcSpecPrag]-  deriving Data---- | Located Type checker Specification Pragmas-type LTcSpecPrag = Located TcSpecPrag---- | Type checker Specification Pragma-data TcSpecPrag-  = SpecPrag-        Id-        HsWrapper-        InlinePragma-  -- ^ The Id to be specialised, a wrapper that specialises the-  -- polymorphic function, and inlining spec for the specialised function-  deriving Data--noSpecPrags :: TcSpecPrags-noSpecPrags = SpecPrags []--hasSpecPrags :: TcSpecPrags -> Bool-hasSpecPrags (SpecPrags ps) = not (null ps)-hasSpecPrags IsDefaultMethod = False--isDefaultMethod :: TcSpecPrags -> Bool-isDefaultMethod IsDefaultMethod = True-isDefaultMethod (SpecPrags {})  = False---isFixityLSig :: LSig name -> Bool-isFixityLSig (L _ (FixSig {})) = True-isFixityLSig _                 = False--isTypeLSig :: LSig name -> Bool  -- Type signatures-isTypeLSig (L _(TypeSig {}))    = True-isTypeLSig (L _(ClassOpSig {})) = True-isTypeLSig (L _(IdSig {}))      = True-isTypeLSig _                    = False--isSpecLSig :: LSig name -> Bool-isSpecLSig (L _(SpecSig {})) = True-isSpecLSig _                 = False--isSpecInstLSig :: LSig name -> Bool-isSpecInstLSig (L _ (SpecInstSig {})) = True-isSpecInstLSig _                      = False--isPragLSig :: LSig name -> Bool--- Identifies pragmas-isPragLSig (L _ (SpecSig {}))   = True-isPragLSig (L _ (InlineSig {})) = True-isPragLSig (L _ (SCCFunSig {})) = True-isPragLSig (L _ (CompleteMatchSig {})) = True-isPragLSig _                    = False--isInlineLSig :: LSig name -> Bool--- Identifies inline pragmas-isInlineLSig (L _ (InlineSig {})) = True-isInlineLSig _                    = False--isMinimalLSig :: LSig name -> Bool-isMinimalLSig (L _ (MinimalSig {})) = True-isMinimalLSig _                     = False--isSCCFunSig :: LSig name -> Bool-isSCCFunSig (L _ (SCCFunSig {})) = True-isSCCFunSig _                    = False--isCompleteMatchSig :: LSig name -> Bool-isCompleteMatchSig (L _ (CompleteMatchSig {} )) = True-isCompleteMatchSig _                            = False--hsSigDoc :: Sig name -> SDoc-hsSigDoc (TypeSig {})           = text "type signature"-hsSigDoc (PatSynSig {})         = text "pattern synonym signature"-hsSigDoc (ClassOpSig _ is_deflt _ _)- | is_deflt                     = text "default type signature"- | otherwise                    = text "class method signature"-hsSigDoc (IdSig {})             = text "id signature"-hsSigDoc (SpecSig {})           = text "SPECIALISE pragma"-hsSigDoc (InlineSig _ _ prag)   = ppr (inlinePragmaSpec prag) <+> text "pragma"-hsSigDoc (SpecInstSig {})       = text "SPECIALISE instance pragma"-hsSigDoc (FixSig {})            = text "fixity declaration"-hsSigDoc (MinimalSig {})        = text "MINIMAL pragma"-hsSigDoc (SCCFunSig {})         = text "SCC pragma"-hsSigDoc (CompleteMatchSig {})  = text "COMPLETE pragma"-hsSigDoc (XSig {})              = text "XSIG TTG extension"--{--Check if signatures overlap; this is used when checking for duplicate-signatures. Since some of the signatures contain a list of names, testing for-equality is not enough -- we have to check if they overlap.--}--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (Sig p) where-    ppr sig = ppr_sig sig--ppr_sig :: (OutputableBndrId (GhcPass p)) => Sig (GhcPass p) -> SDoc-ppr_sig (TypeSig _ vars ty)  = pprVarSig (map unLoc vars) (ppr ty)-ppr_sig (ClassOpSig _ is_deflt vars ty)-  | is_deflt                 = text "default" <+> pprVarSig (map unLoc vars) (ppr ty)-  | otherwise                = pprVarSig (map unLoc vars) (ppr ty)-ppr_sig (IdSig _ id)         = pprVarSig [id] (ppr (varType id))-ppr_sig (FixSig _ fix_sig)   = ppr fix_sig-ppr_sig (SpecSig _ var ty inl@(InlinePragma { inl_inline = spec }))-  = pragSrcBrackets (inl_src inl) pragmaSrc (pprSpec (unLoc var)-                                             (interpp'SP ty) inl)-    where-      pragmaSrc = case spec of-        NoUserInline -> "{-# SPECIALISE"-        _            -> "{-# SPECIALISE_INLINE"-ppr_sig (InlineSig _ var inl)-  = pragSrcBrackets (inl_src inl) "{-# INLINE"  (pprInline inl-                                   <+> pprPrefixOcc (unLoc var))-ppr_sig (SpecInstSig _ src ty)-  = pragSrcBrackets src "{-# SPECIALISE" (text "instance" <+> ppr ty)-ppr_sig (MinimalSig _ src bf)-  = pragSrcBrackets src "{-# MINIMAL" (pprMinimalSig bf)-ppr_sig (PatSynSig _ names sig_ty)-  = text "pattern" <+> pprVarSig (map unLoc names) (ppr sig_ty)-ppr_sig (SCCFunSig _ src fn mlabel)-  = pragSrcBrackets src "{-# SCC" (ppr fn <+> maybe empty ppr mlabel )-ppr_sig (CompleteMatchSig _ src cs mty)-  = pragSrcBrackets src "{-# COMPLETE"-      ((hsep (punctuate comma (map ppr (unLoc cs))))-        <+> opt_sig)-  where-    opt_sig = maybe empty ((\t -> dcolon <+> ppr t) . unLoc) mty-ppr_sig (XSig x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (FixitySig p) where-  ppr (FixitySig _ names fixity) = sep [ppr fixity, pprops]-    where-      pprops = hsep $ punctuate comma (map (pprInfixOcc . unLoc) names)-  ppr (XFixitySig x) = ppr x--pragBrackets :: SDoc -> SDoc-pragBrackets doc = text "{-#" <+> doc <+> text "#-}"---- | Using SourceText in case the pragma was spelled differently or used mixed--- case-pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc-pragSrcBrackets (SourceText src) _   doc = text src <+> doc <+> text "#-}"-pragSrcBrackets NoSourceText     alt doc = text alt <+> doc <+> text "#-}"--pprVarSig :: (OutputableBndr id) => [id] -> SDoc -> SDoc-pprVarSig vars pp_ty = sep [pprvars <+> dcolon, nest 2 pp_ty]-  where-    pprvars = hsep $ punctuate comma (map pprPrefixOcc vars)--pprSpec :: (OutputableBndr id) => id -> SDoc -> InlinePragma -> SDoc-pprSpec var pp_ty inl = pp_inl <+> pprVarSig [var] pp_ty-  where-    pp_inl | isDefaultInlinePragma inl = empty-           | otherwise = pprInline inl--pprTcSpecPrags :: TcSpecPrags -> SDoc-pprTcSpecPrags IsDefaultMethod = text "<default method>"-pprTcSpecPrags (SpecPrags ps)  = vcat (map (ppr . unLoc) ps)--instance Outputable TcSpecPrag where-  ppr (SpecPrag var _ inl)-    = text "SPECIALIZE" <+> pprSpec var (text "<type>") inl--pprMinimalSig :: (OutputableBndr name)-              => LBooleanFormula (Located name) -> SDoc-pprMinimalSig (L _ bf) = ppr (fmap unLoc bf)--{--************************************************************************-*                                                                      *-\subsection[PatSynBind]{A pattern synonym definition}-*                                                                      *-************************************************************************--}---- | Haskell Pattern Synonym Details-type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg]---- See Note [Record PatSyn Fields]--- | Record Pattern Synonym Field-data RecordPatSynField a-  = RecordPatSynField {-      recordPatSynSelectorId :: a  -- Selector name visible in rest of the file-      , recordPatSynPatVar :: a-      -- Filled in by renamer, the name used internally-      -- by the pattern-      } deriving Data----{--Note [Record PatSyn Fields]--Consider the following two pattern synonyms.--pattern P x y = ([x,True], [y,'v'])-pattern Q{ x, y } =([x,True], [y,'v'])--In P, we just have two local binders, x and y.--In Q, we have local binders but also top-level record selectors-x :: ([Bool], [Char]) -> Bool and similarly for y.--It would make sense to support record-like syntax--pattern Q{ x=x1, y=y1 } = ([x1,True], [y1,'v'])--when we have a different name for the local and top-level binder-the distinction between the two names clear---}-instance Functor RecordPatSynField where-    fmap f (RecordPatSynField { recordPatSynSelectorId = visible-                              , recordPatSynPatVar = hidden })-      = RecordPatSynField { recordPatSynSelectorId = f visible-                          , recordPatSynPatVar = f hidden }--instance Outputable a => Outputable (RecordPatSynField a) where-    ppr (RecordPatSynField { recordPatSynSelectorId = v }) = ppr v--instance Foldable RecordPatSynField  where-    foldMap f (RecordPatSynField { recordPatSynSelectorId = visible-                                 , recordPatSynPatVar = hidden })-      = f visible `mappend` f hidden--instance Traversable RecordPatSynField where-    traverse f (RecordPatSynField { recordPatSynSelectorId =visible-                                  , recordPatSynPatVar = hidden })-      = (\ sel_id pat_var -> RecordPatSynField { recordPatSynSelectorId = sel_id-                                               , recordPatSynPatVar = pat_var })-          <$> f visible <*> f hidden----- | Haskell Pattern Synonym Direction-data HsPatSynDir id-  = Unidirectional-  | ImplicitBidirectional-  | ExplicitBidirectional (MatchGroup id (LHsExpr id))
− hsSyn/HsDecls.hs
@@ -1,2403 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--}--{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable,-             DeriveTraversable #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE TypeFamilies #-}---- | Abstract syntax of global declarations.------ Definitions for: @SynDecl@ and @ConDecl@, @ClassDecl@,--- @InstDecl@, @DefaultDecl@ and @ForeignDecl@.-module HsDecls (-  -- * Toplevel declarations-  HsDecl(..), LHsDecl, HsDataDefn(..), HsDeriving, LHsFunDep,-  HsDerivingClause(..), LHsDerivingClause, NewOrData(..), newOrDataToFlavour,--  -- ** Class or type declarations-  TyClDecl(..), LTyClDecl, DataDeclRn(..),-  TyClGroup(..), mkTyClGroup, emptyTyClGroup,-  tyClGroupTyClDecls, tyClGroupInstDecls, tyClGroupRoleDecls,-  isClassDecl, isDataDecl, isSynDecl, tcdName,-  isFamilyDecl, isTypeFamilyDecl, isDataFamilyDecl,-  isOpenTypeFamilyInfo, isClosedTypeFamilyInfo,-  tyFamInstDeclName, tyFamInstDeclLName,-  countTyClDecls, pprTyClDeclFlavour,-  tyClDeclLName, tyClDeclTyVars,-  hsDeclHasCusk, famDeclHasCusk,-  FamilyDecl(..), LFamilyDecl,--  -- ** Instance declarations-  InstDecl(..), LInstDecl, FamilyInfo(..),-  TyFamInstDecl(..), LTyFamInstDecl, instDeclDataFamInsts,-  DataFamInstDecl(..), LDataFamInstDecl,-  pprDataFamInstFlavour, pprHsFamInstLHS,-  FamInstEqn, LFamInstEqn, FamEqn(..),-  TyFamInstEqn, LTyFamInstEqn, TyFamDefltEqn, LTyFamDefltEqn,-  HsTyPats,-  LClsInstDecl, ClsInstDecl(..),--  -- ** Standalone deriving declarations-  DerivDecl(..), LDerivDecl,-  -- ** Deriving strategies-  DerivStrategy(..), LDerivStrategy, derivStrategyName,-  -- ** @RULE@ declarations-  LRuleDecls,RuleDecls(..),RuleDecl(..),LRuleDecl,HsRuleRn(..),-  RuleBndr(..),LRuleBndr,-  collectRuleBndrSigTys,-  flattenRuleDecls, pprFullRuleName,-  -- ** @default@ declarations-  DefaultDecl(..), LDefaultDecl,-  -- ** Template haskell declaration splice-  SpliceExplicitFlag(..),-  SpliceDecl(..), LSpliceDecl,-  -- ** Foreign function interface declarations-  ForeignDecl(..), LForeignDecl, ForeignImport(..), ForeignExport(..),-  CImportSpec(..),-  -- ** Data-constructor declarations-  ConDecl(..), LConDecl,-  HsConDeclDetails, hsConDeclArgTys, hsConDeclTheta,-  getConNames, getConArgs,-  -- ** Document comments-  DocDecl(..), LDocDecl, docDeclDoc,-  -- ** Deprecations-  WarnDecl(..),  LWarnDecl,-  WarnDecls(..), LWarnDecls,-  -- ** Annotations-  AnnDecl(..), LAnnDecl,-  AnnProvenance(..), annProvenanceName_maybe,-  -- ** Role annotations-  RoleAnnotDecl(..), LRoleAnnotDecl, roleAnnotDeclName,-  -- ** Injective type families-  FamilyResultSig(..), LFamilyResultSig, InjectivityAnn(..), LInjectivityAnn,-  resultVariableName,--  -- * Grouping-  HsGroup(..),  emptyRdrGroup, emptyRnGroup, appendGroups, hsGroupInstDecls--    ) where---- friends:-import GhcPrelude--import {-# SOURCE #-}   HsExpr( HsExpr, HsSplice, pprExpr,-                                pprSpliceDecl )-        -- Because Expr imports Decls via HsBracket--import HsBinds-import HsTypes-import HsDoc-import TyCon-import BasicTypes-import Coercion-import ForeignCall-import HsExtension-import NameSet---- others:-import Class-import Outputable-import Util-import SrcLoc-import Type--import Bag-import Maybes-import Data.Data        hiding (TyCon,Fixity, Infix)--{--************************************************************************-*                                                                      *-\subsection[HsDecl]{Declarations}-*                                                                      *-************************************************************************--}--type LHsDecl p = Located (HsDecl p)-        -- ^ When in a list this may have-        ---        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'-        ------ For details on above see note [Api annotations] in ApiAnnotation---- | A Haskell Declaration-data HsDecl p-  = TyClD      (XTyClD p)      (TyClDecl p)      -- ^ Type or Class Declaration-  | InstD      (XInstD p)      (InstDecl  p)     -- ^ Instance declaration-  | DerivD     (XDerivD p)     (DerivDecl p)     -- ^ Deriving declaration-  | ValD       (XValD p)       (HsBind p)        -- ^ Value declaration-  | SigD       (XSigD p)       (Sig p)           -- ^ Signature declaration-  | DefD       (XDefD p)       (DefaultDecl p)   -- ^ 'default' declaration-  | ForD       (XForD p)       (ForeignDecl p)   -- ^ Foreign declaration-  | WarningD   (XWarningD p)   (WarnDecls p)     -- ^ Warning declaration-  | AnnD       (XAnnD p)       (AnnDecl p)       -- ^ Annotation declaration-  | RuleD      (XRuleD p)      (RuleDecls p)     -- ^ Rule declaration-  | SpliceD    (XSpliceD p)    (SpliceDecl p)    -- ^ Splice declaration-                                                 -- (Includes quasi-quotes)-  | DocD       (XDocD p)       (DocDecl)  -- ^ Documentation comment declaration-  | RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p) -- ^Role annotation declaration-  | XHsDecl    (XXHsDecl p)--type instance XTyClD      (GhcPass _) = NoExt-type instance XInstD      (GhcPass _) = NoExt-type instance XDerivD     (GhcPass _) = NoExt-type instance XValD       (GhcPass _) = NoExt-type instance XSigD       (GhcPass _) = NoExt-type instance XDefD       (GhcPass _) = NoExt-type instance XForD       (GhcPass _) = NoExt-type instance XWarningD   (GhcPass _) = NoExt-type instance XAnnD       (GhcPass _) = NoExt-type instance XRuleD      (GhcPass _) = NoExt-type instance XSpliceD    (GhcPass _) = NoExt-type instance XDocD       (GhcPass _) = NoExt-type instance XRoleAnnotD (GhcPass _) = NoExt-type instance XXHsDecl    (GhcPass _) = NoExt---- NB: all top-level fixity decls are contained EITHER--- EITHER SigDs--- OR     in the ClassDecls in TyClDs------ The former covers---      a) data constructors---      b) class methods (but they can be also done in the---              signatures of class decls)---      c) imported functions (that have an IfacSig)---      d) top level decls------ The latter is for class methods only---- | Haskell Group------ A 'HsDecl' is categorised into a 'HsGroup' before being--- fed to the renamer.-data HsGroup p-  = HsGroup {-        hs_ext    :: XCHsGroup p,-        hs_valds  :: HsValBinds p,-        hs_splcds :: [LSpliceDecl p],--        hs_tyclds :: [TyClGroup p],-                -- A list of mutually-recursive groups;-                -- This includes `InstDecl`s as well;-                -- Parser generates a singleton list;-                -- renamer does dependency analysis--        hs_derivds :: [LDerivDecl p],--        hs_fixds  :: [LFixitySig p],-                -- Snaffled out of both top-level fixity signatures,-                -- and those in class declarations--        hs_defds  :: [LDefaultDecl p],-        hs_fords  :: [LForeignDecl p],-        hs_warnds :: [LWarnDecls p],-        hs_annds  :: [LAnnDecl p],-        hs_ruleds :: [LRuleDecls p],--        hs_docs   :: [LDocDecl]-    }-  | XHsGroup (XXHsGroup p)--type instance XCHsGroup (GhcPass _) = NoExt-type instance XXHsGroup (GhcPass _) = NoExt---emptyGroup, emptyRdrGroup, emptyRnGroup :: HsGroup (GhcPass p)-emptyRdrGroup = emptyGroup { hs_valds = emptyValBindsIn }-emptyRnGroup  = emptyGroup { hs_valds = emptyValBindsOut }--hsGroupInstDecls :: HsGroup id -> [LInstDecl id]-hsGroupInstDecls = (=<<) group_instds . hs_tyclds--emptyGroup = HsGroup { hs_ext = noExt,-                       hs_tyclds = [],-                       hs_derivds = [],-                       hs_fixds = [], hs_defds = [], hs_annds = [],-                       hs_fords = [], hs_warnds = [], hs_ruleds = [],-                       hs_valds = error "emptyGroup hs_valds: Can't happen",-                       hs_splcds = [],-                       hs_docs = [] }--appendGroups :: HsGroup (GhcPass p) -> HsGroup (GhcPass p)-             -> HsGroup (GhcPass p)-appendGroups-    HsGroup {-        hs_valds  = val_groups1,-        hs_splcds = spliceds1,-        hs_tyclds = tyclds1,-        hs_derivds = derivds1,-        hs_fixds  = fixds1,-        hs_defds  = defds1,-        hs_annds  = annds1,-        hs_fords  = fords1,-        hs_warnds = warnds1,-        hs_ruleds = rulds1,-        hs_docs   = docs1 }-    HsGroup {-        hs_valds  = val_groups2,-        hs_splcds = spliceds2,-        hs_tyclds = tyclds2,-        hs_derivds = derivds2,-        hs_fixds  = fixds2,-        hs_defds  = defds2,-        hs_annds  = annds2,-        hs_fords  = fords2,-        hs_warnds = warnds2,-        hs_ruleds = rulds2,-        hs_docs   = docs2 }-  =-    HsGroup {-        hs_ext    = noExt,-        hs_valds  = val_groups1 `plusHsValBinds` val_groups2,-        hs_splcds = spliceds1 ++ spliceds2,-        hs_tyclds = tyclds1 ++ tyclds2,-        hs_derivds = derivds1 ++ derivds2,-        hs_fixds  = fixds1 ++ fixds2,-        hs_annds  = annds1 ++ annds2,-        hs_defds  = defds1 ++ defds2,-        hs_fords  = fords1 ++ fords2,-        hs_warnds = warnds1 ++ warnds2,-        hs_ruleds = rulds1 ++ rulds2,-        hs_docs   = docs1  ++ docs2 }-appendGroups _ _ = panic "appendGroups"--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsDecl p) where-    ppr (TyClD _ dcl)             = ppr dcl-    ppr (ValD _ binds)            = ppr binds-    ppr (DefD _ def)              = ppr def-    ppr (InstD _ inst)            = ppr inst-    ppr (DerivD _ deriv)          = ppr deriv-    ppr (ForD _ fd)               = ppr fd-    ppr (SigD _ sd)               = ppr sd-    ppr (RuleD _ rd)              = ppr rd-    ppr (WarningD _ wd)           = ppr wd-    ppr (AnnD _ ad)               = ppr ad-    ppr (SpliceD _ dd)            = ppr dd-    ppr (DocD _ doc)              = ppr doc-    ppr (RoleAnnotD _ ra)         = ppr ra-    ppr (XHsDecl x)               = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsGroup p) where-    ppr (HsGroup { hs_valds  = val_decls,-                   hs_tyclds = tycl_decls,-                   hs_derivds = deriv_decls,-                   hs_fixds  = fix_decls,-                   hs_warnds = deprec_decls,-                   hs_annds  = ann_decls,-                   hs_fords  = foreign_decls,-                   hs_defds  = default_decls,-                   hs_ruleds = rule_decls })-        = vcat_mb empty-            [ppr_ds fix_decls, ppr_ds default_decls,-             ppr_ds deprec_decls, ppr_ds ann_decls,-             ppr_ds rule_decls,-             if isEmptyValBinds val_decls-                then Nothing-                else Just (ppr val_decls),-             ppr_ds (tyClGroupTyClDecls tycl_decls),-             ppr_ds (tyClGroupInstDecls tycl_decls),-             ppr_ds deriv_decls,-             ppr_ds foreign_decls]-        where-          ppr_ds :: Outputable a => [a] -> Maybe SDoc-          ppr_ds [] = Nothing-          ppr_ds ds = Just (vcat (map ppr ds))--          vcat_mb :: SDoc -> [Maybe SDoc] -> SDoc-          -- Concatenate vertically with white-space between non-blanks-          vcat_mb _    []             = empty-          vcat_mb gap (Nothing : ds) = vcat_mb gap ds-          vcat_mb gap (Just d  : ds) = gap $$ d $$ vcat_mb blankLine ds-    ppr (XHsGroup x) = ppr x---- | Located Splice Declaration-type LSpliceDecl pass = Located (SpliceDecl pass)---- | Splice Declaration-data SpliceDecl p-  = SpliceDecl                  -- Top level splice-        (XSpliceDecl p)-        (Located (HsSplice p))-        SpliceExplicitFlag-  | XSpliceDecl (XXSpliceDecl p)--type instance XSpliceDecl      (GhcPass _) = NoExt-type instance XXSpliceDecl     (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (SpliceDecl p) where-   ppr (SpliceDecl _ (L _ e) f) = pprSpliceDecl e f-   ppr (XSpliceDecl x) = ppr x--{--************************************************************************-*                                                                      *-            Type and class declarations-*                                                                      *-************************************************************************--Note [The Naming story]-~~~~~~~~~~~~~~~~~~~~~~~-Here is the story about the implicit names that go with type, class,-and instance decls.  It's a bit tricky, so pay attention!--"Implicit" (or "system") binders-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-  Each data type decl defines-        a worker name for each constructor-        to-T and from-T convertors-  Each class decl defines-        a tycon for the class-        a data constructor for that tycon-        the worker for that constructor-        a selector for each superclass--All have occurrence names that are derived uniquely from their parent-declaration.--None of these get separate definitions in an interface file; they are-fully defined by the data or class decl.  But they may *occur* in-interface files, of course.  Any such occurrence must haul in the-relevant type or class decl.--Plan of attack:- - Ensure they "point to" the parent data/class decl-   when loading that decl from an interface file-   (See RnHiFiles.getSysBinders)-- - When typechecking the decl, we build the implicit TyCons and Ids.-   When doing so we look them up in the name cache (RnEnv.lookupSysName),-   to ensure correct module and provenance is set--These are the two places that we have to conjure up the magic derived-names.  (The actual magic is in OccName.mkWorkerOcc, etc.)--Default methods-~~~~~~~~~~~~~~~- - Occurrence name is derived uniquely from the method name-   E.g. $dmmax-- - If there is a default method name at all, it's recorded in-   the ClassOpSig (in HsBinds), in the DefMethInfo field.-   (DefMethInfo is defined in Class.hs)--Source-code class decls and interface-code class decls are treated subtly-differently, which has given me a great deal of confusion over the years.-Here's the deal.  (We distinguish the two cases because source-code decls-have (Just binds) in the tcdMeths field, whereas interface decls have Nothing.--In *source-code* class declarations:-- - When parsing, every ClassOpSig gets a DefMeth with a suitable RdrName-   This is done by RdrHsSyn.mkClassOpSigDM-- - The renamer renames it to a Name-- - During typechecking, we generate a binding for each $dm for-   which there's a programmer-supplied default method:-        class Foo a where-          op1 :: <type>-          op2 :: <type>-          op1 = ...-   We generate a binding for $dmop1 but not for $dmop2.-   The Class for Foo has a Nothing for op2 and-                         a Just ($dm_op1, VanillaDM) for op1.-   The Name for $dmop2 is simply discarded.--In *interface-file* class declarations:-  - When parsing, we see if there's an explicit programmer-supplied default method-    because there's an '=' sign to indicate it:-        class Foo a where-          op1 = :: <type>       -- NB the '='-          op2   :: <type>-    We use this info to generate a DefMeth with a suitable RdrName for op1,-    and a NoDefMeth for op2-  - The interface file has a separate definition for $dmop1, with unfolding etc.-  - The renamer renames it to a Name.-  - The renamer treats $dmop1 as a free variable of the declaration, so that-    the binding for $dmop1 will be sucked in.  (See RnHsSyn.tyClDeclFVs)-    This doesn't happen for source code class decls, because they *bind* the default method.--Dictionary functions-~~~~~~~~~~~~~~~~~~~~-Each instance declaration gives rise to one dictionary function binding.--The type checker makes up new source-code instance declarations-(e.g. from 'deriving' or generic default methods --- see-TcInstDcls.tcInstDecls1).  So we can't generate the names for-dictionary functions in advance (we don't know how many we need).--On the other hand for interface-file instance declarations, the decl-specifies the name of the dictionary function, and it has a binding elsewhere-in the interface file:-        instance {Eq Int} = dEqInt-        dEqInt :: {Eq Int} <pragma info>--So again we treat source code and interface file code slightly differently.--Source code:-  - Source code instance decls have a Nothing in the (Maybe name) field-    (see data InstDecl below)--  - The typechecker makes up a Local name for the dict fun for any source-code-    instance decl, whether it comes from a source-code instance decl, or whether-    the instance decl is derived from some other construct (e.g. 'deriving').--  - The occurrence name it chooses is derived from the instance decl (just for-    documentation really) --- e.g. dNumInt.  Two dict funs may share a common-    occurrence name, but will have different uniques.  E.g.-        instance Foo [Int]  where ...-        instance Foo [Bool] where ...-    These might both be dFooList--  - The CoreTidy phase externalises the name, and ensures the occurrence name is-    unique (this isn't special to dict funs).  So we'd get dFooList and dFooList1.--  - We can take this relaxed approach (changing the occurrence name later)-    because dict fun Ids are not captured in a TyCon or Class (unlike default-    methods, say).  Instead, they are kept separately in the InstEnv.  This-    makes it easy to adjust them after compiling a module.  (Once we've finished-    compiling that module, they don't change any more.)---Interface file code:-  - The instance decl gives the dict fun name, so the InstDecl has a (Just name)-    in the (Maybe name) field.--  - RnHsSyn.instDeclFVs treats the dict fun name as free in the decl, so that we-    suck in the dfun binding--}---- | Located Declaration of a Type or Class-type LTyClDecl pass = Located (TyClDecl pass)---- | A type or class declaration.-data TyClDecl pass-  = -- | @type/data family T :: *->*@-    ---    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',-    --             'ApiAnnotation.AnnData',-    --             'ApiAnnotation.AnnFamily','ApiAnnotation.AnnDcolon',-    --             'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpenP',-    --             'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnCloseP',-    --             'ApiAnnotation.AnnEqual','ApiAnnotation.AnnRarrow',-    --             'ApiAnnotation.AnnVbar'--    -- For details on above see note [Api annotations] in ApiAnnotation-    FamDecl { tcdFExt :: XFamDecl pass, tcdFam :: FamilyDecl pass }--  | -- | @type@ declaration-    ---    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',-    --             'ApiAnnotation.AnnEqual',--    -- For details on above see note [Api annotations] in ApiAnnotation-    SynDecl { tcdSExt   :: XSynDecl pass          -- ^ Post renameer, FVs-            , tcdLName  :: Located (IdP pass)     -- ^ Type constructor-            , tcdTyVars :: LHsQTyVars pass        -- ^ Type variables; for an-                                                  -- associated type these-                                                  -- include outer binders-            , tcdFixity :: LexicalFixity    -- ^ Fixity used in the declaration-            , tcdRhs    :: LHsType pass }         -- ^ RHS of type declaration--  | -- | @data@ declaration-    ---    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnData',-    --              'ApiAnnotation.AnnFamily',-    --              'ApiAnnotation.AnnNewType',-    --              'ApiAnnotation.AnnNewType','ApiAnnotation.AnnDcolon'-    --              'ApiAnnotation.AnnWhere',--    -- For details on above see note [Api annotations] in ApiAnnotation-    DataDecl { tcdDExt     :: XDataDecl pass       -- ^ Post renamer, CUSK flag, FVs-             , tcdLName    :: Located (IdP pass)   -- ^ Type constructor-             , tcdTyVars   :: LHsQTyVars pass      -- ^ Type variables-                              -- See Note [TyVar binders for associated declarations]-             , tcdFixity   :: LexicalFixity        -- ^ Fixity used in the declaration-             , tcdDataDefn :: HsDataDefn pass }--  | ClassDecl { tcdCExt    :: XClassDecl pass,         -- ^ Post renamer, FVs-                tcdCtxt    :: LHsContext pass,         -- ^ Context...-                tcdLName   :: Located (IdP pass),      -- ^ Name of the class-                tcdTyVars  :: LHsQTyVars pass,         -- ^ Class type variables-                tcdFixity  :: LexicalFixity, -- ^ Fixity used in the declaration-                tcdFDs     :: [LHsFunDep pass],         -- ^ Functional deps-                tcdSigs    :: [LSig pass],              -- ^ Methods' signatures-                tcdMeths   :: LHsBinds pass,            -- ^ Default methods-                tcdATs     :: [LFamilyDecl pass],       -- ^ Associated types;-                tcdATDefs  :: [LTyFamDefltEqn pass],    -- ^ Associated type defaults-                tcdDocs    :: [LDocDecl]                -- ^ Haddock docs-    }-        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnClass',-        --           'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpen',-        --           'ApiAnnotation.AnnClose'-        --   - The tcdFDs will have 'ApiAnnotation.AnnVbar',-        --                          'ApiAnnotation.AnnComma'-        --                          'ApiAnnotation.AnnRarrow'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | XTyClDecl (XXTyClDecl pass)--type LHsFunDep pass = Located (FunDep (Located (IdP pass)))--data DataDeclRn = DataDeclRn-             { tcdDataCusk :: Bool    -- ^ does this have a CUSK?-             , tcdFVs      :: NameSet }-  deriving Data--{- Note [TyVar binders for associated decls]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For an /associated/ data, newtype, or type-family decl, the LHsQTyVars-/includes/ outer binders.  For example-    class T a where-       data D a c-       type F a b :: *-       type F a b = a -> a-Here the data decl for 'D', and type-family decl for 'F', both include 'a'-in their LHsQTyVars (tcdTyVars and fdTyVars resp).--Ditto any implicit binders in the hsq_implicit field of the LHSQTyVars.--The idea is that the associated type is really a top-level decl in its-own right.  However we are careful to use the same name 'a', so that-we can match things up.--c.f. Note [Associated type tyvar names] in Class.hs-     Note [Family instance declaration binders]--}--type instance XFamDecl      (GhcPass _) = NoExt--type instance XSynDecl      GhcPs = NoExt-type instance XSynDecl      GhcRn = NameSet -- FVs-type instance XSynDecl      GhcTc = NameSet -- FVs--type instance XDataDecl     GhcPs = NoExt-type instance XDataDecl     GhcRn = DataDeclRn-type instance XDataDecl     GhcTc = DataDeclRn--type instance XClassDecl    GhcPs = NoExt-type instance XClassDecl    GhcRn = NameSet -- FVs-type instance XClassDecl    GhcTc = NameSet -- FVs--type instance XXTyClDecl    (GhcPass _) = NoExt---- Simple classifiers for TyClDecl--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~---- | @True@ <=> argument is a @data@\/@newtype@--- declaration.-isDataDecl :: TyClDecl pass -> Bool-isDataDecl (DataDecl {}) = True-isDataDecl _other        = False---- | type or type instance declaration-isSynDecl :: TyClDecl pass -> Bool-isSynDecl (SynDecl {})   = True-isSynDecl _other        = False---- | type class-isClassDecl :: TyClDecl pass -> Bool-isClassDecl (ClassDecl {}) = True-isClassDecl _              = False---- | type/data family declaration-isFamilyDecl :: TyClDecl pass -> Bool-isFamilyDecl (FamDecl {})  = True-isFamilyDecl _other        = False---- | type family declaration-isTypeFamilyDecl :: TyClDecl pass -> Bool-isTypeFamilyDecl (FamDecl _ (FamilyDecl { fdInfo = info })) = case info of-  OpenTypeFamily      -> True-  ClosedTypeFamily {} -> True-  _                   -> False-isTypeFamilyDecl _ = False---- | open type family info-isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool-isOpenTypeFamilyInfo OpenTypeFamily = True-isOpenTypeFamilyInfo _              = False---- | closed type family info-isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool-isClosedTypeFamilyInfo (ClosedTypeFamily {}) = True-isClosedTypeFamilyInfo _                     = False---- | data family declaration-isDataFamilyDecl :: TyClDecl pass -> Bool-isDataFamilyDecl (FamDecl _ (FamilyDecl { fdInfo = DataFamily })) = True-isDataFamilyDecl _other      = False---- Dealing with names--tyFamInstDeclName :: TyFamInstDecl pass -> (IdP pass)-tyFamInstDeclName = unLoc . tyFamInstDeclLName--tyFamInstDeclLName :: TyFamInstDecl pass -> Located (IdP pass)-tyFamInstDeclLName (TyFamInstDecl { tfid_eqn =-                     (HsIB { hsib_body = FamEqn { feqn_tycon = ln }}) })-  = ln-tyFamInstDeclLName (TyFamInstDecl (HsIB _ (XFamEqn _)))-  = panic "tyFamInstDeclLName"-tyFamInstDeclLName (TyFamInstDecl (XHsImplicitBndrs _))-  = panic "tyFamInstDeclLName"--tyClDeclLName :: TyClDecl pass -> Located (IdP pass)-tyClDeclLName (FamDecl { tcdFam = FamilyDecl { fdLName = ln } }) = ln-tyClDeclLName decl = tcdLName decl--tcdName :: TyClDecl pass -> (IdP pass)-tcdName = unLoc . tyClDeclLName--tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass-tyClDeclTyVars (FamDecl { tcdFam = FamilyDecl { fdTyVars = tvs } }) = tvs-tyClDeclTyVars d = tcdTyVars d--countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)-        -- class, synonym decls, data, newtype, family decls-countTyClDecls decls- = (count isClassDecl    decls,-    count isSynDecl      decls,  -- excluding...-    count isDataTy       decls,  -- ...family...-    count isNewTy        decls,  -- ...instances-    count isFamilyDecl   decls)- where-   isDataTy DataDecl{ tcdDataDefn = HsDataDefn { dd_ND = DataType } } = True-   isDataTy _                                                       = False--   isNewTy DataDecl{ tcdDataDefn = HsDataDefn { dd_ND = NewType } } = True-   isNewTy _                                                      = False---- | Does this declaration have a complete, user-supplied kind signature?--- See Note [CUSKs: complete user-supplied kind signatures]-hsDeclHasCusk :: TyClDecl GhcRn -> Bool-hsDeclHasCusk (FamDecl { tcdFam = fam_decl }) = famDeclHasCusk Nothing fam_decl-hsDeclHasCusk (SynDecl { tcdTyVars = tyvars, tcdRhs = rhs })-  -- NB: Keep this synchronized with 'getInitialKind'-  = hsTvbAllKinded tyvars && rhs_annotated rhs-  where-    rhs_annotated (L _ ty) = case ty of-      HsParTy _ lty  -> rhs_annotated lty-      HsKindSig {}   -> True-      _              -> False-hsDeclHasCusk (DataDecl { tcdDExt = DataDeclRn { tcdDataCusk = cusk }}) = cusk-hsDeclHasCusk (ClassDecl { tcdTyVars = tyvars }) = hsTvbAllKinded tyvars-hsDeclHasCusk (XTyClDecl _) = panic "hsDeclHasCusk"---- Pretty-printing TyClDecl--- ~~~~~~~~~~~~~~~~~~~~~~~~--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (TyClDecl p) where--    ppr (FamDecl { tcdFam = decl }) = ppr decl-    ppr (SynDecl { tcdLName = ltycon, tcdTyVars = tyvars, tcdFixity = fixity-                 , tcdRhs = rhs })-      = hang (text "type" <+>-              pp_vanilla_decl_head ltycon tyvars fixity noLHsContext <+> equals)-          4 (ppr rhs)--    ppr (DataDecl { tcdLName = ltycon, tcdTyVars = tyvars, tcdFixity = fixity-                  , tcdDataDefn = defn })-      = pp_data_defn (pp_vanilla_decl_head ltycon tyvars fixity) defn--    ppr (ClassDecl {tcdCtxt = context, tcdLName = lclas, tcdTyVars = tyvars,-                    tcdFixity = fixity,-                    tcdFDs  = fds,-                    tcdSigs = sigs, tcdMeths = methods,-                    tcdATs = ats, tcdATDefs = at_defs})-      | null sigs && isEmptyBag methods && null ats && null at_defs -- No "where" part-      = top_matter--      | otherwise       -- Laid out-      = vcat [ top_matter <+> text "where"-             , nest 2 $ pprDeclList (map (pprFamilyDecl NotTopLevel . unLoc) ats ++-                                     map ppr_fam_deflt_eqn at_defs ++-                                     pprLHsBindsForUser methods sigs) ]-      where-        top_matter = text "class"-                    <+> pp_vanilla_decl_head lclas tyvars fixity context-                    <+> pprFundeps (map unLoc fds)--    ppr (XTyClDecl x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (TyClGroup p) where-  ppr (TyClGroup { group_tyclds = tyclds-                 , group_roles = roles-                 , group_instds = instds-                 }-      )-    = ppr tyclds $$-      ppr roles $$-      ppr instds-  ppr (XTyClGroup x) = ppr x--pp_vanilla_decl_head :: (OutputableBndrId (GhcPass p))-   => Located (IdP (GhcPass p))-   -> LHsQTyVars (GhcPass p)-   -> LexicalFixity-   -> LHsContext (GhcPass p)-   -> SDoc-pp_vanilla_decl_head thing (HsQTvs { hsq_explicit = tyvars }) fixity context- = hsep [pprLHsContext context, pp_tyvars tyvars]-  where-    pp_tyvars (varl:varsr)-      | fixity == Infix && length varsr > 1-         = hsep [char '(',ppr (unLoc varl), pprInfixOcc (unLoc thing)-                , (ppr.unLoc) (head varsr), char ')'-                , hsep (map (ppr.unLoc) (tail varsr))]-      | fixity == Infix-         = hsep [ppr (unLoc varl), pprInfixOcc (unLoc thing)-         , hsep (map (ppr.unLoc) varsr)]-      | otherwise = hsep [ pprPrefixOcc (unLoc thing)-                  , hsep (map (ppr.unLoc) (varl:varsr))]-    pp_tyvars [] = pprPrefixOcc (unLoc thing)-pp_vanilla_decl_head _ (XLHsQTyVars x) _ _ = ppr x--pprTyClDeclFlavour :: TyClDecl (GhcPass p) -> SDoc-pprTyClDeclFlavour (ClassDecl {})   = text "class"-pprTyClDeclFlavour (SynDecl {})     = text "type"-pprTyClDeclFlavour (FamDecl { tcdFam = FamilyDecl { fdInfo = info }})-  = pprFlavour info <+> text "family"-pprTyClDeclFlavour (FamDecl { tcdFam = XFamilyDecl x})-  = ppr x-pprTyClDeclFlavour (DataDecl { tcdDataDefn = HsDataDefn { dd_ND = nd } })-  = ppr nd-pprTyClDeclFlavour (DataDecl { tcdDataDefn = XHsDataDefn x })-  = ppr x-pprTyClDeclFlavour (XTyClDecl x) = ppr x---{- Note [CUSKs: complete user-supplied kind signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We kind-check declarations differently if they have a complete, user-supplied-kind signature (CUSK). This is because we can safely generalise a CUSKed-declaration before checking all of the others, supporting polymorphic recursion.-See ghc.haskell.org/trac/ghc/wiki/GhcKinds/KindInference#Proposednewstrategy-and #9200 for lots of discussion of how we got here.--PRINCIPLE:-  a type declaration has a CUSK iff we could produce a separate kind signature-  for it, just like a type signature for a function,-  looking only at the header of the declaration.--Examples:-  * data T1 (a :: *->*) (b :: *) = ....-    -- Has CUSK; equivalant to   T1 :: (*->*) -> * -> *-- * data T2 a b = ...-   -- No CUSK; we do not want to guess T2 :: * -> * -> *-   -- because the full decl might be   data T a b = MkT (a b)--  * data T3 (a :: k -> *) (b :: *) = ...-    -- CUSK; equivalent to   T3 :: (k -> *) -> * -> *-    -- We lexically generalise over k to get-    --    T3 :: forall k. (k -> *) -> * -> *-    -- The generalisation is here is purely lexical, just like-    --    f3 :: a -> a-    -- means-    --    f3 :: forall a. a -> a--  * data T4 (a :: j k) = ...-     -- CUSK; equivalent to   T4 :: j k -> *-     -- which we lexically generalise to  T4 :: forall j k. j k -> *-     -- and then, if PolyKinds is on, we further generalise to-     --   T4 :: forall kk (j :: kk -> *) (k :: kk). j k -> *-     -- Again this is exactly like what happens as the term level-     -- when you write-     --    f4 :: forall a b. a b -> Int--NOTE THAT-  * A CUSK does /not/ mean that everything about the kind signature is-    fully specified by the user.  Look at T4 and f4: we had do do kind-    inference to figure out the kind-quantification.  But in both cases-    (T4 and f4) that inference is done looking /only/ at the header of T4-    (or signature for f4), not at the definition thereof.--  * The CUSK completely fixes the kind of the type constructor, forever.--  * The precise rules, for each declaration form, for whethher a declaration-    has a CUSK are given in the user manual section "Complete user-supplied-    kind signatures and polymorphic recursion".  BUt they simply implement-    PRINCIPLE above.--  * Open type families are interesting:-      type family T5 a b :: *-    There simply /is/ no accompanying declaration, so that info is all-    we'll ever get.  So we it has a CUSK by definition, and we default-    any un-fixed kind variables to *.--  * Associated types are a bit tricker:-      class C6 a where-         type family T6 a b :: *-         op :: a Int -> Int-    Here C6 does not have a CUSK (in fact we ultimately discover that-    a :: * -> *).  And hence neither does T6, the associated family,-    because we can't fix its kind until we have settled C6.  Another-    way to say it: unlike a top-level, we /may/ discover more about-    a's kind from C6's definition.--  * A data definition with a top-level :: must explicitly bind all-    kind variables to the right of the ::. See test-    dependent/should_compile/KindLevels, which requires this-    case. (Naturally, any kind variable mentioned before the :: should-    not be bound after it.)--    This last point is much more debatable than the others; see-    Trac #15142 comment:22--}---{- *********************************************************************-*                                                                      *-                         TyClGroup-        Strongly connected components of-      type, class, instance, and role declarations-*                                                                      *-********************************************************************* -}--{- Note [TyClGroups and dependency analysis]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A TyClGroup represents a strongly connected components of type/class/instance-decls, together with the role annotations for the type/class declarations.--The hs_tyclds :: [TyClGroup] field of a HsGroup is a dependency-order-sequence of strongly-connected components.--Invariants- * The type and class declarations, group_tyclds, may depend on each-   other, or earlier TyClGroups, but not on later ones-- * The role annotations, group_roles, are role-annotations for some or-   all of the types and classes in group_tyclds (only).-- * The instance declarations, group_instds, may (and usually will)-   depend on group_tyclds, or on earlier TyClGroups, but not on later-   ones.--See Note [Dependency analsis of type, class, and instance decls]-in RnSource for more info.--}---- | Type or Class Group-data TyClGroup pass  -- See Note [TyClGroups and dependency analysis]-  = TyClGroup { group_ext    :: XCTyClGroup pass-              , group_tyclds :: [LTyClDecl pass]-              , group_roles  :: [LRoleAnnotDecl pass]-              , group_instds :: [LInstDecl pass] }-  | XTyClGroup (XXTyClGroup pass)--type instance XCTyClGroup (GhcPass _) = NoExt-type instance XXTyClGroup (GhcPass _) = NoExt---emptyTyClGroup :: TyClGroup (GhcPass p)-emptyTyClGroup = TyClGroup noExt [] [] []--tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]-tyClGroupTyClDecls = concatMap group_tyclds--tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]-tyClGroupInstDecls = concatMap group_instds--tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]-tyClGroupRoleDecls = concatMap group_roles--mkTyClGroup :: [LTyClDecl (GhcPass p)] -> [LInstDecl (GhcPass p)]-            -> TyClGroup (GhcPass p)-mkTyClGroup decls instds = TyClGroup-  { group_ext = noExt-  , group_tyclds = decls-  , group_roles = []-  , group_instds = instds-  }----{- *********************************************************************-*                                                                      *-               Data and type family declarations-*                                                                      *-********************************************************************* -}--{- Note [FamilyResultSig]-~~~~~~~~~~~~~~~~~~~~~~~~~--This data type represents the return signature of a type family.  Possible-values are:-- * NoSig - the user supplied no return signature:-      type family Id a where ...-- * KindSig - the user supplied the return kind:-      type family Id a :: * where ...-- * TyVarSig - user named the result with a type variable and possibly-   provided a kind signature for that variable:-      type family Id a = r where ...-      type family Id a = (r :: *) where ...--   Naming result of a type family is required if we want to provide-   injectivity annotation for a type family:-      type family Id a = r | r -> a where ...--See also: Note [Injectivity annotation]--Note [Injectivity annotation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--A user can declare a type family to be injective:--   type family Id a = r | r -> a where ...-- * The part after the "|" is called "injectivity annotation".- * "r -> a" part is called "injectivity condition"; at the moment terms-   "injectivity annotation" and "injectivity condition" are synonymous-   because we only allow a single injectivity condition.- * "r" is the "LHS of injectivity condition". LHS can only contain the-   variable naming the result of a type family.-- * "a" is the "RHS of injectivity condition". RHS contains space-separated-   type and kind variables representing the arguments of a type-   family. Variables can be omitted if a type family is not injective in-   these arguments. Example:-         type family Foo a b c = d | d -> a c where ...--Note that:- (a) naming of type family result is required to provide injectivity-     annotation- (b) for associated types if the result was named then injectivity annotation-     is mandatory. Otherwise result type variable is indistinguishable from-     associated type default.--It is possible that in the future this syntax will be extended to support-more complicated injectivity annotations. For example we could declare that-if we know the result of Plus and one of its arguments we can determine the-other argument:--   type family Plus a b = (r :: Nat) | r a -> b, r b -> a where ...--Here injectivity annotation would consist of two comma-separated injectivity-conditions.--See also Note [Injective type families] in TyCon--}---- | Located type Family Result Signature-type LFamilyResultSig pass = Located (FamilyResultSig pass)---- | type Family Result Signature-data FamilyResultSig pass = -- see Note [FamilyResultSig]-    NoSig (XNoSig pass)-  -- ^ - 'ApiAnnotation.AnnKeywordId' :--  -- For details on above see note [Api annotations] in ApiAnnotation--  | KindSig  (XCKindSig pass) (LHsKind pass)-  -- ^ - 'ApiAnnotation.AnnKeywordId' :-  --             'ApiAnnotation.AnnOpenP','ApiAnnotation.AnnDcolon',-  --             'ApiAnnotation.AnnCloseP'--  -- For details on above see note [Api annotations] in ApiAnnotation--  | TyVarSig (XTyVarSig pass) (LHsTyVarBndr pass)-  -- ^ - 'ApiAnnotation.AnnKeywordId' :-  --             'ApiAnnotation.AnnOpenP','ApiAnnotation.AnnDcolon',-  --             'ApiAnnotation.AnnCloseP', 'ApiAnnotation.AnnEqual'-  | XFamilyResultSig (XXFamilyResultSig pass)--  -- For details on above see note [Api annotations] in ApiAnnotation--type instance XNoSig            (GhcPass _) = NoExt-type instance XCKindSig         (GhcPass _) = NoExt-type instance XTyVarSig         (GhcPass _) = NoExt-type instance XXFamilyResultSig (GhcPass _) = NoExt----- | Located type Family Declaration-type LFamilyDecl pass = Located (FamilyDecl pass)---- | type Family Declaration-data FamilyDecl pass = FamilyDecl-  { fdExt            :: XCFamilyDecl pass-  , fdInfo           :: FamilyInfo pass              -- type/data, closed/open-  , fdLName          :: Located (IdP pass)           -- type constructor-  , fdTyVars         :: LHsQTyVars pass              -- type variables-                       -- See Note [TyVar binders for associated declarations]-  , fdFixity         :: LexicalFixity                -- Fixity used in the declaration-  , fdResultSig      :: LFamilyResultSig pass        -- result signature-  , fdInjectivityAnn :: Maybe (LInjectivityAnn pass) -- optional injectivity ann-  }-  | XFamilyDecl (XXFamilyDecl pass)-  -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',-  --             'ApiAnnotation.AnnData', 'ApiAnnotation.AnnFamily',-  --             'ApiAnnotation.AnnWhere', 'ApiAnnotation.AnnOpenP',-  --             'ApiAnnotation.AnnDcolon', 'ApiAnnotation.AnnCloseP',-  --             'ApiAnnotation.AnnEqual', 'ApiAnnotation.AnnRarrow',-  --             'ApiAnnotation.AnnVbar'--  -- For details on above see note [Api annotations] in ApiAnnotation--type instance XCFamilyDecl    (GhcPass _) = NoExt-type instance XXFamilyDecl    (GhcPass _) = NoExt----- | Located Injectivity Annotation-type LInjectivityAnn pass = Located (InjectivityAnn pass)---- | If the user supplied an injectivity annotation it is represented using--- InjectivityAnn. At the moment this is a single injectivity condition - see--- Note [Injectivity annotation]. `Located name` stores the LHS of injectivity--- condition. `[Located name]` stores the RHS of injectivity condition. Example:------   type family Foo a b c = r | r -> a c where ...------ This will be represented as "InjectivityAnn `r` [`a`, `c`]"-data InjectivityAnn pass-  = InjectivityAnn (Located (IdP pass)) [Located (IdP pass)]-  -- ^ - 'ApiAnnotation.AnnKeywordId' :-  --             'ApiAnnotation.AnnRarrow', 'ApiAnnotation.AnnVbar'--  -- For details on above see note [Api annotations] in ApiAnnotation--data FamilyInfo pass-  = DataFamily-  | OpenTypeFamily-     -- | 'Nothing' if we're in an hs-boot file and the user-     -- said "type family Foo x where .."-  | ClosedTypeFamily (Maybe [LTyFamInstEqn pass])---- | Does this family declaration have a complete, user-supplied kind signature?--- See Note [CUSKs: complete user-supplied kind signatures]-famDeclHasCusk :: Maybe Bool-                   -- ^ if associated, does the enclosing class have a CUSK?-               -> FamilyDecl pass -> Bool-famDeclHasCusk _ (FamilyDecl { fdInfo      = ClosedTypeFamily _-                             , fdTyVars    = tyvars-                             , fdResultSig = L _ resultSig })-  = hsTvbAllKinded tyvars && hasReturnKindSignature resultSig-famDeclHasCusk mb_class_cusk _ = mb_class_cusk `orElse` True-        -- all un-associated open families have CUSKs---- | Does this family declaration have user-supplied return kind signature?-hasReturnKindSignature :: FamilyResultSig a -> Bool-hasReturnKindSignature (NoSig _)                        = False-hasReturnKindSignature (TyVarSig _ (L _ (UserTyVar{}))) = False-hasReturnKindSignature _                                = True---- | Maybe return name of the result type variable-resultVariableName :: FamilyResultSig a -> Maybe (IdP a)-resultVariableName (TyVarSig _ sig) = Just $ hsLTyVarName sig-resultVariableName _                = Nothing--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (FamilyDecl p) where-  ppr = pprFamilyDecl TopLevel--pprFamilyDecl :: (OutputableBndrId (GhcPass p))-              => TopLevelFlag -> FamilyDecl (GhcPass p) -> SDoc-pprFamilyDecl top_level (FamilyDecl { fdInfo = info, fdLName = ltycon-                                    , fdTyVars = tyvars-                                    , fdFixity = fixity-                                    , fdResultSig = L _ result-                                    , fdInjectivityAnn = mb_inj })-  = vcat [ pprFlavour info <+> pp_top_level <+>-           pp_vanilla_decl_head ltycon tyvars fixity noLHsContext <+>-           pp_kind <+> pp_inj <+> pp_where-         , nest 2 $ pp_eqns ]-  where-    pp_top_level = case top_level of-                     TopLevel    -> text "family"-                     NotTopLevel -> empty--    pp_kind = case result of-                NoSig    _         -> empty-                KindSig  _ kind    -> dcolon <+> ppr kind-                TyVarSig _ tv_bndr -> text "=" <+> ppr tv_bndr-                XFamilyResultSig x -> ppr x-    pp_inj = case mb_inj of-               Just (L _ (InjectivityAnn lhs rhs)) ->-                 hsep [ vbar, ppr lhs, text "->", hsep (map ppr rhs) ]-               Nothing -> empty-    (pp_where, pp_eqns) = case info of-      ClosedTypeFamily mb_eqns ->-        ( text "where"-        , case mb_eqns of-            Nothing   -> text ".."-            Just eqns -> vcat $ map (ppr_fam_inst_eqn . unLoc) eqns )-      _ -> (empty, empty)-pprFamilyDecl _ (XFamilyDecl x) = ppr x--pprFlavour :: FamilyInfo pass -> SDoc-pprFlavour DataFamily            = text "data"-pprFlavour OpenTypeFamily        = text "type"-pprFlavour (ClosedTypeFamily {}) = text "type"--instance Outputable (FamilyInfo pass) where-  ppr info = pprFlavour info <+> text "family"----{- *********************************************************************-*                                                                      *-               Data types and data constructors-*                                                                      *-********************************************************************* -}---- | Haskell Data type Definition-data HsDataDefn pass   -- The payload of a data type defn-                       -- Used *both* for vanilla data declarations,-                       --       *and* for data family instances-  = -- | Declares a data type or newtype, giving its constructors-    -- @-    --  data/newtype T a = <constrs>-    --  data/newtype instance T [a] = <constrs>-    -- @-    HsDataDefn { dd_ext    :: XCHsDataDefn pass,-                 dd_ND     :: NewOrData,-                 dd_ctxt   :: LHsContext pass,           -- ^ Context-                 dd_cType  :: Maybe (Located CType),-                 dd_kindSig:: Maybe (LHsKind pass),-                     -- ^ Optional kind signature.-                     ---                     -- @(Just k)@ for a GADT-style @data@,-                     -- or @data instance@ decl, with explicit kind sig-                     ---                     -- Always @Nothing@ for H98-syntax decls--                 dd_cons   :: [LConDecl pass],-                     -- ^ Data constructors-                     ---                     -- For @data T a = T1 | T2 a@-                     --   the 'LConDecl's all have 'ConDeclH98'.-                     -- For @data T a where { T1 :: T a }@-                     --   the 'LConDecls' all have 'ConDeclGADT'.--                 dd_derivs :: HsDeriving pass  -- ^ Optional 'deriving' claues--             -- For details on above see note [Api annotations] in ApiAnnotation-   }-  | XHsDataDefn (XXHsDataDefn pass)--type instance XCHsDataDefn    (GhcPass _) = NoExt-type instance XXHsDataDefn    (GhcPass _) = NoExt---- | Haskell Deriving clause-type HsDeriving pass = Located [LHsDerivingClause pass]-  -- ^ The optional @deriving@ clauses of a data declaration. "Clauses" is-  -- plural because one can specify multiple deriving clauses using the-  -- @-XDerivingStrategies@ language extension.-  ---  -- The list of 'LHsDerivingClause's corresponds to exactly what the user-  -- requested to derive, in order. If no deriving clauses were specified,-  -- the list is empty.--type LHsDerivingClause pass = Located (HsDerivingClause pass)---- | A single @deriving@ clause of a data declaration.------  - 'ApiAnnotation.AnnKeywordId' :---       'ApiAnnotation.AnnDeriving', 'ApiAnnotation.AnnStock',---       'ApiAnnotation.AnnAnyClass', 'Api.AnnNewtype',---       'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'-data HsDerivingClause pass-  -- See Note [Deriving strategies] in TcDeriv-  = HsDerivingClause-    { deriv_clause_ext :: XCHsDerivingClause pass-    , deriv_clause_strategy :: Maybe (LDerivStrategy pass)-      -- ^ The user-specified strategy (if any) to use when deriving-      -- 'deriv_clause_tys'.-    , deriv_clause_tys :: Located [LHsSigType pass]-      -- ^ The types to derive.-      ---      -- It uses 'LHsSigType's because, with @-XGeneralizedNewtypeDeriving@,-      -- we can mention type variables that aren't bound by the datatype, e.g.-      ---      -- > data T b = ... deriving (C [a])-      ---      -- should produce a derived instance for @C [a] (T b)@.-    }-  | XHsDerivingClause (XXHsDerivingClause pass)--type instance XCHsDerivingClause    (GhcPass _) = NoExt-type instance XXHsDerivingClause    (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (HsDerivingClause p) where-  ppr (HsDerivingClause { deriv_clause_strategy = dcs-                        , deriv_clause_tys      = L _ dct })-    = hsep [ text "deriving"-           , pp_strat_before-           , pp_dct dct-           , pp_strat_after ]-      where-        -- This complexity is to distinguish between-        --    deriving Show-        --    deriving (Show)-        pp_dct [HsIB { hsib_body = ty }]-                 = ppr (parenthesizeHsType appPrec ty)-        pp_dct _ = parens (interpp'SP dct)--        -- @via@ is unique in that in comes /after/ the class being derived,-        -- so we must special-case it.-        (pp_strat_before, pp_strat_after) =-          case dcs of-            Just (L _ via@ViaStrategy{}) -> (empty, ppr via)-            _                            -> (ppDerivStrategy dcs, empty)-  ppr (XHsDerivingClause x) = ppr x--data NewOrData-  = NewType                     -- ^ @newtype Blah ...@-  | DataType                    -- ^ @data Blah ...@-  deriving( Eq, Data )                -- Needed because Demand derives Eq---- | Convert a 'NewOrData' to a 'TyConFlavour'-newOrDataToFlavour :: NewOrData -> TyConFlavour-newOrDataToFlavour NewType  = NewtypeFlavour-newOrDataToFlavour DataType = DataTypeFlavour---- | Located data Constructor Declaration-type LConDecl pass = Located (ConDecl pass)-      -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when-      --   in a GADT constructor list--  -- For details on above see note [Api annotations] in ApiAnnotation---- |------ @--- data T b = forall a. Eq a => MkT a b---   MkT :: forall b a. Eq a => MkT a b------ data T b where---      MkT1 :: Int -> T Int------ data T = Int `MkT` Int---        | MkT2------ data T a where---      Int `MkT` Int :: T Int--- @------ - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen',---            'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnCLose',---            'ApiAnnotation.AnnEqual','ApiAnnotation.AnnVbar',---            'ApiAnnotation.AnnDarrow','ApiAnnotation.AnnDarrow',---            'ApiAnnotation.AnnForall','ApiAnnotation.AnnDot'---- For details on above see note [Api annotations] in ApiAnnotation---- | data Constructor Declaration-data ConDecl pass-  = ConDeclGADT-      { con_g_ext   :: XConDeclGADT pass-      , con_names   :: [Located (IdP pass)]--      -- The next four fields describe the type after the '::'-      -- See Note [GADT abstract syntax]-      -- The following field is Located to anchor API Annotations,-      -- AnnForall and AnnDot.-      , con_forall  :: Located Bool      -- ^ True <=> explicit forall-                                         --   False => hsq_explicit is empty-      , con_qvars   :: LHsQTyVars pass-                       -- Whether or not there is an /explicit/ forall, we still-                       -- need to capture the implicitly-bound type/kind variables--      , con_mb_cxt  :: Maybe (LHsContext pass) -- ^ User-written context (if any)-      , con_args    :: HsConDeclDetails pass   -- ^ Arguments; never InfixCon-      , con_res_ty  :: LHsType pass            -- ^ Result type--      , con_doc     :: Maybe LHsDocString-          -- ^ A possible Haddock comment.-      }--  | ConDeclH98-      { con_ext     :: XConDeclH98 pass-      , con_name    :: Located (IdP pass)--      , con_forall  :: Located Bool-                              -- ^ True <=> explicit user-written forall-                              --     e.g. data T a = forall b. MkT b (b->a)-                              --     con_ex_tvs = {b}-                              -- False => con_ex_tvs is empty-      , con_ex_tvs :: [LHsTyVarBndr pass]      -- ^ Existentials only-      , con_mb_cxt :: Maybe (LHsContext pass)  -- ^ User-written context (if any)-      , con_args   :: HsConDeclDetails pass    -- ^ Arguments; can be InfixCon--      , con_doc       :: Maybe LHsDocString-          -- ^ A possible Haddock comment.-      }-  | XConDecl (XXConDecl pass)--type instance XConDeclGADT (GhcPass _) = NoExt-type instance XConDeclH98  (GhcPass _) = NoExt-type instance XXConDecl    (GhcPass _) = NoExt--{- Note [GADT abstract syntax]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There's a wrinkle in ConDeclGADT--* For record syntax, it's all uniform.  Given:-      data T a where-        K :: forall a. Ord a => { x :: [a], ... } -> T a-    we make the a ConDeclGADT for K with-       con_qvars  = {a}-       con_mb_cxt = Just [Ord a]-       con_args   = RecCon <the record fields>-       con_res_ty = T a--  We need the RecCon before the reanmer, so we can find the record field-  binders in HsUtils.hsConDeclsBinders.--* However for a GADT constr declaration which is not a record, it can-  be hard parse until we know operator fixities. Consider for example-     C :: a :*: b -> a :*: b -> a :+: b-  Initially this type will parse as-      a :*: (b -> (a :*: (b -> (a :+: b))))-  so it's hard to split up the arguments until we've done the precedence-  resolution (in the renamer).--  So:  - In the parser (RdrHsSyn.mkGadtDecl), we put the whole constr-         type into the res_ty for a ConDeclGADT for now, and use-         PrefixCon []-            con_args   = PrefixCon []-            con_res_ty = a :*: (b -> (a :*: (b -> (a :+: b))))--       - In the renamer (RnSource.rnConDecl), we unravel it afer-         operator fixities are sorted. So we generate. So we end-         up with-            con_args   = PrefixCon [ a :*: b, a :*: b ]-            con_res_ty = a :+: b--}---- | Haskell data Constructor Declaration Details-type HsConDeclDetails pass-   = HsConDetails (LBangType pass) (Located [LConDeclField pass])--getConNames :: ConDecl pass -> [Located (IdP pass)]-getConNames ConDeclH98  {con_name  = name}  = [name]-getConNames ConDeclGADT {con_names = names} = names-getConNames XConDecl {} = panic "getConNames"--getConArgs :: ConDecl pass -> HsConDeclDetails pass-getConArgs d = con_args d--hsConDeclArgTys :: HsConDeclDetails pass -> [LBangType pass]-hsConDeclArgTys (PrefixCon tys)    = tys-hsConDeclArgTys (InfixCon ty1 ty2) = [ty1,ty2]-hsConDeclArgTys (RecCon flds)      = map (cd_fld_type . unLoc) (unLoc flds)--hsConDeclTheta :: Maybe (LHsContext pass) -> [LHsType pass]-hsConDeclTheta Nothing            = []-hsConDeclTheta (Just (L _ theta)) = theta--pp_data_defn :: (OutputableBndrId (GhcPass p))-                  => (LHsContext (GhcPass p) -> SDoc)   -- Printing the header-                  -> HsDataDefn (GhcPass p)-                  -> SDoc-pp_data_defn pp_hdr (HsDataDefn { dd_ND = new_or_data, dd_ctxt = context-                                , dd_cType = mb_ct-                                , dd_kindSig = mb_sig-                                , dd_cons = condecls, dd_derivs = derivings })-  | null condecls-  = ppr new_or_data <+> pp_ct <+> pp_hdr context <+> pp_sig-    <+> pp_derivings derivings--  | otherwise-  = hang (ppr new_or_data <+> pp_ct  <+> pp_hdr context <+> pp_sig)-       2 (pp_condecls condecls $$ pp_derivings derivings)-  where-    pp_ct = case mb_ct of-               Nothing   -> empty-               Just ct -> ppr ct-    pp_sig = case mb_sig of-               Nothing   -> empty-               Just kind -> dcolon <+> ppr kind-    pp_derivings (L _ ds) = vcat (map ppr ds)-pp_data_defn _ (XHsDataDefn x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (HsDataDefn p) where-   ppr d = pp_data_defn (\_ -> text "Naked HsDataDefn") d--instance Outputable NewOrData where-  ppr NewType  = text "newtype"-  ppr DataType = text "data"--pp_condecls :: (OutputableBndrId (GhcPass p)) => [LConDecl (GhcPass p)] -> SDoc-pp_condecls cs@(L _ ConDeclGADT{} : _) -- In GADT syntax-  = hang (text "where") 2 (vcat (map ppr cs))-pp_condecls cs                    -- In H98 syntax-  = equals <+> sep (punctuate (text " |") (map ppr cs))--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (ConDecl p) where-    ppr = pprConDecl--pprConDecl :: (OutputableBndrId (GhcPass p)) => ConDecl (GhcPass p) -> SDoc-pprConDecl (ConDeclH98 { con_name = L _ con-                       , con_ex_tvs = ex_tvs-                       , con_mb_cxt = mcxt-                       , con_args = args-                       , con_doc = doc })-  = sep [ppr_mbDoc doc, pprHsForAll ex_tvs cxt, ppr_details args]-  where-    ppr_details (InfixCon t1 t2) = hsep [ppr t1, pprInfixOcc con, ppr t2]-    ppr_details (PrefixCon tys)  = hsep (pprPrefixOcc con-                                   : map (pprHsType . unLoc) tys)-    ppr_details (RecCon fields)  = pprPrefixOcc con-                                 <+> pprConDeclFields (unLoc fields)-    cxt = fromMaybe noLHsContext mcxt--pprConDecl (ConDeclGADT { con_names = cons, con_qvars = qvars-                        , con_mb_cxt = mcxt, con_args = args-                        , con_res_ty = res_ty, con_doc = doc })-  = ppr_mbDoc doc <+> ppr_con_names cons <+> dcolon-    <+> (sep [pprHsForAll (hsq_explicit qvars) cxt,-              ppr_arrow_chain (get_args args ++ [ppr res_ty]) ])-  where-    get_args (PrefixCon args) = map ppr args-    get_args (RecCon fields)  = [pprConDeclFields (unLoc fields)]-    get_args (InfixCon {})    = pprPanic "pprConDecl:GADT" (ppr cons)--    cxt = fromMaybe noLHsContext mcxt--    ppr_arrow_chain (a:as) = sep (a : map (arrow <+>) as)-    ppr_arrow_chain []     = empty--pprConDecl (XConDecl x) = ppr x--ppr_con_names :: (OutputableBndr a) => [Located a] -> SDoc-ppr_con_names = pprWithCommas (pprPrefixOcc . unLoc)--{--************************************************************************-*                                                                      *-                Instance declarations-*                                                                      *-************************************************************************--Note [Type family instance declarations in HsSyn]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The data type FamEqn represents one equation of a type family instance.-Aside from the pass, it is also parameterised over two fields:-feqn_pats and feqn_rhs.--feqn_pats is either LHsTypes (for ordinary data/type family instances) or-LHsQTyVars (for associated type family default instances). In particular:-- * An ordinary type family instance declaration looks like this in source Haskell-      type instance T [a] Int = a -> a-   (or something similar for a closed family)-   It is represented by a FamInstEqn, with a *type* (LHsType) in the feqn_pats-   field.-- * On the other hand, the *default instance* of an associated type looks like-   this in source Haskell-      class C a where-        type T a b-        type T a b = a -> b   -- The default instance-   It is represented by a TyFamDefltEqn, with *type variables* (LHsQTyVars) in-   the feqn_pats field.--feqn_rhs is either an HsDataDefn (for data family instances) or an LHsType-(for type family instances).--}------------------- Type synonym family instances ----------------- | Located Type Family Instance Equation-type LTyFamInstEqn pass = Located (TyFamInstEqn pass)-  -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'-  --   when in a list---- For details on above see note [Api annotations] in ApiAnnotation---- | Located Type Family Default Equation-type LTyFamDefltEqn pass = Located (TyFamDefltEqn pass)---- | Haskell Type Patterns-type HsTyPats pass = [LHsTypeArg pass]--{- Note [Family instance declaration binders]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For ordinary data/type family instances, the feqn_pats field of FamEqn stores-the LHS type (and kind) patterns. Any type (and kind) variables contained-in these type patterns are bound in the hsib_vars field of the HsImplicitBndrs-in FamInstEqn depending on whether or not an explicit forall is present. In-the case of an explicit forall, the hsib_vars only includes kind variables not-bound in the forall. Otherwise, all type (and kind) variables are bound in-the hsib_vars. In the latter case, note that in particular--* The hsib_vars *includes* any anonymous wildcards.  For example-     type instance F a _ = a-  The hsib_vars will be {a, _}.  Remember that each separate wildcard-  '_' gets its own unique.  In this context wildcards behave just like-  an ordinary type variable, only anonymous.--* The hsib_vars *includes* type variables that are already in scope--   Eg   class C s t where-          type F t p :: *-        instance C w (a,b) where-          type F (a,b) x = x->a-   The hsib_vars of the F decl are {a,b,x}, even though the F decl-   is nested inside the 'instance' decl.--   However after the renamer, the uniques will match up:-        instance C w7 (a8,b9) where-          type F (a8,b9) x10 = x10->a8-   so that we can compare the type pattern in the 'instance' decl and-   in the associated 'type' decl--For associated type family default instances (TyFamDefltEqn), instead of using-type patterns with binders in a surrounding HsImplicitBndrs, we use raw type-variables (LHsQTyVars) in the feqn_pats field of FamEqn.--c.f. Note [TyVar binders for associated declarations]--}---- | Type Family Instance Equation-type TyFamInstEqn pass = FamInstEqn pass (LHsType pass)---- | Type Family Default Equation-type TyFamDefltEqn pass = FamEqn pass (LHsQTyVars pass) (LHsType pass)-  -- See Note [Type family instance declarations in HsSyn]---- | Located Type Family Instance Declaration-type LTyFamInstDecl pass = Located (TyFamInstDecl pass)---- | Type Family Instance Declaration-newtype TyFamInstDecl pass = TyFamInstDecl { tfid_eqn :: TyFamInstEqn pass }-    -- ^-    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',-    --           'ApiAnnotation.AnnInstance',--    -- For details on above see note [Api annotations] in ApiAnnotation------------------- Data family instances ----------------- | Located Data Family Instance Declaration-type LDataFamInstDecl pass = Located (DataFamInstDecl pass)---- | Data Family Instance Declaration-newtype DataFamInstDecl pass-  = DataFamInstDecl { dfid_eqn :: FamInstEqn pass (HsDataDefn pass) }-    -- ^-    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnData',-    --           'ApiAnnotation.AnnNewType','ApiAnnotation.AnnInstance',-    --           'ApiAnnotation.AnnDcolon'-    --           'ApiAnnotation.AnnWhere','ApiAnnotation.AnnOpen',-    --           'ApiAnnotation.AnnClose'--    -- For details on above see note [Api annotations] in ApiAnnotation------------------- Family instances (common types) ----------------- | Located Family Instance Equation-type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs)---- | Family Instance Equation-type FamInstEqn pass rhs-  = HsImplicitBndrs pass (FamEqn pass (HsTyPats pass) rhs)-            -- ^ Here, the @pats@ are type patterns (with kind and type bndrs).-            -- See Note [Family instance declaration binders]---- | Family Equation------ One equation in a type family instance declaration, data family instance--- declaration, or type family default.--- See Note [Type family instance declarations in HsSyn]--- See Note [Family instance declaration binders]-data FamEqn pass pats rhs-  = FamEqn-       { feqn_ext    :: XCFamEqn pass pats rhs-       , feqn_tycon  :: Located (IdP pass)-       , feqn_bndrs  :: Maybe [LHsTyVarBndr pass] -- ^ Optional quantified type vars-       , feqn_pats   :: pats-       , feqn_fixity :: LexicalFixity -- ^ Fixity used in the declaration-       , feqn_rhs    :: rhs-       }-    -- ^-    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual'-  | XFamEqn (XXFamEqn pass pats rhs)--    -- For details on above see note [Api annotations] in ApiAnnotation--type instance XCFamEqn    (GhcPass _) p r = NoExt-type instance XXFamEqn    (GhcPass _) p r = NoExt------------------- Class instances ----------------- | Located Class Instance Declaration-type LClsInstDecl pass = Located (ClsInstDecl pass)---- | Class Instance Declaration-data ClsInstDecl pass-  = ClsInstDecl-      { cid_ext     :: XCClsInstDecl pass-      , cid_poly_ty :: LHsSigType pass    -- Context => Class Instance-type-                                          -- Using a polytype means that the renamer conveniently-                                          -- figures out the quantified type variables for us.-      , cid_binds         :: LHsBinds pass       -- Class methods-      , cid_sigs          :: [LSig pass]         -- User-supplied pragmatic info-      , cid_tyfam_insts   :: [LTyFamInstDecl pass]   -- Type family instances-      , cid_datafam_insts :: [LDataFamInstDecl pass] -- Data family instances-      , cid_overlap_mode  :: Maybe (Located OverlapMode)-         -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-         --                                    'ApiAnnotation.AnnClose',--        -- For details on above see note [Api annotations] in ApiAnnotation-      }-    -- ^-    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnInstance',-    --           'ApiAnnotation.AnnWhere',-    --           'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',--    -- For details on above see note [Api annotations] in ApiAnnotation-  | XClsInstDecl (XXClsInstDecl pass)--type instance XCClsInstDecl    (GhcPass _) = NoExt-type instance XXClsInstDecl    (GhcPass _) = NoExt------------------- Instances of all kinds ----------------- | Located Instance Declaration-type LInstDecl pass = Located (InstDecl pass)---- | Instance Declaration-data InstDecl pass  -- Both class and family instances-  = ClsInstD-      { cid_d_ext :: XClsInstD pass-      , cid_inst  :: ClsInstDecl pass }-  | DataFamInstD              -- data family instance-      { dfid_ext  :: XDataFamInstD pass-      , dfid_inst :: DataFamInstDecl pass }-  | TyFamInstD              -- type family instance-      { tfid_ext  :: XTyFamInstD pass-      , tfid_inst :: TyFamInstDecl pass }-  | XInstDecl (XXInstDecl pass)--type instance XClsInstD     (GhcPass _) = NoExt-type instance XDataFamInstD (GhcPass _) = NoExt-type instance XTyFamInstD   (GhcPass _) = NoExt-type instance XXInstDecl    (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (TyFamInstDecl p) where-  ppr = pprTyFamInstDecl TopLevel--pprTyFamInstDecl :: (OutputableBndrId (GhcPass p))-                 => TopLevelFlag -> TyFamInstDecl (GhcPass p) -> SDoc-pprTyFamInstDecl top_lvl (TyFamInstDecl { tfid_eqn = eqn })-   = text "type" <+> ppr_instance_keyword top_lvl <+> ppr_fam_inst_eqn eqn--ppr_instance_keyword :: TopLevelFlag -> SDoc-ppr_instance_keyword TopLevel    = text "instance"-ppr_instance_keyword NotTopLevel = empty--ppr_fam_inst_eqn :: (OutputableBndrId (GhcPass p))-                 => TyFamInstEqn (GhcPass p) -> SDoc-ppr_fam_inst_eqn (HsIB { hsib_body = FamEqn { feqn_tycon  = L _ tycon-                                            , feqn_bndrs  = bndrs-                                            , feqn_pats   = pats-                                            , feqn_fixity = fixity-                                            , feqn_rhs    = rhs }})-    = pprHsFamInstLHS tycon bndrs pats fixity noLHsContext <+> equals <+> ppr rhs-ppr_fam_inst_eqn (HsIB { hsib_body = XFamEqn x }) = ppr x-ppr_fam_inst_eqn (XHsImplicitBndrs x) = ppr x--ppr_fam_deflt_eqn :: (OutputableBndrId (GhcPass p))-                  => LTyFamDefltEqn (GhcPass p) -> SDoc-ppr_fam_deflt_eqn (L _ (FamEqn { feqn_tycon  = tycon-                               , feqn_pats   = tvs-                               , feqn_fixity = fixity-                               , feqn_rhs    = rhs }))-    = text "type" <+> pp_vanilla_decl_head tycon tvs fixity noLHsContext-                  <+> equals <+> ppr rhs-ppr_fam_deflt_eqn (L _ (XFamEqn x)) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (DataFamInstDecl p) where-  ppr = pprDataFamInstDecl TopLevel--pprDataFamInstDecl :: (OutputableBndrId (GhcPass p))-                   => TopLevelFlag -> DataFamInstDecl (GhcPass p) -> SDoc-pprDataFamInstDecl top_lvl (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-                             FamEqn { feqn_tycon  = L _ tycon-                                    , feqn_bndrs  = bndrs-                                    , feqn_pats   = pats-                                    , feqn_fixity = fixity-                                    , feqn_rhs    = defn }}})-  = pp_data_defn pp_hdr defn-  where-    pp_hdr ctxt = ppr_instance_keyword top_lvl-              <+> pprHsFamInstLHS tycon bndrs pats fixity ctxt-                  -- pp_data_defn pretty-prints the kind sig. See #14817.--pprDataFamInstDecl _ (DataFamInstDecl (HsIB _ (XFamEqn x)))-  = ppr x-pprDataFamInstDecl _ (DataFamInstDecl (XHsImplicitBndrs x))-  = ppr x--pprDataFamInstFlavour :: DataFamInstDecl (GhcPass p) -> SDoc-pprDataFamInstFlavour (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-                        FamEqn { feqn_rhs = HsDataDefn { dd_ND = nd }}}})-  = ppr nd-pprDataFamInstFlavour (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-                        FamEqn { feqn_rhs = XHsDataDefn x}}})-  = ppr x-pprDataFamInstFlavour (DataFamInstDecl (HsIB _ (XFamEqn x)))-  = ppr x-pprDataFamInstFlavour (DataFamInstDecl (XHsImplicitBndrs x))-  = ppr x--pprHsFamInstLHS :: (OutputableBndrId (GhcPass p))-   => IdP (GhcPass p)-   -> Maybe [LHsTyVarBndr (GhcPass p)]-   -> HsTyPats (GhcPass p)-   -> LexicalFixity-   -> LHsContext (GhcPass p)-   -> SDoc-pprHsFamInstLHS thing bndrs typats fixity mb_ctxt-   = hsep [ pprHsExplicitForAll bndrs-          , pprLHsContext mb_ctxt-          , pp_pats typats ]-   where-     pp_pats (patl:patr:pats)-       | Infix <- fixity-       = let pp_op_app = hsep [ ppr patl, pprInfixOcc thing, ppr patr ] in-         case pats of-           [] -> pp_op_app-           _  -> hsep (parens pp_op_app : map ppr pats)--     pp_pats pats = hsep [ pprPrefixOcc thing-                         , hsep (map ppr pats)]--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (ClsInstDecl p) where-    ppr (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = binds-                     , cid_sigs = sigs, cid_tyfam_insts = ats-                     , cid_overlap_mode = mbOverlap-                     , cid_datafam_insts = adts })-      | null sigs, null ats, null adts, isEmptyBag binds  -- No "where" part-      = top_matter--      | otherwise       -- Laid out-      = vcat [ top_matter <+> text "where"-             , nest 2 $ pprDeclList $-               map (pprTyFamInstDecl NotTopLevel . unLoc)   ats ++-               map (pprDataFamInstDecl NotTopLevel . unLoc) adts ++-               pprLHsBindsForUser binds sigs ]-      where-        top_matter = text "instance" <+> ppOverlapPragma mbOverlap-                                             <+> ppr inst_ty-    ppr (XClsInstDecl x) = ppr x--ppDerivStrategy :: (p ~ GhcPass pass, OutputableBndrId p)-                => Maybe (LDerivStrategy p) -> SDoc-ppDerivStrategy mb =-  case mb of-    Nothing       -> empty-    Just (L _ ds) -> ppr ds--ppOverlapPragma :: Maybe (Located OverlapMode) -> SDoc-ppOverlapPragma mb =-  case mb of-    Nothing           -> empty-    Just (L _ (NoOverlap s))    -> maybe_stext s "{-# NO_OVERLAP #-}"-    Just (L _ (Overlappable s)) -> maybe_stext s "{-# OVERLAPPABLE #-}"-    Just (L _ (Overlapping s))  -> maybe_stext s "{-# OVERLAPPING #-}"-    Just (L _ (Overlaps s))     -> maybe_stext s "{-# OVERLAPS #-}"-    Just (L _ (Incoherent s))   -> maybe_stext s "{-# INCOHERENT #-}"-  where-    maybe_stext NoSourceText     alt = text alt-    maybe_stext (SourceText src) _   = text src <+> text "#-}"---instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (InstDecl p) where-    ppr (ClsInstD     { cid_inst  = decl }) = ppr decl-    ppr (TyFamInstD   { tfid_inst = decl }) = ppr decl-    ppr (DataFamInstD { dfid_inst = decl }) = ppr decl-    ppr (XInstDecl x) = ppr x---- Extract the declarations of associated data types from an instance--instDeclDataFamInsts :: [LInstDecl pass] -> [DataFamInstDecl pass]-instDeclDataFamInsts inst_decls-  = concatMap do_one inst_decls-  where-    do_one (L _ (ClsInstD { cid_inst = ClsInstDecl { cid_datafam_insts = fam_insts } }))-      = map unLoc fam_insts-    do_one (L _ (DataFamInstD { dfid_inst = fam_inst }))      = [fam_inst]-    do_one (L _ (TyFamInstD {}))                              = []-    do_one (L _ (ClsInstD _ (XClsInstDecl _))) = panic "instDeclDataFamInsts"-    do_one (L _ (XInstDecl _))                 = panic "instDeclDataFamInsts"--{--************************************************************************-*                                                                      *-\subsection[DerivDecl]{A stand-alone instance deriving declaration}-*                                                                      *-************************************************************************--}---- | Located stand-alone 'deriving instance' declaration-type LDerivDecl pass = Located (DerivDecl pass)---- | Stand-alone 'deriving instance' declaration-data DerivDecl pass = DerivDecl-        { deriv_ext          :: XCDerivDecl pass-        , deriv_type         :: LHsSigWcType pass-          -- ^ The instance type to derive.-          ---          -- It uses an 'LHsSigWcType' because the context is allowed to be a-          -- single wildcard:-          ---          -- > deriving instance _ => Eq (Foo a)-          ---          -- Which signifies that the context should be inferred.--          -- See Note [Inferring the instance context] in TcDerivInfer.--        , deriv_strategy     :: Maybe (LDerivStrategy pass)-        , deriv_overlap_mode :: Maybe (Located OverlapMode)-         -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDeriving',-         --        'ApiAnnotation.AnnInstance', 'ApiAnnotation.AnnStock',-         --        'ApiAnnotation.AnnAnyClass', 'Api.AnnNewtype',-         --        'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'--  -- For details on above see note [Api annotations] in ApiAnnotation-        }-  | XDerivDecl (XXDerivDecl pass)--type instance XCDerivDecl    (GhcPass _) = NoExt-type instance XXDerivDecl    (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (DerivDecl p) where-    ppr (DerivDecl { deriv_type = ty-                   , deriv_strategy = ds-                   , deriv_overlap_mode = o })-        = hsep [ text "deriving"-               , ppDerivStrategy ds-               , text "instance"-               , ppOverlapPragma o-               , ppr ty ]-    ppr (XDerivDecl x) = ppr x--{--************************************************************************-*                                                                      *-                Deriving strategies-*                                                                      *-************************************************************************--}---- | A 'Located' 'DerivStrategy'.-type LDerivStrategy pass = Located (DerivStrategy pass)---- | Which technique the user explicitly requested when deriving an instance.-data DerivStrategy pass-  -- See Note [Deriving strategies] in TcDeriv-  = StockStrategy    -- ^ GHC's \"standard\" strategy, which is to implement a-                     --   custom instance for the data type. This only works-                     --   for certain types that GHC knows about (e.g., 'Eq',-                     --   'Show', 'Functor' when @-XDeriveFunctor@ is enabled,-                     --   etc.)-  | AnyclassStrategy -- ^ @-XDeriveAnyClass@-  | NewtypeStrategy  -- ^ @-XGeneralizedNewtypeDeriving@-  | ViaStrategy (XViaStrategy pass)-                     -- ^ @-XDerivingVia@--type instance XViaStrategy GhcPs = LHsSigType GhcPs-type instance XViaStrategy GhcRn = LHsSigType GhcRn-type instance XViaStrategy GhcTc = Type--instance (p ~ GhcPass pass, OutputableBndrId p)-        => Outputable (DerivStrategy p) where-    ppr StockStrategy    = text "stock"-    ppr AnyclassStrategy = text "anyclass"-    ppr NewtypeStrategy  = text "newtype"-    ppr (ViaStrategy ty) = text "via" <+> ppr ty---- | A short description of a @DerivStrategy'@.-derivStrategyName :: DerivStrategy a -> SDoc-derivStrategyName = text . go-  where-    go StockStrategy    = "stock"-    go AnyclassStrategy = "anyclass"-    go NewtypeStrategy  = "newtype"-    go (ViaStrategy {}) = "via"--{--************************************************************************-*                                                                      *-\subsection[DefaultDecl]{A @default@ declaration}-*                                                                      *-************************************************************************--There can only be one default declaration per module, but it is hard-for the parser to check that; we pass them all through in the abstract-syntax, and that restriction must be checked in the front end.--}---- | Located Default Declaration-type LDefaultDecl pass = Located (DefaultDecl pass)---- | Default Declaration-data DefaultDecl pass-  = DefaultDecl (XCDefaultDecl pass) [LHsType pass]-        -- ^ - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnDefault',-        --          'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | XDefaultDecl (XXDefaultDecl pass)--type instance XCDefaultDecl    (GhcPass _) = NoExt-type instance XXDefaultDecl    (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (DefaultDecl p) where-    ppr (DefaultDecl _ tys)-      = text "default" <+> parens (interpp'SP tys)-    ppr (XDefaultDecl x) = ppr x--{--************************************************************************-*                                                                      *-\subsection{Foreign function interface declaration}-*                                                                      *-************************************************************************--}---- foreign declarations are distinguished as to whether they define or use a--- Haskell name------  * the Boolean value indicates whether the pre-standard deprecated syntax---   has been used---- | Located Foreign Declaration-type LForeignDecl pass = Located (ForeignDecl pass)---- | Foreign Declaration-data ForeignDecl pass-  = ForeignImport-      { fd_i_ext  :: XForeignImport pass   -- Post typechecker, rep_ty ~ sig_ty-      , fd_name   :: Located (IdP pass)    -- defines this name-      , fd_sig_ty :: LHsSigType pass       -- sig_ty-      , fd_fi     :: ForeignImport }--  | ForeignExport-      { fd_e_ext  :: XForeignExport pass   -- Post typechecker, rep_ty ~ sig_ty-      , fd_name   :: Located (IdP pass)    -- uses this name-      , fd_sig_ty :: LHsSigType pass       -- sig_ty-      , fd_fe     :: ForeignExport }-        -- ^-        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnForeign',-        --           'ApiAnnotation.AnnImport','ApiAnnotation.AnnExport',-        --           'ApiAnnotation.AnnDcolon'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | XForeignDecl (XXForeignDecl pass)--{--    In both ForeignImport and ForeignExport:-        sig_ty is the type given in the Haskell code-        rep_ty is the representation for this type, i.e. with newtypes-               coerced away and type functions evaluated.-    Thus if the declaration is valid, then rep_ty will only use types-    such as Int and IO that we know how to make foreign calls with.--}--type instance XForeignImport   GhcPs = NoExt-type instance XForeignImport   GhcRn = NoExt-type instance XForeignImport   GhcTc = Coercion--type instance XForeignExport   GhcPs = NoExt-type instance XForeignExport   GhcRn = NoExt-type instance XForeignExport   GhcTc = Coercion--type instance XXForeignDecl    (GhcPass _) = NoExt---- Specification Of an imported external entity in dependence on the calling--- convention----data ForeignImport = -- import of a C entity-                     ---                     --  * the two strings specifying a header file or library-                     --   may be empty, which indicates the absence of a-                     --   header or object specification (both are not used-                     --   in the case of `CWrapper' and when `CFunction'-                     --   has a dynamic target)-                     ---                     --  * the calling convention is irrelevant for code-                     --   generation in the case of `CLabel', but is needed-                     --   for pretty printing-                     ---                     --  * `Safety' is irrelevant for `CLabel' and `CWrapper'-                     ---                     CImport  (Located CCallConv) -- ccall or stdcall-                              (Located Safety)  -- interruptible, safe or unsafe-                              (Maybe Header)       -- name of C header-                              CImportSpec          -- details of the C entity-                              (Located SourceText) -- original source text for-                                                   -- the C entity-  deriving Data---- details of an external C entity----data CImportSpec = CLabel    CLabelString     -- import address of a C label-                 | CFunction CCallTarget      -- static or dynamic function-                 | CWrapper                   -- wrapper to expose closures-                                              -- (former f.e.d.)-  deriving Data---- specification of an externally exported entity in dependence on the calling--- convention----data ForeignExport = CExport  (Located CExportSpec) -- contains the calling-                                                    -- convention-                              (Located SourceText)  -- original source text for-                                                    -- the C entity-  deriving Data---- pretty printing of foreign declarations-----instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (ForeignDecl p) where-  ppr (ForeignImport { fd_name = n, fd_sig_ty = ty, fd_fi = fimport })-    = hang (text "foreign import" <+> ppr fimport <+> ppr n)-         2 (dcolon <+> ppr ty)-  ppr (ForeignExport { fd_name = n, fd_sig_ty = ty, fd_fe = fexport }) =-    hang (text "foreign export" <+> ppr fexport <+> ppr n)-       2 (dcolon <+> ppr ty)-  ppr (XForeignDecl x) = ppr x--instance Outputable ForeignImport where-  ppr (CImport  cconv safety mHeader spec (L _ srcText)) =-    ppr cconv <+> ppr safety-      <+> pprWithSourceText srcText (pprCEntity spec "")-    where-      pp_hdr = case mHeader of-               Nothing -> empty-               Just (Header _ header) -> ftext header--      pprCEntity (CLabel lbl) _ =-        doubleQuotes $ text "static" <+> pp_hdr <+> char '&' <> ppr lbl-      pprCEntity (CFunction (StaticTarget st _lbl _ isFun)) src =-        if dqNeeded then doubleQuotes ce else empty-          where-            dqNeeded = (take 6 src == "static")-                    || isJust mHeader-                    || not isFun-                    || st /= NoSourceText-            ce =-                  -- We may need to drop leading spaces first-                  (if take 6 src == "static" then text "static" else empty)-              <+> pp_hdr-              <+> (if isFun then empty else text "value")-              <+> (pprWithSourceText st empty)-      pprCEntity (CFunction DynamicTarget) _ =-        doubleQuotes $ text "dynamic"-      pprCEntity CWrapper _ = doubleQuotes $ text "wrapper"--instance Outputable ForeignExport where-  ppr (CExport  (L _ (CExportStatic _ lbl cconv)) _) =-    ppr cconv <+> char '"' <> ppr lbl <> char '"'--{--************************************************************************-*                                                                      *-\subsection{Transformation rules}-*                                                                      *-************************************************************************--}---- | Located Rule Declarations-type LRuleDecls pass = Located (RuleDecls pass)--  -- Note [Pragma source text] in BasicTypes--- | Rule Declarations-data RuleDecls pass = HsRules { rds_ext   :: XCRuleDecls pass-                              , rds_src   :: SourceText-                              , rds_rules :: [LRuleDecl pass] }-  | XRuleDecls (XXRuleDecls pass)--type instance XCRuleDecls    (GhcPass _) = NoExt-type instance XXRuleDecls    (GhcPass _) = NoExt---- | Located Rule Declaration-type LRuleDecl pass = Located (RuleDecl pass)---- | Rule Declaration-data RuleDecl pass-  = HsRule -- Source rule-       { rd_ext  :: XHsRule pass-           -- ^ After renamer, free-vars from the LHS and RHS-       , rd_name :: Located (SourceText,RuleName)-           -- ^ Note [Pragma source text] in BasicTypes-       , rd_act  :: Activation-       , rd_tyvs :: Maybe [LHsTyVarBndr (NoGhcTc pass)]-           -- ^ Forall'd type vars-       , rd_tmvs :: [LRuleBndr pass]-           -- ^ Forall'd term vars, before typechecking; after typechecking-           --    this includes all forall'd vars-       , rd_lhs  :: Located (HsExpr pass)-       , rd_rhs  :: Located (HsExpr pass)-       }-    -- ^-    --  - 'ApiAnnotation.AnnKeywordId' :-    --           'ApiAnnotation.AnnOpen','ApiAnnotation.AnnTilde',-    --           'ApiAnnotation.AnnVal',-    --           'ApiAnnotation.AnnClose',-    --           'ApiAnnotation.AnnForall','ApiAnnotation.AnnDot',-    --           'ApiAnnotation.AnnEqual',-  | XRuleDecl (XXRuleDecl pass)--data HsRuleRn = HsRuleRn NameSet NameSet -- Free-vars from the LHS and RHS-  deriving Data--type instance XHsRule       GhcPs = NoExt-type instance XHsRule       GhcRn = HsRuleRn-type instance XHsRule       GhcTc = HsRuleRn--type instance XXRuleDecl    (GhcPass _) = NoExt--flattenRuleDecls :: [LRuleDecls pass] -> [LRuleDecl pass]-flattenRuleDecls decls = concatMap (rds_rules . unLoc) decls---- | Located Rule Binder-type LRuleBndr pass = Located (RuleBndr pass)---- | Rule Binder-data RuleBndr pass-  = RuleBndr (XCRuleBndr pass)  (Located (IdP pass))-  | RuleBndrSig (XRuleBndrSig pass) (Located (IdP pass)) (LHsSigWcType pass)-  | XRuleBndr (XXRuleBndr pass)-        -- ^-        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --     'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation--type instance XCRuleBndr    (GhcPass _) = NoExt-type instance XRuleBndrSig  (GhcPass _) = NoExt-type instance XXRuleBndr    (GhcPass _) = NoExt--collectRuleBndrSigTys :: [RuleBndr pass] -> [LHsSigWcType pass]-collectRuleBndrSigTys bndrs = [ty | RuleBndrSig _ _ ty <- bndrs]--pprFullRuleName :: Located (SourceText, RuleName) -> SDoc-pprFullRuleName (L _ (st, n)) = pprWithSourceText st (doubleQuotes $ ftext n)--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (RuleDecls p) where-  ppr (HsRules { rds_src = st-               , rds_rules = rules })-    = pprWithSourceText st (text "{-# RULES")-          <+> vcat (punctuate semi (map ppr rules)) <+> text "#-}"-  ppr (XRuleDecls x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (RuleDecl p) where-  ppr (HsRule { rd_name = name-              , rd_act  = act-              , rd_tyvs = tys-              , rd_tmvs = tms-              , rd_lhs  = lhs-              , rd_rhs  = rhs })-        = sep [pprFullRuleName name <+> ppr act,-               nest 4 (pp_forall_ty tys <+> pp_forall_tm tys-                                        <+> pprExpr (unLoc lhs)),-               nest 6 (equals <+> pprExpr (unLoc rhs)) ]-        where-          pp_forall_ty Nothing     = empty-          pp_forall_ty (Just qtvs) = forAllLit <+> fsep (map ppr qtvs) <> dot-          pp_forall_tm Nothing | null tms = empty-          pp_forall_tm _ = forAllLit <+> fsep (map ppr tms) <> dot-  ppr (XRuleDecl x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (RuleBndr p) where-   ppr (RuleBndr _ name) = ppr name-   ppr (RuleBndrSig _ name ty) = parens (ppr name <> dcolon <> ppr ty)-   ppr (XRuleBndr x) = ppr x--{--************************************************************************-*                                                                      *-\subsection[DocDecl]{Document comments}-*                                                                      *-************************************************************************--}---- | Located Documentation comment Declaration-type LDocDecl = Located (DocDecl)---- | Documentation comment Declaration-data DocDecl-  = DocCommentNext HsDocString-  | DocCommentPrev HsDocString-  | DocCommentNamed String HsDocString-  | DocGroup Int HsDocString-  deriving Data---- Okay, I need to reconstruct the document comments, but for now:-instance Outputable DocDecl where-  ppr _ = text "<document comment>"--docDeclDoc :: DocDecl -> HsDocString-docDeclDoc (DocCommentNext d) = d-docDeclDoc (DocCommentPrev d) = d-docDeclDoc (DocCommentNamed _ d) = d-docDeclDoc (DocGroup _ d) = d--{--************************************************************************-*                                                                      *-\subsection[DeprecDecl]{Deprecations}-*                                                                      *-************************************************************************--We use exported entities for things to deprecate.--}---- | Located Warning Declarations-type LWarnDecls pass = Located (WarnDecls pass)-- -- Note [Pragma source text] in BasicTypes--- | Warning pragma Declarations-data WarnDecls pass = Warnings { wd_ext      :: XWarnings pass-                               , wd_src      :: SourceText-                               , wd_warnings :: [LWarnDecl pass]-                               }-  | XWarnDecls (XXWarnDecls pass)--type instance XWarnings      (GhcPass _) = NoExt-type instance XXWarnDecls    (GhcPass _) = NoExt---- | Located Warning pragma Declaration-type LWarnDecl pass = Located (WarnDecl pass)---- | Warning pragma Declaration-data WarnDecl pass = Warning (XWarning pass) [Located (IdP pass)] WarningTxt-                   | XWarnDecl (XXWarnDecl pass)--type instance XWarning      (GhcPass _) = NoExt-type instance XXWarnDecl    (GhcPass _) = NoExt---instance (p ~ GhcPass pass,OutputableBndr (IdP p))-        => Outputable (WarnDecls p) where-    ppr (Warnings _ (SourceText src) decls)-      = text src <+> vcat (punctuate comma (map ppr decls)) <+> text "#-}"-    ppr (Warnings _ NoSourceText _decls) = panic "WarnDecls"-    ppr (XWarnDecls x) = ppr x--instance (p ~ GhcPass pass, OutputableBndr (IdP p))-       => Outputable (WarnDecl p) where-    ppr (Warning _ thing txt)-      = hsep ( punctuate comma (map ppr thing))-              <+> ppr txt-    ppr (XWarnDecl x) = ppr x--{--************************************************************************-*                                                                      *-\subsection[AnnDecl]{Annotations}-*                                                                      *-************************************************************************--}---- | Located Annotation Declaration-type LAnnDecl pass = Located (AnnDecl pass)---- | Annotation Declaration-data AnnDecl pass = HsAnnotation-                      (XHsAnnotation pass)-                      SourceText -- Note [Pragma source text] in BasicTypes-                      (AnnProvenance (IdP pass)) (Located (HsExpr pass))-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-      --           'ApiAnnotation.AnnType'-      --           'ApiAnnotation.AnnModule'-      --           'ApiAnnotation.AnnClose'--      -- For details on above see note [Api annotations] in ApiAnnotation-  | XAnnDecl (XXAnnDecl pass)--type instance XHsAnnotation (GhcPass _) = NoExt-type instance XXAnnDecl     (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (AnnDecl p) where-    ppr (HsAnnotation _ _ provenance expr)-      = hsep [text "{-#", pprAnnProvenance provenance, pprExpr (unLoc expr), text "#-}"]-    ppr (XAnnDecl x) = ppr x---- | Annotation Provenance-data AnnProvenance name = ValueAnnProvenance (Located name)-                        | TypeAnnProvenance (Located name)-                        | ModuleAnnProvenance-deriving instance Functor     AnnProvenance-deriving instance Foldable    AnnProvenance-deriving instance Traversable AnnProvenance-deriving instance (Data pass) => Data (AnnProvenance pass)--annProvenanceName_maybe :: AnnProvenance name -> Maybe name-annProvenanceName_maybe (ValueAnnProvenance (L _ name)) = Just name-annProvenanceName_maybe (TypeAnnProvenance (L _ name))  = Just name-annProvenanceName_maybe ModuleAnnProvenance       = Nothing--pprAnnProvenance :: OutputableBndr name => AnnProvenance name -> SDoc-pprAnnProvenance ModuleAnnProvenance       = text "ANN module"-pprAnnProvenance (ValueAnnProvenance (L _ name))-  = text "ANN" <+> ppr name-pprAnnProvenance (TypeAnnProvenance (L _ name))-  = text "ANN type" <+> ppr name--{--************************************************************************-*                                                                      *-\subsection[RoleAnnot]{Role annotations}-*                                                                      *-************************************************************************--}---- | Located Role Annotation Declaration-type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass)---- See #8185 for more info about why role annotations are--- top-level declarations--- | Role Annotation Declaration-data RoleAnnotDecl pass-  = RoleAnnotDecl (XCRoleAnnotDecl pass)-                  (Located (IdP pass))   -- type constructor-                  [Located (Maybe Role)] -- optional annotations-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',-      --           'ApiAnnotation.AnnRole'--      -- For details on above see note [Api annotations] in ApiAnnotation-  | XRoleAnnotDecl (XXRoleAnnotDecl pass)--type instance XCRoleAnnotDecl (GhcPass _) = NoExt-type instance XXRoleAnnotDecl (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndr (IdP p))-       => Outputable (RoleAnnotDecl p) where-  ppr (RoleAnnotDecl _ ltycon roles)-    = text "type role" <+> pprPrefixOcc (unLoc ltycon) <+>-      hsep (map (pp_role . unLoc) roles)-    where-      pp_role Nothing  = underscore-      pp_role (Just r) = ppr r-  ppr (XRoleAnnotDecl x) = ppr x--roleAnnotDeclName :: RoleAnnotDecl pass -> (IdP pass)-roleAnnotDeclName (RoleAnnotDecl _ (L _ name) _) = name-roleAnnotDeclName (XRoleAnnotDecl _) = panic "roleAnnotDeclName"
− hsSyn/HsDoc.hs
@@ -1,152 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-}--module HsDoc-  ( HsDocString-  , LHsDocString-  , mkHsDocString-  , mkHsDocStringUtf8ByteString-  , unpackHDS-  , hsDocStringToByteString-  , ppr_mbDoc--  , appendDocs-  , concatDocs--  , DeclDocMap(..)-  , emptyDeclDocMap--  , ArgDocMap(..)-  , emptyArgDocMap-  ) where--#include "HsVersions.h"--import GhcPrelude--import Binary-import Encoding-import FastFunctions-import Name-import Outputable-import SrcLoc--import Data.ByteString (ByteString)-import qualified Data.ByteString as BS-import qualified Data.ByteString.Char8 as C8-import qualified Data.ByteString.Internal as BS-import Data.Data-import Data.Map (Map)-import qualified Data.Map as Map-import Data.Maybe-import Foreign---- | Haskell Documentation String------ Internally this is a UTF8-Encoded 'ByteString'.-newtype HsDocString = HsDocString ByteString-  -- There are at least two plausible Semigroup instances for this type:-  ---  -- 1. Simple string concatenation.-  -- 2. Concatenation as documentation paragraphs with newlines in between.-  ---  -- To avoid confusion, we pass on defining an instance at all.-  deriving (Eq, Show, Data)---- | Located Haskell Documentation String-type LHsDocString = Located HsDocString--instance Binary HsDocString where-  put_ bh (HsDocString bs) = put_ bh bs-  get bh = HsDocString <$> get bh--instance Outputable HsDocString where-  ppr = doubleQuotes . text . unpackHDS--mkHsDocString :: String -> HsDocString-mkHsDocString s =-  inlinePerformIO $ do-    let len = utf8EncodedLength s-    buf <- mallocForeignPtrBytes len-    withForeignPtr buf $ \ptr -> do-      utf8EncodeString ptr s-      pure (HsDocString (BS.fromForeignPtr buf 0 len))---- | Create a 'HsDocString' from a UTF8-encoded 'ByteString'.-mkHsDocStringUtf8ByteString :: ByteString -> HsDocString-mkHsDocStringUtf8ByteString = HsDocString--unpackHDS :: HsDocString -> String-unpackHDS = utf8DecodeByteString . hsDocStringToByteString---- | Return the contents of a 'HsDocString' as a UTF8-encoded 'ByteString'.-hsDocStringToByteString :: HsDocString -> ByteString-hsDocStringToByteString (HsDocString bs) = bs--ppr_mbDoc :: Maybe LHsDocString -> SDoc-ppr_mbDoc (Just doc) = ppr doc-ppr_mbDoc Nothing    = empty---- | Join two docstrings.------ Non-empty docstrings are joined with two newlines in between,--- resulting in separate paragraphs.-appendDocs :: HsDocString -> HsDocString -> HsDocString-appendDocs x y =-  fromMaybe-    (HsDocString BS.empty)-    (concatDocs [x, y])---- | Concat docstrings with two newlines in between.------ Empty docstrings are skipped.------ If all inputs are empty, 'Nothing' is returned.-concatDocs :: [HsDocString] -> Maybe HsDocString-concatDocs xs =-    if BS.null b-      then Nothing-      else Just (HsDocString b)-  where-    b = BS.intercalate (C8.pack "\n\n")-      . filter (not . BS.null)-      . map hsDocStringToByteString-      $ xs---- | Docs for declarations: functions, data types, instances, methods etc.-newtype DeclDocMap = DeclDocMap (Map Name HsDocString)--instance Binary DeclDocMap where-  put_ bh (DeclDocMap m) = put_ bh (Map.toList m)-  -- We can't rely on a deterministic ordering of the `Name`s here.-  -- See the comments on `Name`'s `Ord` instance for context.-  get bh = DeclDocMap . Map.fromList <$> get bh--instance Outputable DeclDocMap where-  ppr (DeclDocMap m) = vcat (map pprPair (Map.toAscList m))-    where-      pprPair (name, doc) = ppr name Outputable.<> colon $$ nest 2 (ppr doc)--emptyDeclDocMap :: DeclDocMap-emptyDeclDocMap = DeclDocMap Map.empty---- | Docs for arguments. E.g. function arguments, method arguments.-newtype ArgDocMap = ArgDocMap (Map Name (Map Int HsDocString))--instance Binary ArgDocMap where-  put_ bh (ArgDocMap m) = put_ bh (Map.toList (Map.toAscList <$> m))-  -- We can't rely on a deterministic ordering of the `Name`s here.-  -- See the comments on `Name`'s `Ord` instance for context.-  get bh = ArgDocMap . fmap Map.fromDistinctAscList . Map.fromList <$> get bh--instance Outputable ArgDocMap where-  ppr (ArgDocMap m) = vcat (map pprPair (Map.toAscList m))-    where-      pprPair (name, int_map) =-        ppr name Outputable.<> colon $$ nest 2 (pprIntMap int_map)-      pprIntMap im = vcat (map pprIPair (Map.toAscList im))-      pprIPair (i, doc) = ppr i Outputable.<> colon $$ nest 2 (ppr doc)--emptyArgDocMap :: ArgDocMap-emptyArgDocMap = ArgDocMap Map.empty
− hsSyn/HsDumpAst.hs
@@ -1,220 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE ScopedTypeVariables #-}---- | Contains a debug function to dump parts of the hsSyn AST. It uses a syb--- traversal which falls back to displaying based on the constructor name, so--- can be used to dump anything having a @Data.Data@ instance.--module HsDumpAst (-        -- * Dumping ASTs-        showAstData,-        BlankSrcSpan(..),-    ) where--import GhcPrelude--import Data.Data hiding (Fixity)-import Bag-import BasicTypes-import FastString-import NameSet-import Name-import DataCon-import SrcLoc-import HsSyn-import OccName hiding (occName)-import Var-import Module-import Outputable--import qualified Data.ByteString as B--data BlankSrcSpan = BlankSrcSpan | NoBlankSrcSpan-                  deriving (Eq,Show)---- | Show a GHC syntax tree. This parameterised because it is also used for--- comparing ASTs in ppr roundtripping tests, where the SrcSpan's are blanked--- out, to avoid comparing locations, only structure-showAstData :: Data a => BlankSrcSpan -> a -> SDoc-showAstData b a0 = blankLine $$ showAstData' a0-  where-    showAstData' :: Data a => a -> SDoc-    showAstData' =-      generic-              `ext1Q` list-              `extQ` string `extQ` fastString `extQ` srcSpan-              `extQ` lit `extQ` litr `extQ` litt-              `extQ` bytestring-              `extQ` name `extQ` occName `extQ` moduleName `extQ` var-              `extQ` dataCon-              `extQ` bagName `extQ` bagRdrName `extQ` bagVar `extQ` nameSet-              `extQ` fixity-              `ext2Q` located--      where generic :: Data a => a -> SDoc-            generic t = parens $ text (showConstr (toConstr t))-                                  $$ vcat (gmapQ showAstData' t)--            string :: String -> SDoc-            string     = text . normalize_newlines . show--            fastString :: FastString -> SDoc-            fastString s = braces $-                            text "FastString: "-                         <> text (normalize_newlines . show $ s)--            bytestring :: B.ByteString -> SDoc-            bytestring = text . normalize_newlines . show--            list []    = brackets empty-            list [x]   = brackets (showAstData' x)-            list (x1 : x2 : xs) =  (text "[" <> showAstData' x1)-                                $$ go x2 xs-              where-                go y [] = text "," <> showAstData' y <> text "]"-                go y1 (y2 : ys) = (text "," <> showAstData' y1) $$ go y2 ys--            -- Eliminate word-size dependence-            lit :: HsLit GhcPs -> SDoc-            lit (HsWordPrim   s x) = numericLit "HsWord{64}Prim" x s-            lit (HsWord64Prim s x) = numericLit "HsWord{64}Prim" x s-            lit (HsIntPrim    s x) = numericLit "HsInt{64}Prim"  x s-            lit (HsInt64Prim  s x) = numericLit "HsInt{64}Prim"  x s-            lit l                  = generic l--            litr :: HsLit GhcRn -> SDoc-            litr (HsWordPrim   s x) = numericLit "HsWord{64}Prim" x s-            litr (HsWord64Prim s x) = numericLit "HsWord{64}Prim" x s-            litr (HsIntPrim    s x) = numericLit "HsInt{64}Prim"  x s-            litr (HsInt64Prim  s x) = numericLit "HsInt{64}Prim"  x s-            litr l                  = generic l--            litt :: HsLit GhcTc -> SDoc-            litt (HsWordPrim   s x) = numericLit "HsWord{64}Prim" x s-            litt (HsWord64Prim s x) = numericLit "HsWord{64}Prim" x s-            litt (HsIntPrim    s x) = numericLit "HsInt{64}Prim"  x s-            litt (HsInt64Prim  s x) = numericLit "HsInt{64}Prim"  x s-            litt l                  = generic l--            numericLit :: String -> Integer -> SourceText -> SDoc-            numericLit tag x s = braces $ hsep [ text tag-                                               , generic x-                                               , generic s ]--            name :: Name -> SDoc-            name nm    = braces $ text "Name: " <> ppr nm--            occName n  =  braces $-                          text "OccName: "-                       <> text (OccName.occNameString n)--            moduleName :: ModuleName -> SDoc-            moduleName m = braces $ text "ModuleName: " <> ppr m--            srcSpan :: SrcSpan -> SDoc-            srcSpan ss = case b of-             BlankSrcSpan -> text "{ ss }"-             NoBlankSrcSpan -> braces $ char ' ' <>-                             (hang (ppr ss) 1-                                   -- TODO: show annotations here-                                   (text ""))--            var  :: Var -> SDoc-            var v      = braces $ text "Var: " <> ppr v--            dataCon :: DataCon -> SDoc-            dataCon c  = braces $ text "DataCon: " <> ppr c--            bagRdrName:: Bag (Located (HsBind GhcPs)) -> SDoc-            bagRdrName bg =  braces $-                             text "Bag(Located (HsBind GhcPs)):"-                          $$ (list . bagToList $ bg)--            bagName   :: Bag (Located (HsBind GhcRn)) -> SDoc-            bagName bg  =  braces $-                           text "Bag(Located (HsBind Name)):"-                        $$ (list . bagToList $ bg)--            bagVar    :: Bag (Located (HsBind GhcTc)) -> SDoc-            bagVar bg  =  braces $-                          text "Bag(Located (HsBind Var)):"-                       $$ (list . bagToList $ bg)--            nameSet ns =  braces $-                          text "NameSet:"-                       $$ (list . nameSetElemsStable $ ns)--            fixity :: Fixity -> SDoc-            fixity fx =  braces $-                         text "Fixity: "-                      <> ppr fx--            located :: (Data b,Data loc) => GenLocated loc b -> SDoc-            located (L ss a) = parens $-                   case cast ss of-                        Just (s :: SrcSpan) ->-                          srcSpan s-                        Nothing -> text "nnnnnnnn"-                      $$ showAstData' a--normalize_newlines :: String -> String-normalize_newlines ('\\':'r':'\\':'n':xs) = '\\':'n':normalize_newlines xs-normalize_newlines (x:xs)                 = x:normalize_newlines xs-normalize_newlines []                     = []--{--************************************************************************-*                                                                      *-* Copied from syb-*                                                                      *-************************************************************************--}----- | The type constructor for queries-newtype Q q x = Q { unQ :: x -> q }---- | Extend a generic query by a type-specific case-extQ :: ( Typeable a-        , Typeable b-        )-     => (a -> q)-     -> (b -> q)-     -> a-     -> q-extQ f g a = maybe (f a) g (cast a)---- | Type extension of queries for type constructors-ext1Q :: (Data d, Typeable t)-      => (d -> q)-      -> (forall e. Data e => t e -> q)-      -> d -> q-ext1Q def ext = unQ ((Q def) `ext1` (Q ext))----- | Type extension of queries for type constructors-ext2Q :: (Data d, Typeable t)-      => (d -> q)-      -> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> q)-      -> d -> q-ext2Q def ext = unQ ((Q def) `ext2` (Q ext))---- | Flexible type extension-ext1 :: (Data a, Typeable t)-     => c a-     -> (forall d. Data d => c (t d))-     -> c a-ext1 def ext = maybe def id (dataCast1 ext)------ | Flexible type extension-ext2 :: (Data a, Typeable t)-     => c a-     -> (forall d1 d2. (Data d1, Data d2) => c (t d1 d2))-     -> c a-ext2 def ext = maybe def id (dataCast2 ext)
− hsSyn/HsExpr.hs
@@ -1,2928 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--}--{-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE ExistentialQuantification #-}-{-# LANGUAGE DeriveFunctor #-}-{-# LANGUAGE TypeFamilies #-}---- | Abstract Haskell syntax for expressions.-module HsExpr where--#include "HsVersions.h"---- friends:-import GhcPrelude--import HsDecls-import HsPat-import HsLit-import PlaceHolder ( NameOrRdrName )-import HsExtension-import HsTypes-import HsBinds---- others:-import TcEvidence-import CoreSyn-import DynFlags ( gopt, GeneralFlag(Opt_PrintExplicitCoercions) )-import Name-import NameSet-import RdrName  ( GlobalRdrEnv )-import BasicTypes-import ConLike-import SrcLoc-import Util-import Outputable-import FastString-import Type-import TcType (TcType)-import {-# SOURCE #-} TcRnTypes (TcLclEnv)---- libraries:-import Data.Data hiding (Fixity(..))-import qualified Data.Data as Data (Fixity(..))-import Data.Maybe (isNothing)--import GHCi.RemoteTypes ( ForeignRef )-import qualified Language.Haskell.TH as TH (Q)--{--************************************************************************-*                                                                      *-\subsection{Expressions proper}-*                                                                      *-************************************************************************--}---- * Expressions proper---- | Located Haskell Expression-type LHsExpr p = Located (HsExpr p)-  -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when-  --   in a list--  -- For details on above see note [Api annotations] in ApiAnnotation------------------------------ | Post-Type checking Expression------ PostTcExpr is an evidence expression attached to the syntax tree by the--- type checker (c.f. postTcType).-type PostTcExpr  = HsExpr GhcTc---- | Post-Type checking Table------ We use a PostTcTable where there are a bunch of pieces of evidence, more--- than is convenient to keep individually.-type PostTcTable = [(Name, PostTcExpr)]------------------------------ | Syntax Expression------ SyntaxExpr is like 'PostTcExpr', but it's filled in a little earlier,--- by the renamer.  It's used for rebindable syntax.------ E.g. @(>>=)@ is filled in before the renamer by the appropriate 'Name' for---      @(>>=)@, and then instantiated by the type checker with its type args---      etc------ This should desugar to------ > syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0)--- >                         (syn_arg_wraps[1] arg1) ...------ where the actual arguments come from elsewhere in the AST.--- This could be defined using @GhcPass p@ and such, but it's--- harder to get it all to work out that way. ('noSyntaxExpr' is hard to--- write, for example.)-data SyntaxExpr p = SyntaxExpr { syn_expr      :: HsExpr p-                               , syn_arg_wraps :: [HsWrapper]-                               , syn_res_wrap  :: HsWrapper }---- | This is used for rebindable-syntax pieces that are too polymorphic--- for tcSyntaxOp (trS_fmap and the mzip in ParStmt)-noExpr :: HsExpr (GhcPass p)-noExpr = HsLit noExt (HsString (SourceText  "noExpr") (fsLit "noExpr"))--noSyntaxExpr :: SyntaxExpr (GhcPass p)-                              -- Before renaming, and sometimes after,-                              -- (if the syntax slot makes no sense)-noSyntaxExpr = SyntaxExpr { syn_expr      = HsLit noExt (HsString NoSourceText-                                                        (fsLit "noSyntaxExpr"))-                          , syn_arg_wraps = []-                          , syn_res_wrap  = WpHole }---- | Make a 'SyntaxExpr (HsExpr _)', missing its HsWrappers.-mkSyntaxExpr :: HsExpr (GhcPass p) -> SyntaxExpr (GhcPass p)-mkSyntaxExpr expr = SyntaxExpr { syn_expr      = expr-                               , syn_arg_wraps = []-                               , syn_res_wrap  = WpHole }---- | Make a 'SyntaxExpr Name' (the "rn" is because this is used in the--- renamer), missing its HsWrappers.-mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn-mkRnSyntaxExpr name = mkSyntaxExpr $ HsVar noExt $ noLoc name-  -- don't care about filling in syn_arg_wraps because we're clearly-  -- not past the typechecker--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (SyntaxExpr p) where-  ppr (SyntaxExpr { syn_expr      = expr-                  , syn_arg_wraps = arg_wraps-                  , syn_res_wrap  = res_wrap })-    = sdocWithDynFlags $ \ dflags ->-      getPprStyle $ \s ->-      if debugStyle s || gopt Opt_PrintExplicitCoercions dflags-      then ppr expr <> braces (pprWithCommas ppr arg_wraps)-                    <> braces (ppr res_wrap)-      else ppr expr---- | Command Syntax Table (for Arrow syntax)-type CmdSyntaxTable p = [(Name, HsExpr p)]--- See Note [CmdSyntaxTable]--{--Note [CmdSyntaxtable]-~~~~~~~~~~~~~~~~~~~~~-Used only for arrow-syntax stuff (HsCmdTop), the CmdSyntaxTable keeps-track of the methods needed for a Cmd.--* Before the renamer, this list is an empty list--* After the renamer, it takes the form @[(std_name, HsVar actual_name)]@-  For example, for the 'arr' method-   * normal case:            (GHC.Control.Arrow.arr, HsVar GHC.Control.Arrow.arr)-   * with rebindable syntax: (GHC.Control.Arrow.arr, arr_22)-             where @arr_22@ is whatever 'arr' is in scope--* After the type checker, it takes the form [(std_name, <expression>)]-  where <expression> is the evidence for the method.  This evidence is-  instantiated with the class, but is still polymorphic in everything-  else.  For example, in the case of 'arr', the evidence has type-         forall b c. (b->c) -> a b c-  where 'a' is the ambient type of the arrow.  This polymorphism is-  important because the desugarer uses the same evidence at multiple-  different types.--This is Less Cool than what we normally do for rebindable syntax, which is to-make fully-instantiated piece of evidence at every use site.  The Cmd way-is Less Cool because-  * The renamer has to predict which methods are needed.-    See the tedious RnExpr.methodNamesCmd.--  * The desugarer has to know the polymorphic type of the instantiated-    method. This is checked by Inst.tcSyntaxName, but is less flexible-    than the rest of rebindable syntax, where the type is less-    pre-ordained.  (And this flexibility is useful; for example we can-    typecheck do-notation with (>>=) :: m1 a -> (a -> m2 b) -> m2 b.)--}---- | An unbound variable; used for treating--- out-of-scope variables as expression holes------ Either "x", "y"     Plain OutOfScope--- or     "_", "_x"    A TrueExprHole------ Both forms indicate an out-of-scope variable,  but the latter--- indicates that the user /expects/ it to be out of scope, and--- just wants GHC to report its type-data UnboundVar-  = OutOfScope OccName GlobalRdrEnv  -- ^ An (unqualified) out-of-scope-                                     -- variable, together with the GlobalRdrEnv-                                     -- with respect to which it is unbound--                                     -- See Note [OutOfScope and GlobalRdrEnv]--  | TrueExprHole OccName             -- ^ A "true" expression hole (_ or _x)--  deriving Data--instance Outputable UnboundVar where-    ppr (OutOfScope occ _) = text "OutOfScope" <> parens (ppr occ)-    ppr (TrueExprHole occ) = text "ExprHole"   <> parens (ppr occ)--unboundVarOcc :: UnboundVar -> OccName-unboundVarOcc (OutOfScope occ _) = occ-unboundVarOcc (TrueExprHole occ) = occ--{--Note [OutOfScope and GlobalRdrEnv]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-To understand why we bundle a GlobalRdrEnv with an out-of-scope variable,-consider the following module:--    module A where--    foo :: ()-    foo = bar--    bat :: [Double]-    bat = [1.2, 3.4]--    $(return [])--    bar = ()-    bad = False--When A is compiled, the renamer determines that `bar` is not in scope in the-declaration of `foo` (since `bar` is declared in the following inter-splice-group).  Once it has finished typechecking the entire module, the typechecker-then generates the associated error message, which specifies both the type of-`bar` and a list of possible in-scope alternatives:--    A.hs:6:7: error:-        • Variable not in scope: bar :: ()-        • ‘bar’ (line 13) is not in scope before the splice on line 11-          Perhaps you meant ‘bat’ (line 9)--When it calls RnEnv.unknownNameSuggestions to identify these alternatives, the-typechecker must provide a GlobalRdrEnv.  If it provided the current one, which-contains top-level declarations for the entire module, the error message would-incorrectly suggest the out-of-scope `bar` and `bad` as possible alternatives-for `bar` (see Trac #11680).  Instead, the typechecker must use the same-GlobalRdrEnv the renamer used when it determined that `bar` is out-of-scope.--To obtain this GlobalRdrEnv, can the typechecker simply use the out-of-scope-`bar`'s location to either reconstruct it (from the current GlobalRdrEnv) or to-look it up in some global store?  Unfortunately, no.  The problem is that-location information is not always sufficient for this task.  This is most-apparent when dealing with the TH function addTopDecls, which adds its-declarations to the FOLLOWING inter-splice group.  Consider these declarations:--    ex9 = cat               -- cat is NOT in scope here--    $(do --------------------------------------------------------------        ds <- [d| f = cab   -- cat and cap are both in scope here-                  cat = ()-                |]-        addTopDecls ds-        [d| g = cab         -- only cap is in scope here-            cap = True-          |])--    ex10 = cat              -- cat is NOT in scope here--    $(return []) -------------------------------------------------------    ex11 = cat              -- cat is in scope--Here, both occurrences of `cab` are out-of-scope, and so the typechecker needs-the GlobalRdrEnvs which were used when they were renamed.  These GlobalRdrEnvs-are different (`cat` is present only in the GlobalRdrEnv for f's `cab'), but the-locations of the two `cab`s are the same (they are both created in the same-splice).  Thus, we must include some additional information with each `cab` to-allow the typechecker to obtain the correct GlobalRdrEnv.  Clearly, the simplest-information to use is the GlobalRdrEnv itself.--}---- | A Haskell expression.-data HsExpr p-  = HsVar     (XVar p)-              (Located (IdP p)) -- ^ Variable--                             -- See Note [Located RdrNames]--  | HsUnboundVar (XUnboundVar p)-                 UnboundVar  -- ^ Unbound variable; also used for "holes"-                             --   (_ or _x).-                             -- Turned from HsVar to HsUnboundVar by the-                             --   renamer, when it finds an out-of-scope-                             --   variable or hole.-                             -- Turned into HsVar by type checker, to support-                             --   deferred type errors.--  | HsConLikeOut (XConLikeOut p)-                 ConLike     -- ^ After typechecker only; must be different-                             -- HsVar for pretty printing--  | HsRecFld  (XRecFld p)-              (AmbiguousFieldOcc p) -- ^ Variable pointing to record selector-                                    -- Not in use after typechecking--  | HsOverLabel (XOverLabel p)-                (Maybe (IdP p)) FastString-     -- ^ Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels)-     --   @Just id@ means @RebindableSyntax@ is in use, and gives the id of the-     --   in-scope 'fromLabel'.-     --   NB: Not in use after typechecking--  | HsIPVar   (XIPVar p)-              HsIPName   -- ^ Implicit parameter (not in use after typechecking)-  | HsOverLit (XOverLitE p)-              (HsOverLit p)  -- ^ Overloaded literals--  | HsLit     (XLitE p)-              (HsLit p)      -- ^ Simple (non-overloaded) literals--  | HsLam     (XLam p)-              (MatchGroup p (LHsExpr p))-                       -- ^ Lambda abstraction. Currently always a single match-       ---       -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',-       --       'ApiAnnotation.AnnRarrow',--       -- For details on above see note [Api annotations] in ApiAnnotation--  | HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) -- ^ Lambda-case-       ---       -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',-       --           'ApiAnnotation.AnnCase','ApiAnnotation.AnnOpen',-       --           'ApiAnnotation.AnnClose'--       -- For details on above see note [Api annotations] in ApiAnnotation--  | HsApp     (XApp p) (LHsExpr p) (LHsExpr p) -- ^ Application--  | HsAppType (XAppTypeE p) (LHsExpr p) (LHsWcType (NoGhcTc p))  -- ^ Visible type application-       ---       -- Explicit type argument; e.g  f @Int x y-       -- NB: Has wildcards, but no implicit quantification-       ---       -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnAt',--  -- | Operator applications:-  -- NB Bracketed ops such as (+) come out as Vars.--  -- NB We need an expr for the operator in an OpApp/Section since-  -- the typechecker may need to apply the operator to a few types.--  | OpApp       (XOpApp p)-                (LHsExpr p)       -- left operand-                (LHsExpr p)       -- operator-                (LHsExpr p)       -- right operand--  -- | Negation operator. Contains the negated expression and the name-  -- of 'negate'-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnMinus'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | NegApp      (XNegApp p)-                (LHsExpr p)-                (SyntaxExpr p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,-  --             'ApiAnnotation.AnnClose' @')'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsPar       (XPar p)-                (LHsExpr p)  -- ^ Parenthesised expr; see Note [Parens in HsSyn]--  | SectionL    (XSectionL p)-                (LHsExpr p)    -- operand; see Note [Sections in HsSyn]-                (LHsExpr p)    -- operator-  | SectionR    (XSectionR p)-                (LHsExpr p)    -- operator; see Note [Sections in HsSyn]-                (LHsExpr p)    -- operand--  -- | Used for explicit tuples and sections thereof-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-  --         'ApiAnnotation.AnnClose'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ExplicitTuple-        (XExplicitTuple p)-        [LHsTupArg p]-        Boxity--  -- | Used for unboxed sum types-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'(#'@,-  --          'ApiAnnotation.AnnVbar', 'ApiAnnotation.AnnClose' @'#)'@,-  ---  --  There will be multiple 'ApiAnnotation.AnnVbar', (1 - alternative) before-  --  the expression, (arity - alternative) after it-  | ExplicitSum-          (XExplicitSum p)-          ConTag --  Alternative (one-based)-          Arity  --  Sum arity-          (LHsExpr p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnCase',-  --       'ApiAnnotation.AnnOf','ApiAnnotation.AnnOpen' @'{'@,-  --       'ApiAnnotation.AnnClose' @'}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsCase      (XCase p)-                (LHsExpr p)-                (MatchGroup p (LHsExpr p))--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnIf',-  --       'ApiAnnotation.AnnSemi',-  --       'ApiAnnotation.AnnThen','ApiAnnotation.AnnSemi',-  --       'ApiAnnotation.AnnElse',--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsIf        (XIf p)-                (Maybe (SyntaxExpr p)) -- cond function-                                        -- Nothing => use the built-in 'if'-                                        -- See Note [Rebindable if]-                (LHsExpr p)    --  predicate-                (LHsExpr p)    --  then part-                (LHsExpr p)    --  else part--  -- | Multi-way if-  ---  -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnIf'-  --       'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsMultiIf   (XMultiIf p) [LGRHS p (LHsExpr p)]--  -- | let(rec)-  ---  -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet',-  --       'ApiAnnotation.AnnOpen' @'{'@,-  --       'ApiAnnotation.AnnClose' @'}'@,'ApiAnnotation.AnnIn'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsLet       (XLet p)-                (LHsLocalBinds p)-                (LHsExpr  p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDo',-  --             'ApiAnnotation.AnnOpen', 'ApiAnnotation.AnnSemi',-  --             'ApiAnnotation.AnnVbar',-  --             'ApiAnnotation.AnnClose'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsDo        (XDo p)                  -- Type of the whole expression-                (HsStmtContext Name)     -- The parameterisation is unimportant-                                         -- because in this context we never use-                                         -- the PatGuard or ParStmt variant-                (Located [ExprLStmt p]) -- "do":one or more stmts--  -- | Syntactic list: [a,b,c,...]-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,-  --              'ApiAnnotation.AnnClose' @']'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ExplicitList-                (XExplicitList p)  -- Gives type of components of list-                (Maybe (SyntaxExpr p))-                                   -- For OverloadedLists, the fromListN witness-                [LHsExpr p]--  -- | Record construction-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,-  --         'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose' @'}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | RecordCon-      { rcon_ext      :: XRecordCon p-      , rcon_con_name :: Located (IdP p)    -- The constructor name;-                                            --  not used after type checking-      , rcon_flds     :: HsRecordBinds p }  -- The fields--  -- | Record update-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,-  --         'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose' @'}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | RecordUpd-      { rupd_ext  :: XRecordUpd p-      , rupd_expr :: LHsExpr p-      , rupd_flds :: [LHsRecUpdField p]-      }-  -- For a type family, the arg types are of the *instance* tycon,-  -- not the family tycon--  -- | Expression with an explicit type signature. @e :: type@-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ExprWithTySig-                (XExprWithTySig p)--                (LHsExpr p)-                (LHsSigWcType (NoGhcTc p))--  -- | Arithmetic sequence-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,-  --              'ApiAnnotation.AnnComma','ApiAnnotation.AnnDotdot',-  --              'ApiAnnotation.AnnClose' @']'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ArithSeq-                (XArithSeq p)-                (Maybe (SyntaxExpr p))-                                  -- For OverloadedLists, the fromList witness-                (ArithSeqInfo p)--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsSCC       (XSCC p)-                SourceText            -- Note [Pragma source text] in BasicTypes-                StringLiteral         -- "set cost centre" SCC pragma-                (LHsExpr p)           -- expr whose cost is to be measured--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{-\# CORE'@,-  --             'ApiAnnotation.AnnVal', 'ApiAnnotation.AnnClose' @'\#-}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsCoreAnn   (XCoreAnn p)-                SourceText            -- Note [Pragma source text] in BasicTypes-                StringLiteral         -- hdaume: core annotation-                (LHsExpr p)--  ------------------------------------------------------------  -- MetaHaskell Extensions--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-  --         'ApiAnnotation.AnnOpenE','ApiAnnotation.AnnOpenEQ',-  --         'ApiAnnotation.AnnClose','ApiAnnotation.AnnCloseQ'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsBracket    (XBracket p) (HsBracket p)--    -- See Note [Pending Splices]-  | HsRnBracketOut-      (XRnBracketOut p)-      (HsBracket GhcRn)    -- Output of the renamer is the *original* renamed-                           -- expression, plus-      [PendingRnSplice]    -- _renamed_ splices to be type checked--  | HsTcBracketOut-      (XTcBracketOut p)-      (HsBracket GhcRn)    -- Output of the type checker is the *original*-                           -- renamed expression, plus-      [PendingTcSplice]    -- _typechecked_ splices to be-                           -- pasted back in by the desugarer--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-  --         'ApiAnnotation.AnnClose'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsSpliceE  (XSpliceE p) (HsSplice p)--  ------------------------------------------------------------  -- Arrow notation extension--  -- | @proc@ notation for Arrows-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnProc',-  --          'ApiAnnotation.AnnRarrow'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsProc      (XProc p)-                (LPat p)               -- arrow abstraction, proc-                (LHsCmdTop p)          -- body of the abstraction-                                       -- always has an empty stack--  ----------------------------------------  -- static pointers extension-  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnStatic',--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsStatic (XStatic p) -- Free variables of the body-             (LHsExpr p)        -- Body--  ----------------------------------------  -- The following are commands, not expressions proper-  -- They are only used in the parsing stage and are removed-  --    immediately in parser.RdrHsSyn.checkCommand--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.Annlarrowtail',-  --          'ApiAnnotation.Annrarrowtail','ApiAnnotation.AnnLarrowtail',-  --          'ApiAnnotation.AnnRarrowtail'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsArrApp             -- Arrow tail, or arrow application (f -< arg)-        (XArrApp p)     -- type of the arrow expressions f,-                        -- of the form a t t', where arg :: t-        (LHsExpr p)     -- arrow expression, f-        (LHsExpr p)     -- input expression, arg-        HsArrAppType    -- higher-order (-<<) or first-order (-<)-        Bool            -- True => right-to-left (f -< arg)-                        -- False => left-to-right (arg >- f)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpenB' @'(|'@,-  --         'ApiAnnotation.AnnCloseB' @'|)'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsArrForm            -- Command formation,  (| e cmd1 .. cmdn |)-        (XArrForm p)-        (LHsExpr p)      -- the operator-                         -- after type-checking, a type abstraction to be-                         -- applied to the type of the local environment tuple-        (Maybe Fixity)   -- fixity (filled in by the renamer), for forms that-                         -- were converted from OpApp's by the renamer-        [LHsCmdTop p]    -- argument commands--  ----------------------------------------  -- Haskell program coverage (Hpc) Support--  | HsTick-     (XTick p)-     (Tickish (IdP p))-     (LHsExpr p)                       -- sub-expression--  | HsBinTick-     (XBinTick p)-     Int                                -- module-local tick number for True-     Int                                -- module-local tick number for False-     (LHsExpr p)                        -- sub-expression--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-  --       'ApiAnnotation.AnnOpen' @'{-\# GENERATED'@,-  --       'ApiAnnotation.AnnVal','ApiAnnotation.AnnVal',-  --       'ApiAnnotation.AnnColon','ApiAnnotation.AnnVal',-  --       'ApiAnnotation.AnnMinus',-  --       'ApiAnnotation.AnnVal','ApiAnnotation.AnnColon',-  --       'ApiAnnotation.AnnVal',-  --       'ApiAnnotation.AnnClose' @'\#-}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsTickPragma                      -- A pragma introduced tick-     (XTickPragma p)-     SourceText                       -- Note [Pragma source text] in BasicTypes-     (StringLiteral,(Int,Int),(Int,Int))-                                      -- external span for this tick-     ((SourceText,SourceText),(SourceText,SourceText))-        -- Source text for the four integers used in the span.-        -- See note [Pragma source text] in BasicTypes-     (LHsExpr p)--  ----------------------------------------  -- These constructors only appear temporarily in the parser.-  -- The renamer translates them into the Right Thing.--  | EWildPat (XEWildPat p)        -- wildcard--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnAt'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | EAsPat      (XEAsPat p)-                (Located (IdP p)) -- as pattern-                (LHsExpr p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | EViewPat    (XEViewPat p)-                (LHsExpr p) -- view pattern-                (LHsExpr p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnTilde'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ELazyPat    (XELazyPat p) (LHsExpr p) -- ~ pattern---  ----------------------------------------  -- Finally, HsWrap appears only in typechecker output-  -- The contained Expr is *NOT* itself an HsWrap.-  -- See Note [Detecting forced eta expansion] in DsExpr. This invariant-  -- is maintained by HsUtils.mkHsWrap.--  |  HsWrap     (XWrap p)-                HsWrapper    -- TRANSLATION-                (HsExpr p)--  | XExpr       (XXExpr p) -- Note [Trees that Grow] extension constructor----- | Extra data fields for a 'RecordCon', added by the type checker-data RecordConTc = RecordConTc-      { rcon_con_like :: ConLike      -- The data constructor or pattern synonym-      , rcon_con_expr :: PostTcExpr   -- Instantiated constructor function-      }---- | Extra data fields for a 'RecordUpd', added by the type checker-data RecordUpdTc = RecordUpdTc-      { rupd_cons :: [ConLike]-                -- Filled in by the type checker to the-                -- _non-empty_ list of DataCons that have-                -- all the upd'd fields--      , rupd_in_tys  :: [Type] -- Argument types of *input* record type-      , rupd_out_tys :: [Type] --             and  *output* record type-                               -- The original type can be reconstructed-                               -- with conLikeResTy-      , rupd_wrap :: HsWrapper -- See note [Record Update HsWrapper]-      } deriving Data---- -----------------------------------------------------------------------type instance XVar           (GhcPass _) = NoExt-type instance XUnboundVar    (GhcPass _) = NoExt-type instance XConLikeOut    (GhcPass _) = NoExt-type instance XRecFld        (GhcPass _) = NoExt-type instance XOverLabel     (GhcPass _) = NoExt-type instance XIPVar         (GhcPass _) = NoExt-type instance XOverLitE      (GhcPass _) = NoExt-type instance XLitE          (GhcPass _) = NoExt-type instance XLam           (GhcPass _) = NoExt-type instance XLamCase       (GhcPass _) = NoExt-type instance XApp           (GhcPass _) = NoExt--type instance XAppTypeE      (GhcPass _) = NoExt--type instance XOpApp         GhcPs = NoExt-type instance XOpApp         GhcRn = Fixity-type instance XOpApp         GhcTc = Fixity--type instance XNegApp        (GhcPass _) = NoExt-type instance XPar           (GhcPass _) = NoExt-type instance XSectionL      (GhcPass _) = NoExt-type instance XSectionR      (GhcPass _) = NoExt-type instance XExplicitTuple (GhcPass _) = NoExt--type instance XExplicitSum   GhcPs = NoExt-type instance XExplicitSum   GhcRn = NoExt-type instance XExplicitSum   GhcTc = [Type]--type instance XCase          (GhcPass _) = NoExt-type instance XIf            (GhcPass _) = NoExt--type instance XMultiIf       GhcPs = NoExt-type instance XMultiIf       GhcRn = NoExt-type instance XMultiIf       GhcTc = Type--type instance XLet           (GhcPass _) = NoExt--type instance XDo            GhcPs = NoExt-type instance XDo            GhcRn = NoExt-type instance XDo            GhcTc = Type--type instance XExplicitList  GhcPs = NoExt-type instance XExplicitList  GhcRn = NoExt-type instance XExplicitList  GhcTc = Type--type instance XRecordCon     GhcPs = NoExt-type instance XRecordCon     GhcRn = NoExt-type instance XRecordCon     GhcTc = RecordConTc--type instance XRecordUpd     GhcPs = NoExt-type instance XRecordUpd     GhcRn = NoExt-type instance XRecordUpd     GhcTc = RecordUpdTc--type instance XExprWithTySig (GhcPass _) = NoExt--type instance XArithSeq      GhcPs = NoExt-type instance XArithSeq      GhcRn = NoExt-type instance XArithSeq      GhcTc = PostTcExpr--type instance XSCC           (GhcPass _) = NoExt-type instance XCoreAnn       (GhcPass _) = NoExt-type instance XBracket       (GhcPass _) = NoExt--type instance XRnBracketOut  (GhcPass _) = NoExt-type instance XTcBracketOut  (GhcPass _) = NoExt--type instance XSpliceE       (GhcPass _) = NoExt-type instance XProc          (GhcPass _) = NoExt--type instance XStatic        GhcPs = NoExt-type instance XStatic        GhcRn = NameSet-type instance XStatic        GhcTc = NameSet--type instance XArrApp        GhcPs = NoExt-type instance XArrApp        GhcRn = NoExt-type instance XArrApp        GhcTc = Type--type instance XArrForm       (GhcPass _) = NoExt-type instance XTick          (GhcPass _) = NoExt-type instance XBinTick       (GhcPass _) = NoExt-type instance XTickPragma    (GhcPass _) = NoExt-type instance XEWildPat      (GhcPass _) = NoExt-type instance XEAsPat        (GhcPass _) = NoExt-type instance XEViewPat      (GhcPass _) = NoExt-type instance XELazyPat      (GhcPass _) = NoExt-type instance XWrap          (GhcPass _) = NoExt-type instance XXExpr         (GhcPass _) = NoExt---- ------------------------------------------------------------------------- | Located Haskell Tuple Argument------ 'HsTupArg' is used for tuple sections--- @(,a,)@ is represented by--- @ExplicitTuple [Missing ty1, Present a, Missing ty3]@--- Which in turn stands for @(\x:ty1 \y:ty2. (x,a,y))@-type LHsTupArg id = Located (HsTupArg id)--- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'---- For details on above see note [Api annotations] in ApiAnnotation---- | Haskell Tuple Argument-data HsTupArg id-  = Present (XPresent id) (LHsExpr id)     -- ^ The argument-  | Missing (XMissing id)    -- ^ The argument is missing, but this is its type-  | XTupArg (XXTupArg id)    -- ^ Note [Trees that Grow] extension point--type instance XPresent         (GhcPass _) = NoExt--type instance XMissing         GhcPs = NoExt-type instance XMissing         GhcRn = NoExt-type instance XMissing         GhcTc = Type--type instance XXTupArg         (GhcPass _) = NoExt--tupArgPresent :: LHsTupArg id -> Bool-tupArgPresent (L _ (Present {})) = True-tupArgPresent (L _ (Missing {})) = False-tupArgPresent (L _ (XTupArg {})) = False--{--Note [Parens in HsSyn]-~~~~~~~~~~~~~~~~~~~~~~-HsPar (and ParPat in patterns, HsParTy in types) is used as follows--  * HsPar is required; the pretty printer does not add parens.--  * HsPars are respected when rearranging operator fixities.-    So   a * (b + c)  means what it says (where the parens are an HsPar)--  * For ParPat and HsParTy the pretty printer does add parens but this should be-    a no-op for ParsedSource, based on the pretty printer round trip feature-    introduced in-    https://phabricator.haskell.org/rGHC499e43824bda967546ebf95ee33ec1f84a114a7c--  * ParPat and HsParTy are pretty printed as '( .. )' regardless of whether or-    not they are strictly necessary. This should be addressed when #13238 is-    completed, to be treated the same as HsPar.---Note [Sections in HsSyn]-~~~~~~~~~~~~~~~~~~~~~~~~-Sections should always appear wrapped in an HsPar, thus-         HsPar (SectionR ...)-The parser parses sections in a wider variety of situations-(See Note [Parsing sections]), but the renamer checks for those-parens.  This invariant makes pretty-printing easier; we don't need-a special case for adding the parens round sections.--Note [Rebindable if]-~~~~~~~~~~~~~~~~~~~~-The rebindable syntax for 'if' is a bit special, because when-rebindable syntax is *off* we do not want to treat-   (if c then t else e)-as if it was an application (ifThenElse c t e).  Why not?-Because we allow an 'if' to return *unboxed* results, thus-  if blah then 3# else 4#-whereas that would not be possible using a all to a polymorphic function-(because you can't call a polymorphic function at an unboxed type).--So we use Nothing to mean "use the old built-in typing rule".--Note [Record Update HsWrapper]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There is a wrapper in RecordUpd which is used for the *required*-constraints for pattern synonyms. This wrapper is created in the-typechecking and is then directly used in the desugaring without-modification.--For example, if we have the record pattern synonym P,-  pattern P :: (Show a) => a -> Maybe a-  pattern P{x} = Just x--  foo = (Just True) { x = False }-then `foo` desugars to something like-  foo = case Just True of-          P x -> P False-hence we need to provide the correct dictionaries to P's matcher on-the RHS so that we can build the expression.--Note [Located RdrNames]-~~~~~~~~~~~~~~~~~~~~~~~-A number of syntax elements have seemingly redundant locations attached to them.-This is deliberate, to allow transformations making use of the API Annotations-to easily correlate a Located Name in the RenamedSource with a Located RdrName-in the ParsedSource.--There are unfortunately enough differences between the ParsedSource and the-RenamedSource that the API Annotations cannot be used directly with-RenamedSource, so this allows a simple mapping to be used based on the location.--}--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsExpr p) where-    ppr expr = pprExpr expr---------------------------- pprExpr, pprLExpr, pprBinds call pprDeeper;--- the underscore versions do not-pprLExpr :: (OutputableBndrId (GhcPass p)) => LHsExpr (GhcPass p) -> SDoc-pprLExpr (L _ e) = pprExpr e--pprExpr :: (OutputableBndrId (GhcPass p)) => HsExpr (GhcPass p) -> SDoc-pprExpr e | isAtomicHsExpr e || isQuietHsExpr e =            ppr_expr e-          | otherwise                           = pprDeeper (ppr_expr e)--isQuietHsExpr :: HsExpr id -> Bool--- Parentheses do display something, but it gives little info and--- if we go deeper when we go inside them then we get ugly things--- like (...)-isQuietHsExpr (HsPar {})        = True--- applications don't display anything themselves-isQuietHsExpr (HsApp {})        = True-isQuietHsExpr (HsAppType {})    = True-isQuietHsExpr (OpApp {})        = True-isQuietHsExpr _ = False--pprBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR))-         => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc-pprBinds b = pprDeeper (ppr b)--------------------------ppr_lexpr :: (OutputableBndrId (GhcPass p)) => LHsExpr (GhcPass p) -> SDoc-ppr_lexpr e = ppr_expr (unLoc e)--ppr_expr :: forall p. (OutputableBndrId (GhcPass p))-         => HsExpr (GhcPass p) -> SDoc-ppr_expr (HsVar _ (L _ v))  = pprPrefixOcc v-ppr_expr (HsUnboundVar _ uv)= pprPrefixOcc (unboundVarOcc uv)-ppr_expr (HsConLikeOut _ c) = pprPrefixOcc c-ppr_expr (HsIPVar _ v)      = ppr v-ppr_expr (HsOverLabel _ _ l)= char '#' <> ppr l-ppr_expr (HsLit _ lit)      = ppr lit-ppr_expr (HsOverLit _ lit)  = ppr lit-ppr_expr (HsPar _ e)        = parens (ppr_lexpr e)--ppr_expr (HsCoreAnn _ stc (StringLiteral sta s) e)-  = vcat [pprWithSourceText stc (text "{-# CORE")-          <+> pprWithSourceText sta (doubleQuotes $ ftext s) <+> text "#-}"-         , ppr_lexpr e]--ppr_expr e@(HsApp {})        = ppr_apps e []-ppr_expr e@(HsAppType {})    = ppr_apps e []--ppr_expr (OpApp _ e1 op e2)-  | Just pp_op <- should_print_infix (unLoc op)-  = pp_infixly pp_op-  | otherwise-  = pp_prefixly--  where-    should_print_infix (HsVar _ (L _ v)) = Just (pprInfixOcc v)-    should_print_infix (HsConLikeOut _ c)= Just (pprInfixOcc (conLikeName c))-    should_print_infix (HsRecFld _ f)    = Just (pprInfixOcc f)-    should_print_infix (HsUnboundVar _ h@TrueExprHole{})-                                       = Just (pprInfixOcc (unboundVarOcc h))-    should_print_infix (EWildPat _)    = Just (text "`_`")-    should_print_infix (HsWrap _ _ e)  = should_print_infix e-    should_print_infix _               = Nothing--    pp_e1 = pprDebugParendExpr opPrec e1   -- In debug mode, add parens-    pp_e2 = pprDebugParendExpr opPrec e2   -- to make precedence clear--    pp_prefixly-      = hang (ppr op) 2 (sep [pp_e1, pp_e2])--    pp_infixly pp_op-      = hang pp_e1 2 (sep [pp_op, nest 2 pp_e2])--ppr_expr (NegApp _ e _) = char '-' <+> pprDebugParendExpr appPrec e--ppr_expr (SectionL _ expr op)-  = case unLoc op of-      HsVar _ (L _ v)  -> pp_infixly v-      HsConLikeOut _ c -> pp_infixly (conLikeName c)-      HsUnboundVar _ h@TrueExprHole{}-                       -> pp_infixly (unboundVarOcc h)-      _                -> pp_prefixly-  where-    pp_expr = pprDebugParendExpr opPrec expr--    pp_prefixly = hang (hsep [text " \\ x_ ->", ppr op])-                       4 (hsep [pp_expr, text "x_ )"])--    pp_infixly :: forall a. (OutputableBndr a) => a -> SDoc-    pp_infixly v = (sep [pp_expr, pprInfixOcc v])--ppr_expr (SectionR _ op expr)-  = case unLoc op of-      HsVar _ (L _ v)  -> pp_infixly v-      HsConLikeOut _ c -> pp_infixly (conLikeName c)-      HsUnboundVar _ h@TrueExprHole{}-                       -> pp_infixly (unboundVarOcc h)-      _                -> pp_prefixly-  where-    pp_expr = pprDebugParendExpr opPrec expr--    pp_prefixly = hang (hsep [text "( \\ x_ ->", ppr op, text "x_"])-                       4 (pp_expr <> rparen)--    pp_infixly :: forall a. (OutputableBndr a) => a -> SDoc-    pp_infixly v = sep [pprInfixOcc v, pp_expr]--ppr_expr (ExplicitTuple _ exprs boxity)-  = tupleParens (boxityTupleSort boxity) (fcat (ppr_tup_args $ map unLoc exprs))-  where-    ppr_tup_args []               = []-    ppr_tup_args (Present _ e : es) = (ppr_lexpr e <> punc es) : ppr_tup_args es-    ppr_tup_args (Missing _   : es) = punc es : ppr_tup_args es-    ppr_tup_args (XTupArg x   : es) = (ppr x <> punc es) : ppr_tup_args es--    punc (Present {} : _) = comma <> space-    punc (Missing {} : _) = comma-    punc (XTupArg {} : _) = comma <> space-    punc []               = empty--ppr_expr (ExplicitSum _ alt arity expr)-  = text "(#" <+> ppr_bars (alt - 1) <+> ppr expr <+> ppr_bars (arity - alt) <+> text "#)"-  where-    ppr_bars n = hsep (replicate n (char '|'))--ppr_expr (HsLam _ matches)-  = pprMatches matches--ppr_expr (HsLamCase _ matches)-  = sep [ sep [text "\\case"],-          nest 2 (pprMatches matches) ]--ppr_expr (HsCase _ expr matches@(MG { mg_alts = L _ [_] }))-  = sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of {")],-          nest 2 (pprMatches matches) <+> char '}']-ppr_expr (HsCase _ expr matches)-  = sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of")],-          nest 2 (pprMatches matches) ]--ppr_expr (HsIf _ _ e1 e2 e3)-  = sep [hsep [text "if", nest 2 (ppr e1), ptext (sLit "then")],-         nest 4 (ppr e2),-         text "else",-         nest 4 (ppr e3)]--ppr_expr (HsMultiIf _ alts)-  = hang (text "if") 3  (vcat (map ppr_alt alts))-  where ppr_alt (L _ (GRHS _ guards expr)) =-          hang vbar 2 (ppr_one one_alt)-          where-            ppr_one [] = panic "ppr_exp HsMultiIf"-            ppr_one (h:t) = hang h 2 (sep t)-            one_alt = [ interpp'SP guards-                      , text "->" <+> pprDeeper (ppr expr) ]-        ppr_alt (L _ (XGRHS x)) = ppr x---- special case: let ... in let ...-ppr_expr (HsLet _ (L _ binds) expr@(L _ (HsLet _ _ _)))-  = sep [hang (text "let") 2 (hsep [pprBinds binds, ptext (sLit "in")]),-         ppr_lexpr expr]--ppr_expr (HsLet _ (L _ binds) expr)-  = sep [hang (text "let") 2 (pprBinds binds),-         hang (text "in")  2 (ppr expr)]--ppr_expr (HsDo _ do_or_list_comp (L _ stmts)) = pprDo do_or_list_comp stmts--ppr_expr (ExplicitList _ _ exprs)-  = brackets (pprDeeperList fsep (punctuate comma (map ppr_lexpr exprs)))--ppr_expr (RecordCon { rcon_con_name = con_id, rcon_flds = rbinds })-  = hang (ppr con_id) 2 (ppr rbinds)--ppr_expr (RecordUpd { rupd_expr = L _ aexp, rupd_flds = rbinds })-  = hang (ppr aexp) 2 (braces (fsep (punctuate comma (map ppr rbinds))))--ppr_expr (ExprWithTySig _ expr sig)-  = hang (nest 2 (ppr_lexpr expr) <+> dcolon)-         4 (ppr sig)--ppr_expr (ArithSeq _ _ info) = brackets (ppr info)--ppr_expr (EWildPat _)     = char '_'-ppr_expr (ELazyPat _ e)   = char '~' <> ppr e-ppr_expr (EAsPat _ (L _ v) e) = pprPrefixOcc v <> char '@' <> ppr e-ppr_expr (EViewPat _ p e) = ppr p <+> text "->" <+> ppr e--ppr_expr (HsSCC _ st (StringLiteral stl lbl) expr)-  = sep [ pprWithSourceText st (text "{-# SCC")-         -- no doublequotes if stl empty, for the case where the SCC was written-         -- without quotes.-          <+> pprWithSourceText stl (ftext lbl) <+> text "#-}",-          ppr expr ]--ppr_expr (HsWrap _ co_fn e)-  = pprHsWrapper co_fn (\parens -> if parens then pprExpr e-                                             else pprExpr e)--ppr_expr (HsSpliceE _ s)         = pprSplice s-ppr_expr (HsBracket _ b)         = pprHsBracket b-ppr_expr (HsRnBracketOut _ e []) = ppr e-ppr_expr (HsRnBracketOut _ e ps) = ppr e $$ text "pending(rn)" <+> ppr ps-ppr_expr (HsTcBracketOut _ e []) = ppr e-ppr_expr (HsTcBracketOut _ e ps) = ppr e $$ text "pending(tc)" <+> ppr ps--ppr_expr (HsProc _ pat (L _ (HsCmdTop _ cmd)))-  = hsep [text "proc", ppr pat, ptext (sLit "->"), ppr cmd]-ppr_expr (HsProc _ pat (L _ (XCmdTop x)))-  = hsep [text "proc", ppr pat, ptext (sLit "->"), ppr x]--ppr_expr (HsStatic _ e)-  = hsep [text "static", ppr e]--ppr_expr (HsTick _ tickish exp)-  = pprTicks (ppr exp) $-    ppr tickish <+> ppr_lexpr exp-ppr_expr (HsBinTick _ tickIdTrue tickIdFalse exp)-  = pprTicks (ppr exp) $-    hcat [text "bintick<",-          ppr tickIdTrue,-          text ",",-          ppr tickIdFalse,-          text ">(",-          ppr exp, text ")"]-ppr_expr (HsTickPragma _ _ externalSrcLoc _ exp)-  = pprTicks (ppr exp) $-    hcat [text "tickpragma<",-          pprExternalSrcLoc externalSrcLoc,-          text ">(",-          ppr exp,-          text ")"]--ppr_expr (HsArrApp _ arrow arg HsFirstOrderApp True)-  = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]-ppr_expr (HsArrApp _ arrow arg HsFirstOrderApp False)-  = hsep [ppr_lexpr arg, arrowt, ppr_lexpr arrow]-ppr_expr (HsArrApp _ arrow arg HsHigherOrderApp True)-  = hsep [ppr_lexpr arrow, larrowtt, ppr_lexpr arg]-ppr_expr (HsArrApp _ arrow arg HsHigherOrderApp False)-  = hsep [ppr_lexpr arg, arrowtt, ppr_lexpr arrow]--ppr_expr (HsArrForm _ (L _ (HsVar _ (L _ v))) (Just _) [arg1, arg2])-  = sep [pprCmdArg (unLoc arg1), hsep [pprInfixOcc v, pprCmdArg (unLoc arg2)]]-ppr_expr (HsArrForm _ (L _ (HsConLikeOut _ c)) (Just _) [arg1, arg2])-  = sep [pprCmdArg (unLoc arg1), hsep [pprInfixOcc (conLikeName c), pprCmdArg (unLoc arg2)]]-ppr_expr (HsArrForm _ op _ args)-  = hang (text "(|" <+> ppr_lexpr op)-         4 (sep (map (pprCmdArg.unLoc) args) <+> text "|)")-ppr_expr (HsRecFld _ f) = ppr f-ppr_expr (XExpr x) = ppr x--ppr_apps :: (OutputableBndrId (GhcPass p))-         => HsExpr (GhcPass p)-         -> [Either (LHsExpr (GhcPass p)) (LHsWcType (NoGhcTc (GhcPass p)))]-         -> SDoc-ppr_apps (HsApp _ (L _ fun) arg)        args-  = ppr_apps fun (Left arg : args)-ppr_apps (HsAppType _ (L _ fun) arg)    args-  = ppr_apps fun (Right arg : args)-ppr_apps fun args = hang (ppr_expr fun) 2 (sep (map pp args))-  where-    pp (Left arg)                             = ppr arg-    -- pp (Right (LHsWcTypeX (HsWC { hswc_body = L _ arg })))-    --   = char '@' <> pprHsType arg-    pp (Right arg)-      = char '@' <> ppr arg--pprExternalSrcLoc :: (StringLiteral,(Int,Int),(Int,Int)) -> SDoc-pprExternalSrcLoc (StringLiteral _ src,(n1,n2),(n3,n4))-  = ppr (src,(n1,n2),(n3,n4))--{--HsSyn records exactly where the user put parens, with HsPar.-So generally speaking we print without adding any parens.-However, some code is internally generated, and in some places-parens are absolutely required; so for these places we use-pprParendLExpr (but don't print double parens of course).--For operator applications we don't add parens, because the operator-fixities should do the job, except in debug mode (-dppr-debug) so we-can see the structure of the parse tree.--}--pprDebugParendExpr :: (OutputableBndrId (GhcPass p))-                   => PprPrec -> LHsExpr (GhcPass p) -> SDoc-pprDebugParendExpr p expr-  = getPprStyle (\sty ->-    if debugStyle sty then pprParendLExpr p expr-                      else pprLExpr      expr)--pprParendLExpr :: (OutputableBndrId (GhcPass p))-               => PprPrec -> LHsExpr (GhcPass p) -> SDoc-pprParendLExpr p (L _ e) = pprParendExpr p e--pprParendExpr :: (OutputableBndrId (GhcPass p))-              => PprPrec -> HsExpr (GhcPass p) -> SDoc-pprParendExpr p expr-  | hsExprNeedsParens p expr = parens (pprExpr expr)-  | otherwise                = pprExpr expr-        -- Using pprLExpr makes sure that we go 'deeper'-        -- I think that is usually (always?) right---- | @'hsExprNeedsParens' p e@ returns 'True' if the expression @e@ needs--- parentheses under precedence @p@.-hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool-hsExprNeedsParens p = go-  where-    go (HsVar{})                      = False-    go (HsUnboundVar{})               = False-    go (HsConLikeOut{})               = False-    go (HsIPVar{})                    = False-    go (HsOverLabel{})                = False-    go (HsLit _ l)                    = hsLitNeedsParens p l-    go (HsOverLit _ ol)               = hsOverLitNeedsParens p ol-    go (HsPar{})                      = False-    go (HsCoreAnn _ _ _ (L _ e))      = go e-    go (HsApp{})                      = p >= appPrec-    go (HsAppType {})                 = p >= appPrec-    go (OpApp{})                      = p >= opPrec-    go (NegApp{})                     = p > topPrec-    go (SectionL{})                   = True-    go (SectionR{})                   = True-    go (ExplicitTuple{})              = False-    go (ExplicitSum{})                = False-    go (HsLam{})                      = p > topPrec-    go (HsLamCase{})                  = p > topPrec-    go (HsCase{})                     = p > topPrec-    go (HsIf{})                       = p > topPrec-    go (HsMultiIf{})                  = p > topPrec-    go (HsLet{})                      = p > topPrec-    go (HsDo _ sc _)-      | isComprehensionContext sc     = False-      | otherwise                     = p > topPrec-    go (ExplicitList{})               = False-    go (RecordUpd{})                  = False-    go (ExprWithTySig{})              = p >= sigPrec-    go (ArithSeq{})                   = False-    go (EWildPat{})                   = False-    go (ELazyPat{})                   = False-    go (EAsPat{})                     = False-    go (EViewPat{})                   = True-    go (HsSCC{})                      = p >= appPrec-    go (HsWrap _ _ e)                 = go e-    go (HsSpliceE{})                  = False-    go (HsBracket{})                  = False-    go (HsRnBracketOut{})             = False-    go (HsTcBracketOut{})             = False-    go (HsProc{})                     = p > topPrec-    go (HsStatic{})                   = p >= appPrec-    go (HsTick _ _ (L _ e))           = go e-    go (HsBinTick _ _ _ (L _ e))      = go e-    go (HsTickPragma _ _ _ _ (L _ e)) = go e-    go (HsArrApp{})                   = True-    go (HsArrForm{})                  = True-    go (RecordCon{})                  = False-    go (HsRecFld{})                   = False-    go (XExpr{})                      = True---- | @'parenthesizeHsExpr' p e@ checks if @'hsExprNeedsParens' p e@ is true,--- and if so, surrounds @e@ with an 'HsPar'. Otherwise, it simply returns @e@.-parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)-parenthesizeHsExpr p le@(L loc e)-  | hsExprNeedsParens p e = L loc (HsPar NoExt le)-  | otherwise             = le--isAtomicHsExpr :: HsExpr id -> Bool--- True of a single token-isAtomicHsExpr (HsVar {})        = True-isAtomicHsExpr (HsConLikeOut {}) = True-isAtomicHsExpr (HsLit {})        = True-isAtomicHsExpr (HsOverLit {})    = True-isAtomicHsExpr (HsIPVar {})      = True-isAtomicHsExpr (HsOverLabel {})  = True-isAtomicHsExpr (HsUnboundVar {}) = True-isAtomicHsExpr (HsWrap _ _ e)    = isAtomicHsExpr e-isAtomicHsExpr (HsPar _ e)       = isAtomicHsExpr (unLoc e)-isAtomicHsExpr (HsRecFld{})      = True-isAtomicHsExpr _                 = False--{--************************************************************************-*                                                                      *-\subsection{Commands (in arrow abstractions)}-*                                                                      *-************************************************************************--We re-use HsExpr to represent these.--}---- | Located Haskell Command (for arrow syntax)-type LHsCmd id = Located (HsCmd id)---- | Haskell Command (e.g. a "statement" in an Arrow proc block)-data HsCmd id-  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.Annlarrowtail',-  --          'ApiAnnotation.Annrarrowtail','ApiAnnotation.AnnLarrowtail',-  --          'ApiAnnotation.AnnRarrowtail'--  -- For details on above see note [Api annotations] in ApiAnnotation-  = HsCmdArrApp          -- Arrow tail, or arrow application (f -< arg)-        (XCmdArrApp id)  -- type of the arrow expressions f,-                         -- of the form a t t', where arg :: t-        (LHsExpr id)     -- arrow expression, f-        (LHsExpr id)     -- input expression, arg-        HsArrAppType     -- higher-order (-<<) or first-order (-<)-        Bool             -- True => right-to-left (f -< arg)-                         -- False => left-to-right (arg >- f)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpenB' @'(|'@,-  --         'ApiAnnotation.AnnCloseB' @'|)'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsCmdArrForm         -- Command formation,  (| e cmd1 .. cmdn |)-        (XCmdArrForm id)-        (LHsExpr id)     -- The operator.-                         -- After type-checking, a type abstraction to be-                         -- applied to the type of the local environment tuple-        LexicalFixity    -- Whether the operator appeared prefix or infix when-                         -- parsed.-        (Maybe Fixity)   -- fixity (filled in by the renamer), for forms that-                         -- were converted from OpApp's by the renamer-        [LHsCmdTop id]   -- argument commands--  | HsCmdApp    (XCmdApp id)-                (LHsCmd id)-                (LHsExpr id)--  | HsCmdLam    (XCmdLam id)-                (MatchGroup id (LHsCmd id))     -- kappa-       -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',-       --       'ApiAnnotation.AnnRarrow',--       -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdPar    (XCmdPar id)-                (LHsCmd id)                     -- parenthesised command-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,-    --             'ApiAnnotation.AnnClose' @')'@--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdCase   (XCmdCase id)-                (LHsExpr id)-                (MatchGroup id (LHsCmd id))     -- bodies are HsCmd's-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnCase',-    --       'ApiAnnotation.AnnOf','ApiAnnotation.AnnOpen' @'{'@,-    --       'ApiAnnotation.AnnClose' @'}'@--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdIf     (XCmdIf id)-                (Maybe (SyntaxExpr id))         -- cond function-                (LHsExpr id)                    -- predicate-                (LHsCmd id)                     -- then part-                (LHsCmd id)                     -- else part-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnIf',-    --       'ApiAnnotation.AnnSemi',-    --       'ApiAnnotation.AnnThen','ApiAnnotation.AnnSemi',-    --       'ApiAnnotation.AnnElse',--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdLet    (XCmdLet id)-                (LHsLocalBinds id)      -- let(rec)-                (LHsCmd  id)-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet',-    --       'ApiAnnotation.AnnOpen' @'{'@,-    --       'ApiAnnotation.AnnClose' @'}'@,'ApiAnnotation.AnnIn'--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdDo     (XCmdDo id)                     -- Type of the whole expression-                (Located [CmdLStmt id])-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDo',-    --             'ApiAnnotation.AnnOpen', 'ApiAnnotation.AnnSemi',-    --             'ApiAnnotation.AnnVbar',-    --             'ApiAnnotation.AnnClose'--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdWrap   (XCmdWrap id)-                HsWrapper-                (HsCmd id)     -- If   cmd :: arg1 --> res-                               --      wrap :: arg1 "->" arg2-                               -- Then (HsCmdWrap wrap cmd) :: arg2 --> res-  | XCmd        (XXCmd id)     -- Note [Trees that Grow] extension point--type instance XCmdArrApp  GhcPs = NoExt-type instance XCmdArrApp  GhcRn = NoExt-type instance XCmdArrApp  GhcTc = Type--type instance XCmdArrForm (GhcPass _) = NoExt-type instance XCmdApp     (GhcPass _) = NoExt-type instance XCmdLam     (GhcPass _) = NoExt-type instance XCmdPar     (GhcPass _) = NoExt-type instance XCmdCase    (GhcPass _) = NoExt-type instance XCmdIf      (GhcPass _) = NoExt-type instance XCmdLet     (GhcPass _) = NoExt--type instance XCmdDo      GhcPs = NoExt-type instance XCmdDo      GhcRn = NoExt-type instance XCmdDo      GhcTc = Type--type instance XCmdWrap    (GhcPass _) = NoExt-type instance XXCmd       (GhcPass _) = NoExt---- | Haskell Array Application Type-data HsArrAppType = HsHigherOrderApp | HsFirstOrderApp-  deriving Data---{- | Top-level command, introducing a new arrow.-This may occur inside a proc (where the stack is empty) or as an-argument of a command-forming operator.--}---- | Located Haskell Top-level Command-type LHsCmdTop p = Located (HsCmdTop p)---- | Haskell Top-level Command-data HsCmdTop p-  = HsCmdTop (XCmdTop p)-             (LHsCmd p)-  | XCmdTop (XXCmdTop p)        -- Note [Trees that Grow] extension point--data CmdTopTc-  = CmdTopTc Type    -- Nested tuple of inputs on the command's stack-             Type    -- return type of the command-             (CmdSyntaxTable GhcTc) -- See Note [CmdSyntaxTable]--type instance XCmdTop  GhcPs = NoExt-type instance XCmdTop  GhcRn = CmdSyntaxTable GhcRn -- See Note [CmdSyntaxTable]-type instance XCmdTop  GhcTc = CmdTopTc--type instance XXCmdTop (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsCmd p) where-    ppr cmd = pprCmd cmd---------------------------- pprCmd and pprLCmd call pprDeeper;--- the underscore versions do not-pprLCmd :: (OutputableBndrId (GhcPass p)) => LHsCmd (GhcPass p) -> SDoc-pprLCmd (L _ c) = pprCmd c--pprCmd :: (OutputableBndrId (GhcPass p)) => HsCmd (GhcPass p) -> SDoc-pprCmd c | isQuietHsCmd c =            ppr_cmd c-         | otherwise      = pprDeeper (ppr_cmd c)--isQuietHsCmd :: HsCmd id -> Bool--- Parentheses do display something, but it gives little info and--- if we go deeper when we go inside them then we get ugly things--- like (...)-isQuietHsCmd (HsCmdPar {}) = True--- applications don't display anything themselves-isQuietHsCmd (HsCmdApp {}) = True-isQuietHsCmd _ = False--------------------------ppr_lcmd :: (OutputableBndrId (GhcPass p)) => LHsCmd (GhcPass p) -> SDoc-ppr_lcmd c = ppr_cmd (unLoc c)--ppr_cmd :: forall p. (OutputableBndrId (GhcPass p)) => HsCmd (GhcPass p) -> SDoc-ppr_cmd (HsCmdPar _ c) = parens (ppr_lcmd c)--ppr_cmd (HsCmdApp _ c e)-  = let (fun, args) = collect_args c [e] in-    hang (ppr_lcmd fun) 2 (sep (map ppr args))-  where-    collect_args (L _ (HsCmdApp _ fun arg)) args = collect_args fun (arg:args)-    collect_args fun args = (fun, args)--ppr_cmd (HsCmdLam _ matches)-  = pprMatches matches--ppr_cmd (HsCmdCase _ expr matches)-  = sep [ sep [text "case", nest 4 (ppr expr), ptext (sLit "of")],-          nest 2 (pprMatches matches) ]--ppr_cmd (HsCmdIf _ _ e ct ce)-  = sep [hsep [text "if", nest 2 (ppr e), ptext (sLit "then")],-         nest 4 (ppr ct),-         text "else",-         nest 4 (ppr ce)]---- special case: let ... in let ...-ppr_cmd (HsCmdLet _ (L _ binds) cmd@(L _ (HsCmdLet {})))-  = sep [hang (text "let") 2 (hsep [pprBinds binds, ptext (sLit "in")]),-         ppr_lcmd cmd]--ppr_cmd (HsCmdLet _ (L _ binds) cmd)-  = sep [hang (text "let") 2 (pprBinds binds),-         hang (text "in")  2 (ppr cmd)]--ppr_cmd (HsCmdDo _ (L _ stmts))  = pprDo ArrowExpr stmts--ppr_cmd (HsCmdWrap _ w cmd)-  = pprHsWrapper w (\_ -> parens (ppr_cmd cmd))-ppr_cmd (HsCmdArrApp _ arrow arg HsFirstOrderApp True)-  = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]-ppr_cmd (HsCmdArrApp _ arrow arg HsFirstOrderApp False)-  = hsep [ppr_lexpr arg, arrowt, ppr_lexpr arrow]-ppr_cmd (HsCmdArrApp _ arrow arg HsHigherOrderApp True)-  = hsep [ppr_lexpr arrow, larrowtt, ppr_lexpr arg]-ppr_cmd (HsCmdArrApp _ arrow arg HsHigherOrderApp False)-  = hsep [ppr_lexpr arg, arrowtt, ppr_lexpr arrow]--ppr_cmd (HsCmdArrForm _ (L _ (HsVar _ (L _ v))) _ (Just _) [arg1, arg2])-  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc v-                                         , pprCmdArg (unLoc arg2)])-ppr_cmd (HsCmdArrForm _ (L _ (HsVar _ (L _ v))) Infix _    [arg1, arg2])-  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc v-                                         , pprCmdArg (unLoc arg2)])-ppr_cmd (HsCmdArrForm _ (L _ (HsConLikeOut _ c)) _ (Just _) [arg1, arg2])-  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc (conLikeName c)-                                         , pprCmdArg (unLoc arg2)])-ppr_cmd (HsCmdArrForm _ (L _ (HsConLikeOut _ c)) Infix _    [arg1, arg2])-  = hang (pprCmdArg (unLoc arg1)) 4 (sep [ pprInfixOcc (conLikeName c)-                                         , pprCmdArg (unLoc arg2)])-ppr_cmd (HsCmdArrForm _ op _ _ args)-  = hang (text "(|" <> ppr_lexpr op)-         4 (sep (map (pprCmdArg.unLoc) args) <> text "|)")-ppr_cmd (XCmd x) = ppr x--pprCmdArg :: (OutputableBndrId (GhcPass p)) => HsCmdTop (GhcPass p) -> SDoc-pprCmdArg (HsCmdTop _ cmd)-  = ppr_lcmd cmd-pprCmdArg (XCmdTop x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsCmdTop p) where-    ppr = pprCmdArg--{--************************************************************************-*                                                                      *-\subsection{Record binds}-*                                                                      *-************************************************************************--}---- | Haskell Record Bindings-type HsRecordBinds p = HsRecFields p (LHsExpr p)--{--************************************************************************-*                                                                      *-\subsection{@Match@, @GRHSs@, and @GRHS@ datatypes}-*                                                                      *-************************************************************************--@Match@es are sets of pattern bindings and right hand sides for-functions, patterns or case branches. For example, if a function @g@-is defined as:-\begin{verbatim}-g (x,y) = y-g ((x:ys),y) = y+1,-\end{verbatim}-then \tr{g} has two @Match@es: @(x,y) = y@ and @((x:ys),y) = y+1@.--It is always the case that each element of an @[Match]@ list has the-same number of @pats@s inside it.  This corresponds to saying that-a function defined by pattern matching must have the same number of-patterns in each equation.--}--data MatchGroup p body-  = MG { mg_ext     :: XMG p body -- Posr typechecker, types of args and result-       , mg_alts    :: Located [LMatch p body]  -- The alternatives-       , mg_origin  :: Origin }-     -- The type is the type of the entire group-     --      t1 -> ... -> tn -> tr-     -- where there are n patterns-  | XMatchGroup (XXMatchGroup p body)--data MatchGroupTc-  = MatchGroupTc-       { mg_arg_tys :: [Type]  -- Types of the arguments, t1..tn-       , mg_res_ty  :: Type    -- Type of the result, tr-       } deriving Data--type instance XMG         GhcPs b = NoExt-type instance XMG         GhcRn b = NoExt-type instance XMG         GhcTc b = MatchGroupTc--type instance XXMatchGroup (GhcPass _) b = NoExt---- | Located Match-type LMatch id body = Located (Match id body)--- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a---   list---- For details on above see note [Api annotations] in ApiAnnotation-data Match p body-  = Match {-        m_ext :: XCMatch p body,-        m_ctxt :: HsMatchContext (NameOrRdrName (IdP p)),-          -- See note [m_ctxt in Match]-        m_pats :: [LPat p], -- The patterns-        m_grhss :: (GRHSs p body)-  }-  | XMatch (XXMatch p body)--type instance XCMatch (GhcPass _) b = NoExt-type instance XXMatch (GhcPass _) b = NoExt--instance (idR ~ GhcPass pr, OutputableBndrId idR, Outputable body)-            => Outputable (Match idR body) where-  ppr = pprMatch--{--Note [m_ctxt in Match]-~~~~~~~~~~~~~~~~~~~~~~--A Match can occur in a number of contexts, such as a FunBind, HsCase, HsLam and-so on.--In order to simplify tooling processing and pretty print output, the provenance-is captured in an HsMatchContext.--This is particularly important for the API Annotations for a multi-equation-FunBind.--The parser initially creates a FunBind with a single Match in it for-every function definition it sees.--These are then grouped together by getMonoBind into a single FunBind,-where all the Matches are combined.--In the process, all the original FunBind fun_id's bar one are-discarded, including the locations.--This causes a problem for source to source conversions via API-Annotations, so the original fun_ids and infix flags are preserved in-the Match, when it originates from a FunBind.--Example infix function definition requiring individual API Annotations--    (&&&  ) [] [] =  []-    xs    &&&   [] =  xs-    (  &&&  ) [] ys =  ys-----}---isInfixMatch :: Match id body -> Bool-isInfixMatch match = case m_ctxt match of-  FunRhs {mc_fixity = Infix} -> True-  _                          -> False--isEmptyMatchGroup :: MatchGroup id body -> Bool-isEmptyMatchGroup (MG { mg_alts = ms }) = null $ unLoc ms-isEmptyMatchGroup (XMatchGroup{}) = panic "isEmptyMatchGroup"---- | Is there only one RHS in this list of matches?-isSingletonMatchGroup :: [LMatch id body] -> Bool-isSingletonMatchGroup matches-  | [L _ match] <- matches-  , Match { m_grhss = GRHSs { grhssGRHSs = [_] } } <- match-  = True-  | otherwise-  = False--matchGroupArity :: MatchGroup id body -> Arity--- Precondition: MatchGroup is non-empty--- This is called before type checking, when mg_arg_tys is not set-matchGroupArity (MG { mg_alts = alts })-  | L _ (alt1:_) <- alts = length (hsLMatchPats alt1)-  | otherwise        = panic "matchGroupArity"-matchGroupArity (XMatchGroup{}) = panic "matchGroupArity"--hsLMatchPats :: LMatch id body -> [LPat id]-hsLMatchPats (L _ (Match { m_pats = pats })) = pats-hsLMatchPats (L _ (XMatch _)) = panic "hsLMatchPats"---- | Guarded Right-Hand Sides------ GRHSs are used both for pattern bindings and for Matches------  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnVbar',---        'ApiAnnotation.AnnEqual','ApiAnnotation.AnnWhere',---        'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'---        'ApiAnnotation.AnnRarrow','ApiAnnotation.AnnSemi'---- For details on above see note [Api annotations] in ApiAnnotation-data GRHSs p body-  = GRHSs {-      grhssExt :: XCGRHSs p body,-      grhssGRHSs :: [LGRHS p body],      -- ^ Guarded RHSs-      grhssLocalBinds :: LHsLocalBinds p -- ^ The where clause-    }-  | XGRHSs (XXGRHSs p body)--type instance XCGRHSs (GhcPass _) b = NoExt-type instance XXGRHSs (GhcPass _) b = NoExt---- | Located Guarded Right-Hand Side-type LGRHS id body = Located (GRHS id body)---- | Guarded Right Hand Side.-data GRHS p body = GRHS (XCGRHS p body)-                        [GuardLStmt p] -- Guards-                        body           -- Right hand side-                  | XGRHS (XXGRHS p body)--type instance XCGRHS (GhcPass _) b = NoExt-type instance XXGRHS (GhcPass _) b = NoExt---- We know the list must have at least one @Match@ in it.--pprMatches :: (OutputableBndrId (GhcPass idR), Outputable body)-           => MatchGroup (GhcPass idR) body -> SDoc-pprMatches MG { mg_alts = matches }-    = vcat (map pprMatch (map unLoc (unLoc matches)))-      -- Don't print the type; it's only a place-holder before typechecking-pprMatches (XMatchGroup x) = ppr x---- Exported to HsBinds, which can't see the defn of HsMatchContext-pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body)-           => MatchGroup (GhcPass idR) body -> SDoc-pprFunBind matches = pprMatches matches---- Exported to HsBinds, which can't see the defn of HsMatchContext-pprPatBind :: forall bndr p body. (OutputableBndrId (GhcPass bndr),-                                   OutputableBndrId (GhcPass p),-                                   Outputable body)-           => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc-pprPatBind pat (grhss)- = sep [ppr pat,-       nest 2 (pprGRHSs (PatBindRhs :: HsMatchContext (IdP (GhcPass p))) grhss)]--pprMatch :: (OutputableBndrId (GhcPass idR), Outputable body)-         => Match (GhcPass idR) body -> SDoc-pprMatch match-  = sep [ sep (herald : map (nest 2 . pprParendLPat appPrec) other_pats)-        , nest 2 (pprGRHSs ctxt (m_grhss match)) ]-  where-    ctxt = m_ctxt match-    (herald, other_pats)-        = case ctxt of-            FunRhs {mc_fun=L _ fun, mc_fixity=fixity, mc_strictness=strictness}-                | strictness == SrcStrict -> ASSERT(null $ m_pats match)-                                             (char '!'<>pprPrefixOcc fun, m_pats match)-                        -- a strict variable binding-                | fixity == Prefix -> (pprPrefixOcc fun, m_pats match)-                        -- f x y z = e-                        -- Not pprBndr; the AbsBinds will-                        -- have printed the signature--                | null pats2 -> (pp_infix, [])-                        -- x &&& y = e--                | otherwise -> (parens pp_infix, pats2)-                        -- (x &&& y) z = e-                where-                  pp_infix = pprParendLPat opPrec pat1-                         <+> pprInfixOcc fun-                         <+> pprParendLPat opPrec pat2--            LambdaExpr -> (char '\\', m_pats match)--            _  -> if null (m_pats match)-                     then (empty, [])-                     else ASSERT2( null pats1, ppr ctxt $$ ppr pat1 $$ ppr pats1 )-                          (ppr pat1, [])        -- No parens around the single pat--    (pat1:pats1) = m_pats match-    (pat2:pats2) = pats1--pprGRHSs :: (OutputableBndrId (GhcPass idR), Outputable body)-         => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc-pprGRHSs ctxt (GRHSs _ grhss (L _ binds))-  = vcat (map (pprGRHS ctxt . unLoc) grhss)-  -- Print the "where" even if the contents of the binds is empty. Only-  -- EmptyLocalBinds means no "where" keyword- $$ ppUnless (eqEmptyLocalBinds binds)-      (text "where" $$ nest 4 (pprBinds binds))-pprGRHSs _ (XGRHSs x) = ppr x--pprGRHS :: (OutputableBndrId (GhcPass idR), Outputable body)-        => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc-pprGRHS ctxt (GRHS _ [] body)- =  pp_rhs ctxt body--pprGRHS ctxt (GRHS _ guards body)- = sep [vbar <+> interpp'SP guards, pp_rhs ctxt body]--pprGRHS _ (XGRHS x) = ppr x--pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc-pp_rhs ctxt rhs = matchSeparator ctxt <+> pprDeeper (ppr rhs)--{--************************************************************************-*                                                                      *-\subsection{Do stmts and list comprehensions}-*                                                                      *-************************************************************************--}---- | Located @do@ block Statement-type LStmt id body = Located (StmtLR id id body)---- | Located Statement with separate Left and Right id's-type LStmtLR idL idR body = Located (StmtLR idL idR body)---- | @do@ block Statement-type Stmt id body = StmtLR id id body---- | Command Located Statement-type CmdLStmt   id = LStmt id (LHsCmd  id)---- | Command Statement-type CmdStmt    id = Stmt  id (LHsCmd  id)---- | Expression Located Statement-type ExprLStmt  id = LStmt id (LHsExpr id)---- | Expression Statement-type ExprStmt   id = Stmt  id (LHsExpr id)---- | Guard Located Statement-type GuardLStmt id = LStmt id (LHsExpr id)---- | Guard Statement-type GuardStmt  id = Stmt  id (LHsExpr id)---- | Ghci Located Statement-type GhciLStmt  id = LStmt id (LHsExpr id)---- | Ghci Statement-type GhciStmt   id = Stmt  id (LHsExpr id)---- The SyntaxExprs in here are used *only* for do-notation and monad--- comprehensions, which have rebindable syntax. Otherwise they are unused.--- | API Annotations when in qualifier lists or guards---  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnVbar',---         'ApiAnnotation.AnnComma','ApiAnnotation.AnnThen',---         'ApiAnnotation.AnnBy','ApiAnnotation.AnnBy',---         'ApiAnnotation.AnnGroup','ApiAnnotation.AnnUsing'---- For details on above see note [Api annotations] in ApiAnnotation-data StmtLR idL idR body -- body should always be (LHs**** idR)-  = LastStmt  -- Always the last Stmt in ListComp, MonadComp,-              -- and (after the renamer, see RnExpr.checkLastStmt) DoExpr, MDoExpr-              -- Not used for GhciStmtCtxt, PatGuard, which scope over other stuff-          (XLastStmt idL idR body)-          body-          Bool               -- True <=> return was stripped by ApplicativeDo-          (SyntaxExpr idR)   -- The return operator-            -- The return operator is used only for MonadComp-            -- For ListComp we use the baked-in 'return'-            -- For DoExpr, MDoExpr, we don't apply a 'return' at all-            -- See Note [Monad Comprehensions]-            -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLarrow'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | BindStmt (XBindStmt idL idR body) -- Post typechecking,-                                -- result type of the function passed to bind;-                                -- that is, S in (>>=) :: Q -> (R -> S) -> T-             (LPat idL)-             body-             (SyntaxExpr idR) -- The (>>=) operator; see Note [The type of bind in Stmts]-             (SyntaxExpr idR) -- The fail operator-             -- The fail operator is noSyntaxExpr-             -- if the pattern match can't fail--  -- | 'ApplicativeStmt' represents an applicative expression built with-  -- '<$>' and '<*>'.  It is generated by the renamer, and is desugared into the-  -- appropriate applicative expression by the desugarer, but it is intended-  -- to be invisible in error messages.-  ---  -- For full details, see Note [ApplicativeDo] in RnExpr-  ---  | ApplicativeStmt-             (XApplicativeStmt idL idR body) -- Post typecheck, Type of the body-             [ ( SyntaxExpr idR-               , ApplicativeArg idL) ]-                      -- [(<$>, e1), (<*>, e2), ..., (<*>, en)]-             (Maybe (SyntaxExpr idR))  -- 'join', if necessary--  | BodyStmt (XBodyStmt idL idR body) -- Post typecheck, element type-                                      -- of the RHS (used for arrows)-             body              -- See Note [BodyStmt]-             (SyntaxExpr idR)  -- The (>>) operator-             (SyntaxExpr idR)  -- The `guard` operator; used only in MonadComp-                               -- See notes [Monad Comprehensions]--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet'-  --          'ApiAnnotation.AnnOpen' @'{'@,'ApiAnnotation.AnnClose' @'}'@,--  -- For details on above see note [Api annotations] in ApiAnnotation-  | LetStmt  (XLetStmt idL idR body) (LHsLocalBindsLR idL idR)--  -- ParStmts only occur in a list/monad comprehension-  | ParStmt  (XParStmt idL idR body)    -- Post typecheck,-                                        -- S in (>>=) :: Q -> (R -> S) -> T-             [ParStmtBlock idL idR]-             (HsExpr idR)               -- Polymorphic `mzip` for monad comprehensions-             (SyntaxExpr idR)           -- The `>>=` operator-                                        -- See notes [Monad Comprehensions]-            -- After renaming, the ids are the binders-            -- bound by the stmts and used after themp--  | TransStmt {-      trS_ext   :: XTransStmt idL idR body, -- Post typecheck,-                                            -- R in (>>=) :: Q -> (R -> S) -> T-      trS_form  :: TransForm,-      trS_stmts :: [ExprLStmt idL],   -- Stmts to the *left* of the 'group'-                                      -- which generates the tuples to be grouped--      trS_bndrs :: [(IdP idR, IdP idR)], -- See Note [TransStmt binder map]--      trS_using :: LHsExpr idR,-      trS_by :: Maybe (LHsExpr idR),  -- "by e" (optional)-        -- Invariant: if trS_form = GroupBy, then grp_by = Just e--      trS_ret :: SyntaxExpr idR,      -- The monomorphic 'return' function for-                                      -- the inner monad comprehensions-      trS_bind :: SyntaxExpr idR,     -- The '(>>=)' operator-      trS_fmap :: HsExpr idR          -- The polymorphic 'fmap' function for desugaring-                                      -- Only for 'group' forms-                                      -- Just a simple HsExpr, because it's-                                      -- too polymorphic for tcSyntaxOp-    }                                 -- See Note [Monad Comprehensions]--  -- Recursive statement (see Note [How RecStmt works] below)-  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRec'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | RecStmt-     { recS_ext :: XRecStmt idL idR body-     , recS_stmts :: [LStmtLR idL idR body]--        -- The next two fields are only valid after renaming-     , recS_later_ids :: [IdP idR]-                         -- The ids are a subset of the variables bound by the-                         -- stmts that are used in stmts that follow the RecStmt--     , recS_rec_ids :: [IdP idR]-                         -- Ditto, but these variables are the "recursive" ones,-                         -- that are used before they are bound in the stmts of-                         -- the RecStmt.-        -- An Id can be in both groups-        -- Both sets of Ids are (now) treated monomorphically-        -- See Note [How RecStmt works] for why they are separate--        -- Rebindable syntax-     , recS_bind_fn :: SyntaxExpr idR -- The bind function-     , recS_ret_fn  :: SyntaxExpr idR -- The return function-     , recS_mfix_fn :: SyntaxExpr idR -- The mfix function-      }-  | XStmtLR (XXStmtLR idL idR body)---- Extra fields available post typechecking for RecStmt.-data RecStmtTc =-  RecStmtTc-     { recS_bind_ty :: Type       -- S in (>>=) :: Q -> (R -> S) -> T-     , recS_later_rets :: [PostTcExpr] -- (only used in the arrow version)-     , recS_rec_rets :: [PostTcExpr] -- These expressions correspond 1-to-1-                                  -- with recS_later_ids and recS_rec_ids,-                                  -- and are the expressions that should be-                                  -- returned by the recursion.-                                  -- They may not quite be the Ids themselves,-                                  -- because the Id may be *polymorphic*, but-                                  -- the returned thing has to be *monomorphic*,-                                  -- so they may be type applications--      , recS_ret_ty :: Type        -- The type of-                                   -- do { stmts; return (a,b,c) }-                                   -- With rebindable syntax the type might not-                                   -- be quite as simple as (m (tya, tyb, tyc)).-      }---type instance XLastStmt        (GhcPass _) (GhcPass _) b = NoExt--type instance XBindStmt        (GhcPass _) GhcPs b = NoExt-type instance XBindStmt        (GhcPass _) GhcRn b = NoExt-type instance XBindStmt        (GhcPass _) GhcTc b = Type--type instance XApplicativeStmt (GhcPass _) GhcPs b = NoExt-type instance XApplicativeStmt (GhcPass _) GhcRn b = NoExt-type instance XApplicativeStmt (GhcPass _) GhcTc b = Type--type instance XBodyStmt        (GhcPass _) GhcPs b = NoExt-type instance XBodyStmt        (GhcPass _) GhcRn b = NoExt-type instance XBodyStmt        (GhcPass _) GhcTc b = Type--type instance XLetStmt         (GhcPass _) (GhcPass _) b = NoExt--type instance XParStmt         (GhcPass _) GhcPs b = NoExt-type instance XParStmt         (GhcPass _) GhcRn b = NoExt-type instance XParStmt         (GhcPass _) GhcTc b = Type--type instance XTransStmt       (GhcPass _) GhcPs b = NoExt-type instance XTransStmt       (GhcPass _) GhcRn b = NoExt-type instance XTransStmt       (GhcPass _) GhcTc b = Type--type instance XRecStmt         (GhcPass _) GhcPs b = NoExt-type instance XRecStmt         (GhcPass _) GhcRn b = NoExt-type instance XRecStmt         (GhcPass _) GhcTc b = RecStmtTc--type instance XXStmtLR         (GhcPass _) (GhcPass _) b = NoExt--data TransForm   -- The 'f' below is the 'using' function, 'e' is the by function-  = ThenForm     -- then f               or    then f by e             (depending on trS_by)-  | GroupForm    -- then group using f   or    then group by e using f (depending on trS_by)-  deriving Data---- | Parenthesised Statement Block-data ParStmtBlock idL idR-  = ParStmtBlock-        (XParStmtBlock idL idR)-        [ExprLStmt idL]-        [IdP idR]          -- The variables to be returned-        (SyntaxExpr idR)   -- The return operator-  | XParStmtBlock (XXParStmtBlock idL idR)--type instance XParStmtBlock  (GhcPass pL) (GhcPass pR) = NoExt-type instance XXParStmtBlock (GhcPass pL) (GhcPass pR) = NoExt---- | Applicative Argument-data ApplicativeArg idL-  = ApplicativeArgOne      -- A single statement (BindStmt or BodyStmt)-      (XApplicativeArgOne idL)-      (LPat idL)           -- WildPat if it was a BodyStmt (see below)-      (LHsExpr idL)-      Bool                 -- True <=> was a BodyStmt-                           -- False <=> was a BindStmt-                           -- See Note [Applicative BodyStmt]--  | ApplicativeArgMany     -- do { stmts; return vars }-      (XApplicativeArgMany idL)-      [ExprLStmt idL]      -- stmts-      (HsExpr idL)         -- return (v1,..,vn), or just (v1,..,vn)-      (LPat idL)           -- (v1,...,vn)-  | XApplicativeArg (XXApplicativeArg idL)--type instance XApplicativeArgOne  (GhcPass _) = NoExt-type instance XApplicativeArgMany (GhcPass _) = NoExt-type instance XXApplicativeArg    (GhcPass _) = NoExt--{--Note [The type of bind in Stmts]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Some Stmts, notably BindStmt, keep the (>>=) bind operator.-We do NOT assume that it has type-    (>>=) :: m a -> (a -> m b) -> m b-In some cases (see Trac #303, #1537) it might have a more-exotic type, such as-    (>>=) :: m i j a -> (a -> m j k b) -> m i k b-So we must be careful not to make assumptions about the type.-In particular, the monad may not be uniform throughout.--Note [TransStmt binder map]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-The [(idR,idR)] in a TransStmt behaves as follows:--  * Before renaming: []--  * After renaming:-          [ (x27,x27), ..., (z35,z35) ]-    These are the variables-       bound by the stmts to the left of the 'group'-       and used either in the 'by' clause,-                or     in the stmts following the 'group'-    Each item is a pair of identical variables.--  * After typechecking:-          [ (x27:Int, x27:[Int]), ..., (z35:Bool, z35:[Bool]) ]-    Each pair has the same unique, but different *types*.--Note [BodyStmt]-~~~~~~~~~~~~~~~-BodyStmts are a bit tricky, because what they mean-depends on the context.  Consider the following contexts:--        A do expression of type (m res_ty)-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-        * BodyStmt E any_ty:   do { ....; E; ... }-                E :: m any_ty-          Translation: E >> ...--        A list comprehensions of type [elt_ty]-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-        * BodyStmt E Bool:   [ .. | .... E ]-                        [ .. | ..., E, ... ]-                        [ .. | .... | ..., E | ... ]-                E :: Bool-          Translation: if E then fail else ...--        A guard list, guarding a RHS of type rhs_ty-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-        * BodyStmt E BooParStmtBlockl:   f x | ..., E, ... = ...rhs...-                E :: Bool-          Translation: if E then fail else ...--        A monad comprehension of type (m res_ty)-        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-        * BodyStmt E Bool:   [ .. | .... E ]-                E :: Bool-          Translation: guard E >> ...--Array comprehensions are handled like list comprehensions.--Note [How RecStmt works]-~~~~~~~~~~~~~~~~~~~~~~~~-Example:-   HsDo [ BindStmt x ex--        , RecStmt { recS_rec_ids   = [a, c]-                  , recS_stmts     = [ BindStmt b (return (a,c))-                                     , LetStmt a = ...b...-                                     , BindStmt c ec ]-                  , recS_later_ids = [a, b]--        , return (a b) ]--Here, the RecStmt binds a,b,c; but-  - Only a,b are used in the stmts *following* the RecStmt,-  - Only a,c are used in the stmts *inside* the RecStmt-        *before* their bindings--Why do we need *both* rec_ids and later_ids?  For monads they could be-combined into a single set of variables, but not for arrows.  That-follows from the types of the respective feedback operators:--        mfix :: MonadFix m => (a -> m a) -> m a-        loop :: ArrowLoop a => a (b,d) (c,d) -> a b c--* For mfix, the 'a' covers the union of the later_ids and the rec_ids-* For 'loop', 'c' is the later_ids and 'd' is the rec_ids--Note [Typing a RecStmt]-~~~~~~~~~~~~~~~~~~~~~~~-A (RecStmt stmts) types as if you had written--  (v1,..,vn, _, ..., _) <- mfix (\~(_, ..., _, r1, ..., rm) ->-                                 do { stmts-                                    ; return (v1,..vn, r1, ..., rm) })--where v1..vn are the later_ids-      r1..rm are the rec_ids--Note [Monad Comprehensions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Monad comprehensions require separate functions like 'return' and-'>>=' for desugaring. These functions are stored in the statements-used in monad comprehensions. For example, the 'return' of the 'LastStmt'-expression is used to lift the body of the monad comprehension:--  [ body | stmts ]-   =>-  stmts >>= \bndrs -> return body--In transform and grouping statements ('then ..' and 'then group ..') the-'return' function is required for nested monad comprehensions, for example:--  [ body | stmts, then f, rest ]-   =>-  f [ env | stmts ] >>= \bndrs -> [ body | rest ]--BodyStmts require the 'Control.Monad.guard' function for boolean-expressions:--  [ body | exp, stmts ]-   =>-  guard exp >> [ body | stmts ]--Parallel statements require the 'Control.Monad.Zip.mzip' function:--  [ body | stmts1 | stmts2 | .. ]-   =>-  mzip stmts1 (mzip stmts2 (..)) >>= \(bndrs1, (bndrs2, ..)) -> return body--In any other context than 'MonadComp', the fields for most of these-'SyntaxExpr's stay bottom.---Note [Applicative BodyStmt]--(#12143) For the purposes of ApplicativeDo, we treat any BodyStmt-as if it was a BindStmt with a wildcard pattern.  For example,--  do-    x <- A-    B-    return x--is transformed as if it were--  do-    x <- A-    _ <- B-    return x--so it transforms to--  (\(x,_) -> x) <$> A <*> B--But we have to remember when we treat a BodyStmt like a BindStmt,-because in error messages we want to emit the original syntax the user-wrote, not our internal representation.  So ApplicativeArgOne has a-Bool flag that is True when the original statement was a BodyStmt, so-that we can pretty-print it correctly.--}--instance (Outputable (StmtLR idL idL (LHsExpr idL)),-          Outputable (XXParStmtBlock idL idR))-        => Outputable (ParStmtBlock idL idR) where-  ppr (ParStmtBlock _ stmts _ _) = interpp'SP stmts-  ppr (XParStmtBlock x)          = ppr x--instance (idL ~ GhcPass pl,idR ~ GhcPass pr,-          OutputableBndrId idL, OutputableBndrId idR,-          Outputable body)-         => Outputable (StmtLR idL idR body) where-    ppr stmt = pprStmt stmt--pprStmt :: forall idL idR body . (OutputableBndrId (GhcPass idL),-                                  OutputableBndrId (GhcPass idR),-                                  Outputable body)-        => (StmtLR (GhcPass idL) (GhcPass idR) body) -> SDoc-pprStmt (LastStmt _ expr ret_stripped _)-  = whenPprDebug (text "[last]") <+>-       (if ret_stripped then text "return" else empty) <+>-       ppr expr-pprStmt (BindStmt _ pat expr _ _) = hsep [ppr pat, larrow, ppr expr]-pprStmt (LetStmt _ (L _ binds))   = hsep [text "let", pprBinds binds]-pprStmt (BodyStmt _ expr _ _)     = ppr expr-pprStmt (ParStmt _ stmtss _ _)   = sep (punctuate (text " | ") (map ppr stmtss))--pprStmt (TransStmt { trS_stmts = stmts, trS_by = by-                   , trS_using = using, trS_form = form })-  = sep $ punctuate comma (map ppr stmts ++ [pprTransStmt by using form])--pprStmt (RecStmt { recS_stmts = segment, recS_rec_ids = rec_ids-                 , recS_later_ids = later_ids })-  = text "rec" <+>-    vcat [ ppr_do_stmts segment-         , whenPprDebug (vcat [ text "rec_ids=" <> ppr rec_ids-                            , text "later_ids=" <> ppr later_ids])]--pprStmt (ApplicativeStmt _ args mb_join)-  = getPprStyle $ \style ->-      if userStyle style-         then pp_for_user-         else pp_debug-  where-  -- make all the Applicative stuff invisible in error messages by-  -- flattening the whole ApplicativeStmt nest back to a sequence-  -- of statements.-   pp_for_user = vcat $ concatMap flattenArg args--   -- ppr directly rather than transforming here, because we need to-   -- inject a "return" which is hard when we're polymorphic in the id-   -- type.-   flattenStmt :: ExprLStmt (GhcPass idL) -> [SDoc]-   flattenStmt (L _ (ApplicativeStmt _ args _)) = concatMap flattenArg args-   flattenStmt stmt = [ppr stmt]--   flattenArg :: forall a . (a, ApplicativeArg (GhcPass idL)) -> [SDoc]-   flattenArg (_, ApplicativeArgOne _ pat expr isBody)-     | isBody =  -- See Note [Applicative BodyStmt]-     [ppr (BodyStmt (panic "pprStmt") expr noSyntaxExpr noSyntaxExpr-             :: ExprStmt (GhcPass idL))]-     | otherwise =-     [ppr (BindStmt (panic "pprStmt") pat expr noSyntaxExpr noSyntaxExpr-             :: ExprStmt (GhcPass idL))]-   flattenArg (_, ApplicativeArgMany _ stmts _ _) =-     concatMap flattenStmt stmts-   flattenArg (_, XApplicativeArg _) = panic "flattenArg"--   pp_debug =-     let-         ap_expr = sep (punctuate (text " |") (map pp_arg args))-     in-       if isNothing mb_join-          then ap_expr-          else text "join" <+> parens ap_expr--   pp_arg :: (a, ApplicativeArg (GhcPass idL)) -> SDoc-   pp_arg (_, ApplicativeArgOne _ pat expr isBody)-     | isBody =  -- See Note [Applicative BodyStmt]-     ppr (BodyStmt (panic "pprStmt") expr noSyntaxExpr noSyntaxExpr-            :: ExprStmt (GhcPass idL))-     | otherwise =-     ppr (BindStmt (panic "pprStmt") pat expr noSyntaxExpr noSyntaxExpr-            :: ExprStmt (GhcPass idL))-   pp_arg (_, ApplicativeArgMany _ stmts return pat) =-     ppr pat <+>-     text "<-" <+>-     ppr (HsDo (panic "pprStmt") DoExpr (noLoc-               (stmts ++-                   [noLoc (LastStmt noExt (noLoc return) False noSyntaxExpr)])))-   pp_arg (_, XApplicativeArg x) = ppr x--pprStmt (XStmtLR x) = ppr x--pprTransformStmt :: (OutputableBndrId (GhcPass p))-                 => [IdP (GhcPass p)] -> LHsExpr (GhcPass p)-                 -> Maybe (LHsExpr (GhcPass p)) -> SDoc-pprTransformStmt bndrs using by-  = sep [ text "then" <+> whenPprDebug (braces (ppr bndrs))-        , nest 2 (ppr using)-        , nest 2 (pprBy by)]--pprTransStmt :: Outputable body => Maybe body -> body -> TransForm -> SDoc-pprTransStmt by using ThenForm-  = sep [ text "then", nest 2 (ppr using), nest 2 (pprBy by)]-pprTransStmt by using GroupForm-  = sep [ text "then group", nest 2 (pprBy by), nest 2 (ptext (sLit "using") <+> ppr using)]--pprBy :: Outputable body => Maybe body -> SDoc-pprBy Nothing  = empty-pprBy (Just e) = text "by" <+> ppr e--pprDo :: (OutputableBndrId (GhcPass p), Outputable body)-      => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc-pprDo DoExpr        stmts = text "do"  <+> ppr_do_stmts stmts-pprDo GhciStmtCtxt  stmts = text "do"  <+> ppr_do_stmts stmts-pprDo ArrowExpr     stmts = text "do"  <+> ppr_do_stmts stmts-pprDo MDoExpr       stmts = text "mdo" <+> ppr_do_stmts stmts-pprDo ListComp      stmts = brackets    $ pprComp stmts-pprDo MonadComp     stmts = brackets    $ pprComp stmts-pprDo _             _     = panic "pprDo" -- PatGuard, ParStmtCxt--ppr_do_stmts :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR),-                 Outputable body)-             => [LStmtLR (GhcPass idL) (GhcPass idR) body] -> SDoc--- Print a bunch of do stmts-ppr_do_stmts stmts = pprDeeperList vcat (map ppr stmts)--pprComp :: (OutputableBndrId (GhcPass p), Outputable body)-        => [LStmt (GhcPass p) body] -> SDoc-pprComp quals     -- Prints:  body | qual1, ..., qualn-  | Just (initStmts, L _ (LastStmt _ body _ _)) <- snocView quals-  = if null initStmts-       -- If there are no statements in a list comprehension besides the last-       -- one, we simply treat it like a normal list. This does arise-       -- occasionally in code that GHC generates, e.g., in implementations of-       -- 'range' for derived 'Ix' instances for product datatypes with exactly-       -- one constructor (e.g., see Trac #12583).-       then ppr body-       else hang (ppr body <+> vbar) 2 (pprQuals initStmts)-  | otherwise-  = pprPanic "pprComp" (pprQuals quals)--pprQuals :: (OutputableBndrId (GhcPass p), Outputable body)-         => [LStmt (GhcPass p) body] -> SDoc--- Show list comprehension qualifiers separated by commas-pprQuals quals = interpp'SP quals--{--************************************************************************-*                                                                      *-                Template Haskell quotation brackets-*                                                                      *-************************************************************************--}---- | Haskell Splice-data HsSplice id-   = HsTypedSplice       --  $$z  or $$(f 4)-        (XTypedSplice id)-        SpliceDecoration -- Whether $$( ) variant found, for pretty printing-        (IdP id)         -- A unique name to identify this splice point-        (LHsExpr id)     -- See Note [Pending Splices]--   | HsUntypedSplice     --  $z  or $(f 4)-        (XUntypedSplice id)-        SpliceDecoration -- Whether $( ) variant found, for pretty printing-        (IdP id)         -- A unique name to identify this splice point-        (LHsExpr id)     -- See Note [Pending Splices]--   | HsQuasiQuote        -- See Note [Quasi-quote overview] in TcSplice-        (XQuasiQuote id)-        (IdP id)         -- Splice point-        (IdP id)         -- Quoter-        SrcSpan          -- The span of the enclosed string-        FastString       -- The enclosed string--   -- AZ:TODO: use XSplice instead of HsSpliced-   | HsSpliced  -- See Note [Delaying modFinalizers in untyped splices] in-                -- RnSplice.-                -- This is the result of splicing a splice. It is produced by-                -- the renamer and consumed by the typechecker. It lives only-                -- between the two.-        (XSpliced id)-        ThModFinalizers     -- TH finalizers produced by the splice.-        (HsSplicedThing id) -- The result of splicing-   | HsSplicedT-      DelayedSplice-   | XSplice (XXSplice id)  -- Note [Trees that Grow] extension point--type instance XTypedSplice   (GhcPass _) = NoExt-type instance XUntypedSplice (GhcPass _) = NoExt-type instance XQuasiQuote    (GhcPass _) = NoExt-type instance XSpliced       (GhcPass _) = NoExt-type instance XXSplice       (GhcPass _) = NoExt---- | A splice can appear with various decorations wrapped around it. This data--- type captures explicitly how it was originally written, for use in the pretty--- printer.-data SpliceDecoration-  = HasParens -- ^ $( splice ) or $$( splice )-  | HasDollar -- ^ $splice or $$splice-  | NoParens  -- ^ bare splice-  deriving (Data, Eq, Show)--instance Outputable SpliceDecoration where-  ppr x = text $ show x---isTypedSplice :: HsSplice id -> Bool-isTypedSplice (HsTypedSplice {}) = True-isTypedSplice _                  = False   -- Quasi-quotes are untyped splices---- | Finalizers produced by a splice with--- 'Language.Haskell.TH.Syntax.addModFinalizer'------ See Note [Delaying modFinalizers in untyped splices] in RnSplice. For how--- this is used.----newtype ThModFinalizers = ThModFinalizers [ForeignRef (TH.Q ())]---- A Data instance which ignores the argument of 'ThModFinalizers'.-instance Data ThModFinalizers where-  gunfold _ z _ = z $ ThModFinalizers []-  toConstr  a   = mkConstr (dataTypeOf a) "ThModFinalizers" [] Data.Prefix-  dataTypeOf a  = mkDataType "HsExpr.ThModFinalizers" [toConstr a]---- See Note [Running typed splices in the zonker]--- These are the arguments that are passed to `TcSplice.runTopSplice`-data DelayedSplice =-  DelayedSplice-    TcLclEnv          -- The local environment to run the splice in-    (LHsExpr GhcRn)   -- The original renamed expression-    TcType            -- The result type of running the splice, unzonked-    (LHsExpr GhcTcId) -- The typechecked expression to run and splice in the result---- A Data instance which ignores the argument of 'DelayedSplice'.-instance Data DelayedSplice where-  gunfold _ _ _ = panic "DelayedSplice"-  toConstr  a   = mkConstr (dataTypeOf a) "DelayedSplice" [] Data.Prefix-  dataTypeOf a  = mkDataType "HsExpr.DelayedSplice" [toConstr a]---- | Haskell Spliced Thing------ Values that can result from running a splice.-data HsSplicedThing id-    = HsSplicedExpr (HsExpr id) -- ^ Haskell Spliced Expression-    | HsSplicedTy   (HsType id) -- ^ Haskell Spliced Type-    | HsSplicedPat  (Pat id)    -- ^ Haskell Spliced Pattern----- See Note [Pending Splices]-type SplicePointName = Name---- | Pending Renamer Splice-data PendingRnSplice-  = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn)--data UntypedSpliceFlavour-  = UntypedExpSplice-  | UntypedPatSplice-  | UntypedTypeSplice-  | UntypedDeclSplice-  deriving Data---- | Pending Type-checker Splice-data PendingTcSplice-  = PendingTcSplice SplicePointName (LHsExpr GhcTc)--{--Note [Pending Splices]-~~~~~~~~~~~~~~~~~~~~~~-When we rename an untyped bracket, we name and lift out all the nested-splices, so that when the typechecker hits the bracket, it can-typecheck those nested splices without having to walk over the untyped-bracket code.  So for example-    [| f $(g x) |]-looks like--    HsBracket (HsApp (HsVar "f") (HsSpliceE _ (g x)))--which the renamer rewrites to--    HsRnBracketOut (HsApp (HsVar f) (HsSpliceE sn (g x)))-                   [PendingRnSplice UntypedExpSplice sn (g x)]--* The 'sn' is the Name of the splice point, the SplicePointName--* The PendingRnExpSplice gives the splice that splice-point name maps to;-  and the typechecker can now conveniently find these sub-expressions--* The other copy of the splice, in the second argument of HsSpliceE-                                in the renamed first arg of HsRnBracketOut-  is used only for pretty printing--There are four varieties of pending splices generated by the renamer,-distinguished by their UntypedSpliceFlavour-- * Pending expression splices (UntypedExpSplice), e.g.,-       [|$(f x) + 2|]--   UntypedExpSplice is also used for-     * quasi-quotes, where the pending expression expands to-          $(quoter "...blah...")-       (see RnSplice.makePending, HsQuasiQuote case)--     * cross-stage lifting, where the pending expression expands to-          $(lift x)-       (see RnSplice.checkCrossStageLifting)-- * Pending pattern splices (UntypedPatSplice), e.g.,-       [| \$(f x) -> x |]-- * Pending type splices (UntypedTypeSplice), e.g.,-       [| f :: $(g x) |]-- * Pending declaration (UntypedDeclSplice), e.g.,-       [| let $(f x) in ... |]--There is a fifth variety of pending splice, which is generated by the type-checker:--  * Pending *typed* expression splices, (PendingTcSplice), e.g.,-        [||1 + $$(f 2)||]--It would be possible to eliminate HsRnBracketOut and use HsBracketOut for the-output of the renamer. However, when pretty printing the output of the renamer,-e.g., in a type error message, we *do not* want to print out the pending-splices. In contrast, when pretty printing the output of the type checker, we-*do* want to print the pending splices. So splitting them up seems to make-sense, although I hate to add another constructor to HsExpr.--}--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (HsSplicedThing p) where-  ppr (HsSplicedExpr e) = ppr_expr e-  ppr (HsSplicedTy   t) = ppr t-  ppr (HsSplicedPat  p) = ppr p--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsSplice p) where-  ppr s = pprSplice s--pprPendingSplice :: (OutputableBndrId (GhcPass p))-                 => SplicePointName -> LHsExpr (GhcPass p) -> SDoc-pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e)--pprSpliceDecl ::  (OutputableBndrId (GhcPass p))-          => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc-pprSpliceDecl e@HsQuasiQuote{} _ = pprSplice e-pprSpliceDecl e ExplicitSplice   = text "$(" <> ppr_splice_decl e <> text ")"-pprSpliceDecl e ImplicitSplice   = ppr_splice_decl e--ppr_splice_decl :: (OutputableBndrId (GhcPass p))-                => HsSplice (GhcPass p) -> SDoc-ppr_splice_decl (HsUntypedSplice _ _ n e) = ppr_splice empty n e empty-ppr_splice_decl e = pprSplice e--pprSplice :: (OutputableBndrId (GhcPass p)) => HsSplice (GhcPass p) -> SDoc-pprSplice (HsTypedSplice _ HasParens  n e)-  = ppr_splice (text "$$(") n e (text ")")-pprSplice (HsTypedSplice _ HasDollar n e)-  = ppr_splice (text "$$") n e empty-pprSplice (HsTypedSplice _ NoParens n e)-  = ppr_splice empty n e empty-pprSplice (HsUntypedSplice _ HasParens  n e)-  = ppr_splice (text "$(") n e (text ")")-pprSplice (HsUntypedSplice _ HasDollar n e)-  = ppr_splice (text "$")  n e empty-pprSplice (HsUntypedSplice _ NoParens n e)-  = ppr_splice empty  n e empty-pprSplice (HsQuasiQuote _ n q _ s)      = ppr_quasi n q s-pprSplice (HsSpliced _ _ thing)         = ppr thing-pprSplice (HsSplicedT {})               = text "Unevaluated typed splice"-pprSplice (XSplice x)                   = ppr x--ppr_quasi :: OutputableBndr p => p -> p -> FastString -> SDoc-ppr_quasi n quoter quote = whenPprDebug (brackets (ppr n)) <>-                           char '[' <> ppr quoter <> vbar <>-                           ppr quote <> text "|]"--ppr_splice :: (OutputableBndrId (GhcPass p))-           => SDoc -> (IdP (GhcPass p)) -> LHsExpr (GhcPass p) -> SDoc -> SDoc-ppr_splice herald n e trail-    = herald <> whenPprDebug (brackets (ppr n)) <> ppr e <> trail---- | Haskell Bracket-data HsBracket p-  = ExpBr  (XExpBr p)   (LHsExpr p)    -- [|  expr  |]-  | PatBr  (XPatBr p)   (LPat p)      -- [p| pat   |]-  | DecBrL (XDecBrL p)  [LHsDecl p]   -- [d| decls |]; result of parser-  | DecBrG (XDecBrG p)  (HsGroup p)   -- [d| decls |]; result of renamer-  | TypBr  (XTypBr p)   (LHsType p)   -- [t| type  |]-  | VarBr  (XVarBr p)   Bool (IdP p)  -- True: 'x, False: ''T-                                -- (The Bool flag is used only in pprHsBracket)-  | TExpBr (XTExpBr p) (LHsExpr p)    -- [||  expr  ||]-  | XBracket (XXBracket p)            -- Note [Trees that Grow] extension point--type instance XExpBr      (GhcPass _) = NoExt-type instance XPatBr      (GhcPass _) = NoExt-type instance XDecBrL     (GhcPass _) = NoExt-type instance XDecBrG     (GhcPass _) = NoExt-type instance XTypBr      (GhcPass _) = NoExt-type instance XVarBr      (GhcPass _) = NoExt-type instance XTExpBr     (GhcPass _) = NoExt-type instance XXBracket   (GhcPass _) = NoExt--isTypedBracket :: HsBracket id -> Bool-isTypedBracket (TExpBr {}) = True-isTypedBracket _           = False--instance (p ~ GhcPass pass, OutputableBndrId p)-          => Outputable (HsBracket p) where-  ppr = pprHsBracket---pprHsBracket :: (OutputableBndrId (GhcPass p)) => HsBracket (GhcPass p) -> SDoc-pprHsBracket (ExpBr _ e)   = thBrackets empty (ppr e)-pprHsBracket (PatBr _ p)   = thBrackets (char 'p') (ppr p)-pprHsBracket (DecBrG _ gp) = thBrackets (char 'd') (ppr gp)-pprHsBracket (DecBrL _ ds) = thBrackets (char 'd') (vcat (map ppr ds))-pprHsBracket (TypBr _ t)   = thBrackets (char 't') (ppr t)-pprHsBracket (VarBr _ True n)-  = char '\'' <> pprPrefixOcc n-pprHsBracket (VarBr _ False n)-  = text "''" <> pprPrefixOcc n-pprHsBracket (TExpBr _ e)  = thTyBrackets (ppr e)-pprHsBracket (XBracket e)  = ppr e--thBrackets :: SDoc -> SDoc -> SDoc-thBrackets pp_kind pp_body = char '[' <> pp_kind <> vbar <+>-                             pp_body <+> text "|]"--thTyBrackets :: SDoc -> SDoc-thTyBrackets pp_body = text "[||" <+> pp_body <+> ptext (sLit "||]")--instance Outputable PendingRnSplice where-  ppr (PendingRnSplice _ n e) = pprPendingSplice n e--instance Outputable PendingTcSplice where-  ppr (PendingTcSplice n e) = pprPendingSplice n e--{--************************************************************************-*                                                                      *-\subsection{Enumerations and list comprehensions}-*                                                                      *-************************************************************************--}---- | Arithmetic Sequence Information-data ArithSeqInfo id-  = From            (LHsExpr id)-  | FromThen        (LHsExpr id)-                    (LHsExpr id)-  | FromTo          (LHsExpr id)-                    (LHsExpr id)-  | FromThenTo      (LHsExpr id)-                    (LHsExpr id)-                    (LHsExpr id)--- AZ: Sould ArithSeqInfo have a TTG extension?--instance (p ~ GhcPass pass, OutputableBndrId p)-         => Outputable (ArithSeqInfo p) where-    ppr (From e1)             = hcat [ppr e1, pp_dotdot]-    ppr (FromThen e1 e2)      = hcat [ppr e1, comma, space, ppr e2, pp_dotdot]-    ppr (FromTo e1 e3)        = hcat [ppr e1, pp_dotdot, ppr e3]-    ppr (FromThenTo e1 e2 e3)-      = hcat [ppr e1, comma, space, ppr e2, pp_dotdot, ppr e3]--pp_dotdot :: SDoc-pp_dotdot = text " .. "--{--************************************************************************-*                                                                      *-\subsection{HsMatchCtxt}-*                                                                      *-************************************************************************--}---- | Haskell Match Context------ Context of a pattern match. This is more subtle than it would seem. See Note--- [Varieties of pattern matches].-data HsMatchContext id -- Not an extensible tag-  = FunRhs { mc_fun        :: Located id    -- ^ function binder of @f@-           , mc_fixity     :: LexicalFixity -- ^ fixing of @f@-           , mc_strictness :: SrcStrictness -- ^ was @f@ banged?-                                            -- See Note [FunBind vs PatBind]-           }-                                -- ^A pattern matching on an argument of a-                                -- function binding-  | LambdaExpr                  -- ^Patterns of a lambda-  | CaseAlt                     -- ^Patterns and guards on a case alternative-  | IfAlt                       -- ^Guards of a multi-way if alternative-  | ProcExpr                    -- ^Patterns of a proc-  | PatBindRhs                  -- ^A pattern binding  eg [y] <- e = e-  | PatBindGuards               -- ^Guards of pattern bindings, e.g.,-                                --    (Just b) | Just _ <- x = e-                                --             | otherwise   = e'--  | RecUpd                      -- ^Record update [used only in DsExpr to-                                --    tell matchWrapper what sort of-                                --    runtime error message to generate]--  | StmtCtxt (HsStmtContext id) -- ^Pattern of a do-stmt, list comprehension,-                                -- pattern guard, etc--  | ThPatSplice            -- ^A Template Haskell pattern splice-  | ThPatQuote             -- ^A Template Haskell pattern quotation [p| (a,b) |]-  | PatSyn                 -- ^A pattern synonym declaration-  deriving Functor-deriving instance (Data id) => Data (HsMatchContext id)--instance OutputableBndr id => Outputable (HsMatchContext id) where-  ppr m@(FunRhs{})          = text "FunRhs" <+> ppr (mc_fun m) <+> ppr (mc_fixity m)-  ppr LambdaExpr            = text "LambdaExpr"-  ppr CaseAlt               = text "CaseAlt"-  ppr IfAlt                 = text "IfAlt"-  ppr ProcExpr              = text "ProcExpr"-  ppr PatBindRhs            = text "PatBindRhs"-  ppr PatBindGuards         = text "PatBindGuards"-  ppr RecUpd                = text "RecUpd"-  ppr (StmtCtxt _)          = text "StmtCtxt _"-  ppr ThPatSplice           = text "ThPatSplice"-  ppr ThPatQuote            = text "ThPatQuote"-  ppr PatSyn                = text "PatSyn"--isPatSynCtxt :: HsMatchContext id -> Bool-isPatSynCtxt ctxt =-  case ctxt of-    PatSyn -> True-    _      -> False---- | Haskell Statement Context. It expects to be parameterised with one of--- 'RdrName', 'Name' or 'Id'-data HsStmtContext id-  = ListComp-  | MonadComp--  | DoExpr                           -- ^do { ... }-  | MDoExpr                          -- ^mdo { ... }  ie recursive do-expression-  | ArrowExpr                        -- ^do-notation in an arrow-command context--  | GhciStmtCtxt                     -- ^A command-line Stmt in GHCi pat <- rhs-  | PatGuard (HsMatchContext id)     -- ^Pattern guard for specified thing-  | ParStmtCtxt (HsStmtContext id)   -- ^A branch of a parallel stmt-  | TransStmtCtxt (HsStmtContext id) -- ^A branch of a transform stmt-  deriving Functor-deriving instance (Data id) => Data (HsStmtContext id)--isComprehensionContext :: HsStmtContext id -> Bool--- Uses comprehension syntax [ e | quals ]-isComprehensionContext ListComp          = True-isComprehensionContext MonadComp         = True-isComprehensionContext (ParStmtCtxt c)   = isComprehensionContext c-isComprehensionContext (TransStmtCtxt c) = isComprehensionContext c-isComprehensionContext _ = False---- | Should pattern match failure in a 'HsStmtContext' be desugared using--- 'MonadFail'?-isMonadFailStmtContext :: HsStmtContext id -> Bool-isMonadFailStmtContext MonadComp            = True-isMonadFailStmtContext DoExpr               = True-isMonadFailStmtContext MDoExpr              = True-isMonadFailStmtContext GhciStmtCtxt         = True-isMonadFailStmtContext (ParStmtCtxt ctxt)   = isMonadFailStmtContext ctxt-isMonadFailStmtContext (TransStmtCtxt ctxt) = isMonadFailStmtContext ctxt-isMonadFailStmtContext _ = False -- ListComp, PatGuard, ArrowExpr--isMonadCompContext :: HsStmtContext id -> Bool-isMonadCompContext MonadComp = True-isMonadCompContext _         = False--matchSeparator :: HsMatchContext id -> SDoc-matchSeparator (FunRhs {})   = text "="-matchSeparator CaseAlt       = text "->"-matchSeparator IfAlt         = text "->"-matchSeparator LambdaExpr    = text "->"-matchSeparator ProcExpr      = text "->"-matchSeparator PatBindRhs    = text "="-matchSeparator PatBindGuards = text "="-matchSeparator (StmtCtxt _)  = text "<-"-matchSeparator RecUpd        = text "=" -- This can be printed by the pattern-                                       -- match checker trace-matchSeparator ThPatSplice  = panic "unused"-matchSeparator ThPatQuote   = panic "unused"-matchSeparator PatSyn       = panic "unused"--pprMatchContext :: (Outputable (NameOrRdrName id),Outputable id)-                => HsMatchContext id -> SDoc-pprMatchContext ctxt-  | want_an ctxt = text "an" <+> pprMatchContextNoun ctxt-  | otherwise    = text "a"  <+> pprMatchContextNoun ctxt-  where-    want_an (FunRhs {}) = True  -- Use "an" in front-    want_an ProcExpr    = True-    want_an _           = False--pprMatchContextNoun :: (Outputable (NameOrRdrName id),Outputable id)-                    => HsMatchContext id -> SDoc-pprMatchContextNoun (FunRhs {mc_fun=L _ fun})-                                    = text "equation for"-                                      <+> quotes (ppr fun)-pprMatchContextNoun CaseAlt         = text "case alternative"-pprMatchContextNoun IfAlt           = text "multi-way if alternative"-pprMatchContextNoun RecUpd          = text "record-update construct"-pprMatchContextNoun ThPatSplice     = text "Template Haskell pattern splice"-pprMatchContextNoun ThPatQuote      = text "Template Haskell pattern quotation"-pprMatchContextNoun PatBindRhs      = text "pattern binding"-pprMatchContextNoun PatBindGuards   = text "pattern binding guards"-pprMatchContextNoun LambdaExpr      = text "lambda abstraction"-pprMatchContextNoun ProcExpr        = text "arrow abstraction"-pprMatchContextNoun (StmtCtxt ctxt) = text "pattern binding in"-                                      $$ pprAStmtContext ctxt-pprMatchContextNoun PatSyn          = text "pattern synonym declaration"--------------------pprAStmtContext, pprStmtContext :: (Outputable id,-                                    Outputable (NameOrRdrName id))-                                => HsStmtContext id -> SDoc-pprAStmtContext ctxt = article <+> pprStmtContext ctxt-  where-    pp_an = text "an"-    pp_a  = text "a"-    article = case ctxt of-                  MDoExpr       -> pp_an-                  GhciStmtCtxt  -> pp_an-                  _             -> pp_a---------------------pprStmtContext GhciStmtCtxt    = text "interactive GHCi command"-pprStmtContext DoExpr          = text "'do' block"-pprStmtContext MDoExpr         = text "'mdo' block"-pprStmtContext ArrowExpr       = text "'do' block in an arrow command"-pprStmtContext ListComp        = text "list comprehension"-pprStmtContext MonadComp       = text "monad comprehension"-pprStmtContext (PatGuard ctxt) = text "pattern guard for" $$ pprMatchContext ctxt---- Drop the inner contexts when reporting errors, else we get---     Unexpected transform statement---     in a transformed branch of---          transformed branch of---          transformed branch of monad comprehension-pprStmtContext (ParStmtCtxt c) =-  ifPprDebug (sep [text "parallel branch of", pprAStmtContext c])-             (pprStmtContext c)-pprStmtContext (TransStmtCtxt c) =-  ifPprDebug (sep [text "transformed branch of", pprAStmtContext c])-             (pprStmtContext c)--instance (Outputable p, Outputable (NameOrRdrName p))-      => Outputable (HsStmtContext p) where-    ppr = pprStmtContext---- Used to generate the string for a *runtime* error message-matchContextErrString :: Outputable id-                      => HsMatchContext id -> SDoc-matchContextErrString (FunRhs{mc_fun=L _ fun})   = text "function" <+> ppr fun-matchContextErrString CaseAlt                    = text "case"-matchContextErrString IfAlt                      = text "multi-way if"-matchContextErrString PatBindRhs                 = text "pattern binding"-matchContextErrString PatBindGuards              = text "pattern binding guards"-matchContextErrString RecUpd                     = text "record update"-matchContextErrString LambdaExpr                 = text "lambda"-matchContextErrString ProcExpr                   = text "proc"-matchContextErrString ThPatSplice                = panic "matchContextErrString"  -- Not used at runtime-matchContextErrString ThPatQuote                 = panic "matchContextErrString"  -- Not used at runtime-matchContextErrString PatSyn                     = panic "matchContextErrString"  -- Not used at runtime-matchContextErrString (StmtCtxt (ParStmtCtxt c))   = matchContextErrString (StmtCtxt c)-matchContextErrString (StmtCtxt (TransStmtCtxt c)) = matchContextErrString (StmtCtxt c)-matchContextErrString (StmtCtxt (PatGuard _))      = text "pattern guard"-matchContextErrString (StmtCtxt GhciStmtCtxt)      = text "interactive GHCi command"-matchContextErrString (StmtCtxt DoExpr)            = text "'do' block"-matchContextErrString (StmtCtxt ArrowExpr)         = text "'do' block"-matchContextErrString (StmtCtxt MDoExpr)           = text "'mdo' block"-matchContextErrString (StmtCtxt ListComp)          = text "list comprehension"-matchContextErrString (StmtCtxt MonadComp)         = text "monad comprehension"--pprMatchInCtxt :: (OutputableBndrId (GhcPass idR),-                   -- TODO:AZ these constraints do not make sense-                 Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))),-                 Outputable body)-               => Match (GhcPass idR) body -> SDoc-pprMatchInCtxt match  = hang (text "In" <+> pprMatchContext (m_ctxt match)-                                        <> colon)-                             4 (pprMatch match)--pprStmtInCtxt :: (OutputableBndrId (GhcPass idL),-                  OutputableBndrId (GhcPass idR),-                  Outputable body)-              => HsStmtContext (IdP (GhcPass idL))-              -> StmtLR (GhcPass idL) (GhcPass idR) body-              -> SDoc-pprStmtInCtxt ctxt (LastStmt _ e _ _)-  | isComprehensionContext ctxt      -- For [ e | .. ], do not mutter about "stmts"-  = hang (text "In the expression:") 2 (ppr e)--pprStmtInCtxt ctxt stmt-  = hang (text "In a stmt of" <+> pprAStmtContext ctxt <> colon)-       2 (ppr_stmt stmt)-  where-    -- For Group and Transform Stmts, don't print the nested stmts!-    ppr_stmt (TransStmt { trS_by = by, trS_using = using-                        , trS_form = form }) = pprTransStmt by using form-    ppr_stmt stmt = pprStmt stmt
− hsSyn/HsExpr.hs-boot
@@ -1,51 +0,0 @@-{-# LANGUAGE CPP, KindSignatures #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE RoleAnnotations #-}-{-# LANGUAGE ExistentialQuantification #-}-{-# LANGUAGE TypeFamilies #-}--module HsExpr where--import SrcLoc     ( Located )-import Outputable ( SDoc, Outputable )-import {-# SOURCE #-} HsPat  ( LPat )-import BasicTypes ( SpliceExplicitFlag(..))-import HsExtension ( OutputableBndrId, GhcPass )--type role HsExpr nominal-type role HsCmd nominal-type role MatchGroup nominal nominal-type role GRHSs nominal nominal-type role HsSplice nominal-type role SyntaxExpr nominal-data HsExpr (i :: *)-data HsCmd  (i :: *)-data HsSplice (i :: *)-data MatchGroup (a :: *) (body :: *)-data GRHSs (a :: *) (body :: *)-data SyntaxExpr (i :: *)--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsExpr p)-instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsCmd p)--type LHsExpr a = Located (HsExpr a)--pprLExpr :: (OutputableBndrId (GhcPass p)) => LHsExpr (GhcPass p) -> SDoc--pprExpr :: (OutputableBndrId (GhcPass p)) => HsExpr (GhcPass p) -> SDoc--pprSplice :: (OutputableBndrId (GhcPass p)) => HsSplice (GhcPass p) -> SDoc--pprSpliceDecl ::  (OutputableBndrId (GhcPass p))-          => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc--pprPatBind :: forall bndr p body. (OutputableBndrId (GhcPass bndr),-                                   OutputableBndrId (GhcPass p),-                                   Outputable body)-           => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc--pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body)-           => MatchGroup (GhcPass idR) body -> SDoc
− hsSyn/HsExtension.hs
@@ -1,1115 +0,0 @@-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE FunctionalDependencies #-}-{-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE PatternSynonyms #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder--module HsExtension where---- This module captures the type families to precisely identify the extension--- points for HsSyn--import GhcPrelude--import Data.Data hiding ( Fixity )-import PlaceHolder-import Name-import RdrName-import Var-import Outputable-import SrcLoc (Located)--import Data.Kind--{--Note [Trees that grow]-~~~~~~~~~~~~~~~~~~~~~~--See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow--The hsSyn AST is reused across multiple compiler passes. We also have the-Template Haskell AST, and the haskell-src-exts one (outside of GHC)--Supporting multiple passes means the AST has various warts on it to cope with-the specifics for the phases, such as the 'ValBindsOut', 'ConPatOut',-'SigPatOut' etc.--The growable AST will allow each of these variants to be captured explicitly,-such that they only exist in the given compiler pass AST, as selected by the-type parameter to the AST.--In addition it will allow tool writers to define their own extensions to capture-additional information for the tool, in a natural way.--A further goal is to provide a means to harmonise the Template Haskell and-haskell-src-exts ASTs as well.---}---- | used as place holder in TTG values-data NoExt = NoExt-  deriving (Data,Eq,Ord)--instance Outputable NoExt where-  ppr _ = text "NoExt"---- | Used when constructing a term with an unused extension point.-noExt :: NoExt-noExt = NoExt---- | Used as a data type index for the hsSyn AST-data GhcPass (c :: Pass)-deriving instance Eq (GhcPass c)-deriving instance Typeable c => Data (GhcPass c)--data Pass = Parsed | Renamed | Typechecked-         deriving (Data)---- Type synonyms as a shorthand for tagging-type GhcPs   = GhcPass 'Parsed      -- Old 'RdrName' type param-type GhcRn   = GhcPass 'Renamed     -- Old 'Name' type param-type GhcTc   = GhcPass 'Typechecked -- Old 'Id' type para,-type GhcTcId = GhcTc                -- Old 'TcId' type param---- | Maps the "normal" id type for a given pass-type family IdP p-type instance IdP GhcPs = RdrName-type instance IdP GhcRn = Name-type instance IdP GhcTc = Id--type LIdP p = Located (IdP p)---- | Marks that a field uses the GhcRn variant even when the pass--- parameter is GhcTc. Useful for storing HsTypes in HsExprs, say, because--- HsType GhcTc should never occur.-type family NoGhcTc (p :: Type) where-    -- this way, GHC can figure out that the result is a GhcPass-  NoGhcTc (GhcPass pass) = GhcPass (NoGhcTcPass pass)-  NoGhcTc other          = other--type family NoGhcTcPass (p :: Pass) :: Pass where-  NoGhcTcPass 'Typechecked = 'Renamed-  NoGhcTcPass other        = other---- =====================================================================--- Type families for the HsBinds extension points---- HsLocalBindsLR type families-type family XHsValBinds      x x'-type family XHsIPBinds       x x'-type family XEmptyLocalBinds x x'-type family XXHsLocalBindsLR x x'--type ForallXHsLocalBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) =-       ( c (XHsValBinds      x x')-       , c (XHsIPBinds       x x')-       , c (XEmptyLocalBinds x x')-       , c (XXHsLocalBindsLR x x')-       )---- ValBindsLR type families-type family XValBinds    x x'-type family XXValBindsLR x x'--type ForallXValBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) =-       ( c (XValBinds    x x')-       , c (XXValBindsLR x x')-       )----- HsBindsLR type families-type family XFunBind    x x'-type family XPatBind    x x'-type family XVarBind    x x'-type family XAbsBinds   x x'-type family XPatSynBind x x'-type family XXHsBindsLR x x'--type ForallXHsBindsLR (c :: * -> Constraint) (x :: *) (x' :: *) =-       ( c (XFunBind    x x')-       , c (XPatBind    x x')-       , c (XVarBind    x x')-       , c (XAbsBinds   x x')-       , c (XPatSynBind x x')-       , c (XXHsBindsLR x x')-       )---- ABExport type families-type family XABE x-type family XXABExport x--type ForallXABExport (c :: * -> Constraint) (x :: *) =-       ( c (XABE       x)-       , c (XXABExport x)-       )---- PatSynBind type families-type family XPSB x x'-type family XXPatSynBind x x'--type ForallXPatSynBind  (c :: * -> Constraint) (x :: *) (x' :: *) =-       ( c (XPSB         x x')-       , c (XXPatSynBind x x')-       )---- HsIPBinds type families-type family XIPBinds    x-type family XXHsIPBinds x--type ForallXHsIPBinds (c :: * -> Constraint) (x :: *) =-       ( c (XIPBinds    x)-       , c (XXHsIPBinds x)-       )---- IPBind type families-type family XCIPBind x-type family XXIPBind x--type ForallXIPBind (c :: * -> Constraint) (x :: *) =-       ( c (XCIPBind x)-       , c (XXIPBind x)-       )---- Sig type families-type family XTypeSig          x-type family XPatSynSig        x-type family XClassOpSig       x-type family XIdSig            x-type family XFixSig           x-type family XInlineSig        x-type family XSpecSig          x-type family XSpecInstSig      x-type family XMinimalSig       x-type family XSCCFunSig        x-type family XCompleteMatchSig x-type family XXSig             x--type ForallXSig (c :: * -> Constraint) (x :: *) =-       ( c (XTypeSig          x)-       , c (XPatSynSig        x)-       , c (XClassOpSig       x)-       , c (XIdSig            x)-       , c (XFixSig           x)-       , c (XInlineSig        x)-       , c (XSpecSig          x)-       , c (XSpecInstSig      x)-       , c (XMinimalSig       x)-       , c (XSCCFunSig        x)-       , c (XCompleteMatchSig x)-       , c (XXSig             x)-       )---- FixitySig type families-type family XFixitySig          x-type family XXFixitySig         x--type ForallXFixitySig (c :: * -> Constraint) (x :: *) =-       ( c (XFixitySig         x)-       , c (XXFixitySig        x)-       )---- =====================================================================--- Type families for the HsDecls extension points---- HsDecl type families-type family XTyClD       x-type family XInstD       x-type family XDerivD      x-type family XValD        x-type family XSigD        x-type family XDefD        x-type family XForD        x-type family XWarningD    x-type family XAnnD        x-type family XRuleD       x-type family XSpliceD     x-type family XDocD        x-type family XRoleAnnotD  x-type family XXHsDecl     x--type ForallXHsDecl (c :: * -> Constraint) (x :: *) =-       ( c (XTyClD       x)-       , c (XInstD       x)-       , c (XDerivD      x)-       , c (XValD        x)-       , c (XSigD        x)-       , c (XDefD        x)-       , c (XForD        x)-       , c (XWarningD    x)-       , c (XAnnD        x)-       , c (XRuleD       x)-       , c (XSpliceD     x)-       , c (XDocD        x)-       , c (XRoleAnnotD  x)-       , c (XXHsDecl    x)-       )---- ---------------------------------------- HsGroup type families-type family XCHsGroup      x-type family XXHsGroup      x--type ForallXHsGroup (c :: * -> Constraint) (x :: *) =-       ( c (XCHsGroup       x)-       , c (XXHsGroup       x)-       )---- ---------------------------------------- SpliceDecl type families-type family XSpliceDecl       x-type family XXSpliceDecl      x--type ForallXSpliceDecl (c :: * -> Constraint) (x :: *) =-       ( c (XSpliceDecl        x)-       , c (XXSpliceDecl       x)-       )---- ---------------------------------------- TyClDecl type families-type family XFamDecl       x-type family XSynDecl       x-type family XDataDecl      x-type family XClassDecl     x-type family XXTyClDecl     x--type ForallXTyClDecl (c :: * -> Constraint) (x :: *) =-       ( c (XFamDecl       x)-       , c (XSynDecl       x)-       , c (XDataDecl      x)-       , c (XClassDecl     x)-       , c (XXTyClDecl     x)-       )---- ---------------------------------------- TyClGroup type families-type family XCTyClGroup      x-type family XXTyClGroup      x--type ForallXTyClGroup (c :: * -> Constraint) (x :: *) =-       ( c (XCTyClGroup       x)-       , c (XXTyClGroup       x)-       )---- ---------------------------------------- FamilyResultSig type families-type family XNoSig            x-type family XCKindSig         x -- Clashes with XKindSig above-type family XTyVarSig         x-type family XXFamilyResultSig x--type ForallXFamilyResultSig (c :: * -> Constraint) (x :: *) =-       ( c (XNoSig            x)-       , c (XCKindSig         x)-       , c (XTyVarSig         x)-       , c (XXFamilyResultSig x)-       )---- ---------------------------------------- FamilyDecl type families-type family XCFamilyDecl      x-type family XXFamilyDecl      x--type ForallXFamilyDecl (c :: * -> Constraint) (x :: *) =-       ( c (XCFamilyDecl       x)-       , c (XXFamilyDecl       x)-       )---- ---------------------------------------- HsDataDefn type families-type family XCHsDataDefn      x-type family XXHsDataDefn      x--type ForallXHsDataDefn (c :: * -> Constraint) (x :: *) =-       ( c (XCHsDataDefn       x)-       , c (XXHsDataDefn       x)-       )---- ---------------------------------------- HsDerivingClause type families-type family XCHsDerivingClause      x-type family XXHsDerivingClause      x--type ForallXHsDerivingClause (c :: * -> Constraint) (x :: *) =-       ( c (XCHsDerivingClause       x)-       , c (XXHsDerivingClause       x)-       )---- ---------------------------------------- ConDecl type families-type family XConDeclGADT   x-type family XConDeclH98    x-type family XXConDecl      x--type ForallXConDecl (c :: * -> Constraint) (x :: *) =-       ( c (XConDeclGADT    x)-       , c (XConDeclH98     x)-       , c (XXConDecl       x)-       )---- ---------------------------------------- FamEqn type families-type family XCFamEqn      x p r-type family XXFamEqn      x p r--type ForallXFamEqn (c :: * -> Constraint) (x :: *) (p :: *) (r :: *) =-       ( c (XCFamEqn       x p r)-       , c (XXFamEqn       x p r)-       )---- ---------------------------------------- ClsInstDecl type families-type family XCClsInstDecl      x-type family XXClsInstDecl      x--type ForallXClsInstDecl (c :: * -> Constraint) (x :: *) =-       ( c (XCClsInstDecl       x)-       , c (XXClsInstDecl       x)-       )---- ---------------------------------------- ClsInstDecl type families-type family XClsInstD      x-type family XDataFamInstD  x-type family XTyFamInstD    x-type family XXInstDecl     x--type ForallXInstDecl (c :: * -> Constraint) (x :: *) =-       ( c (XClsInstD       x)-       , c (XDataFamInstD   x)-       , c (XTyFamInstD     x)-       , c (XXInstDecl      x)-       )---- ---------------------------------------- DerivDecl type families-type family XCDerivDecl      x-type family XXDerivDecl      x--type ForallXDerivDecl (c :: * -> Constraint) (x :: *) =-       ( c (XCDerivDecl       x)-       , c (XXDerivDecl       x)-       )---- ---------------------------------------- DerivStrategy type family-type family XViaStrategy x---- ---------------------------------------- DefaultDecl type families-type family XCDefaultDecl      x-type family XXDefaultDecl      x--type ForallXDefaultDecl (c :: * -> Constraint) (x :: *) =-       ( c (XCDefaultDecl       x)-       , c (XXDefaultDecl       x)-       )---- ---------------------------------------- DefaultDecl type families-type family XForeignImport     x-type family XForeignExport     x-type family XXForeignDecl      x--type ForallXForeignDecl (c :: * -> Constraint) (x :: *) =-       ( c (XForeignImport      x)-       , c (XForeignExport      x)-       , c (XXForeignDecl       x)-       )---- ---------------------------------------- RuleDecls type families-type family XCRuleDecls      x-type family XXRuleDecls      x--type ForallXRuleDecls (c :: * -> Constraint) (x :: *) =-       ( c (XCRuleDecls       x)-       , c (XXRuleDecls       x)-       )----- ---------------------------------------- RuleDecl type families-type family XHsRule          x-type family XXRuleDecl       x--type ForallXRuleDecl (c :: * -> Constraint) (x :: *) =-       ( c (XHsRule           x)-       , c (XXRuleDecl        x)-       )---- ---------------------------------------- RuleBndr type families-type family XCRuleBndr      x-type family XRuleBndrSig    x-type family XXRuleBndr      x--type ForallXRuleBndr (c :: * -> Constraint) (x :: *) =-       ( c (XCRuleBndr       x)-       , c (XRuleBndrSig     x)-       , c (XXRuleBndr       x)-       )---- ---------------------------------------- WarnDecls type families-type family XWarnings        x-type family XXWarnDecls      x--type ForallXWarnDecls (c :: * -> Constraint) (x :: *) =-       ( c (XWarnings        x)-       , c (XXWarnDecls      x)-       )---- ---------------------------------------- AnnDecl type families-type family XWarning        x-type family XXWarnDecl      x--type ForallXWarnDecl (c :: * -> Constraint) (x :: *) =-       ( c (XWarning        x)-       , c (XXWarnDecl      x)-       )---- ---------------------------------------- AnnDecl type families-type family XHsAnnotation  x-type family XXAnnDecl      x--type ForallXAnnDecl (c :: * -> Constraint) (x :: *) =-       ( c (XHsAnnotation  x)-       , c (XXAnnDecl      x)-       )---- ---------------------------------------- RoleAnnotDecl type families-type family XCRoleAnnotDecl  x-type family XXRoleAnnotDecl  x--type ForallXRoleAnnotDecl (c :: * -> Constraint) (x :: *) =-       ( c (XCRoleAnnotDecl  x)-       , c (XXRoleAnnotDecl  x)-       )---- =====================================================================--- Type families for the HsExpr extension points--type family XVar            x-type family XUnboundVar     x-type family XConLikeOut     x-type family XRecFld         x-type family XOverLabel      x-type family XIPVar          x-type family XOverLitE       x-type family XLitE           x-type family XLam            x-type family XLamCase        x-type family XApp            x-type family XAppTypeE       x-type family XOpApp          x-type family XNegApp         x-type family XPar            x-type family XSectionL       x-type family XSectionR       x-type family XExplicitTuple  x-type family XExplicitSum    x-type family XCase           x-type family XIf             x-type family XMultiIf        x-type family XLet            x-type family XDo             x-type family XExplicitList   x-type family XRecordCon      x-type family XRecordUpd      x-type family XExprWithTySig  x-type family XArithSeq       x-type family XSCC            x-type family XCoreAnn        x-type family XBracket        x-type family XRnBracketOut   x-type family XTcBracketOut   x-type family XSpliceE        x-type family XProc           x-type family XStatic         x-type family XArrApp         x-type family XArrForm        x-type family XTick           x-type family XBinTick        x-type family XTickPragma     x-type family XEWildPat       x-type family XEAsPat         x-type family XEViewPat       x-type family XELazyPat       x-type family XWrap           x-type family XXExpr          x--type ForallXExpr (c :: * -> Constraint) (x :: *) =-       ( c (XVar            x)-       , c (XUnboundVar     x)-       , c (XConLikeOut     x)-       , c (XRecFld         x)-       , c (XOverLabel      x)-       , c (XIPVar          x)-       , c (XOverLitE       x)-       , c (XLitE           x)-       , c (XLam            x)-       , c (XLamCase        x)-       , c (XApp            x)-       , c (XAppTypeE       x)-       , c (XOpApp          x)-       , c (XNegApp         x)-       , c (XPar            x)-       , c (XSectionL       x)-       , c (XSectionR       x)-       , c (XExplicitTuple  x)-       , c (XExplicitSum    x)-       , c (XCase           x)-       , c (XIf             x)-       , c (XMultiIf        x)-       , c (XLet            x)-       , c (XDo             x)-       , c (XExplicitList   x)-       , c (XRecordCon      x)-       , c (XRecordUpd      x)-       , c (XExprWithTySig  x)-       , c (XArithSeq       x)-       , c (XSCC            x)-       , c (XCoreAnn        x)-       , c (XBracket        x)-       , c (XRnBracketOut   x)-       , c (XTcBracketOut   x)-       , c (XSpliceE        x)-       , c (XProc           x)-       , c (XStatic         x)-       , c (XArrApp         x)-       , c (XArrForm        x)-       , c (XTick           x)-       , c (XBinTick        x)-       , c (XTickPragma     x)-       , c (XEWildPat       x)-       , c (XEAsPat         x)-       , c (XEViewPat       x)-       , c (XELazyPat       x)-       , c (XWrap           x)-       , c (XXExpr          x)-       )--- -----------------------------------------------------------------------type family XUnambiguous        x-type family XAmbiguous          x-type family XXAmbiguousFieldOcc x--type ForallXAmbiguousFieldOcc (c :: * -> Constraint) (x :: *) =-       ( c (XUnambiguous        x)-       , c (XAmbiguous          x)-       , c (XXAmbiguousFieldOcc x)-       )---- ------------------------------------------------------------------------type family XPresent  x-type family XMissing  x-type family XXTupArg  x--type ForallXTupArg (c :: * -> Constraint) (x :: *) =-       ( c (XPresent x)-       , c (XMissing x)-       , c (XXTupArg x)-       )---- -----------------------------------------------------------------------type family XTypedSplice   x-type family XUntypedSplice x-type family XQuasiQuote    x-type family XSpliced       x-type family XXSplice       x--type ForallXSplice (c :: * -> Constraint) (x :: *) =-       ( c (XTypedSplice   x)-       , c (XUntypedSplice x)-       , c (XQuasiQuote    x)-       , c (XSpliced       x)-       , c (XXSplice       x)-       )---- -----------------------------------------------------------------------type family XExpBr      x-type family XPatBr      x-type family XDecBrL     x-type family XDecBrG     x-type family XTypBr      x-type family XVarBr      x-type family XTExpBr     x-type family XXBracket   x--type ForallXBracket (c :: * -> Constraint) (x :: *) =-       ( c (XExpBr      x)-       , c (XPatBr      x)-       , c (XDecBrL     x)-       , c (XDecBrG     x)-       , c (XTypBr      x)-       , c (XVarBr      x)-       , c (XTExpBr     x)-       , c (XXBracket   x)-       )---- -----------------------------------------------------------------------type family XCmdTop  x-type family XXCmdTop x--type ForallXCmdTop (c :: * -> Constraint) (x :: *) =-       ( c (XCmdTop  x)-       , c (XXCmdTop x)-       )---- ---------------------------------------type family XMG           x b-type family XXMatchGroup  x b--type ForallXMatchGroup (c :: * -> Constraint) (x :: *) (b :: *) =-       ( c (XMG          x b)-       , c (XXMatchGroup x b)-       )---- ---------------------------------------type family XCMatch  x b-type family XXMatch  x b--type ForallXMatch (c :: * -> Constraint) (x :: *) (b :: *) =-       ( c (XCMatch  x b)-       , c (XXMatch  x b)-       )---- ---------------------------------------type family XCGRHSs  x b-type family XXGRHSs  x b--type ForallXGRHSs (c :: * -> Constraint) (x :: *) (b :: *) =-       ( c (XCGRHSs  x b)-       , c (XXGRHSs  x b)-       )---- ---------------------------------------type family XCGRHS  x b-type family XXGRHS  x b--type ForallXGRHS (c :: * -> Constraint) (x :: *) (b :: *) =-       ( c (XCGRHS  x b)-       , c (XXGRHS  x b)-       )---- ---------------------------------------type family XLastStmt        x x' b-type family XBindStmt        x x' b-type family XApplicativeStmt x x' b-type family XBodyStmt        x x' b-type family XLetStmt         x x' b-type family XParStmt         x x' b-type family XTransStmt       x x' b-type family XRecStmt         x x' b-type family XXStmtLR         x x' b--type ForallXStmtLR (c :: * -> Constraint) (x :: *)  (x' :: *) (b :: *) =-       ( c (XLastStmt         x x' b)-       , c (XBindStmt         x x' b)-       , c (XApplicativeStmt  x x' b)-       , c (XBodyStmt         x x' b)-       , c (XLetStmt          x x' b)-       , c (XParStmt          x x' b)-       , c (XTransStmt        x x' b)-       , c (XRecStmt          x x' b)-       , c (XXStmtLR          x x' b)-       )---- -----------------------------------------------------------------------type family XCmdArrApp  x-type family XCmdArrForm x-type family XCmdApp     x-type family XCmdLam     x-type family XCmdPar     x-type family XCmdCase    x-type family XCmdIf      x-type family XCmdLet     x-type family XCmdDo      x-type family XCmdWrap    x-type family XXCmd       x--type ForallXCmd (c :: * -> Constraint) (x :: *) =-       ( c (XCmdArrApp  x)-       , c (XCmdArrForm x)-       , c (XCmdApp     x)-       , c (XCmdLam     x)-       , c (XCmdPar     x)-       , c (XCmdCase    x)-       , c (XCmdIf      x)-       , c (XCmdLet     x)-       , c (XCmdDo      x)-       , c (XCmdWrap    x)-       , c (XXCmd       x)-       )---- -----------------------------------------------------------------------type family XParStmtBlock  x x'-type family XXParStmtBlock x x'--type ForallXParStmtBlock (c :: * -> Constraint) (x :: *) (x' :: *) =-       ( c (XParStmtBlock  x x')-       , c (XXParStmtBlock x x')-       )---- -----------------------------------------------------------------------type family XApplicativeArgOne   x-type family XApplicativeArgMany  x-type family XXApplicativeArg     x--type ForallXApplicativeArg (c :: * -> Constraint) (x :: *) =-       ( c (XApplicativeArgOne   x)-       , c (XApplicativeArgMany  x)-       , c (XXApplicativeArg     x)-       )---- =====================================================================--- Type families for the HsImpExp extension points---- TODO---- =====================================================================--- Type families for the HsLit extension points---- We define a type family for each extension point. This is based on prepending--- 'X' to the constructor name, for ease of reference.-type family XHsChar x-type family XHsCharPrim x-type family XHsString x-type family XHsStringPrim x-type family XHsInt x-type family XHsIntPrim x-type family XHsWordPrim x-type family XHsInt64Prim x-type family XHsWord64Prim x-type family XHsInteger x-type family XHsRat x-type family XHsFloatPrim x-type family XHsDoublePrim x-type family XXLit x---- | Helper to apply a constraint to all extension points. It has one--- entry per extension point type family.-type ForallXHsLit (c :: * -> Constraint) (x :: *) =-  ( c (XHsChar       x)-  , c (XHsCharPrim   x)-  , c (XHsDoublePrim x)-  , c (XHsFloatPrim  x)-  , c (XHsInt        x)-  , c (XHsInt64Prim  x)-  , c (XHsIntPrim    x)-  , c (XHsInteger    x)-  , c (XHsRat        x)-  , c (XHsString     x)-  , c (XHsStringPrim x)-  , c (XHsWord64Prim x)-  , c (XHsWordPrim   x)-  , c (XXLit         x)-  )--type family XOverLit  x-type family XXOverLit x--type ForallXOverLit (c :: * -> Constraint) (x :: *) =-       ( c (XOverLit  x)-       , c (XXOverLit x)-       )---- =====================================================================--- Type families for the HsPat extension points--type family XWildPat   x-type family XVarPat    x-type family XLazyPat   x-type family XAsPat     x-type family XParPat    x-type family XBangPat   x-type family XListPat   x-type family XTuplePat  x-type family XSumPat    x-type family XConPat    x-type family XViewPat   x-type family XSplicePat x-type family XLitPat    x-type family XNPat      x-type family XNPlusKPat x-type family XSigPat    x-type family XCoPat     x-type family XXPat      x---type ForallXPat (c :: * -> Constraint) (x :: *) =-       ( c (XWildPat   x)-       , c (XVarPat    x)-       , c (XLazyPat   x)-       , c (XAsPat     x)-       , c (XParPat    x)-       , c (XBangPat   x)-       , c (XListPat   x)-       , c (XTuplePat  x)-       , c (XSumPat    x)-       , c (XViewPat   x)-       , c (XSplicePat x)-       , c (XLitPat    x)-       , c (XNPat      x)-       , c (XNPlusKPat x)-       , c (XSigPat    x)-       , c (XCoPat     x)-       , c (XXPat      x)-       )---- =====================================================================--- Type families for the HsTypes type families--type family XHsQTvs       x-type family XXLHsQTyVars  x--type ForallXLHsQTyVars (c :: * -> Constraint) (x :: *) =-       ( c (XHsQTvs       x)-       , c (XXLHsQTyVars  x)-       )---- ---------------------------------------type family XHsIB              x b-type family XXHsImplicitBndrs  x b--type ForallXHsImplicitBndrs (c :: * -> Constraint) (x :: *) (b :: *) =-       ( c (XHsIB              x b)-       , c (XXHsImplicitBndrs  x b)-       )---- ---------------------------------------type family XHsWC              x b-type family XXHsWildCardBndrs  x b--type ForallXHsWildCardBndrs(c :: * -> Constraint) (x :: *) (b :: *) =-       ( c (XHsWC              x b)-       , c (XXHsWildCardBndrs  x b)-       )---- ---------------------------------------type family XForAllTy        x-type family XQualTy          x-type family XTyVar           x-type family XAppTy           x-type family XAppKindTy       x-type family XFunTy           x-type family XListTy          x-type family XTupleTy         x-type family XSumTy           x-type family XOpTy            x-type family XParTy           x-type family XIParamTy        x-type family XStarTy          x-type family XKindSig         x-type family XSpliceTy        x-type family XDocTy           x-type family XBangTy          x-type family XRecTy           x-type family XExplicitListTy  x-type family XExplicitTupleTy x-type family XTyLit           x-type family XWildCardTy      x-type family XXType           x---- | Helper to apply a constraint to all extension points. It has one--- entry per extension point type family.-type ForallXType (c :: * -> Constraint) (x :: *) =-       ( c (XForAllTy        x)-       , c (XQualTy          x)-       , c (XTyVar           x)-       , c (XAppTy           x)-       , c (XAppKindTy       x)-       , c (XFunTy           x)-       , c (XListTy          x)-       , c (XTupleTy         x)-       , c (XSumTy           x)-       , c (XOpTy            x)-       , c (XParTy           x)-       , c (XIParamTy        x)-       , c (XStarTy          x)-       , c (XKindSig         x)-       , c (XSpliceTy        x)-       , c (XDocTy           x)-       , c (XBangTy          x)-       , c (XRecTy           x)-       , c (XExplicitListTy  x)-       , c (XExplicitTupleTy x)-       , c (XTyLit           x)-       , c (XWildCardTy      x)-       , c (XXType           x)-       )---- -----------------------------------------------------------------------type family XUserTyVar   x-type family XKindedTyVar x-type family XXTyVarBndr  x--type ForallXTyVarBndr (c :: * -> Constraint) (x :: *) =-       ( c (XUserTyVar      x)-       , c (XKindedTyVar    x)-       , c (XXTyVarBndr     x)-       )---- -----------------------------------------------------------------------type family XConDeclField  x-type family XXConDeclField x--type ForallXConDeclField (c :: * -> Constraint) (x :: *) =-       ( c (XConDeclField  x)-       , c (XXConDeclField x)-       )---- -----------------------------------------------------------------------type family XCFieldOcc x-type family XXFieldOcc x--type ForallXFieldOcc (c :: * -> Constraint) (x :: *) =-       ( c (XCFieldOcc x)-       , c (XXFieldOcc x)-       )----- =====================================================================--- Type families for the HsImpExp type families--type family XCImportDecl       x-type family XXImportDecl       x--type ForallXImportDecl (c :: * -> Constraint) (x :: *) =-       ( c (XCImportDecl x)-       , c (XXImportDecl x)-       )---- ---------------------------------------type family XIEVar             x-type family XIEThingAbs        x-type family XIEThingAll        x-type family XIEThingWith       x-type family XIEModuleContents  x-type family XIEGroup           x-type family XIEDoc             x-type family XIEDocNamed        x-type family XXIE               x--type ForallXIE (c :: * -> Constraint) (x :: *) =-       ( c (XIEVar x)-       , c (XIEThingAbs        x)-       , c (XIEThingAll        x)-       , c (XIEThingWith       x)-       , c (XIEModuleContents  x)-       , c (XIEGroup           x)-       , c (XIEDoc             x)-       , c (XIEDocNamed        x)-       , c (XXIE               x)-       )---- ------------------------------------------ =====================================================================--- End of Type family definitions--- =====================================================================---- ------------------------------------------------------------------------- | Conversion of annotations from one type index to another. This is required--- where the AST is converted from one pass to another, and the extension values--- need to be brought along if possible. So for example a 'SourceText' is--- converted via 'id', but needs a type signature to keep the type checker--- happy.-class Convertable a b  | a -> b where-  convert :: a -> b--instance Convertable a a where-  convert = id---- | A constraint capturing all the extension points that can be converted via--- @instance Convertable a a@-type ConvertIdX a b =-  (XHsDoublePrim a ~ XHsDoublePrim b,-   XHsFloatPrim a ~ XHsFloatPrim b,-   XHsRat a ~ XHsRat b,-   XHsInteger a ~ XHsInteger b,-   XHsWord64Prim a ~ XHsWord64Prim b,-   XHsInt64Prim a ~ XHsInt64Prim b,-   XHsWordPrim a ~ XHsWordPrim b,-   XHsIntPrim a ~ XHsIntPrim b,-   XHsInt a ~ XHsInt b,-   XHsStringPrim a ~ XHsStringPrim b,-   XHsString a ~ XHsString b,-   XHsCharPrim a ~ XHsCharPrim b,-   XHsChar a ~ XHsChar b,-   XXLit a ~ XXLit b)---- -------------------------------------------------------------------------- Note [OutputableX]--- ~~~~~~~~~~~~~~~~~~------ is required because the type family resolution--- process cannot determine that all cases are handled for a `GhcPass p`--- case where the cases are listed separately.------ So------   type instance XXHsIPBinds    (GhcPass p) = NoExt------ will correctly deduce Outputable for (GhcPass p), but------   type instance XIPBinds       GhcPs = NoExt---   type instance XIPBinds       GhcRn = NoExt---   type instance XIPBinds       GhcTc = TcEvBinds------ will not.----- | Provide a summary constraint that gives all am Outputable constraint to--- extension points needing one-type OutputableX p = -- See Note [OutputableX]-  ( Outputable (XIPBinds    p)-  , Outputable (XViaStrategy p)-  , Outputable (XViaStrategy GhcRn)-  )--- TODO: Should OutputableX be included in OutputableBndrId?---- -------------------------------------------------------------------------- |Constraint type to bundle up the requirement for 'OutputableBndr' on both--- the @id@ and the 'NameOrRdrName' type for it-type OutputableBndrId id =-  ( OutputableBndr (NameOrRdrName (IdP id))-  , OutputableBndr (IdP id)-  , OutputableBndr (NameOrRdrName (IdP (NoGhcTc id)))-  , OutputableBndr (IdP (NoGhcTc id))-  , NoGhcTc id ~ NoGhcTc (NoGhcTc id)-  , OutputableX id-  , OutputableX (NoGhcTc id)-  )
− hsSyn/HsImpExp.hs
@@ -1,339 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998---HsImpExp: Abstract syntax: imports, exports, interfaces--}--{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder--module HsImpExp where--import GhcPrelude--import Module           ( ModuleName )-import HsDoc            ( HsDocString )-import OccName          ( HasOccName(..), isTcOcc, isSymOcc )-import BasicTypes       ( SourceText(..), StringLiteral(..), pprWithSourceText )-import FieldLabel       ( FieldLbl(..) )--import Outputable-import FastString-import SrcLoc-import HsExtension--import Data.Data--{--************************************************************************-*                                                                      *-\subsection{Import and export declaration lists}-*                                                                      *-************************************************************************--One per \tr{import} declaration in a module.--}---- | Located Import Declaration-type LImportDecl pass = Located (ImportDecl pass)-        -- ^ When in a list this may have-        ---        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'--        -- For details on above see note [Api annotations] in ApiAnnotation---- | Import Declaration------ A single Haskell @import@ declaration.-data ImportDecl pass-  = ImportDecl {-      ideclExt       :: XCImportDecl pass,-      ideclSourceSrc :: SourceText,-                                 -- Note [Pragma source text] in BasicTypes-      ideclName      :: Located ModuleName, -- ^ Module name.-      ideclPkgQual   :: Maybe StringLiteral,  -- ^ Package qualifier.-      ideclSource    :: Bool,          -- ^ True <=> {-\# SOURCE \#-} import-      ideclSafe      :: Bool,          -- ^ True => safe import-      ideclQualified :: Bool,          -- ^ True => qualified-      ideclImplicit  :: Bool,          -- ^ True => implicit import (of Prelude)-      ideclAs        :: Maybe (Located ModuleName),  -- ^ as Module-      ideclHiding    :: Maybe (Bool, Located [LIE pass])-                                       -- ^ (True => hiding, names)-    }-  | XImportDecl (XXImportDecl pass)-     -- ^-     --  'ApiAnnotation.AnnKeywordId's-     ---     --  - 'ApiAnnotation.AnnImport'-     ---     --  - 'ApiAnnotation.AnnOpen', 'ApiAnnotation.AnnClose' for ideclSource-     ---     --  - 'ApiAnnotation.AnnSafe','ApiAnnotation.AnnQualified',-     --    'ApiAnnotation.AnnPackageName','ApiAnnotation.AnnAs',-     --    'ApiAnnotation.AnnVal'-     ---     --  - 'ApiAnnotation.AnnHiding','ApiAnnotation.AnnOpen',-     --    'ApiAnnotation.AnnClose' attached-     --     to location in ideclHiding--     -- For details on above see note [Api annotations] in ApiAnnotation--type instance XCImportDecl  (GhcPass _) = NoExt-type instance XXImportDecl  (GhcPass _) = NoExt--simpleImportDecl :: ModuleName -> ImportDecl (GhcPass p)-simpleImportDecl mn = ImportDecl {-      ideclExt       = noExt,-      ideclSourceSrc = NoSourceText,-      ideclName      = noLoc mn,-      ideclPkgQual   = Nothing,-      ideclSource    = False,-      ideclSafe      = False,-      ideclImplicit  = False,-      ideclQualified = False,-      ideclAs        = Nothing,-      ideclHiding    = Nothing-    }--instance (p ~ GhcPass pass,OutputableBndrId p)-       => Outputable (ImportDecl p) where-    ppr (ImportDecl { ideclSourceSrc = mSrcText, ideclName = mod'-                    , ideclPkgQual = pkg-                    , ideclSource = from, ideclSafe = safe-                    , ideclQualified = qual, ideclImplicit = implicit-                    , ideclAs = as, ideclHiding = spec })-      = hang (hsep [text "import", ppr_imp from, pp_implicit implicit, pp_safe safe,-                    pp_qual qual, pp_pkg pkg, ppr mod', pp_as as])-             4 (pp_spec spec)-      where-        pp_implicit False = empty-        pp_implicit True = ptext (sLit ("(implicit)"))--        pp_pkg Nothing                    = empty-        pp_pkg (Just (StringLiteral st p))-          = pprWithSourceText st (doubleQuotes (ftext p))--        pp_qual False   = empty-        pp_qual True    = text "qualified"--        pp_safe False   = empty-        pp_safe True    = text "safe"--        pp_as Nothing   = empty-        pp_as (Just a)  = text "as" <+> ppr a--        ppr_imp True  = case mSrcText of-                          NoSourceText   -> text "{-# SOURCE #-}"-                          SourceText src -> text src <+> text "#-}"-        ppr_imp False = empty--        pp_spec Nothing             = empty-        pp_spec (Just (False, (L _ ies))) = ppr_ies ies-        pp_spec (Just (True, (L _ ies))) = text "hiding" <+> ppr_ies ies--        ppr_ies []  = text "()"-        ppr_ies ies = char '(' <+> interpp'SP ies <+> char ')'-    ppr (XImportDecl x) = ppr x--{--************************************************************************-*                                                                      *-\subsection{Imported and exported entities}-*                                                                      *-************************************************************************--}---- | A name in an import or export specification which may have adornments. Used--- primarily for accurate pretty printing of ParsedSource, and API Annotation--- placement.-data IEWrappedName name-  = IEName    (Located name)  -- ^ no extra-  | IEPattern (Located name)  -- ^ pattern X-  | IEType    (Located name)  -- ^ type (:+:)-  deriving (Eq,Data)---- | Located name with possible adornment--- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnType',---         'ApiAnnotation.AnnPattern'-type LIEWrappedName name = Located (IEWrappedName name)--- For details on above see note [Api annotations] in ApiAnnotation----- | Located Import or Export-type LIE pass = Located (IE pass)-        -- ^ When in a list this may have-        ---        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'--        -- For details on above see note [Api annotations] in ApiAnnotation---- | Imported or exported entity.-data IE pass-  = IEVar       (XIEVar pass) (LIEWrappedName (IdP pass))-        -- ^ Imported or Exported Variable--  | IEThingAbs  (XIEThingAbs pass) (LIEWrappedName (IdP pass))-        -- ^ Imported or exported Thing with Absent list-        ---        -- The thing is a Class/Type (can't tell)-        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnPattern',-        --             'ApiAnnotation.AnnType','ApiAnnotation.AnnVal'--        -- For details on above see note [Api annotations] in ApiAnnotation-        -- See Note [Located RdrNames] in HsExpr-  | IEThingAll  (XIEThingAll pass) (LIEWrappedName (IdP pass))-        -- ^ Imported or exported Thing with All imported or exported-        ---        -- The thing is a Class/Type and the All refers to methods/constructors-        ---        -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen',-        --       'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose',-        --                                 'ApiAnnotation.AnnType'--        -- For details on above see note [Api annotations] in ApiAnnotation-        -- See Note [Located RdrNames] in HsExpr--  | IEThingWith (XIEThingWith pass)-                (LIEWrappedName (IdP pass))-                IEWildcard-                [LIEWrappedName (IdP pass)]-                [Located (FieldLbl (IdP pass))]-        -- ^ Imported or exported Thing With given imported or exported-        ---        -- The thing is a Class/Type and the imported or exported things are-        -- methods/constructors and record fields; see Note [IEThingWith]-        -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen',-        --                                   'ApiAnnotation.AnnClose',-        --                                   'ApiAnnotation.AnnComma',-        --                                   'ApiAnnotation.AnnType'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | IEModuleContents  (XIEModuleContents pass) (Located ModuleName)-        -- ^ Imported or exported module contents-        ---        -- (Export Only)-        ---        -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnModule'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | IEGroup             (XIEGroup pass) Int HsDocString -- ^ Doc section heading-  | IEDoc               (XIEDoc pass) HsDocString       -- ^ Some documentation-  | IEDocNamed          (XIEDocNamed pass) String    -- ^ Reference to named doc-  | XIE (XXIE pass)--type instance XIEVar             (GhcPass _) = NoExt-type instance XIEThingAbs        (GhcPass _) = NoExt-type instance XIEThingAll        (GhcPass _) = NoExt-type instance XIEThingWith       (GhcPass _) = NoExt-type instance XIEModuleContents  (GhcPass _) = NoExt-type instance XIEGroup           (GhcPass _) = NoExt-type instance XIEDoc             (GhcPass _) = NoExt-type instance XIEDocNamed        (GhcPass _) = NoExt-type instance XXIE               (GhcPass _) = NoExt---- | Imported or Exported Wildcard-data IEWildcard = NoIEWildcard | IEWildcard Int deriving (Eq, Data)--{--Note [IEThingWith]-~~~~~~~~~~~~~~~~~~--A definition like--    module M ( T(MkT, x) ) where-      data T = MkT { x :: Int }--gives rise to--    IEThingWith T [MkT] [FieldLabel "x" False x)]           (without DuplicateRecordFields)-    IEThingWith T [MkT] [FieldLabel "x" True $sel:x:MkT)]   (with    DuplicateRecordFields)--See Note [Representing fields in AvailInfo] in Avail for more details.--}--ieName :: IE pass -> IdP pass-ieName (IEVar _ (L _ n))              = ieWrappedName n-ieName (IEThingAbs  _ (L _ n))        = ieWrappedName n-ieName (IEThingWith _ (L _ n) _ _ _)  = ieWrappedName n-ieName (IEThingAll  _ (L _ n))        = ieWrappedName n-ieName _ = panic "ieName failed pattern match!"--ieNames :: IE pass -> [IdP pass]-ieNames (IEVar       _ (L _ n)   )     = [ieWrappedName n]-ieNames (IEThingAbs  _ (L _ n)   )     = [ieWrappedName n]-ieNames (IEThingAll  _ (L _ n)   )     = [ieWrappedName n]-ieNames (IEThingWith _ (L _ n) _ ns _) = ieWrappedName n-                                       : map (ieWrappedName . unLoc) ns-ieNames (IEModuleContents {})     = []-ieNames (IEGroup          {})     = []-ieNames (IEDoc            {})     = []-ieNames (IEDocNamed       {})     = []-ieNames (XIE {}) = panic "ieNames"--ieWrappedName :: IEWrappedName name -> name-ieWrappedName (IEName    (L _ n)) = n-ieWrappedName (IEPattern (L _ n)) = n-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)-replaceWrappedName (IEType    (L l _)) n = IEType    (L l n)--replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2-replaceLWrappedName (L l n) n' = L l (replaceWrappedName n n')--instance (p ~ GhcPass pass,OutputableBndrId p) => Outputable (IE p) where-    ppr (IEVar       _     var) = ppr (unLoc var)-    ppr (IEThingAbs  _   thing) = ppr (unLoc thing)-    ppr (IEThingAll  _   thing) = hcat [ppr (unLoc thing), text "(..)"]-    ppr (IEThingWith _ thing wc withs flds)-        = ppr (unLoc thing) <> parens (fsep (punctuate comma-                                              (ppWiths ++-                                              map (ppr . flLabel . unLoc) flds)))-      where-        ppWiths =-          case wc of-              NoIEWildcard ->-                map (ppr . unLoc) withs-              IEWildcard pos ->-                let (bs, as) = splitAt pos (map (ppr . unLoc) withs)-                in bs ++ [text ".."] ++ as-    ppr (IEModuleContents _ mod')-        = text "module" <+> ppr mod'-    ppr (IEGroup _ n _)           = text ("<IEGroup: " ++ show n ++ ">")-    ppr (IEDoc _ doc)             = ppr doc-    ppr (IEDocNamed _ string)     = text ("<IEDocNamed: " ++ string ++ ">")-    ppr (XIE x) = ppr x--instance (HasOccName name) => HasOccName (IEWrappedName name) where-  occName w = occName (ieWrappedName w)--instance (OutputableBndr name) => OutputableBndr (IEWrappedName name) where-  pprBndr bs   w = pprBndr bs   (ieWrappedName w)-  pprPrefixOcc w = pprPrefixOcc (ieWrappedName w)-  pprInfixOcc  w = pprInfixOcc  (ieWrappedName w)--instance (OutputableBndr name) => Outputable (IEWrappedName name) where-  ppr (IEName    n) = pprPrefixOcc (unLoc n)-  ppr (IEPattern n) = text "pattern" <+> pprPrefixOcc (unLoc n)-  ppr (IEType    n) = text "type"    <+> pprPrefixOcc (unLoc n)--pprImpExp :: (HasOccName name, OutputableBndr name) => name -> SDoc-pprImpExp name = type_pref <+> pprPrefixOcc name-    where-    occ = occName name-    type_pref | isTcOcc occ && isSymOcc occ = text "type"-              | otherwise                   = empty
− hsSyn/HsInstances.hs
@@ -1,420 +0,0 @@-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE UndecidableInstances #-}-{-# OPTIONS_GHC -fno-warn-orphans #-}-module HsInstances where---- This module defines the Data instances for the hsSyn AST.---- It happens here to avoid massive constraint types on the AST with concomitant--- slow GHC bootstrap times.---- UndecidableInstances ?--import Data.Data hiding ( Fixity )--import GhcPrelude-import HsExtension-import HsBinds-import HsDecls-import HsExpr-import HsLit-import HsTypes-import HsPat-import HsImpExp---- ------------------------------------------------------------------------ Data derivations from HsSyn --------------------------------------------- ------------------------------------------------------------------------ Data derivations from HsBinds ------------------------------------------- deriving instance (DataIdLR pL pR) => Data (HsLocalBindsLR pL pR)-deriving instance Data (HsLocalBindsLR GhcPs GhcPs)-deriving instance Data (HsLocalBindsLR GhcPs GhcRn)-deriving instance Data (HsLocalBindsLR GhcRn GhcRn)-deriving instance Data (HsLocalBindsLR GhcTc GhcTc)---- deriving instance (DataIdLR pL pR) => Data (HsValBindsLR pL pR)-deriving instance Data (HsValBindsLR GhcPs GhcPs)-deriving instance Data (HsValBindsLR GhcPs GhcRn)-deriving instance Data (HsValBindsLR GhcRn GhcRn)-deriving instance Data (HsValBindsLR GhcTc GhcTc)---- deriving instance (DataIdLR pL pL) => Data (NHsValBindsLR pL)-deriving instance Data (NHsValBindsLR GhcPs)-deriving instance Data (NHsValBindsLR GhcRn)-deriving instance Data (NHsValBindsLR GhcTc)---- deriving instance (DataIdLR pL pR) => Data (HsBindLR pL pR)-deriving instance Data (HsBindLR GhcPs GhcPs)-deriving instance Data (HsBindLR GhcPs GhcRn)-deriving instance Data (HsBindLR GhcRn GhcRn)-deriving instance Data (HsBindLR GhcTc GhcTc)---- deriving instance (DataId p)       => Data (ABExport p)-deriving instance Data (ABExport GhcPs)-deriving instance Data (ABExport GhcRn)-deriving instance Data (ABExport GhcTc)---- deriving instance (DataIdLR pL pR) => Data (PatSynBind pL pR)-deriving instance Data (PatSynBind GhcPs GhcPs)-deriving instance Data (PatSynBind GhcPs GhcRn)-deriving instance Data (PatSynBind GhcRn GhcRn)-deriving instance Data (PatSynBind GhcTc GhcTc)---- deriving instance (DataIdLR p p)   => Data (HsIPBinds p)-deriving instance Data (HsIPBinds GhcPs)-deriving instance Data (HsIPBinds GhcRn)-deriving instance Data (HsIPBinds GhcTc)---- deriving instance (DataIdLR p p)   => Data (IPBind p)-deriving instance Data (IPBind GhcPs)-deriving instance Data (IPBind GhcRn)-deriving instance Data (IPBind GhcTc)---- deriving instance (DataIdLR p p)   => Data (Sig p)-deriving instance Data (Sig GhcPs)-deriving instance Data (Sig GhcRn)-deriving instance Data (Sig GhcTc)---- deriving instance (DataId p)       => Data (FixitySig p)-deriving instance Data (FixitySig GhcPs)-deriving instance Data (FixitySig GhcRn)-deriving instance Data (FixitySig GhcTc)---- deriving instance (DataIdLR p p)   => Data (HsPatSynDir p)-deriving instance Data (HsPatSynDir GhcPs)-deriving instance Data (HsPatSynDir GhcRn)-deriving instance Data (HsPatSynDir GhcTc)---- ------------------------------------------------------------------------ Data derivations from HsDecls ------------------------------------------- deriving instance (DataIdLR p p) => Data (HsDecl p)-deriving instance Data (HsDecl GhcPs)-deriving instance Data (HsDecl GhcRn)-deriving instance Data (HsDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (HsGroup p)-deriving instance Data (HsGroup GhcPs)-deriving instance Data (HsGroup GhcRn)-deriving instance Data (HsGroup GhcTc)---- deriving instance (DataIdLR p p) => Data (SpliceDecl p)-deriving instance Data (SpliceDecl GhcPs)-deriving instance Data (SpliceDecl GhcRn)-deriving instance Data (SpliceDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (TyClDecl p)-deriving instance Data (TyClDecl GhcPs)-deriving instance Data (TyClDecl GhcRn)-deriving instance Data (TyClDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (TyClGroup p)-deriving instance Data (TyClGroup GhcPs)-deriving instance Data (TyClGroup GhcRn)-deriving instance Data (TyClGroup GhcTc)---- deriving instance (DataIdLR p p) => Data (FamilyResultSig p)-deriving instance Data (FamilyResultSig GhcPs)-deriving instance Data (FamilyResultSig GhcRn)-deriving instance Data (FamilyResultSig GhcTc)---- deriving instance (DataIdLR p p) => Data (FamilyDecl p)-deriving instance Data (FamilyDecl GhcPs)-deriving instance Data (FamilyDecl GhcRn)-deriving instance Data (FamilyDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (InjectivityAnn p)-deriving instance Data (InjectivityAnn GhcPs)-deriving instance Data (InjectivityAnn GhcRn)-deriving instance Data (InjectivityAnn GhcTc)---- deriving instance (DataIdLR p p) => Data (FamilyInfo p)-deriving instance Data (FamilyInfo GhcPs)-deriving instance Data (FamilyInfo GhcRn)-deriving instance Data (FamilyInfo GhcTc)---- deriving instance (DataIdLR p p) => Data (HsDataDefn p)-deriving instance Data (HsDataDefn GhcPs)-deriving instance Data (HsDataDefn GhcRn)-deriving instance Data (HsDataDefn GhcTc)---- deriving instance (DataIdLR p p) => Data (HsDerivingClause p)-deriving instance Data (HsDerivingClause GhcPs)-deriving instance Data (HsDerivingClause GhcRn)-deriving instance Data (HsDerivingClause GhcTc)---- deriving instance (DataIdLR p p) => Data (ConDecl p)-deriving instance Data (ConDecl GhcPs)-deriving instance Data (ConDecl GhcRn)-deriving instance Data (ConDecl GhcTc)---- deriving instance DataIdLR p p   => Data (TyFamInstDecl p)-deriving instance Data (TyFamInstDecl GhcPs)-deriving instance Data (TyFamInstDecl GhcRn)-deriving instance Data (TyFamInstDecl GhcTc)---- deriving instance DataIdLR p p   => Data (DataFamInstDecl p)-deriving instance Data (DataFamInstDecl GhcPs)-deriving instance Data (DataFamInstDecl GhcRn)-deriving instance Data (DataFamInstDecl GhcTc)---- deriving instance (DataIdLR p p,Data pats,Data rhs)=>Data (FamEqn p pats rhs)-deriving instance (Data pats,Data rhs) => Data (FamEqn GhcPs pats rhs)-deriving instance (Data pats,Data rhs) => Data (FamEqn GhcRn pats rhs)-deriving instance (Data pats,Data rhs) => Data (FamEqn GhcTc pats rhs)---- deriving instance (DataIdLR p p) => Data (ClsInstDecl p)-deriving instance Data (ClsInstDecl GhcPs)-deriving instance Data (ClsInstDecl GhcRn)-deriving instance Data (ClsInstDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (InstDecl p)-deriving instance Data (InstDecl GhcPs)-deriving instance Data (InstDecl GhcRn)-deriving instance Data (InstDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (DerivDecl p)-deriving instance Data (DerivDecl GhcPs)-deriving instance Data (DerivDecl GhcRn)-deriving instance Data (DerivDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (DerivStrategy p)-deriving instance Data (DerivStrategy GhcPs)-deriving instance Data (DerivStrategy GhcRn)-deriving instance Data (DerivStrategy GhcTc)---- deriving instance (DataIdLR p p) => Data (DefaultDecl p)-deriving instance Data (DefaultDecl GhcPs)-deriving instance Data (DefaultDecl GhcRn)-deriving instance Data (DefaultDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (ForeignDecl p)-deriving instance Data (ForeignDecl GhcPs)-deriving instance Data (ForeignDecl GhcRn)-deriving instance Data (ForeignDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (RuleDecls p)-deriving instance Data (RuleDecls GhcPs)-deriving instance Data (RuleDecls GhcRn)-deriving instance Data (RuleDecls GhcTc)---- deriving instance (DataIdLR p p) => Data (RuleDecl p)-deriving instance Data (RuleDecl GhcPs)-deriving instance Data (RuleDecl GhcRn)-deriving instance Data (RuleDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (RuleBndr p)-deriving instance Data (RuleBndr GhcPs)-deriving instance Data (RuleBndr GhcRn)-deriving instance Data (RuleBndr GhcTc)---- deriving instance (DataId p)     => Data (WarnDecls p)-deriving instance Data (WarnDecls GhcPs)-deriving instance Data (WarnDecls GhcRn)-deriving instance Data (WarnDecls GhcTc)---- deriving instance (DataId p)     => Data (WarnDecl p)-deriving instance Data (WarnDecl GhcPs)-deriving instance Data (WarnDecl GhcRn)-deriving instance Data (WarnDecl GhcTc)---- deriving instance (DataIdLR p p) => Data (AnnDecl p)-deriving instance Data (AnnDecl GhcPs)-deriving instance Data (AnnDecl GhcRn)-deriving instance Data (AnnDecl GhcTc)---- deriving instance (DataId p)     => Data (RoleAnnotDecl p)-deriving instance Data (RoleAnnotDecl GhcPs)-deriving instance Data (RoleAnnotDecl GhcRn)-deriving instance Data (RoleAnnotDecl GhcTc)---- ------------------------------------------------------------------------ Data derivations from HsExpr -------------------------------------------- deriving instance (DataIdLR p p) => Data (SyntaxExpr p)-deriving instance Data (SyntaxExpr GhcPs)-deriving instance Data (SyntaxExpr GhcRn)-deriving instance Data (SyntaxExpr GhcTc)---- deriving instance (DataIdLR p p) => Data (HsExpr p)-deriving instance Data (HsExpr GhcPs)-deriving instance Data (HsExpr GhcRn)-deriving instance Data (HsExpr GhcTc)---- deriving instance (DataIdLR p p) => Data (HsTupArg p)-deriving instance Data (HsTupArg GhcPs)-deriving instance Data (HsTupArg GhcRn)-deriving instance Data (HsTupArg GhcTc)---- deriving instance (DataIdLR p p) => Data (HsCmd p)-deriving instance Data (HsCmd GhcPs)-deriving instance Data (HsCmd GhcRn)-deriving instance Data (HsCmd GhcTc)---- deriving instance (DataIdLR p p) => Data (HsCmdTop p)-deriving instance Data (HsCmdTop GhcPs)-deriving instance Data (HsCmdTop GhcRn)-deriving instance Data (HsCmdTop GhcTc)---- deriving instance (DataIdLR p p,Data body) => Data (MatchGroup p body)-deriving instance (Data body) => Data (MatchGroup GhcPs body)-deriving instance (Data body) => Data (MatchGroup GhcRn body)-deriving instance (Data body) => Data (MatchGroup GhcTc body)---- deriving instance (DataIdLR p p,Data body) => Data (Match      p body)-deriving instance (Data body) => Data (Match      GhcPs body)-deriving instance (Data body) => Data (Match      GhcRn body)-deriving instance (Data body) => Data (Match      GhcTc body)---- deriving instance (DataIdLR p p,Data body) => Data (GRHSs      p body)-deriving instance (Data body) => Data (GRHSs     GhcPs body)-deriving instance (Data body) => Data (GRHSs     GhcRn body)-deriving instance (Data body) => Data (GRHSs     GhcTc body)---- deriving instance (DataIdLR p p,Data body) => Data (GRHS       p body)-deriving instance (Data body) => Data (GRHS     GhcPs body)-deriving instance (Data body) => Data (GRHS     GhcRn body)-deriving instance (Data body) => Data (GRHS     GhcTc body)---- deriving instance (DataIdLR p p,Data body) => Data (StmtLR   p p body)-deriving instance (Data body) => Data (StmtLR   GhcPs GhcPs body)-deriving instance (Data body) => Data (StmtLR   GhcPs GhcRn body)-deriving instance (Data body) => Data (StmtLR   GhcRn GhcRn body)-deriving instance (Data body) => Data (StmtLR   GhcTc GhcTc body)--deriving instance Data RecStmtTc---- deriving instance (DataIdLR p p) => Data (ParStmtBlock p p)-deriving instance Data (ParStmtBlock GhcPs GhcPs)-deriving instance Data (ParStmtBlock GhcPs GhcRn)-deriving instance Data (ParStmtBlock GhcRn GhcRn)-deriving instance Data (ParStmtBlock GhcTc GhcTc)---- deriving instance (DataIdLR p p) => Data (ApplicativeArg p)-deriving instance Data (ApplicativeArg GhcPs)-deriving instance Data (ApplicativeArg GhcRn)-deriving instance Data (ApplicativeArg GhcTc)---- deriving instance (DataIdLR p p) => Data (HsSplice p)-deriving instance Data (HsSplice GhcPs)-deriving instance Data (HsSplice GhcRn)-deriving instance Data (HsSplice GhcTc)---- deriving instance (DataIdLR p p) => Data (HsSplicedThing p)-deriving instance Data (HsSplicedThing GhcPs)-deriving instance Data (HsSplicedThing GhcRn)-deriving instance Data (HsSplicedThing GhcTc)---- deriving instance (DataIdLR p p) => Data (HsBracket p)-deriving instance Data (HsBracket GhcPs)-deriving instance Data (HsBracket GhcRn)-deriving instance Data (HsBracket GhcTc)---- deriving instance (DataIdLR p p) => Data (ArithSeqInfo p)-deriving instance Data (ArithSeqInfo GhcPs)-deriving instance Data (ArithSeqInfo GhcRn)-deriving instance Data (ArithSeqInfo GhcTc)--deriving instance                   Data RecordConTc-deriving instance                   Data CmdTopTc-deriving instance                   Data PendingRnSplice-deriving instance                   Data PendingTcSplice---- ------------------------------------------------------------------------ Data derivations from HsLit -------------------------------------------- deriving instance (DataId p) => Data (HsLit p)-deriving instance Data (HsLit GhcPs)-deriving instance Data (HsLit GhcRn)-deriving instance Data (HsLit GhcTc)---- deriving instance (DataIdLR p p) => Data (HsOverLit p)-deriving instance Data (HsOverLit GhcPs)-deriving instance Data (HsOverLit GhcRn)-deriving instance Data (HsOverLit GhcTc)---- ------------------------------------------------------------------------ Data derivations from HsPat --------------------------------------------- deriving instance (DataIdLR p p) => Data (Pat p)-deriving instance Data (Pat GhcPs)-deriving instance Data (Pat GhcRn)-deriving instance Data (Pat GhcTc)--deriving instance Data ListPatTc---- deriving instance (DataIdLR p p, Data body) => Data (HsRecFields p body)-deriving instance (Data body) => Data (HsRecFields GhcPs body)-deriving instance (Data body) => Data (HsRecFields GhcRn body)-deriving instance (Data body) => Data (HsRecFields GhcTc body)---- ------------------------------------------------------------------------ Data derivations from HsTypes ------------------------------------------- deriving instance (DataIdLR p p) => Data (LHsQTyVars p)-deriving instance Data (LHsQTyVars GhcPs)-deriving instance Data (LHsQTyVars GhcRn)-deriving instance Data (LHsQTyVars GhcTc)---- deriving instance (DataIdLR p p, Data thing) =>Data (HsImplicitBndrs p thing)-deriving instance (Data thing) => Data (HsImplicitBndrs GhcPs thing)-deriving instance (Data thing) => Data (HsImplicitBndrs GhcRn thing)-deriving instance (Data thing) => Data (HsImplicitBndrs GhcTc thing)---- deriving instance (DataIdLR p p, Data thing) =>Data (HsWildCardBndrs p thing)-deriving instance (Data thing) => Data (HsWildCardBndrs GhcPs thing)-deriving instance (Data thing) => Data (HsWildCardBndrs GhcRn thing)-deriving instance (Data thing) => Data (HsWildCardBndrs GhcTc thing)---- deriving instance (DataIdLR p p) => Data (HsTyVarBndr p)-deriving instance Data (HsTyVarBndr GhcPs)-deriving instance Data (HsTyVarBndr GhcRn)-deriving instance Data (HsTyVarBndr GhcTc)---- deriving instance (DataIdLR p p) => Data (HsType p)-deriving instance Data (HsType GhcPs)-deriving instance Data (HsType GhcRn)-deriving instance Data (HsType GhcTc)--deriving instance Data (LHsTypeArg GhcPs)-deriving instance Data (LHsTypeArg GhcRn)-deriving instance Data (LHsTypeArg GhcTc)---- deriving instance (DataIdLR p p) => Data (ConDeclField p)-deriving instance Data (ConDeclField GhcPs)-deriving instance Data (ConDeclField GhcRn)-deriving instance Data (ConDeclField GhcTc)---- deriving instance (DataId p)     => Data (FieldOcc p)-deriving instance Data (FieldOcc GhcPs)-deriving instance Data (FieldOcc GhcRn)-deriving instance Data (FieldOcc GhcTc)---- deriving instance DataId p       => Data (AmbiguousFieldOcc p)-deriving instance Data (AmbiguousFieldOcc GhcPs)-deriving instance Data (AmbiguousFieldOcc GhcRn)-deriving instance Data (AmbiguousFieldOcc GhcTc)----- deriving instance (DataId name) => Data (ImportDecl name)-deriving instance Data (ImportDecl GhcPs)-deriving instance Data (ImportDecl GhcRn)-deriving instance Data (ImportDecl GhcTc)---- deriving instance (DataId name)             => Data (IE name)-deriving instance Data (IE GhcPs)-deriving instance Data (IE GhcRn)-deriving instance Data (IE GhcTc)---- deriving instance (Eq name, Eq (IdP name)) => Eq (IE name)-deriving instance Eq (IE GhcPs)-deriving instance Eq (IE GhcRn)-deriving instance Eq (IE GhcTc)---- ---------------------------------------------------------------------
− hsSyn/HsLit.hs
@@ -1,314 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--\section[HsLit]{Abstract syntax: source-language literals}--}--{-# LANGUAGE CPP, DeriveDataTypeable #-}-{-# LANGUAGE TypeSynonymInstances #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE TypeFamilies #-}--module HsLit where--#include "HsVersions.h"--import GhcPrelude--import {-# SOURCE #-} HsExpr( HsExpr, pprExpr )-import BasicTypes ( IntegralLit(..),FractionalLit(..),negateIntegralLit,-                    negateFractionalLit,SourceText(..),pprWithSourceText )-import Type-import Outputable-import FastString-import HsExtension--import Data.ByteString (ByteString)-import Data.Data hiding ( Fixity )--{--************************************************************************-*                                                                      *-\subsection[HsLit]{Literals}-*                                                                      *-************************************************************************--}---- Note [Literal source text] in BasicTypes for SourceText fields in--- the following--- Note [Trees that grow] in HsExtension for the Xxxxx fields in the following--- | Haskell Literal-data HsLit x-  = HsChar (XHsChar x) {- SourceText -} Char-      -- ^ Character-  | HsCharPrim (XHsCharPrim x) {- SourceText -} Char-      -- ^ Unboxed character-  | HsString (XHsString x) {- SourceText -} FastString-      -- ^ String-  | HsStringPrim (XHsStringPrim x) {- SourceText -} ByteString-      -- ^ Packed bytes-  | HsInt (XHsInt x)  IntegralLit-      -- ^ Genuinely an Int; arises from-      -- @TcGenDeriv@, and from TRANSLATION-  | HsIntPrim (XHsIntPrim x) {- SourceText -} Integer-      -- ^ literal @Int#@-  | HsWordPrim (XHsWordPrim x) {- SourceText -} Integer-      -- ^ literal @Word#@-  | HsInt64Prim (XHsInt64Prim x) {- SourceText -} Integer-      -- ^ literal @Int64#@-  | HsWord64Prim (XHsWord64Prim x) {- SourceText -} Integer-      -- ^ literal @Word64#@-  | HsInteger (XHsInteger x) {- SourceText -} Integer Type-      -- ^ Genuinely an integer; arises only-      -- from TRANSLATION (overloaded-      -- literals are done with HsOverLit)-  | HsRat (XHsRat x)  FractionalLit Type-      -- ^ Genuinely a rational; arises only from-      -- TRANSLATION (overloaded literals are-      -- done with HsOverLit)-  | HsFloatPrim (XHsFloatPrim x)   FractionalLit-      -- ^ Unboxed Float-  | HsDoublePrim (XHsDoublePrim x) FractionalLit-      -- ^ Unboxed Double--  | XLit (XXLit x)--type instance XHsChar       (GhcPass _) = SourceText-type instance XHsCharPrim   (GhcPass _) = SourceText-type instance XHsString     (GhcPass _) = SourceText-type instance XHsStringPrim (GhcPass _) = SourceText-type instance XHsInt        (GhcPass _) = NoExt-type instance XHsIntPrim    (GhcPass _) = SourceText-type instance XHsWordPrim   (GhcPass _) = SourceText-type instance XHsInt64Prim  (GhcPass _) = SourceText-type instance XHsWord64Prim (GhcPass _) = SourceText-type instance XHsInteger    (GhcPass _) = SourceText-type instance XHsRat        (GhcPass _) = NoExt-type instance XHsFloatPrim  (GhcPass _) = NoExt-type instance XHsDoublePrim (GhcPass _) = NoExt-type instance XXLit         (GhcPass _) = NoExt--instance Eq (HsLit x) where-  (HsChar _ x1)       == (HsChar _ x2)       = x1==x2-  (HsCharPrim _ x1)   == (HsCharPrim _ x2)   = x1==x2-  (HsString _ x1)     == (HsString _ x2)     = x1==x2-  (HsStringPrim _ x1) == (HsStringPrim _ x2) = x1==x2-  (HsInt _ x1)        == (HsInt _ x2)        = x1==x2-  (HsIntPrim _ x1)    == (HsIntPrim _ x2)    = x1==x2-  (HsWordPrim _ x1)   == (HsWordPrim _ x2)   = x1==x2-  (HsInt64Prim _ x1)  == (HsInt64Prim _ x2)  = x1==x2-  (HsWord64Prim _ x1) == (HsWord64Prim _ x2) = x1==x2-  (HsInteger _ x1 _)  == (HsInteger _ x2 _)  = x1==x2-  (HsRat _ x1 _)      == (HsRat _ x2 _)      = x1==x2-  (HsFloatPrim _ x1)  == (HsFloatPrim _ x2)  = x1==x2-  (HsDoublePrim _ x1) == (HsDoublePrim _ x2) = x1==x2-  _                   == _                   = False---- | Haskell Overloaded Literal-data HsOverLit p-  = OverLit {-      ol_ext :: (XOverLit p),-      ol_val :: OverLitVal,-      ol_witness :: HsExpr p}         -- Note [Overloaded literal witnesses]--  | XOverLit-      (XXOverLit p)--data OverLitTc-  = OverLitTc {-        ol_rebindable :: Bool, -- Note [ol_rebindable]-        ol_type :: Type }-  deriving Data--type instance XOverLit GhcPs = NoExt-type instance XOverLit GhcRn = Bool            -- Note [ol_rebindable]-type instance XOverLit GhcTc = OverLitTc--type instance XXOverLit (GhcPass _) = NoExt---- Note [Literal source text] in BasicTypes for SourceText fields in--- the following--- | Overloaded Literal Value-data OverLitVal-  = HsIntegral   !IntegralLit            -- ^ Integer-looking literals;-  | HsFractional !FractionalLit          -- ^ Frac-looking literals-  | HsIsString   !SourceText !FastString -- ^ String-looking literals-  deriving Data--negateOverLitVal :: OverLitVal -> OverLitVal-negateOverLitVal (HsIntegral i) = HsIntegral (negateIntegralLit i)-negateOverLitVal (HsFractional f) = HsFractional (negateFractionalLit f)-negateOverLitVal _ = panic "negateOverLitVal: argument is not a number"--overLitType :: HsOverLit GhcTc -> Type-overLitType (OverLit (OverLitTc _ ty) _ _) = ty-overLitType XOverLit{} = panic "overLitType"---- | Convert a literal from one index type to another, updating the annotations--- according to the relevant 'Convertable' instance-convertLit :: (ConvertIdX a b) => HsLit a -> HsLit b-convertLit (HsChar a x)       = (HsChar (convert a) x)-convertLit (HsCharPrim a x)   = (HsCharPrim (convert a) x)-convertLit (HsString a x)     = (HsString (convert a) x)-convertLit (HsStringPrim a x) = (HsStringPrim (convert a) x)-convertLit (HsInt a x)        = (HsInt (convert a) x)-convertLit (HsIntPrim a x)    = (HsIntPrim (convert a) x)-convertLit (HsWordPrim a x)   = (HsWordPrim (convert a) x)-convertLit (HsInt64Prim a x)  = (HsInt64Prim (convert a) x)-convertLit (HsWord64Prim a x) = (HsWord64Prim (convert a) x)-convertLit (HsInteger a x b)  = (HsInteger (convert a) x b)-convertLit (HsRat a x b)      = (HsRat (convert a) x b)-convertLit (HsFloatPrim a x)  = (HsFloatPrim (convert a) x)-convertLit (HsDoublePrim a x) = (HsDoublePrim (convert a) x)-convertLit (XLit a)           = (XLit (convert a))--{--Note [ol_rebindable]-~~~~~~~~~~~~~~~~~~~~-The ol_rebindable field is True if this literal is actually-using rebindable syntax.  Specifically:--  False iff ol_witness is the standard one-  True  iff ol_witness is non-standard--Equivalently it's True if-  a) RebindableSyntax is on-  b) the witness for fromInteger/fromRational/fromString-     that happens to be in scope isn't the standard one--Note [Overloaded literal witnesses]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-*Before* type checking, the HsExpr in an HsOverLit is the-name of the coercion function, 'fromInteger' or 'fromRational'.-*After* type checking, it is a witness for the literal, such as-        (fromInteger 3) or lit_78-This witness should replace the literal.--This dual role is unusual, because we're replacing 'fromInteger' with-a call to fromInteger.  Reason: it allows commoning up of the fromInteger-calls, which wouldn't be possible if the desugarer made the application.--The PostTcType in each branch records the type the overload literal is-found to have.--}---- Comparison operations are needed when grouping literals--- for compiling pattern-matching (module MatchLit)-instance (Eq (XXOverLit p)) => Eq (HsOverLit p) where-  (OverLit _ val1 _) == (OverLit _ val2 _) = val1 == val2-  (XOverLit  val1)   == (XOverLit  val2)   = val1 == val2-  _ == _ = panic "Eq HsOverLit"--instance Eq OverLitVal where-  (HsIntegral   i1)   == (HsIntegral   i2)   = i1 == i2-  (HsFractional f1)   == (HsFractional f2)   = f1 == f2-  (HsIsString _ s1)   == (HsIsString _ s2)   = s1 == s2-  _                   == _                   = False--instance (Ord (XXOverLit p)) => Ord (HsOverLit p) where-  compare (OverLit _ val1 _) (OverLit _ val2 _) = val1 `compare` val2-  compare (XOverLit  val1)   (XOverLit  val2)   = val1 `compare` val2-  compare _ _ = panic "Ord HsOverLit"--instance Ord OverLitVal where-  compare (HsIntegral i1)     (HsIntegral i2)     = i1 `compare` i2-  compare (HsIntegral _)      (HsFractional _)    = LT-  compare (HsIntegral _)      (HsIsString _ _)    = LT-  compare (HsFractional f1)   (HsFractional f2)   = f1 `compare` f2-  compare (HsFractional _)    (HsIntegral   _)    = GT-  compare (HsFractional _)    (HsIsString _ _)    = LT-  compare (HsIsString _ s1)   (HsIsString _ s2)   = s1 `compare` s2-  compare (HsIsString _ _)    (HsIntegral   _)    = GT-  compare (HsIsString _ _)    (HsFractional _)    = GT---- Instance specific to GhcPs, need the SourceText-instance p ~ GhcPass pass => Outputable (HsLit p) where-    ppr (HsChar st c)       = pprWithSourceText st (pprHsChar c)-    ppr (HsCharPrim st c)   = pp_st_suffix st primCharSuffix (pprPrimChar c)-    ppr (HsString st s)     = pprWithSourceText st (pprHsString s)-    ppr (HsStringPrim st s) = pprWithSourceText st (pprHsBytes s)-    ppr (HsInt _ i)-      = pprWithSourceText (il_text i) (integer (il_value i))-    ppr (HsInteger st i _)  = pprWithSourceText st (integer i)-    ppr (HsRat _ f _)       = ppr f-    ppr (HsFloatPrim _ f)   = ppr f <> primFloatSuffix-    ppr (HsDoublePrim _ d)  = ppr d <> primDoubleSuffix-    ppr (HsIntPrim st i)    = pprWithSourceText st (pprPrimInt i)-    ppr (HsWordPrim st w)   = pprWithSourceText st (pprPrimWord w)-    ppr (HsInt64Prim st i)  = pp_st_suffix st primInt64Suffix  (pprPrimInt64 i)-    ppr (HsWord64Prim st w) = pp_st_suffix st primWord64Suffix (pprPrimWord64 w)-    ppr (XLit x) = ppr x--pp_st_suffix :: SourceText -> SDoc -> SDoc -> SDoc-pp_st_suffix NoSourceText         _ doc = doc-pp_st_suffix (SourceText st) suffix _   = text st <> suffix---- in debug mode, print the expression that it's resolved to, too-instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (HsOverLit p) where-  ppr (OverLit {ol_val=val, ol_witness=witness})-        = ppr val <+> (whenPprDebug (parens (pprExpr witness)))-  ppr (XOverLit x) = ppr x--instance Outputable OverLitVal where-  ppr (HsIntegral i)     = pprWithSourceText (il_text i) (integer (il_value i))-  ppr (HsFractional f)   = ppr f-  ppr (HsIsString st s)  = pprWithSourceText st (pprHsString s)---- | pmPprHsLit pretty prints literals and is used when pretty printing pattern--- match warnings. All are printed the same (i.e., without hashes if they are--- primitive and not wrapped in constructors if they are boxed). This happens--- mainly for too reasons:---  * We do not want to expose their internal representation---  * The warnings become too messy-pmPprHsLit :: HsLit (GhcPass x) -> SDoc-pmPprHsLit (HsChar _ c)       = pprHsChar c-pmPprHsLit (HsCharPrim _ c)   = pprHsChar c-pmPprHsLit (HsString st s)    = pprWithSourceText st (pprHsString s)-pmPprHsLit (HsStringPrim _ s) = pprHsBytes s-pmPprHsLit (HsInt _ i)        = integer (il_value i)-pmPprHsLit (HsIntPrim _ i)    = integer i-pmPprHsLit (HsWordPrim _ w)   = integer w-pmPprHsLit (HsInt64Prim _ i)  = integer i-pmPprHsLit (HsWord64Prim _ w) = integer w-pmPprHsLit (HsInteger _ i _)  = integer i-pmPprHsLit (HsRat _ f _)      = ppr f-pmPprHsLit (HsFloatPrim _ f)  = ppr f-pmPprHsLit (HsDoublePrim _ d) = ppr d-pmPprHsLit (XLit x)           = ppr x---- | @'hsLitNeedsParens' p l@ returns 'True' if a literal @l@ needs--- to be parenthesized under precedence @p@.-hsLitNeedsParens :: PprPrec -> HsLit x -> Bool-hsLitNeedsParens p = go-  where-    go (HsChar {})        = False-    go (HsCharPrim {})    = False-    go (HsString {})      = False-    go (HsStringPrim {})  = False-    go (HsInt _ x)        = p > topPrec && il_neg x-    go (HsIntPrim _ x)    = p > topPrec && x < 0-    go (HsWordPrim {})    = False-    go (HsInt64Prim _ x)  = p > topPrec && x < 0-    go (HsWord64Prim {})  = False-    go (HsInteger _ x _)  = p > topPrec && x < 0-    go (HsRat _ x _)      = p > topPrec && fl_neg x-    go (HsFloatPrim _ x)  = p > topPrec && fl_neg x-    go (HsDoublePrim _ x) = p > topPrec && fl_neg x-    go (XLit _)           = False---- | @'hsOverLitNeedsParens' p ol@ returns 'True' if an overloaded literal--- @ol@ needs to be parenthesized under precedence @p@.-hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool-hsOverLitNeedsParens p (OverLit { ol_val = olv }) = go olv-  where-    go :: OverLitVal -> Bool-    go (HsIntegral x)   = p > topPrec && il_neg x-    go (HsFractional x) = p > topPrec && fl_neg x-    go (HsIsString {})  = False-hsOverLitNeedsParens _ (XOverLit { }) = False
− hsSyn/HsPat.hs
@@ -1,846 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--\section[PatSyntax]{Abstract Haskell syntax---patterns}--}--{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveFunctor #-}-{-# LANGUAGE DeriveFoldable #-}-{-# LANGUAGE DeriveTraversable #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE ViewPatterns      #-}-{-# LANGUAGE FlexibleInstances #-}--module HsPat (-        Pat(..), InPat, OutPat, LPat,-        ListPatTc(..),--        HsConPatDetails, hsConPatArgs,-        HsRecFields(..), HsRecField'(..), LHsRecField',-        HsRecField, LHsRecField,-        HsRecUpdField, LHsRecUpdField,-        hsRecFields, hsRecFieldSel, hsRecFieldId, hsRecFieldsArgs,-        hsRecUpdFieldId, hsRecUpdFieldOcc, hsRecUpdFieldRdr,--        mkPrefixConPat, mkCharLitPat, mkNilPat,--        looksLazyPatBind,-        isBangedLPat,-        patNeedsParens, parenthesizePat,-        isIrrefutableHsPat,--        collectEvVarsPat, collectEvVarsPats,--        pprParendLPat, pprConArgs-    ) where--import GhcPrelude--import {-# SOURCE #-} HsExpr            (SyntaxExpr, LHsExpr, HsSplice, pprLExpr, pprSplice)---- friends:-import HsBinds-import HsLit-import HsExtension-import HsTypes-import TcEvidence-import BasicTypes--- others:-import PprCore          ( {- instance OutputableBndr TyVar -} )-import TysWiredIn-import Var-import RdrName ( RdrName )-import ConLike-import DataCon-import TyCon-import Outputable-import Type-import SrcLoc-import Bag -- collect ev vars from pats-import DynFlags( gopt, GeneralFlag(..) )-import Maybes--- libraries:-import Data.Data hiding (TyCon,Fixity)--type InPat p  = LPat p        -- No 'Out' constructors-type OutPat p = LPat p        -- No 'In' constructors--type LPat p = Pat p---- | Pattern------ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnBang'---- For details on above see note [Api annotations] in ApiAnnotation-data Pat p-  =     ------------ Simple patterns ----------------    WildPat     (XWildPat p)        -- ^ Wildcard Pattern-        -- The sole reason for a type on a WildPat is to-        -- support hsPatType :: Pat Id -> Type--       -- AZ:TODO above comment needs to be updated-  | VarPat      (XVarPat p)-                (Located (IdP p))  -- ^ Variable Pattern--                             -- See Note [Located RdrNames] in HsExpr-  | LazyPat     (XLazyPat p)-                (LPat p)                -- ^ Lazy Pattern-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnTilde'--    -- For details on above see note [Api annotations] in ApiAnnotation--  | AsPat       (XAsPat p)-                (Located (IdP p)) (LPat p)    -- ^ As pattern-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnAt'--    -- For details on above see note [Api annotations] in ApiAnnotation--  | ParPat      (XParPat p)-                (LPat p)                -- ^ Parenthesised pattern-                                        -- See Note [Parens in HsSyn] in HsExpr-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,-    --                                    'ApiAnnotation.AnnClose' @')'@--    -- For details on above see note [Api annotations] in ApiAnnotation-  | BangPat     (XBangPat p)-                (LPat p)                -- ^ Bang pattern-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnBang'--    -- For details on above see note [Api annotations] in ApiAnnotation--        ------------ Lists, tuples, arrays ----------------  | ListPat     (XListPat p)-                [LPat p]-                   -- For OverloadedLists a Just (ty,fn) gives-                   -- overall type of the pattern, and the toList--- function to convert the scrutinee to a list value--    -- ^ Syntactic List-    ---    -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,-    --                                    'ApiAnnotation.AnnClose' @']'@--    -- For details on above see note [Api annotations] in ApiAnnotation--  | TuplePat    (XTuplePat p)-                  -- after typechecking, holds the types of the tuple components-                [LPat p]         -- Tuple sub-patterns-                Boxity           -- UnitPat is TuplePat []-        -- You might think that the post typechecking Type was redundant,-        -- because we can get the pattern type by getting the types of the-        -- sub-patterns.-        -- But it's essential-        --      data T a where-        --        T1 :: Int -> T Int-        --      f :: (T a, a) -> Int-        --      f (T1 x, z) = z-        -- When desugaring, we must generate-        --      f = /\a. \v::a.  case v of (t::T a, w::a) ->-        --                       case t of (T1 (x::Int)) ->-        -- Note the (w::a), NOT (w::Int), because we have not yet-        -- refined 'a' to Int.  So we must know that the second component-        -- of the tuple is of type 'a' not Int.  See selectMatchVar-        -- (June 14: I'm not sure this comment is right; the sub-patterns-        --           will be wrapped in CoPats, no?)-    -- ^ Tuple sub-patterns-    ---    -- - 'ApiAnnotation.AnnKeywordId' :-    --            'ApiAnnotation.AnnOpen' @'('@ or @'(#'@,-    --            'ApiAnnotation.AnnClose' @')'@ or  @'#)'@--  | SumPat      (XSumPat p)        -- PlaceHolder before typechecker, filled in-                                   -- afterwards with the types of the-                                   -- alternative-                (LPat p)           -- Sum sub-pattern-                ConTag             -- Alternative (one-based)-                Arity              -- Arity (INVARIANT: ≥ 2)-    -- ^ Anonymous sum pattern-    ---    -- - 'ApiAnnotation.AnnKeywordId' :-    --            'ApiAnnotation.AnnOpen' @'(#'@,-    --            'ApiAnnotation.AnnClose' @'#)'@--    -- For details on above see note [Api annotations] in ApiAnnotation--        ------------ Constructor patterns ----------------  | ConPatIn    (Located (IdP p))-                (HsConPatDetails p)-    -- ^ Constructor Pattern In--  | ConPatOut {-        pat_con     :: Located ConLike,-        pat_arg_tys :: [Type],          -- The universal arg types, 1-1 with the universal-                                        -- tyvars of the constructor/pattern synonym-                                        --   Use (conLikeResTy pat_con pat_arg_tys) to get-                                        --   the type of the pattern--        pat_tvs   :: [TyVar],           -- Existentially bound type variables-                                        -- in correctly-scoped order e.g. [k:*, x:k]-        pat_dicts :: [EvVar],           -- Ditto *coercion variables* and *dictionaries*-                                        -- One reason for putting coercion variable here, I think,-                                        --      is to ensure their kinds are zonked--        pat_binds :: TcEvBinds,         -- Bindings involving those dictionaries-        pat_args  :: HsConPatDetails p,-        pat_wrap  :: HsWrapper          -- Extra wrapper to pass to the matcher-                                        -- Only relevant for pattern-synonyms;-                                        --   ignored for data cons-    }-    -- ^ Constructor Pattern Out--        ------------ View patterns ----------------  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ViewPat       (XViewPat p)     -- The overall type of the pattern-                                   -- (= the argument type of the view function)-                                   -- for hsPatType.-                  (LHsExpr p)-                  (LPat p)-    -- ^ View Pattern--        ------------ Pattern splices ----------------  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'$('@-  --        'ApiAnnotation.AnnClose' @')'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | SplicePat       (XSplicePat p)-                    (HsSplice p)    -- ^ Splice Pattern (Includes quasi-quotes)--        ------------ Literal and n+k patterns ----------------  | LitPat          (XLitPat p)-                    (HsLit p)           -- ^ Literal Pattern-                                        -- Used for *non-overloaded* literal patterns:-                                        -- Int#, Char#, Int, Char, String, etc.--  | NPat                -- Natural Pattern-                        -- Used for all overloaded literals,-                        -- including overloaded strings with -XOverloadedStrings-                    (XNPat p)            -- Overall type of pattern. Might be-                                         -- different than the literal's type-                                         -- if (==) or negate changes the type-                    (Located (HsOverLit p))     -- ALWAYS positive-                    (Maybe (SyntaxExpr p)) -- Just (Name of 'negate') for-                                           -- negative patterns, Nothing-                                           -- otherwise-                    (SyntaxExpr p)       -- Equality checker, of type t->t->Bool--  -- ^ Natural Pattern-  ---  -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnVal' @'+'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | NPlusKPat       (XNPlusKPat p)           -- Type of overall pattern-                    (Located (IdP p))        -- n+k pattern-                    (Located (HsOverLit p))  -- It'll always be an HsIntegral-                    (HsOverLit p)       -- See Note [NPlusK patterns] in TcPat-                     -- NB: This could be (PostTc ...), but that induced a-                     -- a new hs-boot file. Not worth it.--                    (SyntaxExpr p)   -- (>=) function, of type t1->t2->Bool-                    (SyntaxExpr p)   -- Name of '-' (see RnEnv.lookupSyntaxName)-  -- ^ n+k pattern--        ------------ Pattern type signatures ----------------  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | SigPat          (XSigPat p)             -- After typechecker: Type-                    (LPat p)                -- Pattern with a type signature-                    (LHsSigWcType (NoGhcTc p)) --  Signature can bind both-                                               --  kind and type vars--    -- ^ Pattern with a type signature--        ------------ Pattern coercions (translation only) ----------------  | CoPat       (XCoPat p)-                HsWrapper           -- Coercion Pattern-                                    -- If co :: t1 ~ t2, p :: t2,-                                    -- then (CoPat co p) :: t1-                (Pat p)             -- Why not LPat?  Ans: existing locn will do-                Type                -- Type of whole pattern, t1-        -- During desugaring a (CoPat co pat) turns into a cast with 'co' on-        -- the scrutinee, followed by a match on 'pat'-    -- ^ Coercion Pattern--  -- | Trees that Grow extension point for new constructors-  | XPat-      (XXPat p)---- -----------------------------------------------------------------------data ListPatTc-  = ListPatTc-      Type                             -- The type of the elements-      (Maybe (Type, SyntaxExpr GhcTc)) -- For rebindable syntax--type instance XWildPat GhcPs = NoExt-type instance XWildPat GhcRn = NoExt-type instance XWildPat GhcTc = Type--type instance XVarPat  (GhcPass _) = NoExt-type instance XLazyPat (GhcPass _) = NoExt-type instance XAsPat   (GhcPass _) = NoExt-type instance XParPat  (GhcPass _) = NoExt-type instance XBangPat (GhcPass _) = NoExt---- Note: XListPat cannot be extended when using GHC 8.0.2 as the bootstrap--- compiler, as it triggers https://ghc.haskell.org/trac/ghc/ticket/14396 for--- `SyntaxExpr`-type instance XListPat GhcPs = NoExt-type instance XListPat GhcRn = Maybe (SyntaxExpr GhcRn)-type instance XListPat GhcTc = ListPatTc--type instance XTuplePat GhcPs = NoExt-type instance XTuplePat GhcRn = NoExt-type instance XTuplePat GhcTc = [Type]--type instance XSumPat GhcPs = NoExt-type instance XSumPat GhcRn = NoExt-type instance XSumPat GhcTc = [Type]--type instance XViewPat GhcPs = NoExt-type instance XViewPat GhcRn = NoExt-type instance XViewPat GhcTc = Type--type instance XSplicePat (GhcPass _) = NoExt-type instance XLitPat    (GhcPass _) = NoExt--type instance XNPat GhcPs = NoExt-type instance XNPat GhcRn = NoExt-type instance XNPat GhcTc = Type--type instance XNPlusKPat GhcPs = NoExt-type instance XNPlusKPat GhcRn = NoExt-type instance XNPlusKPat GhcTc = Type--type instance XSigPat GhcPs = NoExt-type instance XSigPat GhcRn = NoExt-type instance XSigPat GhcTc = Type--type instance XCoPat  (GhcPass _) = NoExt-type instance XXPat   (GhcPass p) = Located (Pat (GhcPass p))---{--************************************************************************-*                                                                      *-*              HasSrcSpan Instance-*                                                                      *-************************************************************************--}--type instance SrcSpanLess (LPat (GhcPass p)) = Pat (GhcPass p)-instance HasSrcSpan (LPat (GhcPass p)) where-  -- NB: The following chooses the behaviour of the outer location-  --     wrapper replacing the inner ones.-  composeSrcSpan (L sp p) =  if sp == noSrcSpan-                             then p-                             else XPat (L sp (stripSrcSpanPat p))--  -- NB: The following only returns the top-level location, if any.-  decomposeSrcSpan (XPat (L sp p)) = L sp (stripSrcSpanPat p)-  decomposeSrcSpan p               = L noSrcSpan p--stripSrcSpanPat :: LPat (GhcPass p) -> Pat (GhcPass p)-stripSrcSpanPat (XPat (L _  p)) = stripSrcSpanPat p-stripSrcSpanPat p               = p------ -------------------------------------------------------------------------- | Haskell Constructor Pattern Details-type HsConPatDetails p = HsConDetails (LPat p) (HsRecFields p (LPat p))--hsConPatArgs :: HsConPatDetails p -> [LPat p]-hsConPatArgs (PrefixCon ps)   = ps-hsConPatArgs (RecCon fs)      = map (hsRecFieldArg . unLoc) (rec_flds fs)-hsConPatArgs (InfixCon p1 p2) = [p1,p2]---- | Haskell Record Fields------ HsRecFields is used only for patterns and expressions (not data type--- declarations)-data HsRecFields p arg         -- A bunch of record fields-                                --      { x = 3, y = True }-        -- Used for both expressions and patterns-  = HsRecFields { rec_flds   :: [LHsRecField p arg],-                  rec_dotdot :: Maybe Int }  -- Note [DotDot fields]-  deriving (Functor, Foldable, Traversable)----- Note [DotDot fields]--- ~~~~~~~~~~~~~~~~~~~~--- The rec_dotdot field means this:---   Nothing => the normal case---   Just n  => the group uses ".." notation,------ In the latter case:------   *before* renamer: rec_flds are exactly the n user-written fields------   *after* renamer:  rec_flds includes *all* fields, with---                     the first 'n' being the user-written ones---                     and the remainder being 'filled in' implicitly---- | Located Haskell Record Field-type LHsRecField' p arg = Located (HsRecField' p arg)---- | Located Haskell Record Field-type LHsRecField  p arg = Located (HsRecField  p arg)---- | Located Haskell Record Update Field-type LHsRecUpdField p   = Located (HsRecUpdField p)---- | Haskell Record Field-type HsRecField    p arg = HsRecField' (FieldOcc p) arg---- | Haskell Record Update Field-type HsRecUpdField p     = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p)---- | Haskell Record Field------ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual',------ For details on above see note [Api annotations] in ApiAnnotation-data HsRecField' id arg = HsRecField {-        hsRecFieldLbl :: Located id,-        hsRecFieldArg :: arg,           -- ^ Filled in by renamer when punning-        hsRecPun      :: Bool           -- ^ Note [Punning]-  } deriving (Data, Functor, Foldable, Traversable)----- Note [Punning]--- ~~~~~~~~~~~~~~--- If you write T { x, y = v+1 }, the HsRecFields will be---      HsRecField x x True ...---      HsRecField y (v+1) False ...--- That is, for "punned" field x is expanded (in the renamer)--- to x=x; but with a punning flag so we can detect it later--- (e.g. when pretty printing)------ If the original field was qualified, we un-qualify it, thus---    T { A.x } means T { A.x = x }----- Note [HsRecField and HsRecUpdField]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~---- A HsRecField (used for record construction and pattern matching)--- contains an unambiguous occurrence of a field (i.e. a FieldOcc).--- We can't just store the Name, because thanks to--- DuplicateRecordFields this may not correspond to the label the user--- wrote.------ A HsRecUpdField (used for record update) contains a potentially--- ambiguous occurrence of a field (an AmbiguousFieldOcc).  The--- renamer will fill in the selector function if it can, but if the--- selector is ambiguous the renamer will defer to the typechecker.--- After the typechecker, a unique selector will have been determined.------ The renamer produces an Unambiguous result if it can, rather than--- just doing the lookup in the typechecker, so that completely--- unambiguous updates can be represented by 'DsMeta.repUpdFields'.------ For example, suppose we have:------     data S = MkS { x :: Int }---     data T = MkT { x :: Int }------     f z = (z { x = 3 }) :: S------ The parsed HsRecUpdField corresponding to the record update will have:------     hsRecFieldLbl = Unambiguous "x" NoExt :: AmbiguousFieldOcc RdrName------ After the renamer, this will become:------     hsRecFieldLbl = Ambiguous   "x" NoExt :: AmbiguousFieldOcc Name------ (note that the Unambiguous constructor is not type-correct here).--- The typechecker will determine the particular selector:------     hsRecFieldLbl = Unambiguous "x" $sel:x:MkS  :: AmbiguousFieldOcc Id------ See also Note [Disambiguating record fields] in TcExpr.--hsRecFields :: HsRecFields p arg -> [XCFieldOcc p]-hsRecFields rbinds = map (unLoc . hsRecFieldSel . unLoc) (rec_flds rbinds)---- Probably won't typecheck at once, things have changed :/-hsRecFieldsArgs :: HsRecFields p arg -> [arg]-hsRecFieldsArgs rbinds = map (hsRecFieldArg . unLoc) (rec_flds rbinds)--hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)-hsRecFieldSel = fmap extFieldOcc . hsRecFieldLbl--hsRecFieldId :: HsRecField GhcTc arg -> Located Id-hsRecFieldId = hsRecFieldSel--hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName-hsRecUpdFieldRdr = fmap rdrNameAmbiguousFieldOcc . hsRecFieldLbl--hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id-hsRecUpdFieldId = fmap extFieldOcc . hsRecUpdFieldOcc--hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc-hsRecUpdFieldOcc = fmap unambiguousFieldOcc . hsRecFieldLbl---{--************************************************************************-*                                                                      *-*              Printing patterns-*                                                                      *-************************************************************************--}--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (Pat p) where-    ppr = pprPat--pprPatBndr :: OutputableBndr name => name -> SDoc-pprPatBndr var                  -- Print with type info if -dppr-debug is on-  = getPprStyle $ \ sty ->-    if debugStyle sty then-        parens (pprBndr LambdaBind var)         -- Could pass the site to pprPat-                                                -- but is it worth it?-    else-        pprPrefixOcc var--pprParendLPat :: (OutputableBndrId (GhcPass p))-              => PprPrec -> LPat (GhcPass p) -> SDoc-pprParendLPat p = pprParendPat p . unLoc--pprParendPat :: (OutputableBndrId (GhcPass p))-             => PprPrec -> Pat (GhcPass p) -> SDoc-pprParendPat p pat = sdocWithDynFlags $ \ dflags ->-                     if need_parens dflags pat-                     then parens (pprPat pat)-                     else  pprPat pat-  where-    need_parens dflags pat-      | CoPat {} <- pat = gopt Opt_PrintTypecheckerElaboration dflags-      | otherwise       = patNeedsParens p pat-      -- For a CoPat we need parens if we are going to show it, which-      -- we do if -fprint-typechecker-elaboration is on (c.f. pprHsWrapper)-      -- But otherwise the CoPat is discarded, so it-      -- is the pattern inside that matters.  Sigh.--pprPat :: (OutputableBndrId (GhcPass p)) => Pat (GhcPass p) -> SDoc-pprPat (VarPat _ lvar)          = pprPatBndr (unLoc lvar)-pprPat (WildPat _)              = char '_'-pprPat (LazyPat _ pat)          = char '~' <> pprParendLPat appPrec pat-pprPat (BangPat _ pat)          = char '!' <> pprParendLPat appPrec pat-pprPat (AsPat _ name pat)       = hcat [pprPrefixOcc (unLoc name), char '@',-                                        pprParendLPat appPrec pat]-pprPat (ViewPat _ expr pat)     = hcat [pprLExpr expr, text " -> ", ppr pat]-pprPat (ParPat _ pat)           = parens (ppr pat)-pprPat (LitPat _ s)             = ppr s-pprPat (NPat _ l Nothing  _)    = ppr l-pprPat (NPat _ l (Just _) _)    = char '-' <> ppr l-pprPat (NPlusKPat _ n k _ _ _)  = hcat [ppr n, char '+', ppr k]-pprPat (SplicePat _ splice)     = pprSplice splice-pprPat (CoPat _ co pat _)       = pprHsWrapper co $ \parens-                                            -> if parens-                                                 then pprParendPat appPrec pat-                                                 else pprPat pat-pprPat (SigPat _ pat ty)        = ppr pat <+> dcolon <+> ppr ty-pprPat (ListPat _ pats)         = brackets (interpp'SP pats)-pprPat (TuplePat _ pats bx)     = tupleParens (boxityTupleSort bx)-                                              (pprWithCommas ppr pats)-pprPat (SumPat _ pat alt arity) = sumParens (pprAlternative ppr pat alt arity)-pprPat (ConPatIn con details)   = pprUserCon (unLoc con) details-pprPat (ConPatOut { pat_con = con-                  , pat_tvs = tvs-                  , pat_dicts = dicts-                  , pat_binds = binds-                  , pat_args = details })-  = sdocWithDynFlags $ \dflags ->-       -- Tiresome; in TcBinds.tcRhs we print out a-       -- typechecked Pat in an error message,-       -- and we want to make sure it prints nicely-    if gopt Opt_PrintTypecheckerElaboration dflags then-        ppr con-          <> braces (sep [ hsep (map pprPatBndr (tvs ++ dicts))-                         , ppr binds])-          <+> pprConArgs details-    else pprUserCon (unLoc con) details-pprPat (XPat x)               = ppr x---pprUserCon :: (OutputableBndr con, OutputableBndrId (GhcPass p))-           => con -> HsConPatDetails (GhcPass p) -> SDoc-pprUserCon c (InfixCon p1 p2) = ppr p1 <+> pprInfixOcc c <+> ppr p2-pprUserCon c details          = pprPrefixOcc c <+> pprConArgs details--pprConArgs :: (OutputableBndrId (GhcPass p))-           => HsConPatDetails (GhcPass p) -> SDoc-pprConArgs (PrefixCon pats) = sep (map (pprParendLPat appPrec) pats)-pprConArgs (InfixCon p1 p2) = sep [ pprParendLPat appPrec p1-                                  , pprParendLPat appPrec p2 ]-pprConArgs (RecCon rpats)   = ppr rpats--instance (Outputable arg)-      => Outputable (HsRecFields p arg) where-  ppr (HsRecFields { rec_flds = flds, rec_dotdot = Nothing })-        = braces (fsep (punctuate comma (map ppr flds)))-  ppr (HsRecFields { rec_flds = flds, rec_dotdot = Just n })-        = braces (fsep (punctuate comma (map ppr (take n flds) ++ [dotdot])))-        where-          dotdot = text ".." <+> whenPprDebug (ppr (drop n flds))--instance (Outputable p, Outputable arg)-      => Outputable (HsRecField' p arg) where-  ppr (HsRecField { hsRecFieldLbl = f, hsRecFieldArg = arg,-                    hsRecPun = pun })-    = ppr f <+> (ppUnless pun $ equals <+> ppr arg)---{--************************************************************************-*                                                                      *-*              Building patterns-*                                                                      *-************************************************************************--}--mkPrefixConPat :: DataCon ->-                  [OutPat (GhcPass p)] -> [Type] -> OutPat (GhcPass p)--- Make a vanilla Prefix constructor pattern-mkPrefixConPat dc pats tys-  = noLoc $ ConPatOut { pat_con = noLoc (RealDataCon dc)-                      , pat_tvs = []-                      , pat_dicts = []-                      , pat_binds = emptyTcEvBinds-                      , pat_args = PrefixCon pats-                      , pat_arg_tys = tys-                      , pat_wrap = idHsWrapper }--mkNilPat :: Type -> OutPat (GhcPass p)-mkNilPat ty = mkPrefixConPat nilDataCon [] [ty]--mkCharLitPat :: SourceText -> Char -> OutPat (GhcPass p)-mkCharLitPat src c = mkPrefixConPat charDataCon-                          [noLoc $ LitPat NoExt (HsCharPrim src c)] []--{--************************************************************************-*                                                                      *-* Predicates for checking things about pattern-lists in EquationInfo   *-*                                                                      *-************************************************************************--\subsection[Pat-list-predicates]{Look for interesting things in patterns}--Unlike in the Wadler chapter, where patterns are either ``variables''-or ``constructors,'' here we distinguish between:-\begin{description}-\item[unfailable:]-Patterns that cannot fail to match: variables, wildcards, and lazy-patterns.--These are the irrefutable patterns; the two other categories-are refutable patterns.--\item[constructor:]-A non-literal constructor pattern (see next category).--\item[literal patterns:]-At least the numeric ones may be overloaded.-\end{description}--A pattern is in {\em exactly one} of the above three categories; `as'-patterns are treated specially, of course.--The 1.3 report defines what ``irrefutable'' and ``failure-free'' patterns are.--}--isBangedLPat :: LPat (GhcPass p) -> Bool-isBangedLPat = isBangedPat . unLoc--isBangedPat :: Pat (GhcPass p) -> Bool-isBangedPat (ParPat _ p) = isBangedLPat p-isBangedPat (BangPat {}) = True-isBangedPat _            = False--looksLazyPatBind :: HsBind (GhcPass p) -> Bool--- Returns True of anything *except*---     a StrictHsBind (as above) or---     a VarPat--- In particular, returns True of a pattern binding with a compound pattern, like (I# x)--- Looks through AbsBinds-looksLazyPatBind (PatBind { pat_lhs = p })-  = looksLazyLPat p-looksLazyPatBind (AbsBinds { abs_binds = binds })-  = anyBag (looksLazyPatBind . unLoc) binds-looksLazyPatBind _-  = False--looksLazyLPat :: LPat (GhcPass p) -> Bool-looksLazyLPat = looksLazyPat . unLoc--looksLazyPat :: Pat (GhcPass p) -> Bool-looksLazyPat (ParPat _ p)  = looksLazyLPat p-looksLazyPat (AsPat _ _ p) = looksLazyLPat p-looksLazyPat (BangPat {})  = False-looksLazyPat (VarPat {})   = False-looksLazyPat (WildPat {})  = False-looksLazyPat _             = True--isIrrefutableHsPat :: (OutputableBndrId (GhcPass p)) => LPat (GhcPass p) -> Bool--- (isIrrefutableHsPat p) is true if matching against p cannot fail,--- in the sense of falling through to the next pattern.---      (NB: this is not quite the same as the (silly) defn---      in 3.17.2 of the Haskell 98 report.)------ WARNING: isIrrefutableHsPat returns False if it's in doubt.--- Specifically on a ConPatIn, which is what it sees for a--- (LPat Name) in the renamer, it doesn't know the size of the--- constructor family, so it returns False.  Result: only--- tuple patterns are considered irrefuable at the renamer stage.------ But if it returns True, the pattern is definitely irrefutable-isIrrefutableHsPat-  = goL-  where-    goL = go . unLoc--    go (WildPat {})        = True-    go (VarPat {})         = True-    go (LazyPat {})        = True-    go (BangPat _ pat)     = goL pat-    go (CoPat _ _ pat _)   = go  pat-    go (ParPat _ pat)      = goL pat-    go (AsPat _ _ pat)     = goL pat-    go (ViewPat _ _ pat)   = goL pat-    go (SigPat _ pat _)    = goL pat-    go (TuplePat _ pats _) = all goL pats-    go (SumPat {})         = False-                    -- See Note [Unboxed sum patterns aren't irrefutable]-    go (ListPat {})        = False--    go (ConPatIn {})       = False     -- Conservative-    go (ConPatOut-        { pat_con  = (dL->L _ (RealDataCon con))-        , pat_args = details })-                           =-      isJust (tyConSingleDataCon_maybe (dataConTyCon con))-      -- NB: tyConSingleDataCon_maybe, *not* isProductTyCon, because-      -- the latter is false of existentials. See Trac #4439-      && all goL (hsConPatArgs details)-    go (ConPatOut-        { pat_con = (dL->L _ (PatSynCon _pat)) })-                           = False -- Conservative-    go (ConPatOut{})       = panic "ConPatOut:Impossible Match" -- due to #15884-    go (LitPat {})         = False-    go (NPat {})           = False-    go (NPlusKPat {})      = False--    -- We conservatively assume that no TH splices are irrefutable-    -- since we cannot know until the splice is evaluated.-    go (SplicePat {})      = False--    go (XPat {})           = False--{- Note [Unboxed sum patterns aren't irrefutable]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Unlike unboxed tuples, unboxed sums are *not* irrefutable when used as-patterns. A simple example that demonstrates this is from #14228:--  pattern Just' x = (# x | #)-  pattern Nothing' = (# | () #)--  foo x = case x of-    Nothing' -> putStrLn "nothing"-    Just'    -> putStrLn "just"--In foo, the pattern Nothing' (that is, (# x | #)) is certainly not irrefutable,-as does not match an unboxed sum value of the same arity—namely, (# | y #)-(covered by Just'). In fact, no unboxed sum pattern is irrefutable, since the-minimum unboxed sum arity is 2.--Failing to mark unboxed sum patterns as non-irrefutable would cause the Just'-case in foo to be unreachable, as GHC would mistakenly believe that Nothing'-is the only thing that could possibly be matched!--}---- | @'patNeedsParens' p pat@ returns 'True' if the pattern @pat@ needs--- parentheses under precedence @p@.-patNeedsParens :: PprPrec -> Pat p -> Bool-patNeedsParens p = go-  where-    go (NPlusKPat {})    = p > opPrec-    go (SplicePat {})    = False-    go (ConPatIn _ ds)   = conPatNeedsParens p ds-    go cp@(ConPatOut {}) = conPatNeedsParens p (pat_args cp)-    go (SigPat {})       = p >= sigPrec-    go (ViewPat {})      = True-    go (CoPat _ _ p _)   = go p-    go (WildPat {})      = False-    go (VarPat {})       = False-    go (LazyPat {})      = False-    go (BangPat {})      = False-    go (ParPat {})       = False-    go (AsPat {})        = False-    go (TuplePat {})     = False-    go (SumPat {})       = False-    go (ListPat {})      = False-    go (LitPat _ l)      = hsLitNeedsParens p l-    go (NPat _ lol _ _)  = hsOverLitNeedsParens p (unLoc lol)-    go (XPat {})         = True -- conservative default---- | @'conPatNeedsParens' p cp@ returns 'True' if the constructor patterns @cp@--- needs parentheses under precedence @p@.-conPatNeedsParens :: PprPrec -> HsConDetails a b -> Bool-conPatNeedsParens p = go-  where-    go (PrefixCon args) = p >= appPrec && not (null args)-    go (InfixCon {})    = p >= opPrec-    go (RecCon {})      = False---- | @'parenthesizePat' p pat@ checks if @'patNeedsParens' p pat@ is true, and--- if so, surrounds @pat@ with a 'ParPat'. Otherwise, it simply returns @pat@.-parenthesizePat :: PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)-parenthesizePat p lpat@(dL->L loc pat)-  | patNeedsParens p pat = cL loc (ParPat NoExt lpat)-  | otherwise            = lpat--{--% Collect all EvVars from all constructor patterns--}---- May need to add more cases-collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar-collectEvVarsPats = unionManyBags . map collectEvVarsPat--collectEvVarsLPat :: LPat GhcTc -> Bag EvVar-collectEvVarsLPat = collectEvVarsPat . unLoc--collectEvVarsPat :: Pat GhcTc -> Bag EvVar-collectEvVarsPat pat =-  case pat of-    LazyPat _ p      -> collectEvVarsLPat p-    AsPat _ _ p      -> collectEvVarsLPat p-    ParPat  _ p      -> collectEvVarsLPat p-    BangPat _ p      -> collectEvVarsLPat p-    ListPat _ ps     -> unionManyBags $ map collectEvVarsLPat ps-    TuplePat _ ps _  -> unionManyBags $ map collectEvVarsLPat ps-    SumPat _ p _ _   -> collectEvVarsLPat p-    ConPatOut {pat_dicts = dicts, pat_args  = args}-                     -> unionBags (listToBag dicts)-                                   $ unionManyBags-                                   $ map collectEvVarsLPat-                                   $ hsConPatArgs args-    SigPat  _ p _    -> collectEvVarsLPat p-    CoPat _ _ p _    -> collectEvVarsPat  p-    ConPatIn _  _    -> panic "foldMapPatBag: ConPatIn"-    _other_pat       -> emptyBag
− hsSyn/HsPat.hs-boot
@@ -1,18 +0,0 @@-{-# LANGUAGE CPP, KindSignatures #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE RoleAnnotations #-}-{-# LANGUAGE TypeFamilies #-}--module HsPat where--import Outputable-import HsExtension      ( OutputableBndrId, GhcPass )--type role Pat nominal-data Pat (i :: *)-type LPat i = Pat i--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (Pat p)
− hsSyn/HsSyn.hs
@@ -1,153 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--\section{Haskell abstract syntax definition}--This module glues together the pieces of the Haskell abstract syntax,-which is declared in the various \tr{Hs*} modules.  This module,-therefore, is almost nothing but re-exporting.--}--{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE FlexibleInstances #-} -- For deriving instance Data--module HsSyn (-        module HsBinds,-        module HsDecls,-        module HsExpr,-        module HsImpExp,-        module HsLit,-        module HsPat,-        module HsTypes,-        module HsUtils,-        module HsDoc,-        module PlaceHolder,-        module HsExtension,-        Fixity,--        HsModule(..),-) where---- friends:-import GhcPrelude--import HsDecls-import HsBinds-import HsExpr-import HsImpExp-import HsLit-import PlaceHolder-import HsExtension-import HsPat-import HsTypes-import BasicTypes       ( Fixity, WarningTxt )-import HsUtils-import HsDoc-import HsInstances ()---- others:-import Outputable-import SrcLoc-import Module           ( ModuleName )---- libraries:-import Data.Data hiding ( Fixity )---- | Haskell Module------ All we actually declare here is the top-level structure for a module.-data HsModule pass-  = HsModule {-      hsmodName :: Maybe (Located ModuleName),-        -- ^ @Nothing@: \"module X where\" is omitted (in which case the next-        --     field is Nothing too)-      hsmodExports :: Maybe (Located [LIE pass]),-        -- ^ Export list-        ---        --  - @Nothing@: export list omitted, so export everything-        ---        --  - @Just []@: export /nothing/-        ---        --  - @Just [...]@: as you would expect...-        ---        ---        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen'-        --                                   ,'ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-      hsmodImports :: [LImportDecl pass],-        -- ^ We snaffle interesting stuff out of the imported interfaces early-        -- on, adding that info to TyDecls/etc; so this list is often empty,-        -- downstream.-      hsmodDecls :: [LHsDecl pass],-        -- ^ Type, class, value, and interface signature decls-      hsmodDeprecMessage :: Maybe (Located WarningTxt),-        -- ^ reason\/explanation for warning/deprecation of this module-        ---        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen'-        --                                   ,'ApiAnnotation.AnnClose'-        ----        -- For details on above see note [Api annotations] in ApiAnnotation-      hsmodHaddockModHeader :: Maybe LHsDocString-        -- ^ Haddock module info and description, unparsed-        ---        --  - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnOpen'-        --                                   ,'ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-   }-     -- ^ 'ApiAnnotation.AnnKeywordId's-     ---     --  - 'ApiAnnotation.AnnModule','ApiAnnotation.AnnWhere'-     ---     --  - 'ApiAnnotation.AnnOpen','ApiAnnotation.AnnSemi',-     --    'ApiAnnotation.AnnClose' for explicit braces and semi around-     --    hsmodImports,hsmodDecls if this style is used.--     -- For details on above see note [Api annotations] in ApiAnnotation--- deriving instance (DataIdLR name name) => Data (HsModule name)-deriving instance Data (HsModule GhcPs)-deriving instance Data (HsModule GhcRn)-deriving instance Data (HsModule GhcTc)--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsModule p) where--    ppr (HsModule Nothing _ imports decls _ mbDoc)-      = pp_mb mbDoc $$ pp_nonnull imports-                    $$ pp_nonnull decls--    ppr (HsModule (Just name) exports imports decls deprec mbDoc)-      = vcat [-            pp_mb mbDoc,-            case exports of-              Nothing -> pp_header (text "where")-              Just es -> vcat [-                           pp_header lparen,-                           nest 8 (fsep (punctuate comma (map ppr (unLoc es)))),-                           nest 4 (text ") where")-                          ],-            pp_nonnull imports,-            pp_nonnull decls-          ]-      where-        pp_header rest = case deprec of-           Nothing -> pp_modname <+> rest-           Just d -> vcat [ pp_modname, ppr d, rest ]--        pp_modname = text "module" <+> ppr name--pp_mb :: Outputable t => Maybe t -> SDoc-pp_mb (Just x) = ppr x-pp_mb Nothing  = empty--pp_nonnull :: Outputable t => [t] -> SDoc-pp_nonnull [] = empty-pp_nonnull xs = vcat (map ppr xs)
− hsSyn/HsTypes.hs
@@ -1,1584 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998---HsTypes: Abstract syntax: user-defined types--}--{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE TypeSynonymInstances #-}-{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE CPP #-}-{-# LANGUAGE TypeFamilies #-}--module HsTypes (-        HsType(..), NewHsTypeX(..), LHsType, HsKind, LHsKind,-        HsTyVarBndr(..), LHsTyVarBndr,-        LHsQTyVars(..), HsQTvsRn(..),-        HsImplicitBndrs(..),-        HsWildCardBndrs(..),-        LHsSigType, LHsSigWcType, LHsWcType,-        HsTupleSort(..),-        HsContext, LHsContext, noLHsContext,-        HsTyLit(..),-        HsIPName(..), hsIPNameFS,-        HsArg(..), numVisibleArgs,-        LHsTypeArg,--        LBangType, BangType,-        HsSrcBang(..), HsImplBang(..),-        SrcStrictness(..), SrcUnpackedness(..),-        getBangType, getBangStrictness,--        ConDeclField(..), LConDeclField, pprConDeclFields,--        HsConDetails(..),--        FieldOcc(..), LFieldOcc, mkFieldOcc,-        AmbiguousFieldOcc(..), mkAmbiguousFieldOcc,-        rdrNameAmbiguousFieldOcc, selectorAmbiguousFieldOcc,-        unambiguousFieldOcc, ambiguousFieldOcc,--        mkAnonWildCardTy, pprAnonWildCard,--        mkHsImplicitBndrs, mkHsWildCardBndrs, hsImplicitBody,-        mkEmptyImplicitBndrs, mkEmptyWildCardBndrs,-        mkHsQTvs, hsQTvExplicit, emptyLHsQTvs, isEmptyLHsQTvs,-        isHsKindedTyVar, hsTvbAllKinded, isLHsForAllTy,-        hsScopedTvs, hsWcScopedTvs, dropWildCards,-        hsTyVarName, hsAllLTyVarNames, hsLTyVarLocNames,-        hsLTyVarName, hsLTyVarLocName, hsExplicitLTyVarNames,-        splitLHsInstDeclTy, getLHsInstDeclHead, getLHsInstDeclClass_maybe,-        splitLHsPatSynTy,-        splitLHsForAllTy, splitLHsQualTy, splitLHsSigmaTy,-        splitHsFunType,-        splitHsAppTys, hsTyGetAppHead_maybe,-        mkHsOpTy, mkHsAppTy, mkHsAppTys, mkHsAppKindTy,-        ignoreParens, hsSigType, hsSigWcType,-        hsLTyVarBndrToType, hsLTyVarBndrsToTypes,--        -- Printing-        pprHsType, pprHsForAll, pprHsForAllExtra, pprHsExplicitForAll,-        pprLHsContext,-        hsTypeNeedsParens, parenthesizeHsType, parenthesizeHsContext-    ) where--import GhcPrelude--import {-# SOURCE #-} HsExpr ( HsSplice, pprSplice )--import HsExtension-import HsLit () -- for instances--import Id ( Id )-import Name( Name )-import RdrName ( RdrName )-import NameSet ( NameSet, emptyNameSet )-import DataCon( HsSrcBang(..), HsImplBang(..),-                SrcStrictness(..), SrcUnpackedness(..) )-import TysPrim( funTyConName )-import Type-import HsDoc-import BasicTypes-import SrcLoc-import Outputable-import FastString-import Maybes( isJust )-import Util ( count )--import Data.Data hiding ( Fixity, Prefix, Infix )--{--************************************************************************-*                                                                      *-\subsection{Bang annotations}-*                                                                      *-************************************************************************--}---- | Located Bang Type-type LBangType pass = Located (BangType pass)---- | Bang Type-type BangType pass  = HsType pass       -- Bangs are in the HsType data type--getBangType :: LHsType a -> LHsType a-getBangType (L _ (HsBangTy _ _ ty)) = ty-getBangType ty                      = ty--getBangStrictness :: LHsType a -> HsSrcBang-getBangStrictness (L _ (HsBangTy _ s _)) = s-getBangStrictness _ = (HsSrcBang NoSourceText NoSrcUnpack NoSrcStrict)--{--************************************************************************-*                                                                      *-\subsection{Data types}-*                                                                      *-************************************************************************--This is the syntax for types as seen in type signatures.--Note [HsBSig binder lists]-~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider a binder (or pattern) decorated with a type or kind,-   \ (x :: a -> a). blah-   forall (a :: k -> *) (b :: k). blah-Then we use a LHsBndrSig on the binder, so that the-renamer can decorate it with the variables bound-by the pattern ('a' in the first example, 'k' in the second),-assuming that neither of them is in scope already-See also Note [Kind and type-variable binders] in RnTypes--Note [HsType binders]-~~~~~~~~~~~~~~~~~~~~~-The system for recording type and kind-variable binders in HsTypes-is a bit complicated.  Here's how it works.--* In a HsType,-     HsForAllTy   represents an /explicit, user-written/ 'forall'-                   e.g.   forall a b. ...-     HsQualTy     represents an /explicit, user-written/ context-                   e.g.   (Eq a, Show a) => ...-                  The context can be empty if that's what the user wrote-  These constructors represent what the user wrote, no more-  and no less.--* HsTyVarBndr describes a quantified type variable written by the-  user.  For example-     f :: forall a (b :: *).  blah-  here 'a' and '(b::*)' are each a HsTyVarBndr.  A HsForAllTy has-  a list of LHsTyVarBndrs.--* HsImplicitBndrs is a wrapper that gives the implicitly-quantified-  kind and type variables of the wrapped thing.  It is filled in by-  the renamer. For example, if the user writes-     f :: a -> a-  the HsImplicitBinders binds the 'a' (not a HsForAllTy!).-  NB: this implicit quantification is purely lexical: we bind any-      type or kind variables that are not in scope. The type checker-      may subsequently quantify over further kind variables.--* HsWildCardBndrs is a wrapper that binds the wildcard variables-  of the wrapped thing.  It is filled in by the renamer-     f :: _a -> _-  The enclosing HsWildCardBndrs binds the wildcards _a and _.--* The explicit presence of these wrappers specifies, in the HsSyn,-  exactly where implicit quantification is allowed, and where-  wildcards are allowed.--* LHsQTyVars is used in data/class declarations, where the user gives-  explicit *type* variable bindings, but we need to implicitly bind-  *kind* variables.  For example-      class C (a :: k -> *) where ...-  The 'k' is implicitly bound in the hsq_tvs field of LHsQTyVars--Note [The wildcard story for types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Types can have wildcards in them, to support partial type signatures,-like       f :: Int -> (_ , _a) -> _a--A wildcard in a type can be--  * An anonymous wildcard,-        written '_'-    In HsType this is represented by HsWildCardTy.-    The renamer leaves it untouched, and it is later given fresh meta tyvars in-    the typechecker.--  * A named wildcard,-        written '_a', '_foo', etc-    In HsType this is represented by (HsTyVar "_a")-    i.e. a perfectly ordinary type variable that happens-         to start with an underscore--Note carefully:--* When NamedWildCards is off, type variables that start with an-  underscore really /are/ ordinary type variables.  And indeed, even-  when NamedWildCards is on you can bind _a explicitly as an ordinary-  type variable:-        data T _a _b = MkT _b _a-  Or even:-        f :: forall _a. _a -> _b-  Here _a is an ordinary forall'd binder, but (With NamedWildCards)-  _b is a named wildcard.  (See the comments in Trac #10982)--* Named wildcards are bound by the HsWildCardBndrs construct, which wraps-  types that are allowed to have wildcards. Unnamed wildcards however are left-  unchanged until typechecking, where we give them fresh wild tyavrs and-  determine whether or not to emit hole constraints on each wildcard-  (we don't if it's a visible type/kind argument or a type family pattern).-  See related notes Note [Wildcards in visible kind application]-  and Note [Wildcards in visible type application] in TcHsType.hs--* After type checking is done, we report what types the wildcards-  got unified with.--Note [Ordering of implicit variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Since the advent of -XTypeApplications, GHC makes promises about the ordering-of implicit variable quantification. Specifically, we offer that implicitly-quantified variables (such as those in const :: a -> b -> a, without a `forall`)-will occur in left-to-right order of first occurrence. Here are a few examples:--  const :: a -> b -> a       -- forall a b. ...-  f :: Eq a => b -> a -> a   -- forall a b. ...  contexts are included--  type a <-< b = b -> a-  g :: a <-< b               -- forall a b. ...  type synonyms matter--  class Functor f where-    fmap :: (a -> b) -> f a -> f b   -- forall f a b. ...-    -- The f is quantified by the class, so only a and b are considered in fmap--This simple story is complicated by the possibility of dependency: all variables-must come after any variables mentioned in their kinds.--  typeRep :: Typeable a => TypeRep (a :: k)   -- forall k a. ...--The k comes first because a depends on k, even though the k appears later than-the a in the code. Thus, GHC does a *stable topological sort* on the variables.-By "stable", we mean that any two variables who do not depend on each other-preserve their existing left-to-right ordering.--Implicitly bound variables are collected by the extract- family of functions-(extractHsTysRdrTyVars, extractHsTyVarBndrsKVs, etc.) in RnTypes.-These functions thus promise to keep left-to-right ordering.-Look for pointers to this note to see the places where the action happens.--Note that we also maintain this ordering in kind signatures. Even though-there's no visible kind application (yet), having implicit variables be-quantified in left-to-right order in kind signatures is nice since:--* It's consistent with the treatment for type signatures.-* It can affect how types are displayed with -fprint-explicit-kinds (see-  #15568 for an example), which is a situation where knowing the order in-  which implicit variables are quantified can be useful.-* In the event that visible kind application is implemented, the order in-  which we would expect implicit variables to be ordered in kinds will have-  already been established.--}---- | Located Haskell Context-type LHsContext pass = Located (HsContext pass)-      -- ^ 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnUnit'-      -- For details on above see note [Api annotations] in ApiAnnotation--noLHsContext :: LHsContext pass--- Use this when there is no context in the original program--- It would really be more kosher to use a Maybe, to distinguish---     class () => C a where ...--- from---     class C a where ...-noLHsContext = noLoc []---- | Haskell Context-type HsContext pass = [LHsType pass]---- | Located Haskell Type-type LHsType pass = Located (HsType pass)-      -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when-      --   in a list--      -- For details on above see note [Api annotations] in ApiAnnotation---- | Haskell Kind-type HsKind pass = HsType pass---- | Located Haskell Kind-type LHsKind pass = Located (HsKind pass)-      -- ^ 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'--      -- For details on above see note [Api annotations] in ApiAnnotation-------------------------------------------------------             LHsQTyVars---  The explicitly-quantified binders in a data/type declaration---- | Located Haskell Type Variable Binder-type LHsTyVarBndr pass = Located (HsTyVarBndr pass)-                         -- See Note [HsType binders]---- | Located Haskell Quantified Type Variables-data LHsQTyVars pass   -- See Note [HsType binders]-  = HsQTvs { hsq_ext :: XHsQTvs pass--           , hsq_explicit :: [LHsTyVarBndr pass]-                -- Explicit variables, written by the user-                -- See Note [HsForAllTy tyvar binders]-    }-  | XLHsQTyVars (XXLHsQTyVars pass)--data HsQTvsRn-  = HsQTvsRn-           { hsq_implicit :: [Name]-                -- Implicit (dependent) variables--           , hsq_dependent :: NameSet-               -- Which members of hsq_explicit are dependent; that is,-               -- mentioned in the kind of a later hsq_explicit,-               -- or mentioned in a kind in the scope of this HsQTvs-               -- See Note [Dependent LHsQTyVars] in TcHsType-           } deriving Data--type instance XHsQTvs       GhcPs = NoExt-type instance XHsQTvs       GhcRn = HsQTvsRn-type instance XHsQTvs       GhcTc = HsQTvsRn--type instance XXLHsQTyVars  (GhcPass _) = NoExt--mkHsQTvs :: [LHsTyVarBndr GhcPs] -> LHsQTyVars GhcPs-mkHsQTvs tvs = HsQTvs { hsq_ext = noExt, hsq_explicit = tvs }--hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr pass]-hsQTvExplicit = hsq_explicit--emptyLHsQTvs :: LHsQTyVars GhcRn-emptyLHsQTvs = HsQTvs (HsQTvsRn [] emptyNameSet) []--isEmptyLHsQTvs :: LHsQTyVars GhcRn -> Bool-isEmptyLHsQTvs (HsQTvs (HsQTvsRn [] _) []) = True-isEmptyLHsQTvs _                = False-----------------------------------------------------            HsImplicitBndrs--- Used to quantify the implicit binders of a type---    * Implicit binders of a type signature (LHsSigType/LHsSigWcType)---    * Patterns in a type/data family instance (HsTyPats)---- | Haskell Implicit Binders-data HsImplicitBndrs pass thing   -- See Note [HsType binders]-  = HsIB { hsib_ext  :: XHsIB pass thing -- after renamer: [Name]-                                         -- Implicitly-bound kind & type vars-                                         -- Order is important; see-                                         -- Note [Ordering of implicit variables]-                                         -- in RnTypes--         , hsib_body :: thing            -- Main payload (type or list of types)-    }-  | XHsImplicitBndrs (XXHsImplicitBndrs pass thing)--type instance XHsIB              GhcPs _ = NoExt-type instance XHsIB              GhcRn _ = [Name]-type instance XHsIB              GhcTc _ = [Name]--type instance XXHsImplicitBndrs  (GhcPass _) _ = NoExt---- | Haskell Wildcard Binders-data HsWildCardBndrs pass thing-    -- See Note [HsType binders]-    -- See Note [The wildcard story for types]-  = HsWC { hswc_ext :: XHsWC pass thing-                -- after the renamer-                -- Wild cards, only named-                -- See Note [Wildcards in visible kind application]--         , hswc_body :: thing-                -- Main payload (type or list of types)-                -- If there is an extra-constraints wildcard,-                -- it's still there in the hsc_body.-    }-  | XHsWildCardBndrs (XXHsWildCardBndrs pass thing)--type instance XHsWC              GhcPs b = NoExt-type instance XHsWC              GhcRn b = [Name]-type instance XHsWC              GhcTc b = [Name]--type instance XXHsWildCardBndrs  (GhcPass _) b = NoExt---- | Located Haskell Signature Type-type LHsSigType   pass = HsImplicitBndrs pass (LHsType pass)    -- Implicit only---- | Located Haskell Wildcard Type-type LHsWcType    pass = HsWildCardBndrs pass (LHsType pass)    -- Wildcard only---- | Located Haskell Signature Wildcard Type-type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) -- Both---- See Note [Representing type signatures]--hsImplicitBody :: HsImplicitBndrs pass thing -> thing-hsImplicitBody (HsIB { hsib_body = body }) = body-hsImplicitBody (XHsImplicitBndrs _) = panic "hsImplicitBody"--hsSigType :: LHsSigType pass -> LHsType pass-hsSigType = hsImplicitBody--hsSigWcType :: LHsSigWcType pass -> LHsType pass-hsSigWcType sig_ty = hsib_body (hswc_body sig_ty)--dropWildCards :: LHsSigWcType pass -> LHsSigType pass--- Drop the wildcard part of a LHsSigWcType-dropWildCards sig_ty = hswc_body sig_ty--{- Note [Representing type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-HsSigType is used to represent an explicit user type signature-such as   f :: a -> a-     or   g (x :: a -> a) = x--A HsSigType is just a HsImplicitBndrs wrapping a LHsType.- * The HsImplicitBndrs binds the /implicitly/ quantified tyvars- * The LHsType binds the /explicitly/ quantified tyvars--E.g. For a signature like-   f :: forall (a::k). blah-we get-   HsIB { hsib_vars = [k]-        , hsib_body = HsForAllTy { hst_bndrs = [(a::*)]-                                 , hst_body = blah }-The implicit kind variable 'k' is bound by the HsIB;-the explicitly forall'd tyvar 'a' is bound by the HsForAllTy--}--mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing-mkHsImplicitBndrs x = HsIB { hsib_ext  = noExt-                           , hsib_body = x }--mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing-mkHsWildCardBndrs x = HsWC { hswc_body = x-                           , hswc_ext  = noExt }---- Add empty binders.  This is a bit suspicious; what if--- the wrapped thing had free type variables?-mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing-mkEmptyImplicitBndrs x = HsIB { hsib_ext = []-                              , hsib_body = x }--mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing-mkEmptyWildCardBndrs x = HsWC { hswc_body = x-                              , hswc_ext  = [] }-------------------------------------------------------- | These names are used early on to store the names of implicit--- parameters.  They completely disappear after type-checking.-newtype HsIPName = HsIPName FastString-  deriving( Eq, Data )--hsIPNameFS :: HsIPName -> FastString-hsIPNameFS (HsIPName n) = n--instance Outputable HsIPName where-    ppr (HsIPName n) = char '?' <> ftext n -- Ordinary implicit parameters--instance OutputableBndr HsIPName where-    pprBndr _ n   = ppr n         -- Simple for now-    pprInfixOcc  n = ppr n-    pprPrefixOcc n = ppr n-------------------------------------------------------- | Haskell Type Variable Binder-data HsTyVarBndr pass-  = UserTyVar        -- no explicit kinding-         (XUserTyVar pass)-         (Located (IdP pass))-        -- See Note [Located RdrNames] in HsExpr-  | KindedTyVar-         (XKindedTyVar pass)-         (Located (IdP pass))-         (LHsKind pass)  -- The user-supplied kind signature-        -- ^-        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --          'ApiAnnotation.AnnDcolon', 'ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation--  | XTyVarBndr-      (XXTyVarBndr pass)--type instance XUserTyVar    (GhcPass _) = NoExt-type instance XKindedTyVar  (GhcPass _) = NoExt-type instance XXTyVarBndr   (GhcPass _) = NoExt---- | Does this 'HsTyVarBndr' come with an explicit kind annotation?-isHsKindedTyVar :: HsTyVarBndr pass -> Bool-isHsKindedTyVar (UserTyVar {})   = False-isHsKindedTyVar (KindedTyVar {}) = True-isHsKindedTyVar (XTyVarBndr{})   = panic "isHsKindedTyVar"---- | Do all type variables in this 'LHsQTyVars' come with kind annotations?-hsTvbAllKinded :: LHsQTyVars pass -> Bool-hsTvbAllKinded = all (isHsKindedTyVar . unLoc) . hsQTvExplicit---- | Haskell Type-data HsType pass-  = HsForAllTy   -- See Note [HsType binders]-      { hst_xforall :: XForAllTy pass,-        hst_bndrs   :: [LHsTyVarBndr pass]-                                       -- Explicit, user-supplied 'forall a b c'-      , hst_body    :: LHsType pass      -- body type-      }-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnForall',-      --         'ApiAnnotation.AnnDot','ApiAnnotation.AnnDarrow'-      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsQualTy   -- See Note [HsType binders]-      { hst_xqual :: XQualTy pass-      , hst_ctxt  :: LHsContext pass       -- Context C => blah-      , hst_body  :: LHsType pass }--  | HsTyVar  (XTyVar pass)-              PromotionFlag    -- Whether explicitly promoted,-                               -- for the pretty printer-             (Located (IdP pass))-                  -- Type variable, type constructor, or data constructor-                  -- see Note [Promotions (HsTyVar)]-                  -- See Note [Located RdrNames] in HsExpr-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsAppTy             (XAppTy pass)-                        (LHsType pass)-                        (LHsType pass)-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsAppKindTy         (XAppKindTy pass) -- type level type app-                        (LHsType pass)-                        (LHsKind pass)--  | HsFunTy             (XFunTy pass)-                        (LHsType pass)   -- function type-                        (LHsType pass)-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow',--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsListTy            (XListTy pass)-                        (LHsType pass)  -- Element type-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,-      --         'ApiAnnotation.AnnClose' @']'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsTupleTy           (XTupleTy pass)-                        HsTupleSort-                        [LHsType pass]  -- Element types (length gives arity)-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'(' or '(#'@,-    --         'ApiAnnotation.AnnClose' @')' or '#)'@--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsSumTy             (XSumTy pass)-                        [LHsType pass]  -- Element types (length gives arity)-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'(#'@,-    --         'ApiAnnotation.AnnClose' '#)'@--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsOpTy              (XOpTy pass)-                        (LHsType pass) (Located (IdP pass)) (LHsType pass)-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsParTy             (XParTy pass)-                        (LHsType pass)   -- See Note [Parens in HsSyn] in HsExpr-        -- Parenthesis preserved for the precedence re-arrangement in RnTypes-        -- It's important that a * (b + c) doesn't get rearranged to (a*b) + c!-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,-      --         'ApiAnnotation.AnnClose' @')'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsIParamTy          (XIParamTy pass)-                        (Located HsIPName) -- (?x :: ty)-                        (LHsType pass)   -- Implicit parameters as they occur in-                                         -- contexts-      -- ^-      -- > (?x :: ty)-      ---      -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsStarTy            (XStarTy pass)-                        Bool             -- Is this the Unicode variant?-                                         -- Note [HsStarTy]-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--  | HsKindSig           (XKindSig pass)-                        (LHsType pass)  -- (ty :: kind)-                        (LHsKind pass)  -- A type with a kind signature-      -- ^-      -- > (ty :: kind)-      ---      -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,-      --         'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnClose' @')'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsSpliceTy          (XSpliceTy pass)-                        (HsSplice pass)   -- Includes quasi-quotes-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'$('@,-      --         'ApiAnnotation.AnnClose' @')'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsDocTy             (XDocTy pass)-                        (LHsType pass) LHsDocString -- A documented type-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsBangTy    (XBangTy pass)-                HsSrcBang (LHsType pass)   -- Bang-style type annotations-      -- ^ - 'ApiAnnotation.AnnKeywordId' :-      --         'ApiAnnotation.AnnOpen' @'{-\# UNPACK' or '{-\# NOUNPACK'@,-      --         'ApiAnnotation.AnnClose' @'#-}'@-      --         'ApiAnnotation.AnnBang' @\'!\'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsRecTy     (XRecTy pass)-                [LConDeclField pass]    -- Only in data type declarations-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,-      --         'ApiAnnotation.AnnClose' @'}'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  -- | HsCoreTy (XCoreTy pass) Type -- An escape hatch for tunnelling a *closed*-  --                                -- Core Type through HsSyn.-  --     -- ^ - 'ApiAnnotation.AnnKeywordId' : None--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsExplicitListTy       -- A promoted explicit list-        (XExplicitListTy pass)-        PromotionFlag      -- whether explcitly promoted, for pretty printer-        [LHsType pass]-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'["@,-      --         'ApiAnnotation.AnnClose' @']'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsExplicitTupleTy      -- A promoted explicit tuple-        (XExplicitTupleTy pass)-        [LHsType pass]-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'("@,-      --         'ApiAnnotation.AnnClose' @')'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsTyLit (XTyLit pass) HsTyLit      -- A promoted numeric literal.-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsWildCardTy (XWildCardTy pass)  -- A type wildcard-      -- See Note [The wildcard story for types]-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--      -- For details on above see note [Api annotations] in ApiAnnotation--  -- For adding new constructors via Trees that Grow-  | XHsType-      (XXType pass)--data NewHsTypeX-  = NHsCoreTy Type -- An escape hatch for tunnelling a *closed*-                   -- Core Type through HsSyn.-    deriving Data-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--instance Outputable NewHsTypeX where-  ppr (NHsCoreTy ty) = ppr ty--type instance XForAllTy        (GhcPass _) = NoExt-type instance XQualTy          (GhcPass _) = NoExt-type instance XTyVar           (GhcPass _) = NoExt-type instance XAppTy           (GhcPass _) = NoExt-type instance XFunTy           (GhcPass _) = NoExt-type instance XListTy          (GhcPass _) = NoExt-type instance XTupleTy         (GhcPass _) = NoExt-type instance XSumTy           (GhcPass _) = NoExt-type instance XOpTy            (GhcPass _) = NoExt-type instance XParTy           (GhcPass _) = NoExt-type instance XIParamTy        (GhcPass _) = NoExt-type instance XStarTy          (GhcPass _) = NoExt-type instance XKindSig         (GhcPass _) = NoExt--type instance XAppKindTy       (GhcPass _) = SrcSpan -- Where the `@` lives--type instance XSpliceTy        GhcPs = NoExt-type instance XSpliceTy        GhcRn = NoExt-type instance XSpliceTy        GhcTc = Kind--type instance XDocTy           (GhcPass _) = NoExt-type instance XBangTy          (GhcPass _) = NoExt-type instance XRecTy           (GhcPass _) = NoExt--type instance XExplicitListTy  GhcPs = NoExt-type instance XExplicitListTy  GhcRn = NoExt-type instance XExplicitListTy  GhcTc = Kind--type instance XExplicitTupleTy GhcPs = NoExt-type instance XExplicitTupleTy GhcRn = NoExt-type instance XExplicitTupleTy GhcTc = [Kind]--type instance XTyLit           (GhcPass _) = NoExt--type instance XWildCardTy      (GhcPass _) = NoExt--type instance XXType         (GhcPass _) = NewHsTypeX----- Note [Literal source text] in BasicTypes for SourceText fields in--- the following--- | Haskell Type Literal-data HsTyLit-  = HsNumTy SourceText Integer-  | HsStrTy SourceText FastString-    deriving Data---{--Note [HsForAllTy tyvar binders]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-After parsing:-  * Implicit => empty-    Explicit => the variables the user wrote--After renaming-  * Implicit => the *type* variables free in the type-    Explicit => the variables the user wrote (renamed)--Qualified currently behaves exactly as Implicit,-but it is deprecated to use it for implicit quantification.-In this case, GHC 7.10 gives a warning; see-Note [Context quantification] in RnTypes, and Trac #4426.-In GHC 8.0, Qualified will no longer bind variables-and this will become an error.--The kind variables bound in the hsq_implicit field come both-  a) from the kind signatures on the kind vars (eg k1)-  b) from the scope of the forall (eg k2)-Example:   f :: forall (a::k1) b. T a (b::k2)---Note [Unit tuples]-~~~~~~~~~~~~~~~~~~-Consider the type-    type instance F Int = ()-We want to parse that "()"-    as HsTupleTy HsBoxedOrConstraintTuple [],-NOT as HsTyVar unitTyCon--Why? Because F might have kind (* -> Constraint), so we when parsing we-don't know if that tuple is going to be a constraint tuple or an ordinary-unit tuple.  The HsTupleSort flag is specifically designed to deal with-that, but it has to work for unit tuples too.--Note [Promotions (HsTyVar)]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-HsTyVar: A name in a type or kind.-  Here are the allowed namespaces for the name.-    In a type:-      Var: not allowed-      Data: promoted data constructor-      Tv: type variable-      TcCls before renamer: type constructor, class constructor, or promoted data constructor-      TcCls after renamer: type constructor or class constructor-    In a kind:-      Var, Data: not allowed-      Tv: kind variable-      TcCls: kind constructor or promoted type constructor--  The 'Promoted' field in an HsTyVar captures whether the type was promoted in-  the source code by prefixing an apostrophe.--Note [HsStarTy]-~~~~~~~~~~~~~~~-When the StarIsType extension is enabled, we want to treat '*' and its Unicode-variant identically to 'Data.Kind.Type'. Unfortunately, doing so in the parser-would mean that when we pretty-print it back, we don't know whether the user-wrote '*' or 'Type', and lose the parse/ppr roundtrip property.--As a workaround, we parse '*' as HsStarTy (if it stands for 'Data.Kind.Type')-and then desugar it to 'Data.Kind.Type' in the typechecker (see tc_hs_type).-When '*' is a regular type operator (StarIsType is disabled), HsStarTy is not-involved.---Note [Promoted lists and tuples]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Notice the difference between-   HsListTy    HsExplicitListTy-   HsTupleTy   HsExplicitListTupleTy--E.g.    f :: [Int]                      HsListTy--        g3  :: T '[]                   All these use-        g2  :: T '[True]                  HsExplicitListTy-        g1  :: T '[True,False]-        g1a :: T [True,False]             (can omit ' where unambiguous)--  kind of T :: [Bool] -> *        This kind uses HsListTy!--E.g.    h :: (Int,Bool)                 HsTupleTy; f is a pair-        k :: S '(True,False)            HsExplicitTypleTy; S is indexed by-                                           a type-level pair of booleans-        kind of S :: (Bool,Bool) -> *   This kind uses HsExplicitTupleTy--Note [Distinguishing tuple kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--Apart from promotion, tuples can have one of three different kinds:--        x :: (Int, Bool)                -- Regular boxed tuples-        f :: Int# -> (# Int#, Int# #)   -- Unboxed tuples-        g :: (Eq a, Ord a) => a         -- Constraint tuples--For convenience, internally we use a single constructor for all of these,-namely HsTupleTy, but keep track of the tuple kind (in the first argument to-HsTupleTy, a HsTupleSort). We can tell if a tuple is unboxed while parsing,-because of the #. However, with -XConstraintKinds we can only distinguish-between constraint and boxed tuples during type checking, in general. Hence the-four constructors of HsTupleSort:--        HsUnboxedTuple                  -> Produced by the parser-        HsBoxedTuple                    -> Certainly a boxed tuple-        HsConstraintTuple               -> Certainly a constraint tuple-        HsBoxedOrConstraintTuple        -> Could be a boxed or a constraint-                                        tuple. Produced by the parser only,-                                        disappears after type checking--}---- | Haskell Tuple Sort-data HsTupleSort = HsUnboxedTuple-                 | HsBoxedTuple-                 | HsConstraintTuple-                 | HsBoxedOrConstraintTuple-                 deriving Data---- | Located Constructor Declaration Field-type LConDeclField pass = Located (ConDeclField pass)-      -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when-      --   in a list--      -- For details on above see note [Api annotations] in ApiAnnotation---- | Constructor Declaration Field-data ConDeclField pass  -- Record fields have Haddoc docs on them-  = ConDeclField { cd_fld_ext  :: XConDeclField pass,-                   cd_fld_names :: [LFieldOcc pass],-                                   -- ^ See Note [ConDeclField passs]-                   cd_fld_type :: LBangType pass,-                   cd_fld_doc  :: Maybe LHsDocString }-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'--      -- For details on above see note [Api annotations] in ApiAnnotation-  | XConDeclField (XXConDeclField pass)--type instance XConDeclField  (GhcPass _) = NoExt-type instance XXConDeclField (GhcPass _) = NoExt--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (ConDeclField p) where-  ppr (ConDeclField _ fld_n fld_ty _) = ppr fld_n <+> dcolon <+> ppr fld_ty-  ppr (XConDeclField x) = ppr x---- HsConDetails is used for patterns/expressions *and* for data type--- declarations--- | Haskell Constructor Details-data HsConDetails arg rec-  = PrefixCon [arg]             -- C p1 p2 p3-  | RecCon    rec               -- C { x = p1, y = p2 }-  | InfixCon  arg arg           -- p1 `C` p2-  deriving Data--instance (Outputable arg, Outputable rec)-         => Outputable (HsConDetails arg rec) where-  ppr (PrefixCon args) = text "PrefixCon" <+> ppr args-  ppr (RecCon rec)     = text "RecCon:" <+> ppr rec-  ppr (InfixCon l r)   = text "InfixCon:" <+> ppr [l, r]--{--Note [ConDeclField passs]-~~~~~~~~~~~~~~~~~~~~~~~~~--A ConDeclField contains a list of field occurrences: these always-include the field label as the user wrote it.  After the renamer, it-will additionally contain the identity of the selector function in the-second component.--Due to DuplicateRecordFields, the OccName of the selector function-may have been mangled, which is why we keep the original field label-separately.  For example, when DuplicateRecordFields is enabled--    data T = MkT { x :: Int }--gives--    ConDeclField { cd_fld_names = [L _ (FieldOcc "x" $sel:x:MkT)], ... }.--}---------------------------- A valid type must have a for-all at the top of the type, or of the fn arg--- types------------------------hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]--- Get the lexically-scoped type variables of a HsSigType---  - the explicitly-given forall'd type variables---  - the implicitly-bound kind variables---  - the named wildcars; see Note [Scoping of named wildcards]--- because they scope in the same way-hsWcScopedTvs sig_ty-  | HsWC { hswc_ext = nwcs, hswc_body = sig_ty1 }  <- sig_ty-  , HsIB { hsib_ext = vars-         , hsib_body = sig_ty2 } <- sig_ty1-  = case sig_ty2 of-      L _ (HsForAllTy { hst_bndrs = tvs }) -> vars ++ nwcs ++-                                              map hsLTyVarName tvs-               -- include kind variables only if the type is headed by forall-               -- (this is consistent with GHC 7 behaviour)-      _                                    -> nwcs-hsWcScopedTvs (HsWC _ (XHsImplicitBndrs _)) = panic "hsWcScopedTvs"-hsWcScopedTvs (XHsWildCardBndrs _) = panic "hsWcScopedTvs"--hsScopedTvs :: LHsSigType GhcRn -> [Name]--- Same as hsWcScopedTvs, but for a LHsSigType-hsScopedTvs sig_ty-  | HsIB { hsib_ext = vars-         , hsib_body = sig_ty2 } <- sig_ty-  , L _ (HsForAllTy { hst_bndrs = tvs }) <- sig_ty2-  = vars ++ map hsLTyVarName tvs-  | otherwise-  = []--{- Note [Scoping of named wildcards]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-  f :: _a -> _a-  f x = let g :: _a -> _a-            g = ...-        in ...--Currently, for better or worse, the "_a" variables are all the same. So-although there is no explicit forall, the "_a" scopes over the definition.-I don't know if this is a good idea, but there it is.--}------------------------hsTyVarName :: HsTyVarBndr pass -> IdP pass-hsTyVarName (UserTyVar _ (L _ n))     = n-hsTyVarName (KindedTyVar _ (L _ n) _) = n-hsTyVarName (XTyVarBndr{}) = panic "hsTyVarName"--hsLTyVarName :: LHsTyVarBndr pass -> IdP pass-hsLTyVarName = hsTyVarName . unLoc--hsExplicitLTyVarNames :: LHsQTyVars pass -> [IdP pass]--- Explicit variables only-hsExplicitLTyVarNames qtvs = map hsLTyVarName (hsQTvExplicit qtvs)--hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]--- All variables-hsAllLTyVarNames (HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = kvs }-                         , hsq_explicit = tvs })-  = kvs ++ map hsLTyVarName tvs-hsAllLTyVarNames (XLHsQTyVars _) = panic "hsAllLTyVarNames"--hsLTyVarLocName :: LHsTyVarBndr pass -> Located (IdP pass)-hsLTyVarLocName = onHasSrcSpan hsTyVarName--hsLTyVarLocNames :: LHsQTyVars pass -> [Located (IdP pass)]-hsLTyVarLocNames qtvs = map hsLTyVarLocName (hsQTvExplicit qtvs)---- | Convert a LHsTyVarBndr to an equivalent LHsType.-hsLTyVarBndrToType :: LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p)-hsLTyVarBndrToType = onHasSrcSpan cvt-  where cvt (UserTyVar _ n) = HsTyVar noExt NotPromoted n-        cvt (KindedTyVar _ (L name_loc n) kind)-          = HsKindSig noExt-                   (L name_loc (HsTyVar noExt NotPromoted (L name_loc n))) kind-        cvt (XTyVarBndr{}) = panic "hsLTyVarBndrToType"---- | Convert a LHsTyVarBndrs to a list of types.--- Works on *type* variable only, no kind vars.-hsLTyVarBndrsToTypes :: LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)]-hsLTyVarBndrsToTypes (HsQTvs { hsq_explicit = tvbs }) = map hsLTyVarBndrToType tvbs-hsLTyVarBndrsToTypes (XLHsQTyVars _) = panic "hsLTyVarBndrsToTypes"------------------------ignoreParens :: LHsType pass -> LHsType pass-ignoreParens (L _ (HsParTy _ ty)) = ignoreParens ty-ignoreParens ty                   = ty--isLHsForAllTy :: LHsType p -> Bool-isLHsForAllTy (L _ (HsForAllTy {})) = True-isLHsForAllTy _                     = False--{--************************************************************************-*                                                                      *-                Building types-*                                                                      *-************************************************************************--}--mkAnonWildCardTy :: HsType GhcPs-mkAnonWildCardTy = HsWildCardTy noExt--mkHsOpTy :: LHsType (GhcPass p) -> Located (IdP (GhcPass p))-         -> LHsType (GhcPass p) -> HsType (GhcPass p)-mkHsOpTy ty1 op ty2 = HsOpTy noExt ty1 op ty2--mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)-mkHsAppTy t1 t2-  = addCLoc t1 t2 (HsAppTy noExt t1 (parenthesizeHsType appPrec t2))--mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)]-           -> LHsType (GhcPass p)-mkHsAppTys = foldl' mkHsAppTy--mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)-              -> LHsType (GhcPass p)-mkHsAppKindTy ext ty k-  = addCLoc ty k (HsAppKindTy ext ty k)--{--************************************************************************-*                                                                      *-                Decomposing HsTypes-*                                                                      *-************************************************************************--}-------------------------------------- splitHsFunType decomposes a type (t1 -> t2 ... -> tn)--- Breaks up any parens in the result type:---      splitHsFunType (a -> (b -> c)) = ([a,b], c)--- Also deals with (->) t1 t2; that is why it only works on LHsType Name---   (see Trac #9096)-splitHsFunType :: LHsType GhcRn -> ([LHsType GhcRn], LHsType GhcRn)-splitHsFunType (L _ (HsParTy _ ty))-  = splitHsFunType ty--splitHsFunType (L _ (HsFunTy _ x y))-  | (args, res) <- splitHsFunType y-  = (x:args, res)-{- This is not so correct, because it won't work with visible kind app, in case-  someone wants to write '(->) @k1 @k2 t1 t2'. Fixing this would require changing-  ConDeclGADT abstract syntax -}-splitHsFunType orig_ty@(L _ (HsAppTy _ t1 t2))-  = go t1 [t2]-  where  -- Look for (->) t1 t2, possibly with parenthesisation-    go (L _ (HsTyVar _ _ (L _ fn))) tys | fn == funTyConName-                                 , [t1,t2] <- tys-                                 , (args, res) <- splitHsFunType t2-                                 = (t1:args, res)-    go (L _ (HsAppTy _ t1 t2)) tys = go t1 (t2:tys)-    go (L _ (HsParTy _ ty))    tys = go ty tys-    go _                       _   = ([], orig_ty)  -- Failure to match--splitHsFunType other = ([], other)---- retrieve the name of the "head" of a nested type application--- somewhat like splitHsAppTys, but a little more thorough--- used to examine the result of a GADT-like datacon, so it doesn't handle--- *all* cases (like lists, tuples, (~), etc.)-hsTyGetAppHead_maybe :: LHsType (GhcPass p)-                     -> Maybe (Located (IdP (GhcPass p)))-hsTyGetAppHead_maybe = go-  where-    go (L _ (HsTyVar _ _ ln))          = Just ln-    go (L _ (HsAppTy _ l _))           = go l-    go (L _ (HsAppKindTy _ t _))       = go t-    go (L _ (HsOpTy _ _ (L loc n) _))  = Just (L loc n)-    go (L _ (HsParTy _ t))             = go t-    go (L _ (HsKindSig _ t _))         = go t-    go _                               = Nothing----------------------------------------------------------------- Arguments in an expression/type after splitting-data HsArg tm ty-  = HsValArg tm   -- Argument is an ordinary expression     (f arg)-  | HsTypeArg SrcSpan ty -- Argument is a visible type application (f @ty)-                         -- SrcSpan is location of the `@`-  | HsArgPar SrcSpan -- See Note [HsArgPar]--numVisibleArgs :: [HsArg tm ty] -> Arity-numVisibleArgs = count is_vis-  where is_vis (HsValArg _) = True-        is_vis _            = False---- type level equivalent-type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)--instance (Outputable tm, Outputable ty) => Outputable (HsArg tm ty) where-  ppr (HsValArg tm)    = ppr tm-  ppr (HsTypeArg _ ty) = char '@' <> ppr ty-  ppr (HsArgPar sp)    = text "HsArgPar"  <+> ppr sp-{--Note [HsArgPar]-A HsArgPar indicates that everything to the left of this in the argument list is-enclosed in parentheses together with the function itself. It is necessary so-that we can recreate the parenthesis structure in the original source after-typechecking the arguments.--The SrcSpan is the span of the original HsPar--((f arg1) arg2 arg3) results in an input argument list of-[HsValArg arg1, HsArgPar span1, HsValArg arg2, HsValArg arg3, HsArgPar span2]---}--splitHsAppTys :: HsType GhcRn -> (LHsType GhcRn, [LHsTypeArg GhcRn])-splitHsAppTys e = go (noLoc e) []-  where-    go :: LHsType GhcRn -> [LHsTypeArg GhcRn]-       -> (LHsType GhcRn, [LHsTypeArg GhcRn])-    go (L _ (HsAppTy _ f a))      as = go f (HsValArg a : as)-    go (L _ (HsAppKindTy l ty k)) as = go ty (HsTypeArg l k : as)-    go (L sp (HsParTy _ f))       as = go f (HsArgPar sp : as)-    go f                          as = (f,as)----------------------------------splitLHsPatSynTy :: LHsType pass-                 -> ( [LHsTyVarBndr pass]    -- universals-                    , LHsContext pass        -- required constraints-                    , [LHsTyVarBndr pass]    -- existentials-                    , LHsContext pass        -- provided constraints-                    , LHsType pass)          -- body type-splitLHsPatSynTy ty = (univs, reqs, exis, provs, ty4)-  where-    (univs, ty1) = splitLHsForAllTy ty-    (reqs,  ty2) = splitLHsQualTy ty1-    (exis,  ty3) = splitLHsForAllTy ty2-    (provs, ty4) = splitLHsQualTy ty3--splitLHsSigmaTy :: LHsType pass-                -> ([LHsTyVarBndr pass], LHsContext pass, LHsType pass)-splitLHsSigmaTy ty-  | (tvs, ty1)  <- splitLHsForAllTy ty-  , (ctxt, ty2) <- splitLHsQualTy ty1-  = (tvs, ctxt, ty2)--splitLHsForAllTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsType pass)-splitLHsForAllTy (L _ (HsParTy _ ty)) = splitLHsForAllTy ty-splitLHsForAllTy (L _ (HsForAllTy { hst_bndrs = tvs, hst_body = body })) = (tvs, body)-splitLHsForAllTy body              = ([], body)--splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass)-splitLHsQualTy (L _ (HsParTy _ ty)) = splitLHsQualTy ty-splitLHsQualTy (L _ (HsQualTy { hst_ctxt = ctxt, hst_body = body })) = (ctxt,     body)-splitLHsQualTy body              = (noLHsContext, body)--splitLHsInstDeclTy :: LHsSigType GhcRn-                   -> ([Name], LHsContext GhcRn, LHsType GhcRn)--- Split up an instance decl type, returning the pieces-splitLHsInstDeclTy (HsIB { hsib_ext = itkvs-                         , hsib_body = inst_ty })-  | (tvs, cxt, body_ty) <- splitLHsSigmaTy inst_ty-  = (itkvs ++ map hsLTyVarName tvs, cxt, body_ty)-         -- Return implicitly bound type and kind vars-         -- For an instance decl, all of them are in scope-splitLHsInstDeclTy (XHsImplicitBndrs _) = panic "splitLHsInstDeclTy"--getLHsInstDeclHead :: LHsSigType pass -> LHsType pass-getLHsInstDeclHead inst_ty-  | (_tvs, _cxt, body_ty) <- splitLHsSigmaTy (hsSigType inst_ty)-  = body_ty--getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p)-                          -> Maybe (Located (IdP (GhcPass p)))--- Works on (HsSigType RdrName)-getLHsInstDeclClass_maybe inst_ty-  = do { let head_ty = getLHsInstDeclHead inst_ty-       ; cls <- hsTyGetAppHead_maybe head_ty-       ; return cls }--{--************************************************************************-*                                                                      *-                FieldOcc-*                                                                      *-************************************************************************--}---- | Located Field Occurrence-type LFieldOcc pass = Located (FieldOcc pass)---- | Field Occurrence------ Represents an *occurrence* of an unambiguous field.  We store--- both the 'RdrName' the user originally wrote, and after the--- renamer, the selector function.-data FieldOcc pass = FieldOcc { extFieldOcc     :: XCFieldOcc pass-                              , rdrNameFieldOcc :: Located RdrName-                                 -- ^ See Note [Located RdrNames] in HsExpr-                              }--  | XFieldOcc-      (XXFieldOcc pass)-deriving instance (p ~ GhcPass pass, Eq (XCFieldOcc p)) => Eq  (FieldOcc p)-deriving instance (p ~ GhcPass pass, Ord (XCFieldOcc p)) => Ord (FieldOcc p)--type instance XCFieldOcc GhcPs = NoExt-type instance XCFieldOcc GhcRn = Name-type instance XCFieldOcc GhcTc = Id--type instance XXFieldOcc (GhcPass _) = NoExt--instance Outputable (FieldOcc pass) where-  ppr = ppr . rdrNameFieldOcc--mkFieldOcc :: Located RdrName -> FieldOcc GhcPs-mkFieldOcc rdr = FieldOcc noExt rdr----- | Ambiguous Field Occurrence------ Represents an *occurrence* of a field that is potentially--- ambiguous after the renamer, with the ambiguity resolved by the--- typechecker.  We always store the 'RdrName' that the user--- originally wrote, and store the selector function after the renamer--- (for unambiguous occurrences) or the typechecker (for ambiguous--- occurrences).------ See Note [HsRecField and HsRecUpdField] in HsPat and--- Note [Disambiguating record fields] in TcExpr.--- See Note [Located RdrNames] in HsExpr-data AmbiguousFieldOcc pass-  = Unambiguous (XUnambiguous pass) (Located RdrName)-  | Ambiguous   (XAmbiguous pass)   (Located RdrName)-  | XAmbiguousFieldOcc (XXAmbiguousFieldOcc pass)--type instance XUnambiguous GhcPs = NoExt-type instance XUnambiguous GhcRn = Name-type instance XUnambiguous GhcTc = Id--type instance XAmbiguous GhcPs = NoExt-type instance XAmbiguous GhcRn = NoExt-type instance XAmbiguous GhcTc = Id--type instance XXAmbiguousFieldOcc (GhcPass _) = NoExt--instance p ~ GhcPass pass => Outputable (AmbiguousFieldOcc p) where-  ppr = ppr . rdrNameAmbiguousFieldOcc--instance p ~ GhcPass pass => OutputableBndr (AmbiguousFieldOcc p) where-  pprInfixOcc  = pprInfixOcc . rdrNameAmbiguousFieldOcc-  pprPrefixOcc = pprPrefixOcc . rdrNameAmbiguousFieldOcc--mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs-mkAmbiguousFieldOcc rdr = Unambiguous noExt rdr--rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName-rdrNameAmbiguousFieldOcc (Unambiguous _ (L _ rdr)) = rdr-rdrNameAmbiguousFieldOcc (Ambiguous   _ (L _ rdr)) = rdr-rdrNameAmbiguousFieldOcc (XAmbiguousFieldOcc _)-  = panic "rdrNameAmbiguousFieldOcc"--selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id-selectorAmbiguousFieldOcc (Unambiguous sel _) = sel-selectorAmbiguousFieldOcc (Ambiguous   sel _) = sel-selectorAmbiguousFieldOcc (XAmbiguousFieldOcc _)-  = panic "selectorAmbiguousFieldOcc"--unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc-unambiguousFieldOcc (Unambiguous rdr sel) = FieldOcc rdr sel-unambiguousFieldOcc (Ambiguous   rdr sel) = FieldOcc rdr sel-unambiguousFieldOcc (XAmbiguousFieldOcc _) = panic "unambiguousFieldOcc"--ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc-ambiguousFieldOcc (FieldOcc sel rdr) = Unambiguous sel rdr-ambiguousFieldOcc (XFieldOcc _) = panic "ambiguousFieldOcc"--{--************************************************************************-*                                                                      *-\subsection{Pretty printing}-*                                                                      *-************************************************************************--}--instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsType p) where-    ppr ty = pprHsType ty--instance Outputable HsTyLit where-    ppr = ppr_tylit--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (LHsQTyVars p) where-    ppr (HsQTvs { hsq_explicit = tvs }) = interppSP tvs-    ppr (XLHsQTyVars x) = ppr x--instance (p ~ GhcPass pass, OutputableBndrId p)-       => Outputable (HsTyVarBndr p) where-    ppr (UserTyVar _ n)     = ppr n-    ppr (KindedTyVar _ n k) = parens $ hsep [ppr n, dcolon, ppr k]-    ppr (XTyVarBndr n)      = ppr n--instance (p ~ GhcPass pass,Outputable thing)-       => Outputable (HsImplicitBndrs p thing) where-    ppr (HsIB { hsib_body = ty }) = ppr ty-    ppr (XHsImplicitBndrs x) = ppr x--instance (p ~ GhcPass pass,Outputable thing)-       => Outputable (HsWildCardBndrs p thing) where-    ppr (HsWC { hswc_body = ty }) = ppr ty-    ppr (XHsWildCardBndrs x) = ppr x--pprAnonWildCard :: SDoc-pprAnonWildCard = char '_'---- | Prints a forall; When passed an empty list, prints @forall.@ only when--- @-dppr-debug@-pprHsForAll :: (OutputableBndrId (GhcPass p))-            => [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc-pprHsForAll = pprHsForAllExtra Nothing---- | Version of 'pprHsForAll' that can also print an extra-constraints--- wildcard, e.g. @_ => a -> Bool@ or @(Show a, _) => a -> String@. This--- underscore will be printed when the 'Maybe SrcSpan' argument is a 'Just'--- containing the location of the extra-constraints wildcard. A special--- function for this is needed, as the extra-constraints wildcard is removed--- from the actual context and type, and stored in a separate field, thus just--- printing the type will not print the extra-constraints wildcard.-pprHsForAllExtra :: (OutputableBndrId (GhcPass p))-                 => Maybe SrcSpan -> [LHsTyVarBndr (GhcPass p)]-                 -> LHsContext (GhcPass p) -> SDoc-pprHsForAllExtra extra qtvs cxt-  = pp_forall <+> pprLHsContextExtra (isJust extra) cxt-  where-    pp_forall | null qtvs = whenPprDebug (forAllLit <> dot)-              | otherwise = forAllLit <+> interppSP qtvs <> dot---- | Version of 'pprHsForall' or 'pprHsForallExtra' that will always print--- @forall.@ when passed @Just []@. Prints nothing if passed 'Nothing'-pprHsExplicitForAll :: (OutputableBndrId (GhcPass p))-               => Maybe [LHsTyVarBndr (GhcPass p)] -> SDoc-pprHsExplicitForAll (Just qtvs) = forAllLit <+> interppSP qtvs <> dot-pprHsExplicitForAll Nothing     = empty--pprLHsContext :: (OutputableBndrId (GhcPass p))-              => LHsContext (GhcPass p) -> SDoc-pprLHsContext lctxt-  | null (unLoc lctxt) = empty-  | otherwise          = pprLHsContextAlways lctxt---- For use in a HsQualTy, which always gets printed if it exists.-pprLHsContextAlways :: (OutputableBndrId (GhcPass p))-                    => LHsContext (GhcPass p) -> SDoc-pprLHsContextAlways (L _ ctxt)-  = case ctxt of-      []       -> parens empty             <+> darrow-      [L _ ty] -> ppr_mono_ty ty           <+> darrow-      _        -> parens (interpp'SP ctxt) <+> darrow---- True <=> print an extra-constraints wildcard, e.g. @(Show a, _) =>@-pprLHsContextExtra :: (OutputableBndrId (GhcPass p))-                   => Bool -> LHsContext (GhcPass p) -> SDoc-pprLHsContextExtra show_extra lctxt@(L _ ctxt)-  | not show_extra = pprLHsContext lctxt-  | null ctxt      = char '_' <+> darrow-  | otherwise      = parens (sep (punctuate comma ctxt')) <+> darrow-  where-    ctxt' = map ppr ctxt ++ [char '_']--pprConDeclFields :: (OutputableBndrId (GhcPass p))-                 => [LConDeclField (GhcPass p)] -> SDoc-pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields)))-  where-    ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty,-                                 cd_fld_doc = doc }))-        = ppr_names ns <+> dcolon <+> ppr ty <+> ppr_mbDoc doc-    ppr_fld (L _ (XConDeclField x)) = ppr x-    ppr_names [n] = ppr n-    ppr_names ns = sep (punctuate comma (map ppr ns))--{--Note [Printing KindedTyVars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Trac #3830 reminded me that we should really only print the kind-signature on a KindedTyVar if the kind signature was put there by the-programmer.  During kind inference GHC now adds a PostTcKind to UserTyVars,-rather than converting to KindedTyVars as before.--(As it happens, the message in #3830 comes out a different way now,-and the problem doesn't show up; but having the flag on a KindedTyVar-seems like the Right Thing anyway.)--}---- Printing works more-or-less as for Types--pprHsType :: (OutputableBndrId (GhcPass p)) => HsType (GhcPass p) -> SDoc-pprHsType ty = ppr_mono_ty ty--ppr_mono_lty :: (OutputableBndrId (GhcPass p)) => LHsType (GhcPass p) -> SDoc-ppr_mono_lty ty = ppr_mono_ty (unLoc ty)--ppr_mono_ty :: (OutputableBndrId (GhcPass p)) => HsType (GhcPass p) -> SDoc-ppr_mono_ty (HsForAllTy { hst_bndrs = tvs, hst_body = ty })-  = sep [pprHsForAll tvs noLHsContext, ppr_mono_lty ty]--ppr_mono_ty (HsQualTy { hst_ctxt = ctxt, hst_body = ty })-  = sep [pprLHsContextAlways ctxt, ppr_mono_lty ty]--ppr_mono_ty (HsBangTy _ b ty)   = ppr b <> ppr_mono_lty ty-ppr_mono_ty (HsRecTy _ flds)      = pprConDeclFields flds-ppr_mono_ty (HsTyVar _ prom (L _ name))-  | isPromoted prom = quote (pprPrefixOcc name)-  | otherwise       = pprPrefixOcc name-ppr_mono_ty (HsFunTy _ ty1 ty2)   = ppr_fun_ty ty1 ty2-ppr_mono_ty (HsTupleTy _ con tys) = tupleParens std_con (pprWithCommas ppr tys)-  where std_con = case con of-                    HsUnboxedTuple -> UnboxedTuple-                    _              -> BoxedTuple-ppr_mono_ty (HsSumTy _ tys)-  = tupleParens UnboxedTuple (pprWithBars ppr tys)-ppr_mono_ty (HsKindSig _ ty kind)-  = ppr_mono_lty ty <+> dcolon <+> ppr kind-ppr_mono_ty (HsListTy _ ty)       = brackets (ppr_mono_lty ty)-ppr_mono_ty (HsIParamTy _ n ty)   = (ppr n <+> dcolon <+> ppr_mono_lty ty)-ppr_mono_ty (HsSpliceTy _ s)      = pprSplice s-ppr_mono_ty (HsExplicitListTy _ prom tys)-  | isPromoted prom = quote $ brackets (maybeAddSpace tys $ interpp'SP tys)-  | otherwise       = brackets (interpp'SP tys)-ppr_mono_ty (HsExplicitTupleTy _ tys)-  = quote $ parens (maybeAddSpace tys $ interpp'SP tys)-ppr_mono_ty (HsTyLit _ t)       = ppr_tylit t-ppr_mono_ty (HsWildCardTy {})   = char '_'--ppr_mono_ty (HsStarTy _ isUni)  = char (if isUni then '★' else '*')--ppr_mono_ty (HsAppTy _ fun_ty arg_ty)-  = hsep [ppr_mono_lty fun_ty, ppr_mono_lty arg_ty]-ppr_mono_ty (HsAppKindTy _ ty k)-  = ppr_mono_lty ty <+> char '@' <> ppr_mono_lty k-ppr_mono_ty (HsOpTy _ ty1 (L _ op) ty2)-  = sep [ ppr_mono_lty ty1-        , sep [pprInfixOcc op, ppr_mono_lty ty2 ] ]--ppr_mono_ty (HsParTy _ ty)-  = parens (ppr_mono_lty ty)-  -- Put the parens in where the user did-  -- But we still use the precedence stuff to add parens because-  --    toHsType doesn't put in any HsParTys, so we may still need them--ppr_mono_ty (HsDocTy _ ty doc)-  -- AZ: Should we add parens?  Should we introduce "-- ^"?-  = ppr_mono_lty ty <+> ppr (unLoc doc)-  -- we pretty print Haddock comments on types as if they were-  -- postfix operators--ppr_mono_ty (XHsType t) = ppr t-----------------------------ppr_fun_ty :: (OutputableBndrId (GhcPass p))-           => LHsType (GhcPass p) -> LHsType (GhcPass p) -> SDoc-ppr_fun_ty ty1 ty2-  = let p1 = ppr_mono_lty ty1-        p2 = ppr_mono_lty ty2-    in-    sep [p1, arrow <+> p2]-----------------------------ppr_tylit :: HsTyLit -> SDoc-ppr_tylit (HsNumTy _ i) = integer i-ppr_tylit (HsStrTy _ s) = text (show s)----- | @'hsTypeNeedsParens' p t@ returns 'True' if the type @t@ needs parentheses--- under precedence @p@.-hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool-hsTypeNeedsParens p = go-  where-    go (HsForAllTy{})        = p >= funPrec-    go (HsQualTy{})          = p >= funPrec-    go (HsBangTy{})          = p > topPrec-    go (HsRecTy{})           = False-    go (HsTyVar{})           = False-    go (HsFunTy{})           = p >= funPrec-    go (HsTupleTy{})         = False-    go (HsSumTy{})           = False-    go (HsKindSig{})         = p >= sigPrec-    go (HsListTy{})          = False-    go (HsIParamTy{})        = p > topPrec-    go (HsSpliceTy{})        = False-    go (HsExplicitListTy{})  = False-    go (HsExplicitTupleTy{}) = False-    go (HsTyLit{})           = False-    go (HsWildCardTy{})      = False-    go (HsStarTy{})          = False-    go (HsAppTy{})           = p >= appPrec-    go (HsAppKindTy{})       = p >= appPrec-    go (HsOpTy{})            = p >= opPrec-    go (HsParTy{})           = False-    go (HsDocTy _ (L _ t) _) = go t-    go (XHsType{})           = False--maybeAddSpace :: [LHsType pass] -> SDoc -> SDoc--- See Note [Printing promoted type constructors]--- in IfaceType.  This code implements the same--- logic for printing HsType-maybeAddSpace tys doc-  | (ty : _) <- tys-  , lhsTypeHasLeadingPromotionQuote ty = space <> doc-  | otherwise                          = doc--lhsTypeHasLeadingPromotionQuote :: LHsType pass -> Bool-lhsTypeHasLeadingPromotionQuote ty-  = goL ty-  where-    goL (L _ ty) = go ty--    go (HsForAllTy{})        = False-    go (HsQualTy{ hst_ctxt = ctxt, hst_body = body})-      | L _ (c:_) <- ctxt    = goL c-      | otherwise            = goL body-    go (HsBangTy{})          = False-    go (HsRecTy{})           = False-    go (HsTyVar _ p _)       = isPromoted p-    go (HsFunTy _ arg _)     = goL arg-    go (HsListTy{})          = False-    go (HsTupleTy{})         = False-    go (HsSumTy{})           = False-    go (HsOpTy _ t1 _ _)     = goL t1-    go (HsKindSig _ t _)     = goL t-    go (HsIParamTy{})        = False-    go (HsSpliceTy{})        = False-    go (HsExplicitListTy _ p _) = isPromoted p-    go (HsExplicitTupleTy{}) = True-    go (HsTyLit{})           = False-    go (HsWildCardTy{})      = False-    go (HsStarTy{})          = False-    go (HsAppTy _ t _)       = goL t-    go (HsAppKindTy _ t _)   = goL t-    go (HsParTy{})           = False-    go (HsDocTy _ t _)       = goL t-    go (XHsType{})           = False---- | @'parenthesizeHsType' p ty@ checks if @'hsTypeNeedsParens' p ty@ is--- true, and if so, surrounds @ty@ with an 'HsParTy'. Otherwise, it simply--- returns @ty@.-parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)-parenthesizeHsType p lty@(L loc ty)-  | hsTypeNeedsParens p ty = L loc (HsParTy NoExt lty)-  | otherwise              = lty---- | @'parenthesizeHsContext' p ctxt@ checks if @ctxt@ is a single constraint--- @c@ such that @'hsTypeNeedsParens' p c@ is true, and if so, surrounds @c@--- with an 'HsParTy' to form a parenthesized @ctxt@. Otherwise, it simply--- returns @ctxt@ unchanged.-parenthesizeHsContext :: PprPrec-                      -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)-parenthesizeHsContext p lctxt@(L loc ctxt) =-  case ctxt of-    [c] -> L loc [parenthesizeHsType p c]-    _   -> lctxt -- Other contexts are already "parenthesized" by virtue of-                 -- being tuples.
− hsSyn/HsUtils.hs
@@ -1,1400 +0,0 @@-{--(c) The University of Glasgow, 1992-2006---Here we collect a variety of helper functions that construct or-analyse HsSyn.  All these functions deal with generic HsSyn; functions-which deal with the instantiated versions are located elsewhere:--   Parameterised by          Module-   ----------------          --------------   GhcPs/RdrName             parser/RdrHsSyn-   GhcRn/Name                rename/RnHsSyn-   GhcTc/Id                  typecheck/TcHsSyn--}--{-# LANGUAGE CPP #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE ViewPatterns #-}--module HsUtils(-  -- Terms-  mkHsPar, mkHsApp, mkHsAppType, mkHsAppTypes, mkHsCaseAlt,-  mkSimpleMatch, unguardedGRHSs, unguardedRHS,-  mkMatchGroup, mkMatch, mkPrefixFunRhs, mkHsLam, mkHsIf,-  mkHsWrap, mkLHsWrap, mkHsWrapCo, mkHsWrapCoR, mkLHsWrapCo,-  mkHsDictLet, mkHsLams,-  mkHsOpApp, mkHsDo, mkHsComp, mkHsWrapPat, mkHsWrapPatCo,-  mkLHsPar, mkHsCmdWrap, mkLHsCmdWrap,--  nlHsTyApp, nlHsTyApps, nlHsVar, nlHsDataCon,-  nlHsLit, nlHsApp, nlHsApps, nlHsSyntaxApps,-  nlHsIntLit, nlHsVarApps,-  nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList,-  mkLHsTupleExpr, mkLHsVarTuple, missingTupArg,-  typeToLHsType,--  -- * Constructing general big tuples-  -- $big_tuples-  mkChunkified, chunkify,--  -- Bindings-  mkFunBind, mkVarBind, mkHsVarBind, mk_easy_FunBind, mkTopFunBind,-  mkPatSynBind,-  isInfixFunBind,--  -- Literals-  mkHsIntegral, mkHsFractional, mkHsIsString, mkHsString, mkHsStringPrimLit,--  -- Patterns-  mkNPat, mkNPlusKPat, nlVarPat, nlLitPat, nlConVarPat, nlConVarPatName, nlConPat,-  nlConPatName, nlInfixConPat, nlNullaryConPat, nlWildConPat, nlWildPat,-  nlWildPatName, nlTuplePat, mkParPat, nlParPat,-  mkBigLHsVarTup, mkBigLHsTup, mkBigLHsVarPatTup, mkBigLHsPatTup,--  -- Types-  mkHsAppTy, mkHsAppKindTy, userHsTyVarBndrs, userHsLTyVarBndrs,-  mkLHsSigType, mkLHsSigWcType, mkClassOpSigs, mkHsSigEnv,-  nlHsAppTy, nlHsAppKindTy, nlHsTyVar, nlHsFunTy, nlHsParTy, nlHsTyConApp,--  -- Stmts-  mkTransformStmt, mkTransformByStmt, mkBodyStmt, mkBindStmt, mkTcBindStmt,-  mkLastStmt,-  emptyTransStmt, mkGroupUsingStmt, mkGroupByUsingStmt,-  emptyRecStmt, emptyRecStmtName, emptyRecStmtId, mkRecStmt,-  unitRecStmtTc,--  -- Template Haskell-  mkHsSpliceTy, mkHsSpliceE, mkHsSpliceTE, mkUntypedSplice,-  mkHsQuasiQuote, unqualQuasiQuote,--  -- Collecting binders-  isUnliftedHsBind, isBangedHsBind,--  collectLocalBinders, collectHsValBinders, collectHsBindListBinders,-  collectHsIdBinders,-  collectHsBindsBinders, collectHsBindBinders, collectMethodBinders,-  collectPatBinders, collectPatsBinders,-  collectLStmtsBinders, collectStmtsBinders,-  collectLStmtBinders, collectStmtBinders,--  hsLTyClDeclBinders, hsTyClForeignBinders,-  hsPatSynSelectors, getPatSynBinds,-  hsForeignDeclsBinders, hsGroupBinders, hsDataFamInstBinders,--  -- Collecting implicit binders-  lStmtsImplicits, hsValBindsImplicits, lPatImplicits-  ) where--#include "HsVersions.h"--import GhcPrelude--import HsDecls-import HsBinds-import HsExpr-import HsPat-import HsTypes-import HsLit-import PlaceHolder-import HsExtension--import TcEvidence-import RdrName-import Var-import TyCoRep-import Type   ( tyConArgFlags )-import TysWiredIn ( unitTy )-import TcType-import DataCon-import ConLike-import Id-import Name-import NameSet hiding ( unitFV )-import NameEnv-import BasicTypes-import SrcLoc-import FastString-import Util-import Bag-import Outputable-import Constants--import Data.Either-import Data.Function-import Data.List--{--************************************************************************-*                                                                      *-        Some useful helpers for constructing syntax-*                                                                      *-************************************************************************--These functions attempt to construct a not-completely-useless SrcSpan-from their components, compared with the nl* functions below which-just attach noSrcSpan to everything.--}--mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)-mkHsPar e = cL (getLoc e) (HsPar noExt e)--mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p)))-              -> [LPat (GhcPass p)] -> Located (body (GhcPass p))-              -> LMatch (GhcPass p) (Located (body (GhcPass p)))-mkSimpleMatch ctxt pats rhs-  = cL loc $-    Match { m_ext = noExt, m_ctxt = ctxt, m_pats = pats-          , m_grhss = unguardedGRHSs rhs }-  where-    loc = case pats of-                []      -> getLoc rhs-                (pat:_) -> combineSrcSpans (getLoc pat) (getLoc rhs)--unguardedGRHSs :: Located (body (GhcPass p))-               -> GRHSs (GhcPass p) (Located (body (GhcPass p)))-unguardedGRHSs rhs@(dL->L loc _)-  = GRHSs noExt (unguardedRHS loc rhs) (noLoc emptyLocalBinds)--unguardedRHS :: SrcSpan -> Located (body (GhcPass p))-             -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))]-unguardedRHS loc rhs = [cL loc (GRHS noExt [] rhs)]--mkMatchGroup :: (XMG name (Located (body name)) ~ NoExt)-             => Origin -> [LMatch name (Located (body name))]-             -> MatchGroup name (Located (body name))-mkMatchGroup origin matches = MG { mg_ext = noExt-                                 , mg_alts = mkLocatedList matches-                                 , mg_origin = origin }--mkLocatedList ::  [Located a] -> Located [Located a]-mkLocatedList [] = noLoc []-mkLocatedList ms = cL (combineLocs (head ms) (last ms)) ms--mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)-mkHsApp e1 e2 = addCLoc e1 e2 (HsApp noExt e1 e2)--mkHsAppType :: (NoGhcTc (GhcPass id) ~ GhcRn)-            => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id)-mkHsAppType e t = addCLoc e t_body (HsAppType noExt e paren_wct)-  where-    t_body    = hswc_body t-    paren_wct = t { hswc_body = parenthesizeHsType appPrec t_body }--mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn-mkHsAppTypes = foldl' mkHsAppType--mkHsLam :: (XMG (GhcPass p) (LHsExpr (GhcPass p)) ~ NoExt) =>-  [LPat (GhcPass p)] -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)-mkHsLam pats body = mkHsPar (cL (getLoc body) (HsLam noExt matches))-  where-    matches = mkMatchGroup Generated-                           [mkSimpleMatch LambdaExpr pats' body]-    pats' = map (parenthesizePat appPrec) pats--mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc-mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars-                                       <.> mkWpLams dicts) expr---- |A simple case alternative with a single pattern, no binds, no guards;--- pre-typechecking-mkHsCaseAlt :: LPat (GhcPass p) -> (Located (body (GhcPass p)))-            -> LMatch (GhcPass p) (Located (body (GhcPass p)))-mkHsCaseAlt pat expr-  = mkSimpleMatch CaseAlt [pat] expr--nlHsTyApp :: IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id)-nlHsTyApp fun_id tys-  = noLoc (mkHsWrap (mkWpTyApps tys) (HsVar noExt (noLoc fun_id)))--nlHsTyApps :: IdP (GhcPass id) -> [Type] -> [LHsExpr (GhcPass id)]-           -> LHsExpr (GhcPass id)-nlHsTyApps fun_id tys xs = foldl' nlHsApp (nlHsTyApp fun_id tys) xs----------- Adding parens ----------mkLHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)--- Wrap in parens if (hsExprNeedsParens appPrec) says it needs them--- So   'f x'  becomes '(f x)', but '3' stays as '3'-mkLHsPar le@(dL->L loc e)-  | hsExprNeedsParens appPrec e = cL loc (HsPar noExt le)-  | otherwise                   = le--mkParPat :: LPat (GhcPass name) -> LPat (GhcPass name)-mkParPat lp@(dL->L loc p)-  | patNeedsParens appPrec p = cL loc (ParPat noExt lp)-  | otherwise                = lp--nlParPat :: LPat (GhcPass name) -> LPat (GhcPass name)-nlParPat p = noLoc (ParPat noExt p)------------------------------------ These are the bits of syntax that contain rebindable names--- See RnEnv.lookupSyntaxName--mkHsIntegral   :: IntegralLit -> HsOverLit GhcPs-mkHsFractional :: FractionalLit -> HsOverLit GhcPs-mkHsIsString   :: SourceText -> FastString -> HsOverLit GhcPs-mkHsDo         :: HsStmtContext Name -> [ExprLStmt GhcPs] -> HsExpr GhcPs-mkHsComp       :: HsStmtContext Name -> [ExprLStmt GhcPs] -> LHsExpr GhcPs-               -> HsExpr GhcPs--mkNPat      :: Located (HsOverLit GhcPs) -> Maybe (SyntaxExpr GhcPs)-            -> Pat GhcPs-mkNPlusKPat :: Located RdrName -> Located (HsOverLit GhcPs) -> Pat GhcPs--mkLastStmt :: Located (bodyR (GhcPass idR))-           -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))-mkBodyStmt :: Located (bodyR GhcPs)-           -> StmtLR (GhcPass idL) GhcPs (Located (bodyR GhcPs))-mkBindStmt :: (XBindStmt (GhcPass idL) (GhcPass idR)-                         (Located (bodyR (GhcPass idR))) ~ NoExt)-           => LPat (GhcPass idL) -> Located (bodyR (GhcPass idR))-           -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))-mkTcBindStmt :: LPat GhcTc -> Located (bodyR GhcTc)-             -> StmtLR GhcTc GhcTc (Located (bodyR GhcTc))--emptyRecStmt     :: StmtLR (GhcPass idL) GhcPs bodyR-emptyRecStmtName :: StmtLR GhcRn GhcRn bodyR-emptyRecStmtId   :: StmtLR GhcTc GhcTc bodyR-mkRecStmt        :: [LStmtLR (GhcPass idL) GhcPs bodyR]-                 -> StmtLR (GhcPass idL) GhcPs bodyR---mkHsIntegral     i  = OverLit noExt (HsIntegral       i) noExpr-mkHsFractional   f  = OverLit noExt (HsFractional     f) noExpr-mkHsIsString src s  = OverLit noExt (HsIsString   src s) noExpr--mkHsDo ctxt stmts = HsDo noExt ctxt (mkLocatedList stmts)-mkHsComp ctxt stmts expr = mkHsDo ctxt (stmts ++ [last_stmt])-  where-    last_stmt = cL (getLoc expr) $ mkLastStmt expr--mkHsIf :: LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)-       -> HsExpr (GhcPass p)-mkHsIf c a b = HsIf noExt (Just noSyntaxExpr) c a b--mkNPat lit neg     = NPat noExt lit neg noSyntaxExpr-mkNPlusKPat id lit-  = NPlusKPat noExt id lit (unLoc lit) noSyntaxExpr noSyntaxExpr--mkTransformStmt    :: [ExprLStmt GhcPs] -> LHsExpr GhcPs-                   -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)-mkTransformByStmt  :: [ExprLStmt GhcPs] -> LHsExpr GhcPs-                   -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)-mkGroupUsingStmt   :: [ExprLStmt GhcPs] -> LHsExpr GhcPs-                   -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)-mkGroupByUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs-                   -> LHsExpr GhcPs-                   -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)--emptyTransStmt :: StmtLR GhcPs GhcPs (LHsExpr GhcPs)-emptyTransStmt = TransStmt { trS_ext = noExt-                           , trS_form = panic "emptyTransStmt: form"-                           , trS_stmts = [], trS_bndrs = []-                           , trS_by = Nothing, trS_using = noLoc noExpr-                           , trS_ret = noSyntaxExpr, trS_bind = noSyntaxExpr-                           , trS_fmap = noExpr }-mkTransformStmt    ss u   = emptyTransStmt { trS_form = ThenForm,  trS_stmts = ss, trS_using = u }-mkTransformByStmt  ss u b = emptyTransStmt { trS_form = ThenForm,  trS_stmts = ss, trS_using = u, trS_by = Just b }-mkGroupUsingStmt   ss u   = emptyTransStmt { trS_form = GroupForm, trS_stmts = ss, trS_using = u }-mkGroupByUsingStmt ss b u = emptyTransStmt { trS_form = GroupForm, trS_stmts = ss, trS_using = u, trS_by = Just b }--mkLastStmt body = LastStmt noExt body False noSyntaxExpr-mkBodyStmt body-  = BodyStmt noExt body noSyntaxExpr noSyntaxExpr-mkBindStmt pat body-  = BindStmt noExt pat body noSyntaxExpr noSyntaxExpr-mkTcBindStmt pat body = BindStmt unitTy pat body noSyntaxExpr noSyntaxExpr-  -- don't use placeHolderTypeTc above, because that panics during zonking--emptyRecStmt' :: forall idL idR body.-                 XRecStmt (GhcPass idL) (GhcPass idR) body-              -> StmtLR (GhcPass idL) (GhcPass idR) body-emptyRecStmt' tyVal =-   RecStmt-     { recS_stmts = [], recS_later_ids = []-     , recS_rec_ids = []-     , recS_ret_fn = noSyntaxExpr-     , recS_mfix_fn = noSyntaxExpr-     , recS_bind_fn = noSyntaxExpr-     , recS_ext = tyVal }--unitRecStmtTc :: RecStmtTc-unitRecStmtTc = RecStmtTc { recS_bind_ty = unitTy-                          , recS_later_rets = []-                          , recS_rec_rets = []-                          , recS_ret_ty = unitTy }--emptyRecStmt     = emptyRecStmt' noExt-emptyRecStmtName = emptyRecStmt' noExt-emptyRecStmtId   = emptyRecStmt' unitRecStmtTc-                                        -- a panic might trigger during zonking-mkRecStmt stmts  = emptyRecStmt { recS_stmts = stmts }------------------------------------- A useful function for building @OpApps@.  The operator is always a--- variable, and we don't know the fixity yet.-mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs-mkHsOpApp e1 op e2 = OpApp noExt e1 (noLoc (HsVar noExt (noLoc op))) e2--unqualSplice :: RdrName-unqualSplice = mkRdrUnqual (mkVarOccFS (fsLit "splice"))--mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs-mkUntypedSplice hasParen e = HsUntypedSplice noExt hasParen unqualSplice e--mkHsSpliceE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs-mkHsSpliceE hasParen e = HsSpliceE noExt (mkUntypedSplice hasParen e)--mkHsSpliceTE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs-mkHsSpliceTE hasParen e-  = HsSpliceE noExt (HsTypedSplice noExt hasParen unqualSplice e)--mkHsSpliceTy :: SpliceDecoration -> LHsExpr GhcPs -> HsType GhcPs-mkHsSpliceTy hasParen e = HsSpliceTy noExt-                      (HsUntypedSplice noExt hasParen unqualSplice e)--mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs-mkHsQuasiQuote quoter span quote-  = HsQuasiQuote noExt unqualSplice quoter span quote--unqualQuasiQuote :: RdrName-unqualQuasiQuote = mkRdrUnqual (mkVarOccFS (fsLit "quasiquote"))-                -- A name (uniquified later) to-                -- identify the quasi-quote--mkHsString :: String -> HsLit (GhcPass p)-mkHsString s = HsString NoSourceText (mkFastString s)--mkHsStringPrimLit :: FastString -> HsLit (GhcPass p)-mkHsStringPrimLit fs-  = HsStringPrim NoSourceText (fastStringToByteString fs)----------------userHsLTyVarBndrs :: SrcSpan -> [Located (IdP (GhcPass p))]-                  -> [LHsTyVarBndr (GhcPass p)]--- Caller sets location-userHsLTyVarBndrs loc bndrs = [ cL loc (UserTyVar noExt v) | v <- bndrs ]--userHsTyVarBndrs :: SrcSpan -> [IdP (GhcPass p)] -> [LHsTyVarBndr (GhcPass p)]--- Caller sets location-userHsTyVarBndrs loc bndrs = [ cL loc (UserTyVar noExt (cL loc v))-                             | v <- bndrs ]---{--************************************************************************-*                                                                      *-        Constructing syntax with no location info-*                                                                      *-************************************************************************--}--nlHsVar :: IdP (GhcPass id) -> LHsExpr (GhcPass id)-nlHsVar n = noLoc (HsVar noExt (noLoc n))---- NB: Only for LHsExpr **Id**-nlHsDataCon :: DataCon -> LHsExpr GhcTc-nlHsDataCon con = noLoc (HsConLikeOut noExt (RealDataCon con))--nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)-nlHsLit n = noLoc (HsLit noExt n)--nlHsIntLit :: Integer -> LHsExpr (GhcPass p)-nlHsIntLit n = noLoc (HsLit noExt (HsInt noExt (mkIntegralLit n)))--nlVarPat :: IdP (GhcPass id) -> LPat (GhcPass id)-nlVarPat n = noLoc (VarPat noExt (noLoc n))--nlLitPat :: HsLit GhcPs -> LPat GhcPs-nlLitPat l = noLoc (LitPat noExt l)--nlHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)-nlHsApp f x = noLoc (HsApp noExt f (mkLHsPar x))--nlHsSyntaxApps :: SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)]-               -> LHsExpr (GhcPass id)-nlHsSyntaxApps (SyntaxExpr { syn_expr      = fun-                           , syn_arg_wraps = arg_wraps-                           , syn_res_wrap  = res_wrap }) args-  | [] <- arg_wraps   -- in the noSyntaxExpr case-  = ASSERT( isIdHsWrapper res_wrap )-    foldl' nlHsApp (noLoc fun) args--  | otherwise-  = mkLHsWrap res_wrap (foldl' nlHsApp (noLoc fun) (zipWithEqual "nlHsSyntaxApps"-                                                     mkLHsWrap arg_wraps args))--nlHsApps :: IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)-nlHsApps f xs = foldl' nlHsApp (nlHsVar f) xs--nlHsVarApps :: IdP (GhcPass id) -> [IdP (GhcPass id)] -> LHsExpr (GhcPass id)-nlHsVarApps f xs = noLoc (foldl' mk (HsVar noExt (noLoc f))-                                               (map ((HsVar noExt) . noLoc) xs))-                 where-                   mk f a = HsApp noExt (noLoc f) (noLoc a)--nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs-nlConVarPat con vars = nlConPat con (map nlVarPat vars)--nlConVarPatName :: Name -> [Name] -> LPat GhcRn-nlConVarPatName con vars = nlConPatName con (map nlVarPat vars)--nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs-nlInfixConPat con l r = noLoc (ConPatIn (noLoc con)-                              (InfixCon (parenthesizePat opPrec l)-                                        (parenthesizePat opPrec r)))--nlConPat :: RdrName -> [LPat GhcPs] -> LPat GhcPs-nlConPat con pats =-  noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))--nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn-nlConPatName con pats =-  noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))--nlNullaryConPat :: IdP (GhcPass p) -> LPat (GhcPass p)-nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon []))--nlWildConPat :: DataCon -> LPat GhcPs-nlWildConPat con = noLoc (ConPatIn (noLoc (getRdrName con))-                         (PrefixCon (nOfThem (dataConSourceArity con)-                                             nlWildPat)))--nlWildPat :: LPat GhcPs-nlWildPat  = noLoc (WildPat noExt )  -- Pre-typechecking--nlWildPatName :: LPat GhcRn-nlWildPatName  = noLoc (WildPat noExt )  -- Pre-typechecking--nlHsDo :: HsStmtContext Name -> [LStmt GhcPs (LHsExpr GhcPs)]-       -> LHsExpr GhcPs-nlHsDo ctxt stmts = noLoc (mkHsDo ctxt stmts)--nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs-nlHsOpApp e1 op e2 = noLoc (mkHsOpApp e1 op e2)--nlHsLam  :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs-nlHsPar  :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)-nlHsIf   :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)-         -> LHsExpr (GhcPass id)-nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)]-         -> LHsExpr GhcPs-nlList   :: [LHsExpr GhcPs] -> LHsExpr GhcPs--nlHsLam match          = noLoc (HsLam noExt (mkMatchGroup Generated [match]))-nlHsPar e              = noLoc (HsPar noExt e)---- Note [Rebindable nlHsIf]--- nlHsIf should generate if-expressions which are NOT subject to--- RebindableSyntax, so the first field of HsIf is Nothing. (#12080)-nlHsIf cond true false = noLoc (HsIf noExt Nothing cond true false)--nlHsCase expr matches-  = noLoc (HsCase noExt expr (mkMatchGroup Generated matches))-nlList exprs          = noLoc (ExplicitList noExt Nothing exprs)--nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)-nlHsTyVar :: IdP (GhcPass p)                            -> LHsType (GhcPass p)-nlHsFunTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)-nlHsParTy :: LHsType (GhcPass p)                        -> LHsType (GhcPass p)--nlHsAppTy f t = noLoc (HsAppTy noExt f (parenthesizeHsType appPrec t))-nlHsTyVar x   = noLoc (HsTyVar noExt NotPromoted (noLoc x))-nlHsFunTy a b = noLoc (HsFunTy noExt (parenthesizeHsType funPrec a) b)-nlHsParTy t   = noLoc (HsParTy noExt t)--nlHsTyConApp :: IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)-nlHsTyConApp tycon tys  = foldl' nlHsAppTy (nlHsTyVar tycon) tys--nlHsAppKindTy ::-  LHsType (GhcPass p) -> LHsKind (GhcPass p) -> LHsType (GhcPass p)-nlHsAppKindTy f k = noLoc (HsAppKindTy noSrcSpan f (parenthesizeHsType appPrec k))--{--Tuples.  All these functions are *pre-typechecker* because they lack-types on the tuple.--}--mkLHsTupleExpr :: [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a)--- Makes a pre-typechecker boxed tuple, deals with 1 case-mkLHsTupleExpr [e] = e-mkLHsTupleExpr es-  = noLoc $ ExplicitTuple noExt (map (noLoc . (Present noExt)) es) Boxed--mkLHsVarTuple :: [IdP (GhcPass a)] -> LHsExpr (GhcPass a)-mkLHsVarTuple ids  = mkLHsTupleExpr (map nlHsVar ids)--nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs-nlTuplePat pats box = noLoc (TuplePat noExt pats box)--missingTupArg :: HsTupArg GhcPs-missingTupArg = Missing noExt--mkLHsPatTup :: [LPat GhcRn] -> LPat GhcRn-mkLHsPatTup []     = noLoc $ TuplePat noExt [] Boxed-mkLHsPatTup [lpat] = lpat-mkLHsPatTup lpats  = cL (getLoc (head lpats)) $ TuplePat noExt lpats Boxed---- The Big equivalents for the source tuple expressions-mkBigLHsVarTup :: [IdP (GhcPass id)] -> LHsExpr (GhcPass id)-mkBigLHsVarTup ids = mkBigLHsTup (map nlHsVar ids)--mkBigLHsTup :: [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)-mkBigLHsTup = mkChunkified mkLHsTupleExpr---- The Big equivalents for the source tuple patterns-mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn-mkBigLHsVarPatTup bs = mkBigLHsPatTup (map nlVarPat bs)--mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn-mkBigLHsPatTup = mkChunkified mkLHsPatTup---- $big_tuples--- #big_tuples#------ GHCs built in tuples can only go up to 'mAX_TUPLE_SIZE' in arity, but--- we might concievably want to build such a massive tuple as part of the--- output of a desugaring stage (notably that for list comprehensions).------ We call tuples above this size \"big tuples\", and emulate them by--- creating and pattern matching on >nested< tuples that are expressible--- by GHC.------ Nesting policy: it's better to have a 2-tuple of 10-tuples (3 objects)--- than a 10-tuple of 2-tuples (11 objects), so we want the leaves of any--- construction to be big.------ If you just use the 'mkBigCoreTup', 'mkBigCoreVarTupTy', 'mkTupleSelector'--- and 'mkTupleCase' functions to do all your work with tuples you should be--- fine, and not have to worry about the arity limitation at all.---- | Lifts a \"small\" constructor into a \"big\" constructor by recursive decompositon-mkChunkified :: ([a] -> a)      -- ^ \"Small\" constructor function, of maximum input arity 'mAX_TUPLE_SIZE'-             -> [a]             -- ^ Possible \"big\" list of things to construct from-             -> a               -- ^ Constructed thing made possible by recursive decomposition-mkChunkified small_tuple as = mk_big_tuple (chunkify as)-  where-        -- Each sub-list is short enough to fit in a tuple-    mk_big_tuple [as] = small_tuple as-    mk_big_tuple as_s = mk_big_tuple (chunkify (map small_tuple as_s))--chunkify :: [a] -> [[a]]--- ^ Split a list into lists that are small enough to have a corresponding--- tuple arity. The sub-lists of the result all have length <= 'mAX_TUPLE_SIZE'--- But there may be more than 'mAX_TUPLE_SIZE' sub-lists-chunkify xs-  | n_xs <= mAX_TUPLE_SIZE = [xs]-  | otherwise              = split xs-  where-    n_xs     = length xs-    split [] = []-    split xs = take mAX_TUPLE_SIZE xs : split (drop mAX_TUPLE_SIZE xs)--{--************************************************************************-*                                                                      *-        LHsSigType and LHsSigWcType-*                                                                      *-********************************************************************* -}--mkLHsSigType :: LHsType GhcPs -> LHsSigType GhcPs-mkLHsSigType ty = mkHsImplicitBndrs ty--mkLHsSigWcType :: LHsType GhcPs -> LHsSigWcType GhcPs-mkLHsSigWcType ty = mkHsWildCardBndrs (mkHsImplicitBndrs ty)--mkHsSigEnv :: forall a. (LSig GhcRn -> Maybe ([Located Name], a))-                     -> [LSig GhcRn]-                     -> NameEnv a-mkHsSigEnv get_info sigs-  = mkNameEnv          (mk_pairs ordinary_sigs)-   `extendNameEnvList` (mk_pairs gen_dm_sigs)-   -- The subtlety is this: in a class decl with a-   -- default-method signature as well as a method signature-   -- we want the latter to win (Trac #12533)-   --    class C x where-   --       op :: forall a . x a -> x a-   --       default op :: forall b . x b -> x b-   --       op x = ...(e :: b -> b)...-   -- The scoped type variables of the 'default op', namely 'b',-   -- scope over the code for op.   The 'forall a' does not!-   -- This applies both in the renamer and typechecker, both-   -- of which use this function-  where-    (gen_dm_sigs, ordinary_sigs) = partition is_gen_dm_sig sigs-    is_gen_dm_sig (dL->L _ (ClassOpSig _ True _ _)) = True-    is_gen_dm_sig _                                 = False--    mk_pairs :: [LSig GhcRn] -> [(Name, a)]-    mk_pairs sigs = [ (n,a) | Just (ns,a) <- map get_info sigs-                            , (dL->L _ n) <- ns ]--mkClassOpSigs :: [LSig GhcPs] -> [LSig GhcPs]--- Convert TypeSig to ClassOpSig--- The former is what is parsed, but the latter is--- what we need in class/instance declarations-mkClassOpSigs sigs-  = map fiddle sigs-  where-    fiddle (dL->L loc (TypeSig _ nms ty))-      = cL loc (ClassOpSig noExt False nms (dropWildCards ty))-    fiddle sig = sig--typeToLHsType :: Type -> LHsType GhcPs--- ^ Converting a Type to an HsType RdrName--- This is needed to implement GeneralizedNewtypeDeriving.------ Note that we use 'getRdrName' extensively, which--- generates Exact RdrNames rather than strings.-typeToLHsType ty-  = go ty-  where-    go :: Type -> LHsType GhcPs-    go ty@(FunTy arg _)-      | isPredTy arg-      , (theta, tau) <- tcSplitPhiTy ty-      = noLoc (HsQualTy { hst_ctxt = noLoc (map go theta)-                        , hst_xqual = noExt-                        , hst_body = go tau })-    go (FunTy arg res) = nlHsFunTy (go arg) (go res)-    go ty@(ForAllTy {})-      | (tvs, tau) <- tcSplitForAllTys ty-      = noLoc (HsForAllTy { hst_bndrs = map go_tv tvs-                          , hst_xforall = noExt-                          , hst_body = go tau })-    go (TyVarTy tv)         = nlHsTyVar (getRdrName tv)-    go (AppTy t1 t2)        = nlHsAppTy (go t1) (go t2)-    go (LitTy (NumTyLit n))-      = noLoc $ HsTyLit NoExt (HsNumTy NoSourceText n)-    go (LitTy (StrTyLit s))-      = noLoc $ HsTyLit NoExt (HsStrTy NoSourceText s)-    go ty@(TyConApp tc args)-      | tyConAppNeedsKindSig True tc (length args)-        -- We must produce an explicit kind signature here to make certain-        -- programs kind-check. See Note [Kind signatures in typeToLHsType].-      = nlHsParTy $ noLoc $ HsKindSig NoExt lhs_ty (go (typeKind ty))-      | otherwise = lhs_ty-       where-        arg_flags :: [ArgFlag]-        arg_flags = tyConArgFlags tc args--        lhs_ty :: LHsType GhcPs-        lhs_ty = foldl' (\f (arg, flag) ->-                          let arg' = go arg in-                          case flag of-                            Inferred  -> f-                            Specified -> f `nlHsAppKindTy` arg'-                            Required  -> f `nlHsAppTy`     arg')-                        (nlHsTyVar (getRdrName tc))-                        (zip args arg_flags)-    go (CastTy ty _)        = go ty-    go (CoercionTy co)      = pprPanic "toLHsSigWcType" (ppr co)--         -- Source-language types have _invisible_ kind arguments,-         -- so we must remove them here (Trac #8563)--    go_tv :: TyVar -> LHsTyVarBndr GhcPs-    go_tv tv = noLoc $ KindedTyVar noExt (noLoc (getRdrName tv))-                                   (go (tyVarKind tv))--{--Note [Kind signatures in typeToLHsType]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There are types that typeToLHsType can produce which require explicit kind-signatures in order to kind-check. Here is an example from Trac #14579:--  -- type P :: forall {k} {t :: k}. Proxy t-  type P = 'Proxy--  -- type Wat :: forall a. Proxy a -> *-  newtype Wat (x :: Proxy (a :: Type)) = MkWat (Maybe a)-    deriving Eq--  -- type Wat2 :: forall {a}. Proxy a -> *-  type Wat2 = Wat--  -- type Glurp :: * -> *-  newtype Glurp a = MkGlurp (Wat2 (P :: Proxy a))-    deriving Eq--The derived Eq instance for Glurp (without any kind signatures) would be:--  instance Eq a => Eq (Glurp a) where-    (==) = coerce @(Wat2 P  -> Wat2 P  -> Bool)-                  @(Glurp a -> Glurp a -> Bool)-                  (==) :: Glurp a -> Glurp a -> Bool--(Where the visible type applications use types produced by typeToLHsType.)--The type P (in Wat2 P) has an underspecified kind, so we must ensure that-typeToLHsType ascribes it with its kind: Wat2 (P :: Proxy a). To accomplish-this, whenever we see an application of a tycon to some arguments, we use-the tyConAppNeedsKindSig function to determine if it requires an explicit kind-signature to resolve some ambiguity. (See Note-Note [When does a tycon application need an explicit kind signature?] for a-more detailed explanation of how this works.)--Note that we pass True to tyConAppNeedsKindSig since we are generated code with-visible kind applications, so even specified arguments count towards injective-positions in the kind of the tycon.--}--{- *********************************************************************-*                                                                      *-    --------- HsWrappers: type args, dict args, casts ----------*                                                                      *-********************************************************************* -}--mkLHsWrap :: HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)-mkLHsWrap co_fn (dL->L loc e) = cL loc (mkHsWrap co_fn e)---- Avoid (HsWrap co (HsWrap co' _)).--- See Note [Detecting forced eta expansion] in DsExpr-mkHsWrap :: HsWrapper -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)-mkHsWrap co_fn e | isIdHsWrapper co_fn = e-mkHsWrap co_fn (HsWrap _ co_fn' e)     = mkHsWrap (co_fn <.> co_fn') e-mkHsWrap co_fn e                       = HsWrap noExt co_fn e--mkHsWrapCo :: TcCoercionN   -- A Nominal coercion  a ~N b-           -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)-mkHsWrapCo co e = mkHsWrap (mkWpCastN co) e--mkHsWrapCoR :: TcCoercionR   -- A Representational coercion  a ~R b-            -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)-mkHsWrapCoR co e = mkHsWrap (mkWpCastR co) e--mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)-mkLHsWrapCo co (dL->L loc e) = cL loc (mkHsWrapCo co e)--mkHsCmdWrap :: HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p)-mkHsCmdWrap w cmd | isIdHsWrapper w = cmd-                  | otherwise       = HsCmdWrap noExt w cmd--mkLHsCmdWrap :: HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p)-mkLHsCmdWrap w (dL->L loc c) = cL loc (mkHsCmdWrap w c)--mkHsWrapPat :: HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)-mkHsWrapPat co_fn p ty | isIdHsWrapper co_fn = p-                       | otherwise           = CoPat noExt co_fn p ty--mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)-mkHsWrapPatCo co pat ty | isTcReflCo co = pat-                        | otherwise    = CoPat noExt (mkWpCastN co) pat ty--mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc-mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr--{--l-************************************************************************-*                                                                      *-                Bindings; with a location at the top-*                                                                      *-************************************************************************--}--mkFunBind :: Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)]-          -> HsBind GhcPs--- Not infix, with place holders for coercion and free vars-mkFunBind fn ms = FunBind { fun_id = fn-                          , fun_matches = mkMatchGroup Generated ms-                          , fun_co_fn = idHsWrapper-                          , fun_ext = noExt-                          , fun_tick = [] }--mkTopFunBind :: Origin -> Located Name -> [LMatch GhcRn (LHsExpr GhcRn)]-             -> HsBind GhcRn--- In Name-land, with empty bind_fvs-mkTopFunBind origin fn ms = FunBind { fun_id = fn-                                    , fun_matches = mkMatchGroup origin ms-                                    , fun_co_fn = idHsWrapper-                                    , fun_ext  = emptyNameSet -- NB: closed-                                                              --     binding-                                    , fun_tick = [] }--mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr GhcPs -> LHsBind GhcPs-mkHsVarBind loc var rhs = mk_easy_FunBind loc var [] rhs--mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)-mkVarBind var rhs = cL (getLoc rhs) $-                    VarBind { var_ext = noExt,-                              var_id = var, var_rhs = rhs, var_inline = False }--mkPatSynBind :: Located RdrName -> HsPatSynDetails (Located RdrName)-             -> LPat GhcPs -> HsPatSynDir GhcPs -> HsBind GhcPs-mkPatSynBind name details lpat dir = PatSynBind noExt psb-  where-    psb = PSB{ psb_ext = noExt-             , psb_id = name-             , psb_args = details-             , psb_def = lpat-             , psb_dir = dir }---- |If any of the matches in the 'FunBind' are infix, the 'FunBind' is--- considered infix.-isInfixFunBind :: HsBindLR id1 id2 -> Bool-isInfixFunBind (FunBind _ _ (MG _ matches _) _ _)-  = any (isInfixMatch . unLoc) (unLoc matches)-isInfixFunBind _ = False----------------mk_easy_FunBind :: SrcSpan -> RdrName -> [LPat GhcPs]-                -> LHsExpr GhcPs -> LHsBind GhcPs-mk_easy_FunBind loc fun pats expr-  = cL loc $ mkFunBind (cL loc fun)-              [mkMatch (mkPrefixFunRhs (cL loc fun)) pats expr-                       (noLoc emptyLocalBinds)]---- | Make a prefix, non-strict function 'HsMatchContext'-mkPrefixFunRhs :: Located id -> HsMatchContext id-mkPrefixFunRhs n = FunRhs { mc_fun = n-                          , mc_fixity = Prefix-                          , mc_strictness = NoSrcStrict }---------------mkMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p)))-        -> [LPat (GhcPass p)] -> LHsExpr (GhcPass p)-        -> Located (HsLocalBinds (GhcPass p))-        -> LMatch (GhcPass p) (LHsExpr (GhcPass p))-mkMatch ctxt pats expr lbinds-  = noLoc (Match { m_ext   = noExt-                 , m_ctxt  = ctxt-                 , m_pats  = map paren pats-                 , m_grhss = GRHSs noExt (unguardedRHS noSrcSpan expr) lbinds })-  where-    paren lp@(dL->L l p)-      | patNeedsParens appPrec p = cL l (ParPat noExt lp)-      | otherwise                = lp--{--************************************************************************-*                                                                      *-        Collecting binders-*                                                                      *-************************************************************************--Get all the binders in some HsBindGroups, IN THE ORDER OF APPEARANCE. eg.--...-where-  (x, y) = ...-  f i j  = ...-  [a, b] = ...--it should return [x, y, f, a, b] (remember, order important).--Note [Collect binders only after renaming]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-These functions should only be used on HsSyn *after* the renamer,-to return a [Name] or [Id].  Before renaming the record punning-and wild-card mechanism makes it hard to know what is bound.-So these functions should not be applied to (HsSyn RdrName)--Note [Unlifted id check in isUnliftedHsBind]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The function isUnliftedHsBind is used to complain if we make a top-level-binding for a variable of unlifted type.--Such a binding is illegal if the top-level binding would be unlifted;-but also if the local letrec generated by desugaring AbsBinds would be.-E.g.-      f :: Num a => (# a, a #)-      g :: Num a => a -> a-      f = ...g...-      g = ...g...--The top-level bindings for f,g are not unlifted (because of the Num a =>),-but the local, recursive, monomorphic bindings are:--      t = /\a \(d:Num a).-         letrec fm :: (# a, a #) = ...g...-                gm :: a -> a = ...f...-         in (fm, gm)--Here the binding for 'fm' is illegal.  So generally we check the abe_mono types.--BUT we have a special case when abs_sig is true;-  see HsBinds Note [The abs_sig field of AbsBinds]--}------------------- Bindings ------------------------------ | Should we treat this as an unlifted bind? This will be true for any--- bind that binds an unlifted variable, but we must be careful around--- AbsBinds. See Note [Unlifted id check in isUnliftedHsBind]. For usage--- information, see Note [Strict binds check] is DsBinds.-isUnliftedHsBind :: HsBind GhcTc -> Bool  -- works only over typechecked binds-isUnliftedHsBind bind-  | AbsBinds { abs_exports = exports, abs_sig = has_sig } <- bind-  = if has_sig-    then any (is_unlifted_id . abe_poly) exports-    else any (is_unlifted_id . abe_mono) exports-    -- If has_sig is True we wil never generate a binding for abe_mono,-    -- so we don't need to worry about it being unlifted. The abe_poly-    -- binding might not be: e.g. forall a. Num a => (# a, a #)--  | otherwise-  = any is_unlifted_id (collectHsBindBinders bind)-  where-    is_unlifted_id id = isUnliftedType (idType id)---- | Is a binding a strict variable or pattern bind (e.g. @!x = ...@)?-isBangedHsBind :: HsBind GhcTc -> Bool-isBangedHsBind (AbsBinds { abs_binds = binds })-  = anyBag (isBangedHsBind . unLoc) binds-isBangedHsBind (FunBind {fun_matches = matches})-  | [dL->L _ match] <- unLoc $ mg_alts matches-  , FunRhs{mc_strictness = SrcStrict} <- m_ctxt match-  = True-isBangedHsBind (PatBind {pat_lhs = pat})-  = isBangedLPat pat-isBangedHsBind _-  = False--collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR)-                    -> [IdP (GhcPass idL)]-collectLocalBinders (HsValBinds _ binds) = collectHsIdBinders binds-                                         -- No pattern synonyms here-collectLocalBinders (HsIPBinds {})      = []-collectLocalBinders (EmptyLocalBinds _) = []-collectLocalBinders (XHsLocalBindsLR _) = []--collectHsIdBinders, collectHsValBinders-  :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]--- Collect Id binders only, or Ids + pattern synonyms, respectively-collectHsIdBinders  = collect_hs_val_binders True-collectHsValBinders = collect_hs_val_binders False--collectHsBindBinders :: (SrcSpanLess (LPat p) ~ Pat p, HasSrcSpan (LPat p))=>-                        HsBindLR p idR -> [IdP p]--- Collect both Ids and pattern-synonym binders-collectHsBindBinders b = collect_bind False b []--collectHsBindsBinders :: LHsBindsLR (GhcPass p) idR -> [IdP (GhcPass p)]-collectHsBindsBinders binds = collect_binds False binds []--collectHsBindListBinders :: [LHsBindLR (GhcPass p) idR] -> [IdP (GhcPass p)]--- Same as collectHsBindsBinders, but works over a list of bindings-collectHsBindListBinders = foldr (collect_bind False . unLoc) []--collect_hs_val_binders :: Bool -> HsValBindsLR (GhcPass idL) (GhcPass idR)-                       -> [IdP (GhcPass idL)]-collect_hs_val_binders ps (ValBinds _ binds _) = collect_binds ps binds []-collect_hs_val_binders ps (XValBindsLR (NValBinds binds _))-  = collect_out_binds ps binds--collect_out_binds :: Bool -> [(RecFlag, LHsBinds (GhcPass p))] ->-                     [IdP (GhcPass p)]-collect_out_binds ps = foldr (collect_binds ps . snd) []--collect_binds :: Bool -> LHsBindsLR (GhcPass p) idR ->-                 [IdP (GhcPass p)] -> [IdP (GhcPass p)]--- Collect Ids, or Ids + pattern synonyms, depending on boolean flag-collect_binds ps binds acc = foldrBag (collect_bind ps . unLoc) acc binds--collect_bind :: (SrcSpanLess (LPat p) ~ Pat p , HasSrcSpan (LPat p)) =>-                Bool -> HsBindLR p idR -> [IdP p] -> [IdP p]-collect_bind _ (PatBind { pat_lhs = p })           acc = collect_lpat p acc-collect_bind _ (FunBind { fun_id = (dL->L _ f) })  acc = f : acc-collect_bind _ (VarBind { var_id = f })            acc = f : acc-collect_bind _ (AbsBinds { abs_exports = dbinds }) acc = map abe_poly dbinds ++ acc-        -- I don't think we want the binders from the abe_binds--        -- binding (hence see AbsBinds) is in zonking in TcHsSyn-collect_bind omitPatSyn (PatSynBind _ (PSB { psb_id = (dL->L _ ps) })) acc-  | omitPatSyn                  = acc-  | otherwise                   = ps : acc-collect_bind _ (PatSynBind _ (XPatSynBind _)) acc = acc-collect_bind _ (XHsBindsLR _) acc = acc--collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)]--- Used exclusively for the bindings of an instance decl which are all FunBinds-collectMethodBinders binds = foldrBag (get . unLoc) [] binds-  where-    get (FunBind { fun_id = f }) fs = f : fs-    get _                        fs = fs-       -- Someone else complains about non-FunBinds------------------- Statements ---------------------------collectLStmtsBinders :: [LStmtLR (GhcPass idL) (GhcPass idR) body]-                     -> [IdP (GhcPass idL)]-collectLStmtsBinders = concatMap collectLStmtBinders--collectStmtsBinders :: [StmtLR (GhcPass idL) (GhcPass idR) body]-                    -> [IdP (GhcPass idL)]-collectStmtsBinders = concatMap collectStmtBinders--collectLStmtBinders :: LStmtLR (GhcPass idL) (GhcPass idR) body-                    -> [IdP (GhcPass idL)]-collectLStmtBinders = collectStmtBinders . unLoc--collectStmtBinders :: StmtLR (GhcPass idL) (GhcPass idR) body-                   -> [IdP (GhcPass idL)]-  -- Id Binders for a Stmt... [but what about pattern-sig type vars]?-collectStmtBinders (BindStmt _ pat _ _ _)  = collectPatBinders pat-collectStmtBinders (LetStmt _  binds)      = collectLocalBinders (unLoc binds)-collectStmtBinders (BodyStmt {})           = []-collectStmtBinders (LastStmt {})           = []-collectStmtBinders (ParStmt _ xs _ _)      = collectLStmtsBinders-                                    $ [s | ParStmtBlock _ ss _ _ <- xs, s <- ss]-collectStmtBinders (TransStmt { trS_stmts = stmts }) = collectLStmtsBinders stmts-collectStmtBinders (RecStmt { recS_stmts = ss })     = collectLStmtsBinders ss-collectStmtBinders (ApplicativeStmt _ args _) = concatMap collectArgBinders args- where-  collectArgBinders (_, ApplicativeArgOne _ pat _ _) = collectPatBinders pat-  collectArgBinders (_, ApplicativeArgMany _ _ _ pat) = collectPatBinders pat-  collectArgBinders _ = []-collectStmtBinders XStmtLR{} = panic "collectStmtBinders"-------------------- Patterns ---------------------------collectPatBinders :: LPat (GhcPass p) -> [IdP (GhcPass p)]-collectPatBinders pat = collect_lpat pat []--collectPatsBinders :: [LPat (GhcPass p)] -> [IdP (GhcPass p)]-collectPatsBinders pats = foldr collect_lpat [] pats----------------collect_lpat :: (SrcSpanLess (LPat p) ~ Pat p , HasSrcSpan (LPat p)) =>-                 LPat p -> [IdP p] -> [IdP p]-collect_lpat p bndrs-  = go (unLoc p)-  where-    go (VarPat _ var)             = unLoc var : bndrs-    go (WildPat _)                = bndrs-    go (LazyPat _ pat)            = collect_lpat pat bndrs-    go (BangPat _ pat)            = collect_lpat pat bndrs-    go (AsPat _ a pat)            = unLoc a : collect_lpat pat bndrs-    go (ViewPat _ _ pat)          = collect_lpat pat bndrs-    go (ParPat _ pat)             = collect_lpat pat bndrs--    go (ListPat _ pats)           = foldr collect_lpat bndrs pats-    go (TuplePat _ pats _)        = foldr collect_lpat bndrs pats-    go (SumPat _ pat _ _)         = collect_lpat pat bndrs--    go (ConPatIn _ ps)            = foldr collect_lpat bndrs (hsConPatArgs ps)-    go (ConPatOut {pat_args=ps})  = foldr collect_lpat bndrs (hsConPatArgs ps)-        -- See Note [Dictionary binders in ConPatOut]-    go (LitPat _ _)               = bndrs-    go (NPat {})                  = bndrs-    go (NPlusKPat _ n _ _ _ _)    = unLoc n : bndrs--    go (SigPat _ pat _)           = collect_lpat pat bndrs--    go (SplicePat _ (HsSpliced _ _ (HsSplicedPat pat)))-                                  = go pat-    go (SplicePat _ _)            = bndrs-    go (CoPat _ _ pat _)          = go pat-    go (XPat {})                  = bndrs--{--Note [Dictionary binders in ConPatOut] See also same Note in DsArrows-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Do *not* gather (a) dictionary and (b) dictionary bindings as binders-of a ConPatOut pattern.  For most calls it doesn't matter, because-it's pre-typechecker and there are no ConPatOuts.  But it does matter-more in the desugarer; for example, DsUtils.mkSelectorBinds uses-collectPatBinders.  In a lazy pattern, for example f ~(C x y) = ...,-we want to generate bindings for x,y but not for dictionaries bound by-C.  (The type checker ensures they would not be used.)--Desugaring of arrow case expressions needs these bindings (see DsArrows-and arrowcase1), but SPJ (Jan 2007) says it's safer for it to use its-own pat-binder-collector:--Here's the problem.  Consider--data T a where-   C :: Num a => a -> Int -> T a--f ~(C (n+1) m) = (n,m)--Here, the pattern (C (n+1)) binds a hidden dictionary (d::Num a),-and *also* uses that dictionary to match the (n+1) pattern.  Yet, the-variables bound by the lazy pattern are n,m, *not* the dictionary d.-So in mkSelectorBinds in DsUtils, we want just m,n as the variables bound.--}--hsGroupBinders :: HsGroup GhcRn -> [Name]-hsGroupBinders (HsGroup { hs_valds = val_decls, hs_tyclds = tycl_decls,-                          hs_fords = foreign_decls })-  =  collectHsValBinders val_decls-  ++ hsTyClForeignBinders tycl_decls foreign_decls-hsGroupBinders (XHsGroup {}) = panic "hsGroupBinders"--hsTyClForeignBinders :: [TyClGroup GhcRn]-                     -> [LForeignDecl GhcRn]-                     -> [Name]--- We need to look at instance declarations too,--- because their associated types may bind data constructors-hsTyClForeignBinders tycl_decls foreign_decls-  =    map unLoc (hsForeignDeclsBinders foreign_decls)-    ++ getSelectorNames-         (foldMap (foldMap hsLTyClDeclBinders . group_tyclds) tycl_decls-         `mappend`-         foldMap (foldMap hsLInstDeclBinders . group_instds) tycl_decls)-  where-    getSelectorNames :: ([Located Name], [LFieldOcc GhcRn]) -> [Name]-    getSelectorNames (ns, fs) = map unLoc ns ++ map (extFieldOcc . unLoc) fs----------------------hsLTyClDeclBinders :: Located (TyClDecl pass)-                   -> ([Located (IdP pass)], [LFieldOcc pass])--- ^ Returns all the /binding/ names of the decl.  The first one is--- guaranteed to be the name of the decl. The first component--- represents all binding names except record fields; the second--- represents field occurrences. For record fields mentioned in--- multiple constructors, the SrcLoc will be from the first occurrence.------ Each returned (Located name) has a SrcSpan for the /whole/ declaration.--- See Note [SrcSpan for binders]--hsLTyClDeclBinders (dL->L loc (FamDecl { tcdFam = FamilyDecl-                                            { fdLName = (dL->L _ name) } }))-  = ([cL loc name], [])-hsLTyClDeclBinders (dL->L _ (FamDecl { tcdFam = XFamilyDecl _ }))-  = panic "hsLTyClDeclBinders"-hsLTyClDeclBinders (dL->L loc (SynDecl-                               { tcdLName = (dL->L _ name) }))-  = ([cL loc name], [])-hsLTyClDeclBinders (dL->L loc (ClassDecl-                               { tcdLName = (dL->L _ cls_name)-                               , tcdSigs  = sigs-                               , tcdATs   = ats }))-  = (cL loc cls_name :-     [ cL fam_loc fam_name | (dL->L fam_loc (FamilyDecl-                                        { fdLName = L _ fam_name })) <- ats ]-     ++-     [ cL mem_loc mem_name | (dL->L mem_loc (ClassOpSig _ False ns _)) <- sigs-                           , (dL->L _ mem_name) <- ns ]-    , [])-hsLTyClDeclBinders (dL->L loc (DataDecl    { tcdLName = (dL->L _ name)-                                           , tcdDataDefn = defn }))-  = (\ (xs, ys) -> (cL loc name : xs, ys)) $ hsDataDefnBinders defn-hsLTyClDeclBinders (dL->L _ (XTyClDecl _)) = panic "hsLTyClDeclBinders"-hsLTyClDeclBinders _ = panic "hsLTyClDeclBinders: Impossible Match"-                             -- due to #15884-----------------------hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)]--- See Note [SrcSpan for binders]-hsForeignDeclsBinders foreign_decls-  = [ cL decl_loc n-    | (dL->L decl_loc (ForeignImport { fd_name = (dL->L _ n) }))-        <- foreign_decls]-----------------------hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)]--- Collects record pattern-synonym selectors only; the pattern synonym--- names are collected by collectHsValBinders.-hsPatSynSelectors (ValBinds _ _ _) = panic "hsPatSynSelectors"-hsPatSynSelectors (XValBindsLR (NValBinds binds _))-  = foldrBag addPatSynSelector [] . unionManyBags $ map snd binds--addPatSynSelector:: LHsBind p -> [IdP p] -> [IdP p]-addPatSynSelector bind sels-  | PatSynBind _ (PSB { psb_args = RecCon as }) <- unLoc bind-  = map (unLoc . recordPatSynSelectorId) as ++ sels-  | otherwise = sels--getPatSynBinds :: [(RecFlag, LHsBinds id)] -> [PatSynBind id id]-getPatSynBinds binds-  = [ psb | (_, lbinds) <- binds-          , (dL->L _ (PatSynBind _ psb)) <- bagToList lbinds ]----------------------hsLInstDeclBinders :: LInstDecl (GhcPass p)-                   -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)])-hsLInstDeclBinders (dL->L _ (ClsInstD-                             { cid_inst = ClsInstDecl-                                          { cid_datafam_insts = dfis }}))-  = foldMap (hsDataFamInstBinders . unLoc) dfis-hsLInstDeclBinders (dL->L _ (DataFamInstD { dfid_inst = fi }))-  = hsDataFamInstBinders fi-hsLInstDeclBinders (dL->L _ (TyFamInstD {})) = mempty-hsLInstDeclBinders (dL->L _ (ClsInstD _ (XClsInstDecl {})))-  = panic "hsLInstDeclBinders"-hsLInstDeclBinders (dL->L _ (XInstDecl _))-  = panic "hsLInstDeclBinders"-hsLInstDeclBinders _ = panic "hsLInstDeclBinders: Impossible Match"-                             -- due to #15884------------------------ the SrcLoc returned are for the whole declarations, not just the names-hsDataFamInstBinders :: DataFamInstDecl pass-                     -> ([Located (IdP pass)], [LFieldOcc pass])-hsDataFamInstBinders (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-                       FamEqn { feqn_rhs = defn }}})-  = hsDataDefnBinders defn-  -- There can't be repeated symbols because only data instances have binders-hsDataFamInstBinders (DataFamInstDecl-                                    { dfid_eqn = HsIB { hsib_body = XFamEqn _}})-  = panic "hsDataFamInstBinders"-hsDataFamInstBinders (DataFamInstDecl (XHsImplicitBndrs _))-  = panic "hsDataFamInstBinders"------------------------ the SrcLoc returned are for the whole declarations, not just the names-hsDataDefnBinders :: HsDataDefn pass -> ([Located (IdP pass)], [LFieldOcc pass])-hsDataDefnBinders (HsDataDefn { dd_cons = cons })-  = hsConDeclsBinders cons-  -- See Note [Binders in family instances]-hsDataDefnBinders (XHsDataDefn _) = panic "hsDataDefnBinders"----------------------type Seen pass = [LFieldOcc pass] -> [LFieldOcc pass]-                 -- Filters out ones that have already been seen--hsConDeclsBinders :: [LConDecl pass] -> ([Located (IdP pass)], [LFieldOcc pass])-   -- See hsLTyClDeclBinders for what this does-   -- The function is boringly complicated because of the records-   -- And since we only have equality, we have to be a little careful-hsConDeclsBinders cons-  = go id cons-  where-    go :: Seen pass -> [LConDecl pass]-       -> ([Located (IdP pass)], [LFieldOcc pass])-    go _ [] = ([], [])-    go remSeen (r:rs)-      -- Don't re-mangle the location of field names, because we don't-      -- have a record of the full location of the field declaration anyway-      = let loc = getLoc r-        in case unLoc r of-           -- remove only the first occurrence of any seen field in order to-           -- avoid circumventing detection of duplicate fields (#9156)-           ConDeclGADT { con_names = names, con_args = args }-             -> (map (cL loc . unLoc) names ++ ns, flds ++ fs)-             where-                (remSeen', flds) = get_flds remSeen args-                (ns, fs) = go remSeen' rs--           ConDeclH98 { con_name = name, con_args = args }-             -> ([cL loc (unLoc name)] ++ ns, flds ++ fs)-             where-                (remSeen', flds) = get_flds remSeen args-                (ns, fs) = go remSeen' rs--           XConDecl _ -> panic "hsConDeclsBinders"--    get_flds :: Seen pass -> HsConDeclDetails pass-             -> (Seen pass, [LFieldOcc pass])-    get_flds remSeen (RecCon flds)-       = (remSeen', fld_names)-       where-          fld_names = remSeen (concatMap (cd_fld_names . unLoc) (unLoc flds))-          remSeen' = foldr (.) remSeen-                               [deleteBy ((==) `on` unLoc . rdrNameFieldOcc . unLoc) v-                               | v <- fld_names]-    get_flds remSeen _-       = (remSeen, [])--{---Note [SrcSpan for binders]-~~~~~~~~~~~~~~~~~~~~~~~~~~-When extracting the (Located RdrNme) for a binder, at least for the-main name (the TyCon of a type declaration etc), we want to give it-the @SrcSpan@ of the whole /declaration/, not just the name itself-(which is how it appears in the syntax tree).  This SrcSpan (for the-entire declaration) is used as the SrcSpan for the Name that is-finally produced, and hence for error messages.  (See Trac #8607.)--Note [Binders in family instances]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In a type or data family instance declaration, the type-constructor is an *occurrence* not a binding site-    type instance T Int = Int -> Int   -- No binders-    data instance S Bool = S1 | S2     -- Binders are S1,S2---************************************************************************-*                                                                      *-        Collecting binders the user did not write-*                                                                      *-************************************************************************--The job of this family of functions is to run through binding sites and find the set of all Names-that were defined "implicitly", without being explicitly written by the user.--The main purpose is to find names introduced by record wildcards so that we can avoid-warning the user when they don't use those names (#4404)--}--lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))]-                -> NameSet-lStmtsImplicits = hs_lstmts-  where-    hs_lstmts :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))]-              -> NameSet-    hs_lstmts = foldr (\stmt rest -> unionNameSet (hs_stmt (unLoc stmt)) rest) emptyNameSet--    hs_stmt :: StmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))-            -> NameSet-    hs_stmt (BindStmt _ pat _ _ _) = lPatImplicits pat-    hs_stmt (ApplicativeStmt _ args _) = unionNameSets (map do_arg args)-      where do_arg (_, ApplicativeArgOne _ pat _ _) = lPatImplicits pat-            do_arg (_, ApplicativeArgMany _ stmts _ _) = hs_lstmts stmts-            do_arg (_, XApplicativeArg _) = panic "lStmtsImplicits"-    hs_stmt (LetStmt _ binds)     = hs_local_binds (unLoc binds)-    hs_stmt (BodyStmt {})         = emptyNameSet-    hs_stmt (LastStmt {})         = emptyNameSet-    hs_stmt (ParStmt _ xs _ _)    = hs_lstmts [s | ParStmtBlock _ ss _ _ <- xs-                                                , s <- ss]-    hs_stmt (TransStmt { trS_stmts = stmts }) = hs_lstmts stmts-    hs_stmt (RecStmt { recS_stmts = ss })     = hs_lstmts ss-    hs_stmt (XStmtLR {})          = panic "lStmtsImplicits"--    hs_local_binds (HsValBinds _ val_binds) = hsValBindsImplicits val_binds-    hs_local_binds (HsIPBinds {})           = emptyNameSet-    hs_local_binds (EmptyLocalBinds _)      = emptyNameSet-    hs_local_binds (XHsLocalBindsLR _)      = emptyNameSet--hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> NameSet-hsValBindsImplicits (XValBindsLR (NValBinds binds _))-  = foldr (unionNameSet . lhsBindsImplicits . snd) emptyNameSet binds-hsValBindsImplicits (ValBinds _ binds _)-  = lhsBindsImplicits binds--lhsBindsImplicits :: LHsBindsLR GhcRn idR -> NameSet-lhsBindsImplicits = foldBag unionNameSet (lhs_bind . unLoc) emptyNameSet-  where-    lhs_bind (PatBind { pat_lhs = lpat }) = lPatImplicits lpat-    lhs_bind _ = emptyNameSet--lPatImplicits :: LPat GhcRn -> NameSet-lPatImplicits = hs_lpat-  where-    hs_lpat lpat = hs_pat (unLoc lpat)--    hs_lpats = foldr (\pat rest -> hs_lpat pat `unionNameSet` rest) emptyNameSet--    hs_pat (LazyPat _ pat)      = hs_lpat pat-    hs_pat (BangPat _ pat)      = hs_lpat pat-    hs_pat (AsPat _ _ pat)      = hs_lpat pat-    hs_pat (ViewPat _ _ pat)    = hs_lpat pat-    hs_pat (ParPat _ pat)       = hs_lpat pat-    hs_pat (ListPat _ pats)     = hs_lpats pats-    hs_pat (TuplePat _ pats _)  = hs_lpats pats--    hs_pat (SigPat _ pat _)     = hs_lpat pat-    hs_pat (CoPat _ _ pat _)    = hs_pat pat--    hs_pat (ConPatIn _ ps)           = details ps-    hs_pat (ConPatOut {pat_args=ps}) = details ps--    hs_pat _ = emptyNameSet--    details (PrefixCon ps)   = hs_lpats ps-    details (RecCon fs)      = hs_lpats explicit `unionNameSet` mkNameSet (collectPatsBinders implicit)-      where (explicit, implicit) = partitionEithers [if pat_explicit then Left pat else Right pat-                                                    | (i, fld) <- [0..] `zip` rec_flds fs-                                                    , let pat = hsRecFieldArg-                                                                     (unLoc fld)-                                                          pat_explicit = maybe True (i<) (rec_dotdot fs)]-    details (InfixCon p1 p2) = hs_lpat p1 `unionNameSet` hs_lpat p2
− hsSyn/PlaceHolder.hs
@@ -1,70 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE StandaloneDeriving #-}--module PlaceHolder where--import Name-import NameSet-import RdrName-import Var----{--%************************************************************************-%*                                                                      *-\subsection{Annotating the syntax}-%*                                                                      *-%************************************************************************--}---- NB: These are intentionally open, allowing API consumers (like Haddock)--- to declare new instances--placeHolderNamesTc :: NameSet-placeHolderNamesTc = emptyNameSet--{--TODO:AZ: remove this, and check if we still need all the UndecidableInstances--Note [Pass sensitive types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Since the same AST types are re-used through parsing,renaming and type-checking there are naturally some places in the AST that do not have-any meaningful value prior to the pass they are assigned a value.--Historically these have been filled in with place holder values of the form--  panic "error message"--This has meant the AST is difficult to traverse using standard generic-programming techniques. The problem is addressed by introducing-pass-specific data types, implemented as a pair of open type families,-one for PostTc and one for PostRn. These are then explicitly populated-with a PlaceHolder value when they do not yet have meaning.--In terms of actual usage, we have the following--  PostTc id Kind-  PostTc id Type--  PostRn id Fixity-  PostRn id NameSet--TcId and Var are synonyms for Id--Unfortunately the type checker termination checking conditions fail for the-DataId constraint type based on this, so even though it is safe the-UndecidableInstances pragma is required where this is used.--}----- |Follow the @id@, but never beyond Name. This is used in a 'HsMatchContext',--- for printing messages related to a 'Match'-type family NameOrRdrName id where-  NameOrRdrName Id      = Name-  NameOrRdrName Name    = Name-  NameOrRdrName RdrName = RdrName
iface/BinIface.hs view
@@ -10,6 +10,7 @@  -- | Binary interface file support. module BinIface (+        -- * Public API for interface file serialisation         writeBinIface,         readBinIface,         getSymtabName,@@ -17,8 +18,17 @@         CheckHiWay(..),         TraceBinIFaceReading(..),         getWithUserData,-        putWithUserData+        putWithUserData, +        -- * Internal serialisation functions+        getSymbolTable,+        putName,+        putDictionary,+        putFastString,+        putSymbolTable,+        BinSymbolTable(..),+        BinDictionary(..)+     ) where  #include "HsVersions.h"@@ -42,7 +52,7 @@ import Unique import Outputable import NameCache-import Platform+import GHC.Platform import FastString import Constants import Util@@ -92,11 +102,12 @@                                     (defaultDumpStyle dflags)                                     sd                       QuietBinIFaceReading -> \_ -> return ()-        wantedGot :: Outputable a => String -> a -> a -> IO ()-        wantedGot what wanted got =++        wantedGot :: String -> a -> a -> (a -> SDoc) -> IO ()+        wantedGot what wanted got ppr' =             printer (text what <> text ": " <>-                     vcat [text "Wanted " <> ppr wanted <> text ",",-                           text "got    " <> ppr got])+                     vcat [text "Wanted " <> ppr' wanted <> text ",",+                           text "got    " <> ppr' got])          errorOnMismatch :: (Eq a, Show a) => String -> a -> a -> IO ()         errorOnMismatch what wanted got =@@ -111,7 +122,7 @@     -- (This magic number does not change when we change     --  GHC interface file format)     magic <- get bh-    wantedGot "Magic" (binaryInterfaceMagic dflags) magic+    wantedGot "Magic" (binaryInterfaceMagic dflags) magic ppr     errorOnMismatch "magic number mismatch: old/corrupt interface file?"         (binaryInterfaceMagic dflags) magic @@ -129,12 +140,12 @@     -- Check the interface file version and ways.     check_ver  <- get bh     let our_ver = show hiVersion-    wantedGot "Version" our_ver check_ver+    wantedGot "Version" our_ver check_ver text     errorOnMismatch "mismatched interface file versions" our_ver check_ver      check_way <- get bh     let way_descr = getWayDescr dflags-    wantedGot "Way" way_descr check_way+    wantedGot "Way" way_descr check_way ppr     when (checkHiWay == CheckHiWay) $         errorOnMismatch "mismatched interface file ways" way_descr check_way     getWithUserData ncu bh
iface/BuildTyCl.hs view
@@ -54,12 +54,14 @@         ; return (NewTyCon { data_con    = con,                              nt_rhs      = rhs_ty,                              nt_etad_rhs = (etad_tvs, etad_rhs),-                             nt_co       = nt_ax } ) }+                             nt_co       = nt_ax,+                             nt_lev_poly = isKindLevPoly res_kind } ) }                              -- Coreview looks through newtypes with a Nothing                              -- for nt_co, or uses explicit coercions otherwise   where-    tvs    = tyConTyVars tycon-    roles  = tyConRoles tycon+    tvs      = tyConTyVars tycon+    roles    = tyConRoles tycon+    res_kind = tyConResKind tycon     con_arg_ty = case dataConRepArgTys con of                    [arg_ty] -> arg_ty                    tys -> pprPanic "mkNewTyConRhs" (ppr con <+> ppr tys)@@ -247,8 +249,7 @@     do  { traceIf (text "buildClass")          ; tc_rep_name  <- newTyConRepName tycon_name-        ; let univ_bndrs = tyConTyVarBinders binders-              univ_tvs   = binderVars univ_bndrs+        ; let univ_tvs = binderVars binders               tycon = mkClassTyCon tycon_name binders roles                                    AbstractTyCon rec_clas tc_rep_name               result = mkAbstractClass tycon_name univ_tvs fds tycon@@ -371,7 +372,7 @@  We cannot represent this by a newtype, even though it's not existential, because there are two value fields (the equality-predicate and op. See Trac #2238+predicate and op. See #2238  Moreover,           class (a ~ F b) => C a b where {}
iface/FlagChecker.hs view
@@ -11,7 +11,6 @@ import GhcPrelude  import Binary-import BinIface () import DynFlags import HscTypes import Module@@ -58,8 +57,12 @@         -- -fprof-auto etc.         prof = if gopt Opt_SccProfilingOn dflags then fromEnum profAuto else 0 -        flags = (mainis, safeHs, lang, cpp, paths, prof)+        -- Ticky+        ticky =+          map (`gopt` dflags) [Opt_Ticky, Opt_Ticky_Allocd, Opt_Ticky_LNE, Opt_Ticky_Dyn_Thunk] +        flags = ((mainis, safeHs, lang, cpp), (paths, prof, ticky, debugLevel))+     in -- pprTrace "flags" (ppr flags) $        computeFingerprint nameio flags @@ -73,7 +76,7 @@                       -> IO Fingerprint fingerprintOptFlags DynFlags{..} nameio =       let-        -- See https://ghc.haskell.org/trac/ghc/ticket/10923+        -- See https://gitlab.haskell.org/ghc/ghc/issues/10923         -- We used to fingerprint the optimisation level, but as Joachim         -- Breitner pointed out in comment 9 on that ticket, it's better         -- to ignore that and just look at the individual optimisation flags.@@ -91,7 +94,7 @@                       -> IO Fingerprint fingerprintHpcFlags dflags@DynFlags{..} nameio =       let-        -- -fhpc, see https://ghc.haskell.org/trac/ghc/ticket/11798+        -- -fhpc, see https://gitlab.haskell.org/ghc/ghc/issues/11798         -- hpcDir is output-only, so we should recompile if it changes         hpc = if gopt Opt_Hpc dflags then Just hpcDir else Nothing 
iface/IfaceSyn.hs view
@@ -4,6 +4,7 @@ -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE LambdaCase #-}  module IfaceSyn (         module IfaceType,@@ -46,7 +47,7 @@ import IfaceType import BinFingerprint import CoreSyn( IsOrphan, isOrphan )-import PprCore()            -- Printing DFunArgs+import DynFlags( gopt, GeneralFlag (Opt_PrintAxiomIncomps) ) import Demand import Class import FieldLabel@@ -66,12 +67,15 @@ import BooleanFormula ( BooleanFormula, pprBooleanFormula, isTrue ) import Var( VarBndr(..), binderVar ) import TyCon ( Role (..), Injectivity(..), tyConBndrVisArgFlag )-import Util( dropList, filterByList )+import Util( dropList, filterByList, notNull, unzipWith ) import DataCon (SrcStrictness(..), SrcUnpackedness(..)) import Lexeme (isLexSym)+import TysWiredIn ( constraintKindTyConName )+import Util (seqList)  import Control.Monad import System.IO.Unsafe+import Control.DeepSeq  infixl 3 &&& @@ -377,7 +381,7 @@ {- Note [Versioning of instances] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See [http://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance#Instances]+See [https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance#instances]   ************************************************************************@@ -545,7 +549,29 @@ In general we retain all info that is left by CoreTidy.tidyLetBndr, since that is what is seen by importing module with --make +Note [Displaying axiom incompatibilities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+With -fprint-axiom-incomps we display which closed type family equations+are incompatible with which. This information is sometimes necessary+because GHC doesn't try equations in order: any equation can be used when+all preceding equations that are incompatible with it do not apply. +For example, the last "a && a = a" equation in Data.Type.Bool.&& is+actually compatible with all previous equations, and can reduce at any+time.++This is displayed as:+Prelude> :i Data.Type.Equality.==+type family (==) (a :: k) (b :: k) :: Bool+  where+    {- #0 -} (==) (f a) (g b) = (f == g) && (a == b)+    {- #1 -} (==) a a = 'True+          -- incompatible with: #0+    {- #2 -} (==) _1 _2 = 'False+          -- incompatible with: #1, #0+The comment after an equation refers to all previous equations (0-indexed)+that are incompatible with it.+ ************************************************************************ *                                                                      *               Printing IfaceDecl@@ -553,7 +579,7 @@ ************************************************************************ -} -pprAxBranch :: SDoc -> IfaceAxBranch -> SDoc+pprAxBranch :: SDoc -> BranchIndex -> IfaceAxBranch -> SDoc -- The TyCon might be local (just an OccName), or this might -- be a branch for an imported TyCon, so it would be an ExtName -- So it's easier to take an SDoc here@@ -563,22 +589,32 @@ --    in debug messages --    in :info F for GHCi, which goes via toConToIfaceDecl on the family tycon -- For user error messages we use Coercion.pprCoAxiom and friends-pprAxBranch pp_tc (IfaceAxBranch { ifaxbTyVars = tvs-                                 , ifaxbCoVars = _cvs-                                 , ifaxbLHS = pat_tys-                                 , ifaxbRHS = rhs-                                 , ifaxbIncomps = incomps })+pprAxBranch pp_tc idx (IfaceAxBranch { ifaxbTyVars = tvs+                                     , ifaxbCoVars = _cvs+                                     , ifaxbLHS = pat_tys+                                     , ifaxbRHS = rhs+                                     , ifaxbIncomps = incomps })   = WARN( not (null _cvs), pp_tc $$ ppr _cvs )     hang ppr_binders 2 (hang pp_lhs 2 (equals <+> ppr rhs))     $+$-    nest 2 maybe_incomps+    nest 4 maybe_incomps   where     -- See Note [Printing foralls in type family instances] in IfaceType-    ppr_binders = pprUserIfaceForAll $ map (mkIfaceForAllTvBndr Specified) tvs+    ppr_binders = maybe_index <+>+      pprUserIfaceForAll (map (mkIfaceForAllTvBndr Specified) tvs)     pp_lhs = hang pp_tc 2 (pprParendIfaceAppArgs pat_tys)-    maybe_incomps = ppUnless (null incomps) $ parens $-                    text "incompatible indices:" <+> ppr incomps +    -- See Note [Displaying axiom incompatibilities]+    maybe_index+      = sdocWithDynFlags $ \dflags ->+        ppWhen (gopt Opt_PrintAxiomIncomps dflags) $+          text "{-" <+> (text "#" <> ppr idx) <+> text "-}"+    maybe_incomps+      = sdocWithDynFlags $ \dflags ->+        ppWhen (gopt Opt_PrintAxiomIncomps dflags && notNull incomps) $+          text "--" <+> text "incompatible with:"+          <+> pprWithCommas (\incomp -> text "#" <> ppr incomp) incomps+ instance Outputable IfaceAnnotation where   ppr (IfaceAnnotation target value) = ppr target <+> colon <+> ppr value @@ -698,6 +734,14 @@              binders              roles +pprClassStandaloneKindSig :: ShowSub -> IfaceTopBndr -> IfaceKind -> SDoc+pprClassStandaloneKindSig ss clas =+  pprStandaloneKindSig (pprPrefixIfDeclBndr (ss_how_much ss) (occName clas))++constraintIfaceKind :: IfaceKind+constraintIfaceKind =+  IfaceTyConApp (IfaceTyCon constraintKindTyConName (IfaceTyConInfo NotPromoted IfaceNormalTyCon)) IA_Nil+ pprIfaceDecl :: ShowSub -> IfaceDecl -> SDoc -- NB: pprIfaceDecl is also used for pretty-printing TyThings in GHCi --     See Note [Pretty-printing TyThings] in PprTyThing@@ -709,11 +753,13 @@                              ifBinders = binders })    | gadt      = vcat [ pp_roles+                     , pp_ki_sig                      , pp_nd <+> pp_lhs <+> pp_kind <+> pp_where                      , nest 2 (vcat pp_cons)                      , nest 2 $ ppShowIface ss pp_extra ]   | otherwise = vcat [ pp_roles-                     , hang (pp_nd <+> pp_lhs <+> pp_kind) 2 (add_bars pp_cons)+                     , pp_ki_sig+                     , hang (pp_nd <+> pp_lhs) 2 (add_bars pp_cons)                      , nest 2 $ ppShowIface ss pp_extra ]   where     is_data_instance = isIfaceDataInstance parent@@ -727,26 +773,45 @@     cons       = visibleIfConDecls condecls     pp_where   = ppWhen (gadt && not (null cons)) $ text "where"     pp_cons    = ppr_trim (map show_con cons) :: [SDoc]-    pp_kind-      | isIfaceLiftedTypeKind kind = empty-      | otherwise = dcolon <+> ppr kind+    pp_kind    = ppUnless (if ki_sig_printable+                              then isIfaceTauType kind+                                      -- Even in the presence of a standalone kind signature, a non-tau+                                      -- result kind annotation cannot be discarded as it determines the arity.+                                      -- See Note [Arity inference in kcDeclHeader_sig] in TcHsType+                              else isIfaceLiftedTypeKind kind)+                          (dcolon <+> ppr kind)      pp_lhs = case parent of-               IfNoParent -> pprIfaceDeclHead context ss tycon binders Nothing+               IfNoParent -> pprIfaceDeclHead suppress_bndr_sig context ss tycon binders                IfDataInstance{}                           -> text "instance" <+> pp_data_inst_forall                                              <+> pprIfaceTyConParent parent      pp_roles       | is_data_instance = empty-      | otherwise        = pprRoles (== Representational)-                                    (pprPrefixIfDeclBndr-                                        (ss_how_much ss)-                                        (occName tycon))-                                    binders roles+      | otherwise        = pprRoles (== Representational) name_doc binders roles             -- Don't display roles for data family instances (yet)-            -- See discussion on Trac #8672.+            -- See discussion on #8672. +    ki_sig_printable =+      -- If we print a standalone kind signature for a data instance, we leak+      -- the internal constructor name:+      --+      --    type T15827.R:Dka :: forall k. k -> *+      --    data instance forall k (a :: k). D a = MkD (Proxy a)+      --+      -- This T15827.R:Dka is a compiler-generated type constructor for the+      -- data instance.+      not is_data_instance++    pp_ki_sig = ppWhen ki_sig_printable $+                pprStandaloneKindSig name_doc (mkIfaceTyConKind binders kind)++    -- See Note [Suppressing binder signatures] in IfaceType+    suppress_bndr_sig = SuppressBndrSig ki_sig_printable++    name_doc = pprPrefixIfDeclBndr (ss_how_much ss) (occName tycon)+     add_bars []     = Outputable.empty     add_bars (c:cs) = sep ((equals <+> c) : map (vbar <+>) cs) @@ -769,8 +834,11 @@                             , ifBinders = binders                             , ifBody = IfAbstractClass })   = vcat [ pprClassRoles ss clas binders roles-         , text "class" <+> pprIfaceDeclHead [] ss clas binders Nothing-                                <+> pprFundeps fds ]+         , pprClassStandaloneKindSig ss clas (mkIfaceTyConKind binders constraintIfaceKind)+         , text "class" <+> pprIfaceDeclHead suppress_bndr_sig [] ss clas binders <+> pprFundeps fds ]+  where+    -- See Note [Suppressing binder signatures] in IfaceType+    suppress_bndr_sig = SuppressBndrSig True  pprIfaceDecl ss (IfaceClass { ifName  = clas                             , ifRoles = roles@@ -783,8 +851,8 @@                                 ifMinDef = minDef                               }})   = vcat [ pprClassRoles ss clas binders roles-         , text "class" <+> pprIfaceDeclHead context ss clas binders Nothing-                                <+> pprFundeps fds <+> pp_where+         , pprClassStandaloneKindSig ss clas (mkIfaceTyConKind binders constraintIfaceKind)+         , text "class" <+> pprIfaceDeclHead suppress_bndr_sig context ss clas binders <+> pprFundeps fds <+> pp_where          , nest 2 (vcat [ vcat asocs, vcat dsigs                         , ppShowAllSubs ss (pprMinDef minDef)])]     where@@ -810,31 +878,46 @@           (\_ def -> cparen (isLexSym def) (ppr def)) 0 minDef <+>         text "#-}" +      -- See Note [Suppressing binder signatures] in IfaceType+      suppress_bndr_sig = SuppressBndrSig True+ pprIfaceDecl ss (IfaceSynonym { ifName    = tc                               , ifBinders = binders                               , ifSynRhs  = mono_ty                               , ifResKind = res_kind})-  = hang (text "type" <+> pprIfaceDeclHead [] ss tc binders Nothing <+> equals)-       2 (sep [ pprIfaceForAll tvs, pprIfaceContextArr theta, ppr tau-              , ppUnless (isIfaceLiftedTypeKind res_kind) (dcolon <+> ppr res_kind) ])+  = vcat [ pprStandaloneKindSig name_doc (mkIfaceTyConKind binders res_kind)+         , hang (text "type" <+> pprIfaceDeclHead suppress_bndr_sig [] ss tc binders <+> equals)+           2 (sep [ pprIfaceForAll tvs, pprIfaceContextArr theta, ppr tau+                  , ppUnless (isIfaceLiftedTypeKind res_kind) (dcolon <+> ppr res_kind) ])+         ]   where     (tvs, theta, tau) = splitIfaceSigmaTy mono_ty+    name_doc = pprPrefixIfDeclBndr (ss_how_much ss) (occName tc) +    -- See Note [Suppressing binder signatures] in IfaceType+    suppress_bndr_sig = SuppressBndrSig True+ pprIfaceDecl ss (IfaceFamily { ifName = tycon                              , ifFamFlav = rhs, ifBinders = binders                              , ifResKind = res_kind                              , ifResVar = res_var, ifFamInj = inj })   | IfaceDataFamilyTyCon <- rhs-  = text "data family" <+> pprIfaceDeclHead [] ss tycon binders Nothing+  = vcat [ pprStandaloneKindSig name_doc (mkIfaceTyConKind binders res_kind)+         , text "data family" <+> pprIfaceDeclHead suppress_bndr_sig [] ss tycon binders+         ]    | otherwise-  = hang (text "type family"-            <+> pprIfaceDeclHead [] ss tycon binders (Just res_kind)-            <+> ppShowRhs ss (pp_where rhs))-       2 (pp_inj res_var inj <+> ppShowRhs ss (pp_rhs rhs))-    $$-    nest 2 (ppShowRhs ss (pp_branches rhs))+  = vcat [ pprStandaloneKindSig name_doc (mkIfaceTyConKind binders res_kind)+         , hang (text "type family"+                   <+> pprIfaceDeclHead suppress_bndr_sig [] ss tycon binders+                   <+> ppShowRhs ss (pp_where rhs))+              2 (pp_inj res_var inj <+> ppShowRhs ss (pp_rhs rhs))+           $$+           nest 2 (ppShowRhs ss (pp_branches rhs))+         ]   where+    name_doc = pprPrefixIfDeclBndr (ss_how_much ss) (occName tycon)+     pp_where (IfaceClosedSynFamilyTyCon {}) = text "where"     pp_where _                              = empty @@ -860,14 +943,17 @@       = ppShowIface ss (text "built-in")      pp_branches (IfaceClosedSynFamilyTyCon (Just (ax, brs)))-      = vcat (map (pprAxBranch+      = vcat (unzipWith (pprAxBranch                      (pprPrefixIfDeclBndr                        (ss_how_much ss)                        (occName tycon))-                  ) brs)+                  ) $ zip [0..] brs)         $$ ppShowIface ss (text "axiom" <+> ppr ax)     pp_branches _ = Outputable.empty +    -- See Note [Suppressing binder signatures] in IfaceType+    suppress_bndr_sig = SuppressBndrSig True+ pprIfaceDecl _ (IfacePatSyn { ifName = name,                               ifPatUnivBndrs = univ_bndrs, ifPatExBndrs = ex_bndrs,                               ifPatProvCtxt = prov_ctxt, ifPatReqCtxt = req_ctxt,@@ -882,7 +968,7 @@                              , ppWhen insert_empty_ctxt $ parens empty <+> darrow                              , ex_msg                              , pprIfaceContextArr prov_ctxt-                             , pprIfaceType $ foldr IfaceFunTy pat_ty arg_tys ])+                             , pprIfaceType $ foldr (IfaceFunTy VisArg) pat_ty arg_tys ])       where         univ_msg = pprUserIfaceForAll univ_bndrs         ex_msg   = pprUserIfaceForAll ex_bndrs@@ -900,7 +986,7 @@ pprIfaceDecl _ (IfaceAxiom { ifName = name, ifTyCon = tycon                            , ifAxBranches = branches })   = hang (text "axiom" <+> ppr name <+> dcolon)-       2 (vcat $ map (pprAxBranch (ppr tycon)) branches)+       2 (vcat $ unzipWith (pprAxBranch (ppr tycon)) $ zip [0..] branches)  pprCType :: Maybe CType -> SDoc pprCType Nothing      = Outputable.empty@@ -916,6 +1002,9 @@       in ppUnless (all suppress_if froles || null froles) $          text "type role" <+> tyCon <+> hsep (map ppr froles) +pprStandaloneKindSig :: SDoc -> IfaceType -> SDoc+pprStandaloneKindSig tyCon ty = text "type" <+> tyCon <+> text "::" <+> ppr ty+ pprInfixIfDeclBndr :: ShowHowMuch -> OccName -> SDoc pprInfixIfDeclBndr (ShowSome _ (AltPpr (Just ppr_bndr))) name   = pprInfixVar (isSymOcc name) (ppr_bndr name)@@ -966,16 +1055,16 @@ pprIfaceTyConParent (IfDataInstance _ tc tys)   = pprIfaceTypeApp topPrec tc tys -pprIfaceDeclHead :: IfaceContext -> ShowSub -> Name+pprIfaceDeclHead :: SuppressBndrSig+                 -> IfaceContext -> ShowSub -> Name                  -> [IfaceTyConBinder]   -- of the tycon, for invisible-suppression-                 -> Maybe IfaceKind                  -> SDoc-pprIfaceDeclHead context ss tc_occ bndrs m_res_kind+pprIfaceDeclHead suppress_sig context ss tc_occ bndrs   = sdocWithDynFlags $ \ dflags ->     sep [ pprIfaceContextArr context         , pprPrefixIfDeclBndr (ss_how_much ss) (occName tc_occ)-          <+> pprIfaceTyConBinders (suppressIfaceInvisibles dflags bndrs bndrs)-        , maybe empty (\res_kind -> dcolon <+> pprIfaceType res_kind) m_res_kind ]+          <+> pprIfaceTyConBinders suppress_sig+                (suppressIfaceInvisibles dflags bndrs bndrs) ]  pprIfaceConDecl :: ShowSub -> Bool                 -> IfaceTopBndr@@ -1480,8 +1569,7 @@ freeNamesIfType (IfaceTupleTy _ _ ts) = freeNamesIfAppArgs ts freeNamesIfType (IfaceLitTy _)        = emptyNameSet freeNamesIfType (IfaceForAllTy tv t)  = freeNamesIfVarBndr tv &&& freeNamesIfType t-freeNamesIfType (IfaceFunTy s t)      = freeNamesIfType s &&& freeNamesIfType t-freeNamesIfType (IfaceDFunTy s t)     = freeNamesIfType s &&& freeNamesIfType t+freeNamesIfType (IfaceFunTy _ s t)    = freeNamesIfType s &&& freeNamesIfType t freeNamesIfType (IfaceCastTy t c)     = freeNamesIfType t &&& freeNamesIfCoercion c freeNamesIfType (IfaceCoercionTy c)   = freeNamesIfCoercion c @@ -2329,3 +2417,177 @@ instance Binary IfaceCompleteMatch where   put_ bh (IfaceCompleteMatch cs ts) = put_ bh cs >> put_ bh ts   get bh = IfaceCompleteMatch <$> get bh <*> get bh+++{-+************************************************************************+*                                                                      *+                NFData instances+   See Note [Avoiding space leaks in toIface*] in ToIface+*                                                                      *+************************************************************************+-}++instance NFData IfaceDecl where+  rnf = \case+    IfaceId f1 f2 f3 f4 ->+      rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` rnf f4++    IfaceData f1 f2 f3 f4 f5 f6 f7 f8 f9 ->+      f1 `seq` seqList f2 `seq` f3 `seq` f4 `seq` f5 `seq`+      rnf f6 `seq` rnf f7 `seq` rnf f8 `seq` rnf f9++    IfaceSynonym f1 f2 f3 f4 f5 ->+      rnf f1 `seq` f2 `seq` seqList f3 `seq` rnf f4 `seq` rnf f5++    IfaceFamily f1 f2 f3 f4 f5 f6 ->+      rnf f1 `seq` rnf f2 `seq` seqList f3 `seq` rnf f4 `seq` rnf f5 `seq` f6 `seq` ()++    IfaceClass f1 f2 f3 f4 f5 ->+      rnf f1 `seq` f2 `seq` seqList f3 `seq` rnf f4 `seq` rnf f5++    IfaceAxiom nm tycon role ax ->+      rnf nm `seq`+      rnf tycon `seq`+      role `seq`+      rnf ax++    IfacePatSyn f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 ->+      rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` rnf f4 `seq` f5 `seq` f6 `seq`+      rnf f7 `seq` rnf f8 `seq` rnf f9 `seq` rnf f10 `seq` f11 `seq` ()++instance NFData IfaceAxBranch where+  rnf (IfaceAxBranch f1 f2 f3 f4 f5 f6 f7) =+    rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` rnf f4 `seq` f5 `seq` rnf f6 `seq` rnf f7++instance NFData IfaceClassBody where+  rnf = \case+    IfAbstractClass -> ()+    IfConcreteClass f1 f2 f3 f4 -> rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` f4 `seq` ()++instance NFData IfaceAT where+  rnf (IfaceAT f1 f2) = rnf f1 `seq` rnf f2++instance NFData IfaceClassOp where+  rnf (IfaceClassOp f1 f2 f3) = rnf f1 `seq` rnf f2 `seq` f3 `seq` ()++instance NFData IfaceTyConParent where+  rnf = \case+    IfNoParent -> ()+    IfDataInstance f1 f2 f3 -> rnf f1 `seq` rnf f2 `seq` rnf f3++instance NFData IfaceConDecls where+  rnf = \case+    IfAbstractTyCon -> ()+    IfDataTyCon f1 -> rnf f1+    IfNewTyCon f1 -> rnf f1++instance NFData IfaceConDecl where+  rnf (IfCon f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11) =+    rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` rnf f4 `seq` f5 `seq` rnf f6 `seq`+    rnf f7 `seq` rnf f8 `seq` f9 `seq` rnf f10 `seq` rnf f11++instance NFData IfaceSrcBang where+  rnf (IfSrcBang f1 f2) = f1 `seq` f2 `seq` ()++instance NFData IfaceBang where+  rnf x = x `seq` ()++instance NFData IfaceIdDetails where+  rnf = \case+    IfVanillaId -> ()+    IfRecSelId (Left tycon) b -> rnf tycon `seq` rnf b+    IfRecSelId (Right decl) b -> rnf decl `seq` rnf b+    IfDFunId -> ()++instance NFData IfaceIdInfo where+  rnf = \case+    NoInfo -> ()+    HasInfo f1 -> rnf f1++instance NFData IfaceInfoItem where+  rnf = \case+    HsArity a -> rnf a+    HsStrictness str -> seqStrictSig str+    HsInline p -> p `seq` () -- TODO: seq further?+    HsUnfold b unf -> rnf b `seq` rnf unf+    HsNoCafRefs -> ()+    HsLevity -> ()++instance NFData IfaceUnfolding where+  rnf = \case+    IfCoreUnfold inlinable expr ->+      rnf inlinable `seq` rnf expr+    IfCompulsory expr ->+      rnf expr+    IfInlineRule arity b1 b2 e ->+      rnf arity `seq` rnf b1 `seq` rnf b2 `seq` rnf e+    IfDFunUnfold bndrs exprs ->+      rnf bndrs `seq` rnf exprs++instance NFData IfaceExpr where+  rnf = \case+    IfaceLcl nm -> rnf nm+    IfaceExt nm -> rnf nm+    IfaceType ty -> rnf ty+    IfaceCo co -> rnf co+    IfaceTuple sort exprs -> sort `seq` rnf exprs+    IfaceLam bndr expr -> rnf bndr `seq` rnf expr+    IfaceApp e1 e2 -> rnf e1 `seq` rnf e2+    IfaceCase e nm alts -> rnf e `seq` nm `seq` rnf alts+    IfaceECase e ty -> rnf e `seq` rnf ty+    IfaceLet bind e -> rnf bind `seq` rnf e+    IfaceCast e co -> rnf e `seq` rnf co+    IfaceLit l -> l `seq` () -- FIXME+    IfaceFCall fc ty -> fc `seq` rnf ty+    IfaceTick tick e -> rnf tick `seq` rnf e++instance NFData IfaceBinding where+  rnf = \case+    IfaceNonRec bndr e -> rnf bndr `seq` rnf e+    IfaceRec binds -> rnf binds++instance NFData IfaceLetBndr where+  rnf (IfLetBndr nm ty id_info join_info) =+    rnf nm `seq` rnf ty `seq` rnf id_info `seq` rnf join_info++instance NFData IfaceFamTyConFlav where+  rnf = \case+    IfaceDataFamilyTyCon -> ()+    IfaceOpenSynFamilyTyCon -> ()+    IfaceClosedSynFamilyTyCon f1 -> rnf f1+    IfaceAbstractClosedSynFamilyTyCon -> ()+    IfaceBuiltInSynFamTyCon -> ()++instance NFData IfaceJoinInfo where+  rnf x = x `seq` ()++instance NFData IfaceTickish where+  rnf = \case+    IfaceHpcTick m i -> rnf m `seq` rnf i+    IfaceSCC cc b1 b2 -> cc `seq` rnf b1 `seq` rnf b2+    IfaceSource src str -> src `seq` rnf str++instance NFData IfaceConAlt where+  rnf = \case+    IfaceDefault -> ()+    IfaceDataAlt nm -> rnf nm+    IfaceLitAlt lit -> lit `seq` ()++instance NFData IfaceCompleteMatch where+  rnf (IfaceCompleteMatch f1 f2) = rnf f1 `seq` rnf f2++instance NFData IfaceRule where+  rnf (IfaceRule f1 f2 f3 f4 f5 f6 f7 f8) =+    rnf f1 `seq` f2 `seq` rnf f3 `seq` rnf f4 `seq` rnf f5 `seq` rnf f6 `seq` rnf f7 `seq` f8 `seq` ()++instance NFData IfaceFamInst where+  rnf (IfaceFamInst f1 f2 f3 f4) =+    rnf f1 `seq` rnf f2 `seq` rnf f3 `seq` f4 `seq` ()++instance NFData IfaceClsInst where+  rnf (IfaceClsInst f1 f2 f3 f4 f5) =+    f1 `seq` rnf f2 `seq` rnf f3 `seq` f4 `seq` f5 `seq` ()++instance NFData IfaceAnnotation where+  rnf (IfaceAnnotation f1 f2) = f1 `seq` f2 `seq` ()
iface/IfaceType.hs view
@@ -9,6 +9,7 @@ {-# LANGUAGE CPP, FlexibleInstances, BangPatterns #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE TupleSections #-}+{-# LANGUAGE LambdaCase #-}     -- FlexibleInstances for Binary (DefMethSpec IfaceType)  module IfaceType (@@ -21,8 +22,10 @@         IfaceTyLit(..), IfaceAppArgs(..),         IfaceContext, IfaceBndr(..), IfaceOneShot(..), IfaceLamBndr,         IfaceTvBndr, IfaceIdBndr, IfaceTyConBinder,-        IfaceForAllBndr, ArgFlag(..), ShowForAllFlag(..),+        IfaceForAllBndr, ArgFlag(..), AnonArgFlag(..),+        ForallVisFlag(..), ShowForAllFlag(..),         mkIfaceForAllTvBndr,+        mkIfaceTyConKind,          ifForAllBndrVar, ifForAllBndrName, ifaceBndrName,         ifTyConBinderVar, ifTyConBinderName,@@ -34,6 +37,8 @@         appArgsIfaceTypes, appArgsIfaceTypesArgFlags,          -- Printing+        SuppressBndrSig(..),+        UseBndrParens(..),         pprIfaceType, pprParendIfaceType, pprPrecIfaceType,         pprIfaceContext, pprIfaceContextArr,         pprIfaceIdBndr, pprIfaceLamBndr, pprIfaceTvBndr, pprIfaceTyConBinders,@@ -43,6 +48,7 @@         pprIfaceCoercion, pprParendIfaceCoercion,         splitIfaceSigmaTy, pprIfaceTypeApp, pprUserIfaceForAll,         pprIfaceCoTcApp, pprTyTcApp, pprIfacePrefixApp,+        isIfaceTauType,          suppressIfaceInvisibles,         stripIfaceInvisVars,@@ -56,8 +62,8 @@ import GhcPrelude  import {-# SOURCE #-} TysWiredIn ( coercibleTyCon, heqTyCon-                                 , liftedRepDataConTyCon )-import {-# SOURCE #-} TyCoRep    ( isRuntimeRepTy )+                                 , liftedRepDataConTyCon, tupleTyConName )+import {-# SOURCE #-} Type       ( isRuntimeRepTy )  import DynFlags import TyCon hiding ( pprPromotionQuote )@@ -74,6 +80,7 @@  import Data.Maybe( isJust ) import qualified Data.Semigroup as Semi+import Control.DeepSeq  {- ************************************************************************@@ -105,6 +112,10 @@ ifaceBndrName (IfaceTvBndr bndr) = ifaceTvBndrName bndr ifaceBndrName (IfaceIdBndr bndr) = ifaceIdBndrName bndr +ifaceBndrType :: IfaceBndr -> IfaceType+ifaceBndrType (IfaceIdBndr (_, t)) = t+ifaceBndrType (IfaceTvBndr (_, t)) = t+ type IfaceLamBndr = (IfaceBndr, IfaceOneShot)  data IfaceOneShot    -- See Note [Preserve OneShotInfo] in CoreTicy@@ -135,8 +146,7 @@                              -- See Note [Suppressing invisible arguments] for                              -- an explanation of why the second field isn't                              -- IfaceType, analogous to AppTy.-  | IfaceFunTy     IfaceType IfaceType-  | IfaceDFunTy    IfaceType IfaceType+  | IfaceFunTy     AnonArgFlag IfaceType IfaceType   | IfaceForAllTy  IfaceForAllBndr IfaceType   | IfaceTyConApp  IfaceTyCon IfaceAppArgs  -- Not necessarily saturated                                             -- Includes newtypes, synonyms, tuples@@ -164,6 +174,15 @@ mkIfaceForAllTvBndr :: ArgFlag -> IfaceTvBndr -> IfaceForAllBndr mkIfaceForAllTvBndr vis var = Bndr (IfaceTvBndr var) vis +-- | Build the 'tyConKind' from the binders and the result kind.+-- Keep in sync with 'mkTyConKind' in types/TyCon.+mkIfaceTyConKind :: [IfaceTyConBinder] -> IfaceKind -> IfaceKind+mkIfaceTyConKind bndrs res_kind = foldr mk res_kind bndrs+  where+    mk :: IfaceTyConBinder -> IfaceKind -> IfaceKind+    mk (Bndr tv (AnonTCB af))   k = IfaceFunTy af (ifaceBndrType tv) k+    mk (Bndr tv (NamedTCB vis)) k = IfaceForAllTy (Bndr tv vis) k+ -- | Stores the arguments in a type application as a list. -- See @Note [Suppressing invisible arguments]@. data IfaceAppArgs@@ -394,7 +413,7 @@         = case split_foralls ty of { (bndrs, rho) -> (bndr:bndrs, rho) }     split_foralls rho = ([], rho) -    split_rho (IfaceDFunTy ty1 ty2)+    split_rho (IfaceFunTy InvisArg ty1 ty2)         = case split_rho ty2 of { (ps, tau) -> (ty1:ps, tau) }     split_rho tau = ([], tau) @@ -438,8 +457,7 @@     go (IfaceTyVar {})         = False     go (IfaceFreeTyVar {})     = False     go (IfaceAppTy fun args)   = go fun && go_args args-    go (IfaceFunTy arg res)    = go arg && go res-    go (IfaceDFunTy arg res)   = go arg && go res+    go (IfaceFunTy _ arg res)  = go arg && go res     go (IfaceForAllTy {})      = False     go (IfaceTyConApp _ args)  = go_args args     go (IfaceTupleTy _ _ args) = go_args args@@ -474,8 +492,7 @@     go (IfaceFreeTyVar tv)    = IfaceFreeTyVar tv     go (IfaceTyVar tv)        = substIfaceTyVar env tv     go (IfaceAppTy  t ts)     = IfaceAppTy  (go t) (substIfaceAppArgs env ts)-    go (IfaceFunTy  t1 t2)    = IfaceFunTy  (go t1) (go t2)-    go (IfaceDFunTy t1 t2)    = IfaceDFunTy (go t1) (go t2)+    go (IfaceFunTy af t1 t2)  = IfaceFunTy af (go t1) (go t2)     go ty@(IfaceLitTy {})     = ty     go (IfaceTyConApp tc tys) = IfaceTyConApp tc (substIfaceAppArgs env tys)     go (IfaceTupleTy s i tys) = IfaceTupleTy s i (substIfaceAppArgs env tys)@@ -688,11 +705,17 @@   | otherwise   = maybeParen ctxt_prec appPrec $                   hang pp_fun 2 (sep pp_tys) +isIfaceTauType :: IfaceType -> Bool+isIfaceTauType (IfaceForAllTy _ _) = False+isIfaceTauType (IfaceFunTy InvisArg _ _) = False+isIfaceTauType _ = True+ -- ----------------------------- Printing binders ------------------------------------  instance Outputable IfaceBndr where     ppr (IfaceIdBndr bndr) = pprIfaceIdBndr bndr-    ppr (IfaceTvBndr bndr) = char '@' <+> pprIfaceTvBndr False bndr+    ppr (IfaceTvBndr bndr) = char '@' <+> pprIfaceTvBndr bndr (SuppressBndrSig False)+                                                              (UseBndrParens False)  pprIfaceBndrs :: [IfaceBndr] -> SDoc pprIfaceBndrs bs = sep (map ppr bs)@@ -704,28 +727,60 @@ pprIfaceIdBndr :: IfaceIdBndr -> SDoc pprIfaceIdBndr (name, ty) = parens (ppr name <+> dcolon <+> ppr ty) -pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc-pprIfaceTvBndr use_parens (tv, ki)+{- Note [Suppressing binder signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When printing the binders in a 'forall', we want to keep the kind annotations:++    forall (a :: k). blah+              ^^^^+              good++On the other hand, when we print the binders of a data declaration in :info,+the kind information would be redundant due to the standalone kind signature:++   type F :: Symbol -> Type+   type F (s :: Symbol) = blah+             ^^^^^^^^^+             redundant++Here we'd like to omit the kind annotation:++   type F :: Symbol -> Type+   type F s = blah+-}++-- | Do we want to suppress kind annotations on binders?+-- See Note [Suppressing binder signatures]+newtype SuppressBndrSig = SuppressBndrSig Bool++newtype UseBndrParens = UseBndrParens Bool++pprIfaceTvBndr :: IfaceTvBndr -> SuppressBndrSig -> UseBndrParens -> SDoc+pprIfaceTvBndr (tv, ki) (SuppressBndrSig suppress_sig) (UseBndrParens use_parens)+  | suppress_sig             = ppr tv   | isIfaceLiftedTypeKind ki = ppr tv   | otherwise                = maybe_parens (ppr tv <+> dcolon <+> ppr ki)   where     maybe_parens | use_parens = parens                  | otherwise  = id -pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc-pprIfaceTyConBinders = sep . map go+pprIfaceTyConBinders :: SuppressBndrSig -> [IfaceTyConBinder] -> SDoc+pprIfaceTyConBinders suppress_sig = sep . map go   where     go :: IfaceTyConBinder -> SDoc     go (Bndr (IfaceIdBndr bndr) _) = pprIfaceIdBndr bndr     go (Bndr (IfaceTvBndr bndr) vis) =       -- See Note [Pretty-printing invisible arguments]       case vis of-        AnonTCB            -> ppr_bndr True-        NamedTCB Required  -> ppr_bndr True-        NamedTCB Specified -> char '@' <> ppr_bndr True-        NamedTCB Inferred  -> char '@' <> braces (ppr_bndr False)+        AnonTCB  VisArg    -> ppr_bndr (UseBndrParens True)+        AnonTCB  InvisArg  -> char '@' <> braces (ppr_bndr (UseBndrParens False))+          -- The above case is rare. (See Note [AnonTCB InvisArg] in TyCon.)+          -- Should we print these differently?+        NamedTCB Required  -> ppr_bndr (UseBndrParens True)+        NamedTCB Specified -> char '@' <> ppr_bndr (UseBndrParens True)+        NamedTCB Inferred  -> char '@' <> braces (ppr_bndr (UseBndrParens False))       where-        ppr_bndr use_parens = pprIfaceTvBndr use_parens bndr+        ppr_bndr = pprIfaceTvBndr bndr suppress_sig  instance Binary IfaceBndr where     put_ bh (IfaceIdBndr aa) = do@@ -768,19 +823,26 @@ -- called from other places, besides `:type` and `:info`. pprPrecIfaceType prec ty = eliminateRuntimeRep (ppr_ty prec) ty +ppr_sigma :: PprPrec -> IfaceType -> SDoc+ppr_sigma ctxt_prec ty+  = maybeParen ctxt_prec funPrec (pprIfaceSigmaType ShowForAllMust ty)+ ppr_ty :: PprPrec -> IfaceType -> SDoc+ppr_ty ctxt_prec ty@(IfaceForAllTy {})        = ppr_sigma ctxt_prec ty+ppr_ty ctxt_prec ty@(IfaceFunTy InvisArg _ _) = ppr_sigma ctxt_prec ty+ ppr_ty _         (IfaceFreeTyVar tyvar) = ppr tyvar  -- This is the main reason for IfaceFreeTyVar! ppr_ty _         (IfaceTyVar tyvar)     = ppr tyvar  -- See Note [TcTyVars in IfaceType] ppr_ty ctxt_prec (IfaceTyConApp tc tys) = pprTyTcApp ctxt_prec tc tys ppr_ty ctxt_prec (IfaceTupleTy i p tys) = pprTuple ctxt_prec i p tys ppr_ty _         (IfaceLitTy n)         = pprIfaceTyLit n         -- Function types-ppr_ty ctxt_prec (IfaceFunTy ty1 ty2)+ppr_ty ctxt_prec (IfaceFunTy _ ty1 ty2)  -- Should be VisArg   = -- We don't want to lose synonyms, so we mustn't use splitFunTys here.     maybeParen ctxt_prec funPrec $     sep [ppr_ty funPrec ty1, sep (ppr_fun_tail ty2)]   where-    ppr_fun_tail (IfaceFunTy ty1 ty2)+    ppr_fun_tail (IfaceFunTy VisArg ty1 ty2)       = (arrow <+> ppr_ty funPrec ty1) : ppr_fun_tail ty2     ppr_fun_tail other_ty       = [arrow <+> pprIfaceType other_ty]@@ -819,9 +881,6 @@       (ppr_co ctxt_prec co)       (text "<>") -ppr_ty ctxt_prec ty -- IfaceForAllTy-  = maybeParen ctxt_prec funPrec (pprIfaceSigmaType ShowForAllMust ty)- {- Note [Defaulting RuntimeRep variables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RuntimeRep variables are considered by many (most?) users to be little@@ -849,7 +908,7 @@  This applies to /quantified/ variables like 'w' above.  What about variables that are /free/ in the type being printed, which certainly-happens in error messages.  Suppose (Trac #16074) we are reporting a+happens in error messages.  Suppose (#16074) we are reporting a mismatch between two skolems           (a :: RuntimeRep) ~ (b :: RuntimeRep) We certainly don't want to say "Can't match LiftedRep ~ LiftedRep"!@@ -905,7 +964,7 @@      go in_kind _ ty@(IfaceFreeTyVar tv)       -- See Note [Defaulting RuntimeRep variables], about free vars-      | in_kind && TyCoRep.isRuntimeRepTy (tyVarKind tv)+      | in_kind && Type.isRuntimeRepTy (tyVarKind tv)       = IfaceTyConApp liftedRep IA_Nil       | otherwise       = ty@@ -916,15 +975,12 @@     go ink subs (IfaceTupleTy sort is_prom tc_args)       = IfaceTupleTy sort is_prom (go_args ink subs tc_args) -    go ink subs (IfaceFunTy arg res)-      = IfaceFunTy (go ink subs arg) (go ink subs res)+    go ink subs (IfaceFunTy af arg res)+      = IfaceFunTy af (go ink subs arg) (go ink subs res)      go ink subs (IfaceAppTy t ts)       = IfaceAppTy (go ink subs t) (go_args ink subs ts) -    go ink subs (IfaceDFunTy x y)-      = IfaceDFunTy (go ink subs x) (go ink subs y)-     go ink subs (IfaceCastTy x co)       = IfaceCastTy (go ink subs x) co @@ -1043,13 +1099,19 @@ pprIfaceForAllCoBndrs bndrs = hsep $ map pprIfaceForAllCoBndr bndrs  pprIfaceForAllBndr :: IfaceForAllBndr -> SDoc-pprIfaceForAllBndr (Bndr (IfaceTvBndr tv) Inferred)-  = sdocWithDynFlags $ \dflags ->-                          if gopt Opt_PrintExplicitForalls dflags-                          then braces $ pprIfaceTvBndr False tv-                          else pprIfaceTvBndr True tv-pprIfaceForAllBndr (Bndr (IfaceTvBndr tv) _)  = pprIfaceTvBndr True tv-pprIfaceForAllBndr (Bndr (IfaceIdBndr idv) _) = pprIfaceIdBndr idv+pprIfaceForAllBndr bndr =+  case bndr of+    Bndr (IfaceTvBndr tv) Inferred ->+      sdocWithDynFlags $ \dflags ->+        if gopt Opt_PrintExplicitForalls dflags+        then braces $ pprIfaceTvBndr tv suppress_sig (UseBndrParens False)+        else pprIfaceTvBndr tv suppress_sig (UseBndrParens True)+    Bndr (IfaceTvBndr tv) _ ->+      pprIfaceTvBndr tv suppress_sig (UseBndrParens True)+    Bndr (IfaceIdBndr idv) _ -> pprIfaceIdBndr idv+  where+    -- See Note [Suppressing binder signatures] in IfaceType+    suppress_sig = SuppressBndrSig False  pprIfaceForAllCoBndr :: (IfLclName, IfaceCoercion) -> SDoc pprIfaceForAllCoBndr (tv, kind_co)@@ -1073,7 +1135,7 @@ pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc pprUserIfaceForAll tvs    = sdocWithDynFlags $ \dflags ->-     -- See Note [When to print foralls]+     -- See Note [When to print foralls] in this module.      ppWhen (any tv_has_kind_var tvs              || any tv_is_required tvs              || gopt Opt_PrintExplicitForalls dflags) $@@ -1168,7 +1230,7 @@  Note [Printing promoted type constructors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this GHCi session (Trac #14343)+Consider this GHCi session (#14343)     > _ :: Proxy '[ 'True ]     error:       Found hole: _ :: Proxy '['True]@@ -1404,30 +1466,47 @@        <> sumParens (pprWithBars (ppr_ty topPrec) args')  pprTuple :: PprPrec -> TupleSort -> PromotionFlag -> IfaceAppArgs -> SDoc-pprTuple ctxt_prec ConstraintTuple NotPromoted IA_Nil-  = maybeParen ctxt_prec appPrec $-    text "() :: Constraint"+pprTuple ctxt_prec sort promoted args =+  case promoted of+    IsPromoted+      -> let tys = appArgsIfaceTypes args+             args' = drop (length tys `div` 2) tys+             spaceIfPromoted = case args' of+               arg0:_ -> pprSpaceIfPromotedTyCon arg0+               _ -> id+         in ppr_tuple_app args' $+            pprPromotionQuoteI IsPromoted <>+            tupleParens sort (spaceIfPromoted (pprWithCommas pprIfaceType args')) --- All promoted constructors have kind arguments-pprTuple _ sort IsPromoted args-  = let tys = appArgsIfaceTypes args-        args' = drop (length tys `div` 2) tys-        spaceIfPromoted = case args' of-          arg0:_ -> pprSpaceIfPromotedTyCon arg0-          _ -> id-    in pprPromotionQuoteI IsPromoted <>-       tupleParens sort (spaceIfPromoted (pprWithCommas pprIfaceType args'))+    NotPromoted+      |  ConstraintTuple <- sort+      ,  IA_Nil <- args+      -> maybeParen ctxt_prec sigPrec $+         text "() :: Constraint" -pprTuple _ sort promoted args-  =   -- drop the RuntimeRep vars.-      -- See Note [Unboxed tuple RuntimeRep vars] in TyCon-    let tys   = appArgsIfaceTypes args-        args' = case sort of-                  UnboxedTuple -> drop (length tys `div` 2) tys-                  _            -> tys-    in-    pprPromotionQuoteI promoted <>-    tupleParens sort (pprWithCommas pprIfaceType args')+      | otherwise+      ->   -- drop the RuntimeRep vars.+           -- See Note [Unboxed tuple RuntimeRep vars] in TyCon+         let tys   = appArgsIfaceTypes args+             args' = case sort of+                       UnboxedTuple -> drop (length tys `div` 2) tys+                       _            -> tys+         in+         ppr_tuple_app args' $+         pprPromotionQuoteI promoted <>+         tupleParens sort (pprWithCommas pprIfaceType args')+  where+    ppr_tuple_app :: [IfaceType] -> SDoc -> SDoc+    ppr_tuple_app args_wo_runtime_reps ppr_args_w_parens+        -- Special-case unary boxed tuples so that they are pretty-printed as+        -- `Unit x`, not `(x)`+      | [_] <- args_wo_runtime_reps+      , BoxedTuple <- sort+      = let unit_tc_info = IfaceTyConInfo promoted IfaceNormalTyCon+            unit_tc = IfaceTyCon (tupleTyConName sort 1) unit_tc_info in+        pprPrecIfaceType ctxt_prec $ IfaceTyConApp unit_tc args+      | otherwise+      = ppr_args_w_parens  pprIfaceTyLit :: IfaceTyLit -> SDoc pprIfaceTyLit (IfaceNumTyLit n) = integer n@@ -1673,12 +1752,9 @@             putByte bh 2             put_ bh ae             put_ bh af-    put_ bh (IfaceFunTy ag ah) = do+    put_ bh (IfaceFunTy af ag ah) = do             putByte bh 3-            put_ bh ag-            put_ bh ah-    put_ bh (IfaceDFunTy ag ah) = do-            putByte bh 4+            put_ bh af             put_ bh ag             put_ bh ah     put_ bh (IfaceTyConApp tc tys)@@ -1703,12 +1779,10 @@               2 -> do ae <- get bh                       af <- get bh                       return (IfaceAppTy ae af)-              3 -> do ag <- get bh-                      ah <- get bh-                      return (IfaceFunTy ag ah)-              4 -> do ag <- get bh+              3 -> do af <- get bh+                      ag <- get bh                       ah <- get bh-                      return (IfaceDFunTy ag ah)+                      return (IfaceFunTy af ag ah)               5 -> do { tc <- get bh; tys <- get bh                       ; return (IfaceTyConApp tc tys) }               6 -> do { a <- get bh; b <- get bh@@ -1904,3 +1978,75 @@             case h of               0 -> return VanillaDM               _ -> do { t <- get bh; return (GenericDM t) }++instance NFData IfaceType where+  rnf = \case+    IfaceFreeTyVar f1 -> f1 `seq` ()+    IfaceTyVar f1 -> rnf f1+    IfaceLitTy f1 -> rnf f1+    IfaceAppTy f1 f2 -> rnf f1 `seq` rnf f2+    IfaceFunTy f1 f2 f3 -> f1 `seq` rnf f2 `seq` rnf f3+    IfaceForAllTy f1 f2 -> f1 `seq` rnf f2+    IfaceTyConApp f1 f2 -> rnf f1 `seq` rnf f2+    IfaceCastTy f1 f2 -> rnf f1 `seq` rnf f2+    IfaceCoercionTy f1 -> rnf f1+    IfaceTupleTy f1 f2 f3 -> f1 `seq` f2 `seq` rnf f3++instance NFData IfaceTyLit where+  rnf = \case+    IfaceNumTyLit f1 -> rnf f1+    IfaceStrTyLit f1 -> rnf f1++instance NFData IfaceCoercion where+  rnf = \case+    IfaceReflCo f1 -> rnf f1+    IfaceGReflCo f1 f2 f3 -> f1 `seq` rnf f2 `seq` rnf f3+    IfaceFunCo f1 f2 f3 -> f1 `seq` rnf f2 `seq` rnf f3+    IfaceTyConAppCo f1 f2 f3 -> f1 `seq` rnf f2 `seq` rnf f3+    IfaceAppCo f1 f2 -> rnf f1 `seq` rnf f2+    IfaceForAllCo f1 f2 f3 -> rnf f1 `seq` rnf f2 `seq` rnf f3+    IfaceCoVarCo f1 -> rnf f1+    IfaceAxiomInstCo f1 f2 f3 -> rnf f1 `seq` rnf f2 `seq` rnf f3+    IfaceAxiomRuleCo f1 f2 -> rnf f1 `seq` rnf f2+    IfaceUnivCo f1 f2 f3 f4 -> rnf f1 `seq` f2 `seq` rnf f3 `seq` rnf f4+    IfaceSymCo f1 -> rnf f1+    IfaceTransCo f1 f2 -> rnf f1 `seq` rnf f2+    IfaceNthCo f1 f2 -> rnf f1 `seq` rnf f2+    IfaceLRCo f1 f2 -> f1 `seq` rnf f2+    IfaceInstCo f1 f2 -> rnf f1 `seq` rnf f2+    IfaceKindCo f1 -> rnf f1+    IfaceSubCo f1 -> rnf f1+    IfaceFreeCoVar f1 -> f1 `seq` ()+    IfaceHoleCo f1 -> f1 `seq` ()++instance NFData IfaceUnivCoProv where+  rnf x = seq x ()++instance NFData IfaceMCoercion where+  rnf x = seq x ()++instance NFData IfaceOneShot where+  rnf x = seq x ()++instance NFData IfaceTyConSort where+  rnf = \case+    IfaceNormalTyCon -> ()+    IfaceTupleTyCon arity sort -> rnf arity `seq` sort `seq` ()+    IfaceSumTyCon arity -> rnf arity+    IfaceEqualityTyCon -> ()++instance NFData IfaceTyConInfo where+  rnf (IfaceTyConInfo f s) = f `seq` rnf s++instance NFData IfaceTyCon where+  rnf (IfaceTyCon nm info) = rnf nm `seq` rnf info++instance NFData IfaceBndr where+  rnf = \case+    IfaceIdBndr id_bndr -> rnf id_bndr+    IfaceTvBndr tv_bndr -> rnf tv_bndr++instance NFData IfaceAppArgs where+  rnf = \case+    IA_Nil -> ()+    IA_Arg f1 f2 f3 -> rnf f1 `seq` f2 `seq` rnf f3
iface/LoadIface.hs view
@@ -7,6 +7,7 @@ -}  {-# LANGUAGE CPP, BangPatterns, RecordWildCards, NondecreasingIndentation #-}+{-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module LoadIface (         -- Importing one thing@@ -155,7 +156,7 @@   where     nd_doc = text "Need decl for" <+> ppr name     not_found_msg = hang (text "Can't find interface-file declaration for" <+>-                                pprNameSpace (occNameSpace (nameOccName name)) <+> ppr name)+                                pprNameSpace (nameNameSpace name) <+> ppr name)                        2 (vcat [text "Probable cause: bug in .hi-boot file, or inconsistent .hi file",                                 text "Use -ddump-if-trace to get an idea of which file caused the error"])     found_things_msg eps =@@ -399,7 +400,8 @@        -- Redo search for our local hole module        loadInterface doc_str (mkModule (thisPackage dflags) (moduleName mod)) from   | otherwise-  = do  {       -- Read the state+  = withTimingSilentD (text "loading interface") (pure ()) $+    do  {       -- Read the state           (eps,hpt) <- getEpsAndHpt         ; gbl_env <- getGblEnv @@ -407,7 +409,7 @@                  -- Check whether we have the interface already         ; dflags <- getDynFlags-        ; case lookupIfaceByModule dflags hpt (eps_PIT eps) mod of {+        ; case lookupIfaceByModule hpt (eps_PIT eps) mod of {             Just iface                 -> return (Succeeded iface) ;   -- Already loaded                         -- The (src_imp == mi_boot iface) test checks that the already-loaded@@ -421,7 +423,7 @@                            Succeeded hi_boot_file -> computeInterface doc_str hi_boot_file mod         ; case read_result of {             Failed err -> do-                { let fake_iface = emptyModIface mod+                { let fake_iface = emptyFullModIface mod                  ; updateEps_ $ \eps ->                         eps { eps_PIT = extendModuleEnv (eps_PIT eps) (mi_module fake_iface) fake_iface }@@ -673,14 +675,13 @@         traceIf (text "Considering whether to load" <+> ppr mod <+>                  text "to compute precise free module holes")         (eps, hpt) <- getEpsAndHpt-        dflags <- getDynFlags-        case tryEpsAndHpt dflags eps hpt `firstJust` tryDepsCache eps imod insts of+        case tryEpsAndHpt eps hpt `firstJust` tryDepsCache eps imod insts of             Just r -> return (Succeeded r)             Nothing -> readAndCache imod insts     (_, Nothing) -> return (Succeeded emptyUniqDSet)   where-    tryEpsAndHpt dflags eps hpt =-        fmap mi_free_holes (lookupIfaceByModule dflags hpt (eps_PIT eps) mod)+    tryEpsAndHpt eps hpt =+        fmap mi_free_holes (lookupIfaceByModule hpt (eps_PIT eps) mod)     tryDepsCache eps imod insts =         case lookupInstalledModuleEnv (eps_free_holes eps) imod of             Just ifhs  -> Just (renameFreeHoles ifhs insts)@@ -876,7 +877,7 @@     is a home-package module which is not yet in the HPT!  Disaster.  This actually happened with P=base, Q=ghc-prim, via the AMP warnings.-See Trac #8320.+See #8320. -}  findAndReadIface :: SDoc@@ -964,7 +965,7 @@                   r <- read_file dynFilePath                   case r of                       Succeeded (dynIface, _)-                       | mi_mod_hash iface == mi_mod_hash dynIface ->+                       | mi_mod_hash (mi_final_exts iface) == mi_mod_hash (mi_final_exts dynIface) ->                           return ()                        | otherwise ->                           do traceIf (text "Dynamic hash doesn't match")@@ -1038,13 +1039,15 @@  ghcPrimIface :: ModIface ghcPrimIface-  = (emptyModIface gHC_PRIM) {+  = empty_iface {         mi_exports  = ghcPrimExports,         mi_decls    = [],         mi_fixities = fixities,-        mi_fix_fn  = mkIfaceFixCache fixities-    }+        mi_final_exts = (mi_final_exts empty_iface){ mi_fix_fn = mkIfaceFixCache fixities }+        }   where+    empty_iface = emptyFullModIface gHC_PRIM+     -- The fixities listed here for @`seq`@ or @->@ should match     -- those in primops.txt.pp (from which Haddock docs are generated).     fixities = (getOccName seqId, Fixity NoSourceText 0 InfixR)@@ -1117,21 +1120,21 @@  pprModIface :: ModIface -> SDoc -- Show a ModIface-pprModIface iface+pprModIface iface@ModIface{ mi_final_exts = exts }  = vcat [ text "interface"                 <+> ppr (mi_module iface) <+> pp_hsc_src (mi_hsc_src iface)-                <+> (if mi_orphan iface then text "[orphan module]" else Outputable.empty)-                <+> (if mi_finsts iface then text "[family instance module]" else Outputable.empty)-                <+> (if mi_hpc    iface then text "[hpc]" else Outputable.empty)+                <+> (if mi_orphan exts then text "[orphan module]" else Outputable.empty)+                <+> (if mi_finsts exts then text "[family instance module]" else Outputable.empty)+                <+> (if mi_hpc iface then text "[hpc]" else Outputable.empty)                 <+> integer hiVersion-        , nest 2 (text "interface hash:" <+> ppr (mi_iface_hash iface))-        , nest 2 (text "ABI hash:" <+> ppr (mi_mod_hash iface))-        , nest 2 (text "export-list hash:" <+> ppr (mi_exp_hash iface))-        , nest 2 (text "orphan hash:" <+> ppr (mi_orphan_hash iface))-        , nest 2 (text "flag hash:" <+> ppr (mi_flag_hash iface))-        , nest 2 (text "opt_hash:" <+> ppr (mi_opt_hash iface))-        , nest 2 (text "hpc_hash:" <+> ppr (mi_hpc_hash iface))-        , nest 2 (text "plugin_hash:" <+> ppr (mi_plugin_hash iface))+        , nest 2 (text "interface hash:" <+> ppr (mi_iface_hash exts))+        , nest 2 (text "ABI hash:" <+> ppr (mi_mod_hash exts))+        , nest 2 (text "export-list hash:" <+> ppr (mi_exp_hash exts))+        , nest 2 (text "orphan hash:" <+> ppr (mi_orphan_hash exts))+        , nest 2 (text "flag hash:" <+> ppr (mi_flag_hash exts))+        , nest 2 (text "opt_hash:" <+> ppr (mi_opt_hash exts))+        , nest 2 (text "hpc_hash:" <+> ppr (mi_hpc_hash exts))+        , nest 2 (text "plugin_hash:" <+> ppr (mi_plugin_hash exts))         , nest 2 (text "sig of:" <+> ppr (mi_sig_of iface))         , nest 2 (text "used TH splices:" <+> ppr (mi_used_th iface))         , nest 2 (text "where")
iface/MkIface.hs view
@@ -10,8 +10,8 @@ -- writing them to disk and comparing two versions to see if -- recompilation is required. module MkIface (-        mkIface,        -- Build a ModIface from a ModGuts,-                        -- including computing version information+        mkPartialIface,+        mkFullIface,          mkIfaceTc, @@ -34,7 +34,7 @@ A complete description of how recompilation checking works can be found in the wiki commentary: - http://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance+ https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance  Please read the above page for a top-down description of how this all works.  Notes below cover specific issues related to the implementation.@@ -82,7 +82,7 @@ import InstEnv import FamInstEnv import TcRnMonad-import HsSyn+import GHC.Hs import HscTypes import Finder import DynFlags@@ -113,8 +113,9 @@  import Control.Monad import Data.Function-import Data.List+import Data.List (find, findIndex, mapAccumL, sortBy, sort) import qualified Data.Map as Map+import qualified Data.Set as Set import Data.Ord import Data.IORef import System.Directory@@ -134,48 +135,51 @@ ************************************************************************ -} -mkIface :: HscEnv-        -> Maybe Fingerprint    -- The old fingerprint, if we have it-        -> ModDetails           -- The trimmed, tidied interface-        -> ModGuts              -- Usages, deprecations, etc-        -> IO (ModIface, -- The new one-               Bool)     -- True <=> there was an old Iface, and the-                         --          new one is identical, so no need-                         --          to write it+mkPartialIface :: HscEnv+               -> ModDetails+               -> ModGuts+               -> PartialModIface+mkPartialIface hsc_env mod_details+  ModGuts{ mg_module       = this_mod+         , mg_hsc_src      = hsc_src+         , mg_usages       = usages+         , mg_used_th      = used_th+         , mg_deps         = deps+         , mg_rdr_env      = rdr_env+         , mg_fix_env      = fix_env+         , mg_warns        = warns+         , mg_hpc_info     = hpc_info+         , mg_safe_haskell = safe_mode+         , mg_trust_pkg    = self_trust+         , mg_doc_hdr      = doc_hdr+         , mg_decl_docs    = decl_docs+         , mg_arg_docs     = arg_docs+         }+  = mkIface_ hsc_env this_mod hsc_src used_th deps rdr_env fix_env warns hpc_info self_trust+             safe_mode usages doc_hdr decl_docs arg_docs mod_details -mkIface hsc_env maybe_old_fingerprint mod_details-         ModGuts{     mg_module       = this_mod,-                      mg_hsc_src      = hsc_src,-                      mg_usages       = usages,-                      mg_used_th      = used_th,-                      mg_deps         = deps,-                      mg_rdr_env      = rdr_env,-                      mg_fix_env      = fix_env,-                      mg_warns        = warns,-                      mg_hpc_info     = hpc_info,-                      mg_safe_haskell = safe_mode,-                      mg_trust_pkg    = self_trust,-                      mg_doc_hdr      = doc_hdr,-                      mg_decl_docs    = decl_docs,-                      mg_arg_docs     = arg_docs-                    }-        = mkIface_ hsc_env maybe_old_fingerprint-                   this_mod hsc_src used_th deps rdr_env fix_env-                   warns hpc_info self_trust-                   safe_mode usages-                   doc_hdr decl_docs arg_docs-                   mod_details+-- | Fully instantiate a interface+-- Adds fingerprints and potentially code generator produced information.+mkFullIface :: HscEnv -> PartialModIface -> IO ModIface+mkFullIface hsc_env partial_iface = do+    full_iface <-+      {-# SCC "addFingerprints" #-}+      addFingerprints hsc_env partial_iface --- | make an interface from the results of typechecking only.  Useful+    -- Debug printing+    dumpIfSet_dyn (hsc_dflags hsc_env) Opt_D_dump_hi "FINAL INTERFACE" (pprModIface full_iface)++    return full_iface++-- | Make an interface from the results of typechecking only.  Useful -- for non-optimising compilation, or where we aren't generating any -- object code at all ('HscNothing'). mkIfaceTc :: HscEnv-          -> Maybe Fingerprint  -- The old fingerprint, if we have it           -> SafeHaskellMode    -- The safe haskell mode           -> ModDetails         -- gotten from mkBootModDetails, probably           -> TcGblEnv           -- Usages, deprecations, etc-          -> IO (ModIface, Bool)-mkIfaceTc hsc_env maybe_old_fingerprint safe_mode mod_details+          -> IO ModIface+mkIfaceTc hsc_env safe_mode mod_details   tc_result@TcGblEnv{ tcg_mod = this_mod,                       tcg_src = hsc_src,                       tcg_imports = imports,@@ -209,7 +213,7 @@            let (doc_hdr', doc_map, arg_map) = extractDocs tc_result -          mkIface_ hsc_env maybe_old_fingerprint+          let partial_iface = mkIface_ hsc_env                    this_mod hsc_src                    used_th deps rdr_env                    fix_env warns hpc_info@@ -217,9 +221,9 @@                    doc_hdr' doc_map arg_map                    mod_details -+          mkFullIface hsc_env partial_iface -mkIface_ :: HscEnv -> Maybe Fingerprint -> Module -> HscSource+mkIface_ :: HscEnv -> Module -> HscSource          -> Bool -> Dependencies -> GlobalRdrEnv          -> NameEnv FixItem -> Warnings -> HpcInfo          -> Bool@@ -229,8 +233,8 @@          -> DeclDocMap          -> ArgDocMap          -> ModDetails-         -> IO (ModIface, Bool)-mkIface_ hsc_env maybe_old_fingerprint+         -> PartialModIface+mkIface_ hsc_env          this_mod hsc_src used_th deps rdr_env fix_env src_warns          hpc_info pkg_trust_req safe_mode usages          doc_hdr decl_docs arg_docs@@ -276,72 +280,38 @@         annotations = map mkIfaceAnnotation anns         icomplete_sigs = map mkIfaceCompleteSig complete_sigs -        intermediate_iface = ModIface {-              mi_module      = this_mod,-              -- Need to record this because it depends on the -instantiated-with flag-              -- which could change-              mi_sig_of      = if semantic_mod == this_mod-                                then Nothing-                                else Just semantic_mod,-              mi_hsc_src     = hsc_src,-              mi_deps        = deps,-              mi_usages      = usages,-              mi_exports     = mkIfaceExports exports,--              -- Sort these lexicographically, so that-              -- the result is stable across compilations-              mi_insts       = sortBy cmp_inst     iface_insts,-              mi_fam_insts   = sortBy cmp_fam_inst iface_fam_insts,-              mi_rules       = sortBy cmp_rule     iface_rules,--              mi_fixities    = fixities,-              mi_warns       = warns,-              mi_anns        = annotations,-              mi_globals     = maybeGlobalRdrEnv rdr_env,--              -- Left out deliberately: filled in by addFingerprints-              mi_iface_hash  = fingerprint0,-              mi_mod_hash    = fingerprint0,-              mi_flag_hash   = fingerprint0,-              mi_opt_hash    = fingerprint0,-              mi_hpc_hash    = fingerprint0,-              mi_exp_hash    = fingerprint0,-              mi_plugin_hash = fingerprint0,-              mi_used_th     = used_th,-              mi_orphan_hash = fingerprint0,-              mi_orphan      = False, -- Always set by addFingerprints, but-                                      -- it's a strict field, so we can't omit it.-              mi_finsts      = False, -- Ditto-              mi_decls       = deliberatelyOmitted "decls",-              mi_hash_fn     = deliberatelyOmitted "hash_fn",-              mi_hpc         = isHpcUsed hpc_info,-              mi_trust       = trust_info,-              mi_trust_pkg   = pkg_trust_req,--              -- And build the cached values-              mi_warn_fn     = mkIfaceWarnCache warns,-              mi_fix_fn      = mkIfaceFixCache fixities,-              mi_complete_sigs = icomplete_sigs,-              mi_doc_hdr     = doc_hdr,-              mi_decl_docs   = decl_docs,-              mi_arg_docs    = arg_docs }--    (new_iface, no_change_at_all)-          <- {-# SCC "versioninfo" #-}-                   addFingerprints hsc_env maybe_old_fingerprint-                                   intermediate_iface decls--    -- Debug printing-    dumpIfSet_dyn dflags Opt_D_dump_hi "FINAL INTERFACE"-                  (pprModIface new_iface)+    ModIface {+          mi_module      = this_mod,+          -- Need to record this because it depends on the -instantiated-with flag+          -- which could change+          mi_sig_of      = if semantic_mod == this_mod+                            then Nothing+                            else Just semantic_mod,+          mi_hsc_src     = hsc_src,+          mi_deps        = deps,+          mi_usages      = usages,+          mi_exports     = mkIfaceExports exports, -    -- bug #1617: on reload we weren't updating the PrintUnqualified-    -- correctly.  This stems from the fact that the interface had-    -- not changed, so addFingerprints returns the old ModIface-    -- with the old GlobalRdrEnv (mi_globals).-    let final_iface = new_iface{ mi_globals = maybeGlobalRdrEnv rdr_env }+          -- Sort these lexicographically, so that+          -- the result is stable across compilations+          mi_insts       = sortBy cmp_inst     iface_insts,+          mi_fam_insts   = sortBy cmp_fam_inst iface_fam_insts,+          mi_rules       = sortBy cmp_rule     iface_rules, -    return (final_iface, no_change_at_all)+          mi_fixities    = fixities,+          mi_warns       = warns,+          mi_anns        = annotations,+          mi_globals     = maybeGlobalRdrEnv rdr_env,+          mi_used_th     = used_th,+          mi_decls       = decls,+          mi_hpc         = isHpcUsed hpc_info,+          mi_trust       = trust_info,+          mi_trust_pkg   = pkg_trust_req,+          mi_complete_sigs = icomplete_sigs,+          mi_doc_hdr     = doc_hdr,+          mi_decl_docs   = decl_docs,+          mi_arg_docs    = arg_docs,+          mi_final_exts        = () }   where      cmp_rule     = comparing ifRuleName      -- Compare these lexicographically by OccName, *not* by unique,@@ -362,9 +332,6 @@          | targetRetainsAllBindings (hscTarget dflags) = Just rdr_env          | otherwise                                   = Nothing -     deliberatelyOmitted :: String -> a-     deliberatelyOmitted x = panic ("Deliberately omitted: " ++ x)-      ifFamInstTcName = ifFamInstFam  -----------------------------@@ -398,7 +365,7 @@       orig_mod = nameModule name       lookup mod = do         MASSERT2( isExternalName name, ppr name )-        iface <- case lookupIfaceByModule dflags hpt pit mod of+        iface <- case lookupIfaceByModule hpt pit mod of                   Just iface -> return iface                   Nothing -> do                       -- This can occur when we're writing out ifaces for@@ -408,7 +375,7 @@                       iface <- initIfaceLoad hsc_env . withException                             $ loadInterface (text "lookupVers2") mod ImportBySystem                       return iface-        return $ snd (mi_hash_fn iface occ `orElse`+        return $ snd (mi_hash_fn (mi_final_exts iface) occ `orElse`                   pprPanic "lookupVers1" (ppr mod <+> ppr occ))  -- ---------------------------------------------------------------------------@@ -442,17 +409,16 @@ -- See Note [Fingerprinting IfaceDecls] addFingerprints         :: HscEnv-        -> Maybe Fingerprint -- the old fingerprint, if any-        -> ModIface          -- The new interface (lacking decls)-        -> [IfaceDecl]       -- The new decls-        -> IO (ModIface,     -- Updated interface-               Bool)         -- True <=> no changes at all;-                             -- no need to write Iface--addFingerprints hsc_env mb_old_fingerprint iface0 new_decls+        -> PartialModIface+        -> IO ModIface+addFingerprints hsc_env iface0  = do    eps <- hscEPS hsc_env    let+       decls = mi_decls iface0+       warn_fn = mkIfaceWarnCache (mi_warns iface0)+       fix_fn = mkIfaceFixCache (mi_fixities iface0)+         -- The ABI of a declaration represents everything that is made         -- visible about the declaration that a client can depend on.         -- see IfaceDeclABI below.@@ -467,7 +433,7 @@        -- from its OccName. See Note [default method Name]        top_lvl_name_env =          mkOccEnv [ (nameOccName nm, nm)-                  | IfaceId { ifName = nm } <- new_decls ]+                  | IfaceId { ifName = nm } <- decls ]         -- Dependency edges between declarations in the current module.        -- This is computed by finding the free external names of each@@ -475,7 +441,7 @@        -- declaration implicitly depends on).        edges :: [ Node Unique IfaceDeclABI ]        edges = [ DigraphNode abi (getUnique (getOccName decl)) out-               | decl <- new_decls+               | decl <- decls                , let abi = declABI decl                , let out = localOccs $ freeNamesDeclABI abi                ]@@ -500,7 +466,7 @@         -- e.g. a reference to a constructor must be turned into a reference         -- to the TyCon for the purposes of calculating dependencies.        parent_map :: OccEnv OccName-       parent_map = foldl' extend emptyOccEnv new_decls+       parent_map = foldl' extend emptyOccEnv decls           where extend env d =                   extendOccEnvList env [ (b,n) | b <- ifaceDeclImplicitBndrs d ]                   where n = getOccName d@@ -625,7 +591,7 @@     -- Note [Do not update EPS with your own hi-boot]    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-   -- (See also Trac #10182).  When your hs-boot file includes an orphan+   -- (See also #10182).  When your hs-boot file includes an orphan    -- instance declaration, you may find that the dep_orphs of a module you    -- import contains reference to yourself.  DO NOT actually load this module    -- or add it to the orphan hashes: you're going to provide the orphan@@ -645,7 +611,7 @@                        -- See Note [Export hash depends on non-orphan family instances]                        dep_finsts (mi_deps iface0),                         -- dep_pkgs: see "Package Version Changes" on-                        -- wiki/Commentary/Compiler/RecompilationAvoidance+                        -- wiki/commentary/compiler/recompilation-avoidance                        mi_trust iface0)                         -- Make sure change of Safe Haskell mode causes recomp. @@ -718,26 +684,27 @@                        mi_hpc iface0)     let-    no_change_at_all = Just iface_hash == mb_old_fingerprint--    final_iface = iface0 {-                mi_mod_hash    = mod_hash,-                mi_iface_hash  = iface_hash,-                mi_exp_hash    = export_hash,-                mi_orphan_hash = orphan_hash,-                mi_flag_hash   = flag_hash,-                mi_opt_hash    = opt_hash,-                mi_hpc_hash    = hpc_hash,-                mi_plugin_hash = plugin_hash,-                mi_orphan      = not (   all ifRuleAuto orph_rules-                                           -- See Note [Orphans and auto-generated rules]-                                      && null orph_insts-                                      && null orph_fis),-                mi_finsts      = not . null $ mi_fam_insts iface0,-                mi_decls       = sorted_decls,-                mi_hash_fn     = lookupOccEnv local_env }+    final_iface_exts = ModIfaceBackend+      { mi_iface_hash  = iface_hash+      , mi_mod_hash    = mod_hash+      , mi_flag_hash   = flag_hash+      , mi_opt_hash    = opt_hash+      , mi_hpc_hash    = hpc_hash+      , mi_plugin_hash = plugin_hash+      , mi_orphan      = not (   all ifRuleAuto orph_rules+                                   -- See Note [Orphans and auto-generated rules]+                              && null orph_insts+                              && null orph_fis)+      , mi_finsts      = not (null (mi_fam_insts iface0))+      , mi_exp_hash    = export_hash+      , mi_orphan_hash = orphan_hash+      , mi_warn_fn     = warn_fn+      , mi_fix_fn      = fix_fn+      , mi_hash_fn     = lookupOccEnv local_env+      }+    final_iface = iface0 { mi_decls = sorted_decls, mi_final_exts = final_iface_exts }    ---   return (final_iface, no_change_at_all)+   return final_iface    where     this_mod = mi_module iface0@@ -746,7 +713,6 @@     (non_orph_insts, orph_insts) = mkOrphMap ifInstOrph    (mi_insts iface0)     (non_orph_rules, orph_rules) = mkOrphMap ifRuleOrph    (mi_rules iface0)     (non_orph_fis,   orph_fis)   = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)-    fix_fn = mi_fix_fn iface0     ann_fn = mkIfaceAnnCache (mi_anns iface0)  -- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules@@ -785,14 +751,13 @@   let     hpt        = hsc_HPT hsc_env     pit        = eps_PIT eps-    dflags     = hsc_dflags hsc_env     get_orph_hash mod =-          case lookupIfaceByModule dflags hpt pit mod of-            Just iface -> return (mi_orphan_hash iface)+          case lookupIfaceByModule hpt pit mod of+            Just iface -> return (mi_orphan_hash (mi_final_exts iface))             Nothing    -> do -- similar to 'mkHashFun'                 iface <- initIfaceLoad hsc_env . withException                             $ loadInterface (text "getOrphanHashes") mod ImportBySystem-                return (mi_orphan_hash iface)+                return (mi_orphan_hash (mi_final_exts iface))    --   mapM get_orph_hash mods@@ -991,7 +956,7 @@             insts = (map ifDFun $ (concatMap at_extras ats)                                     ++ lookupOccEnvL inst_env n)                            -- Include instances of the associated types-                           -- as well as instances of the class (Trac #5147)+                           -- as well as instances of the class (#5147)             meths = [id_extras (getOccName op) | IfaceClassOp op _ _ <- sigs]             -- Names of all the default methods (see Note [default method Name])             defms = [ dmName@@ -1136,7 +1101,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~ Most of the used_names are External Names, but we can have Internal Names too: see Note [Binders in Template Haskell] in Convert, and-Trac #5362 for an example.  Such Names are always+#5362 for an example.  Such Names are always   - Such Names are always for locally-defined things, for which we     don't gather usage info, so we can just ignore them in ent_map   - They are always System Names, hence the assert, just as a double check.@@ -1177,8 +1142,8 @@ -- is equivalent to the current source file the user asked us to compile. -- If the same, we can avoid recompilation. We return a tuple where the -- first element is a bool saying if we should recompile the object file--- and the second is maybe the interface file, where Nothng means to--- rebuild the interface file not use the exisitng one.+-- and the second is maybe the interface file, where Nothing means to+-- rebuild the interface file and not use the existing one. checkOldIface   :: HscEnv   -> ModSummary@@ -1326,7 +1291,7 @@ checkPlugins :: HscEnv -> ModIface -> IfG RecompileRequired checkPlugins hsc iface = liftIO $ do   new_fingerprint <- fingerprintPlugins hsc-  let old_fingerprint = mi_plugin_hash iface+  let old_fingerprint = mi_plugin_hash (mi_final_exts iface)   pr <- mconcat <$> mapM pluginRecompile' (plugins (hsc_dflags hsc))   return $     pluginRecompileToRecompileRequired old_fingerprint new_fingerprint pr@@ -1423,7 +1388,7 @@ -- | Check the flags haven't changed checkFlagHash :: HscEnv -> ModIface -> IfG RecompileRequired checkFlagHash hsc_env iface = do-    let old_hash = mi_flag_hash iface+    let old_hash = mi_flag_hash (mi_final_exts iface)     new_hash <- liftIO $ fingerprintDynFlags (hsc_dflags hsc_env)                                              (mi_module iface)                                              putNameLiterally@@ -1436,7 +1401,7 @@ -- | Check the optimisation flags haven't changed checkOptimHash :: HscEnv -> ModIface -> IfG RecompileRequired checkOptimHash hsc_env iface = do-    let old_hash = mi_opt_hash iface+    let old_hash = mi_opt_hash (mi_final_exts iface)     new_hash <- liftIO $ fingerprintOptFlags (hsc_dflags hsc_env)                                                putNameLiterally     if | old_hash == new_hash@@ -1451,7 +1416,7 @@ -- | Check the HPC flags haven't changed checkHpcHash :: HscEnv -> ModIface -> IfG RecompileRequired checkHpcHash hsc_env iface = do-    let old_hash = mi_hpc_hash iface+    let old_hash = mi_hpc_hash (mi_final_exts iface)     new_hash <- liftIO $ fingerprintHpcFlags (hsc_dflags hsc_env)                                                putNameLiterally     if | old_hash == new_hash@@ -1486,11 +1451,30 @@ --   - a new home module has been added that shadows a package module -- See bug #1372. --+-- In addition, we also check if the union of dependencies of the imported+-- modules has any difference to the previous set of dependencies. We would need+-- to recompile in that case also since the `mi_deps` field of ModIface needs+-- to be updated to match that information. This is one of the invariants+-- of interface files (see https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance#interface-file-invariants).+-- See bug #16511.+-- -- Returns (RecompBecause <textual reason>) if recompilation is required. checkDependencies :: HscEnv -> ModSummary -> ModIface -> IfG RecompileRequired checkDependencies hsc_env summary iface- = checkList (map dep_missing (ms_imps summary ++ ms_srcimps summary))-  where+ = do+   checkList $+     [ checkList (map dep_missing (ms_imps summary ++ ms_srcimps summary))+     , do+         (recomp, mnames_seen) <- runUntilRecompRequired $ map+           checkForNewHomeDependency+           (ms_home_imps summary)+         case recomp of+           UpToDate -> do+             let+               seen_home_deps = Set.unions $ map Set.fromList mnames_seen+             checkIfAllOldHomeDependenciesAreSeen seen_home_deps+           _ -> return recomp]+ where    prev_dep_mods = dep_mods (mi_deps iface)    prev_dep_plgn = dep_plgins (mi_deps iface)    prev_dep_pkgs = dep_pkgs (mi_deps iface)@@ -1522,12 +1506,74 @@            where pkg = moduleUnitId mod         _otherwise  -> return (RecompBecause reason) +   old_deps = Set.fromList $ map fst $ filter (not . snd) prev_dep_mods+   isOldHomeDeps = flip Set.member old_deps+   checkForNewHomeDependency (L _ mname) = do+     let+       mod = mkModule this_pkg mname+       str_mname = moduleNameString mname+       reason = str_mname ++ " changed"+     -- We only want to look at home modules to check if any new home dependency+     -- pops in and thus here, skip modules that are not home. Checking+     -- membership in old home dependencies suffice because the `dep_missing`+     -- check already verified that all imported home modules are present there.+     if not (isOldHomeDeps mname)+       then return (UpToDate, [])+       else do+         mb_result <- getFromModIface "need mi_deps for" mod $ \imported_iface -> do+           let mnames = mname:(map fst $ filter (not . snd) $+                 dep_mods $ mi_deps imported_iface)+           case find (not . isOldHomeDeps) mnames of+             Nothing -> return (UpToDate, mnames)+             Just new_dep_mname -> do+               traceHiDiffs $+                 text "imported home module " <> quotes (ppr mod) <>+                 text " has a new dependency " <> quotes (ppr new_dep_mname)+               return (RecompBecause reason, [])+         return $ fromMaybe (MustCompile, []) mb_result++   -- Performs all recompilation checks in the list until a check that yields+   -- recompile required is encountered. Returns the list of the results of+   -- all UpToDate checks.+   runUntilRecompRequired []             = return (UpToDate, [])+   runUntilRecompRequired (check:checks) = do+     (recompile, value) <- check+     if recompileRequired recompile+       then return (recompile, [])+       else do+         (recomp, values) <- runUntilRecompRequired checks+         return (recomp, value:values)++   checkIfAllOldHomeDependenciesAreSeen seen_deps = do+     let unseen_old_deps = Set.difference+          old_deps+          seen_deps+     if not (null unseen_old_deps)+       then do+         let missing_dep = Set.elemAt 0 unseen_old_deps+         traceHiDiffs $+           text "missing old home dependency " <> quotes (ppr missing_dep)+         return $ RecompBecause "missing old dependency"+       else return UpToDate+ needInterface :: Module -> (ModIface -> IfG RecompileRequired)-              -> IfG RecompileRequired+             -> IfG RecompileRequired needInterface mod continue+  = do+      mb_recomp <- getFromModIface+        "need version info for"+        mod+        continue+      case mb_recomp of+        Nothing -> return MustCompile+        Just recomp -> return recomp++getFromModIface :: String -> Module -> (ModIface -> IfG a)+              -> IfG (Maybe a)+getFromModIface doc_msg mod getter   = do  -- Load the imported interface if possible-    let doc_str = sep [text "need version info for", ppr mod]-    traceHiDiffs (text "Checking usages for module" <+> ppr mod)+    let doc_str = sep [text doc_msg, ppr mod]+    traceHiDiffs (text "Checking innterface for module" <+> ppr mod)      mb_iface <- loadInterface doc_str mod ImportBySystem         -- Load the interface, but don't complain on failure;@@ -1537,12 +1583,12 @@       Failed _ -> do         traceHiDiffs (sep [text "Couldn't load interface for module",                            ppr mod])-        return MustCompile+        return Nothing                   -- Couldn't find or parse a module mentioned in the                   -- old interface file.  Don't complain: it might                   -- just be that the current module doesn't need that                   -- import and it's been deleted-      Succeeded iface -> continue iface+      Succeeded iface -> Just <$> getter iface  -- | Given the usage information extracted from the old -- M.hi file for the module being compiled, figure out@@ -1553,7 +1599,7 @@                                 usg_mod_hash = old_mod_hash }   = needInterface mod $ \iface -> do     let reason = moduleNameString (moduleName mod) ++ " changed"-    checkModuleFingerprint reason old_mod_hash (mi_mod_hash iface)+    checkModuleFingerprint reason old_mod_hash (mi_mod_hash (mi_final_exts iface))         -- We only track the ABI hash of package modules, rather than         -- individual entity usages, so if the ABI hash changes we must         -- recompile.  This is safe but may entail more recompilation when@@ -1562,7 +1608,7 @@ checkModUsage _ UsageMergedRequirement{ usg_mod = mod, usg_mod_hash = old_mod_hash }   = needInterface mod $ \iface -> do     let reason = moduleNameString (moduleName mod) ++ " changed (raw)"-    checkModuleFingerprint reason old_mod_hash (mi_mod_hash iface)+    checkModuleFingerprint reason old_mod_hash (mi_mod_hash (mi_final_exts iface))  checkModUsage this_pkg UsageHomeModule{                                 usg_mod_name = mod_name,@@ -1574,9 +1620,9 @@     needInterface mod $ \iface -> do      let-        new_mod_hash    = mi_mod_hash    iface-        new_decl_hash   = mi_hash_fn     iface-        new_export_hash = mi_exp_hash    iface+        new_mod_hash    = mi_mod_hash (mi_final_exts iface)+        new_decl_hash   = mi_hash_fn  (mi_final_exts iface)+        new_export_hash = mi_exp_hash (mi_final_exts iface)          reason = moduleNameString mod_name ++ " changed" @@ -1722,33 +1768,30 @@  where    branch_list = fromBranches branches --- 2nd parameter is the list of branch LHSs, for conversion from incompatible branches--- to incompatible indices+-- 2nd parameter is the list of branch LHSs, in case of a closed type family,+-- for conversion from incompatible branches to incompatible indices.+-- For an open type family the list should be empty. -- See Note [Storing compatibility] in CoAxiom coAxBranchToIfaceBranch :: TyCon -> [[Type]] -> CoAxBranch -> IfaceAxBranch coAxBranchToIfaceBranch tc lhs_s-                        branch@(CoAxBranch { cab_incomps = incomps })-  = (coAxBranchToIfaceBranch' tc branch) { ifaxbIncomps = iface_incomps }+                        (CoAxBranch { cab_tvs = tvs, cab_cvs = cvs+                                    , cab_eta_tvs = eta_tvs+                                    , cab_lhs = lhs, cab_roles = roles+                                    , cab_rhs = rhs, cab_incomps = incomps })++  = IfaceAxBranch { ifaxbTyVars  = toIfaceTvBndrs tvs+                  , ifaxbCoVars  = map toIfaceIdBndr cvs+                  , ifaxbEtaTyVars = toIfaceTvBndrs eta_tvs+                  , ifaxbLHS     = toIfaceTcArgs tc lhs+                  , ifaxbRoles   = roles+                  , ifaxbRHS     = toIfaceType rhs+                  , ifaxbIncomps = iface_incomps }   where     iface_incomps = map (expectJust "iface_incomps"-                        . (flip findIndex lhs_s-                          . eqTypes)+                        . flip findIndex lhs_s+                        . eqTypes                         . coAxBranchLHS) incomps --- use this one for standalone branches without incompatibles-coAxBranchToIfaceBranch' :: TyCon -> CoAxBranch -> IfaceAxBranch-coAxBranchToIfaceBranch' tc (CoAxBranch { cab_tvs = tvs, cab_cvs = cvs-                                        , cab_eta_tvs = eta_tvs-                                        , cab_lhs = lhs-                                        , cab_roles = roles, cab_rhs = rhs })-  = IfaceAxBranch { ifaxbTyVars    = toIfaceTvBndrs tvs-                  , ifaxbCoVars    = map toIfaceIdBndr cvs-                  , ifaxbEtaTyVars = toIfaceTvBndrs eta_tvs-                  , ifaxbLHS       = toIfaceTcArgs tc lhs-                  , ifaxbRoles     = roles-                  , ifaxbRHS       = toIfaceType rhs-                  , ifaxbIncomps   = [] }- ----------------- tyConToIfaceDecl :: TidyEnv -> TyCon -> (TidyEnv, IfaceDecl) -- We *do* tidy TyCons, because they are not (and cannot@@ -1829,7 +1872,8 @@     to_if_fam_flav (ClosedSynFamilyTyCon (Just ax))       = IfaceClosedSynFamilyTyCon (Just (axn, ibr))       where defs = fromBranches $ coAxiomBranches ax-            ibr  = map (coAxBranchToIfaceBranch' tycon) defs+            lhss = map coAxBranchLHS defs+            ibr  = map (coAxBranchToIfaceBranch tycon lhss) defs             axn  = coAxiomName ax      ifaceConDecls (NewTyCon { data_con = con })    = IfNewTyCon  (ifaceConDecl con)
iface/TcIface.hs view
@@ -16,7 +16,7 @@         typecheckIfaceForInstantiate,         tcIfaceDecl, tcIfaceInst, tcIfaceFamInst, tcIfaceRules,         tcIfaceAnnotations, tcIfaceCompleteSigs,-        tcIfaceExpr,    -- Desired by HERMIT (Trac #7683)+        tcIfaceExpr,    -- Desired by HERMIT (#7683)         tcIfaceGlobal  ) where @@ -35,6 +35,7 @@ import Coercion import CoAxiom import TyCoRep    -- needs to build types & coercions in a knot+import TyCoSubst ( substTyCoVars ) import HscTypes import Annotations import InstEnv@@ -757,7 +758,7 @@         --     class C (T a) => D a where         --       data T a         -- Here the associated type T is knot-tied with the class, and-        -- so we must not pull on T too eagerly.  See Trac #5970+        -- so we must not pull on T too eagerly.  See #5970     tc_sig :: IfaceClassOp -> IfL TcMethInfo    tc_sig (IfaceClassOp op_name rdr_ty dm)@@ -789,7 +790,7 @@                                      ; return (Just (tc_def, noSrcSpan)) }                   -- Must be done lazily in case the RHS of the defaults mention                   -- the type constructor being defined here-                  -- e.g.   type AT a; type AT b = AT [b]   Trac #8002+                  -- e.g.   type AT a; type AT b = AT [b]   #8002           return (ATI tc mb_def)     mk_sc_doc pred = text "Superclass" <+> ppr pred@@ -804,7 +805,7 @@        -- a hs-boot declared type constructor that is going to be        -- defined by this module.        -- e.g. type instance F Int = ToBeDefined-       -- See Trac #13803+       -- See #13803        ; tc_branches <- forkM (text "Axiom branches" <+> ppr tc_name)                       $ tc_ax_branches branches        ; let axiom = CoAxiom { co_ax_unique   = nameUnique tc_name@@ -992,7 +993,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~ Notice that we eagerly grab the *kind* from the interface file, but build a forkM thunk for the *rhs* (and family stuff).  To see why,-consider this (Trac #2412)+consider this (#2412)  M.hs:       module M where { import X; data T = MkT S } X.hs:       module X where { import {-# SOURCE #-} M; type S = T }@@ -1140,12 +1141,11 @@ tcIfaceType :: IfaceType -> IfL Type tcIfaceType = go   where-    go (IfaceTyVar n)         = TyVarTy <$> tcIfaceTyVar n-    go (IfaceFreeTyVar n)     = pprPanic "tcIfaceType:IfaceFreeTyVar" (ppr n)-    go (IfaceLitTy l)         = LitTy <$> tcIfaceTyLit l-    go (IfaceFunTy t1 t2)     = FunTy <$> go t1 <*> go t2-    go (IfaceDFunTy t1 t2)    = FunTy <$> go t1 <*> go t2-    go (IfaceTupleTy s i tks) = tcIfaceTupleTy s i tks+    go (IfaceTyVar n)          = TyVarTy <$> tcIfaceTyVar n+    go (IfaceFreeTyVar n)      = pprPanic "tcIfaceType:IfaceFreeTyVar" (ppr n)+    go (IfaceLitTy l)          = LitTy <$> tcIfaceTyLit l+    go (IfaceFunTy flag t1 t2) = FunTy flag <$> go t1 <*> go t2+    go (IfaceTupleTy s i tks)  = tcIfaceTupleTy s i tks     go (IfaceAppTy t ts)       = do { t'  <- go t            ; ts' <- traverse go (appArgsIfaceTypes ts)@@ -1631,7 +1631,7 @@ -- -- There is also a wiki page on the subject, see: -----      https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/TyingTheKnot+--      https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/tying-the-knot  -- Note [Knot-tying fallback on boot] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iface/ToIface.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE Strict #-} -- See Note [Avoiding space leaks in toIface*]  -- | Functions for converting Core things to interface file things. module ToIface@@ -68,10 +69,37 @@ import VarEnv import VarSet import TyCoRep+import TyCoTidy ( tidyCo ) import Demand ( isTopSig )  import Data.Maybe ( catMaybes ) +{- Note [Avoiding space leaks in toIface*]+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Building a interface file depends on the output of the simplifier.+If we build these lazily this would mean keeping the Core AST alive+much longer than necessary causing a space "leak".++This happens for example when we only write the interface file to disk+after code gen has run, in which case we might carry megabytes of core+AST in the heap which is no longer needed.++We avoid this in two ways.+* First we use -XStrict in ToIface which avoids many thunks to begin with.+* Second we define NFData instance for IFaceSyn and use them to+  force any remaining thunks.++-XStrict is not sufficient as patterns of the form `f (g x)` would still+result in a thunk being allocated for `g x`.++NFData is sufficient for the space leak, but using -XStrict reduces allocation+by ~0.1% when compiling with -O. (nofib/spectral/simple, T10370).+It's essentially free performance hence we use -XStrict on top of NFData.++MR !1633 on gitlab, has more discussion on the topic.+-}+ ---------------- toIfaceTvBndr :: TyVar -> IfaceTvBndr toIfaceTvBndr = toIfaceTvBndrX emptyVarSet@@ -140,9 +168,8 @@ toIfaceTypeX _  (LitTy n)      = IfaceLitTy (toIfaceTyLit n) toIfaceTypeX fr (ForAllTy b t) = IfaceForAllTy (toIfaceForAllBndrX fr b)                                                (toIfaceTypeX (fr `delVarSet` binderVar b) t)-toIfaceTypeX fr (FunTy t1 t2)-  | isPredTy t1                 = IfaceDFunTy (toIfaceTypeX fr t1) (toIfaceTypeX fr t2)-  | otherwise                   = IfaceFunTy  (toIfaceTypeX fr t1) (toIfaceTypeX fr t2)+toIfaceTypeX fr (FunTy { ft_arg = t1, ft_res = t2, ft_af = af })+  = IfaceFunTy af (toIfaceTypeX fr t1) (toIfaceTypeX fr t2) toIfaceTypeX fr (CastTy ty co)  = IfaceCastTy (toIfaceTypeX fr ty) (toIfaceCoercionX fr co) toIfaceTypeX fr (CoercionTy co) = IfaceCoercionTy (toIfaceCoercionX fr co) @@ -310,8 +337,14 @@         t'  = toIfaceTypeX fr t         ts' = go (extendTCvSubst env tv t) res ts -    go env (FunTy _ res) (t:ts) -- No type-class args in tycon apps-      = IA_Arg (toIfaceTypeX fr t) Required (go env res ts)+    go env (FunTy { ft_af = af, ft_res = res }) (t:ts)+      = IA_Arg (toIfaceTypeX fr t) argf (go env res ts)+      where+        argf = case af of+                 VisArg   -> Required+                 InvisArg -> Inferred+                   -- It's rare for a kind to have a constraint argument, but+                   -- it can happen. See Note [AnonTCB InvisArg] in TyCon.      go env ty ts@(t1:ts1)       | not (isEmptyTCvSubst env)@@ -323,7 +356,7 @@         -- e.g. kind = k, ty_args = [Int]         -- This is probably a compiler bug, so we print a trace and         -- carry on as if it were FunTy.  Without the test for-        -- isEmptyTCvSubst we'd get an infinite loop (Trac #15473)+        -- isEmptyTCvSubst we'd get an infinite loop (#15473)         WARN( True, ppr kind $$ ppr ty_args )         IA_Arg (toIfaceTypeX fr t1) Required (go env ty ts1) @@ -523,7 +556,7 @@ toIfaceTickish (SourceNote src names)  = Just (IfaceSource src names) toIfaceTickish (Breakpoint {})         = Nothing    -- Ignore breakpoints, since they are relevant only to GHCi, and-   -- should not be serialised (Trac #8333)+   -- should not be serialised (#8333)  --------------------- toIfaceBind :: Bind Id -> IfaceBinding@@ -582,7 +615,7 @@  {- Note [Inlining and hs-boot files] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this example (Trac #10083, #12789):+Consider this example (#10083, #12789):      ---------- RSR.hs-boot ------------     module RSR where@@ -644,7 +677,7 @@ Here is a solution that doesn't work: when compiling RSR, add a NOINLINE pragma to every function exported by the boot-file for RSR (if it exists).  Doing so makes the bootstrapped GHC itself-slower by 8% overall (on Trac #9872a-d, and T1969: the reason+slower by 8% overall (on #9872a-d, and T1969: the reason is that these NOINLINE'd functions now can't be profitably inlined outside of the hs-boot loop. 
iface/ToIface.hs-boot view
@@ -1,6 +1,6 @@ module ToIface where -import {-# SOURCE #-} TyCoRep+import {-# SOURCE #-} TyCoRep ( Type, TyLit, Coercion ) import {-# SOURCE #-} IfaceType( IfaceType, IfaceTyCon, IfaceForAllBndr                                , IfaceCoercion, IfaceTyLit, IfaceAppArgs ) import Var ( TyCoVarBinder )
llvmGen/Llvm/Types.hs view
@@ -185,6 +185,7 @@ pprSpecialStatic (LMBitc v t) =     ppr (pLower t) <> text ", bitcast (" <> ppr v <> text " to " <> ppr t         <> char ')'+pprSpecialStatic v@(LMStaticPointer x) = ppr (pLower $ getVarType x) <> comma <+> ppr v pprSpecialStatic stat = ppr stat  @@ -231,7 +232,7 @@                                    error $ "Can't print this float literal!" ++ showSDoc dflags (ppr f)) ppLit (LMVectorLit ls  )       = char '<' <+> ppCommaJoin ls <+> char '>' ppLit (LMNullLit _     )       = text "null"--- Trac 11487 was an issue where we passed undef for some arguments+-- #11487 was an issue where we passed undef for some arguments -- that were actually live. By chance the registers holding those -- arguments usually happened to have the right values anyways, but -- that was not guaranteed. To find such bugs reliably, we set the@@ -842,8 +843,10 @@                      [x,y] -> [x,y]                      _     -> error "dToStr: too many hex digits for float" -        str  = map toUpper $ concat $ fixEndian $ map hex bs-    in  text "0x" <> text str+    in sdocWithDynFlags (\dflags ->+         let fixEndian = if wORDS_BIGENDIAN dflags then id else reverse+             str       = map toUpper $ concat $ fixEndian $ map hex bs+         in text "0x" <> text str)  -- Note [LLVM Float Types] -- ~~~~~~~~~~~~~~~~~~~~~~~@@ -872,14 +875,6 @@  ppFloat :: Float -> SDoc ppFloat = ppDouble . widenFp---- | Reverse or leave byte data alone to fix endianness on this target.-fixEndian :: [a] -> [a]-#if defined(WORDS_BIGENDIAN)-fixEndian = id-#else-fixEndian = reverse-#endif   --------------------------------------------------------------------------------
llvmGen/LlvmCodeGen.hs view
@@ -17,20 +17,17 @@ import LlvmCodeGen.Regs import LlvmMangler -import BlockId-import CgUtils ( fixStgRegisters )+import GHC.StgToCmm.CgUtils ( fixStgRegisters ) import Cmm-import CmmUtils-import Hoopl.Block import Hoopl.Collections import PprCmm  import BufWrite import DynFlags+import GHC.Platform ( platformArch, Arch(..) ) import ErrUtils import FastString import Outputable-import UniqSupply import SysTools ( figureLlvmVersion ) import qualified Stream @@ -41,11 +38,11 @@ -- ----------------------------------------------------------------------------- -- | Top-level of the LLVM Code generator ---llvmCodeGen :: DynFlags -> Handle -> UniqSupply-               -> Stream.Stream IO RawCmmGroup ()-               -> IO ()-llvmCodeGen dflags h us cmm_stream-  = withTiming (pure dflags) (text "LLVM CodeGen") (const ()) $ do+llvmCodeGen :: DynFlags -> Handle+               -> Stream.Stream IO RawCmmGroup a+               -> IO a+llvmCodeGen dflags h cmm_stream+  = withTiming dflags (text "LLVM CodeGen") (const ()) $ do        bufh <- newBufHandle h         -- Pass header@@ -64,14 +61,21 @@            "Currently only " <> text (llvmVersionStr supportedLlvmVersion) <> " is supported." <+>            "System LLVM version: " <> text (llvmVersionStr ver) $$            "We will try though..."+         let isS390X = platformArch (targetPlatform dflags) == ArchS390X+         let major_ver = head . llvmVersionList $ ver+         when (isS390X && major_ver < 10 && doWarn) $ putMsg dflags $+           "Warning: For s390x the GHC calling convention is only supported since LLVM version 10." <+>+           "You are using LLVM version: " <> text (llvmVersionStr ver)         -- run code generation-       runLlvm dflags (fromMaybe supportedLlvmVersion mb_ver) bufh us $+       a <- runLlvm dflags (fromMaybe supportedLlvmVersion mb_ver) bufh $          llvmCodeGen' (liftStream cmm_stream)         bFlush bufh -llvmCodeGen' :: Stream.Stream LlvmM RawCmmGroup () -> LlvmM ()+       return a++llvmCodeGen' :: Stream.Stream LlvmM RawCmmGroup a -> LlvmM a llvmCodeGen' cmm_stream   = do  -- Preamble         renderLlvm header@@ -79,24 +83,31 @@         cmmMetaLlvmPrelude          -- Procedures-        let llvmStream = Stream.mapM llvmGroupLlvmGens cmm_stream-        _ <- Stream.collect llvmStream+        a <- Stream.consume cmm_stream llvmGroupLlvmGens          -- Declare aliases for forward references         renderLlvm . pprLlvmData =<< generateExternDecls          -- Postamble         cmmUsedLlvmGens++        return a   where     header :: SDoc     header = sdocWithDynFlags $ \dflags ->-      let target = LLVM_TARGET-          layout = case lookup target (llvmTargets dflags) of-            Just (LlvmTarget dl _ _) -> dl-            Nothing -> error $ "Failed to lookup the datalayout for " ++ target ++ "; available targets: " ++ show (map fst $ llvmTargets dflags)-      in     text ("target datalayout = \"" ++ layout ++ "\"")+      let target = platformMisc_llvmTarget $ platformMisc dflags+      in     text ("target datalayout = \"" ++ getDataLayout dflags target ++ "\"")          $+$ text ("target triple = \"" ++ target ++ "\"") +    getDataLayout :: DynFlags -> String -> String+    getDataLayout dflags target =+      case lookup target (llvmTargets $ llvmConfig dflags) of+        Just (LlvmTarget {lDataLayout=dl}) -> dl+        Nothing -> pprPanic "Failed to lookup LLVM data layout" $+                   text "Target:" <+> text target $$+                   hang (text "Available targets:") 4+                        (vcat $ map (text . fst) $ llvmTargets $ llvmConfig dflags)+ llvmGroupLlvmGens :: RawCmmGroup -> LlvmM () llvmGroupLlvmGens cmm = do @@ -135,44 +146,13 @@         renderLlvm $ pprLlvmData (concat gss', concat tss) --- | LLVM can't handle entry blocks which loop back to themselves (could be--- seen as an LLVM bug) so we rearrange the code to keep the original entry--- label which branches to a newly generated second label that branches back--- to itself. See: Trac #11649-fixBottom :: RawCmmDecl -> LlvmM RawCmmDecl-fixBottom cp@(CmmProc hdr entry_lbl live g) =-    maybe (pure cp) fix_block $ mapLookup (g_entry g) blk_map-  where-    blk_map = toBlockMap g--    fix_block :: CmmBlock -> LlvmM RawCmmDecl-    fix_block blk-        | (CmmEntry e_lbl tickscp, middle, CmmBranch b_lbl) <- blockSplit blk-        , isEmptyBlock middle-        , e_lbl == b_lbl = do-            new_lbl <- mkBlockId <$> getUniqueM--            let fst_blk =-                    BlockCC (CmmEntry e_lbl tickscp) BNil (CmmBranch new_lbl)-                snd_blk =-                    BlockCC (CmmEntry new_lbl tickscp) BNil (CmmBranch new_lbl)--            pure . CmmProc hdr entry_lbl live . ofBlockMap (g_entry g)-                $ mapFromList [(e_lbl, fst_blk), (new_lbl, snd_blk)]--    fix_block _ = pure cp--fixBottom rcd = pure rcd- -- | Complete LLVM code generation phase for a single top-level chunk of Cmm. cmmLlvmGen ::RawCmmDecl -> LlvmM () cmmLlvmGen cmm@CmmProc{} = do      -- rewrite assignments to global regs     dflags <- getDynFlag id-    fixed_cmm <- fixBottom $-                    {-# SCC "llvm_fix_regs" #-}-                    fixStgRegisters dflags cmm+    let fixed_cmm = {-# SCC "llvm_fix_regs" #-} fixStgRegisters dflags cmm      dumpIfSetLlvm Opt_D_dump_opt_cmm "Optimised Cmm" (pprCmmGroup [fixed_cmm]) 
llvmGen/LlvmCodeGen/Base.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-}  -- ---------------------------------------------------------------------------- -- | Base LLVM Code Generation module@@ -32,7 +33,7 @@         strCLabel_llvm, strDisplayName_llvm, strProcedureName_llvm,         getGlobalPtr, generateExternDecls, -        aliasify,+        aliasify, llvmDefLabel     ) where  #include "HsVersions.h"@@ -44,12 +45,12 @@ import LlvmCodeGen.Regs  import CLabel-import CodeGen.Platform ( activeStgRegs )+import GHC.Platform.Regs ( activeStgRegs ) import DynFlags import FastString import Cmm              hiding ( succ ) import Outputable as Outp-import Platform+import GHC.Platform import UniqFM import Unique import BufWrite   ( BufHandle )@@ -58,6 +59,7 @@ import ErrUtils import qualified Stream +import Data.Maybe (fromJust) import Control.Monad (ap) import Data.Char (isDigit) import Data.List (intercalate)@@ -101,7 +103,6 @@ widthToLlvmFloat :: Width -> LlvmType widthToLlvmFloat W32  = LMFloat widthToLlvmFloat W64  = LMDouble-widthToLlvmFloat W80  = LMFloat80 widthToLlvmFloat W128 = LMFloat128 widthToLlvmFloat w    = panic $ "widthToLlvmFloat: Bad float size: " ++ show w @@ -217,7 +218,7 @@   { envVersion :: LlvmVersion      -- ^ LLVM version   , envDynFlags :: DynFlags        -- ^ Dynamic flags   , envOutput :: BufHandle         -- ^ Output buffer-  , envUniq :: UniqSupply          -- ^ Supply of unique values+  , envMask :: !Char               -- ^ Mask for creating unique values   , envFreshMeta :: MetaId         -- ^ Supply of fresh metadata IDs   , envUniqMeta :: UniqFM MetaId   -- ^ Global metadata nodes   , envFunMap :: LlvmEnvMap        -- ^ Global functions so far, with type@@ -233,10 +234,7 @@  -- | The Llvm monad. Wraps @LlvmEnv@ state as well as the @IO@ monad newtype LlvmM a = LlvmM { runLlvmM :: LlvmEnv -> IO (a, LlvmEnv) }--instance Functor LlvmM where-    fmap f m = LlvmM $ \env -> do (x, env') <- runLlvmM m env-                                  return (f x, env')+    deriving (Functor)  instance Applicative LlvmM where     pure x = LlvmM $ \env -> return (x, env)@@ -251,16 +249,12 @@  instance MonadUnique LlvmM where     getUniqueSupplyM = do-        us <- getEnv envUniq-        let (us1, us2) = splitUniqSupply us-        modifyEnv (\s -> s { envUniq = us2 })-        return us1+        mask <- getEnv envMask+        liftIO $! mkSplitUniqSupply mask      getUniqueM = do-        us <- getEnv envUniq-        let (u,us') = takeUniqFromSupply us-        modifyEnv (\s -> s { envUniq = us' })-        return u+        mask <- getEnv envMask+        liftIO $! uniqFromMask mask  -- | Lifting of IO actions. Not exported, as we want to encapsulate IO. liftIO :: IO a -> LlvmM a@@ -268,10 +262,10 @@                               return (x, env)  -- | Get initial Llvm environment.-runLlvm :: DynFlags -> LlvmVersion -> BufHandle -> UniqSupply -> LlvmM () -> IO ()-runLlvm dflags ver out us m = do-    _ <- runLlvmM m env-    return ()+runLlvm :: DynFlags -> LlvmVersion -> BufHandle -> LlvmM a -> IO a+runLlvm dflags ver out m = do+    (a, _) <- runLlvmM m env+    return a   where env = LlvmEnv { envFunMap = emptyUFM                       , envVarMap = emptyUFM                       , envStackRegs = []@@ -280,7 +274,7 @@                       , envVersion = ver                       , envDynFlags = dflags                       , envOutput = out-                      , envUniq = us+                      , envMask = 'n'                       , envFreshMeta = MetaId 0                       , envUniqMeta = emptyUFM                       }@@ -401,7 +395,7 @@     mk "newSpark" (llvmWord dflags) [i8Ptr, i8Ptr]   where     mk n ret args = do-      let n' = fsLit n `appendFS` fsLit "$def"+      let n' = llvmDefLabel $ fsLit n           decl = LlvmFunctionDecl n' ExternallyVisible CC_Ccc ret                                  FixedArgs (tysToParams args) Nothing       renderLlvm $ ppLlvmFunctionDecl decl@@ -414,17 +408,15 @@ -- | Pretty print a 'CLabel'. strCLabel_llvm :: CLabel -> LlvmM LMString strCLabel_llvm lbl = do-    platform <- getLlvmPlatform     dflags <- getDynFlags-    let sdoc = pprCLabel platform lbl+    let sdoc = pprCLabel dflags lbl         str = Outp.renderWithStyle dflags sdoc (Outp.mkCodeStyle Outp.CStyle)     return (fsLit str)  strDisplayName_llvm :: CLabel -> LlvmM LMString strDisplayName_llvm lbl = do-    platform <- getLlvmPlatform     dflags <- getDynFlags-    let sdoc = pprCLabel platform lbl+    let sdoc = pprCLabel dflags lbl         depth = Outp.PartWay 1         style = Outp.mkUserStyle dflags Outp.reallyAlwaysQualify depth         str = Outp.renderWithStyle dflags sdoc style@@ -440,9 +432,8 @@  strProcedureName_llvm :: CLabel -> LlvmM LMString strProcedureName_llvm lbl = do-    platform <- getLlvmPlatform     dflags <- getDynFlags-    let sdoc = pprCLabel platform lbl+    let sdoc = pprCLabel dflags lbl         depth = Outp.PartWay 1         style = Outp.mkUserStyle dflags Outp.neverQualify depth         str = Outp.renderWithStyle dflags sdoc style@@ -461,12 +452,17 @@   let mkGlbVar lbl ty = LMGlobalVar lbl (LMPointer ty) Private Nothing Nothing   case m_ty of     -- Directly reference if we have seen it already-    Just ty -> return $ mkGlbVar (llvmLbl `appendFS` fsLit "$def") ty Global+    Just ty -> return $ mkGlbVar (llvmDefLabel llvmLbl) ty Global     -- Otherwise use a forward alias of it     Nothing -> do       saveAlias llvmLbl       return $ mkGlbVar llvmLbl i8 Alias +-- | Derive the definition label. It has an identified+-- structure type.+llvmDefLabel :: LMString -> LMString+llvmDefLabel = (`appendFS` fsLit "$def")+ -- | Generate definitions for aliases forward-referenced by @getGlobalPtr@. -- -- Must be called at a point where we are sure that no new global definitions@@ -497,10 +493,28 @@ -- | Here we take a global variable definition, rename it with a -- @$def@ suffix, and generate the appropriate alias. aliasify :: LMGlobal -> LlvmM [LMGlobal]+-- See note [emit-time elimination of static indirections] in CLabel.+-- Here we obtain the indirectee's precise type and introduce+-- fresh aliases to both the precise typed label (lbl$def) and the i8*+-- typed (regular) label of it with the matching new names.+aliasify (LMGlobal (LMGlobalVar lbl ty@LMAlias{} link sect align Alias)+                   (Just orig)) = do+    let defLbl = llvmDefLabel lbl+        LMStaticPointer (LMGlobalVar origLbl _ oLnk Nothing Nothing Alias) = orig+        defOrigLbl = llvmDefLabel origLbl+        orig' = LMStaticPointer (LMGlobalVar origLbl i8Ptr oLnk Nothing Nothing Alias)+    origType <- funLookup origLbl+    let defOrig = LMBitc (LMStaticPointer (LMGlobalVar defOrigLbl+                                           (pLift $ fromJust origType) oLnk+                                           Nothing Nothing Alias))+                         (pLift ty)+    pure [ LMGlobal (LMGlobalVar defLbl ty link sect align Alias) (Just defOrig)+         , LMGlobal (LMGlobalVar lbl i8Ptr link sect align Alias) (Just orig')+         ] aliasify (LMGlobal var val) = do     let LMGlobalVar lbl ty link sect align const = var -        defLbl = lbl `appendFS` fsLit "$def"+        defLbl = llvmDefLabel lbl         defVar = LMGlobalVar defLbl ty Internal sect align const          defPtrVar = LMGlobalVar defLbl (LMPointer ty) link Nothing Nothing const
llvmGen/LlvmCodeGen/CodeGen.hs view
@@ -14,7 +14,7 @@ import LlvmCodeGen.Regs  import BlockId-import CodeGen.Platform ( activeStgRegs, callerSaves )+import GHC.Platform.Regs ( activeStgRegs, callerSaves ) import CLabel import Cmm import PprCmm@@ -29,7 +29,7 @@ import ForeignCall import Outputable hiding (panic, pprPanic) import qualified Outputable-import Platform+import GHC.Platform import OrdList import UniqSupply import Unique@@ -66,20 +66,24 @@  -- | Generate code for a list of blocks that make up a complete -- procedure. The first block in the list is expected to be the entry--- point and will get the prologue.+-- point. basicBlocksCodeGen :: LiveGlobalRegs -> [CmmBlock]                       -> LlvmM ([LlvmBasicBlock], [LlvmCmmDecl]) basicBlocksCodeGen _    []                     = panic "no entry block!"-basicBlocksCodeGen live (entryBlock:cmmBlocks)-  = do (prologue, prologueTops) <- funPrologue live (entryBlock:cmmBlocks)+basicBlocksCodeGen live cmmBlocks+  = do -- Emit the prologue+       -- N.B. this must be its own block to ensure that the entry block of the+       -- procedure has no predecessors, as required by the LLVM IR. See #17589+       -- and #11649.+       bid <- newBlockId+       (prologue, prologueTops) <- funPrologue live cmmBlocks+       let entryBlock = BasicBlock bid (fromOL prologue)         -- Generate code-       (BasicBlock bid entry, entryTops) <- basicBlockCodeGen entryBlock        (blocks, topss) <- fmap unzip $ mapM basicBlockCodeGen cmmBlocks         -- Compose-       let entryBlock = BasicBlock bid (fromOL prologue ++ entry)-       return (entryBlock : blocks, prologueTops ++ entryTops ++ concat topss)+       return (entryBlock : blocks, prologueTops ++ concat topss)   -- | Generate code for one block@@ -238,6 +242,8 @@     genCallSimpleCast w t dsts args genCall t@(PrimTarget (MO_BSwap w)) dsts args =     genCallSimpleCast w t dsts args+genCall t@(PrimTarget (MO_BRev w)) dsts args =+    genCallSimpleCast w t dsts args  genCall (PrimTarget (MO_AtomicRMW width amop)) [dst] [addr, n] = runStmtsDecls $ do     addrVar <- exprToVarW addr@@ -751,7 +757,9 @@    return $ case mop of     MO_F32_Exp    -> fsLit "expf"+    MO_F32_ExpM1  -> fsLit "expm1f"     MO_F32_Log    -> fsLit "logf"+    MO_F32_Log1P  -> fsLit "log1pf"     MO_F32_Sqrt   -> fsLit "llvm.sqrt.f32"     MO_F32_Fabs   -> fsLit "llvm.fabs.f32"     MO_F32_Pwr    -> fsLit "llvm.pow.f32"@@ -773,7 +781,9 @@     MO_F32_Atanh  -> fsLit "atanhf"      MO_F64_Exp    -> fsLit "exp"+    MO_F64_ExpM1  -> fsLit "expm1"     MO_F64_Log    -> fsLit "log"+    MO_F64_Log1P  -> fsLit "log1p"     MO_F64_Sqrt   -> fsLit "llvm.sqrt.f64"     MO_F64_Fabs   -> fsLit "llvm.fabs.f64"     MO_F64_Pwr    -> fsLit "llvm.pow.f64"@@ -799,10 +809,11 @@     MO_Memset _   -> fsLit $ "llvm.memset."  ++ intrinTy2     MO_Memcmp _   -> fsLit $ "memcmp" -    (MO_PopCnt w) -> fsLit $ "llvm.ctpop."  ++ showSDoc dflags (ppr $ widthToLlvmInt w)-    (MO_BSwap w)  -> fsLit $ "llvm.bswap."  ++ showSDoc dflags (ppr $ widthToLlvmInt w)-    (MO_Clz w)    -> fsLit $ "llvm.ctlz."   ++ showSDoc dflags (ppr $ widthToLlvmInt w)-    (MO_Ctz w)    -> fsLit $ "llvm.cttz."   ++ showSDoc dflags (ppr $ widthToLlvmInt w)+    (MO_PopCnt w) -> fsLit $ "llvm.ctpop."      ++ showSDoc dflags (ppr $ widthToLlvmInt w)+    (MO_BSwap w)  -> fsLit $ "llvm.bswap."      ++ showSDoc dflags (ppr $ widthToLlvmInt w)+    (MO_BRev w)   -> fsLit $ "llvm.bitreverse." ++ showSDoc dflags (ppr $ widthToLlvmInt w)+    (MO_Clz w)    -> fsLit $ "llvm.ctlz."       ++ showSDoc dflags (ppr $ widthToLlvmInt w)+    (MO_Ctz w)    -> fsLit $ "llvm.cttz."       ++ showSDoc dflags (ppr $ widthToLlvmInt w)      (MO_Pdep w)   ->  let w' = showSDoc dflags (ppr $ widthInBits w)                       in  if isBmi2Enabled dflags@@ -1826,7 +1837,10 @@         markStackReg r         return $ toOL [alloc, Store rval reg] -  return (concatOL stmtss, [])+  return (concatOL stmtss `snocOL` jumpToEntry, [])+  where+    entryBlk : _ = cmmBlocks+    jumpToEntry = Branch $ blockIdToLlvm (entryLabel entryBlk)  -- | Function epilogue. Load STG variables to use as argument for call. -- STG Liveness optimisation done here.
llvmGen/LlvmCodeGen/Data.hs view
@@ -18,10 +18,11 @@ import CLabel import Cmm import DynFlags-import Platform+import GHC.Platform  import FastString import Outputable+import qualified Data.ByteString as BS  -- ---------------------------------------------------------------------------- -- * Constants@@ -31,26 +32,56 @@ structStr :: LMString structStr = fsLit "_struct" +-- | The LLVM visibility of the label+linkage :: CLabel -> LlvmLinkageType+linkage lbl = if externallyVisibleCLabel lbl+              then ExternallyVisible else Internal+ -- ---------------------------------------------------------------------------- -- * Top level --  -- | Pass a CmmStatic section to an equivalent Llvm code. genLlvmData :: (Section, CmmStatics) -> LlvmM LlvmData+-- See note [emit-time elimination of static indirections] in CLabel.+genLlvmData (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])+  | lbl == mkIndStaticInfoLabel+  , let labelInd (CmmLabelOff l _) = Just l+        labelInd (CmmLabel l) = Just l+        labelInd _ = Nothing+  , Just ind' <- labelInd ind+  , alias `mayRedirectTo` ind' = do+    label <- strCLabel_llvm alias+    label' <- strCLabel_llvm ind'+    let link     = linkage alias+        link'    = linkage ind'+        -- the LLVM type we give the alias is an empty struct type+        -- but it doesn't really matter, as the pointer is only+        -- used for (bit/int)casting.+        tyAlias  = LMAlias (label `appendFS` structStr, LMStructU [])++        aliasDef = LMGlobalVar label tyAlias link Nothing Nothing Alias+        -- we don't know the type of the indirectee here+        indType  = panic "will be filled by 'aliasify', later"+        orig     = LMStaticPointer $ LMGlobalVar label' indType link' Nothing Nothing Alias++    pure ([LMGlobal aliasDef $ Just orig], [tyAlias])+ genLlvmData (sec, Statics lbl xs) = do     label <- strCLabel_llvm lbl     static <- mapM genData xs     lmsec <- llvmSection sec+    platform <- getLlvmPlatform     let types   = map getStatType static          strucTy = LMStruct types-        tyAlias = LMAlias ((label `appendFS` structStr), strucTy)+        tyAlias = LMAlias (label `appendFS` structStr, strucTy)          struct         = Just $ LMStaticStruc static tyAlias-        link           = if (externallyVisibleCLabel lbl)-                            then ExternallyVisible else Internal+        link           = linkage lbl         align          = case sec of-                            Section CString _ -> Just 1+                            Section CString _ -> if (platformArch platform == ArchS390X)+                                                    then Just 2 else Just 1                             _                 -> Nothing         const          = if isSecConstant sec then Constant else Global         varDef         = LMGlobalVar label tyAlias link lmsec align const@@ -102,7 +133,8 @@ genData :: CmmStatic -> LlvmM LlvmStatic  genData (CmmString str) = do-    let v  = map (\x -> LMStaticLit $ LMIntLit (fromIntegral x) i8) str+    let v  = map (\x -> LMStaticLit $ LMIntLit (fromIntegral x) i8)+                 (BS.unpack str)         ve = v ++ [LMStaticLit $ LMIntLit 0 i8]     return $ LMStaticArray ve (LMArray (length ve) i8) 
llvmGen/LlvmCodeGen/Ppr.hs view
@@ -71,7 +71,7 @@        let fun = LlvmFunction funDec funArgs llvmStdFunAttrs funSect                               prefix lmblocks            name = decName $ funcDecl fun-           defName = name `appendFS` fsLit "$def"+           defName = llvmDefLabel name            funcDecl' = (funcDecl fun) { decName = defName }            fun' = fun { funcDecl = funcDecl' }            funTy = LMFunction funcDecl'
llvmGen/LlvmMangler.hs view
@@ -14,7 +14,7 @@ import GhcPrelude  import DynFlags ( DynFlags, targetPlatform )-import Platform ( platformArch, Arch(..) )+import GHC.Platform ( platformArch, Arch(..) ) import ErrUtils ( withTiming ) import Outputable ( text ) @@ -25,7 +25,7 @@ -- | Read in assembly file and process llvmFixupAsm :: DynFlags -> FilePath -> FilePath -> IO () llvmFixupAsm dflags f1 f2 = {-# SCC "llvm_mangler" #-}-    withTiming (pure dflags) (text "LLVM Mangler") id $+    withTiming dflags (text "LLVM Mangler") id $     withBinaryFile f1 ReadMode $ \r -> withBinaryFile f2 WriteMode $ \w -> do         go r w         hClose r
main/Annotations.hs view
@@ -4,6 +4,7 @@ -- (c) The University of Glasgow 2006 -- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 --+{-# LANGUAGE DeriveFunctor #-} module Annotations (         -- * Main Annotation data types         Annotation(..), AnnPayload,@@ -49,13 +50,10 @@   = NamedTarget name          -- ^ We are annotating something with a name:                               --      a type or identifier   | ModuleTarget Module       -- ^ We are annotating a particular module+  deriving (Functor)  -- | The kind of annotation target found in the middle end of the compiler type CoreAnnTarget = AnnTarget Name--instance Functor AnnTarget where-    fmap f (NamedTarget nm) = NamedTarget (f nm)-    fmap _ (ModuleTarget mod) = ModuleTarget mod  -- | Get the 'name' of an annotation target if it exists. getAnnTargetName_maybe :: AnnTarget name -> Maybe name
main/Ar.hs view
@@ -106,7 +106,7 @@                         return $ C.unpack $ C.takeWhile (/= ' ') name         off2    <- liftM fromIntegral bytesRead :: Get Int         file    <- getByteString (st_size - (off2 - off1))-        -- data sections are two byte aligned (see Trac #15396)+        -- data sections are two byte aligned (see #15396)         when (odd st_size) $           void (getByteString 1) @@ -135,7 +135,7 @@         fail ("[BSD Archive] Invalid archive header end marker for name: " ++               C.unpack name)       file <- getByteString st_size-      -- data sections are two byte aligned (see Trac #15396)+      -- data sections are two byte aligned (see #15396)       when (odd st_size) $         void (getByteString 1)       name <- return . C.unpack $
+ main/CliOption.hs view
@@ -0,0 +1,27 @@+module CliOption+  ( Option (..)+  , showOpt+  ) where++import GhcPrelude++-- -----------------------------------------------------------------------------+-- Command-line options++-- | When invoking external tools as part of the compilation pipeline, we+-- pass these a sequence of options on the command-line. Rather than+-- just using a list of Strings, we use a type that allows us to distinguish+-- between filepaths and 'other stuff'. The reason for this is that+-- this type gives us a handle on transforming filenames, and filenames only,+-- to whatever format they're expected to be on a particular platform.+data Option+ = FileOption -- an entry that _contains_ filename(s) / filepaths.+              String  -- a non-filepath prefix that shouldn't be+                      -- transformed (e.g., "/out=")+              String  -- the filepath/filename portion+ | Option     String+ deriving ( Eq )++showOpt :: Option -> String+showOpt (FileOption pre f) = pre ++ f+showOpt (Option s)  = s
main/CmdLineParser.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-}  ------------------------------------------------------------------------------- --@@ -166,9 +167,7 @@  -- (CmdLineP s) typically instantiates the 'm' in (EwM m) and (OptKind m) newtype CmdLineP s a = CmdLineP { runCmdLine :: s -> (a, s) }--instance Functor (CmdLineP s) where-    fmap = liftM+    deriving (Functor)  instance Applicative (CmdLineP s) where     pure a = CmdLineP $ \s -> (a, s)@@ -235,12 +234,12 @@                                     []               -> missingArgErr dash_arg                                     (L _ arg1:args1) -> Right (f arg1, args1) -        -- See Trac #9776+        -- See #9776         SepArg f -> case args of                         []               -> missingArgErr dash_arg                         (L _ arg1:args1) -> Right (f arg1, args1) -        -- See Trac #12625+        -- See #12625         Prefix f | notNull rest_no_eq -> Right (f rest_no_eq, args)                  | otherwise          -> missingArgErr  dash_arg @@ -277,7 +276,7 @@ arg_ok (HasArg          _)  _    _   = True arg_ok (SepArg          _)  rest _   = null rest arg_ok (Prefix          _)  _    _   = True -- Missing argument checked for in processOneArg t-                                            -- to improve error message (Trac #12625)+                                            -- to improve error message (#12625) arg_ok (OptIntSuffix    _)  _    _   = True arg_ok (IntSuffix       _)  _    _   = True arg_ok (FloatSuffix     _)  _    _   = True
main/CodeOutput.hs view
@@ -12,20 +12,19 @@  import GhcPrelude -import AsmCodeGen ( nativeCodeGen )-import LlvmCodeGen ( llvmCodeGen )+import AsmCodeGen       ( nativeCodeGen )+import LlvmCodeGen      ( llvmCodeGen )  import UniqSupply       ( mkSplitUniqSupply )  import Finder           ( mkStubPaths )-import PprC             ( writeCs )+import PprC             ( writeC ) import CmmLint          ( cmmLint ) import Packages import Cmm              ( RawCmmGroup ) import HscTypes import DynFlags-import Config-import Stream           (Stream)+import Stream           ( Stream ) import qualified Stream import FileCleanup @@ -55,10 +54,11 @@            -> [(ForeignSrcLang, FilePath)]            -- ^ additional files to be compiled with with the C compiler            -> [InstalledUnitId]-           -> Stream IO RawCmmGroup ()                       -- Compiled C--+           -> Stream IO RawCmmGroup a                       -- Compiled C--            -> IO (FilePath,                   (Bool{-stub_h_exists-}, Maybe FilePath{-stub_c_exists-}),-                  [(ForeignSrcLang, FilePath)]{-foreign_fps-})+                  [(ForeignSrcLang, FilePath)]{-foreign_fps-},+                  a)  codeOutput dflags this_mod filenm location foreign_stubs foreign_fps pkg_deps   cmm_stream@@ -70,9 +70,10 @@                     then Stream.mapM do_lint cmm_stream                     else cmm_stream -              do_lint cmm = withTiming (pure dflags)-                                       (text "CmmLint"<+>brackets (ppr this_mod))-                                       (const ()) $ do+              do_lint cmm = withTimingSilent+                  dflags+                  (text "CmmLint"<+>brackets (ppr this_mod))+                  (const ()) $ do                 { case cmmLint dflags cmm of                         Just err -> do { log_action dflags                                                    dflags@@ -88,15 +89,14 @@                 }          ; stubs_exist <- outputForeignStubs dflags this_mod location foreign_stubs-        ; case hscTarget dflags of {-             HscAsm         -> outputAsm dflags this_mod location filenm-                                         linted_cmm_stream;-             HscC           -> outputC dflags filenm linted_cmm_stream pkg_deps;-             HscLlvm        -> outputLlvm dflags filenm linted_cmm_stream;-             HscInterpreted -> panic "codeOutput: HscInterpreted";-             HscNothing     -> panic "codeOutput: HscNothing"-          }-        ; return (filenm, stubs_exist, foreign_fps)+        ; a <- case hscTarget dflags of+                 HscAsm         -> outputAsm dflags this_mod location filenm+                                             linted_cmm_stream+                 HscC           -> outputC dflags filenm linted_cmm_stream pkg_deps+                 HscLlvm        -> outputLlvm dflags filenm linted_cmm_stream+                 HscInterpreted -> panic "codeOutput: HscInterpreted"+                 HscNothing     -> panic "codeOutput: HscNothing"+        ; return (filenm, stubs_exist, foreign_fps, a)         }  doOutput :: String -> (Handle -> IO a) -> IO a@@ -112,37 +112,35 @@  outputC :: DynFlags         -> FilePath-        -> Stream IO RawCmmGroup ()+        -> Stream IO RawCmmGroup a         -> [InstalledUnitId]-        -> IO ()+        -> IO a  outputC dflags filenm cmm_stream packages   = do-       -- ToDo: make the C backend consume the C-- incrementally, by-       -- pushing the cmm_stream inside (c.f. nativeCodeGen)-       rawcmms <- Stream.collect cmm_stream+       withTiming dflags (text "C codegen") (\a -> seq a () {- FIXME -}) $ do -       -- figure out which header files to #include in the generated .hc file:-       ---       --   * extra_includes from packages-       --   * -#include options from the cmdline and OPTIONS pragmas-       --   * the _stub.h file, if there is one.-       ---       let rts = getPackageDetails dflags rtsUnitId+         -- figure out which header files to #include in the generated .hc file:+         --+         --   * extra_includes from packages+         --   * -#include options from the cmdline and OPTIONS pragmas+         --   * the _stub.h file, if there is one.+         --+         let rts = getPackageDetails dflags rtsUnitId -       let cc_injects = unlines (map mk_include (includes rts))-           mk_include h_file =-            case h_file of-               '"':_{-"-} -> "#include "++h_file-               '<':_      -> "#include "++h_file-               _          -> "#include \""++h_file++"\""+         let cc_injects = unlines (map mk_include (includes rts))+             mk_include h_file =+              case h_file of+                 '"':_{-"-} -> "#include "++h_file+                 '<':_      -> "#include "++h_file+                 _          -> "#include \""++h_file++"\"" -       let pkg_names = map installedUnitIdString packages+         let pkg_names = map installedUnitIdString packages -       doOutput filenm $ \ h -> do-          hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n")-          hPutStr h cc_injects-          writeCs dflags h rawcmms+         doOutput filenm $ \ h -> do+            hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n")+            hPutStr h cc_injects+            Stream.consume cmm_stream (writeC dflags h)  {- ************************************************************************@@ -153,18 +151,17 @@ -}  outputAsm :: DynFlags -> Module -> ModLocation -> FilePath-          -> Stream IO RawCmmGroup ()-          -> IO ()+          -> Stream IO RawCmmGroup a+          -> IO a outputAsm dflags this_mod location filenm cmm_stream- | cGhcWithNativeCodeGen == "YES"+ | platformMisc_ghcWithNativeCodeGen $ platformMisc dflags   = do ncg_uniqs <- mkSplitUniqSupply 'n'         debugTraceMsg dflags 4 (text "Outputing asm to" <+> text filenm) -       _ <- {-# SCC "OutputAsm" #-} doOutput filenm $+       {-# SCC "OutputAsm" #-} doOutput filenm $            \h -> {-# SCC "NativeCodeGen" #-}                  nativeCodeGen dflags this_mod location h ncg_uniqs cmm_stream-       return ()   | otherwise   = panic "This compiler was built without a native code generator"@@ -177,13 +174,11 @@ ************************************************************************ -} -outputLlvm :: DynFlags -> FilePath -> Stream IO RawCmmGroup () -> IO ()+outputLlvm :: DynFlags -> FilePath -> Stream IO RawCmmGroup a -> IO a outputLlvm dflags filenm cmm_stream-  = do ncg_uniqs <- mkSplitUniqSupply 'n'--       {-# SCC "llvm_output" #-} doOutput filenm $+  = do {-# SCC "llvm_output" #-} doOutput filenm $            \f -> {-# SCC "llvm_CodeGen" #-}-                 llvmCodeGen dflags f ncg_uniqs cmm_stream+                 llvmCodeGen dflags f cmm_stream  {- ************************************************************************@@ -226,12 +221,13 @@             mk_include i = "#include \"" ++ i ++ "\"\n"              -- wrapper code mentions the ffi_arg type, which comes from ffi.h-            ffi_includes | cLibFFI   = "#include \"ffi.h\"\n"-                         | otherwise = ""+            ffi_includes+              | platformMisc_libFFI $ platformMisc dflags = "#include <ffi.h>\n"+              | otherwise = ""          stub_h_file_exists            <- outputForeignStubs_help stub_h stub_h_output_w-                ("#include \"HsFFI.h\"\n" ++ cplusplus_hdr) cplusplus_ftr+                ("#include <HsFFI.h>\n" ++ cplusplus_hdr) cplusplus_ftr          dumpIfSet_dyn dflags Opt_D_dump_foreign                       "Foreign export stubs" stub_c_output_d@@ -239,7 +235,7 @@         stub_c_file_exists            <- outputForeignStubs_help stub_c stub_c_output_w                 ("#define IN_STG_CODE 0\n" ++-                 "#include \"Rts.h\"\n" +++                 "#include <Rts.h>\n" ++                  rts_includes ++                  ffi_includes ++                  cplusplus_hdr)@@ -252,8 +248,8 @@                                        then Just stub_c                                        else Nothing )  where-   cplusplus_hdr = "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"-   cplusplus_ftr = "#ifdef __cplusplus\n}\n#endif\n"+   cplusplus_hdr = "#if defined(__cplusplus)\nextern \"C\" {\n#endif\n"+   cplusplus_ftr = "#if defined(__cplusplus)\n}\n#endif\n"   -- Don't use doOutput for dumping the f. export stubs@@ -264,4 +260,3 @@ outputForeignStubs_help fname doc_str header footer    = do writeFile fname (header ++ doc_str ++ '\n':footer ++ "\n")         return True-
main/Constants.hs view
@@ -26,7 +26,7 @@ mAX_SUM_SIZE = 62  -- | Default maximum depth for both class instance search and type family--- reduction. See also Trac #5395.+-- reduction. See also #5395. mAX_REDUCTION_DEPTH :: Int mAX_REDUCTION_DEPTH = 200 
main/DriverMkDepend.hs view
@@ -41,6 +41,7 @@ import System.IO.Error  ( isEOFError ) import Control.Monad    ( when ) import Data.Maybe       ( isJust )+import Data.IORef  ----------------------------------------------------------------- --@@ -85,7 +86,7 @@     -- Print out the dependencies if wanted     liftIO $ debugTraceMsg dflags 2 (text "Module dependencies" $$ ppr sorted) -    -- Prcess them one by one, dumping results into makefile+    -- Process them one by one, dumping results into makefile     -- and complaining about cycles     hsc_env <- getSession     root <- liftIO getCurrentDirectory@@ -223,6 +224,18 @@                 -- Emit std dependency of the object(s) on the source file                 -- Something like       A.o : A.hs         ; writeDependency root hdl obj_files src_file++                -- Emit a dependency for each CPP import+        ; when (depIncludeCppDeps dflags) $ do+            -- CPP deps are descovered in the module parsing phase by parsing+            -- comment lines left by the preprocessor.+            -- Note that GHC.parseModule may throw an exception if the module+            -- fails to parse, which may not be desirable (see #16616).+          { session <- Session <$> newIORef hsc_env+          ; parsedMod <- reflectGhc (GHC.parseModule node) session+          ; mapM_ (writeDependency root hdl obj_files)+                  (GHC.pm_extra_src_files parsedMod)+          }                  -- Emit a dependency for each import 
main/DriverPhases.hs view
@@ -44,7 +44,7 @@  import {-# SOURCE #-} DynFlags import Outputable-import Platform+import GHC.Platform import System.FilePath import Binary import Util@@ -138,8 +138,6 @@         | Cobjc         -- Compile Objective-C         | Cobjcxx       -- Compile Objective-C++         | HCc           -- Haskellised C (as opposed to vanilla C) compilation-        | Splitter      -- Assembly file splitter (part of '-split-objs')-        | SplitAs       -- Assembler for split assembly files (part of '-split-objs')         | As Bool       -- Assembler for regular assembly files (Bool: with-cpp)         | LlvmOpt       -- Run LLVM opt tool over llvm assembly         | LlvmLlc       -- LLVM bitcode to native assembly@@ -173,8 +171,6 @@ eqPhase Cc          Cc         = True eqPhase Cobjc       Cobjc      = True eqPhase HCc         HCc        = True-eqPhase Splitter    Splitter   = True-eqPhase SplitAs     SplitAs    = True eqPhase (As x)      (As y)     = x == y eqPhase LlvmOpt     LlvmOpt    = True eqPhase LlvmLlc     LlvmLlc    = True@@ -218,11 +214,9 @@       Cpp   sf   -> HsPp sf       HsPp  sf   -> Hsc  sf       Hsc   _    -> maybeHCc-      Splitter   -> SplitAs       LlvmOpt    -> LlvmLlc       LlvmLlc    -> LlvmMangle       LlvmMangle -> As False-      SplitAs    -> MergeForeign       As _       -> MergeForeign       Ccxx       -> As False       Cc         -> As False@@ -257,7 +251,6 @@ startPhase "mm"       = Cobjcxx startPhase "cc"       = Ccxx startPhase "cxx"      = Ccxx-startPhase "split_s"  = Splitter startPhase "s"        = As False startPhase "S"        = As True startPhase "ll"       = LlvmOpt@@ -286,13 +279,11 @@ phaseInputExt Cobjc               = "m" phaseInputExt Cobjcxx             = "mm" phaseInputExt Cc                  = "c"-phaseInputExt Splitter            = "split_s" phaseInputExt (As True)           = "S" phaseInputExt (As False)          = "s" phaseInputExt LlvmOpt             = "ll" phaseInputExt LlvmLlc             = "bc" phaseInputExt LlvmMangle          = "lm_s"-phaseInputExt SplitAs             = "split_s" phaseInputExt CmmCpp              = "cmmcpp" phaseInputExt Cmm                 = "cmm" phaseInputExt MergeForeign        = "o"@@ -378,4 +369,3 @@ isObjectFilename, isDynLibFilename :: Platform -> FilePath -> Bool isObjectFilename platform f = isObjectSuffix platform (drop 1 $ takeExtension f) isDynLibFilename platform f = isDynLibSuffix platform (drop 1 $ takeExtension f)-
main/DriverPipeline.hs view
@@ -1,6 +1,4 @@-{-# LANGUAGE CPP, NamedFieldPuns, NondecreasingIndentation, BangPatterns #-}-{-# OPTIONS_GHC -fno-cse #-}--- -fno-cse is needed for GLOBAL_VAR's to behave properly+{-# LANGUAGE CPP, NamedFieldPuns, NondecreasingIndentation, BangPatterns, MultiWayIf #-}  ----------------------------------------------------------------------------- --@@ -29,9 +27,11 @@    hscPostBackendPhase, getLocation, setModLocation, setDynFlags,    runPhase, exeFileName,    maybeCreateManifest,+   doCpp,    linkingNeeded, checkLinkInfo, writeInterfaceOnlyMode   ) where +#include <ghcplatform.h> #include "HsVersions.h"  import GhcPrelude@@ -49,7 +49,6 @@ import Module import ErrUtils import DynFlags-import Config import Panic import Util import StringBuffer     ( hGetStringBuffer, hPutStringBuffer )@@ -58,21 +57,23 @@ import SrcLoc import LlvmCodeGen      ( llvmFixupAsm, llvmVersionList ) import MonadUtils-import Platform+import GHC.Platform import TcRnTypes+import ToolSettings import Hooks import qualified GHC.LanguageExtensions as LangExt import FileCleanup import Ar import Bag              ( unitBag ) import FastString       ( mkFastString )+import MkIface          ( mkFullIface )  import Exception import System.Directory import System.FilePath import System.IO import Control.Monad-import Data.List        ( isInfixOf, isSuffixOf, intercalate )+import Data.List        ( isInfixOf, intercalate ) import Data.Maybe import Data.Version import Data.Either      ( partitionEithers )@@ -97,15 +98,18 @@ preprocess hsc_env input_fn mb_input_buf mb_phase =   handleSourceError (\err -> return (Left (srcErrorMessages err))) $   ghandle handler $-  fmap Right $-  ASSERT2(isJust mb_phase || isHaskellSrcFilename input_fn, text input_fn)-  runPipeline anyHsc hsc_env (input_fn, mb_input_buf, fmap RealPhase mb_phase)+  fmap Right $ do+  MASSERT2(isJust mb_phase || isHaskellSrcFilename input_fn, text input_fn)+  (dflags, fp, mb_iface) <- runPipeline anyHsc hsc_env (input_fn, mb_input_buf, fmap RealPhase mb_phase)         Nothing         -- We keep the processed file for the whole session to save on         -- duplicated work in ghci.         (Temporary TFL_GhcSession)         Nothing{-no ModLocation-}         []{-no foreign objects-}+  -- We stop before Hsc phase so we shouldn't generate an interface+  MASSERT(isNothing mb_iface)+  return (dflags, fp)   where     srcspan = srcLocSpan $ mkSrcLoc (mkFastString input_fn) 1 1     handler (ProgramError msg) = return $ Left $ unitBag $@@ -149,13 +153,14 @@             -> IO HomeModInfo   -- ^ the complete HomeModInfo, if successful  compileOne' m_tc_result mHscMessage-            hsc_env0 summary mod_index nmods mb_old_iface maybe_old_linkable+            hsc_env0 summary mod_index nmods mb_old_iface mb_old_linkable             source_modified0  = do     debugTraceMsg dflags1 2 (text "compile: input file" <+> text input_fnpp) -   (status, hmi0) <- hscIncrementalCompile+   -- Run the pipeline up to codeGen (so everything up to, but not including, STG)+   (status, hmi_details, plugin_dflags) <- hscIncrementalCompile                         always_do_basic_recompilation_check                         m_tc_result mHscMessage                         hsc_env summary source_modified mb_old_iface (mod_index, nmods)@@ -168,28 +173,32 @@                addFilesToClean flags TFL_GhcSession $                    [ml_obj_file $ ms_location summary] +   -- Use an HscEnv with DynFlags updated with the plugin info (returned from+   -- hscIncrementalCompile)+   let hsc_env' = hsc_env{ hsc_dflags = plugin_dflags }+    case (status, hsc_lang) of-        (HscUpToDate, _) ->+        (HscUpToDate iface, _) ->             -- TODO recomp014 triggers this assert. What's going on?!-            -- ASSERT( isJust maybe_old_linkable || isNoLink (ghcLink dflags) )-            return hmi0 { hm_linkable = maybe_old_linkable }-        (HscNotGeneratingCode, HscNothing) ->+            -- ASSERT( isJust mb_old_linkable || isNoLink (ghcLink dflags) )+            return $! HomeModInfo iface hmi_details mb_old_linkable+        (HscNotGeneratingCode iface, HscNothing) ->             let mb_linkable = if isHsBootOrSig src_flavour                                 then Nothing                                 -- TODO: Questionable.                                 else Just (LM (ms_hs_date summary) this_mod [])-            in return hmi0 { hm_linkable = mb_linkable }-        (HscNotGeneratingCode, _) -> panic "compileOne HscNotGeneratingCode"+            in return $! HomeModInfo iface hmi_details mb_linkable+        (HscNotGeneratingCode _, _) -> panic "compileOne HscNotGeneratingCode"         (_, HscNothing) -> panic "compileOne HscNothing"-        (HscUpdateBoot, HscInterpreted) -> do-            return hmi0-        (HscUpdateBoot, _) -> do+        (HscUpdateBoot iface, HscInterpreted) -> do+            return $! HomeModInfo iface hmi_details Nothing+        (HscUpdateBoot iface, _) -> do             touchObjectFile dflags object_filename-            return hmi0-        (HscUpdateSig, HscInterpreted) ->-            let linkable = LM (ms_hs_date summary) this_mod []-            in return hmi0 { hm_linkable = Just linkable }-        (HscUpdateSig, _) -> do+            return $! HomeModInfo iface hmi_details Nothing+        (HscUpdateSig iface, HscInterpreted) -> do+            let !linkable = LM (ms_hs_date summary) this_mod []+            return $! HomeModInfo iface hmi_details (Just linkable)+        (HscUpdateSig iface, _) -> do             output_fn <- getOutputFilename next_phase                             (Temporary TFL_CurrentModule) basename dflags                             next_phase (Just location)@@ -197,26 +206,34 @@             -- #10660: Use the pipeline instead of calling             -- compileEmptyStub directly, so -dynamic-too gets             -- handled properly-            _ <- runPipeline StopLn hsc_env+            _ <- runPipeline StopLn hsc_env'                               (output_fn,                                Nothing,                                Just (HscOut src_flavour-                                            mod_name HscUpdateSig))+                                            mod_name (HscUpdateSig iface)))                               (Just basename)                               Persistent                               (Just location)                               []             o_time <- getModificationUTCTime object_filename-            let linkable = LM o_time this_mod [DotO object_filename]-            return hmi0 { hm_linkable = Just linkable }-        (HscRecomp cgguts summary, HscInterpreted) -> do-            (hasStub, comp_bc, spt_entries) <--                hscInteractive hsc_env cgguts summary+            let !linkable = LM o_time this_mod [DotO object_filename]+            return $! HomeModInfo iface hmi_details (Just linkable)+        (HscRecomp { hscs_guts = cgguts,+                     hscs_mod_location = mod_location,+                     hscs_partial_iface = partial_iface,+                     hscs_old_iface_hash = mb_old_iface_hash,+                     hscs_iface_dflags = iface_dflags }, HscInterpreted) -> do+            -- In interpreted mode the regular codeGen backend is not run so we+            -- generate a interface without codeGen info.+            final_iface <- mkFullIface hsc_env'{hsc_dflags=iface_dflags} partial_iface+            liftIO $ hscMaybeWriteIface dflags final_iface mb_old_iface_hash mod_location +            (hasStub, comp_bc, spt_entries) <- hscInteractive hsc_env' cgguts mod_location+             stub_o <- case hasStub of                       Nothing -> return []                       Just stub_c -> do-                          stub_o <- compileStub hsc_env stub_c+                          stub_o <- compileStub hsc_env' stub_c                           return [DotO stub_o]              let hs_unlinked = [BCOs comp_bc spt_entries]@@ -227,29 +244,28 @@               -- with the filesystem's clock.  It's just as accurate:               -- if the source is modified, then the linkable will               -- be out of date.-            let linkable = LM unlinked_time (ms_mod summary)+            let !linkable = LM unlinked_time (ms_mod summary)                            (hs_unlinked ++ stub_o)-            return hmi0 { hm_linkable = Just linkable }-        (HscRecomp cgguts summary, _) -> do+            return $! HomeModInfo final_iface hmi_details (Just linkable)+        (HscRecomp{}, _) -> do             output_fn <- getOutputFilename next_phase                             (Temporary TFL_CurrentModule)                             basename dflags next_phase (Just location)             -- We're in --make mode: finish the compilation pipeline.-            _ <- runPipeline StopLn hsc_env+            (_, _, Just iface) <- runPipeline StopLn hsc_env'                               (output_fn,                                Nothing,-                               Just (HscOut src_flavour mod_name (HscRecomp cgguts summary)))+                               Just (HscOut src_flavour mod_name status))                               (Just basename)                               Persistent                               (Just location)                               []                   -- The object filename comes from the ModLocation             o_time <- getModificationUTCTime object_filename-            let linkable = LM o_time this_mod [DotO object_filename]-            return hmi0 { hm_linkable = Just linkable }+            let !linkable = LM o_time this_mod [DotO object_filename]+            return $! HomeModInfo iface hmi_details (Just linkable)   where dflags0     = ms_hspp_opts summary-        this_mod    = ms_mod summary        location    = ms_location summary        input_fn    = expectJust "compile:hs" (ml_hs_file location)@@ -262,7 +278,7 @@         src_flavour = ms_hsc_src summary        mod_name = ms_mod_name summary-       next_phase = hscPostBackendPhase dflags src_flavour hsc_lang+       next_phase = hscPostBackendPhase src_flavour hsc_lang        object_filename = ml_obj_file location         -- #8180 - when using TemplateHaskell, switch on -dynamic-too so@@ -334,7 +350,7 @@               LangObjcxx -> Cobjcxx               LangAsm    -> As True -- allow CPP               RawObject  -> panic "compileForeign: should be unreachable"-        (_, stub_o) <- runPipeline StopLn hsc_env+        (_, stub_o, _) <- runPipeline StopLn hsc_env                        (stub_c, Nothing, Just (RealPhase phase))                        Nothing (Temporary TFL_GhcSession)                        Nothing{-no ModLocation-}@@ -351,7 +367,7 @@   -- valid) stub object file for signatures.  However,   -- we make sure this object file has a unique symbol,   -- so that ranlib on OS X doesn't complain, see-  -- http://ghc.haskell.org/trac/ghc/ticket/12673+  -- https://gitlab.haskell.org/ghc/ghc/issues/12673   -- and https://github.com/haskell/cabal/issues/2257   empty_stub <- newTempName dflags TFL_CurrentModule "c"   let src = text "int" <+> ppr (mkModule (thisPackage dflags) mod_name) <+> text "= 0;"@@ -384,7 +400,7 @@   = lookupHook linkHook l dflags ghcLink dflags   where     l LinkInMemory _ _ _-      = if cGhcWithInterpreter == "YES"+      = if platformMisc_ghcWithInterpreter $ platformMisc dflags         then -- Not Linking...(demand linker will do the job)              return Succeeded         else panicBadLink LinkInMemory@@ -527,7 +543,6 @@     let         dflags    = hsc_dflags hsc_env-        split     = gopt Opt_SplitObjs dflags         mb_o_file = outputFile dflags         ghc_link  = ghcLink dflags      -- Set by -c or -no-link @@ -544,10 +559,7 @@                 -- -o foo applies to the file we are compiling now          | otherwise = Persistent -        stop_phase' = case stop_phase of-                        As _ | split -> SplitAs-                        _            -> stop_phase-   ( _, out_file) <- runPipeline stop_phase' hsc_env+   ( _, out_file, _) <- runPipeline stop_phase hsc_env                             (src, Nothing, fmap RealPhase mb_phase)                             Nothing                             output@@ -590,7 +602,8 @@   -> PipelineOutput             -- ^ Output filename   -> Maybe ModLocation          -- ^ A ModLocation, if this is a Haskell module   -> [FilePath]                 -- ^ foreign objects-  -> IO (DynFlags, FilePath)    -- ^ (final flags, output filename)+  -> IO (DynFlags, FilePath, Maybe ModIface)+                                -- ^ (final flags, output filename, interface) runPipeline stop_phase hsc_env0 (input_fn, mb_input_buf, mb_phase)              mb_basename output maybe_loc foreign_os @@ -684,20 +697,21 @@   -> FilePath                   -- ^ Input filename   -> Maybe ModLocation          -- ^ A ModLocation, if this is a Haskell module   -> [FilePath]                 -- ^ foreign objects, if we have one-  -> IO (DynFlags, FilePath)    -- ^ (final flags, output filename)+  -> IO (DynFlags, FilePath, Maybe ModIface)+                                -- ^ (final flags, output filename, interface) runPipeline' start_phase hsc_env env input_fn              maybe_loc foreign_os   = do   -- Execute the pipeline...-  let state = PipeState{ hsc_env, maybe_loc, foreign_os = foreign_os }--  evalP (pipeLoop start_phase input_fn) env state+  let state = PipeState{ hsc_env, maybe_loc, foreign_os = foreign_os, iface = Nothing }+  (pipe_state, fp) <- evalP (pipeLoop start_phase input_fn) env state+  return (pipeStateDynFlags pipe_state, fp, pipeStateModIface pipe_state)  -- --------------------------------------------------------------------------- -- outer pipeline loop  -- | pipeLoop runs phases until we reach the stop phase-pipeLoop :: PhasePlus -> FilePath -> CompPipeline (DynFlags, FilePath)+pipeLoop :: PhasePlus -> FilePath -> CompPipeline FilePath pipeLoop phase input_fn = do   env <- getPipeEnv   dflags <- getDynFlags@@ -713,7 +727,7 @@         -- further compilation stages can tell what the original filename was.         case output_spec env of         Temporary _ ->-            return (dflags, input_fn)+            return input_fn         output ->             do pst <- getPipeState                final_fn <- liftIO $ getOutputFilename@@ -723,7 +737,7 @@                   let msg = ("Copying `" ++ input_fn ++"' to `" ++ final_fn ++ "'")                       line_prag = Just ("{-# LINE 1 \"" ++ src_filename env ++ "\" #-}\n")                   liftIO $ copyWithHeader dflags msg line_prag input_fn final_fn-               return (dflags, final_fn)+               return final_fn        | not (realPhase `happensBefore'` stopPhase)@@ -738,17 +752,22 @@      -> do liftIO $ debugTraceMsg dflags 4                                   (text "Running phase" <+> ppr phase)            (next_phase, output_fn) <- runHookedPhase phase input_fn dflags-           r <- pipeLoop next_phase output_fn            case phase of-               HscOut {} ->-                   whenGeneratingDynamicToo dflags $ do-                       setDynFlags $ dynamicTooMkDynamicDynFlags dflags-                       -- TODO shouldn't ignore result:-                       _ <- pipeLoop phase input_fn-                       return ()-               _ ->-                   return ()-           return r+               HscOut {} -> do+                   -- We don't pass Opt_BuildDynamicToo to the backend+                   -- in DynFlags.+                   -- Instead it's run twice with flags accordingly set+                   -- per run.+                   let noDynToo = pipeLoop next_phase output_fn+                   let dynToo = do+                          setDynFlags $ gopt_unset dflags Opt_BuildDynamicToo+                          r <- pipeLoop next_phase output_fn+                          setDynFlags $ dynamicTooMkDynamicDynFlags dflags+                          -- TODO shouldn't ignore result:+                          _ <- pipeLoop phase input_fn+                          return r+                   ifGeneratingDynamicToo dflags dynToo noDynToo+               _ -> pipeLoop next_phase output_fn  runHookedPhase :: PhasePlus -> FilePath -> DynFlags                -> CompPipeline (PhasePlus, FilePath)@@ -821,7 +840,7 @@                        As _    | keep_s     -> True                        LlvmOpt | keep_bc    -> True                        HCc     | keep_hc    -> True-                       HsPp _  | keep_hscpp -> True   -- See Trac #10869+                       HsPp _  | keep_hscpp -> True   -- See #10869                        _other               -> False            suffix = myPhaseInputExt next_phase@@ -870,8 +889,8 @@                                  , not (any (isInfixOf "-mcpu") (getOpts dflags opt_lc)) ]     ++ [("", "-mattr=" ++ attrs) | not (null attrs) ] -  where target = LLVM_TARGET-        Just (LlvmTarget _ mcpu mattr) = lookup target (llvmTargets dflags)+  where target = platformMisc_llvmTarget $ platformMisc dflags+        Just (LlvmTarget _ mcpu mattr) = lookup target (llvmTargets $ llvmConfig dflags)          -- Relocation models         rmodel | gopt Opt_PIC dflags        = "pic"@@ -1115,9 +1134,13 @@    -- run the compiler!         let msg hsc_env _ what _ = oneShotMsg hsc_env what-        (result, _) <- liftIO $ hscIncrementalCompile True Nothing (Just msg) hsc_env'+        (result, _mod_details, plugin_dflags) <-+          liftIO $ hscIncrementalCompile True Nothing (Just msg) hsc_env'                             mod_summary source_unchanged Nothing (1,1) +        -- In the rest of the pipeline use the dflags with plugin info+        setDynFlags plugin_dflags+         return (HscOut src_flavour mod_name result,                 panic "HscOut doesn't have an input filename") @@ -1127,24 +1150,24 @@          let o_file = ml_obj_file location -- The real object file             hsc_lang = hscTarget dflags-            next_phase = hscPostBackendPhase dflags src_flavour hsc_lang+            next_phase = hscPostBackendPhase src_flavour hsc_lang          case result of-            HscNotGeneratingCode ->+            HscNotGeneratingCode _ ->                 return (RealPhase StopLn,                         panic "No output filename from Hsc when no-code")-            HscUpToDate ->+            HscUpToDate _ ->                 do liftIO $ touchObjectFile dflags o_file                    -- The .o file must have a later modification date                    -- than the source file (else we wouldn't get Nothing)                    -- but we touch it anyway, to keep 'make' happy (we think).                    return (RealPhase StopLn, o_file)-            HscUpdateBoot ->+            HscUpdateBoot _ ->                 do -- In the case of hs-boot files, generate a dummy .o-boot                    -- stamp file for the benefit of Make                    liftIO $ touchObjectFile dflags o_file                    return (RealPhase StopLn, o_file)-            HscUpdateSig ->+            HscUpdateSig _ ->                 do -- We need to create a REAL but empty .o file                    -- because we are going to attempt to put it in a library                    PipeState{hsc_env=hsc_env'} <- getPipeState@@ -1152,13 +1175,25 @@                        basename = dropExtension input_fn                    liftIO $ compileEmptyStub dflags hsc_env' basename location mod_name                    return (RealPhase StopLn, o_file)-            HscRecomp cgguts mod_summary+            HscRecomp { hscs_guts = cgguts,+                        hscs_mod_location = mod_location,+                        hscs_partial_iface = partial_iface,+                        hscs_old_iface_hash = mb_old_iface_hash,+                        hscs_iface_dflags = iface_dflags }               -> do output_fn <- phaseOutputFilename next_phase                      PipeState{hsc_env=hsc_env'} <- getPipeState                      (outputFilename, mStub, foreign_files) <- liftIO $-                      hscGenHardCode hsc_env' cgguts mod_summary output_fn+                      hscGenHardCode hsc_env' cgguts mod_location output_fn++                    final_iface <- liftIO (mkFullIface hsc_env'{hsc_dflags=iface_dflags} partial_iface)+                    setIface final_iface++                    -- See Note [Writing interface files]+                    let if_dflags = dflags `gopt_unset` Opt_BuildDynamicToo+                    liftIO $ hscMaybeWriteIface if_dflags final_iface mb_old_iface_hash mod_location+                     stub_o <- liftIO (mapM (compileStub hsc_env') mStub)                     foreign_os <- liftIO $                       mapM (uncurry (compileForeign hsc_env')) foreign_files@@ -1170,25 +1205,18 @@ -- Cmm phase  runPhase (RealPhase CmmCpp) input_fn dflags-  = do-       output_fn <- phaseOutputFilename Cmm+  = do output_fn <- phaseOutputFilename Cmm        liftIO $ doCpp dflags False{-not raw-}                       input_fn output_fn        return (RealPhase Cmm, output_fn)  runPhase (RealPhase Cmm) input_fn dflags-  = do-        let hsc_lang = hscTarget dflags--        let next_phase = hscPostBackendPhase dflags HsSrcFile hsc_lang--        output_fn <- phaseOutputFilename next_phase--        PipeState{hsc_env} <- getPipeState--        liftIO $ hscCompileCmmFile hsc_env input_fn output_fn--        return (RealPhase next_phase, output_fn)+  = do let hsc_lang = hscTarget dflags+       let next_phase = hscPostBackendPhase HsSrcFile hsc_lang+       output_fn <- phaseOutputFilename next_phase+       PipeState{hsc_env} <- getPipeState+       liftIO $ hscCompileCmmFile hsc_env input_fn output_fn+       return (RealPhase next_phase, output_fn)  ----------------------------------------------------------------------------- -- Cc phase@@ -1272,17 +1300,8 @@          ghcVersionH <- liftIO $ getGhcVersionPathName dflags -        let gcc_lang_opt | cc_phase `eqPhase` Ccxx    = "c++"-                         | cc_phase `eqPhase` Cobjc   = "objective-c"-                         | cc_phase `eqPhase` Cobjcxx = "objective-c++"-                         | otherwise                  = "c"-        liftIO $ SysTools.runCc dflags (-                -- force the C compiler to interpret this file as C when-                -- compiling .hc files, by adding the -x c option.-                -- Also useful for plain .c files, just in case GHC saw a-                -- -x c option.-                        [ SysTools.Option "-x", SysTools.Option gcc_lang_opt-                        , SysTools.FileOption "" input_fn+        liftIO $ SysTools.runCc (phaseForeignLanguage cc_phase) dflags (+                        [ SysTools.FileOption "" input_fn                         , SysTools.Option "-o"                         , SysTools.FileOption "" output_fn                         ]@@ -1331,50 +1350,18 @@         return (RealPhase next_phase, output_fn)  -------------------------------------------------------------------------------- Splitting phase--runPhase (RealPhase Splitter) input_fn dflags-  = do  -- tmp_pfx is the prefix used for the split .s files--        split_s_prefix <--          liftIO $ newTempName dflags TFL_CurrentModule "split"-        let n_files_fn = split_s_prefix--        liftIO $ SysTools.runSplit dflags-                          [ SysTools.FileOption "" input_fn-                          , SysTools.FileOption "" split_s_prefix-                          , SysTools.FileOption "" n_files_fn-                          ]--        -- Save the number of split files for future references-        s <- liftIO $ readFile n_files_fn-        let n_files = read s :: Int-            dflags' = dflags { splitInfo = Just (split_s_prefix, n_files) }--        setDynFlags dflags'--        -- Remember to delete all these files-        liftIO $ addFilesToClean dflags' TFL_CurrentModule $-                                 [ split_s_prefix ++ "__" ++ show n ++ ".s"-                                 | n <- [1..n_files]]--        return (RealPhase SplitAs,-                "**splitter**") -- we don't use the filename in SplitAs------------------------------------------------------------------------------- -- As, SpitAs phase : Assembler --- This is for calling the assembler on a regular assembly file (not split).+-- This is for calling the assembler on a regular assembly file runPhase (RealPhase (As with_cpp)) input_fn dflags   = do         -- LLVM from version 3.0 onwards doesn't support the OS X system         -- assembler, so we use clang as the assembler instead. (#5636)-        let whichAsProg | hscTarget dflags == HscLlvm &&-                          platformOS (targetPlatform dflags) == OSDarwin-                        = return SysTools.runClang-                        | otherwise = return SysTools.runAs+        let as_prog | hscTarget dflags == HscLlvm &&+                      platformOS (targetPlatform dflags) == OSDarwin+                    = SysTools.runClang+                    | otherwise = SysTools.runAs -        as_prog <- whichAsProg         let cmdline_include_paths = includePaths dflags         let pic_c_flags = picCCOpts dflags @@ -1391,7 +1378,10 @@         let local_includes = [ SysTools.Option ("-iquote" ++ p)                              | p <- includePathsQuote cmdline_include_paths ]         let runAssembler inputFilename outputFilename-                = liftIO $ as_prog dflags+              = liftIO $ do+                  withAtomicRename outputFilename $ \temp_outputFilename -> do+                    as_prog+                       dflags                        (local_includes ++ global_includes                        -- See Note [-fPIC for assembler]                        ++ map SysTools.Option pic_c_flags@@ -1421,104 +1411,15 @@                           , SysTools.Option "-c"                           , SysTools.FileOption "" inputFilename                           , SysTools.Option "-o"-                          , SysTools.FileOption "" outputFilename+                          , SysTools.FileOption "" temp_outputFilename                           ])          liftIO $ debugTraceMsg dflags 4 (text "Running the assembler")         runAssembler input_fn output_fn-        return (RealPhase next_phase, output_fn) ---- This is for calling the assembler on a split assembly file (so a collection--- of assembly files)-runPhase (RealPhase SplitAs) _input_fn dflags-  = do-        -- we'll handle the stub_o file in this phase, so don't MergeForeign,-        -- just jump straight to StopLn afterwards.-        let next_phase = StopLn-        output_fn <- phaseOutputFilename next_phase--        let base_o = dropExtension output_fn-            osuf = objectSuf dflags-            split_odir  = base_o ++ "_" ++ osuf ++ "_split"--        let pic_c_flags = picCCOpts dflags--        -- this also creates the hierarchy-        liftIO $ createDirectoryIfMissing True split_odir--        -- remove M_split/ *.o, because we're going to archive M_split/ *.o-        -- later and we don't want to pick up any old objects.-        fs <- liftIO $ getDirectoryContents split_odir-        liftIO $ mapM_ removeFile $-                map (split_odir </>) $ filter (osuf `isSuffixOf`) fs--        let (split_s_prefix, n) = case splitInfo dflags of-                                  Nothing -> panic "No split info"-                                  Just x -> x--        let split_s   n = split_s_prefix ++ "__" ++ show n <.> "s"--            split_obj :: Int -> FilePath-            split_obj n = split_odir </>-                          takeFileName base_o ++ "__" ++ show n <.> osuf--        let assemble_file n-              = SysTools.runAs dflags (--        -- We only support SparcV9 and better because V8 lacks an atomic CAS-        -- instruction so we have to make sure that the assembler accepts the-        -- instruction set. Note that the user can still override this-        -- (e.g., -mcpu=ultrasparc). GCC picks the "best" -mcpu flag-        -- regardless of the ordering.-        ---        -- This is a temporary hack.-                          (if platformArch (targetPlatform dflags) == ArchSPARC-                           then [SysTools.Option "-mcpu=v9"]-                           else []) ++--                          -- See Note [-fPIC for assembler]-                          map SysTools.Option pic_c_flags ++--                          [ SysTools.Option "-c"-                          , SysTools.Option "-o"-                          , SysTools.FileOption "" (split_obj n)-                          , SysTools.FileOption "" (split_s n)-                          ])--        liftIO $ mapM_ assemble_file [1..n]--        -- Note [pipeline-split-init]-        -- If we have a stub file -- which will be part of foreign_os ---        --  it may contain constructor-        -- functions for initialisation of this module.  We can't-        -- simply leave the stub as a separate object file, because it-        -- will never be linked in: nothing refers to it.  We need to-        -- ensure that if we ever refer to the data in this module-        -- that needs initialisation, then we also pull in the-        -- initialisation routine.-        ---        -- To that end, we make a DANGEROUS ASSUMPTION here: the data-        -- that needs to be initialised is all in the FIRST split-        -- object.  See Note [codegen-split-init].-        ---        -- We also merge in all the foreign objects since we're at it.--        PipeState{foreign_os} <- getPipeState-        if null foreign_os-          then return ()-          else liftIO $ do-             tmp_split_1 <- newTempName dflags TFL_CurrentModule osuf-             let split_1 = split_obj 1-             copyFile split_1 tmp_split_1-             removeFile split_1-             joinObjectFiles dflags (tmp_split_1 : foreign_os) split_1--        -- join them into a single .o file-        liftIO $ joinObjectFiles dflags (map split_obj [1..n]) output_fn-         return (RealPhase next_phase, output_fn) + ----------------------------------------------------------------------------- -- LlvmOpt phase runPhase (RealPhase LlvmOpt) input_fn dflags@@ -1538,7 +1439,7 @@         -- we always (unless -optlo specified) run Opt since we rely on it to         -- fix up some pretty big deficiencies in the code we generate         optIdx = max 0 $ min 2 $ optLevel dflags  -- ensure we're in [0,2]-        llvmOpts = case lookup optIdx $ llvmPasses dflags of+        llvmOpts = case lookup optIdx $ llvmPasses $ llvmConfig dflags of                     Just passes -> passes                     Nothing -> panic ("runPhase LlvmOpt: llvm-passes file "                                       ++ "is missing passes for level "@@ -1560,13 +1461,10 @@  runPhase (RealPhase LlvmLlc) input_fn dflags   = do-    next_phase <- if fastLlvmPipeline dflags-                  then maybeMergeForeign-                  -- hidden debugging flag '-dno-llvm-mangler' to skip mangling-                  else case gopt Opt_NoLlvmMangler dflags of-                         False                            -> return LlvmMangle-                         True | gopt Opt_SplitObjs dflags -> return Splitter-                         True                             -> return (As False)+    next_phase <- if | fastLlvmPipeline dflags -> maybeMergeForeign+                     -- hidden debugging flag '-dno-llvm-mangler' to skip mangling+                     | gopt Opt_NoLlvmMangler dflags -> return (As False)+                     | otherwise -> return LlvmMangle      output_fn <- phaseOutputFilename next_phase @@ -1638,7 +1536,7 @@  runPhase (RealPhase LlvmMangle) input_fn dflags   = do-      let next_phase = if gopt Opt_SplitObjs dflags then Splitter else As False+      let next_phase = As False       output_fn <- phaseOutputFilename next_phase       liftIO $ llvmFixupAsm dflags input_fn output_fn       return (RealPhase next_phase, output_fn)@@ -1761,7 +1659,7 @@ linkBinary' :: Bool -> DynFlags -> [FilePath] -> [InstalledUnitId] -> IO () linkBinary' staticLink dflags o_files dep_packages = do     let platform = targetPlatform dflags-        mySettings = settings dflags+        toolSettings' = toolSettings dflags         verbFlags = getVerbFlags dflags         output_fn = exeFileName staticLink dflags @@ -1869,23 +1767,6 @@         -- probably _stub.o files     let extra_ld_inputs = ldInputs dflags -    -- Here are some libs that need to be linked at the *end* of-    -- the command line, because they contain symbols that are referred to-    -- by the RTS.  We can't therefore use the ordinary way opts for these.-    let debug_opts | WayDebug `elem` ways dflags = [-#if defined(HAVE_LIBBFD)-                        "-lbfd", "-liberty"-#endif-                         ]-                   | otherwise                   = []--        thread_opts | WayThreaded `elem` ways dflags = [-#if NEED_PTHREAD_LIB-                        "-lpthread"-#endif-                        ]-                    | otherwise                      = []-     rc_objs <- maybeCreateManifest dflags output_fn      let link = if staticLink@@ -1917,7 +1798,7 @@                       -- like                       --     ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog                       -- on x86.-                      ++ (if sLdSupportsCompactUnwind mySettings &&+                      ++ (if toolSettings_ldSupportsCompactUnwind toolSettings' &&                              not staticLink &&                              (platformOS platform == OSDarwin) &&                              case platformArch platform of@@ -1941,7 +1822,7 @@                           then ["-Wl,-read_only_relocs,suppress"]                           else []) -                      ++ (if sLdIsGnuLd mySettings &&+                      ++ (if toolSettings_ldIsGnuLd toolSettings' &&                              not (gopt Opt_WholeArchiveHsLibs dflags)                           then ["-Wl,--gc-sections"]                           else [])@@ -1956,8 +1837,6 @@                       ++ extraLinkObj:noteLinkObjs                       ++ pkg_link_opts                       ++ pkg_framework_opts-                      ++ debug_opts-                      ++ thread_opts                       ++ (if platformOS platform == OSDarwin                           then [ "-Wl,-dead_strip_dylibs" ]                           else [])@@ -2068,7 +1947,7 @@         <$> (Archive <$> mapM loadObj modules)         <*> mapM loadAr archives -  if sLdIsGnuLd (settings dflags)+  if toolSettings_ldIsGnuLd (toolSettings dflags)     then writeGNUAr output_fn $ afilter (not . isGNUSymdef) ar     else writeBSDAr output_fn $ afilter (not . isBSDSymdef) ar @@ -2093,13 +1972,15 @@     let verbFlags = getVerbFlags dflags      let cpp_prog args | raw       = SysTools.runCpp dflags args-                      | otherwise = SysTools.runCc dflags (SysTools.Option "-E" : args)+                      | otherwise = SysTools.runCc Nothing dflags (SysTools.Option "-E" : args) +    let targetArch = stringEncodeArch $ platformArch $ targetPlatform dflags+        targetOS = stringEncodeOS $ platformOS $ targetPlatform dflags     let target_defs =           [ "-D" ++ HOST_OS     ++ "_BUILD_OS",             "-D" ++ HOST_ARCH   ++ "_BUILD_ARCH",-            "-D" ++ TARGET_OS   ++ "_HOST_OS",-            "-D" ++ TARGET_ARCH ++ "_HOST_ARCH" ]+            "-D" ++ targetOS    ++ "_HOST_OS",+            "-D" ++ targetArch  ++ "_HOST_ARCH" ]         -- remember, in code we *compile*, the HOST is the same our TARGET,         -- and BUILD is the same as our HOST. @@ -2133,7 +2014,7 @@                     -- Include version macros for every *exposed* package.                     -- Without -hide-all-packages and with a package database                     -- size of 1000 packages, it takes cpp an estimated 2-                    -- milliseconds to process this file. See Trac #10970+                    -- milliseconds to process this file. See #10970                     -- comment 8.                     return [SysTools.FileOption "-include" macro_stub]             else return []@@ -2187,7 +2068,7 @@  generatePackageVersionMacros :: [PackageConfig] -> String generatePackageVersionMacros pkgs = concat-  -- Do not add any C-style comments. See Trac #3389.+  -- Do not add any C-style comments. See #3389.   [ generateMacros "" pkgname version   | pkg <- pkgs   , let version = packageVersion pkg@@ -2242,15 +2123,15 @@  joinObjectFiles :: DynFlags -> [FilePath] -> FilePath -> IO () joinObjectFiles dflags o_files output_fn = do-  let mySettings = settings dflags-      ldIsGnuLd = sLdIsGnuLd mySettings+  let toolSettings' = toolSettings dflags+      ldIsGnuLd = toolSettings_ldIsGnuLd toolSettings'       osInfo = platformOS (targetPlatform dflags)       ld_r args cc = SysTools.runLink dflags ([                        SysTools.Option "-nostdlib",                        SysTools.Option "-Wl,-r"                      ]                         -- See Note [No PIE while linking] in DynFlags-                     ++ (if sGccSupportsNoPie mySettings+                     ++ (if toolSettings_ccSupportsNoPie toolSettings'                           then [SysTools.Option "-no-pie"]                           else []) @@ -2281,7 +2162,7 @@       -- suppress the generation of the .note.gnu.build-id section,       -- which we don't need and sometimes causes ld to emit a       -- warning:-      ld_build_id | sLdSupportsBuildId mySettings = ["-Wl,--build-id=none"]+      ld_build_id | toolSettings_ldSupportsBuildId toolSettings' = ["-Wl,--build-id=none"]                   | otherwise                     = []    ccInfo <- getCompilerInfo dflags@@ -2292,7 +2173,7 @@           let o_files_abs = map (\x -> "\"" ++ (cwd </> x) ++ "\"") o_files           writeFile script $ "INPUT(" ++ unwords o_files_abs ++ ")"           ld_r [SysTools.FileOption "" script] ccInfo-     else if sLdSupportsFilelist mySettings+     else if toolSettings_ldSupportsFilelist toolSettings'      then do           filelist <- newTempName dflags TFL_CurrentModule "filelist"           writeFile filelist $ unlines o_files@@ -2322,14 +2203,13 @@              return (t2 <= src_timestamp)  -- | What phase to run after one of the backend code generators has run-hscPostBackendPhase :: DynFlags -> HscSource -> HscTarget -> Phase-hscPostBackendPhase _ HsBootFile _    =  StopLn-hscPostBackendPhase _ HsigFile _      =  StopLn-hscPostBackendPhase dflags _ hsc_lang =+hscPostBackendPhase :: HscSource -> HscTarget -> Phase+hscPostBackendPhase HsBootFile _    =  StopLn+hscPostBackendPhase HsigFile _      =  StopLn+hscPostBackendPhase _ hsc_lang =   case hsc_lang of-        HscC -> HCc-        HscAsm | gopt Opt_SplitObjs dflags -> Splitter-               | otherwise                 -> As False+        HscC           -> HCc+        HscAsm         -> As False         HscLlvm        -> LlvmOpt         HscNothing     -> StopLn         HscInterpreted -> StopLn
main/DynFlags.hs view
@@ -41,6 +41,7 @@         whenGeneratingDynamicToo, ifGeneratingDynamicToo,         whenCannotGenerateDynamicToo,         dynamicTooMkDynamicDynFlags,+        dynamicOutputFile,         DynFlags(..),         FlagSpec(..),         HasDynFlags(..), ContainsDynFlags(..),@@ -58,12 +59,12 @@         fFlags, fLangFlags, xFlags,         wWarningFlags,         dynFlagDependencies,-        tablesNextToCode, mkTablesNextToCode,         makeDynFlagsConsistent,         shouldUseColor,         shouldUseHexWordLiterals,         positionIndependent,         optimisationFlags,+        setFlagsFromEnvFile,          Way(..), mkBuildTag, wayRTSOnly, addWay', updateWays,         wayGeneralFlags, wayUnsetGeneralFlags,@@ -82,19 +83,82 @@         unsafeFlags, unsafeFlagsForInfer,          -- ** LLVM Targets-        LlvmTarget(..), LlvmTargets, LlvmPasses, LlvmConfig,+        LlvmTarget(..), LlvmConfig(..),          -- ** System tool settings and locations         Settings(..),-        targetPlatform, programName, projectVersion,-        ghcUsagePath, ghciUsagePath, topDir, tmpDir, rawSettings,-        versionedAppDir,+        sProgramName,+        sProjectVersion,+        sGhcUsagePath,+        sGhciUsagePath,+        sToolDir,+        sTopDir,+        sTmpDir,+        sSystemPackageConfig,+        sLdSupportsCompactUnwind,+        sLdSupportsBuildId,+        sLdSupportsFilelist,+        sLdIsGnuLd,+        sGccSupportsNoPie,+        sPgm_L,+        sPgm_P,+        sPgm_F,+        sPgm_c,+        sPgm_a,+        sPgm_l,+        sPgm_dll,+        sPgm_T,+        sPgm_windres,+        sPgm_libtool,+        sPgm_ar,+        sPgm_ranlib,+        sPgm_lo,+        sPgm_lc,+        sPgm_lcc,+        sPgm_i,+        sOpt_L,+        sOpt_P,+        sOpt_P_fingerprint,+        sOpt_F,+        sOpt_c,+        sOpt_cxx,+        sOpt_a,+        sOpt_l,+        sOpt_windres,+        sOpt_lo,+        sOpt_lc,+        sOpt_lcc,+        sOpt_i,+        sExtraGccViaCFlags,+        sTargetPlatformString,+        sIntegerLibrary,+        sIntegerLibraryType,+        sGhcWithInterpreter,+        sGhcWithNativeCodeGen,+        sGhcWithSMP,+        sGhcRTSWays,+        sTablesNextToCode,+        sLeadingUnderscore,+        sLibFFI,+        sGhcThreaded,+        sGhcDebugged,+        sGhcRtsWithLibdw,+        IntegerLibrary(..),+        GhcNameVersion(..),+        FileSettings(..),+        PlatformMisc(..),+        settings,+        programName, projectVersion,+        ghcUsagePath, ghciUsagePath, topDir, tmpDir,+        versionedAppDir, versionedFilePath,         extraGccViaCFlags, systemPackageConfig,-        pgm_L, pgm_P, pgm_F, pgm_c, pgm_s, pgm_a, pgm_l, pgm_dll, pgm_T,+        pgm_L, pgm_P, pgm_F, pgm_c, pgm_a, pgm_l, pgm_dll, pgm_T,         pgm_windres, pgm_libtool, pgm_ar, pgm_ranlib, pgm_lo, pgm_lc,-        pgm_lcc, pgm_i, opt_L, opt_P, opt_F, opt_c, opt_a, opt_l, opt_i,+        pgm_lcc, pgm_i,+        opt_L, opt_P, opt_F, opt_c, opt_cxx, opt_a, opt_l, opt_i,         opt_P_signature,         opt_windres, opt_lo, opt_lc, opt_lcc,+        tablesNextToCode,          -- ** Manipulating DynFlags         addPluginModuleName,@@ -115,7 +179,6 @@         updOptLevel,         setTmpDir,         setUnitId,-        interpretPackageEnv,         canonicalizeHomeModule,         canonicalizeModuleIfHome, @@ -146,6 +209,7 @@ #include "GHCConstantsHaskellExports.hs"         bLOCK_SIZE_W,         wORD_SIZE_IN_BITS,+        wordAlignment,         tAG_MASK,         mAX_PTR_TAG,         tARGET_MIN_INT, tARGET_MAX_INT, tARGET_MAX_WORD,@@ -184,7 +248,8 @@  import GhcPrelude -import Platform+import GHC.Platform+import GHC.UniqueSubdir (uniqueSubdir) import PlatformConstants import Module import PackageConfig@@ -194,9 +259,11 @@ import {-# SOURCE #-} Packages (PackageState, emptyPackageState) import DriverPhases     ( Phase(..), phaseInputExt ) import Config+import CliOption import CmdLineParser hiding (WarnReason(..)) import qualified CmdLineParser as Cmd import Constants+import GhcNameVersion import Panic import qualified PprColour as Col import Util@@ -204,10 +271,14 @@ import MonadUtils import qualified Pretty import SrcLoc-import BasicTypes       ( IntWithInf, treatZeroAsInf )+import BasicTypes       ( Alignment, alignmentOf, IntWithInf, treatZeroAsInf ) import FastString import Fingerprint+import FileSettings import Outputable+import Settings+import ToolSettings+ import Foreign.C        ( CInt(..) ) import System.IO.Unsafe ( unsafeDupablePerformIO ) import {-# SOURCE #-} ErrUtils ( Severity(..), MsgDoc, mkLocMessageAnn@@ -224,7 +295,6 @@ import Control.Monad.Trans.Writer import Control.Monad.Trans.Reader import Control.Monad.Trans.Except-import Control.Exception (throwIO)  import Data.Ord import Data.Bits@@ -238,7 +308,7 @@ import Data.Word import System.FilePath import System.Directory-import System.Environment (getEnv, lookupEnv)+import System.Environment (lookupEnv) import System.IO import System.IO.Error import Text.ParserCombinators.ReadP hiding (char)@@ -250,9 +320,10 @@ import GHC.Foreign (withCString, peekCString) import qualified GHC.LanguageExtensions as LangExt --- #if defined(GHCI)-import Foreign (Ptr) -- needed for 2nd stage--- #endif+#if GHC_STAGE >= 2+-- used by SHARED_GLOBAL_VAR+import Foreign (Ptr)+#endif  -- Note [Updating flag description in the User's Guide] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -322,9 +393,9 @@ --  * Adding the flag to the GHC Wiki -- --    There is a change log tracking language extension additions and removals---    on the GHC wiki:  https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory+--    on the GHC wiki:  https://gitlab.haskell.org/ghc/ghc/wikis/language-pragma-history -----  See Trac #4437 and #8176.+--  See #4437 and #8176.  -- ----------------------------------------------------------------------------- -- DynFlags@@ -336,10 +407,13 @@    = Opt_D_dump_cmm    | Opt_D_dump_cmm_from_stg    | Opt_D_dump_cmm_raw-   | Opt_D_dump_cmm_verbose+   | Opt_D_dump_cmm_verbose_by_proc    -- All of the cmm subflags (there are a lot!) automatically-   -- enabled if you run -ddump-cmm-verbose+   -- enabled if you run -ddump-cmm-verbose-by-proc    -- Each flag corresponds to exact stage of Cmm pipeline.+   | Opt_D_dump_cmm_verbose+   -- same as -ddump-cmm-verbose-by-proc but writes each stage+   -- to a separate file (if used with -ddump-to-file)    | Opt_D_dump_cmm_cfg    | Opt_D_dump_cmm_cbe    | Opt_D_dump_cmm_switch@@ -376,12 +450,13 @@    | Opt_D_dump_parsed_ast    | Opt_D_dump_rn    | Opt_D_dump_rn_ast-   | Opt_D_dump_shape    | Opt_D_dump_simpl    | Opt_D_dump_simpl_iterations    | Opt_D_dump_spec    | Opt_D_dump_prep-   | Opt_D_dump_stg+   | Opt_D_dump_stg -- CoreToStg output+   | Opt_D_dump_stg_unarised -- STG after unarise+   | Opt_D_dump_stg_final -- STG after stg2stg    | Opt_D_dump_call_arity    | Opt_D_dump_exitify    | Opt_D_dump_stranal@@ -434,8 +509,9 @@    | Opt_DoCmmLinting    | Opt_DoAsmLinting    | Opt_DoAnnotationLinting-   | Opt_NoLlvmMangler                 -- hidden flag-   | Opt_FastLlvm                      -- hidden flag+   | Opt_NoLlvmMangler                  -- hidden flag+   | Opt_FastLlvm                       -- hidden flag+   | Opt_NoTypeableBinds     | Opt_WarnIsError                    -- -Werror; makes warnings fatal    | Opt_ShowWarnGroups                 -- Show the group a warning belongs to@@ -446,6 +522,7 @@    | Opt_PrintExplicitCoercions    | Opt_PrintExplicitRuntimeReps    | Opt_PrintEqualityRelations+   | Opt_PrintAxiomIncomps    | Opt_PrintUnicodeSyntax    | Opt_PrintExpandedSynonyms    | Opt_PrintPotentialInstances@@ -480,6 +557,7 @@    | Opt_UnboxSmallStrictFields    | Opt_DictsCheap    | Opt_EnableRewriteRules             -- Apply rewrite rules during simplification+   | Opt_EnableThSpliceWarnings         -- Enable warnings for TH splices    | Opt_RegsGraph                      -- do graph coloring register allocation    | Opt_RegsIterative                  -- do iterative coalescing graph coloring register allocation    | Opt_PedanticBottoms                -- Be picky about how we treat bottom@@ -526,7 +604,6 @@    | Opt_ExcessPrecision    | Opt_EagerBlackHoling    | Opt_NoHsMain-   | Opt_SplitObjs    | Opt_SplitSections    | Opt_StgStats    | Opt_HideAllPackages@@ -578,10 +655,13 @@    -- response file and as such breaking apart.    | Opt_SingleLibFolder    | Opt_KeepCAFs+   | Opt_KeepGoing+   | Opt_ByteCode     -- output style opts    | Opt_ErrorSpans -- Include full span info in error messages,                     -- instead of just the start position.+   | Opt_DeferDiagnostics    | Opt_DiagnosticsShowCaret -- Show snippets of offending code    | Opt_PprCaseAsLet    | Opt_PprShowTicks@@ -647,6 +727,7 @@    -- safe haskell flags    | Opt_DistrustAllPackages    | Opt_PackageTrust+   | Opt_PluginTrustworthy     | Opt_G_NoStateHack    | Opt_G_NoOptCoercion@@ -726,7 +807,7 @@  -- | Used to differentiate the scope an include needs to apply to. -- We have to split the include paths to avoid accidentally forcing recursive--- includes since -I overrides the system search paths. See Trac #14312.+-- includes since -I overrides the system search paths. See #14312. data IncludeSpecs   = IncludeSpecs { includePathsQuote  :: [String]                  , includePathsGlobal :: [String]@@ -788,6 +869,8 @@    | Opt_WarnUnusedMatches    | Opt_WarnUnusedTypePatterns    | Opt_WarnUnusedForalls+   | Opt_WarnUnusedRecordWildcards+   | Opt_WarnRedundantRecordWildcards    | Opt_WarnWarningsDeprecations    | Opt_WarnDeprecatedFlags    | Opt_WarnMissingMonadFailInstances -- since 8.0@@ -836,6 +919,12 @@    | Opt_WarnImplicitKindVars             -- Since 8.6    | Opt_WarnSpaceAfterBang    | Opt_WarnMissingDerivingStrategies    -- Since 8.8+   | Opt_WarnPrepositiveQualifiedModule   -- Since TBD+   | Opt_WarnUnusedPackages               -- Since 8.10+   | Opt_WarnInferredSafeImports          -- Since 8.10+   | Opt_WarnMissingSafeHaskellMode       -- Since 8.10+   | Opt_WarnCompatUnqualifiedImports     -- Since 8.10+   | Opt_WarnDerivingDefaults    deriving (Eq, Show, Enum)  data Language = Haskell98 | Haskell2010@@ -846,11 +935,12 @@  -- | The various Safe Haskell modes data SafeHaskellMode-   = Sf_None-   | Sf_Unsafe-   | Sf_Trustworthy-   | Sf_Safe-   | Sf_Ignore+   = Sf_None          -- ^ inferred unsafe+   | Sf_Unsafe        -- ^ declared and checked+   | Sf_Trustworthy   -- ^ declared and checked+   | Sf_Safe          -- ^ declared and checked+   | Sf_SafeInferred  -- ^ inferred as safe+   | Sf_Ignore        -- ^ @-fno-safe-haskell@ state    deriving (Eq)  instance Show SafeHaskellMode where@@ -858,6 +948,7 @@     show Sf_Unsafe       = "Unsafe"     show Sf_Trustworthy  = "Trustworthy"     show Sf_Safe         = "Safe"+    show Sf_SafeInferred = "Safe-Inferred"     show Sf_Ignore       = "Ignore"  instance Outputable SafeHaskellMode where@@ -869,18 +960,27 @@   ghcMode               :: GhcMode,   ghcLink               :: GhcLink,   hscTarget             :: HscTarget,-  settings              :: Settings,++  -- formerly Settings+  ghcNameVersion    :: {-# UNPACK #-} !GhcNameVersion,+  fileSettings      :: {-# UNPACK #-} !FileSettings,+  targetPlatform    :: Platform,       -- Filled in by SysTools+  toolSettings      :: {-# UNPACK #-} !ToolSettings,+  platformMisc      :: {-# UNPACK #-} !PlatformMisc,+  platformConstants :: PlatformConstants,+  rawSettings       :: [(String, String)],+   integerLibrary        :: IntegerLibrary,     -- ^ IntegerGMP or IntegerSimple. Set at configure time, but may be overriden     --   by GHC-API users. See Note [The integer library] in PrelNames-  llvmTargets           :: LlvmTargets,-  llvmPasses            :: LlvmPasses,+  llvmConfig            :: LlvmConfig,+    -- ^ N.B. It's important that this field is lazy since we load the LLVM+    -- configuration lazily. See Note [LLVM Configuration] in SysTools.   verbosity             :: Int,         -- ^ Verbosity level: see Note [Verbosity levels]   optLevel              :: Int,         -- ^ Optimisation level   debugLevel            :: Int,         -- ^ How much debug information to produce   simplPhases           :: Int,         -- ^ Number of simplifier phases   maxSimplIterations    :: Int,         -- ^ Max simplifier iterations-  maxPmCheckIterations  :: Int,         -- ^ Max no iterations for pm checking   ruleCheck             :: Maybe String,   inlineCheck           :: Maybe String, -- ^ A prefix to report inlining decisions about   strictnessBefore      :: [Int],       -- ^ Additional demand analysis@@ -904,11 +1004,18 @@                                         --   error messages   maxUncoveredPatterns  :: Int,         -- ^ Maximum number of unmatched patterns to show                                         --   in non-exhaustiveness warnings+  maxPmCheckModels      :: Int,         -- ^ Soft limit on the number of models+                                        --   the pattern match checker checks+                                        --   a pattern against. A safe guard+                                        --   against exponential blow-up.   simplTickFactor       :: Int,         -- ^ Multiplier for simplifier ticks   specConstrThreshold   :: Maybe Int,   -- ^ Threshold for SpecConstr   specConstrCount       :: Maybe Int,   -- ^ Max number of specialisations for any one function   specConstrRecursive   :: Int,         -- ^ Max number of specialisations for recursive types                                         --   Not optional; otherwise ForceSpecConstr can diverge.+  binBlobThreshold      :: Word,        -- ^ Binary literals (e.g. strings) whose size is above+                                        --   this threshold will be dumped in a binary file+                                        --   by the assembler code generator (0 to disable)   liberateCaseThreshold :: Maybe Int,   -- ^ Threshold for LiberateCase   floatLamArgs          :: Maybe Int,   -- ^ Arg count for lambda floating                                         --   See CoreMonad.FloatOutSwitches@@ -1010,6 +1117,7 @@   --  For ghc -M   depMakefile           :: FilePath,   depIncludePkgDeps     :: Bool,+  depIncludeCppDeps     :: Bool,   depExcludeMods        :: [ModuleName],   depSuffixes           :: [String], @@ -1287,155 +1395,118 @@   , lAttributes :: [String]   } -type LlvmTargets = [(String, LlvmTarget)]-type LlvmPasses = [(Int, String)]-type LlvmConfig = (LlvmTargets, LlvmPasses)+-- | See Note [LLVM Configuration] in SysTools.+data LlvmConfig = LlvmConfig { llvmTargets :: [(String, LlvmTarget)]+                             , llvmPasses  :: [(Int, String)]+                             } -data Settings = Settings {-  sTargetPlatform        :: Platform,       -- Filled in by SysTools-  sGhcUsagePath          :: FilePath,       -- ditto-  sGhciUsagePath         :: FilePath,       -- ditto-  sToolDir               :: Maybe FilePath, -- ditto-  sTopDir                :: FilePath,       -- ditto-  sTmpDir                :: String,      -- no trailing '/'-  sProgramName           :: String,-  sProjectVersion        :: String,-  -- You shouldn't need to look things up in rawSettings directly.-  -- They should have their own fields instead.-  sRawSettings           :: [(String, String)],-  sExtraGccViaCFlags     :: [String],-  sSystemPackageConfig   :: FilePath,-  sLdSupportsCompactUnwind :: Bool,-  sLdSupportsBuildId       :: Bool,-  sLdSupportsFilelist      :: Bool,-  sLdIsGnuLd               :: Bool,-  sGccSupportsNoPie        :: Bool,-  -- commands for particular phases-  sPgm_L                 :: String,-  sPgm_P                 :: (String,[Option]),-  sPgm_F                 :: String,-  sPgm_c                 :: (String,[Option]),-  sPgm_s                 :: (String,[Option]),-  sPgm_a                 :: (String,[Option]),-  sPgm_l                 :: (String,[Option]),-  sPgm_dll               :: (String,[Option]),-  sPgm_T                 :: String,-  sPgm_windres           :: String,-  sPgm_libtool           :: String,-  sPgm_ar                :: String,-  sPgm_ranlib            :: String,-  sPgm_lo                :: (String,[Option]), -- LLVM: opt llvm optimiser-  sPgm_lc                :: (String,[Option]), -- LLVM: llc static compiler-  sPgm_lcc               :: (String,[Option]), -- LLVM: c compiler-  sPgm_i                 :: String,-  -- options for particular phases-  sOpt_L                 :: [String],-  sOpt_P                 :: [String],-  sOpt_P_fingerprint     :: Fingerprint, -- cached Fingerprint of sOpt_P-                                         -- See Note [Repeated -optP hashing]-  sOpt_F                 :: [String],-  sOpt_c                 :: [String],-  sOpt_a                 :: [String],-  sOpt_l                 :: [String],-  sOpt_windres           :: [String],-  sOpt_lo                :: [String], -- LLVM: llvm optimiser-  sOpt_lc                :: [String], -- LLVM: llc static compiler-  sOpt_lcc               :: [String], -- LLVM: c compiler-  sOpt_i                 :: [String], -- iserv options+-----------------------------------------------------------------------------+-- Accessessors from 'DynFlags' -  sPlatformConstants     :: PlatformConstants- }+-- | "unbuild" a 'Settings' from a 'DynFlags'. This shouldn't be needed in the+-- vast majority of code. But GHCi questionably uses this to produce a default+-- 'DynFlags' from which to compute a flags diff for printing.+settings :: DynFlags -> Settings+settings dflags = Settings+  { sGhcNameVersion = ghcNameVersion dflags+  , sFileSettings = fileSettings dflags+  , sTargetPlatform = targetPlatform dflags+  , sToolSettings = toolSettings dflags+  , sPlatformMisc = platformMisc dflags+  , sPlatformConstants = platformConstants dflags+  , sRawSettings = rawSettings dflags+  } -targetPlatform :: DynFlags -> Platform-targetPlatform dflags = sTargetPlatform (settings dflags) programName :: DynFlags -> String-programName dflags = sProgramName (settings dflags)+programName dflags = ghcNameVersion_programName $ ghcNameVersion dflags projectVersion :: DynFlags -> String-projectVersion dflags = sProjectVersion (settings dflags)+projectVersion dflags = ghcNameVersion_projectVersion (ghcNameVersion dflags) ghcUsagePath          :: DynFlags -> FilePath-ghcUsagePath dflags = sGhcUsagePath (settings dflags)+ghcUsagePath dflags = fileSettings_ghcUsagePath $ fileSettings dflags ghciUsagePath         :: DynFlags -> FilePath-ghciUsagePath dflags = sGhciUsagePath (settings dflags)+ghciUsagePath dflags = fileSettings_ghciUsagePath $ fileSettings dflags toolDir               :: DynFlags -> Maybe FilePath-toolDir dflags = sToolDir (settings dflags)+toolDir dflags = fileSettings_toolDir $ fileSettings dflags topDir                :: DynFlags -> FilePath-topDir dflags = sTopDir (settings dflags)+topDir dflags = fileSettings_topDir $ fileSettings dflags tmpDir                :: DynFlags -> String-tmpDir dflags = sTmpDir (settings dflags)-rawSettings           :: DynFlags -> [(String, String)]-rawSettings dflags = sRawSettings (settings dflags)+tmpDir dflags = fileSettings_tmpDir $ fileSettings dflags extraGccViaCFlags     :: DynFlags -> [String]-extraGccViaCFlags dflags = sExtraGccViaCFlags (settings dflags)+extraGccViaCFlags dflags = toolSettings_extraGccViaCFlags $ toolSettings dflags systemPackageConfig   :: DynFlags -> FilePath-systemPackageConfig dflags = sSystemPackageConfig (settings dflags)+systemPackageConfig dflags = fileSettings_systemPackageConfig $ fileSettings dflags pgm_L                 :: DynFlags -> String-pgm_L dflags = sPgm_L (settings dflags)+pgm_L dflags = toolSettings_pgm_L $ toolSettings dflags pgm_P                 :: DynFlags -> (String,[Option])-pgm_P dflags = sPgm_P (settings dflags)+pgm_P dflags = toolSettings_pgm_P $ toolSettings dflags pgm_F                 :: DynFlags -> String-pgm_F dflags = sPgm_F (settings dflags)-pgm_c                 :: DynFlags -> (String,[Option])-pgm_c dflags = sPgm_c (settings dflags)-pgm_s                 :: DynFlags -> (String,[Option])-pgm_s dflags = sPgm_s (settings dflags)+pgm_F dflags = toolSettings_pgm_F $ toolSettings dflags+pgm_c                 :: DynFlags -> String+pgm_c dflags = toolSettings_pgm_c $ toolSettings dflags pgm_a                 :: DynFlags -> (String,[Option])-pgm_a dflags = sPgm_a (settings dflags)+pgm_a dflags = toolSettings_pgm_a $ toolSettings dflags pgm_l                 :: DynFlags -> (String,[Option])-pgm_l dflags = sPgm_l (settings dflags)+pgm_l dflags = toolSettings_pgm_l $ toolSettings dflags pgm_dll               :: DynFlags -> (String,[Option])-pgm_dll dflags = sPgm_dll (settings dflags)+pgm_dll dflags = toolSettings_pgm_dll $ toolSettings dflags pgm_T                 :: DynFlags -> String-pgm_T dflags = sPgm_T (settings dflags)+pgm_T dflags = toolSettings_pgm_T $ toolSettings dflags pgm_windres           :: DynFlags -> String-pgm_windres dflags = sPgm_windres (settings dflags)+pgm_windres dflags = toolSettings_pgm_windres $ toolSettings dflags pgm_libtool           :: DynFlags -> String-pgm_libtool dflags = sPgm_libtool (settings dflags)+pgm_libtool dflags = toolSettings_pgm_libtool $ toolSettings dflags pgm_lcc               :: DynFlags -> (String,[Option])-pgm_lcc dflags = sPgm_lcc (settings dflags)+pgm_lcc dflags = toolSettings_pgm_lcc $ toolSettings dflags pgm_ar                :: DynFlags -> String-pgm_ar dflags = sPgm_ar (settings dflags)+pgm_ar dflags = toolSettings_pgm_ar $ toolSettings dflags pgm_ranlib            :: DynFlags -> String-pgm_ranlib dflags = sPgm_ranlib (settings dflags)+pgm_ranlib dflags = toolSettings_pgm_ranlib $ toolSettings dflags pgm_lo                :: DynFlags -> (String,[Option])-pgm_lo dflags = sPgm_lo (settings dflags)+pgm_lo dflags = toolSettings_pgm_lo $ toolSettings dflags pgm_lc                :: DynFlags -> (String,[Option])-pgm_lc dflags = sPgm_lc (settings dflags)+pgm_lc dflags = toolSettings_pgm_lc $ toolSettings dflags pgm_i                 :: DynFlags -> String-pgm_i dflags = sPgm_i (settings dflags)+pgm_i dflags = toolSettings_pgm_i $ toolSettings dflags opt_L                 :: DynFlags -> [String]-opt_L dflags = sOpt_L (settings dflags)+opt_L dflags = toolSettings_opt_L $ toolSettings dflags opt_P                 :: DynFlags -> [String] opt_P dflags = concatMap (wayOptP (targetPlatform dflags)) (ways dflags)-            ++ sOpt_P (settings dflags)+            ++ toolSettings_opt_P (toolSettings dflags)  -- This function packages everything that's needed to fingerprint opt_P -- flags. See Note [Repeated -optP hashing]. opt_P_signature       :: DynFlags -> ([String], Fingerprint) opt_P_signature dflags =   ( concatMap (wayOptP (targetPlatform dflags)) (ways dflags)-  , sOpt_P_fingerprint (settings dflags))+  , toolSettings_opt_P_fingerprint $ toolSettings dflags+  )  opt_F                 :: DynFlags -> [String]-opt_F dflags = sOpt_F (settings dflags)+opt_F dflags= toolSettings_opt_F $ toolSettings dflags opt_c                 :: DynFlags -> [String] opt_c dflags = concatMap (wayOptc (targetPlatform dflags)) (ways dflags)-            ++ sOpt_c (settings dflags)+            ++ toolSettings_opt_c (toolSettings dflags)+opt_cxx               :: DynFlags -> [String]+opt_cxx dflags= toolSettings_opt_cxx $ toolSettings dflags opt_a                 :: DynFlags -> [String]-opt_a dflags = sOpt_a (settings dflags)+opt_a dflags= toolSettings_opt_a $ toolSettings dflags opt_l                 :: DynFlags -> [String] opt_l dflags = concatMap (wayOptl (targetPlatform dflags)) (ways dflags)-            ++ sOpt_l (settings dflags)+            ++ toolSettings_opt_l (toolSettings dflags) opt_windres           :: DynFlags -> [String]-opt_windres dflags = sOpt_windres (settings dflags)+opt_windres dflags= toolSettings_opt_windres $ toolSettings dflags opt_lcc                :: DynFlags -> [String]-opt_lcc dflags = sOpt_lcc (settings dflags)+opt_lcc dflags= toolSettings_opt_lcc $ toolSettings dflags opt_lo                :: DynFlags -> [String]-opt_lo dflags = sOpt_lo (settings dflags)+opt_lo dflags= toolSettings_opt_lo $ toolSettings dflags opt_lc                :: DynFlags -> [String]-opt_lc dflags = sOpt_lc (settings dflags)+opt_lc dflags= toolSettings_opt_lc $ toolSettings dflags opt_i                 :: DynFlags -> [String]-opt_i dflags = sOpt_i (settings dflags)+opt_i dflags= toolSettings_opt_i $ toolSettings dflags +tablesNextToCode :: DynFlags -> Bool+tablesNextToCode = platformMisc_tablesNextToCode . platformMisc+ -- | The directory for this version of ghc in the user's app directory -- (typically something like @~/.ghc/x86_64-linux-7.6.3@) --@@ -1445,15 +1516,8 @@   appdir <- tryMaybeT $ getAppUserDataDirectory (programName dflags)   return $ appdir </> versionedFilePath dflags --- | A filepath like @x86_64-linux-7.6.3@ with the platform string to use when--- constructing platform-version-dependent files that need to co-exist.--- versionedFilePath :: DynFlags -> FilePath-versionedFilePath dflags =     TARGET_ARCH-                        ++ '-':TARGET_OS-                        ++ '-':projectVersion dflags-  -- NB: This functionality is reimplemented in Cabal, so if you-  -- change it, be sure to update Cabal.+versionedFilePath dflags = uniqueSubdir $ platformMini $ targetPlatform dflags  -- | The target code type of the compilation (if any). --@@ -1600,28 +1664,19 @@     ppr (ExposePackage n arg rn) = text n <> braces (ppr arg <+> ppr rn)     ppr (HidePackage str) = text "-hide-package" <+> text str -defaultHscTarget :: Platform -> HscTarget-defaultHscTarget = defaultObjectTarget- -- | The 'HscTarget' value corresponding to the default way to create -- object files on the current platform.-defaultObjectTarget :: Platform -> HscTarget-defaultObjectTarget platform-  | platformUnregisterised platform     =  HscC-  | cGhcWithNativeCodeGen == "YES"      =  HscAsm-  | otherwise                           =  HscLlvm -tablesNextToCode :: DynFlags -> Bool-tablesNextToCode dflags-    = mkTablesNextToCode (platformUnregisterised (targetPlatform dflags))+defaultHscTarget :: Platform -> PlatformMisc -> HscTarget+defaultHscTarget platform pMisc+  | platformUnregisterised platform = HscC+  | platformMisc_ghcWithNativeCodeGen pMisc = HscAsm+  | otherwise = HscLlvm --- Determines whether we will be compiling--- info tables that reside just before the entry code, or with an--- indirection to the entry code.  See TABLES_NEXT_TO_CODE in--- includes/rts/storage/InfoTables.h.-mkTablesNextToCode :: Bool -> Bool-mkTablesNextToCode unregisterised-    = not unregisterised && cGhcEnableTablesNextToCode == "YES"+defaultObjectTarget :: DynFlags -> HscTarget+defaultObjectTarget dflags = defaultHscTarget+  (targetPlatform dflags)+  (platformMisc dflags)  data DynLibLoader   = Deployable@@ -1739,13 +1794,10 @@ wayUnsetGeneralFlags _ (WayCustom {}) = [] wayUnsetGeneralFlags _ WayThreaded = [] wayUnsetGeneralFlags _ WayDebug    = []-wayUnsetGeneralFlags _ WayDyn      = [-- There's no point splitting objects+wayUnsetGeneralFlags _ WayDyn      = [-- There's no point splitting                                       -- when we're going to be dynamically                                       -- linking. Plus it breaks compilation                                       -- on OSX x86.-                                      Opt_SplitObjs,-                                      -- If splitobjs wasn't useful for this,-                                      -- assume sections aren't either.                                       Opt_SplitSections] wayUnsetGeneralFlags _ WayProf     = [] wayUnsetGeneralFlags _ WayEventLog = []@@ -1817,6 +1869,12 @@           dflags4 = gopt_unset dflags3 Opt_BuildDynamicToo       in dflags4 +-- | Compute the path of the dynamic object corresponding to an object file.+dynamicOutputFile :: DynFlags -> FilePath -> FilePath+dynamicOutputFile dflags outputFile = dynOut outputFile+  where+    dynOut = flip addExtension (dynObjectSuf dflags) . dropExtension+ -----------------------------------------------------------------------------  -- | Used by 'GHC.runGhc' to partially initialize a new 'DynFlags' value@@ -1841,6 +1899,10 @@                           do str' <- peekCString enc cstr                              return (str == str'))                          `catchIOError` \_ -> return False+ maybeGhcNoUnicodeEnv <- lookupEnv "GHC_NO_UNICODE"+ let adjustNoUnicode (Just _) = False+     adjustNoUnicode Nothing = True+ let useUnicode' = (adjustNoUnicode maybeGhcNoUnicodeEnv) && canUseUnicode  canUseColor <- stderrSupportsAnsiColors  maybeGhcColorsEnv  <- lookupEnv "GHC_COLORS"  maybeGhcColoursEnv <- lookupEnv "GHC_COLOURS"@@ -1856,7 +1918,7 @@         dirsToClean    = refDirsToClean,         generatedDumps = refGeneratedDumps,         nextWrapperNum = wrapperNum,-        useUnicode    = canUseUnicode,+        useUnicode    = useUnicode',         useColor      = useColor',         canUseColor   = canUseColor,         colScheme     = colScheme',@@ -1867,26 +1929,27 @@ -- | The normal 'DynFlags'. Note that they are not suitable for use in this form -- and must be fully initialized by 'GHC.runGhc' first. defaultDynFlags :: Settings -> LlvmConfig -> DynFlags-defaultDynFlags mySettings (myLlvmTargets, myLlvmPasses) =+defaultDynFlags mySettings llvmConfig = -- See Note [Updating flag description in the User's Guide]      DynFlags {         ghcMode                 = CompManager,         ghcLink                 = LinkBinary,-        hscTarget               = defaultHscTarget (sTargetPlatform mySettings),-        integerLibrary          = cIntegerLibraryType,+        hscTarget               = defaultHscTarget (sTargetPlatform mySettings) (sPlatformMisc mySettings),+        integerLibrary          = sIntegerLibraryType mySettings,         verbosity               = 0,         optLevel                = 0,         debugLevel              = 0,         simplPhases             = 2,         maxSimplIterations      = 4,-        maxPmCheckIterations    = 2000000,         ruleCheck               = Nothing,         inlineCheck             = Nothing,+        binBlobThreshold        = 500000, -- 500K is a good default (see #16190)         maxRelevantBinds        = Just 6,         maxValidHoleFits   = Just 6,         maxRefHoleFits     = Just 6,         refLevelHoleFits   = Nothing,         maxUncoveredPatterns    = 4,+        maxPmCheckModels        = 100,         simplTickFactor         = 100,         specConstrThreshold     = Just 2000,         specConstrCount         = Just 3,@@ -1968,13 +2031,22 @@         ways                    = defaultWays mySettings,         buildTag                = mkBuildTag (defaultWays mySettings),         splitInfo               = Nothing,-        settings                = mySettings,-        llvmTargets             = myLlvmTargets,-        llvmPasses              = myLlvmPasses, +        ghcNameVersion = sGhcNameVersion mySettings,+        fileSettings = sFileSettings mySettings,+        toolSettings = sToolSettings mySettings,+        targetPlatform = sTargetPlatform mySettings,+        platformMisc = sPlatformMisc mySettings,+        platformConstants = sPlatformConstants mySettings,+        rawSettings = sRawSettings mySettings,++        -- See Note [LLVM configuration].+        llvmConfig              = llvmConfig,+         -- ghc -M values         depMakefile       = "Makefile",         depIncludePkgDeps = False,+        depIncludeCppDeps = False,         depExcludeMods    = [],         depSuffixes       = [],         -- end of ghc -M values@@ -2227,6 +2299,9 @@           f (Off f) flags = EnumSet.delete f flags           defaultExtensionFlags = EnumSet.fromList (languageExtensions ml) +-- | The language extensions implied by the various language variants.+-- When updating this be sure to update the flag documentation in+-- @docs/users-guide/glasgow_exts.rst@. languageExtensions :: Maybe Language -> [LangExt.Extension]  languageExtensions Nothing@@ -2244,6 +2319,7 @@     = [LangExt.ImplicitPrelude,        -- See Note [When is StarIsType enabled]        LangExt.StarIsType,+       LangExt.CUSKs,        LangExt.MonomorphismRestriction,        LangExt.NPlusKPatterns,        LangExt.DatatypeContexts,@@ -2260,6 +2336,7 @@     = [LangExt.ImplicitPrelude,        -- See Note [When is StarIsType enabled]        LangExt.StarIsType,+       LangExt.CUSKs,        LangExt.MonomorphismRestriction,        LangExt.DatatypeContexts,        LangExt.TraditionalRecordSyntax,@@ -2293,7 +2370,6 @@           enableIfVerbose Opt_D_dump_vt_trace               = False           enableIfVerbose Opt_D_dump_tc                     = False           enableIfVerbose Opt_D_dump_rn                     = False-          enableIfVerbose Opt_D_dump_shape                  = False           enableIfVerbose Opt_D_dump_rn_stats               = False           enableIfVerbose Opt_D_dump_hi_diffs               = False           enableIfVerbose Opt_D_verbose_core2core           = False@@ -2519,7 +2595,7 @@          setDynObjectSuf, setDynHiSuf,          setDylibInstallName,          setObjectSuf, setHiSuf, setHieSuf, setHcSuf, parseDynLibLoaderMode,-         setPgmP, addOptl, addOptc, addOptP,+         setPgmP, addOptl, addOptc, addOptcxx, addOptP,          addCmdlineFramework, addHaddockOpts, addGhciScript,          setInteractivePrint    :: String -> DynFlags -> DynFlags@@ -2632,13 +2708,16 @@  -- XXX HACK: Prelude> words "'does not' work" ===> ["'does","not'","work"] -- Config.hs should really use Option.-setPgmP   f = let (pgm:args) = words f in alterSettings (\s -> s { sPgm_P   = (pgm, map Option args)})-addOptl   f = alterSettings (\s -> s { sOpt_l   = f : sOpt_l s})-addOptc   f = alterSettings (\s -> s { sOpt_c   = f : sOpt_c s})-addOptP   f = alterSettings (\s -> s { sOpt_P   = f : sOpt_P s-                                     , sOpt_P_fingerprint = fingerprintStrings (f : sOpt_P s)-                                     })-                                     -- See Note [Repeated -optP hashing]+setPgmP   f = alterToolSettings (\s -> s { toolSettings_pgm_P   = (pgm, map Option args)})+  where (pgm:args) = words f+addOptl   f = alterToolSettings (\s -> s { toolSettings_opt_l   = f : toolSettings_opt_l s})+addOptc   f = alterToolSettings (\s -> s { toolSettings_opt_c   = f : toolSettings_opt_c s})+addOptcxx f = alterToolSettings (\s -> s { toolSettings_opt_cxx = f : toolSettings_opt_cxx s})+addOptP   f = alterToolSettings $ \s -> s+          { toolSettings_opt_P   = f : toolSettings_opt_P s+          , toolSettings_opt_P_fingerprint = fingerprintStrings (f : toolSettings_opt_P s)+          }+          -- See Note [Repeated -optP hashing]   where   fingerprintStrings ss = fingerprintFingerprints $ map fingerprintString ss @@ -2646,6 +2725,9 @@ setDepMakefile :: FilePath -> DynFlags -> DynFlags setDepMakefile f d = d { depMakefile = f } +setDepIncludeCppDeps :: Bool -> DynFlags -> DynFlags+setDepIncludeCppDeps b d = d { depIncludeCppDeps = b }+ setDepIncludePkgDeps :: Bool -> DynFlags -> DynFlags setDepIncludePkgDeps b d = d { depIncludePkgDeps = b } @@ -2667,27 +2749,6 @@  setInteractivePrint f d = d { interactivePrint = Just f} --- -------------------------------------------------------------------------------- Command-line options---- | When invoking external tools as part of the compilation pipeline, we--- pass these a sequence of options on the command-line. Rather than--- just using a list of Strings, we use a type that allows us to distinguish--- between filepaths and 'other stuff'. The reason for this is that--- this type gives us a handle on transforming filenames, and filenames only,--- to whatever format they're expected to be on a particular platform.-data Option- = FileOption -- an entry that _contains_ filename(s) / filepaths.-              String  -- a non-filepath prefix that shouldn't be-                      -- transformed (e.g., "/out=")-              String  -- the filepath/filename portion- | Option     String- deriving ( Eq )--showOpt :: Option -> String-showOpt (FileOption pre f) = pre ++ f-showOpt (Option s)  = s- ----------------------------------------------------------------------------- -- Setting the optimisation level @@ -2764,11 +2825,11 @@   let chooseOutput         | isJust (outputFile dflags3)          -- Only iff user specified -o ...         , not (isJust (dynOutputFile dflags3)) -- but not -dyno-        = return $ dflags3 { dynOutputFile = Just $ dynOut (fromJust $ outputFile dflags3) }+        = return $ dflags3 { dynOutputFile = Just $ dynamicOutputFile dflags3 outFile }         | otherwise         = return dflags3         where-          dynOut = flip addExtension (dynObjectSuf dflags3) . dropExtension+          outFile = fromJust $ outputFile dflags3   dflags4 <- ifGeneratingDynamicToo dflags3 chooseOutput (return dflags3)    let (dflags5, consistency_warnings) = makeDynFlagsConsistent dflags4@@ -2972,7 +3033,7 @@   , make_ord_flag defGhcFlag "rdynamic" $ noArg $ #if defined(linux_HOST_OS)                               addOptl "-rdynamic"-#elif defined (mingw32_HOST_OS)+#elif defined(mingw32_HOST_OS)                               addOptl "-Wl,--export-all-symbols" #else     -- ignored for compat w/ gcc:@@ -2988,80 +3049,84 @@         ------- Specific phases  --------------------------------------------     -- need to appear before -pgmL to be parsed as LLVM flags.   , make_ord_flag defFlag "pgmlo"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_lo  = (f,[])})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lo  = (f,[]) }   , make_ord_flag defFlag "pgmlc"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_lc  = (f,[])})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_lc  = (f,[]) }   , make_ord_flag defFlag "pgmi"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_i  =  f})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_i   =  f }   , make_ord_flag defFlag "pgmL"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_L   = f})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_L   = f }   , make_ord_flag defFlag "pgmP"       (hasArg setPgmP)   , make_ord_flag defFlag "pgmF"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_F   = f})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_F   = f }   , make_ord_flag defFlag "pgmc"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_c   = (f,[]),-                                              -- Don't pass -no-pie with -pgmc-                                              -- (see Trac #15319)-                                              sGccSupportsNoPie = False})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s+         { toolSettings_pgm_c   = f+         , -- Don't pass -no-pie with -pgmc+           -- (see #15319)+           toolSettings_ccSupportsNoPie = False+         }   , make_ord_flag defFlag "pgms"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_s   = (f,[])})))+      (HasArg (\_ -> addWarn "Object splitting was removed in GHC 8.8"))   , make_ord_flag defFlag "pgma"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_a   = (f,[])})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_a   = (f,[]) }   , make_ord_flag defFlag "pgml"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_l   = (f,[])})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_l   = (f,[]) }   , make_ord_flag defFlag "pgmdll"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_dll = (f,[])})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_dll = (f,[]) }   , make_ord_flag defFlag "pgmwindres"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_windres = f})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_windres = f }   , make_ord_flag defFlag "pgmlibtool"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_libtool = f})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_libtool = f }   , make_ord_flag defFlag "pgmar"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_ar = f})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_ar = f }   , make_ord_flag defFlag "pgmranlib"-      (hasArg (\f -> alterSettings (\s -> s { sPgm_ranlib = f})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_ranlib = f }       -- need to appear before -optl/-opta to be parsed as LLVM flags.   , make_ord_flag defFlag "optlo"-      (hasArg (\f -> alterSettings (\s -> s { sOpt_lo  = f : sOpt_lo s})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lo  = f : toolSettings_opt_lo s }   , make_ord_flag defFlag "optlc"-      (hasArg (\f -> alterSettings (\s -> s { sOpt_lc  = f : sOpt_lc s})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_lc  = f : toolSettings_opt_lc s }   , make_ord_flag defFlag "opti"-      (hasArg (\f -> alterSettings (\s -> s { sOpt_i   = f : sOpt_i s})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_i   = f : toolSettings_opt_i s }   , make_ord_flag defFlag "optL"-      (hasArg (\f -> alterSettings (\s -> s { sOpt_L   = f : sOpt_L s})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_L   = f : toolSettings_opt_L s }   , make_ord_flag defFlag "optP"       (hasArg addOptP)   , make_ord_flag defFlag "optF"-      (hasArg (\f -> alterSettings (\s -> s { sOpt_F   = f : sOpt_F s})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_F   = f : toolSettings_opt_F s }   , make_ord_flag defFlag "optc"       (hasArg addOptc)+  , make_ord_flag defFlag "optcxx"+      (hasArg addOptcxx)   , make_ord_flag defFlag "opta"-      (hasArg (\f -> alterSettings (\s -> s { sOpt_a   = f : sOpt_a s})))+      $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_opt_a   = f : toolSettings_opt_a s }   , make_ord_flag defFlag "optl"       (hasArg addOptl)   , make_ord_flag defFlag "optwindres"-      (hasArg (\f ->-        alterSettings (\s -> s { sOpt_windres = f : sOpt_windres s})))+      $ hasArg $ \f ->+        alterToolSettings $ \s -> s { toolSettings_opt_windres = f : toolSettings_opt_windres s }    , make_ord_flag defGhcFlag "split-objs"-      (NoArg (if can_split-                then setGeneralFlag Opt_SplitObjs-                else addWarn "ignoring -split-objs"))+      (NoArg $ addWarn "ignoring -split-objs")    , make_ord_flag defGhcFlag "split-sections"       (noArgM (\dflags -> do         if platformHasSubsectionsViaSymbols (targetPlatform dflags)-          then do addErr $+          then do addWarn $                     "-split-sections is not useful on this platform " ++-                    "since it always uses subsections via symbols."+                    "since it always uses subsections via symbols. Ignoring."                   return dflags           else return (gopt_set dflags Opt_SplitSections)))          -------- ghc -M -----------------------------------------------------   , make_ord_flag defGhcFlag "dep-suffix"              (hasArg addDepSuffix)   , make_ord_flag defGhcFlag "dep-makefile"            (hasArg setDepMakefile)+  , make_ord_flag defGhcFlag "include-cpp-deps"+        (noArg (setDepIncludeCppDeps True))   , make_ord_flag defGhcFlag "include-pkg-deps"         (noArg (setDepIncludePkgDeps True))   , make_ord_flag defGhcFlag "exclude-module"          (hasArg addDepExcludeMod)@@ -3252,6 +3317,8 @@         (setDumpFlag Opt_D_dump_cmm_raw)   , make_ord_flag defGhcFlag "ddump-cmm-verbose"         (setDumpFlag Opt_D_dump_cmm_verbose)+  , make_ord_flag defGhcFlag "ddump-cmm-verbose-by-proc"+        (setDumpFlag Opt_D_dump_cmm_verbose_by_proc)   , make_ord_flag defGhcFlag "ddump-cmm-cfg"         (setDumpFlag Opt_D_dump_cmm_cfg)   , make_ord_flag defGhcFlag "ddump-cmm-cbe"@@ -3332,6 +3399,10 @@         (setDumpFlag Opt_D_dump_prep)   , make_ord_flag defGhcFlag "ddump-stg"         (setDumpFlag Opt_D_dump_stg)+  , make_ord_flag defGhcFlag "ddump-stg-unarised"+        (setDumpFlag Opt_D_dump_stg_unarised)+  , make_ord_flag defGhcFlag "ddump-stg-final"+        (setDumpFlag Opt_D_dump_stg_final)   , make_ord_flag defGhcFlag "ddump-call-arity"         (setDumpFlag Opt_D_dump_call_arity)   , make_ord_flag defGhcFlag "ddump-exitify"@@ -3354,8 +3425,6 @@         (setDumpFlag Opt_D_dump_worker_wrapper)   , make_ord_flag defGhcFlag "ddump-rn-trace"         (setDumpFlag Opt_D_dump_rn_trace)-  , make_ord_flag defGhcFlag "ddump-shape"-        (setDumpFlag Opt_D_dump_shape)   , make_ord_flag defGhcFlag "ddump-if-trace"         (setDumpFlag Opt_D_dump_if_trace)   , make_ord_flag defGhcFlag "ddump-cs-trace"@@ -3426,6 +3495,8 @@         (NoArg (setGeneralFlag Opt_NoLlvmMangler)) -- hidden flag   , make_ord_flag defGhcFlag "fast-llvm"         (NoArg (setGeneralFlag Opt_FastLlvm)) -- hidden flag+  , make_ord_flag defGhcFlag "dno-typeable-binds"+        (NoArg (setGeneralFlag Opt_NoTypeableBinds))   , make_ord_flag defGhcFlag "ddump-debug"         (setDumpFlag Opt_D_dump_debug)   , make_ord_flag defGhcFlag "ddump-json"@@ -3509,6 +3580,8 @@          ------ Plugin flags ------------------------------------------------   , make_ord_flag defGhcFlag "fplugin-opt" (hasArg addPluginModuleNameOption)+  , make_ord_flag defGhcFlag "fplugin-trustworthy"+      (NoArg (setGeneralFlag Opt_PluginTrustworthy))   , make_ord_flag defGhcFlag "fplugin"     (hasArg addPluginModuleName)   , make_ord_flag defGhcFlag "fclear-plugins" (noArg clearPluginModuleNames)   , make_ord_flag defGhcFlag "ffrontend-opt" (hasArg addFrontendPluginOption)@@ -3520,6 +3593,8 @@                                                 setOptLevel (mb_n `orElse` 1)))                 -- If the number is missing, use 1 +  , make_ord_flag defFlag "fbinary-blob-threshold"+      (intSuffix (\n d -> d { binBlobThreshold = fromIntegral n }))    , make_ord_flag defFlag "fmax-relevant-binds"       (intSuffix (\n d -> d { maxRelevantBinds = Just n }))@@ -3544,12 +3619,16 @@             "vectors registers are now passed in registers by default."   , make_ord_flag defFlag "fmax-uncovered-patterns"       (intSuffix (\n d -> d { maxUncoveredPatterns = n }))+  , make_ord_flag defFlag "fmax-pmcheck-models"+      (intSuffix (\n d -> d { maxPmCheckModels = n }))   , make_ord_flag defFlag "fsimplifier-phases"       (intSuffix (\n d -> d { simplPhases = n }))   , make_ord_flag defFlag "fmax-simplifier-iterations"       (intSuffix (\n d -> d { maxSimplIterations = n }))-  , make_ord_flag defFlag "fmax-pmcheck-iterations"-      (intSuffix (\n d -> d{ maxPmCheckIterations = n }))+  , (Deprecated, defFlag "fmax-pmcheck-iterations"+      (intSuffixM (\_ d ->+       do { deprecate $ "use -fmax-pmcheck-models instead"+          ; return d })))   , make_ord_flag defFlag "fsimpl-tick-factor"       (intSuffix (\n d -> d { simplTickFactor = n }))   , make_ord_flag defFlag "fspec-constr-threshold"@@ -3680,9 +3759,14 @@    , make_ord_flag defFlag "fno-code"         (NoArg ((upd $ \d ->                   d { ghcLink=NoLink }) >> setTarget HscNothing))-  , make_ord_flag defFlag "fbyte-code"       (NoArg (setTarget HscInterpreted))-  , make_ord_flag defFlag "fobject-code"     (NoArg (setTargetWithPlatform-                                                             defaultHscTarget))+  , make_ord_flag defFlag "fbyte-code"+      (noArgM $ \dflags -> do+        setTarget HscInterpreted+        pure $ gopt_set dflags Opt_ByteCode)+  , make_ord_flag defFlag "fobject-code"     $ NoArg $ do+      dflags <- liftEwM getCmdLineState+      setTarget $ defaultObjectTarget dflags+   , make_dep_flag defFlag "fglasgow-exts"       (NoArg enableGlasgowExts) "Use individual extensions instead"   , make_dep_flag defFlag "fno-glasgow-exts"@@ -3698,6 +3782,8 @@   , make_ord_flag defFlag "fno-safe-infer"   (noArg (\d ->                                                     d { safeInfer = False }))   , make_ord_flag defFlag "fno-safe-haskell" (NoArg (setSafeHaskell Sf_Ignore))++        ------ position independent flags  ----------------------------------   , make_ord_flag defGhcFlag "fPIC"          (NoArg (setGeneralFlag Opt_PIC))   , make_ord_flag defGhcFlag "fno-PIC"       (NoArg (unSetGeneralFlag Opt_PIC))   , make_ord_flag defGhcFlag "fPIE"          (NoArg (setGeneralFlag Opt_PIC))@@ -3748,7 +3834,7 @@                   "-XDeriveGeneric for generic programming support.") ]  -- | This is where we handle unrecognised warning flags. We only issue a warning--- if -Wunrecognised-warning-flags is set. See Trac #11429 for context.+-- if -Wunrecognised-warning-flags is set. See #11429 for context. unrecognisedWarning :: String -> Flag (CmdLineP DynFlags) unrecognisedWarning prefix = defHiddenFlag prefix (Prefix action)   where@@ -3966,6 +4052,7 @@                                          Opt_WarnDeferredOutOfScopeVariables,   flagSpec "deprecations"                Opt_WarnWarningsDeprecations,   flagSpec "deprecated-flags"            Opt_WarnDeprecatedFlags,+  flagSpec "deriving-defaults"           Opt_WarnDerivingDefaults,   flagSpec "deriving-typeable"           Opt_WarnDerivingTypeable,   flagSpec "dodgy-exports"               Opt_WarnDodgyExports,   flagSpec "dodgy-foreign-imports"       Opt_WarnDodgyForeignImports,@@ -3975,10 +4062,12 @@     "it is subsumed by -Wredundant-constraints",   flagSpec "redundant-constraints"       Opt_WarnRedundantConstraints,   flagSpec "duplicate-exports"           Opt_WarnDuplicateExports,-  flagSpec "hi-shadowing"                Opt_WarnHiShadows,+  depFlagSpec "hi-shadowing"                Opt_WarnHiShadows+    "it is not used, and was never implemented",   flagSpec "inaccessible-code"           Opt_WarnInaccessibleCode,   flagSpec "implicit-prelude"            Opt_WarnImplicitPrelude,-  flagSpec "implicit-kind-vars"          Opt_WarnImplicitKindVars,+  depFlagSpec "implicit-kind-vars"       Opt_WarnImplicitKindVars+    "it is now an error",   flagSpec "incomplete-patterns"         Opt_WarnIncompletePatterns,   flagSpec "incomplete-record-updates"   Opt_WarnIncompletePatternsRecUpd,   flagSpec "incomplete-uni-patterns"     Opt_WarnIncompleteUniPatterns,@@ -4015,6 +4104,8 @@   flagSpec "all-missed-specializations"  Opt_WarnAllMissedSpecs,   flagSpec' "safe"                       Opt_WarnSafe setWarnSafe,   flagSpec "trustworthy-safe"            Opt_WarnTrustworthySafe,+  flagSpec "inferred-safe-imports"       Opt_WarnInferredSafeImports,+  flagSpec "missing-safe-haskell-mode"   Opt_WarnMissingSafeHaskellMode,   flagSpec "tabs"                        Opt_WarnTabs,   flagSpec "type-defaults"               Opt_WarnTypeDefaults,   flagSpec "typed-holes"                 Opt_WarnTypedHoles,@@ -4035,6 +4126,8 @@   flagSpec "unused-pattern-binds"        Opt_WarnUnusedPatternBinds,   flagSpec "unused-top-binds"            Opt_WarnUnusedTopBinds,   flagSpec "unused-type-patterns"        Opt_WarnUnusedTypePatterns,+  flagSpec "unused-record-wildcards"     Opt_WarnUnusedRecordWildcards,+  flagSpec "redundant-record-wildcards"  Opt_WarnRedundantRecordWildcards,   flagSpec "warnings-deprecations"       Opt_WarnWarningsDeprecations,   flagSpec "wrong-do-bind"               Opt_WarnWrongDoBind,   flagSpec "missing-pattern-synonym-signatures"@@ -4046,7 +4139,12 @@   flagSpec "star-binder"                 Opt_WarnStarBinder,   flagSpec "star-is-type"                Opt_WarnStarIsType,   flagSpec "missing-space-after-bang"    Opt_WarnSpaceAfterBang,-  flagSpec "partial-fields"              Opt_WarnPartialFields ]+  flagSpec "partial-fields"              Opt_WarnPartialFields,+  flagSpec "prepositive-qualified-module"+                                         Opt_WarnPrepositiveQualifiedModule,+  flagSpec "unused-packages"             Opt_WarnUnusedPackages,+  flagSpec "compat-unqualified-imports"  Opt_WarnCompatUnqualifiedImports+ ]  -- | These @-\<blah\>@ flags can all be reversed with @-no-\<blah\>@ negatableFlagsDeps :: [(Deprecation, FlagSpec GeneralFlag)]@@ -4100,6 +4198,7 @@   flagSpec "stg-cse"                          Opt_StgCSE,   flagSpec "stg-lift-lams"                    Opt_StgLiftLams,   flagSpec "cpr-anal"                         Opt_CprAnal,+  flagSpec "defer-diagnostics"                Opt_DeferDiagnostics,   flagSpec "defer-type-errors"                Opt_DeferTypeErrors,   flagSpec "defer-typed-holes"                Opt_DeferTypedHoles,   flagSpec "defer-out-of-scope-variables"     Opt_DeferOutOfScopeVariables,@@ -4112,6 +4211,7 @@   flagSpec "eager-blackholing"                Opt_EagerBlackHoling,   flagSpec "embed-manifest"                   Opt_EmbedManifest,   flagSpec "enable-rewrite-rules"             Opt_EnableRewriteRules,+  flagSpec "enable-th-splice-warnings"        Opt_EnableThSpliceWarnings,   flagSpec "error-spans"                      Opt_ErrorSpans,   flagSpec "excess-precision"                 Opt_ExcessPrecision,   flagSpec "expose-all-unfoldings"            Opt_ExposeAllUnfoldings,@@ -4137,6 +4237,7 @@   flagSpec "ignore-interface-pragmas"         Opt_IgnoreInterfacePragmas,   flagGhciSpec "implicit-import-qualified"    Opt_ImplicitImportQualified,   flagSpec "irrefutable-tuples"               Opt_IrrefutableTuples,+  flagSpec "keep-going"                       Opt_KeepGoing,   flagSpec "kill-absence"                     Opt_KillAbsence,   flagSpec "kill-one-shot"                    Opt_KillOneShot,   flagSpec "late-dmd-anal"                    Opt_LateDmdAnal,@@ -4160,6 +4261,7 @@   flagSpec "print-explicit-coercions"         Opt_PrintExplicitCoercions,   flagSpec "print-explicit-runtime-reps"      Opt_PrintExplicitRuntimeReps,   flagSpec "print-equality-relations"         Opt_PrintEqualityRelations,+  flagSpec "print-axiom-incomps"              Opt_PrintAxiomIncomps,   flagSpec "print-unicode-syntax"             Opt_PrintUnicodeSyntax,   flagSpec "print-expanded-synonyms"          Opt_PrintExpandedSynonyms,   flagSpec "print-potential-instances"        Opt_PrintPotentialInstances,@@ -4270,18 +4372,25 @@ supportedLanguageOverlays :: [String] supportedLanguageOverlays = map (flagSpecName . snd) safeHaskellFlagsDeps -supportedExtensions :: [String]-supportedExtensions = concatMap toFlagSpecNamePair xFlags+supportedExtensions :: PlatformMini -> [String]+supportedExtensions targetPlatformMini = concatMap toFlagSpecNamePair xFlags   where     toFlagSpecNamePair flg+      -- IMPORTANT! Make sure that `ghc --supported-extensions` omits+      -- "TemplateHaskell"/"QuasiQuotes" when it's known not to work out of the+      -- box. See also GHC #11102 and #16331 for more details about+      -- the rationale+      | isAIX, flagSpecFlag flg == LangExt.TemplateHaskell  = [noName]+      | isAIX, flagSpecFlag flg == LangExt.QuasiQuotes      = [noName]       | otherwise = [name, noName]       where+        isAIX = platformMini_os targetPlatformMini == OSAIX         noName = "No" ++ name         name = flagSpecName flg -supportedLanguagesAndExtensions :: [String]-supportedLanguagesAndExtensions =-    supportedLanguages ++ supportedLanguageOverlays ++ supportedExtensions+supportedLanguagesAndExtensions :: PlatformMini -> [String]+supportedLanguagesAndExtensions targetPlatformMini =+    supportedLanguages ++ supportedLanguageOverlays ++ supportedExtensions targetPlatformMini  -- | These -X<blah> flags cannot be reversed with -XNo<blah> languageFlagsDeps :: [(Deprecation, FlagSpec Language)]@@ -4320,6 +4429,7 @@   flagSpec "BinaryLiterals"                   LangExt.BinaryLiterals,   flagSpec "CApiFFI"                          LangExt.CApiFFI,   flagSpec "CPP"                              LangExt.Cpp,+  flagSpec "CUSKs"                            LangExt.CUSKs,   flagSpec "ConstrainedClassMethods"          LangExt.ConstrainedClassMethods,   flagSpec "ConstraintKinds"                  LangExt.ConstraintKinds,   flagSpec "DataKinds"                        LangExt.DataKinds,@@ -4363,6 +4473,7 @@                                               setGenDeriving,   flagSpec "ImplicitParams"                   LangExt.ImplicitParams,   flagSpec "ImplicitPrelude"                  LangExt.ImplicitPrelude,+  flagSpec "ImportQualifiedPost"              LangExt.ImportQualifiedPost,   flagSpec "ImpredicativeTypes"               LangExt.ImpredicativeTypes,   flagSpec' "IncoherentInstances"             LangExt.IncoherentInstances                                               setIncoherentInsts,@@ -4435,6 +4546,7 @@   flagSpec' "TemplateHaskell"                 LangExt.TemplateHaskell                                               checkTemplateHaskellOk,   flagSpec "TemplateHaskellQuotes"            LangExt.TemplateHaskellQuotes,+  flagSpec "StandaloneKindSignatures"         LangExt.StandaloneKindSignatures,   flagSpec "TraditionalRecordSyntax"          LangExt.TraditionalRecordSyntax,   flagSpec "TransformListComp"                LangExt.TransformListComp,   flagSpec "TupleSections"                    LangExt.TupleSections,@@ -4449,6 +4561,7 @@   flagSpec "UndecidableSuperClasses"          LangExt.UndecidableSuperClasses,   flagSpec "UnicodeSyntax"                    LangExt.UnicodeSyntax,   flagSpec "UnliftedFFITypes"                 LangExt.UnliftedFFITypes,+  flagSpec "UnliftedNewtypes"                 LangExt.UnliftedNewtypes,   flagSpec "ViewPatterns"                     LangExt.ViewPatterns   ] @@ -4542,7 +4655,7 @@     , (LangExt.ExistentialQuantification, turnOn, LangExt.ExplicitForAll)     , (LangExt.FlexibleInstances,         turnOn, LangExt.TypeSynonymInstances)     , (LangExt.FunctionalDependencies,    turnOn, LangExt.MultiParamTypeClasses)-    , (LangExt.MultiParamTypeClasses,     turnOn, LangExt.ConstrainedClassMethods)  -- c.f. Trac #7854+    , (LangExt.MultiParamTypeClasses,     turnOn, LangExt.ConstrainedClassMethods)  -- c.f. #7854     , (LangExt.TypeFamilyDependencies,    turnOn, LangExt.TypeFamilies)      , (LangExt.RebindableSyntax, turnOff, LangExt.ImplicitPrelude)      -- NB: turn off!@@ -4561,6 +4674,9 @@     , (LangExt.TypeInType,       turnOn, LangExt.PolyKinds)     , (LangExt.TypeInType,       turnOn, LangExt.KindSignatures) +    -- Standalone kind signatures are a replacement for CUSKs.+    , (LangExt.StandaloneKindSignatures, turnOff, LangExt.CUSKs)+     -- AutoDeriveTypeable is not very useful without DeriveDataTypeable     , (LangExt.AutoDeriveTypeable, turnOn, LangExt.DeriveDataTypeable) @@ -4660,7 +4776,7 @@  {- Note [Eta-reduction in -O0] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Trac #11562 showed an example which tripped an ASSERT in CoreToStg; a+#11562 showed an example which tripped an ASSERT in CoreToStg; a function was marked as MayHaveCafRefs when in fact it obviously didn't.  Reason was:  * Eta reduction wasn't happening in the simplifier, but it was@@ -4741,6 +4857,7 @@         Opt_WarnPartialTypeSignatures,         Opt_WarnUnrecognisedPragmas,         Opt_WarnDuplicateExports,+        Opt_WarnDerivingDefaults,         Opt_WarnOverflowedLiterals,         Opt_WarnEmptyEnumerations,         Opt_WarnMissingFields,@@ -4788,7 +4905,9 @@         Opt_WarnUnusedDoBind,         Opt_WarnTrustworthySafe,         Opt_WarnUntickedPromotedConstructors,-        Opt_WarnMissingPatternSynonymSignatures+        Opt_WarnMissingPatternSynonymSignatures,+        Opt_WarnUnusedRecordWildcards,+        Opt_WarnRedundantRecordWildcards       ]  -- | Things you get with -Weverything, i.e. *all* known warnings flags@@ -4805,8 +4924,8 @@     = [ Opt_WarnMissingMonadFailInstances       , Opt_WarnSemigroup       , Opt_WarnNonCanonicalMonoidInstances-      , Opt_WarnImplicitKindVars       , Opt_WarnStarIsType+      , Opt_WarnCompatUnqualifiedImports       ]  enableUnusedBinds :: DynP ()@@ -5038,9 +5157,12 @@    --      (except for -fno-glasgow-exts, which is treated specially)  ---------------------------alterSettings :: (Settings -> Settings) -> DynFlags -> DynFlags-alterSettings f dflags = dflags { settings = f (settings dflags) }+alterFileSettings :: (FileSettings -> FileSettings) -> DynFlags -> DynFlags+alterFileSettings f dynFlags = dynFlags { fileSettings = f (fileSettings dynFlags) } +alterToolSettings :: (ToolSettings -> ToolSettings) -> DynFlags -> DynFlags+alterToolSettings f dynFlags = dynFlags { toolSettings = f (toolSettings dynFlags) }+ -------------------------- setDumpFlag' :: DumpFlag -> DynP () setDumpFlag' dump_flag@@ -5179,182 +5301,13 @@                       then canonicalizeHomeModule dflags (moduleName mod)                       else mod ---- -------------------------------------------------------------------------------- | Find the package environment (if one exists)------ We interpret the package environment as a set of package flags; to be--- specific, if we find a package environment file like------ > clear-package-db--- > global-package-db--- > package-db blah/package.conf.d--- > package-id id1--- > package-id id2------ we interpret this as------ > [ -hide-all-packages--- > , -clear-package-db--- > , -global-package-db--- > , -package-db blah/package.conf.d--- > , -package-id id1--- > , -package-id id2--- > ]------ There's also an older syntax alias for package-id, which is just an--- unadorned package id------ > id1--- > id2----interpretPackageEnv :: DynFlags -> IO DynFlags-interpretPackageEnv dflags = do-    mPkgEnv <- runMaybeT $ msum $ [-                   getCmdLineArg >>= \env -> msum [-                       probeNullEnv env-                     , probeEnvFile env-                     , probeEnvName env-                     , cmdLineError env-                     ]-                 , getEnvVar >>= \env -> msum [-                       probeNullEnv env-                     , probeEnvFile env-                     , probeEnvName env-                     , envError     env-                     ]-                 , notIfHideAllPackages >> msum [-                       findLocalEnvFile >>= probeEnvFile-                     , probeEnvName defaultEnvName-                     ]-                 ]-    case mPkgEnv of-      Nothing ->-        -- No environment found. Leave DynFlags unchanged.-        return dflags-      Just "-" -> do-        -- Explicitly disabled environment file. Leave DynFlags unchanged.-        return dflags-      Just envfile -> do-        content <- readFile envfile-        putLogMsg dflags NoReason SevInfo noSrcSpan-             (defaultUserStyle dflags)-             (text ("Loaded package environment from " ++ envfile))-        let setFlags :: DynP ()-            setFlags = do-              setGeneralFlag Opt_HideAllPackages-              parseEnvFile envfile content--            (_, dflags') = runCmdLine (runEwM setFlags) dflags--        return dflags'-  where-    -- Loading environments (by name or by location)--    namedEnvPath :: String -> MaybeT IO FilePath-    namedEnvPath name = do-     appdir <- versionedAppDir dflags-     return $ appdir </> "environments" </> name--    probeEnvName :: String -> MaybeT IO FilePath-    probeEnvName name = probeEnvFile =<< namedEnvPath name--    probeEnvFile :: FilePath -> MaybeT IO FilePath-    probeEnvFile path = do-      guard =<< liftMaybeT (doesFileExist path)-      return path--    probeNullEnv :: FilePath -> MaybeT IO FilePath-    probeNullEnv "-" = return "-"-    probeNullEnv _   = mzero--    parseEnvFile :: FilePath -> String -> DynP ()-    parseEnvFile envfile = mapM_ parseEntry . lines-      where-        parseEntry str = case words str of-          ("package-db": _)     -> addPkgConfRef (PkgConfFile (envdir </> db))-            -- relative package dbs are interpreted relative to the env file-            where envdir = takeDirectory envfile-                  db     = drop 11 str-          ["clear-package-db"]  -> clearPkgConf-          ["global-package-db"] -> addPkgConfRef GlobalPkgConf-          ["user-package-db"]   -> addPkgConfRef UserPkgConf-          ["package-id", pkgid] -> exposePackageId pkgid-          (('-':'-':_):_)       -> return () -- comments-          -- and the original syntax introduced in 7.10:-          [pkgid]               -> exposePackageId pkgid-          []                    -> return ()-          _                     -> throwGhcException $ CmdLineError $-                                        "Can't parse environment file entry: "-                                     ++ envfile ++ ": " ++ str--    -- Various ways to define which environment to use--    getCmdLineArg :: MaybeT IO String-    getCmdLineArg = MaybeT $ return $ packageEnv dflags--    getEnvVar :: MaybeT IO String-    getEnvVar = do-      mvar <- liftMaybeT $ try $ getEnv "GHC_ENVIRONMENT"-      case mvar of-        Right var -> return var-        Left err  -> if isDoesNotExistError err then mzero-                                                else liftMaybeT $ throwIO err--    notIfHideAllPackages :: MaybeT IO ()-    notIfHideAllPackages =-      guard (not (gopt Opt_HideAllPackages dflags))--    defaultEnvName :: String-    defaultEnvName = "default"--    -- e.g. .ghc.environment.x86_64-linux-7.6.3-    localEnvFileName :: FilePath-    localEnvFileName = ".ghc.environment" <.> versionedFilePath dflags--    -- Search for an env file, starting in the current dir and looking upwards.-    -- Fail if we get to the users home dir or the filesystem root. That is,-    -- we don't look for an env file in the user's home dir. The user-wide-    -- env lives in ghc's versionedAppDir/environments/default-    findLocalEnvFile :: MaybeT IO FilePath-    findLocalEnvFile = do-        curdir  <- liftMaybeT getCurrentDirectory-        homedir <- tryMaybeT getHomeDirectory-        let probe dir | isDrive dir || dir == homedir-                      = mzero-            probe dir = do-              let file = dir </> localEnvFileName-              exists <- liftMaybeT (doesFileExist file)-              if exists-                then return file-                else probe (takeDirectory dir)-        probe curdir--    -- Error reporting--    cmdLineError :: String -> MaybeT IO a-    cmdLineError env = liftMaybeT . throwGhcExceptionIO . CmdLineError $-      "Package environment " ++ show env ++ " not found"--    envError :: String -> MaybeT IO a-    envError env = liftMaybeT . throwGhcExceptionIO . CmdLineError $-         "Package environment "-      ++ show env-      ++ " (specified in GHC_ENVIRONMENT) not found"-- -- If we're linking a binary, then only targets that produce object -- code are allowed (requests for other target types are ignored). setTarget :: HscTarget -> DynP ()-setTarget l = setTargetWithPlatform (const l)--setTargetWithPlatform :: (Platform -> HscTarget) -> DynP ()-setTargetWithPlatform f = upd set-  where-   set dfs = let l = f (targetPlatform dfs)-             in if ghcLink dfs /= LinkBinary || isObjectTarget l-                then dfs{ hscTarget = l }-                else dfs+setTarget l = upd $ \ dfs ->+  if ghcLink dfs /= LinkBinary || isObjectTarget l+  then dfs{ hscTarget = l }+  else dfs  -- Changes the target only if we're compiling object code.  This is -- used by -fasm and -fllvm, which switch from one to the other, but@@ -5396,6 +5349,35 @@ addLdInputs :: Option -> DynFlags -> DynFlags addLdInputs p dflags = dflags{ldInputs = ldInputs dflags ++ [p]} +-- -----------------------------------------------------------------------------+-- Load dynflags from environment files.++setFlagsFromEnvFile :: FilePath -> String -> DynP ()+setFlagsFromEnvFile envfile content = do+  setGeneralFlag Opt_HideAllPackages+  parseEnvFile envfile content++parseEnvFile :: FilePath -> String -> DynP ()+parseEnvFile envfile = mapM_ parseEntry . lines+  where+    parseEntry str = case words str of+      ("package-db": _)     -> addPkgConfRef (PkgConfFile (envdir </> db))+        -- relative package dbs are interpreted relative to the env file+        where envdir = takeDirectory envfile+              db     = drop 11 str+      ["clear-package-db"]  -> clearPkgConf+      ["global-package-db"] -> addPkgConfRef GlobalPkgConf+      ["user-package-db"]   -> addPkgConfRef UserPkgConf+      ["package-id", pkgid] -> exposePackageId pkgid+      (('-':'-':_):_)       -> return () -- comments+      -- and the original syntax introduced in 7.10:+      [pkgid]               -> exposePackageId pkgid+      []                    -> return ()+      _                     -> throwGhcException $ CmdLineError $+                                    "Can't parse environment file entry: "+                                 ++ envfile ++ ": " ++ str++ ----------------------------------------------------------------------------- -- Paths & Libraries @@ -5415,7 +5397,7 @@ addFrameworkPath p =   upd (\s -> s{frameworkPaths = frameworkPaths s ++ splitPathList p}) -#if !defined(mingw32_TARGET_OS)+#if !defined(mingw32_HOST_OS) split_marker :: Char split_marker = ':'   -- not configurable (ToDo) #endif@@ -5427,7 +5409,7 @@                 -- cause confusion when they are translated into -I options                 -- for passing to gcc.   where-#if !defined(mingw32_TARGET_OS)+#if !defined(mingw32_HOST_OS)     splitUp xs = split split_marker xs #else      -- Windows: 'hybrid' support for DOS-style paths in directory lists.@@ -5476,7 +5458,7 @@ -- tmpDir, where we store temporary files.  setTmpDir :: FilePath -> DynFlags -> DynFlags-setTmpDir dir = alterSettings (\s -> s { sTmpDir = normalise dir })+setTmpDir dir = alterFileSettings $ \s -> s { fileSettings_tmpDir = normalise dir }   -- we used to fix /cygdrive/c/.. on Windows, but this doesn't   -- seem necessary now --SDM 7/2/2008 @@ -5533,17 +5515,17 @@       -- otherwise things like stub.c files don't get compiled       -- correctly.  They need to reference data in the Haskell       -- objects, but can't without -fPIC.  See-      -- http://ghc.haskell.org/trac/ghc/wiki/Commentary/PositionIndependentCode+      -- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/position-independent-code        | gopt Opt_PIC dflags || WayDyn `elem` ways dflags ->           ["-fPIC", "-U__PIC__", "-D__PIC__"]       -- gcc may be configured to have PIC on by default, let's be-      -- explicit here, see Trac #15847+      -- explicit here, see #15847        | otherwise -> ["-fno-PIC"]      pieOpts       | gopt Opt_PICExecutable dflags       = ["-pie"]         -- See Note [No PIE when linking]-      | sGccSupportsNoPie (settings dflags) = ["-no-pie"]+      | toolSettings_ccSupportsNoPie (toolSettings dflags) = ["-no-pie"]       | otherwise                           = []  @@ -5563,12 +5545,6 @@  | otherwise           = []  -- -------------------------------------------------------------------------------- Splitting--can_split :: Bool-can_split = cSupportsSplitObjs == "YES"---- ----------------------------------------------------------------------------- -- Compiler Info  compilerInfo :: DynFlags -> [(String, String)]@@ -5588,14 +5564,10 @@        ("Stage",                       cStage),        ("Build platform",              cBuildPlatformString),        ("Host platform",               cHostPlatformString),-       ("Target platform",             cTargetPlatformString),-       ("Have interpreter",            cGhcWithInterpreter),-       ("Object splitting supported",  cSupportsSplitObjs),-       ("Have native code generator",  cGhcWithNativeCodeGen),-       ("Support SMP",                 cGhcWithSMP),-       ("Tables next to code",         cGhcEnableTablesNextToCode),-       ("RTS ways",                    cGhcRTSWays),-       ("RTS expects libdw",           showBool cGhcRtsWithLibdw),+       ("Target platform",             platformMisc_targetPlatformString $ platformMisc dflags),+       ("Have interpreter",            showBool $ platformMisc_ghcWithInterpreter $ platformMisc dflags),+       ("Object splitting supported",  showBool False),+       ("Have native code generator",  showBool $ platformMisc_ghcWithNativeCodeGen $ platformMisc dflags),        -- Whether or not we support @-dynamic-too@        ("Support dynamic-too",         showBool $ not isWindows),        -- Whether or not we support the @-j@ flag with @--make@.@@ -5622,8 +5594,7 @@        ("GHC Dynamic",                 showBool dynamicGhc),        -- Whether or not GHC was compiled using -prof        ("GHC Profiled",                showBool rtsIsProfiled),-       ("Leading underscore",          cLeadingUnderscore),-       ("Debug on",                    show debugIsOn),+       ("Debug on",                    showBool debugIsOn),        ("LibDir",                      topDir dflags),        -- The path of the global package database used by GHC        ("Global Package DB",           systemPackageConfig dflags)@@ -5644,6 +5615,9 @@ wORD_SIZE_IN_BITS :: DynFlags -> Int wORD_SIZE_IN_BITS dflags = wORD_SIZE dflags * 8 +wordAlignment :: DynFlags -> Alignment+wordAlignment dflags = alignmentOf (wORD_SIZE dflags)+ tAG_MASK :: DynFlags -> Int tAG_MASK dflags = (1 `shiftL` tAG_BITS dflags) - 1 @@ -5654,19 +5628,16 @@ tARGET_MIN_INT, tARGET_MAX_INT, tARGET_MAX_WORD :: DynFlags -> Integer tARGET_MIN_INT dflags     = case platformWordSize (targetPlatform dflags) of-      4 -> toInteger (minBound :: Int32)-      8 -> toInteger (minBound :: Int64)-      w -> panic ("tARGET_MIN_INT: Unknown platformWordSize: " ++ show w)+      PW4 -> toInteger (minBound :: Int32)+      PW8 -> toInteger (minBound :: Int64) tARGET_MAX_INT dflags     = case platformWordSize (targetPlatform dflags) of-      4 -> toInteger (maxBound :: Int32)-      8 -> toInteger (maxBound :: Int64)-      w -> panic ("tARGET_MAX_INT: Unknown platformWordSize: " ++ show w)+      PW4 -> toInteger (maxBound :: Int32)+      PW8 -> toInteger (maxBound :: Int64) tARGET_MAX_WORD dflags     = case platformWordSize (targetPlatform dflags) of-      4 -> toInteger (maxBound :: Word32)-      8 -> toInteger (maxBound :: Word64)-      w -> panic ("tARGET_MAX_WORD: Unknown platformWordSize: " ++ show w)+      PW4 -> toInteger (maxBound :: Word32)+      PW8 -> toInteger (maxBound :: Word64)   {- -----------------------------------------------------------------------------@@ -5710,7 +5681,7 @@       in loop dflags' warn  | hscTarget dflags == HscC &&    not (platformUnregisterised (targetPlatform dflags))-    = if cGhcWithNativeCodeGen == "YES"+    = if platformMisc_ghcWithNativeCodeGen $ platformMisc dflags       then let dflags' = dflags { hscTarget = HscAsm }                warn = "Compiler not unregisterised, so using native code generator rather than compiling via C"            in loop dflags' warn@@ -5726,7 +5697,7 @@     = loop (dflags { hscTarget = HscC })            "Compiler unregisterised, so compiling via C"  | hscTarget dflags == HscAsm &&-   cGhcWithNativeCodeGen /= "YES"+   not (platformMisc_ghcWithNativeCodeGen $ platformMisc dflags)       = let dflags' = dflags { hscTarget = HscLlvm }             warn = "No native code generator, so using LLVM"         in loop dflags' warn@@ -5773,13 +5744,12 @@ -- initialized. defaultGlobalDynFlags :: DynFlags defaultGlobalDynFlags =-    (defaultDynFlags settings (llvmTargets, llvmPasses)) { verbosity = 2 }+    (defaultDynFlags settings llvmConfig) { verbosity = 2 }   where     settings = panic "v_unsafeGlobalDynFlags: settings not initialised"-    llvmTargets = panic "v_unsafeGlobalDynFlags: llvmTargets not initialised"-    llvmPasses = panic "v_unsafeGlobalDynFlags: llvmPasses not initialised"+    llvmConfig = panic "v_unsafeGlobalDynFlags: llvmConfig not initialised" -#if STAGE < 2+#if GHC_STAGE < 2 GLOBAL_VAR(v_unsafeGlobalDynFlags, defaultGlobalDynFlags, DynFlags) #else SHARED_GLOBAL_VAR( v_unsafeGlobalDynFlags@@ -5812,19 +5782,23 @@ isSseEnabled :: DynFlags -> Bool isSseEnabled dflags = case platformArch (targetPlatform dflags) of     ArchX86_64 -> True-    ArchX86    -> sseVersion dflags >= Just SSE1+    ArchX86    -> True     _          -> False  isSse2Enabled :: DynFlags -> Bool isSse2Enabled dflags = case platformArch (targetPlatform dflags) of-    ArchX86_64 -> -- SSE2 is fixed on for x86_64.  It would be-                  -- possible to make it optional, but we'd need to-                  -- fix at least the foreign call code where the-                  -- calling convention specifies the use of xmm regs,-                  -- and possibly other places.-                  True-    ArchX86    -> sseVersion dflags >= Just SSE2+  -- We Assume  SSE1 and SSE2 operations are available on both+  -- x86 and x86_64. Historically we didn't default to SSE2 and+  -- SSE1 on x86, which results in defacto nondeterminism for how+  -- rounding behaves in the associated x87 floating point instructions+  -- because variations in the spill/fpu stack placement of arguments for+  -- operations would change the precision and final result of what+  -- would otherwise be the same expressions with respect to single or+  -- double precision IEEE floating point computations.+    ArchX86_64 -> True+    ArchX86    -> True     _          -> False+  isSse4_2Enabled :: DynFlags -> Bool isSse4_2Enabled dflags = sseVersion dflags >= Just SSE42
main/DynFlags.hs-boot view
@@ -1,7 +1,7 @@ module DynFlags where  import GhcPrelude-import Platform+import GHC.Platform  data DynFlags data DumpFlag
main/DynamicLoading.hs view
@@ -3,7 +3,6 @@ -- | Dynamically lookup up values from modules and loading them. module DynamicLoading (         initializePlugins,-#if defined(GHCI)         -- * Loading plugins         loadFrontendPlugin, @@ -19,15 +18,11 @@         getValueSafely,         getHValueSafely,         lessUnsafeCoerce-#else-        pluginError-#endif     ) where  import GhcPrelude import DynFlags -#if defined(GHCI) import Linker           ( linkModule, getHValue ) import GHCi             ( wormhole ) import SrcLoc           ( noSrcSpan )@@ -44,7 +39,8 @@  import HscTypes import GHCi.RemoteTypes ( HValue )-import Type             ( Type, eqType, mkTyConTy, pprTyThingCategory )+import Type             ( Type, eqType, mkTyConTy )+import TyCoPpr          ( pprTyThingCategory ) import TyCon            ( TyCon ) import Name             ( Name, nameModule_maybe ) import Id               ( idType )@@ -60,28 +56,11 @@ import Data.Maybe        ( mapMaybe ) import GHC.Exts          ( unsafeCoerce# ) -#else--import HscTypes         ( HscEnv )-import Module           ( ModuleName, moduleNameString )-import Panic--import Data.List        ( intercalate )-import Control.Monad    ( unless )--#endif- -- | Loads the plugins specified in the pluginModNames field of the dynamic -- flags. Should be called after command line arguments are parsed, but before -- actual compilation starts. Idempotent operation. Should be re-called if -- pluginModNames or pluginModNameOpts changes. initializePlugins :: HscEnv -> DynFlags -> IO DynFlags-#if !defined(GHCI)-initializePlugins _ df-  = do let pluginMods = pluginModNames df-       unless (null pluginMods) (pluginError pluginMods)-       return df-#else initializePlugins hsc_env df   | map lpModuleName (cachedPlugins df)          == pluginModNames df -- plugins not changed@@ -91,12 +70,12 @@   = return df -- no need to reload plugins   | otherwise   = do loadedPlugins <- loadPlugins (hsc_env { hsc_dflags = df })-       return $ df { cachedPlugins = loadedPlugins }-  where argumentsForPlugin p = map snd . filter ((== lpModuleName p) . fst)-#endif-+       let df' = df { cachedPlugins = loadedPlugins }+       df'' <- withPlugins df' runDflagsPlugin df'+       return df'' -#if defined(GHCI)+  where argumentsForPlugin p = map snd . filter ((== lpModuleName p) . fst)+        runDflagsPlugin p opts dynflags = dynflagsPlugin p opts dynflags  loadPlugins :: HscEnv -> IO [LoadedPlugin] loadPlugins hsc_env@@ -302,15 +281,3 @@  throwCmdLineError :: String -> IO a throwCmdLineError = throwGhcExceptionIO . CmdLineError--#else--pluginError :: [ModuleName] -> a-pluginError modnames = throwGhcException (CmdLineError msg)-  where-    msg = "not built for interactive use - can't load plugins ("-            -- module names are not z-encoded-          ++ intercalate ", " (map moduleNameString modnames)-          ++ ")"--#endif
main/ErrUtils.hs view
@@ -22,6 +22,7 @@         errMsgSpan, errMsgContext,         errorsFound, isEmptyMessages,         isWarnMsgFatal,+        warningsToMessages,          -- ** Formatting         pprMessageBag, pprErrMsgBagWithLoc,@@ -49,7 +50,8 @@         errorMsg, warningMsg,         fatalErrorMsg, fatalErrorMsg'',         compilationProgressMsg,-        showPass, withTiming,+        showPass,+        withTiming, withTimingSilent, withTimingD, withTimingSilentD,         debugTraceMsg,         ghcExit,         prettyPrintGhcErrors,@@ -360,6 +362,15 @@ errorsFound :: DynFlags -> Messages -> Bool errorsFound _dflags (_warns, errs) = not (isEmptyBag errs) +warningsToMessages :: DynFlags -> WarningMessages -> Messages+warningsToMessages dflags =+  partitionBagWith $ \warn ->+    case isWarnMsgFatal dflags warn of+      Nothing -> Left warn+      Just err_reason ->+        Right warn{ errMsgSeverity = SevError+                  , errMsgReason = ErrReason err_reason }+ printBagOfErrors :: DynFlags -> Bag ErrMsg -> IO () printBagOfErrors dflags bag_of_errors   = sequence_ [ let style = mkErrStyle dflags unqual@@ -476,7 +487,7 @@             -- We do not want the dump file to be affected by             -- environment variables, but instead to always use             -- UTF8. See:-            -- https://ghc.haskell.org/trac/ghc/ticket/10762+            -- https://gitlab.haskell.org/ghc/ghc/issues/10762             hSetEncoding handle utf8              action (Just handle)@@ -609,11 +620,15 @@   = ifVerbose dflags 2 $     logInfo dflags (defaultUserStyle dflags) (text "***" <+> text what <> colon) +data PrintTimings = PrintTimings | DontPrintTimings+  deriving (Eq, Show)+ -- | Time a compilation phase. -- -- When timings are enabled (e.g. with the @-v2@ flag), the allocations -- and CPU time used by the phase will be reported to stderr. Consider--- a typical usage: @withTiming getDynFlags (text "simplify") force pass@.+-- a typical usage:+-- @withTiming getDynFlags (text "simplify") force PrintTimings pass@. -- When timings are enabled the following costs are included in the -- produced accounting, --@@ -630,32 +645,89 @@ -- -- To avoid adversely affecting compiler performance when timings are not -- requested, the result is only forced when timings are enabled.+--+-- See Note [withTiming] for more. withTiming :: MonadIO m-           => m DynFlags  -- ^ A means of getting a 'DynFlags' (often-                          -- 'getDynFlags' will work here)-           -> SDoc        -- ^ The name of the phase-           -> (a -> ())   -- ^ A function to force the result-                          -- (often either @const ()@ or 'rnf')-           -> m a         -- ^ The body of the phase to be timed+           => DynFlags     -- ^ DynFlags+           -> SDoc         -- ^ The name of the phase+           -> (a -> ())    -- ^ A function to force the result+                           -- (often either @const ()@ or 'rnf')+           -> m a          -- ^ The body of the phase to be timed            -> m a-withTiming getDFlags what force_result action-  = do dflags <- getDFlags-       if verbosity dflags >= 2 || dopt Opt_D_dump_timings dflags-          then do liftIO $ logInfo dflags (defaultUserStyle dflags)-                         $ text "***" <+> what <> colon-                  liftIO $ traceEventIO $ showSDocOneLine dflags $ text "GHC:started:" <+> what+withTiming dflags what force action =+  withTiming' dflags what force PrintTimings action++-- | Like withTiming but get DynFlags from the Monad.+withTimingD :: (MonadIO m, HasDynFlags m)+           => SDoc         -- ^ The name of the phase+           -> (a -> ())    -- ^ A function to force the result+                           -- (often either @const ()@ or 'rnf')+           -> m a          -- ^ The body of the phase to be timed+           -> m a+withTimingD what force action = do+  dflags <- getDynFlags+  withTiming' dflags what force PrintTimings action+++-- | Same as 'withTiming', but doesn't print timings in the+--   console (when given @-vN@, @N >= 2@ or @-ddump-timings@).+--+--   See Note [withTiming] for more.+withTimingSilent+  :: MonadIO m+  => DynFlags   -- ^ DynFlags+  -> SDoc       -- ^ The name of the phase+  -> (a -> ())  -- ^ A function to force the result+                -- (often either @const ()@ or 'rnf')+  -> m a        -- ^ The body of the phase to be timed+  -> m a+withTimingSilent dflags what force action =+  withTiming' dflags what force DontPrintTimings action++-- | Same as 'withTiming', but doesn't print timings in the+--   console (when given @-vN@, @N >= 2@ or @-ddump-timings@)+--   and gets the DynFlags from the given Monad.+--+--   See Note [withTiming] for more.+withTimingSilentD+  :: (MonadIO m, HasDynFlags m)+  => SDoc       -- ^ The name of the phase+  -> (a -> ())  -- ^ A function to force the result+                -- (often either @const ()@ or 'rnf')+  -> m a        -- ^ The body of the phase to be timed+  -> m a+withTimingSilentD what force action = do+  dflags <- getDynFlags+  withTiming' dflags what force DontPrintTimings action++-- | Worker for 'withTiming' and 'withTimingSilent'.+withTiming' :: MonadIO m+            => DynFlags   -- ^ A means of getting a 'DynFlags' (often+                            -- 'getDynFlags' will work here)+            -> SDoc         -- ^ The name of the phase+            -> (a -> ())    -- ^ A function to force the result+                            -- (often either @const ()@ or 'rnf')+            -> PrintTimings -- ^ Whether to print the timings+            -> m a          -- ^ The body of the phase to be timed+            -> m a+withTiming' dflags what force_result prtimings action+  = do if verbosity dflags >= 2 || dopt Opt_D_dump_timings dflags+          then do whenPrintTimings $+                    logInfo dflags (defaultUserStyle dflags) $+                      text "***" <+> what <> colon+                  eventBegins dflags what                   alloc0 <- liftIO getAllocationCounter                   start <- liftIO getCPUTime                   !r <- action                   () <- pure $ force_result r-                  liftIO $ traceEventIO $ showSDocOneLine dflags $ text "GHC:finished:" <+> what+                  eventEnds dflags what                   end <- liftIO getCPUTime                   alloc1 <- liftIO getAllocationCounter                   -- recall that allocation counter counts down                   let alloc = alloc0 - alloc1                       time = realToFrac (end - start) * 1e-9 -                  when (verbosity dflags >= 2)+                  when (verbosity dflags >= 2 && prtimings == PrintTimings)                       $ liftIO $ logInfo dflags (defaultUserStyle dflags)                           (text "!!!" <+> what <> colon <+> text "finished in"                            <+> doublePrec 2 time@@ -665,15 +737,27 @@                            <+> doublePrec 3 (realToFrac alloc / 1024 / 1024)                            <+> text "megabytes") -                  liftIO $ dumpIfSet_dyn dflags Opt_D_dump_timings ""-                      $ text $ showSDocOneLine dflags-                      $ hsep [ what <> colon-                             , text "alloc=" <> ppr alloc-                             , text "time=" <> doublePrec 3 time-                             ]+                  whenPrintTimings $+                      dumpIfSet_dyn dflags Opt_D_dump_timings ""+                          $ text $ showSDocOneLine dflags+                          $ hsep [ what <> colon+                                 , text "alloc=" <> ppr alloc+                                 , text "time=" <> doublePrec 3 time+                                 ]                   pure r            else action +    where whenPrintTimings = liftIO . when (prtimings == PrintTimings)+          eventBegins dflags w = do+            whenPrintTimings $ traceMarkerIO (eventBeginsDoc dflags w)+            liftIO $ traceEventIO (eventEndsDoc dflags w)+          eventEnds dflags w = do+            whenPrintTimings $ traceMarkerIO (eventEndsDoc dflags w)+            liftIO $ traceEventIO (eventEndsDoc dflags w)++          eventBeginsDoc dflags w = showSDocOneLine dflags $ text "GHC:started:" <+> w+          eventEndsDoc dflags w = showSDocOneLine dflags $ text "GHC:finished:" <+> w+ debugTraceMsg :: DynFlags -> Int -> MsgDoc -> IO () debugTraceMsg dflags val msg = ifVerbose dflags val $                                logInfo dflags (defaultDumpStyle dflags) msg@@ -739,3 +823,99 @@                                  <+> text cmd_line                                  <+> text (show exn))                               ; throwGhcExceptionIO (ProgramError (show exn))}++{- Note [withTiming]+~~~~~~~~~~~~~~~~~~~~++For reference:++  withTiming+    :: MonadIO+    => m DynFlags   -- how to get the DynFlags+    -> SDoc         -- label for the computation we're timing+    -> (a -> ())    -- how to evaluate the result+    -> PrintTimings -- whether to report the timings when passed+                    -- -v2 or -ddump-timings+    -> m a          -- computation we're timing+    -> m a++withTiming lets you run an action while:++(1) measuring the CPU time it took and reporting that on stderr+    (when PrintTimings is passed),+(2) emitting start/stop events to GHC's event log, with the label+    given as an argument.++Evaluation of the result+------------------------++'withTiming' takes as an argument a function of type 'a -> ()', whose purpose is+to evaluate the result "sufficiently". A given pass might return an 'm a' for+some monad 'm' and result type 'a', but where the 'a' is complex enough+that evaluating it to WHNF barely scratches its surface and leaves many+complex and time-consuming computations unevaluated. Those would only be+forced by the next pass, and the time needed to evaluate them would be+mis-attributed to that next pass. A more appropriate function would be+one that deeply evaluates the result, so as to assign the time spent doing it+to the pass we're timing.++Note: as hinted at above, the time spent evaluating the application of the+forcing function to the result is included in the timings reported by+'withTiming'.++How we use it+-------------++We measure the time and allocations of various passes in GHC's pipeline by just+wrapping the whole pass with 'withTiming'. This also materializes by having+a label for each pass in the eventlog, where each pass is executed in one go,+during a continuous time window.++However, from STG onwards, the pipeline uses streams to emit groups of+STG/Cmm/etc declarations one at a time, and process them until we get to+assembly code generation. This means that the execution of those last few passes+is interleaved and that we cannot measure how long they take by just wrapping+the whole thing with 'withTiming'. Instead we wrap the processing of each+individual stream element, all along the codegen pipeline, using the appropriate+label for the pass to which this processing belongs. That generates a lot more+data but allows us to get fine-grained timings about all the passes and we can+easily compute totals withh tools like ghc-events-analyze (see below).+++Producing an eventlog for GHC+-----------------------------++To actually produce the eventlog, you need an eventlog-capable GHC build:++  With Hadrian:+  $ hadrian/build.sh -j "stage1.ghc-bin.ghc.link.opts += -eventlog"++  With Make:+  $ make -j GhcStage2HcOpts+=-eventlog++You can then produce an eventlog when compiling say hello.hs by simply+doing:++  If GHC was built by Hadrian:+  $ _build/stage1/bin/ghc -ddump-timings hello.hs -o hello +RTS -l++  If GHC was built with Make:+  $ inplace/bin/ghc-stage2 -ddump-timing hello.hs -o hello +RTS -l++You could alternatively use -v<N> (with N >= 2) instead of -ddump-timings,+to ask GHC to report timings (on stderr and the eventlog).++This will write the eventlog to ./ghc.eventlog in both cases. You can then+visualize it or look at the totals for each label by using ghc-events-analyze,+threadscope or any other eventlog consumer. Illustrating with+ghc-events-analyze:++  $ ghc-events-analyze --timed --timed-txt --totals \+                       --start "GHC:started:" --stop "GHC:finished:" \+                       ghc.eventlog++This produces ghc.timed.txt (all event timestamps), ghc.timed.svg (visualisation+of the execution through the various labels) and ghc.totals.txt (total time+spent in each label).++-}
+ main/FileSettings.hs view
@@ -0,0 +1,16 @@+module FileSettings+  ( FileSettings (..)+  ) where++import GhcPrelude++-- | Paths to various files and directories used by GHC, including those that+-- provide more settings.+data FileSettings = FileSettings+  { fileSettings_ghcUsagePath        :: FilePath       -- ditto+  , fileSettings_ghciUsagePath       :: FilePath       -- ditto+  , fileSettings_toolDir             :: Maybe FilePath -- ditto+  , fileSettings_topDir              :: FilePath       -- ditto+  , fileSettings_tmpDir              :: String      -- no trailing '/'+  , fileSettings_systemPackageConfig :: FilePath+  }
main/Finder.hs view
@@ -245,7 +245,7 @@  mkHomeInstalledModule :: DynFlags -> ModuleName -> InstalledModule mkHomeInstalledModule dflags mod_name =-  let iuid = fst (splitUnitIdInsts (thisPackage dflags))+  let iuid = thisInstalledUnitId dflags   in InstalledModule iuid mod_name  -- This returns a module because it's more convenient for users@@ -313,8 +313,10 @@       , ("lhsig",  mkHomeModLocationSearched dflags mod_name "lhsig")       ] -     hi_exts = [ (hisuf,                mkHiOnlyModLocation dflags hisuf)-               , (addBootSuffix hisuf,  mkHiOnlyModLocation dflags hisuf)+     -- we use mkHomeModHiOnlyLocation instead of mkHiOnlyModLocation so that+     -- when hiDir field is set in dflags, we know to look there (see #16500)+     hi_exts = [ (hisuf,                mkHomeModHiOnlyLocation dflags mod_name)+               , (addBootSuffix hisuf,  mkHomeModHiOnlyLocation dflags mod_name)                ]          -- In compilation manager modes, we look for source files in the home@@ -488,6 +490,15 @@                         ml_hi_file   = hi_fn,                         ml_obj_file  = obj_fn,                         ml_hie_file  = hie_fn })++mkHomeModHiOnlyLocation :: DynFlags+                        -> ModuleName+                        -> FilePath+                        -> BaseName+                        -> IO ModLocation+mkHomeModHiOnlyLocation dflags mod path basename = do+   loc <- mkHomeModLocation2 dflags mod (path </> basename) ""+   return loc { ml_hs_file = Nothing }  mkHiOnlyModLocation :: DynFlags -> Suffix -> FilePath -> String                     -> IO ModLocation
main/GHC.hs view
@@ -85,7 +85,7 @@         lookupGlobalName,         findGlobalAnns,         mkPrintUnqualifiedForModule,-        ModIface(..),+        ModIface, ModIface_(..),         SafeHaskellMode(..),          -- * Querying the environment@@ -139,7 +139,7 @@         getDocs, GetDocsFailure(..),          -- ** Other-        runTcInteractive,   -- Desired by some clients (Trac #8878)+        runTcInteractive,   -- Desired by some clients (#8878)         isStmt, hasImport, isImport, isDecl,          -- ** The debugger@@ -220,12 +220,14 @@         Kind,         PredType,         ThetaType, pprForAll, pprThetaArrowTy,+        parseInstanceHead,+        getInstancesForType,          -- ** Entities         TyThing(..),          -- ** Syntax-        module HsSyn, -- ToDo: remove extraneous bits+        module GHC.Hs, -- ToDo: remove extraneous bits          -- ** Fixities         FixityDirection(..),@@ -309,15 +311,17 @@ import TcRnMonad        ( finalSafeMode, fixSafeInstances, initIfaceTcRn ) import LoadIface        ( loadSysInterface ) import TcRnTypes+import Predicate import Packages import NameSet import RdrName-import HsSyn+import GHC.Hs import Type     hiding( typeKind )-import TcType           hiding( typeKind )+import TcType import Id import TysPrim          ( alphaTyVars ) import TyCon+import TyCoPpr          ( pprForAll ) import Class import DataCon import Name             hiding ( varName )@@ -337,8 +341,8 @@ import Annotations import Module import Panic-import Platform-import Bag              ( listToBag, unitBag )+import GHC.Platform+import Bag              ( listToBag ) import ErrUtils import MonadUtils import Util@@ -503,7 +507,7 @@   = do { env <- liftIO $                 do { top_dir <- findTopDir mb_top_dir                    ; mySettings <- initSysTools top_dir-                   ; myLlvmConfig <- initLlvmConfig top_dir+                   ; myLlvmConfig <- lazyInitLlvmConfig top_dir                    ; dflags <- initDynFlags (defaultDynFlags mySettings myLlvmConfig)                    ; checkBrokenTablesNextToCode dflags                    ; setUnsafeGlobalDynFlags dflags@@ -517,7 +521,7 @@ -- check should be more selective but there is currently no released -- version where this bug is fixed. -- See https://sourceware.org/bugzilla/show_bug.cgi?id=16177 and--- https://ghc.haskell.org/trac/ghc/ticket/4210#comment:29+-- https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 checkBrokenTablesNextToCode :: MonadIO m => DynFlags -> m () checkBrokenTablesNextToCode dflags   = do { broken <- checkBrokenTablesNextToCode' dflags@@ -684,14 +688,12 @@ checkNewInteractiveDynFlags dflags0 = do   -- We currently don't support use of StaticPointers in expressions entered on   -- the REPL. See #12356.-  dflags1 <--      if xopt LangExt.StaticPointers dflags0-      then do liftIO $ printOrThrowWarnings dflags0 $ listToBag-                [mkPlainWarnMsg dflags0 interactiveSrcSpan-                 $ text "StaticPointers is not supported in GHCi interactive expressions."]-              return $ xopt_unset dflags0 LangExt.StaticPointers-      else return dflags0-  return dflags1+  if xopt LangExt.StaticPointers dflags0+  then do liftIO $ printOrThrowWarnings dflags0 $ listToBag+            [mkPlainWarnMsg dflags0 interactiveSrcSpan+             $ text "StaticPointers is not supported in GHCi interactive expressions."]+          return $ xopt_unset dflags0 LangExt.StaticPointers+  else return dflags0   -- %************************************************************************@@ -1367,9 +1369,9 @@   let startLoc = mkRealSrcLoc (mkFastString sourceFile) 1 1   case lexTokenStream source startLoc flags of     POk _ ts  -> return ts-    PFailed _ span err ->+    PFailed pst ->         do dflags <- getDynFlags-           liftIO $ throwIO $ mkSrcErr (unitBag $ mkPlainErrMsg dflags span err)+           throwErrors (getErrorMessages pst dflags)  -- | Give even more information on the source than 'getTokenStream' -- This function allows reconstructing the source completely with@@ -1380,9 +1382,9 @@   let startLoc = mkRealSrcLoc (mkFastString sourceFile) 1 1   case lexTokenStream source startLoc flags of     POk _ ts -> return $ addSourceToTokens startLoc source ts-    PFailed _ span err ->+    PFailed pst ->         do dflags <- getDynFlags-           liftIO $ throwIO $ mkSrcErr (unitBag $ mkPlainErrMsg dflags span err)+           throwErrors (getErrorMessages pst dflags)  -- | Given a source location and a StringBuffer corresponding to this -- location, return a rich token stream with the source associated to the@@ -1557,9 +1559,9 @@    in    case unP Parser.parseModule (mkPState dflags buf loc) of -     PFailed warnFn span err   ->-         let (warns,_) = warnFn dflags in-         (warns, Left $ unitBag (mkPlainErrMsg dflags span err))+     PFailed pst ->+         let (warns,errs) = getMessages pst dflags in+         (warns, Left errs)       POk pst rdr_module ->          let (warns,_) = getMessages pst dflags in
main/GhcMake.hs view
@@ -66,9 +66,9 @@ import Packages import UniqSet import Util+import qualified GHC.LanguageExtensions as LangExt import NameEnv import FileCleanup-import qualified GHC.LanguageExtensions as LangExt  import Data.Either ( rights, partitionEithers ) import qualified Data.Map as Map@@ -154,7 +154,7 @@          targets = hsc_targets hsc_env          old_graph = hsc_mod_graph hsc_env -  withTiming (pure dflags) (text "Chasing dependencies") (const ()) $ do+  withTiming dflags (text "Chasing dependencies") (const ()) $ do     liftIO $ debugTraceMsg dflags 2 (hcat [               text "Chasing modules from: ",               hcat (punctuate comma (map pprTarget targets))])@@ -185,7 +185,7 @@ -- but "A" imports some other module "C", then GHC will issue a warning -- about module "C" not being listed in a command line. ----- The warning in enabled by `-Wmissing-home-modules`. See Trac #13129+-- The warning in enabled by `-Wmissing-home-modules`. See #13129 warnMissingHomeModules :: GhcMonad m => HscEnv -> ModuleGraph -> m () warnMissingHomeModules hsc_env mod_graph =     when (wopt Opt_WarnMissingHomeModules dflags && not (null missing)) $@@ -203,7 +203,7 @@     -- For instance, `ghc --make src-exe/Main.hs` and     -- `ghc --make -isrc-exe Main` are supposed to be equivalent.     -- Note also that we can't always infer the associated module name-    -- directly from the filename argument.  See Trac #13727.+    -- directly from the filename argument.  See #13727.     is_my_target mod (TargetModule name)       = moduleName (ms_mod mod) == name     is_my_target mod (TargetFile target_file _)@@ -267,8 +267,76 @@ load :: GhcMonad m => LoadHowMuch -> m SuccessFlag load how_much = do     mod_graph <- depanal [] False-    load' how_much (Just batchMsg) mod_graph+    success <- load' how_much (Just batchMsg) mod_graph+    warnUnusedPackages+    pure success +-- Note [Unused packages]+--+-- Cabal passes `--package-id` flag for each direct dependency. But GHC+-- loads them lazily, so when compilation is done, we have a list of all+-- actually loaded packages. All the packages, specified on command line,+-- but never loaded, are probably unused dependencies.++warnUnusedPackages :: GhcMonad m => m ()+warnUnusedPackages = do+    hsc_env <- getSession+    eps <- liftIO $ hscEPS hsc_env++    let dflags = hsc_dflags hsc_env+        pit = eps_PIT eps++    let loadedPackages+          = map (getPackageDetails dflags)+          . nub . sort+          . map moduleUnitId+          . moduleEnvKeys+          $ pit++        requestedArgs = mapMaybe packageArg (packageFlags dflags)++        unusedArgs+          = filter (\arg -> not $ any (matching dflags arg) loadedPackages)+                   requestedArgs++    let warn = makeIntoWarning+          (Reason Opt_WarnUnusedPackages)+          (mkPlainErrMsg dflags noSrcSpan msg)+        msg = vcat [ text "The following packages were specified" <+>+                     text "via -package or -package-id flags,"+                   , text "but were not needed for compilation:"+                   , nest 2 (vcat (map (withDash . pprUnusedArg) unusedArgs)) ]++    when (wopt Opt_WarnUnusedPackages dflags && not (null unusedArgs)) $+      logWarnings (listToBag [warn])++    where+        packageArg (ExposePackage _ arg _) = Just arg+        packageArg _ = Nothing++        pprUnusedArg (PackageArg str) = text str+        pprUnusedArg (UnitIdArg uid) = ppr uid++        withDash = (<+>) (text "-")++        matchingStr :: String -> PackageConfig -> Bool+        matchingStr str p+                =  str == sourcePackageIdString p+                || str == packageNameString p++        matching :: DynFlags -> PackageArg -> PackageConfig -> Bool+        matching _ (PackageArg str) p = matchingStr str p+        matching dflags (UnitIdArg uid) p = uid == realUnitId dflags p++        -- For wired-in packages, we have to unwire their id,+        -- otherwise they won't match package flags+        realUnitId :: DynFlags -> PackageConfig -> UnitId+        realUnitId dflags+          = unwireUnitId dflags+          . DefiniteUnitId+          . DefUnitId+          . installedPackageConfigId+ -- | Generalized version of 'load' which also supports a custom -- 'Messager' (for reporting progress) and 'ModuleGraph' (generally -- produced by calling 'depanal'.@@ -424,8 +492,8 @@                    | otherwise  = upsweep      setSession hsc_env{ hsc_HPT = emptyHomePackageTable }-    (upsweep_ok, modsUpswept)-       <- upsweep_fn mHscMessage pruned_hpt stable_mods cleanup mg+    (upsweep_ok, modsUpswept) <- withDeferredDiagnostics $+      upsweep_fn mHscMessage pruned_hpt stable_mods cleanup mg      -- Make modsDone be the summaries for each home module now     -- available; this should equal the domain of hpt3.@@ -897,7 +965,7 @@             n_cpus <- getNumProcessors             -- Setting number of capabilities more than             -- CPU count usually leads to high userspace-            -- lock contention. Trac #9221+            -- lock contention. #9221             let n_caps = min n_jobs n_cpus             unless (n_capabilities /= 1) $ setNumCapabilities n_caps             return n_capabilities@@ -1289,6 +1357,25 @@  where   done_holes = emptyUniqSet +  keep_going this_mods old_hpt done mods mod_index nmods uids_to_check done_holes = do+    let sum_deps ms (AcyclicSCC mod) =+          if any (flip elem . map (unLoc . snd) $ ms_imps mod) ms+            then ms_mod_name mod:ms+            else ms+        sum_deps ms _ = ms+        dep_closure = foldl' sum_deps this_mods mods+        dropped_ms = drop (length this_mods) (reverse dep_closure)+        prunable (AcyclicSCC mod) = elem (ms_mod_name mod) dep_closure+        prunable _ = False+        mods' = filter (not . prunable) mods+        nmods' = nmods - length dropped_ms++    when (not $ null dropped_ms) $ do+        dflags <- getSessionDynFlags+        liftIO $ fatalErrorMsg dflags (keepGoingPruneErr dropped_ms)+    (_, done') <- upsweep' old_hpt done mods' (mod_index+1) nmods' uids_to_check done_holes+    return (Failed, done')+   upsweep'     :: GhcMonad m     => HomePackageTable@@ -1306,10 +1393,13 @@         return (Succeeded, done)    upsweep' _old_hpt done-     (CyclicSCC ms:_) _ _ _ _+     (CyclicSCC ms:mods) mod_index nmods uids_to_check done_holes    = do dflags <- getSessionDynFlags         liftIO $ fatalErrorMsg dflags (cyclicModuleErr ms)-        return (Failed, done)+        if gopt Opt_KeepGoing dflags+          then keep_going (map ms_mod_name ms) old_hpt done mods mod_index nmods+                          uids_to_check done_holes+          else return (Failed, done)    upsweep' old_hpt done      (AcyclicSCC mod:mods) mod_index nmods uids_to_check done_holes@@ -1358,7 +1448,12 @@                  return (Just mod_info)          case mb_mod_info of-          Nothing -> return (Failed, done)+          Nothing -> do+                dflags <- getSessionDynFlags+                if gopt Opt_KeepGoing dflags+                  then keep_going [ms_mod_name mod] old_hpt done mods mod_index nmods+                                  uids_to_check done_holes+                  else return (Failed, done)           Just mod_info -> do                 let this_mod = ms_mod_name mod @@ -1659,7 +1754,7 @@ -- be any object code that we can compare against, nor should there -- be: we're *just* generating interface files.  In this case, we -- want to check if the interface file is new, in lieu of the object--- file.  See also Trac #9243.+-- file.  See also #9243.  -- Filter modules in the HPT retainInTopLevelEnvs :: [ModuleName] -> HomePackageTable -> HomePackageTable@@ -1980,11 +2075,11 @@        -- See Note [-fno-code mode] #8025        map1 <- if hscTarget dflags == HscNothing          then enableCodeGenForTH-           (defaultObjectTarget (targetPlatform dflags))+           (defaultObjectTarget dflags)            map0          else if hscTarget dflags == HscInterpreted-           then enableCodeGenForUnboxedTuples-             (defaultObjectTarget (targetPlatform dflags))+           then enableCodeGenForUnboxedTuplesOrSums+             (defaultObjectTarget dflags)              map0            else return map0        return $ concat $ nodeMapElts map1@@ -2081,17 +2176,19 @@ -- and .o file locations to be temporary files. -- -- This is used used in order to load code that uses unboxed tuples--- into GHCi while still allowing some code to be interpreted.-enableCodeGenForUnboxedTuples :: HscTarget+-- or sums into GHCi while still allowing some code to be interpreted.+enableCodeGenForUnboxedTuplesOrSums :: HscTarget   -> NodeMap [Either ErrorMessages ModSummary]   -> IO (NodeMap [Either ErrorMessages ModSummary])-enableCodeGenForUnboxedTuples =+enableCodeGenForUnboxedTuplesOrSums =   enableCodeGenWhen condition should_modify TFL_GhcSession TFL_CurrentModule   where     condition ms =-      False &&    -- disabled due to #16876-      xopt LangExt.UnboxedTuples (ms_hspp_opts ms) &&+      unboxed_tuples_or_sums (ms_hspp_opts ms) &&+      not (gopt Opt_ByteCode (ms_hspp_opts ms)) &&       not (isBootSummary ms)+    unboxed_tuples_or_sums d =+      xopt LangExt.UnboxedTuples d || xopt LangExt.UnboxedSums d     should_modify (ModSummary { ms_hspp_opts = dflags }) =       hscTarget dflags == HscInterpreted @@ -2131,15 +2228,17 @@           -- to by the user. But we need them, so we patch their locations in           -- the ModSummary with temporary files.           ---        hi_file <-+        (hi_file, o_file) <-+          -- If ``-fwrite-interface` is specified, then the .o and .hi files+          -- are written into `-odir` and `-hidir` respectively.  #16670           if gopt Opt_WriteInterface dflags-            then return $ ml_hi_file ms_location-            else new_temp_file (hiSuf dflags) (dynHiSuf dflags)-        o_temp_file <- new_temp_file (objectSuf dflags) (dynObjectSuf dflags)+            then return (ml_hi_file ms_location, ml_obj_file ms_location)+            else (,) <$> (new_temp_file (hiSuf dflags) (dynHiSuf dflags))+                     <*> (new_temp_file (objectSuf dflags) (dynObjectSuf dflags))         return $           ms           { ms_location =-              ms_location {ml_hi_file = hi_file, ml_obj_file = o_temp_file}+              ms_location {ml_hi_file = hi_file, ml_obj_file = o_file}           , ms_hspp_opts = updOptLevel 0 $ dflags {hscTarget = target}           }       | otherwise = return ms@@ -2188,28 +2287,6 @@     concat [ [(m,IsBoot), (m,NotBoot)] | m <- ms_home_srcimps s ]         ++ [ (m,NotBoot) | m <- ms_home_imps s ] -home_imps :: [(Maybe FastString, Located ModuleName)] -> [Located ModuleName]-home_imps imps = [ lmodname |  (mb_pkg, lmodname) <- imps,-                                  isLocal mb_pkg ]-  where isLocal Nothing = True-        isLocal (Just pkg) | pkg == fsLit "this" = True -- "this" is special-        isLocal _ = False--ms_home_allimps :: ModSummary -> [ModuleName]-ms_home_allimps ms = map unLoc (ms_home_srcimps ms ++ ms_home_imps ms)---- | Like 'ms_home_imps', but for SOURCE imports.-ms_home_srcimps :: ModSummary -> [Located ModuleName]-ms_home_srcimps = home_imps . ms_srcimps---- | All of the (possibly) home module imports from a--- 'ModSummary'; that is to say, each of these module names--- could be a home import if an appropriately named file--- existed.  (This is in contrast to package qualified--- imports, which are guaranteed not to be home imports.)-ms_home_imps :: ModSummary -> [Located ModuleName]-ms_home_imps = home_imps . ms_imps- ----------------------------------------------------------------------------- -- Summarising modules @@ -2545,6 +2622,41 @@ --                      Error messages ----------------------------------------------------------------------------- +-- Defer and group warning, error and fatal messages so they will not get lost+-- in the regular output.+withDeferredDiagnostics :: GhcMonad m => m a -> m a+withDeferredDiagnostics f = do+  dflags <- getDynFlags+  if not $ gopt Opt_DeferDiagnostics dflags+  then f+  else do+    warnings <- liftIO $ newIORef []+    errors <- liftIO $ newIORef []+    fatals <- liftIO $ newIORef []++    let deferDiagnostics _dflags !reason !severity !srcSpan !style !msg = do+          let action = putLogMsg dflags reason severity srcSpan style msg+          case severity of+            SevWarning -> atomicModifyIORef' warnings $ \i -> (action: i, ())+            SevError -> atomicModifyIORef' errors $ \i -> (action: i, ())+            SevFatal -> atomicModifyIORef' fatals $ \i -> (action: i, ())+            _ -> action++        printDeferredDiagnostics = liftIO $+          forM_ [warnings, errors, fatals] $ \ref -> do+            -- This IORef can leak when the dflags leaks, so let us always+            -- reset the content.+            actions <- atomicModifyIORef' ref $ \i -> ([], i)+            sequence_ $ reverse actions++        setLogAction action = modifySession $ \hsc_env ->+          hsc_env{ hsc_dflags = (hsc_dflags hsc_env){ log_action = action } }++    gbracket+      (setLogAction deferDiagnostics)+      (\_ -> setLogAction (log_action dflags) >> printDeferredDiagnostics)+      (\_ -> f)+ noModError :: DynFlags -> SrcSpan -> ModuleName -> FindResult -> ErrMsg -- ToDo: we don't have a proper line number for this error noModError dflags loc wanted_mod err@@ -2569,6 +2681,12 @@   where     mod = ms_mod summ1     files = map (expectJust "checkDup" . ml_hs_file . ms_location) summs++keepGoingPruneErr :: [ModuleName] -> SDoc+keepGoingPruneErr ms+  = vcat (( text "-fkeep-going in use, removing the following" <+>+            text "dependencies and continuing:"):+          map (nest 6 . ppr) ms )  cyclicModuleErr :: [ModSummary] -> SDoc -- From a strongly connected component we find
main/GhcMonad.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, RankNTypes #-}+{-# LANGUAGE CPP, DeriveFunctor, RankNTypes #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- ----------------------------------------------------------------------------- --@@ -90,7 +90,7 @@ -- | A minimal implementation of a 'GhcMonad'.  If you need a custom monad, -- e.g., to maintain additional state consider wrapping this monad or using -- 'GhcT'.-newtype Ghc a = Ghc { unGhc :: Session -> IO a }+newtype Ghc a = Ghc { unGhc :: Session -> IO a } deriving (Functor)  -- | The Session is a handle to the complete state of a compilation -- session.  A compilation session consists of a set of modules@@ -98,9 +98,6 @@ -- interactive evaluation, and various caches. data Session = Session !(IORef HscEnv) -instance Functor Ghc where-  fmap f m = Ghc $ \s -> f `fmap` unGhc m s- instance Applicative Ghc where   pure a = Ghc $ \_ -> return a   g <*> m = do f <- g; a <- m; return (f a)@@ -158,12 +155,10 @@ -- -- Note that the wrapped monad must support IO and handling of exceptions. newtype GhcT m a = GhcT { unGhcT :: Session -> m a }+    deriving (Functor)  liftGhcT :: m a -> GhcT m a liftGhcT m = GhcT $ \_ -> m--instance Functor m => Functor (GhcT m) where-  fmap f m = GhcT $ \s -> f `fmap` unGhcT m s  instance Applicative m => Applicative (GhcT m) where   pure x  = GhcT $ \_ -> pure x
+ main/GhcNameVersion.hs view
@@ -0,0 +1,11 @@+module GhcNameVersion+  ( GhcNameVersion (..)+  ) where++import GhcPrelude++-- | Settings for what GHC this is.+data GhcNameVersion = GhcNameVersion+  { ghcNameVersion_programName    :: String+  , ghcNameVersion_projectVersion :: String+  }
main/GhcPlugins.hs view
@@ -90,7 +90,7 @@ import IfaceEnv         ( lookupOrigIO ) import GhcPrelude import MonadUtils       ( mapMaybeM )-import Convert          ( thRdrNameGuesses )+import GHC.ThToHs       ( thRdrNameGuesses ) import TcEnv            ( lookupGlobal )  import qualified Language.Haskell.TH as TH
main/HeaderInfo.hs view
@@ -22,11 +22,12 @@  import GhcPrelude +import GHC.Platform import HscTypes import Parser           ( parseHeader ) import Lexer import FastString-import HsSyn+import GHC.Hs import Module import PrelNames import StringBuffer@@ -35,7 +36,6 @@ import ErrUtils import Util import Outputable-import Pretty           () import Maybes import Bag              ( emptyBag, listToBag, unitBag ) import MonadUtils@@ -68,9 +68,9 @@ getImports dflags buf filename source_filename = do   let loc  = mkRealSrcLoc (mkFastString filename) 1 1   case unP parseHeader (mkPState dflags buf loc) of-    PFailed _ span err -> do+    PFailed pst ->         -- assuming we're not logging warnings here as per below-        return $ Left $ unitBag $ mkPlainErrMsg dflags span err+      return $ Left $ getErrorMessages pst dflags     POk pst rdr_module -> fmap Right $ do       let _ms@(_warns, errs) = getMessages pst dflags       -- don't log warnings: they'll be reported when we parse the file@@ -127,13 +127,13 @@        preludeImportDecl :: LImportDecl GhcPs       preludeImportDecl-        = cL loc $ ImportDecl { ideclExt       = noExt,+        = cL loc $ ImportDecl { ideclExt       = noExtField,                                 ideclSourceSrc = NoSourceText,                                 ideclName      = cL loc pRELUDE_NAME,                                 ideclPkgQual   = Nothing,                                 ideclSource    = False,                                 ideclSafe      = False,  -- Not a safe import-                                ideclQualified = False,+                                ideclQualified = NotQualified,                                 ideclImplicit  = True,   -- Implicit!                                 ideclAs        = Nothing,                                 ideclHiding    = Nothing  }@@ -307,10 +307,12 @@ checkExtension dflags (dL->L l ext) -- Checks if a given extension is valid, and if so returns -- its corresponding flag. Otherwise it throws an exception.- =  let ext' = unpackFS ext in-    if ext' `elem` supportedLanguagesAndExtensions+  = if ext' `elem` supported     then cL l ("-X"++ext')     else unsupportedExtnError dflags l ext'+  where+    ext' = unpackFS ext+    supported = supportedLanguagesAndExtensions $ platformMini $ targetPlatform dflags  languagePragParseError :: DynFlags -> SrcSpan -> a languagePragParseError dflags loc =@@ -326,7 +328,8 @@         text "Unsupported extension: " <> text unsup $$         if null suggestions then Outputable.empty else text "Perhaps you meant" <+> quotedListWithOr (map text suggestions)   where-     suggestions = fuzzyMatch unsup supportedLanguagesAndExtensions+     supported = supportedLanguagesAndExtensions $ platformMini $ targetPlatform dflags+     suggestions = fuzzyMatch unsup supported   optionsErrorMsgs :: DynFlags -> [String] -> [Located String] -> FilePath -> Messages
main/Hooks.hs view
@@ -28,9 +28,9 @@ import DynFlags import PipelineMonad import HscTypes-import HsDecls-import HsBinds-import HsExpr+import GHC.Hs.Decls+import GHC.Hs.Binds+import GHC.Hs.Expr import OrdList import TcRnTypes import Bag@@ -43,7 +43,7 @@ import Type import System.Process import BasicTypes-import HsExtension+import GHC.Hs.Extension  import Data.Maybe 
main/HscMain.hs view
@@ -39,6 +39,7 @@     , Messager, batchMsg     , HscStatus (..)     , hscIncrementalCompile+    , hscMaybeWriteIface     , hscCompileCmmFile      , hscGenHardCode@@ -67,6 +68,7 @@     , hscDecls, hscParseDeclsWithLocation, hscDeclsWithLocation, hscParsedDecls     , hscTcExpr, TcRnExprMode(..), hscImport, hscKcType     , hscParseExpr+    , hscParseType     , hscCompileCoreExpr     -- * Low-level exports for hooks     , hscCompileCoreExpr'@@ -74,7 +76,7 @@       -- hscFileFrontEnd in client code     , hscParse', hscSimplify', hscDesugar', tcRnModule'     , getHscEnv-    , hscSimpleIface', hscNormalIface'+    , hscSimpleIface'     , oneShotMsg     , hscFileFrontEnd, genericHscFrontend, dumpIfaceStats     , ioMsgMaybe@@ -103,8 +105,8 @@ import Module import Packages import RdrName-import HsSyn-import HsDumpAst+import GHC.Hs+import GHC.Hs.Dump import CoreSyn import StringBuffer import Parser@@ -113,6 +115,7 @@ import TcRnDriver import TcIface          ( typecheckIface ) import TcRnMonad+import TcHsSyn          ( ZonkFlexi (DefaultFlexi) ) import NameCache        ( initNameCache ) import LoadIface        ( ifaceStats, initExternalPackageState ) import PrelInfo@@ -122,7 +125,7 @@ import TidyPgm import CorePrep import CoreToStg        ( coreToStg )-import qualified StgCmm ( codeGen )+import qualified GHC.StgToCmm as StgToCmm ( codeGen ) import StgSyn import StgFVs           ( annTopBindingsFreeVars ) import CostCentre@@ -147,7 +150,6 @@  import DynFlags import ErrUtils-import Platform ( platformOS, osSubsectionsViaSymbols )  import Outputable import NameEnv@@ -162,7 +164,7 @@  import Util -import Data.List+import Data.List        ( nub, isPrefixOf, partition ) import Control.Monad import Data.IORef import System.FilePath as FilePath@@ -171,9 +173,10 @@ import qualified Data.Map as M import qualified Data.Set as S import Data.Set (Set)+import Control.DeepSeq (force)  import HieAst           ( mkHieFile )-import HieTypes         ( getAsts, hie_asts )+import HieTypes         ( getAsts, hie_asts, hie_module ) import HieBin           ( readHieFile, writeHieFile , hie_file_result) import HieDebug         ( diffFile, validateScopes ) @@ -193,6 +196,7 @@     nc_var  <- newIORef (initNameCache us knownKeyNames)     fc_var  <- newIORef emptyInstalledModuleEnv     iserv_mvar <- newMVar Nothing+    emptyDynLinker <- uninitializedLinker     return HscEnv {  hsc_dflags       = dflags                   ,  hsc_targets      = []                   ,  hsc_mod_graph    = emptyMG@@ -202,7 +206,8 @@                   ,  hsc_NC           = nc_var                   ,  hsc_FC           = fc_var                   ,  hsc_type_env_var = Nothing-                  , hsc_iserv        = iserv_mvar+                  ,  hsc_iserv        = iserv_mvar+                  ,  hsc_dynLinker    = emptyDynLinker                   }  -- -----------------------------------------------------------------------------@@ -233,6 +238,16 @@     logWarnings warns     when (not $ isEmptyBag errs) $ throwErrors errs +-- | Log warnings and throw errors, assuming the messages+-- contain at least one error (e.g. coming from PFailed)+handleWarningsThrowErrors :: Messages -> Hsc a+handleWarningsThrowErrors (warns, errs) = do+    logWarnings warns+    dflags <- getDynFlags+    (wWarns, wErrs) <- warningsToMessages dflags <$> getWarnings+    liftIO $ printBagOfErrors dflags wWarns+    throwErrors (unionBags errs wErrs)+ -- | Deal with errors and warnings returned by a compilation step -- -- In order to reduce dependencies to other parts of the compiler, functions@@ -316,9 +331,8 @@ hscParse' mod_summary  | Just r <- ms_parsed_mod mod_summary = return r  | otherwise = {-# SCC "Parser" #-}-    withTiming getDynFlags-               (text "Parser"<+>brackets (ppr $ ms_mod mod_summary))-               (const ()) $ do+    withTimingD (text "Parser"<+>brackets (ppr $ ms_mod mod_summary))+                (const ()) $ do     dflags <- getDynFlags     let src_filename  = ms_hspp_file mod_summary         maybe_src_buf = ms_hspp_buf  mod_summary@@ -337,19 +351,18 @@                  | otherwise = parseModule      case unP parseMod (mkPState dflags buf loc) of-        PFailed warnFn span err -> do-            logWarningsReportErrors (warnFn dflags)-            handleWarnings-            liftIO $ throwOneError (mkPlainErrMsg dflags span err)-+        PFailed pst ->+            handleWarningsThrowErrors (getMessages pst dflags)         POk pst rdr_module -> do-            logWarningsReportErrors (getMessages pst dflags)+            let (warns, errs) = getMessages pst dflags+            logWarnings warns             liftIO $ dumpIfSet_dyn dflags Opt_D_dump_parsed "Parser" $                                    ppr rdr_module             liftIO $ dumpIfSet_dyn dflags Opt_D_dump_parsed_ast "Parser AST" $                                    showAstData NoBlankSrcSpan rdr_module             liftIO $ dumpIfSet_dyn dflags Opt_D_source_stats "Source Statistics" $                                    ppSourceStats False rdr_module+            when (not $ isEmptyBag errs) $ throwErrors errs              -- To get the list of extra source files, we take the list             -- that the parser gave us,@@ -415,7 +428,8 @@             hs_env <- Hsc $ \e w -> return (e, w)             liftIO $ do               -- Validate Scopes-              case validateScopes $ getAsts $ hie_asts hieFile of+              let mdl = hie_module hieFile+              case validateScopes mdl $ getAsts $ hie_asts hieFile of                   [] -> putMsg dflags $ text "Got valid scopes"                   xs -> do                     putMsg dflags $ text "Got invalid scopes"@@ -485,6 +499,14 @@     hsc_env <- getHscEnv     dflags   <- getDynFlags +    -- -Wmissing-safe-haskell-mode+    when (not (safeHaskellModeEnabled dflags)+          && wopt Opt_WarnMissingSafeHaskellMode dflags) $+        logWarnings $ unitBag $+        makeIntoWarning (Reason Opt_WarnMissingSafeHaskellMode) $+        mkPlainWarnMsg dflags (getLoc (hpm_module mod)) $+        warnMissingSafeHaskellMode+     tcg_res <- {-# SCC "Typecheck-Rename" #-}                ioMsgMaybe $                    tcRnModule hsc_env sum@@ -531,6 +553,8 @@     errSafe t = quotes (pprMod t) <+> text "has been inferred as safe!"     errTwthySafe t = quotes (pprMod t)       <+> text "is marked as Trustworthy but has been inferred as safe!"+    warnMissingSafeHaskellMode = ppr (moduleName (ms_mod sum))+      <+> text "is missing Safe Haskell mode"  -- | Convert a typechecked module to Core hscDesugar :: HscEnv -> ModSummary -> TcGblEnv -> IO ModGuts@@ -649,7 +673,7 @@             -- save the interface that comes back from checkOldIface.             -- In one-shot mode we don't have the old iface until this             -- point, when checkOldIface reads it from the disk.-            let mb_old_hash = fmap mi_iface_hash mb_checked_iface+            let mb_old_hash = fmap (mi_iface_hash . mi_final_exts) mb_checked_iface              case mb_checked_iface of                 Just iface | not (recompileRequired recomp_reqd) ->@@ -690,7 +714,11 @@ -- Compilers -------------------------------------------------------------- --- Compile Haskell/boot in OneShot mode.+-- | Used by both OneShot and batch mode. Runs the pipeline HsSyn and Core parts+-- of the pipeline.+-- We return a interface if we already had an old one around and recompilation+-- was not needed. Otherwise it will be created during later passes when we+-- run the compilation pipeline. hscIncrementalCompile :: Bool                       -> Maybe TcGblEnv                       -> Maybe Messager@@ -699,9 +727,7 @@                       -> SourceModified                       -> Maybe ModIface                       -> (Int,Int)-                      -- HomeModInfo does not contain linkable, since we haven't-                      -- code-genned yet-                      -> IO (HscStatus, HomeModInfo)+                      -> IO (HscStatus, ModDetails, DynFlags) hscIncrementalCompile always_do_basic_recompilation_check m_tc_result     mHscMessage hsc_env' mod_summary source_modified mb_old_iface mod_index   = do@@ -730,38 +756,43 @@         -- file on disk was good enough.         Left iface -> do             -- Knot tying!  See Note [Knot-tying typecheckIface]-            hmi <- liftIO . fixIO $ \hmi' -> do+            details <- liftIO . fixIO $ \details' -> do                 let hsc_env' =                         hsc_env {                             hsc_HPT = addToHpt (hsc_HPT hsc_env)-                                        (ms_mod_name mod_summary) hmi'+                                        (ms_mod_name mod_summary) (HomeModInfo iface details' Nothing)                         }                 -- NB: This result is actually not that useful                 -- in one-shot mode, since we're not going to do                 -- any further typechecking.  It's much more useful                 -- in make mode, since this HMI will go into the HPT.                 details <- genModDetails hsc_env' iface-                return HomeModInfo{-                    hm_details = details,-                    hm_iface = iface,-                    hm_linkable = Nothing }-            return (HscUpToDate, hmi)+                return details+            return (HscUpToDate iface, details, dflags)         -- We finished type checking.  (mb_old_hash is the hash of         -- the interface that existed on disk; it's possible we had         -- to retypecheck but the resulting interface is exactly         -- the same.)-        Right (FrontendTypecheck tc_result, mb_old_hash) ->-            finish mod_summary tc_result mb_old_hash+        Right (FrontendTypecheck tc_result, mb_old_hash) -> do+            (status, mb_old_hash) <- finish mod_summary tc_result mb_old_hash+            return (status, mb_old_hash, dflags) --- Runs the post-typechecking frontend (desugar and simplify),--- and then generates and writes out the final interface. We want--- to write the interface AFTER simplification so we can get--- as up-to-date and good unfoldings and other info as possible--- in the interface file.+-- Runs the post-typechecking frontend (desugar and simplify). We want to+-- generate most of the interface as late as possible. This gets us up-to-date+-- and good unfoldings and other info in the interface file.+--+-- We might create a interface right away, in which case we also return the+-- updated HomeModInfo. But we might also need to run the backend first. In the+-- later case Status will be HscRecomp and we return a function from ModIface ->+-- HomeModInfo.+--+-- HscRecomp in turn will carry the information required to compute a interface+-- when passed the result of the code generator. So all this can and is done at+-- the call site of the backend code gen if it is run. finish :: ModSummary        -> TcGblEnv        -> Maybe Fingerprint-       -> Hsc (HscStatus, HomeModInfo)+       -> Hsc (HscStatus, ModDetails) finish summary tc_result mb_old_hash = do   hsc_env <- getHscEnv   let dflags = hsc_dflags hsc_env@@ -769,51 +800,80 @@       hsc_src = ms_hsc_src summary       should_desugar =         ms_mod summary /= gHC_PRIM && hsc_src == HsSrcFile+      mk_simple_iface :: Hsc (HscStatus, ModDetails)       mk_simple_iface = do+        (iface, mb_old_iface_hash, details) <- liftIO $+          hscSimpleIface hsc_env tc_result mb_old_hash++        liftIO $ hscMaybeWriteIface dflags iface mb_old_iface_hash (ms_location summary)+         let hsc_status =               case (target, hsc_src) of-                (HscNothing, _) -> HscNotGeneratingCode-                (_, HsBootFile) -> HscUpdateBoot-                (_, HsigFile) -> HscUpdateSig+                (HscNothing, _) -> HscNotGeneratingCode iface+                (_, HsBootFile) -> HscUpdateBoot iface+                (_, HsigFile) -> HscUpdateSig iface                 _ -> panic "finish"-        (iface, no_change, details) <- liftIO $-          hscSimpleIface hsc_env tc_result mb_old_hash-        return (iface, no_change, details, hsc_status)-  (iface, no_change, details, hsc_status) <--    -- we usually desugar even when we are not generating code, otherwise-    -- we would miss errors thrown by the desugaring (see #10600). The only-    -- exceptions are when the Module is Ghc.Prim or when-    -- it is not a HsSrcFile Module.-    if should_desugar-      then do-        desugared_guts0 <- hscDesugar' (ms_location summary) tc_result-        if target == HscNothing-          -- We are not generating code, so we can skip simplification-          -- and generate a simple interface.-          then mk_simple_iface-          else do-            plugins <- liftIO $ readIORef (tcg_th_coreplugins tc_result)-            desugared_guts <- hscSimplify' plugins desugared_guts0-            (iface, no_change, details, cgguts) <--              liftIO $ hscNormalIface hsc_env desugared_guts mb_old_hash-            return (iface, no_change, details, HscRecomp cgguts summary)-      else mk_simple_iface-  liftIO $ hscMaybeWriteIface dflags iface no_change summary-  return-    ( hsc_status-    , HomeModInfo-      {hm_details = details, hm_iface = iface, hm_linkable = Nothing})+        return (hsc_status, details) -hscMaybeWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO ()-hscMaybeWriteIface dflags iface no_change summary =+  if should_desugar+    then do+      -- We usually desugar even when we are not generating code, otherwise we+      -- would miss errors thrown by the desugaring (see #10600). The only+      -- exceptions are when the Module is Ghc.Prim or when it is not a+      -- HsSrcFile Module.+      desugared_guts0 <- hscDesugar' (ms_location summary) tc_result+      if target == HscNothing+        -- We are not generating code, so we can skip simplification+        -- and generate a simple interface.+        then mk_simple_iface+        else do+          plugins <- liftIO $ readIORef (tcg_th_coreplugins tc_result)+          desugared_guts <- hscSimplify' plugins desugared_guts0++          (cg_guts, details) <- {-# SCC "CoreTidy" #-}+              liftIO $ tidyProgram hsc_env desugared_guts++          let !partial_iface =+                {-# SCC "HscMain.mkPartialIface" #-}+                -- This `force` saves 2M residency in test T10370+                -- See Note [Avoiding space leaks in toIface*] for details.+                force (mkPartialIface hsc_env details desugared_guts)++          return ( HscRecomp { hscs_guts = cg_guts,+                               hscs_mod_location = ms_location summary,+                               hscs_partial_iface = partial_iface,+                               hscs_old_iface_hash = mb_old_hash,+                               hscs_iface_dflags = dflags },+                   details )+    else mk_simple_iface+++{-+Note [Writing interface files]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++We write interface files in HscMain.hs and DriverPipeline.hs using+hscMaybeWriteIface, but only once per compilation (twice with dynamic-too).++* If a compilation does NOT require (re)compilation of the hard code we call+  hscMaybeWriteIface inside HscMain:finish.+* If we run in One Shot mode and target bytecode we write it in compileOne'+* Otherwise we must be compiling to regular hard code and require recompilation.+  In this case we create the interface file inside RunPhase using the interface+  generator contained inside the HscRecomp status.+-}+hscMaybeWriteIface :: DynFlags -> ModIface -> Maybe Fingerprint -> ModLocation -> IO ()+hscMaybeWriteIface dflags iface old_iface location = do     let force_write_interface = gopt Opt_WriteInterface dflags         write_interface = case hscTarget dflags of                             HscNothing      -> False                             HscInterpreted  -> False                             _               -> True-    in when (write_interface || force_write_interface) $-            hscWriteIface dflags iface no_change summary+        no_change = old_iface == Just (mi_iface_hash (mi_final_exts iface)) +    when (write_interface || force_write_interface) $+          hscWriteIface dflags iface no_change location+ -------------------------------------------------------------- -- NoRecomp handlers --------------------------------------------------------------@@ -942,11 +1002,13 @@               -> return tcg_env'      warns dflags rules = listToBag $ map (warnRules dflags) rules++    warnRules :: DynFlags -> GenLocated SrcSpan (RuleDecl GhcTc) -> ErrMsg     warnRules dflags (L loc (HsRule { rd_name = n })) =         mkPlainWarnMsg dflags loc $             text "Rule \"" <> ftext (snd $ unLoc n) <> text "\" ignored" $+$             text "User defined rules are disabled under Safe Haskell"-    warnRules _ (L _ (XRuleDecl _)) = panic "hscCheckSafeImports"+    warnRules _ (L _ (XRuleDecl nec)) = noExtCon nec  -- | Validate that safe imported modules are actually safe.  For modules in the -- HomePackage (the package the module we are compiling in resides) this just@@ -1021,7 +1083,7 @@         | imv_is_safe v1 /= imv_is_safe v2         = do             dflags <- getDynFlags-            throwErrors $ unitBag $ mkPlainErrMsg dflags (imv_span v1)+            throwOneError $ mkPlainErrMsg dflags (imv_span v1)               (text "Module" <+> ppr (imv_name v1) <+>               (text $ "is imported both as a safe and unsafe import!"))         | otherwise@@ -1087,7 +1149,7 @@         iface <- lookup' m         case iface of             -- can't load iface to check trust!-            Nothing -> throwErrors $ unitBag $ mkPlainErrMsg dflags l+            Nothing -> throwOneError $ mkPlainErrMsg dflags l                          $ text "Can't load the interface file for" <+> ppr m                            <> text ", to check that it can be safely imported" @@ -1096,21 +1158,36 @@                 let trust = getSafeMode $ mi_trust iface'                     trust_own_pkg = mi_trust_pkg iface'                     -- check module is trusted-                    safeM = trust `elem` [Sf_Safe, Sf_Trustworthy]+                    safeM = trust `elem` [Sf_Safe, Sf_SafeInferred, Sf_Trustworthy]                     -- check package is trusted                     safeP = packageTrusted dflags trust trust_own_pkg m                     -- pkg trust reqs                     pkgRs = S.fromList . map fst $ filter snd $ dep_pkgs $ mi_deps iface'+                    -- warn if Safe module imports Safe-Inferred module.+                    warns = if wopt Opt_WarnInferredSafeImports dflags+                                && safeLanguageOn dflags+                                && trust == Sf_SafeInferred+                                then inferredImportWarn+                                else emptyBag                     -- General errors we throw but Safe errors we log                     errs = case (safeM, safeP) of                         (True, True ) -> emptyBag                         (True, False) -> pkgTrustErr                         (False, _   ) -> modTrustErr                 in do+                    logWarnings warns                     logWarnings errs                     return (trust == Sf_Trustworthy, pkgRs)                  where+                    inferredImportWarn = unitBag+                        $ makeIntoWarning (Reason Opt_WarnInferredSafeImports)+                        $ mkErrMsg dflags l (pkgQual dflags)+                        $ sep+                            [ text "Importing Safe-Inferred module "+                                <> ppr (moduleName m)+                                <> text " from explicitly Safe module"+                            ]                     pkgTrustErr = unitBag $ mkErrMsg dflags l (pkgQual dflags) $                         sep [ ppr (moduleName m)                                 <> text ": Can't be safely imported!"@@ -1133,18 +1210,18 @@     packageTrusted dflags _ _ _         | not (packageTrustOn dflags) = True     packageTrusted _ Sf_Safe  False _ = True+    packageTrusted _ Sf_SafeInferred False _ = True     packageTrusted dflags _ _ m         | isHomePkg dflags m = True         | otherwise = trusted $ getPackageDetails dflags (moduleUnitId m)      lookup' :: Module -> Hsc (Maybe ModIface)     lookup' m = do-        dflags <- getDynFlags         hsc_env <- getHscEnv         hsc_eps <- liftIO $ hscEPS hsc_env         let pkgIfaceT = eps_PIT hsc_eps             homePkgT  = hsc_HPT hsc_env-            iface     = lookupIfaceByModule dflags homePkgT pkgIfaceT m+            iface     = lookupIfaceByModule homePkgT pkgIfaceT m         -- the 'lookupIfaceByModule' method will always fail when calling from GHCi         -- as the compiler hasn't filled in the various module tables         -- so we need to call 'getModuleInterface' to load from disk@@ -1254,82 +1331,84 @@ -- Interface generators -------------------------------------------------------------- +-- | Generate a striped down interface file, e.g. for boot files or when ghci+-- generates interface files. See Note [simpleTidyPgm - mkBootModDetailsTc] hscSimpleIface :: HscEnv                -> TcGblEnv                -> Maybe Fingerprint-               -> IO (ModIface, Bool, ModDetails)+               -> IO (ModIface, Maybe Fingerprint, ModDetails) hscSimpleIface hsc_env tc_result mb_old_iface     = runHsc hsc_env $ hscSimpleIface' tc_result mb_old_iface  hscSimpleIface' :: TcGblEnv                 -> Maybe Fingerprint-                -> Hsc (ModIface, Bool, ModDetails)+                -> Hsc (ModIface, Maybe Fingerprint, ModDetails) hscSimpleIface' tc_result mb_old_iface = do     hsc_env   <- getHscEnv     details   <- liftIO $ mkBootModDetailsTc hsc_env tc_result     safe_mode <- hscGetSafeMode tc_result-    (new_iface, no_change)+    new_iface         <- {-# SCC "MkFinalIface" #-}            liftIO $-               mkIfaceTc hsc_env mb_old_iface safe_mode details tc_result+               mkIfaceTc hsc_env safe_mode details tc_result     -- And the answer is ...     liftIO $ dumpIfaceStats hsc_env-    return (new_iface, no_change, details)--hscNormalIface :: HscEnv-               -> ModGuts-               -> Maybe Fingerprint-               -> IO (ModIface, Bool, ModDetails, CgGuts)-hscNormalIface hsc_env simpl_result mb_old_iface =-    runHsc hsc_env $ hscNormalIface' simpl_result mb_old_iface+    return (new_iface, mb_old_iface, details) -hscNormalIface' :: ModGuts-                -> Maybe Fingerprint-                -> Hsc (ModIface, Bool, ModDetails, CgGuts)-hscNormalIface' simpl_result mb_old_iface = do-    hsc_env <- getHscEnv-    (cg_guts, details) <- {-# SCC "CoreTidy" #-}-                          liftIO $ tidyProgram hsc_env simpl_result+--------------------------------------------------------------+-- BackEnd combinators+--------------------------------------------------------------+{-+Note [Interface filename extensions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -    -- BUILD THE NEW ModIface and ModDetails-    --  and emit external core if necessary-    -- This has to happen *after* code gen so that the back-end-    -- info has been set. Not yet clear if it matters waiting-    -- until after code output-    (new_iface, no_change)-        <- {-# SCC "MkFinalIface" #-}-           liftIO $-               mkIface hsc_env mb_old_iface details simpl_result+ModLocation only contains the base names, however when generating dynamic files+the actual extension might differ from the default. -    liftIO $ dumpIfaceStats hsc_env+So we only load the base name from ModLocation and replace the actual extension+according to the information in DynFlags. -    -- Return the prepared code.-    return (new_iface, no_change, details, cg_guts)+If we generate a interface file right after running the core pipeline we will+have set -dynamic-too and potentially generate both interface files at the same+time. ------------------------------------------------------------------ BackEnd combinators---------------------------------------------------------------+If we generate a interface file after running the backend then dynamic-too won't+be set, however then the extension will be contained in the dynflags instead so+things still work out fine.+-} -hscWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO ()-hscWriteIface dflags iface no_change mod_summary = do-    let ifaceFile = ml_hi_file (ms_location mod_summary)+hscWriteIface :: DynFlags -> ModIface -> Bool -> ModLocation -> IO ()+hscWriteIface dflags iface no_change mod_location = do+    -- mod_location only contains the base name, so we rebuild the+    -- correct file extension from the dynflags.+    let ifaceBaseFile = ml_hi_file mod_location     unless no_change $-        {-# SCC "writeIface" #-}-        writeIfaceFile dflags ifaceFile iface+        let ifaceFile = buildIfName ifaceBaseFile (hiSuf dflags)+        in  {-# SCC "writeIface" #-}+            writeIfaceFile dflags ifaceFile iface     whenGeneratingDynamicToo dflags $ do         -- TODO: We should do a no_change check for the dynamic         --       interface file too-        -- TODO: Should handle the dynamic hi filename properly-        let dynIfaceFile = replaceExtension ifaceFile (dynHiSuf dflags)-            dynIfaceFile' = addBootSuffix_maybe (mi_boot iface) dynIfaceFile-            dynDflags = dynamicTooMkDynamicDynFlags dflags-        writeIfaceFile dynDflags dynIfaceFile' iface+        -- When we generate iface files after core+        let dynDflags = dynamicTooMkDynamicDynFlags dflags+            -- dynDflags will have set hiSuf correctly.+            dynIfaceFile = buildIfName ifaceBaseFile (hiSuf dynDflags) +        writeIfaceFile dynDflags dynIfaceFile iface+  where+    buildIfName :: String -> String -> String+    buildIfName baseName suffix+      | Just name <- outputHi dflags+      = name+      | otherwise+      = let with_hi = replaceExtension baseName suffix+        in  addBootSuffix_maybe (mi_boot iface) with_hi+ -- | Compile to hard-code.-hscGenHardCode :: HscEnv -> CgGuts -> ModSummary -> FilePath+hscGenHardCode :: HscEnv -> CgGuts -> ModLocation -> FilePath                -> IO (FilePath, Maybe FilePath, [(ForeignSrcLang, FilePath)])                -- ^ @Just f@ <=> _stub.c is f-hscGenHardCode hsc_env cgguts mod_summary output_filename = do+hscGenHardCode hsc_env cgguts location output_filename = do         let CgGuts{ -- This is the last use of the ModGuts in a compilation.                     -- From now on, we just use the bits we need.                     cg_module   = this_mod,@@ -1340,7 +1419,6 @@                     cg_dep_pkgs = dependencies,                     cg_hpc_info = hpc_info } = cgguts             dflags = hsc_dflags hsc_env-            location = ms_location mod_summary             data_tycons = filter isDataTyCon tycons             -- cg_tycons includes newtypes, for the benefit of External Core,             -- but we don't generate any code for newtypes@@ -1368,10 +1446,10 @@         -- top-level function, so showPass isn't very useful here.         -- Hence we have one showPass for the whole backend, the         -- next showPass after this will be "Assembler".-        withTiming (pure dflags)+        withTiming dflags                    (text "CodeGen"<+>brackets (ppr this_mod))                    (const ()) $ do-            cmms <- {-# SCC "StgCmm" #-}+            cmms <- {-# SCC "StgToCmm" #-}                             doCodeGen hsc_env this_mod data_tycons                                 cost_centre_info                                 stg_binds hpc_info@@ -1385,7 +1463,7 @@                             return a                 rawcmms1 = Stream.mapM dump rawcmms0 -            (output_filename, (_stub_h_exists, stub_c_exists), foreign_fps)+            (output_filename, (_stub_h_exists, stub_c_exists), foreign_fps, ())                 <- {-# SCC "codeOutput" #-}                   codeOutput dflags this_mod output_filename location                   foreign_stubs foreign_files dependencies rawcmms1@@ -1394,9 +1472,9 @@  hscInteractive :: HscEnv                -> CgGuts-               -> ModSummary+               -> ModLocation                -> IO (Maybe FilePath, CompiledByteCode, [SptEntry])-hscInteractive hsc_env cgguts mod_summary = do+hscInteractive hsc_env cgguts location = do     let dflags = hsc_dflags hsc_env     let CgGuts{ -- This is the last use of the ModGuts in a compilation.                 -- From now on, we just use the bits we need.@@ -1407,7 +1485,6 @@                cg_modBreaks = mod_breaks,                cg_spt_entries = spt_entries } = cgguts -        location = ms_location mod_summary         data_tycons = filter isDataTyCon tycons         -- cg_tycons includes newtypes, for the benefit of External Core,         -- but we don't generate any code for newtypes@@ -1431,7 +1508,7 @@     let dflags = hsc_dflags hsc_env     cmm <- ioMsgMaybe $ parseCmmFile dflags filename     liftIO $ do-        dumpIfSet_dyn dflags Opt_D_dump_cmm_verbose "Parsed Cmm" (ppr cmm)+        dumpIfSet_dyn dflags Opt_D_dump_cmm_verbose_by_proc "Parsed Cmm" (ppr cmm)         let -- Make up a module name to give the NCG. We can't pass bottom here             -- lest we reproduce #11784.             mod_name = mkModuleName $ "Cmm$" ++ FilePath.takeFileName filename@@ -1463,9 +1540,10 @@     let dflags = hsc_dflags hsc_env      let stg_binds_w_fvs = annTopBindingsFreeVars stg_binds+     let cmm_stream :: Stream IO CmmGroup ()-        cmm_stream = {-# SCC "StgCmm" #-}-            StgCmm.codeGen dflags this_mod data_tycons+        cmm_stream = {-# SCC "StgToCmm" #-}+            StgToCmm.codeGen dflags this_mod data_tycons                            cost_centre_info stg_binds_w_fvs hpc_info          -- codegen consumes a stream of CmmGroup, and produces a new@@ -1479,31 +1557,11 @@          ppr_stream1 = Stream.mapM dump1 cmm_stream -    -- We are building a single SRT for the entire module, so-    -- we must thread it through all the procedures as we cps-convert them.-    us <- mkSplitUniqSupply 'S'--    -- When splitting, we generate one SRT per split chunk, otherwise-    -- we generate one SRT for the whole module.-    let-     pipeline_stream-      | gopt Opt_SplitObjs dflags || gopt Opt_SplitSections dflags ||-        osSubsectionsViaSymbols (platformOS (targetPlatform dflags))-        = {-# SCC "cmmPipeline" #-}-          let run_pipeline us cmmgroup = do-                (_topSRT, cmmgroup) <--                  cmmPipeline hsc_env (emptySRT this_mod) cmmgroup-                return (us, cmmgroup)--          in do _ <- Stream.mapAccumL run_pipeline us ppr_stream1-                return ()--      | otherwise-        = {-# SCC "cmmPipeline" #-}-          let run_pipeline = cmmPipeline hsc_env-          in void $ Stream.mapAccumL run_pipeline (emptySRT this_mod) ppr_stream1+        pipeline_stream+           = {-# SCC "cmmPipeline" #-}+             let run_pipeline = cmmPipeline hsc_env+             in void $ Stream.mapAccumL run_pipeline (emptySRT this_mod) ppr_stream1 -    let         dump2 a = do dumpIfSet_dyn dflags Opt_D_dump_cmm                         "Output Cmm" (ppr a)                      return a@@ -1750,7 +1808,7 @@ hscKcType hsc_env0 normalise str = runInteractiveHsc hsc_env0 $ do     hsc_env <- getHscEnv     ty <- hscParseType str-    ioMsgMaybe $ tcRnType hsc_env normalise ty+    ioMsgMaybe $ tcRnType hsc_env DefaultFlexi normalise ty  hscParseExpr :: String -> Hsc (LHsExpr GhcPs) hscParseExpr expr = do@@ -1758,7 +1816,7 @@   maybe_stmt <- hscParseStmt expr   case maybe_stmt of     Just (L _ (BodyStmt _ expr _ _)) -> return expr-    _ -> throwErrors $ unitBag $ mkPlainErrMsg (hsc_dflags hsc_env) noSrcSpan+    _ -> throwOneError $ mkPlainErrMsg (hsc_dflags hsc_env) noSrcSpan       (text "not an expression:" <+> quotes (text expr))  hscParseStmt :: String -> Hsc (Maybe (GhciLStmt GhcPs))@@ -1783,7 +1841,7 @@ hscParseThingWithLocation :: (Outputable thing, Data thing) => String -> Int                           -> Lexer.P thing -> String -> Hsc thing hscParseThingWithLocation source linenumber parser str-  = withTiming getDynFlags+  = withTimingD                (text "Parser [source]")                (const ()) $ {-# SCC "Parser" #-} do     dflags <- getDynFlags@@ -1792,11 +1850,8 @@         loc = mkRealSrcLoc (fsLit source) linenumber 1      case unP parser (mkPState dflags buf loc) of-        PFailed warnFn span err -> do-            logWarningsReportErrors (warnFn dflags)-            handleWarnings-            let msg = mkPlainErrMsg dflags span err-            throwErrors $ unitBag msg+        PFailed pst -> do+            handleWarningsThrowErrors (getMessages pst dflags)          POk pst thing -> do             logWarningsReportErrors (getMessages pst dflags)
main/HscStats.hs view
@@ -13,7 +13,7 @@ import GhcPrelude  import Bag-import HsSyn+import GHC.Hs import Outputable import SrcLoc import Util@@ -122,13 +122,14 @@     import_info (dL->L _ (ImportDecl { ideclSafe = safe, ideclQualified = qual                                      , ideclAs = as, ideclHiding = spec }))         = add7 (1, safe_info safe, qual_info qual, as_info as, 0,0,0) (spec_info spec)-    import_info (dL->L _ (XImportDecl _)) = panic "import_info"+    import_info (dL->L _ (XImportDecl nec)) = noExtCon nec     import_info _ = panic " import_info: Impossible Match"                              -- due to #15884 -    safe_info = qual_info-    qual_info False  = 0-    qual_info True   = 1+    safe_info False = 0+    safe_info True = 1+    qual_info NotQualified = 0+    qual_info _  = 1     as_info Nothing  = 0     as_info (Just _) = 1     spec_info Nothing           = (0,0,0,0,1,0,0)@@ -162,8 +163,8 @@                    ss, is, length ats, length adts)       where         methods = map unLoc $ bagToList inst_meths-    inst_info (ClsInstD _ (XClsInstDecl _)) = panic "inst_info"-    inst_info (XInstDecl _)                 = panic "inst_info"+    inst_info (ClsInstD _ (XClsInstDecl nec)) = noExtCon nec+    inst_info (XInstDecl nec)                 = noExtCon nec      -- TODO: use Sum monoid     addpr :: (Int,Int,Int) -> Int
main/HscTypes.hs view
@@ -5,8 +5,15 @@ -}  {-# LANGUAGE CPP, ScopedTypeVariables #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE DataKinds #-}  -- | Types for the per-module compiler module HscTypes (@@ -30,8 +37,10 @@         ModGuts(..), CgGuts(..), ForeignStubs(..), appendStubC,         ImportedMods, ImportedBy(..), importedByUser, ImportedModsVal(..), SptEntry(..),         ForeignSrcLang(..),+        phaseForeignLanguage, -        ModSummary(..), ms_imps, ms_installed_mod, ms_mod_name, showModMsg, isBootSummary,+        ModSummary(..), ms_imps, ms_installed_mod, ms_mod_name, ms_home_imps,+        home_imps, ms_home_allimps, ms_home_srcimps, showModMsg, isBootSummary,         msHsFilePath, msHiFilePath, msObjFilePath,         SourceModified(..), isTemplateHaskellOrQQNonBoot, @@ -50,7 +59,7 @@         -- * State relating to known packages         ExternalPackageState(..), EpsStats(..), addEpsInStats,         PackageTypeEnv, PackageIfaceTable, emptyPackageIfaceTable,-        lookupIfaceByModule, emptyModIface, lookupHptByModule,+        lookupIfaceByModule, emptyPartialModIface, emptyFullModIface, lookupHptByModule,          PackageInstEnv, PackageFamInstEnv, PackageRuleBase,         PackageCompleteMatchMap,@@ -77,7 +86,8 @@         mkQualPackage, mkQualModule, pkgQual,          -- * Interfaces-        ModIface(..), mkIfaceWarnCache, mkIfaceHashCache, mkIfaceFixCache,+        ModIface, PartialModIface, ModIface_(..), ModIfaceBackend(..),+        mkIfaceWarnCache, mkIfaceHashCache, mkIfaceFixCache,         emptyIfaceWarnCache, mi_boot, mi_fix,         mi_semantic_module,         mi_free_holes,@@ -133,7 +143,7 @@          -- * Compilation errors and warnings         SourceError, GhcApiError, mkSrcErr, srcErrorMessages, mkApiErr,-        throwErrors, throwOneError, handleSourceError,+        throwOneError, throwErrors, handleSourceError,         handleFlagWarnings, printOrThrowWarnings,          -- * COMPLETE signature@@ -152,7 +162,7 @@ import GHC.ForeignSrcLang  import UniqFM-import HsSyn+import GHC.Hs import RdrName import Avail import Module@@ -180,8 +190,10 @@ import Packages hiding  ( Version(..) ) import CmdLineParser import DynFlags+import LinkerTypes      ( DynLinker, Linkable(..), Unlinked(..), SptEntry(..) ) import DriverPhases     ( Phase, HscSource(..), hscSourceString                         , isHsBootOrSig, isHsigFile )+import qualified DriverPhases as Phase import BasicTypes import IfaceSyn import Maybes@@ -197,7 +209,7 @@ import Binary import ErrUtils import NameCache-import Platform+import GHC.Platform import Util import UniqDSet import GHC.Serialized   ( Serialized )@@ -211,6 +223,7 @@ import System.FilePath import Control.Concurrent import System.Process   ( ProcessHandle )+import Control.DeepSeq  -- ----------------------------------------------------------------------------- -- Compilation state@@ -218,19 +231,41 @@  -- | Status of a compilation to hard-code data HscStatus-    = HscNotGeneratingCode-    | HscUpToDate-    | HscUpdateBoot-    | HscUpdateSig-    | HscRecomp CgGuts ModSummary+    -- | Nothing to do.+    = HscNotGeneratingCode ModIface+    -- | Nothing to do because code already exists.+    | HscUpToDate ModIface+    -- | Update boot file result.+    | HscUpdateBoot ModIface+    -- | Generate signature file (backpack)+    | HscUpdateSig ModIface+    -- | Recompile this module.+    | HscRecomp+        { hscs_guts       :: CgGuts+          -- ^ Information for the code generator.+        , hscs_mod_location :: !ModLocation+          -- ^ Module info+        , hscs_partial_iface  :: !PartialModIface+          -- ^ Partial interface+        , hscs_old_iface_hash :: !(Maybe Fingerprint)+          -- ^ Old interface hash for this compilation, if an old interface file+          -- exists. Pass to `hscMaybeWriteIface` when writing the interface to+          -- avoid updating the existing interface when the interface isn't+          -- changed.+        , hscs_iface_dflags :: !DynFlags+          -- ^ Generate final iface using this DynFlags.+          -- FIXME (osa): I don't understand why this is necessary, but I spent+          -- almost two days trying to figure this out and I couldn't .. perhaps+          -- someone who understands this code better will remove this later.+        }+-- Should HscStatus contain the HomeModInfo?+-- All places where we return a status we also return a HomeModInfo.  -- ----------------------------------------------------------------------------- -- The Hsc monad: Passing an environment and warning state  newtype Hsc a = Hsc (HscEnv -> WarningMessages -> IO (a, WarningMessages))--instance Functor Hsc where-    fmap = liftM+    deriving (Functor)  instance Applicative Hsc where     pure a = Hsc $ \_ w -> return (a, w)@@ -278,12 +313,11 @@ mkApiErr :: DynFlags -> SDoc -> GhcApiError mkApiErr dflags msg = GhcApiError (showSDoc dflags msg) --- | Throw some errors. throwErrors :: MonadIO io => ErrorMessages -> io a throwErrors = liftIO . throwIO . mkSrcErr -throwOneError :: MonadIO m => ErrMsg -> m ab-throwOneError err = liftIO $ throwIO $ mkSrcErr $ unitBag err+throwOneError :: MonadIO io => ErrMsg -> io a+throwOneError = throwErrors . unitBag  -- | A source error is an error that is caused by one or more errors in the -- source code.  A 'SourceError' is thrown by many functions in the@@ -374,8 +408,10 @@  -- | HscEnv is like 'Session', except that some of the fields are immutable. -- An HscEnv is used to compile a single module from plain Haskell source--- code (after preprocessing) to either C, assembly or C--.  Things like--- the module graph don't change during a single compilation.+-- code (after preprocessing) to either C, assembly or C--. It's also used+-- to store the dynamic linker state to allow for multiple linkers in the+-- same address space.+-- Things like the module graph don't change during a single compilation. -- -- Historical note: \"hsc\" used to be the name of the compiler binary, -- when there was a separate driver and compiler.  To compile a single@@ -437,6 +473,10 @@         , hsc_iserv :: MVar (Maybe IServ)                 -- ^ interactive server process.  Created the first                 -- time it is needed.++        , hsc_dynLinker :: DynLinker+                -- ^ dynamic linker.+  }  -- Note [hsc_type_env_var hack]@@ -644,12 +684,11 @@ -- | Find the 'ModIface' for a 'Module', searching in both the loaded home -- and external package module information lookupIfaceByModule-        :: DynFlags-        -> HomePackageTable+        :: HomePackageTable         -> PackageIfaceTable         -> Module         -> Maybe ModIface-lookupIfaceByModule _dflags hpt pit mod+lookupIfaceByModule hpt pit mod   = case lookupHptByModule hpt mod of        Just hm -> Just (hm_iface hm)        Nothing -> lookupModuleEnv pit mod@@ -715,7 +754,7 @@                     Nothing -> pprTrace "WARNING in hptSomeThingsBelowUs" msg []           msg = vcat [text "missing module" <+> ppr mod,                       text "Probable cause: out-of-date interface files"]-                        -- This really shouldn't happen, but see Trac #962+                        -- This really shouldn't happen, but see #962          -- And get its dfuns     , thing <- things ]@@ -848,6 +887,86 @@ ************************************************************************ -} +{- Note [Interface file stages]+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Interface files have two possible stages.++* A partial stage built from the result of the core pipeline.+* A fully instantiated form. Which also includes fingerprints and+  potentially information provided by backends.++We can build a full interface file two ways:+* Directly from a partial one:+  Then we omit backend information and mostly compute fingerprints.+* From a partial one + information produced by a backend.+  Then we store the provided information and fingerprint both.+-}++type PartialModIface = ModIface_ 'ModIfaceCore+type ModIface = ModIface_ 'ModIfaceFinal++-- | Extends a PartialModIface with information which is either:+-- * Computed after codegen+-- * Or computed just before writing the iface to disk. (Hashes)+-- In order to fully instantiate it.+data ModIfaceBackend = ModIfaceBackend+  { mi_iface_hash :: !Fingerprint+    -- ^ Hash of the whole interface+  , mi_mod_hash :: !Fingerprint+    -- ^ Hash of the ABI only+  , mi_flag_hash :: !Fingerprint+    -- ^ Hash of the important flags used when compiling the module, excluding+    -- optimisation flags+  , mi_opt_hash :: !Fingerprint+    -- ^ Hash of optimisation flags+  , mi_hpc_hash :: !Fingerprint+    -- ^ Hash of hpc flags+  , mi_plugin_hash :: !Fingerprint+    -- ^ Hash of plugins+  , mi_orphan :: !WhetherHasOrphans+    -- ^ Whether this module has orphans+  , mi_finsts :: !WhetherHasFamInst+    -- ^ Whether this module has family instances. See Note [The type family+    -- instance consistency story].+  , mi_exp_hash :: !Fingerprint+    -- ^ Hash of export list+  , mi_orphan_hash :: !Fingerprint+    -- ^ Hash for orphan rules, class and family instances combined++    -- Cached environments for easy lookup. These are computed (lazily) from+    -- other fields and are not put into the interface file.+    -- Not really produced by the backend but there is no need to create them+    -- any earlier.+  , mi_warn_fn :: !(OccName -> Maybe WarningTxt)+    -- ^ Cached lookup for 'mi_warns'+  , mi_fix_fn :: !(OccName -> Maybe Fixity)+    -- ^ Cached lookup for 'mi_fixities'+  , mi_hash_fn :: !(OccName -> Maybe (OccName, Fingerprint))+    -- ^ Cached lookup for 'mi_decls'. The @Nothing@ in 'mi_hash_fn' means that+    -- the thing isn't in decls. It's useful to know that when seeing if we are+    -- up to date wrt. the old interface. The 'OccName' is the parent of the+    -- name, if it has one.+  }++data ModIfacePhase+  = ModIfaceCore+  -- ^ Partial interface built based on output of core pipeline.+  | ModIfaceFinal++-- | Selects a IfaceDecl representation.+-- For fully instantiated interfaces we also maintain+-- a fingerprint, which is used for recompilation checks.+type family IfaceDeclExts (phase :: ModIfacePhase) where+  IfaceDeclExts 'ModIfaceCore = IfaceDecl+  IfaceDeclExts 'ModIfaceFinal = (Fingerprint, IfaceDecl)++type family IfaceBackendExts (phase :: ModIfacePhase) where+  IfaceBackendExts 'ModIfaceCore = ()+  IfaceBackendExts 'ModIfaceFinal = ModIfaceBackend+++ -- | A 'ModIface' plus a 'ModDetails' summarises everything we know -- about a compiled module.  The 'ModIface' is the stuff *before* linking, -- and can be written out to an interface file. The 'ModDetails is after@@ -857,23 +976,11 @@ -- except that we explicitly make the 'mi_decls' and a few other fields empty; -- as when reading we consolidate the declarations etc. into a number of indexed -- maps and environments in the 'ExternalPackageState'.-data ModIface+data ModIface_ (phase :: ModIfacePhase)   = ModIface {         mi_module     :: !Module,             -- ^ Name of the module we are for         mi_sig_of     :: !(Maybe Module),     -- ^ Are we a sig of another mod?-        mi_iface_hash :: !Fingerprint,        -- ^ Hash of the whole interface-        mi_mod_hash   :: !Fingerprint,        -- ^ Hash of the ABI only-        mi_flag_hash  :: !Fingerprint,        -- ^ Hash of the important flags-                                              -- used when compiling the module,-                                              -- excluding optimisation flags-        mi_opt_hash   :: !Fingerprint,        -- ^ Hash of optimisation flags-        mi_hpc_hash   :: !Fingerprint,        -- ^ Hash of hpc flags-        mi_plugin_hash :: !Fingerprint,       -- ^ Hash of plugins -        mi_orphan     :: !WhetherHasOrphans,  -- ^ Whether this module has orphans-        mi_finsts     :: !WhetherHasFamInst,-                -- ^ Whether this module has family instances.-                -- See Note [The type family instance consistency story].         mi_hsc_src    :: !HscSource,          -- ^ Boot? Signature?          mi_deps     :: Dependencies,@@ -894,8 +1001,6 @@                 -- Records the modules that are the declaration points for things                 -- exported by this module, and the 'OccName's of those things -        mi_exp_hash :: !Fingerprint,-                -- ^ Hash of export list          mi_used_th  :: !Bool,                 -- ^ Module required TH splices when it was compiled.@@ -914,7 +1019,7 @@                 -- NOT STRICT!  we read this field lazily from the interface file  -        mi_decls    :: [(Fingerprint,IfaceDecl)],+        mi_decls    :: [IfaceDeclExts phase],                 -- ^ Type, class and variable declarations                 -- The hash of an Id changes if its fixity or deprecations change                 --      (as well as its type of course)@@ -940,23 +1045,7 @@         mi_insts       :: [IfaceClsInst],     -- ^ Sorted class instance         mi_fam_insts   :: [IfaceFamInst],  -- ^ Sorted family instances         mi_rules       :: [IfaceRule],     -- ^ Sorted rules-        mi_orphan_hash :: !Fingerprint,    -- ^ Hash for orphan rules, class and family-                                           -- instances combined -                -- Cached environments for easy lookup-                -- These are computed (lazily) from other fields-                -- and are not put into the interface file-        mi_warn_fn   :: OccName -> Maybe WarningTxt,-                -- ^ Cached lookup for 'mi_warns'-        mi_fix_fn    :: OccName -> Maybe Fixity,-                -- ^ Cached lookup for 'mi_fixities'-        mi_hash_fn   :: OccName -> Maybe (OccName, Fingerprint),-                -- ^ Cached lookup for 'mi_decls'.-                -- The @Nothing@ in 'mi_hash_fn' means that the thing-                -- isn't in decls. It's useful to know that when-                -- seeing if we are up to date wrt. the old interface.-                -- The 'OccName' is the parent of the name, if it has one.-         mi_hpc       :: !AnyHpcUsage,                 -- ^ True if this program uses Hpc at any point in the program. @@ -978,8 +1067,12 @@         mi_decl_docs :: DeclDocMap,                 -- ^ Docs on declarations. -        mi_arg_docs :: ArgDocMap+        mi_arg_docs :: ArgDocMap,                 -- ^ Docs on arguments.++        mi_final_exts :: !(IfaceBackendExts phase)+                -- ^ Either `()` or `ModIfaceBackend` for+                -- a fully instantiated interface.      }  -- | Old-style accessor for whether or not the ModIface came from an hs-boot@@ -990,12 +1083,12 @@ -- | Lookups up a (possibly cached) fixity from a 'ModIface'. If one cannot be -- found, 'defaultFixity' is returned instead. mi_fix :: ModIface -> OccName -> Fixity-mi_fix iface name = mi_fix_fn iface name `orElse` defaultFixity+mi_fix iface name = mi_fix_fn (mi_final_exts iface) name `orElse` defaultFixity  -- | The semantic module for this interface; e.g., if it's a interface -- for a signature, if 'mi_module' is @p[A=<A>]:A@, 'mi_semantic_module' -- will be @<A>@.-mi_semantic_module :: ModIface -> Module+mi_semantic_module :: ModIface_ a -> Module mi_semantic_module iface = case mi_sig_of iface of                             Nothing -> mi_module iface                             Just mod -> mod@@ -1033,18 +1126,9 @@                  mi_module    = mod,                  mi_sig_of    = sig_of,                  mi_hsc_src   = hsc_src,-                 mi_iface_hash= iface_hash,-                 mi_mod_hash  = mod_hash,-                 mi_flag_hash = flag_hash,-                 mi_opt_hash  = opt_hash,-                 mi_hpc_hash  = hpc_hash,-                 mi_plugin_hash = plugin_hash,-                 mi_orphan    = orphan,-                 mi_finsts    = hasFamInsts,                  mi_deps      = deps,                  mi_usages    = usages,                  mi_exports   = exports,-                 mi_exp_hash  = exp_hash,                  mi_used_th   = used_th,                  mi_fixities  = fixities,                  mi_warns     = warns,@@ -1053,14 +1137,25 @@                  mi_insts     = insts,                  mi_fam_insts = fam_insts,                  mi_rules     = rules,-                 mi_orphan_hash = orphan_hash,                  mi_hpc       = hpc_info,                  mi_trust     = trust,                  mi_trust_pkg = trust_pkg,                  mi_complete_sigs = complete_sigs,                  mi_doc_hdr   = doc_hdr,                  mi_decl_docs = decl_docs,-                 mi_arg_docs  = arg_docs }) = do+                 mi_arg_docs  = arg_docs,+                 mi_final_exts = ModIfaceBackend {+                   mi_iface_hash = iface_hash,+                   mi_mod_hash = mod_hash,+                   mi_flag_hash = flag_hash,+                   mi_opt_hash = opt_hash,+                   mi_hpc_hash = hpc_hash,+                   mi_plugin_hash = plugin_hash,+                   mi_orphan = orphan,+                   mi_finsts = hasFamInsts,+                   mi_exp_hash = exp_hash,+                   mi_orphan_hash = orphan_hash+                 }}) = do         put_ bh mod         put_ bh sig_of         put_ bh hsc_src@@ -1129,18 +1224,9 @@                  mi_module      = mod,                  mi_sig_of      = sig_of,                  mi_hsc_src     = hsc_src,-                 mi_iface_hash  = iface_hash,-                 mi_mod_hash    = mod_hash,-                 mi_flag_hash   = flag_hash,-                 mi_opt_hash    = opt_hash,-                 mi_hpc_hash    = hpc_hash,-                 mi_plugin_hash = plugin_hash,-                 mi_orphan      = orphan,-                 mi_finsts      = hasFamInsts,                  mi_deps        = deps,                  mi_usages      = usages,                  mi_exports     = exports,-                 mi_exp_hash    = exp_hash,                  mi_used_th     = used_th,                  mi_anns        = anns,                  mi_fixities    = fixities,@@ -1150,40 +1236,41 @@                  mi_insts       = insts,                  mi_fam_insts   = fam_insts,                  mi_rules       = rules,-                 mi_orphan_hash = orphan_hash,                  mi_hpc         = hpc_info,                  mi_trust       = trust,                  mi_trust_pkg   = trust_pkg,                         -- And build the cached values-                 mi_warn_fn     = mkIfaceWarnCache warns,-                 mi_fix_fn      = mkIfaceFixCache fixities,-                 mi_hash_fn     = mkIfaceHashCache decls,                  mi_complete_sigs = complete_sigs,                  mi_doc_hdr     = doc_hdr,                  mi_decl_docs   = decl_docs,-                 mi_arg_docs    = arg_docs })+                 mi_arg_docs    = arg_docs,+                 mi_final_exts = ModIfaceBackend {+                   mi_iface_hash = iface_hash,+                   mi_mod_hash = mod_hash,+                   mi_flag_hash = flag_hash,+                   mi_opt_hash = opt_hash,+                   mi_hpc_hash = hpc_hash,+                   mi_plugin_hash = plugin_hash,+                   mi_orphan = orphan,+                   mi_finsts = hasFamInsts,+                   mi_exp_hash = exp_hash,+                   mi_orphan_hash = orphan_hash,+                   mi_warn_fn = mkIfaceWarnCache warns,+                   mi_fix_fn = mkIfaceFixCache fixities,+                   mi_hash_fn = mkIfaceHashCache decls+                 }})  -- | The original names declared of a certain module that are exported type IfaceExport = AvailInfo --- | Constructs an empty ModIface-emptyModIface :: Module -> ModIface-emptyModIface mod+emptyPartialModIface :: Module -> PartialModIface+emptyPartialModIface mod   = ModIface { mi_module      = mod,                mi_sig_of      = Nothing,-               mi_iface_hash  = fingerprint0,-               mi_mod_hash    = fingerprint0,-               mi_flag_hash   = fingerprint0,-               mi_opt_hash    = fingerprint0,-               mi_hpc_hash    = fingerprint0,-               mi_plugin_hash = fingerprint0,-               mi_orphan      = False,-               mi_finsts      = False,                mi_hsc_src     = HsSrcFile,                mi_deps        = noDependencies,                mi_usages      = [],                mi_exports     = [],-               mi_exp_hash    = fingerprint0,                mi_used_th     = False,                mi_fixities    = [],                mi_warns       = NoWarnings,@@ -1193,18 +1280,33 @@                mi_rules       = [],                mi_decls       = [],                mi_globals     = Nothing,-               mi_orphan_hash = fingerprint0,-               mi_warn_fn     = emptyIfaceWarnCache,-               mi_fix_fn      = emptyIfaceFixCache,-               mi_hash_fn     = emptyIfaceHashCache,                mi_hpc         = False,                mi_trust       = noIfaceTrustInfo,                mi_trust_pkg   = False,                mi_complete_sigs = [],                mi_doc_hdr     = Nothing,                mi_decl_docs   = emptyDeclDocMap,-               mi_arg_docs    = emptyArgDocMap }+               mi_arg_docs    = emptyArgDocMap,+               mi_final_exts        = () } +emptyFullModIface :: Module -> ModIface+emptyFullModIface mod =+    (emptyPartialModIface mod)+      { mi_decls = []+      , mi_final_exts = ModIfaceBackend+        { mi_iface_hash = fingerprint0,+          mi_mod_hash = fingerprint0,+          mi_flag_hash = fingerprint0,+          mi_opt_hash = fingerprint0,+          mi_hpc_hash = fingerprint0,+          mi_plugin_hash = fingerprint0,+          mi_orphan = False,+          mi_finsts = False,+          mi_exp_hash = fingerprint0,+          mi_orphan_hash = fingerprint0,+          mi_warn_fn = emptyIfaceWarnCache,+          mi_fix_fn = emptyIfaceFixCache,+          mi_hash_fn = emptyIfaceHashCache } }  -- | Constructs cache for the 'mi_hash_fn' field of a 'ModIface' mkIfaceHashCache :: [(Fingerprint,IfaceDecl)]@@ -1398,13 +1500,6 @@ appendStubC NoStubs            c_code = ForeignStubs empty c_code appendStubC (ForeignStubs h c) c_code = ForeignStubs h (c $$ c_code) --- | An entry to be inserted into a module's static pointer table.--- See Note [Grand plan for static forms] in StaticPtrTable.-data SptEntry = SptEntry Id Fingerprint--instance Outputable SptEntry where-  ppr (SptEntry id fpr) = ppr id <> colon <+> ppr fpr- {- ************************************************************************ *                                                                      *@@ -1547,7 +1642,7 @@         Prelude> instance Eq T where ...         Prelude> instance Eq T where ...   -- This one overrides -It's exactly the same for type-family instances.  See Trac #7102+It's exactly the same for type-family instances.  See #7102 -}  -- | Interactive context, recording information about the state of the@@ -1670,7 +1765,7 @@ extendInteractiveContext ictxt new_tythings new_cls_insts new_fam_insts defaults fix_env   = ictxt { ic_mod_index  = ic_mod_index ictxt + 1                             -- Always bump this; even instances should create-                            -- a new mod_index (Trac #9426)+                            -- a new mod_index (#9426)           , ic_tythings   = new_tythings ++ old_tythings           , ic_rn_gbl_env = ic_rn_gbl_env ictxt `icExtendGblRdrEnv` new_tythings           , ic_instances  = ( new_cls_insts ++ old_cls_insts@@ -1738,7 +1833,7 @@     -- are not implicit-ids, and must appear in the TypeEnv.  But they     -- will also be brought into scope by the corresponding (ATyCon     -- tc).  And we want the latter, because that has the correct-    -- parent (Trac #10520)+    -- parent (#10520)     is_sub_bndr (AnId f) = case idDetails f of                              RecSelId {}  -> True                              ClassOpId {} -> True@@ -2416,7 +2511,7 @@ noDependencies = Deps [] [] [] [] []  -- | Records modules for which changes may force recompilation of this module--- See wiki: http://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance+-- See wiki: https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance -- -- This differs from Dependencies.  A module X may be in the dep_mods of this -- module (via an import chain) but if we don't use anything from X it won't@@ -2800,6 +2895,28 @@   where     mk_additional_import mod_nm = (Nothing, noLoc mod_nm) +home_imps :: [(Maybe FastString, Located ModuleName)] -> [Located ModuleName]+home_imps imps = [ lmodname |  (mb_pkg, lmodname) <- imps,+                                  isLocal mb_pkg ]+  where isLocal Nothing = True+        isLocal (Just pkg) | pkg == fsLit "this" = True -- "this" is special+        isLocal _ = False++ms_home_allimps :: ModSummary -> [ModuleName]+ms_home_allimps ms = map unLoc (ms_home_srcimps ms ++ ms_home_imps ms)++-- | Like 'ms_home_imps', but for SOURCE imports.+ms_home_srcimps :: ModSummary -> [Located ModuleName]+ms_home_srcimps = home_imps . ms_srcimps++-- | All of the (possibly) home module imports from a+-- 'ModSummary'; that is to say, each of these module names+-- could be a home import if an appropriately named file+-- existed.  (This is in contrast to package qualified+-- imports, which are guaranteed not to be home imports.)+ms_home_imps :: ModSummary -> [Located ModuleName]+ms_home_imps = home_imps . ms_imps+ -- The ModLocation contains both the original source filename and the -- filename of the cleaned-up source file after all preprocessing has been -- done.  The point is that the summariser will have to cpp/unlit/whatever@@ -2815,6 +2932,9 @@ msHiFilePath  ms = ml_hi_file  (ms_location ms) msObjFilePath ms = ml_obj_file (ms_location ms) +msDynObjFilePath :: ModSummary -> DynFlags -> FilePath+msDynObjFilePath ms dflags = dynamicOutputFile dflags (msObjFilePath ms)+ -- | Did this 'ModSummary' originate from a hs-boot file? isBootSummary :: ModSummary -> Bool isBootSummary ms = ms_hsc_src ms == HsBootFile@@ -2834,20 +2954,26 @@ showModMsg dflags target recomp mod_summary = showSDoc dflags $    if gopt Opt_HideSourcePaths dflags       then text mod_str-      else hsep+      else hsep $          [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ')          , char '('          , text (op $ msHsFilePath mod_summary) <> char ','-         , case target of-              HscInterpreted | recomp -> text "interpreted"-              HscNothing              -> text "nothing"-              _                       -> text (op $ msObjFilePath mod_summary)-         , char ')'-         ]+         ] +++         if gopt Opt_BuildDynamicToo dflags+            then [ text obj_file <> char ','+                 , text dyn_file+                 , char ')'+                 ]+            else [ text obj_file, char ')' ]   where-    op      = normalise-    mod     = moduleName (ms_mod mod_summary)-    mod_str = showPpr dflags mod ++ hscSourceString (ms_hsc_src mod_summary)+    op       = normalise+    mod      = moduleName (ms_mod mod_summary)+    mod_str  = showPpr dflags mod ++ hscSourceString (ms_hsc_src mod_summary)+    dyn_file = op $ msDynObjFilePath mod_summary dflags+    obj_file = case target of+                HscInterpreted | recomp -> "interpreted"+                HscNothing              -> "nothing"+                _                       -> (op $ msObjFilePath mod_summary)  {- ************************************************************************@@ -2939,6 +3065,7 @@             Sf_Unsafe       -> 1             Sf_Trustworthy  -> 2             Sf_Safe         -> 3+            Sf_SafeInferred -> 4             Sf_Ignore       -> 0  numToTrustInfo :: Word8 -> IfaceTrustInfo@@ -2946,9 +3073,7 @@ numToTrustInfo 1 = setSafeMode Sf_Unsafe numToTrustInfo 2 = setSafeMode Sf_Trustworthy numToTrustInfo 3 = setSafeMode Sf_Safe-numToTrustInfo 4 = setSafeMode Sf_Safe -- retained for backwards compat, used-                                       -- to be Sf_SafeInfered but we no longer-                                       -- differentiate.+numToTrustInfo 4 = setSafeMode Sf_SafeInferred numToTrustInfo n = error $ "numToTrustInfo: bad input number! (" ++ show n ++ ")"  instance Outputable IfaceTrustInfo where@@ -2957,6 +3082,7 @@     ppr (TrustInfo Sf_Unsafe)        = text "unsafe"     ppr (TrustInfo Sf_Trustworthy)   = text "trustworthy"     ppr (TrustInfo Sf_Safe)          = text "safe"+    ppr (TrustInfo Sf_SafeInferred)  = text "safe-inferred"  instance Binary IfaceTrustInfo where     put_ bh iftrust = putByte bh $ trustInfoToNum iftrust@@ -2993,22 +3119,6 @@ stuff is the *dynamic* linker, and isn't present in a stage-1 compiler -} --- | Information we can use to dynamically link modules into the compiler-data Linkable = LM {-  linkableTime     :: UTCTime,          -- ^ Time at which this linkable was built-                                        -- (i.e. when the bytecodes were produced,-                                        --       or the mod date on the files)-  linkableModule   :: Module,           -- ^ The linkable module itself-  linkableUnlinked :: [Unlinked]-    -- ^ Those files and chunks of code we have yet to link.-    ---    -- INVARIANT: A valid linkable always has at least one 'Unlinked' item.-    -- If this list is empty, the Linkable represents a fake linkable, which-    -- is generated in HscNothing mode to avoid recompiling modules.-    ---    -- ToDo: Do items get removed from this list when they get linked?- }- isObjectLinkable :: Linkable -> Bool isObjectLinkable l = not (null unlinked) && all isObject unlinked   where unlinked = linkableUnlinked l@@ -3020,31 +3130,8 @@ linkableObjs :: Linkable -> [FilePath] linkableObjs l = [ f | DotO f <- linkableUnlinked l ] -instance Outputable Linkable where-   ppr (LM when_made mod unlinkeds)-      = (text "LinkableM" <+> parens (text (show when_made)) <+> ppr mod)-        $$ nest 3 (ppr unlinkeds)- ------------------------------------------- --- | Objects which have yet to be linked by the compiler-data Unlinked-   = DotO FilePath      -- ^ An object file (.o)-   | DotA FilePath      -- ^ Static archive file (.a)-   | DotDLL FilePath    -- ^ Dynamically linked library file (.so, .dll, .dylib)-   | BCOs CompiledByteCode-          [SptEntry]    -- ^ A byte-code object, lives only in memory. Also-                        -- carries some static pointer table entries which-                        -- should be loaded along with the BCOs.-                        -- See Note [Grant plan for static forms] in-                        -- StaticPtrTable.--instance Outputable Unlinked where-   ppr (DotO path)   = text "DotO" <+> text path-   ppr (DotA path)   = text "DotA" <+> text path-   ppr (DotDLL path) = text "DotDLL" <+> text path-   ppr (BCOs bcos spt) = text "BCOs" <+> ppr bcos <+> ppr spt- -- | Is this an actual file on disk we can link in somehow? isObject :: Unlinked -> Bool isObject (DotO _)   = True@@ -3148,3 +3235,26 @@ explanation for how GHC ensures that all the conlikes in a COMPLETE set are consistent. -}++-- | Foreign language of the phase if the phase deals with a foreign code+phaseForeignLanguage :: Phase -> Maybe ForeignSrcLang+phaseForeignLanguage phase = case phase of+  Phase.Cc           -> Just LangC+  Phase.Ccxx         -> Just LangCxx+  Phase.Cobjc        -> Just LangObjc+  Phase.Cobjcxx      -> Just LangObjcxx+  Phase.HCc          -> Just LangC+  Phase.As _         -> Just LangAsm+  Phase.MergeForeign -> Just RawObject+  _                  -> Nothing++-------------------------------------------++-- Take care, this instance only forces to the degree necessary to+-- avoid major space leaks.+instance (NFData (IfaceBackendExts (phase :: ModIfacePhase)), NFData (IfaceDeclExts (phase :: ModIfacePhase))) => NFData (ModIface_ phase) where+  rnf (ModIface f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12+                f13 f14 f15 f16 f17 f18 f19 f20 f21 f22 f23) =+    rnf f1 `seq` rnf f2 `seq` f3 `seq` f4 `seq` f5 `seq` f6 `seq` rnf f7 `seq` f8 `seq`+    f9 `seq` rnf f10 `seq` rnf f11 `seq` f12 `seq` rnf f13 `seq` rnf f14 `seq` rnf f15 `seq`+    rnf f16 `seq` f17 `seq` rnf f18 `seq` rnf f19 `seq` f20 `seq` f21 `seq` f22 `seq` rnf f23
main/InteractiveEval.hs view
@@ -30,6 +30,8 @@         exprType,         typeKind,         parseName,+        parseInstanceHead,+        getInstancesForType,         getDocs,         GetDocsFailure(..),         showModule,@@ -51,7 +53,7 @@ import GHCi.RemoteTypes import GhcMonad import HscMain-import HsSyn+import GHC.Hs import HscTypes import InstEnv import IfaceEnv   ( newInteractiveBinder )@@ -60,7 +62,10 @@ import TyCon import Type             hiding( typeKind ) import RepType-import TcType           hiding( typeKind )+import TcType+import Constraint+import TcOrigin+import Predicate import Var import Id import Name             hiding ( varName )@@ -102,6 +107,19 @@ import Data.Array import Exception +import TcRnDriver ( runTcInteractive, tcRnType, loadUnqualIfaces )+import TcHsSyn          ( ZonkFlexi (SkolemiseFlexi) )++import TcEnv (tcGetInstEnvs)++import Inst (instDFunType)+import TcSimplify (solveWanteds)+import TcRnMonad+import TcEvidence+import Data.Bifunctor (second)++import TcSMonad (runTcS)+ -- ----------------------------------------------------------------------------- -- running a statement interactively @@ -249,7 +267,7 @@ OccNames that users can't write, to avoid the possibility of name clashes (in linker symbols).  That gives a convenient way to suppress them. The relevant predicate is OccName.isDerivedOccName.-See Trac #11051 for more background and examples.+See #11051 for more background and examples. -}  withVirtualCWD :: GhcMonad m => m a -> m a@@ -357,7 +375,8 @@     = do hsc_env <- getSession          let final_ic = extendInteractiveContextWithIds (hsc_IC hsc_env) final_ids              final_names = map getName final_ids-         liftIO $ Linker.extendLinkEnv (zip final_names hvals)+             dl = hsc_dynLinker hsc_env+         liftIO $ Linker.extendLinkEnv dl (zip final_names hvals)          hsc_env' <- liftIO $ rttiEnvironment hsc_env{hsc_IC=final_ic}          setSession hsc_env'          return (ExecComplete (Right final_names) allocs)@@ -396,7 +415,8 @@             new_names = [ n | thing <- ic_tythings ic                             , let n = getName thing                             , not (n `elem` old_names) ]-        liftIO $ Linker.deleteFromLinkEnv new_names+            dl        = hsc_dynLinker hsc_env+        liftIO $ Linker.deleteFromLinkEnv dl new_names          case r of           Resume { resumeStmt = expr, resumeContext = fhv@@ -490,8 +510,9 @@         ictxt0 = hsc_IC hsc_env        ictxt1 = extendInteractiveContextWithIds ictxt0 [exn_id]+       dl     = hsc_dynLinker hsc_env    ---   Linker.extendLinkEnv [(exn_name, apStack)]+   Linker.extendLinkEnv dl [(exn_name, apStack)]    return (hsc_env{ hsc_IC = ictxt1 }, [exn_name], span, "<exception thrown>")  -- Just case: we stopped at a breakpoint, we have information about the location@@ -546,10 +567,11 @@        ictxt0 = hsc_IC hsc_env        ictxt1 = extendInteractiveContextWithIds ictxt0 final_ids        names  = map idName new_ids+       dl     = hsc_dynLinker hsc_env     let fhvs = catMaybes mb_hValues-   Linker.extendLinkEnv (zip names fhvs)-   when result_ok $ Linker.extendLinkEnv [(result_name, apStack_fhv)]+   Linker.extendLinkEnv dl (zip names fhvs)+   when result_ok $ Linker.extendLinkEnv dl [(result_name, apStack_fhv)]    hsc_env1 <- rttiEnvironment hsc_env{ hsc_IC = ictxt1 }    return (hsc_env1, if result_ok then result_name:names else names, span, decl)   where@@ -801,7 +823,7 @@ -- Filter the instances by the ones whose tycons (or clases resp) -- are in scope (qualified or otherwise).  Otherwise we list a whole lot too many! -- The exact choice of which ones to show, and which to hide, is a judgement call.---      (see Trac #1581)+--      (see #1581) getInfo :: GhcMonad m => Bool -> Name         -> m (Maybe (TyThing,Fixity,[ClsInst],[FamInst], SDoc)) getInfo allInfo name@@ -845,7 +867,7 @@       ic = hsc_IC hsc_env       gbl_rdrenv = ic_rn_gbl_env ic       gbl_names = concatMap greRdrNames $ globalRdrEnvElts gbl_rdrenv-  -- Exclude internally generated names; see e.g. Trac #11328+  -- Exclude internally generated names; see e.g. #11328   return (filter (not . isDerivedOccName . rdrNameOcc) gbl_names)  @@ -861,14 +883,14 @@ isStmt dflags stmt =   case parseThing Parser.parseStmt dflags stmt of     Lexer.POk _ _ -> True-    Lexer.PFailed _ _ _ -> False+    Lexer.PFailed _ -> False  -- | Returns @True@ if passed string has an import declaration. hasImport :: DynFlags -> String -> Bool hasImport dflags stmt =   case parseThing Parser.parseModule dflags stmt of     Lexer.POk _ thing -> hasImports thing-    Lexer.PFailed _ _ _ -> False+    Lexer.PFailed _ -> False   where     hasImports = not . null . hsmodImports . unLoc @@ -877,7 +899,7 @@ isImport dflags stmt =   case parseThing Parser.parseImport dflags stmt of     Lexer.POk _ _ -> True-    Lexer.PFailed _ _ _ -> False+    Lexer.PFailed _ -> False  -- | Returns @True@ if passed string is a declaration but __/not a splice/__. isDecl :: DynFlags -> String -> Bool@@ -887,7 +909,7 @@       case unLoc thing of         SpliceD _ _ -> False         _ -> True-    Lexer.PFailed _ _ _ -> False+    Lexer.PFailed _ -> False  parseThing :: Lexer.P thing -> DynFlags -> String -> Lexer.ParseResult thing parseThing parser dflags stmt = do@@ -978,6 +1000,163 @@ typeKind normalise str = withSession $ \hsc_env -> do    liftIO $ hscKcType hsc_env normalise str +-- ----------------------------------------------------------------------------+-- Getting the class instances for a type++{-+  Note [Querying instances for a type]++  Here is the implementation of GHC proposal 41.+  (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0041-ghci-instances.rst)++  The objective is to take a query string representing a (partial) type, and+  report all the class single-parameter class instances available to that type.+  Extending this feature to multi-parameter typeclasses is left as future work.++  The general outline of how we solve this is:++  1. Parse the type, leaving skolems in the place of type-holes.+  2. For every class, get a list of all instances that match with the query type.+  3. For every matching instance, ask GHC for the context the instance dictionary needs.+  4. Format and present the results, substituting our query into the instance+     and simplifying the context.++  For example, given the query "Maybe Int", we want to return:++  instance Show (Maybe Int)+  instance Read (Maybe Int)+  instance Eq   (Maybe Int)+  ....++  [Holes in queries]++  Often times we want to know what instances are available for a polymorphic type,+  like `Maybe a`, and we'd like to return instances such as:++  instance Show a => Show (Maybe a)+  ....++  These queries are expressed using type holes, so instead of `Maybe a` the user writes+  `Maybe _`, we parse the type and during zonking, we skolemise it, replacing the holes+  with (un-named) type variables.++  When zonking the type holes we have two real choices: replace them with Any or replace+  them with skolem typevars. Using skolem type variables ensures that the output is more+  intuitive to end users, and there is no difference in the results between Any and skolems.++-}++-- Find all instances that match a provided type+getInstancesForType :: GhcMonad m => Type -> m [ClsInst]+getInstancesForType ty = withSession $ \hsc_env -> do+  liftIO $ runInteractiveHsc hsc_env $ do+    ioMsgMaybe $ runTcInteractive hsc_env $ do+      -- Bring class and instances from unqualified modules into scope, this fixes #16793.+      loadUnqualIfaces hsc_env (hsc_IC hsc_env)+      matches <- findMatchingInstances ty+      fmap catMaybes . forM matches $ uncurry checkForExistence++-- Parse a type string and turn any holes into skolems+parseInstanceHead :: GhcMonad m => String -> m Type+parseInstanceHead str = withSession $ \hsc_env0 -> do+  (ty, _) <- liftIO $ runInteractiveHsc hsc_env0 $ do+    hsc_env <- getHscEnv+    ty <- hscParseType str+    ioMsgMaybe $ tcRnType hsc_env SkolemiseFlexi True ty++  return ty++-- Get all the constraints required of a dictionary binding+getDictionaryBindings :: PredType -> TcM WantedConstraints+getDictionaryBindings theta = do+  dictName <- newName (mkDictOcc (mkVarOcc "magic"))+  let dict_var = mkVanillaGlobal dictName theta+  loc <- getCtLocM (GivenOrigin UnkSkol) Nothing+  let wCs = mkSimpleWC [CtDerived+          { ctev_pred = varType dict_var+          , ctev_loc = loc+          }]++  return wCs++{-+  When we've found an instance that a query matches against, we still need to+  check that all the instance's constraints are satisfiable. checkForExistence+  creates an instance dictionary and verifies that any unsolved constraints+  mention a type-hole, meaning it is blocked on an unknown.++  If the instance satisfies this condition, then we return it with the query+  substituted into the instance and all constraints simplified, for example given:++  instance D a => C (MyType a b) where++  and the query `MyType _ String`++  the unsolved constraints will be [D _] so we apply the substitution:++  { a -> _; b -> String}++  and return the instance:++  instance D _ => C (MyType _ String)++-}++checkForExistence :: ClsInst -> [DFunInstType] -> TcM (Maybe ClsInst)+checkForExistence res mb_inst_tys = do+  (tys, thetas) <- instDFunType (is_dfun res) mb_inst_tys++  wanteds <- forM thetas getDictionaryBindings+  (residuals, _) <- second evBindMapBinds <$> runTcS (solveWanteds (unionsWC wanteds))++  let all_residual_constraints = bagToList $ wc_simple residuals+  let preds = map ctPred all_residual_constraints+  if all isSatisfiablePred preds && (null $ wc_impl residuals)+  then return . Just $ substInstArgs tys preds res+  else return Nothing++  where++  -- Stricter version of isTyVarClassPred that requires all TyConApps to have at least+  -- one argument or for the head to be a TyVar. The reason is that we want to ensure+  -- that all residual constraints mention a type-hole somewhere in the constraint,+  -- meaning that with the correct choice of a concrete type it could be possible for+  -- the constraint to be discharged.+  isSatisfiablePred :: PredType -> Bool+  isSatisfiablePred ty = case getClassPredTys_maybe ty of+      Just (_, tys@(_:_)) -> all isTyVarTy tys+      _                   -> isTyVarTy ty++  empty_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfType (idType $ is_dfun res)))++  {- Create a ClsInst with instantiated arguments and constraints.++     The thetas are the list of constraints that couldn't be solved because+     they mention a type-hole.+  -}+  substInstArgs ::  [Type] -> [PredType] -> ClsInst -> ClsInst+  substInstArgs tys thetas inst = let+      subst = foldl' (\a b -> uncurry (extendTvSubstAndInScope a) b) empty_subst (zip dfun_tvs tys)+      -- Build instance head with arguments substituted in+      tau   = mkClassPred cls (substTheta subst args)+      -- Constrain the instance with any residual constraints+      phi   = mkPhiTy thetas tau+      sigma = mkForAllTys (map (\v -> Bndr v Inferred) dfun_tvs) phi++    in inst { is_dfun = (is_dfun inst) { varType = sigma }}+    where+    (dfun_tvs, _, cls, args) = instanceSig inst++-- Find instances where the head unifies with the provided type+findMatchingInstances :: Type -> TcM [(ClsInst, [DFunInstType])]+findMatchingInstances ty = do+  ies@(InstEnvs {ie_global = ie_global, ie_local = ie_local}) <- tcGetInstEnvs+  let allClasses = instEnvClasses ie_global ++ instEnvClasses ie_local++  concat <$> mapM (\cls -> do+    let (matches, _, _) = lookupInstEnv True ies cls [ty]+    return matches) allClasses+ ----------------------------------------------------------------------------- -- Compile an expression, run it, and deliver the result @@ -1009,8 +1188,8 @@   -- create a new binding.   let expr_fs = fsLit "_compileParsedExpr"       expr_name = mkInternalName (getUnique expr_fs) (mkTyVarOccFS expr_fs) loc-      let_stmt = L loc . LetStmt noExt . L loc . (HsValBinds noExt) $-        ValBinds noExt+      let_stmt = L loc . LetStmt noExtField . L loc . (HsValBinds noExtField) $+        ValBinds noExtField                      (unitBag $ mkHsVarBind loc (getRdrName expr_name) expr) []    pstmt <- liftIO $ hscParsedStmt hsc_env let_stmt@@ -1038,7 +1217,7 @@   parsed_expr <- parseExpr expr   -- > Data.Dynamic.toDyn expr   let loc = getLoc parsed_expr-      to_dyn_expr = mkHsApp (L loc . HsVar noExt . L loc $ getRdrName toDynName)+      to_dyn_expr = mkHsApp (L loc . HsVar noExtField . L loc $ getRdrName toDynName)                             parsed_expr   hval <- compileParsedExpr to_dyn_expr   return (unsafeCoerce# hval :: Dynamic)
main/PackageConfig.hs view
@@ -62,11 +62,11 @@  instance BinaryStringRep SourcePackageId where   fromStringRep = SourcePackageId . mkFastStringByteString-  toStringRep (SourcePackageId s) = fastStringToByteString s+  toStringRep (SourcePackageId s) = bytesFS s  instance BinaryStringRep PackageName where   fromStringRep = PackageName . mkFastStringByteString-  toStringRep (PackageName s) = fastStringToByteString s+  toStringRep (PackageName s) = bytesFS s  instance Uniquable SourcePackageId where   getUnique (SourcePackageId n) = getUnique n
main/Packages.hs view
@@ -77,18 +77,21 @@ import Module import Util import Panic-import Platform+import GHC.Platform import Outputable import Maybes+import CmdLineParser  import System.Environment ( getEnv ) import FastString-import ErrUtils         ( debugTraceMsg, MsgDoc, dumpIfSet_dyn )+import ErrUtils         ( debugTraceMsg, MsgDoc, dumpIfSet_dyn, compilationProgressMsg,+                          withTiming ) import Exception  import System.Directory import System.FilePath as FilePath import qualified System.FilePath.Posix as FilePath.Posix+import System.IO.Error  ( isDoesNotExistError ) import Control.Monad import Data.Graph (stronglyConnComp, SCC(..)) import Data.Char ( toUpper )@@ -466,7 +469,9 @@ -- 'pkgState' in 'DynFlags' and return a list of packages to -- link in. initPackages :: DynFlags -> IO (DynFlags, [PreloadUnitId])-initPackages dflags0 = do+initPackages dflags0 = withTiming dflags0+                                  (text "initializing package database")+                                  forcePkgDb $ do   dflags <- interpretPackageEnv dflags0   pkg_db <-     case pkgDatabase dflags of@@ -479,6 +484,8 @@                   pkgState = pkg_state,                   thisUnitIdInsts_ = insts },           preload)+  where+    forcePkgDb (dflags, _) = pkgIdMap (pkgState dflags) `seq` ()  -- ----------------------------------------------------------------------------- -- Reading the package database(s)@@ -559,13 +566,15 @@                       "can't find a package database at " ++ conf_file    let+      -- Fix #16360: remove trailing slash from conf_file before calculting pkgroot+      conf_file' = dropTrailingPathSeparator conf_file       top_dir = topDir dflags-      pkgroot = takeDirectory conf_file+      pkgroot = takeDirectory conf_file'       pkg_configs1 = map (mungePackageConfig top_dir pkgroot)                          proto_pkg_configs       pkg_configs2 = setBatchPackageFlags dflags pkg_configs1   ---  return (conf_file, pkg_configs2)+  return (conf_file', pkg_configs2)   where     readDirStylePackageConfig conf_dir = do       let filename = conf_dir </> "package.cache"@@ -1470,8 +1479,8 @@             _  -> unit'       addIfMorePreferable m unit = addToUDFM_C preferLater m (fsPackageName unit) unit       -- This is the set of maximally preferable packages. In fact, it is a set of-      -- most preferable *units* keyed by package name, which act as stand-ins in -      -- for "a package in a database". We use units here because we don't have +      -- most preferable *units* keyed by package name, which act as stand-ins in+      -- for "a package in a database". We use units here because we don't have       -- "a package in a database" as a type currently.       mostPreferablePackageReps = if gopt Opt_HideAllPackages dflags                     then emptyUDFM@@ -1481,7 +1490,7 @@       -- with the most preferable unit for package. Being equi-preferable means that       -- they must be in the same database, with the same version, and the same pacakge name.       ---      -- We must take care to consider all these units and not just the most +      -- We must take care to consider all these units and not just the most       -- preferable one, otherwise we can end up with problems like #16228.       mostPreferable u =         case lookupUDFM mostPreferablePackageReps (fsPackageName u) of@@ -1592,8 +1601,8 @@       -- (NB: since this is only relevant for base/rts it doesn't matter       -- that thisUnitIdInsts_ is not wired yet)       ---      preload3 = nub $ filter (/= thisPackage dflags)-                     $ (basicLinkedPackages ++ preload2)+      preload3 = ordNub $ filter (/= thisPackage dflags)+                        $ (basicLinkedPackages ++ preload2)    -- Close the preload packages with their dependencies   dep_preload <- closeDeps dflags pkg_db (zip (map toInstalledUnitId preload3) (repeat Nothing))@@ -1742,7 +1751,7 @@ -- | Add a list of key/value pairs to a nested map. -- -- The outer map is processed with 'Data.Map.Strict' to prevent memory leaks--- when reloading modules in GHCi (see Trac #4029). This ensures that each+-- when reloading modules in GHCi (see #4029). This ensures that each -- value is forced before installing into the map. addListTo :: (Monoid a, Ord k1, Ord k2)           => Map k1 (Map k2 a)@@ -1772,7 +1781,7 @@   collectIncludeDirs `fmap` getPreloadPackagesAnd dflags pkgs  collectIncludeDirs :: [PackageConfig] -> [FilePath]-collectIncludeDirs ps = nub (filter notNull (concatMap includeDirs ps))+collectIncludeDirs ps = ordNub (filter notNull (concatMap includeDirs ps))  -- | Find all the library paths in these and the preload packages getPackageLibraryPath :: DynFlags -> [PreloadUnitId] -> IO [String]@@ -1780,7 +1789,7 @@   collectLibraryPaths dflags `fmap` getPreloadPackagesAnd dflags pkgs  collectLibraryPaths :: DynFlags -> [PackageConfig] -> [FilePath]-collectLibraryPaths dflags = nub . filter notNull+collectLibraryPaths dflags = ordNub . filter notNull                            . concatMap (libraryDirsForWay dflags)  -- | Find all the link options in these and the preload packages,@@ -1801,7 +1810,7 @@   filterM doesFileExist [ searchPath </> ("lib" ++ lib ++ ".a")                         | searchPath <- searchPaths                         , lib <- libs ]-  where searchPaths = nub . filter notNull . libraryDirsForWay dflags $ pc+  where searchPaths = ordNub . filter notNull . libraryDirsForWay dflags $ pc         libs        = packageHsLibs dflags pc ++ extraLibraries pc  getLibs :: DynFlags -> [PreloadUnitId] -> IO [(String,String)]@@ -1876,7 +1885,7 @@ getPackageFrameworkPath  :: DynFlags -> [PreloadUnitId] -> IO [String] getPackageFrameworkPath dflags pkgs = do   ps <- getPreloadPackagesAnd dflags pkgs-  return (nub (filter notNull (concatMap frameworkDirs ps)))+  return (ordNub (filter notNull (concatMap frameworkDirs ps)))  -- | Find all the package frameworks in these and the preload packages getPackageFrameworks  :: DynFlags -> [PreloadUnitId] -> IO [String]@@ -2191,3 +2200,138 @@ -- in the @hs-boot@ loop-breaker. getPackageConfigMap :: DynFlags -> PackageConfigMap getPackageConfigMap = pkgIdMap . pkgState++-- -----------------------------------------------------------------------------+-- | Find the package environment (if one exists)+--+-- We interpret the package environment as a set of package flags; to be+-- specific, if we find a package environment file like+--+-- > clear-package-db+-- > global-package-db+-- > package-db blah/package.conf.d+-- > package-id id1+-- > package-id id2+--+-- we interpret this as+--+-- > [ -hide-all-packages+-- > , -clear-package-db+-- > , -global-package-db+-- > , -package-db blah/package.conf.d+-- > , -package-id id1+-- > , -package-id id2+-- > ]+--+-- There's also an older syntax alias for package-id, which is just an+-- unadorned package id+--+-- > id1+-- > id2+--+interpretPackageEnv :: DynFlags -> IO DynFlags+interpretPackageEnv dflags = do+    mPkgEnv <- runMaybeT $ msum $ [+                   getCmdLineArg >>= \env -> msum [+                       probeNullEnv env+                     , probeEnvFile env+                     , probeEnvName env+                     , cmdLineError env+                     ]+                 , getEnvVar >>= \env -> msum [+                       probeNullEnv env+                     , probeEnvFile env+                     , probeEnvName env+                     , envError     env+                     ]+                 , notIfHideAllPackages >> msum [+                       findLocalEnvFile >>= probeEnvFile+                     , probeEnvName defaultEnvName+                     ]+                 ]+    case mPkgEnv of+      Nothing ->+        -- No environment found. Leave DynFlags unchanged.+        return dflags+      Just "-" -> do+        -- Explicitly disabled environment file. Leave DynFlags unchanged.+        return dflags+      Just envfile -> do+        content <- readFile envfile+        compilationProgressMsg dflags ("Loaded package environment from " ++ envfile)+        let (_, dflags') = runCmdLine (runEwM (setFlagsFromEnvFile envfile content)) dflags++        return dflags'+  where+    -- Loading environments (by name or by location)++    namedEnvPath :: String -> MaybeT IO FilePath+    namedEnvPath name = do+     appdir <- versionedAppDir dflags+     return $ appdir </> "environments" </> name++    probeEnvName :: String -> MaybeT IO FilePath+    probeEnvName name = probeEnvFile =<< namedEnvPath name++    probeEnvFile :: FilePath -> MaybeT IO FilePath+    probeEnvFile path = do+      guard =<< liftMaybeT (doesFileExist path)+      return path++    probeNullEnv :: FilePath -> MaybeT IO FilePath+    probeNullEnv "-" = return "-"+    probeNullEnv _   = mzero++    -- Various ways to define which environment to use++    getCmdLineArg :: MaybeT IO String+    getCmdLineArg = MaybeT $ return $ packageEnv dflags++    getEnvVar :: MaybeT IO String+    getEnvVar = do+      mvar <- liftMaybeT $ try $ getEnv "GHC_ENVIRONMENT"+      case mvar of+        Right var -> return var+        Left err  -> if isDoesNotExistError err then mzero+                                                else liftMaybeT $ throwIO err++    notIfHideAllPackages :: MaybeT IO ()+    notIfHideAllPackages =+      guard (not (gopt Opt_HideAllPackages dflags))++    defaultEnvName :: String+    defaultEnvName = "default"++    -- e.g. .ghc.environment.x86_64-linux-7.6.3+    localEnvFileName :: FilePath+    localEnvFileName = ".ghc.environment" <.> versionedFilePath dflags++    -- Search for an env file, starting in the current dir and looking upwards.+    -- Fail if we get to the users home dir or the filesystem root. That is,+    -- we don't look for an env file in the user's home dir. The user-wide+    -- env lives in ghc's versionedAppDir/environments/default+    findLocalEnvFile :: MaybeT IO FilePath+    findLocalEnvFile = do+        curdir  <- liftMaybeT getCurrentDirectory+        homedir <- tryMaybeT getHomeDirectory+        let probe dir | isDrive dir || dir == homedir+                      = mzero+            probe dir = do+              let file = dir </> localEnvFileName+              exists <- liftMaybeT (doesFileExist file)+              if exists+                then return file+                else probe (takeDirectory dir)+        probe curdir++    -- Error reporting++    cmdLineError :: String -> MaybeT IO a+    cmdLineError env = liftMaybeT . throwGhcExceptionIO . CmdLineError $+      "Package environment " ++ show env ++ " not found"++    envError :: String -> MaybeT IO a+    envError env = liftMaybeT . throwGhcExceptionIO . CmdLineError $+         "Package environment "+      ++ show env+      ++ " (specified in GHC_ENVIRONMENT) not found"
main/PipelineMonad.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE NamedFieldPuns #-} -- | The CompPipeline monad and associated ops --@@ -6,7 +7,8 @@     CompPipeline(..), evalP   , PhasePlus(..)   , PipeEnv(..), PipeState(..), PipelineOutput(..)-  , getPipeEnv, getPipeState, setDynFlags, setModLocation, setForeignOs+  , getPipeEnv, getPipeState, setDynFlags, setModLocation, setForeignOs, setIface+  , pipeStateDynFlags, pipeStateModIface   ) where  import GhcPrelude@@ -22,12 +24,10 @@ import Control.Monad  newtype CompPipeline a = P { unP :: PipeEnv -> PipeState -> IO (PipeState, a) }--evalP :: CompPipeline a -> PipeEnv -> PipeState -> IO a-evalP f env st = liftM snd $ unP f env st+    deriving (Functor) -instance Functor CompPipeline where-    fmap = liftM+evalP :: CompPipeline a -> PipeEnv -> PipeState -> IO (PipeState, a)+evalP (P f) env st = f env st  instance Applicative CompPipeline where     pure a = P $ \_env state -> return (state, a)@@ -68,12 +68,21 @@        maybe_loc :: Maybe ModLocation,           -- ^ the ModLocation.  This is discovered during compilation,           -- in the Hsc phase where we read the module header.-       foreign_os :: [FilePath]+       foreign_os :: [FilePath],          -- ^ additional object files resulting from compiling foreign          -- code. They come from two sources: foreign stubs, and          -- add{C,Cxx,Objc,Objcxx}File from template haskell+       iface :: Maybe ModIface+         -- ^ Interface generated by HscOut phase. Only available after the+         -- phase runs.   } +pipeStateDynFlags :: PipeState -> DynFlags+pipeStateDynFlags = hsc_dflags . hsc_env++pipeStateModIface :: PipeState -> Maybe ModIface+pipeStateModIface = iface+ data PipelineOutput   = Temporary TempFileLifetime         -- ^ Output should be to a temporary file: we're going to@@ -108,3 +117,6 @@ setForeignOs :: [FilePath] -> CompPipeline () setForeignOs os = P $ \_env state ->   return (state{ foreign_os = os }, ())++setIface :: ModIface -> CompPipeline ()+setIface iface = P $ \_env state -> return (state{ iface = Just iface }, ())
main/Plugins.hs view
@@ -1,5 +1,10 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE CPP #-}++-- | Definitions for writing /plugins/ for GHC. Plugins can hook into+-- several areas of the compiler. See the 'Plugin' type. These plugins+-- include type-checker plugins, source plugins, and core-to-core plugins.+ module Plugins (       -- * Plugins       Plugin(..)@@ -30,6 +35,10 @@       -- - access to loaded interface files with 'interfaceLoadAction'       --     , keepRenamedSource+      -- ** Hole fit plugins+      -- | hole fit plugins allow plugins to change the behavior of valid hole+      -- fit suggestions+    , HoleFitPluginR        -- * Internal     , PluginWithArgs(..), plugins, pluginRecompile'@@ -42,15 +51,16 @@  import {-# SOURCE #-} CoreMonad ( CoreToDo, CoreM ) import qualified TcRnTypes-import TcRnTypes ( TcGblEnv, IfM, TcM, tcg_rn_decls, tcg_rn_exports )-import HsSyn+import TcRnTypes ( TcGblEnv, IfM, TcM, tcg_rn_decls, tcg_rn_exports  )+import TcHoleFitTypes ( HoleFitPluginR )+import GHC.Hs import DynFlags import HscTypes import GhcMonad import DriverPhases import Module ( ModuleName, Module(moduleName)) import Fingerprint-import Data.List+import Data.List (sort) import Outputable (Outputable(..), text, (<+>))  --Qualified import so we can define a Semigroup instance@@ -79,6 +89,16 @@   , tcPlugin :: TcPlugin     -- ^ An optional typechecker plugin, which may modify the     -- behaviour of the constraint solver.+  , holeFitPlugin :: HoleFitPlugin+    -- ^ An optional plugin to handle hole fits, which may re-order+    --   or change the list of valid hole fits and refinement hole fits.+  , dynflagsPlugin :: [CommandLineOption] -> DynFlags -> IO DynFlags+    -- ^ An optional plugin to update 'DynFlags', right after+    --   plugin loading. This can be used to register hooks+    --   or tweak any field of 'DynFlags' before doing+    --   actual work on a module.+    --+    --   @since 8.10.1   , pluginRecompile :: [CommandLineOption] -> IO PluginRecompile     -- ^ Specify how the plugin should affect recompilation.   , parsedResultAction :: [CommandLineOption] -> ModSummary -> HsParsedModule@@ -91,7 +111,7 @@     -- `HsGroup` has been renamed.   , typeCheckResultAction :: [CommandLineOption] -> ModSummary -> TcGblEnv                                -> TcM TcGblEnv-    -- ^ Modify the module when it is type checked. This is called add the+    -- ^ Modify the module when it is type checked. This is called at the     -- very end of typechecking.   , spliceRunAction :: [CommandLineOption] -> LHsExpr GhcTc                          -> TcM (LHsExpr GhcTc)@@ -120,7 +140,7 @@ -- is supported by most build environment. -- -- For the full discussion, check the full proposal at:--- https://ghc.haskell.org/trac/ghc/wiki/ExtendedPluginsProposal+-- https://gitlab.haskell.org/ghc/ghc/wikis/extended-plugins-proposal  data PluginWithArgs = PluginWithArgs   { paPlugin :: Plugin@@ -169,6 +189,7 @@  type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] type TcPlugin = [CommandLineOption] -> Maybe TcRnTypes.TcPlugin+type HoleFitPlugin = [CommandLineOption] -> Maybe HoleFitPluginR  purePlugin, impurePlugin, flagRecompile :: [CommandLineOption] -> IO PluginRecompile purePlugin _args = return NoForceRecompile@@ -178,13 +199,17 @@ flagRecompile =   return . MaybeRecompile . fingerprintFingerprints . map fingerprintString . sort --- | Default plugin: does nothing at all! For compatibility reasons--- you should base all your plugin definitions on this default value.+-- | Default plugin: does nothing at all, except for marking that safe+-- inference has failed unless @-fplugin-trustworthy@ is passed. For+-- compatibility reaso you should base all your plugin definitions on this+-- default value. defaultPlugin :: Plugin defaultPlugin = Plugin {         installCoreToDos      = const return       , tcPlugin              = const Nothing-      , pluginRecompile  = impurePlugin+      , holeFitPlugin         = const Nothing+      , dynflagsPlugin        = const return+      , pluginRecompile       = impurePlugin       , renamedResultAction   = \_ env grp -> return (env, grp)       , parsedResultAction    = \_ _ -> return       , typeCheckResultAction = \_ _ -> return
main/PprTyThing.hs view
@@ -21,15 +21,14 @@  import GhcPrelude -import Type    ( ArgFlag(..), TyThing(..), mkTyVarBinders, pprUserForAll )+import Type    ( Type, ArgFlag(..), TyThing(..), mkTyVarBinders, tidyOpenType ) import IfaceSyn ( ShowSub(..), ShowHowMuch(..), AltPpr(..)   , showToHeader, pprIfaceDecl ) import CoAxiom ( coAxiomTyCon ) import HscTypes( tyThingParent_maybe ) import MkIface ( tyThingToIfaceDecl )-import Type ( tidyOpenType ) import FamInstEnv( FamInst(..), FamFlavor(..) )-import Type( Type, pprTypeApp, pprSigmaType )+import TyCoPpr ( pprUserForAll, pprTypeApp, pprSigmaType ) import Name import VarEnv( emptyTidyEnv ) import Outputable
+ main/Settings.hs view
@@ -0,0 +1,203 @@+module Settings+  ( Settings (..)+  , sProgramName+  , sProjectVersion+  , sGhcUsagePath+  , sGhciUsagePath+  , sToolDir+  , sTopDir+  , sTmpDir+  , sSystemPackageConfig+  , sLdSupportsCompactUnwind+  , sLdSupportsBuildId+  , sLdSupportsFilelist+  , sLdIsGnuLd+  , sGccSupportsNoPie+  , sPgm_L+  , sPgm_P+  , sPgm_F+  , sPgm_c+  , sPgm_a+  , sPgm_l+  , sPgm_dll+  , sPgm_T+  , sPgm_windres+  , sPgm_libtool+  , sPgm_ar+  , sPgm_ranlib+  , sPgm_lo+  , sPgm_lc+  , sPgm_lcc+  , sPgm_i+  , sOpt_L+  , sOpt_P+  , sOpt_P_fingerprint+  , sOpt_F+  , sOpt_c+  , sOpt_cxx+  , sOpt_a+  , sOpt_l+  , sOpt_windres+  , sOpt_lo+  , sOpt_lc+  , sOpt_lcc+  , sOpt_i+  , sExtraGccViaCFlags+  , sTargetPlatformString+  , sIntegerLibrary+  , sIntegerLibraryType+  , sGhcWithInterpreter+  , sGhcWithNativeCodeGen+  , sGhcWithSMP+  , sGhcRTSWays+  , sTablesNextToCode+  , sLeadingUnderscore+  , sLibFFI+  , sGhcThreaded+  , sGhcDebugged+  , sGhcRtsWithLibdw+  ) where++import GhcPrelude++import CliOption+import Fingerprint+import FileSettings+import GhcNameVersion+import GHC.Platform+import PlatformConstants+import ToolSettings++data Settings = Settings+  { sGhcNameVersion    :: {-# UNPACk #-} !GhcNameVersion+  , sFileSettings      :: {-# UNPACK #-} !FileSettings+  , sTargetPlatform    :: Platform       -- Filled in by SysTools+  , sToolSettings      :: {-# UNPACK #-} !ToolSettings+  , sPlatformMisc      :: {-# UNPACK #-} !PlatformMisc+  , sPlatformConstants :: PlatformConstants++  -- You shouldn't need to look things up in rawSettings directly.+  -- They should have their own fields instead.+  , sRawSettings       :: [(String, String)]+  }++-----------------------------------------------------------------------------+-- Accessessors from 'Settings'++sProgramName         :: Settings -> String+sProgramName = ghcNameVersion_programName . sGhcNameVersion+sProjectVersion      :: Settings -> String+sProjectVersion = ghcNameVersion_projectVersion . sGhcNameVersion++sGhcUsagePath        :: Settings -> FilePath+sGhcUsagePath = fileSettings_ghcUsagePath . sFileSettings+sGhciUsagePath       :: Settings -> FilePath+sGhciUsagePath = fileSettings_ghciUsagePath . sFileSettings+sToolDir             :: Settings -> Maybe FilePath+sToolDir = fileSettings_toolDir . sFileSettings+sTopDir              :: Settings -> FilePath+sTopDir = fileSettings_topDir . sFileSettings+sTmpDir              :: Settings -> String+sTmpDir = fileSettings_tmpDir . sFileSettings+sSystemPackageConfig :: Settings -> FilePath+sSystemPackageConfig = fileSettings_systemPackageConfig . sFileSettings++sLdSupportsCompactUnwind :: Settings -> Bool+sLdSupportsCompactUnwind = toolSettings_ldSupportsCompactUnwind . sToolSettings+sLdSupportsBuildId :: Settings -> Bool+sLdSupportsBuildId = toolSettings_ldSupportsBuildId . sToolSettings+sLdSupportsFilelist :: Settings -> Bool+sLdSupportsFilelist = toolSettings_ldSupportsFilelist . sToolSettings+sLdIsGnuLd :: Settings -> Bool+sLdIsGnuLd = toolSettings_ldIsGnuLd . sToolSettings+sGccSupportsNoPie :: Settings -> Bool+sGccSupportsNoPie = toolSettings_ccSupportsNoPie . sToolSettings++sPgm_L :: Settings -> String+sPgm_L = toolSettings_pgm_L . sToolSettings+sPgm_P :: Settings -> (String, [Option])+sPgm_P = toolSettings_pgm_P . sToolSettings+sPgm_F :: Settings -> String+sPgm_F = toolSettings_pgm_F . sToolSettings+sPgm_c :: Settings -> String+sPgm_c = toolSettings_pgm_c . sToolSettings+sPgm_a :: Settings -> (String, [Option])+sPgm_a = toolSettings_pgm_a . sToolSettings+sPgm_l :: Settings -> (String, [Option])+sPgm_l = toolSettings_pgm_l . sToolSettings+sPgm_dll :: Settings -> (String, [Option])+sPgm_dll = toolSettings_pgm_dll . sToolSettings+sPgm_T :: Settings -> String+sPgm_T = toolSettings_pgm_T . sToolSettings+sPgm_windres :: Settings -> String+sPgm_windres = toolSettings_pgm_windres . sToolSettings+sPgm_libtool :: Settings -> String+sPgm_libtool = toolSettings_pgm_libtool . sToolSettings+sPgm_ar :: Settings -> String+sPgm_ar = toolSettings_pgm_ar . sToolSettings+sPgm_ranlib :: Settings -> String+sPgm_ranlib = toolSettings_pgm_ranlib . sToolSettings+sPgm_lo :: Settings -> (String, [Option])+sPgm_lo = toolSettings_pgm_lo . sToolSettings+sPgm_lc :: Settings -> (String, [Option])+sPgm_lc = toolSettings_pgm_lc . sToolSettings+sPgm_lcc :: Settings -> (String, [Option])+sPgm_lcc = toolSettings_pgm_lcc . sToolSettings+sPgm_i :: Settings -> String+sPgm_i = toolSettings_pgm_i . sToolSettings+sOpt_L :: Settings -> [String]+sOpt_L = toolSettings_opt_L . sToolSettings+sOpt_P :: Settings -> [String]+sOpt_P = toolSettings_opt_P . sToolSettings+sOpt_P_fingerprint :: Settings -> Fingerprint+sOpt_P_fingerprint = toolSettings_opt_P_fingerprint . sToolSettings+sOpt_F :: Settings -> [String]+sOpt_F = toolSettings_opt_F . sToolSettings+sOpt_c :: Settings -> [String]+sOpt_c = toolSettings_opt_c . sToolSettings+sOpt_cxx :: Settings -> [String]+sOpt_cxx = toolSettings_opt_cxx . sToolSettings+sOpt_a :: Settings -> [String]+sOpt_a = toolSettings_opt_a . sToolSettings+sOpt_l :: Settings -> [String]+sOpt_l = toolSettings_opt_l . sToolSettings+sOpt_windres :: Settings -> [String]+sOpt_windres = toolSettings_opt_windres . sToolSettings+sOpt_lo :: Settings -> [String]+sOpt_lo = toolSettings_opt_lo . sToolSettings+sOpt_lc :: Settings -> [String]+sOpt_lc = toolSettings_opt_lc . sToolSettings+sOpt_lcc :: Settings -> [String]+sOpt_lcc = toolSettings_opt_lcc . sToolSettings+sOpt_i :: Settings -> [String]+sOpt_i = toolSettings_opt_i . sToolSettings++sExtraGccViaCFlags :: Settings -> [String]+sExtraGccViaCFlags = toolSettings_extraGccViaCFlags . sToolSettings++sTargetPlatformString :: Settings -> String+sTargetPlatformString = platformMisc_targetPlatformString . sPlatformMisc+sIntegerLibrary :: Settings -> String+sIntegerLibrary = platformMisc_integerLibrary . sPlatformMisc+sIntegerLibraryType :: Settings -> IntegerLibrary+sIntegerLibraryType = platformMisc_integerLibraryType . sPlatformMisc+sGhcWithInterpreter :: Settings -> Bool+sGhcWithInterpreter = platformMisc_ghcWithInterpreter . sPlatformMisc+sGhcWithNativeCodeGen :: Settings -> Bool+sGhcWithNativeCodeGen = platformMisc_ghcWithNativeCodeGen . sPlatformMisc+sGhcWithSMP :: Settings -> Bool+sGhcWithSMP = platformMisc_ghcWithSMP . sPlatformMisc+sGhcRTSWays :: Settings -> String+sGhcRTSWays = platformMisc_ghcRTSWays . sPlatformMisc+sTablesNextToCode :: Settings -> Bool+sTablesNextToCode = platformMisc_tablesNextToCode . sPlatformMisc+sLeadingUnderscore :: Settings -> Bool+sLeadingUnderscore = platformMisc_leadingUnderscore . sPlatformMisc+sLibFFI :: Settings -> Bool+sLibFFI = platformMisc_libFFI . sPlatformMisc+sGhcThreaded :: Settings -> Bool+sGhcThreaded = platformMisc_ghcThreaded . sPlatformMisc+sGhcDebugged :: Settings -> Bool+sGhcDebugged = platformMisc_ghcDebugged . sPlatformMisc+sGhcRtsWithLibdw :: Settings -> Bool+sGhcRtsWithLibdw = platformMisc_ghcRtsWithLibdw . sPlatformMisc
main/StaticPtrTable.hs view
@@ -135,7 +135,7 @@ import Module import Name import Outputable-import Platform+import GHC.Platform import PrelNames import TcEnv (lookupGlobal) import Type@@ -233,9 +233,10 @@      -- Choose either 'Word64#' or 'Word#' to represent the arguments of the     -- 'Fingerprint' data constructor.-    mkWord64LitWordRep dflags-      | platformWordSize (targetPlatform dflags) < 8 = mkWord64LitWord64-      | otherwise = mkWordLit dflags . toInteger+    mkWord64LitWordRep dflags =+      case platformWordSize (targetPlatform dflags) of+        PW4 -> mkWord64LitWord64+        PW8 -> mkWordLit dflags . toInteger      lookupIdHscEnv :: Name -> IO Id     lookupIdHscEnv n = lookupTypeHscEnv hsc_env n >>=
main/SysTools.hs view
@@ -13,7 +13,7 @@ module SysTools (         -- * Initialisation         initSysTools,-        initLlvmConfig,+        lazyInitLlvmConfig,          -- * Interface to system tools         module SysTools.Tasks,@@ -40,23 +40,24 @@  import GhcPrelude +import GHC.Settings+ import Module import Packages-import Config import Outputable import ErrUtils-import Platform-import Util+import GHC.Platform import DynFlags-import Fingerprint +import Control.Monad.Trans.Except (runExceptT) import System.FilePath import System.IO-import System.Directory+import System.IO.Unsafe (unsafeInterleaveIO) import SysTools.ExtraObj import SysTools.Info import SysTools.Tasks import SysTools.BaseDir+import SysTools.Settings  {- Note [How GHC finds toolchain utilities]@@ -110,13 +111,34 @@ ************************************************************************ -} -initLlvmConfig :: String+-- Note [LLVM configuration]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- The `llvm-targets` and `llvm-passes` files are shipped with GHC and contain+-- information needed by the LLVM backend to invoke `llc` and `opt`.+-- Specifically:+--+--  * llvm-targets maps autoconf host triples to the corresponding LLVM+--    `data-layout` declarations. This information is extracted from clang using+--    the script in utils/llvm-targets/gen-data-layout.sh and should be updated+--    whenever we target a new version of LLVM.+--+--  * llvm-passes maps GHC optimization levels to sets of LLVM optimization+--    flags that GHC should pass to `opt`.+--+-- This information is contained in files rather the GHC source to allow users+-- to add new targets to GHC without having to recompile the compiler.+--+-- Since this information is only needed by the LLVM backend we load it lazily+-- with unsafeInterleaveIO. Consequently it is important that we lazily pattern+-- match on LlvmConfig until we actually need its contents.++lazyInitLlvmConfig :: String                -> IO LlvmConfig-initLlvmConfig top_dir-  = do+lazyInitLlvmConfig top_dir+  = unsafeInterleaveIO $ do    -- see Note [LLVM configuration]       targets <- readAndParse "llvm-targets" mkLlvmTarget       passes <- readAndParse "llvm-passes" id-      return (targets, passes)+      return $ LlvmConfig { llvmTargets = targets, llvmPasses = passes }   where     readAndParse name builder =       do let llvmConfigFile = top_dir </> name@@ -134,201 +156,16 @@                                 --      (a) the system programs                                 --      (b) the package-config file                                 --      (c) the GHC usage message-initSysTools top_dir-  = do       -- see Note [topdir: How GHC finds its files]-             -- NB: top_dir is assumed to be in standard Unix-             -- format, '/' separated-       mtool_dir <- findToolDir top_dir-             -- see Note [tooldir: How GHC finds mingw and perl on Windows]--       let installed :: FilePath -> FilePath-           installed file = top_dir </> file-           libexec :: FilePath -> FilePath-           libexec file = top_dir </> "bin" </> file-           settingsFile = installed "settings"-           platformConstantsFile = installed "platformConstants"--       settingsStr <- readFile settingsFile-       platformConstantsStr <- readFile platformConstantsFile-       mySettings <- case maybeReadFuzzy settingsStr of-                     Just s ->-                         return s-                     Nothing ->-                         pgmError ("Can't parse " ++ show settingsFile)-       platformConstants <- case maybeReadFuzzy platformConstantsStr of-                            Just s ->-                                return s-                            Nothing ->-                                pgmError ("Can't parse " ++-                                          show platformConstantsFile)-       let getSetting key = case lookup key mySettings of-                            Just xs -> return $ expandTopDir top_dir xs-                            Nothing -> pgmError ("No entry for " ++ show key ++ " in " ++ show settingsFile)-           getToolSetting key = expandToolDir mtool_dir <$> getSetting key-           getBooleanSetting key = case lookup key mySettings of-                                   Just "YES" -> return True-                                   Just "NO" -> return False-                                   Just xs -> pgmError ("Bad value for " ++ show key ++ ": " ++ show xs)-                                   Nothing -> pgmError ("No entry for " ++ show key ++ " in " ++ show settingsFile)-           readSetting key = case lookup key mySettings of-                             Just xs ->-                                 case maybeRead xs of-                                 Just v -> return v-                                 Nothing -> pgmError ("Failed to read " ++ show key ++ " value " ++ show xs)-                             Nothing -> pgmError ("No entry for " ++ show key ++ " in " ++ show settingsFile)-       crossCompiling <- getBooleanSetting "cross compiling"-       targetArch <- readSetting "target arch"-       targetOS <- readSetting "target os"-       targetWordSize <- readSetting "target word size"-       targetUnregisterised <- getBooleanSetting "Unregisterised"-       targetHasGnuNonexecStack <- readSetting "target has GNU nonexec stack"-       targetHasIdentDirective <- readSetting "target has .ident directive"-       targetHasSubsectionsViaSymbols <- readSetting "target has subsections via symbols"-       myExtraGccViaCFlags <- getSetting "GCC extra via C opts"-       -- On Windows, mingw is distributed with GHC,-       -- so we look in TopDir/../mingw/bin,-       -- as well as TopDir/../../mingw/bin for hadrian.-       -- It would perhaps be nice to be able to override this-       -- with the settings file, but it would be a little fiddly-       -- to make that possible, so for now you can't.-       gcc_prog <- getToolSetting "C compiler command"-       gcc_args_str <- getSetting "C compiler flags"-       gccSupportsNoPie <- getBooleanSetting "C compiler supports -no-pie"-       cpp_prog <- getToolSetting "Haskell CPP command"-       cpp_args_str <- getSetting "Haskell CPP flags"-       let unreg_gcc_args = if targetUnregisterised-                            then ["-DNO_REGS", "-DUSE_MINIINTERPRETER"]-                            else []-           -- TABLES_NEXT_TO_CODE affects the info table layout.-           tntc_gcc_args-            | mkTablesNextToCode targetUnregisterised-               = ["-DTABLES_NEXT_TO_CODE"]-            | otherwise = []-           cpp_args= map Option (words cpp_args_str)-           gcc_args = map Option (words gcc_args_str-                               ++ unreg_gcc_args-                               ++ tntc_gcc_args)-       ldSupportsCompactUnwind <- getBooleanSetting "ld supports compact unwind"-       ldSupportsBuildId       <- getBooleanSetting "ld supports build-id"-       ldSupportsFilelist      <- getBooleanSetting "ld supports filelist"-       ldIsGnuLd               <- getBooleanSetting "ld is GNU ld"-       perl_path <- getToolSetting "perl command"--       let pkgconfig_path = installed "package.conf.d"-           ghc_usage_msg_path  = installed "ghc-usage.txt"-           ghci_usage_msg_path = installed "ghci-usage.txt"--             -- For all systems, unlit, split, mangle are GHC utilities-             -- architecture-specific stuff is done when building Config.hs-           unlit_path = libexec cGHC_UNLIT_PGM--             -- split is a Perl script-           split_script  = libexec cGHC_SPLIT_PGM--       windres_path <- getToolSetting "windres command"-       libtool_path <- getToolSetting "libtool command"-       ar_path <- getToolSetting "ar command"-       ranlib_path <- getToolSetting "ranlib command"--       tmpdir <- getTemporaryDirectory--       touch_path <- getToolSetting "touch command"--       let -- On Win32 we don't want to rely on #!/bin/perl, so we prepend-           -- a call to Perl to get the invocation of split.-           -- On Unix, scripts are invoked using the '#!' method.  Binary-           -- installations of GHC on Unix place the correct line on the-           -- front of the script at installation time, so we don't want-           -- to wire-in our knowledge of $(PERL) on the host system here.-           (split_prog,  split_args)-             | isWindowsHost = (perl_path,    [Option split_script])-             | otherwise     = (split_script, [])-       mkdll_prog <- getToolSetting "dllwrap command"-       let mkdll_args = []--       -- cpp is derived from gcc on all platforms-       -- HACK, see setPgmP below. We keep 'words' here to remember to fix-       -- Config.hs one day.---       -- Other things being equal, as and ld are simply gcc-       gcc_link_args_str <- getSetting "C compiler link flags"-       let   as_prog  = gcc_prog-             as_args  = gcc_args-             ld_prog  = gcc_prog-             ld_args  = gcc_args ++ map Option (words gcc_link_args_str)--       -- We just assume on command line-       lc_prog <- getSetting "LLVM llc command"-       lo_prog <- getSetting "LLVM opt command"-       lcc_prog <- getSetting "LLVM clang command"--       let iserv_prog = libexec "ghc-iserv"--       let platform = Platform {-                          platformArch = targetArch,-                          platformOS   = targetOS,-                          platformWordSize = targetWordSize,-                          platformUnregisterised = targetUnregisterised,-                          platformHasGnuNonexecStack = targetHasGnuNonexecStack,-                          platformHasIdentDirective = targetHasIdentDirective,-                          platformHasSubsectionsViaSymbols = targetHasSubsectionsViaSymbols,-                          platformIsCrossCompiling = crossCompiling-                      }--       return $ Settings {-                    sTargetPlatform = platform,-                    sTmpDir         = normalise tmpdir,-                    sGhcUsagePath   = ghc_usage_msg_path,-                    sGhciUsagePath  = ghci_usage_msg_path,-                    sToolDir        = mtool_dir,-                    sTopDir         = top_dir,-                    sRawSettings    = mySettings,-                    sExtraGccViaCFlags = words myExtraGccViaCFlags,-                    sSystemPackageConfig = pkgconfig_path,-                    sLdSupportsCompactUnwind = ldSupportsCompactUnwind,-                    sLdSupportsBuildId       = ldSupportsBuildId,-                    sLdSupportsFilelist      = ldSupportsFilelist,-                    sLdIsGnuLd               = ldIsGnuLd,-                    sGccSupportsNoPie        = gccSupportsNoPie,-                    sProgramName             = "ghc",-                    sProjectVersion          = cProjectVersion,-                    sPgm_L   = unlit_path,-                    sPgm_P   = (cpp_prog, cpp_args),-                    sPgm_F   = "",-                    sPgm_c   = (gcc_prog, gcc_args),-                    sPgm_s   = (split_prog,split_args),-                    sPgm_a   = (as_prog, as_args),-                    sPgm_l   = (ld_prog, ld_args),-                    sPgm_dll = (mkdll_prog,mkdll_args),-                    sPgm_T   = touch_path,-                    sPgm_windres = windres_path,-                    sPgm_libtool = libtool_path,-                    sPgm_ar = ar_path,-                    sPgm_ranlib = ranlib_path,-                    sPgm_lo  = (lo_prog,[]),-                    sPgm_lc  = (lc_prog,[]),-                    sPgm_lcc = (lcc_prog,[]),-                    sPgm_i   = iserv_prog,-                    sOpt_L       = [],-                    sOpt_P       = [],-                    sOpt_P_fingerprint = fingerprint0,-                    sOpt_F       = [],-                    sOpt_c       = [],-                    sOpt_a       = [],-                    sOpt_l       = [],-                    sOpt_windres = [],-                    sOpt_lcc     = [],-                    sOpt_lo      = [],-                    sOpt_lc      = [],-                    sOpt_i       = [],-                    sPlatformConstants = platformConstants-             }-+initSysTools top_dir = do+  res <- runExceptT $ initSettings top_dir+  case res of+    Right a -> pure a+    Left (SettingsError_MissingData msg) -> pgmError msg+    Left (SettingsError_BadData msg) -> pgmError msg  {- Note [Windows stack usage] -See: Trac #8870 (and #8834 for related info) and #12186+See: #8870 (and #8834 for related info) and #12186  On Windows, occasionally we need to grow the stack. In order to do this, we would normally just bump the stack pointer - but there's a@@ -398,10 +235,12 @@         -- against libHSrts, then both end up getting loaded,         -- and things go wrong. We therefore link the libraries         -- with the same RTS flags that we link GHC with.-        dflags1 = if cGhcThreaded then addWay' WayThreaded dflags0-                                  else                     dflags0-        dflags2 = if cGhcDebugged then addWay' WayDebug dflags1-                                  else                  dflags1+        dflags1 = if platformMisc_ghcThreaded $ platformMisc dflags0+          then addWay' WayThreaded dflags0+          else                     dflags0+        dflags2 = if platformMisc_ghcDebugged $ platformMisc dflags1+          then addWay' WayDebug dflags1+          else                  dflags1         dflags = updateWays dflags2          verbFlags = getVerbFlags dflags@@ -630,5 +469,5 @@ Unregisterised compiler can't evade R_*_COPY relocations easily thus we disable -Bsymbolic linking there. -See related Trac tickets: #4210, #15338+See related tickets: #4210, #15338 -}
main/SysTools/BaseDir.hs view
@@ -14,26 +14,23 @@ module SysTools.BaseDir   ( expandTopDir, expandToolDir   , findTopDir, findToolDir+  , tryFindTopDir   ) where  #include "HsVersions.h"  import GhcPrelude +-- See note [Base Dir] for why some of this logic is shared with ghc-pkg.+import GHC.BaseDir+ import Panic  import System.Environment (lookupEnv) import System.FilePath-import Data.List --- POSIX-#if defined(darwin_HOST_OS) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS)-import System.Environment (getExecutablePath)-#endif- -- Windows #if defined(mingw32_HOST_OS)-import System.Environment (getExecutablePath) import System.Directory (doesDirectoryExist) #endif @@ -68,7 +65,7 @@ from topdir we can find package.conf, ghc-asm, etc.  -Note [tooldir: How GHC finds mingw and perl on Windows]+Note [tooldir: How GHC finds mingw on Windows]  GHC has some custom logic on Windows for finding the mingw toolchain and perl. Depending on whether GHC is built@@ -79,10 +76,6 @@  -} --- | Expand occurrences of the @$topdir@ interpolation in a string.-expandTopDir :: FilePath -> String -> String-expandTopDir = expandPathVar "topdir"- -- | Expand occurrences of the @$tooldir@ interpolation in a string -- on Windows, leave the string untouched otherwise. expandToolDir :: Maybe FilePath -> String -> String@@ -93,72 +86,32 @@ expandToolDir _ s = s #endif --- | @expandPathVar var value str@------   replaces occurences of variable @$var@ with @value@ in str.-expandPathVar :: String -> FilePath -> String -> String-expandPathVar var value str-  | Just str' <- stripPrefix ('$':var) str-  , null str' || isPathSeparator (head str')-  = value ++ expandPathVar var value str'-expandPathVar var value (x:xs) = x : expandPathVar var value xs-expandPathVar _ _ [] = []- -- | Returns a Unix-format path pointing to TopDir. findTopDir :: Maybe String -- Maybe TopDir path (without the '-B' prefix).            -> IO String    -- TopDir (in Unix format '/' separated)-findTopDir (Just minusb) = return (normalise minusb)-findTopDir Nothing+findTopDir m_minusb = do+  maybe_exec_dir <- tryFindTopDir m_minusb+  case maybe_exec_dir of+      -- "Just" on Windows, "Nothing" on unix+      Nothing -> throwGhcExceptionIO $+          InstallationError "missing -B<dir> option"+      Just dir -> return dir++tryFindTopDir+  :: Maybe String -- ^ Maybe TopDir path (without the '-B' prefix).+  -> IO (Maybe String) -- ^ TopDir (in Unix format '/' separated)+tryFindTopDir (Just minusb) = return $ Just $ normalise minusb+tryFindTopDir Nothing     = do -- The _GHC_TOP_DIR environment variable can be used to specify          -- the top dir when the -B argument is not specified. It is not          -- intended for use by users, it was added specifically for the          -- purpose of running GHC within GHCi.          maybe_env_top_dir <- lookupEnv "_GHC_TOP_DIR"          case maybe_env_top_dir of-             Just env_top_dir -> return env_top_dir-             Nothing -> do-                 -- Get directory of executable-                 maybe_exec_dir <- getBaseDir-                 case maybe_exec_dir of-                     -- "Just" on Windows, "Nothing" on unix-                     Nothing -> throwGhcExceptionIO $-                         InstallationError "missing -B<dir> option"-                     Just dir -> return dir--getBaseDir :: IO (Maybe String)--#if defined(mingw32_HOST_OS)---- locate the "base dir" when given the path--- to the real ghc executable (as opposed to symlink)--- that is running this function.-rootDir :: FilePath -> FilePath-rootDir = takeDirectory . takeDirectory . normalise+             Just env_top_dir -> return $ Just env_top_dir+             -- Try directory of executable+             Nothing -> getBaseDir -getBaseDir = Just . (\p -> p </> "lib") . rootDir <$> getExecutablePath-#elif defined(darwin_HOST_OS) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS)--- on unix, this is a bit more confusing.--- The layout right now is something like------   /bin/ghc-X.Y.Z <- wrapper script (1)---   /bin/ghc       <- symlink to wrapper script (2)---   /lib/ghc-X.Y.Z/bin/ghc <- ghc executable (3)---   /lib/ghc-X.Y.Z <- $topdir (4)------ As such, we first need to find the absolute location to the--- binary.------ getExecutablePath will return (3). One takeDirectory will--- give use /lib/ghc-X.Y.Z/bin, and another will give us (4).------ This of course only works due to the current layout. If--- the layout is changed, such that we have ghc-X.Y.Z/{bin,lib}--- this would need to be changed accordingly.----getBaseDir = Just . (\p -> p </> "lib") . takeDirectory . takeDirectory <$> getExecutablePath-#else-getBaseDir = return Nothing-#endif  -- See Note [tooldir: How GHC finds mingw and perl on Windows] -- Returns @Nothing@ when not on Windows.
main/SysTools/ExtraObj.hs view
@@ -17,7 +17,7 @@ import ErrUtils import DynFlags import Packages-import Platform+import GHC.Platform import Outputable import SrcLoc           ( noSrcSpan ) import Module@@ -40,7 +40,7 @@       oFile <- newTempName dflags TFL_GhcSession "o"       writeFile cFile xs       ccInfo <- liftIO $ getCompilerInfo dflags-      runCc dflags+      runCc Nothing dflags             ([Option        "-c",               FileOption "" cFile,               Option        "-o",@@ -93,7 +93,7 @@                   _                      -> exeMain      exeMain = vcat [-        text "#include \"Rts.h\"",+        text "#include <Rts.h>",         text "extern StgClosure ZCMain_main_closure;",         text "int main(int argc, char *argv[])",         char '{',@@ -119,7 +119,7 @@         ]      dllMain = vcat [-        text "#include \"Rts.h\"",+        text "#include <Rts.h>",         text "#include <windows.h>",         text "#include <stdbool.h>",         char '\n',
main/SysTools/Info.hs view
@@ -19,14 +19,14 @@  import System.IO -import Platform+import GHC.Platform import GhcPrelude  import SysTools.Process  {- Note [Run-time linker info] -See also: Trac #5240, Trac #6063, Trac #10110+See also: #5240, #6063, #10110  Before 'runLink', we need to be sure to get the relevant information about the linker we're using at runtime to see if we need any extra@@ -127,8 +127,8 @@       parseLinkerInfo stdo _stde _exitc         | any ("GNU ld" `isPrefixOf`) stdo =           -- GNU ld specifically needs to use less memory. This especially-          -- hurts on small object files. Trac #5240.-          -- Set DT_NEEDED for all shared libraries. Trac #10110.+          -- hurts on small object files. #5240.+          -- Set DT_NEEDED for all shared libraries. #10110.           -- TODO: Investigate if these help or hurt when using split sections.           return (GnuLD $ map Option ["-Wl,--hash-size=31",                                       "-Wl,--reduce-memory-overheads",@@ -137,7 +137,7 @@                                       "-Wl,--no-as-needed"])          | any ("GNU gold" `isPrefixOf`) stdo =-          -- GNU gold only needs --no-as-needed. Trac #10110.+          -- GNU gold only needs --no-as-needed. #10110.           -- ELF specific flag, see Note [ELF needed shared libs]           return (GnuGold [Option "-Wl,--no-as-needed"]) @@ -219,7 +219,7 @@ -- See Note [Run-time linker info]. getCompilerInfo' :: DynFlags -> IO CompilerInfo getCompilerInfo' dflags = do-  let (pgm,_) = pgm_c dflags+  let pgm = pgm_c dflags       -- Try to grab the info from the process output.       parseCompilerInfo _stdo stde _exitc         -- Regular GCC@@ -231,13 +231,13 @@         -- FreeBSD clang         | any ("FreeBSD clang version" `isInfixOf`) stde =           return Clang-        -- XCode 5.1 clang+        -- Xcode 5.1 clang         | any ("Apple LLVM version 5.1" `isPrefixOf`) stde =           return AppleClang51-        -- XCode 5 clang+        -- Xcode 5 clang         | any ("Apple LLVM version" `isPrefixOf`) stde =           return AppleClang-        -- XCode 4.1 clang+        -- Xcode 4.1 clang         | any ("Apple clang version" `isPrefixOf`) stde =           return AppleClang          -- Unknown linker.
main/SysTools/Process.hs view
@@ -68,7 +68,7 @@     -> IO (ExitCode, String, String) -- ^ (exit_code, stdout, stderr) readProcessEnvWithExitCode prog args env_update = do     current_env <- getEnvironment-    readCreateProcessWithExitCode ((proc prog args) {use_process_jobs = True}) {+    readCreateProcessWithExitCode (proc prog args) {         env = Just (replaceVar env_update current_env) } ""  -- Don't let gcc localize version info string, #8825@@ -123,7 +123,7 @@ -- response files for passing them in. See: -- --     https://gcc.gnu.org/wiki/Response_Files---     https://ghc.haskell.org/trac/ghc/ticket/10777+--     https://gitlab.haskell.org/ghc/ghc/issues/10777 runSomethingResponseFile   :: DynFlags -> (String->String) -> String -> String -> [Option]   -> Maybe [(String,String)] -> IO ()@@ -220,21 +220,8 @@   -- unless an exception was raised.   let safely inner = mask $ \restore -> do         -- acquire-        -- On Windows due to how exec is emulated the old process will exit and-        -- a new process will be created. This means waiting for termination of-        -- the parent process will get you in a race condition as the child may-        -- not have finished yet.  This caused #16450.  To fix this use a-        -- process job to track all child processes and wait for each one to-        -- finish.-        let procdata = (proc pgm real_args) { cwd = mb_cwd-                                            , env = mb_env-                                            , use_process_jobs = True-                                            , std_in  = CreatePipe-                                            , std_out = CreatePipe-                                            , std_err = CreatePipe-                                            }-        (Just hStdIn, Just hStdOut, Just hStdErr, hProcess) <- restore $-          createProcess_ "builderMainLoop" procdata+        (hStdIn, hStdOut, hStdErr, hProcess) <- restore $+          runInteractiveProcess pgm real_args mb_cwd mb_env         let cleanup_handles = do               hClose hStdIn               hClose hStdOut
+ main/SysTools/Settings.hs view
@@ -0,0 +1,253 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE ScopedTypeVariables #-}++module SysTools.Settings+ ( SettingsError (..)+ , initSettings+ ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.Settings++import Config+import CliOption+import FileSettings+import Fingerprint+import GHC.Platform+import GhcNameVersion+import Outputable+import Settings+import SysTools.BaseDir+import ToolSettings++import Control.Monad.Trans.Except+import Control.Monad.IO.Class+import qualified Data.Map as Map+import System.FilePath+import System.Directory++data SettingsError+  = SettingsError_MissingData String+  | SettingsError_BadData String++initSettings+  :: forall m+  .  MonadIO m+  => String -- ^ TopDir path+  -> ExceptT SettingsError m Settings+initSettings top_dir = do+  -- see Note [topdir: How GHC finds its files]+  -- NB: top_dir is assumed to be in standard Unix+  -- format, '/' separated+  mtool_dir <- liftIO $ findToolDir top_dir+        -- see Note [tooldir: How GHC finds mingw on Windows]++  let installed :: FilePath -> FilePath+      installed file = top_dir </> file+      libexec :: FilePath -> FilePath+      libexec file = top_dir </> "bin" </> file+      settingsFile = installed "settings"+      platformConstantsFile = installed "platformConstants"++      readFileSafe :: FilePath -> ExceptT SettingsError m String+      readFileSafe path = liftIO (doesFileExist path) >>= \case+        True -> liftIO $ readFile path+        False -> throwE $ SettingsError_MissingData $ "Missing file: " ++ path++  settingsStr <- readFileSafe settingsFile+  platformConstantsStr <- readFileSafe platformConstantsFile+  settingsList <- case maybeReadFuzzy settingsStr of+    Just s -> pure s+    Nothing -> throwE $ SettingsError_BadData $+      "Can't parse " ++ show settingsFile+  let mySettings = Map.fromList settingsList+  platformConstants <- case maybeReadFuzzy platformConstantsStr of+    Just s -> pure s+    Nothing -> throwE $ SettingsError_BadData $+      "Can't parse " ++ show platformConstantsFile+  -- See Note [Settings file] for a little more about this file. We're+  -- just partially applying those functions and throwing 'Left's; they're+  -- written in a very portable style to keep ghc-boot light.+  let getSetting key = either pgmError pure $+        getFilePathSetting0 top_dir settingsFile mySettings key+      getToolSetting :: String -> ExceptT SettingsError m String+      getToolSetting key = expandToolDir mtool_dir <$> getSetting key+      getBooleanSetting :: String -> ExceptT SettingsError m Bool+      getBooleanSetting key = either pgmError pure $+        getBooleanSetting0 settingsFile mySettings key+  targetPlatformString <- getSetting "target platform string"+  tablesNextToCode <- getBooleanSetting "Tables next to code"+  myExtraGccViaCFlags <- getSetting "GCC extra via C opts"+  -- On Windows, mingw is distributed with GHC,+  -- so we look in TopDir/../mingw/bin,+  -- as well as TopDir/../../mingw/bin for hadrian.+  -- It would perhaps be nice to be able to override this+  -- with the settings file, but it would be a little fiddly+  -- to make that possible, so for now you can't.+  cc_prog <- getToolSetting "C compiler command"+  cc_args_str <- getSetting "C compiler flags"+  cxx_args_str <- getSetting "C++ compiler flags"+  gccSupportsNoPie <- getBooleanSetting "C compiler supports -no-pie"+  cpp_prog <- getToolSetting "Haskell CPP command"+  cpp_args_str <- getSetting "Haskell CPP flags"++  platform <- either pgmError pure $ getTargetPlatform settingsFile mySettings++  let unreg_cc_args = if platformUnregisterised platform+                      then ["-DNO_REGS", "-DUSE_MINIINTERPRETER"]+                      else []+      cpp_args = map Option (words cpp_args_str)+      cc_args  = words cc_args_str ++ unreg_cc_args+      cxx_args = words cxx_args_str+  ldSupportsCompactUnwind <- getBooleanSetting "ld supports compact unwind"+  ldSupportsBuildId       <- getBooleanSetting "ld supports build-id"+  ldSupportsFilelist      <- getBooleanSetting "ld supports filelist"+  ldIsGnuLd               <- getBooleanSetting "ld is GNU ld"++  let pkgconfig_path = installed "package.conf.d"+      ghc_usage_msg_path  = installed "ghc-usage.txt"+      ghci_usage_msg_path = installed "ghci-usage.txt"++  -- For all systems, unlit, split, mangle are GHC utilities+  -- architecture-specific stuff is done when building Config.hs+  unlit_path <- getToolSetting "unlit command"++  windres_path <- getToolSetting "windres command"+  libtool_path <- getToolSetting "libtool command"+  ar_path <- getToolSetting "ar command"+  ranlib_path <- getToolSetting "ranlib command"++  -- TODO this side-effect doesn't belong here. Reading and parsing the settings+  -- should be idempotent and accumulate no resources.+  tmpdir <- liftIO $ getTemporaryDirectory++  touch_path <- getToolSetting "touch command"++  mkdll_prog <- getToolSetting "dllwrap command"+  let mkdll_args = []++  -- cpp is derived from gcc on all platforms+  -- HACK, see setPgmP below. We keep 'words' here to remember to fix+  -- Config.hs one day.+++  -- Other things being equal, as and ld are simply gcc+  cc_link_args_str <- getSetting "C compiler link flags"+  let   as_prog  = cc_prog+        as_args  = map Option cc_args+        ld_prog  = cc_prog+        ld_args  = map Option (cc_args ++ words cc_link_args_str)++  llvmTarget <- getSetting "LLVM target"++  -- We just assume on command line+  lc_prog <- getSetting "LLVM llc command"+  lo_prog <- getSetting "LLVM opt command"+  lcc_prog <- getSetting "LLVM clang command"++  let iserv_prog = libexec "ghc-iserv"++  integerLibrary <- getSetting "integer library"+  integerLibraryType <- case integerLibrary of+    "integer-gmp" -> pure IntegerGMP+    "integer-simple" -> pure IntegerSimple+    _ -> pgmError $ unwords+      [ "Entry for"+      , show "integer library"+      , "must be one of"+      , show "integer-gmp"+      , "or"+      , show "integer-simple"+      ]++  ghcWithInterpreter <- getBooleanSetting "Use interpreter"+  ghcWithNativeCodeGen <- getBooleanSetting "Use native code generator"+  ghcWithSMP <- getBooleanSetting "Support SMP"+  ghcRTSWays <- getSetting "RTS ways"+  leadingUnderscore <- getBooleanSetting "Leading underscore"+  useLibFFI <- getBooleanSetting "Use LibFFI"+  ghcThreaded <- getBooleanSetting "Use Threads"+  ghcDebugged <- getBooleanSetting "Use Debugging"+  ghcRtsWithLibdw <- getBooleanSetting "RTS expects libdw"++  return $ Settings+    { sGhcNameVersion = GhcNameVersion+      { ghcNameVersion_programName = "ghc"+      , ghcNameVersion_projectVersion = cProjectVersion+      }++    , sFileSettings = FileSettings+      { fileSettings_tmpDir         = normalise tmpdir+      , fileSettings_ghcUsagePath   = ghc_usage_msg_path+      , fileSettings_ghciUsagePath  = ghci_usage_msg_path+      , fileSettings_toolDir        = mtool_dir+      , fileSettings_topDir         = top_dir+      , fileSettings_systemPackageConfig = pkgconfig_path+      }++    , sToolSettings = ToolSettings+      { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind+      , toolSettings_ldSupportsBuildId       = ldSupportsBuildId+      , toolSettings_ldSupportsFilelist      = ldSupportsFilelist+      , toolSettings_ldIsGnuLd               = ldIsGnuLd+      , toolSettings_ccSupportsNoPie         = gccSupportsNoPie++      , toolSettings_pgm_L   = unlit_path+      , toolSettings_pgm_P   = (cpp_prog, cpp_args)+      , toolSettings_pgm_F   = ""+      , toolSettings_pgm_c   = cc_prog+      , toolSettings_pgm_a   = (as_prog, as_args)+      , toolSettings_pgm_l   = (ld_prog, ld_args)+      , toolSettings_pgm_dll = (mkdll_prog,mkdll_args)+      , toolSettings_pgm_T   = touch_path+      , toolSettings_pgm_windres = windres_path+      , toolSettings_pgm_libtool = libtool_path+      , toolSettings_pgm_ar = ar_path+      , toolSettings_pgm_ranlib = ranlib_path+      , toolSettings_pgm_lo  = (lo_prog,[])+      , toolSettings_pgm_lc  = (lc_prog,[])+      , toolSettings_pgm_lcc = (lcc_prog,[])+      , toolSettings_pgm_i   = iserv_prog+      , toolSettings_opt_L       = []+      , toolSettings_opt_P       = []+      , toolSettings_opt_P_fingerprint = fingerprint0+      , toolSettings_opt_F       = []+      , toolSettings_opt_c       = cc_args+      , toolSettings_opt_cxx     = cxx_args+      , toolSettings_opt_a       = []+      , toolSettings_opt_l       = []+      , toolSettings_opt_windres = []+      , toolSettings_opt_lcc     = []+      , toolSettings_opt_lo      = []+      , toolSettings_opt_lc      = []+      , toolSettings_opt_i       = []++      , toolSettings_extraGccViaCFlags = words myExtraGccViaCFlags+      }++    , sTargetPlatform = platform+    , sPlatformMisc = PlatformMisc+      { platformMisc_targetPlatformString = targetPlatformString+      , platformMisc_integerLibrary = integerLibrary+      , platformMisc_integerLibraryType = integerLibraryType+      , platformMisc_ghcWithInterpreter = ghcWithInterpreter+      , platformMisc_ghcWithNativeCodeGen = ghcWithNativeCodeGen+      , platformMisc_ghcWithSMP = ghcWithSMP+      , platformMisc_ghcRTSWays = ghcRTSWays+      , platformMisc_tablesNextToCode = tablesNextToCode+      , platformMisc_leadingUnderscore = leadingUnderscore+      , platformMisc_libFFI = useLibFFI+      , platformMisc_ghcThreaded = ghcThreaded+      , platformMisc_ghcDebugged = ghcDebugged+      , platformMisc_ghcRtsWithLibdw = ghcRtsWithLibdw+      , platformMisc_llvmTarget = llvmTarget+      }++    , sPlatformConstants = platformConstants++    , sRawSettings    = settingsList+    }
main/SysTools/Tasks.hs view
@@ -10,9 +10,10 @@  import Exception import ErrUtils+import HscTypes import DynFlags import Outputable-import Platform+import GHC.Platform import Util  import Data.List@@ -35,14 +36,14 @@ -}  runUnlit :: DynFlags -> [Option] -> IO ()-runUnlit dflags args = do+runUnlit dflags args = traceToolCommand dflags "unlit" $ do   let prog = pgm_L dflags       opts = getOpts dflags opt_L   runSomething dflags "Literate pre-processor" prog                (map Option opts ++ args)  runCpp :: DynFlags -> [Option] -> IO ()-runCpp dflags args =   do+runCpp dflags args = traceToolCommand dflags "cpp" $ do   let (p,args0) = pgm_P dflags       args1 = map Option (getOpts dflags opt_P)       args2 = [Option "-Werror" | gopt Opt_WarnIsError dflags]@@ -52,16 +53,17 @@                        (args0 ++ args1 ++ args2 ++ args) Nothing mb_env  runPp :: DynFlags -> [Option] -> IO ()-runPp dflags args =   do+runPp dflags args = traceToolCommand dflags "pp" $ do   let prog = pgm_F dflags       opts = map Option (getOpts dflags opt_F)   runSomething dflags "Haskell pre-processor" prog (args ++ opts) -runCc :: DynFlags -> [Option] -> IO ()-runCc dflags args =   do-  let (p,args0) = pgm_c dflags-      args1 = map Option (getOpts dflags opt_c)-      args2 = args0 ++ args ++ args1+-- | Run compiler of C-like languages and raw objects (such as gcc or clang).+runCc :: Maybe ForeignSrcLang -> DynFlags -> [Option] -> IO ()+runCc mLanguage dflags args = traceToolCommand dflags "cc" $ do+  let p = pgm_c dflags+      args1 = map Option userOpts+      args2 = languageOptions ++ args ++ args1       -- We take care to pass -optc flags in args1 last to ensure that the       -- user can override flags passed by GHC. See #14452.   mb_env <- getGccEnv args2@@ -117,12 +119,30 @@    | "warning: call-clobbered register used" `isContainedIn` w = False    | otherwise = True +  -- force the C compiler to interpret this file as C when+  -- compiling .hc files, by adding the -x c option.+  -- Also useful for plain .c files, just in case GHC saw a+  -- -x c option.+  (languageOptions, userOpts) = case mLanguage of+    Nothing -> ([], userOpts_c)+    Just language -> ([Option "-x", Option languageName], opts)+      where+        (languageName, opts) = case language of+          LangC      -> ("c",             userOpts_c)+          LangCxx    -> ("c++",           userOpts_cxx)+          LangObjc   -> ("objective-c",   userOpts_c)+          LangObjcxx -> ("objective-c++", userOpts_cxx)+          LangAsm    -> ("assembler",     [])+          RawObject  -> ("c",             []) -- claim C for lack of a better idea+  userOpts_c   = getOpts dflags opt_c+  userOpts_cxx = getOpts dflags opt_cxx+ isContainedIn :: String -> String -> Bool xs `isContainedIn` ys = any (xs `isPrefixOf`) (tails ys)  -- | Run the linker with some arguments and return the output askLd :: DynFlags -> [Option] -> IO String-askLd dflags args = do+askLd dflags args = traceToolCommand dflags "linker" $ do   let (p,args0) = pgm_l dflags       args1     = map Option (getOpts dflags opt_l)       args2     = args0 ++ args1 ++ args@@ -130,13 +150,8 @@   runSomethingWith dflags "gcc" p args2 $ \real_args ->     readCreateProcessWithExitCode' (proc p real_args){ env = mb_env } -runSplit :: DynFlags -> [Option] -> IO ()-runSplit dflags args = do-  let (p,args0) = pgm_s dflags-  runSomething dflags "Splitter" p (args0++args)- runAs :: DynFlags -> [Option] -> IO ()-runAs dflags args = do+runAs dflags args = traceToolCommand dflags "as" $ do   let (p,args0) = pgm_a dflags       args1 = map Option (getOpts dflags opt_a)       args2 = args0 ++ args1 ++ args@@ -145,7 +160,7 @@  -- | Run the LLVM Optimiser runLlvmOpt :: DynFlags -> [Option] -> IO ()-runLlvmOpt dflags args = do+runLlvmOpt dflags args = traceToolCommand dflags "opt" $ do   let (p,args0) = pgm_lo dflags       args1 = map Option (getOpts dflags opt_lo)       -- We take care to pass -optlo flags (e.g. args0) last to ensure that the@@ -154,7 +169,7 @@  -- | Run the LLVM Compiler runLlvmLlc :: DynFlags -> [Option] -> IO ()-runLlvmLlc dflags args = do+runLlvmLlc dflags args = traceToolCommand dflags "llc" $ do   let (p,args0) = pgm_lc dflags       args1 = map Option (getOpts dflags opt_lc)   runSomething dflags "LLVM Compiler" p (args0 ++ args1 ++ args)@@ -163,7 +178,7 @@ -- backend on OS X as LLVM doesn't support the OS X system -- assembler) runClang :: DynFlags -> [Option] -> IO ()-runClang dflags args = do+runClang dflags args = traceToolCommand dflags "clang" $ do   let (clang,_) = pgm_lcc dflags       -- be careful what options we call clang with       -- see #5903 and #7617 for bugs caused by this.@@ -184,7 +199,7 @@  -- | Figure out which version of LLVM we are running this session figureLlvmVersion :: DynFlags -> IO (Maybe LlvmVersion)-figureLlvmVersion dflags = do+figureLlvmVersion dflags = traceToolCommand dflags "llc" $ do   let (pgm,opts) = pgm_lc dflags       args = filter notNull (map showOpt opts)       -- we grab the args even though they should be useless just in@@ -222,12 +237,16 @@   runLink :: DynFlags -> [Option] -> IO ()-runLink dflags args = do+runLink dflags args = traceToolCommand dflags "linker" $ do   -- See Note [Run-time linker info]+  --+  -- `-optl` args come at the end, so that later `-l` options+  -- given there manually can fill in symbols needed by+  -- Haskell libaries coming in via `args`.   linkargs <- neededLinkArgs `fmap` getLinkerInfo dflags   let (p,args0) = pgm_l dflags-      args1     = map Option (getOpts dflags opt_l)-      args2     = args0 ++ linkargs ++ args1 ++ args+      optl_args = map Option (getOpts dflags opt_l)+      args2     = args0 ++ linkargs ++ args ++ optl_args   mb_env <- getGccEnv args2   runSomethingResponseFile dflags ld_filter "Linker" p args2 mb_env   where@@ -282,7 +301,7 @@   runLibtool :: DynFlags -> [Option] -> IO ()-runLibtool dflags args = do+runLibtool dflags args = traceToolCommand dflags "libtool" $ do   linkargs <- neededLinkArgs `fmap` getLinkerInfo dflags   let args1      = map Option (getOpts dflags opt_l)       args2      = [Option "-static"] ++ args1 ++ args ++ linkargs@@ -291,31 +310,32 @@   runSomethingFiltered dflags id "Linker" libtool args2 Nothing mb_env  runAr :: DynFlags -> Maybe FilePath -> [Option] -> IO ()-runAr dflags cwd args = do+runAr dflags cwd args = traceToolCommand dflags "ar" $ do   let ar = pgm_ar dflags   runSomethingFiltered dflags id "Ar" ar args cwd Nothing  askAr :: DynFlags -> Maybe FilePath -> [Option] -> IO String-askAr dflags mb_cwd args = do+askAr dflags mb_cwd args = traceToolCommand dflags "ar" $ do   let ar = pgm_ar dflags   runSomethingWith dflags "Ar" ar args $ \real_args ->     readCreateProcessWithExitCode' (proc ar real_args){ cwd = mb_cwd }  runRanlib :: DynFlags -> [Option] -> IO ()-runRanlib dflags args = do+runRanlib dflags args = traceToolCommand dflags "ranlib" $ do   let ranlib = pgm_ranlib dflags   runSomethingFiltered dflags id "Ranlib" ranlib args Nothing Nothing  runMkDLL :: DynFlags -> [Option] -> IO ()-runMkDLL dflags args = do+runMkDLL dflags args = traceToolCommand dflags "mkdll" $ do   let (p,args0) = pgm_dll dflags       args1 = args0 ++ args   mb_env <- getGccEnv (args0++args)   runSomethingFiltered dflags id "Make DLL" p args1 Nothing mb_env  runWindres :: DynFlags -> [Option] -> IO ()-runWindres dflags args = do-  let (gcc, gcc_args) = pgm_c dflags+runWindres dflags args = traceToolCommand dflags "windres" $ do+  let cc = pgm_c dflags+      cc_args = map Option (sOpt_c (settings dflags))       windres = pgm_windres dflags       opts = map Option (getOpts dflags opt_windres)       quote x = "\"" ++ x ++ "\""@@ -323,8 +343,7 @@               -- spaces then windres fails to run gcc. We therefore need               -- to tell it what command to use...               Option ("--preprocessor=" ++-                      unwords (map quote (gcc :-                                          map showOpt gcc_args +++                      unwords (map quote (cc :                                           map showOpt opts ++                                           ["-E", "-xc", "-DRC_INVOKED"])))               -- ...but if we do that then if windres calls popen then@@ -333,9 +352,22 @@               -- See #1828.             : Option "--use-temp-file"             : args-  mb_env <- getGccEnv gcc_args+  mb_env <- getGccEnv cc_args   runSomethingFiltered dflags id "Windres" windres args' Nothing mb_env  touch :: DynFlags -> String -> String -> IO ()-touch dflags purpose arg =+touch dflags purpose arg = traceToolCommand dflags "touch" $   runSomething dflags purpose (pgm_T dflags) [FileOption "" arg]++-- * Tracing utility++-- | Record in the eventlog when the given tool command starts+--   and finishes, prepending the given 'String' with+--   \"systool:\", to easily be able to collect and process+--   all the systool events.+--+--   For those events to show up in the eventlog, you need+--   to run GHC with @-v2@ or @-ddump-timings@.+traceToolCommand :: DynFlags -> String -> IO a -> IO a+traceToolCommand dflags tool = withTiming+  dflags (text $ "systool:" ++ tool) (const ())
main/SysTools/Terminal.hs view
@@ -4,27 +4,24 @@  import GhcPrelude -#if defined MIN_VERSION_terminfo+#if defined(MIN_VERSION_terminfo) import Control.Exception (catch) import Data.Maybe (fromMaybe) import System.Console.Terminfo (SetupTermError, Terminal, getCapability,                                 setupTermFromEnv, termColors) import System.Posix (queryTerminal, stdError)-#elif defined mingw32_HOST_OS+#elif defined(mingw32_HOST_OS) import Control.Exception (catch, try) import Data.Bits ((.|.), (.&.))-import Data.List (isInfixOf, isPrefixOf, isSuffixOf)-import Foreign (FunPtr, Ptr, allocaBytes, castPtrToFunPtr,-                peek, plusPtr, sizeOf, with)-import Foreign.C (CInt(..), CWchar, peekCWStringLen)+import Foreign (Ptr, peek, with) import qualified Graphics.Win32 as Win32 import qualified System.Win32 as Win32 #endif -#if defined mingw32_HOST_OS && !defined WINAPI-# if defined i386_HOST_ARCH+#if defined(mingw32_HOST_OS) && !defined(WINAPI)+# if defined(i386_HOST_ARCH) #  define WINAPI stdcall-# elif defined x86_64_HOST_ARCH+# elif defined(x86_64_HOST_ARCH) #  define WINAPI ccall # else #  error unknown architecture@@ -34,7 +31,7 @@ -- | Check if ANSI escape sequences can be used to control color in stderr. stderrSupportsAnsiColors :: IO Bool stderrSupportsAnsiColors = do-#if defined MIN_VERSION_terminfo+#if defined(MIN_VERSION_terminfo)   queryTerminal stdError `andM` do     (termSupportsColors <$> setupTermFromEnv)       `catch` \ (_ :: SetupTermError) ->@@ -52,7 +49,7 @@     termSupportsColors :: Terminal -> Bool     termSupportsColors term = fromMaybe 0 (getCapability term termColors) > 0 -#elif defined mingw32_HOST_OS+#elif defined(mingw32_HOST_OS)   h <- Win32.getStdHandle Win32.sTD_ERROR_HANDLE          `catch` \ (_ :: IOError) ->            pure Win32.nullHANDLE@@ -61,26 +58,15 @@     else do       eMode <- try (getConsoleMode h)       case eMode of-        Left (_ :: IOError) -> queryCygwinTerminal h+        Left (_ :: IOError) -> Win32.isMinTTYHandle h+                                 -- Check if the we're in a MinTTY terminal+                                 -- (e.g., Cygwin or MSYS2)         Right mode           | modeHasVTP mode -> pure True           | otherwise       -> enableVTP h mode    where -    queryCygwinTerminal :: Win32.HANDLE -> IO Bool-    queryCygwinTerminal h = do-        fileType <- Win32.getFileType h-        if fileType /= Win32.fILE_TYPE_PIPE-          then pure False-          else do-            fn <- getFileNameByHandle h-            pure (("\\cygwin-" `isPrefixOf` fn || "\\msys-" `isPrefixOf` fn) &&-                  "-pty" `isInfixOf` fn &&-                  "-master" `isSuffixOf` fn)-      `catch` \ (_ :: IOError) ->-        pure False-     enableVTP :: Win32.HANDLE -> Win32.DWORD -> IO Bool     enableVTP h mode = do         setConsoleMode h (modeAddVTP mode)@@ -111,42 +97,6 @@  foreign import WINAPI unsafe "windows.h SetConsoleMode" c_SetConsoleMode   :: Win32.HANDLE -> Win32.DWORD -> IO Win32.BOOL--fileNameInfo :: CInt-fileNameInfo = 2--mAX_PATH :: Num a => a-mAX_PATH = 260--getFileNameByHandle :: Win32.HANDLE -> IO String-getFileNameByHandle h = do-  let sizeOfDWORD = sizeOf (undefined :: Win32.DWORD)-  let sizeOfWchar = sizeOf (undefined :: CWchar)-  -- note: implicitly assuming that DWORD has stronger alignment than wchar_t-  let bufSize = sizeOfDWORD + mAX_PATH * sizeOfWchar-  allocaBytes bufSize $ \ buf -> do-    getFileInformationByHandleEx h fileNameInfo buf (fromIntegral bufSize)-    len :: Win32.DWORD <- peek buf-    let len' = fromIntegral len `div` sizeOfWchar-    peekCWStringLen (buf `plusPtr` sizeOfDWORD, min len' mAX_PATH)--getFileInformationByHandleEx-  :: Win32.HANDLE -> CInt -> Ptr a -> Win32.DWORD -> IO ()-getFileInformationByHandleEx h cls buf bufSize = do-  lib <- Win32.getModuleHandle (Just "kernel32.dll")-  ptr <- Win32.getProcAddress lib "GetFileInformationByHandleEx"-  let c_GetFileInformationByHandleEx =-        mk_GetFileInformationByHandleEx (castPtrToFunPtr ptr)-  Win32.failIfFalse_ "getFileInformationByHandleEx"-    (c_GetFileInformationByHandleEx h cls buf bufSize)--type F_GetFileInformationByHandleEx a =-  Win32.HANDLE -> CInt -> Ptr a -> Win32.DWORD -> IO Win32.BOOL--foreign import WINAPI "dynamic"-  mk_GetFileInformationByHandleEx-  :: FunPtr (F_GetFileInformationByHandleEx a)-  -> F_GetFileInformationByHandleEx a  #else    pure False
main/TidyPgm.hs view
@@ -4,7 +4,7 @@ \section{Tidying up Core} -} -{-# LANGUAGE CPP, ViewPatterns #-}+{-# LANGUAGE CPP, DeriveFunctor, ViewPatterns #-}  module TidyPgm (        mkBootModDetailsTc, tidyProgram@@ -63,7 +63,7 @@  import Control.Monad import Data.Function-import Data.List        ( sortBy )+import Data.List        ( sortBy, mapAccumL ) import Data.IORef       ( atomicModifyIORef' )  {-@@ -145,7 +145,7 @@                 }   = -- This timing isn't terribly useful since the result isn't forced, but     -- the message is useful to locating oneself in the compilation process.-    Err.withTiming (pure dflags)+    Err.withTiming dflags                    (text "CoreTidy"<+>brackets (ppr this_mod))                    (const ()) $     return (ModDetails { md_types         = type_env'@@ -247,8 +247,8 @@ Note [Choosing external Ids] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See also the section "Interface stability" in the-RecompilationAvoidance commentary:-  http://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance+recompilation-avoidance commentary:+  https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance  First we figure out which Ids are "external" Ids.  An "external" Id is one that is visible from outside the compilation@@ -341,7 +341,7 @@                               , mg_modBreaks = modBreaks                               }) -  = Err.withTiming (pure dflags)+  = Err.withTiming dflags                    (text "CoreTidy"<+>brackets (ppr mod))                    (const ()) $     do  { let { omit_prags = gopt Opt_OmitInterfacePragmas dflags@@ -466,7 +466,7 @@ Note [Don't attempt to trim data types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For some time GHC tried to avoid exporting the data constructors-of a data type if it wasn't strictly necessary to do so; see Trac #835.+of a data type if it wasn't strictly necessary to do so; see #835. But "strictly necessary" accumulated a longer and longer list of exceptions, and finally I gave up the battle: @@ -481,7 +481,7 @@     there are a lot of exceptions, notably when Template Haskell is     involved or, more recently, DataKinds. -    However Trac #7445 shows that even without TemplateHaskell, using+    However #7445 shows that even without TemplateHaskell, using     the Data class and invoking Language.Haskell.TH.Quote.dataToExpQ     is enough to require us to expose the data constructors. @@ -508,7 +508,7 @@ This generates bad code unless it's first simplified a bit.  That is why CoreUnfold.mkImplicitUnfolding uses simpleOptExpr to do a bit of optimisation first.  (Only matters when the selector is used curried;-eg map x ys.)  See Trac #2070.+eg map x ys.)  See #2070.  [Oct 09: in fact, record selectors are no longer implicit Ids at all, because we really do want to optimise them properly. They are treated@@ -521,7 +521,7 @@ simplifier and other core-to-core passes mess with IdInfo all the time.  The straw that broke the camels back was when a class selector got the wrong arity -- ie the simplifier gave it arity 2, whereas-importing modules were expecting it to have arity 1 (Trac #2844).+importing modules were expecting it to have arity 1 (#2844). It's much safer just to inject them right at the end, after tidying.  Oh: two other reasons for injecting them late:@@ -550,7 +550,9 @@     cls_binds = maybe [] getClassImplicitBinds (tyConClass_maybe tc)  getTyConImplicitBinds :: TyCon -> [CoreBind]-getTyConImplicitBinds tc = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc))+getTyConImplicitBinds tc+  | isNewTyCon tc = []  -- See Note [Compulsory newtype unfolding] in MkId+  | otherwise     = map get_defn (mapMaybe dataConWrapId_maybe (tyConDataCons tc))  getClassImplicitBinds :: Class -> [CoreBind] getClassImplicitBinds cls@@ -735,9 +737,7 @@                               -- we don't want to record these as free vars       -> (VarSet, [Var])      -- Input State: (set, list) of free vars so far       -> ((VarSet,[Var]),a))  -- Output state--instance Functor DFFV where-    fmap = liftM+    deriving (Functor)  instance Applicative DFFV where     pure a = DFFV $ \_ st -> (st, a)@@ -1089,12 +1089,7 @@      init_env = (init_occ_env, emptyVarEnv) -    tidy _           env []     = (env, [])-    tidy cvt_literal env (b:bs)-        = let (env1, b')  = tidyTopBind dflags this_mod cvt_literal unfold_env-                                        env b-              (env2, bs') = tidy cvt_literal env1 bs-          in  (env2, b':bs')+    tidy cvt_literal = mapAccumL (tidyTopBind dflags this_mod cvt_literal unfold_env)  ------------------------ tidyTopBind  :: DynFlags@@ -1236,7 +1231,7 @@     --     marked NOINLINE or something like that     -- This is important: if you expose the worker for a loop-breaker     -- then you can make the simplifier go into an infinite loop, because-    -- in effect the unfolding is exposed.  See Trac #1709+    -- in effect the unfolding is exposed.  See #1709     --     -- You might think that if show_unfold is False, then the thing should     -- not be w/w'd in the first place.  But a legitimate reason is this:@@ -1397,7 +1392,7 @@ -O.  But that is not always possible: see the old Note [When we can't trim types] below for exceptions. -Then (Trac #7445) I realised that the TH problem arises for any data type+Then (#7445) I realised that the TH problem arises for any data type that we have deriving( Data ), because we can invoke    Language.Haskell.TH.Quote.dataToExpQ to get a TH Exp representation of a value built from that data type.@@ -1422,7 +1417,7 @@  But there are some times we can't do that, indicated by the 'no_trim_types' flag. -First, Template Haskell.  Consider (Trac #2386) this+First, Template Haskell.  Consider (#2386) this         module M(T, makeOne) where           data T = Yay String           makeOne = [| Yay "Yep" |]@@ -1431,7 +1426,7 @@ so it'd better be there.  Hence, brutally but simply, we switch off type constructor trimming if TH is enabled in this module. -Second, data kinds.  Consider (Trac #5912)+Second, data kinds.  Consider (#5912)      {-# LANGUAGE DataKinds #-}      module M() where      data UnaryTypeC a = UnaryDataC a
+ main/ToolSettings.hs view
@@ -0,0 +1,64 @@+module ToolSettings+  ( ToolSettings (..)+  ) where++import GhcPrelude++import CliOption+import Fingerprint++-- | Settings for other executables GHC calls.+--+-- Probably should futher split down by phase, or split between+-- platform-specific and platform-agnostic.+data ToolSettings = ToolSettings+  { toolSettings_ldSupportsCompactUnwind :: Bool+  , toolSettings_ldSupportsBuildId       :: Bool+  , toolSettings_ldSupportsFilelist      :: Bool+  , toolSettings_ldIsGnuLd               :: Bool+  , toolSettings_ccSupportsNoPie         :: Bool++  -- commands for particular phases+  , toolSettings_pgm_L       :: String+  , toolSettings_pgm_P       :: (String, [Option])+  , toolSettings_pgm_F       :: String+  , toolSettings_pgm_c       :: String+  , toolSettings_pgm_a       :: (String, [Option])+  , toolSettings_pgm_l       :: (String, [Option])+  , toolSettings_pgm_dll     :: (String, [Option])+  , toolSettings_pgm_T       :: String+  , toolSettings_pgm_windres :: String+  , toolSettings_pgm_libtool :: String+  , toolSettings_pgm_ar      :: String+  , toolSettings_pgm_ranlib  :: String+  , -- | LLVM: opt llvm optimiser+    toolSettings_pgm_lo      :: (String, [Option])+  , -- | LLVM: llc static compiler+    toolSettings_pgm_lc      :: (String, [Option])+  , -- | LLVM: c compiler+    toolSettings_pgm_lcc     :: (String, [Option])+  , toolSettings_pgm_i       :: String++  -- options for particular phases+  , toolSettings_opt_L             :: [String]+  , toolSettings_opt_P             :: [String]+  , -- | cached Fingerprint of sOpt_P+    -- See Note [Repeated -optP hashing]+    toolSettings_opt_P_fingerprint :: Fingerprint+  , toolSettings_opt_F             :: [String]+  , toolSettings_opt_c             :: [String]+  , toolSettings_opt_cxx           :: [String]+  , toolSettings_opt_a             :: [String]+  , toolSettings_opt_l             :: [String]+  , toolSettings_opt_windres       :: [String]+  , -- | LLVM: llvm optimiser+    toolSettings_opt_lo            :: [String]+  , -- | LLVM: llc static compiler+    toolSettings_opt_lc            :: [String]+  , -- | LLVM: c compiler+    toolSettings_opt_lcc           :: [String]+  , -- | iserv options+    toolSettings_opt_i             :: [String]++  , toolSettings_extraGccViaCFlags :: [String]+  }
nativeGen/AsmCodeGen.hs view
@@ -6,7 +6,8 @@ -- -- ----------------------------------------------------------------------------- -{-# LANGUAGE BangPatterns, CPP, GADTs, ScopedTypeVariables, PatternSynonyms #-}+{-# LANGUAGE BangPatterns, CPP, GADTs, ScopedTypeVariables, PatternSynonyms,+    DeriveFunctor #-}  #if !defined(GHC_LOADED_INTO_GHCI) {-# LANGUAGE UnboxedTuples #-}@@ -26,9 +27,7 @@                   ) where  #include "HsVersions.h"-#include "nativeGen/NCG.h" - import GhcPrelude  import qualified X86.CodeGen@@ -59,7 +58,7 @@  import AsmUtils import TargetReg-import Platform+import GHC.Platform import BlockLayout import Config import Instruction@@ -71,7 +70,7 @@ import Debug  import BlockId-import CgUtils          ( fixStgRegisters )+import GHC.StgToCmm.CgUtils ( fixStgRegisters ) import Cmm import CmmUtils import Hoopl.Collections@@ -156,19 +155,20 @@ -}  ---------------------nativeCodeGen :: DynFlags -> Module -> ModLocation -> Handle -> UniqSupply-              -> Stream IO RawCmmGroup ()-              -> IO UniqSupply+nativeCodeGen :: forall a . DynFlags -> Module -> ModLocation -> Handle -> UniqSupply+              -> Stream IO RawCmmGroup a+              -> IO a nativeCodeGen dflags this_mod modLoc h us cmms  = let platform = targetPlatform dflags        nCG' :: ( Outputable statics, Outputable instr                , Outputable jumpDest, Instruction instr)-            => NcgImpl statics instr jumpDest -> IO UniqSupply+            => NcgImpl statics instr jumpDest -> IO a        nCG' ncgImpl = nativeCodeGen' dflags this_mod modLoc ncgImpl h us cmms    in case platformArch platform of       ArchX86       -> nCG' (x86NcgImpl    dflags)       ArchX86_64    -> nCG' (x86_64NcgImpl dflags)       ArchPPC       -> nCG' (ppcNcgImpl    dflags)+      ArchS390X     -> panic "nativeCodeGen: No NCG for S390X"       ArchSPARC     -> nCG' (sparcNcgImpl  dflags)       ArchSPARC64   -> panic "nativeCodeGen: No NCG for SPARC64"       ArchARM {}    -> panic "nativeCodeGen: No NCG for ARM"@@ -183,7 +183,7 @@ x86NcgImpl :: DynFlags -> NcgImpl (Alignment, CmmStatics)                                   X86.Instr.Instr X86.Instr.JumpDest x86NcgImpl dflags- = (x86_64NcgImpl dflags) { ncg_x86fp_kludge = map x86fp_kludge }+ = (x86_64NcgImpl dflags)  x86_64NcgImpl :: DynFlags -> NcgImpl (Alignment, CmmStatics)                                   X86.Instr.Instr X86.Instr.JumpDest@@ -198,7 +198,6 @@        ,pprNatCmmDecl             = X86.Ppr.pprNatCmmDecl        ,maxSpillSlots             = X86.Instr.maxSpillSlots dflags        ,allocatableRegs           = X86.Regs.allocatableRegs platform-       ,ncg_x86fp_kludge          = id        ,ncgAllocMoreStack         = X86.Instr.allocMoreStack platform        ,ncgExpandTop              = id        ,ncgMakeFarBranches        = const id@@ -219,7 +218,6 @@        ,pprNatCmmDecl             = PPC.Ppr.pprNatCmmDecl        ,maxSpillSlots             = PPC.Instr.maxSpillSlots dflags        ,allocatableRegs           = PPC.Regs.allocatableRegs platform-       ,ncg_x86fp_kludge          = id        ,ncgAllocMoreStack         = PPC.Instr.allocMoreStack platform        ,ncgExpandTop              = id        ,ncgMakeFarBranches        = PPC.Instr.makeFarBranches@@ -240,7 +238,6 @@        ,pprNatCmmDecl             = SPARC.Ppr.pprNatCmmDecl        ,maxSpillSlots             = SPARC.Instr.maxSpillSlots dflags        ,allocatableRegs           = SPARC.Regs.allocatableRegs-       ,ncg_x86fp_kludge          = id        ,ncgAllocMoreStack         = noAllocMoreStack        ,ncgExpandTop              = map SPARC.CodeGen.Expand.expandTop        ,ncgMakeFarBranches        = const id@@ -316,8 +313,8 @@                -> NcgImpl statics instr jumpDest                -> Handle                -> UniqSupply-               -> Stream IO RawCmmGroup ()-               -> IO UniqSupply+               -> Stream IO RawCmmGroup a+               -> IO a nativeCodeGen' dflags this_mod modLoc ncgImpl h us cmms  = do         -- BufHandle is a performance hack.  We could hide it inside@@ -325,9 +322,10 @@         -- printDocs here (in order to do codegen in constant space).         bufh <- newBufHandle h         let ngs0 = NGS [] [] [] [] [] [] emptyUFM mapEmpty-        (ngs, us') <- cmmNativeGenStream dflags this_mod modLoc ncgImpl bufh us+        (ngs, us', a) <- cmmNativeGenStream dflags this_mod modLoc ncgImpl bufh us                                          cmms ngs0-        finishNativeGen dflags modLoc bufh us' ngs+        _ <- finishNativeGen dflags modLoc bufh us' ngs+        return a  finishNativeGen :: Instruction instr                 => DynFlags@@ -337,9 +335,9 @@                 -> NativeGenAcc statics instr                 -> IO UniqSupply finishNativeGen dflags modLoc bufh@(BufHandle _ _ h) us ngs- = do+ = withTimingSilent dflags (text "NCG") (`seq` ()) $ do         -- Write debug data and finish-        let emitDw = debugLevel dflags > 0 && not (gopt Opt_SplitObjs dflags)+        let emitDw = debugLevel dflags > 0         us' <- if not emitDw then return us else do           (dwarf, us') <- dwarfGen dflags modLoc us (ngs_debug ngs)           emitNativeCode dflags bufh dwarf@@ -348,7 +346,7 @@          -- dump global NCG stats for graph coloring allocator         let stats = concat (ngs_colorStats ngs)-        when (not (null stats)) $ do+        unless (null stats) $ do            -- build the global register conflict graph           let graphGlobal@@ -371,7 +369,7 @@          -- dump global NCG stats for linear allocator         let linearStats = concat (ngs_linearStats ngs)-        when (not (null linearStats)) $+        unless (null linearStats) $           dump_stats (Linear.pprStats (concat (ngs_natives ngs)) linearStats)          -- write out the imports@@ -388,62 +386,52 @@               -> NcgImpl statics instr jumpDest               -> BufHandle               -> UniqSupply-              -> Stream IO RawCmmGroup ()+              -> Stream IO RawCmmGroup a               -> NativeGenAcc statics instr-              -> IO (NativeGenAcc statics instr, UniqSupply)+              -> IO (NativeGenAcc statics instr, UniqSupply, a)  cmmNativeGenStream dflags this_mod modLoc ncgImpl h us cmm_stream ngs  = do r <- Stream.runStream cmm_stream       case r of-        Left () ->+        Left a ->           return (ngs { ngs_imports = reverse $ ngs_imports ngs                       , ngs_natives = reverse $ ngs_natives ngs                       , ngs_colorStats = reverse $ ngs_colorStats ngs                       , ngs_linearStats = reverse $ ngs_linearStats ngs                       },-                  us)+                  us,+                  a)         Right (cmms, cmm_stream') -> do--          -- Generate debug information-          let debugFlag = debugLevel dflags > 0-              !ndbgs | debugFlag = cmmDebugGen modLoc cmms-                     | otherwise = []-              dbgMap = debugToMap ndbgs+          (us', ngs'') <-+            withTimingSilent+                dflags+                ncglabel (\(a, b) -> a `seq` b `seq` ()) $ do+              -- Generate debug information+              let debugFlag = debugLevel dflags > 0+                  !ndbgs | debugFlag = cmmDebugGen modLoc cmms+                         | otherwise = []+                  dbgMap = debugToMap ndbgs -          -- Insert split marker, generate native code-          let splitObjs = gopt Opt_SplitObjs dflags-              split_marker = CmmProc mapEmpty mkSplitMarkerLabel [] $-                             ofBlockList (panic "split_marker_entry") []-              cmms' | splitObjs  = split_marker : cmms-                    | otherwise  = cmms-          (ngs',us') <- cmmNativeGens dflags this_mod modLoc ncgImpl h-                                             dbgMap us cmms' ngs 0+              -- Generate native code+              (ngs',us') <- cmmNativeGens dflags this_mod modLoc ncgImpl h+                                               dbgMap us cmms ngs 0 -          -- Link native code information into debug blocks-          -- See Note [What is this unwinding business?] in Debug.-          let !ldbgs = cmmDebugLink (ngs_labels ngs') (ngs_unwinds ngs') ndbgs-          dumpIfSet_dyn dflags Opt_D_dump_debug "Debug Infos"-            (vcat $ map ppr ldbgs)+              -- Link native code information into debug blocks+              -- See Note [What is this unwinding business?] in Debug.+              let !ldbgs = cmmDebugLink (ngs_labels ngs') (ngs_unwinds ngs') ndbgs+              unless (null ldbgs) $+                dumpIfSet_dyn dflags Opt_D_dump_debug "Debug Infos"+                  (vcat $ map ppr ldbgs) -          -- Emit & clear DWARF information when generating split-          -- object files, as we need it to land in the same object file-          -- When using split sections, note that we do not split the debug-          -- info but emit all the info at once in finishNativeGen.-          (ngs'', us'') <--            if debugFlag && splitObjs-            then do (dwarf, us'') <- dwarfGen dflags modLoc us ldbgs-                    emitNativeCode dflags h dwarf-                    return (ngs' { ngs_debug = []-                                 , ngs_dwarfFiles = emptyUFM-                                 , ngs_labels = [] },-                            us'')-            else return (ngs' { ngs_debug  = ngs_debug ngs' ++ ldbgs-                              , ngs_labels = [] },-                         us')+              -- Accumulate debug information for emission in finishNativeGen.+              let ngs'' = ngs' { ngs_debug = ngs_debug ngs' ++ ldbgs, ngs_labels = [] }+              return (us', ngs'') -          cmmNativeGenStream dflags this_mod modLoc ncgImpl h us''+          cmmNativeGenStream dflags this_mod modLoc ncgImpl h us'               cmm_stream' ngs'' +    where ncglabel = text "NCG"+ -- | Do native code generation on all these cmms. -- cmmNativeGens :: forall statics instr jumpDest.@@ -483,14 +471,14 @@                          nonDetEltsUFM $ fileIds' `minusUFM` fileIds             -- See Note [Unique Determinism and code generation]             pprDecl (f,n) = text "\t.file " <> ppr n <+>-                            doubleQuotes (ftext f)+                            pprFilePathString (unpackFS f)          emitNativeCode dflags h $ vcat $           map pprDecl newFileIds ++           map (pprNatCmmDecl ncgImpl) native          -- force evaluation all this stuff to avoid space leaks-        {-# SCC "seqString" #-} evaluate $ seqString (showSDoc dflags $ vcat $ map ppr imports)+        {-# SCC "seqString" #-} evaluate $ seqList (showSDoc dflags $ vcat $ map ppr imports) ()          let !labels' = if debugLevel dflags > 0                        then cmmDebugLabels isMetaInstr native else []@@ -508,10 +496,7 @@                       }         go us' cmms ngs' (count + 1) -    seqString []            = ()-    seqString (x:xs)        = x `seq` seqString xs - emitNativeCode :: DynFlags -> BufHandle -> SDoc -> IO () emitNativeCode dflags h sdoc = do @@ -578,7 +563,6 @@                                         (cmmTopCodeGen ncgImpl)                                         fileIds dbgMap opt_cmm cmmCfg -         dumpIfSet_dyn dflags                 Opt_D_dump_asm_native "Native code"                 (vcat $ map (pprNatCmmDecl ncgImpl) native)@@ -594,9 +578,7 @@         let (withLiveness, usLive) =                 {-# SCC "regLiveness" #-}                 initUs usGen-                        $ mapM (regLiveness platform)-                        -- TODO: Only use CFG for x86-                        $ map (natCmmTopToLive livenessCfg) native+                        $ mapM (cmmTopLiveness livenessCfg platform) native          dumpIfSet_dyn dflags                 Opt_D_dump_asm_liveness "Liveness annotations added"@@ -700,29 +682,20 @@             cfgRegAllocUpdates = (concatMap Linear.ra_fixupList raStats)          let cfgWithFixupBlks =-                pure addNodesBetween <*> livenessCfg <*> pure cfgRegAllocUpdates+                (\cfg -> addNodesBetween cfg cfgRegAllocUpdates) <$> livenessCfg          -- Insert stack update blocks-        let postRegCFG :: Maybe CFG-            postRegCFG =-                pure (foldl' (\m (from,to) -> addImmediateSuccessor from to m )) <*>-                        cfgWithFixupBlks <*> pure stack_updt_blks--        ---- x86fp_kludge.  This pass inserts ffree instructions to clear-        ---- the FPU stack on x86.  The x86 ABI requires that the FPU stack-        ---- is clear, and library functions can return odd results if it-        ---- isn't.-        -----        ---- NB. must happen before shortcutBranches, because that-        ---- generates JXX_GBLs which we can't fix up in x86fp_kludge.-        let kludged = {-# SCC "x86fp_kludge" #-} ncg_x86fp_kludge ncgImpl alloced+        let postRegCFG =+                pure (foldl' (\m (from,to) -> addImmediateSuccessor from to m ))+                     <*> cfgWithFixupBlks+                     <*> pure stack_updt_blks          ---- generate jump tables         let tabled      =                 {-# SCC "generateJumpTables" #-}-                generateJumpTables ncgImpl kludged+                generateJumpTables ncgImpl alloced -        dumpIfSet_dyn dflags+        when (not $ null nativeCfgWeights) $ dumpIfSet_dyn dflags                 Opt_D_dump_cfg_weights "CFG Update information"                 ( text "stack:" <+> ppr stack_updt_blks $$                   text "linearAlloc:" <+> ppr cfgRegAllocUpdates )@@ -732,8 +705,9 @@                 {-# SCC "shortcutBranches" #-}                 shortcutBranches dflags ncgImpl tabled postRegCFG -        let optimizedCFG =-                optimizeCFG (cfgWeightInfo dflags) cmm <$> postShortCFG+        let optimizedCFG :: Maybe CFG+            optimizedCFG =+                optimizeCFG (cfgWeightInfo dflags) cmm <$!> postShortCFG          maybeDumpCfg dflags optimizedCFG "CFG Weights - Final" proc_name @@ -745,8 +719,9 @@                 (gopt Opt_DoAsmLinting dflags || debugIsOn )) $ do                 let blocks = concatMap getBlks shorted                 let labels = setFromList $ fmap blockId blocks :: LabelSet-                return $! seq (pure sanityCheckCfg <*> optimizedCFG <*> pure labels <*>-                                        pure (text "cfg not in lockstep")) ()+                let cfg = fromJust optimizedCFG+                return $! seq (sanityCheckCfg cfg labels $+                                text "cfg not in lockstep") ()          ---- sequence blocks         let sequenced :: [NatCmmDecl statics instr]@@ -765,7 +740,7 @@               where                 invertConds :: LabelMap CmmStatics -> [NatBasicBlock instr]                             -> [NatBasicBlock instr]-                invertConds = (invertCondBranches ncgImpl) optimizedCFG+                invertConds = invertCondBranches ncgImpl optimizedCFG                 invert top@CmmData {} = top                 invert (CmmProc info lbl live (ListGraph blocks)) =                     CmmProc info lbl live (ListGraph $ invertConds info blocks)@@ -824,12 +799,6 @@         getBlockIds (CmmProc _ _ _ (ListGraph blocks)) =                 setFromList $ map blockId blocks --x86fp_kludge :: NatCmmDecl (Alignment, CmmStatics) X86.Instr.Instr -> NatCmmDecl (Alignment, CmmStatics) X86.Instr.Instr-x86fp_kludge top@(CmmData _ _) = top-x86fp_kludge (CmmProc info lbl live (ListGraph code)) =-        CmmProc info lbl live (ListGraph $ X86.Instr.i386_insert_ffrees code)- -- | Compute unwinding tables for the blocks of a procedure computeUnwinding :: Instruction instr                  => DynFlags -> NcgImpl statics instr jumpDest@@ -907,7 +876,7 @@                 | otherwise                 = Outputable.empty -        doPpr lbl = (lbl, renderWithStyle dflags (pprCLabel platform lbl) astyle)+        doPpr lbl = (lbl, renderWithStyle dflags (pprCLabel dflags lbl) astyle)         astyle = mkCodeStyle AsmStyle  -- -----------------------------------------------------------------------------@@ -1089,13 +1058,11 @@ {-# COMPLETE OptMResult #-} #else -data OptMResult a = OptMResult !a ![CLabel]+data OptMResult a = OptMResult !a ![CLabel] deriving (Functor) #endif  newtype CmmOptM a = CmmOptM (DynFlags -> Module -> [CLabel] -> OptMResult a)--instance Functor CmmOptM where-    fmap = liftM+    deriving (Functor)  instance Applicative CmmOptM where     pure x = CmmOptM $ \_ _ imports -> OptMResult x imports
nativeGen/BlockLayout.hs view
@@ -2,10 +2,12 @@ -- Copyright (c) 2018 Andreas Klebinger -- -{-# LANGUAGE TypeFamilies, ScopedTypeVariables, CPP #-}--{-# OPTIONS_GHC -fprof-auto #-}---{-# OPTIONS_GHC -ddump-simpl -ddump-to-file -ddump-cmm #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE FlexibleContexts #-}  module BlockLayout     ( sequenceTop )@@ -22,7 +24,6 @@ import Cmm import Hoopl.Collections import Hoopl.Label-import Hoopl.Block  import DynFlags (gopt, GeneralFlag(..), DynFlags, backendMaintainsCfg) import UniqFM@@ -37,23 +38,40 @@ --import Debug --import Debug.Trace import ListSetOps (removeDups)-import PprCmm ()  import OrdList import Data.List import Data.Foldable (toList)-import Hoopl.Graph  import qualified Data.Set as Set-import Control.Applicative+import Data.STRef+import Control.Monad.ST.Strict+import Control.Monad (foldM)  {-+  Note [CFG based code layout]+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~++  The major steps in placing blocks are as follow:+  * Compute a CFG based on the Cmm AST, see getCfgProc.+    This CFG will have edge weights representing a guess+    on how important they are.+  * After we convert Cmm to Asm we run `optimizeCFG` which+    adds a few more "educated guesses" to the equation.+  * Then we run loop analysis on the CFG (`loopInfo`) which tells us+    about loop headers, loop nesting levels and the sort.+  * Based on the CFG and loop information refine the edge weights+    in the CFG and normalize them relative to the most often visited+    node. (See `mkGlobalWeights`)+  * Feed this CFG into the block layout code (`sequenceTop`) in this+    module. Which will then produce a code layout based on the input weights.+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ~~~ Note [Chain based CFG serialization]   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    For additional information also look at-  https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/CodeLayout+  https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/code-layout    We have a CFG with edge weights based on which we try to place blocks next to   each other.@@ -62,8 +80,8 @@   but also how much a block would benefit from being placed sequentially after   it's predecessor.   For example blocks which are preceeded by an info table are more likely to end-  up in a different cache line than their predecessor. So there is less benefit-  in placing them sequentially.+  up in a different cache line than their predecessor and we can't eliminate the jump+  so there is less benefit to placing them sequentially.    For example consider this example: @@ -83,56 +101,83 @@   Eg for our example we might end up with two chains like:   [A->B->C->X],[D]. Blocks inside chains will always be placed sequentially.   However there is no particular order in which chains are placed since-  (hopefully) the blocks for which sequentially is important have already+  (hopefully) the blocks for which sequentiality is important have already   been placed in the same chain.    ------------------------------------------------------------------------------      First try to create a lists of good chains.+     1) First try to create a list of good chains.   ----------------------------------------------------------------------------- -  We do so by taking a block not yet placed in a chain and-  looking at these cases:+  Good chains are these which allow us to eliminate jump instructions.+  Which further eliminate often executed jumps first. -  *)  Check if the best predecessor of the block is at the end of a chain.-      If so add the current block to the end of that chain.+  We do so by: -      Eg if we look at block C and already have the chain (A -> B)-      then we extend the chain to (A -> B -> C).+  *)  Ignore edges which represent instructions which can not be replaced+      by fall through control flow. Primarily calls and edges to blocks which+      are prefixed by a info table we have to jump across. -      Combined with the fact that we process blocks in reverse post order-      this means loop bodies and trivially sequential control flow already-      ends up as a single chain.+  *)  Then process remaining edges in order of frequency taken and: -  *)  Otherwise we create a singleton chain from the block we are looking at.-      Eg if we have from the example above already constructed (A->B)-      and look at D we create the chain (D) resulting in the chains [A->B, D]+    +)  If source and target have not been placed build a new chain from them. +    +)  If source and target have been placed, and are ends of differing chains+        try to merge the two chains.++    +)  If one side of the edge is a end/front of a chain, add the other block of+        to edge to the same chain++        Eg if we look at edge (B -> C) and already have the chain (A -> B)+        then we extend the chain to (A -> B -> C).++    +)  If the edge was used to modify or build a new chain remove the edge from+        our working list.++  *) If there any blocks not being placed into a chain after these steps we place+     them into a chain consisting of only this block.++  Ranking edges by their taken frequency, if+  two edges compete for fall through on the same target block, the one taken+  more often will automatically win out. Resulting in fewer instructions being+  executed.++  Creating singleton chains is required for situations where we have code of the+  form:++    A: goto B:+    <infoTable>+    B: goto C:+    <infoTable>+    C: ...++  As the code in block B is only connected to the rest of the program via edges+  which will be ignored in this step we make sure that B still ends up in a chain+  this way.+   ------------------------------------------------------------------------------      We then try to fuse chains.+     2) We also try to fuse chains.   ----------------------------------------------------------------------------- -  There are edge cases which result in two chains being created which trivially-  represent linear control flow. For example we might have the chains-  [(A-B-C),(D-E)] with an cfg triangle:+  As a result from the above step we still end up with multiple chains which+  represent sequential control flow chunks. But they are not yet suitable for+  code layout as we need to place *all* blocks into a single sequence. -      A----->C->D->E-       \->B-/+  In this step we combine chains result from the above step via these steps: -  We also get three independent chains if two branches end with a jump-  to a common successor.+  *)  Look at the ranked list of *all* edges, including calls/jumps across info tables+      and the like. -  We take care of these cases by fusing chains which are connected by an-  edge.+  *)  Look at each edge and -  We do so by looking at the list of edges sorted by weight.-  Given the edge (C -> D) we try to find two chains such that:-      * C is at the end of chain one.-      * D is in front of chain two.-      * If two such chains exist we fuse them.-  We then remove the edge and repeat the process for the rest of the edges.+    +) Given an edge (A -> B) try to find two chains for which+      * Block A is at the end of one chain+      * Block B is at the front of the other chain.+    +) If we find such a chain we "fuse" them into a single chain, remove the+       edge from working set and continue.+    +) If we can't find such chains we skip the edge and continue.    ------------------------------------------------------------------------------      Place indirect successors (neighbours) after each other+     3) Place indirect successors (neighbours) after each other   -----------------------------------------------------------------------------    We might have chains [A,B,C,X],[E] in a CFG of the sort:@@ -143,15 +188,11 @@   While E does not follow X it's still beneficial to place them near each other.   This can be advantageous if eg C,X,E will end up in the same cache line. -  TODO: If we remove edges as we use them (eg if we build up A->B remove A->B-        from the list) we could save some more work in later phases.--   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ~~~ Note [Triangle Control Flow]   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -  Checking if an argument is already evaluating leads to a somewhat+  Checking if an argument is already evaluated leads to a somewhat   special case  which looks like this:      A:@@ -206,53 +247,39 @@ neighbourOverlapp :: Int neighbourOverlapp = 2 --- | Only edges heavier than this are considered---   for fusing two chains into a single chain.-fuseEdgeThreshold :: EdgeWeight-fuseEdgeThreshold = 0-+-- | Maps blocks near the end of a chain to it's chain AND+-- the other blocks near the end.+-- [A,B,C,D,E] Gives entries like (B -> ([A,B], [A,B,C,D,E]))+-- where [A,B] are blocks in the end region of a chain.+-- This is cheaper then recomputing the ends multiple times.+type FrontierMap = LabelMap ([BlockId],BlockChain)  -- | A non empty ordered sequence of basic blocks. --   It is suitable for serialization in this order.-data BlockChain-    = BlockChain-    { chainMembers :: !LabelSet-    , chainBlocks :: !BlockSequence-    }--instance Eq (BlockChain) where-    (BlockChain s1 _) == (BlockChain s2 _)-        = s1 == s2--instance Outputable (BlockChain) where-    ppr (BlockChain _ blks) =-        parens (text "Chain:" <+> ppr (seqToList $ blks) )+--+--   We use OrdList instead of [] to allow fast append on both sides+--   when combining chains.+newtype BlockChain+    = BlockChain { chainBlocks :: (OrdList BlockId) } -data WeightedEdge = WeightedEdge !BlockId !BlockId EdgeWeight deriving (Eq)+-- All chains are constructed the same way so comparison+-- including structure is faster.+instance Eq BlockChain where+    BlockChain b1 == BlockChain b2 = strictlyEqOL b1 b2  -- Useful for things like sets and debugging purposes, sorts by blocks -- in the chain. instance Ord (BlockChain) where-   (BlockChain lbls1 _) `compare` (BlockChain lbls2 _)-       = lbls1 `compare` lbls2---- | Non deterministic! (Uniques) Sorts edges by weight and nodes.-instance Ord WeightedEdge where-  compare (WeightedEdge from1 to1 weight1)-          (WeightedEdge from2 to2 weight2)-    | weight1 < weight2 || weight1 == weight2 && from1 < from2 ||-      weight1 == weight2 && from1 == from2 && to1 < to2-    = LT-    | from1 == from2 && to1 == to2 && weight1 == weight2-    = EQ-    | otherwise-    = GT+   (BlockChain lbls1) `compare` (BlockChain lbls2)+       = ASSERT(toList lbls1 /= toList lbls2 || lbls1 `strictlyEqOL` lbls2)+         strictlyOrdOL lbls1 lbls2 -instance Outputable WeightedEdge where-    ppr (WeightedEdge from to info) =-        ppr from <> text "->" <> ppr to <> brackets (ppr info)+instance Outputable (BlockChain) where+    ppr (BlockChain blks) =+        parens (text "Chain:" <+> ppr (fromOL $ blks) ) -type WeightedEdgeList = [WeightedEdge]+chainFoldl :: (b -> BlockId -> b) -> b -> BlockChain -> b+chainFoldl f z (BlockChain blocks) = foldl' f z blocks  noDups :: [BlockChain] -> Bool noDups chains =@@ -262,102 +289,60 @@         else pprTrace "Duplicates:" (ppr (map toList dups) $$ text "chains" <+> ppr chains ) False  inFront :: BlockId -> BlockChain -> Bool-inFront bid (BlockChain _ seq)-  = seqFront seq == bid--chainMember :: BlockId -> BlockChain -> Bool-chainMember bid chain-  = setMember bid . chainMembers $ chain+inFront bid (BlockChain seq)+  = headOL seq == bid  chainSingleton :: BlockId -> BlockChain chainSingleton lbl-    = BlockChain (setSingleton lbl) (Singleton lbl)+    = BlockChain (unitOL lbl) +chainFromList :: [BlockId] -> BlockChain+chainFromList = BlockChain . toOL+ chainSnoc :: BlockChain -> BlockId -> BlockChain-chainSnoc (BlockChain lbls blks) lbl-  = BlockChain (setInsert lbl lbls) (seqSnoc blks lbl)+chainSnoc (BlockChain blks) lbl+  = BlockChain (blks `snocOL` lbl) +chainCons :: BlockId -> BlockChain -> BlockChain+chainCons lbl (BlockChain blks)+  = BlockChain (lbl `consOL` blks)+ chainConcat :: BlockChain -> BlockChain -> BlockChain-chainConcat (BlockChain lbls1 blks1) (BlockChain lbls2 blks2)-  = BlockChain (setUnion lbls1 lbls2) (blks1 `seqConcat` blks2)+chainConcat (BlockChain blks1) (BlockChain blks2)+  = BlockChain (blks1 `appOL` blks2)  chainToBlocks :: BlockChain -> [BlockId]-chainToBlocks (BlockChain _ blks) = seqToList blks+chainToBlocks (BlockChain blks) = fromOL blks  -- | Given the Chain A -> B -> C -> D and we break at C --   we get the two Chains (A -> B, C -> D) as result. breakChainAt :: BlockId -> BlockChain              -> (BlockChain,BlockChain)-breakChainAt bid (BlockChain lbls blks)-    | not (setMember bid lbls)+breakChainAt bid (BlockChain blks)+    | not (bid == head rblks)     = panic "Block not in chain"     | otherwise-    = let (lblks, rblks) = break (\lbl -> lbl == bid)-                                 (seqToList blks)-          --TODO: Remove old-          --lblSet :: [GenBasicBlock i] -> BlockChain-          --lblSet blks =-          --  setFromList-                --(map (\(BasicBlock lbl _) -> lbl) $ toList blks)-      in-      (BlockChain (setFromList lblks) (seqFromBids lblks),-       BlockChain (setFromList rblks) (seqFromBids rblks))+    = (BlockChain (toOL lblks),+       BlockChain (toOL rblks))+  where+    (lblks, rblks) = break (\lbl -> lbl == bid) (fromOL blks)  takeR :: Int -> BlockChain -> [BlockId]-takeR n (BlockChain _ blks) =-    take n . seqToRList $ blks-+takeR n (BlockChain blks) =+    take n . fromOLReverse $ blks  takeL :: Int -> BlockChain -> [BlockId]-takeL n (BlockChain _ blks) = --error "TODO: takeLn"-    take n . seqToList $ blks---- | For a given list of chains try to fuse chains with strong---   edges between them into a single chain.---   Returns the list of fused chains together with a set of---   used edges. The set of edges is indirectly encoded in the---   chains so doesn't need to be considered for later passes.-fuseChains :: WeightedEdgeList -> LabelMap BlockChain-           -> (LabelMap BlockChain, Set.Set WeightedEdge)-fuseChains weights chains-    = let fronts = mapFromList $-                    map (\chain -> (head $ takeL 1 chain,chain)) $-                    mapElems chains :: LabelMap BlockChain-          (chains', used, _) = applyEdges weights chains fronts Set.empty-      in (chains', used)-    where-        applyEdges :: WeightedEdgeList -> LabelMap BlockChain-                   -> LabelMap BlockChain -> Set.Set WeightedEdge-                   -> (LabelMap BlockChain, Set.Set WeightedEdge, LabelMap BlockChain)-        applyEdges [] chainsEnd chainsFront used-            = (chainsEnd, used, chainsFront)-        applyEdges (edge@(WeightedEdge from to w):edges) chainsEnd chainsFront used-            --Since we order edges descending by weight we can stop here-            | w <= fuseEdgeThreshold-            = ( chainsEnd, used, chainsFront)-            --Fuse the two chains-            | Just c1 <- mapLookup from chainsEnd-            , Just c2 <- mapLookup to chainsFront-            , c1 /= c2-            = let newChain = chainConcat c1 c2-                  front = head $ takeL 1 newChain-                  end = head $ takeR 1 newChain-                  chainsFront' = mapInsert front newChain $-                                 mapDelete to chainsFront-                  chainsEnd'   = mapInsert end newChain $-                                 mapDelete from chainsEnd-              in applyEdges edges chainsEnd' chainsFront'-                            (Set.insert edge used)-            | otherwise-            --Check next edge-            = applyEdges edges chainsEnd chainsFront used+takeL n (BlockChain blks) =+    take n . fromOL $ blks +-- Note [Combining neighborhood chains]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  -- See also Note [Chain based CFG serialization] -- We have the chains (A-B-C-D) and (E-F) and an Edge C->E. ----- While placing the later after the former doesn't result in sequential--- control flow it is still be benefical since block C and E might end+-- While placing the latter after the former doesn't result in sequential+-- control flow it is still benefical. As block C and E might end -- up in the same cache line. -- -- So we place these chains next to each other even if we can't fuse them.@@ -366,7 +351,7 @@ --             v --             - -> E -> F ... ----- Simple heuristic to chose which chains we want to combine:+-- A simple heuristic to chose which chains we want to combine: --   * Process edges in descending priority. --   * Check if there is a edge near the end of one chain which goes --     to a block near the start of another edge.@@ -376,20 +361,28 @@ -- us to find all edges between two chains, check the distance for all edges, -- rank them based on the distance and and only then we can select two chains -- to combine. Which would add a lot of complexity for little gain.+--+-- So instead we just rank by the strength of the edge and use the first pair we+-- find.  -- | For a given list of chains and edges try to combine chains with strong --   edges between them.-combineNeighbourhood :: WeightedEdgeList -> [BlockChain]-                     -> [BlockChain]+combineNeighbourhood  :: [CfgEdge] -- ^ Edges to consider+                      -> [BlockChain] -- ^ Current chains of blocks+                      -> ([BlockChain], Set.Set (BlockId,BlockId))+                      -- ^ Resulting list of block chains, and a set of edges which+                      -- were used to fuse chains and as such no longer need to be+                      -- considered. combineNeighbourhood edges chains     = -- pprTraceIt "Neigbours" $-      applyEdges edges endFrontier startFrontier+    --   pprTrace "combineNeighbours" (ppr edges) $+      applyEdges edges endFrontier startFrontier (Set.empty)     where         --Build maps from chain ends to chains         endFrontier, startFrontier :: FrontierMap         endFrontier =             mapFromList $ concatMap (\chain ->-                                let ends = getEnds chain+                                let ends = getEnds chain :: [BlockId]                                     entry = (ends,chain)                                 in map (\x -> (x,entry)) ends ) chains         startFrontier =@@ -397,14 +390,14 @@                                 let front = getFronts chain                                     entry = (front,chain)                                 in map (\x -> (x,entry)) front) chains-        applyEdges :: WeightedEdgeList -> FrontierMap -> FrontierMap-                   -> [BlockChain]-        applyEdges [] chainEnds _chainFronts =-            ordNub $ map snd $ mapElems chainEnds-        applyEdges ((WeightedEdge from to _w):edges) chainEnds chainFronts+        applyEdges :: [CfgEdge] -> FrontierMap -> FrontierMap -> Set.Set (BlockId, BlockId)+                   -> ([BlockChain], Set.Set (BlockId,BlockId))+        applyEdges [] chainEnds _chainFronts combined =+            (ordNub $ map snd $ mapElems chainEnds, combined)+        applyEdges ((CfgEdge from to _w):edges) chainEnds chainFronts combined             | Just (c1_e,c1) <- mapLookup from chainEnds             , Just (c2_f,c2) <- mapLookup to chainFronts-            , c1 /= c2 -- Avoid trying to concat a short chain with itself.+            , c1 /= c2 -- Avoid trying to concat a chain with itself.             = let newChain = chainConcat c1 c2                   newChainFrontier = getFronts newChain                   newChainEnds = getEnds newChain@@ -438,165 +431,299 @@                 --   text "fronts" <+> ppr newFronts $$                 --   text "ends" <+> ppr newEnds                 --   )-                 applyEdges edges newEnds newFronts+                 applyEdges edges newEnds newFronts (Set.insert (from,to) combined)             | otherwise-            = --pprTrace "noNeigbours" (ppr ()) $-              applyEdges edges chainEnds chainFronts+            = applyEdges edges chainEnds chainFronts combined          where          getFronts chain = takeL neighbourOverlapp chain         getEnds chain = takeR neighbourOverlapp chain +-- In the last stop we combine all chains into a single one.+-- Trying to place chains with strong edges next to each other.+mergeChains :: [CfgEdge] -> [BlockChain]+            -> (BlockChain)+mergeChains edges chains+    = -- pprTrace "combine" (ppr edges) $+      runST $ do+        let addChain m0 chain = do+                ref <- newSTRef chain+                return $ chainFoldl (\m' b -> mapInsert b ref m') m0 chain+        chainMap' <- foldM (\m0 c -> addChain m0 c) mapEmpty chains+        merge edges chainMap'+    where+        -- We keep a map from ALL blocks to their respective chain (sigh)+        -- This is required since when looking at an edge we need to find+        -- the associated chains quickly.+        -- We use a map of STRefs, maintaining a invariant of one STRef per chain.+        -- When merging chains we can update the+        -- STRef of one chain once (instead of writing to the map for each block).+        -- We then overwrite the STRefs for the other chain so there is again only+        -- a single STRef for the combined chain.+        -- The difference in terms of allocations saved is ~0.2% with -O so actually+        -- significant compared to using a regular map. +        merge :: forall s. [CfgEdge] -> LabelMap (STRef s BlockChain) -> ST s BlockChain+        merge [] chains = do+            chains' <- ordNub <$> (mapM readSTRef $ mapElems chains) :: ST s [BlockChain]+            return $ foldl' chainConcat (head chains') (tail chains')+        merge ((CfgEdge from to _):edges) chains+        --   | pprTrace "merge" (ppr (from,to) <> ppr chains) False+        --   = undefined+          | cFrom == cTo+          = merge edges chains+          | otherwise+          = do+            chains' <- mergeComb cFrom cTo+            merge edges chains'+          where+            mergeComb :: STRef s BlockChain -> STRef s BlockChain -> ST s (LabelMap (STRef s BlockChain))+            mergeComb refFrom refTo = do+                cRight <- readSTRef refTo+                chain <- pure chainConcat <*> readSTRef refFrom <*> pure cRight+                writeSTRef refFrom chain+                return $ chainFoldl (\m b -> mapInsert b refFrom m) chains cRight --- See [Chain based CFG serialization]-buildChains :: CFG -> [BlockId]-            -> ( LabelMap BlockChain  -- Resulting chains.+            cFrom = expectJust "mergeChains:chainMap:from" $ mapLookup from chains+            cTo = expectJust "mergeChains:chainMap:to"   $ mapLookup to   chains+++-- See Note [Chain based CFG serialization] for the general idea.+-- This creates and fuses chains at the same time for performance reasons.++-- Try to build chains from a list of edges.+-- Edges must be sorted **descending** by their priority.+-- Returns the constructed chains, along with all edges which+-- are irrelevant past this point, this information doesn't need+-- to be complete - it's only used to speed up the process.+-- An Edge is irrelevant if the ends are part of the same chain.+-- We say these edges are already linked+buildChains :: [CfgEdge] -> [BlockId]+            -> ( LabelMap BlockChain  -- Resulting chains, indexd by end if chain.                , Set.Set (BlockId, BlockId)) --List of fused edges.-buildChains succWeights blocks-  = let (_, fusedEdges, chains) = buildNext setEmpty mapEmpty blocks Set.empty-    in (chains, fusedEdges)+buildChains edges blocks+  = runST $ buildNext setEmpty mapEmpty mapEmpty edges Set.empty   where-    -- We keep a map from the last block in a chain to the chain itself.-    -- This we we can easily check if an block should be appened to an+    -- buildNext builds up chains from edges one at a time.++    -- We keep a map from the ends of chains to the chains.+    -- This we we can easily check if an block should be appended to an     -- existing chain!-    buildNext :: LabelSet-              -> LabelMap BlockChain -- Map from last element to chain.-              -> [BlockId] -- Blocks to place-              -> Set.Set (BlockId, BlockId)-              -> ( [BlockChain]  -- Placed Blocks-                 , Set.Set (BlockId, BlockId) --List of fused edges-                 , LabelMap BlockChain-                 )-    buildNext _placed chains [] linked =-        ([], linked, chains)-    buildNext placed chains (block:todo) linked-        | setMember block placed-        = buildNext placed chains todo linked+    -- We store them using STRefs so we don't have to rebuild the spine of both+    -- maps every time we update a chain.+    buildNext :: forall s. LabelSet+              -> LabelMap (STRef s BlockChain) -- Map from end of chain to chain.+              -> LabelMap (STRef s BlockChain) -- Map from start of chain to chain.+              -> [CfgEdge] -- Edges to check - ordered by decreasing weight+              -> Set.Set (BlockId, BlockId) -- Used edges+              -> ST s   ( LabelMap BlockChain -- Chains by end+                        , Set.Set (BlockId, BlockId) --List of fused edges+                        )+    buildNext placed _chainStarts chainEnds  [] linked = do+        ends' <- sequence $ mapMap readSTRef chainEnds :: ST s (LabelMap BlockChain)+        -- Any remaining blocks have to be made to singleton chains.+        -- They might be combined with other chains later on outside this function.+        let unplaced = filter (\x -> not (setMember x placed)) blocks+            singletons = map (\x -> (x,chainSingleton x)) unplaced :: [(BlockId,BlockChain)]+        return (foldl' (\m (k,v) -> mapInsert k v m) ends' singletons , linked)+    buildNext placed chainStarts chainEnds (edge:todo) linked+        | from == to+        -- We skip self edges+        = buildNext placed chainStarts chainEnds todo (Set.insert (from,to) linked)+        | not (alreadyPlaced from) &&+          not (alreadyPlaced to)+        = do+            --pprTraceM "Edge-Chain:" (ppr edge)+            chain' <- newSTRef $ chainFromList [from,to]+            buildNext+                (setInsert to (setInsert from placed))+                (mapInsert from chain' chainStarts)+                (mapInsert to chain' chainEnds)+                todo+                (Set.insert (from,to) linked)++        | (alreadyPlaced from) &&+          (alreadyPlaced to)+        , Just predChain <- mapLookup from chainEnds+        , Just succChain <- mapLookup to chainStarts+        , predChain /= succChain -- Otherwise we try to create a cycle.+        = do+            -- pprTraceM "Fusing edge" (ppr edge)+            fuseChain predChain succChain++        | (alreadyPlaced from) &&+          (alreadyPlaced to)+        =   --pprTraceM "Skipping:" (ppr edge) >>+            buildNext placed chainStarts chainEnds todo linked+         | otherwise-        = buildNext placed' chains' todo linked'+        = do -- pprTraceM "Finding chain for:" (ppr edge $$+             --         text "placed" <+> ppr placed)+             findChain       where-        placed' = (foldl' (flip setInsert) placed placedBlocks)-        linked' = Set.union linked linkedEdges-        (placedBlocks, chains', linkedEdges) = findChain block+        from = edgeFrom edge+        to   = edgeTo   edge+        alreadyPlaced blkId = (setMember blkId placed) -        --Add the block to a existing or new chain-        --Returns placed blocks, list of resulting chains-        --and fused edges-        findChain :: BlockId-                -> ([BlockId],LabelMap BlockChain, Set.Set (BlockId, BlockId))-        findChain block-        -- B) place block at end of existing chain if-        -- there is no better block to append.-          | (pred:_) <- preds-          , alreadyPlaced pred-          , Just predChain <- mapLookup pred chains-          , (best:_) <- filter (not . alreadyPlaced) $ getSuccs pred-          , best == lbl-          = --pprTrace "B.2)" (ppr (pred,lbl)) $-            let newChain = chainSnoc predChain block-                chainMap = mapInsert lbl newChain $ mapDelete pred chains-            in  ( [lbl]-                , chainMap-                , Set.singleton (pred,lbl) )+        -- Combine two chains into a single one.+        fuseChain :: STRef s BlockChain -> STRef s BlockChain+                  -> ST s   ( LabelMap BlockChain -- Chains by end+                            , Set.Set (BlockId, BlockId) --List of fused edges+                            )+        fuseChain fromRef toRef = do+            fromChain <- readSTRef fromRef+            toChain <- readSTRef toRef+            let newChain = chainConcat fromChain toChain+            ref <- newSTRef newChain+            let start = head $ takeL 1 newChain+            let end = head $ takeR 1 newChain+            -- chains <- sequence $ mapMap readSTRef chainStarts+            -- pprTraceM "pre-fuse chains:" $ ppr chains+            buildNext+                placed+                (mapInsert start ref $ mapDelete to $ chainStarts)+                (mapInsert end ref $ mapDelete from $ chainEnds)+                todo+                (Set.insert (from,to) linked) ++        --Add the block to a existing chain or creates a new chain+        findChain :: ST s   ( LabelMap BlockChain -- Chains by end+                            , Set.Set (BlockId, BlockId) --List of fused edges+                            )+        findChain+          -- We can attach the block to the end of a chain+          | alreadyPlaced from+          , Just predChain <- mapLookup from chainEnds+          = do+            chain <- readSTRef predChain+            let newChain = chainSnoc chain to+            writeSTRef predChain newChain+            let chainEnds' = mapInsert to predChain $ mapDelete from chainEnds+            -- chains <- sequence $ mapMap readSTRef chainStarts+            -- pprTraceM "from chains:" $ ppr chains+            buildNext (setInsert to placed) chainStarts chainEnds' todo (Set.insert (from,to) linked)+          -- We can attack it to the front of a chain+          | alreadyPlaced to+          , Just succChain <- mapLookup to chainStarts+          = do+            chain <- readSTRef succChain+            let newChain = from `chainCons` chain+            writeSTRef succChain newChain+            let chainStarts' = mapInsert from succChain $ mapDelete to chainStarts+            -- chains <- sequence $ mapMap readSTRef chainStarts'+            -- pprTraceM "to chains:" $ ppr chains+            buildNext (setInsert from placed) chainStarts' chainEnds todo (Set.insert (from,to) linked)+          -- The placed end of the edge is part of a chain already and not an end.           | otherwise-          = --pprTrace "single" (ppr lbl)-            ( [lbl]-            , mapInsert lbl (chainSingleton lbl) chains-            , Set.empty)+          = do+            let block    = if alreadyPlaced to then from else to+            --pprTraceM "Singleton" $ ppr block+            let newChain = chainSingleton block+            ref <- newSTRef newChain+            buildNext (setInsert block placed) (mapInsert block ref chainStarts)+                      (mapInsert block ref chainEnds) todo (linked)             where               alreadyPlaced blkId = (setMember blkId placed)-              lbl = block-              getSuccs = map fst . getSuccEdgesSorted succWeights-              preds = map fst $ getSuccEdgesSorted predWeights lbl-    --For efficiency we also create the map to look up predecessors here-    predWeights = reverseEdges succWeights ----- We make the CFG a Hoopl Graph, so we can reuse revPostOrder.-newtype BlockNode e x = BN (BlockId,[BlockId])-instance NonLocal (BlockNode) where-  entryLabel (BN (lbl,_))   = lbl-  successors (BN (_,succs)) = succs--fromNode :: BlockNode C C -> BlockId-fromNode (BN x) = fst x--sequenceChain :: forall a i. (Instruction i, Outputable i) => LabelMap a -> CFG-            -> [GenBasicBlock i] -> [GenBasicBlock i]+-- | Place basic blocks based on the given CFG.+-- See Note [Chain based CFG serialization]+sequenceChain :: forall a i. (Instruction i, Outputable i)+              => LabelMap a -- ^ Keys indicate an info table on the block.+              -> CFG -- ^ Control flow graph and some meta data.+              -> [GenBasicBlock i] -- ^ List of basic blocks to be placed.+              -> [GenBasicBlock i] -- ^ Blocks placed in sequence. sequenceChain _info _weights    [] = [] sequenceChain _info _weights    [x] = [x] sequenceChain  info weights'     blocks@((BasicBlock entry _):_) =-    --Optimization, delete edges of weight <= 0.-    --This significantly improves performance whenever-    --we iterate over all edges, which is a few times!     let weights :: CFG-        weights-            = filterEdges (\_f _t edgeInfo -> edgeWeight edgeInfo > 0) weights'+        weights = --pprTrace "cfg'" (pprEdgeWeights cfg')+                  cfg'+          where+            (_, globalEdgeWeights) = {-# SCC mkGlobalWeights #-} mkGlobalWeights entry weights'+            cfg' = {-# SCC rewriteEdges #-}+                    mapFoldlWithKey+                        (\cfg from m ->+                            mapFoldlWithKey+                                (\cfg to w -> setEdgeWeight cfg (EdgeWeight w) from to )+                                cfg m )+                        weights'+                        globalEdgeWeights++        directEdges :: [CfgEdge]+        directEdges = sortBy (flip compare) $ catMaybes . map relevantWeight $ (infoEdgeList weights)+          where+            relevantWeight :: CfgEdge -> Maybe CfgEdge+            relevantWeight edge@(CfgEdge from to edgeInfo)+                | (EdgeInfo CmmSource { trans_cmmNode = CmmCall {} } _) <- edgeInfo+                -- Ignore edges across calls+                = Nothing+                | mapMember to info+                , w <- edgeWeight edgeInfo+                -- The payoff is small if we jump over an info table+                = Just (CfgEdge from to edgeInfo { edgeWeight = w/8 })+                | otherwise+                = Just edge+         blockMap :: LabelMap (GenBasicBlock i)         blockMap             = foldl' (\m blk@(BasicBlock lbl _ins) ->                         mapInsert lbl blk m)                      mapEmpty blocks -        toNode :: BlockId -> BlockNode C C-        toNode bid =-            -- sorted such that heavier successors come first.-            BN (bid,map fst . getSuccEdgesSorted weights' $ bid)--        orderedBlocks :: [BlockId]-        orderedBlocks-            = map fromNode $-              revPostorderFrom (fmap (toNode . blockId) blockMap) entry-         (builtChains, builtEdges)             = {-# SCC "buildChains" #-}               --pprTraceIt "generatedChains" $-              --pprTrace "orderedBlocks" (ppr orderedBlocks) $-              buildChains weights orderedBlocks+              --pprTrace "blocks" (ppr (mapKeys blockMap)) $+              buildChains directEdges (mapKeys blockMap) -        rankedEdges :: WeightedEdgeList-        -- Sort edges descending, remove fused eges+        rankedEdges :: [CfgEdge]+        -- Sort descending by weight, remove fused edges         rankedEdges =-            map (\(from, to, weight) -> WeightedEdge from to weight) .-            filter (\(from, to, _)-                        -> not (Set.member (from,to) builtEdges)) .-            sortWith (\(_,_,w) -> - w) $ weightedEdgeList weights+            filter (\edge -> not (Set.member (edgeFrom edge,edgeTo edge) builtEdges)) $+            directEdges -        (fusedChains, fusedEdges)+        (neighbourChains, combined)             = ASSERT(noDups $ mapElems builtChains)-              {-# SCC "fuseChains" #-}-              --(pprTrace "RankedEdges" $ ppr rankedEdges) $-              --pprTraceIt "FusedChains" $-              fuseChains rankedEdges builtChains+              {-# SCC "groupNeighbourChains" #-}+            --   pprTraceIt "NeighbourChains" $+              combineNeighbourhood rankedEdges (mapElems builtChains) -        rankedEdges' =-            filter (\edge -> not $ Set.member edge fusedEdges) $ rankedEdges -        neighbourChains-            = ASSERT(noDups $ mapElems fusedChains)-              {-# SCC "groupNeighbourChains" #-}-              --pprTraceIt "ResultChains" $-              combineNeighbourhood rankedEdges' (mapElems fusedChains)+        allEdges :: [CfgEdge]+        allEdges = {-# SCC allEdges #-}+                   sortOn (relevantWeight) $ filter (not . deadEdge) $ (infoEdgeList weights)+          where+            deadEdge :: CfgEdge -> Bool+            deadEdge (CfgEdge from to _) = let e = (from,to) in Set.member e combined || Set.member e builtEdges+            relevantWeight :: CfgEdge -> EdgeWeight+            relevantWeight (CfgEdge _ _ edgeInfo)+                | EdgeInfo (CmmSource { trans_cmmNode = CmmCall {}}) _ <- edgeInfo+                -- Penalize edges across calls+                = weight/(64.0)+                | otherwise+                = weight+              where+                -- negate to sort descending+                weight = negate (edgeWeight edgeInfo) +        masterChain =+            {-# SCC "mergeChains" #-}+            -- pprTraceIt "MergedChains" $+            mergeChains allEdges neighbourChains+         --Make sure the first block stays first-        ([entryChain],chains')-            = ASSERT(noDups $ neighbourChains)-              partition (chainMember entry) neighbourChains-        (entryChain':entryRest)-            | inFront entry entryChain = [entryChain]-            | (rest,entry) <- breakChainAt entry entryChain+        prepedChains+            | inFront entry masterChain+            = [masterChain]+            | (rest,entry) <- breakChainAt entry masterChain             = [entry,rest]             | otherwise = pprPanic "Entry point eliminated" $-                            ppr ([entryChain],chains')+                            ppr masterChain -        prepedChains-            = entryChain':(entryRest++chains') :: [BlockChain]         blockList-            -- = (concatMap chainToBlocks prepedChains)-            = (concatMap seqToList $ map chainBlocks prepedChains)+            = ASSERT(noDups [masterChain])+              (concatMap fromOL $ map chainBlocks prepedChains)          --chainPlaced = setFromList $ map blockId blockList :: LabelSet         chainPlaced = setFromList $ blockList :: LabelSet@@ -606,14 +733,22 @@             in filter (\block -> not (isPlaced block)) blocks          placedBlocks =+            -- We want debug builds to catch this as it's a good indicator for+            -- issues with CFG invariants. But we don't want to blow up production+            -- builds if something slips through.+            ASSERT(null unplaced)             --pprTraceIt "placedBlocks" $-            blockList ++ unplaced+            -- ++ [] is stil kinda expensive+            if null unplaced then blockList else blockList ++ unplaced         getBlock bid = expectJust "Block placment" $ mapLookup bid blockMap     in         --Assert we placed all blocks given as input         ASSERT(all (\bid -> mapMember bid blockMap) placedBlocks)         dropJumps info $ map getBlock placedBlocks +{-# SCC dropJumps #-}+-- | Remove redundant jumps between blocks when we can rely on+-- fall through. dropJumps :: forall a i. Instruction i => LabelMap a -> [GenBasicBlock i]           -> [GenBasicBlock i] dropJumps _    [] = []@@ -664,7 +799,6 @@     dontUseCfg = gopt Opt_WeightlessBlocklayout dflags ||                  (not $ backendMaintainsCfg dflags) - -- The old algorithm: -- It is very simple (and stupid): We make a graph out of -- the blocks where there is an edge from one block to another iff the@@ -758,64 +892,3 @@     v <- lookupUFM m k     return (v, delFromUFM m k) --- ---------------------------------------------------------------------- Some specialized data structures to speed things up:---  * BlockSequence: A specialized version of Data.Sequence.---    Better at indexing at the front/end but lacks ability---    to do lookup by position.--type FrontierMap = LabelMap ([BlockId],BlockChain)---- | A "reverse zipper" of sorts.--- We store a list of blocks in two parts, the initial part from left to right--- and the remaining part stored in reverse order. This makes it easy to look--- the last/first element and append on both sides.-data BlockSequence-  = Singleton !BlockId-  | Pair (OrdList BlockId) (OrdList BlockId)-    -- ^ For a non empty pair there is at least one element in the left part.-  | Empty--seqFront :: BlockSequence -> BlockId-seqFront Empty = panic "Empty sequence"-seqFront (Singleton bid) = bid-seqFront (Pair lefts rights) = expectJust "Seq invariant" $-    listToMaybe (fromOL lefts) <|> listToMaybe (fromOL $ reverseOL rights)---- seqEnd :: BlockSequence -> BlockId--- seqEnd Empty = panic "Empty sequence"--- seqEnd (Singleton bid) = bid--- seqEnd (Pair lefts rights) = expectJust "Seq invariant" $---     listToMaybe (fromOL rights) <|> listToMaybe (fromOL $ reverseOL lefts)--seqToList :: BlockSequence -> [BlockId]-seqToList Empty = []-seqToList (Singleton bid) = [bid]-seqToList (Pair lefts rights) = fromOL $ lefts `appOL` reverseOL rights---seqToRList :: BlockSequence -> [BlockId]-seqToRList Empty = []-seqToRList (Singleton bid) = [bid]-seqToRList (Pair lefts rights) = fromOL $ rights `appOL` reverseOL lefts--seqSnoc :: BlockSequence -> BlockId -> BlockSequence-seqSnoc (Empty) bid = Singleton bid-seqSnoc (Singleton s) bid= Pair (unitOL s) (unitOL bid)-seqSnoc (Pair lefts rights) bid = Pair lefts (bid `consOL` rights)--seqConcat :: BlockSequence -> BlockSequence -> BlockSequence-seqConcat (Empty) x2 = x2-seqConcat (Singleton b1) (Singleton b2) = Pair (unitOL b1) (unitOL b2)-seqConcat x1 (Empty) = x1-seqConcat (Singleton b1) (Pair lefts rights) = Pair (b1 `consOL` lefts) rights-seqConcat (Pair lefts rights) (Singleton b2) = Pair lefts (b2 `consOL` rights)-seqConcat (Pair lefts1 rights1) (Pair lefts2 rights2) =-    Pair (lefts1 `appOL` (reverseOL rights1) `appOL` lefts2) rights2--seqFromBids :: [BlockId] -> BlockSequence-seqFromBids [] = Empty-seqFromBids [b1] = Singleton b1-seqFromBids [b1,b2] = Pair (unitOL b1) (unitOL b2)-seqFromBids [b1,b2,b3] = Pair (consOL b1 $ unitOL b2) (unitOL b3)-seqFromBids (b1:b2:b3:bs) = Pair (toOL [b1,b2,b3]) (toOL bs)
nativeGen/CFG.hs view
@@ -6,31 +6,40 @@ {-# LANGUAGE TupleSections #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE CPP #-}+{-# LANGUAGE Rank2Types #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-}  module CFG     ( CFG, CfgEdge(..), EdgeInfo(..), EdgeWeight(..)     , TransitionSource(..)      --Modify the CFG-    , addWeightEdge, addEdge, delEdge+    , addWeightEdge, addEdge+    , delEdge, delNode     , addNodesBetween, shortcutWeightMap     , reverseEdges, filterEdges     , addImmediateSuccessor-    , mkWeightInfo, adjustEdgeWeight+    , mkWeightInfo, adjustEdgeWeight, setEdgeWeight      --Query the CFG     , infoEdgeList, edgeList     , getSuccessorEdges, getSuccessors-    , getSuccEdgesSorted, weightedEdgeList+    , getSuccEdgesSorted     , getEdgeInfo     , getCfgNodes, hasNode-    , loopMembers +    -- Loop Information+    , loopMembers, loopLevels, loopInfo+     --Construction/Misc     , getCfg, getCfgProc, pprEdgeWeights, sanityCheckCfg      --Find backedges and update their weight-    , optimizeCFG )+    , optimizeCFG+    , mkGlobalWeights++     ) where  #include "HsVersions.h"@@ -38,9 +47,8 @@ import GhcPrelude  import BlockId-import Cmm ( RawCmmDecl, GenCmmDecl( .. ), CmmBlock, succ, g_entry-           , CmmGraph )-import CmmNode+import Cmm+ import CmmUtils import CmmSwitch import Hoopl.Collections@@ -50,26 +58,52 @@  import Util import Digraph+import Maybes +import Unique+import qualified Dominators as Dom+import Data.IntMap.Strict (IntMap)+import Data.IntSet (IntSet)++import qualified Data.IntMap.Strict as IM+import qualified Data.Map as M+import qualified Data.IntSet as IS+import qualified Data.Set as S+import Data.Tree+import Data.Bifunctor+ import Outputable -- DEBUGGING ONLY --import Debug+-- import Debug.Trace --import OrdList --import Debug.Trace-import PprCmm ()+import PprCmm () -- For Outputable instances import qualified DynFlags as D -import Data.List+import Data.List (sort, nub, partition)+import Data.STRef.Strict+import Control.Monad.ST +import Data.Array.MArray+import Data.Array.ST+import Data.Array.IArray+import Data.Array.Unsafe (unsafeFreeze)+import Data.Array.Base (unsafeRead, unsafeWrite)++import Control.Monad++type Prob = Double+ type Edge = (BlockId, BlockId) type Edges = [Edge]  newtype EdgeWeight-  = EdgeWeight Int-  deriving (Eq,Ord,Enum,Num,Real,Integral)+  = EdgeWeight { weightToDouble :: Double }+  deriving (Eq,Ord,Enum,Num,Real,Fractional)  instance Outputable EdgeWeight where-  ppr (EdgeWeight w) = ppr w+  ppr (EdgeWeight w) = doublePrec 5 w  type EdgeInfoMap edgeInfo = LabelMap (LabelMap edgeInfo) @@ -113,15 +147,28 @@     = parens (ppr from1 <+> text "-(" <> ppr edgeInfo <> text ")->" <+> ppr to1)  -- | Can we trace back a edge to a specific Cmm Node--- or has it been introduced for codegen. We use this to maintain+-- or has it been introduced during assembly codegen. We use this to maintain -- some information which would otherwise be lost during the -- Cmm <-> asm transition. -- See also Note [Inverting Conditional Branches] data TransitionSource-  = CmmSource (CmmNode O C)+  = CmmSource { trans_cmmNode :: (CmmNode O C)+              , trans_info :: BranchInfo }   | AsmCodeGen   deriving (Eq) +data BranchInfo = NoInfo         -- ^ Unknown, but not heap or stack check.+                | HeapStackCheck -- ^ Heap or stack check+    deriving Eq++instance Outputable BranchInfo where+    ppr NoInfo = text "regular"+    ppr HeapStackCheck = text "heap/stack"++isHeapOrStackCheck :: TransitionSource -> Bool+isHeapOrStackCheck (CmmSource { trans_info = HeapStackCheck}) = True+isHeapOrStackCheck _ = False+ -- | Information about edges data EdgeInfo   = EdgeInfo@@ -132,12 +179,10 @@ instance Outputable EdgeInfo where   ppr edgeInfo = text "weight:" <+> ppr (edgeWeight edgeInfo) --- Allow specialization-{-# INLINEABLE mkWeightInfo #-} -- | Convenience function, generate edge info based --   on weight not originating from cmm.-mkWeightInfo :: Integral n => n -> EdgeInfo-mkWeightInfo = EdgeInfo AsmCodeGen . fromIntegral+mkWeightInfo :: EdgeWeight -> EdgeInfo+mkWeightInfo = EdgeInfo AsmCodeGen  -- | Adjust the weight between the blocks using the given function. --   If there is no such edge returns the original map.@@ -145,14 +190,25 @@                  -> BlockId -> BlockId -> CFG adjustEdgeWeight cfg f from to   | Just info <- getEdgeInfo from to cfg-  , weight <- edgeWeight info-  = addEdge from to (info { edgeWeight = f weight}) cfg+  , !weight <- edgeWeight info+  , !newWeight <- f weight+  = addEdge from to (info { edgeWeight = newWeight}) cfg   | otherwise = cfg +-- | Set the weight between the blocks to the given weight.+--   If there is no such edge returns the original map.+setEdgeWeight :: CFG -> EdgeWeight+              -> BlockId -> BlockId -> CFG+setEdgeWeight cfg !weight from to+  | Just info <- getEdgeInfo from to cfg+  = addEdge from to (info { edgeWeight = weight}) cfg+  | otherwise = cfg -getCfgNodes :: CFG -> LabelSet-getCfgNodes m = mapFoldMapWithKey (\k v -> setFromList (k:mapKeys v)) m +getCfgNodes :: CFG -> [BlockId]+getCfgNodes m =+    mapKeys m+ -- | Is this block part of this graph? hasNode :: CFG -> BlockId -> Bool hasNode m node =@@ -178,7 +234,7 @@             msg )             False     where-      cfgNodes = getCfgNodes m :: LabelSet+      cfgNodes = setFromList $ getCfgNodes m :: LabelSet       diff = (setUnion cfgNodes blockSet) `setDifference` (setIntersection cfgNodes blockSet) :: LabelSet  -- | Filter the CFG with a custom function f.@@ -273,7 +329,7 @@ --             \                  \ --              -> C    =>         -> C ---addImmediateSuccessor :: HasDebugCallStack => BlockId -> BlockId -> CFG -> CFG+addImmediateSuccessor :: BlockId -> BlockId -> CFG -> CFG addImmediateSuccessor node follower cfg     = updateEdges . addWeightEdge node follower uncondWeight $ cfg     where@@ -295,7 +351,7 @@         -- Simply insert the edge into the edge list.         addFromToEdge Nothing = Just $ mapSingleton to info         addFromToEdge (Just wm) = Just $ mapInsert to info wm-        -- We must add the destination node explicitly as well+        -- We must add the destination node explicitly         addDestNode Nothing = Just $ mapEmpty         addDestNode n@(Just _) = n @@ -314,6 +370,11 @@         remDest Nothing = Nothing         remDest (Just wm) = Just $ mapDelete to wm +delNode :: BlockId -> CFG -> CFG+delNode node cfg =+  fmap (mapDelete node)  -- < Edges to the node+    (mapDelete node cfg) -- < Edges from the node+ -- | Destinations from bid ordered by weight (descending) getSuccEdgesSorted :: CFG -> BlockId -> [(BlockId,EdgeInfo)] getSuccEdgesSorted m bid =@@ -328,7 +389,7 @@ getSuccessorEdges m bid = maybe lookupError mapToList (mapLookup bid m)   where     lookupError = pprPanic "getSuccessorEdges: Block does not exist" $-                    ppr bid $$ text "CFG:" <+> pprEdgeWeights m+                    ppr bid <+> pprEdgeWeights m  getEdgeInfo :: BlockId -> BlockId -> CFG -> Maybe EdgeInfo getEdgeInfo from to m@@ -338,37 +399,54 @@     | otherwise     = Nothing +getEdgeWeight :: CFG -> BlockId -> BlockId -> EdgeWeight+getEdgeWeight cfg from to =+    edgeWeight $ expectJust "Edgeweight for noexisting block" $+                 getEdgeInfo from to cfg++getTransitionSource :: BlockId -> BlockId -> CFG -> TransitionSource+getTransitionSource from to cfg = transitionSource $ expectJust "Source info for noexisting block" $+                        getEdgeInfo from to cfg+ reverseEdges :: CFG -> CFG reverseEdges cfg = mapFoldlWithKey (\cfg from toMap -> go (addNode cfg from) from toMap) mapEmpty cfg   where-    -- We preserve nodes without outgoing edges!+    -- We must preserve nodes without outgoing edges!     addNode :: CFG -> BlockId -> CFG     addNode cfg b = mapInsertWith mapUnion b mapEmpty cfg     go :: CFG -> BlockId -> (LabelMap EdgeInfo) -> CFG     go cfg from toMap = mapFoldlWithKey (\cfg to info -> addEdge to from info cfg) cfg toMap  :: CFG + -- | Returns a unordered list of all edges with info infoEdgeList :: CFG -> [CfgEdge] infoEdgeList m =-  mapFoldMapWithKey-    (\from toMap ->-      map (\(to,info) -> CfgEdge from to info) (mapToList toMap))-    m---- | Unordered list of edges with weight as Tuple (from,to,weight)-weightedEdgeList :: CFG -> [(BlockId,BlockId,EdgeWeight)]-weightedEdgeList m =-  mapFoldMapWithKey-    (\from toMap ->-      map (\(to,info) ->-        (from,to, edgeWeight info)) (mapToList toMap))-    m-      --  (\(from, tos) -> map (\(to,info) -> (from,to, edgeWeight info)) tos )+    go (mapToList m) []+  where+    -- We avoid foldMap to avoid thunk buildup+    go :: [(BlockId,LabelMap EdgeInfo)] -> [CfgEdge] -> [CfgEdge]+    go [] acc = acc+    go ((from,toMap):xs) acc+      = go' xs from (mapToList toMap) acc+    go' :: [(BlockId,LabelMap EdgeInfo)] -> BlockId -> [(BlockId,EdgeInfo)] -> [CfgEdge] -> [CfgEdge]+    go' froms _    []              acc = go froms acc+    go' froms from ((to,info):tos) acc+      = go' froms from tos (CfgEdge from to info : acc)  -- | Returns a unordered list of all edges without weights edgeList :: CFG -> [Edge] edgeList m =-        mapFoldMapWithKey (\from toMap -> fmap (from,) (mapKeys toMap)) m+    go (mapToList m) []+  where+    -- We avoid foldMap to avoid thunk buildup+    go :: [(BlockId,LabelMap EdgeInfo)] -> [Edge] -> [Edge]+    go [] acc = acc+    go ((from,toMap):xs) acc+      = go' xs from (mapKeys toMap) acc+    go' :: [(BlockId,LabelMap EdgeInfo)] -> BlockId -> [BlockId] -> [Edge] -> [Edge]+    go' froms _    []              acc = go froms acc+    go' froms from (to:tos) acc+      = go' froms from tos ((from,to) : acc)  -- | Get successors of a given node without edge weights. getSuccessors :: HasDebugCallStack => CFG -> BlockId -> [BlockId]@@ -382,8 +460,8 @@  pprEdgeWeights :: CFG -> SDoc pprEdgeWeights m =-    let edges = sort $ weightedEdgeList m-        printEdge (from, to, weight)+    let edges = sort $ infoEdgeList m :: [CfgEdge]+        printEdge (CfgEdge from to (EdgeInfo { edgeWeight = weight }))             = text "\t" <> ppr from <+> text "->" <+> ppr to <>               text "[label=\"" <> ppr weight <> text "\",weight=\"" <>               ppr weight <> text "\"];\n"@@ -392,7 +470,7 @@         --to immediately see it when it does.         printNode node             = text "\t" <> ppr node <> text ";\n"-        getEdgeNodes (from, to, _weight) = [from,to]+        getEdgeNodes (CfgEdge from to _) = [from,to]         edgeNodes = setFromList $ concatMap getEdgeNodes edges :: LabelSet         nodes = filter (\n -> (not . setMember n) edgeNodes) . mapKeys $ mapFilter null m     in@@ -406,8 +484,8 @@ updateEdgeWeight :: (EdgeWeight -> EdgeWeight) -> Edge -> CFG -> CFG updateEdgeWeight f (from, to) cfg     | Just oldInfo <- getEdgeInfo from to cfg-    = let oldWeight = edgeWeight oldInfo-          newWeight = f oldWeight+    = let !oldWeight = edgeWeight oldInfo+          !newWeight = f oldWeight       in addEdge from to (oldInfo {edgeWeight = newWeight}) cfg     | otherwise     = panic "Trying to update invalid edge"@@ -476,9 +554,7 @@    Should A or B be placed in front of C? The block layout algorithm   decides this based on which edge (A,C)/(B,C) is heavier. So we-  make a educated guess how often execution will transer control-  along each edge as well as how much we gain by placing eg A before-  C.+  make a educated guess on which branch should be preferred.    We rank edges in this order:   * Unconditional Control Transfer - They will always@@ -507,17 +583,11 @@           address. This reduces the chance that we return to the same           cache line further. - -} -- | Generate weights for a Cmm proc based on some simple heuristics. getCfgProc :: D.CfgWeights -> RawCmmDecl -> CFG getCfgProc _       (CmmData {}) = mapEmpty--- Sometimes GHC generates dummy procs which don't actually contain code.--- But they might contain bottoms in some fields so we check for an empty--- body first. In particular this happens with SplitObjs enabled.-getCfgProc weights (CmmProc _info _lab _live graph)-  | null (toBlockList graph) = mapEmpty-  | otherwise                = getCfg weights graph+getCfgProc weights (CmmProc _info _lab _live graph) = getCfg weights graph  getCfg :: D.CfgWeights -> CmmGraph -> CFG getCfg weights graph =@@ -548,13 +618,24 @@     getBlockEdges block =       case branch of         CmmBranch dest -> [mkEdge dest uncondWeight]-        CmmCondBranch _c t f l+        CmmCondBranch cond t f l           | l == Nothing ->               [mkEdge f condBranchWeight,   mkEdge t condBranchWeight]           | l == Just True ->               [mkEdge f unlikelyCondWeight, mkEdge t likelyCondWeight]           | l == Just False ->               [mkEdge f likelyCondWeight,   mkEdge t unlikelyCondWeight]+          where+            mkEdgeInfo = -- pprTrace "Info" (ppr branchInfo <+> ppr cond)+                         EdgeInfo (CmmSource branch branchInfo) . fromIntegral+            mkEdge target weight = ((bid,target), mkEdgeInfo weight)+            branchInfo =+              foldRegsUsed+                (panic "foldRegsDynFlags")+                (\info r -> if r == SpLim || r == HpLim || r == BaseReg+                    then HeapStackCheck else info)+                NoInfo cond+         (CmmSwitch _e ids) ->           let switchTargets = switchTargetsToList ids               --Compiler performance hack - for very wide switches don't@@ -572,7 +653,7 @@             map (\x -> ((bid,x),mkEdgeInfo 0)) $ G.successors other       where         bid = G.entryLabel block-        mkEdgeInfo = EdgeInfo (CmmSource branch) . fromIntegral+        mkEdgeInfo = EdgeInfo (CmmSource branch NoInfo) . fromIntegral         mkEdge target weight = ((bid,target), mkEdgeInfo weight)         branch = lastNode block :: CmmNode O C @@ -591,9 +672,14 @@       classifyEdges root getSuccs edges :: [((BlockId,BlockId),EdgeType)]  -optimizeCFG :: HasDebugCallStack => D.CfgWeights -> RawCmmDecl -> CFG -> CFG+optimizeCFG :: D.CfgWeights -> RawCmmDecl -> CFG -> CFG optimizeCFG _ (CmmData {}) cfg = cfg optimizeCFG weights (CmmProc info _lab _live graph) cfg =+    {-# SCC optimizeCFG #-}+    -- pprTrace "Initial:" (pprEdgeWeights cfg) $+    -- pprTrace "Initial:" (ppr $ mkGlobalWeights (g_entry graph) cfg) $++    -- pprTrace "LoopInfo:" (ppr $ loopInfo cfg (g_entry graph)) $     favourFewerPreds  .     penalizeInfoTables info .     increaseBackEdgeWeight (g_entry graph) $ cfg@@ -623,12 +709,8 @@           = weight - (fromIntegral $ D.infoTablePenalty weights)           | otherwise = weight --{- Note [Optimize for Fallthrough]---}     -- | If a block has two successors, favour the one with fewer-    -- predecessors. (As that one is more likely to become a fallthrough)+    -- predecessors and/or the one allowing fall through.     favourFewerPreds :: CFG -> CFG     favourFewerPreds cfg =         let@@ -645,38 +727,38 @@               | preds1 == preds2 = ( 0, 0)               | otherwise        = (-1, 1) +            update :: CFG -> BlockId -> CFG             update cfg node               | [(s1,e1),(s2,e2)] <- getSuccessorEdges cfg node-              , w1 <- edgeWeight e1-              , w2 <- edgeWeight e2+              , !w1 <- edgeWeight e1+              , !w2 <- edgeWeight e2               --Only change the weights if there isn't already a ordering.               , w1 == w2               , (mod1,mod2) <- modifiers (predCount s1) (predCount s2)               = (\cfg' ->                   (adjustEdgeWeight cfg' (+mod2) node s2))-                  (adjustEdgeWeight cfg  (+mod1) node s1)+                    (adjustEdgeWeight cfg  (+mod1) node s1)               | otherwise               = cfg-        in setFoldl update cfg nodes+        in foldl' update cfg nodes       where         fallthroughTarget :: BlockId -> EdgeInfo -> Bool         fallthroughTarget to (EdgeInfo source _weight)           | mapMember to info = False           | AsmCodeGen <- source = True-          | CmmSource (CmmBranch {}) <- source = True-          | CmmSource (CmmCondBranch {}) <- source = True+          | CmmSource { trans_cmmNode = CmmBranch {} } <- source = True+          | CmmSource { trans_cmmNode = CmmCondBranch {} } <- source = True           | otherwise = False  -- | Determine loop membership of blocks based on SCC analysis---   Ideally we would replace this with a variant giving us loop---   levels instead but the SCC code will do for now.+--   This is faster but only gives yes/no answers. loopMembers :: HasDebugCallStack => CFG -> LabelMap Bool loopMembers cfg =     foldl' (flip setLevel) mapEmpty sccs   where     mkNode :: BlockId -> Node BlockId BlockId     mkNode bid = DigraphNode bid bid (getSuccessors cfg bid)-    nodes = map mkNode $ setElems (getCfgNodes cfg)+    nodes = map mkNode (getCfgNodes cfg)      sccs = stronglyConnCompFromEdgedVerticesOrd nodes @@ -684,3 +766,556 @@     setLevel (AcyclicSCC bid) m = mapInsert bid False m     setLevel (CyclicSCC bids) m = foldl' (\m k -> mapInsert k True m) m bids +loopLevels :: CFG -> BlockId -> LabelMap Int+loopLevels cfg root = liLevels loopInfos+    where+      loopInfos = loopInfo cfg root++data LoopInfo = LoopInfo+  { liBackEdges :: [(Edge)] -- ^ List of back edges+  , liLevels :: LabelMap Int -- ^ BlockId -> LoopLevel mapping+  , liLoops :: [(Edge, LabelSet)] -- ^ (backEdge, loopBody), body includes header+  }++instance Outputable LoopInfo where+    ppr (LoopInfo _ _lvls loops) =+        text "Loops:(backEdge, bodyNodes)" $$+            (vcat $ map ppr loops)++{-  Note [Determining the loop body]+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++    Starting with the knowledge that:+    * head dominates the loop+    * `tail` -> `head` is a backedge++    We can determine all nodes by:+    * Deleting the loop head from the graph.+    * Collect all blocks which are reachable from the `tail`.++    We do so by performing bfs from the tail node towards the head.+ -}++-- | Determine loop membership of blocks based on Dominator analysis.+--   This is slower but gives loop levels instead of just loop membership.+--   However it only detects natural loops. Irreducible control flow is not+--   recognized even if it loops. But that is rare enough that we don't have+--   to care about that special case.+loopInfo :: HasDebugCallStack => CFG -> BlockId -> LoopInfo+loopInfo cfg root = LoopInfo  { liBackEdges = backEdges+                              , liLevels = mapFromList loopCounts+                              , liLoops = loopBodies }+  where+    revCfg = reverseEdges cfg++    graph = -- pprTrace "CFG - loopInfo" (pprEdgeWeights cfg) $+            fmap (setFromList . mapKeys ) cfg :: LabelMap LabelSet+++    --TODO - This should be a no op: Export constructors? Use unsafeCoerce? ...+    rooted = ( fromBlockId root+              , toIntMap $ fmap toIntSet graph) :: (Int, IntMap IntSet)+    tree = fmap toBlockId $ Dom.domTree rooted :: Tree BlockId++    -- Map from Nodes to their dominators+    domMap :: LabelMap LabelSet+    domMap = mkDomMap tree++    edges = edgeList cfg :: [(BlockId, BlockId)]+    -- We can't recompute nodes from edges, there might be blocks not connected via edges.+    nodes = getCfgNodes cfg :: [BlockId]++    -- identify back edges+    isBackEdge (from,to)+      | Just doms <- mapLookup from domMap+      , setMember to doms+      = True+      | otherwise = False++    -- See Note [Determining the loop body]+    -- Get the loop body associated with a back edge.+    findBody edge@(tail, head)+      = ( edge, setInsert head $ go (setSingleton tail) (setSingleton tail) )+      where+        -- See Note [Determining the loop body]+        cfg' = delNode head revCfg++        go :: LabelSet -> LabelSet -> LabelSet+        go found current+          | setNull current = found+          | otherwise = go  (setUnion newSuccessors found)+                            newSuccessors+          where+            -- Really predecessors, since we use the reversed cfg.+            newSuccessors = setFilter (\n -> not $ setMember n found) successors :: LabelSet+            successors = setFromList $ concatMap+                                      (getSuccessors cfg')+                                      -- we filter head as it's no longer part of the cfg.+                                      (filter (/= head) $ setElems current) :: LabelSet++    backEdges = filter isBackEdge edges+    loopBodies = map findBody backEdges :: [(Edge, LabelSet)]++    -- Block b is part of n loop bodies => loop nest level of n+    loopCounts =+      let bodies = map (first snd) loopBodies -- [(Header, Body)]+          loopCount n = length $ nub . map fst . filter (setMember n . snd) $ bodies+      in  map (\n -> (n, loopCount n)) $ nodes :: [(BlockId, Int)]++    toIntSet :: LabelSet -> IntSet+    toIntSet s = IS.fromList . map fromBlockId . setElems $ s+    toIntMap :: LabelMap a -> IntMap a+    toIntMap m = IM.fromList $ map (\(x,y) -> (fromBlockId x,y)) $ mapToList m++    mkDomMap :: Tree BlockId -> LabelMap LabelSet+    mkDomMap root = mapFromList $ go setEmpty root+      where+        go :: LabelSet -> Tree BlockId -> [(Label,LabelSet)]+        go parents (Node lbl [])+          =  [(lbl, parents)]+        go parents (Node _ leaves)+          = let nodes = map rootLabel leaves+                entries = map (\x -> (x,parents)) nodes+            in  entries ++ concatMap+                            (\n -> go (setInsert (rootLabel n) parents) n)+                            leaves++    fromBlockId :: BlockId -> Int+    fromBlockId = getKey . getUnique++    toBlockId :: Int -> BlockId+    toBlockId = mkBlockId . mkUniqueGrimily++-- We make the CFG a Hoopl Graph, so we can reuse revPostOrder.+newtype BlockNode (e :: Extensibility) (x :: Extensibility) = BN (BlockId,[BlockId])++instance G.NonLocal (BlockNode) where+  entryLabel (BN (lbl,_))   = lbl+  successors (BN (_,succs)) = succs++revPostorderFrom :: HasDebugCallStack => CFG -> BlockId -> [BlockId]+revPostorderFrom cfg root =+    map fromNode $ G.revPostorderFrom hooplGraph root+  where+    nodes = getCfgNodes cfg+    hooplGraph = foldl' (\m n -> mapInsert n (toNode n) m) mapEmpty nodes++    fromNode :: BlockNode C C -> BlockId+    fromNode (BN x) = fst x++    toNode :: BlockId -> BlockNode C C+    toNode bid =+        BN (bid,getSuccessors cfg $ bid)+++-- | We take in a CFG which has on its edges weights which are+--   relative only to other edges originating from the same node.+--+--   We return a CFG for which each edge represents a GLOBAL weight.+--   This means edge weights are comparable across the whole graph.+--+--   For irreducible control flow results might be imprecise, otherwise they+--   are reliable.+--+--   The algorithm is based on the Paper+--   "Static Branch Prediction and Program Profile Analysis" by Y Wu, JR Larus+--   The only big change is that we go over the nodes in the body of loops in+--   reverse post order. Which is required for diamond control flow to work probably.+--+--   We also apply a few prediction heuristics (based on the same paper)++{-# NOINLINE mkGlobalWeights #-}+{-# SCC mkGlobalWeights #-}+mkGlobalWeights :: HasDebugCallStack => BlockId -> CFG -> (LabelMap Double, LabelMap (LabelMap Double))+mkGlobalWeights root localCfg+  | null localCfg = panic "Error - Empty CFG"+  | otherwise+  = (blockFreqs', edgeFreqs')+  where+    -- Calculate fixpoints+    (blockFreqs, edgeFreqs) = calcFreqs nodeProbs backEdges' bodies' revOrder'+    blockFreqs' = mapFromList $ map (first fromVertex) (assocs blockFreqs) :: LabelMap Double+    edgeFreqs' = fmap fromVertexMap $ fromVertexMap edgeFreqs++    fromVertexMap :: IM.IntMap x -> LabelMap x+    fromVertexMap m = mapFromList . map (first fromVertex) $ IM.toList m++    revOrder = revPostorderFrom localCfg root :: [BlockId]+    loopResults@(LoopInfo backedges _levels bodies) = loopInfo localCfg root++    revOrder' = map toVertex revOrder+    backEdges' = map (bimap toVertex toVertex) backedges+    bodies' = map calcBody bodies++    estimatedCfg = staticBranchPrediction root loopResults localCfg+    -- Normalize the weights to probabilities and apply heuristics+    nodeProbs = cfgEdgeProbabilities estimatedCfg toVertex++    -- By mapping vertices to numbers in reverse post order we can bring any subset into reverse post+    -- order simply by sorting.+    -- TODO: The sort is redundant if we can guarantee that setElems returns elements ascending+    calcBody (backedge, blocks) =+        (toVertex $ snd backedge, sort . map toVertex $ (setElems blocks))++    vertexMapping = mapFromList $ zip revOrder [0..] :: LabelMap Int+    blockMapping = listArray (0,mapSize vertexMapping - 1) revOrder :: Array Int BlockId+    -- Map from blockId to indicies starting at zero+    toVertex :: BlockId -> Int+    toVertex   blockId  = expectJust "mkGlobalWeights" $ mapLookup blockId vertexMapping+    -- Map from indicies starting at zero to blockIds+    fromVertex :: Int -> BlockId+    fromVertex vertex   = blockMapping ! vertex++{- Note [Static Branch Prediction]+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++The work here has been based on the paper+"Static Branch Prediction and Program Profile Analysis" by Y Wu, JR Larus.++The primary differences are that if we branch on the result of a heap+check we do not apply any of the heuristics.+The reason is simple: They look like loops in the control flow graph+but are usually never entered, and if at most once.++Currently implemented is a heuristic to predict that we do not exit+loops (lehPredicts) and one to predict that backedges are more likely+than any other edge.++The back edge case is special as it superceeds any other heuristic if it+applies.++Do NOT rely solely on nofib results for benchmarking this. I recommend at least+comparing megaparsec and container benchmarks. Nofib does not seeem to have+many instances of "loopy" Cmm where these make a difference.++TODO:+* The paper containers more benchmarks which should be implemented.+* If we turn the likelyhood on if/else branches into a probability+  instead of true/false we could implement this as a Cmm pass.+  + The complete Cmm code still exists and can be accessed by the heuristics+  + There is no chance of register allocation/codegen inserting branches/blocks+  + making the TransitionSource info wrong.+  + potential to use this information in CmmPasses.+  - Requires refactoring of all the code relying on the binary nature of likelyhood.+  - Requires refactoring `loopInfo` to work on both, Cmm Graphs and the backend CFG.+-}++-- | Combination of target node id and information about the branch+--   we are looking at.+type TargetNodeInfo = (BlockId, EdgeInfo)+++-- | Update branch weights based on certain heuristics.+-- See Note [Static Branch Prediction]+-- TODO: This should be combined with optimizeCFG+{-# SCC staticBranchPrediction #-}+staticBranchPrediction :: BlockId -> LoopInfo -> CFG -> CFG+staticBranchPrediction _root (LoopInfo l_backEdges loopLevels l_loops) cfg =+    -- pprTrace "staticEstimatesOn" (ppr (cfg)) $+    foldl' update cfg nodes+  where+    nodes = getCfgNodes cfg+    backedges = S.fromList $ l_backEdges+    -- Loops keyed by their back edge+    loops = M.fromList $ l_loops :: M.Map Edge LabelSet+    loopHeads = S.fromList $ map snd $ M.keys loops++    update :: CFG -> BlockId -> CFG+    update cfg node+        -- No successors, nothing to do.+        | null successors = cfg++        -- Mix of backedges and others:+        -- Always predict the backedges.+        | not (null m) && length m < length successors+        -- Heap/Stack checks "loop", but only once.+        -- So we simply exclude any case involving them.+        , not $ any (isHeapOrStackCheck  . transitionSource . snd) successors+        = let   loopChance = repeat $! pred_LBH / (fromIntegral $ length m)+                exitChance = repeat $! (1 - pred_LBH) / fromIntegral (length not_m)+                updates = zip (map fst m) loopChance ++ zip (map fst not_m) exitChance+        in  -- pprTrace "mix" (ppr (node,successors)) $+            foldl' (\cfg (to,weight) -> setEdgeWeight cfg weight node to) cfg updates++        -- For (regular) non-binary branches we keep the weights from the STG -> Cmm translation.+        | length successors /= 2+        = cfg++        -- Only backedges - no need to adjust+        | length m > 0+        = cfg++        -- A regular binary branch, we can plug addition predictors in here.+        | [(s1,s1_info),(s2,s2_info)] <- successors+        , not $ any (isHeapOrStackCheck  . transitionSource . snd) successors+        = -- Normalize weights to total of 1+            let !w1 = max (edgeWeight s1_info) (0)+                !w2 = max (edgeWeight s2_info) (0)+                -- Of both weights are <= 0 we set both to 0.5+                normalizeWeight w = if w1 + w2 == 0 then 0.5 else w/(w1+w2)+                !cfg'  = setEdgeWeight cfg  (normalizeWeight w1) node s1+                !cfg'' = setEdgeWeight cfg' (normalizeWeight w2) node s2++                -- Figure out which heuristics apply to these successors+                heuristics = map ($ ((s1,s1_info),(s2,s2_info)))+                            [lehPredicts, phPredicts, ohPredicts, ghPredicts, lhhPredicts, chPredicts+                            , shPredicts, rhPredicts]+                -- Apply result of a heuristic. Argument is the likelyhood+                -- predicted for s1.+                applyHeuristic :: CFG -> Maybe Prob -> CFG+                applyHeuristic cfg Nothing = cfg+                applyHeuristic cfg (Just (s1_pred :: Double))+                  | s1_old == 0 || s2_old == 0 ||+                    isHeapOrStackCheck (transitionSource s1_info) ||+                    isHeapOrStackCheck (transitionSource s2_info)+                  = cfg+                  | otherwise =+                    let -- Predictions from heuristic+                        s1_prob = EdgeWeight s1_pred :: EdgeWeight+                        s2_prob = 1.0 - s1_prob+                        -- Update+                        d = (s1_old * s1_prob) + (s2_old * s2_prob) :: EdgeWeight+                        s1_prob' = s1_old * s1_prob / d+                        !s2_prob' = s2_old * s2_prob / d+                        !cfg_s1 = setEdgeWeight cfg    s1_prob' node s1+                    in  -- pprTrace "Applying heuristic!" (ppr (node,s1,s2) $$ ppr (s1_prob', s2_prob')) $+                        setEdgeWeight cfg_s1 s2_prob' node s2+                  where+                    -- Old weights+                    s1_old = getEdgeWeight cfg node s1+                    s2_old = getEdgeWeight cfg node s2++            in+            -- pprTraceIt "RegularCfgResult" $+            foldl' applyHeuristic cfg'' heuristics++        -- Branch on heap/stack check+        | otherwise = cfg++      where+        -- Chance that loops are taken.+        pred_LBH = 0.875+        -- successors+        successors = getSuccessorEdges cfg node+        -- backedges+        (m,not_m) = partition (\succ -> S.member (node, fst succ) backedges) successors++        -- Heuristics return nothing if they don't say anything about this branch+        -- or Just (prob_s1) where prob_s1 is the likelyhood for s1 to be the+        -- taken branch. s1 is the branch in the true case.++        -- Loop exit heuristic.+        -- We are unlikely to leave a loop unless it's to enter another one.+        pred_LEH = 0.75+        -- If and only if no successor is a loopheader,+        -- then we will likely not exit the current loop body.+        lehPredicts :: (TargetNodeInfo,TargetNodeInfo) -> Maybe Prob+        lehPredicts ((s1,_s1_info),(s2,_s2_info))+          | S.member s1 loopHeads || S.member s2 loopHeads+          = Nothing++          | otherwise+          = --pprTrace "lehPredict:" (ppr $ compare s1Level s2Level) $+            case compare s1Level s2Level of+                EQ -> Nothing+                LT -> Just (1-pred_LEH) --s1 exits to a shallower loop level (exits loop)+                GT -> Just (pred_LEH)   --s1 exits to a deeper loop level+            where+                s1Level = mapLookup s1 loopLevels+                s2Level = mapLookup s2 loopLevels++        -- Comparing to a constant is unlikely to be equal.+        ohPredicts (s1,_s2)+            | CmmSource { trans_cmmNode = src1 } <- getTransitionSource node (fst s1) cfg+            , CmmCondBranch cond ltrue _lfalse likely <- src1+            , likely == Nothing+            , CmmMachOp mop args <- cond+            , MO_Eq {} <- mop+            , not (null [x | x@CmmLit{} <- args])+            = if fst s1 == ltrue then Just 0.3 else Just 0.7++            | otherwise+            = Nothing++        -- TODO: These are all the other heuristics from the paper.+        -- Not all will apply, for now we just stub them out as Nothing.+        phPredicts = const Nothing+        ghPredicts = const Nothing+        lhhPredicts = const Nothing+        chPredicts = const Nothing+        shPredicts = const Nothing+        rhPredicts = const Nothing++-- We normalize all edge weights as probabilities between 0 and 1.+-- Ignoring rounding errors all outgoing edges sum up to 1.+cfgEdgeProbabilities :: CFG -> (BlockId -> Int) -> IM.IntMap (IM.IntMap Prob)+cfgEdgeProbabilities cfg toVertex+    = mapFoldlWithKey foldEdges IM.empty cfg+  where+    foldEdges = (\m from toMap -> IM.insert (toVertex from) (normalize toMap) m)++    normalize :: (LabelMap EdgeInfo) -> (IM.IntMap Prob)+    normalize weightMap+        | edgeCount <= 1 = mapFoldlWithKey (\m k _ -> IM.insert (toVertex k) 1.0 m) IM.empty weightMap+        | otherwise = mapFoldlWithKey (\m k _ -> IM.insert (toVertex k) (normalWeight k) m) IM.empty weightMap+      where+        edgeCount = mapSize weightMap+        -- Negative weights are generally allowed but are mapped to zero.+        -- We then check if there is at least one non-zero edge and if not+        -- assign uniform weights to all branches.+        minWeight = 0 :: Prob+        weightMap' = fmap (\w -> max (weightToDouble . edgeWeight $ w) minWeight) weightMap+        totalWeight = sum weightMap'++        normalWeight :: BlockId -> Prob+        normalWeight bid+         | totalWeight == 0+         = 1.0 / fromIntegral edgeCount+         | Just w <- mapLookup bid weightMap'+         = w/totalWeight+         | otherwise = panic "impossible"++-- This is the fixpoint algorithm from+--   "Static Branch Prediction and Program Profile Analysis" by Y Wu, JR Larus+-- The adaption to Haskell is my own.+calcFreqs :: IM.IntMap (IM.IntMap Prob) -> [(Int,Int)] -> [(Int, [Int])] -> [Int]+          -> (Array Int Double, IM.IntMap (IM.IntMap Prob))+calcFreqs graph backEdges loops revPostOrder = runST $ do+    visitedNodes <- newArray (0,nodeCount-1) False :: ST s (STUArray s Int Bool)+    blockFreqs <- newArray (0,nodeCount-1) 0.0 :: ST s (STUArray s Int Double)+    edgeProbs <- newSTRef graph+    edgeBackProbs <- newSTRef graph++    -- let traceArray a = do+    --       vs <- forM [0..nodeCount-1] $ \i -> readArray a i >>= (\v -> return (i,v))+          -- trace ("array: " ++ show vs) $ return ()++    let  -- See #1600, we need to inline or unboxing makes perf worse.+        -- {-# INLINE getFreq #-}+        {-# INLINE visited #-}+        visited b = unsafeRead visitedNodes b+        getFreq b = unsafeRead blockFreqs b+        -- setFreq :: forall s. Int -> Double -> ST s ()+        setFreq b f = unsafeWrite blockFreqs b f+        -- setVisited :: forall s. Node -> ST s ()+        setVisited b = unsafeWrite visitedNodes b True+        -- Frequency/probability that edge is taken.+        getProb' arr b1 b2 = readSTRef arr >>=+            (\graph ->+                return .+                        fromMaybe (error "getFreq 1") .+                        IM.lookup b2 .+                        fromMaybe (error "getFreq 2") $+                        (IM.lookup b1 graph)+            )+        setProb' arr b1 b2 prob = do+          g <- readSTRef arr+          let !m = fromMaybe (error "Foo") $ IM.lookup b1 g+              !m' = IM.insert b2 prob m+          writeSTRef arr $! (IM.insert b1 m' g)++        getEdgeFreq b1 b2 = getProb' edgeProbs b1 b2+        setEdgeFreq b1 b2 = setProb' edgeProbs b1 b2+        getProb b1 b2 = fromMaybe (error "getProb") $ do+            m' <- IM.lookup b1 graph+            IM.lookup b2 m'++        getBackProb b1 b2 = getProb' edgeBackProbs b1 b2+        setBackProb b1 b2 = setProb' edgeBackProbs b1 b2+++    let -- calcOutFreqs :: Node -> ST s ()+        calcOutFreqs bhead block = do+          !f <- getFreq block+          forM (successors block) $ \bi -> do+            let !prob = getProb block bi+            let !succFreq = f * prob+            setEdgeFreq block bi succFreq+            -- traceM $ "SetOut: " ++ show (block, bi, f, prob, succFreq)+            when (bi == bhead) $ setBackProb block bi succFreq+++    let propFreq block head = do+            -- traceM ("prop:" ++ show (block,head))+            -- traceShowM block++            !v <- visited block+            if v then+                return () --Dont look at nodes twice+            else if block == head then+                setFreq block 1.0 -- Loop header frequency is always 1+            else do+                let preds = IS.elems $ predecessors block+                irreducible <- (fmap or) $ forM preds $ \bp -> do+                    !bp_visited <- visited bp+                    let bp_backedge = isBackEdge bp block+                    return (not bp_visited && not bp_backedge)++                if irreducible+                then return () -- Rare we don't care+                else do+                    setFreq block 0+                    !cycleProb <- sum <$> (forM preds $ \pred -> do+                        if isBackEdge pred block+                            then+                                getBackProb pred block+                            else do+                                !f <- getFreq block+                                !prob <- getEdgeFreq pred block+                                setFreq block $! f + prob+                                return 0)+                    -- traceM $ "cycleProb:" ++ show cycleProb+                    let limit = 1 - 1/512 -- Paper uses 1 - epsilon, but this works.+                                          -- determines how large likelyhoods in loops can grow.+                    !cycleProb <- return $ min cycleProb limit -- <- return $ if cycleProb > limit then limit else cycleProb+                    -- traceM $ "cycleProb:" ++ show cycleProb++                    !f <- getFreq block+                    setFreq block (f / (1.0 - cycleProb))++            setVisited block+            calcOutFreqs head block++    -- Loops, by nesting, inner to outer+    forM_ loops $ \(head, body) -> do+        forM_ [0 .. nodeCount - 1] (\i -> unsafeWrite visitedNodes i True) -- Mark all nodes as visited.+        forM_ body (\i -> unsafeWrite visitedNodes i False) -- Mark all blocks reachable from head as not visited+        forM_ body $ \block -> propFreq block head++    -- After dealing with all loops, deal with non-looping parts of the CFG+    forM_ [0 .. nodeCount - 1] (\i -> unsafeWrite visitedNodes i False) -- Everything in revPostOrder is reachable+    forM_ revPostOrder $ \block -> propFreq block (head revPostOrder)++    -- trace ("Final freqs:") $ return ()+    -- let freqString = pprFreqs freqs+    -- trace (unlines freqString) $ return ()+    -- trace (pprFre) $ return ()+    graph' <- readSTRef edgeProbs+    freqs' <- unsafeFreeze  blockFreqs++    return (freqs', graph')+  where+    -- How can these lookups fail? Consider the CFG [A -> B]+    predecessors :: Int -> IS.IntSet+    predecessors b = fromMaybe IS.empty $ IM.lookup b revGraph+    successors :: Int -> [Int]+    successors b = fromMaybe (lookupError "succ" b graph)$ IM.keys <$> IM.lookup b graph+    lookupError s b g = pprPanic ("Lookup error " ++ s) $+                            ( text "node" <+> ppr b $$+                                text "graph" <+>+                                vcat (map (\(k,m) -> ppr (k,m :: IM.IntMap Double)) $ IM.toList g)+                            )++    nodeCount = IM.foldl' (\count toMap -> IM.foldlWithKey' countTargets count toMap) (IM.size graph) graph+      where+        countTargets = (\count k _ -> countNode k + count )+        countNode n = if IM.member n graph then 0 else 1++    isBackEdge from to = S.member (from,to) backEdgeSet+    backEdgeSet = S.fromList backEdges++    revGraph :: IntMap IntSet+    revGraph = IM.foldlWithKey' (\m from toMap -> addEdges m from toMap) IM.empty graph+        where+            addEdges m0 from toMap = IM.foldlWithKey' (\m k _ -> addEdge m from k) m0 toMap+            addEdge m0 from to = IM.insertWith IS.union to (IS.singleton from) m0
nativeGen/CPrim.hs view
@@ -8,6 +8,7 @@     , pdepLabel     , pextLabel     , bSwapLabel+    , bRevLabel     , clzLabel     , ctzLabel     , word2FloatLabel@@ -53,6 +54,15 @@     pprWidth W32 = "32"     pprWidth W64 = "64"     pprWidth w   = pprPanic "bSwapLabel: Unsupported word width " (ppr w)++bRevLabel :: Width -> String+bRevLabel w = "hs_bitrev" ++ pprWidth w+  where+    pprWidth W8  = "8"+    pprWidth W16 = "16"+    pprWidth W32 = "32"+    pprWidth W64 = "64"+    pprWidth w   = pprPanic "bRevLabel: Unsupported word width " (ppr w)  clzLabel :: Width -> String clzLabel w = "hs_clz" ++ pprWidth w
nativeGen/Dwarf.hs view
@@ -12,7 +12,7 @@ import DynFlags import Module import Outputable-import Platform+import GHC.Platform import Unique import UniqSupply @@ -116,7 +116,7 @@           , pprHalf 3                          -- DWARF version           , sectionOffset (ptext dwarfAbbrevLabel) (ptext dwarfAbbrevLabel)                                                -- abbrevs offset-          , text "\t.byte " <> ppr (platformWordSize plat) -- word size+          , text "\t.byte " <> ppr (platformWordSizeInBytes plat) -- word size           ]  -- | Compilation unit footer, mainly establishing size of debug sections
nativeGen/Dwarf/Constants.hs view
@@ -7,7 +7,7 @@  import AsmUtils import FastString-import Platform+import GHC.Platform import Outputable  import Reg
nativeGen/Dwarf/Types.hs view
@@ -30,7 +30,7 @@ import Encoding import FastString import Outputable-import Platform+import GHC.Platform import Unique import Reg import SrcLoc@@ -38,6 +38,7 @@  import Dwarf.Constants +import qualified Data.ByteString as BS import qualified Control.Monad.Trans.State.Strict as S import Control.Monad (zipWithM, join) import Data.Bits@@ -45,7 +46,7 @@ import Data.Word import Data.Char -import CodeGen.Platform+import GHC.Platform.Regs  -- | Individual dwarf records. Each one will be encoded as an entry in -- the @.debug_info@ section.@@ -223,7 +224,7 @@ -- address table entry. pprDwarfARanges :: [DwarfARange] -> Unique -> SDoc pprDwarfARanges arngs unitU = sdocWithPlatform $ \plat ->-  let wordSize = platformWordSize plat+  let wordSize = platformWordSizeInBytes plat       paddingSize = 4 :: Int       -- header is 12 bytes long.       -- entry is 8 bytes (32-bit platform) or 16 bytes (64-bit platform).@@ -293,7 +294,7 @@         length      = ppr cieEndLabel <> char '-' <> ppr cieStartLabel         spReg       = dwarfGlobalRegNo plat Sp         retReg      = dwarfReturnRegNo plat-        wordSize    = platformWordSize plat+        wordSize    = platformWordSizeInBytes plat         pprInit :: (GlobalReg, Maybe UnwindExpr) -> SDoc         pprInit (g, uw) = pprSetUnwind plat g (Nothing, uw) @@ -454,9 +455,9 @@ pprSetUnwind _    Sp (_, Just uw)   = pprByte dW_CFA_def_cfa_expression $$ pprUnwindExpr False uw pprSetUnwind plat g  (_, Just (UwDeref (UwReg Sp o)))-  | o < 0 && ((-o) `mod` platformWordSize plat) == 0 -- expected case+  | o < 0 && ((-o) `mod` platformWordSizeInBytes plat) == 0 -- expected case   = pprByte (dW_CFA_offset + dwarfGlobalRegNo plat g) $$-    pprLEBWord (fromIntegral ((-o) `div` platformWordSize plat))+    pprLEBWord (fromIntegral ((-o) `div` platformWordSizeInBytes plat))   | otherwise   = pprByte dW_CFA_offset_extended_sf $$     pprLEBRegNo plat g $$@@ -517,10 +518,9 @@ wordAlign = sdocWithPlatform $ \plat ->   text "\t.align " <> case platformOS plat of     OSDarwin -> case platformWordSize plat of-      8      -> text "3"-      4      -> text "2"-      _other -> error "wordAlign: Unsupported word size!"-    _other   -> ppr (platformWordSize plat)+      PW8 -> char '3'+      PW4 -> char '2'+    _other   -> ppr (platformWordSizeInBytes plat)  -- | Assembly for a single byte of constant DWARF data pprByte :: Word8 -> SDoc@@ -552,10 +552,8 @@ pprWord :: SDoc -> SDoc pprWord s = (<> s) . sdocWithPlatform $ \plat ->   case platformWordSize plat of-    4 -> text "\t.long "-    8 -> text "\t.quad "-    n -> panic $ "pprWord: Unsupported target platform word length " ++-                 show n ++ "!"+    PW4 -> text "\t.long "+    PW8 -> text "\t.quad "  -- | Prints a number in "little endian base 128" format. The idea is -- to optimize for small numbers by stopping once all further bytes@@ -584,7 +582,7 @@   = pprString' $ hcat $ map escapeChar $     if str `lengthIs` utf8EncodedLength str     then str-    else map (chr . fromIntegral) $ bytesFS $ mkFastString str+    else map (chr . fromIntegral) $ BS.unpack $ bytesFS $ mkFastString str  -- | Escape a single non-unicode character escapeChar :: Char -> SDoc
nativeGen/Format.hs view
@@ -47,7 +47,6 @@         | II64         | FF32         | FF64-        | FF80         deriving (Show, Eq)  @@ -70,7 +69,7 @@  = case width of         W32     -> FF32         W64     -> FF64-        W80     -> FF80+         other   -> pprPanic "Format.floatFormat" (ppr other)  @@ -80,7 +79,6 @@  = case format of         FF32    -> True         FF64    -> True-        FF80    -> True         _       -> False  @@ -101,7 +99,7 @@         II64            -> W64         FF32            -> W32         FF64            -> W64-        FF80            -> W80+  formatInBytes :: Format -> Int formatInBytes = widthInBytes . formatToWidth
nativeGen/Instruction.hs view
@@ -23,7 +23,7 @@ import Hoopl.Label import DynFlags import Cmm hiding (topInfoTable)-import Platform+import GHC.Platform  -- | Holds a list of source and destination registers used by a --      particular instruction.
− nativeGen/NCG.h
@@ -1,11 +0,0 @@-/* -------------------------------------------------------------------------------   (c) The University of Glasgow, 1994-2004--   Native-code generator header file - just useful macros for now.--   -------------------------------------------------------------------------- */--#pragma once--#include "ghc_boot_platform.h"
nativeGen/NCGMonad.hs view
@@ -20,7 +20,7 @@         addNodeBetweenNat,         addImmediateSuccessorNat,         updateCfgNat,-        getUniqueNat, getCfgNat,+        getUniqueNat,         mapAccumLNat,         setDeltaNat,         getDeltaNat,@@ -61,13 +61,12 @@ import DynFlags import Module -import Control.Monad    ( liftM, ap )+import Control.Monad    ( ap )  import Instruction import Outputable (SDoc, pprPanic, ppr) import Cmm (RawCmmDecl, CmmStatics) import CFG-import Util  data NcgImpl statics instr jumpDest = NcgImpl {     cmmTopCodeGen             :: RawCmmDecl -> NatM [NatCmmDecl statics instr],@@ -79,7 +78,6 @@     pprNatCmmDecl             :: NatCmmDecl statics instr -> SDoc,     maxSpillSlots             :: Int,     allocatableRegs           :: [RealReg],-    ncg_x86fp_kludge          :: [NatCmmDecl statics instr] -> [NatCmmDecl statics instr],     ncgExpandTop              :: [NatCmmDecl statics instr] -> [NatCmmDecl statics instr],     ncgAllocMoreStack         :: Int -> NatCmmDecl statics instr                               -> UniqSM (NatCmmDecl statics instr, [(BlockId,BlockId)]),@@ -117,6 +115,7 @@ type DwarfFiles = UniqFM (FastString, Int)  newtype NatM result = NatM (NatM_State -> (result, NatM_State))+    deriving (Functor)  unNat :: NatM a -> NatM_State -> (a, NatM_State) unNat (NatM a) = a@@ -142,9 +141,6 @@ initNat init_st m         = case unNat m init_st of { (r,st) -> (r,st) } -instance Functor NatM where-      fmap = liftM- instance Applicative NatM where       pure = returnNat       (<*>) = ap@@ -212,9 +208,6 @@         = NatM $ \ st -> let !cfg' = f (natm_cfg st)                          in ((), st { natm_cfg = cfg'}) -getCfgNat :: NatM CFG-getCfgNat = NatM $ \ st -> (natm_cfg st, st)- -- | Record that we added a block between `from` and `old`. addNodeBetweenNat :: BlockId -> BlockId -> BlockId -> NatM () addNodeBetweenNat from between to@@ -238,7 +231,7 @@  -- | Place `succ` after `block` and change any edges --   block -> X to `succ` -> X-addImmediateSuccessorNat :: HasDebugCallStack => BlockId -> BlockId -> NatM ()+addImmediateSuccessorNat :: BlockId -> BlockId -> NatM () addImmediateSuccessorNat block succ         = updateCfgNat (addImmediateSuccessor block succ) 
nativeGen/PIC.hs view
@@ -54,7 +54,7 @@  import qualified X86.Instr      as X86 -import Platform+import GHC.Platform import Instruction import Reg import NCGMonad@@ -563,23 +563,21 @@ -- For each processor architecture, there are two versions, one for PIC -- and one for non-PIC. ----- Whenever you change something in this assembler output, make sure--- the splitter in driver/split/ghc-split.pl recognizes the new output  pprImportedSymbol :: DynFlags -> Platform -> CLabel -> SDoc-pprImportedSymbol dflags platform@(Platform { platformArch = ArchX86, platformOS = OSDarwin }) importedLbl+pprImportedSymbol dflags (Platform { platformMini = PlatformMini { platformMini_arch = ArchX86, platformMini_os = OSDarwin } }) importedLbl         | Just (CodeStub, lbl) <- dynamicLinkerLabelInfo importedLbl         = case positionIndependent dflags of            False ->             vcat [                 text ".symbol_stub",-                text "L" <> pprCLabel platform lbl <> ptext (sLit "$stub:"),-                    text "\t.indirect_symbol" <+> pprCLabel platform lbl,-                    text "\tjmp *L" <> pprCLabel platform lbl+                text "L" <> pprCLabel dflags lbl <> ptext (sLit "$stub:"),+                    text "\t.indirect_symbol" <+> pprCLabel dflags lbl,+                    text "\tjmp *L" <> pprCLabel dflags lbl                         <> text "$lazy_ptr",-                text "L" <> pprCLabel platform lbl+                text "L" <> pprCLabel dflags lbl                     <> text "$stub_binder:",-                    text "\tpushl $L" <> pprCLabel platform lbl+                    text "\tpushl $L" <> pprCLabel dflags lbl                         <> text "$lazy_ptr",                     text "\tjmp dyld_stub_binding_helper"             ]@@ -587,16 +585,16 @@             vcat [                 text ".section __TEXT,__picsymbolstub2,"                     <> text "symbol_stubs,pure_instructions,25",-                text "L" <> pprCLabel platform lbl <> ptext (sLit "$stub:"),-                    text "\t.indirect_symbol" <+> pprCLabel platform lbl,+                text "L" <> pprCLabel dflags lbl <> ptext (sLit "$stub:"),+                    text "\t.indirect_symbol" <+> pprCLabel dflags lbl,                     text "\tcall ___i686.get_pc_thunk.ax",                 text "1:",-                    text "\tmovl L" <> pprCLabel platform lbl+                    text "\tmovl L" <> pprCLabel dflags lbl                         <> text "$lazy_ptr-1b(%eax),%edx",                     text "\tjmp *%edx",-                text "L" <> pprCLabel platform lbl+                text "L" <> pprCLabel dflags lbl                     <> text "$stub_binder:",-                    text "\tlea L" <> pprCLabel platform lbl+                    text "\tlea L" <> pprCLabel dflags lbl                         <> text "$lazy_ptr-1b(%eax),%eax",                     text "\tpushl %eax",                     text "\tjmp dyld_stub_binding_helper"@@ -604,23 +602,23 @@           $+$ vcat [        text ".section __DATA, __la_sym_ptr"                     <> (if positionIndependent dflags then int 2 else int 3)                     <> text ",lazy_symbol_pointers",-                text "L" <> pprCLabel platform lbl <> ptext (sLit "$lazy_ptr:"),-                    text "\t.indirect_symbol" <+> pprCLabel platform lbl,-                    text "\t.long L" <> pprCLabel platform lbl+                text "L" <> pprCLabel dflags lbl <> ptext (sLit "$lazy_ptr:"),+                    text "\t.indirect_symbol" <+> pprCLabel dflags lbl,+                    text "\t.long L" <> pprCLabel dflags lbl                     <> text "$stub_binder"]          | Just (SymbolPtr, lbl) <- dynamicLinkerLabelInfo importedLbl         = vcat [                 text ".non_lazy_symbol_pointer",-                char 'L' <> pprCLabel platform lbl <> text "$non_lazy_ptr:",-                text "\t.indirect_symbol" <+> pprCLabel platform lbl,+                char 'L' <> pprCLabel dflags lbl <> text "$non_lazy_ptr:",+                text "\t.indirect_symbol" <+> pprCLabel dflags lbl,                 text "\t.long\t0"]          | otherwise         = empty  -pprImportedSymbol _ (Platform { platformOS = OSDarwin }) _+pprImportedSymbol _ (Platform { platformMini = PlatformMini { platformMini_os = OSDarwin } }) _         = empty  -- XCOFF / AIX@@ -634,12 +632,12 @@ -- -- NB: No DSO-support yet -pprImportedSymbol _ platform@(Platform { platformOS = OSAIX }) importedLbl+pprImportedSymbol dflags (Platform { platformMini = PlatformMini { platformMini_os = OSAIX } }) importedLbl         = case dynamicLinkerLabelInfo importedLbl of             Just (SymbolPtr, lbl)               -> vcat [-                   text "LC.." <> pprCLabel platform lbl <> char ':',-                   text "\t.long" <+> pprCLabel platform lbl ]+                   text "LC.." <> pprCLabel dflags lbl <> char ':',+                   text "\t.long" <+> pprCLabel dflags lbl ]             _ -> empty  -- ELF / Linux@@ -671,15 +669,15 @@ -- the NCG will keep track of all DynamicLinkerLabels it uses -- and output each of them using pprImportedSymbol. -pprImportedSymbol _ platform@(Platform { platformArch = ArchPPC_64 _ })+pprImportedSymbol dflags platform@(Platform { platformMini = PlatformMini { platformMini_arch = ArchPPC_64 _ } })                   importedLbl         | osElfTarget (platformOS platform)         = case dynamicLinkerLabelInfo importedLbl of             Just (SymbolPtr, lbl)               -> vcat [                    text ".section \".toc\", \"aw\"",-                   text ".LC_" <> pprCLabel platform lbl <> char ':',-                   text "\t.quad" <+> pprCLabel platform lbl ]+                   text ".LC_" <> pprCLabel dflags lbl <> char ':',+                   text "\t.quad" <+> pprCLabel dflags lbl ]             _ -> empty  pprImportedSymbol dflags platform importedLbl@@ -693,8 +691,8 @@                   in vcat [                       text ".section \".got2\", \"aw\"",-                      text ".LC_" <> pprCLabel platform lbl <> char ':',-                      ptext symbolSize <+> pprCLabel platform lbl ]+                      text ".LC_" <> pprCLabel dflags lbl <> char ':',+                      ptext symbolSize <+> pprCLabel dflags lbl ]              -- PLT code stubs are generated automatically by the dynamic linker.             _ -> empty
nativeGen/PPC/CodeGen.hs view
@@ -21,13 +21,11 @@ where  #include "HsVersions.h"-#include "nativeGen/NCG.h"-#include "MachDeps.h"  -- NCG stuff: import GhcPrelude -import CodeGen.Platform+import GHC.Platform.Regs import PPC.Instr import PPC.Cond import PPC.Regs@@ -41,7 +39,7 @@ import RegClass import Reg import TargetReg-import Platform+import GHC.Platform  -- Our intermediate code: import BlockId@@ -180,10 +178,16 @@       return (b1 `appOL` b2)     CmmSwitch arg ids -> do dflags <- getDynFlags                             genSwitch dflags arg ids-    CmmCall { cml_target = arg } -> genJump arg+    CmmCall { cml_target = arg+            , cml_args_regs = gregs } -> do+                                dflags <- getDynFlags+                                genJump arg (jumpRegs dflags gregs)     _ ->       panic "stmtToInstrs: statement should have been cps'd away" +jumpRegs :: DynFlags -> [GlobalReg] -> [Reg]+jumpRegs dflags gregs = [ RegReal r | Just r <- map (globalRegMaybe platform) gregs ]+    where platform = targetPlatform dflags  -------------------------------------------------------------------------------- -- | 'InstrBlock's are the insn sequences generated by the insn selectors.@@ -1043,19 +1047,19 @@   -genJump :: CmmExpr{-the branch target-} -> NatM InstrBlock+genJump :: CmmExpr{-the branch target-} -> [Reg] -> NatM InstrBlock -genJump (CmmLit (CmmLabel lbl))-  = return (unitOL $ JMP lbl)+genJump (CmmLit (CmmLabel lbl)) regs+  = return (unitOL $ JMP lbl regs) -genJump tree+genJump tree gregs   = do         dflags <- getDynFlags-        genJump' tree (platformToGCP (targetPlatform dflags))+        genJump' tree (platformToGCP (targetPlatform dflags)) gregs -genJump' :: CmmExpr -> GenCCallPlatform -> NatM InstrBlock+genJump' :: CmmExpr -> GenCCallPlatform -> [Reg] -> NatM InstrBlock -genJump' tree (GCP64ELF 1)+genJump' tree (GCP64ELF 1) regs   = do         (target,code) <- getSomeReg tree         return (code@@ -1063,20 +1067,20 @@                `snocOL` LD II64 toc (AddrRegImm target (ImmInt 8))                `snocOL` MTCTR r11                `snocOL` LD II64 r11 (AddrRegImm target (ImmInt 16))-               `snocOL` BCTR [] Nothing)+               `snocOL` BCTR [] Nothing regs) -genJump' tree (GCP64ELF 2)+genJump' tree (GCP64ELF 2) regs   = do         (target,code) <- getSomeReg tree         return (code                `snocOL` MR r12 target                `snocOL` MTCTR r12-               `snocOL` BCTR [] Nothing)+               `snocOL` BCTR [] Nothing regs) -genJump' tree _+genJump' tree _ regs   = do         (target,code) <- getSomeReg tree-        return (code `snocOL` MTCTR target `snocOL` BCTR [] Nothing)+        return (code `snocOL` MTCTR target `snocOL` BCTR [] Nothing regs)  -- ----------------------------------------------------------------------------- --  Unconditional branches@@ -1590,7 +1594,7 @@     -> [CmmActual]        -- arguments (of mixed type)     -> NatM InstrBlock -{- +{-     PowerPC Linux uses the System V Release 4 Calling Convention     for PowerPC. It is described in the     "System V Application Binary Interface PowerPC Processor Supplement".@@ -1903,7 +1907,7 @@                           FF32 -> (1, 1, 4, fprs)                           FF64 -> (2, 1, 8, fprs)                           II64 -> panic "genCCall' passArguments II64"-                          FF80 -> panic "genCCall' passArguments FF80"+                       GCP32ELF ->                           case cmmTypeFormat rep of                           II8  -> (1, 0, 4, gprs)@@ -1913,7 +1917,6 @@                           FF32 -> (0, 1, 4, fprs)                           FF64 -> (0, 1, 8, fprs)                           II64 -> panic "genCCall' passArguments II64"-                          FF80 -> panic "genCCall' passArguments FF80"                       GCP64ELF _ ->                           case cmmTypeFormat rep of                           II8  -> (1, 0, 8, gprs)@@ -1925,7 +1928,6 @@                           -- the FPRs.                           FF32 -> (1, 1, 8, fprs)                           FF64 -> (1, 1, 8, fprs)-                          FF80 -> panic "genCCall' passArguments FF80"          moveResult reduceToFF32 =             case dest_regs of@@ -1953,7 +1955,9 @@             where                 (functionName, reduce) = case mop of                     MO_F32_Exp   -> (fsLit "exp", True)+                    MO_F32_ExpM1 -> (fsLit "expm1", True)                     MO_F32_Log   -> (fsLit "log", True)+                    MO_F32_Log1P -> (fsLit "log1p", True)                     MO_F32_Sqrt  -> (fsLit "sqrt", True)                     MO_F32_Fabs  -> unsupported @@ -1975,7 +1979,9 @@                     MO_F32_Atanh -> (fsLit "atanh", True)                      MO_F64_Exp   -> (fsLit "exp", False)+                    MO_F64_ExpM1 -> (fsLit "expm1", False)                     MO_F64_Log   -> (fsLit "log", False)+                    MO_F64_Log1P -> (fsLit "log1p", False)                     MO_F64_Sqrt  -> (fsLit "sqrt", False)                     MO_F64_Fabs  -> unsupported @@ -2004,6 +2010,7 @@                     MO_Memcmp _  -> (fsLit "memcmp", False)                      MO_BSwap w   -> (fsLit $ bSwapLabel w, False)+                    MO_BRev w    -> (fsLit $ bRevLabel w, False)                     MO_PopCnt w  -> (fsLit $ popCntLabel w, False)                     MO_Pdep w    -> (fsLit $ pdepLabel w, False)                     MO_Pext w    -> (fsLit $ pextLabel w, False)@@ -2048,7 +2055,7 @@                             SL fmt tmp reg (RIImm (ImmInt sha)),                             LD fmt tmp (AddrRegReg tableReg tmp),                             MTCTR tmp,-                            BCTR ids (Just lbl)+                            BCTR ids (Just lbl) []                     ]         return code @@ -2066,7 +2073,7 @@                             LD fmt tmp (AddrRegReg tableReg tmp),                             ADD tmp tmp (RIReg tableReg),                             MTCTR tmp,-                            BCTR ids (Just lbl)+                            BCTR ids (Just lbl) []                     ]         return code   | otherwise@@ -2081,14 +2088,14 @@                             ADDIS tmp tmp (HA (ImmCLbl lbl)),                             LD fmt tmp (AddrRegImm tmp (LO (ImmCLbl lbl))),                             MTCTR tmp,-                            BCTR ids (Just lbl)+                            BCTR ids (Just lbl) []                     ]         return code   where (offset, ids) = switchTargetsToTable targets  generateJumpTableForInstr :: DynFlags -> Instr                           -> Maybe (NatCmmDecl CmmStatics Instr)-generateJumpTableForInstr dflags (BCTR ids (Just lbl)) =+generateJumpTableForInstr dflags (BCTR ids (Just lbl) _) =     let jumpTable             | (positionIndependent dflags)               || (not $ target32Bit $ targetPlatform dflags)
nativeGen/PPC/Instr.hs view
@@ -9,7 +9,6 @@ -----------------------------------------------------------------------------  #include "HsVersions.h"-#include "nativeGen/NCG.h"  module PPC.Instr (     archWordFormat,@@ -33,7 +32,7 @@ import RegClass import Reg -import CodeGen.Platform+import GHC.Platform.Regs import BlockId import Hoopl.Collections import Hoopl.Label@@ -43,7 +42,7 @@ import FastString import CLabel import Outputable-import Platform+import GHC.Platform import UniqFM (listToUFM, lookupUFM) import UniqSupply @@ -98,7 +97,7 @@     , STU fmt r0 (AddrRegReg sp tmp)     ]   where-    fmt = intFormat $ widthFromBytes (platformWordSize platform)+    fmt = intFormat $ widthFromBytes (platformWordSizeInBytes platform)     zero = ImmInt 0     tmp = tmpReg platform     immAmount = ImmInt amount@@ -151,12 +150,12 @@             -- "labeled-goto" we use JMP, and for "computed-goto" we             -- use MTCTR followed by BCTR. See 'PPC.CodeGen.genJump'.             = case insn of-                JMP _           -> dealloc ++ (insn : r)-                BCTR [] Nothing -> dealloc ++ (insn : r)-                BCTR ids label  -> BCTR (map (fmap retarget) ids) label : r-                BCCFAR cond b p -> BCCFAR cond (retarget b) p : r-                BCC    cond b p -> BCC    cond (retarget b) p : r-                _               -> insn : r+                JMP _ _           -> dealloc ++ (insn : r)+                BCTR [] Nothing _ -> dealloc ++ (insn : r)+                BCTR ids label rs -> BCTR (map (fmap retarget) ids) label rs : r+                BCCFAR cond b p   -> BCCFAR cond (retarget b) p : r+                BCC    cond b p   -> BCC    cond (retarget b) p : r+                _                 -> insn : r             -- BL and BCTRL are call-like instructions rather than             -- jumps, and are used only for C calls. @@ -223,10 +222,13 @@                                     --    Just True:  branch likely taken                                     --    Just False: branch likely not taken                                     --    Nothing:    no hint-    | JMP     CLabel                -- same as branch,+    | JMP     CLabel [Reg]          -- same as branch,                                     -- but with CLabel instead of block ID+                                    -- and live global registers     | MTCTR   Reg-    | BCTR    [Maybe BlockId] (Maybe CLabel) -- with list of local destinations, and jump table location if necessary+    | BCTR    [Maybe BlockId] (Maybe CLabel) [Reg]+                                    -- with list of local destinations, and+                                    -- jump table location if necessary     | BL      CLabel [Reg]          -- with list of argument regs     | BCTRL   [Reg] @@ -324,8 +326,9 @@     CMPL    _ reg ri         -> usage (reg : regRI ri,[])     BCC     _ _ _            -> noUsage     BCCFAR  _ _ _            -> noUsage+    JMP     _ regs           -> usage (regs, [])     MTCTR   reg              -> usage ([reg],[])-    BCTR    _ _              -> noUsage+    BCTR    _ _ regs         -> usage (regs, [])     BL      _ params         -> usage (params, callClobberedRegs platform)     BCTRL   params           -> usage (params, callClobberedRegs platform) @@ -416,8 +419,9 @@     CMPL    fmt reg ri      -> CMPL fmt (env reg) (fixRI ri)     BCC     cond lbl p      -> BCC cond lbl p     BCCFAR  cond lbl p      -> BCCFAR cond lbl p+    JMP     l regs          -> JMP l regs -- global regs will not be remapped     MTCTR   reg             -> MTCTR (env reg)-    BCTR    targets lbl     -> BCTR targets lbl+    BCTR    targets lbl rs  -> BCTR targets lbl rs     BL      imm argRegs     -> BL imm argRegs    -- argument regs     BCTRL   argRegs         -> BCTRL argRegs     -- cannot be remapped     ADD     reg1 reg2 ri    -> ADD (env reg1) (env reg2) (fixRI ri)@@ -506,10 +510,10 @@ ppc_jumpDestsOfInstr :: Instr -> [BlockId] ppc_jumpDestsOfInstr insn   = case insn of-        BCC _ id _      -> [id]-        BCCFAR _ id _   -> [id]-        BCTR targets _  -> [id | Just id <- targets]-        _               -> []+        BCC _ id _       -> [id]+        BCCFAR _ id _    -> [id]+        BCTR targets _ _ -> [id | Just id <- targets]+        _                -> []   -- | Change the destination of this jump instruction.@@ -520,7 +524,7 @@   = case insn of         BCC cc id p     -> BCC cc (patchF id) p         BCCFAR cc id p  -> BCCFAR cc (patchF id) p-        BCTR ids lbl    -> BCTR (map (fmap patchF) ids) lbl+        BCTR ids lbl rs -> BCTR (map (fmap patchF) ids) lbl rs         _               -> insn  
nativeGen/PPC/Ppr.hs view
@@ -27,9 +27,10 @@  import BlockId import CLabel+import PprCmmExpr () -- For Outputable instances  import Unique                ( pprUniqueAlways, getUnique )-import Platform+import GHC.Platform import FastString import Outputable import DynFlags@@ -49,17 +50,14 @@   case topInfoTable proc of     Nothing ->        sdocWithPlatform $ \platform ->-       case blocks of-         []     -> -- special case for split markers:-           pprLabel lbl-         blocks -> -- special case for code without info table:-           pprSectionAlign (Section Text lbl) $$-           (case platformArch platform of-              ArchPPC_64 ELF_V1 -> pprFunctionDescriptor lbl-              ArchPPC_64 ELF_V2 -> pprFunctionPrologue lbl-              _ -> pprLabel lbl) $$ -- blocks guaranteed not null,+         -- special case for code without info table:+         pprSectionAlign (Section Text lbl) $$+         (case platformArch platform of+            ArchPPC_64 ELF_V1 -> pprFunctionDescriptor lbl+            ArchPPC_64 ELF_V2 -> pprFunctionPrologue lbl+            _ -> pprLabel lbl) $$ -- blocks guaranteed not null,                                      -- so label needed-           vcat (map (pprBasicBlock top_info) blocks)+         vcat (map (pprBasicBlock top_info) blocks)      Just (Statics info_lbl _) ->       sdocWithPlatform $ \platform ->@@ -122,11 +120,20 @@   pprDatas :: CmmStatics -> SDoc+-- See note [emit-time elimination of static indirections] in CLabel.+pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])+  | lbl == mkIndStaticInfoLabel+  , let labelInd (CmmLabelOff l _) = Just l+        labelInd (CmmLabel l) = Just l+        labelInd _ = Nothing+  , Just ind' <- labelInd ind+  , alias `mayRedirectTo` ind'+  = pprGloblDecl alias+    $$ text ".equiv" <+> ppr alias <> comma <> ppr (CmmLabel ind') pprDatas (Statics lbl dats) = vcat (pprLabel lbl : map pprData dats)  pprData :: CmmStatic -> SDoc-pprData (CmmString str)-  = text "\t.string" <+> doubleQuotes (pprASCII str)+pprData (CmmString str)          = pprBytes str pprData (CmmUninitialised bytes) = text ".space " <> int bytes pprData (CmmStaticLit lit)       = pprDataItem lit @@ -165,7 +172,7 @@       RegVirtual (VirtualRegHi u)  -> text "%vHi_"  <> pprUniqueAlways u       RegVirtual (VirtualRegF  u)  -> text "%vF_"   <> pprUniqueAlways u       RegVirtual (VirtualRegD  u)  -> text "%vD_"   <> pprUniqueAlways u-      RegVirtual (VirtualRegSSE u) -> text "%vSSE_" <> pprUniqueAlways u+   where     ppr_reg_no :: Int -> SDoc     ppr_reg_no i@@ -183,8 +190,7 @@                 II32 -> sLit "w"                 II64 -> sLit "d"                 FF32 -> sLit "fs"-                FF64 -> sLit "fd"-                _    -> panic "PPC.Ppr.pprFormat: no match")+                FF64 -> sLit "fd")   pprCond :: Cond -> SDoc@@ -369,7 +375,6 @@             II64 -> sLit "d"             FF32 -> sLit "fs"             FF64 -> sLit "fd"-            _         -> panic "PPC.Ppr.pprInstr: no match"             ),         case addr of AddrRegImm _ _ -> empty                      AddrRegReg _ _ -> char 'x',@@ -409,7 +414,6 @@             II64 -> sLit "d"             FF32 -> sLit "fs"             FF64 -> sLit "fd"-            _         -> panic "PPC.Ppr.pprInstr: no match"             ),         case addr of AddrRegImm _ _ -> empty                      AddrRegReg _ _ -> char 'x',@@ -552,7 +556,7 @@             Just True  -> char '-'             Just False -> char '+' -pprInstr (JMP lbl)+pprInstr (JMP lbl _)   -- We never jump to ForeignLabels; if we ever do, c.f. handling for "BL"   | isForeignLabel lbl = panic "PPC.Ppr.pprInstr: JMP to ForeignLabel"   | otherwise =@@ -569,7 +573,7 @@         char '\t',         pprReg reg     ]-pprInstr (BCTR _ _) = hcat [+pprInstr (BCTR _ _ _) = hcat [         char '\t',         text "bctr"     ]@@ -758,12 +762,12 @@     -- Handle the case where we are asked to shift a 32 bit register by     -- less than zero or more than 31 bits. We convert this into a clear     -- of the destination register.-    -- Fixes ticket http://ghc.haskell.org/trac/ghc/ticket/5900+    -- Fixes ticket https://gitlab.haskell.org/ghc/ghc/issues/5900     pprInstr (XOR reg1 reg2 (RIReg reg2))  pprInstr (SL II32 reg1 reg2 (RIImm (ImmInt i))) | i < 0  || i > 31 =     -- As above for SR, but for left shifts.-    -- Fixes ticket http://ghc.haskell.org/trac/ghc/ticket/10870+    -- Fixes ticket https://gitlab.haskell.org/ghc/ghc/issues/10870     pprInstr (XOR reg1 reg2 (RIReg reg2))  pprInstr (SRA II32 reg1 reg2 (RIImm (ImmInt i))) | i > 31 =
nativeGen/PPC/RegInfo.hs view
@@ -17,7 +17,6 @@  where -#include "nativeGen/NCG.h" #include "HsVersions.h"  import GhcPrelude
nativeGen/PPC/Regs.hs view
@@ -37,9 +37,9 @@         fits16Bits,         makeImmediate,         fReg,-        r0, sp, toc, r3, r4, r11, r12, r27, r28, r30,+        r0, sp, toc, r3, r4, r11, r12, r30,         tmpReg,-        f1, f20, f21,+        f1,          allocatableRegs @@ -47,7 +47,6 @@  where -#include "nativeGen/NCG.h" #include "HsVersions.h"  import GhcPrelude@@ -60,10 +59,10 @@ import CLabel           ( CLabel ) import Unique -import CodeGen.Platform+import GHC.Platform.Regs import DynFlags import Outputable-import Platform+import GHC.Platform  import Data.Word        ( Word8, Word16, Word32, Word64 ) import Data.Int         ( Int8, Int16, Int32, Int64 )@@ -131,9 +130,9 @@         RcInteger       -> text "blue"         RcFloat         -> text "red"         RcDouble        -> text "green"-        RcDoubleSSE     -> text "yellow"  + -- immediates ------------------------------------------------------------------ data Imm         = ImmInt        Int@@ -306,7 +305,7 @@ fReg :: Int -> RegNo fReg x = (32 + x) -r0, sp, toc, r3, r4, r11, r12, r27, r28, r30, f1, f20, f21 :: Reg+r0, sp, toc, r3, r4, r11, r12, r30, f1 :: Reg r0      = regSingle 0 sp      = regSingle 1 toc     = regSingle 2@@ -314,12 +313,8 @@ r4      = regSingle 4 r11     = regSingle 11 r12     = regSingle 12-r27     = regSingle 27-r28     = regSingle 28 r30     = regSingle 30 f1      = regSingle $ fReg 1-f20     = regSingle $ fReg 20-f21     = regSingle $ fReg 21  -- allocatableRegs is allMachRegNos with the fixed-use regs removed. -- i.e., these are the regs for which we are prepared to allow the@@ -335,4 +330,4 @@        case platformArch platform of        ArchPPC      -> regSingle 13        ArchPPC_64 _ -> regSingle 30-       _            -> panic "PPC.Regs.tmpReg: unknowm arch"+       _            -> panic "PPC.Regs.tmpReg: unknown arch"
nativeGen/PprBase.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE MagicHash #-}+ ----------------------------------------------------------------------------- -- -- Pretty-printing assembly language@@ -12,6 +14,7 @@         floatToBytes,         doubleToBytes,         pprASCII,+        pprBytes,         pprSectionHeader ) @@ -25,7 +28,8 @@ import DynFlags import FastString import Outputable-import Platform+import GHC.Platform+import FileCleanup  import qualified Data.Array.Unsafe as U ( castSTUArray ) import Data.Array.ST@@ -33,7 +37,12 @@ import Control.Monad.ST  import Data.Word-import Data.Char+import Data.Bits+import Data.ByteString (ByteString)+import qualified Data.ByteString as BS+import GHC.Exts+import GHC.Word+import System.IO.Unsafe   @@ -90,29 +99,83 @@ -- Print as a string and escape non-printable characters. -- This is similar to charToC in Utils. -pprASCII :: [Word8] -> SDoc+pprASCII :: ByteString -> SDoc pprASCII str   -- Transform this given literal bytestring to escaped string and construct   -- the literal SDoc directly.-  -- See Trac #14741+  -- See #14741   -- and Note [Pretty print ASCII when AsmCodeGen]-  = text $ foldr (\w s -> (do1 . fromIntegral) w ++ s) "" str+  = text $ BS.foldr (\w s -> do1 w ++ s) "" str     where-       do1 :: Int -> String-       do1 w | '\t' <- chr w = "\\t"-             | '\n' <- chr w = "\\n"-             | '"'  <- chr w = "\\\""-             | '\\' <- chr w = "\\\\"-             | isPrint (chr w) = [chr w]+       do1 :: Word8 -> String+       do1 w | 0x09 == w = "\\t"+             | 0x0A == w = "\\n"+             | 0x22 == w = "\\\""+             | 0x5C == w = "\\\\"+               -- ASCII printable characters range+             | w >= 0x20 && w <= 0x7E = [chr' w]              | otherwise = '\\' : octal w -       octal :: Int -> String-       octal w = [ chr (ord '0' + (w `div` 64) `mod` 8)-                 , chr (ord '0' + (w `div` 8) `mod` 8)-                 , chr (ord '0' + w `mod` 8)+       -- we know that the Chars we create are in the ASCII range+       -- so we bypass the check in "chr"+       chr' :: Word8 -> Char+       chr' (W8# w#) = C# (chr# (word2Int# w#))++       octal :: Word8 -> String+       octal w = [ chr' (ord0 + (w `unsafeShiftR` 6) .&. 0x07)+                 , chr' (ord0 + (w `unsafeShiftR` 3) .&. 0x07)+                 , chr' (ord0 + w .&. 0x07)                  ]+       ord0 = 0x30 -- = ord '0' +-- | Pretty print binary data.+--+-- Use either the ".string" directive or a ".incbin" directive.+-- See Note [Embedding large binary blobs]+--+-- A NULL byte is added after the binary data.+--+pprBytes :: ByteString -> SDoc+pprBytes bs = sdocWithDynFlags $ \dflags ->+  if binBlobThreshold dflags == 0+     || fromIntegral (BS.length bs) <= binBlobThreshold dflags+    then text "\t.string " <> doubleQuotes (pprASCII bs)+    else unsafePerformIO $ do+      bFile <- newTempName dflags TFL_CurrentModule ".dat"+      BS.writeFile bFile bs+      return $ text "\t.incbin "+         <> pprFilePathString bFile -- proper escape (see #16389)+         <> text "\n\t.byte 0"+ {-+Note [Embedding large binary blobs]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++To embed a blob of binary data (e.g. an UTF-8 encoded string) into the generated+code object, we have several options:++   1. Generate a ".byte" directive for each byte. This is what was done in the past+      (see Note [Pretty print ASCII when AsmCodeGen]).++   2. Generate a single ".string"/".asciz" directive for the whole sequence of+      bytes. Bytes in the ASCII printable range are rendered as characters and+      other values are escaped (e.g., "\t", "\077", etc.).++   3. Create a temporary file into which we dump the binary data and generate a+      single ".incbin" directive. The assembler will include the binary file for+      us in the generated output object.++Now the code generator uses either (2) or (3), depending on the binary blob+size.  Using (3) for small blobs adds too much overhead (see benchmark results+in #16190), so we only do it when the size is above a threshold (500K at the+time of writing).++The threshold is configurable via the `-fbinary-blob-threshold` flag.++-}+++{- Note [Pretty print ASCII when AsmCodeGen] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Previously, when generating assembly code, we created SDoc with@@ -126,7 +189,7 @@ Now we escape the given bytestring to string directly and construct SDoc only once. This improvement could dramatically decrease the memory allocation from 4.7GB to 1.3GB when embedding a 3MB literal-string in source code. See Trac #14741 for profiling results.+string in source code. See #14741 for profiling results. -}  -- ----------------------------------------------------------------------------
nativeGen/Reg.hs view
@@ -31,7 +31,7 @@ import Outputable import Unique import RegClass-import Data.List+import Data.List (intersect)  -- | An identifier for a primitive real machine register. type RegNo@@ -56,7 +56,7 @@         | VirtualRegHi {-# UNPACK #-} !Unique  -- High part of 2-word register         | VirtualRegF  {-# UNPACK #-} !Unique         | VirtualRegD  {-# UNPACK #-} !Unique-        | VirtualRegSSE {-# UNPACK #-} !Unique+         deriving (Eq, Show)  -- This is laborious, but necessary. We can't derive Ord because@@ -69,17 +69,16 @@   compare (VirtualRegHi a) (VirtualRegHi b) = nonDetCmpUnique a b   compare (VirtualRegF a) (VirtualRegF b) = nonDetCmpUnique a b   compare (VirtualRegD a) (VirtualRegD b) = nonDetCmpUnique a b-  compare (VirtualRegSSE a) (VirtualRegSSE b) = nonDetCmpUnique a b+   compare VirtualRegI{} _ = LT   compare _ VirtualRegI{} = GT   compare VirtualRegHi{} _ = LT   compare _ VirtualRegHi{} = GT   compare VirtualRegF{} _ = LT   compare _ VirtualRegF{} = GT-  compare VirtualRegD{} _ = LT-  compare _ VirtualRegD{} = GT  + instance Uniquable VirtualReg where         getUnique reg          = case reg of@@ -87,18 +86,20 @@                 VirtualRegHi u  -> u                 VirtualRegF u   -> u                 VirtualRegD u   -> u-                VirtualRegSSE u -> u  instance Outputable VirtualReg where         ppr reg          = case reg of                 VirtualRegI  u  -> text "%vI_"   <> pprUniqueAlways u                 VirtualRegHi u  -> text "%vHi_"  <> pprUniqueAlways u-                VirtualRegF  u  -> text "%vF_"   <> pprUniqueAlways u-                VirtualRegD  u  -> text "%vD_"   <> pprUniqueAlways u-                VirtualRegSSE u -> text "%vSSE_" <> pprUniqueAlways u+                -- this code is kinda wrong on x86+                -- because float and double occupy the same register set+                -- namely SSE2 register xmm0 .. xmm15+                VirtualRegF  u  -> text "%vFloat_"   <> pprUniqueAlways u+                VirtualRegD  u  -> text "%vDouble_"   <> pprUniqueAlways u  + renameVirtualReg :: Unique -> VirtualReg -> VirtualReg renameVirtualReg u r  = case r of@@ -106,7 +107,6 @@         VirtualRegHi _  -> VirtualRegHi u         VirtualRegF _   -> VirtualRegF  u         VirtualRegD _   -> VirtualRegD  u-        VirtualRegSSE _ -> VirtualRegSSE u   classOfVirtualReg :: VirtualReg -> RegClass@@ -116,7 +116,7 @@         VirtualRegHi{}  -> RcInteger         VirtualRegF{}   -> RcFloat         VirtualRegD{}   -> RcDouble-        VirtualRegSSE{} -> RcDoubleSSE+   -- Determine the upper-half vreg for a 64-bit quantity on a 32-bit platform
nativeGen/RegAlloc/Graph/Main.hs view
@@ -21,7 +21,7 @@ import Bag import DynFlags import Outputable-import Platform+import GHC.Platform import UniqFM import UniqSet import UniqSupply@@ -89,7 +89,8 @@ --   and try to colour it again. After `maxSpinCount` iterations we give up. -- regAlloc_spin-        :: (Instruction instr,+        :: forall instr statics.+           (Instruction instr,             Outputable instr,             Outputable statics)         => DynFlags@@ -180,7 +181,7 @@                 | otherwise                 = reg -        let code_coalesced+        let (code_coalesced :: [LiveCmmDecl statics instr])                 = map (patchEraseLive patchF) code          -- Check whether we've found a coloring.@@ -309,7 +310,7 @@         -- Add the reg-reg conflicts to the graph.         let conflictBag         = unionManyBags conflictList         let graph_conflict-                = foldrBag graphAddConflictSet Color.initGraph conflictBag+                = foldr graphAddConflictSet Color.initGraph conflictBag          -- Add the coalescences edges to the graph.         let moveBag@@ -317,7 +318,7 @@                             (unionManyBags moveList)          let graph_coalesce-                = foldrBag graphAddCoalesce graph_conflict moveBag+                = foldr graphAddCoalesce graph_conflict moveBag          return  graph_coalesce 
nativeGen/RegAlloc/Graph/Spill.hs view
@@ -23,7 +23,7 @@ import UniqSet import UniqSupply import Outputable-import Platform+import GHC.Platform  import Data.List import Data.Maybe@@ -105,12 +105,8 @@          -> return cmm          CmmProc info label live sccs-         |  LiveInfo static firstId mLiveVRegsOnEntry liveSlotsOnEntry <- info+         |  LiveInfo static firstId liveVRegsOnEntry liveSlotsOnEntry <- info          -> do-                -- We should only passed Cmms with the liveness maps filled in,-                -- but we'll create empty ones if they're not there just in case.-                let liveVRegsOnEntry    = fromMaybe mapEmpty mLiveVRegsOnEntry-                 -- The liveVRegsOnEntry contains the set of vregs that are live                 -- on entry to each basic block. If we spill one of those vregs                 -- we remove it from that set and add the corresponding slot@@ -124,7 +120,7 @@                  let info'                         = LiveInfo static firstId-                                (Just liveVRegsOnEntry)+                                liveVRegsOnEntry                                 liveSlotsOnEntry'                  -- Apply the spiller to all the basic blocks in the CmmProc.
nativeGen/RegAlloc/Graph/SpillClean.hs view
@@ -41,7 +41,7 @@ import Unique import State import Outputable-import Platform+import GHC.Platform import Hoopl.Collections  import Data.List
nativeGen/RegAlloc/Graph/SpillCost.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE ScopedTypeVariables, GADTs, BangPatterns #-} module RegAlloc.Graph.SpillCost (         SpillCostRecord,         plusSpillCostRecord,@@ -23,12 +23,13 @@ import GraphBase  import Hoopl.Collections (mapLookup)+import Hoopl.Label import Cmm import UniqFM import UniqSet import Digraph          (flattenSCCs) import Outputable-import Platform+import GHC.Platform import State import CFG @@ -49,9 +50,6 @@ type SpillCostInfo         = UniqFM SpillCostRecord --- | Block membership in a loop-type LoopMember = Bool- type SpillCostState = State (UniqFM SpillCostRecord) ()  -- | An empty map of spill costs.@@ -88,45 +86,49 @@  where         countCmm CmmData{}              = return ()         countCmm (CmmProc info _ _ sccs)-                = mapM_ (countBlock info)+                = mapM_ (countBlock info freqMap)                 $ flattenSCCs sccs+            where+                LiveInfo _ entries _ _ = info+                freqMap = (fst . mkGlobalWeights (head entries)) <$> cfg          -- Lookup the regs that are live on entry to this block in         --      the info table from the CmmProc.-        countBlock info (BasicBlock blockId instrs)-                | LiveInfo _ _ (Just blockLive) _ <- info+        countBlock info freqMap (BasicBlock blockId instrs)+                | LiveInfo _ _ blockLive _ <- info                 , Just rsLiveEntry  <- mapLookup blockId blockLive                 , rsLiveEntry_virt  <- takeVirtuals rsLiveEntry-                = countLIs (loopMember blockId) rsLiveEntry_virt instrs+                = countLIs (ceiling $ blockFreq freqMap blockId) rsLiveEntry_virt instrs                  | otherwise                 = error "RegAlloc.SpillCost.slurpSpillCostInfo: bad block" -        countLIs :: LoopMember -> UniqSet VirtualReg -> [LiveInstr instr] -> SpillCostState++        countLIs :: Int -> UniqSet VirtualReg -> [LiveInstr instr] -> SpillCostState         countLIs _      _      []                 = return ()          -- Skip over comment and delta pseudo instrs.-        countLIs inLoop rsLive (LiveInstr instr Nothing : lis)+        countLIs scale rsLive (LiveInstr instr Nothing : lis)                 | isMetaInstr instr-                = countLIs inLoop rsLive lis+                = countLIs scale rsLive lis                  | otherwise                 = pprPanic "RegSpillCost.slurpSpillCostInfo"                 $ text "no liveness information on instruction " <> ppr instr -        countLIs inLoop rsLiveEntry (LiveInstr instr (Just live) : lis)+        countLIs scale rsLiveEntry (LiveInstr instr (Just live) : lis)          = do                 -- Increment the lifetime counts for regs live on entry to this instr.-                mapM_ (incLifetime (loopCount inLoop)) $ nonDetEltsUniqSet rsLiveEntry+                mapM_ incLifetime $ nonDetEltsUniqSet rsLiveEntry                     -- This is non-deterministic but we do not                     -- currently support deterministic code-generation.                     -- See Note [Unique Determinism and code generation]                  -- Increment counts for what regs were read/written from.                 let (RU read written)   = regUsageOfInstr platform instr-                mapM_ (incUses (loopCount inLoop)) $ catMaybes $ map takeVirtualReg $ nub read-                mapM_ (incDefs (loopCount inLoop)) $ catMaybes $ map takeVirtualReg $ nub written+                mapM_ (incUses scale) $ catMaybes $ map takeVirtualReg $ nub read+                mapM_ (incDefs scale) $ catMaybes $ map takeVirtualReg $ nub written                  -- Compute liveness for entry to next instruction.                 let liveDieRead_virt    = takeVirtuals (liveDieRead  live)@@ -140,21 +142,18 @@                         = (rsLiveAcross `unionUniqSets` liveBorn_virt)                                         `minusUniqSet`  liveDieWrite_virt -                countLIs inLoop rsLiveNext lis+                countLIs scale rsLiveNext lis -        loopCount inLoop-          | inLoop = 10-          | otherwise = 1         incDefs     count reg = modify $ \s -> addToUFM_C plusSpillCostRecord s reg (reg, count, 0, 0)         incUses     count reg = modify $ \s -> addToUFM_C plusSpillCostRecord s reg (reg, 0, count, 0)-        incLifetime count reg = modify $ \s -> addToUFM_C plusSpillCostRecord s reg (reg, 0, 0, count)+        incLifetime       reg = modify $ \s -> addToUFM_C plusSpillCostRecord s reg (reg, 0, 0, 1) -        loopBlocks = CFG.loopMembers <$> cfg-        loopMember bid-          | Just isMember <- join (mapLookup bid <$> loopBlocks)-          = isMember+        blockFreq :: Maybe (LabelMap Double) -> Label -> Double+        blockFreq freqs bid+          | Just freq <- join (mapLookup bid <$> freqs)+          = max 1.0 (10000 * freq)           | otherwise-          = False+          = 1.0 -- Only if no cfg given  -- | Take all the virtual registers from this set. takeVirtuals :: UniqSet Reg -> UniqSet VirtualReg@@ -215,31 +214,39 @@ --  Without live range splitting, its's better to spill from the outside --  in so set the cost of very long live ranges to zero ---{--spillCost_chaitin-        :: SpillCostInfo-        -> Graph Reg RegClass Reg-        -> Reg-        -> Float -spillCost_chaitin info graph reg-        -- Spilling a live range that only lives for 1 instruction-        -- isn't going to help us at all - and we definitely want to avoid-        -- trying to re-spill previously inserted spill code.-        | lifetime <= 1         = 1/0+-- spillCost_chaitin+--         :: SpillCostInfo+--         -> Graph VirtualReg RegClass RealReg+--         -> VirtualReg+--         -> Float -        -- It's unlikely that we'll find a reg for a live range this long-        -- better to spill it straight up and not risk trying to keep it around-        -- and have to go through the build/color cycle again.-        | lifetime > allocatableRegsInClass (regClass reg) * 10-        = 0+-- spillCost_chaitin info graph reg+--         -- Spilling a live range that only lives for 1 instruction+--         -- isn't going to help us at all - and we definitely want to avoid+--         -- trying to re-spill previously inserted spill code.+--         | lifetime <= 1         = 1/0 -        -- Otherwise revert to chaitin's regular cost function.-        | otherwise     = fromIntegral (uses + defs)-                        / fromIntegral (nodeDegree graph reg)-        where (_, defs, uses, lifetime)-                = fromMaybe (reg, 0, 0, 0) $ lookupUFM info reg--}+--         -- It's unlikely that we'll find a reg for a live range this long+--         -- better to spill it straight up and not risk trying to keep it around+--         -- and have to go through the build/color cycle again.++--         -- To facility this we scale down the spill cost of long ranges.+--         -- This makes sure long ranges are still spilled first.+--         -- But this way spill cost remains relevant for long live+--         -- ranges.+--         | lifetime >= 128+--         = (spillCost / conflicts) / 10.0+++--         -- Otherwise revert to chaitin's regular cost function.+--         | otherwise = (spillCost / conflicts)+--         where+--             !spillCost = fromIntegral (uses + defs) :: Float+--             conflicts = fromIntegral (nodeDegree classOfVirtualReg graph reg)+--             (_, defs, uses, lifetime)+--                 = fromMaybe (reg, 0, 0, 0) $ lookupUFM info reg+  -- Just spill the longest live range. spillCost_length
nativeGen/RegAlloc/Graph/Stats.hs view
@@ -14,8 +14,6 @@         countSRMs, addSRM ) where -#include "nativeGen/NCG.h"- import GhcPrelude  import qualified GraphColor as Color@@ -28,7 +26,6 @@ import Reg import TargetReg -import PprCmm() import Outputable import UniqFM import UniqSet
nativeGen/RegAlloc/Graph/TrivColorable.hs view
@@ -16,7 +16,7 @@ import GraphBase  import UniqSet-import Platform+import GHC.Platform import Panic  -- trivColorable ---------------------------------------------------------------@@ -119,6 +119,7 @@                             ArchAlpha     -> panic "trivColorable ArchAlpha"                             ArchMipseb    -> panic "trivColorable ArchMipseb"                             ArchMipsel    -> panic "trivColorable ArchMipsel"+                            ArchS390X     -> panic "trivColorable ArchS390X"                             ArchJavaScript-> panic "trivColorable ArchJavaScript"                             ArchUnknown   -> panic "trivColorable ArchUnknown")         , count2        <- accSqueeze 0 cALLOCATABLE_REGS_INTEGER@@ -134,6 +135,10 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcFloat conflicts exclusions         | let cALLOCATABLE_REGS_FLOAT                   =        (case platformArch platform of+                    -- On x86_64 and x86, Float and RcDouble+                    -- use the same registers,+                    -- so we only use RcDouble to represent the+                    -- register allocation problem on those types.                             ArchX86       -> 0                             ArchX86_64    -> 0                             ArchPPC       -> 0@@ -145,6 +150,7 @@                             ArchAlpha     -> panic "trivColorable ArchAlpha"                             ArchMipseb    -> panic "trivColorable ArchMipseb"                             ArchMipsel    -> panic "trivColorable ArchMipsel"+                            ArchS390X     -> panic "trivColorable ArchS390X"                             ArchJavaScript-> panic "trivColorable ArchJavaScript"                             ArchUnknown   -> panic "trivColorable ArchUnknown")         , count2        <- accSqueeze 0 cALLOCATABLE_REGS_FLOAT@@ -160,8 +166,14 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDouble conflicts exclusions         | let cALLOCATABLE_REGS_DOUBLE                   =        (case platformArch platform of-                            ArchX86       -> 6-                            ArchX86_64    -> 0+                            ArchX86       -> 8+                            -- in x86 32bit mode sse2 there are only+                            -- 8 XMM registers xmm0 ... xmm7+                            ArchX86_64    -> 10+                            -- in x86_64 there are 16 XMM registers+                            -- xmm0 .. xmm15, here 10 is a+                            -- "dont need to solve conflicts" count that+                            -- was chosen at some point in the past.                             ArchPPC       -> 26                             ArchSPARC     -> 11                             ArchSPARC64   -> panic "trivColorable ArchSPARC64"@@ -171,6 +183,7 @@                             ArchAlpha     -> panic "trivColorable ArchAlpha"                             ArchMipseb    -> panic "trivColorable ArchMipseb"                             ArchMipsel    -> panic "trivColorable ArchMipsel"+                            ArchS390X     -> panic "trivColorable ArchS390X"                             ArchJavaScript-> panic "trivColorable ArchJavaScript"                             ArchUnknown   -> panic "trivColorable ArchUnknown")         , count2        <- accSqueeze 0 cALLOCATABLE_REGS_DOUBLE@@ -183,31 +196,7 @@          = count3 < cALLOCATABLE_REGS_DOUBLE -trivColorable platform virtualRegSqueeze realRegSqueeze RcDoubleSSE conflicts exclusions-        | let cALLOCATABLE_REGS_SSE-                  =        (case platformArch platform of-                            ArchX86       -> 8-                            ArchX86_64    -> 10-                            ArchPPC       -> 0-                            ArchSPARC     -> 0-                            ArchSPARC64   -> panic "trivColorable ArchSPARC64"-                            ArchPPC_64 _  -> 0-                            ArchARM _ _ _ -> panic "trivColorable ArchARM"-                            ArchARM64     -> panic "trivColorable ArchARM64"-                            ArchAlpha     -> panic "trivColorable ArchAlpha"-                            ArchMipseb    -> panic "trivColorable ArchMipseb"-                            ArchMipsel    -> panic "trivColorable ArchMipsel"-                            ArchJavaScript-> panic "trivColorable ArchJavaScript"-                            ArchUnknown   -> panic "trivColorable ArchUnknown")-        , count2        <- accSqueeze 0 cALLOCATABLE_REGS_SSE-                                (virtualRegSqueeze RcDoubleSSE)-                                conflicts -        , count3        <- accSqueeze  count2    cALLOCATABLE_REGS_SSE-                                (realRegSqueeze   RcDoubleSSE)-                                exclusions--        = count3 < cALLOCATABLE_REGS_SSE   -- Specification Code ----------------------------------------------------------
nativeGen/RegAlloc/Linear/FreeRegs.hs view
@@ -16,7 +16,7 @@  import DynFlags import Panic-import Platform+import GHC.Platform  -- ----------------------------------------------------------------------------- -- The free register set@@ -75,6 +75,7 @@                 ArchX86       -> X86.Instr.maxSpillSlots dflags                 ArchX86_64    -> X86.Instr.maxSpillSlots dflags                 ArchPPC       -> PPC.Instr.maxSpillSlots dflags+                ArchS390X     -> panic "maxSpillSlots ArchS390X"                 ArchSPARC     -> SPARC.Instr.maxSpillSlots dflags                 ArchSPARC64   -> panic "maxSpillSlots ArchSPARC64"                 ArchARM _ _ _ -> panic "maxSpillSlots ArchARM"
nativeGen/RegAlloc/Linear/Main.hs view
@@ -130,7 +130,7 @@ import UniqFM import UniqSupply import Outputable-import Platform+import GHC.Platform  import Data.Maybe import Data.List@@ -162,7 +162,7 @@                  , Nothing )  regAlloc dflags (CmmProc static lbl live sccs)-        | LiveInfo info entry_ids@(first_id:_) (Just block_live) _ <- static+        | LiveInfo info entry_ids@(first_id:_) block_live _ <- static         = do                 -- do register allocation on each component.                 (final_blocks, stats, stack_use)@@ -211,6 +211,7 @@  = case platformArch platform of       ArchX86        -> go $ (frInitFreeRegs platform :: X86.FreeRegs)       ArchX86_64     -> go $ (frInitFreeRegs platform :: X86_64.FreeRegs)+      ArchS390X      -> panic "linearRegAlloc ArchS390X"       ArchSPARC      -> go $ (frInitFreeRegs platform :: SPARC.FreeRegs)       ArchSPARC64    -> panic "linearRegAlloc ArchSPARC64"       ArchPPC        -> go $ (frInitFreeRegs platform :: PPC.FreeRegs)
nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs view
@@ -9,7 +9,7 @@ import Reg  import Outputable-import Platform+import GHC.Platform  import Data.Word import Data.Bits
nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs view
@@ -9,9 +9,9 @@ import RegClass import Reg -import CodeGen.Platform+import GHC.Platform.Regs import Outputable-import Platform+import GHC.Platform  import Data.Word import Data.Bits
nativeGen/RegAlloc/Linear/State.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, PatternSynonyms #-}+{-# LANGUAGE CPP, PatternSynonyms, DeriveFunctor #-}  #if !defined(GHC_LOADED_INTO_GHCI) {-# LANGUAGE UnboxedTuples #-}@@ -50,7 +50,7 @@ import Unique import UniqSupply -import Control.Monad (liftM, ap)+import Control.Monad (ap)  -- Avoids using unboxed tuples when loading into GHCi #if !defined(GHC_LOADED_INTO_GHCI)@@ -63,15 +63,14 @@ #else  data RA_Result freeRegs a = RA_Result {-# UNPACK #-} !(RA_State freeRegs) !a+  deriving (Functor)  #endif  -- | The register allocator monad type. newtype RegM freeRegs a         = RegM { unReg :: RA_State freeRegs -> RA_Result freeRegs a }--instance Functor (RegM freeRegs) where-      fmap = liftM+        deriving (Functor)  instance Applicative (RegM freeRegs) where       pure a  =  RegM $ \s -> RA_Result s a
nativeGen/RegAlloc/Linear/X86/FreeRegs.hs view
@@ -9,7 +9,7 @@ import RegClass import Reg import Panic-import Platform+import GHC.Platform  import Data.Word import Data.Bits
nativeGen/RegAlloc/Linear/X86_64/FreeRegs.hs view
@@ -9,7 +9,7 @@ import RegClass import Reg import Panic-import Platform+import GHC.Platform  import Data.Word import Data.Bits
nativeGen/RegAlloc/Liveness.hs view
@@ -33,7 +33,7 @@         patchRegsLiveInstr,         reverseBlocksInTops,         regLiveness,-        natCmmTopToLive+        cmmTopLiveness   ) where import GhcPrelude @@ -45,13 +45,12 @@ import Hoopl.Collections import Hoopl.Label import Cmm hiding (RegSet, emptyRegSet)-import PprCmm()  import Digraph import DynFlags import MonadUtils import Outputable-import Platform+import GHC.Platform import UniqSet import UniqFM import UniqSupply@@ -178,7 +177,7 @@                 (LabelMap CmmStatics)     -- cmm info table static stuff                 [BlockId]                 -- entry points (first one is the                                           -- entry point for the proc).-                (Maybe (BlockMap RegSet)) -- argument locals live on entry to this block+                (BlockMap RegSet)         -- argument locals live on entry to this block                 (BlockMap IntSet)         -- stack slots live on entry to this block  @@ -319,7 +318,7 @@                 = foldl'  (slurpBlock info) rs bs          slurpBlock info rs (BasicBlock blockId instrs)-                | LiveInfo _ _ (Just blockLive) _ <- info+                | LiveInfo _ _ blockLive _        <- info                 , Just rsLiveEntry                <- mapLookup blockId blockLive                 , (conflicts, moves)              <- slurpLIs rsLiveEntry rs instrs                 = (consBag rsLiveEntry conflicts, moves)@@ -504,10 +503,6 @@            in   CmmProc info label live                           (ListGraph $ map (stripLiveBlock dflags) $ first' : rest') -        -- procs used for stg_split_markers don't contain any blocks, and have no first_id.-        stripCmm (CmmProc (LiveInfo info [] _ _) label live [])-         =      CmmProc info label live (ListGraph [])-         -- If the proc has blocks but we don't know what the first one was, then we're dead.         stripCmm proc                  = pprPanic "RegAlloc.Liveness.stripLive: no first_id on proc" (ppr proc)@@ -577,18 +572,15 @@         patchCmm cmm@CmmData{}  = cmm          patchCmm (CmmProc info label live sccs)-         | LiveInfo static id (Just blockMap) mLiveSlots <- info+         | LiveInfo static id blockMap mLiveSlots <- info          = let                 patchRegSet set = mkUniqSet $ map patchF $ nonDetEltsUFM set                   -- See Note [Unique Determinism and code generation]                 blockMap'       = mapMap (patchRegSet . getUniqSet) blockMap -                info'           = LiveInfo static id (Just blockMap') mLiveSlots+                info'           = LiveInfo static id blockMap' mLiveSlots            in   CmmProc info' label live $ map patchSCC sccs -         | otherwise-         = panic "RegAlloc.Liveness.patchEraseLive: no blockMap"-         patchSCC (AcyclicSCC b)  = AcyclicSCC (patchBlock b)         patchSCC (CyclicSCC  bs) = CyclicSCC  (map patchBlock bs) @@ -644,8 +636,16 @@   ----------------------------------------------------------------------------------- | Convert a NatCmmDecl to a LiveCmmDecl, with empty liveness information+-- | Convert a NatCmmDecl to a LiveCmmDecl, with liveness information +cmmTopLiveness+        :: (Outputable instr, Instruction instr)+        => Maybe CFG -> Platform+        -> NatCmmDecl statics instr+        -> UniqSM (LiveCmmDecl statics instr)+cmmTopLiveness cfg platform cmm+        = regLiveness platform $ natCmmTopToLive cfg cmm+ natCmmTopToLive         :: (Instruction instr, Outputable instr)         => Maybe CFG -> NatCmmDecl statics instr@@ -655,10 +655,10 @@         = CmmData i d  natCmmTopToLive _ (CmmProc info lbl live (ListGraph []))-        = CmmProc (LiveInfo info [] Nothing mapEmpty) lbl live []+        = CmmProc (LiveInfo info [] mapEmpty mapEmpty) lbl live []  natCmmTopToLive mCfg proc@(CmmProc info lbl live (ListGraph blocks@(first : _)))-        = CmmProc (LiveInfo info' (first_id : entry_ids) Nothing mapEmpty)+        = CmmProc (LiveInfo info' (first_id : entry_ids) mapEmpty mapEmpty)                 lbl live sccsLive    where         first_id        = blockId first@@ -706,7 +706,7 @@         reachable             | Just cfg <- mcfg             -- Our CFG only contains reachable nodes by construction at this point.-            = getCfgNodes cfg+            = setFromList $ getCfgNodes cfg             | otherwise             = setFromList $ [ node_key node | node <- reachablesG g1 roots ] @@ -731,6 +731,7 @@ -------------------------------------------------------------------------------- -- Annotate code with register liveness information --+ regLiveness         :: (Outputable instr, Instruction instr)         => Platform@@ -743,14 +744,14 @@ regLiveness _ (CmmProc info lbl live [])         | LiveInfo static mFirst _ _    <- info         = return $ CmmProc-                        (LiveInfo static mFirst (Just mapEmpty) mapEmpty)+                        (LiveInfo static mFirst mapEmpty mapEmpty)                         lbl live []  regLiveness platform (CmmProc info lbl live sccs)         | LiveInfo static mFirst _ liveSlotsOnEntry     <- info         = let   (ann_sccs, block_live)  = computeLiveness platform sccs -          in    return $ CmmProc (LiveInfo static mFirst (Just block_live) liveSlotsOnEntry)+          in    return $ CmmProc (LiveInfo static mFirst block_live liveSlotsOnEntry)                            lbl live ann_sccs  
nativeGen/RegClass.hs view
@@ -18,7 +18,6 @@         = RcInteger         | RcFloat         | RcDouble-        | RcDoubleSSE -- x86 only: the SSE regs are a separate class         deriving Eq  @@ -26,10 +25,8 @@     getUnique RcInteger = mkRegClassUnique 0     getUnique RcFloat   = mkRegClassUnique 1     getUnique RcDouble  = mkRegClassUnique 2-    getUnique RcDoubleSSE = mkRegClassUnique 3  instance Outputable RegClass where     ppr RcInteger       = Outputable.text "I"     ppr RcFloat         = Outputable.text "F"     ppr RcDouble        = Outputable.text "D"-    ppr RcDoubleSSE     = Outputable.text "S"
nativeGen/SPARC/CodeGen.hs view
@@ -18,8 +18,6 @@ where  #include "HsVersions.h"-#include "nativeGen/NCG.h"-#include "MachDeps.h"  -- NCG stuff: import GhcPrelude@@ -31,7 +29,6 @@ import SPARC.CodeGen.Gen64 import SPARC.CodeGen.Gen32 import SPARC.CodeGen.Base-import SPARC.Ppr        () import SPARC.Instr import SPARC.Imm import SPARC.AddrMode@@ -59,7 +56,7 @@ import FastString import OrdList import Outputable-import Platform+import GHC.Platform  import Control.Monad    ( mapAndUnzipM ) @@ -618,7 +615,9 @@ outOfLineMachOp_table mop  = case mop of         MO_F32_Exp    -> fsLit "expf"+        MO_F32_ExpM1  -> fsLit "expm1f"         MO_F32_Log    -> fsLit "logf"+        MO_F32_Log1P  -> fsLit "log1pf"         MO_F32_Sqrt   -> fsLit "sqrtf"         MO_F32_Fabs   -> unsupported         MO_F32_Pwr    -> fsLit "powf"@@ -640,7 +639,9 @@         MO_F32_Atanh  -> fsLit "atanhf"          MO_F64_Exp    -> fsLit "exp"+        MO_F64_ExpM1  -> fsLit "expm1"         MO_F64_Log    -> fsLit "log"+        MO_F64_Log1P  -> fsLit "log1p"         MO_F64_Sqrt   -> fsLit "sqrt"         MO_F64_Fabs   -> unsupported         MO_F64_Pwr    -> fsLit "pow"@@ -669,6 +670,7 @@         MO_Memcmp _  -> fsLit "memcmp"          MO_BSwap w   -> fsLit $ bSwapLabel w+        MO_BRev w    -> fsLit $ bRevLabel w         MO_PopCnt w  -> fsLit $ popCntLabel w         MO_Pdep w    -> fsLit $ pdepLabel w         MO_Pext w    -> fsLit $ pextLabel w
nativeGen/SPARC/CodeGen/Base.hs view
@@ -22,11 +22,11 @@ import Format import Reg -import CodeGen.Platform+import GHC.Platform.Regs import DynFlags import Cmm-import PprCmmExpr ()-import Platform+import PprCmmExpr () -- For Outputable instances+import GHC.Platform  import Outputable import OrdList
nativeGen/SPARC/CodeGen/Expand.hs view
@@ -11,7 +11,6 @@ import SPARC.Imm import SPARC.AddrMode import SPARC.Regs-import SPARC.Ppr        () import Instruction import Reg import Format
nativeGen/SPARC/CodeGen/Gen64.hs view
@@ -16,7 +16,7 @@ import SPARC.AddrMode import SPARC.Imm import SPARC.Instr-import SPARC.Ppr()+-- import SPARC.Ppr() import NCGMonad import Instruction import Format
nativeGen/SPARC/CodeGen/Sanity.hs view
@@ -9,7 +9,7 @@ import GhcPrelude  import SPARC.Instr-import SPARC.Ppr        ()+import SPARC.Ppr        () -- For Outputable instances import Instruction  import Cmm
nativeGen/SPARC/Instr.hs view
@@ -8,7 +8,6 @@ -- ----------------------------------------------------------------------------- #include "HsVersions.h"-#include "nativeGen/NCG.h"  module SPARC.Instr (         RI(..),@@ -40,13 +39,13 @@ import Format  import CLabel-import CodeGen.Platform+import GHC.Platform.Regs import BlockId import DynFlags import Cmm import FastString import Outputable-import Platform+import GHC.Platform   -- | Register or immediate@@ -384,7 +383,6 @@                         RcInteger -> II32                         RcFloat   -> FF32                         RcDouble  -> FF64-                        _         -> panic "sparc_mkSpillInstr"      in ST fmt reg (fpRel (negate off_w)) @@ -405,7 +403,6 @@                         RcInteger -> II32                         RcFloat   -> FF32                         RcDouble  -> FF64-                        _         -> panic "sparc_mkLoadInstr"          in LD fmt (fpRel (- off_w)) reg @@ -454,7 +451,6 @@                 RcInteger -> ADD  False False src (RIReg g0) dst                 RcDouble  -> FMOV FF64 src dst                 RcFloat   -> FMOV FF32 src dst-                _         -> panic "sparc_mkRegRegMoveInstr"          | otherwise         = panic "SPARC.Instr.mkRegRegMoveInstr: classes of src and dest not the same"
nativeGen/SPARC/Ppr.hs view
@@ -23,7 +23,6 @@ where  #include "HsVersions.h"-#include "nativeGen/NCG.h"  import GhcPrelude @@ -39,7 +38,7 @@ import PprBase  import Cmm hiding (topInfoTable)-import PprCmm()+import PprCmm() -- For Outputable instances import BlockId import CLabel import Hoopl.Label@@ -47,9 +46,8 @@  import Unique           ( pprUniqueAlways ) import Outputable-import Platform+import GHC.Platform import FastString-import Data.Word  -- ----------------------------------------------------------------------------- -- Printing this stuff out@@ -61,13 +59,10 @@ pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) =   case topInfoTable proc of     Nothing ->-       case blocks of-         []     -> -- special case for split markers:-           pprLabel lbl-         blocks -> -- special case for code without info table:-           pprSectionAlign (Section Text lbl) $$-           pprLabel lbl $$ -- blocks guaranteed not null, so label needed-           vcat (map (pprBasicBlock top_info) blocks)+        -- special case for code without info table:+        pprSectionAlign (Section Text lbl) $$+        pprLabel lbl $$ -- blocks guaranteed not null, so label needed+        vcat (map (pprBasicBlock top_info) blocks)      Just (Statics info_lbl _) ->       sdocWithPlatform $ \platform ->@@ -106,14 +101,20 @@   pprDatas :: CmmStatics -> SDoc+-- See note [emit-time elimination of static indirections] in CLabel.+pprDatas (Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])+  | lbl == mkIndStaticInfoLabel+  , let labelInd (CmmLabelOff l _) = Just l+        labelInd (CmmLabel l) = Just l+        labelInd _ = Nothing+  , Just ind' <- labelInd ind+  , alias `mayRedirectTo` ind'+  = pprGloblDecl alias+    $$ text ".equiv" <+> ppr alias <> comma <> ppr (CmmLabel ind') pprDatas (Statics lbl dats) = vcat (pprLabel lbl : map pprData dats)  pprData :: CmmStatic -> SDoc-pprData (CmmString str)-  = vcat (map do1 str) $$ do1 0-    where-       do1 :: Word8 -> SDoc-       do1 w = text "\t.byte\t" <> int (fromIntegral w)+pprData (CmmString str)          = pprBytes str pprData (CmmUninitialised bytes) = text ".skip " <> int bytes pprData (CmmStaticLit lit)       = pprDataItem lit @@ -151,8 +152,8 @@                 VirtualRegHi  u -> text "%vHi_"  <> pprUniqueAlways u                 VirtualRegF   u -> text "%vF_"   <> pprUniqueAlways u                 VirtualRegD   u -> text "%vD_"   <> pprUniqueAlways u-                VirtualRegSSE u -> text "%vSSE_" <> pprUniqueAlways u +         RegReal rr          -> case rr of                 RealRegSingle r1@@ -219,8 +220,7 @@         II32    -> sLit ""         II64    -> sLit "d"         FF32    -> sLit ""-        FF64    -> sLit "d"-        _       -> panic "SPARC.Ppr.pprFormat: no match")+        FF64    -> sLit "d")   -- | Pretty print a format for an instruction suffix.@@ -234,10 +234,10 @@         II32  -> sLit ""         II64  -> sLit "x"         FF32  -> sLit ""-        FF64  -> sLit "d"-        _       -> panic "SPARC.Ppr.pprFormat: no match")+        FF64  -> sLit "d")  + -- | Pretty print a condition code. pprCond :: Cond -> SDoc pprCond c@@ -643,4 +643,3 @@  pp_comma_a :: SDoc pp_comma_a        = text ",a"-
nativeGen/SPARC/Regs.hs view
@@ -34,7 +34,7 @@  import GhcPrelude -import CodeGen.Platform.SPARC+import GHC.Platform.SPARC import Reg import RegClass import Format@@ -104,7 +104,6 @@                 VirtualRegD{}           -> 1                 _other                  -> 0 -        _other -> 0  {-# INLINE realRegSqueeze #-} realRegSqueeze :: RegClass -> RealReg -> Int@@ -135,7 +134,6 @@                  RealRegPair{}           -> 1 -        _other -> 0  -- | All the allocatable registers in the machine, --      including register pairs.
nativeGen/TargetReg.hs view
@@ -29,7 +29,7 @@  import Outputable import Unique-import Platform+import GHC.Platform  import qualified X86.Regs       as X86 import qualified X86.RegInfo    as X86@@ -44,6 +44,7 @@       ArchX86       -> X86.virtualRegSqueeze       ArchX86_64    -> X86.virtualRegSqueeze       ArchPPC       -> PPC.virtualRegSqueeze+      ArchS390X     -> panic "targetVirtualRegSqueeze ArchS390X"       ArchSPARC     -> SPARC.virtualRegSqueeze       ArchSPARC64   -> panic "targetVirtualRegSqueeze ArchSPARC64"       ArchPPC_64 _  -> PPC.virtualRegSqueeze@@ -62,6 +63,7 @@       ArchX86       -> X86.realRegSqueeze       ArchX86_64    -> X86.realRegSqueeze       ArchPPC       -> PPC.realRegSqueeze+      ArchS390X     -> panic "targetRealRegSqueeze ArchS390X"       ArchSPARC     -> SPARC.realRegSqueeze       ArchSPARC64   -> panic "targetRealRegSqueeze ArchSPARC64"       ArchPPC_64 _  -> PPC.realRegSqueeze@@ -79,6 +81,7 @@       ArchX86       -> X86.classOfRealReg platform       ArchX86_64    -> X86.classOfRealReg platform       ArchPPC       -> PPC.classOfRealReg+      ArchS390X     -> panic "targetClassOfRealReg ArchS390X"       ArchSPARC     -> SPARC.classOfRealReg       ArchSPARC64   -> panic "targetClassOfRealReg ArchSPARC64"       ArchPPC_64 _  -> PPC.classOfRealReg@@ -96,6 +99,7 @@       ArchX86       -> X86.mkVirtualReg       ArchX86_64    -> X86.mkVirtualReg       ArchPPC       -> PPC.mkVirtualReg+      ArchS390X     -> panic "targetMkVirtualReg ArchS390X"       ArchSPARC     -> SPARC.mkVirtualReg       ArchSPARC64   -> panic "targetMkVirtualReg ArchSPARC64"       ArchPPC_64 _  -> PPC.mkVirtualReg@@ -113,6 +117,7 @@       ArchX86       -> X86.regDotColor platform       ArchX86_64    -> X86.regDotColor platform       ArchPPC       -> PPC.regDotColor+      ArchS390X     -> panic "targetRegDotColor ArchS390X"       ArchSPARC     -> SPARC.regDotColor       ArchSPARC64   -> panic "targetRegDotColor ArchSPARC64"       ArchPPC_64 _  -> PPC.regDotColor
nativeGen/X86/CodeGen.hs view
@@ -1,9 +1,13 @@ {-# LANGUAGE CPP, GADTs, NondecreasingIndentation #-} {-# LANGUAGE TupleSections #-}+{-# LANGUAGE BangPatterns #-} +#if __GLASGOW_HASKELL__ <= 808+-- GHC 8.10 deprecates this flag, but GHC 8.8 needs it -- The default iteration limit is a bit too low for the definitions -- in this module. {-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}+#endif  ----------------------------------------------------------------------------- --@@ -28,8 +32,6 @@ where  #include "HsVersions.h"-#include "nativeGen/NCG.h"-#include "MachDeps.h"  -- NCG stuff: import GhcPrelude@@ -40,10 +42,7 @@ import X86.Ppr (  ) import X86.RegInfo ---TODO: Remove - Just for development/debugging-import X86.Ppr()--import CodeGen.Platform+import GHC.Platform.Regs import CPrim import Debug            ( DebugBlock(..), UnwindPoint(..), UnwindTable                         , UnwindExpr(UwReg), toUnwindExpr )@@ -56,13 +55,12 @@ import CFG import Format import Reg-import Platform+import GHC.Platform  -- Our intermediate code: import BasicTypes import BlockId import Module           ( primUnitId )-import PprCmm           () import CmmUtils import CmmSwitch import Cmm@@ -100,17 +98,25 @@ sse2Enabled :: NatM Bool sse2Enabled = do   dflags <- getDynFlags-  return (isSse2Enabled dflags)+  case platformArch (targetPlatform dflags) of+  -- We Assume  SSE1 and SSE2 operations are available on both+  -- x86 and x86_64. Historically we didn't default to SSE2 and+  -- SSE1 on x86, which results in defacto nondeterminism for how+  -- rounding behaves in the associated x87 floating point instructions+  -- because variations in the spill/fpu stack placement of arguments for+  -- operations would change the precision and final result of what+  -- would otherwise be the same expressions with respect to single or+  -- double precision IEEE floating point computations.+    ArchX86_64 -> return True+    ArchX86    -> return True+    _          -> panic "trying to generate x86/x86_64 on the wrong platform" + sse4_2Enabled :: NatM Bool sse4_2Enabled = do   dflags <- getDynFlags   return (isSse4_2Enabled dflags) -if_sse2 :: NatM a -> NatM a -> NatM a-if_sse2 sse2 x87 = do-  b <- sse2Enabled-  if b then sse2 else x87  cmmTopCodeGen         :: RawCmmDecl@@ -130,7 +136,7 @@       Nothing -> return tops  cmmTopCodeGen (CmmData sec dat) = do-  return [CmmData sec (1, dat)]  -- no translation, we just use CmmStatic+  return [CmmData sec (mkAlignment 1, dat)]  -- no translation, we just use CmmStatic  {- Note [Verifying basic blocks]    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -201,7 +207,7 @@             return $ unitOL $ LOCATION fileId line col name     _ -> return nilOL   (mid_instrs,mid_bid) <- stmtsToInstrs id stmts-  (tail_instrs,_) <- stmtToInstrs mid_bid tail+  (!tail_instrs,_) <- stmtToInstrs mid_bid tail   let instrs = loc_instrs `appOL` mid_instrs `appOL` tail_instrs   return $! verifyBasicBlock (fromOL instrs)   instrs' <- fold <$> traverse addSpUnwindings instrs@@ -306,7 +312,7 @@     go bid (s:stmts)  instrs = do       (instrs',bid') <- stmtToInstrs bid s       -- If the statement introduced a new block, we use that one-      let newBid = fromMaybe bid bid'+      let !newBid = fromMaybe bid bid'       go newBid stmts (instrs `appOL` instrs')  -- | `bid` refers to the current block and is used to update the CFG@@ -414,15 +420,14 @@   -- | Grab the Reg for a CmmReg-getRegisterReg :: Platform -> Bool -> CmmReg -> Reg+getRegisterReg :: Platform  -> CmmReg -> Reg -getRegisterReg _ use_sse2 (CmmLocal (LocalReg u pk))-  = let fmt = cmmTypeFormat pk in-    if isFloatFormat fmt && not use_sse2-       then RegVirtual (mkVirtualReg u FF80)-       else RegVirtual (mkVirtualReg u fmt)+getRegisterReg _   (CmmLocal (LocalReg u pk))+  = -- by Assuming SSE2, Int,Word,Float,Double all can be register allocated+   let fmt = cmmTypeFormat pk in+        RegVirtual (mkVirtualReg u fmt) -getRegisterReg platform _ (CmmGlobal mid)+getRegisterReg platform  (CmmGlobal mid)   = case globalRegMaybe platform mid of         Just reg -> RegReal $ reg         Nothing  -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid)@@ -643,15 +648,14 @@             do reg' <- getPicBaseNat (archWordFormat is32Bit)                return (Fixed (archWordFormat is32Bit) reg' nilOL)         _ ->-            do use_sse2 <- sse2Enabled+            do                let                  fmt = cmmTypeFormat (cmmRegType dflags reg)-                 format | not use_sse2 && isFloatFormat fmt = FF80-                        | otherwise                         = fmt+                 format  = fmt                --                let platform = targetPlatform dflags                return (Fixed format-                             (getRegisterReg platform use_sse2 reg)+                             (getRegisterReg platform  reg)                              nilOL)  @@ -661,7 +665,7 @@ getRegister' dflags is32Bit (CmmMachOp (MO_AlignmentCheck align _) [e])   = addAlignmentCheck align <$> getRegister' dflags is32Bit e --- for 32-bit architectuers, support some 64 -> 32 bit conversions:+-- for 32-bit architectures, support some 64 -> 32 bit conversions: -- TO_W_(x), TO_W_(x >> 32)  getRegister' _ is32Bit (CmmMachOp (MO_UU_Conv W64 W32)@@ -687,8 +691,7 @@   return $ Fixed II32 rlo code  getRegister' _ _ (CmmLit lit@(CmmFloat f w)) =-  if_sse2 float_const_sse2 float_const_x87- where+  float_const_sse2  where   float_const_sse2     | f == 0.0 = do       let@@ -699,22 +702,8 @@       return (Any format code)     | otherwise = do-      Amode addr code <- memConstant (widthInBytes w) lit-      loadFloatAmode True w addr code--  float_const_x87 = case w of-    W64-      | f == 0.0 ->-        let code dst = unitOL (GLDZ dst)-        in  return (Any FF80 code)--      | f == 1.0 ->-        let code dst = unitOL (GLD1 dst)-        in  return (Any FF80 code)--    _otherwise -> do-      Amode addr code <- memConstant (widthInBytes w) lit-      loadFloatAmode False w addr code+      Amode addr code <- memConstant (mkAlignment $ widthInBytes w) lit+      loadFloatAmode w addr code  -- catch simple cases of zero- or sign-extended load getRegister' _ _ (CmmMachOp (MO_UU_Conv W8 W32) [CmmLoad addr _]) = do@@ -771,12 +760,10 @@         LEA II64 (OpAddr (ripRel (litToImm displacement))) (OpReg dst))  getRegister' dflags is32Bit (CmmMachOp mop [x]) = do -- unary MachOps-    sse2 <- sse2Enabled     case mop of-      MO_F_Neg w-         | sse2      -> sse2NegCode w x-         | otherwise -> trivialUFCode FF80 (GNEG FF80) x+      MO_F_Neg w  -> sse2NegCode w x +       MO_S_Neg w -> triv_ucode NEGI (intFormat w)       MO_Not w   -> triv_ucode NOT  (intFormat w) @@ -841,10 +828,9 @@       MO_XX_Conv W16 W64 | not is32Bit -> integerExtend W16 W64 MOV x       MO_XX_Conv W32 W64 | not is32Bit -> integerExtend W32 W64 MOV x -      MO_FF_Conv W32 W64-        | sse2      -> coerceFP2FP W64 x-        | otherwise -> conversionNop FF80 x+      MO_FF_Conv W32 W64 -> coerceFP2FP W64 x +       MO_FF_Conv W64 W32 -> coerceFP2FP W32 x        MO_FS_Conv from to -> coerceFP2Int from to x@@ -906,7 +892,6 @@   getRegister' _ is32Bit (CmmMachOp mop [x, y]) = do -- dyadic MachOps-  sse2 <- sse2Enabled   case mop of       MO_F_Eq _ -> condFltReg is32Bit EQQ x y       MO_F_Ne _ -> condFltReg is32Bit NE  x y@@ -930,15 +915,15 @@       MO_U_Lt _ -> condIntReg LU  x y       MO_U_Le _ -> condIntReg LEU x y -      MO_F_Add w  | sse2      -> trivialFCode_sse2 w ADD  x y-                  | otherwise -> trivialFCode_x87    GADD x y-      MO_F_Sub w  | sse2      -> trivialFCode_sse2 w SUB  x y-                  | otherwise -> trivialFCode_x87    GSUB x y-      MO_F_Quot w | sse2      -> trivialFCode_sse2 w FDIV x y-                  | otherwise -> trivialFCode_x87    GDIV x y-      MO_F_Mul w  | sse2      -> trivialFCode_sse2 w MUL x y-                  | otherwise -> trivialFCode_x87    GMUL x y+      MO_F_Add w   -> trivialFCode_sse2 w ADD  x y +      MO_F_Sub w   -> trivialFCode_sse2 w SUB  x y++      MO_F_Quot w  -> trivialFCode_sse2 w FDIV x y++      MO_F_Mul w   -> trivialFCode_sse2 w MUL x y++       MO_Add rep -> add_code rep x y       MO_Sub rep -> sub_code rep x y @@ -1131,8 +1116,7 @@   | isFloatType pk   = do     Amode addr mem_code <- getAmode mem-    use_sse2 <- sse2Enabled-    loadFloatAmode use_sse2 (typeWidth pk) addr mem_code+    loadFloatAmode  (typeWidth pk) addr mem_code  getRegister' _ is32Bit (CmmLoad mem pk)   | is32Bit && not (isWord64 pk)@@ -1262,9 +1246,7 @@                 return (reg, code)  reg2reg :: Format -> Reg -> Reg -> Instr-reg2reg format src dst-  | format == FF80 = GMOV src dst-  | otherwise    = MOV format (OpReg src) (OpReg dst)+reg2reg format src dst = MOV format (OpReg src) (OpReg dst)   --------------------------------------------------------------------------------@@ -1373,11 +1355,10 @@  getNonClobberedOperand :: CmmExpr -> NatM (Operand, InstrBlock) getNonClobberedOperand (CmmLit lit) = do-  use_sse2 <- sse2Enabled-  if use_sse2 && isSuitableFloatingPointLit lit+  if  isSuitableFloatingPointLit lit     then do       let CmmFloat _ w = lit-      Amode addr code <- memConstant (widthInBytes w) lit+      Amode addr code <- memConstant (mkAlignment $ widthInBytes w) lit       return (OpAddr addr, code)      else do @@ -1389,9 +1370,12 @@  getNonClobberedOperand (CmmLoad mem pk) = do   is32Bit <- is32BitPlatform-  use_sse2 <- sse2Enabled-  if (not (isFloatType pk) || use_sse2)-      && (if is32Bit then not (isWord64 pk) else True)+  -- this logic could be simplified+  -- TODO FIXME+  if   (if is32Bit then not (isWord64 pk) else True)+      -- if 32bit and pk is at float/double/simd value+      -- or if 64bit+      --  this could use some eyeballs or i'll need to stare at it more later     then do       dflags <- getDynFlags       let platform = targetPlatform dflags@@ -1408,6 +1392,7 @@                    return (src, nilOL)       return (OpAddr src', mem_code `appOL` save_code)     else do+      -- if its a word or gcptr on 32bit?       getNonClobberedOperand_generic (CmmLoad mem pk)  getNonClobberedOperand e = getNonClobberedOperand_generic e@@ -1433,7 +1418,7 @@   if (use_sse2 && isSuitableFloatingPointLit lit)     then do       let CmmFloat _ w = lit-      Amode addr code <- memConstant (widthInBytes w) lit+      Amode addr code <- memConstant (mkAlignment $ widthInBytes w) lit       return (OpAddr addr, code)     else do @@ -1481,7 +1466,7 @@              , JXX_GBL NE $ ImmCLbl mkBadAlignmentLabel              ] -memConstant :: Int -> CmmLit -> NatM Amode+memConstant :: Alignment -> CmmLit -> NatM Amode memConstant align lit = do   lbl <- getNewLabelNat   let rosection = Section ReadOnlyData lbl@@ -1500,16 +1485,15 @@   return (Amode addr code)  -loadFloatAmode :: Bool -> Width -> AddrMode -> InstrBlock -> NatM Register-loadFloatAmode use_sse2 w addr addr_code = do+loadFloatAmode :: Width -> AddrMode -> InstrBlock -> NatM Register+loadFloatAmode w addr addr_code = do   let format = floatFormat w       code dst = addr_code `snocOL`-                 if use_sse2-                    then MOV format (OpAddr addr) (OpReg dst)-                    else GLD format addr dst-  return (Any (if use_sse2 then format else FF80) code)+                    MOV format (OpAddr addr) (OpReg dst) +  return (Any format code) + -- if we want a floating-point literal as an operand, we can -- use it directly from memory.  However, if the literal is -- zero, we're better off generating it into a register using@@ -1668,19 +1652,9 @@ condFltCode :: Cond -> CmmExpr -> CmmExpr -> NatM CondCode  condFltCode cond x y-  = if_sse2 condFltCode_sse2 condFltCode_x87+  =  condFltCode_sse2   where -  condFltCode_x87-    = ASSERT(cond `elem` ([EQQ, NE, LE, LTT, GE, GTT])) do-    (x_reg, x_code) <- getNonClobberedReg x-    (y_reg, y_code) <- getSomeReg y-    let-        code = x_code `appOL` y_code `snocOL`-                GCMP cond x_reg y_reg-    -- The GCMP insn does the test and sets the zero flag if comparable-    -- and true.  Hence we always supply EQQ as the condition to test.-    return (CondCode True EQQ code)    -- in the SSE2 comparison ops (ucomiss, ucomisd) the left arg may be   -- an operand, but the right must be a reg.  We can probably do better@@ -1764,35 +1738,33 @@   load_code <- intLoadCode (MOV pk) src   dflags <- getDynFlags   let platform = targetPlatform dflags-  return (load_code (getRegisterReg platform False{-no sse2-} reg))+  return (load_code (getRegisterReg platform reg))  -- dst is a reg, but src could be anything assignReg_IntCode _ reg src = do   dflags <- getDynFlags   let platform = targetPlatform dflags   code <- getAnyReg src-  return (code (getRegisterReg platform False{-no sse2-} reg))+  return (code (getRegisterReg platform reg))   -- Floating point assignment to memory assignMem_FltCode pk addr src = do   (src_reg, src_code) <- getNonClobberedReg src   Amode addr addr_code <- getAmode addr-  use_sse2 <- sse2Enabled   let         code = src_code `appOL`                addr_code `snocOL`-                if use_sse2 then MOV pk (OpReg src_reg) (OpAddr addr)-                            else GST pk src_reg addr+               MOV pk (OpReg src_reg) (OpAddr addr)+   return code  -- Floating point assignment to a register/temporary assignReg_FltCode _ reg src = do-  use_sse2 <- sse2Enabled   src_code <- getAnyReg src   dflags <- getDynFlags   let platform = targetPlatform dflags-  return (src_code (getRegisterReg platform use_sse2 reg))+  return (src_code (getRegisterReg platform  reg))   genJump :: CmmExpr{-the branch target-} -> [Reg] -> NatM InstrBlock@@ -2014,6 +1986,9 @@ -- -- (If applicable) Do not fill the delay slots here; you will confuse the -- register allocator.+--+-- See Note [Keeping track of the current block] for information why we need+-- to take/return a block id.  genCCall     :: DynFlags@@ -2028,7 +2003,6 @@  genCCall dflags is32Bit (PrimTarget (MO_AtomicRMW width amop))                                            [dst] [addr, n] bid = do-    use_sse2 <- sse2Enabled     Amode amode addr_code <-         if amop `elem` [AMO_Add, AMO_Sub]         then getAmode addr@@ -2036,7 +2010,7 @@     arg <- getNewRegNat format     arg_code <- getAnyReg n     let platform = targetPlatform dflags-        dst_r    = getRegisterReg platform use_sse2 (CmmLocal dst)+        dst_r    = getRegisterReg platform  (CmmLocal dst)     (code, lbl) <- op_code dst_r arg amode     return (addr_code `appOL` arg_code arg `appOL` code, Just lbl)   where@@ -2103,9 +2077,8 @@ genCCall dflags is32Bit (PrimTarget (MO_Ctz width)) [dst] [src] bid   | is32Bit, width == W64 = do       ChildCode64 vcode rlo <- iselExpr64 src-      use_sse2 <- sse2Enabled       let rhi     = getHiVRegFromLo rlo-          dst_r   = getRegisterReg platform use_sse2 (CmmLocal dst)+          dst_r   = getRegisterReg platform  (CmmLocal dst)       lbl1 <- getBlockIdNat       lbl2 <- getBlockIdNat       let format = if width == W8 then II16 else intFormat width@@ -2126,7 +2099,7 @@       --  } else {       --    dst = 64;       --  }-      let instrs = vcode `appOL` toOL+      let !instrs = vcode `appOL` toOL                ([ MOV      II32 (OpReg rhi)         (OpReg tmp_r)                 , OR       II32 (OpReg rlo)         (OpReg tmp_r)                 , MOV      II32 (OpImm (ImmInt 64)) (OpReg dst_r)@@ -2146,23 +2119,37 @@    | otherwise = do     code_src <- getAnyReg src-    use_sse2 <- sse2Enabled-    let dst_r = getRegisterReg platform use_sse2 (CmmLocal dst)+    let dst_r = getRegisterReg platform (CmmLocal dst) -    -- The following insn sequence makes sure 'ctz 0' has a defined value.-    -- starting with Haswell, one could use the TZCNT insn instead.-    let format = if width == W8 then II16 else intFormat width-    src_r <- getNewRegNat format-    tmp_r <- getNewRegNat format-    let instrs = code_src src_r `appOL` toOL-              ([ MOVZxL  II8    (OpReg src_r) (OpReg src_r) | width == W8 ] ++-              [ BSF     format (OpReg src_r) tmp_r-              , MOV     II32   (OpImm (ImmInt bw)) (OpReg dst_r)-              , CMOV NE format (OpReg tmp_r) dst_r-              ]) -- NB: We don't need to zero-extend the result for the-                  -- W8/W16 cases because the 'MOV' insn already-                  -- took care of implicitly clearing the upper bits-    return (instrs, Nothing)+    if isBmi2Enabled dflags+    then do+        src_r <- getNewRegNat (intFormat width)+        let instrs = appOL (code_src src_r) $ case width of+                W8 -> toOL+                    [ OR    II32 (OpImm (ImmInteger 0xFFFFFF00)) (OpReg src_r)+                    , TZCNT II32 (OpReg src_r)        dst_r+                    ]+                W16 -> toOL+                    [ TZCNT  II16 (OpReg src_r) dst_r+                    , MOVZxL II16 (OpReg dst_r) (OpReg dst_r)+                    ]+                _ -> unitOL $ TZCNT (intFormat width) (OpReg src_r) dst_r+        return (instrs, Nothing)+    else do+        -- The following insn sequence makes sure 'ctz 0' has a defined value.+        -- starting with Haswell, one could use the TZCNT insn instead.+        let format = if width == W8 then II16 else intFormat width+        src_r <- getNewRegNat format+        tmp_r <- getNewRegNat format+        let !instrs = code_src src_r `appOL` toOL+                 ([ MOVZxL  II8    (OpReg src_r) (OpReg src_r) | width == W8 ] +++                  [ BSF     format (OpReg src_r) tmp_r+                  , MOV     II32   (OpImm (ImmInt bw)) (OpReg dst_r)+                  , CMOV NE format (OpReg tmp_r) dst_r+                  ]) -- NB: We don't need to zero-extend the result for the+                     -- W8/W16 cases because the 'MOV' insn already+                     -- took care of implicitly clearing the upper bits+        return (instrs, Nothing)   where     bw = widthInBits width     platform = targetPlatform dflags@@ -2183,9 +2170,9 @@  -- Unroll memcpy calls if the number of bytes to copy isn't too -- large.  Otherwise, call C's memcpy.-genCCall' dflags is32Bit (PrimTarget (MO_Memcpy align)) _+genCCall' dflags _ (PrimTarget (MO_Memcpy align)) _          [dst, src, CmmLit (CmmInt n _)] _-    | fromInteger insns <= maxInlineMemcpyInsns dflags && align .&. 3 == 0 = do+    | fromInteger insns <= maxInlineMemcpyInsns dflags = do         code_dst <- getAnyReg dst         dst_r <- getNewRegNat format         code_src <- getAnyReg src@@ -2198,7 +2185,9 @@     -- instructions per move.     insns = 2 * ((n + sizeBytes - 1) `div` sizeBytes) -    format = if align .&. 4 /= 0 then II32 else (archWordFormat is32Bit)+    maxAlignment = wordAlignment dflags -- only machine word wide MOVs are supported+    effectiveAlignment = min (alignmentOf align) maxAlignment+    format = intFormat . widthFromBytes $ alignmentBytes effectiveAlignment      -- The size of each move, in bytes.     sizeBytes :: Integer@@ -2235,17 +2224,25 @@           CmmLit (CmmInt c _),           CmmLit (CmmInt n _)]          _-    | fromInteger insns <= maxInlineMemsetInsns dflags && align .&. 3 == 0 = do+    | fromInteger insns <= maxInlineMemsetInsns dflags = do         code_dst <- getAnyReg dst         dst_r <- getNewRegNat format-        return $ code_dst dst_r `appOL` go dst_r (fromInteger n)+        if format == II64 && n >= 8 then do+          code_imm8byte <- getAnyReg (CmmLit (CmmInt c8 W64))+          imm8byte_r <- getNewRegNat II64+          return $ code_dst dst_r `appOL`+                   code_imm8byte imm8byte_r `appOL`+                   go8 dst_r imm8byte_r (fromInteger n)+        else+          return $ code_dst dst_r `appOL`+                   go4 dst_r (fromInteger n)   where-    (format, val) = case align .&. 3 of-        2 -> (II16, c2)-        0 -> (II32, c4)-        _ -> (II8, c)+    maxAlignment = wordAlignment dflags -- only machine word wide MOVs are supported+    effectiveAlignment = min (alignmentOf align) maxAlignment+    format = intFormat . widthFromBytes $ alignmentBytes effectiveAlignment     c2 = c `shiftL` 8 .|. c     c4 = c2 `shiftL` 16 .|. c2+    c8 = c4 `shiftL` 32 .|. c4      -- The number of instructions we will generate (approx). We need 1     -- instructions per move.@@ -2255,26 +2252,46 @@     sizeBytes :: Integer     sizeBytes = fromIntegral (formatInBytes format) -    go :: Reg -> Integer -> OrdList Instr-    go dst i-        -- TODO: Add movabs instruction and support 64-bit sets.-        | i >= sizeBytes =  -- This might be smaller than the below sizes-            unitOL (MOV format (OpImm (ImmInteger val)) (OpAddr dst_addr)) `appOL`-            go dst (i - sizeBytes)-        | i >= 4 =  -- Will never happen on 32-bit-            unitOL (MOV II32 (OpImm (ImmInteger c4)) (OpAddr dst_addr)) `appOL`-            go dst (i - 4)-        | i >= 2 =-            unitOL (MOV II16 (OpImm (ImmInteger c2)) (OpAddr dst_addr)) `appOL`-            go dst (i - 2)-        | i >= 1 =-            unitOL (MOV II8 (OpImm (ImmInteger c)) (OpAddr dst_addr)) `appOL`-            go dst (i - 1)-        | otherwise = nilOL+    -- Depending on size returns the widest MOV instruction and its+    -- width.+    gen4 :: AddrMode -> Integer -> (InstrBlock, Integer)+    gen4 addr size+        | size >= 4 =+            (unitOL (MOV II32 (OpImm (ImmInteger c4)) (OpAddr addr)), 4)+        | size >= 2 =+            (unitOL (MOV II16 (OpImm (ImmInteger c2)) (OpAddr addr)), 2)+        | size >= 1 =+            (unitOL (MOV II8 (OpImm (ImmInteger c)) (OpAddr addr)), 1)+        | otherwise = (nilOL, 0)++    -- Generates a 64-bit wide MOV instruction from REG to MEM.+    gen8 :: AddrMode -> Reg -> InstrBlock+    gen8 addr reg8byte =+      unitOL (MOV format (OpReg reg8byte) (OpAddr addr))++    -- Unrolls memset when the widest MOV is <= 4 bytes.+    go4 :: Reg -> Integer -> InstrBlock+    go4 dst left =+      if left <= 0 then nilOL+      else curMov `appOL` go4 dst (left - curWidth)       where-        dst_addr = AddrBaseIndex (EABaseReg dst) EAIndexNone-                   (ImmInteger (n - i))+        possibleWidth = minimum [left, sizeBytes]+        dst_addr = AddrBaseIndex (EABaseReg dst) EAIndexNone (ImmInteger (n - left))+        (curMov, curWidth) = gen4 dst_addr possibleWidth +    -- Unrolls memset when the widest MOV is 8 bytes (thus another Reg+    -- argument). Falls back to go4 when all 8 byte moves are+    -- exhausted.+    go8 :: Reg -> Reg -> Integer -> InstrBlock+    go8 dst reg8byte left =+      if possibleWidth >= 8 then+        let curMov = gen8 dst_addr reg8byte+        in  curMov `appOL` go8 dst reg8byte (left - 8)+      else go4 dst left+      where+        possibleWidth = minimum [left, sizeBytes]+        dst_addr = AddrBaseIndex (EABaseReg dst) EAIndexNone (ImmInteger (n - left))+ genCCall' _ _ (PrimTarget MO_ReadBarrier) _ _ _  = return nilOL genCCall' _ _ (PrimTarget MO_WriteBarrier) _ _ _ = return nilOL         -- barriers compile to no code on x86/x86-64;@@ -2305,8 +2322,7 @@  genCCall' dflags is32Bit (PrimTarget (MO_BSwap width)) [dst] [src] _ = do     let platform = targetPlatform dflags-    use_sse2 <- sse2Enabled-    let dst_r = getRegisterReg platform use_sse2 (CmmLocal dst)+    let dst_r = getRegisterReg platform (CmmLocal dst)     case width of         W64 | is32Bit -> do                ChildCode64 vcode rlo <- iselExpr64 src@@ -2333,7 +2349,7 @@     if sse4_2         then do code_src <- getAnyReg src                 src_r <- getNewRegNat format-                let dst_r = getRegisterReg platform False (CmmLocal dst)+                let dst_r = getRegisterReg platform  (CmmLocal dst)                 return $ code_src src_r `appOL`                     (if width == W8 then                          -- The POPCNT instruction doesn't take a r/m8@@ -2360,13 +2376,12 @@ genCCall' dflags is32Bit (PrimTarget (MO_Pdep width)) dest_regs@[dst]          args@[src, mask] bid = do     let platform = targetPlatform dflags-    use_sse2 <- sse2Enabled     if isBmi2Enabled dflags         then do code_src  <- getAnyReg src                 code_mask <- getAnyReg mask                 src_r     <- getNewRegNat format                 mask_r    <- getNewRegNat format-                let dst_r = getRegisterReg platform use_sse2 (CmmLocal dst)+                let dst_r = getRegisterReg platform  (CmmLocal dst)                 return $ code_src src_r `appOL` code_mask mask_r `appOL`                     (if width == W8 then                          -- The PDEP instruction doesn't take a r/m8@@ -2394,13 +2409,12 @@ genCCall' dflags is32Bit (PrimTarget (MO_Pext width)) dest_regs@[dst]          args@[src, mask] bid = do     let platform = targetPlatform dflags-    use_sse2 <- sse2Enabled     if isBmi2Enabled dflags         then do code_src  <- getAnyReg src                 code_mask <- getAnyReg mask                 src_r     <- getNewRegNat format                 mask_r    <- getNewRegNat format-                let dst_r = getRegisterReg platform use_sse2 (CmmLocal dst)+                let dst_r = getRegisterReg platform  (CmmLocal dst)                 return $ code_src src_r `appOL` code_mask mask_r `appOL`                     (if width == W8 then                          -- The PEXT instruction doesn't take a r/m8@@ -2436,25 +2450,37 @@    | otherwise = do     code_src <- getAnyReg src-    src_r <- getNewRegNat format-    tmp_r <- getNewRegNat format-    let dst_r = getRegisterReg platform False (CmmLocal dst)--    -- The following insn sequence makes sure 'clz 0' has a defined value.-    -- starting with Haswell, one could use the LZCNT insn instead.-    return $ code_src src_r `appOL` toOL-             ([ MOVZxL  II8    (OpReg src_r) (OpReg src_r) | width == W8 ] ++-              [ BSR     format (OpReg src_r) tmp_r-              , MOV     II32   (OpImm (ImmInt (2*bw-1))) (OpReg dst_r)-              , CMOV NE format (OpReg tmp_r) dst_r-              , XOR     format (OpImm (ImmInt (bw-1))) (OpReg dst_r)-              ]) -- NB: We don't need to zero-extend the result for the-                 -- W8/W16 cases because the 'MOV' insn already-                 -- took care of implicitly clearing the upper bits+    let dst_r = getRegisterReg platform (CmmLocal dst)+    if isBmi2Enabled dflags+        then do+            src_r <- getNewRegNat (intFormat width)+            return $ appOL (code_src src_r) $ case width of+                W8 -> toOL+                    [ MOVZxL II8  (OpReg src_r)       (OpReg src_r) -- zero-extend to 32 bit+                    , LZCNT  II32 (OpReg src_r)       dst_r         -- lzcnt with extra 24 zeros+                    , SUB    II32 (OpImm (ImmInt 24)) (OpReg dst_r) -- compensate for extra zeros+                    ]+                W16 -> toOL+                    [ LZCNT  II16 (OpReg src_r) dst_r+                    , MOVZxL II16 (OpReg dst_r) (OpReg dst_r) -- zero-extend from 16 bit+                    ]+                _ -> unitOL (LZCNT (intFormat width) (OpReg src_r) dst_r)+        else do+            let format = if width == W8 then II16 else intFormat width+            src_r <- getNewRegNat format+            tmp_r <- getNewRegNat format+            return $ code_src src_r `appOL` toOL+                     ([ MOVZxL  II8    (OpReg src_r) (OpReg src_r) | width == W8 ] +++                      [ BSR     format (OpReg src_r) tmp_r+                      , MOV     II32   (OpImm (ImmInt (2*bw-1))) (OpReg dst_r)+                      , CMOV NE format (OpReg tmp_r) dst_r+                      , XOR     format (OpImm (ImmInt (bw-1))) (OpReg dst_r)+                      ]) -- NB: We don't need to zero-extend the result for the+                         -- W8/W16 cases because the 'MOV' insn already+                         -- took care of implicitly clearing the upper bits   where     bw = widthInBits width     platform = targetPlatform dflags-    format = if width == W8 then II16 else intFormat width     lbl = mkCmmCodeLabel primUnitId (fsLit (clzLabel width))  genCCall' dflags is32Bit (PrimTarget (MO_UF_Conv width)) dest_regs args bid = do@@ -2470,9 +2496,8 @@ genCCall' dflags _ (PrimTarget (MO_AtomicRead width)) [dst] [addr] _ = do   load_code <- intLoadCode (MOV (intFormat width)) addr   let platform = targetPlatform dflags-  use_sse2 <- sse2Enabled -  return (load_code (getRegisterReg platform use_sse2 (CmmLocal dst)))+  return (load_code (getRegisterReg platform  (CmmLocal dst)))  genCCall' _ _ (PrimTarget (MO_AtomicWrite width)) [] [addr, val] _ = do     code <- assignMem_IntCode (intFormat width) addr val@@ -2482,14 +2507,13 @@     -- On x86 we don't have enough registers to use cmpxchg with a     -- complicated addressing mode, so on that architecture we     -- pre-compute the address first.-    use_sse2 <- sse2Enabled     Amode amode addr_code <- getSimpleAmode dflags is32Bit addr     newval <- getNewRegNat format     newval_code <- getAnyReg new     oldval <- getNewRegNat format     oldval_code <- getAnyReg old     let platform = targetPlatform dflags-        dst_r    = getRegisterReg platform use_sse2 (CmmLocal dst)+        dst_r    = getRegisterReg platform  (CmmLocal dst)         code     = toOL                    [ MOV format (OpReg oldval) (OpReg eax)                    , LOCK (CMPXCHG format (OpReg newval) (OpAddr amode))@@ -2503,14 +2527,12 @@ genCCall' _ is32Bit target dest_regs args bid = do   dflags <- getDynFlags   let platform = targetPlatform dflags-      sse2     = isSse2Enabled dflags   case (target, dest_regs) of     -- void return type prim op     (PrimTarget op, []) ->         outOfLineCmmOp bid op Nothing args     -- we only cope with a single result for foreign calls-    (PrimTarget op, [r])-      | sse2 -> case op of+    (PrimTarget op, [r])  -> case op of           MO_F32_Fabs -> case args of             [x] -> sse2FabsCode W32 x             _ -> panic "genCCall: Wrong number of arguments for fabs"@@ -2521,36 +2543,16 @@           MO_F32_Sqrt -> actuallyInlineSSE2Op (\fmt r -> SQRT fmt (OpReg r)) FF32 args           MO_F64_Sqrt -> actuallyInlineSSE2Op (\fmt r -> SQRT fmt (OpReg r)) FF64 args           _other_op -> outOfLineCmmOp bid op (Just r) args-      | otherwise -> do-        l1 <- getNewLabelNat-        l2 <- getNewLabelNat-        if sse2-          then outOfLineCmmOp bid op (Just r) args-          else case op of-              MO_F32_Sqrt -> actuallyInlineFloatOp GSQRT FF32 args-              MO_F64_Sqrt -> actuallyInlineFloatOp GSQRT FF64 args -              MO_F32_Sin  -> actuallyInlineFloatOp (\s -> GSIN s l1 l2) FF32 args-              MO_F64_Sin  -> actuallyInlineFloatOp (\s -> GSIN s l1 l2) FF64 args--              MO_F32_Cos  -> actuallyInlineFloatOp (\s -> GCOS s l1 l2) FF32 args-              MO_F64_Cos  -> actuallyInlineFloatOp (\s -> GCOS s l1 l2) FF64 args--              MO_F32_Tan  -> actuallyInlineFloatOp (\s -> GTAN s l1 l2) FF32 args-              MO_F64_Tan  -> actuallyInlineFloatOp (\s -> GTAN s l1 l2) FF64 args--              _other_op   -> outOfLineCmmOp bid op (Just r) args-        where-        actuallyInlineFloatOp = actuallyInlineFloatOp' False-        actuallyInlineSSE2Op = actuallyInlineFloatOp' True+        actuallyInlineSSE2Op = actuallyInlineFloatOp' -        actuallyInlineFloatOp' usesSSE instr format [x]+        actuallyInlineFloatOp'  instr format [x]               = do res <- trivialUFCode format (instr format) x                    any <- anyReg res-                   return (any (getRegisterReg platform usesSSE (CmmLocal r)))+                   return (any (getRegisterReg platform  (CmmLocal r))) -        actuallyInlineFloatOp' _ _ _ args+        actuallyInlineFloatOp' _ _ args               = panic $ "genCCall.actuallyInlineFloatOp': bad number of arguments! ("                       ++ show (length args) ++ ")" @@ -2561,7 +2563,7 @@           let             const | FF32 <- fmt = CmmInt 0x7fffffff W32                   | otherwise   = CmmInt 0x7fffffffffffffff W64-          Amode amode amode_code <- memConstant (widthInBytes w) const+          Amode amode amode_code <- memConstant (mkAlignment $ widthInBytes w) const           tmp <- getNewRegNat fmt           let             code dst = x_code dst `appOL` amode_code `appOL` toOL [@@ -2569,7 +2571,7 @@                 AND fmt (OpReg tmp) (OpReg dst)                 ] -          return $ code (getRegisterReg platform True (CmmLocal r))+          return $ code (getRegisterReg platform (CmmLocal r))      (PrimTarget (MO_S_QuotRem  width), _) -> divOp1 platform True  width dest_regs args     (PrimTarget (MO_U_QuotRem  width), _) -> divOp1 platform False width dest_regs args@@ -2581,8 +2583,8 @@                let format = intFormat width                lCode <- anyReg =<< trivialCode width (ADD_CC format)                                      (Just (ADD_CC format)) arg_x arg_y-               let reg_l = getRegisterReg platform True (CmmLocal res_l)-                   reg_h = getRegisterReg platform True (CmmLocal res_h)+               let reg_l = getRegisterReg platform (CmmLocal res_l)+                   reg_h = getRegisterReg platform (CmmLocal res_h)                    code = hCode reg_h `appOL`                           lCode reg_l `snocOL`                           ADC format (OpImm (ImmInteger 0)) (OpReg reg_h)@@ -2602,8 +2604,8 @@             do (y_reg, y_code) <- getRegOrMem arg_y                x_code <- getAnyReg arg_x                let format = intFormat width-                   reg_h = getRegisterReg platform True (CmmLocal res_h)-                   reg_l = getRegisterReg platform True (CmmLocal res_l)+                   reg_h = getRegisterReg platform (CmmLocal res_h)+                   reg_l = getRegisterReg platform (CmmLocal res_l)                    code = y_code `appOL`                           x_code rax `appOL`                           toOL [MUL2 format y_reg,@@ -2639,8 +2641,8 @@         divOp platform signed width [res_q, res_r]               m_arg_x_high arg_x_low arg_y             = do let format = intFormat width-                     reg_q = getRegisterReg platform True (CmmLocal res_q)-                     reg_r = getRegisterReg platform True (CmmLocal res_r)+                     reg_q = getRegisterReg platform (CmmLocal res_q)+                     reg_r = getRegisterReg platform (CmmLocal res_r)                      widen | signed    = CLTD format                            | otherwise = XOR format (OpReg rdx) (OpReg rdx)                      instr | signed    = IDIV@@ -2667,8 +2669,8 @@                  rCode <- anyReg =<< trivialCode width (instr format)                                        (mrevinstr format) arg_x arg_y                  reg_tmp <- getNewRegNat II8-                 let reg_c = getRegisterReg platform True (CmmLocal res_c)-                     reg_r = getRegisterReg platform True (CmmLocal res_r)+                 let reg_c = getRegisterReg platform  (CmmLocal res_c)+                     reg_r = getRegisterReg platform  (CmmLocal res_r)                      code = rCode reg_r `snocOL`                             SETCC cond (OpReg reg_tmp) `snocOL`                             MOVZxL II8 (OpReg reg_tmp) (OpReg reg_c)@@ -2712,8 +2714,7 @@         delta0 <- getDeltaNat         setDeltaNat (delta0 - arg_pad_size) -        use_sse2 <- sse2Enabled-        push_codes <- mapM (push_arg use_sse2) (reverse prom_args)+        push_codes <- mapM push_arg (reverse prom_args)         delta <- getDeltaNat         MASSERT(delta == delta0 - tot_arg_size) @@ -2766,18 +2767,21 @@             assign_code []     = nilOL             assign_code [dest]               | isFloatType ty =-                 if use_sse2-                    then let tmp_amode = AddrBaseIndex (EABaseReg esp)+                  -- we assume SSE2+                  let tmp_amode = AddrBaseIndex (EABaseReg esp)                                                        EAIndexNone                                                        (ImmInt 0)-                             fmt = floatFormat w+                      fmt = floatFormat w                          in toOL [ SUB II32 (OpImm (ImmInt b)) (OpReg esp),                                    DELTA (delta0 - b),-                                   GST fmt fake0 tmp_amode,+                                   X87Store fmt  tmp_amode,+                                   -- X87Store only supported for the CDECL ABI+                                   -- NB: This code will need to be+                                   -- revisted once GHC does more work around+                                   -- SIGFPE f                                    MOV fmt (OpAddr tmp_amode) (OpReg r_dest),                                    ADD II32 (OpImm (ImmInt b)) (OpReg esp),                                    DELTA delta0]-                    else unitOL (GMOV fake0 r_dest)               | isWord64 ty    = toOL [MOV II32 (OpReg eax) (OpReg r_dest),                                         MOV II32 (OpReg edx) (OpReg r_dest_hi)]               | otherwise      = unitOL (MOV (intFormat w)@@ -2788,7 +2792,7 @@                     w  = typeWidth ty                     b  = widthInBytes w                     r_dest_hi = getHiVRegFromLo r_dest-                    r_dest    = getRegisterReg platform use_sse2 (CmmLocal dest)+                    r_dest    = getRegisterReg platform  (CmmLocal dest)             assign_code many = pprPanic "genCCall.assign_code - too many return values:" (ppr many)          return (push_code `appOL`@@ -2803,10 +2807,10 @@         roundTo a x | x `mod` a == 0 = x                     | otherwise = x + a - (x `mod` a) -        push_arg :: Bool -> CmmActual {-current argument-}+        push_arg :: CmmActual {-current argument-}                         -> NatM InstrBlock  -- code -        push_arg use_sse2 arg -- we don't need the hints on x86+        push_arg  arg -- we don't need the hints on x86           | isWord64 arg_ty = do             ChildCode64 code r_lo <- iselExpr64 arg             delta <- getDeltaNat@@ -2830,9 +2834,10 @@                                                             (ImmInt 0)                                       format = floatFormat (typeWidth arg_ty)                                   in-                                  if use_sse2-                                     then MOV format (OpReg reg) (OpAddr addr)-                                     else GST format reg addr++                                  -- assume SSE2+                                   MOV format (OpReg reg) (OpAddr addr)+                                  ]                            ) @@ -2960,7 +2965,7 @@                 _ -> unitOL (MOV (cmmTypeFormat rep) (OpReg rax) (OpReg r_dest))           where                 rep = localRegType dest-                r_dest = getRegisterReg platform True (CmmLocal dest)+                r_dest = getRegisterReg platform  (CmmLocal dest)         assign_code _many = panic "genCCall.assign_code many"      return (adjust_rsp          `appOL`@@ -3118,6 +3123,8 @@       let target = ForeignTarget targetExpr                            (ForeignConvention CCallConv [] [] CmmMayReturn) +      -- We know foreign calls results in no new basic blocks, so we can ignore+      -- the returned block id.       (instrs, _) <- stmtToInstrs bid (CmmUnsafeForeignCall target (catMaybes [res]) args)       return instrs   where@@ -3133,7 +3140,9 @@               MO_F32_Cos   -> fsLit "cosf"               MO_F32_Tan   -> fsLit "tanf"               MO_F32_Exp   -> fsLit "expf"+              MO_F32_ExpM1 -> fsLit "expm1f"               MO_F32_Log   -> fsLit "logf"+              MO_F32_Log1P -> fsLit "log1pf"                MO_F32_Asin  -> fsLit "asinf"               MO_F32_Acos  -> fsLit "acosf"@@ -3154,7 +3163,9 @@               MO_F64_Cos   -> fsLit "cos"               MO_F64_Tan   -> fsLit "tan"               MO_F64_Exp   -> fsLit "exp"+              MO_F64_ExpM1 -> fsLit "expm1"               MO_F64_Log   -> fsLit "log"+              MO_F64_Log1P -> fsLit "log1p"                MO_F64_Asin  -> fsLit "asin"               MO_F64_Acos  -> fsLit "acos"@@ -3176,6 +3187,10 @@                MO_PopCnt _  -> fsLit "popcnt"               MO_BSwap _   -> fsLit "bswap"+              {- Here the C implementation is used as there is no x86+              instruction to reverse a word's bit order.+              -}+              MO_BRev w    -> fsLit $ bRevLabel w               MO_Clz w     -> fsLit $ clzLabel w               MO_Ctz _     -> unsupported @@ -3288,7 +3303,7 @@                           where blockLabel = blockLbl blockid                   in map jumpTableEntryRel ids             | otherwise = map (jumpTableEntry dflags) ids-      in CmmData section (1, Statics lbl jumpTable)+      in CmmData section (mkAlignment 1, Statics lbl jumpTable)  extractUnwindPoints :: [Instr] -> [UnwindPoint] extractUnwindPoints instrs =@@ -3371,18 +3386,10 @@ -- and plays better with the uOP cache.  condFltReg :: Bool -> Cond -> CmmExpr -> CmmExpr -> NatM Register-condFltReg is32Bit cond x y = if_sse2 condFltReg_sse2 condFltReg_x87+condFltReg is32Bit cond x y = condFltReg_sse2  where-  condFltReg_x87 = do-    CondCode _ cond cond_code <- condFltCode cond x y-    tmp <- getNewRegNat II8-    let-        code dst = cond_code `appOL` toOL [-                    SETCC cond (OpReg tmp),-                    MOVZxL II8 (OpReg tmp) (OpReg dst)-                  ]-    return (Any II32 code) +   condFltReg_sse2 = do     CondCode _ cond cond_code <- condFltCode cond x y     tmp1 <- getNewRegNat (archWordFormat is32Bit)@@ -3545,18 +3552,6 @@  ----------- -trivialFCode_x87 :: (Format -> Reg -> Reg -> Reg -> Instr)-                 -> CmmExpr -> CmmExpr -> NatM Register-trivialFCode_x87 instr x y = do-  (x_reg, x_code) <- getNonClobberedReg x -- these work for float regs too-  (y_reg, y_code) <- getSomeReg y-  let-     format = FF80 -- always, on x87-     code dst =-        x_code `appOL`-        y_code `snocOL`-        instr format x_reg y_reg dst-  return (Any format code)  trivialFCode_sse2 :: Width -> (Format -> Operand -> Operand -> Instr)                   -> CmmExpr -> CmmExpr -> NatM Register@@ -3577,17 +3572,8 @@  -------------------------------------------------------------------------------- coerceInt2FP :: Width -> Width -> CmmExpr -> NatM Register-coerceInt2FP from to x = if_sse2 coerce_sse2 coerce_x87+coerceInt2FP from to x =  coerce_sse2  where-   coerce_x87 = do-     (x_reg, x_code) <- getSomeReg x-     let-           opc  = case to of W32 -> GITOF; W64 -> GITOD;-                             n -> panic $ "coerceInt2FP.x87: unhandled width ("-                                         ++ show n ++ ")"-           code dst = x_code `snocOL` opc x_reg dst-        -- ToDo: works for non-II32 reps?-     return (Any FF80 code)     coerce_sse2 = do      (x_op, x_code) <- getOperand x  -- ToDo: could be a safe operand@@ -3601,18 +3587,8 @@  -------------------------------------------------------------------------------- coerceFP2Int :: Width -> Width -> CmmExpr -> NatM Register-coerceFP2Int from to x = if_sse2 coerceFP2Int_sse2 coerceFP2Int_x87+coerceFP2Int from to x =  coerceFP2Int_sse2  where-   coerceFP2Int_x87 = do-     (x_reg, x_code) <- getSomeReg x-     let-           opc  = case from of W32 -> GFTOI; W64 -> GDTOI-                               n -> panic $ "coerceFP2Int.x87: unhandled width ("-                                           ++ show n ++ ")"-           code dst = x_code `snocOL` opc x_reg dst-        -- ToDo: works for non-II32 reps?-     return (Any (intFormat to) code)-    coerceFP2Int_sse2 = do      (x_op, x_code) <- getOperand x  -- ToDo: could be a safe operand      let@@ -3627,15 +3603,13 @@ -------------------------------------------------------------------------------- coerceFP2FP :: Width -> CmmExpr -> NatM Register coerceFP2FP to x = do-  use_sse2 <- sse2Enabled   (x_reg, x_code) <- getSomeReg x   let-        opc | use_sse2  = case to of W32 -> CVTSD2SS; W64 -> CVTSS2SD;+        opc  = case to of W32 -> CVTSD2SS; W64 -> CVTSS2SD;                                      n -> panic $ "coerceFP2FP: unhandled width ("                                                  ++ show n ++ ")"-            | otherwise = GDTOF         code dst = x_code `snocOL` opc x_reg dst-  return (Any (if use_sse2 then floatFormat to else FF80) code)+  return (Any ( floatFormat to) code)  -------------------------------------------------------------------------------- @@ -3652,10 +3626,10 @@       x@II16 -> wrongFmt x       x@II32 -> wrongFmt x       x@II64 -> wrongFmt x-      x@FF80 -> wrongFmt x+       where         wrongFmt x = panic $ "sse2NegCode: " ++ show x-  Amode amode amode_code <- memConstant (widthInBytes w) const+  Amode amode amode_code <- memConstant (mkAlignment $ widthInBytes w) const   tmp <- getNewRegNat fmt   let     code dst = x_code dst `appOL` amode_code `appOL` toOL [@@ -3692,7 +3666,7 @@ -- | This works on the invariant that all jumps in the given blocks are required. --   Starting from there we try to make a few more jumps redundant by reordering --   them.---   We depend on the information in the CFG to do so. Without a given CFG+--   We depend on the information in the CFG to do so so without a given CFG --   we do nothing. invertCondBranches :: Maybe CFG  -- ^ CFG if present                    -> LabelMap a -- ^ Blocks with info tables@@ -3718,7 +3692,7 @@       , Just edgeInfo2 <- getEdgeInfo lbl1 target2 cfg       -- Both jumps come from the same cmm statement       , transitionSource edgeInfo1 == transitionSource edgeInfo2-      , CmmSource cmmCondBranch <- transitionSource edgeInfo1+      , CmmSource {trans_cmmNode = cmmCondBranch} <- transitionSource edgeInfo1        --Int comparisons are invertable       , CmmCondBranch (CmmMachOp op _args) _ _ _ <- cmmCondBranch
nativeGen/X86/Instr.hs view
@@ -10,12 +10,11 @@  module X86.Instr (Instr(..), Operand(..), PrefetchVariant(..), JumpDest(..),                   getJumpDestBlockId, canShortcut, shortcutStatics,-                  shortcutJump, i386_insert_ffrees, allocMoreStack,+                  shortcutJump, allocMoreStack,                   maxSpillSlots, archWordFormat ) where  #include "HsVersions.h"-#include "nativeGen/NCG.h"  import GhcPrelude @@ -30,11 +29,11 @@ import BlockId import Hoopl.Collections import Hoopl.Label-import CodeGen.Platform+import GHC.Platform.Regs import Cmm import FastString import Outputable-import Platform+import GHC.Platform  import BasicTypes       (Alignment) import CLabel@@ -240,46 +239,14 @@         | BT          Format Imm Operand         | NOP -        -- x86 Float Arithmetic.-        -- Note that we cheat by treating G{ABS,MOV,NEG} of doubles-        -- as single instructions right up until we spit them out.-        -- all the 3-operand fake fp insns are src1 src2 dst-        -- and furthermore are constrained to be fp regs only.-        -- IMPORTANT: keep is_G_insn up to date with any changes here-        | GMOV        Reg Reg -- src(fpreg), dst(fpreg)-        | GLD         Format AddrMode Reg -- src, dst(fpreg)-        | GST         Format Reg AddrMode -- src(fpreg), dst -        | GLDZ        Reg -- dst(fpreg)-        | GLD1        Reg -- dst(fpreg)--        | GFTOI       Reg Reg -- src(fpreg), dst(intreg)-        | GDTOI       Reg Reg -- src(fpreg), dst(intreg)--        | GITOF       Reg Reg -- src(intreg), dst(fpreg)-        | GITOD       Reg Reg -- src(intreg), dst(fpreg)--        | GDTOF       Reg Reg -- src(fpreg), dst(fpreg)--        | GADD        Format Reg Reg Reg -- src1, src2, dst-        | GDIV        Format Reg Reg Reg -- src1, src2, dst-        | GSUB        Format Reg Reg Reg -- src1, src2, dst-        | GMUL        Format Reg Reg Reg -- src1, src2, dst--                -- FP compare.  Cond must be `elem` [EQQ, NE, LE, LTT, GE, GTT]-                -- Compare src1 with src2; set the Zero flag iff the numbers are-                -- comparable and the comparison is True.  Subsequent code must-                -- test the %eflags zero flag regardless of the supplied Cond.-        | GCMP        Cond Reg Reg -- src1, src2--        | GABS        Format Reg Reg -- src, dst-        | GNEG        Format Reg Reg -- src, dst-        | GSQRT       Format Reg Reg -- src, dst-        | GSIN        Format CLabel CLabel Reg Reg -- src, dst-        | GCOS        Format CLabel CLabel Reg Reg -- src, dst-        | GTAN        Format CLabel CLabel Reg Reg -- src, dst--        | GFREE         -- do ffree on all x86 regs; an ugly hack+        -- We need to support the FSTP (x87 store and pop) instruction+        -- so that we can correctly read off the return value of an+        -- x86 CDECL C function call when its floating point.+        -- so we dont include a register argument, and just use st(0)+        -- this instruction is used ONLY for return values of C ffi calls+        -- in x86_32 abi+        | X87Store         Format  AddrMode -- st(0), dst           -- SSE2 floating point: we use a restricted set of the available SSE2@@ -344,6 +311,8 @@      -- bit counting instructions         | POPCNT      Format Operand Reg -- [SSE4.2] count number of bits set to 1+        | LZCNT       Format Operand Reg -- [BMI2] count number of leading zeros+        | TZCNT       Format Operand Reg -- [BMI2] count number of trailing zeros         | BSF         Format Operand Reg -- bit scan forward         | BSR         Format Operand Reg -- bit scan reverse @@ -427,33 +396,7 @@     CLTD   _            -> mkRU [eax] [edx]     NOP                 -> mkRU [] [] -    GMOV   src dst      -> mkRU [src] [dst]-    GLD    _ src dst    -> mkRU (use_EA src []) [dst]-    GST    _ src dst    -> mkRUR (src : use_EA dst [])--    GLDZ   dst          -> mkRU [] [dst]-    GLD1   dst          -> mkRU [] [dst]--    GFTOI  src dst      -> mkRU [src] [dst]-    GDTOI  src dst      -> mkRU [src] [dst]--    GITOF  src dst      -> mkRU [src] [dst]-    GITOD  src dst      -> mkRU [src] [dst]--    GDTOF  src dst      -> mkRU [src] [dst]--    GADD   _ s1 s2 dst  -> mkRU [s1,s2] [dst]-    GSUB   _ s1 s2 dst  -> mkRU [s1,s2] [dst]-    GMUL   _ s1 s2 dst  -> mkRU [s1,s2] [dst]-    GDIV   _ s1 s2 dst  -> mkRU [s1,s2] [dst]--    GCMP   _ src1 src2   -> mkRUR [src1,src2]-    GABS   _ src dst     -> mkRU [src] [dst]-    GNEG   _ src dst     -> mkRU [src] [dst]-    GSQRT  _ src dst     -> mkRU [src] [dst]-    GSIN   _ _ _ src dst -> mkRU [src] [dst]-    GCOS   _ _ _ src dst -> mkRU [src] [dst]-    GTAN   _ _ _ src dst -> mkRU [src] [dst]+    X87Store    _  dst    -> mkRUR ( use_EA dst [])      CVTSS2SD   src dst  -> mkRU [src] [dst]     CVTSD2SS   src dst  -> mkRU [src] [dst]@@ -473,6 +416,8 @@     DELTA   _           -> noUsage      POPCNT _ src dst -> mkRU (use_R src []) [dst]+    LZCNT  _ src dst -> mkRU (use_R src []) [dst]+    TZCNT  _ src dst -> mkRU (use_R src []) [dst]     BSF    _ src dst -> mkRU (use_R src []) [dst]     BSR    _ src dst -> mkRU (use_R src []) [dst] @@ -601,33 +546,8 @@     JMP op regs          -> JMP (patchOp op) regs     JMP_TBL op ids s lbl -> JMP_TBL (patchOp op) ids s lbl -    GMOV src dst         -> GMOV (env src) (env dst)-    GLD  fmt src dst     -> GLD fmt (lookupAddr src) (env dst)-    GST  fmt src dst     -> GST fmt (env src) (lookupAddr dst)--    GLDZ dst            -> GLDZ (env dst)-    GLD1 dst            -> GLD1 (env dst)--    GFTOI src dst       -> GFTOI (env src) (env dst)-    GDTOI src dst       -> GDTOI (env src) (env dst)--    GITOF src dst       -> GITOF (env src) (env dst)-    GITOD src dst       -> GITOD (env src) (env dst)--    GDTOF src dst       -> GDTOF (env src) (env dst)--    GADD fmt s1 s2 dst   -> GADD fmt (env s1) (env s2) (env dst)-    GSUB fmt s1 s2 dst   -> GSUB fmt (env s1) (env s2) (env dst)-    GMUL fmt s1 s2 dst   -> GMUL fmt (env s1) (env s2) (env dst)-    GDIV fmt s1 s2 dst   -> GDIV fmt (env s1) (env s2) (env dst)--    GCMP fmt src1 src2   -> GCMP fmt (env src1) (env src2)-    GABS fmt src dst     -> GABS fmt (env src) (env dst)-    GNEG fmt src dst     -> GNEG fmt (env src) (env dst)-    GSQRT fmt src dst    -> GSQRT fmt (env src) (env dst)-    GSIN fmt l1 l2 src dst       -> GSIN fmt l1 l2 (env src) (env dst)-    GCOS fmt l1 l2 src dst       -> GCOS fmt l1 l2 (env src) (env dst)-    GTAN fmt l1 l2 src dst       -> GTAN fmt l1 l2 (env src) (env dst)+    -- literally only support storing the top x87 stack value st(0)+    X87Store  fmt  dst     -> X87Store fmt  (lookupAddr dst)      CVTSS2SD src dst    -> CVTSS2SD (env src) (env dst)     CVTSD2SS src dst    -> CVTSD2SS (env src) (env dst)@@ -655,6 +575,8 @@     CLTD _              -> instr      POPCNT fmt src dst -> POPCNT fmt (patchOp src) (env dst)+    LZCNT  fmt src dst -> LZCNT  fmt (patchOp src) (env dst)+    TZCNT  fmt src dst -> TZCNT  fmt (patchOp src) (env dst)     PDEP   fmt src mask dst -> PDEP   fmt (patchOp src) (patchOp mask) (env dst)     PEXT   fmt src mask dst -> PEXT   fmt (patchOp src) (patchOp mask) (env dst)     BSF    fmt src dst -> BSF    fmt (patchOp src) (env dst)@@ -748,8 +670,7 @@     case targetClassOfReg platform reg of            RcInteger   -> MOV (archWordFormat is32Bit)                               (OpReg reg) (OpAddr (spRel dflags off))-           RcDouble    -> GST FF80 reg (spRel dflags off) {- RcFloat/RcDouble -}-           RcDoubleSSE -> MOV FF64 (OpReg reg) (OpAddr (spRel dflags off))+           RcDouble    -> MOV FF64 (OpReg reg) (OpAddr (spRel dflags off))            _         -> panic "X86.mkSpillInstr: no match"     where platform = targetPlatform dflags           is32Bit = target32Bit platform@@ -768,8 +689,7 @@         case targetClassOfReg platform reg of               RcInteger -> MOV (archWordFormat is32Bit)                                (OpAddr (spRel dflags off)) (OpReg reg)-              RcDouble  -> GLD FF80 (spRel dflags off) reg {- RcFloat/RcDouble -}-              RcDoubleSSE -> MOV FF64 (OpAddr (spRel dflags off)) (OpReg reg)+              RcDouble  -> MOV FF64 (OpAddr (spRel dflags off)) (OpReg reg)               _           -> panic "X86.x86_mkLoadInstr"     where platform = targetPlatform dflags           is32Bit = target32Bit platform@@ -823,6 +743,7 @@   +---  TODO: why is there -- | Make a reg-reg move instruction. --      On SPARC v8 there are no instructions to move directly between --      floating point and integer regs. If we need to do that then we@@ -840,8 +761,10 @@                      ArchX86    -> MOV II32 (OpReg src) (OpReg dst)                      ArchX86_64 -> MOV II64 (OpReg src) (OpReg dst)                      _          -> panic "x86_mkRegRegMoveInstr: Bad arch"-        RcDouble    -> GMOV src dst-        RcDoubleSSE -> MOV FF64 (OpReg src) (OpReg dst)+        RcDouble    ->  MOV FF64 (OpReg src) (OpReg dst)+        -- this code is the lie we tell ourselves because both float and double+        -- use the same register class.on x86_64 and x86 32bit with SSE2,+        -- more plainly, both use the XMM registers         _     -> panic "X86.RegInfo.mkRegRegMoveInstr: no match"  -- | Check whether an instruction represents a reg-reg move.@@ -942,7 +865,7 @@                            ]             ArchX86_64 | needs_probe_call platform amount ->                            [ MOV II64 (OpImm (ImmInt amount)) (OpReg rax)-                           , CALL (Left $ strImmLit "__chkstk_ms") [rax]+                           , CALL (Left $ strImmLit "___chkstk_ms") [rax]                            , SUB II64 (OpReg rax) (OpReg rsp)                            ]                        | otherwise ->@@ -965,58 +888,6 @@       ArchX86    -> [ADD II32 (OpImm (ImmInt amount)) (OpReg esp)]       ArchX86_64 -> [ADD II64 (OpImm (ImmInt amount)) (OpReg rsp)]       _ -> panic "x86_mkStackDeallocInstr"--i386_insert_ffrees-        :: [GenBasicBlock Instr]-        -> [GenBasicBlock Instr]--i386_insert_ffrees blocks-   | any (any is_G_instr) [ instrs | BasicBlock _ instrs <- blocks ]-   = map insertGFREEs blocks-   | otherwise-   = blocks- where-   insertGFREEs (BasicBlock id insns)-     = BasicBlock id (insertBeforeNonlocalTransfers GFREE insns)--insertBeforeNonlocalTransfers :: Instr -> [Instr] -> [Instr]-insertBeforeNonlocalTransfers insert insns-     = foldr p [] insns-     where p insn r = case insn of-                        CALL _ _    -> insert : insn : r-                        JMP _ _     -> insert : insn : r-                        JXX_GBL _ _ -> panic "insertBeforeNonlocalTransfers: cannot handle JXX_GBL"-                        _           -> insn : r----- if you ever add a new FP insn to the fake x86 FP insn set,--- you must update this too-is_G_instr :: Instr -> Bool-is_G_instr instr-   = case instr of-        GMOV{}          -> True-        GLD{}           -> True-        GST{}           -> True-        GLDZ{}          -> True-        GLD1{}          -> True-        GFTOI{}         -> True-        GDTOI{}         -> True-        GITOF{}         -> True-        GITOD{}         -> True-        GDTOF{}         -> True-        GADD{}          -> True-        GDIV{}          -> True-        GSUB{}          -> True-        GMUL{}          -> True-        GCMP{}          -> True-        GABS{}          -> True-        GNEG{}          -> True-        GSQRT{}         -> True-        GSIN{}          -> True-        GCOS{}          -> True-        GTAN{}          -> True-        GFREE           -> panic "is_G_instr: GFREE (!)"-        _               -> False   --
nativeGen/X86/Ppr.hs view
@@ -21,7 +21,6 @@ where  #include "HsVersions.h"-#include "nativeGen/NCG.h"  import GhcPrelude @@ -36,18 +35,17 @@  import Hoopl.Collections import Hoopl.Label-import BasicTypes       (Alignment)+import BasicTypes       (Alignment, mkAlignment, alignmentBytes) import DynFlags import Cmm              hiding (topInfoTable) import BlockId import CLabel import Unique           ( pprUniqueAlways )-import Platform+import GHC.Platform import FastString import Outputable  import Data.Word- import Data.Bits  -- -----------------------------------------------------------------------------@@ -73,7 +71,7 @@  pprProcAlignment :: SDoc pprProcAlignment = sdocWithDynFlags $ \dflags ->-  (maybe empty pprAlign . cmmProcAlignment $ dflags)+  (maybe empty (pprAlign . mkAlignment) (cmmProcAlignment dflags))  pprNatCmmDecl :: NatCmmDecl (Alignment, CmmStatics) Instr -> SDoc pprNatCmmDecl (CmmData section dats) =@@ -84,17 +82,14 @@   pprProcAlignment $$   case topInfoTable proc of     Nothing ->-       case blocks of-         []     -> -- special case for split markers:-           pprLabel lbl-         blocks -> -- special case for code without info table:-           pprSectionAlign (Section Text lbl) $$-           pprProcAlignment $$-           pprLabel lbl $$ -- blocks guaranteed not null, so label needed-           vcat (map (pprBasicBlock top_info) blocks) $$-           (if debugLevel dflags > 0-            then ppr (mkAsmTempEndLabel lbl) <> char ':' else empty) $$-           pprSizeDecl lbl+        -- special case for code without info table:+        pprSectionAlign (Section Text lbl) $$+        pprProcAlignment $$+        pprLabel lbl $$ -- blocks guaranteed not null, so label needed+        vcat (map (pprBasicBlock top_info) blocks) $$+        (if debugLevel dflags > 0+         then ppr (mkAsmTempEndLabel lbl) <> char ':' else empty) $$+        pprSizeDecl lbl      Just (Statics info_lbl _) ->       sdocWithPlatform $ \platform ->@@ -149,13 +144,24 @@       (l@LOCATION{} : _) -> pprInstr l       _other             -> empty + pprDatas :: (Alignment, CmmStatics) -> SDoc+-- See note [emit-time elimination of static indirections] in CLabel.+pprDatas (_, Statics alias [CmmStaticLit (CmmLabel lbl), CmmStaticLit ind, _, _])+  | lbl == mkIndStaticInfoLabel+  , let labelInd (CmmLabelOff l _) = Just l+        labelInd (CmmLabel l) = Just l+        labelInd _ = Nothing+  , Just ind' <- labelInd ind+  , alias `mayRedirectTo` ind'+  = pprGloblDecl alias+    $$ text ".equiv" <+> ppr alias <> comma <> ppr (CmmLabel ind')+ pprDatas (align, (Statics lbl dats))  = vcat (pprAlign align : pprLabel lbl : map pprData dats)  pprData :: CmmStatic -> SDoc-pprData (CmmString str)- = ptext (sLit "\t.asciz ") <> doubleQuotes (pprASCII str)+pprData (CmmString str) = pprBytes str  pprData (CmmUninitialised bytes)  = sdocWithPlatform $ \platform ->@@ -217,7 +223,7 @@     "      A good place to check for more-    https://ghc.haskell.org/trac/ghc/wiki/Commentary/PositionIndependentCode+    https://gitlab.haskell.org/ghc/ghc/wikis/commentary/position-independent-code      Another possible hack is to create an extra local function symbol for     every code-like thing to give the needed information for to the tools@@ -241,14 +247,15 @@             $$ pprTypeDecl lbl             $$ (ppr lbl <> char ':') -pprAlign :: Int -> SDoc-pprAlign bytes+pprAlign :: Alignment -> SDoc+pprAlign alignment         = sdocWithPlatform $ \platform ->-          text ".align " <> int (alignment platform)+          text ".align " <> int (alignmentOn platform)   where-        alignment platform = if platformOS platform == OSDarwin-                             then log2 bytes-                             else      bytes+        bytes = alignmentBytes alignment+        alignmentOn platform = if platformOS platform == OSDarwin+                               then log2 bytes+                               else      bytes          log2 :: Int -> Int  -- cache the common ones         log2 1 = 0@@ -276,7 +283,7 @@       RegVirtual (VirtualRegHi u)  -> text "%vHi_"  <> pprUniqueAlways u       RegVirtual (VirtualRegF  u)  -> text "%vF_"   <> pprUniqueAlways u       RegVirtual (VirtualRegD  u)  -> text "%vD_"   <> pprUniqueAlways u-      RegVirtual (VirtualRegSSE u) -> text "%vSSE_" <> pprUniqueAlways u+   where     ppr32_reg_no :: Format -> Int -> SDoc     ppr32_reg_no II8   = ppr32_reg_byte@@ -368,17 +375,14 @@  ppr_reg_float :: Int -> PtrString ppr_reg_float i = case i of-        16 -> sLit "%fake0";  17 -> sLit "%fake1"-        18 -> sLit "%fake2";  19 -> sLit "%fake3"-        20 -> sLit "%fake4";  21 -> sLit "%fake5"-        24 -> sLit "%xmm0";   25 -> sLit "%xmm1"-        26 -> sLit "%xmm2";   27 -> sLit "%xmm3"-        28 -> sLit "%xmm4";   29 -> sLit "%xmm5"-        30 -> sLit "%xmm6";   31 -> sLit "%xmm7"-        32 -> sLit "%xmm8";   33 -> sLit "%xmm9"-        34 -> sLit "%xmm10";  35 -> sLit "%xmm11"-        36 -> sLit "%xmm12";  37 -> sLit "%xmm13"-        38 -> sLit "%xmm14";  39 -> sLit "%xmm15"+        16 -> sLit "%xmm0" ;   17 -> sLit "%xmm1"+        18 -> sLit "%xmm2" ;   19 -> sLit "%xmm3"+        20 -> sLit "%xmm4" ;   21 -> sLit "%xmm5"+        22 -> sLit "%xmm6" ;   23 -> sLit "%xmm7"+        24 -> sLit "%xmm8" ;   25 -> sLit "%xmm9"+        26 -> sLit "%xmm10";   27 -> sLit "%xmm11"+        28 -> sLit "%xmm12";   29 -> sLit "%xmm13"+        30 -> sLit "%xmm14";   31 -> sLit "%xmm15"         _  -> sLit "very naughty x86 register"  pprFormat :: Format -> SDoc@@ -390,7 +394,6 @@                 II64  -> sLit "q"                 FF32  -> sLit "ss"      -- "scalar single-precision float" (SSE2)                 FF64  -> sLit "sd"      -- "scalar double-precision float" (SSE2)-                FF80  -> sLit "t"                 )  pprFormat_x87 :: Format -> SDoc@@ -398,9 +401,9 @@   = ptext $ case x of                 FF32  -> sLit "s"                 FF64  -> sLit "l"-                FF80  -> sLit "t"                 _     -> panic "X86.Ppr.pprFormat_x87" + pprCond :: Cond -> SDoc pprCond c  = ptext (case c of {@@ -693,6 +696,8 @@ pprInstr (XOR format src dst) = pprFormatOpOp (sLit "xor")  format src dst  pprInstr (POPCNT format src dst) = pprOpOp (sLit "popcnt") format src (OpReg dst)+pprInstr (LZCNT format src dst)  = pprOpOp (sLit "lzcnt")  format src (OpReg dst)+pprInstr (TZCNT format src dst)  = pprOpOp (sLit "tzcnt")  format src (OpReg dst) pprInstr (BSF format src dst)    = pprOpOp (sLit "bsf")    format src (OpReg dst) pprInstr (BSR format src dst)    = pprOpOp (sLit "bsr")    format src (OpReg dst) @@ -729,7 +734,7 @@         -- The mask must have the high bit clear for this smaller encoding         -- to be completely equivalent to the original; in particular so         -- that the signed comparison condition bits are the same as they-        -- would be if doing a full word comparison. See Trac #13425.+        -- would be if doing a full word comparison. See #13425.         (OpImm (ImmInteger mask), OpReg dstReg)           | 0 <= mask && mask < 128 -> minSizeOfReg platform dstReg         _ -> format@@ -809,225 +814,13 @@           ]  --- -------------------------------------------------------------------------------- i386 floating-point---- Simulating a flat register set on the x86 FP stack is tricky.--- you have to free %st(7) before pushing anything on the FP reg stack--- so as to preclude the possibility of a FP stack overflow exception.-pprInstr g@(GMOV src dst)-   | src == dst-   = empty-   | otherwise-   = pprG g (hcat [gtab, gpush src 0, gsemi, gpop dst 1])---- GLD fmt addr dst ==> FLDsz addr ; FSTP (dst+1)-pprInstr g@(GLD fmt addr dst)- = pprG g (hcat [gtab, text "fld", pprFormat_x87 fmt, gsp,-                 pprAddr addr, gsemi, gpop dst 1])-+-- the -- GST fmt src addr ==> FLD dst ; FSTPsz addr-pprInstr g@(GST fmt src addr)- | src == fake0 && fmt /= FF80 -- fstt instruction doesn't exist- = pprG g (hcat [gtab,-                 text "fst", pprFormat_x87 fmt, gsp, pprAddr addr])- | otherwise- = pprG g (hcat [gtab, gpush src 0, gsemi,+pprInstr g@(X87Store fmt  addr)+ = pprX87 g (hcat [gtab,                  text "fstp", pprFormat_x87 fmt, gsp, pprAddr addr]) -pprInstr g@(GLDZ dst)- = pprG g (hcat [gtab, text "fldz ; ", gpop dst 1])-pprInstr g@(GLD1 dst)- = pprG g (hcat [gtab, text "fld1 ; ", gpop dst 1]) -pprInstr (GFTOI src dst)-   = pprInstr (GDTOI src dst)--pprInstr g@(GDTOI src dst)-   = pprG g (vcat [-         hcat [gtab, text "subl $8, %esp ; fnstcw 4(%esp)"],-         hcat [gtab, gpush src 0],-         hcat [gtab, text "movzwl 4(%esp), ", reg,-                     text " ; orl $0xC00, ", reg],-         hcat [gtab, text "movl ", reg, text ", 0(%esp) ; fldcw 0(%esp)"],-         hcat [gtab, text "fistpl 0(%esp)"],-         hcat [gtab, text "fldcw 4(%esp) ; movl 0(%esp), ", reg],-         hcat [gtab, text "addl $8, %esp"]-     ])-   where-     reg = pprReg II32 dst--pprInstr (GITOF src dst)-   = pprInstr (GITOD src dst)--pprInstr g@(GITOD src dst)-   = pprG g (hcat [gtab, text "pushl ", pprReg II32 src,-                   text " ; fildl (%esp) ; ",-                   gpop dst 1, text " ; addl $4,%esp"])--pprInstr g@(GDTOF src dst)-  = pprG g (vcat [gtab <> gpush src 0,-                  gtab <> text "subl $4,%esp ; fstps (%esp) ; flds (%esp) ; addl $4,%esp ;",-                  gtab <> gpop dst 1])--{- Gruesome swamp follows.  If you're unfortunate enough to have ventured-   this far into the jungle AND you give a Rat's Ass (tm) what's going-   on, here's the deal.  Generate code to do a floating point comparison-   of src1 and src2, of kind cond, and set the Zero flag if true.--   The complications are to do with handling NaNs correctly.  We want the-   property that if either argument is NaN, then the result of the-   comparison is False ... except if we're comparing for inequality,-   in which case the answer is True.--   Here's how the general (non-inequality) case works.  As an-   example, consider generating the an equality test:--     pushl %eax         -- we need to mess with this-     <get src1 to top of FPU stack>-     fcomp <src2 location in FPU stack> and pop pushed src1-                -- Result of comparison is in FPU Status Register bits-                -- C3 C2 and C0-     fstsw %ax  -- Move FPU Status Reg to %ax-     sahf       -- move C3 C2 C0 from %ax to integer flag reg-     -- now the serious magic begins-     setpo %ah     -- %ah = if comparable(neither arg was NaN) then 1 else 0-     sete  %al     -- %al = if arg1 == arg2 then 1 else 0-     andb %ah,%al  -- %al &= %ah-                   -- so %al == 1 iff (comparable && same); else it holds 0-     decb %al      -- %al == 0, ZeroFlag=1  iff (comparable && same);-                      else %al == 0xFF, ZeroFlag=0-     -- the zero flag is now set as we desire.-     popl %eax--   The special case of inequality differs thusly:--     setpe %ah     -- %ah = if incomparable(either arg was NaN) then 1 else 0-     setne %al     -- %al = if arg1 /= arg2 then 1 else 0-     orb %ah,%al   -- %al = if (incomparable || different) then 1 else 0-     decb %al      -- if (incomparable || different) then (%al == 0, ZF=1)-                                                     else (%al == 0xFF, ZF=0)--}-pprInstr g@(GCMP cond src1 src2)-   | case cond of { NE -> True; _ -> False }-   = pprG g (vcat [-        hcat [gtab, text "pushl %eax ; ",gpush src1 0],-        hcat [gtab, text "fcomp ", greg src2 1,-                    text "; fstsw %ax ; sahf ;  setpe %ah"],-        hcat [gtab, text "setne %al ;  ",-              text "orb %ah,%al ;  decb %al ;  popl %eax"]-    ])-   | otherwise-   = pprG g (vcat [-        hcat [gtab, text "pushl %eax ; ",gpush src1 0],-        hcat [gtab, text "fcomp ", greg src2 1,-                    text "; fstsw %ax ; sahf ;  setpo %ah"],-        hcat [gtab, text "set", pprCond (fix_FP_cond cond), text " %al ;  ",-              text "andb %ah,%al ;  decb %al ;  popl %eax"]-    ])-    where-        {- On the 486, the flags set by FP compare are the unsigned ones!-           (This looks like a HACK to me.  WDP 96/03)-        -}-        fix_FP_cond :: Cond -> Cond-        fix_FP_cond GE   = GEU-        fix_FP_cond GTT  = GU-        fix_FP_cond LTT  = LU-        fix_FP_cond LE   = LEU-        fix_FP_cond EQQ  = EQQ-        fix_FP_cond NE   = NE-        fix_FP_cond _    = panic "X86.Ppr.fix_FP_cond: no match"-        -- there should be no others---pprInstr g@(GABS _ src dst)-   = pprG g (hcat [gtab, gpush src 0, text " ; fabs ; ", gpop dst 1])--pprInstr g@(GNEG _ src dst)-   = pprG g (hcat [gtab, gpush src 0, text " ; fchs ; ", gpop dst 1])--pprInstr g@(GSQRT fmt src dst)-   = pprG g (hcat [gtab, gpush src 0, text " ; fsqrt"] $$-             hcat [gtab, gcoerceto fmt, gpop dst 1])--pprInstr g@(GSIN fmt l1 l2 src dst)-   = pprG g (pprTrigOp "fsin" False l1 l2 src dst fmt)--pprInstr g@(GCOS fmt l1 l2 src dst)-   = pprG g (pprTrigOp "fcos" False l1 l2 src dst fmt)--pprInstr g@(GTAN fmt l1 l2 src dst)-   = pprG g (pprTrigOp "fptan" True l1 l2 src dst fmt)---- In the translations for GADD, GMUL, GSUB and GDIV,--- the first two cases are mere optimisations.  The otherwise clause--- generates correct code under all circumstances.--pprInstr g@(GADD _ src1 src2 dst)-   | src1 == dst-   = pprG g (text "\t#GADD-xxxcase1" $$-             hcat [gtab, gpush src2 0,-                   text " ; faddp %st(0),", greg src1 1])-   | src2 == dst-   = pprG g (text "\t#GADD-xxxcase2" $$-             hcat [gtab, gpush src1 0,-                   text " ; faddp %st(0),", greg src2 1])-   | otherwise-   = pprG g (hcat [gtab, gpush src1 0,-                   text " ; fadd ", greg src2 1, text ",%st(0)",-                   gsemi, gpop dst 1])---pprInstr g@(GMUL _ src1 src2 dst)-   | src1 == dst-   = pprG g (text "\t#GMUL-xxxcase1" $$-             hcat [gtab, gpush src2 0,-                   text " ; fmulp %st(0),", greg src1 1])-   | src2 == dst-   = pprG g (text "\t#GMUL-xxxcase2" $$-             hcat [gtab, gpush src1 0,-                   text " ; fmulp %st(0),", greg src2 1])-   | otherwise-   = pprG g (hcat [gtab, gpush src1 0,-             text " ; fmul ", greg src2 1, text ",%st(0)",-             gsemi, gpop dst 1])---pprInstr g@(GSUB _ src1 src2 dst)-   | src1 == dst-   = pprG g (text "\t#GSUB-xxxcase1" $$-             hcat [gtab, gpush src2 0,-                   text " ; fsubrp %st(0),", greg src1 1])-   | src2 == dst-   = pprG g (text "\t#GSUB-xxxcase2" $$-             hcat [gtab, gpush src1 0,-                   text " ; fsubp %st(0),", greg src2 1])-   | otherwise-   = pprG g (hcat [gtab, gpush src1 0,-                   text " ; fsub ", greg src2 1, text ",%st(0)",-                   gsemi, gpop dst 1])---pprInstr g@(GDIV _ src1 src2 dst)-   | src1 == dst-   = pprG g (text "\t#GDIV-xxxcase1" $$-             hcat [gtab, gpush src2 0,-                   text " ; fdivrp %st(0),", greg src1 1])-   | src2 == dst-   = pprG g (text "\t#GDIV-xxxcase2" $$-             hcat [gtab, gpush src1 0,-                   text " ; fdivp %st(0),", greg src2 1])-   | otherwise-   = pprG g (hcat [gtab, gpush src1 0,-                   text " ; fdiv ", greg src2 1, text ",%st(0)",-                   gsemi, gpop dst 1])---pprInstr GFREE-   = vcat [ text "\tffree %st(0) ;ffree %st(1) ;ffree %st(2) ;ffree %st(3)",-            text "\tffree %st(4) ;ffree %st(5)"-          ]- -- Atomics  pprInstr (LOCK i) = text "\tlock" $$ pprInstr i@@ -1040,116 +833,27 @@    = pprFormatOpOp (sLit "cmpxchg") format src dst  -pprTrigOp :: String -> Bool -> CLabel -> CLabel-          -> Reg -> Reg -> Format -> SDoc-pprTrigOp op -- fsin, fcos or fptan-          isTan -- we need a couple of extra steps if we're doing tan-          l1 l2 -- internal labels for us to use-          src dst fmt-    = -- We'll be needing %eax later on-      hcat [gtab, text "pushl %eax;"] $$-      -- tan is going to use an extra space on the FP stack-      (if isTan then hcat [gtab, text "ffree %st(6)"] else empty) $$-      -- First put the value in %st(0) and try to apply the op to it-      hcat [gpush src 0, text ("; " ++ op)] $$-      -- Now look to see if C2 was set (overflow, |value| >= 2^63)-      hcat [gtab, text "fnstsw %ax"] $$-      hcat [gtab, text "test   $0x400,%eax"] $$-      -- If we were in bounds then jump to the end-      hcat [gtab, text "je     " <> ppr l1] $$-      -- Otherwise we need to shrink the value. Start by-      -- loading pi, doubleing it (by adding it to itself),-      -- and then swapping pi with the value, so the value we-      -- want to apply op to is in %st(0) again-      hcat [gtab, text "ffree %st(7); fldpi"] $$-      hcat [gtab, text "fadd   %st(0),%st"] $$-      hcat [gtab, text "fxch   %st(1)"] $$-      -- Now we have a loop in which we make the value smaller,-      -- see if it's small enough, and loop if not-      (ppr l2 <> char ':') $$-      hcat [gtab, text "fprem1"] $$-      -- My Debian libc uses fstsw here for the tan code, but I can't-      -- see any reason why it should need to be different for tan.-      hcat [gtab, text "fnstsw %ax"] $$-      hcat [gtab, text "test   $0x400,%eax"] $$-      hcat [gtab, text "jne    " <> ppr l2] $$-      hcat [gtab, text "fstp   %st(1)"] $$-      hcat [gtab, text op] $$-      (ppr l1 <> char ':') $$-      -- Pop the 1.0 tan gave us-      (if isTan then hcat [gtab, text "fstp %st(0)"] else empty) $$-      -- Restore %eax-      hcat [gtab, text "popl %eax;"] $$-      -- And finally make the result the right size-      hcat [gtab, gcoerceto fmt, gpop dst 1]  --------------------------+-- some left over --- coerce %st(0) to the specified size-gcoerceto :: Format -> SDoc-gcoerceto FF64 = empty-gcoerceto FF32 = empty --text "subl $4,%esp ; fstps (%esp) ; flds (%esp) ; addl $4,%esp ; "-gcoerceto _    = panic "X86.Ppr.gcoerceto: no match" -gpush :: Reg -> RegNo -> SDoc-gpush reg offset-   = hcat [text "fld ", greg reg offset] -gpop :: Reg -> RegNo -> SDoc-gpop reg offset-   = hcat [text "fstp ", greg reg offset]--greg :: Reg -> RegNo -> SDoc-greg reg offset = text "%st(" <> int (gregno reg - firstfake+offset) <> char ')'--gsemi :: SDoc-gsemi = text " ; "- gtab :: SDoc gtab  = char '\t'  gsp :: SDoc gsp   = char ' ' -gregno :: Reg -> RegNo-gregno (RegReal (RealRegSingle i)) = i-gregno _           = --pprPanic "gregno" (ppr other)-                     999   -- bogus; only needed for debug printing -pprG :: Instr -> SDoc -> SDoc-pprG fake actual-   = (char '#' <> pprGInstr fake) $$ actual --pprGInstr :: Instr -> SDoc-pprGInstr (GMOV src dst)   = pprFormatRegReg (sLit "gmov") FF64 src dst-pprGInstr (GLD fmt src dst) = pprFormatAddrReg (sLit "gld") fmt src dst-pprGInstr (GST fmt src dst) = pprFormatRegAddr (sLit "gst") fmt src dst--pprGInstr (GLDZ dst) = pprFormatReg (sLit "gldz") FF64 dst-pprGInstr (GLD1 dst) = pprFormatReg (sLit "gld1") FF64 dst--pprGInstr (GFTOI src dst) = pprFormatFormatRegReg (sLit "gftoi") FF32 II32 src dst-pprGInstr (GDTOI src dst) = pprFormatFormatRegReg (sLit "gdtoi") FF64 II32 src dst--pprGInstr (GITOF src dst) = pprFormatFormatRegReg (sLit "gitof") II32 FF32 src dst-pprGInstr (GITOD src dst) = pprFormatFormatRegReg (sLit "gitod") II32 FF64 src dst-pprGInstr (GDTOF src dst) = pprFormatFormatRegReg (sLit "gdtof") FF64 FF32 src dst--pprGInstr (GCMP co src dst) = pprCondRegReg (sLit "gcmp_") FF64 co src dst-pprGInstr (GABS fmt src dst) = pprFormatRegReg (sLit "gabs") fmt src dst-pprGInstr (GNEG fmt src dst) = pprFormatRegReg (sLit "gneg") fmt src dst-pprGInstr (GSQRT fmt src dst) = pprFormatRegReg (sLit "gsqrt") fmt src dst-pprGInstr (GSIN fmt _ _ src dst) = pprFormatRegReg (sLit "gsin") fmt src dst-pprGInstr (GCOS fmt _ _ src dst) = pprFormatRegReg (sLit "gcos") fmt src dst-pprGInstr (GTAN fmt _ _ src dst) = pprFormatRegReg (sLit "gtan") fmt src dst--pprGInstr (GADD fmt src1 src2 dst) = pprFormatRegRegReg (sLit "gadd") fmt src1 src2 dst-pprGInstr (GSUB fmt src1 src2 dst) = pprFormatRegRegReg (sLit "gsub") fmt src1 src2 dst-pprGInstr (GMUL fmt src1 src2 dst) = pprFormatRegRegReg (sLit "gmul") fmt src1 src2 dst-pprGInstr (GDIV fmt src1 src2 dst) = pprFormatRegRegReg (sLit "gdiv") fmt src1 src2 dst+pprX87 :: Instr -> SDoc -> SDoc+pprX87 fake actual+   = (char '#' <> pprX87Instr fake) $$ actual -pprGInstr _ = panic "X86.Ppr.pprGInstr: no match"+pprX87Instr :: Instr -> SDoc+pprX87Instr (X87Store fmt  dst) = pprFormatAddr (sLit "gst") fmt  dst+pprX87Instr _ = panic "X86.Ppr.pprX87Instr: no match"  pprDollImm :: Imm -> SDoc pprDollImm i = text "$" <> pprImm i@@ -1217,24 +921,7 @@     ]  -pprFormatReg :: PtrString -> Format -> Reg -> SDoc-pprFormatReg name format reg1-  = hcat [-        pprMnemonic name format,-        pprReg format reg1-    ] --pprFormatRegReg :: PtrString -> Format -> Reg -> Reg -> SDoc-pprFormatRegReg name format reg1 reg2-  = hcat [-        pprMnemonic name format,-        pprReg format reg1,-        comma,-        pprReg format reg2-    ]-- pprRegReg :: PtrString -> Reg -> Reg -> SDoc pprRegReg name reg1 reg2   = sdocWithPlatform $ \platform ->@@ -1268,31 +955,6 @@         pprReg format reg2     ] -pprCondRegReg :: PtrString -> Format -> Cond -> Reg -> Reg -> SDoc-pprCondRegReg name format cond reg1 reg2-  = hcat [-        char '\t',-        ptext name,-        pprCond cond,-        space,-        pprReg format reg1,-        comma,-        pprReg format reg2-    ]--pprFormatFormatRegReg :: PtrString -> Format -> Format -> Reg -> Reg -> SDoc-pprFormatFormatRegReg name format1 format2 reg1 reg2-  = hcat [-        char '\t',-        ptext name,-        pprFormat format1,-        pprFormat format2,-        space,-        pprReg format1 reg1,-        comma,-        pprReg format2 reg2-    ]- pprFormatFormatOpReg :: PtrString -> Format -> Format -> Operand -> Reg -> SDoc pprFormatFormatOpReg name format1 format2 op1 reg2   = hcat [@@ -1302,17 +964,6 @@         pprReg format2 reg2     ] -pprFormatRegRegReg :: PtrString -> Format -> Reg -> Reg -> Reg -> SDoc-pprFormatRegRegReg name format reg1 reg2 reg3-  = hcat [-        pprMnemonic name format,-        pprReg format reg1,-        comma,-        pprReg format reg2,-        comma,-        pprReg format reg3-    ]- pprFormatOpOpReg :: PtrString -> Format -> Operand -> Operand -> Reg -> SDoc pprFormatOpOpReg name format op1 op2 reg3   = hcat [@@ -1324,25 +975,15 @@         pprReg format reg3     ] -pprFormatAddrReg :: PtrString -> Format -> AddrMode -> Reg -> SDoc-pprFormatAddrReg name format op dst-  = hcat [-        pprMnemonic name format,-        pprAddr op,-        comma,-        pprReg format dst-    ]  -pprFormatRegAddr :: PtrString -> Format -> Reg -> AddrMode -> SDoc-pprFormatRegAddr name format src op+pprFormatAddr :: PtrString -> Format -> AddrMode -> SDoc+pprFormatAddr name format  op   = hcat [         pprMnemonic name format,-        pprReg format src,         comma,         pprAddr op     ]-  pprShift :: PtrString -> Format -> Operand -> Operand -> SDoc pprShift name format src dest
nativeGen/X86/RegInfo.hs view
@@ -6,7 +6,6 @@  where -#include "nativeGen/NCG.h" #include "HsVersions.h"  import GhcPrelude@@ -15,7 +14,7 @@ import Reg  import Outputable-import Platform+import GHC.Platform import Unique  import UniqFM@@ -25,45 +24,50 @@ mkVirtualReg :: Unique -> Format -> VirtualReg mkVirtualReg u format    = case format of-        FF32    -> VirtualRegSSE u-        FF64    -> VirtualRegSSE u-        FF80    -> VirtualRegD   u-        _other  -> VirtualRegI   u+        FF32    -> VirtualRegD u+        -- for scalar F32, we use the same xmm as F64!+        -- this is a hack that needs some improvement.+        -- For now we map both to being allocated as "Double" Registers+        -- on X86/X86_64+        FF64    -> VirtualRegD u+        _other  -> VirtualRegI u  regDotColor :: Platform -> RealReg -> SDoc regDotColor platform reg- = let Just str = lookupUFM (regColors platform) reg-   in text str+ = case (lookupUFM (regColors platform) reg) of+        Just str -> text str+        _        -> panic "Register not assigned a color"  regColors :: Platform -> UniqFM [Char]-regColors platform = listToUFM (normalRegColors platform ++ fpRegColors)+regColors platform = listToUFM (normalRegColors platform)  normalRegColors :: Platform -> [(Reg,String)]-normalRegColors platform- | target32Bit platform = [ (eax, "#00ff00")-                          , (ebx, "#0000ff")-                          , (ecx, "#00ffff")-                          , (edx, "#0080ff") ]- | otherwise            = [ (rax, "#00ff00"), (eax, "#00ff00")-                          , (rbx, "#0000ff"), (ebx, "#0000ff")-                          , (rcx, "#00ffff"), (ecx, "#00ffff")-                          , (rdx, "#0080ff"), (edx, "#00ffff")-                          , (r8,  "#00ff80")-                          , (r9,  "#008080")-                          , (r10, "#0040ff")-                          , (r11, "#00ff40")-                          , (r12, "#008040")-                          , (r13, "#004080")-                          , (r14, "#004040")-                          , (r15, "#002080") ]+normalRegColors platform =+    zip (map regSingle [0..lastint platform]) colors+        ++ zip (map regSingle [firstxmm..lastxmm platform]) greys+  where+    -- 16 colors - enough for amd64 gp regs+    colors = ["#800000","#ff0000","#808000","#ffff00","#008000"+             ,"#00ff00","#008080","#00ffff","#000080","#0000ff"+             ,"#800080","#ff00ff","#87005f","#875f00","#87af00"+             ,"#ff00af"] -fpRegColors :: [(Reg,String)]-fpRegColors =-        [ (fake0, "#ff00ff")-        , (fake1, "#ff00aa")-        , (fake2, "#aa00ff")-        , (fake3, "#aa00aa")-        , (fake4, "#ff0055")-        , (fake5, "#5500ff") ]+    -- 16 shades of grey, enough for the currently supported+    -- SSE extensions.+    greys = ["#0e0e0e","#1c1c1c","#2a2a2a","#383838","#464646"+            ,"#545454","#626262","#707070","#7e7e7e","#8c8c8c"+            ,"#9a9a9a","#a8a8a8","#b6b6b6","#c4c4c4","#d2d2d2"+            ,"#e0e0e0"] -        ++ zip (map regSingle [24..39]) (repeat "red")+++--     32 shades of grey - use for avx 512 if we ever need it+--     greys = ["#070707","#0e0e0e","#151515","#1c1c1c"+--             ,"#232323","#2a2a2a","#313131","#383838","#3f3f3f"+--             ,"#464646","#4d4d4d","#545454","#5b5b5b","#626262"+--             ,"#696969","#707070","#777777","#7e7e7e","#858585"+--             ,"#8c8c8c","#939393","#9a9a9a","#a1a1a1","#a8a8a8"+--             ,"#afafaf","#b6b6b6","#bdbdbd","#c4c4c4","#cbcbcb"+--             ,"#d2d2d2","#d9d9d9","#e0e0e0"]++
nativeGen/X86/Regs.hs view
@@ -29,13 +29,15 @@         EABase(..), EAIndex(..), addrModeRegs,          eax, ebx, ecx, edx, esi, edi, ebp, esp,-        fake0, fake1, fake2, fake3, fake4, fake5, firstfake, +         rax, rbx, rcx, rdx, rsi, rdi, rbp, rsp,         r8,  r9,  r10, r11, r12, r13, r14, r15,+        lastint,         xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,         xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15,         xmm,+        firstxmm, lastxmm,          ripRel,         allFPArgRegs,@@ -45,12 +47,11 @@  where -#include "nativeGen/NCG.h" #include "HsVersions.h"  import GhcPrelude -import CodeGen.Platform+import GHC.Platform.Regs import Reg import RegClass @@ -58,7 +59,7 @@ import CLabel           ( CLabel ) import DynFlags import Outputable-import Platform+import GHC.Platform  import qualified Data.Array as A @@ -84,10 +85,6 @@                 VirtualRegF{}           -> 0                 _other                  -> 0 -        RcDoubleSSE-         -> case vr of-                VirtualRegSSE{}         -> 1-                _other                  -> 0          _other -> 0 @@ -98,7 +95,7 @@         RcInteger          -> case rr of                 RealRegSingle regNo-                        | regNo < firstfake -> 1+                        | regNo < firstxmm -> 1                         | otherwise     -> 0                  RealRegPair{}           -> 0@@ -106,15 +103,11 @@         RcDouble          -> case rr of                 RealRegSingle regNo-                        | regNo >= firstfake && regNo <= lastfake -> 1+                        | regNo >= firstxmm  -> 1                         | otherwise     -> 0                  RealRegPair{}           -> 0 -        RcDoubleSSE-         -> case rr of-                RealRegSingle regNo | regNo >= firstxmm -> 1-                _otherwise                        -> 0          _other -> 0 @@ -208,17 +201,16 @@ -- use a Word32 to represent the set of free registers in the register -- allocator. -firstfake, lastfake :: RegNo-firstfake = 16-lastfake  = 21 + firstxmm :: RegNo-firstxmm  = 24+firstxmm  = 16 +--  on 32bit platformOSs, only the first 8 XMM/YMM/ZMM registers are available lastxmm :: Platform -> RegNo lastxmm platform- | target32Bit platform = 31- | otherwise            = 39+ | target32Bit platform = firstxmm + 7  -- xmm0 - xmmm7+ | otherwise            = firstxmm + 15 -- xmm0 -xmm15  lastint :: Platform -> RegNo lastint platform@@ -228,14 +220,13 @@ intregnos :: Platform -> [RegNo] intregnos platform = [0 .. lastint platform] -fakeregnos :: [RegNo]-fakeregnos  = [firstfake .. lastfake] + xmmregnos :: Platform -> [RegNo] xmmregnos platform = [firstxmm  .. lastxmm platform]  floatregnos :: Platform -> [RegNo]-floatregnos platform = fakeregnos ++ xmmregnos platform+floatregnos platform = xmmregnos platform  -- argRegs is the set of regs which are read for an n-argument call to C. -- For archs which pass all args on the stack (x86), is empty.@@ -255,20 +246,19 @@ -- However, we can get away without this at the moment because the -- only allocatable integer regs are also 8-bit compatible (1, 3, 4). classOfRealReg platform reg- = case reg of+    = case reg of         RealRegSingle i-          | i <= lastint platform -> RcInteger-          | i <= lastfake         -> RcDouble-          | otherwise             -> RcDoubleSSE--        RealRegPair{}   -> panic "X86.Regs.classOfRealReg: RegPairs on this arch"+            | i <= lastint platform -> RcInteger+            | i <= lastxmm platform -> RcDouble+            | otherwise             -> panic "X86.Reg.classOfRealReg registerSingle too high"+        _   -> panic "X86.Regs.classOfRealReg: RegPairs on this arch"  -- | Get the name of the register with this number.+-- NOTE: fixme, we dont track which "way" the XMM registers are used showReg :: Platform -> RegNo -> String showReg platform n-        | n >= firstxmm  = "%xmm" ++ show (n-firstxmm)-        | n >= firstfake = "%fake" ++ show (n-firstfake)-        | n >= 8         = "%r" ++ show n+        | n >= firstxmm && n <= lastxmm  platform = "%xmm" ++ show (n-firstxmm)+        | n >= 8   && n < firstxmm      = "%r" ++ show n         | otherwise      = regNames platform A.! n  regNames :: Platform -> A.Array Int String@@ -288,18 +278,17 @@ - Only ebx, esi, edi and esp are available across a C call (they are callee-saves). - Registers 0-7 have 16-bit counterparts (ax, bx etc.) - Registers 0-3 have 8 bit counterparts (ah, bh etc.)-- Registers fake0..fake5 are fakes; we pretend x86 has 6 conventionally-addressable-  fp registers, and 3-operand insns for them, and we translate this into-  real stack-based x86 fp code after register allocation.  The fp registers are all Double registers; we don't have any RcFloat class regs.  @regClass@ barfs if you give it a VirtualRegF, and mkVReg above should never generate them.++TODO: cleanup modelling float vs double registers and how they are the same class. -} -fake0, fake1, fake2, fake3, fake4, fake5,-       eax, ebx, ecx, edx, esp, ebp, esi, edi :: Reg +eax, ebx, ecx, edx, esp, ebp, esi, edi :: Reg+ eax   = regSingle 0 ebx   = regSingle 1 ecx   = regSingle 2@@ -308,15 +297,10 @@ edi   = regSingle 5 ebp   = regSingle 6 esp   = regSingle 7-fake0 = regSingle 16-fake1 = regSingle 17-fake2 = regSingle 18-fake3 = regSingle 19-fake4 = regSingle 20-fake5 = regSingle 21   + {- AMD x86_64 architecture: - All 16 integer registers are addressable as 8, 16, 32 and 64-bit values:@@ -360,22 +344,22 @@ r13   = regSingle 13 r14   = regSingle 14 r15   = regSingle 15-xmm0  = regSingle 24-xmm1  = regSingle 25-xmm2  = regSingle 26-xmm3  = regSingle 27-xmm4  = regSingle 28-xmm5  = regSingle 29-xmm6  = regSingle 30-xmm7  = regSingle 31-xmm8  = regSingle 32-xmm9  = regSingle 33-xmm10 = regSingle 34-xmm11 = regSingle 35-xmm12 = regSingle 36-xmm13 = regSingle 37-xmm14 = regSingle 38-xmm15 = regSingle 39+xmm0  = regSingle 16+xmm1  = regSingle 17+xmm2  = regSingle 18+xmm3  = regSingle 19+xmm4  = regSingle 20+xmm5  = regSingle 21+xmm6  = regSingle 22+xmm7  = regSingle 23+xmm8  = regSingle 24+xmm9  = regSingle 25+xmm10 = regSingle 26+xmm11 = regSingle 27+xmm12 = regSingle 28+xmm13 = regSingle 29+xmm14 = regSingle 30+xmm15 = regSingle 31  ripRel :: Displacement -> AddrMode ripRel imm      = AddrBaseIndex EABaseRip EAIndexNone imm@@ -409,7 +393,7 @@    -- Only xmm0-5 are caller-saves registers on 64bit windows.    -- ( https://docs.microsoft.com/en-us/cpp/build/register-usage )    -- For details check the Win64 ABI.-   ++ map regSingle fakeregnos ++ map xmm [0  .. 5]+   ++ map xmm [0  .. 5]  | otherwise     -- all xmm regs are caller-saves     -- caller-saves registers@@ -428,11 +412,15 @@     = panic "X86.Regs.allIntArgRegs: not defined for this platform"  | otherwise = [rdi,rsi,rdx,rcx,r8,r9] ++-- | on 64bit platforms we pass the first 8 float/double arguments+-- in the xmm registers. allFPArgRegs :: Platform -> [Reg] allFPArgRegs platform  | platformOS platform == OSMinGW32     = panic "X86.Regs.allFPArgRegs: not defined for this platform"- | otherwise = map regSingle [firstxmm .. firstxmm+7]+ | otherwise = map regSingle [firstxmm .. firstxmm + 7 ]+  -- Machine registers which might be clobbered by instructions that -- generate results into fixed registers, or need arguments in a fixed
parser/ApiAnnotation.hs view
@@ -125,7 +125,7 @@ making sure we only attach comments that actually fit in the 'SrcSpan'.)  The wiki page describing this feature is-https://ghc.haskell.org/trac/ghc/wiki/ApiAnnotations+https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations  -} -- ---------------------------------------------------------------------@@ -188,7 +188,7 @@ -- @'DynFlags.DynFlags'@ before parsing. -- -- The wiki page describing this feature is--- https://ghc.haskell.org/trac/ghc/wiki/ApiAnnotations+-- https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations -- -- Note: in general the names of these are taken from the -- corresponding token, unless otherwise noted
parser/Ctype.hs view
@@ -18,14 +18,14 @@  import GhcPrelude -import Data.Int         ( Int32 )-import Data.Bits        ( Bits((.&.)) )+import Data.Bits        ( Bits((.&.),(.|.)) ) import Data.Char        ( ord, chr )+import Data.Word import Panic  -- Bit masks -cIdent, cSymbol, cAny, cSpace, cLower, cUpper, cDigit :: Int+cIdent, cSymbol, cAny, cSpace, cLower, cUpper, cDigit :: Word8 cIdent  =  1 cSymbol =  2 cAny    =  4@@ -37,9 +37,9 @@ -- | The predicates below look costly, but aren't, GHC+GCC do a great job -- at the big case below. -{-# INLINE is_ctype #-}-is_ctype :: Int -> Char -> Bool-is_ctype mask c = (fromIntegral (charType c) .&. fromIntegral mask) /= (0::Int32)+{-# INLINABLE is_ctype #-}+is_ctype :: Word8 -> Char -> Bool+is_ctype mask c = (charType c .&. mask) /= 0  is_ident, is_symbol, is_any, is_space, is_lower, is_upper, is_digit,     is_alphanum :: Char -> Bool@@ -82,137 +82,134 @@   | c >=  'A' && c <= 'Z' = chr (ord c - (ord 'A' - ord 'a'))   | otherwise = c --- | We really mean .|. instead of + below, but GHC currently doesn't do---  any constant folding with bitops. *sigh*--charType :: Char -> Int+charType :: Char -> Word8 charType c = case c of-   '\0'   -> 0                         -- \000-   '\1'   -> 0                         -- \001-   '\2'   -> 0                         -- \002-   '\3'   -> 0                         -- \003-   '\4'   -> 0                         -- \004-   '\5'   -> 0                         -- \005-   '\6'   -> 0                         -- \006-   '\7'   -> 0                         -- \007-   '\8'   -> 0                         -- \010-   '\9'   -> cSpace                    -- \t  (not allowed in strings, so !cAny)-   '\10'  -> cSpace                    -- \n  (ditto)-   '\11'  -> cSpace                    -- \v  (ditto)-   '\12'  -> cSpace                    -- \f  (ditto)-   '\13'  -> cSpace                    --  ^M (ditto)-   '\14'  -> 0                         -- \016-   '\15'  -> 0                         -- \017-   '\16'  -> 0                         -- \020-   '\17'  -> 0                         -- \021-   '\18'  -> 0                         -- \022-   '\19'  -> 0                         -- \023-   '\20'  -> 0                         -- \024-   '\21'  -> 0                         -- \025-   '\22'  -> 0                         -- \026-   '\23'  -> 0                         -- \027-   '\24'  -> 0                         -- \030-   '\25'  -> 0                         -- \031-   '\26'  -> 0                         -- \032-   '\27'  -> 0                         -- \033-   '\28'  -> 0                         -- \034-   '\29'  -> 0                         -- \035-   '\30'  -> 0                         -- \036-   '\31'  -> 0                         -- \037-   '\32'  -> cAny + cSpace             ---   '\33'  -> cAny + cSymbol            -- !-   '\34'  -> cAny                      -- "-   '\35'  -> cAny + cSymbol            --  #-   '\36'  -> cAny + cSymbol            --  $-   '\37'  -> cAny + cSymbol            -- %-   '\38'  -> cAny + cSymbol            -- &-   '\39'  -> cAny + cIdent             -- '-   '\40'  -> cAny                      -- (-   '\41'  -> cAny                      -- )-   '\42'  -> cAny + cSymbol            --  *-   '\43'  -> cAny + cSymbol            -- +-   '\44'  -> cAny                      -- ,-   '\45'  -> cAny + cSymbol            -- --   '\46'  -> cAny + cSymbol            -- .-   '\47'  -> cAny + cSymbol            --  /-   '\48'  -> cAny + cIdent  + cDigit   -- 0-   '\49'  -> cAny + cIdent  + cDigit   -- 1-   '\50'  -> cAny + cIdent  + cDigit   -- 2-   '\51'  -> cAny + cIdent  + cDigit   -- 3-   '\52'  -> cAny + cIdent  + cDigit   -- 4-   '\53'  -> cAny + cIdent  + cDigit   -- 5-   '\54'  -> cAny + cIdent  + cDigit   -- 6-   '\55'  -> cAny + cIdent  + cDigit   -- 7-   '\56'  -> cAny + cIdent  + cDigit   -- 8-   '\57'  -> cAny + cIdent  + cDigit   -- 9-   '\58'  -> cAny + cSymbol            -- :-   '\59'  -> cAny                      -- ;-   '\60'  -> cAny + cSymbol            -- <-   '\61'  -> cAny + cSymbol            -- =-   '\62'  -> cAny + cSymbol            -- >-   '\63'  -> cAny + cSymbol            -- ?-   '\64'  -> cAny + cSymbol            -- @-   '\65'  -> cAny + cIdent  + cUpper   -- A-   '\66'  -> cAny + cIdent  + cUpper   -- B-   '\67'  -> cAny + cIdent  + cUpper   -- C-   '\68'  -> cAny + cIdent  + cUpper   -- D-   '\69'  -> cAny + cIdent  + cUpper   -- E-   '\70'  -> cAny + cIdent  + cUpper   -- F-   '\71'  -> cAny + cIdent  + cUpper   -- G-   '\72'  -> cAny + cIdent  + cUpper   -- H-   '\73'  -> cAny + cIdent  + cUpper   -- I-   '\74'  -> cAny + cIdent  + cUpper   -- J-   '\75'  -> cAny + cIdent  + cUpper   -- K-   '\76'  -> cAny + cIdent  + cUpper   -- L-   '\77'  -> cAny + cIdent  + cUpper   -- M-   '\78'  -> cAny + cIdent  + cUpper   -- N-   '\79'  -> cAny + cIdent  + cUpper   -- O-   '\80'  -> cAny + cIdent  + cUpper   -- P-   '\81'  -> cAny + cIdent  + cUpper   -- Q-   '\82'  -> cAny + cIdent  + cUpper   -- R-   '\83'  -> cAny + cIdent  + cUpper   -- S-   '\84'  -> cAny + cIdent  + cUpper   -- T-   '\85'  -> cAny + cIdent  + cUpper   -- U-   '\86'  -> cAny + cIdent  + cUpper   -- V-   '\87'  -> cAny + cIdent  + cUpper   -- W-   '\88'  -> cAny + cIdent  + cUpper   -- X-   '\89'  -> cAny + cIdent  + cUpper   -- Y-   '\90'  -> cAny + cIdent  + cUpper   -- Z-   '\91'  -> cAny                      -- [-   '\92'  -> cAny + cSymbol            -- backslash-   '\93'  -> cAny                      -- ]-   '\94'  -> cAny + cSymbol            --  ^-   '\95'  -> cAny + cIdent  + cLower   -- _-   '\96'  -> cAny                      -- `-   '\97'  -> cAny + cIdent  + cLower   -- a-   '\98'  -> cAny + cIdent  + cLower   -- b-   '\99'  -> cAny + cIdent  + cLower   -- c-   '\100' -> cAny + cIdent  + cLower   -- d-   '\101' -> cAny + cIdent  + cLower   -- e-   '\102' -> cAny + cIdent  + cLower   -- f-   '\103' -> cAny + cIdent  + cLower   -- g-   '\104' -> cAny + cIdent  + cLower   -- h-   '\105' -> cAny + cIdent  + cLower   -- i-   '\106' -> cAny + cIdent  + cLower   -- j-   '\107' -> cAny + cIdent  + cLower   -- k-   '\108' -> cAny + cIdent  + cLower   -- l-   '\109' -> cAny + cIdent  + cLower   -- m-   '\110' -> cAny + cIdent  + cLower   -- n-   '\111' -> cAny + cIdent  + cLower   -- o-   '\112' -> cAny + cIdent  + cLower   -- p-   '\113' -> cAny + cIdent  + cLower   -- q-   '\114' -> cAny + cIdent  + cLower   -- r-   '\115' -> cAny + cIdent  + cLower   -- s-   '\116' -> cAny + cIdent  + cLower   -- t-   '\117' -> cAny + cIdent  + cLower   -- u-   '\118' -> cAny + cIdent  + cLower   -- v-   '\119' -> cAny + cIdent  + cLower   -- w-   '\120' -> cAny + cIdent  + cLower   -- x-   '\121' -> cAny + cIdent  + cLower   -- y-   '\122' -> cAny + cIdent  + cLower   -- z-   '\123' -> cAny                      -- {-   '\124' -> cAny + cSymbol            --  |-   '\125' -> cAny                      -- }-   '\126' -> cAny + cSymbol            -- ~-   '\127' -> 0                         -- \177+   '\0'   -> 0                             -- \000+   '\1'   -> 0                             -- \001+   '\2'   -> 0                             -- \002+   '\3'   -> 0                             -- \003+   '\4'   -> 0                             -- \004+   '\5'   -> 0                             -- \005+   '\6'   -> 0                             -- \006+   '\7'   -> 0                             -- \007+   '\8'   -> 0                             -- \010+   '\9'   -> cSpace                        -- \t  (not allowed in strings, so !cAny)+   '\10'  -> cSpace                        -- \n  (ditto)+   '\11'  -> cSpace                        -- \v  (ditto)+   '\12'  -> cSpace                        -- \f  (ditto)+   '\13'  -> cSpace                        --  ^M (ditto)+   '\14'  -> 0                             -- \016+   '\15'  -> 0                             -- \017+   '\16'  -> 0                             -- \020+   '\17'  -> 0                             -- \021+   '\18'  -> 0                             -- \022+   '\19'  -> 0                             -- \023+   '\20'  -> 0                             -- \024+   '\21'  -> 0                             -- \025+   '\22'  -> 0                             -- \026+   '\23'  -> 0                             -- \027+   '\24'  -> 0                             -- \030+   '\25'  -> 0                             -- \031+   '\26'  -> 0                             -- \032+   '\27'  -> 0                             -- \033+   '\28'  -> 0                             -- \034+   '\29'  -> 0                             -- \035+   '\30'  -> 0                             -- \036+   '\31'  -> 0                             -- \037+   '\32'  -> cAny .|. cSpace               --+   '\33'  -> cAny .|. cSymbol              -- !+   '\34'  -> cAny                          -- "+   '\35'  -> cAny .|. cSymbol              --  #+   '\36'  -> cAny .|. cSymbol              --  $+   '\37'  -> cAny .|. cSymbol              -- %+   '\38'  -> cAny .|. cSymbol              -- &+   '\39'  -> cAny .|. cIdent               -- '+   '\40'  -> cAny                          -- (+   '\41'  -> cAny                          -- )+   '\42'  -> cAny .|. cSymbol              --  *+   '\43'  -> cAny .|. cSymbol              -- ++   '\44'  -> cAny                          -- ,+   '\45'  -> cAny .|. cSymbol              -- -+   '\46'  -> cAny .|. cSymbol              -- .+   '\47'  -> cAny .|. cSymbol              --  /+   '\48'  -> cAny .|. cIdent  .|. cDigit   -- 0+   '\49'  -> cAny .|. cIdent  .|. cDigit   -- 1+   '\50'  -> cAny .|. cIdent  .|. cDigit   -- 2+   '\51'  -> cAny .|. cIdent  .|. cDigit   -- 3+   '\52'  -> cAny .|. cIdent  .|. cDigit   -- 4+   '\53'  -> cAny .|. cIdent  .|. cDigit   -- 5+   '\54'  -> cAny .|. cIdent  .|. cDigit   -- 6+   '\55'  -> cAny .|. cIdent  .|. cDigit   -- 7+   '\56'  -> cAny .|. cIdent  .|. cDigit   -- 8+   '\57'  -> cAny .|. cIdent  .|. cDigit   -- 9+   '\58'  -> cAny .|. cSymbol              -- :+   '\59'  -> cAny                          -- ;+   '\60'  -> cAny .|. cSymbol              -- <+   '\61'  -> cAny .|. cSymbol              -- =+   '\62'  -> cAny .|. cSymbol              -- >+   '\63'  -> cAny .|. cSymbol              -- ?+   '\64'  -> cAny .|. cSymbol              -- @+   '\65'  -> cAny .|. cIdent  .|. cUpper   -- A+   '\66'  -> cAny .|. cIdent  .|. cUpper   -- B+   '\67'  -> cAny .|. cIdent  .|. cUpper   -- C+   '\68'  -> cAny .|. cIdent  .|. cUpper   -- D+   '\69'  -> cAny .|. cIdent  .|. cUpper   -- E+   '\70'  -> cAny .|. cIdent  .|. cUpper   -- F+   '\71'  -> cAny .|. cIdent  .|. cUpper   -- G+   '\72'  -> cAny .|. cIdent  .|. cUpper   -- H+   '\73'  -> cAny .|. cIdent  .|. cUpper   -- I+   '\74'  -> cAny .|. cIdent  .|. cUpper   -- J+   '\75'  -> cAny .|. cIdent  .|. cUpper   -- K+   '\76'  -> cAny .|. cIdent  .|. cUpper   -- L+   '\77'  -> cAny .|. cIdent  .|. cUpper   -- M+   '\78'  -> cAny .|. cIdent  .|. cUpper   -- N+   '\79'  -> cAny .|. cIdent  .|. cUpper   -- O+   '\80'  -> cAny .|. cIdent  .|. cUpper   -- P+   '\81'  -> cAny .|. cIdent  .|. cUpper   -- Q+   '\82'  -> cAny .|. cIdent  .|. cUpper   -- R+   '\83'  -> cAny .|. cIdent  .|. cUpper   -- S+   '\84'  -> cAny .|. cIdent  .|. cUpper   -- T+   '\85'  -> cAny .|. cIdent  .|. cUpper   -- U+   '\86'  -> cAny .|. cIdent  .|. cUpper   -- V+   '\87'  -> cAny .|. cIdent  .|. cUpper   -- W+   '\88'  -> cAny .|. cIdent  .|. cUpper   -- X+   '\89'  -> cAny .|. cIdent  .|. cUpper   -- Y+   '\90'  -> cAny .|. cIdent  .|. cUpper   -- Z+   '\91'  -> cAny                          -- [+   '\92'  -> cAny .|. cSymbol              -- backslash+   '\93'  -> cAny                          -- ]+   '\94'  -> cAny .|. cSymbol              --  ^+   '\95'  -> cAny .|. cIdent  .|. cLower   -- _+   '\96'  -> cAny                          -- `+   '\97'  -> cAny .|. cIdent  .|. cLower   -- a+   '\98'  -> cAny .|. cIdent  .|. cLower   -- b+   '\99'  -> cAny .|. cIdent  .|. cLower   -- c+   '\100' -> cAny .|. cIdent  .|. cLower   -- d+   '\101' -> cAny .|. cIdent  .|. cLower   -- e+   '\102' -> cAny .|. cIdent  .|. cLower   -- f+   '\103' -> cAny .|. cIdent  .|. cLower   -- g+   '\104' -> cAny .|. cIdent  .|. cLower   -- h+   '\105' -> cAny .|. cIdent  .|. cLower   -- i+   '\106' -> cAny .|. cIdent  .|. cLower   -- j+   '\107' -> cAny .|. cIdent  .|. cLower   -- k+   '\108' -> cAny .|. cIdent  .|. cLower   -- l+   '\109' -> cAny .|. cIdent  .|. cLower   -- m+   '\110' -> cAny .|. cIdent  .|. cLower   -- n+   '\111' -> cAny .|. cIdent  .|. cLower   -- o+   '\112' -> cAny .|. cIdent  .|. cLower   -- p+   '\113' -> cAny .|. cIdent  .|. cLower   -- q+   '\114' -> cAny .|. cIdent  .|. cLower   -- r+   '\115' -> cAny .|. cIdent  .|. cLower   -- s+   '\116' -> cAny .|. cIdent  .|. cLower   -- t+   '\117' -> cAny .|. cIdent  .|. cLower   -- u+   '\118' -> cAny .|. cIdent  .|. cLower   -- v+   '\119' -> cAny .|. cIdent  .|. cLower   -- w+   '\120' -> cAny .|. cIdent  .|. cLower   -- x+   '\121' -> cAny .|. cIdent  .|. cLower   -- y+   '\122' -> cAny .|. cIdent  .|. cLower   -- z+   '\123' -> cAny                          -- {+   '\124' -> cAny .|. cSymbol              --  |+   '\125' -> cAny                          -- }+   '\126' -> cAny .|. cSymbol              -- ~+   '\127' -> 0                             -- \177    _ -> panic ("charType: " ++ show c)
parser/HaddockUtils.hs view
@@ -3,7 +3,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import SrcLoc  import Control.Monad
parser/Lexer.hs view
@@ -10,17 +10,22 @@  module Lexer (    Token(..), lexer, pragState, mkPState, mkPStatePure, PState(..),-   P(..), ParseResult(..), mkParserFlags, mkParserFlags', ParserFlags,+   P(..), ParseResult(..), mkParserFlags, mkParserFlags', ParserFlags(..),+   appendWarning,+   appendError,+   allocateComments,+   MonadP(..),    getRealSrcLoc, getPState, withThisPackage,-   failLocMsgP, failSpanMsgP, srcParseFail,-   getMessages,+   failLocMsgP, srcParseFail,+   getErrorMessages, getMessages,    popContext, pushModuleContext, setLastToken, setSrcLoc,    activeContext, nextIsEOF,    getLexState, popLexState, pushLexState,-   ExtBits(..), getBit,-   addWarning,+   ExtBits(..),+   xtest,    lexTokenStream,-   addAnnotation,AddAnn,addAnnsAt,mkParensApiAnn,+   AddAnn(..),mkParensApiAnn,+   addAnnsAt,    commentToAnnotation   ) where @@ -555,7 +560,7 @@   , (0,alex_action_114)   ] -{-# LINE 578 "compiler/parser/Lexer.x" #-}+{-# LINE 583 "compiler/parser/Lexer.x" #-}   -- -----------------------------------------------------------------------------@@ -958,7 +963,7 @@                  Layout prev_off _ : _ -> prev_off < offset                  _                     -> True       if isOK then pop_and open_brace span buf len-              else failSpanMsgP (RealSrcSpan span) (text "Missing block")+              else addFatalError (RealSrcSpan span) (text "Missing block")  pop_and :: Action -> Action pop_and act span buf len = do _ <- popLexState@@ -1293,9 +1298,11 @@       keyword <- case lastTk of         Just ITlam -> do           lambdaCase <- getBit LambdaCaseBit-          if lambdaCase-            then return ITlcase-            else failMsgP "Illegal lambda-case (use -XLambdaCase)"+          unless lambdaCase $ do+            pState <- getPState+            addError (RealSrcSpan (last_loc pState)) $ text+                     "Illegal lambda-case (use LambdaCase)"+          return ITlcase         _ -> return ITcase       maybe_layout keyword       return $ L span keyword@@ -1360,9 +1367,11 @@ tok_integral itint transint transbuf translen (radix,char_to_int) span buf len = do   numericUnderscores <- getBit NumericUnderscoresBit  -- #14473   let src = lexemeToString buf len-  if (not numericUnderscores) && ('_' `elem` src)-    then failMsgP "Use NumericUnderscores to allow underscores in integer literals"-    else return $ L span $ itint (SourceText src)+  when ((not numericUnderscores) && ('_' `elem` src)) $ do+    pState <- getPState+    addError (RealSrcSpan (last_loc pState)) $ text+             "Use NumericUnderscores to allow underscores in integer literals"+  return $ L span $ itint (SourceText src)        $! transint $ parseUnsignedInteger        (offsetBytes transbuf buf) (subtract translen len) radix char_to_int @@ -1400,9 +1409,11 @@ tok_frac drop f span buf len = do   numericUnderscores <- getBit NumericUnderscoresBit  -- #14473   let src = lexemeToString buf (len-drop)-  if (not numericUnderscores) && ('_' `elem` src)-    then failMsgP "Use NumericUnderscores to allow underscores in floating literals"-    else return (L span $! (f $! src))+  when ((not numericUnderscores) && ('_' `elem` src)) $ do+    pState <- getPState+    addError (RealSrcSpan (last_loc pState)) $ text+             "Use NumericUnderscores to allow underscores in floating literals"+  return (L span $! (f $! src))  tok_float, tok_primfloat, tok_primdouble :: String -> Token tok_float        str = ITrational   $! readFractionalLit str@@ -1599,23 +1610,23 @@      Just ('"',i)  -> do         setInput i+        let s' = reverse s         magicHash <- getBit MagicHashBit         if magicHash           then do             i <- getInput             case alexGetChar' i of               Just ('#',i) -> do-                   setInput i-                   if any (> '\xFF') s-                    then failMsgP "primitive string literal must contain only characters <= \'\\xFF\'"-                    else let bs = unsafeMkByteString (reverse s)-                         in return (ITprimstring (SourceText (reverse s)) bs)+                setInput i+                when (any (> '\xFF') s') $ do+                  pState <- getPState+                  addError (RealSrcSpan (last_loc pState)) $ text+                     "primitive string literal must contain only characters <= \'\\xFF\'"+                return (ITprimstring (SourceText s') (unsafeMkByteString s'))               _other ->-                return (ITstring (SourceText (reverse s))-                                 (mkFastString (reverse s)))+                return (ITstring (SourceText s') (mkFastString s'))           else-                return (ITstring (SourceText (reverse s))-                                 (mkFastString (reverse s)))+                return (ITstring (SourceText s') (mkFastString s'))      Just ('\\',i)         | Just ('&',i) <- next -> do@@ -1859,7 +1870,7 @@      -- NB: The string "|]" terminates the quasiquote,     -- with absolutely no escaping. See the extensive-    -- discussion on Trac #5348 for why there is no+    -- discussion on #5348 for why there is no     -- escape handling.     Just ('|',i)         | Just (']',i) <- alexGetChar' i@@ -1904,17 +1915,18 @@   | Layout !Int !GenSemic   deriving Show +-- | The result of running a parser. data ParseResult a-  = POk PState a-  | PFailed-        (DynFlags -> Messages) -- A function that returns warnings that-                               -- accumulated during parsing, including-                               -- the warnings related to tabs.-        SrcSpan                -- The start and end of the text span related-                               -- to the error.  Might be used in environments-                               -- which can show this span, e.g. by-                               -- highlighting it.-        MsgDoc                 -- The error message+  = POk      -- ^ The parser has consumed a (possibly empty) prefix+             --   of the input and produced a result. Use 'getMessages'+             --   to check for accumulated warnings and non-fatal errors.+      PState -- ^ The resulting parsing state. Can be used to resume parsing.+      a      -- ^ The resulting value.+  | PFailed  -- ^ The parser has consumed a (possibly empty) prefix+             --   of the input and failed.+      PState -- ^ The parsing state right before failure, including the fatal+             --   parse error. 'getMessages' and 'getErrorMessages' must return+             --   a non-empty bag of errors.  -- | Test whether a 'WarningFlag' is set warnopt :: WarningFlag -> ParserFlags -> Bool@@ -1984,6 +1996,7 @@                | ALRLayoutOf                | ALRLayoutDo +-- | The parsing monad, isomorphic to @StateT PState Maybe@. newtype P a = P { unP :: PState -> ParseResult a }  instance Functor P where@@ -2000,7 +2013,7 @@ #endif  instance MonadFail.MonadFail P where-  fail = failP+  fail = failMsgP  returnP :: a -> P a returnP a = a `seq` (P $ \s -> POk s a)@@ -2009,27 +2022,16 @@ (P m) `thenP` k = P $ \ s ->         case m s of                 POk s1 a         -> (unP (k a)) s1-                PFailed warnFn span err -> PFailed warnFn span err--failP :: String -> P a-failP msg =-  P $ \s ->-    PFailed (getMessages s) (RealSrcSpan (last_loc s)) (text msg)+                PFailed s1 -> PFailed s1  failMsgP :: String -> P a-failMsgP msg =-  P $ \s ->-    PFailed (getMessages s) (RealSrcSpan (last_loc s)) (text msg)+failMsgP msg = do+  pState <- getPState+  addFatalError (RealSrcSpan (last_loc pState)) (text msg)  failLocMsgP :: RealSrcLoc -> RealSrcLoc -> String -> P a failLocMsgP loc1 loc2 str =-  P $ \s ->-    PFailed (getMessages s) (RealSrcSpan (mkRealSrcSpan loc1 loc2)) (text str)--failSpanMsgP :: SrcSpan -> SDoc -> P a-failSpanMsgP span msg =-  P $ \s ->-    PFailed (getMessages s) span msg+  addFatalError (RealSrcSpan (mkRealSrcSpan loc1 loc2)) (text str)  getPState :: P PState getPState = P $ \s -> POk s s@@ -2260,11 +2262,6 @@ -- stored in a @Word64@. type ExtsBitmap = Word64 --- | Check if a given flag is currently set in the bitmap.-getBit :: ExtBits -> P Bool-getBit ext = P $ \s -> let b =  ext `xtest` pExtsBitmap (options s)-                       in b `seq` POk s b- xbit :: ExtBits -> ExtsBitmap xbit = bit . fromEnum @@ -2318,6 +2315,7 @@   | DoAndIfThenElseBit   | MultiWayIfBit   | GadtSyntaxBit+  | ImportQualifiedPostBit    -- Flags that are updated once parsing starts   | InRulePragBit@@ -2404,6 +2402,7 @@       .|. DoAndIfThenElseBit          `xoptBit` LangExt.DoAndIfThenElse       .|. MultiWayIfBit               `xoptBit` LangExt.MultiWayIf       .|. GadtSyntaxBit               `xoptBit` LangExt.GADTSyntax+      .|. ImportQualifiedPostBit      `xoptBit` LangExt.ImportQualifiedPost     optBits =           HaddockBit        `setBitIf` isHaddock       .|. RawTokenStreamBit `setBitIf` rawTokStream@@ -2458,18 +2457,88 @@       annotations_comments = []     } -addWarning :: WarningFlag -> SrcSpan -> SDoc -> P ()-addWarning option srcspan warning- = P $ \s@PState{messages=m, options=o} ->-       let-           m' d =-               let (ws, es) = m d-                   warning' = makeIntoWarning (Reason option) $-                      mkWarnMsg d srcspan alwaysQualify warning-                   ws' = if warnopt option o then ws `snocBag` warning' else ws-               in (ws', es)-       in POk s{messages=m'} ()+-- | An mtl-style class for monads that support parsing-related operations.+-- For example, sometimes we make a second pass over the parsing results to validate,+-- disambiguate, or rearrange them, and we do so in the PV monad which cannot consume+-- input but can report parsing errors, check for extension bits, and accumulate+-- parsing annotations. Both P and PV are instances of MonadP.+--+-- MonadP grants us convenient overloading. The other option is to have separate operations+-- for each monad: addErrorP vs addErrorPV, getBitP vs getBitPV, and so on.+--+class Monad m => MonadP m where+  -- | Add a non-fatal error. Use this when the parser can produce a result+  --   despite the error.+  --+  --   For example, when GHC encounters a @forall@ in a type,+  --   but @-XExplicitForAll@ is disabled, the parser constructs @ForAllTy@+  --   as if @-XExplicitForAll@ was enabled, adding a non-fatal error to+  --   the accumulator.+  --+  --   Control flow wise, non-fatal errors act like warnings: they are added+  --   to the accumulator and parsing continues. This allows GHC to report+  --   more than one parse error per file.+  --+  addError :: SrcSpan -> SDoc -> m ()+  -- | Add a warning to the accumulator.+  --   Use 'getMessages' to get the accumulated warnings.+  addWarning :: WarningFlag -> SrcSpan -> SDoc -> m ()+  -- | Add a fatal error. This will be the last error reported by the parser, and+  --   the parser will not produce any result, ending in a 'PFailed' state.+  addFatalError :: SrcSpan -> SDoc -> m a+  -- | Check if a given flag is currently set in the bitmap.+  getBit :: ExtBits -> m Bool+  -- | Given a location and a list of AddAnn, apply them all to the location.+  addAnnotation :: SrcSpan          -- SrcSpan of enclosing AST construct+                -> AnnKeywordId     -- The first two parameters are the key+                -> SrcSpan          -- The location of the keyword itself+                -> m () +appendError+  :: SrcSpan+  -> SDoc+  -> (DynFlags -> Messages)+  -> (DynFlags -> Messages)+appendError srcspan msg m =+  \d ->+    let (ws, es) = m d+        errormsg = mkErrMsg d srcspan alwaysQualify msg+        es' = es `snocBag` errormsg+    in (ws, es')++appendWarning+  :: ParserFlags+  -> WarningFlag+  -> SrcSpan+  -> SDoc+  -> (DynFlags -> Messages)+  -> (DynFlags -> Messages)+appendWarning o option srcspan warning m =+  \d ->+    let (ws, es) = m d+        warning' = makeIntoWarning (Reason option) $+           mkWarnMsg d srcspan alwaysQualify warning+        ws' = if warnopt option o then ws `snocBag` warning' else ws+    in (ws', es)++instance MonadP P where+  addError srcspan msg+   = P $ \s@PState{messages=m} ->+             POk s{messages=appendError srcspan msg m} ()+  addWarning option srcspan warning+   = P $ \s@PState{messages=m, options=o} ->+             POk s{messages=appendWarning o option srcspan warning m} ()+  addFatalError span msg =+    addError span msg >> P PFailed+  getBit ext = P $ \s -> let b =  ext `xtest` pExtsBitmap (options s)+                         in b `seq` POk s b+  addAnnotation l a v = do+    addAnnotationOnly l a v+    allocateCommentsP l++addAnnsAt :: MonadP m => SrcSpan -> [AddAnn] -> m ()+addAnnsAt l = mapM_ (\(AddAnn a v) -> addAnnotation l a v)+ addTabWarning :: RealSrcSpan -> P () addTabWarning srcspan  = P $ \s@PState{tab_first=tf, tab_count=tc, options=o} ->@@ -2492,6 +2561,14 @@   in fmap (\s -> makeIntoWarning (Reason Opt_WarnTabs) $                  mkWarnMsg d (RealSrcSpan s) alwaysQualify message) tf +-- | Get a bag of the errors that have been accumulated so far.+--   Does not take -Werror into account.+getErrorMessages :: PState -> DynFlags -> ErrorMessages+getErrorMessages PState{messages=m} d =+  let (_, es) = m d in es++-- | Get the warnings and errors accumulated so far.+--   Does not take -Werror into account. getMessages :: PState -> DynFlags -> Messages getMessages p@PState{messages=m} d =   let (ws, es) = m d@@ -2512,7 +2589,7 @@         (_:tl) ->           POk s{ context = tl } ()         []     ->-          PFailed (getMessages s) (RealSrcSpan last_loc) (srcParseErr o buf len)+          unP (addFatalError (RealSrcSpan last_loc) (srcParseErr o buf len)) s  -- Push a new layout context at the indentation of the last token read. pushCurrentContext :: GenSemic -> P ()@@ -2572,7 +2649,7 @@ srcParseFail :: P a srcParseFail = P $ \s@PState{ buffer = buf, options = o, last_len = len,                             last_loc = last_loc } ->-    PFailed (getMessages s) (RealSrcSpan last_loc) (srcParseErr o buf len)+    unP (addFatalError (RealSrcSpan last_loc) (srcParseErr o buf len)) s  -- A lexical error is reported at a particular position in the source file, -- not over a token range.@@ -2869,7 +2946,7 @@ lexTokenStream buf loc dflags = unP go initState{ options = opts' }     where dflags' = gopt_set (gopt_unset dflags Opt_Haddock) Opt_KeepRawTokenStream           initState@PState{ options = opts } = mkPState dflags' buf loc-          opts' = opts{ pExtsBitmap = xbit UsePosPragsBit .|. pExtsBitmap opts }+          opts' = opts{ pExtsBitmap = complement (xbit UsePosPragsBit) .&. pExtsBitmap opts }           go = do             ltok <- lexer False return             case ltok of@@ -2985,33 +3062,20 @@ -- --   The usual way an 'AddAnn' is created is using the 'mj' ("make jump") --   function, and then it can be discharged using the 'ams' function.-type AddAnn = SrcSpan -> P ()--addAnnotation :: SrcSpan          -- SrcSpan of enclosing AST construct-              -> AnnKeywordId     -- The first two parameters are the key-              -> SrcSpan          -- The location of the keyword itself-              -> P ()-addAnnotation l a v = do-  addAnnotationOnly l a v-  allocateComments l+data AddAnn = AddAnn AnnKeywordId SrcSpan  addAnnotationOnly :: SrcSpan -> AnnKeywordId -> SrcSpan -> P () addAnnotationOnly l a v = P $ \s -> POk s {   annotations = ((l,a), [v]) : annotations s   } () --- |Given a location and a list of AddAnn, apply them all to the location.-addAnnsAt :: SrcSpan -> [AddAnn] -> P ()-addAnnsAt loc anns = mapM_ (\a -> a loc) anns- -- |Given a 'SrcSpan' that surrounds a 'HsPar' or 'HsParTy', generate -- 'AddAnn' values for the opening and closing bordering on the start -- and end of the span mkParensApiAnn :: SrcSpan -> [AddAnn] mkParensApiAnn (UnhelpfulSpan _)  = []-mkParensApiAnn s@(RealSrcSpan ss) = [mj AnnOpenP lo,mj AnnCloseP lc]+mkParensApiAnn s@(RealSrcSpan ss) = [AddAnn AnnOpenP lo,AddAnn AnnCloseP lc]   where-    mj a l = (\s -> addAnnotation s a l)     f = srcSpanFile ss     sl = srcSpanStartLine ss     sc = srcSpanStartCol ss@@ -3027,19 +3091,28 @@  -- | Go through the @comment_q@ in @PState@ and remove all comments -- that belong within the given span-allocateComments :: SrcSpan -> P ()-allocateComments ss = P $ \s ->+allocateCommentsP :: SrcSpan -> P ()+allocateCommentsP ss = P $ \s ->+  let (comment_q', newAnns) = allocateComments ss (comment_q s) in+    POk s {+       comment_q = comment_q'+     , annotations_comments = newAnns ++ (annotations_comments s)+     } ()++allocateComments+  :: SrcSpan+  -> [Located AnnotationComment]+  -> ([Located AnnotationComment], [(SrcSpan,[Located AnnotationComment])])+allocateComments ss comment_q =   let-    (before,rest)  = break (\(L l _) -> isSubspanOf l ss) (comment_q s)+    (before,rest)  = break (\(L l _) -> isSubspanOf l ss) comment_q     (middle,after) = break (\(L l _) -> not (isSubspanOf l ss)) rest     comment_q' = before ++ after     newAnns = if null middle then []                              else [(ss,middle)]   in-    POk s {-       comment_q = comment_q'-     , annotations_comments = newAnns ++ (annotations_comments s)-     } ()+    (comment_q', newAnns)+  commentToAnnotation :: Located Token -> Located AnnotationComment commentToAnnotation (L l (ITdocCommentNext s))  = L l (AnnDocCommentNext s)
parser/Parser.hs view
@@ -5,12583 +5,13026 @@ #endif {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-}---- | This module provides the generated Happy parser for Haskell. It exports--- a number of parsers which may be used in any library that uses the GHC API.--- A common usage pattern is to initialize the parser state with a given string--- and then parse that string:------ @---     runParser :: DynFlags -> String -> P a -> ParseResult a---     runParser flags str parser = unP parser parseState---     where---       filename = "\<interactive\>"---       location = mkRealSrcLoc (mkFastString filename) 1 1---       buffer = stringToStringBuffer str---       parseState = mkPState flags buffer location--- @-module Parser (parseModule, parseSignature, parseImport, parseStatement, parseBackpack,-               parseDeclaration, parseExpression, parsePattern,-               parseTypeSignature,-               parseStmt, parseIdentifier,-               parseType, parseHeader) where---- base-import Control.Monad    ( unless, liftM, when )-import GHC.Exts-import Data.Char-import Control.Monad    ( mplus )-import Control.Applicative ((<$))-import qualified Prelude---- compiler/hsSyn-import HsSyn---- compiler/main-import HscTypes         ( IsBootInterface, WarningTxt(..) )-import DynFlags-import BkpSyn-import PackageConfig---- compiler/utils-import OrdList-import BooleanFormula   ( BooleanFormula(..), LBooleanFormula(..), mkTrue )-import FastString-import Maybes           ( isJust, orElse )-import Outputable---- compiler/basicTypes-import RdrName-import OccName          ( varName, dataName, tcClsName, tvName, startsWithUnderscore )-import DataCon          ( DataCon, dataConName )-import SrcLoc-import Module-import BasicTypes---- compiler/types-import Type             ( funTyCon )-import Kind             ( Kind )-import Class            ( FunDep )---- compiler/parser-import RdrHsSyn-import Lexer-import HaddockUtils-import ApiAnnotation---- compiler/typecheck-import TcEvidence       ( emptyTcEvBinds )---- compiler/prelude-import ForeignCall-import TysPrim          ( eqPrimTyCon )-import TysWiredIn       ( unitTyCon, unitDataCon, tupleTyCon, tupleDataCon, nilDataCon,-                          unboxedUnitTyCon, unboxedUnitDataCon,-                          listTyCon_RDR, consDataCon_RDR, eqTyCon_RDR )---- compiler/utils-import Util             ( looksLikePackageName, fstOf3, sndOf3, thdOf3 )-import GhcPrelude-import qualified Data.Array as Happy_Data_Array-import qualified Data.Bits as Bits-import qualified GHC.Exts as Happy_GHC_Exts-import Control.Applicative(Applicative(..))-import Control.Monad (ap)---- parser produced by Happy Version 1.19.11--newtype HappyAbsSyn  = HappyAbsSyn HappyAny-#if __GLASGOW_HASKELL__ >= 607-type HappyAny = Happy_GHC_Exts.Any-#else-type HappyAny = forall a . a-#endif-newtype HappyWrap16 = HappyWrap16 (Located RdrName)-happyIn16 :: (Located RdrName) -> (HappyAbsSyn )-happyIn16 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap16 x)-{-# INLINE happyIn16 #-}-happyOut16 :: (HappyAbsSyn ) -> HappyWrap16-happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut16 #-}-newtype HappyWrap17 = HappyWrap17 ([LHsUnit PackageName])-happyIn17 :: ([LHsUnit PackageName]) -> (HappyAbsSyn )-happyIn17 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap17 x)-{-# INLINE happyIn17 #-}-happyOut17 :: (HappyAbsSyn ) -> HappyWrap17-happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut17 #-}-newtype HappyWrap18 = HappyWrap18 (OrdList (LHsUnit PackageName))-happyIn18 :: (OrdList (LHsUnit PackageName)) -> (HappyAbsSyn )-happyIn18 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap18 x)-{-# INLINE happyIn18 #-}-happyOut18 :: (HappyAbsSyn ) -> HappyWrap18-happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut18 #-}-newtype HappyWrap19 = HappyWrap19 (LHsUnit PackageName)-happyIn19 :: (LHsUnit PackageName) -> (HappyAbsSyn )-happyIn19 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap19 x)-{-# INLINE happyIn19 #-}-happyOut19 :: (HappyAbsSyn ) -> HappyWrap19-happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut19 #-}-newtype HappyWrap20 = HappyWrap20 (LHsUnitId PackageName)-happyIn20 :: (LHsUnitId PackageName) -> (HappyAbsSyn )-happyIn20 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap20 x)-{-# INLINE happyIn20 #-}-happyOut20 :: (HappyAbsSyn ) -> HappyWrap20-happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut20 #-}-newtype HappyWrap21 = HappyWrap21 (OrdList (LHsModuleSubst PackageName))-happyIn21 :: (OrdList (LHsModuleSubst PackageName)) -> (HappyAbsSyn )-happyIn21 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap21 x)-{-# INLINE happyIn21 #-}-happyOut21 :: (HappyAbsSyn ) -> HappyWrap21-happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut21 #-}-newtype HappyWrap22 = HappyWrap22 (LHsModuleSubst PackageName)-happyIn22 :: (LHsModuleSubst PackageName) -> (HappyAbsSyn )-happyIn22 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap22 x)-{-# INLINE happyIn22 #-}-happyOut22 :: (HappyAbsSyn ) -> HappyWrap22-happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut22 #-}-newtype HappyWrap23 = HappyWrap23 (LHsModuleId PackageName)-happyIn23 :: (LHsModuleId PackageName) -> (HappyAbsSyn )-happyIn23 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap23 x)-{-# INLINE happyIn23 #-}-happyOut23 :: (HappyAbsSyn ) -> HappyWrap23-happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut23 #-}-newtype HappyWrap24 = HappyWrap24 (Located PackageName)-happyIn24 :: (Located PackageName) -> (HappyAbsSyn )-happyIn24 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap24 x)-{-# INLINE happyIn24 #-}-happyOut24 :: (HappyAbsSyn ) -> HappyWrap24-happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut24 #-}-newtype HappyWrap25 = HappyWrap25 (Located FastString)-happyIn25 :: (Located FastString) -> (HappyAbsSyn )-happyIn25 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap25 x)-{-# INLINE happyIn25 #-}-happyOut25 :: (HappyAbsSyn ) -> HappyWrap25-happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut25 #-}-newtype HappyWrap26 = HappyWrap26 (Located FastString)-happyIn26 :: (Located FastString) -> (HappyAbsSyn )-happyIn26 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap26 x)-{-# INLINE happyIn26 #-}-happyOut26 :: (HappyAbsSyn ) -> HappyWrap26-happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut26 #-}-newtype HappyWrap27 = HappyWrap27 (Maybe [LRenaming])-happyIn27 :: (Maybe [LRenaming]) -> (HappyAbsSyn )-happyIn27 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap27 x)-{-# INLINE happyIn27 #-}-happyOut27 :: (HappyAbsSyn ) -> HappyWrap27-happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut27 #-}-newtype HappyWrap28 = HappyWrap28 (OrdList LRenaming)-happyIn28 :: (OrdList LRenaming) -> (HappyAbsSyn )-happyIn28 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap28 x)-{-# INLINE happyIn28 #-}-happyOut28 :: (HappyAbsSyn ) -> HappyWrap28-happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut28 #-}-newtype HappyWrap29 = HappyWrap29 (LRenaming)-happyIn29 :: (LRenaming) -> (HappyAbsSyn )-happyIn29 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap29 x)-{-# INLINE happyIn29 #-}-happyOut29 :: (HappyAbsSyn ) -> HappyWrap29-happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut29 #-}-newtype HappyWrap30 = HappyWrap30 (OrdList (LHsUnitDecl PackageName))-happyIn30 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )-happyIn30 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap30 x)-{-# INLINE happyIn30 #-}-happyOut30 :: (HappyAbsSyn ) -> HappyWrap30-happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut30 #-}-newtype HappyWrap31 = HappyWrap31 (OrdList (LHsUnitDecl PackageName))-happyIn31 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )-happyIn31 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap31 x)-{-# INLINE happyIn31 #-}-happyOut31 :: (HappyAbsSyn ) -> HappyWrap31-happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut31 #-}-newtype HappyWrap32 = HappyWrap32 (LHsUnitDecl PackageName)-happyIn32 :: (LHsUnitDecl PackageName) -> (HappyAbsSyn )-happyIn32 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap32 x)-{-# INLINE happyIn32 #-}-happyOut32 :: (HappyAbsSyn ) -> HappyWrap32-happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut32 #-}-newtype HappyWrap33 = HappyWrap33 (Located (HsModule GhcPs))-happyIn33 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn33 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap33 x)-{-# INLINE happyIn33 #-}-happyOut33 :: (HappyAbsSyn ) -> HappyWrap33-happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut33 #-}-newtype HappyWrap34 = HappyWrap34 (Located (HsModule GhcPs))-happyIn34 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn34 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap34 x)-{-# INLINE happyIn34 #-}-happyOut34 :: (HappyAbsSyn ) -> HappyWrap34-happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut34 #-}-newtype HappyWrap35 = HappyWrap35 (Maybe LHsDocString)-happyIn35 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn35 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap35 x)-{-# INLINE happyIn35 #-}-happyOut35 :: (HappyAbsSyn ) -> HappyWrap35-happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut35 #-}-newtype HappyWrap36 = HappyWrap36 (())-happyIn36 :: (()) -> (HappyAbsSyn )-happyIn36 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap36 x)-{-# INLINE happyIn36 #-}-happyOut36 :: (HappyAbsSyn ) -> HappyWrap36-happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut36 #-}-newtype HappyWrap37 = HappyWrap37 (())-happyIn37 :: (()) -> (HappyAbsSyn )-happyIn37 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap37 x)-{-# INLINE happyIn37 #-}-happyOut37 :: (HappyAbsSyn ) -> HappyWrap37-happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut37 #-}-newtype HappyWrap38 = HappyWrap38 (Maybe (Located WarningTxt))-happyIn38 :: (Maybe (Located WarningTxt)) -> (HappyAbsSyn )-happyIn38 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap38 x)-{-# INLINE happyIn38 #-}-happyOut38 :: (HappyAbsSyn ) -> HappyWrap38-happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut38 #-}-newtype HappyWrap39 = HappyWrap39 (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))-happyIn39 :: (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )-happyIn39 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap39 x)-{-# INLINE happyIn39 #-}-happyOut39 :: (HappyAbsSyn ) -> HappyWrap39-happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut39 #-}-newtype HappyWrap40 = HappyWrap40 (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))-happyIn40 :: (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )-happyIn40 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap40 x)-{-# INLINE happyIn40 #-}-happyOut40 :: (HappyAbsSyn ) -> HappyWrap40-happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut40 #-}-newtype HappyWrap41 = HappyWrap41 (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))-happyIn41 :: (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )-happyIn41 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap41 x)-{-# INLINE happyIn41 #-}-happyOut41 :: (HappyAbsSyn ) -> HappyWrap41-happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut41 #-}-newtype HappyWrap42 = HappyWrap42 (([LImportDecl GhcPs], [LHsDecl GhcPs]))-happyIn42 :: (([LImportDecl GhcPs], [LHsDecl GhcPs])) -> (HappyAbsSyn )-happyIn42 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap42 x)-{-# INLINE happyIn42 #-}-happyOut42 :: (HappyAbsSyn ) -> HappyWrap42-happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut42 #-}-newtype HappyWrap43 = HappyWrap43 (Located (HsModule GhcPs))-happyIn43 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn43 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap43 x)-{-# INLINE happyIn43 #-}-happyOut43 :: (HappyAbsSyn ) -> HappyWrap43-happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut43 #-}-newtype HappyWrap44 = HappyWrap44 ([LImportDecl GhcPs])-happyIn44 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn44 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap44 x)-{-# INLINE happyIn44 #-}-happyOut44 :: (HappyAbsSyn ) -> HappyWrap44-happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut44 #-}-newtype HappyWrap45 = HappyWrap45 ([LImportDecl GhcPs])-happyIn45 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn45 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap45 x)-{-# INLINE happyIn45 #-}-happyOut45 :: (HappyAbsSyn ) -> HappyWrap45-happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut45 #-}-newtype HappyWrap46 = HappyWrap46 ([LImportDecl GhcPs])-happyIn46 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn46 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap46 x)-{-# INLINE happyIn46 #-}-happyOut46 :: (HappyAbsSyn ) -> HappyWrap46-happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut46 #-}-newtype HappyWrap47 = HappyWrap47 ([LImportDecl GhcPs])-happyIn47 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn47 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap47 x)-{-# INLINE happyIn47 #-}-happyOut47 :: (HappyAbsSyn ) -> HappyWrap47-happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut47 #-}-newtype HappyWrap48 = HappyWrap48 ((Maybe (Located [LIE GhcPs])))-happyIn48 :: ((Maybe (Located [LIE GhcPs]))) -> (HappyAbsSyn )-happyIn48 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap48 x)-{-# INLINE happyIn48 #-}-happyOut48 :: (HappyAbsSyn ) -> HappyWrap48-happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut48 #-}-newtype HappyWrap49 = HappyWrap49 (OrdList (LIE GhcPs))-happyIn49 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn49 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap49 x)-{-# INLINE happyIn49 #-}-happyOut49 :: (HappyAbsSyn ) -> HappyWrap49-happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut49 #-}-newtype HappyWrap50 = HappyWrap50 (OrdList (LIE GhcPs))-happyIn50 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn50 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap50 x)-{-# INLINE happyIn50 #-}-happyOut50 :: (HappyAbsSyn ) -> HappyWrap50-happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut50 #-}-newtype HappyWrap51 = HappyWrap51 (OrdList (LIE GhcPs))-happyIn51 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn51 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap51 x)-{-# INLINE happyIn51 #-}-happyOut51 :: (HappyAbsSyn ) -> HappyWrap51-happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut51 #-}-newtype HappyWrap52 = HappyWrap52 (OrdList (LIE GhcPs))-happyIn52 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn52 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap52 x)-{-# INLINE happyIn52 #-}-happyOut52 :: (HappyAbsSyn ) -> HappyWrap52-happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut52 #-}-newtype HappyWrap53 = HappyWrap53 (OrdList (LIE GhcPs))-happyIn53 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn53 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap53 x)-{-# INLINE happyIn53 #-}-happyOut53 :: (HappyAbsSyn ) -> HappyWrap53-happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut53 #-}-newtype HappyWrap54 = HappyWrap54 (Located ([AddAnn],ImpExpSubSpec))-happyIn54 :: (Located ([AddAnn],ImpExpSubSpec)) -> (HappyAbsSyn )-happyIn54 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap54 x)-{-# INLINE happyIn54 #-}-happyOut54 :: (HappyAbsSyn ) -> HappyWrap54-happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut54 #-}-newtype HappyWrap55 = HappyWrap55 (([AddAnn], [Located ImpExpQcSpec]))-happyIn55 :: (([AddAnn], [Located ImpExpQcSpec])) -> (HappyAbsSyn )-happyIn55 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap55 x)-{-# INLINE happyIn55 #-}-happyOut55 :: (HappyAbsSyn ) -> HappyWrap55-happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut55 #-}-newtype HappyWrap56 = HappyWrap56 (([AddAnn], [Located ImpExpQcSpec]))-happyIn56 :: (([AddAnn], [Located ImpExpQcSpec])) -> (HappyAbsSyn )-happyIn56 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap56 x)-{-# INLINE happyIn56 #-}-happyOut56 :: (HappyAbsSyn ) -> HappyWrap56-happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut56 #-}-newtype HappyWrap57 = HappyWrap57 (Located ([AddAnn], Located ImpExpQcSpec))-happyIn57 :: (Located ([AddAnn], Located ImpExpQcSpec)) -> (HappyAbsSyn )-happyIn57 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap57 x)-{-# INLINE happyIn57 #-}-happyOut57 :: (HappyAbsSyn ) -> HappyWrap57-happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut57 #-}-newtype HappyWrap58 = HappyWrap58 (Located ImpExpQcSpec)-happyIn58 :: (Located ImpExpQcSpec) -> (HappyAbsSyn )-happyIn58 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap58 x)-{-# INLINE happyIn58 #-}-happyOut58 :: (HappyAbsSyn ) -> HappyWrap58-happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut58 #-}-newtype HappyWrap59 = HappyWrap59 (Located RdrName)-happyIn59 :: (Located RdrName) -> (HappyAbsSyn )-happyIn59 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap59 x)-{-# INLINE happyIn59 #-}-happyOut59 :: (HappyAbsSyn ) -> HappyWrap59-happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut59 #-}-newtype HappyWrap60 = HappyWrap60 ([AddAnn])-happyIn60 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn60 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap60 x)-{-# INLINE happyIn60 #-}-happyOut60 :: (HappyAbsSyn ) -> HappyWrap60-happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut60 #-}-newtype HappyWrap61 = HappyWrap61 ([AddAnn])-happyIn61 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn61 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap61 x)-{-# INLINE happyIn61 #-}-happyOut61 :: (HappyAbsSyn ) -> HappyWrap61-happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut61 #-}-newtype HappyWrap62 = HappyWrap62 ([LImportDecl GhcPs])-happyIn62 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn62 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap62 x)-{-# INLINE happyIn62 #-}-happyOut62 :: (HappyAbsSyn ) -> HappyWrap62-happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut62 #-}-newtype HappyWrap63 = HappyWrap63 ([LImportDecl GhcPs])-happyIn63 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn63 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap63 x)-{-# INLINE happyIn63 #-}-happyOut63 :: (HappyAbsSyn ) -> HappyWrap63-happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut63 #-}-newtype HappyWrap64 = HappyWrap64 (LImportDecl GhcPs)-happyIn64 :: (LImportDecl GhcPs) -> (HappyAbsSyn )-happyIn64 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap64 x)-{-# INLINE happyIn64 #-}-happyOut64 :: (HappyAbsSyn ) -> HappyWrap64-happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut64 #-}-newtype HappyWrap65 = HappyWrap65 ((([AddAnn],SourceText),IsBootInterface))-happyIn65 :: ((([AddAnn],SourceText),IsBootInterface)) -> (HappyAbsSyn )-happyIn65 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap65 x)-{-# INLINE happyIn65 #-}-happyOut65 :: (HappyAbsSyn ) -> HappyWrap65-happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut65 #-}-newtype HappyWrap66 = HappyWrap66 (([AddAnn],Bool))-happyIn66 :: (([AddAnn],Bool)) -> (HappyAbsSyn )-happyIn66 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap66 x)-{-# INLINE happyIn66 #-}-happyOut66 :: (HappyAbsSyn ) -> HappyWrap66-happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut66 #-}-newtype HappyWrap67 = HappyWrap67 (([AddAnn],Maybe StringLiteral))-happyIn67 :: (([AddAnn],Maybe StringLiteral)) -> (HappyAbsSyn )-happyIn67 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap67 x)-{-# INLINE happyIn67 #-}-happyOut67 :: (HappyAbsSyn ) -> HappyWrap67-happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut67 #-}-newtype HappyWrap68 = HappyWrap68 (([AddAnn],Bool))-happyIn68 :: (([AddAnn],Bool)) -> (HappyAbsSyn )-happyIn68 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap68 x)-{-# INLINE happyIn68 #-}-happyOut68 :: (HappyAbsSyn ) -> HappyWrap68-happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut68 #-}-newtype HappyWrap69 = HappyWrap69 (([AddAnn],Located (Maybe (Located ModuleName))))-happyIn69 :: (([AddAnn],Located (Maybe (Located ModuleName)))) -> (HappyAbsSyn )-happyIn69 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap69 x)-{-# INLINE happyIn69 #-}-happyOut69 :: (HappyAbsSyn ) -> HappyWrap69-happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut69 #-}-newtype HappyWrap70 = HappyWrap70 (Located (Maybe (Bool, Located [LIE GhcPs])))-happyIn70 :: (Located (Maybe (Bool, Located [LIE GhcPs]))) -> (HappyAbsSyn )-happyIn70 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap70 x)-{-# INLINE happyIn70 #-}-happyOut70 :: (HappyAbsSyn ) -> HappyWrap70-happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut70 #-}-newtype HappyWrap71 = HappyWrap71 (Located (Bool, Located [LIE GhcPs]))-happyIn71 :: (Located (Bool, Located [LIE GhcPs])) -> (HappyAbsSyn )-happyIn71 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap71 x)-{-# INLINE happyIn71 #-}-happyOut71 :: (HappyAbsSyn ) -> HappyWrap71-happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut71 #-}-newtype HappyWrap72 = HappyWrap72 (Located (SourceText,Int))-happyIn72 :: (Located (SourceText,Int)) -> (HappyAbsSyn )-happyIn72 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap72 x)-{-# INLINE happyIn72 #-}-happyOut72 :: (HappyAbsSyn ) -> HappyWrap72-happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut72 #-}-newtype HappyWrap73 = HappyWrap73 (Located FixityDirection)-happyIn73 :: (Located FixityDirection) -> (HappyAbsSyn )-happyIn73 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap73 x)-{-# INLINE happyIn73 #-}-happyOut73 :: (HappyAbsSyn ) -> HappyWrap73-happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut73 #-}-newtype HappyWrap74 = HappyWrap74 (Located (OrdList (Located RdrName)))-happyIn74 :: (Located (OrdList (Located RdrName))) -> (HappyAbsSyn )-happyIn74 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap74 x)-{-# INLINE happyIn74 #-}-happyOut74 :: (HappyAbsSyn ) -> HappyWrap74-happyOut74 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut74 #-}-newtype HappyWrap75 = HappyWrap75 (OrdList (LHsDecl GhcPs))-happyIn75 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn75 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap75 x)-{-# INLINE happyIn75 #-}-happyOut75 :: (HappyAbsSyn ) -> HappyWrap75-happyOut75 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut75 #-}-newtype HappyWrap76 = HappyWrap76 (OrdList (LHsDecl GhcPs))-happyIn76 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn76 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap76 x)-{-# INLINE happyIn76 #-}-happyOut76 :: (HappyAbsSyn ) -> HappyWrap76-happyOut76 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut76 #-}-newtype HappyWrap77 = HappyWrap77 (LHsDecl GhcPs)-happyIn77 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn77 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap77 x)-{-# INLINE happyIn77 #-}-happyOut77 :: (HappyAbsSyn ) -> HappyWrap77-happyOut77 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut77 #-}-newtype HappyWrap78 = HappyWrap78 (LTyClDecl GhcPs)-happyIn78 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )-happyIn78 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap78 x)-{-# INLINE happyIn78 #-}-happyOut78 :: (HappyAbsSyn ) -> HappyWrap78-happyOut78 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut78 #-}-newtype HappyWrap79 = HappyWrap79 (LTyClDecl GhcPs)-happyIn79 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )-happyIn79 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap79 x)-{-# INLINE happyIn79 #-}-happyOut79 :: (HappyAbsSyn ) -> HappyWrap79-happyOut79 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut79 #-}-newtype HappyWrap80 = HappyWrap80 (LInstDecl GhcPs)-happyIn80 :: (LInstDecl GhcPs) -> (HappyAbsSyn )-happyIn80 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap80 x)-{-# INLINE happyIn80 #-}-happyOut80 :: (HappyAbsSyn ) -> HappyWrap80-happyOut80 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut80 #-}-newtype HappyWrap81 = HappyWrap81 (Maybe (Located OverlapMode))-happyIn81 :: (Maybe (Located OverlapMode)) -> (HappyAbsSyn )-happyIn81 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap81 x)-{-# INLINE happyIn81 #-}-happyOut81 :: (HappyAbsSyn ) -> HappyWrap81-happyOut81 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut81 #-}-newtype HappyWrap82 = HappyWrap82 (LDerivStrategy GhcPs)-happyIn82 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )-happyIn82 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap82 x)-{-# INLINE happyIn82 #-}-happyOut82 :: (HappyAbsSyn ) -> HappyWrap82-happyOut82 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut82 #-}-newtype HappyWrap83 = HappyWrap83 (LDerivStrategy GhcPs)-happyIn83 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )-happyIn83 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap83 x)-{-# INLINE happyIn83 #-}-happyOut83 :: (HappyAbsSyn ) -> HappyWrap83-happyOut83 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut83 #-}-newtype HappyWrap84 = HappyWrap84 (Maybe (LDerivStrategy GhcPs))-happyIn84 :: (Maybe (LDerivStrategy GhcPs)) -> (HappyAbsSyn )-happyIn84 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap84 x)-{-# INLINE happyIn84 #-}-happyOut84 :: (HappyAbsSyn ) -> HappyWrap84-happyOut84 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut84 #-}-newtype HappyWrap85 = HappyWrap85 (Located ([AddAnn], Maybe (LInjectivityAnn GhcPs)))-happyIn85 :: (Located ([AddAnn], Maybe (LInjectivityAnn GhcPs))) -> (HappyAbsSyn )-happyIn85 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap85 x)-{-# INLINE happyIn85 #-}-happyOut85 :: (HappyAbsSyn ) -> HappyWrap85-happyOut85 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut85 #-}-newtype HappyWrap86 = HappyWrap86 (LInjectivityAnn GhcPs)-happyIn86 :: (LInjectivityAnn GhcPs) -> (HappyAbsSyn )-happyIn86 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap86 x)-{-# INLINE happyIn86 #-}-happyOut86 :: (HappyAbsSyn ) -> HappyWrap86-happyOut86 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut86 #-}-newtype HappyWrap87 = HappyWrap87 (Located [Located RdrName])-happyIn87 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn87 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap87 x)-{-# INLINE happyIn87 #-}-happyOut87 :: (HappyAbsSyn ) -> HappyWrap87-happyOut87 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut87 #-}-newtype HappyWrap88 = HappyWrap88 (Located ([AddAnn],FamilyInfo GhcPs))-happyIn88 :: (Located ([AddAnn],FamilyInfo GhcPs)) -> (HappyAbsSyn )-happyIn88 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap88 x)-{-# INLINE happyIn88 #-}-happyOut88 :: (HappyAbsSyn ) -> HappyWrap88-happyOut88 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut88 #-}-newtype HappyWrap89 = HappyWrap89 (Located ([AddAnn],Maybe [LTyFamInstEqn GhcPs]))-happyIn89 :: (Located ([AddAnn],Maybe [LTyFamInstEqn GhcPs])) -> (HappyAbsSyn )-happyIn89 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap89 x)-{-# INLINE happyIn89 #-}-happyOut89 :: (HappyAbsSyn ) -> HappyWrap89-happyOut89 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut89 #-}-newtype HappyWrap90 = HappyWrap90 (Located [LTyFamInstEqn GhcPs])-happyIn90 :: (Located [LTyFamInstEqn GhcPs]) -> (HappyAbsSyn )-happyIn90 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap90 x)-{-# INLINE happyIn90 #-}-happyOut90 :: (HappyAbsSyn ) -> HappyWrap90-happyOut90 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut90 #-}-newtype HappyWrap91 = HappyWrap91 (Located ([AddAnn],TyFamInstEqn GhcPs))-happyIn91 :: (Located ([AddAnn],TyFamInstEqn GhcPs)) -> (HappyAbsSyn )-happyIn91 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap91 x)-{-# INLINE happyIn91 #-}-happyOut91 :: (HappyAbsSyn ) -> HappyWrap91-happyOut91 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut91 #-}-newtype HappyWrap92 = HappyWrap92 (LHsDecl GhcPs)-happyIn92 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn92 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap92 x)-{-# INLINE happyIn92 #-}-happyOut92 :: (HappyAbsSyn ) -> HappyWrap92-happyOut92 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut92 #-}-newtype HappyWrap93 = HappyWrap93 ([AddAnn])-happyIn93 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn93 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap93 x)-{-# INLINE happyIn93 #-}-happyOut93 :: (HappyAbsSyn ) -> HappyWrap93-happyOut93 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut93 #-}-newtype HappyWrap94 = HappyWrap94 ([AddAnn])-happyIn94 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn94 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap94 x)-{-# INLINE happyIn94 #-}-happyOut94 :: (HappyAbsSyn ) -> HappyWrap94-happyOut94 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut94 #-}-newtype HappyWrap95 = HappyWrap95 (LInstDecl GhcPs)-happyIn95 :: (LInstDecl GhcPs) -> (HappyAbsSyn )-happyIn95 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap95 x)-{-# INLINE happyIn95 #-}-happyOut95 :: (HappyAbsSyn ) -> HappyWrap95-happyOut95 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut95 #-}-newtype HappyWrap96 = HappyWrap96 (Located (AddAnn, NewOrData))-happyIn96 :: (Located (AddAnn, NewOrData)) -> (HappyAbsSyn )-happyIn96 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap96 x)-{-# INLINE happyIn96 #-}-happyOut96 :: (HappyAbsSyn ) -> HappyWrap96-happyOut96 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut96 #-}-newtype HappyWrap97 = HappyWrap97 (Located ([AddAnn], Maybe (LHsKind GhcPs)))-happyIn97 :: (Located ([AddAnn], Maybe (LHsKind GhcPs))) -> (HappyAbsSyn )-happyIn97 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap97 x)-{-# INLINE happyIn97 #-}-happyOut97 :: (HappyAbsSyn ) -> HappyWrap97-happyOut97 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut97 #-}-newtype HappyWrap98 = HappyWrap98 (Located ([AddAnn], LFamilyResultSig GhcPs))-happyIn98 :: (Located ([AddAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )-happyIn98 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap98 x)-{-# INLINE happyIn98 #-}-happyOut98 :: (HappyAbsSyn ) -> HappyWrap98-happyOut98 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut98 #-}-newtype HappyWrap99 = HappyWrap99 (Located ([AddAnn], LFamilyResultSig GhcPs))-happyIn99 :: (Located ([AddAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )-happyIn99 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap99 x)-{-# INLINE happyIn99 #-}-happyOut99 :: (HappyAbsSyn ) -> HappyWrap99-happyOut99 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut99 #-}-newtype HappyWrap100 = HappyWrap100 (Located ([AddAnn], ( LFamilyResultSig GhcPs-                                            , Maybe (LInjectivityAnn GhcPs))))-happyIn100 :: (Located ([AddAnn], ( LFamilyResultSig GhcPs-                                            , Maybe (LInjectivityAnn GhcPs)))) -> (HappyAbsSyn )-happyIn100 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap100 x)-{-# INLINE happyIn100 #-}-happyOut100 :: (HappyAbsSyn ) -> HappyWrap100-happyOut100 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut100 #-}-newtype HappyWrap101 = HappyWrap101 (Located (Maybe (LHsContext GhcPs), LHsType GhcPs))-happyIn101 :: (Located (Maybe (LHsContext GhcPs), LHsType GhcPs)) -> (HappyAbsSyn )-happyIn101 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap101 x)-{-# INLINE happyIn101 #-}-happyOut101 :: (HappyAbsSyn ) -> HappyWrap101-happyOut101 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut101 #-}-newtype HappyWrap102 = HappyWrap102 (Located ([AddAnn],(Maybe (LHsContext GhcPs), Maybe [LHsTyVarBndr GhcPs], LHsType GhcPs)))-happyIn102 :: (Located ([AddAnn],(Maybe (LHsContext GhcPs), Maybe [LHsTyVarBndr GhcPs], LHsType GhcPs))) -> (HappyAbsSyn )-happyIn102 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap102 x)-{-# INLINE happyIn102 #-}-happyOut102 :: (HappyAbsSyn ) -> HappyWrap102-happyOut102 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut102 #-}-newtype HappyWrap103 = HappyWrap103 (Maybe (Located CType))-happyIn103 :: (Maybe (Located CType)) -> (HappyAbsSyn )-happyIn103 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap103 x)-{-# INLINE happyIn103 #-}-happyOut103 :: (HappyAbsSyn ) -> HappyWrap103-happyOut103 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut103 #-}-newtype HappyWrap104 = HappyWrap104 (LDerivDecl GhcPs)-happyIn104 :: (LDerivDecl GhcPs) -> (HappyAbsSyn )-happyIn104 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap104 x)-{-# INLINE happyIn104 #-}-happyOut104 :: (HappyAbsSyn ) -> HappyWrap104-happyOut104 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut104 #-}-newtype HappyWrap105 = HappyWrap105 (LRoleAnnotDecl GhcPs)-happyIn105 :: (LRoleAnnotDecl GhcPs) -> (HappyAbsSyn )-happyIn105 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap105 x)-{-# INLINE happyIn105 #-}-happyOut105 :: (HappyAbsSyn ) -> HappyWrap105-happyOut105 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut105 #-}-newtype HappyWrap106 = HappyWrap106 (Located [Located (Maybe FastString)])-happyIn106 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )-happyIn106 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap106 x)-{-# INLINE happyIn106 #-}-happyOut106 :: (HappyAbsSyn ) -> HappyWrap106-happyOut106 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut106 #-}-newtype HappyWrap107 = HappyWrap107 (Located [Located (Maybe FastString)])-happyIn107 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )-happyIn107 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap107 x)-{-# INLINE happyIn107 #-}-happyOut107 :: (HappyAbsSyn ) -> HappyWrap107-happyOut107 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut107 #-}-newtype HappyWrap108 = HappyWrap108 (Located (Maybe FastString))-happyIn108 :: (Located (Maybe FastString)) -> (HappyAbsSyn )-happyIn108 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap108 x)-{-# INLINE happyIn108 #-}-happyOut108 :: (HappyAbsSyn ) -> HappyWrap108-happyOut108 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut108 #-}-newtype HappyWrap109 = HappyWrap109 (LHsDecl GhcPs)-happyIn109 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn109 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap109 x)-{-# INLINE happyIn109 #-}-happyOut109 :: (HappyAbsSyn ) -> HappyWrap109-happyOut109 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut109 #-}-newtype HappyWrap110 = HappyWrap110 ((Located RdrName, HsPatSynDetails (Located RdrName), [AddAnn]))-happyIn110 :: ((Located RdrName, HsPatSynDetails (Located RdrName), [AddAnn])) -> (HappyAbsSyn )-happyIn110 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap110 x)-{-# INLINE happyIn110 #-}-happyOut110 :: (HappyAbsSyn ) -> HappyWrap110-happyOut110 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut110 #-}-newtype HappyWrap111 = HappyWrap111 ([Located RdrName])-happyIn111 :: ([Located RdrName]) -> (HappyAbsSyn )-happyIn111 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap111 x)-{-# INLINE happyIn111 #-}-happyOut111 :: (HappyAbsSyn ) -> HappyWrap111-happyOut111 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut111 #-}-newtype HappyWrap112 = HappyWrap112 ([RecordPatSynField (Located RdrName)])-happyIn112 :: ([RecordPatSynField (Located RdrName)]) -> (HappyAbsSyn )-happyIn112 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap112 x)-{-# INLINE happyIn112 #-}-happyOut112 :: (HappyAbsSyn ) -> HappyWrap112-happyOut112 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut112 #-}-newtype HappyWrap113 = HappyWrap113 (Located ([AddAnn]-                         , Located (OrdList (LHsDecl GhcPs))))-happyIn113 :: (Located ([AddAnn]-                         , Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )-happyIn113 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap113 x)-{-# INLINE happyIn113 #-}-happyOut113 :: (HappyAbsSyn ) -> HappyWrap113-happyOut113 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut113 #-}-newtype HappyWrap114 = HappyWrap114 (LSig GhcPs)-happyIn114 :: (LSig GhcPs) -> (HappyAbsSyn )-happyIn114 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap114 x)-{-# INLINE happyIn114 #-}-happyOut114 :: (HappyAbsSyn ) -> HappyWrap114-happyOut114 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut114 #-}-newtype HappyWrap115 = HappyWrap115 (LHsDecl GhcPs)-happyIn115 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn115 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap115 x)-{-# INLINE happyIn115 #-}-happyOut115 :: (HappyAbsSyn ) -> HappyWrap115-happyOut115 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut115 #-}-newtype HappyWrap116 = HappyWrap116 (Located ([AddAnn],OrdList (LHsDecl GhcPs)))-happyIn116 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn116 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap116 x)-{-# INLINE happyIn116 #-}-happyOut116 :: (HappyAbsSyn ) -> HappyWrap116-happyOut116 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut116 #-}-newtype HappyWrap117 = HappyWrap117 (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs)))-happyIn117 :: (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn117 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap117 x)-{-# INLINE happyIn117 #-}-happyOut117 :: (HappyAbsSyn ) -> HappyWrap117-happyOut117 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut117 #-}-newtype HappyWrap118 = HappyWrap118 (Located ([AddAnn]-                       ,(OrdList (LHsDecl GhcPs))))-happyIn118 :: (Located ([AddAnn]-                       ,(OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )-happyIn118 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap118 x)-{-# INLINE happyIn118 #-}-happyOut118 :: (HappyAbsSyn ) -> HappyWrap118-happyOut118 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut118 #-}-newtype HappyWrap119 = HappyWrap119 (Located (OrdList (LHsDecl GhcPs)))-happyIn119 :: (Located (OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn119 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap119 x)-{-# INLINE happyIn119 #-}-happyOut119 :: (HappyAbsSyn ) -> HappyWrap119-happyOut119 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut119 #-}-newtype HappyWrap120 = HappyWrap120 (Located ([AddAnn],OrdList (LHsDecl GhcPs)))-happyIn120 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn120 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap120 x)-{-# INLINE happyIn120 #-}-happyOut120 :: (HappyAbsSyn ) -> HappyWrap120-happyOut120 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut120 #-}-newtype HappyWrap121 = HappyWrap121 (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs)))-happyIn121 :: (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn121 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap121 x)-{-# INLINE happyIn121 #-}-happyOut121 :: (HappyAbsSyn ) -> HappyWrap121-happyOut121 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut121 #-}-newtype HappyWrap122 = HappyWrap122 (Located ([AddAnn]-                        , OrdList (LHsDecl GhcPs)))-happyIn122 :: (Located ([AddAnn]-                        , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn122 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap122 x)-{-# INLINE happyIn122 #-}-happyOut122 :: (HappyAbsSyn ) -> HappyWrap122-happyOut122 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut122 #-}-newtype HappyWrap123 = HappyWrap123 (Located ([AddAnn],OrdList (LHsDecl GhcPs)))-happyIn123 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn123 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap123 x)-{-# INLINE happyIn123 #-}-happyOut123 :: (HappyAbsSyn ) -> HappyWrap123-happyOut123 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut123 #-}-newtype HappyWrap124 = HappyWrap124 (Located ([AddAnn],Located (OrdList (LHsDecl GhcPs))))-happyIn124 :: (Located ([AddAnn],Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )-happyIn124 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap124 x)-{-# INLINE happyIn124 #-}-happyOut124 :: (HappyAbsSyn ) -> HappyWrap124-happyOut124 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut124 #-}-newtype HappyWrap125 = HappyWrap125 (Located ([AddAnn],Located (HsLocalBinds GhcPs)))-happyIn125 :: (Located ([AddAnn],Located (HsLocalBinds GhcPs))) -> (HappyAbsSyn )-happyIn125 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap125 x)-{-# INLINE happyIn125 #-}-happyOut125 :: (HappyAbsSyn ) -> HappyWrap125-happyOut125 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut125 #-}-newtype HappyWrap126 = HappyWrap126 (Located ([AddAnn],Located (HsLocalBinds GhcPs)))-happyIn126 :: (Located ([AddAnn],Located (HsLocalBinds GhcPs))) -> (HappyAbsSyn )-happyIn126 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap126 x)-{-# INLINE happyIn126 #-}-happyOut126 :: (HappyAbsSyn ) -> HappyWrap126-happyOut126 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut126 #-}-newtype HappyWrap127 = HappyWrap127 (OrdList (LRuleDecl GhcPs))-happyIn127 :: (OrdList (LRuleDecl GhcPs)) -> (HappyAbsSyn )-happyIn127 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap127 x)-{-# INLINE happyIn127 #-}-happyOut127 :: (HappyAbsSyn ) -> HappyWrap127-happyOut127 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut127 #-}-newtype HappyWrap128 = HappyWrap128 (LRuleDecl GhcPs)-happyIn128 :: (LRuleDecl GhcPs) -> (HappyAbsSyn )-happyIn128 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap128 x)-{-# INLINE happyIn128 #-}-happyOut128 :: (HappyAbsSyn ) -> HappyWrap128-happyOut128 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut128 #-}-newtype HappyWrap129 = HappyWrap129 (([AddAnn],Maybe Activation))-happyIn129 :: (([AddAnn],Maybe Activation)) -> (HappyAbsSyn )-happyIn129 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap129 x)-{-# INLINE happyIn129 #-}-happyOut129 :: (HappyAbsSyn ) -> HappyWrap129-happyOut129 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut129 #-}-newtype HappyWrap130 = HappyWrap130 (([AddAnn]-                              ,Activation))-happyIn130 :: (([AddAnn]-                              ,Activation)) -> (HappyAbsSyn )-happyIn130 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap130 x)-{-# INLINE happyIn130 #-}-happyOut130 :: (HappyAbsSyn ) -> HappyWrap130-happyOut130 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut130 #-}-newtype HappyWrap131 = HappyWrap131 (([AddAnn], Maybe [LHsTyVarBndr GhcPs], [LRuleBndr GhcPs]))-happyIn131 :: (([AddAnn], Maybe [LHsTyVarBndr GhcPs], [LRuleBndr GhcPs])) -> (HappyAbsSyn )-happyIn131 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap131 x)-{-# INLINE happyIn131 #-}-happyOut131 :: (HappyAbsSyn ) -> HappyWrap131-happyOut131 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut131 #-}-newtype HappyWrap132 = HappyWrap132 ([LRuleTyTmVar])-happyIn132 :: ([LRuleTyTmVar]) -> (HappyAbsSyn )-happyIn132 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap132 x)-{-# INLINE happyIn132 #-}-happyOut132 :: (HappyAbsSyn ) -> HappyWrap132-happyOut132 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut132 #-}-newtype HappyWrap133 = HappyWrap133 (LRuleTyTmVar)-happyIn133 :: (LRuleTyTmVar) -> (HappyAbsSyn )-happyIn133 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap133 x)-{-# INLINE happyIn133 #-}-happyOut133 :: (HappyAbsSyn ) -> HappyWrap133-happyOut133 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut133 #-}-newtype HappyWrap134 = HappyWrap134 (OrdList (LWarnDecl GhcPs))-happyIn134 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn134 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap134 x)-{-# INLINE happyIn134 #-}-happyOut134 :: (HappyAbsSyn ) -> HappyWrap134-happyOut134 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut134 #-}-newtype HappyWrap135 = HappyWrap135 (OrdList (LWarnDecl GhcPs))-happyIn135 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn135 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap135 x)-{-# INLINE happyIn135 #-}-happyOut135 :: (HappyAbsSyn ) -> HappyWrap135-happyOut135 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut135 #-}-newtype HappyWrap136 = HappyWrap136 (OrdList (LWarnDecl GhcPs))-happyIn136 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn136 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap136 x)-{-# INLINE happyIn136 #-}-happyOut136 :: (HappyAbsSyn ) -> HappyWrap136-happyOut136 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut136 #-}-newtype HappyWrap137 = HappyWrap137 (OrdList (LWarnDecl GhcPs))-happyIn137 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn137 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap137 x)-{-# INLINE happyIn137 #-}-happyOut137 :: (HappyAbsSyn ) -> HappyWrap137-happyOut137 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut137 #-}-newtype HappyWrap138 = HappyWrap138 (Located ([AddAnn],[Located StringLiteral]))-happyIn138 :: (Located ([AddAnn],[Located StringLiteral])) -> (HappyAbsSyn )-happyIn138 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap138 x)-{-# INLINE happyIn138 #-}-happyOut138 :: (HappyAbsSyn ) -> HappyWrap138-happyOut138 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut138 #-}-newtype HappyWrap139 = HappyWrap139 (Located (OrdList (Located StringLiteral)))-happyIn139 :: (Located (OrdList (Located StringLiteral))) -> (HappyAbsSyn )-happyIn139 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap139 x)-{-# INLINE happyIn139 #-}-happyOut139 :: (HappyAbsSyn ) -> HappyWrap139-happyOut139 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut139 #-}-newtype HappyWrap140 = HappyWrap140 (LHsDecl GhcPs)-happyIn140 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn140 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap140 x)-{-# INLINE happyIn140 #-}-happyOut140 :: (HappyAbsSyn ) -> HappyWrap140-happyOut140 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut140 #-}-newtype HappyWrap141 = HappyWrap141 (Located ([AddAnn],HsDecl GhcPs))-happyIn141 :: (Located ([AddAnn],HsDecl GhcPs)) -> (HappyAbsSyn )-happyIn141 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap141 x)-{-# INLINE happyIn141 #-}-happyOut141 :: (HappyAbsSyn ) -> HappyWrap141-happyOut141 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut141 #-}-newtype HappyWrap142 = HappyWrap142 (Located CCallConv)-happyIn142 :: (Located CCallConv) -> (HappyAbsSyn )-happyIn142 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap142 x)-{-# INLINE happyIn142 #-}-happyOut142 :: (HappyAbsSyn ) -> HappyWrap142-happyOut142 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut142 #-}-newtype HappyWrap143 = HappyWrap143 (Located Safety)-happyIn143 :: (Located Safety) -> (HappyAbsSyn )-happyIn143 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap143 x)-{-# INLINE happyIn143 #-}-happyOut143 :: (HappyAbsSyn ) -> HappyWrap143-happyOut143 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut143 #-}-newtype HappyWrap144 = HappyWrap144 (Located ([AddAnn]-                    ,(Located StringLiteral, Located RdrName, LHsSigType GhcPs)))-happyIn144 :: (Located ([AddAnn]-                    ,(Located StringLiteral, Located RdrName, LHsSigType GhcPs))) -> (HappyAbsSyn )-happyIn144 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap144 x)-{-# INLINE happyIn144 #-}-happyOut144 :: (HappyAbsSyn ) -> HappyWrap144-happyOut144 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut144 #-}-newtype HappyWrap145 = HappyWrap145 (([AddAnn], Maybe (LHsType GhcPs)))-happyIn145 :: (([AddAnn], Maybe (LHsType GhcPs))) -> (HappyAbsSyn )-happyIn145 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap145 x)-{-# INLINE happyIn145 #-}-happyOut145 :: (HappyAbsSyn ) -> HappyWrap145-happyOut145 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut145 #-}-newtype HappyWrap146 = HappyWrap146 (([AddAnn], Maybe (Located RdrName)))-happyIn146 :: (([AddAnn], Maybe (Located RdrName))) -> (HappyAbsSyn )-happyIn146 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap146 x)-{-# INLINE happyIn146 #-}-happyOut146 :: (HappyAbsSyn ) -> HappyWrap146-happyOut146 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut146 #-}-newtype HappyWrap147 = HappyWrap147 (LHsType GhcPs)-happyIn147 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn147 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap147 x)-{-# INLINE happyIn147 #-}-happyOut147 :: (HappyAbsSyn ) -> HappyWrap147-happyOut147 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut147 #-}-newtype HappyWrap148 = HappyWrap148 (LHsType GhcPs)-happyIn148 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn148 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap148 x)-{-# INLINE happyIn148 #-}-happyOut148 :: (HappyAbsSyn ) -> HappyWrap148-happyOut148 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut148 #-}-newtype HappyWrap149 = HappyWrap149 (Located [Located RdrName])-happyIn149 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn149 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap149 x)-{-# INLINE happyIn149 #-}-happyOut149 :: (HappyAbsSyn ) -> HappyWrap149-happyOut149 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut149 #-}-newtype HappyWrap150 = HappyWrap150 ((OrdList (LHsSigType GhcPs)))-happyIn150 :: ((OrdList (LHsSigType GhcPs))) -> (HappyAbsSyn )-happyIn150 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap150 x)-{-# INLINE happyIn150 #-}-happyOut150 :: (HappyAbsSyn ) -> HappyWrap150-happyOut150 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut150 #-}-newtype HappyWrap151 = HappyWrap151 (Located ([AddAnn], SourceText, SrcUnpackedness))-happyIn151 :: (Located ([AddAnn], SourceText, SrcUnpackedness)) -> (HappyAbsSyn )-happyIn151 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap151 x)-{-# INLINE happyIn151 #-}-happyOut151 :: (HappyAbsSyn ) -> HappyWrap151-happyOut151 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut151 #-}-newtype HappyWrap152 = HappyWrap152 (LHsType GhcPs)-happyIn152 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn152 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap152 x)-{-# INLINE happyIn152 #-}-happyOut152 :: (HappyAbsSyn ) -> HappyWrap152-happyOut152 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut152 #-}-newtype HappyWrap153 = HappyWrap153 (LHsType GhcPs)-happyIn153 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn153 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap153 x)-{-# INLINE happyIn153 #-}-happyOut153 :: (HappyAbsSyn ) -> HappyWrap153-happyOut153 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut153 #-}-newtype HappyWrap154 = HappyWrap154 (LHsType GhcPs)-happyIn154 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn154 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap154 x)-{-# INLINE happyIn154 #-}-happyOut154 :: (HappyAbsSyn ) -> HappyWrap154-happyOut154 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut154 #-}-newtype HappyWrap155 = HappyWrap155 (LHsType GhcPs)-happyIn155 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn155 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap155 x)-{-# INLINE happyIn155 #-}-happyOut155 :: (HappyAbsSyn ) -> HappyWrap155-happyOut155 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut155 #-}-newtype HappyWrap156 = HappyWrap156 (LHsContext GhcPs)-happyIn156 :: (LHsContext GhcPs) -> (HappyAbsSyn )-happyIn156 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap156 x)-{-# INLINE happyIn156 #-}-happyOut156 :: (HappyAbsSyn ) -> HappyWrap156-happyOut156 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut156 #-}-newtype HappyWrap157 = HappyWrap157 (LHsContext GhcPs)-happyIn157 :: (LHsContext GhcPs) -> (HappyAbsSyn )-happyIn157 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap157 x)-{-# INLINE happyIn157 #-}-happyOut157 :: (HappyAbsSyn ) -> HappyWrap157-happyOut157 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut157 #-}-newtype HappyWrap158 = HappyWrap158 (LHsType GhcPs)-happyIn158 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn158 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap158 x)-{-# INLINE happyIn158 #-}-happyOut158 :: (HappyAbsSyn ) -> HappyWrap158-happyOut158 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut158 #-}-newtype HappyWrap159 = HappyWrap159 (LHsType GhcPs)-happyIn159 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn159 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap159 x)-{-# INLINE happyIn159 #-}-happyOut159 :: (HappyAbsSyn ) -> HappyWrap159-happyOut159 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut159 #-}-newtype HappyWrap160 = HappyWrap160 (LHsType GhcPs)-happyIn160 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn160 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap160 x)-{-# INLINE happyIn160 #-}-happyOut160 :: (HappyAbsSyn ) -> HappyWrap160-happyOut160 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut160 #-}-newtype HappyWrap161 = HappyWrap161 (Located [Located TyEl])-happyIn161 :: (Located [Located TyEl]) -> (HappyAbsSyn )-happyIn161 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap161 x)-{-# INLINE happyIn161 #-}-happyOut161 :: (HappyAbsSyn ) -> HappyWrap161-happyOut161 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut161 #-}-newtype HappyWrap162 = HappyWrap162 (Located TyEl)-happyIn162 :: (Located TyEl) -> (HappyAbsSyn )-happyIn162 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap162 x)-{-# INLINE happyIn162 #-}-happyOut162 :: (HappyAbsSyn ) -> HappyWrap162-happyOut162 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut162 #-}-newtype HappyWrap163 = HappyWrap163 (LHsType GhcPs)-happyIn163 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn163 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap163 x)-{-# INLINE happyIn163 #-}-happyOut163 :: (HappyAbsSyn ) -> HappyWrap163-happyOut163 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut163 #-}-newtype HappyWrap164 = HappyWrap164 ([Located TyEl])-happyIn164 :: ([Located TyEl]) -> (HappyAbsSyn )-happyIn164 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap164 x)-{-# INLINE happyIn164 #-}-happyOut164 :: (HappyAbsSyn ) -> HappyWrap164-happyOut164 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut164 #-}-newtype HappyWrap165 = HappyWrap165 (Located TyEl)-happyIn165 :: (Located TyEl) -> (HappyAbsSyn )-happyIn165 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap165 x)-{-# INLINE happyIn165 #-}-happyOut165 :: (HappyAbsSyn ) -> HappyWrap165-happyOut165 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut165 #-}-newtype HappyWrap166 = HappyWrap166 (LHsType GhcPs)-happyIn166 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn166 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap166 x)-{-# INLINE happyIn166 #-}-happyOut166 :: (HappyAbsSyn ) -> HappyWrap166-happyOut166 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut166 #-}-newtype HappyWrap167 = HappyWrap167 (LHsSigType GhcPs)-happyIn167 :: (LHsSigType GhcPs) -> (HappyAbsSyn )-happyIn167 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap167 x)-{-# INLINE happyIn167 #-}-happyOut167 :: (HappyAbsSyn ) -> HappyWrap167-happyOut167 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut167 #-}-newtype HappyWrap168 = HappyWrap168 ([LHsSigType GhcPs])-happyIn168 :: ([LHsSigType GhcPs]) -> (HappyAbsSyn )-happyIn168 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap168 x)-{-# INLINE happyIn168 #-}-happyOut168 :: (HappyAbsSyn ) -> HappyWrap168-happyOut168 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut168 #-}-newtype HappyWrap169 = HappyWrap169 ([LHsType GhcPs])-happyIn169 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn169 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap169 x)-{-# INLINE happyIn169 #-}-happyOut169 :: (HappyAbsSyn ) -> HappyWrap169-happyOut169 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut169 #-}-newtype HappyWrap170 = HappyWrap170 ([LHsType GhcPs])-happyIn170 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn170 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap170 x)-{-# INLINE happyIn170 #-}-happyOut170 :: (HappyAbsSyn ) -> HappyWrap170-happyOut170 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut170 #-}-newtype HappyWrap171 = HappyWrap171 ([LHsType GhcPs])-happyIn171 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn171 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap171 x)-{-# INLINE happyIn171 #-}-happyOut171 :: (HappyAbsSyn ) -> HappyWrap171-happyOut171 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut171 #-}-newtype HappyWrap172 = HappyWrap172 ([LHsTyVarBndr GhcPs])-happyIn172 :: ([LHsTyVarBndr GhcPs]) -> (HappyAbsSyn )-happyIn172 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap172 x)-{-# INLINE happyIn172 #-}-happyOut172 :: (HappyAbsSyn ) -> HappyWrap172-happyOut172 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut172 #-}-newtype HappyWrap173 = HappyWrap173 (LHsTyVarBndr GhcPs)-happyIn173 :: (LHsTyVarBndr GhcPs) -> (HappyAbsSyn )-happyIn173 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap173 x)-{-# INLINE happyIn173 #-}-happyOut173 :: (HappyAbsSyn ) -> HappyWrap173-happyOut173 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut173 #-}-newtype HappyWrap174 = HappyWrap174 (Located ([AddAnn],[Located (FunDep (Located RdrName))]))-happyIn174 :: (Located ([AddAnn],[Located (FunDep (Located RdrName))])) -> (HappyAbsSyn )-happyIn174 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap174 x)-{-# INLINE happyIn174 #-}-happyOut174 :: (HappyAbsSyn ) -> HappyWrap174-happyOut174 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut174 #-}-newtype HappyWrap175 = HappyWrap175 (Located [Located (FunDep (Located RdrName))])-happyIn175 :: (Located [Located (FunDep (Located RdrName))]) -> (HappyAbsSyn )-happyIn175 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap175 x)-{-# INLINE happyIn175 #-}-happyOut175 :: (HappyAbsSyn ) -> HappyWrap175-happyOut175 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut175 #-}-newtype HappyWrap176 = HappyWrap176 (Located (FunDep (Located RdrName)))-happyIn176 :: (Located (FunDep (Located RdrName))) -> (HappyAbsSyn )-happyIn176 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap176 x)-{-# INLINE happyIn176 #-}-happyOut176 :: (HappyAbsSyn ) -> HappyWrap176-happyOut176 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut176 #-}-newtype HappyWrap177 = HappyWrap177 (Located [Located RdrName])-happyIn177 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn177 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap177 x)-{-# INLINE happyIn177 #-}-happyOut177 :: (HappyAbsSyn ) -> HappyWrap177-happyOut177 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut177 #-}-newtype HappyWrap178 = HappyWrap178 (LHsKind GhcPs)-happyIn178 :: (LHsKind GhcPs) -> (HappyAbsSyn )-happyIn178 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap178 x)-{-# INLINE happyIn178 #-}-happyOut178 :: (HappyAbsSyn ) -> HappyWrap178-happyOut178 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut178 #-}-newtype HappyWrap179 = HappyWrap179 (Located ([AddAnn]-                          ,[LConDecl GhcPs]))-happyIn179 :: (Located ([AddAnn]-                          ,[LConDecl GhcPs])) -> (HappyAbsSyn )-happyIn179 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap179 x)-{-# INLINE happyIn179 #-}-happyOut179 :: (HappyAbsSyn ) -> HappyWrap179-happyOut179 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut179 #-}-newtype HappyWrap180 = HappyWrap180 (Located [LConDecl GhcPs])-happyIn180 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )-happyIn180 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap180 x)-{-# INLINE happyIn180 #-}-happyOut180 :: (HappyAbsSyn ) -> HappyWrap180-happyOut180 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut180 #-}-newtype HappyWrap181 = HappyWrap181 (LConDecl GhcPs)-happyIn181 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn181 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap181 x)-{-# INLINE happyIn181 #-}-happyOut181 :: (HappyAbsSyn ) -> HappyWrap181-happyOut181 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut181 #-}-newtype HappyWrap182 = HappyWrap182 (LConDecl GhcPs)-happyIn182 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn182 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap182 x)-{-# INLINE happyIn182 #-}-happyOut182 :: (HappyAbsSyn ) -> HappyWrap182-happyOut182 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut182 #-}-newtype HappyWrap183 = HappyWrap183 (Located ([AddAnn],[LConDecl GhcPs]))-happyIn183 :: (Located ([AddAnn],[LConDecl GhcPs])) -> (HappyAbsSyn )-happyIn183 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap183 x)-{-# INLINE happyIn183 #-}-happyOut183 :: (HappyAbsSyn ) -> HappyWrap183-happyOut183 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut183 #-}-newtype HappyWrap184 = HappyWrap184 (Located [LConDecl GhcPs])-happyIn184 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )-happyIn184 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap184 x)-{-# INLINE happyIn184 #-}-happyOut184 :: (HappyAbsSyn ) -> HappyWrap184-happyOut184 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut184 #-}-newtype HappyWrap185 = HappyWrap185 (LConDecl GhcPs)-happyIn185 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn185 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap185 x)-{-# INLINE happyIn185 #-}-happyOut185 :: (HappyAbsSyn ) -> HappyWrap185-happyOut185 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut185 #-}-newtype HappyWrap186 = HappyWrap186 (Located ([AddAnn], Maybe [LHsTyVarBndr GhcPs]))-happyIn186 :: (Located ([AddAnn], Maybe [LHsTyVarBndr GhcPs])) -> (HappyAbsSyn )-happyIn186 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap186 x)-{-# INLINE happyIn186 #-}-happyOut186 :: (HappyAbsSyn ) -> HappyWrap186-happyOut186 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut186 #-}-newtype HappyWrap187 = HappyWrap187 (Located (Located RdrName, HsConDeclDetails GhcPs, Maybe LHsDocString))-happyIn187 :: (Located (Located RdrName, HsConDeclDetails GhcPs, Maybe LHsDocString)) -> (HappyAbsSyn )-happyIn187 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap187 x)-{-# INLINE happyIn187 #-}-happyOut187 :: (HappyAbsSyn ) -> HappyWrap187-happyOut187 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut187 #-}-newtype HappyWrap188 = HappyWrap188 ([LConDeclField GhcPs])-happyIn188 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )-happyIn188 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap188 x)-{-# INLINE happyIn188 #-}-happyOut188 :: (HappyAbsSyn ) -> HappyWrap188-happyOut188 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut188 #-}-newtype HappyWrap189 = HappyWrap189 ([LConDeclField GhcPs])-happyIn189 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )-happyIn189 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap189 x)-{-# INLINE happyIn189 #-}-happyOut189 :: (HappyAbsSyn ) -> HappyWrap189-happyOut189 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut189 #-}-newtype HappyWrap190 = HappyWrap190 (LConDeclField GhcPs)-happyIn190 :: (LConDeclField GhcPs) -> (HappyAbsSyn )-happyIn190 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap190 x)-{-# INLINE happyIn190 #-}-happyOut190 :: (HappyAbsSyn ) -> HappyWrap190-happyOut190 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut190 #-}-newtype HappyWrap191 = HappyWrap191 (HsDeriving GhcPs)-happyIn191 :: (HsDeriving GhcPs) -> (HappyAbsSyn )-happyIn191 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap191 x)-{-# INLINE happyIn191 #-}-happyOut191 :: (HappyAbsSyn ) -> HappyWrap191-happyOut191 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut191 #-}-newtype HappyWrap192 = HappyWrap192 (HsDeriving GhcPs)-happyIn192 :: (HsDeriving GhcPs) -> (HappyAbsSyn )-happyIn192 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap192 x)-{-# INLINE happyIn192 #-}-happyOut192 :: (HappyAbsSyn ) -> HappyWrap192-happyOut192 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut192 #-}-newtype HappyWrap193 = HappyWrap193 (LHsDerivingClause GhcPs)-happyIn193 :: (LHsDerivingClause GhcPs) -> (HappyAbsSyn )-happyIn193 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap193 x)-{-# INLINE happyIn193 #-}-happyOut193 :: (HappyAbsSyn ) -> HappyWrap193-happyOut193 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut193 #-}-newtype HappyWrap194 = HappyWrap194 (Located [LHsSigType GhcPs])-happyIn194 :: (Located [LHsSigType GhcPs]) -> (HappyAbsSyn )-happyIn194 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap194 x)-{-# INLINE happyIn194 #-}-happyOut194 :: (HappyAbsSyn ) -> HappyWrap194-happyOut194 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut194 #-}-newtype HappyWrap195 = HappyWrap195 (LHsDecl GhcPs)-happyIn195 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn195 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap195 x)-{-# INLINE happyIn195 #-}-happyOut195 :: (HappyAbsSyn ) -> HappyWrap195-happyOut195 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut195 #-}-newtype HappyWrap196 = HappyWrap196 (LDocDecl)-happyIn196 :: (LDocDecl) -> (HappyAbsSyn )-happyIn196 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap196 x)-{-# INLINE happyIn196 #-}-happyOut196 :: (HappyAbsSyn ) -> HappyWrap196-happyOut196 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut196 #-}-newtype HappyWrap197 = HappyWrap197 (LHsDecl GhcPs)-happyIn197 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn197 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap197 x)-{-# INLINE happyIn197 #-}-happyOut197 :: (HappyAbsSyn ) -> HappyWrap197-happyOut197 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut197 #-}-newtype HappyWrap198 = HappyWrap198 (LHsDecl GhcPs)-happyIn198 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn198 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap198 x)-{-# INLINE happyIn198 #-}-happyOut198 :: (HappyAbsSyn ) -> HappyWrap198-happyOut198 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut198 #-}-newtype HappyWrap199 = HappyWrap199 (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs)))-happyIn199 :: (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn199 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap199 x)-{-# INLINE happyIn199 #-}-happyOut199 :: (HappyAbsSyn ) -> HappyWrap199-happyOut199 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut199 #-}-newtype HappyWrap200 = HappyWrap200 (Located [LGRHS GhcPs (LHsExpr GhcPs)])-happyIn200 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn200 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap200 x)-{-# INLINE happyIn200 #-}-happyOut200 :: (HappyAbsSyn ) -> HappyWrap200-happyOut200 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut200 #-}-newtype HappyWrap201 = HappyWrap201 (LGRHS GhcPs (LHsExpr GhcPs))-happyIn201 :: (LGRHS GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn201 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap201 x)-{-# INLINE happyIn201 #-}-happyOut201 :: (HappyAbsSyn ) -> HappyWrap201-happyOut201 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut201 #-}-newtype HappyWrap202 = HappyWrap202 (LHsDecl GhcPs)-happyIn202 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn202 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap202 x)-{-# INLINE happyIn202 #-}-happyOut202 :: (HappyAbsSyn ) -> HappyWrap202-happyOut202 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut202 #-}-newtype HappyWrap203 = HappyWrap203 (([AddAnn],Maybe Activation))-happyIn203 :: (([AddAnn],Maybe Activation)) -> (HappyAbsSyn )-happyIn203 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap203 x)-{-# INLINE happyIn203 #-}-happyOut203 :: (HappyAbsSyn ) -> HappyWrap203-happyOut203 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut203 #-}-newtype HappyWrap204 = HappyWrap204 (([AddAnn],Activation))-happyIn204 :: (([AddAnn],Activation)) -> (HappyAbsSyn )-happyIn204 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap204 x)-{-# INLINE happyIn204 #-}-happyOut204 :: (HappyAbsSyn ) -> HappyWrap204-happyOut204 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut204 #-}-newtype HappyWrap205 = HappyWrap205 (Located (HsSplice GhcPs))-happyIn205 :: (Located (HsSplice GhcPs)) -> (HappyAbsSyn )-happyIn205 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap205 x)-{-# INLINE happyIn205 #-}-happyOut205 :: (HappyAbsSyn ) -> HappyWrap205-happyOut205 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut205 #-}-newtype HappyWrap206 = HappyWrap206 (LHsExpr GhcPs)-happyIn206 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn206 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap206 x)-{-# INLINE happyIn206 #-}-happyOut206 :: (HappyAbsSyn ) -> HappyWrap206-happyOut206 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut206 #-}-newtype HappyWrap207 = HappyWrap207 (LHsExpr GhcPs)-happyIn207 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn207 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap207 x)-{-# INLINE happyIn207 #-}-happyOut207 :: (HappyAbsSyn ) -> HappyWrap207-happyOut207 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut207 #-}-newtype HappyWrap208 = HappyWrap208 (LHsExpr GhcPs)-happyIn208 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn208 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap208 x)-{-# INLINE happyIn208 #-}-happyOut208 :: (HappyAbsSyn ) -> HappyWrap208-happyOut208 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut208 #-}-newtype HappyWrap209 = HappyWrap209 (LHsExpr GhcPs)-happyIn209 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn209 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap209 x)-{-# INLINE happyIn209 #-}-happyOut209 :: (HappyAbsSyn ) -> HappyWrap209-happyOut209 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut209 #-}-newtype HappyWrap210 = HappyWrap210 (LHsExpr GhcPs)-happyIn210 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn210 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap210 x)-{-# INLINE happyIn210 #-}-happyOut210 :: (HappyAbsSyn ) -> HappyWrap210-happyOut210 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut210 #-}-newtype HappyWrap211 = HappyWrap211 (([Located Token],Bool))-happyIn211 :: (([Located Token],Bool)) -> (HappyAbsSyn )-happyIn211 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap211 x)-{-# INLINE happyIn211 #-}-happyOut211 :: (HappyAbsSyn ) -> HappyWrap211-happyOut211 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut211 #-}-newtype HappyWrap212 = HappyWrap212 (Located (([AddAnn],SourceText),StringLiteral))-happyIn212 :: (Located (([AddAnn],SourceText),StringLiteral)) -> (HappyAbsSyn )-happyIn212 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap212 x)-{-# INLINE happyIn212 #-}-happyOut212 :: (HappyAbsSyn ) -> HappyWrap212-happyOut212 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut212 #-}-newtype HappyWrap213 = HappyWrap213 (Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),-                         ((SourceText,SourceText),(SourceText,SourceText))-                       ))-happyIn213 :: (Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),-                         ((SourceText,SourceText),(SourceText,SourceText))-                       )) -> (HappyAbsSyn )-happyIn213 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap213 x)-{-# INLINE happyIn213 #-}-happyOut213 :: (HappyAbsSyn ) -> HappyWrap213-happyOut213 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut213 #-}-newtype HappyWrap214 = HappyWrap214 (LHsExpr GhcPs)-happyIn214 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn214 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap214 x)-{-# INLINE happyIn214 #-}-happyOut214 :: (HappyAbsSyn ) -> HappyWrap214-happyOut214 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut214 #-}-newtype HappyWrap215 = HappyWrap215 (LHsExpr GhcPs)-happyIn215 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn215 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap215 x)-{-# INLINE happyIn215 #-}-happyOut215 :: (HappyAbsSyn ) -> HappyWrap215-happyOut215 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut215 #-}-newtype HappyWrap216 = HappyWrap216 (LHsExpr GhcPs)-happyIn216 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn216 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap216 x)-{-# INLINE happyIn216 #-}-happyOut216 :: (HappyAbsSyn ) -> HappyWrap216-happyOut216 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut216 #-}-newtype HappyWrap217 = HappyWrap217 (LHsExpr GhcPs)-happyIn217 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn217 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap217 x)-{-# INLINE happyIn217 #-}-happyOut217 :: (HappyAbsSyn ) -> HappyWrap217-happyOut217 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut217 #-}-newtype HappyWrap218 = HappyWrap218 (LHsExpr GhcPs)-happyIn218 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn218 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap218 x)-{-# INLINE happyIn218 #-}-happyOut218 :: (HappyAbsSyn ) -> HappyWrap218-happyOut218 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut218 #-}-newtype HappyWrap219 = HappyWrap219 ([LHsCmdTop GhcPs])-happyIn219 :: ([LHsCmdTop GhcPs]) -> (HappyAbsSyn )-happyIn219 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap219 x)-{-# INLINE happyIn219 #-}-happyOut219 :: (HappyAbsSyn ) -> HappyWrap219-happyOut219 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut219 #-}-newtype HappyWrap220 = HappyWrap220 (LHsCmdTop GhcPs)-happyIn220 :: (LHsCmdTop GhcPs) -> (HappyAbsSyn )-happyIn220 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap220 x)-{-# INLINE happyIn220 #-}-happyOut220 :: (HappyAbsSyn ) -> HappyWrap220-happyOut220 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut220 #-}-newtype HappyWrap221 = HappyWrap221 (([AddAnn],[LHsDecl GhcPs]))-happyIn221 :: (([AddAnn],[LHsDecl GhcPs])) -> (HappyAbsSyn )-happyIn221 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap221 x)-{-# INLINE happyIn221 #-}-happyOut221 :: (HappyAbsSyn ) -> HappyWrap221-happyOut221 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut221 #-}-newtype HappyWrap222 = HappyWrap222 ([LHsDecl GhcPs])-happyIn222 :: ([LHsDecl GhcPs]) -> (HappyAbsSyn )-happyIn222 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap222 x)-{-# INLINE happyIn222 #-}-happyOut222 :: (HappyAbsSyn ) -> HappyWrap222-happyOut222 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut222 #-}-newtype HappyWrap223 = HappyWrap223 (LHsExpr GhcPs)-happyIn223 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn223 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap223 x)-{-# INLINE happyIn223 #-}-happyOut223 :: (HappyAbsSyn ) -> HappyWrap223-happyOut223 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut223 #-}-newtype HappyWrap224 = HappyWrap224 (([AddAnn],SumOrTuple))-happyIn224 :: (([AddAnn],SumOrTuple)) -> (HappyAbsSyn )-happyIn224 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap224 x)-{-# INLINE happyIn224 #-}-happyOut224 :: (HappyAbsSyn ) -> HappyWrap224-happyOut224 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut224 #-}-newtype HappyWrap225 = HappyWrap225 ((SrcSpan,[LHsTupArg GhcPs]))-happyIn225 :: ((SrcSpan,[LHsTupArg GhcPs])) -> (HappyAbsSyn )-happyIn225 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap225 x)-{-# INLINE happyIn225 #-}-happyOut225 :: (HappyAbsSyn ) -> HappyWrap225-happyOut225 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut225 #-}-newtype HappyWrap226 = HappyWrap226 ([LHsTupArg GhcPs])-happyIn226 :: ([LHsTupArg GhcPs]) -> (HappyAbsSyn )-happyIn226 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap226 x)-{-# INLINE happyIn226 #-}-happyOut226 :: (HappyAbsSyn ) -> HappyWrap226-happyOut226 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut226 #-}-newtype HappyWrap227 = HappyWrap227 (([AddAnn],HsExpr GhcPs))-happyIn227 :: (([AddAnn],HsExpr GhcPs)) -> (HappyAbsSyn )-happyIn227 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap227 x)-{-# INLINE happyIn227 #-}-happyOut227 :: (HappyAbsSyn ) -> HappyWrap227-happyOut227 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut227 #-}-newtype HappyWrap228 = HappyWrap228 (Located [LHsExpr GhcPs])-happyIn228 :: (Located [LHsExpr GhcPs]) -> (HappyAbsSyn )-happyIn228 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap228 x)-{-# INLINE happyIn228 #-}-happyOut228 :: (HappyAbsSyn ) -> HappyWrap228-happyOut228 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut228 #-}-newtype HappyWrap229 = HappyWrap229 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn229 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn229 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap229 x)-{-# INLINE happyIn229 #-}-happyOut229 :: (HappyAbsSyn ) -> HappyWrap229-happyOut229 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut229 #-}-newtype HappyWrap230 = HappyWrap230 (Located [[LStmt GhcPs (LHsExpr GhcPs)]])-happyIn230 :: (Located [[LStmt GhcPs (LHsExpr GhcPs)]]) -> (HappyAbsSyn )-happyIn230 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap230 x)-{-# INLINE happyIn230 #-}-happyOut230 :: (HappyAbsSyn ) -> HappyWrap230-happyOut230 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut230 #-}-newtype HappyWrap231 = HappyWrap231 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn231 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn231 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap231 x)-{-# INLINE happyIn231 #-}-happyOut231 :: (HappyAbsSyn ) -> HappyWrap231-happyOut231 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut231 #-}-newtype HappyWrap232 = HappyWrap232 (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs)))-happyIn232 :: (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn232 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap232 x)-{-# INLINE happyIn232 #-}-happyOut232 :: (HappyAbsSyn ) -> HappyWrap232-happyOut232 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut232 #-}-newtype HappyWrap233 = HappyWrap233 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn233 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn233 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap233 x)-{-# INLINE happyIn233 #-}-happyOut233 :: (HappyAbsSyn ) -> HappyWrap233-happyOut233 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut233 #-}-newtype HappyWrap234 = HappyWrap234 (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyIn234 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn234 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap234 x)-{-# INLINE happyIn234 #-}-happyOut234 :: (HappyAbsSyn ) -> HappyWrap234-happyOut234 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut234 #-}-newtype HappyWrap235 = HappyWrap235 (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]))-happyIn235 :: (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn235 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap235 x)-{-# INLINE happyIn235 #-}-happyOut235 :: (HappyAbsSyn ) -> HappyWrap235-happyOut235 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut235 #-}-newtype HappyWrap236 = HappyWrap236 (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]))-happyIn236 :: (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn236 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap236 x)-{-# INLINE happyIn236 #-}-happyOut236 :: (HappyAbsSyn ) -> HappyWrap236-happyOut236 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut236 #-}-newtype HappyWrap237 = HappyWrap237 (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]))-happyIn237 :: (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn237 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap237 x)-{-# INLINE happyIn237 #-}-happyOut237 :: (HappyAbsSyn ) -> HappyWrap237-happyOut237 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut237 #-}-newtype HappyWrap238 = HappyWrap238 (LMatch GhcPs (LHsExpr GhcPs))-happyIn238 :: (LMatch GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn238 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap238 x)-{-# INLINE happyIn238 #-}-happyOut238 :: (HappyAbsSyn ) -> HappyWrap238-happyOut238 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut238 #-}-newtype HappyWrap239 = HappyWrap239 (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs)))-happyIn239 :: (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn239 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap239 x)-{-# INLINE happyIn239 #-}-happyOut239 :: (HappyAbsSyn ) -> HappyWrap239-happyOut239 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut239 #-}-newtype HappyWrap240 = HappyWrap240 (Located [LGRHS GhcPs (LHsExpr GhcPs)])-happyIn240 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn240 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap240 x)-{-# INLINE happyIn240 #-}-happyOut240 :: (HappyAbsSyn ) -> HappyWrap240-happyOut240 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut240 #-}-newtype HappyWrap241 = HappyWrap241 (Located [LGRHS GhcPs (LHsExpr GhcPs)])-happyIn241 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn241 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap241 x)-{-# INLINE happyIn241 #-}-happyOut241 :: (HappyAbsSyn ) -> HappyWrap241-happyOut241 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut241 #-}-newtype HappyWrap242 = HappyWrap242 (Located ([AddAnn],[LGRHS GhcPs (LHsExpr GhcPs)]))-happyIn242 :: (Located ([AddAnn],[LGRHS GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn242 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap242 x)-{-# INLINE happyIn242 #-}-happyOut242 :: (HappyAbsSyn ) -> HappyWrap242-happyOut242 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut242 #-}-newtype HappyWrap243 = HappyWrap243 (LGRHS GhcPs (LHsExpr GhcPs))-happyIn243 :: (LGRHS GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn243 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap243 x)-{-# INLINE happyIn243 #-}-happyOut243 :: (HappyAbsSyn ) -> HappyWrap243-happyOut243 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut243 #-}-newtype HappyWrap244 = HappyWrap244 (LPat GhcPs)-happyIn244 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn244 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap244 x)-{-# INLINE happyIn244 #-}-happyOut244 :: (HappyAbsSyn ) -> HappyWrap244-happyOut244 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut244 #-}-newtype HappyWrap245 = HappyWrap245 (LPat GhcPs)-happyIn245 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn245 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap245 x)-{-# INLINE happyIn245 #-}-happyOut245 :: (HappyAbsSyn ) -> HappyWrap245-happyOut245 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut245 #-}-newtype HappyWrap246 = HappyWrap246 (LPat GhcPs)-happyIn246 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn246 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap246 x)-{-# INLINE happyIn246 #-}-happyOut246 :: (HappyAbsSyn ) -> HappyWrap246-happyOut246 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut246 #-}-newtype HappyWrap247 = HappyWrap247 ([LPat GhcPs])-happyIn247 :: ([LPat GhcPs]) -> (HappyAbsSyn )-happyIn247 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap247 x)-{-# INLINE happyIn247 #-}-happyOut247 :: (HappyAbsSyn ) -> HappyWrap247-happyOut247 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut247 #-}-newtype HappyWrap248 = HappyWrap248 (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)]))-happyIn248 :: (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn248 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap248 x)-{-# INLINE happyIn248 #-}-happyOut248 :: (HappyAbsSyn ) -> HappyWrap248-happyOut248 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut248 #-}-newtype HappyWrap249 = HappyWrap249 (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)]))-happyIn249 :: (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn249 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap249 x)-{-# INLINE happyIn249 #-}-happyOut249 :: (HappyAbsSyn ) -> HappyWrap249-happyOut249 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut249 #-}-newtype HappyWrap250 = HappyWrap250 (Maybe (LStmt GhcPs (LHsExpr GhcPs)))-happyIn250 :: (Maybe (LStmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn250 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap250 x)-{-# INLINE happyIn250 #-}-happyOut250 :: (HappyAbsSyn ) -> HappyWrap250-happyOut250 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut250 #-}-newtype HappyWrap251 = HappyWrap251 (LStmt GhcPs (LHsExpr GhcPs))-happyIn251 :: (LStmt GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn251 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap251 x)-{-# INLINE happyIn251 #-}-happyOut251 :: (HappyAbsSyn ) -> HappyWrap251-happyOut251 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut251 #-}-newtype HappyWrap252 = HappyWrap252 (LStmt GhcPs (LHsExpr GhcPs))-happyIn252 :: (LStmt GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn252 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap252 x)-{-# INLINE happyIn252 #-}-happyOut252 :: (HappyAbsSyn ) -> HappyWrap252-happyOut252 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut252 #-}-newtype HappyWrap253 = HappyWrap253 (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)))-happyIn253 :: (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool))) -> (HappyAbsSyn )-happyIn253 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap253 x)-{-# INLINE happyIn253 #-}-happyOut253 :: (HappyAbsSyn ) -> HappyWrap253-happyOut253 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut253 #-}-newtype HappyWrap254 = HappyWrap254 (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)))-happyIn254 :: (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool))) -> (HappyAbsSyn )-happyIn254 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap254 x)-{-# INLINE happyIn254 #-}-happyOut254 :: (HappyAbsSyn ) -> HappyWrap254-happyOut254 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut254 #-}-newtype HappyWrap255 = HappyWrap255 (LHsRecField GhcPs (LHsExpr GhcPs))-happyIn255 :: (LHsRecField GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn255 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap255 x)-{-# INLINE happyIn255 #-}-happyOut255 :: (HappyAbsSyn ) -> HappyWrap255-happyOut255 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut255 #-}-newtype HappyWrap256 = HappyWrap256 (Located [LIPBind GhcPs])-happyIn256 :: (Located [LIPBind GhcPs]) -> (HappyAbsSyn )-happyIn256 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap256 x)-{-# INLINE happyIn256 #-}-happyOut256 :: (HappyAbsSyn ) -> HappyWrap256-happyOut256 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut256 #-}-newtype HappyWrap257 = HappyWrap257 (LIPBind GhcPs)-happyIn257 :: (LIPBind GhcPs) -> (HappyAbsSyn )-happyIn257 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap257 x)-{-# INLINE happyIn257 #-}-happyOut257 :: (HappyAbsSyn ) -> HappyWrap257-happyOut257 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut257 #-}-newtype HappyWrap258 = HappyWrap258 (Located HsIPName)-happyIn258 :: (Located HsIPName) -> (HappyAbsSyn )-happyIn258 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap258 x)-{-# INLINE happyIn258 #-}-happyOut258 :: (HappyAbsSyn ) -> HappyWrap258-happyOut258 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut258 #-}-newtype HappyWrap259 = HappyWrap259 (Located FastString)-happyIn259 :: (Located FastString) -> (HappyAbsSyn )-happyIn259 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap259 x)-{-# INLINE happyIn259 #-}-happyOut259 :: (HappyAbsSyn ) -> HappyWrap259-happyOut259 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut259 #-}-newtype HappyWrap260 = HappyWrap260 (LBooleanFormula (Located RdrName))-happyIn260 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn260 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap260 x)-{-# INLINE happyIn260 #-}-happyOut260 :: (HappyAbsSyn ) -> HappyWrap260-happyOut260 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut260 #-}-newtype HappyWrap261 = HappyWrap261 (LBooleanFormula (Located RdrName))-happyIn261 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn261 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap261 x)-{-# INLINE happyIn261 #-}-happyOut261 :: (HappyAbsSyn ) -> HappyWrap261-happyOut261 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut261 #-}-newtype HappyWrap262 = HappyWrap262 (LBooleanFormula (Located RdrName))-happyIn262 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn262 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap262 x)-{-# INLINE happyIn262 #-}-happyOut262 :: (HappyAbsSyn ) -> HappyWrap262-happyOut262 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut262 #-}-newtype HappyWrap263 = HappyWrap263 ([LBooleanFormula (Located RdrName)])-happyIn263 :: ([LBooleanFormula (Located RdrName)]) -> (HappyAbsSyn )-happyIn263 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap263 x)-{-# INLINE happyIn263 #-}-happyOut263 :: (HappyAbsSyn ) -> HappyWrap263-happyOut263 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut263 #-}-newtype HappyWrap264 = HappyWrap264 (LBooleanFormula (Located RdrName))-happyIn264 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn264 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap264 x)-{-# INLINE happyIn264 #-}-happyOut264 :: (HappyAbsSyn ) -> HappyWrap264-happyOut264 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut264 #-}-newtype HappyWrap265 = HappyWrap265 (Located [Located RdrName])-happyIn265 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn265 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap265 x)-{-# INLINE happyIn265 #-}-happyOut265 :: (HappyAbsSyn ) -> HappyWrap265-happyOut265 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut265 #-}-newtype HappyWrap266 = HappyWrap266 (Located RdrName)-happyIn266 :: (Located RdrName) -> (HappyAbsSyn )-happyIn266 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap266 x)-{-# INLINE happyIn266 #-}-happyOut266 :: (HappyAbsSyn ) -> HappyWrap266-happyOut266 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut266 #-}-newtype HappyWrap267 = HappyWrap267 (Located RdrName)-happyIn267 :: (Located RdrName) -> (HappyAbsSyn )-happyIn267 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap267 x)-{-# INLINE happyIn267 #-}-happyOut267 :: (HappyAbsSyn ) -> HappyWrap267-happyOut267 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut267 #-}-newtype HappyWrap268 = HappyWrap268 (Located RdrName)-happyIn268 :: (Located RdrName) -> (HappyAbsSyn )-happyIn268 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap268 x)-{-# INLINE happyIn268 #-}-happyOut268 :: (HappyAbsSyn ) -> HappyWrap268-happyOut268 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut268 #-}-newtype HappyWrap269 = HappyWrap269 (Located RdrName)-happyIn269 :: (Located RdrName) -> (HappyAbsSyn )-happyIn269 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap269 x)-{-# INLINE happyIn269 #-}-happyOut269 :: (HappyAbsSyn ) -> HappyWrap269-happyOut269 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut269 #-}-newtype HappyWrap270 = HappyWrap270 (Located RdrName)-happyIn270 :: (Located RdrName) -> (HappyAbsSyn )-happyIn270 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap270 x)-{-# INLINE happyIn270 #-}-happyOut270 :: (HappyAbsSyn ) -> HappyWrap270-happyOut270 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut270 #-}-newtype HappyWrap271 = HappyWrap271 (Located [Located RdrName])-happyIn271 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn271 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap271 x)-{-# INLINE happyIn271 #-}-happyOut271 :: (HappyAbsSyn ) -> HappyWrap271-happyOut271 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut271 #-}-newtype HappyWrap272 = HappyWrap272 (Located DataCon)-happyIn272 :: (Located DataCon) -> (HappyAbsSyn )-happyIn272 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap272 x)-{-# INLINE happyIn272 #-}-happyOut272 :: (HappyAbsSyn ) -> HappyWrap272-happyOut272 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut272 #-}-newtype HappyWrap273 = HappyWrap273 (Located DataCon)-happyIn273 :: (Located DataCon) -> (HappyAbsSyn )-happyIn273 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap273 x)-{-# INLINE happyIn273 #-}-happyOut273 :: (HappyAbsSyn ) -> HappyWrap273-happyOut273 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut273 #-}-newtype HappyWrap274 = HappyWrap274 (Located RdrName)-happyIn274 :: (Located RdrName) -> (HappyAbsSyn )-happyIn274 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap274 x)-{-# INLINE happyIn274 #-}-happyOut274 :: (HappyAbsSyn ) -> HappyWrap274-happyOut274 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut274 #-}-newtype HappyWrap275 = HappyWrap275 (Located RdrName)-happyIn275 :: (Located RdrName) -> (HappyAbsSyn )-happyIn275 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap275 x)-{-# INLINE happyIn275 #-}-happyOut275 :: (HappyAbsSyn ) -> HappyWrap275-happyOut275 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut275 #-}-newtype HappyWrap276 = HappyWrap276 (Located RdrName)-happyIn276 :: (Located RdrName) -> (HappyAbsSyn )-happyIn276 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap276 x)-{-# INLINE happyIn276 #-}-happyOut276 :: (HappyAbsSyn ) -> HappyWrap276-happyOut276 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut276 #-}-newtype HappyWrap277 = HappyWrap277 (Located RdrName)-happyIn277 :: (Located RdrName) -> (HappyAbsSyn )-happyIn277 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap277 x)-{-# INLINE happyIn277 #-}-happyOut277 :: (HappyAbsSyn ) -> HappyWrap277-happyOut277 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut277 #-}-newtype HappyWrap278 = HappyWrap278 (Located RdrName)-happyIn278 :: (Located RdrName) -> (HappyAbsSyn )-happyIn278 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap278 x)-{-# INLINE happyIn278 #-}-happyOut278 :: (HappyAbsSyn ) -> HappyWrap278-happyOut278 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut278 #-}-newtype HappyWrap279 = HappyWrap279 (Located RdrName)-happyIn279 :: (Located RdrName) -> (HappyAbsSyn )-happyIn279 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap279 x)-{-# INLINE happyIn279 #-}-happyOut279 :: (HappyAbsSyn ) -> HappyWrap279-happyOut279 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut279 #-}-newtype HappyWrap280 = HappyWrap280 (Located RdrName)-happyIn280 :: (Located RdrName) -> (HappyAbsSyn )-happyIn280 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap280 x)-{-# INLINE happyIn280 #-}-happyOut280 :: (HappyAbsSyn ) -> HappyWrap280-happyOut280 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut280 #-}-newtype HappyWrap281 = HappyWrap281 (Located RdrName)-happyIn281 :: (Located RdrName) -> (HappyAbsSyn )-happyIn281 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap281 x)-{-# INLINE happyIn281 #-}-happyOut281 :: (HappyAbsSyn ) -> HappyWrap281-happyOut281 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut281 #-}-newtype HappyWrap282 = HappyWrap282 (LHsType GhcPs)-happyIn282 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn282 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap282 x)-{-# INLINE happyIn282 #-}-happyOut282 :: (HappyAbsSyn ) -> HappyWrap282-happyOut282 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut282 #-}-newtype HappyWrap283 = HappyWrap283 (Located RdrName)-happyIn283 :: (Located RdrName) -> (HappyAbsSyn )-happyIn283 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap283 x)-{-# INLINE happyIn283 #-}-happyOut283 :: (HappyAbsSyn ) -> HappyWrap283-happyOut283 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut283 #-}-newtype HappyWrap284 = HappyWrap284 (Located RdrName)-happyIn284 :: (Located RdrName) -> (HappyAbsSyn )-happyIn284 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap284 x)-{-# INLINE happyIn284 #-}-happyOut284 :: (HappyAbsSyn ) -> HappyWrap284-happyOut284 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut284 #-}-newtype HappyWrap285 = HappyWrap285 (Located RdrName)-happyIn285 :: (Located RdrName) -> (HappyAbsSyn )-happyIn285 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap285 x)-{-# INLINE happyIn285 #-}-happyOut285 :: (HappyAbsSyn ) -> HappyWrap285-happyOut285 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut285 #-}-newtype HappyWrap286 = HappyWrap286 (Located RdrName)-happyIn286 :: (Located RdrName) -> (HappyAbsSyn )-happyIn286 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap286 x)-{-# INLINE happyIn286 #-}-happyOut286 :: (HappyAbsSyn ) -> HappyWrap286-happyOut286 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut286 #-}-newtype HappyWrap287 = HappyWrap287 (Located RdrName)-happyIn287 :: (Located RdrName) -> (HappyAbsSyn )-happyIn287 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap287 x)-{-# INLINE happyIn287 #-}-happyOut287 :: (HappyAbsSyn ) -> HappyWrap287-happyOut287 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut287 #-}-newtype HappyWrap288 = HappyWrap288 (LHsExpr GhcPs)-happyIn288 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn288 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap288 x)-{-# INLINE happyIn288 #-}-happyOut288 :: (HappyAbsSyn ) -> HappyWrap288-happyOut288 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut288 #-}-newtype HappyWrap289 = HappyWrap289 (LHsExpr GhcPs)-happyIn289 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn289 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap289 x)-{-# INLINE happyIn289 #-}-happyOut289 :: (HappyAbsSyn ) -> HappyWrap289-happyOut289 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut289 #-}-newtype HappyWrap290 = HappyWrap290 (LHsExpr GhcPs)-happyIn290 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn290 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap290 x)-{-# INLINE happyIn290 #-}-happyOut290 :: (HappyAbsSyn ) -> HappyWrap290-happyOut290 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut290 #-}-newtype HappyWrap291 = HappyWrap291 (Located RdrName)-happyIn291 :: (Located RdrName) -> (HappyAbsSyn )-happyIn291 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap291 x)-{-# INLINE happyIn291 #-}-happyOut291 :: (HappyAbsSyn ) -> HappyWrap291-happyOut291 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut291 #-}-newtype HappyWrap292 = HappyWrap292 (Located RdrName)-happyIn292 :: (Located RdrName) -> (HappyAbsSyn )-happyIn292 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap292 x)-{-# INLINE happyIn292 #-}-happyOut292 :: (HappyAbsSyn ) -> HappyWrap292-happyOut292 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut292 #-}-newtype HappyWrap293 = HappyWrap293 (Located RdrName)-happyIn293 :: (Located RdrName) -> (HappyAbsSyn )-happyIn293 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap293 x)-{-# INLINE happyIn293 #-}-happyOut293 :: (HappyAbsSyn ) -> HappyWrap293-happyOut293 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut293 #-}-newtype HappyWrap294 = HappyWrap294 (Located RdrName)-happyIn294 :: (Located RdrName) -> (HappyAbsSyn )-happyIn294 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap294 x)-{-# INLINE happyIn294 #-}-happyOut294 :: (HappyAbsSyn ) -> HappyWrap294-happyOut294 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut294 #-}-newtype HappyWrap295 = HappyWrap295 (Located RdrName)-happyIn295 :: (Located RdrName) -> (HappyAbsSyn )-happyIn295 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap295 x)-{-# INLINE happyIn295 #-}-happyOut295 :: (HappyAbsSyn ) -> HappyWrap295-happyOut295 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut295 #-}-newtype HappyWrap296 = HappyWrap296 (Located RdrName)-happyIn296 :: (Located RdrName) -> (HappyAbsSyn )-happyIn296 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap296 x)-{-# INLINE happyIn296 #-}-happyOut296 :: (HappyAbsSyn ) -> HappyWrap296-happyOut296 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut296 #-}-newtype HappyWrap297 = HappyWrap297 (Located RdrName)-happyIn297 :: (Located RdrName) -> (HappyAbsSyn )-happyIn297 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap297 x)-{-# INLINE happyIn297 #-}-happyOut297 :: (HappyAbsSyn ) -> HappyWrap297-happyOut297 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut297 #-}-newtype HappyWrap298 = HappyWrap298 (Located RdrName)-happyIn298 :: (Located RdrName) -> (HappyAbsSyn )-happyIn298 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap298 x)-{-# INLINE happyIn298 #-}-happyOut298 :: (HappyAbsSyn ) -> HappyWrap298-happyOut298 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut298 #-}-newtype HappyWrap299 = HappyWrap299 (Located RdrName)-happyIn299 :: (Located RdrName) -> (HappyAbsSyn )-happyIn299 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap299 x)-{-# INLINE happyIn299 #-}-happyOut299 :: (HappyAbsSyn ) -> HappyWrap299-happyOut299 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut299 #-}-newtype HappyWrap300 = HappyWrap300 (Located RdrName)-happyIn300 :: (Located RdrName) -> (HappyAbsSyn )-happyIn300 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap300 x)-{-# INLINE happyIn300 #-}-happyOut300 :: (HappyAbsSyn ) -> HappyWrap300-happyOut300 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut300 #-}-newtype HappyWrap301 = HappyWrap301 (Located RdrName)-happyIn301 :: (Located RdrName) -> (HappyAbsSyn )-happyIn301 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap301 x)-{-# INLINE happyIn301 #-}-happyOut301 :: (HappyAbsSyn ) -> HappyWrap301-happyOut301 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut301 #-}-newtype HappyWrap302 = HappyWrap302 (Located RdrName)-happyIn302 :: (Located RdrName) -> (HappyAbsSyn )-happyIn302 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap302 x)-{-# INLINE happyIn302 #-}-happyOut302 :: (HappyAbsSyn ) -> HappyWrap302-happyOut302 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut302 #-}-newtype HappyWrap303 = HappyWrap303 (Located RdrName)-happyIn303 :: (Located RdrName) -> (HappyAbsSyn )-happyIn303 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap303 x)-{-# INLINE happyIn303 #-}-happyOut303 :: (HappyAbsSyn ) -> HappyWrap303-happyOut303 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut303 #-}-newtype HappyWrap304 = HappyWrap304 (Located RdrName)-happyIn304 :: (Located RdrName) -> (HappyAbsSyn )-happyIn304 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap304 x)-{-# INLINE happyIn304 #-}-happyOut304 :: (HappyAbsSyn ) -> HappyWrap304-happyOut304 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut304 #-}-newtype HappyWrap305 = HappyWrap305 (Located FastString)-happyIn305 :: (Located FastString) -> (HappyAbsSyn )-happyIn305 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap305 x)-{-# INLINE happyIn305 #-}-happyOut305 :: (HappyAbsSyn ) -> HappyWrap305-happyOut305 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut305 #-}-newtype HappyWrap306 = HappyWrap306 (Located FastString)-happyIn306 :: (Located FastString) -> (HappyAbsSyn )-happyIn306 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap306 x)-{-# INLINE happyIn306 #-}-happyOut306 :: (HappyAbsSyn ) -> HappyWrap306-happyOut306 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut306 #-}-newtype HappyWrap307 = HappyWrap307 (Located RdrName)-happyIn307 :: (Located RdrName) -> (HappyAbsSyn )-happyIn307 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap307 x)-{-# INLINE happyIn307 #-}-happyOut307 :: (HappyAbsSyn ) -> HappyWrap307-happyOut307 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut307 #-}-newtype HappyWrap308 = HappyWrap308 (Located RdrName)-happyIn308 :: (Located RdrName) -> (HappyAbsSyn )-happyIn308 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap308 x)-{-# INLINE happyIn308 #-}-happyOut308 :: (HappyAbsSyn ) -> HappyWrap308-happyOut308 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut308 #-}-newtype HappyWrap309 = HappyWrap309 (Located RdrName)-happyIn309 :: (Located RdrName) -> (HappyAbsSyn )-happyIn309 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap309 x)-{-# INLINE happyIn309 #-}-happyOut309 :: (HappyAbsSyn ) -> HappyWrap309-happyOut309 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut309 #-}-newtype HappyWrap310 = HappyWrap310 (Located RdrName)-happyIn310 :: (Located RdrName) -> (HappyAbsSyn )-happyIn310 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap310 x)-{-# INLINE happyIn310 #-}-happyOut310 :: (HappyAbsSyn ) -> HappyWrap310-happyOut310 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut310 #-}-newtype HappyWrap311 = HappyWrap311 (Located (HsLit GhcPs))-happyIn311 :: (Located (HsLit GhcPs)) -> (HappyAbsSyn )-happyIn311 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap311 x)-{-# INLINE happyIn311 #-}-happyOut311 :: (HappyAbsSyn ) -> HappyWrap311-happyOut311 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut311 #-}-newtype HappyWrap312 = HappyWrap312 (())-happyIn312 :: (()) -> (HappyAbsSyn )-happyIn312 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap312 x)-{-# INLINE happyIn312 #-}-happyOut312 :: (HappyAbsSyn ) -> HappyWrap312-happyOut312 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut312 #-}-newtype HappyWrap313 = HappyWrap313 (Located ModuleName)-happyIn313 :: (Located ModuleName) -> (HappyAbsSyn )-happyIn313 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap313 x)-{-# INLINE happyIn313 #-}-happyOut313 :: (HappyAbsSyn ) -> HappyWrap313-happyOut313 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut313 #-}-newtype HappyWrap314 = HappyWrap314 (([SrcSpan],Int))-happyIn314 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn314 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap314 x)-{-# INLINE happyIn314 #-}-happyOut314 :: (HappyAbsSyn ) -> HappyWrap314-happyOut314 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut314 #-}-newtype HappyWrap315 = HappyWrap315 (([SrcSpan],Int))-happyIn315 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn315 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap315 x)-{-# INLINE happyIn315 #-}-happyOut315 :: (HappyAbsSyn ) -> HappyWrap315-happyOut315 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut315 #-}-newtype HappyWrap316 = HappyWrap316 (([SrcSpan],Int))-happyIn316 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn316 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap316 x)-{-# INLINE happyIn316 #-}-happyOut316 :: (HappyAbsSyn ) -> HappyWrap316-happyOut316 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut316 #-}-newtype HappyWrap317 = HappyWrap317 (LHsDocString)-happyIn317 :: (LHsDocString) -> (HappyAbsSyn )-happyIn317 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap317 x)-{-# INLINE happyIn317 #-}-happyOut317 :: (HappyAbsSyn ) -> HappyWrap317-happyOut317 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut317 #-}-newtype HappyWrap318 = HappyWrap318 (LHsDocString)-happyIn318 :: (LHsDocString) -> (HappyAbsSyn )-happyIn318 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap318 x)-{-# INLINE happyIn318 #-}-happyOut318 :: (HappyAbsSyn ) -> HappyWrap318-happyOut318 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut318 #-}-newtype HappyWrap319 = HappyWrap319 (Located (String, HsDocString))-happyIn319 :: (Located (String, HsDocString)) -> (HappyAbsSyn )-happyIn319 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap319 x)-{-# INLINE happyIn319 #-}-happyOut319 :: (HappyAbsSyn ) -> HappyWrap319-happyOut319 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut319 #-}-newtype HappyWrap320 = HappyWrap320 (Located (Int, HsDocString))-happyIn320 :: (Located (Int, HsDocString)) -> (HappyAbsSyn )-happyIn320 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap320 x)-{-# INLINE happyIn320 #-}-happyOut320 :: (HappyAbsSyn ) -> HappyWrap320-happyOut320 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut320 #-}-newtype HappyWrap321 = HappyWrap321 (Maybe LHsDocString)-happyIn321 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn321 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap321 x)-{-# INLINE happyIn321 #-}-happyOut321 :: (HappyAbsSyn ) -> HappyWrap321-happyOut321 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut321 #-}-newtype HappyWrap322 = HappyWrap322 (Maybe LHsDocString)-happyIn322 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn322 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap322 x)-{-# INLINE happyIn322 #-}-happyOut322 :: (HappyAbsSyn ) -> HappyWrap322-happyOut322 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut322 #-}-newtype HappyWrap323 = HappyWrap323 (Maybe LHsDocString)-happyIn323 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn323 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap323 x)-{-# INLINE happyIn323 #-}-happyOut323 :: (HappyAbsSyn ) -> HappyWrap323-happyOut323 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut323 #-}-happyInTok :: ((Located Token)) -> (HappyAbsSyn )-happyInTok x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyInTok #-}-happyOutTok :: (HappyAbsSyn ) -> ((Located Token))-happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOutTok #-}---happyExpList :: HappyAddr-happyExpList = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc7\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x37\x5f\xf5\xff\x5f\xfe\xef\x67\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x73\x11\xfd\xff\xe5\xff\x1c\x04\x41\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x7f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x08\xc0\x21\x88\x82\xfe\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x02\x00\x80\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x10\x88\x28\x70\x04\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x29\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd4\xe1\x88\xc3\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x68\xfc\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x80\x00\x1c\x82\x28\xe8\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xd4\x21\x00\x41\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x14\x05\x88\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\x85\x1f\x00\x00\x40\x10\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\x85\x1f\x00\x00\x40\x10\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\x85\x1f\x00\x00\xc0\x90\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x00\x00\x40\x10\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd0\x21\x98\x8a\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x80\x14\x1d\x82\xb8\xfc\xff\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd1\x21\x88\xce\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x1c\x02\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd1\x21\x88\xcb\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\xc0\x21\x00\x80\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x80\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x08\xc1\xef\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x20\xd5\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\x85\x1f\x00\x00\x40\x10\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x1c\x02\x10\x84\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x08\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x08\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x41\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\x41\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\xfc\x03\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x80\x04\x1d\x82\xa8\xfc\xff\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd1\x21\x88\x8a\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x00\x00\x40\x10\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x08\xc0\x21\x88\x43\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x73\x11\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x17\xd1\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xd4\x21\x00\x80\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xd4\x20\x00\x41\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x1c\x02\x00\x88\x19\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x1c\x02\x10\x84\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd0\x21\x88\xca\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x10\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x09\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc7\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x7f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x40\x00\x00\x00\x08\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x10\x88\x28\x70\x04\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x38\xfc\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\x1c\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x06\x10\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x02\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\xd0\x00\x89\x2a\x67\xfe\x1f\x5e\x7f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\xc0\xa8\x72\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\x85\x1f\x00\x00\x40\x90\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd0\x21\x88\x8a\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd3\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd0\x21\x88\x8a\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd0\x21\x88\xca\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\xa8\x71\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x7f\xf3\x55\xff\xff\xe5\xff\x7e\x06\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x1c\x02\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x02\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xc0\x21\x00\x80\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd0\x21\x88\x8a\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xd0\x20\x00\x00\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x37\x5f\xf5\xff\x5f\xfe\xef\x67\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x40\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x17\xd1\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xd4\x21\x00\x80\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\xd0\x00\x88\x2a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc7\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x80\x04\x1d\x82\xa8\xf8\xff\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x04\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x81\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x31\xfd\xff\xc5\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd3\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x35\x17\xd5\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x5b\x73\x51\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x34\x57\xd5\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x4b\x73\x55\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x1c\x02\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x17\xd1\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x73\x11\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x81\x10\xfd\xfa\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x40\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x02\x04\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x38\xf8\x1d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x81\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x52\xfd\xfe\xa4\x1f\x00\x00\x00\x00\x00\x80\x40\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x02\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x1d\x02\x00\x80\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x81\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x40\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x35\x17\xd5\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\xc0\x21\x00\x80\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x34\x57\xd5\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x0c\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\xc0\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x02\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x02\x04\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x40\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x41\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x50\xfd\xfe\x84\x1f\x00\x00\x04\x00\x00\x80\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x40\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x40\x1d\x8e\x38\xfc\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x40\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x81\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\xe0\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x50\xfd\xfe\x84\x1f\x00\x00\x04\x00\x00\x80\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x20\xd5\xef\x4f\xfa\x01\x00\x00\x00\x00\x00\x08\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#--{-# NOINLINE happyExpListPerState #-}-happyExpListPerState st =-    token_strs_expected-  where token_strs = ["error","%dummy","%start_parseModule","%start_parseSignature","%start_parseImport","%start_parseStatement","%start_parseDeclaration","%start_parseExpression","%start_parsePattern","%start_parseTypeSignature","%start_parseStmt","%start_parseIdentifier","%start_parseType","%start_parseBackpack","%start_parseHeader","identifier","backpack","units","unit","unitid","msubsts","msubst","moduleid","pkgname","litpkgname_segment","litpkgname","mayberns","rns","rn","unitbody","unitdecls","unitdecl","signature","module","maybedocheader","missing_module_keyword","implicit_top","maybemodwarning","body","body2","top","top1","header","header_body","header_body2","header_top","header_top_importdecls","maybeexports","exportlist","exportlist1","expdoclist","exp_doc","export","export_subspec","qcnames","qcnames1","qcname_ext_w_wildcard","qcname_ext","qcname","semis1","semis","importdecls","importdecls_semi","importdecl","maybe_src","maybe_safe","maybe_pkg","optqualified","maybeas","maybeimpspec","impspec","prec","infix","ops","topdecls","topdecls_semi","topdecl","cl_decl","ty_decl","inst_decl","overlap_pragma","deriv_strategy_no_via","deriv_strategy_via","deriv_standalone_strategy","opt_injective_info","injectivity_cond","inj_varids","where_type_family","ty_fam_inst_eqn_list","ty_fam_inst_eqns","ty_fam_inst_eqn","at_decl_cls","opt_family","opt_instance","at_decl_inst","data_or_newtype","opt_kind_sig","opt_datafam_kind_sig","opt_tyfam_kind_sig","opt_at_kind_inj_sig","tycl_hdr","tycl_hdr_inst","capi_ctype","stand_alone_deriving","role_annot","maybe_roles","roles","role","pattern_synonym_decl","pattern_synonym_lhs","vars0","cvars1","where_decls","pattern_synonym_sig","decl_cls","decls_cls","decllist_cls","where_cls","decl_inst","decls_inst","decllist_inst","where_inst","decls","decllist","binds","wherebinds","rules","rule","rule_activation","rule_explicit_activation","rule_foralls","rule_vars","rule_var","warnings","warning","deprecations","deprecation","strings","stringlist","annotation","fdecl","callconv","safety","fspec","opt_sig","opt_tyconsig","sigtype","sigtypedoc","sig_vars","sigtypes1","unpackedness","ktype","ktypedoc","ctype","ctypedoc","context","constr_context","type","typedoc","constr_btype","constr_tyapps","constr_tyapp","btype","tyapps","tyapp","atype","inst_type","deriv_types","comma_types0","comma_types1","bar_types2","tv_bndrs","tv_bndr","fds","fds1","fd","varids0","kind","gadt_constrlist","gadt_constrs","gadt_constr_with_doc","gadt_constr","constrs","constrs1","constr","forall","constr_stuff","fielddecls","fielddecls1","fielddecl","maybe_derivings","derivings","deriving","deriv_clause_types","docdecl","docdecld","decl_no_th","decl","rhs","gdrhs","gdrh","sigdecl","activation","explicit_activation","quasiquote","exp","infixexp","infixexp_top","exp10_top","exp10","optSemi","scc_annot","hpc_annot","fexp","aexp","aexp1","aexp2","splice_exp","cmdargs","acmd","cvtopbody","cvtopdecls0","texp","tup_exprs","commas_tup_tail","tup_tail","list","lexps","flattenedpquals","pquals","squals","transformqual","guardquals","guardquals1","altslist","alts","alts1","alt","alt_rhs","ralt","gdpats","ifgdpats","gdpat","pat","bindpat","apat","apats","stmtlist","stmts","maybe_stmt","stmt","qual","fbinds","fbinds1","fbind","dbinds","dbind","ipvar","overloaded_label","name_boolformula_opt","name_boolformula","name_boolformula_and","name_boolformula_and_list","name_boolformula_atom","namelist","name_var","qcon_nowiredlist","qcon","gen_qcon","con","con_list","sysdcon_nolist","sysdcon","conop","qconop","gtycon","ntgtycon","oqtycon","oqtycon_no_varcon","qtyconop","qtycon","qtycondoc","tycon","qtyconsym","tyconsym","op","varop","qop","qopm","hole_op","qvarop","qvaropm","tyvar","tyvarop","tyvarid","var","qvar","qvarid","varid","qvarsym","qvarsym_no_minus","qvarsym1","varsym","varsym_no_minus","special_id","special_sym","qconid","conid","qconsym","consym","literal","close","modid","commas","bars0","bars","docnext","docprev","docnamed","docsection","moduleheader","maybe_docprev","maybe_docnext","'_'","'as'","'case'","'class'","'data'","'default'","'deriving'","'do'","'else'","'hiding'","'if'","'import'","'in'","'infix'","'infixl'","'infixr'","'instance'","'let'","'module'","'newtype'","'of'","'qualified'","'then'","'type'","'where'","'forall'","'foreign'","'export'","'label'","'dynamic'","'safe'","'interruptible'","'unsafe'","'mdo'","'family'","'role'","'stdcall'","'ccall'","'capi'","'prim'","'javascript'","'proc'","'rec'","'group'","'by'","'using'","'pattern'","'static'","'stock'","'anyclass'","'via'","'unit'","'signature'","'dependency'","'{-# INLINE'","'{-# SPECIALISE'","'{-# SPECIALISE_INLINE'","'{-# SOURCE'","'{-# RULES'","'{-# CORE'","'{-# SCC'","'{-# GENERATED'","'{-# DEPRECATED'","'{-# WARNING'","'{-# UNPACK'","'{-# NOUNPACK'","'{-# ANN'","'{-# MINIMAL'","'{-# CTYPE'","'{-# OVERLAPPING'","'{-# OVERLAPPABLE'","'{-# OVERLAPS'","'{-# INCOHERENT'","'{-# COMPLETE'","'#-}'","'..'","':'","'::'","'='","'\\\\'","'lcase'","'|'","'<-'","'->'","'@'","'~'","'=>'","'-'","'!'","'*'","'-<'","'>-'","'-<<'","'>>-'","'.'","TYPEAPP","'{'","'}'","vocurly","vccurly","'['","']'","'[:'","':]'","'('","')'","'(#'","'#)'","'(|'","'|)'","';'","','","'`'","SIMPLEQUOTE","VARID","CONID","VARSYM","CONSYM","QVARID","QCONID","QVARSYM","QCONSYM","IPDUPVARID","LABELVARID","CHAR","STRING","INTEGER","RATIONAL","PRIMCHAR","PRIMSTRING","PRIMINTEGER","PRIMWORD","PRIMFLOAT","PRIMDOUBLE","DOCNEXT","DOCPREV","DOCNAMED","DOCSECTION","'[|'","'[p|'","'[t|'","'[d|'","'|]'","'[||'","'||]'","TH_ID_SPLICE","'$('","TH_ID_TY_SPLICE","'$$('","TH_TY_QUOTE","TH_QUASIQUOTE","TH_QQUASIQUOTE","%eof"]-        bit_start = st * 476-        bit_end = (st + 1) * 476-        read_bit = readArrayBit happyExpList-        bits = map read_bit [bit_start..bit_end - 1]-        bits_indexed = zip bits [0..475]-        token_strs_expected = concatMap f bits_indexed-        f (False, _) = []-        f (True, nr) = [token_strs !! nr]--happyActOffsets :: HappyAddr-happyActOffsets = HappyA# "\x45\x00\xe6\xff\x69\x00\xd4\x22\x24\x18\xf4\x29\xfc\x26\x0c\x21\xd4\x22\x56\x41\x54\x37\x3b\x00\x46\x00\x56\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x04\x00\x00\x00\x00\x51\x01\x00\x00\x0d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x0a\x01\x0a\x01\x00\x00\xf0\x00\xd9\x01\xfc\x01\x00\x00\x76\x01\xc3\x3f\x00\x00\x00\x00\x00\x00\x13\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x47\x00\x00\x00\x00\x00\x00\xf7\x01\x1b\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x40\xa9\x00\x5e\x32\xe1\x30\x60\x31\xf0\x43\xbb\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x29\x00\x00\x00\x00\xde\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x02\x67\x0a\xbd\x00\x56\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x02\x79\x17\x00\x00\x00\x00\xf4\x29\xf4\x29\xec\x2c\x00\x00\x83\x02\x00\x00\x00\x00\xe2\x02\x1f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x02\x00\x00\x00\x00\xf4\x29\xac\x02\x6c\x23\x24\x04\x44\x04\x4c\x2f\x44\x04\x4c\x2f\xca\x02\xcb\x01\xd1\x02\x54\x2c\x4c\x2f\x84\x2d\x4c\x2f\xac\x1e\xb4\x1b\x4c\x1c\x5a\x30\xc0\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x29\xf4\x29\x54\x37\xa3\x04\xf4\x29\x00\x00\xf4\x29\x00\x00\xf4\x29\x8c\x43\xe1\x02\x00\x00\x3e\x03\xa2\x07\x00\x00\x25\x03\xad\x03\x00\x00\x00\x00\x00\x00\xf4\x04\x4f\x03\x42\x03\x5e\x00\x42\x03\x56\x44\x14\x45\x4f\x03\xe4\x1c\x00\x00\x8d\x03\x4c\x2f\x8d\x03\x8d\x03\x00\x00\x00\x00\x00\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x08\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x3f\x1a\x04\xfa\x03\xc9\x01\x80\x04\x00\x00\xdd\x32\x81\x00\x4f\x45\xf2\x03\x7c\x45\x7c\x45\xe7\x44\x4c\x2f\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x03\xdf\x03\x42\x04\x01\x04\x69\x04\x0f\x04\xa4\x04\x00\x00\x00\x00\x00\x00\x58\x04\x61\x04\x72\x00\xb0\x01\xb0\x01\xbb\x04\x92\x04\x6a\x03\x4c\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x2f\x7f\x04\xb1\x09\x20\x00\x00\x00\x4a\x01\x86\x04\xce\x00\x00\x00\x4a\x01\xea\x00\x00\x00\x95\x04\x52\x02\x4c\x46\xb1\x04\x49\x01\x24\x00\x00\x00\xcf\x05\xcf\x05\xd9\x04\xe2\x04\x4c\x3b\xc3\x3f\x07\x02\x54\x37\xf3\x04\x04\x05\x11\x05\x17\x05\x00\x00\x58\x05\x00\x00\x00\x00\x00\x00\xc3\x3f\x54\x37\xc3\x3f\x1b\x05\x1c\x05\x00\x00\x6a\x03\x00\x00\xbc\x2b\x00\x00\x00\x00\x5c\x33\x20\x42\xc3\x3f\x39\x05\x0d\x05\x00\x00\x4d\x05\x79\x17\x25\x01\x41\x05\x00\x00\xf4\x29\x00\x00\x00\x00\x00\x00\x45\x05\x50\x05\x5d\x05\x64\x05\x7c\x1d\x44\x1f\x00\x00\x84\x2d\x00\x00\x00\x00\x20\x42\x61\x05\x86\x05\x8d\x05\x00\x00\x87\x05\x00\x00\x6d\x05\x00\x00\x83\x44\x21\x00\x56\x44\x00\x00\x1a\x00\x56\x44\x54\x37\x56\x44\x00\x00\xd1\x05\x1c\x1b\x1c\x1b\x92\x46\xdb\x33\xca\x05\x00\x00\x00\x00\x00\x00\x00\x00\x7d\x05\xa9\x18\xe6\x02\x7e\x05\x7f\x05\x60\x05\x63\x05\x00\x00\x00\x00\x76\x05\x51\x03\x7a\x05\x00\x00\x00\x00\x43\x05\x00\x00\x00\x00\xc0\x01\xad\x05\x00\x00\x00\x00\x14\x1e\x00\x00\xbd\x05\x7a\x01\xb6\x05\xaf\x05\x00\x00\x00\x00\x1c\x2e\x00\x00\x00\x00\xb4\x2e\x27\x05\x4c\x2f\xb1\x05\xe9\x05\xec\x05\xf3\x05\x00\x00\x00\x00\x04\x24\x04\x24\xed\x05\x00\x00\x38\x06\xd9\x05\x62\x00\x00\x00\x00\x00\x94\x27\xfa\x05\x00\x00\x43\x06\x4c\x2f\xf4\x29\x1d\x44\x00\x00\x42\x40\x00\x00\x00\x00\xf4\x29\x54\x37\xf4\x29\xf4\x29\xf4\x29\xf4\x29\xe3\x05\xef\x05\x38\x03\xff\x05\x02\x06\x75\x01\x05\x06\x11\x06\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x37\xdf\x31\xb9\x43\x17\x06\x32\x06\xed\x00\x3a\x06\x44\x06\x60\x03\x00\x00\xeb\x01\x45\x06\x0f\x03\x4c\x06\x4d\x06\x00\x00\xd3\x01\x00\x00\x58\x06\x00\x00\x7b\x01\x00\x00\x92\x46\x00\x00\x28\x43\x00\x00\x00\x00\x5e\x06\x46\x47\x00\x00\x87\x30\xc3\x3f\x00\x00\x54\x37\x54\x37\x54\x37\x33\x02\x00\x00\x08\x0d\x4d\x00\x00\x00\x4f\x06\x00\x00\x06\x03\x06\x03\x95\x02\x00\x00\x00\x00\x95\x02\x00\x00\x00\x00\xb4\x06\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x06\xaa\x06\x6c\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\x06\x00\x00\x54\x37\x64\x01\x00\x00\xfa\x04\x5c\x06\x00\x00\x00\x00\x54\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x37\x00\x00\x00\x00\x00\x00\x54\x37\x54\x37\x00\x00\x00\x00\x5f\x06\x67\x06\x6e\x06\x70\x06\x73\x06\x74\x06\x76\x06\x7e\x06\x81\x06\x84\x06\x85\x06\x8f\x06\x8e\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\x06\x00\x00\x90\x06\xb3\x06\x00\x00\x00\x00\x00\x00\x27\x05\x9b\x01\xaf\x06\x95\x06\x00\x00\x00\x00\x00\x00\xef\x06\x00\x00\xf4\x29\xf4\x29\x53\x00\x00\x00\x4b\x02\xf4\x29\x00\x00\x00\x00\xbc\x06\x00\x00\x00\x00\x3c\x22\x8c\x17\xb4\x2e\xb6\x06\xa4\x21\x00\x00\xf4\x29\x9c\x24\xa4\x21\x00\x00\x9b\x06\x00\x00\x00\x00\x00\x00\xdc\x1f\xc4\x06\x00\x00\xd3\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x24\x18\x72\x00\xb8\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x06\xb2\x06\x00\x00\xb0\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x46\x00\x00\x00\x00\xc8\x06\x00\x00\x13\x00\xd3\x06\xc3\x3f\x46\x47\x79\x01\x6e\x00\x00\x00\x00\x00\x2f\x0e\x74\x20\x86\x00\x00\x00\xd4\x06\x60\x02\x61\x02\xd9\x06\x00\x00\xdb\x06\xda\x06\xab\x06\xc7\x06\xdd\x06\x00\x00\xde\x06\xcc\x06\xcd\x06\xb7\x45\xb7\x45\x00\x00\xe3\x06\x45\x02\x4f\x03\xbe\x06\xca\x06\xea\x06\x00\x00\xcf\x06\xad\x0b\x00\x00\x00\x00\xf4\x29\xa4\x21\x2e\x00\xcb\x3b\x43\x00\x00\x00\xe6\x06\x41\x00\xf2\x06\x46\x47\x00\x00\x00\x00\x44\x00\x00\x00\xf4\x29\x94\x27\xc3\x3f\x29\x07\x00\x00\xf7\x06\xdc\x06\x00\x00\x80\x04\x00\x00\x00\x00\x00\x00\x00\x00\x33\x07\x60\x00\xcf\x03\x9e\x02\x00\x00\xfe\x06\x46\x47\xdb\x33\x63\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x40\x00\x30\xdf\x06\xdb\x33\x00\x00\x00\x30\x92\x46\x2c\x28\x2c\x28\x36\x07\x00\x00\x63\x00\x00\x00\xd6\x06\x00\x00\xd7\x06\x00\x00\x00\x00\xe4\x45\xe4\x45\x00\x00\x00\x00\xe4\x45\x4c\x2f\x07\x07\x0f\x07\x00\x00\x00\x00\x46\x07\x00\x00\xe8\x02\xe8\x02\x00\x00\x00\x00\x00\x00\x51\x07\x00\x00\xf4\x06\x00\x00\x24\x18\xf5\x06\x4a\x01\x4a\x01\xf5\x06\xe9\x06\x00\x00\x00\x00\x00\x00\x19\x07\x00\x00\x00\x00\x00\x00\xf4\x01\x00\x00\x00\x00\x53\x01\x06\x07\xf4\x29\xbf\x46\x54\x07\x00\x00\x0e\x07\x03\x07\x00\x00\x00\x00\x0c\x07\x00\x00\xf3\x40\x00\x00\x30\x07\x35\x07\x39\x07\x3a\x07\xec\x46\x00\x00\x00\x00\x3b\x07\x22\x07\x54\x37\x32\x07\x54\x37\x46\x47\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x05\x54\x37\x00\x00\x00\x00\x54\x37\x23\x07\x00\x00\x73\x47\x00\x00\x8b\x05\x00\x00\x47\x07\x7c\x07\x00\x00\x00\x00\xa0\x05\x3c\x07\xc3\x3f\x45\x07\x5a\x34\x5a\x34\x81\x07\x96\x07\x4f\x07\x54\x37\x43\x00\x48\x07\x00\x00\xac\x47\x00\x00\x57\x07\x00\x00\x00\x00\x5a\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x37\x00\x00\x4b\x07\x54\x37\x00\x00\x00\x00\x00\x00\x37\x07\x00\x00\x1c\x1b\xf4\x29\x00\x00\x00\x00\xd9\x34\xec\x46\x5b\x07\x62\x07\xc3\x3f\xd9\x34\xd9\x34\xca\x05\x00\x00\x00\x00\x4a\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x02\x00\x00\x00\x00\x00\x00\x48\x01\x00\x00\x00\x00\x8c\x2a\x00\x00\x00\x00\x24\x2b\x00\x00\x72\x00\x4c\x07\x00\x00\xd0\x04\x00\x00\x34\x25\x5c\x07\x00\x00\x3d\x07\x00\x00\x00\x00\xcc\x25\x00\x00\x00\x00\x00\x00\x24\x2b\xc4\x28\x24\x2b\x00\x00\x00\x00\xa4\x21\x1d\x44\x00\x00\x00\x00\x00\x00\x54\x37\x00\x00\x00\x00\x6b\x07\x00\x00\x56\x07\x5d\x07\x3f\x07\x54\x37\x00\x00\x54\x37\x27\x11\xa5\x05\x00\x00\x61\x07\x61\x07\xb4\x07\xd8\x02\xb8\x07\x00\x00\x28\x00\x28\x00\x00\x00\x68\x07\x4d\x07\x00\x00\x55\x07\x00\x00\x00\x00\x69\x07\x00\x00\x00\x00\x00\x00\x00\x00\x65\x07\x00\x00\x7e\x07\x00\x00\x00\x00\x00\x00\xc2\x07\x8f\x07\x24\x2b\x5c\x29\x00\x00\x00\x00\xb5\x07\xb1\x03\x64\x26\x64\x26\x24\x2b\x74\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\x34\xd9\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x07\x75\x07\x9f\x07\x00\x00\xa0\x07\x00\x00\x92\x07\xc3\x3f\xd5\x07\xf7\x07\x00\x00\x78\x07\x00\x00\xfb\x07\x00\x00\x42\x00\xfb\x07\xb5\x05\xd9\x34\x27\x04\x58\x35\x00\x00\x00\x00\x24\x2b\x00\x00\xbc\x18\xbc\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x19\x54\x19\x00\x00\x00\x00\x00\x00\xec\x07\x87\x30\x00\x00\xc3\x3f\x54\x37\xb9\x07\xd7\x35\x00\x00\x00\x00\xec\x46\x00\x00\x00\x00\xc7\x05\xa7\x07\x19\x47\x00\x00\x00\x30\xd2\x04\x00\x00\x00\x00\xa8\x07\x00\x00\x91\x07\x00\x00\x06\x03\x00\x00\xf8\x07\xc5\x07\xc7\x07\xfc\x07\xa5\x07\x00\x00\xf8\x05\x00\x00\x00\x00\xf8\x05\x14\x08\x00\x00\x00\x00\x24\x2b\xcb\x07\x00\x00\x00\x08\x1c\x1b\x1c\x1b\x00\x00\x00\x00\xd7\x35\x00\x00\xce\x07\x00\x00\xca\x07\x00\x00\x13\x06\x00\x00\x6b\x00\x00\x00\x18\x01\x00\x00\x00\x00\x13\x08\x6c\x02\x00\x00\x87\x30\x00\x00\x00\x00\x3c\x01\x00\x00\x05\x08\x24\x2b\x56\x36\x76\x02\x00\x00\x00\x00\x00\x00\x85\x04\x85\x04\x00\x00\x68\x02\xf6\x07\xa3\x07\x00\x00\x00\x00\x00\x00\x00\x00\xd3\x37\x00\x00\x17\x00\x00\x00\x18\x08\x00\x00\x2d\x08\x00\x00\xc3\x3f\x00\x00\x00\x00\x52\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x2b\x24\x2b\x24\x2b\x00\x00\x00\x00\x00\x00\xba\x07\x2f\x08\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x01\x00\x00\xbc\x01\x1c\x0e\x91\x02\x24\x06\xd0\x07\x00\x00\x4d\x42\xd8\x02\x00\x00\x00\x00\x00\x00\x24\x06\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x02\xd3\x07\x00\x00\x00\x00\x00\x00\x00\x00\x06\x03\x98\x02\x3a\x05\xd4\x07\xd8\x02\x00\x00\x00\x00\x00\x00\x48\x00\xd8\x07\xd9\x07\x20\x41\x06\x03\x06\x03\x00\x00\x24\x2b\xf0\x07\x00\x00\x00\x00\x19\x08\x00\x00\xeb\x07\x00\x00\x00\x00\x4a\x3c\xac\x47\xf4\x07\xdf\x07\x0f\x00\xed\x07\x00\x00\x00\x00\x00\x00\x00\x00\x72\x00\xe7\x07\x00\x00\x0a\x08\xea\x07\xfd\x07\x00\x00\xec\x19\x00\x00\x2e\x03\xc9\x3c\xc3\x3f\x41\x19\xc3\x3f\x00\x00\x00\x00\x00\x00\x84\x1a\xc9\x3c\x00\x00\x00\x00\x48\x3d\x15\x08\x00\x00\xd1\x38\x50\x39\x87\x30\xcf\x39\x00\x00\xac\x01\xb0\x02\x19\x47\xcf\x39\x00\x00\x52\x00\x06\x03\x00\x00\x00\x00\x00\x00\x00\x00\x72\x00\xfe\x07\x00\x00\x00\x00\x00\x00\xf9\x07\xd8\x02\xff\x07\x02\x08\x00\x00\x00\x00\x00\x00\x87\x30\x00\x00\xbe\x01\x00\x00\x72\x00\xb1\x02\x01\x08\x48\x3d\x43\x00\x00\x00\x00\x00\x17\x08\xd5\x36\xa1\x03\x00\x00\x00\x00\xcf\x39\x4e\x3a\x00\x00\x00\x00\x4f\x03\xd5\x36\x85\x04\x00\x00\x00\x00\xc7\x3d\xe3\x07\x0d\x08\x21\x08\x00\x00\xcd\x3a\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x3f\x24\x2b\xef\x07\x00\x00\x65\x01\x65\x01\x00\x00\x06\x03\x00\x00\x06\x03\x00\x00\x00\x00\x0f\x08\x10\x08\x11\x08\x12\x08\x00\x00\xff\x01\x00\x00\x00\x00\x00\x00\xee\x42\x16\x08\x00\x00\x00\x00\xd8\x02\x1a\x08\x1d\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x03\x00\x00\x7d\x08\xbd\x02\x00\x00\x3d\x00\x1c\x08\x1c\x08\x35\x08\x00\x00\x00\x00\x00\x00\x46\x3e\x00\x00\xfa\x07\x00\x00\x00\x00\x00\x00\x00\x00\x30\x08\x31\x08\xe1\x30\x00\x00\x00\x00\xac\x47\x00\x00\x00\x00\x70\x08\x83\x08\x43\x00\x00\x00\x00\x00\xc5\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x08\xd8\x02\x00\x00\x00\x00\x27\x08\x00\x00\x00\x00\x79\x08\x8d\x08\x00\x00\x8d\x08\x47\x08\x87\x30\x00\x00\x44\x3f\x00\x00\x00\x00\x80\x08\x84\x08\x46\x17\x06\x03\x00\x00\x06\x03\x06\x03\x00\x00\x06\x03\xee\x42\x00\x00\x00\x00\x86\x42\x00\x00\x00\x00\x00\x00\x00\x00\x36\x08\x5a\x08\x00\x00\x06\x03\x3f\x06\x3f\x06\x00\x00\x00\x00\x00\x00\x95\x08\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x08\x06\x03\x00\x00\x00\x00\x00\x00\x00\x00"#--happyGotoOffsets :: HappyAddr-happyGotoOffsets = HappyA# "\x05\x00\xfe\xff\x81\x08\x93\x4e\x44\x01\x04\x51\x35\x50\x8b\x07\xa2\x4c\x01\x00\x7d\x10\x89\x01\x07\x00\x09\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x04\x00\x00\x00\x00\x00\x00\xbb\x01\x00\x00\x00\x00\x00\x00\x65\x02\x00\x00\x00\x00\xf5\x03\x09\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x01\xeb\x00\x9a\x10\xdb\x0c\xbb\x0c\x1a\x01\xd4\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x51\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x72\x06\x8d\x07\x1b\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x0c\x00\x00\x00\x00\x8e\x51\xd3\x51\x71\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x52\xd7\x07\xda\x4e\xe2\x03\xda\x07\x9e\x5b\xdb\x07\xae\x5b\x00\x00\x00\x00\x00\x00\x26\x5b\xe9\x5b\x2b\x08\x16\x5c\xbf\x48\x26\x47\x06\x48\x71\x0a\x6e\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x52\xe9\x59\x2b\x11\xee\x07\xa2\x52\x00\x00\xe7\x52\x00\x00\x2c\x53\x51\x05\x88\x08\x00\x00\x00\x00\xeb\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x03\x6a\x02\xd1\x03\xf7\x03\x11\x04\x0c\x04\xa7\x05\xc0\x02\x96\x47\x00\x00\x00\x00\x26\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\x02\x00\x00\x00\x00\xa1\x04\x7b\x08\x00\x00\x43\x14\x4d\x08\x92\x00\x21\x04\x8e\x01\xdb\xff\x4f\x05\x61\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\x08\x00\x00\x00\x00\x00\x00\x00\x00\x72\x01\x00\x00\xea\x01\x00\x00\xcb\x00\xa6\x07\xa4\x07\xa9\x07\x99\x08\x00\x00\x62\x04\x8e\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x5c\xc4\x07\xfb\x04\x00\x00\x00\x00\x5d\x08\x00\x00\x00\x00\x00\x00\x5e\x08\x00\x00\x00\x00\x9f\x04\x00\x00\xc6\xff\x00\x00\x7d\x00\xf5\x02\x00\x00\x5f\x08\x62\x08\x00\x00\x00\x00\x14\x01\x99\x14\xa0\x03\x8c\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x14\xd3\x0e\xe0\x14\x3e\x08\x00\x00\x00\x00\xfe\x04\x00\x00\x36\x5b\x00\x00\x00\x00\x0c\x08\x1b\x03\xcc\x03\x82\x08\x00\x00\x00\x00\x00\x00\x08\x0e\x93\xff\x00\x00\x00\x00\x2e\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x49\x00\x4a\x00\x00\x2b\x08\x00\x00\x00\x00\x40\x04\x00\x00\x69\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x2b\x00\x00\x51\x04\x00\x00\x00\x00\x8f\x04\xa9\x0d\xc1\x04\x00\x00\x00\x00\x50\x03\xce\x03\xcb\xff\x32\x08\xc9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\x00\xb7\x07\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x3c\x00\x00\x00\x01\x0f\x00\x00\x00\x00\x00\x00\x72\x06\x25\x08\x00\x00\x93\xff\x00\x00\x00\x00\x00\x00\x2a\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\x5c\x00\x00\x00\x00\xde\x08\x04\x08\x06\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\x4c\x2c\x4d\x00\x00\x00\x00\x00\x00\x37\x08\x7d\xff\x00\x00\x00\x00\x71\x4d\xc3\x04\x00\x00\x00\x00\x16\x5d\x71\x53\xc8\x02\x00\x00\xd4\x01\x00\x00\x00\x00\xf9\x5a\xa8\x0e\xb6\x53\xfb\x53\x40\x54\x85\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x0f\x95\x0c\x8b\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x02\x00\x00\x6d\x00\x00\x00\x4e\x06\x00\x00\x00\x00\x00\x00\xd1\x01\x00\x00\x9c\x02\xfa\x14\x00\x00\x35\x13\x52\x13\x48\x11\x00\x00\x00\x00\x16\x00\xdd\x07\x00\x00\x57\x02\x00\x00\xd2\x07\xd6\x07\xe7\x08\x00\x00\x00\x00\xed\x08\x00\x00\x00\x00\xd6\x08\x00\x00\x00\x00\x00\x00\x00\x00\x04\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x13\x00\x00\x00\x00\x37\x03\x00\x00\x00\x00\x00\x00\x65\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x0f\x00\x00\x00\x00\x00\x00\xa1\x0f\xce\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x08\x2a\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xca\x54\x0f\x55\xe8\x07\x00\x00\x00\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x4d\x76\x48\x12\x47\x00\x00\x6b\x4a\x00\x00\x99\x55\x17\x4c\xd6\x4a\x00\x00\x89\xff\x00\x00\x00\x00\x00\x00\x95\x49\x00\x00\x00\x00\xb8\x05\x00\x00\x00\x00\x00\x00\x00\x00\xd6\x01\xf2\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x02\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x07\x00\x00\x7c\x16\xe1\x01\x00\x00\xf3\x07\x00\x00\x00\x00\xd0\x00\x00\x00\x06\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x03\x1d\x06\x00\x00\x00\x00\xa8\x05\x66\x03\x00\x00\x00\x00\x07\x04\x00\x00\x00\x00\x01\x0f\x00\x00\x00\x00\xf9\x5a\x41\x4b\x00\x00\xca\x04\xc1\xff\x00\x00\x00\x00\xf1\x07\x00\x00\x0f\x02\x00\x00\x00\x00\xe7\xff\x00\x00\xde\x55\x02\x4e\x2a\x15\xa9\x08\x25\x05\xc4\x08\x00\x00\x00\x00\xdb\x08\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x08\xb2\x05\x35\x04\xd2\x08\x00\x00\x00\x00\x17\x02\xd6\x0a\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x00\x82\x02\x0b\x08\x4f\x08\x00\x00\xed\xff\xe8\xff\x7a\x50\xbf\x50\xb3\x08\x00\x00\x00\x00\x00\x00\xb9\x08\x00\x00\xaf\x08\x00\x00\x00\x00\xc6\x01\xbb\x03\x00\x00\x00\x00\xc3\x00\x51\x5d\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x08\x00\x00\x1b\x09\x1d\x09\x00\x00\x00\x00\x00\x00\x0e\x03\x00\x00\x08\x09\x00\x00\xd6\x01\x15\x09\xbc\x08\xc2\x08\x20\x09\x0f\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x5a\x34\x00\xe2\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x02\x00\x00\x00\x00\x00\x00\x00\x00\x65\x11\x05\x09\x82\x11\xc5\x00\x00\x00\xef\x08\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x08\xd6\x0d\x00\x00\x00\x00\x13\x12\x00\x00\x00\x00\xdd\x02\x00\x00\xeb\x08\x00\x00\x00\x00\xe3\x08\x00\x00\x00\x00\x18\x05\x00\x00\x8b\x15\x00\x00\x0b\x0a\x9c\x0a\xba\x08\xa2\x05\x00\x00\x30\x12\xe4\xff\x00\x00\x00\x00\x46\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x0e\x00\x00\x00\x00\x6c\x0e\x00\x00\x00\x00\x00\x00\x9d\x04\x00\x00\x43\x07\x23\x56\x00\x00\x00\x00\x75\x08\x5a\x03\x00\x00\x00\x00\xbb\x15\xf3\x0a\x84\x0b\xe9\x03\x00\x00\x00\x00\x2a\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x56\x00\x00\x00\x00\xad\x56\x00\x00\x38\x08\x00\x00\x00\x00\x4e\x05\x00\x00\x4e\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x4f\x00\x00\x00\x00\x00\x00\xf2\x56\xa9\x4f\x37\x57\x00\x00\x00\x00\xac\x4b\x10\x02\x00\x00\x00\x00\x00\x00\x33\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x03\x00\x14\x00\x00\x4d\x12\x22\x00\x4b\x09\x00\x00\x3e\x09\x41\x09\x00\x00\x15\x00\x00\x00\x00\x00\xfb\xff\xfd\xff\x00\x00\x00\x00\x18\x03\x00\x00\x07\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\x08\x85\x08\x7c\x57\xf0\x4f\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x4c\x64\x4f\xc1\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x0b\xbe\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x15\xc6\x08\xdc\x05\x00\x00\x9b\xff\x00\x00\xbb\x08\x00\x00\xfc\xff\xe5\x05\x00\x00\xdb\x0b\x00\x00\xb9\x0a\x00\x00\x00\x00\x06\x58\x00\x00\x4d\x04\xcc\x04\x00\x00\xcc\x08\xf7\x04\x00\x00\x00\x00\x00\x00\x54\x02\xd2\x02\x00\x00\x00\x00\x00\x00\x29\x09\xc3\xff\x00\x00\xe1\x15\x6a\x12\x00\x00\x09\x09\x00\x00\x00\x00\xf4\xff\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\xed\x02\x01\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x09\x00\x00\x00\x00\x5d\x09\x40\x09\x00\x00\x00\x00\x4b\x58\x00\x00\x00\x00\x00\x00\x47\x06\xc5\x06\x00\x00\x00\x00\x26\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x09\x00\x00\x21\x09\x00\x00\x51\x08\x00\x00\x00\x00\x31\x09\x00\x00\x00\x00\xdd\x02\x00\x00\x00\x00\x5c\x08\x00\x00\x36\x09\xb8\x5a\x2f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x72\x02\xfc\x02\x00\x00\xd5\xff\x34\x09\x57\x08\x00\x00\x00\x00\x00\x00\x00\x00\xee\x0b\x00\x00\xdc\x02\x00\x00\xdc\x08\x00\x00\xe8\x05\x00\x00\x30\x14\x00\x00\x00\x00\x89\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x58\xd5\x58\x1a\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x66\x08\x00\x00\x00\x00\x26\x00\x00\x00\x77\x09\x00\x00\x00\x00\x55\x00\xe3\xff\x00\x00\x00\x00\x00\x00\x7b\x09\x00\x00\x7a\x02\x7b\x02\x00\x00\x27\x00\x73\x09\x00\x00\x00\x00\x00\x00\x00\x00\x71\x08\xd5\x03\x36\x02\x3f\x05\x2b\x00\x00\x00\x00\x00\x00\x00\x03\x00\x95\x09\x00\x00\x29\x00\x78\x08\x7a\x08\x00\x00\x5f\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x09\x5f\x02\x00\x00\x00\x00\x76\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\x05\x00\x00\x55\x09\x2d\x05\xf4\x15\x01\x0f\x20\x16\x00\x00\x00\x00\x00\x00\x4a\x05\x9e\x06\x00\x00\x00\x00\xc3\x06\x54\x09\x00\x00\x42\x01\x37\x02\xda\xff\xfb\x12\x00\x00\x87\x08\x00\x00\x50\x00\x1d\x14\x00\x00\x94\x05\x8a\x08\x00\x00\x19\x02\x67\x02\x00\x00\x8c\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x02\x00\x00\x8e\x08\x00\x00\x8f\x08\x00\x00\x00\x00\xe1\x07\x06\x00\x00\x00\x00\x00\x5a\x09\x43\x09\x64\x09\x00\x00\x00\x00\x18\x13\x5f\x10\x00\x00\x00\x00\xa3\xff\x60\x09\x6e\x03\x00\x00\x00\x00\x78\x0c\x19\x03\x00\x00\x00\x00\x00\x00\xad\x09\x00\x00\x00\x00\x00\x00\x00\x00\x37\x16\xa4\x59\x00\x00\x00\x00\x9a\x09\xa7\x09\x00\x00\xff\xff\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x02\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x09\x9f\x09\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x09\x00\x00\x8b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x0d\x00\x00\x00\x00\x63\x01\x00\x00\x00\x00\x1e\x09\x1e\x06\x0e\x00\x00\x00\x00\x00\x1a\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x09\x25\x06\x00\x00\x36\x06\x00\x00\xd6\xff\x00\x00\xad\x09\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x97\x08\x00\x00\x02\x00\x9a\x08\x00\x00\xf5\xff\x5f\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x08\xb4\x09\xb5\x09\x00\x00\x00\x00\x00\x00\x42\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x08\x00\x00\x00\x00\x00\x00\x00\x00"#--happyAdjustOffset :: Happy_GHC_Exts.Int# -> Happy_GHC_Exts.Int#-happyAdjustOffset off = off--happyDefActions :: HappyAddr-happyDefActions = HappyA# "\xbf\xff\xc0\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\xfd\x00\x00\x00\x00\xbe\xff\xbf\xff\x00\x00\xf2\xff\x10\xfd\x0d\xfd\x0a\xfd\xfa\xfc\xf8\xfc\xf9\xfc\x06\xfd\xf7\xfc\xf6\xfc\xf5\xfc\x08\xfd\x07\xfd\x09\xfd\x05\xfd\x04\xfd\xf4\xfc\xf3\xfc\xf2\xfc\xf1\xfc\xf0\xfc\xef\xfc\xee\xfc\xed\xfc\xec\xfc\xeb\xfc\xe9\xfc\xea\xfc\x00\x00\x0b\xfd\x0c\xfd\x00\x00\x8a\xff\x00\x00\xb0\xff\xc1\xff\x8a\xff\xc8\xfc\x00\x00\x00\x00\x00\x00\x7e\xfe\x00\x00\xa3\xfe\x00\x00\x9c\xfe\x95\xfe\x88\xfe\x87\xfe\x85\xfe\x72\xfe\x00\x00\x7d\xfe\x47\xfd\x83\xfe\x42\xfd\x37\xfd\x3a\xfd\x31\xfd\x7c\xfe\x82\xfe\x19\xfd\x16\xfd\x68\xfe\x5d\xfe\x14\xfd\x13\xfd\x15\xfd\x00\x00\x00\x00\x2e\xfd\x7f\xfe\x2d\xfd\x2c\xfd\x7b\xfe\x2b\xfd\x00\x00\xc4\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\xfd\x34\xfd\x2f\xfd\x30\xfd\x38\xfd\x32\xfd\x33\xfd\x6e\xfd\x69\xfe\x6a\xfe\x70\xfe\x00\x00\x11\xfe\x10\xfe\x00\x00\xf1\xff\x5d\xfd\x50\xfd\x5c\xfd\xef\xff\xf0\xff\x1d\xfd\x02\xfd\x03\xfd\xfe\xfc\xfb\xfc\x5b\xfd\xe5\xfc\x4c\xfd\xe2\xfc\xdf\xfc\xfd\xfc\xe8\xfc\xe6\xfc\xe7\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xe3\xfc\xfc\xfc\xe0\xfc\xe4\xfc\xff\xfc\xe1\xfc\xd0\xfd\x7b\xfd\x0a\xfe\x01\xfe\x09\xfe\x00\x00\x00\x00\x02\xfe\xf7\xfd\xeb\xfd\xe9\xfd\xdb\xfd\x00\x00\x00\x00\x80\xfd\x7e\xfd\xe6\xfd\xe5\xfd\xe7\xfd\xe8\xfd\xe4\xfd\xdc\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xfd\xde\xfc\xdd\xfc\xe3\xfd\xe2\xfd\xda\xfc\xd9\xfc\xdc\xfc\xdb\xfc\xd8\xfc\xd7\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\xfd\x00\x00\xcc\xfd\x00\x00\xd6\xfd\x77\xff\x1e\xfe\x00\x00\x00\x00\x07\xfe\x00\x00\x0d\xfd\x75\xff\x74\xff\x73\xff\x00\x00\x00\x00\x15\xfe\x15\xfe\x15\xfe\x00\x00\x6b\xfd\x00\x00\x00\x00\x8e\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xff\x6c\xff\x6b\xff\x15\xff\x6a\xff\x69\xff\x2a\xfe\x63\xff\x29\xfe\x32\xfe\x62\xff\x2d\xfe\x61\xff\x31\xfe\x30\xfe\x2f\xfe\x2e\xfe\x00\x00\x29\xff\x00\x00\x49\xff\x52\xff\x28\xff\x00\x00\x00\x00\x00\x00\xdc\xfe\xc6\xfe\xcb\xfe\x00\x00\x00\x00\xcc\xfc\xcb\xfc\xca\xfc\xc9\xfc\x00\x00\x00\x00\x84\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xff\xc2\xff\x8a\xff\x00\x00\x87\xff\x00\x00\x00\x00\x00\x00\x82\xff\x00\x00\x00\x00\x00\x00\x60\xfd\x57\xfd\x61\xfd\x12\xfd\x59\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xfe\x00\x00\x63\xfd\x00\x00\xc7\xfe\x00\x00\x00\x00\xdd\xfe\xda\xfe\x00\x00\x56\xfd\x00\x00\x00\x00\x00\x00\x67\xff\x00\x00\x00\x00\x00\x00\x95\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\xff\x00\x00\x4b\xff\x4d\xff\x4c\xff\x00\x00\x63\xfe\x00\x00\x5a\xfe\x00\x00\x1c\xff\x00\x00\x23\xfd\x00\x00\x22\xfd\x24\xfd\x00\x00\x00\x00\x00\x00\x15\xff\x00\x00\x8d\xfd\xc3\xfd\x0a\xfe\x00\x00\x00\x00\x20\xfd\x00\x00\x1f\xfd\x21\xfd\x1b\xfd\x00\xfd\x00\x00\x01\xfd\x4c\xfd\x00\x00\x00\x00\xcd\xfc\xfd\xfc\x54\xfd\xd1\xfc\x00\x00\x56\xfd\xad\xfe\x00\x00\x6c\xfd\x6a\xfd\x68\xfd\x67\xfd\x64\xfd\x00\x00\x00\x00\x00\x00\x14\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe4\xfe\x00\x00\xe7\xfe\xe7\xfe\x00\x00\x00\x00\x00\x00\x76\xff\xd7\xfd\x4a\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\xff\x6e\xff\x00\x00\x00\x00\x00\x00\xd9\xfd\xda\xfd\x00\x00\xc9\xfd\xe8\xfd\x00\x00\x00\x00\x00\xfd\x01\xfd\x00\x00\x52\xfd\x00\x00\xb7\xfd\x00\x00\xb6\xfd\x4f\xfd\x8b\xfd\x05\xfe\xf5\xfd\x8a\xfd\x87\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\xfd\x7d\xfd\x81\xfd\x81\xfd\x00\x00\xed\xfd\x7a\xfd\xfe\xfd\x00\x00\xf0\xfd\x92\xfd\x00\x00\x00\x00\xee\xfd\x00\x00\x00\x00\x00\x00\x78\xfd\xfa\xfd\x00\x00\x04\xfe\x00\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xfe\x5f\xfd\x5e\xfd\x81\xfe\x80\xfe\x6c\xfe\x26\xfd\x63\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x62\xfe\x00\x00\x00\x00\x00\x00\x77\xfe\x00\x00\x3a\xfd\x00\x00\x00\x00\x7f\xfe\x79\xfe\x00\x00\x43\xfd\x00\x00\x40\xfe\x3e\xfe\xc5\xfc\x00\x00\x84\xfe\x00\x00\xa4\xfe\xa5\xfe\x00\x00\x5d\xfe\x5c\xfe\x00\x00\x00\x00\x86\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe8\xff\x00\x00\x00\x00\xad\xff\x87\xff\xac\xff\x00\x00\x00\x00\xbb\xff\xd4\xfc\xd3\xfc\xbb\xff\xab\xff\xa9\xff\xaa\xff\x8b\xff\xec\xff\xd5\xfc\xd6\xfc\xe9\xff\x00\x00\xd8\xff\xdc\xff\xd9\xff\xdb\xff\xda\xff\xdd\xff\xeb\xff\x53\xfe\xa2\xfe\x9e\xfe\x94\xfe\x9d\xfe\x00\x00\x5e\xfe\x00\x00\x00\x00\xa8\xfe\x00\x00\x00\x00\x7a\xfe\x74\xfe\x00\x00\x40\xfd\x44\xfd\x46\xfd\xd2\xfc\x41\xfd\x73\xfe\x00\x00\x45\xfd\x75\xfe\x76\xfe\x00\x00\x00\x00\x18\xfd\x39\xfd\x00\x00\x00\x00\x00\x00\x2e\xfd\x2d\xfd\x2c\xfd\x7b\xfe\x2b\xfd\x2f\xfd\x30\xfd\x33\xfd\x62\xfe\x00\x00\x64\xfe\x71\xfe\xed\xff\xee\xff\x53\xfd\x5a\xfd\x0e\xfd\x51\xfd\x4b\xfd\x1c\xfd\x0b\xfe\x0c\xfe\x0d\xfe\x0e\xfe\x0f\xfe\xab\xfe\x08\xfe\xf9\xfd\x00\x00\x79\xfd\x76\xfd\x73\xfd\x75\xfd\x7c\xfd\xf6\xfd\x00\x00\x00\x00\x00\x00\xa3\xfd\xa1\xfd\x93\xfd\x90\xfd\x00\x00\xff\xfd\x00\x00\x00\x00\x00\x00\x82\xfd\x00\x00\x00\x00\xfd\xfd\xfc\xfd\x00\x00\x89\xfd\xf2\xfd\x00\x00\x00\x00\x87\xfd\x00\x00\x00\x00\xdd\xfd\xb5\xfd\x00\x00\x00\x00\x0f\xfd\xb9\xfd\xbd\xfd\xde\xfd\xbf\xfd\xb8\xfd\xbe\xfd\xdf\xfd\x00\x00\xd5\xfd\xd2\xfd\xd3\xfd\xc4\xfd\xc5\xfd\x00\x00\x00\x00\xd1\xfd\xd4\xfd\xcd\xfd\xcb\xfd\x48\xfd\x00\x00\x00\x00\x49\xfd\x1f\xfe\x29\xfd\x71\xff\x2a\xfd\x4e\xfd\x28\xfd\x27\xfd\x00\x00\x21\xfe\xaa\xfe\x00\x00\x98\xfe\x93\xfe\x00\x00\x00\x00\x5d\xfe\x00\x00\x00\x00\x28\xfe\xe8\xfe\xaf\xfe\x27\xfe\x00\x00\x70\xfd\xe6\xfd\x00\x00\x00\x00\x00\x00\x67\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\xfc\xce\xfc\x0f\xfd\xc1\xfd\xe0\xfd\xe1\xfd\xc2\xfd\x00\x00\x00\x00\x00\x00\x27\xff\xae\xfe\x00\x00\x93\xfe\x00\x00\x5d\xfe\x06\xfe\x2b\xfe\xe0\xfe\x23\xfe\x00\x00\x00\x00\x00\x00\xf5\xfe\x55\xfe\x25\xff\x00\x00\x4e\xff\x52\xff\x53\xff\x54\xff\x56\xff\x55\xff\xeb\xfe\x12\xff\x00\x00\x23\xff\x59\xff\x00\x00\x5d\xfe\x00\x00\x00\x00\xb9\xfe\xb8\xfe\xb7\xfe\xb6\xfe\xb5\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x09\xff\x06\xff\x00\x00\x00\x00\x00\x00\xd3\xfe\xd9\xfe\x00\x00\x64\xff\xde\xfe\xc5\xfe\xc0\xfe\xc4\xfe\x66\xff\xc8\xfe\x00\x00\xca\xfe\x65\xff\xcd\xfe\x00\x00\x00\x00\x00\x00\x2c\xfe\x85\xff\x7e\xff\x83\xff\xbb\xff\xbb\xff\xb7\xff\xb6\xff\xb3\xff\x6e\xff\xb8\xff\x89\xff\xb4\xff\xb5\xff\xa7\xff\x00\x00\x00\x00\xa7\xff\x80\xff\x7f\xff\xbf\xfe\xbd\xfe\x00\x00\xce\xfe\x62\xfd\xc9\xfe\x00\x00\xc1\xfe\xdf\xfe\x00\x00\x00\x00\x00\x00\xd1\xfe\x0b\xff\x0c\xff\x00\x00\x04\xff\x05\xff\x00\xff\x00\x00\x08\xff\x00\x00\xbb\xfe\x00\x00\xb3\xfe\xb2\xfe\xb4\xfe\x00\x00\xba\xfe\x5f\xff\xa1\xfe\x00\x00\x00\x00\x48\xff\x00\x00\x00\x00\x13\xff\x11\xff\x10\xff\x0d\xff\x0e\xff\x5a\xff\x00\x00\x00\x00\x68\xff\x5b\xff\x00\x00\x59\xfe\x57\xfe\x00\x00\x60\xff\x00\x00\x1d\xff\x00\x00\xe0\xfe\x25\xfe\x24\xfe\x00\x00\x00\x00\x00\x00\x92\xfe\x00\x00\x00\x00\x50\xfe\x3c\xfe\x00\x00\x00\x00\x27\xff\x00\x00\x18\xff\x5d\xfe\x16\xff\x00\x00\xc0\xfd\xbc\xfd\xd0\xfc\x1e\xfd\x1a\xfd\x55\xfd\xac\xfe\x1d\xfe\x69\xfd\x66\xfd\x58\xfd\x65\xfd\x1a\xfe\x00\x00\x13\xfe\x00\x00\x00\x00\x17\xfe\x1c\xfe\xe3\xfe\x71\xfd\xe6\xfe\xe9\xfe\x00\x00\xe2\xfe\xe5\xfe\x00\x00\x00\x00\x00\x00\x91\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xc7\xfd\xc6\xfd\x70\xff\xc8\xfd\xca\xfd\xcf\xfd\xbb\xfd\xba\xfd\xc3\xfd\xaf\xfd\xb1\xfd\xae\xfd\xac\xfd\xa9\xfd\xa8\xfd\x00\x00\xb3\xfd\xb0\xfd\x00\x00\x88\xfd\x00\x00\x9c\xfd\x98\xfd\x00\x00\x9d\xfd\x00\x00\x00\x00\x9e\xfd\x00\x00\x03\xfe\x86\xfd\x83\xfd\x85\xfd\xec\xfd\xf3\xfd\x00\x00\x00\x00\x00\x00\x91\xfd\xef\xfd\x00\x00\x00\x00\xea\xfd\x6d\xfe\x11\xfd\x00\x00\x25\xfd\x61\xfe\x60\xfe\x5f\xfe\x00\x00\x00\x00\xc6\xfc\x00\x00\x9f\xfe\x00\x00\x00\x00\x00\x00\xea\xff\xa7\xff\xa7\xff\x00\x00\xa0\xff\x00\x00\xe7\xff\xc0\xff\xc0\xff\xd7\xff\x00\x00\xc6\xfc\xc7\xfc\xc4\xfc\x6b\xfe\x78\xfe\x00\x00\x77\xfd\x74\xfd\x8f\xfd\xa2\xfd\xfe\xfd\x84\xfd\x00\x00\xa0\xfd\x9b\xfd\x97\xfd\xe0\xfe\x94\xfd\x00\x00\x99\xfd\x9f\xfd\xf4\xfd\xa7\xfd\xef\xfc\x00\x00\x00\x00\xb4\xfd\x6f\xff\x8c\xff\x72\xff\x9a\xfe\x90\xfe\x99\xfe\x00\x00\x00\x00\xa9\xfe\x20\xfe\x6f\xfd\xea\xfe\x72\xfd\x00\x00\xa7\xfe\x00\x00\x12\xfe\x00\x00\x17\xff\x00\x00\x00\x00\x50\xfe\x3c\xfe\x26\xff\xc4\xfc\x5d\xff\x3b\xfe\x39\xfe\x00\x00\x3c\xfe\x00\x00\x00\x00\x99\xfe\x00\x00\xe1\xfe\x26\xfe\x00\x00\xf6\xfe\xf9\xfe\xf9\xfe\x54\xfe\x55\xfe\x55\xfe\x24\xff\x14\xff\xec\xfe\xef\xfe\xef\xfe\x0f\xff\x21\xff\x22\xff\x43\xff\x00\x00\x38\xff\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xfe\x4d\xfd\x00\x00\x07\xff\x0a\xff\x00\x00\x00\x00\xd1\xfe\xd0\xfe\x00\x00\x00\x00\xd8\xfe\xd6\xfe\x00\x00\xc3\xfe\x00\x00\xbe\xfe\x00\x00\x81\xff\x00\x00\x00\x00\x00\x00\x00\x00\x88\xff\x8d\xff\x00\x00\xbd\xff\xbc\xff\x00\x00\x7c\xff\xc2\xfe\xd7\xfe\x00\x00\x00\x00\xd2\xfe\xd4\xfe\xe7\xfe\xe7\xfe\x03\xff\xb0\xfe\x00\x00\xa0\xfe\x00\x00\x47\xff\x00\x00\x5e\xff\x00\x00\xf4\xfe\x15\xff\xf0\xfe\x00\x00\xf3\xfe\x29\xff\x30\xff\x00\x00\x58\xfe\x56\xfe\xff\xfe\xfa\xfe\x00\x00\xfe\xfe\x32\xff\x00\x00\x00\x00\x00\x00\x22\xfe\x9b\xfe\x8f\xfe\x4d\xfe\x4d\xfe\x5c\xff\x00\x00\x38\xfe\x36\xfd\x35\xfe\x4f\xff\x51\xff\x50\xff\x00\x00\x3a\xfe\x49\xfe\x47\xfe\x43\xfe\x58\xff\x3c\xfe\x19\xff\x00\x00\x18\xfe\x19\xfe\x00\x00\x8e\xfe\xb2\xfd\xab\xfd\xaa\xfd\xad\xfd\x00\x00\x00\x00\x00\x00\x9a\xfd\x95\xfd\x96\xfd\x00\x00\x00\x00\x6e\xfe\x3f\xfe\x3d\xfe\x5b\xfe\x00\x00\xcb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\xff\xa2\xff\xa0\xff\x9d\xff\x9e\xff\x9f\xff\x00\x00\xb1\xff\x8a\xff\x8a\xff\xa1\xff\xa0\xff\x99\xff\x91\xff\x8e\xff\x3f\xfd\x8f\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa0\xff\xa8\xff\xb2\xff\xcf\xff\xcc\xff\xd6\xff\xe6\xff\xe9\xfc\x00\x00\x00\x00\xce\xff\x00\x00\x00\x00\xa6\xfd\xa5\xfd\x00\x00\xa6\xfe\x00\x00\x1a\xff\x57\xff\x00\x00\x5d\xfe\x00\x00\x66\xfe\x93\xfe\x00\x00\x34\xfe\x35\xfd\x36\xfe\x37\xfe\x00\x00\x4e\xfe\x4b\xfe\x00\x00\x00\x00\x00\x00\xf8\xfe\xfb\xfe\x34\xff\x20\xff\x00\x00\x00\x00\x00\x00\x00\x00\x31\xff\xf7\xfe\xee\xfe\xf1\xfe\x00\x00\x2f\xff\xed\xfe\x00\x00\x15\xff\x42\xff\x3a\xff\x3a\xff\x00\x00\x00\x00\xb1\xfe\x00\x00\x00\x00\xd1\xfe\x00\x00\xdb\xfe\x7a\xff\x00\x00\xc4\xff\x8a\xff\x8a\xff\xc3\xff\x00\x00\x00\x00\x7d\xff\x86\xff\x7b\xff\x00\x00\xa0\xff\x00\x00\x00\x00\x02\xff\x01\xff\x39\xff\x46\xff\x44\xff\x00\x00\x3b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x27\xff\x2e\xff\xf2\xfe\x25\xff\x00\x00\x20\xff\x33\xff\x36\xff\x00\x00\x00\x00\xfc\xfe\x52\xfe\x00\x00\x00\x00\x4d\xfe\x51\xfe\x33\xfe\x00\x00\xc6\xfc\x00\x00\x00\x00\x96\xfe\x42\xfe\x8c\xfe\x8a\xfe\x45\xfe\x89\xfe\x00\x00\x00\x00\x00\x00\xf1\xfd\xc7\xff\xc8\xff\xc5\xff\x00\x00\xc6\xff\x00\x00\xcd\xff\xa6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9a\xff\x00\x00\x90\xff\x9b\xff\x9c\xff\x97\xff\xa3\xff\xae\xff\xaf\xff\xa0\xff\x00\x00\x96\xff\x94\xff\x93\xff\x92\xff\x3e\xfd\x3d\xfd\x3b\xfd\x3c\xfd\x00\x00\xd2\xff\xd0\xff\x00\x00\xe2\xff\x00\x00\xa7\xff\xa7\xff\x00\x00\xa4\xfd\x1b\xff\x8b\xfe\x00\x00\x44\xfe\xc4\xfc\x65\xfe\x4f\xfe\x4a\xfe\x4c\xfe\x00\x00\x7c\xfe\x00\x00\x1f\xff\x35\xff\x00\x00\xfd\xfe\x37\xff\x50\xfe\x3c\xfe\x27\xff\x3f\xff\x41\xff\x3c\xff\x3e\xff\x40\xff\x45\xff\xd5\xfe\xcf\xfe\x00\x00\xa0\xff\xba\xff\xb9\xff\x00\x00\x79\xff\x3d\xff\x50\xfe\x3c\xfe\x2d\xff\x3c\xfe\x7c\xfe\x00\x00\x48\xfe\x42\xfe\x46\xfe\xfb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xe5\xff\xe3\xff\x00\x00\xd5\xff\xd3\xff\x00\x00\x98\xff\xa4\xff\xa2\xff\x95\xff\xd4\xff\xd1\xff\xe4\xff\x00\x00\x00\x00\xe1\xff\x00\x00\x00\x00\x00\x00\x1e\xff\x2b\xff\x2c\xff\x3c\xfe\x78\xff\x2a\xff\xc9\xff\xca\xff\x00\x00\x00\x00\xe0\xff\xde\xff\xdf\xff"#--happyCheck :: HappyAddr-happyCheck = HappyA# "\xff\xff\x00\x00\x0d\x00\x3a\x00\x05\x00\x06\x00\x23\x00\x24\x00\x06\x00\x46\x00\x0f\x00\x10\x00\x0f\x00\x10\x00\x13\x00\x11\x00\x13\x00\x13\x00\x51\x00\x10\x00\x0c\x00\x0d\x00\x13\x00\x12\x00\x13\x00\x14\x00\x13\x00\x14\x00\x46\x00\x18\x00\x08\x00\x09\x00\x0a\x00\x47\x00\x1b\x00\x04\x00\x1d\x00\x5f\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x04\x00\x09\x00\x0a\x00\x04\x00\x08\x00\x09\x00\x0a\x00\x08\x00\x09\x00\x0a\x00\xa9\x00\x51\x00\x21\x00\x22\x00\x23\x00\x24\x00\x21\x00\x22\x00\x23\x00\x24\x00\x42\x00\x21\x00\x22\x00\x23\x00\x24\x00\xa8\x00\xa9\x00\x22\x00\x23\x00\x24\x00\x60\x00\xa6\x00\x23\x00\x24\x00\x5f\x00\x00\x00\x23\x00\x24\x00\x85\x00\x76\x00\x77\x00\x00\x00\x60\x00\x6e\x00\x14\x00\x51\x00\x13\x00\x13\x00\xd1\x00\x13\x00\x0a\x00\x19\x00\x36\x00\x51\x00\xe3\x00\x01\x00\x00\x00\x54\x00\xd1\x00\x3b\x00\x3c\x00\x54\x00\xa7\x00\x52\x00\x57\x00\x4b\x00\x4b\x00\x87\x00\x00\x00\x11\x00\x56\x00\x4d\x00\x00\x00\x31\x00\x32\x00\x0c\x00\x11\x00\x3b\x00\x3c\x00\x4b\x00\x25\x00\x35\x00\x11\x00\x35\x00\x36\x00\x2a\x00\x2b\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x00\x00\xb2\x00\x29\x00\x2a\x00\x2b\x00\xa7\x00\x4f\x00\x0c\x00\x6a\x00\x6f\x00\x4f\x00\x4e\x00\x4f\x00\x52\x00\x70\x00\x54\x00\x52\x00\x88\x00\x57\x00\x7f\x00\x76\x00\x88\x00\x61\x00\x1c\x00\x87\x00\x7e\x00\xb9\x00\xfe\x00\xff\x00\x00\x01\x01\x01\x28\x01\x61\x00\x61\x00\x74\x00\x75\x00\x45\x00\x69\x00\x7e\x00\xa7\x00\xb2\x00\x87\x00\x45\x00\x64\x00\x75\x00\x2a\x01\x52\x00\xa7\x00\x74\x00\x64\x00\x2d\x01\x56\x00\x78\x00\x69\x00\x6f\x00\x2a\x01\x33\x01\x2c\x01\x74\x00\x75\x00\x6f\x00\x65\x00\x74\x00\x75\x00\x64\x00\x24\x01\x2d\x01\x88\x00\x87\x00\x02\x01\x87\x00\x87\x00\x33\x01\x87\x00\x7f\x00\x80\x00\x64\x00\x73\x00\xf9\x00\xfa\x00\x64\x00\x0e\x01\x0f\x01\xfe\x00\x17\x01\x00\x01\x01\x01\x6f\x00\x09\x01\x0a\x01\x0b\x01\x1b\x01\x7f\x00\x18\x01\x21\x01\x1a\x00\x1b\x01\x21\x01\x1f\x01\x20\x01\x64\x00\x22\x01\x21\x01\x17\x01\x2d\x01\x26\x01\x5e\x00\x17\x01\x85\x00\x18\x01\x33\x01\x6f\x00\x1b\x01\x21\x01\xce\x00\x2e\x00\x2f\x00\x21\x01\x21\x01\xfc\x00\xfd\x00\x24\x01\x18\x01\x00\x01\x01\x01\x1b\x01\x03\x01\x09\x01\x0a\x01\x0b\x01\x1b\x01\x21\x01\xce\x00\x62\x00\x18\x01\x00\x00\x21\x01\x1b\x01\x2d\x01\x2d\x01\x2f\x01\x30\x01\x13\x01\x21\x01\x80\x00\x33\x01\x00\x00\x4b\x00\x19\x01\x1a\x01\x1b\x01\x1c\x01\x29\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x29\x01\x6c\x00\x80\x00\x29\x01\x31\x01\x70\x00\x31\x01\x31\x01\x87\x00\x29\x01\x99\x00\x2d\x01\x31\x01\x4b\x00\x31\x01\x21\x01\x31\x01\x33\x01\x77\x00\x2d\x01\x00\x00\x6f\x00\x34\x00\x52\x00\x21\x01\x33\x01\x2d\x01\x21\x01\x2f\x01\x30\x01\x2d\x01\x21\x01\x2f\x01\x30\x01\x21\x01\x2d\x01\x00\x00\x2f\x01\x30\x01\x1b\x01\x2d\x01\x81\x00\x2f\x01\x30\x01\x2d\x01\x21\x01\x2f\x01\x30\x01\x2d\x01\x6f\x00\x2f\x01\x30\x01\x07\x01\x70\x00\x09\x01\x4b\x00\x0b\x01\x07\x01\x9d\x00\x09\x01\x13\x00\x0b\x01\x07\x01\x1b\x01\x09\x01\x18\x01\x0b\x01\x1b\x01\x1b\x01\x21\x01\x19\x01\x1a\x01\x1b\x01\x21\x01\x21\x01\x19\x01\x1a\x01\x1b\x01\x21\x01\x52\x00\x19\x01\x1a\x01\x1b\x01\x21\x01\x64\x00\x39\x00\x19\x00\x02\x01\x21\x01\x3d\x00\x3e\x00\x3f\x00\x40\x00\x18\x01\x35\x00\x6f\x00\x1b\x01\x99\x00\x01\x00\x19\x00\x4a\x00\x4b\x00\x21\x01\x6a\x00\xfe\x00\xff\x00\x00\x01\x01\x01\x50\x00\x70\x00\x4d\x00\xac\x00\xad\x00\xae\x00\x52\x00\x87\x00\x58\x00\x59\x00\x15\x00\x2d\x00\x64\x00\x5d\x00\x8e\x00\x26\x01\x3f\x00\x40\x00\x62\x00\x93\x00\x94\x00\x95\x00\x96\x00\x6f\x00\x00\x00\x1b\x01\x18\x01\x65\x00\x64\x00\x1b\x01\x4e\x00\x21\x01\xad\x00\xae\x00\x24\x01\x21\x01\x70\x00\x66\x00\x71\x00\x6f\x00\xf9\x00\xfa\x00\x00\x00\x76\x00\x7c\x00\xfe\x00\x18\x01\x00\x01\x01\x01\x1b\x01\x4c\x00\x4e\x00\x7e\x00\x87\x00\x54\x00\x21\x01\x52\x00\x57\x00\x69\x00\x13\x00\x8e\x00\xbd\x00\x7f\x00\x03\x01\x70\x00\x93\x00\x94\x00\x95\x00\x96\x00\x1e\x00\x15\x01\x18\x01\x17\x01\x14\x00\x1b\x01\x6a\x00\x10\x01\x96\x00\x12\x01\x13\x01\x21\x01\x70\x00\x21\x01\x24\x01\x2d\x00\x70\x00\x70\x00\x70\x00\x1c\x01\x52\x00\x1e\x01\x1f\x01\x20\x01\x35\x00\x22\x01\x0c\x01\x0d\x01\x25\x01\x26\x01\xb3\x00\xb4\x00\xb5\x00\x31\x00\x32\x00\x33\x00\x62\x00\xba\x00\xbd\x00\x9d\x00\xbd\x00\x87\x00\x19\x00\xc0\x00\xc1\x00\x78\x00\x79\x00\xbd\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x39\x00\x64\x00\x2a\x01\x52\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x2d\x00\x2d\x01\x05\x01\x06\x01\x6f\x00\x08\x01\x09\x01\x33\x01\x0b\x01\x0c\x01\x0d\x01\x64\x00\x09\x01\x74\x00\x0b\x01\x50\x00\x4e\x00\x78\x00\x15\x01\x16\x01\x17\x01\x6c\x00\x6f\x00\x58\x00\x59\x00\x70\x00\x17\x01\x19\x00\x5d\x00\x2d\x01\x21\x01\xf2\x00\xf3\x00\x62\x00\x66\x00\x33\x01\x21\x01\x9c\x00\x9d\x00\x73\x00\x79\x00\xfc\x00\xfd\x00\x4b\x00\x70\x00\x00\x01\x01\x01\x2d\x00\x05\x01\x06\x01\x7e\x00\x08\x01\x09\x01\x4d\x00\x0b\x01\x0c\x01\x0d\x01\x05\x01\x06\x01\x7c\x00\x57\x00\x09\x01\x6a\x00\x0b\x01\x15\x01\x16\x01\x17\x01\x66\x00\x70\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x15\x01\x4e\x00\x17\x01\x21\x01\x70\x00\x21\x01\x4b\x00\x23\x01\x24\x01\x6a\x00\x96\x00\x27\x01\x21\x01\x9c\x00\x9d\x00\x70\x00\x69\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\x76\x00\x1f\x00\x99\x00\x15\x01\x7a\x00\x17\x01\x74\x00\x66\x00\x9c\x00\x9d\x00\x78\x00\x19\x00\x4a\x00\x4b\x00\x1e\x00\x21\x01\x2e\x00\x2f\x00\xf9\x00\xfa\x00\xb3\x00\xb4\x00\xb5\x00\xfe\x00\x39\x00\x00\x01\x01\x01\xba\x00\xbd\x00\x2d\x00\xbd\x00\x2d\x00\x62\x00\xc0\x00\xc1\x00\x1e\x00\x1e\x00\x53\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x4f\x00\x6f\x00\x4f\x00\x50\x00\x53\x00\x18\x01\x2d\x00\x2d\x00\x1b\x01\x65\x00\x9c\x00\x9d\x00\x62\x00\x69\x00\x21\x01\x6b\x00\x5d\x00\x24\x01\x9c\x00\x9d\x00\x15\x01\x62\x00\x17\x01\x99\x00\x74\x00\x6f\x00\x67\x00\x68\x00\x78\x00\x87\x00\xf9\x00\xfa\x00\x21\x01\x62\x00\x62\x00\xfe\x00\x8e\x00\x00\x01\x01\x01\xf2\x00\xf3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x62\x00\x6f\x00\x6f\x00\x69\x00\xfc\x00\xfd\x00\x3f\x00\x40\x00\x00\x01\x01\x01\x62\x00\x05\x01\x06\x01\x6f\x00\x74\x00\x09\x01\x18\x01\x0b\x01\x78\x00\x1b\x01\x9c\x00\x9d\x00\x61\x00\x6f\x00\x15\x01\x21\x01\x17\x01\x15\x01\x24\x01\x17\x01\x4e\x00\x4f\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x21\x01\x62\x00\xbd\x00\x21\x01\x15\x01\x21\x01\x17\x01\x23\x01\x24\x01\x9c\x00\x9d\x00\x27\x01\xee\x00\xef\x00\x6f\x00\x69\x00\x21\x01\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x39\x00\x74\x00\x61\x00\xba\x00\x63\x00\x78\x00\xbd\x00\x62\x00\x62\x00\xc0\x00\xc1\x00\xa4\x00\xa5\x00\xa6\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x6f\x00\x6f\x00\x4f\x00\x50\x00\x66\x00\x15\x01\x55\x00\x17\x01\x3f\x00\x40\x00\x19\x01\x1a\x01\x1b\x01\x15\x01\x70\x00\x17\x01\x5d\x00\x21\x01\x21\x01\xfc\x00\xfd\x00\x62\x00\x53\x00\x00\x01\x01\x01\x21\x01\x67\x00\x68\x00\x17\x01\x05\x01\x06\x01\x30\x00\x08\x01\x09\x01\x55\x00\x0b\x01\x0c\x01\x0d\x01\x21\x01\xf2\x00\xf3\x00\x7e\x00\x3b\x00\x3c\x00\x4c\x00\x15\x01\x16\x01\x17\x01\x7e\x00\xfc\x00\xfd\x00\x6c\x00\x54\x00\x00\x01\x01\x01\x70\x00\x87\x00\x21\x01\x23\x01\x24\x01\x15\x01\x8c\x00\x17\x01\x8e\x00\x87\x00\x7f\x00\x89\x00\x8a\x00\x93\x00\x94\x00\x95\x00\x96\x00\x21\x01\xfe\x00\xff\x00\x00\x01\x01\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\xfe\x00\xff\x00\x00\x01\x01\x01\x15\x01\x21\x01\x17\x01\x23\x01\x24\x01\x6a\x00\x74\x00\x27\x01\x4e\x00\x4f\x00\x78\x00\x70\x00\x21\x01\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x39\x00\x6a\x00\x1b\x01\xba\x00\xbd\x00\x24\x01\xbd\x00\x70\x00\x21\x01\xc0\x00\xc1\x00\x24\x01\x70\x00\x24\x01\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x1b\x01\x4d\x00\x2d\x01\xa4\x00\xa5\x00\xa6\x00\x21\x01\x6c\x00\x33\x01\x1b\x01\x65\x00\x70\x00\x58\x00\x59\x00\x5a\x00\x21\x01\x5d\x00\x23\x01\x24\x01\x5f\x00\x15\x01\x62\x00\x17\x01\x65\x00\xed\x00\xee\x00\xef\x00\x69\x00\x4f\x00\x6b\x00\x6b\x00\x52\x00\x21\x01\xfe\x00\xff\x00\x00\x01\x01\x01\x71\x00\x74\x00\xf2\x00\xf3\x00\x75\x00\x76\x00\x25\x01\x26\x01\x79\x00\x7a\x00\x6c\x00\x2a\x01\xfc\x00\xfd\x00\x70\x00\x18\x01\x00\x01\x01\x01\x1b\x01\x05\x01\x06\x01\x99\x00\x08\x01\x09\x01\x21\x01\x0b\x01\x0c\x01\x0d\x01\x2d\x00\x2e\x00\x8f\x00\x19\x01\x1a\x01\x1b\x01\x24\x01\x15\x01\x16\x01\x17\x01\x2d\x01\x21\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x33\x01\x4e\x00\x4f\x00\x21\x01\x15\x01\x21\x01\x17\x01\x23\x01\x24\x01\x02\x00\x03\x00\x27\x01\xfe\x00\xff\x00\x00\x01\x01\x01\x21\x01\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x39\x00\x1b\x01\x2d\x01\xba\x00\x02\x00\x03\x00\xbd\x00\x21\x01\x33\x01\xc0\x00\xc1\x00\xa4\x00\xa5\x00\xa6\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x26\x01\x4d\x00\x70\x00\x87\x00\x2a\x01\x24\x01\x55\x00\x19\x01\x1a\x01\x1b\x01\x56\x00\x99\x00\x58\x00\x59\x00\x2d\x01\x21\x01\x5d\x00\x95\x00\x96\x00\x5f\x00\x33\x01\x62\x00\xf7\x00\xf8\x00\x2e\x01\xfa\x00\x1a\x01\x1b\x01\x32\x01\xfe\x00\x6b\x00\x00\x01\x01\x01\x21\x01\x23\x00\x23\x01\x24\x01\xf0\x00\xf1\x00\xf2\x00\xf3\x00\x75\x00\x76\x00\x2e\x01\x2e\x01\x79\x00\x7a\x00\x32\x01\x32\x01\xfc\x00\xfd\x00\x6c\x00\x6d\x00\x00\x01\x01\x01\x18\x01\x87\x00\xbd\x00\x1b\x01\x1f\x01\x20\x01\x8c\x00\x22\x01\x8e\x00\x21\x01\x6c\x00\x6d\x00\x24\x01\x93\x00\x94\x00\x95\x00\x96\x00\x69\x00\xfe\x00\xff\x00\x00\x01\x01\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\xfe\x00\xff\x00\x00\x01\x01\x01\x7e\x00\x21\x01\x18\x01\x23\x01\x24\x01\x1b\x01\x4f\x00\x27\x01\x99\x00\x52\x00\x4b\x00\x21\x01\x3a\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x61\x00\x39\x00\x63\x00\xba\x00\xbd\x00\x24\x01\xbd\x00\xbb\x00\xbc\x00\xc0\x00\xc1\x00\x6f\x00\x70\x00\x24\x01\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x4c\x00\x99\x00\x2d\x01\x05\x01\x06\x01\x35\x00\x08\x01\x09\x01\x33\x01\x0b\x01\x0c\x01\x0d\x01\x61\x00\x06\x01\x63\x00\x99\x00\x09\x01\x5d\x00\x0b\x01\x15\x01\x16\x01\x17\x01\x62\x00\x63\x00\x64\x00\xbb\x00\xbc\x00\xf9\x00\xfa\x00\x87\x00\x13\x00\x21\x01\xfe\x00\x62\x00\x00\x01\x01\x01\x8e\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x46\x00\x47\x00\x48\x00\x49\x00\xfc\x00\xfd\x00\xbb\x00\xbc\x00\x00\x01\x01\x01\x6f\x00\x05\x01\x06\x01\x18\x01\x08\x01\x09\x01\x1b\x01\x0b\x01\x0c\x01\x0d\x01\x1f\x00\x06\x01\x21\x01\x4b\x00\x09\x01\x24\x01\x0b\x01\x15\x01\x16\x01\x17\x01\x43\x00\x44\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x65\x00\x02\x01\xbd\x00\x21\x01\x69\x00\x21\x01\x6b\x00\x23\x01\x24\x01\x74\x00\x6f\x00\x27\x01\x70\x00\x0e\x01\x0f\x01\x74\x00\x65\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\x4e\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x61\x00\x39\x00\x63\x00\xba\x00\x1f\x01\x20\x01\xbd\x00\x22\x01\x87\x00\xc0\x00\xc1\x00\x26\x01\x71\x00\x72\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x4c\x00\xb7\x00\xb8\x00\xb9\x00\x58\x00\x59\x00\x5a\x00\x4d\x00\x56\x00\x4f\x00\x52\x00\x5f\x00\x54\x00\x19\x01\x1a\x01\x1b\x01\x4f\x00\x5d\x00\x58\x00\x59\x00\x5a\x00\x21\x01\x62\x00\x63\x00\x64\x00\x5f\x00\x2b\x01\x2c\x01\x05\x01\x06\x01\x54\x00\x08\x01\x09\x01\x75\x00\x0b\x01\x0c\x01\x0d\x01\x79\x00\x4b\x00\xf2\x00\xf3\x00\x0c\x01\x0d\x01\x71\x00\x15\x01\x16\x01\x17\x01\x75\x00\x76\x00\xfc\x00\xfd\x00\x79\x00\x7a\x00\x00\x01\x01\x01\x4b\x00\x21\x01\x87\x00\x58\x00\x59\x00\x5a\x00\x61\x00\x8c\x00\x63\x00\x8e\x00\x5f\x00\x1a\x01\x1b\x01\x4b\x00\x93\x00\x94\x00\x95\x00\x96\x00\x21\x01\x4b\x00\x23\x01\x24\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x11\x00\x19\x01\x1a\x01\x1b\x01\x52\x00\x21\x01\x75\x00\x23\x01\x24\x01\x21\x01\x57\x00\x27\x01\x1e\x01\x1f\x01\x20\x01\x4b\x00\x22\x01\x2d\x01\x2e\x01\x2f\x01\x30\x01\x45\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x39\x00\x6c\x00\x6d\x00\xba\x00\xbd\x00\x61\x00\xbd\x00\x63\x00\x7e\x00\xc0\x00\xc1\x00\xf1\x00\xf2\x00\x4d\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xa0\x00\xa1\x00\x4f\x00\x50\x00\x58\x00\x59\x00\x5a\x00\x61\x00\x65\x00\x63\x00\x54\x00\x5f\x00\x69\x00\xe1\x00\x6b\x00\xe3\x00\x5d\x00\x19\x01\x1a\x01\x1b\x01\x6a\x00\x62\x00\x6a\x00\x74\x00\x6a\x00\x21\x01\x67\x00\x78\x00\x70\x00\x87\x00\xb7\x00\xb8\x00\xb9\x00\x75\x00\x76\x00\x6a\x00\x8e\x00\x79\x00\x7a\x00\xf2\x00\xf3\x00\x93\x00\x94\x00\x95\x00\x96\x00\x9f\x00\xa0\x00\xa1\x00\x6a\x00\xfc\x00\xfd\x00\x36\x00\x37\x00\x00\x01\x01\x01\x6a\x00\x05\x01\x06\x01\x70\x00\x08\x01\x09\x01\x4e\x00\x0b\x01\x0c\x01\x0d\x01\x4b\x00\x52\x00\x19\x01\x1a\x01\x1b\x01\x70\x00\x0d\x00\x15\x01\x16\x01\x17\x01\x21\x01\x66\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x6a\x00\x6a\x00\xbd\x00\x21\x01\x61\x00\x21\x01\x63\x00\x23\x01\x24\x01\x91\x00\x8f\x00\x27\x01\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x61\x00\x39\x00\x63\x00\xba\x00\x8f\x00\x61\x00\xbd\x00\x63\x00\x8f\x00\xc0\x00\xc1\x00\x5a\x00\x5b\x00\x5c\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x4c\x00\x61\x00\x4d\x00\x63\x00\x6c\x00\x1f\x01\x20\x01\x66\x00\x22\x01\x54\x00\x70\x00\x56\x00\x26\x01\x58\x00\x59\x00\x5a\x00\x2a\x01\x5d\x00\x6a\x00\x61\x00\x5f\x00\x63\x00\x62\x00\x63\x00\xdf\x00\xe0\x00\xe1\x00\x7f\x00\xe3\x00\x05\x01\x06\x01\x4b\x00\x08\x01\x09\x01\x4b\x00\x0b\x01\x0c\x01\x0d\x01\x71\x00\xf2\x00\xf3\x00\x4b\x00\x75\x00\x76\x00\x54\x00\x15\x01\x16\x01\x17\x01\x0d\x00\xfc\x00\xfd\x00\x6f\x00\xfa\x00\x00\x01\x01\x01\x52\x00\xfe\x00\x21\x01\x00\x01\x01\x01\xaf\x00\xb0\x00\xb1\x00\x71\x00\x04\x01\x05\x01\x06\x01\x15\x00\x61\x00\x09\x01\x63\x00\x0b\x01\x1e\x01\x1f\x01\x20\x01\x71\x00\x22\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x15\x01\x18\x01\x17\x01\x6a\x00\x1b\x01\x21\x01\x6a\x00\x23\x01\x24\x01\x6a\x00\x21\x01\x27\x01\x21\x01\x24\x01\x61\x00\xbd\x00\x63\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\x6a\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x39\x00\xc9\x00\xca\x00\xba\x00\xcc\x00\x61\x00\xbd\x00\x63\x00\x71\x00\xc0\x00\xc1\x00\xaf\x00\xb0\x00\xb1\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xaf\x00\xb0\x00\xb1\x00\xaf\x00\xb0\x00\xb1\x00\x6a\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\x61\x00\xfa\x00\x63\x00\x71\x00\x5d\x00\xfe\x00\x6c\x00\x00\x01\x01\x01\x62\x00\xf2\x00\xf3\x00\x04\x01\x05\x01\x06\x01\x6a\x00\x6c\x00\x09\x01\x6b\x00\x0b\x01\xfc\x00\xfd\x00\x6a\x00\x6a\x00\x00\x01\x01\x01\x62\x00\xf2\x00\xf3\x00\x5f\x00\x6f\x00\x18\x01\x0c\x00\x34\x00\x1b\x01\x19\x00\x58\x00\xfc\x00\xfd\x00\x4e\x00\x21\x01\x00\x01\x01\x01\x24\x01\x70\x00\xaf\x00\xb0\x00\xb1\x00\x71\x00\x19\x01\x1a\x01\x1b\x01\xaf\x00\xb0\x00\xb1\x00\x70\x00\x6a\x00\x21\x01\x6a\x00\x23\x01\x24\x01\x6a\x00\x6a\x00\x27\x01\x6a\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\xaf\x00\xb0\x00\xb1\x00\x6a\x00\x4b\x00\x21\x01\x6a\x00\x23\x01\x24\x01\x6a\x00\x6a\x00\x27\x01\xaf\x00\xb0\x00\xb1\x00\x66\x00\x62\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x39\x00\x70\x00\x70\x00\xba\x00\x4f\x00\x54\x00\xbd\x00\x70\x00\x17\x00\xc0\x00\xc1\x00\x4d\x00\x54\x00\x70\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\x52\x00\xfa\x00\x6a\x00\x56\x00\x62\x00\xfe\x00\x6a\x00\x00\x01\x01\x01\x57\x00\x70\x00\x4e\x00\x5d\x00\x4f\x00\x4b\x00\x87\x00\x4b\x00\x62\x00\x4e\x00\x4b\x00\x7f\x00\x4e\x00\x8e\x00\x66\x00\x4b\x00\x71\x00\x6b\x00\x93\x00\x94\x00\x95\x00\x96\x00\x18\x01\x6a\x00\x6a\x00\x1b\x01\xf2\x00\xf3\x00\x71\x00\x52\x00\x57\x00\x21\x01\x70\x00\x4e\x00\x24\x01\x19\x00\xfc\x00\xfd\x00\x4e\x00\x6a\x00\x00\x01\x01\x01\xfb\x00\x87\x00\xfd\x00\x19\x00\x4f\x00\x00\x01\x8c\x00\x1a\x00\x8e\x00\x4b\x00\x74\x00\x7e\x00\x7e\x00\x93\x00\x94\x00\x95\x00\x96\x00\x4b\x00\xbd\x00\x16\x00\x0c\x00\x69\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x6f\x00\x4b\x00\x4b\x00\x18\x01\x7e\x00\x21\x01\x1b\x01\x23\x01\x24\x01\x66\x00\x19\x00\x27\x01\x21\x01\x62\x00\x23\x01\x24\x01\x70\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x39\x00\x71\x00\x4e\x00\xba\x00\xbd\x00\x5f\x00\xbd\x00\x4e\x00\x52\x00\xc0\x00\xc1\x00\x4e\x00\x4e\x00\x4e\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x1e\x01\x1f\x01\x20\x01\x70\x00\x22\x01\x19\x00\x4f\x00\x25\x01\x26\x01\x54\x00\x19\x00\x5f\x00\x2a\x01\x07\x00\x4f\x00\x57\x00\x5d\x00\x87\x00\x4b\x00\x05\x01\x06\x01\x62\x00\x08\x01\x09\x01\x8e\x00\x0b\x01\x0c\x01\x0d\x01\x52\x00\x93\x00\x94\x00\x95\x00\x96\x00\x66\x00\x7b\x00\x15\x01\x16\x01\x17\x01\x54\x00\xf2\x00\xf3\x00\x6f\x00\x5f\x00\x6f\x00\x7f\x00\x52\x00\x62\x00\x21\x01\x6a\x00\xfc\x00\xfd\x00\x66\x00\x39\x00\x00\x01\x01\x01\x88\x00\x05\x01\x06\x01\x69\x00\x08\x01\x09\x01\x19\x00\x0b\x01\x0c\x01\x0d\x01\x19\x00\x6a\x00\x6a\x00\x6f\x00\x88\x00\x58\x00\xbd\x00\x15\x01\x16\x01\x17\x01\x19\x00\x87\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x52\x00\x2d\x00\x6f\x00\x21\x01\x70\x00\x21\x01\x4f\x00\x23\x01\x24\x01\x4b\x00\x4b\x00\x27\x01\x62\x00\x19\x00\x4d\x00\x4e\x00\x5f\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\xb3\x00\xb4\x00\xb5\x00\xb6\x00\x58\x00\x59\x00\x5a\x00\xba\x00\x07\x00\x87\x00\xbd\x00\x5f\x00\x07\x00\xc0\x00\xc1\x00\x19\x00\x5f\x00\x4e\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x66\x00\x7e\x00\x4b\x00\x19\x00\x4b\x00\x71\x00\x6f\x00\x19\x00\x02\x00\x75\x00\x76\x00\x4e\x00\x1a\x00\x79\x00\x7a\x00\x4f\x00\x54\x00\x05\x01\x06\x01\x4d\x00\x08\x01\x09\x01\x11\x00\x0b\x01\x0c\x01\x0d\x01\x23\x00\x33\x00\x56\x00\x88\x00\x58\x00\x59\x00\x5a\x00\x15\x01\x16\x01\x17\x01\x1a\x00\x5f\x00\x07\x00\xf2\x00\xf3\x00\x56\x00\x09\x00\x7f\x00\x6a\x00\x21\x01\x69\x00\x4d\x00\x65\x00\xfc\x00\xfd\x00\x69\x00\x57\x00\x00\x01\x01\x01\xba\x00\x52\x00\x2e\x00\xbd\x00\x75\x00\x76\x00\xc0\x00\xc1\x00\x79\x00\x7a\x00\x70\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x6f\x00\x6a\x00\x4e\x00\x6f\x00\x45\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x62\x00\x62\x00\x5f\x00\x69\x00\x62\x00\x21\x01\x4e\x00\x23\x01\x24\x01\x87\x00\x6a\x00\x27\x01\x88\x00\x5f\x00\x8c\x00\x7f\x00\x8e\x00\x2d\x01\x2e\x01\x2f\x01\x30\x01\x93\x00\x94\x00\x95\x00\x96\x00\x57\x00\x6a\x00\x6a\x00\x6a\x00\x6a\x00\xf2\x00\xf3\x00\x02\x00\x4b\x00\x87\x00\x52\x00\x52\x00\x6a\x00\x69\x00\x70\x00\xfc\x00\xfd\x00\x19\x00\x07\x00\x00\x01\x01\x01\x70\x00\x6a\x00\x83\x00\x84\x00\x6a\x00\x19\x00\x87\x00\x07\x00\x4e\x00\x8a\x00\x8b\x00\x8c\x00\x19\x00\x8e\x00\x8f\x00\x07\x00\x19\x00\xbd\x00\x93\x00\x94\x00\x95\x00\x96\x00\x18\x01\x19\x01\x1a\x01\x1b\x01\x4d\x00\x4d\x00\x4e\x00\x4f\x00\x75\x00\x21\x01\x52\x00\x23\x01\x24\x01\x75\x00\x30\x00\x27\x01\x58\x00\x59\x00\x5a\x00\x84\x00\x2a\x01\x57\x00\x87\x00\x5f\x00\xcd\x00\x41\x00\x8b\x00\x8c\x00\xe8\x00\x38\x00\x8f\x00\xe8\x00\xe8\x00\x31\x00\x93\x00\x94\x00\x95\x00\x96\x00\xbd\x00\x7d\x00\x32\x00\x71\x00\x29\x01\x28\x01\x0b\x01\x75\x00\x76\x00\x29\x01\x84\x00\x79\x00\x7a\x00\x87\x00\x7a\x00\x7a\x00\x57\x00\x8b\x00\x8c\x00\x9e\x00\x7e\x00\x8f\x00\xdb\x00\x7e\x00\x2a\x01\x93\x00\x94\x00\x95\x00\x96\x00\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\x82\x00\x0b\x01\x0c\x01\x0d\x01\xbd\x00\xcb\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x15\x01\x16\x01\x17\x01\x84\x00\xc3\x00\x29\x01\x87\x00\x16\x00\xf2\x00\x29\x01\x8b\x00\x8c\x00\x21\x01\x16\x00\x8f\x00\x28\x01\x30\x00\x03\x00\x93\x00\x94\x00\x95\x00\x96\x00\xbd\x00\xe3\x00\xdb\x00\x66\x00\x28\x01\x05\x01\x06\x01\x2e\x01\x08\x01\x09\x01\x52\x00\x0b\x01\x0c\x01\x0d\x01\x28\x01\x28\x01\x41\x00\xf2\x00\xf3\x00\x2e\x01\x6a\x00\x15\x01\x16\x01\x17\x01\xf2\x00\x53\x00\x73\x00\xfc\x00\xfd\x00\x70\x00\x7b\x00\x00\x01\x01\x01\x21\x01\x28\x01\x24\x01\x34\x00\x16\x00\xbd\x00\x16\x00\x2c\x00\x20\x00\x7a\x00\x05\x01\x06\x01\x2d\x01\x08\x01\x09\x01\x7a\x00\x0b\x01\x0c\x01\x0d\x01\x20\x00\xf2\x00\x33\x00\x61\x00\x19\x01\x1a\x01\x1b\x01\x15\x01\x16\x01\x17\x01\x45\x00\x5c\x00\x21\x01\x69\x00\x23\x01\x24\x01\x65\x00\x6e\x00\x27\x01\x21\x01\x05\x01\x06\x01\x2c\x00\x08\x01\x09\x01\x0e\x00\x0b\x01\x0c\x01\x0d\x01\xa3\x00\x20\x00\x2d\x01\x28\x01\x20\x00\xc3\x00\x6e\x00\x15\x01\x16\x01\x17\x01\xf2\x00\xe3\x00\xa3\x00\xfc\x00\xfd\x00\xb1\x00\xa1\x00\x00\x01\x01\x01\x21\x01\x48\x00\x29\x01\x17\x00\x17\x00\x35\x00\x49\x00\x43\x00\x57\x00\x28\x01\x05\x01\x06\x01\x2d\x01\x08\x01\x09\x01\x4e\x00\x0b\x01\x0c\x01\x0d\x01\x4d\x00\x28\x01\x2e\x01\xaa\x00\x19\x01\x1a\x01\x1b\x01\x15\x01\x16\x01\x17\x01\x84\x00\x28\x01\x21\x01\x87\x00\x23\x01\x24\x01\x1c\x00\x8b\x00\x8c\x00\x21\x01\x1c\x00\x8f\x00\x26\x00\x29\x01\xbd\x00\x93\x00\x94\x00\x95\x00\x96\x00\x0b\x00\x29\x01\x2d\x01\x29\x01\x2e\x01\xc7\x00\xc8\x00\xc9\x00\xca\x00\x54\x00\x84\x00\x57\x00\x52\x00\x87\x00\x28\x01\x28\x01\x16\x00\x8b\x00\x8c\x00\x29\x01\x28\x01\x8f\x00\x28\x01\x28\x01\x54\x00\x93\x00\x94\x00\x95\x00\x96\x00\x16\x00\x20\x00\x20\x00\x29\x01\xa3\x00\xa3\x00\x29\x01\xe6\x00\xe7\x00\xbd\x00\x84\x00\xff\xff\x29\x01\x87\x00\x17\x00\x17\x00\x29\x01\x8b\x00\x8c\x00\xf2\x00\xf3\x00\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xff\xff\xbd\x00\x84\x00\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\xff\xff\xff\xff\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\x19\x01\x1a\x01\x1b\x01\xff\xff\xf2\x00\xff\xff\xff\xff\x4d\x00\x21\x01\xbd\x00\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\x05\x01\x06\x01\x5f\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\x6a\x00\xff\xff\xbd\x00\x15\x01\x16\x01\x17\x01\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x87\x00\xf2\x00\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x92\x00\xff\xff\xff\xff\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\x2d\x01\x87\x00\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\x91\x00\x92\x00\xff\xff\xff\xff\x95\x00\x96\x00\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xbd\x00\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\x87\x00\x15\x01\x16\x01\x17\x01\xab\x00\xff\xff\x8d\x00\xff\xff\xff\xff\x90\x00\x91\x00\x92\x00\xff\xff\x21\x01\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\x8b\x00\x8c\x00\xab\x00\x8e\x00\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\x4d\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\x15\x01\x16\x01\x17\x01\xff\xff\x5f\x00\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\xff\xff\x6a\x00\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\x70\x00\x0b\x01\x0c\x01\x0d\x01\x2e\x01\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x2e\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x2e\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\xff\xff\xff\xff\x8a\x00\x8b\x00\x8c\x00\xff\xff\x8e\x00\x8f\x00\x21\x01\xff\xff\xbd\x00\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x01\xff\xff\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\x8b\x00\x8c\x00\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\x8c\x00\xf2\x00\xf3\x00\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\xff\xff\xff\xff\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\x19\x01\x1a\x01\x1b\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\x21\x01\xbd\x00\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\x4d\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x2d\x01\xff\xff\x58\x00\x59\x00\x5a\x00\x15\x01\x16\x01\x17\x01\x87\x00\x5f\x00\xff\xff\xff\xff\x8b\x00\x8c\x00\xff\xff\xff\xff\x8f\x00\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x71\x00\xff\xff\x2d\x01\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\x87\x00\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\xff\xff\xff\xff\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\xff\xff\xff\xff\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\xff\xff\xff\xff\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x87\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\x8f\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xbd\x00\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x21\x01\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x8f\x00\x2d\x01\xff\xff\x02\x00\x93\x00\x94\x00\x95\x00\x96\x00\x21\x01\x98\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2d\x01\x87\x00\x88\x00\x16\x00\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xbd\x00\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xbd\x00\xff\xff\xff\xff\x9a\x00\x9b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\x73\x00\x74\x00\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x7e\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\x22\x01\xff\xff\xff\xff\x25\x01\x26\x01\x03\x01\xff\xff\xff\xff\x2a\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x10\x01\xff\xff\x12\x01\x13\x01\xf2\x00\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\x20\x01\xff\xff\x22\x01\x21\x01\xff\xff\x25\x01\x26\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\x2a\x01\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\x10\x01\x21\x01\x12\x01\x13\x01\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\x2a\x01\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\x20\x01\xff\xff\x22\x01\xff\xff\x83\x00\x25\x01\x26\x01\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\x02\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\x83\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x16\x00\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\x1c\x00\x1d\x00\x1e\x00\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xbd\x00\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x83\x00\xff\xff\xff\xff\xff\xff\x87\x00\xf2\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xbd\x00\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x4d\x00\x4e\x00\xf2\x00\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x21\x01\x5f\x00\x73\x00\x74\x00\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\x2a\x01\x0b\x01\x0c\x01\x0d\x01\x7e\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x15\x01\x16\x01\x17\x01\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x83\x00\xff\xff\xff\xff\x86\x00\x87\x00\xff\xff\xf2\x00\x8a\x00\x21\x01\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x83\x00\xff\xff\xff\xff\x86\x00\x87\x00\xff\xff\xff\xff\x8a\x00\x21\x01\x8c\x00\xff\xff\x8e\x00\xff\xff\xbd\x00\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\x83\x00\xff\xff\xff\xff\x86\x00\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\x10\x01\xff\xff\x12\x01\x13\x01\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\x20\x01\xbd\x00\x22\x01\x83\x00\xff\xff\x25\x01\x26\x01\x87\x00\xff\xff\xf2\x00\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xf2\x00\x8c\x00\x21\x01\x8e\x00\xff\xff\xff\xff\xff\xff\xbd\x00\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\x99\x00\x9a\x00\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xf2\x00\x8c\x00\xff\xff\x8e\x00\x21\x01\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\x99\x00\x9a\x00\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\x21\x01\xff\xff\xff\xff\xbd\x00\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x9a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\x10\x01\x8e\x00\x12\x01\x13\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\x1c\x01\x9a\x00\x1e\x01\x1f\x01\x20\x01\xbd\x00\x22\x01\xff\xff\xff\xff\x25\x01\x26\x01\x87\x00\x88\x00\xff\xff\x8a\x00\xf2\x00\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\x9b\x00\xff\xff\xff\xff\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\x87\x00\x88\x00\xf2\x00\x8a\x00\xff\xff\x8c\x00\x21\x01\x8e\x00\xff\xff\xbd\x00\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x9a\x00\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\xff\xff\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xf2\x00\x8e\x00\x21\x01\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x9a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\x21\x01\xbd\x00\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xf2\x00\x8c\x00\xff\xff\x8e\x00\x02\x00\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\x16\x00\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xf2\x00\xff\xff\x2c\x00\x21\x01\xff\xff\xff\xff\xbd\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xa2\x00\xff\xff\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xa2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa2\x00\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xa2\x00\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xa2\x00\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xa2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\x88\x00\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xa2\x00\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xfb\x00\xff\xff\xfd\x00\xff\xff\xff\xff\x00\x01\xbd\x00\xff\xff\x03\x01\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\x0f\x01\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x18\x01\xf2\x00\xff\xff\x1b\x01\xff\xff\xff\xff\xbd\x00\x1f\x01\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\x8a\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8c\x00\xbd\x00\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xf2\x00\x93\x00\x94\x00\x95\x00\x96\x00\xbd\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xbd\x00\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\x21\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\x8e\x00\x0b\x01\x0c\x01\x0d\x01\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x21\x01\xff\xff\xff\xff\x87\x00\xff\xff\xbd\x00\xff\xff\x15\x01\x16\x01\x17\x01\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\x21\x01\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\xff\xff\xbd\x00\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x8e\x00\xff\xff\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x05\x01\x06\x01\xbd\x00\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\x21\x01\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\xff\xff\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\x8e\x00\xff\xff\x21\x01\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xbd\x00\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xbd\x00\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x8e\x00\xff\xff\xff\xff\xbd\x00\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\x8e\x00\x0b\x01\x0c\x01\x0d\x01\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x21\x01\xbd\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\x15\x01\x16\x01\x17\x01\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\x21\x01\x87\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xff\xff\xff\xff\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\xff\xff\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\xbd\x00\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\x21\x01\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x15\x01\x16\x01\x17\x01\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\x05\x01\x06\x01\xff\xff\x08\x01\x09\x01\xff\xff\x0b\x01\x0c\x01\x0d\x01\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\x15\x01\x16\x01\x17\x01\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\x73\x00\x74\x00\x75\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x7e\x00\xff\xff\x4d\x00\x4e\x00\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\x64\x00\x65\x00\x79\x00\x7a\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\x43\x00\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x4d\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\x54\x00\xff\xff\x56\x00\x44\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x6a\x00\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\x65\x00\x79\x00\x7a\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\x14\x00\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x4d\x00\x4e\x00\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\x4a\x00\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\x65\x00\x79\x00\x7a\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\x14\x00\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\x66\x00\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\x4e\x00\x4f\x00\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\x17\x00\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\x17\x00\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\xff\xff\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xff\xff\xfa\x00\xff\xff\xff\xff\xff\xff\xfe\x00\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\x59\x00\x18\x01\xff\xff\xff\xff\x1b\x01\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\x22\x01\x65\x00\x24\x01\xff\xff\x26\x01\x69\x00\xff\xff\x6b\x00\x2a\x01\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x0a\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\x6e\x00\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x0a\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x0a\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\x66\x00\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x02\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\x0a\x00\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\x73\x00\xff\xff\xff\xff\x97\x00\x98\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x7e\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7e\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x7e\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\x02\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\x71\x00\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\x01\x00\x02\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\x71\x00\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\xff\xff\x7a\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\x13\x00\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x69\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x02\x00\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x69\x00\x02\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x69\x00\x02\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x65\x00\x02\x00\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\x02\x00\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\x4c\x00\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\x69\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\xff\xff\x77\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\xff\xff\x77\x00\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\x02\x00\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\x0a\x00\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x13\x00\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x65\x00\xff\xff\x2c\x00\xff\xff\x69\x00\x02\x00\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x65\x00\xff\xff\x2c\x00\xff\xff\x69\x00\x02\x00\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x65\x00\xff\xff\x2c\x00\xff\xff\x69\x00\x02\x00\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\x0a\x00\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x61\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x70\x00\xff\xff\x2c\x00\x73\x00\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xbd\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xbd\x00\xbe\x00\xbf\x00\x73\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xd0\x00\xff\xff\xe6\x00\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x69\x00\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\x11\x01\x12\x01\x27\x01\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x2c\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x2c\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xd0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xff\xff\xff\xff\x2a\x01\xff\xff\x2c\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xdc\x00\xdd\x00\xde\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\x19\x01\x1a\x01\x1b\x01\xd3\x00\xd4\x00\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\x28\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xff\xff\xff\xff\xd2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xff\xff\xff\xff\xd2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x01\x12\x01\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\x1e\x01\xff\xff\x20\x01\x21\x01\x22\x01\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xd6\x00\xd7\x00\xd8\x00\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xd9\x00\xda\x00\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xdc\x00\xdd\x00\xde\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xd9\x00\xda\x00\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xdc\x00\xdd\x00\xde\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xe1\x00\xe2\x00\xe3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xeb\x00\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xd8\x00\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xe5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xde\x00\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xe4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xbe\x00\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xff\xff\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xff\xff\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xff\xff\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xbd\x00\xff\xff\xbf\x00\xff\xff\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xbd\x00\xff\xff\x00\x01\x01\x01\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xbd\x00\xff\xff\xfc\x00\xfd\x00\xc1\x00\xff\xff\x00\x01\x01\x01\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xbd\x00\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xbd\x00\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xbd\x00\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xbd\x00\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xbd\x00\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xbd\x00\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xbd\x00\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xbd\x00\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x00\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xc7\x00\xc8\x00\xc9\x00\xca\x00\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xf3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xfd\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#--happyTable :: HappyAddr-happyTable = HappyA# "\x00\x00\x6f\x00\x84\x05\x90\x02\x42\x05\x43\x05\x9c\x04\x94\x04\x86\x05\x4b\x04\x8f\x04\x8c\x04\x8b\x04\x8c\x04\x8d\x04\x0b\x01\x8d\x04\x0c\x01\x5a\x03\x26\x05\x3f\x05\x40\x05\x8d\x04\x0d\x01\x0e\x01\x0f\x01\x2d\x00\x2e\x00\x8d\x05\x10\x01\x10\x02\x11\x02\x12\x02\xf9\x04\x2f\x00\x88\x05\x30\x00\xf1\x02\x89\x05\xad\x04\x11\x02\x12\x02\xac\x04\x11\x02\xc9\x03\x22\x05\xad\x04\x11\x02\x12\x02\xad\x04\x11\x02\x12\x02\x72\x05\xfb\x03\x91\x04\x92\x04\x93\x04\x94\x04\x65\x05\x92\x04\x93\x04\x94\x04\x67\x04\x69\x05\x92\x04\x93\x04\x94\x04\x70\x04\x71\x04\x81\x05\x82\x05\x94\x04\x2a\x03\x51\x05\x32\x05\x94\x04\x2c\x03\x0e\x02\x27\x05\x94\x04\xa0\x02\x23\x01\x24\x01\x0e\x02\x46\x04\x52\x03\x6c\x04\x5a\x05\xc0\xff\xc0\xff\x8d\x03\xc0\xff\xf3\x04\x55\x03\x8f\x04\x6c\x05\x60\x02\x43\x03\x0e\x02\x84\x03\x7c\x02\x84\x02\x85\x02\x84\x03\x5b\x03\xc4\xfc\x97\xfe\x03\x03\xb3\x02\x34\x00\x0e\x02\x78\x01\xb0\x02\x80\x00\x0e\x02\x6d\x04\x6e\x04\x0b\x01\x53\x01\x84\x02\x85\x02\x63\x03\x9d\x04\xc0\xff\xdc\x04\xc0\xff\x8f\x04\x9e\x04\x9f\x04\x36\x05\x37\x05\x38\x05\x39\x05\x9f\x04\x0e\x02\xc4\x04\x83\x05\x39\x05\x9f\x04\xfc\x03\x79\x05\x34\x01\x67\x01\x04\x03\x95\xfe\x5e\x03\xc4\xfc\x95\xfe\x68\x01\x59\x03\xd4\x02\x06\x01\x97\xfe\xb1\x02\x8b\x00\x06\x01\x37\x00\x35\x01\x05\x01\xb4\x02\x53\x03\x69\x01\xc8\x04\x72\x00\x1c\x01\x61\x02\x12\x01\x33\x00\x26\x04\x27\x04\x54\x01\x6f\x04\x64\x03\x5b\x05\x68\x04\x34\x00\x54\x01\x0f\x02\x7a\x05\x7d\x02\xb7\x01\x6d\x05\x63\x00\x0f\x02\xec\x01\x25\x03\x66\x00\xf4\x04\x10\x02\x7d\x02\x72\x04\x7e\x02\x42\x04\x27\x04\xa6\x03\x76\x01\xf5\x04\x27\x04\x0f\x02\x1f\x01\xec\x01\x06\x01\x05\x01\x91\x02\x34\x00\x34\x00\x72\x04\x34\x00\x30\x03\x31\x03\x0f\x02\x44\x03\x25\x01\x26\x01\x0f\x02\x92\x02\x93\x02\x1b\x01\x4c\x04\x72\x00\x1c\x01\x7b\x03\x69\x04\x6a\x04\x46\x00\xf2\x02\x26\x03\x21\x02\x4c\x00\x0e\x03\x1e\x01\x11\x00\xd6\x01\x79\x00\x0f\x02\x7a\x00\x11\x00\x4c\x04\xec\x01\x94\x02\x2d\x01\xfa\x04\x20\x02\x1d\x01\x5c\x03\x79\x03\x1e\x01\x4c\x00\x87\x02\x0f\x03\x10\x03\x4c\x00\x11\x00\x70\x00\x71\x00\x1f\x01\x2b\x03\x72\x00\x73\x00\x1e\x01\x74\x00\x69\x04\x6a\x04\x46\x00\xf2\x02\x11\x00\x86\x02\x41\xfe\x2b\x03\xff\xff\x11\x00\x1e\x01\x95\x04\xec\x01\x96\x04\x97\x04\x75\x00\x11\x00\x37\x03\x5c\x03\x0e\x02\xff\x02\x0e\x00\x0f\x00\x10\x00\x76\x00\x41\x05\x77\x00\x78\x00\x79\x00\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x44\x05\x9b\x01\x20\x04\x44\x05\x31\x00\x68\x01\x31\x00\x31\x00\x05\x01\x41\x05\xff\xff\xec\x01\x31\x00\xfa\x02\x31\x00\x13\x02\x31\x00\x5c\x03\x1e\x03\xec\x01\x0e\x02\x00\x03\xfe\x01\x32\x02\x13\x02\x5c\x03\x95\x04\x13\x02\x96\x04\x97\x04\x95\x04\x13\x02\x96\x04\x97\x04\x13\x02\x95\x04\x0e\x02\x96\x04\x97\x04\x28\x04\x95\x04\x4a\x01\x96\x04\x97\x04\x95\x04\x11\x00\x96\x04\x97\x04\x95\x04\xfb\x02\x96\x04\x97\x04\xa0\x04\x33\x02\xa1\x04\xe3\x02\x46\x00\xa0\x04\x17\x04\xa1\x04\x03\x02\x46\x00\xa0\x04\x28\x04\xa1\x04\x32\x03\x46\x00\x28\x04\x1e\x01\x11\x00\xa2\x04\x0f\x00\x10\x00\x11\x00\x11\x00\xa2\x04\x0f\x00\x10\x00\x11\x00\x65\x01\xa2\x04\x0f\x00\x10\x00\x11\x00\x0f\x02\xcd\x00\xbb\xff\xee\x02\x11\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\x21\x02\x04\x02\xd7\x04\x1e\x01\xff\xff\x34\x00\x14\x01\xfe\x04\xfc\x04\x11\x00\xc4\x02\x2e\x01\x2f\x01\x72\x00\x1c\x01\xe8\x00\x68\x01\x80\x00\xe9\x01\xea\x01\xeb\x01\xe4\x03\x37\x00\xe9\x00\xea\x00\x35\x00\x13\x01\x0f\x02\xeb\x00\xe4\x02\x94\x02\x17\x03\x18\x03\xce\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\xcd\x04\x0e\x02\x30\x01\x32\x03\xfd\x02\x0f\x02\x1e\x01\xbc\x03\x11\x00\x88\x04\xeb\x01\x1f\x01\x11\x00\xe5\x03\x2d\x04\xf0\x02\xac\x04\x25\x01\x26\x01\x0e\x02\x8b\x00\xec\x00\x1b\x01\x32\x03\x72\x00\x1c\x01\x1e\x01\x76\x02\x7f\x03\xfe\x02\x37\x00\xf9\x01\x11\x00\x77\x02\x97\xfe\xbb\xff\xb0\x04\xe4\x02\x40\x00\x2e\x04\x4b\x01\x80\x03\x36\x01\x3d\x00\x3e\x00\x3f\x00\x01\x02\xf4\x01\x1d\x01\x4b\x00\x42\x01\x1e\x01\x47\x02\x4c\x01\xee\x01\x4d\x01\x4e\x01\x11\x00\x2b\x02\x4c\x00\x1f\x01\x00\x02\x80\x03\x78\x02\xc4\xfc\x76\x00\xb7\x01\x77\x00\x78\x00\x79\x00\xb1\x04\x7a\x00\x8d\x02\x48\x00\x7d\x00\x7e\x00\xed\x00\xee\x00\xef\x00\x43\x01\x44\x01\x45\x01\xad\x03\xf0\x00\x40\x00\x52\x05\x8e\x00\x05\x01\x12\x01\xf1\x00\xd1\x00\x27\x01\x28\x01\x40\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xcd\x00\x0f\x02\xe3\x01\x65\x01\x88\x03\xe5\x00\xe6\x00\xe7\x00\x13\x01\xec\x01\x42\x00\x43\x00\x7b\x03\x44\x00\x45\x00\xed\x01\x46\x00\x47\x00\x48\x00\x0f\x02\xda\x01\x06\x02\x46\x00\xe8\x00\xfb\x01\x07\x02\x49\x00\x4a\x00\x4b\x00\x80\x02\x60\x05\xe9\x00\xea\x00\x68\x01\xdb\x01\xee\x04\xeb\x00\xec\x01\x4c\x00\x9e\x00\x9f\x00\xce\x00\x26\x02\xed\x01\x4c\x00\xf2\x01\xf3\x01\xa9\x01\x20\x03\xa0\x00\x71\x00\xf2\x01\x27\x02\x72\x00\x73\x00\x13\x01\x42\x00\x43\x00\xaa\x01\x44\x00\x45\x00\x80\x00\x46\x00\x47\x00\x48\x00\x42\x00\x43\x00\xec\x00\xfa\x01\x45\x00\x2d\x02\x46\x00\x49\x00\x4a\x00\x4b\x00\x2f\x04\x2e\x02\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x49\x00\xf7\x01\x4b\x00\x4c\x00\x30\x04\x11\x00\xf1\x01\x7b\x00\x7c\x00\x67\x01\x53\x02\xa2\x00\x4c\x00\x1e\x02\xf3\x01\x68\x01\xe2\x02\xf2\x00\xf3\x00\xf4\x00\xf5\x00\x8b\x00\x08\x02\xff\xff\xf4\x01\x8e\x00\x4b\x00\x63\x00\xa0\x01\x80\x03\xf3\x01\x66\x00\xed\x04\xfb\x04\xfc\x04\xff\x01\x4c\x00\x09\x02\x0a\x02\x29\x01\x26\x01\xed\x00\xee\x00\xef\x00\x1b\x01\xcd\x00\x72\x00\x1c\x01\xf0\x00\x40\x00\x00\x02\x8e\x00\x13\x01\x18\x02\xf1\x00\xd1\x00\x34\x05\x33\x05\x8c\xfd\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xf5\x02\x10\x02\x4f\x04\x50\x04\xf6\x02\x1d\x01\x00\x02\x00\x02\x1e\x01\x85\x01\x55\x03\xf3\x01\xa5\x03\x86\x01\x11\x00\x87\x01\xeb\x00\x1f\x01\x3a\x03\xf3\x01\xf4\x01\xce\x00\x4b\x00\xff\xff\x63\x00\xa6\x03\x51\x04\x56\x04\x66\x00\x37\x00\x29\x01\x26\x01\x4c\x00\x7a\x03\x78\x03\x1b\x01\xe4\x02\x72\x00\x1c\x01\x9e\x00\x9f\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\xd6\x04\x7b\x03\x79\x03\x6f\x04\xa0\x00\x71\x00\x17\x03\x18\x03\x72\x00\x73\x00\xcc\x04\x42\x00\x43\x00\xd7\x04\x63\x00\x45\x00\x1d\x01\x46\x00\x66\x00\x1e\x01\xf9\x03\xf3\x01\xbd\x01\xcd\x04\xf4\x01\x11\x00\x4b\x00\x49\x00\x1f\x01\x4b\x00\x3e\x03\x3f\x03\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x4c\x00\xab\x04\x40\x00\x4c\x00\xf4\x01\x11\x00\x4b\x00\x7b\x00\x7c\x00\x14\x05\xf3\x01\xa2\x00\xd1\x03\x56\x02\xac\x04\xe2\x02\x4c\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\x53\x04\xcd\x00\x63\x00\xae\x01\xf0\x00\xaf\x01\x66\x00\x8e\x00\xf7\x04\x5f\x05\xa4\x02\xd1\x00\xca\x04\xc6\x04\xc7\x04\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x7b\x03\x60\x05\x4f\x04\x50\x04\x7b\x05\xf4\x01\x47\x01\x4b\x00\x17\x03\x18\x03\x57\x02\x0f\x00\x10\x00\xf4\x01\x7c\x05\x4b\x00\xeb\x00\x4c\x00\x11\x00\x2c\x05\x71\x00\xce\x00\xbc\x01\x72\x00\x73\x00\x4c\x00\x51\x04\x52\x04\x62\x05\x42\x00\x43\x00\x12\x03\x44\x00\x45\x00\xbb\x01\x46\x00\x47\x00\x48\x00\x4c\x00\x9e\x00\x9f\x00\xab\x01\x13\x03\x14\x03\xe6\x03\x49\x00\x4a\x00\x4b\x00\xa8\x01\xa0\x00\x71\x00\x8d\x02\xc6\x02\x72\x00\x73\x00\x68\x01\x37\x00\x4c\x00\x7b\x00\x7c\x00\xf4\x01\x48\x01\x4b\x00\x49\x01\x05\x01\x81\x01\x07\x01\x08\x01\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x4c\x00\x69\x01\x2f\x01\x72\x00\x1c\x01\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x69\x01\xc8\x04\x72\x00\x1c\x01\xf4\x01\x11\x00\x4b\x00\x7b\x00\x7c\x00\x2a\x02\x06\x02\xa2\x00\x0a\x05\x0b\x05\x07\x02\x2b\x02\x4c\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\x53\x04\xcd\x00\x7e\x05\x35\x02\xf0\x00\x40\x00\x1f\x01\x8e\x00\x7f\x05\x11\x00\xa4\x02\xd1\x00\x2e\x03\x7e\x01\x1f\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x2f\x03\x80\x00\xec\x01\xc5\x04\xc6\x04\xc7\x04\x11\x00\x4a\x02\xc9\x04\x35\x02\x76\x01\x2b\x02\x81\x00\x82\x00\x83\x00\x11\x00\xeb\x00\xc8\x01\x7c\x00\x84\x00\x1d\x02\xce\x00\x4b\x00\x85\x00\x54\x02\x55\x02\x56\x02\x32\x01\xd3\x02\x87\x00\xa9\x02\xd4\x02\x4c\x00\x69\x01\x6a\x01\x72\x00\x1c\x01\x51\x01\x89\x00\x9e\x00\x9f\x00\x8a\x00\x8b\x00\xcb\x01\x7e\x00\x8d\x00\x8e\x00\x2f\x02\xcc\x01\xa0\x00\x71\x00\x2b\x02\x1e\x04\x72\x00\x73\x00\x1e\x01\x42\x00\x43\x00\xff\xff\x44\x00\x45\x00\x11\x00\x46\x00\x47\x00\x48\x00\x80\x04\x81\x04\x83\x02\x57\x02\x0f\x00\x10\x00\x1f\x01\x49\x00\x4a\x00\x4b\x00\xec\x01\x11\x00\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x23\x02\x0a\x05\x58\x05\x4c\x00\x0e\x04\x11\x00\x4b\x00\x7b\x00\x7c\x00\xfe\x01\xfc\x01\xa2\x00\x69\x01\xc8\x04\x72\x00\x1c\x01\x4c\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\xa3\x02\xcd\x00\x41\x04\xec\x01\xf0\x00\xfb\x01\xfc\x01\x8e\x00\x11\x00\xbd\x04\xa4\x02\xd1\x00\x4f\x05\xc6\x04\xc7\x04\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\xb5\x02\x55\x00\x12\xfd\x37\x00\xcc\x01\x1f\x01\xc8\x02\x0e\x00\x0f\x00\x10\x00\x8f\x02\xff\xff\x57\x00\x58\x00\xec\x01\x11\x00\xeb\x00\xf7\x01\x3f\x00\x5a\x00\xc9\x04\xce\x00\x6d\x03\x6f\x01\xcc\x03\x70\x01\xc7\x01\x10\x00\xcd\x03\x1b\x01\xa1\x02\x72\x00\x1c\x01\x11\x00\x47\x01\xc8\x01\x7c\x00\xaa\x02\xa7\x02\xa8\x02\x9f\x00\x64\x00\x65\x00\xcc\x03\xcc\x03\x67\x00\x68\x00\x89\x04\x4d\x05\xa0\x00\x71\x00\x79\x01\xb1\x01\x72\x00\x73\x00\x1d\x01\x37\x00\x40\x00\x1e\x01\x37\x02\x79\x00\x48\x01\x7a\x00\x49\x01\x11\x00\x79\x01\x7a\x01\x1f\x01\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x46\x01\x69\x01\x69\x03\x72\x00\x1c\x01\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x69\x01\xc8\x04\x72\x00\x1c\x01\x2d\x01\x11\x00\xee\x03\x7b\x00\x7c\x00\x1e\x01\x9d\xfe\xa2\x00\xff\xff\x9d\xfe\xcd\x04\x11\x00\x19\x01\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\xa3\x02\x7c\x01\xcd\x00\x7d\x01\xf0\x00\x40\x00\x1f\x01\x8e\x00\x78\x01\x74\x01\xa4\x02\xd1\x00\x2a\x01\x2b\x01\x1f\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x59\x04\xff\xff\xec\x01\x42\x00\x43\x00\x17\x01\x44\x00\x45\x00\xc9\x04\x46\x00\x47\x00\x48\x00\xae\x01\xe0\x02\xaf\x01\xff\xff\x45\x00\xeb\x00\x46\x00\x49\x00\x4a\x00\x4b\x00\xce\x00\x5a\x04\x60\x04\x76\x01\x74\x01\x1f\x03\x26\x01\x37\x00\x16\x01\x4c\x00\x1b\x01\x12\x03\x72\x00\x1c\x01\xce\x04\xa6\x02\xa7\x02\xa8\x02\x9f\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x3c\x01\x3d\x01\x3e\x01\x3f\x01\xa0\x00\x71\x00\x73\x01\x74\x01\x72\x00\x73\x00\x0c\x02\x42\x00\x43\x00\x1d\x01\x44\x00\x45\x00\x1e\x01\x46\x00\x47\x00\x48\x00\x0b\x03\x2e\x05\x11\x00\x09\x03\x45\x00\x1f\x01\x46\x00\x49\x00\x4a\x00\x4b\x00\x3f\x01\x40\x01\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x85\x00\x91\x02\x40\x00\x4c\x00\x32\x01\x11\x00\x87\x00\x7b\x00\x7c\x00\x63\x00\xc4\xfc\xa2\x00\x01\x03\xe8\x03\x93\x02\x89\x00\xf9\x02\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf1\x02\xed\x00\xee\x00\xa2\x02\x5c\x04\x8c\x01\xcd\x00\x8d\x01\xf0\x00\xd6\x01\x79\x00\x8e\x00\x7a\x00\x05\x01\xa4\x02\xd1\x00\x94\x02\xf6\x02\xf7\x02\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x59\x04\x07\x03\xd0\x02\xd1\x02\x81\x00\x82\x00\x83\x00\x80\x00\x5e\x03\x41\x04\xb7\x01\x84\x00\xde\x03\x72\x01\x0f\x00\x10\x00\xe7\x02\xeb\x00\x81\x00\x82\x00\x83\x00\x11\x00\xce\x00\x5a\x04\x5b\x04\x84\x00\x65\x03\x66\x03\x42\x00\x43\x00\xf9\x01\x44\x00\x45\x00\x8a\x00\x46\x00\x47\x00\x48\x00\x8d\x00\xdf\x02\x9e\x00\x9f\x00\x8d\x02\x48\x00\x51\x01\x49\x00\x4a\x00\x4b\x00\x8a\x00\x8b\x00\xa0\x00\x71\x00\x8d\x00\x8e\x00\x72\x00\x73\x00\xde\x02\x4c\x00\x37\x00\x81\x00\x82\x00\x83\x00\x7c\x01\x5f\x03\x7d\x01\x60\x03\x84\x00\xbc\x02\x10\x00\xdd\x02\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x11\x00\xdc\x02\xc8\x01\x7c\x00\xd2\x00\xa1\x00\x0f\x00\xd3\x00\xdb\x02\xb1\x02\x0f\x00\x10\x00\xd7\x02\x11\x00\x8a\x00\x7b\x00\x7c\x00\x11\x00\xd5\x02\xa2\x00\xca\x01\x9b\x01\x79\x00\x07\x05\x7a\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\x54\x01\xed\x00\xee\x00\xa2\x02\x5c\x04\xcd\x00\x79\x01\x08\x04\xf0\x00\x40\x00\x70\x02\x8e\x00\x71\x02\xc7\x02\xa4\x02\xd1\x00\xf2\x03\xf3\x03\x80\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x57\x04\x4c\x03\x4f\x04\x50\x04\x81\x00\x82\x00\x83\x00\x15\x04\x85\x00\x16\x04\xc6\x02\x84\x00\x2e\x05\x5c\x02\x87\x00\xb5\x01\xeb\x00\xae\x02\x0f\x00\x10\x00\xc3\x02\xce\x00\x67\x01\x89\x00\x49\x02\x11\x00\x03\x05\x8c\x00\x68\x01\x37\x00\xcf\x02\xd0\x02\xd1\x02\x8a\x00\x8b\x00\xc1\x02\xe4\x02\x8d\x00\x8e\x00\x9e\x00\x9f\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x4a\x03\x4b\x03\x4c\x03\xfe\xfc\xa0\x00\x71\x00\xf0\x04\xf1\x04\x72\x00\x73\x00\x48\x02\x42\x00\x43\x00\xbc\x02\x44\x00\x45\x00\xbb\x02\x46\x00\x47\x00\x48\x00\xb9\x02\xb8\x02\xab\x02\x0f\x00\x10\x00\xb7\x02\x65\x02\x49\x00\x4a\x00\x4b\x00\x11\x00\xe9\x01\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x8c\x02\x8b\x02\x40\x00\x4c\x00\x0d\x04\x11\x00\x0e\x04\x7b\x00\x7c\x00\x8a\x02\x89\x02\xa2\x00\xe9\x02\xea\x02\xeb\x02\xec\x02\xed\x02\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\x53\x04\x7c\x01\xcd\x00\x7d\x01\xf0\x00\x84\x02\xc8\x03\x8e\x00\xc9\x03\x82\x02\xa4\x02\xd1\x00\x3f\x03\x40\x03\x41\x03\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x59\x04\x65\x04\x80\x00\x66\x04\x7c\x02\x37\x02\x79\x00\x75\x02\x7a\x00\x96\x02\x74\x02\x97\x02\xb5\x02\x81\x00\x82\x00\x83\x00\xcc\x01\xeb\x00\x79\x02\x45\x04\x84\x00\x46\x04\xce\x00\x0b\x05\xda\x03\xdb\x03\xdc\x03\x6d\x02\xb5\x01\x42\x00\x43\x00\x6c\x02\x44\x00\x45\x00\x6b\x02\x46\x00\x47\x00\x48\x00\x98\x02\x9e\x00\x9f\x00\x6a\x02\x8a\x00\x8b\x00\x66\x02\x49\x00\x4a\x00\x4b\x00\x65\x02\xa0\x00\x71\x00\x64\x02\x1a\x01\x72\x00\x73\x00\xb7\x01\x1b\x01\x4c\x00\x72\x00\x1c\x01\xff\x03\x00\x04\x01\x04\x4c\x02\x81\x01\x82\x01\x43\x00\x5c\x02\xeb\x04\x45\x00\xec\x04\x46\x00\xca\x01\x9b\x01\x79\x00\x4b\x02\x7a\x00\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x83\x01\x1d\x01\x4b\x00\x49\x02\x1e\x01\x11\x00\x48\x02\x7b\x00\x7c\x00\x46\x02\x11\x00\xa2\x00\x4c\x00\x1f\x01\xde\x04\x8e\x00\xdf\x04\xf2\x00\xf3\x00\xf4\x00\xf5\x00\x45\x02\xed\x00\xee\x00\xa2\x02\x5c\x04\xcd\x00\x89\x03\x99\x00\xf0\x00\x8a\x03\x9b\x04\x8e\x00\x9c\x04\x35\x02\xa4\x02\xd1\x00\x73\x04\x00\x04\x01\x04\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x66\x04\x00\x04\x01\x04\xba\x04\x00\x04\x01\x04\x44\x02\x6b\x01\x6c\x01\x6d\x01\x6e\x01\x6f\x01\xeb\x04\x70\x01\xec\x04\x34\x02\xeb\x00\x1b\x01\x31\x02\x72\x00\x1c\x01\xce\x00\x9e\x00\x9f\x00\x6a\x03\x82\x01\x43\x00\x2c\x02\x30\x02\x45\x00\xe3\x04\x46\x00\xa0\x00\x71\x00\x29\x02\x28\x02\x72\x00\x73\x00\x25\x02\x9e\x00\x9f\x00\x20\x02\x0c\x02\x1d\x01\x0b\x01\xfe\x01\x1e\x01\xc0\x03\xbf\x03\xa0\x00\x71\x00\xbe\x03\x11\x00\x72\x00\x73\x00\x1f\x01\xbb\x03\x6e\x05\x00\x04\x01\x04\xb5\x03\x94\x01\x0f\x00\x10\x00\x8f\x05\x00\x04\x01\x04\xb4\x03\xb3\x03\x11\x00\xdf\xfc\x7b\x00\x7c\x00\xfd\xfc\xe8\xfc\xa2\x00\xe6\xfc\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x8e\x05\x00\x04\x01\x04\xe7\xfc\x02\x05\x11\x00\xfc\xfc\x7b\x00\x7c\x00\xe0\xfc\xe1\xfc\xa2\x00\x92\x05\x00\x04\x01\x04\xb2\x03\xb1\x03\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\xa3\x02\xcd\x00\x33\x02\xb0\x03\xf0\x00\xaf\x03\xac\x03\x8e\x00\xab\x03\xaa\x03\xa4\x02\xd1\x00\xa3\x03\x99\x03\x68\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x6c\x03\x6d\x01\x6e\x01\x6f\x01\xc0\x02\x70\x01\x2c\x02\x01\x05\x87\x03\x1b\x01\x28\x02\x72\x00\x1c\x01\x85\x03\x86\x03\x83\x03\xeb\x00\x7c\x03\x77\x03\x37\x00\x76\x03\xce\x00\x75\x03\x71\x03\x74\x03\x72\x03\xe4\x02\x73\x03\x6c\x03\x69\x03\xe2\x04\x36\x01\x3d\x00\x3e\x00\x3f\x00\x1d\x01\x70\x03\x6f\x03\x1e\x01\x9e\x00\x9f\x00\x68\x03\x65\x01\x5a\x03\x11\x00\x11\xfd\x57\x03\x1f\x01\x4f\x03\xa0\x00\x71\x00\x4a\x03\x48\x03\x72\x00\x73\x00\xd0\x01\x37\x00\xd1\x01\x46\x03\x3c\x03\xd2\x01\x5f\x03\x28\x03\x60\x03\x1d\x03\x89\x00\x2d\x01\x23\x03\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x1c\x03\x40\x00\x1b\x03\x0b\x01\xc5\x03\xd2\x00\xa1\x00\x0f\x00\xd3\x00\xe8\x03\x31\x04\x6b\x05\xd5\x01\x33\x04\x11\x00\x1e\x01\x7b\x00\x7c\x00\x2c\x04\x26\x04\xa2\x00\x11\x00\x24\x04\x7b\x00\x7c\x00\x23\x04\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\xa3\x02\xcd\x00\x22\x04\x20\x04\xf0\x00\x40\x00\x1d\x04\x8e\x00\x08\xfd\x1b\x04\xa4\x02\xd1\x00\x07\xfd\x09\xfd\x1e\x04\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\xca\x01\x9b\x01\x79\x00\x11\x04\x7a\x00\x55\x03\x0b\x04\xcb\x01\x7e\x00\x06\x04\x05\x04\x08\x04\xcc\x01\x03\x04\xff\x03\xfb\x03\xeb\x00\x37\x00\xf9\x03\x42\x00\x43\x00\xce\x00\x44\x00\x45\x00\xe4\x02\x46\x00\x47\x00\x48\x00\xc0\x02\x36\x01\x3d\x00\x3e\x00\x3f\x00\xf7\x03\x69\x00\x49\x00\x4a\x00\x4b\x00\xed\x03\x9e\x00\x9f\x00\xe8\x03\xee\x03\xdf\x03\xd8\x03\x32\x02\xd9\x03\x4c\x00\xd0\x03\xa0\x00\x71\x00\xcf\x03\xcd\x00\x72\x00\x73\x00\x06\x01\x42\x00\x43\x00\xc5\x03\x44\x00\x45\x00\x99\x04\x46\x00\x47\x00\x48\x00\x91\x04\x8b\x04\x88\x04\x64\x02\x06\x01\x86\x04\x40\x00\x49\x00\x4a\x00\x4b\x00\x55\x03\x05\x01\xd2\x00\xa1\x00\x0f\x00\xd3\x00\xb7\x01\x82\x04\x39\x04\x4c\x00\x7a\x04\x11\x00\x7c\x03\x7b\x00\x7c\x00\x79\x04\x78\x04\xa2\x00\xce\x00\x05\x04\x80\x00\x7f\x01\x77\x04\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xed\x00\xee\x00\xa2\x02\xf1\x03\x81\x00\x82\x00\x83\x00\xf0\x00\x03\x04\x05\x01\x8e\x00\x84\x00\x03\x04\xa4\x02\xd1\x00\x4f\x04\x44\x04\x49\x04\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xa5\x02\x40\x04\x3f\x04\x3c\x04\x3d\x04\x3b\x04\x51\x01\x39\x04\x3a\x04\xe9\x04\x8a\x00\x8b\x00\xe6\x04\xe5\x04\x8d\x00\x8e\x00\xe1\x04\xe0\x04\x42\x00\x43\x00\x29\x05\x44\x00\x45\x00\xd9\x04\x46\x00\x47\x00\x48\x00\xd4\x04\x45\x01\x2a\x05\x06\x01\x81\x00\x82\x00\x83\x00\x49\x00\x4a\x00\x4b\x00\xbd\x04\x84\x00\x03\x04\x9e\x00\x9f\x00\x5c\x05\xb3\x04\xb4\x04\xa9\x04\x4c\x00\x32\x05\x1f\x05\x24\x05\xa0\x00\x71\x00\x26\x05\x1d\x05\x72\x00\x73\x00\xcf\x00\x14\x05\x1e\x05\x8e\x00\x8a\x00\x2b\x05\xd0\x00\xd1\x00\x8d\x00\x2c\x05\x13\x05\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x10\x05\x12\x05\x0f\x05\x0e\x05\x54\x01\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x0d\x05\x68\x05\x64\x05\x67\x05\x5e\x05\x11\x00\x4a\x03\x7b\x00\x7c\x00\x37\x00\x65\x05\xa2\x00\x06\x01\x4d\x05\x5f\x03\x48\x05\x60\x03\xf2\x00\xf3\x00\xf4\x00\xf5\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x4c\x05\x3f\x05\x3e\x05\x3d\x05\x3c\x05\x9e\x00\x9f\x00\x7d\x05\x76\x05\x05\x01\x72\x05\x5c\xfe\x81\x05\xc5\x03\x36\x05\xa0\x00\x71\x00\x05\x04\x03\x04\x72\x00\x73\x00\x80\x05\x6b\x05\xc9\x02\x98\x02\x92\x05\x05\x04\x37\x00\x03\x04\xbe\x03\x51\x02\x99\x02\xca\x02\x8d\x05\x3b\x00\x9b\x02\x03\x04\x8c\x05\x40\x00\xcb\x02\x3d\x00\x3e\x00\x3f\x00\xd2\x00\xa1\x00\x0f\x00\xd3\x00\x97\x05\x80\x00\x50\x01\xaf\xfe\x98\x05\x11\x00\xaf\xfe\x7b\x00\x7c\x00\x9a\x05\x09\x01\xa2\x00\x81\x00\x82\x00\x83\x00\x98\x02\xc9\x01\x51\x01\x37\x00\x84\x00\x8a\x01\x3a\x01\x99\x02\x9a\x02\xb8\x01\x7f\x01\x9b\x02\xb0\x01\xac\x01\x17\x01\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x40\x00\x32\x01\x09\x03\x51\x01\x0c\x03\x0d\x03\x04\x03\x8a\x00\x8b\x00\x0b\x03\x2d\x03\x8d\x00\x8e\x00\x37\x00\x01\x03\xfb\x02\xc7\x02\x99\x02\x9a\x02\xd5\x02\xed\x02\x9b\x02\x6e\x02\xe7\x02\xdf\x01\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x42\x00\x43\x00\x8e\x00\x44\x00\x45\x00\xb9\x02\x46\x00\x47\x00\x48\x00\x40\x00\x80\x02\xa1\x01\x96\x00\x97\x00\x98\x00\x99\x00\x49\x00\x4a\x00\x4b\x00\xef\x03\x62\x02\x07\x02\x37\x00\xc2\x03\xcc\x02\x04\x02\x99\x02\x9a\x02\x4c\x00\xc1\x03\x9b\x02\x0c\x02\x12\x03\xc0\x03\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x40\x00\x60\x02\xad\x03\x4d\x03\xa6\x03\x42\x00\x43\x00\x57\x03\x44\x00\x45\x00\x48\x03\x46\x00\x47\x00\x48\x00\x87\x03\x7d\x03\x46\x03\x9e\x00\x9f\x00\x57\x03\x44\x03\x49\x00\x4a\x00\x4b\x00\x9d\x02\x3c\x03\x26\x03\xa0\x00\x71\x00\x23\x03\x21\x03\x72\x00\x73\x00\x4c\x00\x7c\x03\x2e\x03\x19\x03\x18\x03\x40\x00\x15\x03\x37\x04\x36\x04\x35\x04\x42\x00\x43\x00\x9e\x02\x44\x00\x45\x00\x34\x04\x46\x00\x47\x00\x48\x00\x33\x04\x9d\x02\x31\x04\x24\x04\xa1\x00\x0f\x00\x10\x00\x49\x00\x4a\x00\x4b\x00\x19\x04\x16\x04\x11\x00\x13\x04\x7b\x00\x7c\x00\x0b\x04\x09\x04\xa2\x00\x4c\x00\x42\x00\x43\x00\xe6\x03\x44\x00\x45\x00\xc6\x03\x46\x00\x47\x00\x48\x00\x03\x04\xc5\x03\x9e\x02\xdf\x03\xc3\x03\x86\x04\x84\x04\x49\x00\x4a\x00\x4b\x00\x9d\x02\x60\x02\x74\x04\x90\x01\x71\x00\x6f\x04\x58\x04\x72\x00\x73\x00\x4c\x00\x4d\x04\x3d\x04\xec\x04\xe9\x04\xe7\x04\xdc\x04\xc3\x04\xda\x04\xd9\x04\x42\x00\x43\x00\x9e\x02\x44\x00\x45\x00\xd7\x04\x46\x00\x47\x00\x48\x00\xd2\x04\xd4\x04\xc2\x04\xbb\x04\x91\x01\x0f\x00\x10\x00\x49\x00\x4a\x00\x4b\x00\x47\x04\xb1\x04\x11\x00\x37\x00\x7b\x00\x7c\x00\xa9\x04\x99\x02\x9a\x02\x4c\x00\x99\x04\x9b\x02\x30\x05\x2f\x05\x8e\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x24\x05\x21\x05\x9e\x02\x20\x05\x57\x03\xa3\x01\x97\x00\x98\x00\x99\x00\x08\x05\xe1\x04\x00\x05\x59\x05\x37\x00\x10\x05\xf7\x04\x46\x05\x99\x02\x9a\x02\xef\x04\x68\x05\x9b\x02\x61\x05\x60\x05\x56\x05\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x45\x05\x77\x05\x76\x05\x87\x05\x6f\x05\x90\x05\x85\x05\x71\x02\x72\x02\x40\x00\x58\x05\x00\x00\x95\x05\x37\x00\x94\x05\x93\x05\x98\x05\x99\x02\x9a\x02\x9e\x00\x9f\x00\x9b\x02\x00\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x00\x00\x40\x00\x50\x05\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x99\x02\x9a\x02\x00\x00\x00\x00\x9b\x02\x00\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x9d\x02\x00\x00\x00\x00\x80\x00\x11\x00\x40\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x81\x00\x82\x00\x83\x00\x00\x00\x00\x00\x42\x00\x43\x00\x84\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x9d\x02\x00\x00\x00\x00\x67\x01\x00\x00\x40\x00\x49\x00\x4a\x00\x4b\x00\x68\x01\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x8b\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x37\x00\x9d\x02\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x4a\x05\x00\x00\x00\x00\x19\x05\x3f\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x9d\x02\x9e\x02\x37\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x73\x05\x18\x05\x00\x00\x00\x00\x19\x05\x3f\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x40\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x00\x00\x00\x00\x37\x00\x49\x00\x4a\x00\x4b\x00\x74\x05\x00\x00\x15\x05\x00\x00\x00\x00\x16\x05\x17\x05\x18\x05\x00\x00\x4c\x00\x19\x05\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x1b\x02\xea\x03\xca\x02\x1a\x05\x3b\x00\x9b\x02\x00\x00\x00\x00\x00\x00\xcb\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x80\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\xce\x01\x00\x00\xcf\x01\x00\x00\x81\x00\x82\x00\x83\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x84\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x67\x01\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x68\x01\x46\x00\x47\x00\x48\x00\x1b\x05\x8a\x00\x8b\x00\x00\x00\x00\x00\x8d\x00\x8e\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x1b\x05\x00\x00\xcc\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x1b\x05\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x00\x00\x00\x00\x1a\x02\xe9\x03\xca\x02\x00\x00\x3b\x00\x9b\x02\x4c\x00\x00\x00\x8e\x00\xcb\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x93\x01\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\xbc\x03\x62\x04\xca\x02\x00\x00\x3b\x00\x9b\x02\x00\x00\x00\x00\x00\x00\xcb\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x38\x03\x00\x00\x39\x03\x9a\x02\x9e\x00\x9f\x00\x9b\x02\x00\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\xea\x03\x9a\x02\x00\x00\x00\x00\x9b\x02\x00\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x94\x01\x0f\x00\x10\x00\x00\x00\xcc\x02\x00\x00\x00\x00\x00\x00\x11\x00\x40\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\xcc\x02\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x9d\x02\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x9d\x02\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x80\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x81\x00\x82\x00\x83\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x84\x00\x00\x00\x00\x00\xe9\x03\x9a\x02\x00\x00\x00\x00\x9b\x02\x4c\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x51\x01\x00\x00\x9e\x02\x00\x00\x8a\x00\x8b\x00\x00\x00\x00\x00\x8d\x00\x8e\x00\x37\x00\x00\x00\x00\x00\x00\x00\x7a\x04\x9a\x02\x00\x00\x00\x00\x9b\x02\x00\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x62\x04\x9a\x02\x00\x00\x00\x00\x9b\x02\x00\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x63\x04\x9a\x02\x00\x00\x00\x00\x9b\x02\x00\x00\x00\x00\x00\x00\x9c\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x37\x00\x9d\x02\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\xbe\x04\x00\x00\x00\x00\x00\x00\xbf\x04\x3d\x00\x3e\x00\x3f\x00\x00\x00\xc0\x04\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x9d\x02\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x40\x00\x46\x00\x47\x00\x48\x00\x00\x00\x9d\x02\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x9d\x02\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x4c\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\xbe\x04\x9e\x02\x00\x00\x13\x00\xbf\x04\x3d\x00\x3e\x00\x3f\x00\x4c\x00\x4e\x05\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x02\x37\x00\x36\x02\x15\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x17\x00\x18\x00\x19\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x40\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x37\x00\xdc\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\xdd\x01\xde\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\xe1\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x15\x02\x16\x02\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x17\x02\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x02\x79\x00\x4c\x00\x7a\x00\x00\x00\x00\x00\xcb\x01\x7e\x00\x4b\x01\x00\x00\x00\x00\xcc\x01\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\xc1\x01\x00\x00\x4d\x01\x4e\x01\x41\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x76\x00\x00\x00\x77\x00\x78\x00\x79\x00\x00\x00\x7a\x00\x4c\x00\x00\x00\x7d\x00\x7e\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\xdf\x01\x46\x00\xe2\x01\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x01\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\xe1\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x4c\x01\x4c\x00\x4d\x01\x4e\x01\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xe3\x01\x00\x00\x76\x00\x00\x00\x77\x00\x78\x00\x79\x00\x00\x00\x7a\x00\x00\x00\xac\x02\x7d\x00\x7e\x00\x00\x00\x37\x00\x00\x00\x00\x00\x51\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x13\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xdf\x02\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\xac\x02\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x15\x00\x51\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x17\x00\x18\x00\x19\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xad\x02\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x40\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\xaf\x04\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x02\x00\x00\x00\x00\x00\x00\x37\x00\x41\x00\x00\x00\x51\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x40\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x12\x04\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\xe2\x01\x48\x00\x00\x00\x00\x00\x80\x00\x50\x01\x41\x00\x00\x00\x00\x00\x70\x05\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x81\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x84\x00\x15\x02\x16\x02\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\xe3\x01\x46\x00\x47\x00\x48\x00\x17\x02\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x49\x00\x4a\x00\x4b\x00\x8a\x00\x8b\x00\x00\x00\x00\x00\x8d\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\xf4\x03\x00\x00\x00\x00\xf7\x03\x37\x00\x00\x00\x41\x00\x51\x02\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\xf4\x03\x00\x00\x00\x00\xf5\x03\x37\x00\x00\x00\x00\x00\x51\x02\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x40\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x01\xf4\x03\x00\x00\x00\x00\xb7\x04\x37\x00\x00\x00\x00\x00\x51\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\xc4\x02\x00\x00\x4d\x01\x4e\x01\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x77\x00\x78\x00\x79\x00\x40\x00\x7a\x00\x50\x02\x00\x00\x7d\x00\x7e\x00\x37\x00\x00\x00\x41\x00\x51\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x37\x00\x40\x02\x00\x00\x39\x00\x41\x00\x3a\x00\x4c\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x40\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xd8\x02\x42\x02\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x37\x00\x40\x02\x00\x00\x39\x00\x41\x00\x3a\x00\x00\x00\x3b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x41\x02\x42\x02\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x37\x00\x40\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x4c\x00\x00\x00\x00\x00\x40\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xb9\x03\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x40\x02\x00\x00\x39\x00\x00\x00\x3a\x00\xc1\x01\x3b\x00\x4d\x01\x4e\x01\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x76\x00\xb8\x03\x77\x00\x78\x00\x79\x00\x40\x00\x7a\x00\x00\x00\x00\x00\x7d\x00\x7e\x00\x37\x00\xb6\x03\x00\x00\x39\x00\x41\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x03\x00\x00\x00\x00\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x37\x00\x40\x02\x41\x00\x39\x00\x00\x00\x3a\x00\x4c\x00\x3b\x00\x00\x00\x40\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xb5\x03\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x37\x00\x40\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x41\x00\x3b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xd0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x1b\x04\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x4c\x00\x40\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x38\x00\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\xe7\x01\x00\x00\x39\x00\x41\x00\x3a\x00\x00\x00\x3b\x00\x13\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\x15\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x41\x00\x00\x00\x24\x00\x4c\x00\x00\x00\x00\x00\x40\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x05\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x02\x16\x02\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x8d\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x18\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x19\x02\x00\x00\x37\x00\x1b\x04\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x18\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x18\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x00\x00\x00\x00\x18\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x04\x00\x00\x37\x00\x00\x00\x00\x00\x18\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\xfd\x03\x00\x00\x37\x00\x00\x00\x00\x00\x18\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\xca\x03\x00\x00\x37\x00\x00\x00\x00\x00\x18\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x49\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\xf8\x04\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x18\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x55\x05\x00\x00\x37\x00\x00\x00\x00\x00\x1b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xd0\x01\x00\x00\xd1\x01\x00\x00\x00\x00\xd2\x01\x40\x00\x00\x00\xd3\x01\x00\x00\x37\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\xd4\x01\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xd5\x01\x41\x00\x00\x00\x1e\x01\x00\x00\x00\x00\x40\x00\xd6\x01\x79\x00\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x00\x00\x00\x00\xbc\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\xcb\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\xf4\x04\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x04\x40\x00\xb9\x04\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35\x01\x00\x00\x00\x00\x00\x00\x41\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x40\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x4c\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\xe2\x02\x46\x00\x47\x00\x48\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x4c\x00\x00\x00\x00\x00\x37\x00\x00\x00\x40\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\xd9\x02\x00\x00\x00\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x4c\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x02\x00\x00\x00\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x02\x00\x00\x40\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x4f\x03\x00\x00\x4c\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x4c\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x00\x00\x4c\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\xeb\x03\x00\x00\x4c\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\x04\x00\x00\x00\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x04\x00\x00\x00\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x05\x00\x00\x00\x00\x00\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x04\x05\x00\x00\x00\x00\x40\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x49\x05\x46\x00\x47\x00\x48\x00\x00\x00\x36\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x4c\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x4c\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x81\x03\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x40\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x4c\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x0e\x02\xa4\x00\x13\x00\xa5\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x15\x02\x16\x02\x8b\x05\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x17\x02\x00\x00\x80\x00\xc3\x01\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x82\x00\x83\x00\xc4\x01\xc5\x01\xc6\x01\xc7\x01\x84\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x8a\x00\x8b\x00\x0f\x02\xb4\x00\x8d\x00\x8e\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\xa0\x03\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\xfb\x00\xd8\x00\x00\x00\xfc\x00\x00\x00\x15\x00\x00\x00\xfd\x00\x00\x00\x16\x00\xfe\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xff\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x01\xad\x00\xdd\x00\xaf\x00\x01\x01\x02\x01\x00\x00\x00\x00\x03\x01\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x04\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x05\x01\x06\x01\x07\x01\x08\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x5e\x04\x5f\x04\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x60\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xff\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x55\x00\x00\x00\xad\x00\xdd\x00\xaf\x00\x00\x00\x00\x00\xe5\x01\x00\x00\x8f\x02\xde\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x90\x02\xb2\x00\x04\x01\x00\x00\x00\x00\x00\x00\x68\x01\x00\x00\x00\x00\x00\x00\x00\x00\x64\x00\x65\x00\x00\x00\xb4\x00\x67\x00\x68\x00\x00\x00\xe0\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x05\x01\x06\x01\x07\x01\x08\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x55\x04\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\xfc\x00\x00\x00\x15\x00\x00\x00\x56\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xff\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x80\x00\x06\x05\xad\x00\xdd\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x81\x00\x82\x00\x83\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x04\x01\x00\x00\x00\x00\x00\x00\x00\x00\x51\x01\x00\x00\x00\x00\x00\x00\x8a\x00\x8b\x00\x00\x00\xb4\x00\x8d\x00\x8e\x00\x00\x00\xe0\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x05\x01\x06\x01\x07\x01\x08\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x5e\x04\x5f\x04\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x60\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xff\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xad\x00\xdd\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x04\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x05\x01\x06\x01\x07\x01\x08\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x55\x04\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\xfc\x00\x00\x00\x15\x00\x00\x00\x56\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xff\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xad\x00\xdd\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x04\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x05\x01\x06\x01\x07\x01\x08\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xff\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xad\x00\xdd\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x04\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x05\x01\x06\x01\x07\x01\x08\x01\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x65\x01\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x66\x01\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x67\x01\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x68\x01\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x65\x01\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x9b\x01\xb7\x00\x00\x00\x00\x00\x68\x01\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x65\x01\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x66\x01\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x67\x01\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x68\x01\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x47\x02\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x2b\x02\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x4a\x02\xb7\x00\x00\x00\x00\x00\x2b\x02\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\xa0\x01\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\xc0\x02\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x2b\x02\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\x00\x00\xdb\xfd\x00\x00\xdb\xfd\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\x00\x00\xdb\xfd\x00\x00\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xdb\xfd\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\xd9\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xad\x00\xdd\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x69\x01\xb8\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x03\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\xa0\x03\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\xab\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\xb7\x01\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x01\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\xab\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x96\x03\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\xa0\x03\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\xab\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x96\x03\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\xe3\x03\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\xae\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xb4\x02\x6d\x01\x6e\x01\x6f\x01\x00\x00\x70\x01\x00\x00\x00\x00\x00\x00\x1b\x01\x00\x00\x72\x00\x1c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\xa6\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\xa7\x01\x1d\x01\x00\x00\x00\x00\x1e\x01\x00\x00\x00\x00\x00\x00\x37\x02\x79\x00\x11\x00\x7a\x00\xb4\x00\x1f\x01\x00\x00\xb5\x02\xb5\x00\x00\x00\xb6\x00\xcc\x01\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xac\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\xa7\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x00\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\xa4\x00\x13\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x14\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa9\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xaa\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\xa4\x00\x13\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x14\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x8c\x03\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\xa4\x00\x13\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x14\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x00\x00\x69\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x4e\x00\x13\x00\x00\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\x00\x00\xc8\x00\x14\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x62\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x01\x00\x00\xe6\x01\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\xe7\x01\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x01\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\xe1\x01\x00\x00\x00\x00\x00\x00\x68\x01\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x3a\x02\x3b\x02\x3c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x02\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x67\x01\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x01\x60\x00\x61\x00\x62\x00\x63\x00\x3e\x02\x3f\x02\x00\x00\x66\x00\x67\x00\x40\x02\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\xe9\x01\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x01\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x39\x01\x3a\x01\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xce\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xa0\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xce\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xa0\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xce\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xa0\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\x04\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xe6\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\xd1\x04\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xa0\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\xc2\x04\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xe6\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xe6\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x04\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x55\x05\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x8d\xfe\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xe6\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x62\x03\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xe6\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x62\x03\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\xe6\x02\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x57\x00\x58\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x5b\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x00\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x4e\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x00\x00\x15\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x13\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x14\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x01\x62\x00\x63\x00\x00\x00\x00\x00\x00\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6a\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x23\x02\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x6d\x00\x2c\x00\x00\x00\x00\x00\x6e\x00\x6f\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x37\x03\x17\x00\x18\x00\x19\x00\x34\x03\x35\x03\x36\x03\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x03\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x23\x02\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x37\x03\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x02\x16\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x02\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x13\x00\x00\x00\x86\x00\x00\x00\x87\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x88\x00\x00\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x2d\x00\x8c\x00\x8d\x00\x8e\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x01\xbe\x02\x13\x00\x00\x00\xd9\x01\x00\x00\x87\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\xda\x01\x00\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x00\x00\x8c\x00\x00\x00\x8e\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x04\x00\x00\x00\x00\x15\x00\x00\x00\xa5\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xa6\x04\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\xa4\x04\x00\x00\x00\x00\x15\x00\x00\x00\xa5\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xa6\x04\xa7\x04\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xa8\x04\x00\x00\x00\x00\x2c\x00\x63\x00\x13\x00\x00\x00\x2d\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xa7\x04\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x14\x00\x2c\x00\x63\x00\x00\x00\x00\x00\x2d\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\xa5\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x85\x00\x00\x00\x00\x00\x00\x00\x93\x01\x13\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x00\x00\x3b\x05\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xa7\x04\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x14\x00\x2c\x00\x63\x00\x00\x00\x00\x00\x2d\x00\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xd8\x01\x13\x00\x00\x00\x00\x00\xd9\x01\x00\x00\x87\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x2d\x00\x8c\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x85\x01\x13\x00\x00\x00\x00\x00\x86\x01\x00\x00\x87\x01\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x00\x63\x00\x00\x00\x00\x00\x00\x00\x66\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x62\x00\x63\x00\x00\x00\x00\x00\x00\x00\x66\x00\x59\x02\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x2b\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x82\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x13\x00\x00\x00\x00\x00\x72\x01\x67\x01\x87\x00\x00\x00\x00\x00\x14\x00\x00\x00\x68\x01\x00\x00\x00\x00\x2c\x00\x89\x00\x8a\x00\x8b\x00\x21\x01\x00\x00\x00\x00\x15\x00\x00\x00\x22\x01\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x23\x01\x13\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x85\x00\x00\x00\x24\x00\x00\x00\x72\x01\x13\x00\x87\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x32\x01\x13\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x85\x00\x00\x00\x24\x00\x00\x00\x23\x01\x13\x00\x87\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x72\x01\x13\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x85\x00\x00\x00\x24\x00\x00\x00\x23\x01\x13\x00\x87\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x89\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xff\x14\x00\x00\x00\x00\x00\x06\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\xf4\x02\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xbc\x02\x00\x00\x24\x00\x2c\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\xf6\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x04\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x8e\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\xa3\x01\x97\x00\x98\x00\x99\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x8e\x00\x55\x01\x56\x01\x62\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x01\x58\x01\x00\x00\x71\x02\x99\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\xf6\x01\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x5a\x01\x5b\x01\xa2\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x5e\x01\x9b\x01\x60\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x61\x01\x7e\x00\xa2\x00\x00\x00\x00\x00\x62\x01\x00\x00\x63\x01\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x01\x58\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x5e\x01\x5f\x01\x60\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x61\x01\x7e\x00\xa2\x00\x00\x00\x00\x00\x62\x01\x00\x00\x63\x01\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95\x01\x96\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x00\x00\x00\x00\x99\x01\x00\x00\x63\x01\x8e\x00\xe0\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x03\x9b\x03\x9c\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x01\xa1\x00\x0f\x00\x10\x00\x9d\x01\x9e\x01\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x9e\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\x02\x00\x00\x00\x00\x7a\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x79\x02\x00\x00\x00\x00\x8c\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x8e\x03\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x55\x01\x56\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x59\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x01\x5b\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x5d\x01\x97\x01\x00\x00\x98\x01\x11\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\xa2\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90\x03\x91\x03\x92\x03\x93\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x7e\x04\x92\x03\x93\x03\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x68\x02\x00\x00\x67\x02\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x66\x02\x00\x00\x67\x02\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x5d\x02\x5e\x02\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\xe0\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\xa0\x03\x9b\x03\x9c\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x50\x03\x5e\x02\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\xe0\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\xd9\x03\x9b\x03\x9c\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x01\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x8e\x00\xb2\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\xb3\x01\xb4\x01\xb5\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\x03\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x7c\x04\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x8e\x00\xe0\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x82\x04\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x9d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xe0\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xe1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xe0\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x29\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xe0\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x28\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xe3\x00\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xcf\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xc0\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xbf\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xb9\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x8f\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x89\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x88\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x87\x01\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x59\x02\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x4f\x02\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x4e\x02\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x4d\x02\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x4c\x02\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xa8\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xa7\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xa3\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x96\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x51\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xf0\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xe1\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xe0\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xd5\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xd3\x03\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x83\x04\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x7b\x04\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x61\x04\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xe6\x04\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xb6\x04\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xb5\x04\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\xb4\x04\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x1f\x05\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x48\x05\x90\x00\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x00\x00\x8e\x01\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x00\x00\xc1\x02\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x00\x00\x2a\x04\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x8e\x00\x00\x00\xd1\x04\x00\x00\x91\x00\x92\x00\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x8e\x00\x00\x00\x72\x00\x73\x00\x91\x00\x52\x02\x00\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\xa3\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8e\x00\x00\x00\xa0\x00\x71\x00\xce\x02\x00\x00\x72\x00\x73\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\xbd\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x8e\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\xaf\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8e\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\xab\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\xa2\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x8e\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\xa0\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8e\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x54\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x19\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x8e\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x06\x03\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8e\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x05\x03\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\xbd\x01\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x8e\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x6d\x02\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x8e\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x5a\x02\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x1d\x03\x97\x00\x98\x00\x99\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x71\x00\x00\x00\x00\x00\x72\x00\x73\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7b\x00\x7c\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#--happyReduceArr = Happy_Data_Array.array (13, 827) [-	(13 , happyReduce_13),-	(14 , happyReduce_14),-	(15 , happyReduce_15),-	(16 , happyReduce_16),-	(17 , happyReduce_17),-	(18 , happyReduce_18),-	(19 , happyReduce_19),-	(20 , happyReduce_20),-	(21 , happyReduce_21),-	(22 , happyReduce_22),-	(23 , happyReduce_23),-	(24 , happyReduce_24),-	(25 , happyReduce_25),-	(26 , happyReduce_26),-	(27 , happyReduce_27),-	(28 , happyReduce_28),-	(29 , happyReduce_29),-	(30 , happyReduce_30),-	(31 , happyReduce_31),-	(32 , happyReduce_32),-	(33 , happyReduce_33),-	(34 , happyReduce_34),-	(35 , happyReduce_35),-	(36 , happyReduce_36),-	(37 , happyReduce_37),-	(38 , happyReduce_38),-	(39 , happyReduce_39),-	(40 , happyReduce_40),-	(41 , happyReduce_41),-	(42 , happyReduce_42),-	(43 , happyReduce_43),-	(44 , happyReduce_44),-	(45 , happyReduce_45),-	(46 , happyReduce_46),-	(47 , happyReduce_47),-	(48 , happyReduce_48),-	(49 , happyReduce_49),-	(50 , happyReduce_50),-	(51 , happyReduce_51),-	(52 , happyReduce_52),-	(53 , happyReduce_53),-	(54 , happyReduce_54),-	(55 , happyReduce_55),-	(56 , happyReduce_56),-	(57 , happyReduce_57),-	(58 , happyReduce_58),-	(59 , happyReduce_59),-	(60 , happyReduce_60),-	(61 , happyReduce_61),-	(62 , happyReduce_62),-	(63 , happyReduce_63),-	(64 , happyReduce_64),-	(65 , happyReduce_65),-	(66 , happyReduce_66),-	(67 , happyReduce_67),-	(68 , happyReduce_68),-	(69 , happyReduce_69),-	(70 , happyReduce_70),-	(71 , happyReduce_71),-	(72 , happyReduce_72),-	(73 , happyReduce_73),-	(74 , happyReduce_74),-	(75 , happyReduce_75),-	(76 , happyReduce_76),-	(77 , happyReduce_77),-	(78 , happyReduce_78),-	(79 , happyReduce_79),-	(80 , happyReduce_80),-	(81 , happyReduce_81),-	(82 , happyReduce_82),-	(83 , happyReduce_83),-	(84 , happyReduce_84),-	(85 , happyReduce_85),-	(86 , happyReduce_86),-	(87 , happyReduce_87),-	(88 , happyReduce_88),-	(89 , happyReduce_89),-	(90 , happyReduce_90),-	(91 , happyReduce_91),-	(92 , happyReduce_92),-	(93 , happyReduce_93),-	(94 , happyReduce_94),-	(95 , happyReduce_95),-	(96 , happyReduce_96),-	(97 , happyReduce_97),-	(98 , happyReduce_98),-	(99 , happyReduce_99),-	(100 , happyReduce_100),-	(101 , happyReduce_101),-	(102 , happyReduce_102),-	(103 , happyReduce_103),-	(104 , happyReduce_104),-	(105 , happyReduce_105),-	(106 , happyReduce_106),-	(107 , happyReduce_107),-	(108 , happyReduce_108),-	(109 , happyReduce_109),-	(110 , happyReduce_110),-	(111 , happyReduce_111),-	(112 , happyReduce_112),-	(113 , happyReduce_113),-	(114 , happyReduce_114),-	(115 , happyReduce_115),-	(116 , happyReduce_116),-	(117 , happyReduce_117),-	(118 , happyReduce_118),-	(119 , happyReduce_119),-	(120 , happyReduce_120),-	(121 , happyReduce_121),-	(122 , happyReduce_122),-	(123 , happyReduce_123),-	(124 , happyReduce_124),-	(125 , happyReduce_125),-	(126 , happyReduce_126),-	(127 , happyReduce_127),-	(128 , happyReduce_128),-	(129 , happyReduce_129),-	(130 , happyReduce_130),-	(131 , happyReduce_131),-	(132 , happyReduce_132),-	(133 , happyReduce_133),-	(134 , happyReduce_134),-	(135 , happyReduce_135),-	(136 , happyReduce_136),-	(137 , happyReduce_137),-	(138 , happyReduce_138),-	(139 , happyReduce_139),-	(140 , happyReduce_140),-	(141 , happyReduce_141),-	(142 , happyReduce_142),-	(143 , happyReduce_143),-	(144 , happyReduce_144),-	(145 , happyReduce_145),-	(146 , happyReduce_146),-	(147 , happyReduce_147),-	(148 , happyReduce_148),-	(149 , happyReduce_149),-	(150 , happyReduce_150),-	(151 , happyReduce_151),-	(152 , happyReduce_152),-	(153 , happyReduce_153),-	(154 , happyReduce_154),-	(155 , happyReduce_155),-	(156 , happyReduce_156),-	(157 , happyReduce_157),-	(158 , happyReduce_158),-	(159 , happyReduce_159),-	(160 , happyReduce_160),-	(161 , happyReduce_161),-	(162 , happyReduce_162),-	(163 , happyReduce_163),-	(164 , happyReduce_164),-	(165 , happyReduce_165),-	(166 , happyReduce_166),-	(167 , happyReduce_167),-	(168 , happyReduce_168),-	(169 , happyReduce_169),-	(170 , happyReduce_170),-	(171 , happyReduce_171),-	(172 , happyReduce_172),-	(173 , happyReduce_173),-	(174 , happyReduce_174),-	(175 , happyReduce_175),-	(176 , happyReduce_176),-	(177 , happyReduce_177),-	(178 , happyReduce_178),-	(179 , happyReduce_179),-	(180 , happyReduce_180),-	(181 , happyReduce_181),-	(182 , happyReduce_182),-	(183 , happyReduce_183),-	(184 , happyReduce_184),-	(185 , happyReduce_185),-	(186 , happyReduce_186),-	(187 , happyReduce_187),-	(188 , happyReduce_188),-	(189 , happyReduce_189),-	(190 , happyReduce_190),-	(191 , happyReduce_191),-	(192 , happyReduce_192),-	(193 , happyReduce_193),-	(194 , happyReduce_194),-	(195 , happyReduce_195),-	(196 , happyReduce_196),-	(197 , happyReduce_197),-	(198 , happyReduce_198),-	(199 , happyReduce_199),-	(200 , happyReduce_200),-	(201 , happyReduce_201),-	(202 , happyReduce_202),-	(203 , happyReduce_203),-	(204 , happyReduce_204),-	(205 , happyReduce_205),-	(206 , happyReduce_206),-	(207 , happyReduce_207),-	(208 , happyReduce_208),-	(209 , happyReduce_209),-	(210 , happyReduce_210),-	(211 , happyReduce_211),-	(212 , happyReduce_212),-	(213 , happyReduce_213),-	(214 , happyReduce_214),-	(215 , happyReduce_215),-	(216 , happyReduce_216),-	(217 , happyReduce_217),-	(218 , happyReduce_218),-	(219 , happyReduce_219),-	(220 , happyReduce_220),-	(221 , happyReduce_221),-	(222 , happyReduce_222),-	(223 , happyReduce_223),-	(224 , happyReduce_224),-	(225 , happyReduce_225),-	(226 , happyReduce_226),-	(227 , happyReduce_227),-	(228 , happyReduce_228),-	(229 , happyReduce_229),-	(230 , happyReduce_230),-	(231 , happyReduce_231),-	(232 , happyReduce_232),-	(233 , happyReduce_233),-	(234 , happyReduce_234),-	(235 , happyReduce_235),-	(236 , happyReduce_236),-	(237 , happyReduce_237),-	(238 , happyReduce_238),-	(239 , happyReduce_239),-	(240 , happyReduce_240),-	(241 , happyReduce_241),-	(242 , happyReduce_242),-	(243 , happyReduce_243),-	(244 , happyReduce_244),-	(245 , happyReduce_245),-	(246 , happyReduce_246),-	(247 , happyReduce_247),-	(248 , happyReduce_248),-	(249 , happyReduce_249),-	(250 , happyReduce_250),-	(251 , happyReduce_251),-	(252 , happyReduce_252),-	(253 , happyReduce_253),-	(254 , happyReduce_254),-	(255 , happyReduce_255),-	(256 , happyReduce_256),-	(257 , happyReduce_257),-	(258 , happyReduce_258),-	(259 , happyReduce_259),-	(260 , happyReduce_260),-	(261 , happyReduce_261),-	(262 , happyReduce_262),-	(263 , happyReduce_263),-	(264 , happyReduce_264),-	(265 , happyReduce_265),-	(266 , happyReduce_266),-	(267 , happyReduce_267),-	(268 , happyReduce_268),-	(269 , happyReduce_269),-	(270 , happyReduce_270),-	(271 , happyReduce_271),-	(272 , happyReduce_272),-	(273 , happyReduce_273),-	(274 , happyReduce_274),-	(275 , happyReduce_275),-	(276 , happyReduce_276),-	(277 , happyReduce_277),-	(278 , happyReduce_278),-	(279 , happyReduce_279),-	(280 , happyReduce_280),-	(281 , happyReduce_281),-	(282 , happyReduce_282),-	(283 , happyReduce_283),-	(284 , happyReduce_284),-	(285 , happyReduce_285),-	(286 , happyReduce_286),-	(287 , happyReduce_287),-	(288 , happyReduce_288),-	(289 , happyReduce_289),-	(290 , happyReduce_290),-	(291 , happyReduce_291),-	(292 , happyReduce_292),-	(293 , happyReduce_293),-	(294 , happyReduce_294),-	(295 , happyReduce_295),-	(296 , happyReduce_296),-	(297 , happyReduce_297),-	(298 , happyReduce_298),-	(299 , happyReduce_299),-	(300 , happyReduce_300),-	(301 , happyReduce_301),-	(302 , happyReduce_302),-	(303 , happyReduce_303),-	(304 , happyReduce_304),-	(305 , happyReduce_305),-	(306 , happyReduce_306),-	(307 , happyReduce_307),-	(308 , happyReduce_308),-	(309 , happyReduce_309),-	(310 , happyReduce_310),-	(311 , happyReduce_311),-	(312 , happyReduce_312),-	(313 , happyReduce_313),-	(314 , happyReduce_314),-	(315 , happyReduce_315),-	(316 , happyReduce_316),-	(317 , happyReduce_317),-	(318 , happyReduce_318),-	(319 , happyReduce_319),-	(320 , happyReduce_320),-	(321 , happyReduce_321),-	(322 , happyReduce_322),-	(323 , happyReduce_323),-	(324 , happyReduce_324),-	(325 , happyReduce_325),-	(326 , happyReduce_326),-	(327 , happyReduce_327),-	(328 , happyReduce_328),-	(329 , happyReduce_329),-	(330 , happyReduce_330),-	(331 , happyReduce_331),-	(332 , happyReduce_332),-	(333 , happyReduce_333),-	(334 , happyReduce_334),-	(335 , happyReduce_335),-	(336 , happyReduce_336),-	(337 , happyReduce_337),-	(338 , happyReduce_338),-	(339 , happyReduce_339),-	(340 , happyReduce_340),-	(341 , happyReduce_341),-	(342 , happyReduce_342),-	(343 , happyReduce_343),-	(344 , happyReduce_344),-	(345 , happyReduce_345),-	(346 , happyReduce_346),-	(347 , happyReduce_347),-	(348 , happyReduce_348),-	(349 , happyReduce_349),-	(350 , happyReduce_350),-	(351 , happyReduce_351),-	(352 , happyReduce_352),-	(353 , happyReduce_353),-	(354 , happyReduce_354),-	(355 , happyReduce_355),-	(356 , happyReduce_356),-	(357 , happyReduce_357),-	(358 , happyReduce_358),-	(359 , happyReduce_359),-	(360 , happyReduce_360),-	(361 , happyReduce_361),-	(362 , happyReduce_362),-	(363 , happyReduce_363),-	(364 , happyReduce_364),-	(365 , happyReduce_365),-	(366 , happyReduce_366),-	(367 , happyReduce_367),-	(368 , happyReduce_368),-	(369 , happyReduce_369),-	(370 , happyReduce_370),-	(371 , happyReduce_371),-	(372 , happyReduce_372),-	(373 , happyReduce_373),-	(374 , happyReduce_374),-	(375 , happyReduce_375),-	(376 , happyReduce_376),-	(377 , happyReduce_377),-	(378 , happyReduce_378),-	(379 , happyReduce_379),-	(380 , happyReduce_380),-	(381 , happyReduce_381),-	(382 , happyReduce_382),-	(383 , happyReduce_383),-	(384 , happyReduce_384),-	(385 , happyReduce_385),-	(386 , happyReduce_386),-	(387 , happyReduce_387),-	(388 , happyReduce_388),-	(389 , happyReduce_389),-	(390 , happyReduce_390),-	(391 , happyReduce_391),-	(392 , happyReduce_392),-	(393 , happyReduce_393),-	(394 , happyReduce_394),-	(395 , happyReduce_395),-	(396 , happyReduce_396),-	(397 , happyReduce_397),-	(398 , happyReduce_398),-	(399 , happyReduce_399),-	(400 , happyReduce_400),-	(401 , happyReduce_401),-	(402 , happyReduce_402),-	(403 , happyReduce_403),-	(404 , happyReduce_404),-	(405 , happyReduce_405),-	(406 , happyReduce_406),-	(407 , happyReduce_407),-	(408 , happyReduce_408),-	(409 , happyReduce_409),-	(410 , happyReduce_410),-	(411 , happyReduce_411),-	(412 , happyReduce_412),-	(413 , happyReduce_413),-	(414 , happyReduce_414),-	(415 , happyReduce_415),-	(416 , happyReduce_416),-	(417 , happyReduce_417),-	(418 , happyReduce_418),-	(419 , happyReduce_419),-	(420 , happyReduce_420),-	(421 , happyReduce_421),-	(422 , happyReduce_422),-	(423 , happyReduce_423),-	(424 , happyReduce_424),-	(425 , happyReduce_425),-	(426 , happyReduce_426),-	(427 , happyReduce_427),-	(428 , happyReduce_428),-	(429 , happyReduce_429),-	(430 , happyReduce_430),-	(431 , happyReduce_431),-	(432 , happyReduce_432),-	(433 , happyReduce_433),-	(434 , happyReduce_434),-	(435 , happyReduce_435),-	(436 , happyReduce_436),-	(437 , happyReduce_437),-	(438 , happyReduce_438),-	(439 , happyReduce_439),-	(440 , happyReduce_440),-	(441 , happyReduce_441),-	(442 , happyReduce_442),-	(443 , happyReduce_443),-	(444 , happyReduce_444),-	(445 , happyReduce_445),-	(446 , happyReduce_446),-	(447 , happyReduce_447),-	(448 , happyReduce_448),-	(449 , happyReduce_449),-	(450 , happyReduce_450),-	(451 , happyReduce_451),-	(452 , happyReduce_452),-	(453 , happyReduce_453),-	(454 , happyReduce_454),-	(455 , happyReduce_455),-	(456 , happyReduce_456),-	(457 , happyReduce_457),-	(458 , happyReduce_458),-	(459 , happyReduce_459),-	(460 , happyReduce_460),-	(461 , happyReduce_461),-	(462 , happyReduce_462),-	(463 , happyReduce_463),-	(464 , happyReduce_464),-	(465 , happyReduce_465),-	(466 , happyReduce_466),-	(467 , happyReduce_467),-	(468 , happyReduce_468),-	(469 , happyReduce_469),-	(470 , happyReduce_470),-	(471 , happyReduce_471),-	(472 , happyReduce_472),-	(473 , happyReduce_473),-	(474 , happyReduce_474),-	(475 , happyReduce_475),-	(476 , happyReduce_476),-	(477 , happyReduce_477),-	(478 , happyReduce_478),-	(479 , happyReduce_479),-	(480 , happyReduce_480),-	(481 , happyReduce_481),-	(482 , happyReduce_482),-	(483 , happyReduce_483),-	(484 , happyReduce_484),-	(485 , happyReduce_485),-	(486 , happyReduce_486),-	(487 , happyReduce_487),-	(488 , happyReduce_488),-	(489 , happyReduce_489),-	(490 , happyReduce_490),-	(491 , happyReduce_491),-	(492 , happyReduce_492),-	(493 , happyReduce_493),-	(494 , happyReduce_494),-	(495 , happyReduce_495),-	(496 , happyReduce_496),-	(497 , happyReduce_497),-	(498 , happyReduce_498),-	(499 , happyReduce_499),-	(500 , happyReduce_500),-	(501 , happyReduce_501),-	(502 , happyReduce_502),-	(503 , happyReduce_503),-	(504 , happyReduce_504),-	(505 , happyReduce_505),-	(506 , happyReduce_506),-	(507 , happyReduce_507),-	(508 , happyReduce_508),-	(509 , happyReduce_509),-	(510 , happyReduce_510),-	(511 , happyReduce_511),-	(512 , happyReduce_512),-	(513 , happyReduce_513),-	(514 , happyReduce_514),-	(515 , happyReduce_515),-	(516 , happyReduce_516),-	(517 , happyReduce_517),-	(518 , happyReduce_518),-	(519 , happyReduce_519),-	(520 , happyReduce_520),-	(521 , happyReduce_521),-	(522 , happyReduce_522),-	(523 , happyReduce_523),-	(524 , happyReduce_524),-	(525 , happyReduce_525),-	(526 , happyReduce_526),-	(527 , happyReduce_527),-	(528 , happyReduce_528),-	(529 , happyReduce_529),-	(530 , happyReduce_530),-	(531 , happyReduce_531),-	(532 , happyReduce_532),-	(533 , happyReduce_533),-	(534 , happyReduce_534),-	(535 , happyReduce_535),-	(536 , happyReduce_536),-	(537 , happyReduce_537),-	(538 , happyReduce_538),-	(539 , happyReduce_539),-	(540 , happyReduce_540),-	(541 , happyReduce_541),-	(542 , happyReduce_542),-	(543 , happyReduce_543),-	(544 , happyReduce_544),-	(545 , happyReduce_545),-	(546 , happyReduce_546),-	(547 , happyReduce_547),-	(548 , happyReduce_548),-	(549 , happyReduce_549),-	(550 , happyReduce_550),-	(551 , happyReduce_551),-	(552 , happyReduce_552),-	(553 , happyReduce_553),-	(554 , happyReduce_554),-	(555 , happyReduce_555),-	(556 , happyReduce_556),-	(557 , happyReduce_557),-	(558 , happyReduce_558),-	(559 , happyReduce_559),-	(560 , happyReduce_560),-	(561 , happyReduce_561),-	(562 , happyReduce_562),-	(563 , happyReduce_563),-	(564 , happyReduce_564),-	(565 , happyReduce_565),-	(566 , happyReduce_566),-	(567 , happyReduce_567),-	(568 , happyReduce_568),-	(569 , happyReduce_569),-	(570 , happyReduce_570),-	(571 , happyReduce_571),-	(572 , happyReduce_572),-	(573 , happyReduce_573),-	(574 , happyReduce_574),-	(575 , happyReduce_575),-	(576 , happyReduce_576),-	(577 , happyReduce_577),-	(578 , happyReduce_578),-	(579 , happyReduce_579),-	(580 , happyReduce_580),-	(581 , happyReduce_581),-	(582 , happyReduce_582),-	(583 , happyReduce_583),-	(584 , happyReduce_584),-	(585 , happyReduce_585),-	(586 , happyReduce_586),-	(587 , happyReduce_587),-	(588 , happyReduce_588),-	(589 , happyReduce_589),-	(590 , happyReduce_590),-	(591 , happyReduce_591),-	(592 , happyReduce_592),-	(593 , happyReduce_593),-	(594 , happyReduce_594),-	(595 , happyReduce_595),-	(596 , happyReduce_596),-	(597 , happyReduce_597),-	(598 , happyReduce_598),-	(599 , happyReduce_599),-	(600 , happyReduce_600),-	(601 , happyReduce_601),-	(602 , happyReduce_602),-	(603 , happyReduce_603),-	(604 , happyReduce_604),-	(605 , happyReduce_605),-	(606 , happyReduce_606),-	(607 , happyReduce_607),-	(608 , happyReduce_608),-	(609 , happyReduce_609),-	(610 , happyReduce_610),-	(611 , happyReduce_611),-	(612 , happyReduce_612),-	(613 , happyReduce_613),-	(614 , happyReduce_614),-	(615 , happyReduce_615),-	(616 , happyReduce_616),-	(617 , happyReduce_617),-	(618 , happyReduce_618),-	(619 , happyReduce_619),-	(620 , happyReduce_620),-	(621 , happyReduce_621),-	(622 , happyReduce_622),-	(623 , happyReduce_623),-	(624 , happyReduce_624),-	(625 , happyReduce_625),-	(626 , happyReduce_626),-	(627 , happyReduce_627),-	(628 , happyReduce_628),-	(629 , happyReduce_629),-	(630 , happyReduce_630),-	(631 , happyReduce_631),-	(632 , happyReduce_632),-	(633 , happyReduce_633),-	(634 , happyReduce_634),-	(635 , happyReduce_635),-	(636 , happyReduce_636),-	(637 , happyReduce_637),-	(638 , happyReduce_638),-	(639 , happyReduce_639),-	(640 , happyReduce_640),-	(641 , happyReduce_641),-	(642 , happyReduce_642),-	(643 , happyReduce_643),-	(644 , happyReduce_644),-	(645 , happyReduce_645),-	(646 , happyReduce_646),-	(647 , happyReduce_647),-	(648 , happyReduce_648),-	(649 , happyReduce_649),-	(650 , happyReduce_650),-	(651 , happyReduce_651),-	(652 , happyReduce_652),-	(653 , happyReduce_653),-	(654 , happyReduce_654),-	(655 , happyReduce_655),-	(656 , happyReduce_656),-	(657 , happyReduce_657),-	(658 , happyReduce_658),-	(659 , happyReduce_659),-	(660 , happyReduce_660),-	(661 , happyReduce_661),-	(662 , happyReduce_662),-	(663 , happyReduce_663),-	(664 , happyReduce_664),-	(665 , happyReduce_665),-	(666 , happyReduce_666),-	(667 , happyReduce_667),-	(668 , happyReduce_668),-	(669 , happyReduce_669),-	(670 , happyReduce_670),-	(671 , happyReduce_671),-	(672 , happyReduce_672),-	(673 , happyReduce_673),-	(674 , happyReduce_674),-	(675 , happyReduce_675),-	(676 , happyReduce_676),-	(677 , happyReduce_677),-	(678 , happyReduce_678),-	(679 , happyReduce_679),-	(680 , happyReduce_680),-	(681 , happyReduce_681),-	(682 , happyReduce_682),-	(683 , happyReduce_683),-	(684 , happyReduce_684),-	(685 , happyReduce_685),-	(686 , happyReduce_686),-	(687 , happyReduce_687),-	(688 , happyReduce_688),-	(689 , happyReduce_689),-	(690 , happyReduce_690),-	(691 , happyReduce_691),-	(692 , happyReduce_692),-	(693 , happyReduce_693),-	(694 , happyReduce_694),-	(695 , happyReduce_695),-	(696 , happyReduce_696),-	(697 , happyReduce_697),-	(698 , happyReduce_698),-	(699 , happyReduce_699),-	(700 , happyReduce_700),-	(701 , happyReduce_701),-	(702 , happyReduce_702),-	(703 , happyReduce_703),-	(704 , happyReduce_704),-	(705 , happyReduce_705),-	(706 , happyReduce_706),-	(707 , happyReduce_707),-	(708 , happyReduce_708),-	(709 , happyReduce_709),-	(710 , happyReduce_710),-	(711 , happyReduce_711),-	(712 , happyReduce_712),-	(713 , happyReduce_713),-	(714 , happyReduce_714),-	(715 , happyReduce_715),-	(716 , happyReduce_716),-	(717 , happyReduce_717),-	(718 , happyReduce_718),-	(719 , happyReduce_719),-	(720 , happyReduce_720),-	(721 , happyReduce_721),-	(722 , happyReduce_722),-	(723 , happyReduce_723),-	(724 , happyReduce_724),-	(725 , happyReduce_725),-	(726 , happyReduce_726),-	(727 , happyReduce_727),-	(728 , happyReduce_728),-	(729 , happyReduce_729),-	(730 , happyReduce_730),-	(731 , happyReduce_731),-	(732 , happyReduce_732),-	(733 , happyReduce_733),-	(734 , happyReduce_734),-	(735 , happyReduce_735),-	(736 , happyReduce_736),-	(737 , happyReduce_737),-	(738 , happyReduce_738),-	(739 , happyReduce_739),-	(740 , happyReduce_740),-	(741 , happyReduce_741),-	(742 , happyReduce_742),-	(743 , happyReduce_743),-	(744 , happyReduce_744),-	(745 , happyReduce_745),-	(746 , happyReduce_746),-	(747 , happyReduce_747),-	(748 , happyReduce_748),-	(749 , happyReduce_749),-	(750 , happyReduce_750),-	(751 , happyReduce_751),-	(752 , happyReduce_752),-	(753 , happyReduce_753),-	(754 , happyReduce_754),-	(755 , happyReduce_755),-	(756 , happyReduce_756),-	(757 , happyReduce_757),-	(758 , happyReduce_758),-	(759 , happyReduce_759),-	(760 , happyReduce_760),-	(761 , happyReduce_761),-	(762 , happyReduce_762),-	(763 , happyReduce_763),-	(764 , happyReduce_764),-	(765 , happyReduce_765),-	(766 , happyReduce_766),-	(767 , happyReduce_767),-	(768 , happyReduce_768),-	(769 , happyReduce_769),-	(770 , happyReduce_770),-	(771 , happyReduce_771),-	(772 , happyReduce_772),-	(773 , happyReduce_773),-	(774 , happyReduce_774),-	(775 , happyReduce_775),-	(776 , happyReduce_776),-	(777 , happyReduce_777),-	(778 , happyReduce_778),-	(779 , happyReduce_779),-	(780 , happyReduce_780),-	(781 , happyReduce_781),-	(782 , happyReduce_782),-	(783 , happyReduce_783),-	(784 , happyReduce_784),-	(785 , happyReduce_785),-	(786 , happyReduce_786),-	(787 , happyReduce_787),-	(788 , happyReduce_788),-	(789 , happyReduce_789),-	(790 , happyReduce_790),-	(791 , happyReduce_791),-	(792 , happyReduce_792),-	(793 , happyReduce_793),-	(794 , happyReduce_794),-	(795 , happyReduce_795),-	(796 , happyReduce_796),-	(797 , happyReduce_797),-	(798 , happyReduce_798),-	(799 , happyReduce_799),-	(800 , happyReduce_800),-	(801 , happyReduce_801),-	(802 , happyReduce_802),-	(803 , happyReduce_803),-	(804 , happyReduce_804),-	(805 , happyReduce_805),-	(806 , happyReduce_806),-	(807 , happyReduce_807),-	(808 , happyReduce_808),-	(809 , happyReduce_809),-	(810 , happyReduce_810),-	(811 , happyReduce_811),-	(812 , happyReduce_812),-	(813 , happyReduce_813),-	(814 , happyReduce_814),-	(815 , happyReduce_815),-	(816 , happyReduce_816),-	(817 , happyReduce_817),-	(818 , happyReduce_818),-	(819 , happyReduce_819),-	(820 , happyReduce_820),-	(821 , happyReduce_821),-	(822 , happyReduce_822),-	(823 , happyReduce_823),-	(824 , happyReduce_824),-	(825 , happyReduce_825),-	(826 , happyReduce_826),-	(827 , happyReduce_827)-	]--happy_n_terms = 154 :: Int-happy_n_nonterms = 308 :: Int--happyReduce_13 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_13 = happySpecReduce_1  0# happyReduction_13-happyReduction_13 happy_x_1-	 =  case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> -	happyIn16-		 (happy_var_1-	)}--happyReduce_14 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_14 = happySpecReduce_1  0# happyReduction_14-happyReduction_14 happy_x_1-	 =  case happyOut268 happy_x_1 of { (HappyWrap268 happy_var_1) -> -	happyIn16-		 (happy_var_1-	)}--happyReduce_15 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_15 = happySpecReduce_1  0# happyReduction_15-happyReduction_15 happy_x_1-	 =  case happyOut291 happy_x_1 of { (HappyWrap291 happy_var_1) -> -	happyIn16-		 (happy_var_1-	)}--happyReduce_16 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_16 = happySpecReduce_1  0# happyReduction_16-happyReduction_16 happy_x_1-	 =  case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> -	happyIn16-		 (happy_var_1-	)}--happyReduce_17 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_17 = happyMonadReduce 3# 0# happyReduction_17-happyReduction_17 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ getRdrName funTyCon)-                               [mop happy_var_1,mu AnnRarrow happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn16 r))--happyReduce_18 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_18 = happyMonadReduce 3# 0# happyReduction_18-happyReduction_18 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ eqTyCon_RDR)-                               [mop happy_var_1,mj AnnTilde happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn16 r))--happyReduce_19 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_19 = happySpecReduce_3  1# happyReduction_19-happyReduction_19 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> -	happyIn17-		 (fromOL happy_var_2-	)}--happyReduce_20 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_20 = happySpecReduce_3  1# happyReduction_20-happyReduction_20 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> -	happyIn17-		 (fromOL happy_var_2-	)}--happyReduce_21 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_21 = happySpecReduce_3  2# happyReduction_21-happyReduction_21 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> -	case happyOut19 happy_x_3 of { (HappyWrap19 happy_var_3) -> -	happyIn18-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_22 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_22 = happySpecReduce_2  2# happyReduction_22-happyReduction_22 happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> -	happyIn18-		 (happy_var_1-	)}--happyReduce_23 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_23 = happySpecReduce_1  2# happyReduction_23-happyReduction_23 happy_x_1-	 =  case happyOut19 happy_x_1 of { (HappyWrap19 happy_var_1) -> -	happyIn18-		 (unitOL happy_var_1-	)}--happyReduce_24 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_24 = happyReduce 4# 3# happyReduction_24-happyReduction_24 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut24 happy_x_2 of { (HappyWrap24 happy_var_2) -> -	case happyOut30 happy_x_4 of { (HappyWrap30 happy_var_4) -> -	happyIn19-		 (sL1 happy_var_1 $ HsUnit { hsunitName = happy_var_2-                              , hsunitBody = fromOL happy_var_4 }-	) `HappyStk` happyRest}}}--happyReduce_25 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_25 = happySpecReduce_1  4# happyReduction_25-happyReduction_25 happy_x_1-	 =  case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> -	happyIn20-		 (sL1 happy_var_1 $ HsUnitId happy_var_1 []-	)}--happyReduce_26 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_26 = happyReduce 4# 4# happyReduction_26-happyReduction_26 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> -	case happyOut21 happy_x_3 of { (HappyWrap21 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn20-		 (sLL happy_var_1 happy_var_4 $ HsUnitId happy_var_1 (fromOL happy_var_3)-	) `HappyStk` happyRest}}}--happyReduce_27 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_27 = happySpecReduce_3  5# happyReduction_27-happyReduction_27 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> -	case happyOut22 happy_x_3 of { (HappyWrap22 happy_var_3) -> -	happyIn21-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_28 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_28 = happySpecReduce_2  5# happyReduction_28-happyReduction_28 happy_x_2-	happy_x_1-	 =  case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> -	happyIn21-		 (happy_var_1-	)}--happyReduce_29 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_29 = happySpecReduce_1  5# happyReduction_29-happyReduction_29 happy_x_1-	 =  case happyOut22 happy_x_1 of { (HappyWrap22 happy_var_1) -> -	happyIn21-		 (unitOL happy_var_1-	)}--happyReduce_30 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_30 = happySpecReduce_3  6# happyReduction_30-happyReduction_30 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> -	case happyOut23 happy_x_3 of { (HappyWrap23 happy_var_3) -> -	happyIn22-		 (sLL happy_var_1 happy_var_3 $ (happy_var_1, happy_var_3)-	)}}--happyReduce_31 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_31 = happyReduce 4# 6# happyReduction_31-happyReduction_31 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn22-		 (sLL happy_var_1 happy_var_4 $ (happy_var_1, sLL happy_var_2 happy_var_4 $ HsModuleVar happy_var_3)-	) `HappyStk` happyRest}}}}--happyReduce_32 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_32 = happySpecReduce_3  7# happyReduction_32-happyReduction_32 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut313 happy_x_2 of { (HappyWrap313 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn23-		 (sLL happy_var_1 happy_var_3 $ HsModuleVar happy_var_2-	)}}}--happyReduce_33 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_33 = happySpecReduce_3  7# happyReduction_33-happyReduction_33 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut20 happy_x_1 of { (HappyWrap20 happy_var_1) -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	happyIn23-		 (sLL happy_var_1 happy_var_3 $ HsModuleId happy_var_1 happy_var_3-	)}}--happyReduce_34 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_34 = happySpecReduce_1  8# happyReduction_34-happyReduction_34 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn24-		 (sL1 happy_var_1 $ PackageName (getSTRING happy_var_1)-	)}--happyReduce_35 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_35 = happySpecReduce_1  8# happyReduction_35-happyReduction_35 happy_x_1-	 =  case happyOut26 happy_x_1 of { (HappyWrap26 happy_var_1) -> -	happyIn24-		 (sL1 happy_var_1 $ PackageName (unLoc happy_var_1)-	)}--happyReduce_36 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_36 = happySpecReduce_1  9# happyReduction_36-happyReduction_36 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn25-		 (sL1 happy_var_1 $ getVARID happy_var_1-	)}--happyReduce_37 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_37 = happySpecReduce_1  9# happyReduction_37-happyReduction_37 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn25-		 (sL1 happy_var_1 $ getCONID happy_var_1-	)}--happyReduce_38 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_38 = happySpecReduce_1  9# happyReduction_38-happyReduction_38 happy_x_1-	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> -	happyIn25-		 (happy_var_1-	)}--happyReduce_39 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_39 = happySpecReduce_1  10# happyReduction_39-happyReduction_39 happy_x_1-	 =  case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> -	happyIn26-		 (happy_var_1-	)}--happyReduce_40 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_40 = happySpecReduce_3  10# happyReduction_40-happyReduction_40 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> -	case happyOut26 happy_x_3 of { (HappyWrap26 happy_var_3) -> -	happyIn26-		 (sLL happy_var_1 happy_var_3 $ appendFS (unLoc happy_var_1) (consFS '-' (unLoc happy_var_3))-	)}}--happyReduce_41 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_41 = happySpecReduce_0  11# happyReduction_41-happyReduction_41  =  happyIn27-		 (Nothing-	)--happyReduce_42 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_42 = happySpecReduce_3  11# happyReduction_42-happyReduction_42 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut28 happy_x_2 of { (HappyWrap28 happy_var_2) -> -	happyIn27-		 (Just (fromOL happy_var_2)-	)}--happyReduce_43 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_43 = happySpecReduce_3  12# happyReduction_43-happyReduction_43 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut28 happy_x_1 of { (HappyWrap28 happy_var_1) -> -	case happyOut29 happy_x_3 of { (HappyWrap29 happy_var_3) -> -	happyIn28-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_44 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_44 = happySpecReduce_2  12# happyReduction_44-happyReduction_44 happy_x_2-	happy_x_1-	 =  case happyOut28 happy_x_1 of { (HappyWrap28 happy_var_1) -> -	happyIn28-		 (happy_var_1-	)}--happyReduce_45 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_45 = happySpecReduce_1  12# happyReduction_45-happyReduction_45 happy_x_1-	 =  case happyOut29 happy_x_1 of { (HappyWrap29 happy_var_1) -> -	happyIn28-		 (unitOL happy_var_1-	)}--happyReduce_46 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_46 = happySpecReduce_3  13# happyReduction_46-happyReduction_46 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	happyIn29-		 (sLL happy_var_1 happy_var_3 $ Renaming happy_var_1 (Just happy_var_3)-	)}}--happyReduce_47 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_47 = happySpecReduce_1  13# happyReduction_47-happyReduction_47 happy_x_1-	 =  case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> -	happyIn29-		 (sL1 happy_var_1    $ Renaming happy_var_1 Nothing-	)}--happyReduce_48 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_48 = happySpecReduce_3  14# happyReduction_48-happyReduction_48 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_2 of { (HappyWrap31 happy_var_2) -> -	happyIn30-		 (happy_var_2-	)}--happyReduce_49 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_49 = happySpecReduce_3  14# happyReduction_49-happyReduction_49 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_2 of { (HappyWrap31 happy_var_2) -> -	happyIn30-		 (happy_var_2-	)}--happyReduce_50 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_50 = happySpecReduce_3  15# happyReduction_50-happyReduction_50 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_1 of { (HappyWrap31 happy_var_1) -> -	case happyOut32 happy_x_3 of { (HappyWrap32 happy_var_3) -> -	happyIn31-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_51 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_51 = happySpecReduce_2  15# happyReduction_51-happyReduction_51 happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_1 of { (HappyWrap31 happy_var_1) -> -	happyIn31-		 (happy_var_1-	)}--happyReduce_52 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_52 = happySpecReduce_1  15# happyReduction_52-happyReduction_52 happy_x_1-	 =  case happyOut32 happy_x_1 of { (HappyWrap32 happy_var_1) -> -	happyIn31-		 (unitOL happy_var_1-	)}--happyReduce_53 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_53 = happyReduce 7# 16# happyReduction_53-happyReduction_53 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> -	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> -	case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> -	happyIn32-		 (sL1 happy_var_2 $ DeclD ModuleD happy_var_3 (Just (sL1 happy_var_2 (HsModule (Just happy_var_3) happy_var_5 (fst $ snd happy_var_7) (snd $ snd happy_var_7) happy_var_4 happy_var_1)))-	) `HappyStk` happyRest}}}}}}--happyReduce_54 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_54 = happyReduce 7# 16# happyReduction_54-happyReduction_54 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> -	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> -	case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> -	happyIn32-		 (sL1 happy_var_2 $ DeclD SignatureD happy_var_3 (Just (sL1 happy_var_2 (HsModule (Just happy_var_3) happy_var_5 (fst $ snd happy_var_7) (snd $ snd happy_var_7) happy_var_4 happy_var_1)))-	) `HappyStk` happyRest}}}}}}--happyReduce_55 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_55 = happySpecReduce_3  16# happyReduction_55-happyReduction_55 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	happyIn32-		 (sL1 happy_var_2 $ DeclD ModuleD happy_var_3 Nothing-	)}}--happyReduce_56 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_56 = happySpecReduce_3  16# happyReduction_56-happyReduction_56 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	happyIn32-		 (sL1 happy_var_2 $ DeclD SignatureD happy_var_3 Nothing-	)}}--happyReduce_57 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_57 = happySpecReduce_3  16# happyReduction_57-happyReduction_57 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut20 happy_x_2 of { (HappyWrap20 happy_var_2) -> -	case happyOut27 happy_x_3 of { (HappyWrap27 happy_var_3) -> -	happyIn32-		 (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_2-                                              , idModRenaming = happy_var_3-                                              , idSignatureInclude = False })-	)}}}--happyReduce_58 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_58 = happySpecReduce_3  16# happyReduction_58-happyReduction_58 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut20 happy_x_3 of { (HappyWrap20 happy_var_3) -> -	happyIn32-		 (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_3-                                              , idModRenaming = Nothing-                                              , idSignatureInclude = True })-	)}}--happyReduce_59 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_59 = happyMonadReduce 7# 17# happyReduction_59-happyReduction_59 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> -	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> -	( fileSrcSpan >>= \ loc ->-                ams (cL loc (HsModule (Just happy_var_3) happy_var_5 (fst $ snd happy_var_7)-                              (snd $ snd happy_var_7) happy_var_4 happy_var_1)-                    )-                    ([mj AnnSignature happy_var_2, mj AnnWhere happy_var_6] ++ fst happy_var_7))}}}}}}})-	) (\r -> happyReturn (happyIn33 r))--happyReduce_60 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_60 = happyMonadReduce 7# 18# happyReduction_60-happyReduction_60 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> -	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> -	( fileSrcSpan >>= \ loc ->-                ams (cL loc (HsModule (Just happy_var_3) happy_var_5 (fst $ snd happy_var_7)-                              (snd $ snd happy_var_7) happy_var_4 happy_var_1)-                    )-                    ([mj AnnModule happy_var_2, mj AnnWhere happy_var_6] ++ fst happy_var_7))}}}}}}})-	) (\r -> happyReturn (happyIn34 r))--happyReduce_61 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_61 = happyMonadReduce 1# 18# happyReduction_61-happyReduction_61 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut40 happy_x_1 of { (HappyWrap40 happy_var_1) -> -	( fileSrcSpan >>= \ loc ->-                   ams (cL loc (HsModule Nothing Nothing-                               (fst $ snd happy_var_1) (snd $ snd happy_var_1) Nothing Nothing))-                       (fst happy_var_1))})-	) (\r -> happyReturn (happyIn34 r))--happyReduce_62 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_62 = happySpecReduce_1  19# happyReduction_62-happyReduction_62 happy_x_1-	 =  case happyOut321 happy_x_1 of { (HappyWrap321 happy_var_1) -> -	happyIn35-		 (happy_var_1-	)}--happyReduce_63 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_63 = happySpecReduce_0  19# happyReduction_63-happyReduction_63  =  happyIn35-		 (Nothing-	)--happyReduce_64 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_64 = happyMonadReduce 0# 20# happyReduction_64-happyReduction_64 (happyRest) tk-	 = happyThen ((( pushModuleContext))-	) (\r -> happyReturn (happyIn36 r))--happyReduce_65 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_65 = happyMonadReduce 0# 21# happyReduction_65-happyReduction_65 (happyRest) tk-	 = happyThen ((( pushModuleContext))-	) (\r -> happyReturn (happyIn37 r))--happyReduce_66 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_66 = happyMonadReduce 3# 22# happyReduction_66-happyReduction_66 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ajs (Just (sLL happy_var_1 happy_var_3 $ DeprecatedTxt (sL1 happy_var_1 (getDEPRECATED_PRAGs happy_var_1)) (snd $ unLoc happy_var_2)))-                             (mo happy_var_1:mc happy_var_3: (fst $ unLoc happy_var_2)))}}})-	) (\r -> happyReturn (happyIn38 r))--happyReduce_67 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_67 = happyMonadReduce 3# 22# happyReduction_67-happyReduction_67 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ajs (Just (sLL happy_var_1 happy_var_3 $ WarningTxt (sL1 happy_var_1 (getWARNING_PRAGs happy_var_1)) (snd $ unLoc happy_var_2)))-                                (mo happy_var_1:mc happy_var_3 : (fst $ unLoc happy_var_2)))}}})-	) (\r -> happyReturn (happyIn38 r))--happyReduce_68 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_68 = happySpecReduce_0  22# happyReduction_68-happyReduction_68  =  happyIn38-		 (Nothing-	)--happyReduce_69 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_69 = happySpecReduce_3  23# happyReduction_69-happyReduction_69 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn39-		 ((moc happy_var_1:mcc happy_var_3:(fst happy_var_2)-                                         , snd happy_var_2)-	)}}}--happyReduce_70 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_70 = happySpecReduce_3  23# happyReduction_70-happyReduction_70 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> -	happyIn39-		 ((fst happy_var_2, snd happy_var_2)-	)}--happyReduce_71 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_71 = happySpecReduce_3  24# happyReduction_71-happyReduction_71 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn40-		 ((moc happy_var_1:mcc happy_var_3-                                                   :(fst happy_var_2), snd happy_var_2)-	)}}}--happyReduce_72 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_72 = happySpecReduce_3  24# happyReduction_72-happyReduction_72 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> -	happyIn40-		 (([],snd happy_var_2)-	)}--happyReduce_73 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_73 = happySpecReduce_2  25# happyReduction_73-happyReduction_73 happy_x_2-	happy_x_1-	 =  case happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> -	case happyOut42 happy_x_2 of { (HappyWrap42 happy_var_2) -> -	happyIn41-		 ((happy_var_1, happy_var_2)-	)}}--happyReduce_74 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_74 = happySpecReduce_2  26# happyReduction_74-happyReduction_74 happy_x_2-	happy_x_1-	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> -	case happyOut76 happy_x_2 of { (HappyWrap76 happy_var_2) -> -	happyIn42-		 ((reverse happy_var_1, cvTopDecls happy_var_2)-	)}}--happyReduce_75 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_75 = happySpecReduce_2  26# happyReduction_75-happyReduction_75 happy_x_2-	happy_x_1-	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> -	case happyOut75 happy_x_2 of { (HappyWrap75 happy_var_2) -> -	happyIn42-		 ((reverse happy_var_1, cvTopDecls happy_var_2)-	)}}--happyReduce_76 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_76 = happySpecReduce_1  26# happyReduction_76-happyReduction_76 happy_x_1-	 =  case happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> -	happyIn42-		 ((reverse happy_var_1, [])-	)}--happyReduce_77 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_77 = happyMonadReduce 7# 27# happyReduction_77-happyReduction_77 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> -	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut44 happy_x_7 of { (HappyWrap44 happy_var_7) -> -	( fileSrcSpan >>= \ loc ->-                   ams (cL loc (HsModule (Just happy_var_3) happy_var_5 happy_var_7 [] happy_var_4 happy_var_1-                          )) [mj AnnModule happy_var_2,mj AnnWhere happy_var_6])}}}}}}})-	) (\r -> happyReturn (happyIn43 r))--happyReduce_78 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_78 = happyMonadReduce 7# 27# happyReduction_78-happyReduction_78 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut313 happy_x_3 of { (HappyWrap313 happy_var_3) -> -	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> -	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut44 happy_x_7 of { (HappyWrap44 happy_var_7) -> -	( fileSrcSpan >>= \ loc ->-                   ams (cL loc (HsModule (Just happy_var_3) happy_var_5 happy_var_7 [] happy_var_4 happy_var_1-                          )) [mj AnnModule happy_var_2,mj AnnWhere happy_var_6])}}}}}}})-	) (\r -> happyReturn (happyIn43 r))--happyReduce_79 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_79 = happyMonadReduce 1# 27# happyReduction_79-happyReduction_79 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut45 happy_x_1 of { (HappyWrap45 happy_var_1) -> -	( fileSrcSpan >>= \ loc ->-                   return (cL loc (HsModule Nothing Nothing happy_var_1 [] Nothing-                          Nothing)))})-	) (\r -> happyReturn (happyIn43 r))--happyReduce_80 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_80 = happySpecReduce_2  28# happyReduction_80-happyReduction_80 happy_x_2-	happy_x_1-	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> -	happyIn44-		 (happy_var_2-	)}--happyReduce_81 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_81 = happySpecReduce_2  28# happyReduction_81-happyReduction_81 happy_x_2-	happy_x_1-	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> -	happyIn44-		 (happy_var_2-	)}--happyReduce_82 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_82 = happySpecReduce_2  29# happyReduction_82-happyReduction_82 happy_x_2-	happy_x_1-	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> -	happyIn45-		 (happy_var_2-	)}--happyReduce_83 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_83 = happySpecReduce_2  29# happyReduction_83-happyReduction_83 happy_x_2-	happy_x_1-	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> -	happyIn45-		 (happy_var_2-	)}--happyReduce_84 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_84 = happySpecReduce_2  30# happyReduction_84-happyReduction_84 happy_x_2-	happy_x_1-	 =  case happyOut47 happy_x_2 of { (HappyWrap47 happy_var_2) -> -	happyIn46-		 (happy_var_2-	)}--happyReduce_85 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_85 = happySpecReduce_1  31# happyReduction_85-happyReduction_85 happy_x_1-	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> -	happyIn47-		 (happy_var_1-	)}--happyReduce_86 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_86 = happySpecReduce_1  31# happyReduction_86-happyReduction_86 happy_x_1-	 =  case happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> -	happyIn47-		 (happy_var_1-	)}--happyReduce_87 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_87 = happyMonadReduce 3# 32# happyReduction_87-happyReduction_87 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut49 happy_x_2 of { (HappyWrap49 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( amsL (comb2 happy_var_1 happy_var_3) [mop happy_var_1,mcp happy_var_3] >>-                                       return (Just (sLL happy_var_1 happy_var_3 (fromOL happy_var_2))))}}})-	) (\r -> happyReturn (happyIn48 r))--happyReduce_88 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_88 = happySpecReduce_0  32# happyReduction_88-happyReduction_88  =  happyIn48-		 (Nothing-	)--happyReduce_89 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_89 = happyMonadReduce 3# 33# happyReduction_89-happyReduction_89 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> -	( addAnnotation (oll happy_var_1) AnnComma (gl happy_var_2)-                                         >> return (happy_var_1 `appOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn49 r))--happyReduce_90 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_90 = happySpecReduce_1  33# happyReduction_90-happyReduction_90 happy_x_1-	 =  case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> -	happyIn49-		 (happy_var_1-	)}--happyReduce_91 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_91 = happyMonadReduce 5# 34# happyReduction_91-happyReduction_91 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> -	case happyOut53 happy_x_2 of { (HappyWrap53 happy_var_2) -> -	case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut50 happy_x_5 of { (HappyWrap50 happy_var_5) -> -	( (addAnnotation (oll (happy_var_1 `appOL` happy_var_2 `appOL` happy_var_3))-                                            AnnComma (gl happy_var_4) ) >>-                              return (happy_var_1 `appOL` happy_var_2 `appOL` happy_var_3 `appOL` happy_var_5))}}}}})-	) (\r -> happyReturn (happyIn50 r))--happyReduce_92 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_92 = happySpecReduce_3  34# happyReduction_92-happyReduction_92 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> -	case happyOut53 happy_x_2 of { (HappyWrap53 happy_var_2) -> -	case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> -	happyIn50-		 (happy_var_1 `appOL` happy_var_2 `appOL` happy_var_3-	)}}}--happyReduce_93 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_93 = happySpecReduce_1  34# happyReduction_93-happyReduction_93 happy_x_1-	 =  case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> -	happyIn50-		 (happy_var_1-	)}--happyReduce_94 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_94 = happySpecReduce_2  35# happyReduction_94-happyReduction_94 happy_x_2-	happy_x_1-	 =  case happyOut52 happy_x_1 of { (HappyWrap52 happy_var_1) -> -	case happyOut51 happy_x_2 of { (HappyWrap51 happy_var_2) -> -	happyIn51-		 (happy_var_1 `appOL` happy_var_2-	)}}--happyReduce_95 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_95 = happySpecReduce_0  35# happyReduction_95-happyReduction_95  =  happyIn51-		 (nilOL-	)--happyReduce_96 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_96 = happySpecReduce_1  36# happyReduction_96-happyReduction_96 happy_x_1-	 =  case happyOut320 happy_x_1 of { (HappyWrap320 happy_var_1) -> -	happyIn52-		 (unitOL (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> IEGroup noExt n doc))-	)}--happyReduce_97 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_97 = happySpecReduce_1  36# happyReduction_97-happyReduction_97 happy_x_1-	 =  case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> -	happyIn52-		 (unitOL (sL1 happy_var_1 (IEDocNamed noExt ((fst . unLoc) happy_var_1)))-	)}--happyReduce_98 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_98 = happySpecReduce_1  36# happyReduction_98-happyReduction_98 happy_x_1-	 =  case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> -	happyIn52-		 (unitOL (sL1 happy_var_1 (IEDoc noExt (unLoc happy_var_1)))-	)}--happyReduce_99 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_99 = happyMonadReduce 2# 37# happyReduction_99-happyReduction_99 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut58 happy_x_1 of { (HappyWrap58 happy_var_1) -> -	case happyOut54 happy_x_2 of { (HappyWrap54 happy_var_2) -> -	( mkModuleImpExp happy_var_1 (snd $ unLoc happy_var_2)-                                          >>= \ie -> amsu (sLL happy_var_1 happy_var_2 ie) (fst $ unLoc happy_var_2))}})-	) (\r -> happyReturn (happyIn53 r))--happyReduce_100 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_100 = happyMonadReduce 2# 37# happyReduction_100-happyReduction_100 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut313 happy_x_2 of { (HappyWrap313 happy_var_2) -> -	( amsu (sLL happy_var_1 happy_var_2 (IEModuleContents noExt happy_var_2))-                                             [mj AnnModule happy_var_1])}})-	) (\r -> happyReturn (happyIn53 r))--happyReduce_101 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_101 = happyMonadReduce 2# 37# happyReduction_101-happyReduction_101 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut268 happy_x_2 of { (HappyWrap268 happy_var_2) -> -	( amsu (sLL happy_var_1 happy_var_2 (IEVar noExt (sLL happy_var_1 happy_var_2 (IEPattern happy_var_2))))-                                             [mj AnnPattern happy_var_1])}})-	) (\r -> happyReturn (happyIn53 r))--happyReduce_102 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_102 = happySpecReduce_0  38# happyReduction_102-happyReduction_102  =  happyIn54-		 (sL0 ([],ImpExpAbs)-	)--happyReduce_103 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_103 = happyMonadReduce 3# 38# happyReduction_103-happyReduction_103 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut55 happy_x_2 of { (HappyWrap55 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( mkImpExpSubSpec (reverse (snd happy_var_2))-                                      >>= \(as,ie) -> return $ sLL happy_var_1 happy_var_3-                                            (as ++ [mop happy_var_1,mcp happy_var_3] ++ fst happy_var_2, ie))}}})-	) (\r -> happyReturn (happyIn54 r))--happyReduce_104 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_104 = happySpecReduce_0  39# happyReduction_104-happyReduction_104  =  happyIn55-		 (([],[])-	)--happyReduce_105 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_105 = happySpecReduce_1  39# happyReduction_105-happyReduction_105 happy_x_1-	 =  case happyOut56 happy_x_1 of { (HappyWrap56 happy_var_1) -> -	happyIn55-		 (happy_var_1-	)}--happyReduce_106 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_106 = happyMonadReduce 3# 40# happyReduction_106-happyReduction_106 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut56 happy_x_1 of { (HappyWrap56 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut57 happy_x_3 of { (HappyWrap57 happy_var_3) -> -	( case (head (snd happy_var_1)) of-                                                    l@(dL->L _ ImpExpQcWildcard) ->-                                                       return ([mj AnnComma happy_var_2, mj AnnDotdot l]-                                                               ,(snd (unLoc happy_var_3)  : snd happy_var_1))-                                                    l -> (ams (head (snd happy_var_1)) [mj AnnComma happy_var_2] >>-                                                          return (fst happy_var_1 ++ fst (unLoc happy_var_3),-                                                                  snd (unLoc happy_var_3) : snd happy_var_1)))}}})-	) (\r -> happyReturn (happyIn56 r))--happyReduce_107 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_107 = happySpecReduce_1  40# happyReduction_107-happyReduction_107 happy_x_1-	 =  case happyOut57 happy_x_1 of { (HappyWrap57 happy_var_1) -> -	happyIn56-		 ((fst (unLoc happy_var_1),[snd (unLoc happy_var_1)])-	)}--happyReduce_108 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_108 = happySpecReduce_1  41# happyReduction_108-happyReduction_108 happy_x_1-	 =  case happyOut58 happy_x_1 of { (HappyWrap58 happy_var_1) -> -	happyIn57-		 (sL1 happy_var_1 ([],happy_var_1)-	)}--happyReduce_109 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_109 = happySpecReduce_1  41# happyReduction_109-happyReduction_109 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn57-		 (sL1 happy_var_1 ([mj AnnDotdot happy_var_1], sL1 happy_var_1 ImpExpQcWildcard)-	)}--happyReduce_110 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_110 = happySpecReduce_1  42# happyReduction_110-happyReduction_110 happy_x_1-	 =  case happyOut59 happy_x_1 of { (HappyWrap59 happy_var_1) -> -	happyIn58-		 (sL1 happy_var_1 (ImpExpQcName happy_var_1)-	)}--happyReduce_111 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_111 = happyMonadReduce 2# 42# happyReduction_111-happyReduction_111 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut278 happy_x_2 of { (HappyWrap278 happy_var_2) -> -	( do { n <- mkTypeImpExp happy_var_2-                                          ; ams (sLL happy_var_1 happy_var_2 (ImpExpQcType n))-                                                [mj AnnType happy_var_1] })}})-	) (\r -> happyReturn (happyIn58 r))--happyReduce_112 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_112 = happySpecReduce_1  43# happyReduction_112-happyReduction_112 happy_x_1-	 =  case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> -	happyIn59-		 (happy_var_1-	)}--happyReduce_113 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_113 = happySpecReduce_1  43# happyReduction_113-happyReduction_113 happy_x_1-	 =  case happyOut279 happy_x_1 of { (HappyWrap279 happy_var_1) -> -	happyIn59-		 (happy_var_1-	)}--happyReduce_114 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_114 = happySpecReduce_2  44# happyReduction_114-happyReduction_114 happy_x_2-	happy_x_1-	 =  case happyOut60 happy_x_1 of { (HappyWrap60 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn60-		 (mj AnnSemi happy_var_2 : happy_var_1-	)}}--happyReduce_115 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_115 = happySpecReduce_1  44# happyReduction_115-happyReduction_115 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn60-		 ([mj AnnSemi happy_var_1]-	)}--happyReduce_116 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_116 = happySpecReduce_2  45# happyReduction_116-happyReduction_116 happy_x_2-	happy_x_1-	 =  case happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn61-		 (mj AnnSemi happy_var_2 : happy_var_1-	)}}--happyReduce_117 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_117 = happySpecReduce_0  45# happyReduction_117-happyReduction_117  =  happyIn61-		 ([]-	)--happyReduce_118 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_118 = happySpecReduce_2  46# happyReduction_118-happyReduction_118 happy_x_2-	happy_x_1-	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> -	case happyOut64 happy_x_2 of { (HappyWrap64 happy_var_2) -> -	happyIn62-		 (happy_var_2 : happy_var_1-	)}}--happyReduce_119 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_119 = happyMonadReduce 3# 47# happyReduction_119-happyReduction_119 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> -	case happyOut64 happy_x_2 of { (HappyWrap64 happy_var_2) -> -	case happyOut60 happy_x_3 of { (HappyWrap60 happy_var_3) -> -	( ams happy_var_2 happy_var_3 >> return (happy_var_2 : happy_var_1))}}})-	) (\r -> happyReturn (happyIn63 r))--happyReduce_120 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_120 = happySpecReduce_0  47# happyReduction_120-happyReduction_120  =  happyIn63-		 ([]-	)--happyReduce_121 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_121 = happyMonadReduce 8# 48# happyReduction_121-happyReduction_121 (happy_x_8 `HappyStk`-	happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut65 happy_x_2 of { (HappyWrap65 happy_var_2) -> -	case happyOut66 happy_x_3 of { (HappyWrap66 happy_var_3) -> -	case happyOut68 happy_x_4 of { (HappyWrap68 happy_var_4) -> -	case happyOut67 happy_x_5 of { (HappyWrap67 happy_var_5) -> -	case happyOut313 happy_x_6 of { (HappyWrap313 happy_var_6) -> -	case happyOut69 happy_x_7 of { (HappyWrap69 happy_var_7) -> -	case happyOut70 happy_x_8 of { (HappyWrap70 happy_var_8) -> -	( ams (cL (comb4 happy_var_1 happy_var_6 (snd happy_var_7) happy_var_8) $-                  ImportDecl { ideclExt = noExt-                             , ideclSourceSrc = snd $ fst happy_var_2-                             , ideclName = happy_var_6, ideclPkgQual = snd happy_var_5-                             , ideclSource = snd happy_var_2, ideclSafe = snd happy_var_3-                             , ideclQualified = snd happy_var_4, ideclImplicit = False-                             , ideclAs = unLoc (snd happy_var_7)-                             , ideclHiding = unLoc happy_var_8 })-                   ((mj AnnImport happy_var_1 : (fst $ fst happy_var_2) ++ fst happy_var_3 ++ fst happy_var_4-                                    ++ fst happy_var_5 ++ fst happy_var_7)))}}}}}}}})-	) (\r -> happyReturn (happyIn64 r))--happyReduce_122 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_122 = happySpecReduce_2  49# happyReduction_122-happyReduction_122 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn65-		 ((([mo happy_var_1,mc happy_var_2],getSOURCE_PRAGs happy_var_1)-                                      ,True)-	)}}--happyReduce_123 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_123 = happySpecReduce_0  49# happyReduction_123-happyReduction_123  =  happyIn65-		 ((([],NoSourceText),False)-	)--happyReduce_124 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_124 = happySpecReduce_1  50# happyReduction_124-happyReduction_124 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn66-		 (([mj AnnSafe happy_var_1],True)-	)}--happyReduce_125 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_125 = happySpecReduce_0  50# happyReduction_125-happyReduction_125  =  happyIn66-		 (([],False)-	)--happyReduce_126 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_126 = happyMonadReduce 1# 51# happyReduction_126-happyReduction_126 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( let pkgFS = getSTRING happy_var_1 in-                     if looksLikePackageName (unpackFS pkgFS)-                        then return ([mj AnnPackageName happy_var_1], Just (StringLiteral (getSTRINGs happy_var_1) pkgFS))-                        else parseErrorSDoc (getLoc happy_var_1) $ vcat [-                             text "parse error" <> colon <+> quotes (ppr pkgFS),-                             text "Version number or non-alphanumeric" <+>-                             text "character in package name"])})-	) (\r -> happyReturn (happyIn67 r))--happyReduce_127 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_127 = happySpecReduce_0  51# happyReduction_127-happyReduction_127  =  happyIn67-		 (([],Nothing)-	)--happyReduce_128 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_128 = happySpecReduce_1  52# happyReduction_128-happyReduction_128 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn68-		 (([mj AnnQualified happy_var_1],True)-	)}--happyReduce_129 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_129 = happySpecReduce_0  52# happyReduction_129-happyReduction_129  =  happyIn68-		 (([],False)-	)--happyReduce_130 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_130 = happySpecReduce_2  53# happyReduction_130-happyReduction_130 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut313 happy_x_2 of { (HappyWrap313 happy_var_2) -> -	happyIn69-		 (([mj AnnAs happy_var_1]-                                                 ,sLL happy_var_1 happy_var_2 (Just happy_var_2))-	)}}--happyReduce_131 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_131 = happySpecReduce_0  53# happyReduction_131-happyReduction_131  =  happyIn69-		 (([],noLoc Nothing)-	)--happyReduce_132 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_132 = happyMonadReduce 1# 54# happyReduction_132-happyReduction_132 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut71 happy_x_1 of { (HappyWrap71 happy_var_1) -> -	( let (b, ie) = unLoc happy_var_1 in-                                       checkImportSpec ie-                                        >>= \checkedIe ->-                                          return (cL (gl happy_var_1) (Just (b, checkedIe))))})-	) (\r -> happyReturn (happyIn70 r))--happyReduce_133 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_133 = happySpecReduce_0  54# happyReduction_133-happyReduction_133  =  happyIn70-		 (noLoc Nothing-	)--happyReduce_134 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_134 = happyMonadReduce 3# 55# happyReduction_134-happyReduction_134 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut49 happy_x_2 of { (HappyWrap49 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (False,-                                                      sLL happy_var_1 happy_var_3 $ fromOL happy_var_2))-                                                   [mop happy_var_1,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn71 r))--happyReduce_135 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_135 = happyMonadReduce 4# 55# happyReduction_135-happyReduction_135 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut49 happy_x_3 of { (HappyWrap49 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 (True,-                                                      sLL happy_var_1 happy_var_4 $ fromOL happy_var_3))-                                               [mj AnnHiding happy_var_1,mop happy_var_2,mcp happy_var_4])}}}})-	) (\r -> happyReturn (happyIn71 r))--happyReduce_136 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_136 = happySpecReduce_0  56# happyReduction_136-happyReduction_136  =  happyIn72-		 (noLoc (NoSourceText,9)-	)--happyReduce_137 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_137 = happySpecReduce_1  56# happyReduction_137-happyReduction_137 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn72-		 (sL1 happy_var_1 (getINTEGERs happy_var_1,fromInteger (il_value (getINTEGER happy_var_1)))-	)}--happyReduce_138 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_138 = happySpecReduce_1  57# happyReduction_138-happyReduction_138 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn73-		 (sL1 happy_var_1 InfixN-	)}--happyReduce_139 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_139 = happySpecReduce_1  57# happyReduction_139-happyReduction_139 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn73-		 (sL1 happy_var_1 InfixL-	)}--happyReduce_140 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_140 = happySpecReduce_1  57# happyReduction_140-happyReduction_140 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn73-		 (sL1 happy_var_1 InfixR-	)}--happyReduce_141 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_141 = happyMonadReduce 3# 58# happyReduction_141-happyReduction_141 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut74 happy_x_1 of { (HappyWrap74 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut286 happy_x_3 of { (HappyWrap286 happy_var_3) -> -	( addAnnotation (oll $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>-                              return (sLL happy_var_1 happy_var_3 ((unLoc happy_var_1) `appOL` unitOL happy_var_3)))}}})-	) (\r -> happyReturn (happyIn74 r))--happyReduce_142 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_142 = happySpecReduce_1  58# happyReduction_142-happyReduction_142 happy_x_1-	 =  case happyOut286 happy_x_1 of { (HappyWrap286 happy_var_1) -> -	happyIn74-		 (sL1 happy_var_1 (unitOL happy_var_1)-	)}--happyReduce_143 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_143 = happySpecReduce_2  59# happyReduction_143-happyReduction_143 happy_x_2-	happy_x_1-	 =  case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> -	case happyOut77 happy_x_2 of { (HappyWrap77 happy_var_2) -> -	happyIn75-		 (happy_var_1 `snocOL` happy_var_2-	)}}--happyReduce_144 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_144 = happyMonadReduce 3# 60# happyReduction_144-happyReduction_144 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> -	case happyOut77 happy_x_2 of { (HappyWrap77 happy_var_2) -> -	case happyOut60 happy_x_3 of { (HappyWrap60 happy_var_3) -> -	( ams happy_var_2 happy_var_3 >> return (happy_var_1 `snocOL` happy_var_2))}}})-	) (\r -> happyReturn (happyIn76 r))--happyReduce_145 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_145 = happySpecReduce_0  60# happyReduction_145-happyReduction_145  =  happyIn76-		 (nilOL-	)--happyReduce_146 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_146 = happySpecReduce_1  61# happyReduction_146-happyReduction_146 happy_x_1-	 =  case happyOut78 happy_x_1 of { (HappyWrap78 happy_var_1) -> -	happyIn77-		 (sL1 happy_var_1 (TyClD noExt (unLoc happy_var_1))-	)}--happyReduce_147 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_147 = happySpecReduce_1  61# happyReduction_147-happyReduction_147 happy_x_1-	 =  case happyOut79 happy_x_1 of { (HappyWrap79 happy_var_1) -> -	happyIn77-		 (sL1 happy_var_1 (TyClD noExt (unLoc happy_var_1))-	)}--happyReduce_148 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_148 = happySpecReduce_1  61# happyReduction_148-happyReduction_148 happy_x_1-	 =  case happyOut80 happy_x_1 of { (HappyWrap80 happy_var_1) -> -	happyIn77-		 (sL1 happy_var_1 (InstD noExt (unLoc happy_var_1))-	)}--happyReduce_149 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_149 = happySpecReduce_1  61# happyReduction_149-happyReduction_149 happy_x_1-	 =  case happyOut104 happy_x_1 of { (HappyWrap104 happy_var_1) -> -	happyIn77-		 (sLL happy_var_1 happy_var_1 (DerivD noExt (unLoc happy_var_1))-	)}--happyReduce_150 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_150 = happySpecReduce_1  61# happyReduction_150-happyReduction_150 happy_x_1-	 =  case happyOut105 happy_x_1 of { (HappyWrap105 happy_var_1) -> -	happyIn77-		 (sL1 happy_var_1 (RoleAnnotD noExt (unLoc happy_var_1))-	)}--happyReduce_151 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_151 = happyMonadReduce 4# 61# happyReduction_151-happyReduction_151 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut169 happy_x_3 of { (HappyWrap169 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 (DefD noExt (DefaultDecl noExt happy_var_3)))-                                                         [mj AnnDefault happy_var_1-                                                         ,mop happy_var_2,mcp happy_var_4])}}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_152 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_152 = happyMonadReduce 2# 61# happyReduction_152-happyReduction_152 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut141 happy_x_2 of { (HappyWrap141 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 (snd $ unLoc happy_var_2))-                                           (mj AnnForeign happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_153 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_153 = happyMonadReduce 3# 61# happyReduction_153-happyReduction_153 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut136 happy_x_2 of { (HappyWrap136 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ WarningD noExt (Warnings noExt (getDEPRECATED_PRAGs happy_var_1) (fromOL happy_var_2)))-                                                       [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_154 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_154 = happyMonadReduce 3# 61# happyReduction_154-happyReduction_154 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ WarningD noExt (Warnings noExt (getWARNING_PRAGs happy_var_1) (fromOL happy_var_2)))-                                                       [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_155 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_155 = happyMonadReduce 3# 61# happyReduction_155-happyReduction_155 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut127 happy_x_2 of { (HappyWrap127 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ RuleD noExt (HsRules noExt (getRULES_PRAGs happy_var_1) (fromOL happy_var_2)))-                                                       [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_156 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_156 = happySpecReduce_1  61# happyReduction_156-happyReduction_156 happy_x_1-	 =  case happyOut140 happy_x_1 of { (HappyWrap140 happy_var_1) -> -	happyIn77-		 (happy_var_1-	)}--happyReduce_157 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_157 = happySpecReduce_1  61# happyReduction_157-happyReduction_157 happy_x_1-	 =  case happyOut197 happy_x_1 of { (HappyWrap197 happy_var_1) -> -	happyIn77-		 (happy_var_1-	)}--happyReduce_158 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_158 = happySpecReduce_1  61# happyReduction_158-happyReduction_158 happy_x_1-	 =  case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> -	happyIn77-		 (sLL happy_var_1 happy_var_1 $ mkSpliceDecl happy_var_1-	)}--happyReduce_159 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_159 = happyMonadReduce 4# 62# happyReduction_159-happyReduction_159 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut101 happy_x_2 of { (HappyWrap101 happy_var_2) -> -	case happyOut174 happy_x_3 of { (HappyWrap174 happy_var_3) -> -	case happyOut118 happy_x_4 of { (HappyWrap118 happy_var_4) -> -	( amms (mkClassDecl (comb4 happy_var_1 happy_var_2 happy_var_3 happy_var_4) happy_var_2 happy_var_3 (snd $ unLoc happy_var_4))-                        (mj AnnClass happy_var_1:(fst $ unLoc happy_var_3)++(fst $ unLoc happy_var_4)))}}}})-	) (\r -> happyReturn (happyIn78 r))--happyReduce_160 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_160 = happyMonadReduce 4# 63# happyReduction_160-happyReduction_160 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut158 happy_x_2 of { (HappyWrap158 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut153 happy_x_4 of { (HappyWrap153 happy_var_4) -> -	( amms (mkTySynonym (comb2 happy_var_1 happy_var_4) happy_var_2 happy_var_4)-                        [mj AnnType happy_var_1,mj AnnEqual happy_var_3])}}}})-	) (\r -> happyReturn (happyIn79 r))--happyReduce_161 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_161 = happyMonadReduce 6# 63# happyReduction_161-happyReduction_161 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	case happyOut99 happy_x_4 of { (HappyWrap99 happy_var_4) -> -	case happyOut85 happy_x_5 of { (HappyWrap85 happy_var_5) -> -	case happyOut88 happy_x_6 of { (HappyWrap88 happy_var_6) -> -	( amms (mkFamDecl (comb4 happy_var_1 happy_var_3 happy_var_4 happy_var_5) (snd $ unLoc happy_var_6) happy_var_3-                                   (snd $ unLoc happy_var_4) (snd $ unLoc happy_var_5))-                        (mj AnnType happy_var_1:mj AnnFamily happy_var_2:(fst $ unLoc happy_var_4)-                           ++ (fst $ unLoc happy_var_5) ++ (fst $ unLoc happy_var_6)))}}}}}})-	) (\r -> happyReturn (happyIn79 r))--happyReduce_162 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_162 = happyMonadReduce 5# 63# happyReduction_162-happyReduction_162 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOut103 happy_x_2 of { (HappyWrap103 happy_var_2) -> -	case happyOut101 happy_x_3 of { (HappyWrap101 happy_var_3) -> -	case happyOut183 happy_x_4 of { (HappyWrap183 happy_var_4) -> -	case happyOut191 happy_x_5 of { (HappyWrap191 happy_var_5) -> -	( amms (mkTyData (comb4 happy_var_1 happy_var_3 happy_var_4 happy_var_5) (snd $ unLoc happy_var_1) happy_var_2 happy_var_3-                           Nothing (reverse (snd $ unLoc happy_var_4))-                                   (fmap reverse happy_var_5))-                                   -- We need the location on tycl_hdr in case-                                   -- constrs and deriving are both empty-                        ((fst $ unLoc happy_var_1):(fst $ unLoc happy_var_4)))}}}}})-	) (\r -> happyReturn (happyIn79 r))--happyReduce_163 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_163 = happyMonadReduce 6# 63# happyReduction_163-happyReduction_163 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOut103 happy_x_2 of { (HappyWrap103 happy_var_2) -> -	case happyOut101 happy_x_3 of { (HappyWrap101 happy_var_3) -> -	case happyOut97 happy_x_4 of { (HappyWrap97 happy_var_4) -> -	case happyOut179 happy_x_5 of { (HappyWrap179 happy_var_5) -> -	case happyOut191 happy_x_6 of { (HappyWrap191 happy_var_6) -> -	( amms (mkTyData (comb4 happy_var_1 happy_var_3 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_2 happy_var_3-                            (snd $ unLoc happy_var_4) (snd $ unLoc happy_var_5)-                            (fmap reverse happy_var_6) )-                                   -- We need the location on tycl_hdr in case-                                   -- constrs and deriving are both empty-                    ((fst $ unLoc happy_var_1):(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})-	) (\r -> happyReturn (happyIn79 r))--happyReduce_164 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_164 = happyMonadReduce 4# 63# happyReduction_164-happyReduction_164 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	case happyOut98 happy_x_4 of { (HappyWrap98 happy_var_4) -> -	( amms (mkFamDecl (comb3 happy_var_1 happy_var_2 happy_var_4) DataFamily happy_var_3-                                   (snd $ unLoc happy_var_4) Nothing)-                        (mj AnnData happy_var_1:mj AnnFamily happy_var_2:(fst $ unLoc happy_var_4)))}}}})-	) (\r -> happyReturn (happyIn79 r))--happyReduce_165 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_165 = happyMonadReduce 4# 64# happyReduction_165-happyReduction_165 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut81 happy_x_2 of { (HappyWrap81 happy_var_2) -> -	case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> -	case happyOut122 happy_x_4 of { (HappyWrap122 happy_var_4) -> -	( do { (binds, sigs, _, ats, adts, _) <- cvBindsAndSigs (snd $ unLoc happy_var_4)-             ; let cid = ClsInstDecl { cid_ext = noExt-                                     , cid_poly_ty = happy_var_3, cid_binds = binds-                                     , cid_sigs = mkClassOpSigs sigs-                                     , cid_tyfam_insts = ats-                                     , cid_overlap_mode = happy_var_2-                                     , cid_datafam_insts = adts }-             ; ams (cL (comb3 happy_var_1 (hsSigType happy_var_3) happy_var_4) (ClsInstD { cid_d_ext = noExt, cid_inst = cid }))-                   (mj AnnInstance happy_var_1 : (fst $ unLoc happy_var_4)) })}}}})-	) (\r -> happyReturn (happyIn80 r))--happyReduce_166 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_166 = happyMonadReduce 3# 64# happyReduction_166-happyReduction_166 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut91 happy_x_3 of { (HappyWrap91 happy_var_3) -> -	( ams happy_var_3 (fst $ unLoc happy_var_3)-                >> amms (mkTyFamInst (comb2 happy_var_1 happy_var_3) (snd $ unLoc happy_var_3))-                    (mj AnnType happy_var_1:mj AnnInstance happy_var_2:(fst $ unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn80 r))--happyReduce_167 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_167 = happyMonadReduce 6# 64# happyReduction_167-happyReduction_167 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut103 happy_x_3 of { (HappyWrap103 happy_var_3) -> -	case happyOut102 happy_x_4 of { (HappyWrap102 happy_var_4) -> -	case happyOut183 happy_x_5 of { (HappyWrap183 happy_var_5) -> -	case happyOut191 happy_x_6 of { (HappyWrap191 happy_var_6) -> -	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (snd $ unLoc happy_var_4)-                                      Nothing (reverse (snd  $ unLoc happy_var_5))-                                              (fmap reverse happy_var_6))-                    ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2:(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})-	) (\r -> happyReturn (happyIn80 r))--happyReduce_168 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_168 = happyMonadReduce 7# 64# happyReduction_168-happyReduction_168 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut103 happy_x_3 of { (HappyWrap103 happy_var_3) -> -	case happyOut102 happy_x_4 of { (HappyWrap102 happy_var_4) -> -	case happyOut97 happy_x_5 of { (HappyWrap97 happy_var_5) -> -	case happyOut179 happy_x_6 of { (HappyWrap179 happy_var_6) -> -	case happyOut191 happy_x_7 of { (HappyWrap191 happy_var_7) -> -	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3 (snd $ unLoc happy_var_4)-                                   (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)-                                   (fmap reverse happy_var_7))-                    ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2-                       :(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})-	) (\r -> happyReturn (happyIn80 r))--happyReduce_169 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_169 = happyMonadReduce 2# 65# happyReduction_169-happyReduction_169 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ajs (Just (sLL happy_var_1 happy_var_2 (Overlappable (getOVERLAPPABLE_PRAGs happy_var_1))))-                                       [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn81 r))--happyReduce_170 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_170 = happyMonadReduce 2# 65# happyReduction_170-happyReduction_170 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ajs (Just (sLL happy_var_1 happy_var_2 (Overlapping (getOVERLAPPING_PRAGs happy_var_1))))-                                       [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn81 r))--happyReduce_171 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_171 = happyMonadReduce 2# 65# happyReduction_171-happyReduction_171 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ajs (Just (sLL happy_var_1 happy_var_2 (Overlaps (getOVERLAPS_PRAGs happy_var_1))))-                                       [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn81 r))--happyReduce_172 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_172 = happyMonadReduce 2# 65# happyReduction_172-happyReduction_172 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ajs (Just (sLL happy_var_1 happy_var_2 (Incoherent (getINCOHERENT_PRAGs happy_var_1))))-                                       [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn81 r))--happyReduce_173 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_173 = happySpecReduce_0  65# happyReduction_173-happyReduction_173  =  happyIn81-		 (Nothing-	)--happyReduce_174 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_174 = happyMonadReduce 1# 66# happyReduction_174-happyReduction_174 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ams (sL1 happy_var_1 StockStrategy)-                                       [mj AnnStock happy_var_1])})-	) (\r -> happyReturn (happyIn82 r))--happyReduce_175 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_175 = happyMonadReduce 1# 66# happyReduction_175-happyReduction_175 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ams (sL1 happy_var_1 AnyclassStrategy)-                                       [mj AnnAnyclass happy_var_1])})-	) (\r -> happyReturn (happyIn82 r))--happyReduce_176 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_176 = happyMonadReduce 1# 66# happyReduction_176-happyReduction_176 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ams (sL1 happy_var_1 NewtypeStrategy)-                                       [mj AnnNewtype happy_var_1])})-	) (\r -> happyReturn (happyIn82 r))--happyReduce_177 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_177 = happyMonadReduce 2# 67# happyReduction_177-happyReduction_177 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut158 happy_x_2 of { (HappyWrap158 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 (ViaStrategy (mkLHsSigType happy_var_2)))-                                            [mj AnnVia happy_var_1])}})-	) (\r -> happyReturn (happyIn83 r))--happyReduce_178 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_178 = happyMonadReduce 1# 68# happyReduction_178-happyReduction_178 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ajs (Just (sL1 happy_var_1 StockStrategy))-                                       [mj AnnStock happy_var_1])})-	) (\r -> happyReturn (happyIn84 r))--happyReduce_179 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_179 = happyMonadReduce 1# 68# happyReduction_179-happyReduction_179 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ajs (Just (sL1 happy_var_1 AnyclassStrategy))-                                       [mj AnnAnyclass happy_var_1])})-	) (\r -> happyReturn (happyIn84 r))--happyReduce_180 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_180 = happyMonadReduce 1# 68# happyReduction_180-happyReduction_180 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ajs (Just (sL1 happy_var_1 NewtypeStrategy))-                                       [mj AnnNewtype happy_var_1])})-	) (\r -> happyReturn (happyIn84 r))--happyReduce_181 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_181 = happySpecReduce_1  68# happyReduction_181-happyReduction_181 happy_x_1-	 =  case happyOut83 happy_x_1 of { (HappyWrap83 happy_var_1) -> -	happyIn84-		 (Just happy_var_1-	)}--happyReduce_182 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_182 = happySpecReduce_0  68# happyReduction_182-happyReduction_182  =  happyIn84-		 (Nothing-	)--happyReduce_183 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_183 = happySpecReduce_0  69# happyReduction_183-happyReduction_183  =  happyIn85-		 (noLoc ([], Nothing)-	)--happyReduce_184 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_184 = happySpecReduce_2  69# happyReduction_184-happyReduction_184 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut86 happy_x_2 of { (HappyWrap86 happy_var_2) -> -	happyIn85-		 (sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]-                                                , Just (happy_var_2))-	)}}--happyReduce_185 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_185 = happyMonadReduce 3# 70# happyReduction_185-happyReduction_185 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut295 happy_x_1 of { (HappyWrap295 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut87 happy_x_3 of { (HappyWrap87 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 (InjectivityAnn happy_var_1 (reverse (unLoc happy_var_3))))-                  [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn86 r))--happyReduce_186 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_186 = happySpecReduce_2  71# happyReduction_186-happyReduction_186 happy_x_2-	happy_x_1-	 =  case happyOut87 happy_x_1 of { (HappyWrap87 happy_var_1) -> -	case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> -	happyIn87-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)-	)}}--happyReduce_187 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_187 = happySpecReduce_1  71# happyReduction_187-happyReduction_187 happy_x_1-	 =  case happyOut295 happy_x_1 of { (HappyWrap295 happy_var_1) -> -	happyIn87-		 (sLL happy_var_1 happy_var_1 [happy_var_1]-	)}--happyReduce_188 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_188 = happySpecReduce_0  72# happyReduction_188-happyReduction_188  =  happyIn88-		 (noLoc ([],OpenTypeFamily)-	)--happyReduce_189 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_189 = happySpecReduce_2  72# happyReduction_189-happyReduction_189 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut89 happy_x_2 of { (HappyWrap89 happy_var_2) -> -	happyIn88-		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)-                    ,ClosedTypeFamily (fmap reverse $ snd $ unLoc happy_var_2))-	)}}--happyReduce_190 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_190 = happySpecReduce_3  73# happyReduction_190-happyReduction_190 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut90 happy_x_2 of { (HappyWrap90 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn89-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]-                                                ,Just (unLoc happy_var_2))-	)}}}--happyReduce_191 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_191 = happySpecReduce_3  73# happyReduction_191-happyReduction_191 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut90 happy_x_2 of { (HappyWrap90 happy_var_2) -> -	happyIn89-		 (let (dL->L loc _) = happy_var_2 in-                                             cL loc ([],Just (unLoc happy_var_2))-	)}--happyReduce_192 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_192 = happySpecReduce_3  73# happyReduction_192-happyReduction_192 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn89-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mj AnnDotdot happy_var_2-                                                 ,mcc happy_var_3],Nothing)-	)}}}--happyReduce_193 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_193 = happySpecReduce_3  73# happyReduction_193-happyReduction_193 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn89-		 (let (dL->L loc _) = happy_var_2 in-                                             cL loc ([mj AnnDotdot happy_var_2],Nothing)-	)}--happyReduce_194 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_194 = happyMonadReduce 3# 74# happyReduction_194-happyReduction_194 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut90 happy_x_1 of { (HappyWrap90 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut91 happy_x_3 of { (HappyWrap91 happy_var_3) -> -	( let (dL->L loc (anns, eqn)) = happy_var_3 in-                                         asl (unLoc happy_var_1) happy_var_2 (cL loc eqn)-                                         >> ams happy_var_3 anns-                                         >> return (sLL happy_var_1 happy_var_3 (cL loc eqn : unLoc happy_var_1)))}}})-	) (\r -> happyReturn (happyIn90 r))--happyReduce_195 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_195 = happyMonadReduce 2# 74# happyReduction_195-happyReduction_195 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut90 happy_x_1 of { (HappyWrap90 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( addAnnotation (gl happy_var_1) AnnSemi (gl happy_var_2)-                                         >> return (sLL happy_var_1 happy_var_2  (unLoc happy_var_1)))}})-	) (\r -> happyReturn (happyIn90 r))--happyReduce_196 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_196 = happyMonadReduce 1# 74# happyReduction_196-happyReduction_196 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut91 happy_x_1 of { (HappyWrap91 happy_var_1) -> -	( let (dL->L loc (anns, eqn)) = happy_var_1 in-                                         ams happy_var_1 anns-                                         >> return (sLL happy_var_1 happy_var_1 [cL loc eqn]))})-	) (\r -> happyReturn (happyIn90 r))--happyReduce_197 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_197 = happySpecReduce_0  74# happyReduction_197-happyReduction_197  =  happyIn90-		 (noLoc []-	)--happyReduce_198 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_198 = happyMonadReduce 6# 75# happyReduction_198-happyReduction_198 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut158 happy_x_4 of { (HappyWrap158 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOut152 happy_x_6 of { (HappyWrap152 happy_var_6) -> -	( do { hintExplicitForall happy_var_1-                    ; (eqn,ann) <- mkTyFamInstEqn (Just happy_var_2) happy_var_4 happy_var_6-                    ; return (sLL happy_var_1 happy_var_6-                               (mu AnnForall happy_var_1:mj AnnDot happy_var_3:mj AnnEqual happy_var_5:ann,eqn)) })}}}}}})-	) (\r -> happyReturn (happyIn91 r))--happyReduce_199 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_199 = happyMonadReduce 3# 75# happyReduction_199-happyReduction_199 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut152 happy_x_3 of { (HappyWrap152 happy_var_3) -> -	( do { (eqn,ann) <- mkTyFamInstEqn Nothing happy_var_1 happy_var_3-                    ; return (sLL happy_var_1 happy_var_3 (mj AnnEqual happy_var_2:ann, eqn))  })}}})-	) (\r -> happyReturn (happyIn91 r))--happyReduce_200 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_200 = happyMonadReduce 4# 76# happyReduction_200-happyReduction_200 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut93 happy_x_2 of { (HappyWrap93 happy_var_2) -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	case happyOut98 happy_x_4 of { (HappyWrap98 happy_var_4) -> -	( amms (liftM mkTyClD (mkFamDecl (comb3 happy_var_1 happy_var_3 happy_var_4) DataFamily happy_var_3-                                                  (snd $ unLoc happy_var_4) Nothing))-                        (mj AnnData happy_var_1:happy_var_2++(fst $ unLoc happy_var_4)))}}}})-	) (\r -> happyReturn (happyIn92 r))--happyReduce_201 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_201 = happyMonadReduce 3# 76# happyReduction_201-happyReduction_201 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut158 happy_x_2 of { (HappyWrap158 happy_var_2) -> -	case happyOut100 happy_x_3 of { (HappyWrap100 happy_var_3) -> -	( amms (liftM mkTyClD-                        (mkFamDecl (comb3 happy_var_1 happy_var_2 happy_var_3) OpenTypeFamily happy_var_2-                                   (fst . snd $ unLoc happy_var_3)-                                   (snd . snd $ unLoc happy_var_3)))-                       (mj AnnType happy_var_1:(fst $ unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn92 r))--happyReduce_202 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_202 = happyMonadReduce 4# 76# happyReduction_202-happyReduction_202 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	case happyOut100 happy_x_4 of { (HappyWrap100 happy_var_4) -> -	( amms (liftM mkTyClD-                        (mkFamDecl (comb3 happy_var_1 happy_var_3 happy_var_4) OpenTypeFamily happy_var_3-                                   (fst . snd $ unLoc happy_var_4)-                                   (snd . snd $ unLoc happy_var_4)))-                       (mj AnnType happy_var_1:mj AnnFamily happy_var_2:(fst $ unLoc happy_var_4)))}}}})-	) (\r -> happyReturn (happyIn92 r))--happyReduce_203 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_203 = happyMonadReduce 2# 76# happyReduction_203-happyReduction_203 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut91 happy_x_2 of { (HappyWrap91 happy_var_2) -> -	( ams happy_var_2 (fst $ unLoc happy_var_2) >>-                   amms (liftM mkInstD (mkTyFamInst (comb2 happy_var_1 happy_var_2) (snd $ unLoc happy_var_2)))-                        (mj AnnType happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn92 r))--happyReduce_204 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_204 = happyMonadReduce 3# 76# happyReduction_204-happyReduction_204 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut91 happy_x_3 of { (HappyWrap91 happy_var_3) -> -	( ams happy_var_3 (fst $ unLoc happy_var_3) >>-                   amms (liftM mkInstD (mkTyFamInst (comb2 happy_var_1 happy_var_3) (snd $ unLoc happy_var_3)))-                        (mj AnnType happy_var_1:mj AnnInstance happy_var_2:(fst $ unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn92 r))--happyReduce_205 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_205 = happySpecReduce_0  77# happyReduction_205-happyReduction_205  =  happyIn93-		 ([]-	)--happyReduce_206 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_206 = happySpecReduce_1  77# happyReduction_206-happyReduction_206 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn93-		 ([mj AnnFamily happy_var_1]-	)}--happyReduce_207 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_207 = happySpecReduce_0  78# happyReduction_207-happyReduction_207  =  happyIn94-		 ([]-	)--happyReduce_208 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_208 = happySpecReduce_1  78# happyReduction_208-happyReduction_208 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn94-		 ([mj AnnInstance happy_var_1]-	)}--happyReduce_209 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_209 = happyMonadReduce 3# 79# happyReduction_209-happyReduction_209 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut94 happy_x_2 of { (HappyWrap94 happy_var_2) -> -	case happyOut91 happy_x_3 of { (HappyWrap91 happy_var_3) -> -	( ams happy_var_3 (fst $ unLoc happy_var_3) >>-                   amms (mkTyFamInst (comb2 happy_var_1 happy_var_3) (snd $ unLoc happy_var_3))-                        (mj AnnType happy_var_1:happy_var_2++(fst $ unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn95 r))--happyReduce_210 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_210 = happyMonadReduce 5# 79# happyReduction_210-happyReduction_210 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOut103 happy_x_2 of { (HappyWrap103 happy_var_2) -> -	case happyOut102 happy_x_3 of { (HappyWrap102 happy_var_3) -> -	case happyOut183 happy_x_4 of { (HappyWrap183 happy_var_4) -> -	case happyOut191 happy_x_5 of { (HappyWrap191 happy_var_5) -> -	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_3 happy_var_4 happy_var_5) (snd $ unLoc happy_var_1) happy_var_2 (snd $ unLoc happy_var_3)-                                    Nothing (reverse (snd $ unLoc happy_var_4))-                                            (fmap reverse happy_var_5))-                       ((fst $ unLoc happy_var_1):(fst $ unLoc happy_var_3) ++ (fst $ unLoc happy_var_4)))}}}}})-	) (\r -> happyReturn (happyIn95 r))--happyReduce_211 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_211 = happyMonadReduce 6# 79# happyReduction_211-happyReduction_211 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut103 happy_x_3 of { (HappyWrap103 happy_var_3) -> -	case happyOut102 happy_x_4 of { (HappyWrap102 happy_var_4) -> -	case happyOut183 happy_x_5 of { (HappyWrap183 happy_var_5) -> -	case happyOut191 happy_x_6 of { (HappyWrap191 happy_var_6) -> -	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (snd $ unLoc happy_var_4)-                                    Nothing (reverse (snd $ unLoc happy_var_5))-                                            (fmap reverse happy_var_6))-                       ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2:(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})-	) (\r -> happyReturn (happyIn95 r))--happyReduce_212 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_212 = happyMonadReduce 6# 79# happyReduction_212-happyReduction_212 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOut103 happy_x_2 of { (HappyWrap103 happy_var_2) -> -	case happyOut102 happy_x_3 of { (HappyWrap102 happy_var_3) -> -	case happyOut97 happy_x_4 of { (HappyWrap97 happy_var_4) -> -	case happyOut179 happy_x_5 of { (HappyWrap179 happy_var_5) -> -	case happyOut191 happy_x_6 of { (HappyWrap191 happy_var_6) -> -	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_3 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_2-                                (snd $ unLoc happy_var_3) (snd $ unLoc happy_var_4) (snd $ unLoc happy_var_5)-                                (fmap reverse happy_var_6))-                        ((fst $ unLoc happy_var_1):(fst $ unLoc happy_var_3)++(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})-	) (\r -> happyReturn (happyIn95 r))--happyReduce_213 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_213 = happyMonadReduce 7# 79# happyReduction_213-happyReduction_213 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut96 happy_x_1 of { (HappyWrap96 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut103 happy_x_3 of { (HappyWrap103 happy_var_3) -> -	case happyOut102 happy_x_4 of { (HappyWrap102 happy_var_4) -> -	case happyOut97 happy_x_5 of { (HappyWrap97 happy_var_5) -> -	case happyOut179 happy_x_6 of { (HappyWrap179 happy_var_6) -> -	case happyOut191 happy_x_7 of { (HappyWrap191 happy_var_7) -> -	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3-                                (snd $ unLoc happy_var_4) (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)-                                (fmap reverse happy_var_7))-                        ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2:(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})-	) (\r -> happyReturn (happyIn95 r))--happyReduce_214 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_214 = happySpecReduce_1  80# happyReduction_214-happyReduction_214 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn96-		 (sL1 happy_var_1 (mj AnnData    happy_var_1,DataType)-	)}--happyReduce_215 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_215 = happySpecReduce_1  80# happyReduction_215-happyReduction_215 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn96-		 (sL1 happy_var_1 (mj AnnNewtype happy_var_1,NewType)-	)}--happyReduce_216 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_216 = happySpecReduce_0  81# happyReduction_216-happyReduction_216  =  happyIn97-		 (noLoc     ([]               , Nothing)-	)--happyReduce_217 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_217 = happySpecReduce_2  81# happyReduction_217-happyReduction_217 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut178 happy_x_2 of { (HappyWrap178 happy_var_2) -> -	happyIn97-		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], Just happy_var_2)-	)}}--happyReduce_218 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_218 = happySpecReduce_0  82# happyReduction_218-happyReduction_218  =  happyIn98-		 (noLoc     ([]               , noLoc (NoSig noExt)         )-	)--happyReduce_219 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_219 = happySpecReduce_2  82# happyReduction_219-happyReduction_219 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut178 happy_x_2 of { (HappyWrap178 happy_var_2) -> -	happyIn98-		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], sLL happy_var_1 happy_var_2 (KindSig noExt happy_var_2))-	)}}--happyReduce_220 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_220 = happySpecReduce_0  83# happyReduction_220-happyReduction_220  =  happyIn99-		 (noLoc     ([]               , noLoc     (NoSig    noExt)   )-	)--happyReduce_221 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_221 = happySpecReduce_2  83# happyReduction_221-happyReduction_221 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut178 happy_x_2 of { (HappyWrap178 happy_var_2) -> -	happyIn99-		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], sLL happy_var_1 happy_var_2 (KindSig  noExt happy_var_2))-	)}}--happyReduce_222 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_222 = happySpecReduce_2  83# happyReduction_222-happyReduction_222 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut173 happy_x_2 of { (HappyWrap173 happy_var_2) -> -	happyIn99-		 (sLL happy_var_1 happy_var_2 ([mj AnnEqual happy_var_1] , sLL happy_var_1 happy_var_2 (TyVarSig noExt happy_var_2))-	)}}--happyReduce_223 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_223 = happySpecReduce_0  84# happyReduction_223-happyReduction_223  =  happyIn100-		 (noLoc ([], (noLoc (NoSig noExt), Nothing))-	)--happyReduce_224 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_224 = happySpecReduce_2  84# happyReduction_224-happyReduction_224 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut178 happy_x_2 of { (HappyWrap178 happy_var_2) -> -	happyIn100-		 (sLL happy_var_1 happy_var_2 ( [mu AnnDcolon happy_var_1]-                                 , (sLL happy_var_2 happy_var_2 (KindSig noExt happy_var_2), Nothing))-	)}}--happyReduce_225 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_225 = happyReduce 4# 84# happyReduction_225-happyReduction_225 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut173 happy_x_2 of { (HappyWrap173 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut86 happy_x_4 of { (HappyWrap86 happy_var_4) -> -	happyIn100-		 (sLL happy_var_1 happy_var_4 ([mj AnnEqual happy_var_1, mj AnnVbar happy_var_3]-                            , (sLL happy_var_1 happy_var_2 (TyVarSig noExt happy_var_2), Just happy_var_4))-	) `HappyStk` happyRest}}}}--happyReduce_226 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_226 = happyMonadReduce 3# 85# happyReduction_226-happyReduction_226 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut156 happy_x_1 of { (HappyWrap156 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)-                                       >> (return (sLL happy_var_1 happy_var_3 (Just happy_var_1, happy_var_3))))}}})-	) (\r -> happyReturn (happyIn101 r))--happyReduce_227 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_227 = happySpecReduce_1  85# happyReduction_227-happyReduction_227 happy_x_1-	 =  case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> -	happyIn101-		 (sL1 happy_var_1 (Nothing, happy_var_1)-	)}--happyReduce_228 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_228 = happyMonadReduce 6# 86# happyReduction_228-happyReduction_228 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut156 happy_x_4 of { (HappyWrap156 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOut158 happy_x_6 of { (HappyWrap158 happy_var_6) -> -	( hintExplicitForall happy_var_1-                                                       >> (addAnnotation (gl happy_var_4) (toUnicodeAnn AnnDarrow happy_var_5) (gl happy_var_5)-                                                           >> return (sLL happy_var_1 happy_var_6 ([mu AnnForall happy_var_1, mj AnnDot happy_var_3]-                                                                                , (Just happy_var_4, Just happy_var_2, happy_var_6)))-                                                          ))}}}}}})-	) (\r -> happyReturn (happyIn102 r))--happyReduce_229 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_229 = happyMonadReduce 4# 86# happyReduction_229-happyReduction_229 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut158 happy_x_4 of { (HappyWrap158 happy_var_4) -> -	( hintExplicitForall happy_var_1-                                          >> return (sLL happy_var_1 happy_var_4 ([mu AnnForall happy_var_1, mj AnnDot happy_var_3]-                                                               , (Nothing, Just happy_var_2, happy_var_4))))}}}})-	) (\r -> happyReturn (happyIn102 r))--happyReduce_230 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_230 = happyMonadReduce 3# 86# happyReduction_230-happyReduction_230 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut156 happy_x_1 of { (HappyWrap156 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)-                                       >> (return (sLL happy_var_1 happy_var_3([], (Just happy_var_1, Nothing, happy_var_3)))))}}})-	) (\r -> happyReturn (happyIn102 r))--happyReduce_231 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_231 = happySpecReduce_1  86# happyReduction_231-happyReduction_231 happy_x_1-	 =  case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> -	happyIn102-		 (sL1 happy_var_1 ([], (Nothing, Nothing, happy_var_1))-	)}--happyReduce_232 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_232 = happyMonadReduce 4# 87# happyReduction_232-happyReduction_232 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ajs (Just (sLL happy_var_1 happy_var_4 (CType (getCTYPEs happy_var_1) (Just (Header (getSTRINGs happy_var_2) (getSTRING happy_var_2)))-                                        (getSTRINGs happy_var_3,getSTRING happy_var_3))))-                              [mo happy_var_1,mj AnnHeader happy_var_2,mj AnnVal happy_var_3,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn103 r))--happyReduce_233 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_233 = happyMonadReduce 3# 87# happyReduction_233-happyReduction_233 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ajs (Just (sLL happy_var_1 happy_var_3 (CType (getCTYPEs happy_var_1) Nothing  (getSTRINGs happy_var_2, getSTRING happy_var_2))))-                              [mo happy_var_1,mj AnnVal happy_var_2,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn103 r))--happyReduce_234 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_234 = happySpecReduce_0  87# happyReduction_234-happyReduction_234  =  happyIn103-		 (Nothing-	)--happyReduce_235 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_235 = happyMonadReduce 5# 88# happyReduction_235-happyReduction_235 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut84 happy_x_2 of { (HappyWrap84 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut81 happy_x_4 of { (HappyWrap81 happy_var_4) -> -	case happyOut167 happy_x_5 of { (HappyWrap167 happy_var_5) -> -	( do { let { err = text "in the stand-alone deriving instance"-                                    <> colon <+> quotes (ppr happy_var_5) }-                      ; ams (sLL happy_var_1 (hsSigType happy_var_5)-                                 (DerivDecl noExt (mkHsWildCardBndrs happy_var_5) happy_var_2 happy_var_4))-                            [mj AnnDeriving happy_var_1, mj AnnInstance happy_var_3] })}}}}})-	) (\r -> happyReturn (happyIn104 r))--happyReduce_236 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_236 = happyMonadReduce 4# 89# happyReduction_236-happyReduction_236 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut278 happy_x_3 of { (HappyWrap278 happy_var_3) -> -	case happyOut106 happy_x_4 of { (HappyWrap106 happy_var_4) -> -	( amms (mkRoleAnnotDecl (comb3 happy_var_1 happy_var_3 happy_var_4) happy_var_3 (reverse (unLoc happy_var_4)))-                  [mj AnnType happy_var_1,mj AnnRole happy_var_2])}}}})-	) (\r -> happyReturn (happyIn105 r))--happyReduce_237 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_237 = happySpecReduce_0  90# happyReduction_237-happyReduction_237  =  happyIn106-		 (noLoc []-	)--happyReduce_238 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_238 = happySpecReduce_1  90# happyReduction_238-happyReduction_238 happy_x_1-	 =  case happyOut107 happy_x_1 of { (HappyWrap107 happy_var_1) -> -	happyIn106-		 (happy_var_1-	)}--happyReduce_239 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_239 = happySpecReduce_1  91# happyReduction_239-happyReduction_239 happy_x_1-	 =  case happyOut108 happy_x_1 of { (HappyWrap108 happy_var_1) -> -	happyIn107-		 (sLL happy_var_1 happy_var_1 [happy_var_1]-	)}--happyReduce_240 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_240 = happySpecReduce_2  91# happyReduction_240-happyReduction_240 happy_x_2-	happy_x_1-	 =  case happyOut107 happy_x_1 of { (HappyWrap107 happy_var_1) -> -	case happyOut108 happy_x_2 of { (HappyWrap108 happy_var_2) -> -	happyIn107-		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1-	)}}--happyReduce_241 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_241 = happySpecReduce_1  92# happyReduction_241-happyReduction_241 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn108-		 (sL1 happy_var_1 $ Just $ getVARID happy_var_1-	)}--happyReduce_242 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_242 = happySpecReduce_1  92# happyReduction_242-happyReduction_242 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn108-		 (sL1 happy_var_1 Nothing-	)}--happyReduce_243 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_243 = happyMonadReduce 4# 93# happyReduction_243-happyReduction_243 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut110 happy_x_2 of { (HappyWrap110 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut244 happy_x_4 of { (HappyWrap244 happy_var_4) -> -	(      let (name, args,as ) = happy_var_2 in-                 ams (sLL happy_var_1 happy_var_4 . ValD noExt $ mkPatSynBind name args happy_var_4-                                                    ImplicitBidirectional)-               (as ++ [mj AnnPattern happy_var_1, mj AnnEqual happy_var_3]))}}}})-	) (\r -> happyReturn (happyIn109 r))--happyReduce_244 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_244 = happyMonadReduce 4# 93# happyReduction_244-happyReduction_244 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut110 happy_x_2 of { (HappyWrap110 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut244 happy_x_4 of { (HappyWrap244 happy_var_4) -> -	(    let (name, args, as) = happy_var_2 in-               ams (sLL happy_var_1 happy_var_4 . ValD noExt $ mkPatSynBind name args happy_var_4 Unidirectional)-               (as ++ [mj AnnPattern happy_var_1,mu AnnLarrow happy_var_3]))}}}})-	) (\r -> happyReturn (happyIn109 r))--happyReduce_245 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_245 = happyMonadReduce 5# 93# happyReduction_245-happyReduction_245 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut110 happy_x_2 of { (HappyWrap110 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut244 happy_x_4 of { (HappyWrap244 happy_var_4) -> -	case happyOut113 happy_x_5 of { (HappyWrap113 happy_var_5) -> -	( do { let (name, args, as) = happy_var_2-                  ; mg <- mkPatSynMatchGroup name (snd $ unLoc happy_var_5)-                  ; ams (sLL happy_var_1 happy_var_5 . ValD noExt $-                           mkPatSynBind name args happy_var_4 (ExplicitBidirectional mg))-                       (as ++ ((mj AnnPattern happy_var_1:mu AnnLarrow happy_var_3:(fst $ unLoc happy_var_5))) )-                   })}}}}})-	) (\r -> happyReturn (happyIn109 r))--happyReduce_246 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_246 = happySpecReduce_2  94# happyReduction_246-happyReduction_246 happy_x_2-	happy_x_1-	 =  case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> -	case happyOut111 happy_x_2 of { (HappyWrap111 happy_var_2) -> -	happyIn110-		 ((happy_var_1, PrefixCon happy_var_2, [])-	)}}--happyReduce_247 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_247 = happySpecReduce_3  94# happyReduction_247-happyReduction_247 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> -	case happyOut274 happy_x_2 of { (HappyWrap274 happy_var_2) -> -	case happyOut299 happy_x_3 of { (HappyWrap299 happy_var_3) -> -	happyIn110-		 ((happy_var_2, InfixCon happy_var_1 happy_var_3, [])-	)}}}--happyReduce_248 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_248 = happyReduce 4# 94# happyReduction_248-happyReduction_248 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut112 happy_x_3 of { (HappyWrap112 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn110-		 ((happy_var_1, RecCon happy_var_3, [moc happy_var_2, mcc happy_var_4] )-	) `HappyStk` happyRest}}}}--happyReduce_249 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_249 = happySpecReduce_0  95# happyReduction_249-happyReduction_249  =  happyIn111-		 ([]-	)--happyReduce_250 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_250 = happySpecReduce_2  95# happyReduction_250-happyReduction_250 happy_x_2-	happy_x_1-	 =  case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> -	case happyOut111 happy_x_2 of { (HappyWrap111 happy_var_2) -> -	happyIn111-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_251 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_251 = happySpecReduce_1  96# happyReduction_251-happyReduction_251 happy_x_1-	 =  case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> -	happyIn112-		 ([RecordPatSynField happy_var_1 happy_var_1]-	)}--happyReduce_252 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_252 = happyMonadReduce 3# 96# happyReduction_252-happyReduction_252 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut112 happy_x_3 of { (HappyWrap112 happy_var_3) -> -	( addAnnotation (getLoc happy_var_1) AnnComma (getLoc happy_var_2) >>-                                         return ((RecordPatSynField happy_var_1 happy_var_1) : happy_var_3 ))}}})-	) (\r -> happyReturn (happyIn112 r))--happyReduce_253 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_253 = happyReduce 4# 97# happyReduction_253-happyReduction_253 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut123 happy_x_3 of { (HappyWrap123 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn113-		 (sLL happy_var_1 happy_var_4 ((mj AnnWhere happy_var_1:moc happy_var_2-                                           :mcc happy_var_4:(fst $ unLoc happy_var_3)),sL1 happy_var_3 (snd $ unLoc happy_var_3))-	) `HappyStk` happyRest}}}}--happyReduce_254 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_254 = happyReduce 4# 97# happyReduction_254-happyReduction_254 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut123 happy_x_3 of { (HappyWrap123 happy_var_3) -> -	happyIn113-		 (cL (comb2 happy_var_1 happy_var_3) ((mj AnnWhere happy_var_1:(fst $ unLoc happy_var_3))-                                          ,sL1 happy_var_3 (snd $ unLoc happy_var_3))-	) `HappyStk` happyRest}}--happyReduce_255 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_255 = happyMonadReduce 4# 98# happyReduction_255-happyReduction_255 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut271 happy_x_2 of { (HappyWrap271 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut148 happy_x_4 of { (HappyWrap148 happy_var_4) -> -	( ams (sLL happy_var_1 happy_var_4 $ PatSynSig noExt (unLoc happy_var_2) (mkLHsSigType happy_var_4))-                          [mj AnnPattern happy_var_1, mu AnnDcolon happy_var_3])}}}})-	) (\r -> happyReturn (happyIn114 r))--happyReduce_256 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_256 = happySpecReduce_1  99# happyReduction_256-happyReduction_256 happy_x_1-	 =  case happyOut92 happy_x_1 of { (HappyWrap92 happy_var_1) -> -	happyIn115-		 (happy_var_1-	)}--happyReduce_257 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_257 = happySpecReduce_1  99# happyReduction_257-happyReduction_257 happy_x_1-	 =  case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> -	happyIn115-		 (happy_var_1-	)}--happyReduce_258 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_258 = happyMonadReduce 4# 99# happyReduction_258-happyReduction_258 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut148 happy_x_4 of { (HappyWrap148 happy_var_4) -> -	( do { v <- checkValSigLhs happy_var_2-                          ; let err = text "in default signature" <> colon <+>-                                      quotes (ppr happy_var_2)-                          ; ams (sLL happy_var_1 happy_var_4 $ SigD noExt $ ClassOpSig noExt True [v] $ mkLHsSigType happy_var_4)-                                [mj AnnDefault happy_var_1,mu AnnDcolon happy_var_3] })}}}})-	) (\r -> happyReturn (happyIn115 r))--happyReduce_259 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_259 = happyMonadReduce 3# 100# happyReduction_259-happyReduction_259 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut116 happy_x_1 of { (HappyWrap116 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut115 happy_x_3 of { (HappyWrap115 happy_var_3) -> -	( if isNilOL (snd $ unLoc happy_var_1)-                                             then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                                    , unitOL happy_var_3))-                                             else ams (lastOL (snd $ unLoc happy_var_1)) [mj AnnSemi happy_var_2]-                                           >> return (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1-                                                                ,(snd $ unLoc happy_var_1) `appOL` unitOL happy_var_3)))}}})-	) (\r -> happyReturn (happyIn116 r))--happyReduce_260 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_260 = happyMonadReduce 2# 100# happyReduction_260-happyReduction_260 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut116 happy_x_1 of { (HappyWrap116 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( if isNilOL (snd $ unLoc happy_var_1)-                                             then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                                                   ,snd $ unLoc happy_var_1))-                                             else ams (lastOL (snd $ unLoc happy_var_1)) [mj AnnSemi happy_var_2]-                                           >> return (sLL happy_var_1 happy_var_2  (unLoc happy_var_1)))}})-	) (\r -> happyReturn (happyIn116 r))--happyReduce_261 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_261 = happySpecReduce_1  100# happyReduction_261-happyReduction_261 happy_x_1-	 =  case happyOut115 happy_x_1 of { (HappyWrap115 happy_var_1) -> -	happyIn116-		 (sL1 happy_var_1 ([], unitOL happy_var_1)-	)}--happyReduce_262 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_262 = happySpecReduce_0  100# happyReduction_262-happyReduction_262  =  happyIn116-		 (noLoc ([],nilOL)-	)--happyReduce_263 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_263 = happySpecReduce_3  101# happyReduction_263-happyReduction_263 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut116 happy_x_2 of { (HappyWrap116 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn117-		 (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2)-                                             ,snd $ unLoc happy_var_2)-	)}}}--happyReduce_264 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_264 = happySpecReduce_3  101# happyReduction_264-happyReduction_264 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut116 happy_x_2 of { (HappyWrap116 happy_var_2) -> -	happyIn117-		 (happy_var_2-	)}--happyReduce_265 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_265 = happySpecReduce_2  102# happyReduction_265-happyReduction_265 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut117 happy_x_2 of { (HappyWrap117 happy_var_2) -> -	happyIn118-		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)-                                             ,snd $ unLoc happy_var_2)-	)}}--happyReduce_266 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_266 = happySpecReduce_0  102# happyReduction_266-happyReduction_266  =  happyIn118-		 (noLoc ([],nilOL)-	)--happyReduce_267 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_267 = happySpecReduce_1  103# happyReduction_267-happyReduction_267 happy_x_1-	 =  case happyOut95 happy_x_1 of { (HappyWrap95 happy_var_1) -> -	happyIn119-		 (sLL happy_var_1 happy_var_1 (unitOL (sL1 happy_var_1 (InstD noExt (unLoc happy_var_1))))-	)}--happyReduce_268 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_268 = happySpecReduce_1  103# happyReduction_268-happyReduction_268 happy_x_1-	 =  case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> -	happyIn119-		 (sLL happy_var_1 happy_var_1 (unitOL happy_var_1)-	)}--happyReduce_269 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_269 = happyMonadReduce 3# 104# happyReduction_269-happyReduction_269 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut120 happy_x_1 of { (HappyWrap120 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut119 happy_x_3 of { (HappyWrap119 happy_var_3) -> -	( if isNilOL (snd $ unLoc happy_var_1)-                                             then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                                    , unLoc happy_var_3))-                                             else ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]-                                           >> return-                                            (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1-                                                       ,(snd $ unLoc happy_var_1) `appOL` unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn120 r))--happyReduce_270 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_270 = happyMonadReduce 2# 104# happyReduction_270-happyReduction_270 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut120 happy_x_1 of { (HappyWrap120 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( if isNilOL (snd $ unLoc happy_var_1)-                                             then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                                                   ,snd $ unLoc happy_var_1))-                                             else ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]-                                           >> return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1)))}})-	) (\r -> happyReturn (happyIn120 r))--happyReduce_271 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_271 = happySpecReduce_1  104# happyReduction_271-happyReduction_271 happy_x_1-	 =  case happyOut119 happy_x_1 of { (HappyWrap119 happy_var_1) -> -	happyIn120-		 (sL1 happy_var_1 ([],unLoc happy_var_1)-	)}--happyReduce_272 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_272 = happySpecReduce_0  104# happyReduction_272-happyReduction_272  =  happyIn120-		 (noLoc ([],nilOL)-	)--happyReduce_273 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_273 = happySpecReduce_3  105# happyReduction_273-happyReduction_273 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut120 happy_x_2 of { (HappyWrap120 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn121-		 (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2),snd $ unLoc happy_var_2)-	)}}}--happyReduce_274 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_274 = happySpecReduce_3  105# happyReduction_274-happyReduction_274 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut120 happy_x_2 of { (HappyWrap120 happy_var_2) -> -	happyIn121-		 (cL (gl happy_var_2) (unLoc happy_var_2)-	)}--happyReduce_275 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_275 = happySpecReduce_2  106# happyReduction_275-happyReduction_275 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut121 happy_x_2 of { (HappyWrap121 happy_var_2) -> -	happyIn122-		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)-                                             ,(snd $ unLoc happy_var_2))-	)}}--happyReduce_276 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_276 = happySpecReduce_0  106# happyReduction_276-happyReduction_276  =  happyIn122-		 (noLoc ([],nilOL)-	)--happyReduce_277 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_277 = happyMonadReduce 3# 107# happyReduction_277-happyReduction_277 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut123 happy_x_1 of { (HappyWrap123 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut198 happy_x_3 of { (HappyWrap198 happy_var_3) -> -	( if isNilOL (snd $ unLoc happy_var_1)-                                 then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                        , unitOL happy_var_3))-                                 else do ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]-                                           >> return (-                                          let { this = unitOL happy_var_3;-                                                rest = snd $ unLoc happy_var_1;-                                                these = rest `appOL` this }-                                          in rest `seq` this `seq` these `seq`-                                             (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1,these))))}}})-	) (\r -> happyReturn (happyIn123 r))--happyReduce_278 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_278 = happyMonadReduce 2# 107# happyReduction_278-happyReduction_278 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut123 happy_x_1 of { (HappyWrap123 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( if isNilOL (snd $ unLoc happy_var_1)-                                  then return (sLL happy_var_1 happy_var_2 ((mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                          ,snd $ unLoc happy_var_1)))-                                  else ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]-                                           >> return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1)))}})-	) (\r -> happyReturn (happyIn123 r))--happyReduce_279 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_279 = happySpecReduce_1  107# happyReduction_279-happyReduction_279 happy_x_1-	 =  case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> -	happyIn123-		 (sL1 happy_var_1 ([], unitOL happy_var_1)-	)}--happyReduce_280 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_280 = happySpecReduce_0  107# happyReduction_280-happyReduction_280  =  happyIn123-		 (noLoc ([],nilOL)-	)--happyReduce_281 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_281 = happySpecReduce_3  108# happyReduction_281-happyReduction_281 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut123 happy_x_2 of { (HappyWrap123 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn124-		 (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2)-                                                   ,sL1 happy_var_2 $ snd $ unLoc happy_var_2)-	)}}}--happyReduce_282 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_282 = happySpecReduce_3  108# happyReduction_282-happyReduction_282 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut123 happy_x_2 of { (HappyWrap123 happy_var_2) -> -	happyIn124-		 (cL (gl happy_var_2) (fst $ unLoc happy_var_2,sL1 happy_var_2 $ snd $ unLoc happy_var_2)-	)}--happyReduce_283 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_283 = happyMonadReduce 1# 109# happyReduction_283-happyReduction_283 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut124 happy_x_1 of { (HappyWrap124 happy_var_1) -> -	( do { val_binds <- cvBindGroup (unLoc $ snd $ unLoc happy_var_1)-                                  ; return (sL1 happy_var_1 (fst $ unLoc happy_var_1-                                                    ,sL1 happy_var_1 $ HsValBinds noExt val_binds)) })})-	) (\r -> happyReturn (happyIn125 r))--happyReduce_284 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_284 = happySpecReduce_3  109# happyReduction_284-happyReduction_284 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut256 happy_x_2 of { (HappyWrap256 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn125-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]-                                             ,sL1 happy_var_2 $ HsIPBinds noExt (IPBinds noExt (reverse $ unLoc happy_var_2)))-	)}}}--happyReduce_285 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_285 = happySpecReduce_3  109# happyReduction_285-happyReduction_285 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut256 happy_x_2 of { (HappyWrap256 happy_var_2) -> -	happyIn125-		 (cL (getLoc happy_var_2) ([]-                                            ,sL1 happy_var_2 $ HsIPBinds noExt (IPBinds noExt (reverse $ unLoc happy_var_2)))-	)}--happyReduce_286 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_286 = happySpecReduce_2  110# happyReduction_286-happyReduction_286 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> -	happyIn126-		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1 : (fst $ unLoc happy_var_2)-                                             ,snd $ unLoc happy_var_2)-	)}}--happyReduce_287 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_287 = happySpecReduce_0  110# happyReduction_287-happyReduction_287  =  happyIn126-		 (noLoc ([],noLoc emptyLocalBinds)-	)--happyReduce_288 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_288 = happyMonadReduce 3# 111# happyReduction_288-happyReduction_288 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut127 happy_x_1 of { (HappyWrap127 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut128 happy_x_3 of { (HappyWrap128 happy_var_3) -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return (happy_var_1 `snocOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn127 r))--happyReduce_289 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_289 = happyMonadReduce 2# 111# happyReduction_289-happyReduction_289 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut127 happy_x_1 of { (HappyWrap127 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return happy_var_1)}})-	) (\r -> happyReturn (happyIn127 r))--happyReduce_290 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_290 = happySpecReduce_1  111# happyReduction_290-happyReduction_290 happy_x_1-	 =  case happyOut128 happy_x_1 of { (HappyWrap128 happy_var_1) -> -	happyIn127-		 (unitOL happy_var_1-	)}--happyReduce_291 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_291 = happySpecReduce_0  111# happyReduction_291-happyReduction_291  =  happyIn127-		 (nilOL-	)--happyReduce_292 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_292 = happyMonadReduce 6# 112# happyReduction_292-happyReduction_292 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut129 happy_x_2 of { (HappyWrap129 happy_var_2) -> -	case happyOut131 happy_x_3 of { (HappyWrap131 happy_var_3) -> -	case happyOut207 happy_x_4 of { (HappyWrap207 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOut206 happy_x_6 of { (HappyWrap206 happy_var_6) -> -	(ams (sLL happy_var_1 happy_var_6 $ HsRule { rd_ext = noExt-                                   , rd_name = cL (gl happy_var_1) (getSTRINGs happy_var_1, getSTRING happy_var_1)-                                   , rd_act = (snd happy_var_2) `orElse` AlwaysActive-                                   , rd_tyvs = sndOf3 happy_var_3, rd_tmvs = thdOf3 happy_var_3-                                   , rd_lhs = happy_var_4, rd_rhs = happy_var_6 })-               (mj AnnEqual happy_var_5 : (fst happy_var_2) ++ (fstOf3 happy_var_3)))}}}}}})-	) (\r -> happyReturn (happyIn128 r))--happyReduce_293 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_293 = happySpecReduce_0  113# happyReduction_293-happyReduction_293  =  happyIn129-		 (([],Nothing)-	)--happyReduce_294 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_294 = happySpecReduce_1  113# happyReduction_294-happyReduction_294 happy_x_1-	 =  case happyOut130 happy_x_1 of { (HappyWrap130 happy_var_1) -> -	happyIn129-		 ((fst happy_var_1,Just (snd happy_var_1))-	)}--happyReduce_295 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_295 = happySpecReduce_3  114# happyReduction_295-happyReduction_295 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn130-		 (([mos happy_var_1,mj AnnVal happy_var_2,mcs happy_var_3]-                                  ,ActiveAfter  (getINTEGERs happy_var_2) (fromInteger (il_value (getINTEGER happy_var_2))))-	)}}}--happyReduce_296 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_296 = happyReduce 4# 114# happyReduction_296-happyReduction_296 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn130-		 (([mos happy_var_1,mj AnnTilde happy_var_2,mj AnnVal happy_var_3,mcs happy_var_4]-                                  ,ActiveBefore (getINTEGERs happy_var_3) (fromInteger (il_value (getINTEGER happy_var_3))))-	) `HappyStk` happyRest}}}}--happyReduce_297 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_297 = happySpecReduce_3  114# happyReduction_297-happyReduction_297 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn130-		 (([mos happy_var_1,mj AnnTilde happy_var_2,mcs happy_var_3]-                                  ,NeverActive)-	)}}}--happyReduce_298 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_298 = happyMonadReduce 6# 115# happyReduction_298-happyReduction_298 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut132 happy_x_2 of { (HappyWrap132 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut132 happy_x_5 of { (HappyWrap132 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	( let tyvs = mkRuleTyVarBndrs happy_var_2-                                                              in hintExplicitForall happy_var_1-                                                              >> checkRuleTyVarBndrNames (mkRuleTyVarBndrs happy_var_2)-                                                              >> return ([mu AnnForall happy_var_1,mj AnnDot happy_var_3,-                                                                          mu AnnForall happy_var_4,mj AnnDot happy_var_6],-                                                                         Just (mkRuleTyVarBndrs happy_var_2), mkRuleBndrs happy_var_5))}}}}}})-	) (\r -> happyReturn (happyIn131 r))--happyReduce_299 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_299 = happySpecReduce_3  115# happyReduction_299-happyReduction_299 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut132 happy_x_2 of { (HappyWrap132 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn131-		 (([mu AnnForall happy_var_1,mj AnnDot happy_var_3],-                                                              Nothing, mkRuleBndrs happy_var_2)-	)}}}--happyReduce_300 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_300 = happySpecReduce_0  115# happyReduction_300-happyReduction_300  =  happyIn131-		 (([], Nothing, [])-	)--happyReduce_301 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_301 = happySpecReduce_2  116# happyReduction_301-happyReduction_301 happy_x_2-	happy_x_1-	 =  case happyOut133 happy_x_1 of { (HappyWrap133 happy_var_1) -> -	case happyOut132 happy_x_2 of { (HappyWrap132 happy_var_2) -> -	happyIn132-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_302 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_302 = happySpecReduce_0  116# happyReduction_302-happyReduction_302  =  happyIn132-		 ([]-	)--happyReduce_303 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_303 = happySpecReduce_1  117# happyReduction_303-happyReduction_303 happy_x_1-	 =  case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> -	happyIn133-		 (sLL happy_var_1 happy_var_1 (RuleTyTmVar happy_var_1 Nothing)-	)}--happyReduce_304 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_304 = happyMonadReduce 5# 117# happyReduction_304-happyReduction_304 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut154 happy_x_4 of { (HappyWrap154 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5 (RuleTyTmVar happy_var_2 (Just happy_var_4)))-                                               [mop happy_var_1,mu AnnDcolon happy_var_3,mcp happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn133 r))--happyReduce_305 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_305 = happyMonadReduce 3# 118# happyReduction_305-happyReduction_305 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut134 happy_x_1 of { (HappyWrap134 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut135 happy_x_3 of { (HappyWrap135 happy_var_3) -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return (happy_var_1 `appOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn134 r))--happyReduce_306 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_306 = happyMonadReduce 2# 118# happyReduction_306-happyReduction_306 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut134 happy_x_1 of { (HappyWrap134 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return happy_var_1)}})-	) (\r -> happyReturn (happyIn134 r))--happyReduce_307 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_307 = happySpecReduce_1  118# happyReduction_307-happyReduction_307 happy_x_1-	 =  case happyOut135 happy_x_1 of { (HappyWrap135 happy_var_1) -> -	happyIn134-		 (happy_var_1-	)}--happyReduce_308 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_308 = happySpecReduce_0  118# happyReduction_308-happyReduction_308  =  happyIn134-		 (nilOL-	)--happyReduce_309 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_309 = happyMonadReduce 2# 119# happyReduction_309-happyReduction_309 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut265 happy_x_1 of { (HappyWrap265 happy_var_1) -> -	case happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> -	( amsu (sLL happy_var_1 happy_var_2 (Warning noExt (unLoc happy_var_1) (WarningTxt (noLoc NoSourceText) $ snd $ unLoc happy_var_2)))-                     (fst $ unLoc happy_var_2))}})-	) (\r -> happyReturn (happyIn135 r))--happyReduce_310 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_310 = happyMonadReduce 3# 120# happyReduction_310-happyReduction_310 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut136 happy_x_1 of { (HappyWrap136 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut137 happy_x_3 of { (HappyWrap137 happy_var_3) -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return (happy_var_1 `appOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn136 r))--happyReduce_311 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_311 = happyMonadReduce 2# 120# happyReduction_311-happyReduction_311 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut136 happy_x_1 of { (HappyWrap136 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return happy_var_1)}})-	) (\r -> happyReturn (happyIn136 r))--happyReduce_312 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_312 = happySpecReduce_1  120# happyReduction_312-happyReduction_312 happy_x_1-	 =  case happyOut137 happy_x_1 of { (HappyWrap137 happy_var_1) -> -	happyIn136-		 (happy_var_1-	)}--happyReduce_313 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_313 = happySpecReduce_0  120# happyReduction_313-happyReduction_313  =  happyIn136-		 (nilOL-	)--happyReduce_314 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_314 = happyMonadReduce 2# 121# happyReduction_314-happyReduction_314 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut265 happy_x_1 of { (HappyWrap265 happy_var_1) -> -	case happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> -	( amsu (sLL happy_var_1 happy_var_2 $ (Warning noExt (unLoc happy_var_1) (DeprecatedTxt (noLoc NoSourceText) $ snd $ unLoc happy_var_2)))-                     (fst $ unLoc happy_var_2))}})-	) (\r -> happyReturn (happyIn137 r))--happyReduce_315 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_315 = happySpecReduce_1  122# happyReduction_315-happyReduction_315 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn138-		 (sL1 happy_var_1 ([],[cL (gl happy_var_1) (getStringLiteral happy_var_1)])-	)}--happyReduce_316 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_316 = happySpecReduce_3  122# happyReduction_316-happyReduction_316 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut139 happy_x_2 of { (HappyWrap139 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn138-		 (sLL happy_var_1 happy_var_3 $ ([mos happy_var_1,mcs happy_var_3],fromOL (unLoc happy_var_2))-	)}}}--happyReduce_317 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_317 = happyMonadReduce 3# 123# happyReduction_317-happyReduction_317 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut139 happy_x_1 of { (HappyWrap139 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( addAnnotation (oll $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>-                               return (sLL happy_var_1 happy_var_3 (unLoc happy_var_1 `snocOL`-                                                  (cL (gl happy_var_3) (getStringLiteral happy_var_3)))))}}})-	) (\r -> happyReturn (happyIn139 r))--happyReduce_318 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_318 = happySpecReduce_1  123# happyReduction_318-happyReduction_318 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn139-		 (sLL happy_var_1 happy_var_1 (unitOL (cL (gl happy_var_1) (getStringLiteral happy_var_1)))-	)}--happyReduce_319 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_319 = happySpecReduce_0  123# happyReduction_319-happyReduction_319  =  happyIn139-		 (noLoc nilOL-	)--happyReduce_320 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_320 = happyMonadReduce 4# 124# happyReduction_320-happyReduction_320 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut266 happy_x_2 of { (HappyWrap266 happy_var_2) -> -	case happyOut215 happy_x_3 of { (HappyWrap215 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 (AnnD noExt $ HsAnnotation noExt-                                            (getANN_PRAGs happy_var_1)-                                            (ValueAnnProvenance happy_var_2) happy_var_3))-                                            [mo happy_var_1,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn140 r))--happyReduce_321 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_321 = happyMonadReduce 5# 124# happyReduction_321-happyReduction_321 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut283 happy_x_3 of { (HappyWrap283 happy_var_3) -> -	case happyOut215 happy_x_4 of { (HappyWrap215 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5 (AnnD noExt $ HsAnnotation noExt-                                            (getANN_PRAGs happy_var_1)-                                            (TypeAnnProvenance happy_var_3) happy_var_4))-                                            [mo happy_var_1,mj AnnType happy_var_2,mc happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn140 r))--happyReduce_322 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_322 = happyMonadReduce 4# 124# happyReduction_322-happyReduction_322 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut215 happy_x_3 of { (HappyWrap215 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 (AnnD noExt $ HsAnnotation noExt-                                                (getANN_PRAGs happy_var_1)-                                                 ModuleAnnProvenance happy_var_3))-                                                [mo happy_var_1,mj AnnModule happy_var_2,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn140 r))--happyReduce_323 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_323 = happyMonadReduce 4# 125# happyReduction_323-happyReduction_323 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut142 happy_x_2 of { (HappyWrap142 happy_var_2) -> -	case happyOut143 happy_x_3 of { (HappyWrap143 happy_var_3) -> -	case happyOut144 happy_x_4 of { (HappyWrap144 happy_var_4) -> -	( mkImport happy_var_2 happy_var_3 (snd $ unLoc happy_var_4) >>= \i ->-                 return (sLL happy_var_1 happy_var_4 (mj AnnImport happy_var_1 : (fst $ unLoc happy_var_4),i)))}}}})-	) (\r -> happyReturn (happyIn141 r))--happyReduce_324 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_324 = happyMonadReduce 3# 125# happyReduction_324-happyReduction_324 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut142 happy_x_2 of { (HappyWrap142 happy_var_2) -> -	case happyOut144 happy_x_3 of { (HappyWrap144 happy_var_3) -> -	( do { d <- mkImport happy_var_2 (noLoc PlaySafe) (snd $ unLoc happy_var_3);-                    return (sLL happy_var_1 happy_var_3 (mj AnnImport happy_var_1 : (fst $ unLoc happy_var_3),d)) })}}})-	) (\r -> happyReturn (happyIn141 r))--happyReduce_325 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_325 = happyMonadReduce 3# 125# happyReduction_325-happyReduction_325 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut142 happy_x_2 of { (HappyWrap142 happy_var_2) -> -	case happyOut144 happy_x_3 of { (HappyWrap144 happy_var_3) -> -	( mkExport happy_var_2 (snd $ unLoc happy_var_3) >>= \i ->-                  return (sLL happy_var_1 happy_var_3 (mj AnnExport happy_var_1 : (fst $ unLoc happy_var_3),i) ))}}})-	) (\r -> happyReturn (happyIn141 r))--happyReduce_326 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_326 = happySpecReduce_1  126# happyReduction_326-happyReduction_326 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn142-		 (sLL happy_var_1 happy_var_1 StdCallConv-	)}--happyReduce_327 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_327 = happySpecReduce_1  126# happyReduction_327-happyReduction_327 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn142-		 (sLL happy_var_1 happy_var_1 CCallConv-	)}--happyReduce_328 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_328 = happySpecReduce_1  126# happyReduction_328-happyReduction_328 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn142-		 (sLL happy_var_1 happy_var_1 CApiConv-	)}--happyReduce_329 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_329 = happySpecReduce_1  126# happyReduction_329-happyReduction_329 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn142-		 (sLL happy_var_1 happy_var_1 PrimCallConv-	)}--happyReduce_330 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_330 = happySpecReduce_1  126# happyReduction_330-happyReduction_330 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn142-		 (sLL happy_var_1 happy_var_1 JavaScriptCallConv-	)}--happyReduce_331 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_331 = happySpecReduce_1  127# happyReduction_331-happyReduction_331 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn143-		 (sLL happy_var_1 happy_var_1 PlayRisky-	)}--happyReduce_332 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_332 = happySpecReduce_1  127# happyReduction_332-happyReduction_332 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn143-		 (sLL happy_var_1 happy_var_1 PlaySafe-	)}--happyReduce_333 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_333 = happySpecReduce_1  127# happyReduction_333-happyReduction_333 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn143-		 (sLL happy_var_1 happy_var_1 PlayInterruptible-	)}--happyReduce_334 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_334 = happyReduce 4# 128# happyReduction_334-happyReduction_334 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut296 happy_x_2 of { (HappyWrap296 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut148 happy_x_4 of { (HappyWrap148 happy_var_4) -> -	happyIn144-		 (sLL happy_var_1 happy_var_4 ([mu AnnDcolon happy_var_3]-                                             ,(cL (getLoc happy_var_1)-                                                    (getStringLiteral happy_var_1), happy_var_2, mkLHsSigType happy_var_4))-	) `HappyStk` happyRest}}}}--happyReduce_335 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_335 = happySpecReduce_3  128# happyReduction_335-happyReduction_335 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut148 happy_x_3 of { (HappyWrap148 happy_var_3) -> -	happyIn144-		 (sLL happy_var_1 happy_var_3 ([mu AnnDcolon happy_var_2]-                                             ,(noLoc (StringLiteral NoSourceText nilFS), happy_var_1, mkLHsSigType happy_var_3))-	)}}}--happyReduce_336 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_336 = happySpecReduce_0  129# happyReduction_336-happyReduction_336  =  happyIn145-		 (([],Nothing)-	)--happyReduce_337 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_337 = happySpecReduce_2  129# happyReduction_337-happyReduction_337 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut147 happy_x_2 of { (HappyWrap147 happy_var_2) -> -	happyIn145-		 (([mu AnnDcolon happy_var_1],Just happy_var_2)-	)}}--happyReduce_338 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_338 = happySpecReduce_0  130# happyReduction_338-happyReduction_338  =  happyIn146-		 (([], Nothing)-	)--happyReduce_339 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_339 = happySpecReduce_2  130# happyReduction_339-happyReduction_339 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut276 happy_x_2 of { (HappyWrap276 happy_var_2) -> -	happyIn146-		 (([mu AnnDcolon happy_var_1], Just happy_var_2)-	)}}--happyReduce_340 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_340 = happySpecReduce_1  131# happyReduction_340-happyReduction_340 happy_x_1-	 =  case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> -	happyIn147-		 (happy_var_1-	)}--happyReduce_341 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_341 = happySpecReduce_1  132# happyReduction_341-happyReduction_341 happy_x_1-	 =  case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> -	happyIn148-		 (happy_var_1-	)}--happyReduce_342 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_342 = happyMonadReduce 3# 133# happyReduction_342-happyReduction_342 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut149 happy_x_1 of { (HappyWrap149 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut296 happy_x_3 of { (HappyWrap296 happy_var_3) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1)-                                                       AnnComma (gl happy_var_2)-                                         >> return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})-	) (\r -> happyReturn (happyIn149 r))--happyReduce_343 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_343 = happySpecReduce_1  133# happyReduction_343-happyReduction_343 happy_x_1-	 =  case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> -	happyIn149-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_344 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_344 = happySpecReduce_1  134# happyReduction_344-happyReduction_344 happy_x_1-	 =  case happyOut147 happy_x_1 of { (HappyWrap147 happy_var_1) -> -	happyIn150-		 (unitOL (mkLHsSigType happy_var_1)-	)}--happyReduce_345 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_345 = happyMonadReduce 3# 134# happyReduction_345-happyReduction_345 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut147 happy_x_1 of { (HappyWrap147 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut150 happy_x_3 of { (HappyWrap150 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)-                                >> return (unitOL (mkLHsSigType happy_var_1) `appOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn150 r))--happyReduce_346 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_346 = happySpecReduce_2  135# happyReduction_346-happyReduction_346 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn151-		 (sLL happy_var_1 happy_var_2 ([mo happy_var_1, mc happy_var_2], getUNPACK_PRAGs happy_var_1, SrcUnpack)-	)}}--happyReduce_347 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_347 = happySpecReduce_2  135# happyReduction_347-happyReduction_347 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn151-		 (sLL happy_var_1 happy_var_2 ([mo happy_var_1, mc happy_var_2], getNOUNPACK_PRAGs happy_var_1, SrcNoUnpack)-	)}}--happyReduce_348 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_348 = happySpecReduce_1  136# happyReduction_348-happyReduction_348 happy_x_1-	 =  case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> -	happyIn152-		 (happy_var_1-	)}--happyReduce_349 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_349 = happyMonadReduce 3# 136# happyReduction_349-happyReduction_349 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut178 happy_x_3 of { (HappyWrap178 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ HsKindSig noExt happy_var_1 happy_var_3)-                                      [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn152 r))--happyReduce_350 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_350 = happySpecReduce_1  137# happyReduction_350-happyReduction_350 happy_x_1-	 =  case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> -	happyIn153-		 (happy_var_1-	)}--happyReduce_351 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_351 = happyMonadReduce 3# 137# happyReduction_351-happyReduction_351 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut178 happy_x_3 of { (HappyWrap178 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ HsKindSig noExt happy_var_1 happy_var_3)-                                      [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn153 r))--happyReduce_352 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_352 = happyMonadReduce 4# 138# happyReduction_352-happyReduction_352 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut154 happy_x_4 of { (HappyWrap154 happy_var_4) -> -	( hintExplicitForall happy_var_1 >>-                                           ams (sLL happy_var_1 happy_var_4 $-                                                HsForAllTy { hst_bndrs = happy_var_2-                                                           , hst_xforall = noExt-                                                           , hst_body = happy_var_4 })-                                               [mu AnnForall happy_var_1, mj AnnDot happy_var_3])}}}})-	) (\r -> happyReturn (happyIn154 r))--happyReduce_353 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_353 = happyMonadReduce 3# 138# happyReduction_353-happyReduction_353 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut156 happy_x_1 of { (HappyWrap156 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut154 happy_x_3 of { (HappyWrap154 happy_var_3) -> -	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)-                                         >> return (sLL happy_var_1 happy_var_3 $-                                            HsQualTy { hst_ctxt = happy_var_1-                                                     , hst_xqual = noExt-                                                     , hst_body = happy_var_3 }))}}})-	) (\r -> happyReturn (happyIn154 r))--happyReduce_354 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_354 = happyMonadReduce 3# 138# happyReduction_354-happyReduction_354 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 (HsIParamTy noExt happy_var_1 happy_var_3))-                                             [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn154 r))--happyReduce_355 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_355 = happySpecReduce_1  138# happyReduction_355-happyReduction_355 happy_x_1-	 =  case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> -	happyIn154-		 (happy_var_1-	)}--happyReduce_356 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_356 = happyMonadReduce 4# 139# happyReduction_356-happyReduction_356 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut155 happy_x_4 of { (HappyWrap155 happy_var_4) -> -	( hintExplicitForall happy_var_1 >>-                                            ams (sLL happy_var_1 happy_var_4 $-                                                 HsForAllTy { hst_bndrs = happy_var_2-                                                            , hst_xforall = noExt-                                                            , hst_body = happy_var_4 })-                                                [mu AnnForall happy_var_1,mj AnnDot happy_var_3])}}}})-	) (\r -> happyReturn (happyIn155 r))--happyReduce_357 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_357 = happyMonadReduce 3# 139# happyReduction_357-happyReduction_357 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut156 happy_x_1 of { (HappyWrap156 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut155 happy_x_3 of { (HappyWrap155 happy_var_3) -> -	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)-                                         >> return (sLL happy_var_1 happy_var_3 $-                                            HsQualTy { hst_ctxt = happy_var_1-                                                     , hst_xqual = noExt-                                                     , hst_body = happy_var_3 }))}}})-	) (\r -> happyReturn (happyIn155 r))--happyReduce_358 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_358 = happyMonadReduce 3# 139# happyReduction_358-happyReduction_358 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 (HsIParamTy noExt happy_var_1 happy_var_3))-                                             [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn155 r))--happyReduce_359 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_359 = happySpecReduce_1  139# happyReduction_359-happyReduction_359 happy_x_1-	 =  case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> -	happyIn155-		 (happy_var_1-	)}--happyReduce_360 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_360 = happyMonadReduce 1# 140# happyReduction_360-happyReduction_360 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> -	( do { (anns,ctx) <- checkContext happy_var_1-                                                ; if null (unLoc ctx)-                                                   then addAnnotation (gl happy_var_1) AnnUnit (gl happy_var_1)-                                                   else return ()-                                                ; ams ctx anns-                                                })})-	) (\r -> happyReturn (happyIn156 r))--happyReduce_361 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_361 = happyMonadReduce 1# 141# happyReduction_361-happyReduction_361 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut160 happy_x_1 of { (HappyWrap160 happy_var_1) -> -	( do { (anns,ctx) <- checkContext happy_var_1-                                                ; if null (unLoc ctx)-                                                   then addAnnotation (gl happy_var_1) AnnUnit (gl happy_var_1)-                                                   else return ()-                                                ; ams ctx anns-                                                })})-	) (\r -> happyReturn (happyIn157 r))--happyReduce_362 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_362 = happySpecReduce_1  142# happyReduction_362-happyReduction_362 happy_x_1-	 =  case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> -	happyIn158-		 (happy_var_1-	)}--happyReduce_363 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_363 = happyMonadReduce 3# 142# happyReduction_363-happyReduction_363 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut154 happy_x_3 of { (HappyWrap154 happy_var_3) -> -	( ams happy_var_1 [mu AnnRarrow happy_var_2] -- See note [GADT decl discards annotations]-                                       >> ams (sLL happy_var_1 happy_var_3 $ HsFunTy noExt happy_var_1 happy_var_3)-                                              [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn158 r))--happyReduce_364 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_364 = happySpecReduce_1  143# happyReduction_364-happyReduction_364 happy_x_1-	 =  case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> -	happyIn159-		 (happy_var_1-	)}--happyReduce_365 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_365 = happySpecReduce_2  143# happyReduction_365-happyReduction_365 happy_x_2-	happy_x_1-	 =  case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> -	case happyOut318 happy_x_2 of { (HappyWrap318 happy_var_2) -> -	happyIn159-		 (sLL happy_var_1 happy_var_2 $ HsDocTy noExt happy_var_1 happy_var_2-	)}}--happyReduce_366 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_366 = happySpecReduce_2  143# happyReduction_366-happyReduction_366 happy_x_2-	happy_x_1-	 =  case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> -	case happyOut163 happy_x_2 of { (HappyWrap163 happy_var_2) -> -	happyIn159-		 (sLL happy_var_1 happy_var_2 $ HsDocTy noExt happy_var_2 happy_var_1-	)}}--happyReduce_367 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_367 = happyMonadReduce 3# 143# happyReduction_367-happyReduction_367 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut155 happy_x_3 of { (HappyWrap155 happy_var_3) -> -	( ams happy_var_1 [mu AnnRarrow happy_var_2] -- See note [GADT decl discards annotations]-                                         >> ams (sLL happy_var_1 happy_var_3 $ HsFunTy noExt happy_var_1 happy_var_3)-                                                [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn159 r))--happyReduce_368 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_368 = happyMonadReduce 4# 143# happyReduction_368-happyReduction_368 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> -	case happyOut318 happy_x_2 of { (HappyWrap318 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut155 happy_x_4 of { (HappyWrap155 happy_var_4) -> -	( ams happy_var_1 [mu AnnRarrow happy_var_3] -- See note [GADT decl discards annotations]-                                         >> ams (sLL happy_var_1 happy_var_4 $-                                                 HsFunTy noExt (cL (comb2 happy_var_1 happy_var_2)-                                                            (HsDocTy noExt happy_var_1 happy_var_2))-                                                         happy_var_4)-                                                [mu AnnRarrow happy_var_3])}}}})-	) (\r -> happyReturn (happyIn159 r))--happyReduce_369 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_369 = happyMonadReduce 4# 143# happyReduction_369-happyReduction_369 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> -	case happyOut163 happy_x_2 of { (HappyWrap163 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut155 happy_x_4 of { (HappyWrap155 happy_var_4) -> -	( ams happy_var_2 [mu AnnRarrow happy_var_3] -- See note [GADT decl discards annotations]-                                         >> ams (sLL happy_var_1 happy_var_4 $-                                                 HsFunTy noExt (cL (comb2 happy_var_1 happy_var_2)-                                                            (HsDocTy noExt happy_var_2 happy_var_1))-                                                         happy_var_4)-                                                [mu AnnRarrow happy_var_3])}}}})-	) (\r -> happyReturn (happyIn159 r))--happyReduce_370 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_370 = happyMonadReduce 1# 144# happyReduction_370-happyReduction_370 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> -	( mergeOps (unLoc happy_var_1))})-	) (\r -> happyReturn (happyIn160 r))--happyReduce_371 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_371 = happySpecReduce_1  145# happyReduction_371-happyReduction_371 happy_x_1-	 =  case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> -	happyIn161-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_372 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_372 = happySpecReduce_2  145# happyReduction_372-happyReduction_372 happy_x_2-	happy_x_1-	 =  case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> -	case happyOut162 happy_x_2 of { (HappyWrap162 happy_var_2) -> -	happyIn161-		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : (unLoc happy_var_1)-	)}}--happyReduce_373 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_373 = happySpecReduce_1  146# happyReduction_373-happyReduction_373 happy_x_1-	 =  case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> -	happyIn162-		 (happy_var_1-	)}--happyReduce_374 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_374 = happySpecReduce_1  146# happyReduction_374-happyReduction_374 happy_x_1-	 =  case happyOut318 happy_x_1 of { (HappyWrap318 happy_var_1) -> -	happyIn162-		 (sL1 happy_var_1 $ TyElDocPrev (unLoc happy_var_1)-	)}--happyReduce_375 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_375 = happyMonadReduce 1# 147# happyReduction_375-happyReduction_375 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> -	( mergeOps happy_var_1)})-	) (\r -> happyReturn (happyIn163 r))--happyReduce_376 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_376 = happySpecReduce_1  148# happyReduction_376-happyReduction_376 happy_x_1-	 =  case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> -	happyIn164-		 ([happy_var_1]-	)}--happyReduce_377 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_377 = happySpecReduce_2  148# happyReduction_377-happyReduction_377 happy_x_2-	happy_x_1-	 =  case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> -	case happyOut165 happy_x_2 of { (HappyWrap165 happy_var_2) -> -	happyIn164-		 (happy_var_2 : happy_var_1-	)}}--happyReduce_378 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_378 = happySpecReduce_1  149# happyReduction_378-happyReduction_378 happy_x_1-	 =  case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> -	happyIn165-		 (sL1 happy_var_1 $ TyElOpd (unLoc happy_var_1)-	)}--happyReduce_379 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_379 = happySpecReduce_2  149# happyReduction_379-happyReduction_379 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut166 happy_x_2 of { (HappyWrap166 happy_var_2) -> -	happyIn165-		 (sLL happy_var_1 happy_var_2 $ (TyElKindApp (comb2 happy_var_1 happy_var_2) happy_var_2)-	)}}--happyReduce_380 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_380 = happySpecReduce_1  149# happyReduction_380-happyReduction_380 happy_x_1-	 =  case happyOut280 happy_x_1 of { (HappyWrap280 happy_var_1) -> -	happyIn165-		 (sL1 happy_var_1 $ if isBangRdr (unLoc happy_var_1)-                                                   then TyElBang-                                                   else TyElOpr (unLoc happy_var_1)-	)}--happyReduce_381 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_381 = happySpecReduce_1  149# happyReduction_381-happyReduction_381 happy_x_1-	 =  case happyOut294 happy_x_1 of { (HappyWrap294 happy_var_1) -> -	happyIn165-		 (sL1 happy_var_1 $ TyElOpr (unLoc happy_var_1)-	)}--happyReduce_382 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_382 = happyMonadReduce 2# 149# happyReduction_382-happyReduction_382 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut275 happy_x_2 of { (HappyWrap275 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ TyElOpr (unLoc happy_var_2))-                                               [mj AnnSimpleQuote happy_var_1,mj AnnVal happy_var_2])}})-	) (\r -> happyReturn (happyIn165 r))--happyReduce_383 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_383 = happyMonadReduce 2# 149# happyReduction_383-happyReduction_383 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut287 happy_x_2 of { (HappyWrap287 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ TyElOpr (unLoc happy_var_2))-                                               [mj AnnSimpleQuote happy_var_1,mj AnnVal happy_var_2])}})-	) (\r -> happyReturn (happyIn165 r))--happyReduce_384 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_384 = happySpecReduce_1  149# happyReduction_384-happyReduction_384 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn165-		 (sL1 happy_var_1 TyElTilde-	)}--happyReduce_385 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_385 = happySpecReduce_1  149# happyReduction_385-happyReduction_385 happy_x_1-	 =  case happyOut151 happy_x_1 of { (HappyWrap151 happy_var_1) -> -	happyIn165-		 (sL1 happy_var_1 $ TyElUnpackedness (unLoc happy_var_1)-	)}--happyReduce_386 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_386 = happySpecReduce_1  150# happyReduction_386-happyReduction_386 happy_x_1-	 =  case happyOut277 happy_x_1 of { (HappyWrap277 happy_var_1) -> -	happyIn166-		 (sL1 happy_var_1 (HsTyVar noExt NotPromoted happy_var_1)-	)}--happyReduce_387 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_387 = happySpecReduce_1  150# happyReduction_387-happyReduction_387 happy_x_1-	 =  case happyOut293 happy_x_1 of { (HappyWrap293 happy_var_1) -> -	happyIn166-		 (sL1 happy_var_1 (HsTyVar noExt NotPromoted happy_var_1)-	)}--happyReduce_388 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_388 = happyMonadReduce 1# 150# happyReduction_388-happyReduction_388 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( do { warnStarIsType (getLoc happy_var_1)-                                               ; return $ sL1 happy_var_1 (HsStarTy noExt (isUnicode happy_var_1)) })})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_389 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_389 = happyMonadReduce 3# 150# happyReduction_389-happyReduction_389 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut188 happy_x_2 of { (HappyWrap188 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( amms (checkRecordSyntax-                                                    (sLL happy_var_1 happy_var_3 $ HsRecTy noExt happy_var_2))-                                                        -- Constructor sigs only-                                                 [moc happy_var_1,mcc happy_var_3])}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_390 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_390 = happyMonadReduce 2# 150# happyReduction_390-happyReduction_390 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTupleTy noExt-                                                    HsBoxedOrConstraintTuple [])-                                                [mop happy_var_1,mcp happy_var_2])}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_391 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_391 = happyMonadReduce 5# 150# happyReduction_391-happyReduction_391 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut152 happy_x_2 of { (HappyWrap152 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut170 happy_x_4 of { (HappyWrap170 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( addAnnotation (gl happy_var_2) AnnComma-                                                          (gl happy_var_3) >>-                                            ams (sLL happy_var_1 happy_var_5 $ HsTupleTy noExt--                                             HsBoxedOrConstraintTuple (happy_var_2 : happy_var_4))-                                                [mop happy_var_1,mcp happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_392 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_392 = happyMonadReduce 2# 150# happyReduction_392-happyReduction_392 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTupleTy noExt HsUnboxedTuple [])-                                             [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_393 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_393 = happyMonadReduce 3# 150# happyReduction_393-happyReduction_393 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut170 happy_x_2 of { (HappyWrap170 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsTupleTy noExt HsUnboxedTuple happy_var_2)-                                             [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_394 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_394 = happyMonadReduce 3# 150# happyReduction_394-happyReduction_394 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut171 happy_x_2 of { (HappyWrap171 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsSumTy noExt happy_var_2)-                                             [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_395 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_395 = happyMonadReduce 3# 150# happyReduction_395-happyReduction_395 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut152 happy_x_2 of { (HappyWrap152 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsListTy  noExt happy_var_2) [mos happy_var_1,mcs happy_var_3])}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_396 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_396 = happyMonadReduce 3# 150# happyReduction_396-happyReduction_396 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut152 happy_x_2 of { (HappyWrap152 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsParTy   noExt happy_var_2) [mop happy_var_1,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_397 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_397 = happySpecReduce_1  150# happyReduction_397-happyReduction_397 happy_x_1-	 =  case happyOut205 happy_x_1 of { (HappyWrap205 happy_var_1) -> -	happyIn166-		 (sL1 happy_var_1 (HsSpliceTy noExt (unLoc happy_var_1) )-	)}--happyReduce_398 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_398 = happyMonadReduce 3# 150# happyReduction_398-happyReduction_398 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ mkHsSpliceTy HasParens happy_var_2)-                                             [mj AnnOpenPE happy_var_1,mj AnnCloseP happy_var_3])}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_399 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_399 = happyMonadReduce 1# 150# happyReduction_399-happyReduction_399 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	(ams (sLL happy_var_1 happy_var_1 $ mkHsSpliceTy HasDollar $ sL1 happy_var_1 $ HsVar noExt $-                                             (sL1 happy_var_1 (mkUnqual varName (getTH_ID_SPLICE happy_var_1))))-                                             [mj AnnThIdSplice happy_var_1])})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_400 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_400 = happyMonadReduce 2# 150# happyReduction_400-happyReduction_400 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut267 happy_x_2 of { (HappyWrap267 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTyVar noExt IsPromoted happy_var_2) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_401 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_401 = happyMonadReduce 6# 150# happyReduction_401-happyReduction_401 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut152 happy_x_3 of { (HappyWrap152 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut170 happy_x_5 of { (HappyWrap170 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	( addAnnotation (gl happy_var_3) AnnComma (gl happy_var_4) >>-                                ams (sLL happy_var_1 happy_var_6 $ HsExplicitTupleTy noExt (happy_var_3 : happy_var_5))-                                    [mj AnnSimpleQuote happy_var_1,mop happy_var_2,mcp happy_var_6])}}}}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_402 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_402 = happyMonadReduce 4# 150# happyReduction_402-happyReduction_402 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut169 happy_x_3 of { (HappyWrap169 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ HsExplicitListTy noExt IsPromoted happy_var_3)-                                                       [mj AnnSimpleQuote happy_var_1,mos happy_var_2,mcs happy_var_4])}}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_403 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_403 = happyMonadReduce 2# 150# happyReduction_403-happyReduction_403 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut296 happy_x_2 of { (HappyWrap296 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTyVar noExt IsPromoted happy_var_2)-                                                       [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_404 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_404 = happyMonadReduce 5# 150# happyReduction_404-happyReduction_404 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut152 happy_x_2 of { (HappyWrap152 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut170 happy_x_4 of { (HappyWrap170 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( addAnnotation (gl happy_var_2) AnnComma-                                                           (gl happy_var_3) >>-                                             ams (sLL happy_var_1 happy_var_5 $ HsExplicitListTy noExt NotPromoted (happy_var_2 : happy_var_4))-                                                 [mos happy_var_1,mcs happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_405 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_405 = happySpecReduce_1  150# happyReduction_405-happyReduction_405 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn166-		 (sLL happy_var_1 happy_var_1 $ HsTyLit noExt $ HsNumTy (getINTEGERs happy_var_1)-                                                           (il_value (getINTEGER happy_var_1))-	)}--happyReduce_406 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_406 = happySpecReduce_1  150# happyReduction_406-happyReduction_406 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn166-		 (sLL happy_var_1 happy_var_1 $ HsTyLit noExt $ HsStrTy (getSTRINGs happy_var_1)-                                                                     (getSTRING  happy_var_1)-	)}--happyReduce_407 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_407 = happySpecReduce_1  150# happyReduction_407-happyReduction_407 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn166-		 (sL1 happy_var_1 $ mkAnonWildCardTy-	)}--happyReduce_408 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_408 = happySpecReduce_1  151# happyReduction_408-happyReduction_408 happy_x_1-	 =  case happyOut147 happy_x_1 of { (HappyWrap147 happy_var_1) -> -	happyIn167-		 (mkLHsSigType happy_var_1-	)}--happyReduce_409 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_409 = happySpecReduce_1  152# happyReduction_409-happyReduction_409 happy_x_1-	 =  case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> -	happyIn168-		 ([mkLHsSigType happy_var_1]-	)}--happyReduce_410 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_410 = happyMonadReduce 3# 152# happyReduction_410-happyReduction_410 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut168 happy_x_3 of { (HappyWrap168 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)-                                           >> return (mkLHsSigType happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn168 r))--happyReduce_411 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_411 = happySpecReduce_1  153# happyReduction_411-happyReduction_411 happy_x_1-	 =  case happyOut170 happy_x_1 of { (HappyWrap170 happy_var_1) -> -	happyIn169-		 (happy_var_1-	)}--happyReduce_412 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_412 = happySpecReduce_0  153# happyReduction_412-happyReduction_412  =  happyIn169-		 ([]-	)--happyReduce_413 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_413 = happySpecReduce_1  154# happyReduction_413-happyReduction_413 happy_x_1-	 =  case happyOut152 happy_x_1 of { (HappyWrap152 happy_var_1) -> -	happyIn170-		 ([happy_var_1]-	)}--happyReduce_414 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_414 = happyMonadReduce 3# 154# happyReduction_414-happyReduction_414 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut152 happy_x_1 of { (HappyWrap152 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut170 happy_x_3 of { (HappyWrap170 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)-                                          >> return (happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn170 r))--happyReduce_415 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_415 = happyMonadReduce 3# 155# happyReduction_415-happyReduction_415 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut152 happy_x_1 of { (HappyWrap152 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut152 happy_x_3 of { (HappyWrap152 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnVbar (gl happy_var_2)-                                          >> return [happy_var_1,happy_var_3])}}})-	) (\r -> happyReturn (happyIn171 r))--happyReduce_416 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_416 = happyMonadReduce 3# 155# happyReduction_416-happyReduction_416 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut152 happy_x_1 of { (HappyWrap152 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut171 happy_x_3 of { (HappyWrap171 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnVbar (gl happy_var_2)-                                          >> return (happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn171 r))--happyReduce_417 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_417 = happySpecReduce_2  156# happyReduction_417-happyReduction_417 happy_x_2-	happy_x_1-	 =  case happyOut173 happy_x_1 of { (HappyWrap173 happy_var_1) -> -	case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> -	happyIn172-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_418 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_418 = happySpecReduce_0  156# happyReduction_418-happyReduction_418  =  happyIn172-		 ([]-	)--happyReduce_419 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_419 = happySpecReduce_1  157# happyReduction_419-happyReduction_419 happy_x_1-	 =  case happyOut293 happy_x_1 of { (HappyWrap293 happy_var_1) -> -	happyIn173-		 (sL1 happy_var_1 (UserTyVar noExt happy_var_1)-	)}--happyReduce_420 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_420 = happyMonadReduce 5# 157# happyReduction_420-happyReduction_420 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut293 happy_x_2 of { (HappyWrap293 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut178 happy_x_4 of { (HappyWrap178 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5  (KindedTyVar noExt happy_var_2 happy_var_4))-                                               [mop happy_var_1,mu AnnDcolon happy_var_3-                                               ,mcp happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn173 r))--happyReduce_421 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_421 = happySpecReduce_0  158# happyReduction_421-happyReduction_421  =  happyIn174-		 (noLoc ([],[])-	)--happyReduce_422 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_422 = happySpecReduce_2  158# happyReduction_422-happyReduction_422 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> -	happyIn174-		 ((sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]-                                                 ,reverse (unLoc happy_var_2)))-	)}}--happyReduce_423 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_423 = happyMonadReduce 3# 159# happyReduction_423-happyReduction_423 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut175 happy_x_1 of { (HappyWrap175 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut176 happy_x_3 of { (HappyWrap176 happy_var_3) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2)-                           >> return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})-	) (\r -> happyReturn (happyIn175 r))--happyReduce_424 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_424 = happySpecReduce_1  159# happyReduction_424-happyReduction_424 happy_x_1-	 =  case happyOut176 happy_x_1 of { (HappyWrap176 happy_var_1) -> -	happyIn175-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_425 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_425 = happyMonadReduce 3# 160# happyReduction_425-happyReduction_425 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut177 happy_x_1 of { (HappyWrap177 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut177 happy_x_3 of { (HappyWrap177 happy_var_3) -> -	( ams (cL (comb3 happy_var_1 happy_var_2 happy_var_3)-                                       (reverse (unLoc happy_var_1), reverse (unLoc happy_var_3)))-                                       [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn176 r))--happyReduce_426 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_426 = happySpecReduce_0  161# happyReduction_426-happyReduction_426  =  happyIn177-		 (noLoc []-	)--happyReduce_427 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_427 = happySpecReduce_2  161# happyReduction_427-happyReduction_427 happy_x_2-	happy_x_1-	 =  case happyOut177 happy_x_1 of { (HappyWrap177 happy_var_1) -> -	case happyOut293 happy_x_2 of { (HappyWrap293 happy_var_2) -> -	happyIn177-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)-	)}}--happyReduce_428 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_428 = happySpecReduce_1  162# happyReduction_428-happyReduction_428 happy_x_1-	 =  case happyOut154 happy_x_1 of { (HappyWrap154 happy_var_1) -> -	happyIn178-		 (happy_var_1-	)}--happyReduce_429 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_429 = happyMonadReduce 4# 163# happyReduction_429-happyReduction_429 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut180 happy_x_3 of { (HappyWrap180 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( checkEmptyGADTs $-                                                      cL (comb2 happy_var_1 happy_var_3)-                                                        ([mj AnnWhere happy_var_1-                                                         ,moc happy_var_2-                                                         ,mcc happy_var_4]-                                                        , unLoc happy_var_3))}}}})-	) (\r -> happyReturn (happyIn179 r))--happyReduce_430 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_430 = happyMonadReduce 4# 163# happyReduction_430-happyReduction_430 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut180 happy_x_3 of { (HappyWrap180 happy_var_3) -> -	( checkEmptyGADTs $-                                                      cL (comb2 happy_var_1 happy_var_3)-                                                        ([mj AnnWhere happy_var_1]-                                                        , unLoc happy_var_3))}})-	) (\r -> happyReturn (happyIn179 r))--happyReduce_431 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_431 = happySpecReduce_0  163# happyReduction_431-happyReduction_431  =  happyIn179-		 (noLoc ([],[])-	)--happyReduce_432 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_432 = happyMonadReduce 3# 164# happyReduction_432-happyReduction_432 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut181 happy_x_1 of { (HappyWrap181 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut180 happy_x_3 of { (HappyWrap180 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnSemi (gl happy_var_2)-                     >> return (cL (comb2 happy_var_1 happy_var_3) (happy_var_1 : unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn180 r))--happyReduce_433 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_433 = happySpecReduce_1  164# happyReduction_433-happyReduction_433 happy_x_1-	 =  case happyOut181 happy_x_1 of { (HappyWrap181 happy_var_1) -> -	happyIn180-		 (cL (gl happy_var_1) [happy_var_1]-	)}--happyReduce_434 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_434 = happySpecReduce_0  164# happyReduction_434-happyReduction_434  =  happyIn180-		 (noLoc []-	)--happyReduce_435 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_435 = happyMonadReduce 3# 165# happyReduction_435-happyReduction_435 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> -	case happyOut182 happy_x_3 of { (HappyWrap182 happy_var_3) -> -	( return $ addConDoc happy_var_3 happy_var_1)}})-	) (\r -> happyReturn (happyIn181 r))--happyReduce_436 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_436 = happyMonadReduce 1# 165# happyReduction_436-happyReduction_436 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut182 happy_x_1 of { (HappyWrap182 happy_var_1) -> -	( return happy_var_1)})-	) (\r -> happyReturn (happyIn181 r))--happyReduce_437 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_437 = happyMonadReduce 3# 166# happyReduction_437-happyReduction_437 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut148 happy_x_3 of { (HappyWrap148 happy_var_3) -> -	( let (gadt,anns) = mkGadtDecl (unLoc happy_var_1) happy_var_3-                   in ams (sLL happy_var_1 happy_var_3 gadt)-                       (mu AnnDcolon happy_var_2:anns))}}})-	) (\r -> happyReturn (happyIn182 r))--happyReduce_438 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_438 = happySpecReduce_3  167# happyReduction_438-happyReduction_438 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut184 happy_x_3 of { (HappyWrap184 happy_var_3) -> -	happyIn183-		 (cL (comb2 happy_var_2 happy_var_3) ([mj AnnEqual happy_var_2]-                                                     ,addConDocs (unLoc happy_var_3) happy_var_1)-	)}}}--happyReduce_439 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_439 = happyMonadReduce 5# 168# happyReduction_439-happyReduction_439 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut184 happy_x_1 of { (HappyWrap184 happy_var_1) -> -	case happyOut323 happy_x_2 of { (HappyWrap323 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut322 happy_x_4 of { (HappyWrap322 happy_var_4) -> -	case happyOut185 happy_x_5 of { (HappyWrap185 happy_var_5) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnVbar (gl happy_var_3)-               >> return (sLL happy_var_1 happy_var_5 (addConDoc happy_var_5 happy_var_2 : addConDocFirst (unLoc happy_var_1) happy_var_4)))}}}}})-	) (\r -> happyReturn (happyIn184 r))--happyReduce_440 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_440 = happySpecReduce_1  168# happyReduction_440-happyReduction_440 happy_x_1-	 =  case happyOut185 happy_x_1 of { (HappyWrap185 happy_var_1) -> -	happyIn184-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_441 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_441 = happyMonadReduce 5# 169# happyReduction_441-happyReduction_441 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> -	case happyOut186 happy_x_2 of { (HappyWrap186 happy_var_2) -> -	case happyOut157 happy_x_3 of { (HappyWrap157 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut187 happy_x_5 of { (HappyWrap187 happy_var_5) -> -	( ams (let (con,details,doc_prev) = unLoc happy_var_5 in-                  addConDoc (cL (comb4 happy_var_2 happy_var_3 happy_var_4 happy_var_5) (mkConDeclH98 con-                                                       (snd $ unLoc happy_var_2)-                                                       (Just happy_var_3)-                                                       details))-                            (happy_var_1 `mplus` doc_prev))-                        (mu AnnDarrow happy_var_4:(fst $ unLoc happy_var_2)))}}}}})-	) (\r -> happyReturn (happyIn185 r))--happyReduce_442 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_442 = happyMonadReduce 3# 169# happyReduction_442-happyReduction_442 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> -	case happyOut186 happy_x_2 of { (HappyWrap186 happy_var_2) -> -	case happyOut187 happy_x_3 of { (HappyWrap187 happy_var_3) -> -	( ams ( let (con,details,doc_prev) = unLoc happy_var_3 in-                  addConDoc (cL (comb2 happy_var_2 happy_var_3) (mkConDeclH98 con-                                                      (snd $ unLoc happy_var_2)-                                                      Nothing   -- No context-                                                      details))-                            (happy_var_1 `mplus` doc_prev))-                       (fst $ unLoc happy_var_2))}}})-	) (\r -> happyReturn (happyIn185 r))--happyReduce_443 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_443 = happySpecReduce_3  170# happyReduction_443-happyReduction_443 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut172 happy_x_2 of { (HappyWrap172 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn186-		 (sLL happy_var_1 happy_var_3 ([mu AnnForall happy_var_1,mj AnnDot happy_var_3], Just happy_var_2)-	)}}}--happyReduce_444 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_444 = happySpecReduce_0  170# happyReduction_444-happyReduction_444  =  happyIn186-		 (noLoc ([], Nothing)-	)--happyReduce_445 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_445 = happyMonadReduce 1# 171# happyReduction_445-happyReduction_445 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> -	( do { c <- mergeDataCon (unLoc happy_var_1)-                                                 ; return $ sL1 happy_var_1 c })})-	) (\r -> happyReturn (happyIn187 r))--happyReduce_446 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_446 = happySpecReduce_0  172# happyReduction_446-happyReduction_446  =  happyIn188-		 ([]-	)--happyReduce_447 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_447 = happySpecReduce_1  172# happyReduction_447-happyReduction_447 happy_x_1-	 =  case happyOut189 happy_x_1 of { (HappyWrap189 happy_var_1) -> -	happyIn188-		 (happy_var_1-	)}--happyReduce_448 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_448 = happyMonadReduce 5# 173# happyReduction_448-happyReduction_448 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut190 happy_x_1 of { (HappyWrap190 happy_var_1) -> -	case happyOut323 happy_x_2 of { (HappyWrap323 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut322 happy_x_4 of { (HappyWrap322 happy_var_4) -> -	case happyOut189 happy_x_5 of { (HappyWrap189 happy_var_5) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_3) >>-               return ((addFieldDoc happy_var_1 happy_var_4) : addFieldDocs happy_var_5 happy_var_2))}}}}})-	) (\r -> happyReturn (happyIn189 r))--happyReduce_449 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_449 = happySpecReduce_1  173# happyReduction_449-happyReduction_449 happy_x_1-	 =  case happyOut190 happy_x_1 of { (HappyWrap190 happy_var_1) -> -	happyIn189-		 ([happy_var_1]-	)}--happyReduce_450 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_450 = happyMonadReduce 5# 174# happyReduction_450-happyReduction_450 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> -	case happyOut149 happy_x_2 of { (HappyWrap149 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut154 happy_x_4 of { (HappyWrap154 happy_var_4) -> -	case happyOut322 happy_x_5 of { (HappyWrap322 happy_var_5) -> -	( ams (cL (comb2 happy_var_2 happy_var_4)-                      (ConDeclField noExt (reverse (map (\ln@(dL->L l n) -> cL l $ FieldOcc noExt ln) (unLoc happy_var_2))) happy_var_4 (happy_var_1 `mplus` happy_var_5)))-                   [mu AnnDcolon happy_var_3])}}}}})-	) (\r -> happyReturn (happyIn190 r))--happyReduce_451 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_451 = happySpecReduce_0  175# happyReduction_451-happyReduction_451  =  happyIn191-		 (noLoc []-	)--happyReduce_452 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_452 = happySpecReduce_1  175# happyReduction_452-happyReduction_452 happy_x_1-	 =  case happyOut192 happy_x_1 of { (HappyWrap192 happy_var_1) -> -	happyIn191-		 (happy_var_1-	)}--happyReduce_453 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_453 = happySpecReduce_2  176# happyReduction_453-happyReduction_453 happy_x_2-	happy_x_1-	 =  case happyOut192 happy_x_1 of { (HappyWrap192 happy_var_1) -> -	case happyOut193 happy_x_2 of { (HappyWrap193 happy_var_2) -> -	happyIn192-		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1-	)}}--happyReduce_454 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_454 = happySpecReduce_1  176# happyReduction_454-happyReduction_454 happy_x_1-	 =  case happyOut193 happy_x_1 of { (HappyWrap193 happy_var_1) -> -	happyIn192-		 (sLL happy_var_1 happy_var_1 [happy_var_1]-	)}--happyReduce_455 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_455 = happyMonadReduce 2# 177# happyReduction_455-happyReduction_455 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut194 happy_x_2 of { (HappyWrap194 happy_var_2) -> -	( let { full_loc = comb2 happy_var_1 happy_var_2 }-                 in ams (cL full_loc $ HsDerivingClause noExt Nothing happy_var_2)-                        [mj AnnDeriving happy_var_1])}})-	) (\r -> happyReturn (happyIn193 r))--happyReduce_456 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_456 = happyMonadReduce 3# 177# happyReduction_456-happyReduction_456 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut82 happy_x_2 of { (HappyWrap82 happy_var_2) -> -	case happyOut194 happy_x_3 of { (HappyWrap194 happy_var_3) -> -	( let { full_loc = comb2 happy_var_1 happy_var_3 }-                 in ams (cL full_loc $ HsDerivingClause noExt (Just happy_var_2) happy_var_3)-                        [mj AnnDeriving happy_var_1])}}})-	) (\r -> happyReturn (happyIn193 r))--happyReduce_457 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_457 = happyMonadReduce 3# 177# happyReduction_457-happyReduction_457 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut194 happy_x_2 of { (HappyWrap194 happy_var_2) -> -	case happyOut83 happy_x_3 of { (HappyWrap83 happy_var_3) -> -	( let { full_loc = comb2 happy_var_1 happy_var_3 }-                 in ams (cL full_loc $ HsDerivingClause noExt (Just happy_var_3) happy_var_2)-                        [mj AnnDeriving happy_var_1])}}})-	) (\r -> happyReturn (happyIn193 r))--happyReduce_458 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_458 = happySpecReduce_1  178# happyReduction_458-happyReduction_458 happy_x_1-	 =  case happyOut282 happy_x_1 of { (HappyWrap282 happy_var_1) -> -	happyIn194-		 (sL1 happy_var_1 [mkLHsSigType happy_var_1]-	)}--happyReduce_459 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_459 = happyMonadReduce 2# 178# happyReduction_459-happyReduction_459 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 [])-                                     [mop happy_var_1,mcp happy_var_2])}})-	) (\r -> happyReturn (happyIn194 r))--happyReduce_460 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_460 = happyMonadReduce 3# 178# happyReduction_460-happyReduction_460 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut168 happy_x_2 of { (HappyWrap168 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 happy_var_2)-                                     [mop happy_var_1,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn194 r))--happyReduce_461 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_461 = happySpecReduce_1  179# happyReduction_461-happyReduction_461 happy_x_1-	 =  case happyOut196 happy_x_1 of { (HappyWrap196 happy_var_1) -> -	happyIn195-		 (sL1 happy_var_1 (DocD noExt (unLoc happy_var_1))-	)}--happyReduce_462 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_462 = happySpecReduce_1  180# happyReduction_462-happyReduction_462 happy_x_1-	 =  case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> -	happyIn196-		 (sL1 happy_var_1 (DocCommentNext (unLoc happy_var_1))-	)}--happyReduce_463 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_463 = happySpecReduce_1  180# happyReduction_463-happyReduction_463 happy_x_1-	 =  case happyOut318 happy_x_1 of { (HappyWrap318 happy_var_1) -> -	happyIn196-		 (sL1 happy_var_1 (DocCommentPrev (unLoc happy_var_1))-	)}--happyReduce_464 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_464 = happySpecReduce_1  180# happyReduction_464-happyReduction_464 happy_x_1-	 =  case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> -	happyIn196-		 (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> DocCommentNamed n doc)-	)}--happyReduce_465 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_465 = happySpecReduce_1  180# happyReduction_465-happyReduction_465 happy_x_1-	 =  case happyOut320 happy_x_1 of { (HappyWrap320 happy_var_1) -> -	happyIn196-		 (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> DocGroup n doc)-	)}--happyReduce_466 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_466 = happySpecReduce_1  181# happyReduction_466-happyReduction_466 happy_x_1-	 =  case happyOut202 happy_x_1 of { (HappyWrap202 happy_var_1) -> -	happyIn197-		 (happy_var_1-	)}--happyReduce_467 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_467 = happyMonadReduce 3# 181# happyReduction_467-happyReduction_467 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	case happyOut199 happy_x_3 of { (HappyWrap199 happy_var_3) -> -	( do { let { e = sLL happy_var_1 happy_var_2 (SectionR noExt (sL1 happy_var_1 (HsVar noExt (sL1 happy_var_1 bang_RDR))) happy_var_2)-                                            ; l = comb2 happy_var_1 happy_var_3 };-                                        (ann, r) <- checkValDef empty SrcStrict e Nothing happy_var_3 ;-                                        hintBangPat (comb2 happy_var_1 happy_var_2) (unLoc e) ;-                                        -- Depending upon what the pattern looks like we might get either-                                        -- a FunBind or PatBind back from checkValDef. See Note-                                        -- [FunBind vs PatBind]-                                        case r of {-                                          (FunBind _ n _ _ _) ->-                                                amsL l [mj AnnFunId n] >> return () ;-                                          (PatBind _ (dL->L l _) _rhs _) ->-                                                amsL l [] >> return () } ;--                                        _ <- amsL l (ann ++ fst (unLoc happy_var_3) ++ [mj AnnBang happy_var_1]) ;-                                        return $! (sL l $ ValD noExt r) })}}})-	) (\r -> happyReturn (happyIn197 r))--happyReduce_468 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_468 = happyMonadReduce 3# 181# happyReduction_468-happyReduction_468 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> -	case happyOut145 happy_x_2 of { (HappyWrap145 happy_var_2) -> -	case happyOut199 happy_x_3 of { (HappyWrap199 happy_var_3) -> -	( do { (ann,r) <- checkValDef empty NoSrcStrict happy_var_1 (snd happy_var_2) happy_var_3;-                                        let { l = comb2 happy_var_1 happy_var_3 };-                                        -- Depending upon what the pattern looks like we might get either-                                        -- a FunBind or PatBind back from checkValDef. See Note-                                        -- [FunBind vs PatBind]-                                        case r of {-                                          (FunBind _ n _ _ _) ->-                                                amsL l (mj AnnFunId n:(fst happy_var_2)) >> return () ;-                                          (PatBind _ (dL->L lh _lhs) _rhs _) ->-                                                amsL lh (fst happy_var_2) >> return () } ;-                                        _ <- amsL l (ann ++ (fst $ unLoc happy_var_3));-                                        return $! (sL l $ ValD noExt r) })}}})-	) (\r -> happyReturn (happyIn197 r))--happyReduce_469 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_469 = happySpecReduce_1  181# happyReduction_469-happyReduction_469 happy_x_1-	 =  case happyOut109 happy_x_1 of { (HappyWrap109 happy_var_1) -> -	happyIn197-		 (happy_var_1-	)}--happyReduce_470 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_470 = happySpecReduce_1  181# happyReduction_470-happyReduction_470 happy_x_1-	 =  case happyOut195 happy_x_1 of { (HappyWrap195 happy_var_1) -> -	happyIn197-		 (happy_var_1-	)}--happyReduce_471 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_471 = happySpecReduce_1  182# happyReduction_471-happyReduction_471 happy_x_1-	 =  case happyOut197 happy_x_1 of { (HappyWrap197 happy_var_1) -> -	happyIn198-		 (happy_var_1-	)}--happyReduce_472 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_472 = happySpecReduce_1  182# happyReduction_472-happyReduction_472 happy_x_1-	 =  case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> -	happyIn198-		 (sLL happy_var_1 happy_var_1 $ mkSpliceDecl happy_var_1-	)}--happyReduce_473 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_473 = happySpecReduce_3  183# happyReduction_473-happyReduction_473 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOut126 happy_x_3 of { (HappyWrap126 happy_var_3) -> -	happyIn199-		 (sL (comb3 happy_var_1 happy_var_2 happy_var_3)-                                    ((mj AnnEqual happy_var_1 : (fst $ unLoc happy_var_3))-                                    ,GRHSs noExt (unguardedRHS (comb3 happy_var_1 happy_var_2 happy_var_3) happy_var_2)-                                   (snd $ unLoc happy_var_3))-	)}}}--happyReduce_474 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_474 = happySpecReduce_2  183# happyReduction_474-happyReduction_474 happy_x_2-	happy_x_1-	 =  case happyOut200 happy_x_1 of { (HappyWrap200 happy_var_1) -> -	case happyOut126 happy_x_2 of { (HappyWrap126 happy_var_2) -> -	happyIn199-		 (sLL happy_var_1 happy_var_2  (fst $ unLoc happy_var_2-                                    ,GRHSs noExt (reverse (unLoc happy_var_1))-                                                    (snd $ unLoc happy_var_2))-	)}}--happyReduce_475 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_475 = happySpecReduce_2  184# happyReduction_475-happyReduction_475 happy_x_2-	happy_x_1-	 =  case happyOut200 happy_x_1 of { (HappyWrap200 happy_var_1) -> -	case happyOut201 happy_x_2 of { (HappyWrap201 happy_var_2) -> -	happyIn200-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)-	)}}--happyReduce_476 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_476 = happySpecReduce_1  184# happyReduction_476-happyReduction_476 happy_x_1-	 =  case happyOut201 happy_x_1 of { (HappyWrap201 happy_var_1) -> -	happyIn200-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_477 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_477 = happyMonadReduce 4# 185# happyReduction_477-happyReduction_477 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut233 happy_x_2 of { (HappyWrap233 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	( ams (sL (comb2 happy_var_1 happy_var_4) $ GRHS noExt (unLoc happy_var_2) happy_var_4)-                                         [mj AnnVbar happy_var_1,mj AnnEqual happy_var_3])}}}})-	) (\r -> happyReturn (happyIn201 r))--happyReduce_478 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_478 = happyMonadReduce 3# 186# happyReduction_478-happyReduction_478 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut148 happy_x_3 of { (HappyWrap148 happy_var_3) -> -	( do { v <- checkValSigLhs happy_var_1-                              ; _ <- amsL (comb2 happy_var_1 happy_var_3) [mu AnnDcolon happy_var_2]-                              ; return (sLL happy_var_1 happy_var_3 $ SigD noExt $-                                  TypeSig noExt [v] (mkLHsSigWcType happy_var_3))})}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_479 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_479 = happyMonadReduce 5# 186# happyReduction_479-happyReduction_479 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut149 happy_x_3 of { (HappyWrap149 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut148 happy_x_5 of { (HappyWrap148 happy_var_5) -> -	( do { let sig = TypeSig noExt (happy_var_1 : reverse (unLoc happy_var_3))-                                     (mkLHsSigWcType happy_var_5)-                 ; addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)-                 ; ams ( sLL happy_var_1 happy_var_5 $ SigD noExt sig )-                       [mu AnnDcolon happy_var_4] })}}}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_480 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_480 = happyMonadReduce 3# 186# happyReduction_480-happyReduction_480 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut73 happy_x_1 of { (HappyWrap73 happy_var_1) -> -	case happyOut72 happy_x_2 of { (HappyWrap72 happy_var_2) -> -	case happyOut74 happy_x_3 of { (HappyWrap74 happy_var_3) -> -	( checkPrecP happy_var_2 happy_var_3 >>-                 ams (sLL happy_var_1 happy_var_3 $ SigD noExt-                        (FixSig noExt (FixitySig noExt (fromOL $ unLoc happy_var_3)-                                (Fixity (fst $ unLoc happy_var_2) (snd $ unLoc happy_var_2) (unLoc happy_var_1)))))-                     [mj AnnInfix happy_var_1,mj AnnVal happy_var_2])}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_481 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_481 = happySpecReduce_1  186# happyReduction_481-happyReduction_481 happy_x_1-	 =  case happyOut114 happy_x_1 of { (HappyWrap114 happy_var_1) -> -	happyIn202-		 (sLL happy_var_1 happy_var_1 . SigD noExt . unLoc $ happy_var_1-	)}--happyReduce_482 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_482 = happyMonadReduce 4# 186# happyReduction_482-happyReduction_482 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut271 happy_x_2 of { (HappyWrap271 happy_var_2) -> -	case happyOut146 happy_x_3 of { (HappyWrap146 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( let (dcolon, tc) = happy_var_3-                   in ams-                       (sLL happy_var_1 happy_var_4-                         (SigD noExt (CompleteMatchSig noExt (getCOMPLETE_PRAGs happy_var_1) happy_var_2 tc)))-                    ([ mo happy_var_1 ] ++ dcolon ++ [mc happy_var_4]))}}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_483 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_483 = happyMonadReduce 4# 186# happyReduction_483-happyReduction_483 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut203 happy_x_2 of { (HappyWrap203 happy_var_2) -> -	case happyOut297 happy_x_3 of { (HappyWrap297 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams ((sLL happy_var_1 happy_var_4 $ SigD noExt (InlineSig noExt happy_var_3-                            (mkInlinePragma (getINLINE_PRAGs happy_var_1) (getINLINE happy_var_1)-                                            (snd happy_var_2)))))-                       ((mo happy_var_1:fst happy_var_2) ++ [mc happy_var_4]))}}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_484 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_484 = happyMonadReduce 3# 186# happyReduction_484-happyReduction_484 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut297 happy_x_2 of { (HappyWrap297 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (SigD noExt (SCCFunSig noExt (getSCC_PRAGs happy_var_1) happy_var_2 Nothing)))-                 [mo happy_var_1, mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_485 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_485 = happyMonadReduce 4# 186# happyReduction_485-happyReduction_485 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut297 happy_x_2 of { (HappyWrap297 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( do { scc <- getSCC happy_var_3-                ; let str_lit = StringLiteral (getSTRINGs happy_var_3) scc-                ; ams (sLL happy_var_1 happy_var_4 (SigD noExt (SCCFunSig noExt (getSCC_PRAGs happy_var_1) happy_var_2 (Just ( sL1 happy_var_3 str_lit)))))-                      [mo happy_var_1, mc happy_var_4] })}}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_486 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_486 = happyMonadReduce 6# 186# happyReduction_486-happyReduction_486 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut203 happy_x_2 of { (HappyWrap203 happy_var_2) -> -	case happyOut297 happy_x_3 of { (HappyWrap297 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut150 happy_x_5 of { (HappyWrap150 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	( ams (-                 let inl_prag = mkInlinePragma (getSPEC_PRAGs happy_var_1)-                                             (NoUserInline, FunLike) (snd happy_var_2)-                  in sLL happy_var_1 happy_var_6 $ SigD noExt (SpecSig noExt happy_var_3 (fromOL happy_var_5) inl_prag))-                    (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)))}}}}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_487 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_487 = happyMonadReduce 6# 186# happyReduction_487-happyReduction_487 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut203 happy_x_2 of { (HappyWrap203 happy_var_2) -> -	case happyOut297 happy_x_3 of { (HappyWrap297 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut150 happy_x_5 of { (HappyWrap150 happy_var_5) -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	( ams (sLL happy_var_1 happy_var_6 $ SigD noExt (SpecSig noExt happy_var_3 (fromOL happy_var_5)-                               (mkInlinePragma (getSPEC_INLINE_PRAGs happy_var_1)-                                               (getSPEC_INLINE happy_var_1) (snd happy_var_2))))-                       (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)))}}}}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_488 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_488 = happyMonadReduce 4# 186# happyReduction_488-happyReduction_488 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut167 happy_x_3 of { (HappyWrap167 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4-                                  $ SigD noExt (SpecInstSig noExt (getSPEC_PRAGs happy_var_1) happy_var_3))-                       [mo happy_var_1,mj AnnInstance happy_var_2,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_489 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_489 = happyMonadReduce 3# 186# happyReduction_489-happyReduction_489 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut260 happy_x_2 of { (HappyWrap260 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ SigD noExt (MinimalSig noExt (getMINIMAL_PRAGs happy_var_1) happy_var_2))-                   [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_490 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_490 = happySpecReduce_0  187# happyReduction_490-happyReduction_490  =  happyIn203-		 (([],Nothing)-	)--happyReduce_491 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_491 = happySpecReduce_1  187# happyReduction_491-happyReduction_491 happy_x_1-	 =  case happyOut204 happy_x_1 of { (HappyWrap204 happy_var_1) -> -	happyIn203-		 ((fst happy_var_1,Just (snd happy_var_1))-	)}--happyReduce_492 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_492 = happySpecReduce_3  188# happyReduction_492-happyReduction_492 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn204-		 (([mj AnnOpenS happy_var_1,mj AnnVal happy_var_2,mj AnnCloseS happy_var_3]-                                  ,ActiveAfter  (getINTEGERs happy_var_2) (fromInteger (il_value (getINTEGER happy_var_2))))-	)}}}--happyReduce_493 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_493 = happyReduce 4# 188# happyReduction_493-happyReduction_493 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn204-		 (([mj AnnOpenS happy_var_1,mj AnnTilde happy_var_2,mj AnnVal happy_var_3-                                                 ,mj AnnCloseS happy_var_4]-                                  ,ActiveBefore (getINTEGERs happy_var_3) (fromInteger (il_value (getINTEGER happy_var_3))))-	) `HappyStk` happyRest}}}}--happyReduce_494 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_494 = happySpecReduce_1  189# happyReduction_494-happyReduction_494 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn205-		 (let { loc = getLoc happy_var_1-                                ; ITquasiQuote (quoter, quote, quoteSpan) = unLoc happy_var_1-                                ; quoterId = mkUnqual varName quoter }-                            in sL1 happy_var_1 (mkHsQuasiQuote quoterId (RealSrcSpan quoteSpan) quote)-	)}--happyReduce_495 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_495 = happySpecReduce_1  189# happyReduction_495-happyReduction_495 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn205-		 (let { loc = getLoc happy_var_1-                                ; ITqQuasiQuote (qual, quoter, quote, quoteSpan) = unLoc happy_var_1-                                ; quoterId = mkQual varName (qual, quoter) }-                            in sL (getLoc happy_var_1) (mkHsQuasiQuote quoterId (RealSrcSpan quoteSpan) quote)-	)}--happyReduce_496 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_496 = happyMonadReduce 3# 190# happyReduction_496-happyReduction_496 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut147 happy_x_3 of { (HappyWrap147 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ ExprWithTySig noExt happy_var_1 (mkLHsSigWcType happy_var_3))-                                       [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn206 r))--happyReduce_497 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_497 = happyMonadReduce 3# 190# happyReduction_497-happyReduction_497 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp noExt happy_var_1 happy_var_3-                                                        HsFirstOrderApp True)-                                       [mu Annlarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn206 r))--happyReduce_498 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_498 = happyMonadReduce 3# 190# happyReduction_498-happyReduction_498 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp noExt happy_var_3 happy_var_1-                                                      HsFirstOrderApp False)-                                       [mu Annrarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn206 r))--happyReduce_499 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_499 = happyMonadReduce 3# 190# happyReduction_499-happyReduction_499 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp noExt happy_var_1 happy_var_3-                                                      HsHigherOrderApp True)-                                       [mu AnnLarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn206 r))--happyReduce_500 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_500 = happyMonadReduce 3# 190# happyReduction_500-happyReduction_500 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp noExt happy_var_3 happy_var_1-                                                      HsHigherOrderApp False)-                                       [mu AnnRarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn206 r))--happyReduce_501 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_501 = happySpecReduce_1  190# happyReduction_501-happyReduction_501 happy_x_1-	 =  case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	happyIn206-		 (happy_var_1-	)}--happyReduce_502 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_502 = happySpecReduce_1  191# happyReduction_502-happyReduction_502 happy_x_1-	 =  case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> -	happyIn207-		 (happy_var_1-	)}--happyReduce_503 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_503 = happyMonadReduce 3# 191# happyReduction_503-happyReduction_503 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	case happyOut288 happy_x_2 of { (HappyWrap288 happy_var_2) -> -	case happyOut210 happy_x_3 of { (HappyWrap210 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 (OpApp noExt happy_var_1 happy_var_2 happy_var_3))-                                     [mj AnnVal happy_var_2])}}})-	) (\r -> happyReturn (happyIn207 r))--happyReduce_504 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_504 = happySpecReduce_1  192# happyReduction_504-happyReduction_504 happy_x_1-	 =  case happyOut209 happy_x_1 of { (HappyWrap209 happy_var_1) -> -	happyIn208-		 (happy_var_1-	)}--happyReduce_505 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_505 = happyMonadReduce 3# 192# happyReduction_505-happyReduction_505 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> -	case happyOut288 happy_x_2 of { (HappyWrap288 happy_var_2) -> -	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> -	( do { when (srcSpanEnd (getLoc happy_var_2)-                                                == srcSpanStart (getLoc happy_var_3)-                                                && checkIfBang happy_var_2) $-                                                warnSpaceAfterBang (comb2 happy_var_2 happy_var_3);-                                              ams (sLL happy_var_1 happy_var_3 (OpApp noExt happy_var_1 happy_var_2 happy_var_3))-                                                   [mj AnnVal happy_var_2]-                                            })}}})-	) (\r -> happyReturn (happyIn208 r))--happyReduce_506 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_506 = happyMonadReduce 2# 193# happyReduction_506-happyReduction_506 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut214 happy_x_2 of { (HappyWrap214 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ NegApp noExt happy_var_2 noSyntaxExpr)-                                               [mj AnnMinus happy_var_1])}})-	) (\r -> happyReturn (happyIn209 r))--happyReduce_507 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_507 = happyMonadReduce 2# 193# happyReduction_507-happyReduction_507 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTickPragma noExt (snd $ fst $ fst $ unLoc happy_var_1)-                                                                (snd $ fst $ unLoc happy_var_1) (snd $ unLoc happy_var_1) happy_var_2)-                                      (fst $ fst $ fst $ unLoc happy_var_1))}})-	) (\r -> happyReturn (happyIn209 r))--happyReduce_508 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_508 = happyMonadReduce 4# 193# happyReduction_508-happyReduction_508 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	( ams (sLL happy_var_1 happy_var_4 $ HsCoreAnn noExt (getCORE_PRAGs happy_var_1) (getStringLiteral happy_var_2) happy_var_4)-                                              [mo happy_var_1,mj AnnVal happy_var_2-                                              ,mc happy_var_3])}}}})-	) (\r -> happyReturn (happyIn209 r))--happyReduce_509 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_509 = happySpecReduce_1  193# happyReduction_509-happyReduction_509 happy_x_1-	 =  case happyOut214 happy_x_1 of { (HappyWrap214 happy_var_1) -> -	happyIn209-		 (happy_var_1-	)}--happyReduce_510 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_510 = happySpecReduce_1  194# happyReduction_510-happyReduction_510 happy_x_1-	 =  case happyOut209 happy_x_1 of { (HappyWrap209 happy_var_1) -> -	happyIn210-		 (happy_var_1-	)}--happyReduce_511 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_511 = happyMonadReduce 2# 194# happyReduction_511-happyReduction_511 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsSCC noExt (snd $ fst $ unLoc happy_var_1) (snd $ unLoc happy_var_1) happy_var_2)-                                      (fst $ fst $ unLoc happy_var_1))}})-	) (\r -> happyReturn (happyIn210 r))--happyReduce_512 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_512 = happySpecReduce_1  195# happyReduction_512-happyReduction_512 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn211-		 (([happy_var_1],True)-	)}--happyReduce_513 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_513 = happySpecReduce_0  195# happyReduction_513-happyReduction_513  =  happyIn211-		 (([],False)-	)--happyReduce_514 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_514 = happyMonadReduce 3# 196# happyReduction_514-happyReduction_514 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( do scc <- getSCC happy_var_2-                                            ; return $ sLL happy_var_1 happy_var_3-                                               (([mo happy_var_1,mj AnnValStr happy_var_2-                                                ,mc happy_var_3],getSCC_PRAGs happy_var_1),(StringLiteral (getSTRINGs happy_var_2) scc)))}}})-	) (\r -> happyReturn (happyIn212 r))--happyReduce_515 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_515 = happySpecReduce_3  196# happyReduction_515-happyReduction_515 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn212-		 (sLL happy_var_1 happy_var_3 (([mo happy_var_1,mj AnnVal happy_var_2-                                         ,mc happy_var_3],getSCC_PRAGs happy_var_1)-                                        ,(StringLiteral NoSourceText (getVARID happy_var_2)))-	)}}}--happyReduce_516 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_516 = happyReduce 10# 197# happyReduction_516-happyReduction_516 (happy_x_10 `HappyStk`-	happy_x_9 `HappyStk`-	happy_x_8 `HappyStk`-	happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOutTok happy_x_7 of { happy_var_7 -> -	case happyOutTok happy_x_8 of { happy_var_8 -> -	case happyOutTok happy_x_9 of { happy_var_9 -> -	case happyOutTok happy_x_10 of { happy_var_10 -> -	happyIn213-		 (sLL happy_var_1 happy_var_10 $ ((([mo happy_var_1,mj AnnVal happy_var_2-                                              ,mj AnnVal happy_var_3,mj AnnColon happy_var_4-                                              ,mj AnnVal happy_var_5,mj AnnMinus happy_var_6-                                              ,mj AnnVal happy_var_7,mj AnnColon happy_var_8-                                              ,mj AnnVal happy_var_9,mc happy_var_10],-                                                getGENERATED_PRAGs happy_var_1)-                                              ,((getStringLiteral happy_var_2)-                                               ,( fromInteger $ il_value $ getINTEGER happy_var_3-                                                , fromInteger $ il_value $ getINTEGER happy_var_5-                                                )-                                               ,( fromInteger $ il_value $ getINTEGER happy_var_7-                                                , fromInteger $ il_value $ getINTEGER happy_var_9-                                                )-                                               ))-                                             , (( getINTEGERs happy_var_3-                                                , getINTEGERs happy_var_5-                                                )-                                               ,( getINTEGERs happy_var_7-                                                , getINTEGERs happy_var_9-                                                )))-	) `HappyStk` happyRest}}}}}}}}}}--happyReduce_517 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_517 = happyMonadReduce 2# 198# happyReduction_517-happyReduction_517 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut214 happy_x_1 of { (HappyWrap214 happy_var_1) -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	( checkBlockArguments happy_var_1 >> checkBlockArguments happy_var_2 >>-                                        return (sLL happy_var_1 happy_var_2 $ (HsApp noExt happy_var_1 happy_var_2)))}})-	) (\r -> happyReturn (happyIn214 r))--happyReduce_518 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_518 = happyMonadReduce 3# 198# happyReduction_518-happyReduction_518 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut214 happy_x_1 of { (HappyWrap214 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut166 happy_x_3 of { (HappyWrap166 happy_var_3) -> -	( checkBlockArguments happy_var_1 >>-                                        ams (sLL happy_var_1 happy_var_3 $ HsAppType noExt happy_var_1 (mkHsWildCardBndrs happy_var_3))-                                            [mj AnnAt happy_var_2])}}})-	) (\r -> happyReturn (happyIn214 r))--happyReduce_519 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_519 = happyMonadReduce 2# 198# happyReduction_519-happyReduction_519 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsStatic noExt happy_var_2)-                                            [mj AnnStatic happy_var_1])}})-	) (\r -> happyReturn (happyIn214 r))--happyReduce_520 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_520 = happySpecReduce_1  198# happyReduction_520-happyReduction_520 happy_x_1-	 =  case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> -	happyIn214-		 (happy_var_1-	)}--happyReduce_521 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_521 = happyMonadReduce 3# 199# happyReduction_521-happyReduction_521 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut215 happy_x_3 of { (HappyWrap215 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ EAsPat noExt happy_var_1 happy_var_3) [mj AnnAt happy_var_2])}}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_522 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_522 = happyMonadReduce 2# 199# happyReduction_522-happyReduction_522 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ ELazyPat noExt happy_var_2) [mj AnnTilde happy_var_1])}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_523 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_523 = happyMonadReduce 5# 199# happyReduction_523-happyReduction_523 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut246 happy_x_2 of { (HappyWrap246 happy_var_2) -> -	case happyOut247 happy_x_3 of { (HappyWrap247 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut206 happy_x_5 of { (HappyWrap206 happy_var_5) -> -	( ams (sLL happy_var_1 happy_var_5 $ HsLam noExt (mkMatchGroup FromSource-                            [sLL happy_var_1 happy_var_5 $ Match { m_ext = noExt-                                               , m_ctxt = LambdaExpr-                                               , m_pats = happy_var_2:happy_var_3-                                               , m_grhss = unguardedGRHSs happy_var_5 }]))-                          [mj AnnLam happy_var_1, mu AnnRarrow happy_var_4])}}}}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_524 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_524 = happyMonadReduce 4# 199# happyReduction_524-happyReduction_524 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	( ams (sLL happy_var_1 happy_var_4 $ HsLet noExt (snd $ unLoc happy_var_2) happy_var_4)-                                               (mj AnnLet happy_var_1:mj AnnIn happy_var_3-                                                 :(fst $ unLoc happy_var_2)))}}}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_525 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_525 = happyMonadReduce 3# 199# happyReduction_525-happyReduction_525 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut235 happy_x_3 of { (HappyWrap235 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ HsLamCase noExt-                                   (mkMatchGroup FromSource (snd $ unLoc happy_var_3)))-                   (mj AnnLam happy_var_1:mj AnnCase happy_var_2:(fst $ unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_526 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_526 = happyMonadReduce 8# 199# happyReduction_526-happyReduction_526 (happy_x_8 `HappyStk`-	happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOut211 happy_x_3 of { (HappyWrap211 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut206 happy_x_5 of { (HappyWrap206 happy_var_5) -> -	case happyOut211 happy_x_6 of { (HappyWrap211 happy_var_6) -> -	case happyOutTok happy_x_7 of { happy_var_7 -> -	case happyOut206 happy_x_8 of { (HappyWrap206 happy_var_8) -> -	( checkDoAndIfThenElse happy_var_2 (snd happy_var_3) happy_var_5 (snd happy_var_6) happy_var_8 >>-                              ams (sLL happy_var_1 happy_var_8 $ mkHsIf happy_var_2 happy_var_5 happy_var_8)-                                  (mj AnnIf happy_var_1:mj AnnThen happy_var_4-                                     :mj AnnElse happy_var_7-                                     :(map (\l -> mj AnnSemi l) (fst happy_var_3))-                                    ++(map (\l -> mj AnnSemi l) (fst happy_var_6))))}}}}}}}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_527 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_527 = happyMonadReduce 2# 199# happyReduction_527-happyReduction_527 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut242 happy_x_2 of { (HappyWrap242 happy_var_2) -> -	( hintMultiWayIf (getLoc happy_var_1) >>-                                           ams (sLL happy_var_1 happy_var_2 $ HsMultiIf noExt-                                                     (reverse $ snd $ unLoc happy_var_2))-                                               (mj AnnIf happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_528 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_528 = happyMonadReduce 4# 199# happyReduction_528-happyReduction_528 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut235 happy_x_4 of { (HappyWrap235 happy_var_4) -> -	( ams (cL (comb3 happy_var_1 happy_var_3 happy_var_4) $-                                                   HsCase noExt happy_var_2 (mkMatchGroup-                                                   FromSource (snd $ unLoc happy_var_4)))-                                               (mj AnnCase happy_var_1:mj AnnOf happy_var_3-                                                  :(fst $ unLoc happy_var_4)))}}}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_529 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_529 = happyMonadReduce 2# 199# happyReduction_529-happyReduction_529 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut248 happy_x_2 of { (HappyWrap248 happy_var_2) -> -	( ams (cL (comb2 happy_var_1 happy_var_2)-                                               (mkHsDo DoExpr (snd $ unLoc happy_var_2)))-                                               (mj AnnDo happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_530 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_530 = happyMonadReduce 2# 199# happyReduction_530-happyReduction_530 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut248 happy_x_2 of { (HappyWrap248 happy_var_2) -> -	( ams (cL (comb2 happy_var_1 happy_var_2)-                                              (mkHsDo MDoExpr (snd $ unLoc happy_var_2)))-                                           (mj AnnMdo happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_531 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_531 = happyMonadReduce 4# 199# happyReduction_531-happyReduction_531 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	( checkPattern empty happy_var_2 >>= \ p ->-                           checkCommand happy_var_4 >>= \ cmd ->-                           ams (sLL happy_var_1 happy_var_4 $ HsProc noExt p (sLL happy_var_1 happy_var_4 $ HsCmdTop noExt cmd))-                                            -- TODO: is LL right here?-                               [mj AnnProc happy_var_1,mu AnnRarrow happy_var_3])}}}})-	) (\r -> happyReturn (happyIn215 r))--happyReduce_532 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_532 = happySpecReduce_1  199# happyReduction_532-happyReduction_532 happy_x_1-	 =  case happyOut216 happy_x_1 of { (HappyWrap216 happy_var_1) -> -	happyIn215-		 (happy_var_1-	)}--happyReduce_533 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_533 = happyMonadReduce 4# 200# happyReduction_533-happyReduction_533 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut216 happy_x_1 of { (HappyWrap216 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut253 happy_x_3 of { (HappyWrap253 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( do { r <- mkRecConstrOrUpdate happy_var_1 (comb2 happy_var_2 happy_var_4)-                                                                   (snd happy_var_3)-                                     ; _ <- amsL (comb2 happy_var_1 happy_var_4) (moc happy_var_2:mcc happy_var_4:(fst happy_var_3))-                                     ; checkRecordSyntax (sLL happy_var_1 happy_var_4 r) })}}}})-	) (\r -> happyReturn (happyIn216 r))--happyReduce_534 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_534 = happySpecReduce_1  200# happyReduction_534-happyReduction_534 happy_x_1-	 =  case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> -	happyIn216-		 (happy_var_1-	)}--happyReduce_535 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_535 = happySpecReduce_1  201# happyReduction_535-happyReduction_535 happy_x_1-	 =  case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> -	happyIn217-		 (sL1 happy_var_1 (HsVar noExt   $! happy_var_1)-	)}--happyReduce_536 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_536 = happySpecReduce_1  201# happyReduction_536-happyReduction_536 happy_x_1-	 =  case happyOut268 happy_x_1 of { (HappyWrap268 happy_var_1) -> -	happyIn217-		 (sL1 happy_var_1 (HsVar noExt   $! happy_var_1)-	)}--happyReduce_537 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_537 = happySpecReduce_1  201# happyReduction_537-happyReduction_537 happy_x_1-	 =  case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> -	happyIn217-		 (sL1 happy_var_1 (HsIPVar noExt $! unLoc happy_var_1)-	)}--happyReduce_538 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_538 = happySpecReduce_1  201# happyReduction_538-happyReduction_538 happy_x_1-	 =  case happyOut259 happy_x_1 of { (HappyWrap259 happy_var_1) -> -	happyIn217-		 (sL1 happy_var_1 (HsOverLabel noExt Nothing $! unLoc happy_var_1)-	)}--happyReduce_539 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_539 = happySpecReduce_1  201# happyReduction_539-happyReduction_539 happy_x_1-	 =  case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> -	happyIn217-		 (sL1 happy_var_1 (HsLit noExt  $! unLoc happy_var_1)-	)}--happyReduce_540 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_540 = happySpecReduce_1  201# happyReduction_540-happyReduction_540 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn217-		 (sL (getLoc happy_var_1) (HsOverLit noExt $! mkHsIntegral   (getINTEGER happy_var_1) )-	)}--happyReduce_541 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_541 = happySpecReduce_1  201# happyReduction_541-happyReduction_541 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn217-		 (sL (getLoc happy_var_1) (HsOverLit noExt $! mkHsFractional (getRATIONAL happy_var_1) )-	)}--happyReduce_542 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_542 = happyMonadReduce 3# 201# happyReduction_542-happyReduction_542 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut223 happy_x_2 of { (HappyWrap223 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (HsPar noExt happy_var_2)) [mop happy_var_1,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_543 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_543 = happyMonadReduce 3# 201# happyReduction_543-happyReduction_543 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut224 happy_x_2 of { (HappyWrap224 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( do { e <- mkSumOrTuple Boxed (comb2 happy_var_1 happy_var_3) (snd happy_var_2)-                                              ; ams (sLL happy_var_1 happy_var_3 e) ((mop happy_var_1:fst happy_var_2) ++ [mcp happy_var_3]) })}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_544 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_544 = happyMonadReduce 3# 201# happyReduction_544-happyReduction_544 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut223 happy_x_2 of { (HappyWrap223 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (ExplicitTuple noExt [cL (gl happy_var_2)-                                                         (Present noExt happy_var_2)] Unboxed))-                                               [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_545 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_545 = happyMonadReduce 3# 201# happyReduction_545-happyReduction_545 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut224 happy_x_2 of { (HappyWrap224 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( do { e <- mkSumOrTuple Unboxed (comb2 happy_var_1 happy_var_3) (snd happy_var_2)-                                              ; ams (sLL happy_var_1 happy_var_3 e) ((mo happy_var_1:fst happy_var_2) ++ [mc happy_var_3]) })}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_546 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_546 = happyMonadReduce 3# 201# happyReduction_546-happyReduction_546 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut227 happy_x_2 of { (HappyWrap227 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (snd happy_var_2)) (mos happy_var_1:mcs happy_var_3:(fst happy_var_2)))}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_547 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_547 = happySpecReduce_1  201# happyReduction_547-happyReduction_547 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn217-		 (sL1 happy_var_1 $ EWildPat noExt-	)}--happyReduce_548 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_548 = happySpecReduce_1  201# happyReduction_548-happyReduction_548 happy_x_1-	 =  case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> -	happyIn217-		 (happy_var_1-	)}--happyReduce_549 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_549 = happyMonadReduce 2# 201# happyReduction_549-happyReduction_549 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut297 happy_x_2 of { (HappyWrap297 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket noExt (VarBr noExt True  (unLoc happy_var_2))) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_550 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_550 = happyMonadReduce 2# 201# happyReduction_550-happyReduction_550 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut268 happy_x_2 of { (HappyWrap268 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket noExt (VarBr noExt True  (unLoc happy_var_2))) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_551 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_551 = happyMonadReduce 2# 201# happyReduction_551-happyReduction_551 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut293 happy_x_2 of { (HappyWrap293 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket noExt (VarBr noExt False (unLoc happy_var_2))) [mj AnnThTyQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_552 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_552 = happyMonadReduce 2# 201# happyReduction_552-happyReduction_552 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut276 happy_x_2 of { (HappyWrap276 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket noExt (VarBr noExt False (unLoc happy_var_2))) [mj AnnThTyQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_553 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_553 = happyMonadReduce 1# 201# happyReduction_553-happyReduction_553 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( reportEmptyDoubleQuotes (getLoc happy_var_1))})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_554 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_554 = happyMonadReduce 3# 201# happyReduction_554-happyReduction_554 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket noExt (ExpBr noExt happy_var_2))-                                      (if (hasE happy_var_1) then [mj AnnOpenE happy_var_1, mu AnnCloseQ happy_var_3]-                                                    else [mu AnnOpenEQ happy_var_1,mu AnnCloseQ happy_var_3]))}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_555 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_555 = happyMonadReduce 3# 201# happyReduction_555-happyReduction_555 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket noExt (TExpBr noExt happy_var_2))-                                      (if (hasE happy_var_1) then [mj AnnOpenE happy_var_1,mc happy_var_3] else [mo happy_var_1,mc happy_var_3]))}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_556 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_556 = happyMonadReduce 3# 201# happyReduction_556-happyReduction_556 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut152 happy_x_2 of { (HappyWrap152 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket noExt (TypBr noExt happy_var_2)) [mo happy_var_1,mu AnnCloseQ happy_var_3])}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_557 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_557 = happyMonadReduce 3# 201# happyReduction_557-happyReduction_557 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( checkPattern empty happy_var_2 >>= \p ->-                                      ams (sLL happy_var_1 happy_var_3 $ HsBracket noExt (PatBr noExt p))-                                          [mo happy_var_1,mu AnnCloseQ happy_var_3])}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_558 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_558 = happyMonadReduce 3# 201# happyReduction_558-happyReduction_558 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut221 happy_x_2 of { (HappyWrap221 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket noExt (DecBrL noExt (snd happy_var_2)))-                                      (mo happy_var_1:mu AnnCloseQ happy_var_3:fst happy_var_2))}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_559 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_559 = happySpecReduce_1  201# happyReduction_559-happyReduction_559 happy_x_1-	 =  case happyOut205 happy_x_1 of { (HappyWrap205 happy_var_1) -> -	happyIn217-		 (sL1 happy_var_1 (HsSpliceE noExt (unLoc happy_var_1))-	)}--happyReduce_560 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_560 = happyMonadReduce 4# 201# happyReduction_560-happyReduction_560 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut217 happy_x_2 of { (HappyWrap217 happy_var_2) -> -	case happyOut219 happy_x_3 of { (HappyWrap219 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ HsArrForm noExt happy_var_2-                                                           Nothing (reverse happy_var_3))-                                          [mu AnnOpenB happy_var_1,mu AnnCloseB happy_var_4])}}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_561 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_561 = happyMonadReduce 1# 202# happyReduction_561-happyReduction_561 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ams (sL1 happy_var_1 $ mkHsSpliceE HasDollar-                                        (sL1 happy_var_1 $ HsVar noExt (sL1 happy_var_1 (mkUnqual varName-                                                           (getTH_ID_SPLICE happy_var_1)))))-                                       [mj AnnThIdSplice happy_var_1])})-	) (\r -> happyReturn (happyIn218 r))--happyReduce_562 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_562 = happyMonadReduce 3# 202# happyReduction_562-happyReduction_562 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ mkHsSpliceE HasParens happy_var_2)-                                       [mj AnnOpenPE happy_var_1,mj AnnCloseP happy_var_3])}}})-	) (\r -> happyReturn (happyIn218 r))--happyReduce_563 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_563 = happyMonadReduce 1# 202# happyReduction_563-happyReduction_563 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ams (sL1 happy_var_1 $ mkHsSpliceTE HasDollar-                                        (sL1 happy_var_1 $ HsVar noExt (sL1 happy_var_1 (mkUnqual varName-                                                        (getTH_ID_TY_SPLICE happy_var_1)))))-                                       [mj AnnThIdTySplice happy_var_1])})-	) (\r -> happyReturn (happyIn218 r))--happyReduce_564 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_564 = happyMonadReduce 3# 202# happyReduction_564-happyReduction_564 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ mkHsSpliceTE HasParens happy_var_2)-                                       [mj AnnOpenPTE happy_var_1,mj AnnCloseP happy_var_3])}}})-	) (\r -> happyReturn (happyIn218 r))--happyReduce_565 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_565 = happySpecReduce_2  203# happyReduction_565-happyReduction_565 happy_x_2-	happy_x_1-	 =  case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> -	case happyOut220 happy_x_2 of { (HappyWrap220 happy_var_2) -> -	happyIn219-		 (happy_var_2 : happy_var_1-	)}}--happyReduce_566 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_566 = happySpecReduce_0  203# happyReduction_566-happyReduction_566  =  happyIn219-		 ([]-	)--happyReduce_567 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_567 = happyMonadReduce 1# 204# happyReduction_567-happyReduction_567 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> -	( checkCommand happy_var_1 >>= \ cmd ->-                                    return (sL1 happy_var_1 $ HsCmdTop noExt cmd))})-	) (\r -> happyReturn (happyIn220 r))--happyReduce_568 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_568 = happySpecReduce_3  205# happyReduction_568-happyReduction_568 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut222 happy_x_2 of { (HappyWrap222 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn221-		 (([mj AnnOpenC happy_var_1-                                                  ,mj AnnCloseC happy_var_3],happy_var_2)-	)}}}--happyReduce_569 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_569 = happySpecReduce_3  205# happyReduction_569-happyReduction_569 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut222 happy_x_2 of { (HappyWrap222 happy_var_2) -> -	happyIn221-		 (([],happy_var_2)-	)}--happyReduce_570 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_570 = happySpecReduce_1  206# happyReduction_570-happyReduction_570 happy_x_1-	 =  case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> -	happyIn222-		 (cvTopDecls happy_var_1-	)}--happyReduce_571 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_571 = happySpecReduce_1  206# happyReduction_571-happyReduction_571 happy_x_1-	 =  case happyOut75 happy_x_1 of { (HappyWrap75 happy_var_1) -> -	happyIn222-		 (cvTopDecls happy_var_1-	)}--happyReduce_572 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_572 = happySpecReduce_1  207# happyReduction_572-happyReduction_572 happy_x_1-	 =  case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> -	happyIn223-		 (happy_var_1-	)}--happyReduce_573 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_573 = happySpecReduce_2  207# happyReduction_573-happyReduction_573 happy_x_2-	happy_x_1-	 =  case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> -	case happyOut288 happy_x_2 of { (HappyWrap288 happy_var_2) -> -	happyIn223-		 (sLL happy_var_1 happy_var_2 $ SectionL noExt happy_var_1 happy_var_2-	)}}--happyReduce_574 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_574 = happySpecReduce_2  207# happyReduction_574-happyReduction_574 happy_x_2-	happy_x_1-	 =  case happyOut289 happy_x_1 of { (HappyWrap289 happy_var_1) -> -	case happyOut207 happy_x_2 of { (HappyWrap207 happy_var_2) -> -	happyIn223-		 (sLL happy_var_1 happy_var_2 $ SectionR noExt happy_var_1 happy_var_2-	)}}--happyReduce_575 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_575 = happyMonadReduce 3# 207# happyReduction_575-happyReduction_575 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut223 happy_x_3 of { (HappyWrap223 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ EViewPat noExt happy_var_1 happy_var_3) [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn223 r))--happyReduce_576 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_576 = happyMonadReduce 2# 208# happyReduction_576-happyReduction_576 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOut225 happy_x_2 of { (HappyWrap225 happy_var_2) -> -	( do { addAnnotation (gl happy_var_1) AnnComma (fst happy_var_2)-                                ; return ([],Tuple ((sL1 happy_var_1 (Present noExt happy_var_1)) : snd happy_var_2)) })}})-	) (\r -> happyReturn (happyIn224 r))--happyReduce_577 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_577 = happySpecReduce_2  208# happyReduction_577-happyReduction_577 happy_x_2-	happy_x_1-	 =  case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> -	happyIn224-		 ((mvbars (fst happy_var_2), Sum 1  (snd happy_var_2 + 1) happy_var_1)-	)}}--happyReduce_578 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_578 = happyMonadReduce 2# 208# happyReduction_578-happyReduction_578 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut314 happy_x_1 of { (HappyWrap314 happy_var_1) -> -	case happyOut226 happy_x_2 of { (HappyWrap226 happy_var_2) -> -	( do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (fst happy_var_1)-                      ; return-                           ([],Tuple (map (\l -> cL l missingTupArg) (fst happy_var_1) ++ happy_var_2)) })}})-	) (\r -> happyReturn (happyIn224 r))--happyReduce_579 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_579 = happySpecReduce_3  208# happyReduction_579-happyReduction_579 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> -	case happyOut223 happy_x_2 of { (HappyWrap223 happy_var_2) -> -	case happyOut315 happy_x_3 of { (HappyWrap315 happy_var_3) -> -	happyIn224-		 ((mvbars (fst happy_var_1) ++ mvbars (fst happy_var_3), Sum (snd happy_var_1 + 1) (snd happy_var_1 + snd happy_var_3 + 1) happy_var_2)-	)}}}--happyReduce_580 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_580 = happyMonadReduce 2# 209# happyReduction_580-happyReduction_580 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut314 happy_x_1 of { (HappyWrap314 happy_var_1) -> -	case happyOut226 happy_x_2 of { (HappyWrap226 happy_var_2) -> -	( do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (tail $ fst happy_var_1)-             ; return (-            (head $ fst happy_var_1-            ,(map (\l -> cL l missingTupArg) (tail $ fst happy_var_1)) ++ happy_var_2)) })}})-	) (\r -> happyReturn (happyIn225 r))--happyReduce_581 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_581 = happyMonadReduce 2# 210# happyReduction_581-happyReduction_581 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOut225 happy_x_2 of { (HappyWrap225 happy_var_2) -> -	( addAnnotation (gl happy_var_1) AnnComma (fst happy_var_2) >>-                                    return ((cL (gl happy_var_1) (Present noExt happy_var_1)) : snd happy_var_2))}})-	) (\r -> happyReturn (happyIn226 r))--happyReduce_582 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_582 = happySpecReduce_1  210# happyReduction_582-happyReduction_582 happy_x_1-	 =  case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	happyIn226-		 ([cL (gl happy_var_1) (Present noExt happy_var_1)]-	)}--happyReduce_583 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_583 = happySpecReduce_0  210# happyReduction_583-happyReduction_583  =  happyIn226-		 ([noLoc missingTupArg]-	)--happyReduce_584 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_584 = happySpecReduce_1  211# happyReduction_584-happyReduction_584 happy_x_1-	 =  case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	happyIn227-		 (([],ExplicitList noExt Nothing [happy_var_1])-	)}--happyReduce_585 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_585 = happySpecReduce_1  211# happyReduction_585-happyReduction_585 happy_x_1-	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> -	happyIn227-		 (([],ExplicitList noExt Nothing (reverse (unLoc happy_var_1)))-	)}--happyReduce_586 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_586 = happySpecReduce_2  211# happyReduction_586-happyReduction_586 happy_x_2-	happy_x_1-	 =  case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn227-		 (([mj AnnDotdot happy_var_2],-                                      ArithSeq noExt Nothing (From happy_var_1))-	)}}--happyReduce_587 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_587 = happyReduce 4# 211# happyReduction_587-happyReduction_587 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn227-		 (([mj AnnComma happy_var_2,mj AnnDotdot happy_var_4],-                                  ArithSeq noExt Nothing-                                                             (FromThen happy_var_1 happy_var_3))-	) `HappyStk` happyRest}}}}--happyReduce_588 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_588 = happySpecReduce_3  211# happyReduction_588-happyReduction_588 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	happyIn227-		 (([mj AnnDotdot happy_var_2],-                                   ArithSeq noExt Nothing-                                                               (FromTo happy_var_1 happy_var_3))-	)}}}--happyReduce_589 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_589 = happyReduce 5# 211# happyReduction_589-happyReduction_589 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut206 happy_x_5 of { (HappyWrap206 happy_var_5) -> -	happyIn227-		 (([mj AnnComma happy_var_2,mj AnnDotdot happy_var_4],-                                    ArithSeq noExt Nothing-                                                (FromThenTo happy_var_1 happy_var_3 happy_var_5))-	) `HappyStk` happyRest}}}}}--happyReduce_590 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_590 = happyMonadReduce 3# 211# happyReduction_590-happyReduction_590 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut229 happy_x_3 of { (HappyWrap229 happy_var_3) -> -	( checkMonadComp >>= \ ctxt ->-                return ([mj AnnVbar happy_var_2],-                        mkHsComp ctxt (unLoc happy_var_3) happy_var_1))}}})-	) (\r -> happyReturn (happyIn227 r))--happyReduce_591 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_591 = happyMonadReduce 3# 212# happyReduction_591-happyReduction_591 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut223 happy_x_3 of { (HappyWrap223 happy_var_3) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1)-                                                            AnnComma (gl happy_var_2) >>-                                      return (sLL happy_var_1 happy_var_3 (((:) $! happy_var_3) $! unLoc happy_var_1)))}}})-	) (\r -> happyReturn (happyIn228 r))--happyReduce_592 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_592 = happyMonadReduce 3# 212# happyReduction_592-happyReduction_592 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut223 happy_x_3 of { (HappyWrap223 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>-                                      return (sLL happy_var_1 happy_var_3 [happy_var_3,happy_var_1]))}}})-	) (\r -> happyReturn (happyIn228 r))--happyReduce_593 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_593 = happySpecReduce_1  213# happyReduction_593-happyReduction_593 happy_x_1-	 =  case happyOut230 happy_x_1 of { (HappyWrap230 happy_var_1) -> -	happyIn229-		 (case (unLoc happy_var_1) of-                    [qs] -> sL1 happy_var_1 qs-                    -- We just had one thing in our "parallel" list so-                    -- we simply return that thing directly--                    qss -> sL1 happy_var_1 [sL1 happy_var_1 $ ParStmt noExt [ParStmtBlock noExt qs [] noSyntaxExpr |-                                            qs <- qss]-                                            noExpr noSyntaxExpr]-                    -- We actually found some actual parallel lists so-                    -- we wrap them into as a ParStmt-	)}--happyReduce_594 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_594 = happyMonadReduce 3# 214# happyReduction_594-happyReduction_594 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut231 happy_x_1 of { (HappyWrap231 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut230 happy_x_3 of { (HappyWrap230 happy_var_3) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnVbar (gl happy_var_2) >>-                        return (sLL happy_var_1 happy_var_3 (reverse (unLoc happy_var_1) : unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn230 r))--happyReduce_595 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_595 = happySpecReduce_1  214# happyReduction_595-happyReduction_595 happy_x_1-	 =  case happyOut231 happy_x_1 of { (HappyWrap231 happy_var_1) -> -	happyIn230-		 (cL (getLoc happy_var_1) [reverse (unLoc happy_var_1)]-	)}--happyReduce_596 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_596 = happyMonadReduce 3# 215# happyReduction_596-happyReduction_596 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut231 happy_x_1 of { (HappyWrap231 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut232 happy_x_3 of { (HappyWrap232 happy_var_3) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>-                amsL (comb2 happy_var_1 happy_var_3) (fst $ unLoc happy_var_3) >>-                return (sLL happy_var_1 happy_var_3 [sLL happy_var_1 happy_var_3 ((snd $ unLoc happy_var_3) (reverse (unLoc happy_var_1)))]))}}})-	) (\r -> happyReturn (happyIn231 r))--happyReduce_597 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_597 = happyMonadReduce 3# 215# happyReduction_597-happyReduction_597 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut231 happy_x_1 of { (HappyWrap231 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut252 happy_x_3 of { (HappyWrap252 happy_var_3) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>-                return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})-	) (\r -> happyReturn (happyIn231 r))--happyReduce_598 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_598 = happyMonadReduce 1# 215# happyReduction_598-happyReduction_598 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut232 happy_x_1 of { (HappyWrap232 happy_var_1) -> -	( ams happy_var_1 (fst $ unLoc happy_var_1) >>-                              return (sLL happy_var_1 happy_var_1 [cL (getLoc happy_var_1) ((snd $ unLoc happy_var_1) [])]))})-	) (\r -> happyReturn (happyIn231 r))--happyReduce_599 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_599 = happySpecReduce_1  215# happyReduction_599-happyReduction_599 happy_x_1-	 =  case happyOut252 happy_x_1 of { (HappyWrap252 happy_var_1) -> -	happyIn231-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_600 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_600 = happySpecReduce_2  216# happyReduction_600-happyReduction_600 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	happyIn232-		 (sLL happy_var_1 happy_var_2 ([mj AnnThen happy_var_1], \ss -> (mkTransformStmt ss happy_var_2))-	)}}--happyReduce_601 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_601 = happyReduce 4# 216# happyReduction_601-happyReduction_601 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	happyIn232-		 (sLL happy_var_1 happy_var_4 ([mj AnnThen happy_var_1,mj AnnBy  happy_var_3],\ss -> (mkTransformByStmt ss happy_var_2 happy_var_4))-	) `HappyStk` happyRest}}}}--happyReduce_602 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_602 = happyReduce 4# 216# happyReduction_602-happyReduction_602 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	happyIn232-		 (sLL happy_var_1 happy_var_4 ([mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnUsing happy_var_3], \ss -> (mkGroupUsingStmt ss happy_var_4))-	) `HappyStk` happyRest}}}}--happyReduce_603 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_603 = happyReduce 6# 216# happyReduction_603-happyReduction_603 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOut206 happy_x_6 of { (HappyWrap206 happy_var_6) -> -	happyIn232-		 (sLL happy_var_1 happy_var_6 ([mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnBy happy_var_3,mj AnnUsing happy_var_5], \ss -> (mkGroupByUsingStmt ss happy_var_4 happy_var_6))-	) `HappyStk` happyRest}}}}}}--happyReduce_604 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_604 = happySpecReduce_1  217# happyReduction_604-happyReduction_604 happy_x_1-	 =  case happyOut234 happy_x_1 of { (HappyWrap234 happy_var_1) -> -	happyIn233-		 (cL (getLoc happy_var_1) (reverse (unLoc happy_var_1))-	)}--happyReduce_605 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_605 = happyMonadReduce 3# 218# happyReduction_605-happyReduction_605 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut234 happy_x_1 of { (HappyWrap234 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut252 happy_x_3 of { (HappyWrap252 happy_var_3) -> -	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma-                                             (gl happy_var_2) >>-                               return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})-	) (\r -> happyReturn (happyIn234 r))--happyReduce_606 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_606 = happySpecReduce_1  218# happyReduction_606-happyReduction_606 happy_x_1-	 =  case happyOut252 happy_x_1 of { (HappyWrap252 happy_var_1) -> -	happyIn234-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_607 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_607 = happySpecReduce_3  219# happyReduction_607-happyReduction_607 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut236 happy_x_2 of { (HappyWrap236 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn235-		 (sLL happy_var_1 happy_var_3 ((moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2))-                                               ,(reverse (snd $ unLoc happy_var_2)))-	)}}}--happyReduce_608 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_608 = happySpecReduce_3  219# happyReduction_608-happyReduction_608 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut236 happy_x_2 of { (HappyWrap236 happy_var_2) -> -	happyIn235-		 (cL (getLoc happy_var_2) (fst $ unLoc happy_var_2-                                        ,(reverse (snd $ unLoc happy_var_2)))-	)}--happyReduce_609 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_609 = happySpecReduce_2  219# happyReduction_609-happyReduction_609 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn235-		 (sLL happy_var_1 happy_var_2 ([moc happy_var_1,mcc happy_var_2],[])-	)}}--happyReduce_610 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_610 = happySpecReduce_2  219# happyReduction_610-happyReduction_610 happy_x_2-	happy_x_1-	 =  happyIn235-		 (noLoc ([],[])-	)--happyReduce_611 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_611 = happySpecReduce_1  220# happyReduction_611-happyReduction_611 happy_x_1-	 =  case happyOut237 happy_x_1 of { (HappyWrap237 happy_var_1) -> -	happyIn236-		 (sL1 happy_var_1 (fst $ unLoc happy_var_1,snd $ unLoc happy_var_1)-	)}--happyReduce_612 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_612 = happySpecReduce_2  220# happyReduction_612-happyReduction_612 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut236 happy_x_2 of { (HappyWrap236 happy_var_2) -> -	happyIn236-		 (sLL happy_var_1 happy_var_2 ((mj AnnSemi happy_var_1:(fst $ unLoc happy_var_2))-                                               ,snd $ unLoc happy_var_2)-	)}}--happyReduce_613 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_613 = happyMonadReduce 3# 221# happyReduction_613-happyReduction_613 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut237 happy_x_1 of { (HappyWrap237 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut238 happy_x_3 of { (HappyWrap238 happy_var_3) -> -	( if null (snd $ unLoc happy_var_1)-                                     then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                  ,[happy_var_3]))-                                     else (ams (head $ snd $ unLoc happy_var_1)-                                               (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1))-                                           >> return (sLL happy_var_1 happy_var_3 ([],happy_var_3 : (snd $ unLoc happy_var_1))) ))}}})-	) (\r -> happyReturn (happyIn237 r))--happyReduce_614 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_614 = happyMonadReduce 2# 221# happyReduction_614-happyReduction_614 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut237 happy_x_1 of { (HappyWrap237 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( if null (snd $ unLoc happy_var_1)-                                     then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                  ,snd $ unLoc happy_var_1))-                                     else (ams (head $ snd $ unLoc happy_var_1)-                                               (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1))-                                           >> return (sLL happy_var_1 happy_var_2 ([],snd $ unLoc happy_var_1))))}})-	) (\r -> happyReturn (happyIn237 r))--happyReduce_615 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_615 = happySpecReduce_1  221# happyReduction_615-happyReduction_615 happy_x_1-	 =  case happyOut238 happy_x_1 of { (HappyWrap238 happy_var_1) -> -	happyIn237-		 (sL1 happy_var_1 ([],[happy_var_1])-	)}--happyReduce_616 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_616 = happyMonadReduce 2# 222# happyReduction_616-happyReduction_616 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut244 happy_x_1 of { (HappyWrap244 happy_var_1) -> -	case happyOut239 happy_x_2 of { (HappyWrap239 happy_var_2) -> -	(ams (sLL happy_var_1 happy_var_2 (Match { m_ext = noExt-                                                  , m_ctxt = CaseAlt-                                                  , m_pats = [happy_var_1]-                                                  , m_grhss = snd $ unLoc happy_var_2 }))-                                      (fst $ unLoc happy_var_2))}})-	) (\r -> happyReturn (happyIn238 r))--happyReduce_617 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_617 = happySpecReduce_2  223# happyReduction_617-happyReduction_617 happy_x_2-	happy_x_1-	 =  case happyOut240 happy_x_1 of { (HappyWrap240 happy_var_1) -> -	case happyOut126 happy_x_2 of { (HappyWrap126 happy_var_2) -> -	happyIn239-		 (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_2,-                                            GRHSs noExt (unLoc happy_var_1) (snd $ unLoc happy_var_2))-	)}}--happyReduce_618 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_618 = happyMonadReduce 2# 224# happyReduction_618-happyReduction_618 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 (unguardedRHS (comb2 happy_var_1 happy_var_2) happy_var_2))-                                     [mu AnnRarrow happy_var_1])}})-	) (\r -> happyReturn (happyIn240 r))--happyReduce_619 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_619 = happySpecReduce_1  224# happyReduction_619-happyReduction_619 happy_x_1-	 =  case happyOut241 happy_x_1 of { (HappyWrap241 happy_var_1) -> -	happyIn240-		 (sL1 happy_var_1 (reverse (unLoc happy_var_1))-	)}--happyReduce_620 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_620 = happySpecReduce_2  225# happyReduction_620-happyReduction_620 happy_x_2-	happy_x_1-	 =  case happyOut241 happy_x_1 of { (HappyWrap241 happy_var_1) -> -	case happyOut243 happy_x_2 of { (HappyWrap243 happy_var_2) -> -	happyIn241-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)-	)}}--happyReduce_621 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_621 = happySpecReduce_1  225# happyReduction_621-happyReduction_621 happy_x_1-	 =  case happyOut243 happy_x_1 of { (HappyWrap243 happy_var_1) -> -	happyIn241-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_622 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_622 = happySpecReduce_3  226# happyReduction_622-happyReduction_622 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut241 happy_x_2 of { (HappyWrap241 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn242-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3],unLoc happy_var_2)-	)}}}--happyReduce_623 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_623 = happySpecReduce_2  226# happyReduction_623-happyReduction_623 happy_x_2-	happy_x_1-	 =  case happyOut241 happy_x_1 of { (HappyWrap241 happy_var_1) -> -	happyIn242-		 (sL1 happy_var_1 ([],unLoc happy_var_1)-	)}--happyReduce_624 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_624 = happyMonadReduce 4# 227# happyReduction_624-happyReduction_624 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut233 happy_x_2 of { (HappyWrap233 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut206 happy_x_4 of { (HappyWrap206 happy_var_4) -> -	( ams (sL (comb2 happy_var_1 happy_var_4) $ GRHS noExt (unLoc happy_var_2) happy_var_4)-                                         [mj AnnVbar happy_var_1,mu AnnRarrow happy_var_3])}}}})-	) (\r -> happyReturn (happyIn243 r))--happyReduce_625 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_625 = happyMonadReduce 1# 228# happyReduction_625-happyReduction_625 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> -	( checkPattern empty happy_var_1)})-	) (\r -> happyReturn (happyIn244 r))--happyReduce_626 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_626 = happyMonadReduce 2# 228# happyReduction_626-happyReduction_626 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	( amms (checkPattern empty (sLL happy_var_1 happy_var_2 (SectionR noExt-                                                     (sL1 happy_var_1 (HsVar noExt (sL1 happy_var_1 bang_RDR))) happy_var_2)))-                                [mj AnnBang happy_var_1])}})-	) (\r -> happyReturn (happyIn244 r))--happyReduce_627 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_627 = happyMonadReduce 1# 229# happyReduction_627-happyReduction_627 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> -	( checkPattern-                                (text "Possibly caused by a missing 'do'?") happy_var_1)})-	) (\r -> happyReturn (happyIn245 r))--happyReduce_628 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_628 = happyMonadReduce 2# 229# happyReduction_628-happyReduction_628 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	( amms (checkPattern-                                     (text "Possibly caused by a missing 'do'?")-                                     (sLL happy_var_1 happy_var_2 (SectionR noExt (sL1 happy_var_1 (HsVar noExt (sL1 happy_var_1 bang_RDR))) happy_var_2)))-                                  [mj AnnBang happy_var_1])}})-	) (\r -> happyReturn (happyIn245 r))--happyReduce_629 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_629 = happyMonadReduce 1# 230# happyReduction_629-happyReduction_629 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> -	( checkPattern empty happy_var_1)})-	) (\r -> happyReturn (happyIn246 r))--happyReduce_630 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_630 = happyMonadReduce 2# 230# happyReduction_630-happyReduction_630 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut215 happy_x_2 of { (HappyWrap215 happy_var_2) -> -	( amms (checkPattern empty-                                            (sLL happy_var_1 happy_var_2 (SectionR noExt-                                                (sL1 happy_var_1 (HsVar noExt (sL1 happy_var_1 bang_RDR))) happy_var_2)))-                                        [mj AnnBang happy_var_1])}})-	) (\r -> happyReturn (happyIn246 r))--happyReduce_631 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_631 = happySpecReduce_2  231# happyReduction_631-happyReduction_631 happy_x_2-	happy_x_1-	 =  case happyOut246 happy_x_1 of { (HappyWrap246 happy_var_1) -> -	case happyOut247 happy_x_2 of { (HappyWrap247 happy_var_2) -> -	happyIn247-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_632 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_632 = happySpecReduce_0  231# happyReduction_632-happyReduction_632  =  happyIn247-		 ([]-	)--happyReduce_633 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_633 = happySpecReduce_3  232# happyReduction_633-happyReduction_633 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut249 happy_x_2 of { (HappyWrap249 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn248-		 (sLL happy_var_1 happy_var_3 ((moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2))-                                             ,(reverse $ snd $ unLoc happy_var_2))-	)}}}--happyReduce_634 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_634 = happySpecReduce_3  232# happyReduction_634-happyReduction_634 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut249 happy_x_2 of { (HappyWrap249 happy_var_2) -> -	happyIn248-		 (cL (gl happy_var_2) (fst $ unLoc happy_var_2-                                                    ,reverse $ snd $ unLoc happy_var_2)-	)}--happyReduce_635 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_635 = happyMonadReduce 3# 233# happyReduction_635-happyReduction_635 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut249 happy_x_1 of { (HappyWrap249 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut251 happy_x_3 of { (HappyWrap251 happy_var_3) -> -	( if null (snd $ unLoc happy_var_1)-                              then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)-                                                     ,happy_var_3 : (snd $ unLoc happy_var_1)))-                              else do-                               { ams (head $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]-                               ; return $ sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1,happy_var_3 :(snd $ unLoc happy_var_1)) })}}})-	) (\r -> happyReturn (happyIn249 r))--happyReduce_636 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_636 = happyMonadReduce 2# 233# happyReduction_636-happyReduction_636 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut249 happy_x_1 of { (HappyWrap249 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( if null (snd $ unLoc happy_var_1)-                             then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1),snd $ unLoc happy_var_1))-                             else do-                               { ams (head $ snd $ unLoc happy_var_1)-                                               [mj AnnSemi happy_var_2]-                               ; return happy_var_1 })}})-	) (\r -> happyReturn (happyIn249 r))--happyReduce_637 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_637 = happySpecReduce_1  233# happyReduction_637-happyReduction_637 happy_x_1-	 =  case happyOut251 happy_x_1 of { (HappyWrap251 happy_var_1) -> -	happyIn249-		 (sL1 happy_var_1 ([],[happy_var_1])-	)}--happyReduce_638 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_638 = happySpecReduce_0  233# happyReduction_638-happyReduction_638  =  happyIn249-		 (noLoc ([],[])-	)--happyReduce_639 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_639 = happySpecReduce_1  234# happyReduction_639-happyReduction_639 happy_x_1-	 =  case happyOut251 happy_x_1 of { (HappyWrap251 happy_var_1) -> -	happyIn250-		 (Just happy_var_1-	)}--happyReduce_640 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_640 = happySpecReduce_0  234# happyReduction_640-happyReduction_640  =  happyIn250-		 (Nothing-	)--happyReduce_641 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_641 = happySpecReduce_1  235# happyReduction_641-happyReduction_641 happy_x_1-	 =  case happyOut252 happy_x_1 of { (HappyWrap252 happy_var_1) -> -	happyIn251-		 (happy_var_1-	)}--happyReduce_642 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_642 = happyMonadReduce 2# 235# happyReduction_642-happyReduction_642 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut248 happy_x_2 of { (HappyWrap248 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2 $ mkRecStmt (snd $ unLoc happy_var_2))-                                               (mj AnnRec happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn251 r))--happyReduce_643 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_643 = happyMonadReduce 3# 236# happyReduction_643-happyReduction_643 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut245 happy_x_1 of { (HappyWrap245 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 $ mkBindStmt happy_var_1 happy_var_3)-                                               [mu AnnLarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn252 r))--happyReduce_644 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_644 = happySpecReduce_1  236# happyReduction_644-happyReduction_644 happy_x_1-	 =  case happyOut206 happy_x_1 of { (HappyWrap206 happy_var_1) -> -	happyIn252-		 (sL1 happy_var_1 $ mkBodyStmt happy_var_1-	)}--happyReduce_645 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_645 = happyMonadReduce 2# 236# happyReduction_645-happyReduction_645 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> -	( ams (sLL happy_var_1 happy_var_2$ LetStmt noExt (snd $ unLoc happy_var_2))-                                               (mj AnnLet happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn252 r))--happyReduce_646 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_646 = happySpecReduce_1  237# happyReduction_646-happyReduction_646 happy_x_1-	 =  case happyOut254 happy_x_1 of { (HappyWrap254 happy_var_1) -> -	happyIn253-		 (happy_var_1-	)}--happyReduce_647 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_647 = happySpecReduce_0  237# happyReduction_647-happyReduction_647  =  happyIn253-		 (([],([], False))-	)--happyReduce_648 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_648 = happyMonadReduce 3# 238# happyReduction_648-happyReduction_648 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut255 happy_x_1 of { (HappyWrap255 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut254 happy_x_3 of { (HappyWrap254 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>-                   return (case happy_var_3 of (ma,(flds, dd)) -> (ma,(happy_var_1 : flds, dd))))}}})-	) (\r -> happyReturn (happyIn254 r))--happyReduce_649 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_649 = happySpecReduce_1  238# happyReduction_649-happyReduction_649 happy_x_1-	 =  case happyOut255 happy_x_1 of { (HappyWrap255 happy_var_1) -> -	happyIn254-		 (([],([happy_var_1], False))-	)}--happyReduce_650 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_650 = happySpecReduce_1  238# happyReduction_650-happyReduction_650 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn254-		 (([mj AnnDotdot happy_var_1],([],   True))-	)}--happyReduce_651 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_651 = happyMonadReduce 3# 239# happyReduction_651-happyReduction_651 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut223 happy_x_3 of { (HappyWrap223 happy_var_3) -> -	( ams  (sLL happy_var_1 happy_var_3 $ HsRecField (sL1 happy_var_1 $ mkFieldOcc happy_var_1) happy_var_3 False)-                                [mj AnnEqual happy_var_2])}}})-	) (\r -> happyReturn (happyIn255 r))--happyReduce_652 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_652 = happySpecReduce_1  239# happyReduction_652-happyReduction_652 happy_x_1-	 =  case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> -	happyIn255-		 (sLL happy_var_1 happy_var_1 $ HsRecField (sL1 happy_var_1 $ mkFieldOcc happy_var_1) placeHolderPunRhs True-	)}--happyReduce_653 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_653 = happyMonadReduce 3# 240# happyReduction_653-happyReduction_653 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut256 happy_x_1 of { (HappyWrap256 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut257 happy_x_3 of { (HappyWrap257 happy_var_3) -> -	( addAnnotation (gl $ last $ unLoc happy_var_1) AnnSemi (gl happy_var_2) >>-                         return (let { this = happy_var_3; rest = unLoc happy_var_1 }-                              in rest `seq` this `seq` sLL happy_var_1 happy_var_3 (this : rest)))}}})-	) (\r -> happyReturn (happyIn256 r))--happyReduce_654 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_654 = happyMonadReduce 2# 240# happyReduction_654-happyReduction_654 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut256 happy_x_1 of { (HappyWrap256 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( addAnnotation (gl $ last $ unLoc happy_var_1) AnnSemi (gl happy_var_2) >>-                         return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1)))}})-	) (\r -> happyReturn (happyIn256 r))--happyReduce_655 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_655 = happySpecReduce_1  240# happyReduction_655-happyReduction_655 happy_x_1-	 =  case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> -	happyIn256-		 (let this = happy_var_1 in this `seq` sL1 happy_var_1 [this]-	)}--happyReduce_656 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_656 = happyMonadReduce 3# 241# happyReduction_656-happyReduction_656 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut206 happy_x_3 of { (HappyWrap206 happy_var_3) -> -	( ams (sLL happy_var_1 happy_var_3 (IPBind noExt (Left happy_var_1) happy_var_3))-                                              [mj AnnEqual happy_var_2])}}})-	) (\r -> happyReturn (happyIn257 r))--happyReduce_657 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_657 = happySpecReduce_1  242# happyReduction_657-happyReduction_657 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn258-		 (sL1 happy_var_1 (HsIPName (getIPDUPVARID happy_var_1))-	)}--happyReduce_658 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_658 = happySpecReduce_1  243# happyReduction_658-happyReduction_658 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn259-		 (sL1 happy_var_1 (getLABELVARID happy_var_1)-	)}--happyReduce_659 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_659 = happySpecReduce_1  244# happyReduction_659-happyReduction_659 happy_x_1-	 =  case happyOut261 happy_x_1 of { (HappyWrap261 happy_var_1) -> -	happyIn260-		 (happy_var_1-	)}--happyReduce_660 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_660 = happySpecReduce_0  244# happyReduction_660-happyReduction_660  =  happyIn260-		 (noLoc mkTrue-	)--happyReduce_661 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_661 = happySpecReduce_1  245# happyReduction_661-happyReduction_661 happy_x_1-	 =  case happyOut262 happy_x_1 of { (HappyWrap262 happy_var_1) -> -	happyIn261-		 (happy_var_1-	)}--happyReduce_662 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_662 = happyMonadReduce 3# 245# happyReduction_662-happyReduction_662 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut262 happy_x_1 of { (HappyWrap262 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut261 happy_x_3 of { (HappyWrap261 happy_var_3) -> -	( aa happy_var_1 (AnnVbar, happy_var_2)-                              >> return (sLL happy_var_1 happy_var_3 (Or [happy_var_1,happy_var_3])))}}})-	) (\r -> happyReturn (happyIn261 r))--happyReduce_663 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_663 = happySpecReduce_1  246# happyReduction_663-happyReduction_663 happy_x_1-	 =  case happyOut263 happy_x_1 of { (HappyWrap263 happy_var_1) -> -	happyIn262-		 (sLL (head happy_var_1) (last happy_var_1) (And (happy_var_1))-	)}--happyReduce_664 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_664 = happySpecReduce_1  247# happyReduction_664-happyReduction_664 happy_x_1-	 =  case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> -	happyIn263-		 ([happy_var_1]-	)}--happyReduce_665 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_665 = happyMonadReduce 3# 247# happyReduction_665-happyReduction_665 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut263 happy_x_3 of { (HappyWrap263 happy_var_3) -> -	( aa happy_var_1 (AnnComma, happy_var_2) >> return (happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn263 r))--happyReduce_666 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_666 = happyMonadReduce 3# 248# happyReduction_666-happyReduction_666 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut261 happy_x_2 of { (HappyWrap261 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (Parens happy_var_2)) [mop happy_var_1,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn264 r))--happyReduce_667 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_667 = happySpecReduce_1  248# happyReduction_667-happyReduction_667 happy_x_1-	 =  case happyOut266 happy_x_1 of { (HappyWrap266 happy_var_1) -> -	happyIn264-		 (sL1 happy_var_1 (Var happy_var_1)-	)}--happyReduce_668 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_668 = happySpecReduce_1  249# happyReduction_668-happyReduction_668 happy_x_1-	 =  case happyOut266 happy_x_1 of { (HappyWrap266 happy_var_1) -> -	happyIn265-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_669 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_669 = happyMonadReduce 3# 249# happyReduction_669-happyReduction_669 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut266 happy_x_1 of { (HappyWrap266 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut265 happy_x_3 of { (HappyWrap265 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>-                                    return (sLL happy_var_1 happy_var_3 (happy_var_1 : unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn265 r))--happyReduce_670 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_670 = happySpecReduce_1  250# happyReduction_670-happyReduction_670 happy_x_1-	 =  case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> -	happyIn266-		 (happy_var_1-	)}--happyReduce_671 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_671 = happySpecReduce_1  250# happyReduction_671-happyReduction_671 happy_x_1-	 =  case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> -	happyIn266-		 (happy_var_1-	)}--happyReduce_672 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_672 = happySpecReduce_1  251# happyReduction_672-happyReduction_672 happy_x_1-	 =  case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> -	happyIn267-		 (happy_var_1-	)}--happyReduce_673 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_673 = happySpecReduce_1  251# happyReduction_673-happyReduction_673 happy_x_1-	 =  case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> -	happyIn267-		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc happy_var_1))-	)}--happyReduce_674 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_674 = happySpecReduce_1  252# happyReduction_674-happyReduction_674 happy_x_1-	 =  case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> -	happyIn268-		 (happy_var_1-	)}--happyReduce_675 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_675 = happySpecReduce_1  252# happyReduction_675-happyReduction_675 happy_x_1-	 =  case happyOut273 happy_x_1 of { (HappyWrap273 happy_var_1) -> -	happyIn268-		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc happy_var_1))-	)}--happyReduce_676 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_676 = happySpecReduce_1  253# happyReduction_676-happyReduction_676 happy_x_1-	 =  case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> -	happyIn269-		 (happy_var_1-	)}--happyReduce_677 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_677 = happyMonadReduce 3# 253# happyReduction_677-happyReduction_677 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut309 happy_x_2 of { (HappyWrap309 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                   [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn269 r))--happyReduce_678 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_678 = happySpecReduce_1  254# happyReduction_678-happyReduction_678 happy_x_1-	 =  case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> -	happyIn270-		 (happy_var_1-	)}--happyReduce_679 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_679 = happyMonadReduce 3# 254# happyReduction_679-happyReduction_679 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut310 happy_x_2 of { (HappyWrap310 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn270 r))--happyReduce_680 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_680 = happySpecReduce_1  254# happyReduction_680-happyReduction_680 happy_x_1-	 =  case happyOut273 happy_x_1 of { (HappyWrap273 happy_var_1) -> -	happyIn270-		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc happy_var_1))-	)}--happyReduce_681 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_681 = happySpecReduce_1  255# happyReduction_681-happyReduction_681 happy_x_1-	 =  case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> -	happyIn271-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_682 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_682 = happyMonadReduce 3# 255# happyReduction_682-happyReduction_682 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut271 happy_x_3 of { (HappyWrap271 happy_var_3) -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>-                                   return (sLL happy_var_1 happy_var_3 (happy_var_1 : unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn271 r))--happyReduce_683 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_683 = happyMonadReduce 2# 256# happyReduction_683-happyReduction_683 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 unitDataCon) [mop happy_var_1,mcp happy_var_2])}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_684 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_684 = happyMonadReduce 3# 256# happyReduction_684-happyReduction_684 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut314 happy_x_2 of { (HappyWrap314 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ tupleDataCon Boxed (snd happy_var_2 + 1))-                                       (mop happy_var_1:mcp happy_var_3:(mcommas (fst happy_var_2))))}}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_685 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_685 = happyMonadReduce 2# 256# happyReduction_685-happyReduction_685 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ unboxedUnitDataCon) [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_686 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_686 = happyMonadReduce 3# 256# happyReduction_686-happyReduction_686 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut314 happy_x_2 of { (HappyWrap314 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ tupleDataCon Unboxed (snd happy_var_2 + 1))-                                       (mo happy_var_1:mc happy_var_3:(mcommas (fst happy_var_2))))}}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_687 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_687 = happySpecReduce_1  257# happyReduction_687-happyReduction_687 happy_x_1-	 =  case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> -	happyIn273-		 (happy_var_1-	)}--happyReduce_688 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_688 = happyMonadReduce 2# 257# happyReduction_688-happyReduction_688 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 nilDataCon) [mos happy_var_1,mcs happy_var_2])}})-	) (\r -> happyReturn (happyIn273 r))--happyReduce_689 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_689 = happySpecReduce_1  258# happyReduction_689-happyReduction_689 happy_x_1-	 =  case happyOut310 happy_x_1 of { (HappyWrap310 happy_var_1) -> -	happyIn274-		 (happy_var_1-	)}--happyReduce_690 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_690 = happyMonadReduce 3# 258# happyReduction_690-happyReduction_690 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut308 happy_x_2 of { (HappyWrap308 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn274 r))--happyReduce_691 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_691 = happySpecReduce_1  259# happyReduction_691-happyReduction_691 happy_x_1-	 =  case happyOut309 happy_x_1 of { (HappyWrap309 happy_var_1) -> -	happyIn275-		 (happy_var_1-	)}--happyReduce_692 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_692 = happyMonadReduce 3# 259# happyReduction_692-happyReduction_692 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut307 happy_x_2 of { (HappyWrap307 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn275 r))--happyReduce_693 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_693 = happySpecReduce_1  260# happyReduction_693-happyReduction_693 happy_x_1-	 =  case happyOut277 happy_x_1 of { (HappyWrap277 happy_var_1) -> -	happyIn276-		 (happy_var_1-	)}--happyReduce_694 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_694 = happyMonadReduce 2# 260# happyReduction_694-happyReduction_694 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ getRdrName unitTyCon)-                                              [mop happy_var_1,mcp happy_var_2])}})-	) (\r -> happyReturn (happyIn276 r))--happyReduce_695 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_695 = happyMonadReduce 2# 260# happyReduction_695-happyReduction_695 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ getRdrName unboxedUnitTyCon)-                                              [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn276 r))--happyReduce_696 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_696 = happySpecReduce_1  261# happyReduction_696-happyReduction_696 happy_x_1-	 =  case happyOut278 happy_x_1 of { (HappyWrap278 happy_var_1) -> -	happyIn277-		 (happy_var_1-	)}--happyReduce_697 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_697 = happyMonadReduce 3# 261# happyReduction_697-happyReduction_697 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut314 happy_x_2 of { (HappyWrap314 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Boxed-                                                        (snd happy_var_2 + 1)))-                                       (mop happy_var_1:mcp happy_var_3:(mcommas (fst happy_var_2))))}}})-	) (\r -> happyReturn (happyIn277 r))--happyReduce_698 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_698 = happyMonadReduce 3# 261# happyReduction_698-happyReduction_698 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut314 happy_x_2 of { (HappyWrap314 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Unboxed-                                                        (snd happy_var_2 + 1)))-                                       (mo happy_var_1:mc happy_var_3:(mcommas (fst happy_var_2))))}}})-	) (\r -> happyReturn (happyIn277 r))--happyReduce_699 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_699 = happyMonadReduce 3# 261# happyReduction_699-happyReduction_699 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ getRdrName funTyCon)-                                       [mop happy_var_1,mu AnnRarrow happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn277 r))--happyReduce_700 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_700 = happyMonadReduce 2# 261# happyReduction_700-happyReduction_700 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ listTyCon_RDR) [mos happy_var_1,mcs happy_var_2])}})-	) (\r -> happyReturn (happyIn277 r))--happyReduce_701 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_701 = happySpecReduce_1  262# happyReduction_701-happyReduction_701 happy_x_1-	 =  case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> -	happyIn278-		 (happy_var_1-	)}--happyReduce_702 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_702 = happyMonadReduce 3# 262# happyReduction_702-happyReduction_702 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut284 happy_x_2 of { (HappyWrap284 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                               [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn278 r))--happyReduce_703 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_703 = happyMonadReduce 3# 262# happyReduction_703-happyReduction_703 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ eqTyCon_RDR)-                                               [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn278 r))--happyReduce_704 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_704 = happySpecReduce_1  263# happyReduction_704-happyReduction_704 happy_x_1-	 =  case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> -	happyIn279-		 (happy_var_1-	)}--happyReduce_705 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_705 = happyMonadReduce 3# 263# happyReduction_705-happyReduction_705 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( let { name :: Located RdrName-                                    ; name = sL1 happy_var_2 $! mkQual tcClsName (getQCONSYM happy_var_2) }-                                in ams (sLL happy_var_1 happy_var_3 (unLoc name)) [mop happy_var_1,mj AnnVal name,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn279 r))--happyReduce_706 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_706 = happyMonadReduce 3# 263# happyReduction_706-happyReduction_706 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( let { name :: Located RdrName-                                    ; name = sL1 happy_var_2 $! mkUnqual tcClsName (getCONSYM happy_var_2) }-                                in ams (sLL happy_var_1 happy_var_3 (unLoc name)) [mop happy_var_1,mj AnnVal name,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn279 r))--happyReduce_707 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_707 = happyMonadReduce 3# 263# happyReduction_707-happyReduction_707 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( let { name :: Located RdrName-                                    ; name = sL1 happy_var_2 $! consDataCon_RDR }-                                in ams (sLL happy_var_1 happy_var_3 (unLoc name)) [mop happy_var_1,mj AnnVal name,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn279 r))--happyReduce_708 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_708 = happyMonadReduce 3# 263# happyReduction_708-happyReduction_708 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ eqTyCon_RDR) [mop happy_var_1,mj AnnTilde happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn279 r))--happyReduce_709 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_709 = happySpecReduce_1  264# happyReduction_709-happyReduction_709 happy_x_1-	 =  case happyOut284 happy_x_1 of { (HappyWrap284 happy_var_1) -> -	happyIn280-		 (happy_var_1-	)}--happyReduce_710 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_710 = happyMonadReduce 3# 264# happyReduction_710-happyReduction_710 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut281 happy_x_2 of { (HappyWrap281 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                               [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                               ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn280 r))--happyReduce_711 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_711 = happySpecReduce_1  265# happyReduction_711-happyReduction_711 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn281-		 (sL1 happy_var_1 $! mkQual tcClsName (getQCONID happy_var_1)-	)}--happyReduce_712 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_712 = happySpecReduce_1  265# happyReduction_712-happyReduction_712 happy_x_1-	 =  case happyOut283 happy_x_1 of { (HappyWrap283 happy_var_1) -> -	happyIn281-		 (happy_var_1-	)}--happyReduce_713 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_713 = happySpecReduce_1  266# happyReduction_713-happyReduction_713 happy_x_1-	 =  case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> -	happyIn282-		 (sL1 happy_var_1                           (HsTyVar noExt NotPromoted happy_var_1)-	)}--happyReduce_714 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_714 = happySpecReduce_2  266# happyReduction_714-happyReduction_714 happy_x_2-	happy_x_1-	 =  case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> -	case happyOut318 happy_x_2 of { (HappyWrap318 happy_var_2) -> -	happyIn282-		 (sLL happy_var_1 happy_var_2 (HsDocTy noExt (sL1 happy_var_1 (HsTyVar noExt NotPromoted happy_var_1)) happy_var_2)-	)}}--happyReduce_715 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_715 = happySpecReduce_1  267# happyReduction_715-happyReduction_715 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn283-		 (sL1 happy_var_1 $! mkUnqual tcClsName (getCONID happy_var_1)-	)}--happyReduce_716 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_716 = happySpecReduce_1  268# happyReduction_716-happyReduction_716 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn284-		 (sL1 happy_var_1 $! mkQual tcClsName (getQCONSYM happy_var_1)-	)}--happyReduce_717 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_717 = happySpecReduce_1  268# happyReduction_717-happyReduction_717 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn284-		 (sL1 happy_var_1 $! mkQual tcClsName (getQVARSYM happy_var_1)-	)}--happyReduce_718 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_718 = happySpecReduce_1  268# happyReduction_718-happyReduction_718 happy_x_1-	 =  case happyOut285 happy_x_1 of { (HappyWrap285 happy_var_1) -> -	happyIn284-		 (happy_var_1-	)}--happyReduce_719 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_719 = happySpecReduce_1  269# happyReduction_719-happyReduction_719 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn285-		 (sL1 happy_var_1 $! mkUnqual tcClsName (getCONSYM happy_var_1)-	)}--happyReduce_720 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_720 = happySpecReduce_1  269# happyReduction_720-happyReduction_720 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn285-		 (sL1 happy_var_1 $! mkUnqual tcClsName (getVARSYM happy_var_1)-	)}--happyReduce_721 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_721 = happySpecReduce_1  269# happyReduction_721-happyReduction_721 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn285-		 (sL1 happy_var_1 $! consDataCon_RDR-	)}--happyReduce_722 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_722 = happySpecReduce_1  269# happyReduction_722-happyReduction_722 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn285-		 (sL1 happy_var_1 $! mkUnqual tcClsName (fsLit "-")-	)}--happyReduce_723 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_723 = happySpecReduce_1  269# happyReduction_723-happyReduction_723 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn285-		 (sL1 happy_var_1 $! mkUnqual tcClsName (fsLit "!")-	)}--happyReduce_724 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_724 = happySpecReduce_1  269# happyReduction_724-happyReduction_724 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn285-		 (sL1 happy_var_1 $! mkUnqual tcClsName (fsLit ".")-	)}--happyReduce_725 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_725 = happySpecReduce_1  270# happyReduction_725-happyReduction_725 happy_x_1-	 =  case happyOut287 happy_x_1 of { (HappyWrap287 happy_var_1) -> -	happyIn286-		 (happy_var_1-	)}--happyReduce_726 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_726 = happySpecReduce_1  270# happyReduction_726-happyReduction_726 happy_x_1-	 =  case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> -	happyIn286-		 (happy_var_1-	)}--happyReduce_727 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_727 = happySpecReduce_1  270# happyReduction_727-happyReduction_727 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn286-		 (sL1 happy_var_1 $ getRdrName funTyCon-	)}--happyReduce_728 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_728 = happySpecReduce_1  270# happyReduction_728-happyReduction_728 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn286-		 (sL1 happy_var_1 $ eqTyCon_RDR-	)}--happyReduce_729 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_729 = happySpecReduce_1  271# happyReduction_729-happyReduction_729 happy_x_1-	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> -	happyIn287-		 (happy_var_1-	)}--happyReduce_730 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_730 = happyMonadReduce 3# 271# happyReduction_730-happyReduction_730 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn287 r))--happyReduce_731 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_731 = happySpecReduce_1  272# happyReduction_731-happyReduction_731 happy_x_1-	 =  case happyOut291 happy_x_1 of { (HappyWrap291 happy_var_1) -> -	happyIn288-		 (sL1 happy_var_1 $ HsVar noExt happy_var_1-	)}--happyReduce_732 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_732 = happySpecReduce_1  272# happyReduction_732-happyReduction_732 happy_x_1-	 =  case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> -	happyIn288-		 (sL1 happy_var_1 $ HsVar noExt happy_var_1-	)}--happyReduce_733 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_733 = happySpecReduce_1  272# happyReduction_733-happyReduction_733 happy_x_1-	 =  case happyOut290 happy_x_1 of { (HappyWrap290 happy_var_1) -> -	happyIn288-		 (happy_var_1-	)}--happyReduce_734 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_734 = happySpecReduce_1  273# happyReduction_734-happyReduction_734 happy_x_1-	 =  case happyOut292 happy_x_1 of { (HappyWrap292 happy_var_1) -> -	happyIn289-		 (sL1 happy_var_1 $ HsVar noExt happy_var_1-	)}--happyReduce_735 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_735 = happySpecReduce_1  273# happyReduction_735-happyReduction_735 happy_x_1-	 =  case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> -	happyIn289-		 (sL1 happy_var_1 $ HsVar noExt happy_var_1-	)}--happyReduce_736 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_736 = happySpecReduce_1  273# happyReduction_736-happyReduction_736 happy_x_1-	 =  case happyOut290 happy_x_1 of { (HappyWrap290 happy_var_1) -> -	happyIn289-		 (happy_var_1-	)}--happyReduce_737 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_737 = happyMonadReduce 3# 274# happyReduction_737-happyReduction_737 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ EWildPat noExt)-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn290 r))--happyReduce_738 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_738 = happySpecReduce_1  275# happyReduction_738-happyReduction_738 happy_x_1-	 =  case happyOut300 happy_x_1 of { (HappyWrap300 happy_var_1) -> -	happyIn291-		 (happy_var_1-	)}--happyReduce_739 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_739 = happyMonadReduce 3# 275# happyReduction_739-happyReduction_739 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut298 happy_x_2 of { (HappyWrap298 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn291 r))--happyReduce_740 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_740 = happySpecReduce_1  276# happyReduction_740-happyReduction_740 happy_x_1-	 =  case happyOut301 happy_x_1 of { (HappyWrap301 happy_var_1) -> -	happyIn292-		 (happy_var_1-	)}--happyReduce_741 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_741 = happyMonadReduce 3# 276# happyReduction_741-happyReduction_741 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut298 happy_x_2 of { (HappyWrap298 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn292 r))--happyReduce_742 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_742 = happySpecReduce_1  277# happyReduction_742-happyReduction_742 happy_x_1-	 =  case happyOut295 happy_x_1 of { (HappyWrap295 happy_var_1) -> -	happyIn293-		 (happy_var_1-	)}--happyReduce_743 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_743 = happyMonadReduce 3# 278# happyReduction_743-happyReduction_743 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut295 happy_x_2 of { (HappyWrap295 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn294 r))--happyReduce_744 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_744 = happySpecReduce_1  279# happyReduction_744-happyReduction_744 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn295-		 (sL1 happy_var_1 $! mkUnqual tvName (getVARID happy_var_1)-	)}--happyReduce_745 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_745 = happySpecReduce_1  279# happyReduction_745-happyReduction_745 happy_x_1-	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> -	happyIn295-		 (sL1 happy_var_1 $! mkUnqual tvName (unLoc happy_var_1)-	)}--happyReduce_746 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_746 = happySpecReduce_1  279# happyReduction_746-happyReduction_746 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn295-		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "unsafe")-	)}--happyReduce_747 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_747 = happySpecReduce_1  279# happyReduction_747-happyReduction_747 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn295-		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "safe")-	)}--happyReduce_748 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_748 = happySpecReduce_1  279# happyReduction_748-happyReduction_748 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn295-		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "interruptible")-	)}--happyReduce_749 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_749 = happySpecReduce_1  280# happyReduction_749-happyReduction_749 happy_x_1-	 =  case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> -	happyIn296-		 (happy_var_1-	)}--happyReduce_750 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_750 = happyMonadReduce 3# 280# happyReduction_750-happyReduction_750 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut303 happy_x_2 of { (HappyWrap303 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn296 r))--happyReduce_751 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_751 = happySpecReduce_1  281# happyReduction_751-happyReduction_751 happy_x_1-	 =  case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> -	happyIn297-		 (happy_var_1-	)}--happyReduce_752 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_752 = happyMonadReduce 3# 281# happyReduction_752-happyReduction_752 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut303 happy_x_2 of { (HappyWrap303 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn297 r))--happyReduce_753 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_753 = happyMonadReduce 3# 281# happyReduction_753-happyReduction_753 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut302 happy_x_2 of { (HappyWrap302 happy_var_2) -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))-                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn297 r))--happyReduce_754 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_754 = happySpecReduce_1  282# happyReduction_754-happyReduction_754 happy_x_1-	 =  case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> -	happyIn298-		 (happy_var_1-	)}--happyReduce_755 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_755 = happySpecReduce_1  282# happyReduction_755-happyReduction_755 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn298-		 (sL1 happy_var_1 $! mkQual varName (getQVARID happy_var_1)-	)}--happyReduce_756 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_756 = happySpecReduce_1  283# happyReduction_756-happyReduction_756 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (getVARID happy_var_1)-	)}--happyReduce_757 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_757 = happySpecReduce_1  283# happyReduction_757-happyReduction_757 happy_x_1-	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (unLoc happy_var_1)-	)}--happyReduce_758 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_758 = happySpecReduce_1  283# happyReduction_758-happyReduction_758 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "unsafe")-	)}--happyReduce_759 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_759 = happySpecReduce_1  283# happyReduction_759-happyReduction_759 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "safe")-	)}--happyReduce_760 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_760 = happySpecReduce_1  283# happyReduction_760-happyReduction_760 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "interruptible")-	)}--happyReduce_761 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_761 = happySpecReduce_1  283# happyReduction_761-happyReduction_761 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "forall")-	)}--happyReduce_762 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_762 = happySpecReduce_1  283# happyReduction_762-happyReduction_762 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "family")-	)}--happyReduce_763 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_763 = happySpecReduce_1  283# happyReduction_763-happyReduction_763 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "role")-	)}--happyReduce_764 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_764 = happySpecReduce_1  284# happyReduction_764-happyReduction_764 happy_x_1-	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> -	happyIn300-		 (happy_var_1-	)}--happyReduce_765 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_765 = happySpecReduce_1  284# happyReduction_765-happyReduction_765 happy_x_1-	 =  case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> -	happyIn300-		 (happy_var_1-	)}--happyReduce_766 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_766 = happySpecReduce_1  285# happyReduction_766-happyReduction_766 happy_x_1-	 =  case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> -	happyIn301-		 (happy_var_1-	)}--happyReduce_767 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_767 = happySpecReduce_1  285# happyReduction_767-happyReduction_767 happy_x_1-	 =  case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> -	happyIn301-		 (happy_var_1-	)}--happyReduce_768 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_768 = happySpecReduce_1  286# happyReduction_768-happyReduction_768 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn302-		 (sL1 happy_var_1 $ mkQual varName (getQVARSYM happy_var_1)-	)}--happyReduce_769 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_769 = happySpecReduce_1  287# happyReduction_769-happyReduction_769 happy_x_1-	 =  case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> -	happyIn303-		 (happy_var_1-	)}--happyReduce_770 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_770 = happySpecReduce_1  287# happyReduction_770-happyReduction_770 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn303-		 (sL1 happy_var_1 $ mkUnqual varName (fsLit "-")-	)}--happyReduce_771 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_771 = happySpecReduce_1  288# happyReduction_771-happyReduction_771 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn304-		 (sL1 happy_var_1 $ mkUnqual varName (getVARSYM happy_var_1)-	)}--happyReduce_772 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_772 = happySpecReduce_1  288# happyReduction_772-happyReduction_772 happy_x_1-	 =  case happyOut306 happy_x_1 of { (HappyWrap306 happy_var_1) -> -	happyIn304-		 (sL1 happy_var_1 $ mkUnqual varName (unLoc happy_var_1)-	)}--happyReduce_773 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_773 = happySpecReduce_1  289# happyReduction_773-happyReduction_773 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "as")-	)}--happyReduce_774 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_774 = happySpecReduce_1  289# happyReduction_774-happyReduction_774 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "qualified")-	)}--happyReduce_775 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_775 = happySpecReduce_1  289# happyReduction_775-happyReduction_775 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "hiding")-	)}--happyReduce_776 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_776 = happySpecReduce_1  289# happyReduction_776-happyReduction_776 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "export")-	)}--happyReduce_777 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_777 = happySpecReduce_1  289# happyReduction_777-happyReduction_777 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "label")-	)}--happyReduce_778 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_778 = happySpecReduce_1  289# happyReduction_778-happyReduction_778 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "dynamic")-	)}--happyReduce_779 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_779 = happySpecReduce_1  289# happyReduction_779-happyReduction_779 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "stdcall")-	)}--happyReduce_780 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_780 = happySpecReduce_1  289# happyReduction_780-happyReduction_780 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "ccall")-	)}--happyReduce_781 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_781 = happySpecReduce_1  289# happyReduction_781-happyReduction_781 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "capi")-	)}--happyReduce_782 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_782 = happySpecReduce_1  289# happyReduction_782-happyReduction_782 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "prim")-	)}--happyReduce_783 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_783 = happySpecReduce_1  289# happyReduction_783-happyReduction_783 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "javascript")-	)}--happyReduce_784 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_784 = happySpecReduce_1  289# happyReduction_784-happyReduction_784 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "group")-	)}--happyReduce_785 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_785 = happySpecReduce_1  289# happyReduction_785-happyReduction_785 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "stock")-	)}--happyReduce_786 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_786 = happySpecReduce_1  289# happyReduction_786-happyReduction_786 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "anyclass")-	)}--happyReduce_787 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_787 = happySpecReduce_1  289# happyReduction_787-happyReduction_787 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "via")-	)}--happyReduce_788 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_788 = happySpecReduce_1  289# happyReduction_788-happyReduction_788 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "unit")-	)}--happyReduce_789 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_789 = happySpecReduce_1  289# happyReduction_789-happyReduction_789 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "dependency")-	)}--happyReduce_790 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_790 = happySpecReduce_1  289# happyReduction_790-happyReduction_790 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 (fsLit "signature")-	)}--happyReduce_791 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_791 = happyMonadReduce 1# 290# happyReduction_791-happyReduction_791 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( ams (sL1 happy_var_1 (fsLit "!")) [mj AnnBang happy_var_1])})-	) (\r -> happyReturn (happyIn306 r))--happyReduce_792 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_792 = happySpecReduce_1  290# happyReduction_792-happyReduction_792 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 (fsLit ".")-	)}--happyReduce_793 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_793 = happySpecReduce_1  290# happyReduction_793-happyReduction_793 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 (fsLit (starSym (isUnicode happy_var_1)))-	)}--happyReduce_794 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_794 = happySpecReduce_1  291# happyReduction_794-happyReduction_794 happy_x_1-	 =  case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> -	happyIn307-		 (happy_var_1-	)}--happyReduce_795 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_795 = happySpecReduce_1  291# happyReduction_795-happyReduction_795 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn307-		 (sL1 happy_var_1 $! mkQual dataName (getQCONID happy_var_1)-	)}--happyReduce_796 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_796 = happySpecReduce_1  292# happyReduction_796-happyReduction_796 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn308-		 (sL1 happy_var_1 $ mkUnqual dataName (getCONID happy_var_1)-	)}--happyReduce_797 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_797 = happySpecReduce_1  293# happyReduction_797-happyReduction_797 happy_x_1-	 =  case happyOut310 happy_x_1 of { (HappyWrap310 happy_var_1) -> -	happyIn309-		 (happy_var_1-	)}--happyReduce_798 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_798 = happySpecReduce_1  293# happyReduction_798-happyReduction_798 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn309-		 (sL1 happy_var_1 $ mkQual dataName (getQCONSYM happy_var_1)-	)}--happyReduce_799 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_799 = happySpecReduce_1  294# happyReduction_799-happyReduction_799 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn310-		 (sL1 happy_var_1 $ mkUnqual dataName (getCONSYM happy_var_1)-	)}--happyReduce_800 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_800 = happySpecReduce_1  294# happyReduction_800-happyReduction_800 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn310-		 (sL1 happy_var_1 $ consDataCon_RDR-	)}--happyReduce_801 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_801 = happySpecReduce_1  295# happyReduction_801-happyReduction_801 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsChar       (getCHARs happy_var_1) $ getCHAR happy_var_1-	)}--happyReduce_802 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_802 = happySpecReduce_1  295# happyReduction_802-happyReduction_802 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsString     (getSTRINGs happy_var_1)-                                                    $ getSTRING happy_var_1-	)}--happyReduce_803 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_803 = happySpecReduce_1  295# happyReduction_803-happyReduction_803 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsIntPrim    (getPRIMINTEGERs happy_var_1)-                                                    $ getPRIMINTEGER happy_var_1-	)}--happyReduce_804 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_804 = happySpecReduce_1  295# happyReduction_804-happyReduction_804 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsWordPrim   (getPRIMWORDs happy_var_1)-                                                    $ getPRIMWORD happy_var_1-	)}--happyReduce_805 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_805 = happySpecReduce_1  295# happyReduction_805-happyReduction_805 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsCharPrim   (getPRIMCHARs happy_var_1)-                                                    $ getPRIMCHAR happy_var_1-	)}--happyReduce_806 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_806 = happySpecReduce_1  295# happyReduction_806-happyReduction_806 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsStringPrim (getPRIMSTRINGs happy_var_1)-                                                    $ getPRIMSTRING happy_var_1-	)}--happyReduce_807 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_807 = happySpecReduce_1  295# happyReduction_807-happyReduction_807 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsFloatPrim  noExt $ getPRIMFLOAT happy_var_1-	)}--happyReduce_808 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_808 = happySpecReduce_1  295# happyReduction_808-happyReduction_808 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (sL1 happy_var_1 $ HsDoublePrim noExt $ getPRIMDOUBLE happy_var_1-	)}--happyReduce_809 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_809 = happySpecReduce_1  296# happyReduction_809-happyReduction_809 happy_x_1-	 =  happyIn312-		 (()-	)--happyReduce_810 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_810 = happyMonadReduce 1# 296# happyReduction_810-happyReduction_810 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((( popContext))-	) (\r -> happyReturn (happyIn312 r))--happyReduce_811 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_811 = happySpecReduce_1  297# happyReduction_811-happyReduction_811 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn313-		 (sL1 happy_var_1 $ mkModuleNameFS (getCONID happy_var_1)-	)}--happyReduce_812 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_812 = happySpecReduce_1  297# happyReduction_812-happyReduction_812 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn313-		 (sL1 happy_var_1 $ let (mod,c) = getQCONID happy_var_1 in-                                  mkModuleNameFS-                                   (mkFastString-                                     (unpackFS mod ++ '.':unpackFS c))-	)}--happyReduce_813 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_813 = happySpecReduce_2  298# happyReduction_813-happyReduction_813 happy_x_2-	happy_x_1-	 =  case happyOut314 happy_x_1 of { (HappyWrap314 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn314-		 (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)-	)}}--happyReduce_814 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_814 = happySpecReduce_1  298# happyReduction_814-happyReduction_814 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn314-		 (([gl happy_var_1],1)-	)}--happyReduce_815 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_815 = happySpecReduce_1  299# happyReduction_815-happyReduction_815 happy_x_1-	 =  case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> -	happyIn315-		 (happy_var_1-	)}--happyReduce_816 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_816 = happySpecReduce_0  299# happyReduction_816-happyReduction_816  =  happyIn315-		 (([], 0)-	)--happyReduce_817 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_817 = happySpecReduce_2  300# happyReduction_817-happyReduction_817 happy_x_2-	happy_x_1-	 =  case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn316-		 (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)-	)}}--happyReduce_818 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_818 = happySpecReduce_1  300# happyReduction_818-happyReduction_818 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn316-		 (([gl happy_var_1],1)-	)}--happyReduce_819 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_819 = happyMonadReduce 1# 301# happyReduction_819-happyReduction_819 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( return (sL1 happy_var_1 (mkHsDocString (getDOCNEXT happy_var_1))))})-	) (\r -> happyReturn (happyIn317 r))--happyReduce_820 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_820 = happyMonadReduce 1# 302# happyReduction_820-happyReduction_820 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( return (sL1 happy_var_1 (mkHsDocString (getDOCPREV happy_var_1))))})-	) (\r -> happyReturn (happyIn318 r))--happyReduce_821 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_821 = happyMonadReduce 1# 303# happyReduction_821-happyReduction_821 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	(-      let string = getDOCNAMED happy_var_1-          (name, rest) = break isSpace string-      in return (sL1 happy_var_1 (name, mkHsDocString rest)))})-	) (\r -> happyReturn (happyIn319 r))--happyReduce_822 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_822 = happyMonadReduce 1# 304# happyReduction_822-happyReduction_822 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( let (n, doc) = getDOCSECTION happy_var_1 in-        return (sL1 happy_var_1 (n, mkHsDocString doc)))})-	) (\r -> happyReturn (happyIn320 r))--happyReduce_823 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_823 = happyMonadReduce 1# 305# happyReduction_823-happyReduction_823 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( let string = getDOCNEXT happy_var_1 in-                     return (Just (sL1 happy_var_1 (mkHsDocString string))))})-	) (\r -> happyReturn (happyIn321 r))--happyReduce_824 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_824 = happySpecReduce_1  306# happyReduction_824-happyReduction_824 happy_x_1-	 =  case happyOut318 happy_x_1 of { (HappyWrap318 happy_var_1) -> -	happyIn322-		 (Just happy_var_1-	)}--happyReduce_825 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_825 = happySpecReduce_0  306# happyReduction_825-happyReduction_825  =  happyIn322-		 (Nothing-	)--happyReduce_826 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_826 = happySpecReduce_1  307# happyReduction_826-happyReduction_826 happy_x_1-	 =  case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> -	happyIn323-		 (Just happy_var_1-	)}--happyReduce_827 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_827 = happySpecReduce_0  307# happyReduction_827-happyReduction_827  =  happyIn323-		 (Nothing-	)--happyNewToken action sts stk-	= (lexer True)(\tk -> -	let cont i = happyDoAction i tk action sts stk in-	case tk of {-	L _ ITeof -> happyDoAction 153# tk action sts stk;-	L _ ITunderscore -> cont 1#;-	L _ ITas -> cont 2#;-	L _ ITcase -> cont 3#;-	L _ ITclass -> cont 4#;-	L _ ITdata -> cont 5#;-	L _ ITdefault -> cont 6#;-	L _ ITderiving -> cont 7#;-	L _ ITdo -> cont 8#;-	L _ ITelse -> cont 9#;-	L _ IThiding -> cont 10#;-	L _ ITif -> cont 11#;-	L _ ITimport -> cont 12#;-	L _ ITin -> cont 13#;-	L _ ITinfix -> cont 14#;-	L _ ITinfixl -> cont 15#;-	L _ ITinfixr -> cont 16#;-	L _ ITinstance -> cont 17#;-	L _ ITlet -> cont 18#;-	L _ ITmodule -> cont 19#;-	L _ ITnewtype -> cont 20#;-	L _ ITof -> cont 21#;-	L _ ITqualified -> cont 22#;-	L _ ITthen -> cont 23#;-	L _ ITtype -> cont 24#;-	L _ ITwhere -> cont 25#;-	L _ (ITforall _) -> cont 26#;-	L _ ITforeign -> cont 27#;-	L _ ITexport -> cont 28#;-	L _ ITlabel -> cont 29#;-	L _ ITdynamic -> cont 30#;-	L _ ITsafe -> cont 31#;-	L _ ITinterruptible -> cont 32#;-	L _ ITunsafe -> cont 33#;-	L _ ITmdo -> cont 34#;-	L _ ITfamily -> cont 35#;-	L _ ITrole -> cont 36#;-	L _ ITstdcallconv -> cont 37#;-	L _ ITccallconv -> cont 38#;-	L _ ITcapiconv -> cont 39#;-	L _ ITprimcallconv -> cont 40#;-	L _ ITjavascriptcallconv -> cont 41#;-	L _ ITproc -> cont 42#;-	L _ ITrec -> cont 43#;-	L _ ITgroup -> cont 44#;-	L _ ITby -> cont 45#;-	L _ ITusing -> cont 46#;-	L _ ITpattern -> cont 47#;-	L _ ITstatic -> cont 48#;-	L _ ITstock -> cont 49#;-	L _ ITanyclass -> cont 50#;-	L _ ITvia -> cont 51#;-	L _ ITunit -> cont 52#;-	L _ ITsignature -> cont 53#;-	L _ ITdependency -> cont 54#;-	L _ (ITinline_prag _ _ _) -> cont 55#;-	L _ (ITspec_prag _) -> cont 56#;-	L _ (ITspec_inline_prag _ _) -> cont 57#;-	L _ (ITsource_prag _) -> cont 58#;-	L _ (ITrules_prag _) -> cont 59#;-	L _ (ITcore_prag _) -> cont 60#;-	L _ (ITscc_prag _) -> cont 61#;-	L _ (ITgenerated_prag _) -> cont 62#;-	L _ (ITdeprecated_prag _) -> cont 63#;-	L _ (ITwarning_prag _) -> cont 64#;-	L _ (ITunpack_prag _) -> cont 65#;-	L _ (ITnounpack_prag _) -> cont 66#;-	L _ (ITann_prag _) -> cont 67#;-	L _ (ITminimal_prag _) -> cont 68#;-	L _ (ITctype _) -> cont 69#;-	L _ (IToverlapping_prag _) -> cont 70#;-	L _ (IToverlappable_prag _) -> cont 71#;-	L _ (IToverlaps_prag _) -> cont 72#;-	L _ (ITincoherent_prag _) -> cont 73#;-	L _ (ITcomplete_prag _) -> cont 74#;-	L _ ITclose_prag -> cont 75#;-	L _ ITdotdot -> cont 76#;-	L _ ITcolon -> cont 77#;-	L _ (ITdcolon _) -> cont 78#;-	L _ ITequal -> cont 79#;-	L _ ITlam -> cont 80#;-	L _ ITlcase -> cont 81#;-	L _ ITvbar -> cont 82#;-	L _ (ITlarrow _) -> cont 83#;-	L _ (ITrarrow _) -> cont 84#;-	L _ ITat -> cont 85#;-	L _ ITtilde -> cont 86#;-	L _ (ITdarrow _) -> cont 87#;-	L _ ITminus -> cont 88#;-	L _ ITbang -> cont 89#;-	L _ (ITstar _) -> cont 90#;-	L _ (ITlarrowtail _) -> cont 91#;-	L _ (ITrarrowtail _) -> cont 92#;-	L _ (ITLarrowtail _) -> cont 93#;-	L _ (ITRarrowtail _) -> cont 94#;-	L _ ITdot -> cont 95#;-	L _ ITtypeApp -> cont 96#;-	L _ ITocurly -> cont 97#;-	L _ ITccurly -> cont 98#;-	L _ ITvocurly -> cont 99#;-	L _ ITvccurly -> cont 100#;-	L _ ITobrack -> cont 101#;-	L _ ITcbrack -> cont 102#;-	L _ ITopabrack -> cont 103#;-	L _ ITcpabrack -> cont 104#;-	L _ IToparen -> cont 105#;-	L _ ITcparen -> cont 106#;-	L _ IToubxparen -> cont 107#;-	L _ ITcubxparen -> cont 108#;-	L _ (IToparenbar _) -> cont 109#;-	L _ (ITcparenbar _) -> cont 110#;-	L _ ITsemi -> cont 111#;-	L _ ITcomma -> cont 112#;-	L _ ITbackquote -> cont 113#;-	L _ ITsimpleQuote -> cont 114#;-	L _ (ITvarid    _) -> cont 115#;-	L _ (ITconid    _) -> cont 116#;-	L _ (ITvarsym   _) -> cont 117#;-	L _ (ITconsym   _) -> cont 118#;-	L _ (ITqvarid   _) -> cont 119#;-	L _ (ITqconid   _) -> cont 120#;-	L _ (ITqvarsym  _) -> cont 121#;-	L _ (ITqconsym  _) -> cont 122#;-	L _ (ITdupipvarid   _) -> cont 123#;-	L _ (ITlabelvarid   _) -> cont 124#;-	L _ (ITchar   _ _) -> cont 125#;-	L _ (ITstring _ _) -> cont 126#;-	L _ (ITinteger _) -> cont 127#;-	L _ (ITrational _) -> cont 128#;-	L _ (ITprimchar   _ _) -> cont 129#;-	L _ (ITprimstring _ _) -> cont 130#;-	L _ (ITprimint    _ _) -> cont 131#;-	L _ (ITprimword   _ _) -> cont 132#;-	L _ (ITprimfloat  _) -> cont 133#;-	L _ (ITprimdouble _) -> cont 134#;-	L _ (ITdocCommentNext _) -> cont 135#;-	L _ (ITdocCommentPrev _) -> cont 136#;-	L _ (ITdocCommentNamed _) -> cont 137#;-	L _ (ITdocSection _ _) -> cont 138#;-	L _ (ITopenExpQuote _ _) -> cont 139#;-	L _ ITopenPatQuote -> cont 140#;-	L _ ITopenTypQuote -> cont 141#;-	L _ ITopenDecQuote -> cont 142#;-	L _ (ITcloseQuote _) -> cont 143#;-	L _ (ITopenTExpQuote _) -> cont 144#;-	L _ ITcloseTExpQuote -> cont 145#;-	L _ (ITidEscape _) -> cont 146#;-	L _ ITparenEscape -> cont 147#;-	L _ (ITidTyEscape _) -> cont 148#;-	L _ ITparenTyEscape -> cont 149#;-	L _ ITtyQuote -> cont 150#;-	L _ (ITquasiQuote _) -> cont 151#;-	L _ (ITqQuasiQuote _) -> cont 152#;-	_ -> happyError' (tk, [])-	})--happyError_ explist 153# tk = happyError' (tk, explist)-happyError_ explist _ tk = happyError' (tk, explist)--happyThen :: () => P a -> (a -> P b) -> P b-happyThen = (>>=)-happyReturn :: () => a -> P a-happyReturn = (return)-happyParse :: () => Happy_GHC_Exts.Int# -> P (HappyAbsSyn )--happyNewToken :: () => Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )--happyDoAction :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )--happyReduceArr :: () => Happy_Data_Array.Array Int (Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn ))--happyThen1 :: () => P a -> (a -> P b) -> P b-happyThen1 = happyThen-happyReturn1 :: () => a -> P a-happyReturn1 = happyReturn-happyError' :: () => (((Located Token)), [String]) -> P a-happyError' tk = (\(tokens, explist) -> happyError) tk-parseModule = happySomeParser where- happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (let {(HappyWrap34 x') = happyOut34 x} in x'))--parseSignature = happySomeParser where- happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (let {(HappyWrap33 x') = happyOut33 x} in x'))--parseImport = happySomeParser where- happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (let {(HappyWrap64 x') = happyOut64 x} in x'))--parseStatement = happySomeParser where- happySomeParser = happyThen (happyParse 3#) (\x -> happyReturn (let {(HappyWrap251 x') = happyOut251 x} in x'))--parseDeclaration = happySomeParser where- happySomeParser = happyThen (happyParse 4#) (\x -> happyReturn (let {(HappyWrap77 x') = happyOut77 x} in x'))--parseExpression = happySomeParser where- happySomeParser = happyThen (happyParse 5#) (\x -> happyReturn (let {(HappyWrap206 x') = happyOut206 x} in x'))--parsePattern = happySomeParser where- happySomeParser = happyThen (happyParse 6#) (\x -> happyReturn (let {(HappyWrap244 x') = happyOut244 x} in x'))--parseTypeSignature = happySomeParser where- happySomeParser = happyThen (happyParse 7#) (\x -> happyReturn (let {(HappyWrap202 x') = happyOut202 x} in x'))--parseStmt = happySomeParser where- happySomeParser = happyThen (happyParse 8#) (\x -> happyReturn (let {(HappyWrap250 x') = happyOut250 x} in x'))--parseIdentifier = happySomeParser where- happySomeParser = happyThen (happyParse 9#) (\x -> happyReturn (let {(HappyWrap16 x') = happyOut16 x} in x'))--parseType = happySomeParser where- happySomeParser = happyThen (happyParse 10#) (\x -> happyReturn (let {(HappyWrap152 x') = happyOut152 x} in x'))--parseBackpack = happySomeParser where- happySomeParser = happyThen (happyParse 11#) (\x -> happyReturn (let {(HappyWrap17 x') = happyOut17 x} in x'))--parseHeader = happySomeParser where- happySomeParser = happyThen (happyParse 12#) (\x -> happyReturn (let {(HappyWrap43 x') = happyOut43 x} in x'))--happySeq = happyDoSeq---happyError :: P a-happyError = srcParseFail--getVARID        (dL->L _ (ITvarid    x)) = x-getCONID        (dL->L _ (ITconid    x)) = x-getVARSYM       (dL->L _ (ITvarsym   x)) = x-getCONSYM       (dL->L _ (ITconsym   x)) = x-getQVARID       (dL->L _ (ITqvarid   x)) = x-getQCONID       (dL->L _ (ITqconid   x)) = x-getQVARSYM      (dL->L _ (ITqvarsym  x)) = x-getQCONSYM      (dL->L _ (ITqconsym  x)) = x-getIPDUPVARID   (dL->L _ (ITdupipvarid   x)) = x-getLABELVARID   (dL->L _ (ITlabelvarid   x)) = x-getCHAR         (dL->L _ (ITchar   _ x)) = x-getSTRING       (dL->L _ (ITstring _ x)) = x-getINTEGER      (dL->L _ (ITinteger x))  = x-getRATIONAL     (dL->L _ (ITrational x)) = x-getPRIMCHAR     (dL->L _ (ITprimchar _ x)) = x-getPRIMSTRING   (dL->L _ (ITprimstring _ x)) = x-getPRIMINTEGER  (dL->L _ (ITprimint  _ x)) = x-getPRIMWORD     (dL->L _ (ITprimword _ x)) = x-getPRIMFLOAT    (dL->L _ (ITprimfloat x)) = x-getPRIMDOUBLE   (dL->L _ (ITprimdouble x)) = x-getTH_ID_SPLICE (dL->L _ (ITidEscape x)) = x-getTH_ID_TY_SPLICE (dL->L _ (ITidTyEscape x)) = x-getINLINE       (dL->L _ (ITinline_prag _ inl conl)) = (inl,conl)-getSPEC_INLINE  (dL->L _ (ITspec_inline_prag _ True))  = (Inline,  FunLike)-getSPEC_INLINE  (dL->L _ (ITspec_inline_prag _ False)) = (NoInline,FunLike)-getCOMPLETE_PRAGs (dL->L _ (ITcomplete_prag x)) = x--getDOCNEXT (dL->L _ (ITdocCommentNext x)) = x-getDOCPREV (dL->L _ (ITdocCommentPrev x)) = x-getDOCNAMED (dL->L _ (ITdocCommentNamed x)) = x-getDOCSECTION (dL->L _ (ITdocSection n x)) = (n, x)--getINTEGERs     (dL->L _ (ITinteger (IL src _ _))) = src-getCHARs        (dL->L _ (ITchar       src _)) = src-getSTRINGs      (dL->L _ (ITstring     src _)) = src-getPRIMCHARs    (dL->L _ (ITprimchar   src _)) = src-getPRIMSTRINGs  (dL->L _ (ITprimstring src _)) = src-getPRIMINTEGERs (dL->L _ (ITprimint    src _)) = src-getPRIMWORDs    (dL->L _ (ITprimword   src _)) = src---- See Note [Pragma source text] in BasicTypes for the following-getINLINE_PRAGs       (dL->L _ (ITinline_prag       src _ _)) = src-getSPEC_PRAGs         (dL->L _ (ITspec_prag         src))     = src-getSPEC_INLINE_PRAGs  (dL->L _ (ITspec_inline_prag  src _))   = src-getSOURCE_PRAGs       (dL->L _ (ITsource_prag       src)) = src-getRULES_PRAGs        (dL->L _ (ITrules_prag        src)) = src-getWARNING_PRAGs      (dL->L _ (ITwarning_prag      src)) = src-getDEPRECATED_PRAGs   (dL->L _ (ITdeprecated_prag   src)) = src-getSCC_PRAGs          (dL->L _ (ITscc_prag          src)) = src-getGENERATED_PRAGs    (dL->L _ (ITgenerated_prag    src)) = src-getCORE_PRAGs         (dL->L _ (ITcore_prag         src)) = src-getUNPACK_PRAGs       (dL->L _ (ITunpack_prag       src)) = src-getNOUNPACK_PRAGs     (dL->L _ (ITnounpack_prag     src)) = src-getANN_PRAGs          (dL->L _ (ITann_prag          src)) = src-getMINIMAL_PRAGs      (dL->L _ (ITminimal_prag      src)) = src-getOVERLAPPABLE_PRAGs (dL->L _ (IToverlappable_prag src)) = src-getOVERLAPPING_PRAGs  (dL->L _ (IToverlapping_prag  src)) = src-getOVERLAPS_PRAGs     (dL->L _ (IToverlaps_prag     src)) = src-getINCOHERENT_PRAGs   (dL->L _ (ITincoherent_prag   src)) = src-getCTYPEs             (dL->L _ (ITctype             src)) = src--getStringLiteral l = StringLiteral (getSTRINGs l) (getSTRING l)--isUnicode :: Located Token -> Bool-isUnicode (dL->L _ (ITforall         iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITdarrow         iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITdcolon         iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITlarrow         iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITrarrow         iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITlarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITrarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITLarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITRarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (IToparenbar      iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITcparenbar      iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITopenExpQuote _ iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITcloseQuote     iu)) = iu == UnicodeSyntax-isUnicode (dL->L _ (ITstar           iu)) = iu == UnicodeSyntax-isUnicode _                           = False--hasE :: Located Token -> Bool-hasE (dL->L _ (ITopenExpQuote HasE _)) = True-hasE (dL->L _ (ITopenTExpQuote HasE))  = True-hasE _                             = False--getSCC :: Located Token -> P FastString-getSCC lt = do let s = getSTRING lt-                   err = "Spaces are not allowed in SCCs"-               -- We probably actually want to be more restrictive than this-               if ' ' `elem` unpackFS s-                   then failSpanMsgP (getLoc lt) (text err)-                   else return s---- Utilities for combining source spans-comb2 :: (HasSrcSpan a , HasSrcSpan b) => a -> b -> SrcSpan-comb2 a b = a `seq` b `seq` combineLocs a b--comb3 :: (HasSrcSpan a , HasSrcSpan b , HasSrcSpan c) =>-         a -> b -> c -> SrcSpan-comb3 a b c = a `seq` b `seq` c `seq`-    combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLoc c))--comb4 :: (HasSrcSpan a , HasSrcSpan b , HasSrcSpan c , HasSrcSpan d) =>-         a -> b -> c -> d -> SrcSpan-comb4 a b c d = a `seq` b `seq` c `seq` d `seq`-    (combineSrcSpans (getLoc a) $ combineSrcSpans (getLoc b) $-                combineSrcSpans (getLoc c) (getLoc d))---- strict constructor version:-{-# INLINE sL #-}-sL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a-sL span a = span `seq` a `seq` cL span a---- See Note [Adding location info] for how these utility functions are used---- replaced last 3 CPP macros in this file-{-# INLINE sL0 #-}-sL0 :: HasSrcSpan a => SrcSpanLess a -> a-sL0 = cL noSrcSpan       -- #define L0   L noSrcSpan--{-# INLINE sL1 #-}-sL1 :: (HasSrcSpan a , HasSrcSpan b) => a -> SrcSpanLess b -> b-sL1 x = sL (getLoc x)   -- #define sL1   sL (getLoc $1)--{-# INLINE sLL #-}-sLL :: (HasSrcSpan a , HasSrcSpan b , HasSrcSpan c) =>-       a -> b -> SrcSpanLess c -> c-sLL x y = sL (comb2 x y) -- #define LL   sL (comb2 $1 $>)--{- Note [Adding location info]-   ~~~~~~~~~~~~~~~~~~~~~~~~~~~--This is done using the three functions below, sL0, sL1-and sLL.  Note that these functions were mechanically-converted from the three macros that used to exist before,-namely L0, L1 and LL.--They each add a SrcSpan to their argument.--   sL0  adds 'noSrcSpan', used for empty productions-     -- This doesn't seem to work anymore -=chak--   sL1  for a production with a single token on the lhs.  Grabs the SrcSpan-        from that token.--   sLL  for a production with >1 token on the lhs.  Makes up a SrcSpan from-        the first and last tokens.--These suffice for the majority of cases.  However, we must be-especially careful with empty productions: sLL won't work if the first-or last token on the lhs can represent an empty span.  In these cases,-we have to calculate the span using more of the tokens from the lhs, eg.--        | 'newtype' tycl_hdr '=' newconstr deriving-                { L (comb3 $1 $4 $5)-                    (mkTyData NewType (unLoc $2) $4 (unLoc $5)) }--We provide comb3 and comb4 functions which are useful in such cases.--Be careful: there's no checking that you actually got this right, the-only symptom will be that the SrcSpans of your syntax will be-incorrect.---}---- Make a source location for the file.  We're a bit lazy here and just--- make a point SrcSpan at line 1, column 0.  Strictly speaking we should--- try to find the span of the whole file (ToDo).-fileSrcSpan :: P SrcSpan-fileSrcSpan = do-  l <- getRealSrcLoc;-  let loc = mkSrcLoc (srcLocFile l) 1 1;-  return (mkSrcSpan loc loc)---- Hint about the MultiWayIf extension-hintMultiWayIf :: SrcSpan -> P ()-hintMultiWayIf span = do-  mwiEnabled <- getBit MultiWayIfBit-  unless mwiEnabled $ parseErrorSDoc span $-    text "Multi-way if-expressions need MultiWayIf turned on"---- Hint about if usage for beginners-hintIf :: SrcSpan -> String -> P (LHsExpr GhcPs)-hintIf span msg = do-  mwiEnabled <- getBit MultiWayIfBit-  if mwiEnabled-    then parseErrorSDoc span $ text $ "parse error in if statement"-    else parseErrorSDoc span $ text $ "parse error in if statement: "++msg---- Hint about explicit-forall-hintExplicitForall :: Located Token -> P ()-hintExplicitForall tok = do-    forall   <- getBit ExplicitForallBit-    rulePrag <- getBit InRulePragBit-    unless (forall || rulePrag) $ parseErrorSDoc (getLoc tok) $ vcat-      [ text "Illegal symbol" <+> quotes forallSymDoc <+> text "in type"-      , text "Perhaps you intended to use RankNTypes or a similar language"-      , text "extension to enable explicit-forall syntax:" <+>-        forallSymDoc <+> text "<tvs>. <type>"-      ]-  where-    forallSymDoc = text (forallSym (isUnicode tok))--checkIfBang :: LHsExpr GhcPs -> Bool-checkIfBang (dL->L _ (HsVar _ (dL->L _ op))) = op == bang_RDR-checkIfBang _ = False---- | Warn about missing space after bang-warnSpaceAfterBang :: SrcSpan -> P ()-warnSpaceAfterBang span = do-    bang_on <- getBit BangPatBit-    unless bang_on $-      addWarning Opt_WarnSpaceAfterBang span msg-    where-      msg = text "Did you forget to enable BangPatterns?" $$-            text "If you mean to bind (!) then perhaps you want" $$-            text "to add a space after the bang for clarity."---- When two single quotes don't followed by tyvar or gtycon, we report the--- error as empty character literal, or TH quote that missing proper type--- variable or constructor. See Trac #13450.-reportEmptyDoubleQuotes :: SrcSpan -> P (Located (HsExpr GhcPs))-reportEmptyDoubleQuotes span = do-    thQuotes <- getBit ThQuotesBit-    if thQuotes-      then parseErrorSDoc span $ vcat-        [ text "Parser error on `''`"-        , text "Character literals may not be empty"-        , text "Or perhaps you intended to use quotation syntax of TemplateHaskell,"-        , text "but the type variable or constructor is missing"-        ]-      else parseErrorSDoc span $ vcat-        [ text "Parser error on `''`"-        , text "Character literals may not be empty"-        ]--{--%************************************************************************-%*                                                                      *-        Helper functions for generating annotations in the parser-%*                                                                      *-%************************************************************************--For the general principles of the following routines, see Note [Api annotations]-in ApiAnnotation.hs---}---- |Construct an AddAnn from the annotation keyword and the location--- of the keyword itself-mj :: HasSrcSpan e => AnnKeywordId -> e -> AddAnn-mj a l s = addAnnotation s a (gl l)--mjL :: AnnKeywordId -> SrcSpan -> AddAnn-mjL a l s = addAnnotation s a l------ |Construct an AddAnn from the annotation keyword and the Located Token. If--- the token has a unicode equivalent and this has been used, provide the--- unicode variant of the annotation.-mu :: AnnKeywordId -> Located Token -> AddAnn-mu a lt@(dL->L l t) = (\s -> addAnnotation s (toUnicodeAnn a lt) l)---- | If the 'Token' is using its unicode variant return the unicode variant of---   the annotation-toUnicodeAnn :: AnnKeywordId -> Located Token -> AnnKeywordId-toUnicodeAnn a t = if isUnicode t then unicodeAnn a else a--gl :: HasSrcSpan a => a -> SrcSpan-gl = getLoc---- |Add an annotation to the located element, and return the located--- element as a pass through-aa :: (HasSrcSpan a , HasSrcSpan c) => a -> (AnnKeywordId, c) -> P a-aa a@(dL->L l _) (b,s) = addAnnotation l b (gl s) >> return a---- |Add an annotation to a located element resulting from a monadic action-am :: (HasSrcSpan a , HasSrcSpan b) => P a -> (AnnKeywordId, b) -> P a-am a (b,s) = do-  av@(dL->L l _) <- a-  addAnnotation l b (gl s)-  return av---- | Add a list of AddAnns to the given AST element.  For example,--- the parsing rule for @let@ looks like:------ @---      | 'let' binds 'in' exp    {% ams (sLL $1 $> $ HsLet (snd $ unLoc $2) $4)---                                       (mj AnnLet $1:mj AnnIn $3---                                         :(fst $ unLoc $2)) }--- @------ This adds an AnnLet annotation for @let@, an AnnIn for @in@, as well--- as any annotations that may arise in the binds. This will include open--- and closing braces if they are used to delimit the let expressions.----ams :: Located a -> [AddAnn] -> P (Located a)-ams a@(dL->L l _) bs = addAnnsAt l bs >> return a--amsL :: SrcSpan -> [AddAnn] -> P ()-amsL sp bs = addAnnsAt sp bs >> return ()---- |Add all [AddAnn] to an AST element wrapped in a Just-ajs a@(Just (dL->L l _)) bs = addAnnsAt l bs >> return a---- |Add a list of AddAnns to the given AST element, where the AST element is the---  result of a monadic action-amms :: HasSrcSpan a => P a -> [AddAnn] -> P a-amms a bs = do { av@(dL->L l _) <- a-               ; addAnnsAt l bs-               ; return av }---- |Add a list of AddAnns to the AST element, and return the element as a---  OrdList-amsu :: HasSrcSpan a => a -> [AddAnn] -> P (OrdList a)-amsu a@(dL->L l _) bs = addAnnsAt l bs >> return (unitOL a)---- |Synonyms for AddAnn versions of AnnOpen and AnnClose-mo,mc :: Located Token -> AddAnn-mo ll = mj AnnOpen ll-mc ll = mj AnnClose ll--moc,mcc :: Located Token -> AddAnn-moc ll = mj AnnOpenC ll-mcc ll = mj AnnCloseC ll--mop,mcp :: Located Token -> AddAnn-mop ll = mj AnnOpenP ll-mcp ll = mj AnnCloseP ll--mos,mcs :: Located Token -> AddAnn-mos ll = mj AnnOpenS ll-mcs ll = mj AnnCloseS ll---- |Given a list of the locations of commas, provide a [AddAnn] with an AnnComma---  entry for each SrcSpan-mcommas :: [SrcSpan] -> [AddAnn]-mcommas ss = map (mjL AnnCommaTuple) ss---- |Given a list of the locations of '|'s, provide a [AddAnn] with an AnnVbar---  entry for each SrcSpan-mvbars :: [SrcSpan] -> [AddAnn]-mvbars ss = map (mjL AnnVbar) ss---- |Get the location of the last element of a OrdList, or noSrcSpan-oll :: HasSrcSpan a => OrdList a -> SrcSpan-oll l =-  if isNilOL l then noSrcSpan-               else getLoc (lastOL l)---- |Add a semicolon annotation in the right place in a list. If the--- leading list is empty, add it to the tail-asl :: (HasSrcSpan a , HasSrcSpan b) => [a] -> b -> a -> P()-asl [] (dL->L ls _) (dL->L l _) = addAnnotation l          AnnSemi ls-asl (x:_xs) (dL->L ls _) _x = addAnnotation (getLoc x) AnnSemi ls-{-# LINE 1 "templates/GenericTemplate.hs" #-}-{-# LINE 1 "templates/GenericTemplate.hs" #-}-{-# LINE 1 "<built-in>" #-}-{-# LINE 1 "<command-line>" #-}-{-# LINE 10 "<command-line>" #-}-# 1 "/usr/include/stdc-predef.h" 1 3 4--# 17 "/usr/include/stdc-predef.h" 3 4----------------------------------------------{-# LINE 10 "<command-line>" #-}-{-# LINE 1 "/opt/ghc/8.4.4/lib/ghc-8.4.4/include/ghcversion.h" #-}----------------{-# LINE 10 "<command-line>" #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE ScopedTypeVariables #-}++-- | This module provides the generated Happy parser for Haskell. It exports+-- a number of parsers which may be used in any library that uses the GHC API.+-- A common usage pattern is to initialize the parser state with a given string+-- and then parse that string:+--+-- @+--     runParser :: DynFlags -> String -> P a -> ParseResult a+--     runParser flags str parser = unP parser parseState+--     where+--       filename = "\<interactive\>"+--       location = mkRealSrcLoc (mkFastString filename) 1 1+--       buffer = stringToStringBuffer str+--       parseState = mkPState flags buffer location+-- @+module Parser (parseModule, parseSignature, parseImport, parseStatement, parseBackpack,+               parseDeclaration, parseExpression, parsePattern,+               parseTypeSignature,+               parseStmt, parseIdentifier,+               parseType, parseHeader) where++-- base+import Control.Monad    ( unless, liftM, when, (<=<) )+import GHC.Exts+import Data.Char+import Data.Maybe       ( maybeToList )+import Control.Monad    ( mplus )+import Control.Applicative ((<$))+import qualified Prelude++-- compiler/hsSyn+import GHC.Hs++-- compiler/main+import DriverPhases     ( HscSource(..) )+import HscTypes         ( IsBootInterface, WarningTxt(..) )+import DynFlags+import BkpSyn+import PackageConfig++-- compiler/utils+import OrdList+import BooleanFormula   ( BooleanFormula(..), LBooleanFormula(..), mkTrue )+import FastString+import Maybes           ( isJust, orElse )+import Outputable++-- compiler/basicTypes+import RdrName+import OccName          ( varName, dataName, tcClsName, tvName, startsWithUnderscore )+import DataCon          ( DataCon, dataConName )+import SrcLoc+import Module+import BasicTypes++-- compiler/types+import Type             ( funTyCon )+import Class            ( FunDep )++-- compiler/parser+import RdrHsSyn+import Lexer+import HaddockUtils+import ApiAnnotation++-- compiler/typecheck+import TcEvidence       ( emptyTcEvBinds )++-- compiler/prelude+import ForeignCall+import TysPrim          ( eqPrimTyCon )+import TysWiredIn       ( unitTyCon, unitDataCon, tupleTyCon, tupleDataCon, nilDataCon,+                          unboxedUnitTyCon, unboxedUnitDataCon,+                          listTyCon_RDR, consDataCon_RDR, eqTyCon_RDR )++-- compiler/utils+import Util             ( looksLikePackageName, fstOf3, sndOf3, thdOf3 )+import GhcPrelude+import qualified Data.Array as Happy_Data_Array+import qualified Data.Bits as Bits+import qualified GHC.Exts as Happy_GHC_Exts+import Control.Applicative(Applicative(..))+import Control.Monad (ap)++-- parser produced by Happy Version 1.19.11++newtype HappyAbsSyn  = HappyAbsSyn HappyAny+#if __GLASGOW_HASKELL__ >= 607+type HappyAny = Happy_GHC_Exts.Any+#else+type HappyAny = forall a . a+#endif+newtype HappyWrap16 = HappyWrap16 (Located RdrName)+happyIn16 :: (Located RdrName) -> (HappyAbsSyn )+happyIn16 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap16 x)+{-# INLINE happyIn16 #-}+happyOut16 :: (HappyAbsSyn ) -> HappyWrap16+happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut16 #-}+newtype HappyWrap17 = HappyWrap17 ([LHsUnit PackageName])+happyIn17 :: ([LHsUnit PackageName]) -> (HappyAbsSyn )+happyIn17 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap17 x)+{-# INLINE happyIn17 #-}+happyOut17 :: (HappyAbsSyn ) -> HappyWrap17+happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut17 #-}+newtype HappyWrap18 = HappyWrap18 (OrdList (LHsUnit PackageName))+happyIn18 :: (OrdList (LHsUnit PackageName)) -> (HappyAbsSyn )+happyIn18 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap18 x)+{-# INLINE happyIn18 #-}+happyOut18 :: (HappyAbsSyn ) -> HappyWrap18+happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut18 #-}+newtype HappyWrap19 = HappyWrap19 (LHsUnit PackageName)+happyIn19 :: (LHsUnit PackageName) -> (HappyAbsSyn )+happyIn19 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap19 x)+{-# INLINE happyIn19 #-}+happyOut19 :: (HappyAbsSyn ) -> HappyWrap19+happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut19 #-}+newtype HappyWrap20 = HappyWrap20 (LHsUnitId PackageName)+happyIn20 :: (LHsUnitId PackageName) -> (HappyAbsSyn )+happyIn20 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap20 x)+{-# INLINE happyIn20 #-}+happyOut20 :: (HappyAbsSyn ) -> HappyWrap20+happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut20 #-}+newtype HappyWrap21 = HappyWrap21 (OrdList (LHsModuleSubst PackageName))+happyIn21 :: (OrdList (LHsModuleSubst PackageName)) -> (HappyAbsSyn )+happyIn21 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap21 x)+{-# INLINE happyIn21 #-}+happyOut21 :: (HappyAbsSyn ) -> HappyWrap21+happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut21 #-}+newtype HappyWrap22 = HappyWrap22 (LHsModuleSubst PackageName)+happyIn22 :: (LHsModuleSubst PackageName) -> (HappyAbsSyn )+happyIn22 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap22 x)+{-# INLINE happyIn22 #-}+happyOut22 :: (HappyAbsSyn ) -> HappyWrap22+happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut22 #-}+newtype HappyWrap23 = HappyWrap23 (LHsModuleId PackageName)+happyIn23 :: (LHsModuleId PackageName) -> (HappyAbsSyn )+happyIn23 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap23 x)+{-# INLINE happyIn23 #-}+happyOut23 :: (HappyAbsSyn ) -> HappyWrap23+happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut23 #-}+newtype HappyWrap24 = HappyWrap24 (Located PackageName)+happyIn24 :: (Located PackageName) -> (HappyAbsSyn )+happyIn24 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap24 x)+{-# INLINE happyIn24 #-}+happyOut24 :: (HappyAbsSyn ) -> HappyWrap24+happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut24 #-}+newtype HappyWrap25 = HappyWrap25 (Located FastString)+happyIn25 :: (Located FastString) -> (HappyAbsSyn )+happyIn25 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap25 x)+{-# INLINE happyIn25 #-}+happyOut25 :: (HappyAbsSyn ) -> HappyWrap25+happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut25 #-}+newtype HappyWrap26 = HappyWrap26 (Located FastString)+happyIn26 :: (Located FastString) -> (HappyAbsSyn )+happyIn26 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap26 x)+{-# INLINE happyIn26 #-}+happyOut26 :: (HappyAbsSyn ) -> HappyWrap26+happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut26 #-}+newtype HappyWrap27 = HappyWrap27 (Maybe [LRenaming])+happyIn27 :: (Maybe [LRenaming]) -> (HappyAbsSyn )+happyIn27 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap27 x)+{-# INLINE happyIn27 #-}+happyOut27 :: (HappyAbsSyn ) -> HappyWrap27+happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut27 #-}+newtype HappyWrap28 = HappyWrap28 (OrdList LRenaming)+happyIn28 :: (OrdList LRenaming) -> (HappyAbsSyn )+happyIn28 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap28 x)+{-# INLINE happyIn28 #-}+happyOut28 :: (HappyAbsSyn ) -> HappyWrap28+happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut28 #-}+newtype HappyWrap29 = HappyWrap29 (LRenaming)+happyIn29 :: (LRenaming) -> (HappyAbsSyn )+happyIn29 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap29 x)+{-# INLINE happyIn29 #-}+happyOut29 :: (HappyAbsSyn ) -> HappyWrap29+happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut29 #-}+newtype HappyWrap30 = HappyWrap30 (OrdList (LHsUnitDecl PackageName))+happyIn30 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )+happyIn30 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap30 x)+{-# INLINE happyIn30 #-}+happyOut30 :: (HappyAbsSyn ) -> HappyWrap30+happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut30 #-}+newtype HappyWrap31 = HappyWrap31 (OrdList (LHsUnitDecl PackageName))+happyIn31 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )+happyIn31 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap31 x)+{-# INLINE happyIn31 #-}+happyOut31 :: (HappyAbsSyn ) -> HappyWrap31+happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut31 #-}+newtype HappyWrap32 = HappyWrap32 (LHsUnitDecl PackageName)+happyIn32 :: (LHsUnitDecl PackageName) -> (HappyAbsSyn )+happyIn32 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap32 x)+{-# INLINE happyIn32 #-}+happyOut32 :: (HappyAbsSyn ) -> HappyWrap32+happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut32 #-}+newtype HappyWrap33 = HappyWrap33 (Located (HsModule GhcPs))+happyIn33 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )+happyIn33 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap33 x)+{-# INLINE happyIn33 #-}+happyOut33 :: (HappyAbsSyn ) -> HappyWrap33+happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut33 #-}+newtype HappyWrap34 = HappyWrap34 (Located (HsModule GhcPs))+happyIn34 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )+happyIn34 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap34 x)+{-# INLINE happyIn34 #-}+happyOut34 :: (HappyAbsSyn ) -> HappyWrap34+happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut34 #-}+newtype HappyWrap35 = HappyWrap35 (Maybe LHsDocString)+happyIn35 :: (Maybe LHsDocString) -> (HappyAbsSyn )+happyIn35 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap35 x)+{-# INLINE happyIn35 #-}+happyOut35 :: (HappyAbsSyn ) -> HappyWrap35+happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut35 #-}+newtype HappyWrap36 = HappyWrap36 (())+happyIn36 :: (()) -> (HappyAbsSyn )+happyIn36 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap36 x)+{-# INLINE happyIn36 #-}+happyOut36 :: (HappyAbsSyn ) -> HappyWrap36+happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut36 #-}+newtype HappyWrap37 = HappyWrap37 (())+happyIn37 :: (()) -> (HappyAbsSyn )+happyIn37 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap37 x)+{-# INLINE happyIn37 #-}+happyOut37 :: (HappyAbsSyn ) -> HappyWrap37+happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut37 #-}+newtype HappyWrap38 = HappyWrap38 (Maybe (Located WarningTxt))+happyIn38 :: (Maybe (Located WarningTxt)) -> (HappyAbsSyn )+happyIn38 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap38 x)+{-# INLINE happyIn38 #-}+happyOut38 :: (HappyAbsSyn ) -> HappyWrap38+happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut38 #-}+newtype HappyWrap39 = HappyWrap39 (([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))+happyIn39 :: (([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )+happyIn39 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap39 x)+{-# INLINE happyIn39 #-}+happyOut39 :: (HappyAbsSyn ) -> HappyWrap39+happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut39 #-}+newtype HappyWrap40 = HappyWrap40 (([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))+happyIn40 :: (([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )+happyIn40 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap40 x)+{-# INLINE happyIn40 #-}+happyOut40 :: (HappyAbsSyn ) -> HappyWrap40+happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut40 #-}+newtype HappyWrap41 = HappyWrap41 (([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))+happyIn41 :: (([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )+happyIn41 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap41 x)+{-# INLINE happyIn41 #-}+happyOut41 :: (HappyAbsSyn ) -> HappyWrap41+happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut41 #-}+newtype HappyWrap42 = HappyWrap42 (([LImportDecl GhcPs], [LHsDecl GhcPs]))+happyIn42 :: (([LImportDecl GhcPs], [LHsDecl GhcPs])) -> (HappyAbsSyn )+happyIn42 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap42 x)+{-# INLINE happyIn42 #-}+happyOut42 :: (HappyAbsSyn ) -> HappyWrap42+happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut42 #-}+newtype HappyWrap43 = HappyWrap43 (Located (HsModule GhcPs))+happyIn43 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )+happyIn43 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap43 x)+{-# INLINE happyIn43 #-}+happyOut43 :: (HappyAbsSyn ) -> HappyWrap43+happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut43 #-}+newtype HappyWrap44 = HappyWrap44 ([LImportDecl GhcPs])+happyIn44 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn44 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap44 x)+{-# INLINE happyIn44 #-}+happyOut44 :: (HappyAbsSyn ) -> HappyWrap44+happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut44 #-}+newtype HappyWrap45 = HappyWrap45 ([LImportDecl GhcPs])+happyIn45 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn45 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap45 x)+{-# INLINE happyIn45 #-}+happyOut45 :: (HappyAbsSyn ) -> HappyWrap45+happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut45 #-}+newtype HappyWrap46 = HappyWrap46 ([LImportDecl GhcPs])+happyIn46 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn46 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap46 x)+{-# INLINE happyIn46 #-}+happyOut46 :: (HappyAbsSyn ) -> HappyWrap46+happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut46 #-}+newtype HappyWrap47 = HappyWrap47 ([LImportDecl GhcPs])+happyIn47 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn47 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap47 x)+{-# INLINE happyIn47 #-}+happyOut47 :: (HappyAbsSyn ) -> HappyWrap47+happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut47 #-}+newtype HappyWrap48 = HappyWrap48 ((Maybe (Located [LIE GhcPs])))+happyIn48 :: ((Maybe (Located [LIE GhcPs]))) -> (HappyAbsSyn )+happyIn48 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap48 x)+{-# INLINE happyIn48 #-}+happyOut48 :: (HappyAbsSyn ) -> HappyWrap48+happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut48 #-}+newtype HappyWrap49 = HappyWrap49 (OrdList (LIE GhcPs))+happyIn49 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn49 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap49 x)+{-# INLINE happyIn49 #-}+happyOut49 :: (HappyAbsSyn ) -> HappyWrap49+happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut49 #-}+newtype HappyWrap50 = HappyWrap50 (OrdList (LIE GhcPs))+happyIn50 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn50 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap50 x)+{-# INLINE happyIn50 #-}+happyOut50 :: (HappyAbsSyn ) -> HappyWrap50+happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut50 #-}+newtype HappyWrap51 = HappyWrap51 (OrdList (LIE GhcPs))+happyIn51 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn51 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap51 x)+{-# INLINE happyIn51 #-}+happyOut51 :: (HappyAbsSyn ) -> HappyWrap51+happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut51 #-}+newtype HappyWrap52 = HappyWrap52 (OrdList (LIE GhcPs))+happyIn52 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn52 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap52 x)+{-# INLINE happyIn52 #-}+happyOut52 :: (HappyAbsSyn ) -> HappyWrap52+happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut52 #-}+newtype HappyWrap53 = HappyWrap53 (OrdList (LIE GhcPs))+happyIn53 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )+happyIn53 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap53 x)+{-# INLINE happyIn53 #-}+happyOut53 :: (HappyAbsSyn ) -> HappyWrap53+happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut53 #-}+newtype HappyWrap54 = HappyWrap54 (Located ([AddAnn],ImpExpSubSpec))+happyIn54 :: (Located ([AddAnn],ImpExpSubSpec)) -> (HappyAbsSyn )+happyIn54 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap54 x)+{-# INLINE happyIn54 #-}+happyOut54 :: (HappyAbsSyn ) -> HappyWrap54+happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut54 #-}+newtype HappyWrap55 = HappyWrap55 (([AddAnn], [Located ImpExpQcSpec]))+happyIn55 :: (([AddAnn], [Located ImpExpQcSpec])) -> (HappyAbsSyn )+happyIn55 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap55 x)+{-# INLINE happyIn55 #-}+happyOut55 :: (HappyAbsSyn ) -> HappyWrap55+happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut55 #-}+newtype HappyWrap56 = HappyWrap56 (([AddAnn], [Located ImpExpQcSpec]))+happyIn56 :: (([AddAnn], [Located ImpExpQcSpec])) -> (HappyAbsSyn )+happyIn56 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap56 x)+{-# INLINE happyIn56 #-}+happyOut56 :: (HappyAbsSyn ) -> HappyWrap56+happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut56 #-}+newtype HappyWrap57 = HappyWrap57 (Located ([AddAnn], Located ImpExpQcSpec))+happyIn57 :: (Located ([AddAnn], Located ImpExpQcSpec)) -> (HappyAbsSyn )+happyIn57 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap57 x)+{-# INLINE happyIn57 #-}+happyOut57 :: (HappyAbsSyn ) -> HappyWrap57+happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut57 #-}+newtype HappyWrap58 = HappyWrap58 (Located ImpExpQcSpec)+happyIn58 :: (Located ImpExpQcSpec) -> (HappyAbsSyn )+happyIn58 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap58 x)+{-# INLINE happyIn58 #-}+happyOut58 :: (HappyAbsSyn ) -> HappyWrap58+happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut58 #-}+newtype HappyWrap59 = HappyWrap59 (Located RdrName)+happyIn59 :: (Located RdrName) -> (HappyAbsSyn )+happyIn59 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap59 x)+{-# INLINE happyIn59 #-}+happyOut59 :: (HappyAbsSyn ) -> HappyWrap59+happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut59 #-}+newtype HappyWrap60 = HappyWrap60 ([AddAnn])+happyIn60 :: ([AddAnn]) -> (HappyAbsSyn )+happyIn60 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap60 x)+{-# INLINE happyIn60 #-}+happyOut60 :: (HappyAbsSyn ) -> HappyWrap60+happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut60 #-}+newtype HappyWrap61 = HappyWrap61 ([AddAnn])+happyIn61 :: ([AddAnn]) -> (HappyAbsSyn )+happyIn61 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap61 x)+{-# INLINE happyIn61 #-}+happyOut61 :: (HappyAbsSyn ) -> HappyWrap61+happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut61 #-}+newtype HappyWrap62 = HappyWrap62 ([LImportDecl GhcPs])+happyIn62 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn62 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap62 x)+{-# INLINE happyIn62 #-}+happyOut62 :: (HappyAbsSyn ) -> HappyWrap62+happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut62 #-}+newtype HappyWrap63 = HappyWrap63 ([LImportDecl GhcPs])+happyIn63 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )+happyIn63 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap63 x)+{-# INLINE happyIn63 #-}+happyOut63 :: (HappyAbsSyn ) -> HappyWrap63+happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut63 #-}+newtype HappyWrap64 = HappyWrap64 (LImportDecl GhcPs)+happyIn64 :: (LImportDecl GhcPs) -> (HappyAbsSyn )+happyIn64 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap64 x)+{-# INLINE happyIn64 #-}+happyOut64 :: (HappyAbsSyn ) -> HappyWrap64+happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut64 #-}+newtype HappyWrap65 = HappyWrap65 ((([AddAnn],SourceText),IsBootInterface))+happyIn65 :: ((([AddAnn],SourceText),IsBootInterface)) -> (HappyAbsSyn )+happyIn65 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap65 x)+{-# INLINE happyIn65 #-}+happyOut65 :: (HappyAbsSyn ) -> HappyWrap65+happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut65 #-}+newtype HappyWrap66 = HappyWrap66 (([AddAnn],Bool))+happyIn66 :: (([AddAnn],Bool)) -> (HappyAbsSyn )+happyIn66 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap66 x)+{-# INLINE happyIn66 #-}+happyOut66 :: (HappyAbsSyn ) -> HappyWrap66+happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut66 #-}+newtype HappyWrap67 = HappyWrap67 (([AddAnn],Maybe StringLiteral))+happyIn67 :: (([AddAnn],Maybe StringLiteral)) -> (HappyAbsSyn )+happyIn67 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap67 x)+{-# INLINE happyIn67 #-}+happyOut67 :: (HappyAbsSyn ) -> HappyWrap67+happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut67 #-}+newtype HappyWrap68 = HappyWrap68 (Maybe (Located Token))+happyIn68 :: (Maybe (Located Token)) -> (HappyAbsSyn )+happyIn68 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap68 x)+{-# INLINE happyIn68 #-}+happyOut68 :: (HappyAbsSyn ) -> HappyWrap68+happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut68 #-}+newtype HappyWrap69 = HappyWrap69 (([AddAnn],Located (Maybe (Located ModuleName))))+happyIn69 :: (([AddAnn],Located (Maybe (Located ModuleName)))) -> (HappyAbsSyn )+happyIn69 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap69 x)+{-# INLINE happyIn69 #-}+happyOut69 :: (HappyAbsSyn ) -> HappyWrap69+happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut69 #-}+newtype HappyWrap70 = HappyWrap70 (Located (Maybe (Bool, Located [LIE GhcPs])))+happyIn70 :: (Located (Maybe (Bool, Located [LIE GhcPs]))) -> (HappyAbsSyn )+happyIn70 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap70 x)+{-# INLINE happyIn70 #-}+happyOut70 :: (HappyAbsSyn ) -> HappyWrap70+happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut70 #-}+newtype HappyWrap71 = HappyWrap71 (Located (Bool, Located [LIE GhcPs]))+happyIn71 :: (Located (Bool, Located [LIE GhcPs])) -> (HappyAbsSyn )+happyIn71 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap71 x)+{-# INLINE happyIn71 #-}+happyOut71 :: (HappyAbsSyn ) -> HappyWrap71+happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut71 #-}+newtype HappyWrap72 = HappyWrap72 (Located (SourceText,Int))+happyIn72 :: (Located (SourceText,Int)) -> (HappyAbsSyn )+happyIn72 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap72 x)+{-# INLINE happyIn72 #-}+happyOut72 :: (HappyAbsSyn ) -> HappyWrap72+happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut72 #-}+newtype HappyWrap73 = HappyWrap73 (Located FixityDirection)+happyIn73 :: (Located FixityDirection) -> (HappyAbsSyn )+happyIn73 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap73 x)+{-# INLINE happyIn73 #-}+happyOut73 :: (HappyAbsSyn ) -> HappyWrap73+happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut73 #-}+newtype HappyWrap74 = HappyWrap74 (Located (OrdList (Located RdrName)))+happyIn74 :: (Located (OrdList (Located RdrName))) -> (HappyAbsSyn )+happyIn74 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap74 x)+{-# INLINE happyIn74 #-}+happyOut74 :: (HappyAbsSyn ) -> HappyWrap74+happyOut74 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut74 #-}+newtype HappyWrap75 = HappyWrap75 (OrdList (LHsDecl GhcPs))+happyIn75 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )+happyIn75 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap75 x)+{-# INLINE happyIn75 #-}+happyOut75 :: (HappyAbsSyn ) -> HappyWrap75+happyOut75 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut75 #-}+newtype HappyWrap76 = HappyWrap76 (OrdList (LHsDecl GhcPs))+happyIn76 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )+happyIn76 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap76 x)+{-# INLINE happyIn76 #-}+happyOut76 :: (HappyAbsSyn ) -> HappyWrap76+happyOut76 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut76 #-}+newtype HappyWrap77 = HappyWrap77 (LHsDecl GhcPs)+happyIn77 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn77 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap77 x)+{-# INLINE happyIn77 #-}+happyOut77 :: (HappyAbsSyn ) -> HappyWrap77+happyOut77 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut77 #-}+newtype HappyWrap78 = HappyWrap78 (LTyClDecl GhcPs)+happyIn78 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )+happyIn78 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap78 x)+{-# INLINE happyIn78 #-}+happyOut78 :: (HappyAbsSyn ) -> HappyWrap78+happyOut78 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut78 #-}+newtype HappyWrap79 = HappyWrap79 (LTyClDecl GhcPs)+happyIn79 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )+happyIn79 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap79 x)+{-# INLINE happyIn79 #-}+happyOut79 :: (HappyAbsSyn ) -> HappyWrap79+happyOut79 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut79 #-}+newtype HappyWrap80 = HappyWrap80 (LStandaloneKindSig GhcPs)+happyIn80 :: (LStandaloneKindSig GhcPs) -> (HappyAbsSyn )+happyIn80 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap80 x)+{-# INLINE happyIn80 #-}+happyOut80 :: (HappyAbsSyn ) -> HappyWrap80+happyOut80 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut80 #-}+newtype HappyWrap81 = HappyWrap81 (Located [Located RdrName])+happyIn81 :: (Located [Located RdrName]) -> (HappyAbsSyn )+happyIn81 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap81 x)+{-# INLINE happyIn81 #-}+happyOut81 :: (HappyAbsSyn ) -> HappyWrap81+happyOut81 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut81 #-}+newtype HappyWrap82 = HappyWrap82 (LInstDecl GhcPs)+happyIn82 :: (LInstDecl GhcPs) -> (HappyAbsSyn )+happyIn82 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap82 x)+{-# INLINE happyIn82 #-}+happyOut82 :: (HappyAbsSyn ) -> HappyWrap82+happyOut82 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut82 #-}+newtype HappyWrap83 = HappyWrap83 (Maybe (Located OverlapMode))+happyIn83 :: (Maybe (Located OverlapMode)) -> (HappyAbsSyn )+happyIn83 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap83 x)+{-# INLINE happyIn83 #-}+happyOut83 :: (HappyAbsSyn ) -> HappyWrap83+happyOut83 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut83 #-}+newtype HappyWrap84 = HappyWrap84 (LDerivStrategy GhcPs)+happyIn84 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )+happyIn84 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap84 x)+{-# INLINE happyIn84 #-}+happyOut84 :: (HappyAbsSyn ) -> HappyWrap84+happyOut84 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut84 #-}+newtype HappyWrap85 = HappyWrap85 (LDerivStrategy GhcPs)+happyIn85 :: (LDerivStrategy GhcPs) -> (HappyAbsSyn )+happyIn85 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap85 x)+{-# INLINE happyIn85 #-}+happyOut85 :: (HappyAbsSyn ) -> HappyWrap85+happyOut85 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut85 #-}+newtype HappyWrap86 = HappyWrap86 (Maybe (LDerivStrategy GhcPs))+happyIn86 :: (Maybe (LDerivStrategy GhcPs)) -> (HappyAbsSyn )+happyIn86 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap86 x)+{-# INLINE happyIn86 #-}+happyOut86 :: (HappyAbsSyn ) -> HappyWrap86+happyOut86 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut86 #-}+newtype HappyWrap87 = HappyWrap87 (Located ([AddAnn], Maybe (LInjectivityAnn GhcPs)))+happyIn87 :: (Located ([AddAnn], Maybe (LInjectivityAnn GhcPs))) -> (HappyAbsSyn )+happyIn87 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap87 x)+{-# INLINE happyIn87 #-}+happyOut87 :: (HappyAbsSyn ) -> HappyWrap87+happyOut87 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut87 #-}+newtype HappyWrap88 = HappyWrap88 (LInjectivityAnn GhcPs)+happyIn88 :: (LInjectivityAnn GhcPs) -> (HappyAbsSyn )+happyIn88 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap88 x)+{-# INLINE happyIn88 #-}+happyOut88 :: (HappyAbsSyn ) -> HappyWrap88+happyOut88 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut88 #-}+newtype HappyWrap89 = HappyWrap89 (Located [Located RdrName])+happyIn89 :: (Located [Located RdrName]) -> (HappyAbsSyn )+happyIn89 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap89 x)+{-# INLINE happyIn89 #-}+happyOut89 :: (HappyAbsSyn ) -> HappyWrap89+happyOut89 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut89 #-}+newtype HappyWrap90 = HappyWrap90 (Located ([AddAnn],FamilyInfo GhcPs))+happyIn90 :: (Located ([AddAnn],FamilyInfo GhcPs)) -> (HappyAbsSyn )+happyIn90 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap90 x)+{-# INLINE happyIn90 #-}+happyOut90 :: (HappyAbsSyn ) -> HappyWrap90+happyOut90 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut90 #-}+newtype HappyWrap91 = HappyWrap91 (Located ([AddAnn],Maybe [LTyFamInstEqn GhcPs]))+happyIn91 :: (Located ([AddAnn],Maybe [LTyFamInstEqn GhcPs])) -> (HappyAbsSyn )+happyIn91 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap91 x)+{-# INLINE happyIn91 #-}+happyOut91 :: (HappyAbsSyn ) -> HappyWrap91+happyOut91 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut91 #-}+newtype HappyWrap92 = HappyWrap92 (Located [LTyFamInstEqn GhcPs])+happyIn92 :: (Located [LTyFamInstEqn GhcPs]) -> (HappyAbsSyn )+happyIn92 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap92 x)+{-# INLINE happyIn92 #-}+happyOut92 :: (HappyAbsSyn ) -> HappyWrap92+happyOut92 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut92 #-}+newtype HappyWrap93 = HappyWrap93 (Located ([AddAnn],TyFamInstEqn GhcPs))+happyIn93 :: (Located ([AddAnn],TyFamInstEqn GhcPs)) -> (HappyAbsSyn )+happyIn93 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap93 x)+{-# INLINE happyIn93 #-}+happyOut93 :: (HappyAbsSyn ) -> HappyWrap93+happyOut93 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut93 #-}+newtype HappyWrap94 = HappyWrap94 (LHsDecl GhcPs)+happyIn94 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn94 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap94 x)+{-# INLINE happyIn94 #-}+happyOut94 :: (HappyAbsSyn ) -> HappyWrap94+happyOut94 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut94 #-}+newtype HappyWrap95 = HappyWrap95 ([AddAnn])+happyIn95 :: ([AddAnn]) -> (HappyAbsSyn )+happyIn95 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap95 x)+{-# INLINE happyIn95 #-}+happyOut95 :: (HappyAbsSyn ) -> HappyWrap95+happyOut95 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut95 #-}+newtype HappyWrap96 = HappyWrap96 ([AddAnn])+happyIn96 :: ([AddAnn]) -> (HappyAbsSyn )+happyIn96 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap96 x)+{-# INLINE happyIn96 #-}+happyOut96 :: (HappyAbsSyn ) -> HappyWrap96+happyOut96 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut96 #-}+newtype HappyWrap97 = HappyWrap97 (LInstDecl GhcPs)+happyIn97 :: (LInstDecl GhcPs) -> (HappyAbsSyn )+happyIn97 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap97 x)+{-# INLINE happyIn97 #-}+happyOut97 :: (HappyAbsSyn ) -> HappyWrap97+happyOut97 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut97 #-}+newtype HappyWrap98 = HappyWrap98 (Located (AddAnn, NewOrData))+happyIn98 :: (Located (AddAnn, NewOrData)) -> (HappyAbsSyn )+happyIn98 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap98 x)+{-# INLINE happyIn98 #-}+happyOut98 :: (HappyAbsSyn ) -> HappyWrap98+happyOut98 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut98 #-}+newtype HappyWrap99 = HappyWrap99 (Located ([AddAnn], Maybe (LHsKind GhcPs)))+happyIn99 :: (Located ([AddAnn], Maybe (LHsKind GhcPs))) -> (HappyAbsSyn )+happyIn99 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap99 x)+{-# INLINE happyIn99 #-}+happyOut99 :: (HappyAbsSyn ) -> HappyWrap99+happyOut99 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut99 #-}+newtype HappyWrap100 = HappyWrap100 (Located ([AddAnn], LFamilyResultSig GhcPs))+happyIn100 :: (Located ([AddAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )+happyIn100 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap100 x)+{-# INLINE happyIn100 #-}+happyOut100 :: (HappyAbsSyn ) -> HappyWrap100+happyOut100 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut100 #-}+newtype HappyWrap101 = HappyWrap101 (Located ([AddAnn], LFamilyResultSig GhcPs))+happyIn101 :: (Located ([AddAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )+happyIn101 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap101 x)+{-# INLINE happyIn101 #-}+happyOut101 :: (HappyAbsSyn ) -> HappyWrap101+happyOut101 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut101 #-}+newtype HappyWrap102 = HappyWrap102 (Located ([AddAnn], ( LFamilyResultSig GhcPs+                                            , Maybe (LInjectivityAnn GhcPs))))+happyIn102 :: (Located ([AddAnn], ( LFamilyResultSig GhcPs+                                            , Maybe (LInjectivityAnn GhcPs)))) -> (HappyAbsSyn )+happyIn102 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap102 x)+{-# INLINE happyIn102 #-}+happyOut102 :: (HappyAbsSyn ) -> HappyWrap102+happyOut102 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut102 #-}+newtype HappyWrap103 = HappyWrap103 (Located (Maybe (LHsContext GhcPs), LHsType GhcPs))+happyIn103 :: (Located (Maybe (LHsContext GhcPs), LHsType GhcPs)) -> (HappyAbsSyn )+happyIn103 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap103 x)+{-# INLINE happyIn103 #-}+happyOut103 :: (HappyAbsSyn ) -> HappyWrap103+happyOut103 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut103 #-}+newtype HappyWrap104 = HappyWrap104 (Located ([AddAnn],(Maybe (LHsContext GhcPs), Maybe [LHsTyVarBndr GhcPs], LHsType GhcPs)))+happyIn104 :: (Located ([AddAnn],(Maybe (LHsContext GhcPs), Maybe [LHsTyVarBndr GhcPs], LHsType GhcPs))) -> (HappyAbsSyn )+happyIn104 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap104 x)+{-# INLINE happyIn104 #-}+happyOut104 :: (HappyAbsSyn ) -> HappyWrap104+happyOut104 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut104 #-}+newtype HappyWrap105 = HappyWrap105 (Maybe (Located CType))+happyIn105 :: (Maybe (Located CType)) -> (HappyAbsSyn )+happyIn105 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap105 x)+{-# INLINE happyIn105 #-}+happyOut105 :: (HappyAbsSyn ) -> HappyWrap105+happyOut105 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut105 #-}+newtype HappyWrap106 = HappyWrap106 (LDerivDecl GhcPs)+happyIn106 :: (LDerivDecl GhcPs) -> (HappyAbsSyn )+happyIn106 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap106 x)+{-# INLINE happyIn106 #-}+happyOut106 :: (HappyAbsSyn ) -> HappyWrap106+happyOut106 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut106 #-}+newtype HappyWrap107 = HappyWrap107 (LRoleAnnotDecl GhcPs)+happyIn107 :: (LRoleAnnotDecl GhcPs) -> (HappyAbsSyn )+happyIn107 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap107 x)+{-# INLINE happyIn107 #-}+happyOut107 :: (HappyAbsSyn ) -> HappyWrap107+happyOut107 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut107 #-}+newtype HappyWrap108 = HappyWrap108 (Located [Located (Maybe FastString)])+happyIn108 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )+happyIn108 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap108 x)+{-# INLINE happyIn108 #-}+happyOut108 :: (HappyAbsSyn ) -> HappyWrap108+happyOut108 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut108 #-}+newtype HappyWrap109 = HappyWrap109 (Located [Located (Maybe FastString)])+happyIn109 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )+happyIn109 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap109 x)+{-# INLINE happyIn109 #-}+happyOut109 :: (HappyAbsSyn ) -> HappyWrap109+happyOut109 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut109 #-}+newtype HappyWrap110 = HappyWrap110 (Located (Maybe FastString))+happyIn110 :: (Located (Maybe FastString)) -> (HappyAbsSyn )+happyIn110 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap110 x)+{-# INLINE happyIn110 #-}+happyOut110 :: (HappyAbsSyn ) -> HappyWrap110+happyOut110 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut110 #-}+newtype HappyWrap111 = HappyWrap111 (LHsDecl GhcPs)+happyIn111 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn111 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap111 x)+{-# INLINE happyIn111 #-}+happyOut111 :: (HappyAbsSyn ) -> HappyWrap111+happyOut111 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut111 #-}+newtype HappyWrap112 = HappyWrap112 ((Located RdrName, HsPatSynDetails (Located RdrName), [AddAnn]))+happyIn112 :: ((Located RdrName, HsPatSynDetails (Located RdrName), [AddAnn])) -> (HappyAbsSyn )+happyIn112 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap112 x)+{-# INLINE happyIn112 #-}+happyOut112 :: (HappyAbsSyn ) -> HappyWrap112+happyOut112 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut112 #-}+newtype HappyWrap113 = HappyWrap113 ([Located RdrName])+happyIn113 :: ([Located RdrName]) -> (HappyAbsSyn )+happyIn113 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap113 x)+{-# INLINE happyIn113 #-}+happyOut113 :: (HappyAbsSyn ) -> HappyWrap113+happyOut113 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut113 #-}+newtype HappyWrap114 = HappyWrap114 ([RecordPatSynField (Located RdrName)])+happyIn114 :: ([RecordPatSynField (Located RdrName)]) -> (HappyAbsSyn )+happyIn114 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap114 x)+{-# INLINE happyIn114 #-}+happyOut114 :: (HappyAbsSyn ) -> HappyWrap114+happyOut114 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut114 #-}+newtype HappyWrap115 = HappyWrap115 (Located ([AddAnn]+                         , Located (OrdList (LHsDecl GhcPs))))+happyIn115 :: (Located ([AddAnn]+                         , Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )+happyIn115 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap115 x)+{-# INLINE happyIn115 #-}+happyOut115 :: (HappyAbsSyn ) -> HappyWrap115+happyOut115 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut115 #-}+newtype HappyWrap116 = HappyWrap116 (LSig GhcPs)+happyIn116 :: (LSig GhcPs) -> (HappyAbsSyn )+happyIn116 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap116 x)+{-# INLINE happyIn116 #-}+happyOut116 :: (HappyAbsSyn ) -> HappyWrap116+happyOut116 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut116 #-}+newtype HappyWrap117 = HappyWrap117 (LHsDecl GhcPs)+happyIn117 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn117 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap117 x)+{-# INLINE happyIn117 #-}+happyOut117 :: (HappyAbsSyn ) -> HappyWrap117+happyOut117 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut117 #-}+newtype HappyWrap118 = HappyWrap118 (Located ([AddAnn],OrdList (LHsDecl GhcPs)))+happyIn118 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn118 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap118 x)+{-# INLINE happyIn118 #-}+happyOut118 :: (HappyAbsSyn ) -> HappyWrap118+happyOut118 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut118 #-}+newtype HappyWrap119 = HappyWrap119 (Located ([AddAnn]+                     , OrdList (LHsDecl GhcPs)))+happyIn119 :: (Located ([AddAnn]+                     , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn119 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap119 x)+{-# INLINE happyIn119 #-}+happyOut119 :: (HappyAbsSyn ) -> HappyWrap119+happyOut119 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut119 #-}+newtype HappyWrap120 = HappyWrap120 (Located ([AddAnn]+                       ,(OrdList (LHsDecl GhcPs))))+happyIn120 :: (Located ([AddAnn]+                       ,(OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )+happyIn120 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap120 x)+{-# INLINE happyIn120 #-}+happyOut120 :: (HappyAbsSyn ) -> HappyWrap120+happyOut120 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut120 #-}+newtype HappyWrap121 = HappyWrap121 (Located (OrdList (LHsDecl GhcPs)))+happyIn121 :: (Located (OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn121 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap121 x)+{-# INLINE happyIn121 #-}+happyOut121 :: (HappyAbsSyn ) -> HappyWrap121+happyOut121 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut121 #-}+newtype HappyWrap122 = HappyWrap122 (Located ([AddAnn],OrdList (LHsDecl GhcPs)))+happyIn122 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn122 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap122 x)+{-# INLINE happyIn122 #-}+happyOut122 :: (HappyAbsSyn ) -> HappyWrap122+happyOut122 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut122 #-}+newtype HappyWrap123 = HappyWrap123 (Located ([AddAnn]+                     , OrdList (LHsDecl GhcPs)))+happyIn123 :: (Located ([AddAnn]+                     , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn123 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap123 x)+{-# INLINE happyIn123 #-}+happyOut123 :: (HappyAbsSyn ) -> HappyWrap123+happyOut123 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut123 #-}+newtype HappyWrap124 = HappyWrap124 (Located ([AddAnn]+                        , OrdList (LHsDecl GhcPs)))+happyIn124 :: (Located ([AddAnn]+                        , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn124 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap124 x)+{-# INLINE happyIn124 #-}+happyOut124 :: (HappyAbsSyn ) -> HappyWrap124+happyOut124 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut124 #-}+newtype HappyWrap125 = HappyWrap125 (Located ([AddAnn],OrdList (LHsDecl GhcPs)))+happyIn125 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )+happyIn125 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap125 x)+{-# INLINE happyIn125 #-}+happyOut125 :: (HappyAbsSyn ) -> HappyWrap125+happyOut125 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut125 #-}+newtype HappyWrap126 = HappyWrap126 (Located ([AddAnn],Located (OrdList (LHsDecl GhcPs))))+happyIn126 :: (Located ([AddAnn],Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )+happyIn126 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap126 x)+{-# INLINE happyIn126 #-}+happyOut126 :: (HappyAbsSyn ) -> HappyWrap126+happyOut126 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut126 #-}+newtype HappyWrap127 = HappyWrap127 (Located ([AddAnn],Located (HsLocalBinds GhcPs)))+happyIn127 :: (Located ([AddAnn],Located (HsLocalBinds GhcPs))) -> (HappyAbsSyn )+happyIn127 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap127 x)+{-# INLINE happyIn127 #-}+happyOut127 :: (HappyAbsSyn ) -> HappyWrap127+happyOut127 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut127 #-}+newtype HappyWrap128 = HappyWrap128 (Located ([AddAnn],Located (HsLocalBinds GhcPs)))+happyIn128 :: (Located ([AddAnn],Located (HsLocalBinds GhcPs))) -> (HappyAbsSyn )+happyIn128 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap128 x)+{-# INLINE happyIn128 #-}+happyOut128 :: (HappyAbsSyn ) -> HappyWrap128+happyOut128 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut128 #-}+newtype HappyWrap129 = HappyWrap129 (OrdList (LRuleDecl GhcPs))+happyIn129 :: (OrdList (LRuleDecl GhcPs)) -> (HappyAbsSyn )+happyIn129 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap129 x)+{-# INLINE happyIn129 #-}+happyOut129 :: (HappyAbsSyn ) -> HappyWrap129+happyOut129 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut129 #-}+newtype HappyWrap130 = HappyWrap130 (LRuleDecl GhcPs)+happyIn130 :: (LRuleDecl GhcPs) -> (HappyAbsSyn )+happyIn130 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap130 x)+{-# INLINE happyIn130 #-}+happyOut130 :: (HappyAbsSyn ) -> HappyWrap130+happyOut130 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut130 #-}+newtype HappyWrap131 = HappyWrap131 (([AddAnn],Maybe Activation))+happyIn131 :: (([AddAnn],Maybe Activation)) -> (HappyAbsSyn )+happyIn131 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap131 x)+{-# INLINE happyIn131 #-}+happyOut131 :: (HappyAbsSyn ) -> HappyWrap131+happyOut131 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut131 #-}+newtype HappyWrap132 = HappyWrap132 (([AddAnn]+                              ,Activation))+happyIn132 :: (([AddAnn]+                              ,Activation)) -> (HappyAbsSyn )+happyIn132 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap132 x)+{-# INLINE happyIn132 #-}+happyOut132 :: (HappyAbsSyn ) -> HappyWrap132+happyOut132 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut132 #-}+newtype HappyWrap133 = HappyWrap133 (([AddAnn], Maybe [LHsTyVarBndr GhcPs], [LRuleBndr GhcPs]))+happyIn133 :: (([AddAnn], Maybe [LHsTyVarBndr GhcPs], [LRuleBndr GhcPs])) -> (HappyAbsSyn )+happyIn133 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap133 x)+{-# INLINE happyIn133 #-}+happyOut133 :: (HappyAbsSyn ) -> HappyWrap133+happyOut133 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut133 #-}+newtype HappyWrap134 = HappyWrap134 ([LRuleTyTmVar])+happyIn134 :: ([LRuleTyTmVar]) -> (HappyAbsSyn )+happyIn134 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap134 x)+{-# INLINE happyIn134 #-}+happyOut134 :: (HappyAbsSyn ) -> HappyWrap134+happyOut134 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut134 #-}+newtype HappyWrap135 = HappyWrap135 (LRuleTyTmVar)+happyIn135 :: (LRuleTyTmVar) -> (HappyAbsSyn )+happyIn135 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap135 x)+{-# INLINE happyIn135 #-}+happyOut135 :: (HappyAbsSyn ) -> HappyWrap135+happyOut135 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut135 #-}+newtype HappyWrap136 = HappyWrap136 (OrdList (LWarnDecl GhcPs))+happyIn136 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn136 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap136 x)+{-# INLINE happyIn136 #-}+happyOut136 :: (HappyAbsSyn ) -> HappyWrap136+happyOut136 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut136 #-}+newtype HappyWrap137 = HappyWrap137 (OrdList (LWarnDecl GhcPs))+happyIn137 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn137 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap137 x)+{-# INLINE happyIn137 #-}+happyOut137 :: (HappyAbsSyn ) -> HappyWrap137+happyOut137 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut137 #-}+newtype HappyWrap138 = HappyWrap138 (OrdList (LWarnDecl GhcPs))+happyIn138 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn138 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap138 x)+{-# INLINE happyIn138 #-}+happyOut138 :: (HappyAbsSyn ) -> HappyWrap138+happyOut138 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut138 #-}+newtype HappyWrap139 = HappyWrap139 (OrdList (LWarnDecl GhcPs))+happyIn139 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )+happyIn139 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap139 x)+{-# INLINE happyIn139 #-}+happyOut139 :: (HappyAbsSyn ) -> HappyWrap139+happyOut139 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut139 #-}+newtype HappyWrap140 = HappyWrap140 (Located ([AddAnn],[Located StringLiteral]))+happyIn140 :: (Located ([AddAnn],[Located StringLiteral])) -> (HappyAbsSyn )+happyIn140 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap140 x)+{-# INLINE happyIn140 #-}+happyOut140 :: (HappyAbsSyn ) -> HappyWrap140+happyOut140 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut140 #-}+newtype HappyWrap141 = HappyWrap141 (Located (OrdList (Located StringLiteral)))+happyIn141 :: (Located (OrdList (Located StringLiteral))) -> (HappyAbsSyn )+happyIn141 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap141 x)+{-# INLINE happyIn141 #-}+happyOut141 :: (HappyAbsSyn ) -> HappyWrap141+happyOut141 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut141 #-}+newtype HappyWrap142 = HappyWrap142 (LHsDecl GhcPs)+happyIn142 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn142 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap142 x)+{-# INLINE happyIn142 #-}+happyOut142 :: (HappyAbsSyn ) -> HappyWrap142+happyOut142 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut142 #-}+newtype HappyWrap143 = HappyWrap143 (Located ([AddAnn],HsDecl GhcPs))+happyIn143 :: (Located ([AddAnn],HsDecl GhcPs)) -> (HappyAbsSyn )+happyIn143 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap143 x)+{-# INLINE happyIn143 #-}+happyOut143 :: (HappyAbsSyn ) -> HappyWrap143+happyOut143 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut143 #-}+newtype HappyWrap144 = HappyWrap144 (Located CCallConv)+happyIn144 :: (Located CCallConv) -> (HappyAbsSyn )+happyIn144 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap144 x)+{-# INLINE happyIn144 #-}+happyOut144 :: (HappyAbsSyn ) -> HappyWrap144+happyOut144 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut144 #-}+newtype HappyWrap145 = HappyWrap145 (Located Safety)+happyIn145 :: (Located Safety) -> (HappyAbsSyn )+happyIn145 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap145 x)+{-# INLINE happyIn145 #-}+happyOut145 :: (HappyAbsSyn ) -> HappyWrap145+happyOut145 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut145 #-}+newtype HappyWrap146 = HappyWrap146 (Located ([AddAnn]+                    ,(Located StringLiteral, Located RdrName, LHsSigType GhcPs)))+happyIn146 :: (Located ([AddAnn]+                    ,(Located StringLiteral, Located RdrName, LHsSigType GhcPs))) -> (HappyAbsSyn )+happyIn146 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap146 x)+{-# INLINE happyIn146 #-}+happyOut146 :: (HappyAbsSyn ) -> HappyWrap146+happyOut146 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut146 #-}+newtype HappyWrap147 = HappyWrap147 (([AddAnn], Maybe (LHsType GhcPs)))+happyIn147 :: (([AddAnn], Maybe (LHsType GhcPs))) -> (HappyAbsSyn )+happyIn147 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap147 x)+{-# INLINE happyIn147 #-}+happyOut147 :: (HappyAbsSyn ) -> HappyWrap147+happyOut147 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut147 #-}+newtype HappyWrap148 = HappyWrap148 (([AddAnn], Maybe (Located RdrName)))+happyIn148 :: (([AddAnn], Maybe (Located RdrName))) -> (HappyAbsSyn )+happyIn148 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap148 x)+{-# INLINE happyIn148 #-}+happyOut148 :: (HappyAbsSyn ) -> HappyWrap148+happyOut148 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut148 #-}+newtype HappyWrap149 = HappyWrap149 (LHsType GhcPs)+happyIn149 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn149 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap149 x)+{-# INLINE happyIn149 #-}+happyOut149 :: (HappyAbsSyn ) -> HappyWrap149+happyOut149 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut149 #-}+newtype HappyWrap150 = HappyWrap150 (LHsType GhcPs)+happyIn150 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn150 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap150 x)+{-# INLINE happyIn150 #-}+happyOut150 :: (HappyAbsSyn ) -> HappyWrap150+happyOut150 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut150 #-}+newtype HappyWrap151 = HappyWrap151 (Located [Located RdrName])+happyIn151 :: (Located [Located RdrName]) -> (HappyAbsSyn )+happyIn151 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap151 x)+{-# INLINE happyIn151 #-}+happyOut151 :: (HappyAbsSyn ) -> HappyWrap151+happyOut151 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut151 #-}+newtype HappyWrap152 = HappyWrap152 ((OrdList (LHsSigType GhcPs)))+happyIn152 :: ((OrdList (LHsSigType GhcPs))) -> (HappyAbsSyn )+happyIn152 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap152 x)+{-# INLINE happyIn152 #-}+happyOut152 :: (HappyAbsSyn ) -> HappyWrap152+happyOut152 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut152 #-}+newtype HappyWrap153 = HappyWrap153 (Located ([AddAnn], SourceText, SrcUnpackedness))+happyIn153 :: (Located ([AddAnn], SourceText, SrcUnpackedness)) -> (HappyAbsSyn )+happyIn153 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap153 x)+{-# INLINE happyIn153 #-}+happyOut153 :: (HappyAbsSyn ) -> HappyWrap153+happyOut153 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut153 #-}+newtype HappyWrap154 = HappyWrap154 ((AddAnn, ForallVisFlag))+happyIn154 :: ((AddAnn, ForallVisFlag)) -> (HappyAbsSyn )+happyIn154 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap154 x)+{-# INLINE happyIn154 #-}+happyOut154 :: (HappyAbsSyn ) -> HappyWrap154+happyOut154 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut154 #-}+newtype HappyWrap155 = HappyWrap155 (LHsType GhcPs)+happyIn155 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn155 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap155 x)+{-# INLINE happyIn155 #-}+happyOut155 :: (HappyAbsSyn ) -> HappyWrap155+happyOut155 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut155 #-}+newtype HappyWrap156 = HappyWrap156 (LHsType GhcPs)+happyIn156 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn156 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap156 x)+{-# INLINE happyIn156 #-}+happyOut156 :: (HappyAbsSyn ) -> HappyWrap156+happyOut156 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut156 #-}+newtype HappyWrap157 = HappyWrap157 (LHsType GhcPs)+happyIn157 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn157 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap157 x)+{-# INLINE happyIn157 #-}+happyOut157 :: (HappyAbsSyn ) -> HappyWrap157+happyOut157 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut157 #-}+newtype HappyWrap158 = HappyWrap158 (LHsType GhcPs)+happyIn158 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn158 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap158 x)+{-# INLINE happyIn158 #-}+happyOut158 :: (HappyAbsSyn ) -> HappyWrap158+happyOut158 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut158 #-}+newtype HappyWrap159 = HappyWrap159 (LHsContext GhcPs)+happyIn159 :: (LHsContext GhcPs) -> (HappyAbsSyn )+happyIn159 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap159 x)+{-# INLINE happyIn159 #-}+happyOut159 :: (HappyAbsSyn ) -> HappyWrap159+happyOut159 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut159 #-}+newtype HappyWrap160 = HappyWrap160 (LHsContext GhcPs)+happyIn160 :: (LHsContext GhcPs) -> (HappyAbsSyn )+happyIn160 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap160 x)+{-# INLINE happyIn160 #-}+happyOut160 :: (HappyAbsSyn ) -> HappyWrap160+happyOut160 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut160 #-}+newtype HappyWrap161 = HappyWrap161 (LHsType GhcPs)+happyIn161 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn161 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap161 x)+{-# INLINE happyIn161 #-}+happyOut161 :: (HappyAbsSyn ) -> HappyWrap161+happyOut161 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut161 #-}+newtype HappyWrap162 = HappyWrap162 (LHsType GhcPs)+happyIn162 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn162 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap162 x)+{-# INLINE happyIn162 #-}+happyOut162 :: (HappyAbsSyn ) -> HappyWrap162+happyOut162 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut162 #-}+newtype HappyWrap163 = HappyWrap163 (LHsType GhcPs)+happyIn163 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn163 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap163 x)+{-# INLINE happyIn163 #-}+happyOut163 :: (HappyAbsSyn ) -> HappyWrap163+happyOut163 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut163 #-}+newtype HappyWrap164 = HappyWrap164 (Located [Located TyEl])+happyIn164 :: (Located [Located TyEl]) -> (HappyAbsSyn )+happyIn164 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap164 x)+{-# INLINE happyIn164 #-}+happyOut164 :: (HappyAbsSyn ) -> HappyWrap164+happyOut164 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut164 #-}+newtype HappyWrap165 = HappyWrap165 (Located TyEl)+happyIn165 :: (Located TyEl) -> (HappyAbsSyn )+happyIn165 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap165 x)+{-# INLINE happyIn165 #-}+happyOut165 :: (HappyAbsSyn ) -> HappyWrap165+happyOut165 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut165 #-}+newtype HappyWrap166 = HappyWrap166 (LHsType GhcPs)+happyIn166 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn166 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap166 x)+{-# INLINE happyIn166 #-}+happyOut166 :: (HappyAbsSyn ) -> HappyWrap166+happyOut166 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut166 #-}+newtype HappyWrap167 = HappyWrap167 ([Located TyEl])+happyIn167 :: ([Located TyEl]) -> (HappyAbsSyn )+happyIn167 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap167 x)+{-# INLINE happyIn167 #-}+happyOut167 :: (HappyAbsSyn ) -> HappyWrap167+happyOut167 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut167 #-}+newtype HappyWrap168 = HappyWrap168 (Located TyEl)+happyIn168 :: (Located TyEl) -> (HappyAbsSyn )+happyIn168 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap168 x)+{-# INLINE happyIn168 #-}+happyOut168 :: (HappyAbsSyn ) -> HappyWrap168+happyOut168 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut168 #-}+newtype HappyWrap169 = HappyWrap169 (LHsType GhcPs)+happyIn169 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn169 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap169 x)+{-# INLINE happyIn169 #-}+happyOut169 :: (HappyAbsSyn ) -> HappyWrap169+happyOut169 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut169 #-}+newtype HappyWrap170 = HappyWrap170 (LHsSigType GhcPs)+happyIn170 :: (LHsSigType GhcPs) -> (HappyAbsSyn )+happyIn170 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap170 x)+{-# INLINE happyIn170 #-}+happyOut170 :: (HappyAbsSyn ) -> HappyWrap170+happyOut170 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut170 #-}+newtype HappyWrap171 = HappyWrap171 ([LHsSigType GhcPs])+happyIn171 :: ([LHsSigType GhcPs]) -> (HappyAbsSyn )+happyIn171 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap171 x)+{-# INLINE happyIn171 #-}+happyOut171 :: (HappyAbsSyn ) -> HappyWrap171+happyOut171 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut171 #-}+newtype HappyWrap172 = HappyWrap172 ([LHsType GhcPs])+happyIn172 :: ([LHsType GhcPs]) -> (HappyAbsSyn )+happyIn172 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap172 x)+{-# INLINE happyIn172 #-}+happyOut172 :: (HappyAbsSyn ) -> HappyWrap172+happyOut172 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut172 #-}+newtype HappyWrap173 = HappyWrap173 ([LHsType GhcPs])+happyIn173 :: ([LHsType GhcPs]) -> (HappyAbsSyn )+happyIn173 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap173 x)+{-# INLINE happyIn173 #-}+happyOut173 :: (HappyAbsSyn ) -> HappyWrap173+happyOut173 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut173 #-}+newtype HappyWrap174 = HappyWrap174 ([LHsType GhcPs])+happyIn174 :: ([LHsType GhcPs]) -> (HappyAbsSyn )+happyIn174 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap174 x)+{-# INLINE happyIn174 #-}+happyOut174 :: (HappyAbsSyn ) -> HappyWrap174+happyOut174 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut174 #-}+newtype HappyWrap175 = HappyWrap175 ([LHsTyVarBndr GhcPs])+happyIn175 :: ([LHsTyVarBndr GhcPs]) -> (HappyAbsSyn )+happyIn175 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap175 x)+{-# INLINE happyIn175 #-}+happyOut175 :: (HappyAbsSyn ) -> HappyWrap175+happyOut175 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut175 #-}+newtype HappyWrap176 = HappyWrap176 (LHsTyVarBndr GhcPs)+happyIn176 :: (LHsTyVarBndr GhcPs) -> (HappyAbsSyn )+happyIn176 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap176 x)+{-# INLINE happyIn176 #-}+happyOut176 :: (HappyAbsSyn ) -> HappyWrap176+happyOut176 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut176 #-}+newtype HappyWrap177 = HappyWrap177 (Located ([AddAnn],[Located (FunDep (Located RdrName))]))+happyIn177 :: (Located ([AddAnn],[Located (FunDep (Located RdrName))])) -> (HappyAbsSyn )+happyIn177 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap177 x)+{-# INLINE happyIn177 #-}+happyOut177 :: (HappyAbsSyn ) -> HappyWrap177+happyOut177 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut177 #-}+newtype HappyWrap178 = HappyWrap178 (Located [Located (FunDep (Located RdrName))])+happyIn178 :: (Located [Located (FunDep (Located RdrName))]) -> (HappyAbsSyn )+happyIn178 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap178 x)+{-# INLINE happyIn178 #-}+happyOut178 :: (HappyAbsSyn ) -> HappyWrap178+happyOut178 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut178 #-}+newtype HappyWrap179 = HappyWrap179 (Located (FunDep (Located RdrName)))+happyIn179 :: (Located (FunDep (Located RdrName))) -> (HappyAbsSyn )+happyIn179 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap179 x)+{-# INLINE happyIn179 #-}+happyOut179 :: (HappyAbsSyn ) -> HappyWrap179+happyOut179 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut179 #-}+newtype HappyWrap180 = HappyWrap180 (Located [Located RdrName])+happyIn180 :: (Located [Located RdrName]) -> (HappyAbsSyn )+happyIn180 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap180 x)+{-# INLINE happyIn180 #-}+happyOut180 :: (HappyAbsSyn ) -> HappyWrap180+happyOut180 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut180 #-}+newtype HappyWrap181 = HappyWrap181 (LHsKind GhcPs)+happyIn181 :: (LHsKind GhcPs) -> (HappyAbsSyn )+happyIn181 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap181 x)+{-# INLINE happyIn181 #-}+happyOut181 :: (HappyAbsSyn ) -> HappyWrap181+happyOut181 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut181 #-}+newtype HappyWrap182 = HappyWrap182 (Located ([AddAnn]+                          ,[LConDecl GhcPs]))+happyIn182 :: (Located ([AddAnn]+                          ,[LConDecl GhcPs])) -> (HappyAbsSyn )+happyIn182 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap182 x)+{-# INLINE happyIn182 #-}+happyOut182 :: (HappyAbsSyn ) -> HappyWrap182+happyOut182 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut182 #-}+newtype HappyWrap183 = HappyWrap183 (Located [LConDecl GhcPs])+happyIn183 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )+happyIn183 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap183 x)+{-# INLINE happyIn183 #-}+happyOut183 :: (HappyAbsSyn ) -> HappyWrap183+happyOut183 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut183 #-}+newtype HappyWrap184 = HappyWrap184 (LConDecl GhcPs)+happyIn184 :: (LConDecl GhcPs) -> (HappyAbsSyn )+happyIn184 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap184 x)+{-# INLINE happyIn184 #-}+happyOut184 :: (HappyAbsSyn ) -> HappyWrap184+happyOut184 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut184 #-}+newtype HappyWrap185 = HappyWrap185 (LConDecl GhcPs)+happyIn185 :: (LConDecl GhcPs) -> (HappyAbsSyn )+happyIn185 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap185 x)+{-# INLINE happyIn185 #-}+happyOut185 :: (HappyAbsSyn ) -> HappyWrap185+happyOut185 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut185 #-}+newtype HappyWrap186 = HappyWrap186 (Located ([AddAnn],[LConDecl GhcPs]))+happyIn186 :: (Located ([AddAnn],[LConDecl GhcPs])) -> (HappyAbsSyn )+happyIn186 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap186 x)+{-# INLINE happyIn186 #-}+happyOut186 :: (HappyAbsSyn ) -> HappyWrap186+happyOut186 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut186 #-}+newtype HappyWrap187 = HappyWrap187 (Located [LConDecl GhcPs])+happyIn187 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )+happyIn187 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap187 x)+{-# INLINE happyIn187 #-}+happyOut187 :: (HappyAbsSyn ) -> HappyWrap187+happyOut187 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut187 #-}+newtype HappyWrap188 = HappyWrap188 (LConDecl GhcPs)+happyIn188 :: (LConDecl GhcPs) -> (HappyAbsSyn )+happyIn188 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap188 x)+{-# INLINE happyIn188 #-}+happyOut188 :: (HappyAbsSyn ) -> HappyWrap188+happyOut188 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut188 #-}+newtype HappyWrap189 = HappyWrap189 (Located ([AddAnn], Maybe [LHsTyVarBndr GhcPs]))+happyIn189 :: (Located ([AddAnn], Maybe [LHsTyVarBndr GhcPs])) -> (HappyAbsSyn )+happyIn189 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap189 x)+{-# INLINE happyIn189 #-}+happyOut189 :: (HappyAbsSyn ) -> HappyWrap189+happyOut189 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut189 #-}+newtype HappyWrap190 = HappyWrap190 (Located (Located RdrName, HsConDeclDetails GhcPs, Maybe LHsDocString))+happyIn190 :: (Located (Located RdrName, HsConDeclDetails GhcPs, Maybe LHsDocString)) -> (HappyAbsSyn )+happyIn190 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap190 x)+{-# INLINE happyIn190 #-}+happyOut190 :: (HappyAbsSyn ) -> HappyWrap190+happyOut190 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut190 #-}+newtype HappyWrap191 = HappyWrap191 ([LConDeclField GhcPs])+happyIn191 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )+happyIn191 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap191 x)+{-# INLINE happyIn191 #-}+happyOut191 :: (HappyAbsSyn ) -> HappyWrap191+happyOut191 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut191 #-}+newtype HappyWrap192 = HappyWrap192 ([LConDeclField GhcPs])+happyIn192 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )+happyIn192 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap192 x)+{-# INLINE happyIn192 #-}+happyOut192 :: (HappyAbsSyn ) -> HappyWrap192+happyOut192 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut192 #-}+newtype HappyWrap193 = HappyWrap193 (LConDeclField GhcPs)+happyIn193 :: (LConDeclField GhcPs) -> (HappyAbsSyn )+happyIn193 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap193 x)+{-# INLINE happyIn193 #-}+happyOut193 :: (HappyAbsSyn ) -> HappyWrap193+happyOut193 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut193 #-}+newtype HappyWrap194 = HappyWrap194 (HsDeriving GhcPs)+happyIn194 :: (HsDeriving GhcPs) -> (HappyAbsSyn )+happyIn194 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap194 x)+{-# INLINE happyIn194 #-}+happyOut194 :: (HappyAbsSyn ) -> HappyWrap194+happyOut194 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut194 #-}+newtype HappyWrap195 = HappyWrap195 (HsDeriving GhcPs)+happyIn195 :: (HsDeriving GhcPs) -> (HappyAbsSyn )+happyIn195 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap195 x)+{-# INLINE happyIn195 #-}+happyOut195 :: (HappyAbsSyn ) -> HappyWrap195+happyOut195 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut195 #-}+newtype HappyWrap196 = HappyWrap196 (LHsDerivingClause GhcPs)+happyIn196 :: (LHsDerivingClause GhcPs) -> (HappyAbsSyn )+happyIn196 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap196 x)+{-# INLINE happyIn196 #-}+happyOut196 :: (HappyAbsSyn ) -> HappyWrap196+happyOut196 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut196 #-}+newtype HappyWrap197 = HappyWrap197 (Located [LHsSigType GhcPs])+happyIn197 :: (Located [LHsSigType GhcPs]) -> (HappyAbsSyn )+happyIn197 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap197 x)+{-# INLINE happyIn197 #-}+happyOut197 :: (HappyAbsSyn ) -> HappyWrap197+happyOut197 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut197 #-}+newtype HappyWrap198 = HappyWrap198 (LHsDecl GhcPs)+happyIn198 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn198 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap198 x)+{-# INLINE happyIn198 #-}+happyOut198 :: (HappyAbsSyn ) -> HappyWrap198+happyOut198 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut198 #-}+newtype HappyWrap199 = HappyWrap199 (LDocDecl)+happyIn199 :: (LDocDecl) -> (HappyAbsSyn )+happyIn199 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap199 x)+{-# INLINE happyIn199 #-}+happyOut199 :: (HappyAbsSyn ) -> HappyWrap199+happyOut199 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut199 #-}+newtype HappyWrap200 = HappyWrap200 (LHsDecl GhcPs)+happyIn200 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn200 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap200 x)+{-# INLINE happyIn200 #-}+happyOut200 :: (HappyAbsSyn ) -> HappyWrap200+happyOut200 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut200 #-}+newtype HappyWrap201 = HappyWrap201 (LHsDecl GhcPs)+happyIn201 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn201 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap201 x)+{-# INLINE happyIn201 #-}+happyOut201 :: (HappyAbsSyn ) -> HappyWrap201+happyOut201 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut201 #-}+newtype HappyWrap202 = HappyWrap202 (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs)))+happyIn202 :: (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )+happyIn202 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap202 x)+{-# INLINE happyIn202 #-}+happyOut202 :: (HappyAbsSyn ) -> HappyWrap202+happyOut202 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut202 #-}+newtype HappyWrap203 = HappyWrap203 (Located [LGRHS GhcPs (LHsExpr GhcPs)])+happyIn203 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn203 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap203 x)+{-# INLINE happyIn203 #-}+happyOut203 :: (HappyAbsSyn ) -> HappyWrap203+happyOut203 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut203 #-}+newtype HappyWrap204 = HappyWrap204 (LGRHS GhcPs (LHsExpr GhcPs))+happyIn204 :: (LGRHS GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )+happyIn204 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap204 x)+{-# INLINE happyIn204 #-}+happyOut204 :: (HappyAbsSyn ) -> HappyWrap204+happyOut204 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut204 #-}+newtype HappyWrap205 = HappyWrap205 (LHsDecl GhcPs)+happyIn205 :: (LHsDecl GhcPs) -> (HappyAbsSyn )+happyIn205 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap205 x)+{-# INLINE happyIn205 #-}+happyOut205 :: (HappyAbsSyn ) -> HappyWrap205+happyOut205 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut205 #-}+newtype HappyWrap206 = HappyWrap206 (([AddAnn],Maybe Activation))+happyIn206 :: (([AddAnn],Maybe Activation)) -> (HappyAbsSyn )+happyIn206 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap206 x)+{-# INLINE happyIn206 #-}+happyOut206 :: (HappyAbsSyn ) -> HappyWrap206+happyOut206 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut206 #-}+newtype HappyWrap207 = HappyWrap207 (([AddAnn],Activation))+happyIn207 :: (([AddAnn],Activation)) -> (HappyAbsSyn )+happyIn207 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap207 x)+{-# INLINE happyIn207 #-}+happyOut207 :: (HappyAbsSyn ) -> HappyWrap207+happyOut207 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut207 #-}+newtype HappyWrap208 = HappyWrap208 (Located (HsSplice GhcPs))+happyIn208 :: (Located (HsSplice GhcPs)) -> (HappyAbsSyn )+happyIn208 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap208 x)+{-# INLINE happyIn208 #-}+happyOut208 :: (HappyAbsSyn ) -> HappyWrap208+happyOut208 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut208 #-}+newtype HappyWrap209 = HappyWrap209 (ECP)+happyIn209 :: (ECP) -> (HappyAbsSyn )+happyIn209 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap209 x)+{-# INLINE happyIn209 #-}+happyOut209 :: (HappyAbsSyn ) -> HappyWrap209+happyOut209 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut209 #-}+newtype HappyWrap210 = HappyWrap210 (ECP)+happyIn210 :: (ECP) -> (HappyAbsSyn )+happyIn210 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap210 x)+{-# INLINE happyIn210 #-}+happyOut210 :: (HappyAbsSyn ) -> HappyWrap210+happyOut210 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut210 #-}+newtype HappyWrap211 = HappyWrap211 (ECP)+happyIn211 :: (ECP) -> (HappyAbsSyn )+happyIn211 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap211 x)+{-# INLINE happyIn211 #-}+happyOut211 :: (HappyAbsSyn ) -> HappyWrap211+happyOut211 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut211 #-}+newtype HappyWrap212 = HappyWrap212 (ECP)+happyIn212 :: (ECP) -> (HappyAbsSyn )+happyIn212 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap212 x)+{-# INLINE happyIn212 #-}+happyOut212 :: (HappyAbsSyn ) -> HappyWrap212+happyOut212 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut212 #-}+newtype HappyWrap213 = HappyWrap213 (ECP)+happyIn213 :: (ECP) -> (HappyAbsSyn )+happyIn213 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap213 x)+{-# INLINE happyIn213 #-}+happyOut213 :: (HappyAbsSyn ) -> HappyWrap213+happyOut213 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut213 #-}+newtype HappyWrap214 = HappyWrap214 (([Located Token],Bool))+happyIn214 :: (([Located Token],Bool)) -> (HappyAbsSyn )+happyIn214 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap214 x)+{-# INLINE happyIn214 #-}+happyOut214 :: (HappyAbsSyn ) -> HappyWrap214+happyOut214 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut214 #-}+newtype HappyWrap215 = HappyWrap215 (Located (([AddAnn],SourceText),StringLiteral))+happyIn215 :: (Located (([AddAnn],SourceText),StringLiteral)) -> (HappyAbsSyn )+happyIn215 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap215 x)+{-# INLINE happyIn215 #-}+happyOut215 :: (HappyAbsSyn ) -> HappyWrap215+happyOut215 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut215 #-}+newtype HappyWrap216 = HappyWrap216 (Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),+                         ((SourceText,SourceText),(SourceText,SourceText))+                       ))+happyIn216 :: (Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),+                         ((SourceText,SourceText),(SourceText,SourceText))+                       )) -> (HappyAbsSyn )+happyIn216 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap216 x)+{-# INLINE happyIn216 #-}+happyOut216 :: (HappyAbsSyn ) -> HappyWrap216+happyOut216 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut216 #-}+newtype HappyWrap217 = HappyWrap217 (ECP)+happyIn217 :: (ECP) -> (HappyAbsSyn )+happyIn217 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap217 x)+{-# INLINE happyIn217 #-}+happyOut217 :: (HappyAbsSyn ) -> HappyWrap217+happyOut217 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut217 #-}+newtype HappyWrap218 = HappyWrap218 (ECP)+happyIn218 :: (ECP) -> (HappyAbsSyn )+happyIn218 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap218 x)+{-# INLINE happyIn218 #-}+happyOut218 :: (HappyAbsSyn ) -> HappyWrap218+happyOut218 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut218 #-}+newtype HappyWrap219 = HappyWrap219 (ECP)+happyIn219 :: (ECP) -> (HappyAbsSyn )+happyIn219 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap219 x)+{-# INLINE happyIn219 #-}+happyOut219 :: (HappyAbsSyn ) -> HappyWrap219+happyOut219 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut219 #-}+newtype HappyWrap220 = HappyWrap220 (ECP)+happyIn220 :: (ECP) -> (HappyAbsSyn )+happyIn220 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap220 x)+{-# INLINE happyIn220 #-}+happyOut220 :: (HappyAbsSyn ) -> HappyWrap220+happyOut220 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut220 #-}+newtype HappyWrap221 = HappyWrap221 (LHsExpr GhcPs)+happyIn221 :: (LHsExpr GhcPs) -> (HappyAbsSyn )+happyIn221 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap221 x)+{-# INLINE happyIn221 #-}+happyOut221 :: (HappyAbsSyn ) -> HappyWrap221+happyOut221 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut221 #-}+newtype HappyWrap222 = HappyWrap222 (Located (HsSplice GhcPs))+happyIn222 :: (Located (HsSplice GhcPs)) -> (HappyAbsSyn )+happyIn222 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap222 x)+{-# INLINE happyIn222 #-}+happyOut222 :: (HappyAbsSyn ) -> HappyWrap222+happyOut222 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut222 #-}+newtype HappyWrap223 = HappyWrap223 (Located (HsSplice GhcPs))+happyIn223 :: (Located (HsSplice GhcPs)) -> (HappyAbsSyn )+happyIn223 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap223 x)+{-# INLINE happyIn223 #-}+happyOut223 :: (HappyAbsSyn ) -> HappyWrap223+happyOut223 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut223 #-}+newtype HappyWrap224 = HappyWrap224 ([LHsCmdTop GhcPs])+happyIn224 :: ([LHsCmdTop GhcPs]) -> (HappyAbsSyn )+happyIn224 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap224 x)+{-# INLINE happyIn224 #-}+happyOut224 :: (HappyAbsSyn ) -> HappyWrap224+happyOut224 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut224 #-}+newtype HappyWrap225 = HappyWrap225 (LHsCmdTop GhcPs)+happyIn225 :: (LHsCmdTop GhcPs) -> (HappyAbsSyn )+happyIn225 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap225 x)+{-# INLINE happyIn225 #-}+happyOut225 :: (HappyAbsSyn ) -> HappyWrap225+happyOut225 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut225 #-}+newtype HappyWrap226 = HappyWrap226 (([AddAnn],[LHsDecl GhcPs]))+happyIn226 :: (([AddAnn],[LHsDecl GhcPs])) -> (HappyAbsSyn )+happyIn226 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap226 x)+{-# INLINE happyIn226 #-}+happyOut226 :: (HappyAbsSyn ) -> HappyWrap226+happyOut226 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut226 #-}+newtype HappyWrap227 = HappyWrap227 ([LHsDecl GhcPs])+happyIn227 :: ([LHsDecl GhcPs]) -> (HappyAbsSyn )+happyIn227 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap227 x)+{-# INLINE happyIn227 #-}+happyOut227 :: (HappyAbsSyn ) -> HappyWrap227+happyOut227 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut227 #-}+newtype HappyWrap228 = HappyWrap228 (ECP)+happyIn228 :: (ECP) -> (HappyAbsSyn )+happyIn228 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap228 x)+{-# INLINE happyIn228 #-}+happyOut228 :: (HappyAbsSyn ) -> HappyWrap228+happyOut228 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut228 #-}+newtype HappyWrap229 = HappyWrap229 (forall b. DisambECP b => PV ([AddAnn],SumOrTuple b))+happyIn229 :: (forall b. DisambECP b => PV ([AddAnn],SumOrTuple b)) -> (HappyAbsSyn )+happyIn229 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap229 x)+{-# INLINE happyIn229 #-}+happyOut229 :: (HappyAbsSyn ) -> HappyWrap229+happyOut229 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut229 #-}+newtype HappyWrap230 = HappyWrap230 (forall b. DisambECP b => PV (SrcSpan,[Located (Maybe (Located b))]))+happyIn230 :: (forall b. DisambECP b => PV (SrcSpan,[Located (Maybe (Located b))])) -> (HappyAbsSyn )+happyIn230 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap230 x)+{-# INLINE happyIn230 #-}+happyOut230 :: (HappyAbsSyn ) -> HappyWrap230+happyOut230 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut230 #-}+newtype HappyWrap231 = HappyWrap231 (forall b. DisambECP b => PV [Located (Maybe (Located b))])+happyIn231 :: (forall b. DisambECP b => PV [Located (Maybe (Located b))]) -> (HappyAbsSyn )+happyIn231 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap231 x)+{-# INLINE happyIn231 #-}+happyOut231 :: (HappyAbsSyn ) -> HappyWrap231+happyOut231 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut231 #-}+newtype HappyWrap232 = HappyWrap232 (forall b. DisambECP b => SrcSpan -> PV (Located b))+happyIn232 :: (forall b. DisambECP b => SrcSpan -> PV (Located b)) -> (HappyAbsSyn )+happyIn232 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap232 x)+{-# INLINE happyIn232 #-}+happyOut232 :: (HappyAbsSyn ) -> HappyWrap232+happyOut232 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut232 #-}+newtype HappyWrap233 = HappyWrap233 (forall b. DisambECP b => PV [Located b])+happyIn233 :: (forall b. DisambECP b => PV [Located b]) -> (HappyAbsSyn )+happyIn233 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap233 x)+{-# INLINE happyIn233 #-}+happyOut233 :: (HappyAbsSyn ) -> HappyWrap233+happyOut233 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut233 #-}+newtype HappyWrap234 = HappyWrap234 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn234 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn234 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap234 x)+{-# INLINE happyIn234 #-}+happyOut234 :: (HappyAbsSyn ) -> HappyWrap234+happyOut234 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut234 #-}+newtype HappyWrap235 = HappyWrap235 (Located [[LStmt GhcPs (LHsExpr GhcPs)]])+happyIn235 :: (Located [[LStmt GhcPs (LHsExpr GhcPs)]]) -> (HappyAbsSyn )+happyIn235 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap235 x)+{-# INLINE happyIn235 #-}+happyOut235 :: (HappyAbsSyn ) -> HappyWrap235+happyOut235 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut235 #-}+newtype HappyWrap236 = HappyWrap236 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn236 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn236 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap236 x)+{-# INLINE happyIn236 #-}+happyOut236 :: (HappyAbsSyn ) -> HappyWrap236+happyOut236 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut236 #-}+newtype HappyWrap237 = HappyWrap237 (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs)))+happyIn237 :: (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )+happyIn237 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap237 x)+{-# INLINE happyIn237 #-}+happyOut237 :: (HappyAbsSyn ) -> HappyWrap237+happyOut237 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut237 #-}+newtype HappyWrap238 = HappyWrap238 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn238 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn238 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap238 x)+{-# INLINE happyIn238 #-}+happyOut238 :: (HappyAbsSyn ) -> HappyWrap238+happyOut238 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut238 #-}+newtype HappyWrap239 = HappyWrap239 (Located [LStmt GhcPs (LHsExpr GhcPs)])+happyIn239 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )+happyIn239 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap239 x)+{-# INLINE happyIn239 #-}+happyOut239 :: (HappyAbsSyn ) -> HappyWrap239+happyOut239 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut239 #-}+newtype HappyWrap240 = HappyWrap240 (forall b. DisambECP b => PV (Located ([AddAnn],[LMatch GhcPs (Located b)])))+happyIn240 :: (forall b. DisambECP b => PV (Located ([AddAnn],[LMatch GhcPs (Located b)]))) -> (HappyAbsSyn )+happyIn240 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap240 x)+{-# INLINE happyIn240 #-}+happyOut240 :: (HappyAbsSyn ) -> HappyWrap240+happyOut240 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut240 #-}+newtype HappyWrap241 = HappyWrap241 (forall b. DisambECP b => PV (Located ([AddAnn],[LMatch GhcPs (Located b)])))+happyIn241 :: (forall b. DisambECP b => PV (Located ([AddAnn],[LMatch GhcPs (Located b)]))) -> (HappyAbsSyn )+happyIn241 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap241 x)+{-# INLINE happyIn241 #-}+happyOut241 :: (HappyAbsSyn ) -> HappyWrap241+happyOut241 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut241 #-}+newtype HappyWrap242 = HappyWrap242 (forall b. DisambECP b => PV (Located ([AddAnn],[LMatch GhcPs (Located b)])))+happyIn242 :: (forall b. DisambECP b => PV (Located ([AddAnn],[LMatch GhcPs (Located b)]))) -> (HappyAbsSyn )+happyIn242 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap242 x)+{-# INLINE happyIn242 #-}+happyOut242 :: (HappyAbsSyn ) -> HappyWrap242+happyOut242 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut242 #-}+newtype HappyWrap243 = HappyWrap243 (forall b. DisambECP b => PV (LMatch GhcPs (Located b)))+happyIn243 :: (forall b. DisambECP b => PV (LMatch GhcPs (Located b))) -> (HappyAbsSyn )+happyIn243 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap243 x)+{-# INLINE happyIn243 #-}+happyOut243 :: (HappyAbsSyn ) -> HappyWrap243+happyOut243 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut243 #-}+newtype HappyWrap244 = HappyWrap244 (forall b. DisambECP b => PV (Located ([AddAnn],GRHSs GhcPs (Located b))))+happyIn244 :: (forall b. DisambECP b => PV (Located ([AddAnn],GRHSs GhcPs (Located b)))) -> (HappyAbsSyn )+happyIn244 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap244 x)+{-# INLINE happyIn244 #-}+happyOut244 :: (HappyAbsSyn ) -> HappyWrap244+happyOut244 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut244 #-}+newtype HappyWrap245 = HappyWrap245 (forall b. DisambECP b => PV (Located [LGRHS GhcPs (Located b)]))+happyIn245 :: (forall b. DisambECP b => PV (Located [LGRHS GhcPs (Located b)])) -> (HappyAbsSyn )+happyIn245 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap245 x)+{-# INLINE happyIn245 #-}+happyOut245 :: (HappyAbsSyn ) -> HappyWrap245+happyOut245 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut245 #-}+newtype HappyWrap246 = HappyWrap246 (forall b. DisambECP b => PV (Located [LGRHS GhcPs (Located b)]))+happyIn246 :: (forall b. DisambECP b => PV (Located [LGRHS GhcPs (Located b)])) -> (HappyAbsSyn )+happyIn246 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap246 x)+{-# INLINE happyIn246 #-}+happyOut246 :: (HappyAbsSyn ) -> HappyWrap246+happyOut246 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut246 #-}+newtype HappyWrap247 = HappyWrap247 (Located ([AddAnn],[LGRHS GhcPs (LHsExpr GhcPs)]))+happyIn247 :: (Located ([AddAnn],[LGRHS GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )+happyIn247 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap247 x)+{-# INLINE happyIn247 #-}+happyOut247 :: (HappyAbsSyn ) -> HappyWrap247+happyOut247 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut247 #-}+newtype HappyWrap248 = HappyWrap248 (forall b. DisambECP b => PV (LGRHS GhcPs (Located b)))+happyIn248 :: (forall b. DisambECP b => PV (LGRHS GhcPs (Located b))) -> (HappyAbsSyn )+happyIn248 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap248 x)+{-# INLINE happyIn248 #-}+happyOut248 :: (HappyAbsSyn ) -> HappyWrap248+happyOut248 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut248 #-}+newtype HappyWrap249 = HappyWrap249 (LPat GhcPs)+happyIn249 :: (LPat GhcPs) -> (HappyAbsSyn )+happyIn249 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap249 x)+{-# INLINE happyIn249 #-}+happyOut249 :: (HappyAbsSyn ) -> HappyWrap249+happyOut249 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut249 #-}+newtype HappyWrap250 = HappyWrap250 (LPat GhcPs)+happyIn250 :: (LPat GhcPs) -> (HappyAbsSyn )+happyIn250 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap250 x)+{-# INLINE happyIn250 #-}+happyOut250 :: (HappyAbsSyn ) -> HappyWrap250+happyOut250 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut250 #-}+newtype HappyWrap251 = HappyWrap251 (LPat GhcPs)+happyIn251 :: (LPat GhcPs) -> (HappyAbsSyn )+happyIn251 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap251 x)+{-# INLINE happyIn251 #-}+happyOut251 :: (HappyAbsSyn ) -> HappyWrap251+happyOut251 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut251 #-}+newtype HappyWrap252 = HappyWrap252 ([LPat GhcPs])+happyIn252 :: ([LPat GhcPs]) -> (HappyAbsSyn )+happyIn252 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap252 x)+{-# INLINE happyIn252 #-}+happyOut252 :: (HappyAbsSyn ) -> HappyWrap252+happyOut252 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut252 #-}+newtype HappyWrap253 = HappyWrap253 (forall b. DisambECP b => PV (Located ([AddAnn],[LStmt GhcPs (Located b)])))+happyIn253 :: (forall b. DisambECP b => PV (Located ([AddAnn],[LStmt GhcPs (Located b)]))) -> (HappyAbsSyn )+happyIn253 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap253 x)+{-# INLINE happyIn253 #-}+happyOut253 :: (HappyAbsSyn ) -> HappyWrap253+happyOut253 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut253 #-}+newtype HappyWrap254 = HappyWrap254 (forall b. DisambECP b => PV (Located ([AddAnn],[LStmt GhcPs (Located b)])))+happyIn254 :: (forall b. DisambECP b => PV (Located ([AddAnn],[LStmt GhcPs (Located b)]))) -> (HappyAbsSyn )+happyIn254 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap254 x)+{-# INLINE happyIn254 #-}+happyOut254 :: (HappyAbsSyn ) -> HappyWrap254+happyOut254 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut254 #-}+newtype HappyWrap255 = HappyWrap255 (Maybe (LStmt GhcPs (LHsExpr GhcPs)))+happyIn255 :: (Maybe (LStmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )+happyIn255 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap255 x)+{-# INLINE happyIn255 #-}+happyOut255 :: (HappyAbsSyn ) -> HappyWrap255+happyOut255 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut255 #-}+newtype HappyWrap256 = HappyWrap256 (LStmt GhcPs (LHsExpr GhcPs))+happyIn256 :: (LStmt GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )+happyIn256 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap256 x)+{-# INLINE happyIn256 #-}+happyOut256 :: (HappyAbsSyn ) -> HappyWrap256+happyOut256 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut256 #-}+newtype HappyWrap257 = HappyWrap257 (forall b. DisambECP b => PV (LStmt GhcPs (Located b)))+happyIn257 :: (forall b. DisambECP b => PV (LStmt GhcPs (Located b))) -> (HappyAbsSyn )+happyIn257 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap257 x)+{-# INLINE happyIn257 #-}+happyOut257 :: (HappyAbsSyn ) -> HappyWrap257+happyOut257 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut257 #-}+newtype HappyWrap258 = HappyWrap258 (forall b. DisambECP b => PV (LStmt GhcPs (Located b)))+happyIn258 :: (forall b. DisambECP b => PV (LStmt GhcPs (Located b))) -> (HappyAbsSyn )+happyIn258 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap258 x)+{-# INLINE happyIn258 #-}+happyOut258 :: (HappyAbsSyn ) -> HappyWrap258+happyOut258 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut258 #-}+newtype HappyWrap259 = HappyWrap259 (forall b. DisambECP b => PV ([AddAnn],([LHsRecField GhcPs (Located b)], Maybe SrcSpan)))+happyIn259 :: (forall b. DisambECP b => PV ([AddAnn],([LHsRecField GhcPs (Located b)], Maybe SrcSpan))) -> (HappyAbsSyn )+happyIn259 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap259 x)+{-# INLINE happyIn259 #-}+happyOut259 :: (HappyAbsSyn ) -> HappyWrap259+happyOut259 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut259 #-}+newtype HappyWrap260 = HappyWrap260 (forall b. DisambECP b => PV ([AddAnn],([LHsRecField GhcPs (Located b)], Maybe SrcSpan)))+happyIn260 :: (forall b. DisambECP b => PV ([AddAnn],([LHsRecField GhcPs (Located b)], Maybe SrcSpan))) -> (HappyAbsSyn )+happyIn260 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap260 x)+{-# INLINE happyIn260 #-}+happyOut260 :: (HappyAbsSyn ) -> HappyWrap260+happyOut260 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut260 #-}+newtype HappyWrap261 = HappyWrap261 (forall b. DisambECP b => PV (LHsRecField GhcPs (Located b)))+happyIn261 :: (forall b. DisambECP b => PV (LHsRecField GhcPs (Located b))) -> (HappyAbsSyn )+happyIn261 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap261 x)+{-# INLINE happyIn261 #-}+happyOut261 :: (HappyAbsSyn ) -> HappyWrap261+happyOut261 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut261 #-}+newtype HappyWrap262 = HappyWrap262 (Located [LIPBind GhcPs])+happyIn262 :: (Located [LIPBind GhcPs]) -> (HappyAbsSyn )+happyIn262 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap262 x)+{-# INLINE happyIn262 #-}+happyOut262 :: (HappyAbsSyn ) -> HappyWrap262+happyOut262 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut262 #-}+newtype HappyWrap263 = HappyWrap263 (LIPBind GhcPs)+happyIn263 :: (LIPBind GhcPs) -> (HappyAbsSyn )+happyIn263 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap263 x)+{-# INLINE happyIn263 #-}+happyOut263 :: (HappyAbsSyn ) -> HappyWrap263+happyOut263 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut263 #-}+newtype HappyWrap264 = HappyWrap264 (Located HsIPName)+happyIn264 :: (Located HsIPName) -> (HappyAbsSyn )+happyIn264 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap264 x)+{-# INLINE happyIn264 #-}+happyOut264 :: (HappyAbsSyn ) -> HappyWrap264+happyOut264 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut264 #-}+newtype HappyWrap265 = HappyWrap265 (Located FastString)+happyIn265 :: (Located FastString) -> (HappyAbsSyn )+happyIn265 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap265 x)+{-# INLINE happyIn265 #-}+happyOut265 :: (HappyAbsSyn ) -> HappyWrap265+happyOut265 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut265 #-}+newtype HappyWrap266 = HappyWrap266 (LBooleanFormula (Located RdrName))+happyIn266 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )+happyIn266 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap266 x)+{-# INLINE happyIn266 #-}+happyOut266 :: (HappyAbsSyn ) -> HappyWrap266+happyOut266 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut266 #-}+newtype HappyWrap267 = HappyWrap267 (LBooleanFormula (Located RdrName))+happyIn267 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )+happyIn267 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap267 x)+{-# INLINE happyIn267 #-}+happyOut267 :: (HappyAbsSyn ) -> HappyWrap267+happyOut267 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut267 #-}+newtype HappyWrap268 = HappyWrap268 (LBooleanFormula (Located RdrName))+happyIn268 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )+happyIn268 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap268 x)+{-# INLINE happyIn268 #-}+happyOut268 :: (HappyAbsSyn ) -> HappyWrap268+happyOut268 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut268 #-}+newtype HappyWrap269 = HappyWrap269 ([LBooleanFormula (Located RdrName)])+happyIn269 :: ([LBooleanFormula (Located RdrName)]) -> (HappyAbsSyn )+happyIn269 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap269 x)+{-# INLINE happyIn269 #-}+happyOut269 :: (HappyAbsSyn ) -> HappyWrap269+happyOut269 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut269 #-}+newtype HappyWrap270 = HappyWrap270 (LBooleanFormula (Located RdrName))+happyIn270 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )+happyIn270 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap270 x)+{-# INLINE happyIn270 #-}+happyOut270 :: (HappyAbsSyn ) -> HappyWrap270+happyOut270 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut270 #-}+newtype HappyWrap271 = HappyWrap271 (Located [Located RdrName])+happyIn271 :: (Located [Located RdrName]) -> (HappyAbsSyn )+happyIn271 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap271 x)+{-# INLINE happyIn271 #-}+happyOut271 :: (HappyAbsSyn ) -> HappyWrap271+happyOut271 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut271 #-}+newtype HappyWrap272 = HappyWrap272 (Located RdrName)+happyIn272 :: (Located RdrName) -> (HappyAbsSyn )+happyIn272 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap272 x)+{-# INLINE happyIn272 #-}+happyOut272 :: (HappyAbsSyn ) -> HappyWrap272+happyOut272 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut272 #-}+newtype HappyWrap273 = HappyWrap273 (Located RdrName)+happyIn273 :: (Located RdrName) -> (HappyAbsSyn )+happyIn273 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap273 x)+{-# INLINE happyIn273 #-}+happyOut273 :: (HappyAbsSyn ) -> HappyWrap273+happyOut273 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut273 #-}+newtype HappyWrap274 = HappyWrap274 (Located RdrName)+happyIn274 :: (Located RdrName) -> (HappyAbsSyn )+happyIn274 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap274 x)+{-# INLINE happyIn274 #-}+happyOut274 :: (HappyAbsSyn ) -> HappyWrap274+happyOut274 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut274 #-}+newtype HappyWrap275 = HappyWrap275 (Located RdrName)+happyIn275 :: (Located RdrName) -> (HappyAbsSyn )+happyIn275 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap275 x)+{-# INLINE happyIn275 #-}+happyOut275 :: (HappyAbsSyn ) -> HappyWrap275+happyOut275 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut275 #-}+newtype HappyWrap276 = HappyWrap276 (Located RdrName)+happyIn276 :: (Located RdrName) -> (HappyAbsSyn )+happyIn276 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap276 x)+{-# INLINE happyIn276 #-}+happyOut276 :: (HappyAbsSyn ) -> HappyWrap276+happyOut276 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut276 #-}+newtype HappyWrap277 = HappyWrap277 (Located [Located RdrName])+happyIn277 :: (Located [Located RdrName]) -> (HappyAbsSyn )+happyIn277 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap277 x)+{-# INLINE happyIn277 #-}+happyOut277 :: (HappyAbsSyn ) -> HappyWrap277+happyOut277 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut277 #-}+newtype HappyWrap278 = HappyWrap278 (Located DataCon)+happyIn278 :: (Located DataCon) -> (HappyAbsSyn )+happyIn278 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap278 x)+{-# INLINE happyIn278 #-}+happyOut278 :: (HappyAbsSyn ) -> HappyWrap278+happyOut278 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut278 #-}+newtype HappyWrap279 = HappyWrap279 (Located DataCon)+happyIn279 :: (Located DataCon) -> (HappyAbsSyn )+happyIn279 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap279 x)+{-# INLINE happyIn279 #-}+happyOut279 :: (HappyAbsSyn ) -> HappyWrap279+happyOut279 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut279 #-}+newtype HappyWrap280 = HappyWrap280 (Located RdrName)+happyIn280 :: (Located RdrName) -> (HappyAbsSyn )+happyIn280 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap280 x)+{-# INLINE happyIn280 #-}+happyOut280 :: (HappyAbsSyn ) -> HappyWrap280+happyOut280 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut280 #-}+newtype HappyWrap281 = HappyWrap281 (Located RdrName)+happyIn281 :: (Located RdrName) -> (HappyAbsSyn )+happyIn281 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap281 x)+{-# INLINE happyIn281 #-}+happyOut281 :: (HappyAbsSyn ) -> HappyWrap281+happyOut281 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut281 #-}+newtype HappyWrap282 = HappyWrap282 (Located RdrName)+happyIn282 :: (Located RdrName) -> (HappyAbsSyn )+happyIn282 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap282 x)+{-# INLINE happyIn282 #-}+happyOut282 :: (HappyAbsSyn ) -> HappyWrap282+happyOut282 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut282 #-}+newtype HappyWrap283 = HappyWrap283 (Located RdrName)+happyIn283 :: (Located RdrName) -> (HappyAbsSyn )+happyIn283 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap283 x)+{-# INLINE happyIn283 #-}+happyOut283 :: (HappyAbsSyn ) -> HappyWrap283+happyOut283 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut283 #-}+newtype HappyWrap284 = HappyWrap284 (Located RdrName)+happyIn284 :: (Located RdrName) -> (HappyAbsSyn )+happyIn284 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap284 x)+{-# INLINE happyIn284 #-}+happyOut284 :: (HappyAbsSyn ) -> HappyWrap284+happyOut284 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut284 #-}+newtype HappyWrap285 = HappyWrap285 (Located RdrName)+happyIn285 :: (Located RdrName) -> (HappyAbsSyn )+happyIn285 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap285 x)+{-# INLINE happyIn285 #-}+happyOut285 :: (HappyAbsSyn ) -> HappyWrap285+happyOut285 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut285 #-}+newtype HappyWrap286 = HappyWrap286 (Located RdrName)+happyIn286 :: (Located RdrName) -> (HappyAbsSyn )+happyIn286 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap286 x)+{-# INLINE happyIn286 #-}+happyOut286 :: (HappyAbsSyn ) -> HappyWrap286+happyOut286 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut286 #-}+newtype HappyWrap287 = HappyWrap287 (Located RdrName)+happyIn287 :: (Located RdrName) -> (HappyAbsSyn )+happyIn287 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap287 x)+{-# INLINE happyIn287 #-}+happyOut287 :: (HappyAbsSyn ) -> HappyWrap287+happyOut287 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut287 #-}+newtype HappyWrap288 = HappyWrap288 (LHsType GhcPs)+happyIn288 :: (LHsType GhcPs) -> (HappyAbsSyn )+happyIn288 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap288 x)+{-# INLINE happyIn288 #-}+happyOut288 :: (HappyAbsSyn ) -> HappyWrap288+happyOut288 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut288 #-}+newtype HappyWrap289 = HappyWrap289 (Located RdrName)+happyIn289 :: (Located RdrName) -> (HappyAbsSyn )+happyIn289 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap289 x)+{-# INLINE happyIn289 #-}+happyOut289 :: (HappyAbsSyn ) -> HappyWrap289+happyOut289 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut289 #-}+newtype HappyWrap290 = HappyWrap290 (Located RdrName)+happyIn290 :: (Located RdrName) -> (HappyAbsSyn )+happyIn290 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap290 x)+{-# INLINE happyIn290 #-}+happyOut290 :: (HappyAbsSyn ) -> HappyWrap290+happyOut290 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut290 #-}+newtype HappyWrap291 = HappyWrap291 (Located RdrName)+happyIn291 :: (Located RdrName) -> (HappyAbsSyn )+happyIn291 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap291 x)+{-# INLINE happyIn291 #-}+happyOut291 :: (HappyAbsSyn ) -> HappyWrap291+happyOut291 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut291 #-}+newtype HappyWrap292 = HappyWrap292 (Located RdrName)+happyIn292 :: (Located RdrName) -> (HappyAbsSyn )+happyIn292 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap292 x)+{-# INLINE happyIn292 #-}+happyOut292 :: (HappyAbsSyn ) -> HappyWrap292+happyOut292 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut292 #-}+newtype HappyWrap293 = HappyWrap293 (Located RdrName)+happyIn293 :: (Located RdrName) -> (HappyAbsSyn )+happyIn293 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap293 x)+{-# INLINE happyIn293 #-}+happyOut293 :: (HappyAbsSyn ) -> HappyWrap293+happyOut293 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut293 #-}+newtype HappyWrap294 = HappyWrap294 (forall b. DisambInfixOp b => PV (Located b))+happyIn294 :: (forall b. DisambInfixOp b => PV (Located b)) -> (HappyAbsSyn )+happyIn294 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap294 x)+{-# INLINE happyIn294 #-}+happyOut294 :: (HappyAbsSyn ) -> HappyWrap294+happyOut294 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut294 #-}+newtype HappyWrap295 = HappyWrap295 (forall b. DisambInfixOp b => PV (Located b))+happyIn295 :: (forall b. DisambInfixOp b => PV (Located b)) -> (HappyAbsSyn )+happyIn295 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap295 x)+{-# INLINE happyIn295 #-}+happyOut295 :: (HappyAbsSyn ) -> HappyWrap295+happyOut295 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut295 #-}+newtype HappyWrap296 = HappyWrap296 (forall b. DisambInfixOp b => PV (Located b))+happyIn296 :: (forall b. DisambInfixOp b => PV (Located b)) -> (HappyAbsSyn )+happyIn296 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap296 x)+{-# INLINE happyIn296 #-}+happyOut296 :: (HappyAbsSyn ) -> HappyWrap296+happyOut296 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut296 #-}+newtype HappyWrap297 = HappyWrap297 (Located RdrName)+happyIn297 :: (Located RdrName) -> (HappyAbsSyn )+happyIn297 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap297 x)+{-# INLINE happyIn297 #-}+happyOut297 :: (HappyAbsSyn ) -> HappyWrap297+happyOut297 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut297 #-}+newtype HappyWrap298 = HappyWrap298 (Located RdrName)+happyIn298 :: (Located RdrName) -> (HappyAbsSyn )+happyIn298 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap298 x)+{-# INLINE happyIn298 #-}+happyOut298 :: (HappyAbsSyn ) -> HappyWrap298+happyOut298 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut298 #-}+newtype HappyWrap299 = HappyWrap299 (Located RdrName)+happyIn299 :: (Located RdrName) -> (HappyAbsSyn )+happyIn299 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap299 x)+{-# INLINE happyIn299 #-}+happyOut299 :: (HappyAbsSyn ) -> HappyWrap299+happyOut299 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut299 #-}+newtype HappyWrap300 = HappyWrap300 (Located RdrName)+happyIn300 :: (Located RdrName) -> (HappyAbsSyn )+happyIn300 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap300 x)+{-# INLINE happyIn300 #-}+happyOut300 :: (HappyAbsSyn ) -> HappyWrap300+happyOut300 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut300 #-}+newtype HappyWrap301 = HappyWrap301 (Located RdrName)+happyIn301 :: (Located RdrName) -> (HappyAbsSyn )+happyIn301 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap301 x)+{-# INLINE happyIn301 #-}+happyOut301 :: (HappyAbsSyn ) -> HappyWrap301+happyOut301 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut301 #-}+newtype HappyWrap302 = HappyWrap302 (Located RdrName)+happyIn302 :: (Located RdrName) -> (HappyAbsSyn )+happyIn302 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap302 x)+{-# INLINE happyIn302 #-}+happyOut302 :: (HappyAbsSyn ) -> HappyWrap302+happyOut302 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut302 #-}+newtype HappyWrap303 = HappyWrap303 (Located RdrName)+happyIn303 :: (Located RdrName) -> (HappyAbsSyn )+happyIn303 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap303 x)+{-# INLINE happyIn303 #-}+happyOut303 :: (HappyAbsSyn ) -> HappyWrap303+happyOut303 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut303 #-}+newtype HappyWrap304 = HappyWrap304 (Located RdrName)+happyIn304 :: (Located RdrName) -> (HappyAbsSyn )+happyIn304 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap304 x)+{-# INLINE happyIn304 #-}+happyOut304 :: (HappyAbsSyn ) -> HappyWrap304+happyOut304 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut304 #-}+newtype HappyWrap305 = HappyWrap305 (Located RdrName)+happyIn305 :: (Located RdrName) -> (HappyAbsSyn )+happyIn305 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap305 x)+{-# INLINE happyIn305 #-}+happyOut305 :: (HappyAbsSyn ) -> HappyWrap305+happyOut305 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut305 #-}+newtype HappyWrap306 = HappyWrap306 (Located RdrName)+happyIn306 :: (Located RdrName) -> (HappyAbsSyn )+happyIn306 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap306 x)+{-# INLINE happyIn306 #-}+happyOut306 :: (HappyAbsSyn ) -> HappyWrap306+happyOut306 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut306 #-}+newtype HappyWrap307 = HappyWrap307 (Located RdrName)+happyIn307 :: (Located RdrName) -> (HappyAbsSyn )+happyIn307 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap307 x)+{-# INLINE happyIn307 #-}+happyOut307 :: (HappyAbsSyn ) -> HappyWrap307+happyOut307 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut307 #-}+newtype HappyWrap308 = HappyWrap308 (Located RdrName)+happyIn308 :: (Located RdrName) -> (HappyAbsSyn )+happyIn308 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap308 x)+{-# INLINE happyIn308 #-}+happyOut308 :: (HappyAbsSyn ) -> HappyWrap308+happyOut308 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut308 #-}+newtype HappyWrap309 = HappyWrap309 (Located RdrName)+happyIn309 :: (Located RdrName) -> (HappyAbsSyn )+happyIn309 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap309 x)+{-# INLINE happyIn309 #-}+happyOut309 :: (HappyAbsSyn ) -> HappyWrap309+happyOut309 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut309 #-}+newtype HappyWrap310 = HappyWrap310 (Located RdrName)+happyIn310 :: (Located RdrName) -> (HappyAbsSyn )+happyIn310 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap310 x)+{-# INLINE happyIn310 #-}+happyOut310 :: (HappyAbsSyn ) -> HappyWrap310+happyOut310 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut310 #-}+newtype HappyWrap311 = HappyWrap311 (Located FastString)+happyIn311 :: (Located FastString) -> (HappyAbsSyn )+happyIn311 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap311 x)+{-# INLINE happyIn311 #-}+happyOut311 :: (HappyAbsSyn ) -> HappyWrap311+happyOut311 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut311 #-}+newtype HappyWrap312 = HappyWrap312 (Located FastString)+happyIn312 :: (Located FastString) -> (HappyAbsSyn )+happyIn312 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap312 x)+{-# INLINE happyIn312 #-}+happyOut312 :: (HappyAbsSyn ) -> HappyWrap312+happyOut312 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut312 #-}+newtype HappyWrap313 = HappyWrap313 (Located RdrName)+happyIn313 :: (Located RdrName) -> (HappyAbsSyn )+happyIn313 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap313 x)+{-# INLINE happyIn313 #-}+happyOut313 :: (HappyAbsSyn ) -> HappyWrap313+happyOut313 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut313 #-}+newtype HappyWrap314 = HappyWrap314 (Located RdrName)+happyIn314 :: (Located RdrName) -> (HappyAbsSyn )+happyIn314 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap314 x)+{-# INLINE happyIn314 #-}+happyOut314 :: (HappyAbsSyn ) -> HappyWrap314+happyOut314 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut314 #-}+newtype HappyWrap315 = HappyWrap315 (Located RdrName)+happyIn315 :: (Located RdrName) -> (HappyAbsSyn )+happyIn315 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap315 x)+{-# INLINE happyIn315 #-}+happyOut315 :: (HappyAbsSyn ) -> HappyWrap315+happyOut315 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut315 #-}+newtype HappyWrap316 = HappyWrap316 (Located RdrName)+happyIn316 :: (Located RdrName) -> (HappyAbsSyn )+happyIn316 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap316 x)+{-# INLINE happyIn316 #-}+happyOut316 :: (HappyAbsSyn ) -> HappyWrap316+happyOut316 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut316 #-}+newtype HappyWrap317 = HappyWrap317 (Located (HsLit GhcPs))+happyIn317 :: (Located (HsLit GhcPs)) -> (HappyAbsSyn )+happyIn317 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap317 x)+{-# INLINE happyIn317 #-}+happyOut317 :: (HappyAbsSyn ) -> HappyWrap317+happyOut317 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut317 #-}+newtype HappyWrap318 = HappyWrap318 (())+happyIn318 :: (()) -> (HappyAbsSyn )+happyIn318 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap318 x)+{-# INLINE happyIn318 #-}+happyOut318 :: (HappyAbsSyn ) -> HappyWrap318+happyOut318 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut318 #-}+newtype HappyWrap319 = HappyWrap319 (Located ModuleName)+happyIn319 :: (Located ModuleName) -> (HappyAbsSyn )+happyIn319 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap319 x)+{-# INLINE happyIn319 #-}+happyOut319 :: (HappyAbsSyn ) -> HappyWrap319+happyOut319 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut319 #-}+newtype HappyWrap320 = HappyWrap320 (([SrcSpan],Int))+happyIn320 :: (([SrcSpan],Int)) -> (HappyAbsSyn )+happyIn320 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap320 x)+{-# INLINE happyIn320 #-}+happyOut320 :: (HappyAbsSyn ) -> HappyWrap320+happyOut320 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut320 #-}+newtype HappyWrap321 = HappyWrap321 (([SrcSpan],Int))+happyIn321 :: (([SrcSpan],Int)) -> (HappyAbsSyn )+happyIn321 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap321 x)+{-# INLINE happyIn321 #-}+happyOut321 :: (HappyAbsSyn ) -> HappyWrap321+happyOut321 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut321 #-}+newtype HappyWrap322 = HappyWrap322 (([SrcSpan],Int))+happyIn322 :: (([SrcSpan],Int)) -> (HappyAbsSyn )+happyIn322 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap322 x)+{-# INLINE happyIn322 #-}+happyOut322 :: (HappyAbsSyn ) -> HappyWrap322+happyOut322 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut322 #-}+newtype HappyWrap323 = HappyWrap323 (LHsDocString)+happyIn323 :: (LHsDocString) -> (HappyAbsSyn )+happyIn323 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap323 x)+{-# INLINE happyIn323 #-}+happyOut323 :: (HappyAbsSyn ) -> HappyWrap323+happyOut323 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut323 #-}+newtype HappyWrap324 = HappyWrap324 (LHsDocString)+happyIn324 :: (LHsDocString) -> (HappyAbsSyn )+happyIn324 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap324 x)+{-# INLINE happyIn324 #-}+happyOut324 :: (HappyAbsSyn ) -> HappyWrap324+happyOut324 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut324 #-}+newtype HappyWrap325 = HappyWrap325 (Located (String, HsDocString))+happyIn325 :: (Located (String, HsDocString)) -> (HappyAbsSyn )+happyIn325 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap325 x)+{-# INLINE happyIn325 #-}+happyOut325 :: (HappyAbsSyn ) -> HappyWrap325+happyOut325 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut325 #-}+newtype HappyWrap326 = HappyWrap326 (Located (Int, HsDocString))+happyIn326 :: (Located (Int, HsDocString)) -> (HappyAbsSyn )+happyIn326 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap326 x)+{-# INLINE happyIn326 #-}+happyOut326 :: (HappyAbsSyn ) -> HappyWrap326+happyOut326 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut326 #-}+newtype HappyWrap327 = HappyWrap327 (Maybe LHsDocString)+happyIn327 :: (Maybe LHsDocString) -> (HappyAbsSyn )+happyIn327 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap327 x)+{-# INLINE happyIn327 #-}+happyOut327 :: (HappyAbsSyn ) -> HappyWrap327+happyOut327 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut327 #-}+newtype HappyWrap328 = HappyWrap328 (Maybe LHsDocString)+happyIn328 :: (Maybe LHsDocString) -> (HappyAbsSyn )+happyIn328 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap328 x)+{-# INLINE happyIn328 #-}+happyOut328 :: (HappyAbsSyn ) -> HappyWrap328+happyOut328 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut328 #-}+newtype HappyWrap329 = HappyWrap329 (Maybe LHsDocString)+happyIn329 :: (Maybe LHsDocString) -> (HappyAbsSyn )+happyIn329 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap329 x)+{-# INLINE happyIn329 #-}+happyOut329 :: (HappyAbsSyn ) -> HappyWrap329+happyOut329 x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOut329 #-}+happyInTok :: ((Located Token)) -> (HappyAbsSyn )+happyInTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyInTok #-}+happyOutTok :: (HappyAbsSyn ) -> ((Located Token))+happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x+{-# INLINE happyOutTok #-}+++happyExpList :: HappyAddr+happyExpList = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc7\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xcd\x57\xfd\xff\x97\xff\xfb\x19\x04\x41\x03\x20\x2a\x9c\xf9\xff\x7f\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x34\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x73\x11\xfd\xff\xe5\xff\x1c\x04\x41\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x1f\x7f\x70\x00\x00\x41\x03\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x80\x00\x1c\x82\x28\xe8\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x08\x00\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x81\x88\x02\x47\x30\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x29\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x75\x38\xe2\xf0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\xc6\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf0\xe3\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x18\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x80\x00\x1c\x82\x28\xe8\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x75\x08\x40\x10\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x45\x01\x22\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\x85\x1f\x00\x00\x40\x10\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x0c\x09\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xe1\x07\x00\x00\x10\x04\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x00\x00\x40\x10\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7e\x00\x00\x00\x41\x00\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x80\x04\x1d\x82\xa9\xf8\xff\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x52\x74\x08\xe2\xf2\xff\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd1\x21\x88\xce\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x87\x00\x00\x62\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x0a\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd1\x21\x88\xcb\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xe1\x07\x00\x00\x10\x04\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x70\x08\x00\x20\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x08\xc1\xef\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x07\x00\x00\x00\x00\x00\xa2\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x52\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x02\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7e\x00\x00\x00\x41\x00\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7e\x00\x00\x00\x41\x00\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xe1\x07\x00\x00\x10\x04\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x87\x00\x04\x61\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x02\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x20\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x41\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf0\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xc7\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf0\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xc7\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x04\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\x77\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x50\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xf0\x0f\x00\x20\x66\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x12\x74\x08\xa2\xf2\xff\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x48\xd1\x21\x88\x8a\xff\xff\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x80\x00\x1c\x82\x38\xe4\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x07\x00\x00\x00\x00\x00\x20\x80\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x73\x11\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xcd\x45\xf4\xff\x97\xff\x73\x10\x04\x41\x03\x20\x2a\x9c\xf9\xff\x7f\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x08\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xd4\x21\x00\x80\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x0d\x02\x10\x84\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x1c\x02\x00\x88\x19\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x1c\x02\x10\x84\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x20\x41\x87\x20\x2a\xff\xff\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x01\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\x85\x1f\x00\x00\x40\x90\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x1f\x7f\x70\x00\x00\x41\x03\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x7f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x04\x00\x00\x80\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x10\x88\x28\x70\x04\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\xc3\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x18\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf0\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xc7\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\x1c\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x06\x10\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x08\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x34\x40\xa2\xca\x99\xff\x87\xd7\x5f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\xd0\x00\x8c\x2a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7e\x00\x00\x00\x41\x02\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x12\x74\x08\xa2\xe2\xff\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd3\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x12\x74\x08\xa2\xe2\xff\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x20\x41\x87\x20\x2a\xff\xff\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x88\x1a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xcd\x57\xfd\xff\x97\xff\xfb\x19\x04\x41\x03\x20\x2a\x9c\xf9\xff\x7f\xfd\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf0\xe3\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x1c\x02\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x07\x00\x00\x00\x00\x00\xa2\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x87\x00\x00\x62\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x20\x41\x87\x20\x2a\xfe\xff\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\x77\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf0\xe3\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x34\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x40\x83\x00\x00\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf0\xe3\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x08\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x08\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x07\x00\x00\x00\x00\x00\x20\x80\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x34\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x20\x0a\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x80\x28\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x20\x0a\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xf8\x01\x00\x00\x04\x01\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x37\x5f\xf5\xff\x5f\xfe\xef\x67\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x80\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf0\xe3\x13\x7e\x00\x00\x00\x00\x00\x00\x02\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x17\xd1\xff\x5f\xfe\xcf\x41\x10\x04\x0d\x80\xa8\x70\xe6\xff\xff\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x07\x00\x00\x00\x00\x00\x20\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x08\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x50\x87\x00\x00\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x34\x00\xa2\xca\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x1f\x7f\x70\x00\x00\x41\x03\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x80\x04\x1d\x82\xa8\xf8\xff\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x07\x00\x00\x01\x00\x00\x20\x80\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x81\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x0d\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x4c\xff\x7f\xf1\x07\x07\x00\x10\x34\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x31\xfd\xff\xc5\x1f\x1c\x00\x40\xd0\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x80\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x08\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x80\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x08\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x5b\x73\x51\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\xcd\x45\xf5\xff\x97\xff\x73\x10\x04\x41\x03\x20\x2a\x9c\xf9\xff\x7f\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x4b\x73\x55\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\xcd\x55\xf5\xff\x97\xff\x73\x10\x04\x41\x03\x20\x2a\x9c\xf9\xff\x7f\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x8f\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x08\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x07\x00\x00\x00\x00\x00\x20\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf4\xfb\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x1c\x02\x00\x88\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x73\x11\xfd\xff\xe5\xff\x1c\x04\x41\xd0\x00\x88\x0a\x67\xfe\xff\x5f\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\xcd\x45\xf4\xff\x97\xff\x73\x10\x04\x41\x03\x20\x2a\x9c\xf9\xff\x7f\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x33\x20\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x20\x44\xbf\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\x77\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x02\x04\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x0a\x10\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x38\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xc1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x07\x07\x00\x10\x14\x00\xa2\xc2\x99\xff\x87\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x1f\x1c\x00\x40\x50\x00\x88\x0a\x67\xfe\x1f\x5e\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x0d\x44\xf4\xff\x17\x7f\x70\x00\x00\x41\x01\x20\x2a\x9c\xf9\x7f\x78\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x81\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x80\x54\xbf\x3f\xe9\x07\x00\x00\x00\x00\x00\x20\x90\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x0a\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x1d\x02\x00\x80\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xc1\x81\x4f\xf8\x01\x00\x00\x00\x00\x00\x00\x60\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x04\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\x77\x0c\x10\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\xd6\x5c\x54\xff\x7f\xf9\x3f\x07\x41\x10\x34\x00\xa2\xc2\x99\xff\xff\xd7\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x04\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\x77\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\xc0\x21\x00\x80\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf0\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xc7\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\xcd\x55\xf5\xff\x97\xff\x73\x10\x04\x41\x03\x20\x2a\x9c\xf9\xff\x7f\xfd\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x03\x74\x38\xa2\xe0\x77\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfd\xf8\x84\x1f\x80\x01\x0c\xd0\xe1\x88\x82\xdf\x31\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf0\xe3\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd1\xef\x4f\xf8\x01\x00\x00\x00\x00\x00\x08\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x04\x3f\x3e\xe1\x07\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x02\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x3d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x00\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x08\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x02\x04\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x44\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\xf7\x0c\x08\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x40\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf0\xe3\x13\x7e\x00\x06\x20\x40\x87\x23\x0a\x7e\xc7\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x34\x10\xd1\xff\x5f\xfc\xc1\x01\x00\x04\x05\x80\xa8\x70\xe6\xff\xe1\xf5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x10\x04\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x00\xd5\xef\x4f\xf8\x01\x00\x40\x00\x00\x00\x08\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x01\x10\xfc\xf8\x84\x1f\x80\x01\x08\xd0\xe1\x88\x82\xdf\x31\x40\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x04\x40\xf4\xe3\x13\x7e\x00\x06\x20\x50\x87\x23\x0e\x7f\xcf\x00\x00\x8c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfc\xf8\x84\x1f\x00\x00\x00\x00\x00\x80\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x10\x00\xd1\x8f\x4f\xf8\x01\x18\x80\x00\x1d\x8e\x28\xf8\x1d\x03\x00\x30\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x40\xf0\xe3\x13\x7e\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x40\x00\x04\x3f\x3e\xe1\x07\x60\x00\x02\x74\x38\xa2\xe0\x77\x0c\x10\xc0\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\x1c\xf8\x84\x1f\x00\x00\x00\x00\x00\x00\x00\x0e\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x54\xbf\x3f\xe1\x07\x00\x00\x01\x00\x00\x20\x80\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x10\x20\xd5\xef\x4f\xfa\x01\x00\x00\x00\x00\x00\x08\x60\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++{-# NOINLINE happyExpListPerState #-}+happyExpListPerState st =+    token_strs_expected+  where token_strs = ["error","%dummy","%start_parseModule","%start_parseSignature","%start_parseImport","%start_parseStatement","%start_parseDeclaration","%start_parseExpression","%start_parsePattern","%start_parseTypeSignature","%start_parseStmt","%start_parseIdentifier","%start_parseType","%start_parseBackpack","%start_parseHeader","identifier","backpack","units","unit","unitid","msubsts","msubst","moduleid","pkgname","litpkgname_segment","litpkgname","mayberns","rns","rn","unitbody","unitdecls","unitdecl","signature","module","maybedocheader","missing_module_keyword","implicit_top","maybemodwarning","body","body2","top","top1","header","header_body","header_body2","header_top","header_top_importdecls","maybeexports","exportlist","exportlist1","expdoclist","exp_doc","export","export_subspec","qcnames","qcnames1","qcname_ext_w_wildcard","qcname_ext","qcname","semis1","semis","importdecls","importdecls_semi","importdecl","maybe_src","maybe_safe","maybe_pkg","optqualified","maybeas","maybeimpspec","impspec","prec","infix","ops","topdecls","topdecls_semi","topdecl","cl_decl","ty_decl","standalone_kind_sig","sks_vars","inst_decl","overlap_pragma","deriv_strategy_no_via","deriv_strategy_via","deriv_standalone_strategy","opt_injective_info","injectivity_cond","inj_varids","where_type_family","ty_fam_inst_eqn_list","ty_fam_inst_eqns","ty_fam_inst_eqn","at_decl_cls","opt_family","opt_instance","at_decl_inst","data_or_newtype","opt_kind_sig","opt_datafam_kind_sig","opt_tyfam_kind_sig","opt_at_kind_inj_sig","tycl_hdr","tycl_hdr_inst","capi_ctype","stand_alone_deriving","role_annot","maybe_roles","roles","role","pattern_synonym_decl","pattern_synonym_lhs","vars0","cvars1","where_decls","pattern_synonym_sig","decl_cls","decls_cls","decllist_cls","where_cls","decl_inst","decls_inst","decllist_inst","where_inst","decls","decllist","binds","wherebinds","rules","rule","rule_activation","rule_explicit_activation","rule_foralls","rule_vars","rule_var","warnings","warning","deprecations","deprecation","strings","stringlist","annotation","fdecl","callconv","safety","fspec","opt_sig","opt_tyconsig","sigtype","sigtypedoc","sig_vars","sigtypes1","unpackedness","forall_vis_flag","ktype","ktypedoc","ctype","ctypedoc","context","constr_context","type","typedoc","constr_btype","constr_tyapps","constr_tyapp","btype","tyapps","tyapp","atype","inst_type","deriv_types","comma_types0","comma_types1","bar_types2","tv_bndrs","tv_bndr","fds","fds1","fd","varids0","kind","gadt_constrlist","gadt_constrs","gadt_constr_with_doc","gadt_constr","constrs","constrs1","constr","forall","constr_stuff","fielddecls","fielddecls1","fielddecl","maybe_derivings","derivings","deriving","deriv_clause_types","docdecl","docdecld","decl_no_th","decl","rhs","gdrhs","gdrh","sigdecl","activation","explicit_activation","quasiquote","exp","infixexp","infixexp_top","exp10_top","exp10","optSemi","scc_annot","hpc_annot","fexp","aexp","aexp1","aexp2","splice_exp","splice_untyped","splice_typed","cmdargs","acmd","cvtopbody","cvtopdecls0","texp","tup_exprs","commas_tup_tail","tup_tail","list","lexps","flattenedpquals","pquals","squals","transformqual","guardquals","guardquals1","altslist","alts","alts1","alt","alt_rhs","ralt","gdpats","ifgdpats","gdpat","pat","bindpat","apat","apats","stmtlist","stmts","maybe_stmt","e_stmt","stmt","qual","fbinds","fbinds1","fbind","dbinds","dbind","ipvar","overloaded_label","name_boolformula_opt","name_boolformula","name_boolformula_and","name_boolformula_and_list","name_boolformula_atom","namelist","name_var","qcon_nowiredlist","qcon","gen_qcon","con","con_list","sysdcon_nolist","sysdcon","conop","qconop","gtycon","ntgtycon","oqtycon","oqtycon_no_varcon","qtyconop","qtycon","qtycondoc","tycon","qtyconsym","tyconsym","op","varop","qop","qopm","hole_op","qvarop","qvaropm","tyvar","tyvarop","tyvarid","var","qvar","qvarid","varid","qvarsym","qvarsym_no_minus","qvarsym1","varsym","varsym_no_minus","special_id","special_sym","qconid","conid","qconsym","consym","literal","close","modid","commas","bars0","bars","docnext","docprev","docnamed","docsection","moduleheader","maybe_docprev","maybe_docnext","'_'","'as'","'case'","'class'","'data'","'default'","'deriving'","'do'","'else'","'hiding'","'if'","'import'","'in'","'infix'","'infixl'","'infixr'","'instance'","'let'","'module'","'newtype'","'of'","'qualified'","'then'","'type'","'where'","'forall'","'foreign'","'export'","'label'","'dynamic'","'safe'","'interruptible'","'unsafe'","'mdo'","'family'","'role'","'stdcall'","'ccall'","'capi'","'prim'","'javascript'","'proc'","'rec'","'group'","'by'","'using'","'pattern'","'static'","'stock'","'anyclass'","'via'","'unit'","'signature'","'dependency'","'{-# INLINE'","'{-# SPECIALISE'","'{-# SPECIALISE_INLINE'","'{-# SOURCE'","'{-# RULES'","'{-# CORE'","'{-# SCC'","'{-# GENERATED'","'{-# DEPRECATED'","'{-# WARNING'","'{-# UNPACK'","'{-# NOUNPACK'","'{-# ANN'","'{-# MINIMAL'","'{-# CTYPE'","'{-# OVERLAPPING'","'{-# OVERLAPPABLE'","'{-# OVERLAPS'","'{-# INCOHERENT'","'{-# COMPLETE'","'#-}'","'..'","':'","'::'","'='","'\\\\'","'lcase'","'|'","'<-'","'->'","'@'","'~'","'=>'","'-'","'!'","'*'","'-<'","'>-'","'-<<'","'>>-'","'.'","TYPEAPP","'{'","'}'","vocurly","vccurly","'['","']'","'[:'","':]'","'('","')'","'(#'","'#)'","'(|'","'|)'","';'","','","'`'","SIMPLEQUOTE","VARID","CONID","VARSYM","CONSYM","QVARID","QCONID","QVARSYM","QCONSYM","IPDUPVARID","LABELVARID","CHAR","STRING","INTEGER","RATIONAL","PRIMCHAR","PRIMSTRING","PRIMINTEGER","PRIMWORD","PRIMFLOAT","PRIMDOUBLE","DOCNEXT","DOCPREV","DOCNAMED","DOCSECTION","'[|'","'[p|'","'[t|'","'[d|'","'|]'","'[||'","'||]'","TH_ID_SPLICE","'$('","TH_ID_TY_SPLICE","'$$('","TH_TY_QUOTE","TH_QUASIQUOTE","TH_QQUASIQUOTE","%eof"]+        bit_start = st * 482+        bit_end = (st + 1) * 482+        read_bit = readArrayBit happyExpList+        bits = map read_bit [bit_start..bit_end - 1]+        bits_indexed = zip bits [0..481]+        token_strs_expected = concatMap f bits_indexed+        f (False, _) = []+        f (True, nr) = [token_strs !! nr]++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\x45\x00\xe1\xff\x33\x01\x14\x25\xcc\x19\x34\x2c\x3c\x29\x4c\x23\x14\x25\xc5\x42\x13\x3a\x2a\x00\x40\x00\xc5\x45\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x02\x00\x00\x00\x00\x68\x00\x00\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\x23\x01\x23\x01\x00\x00\xde\x00\x5c\x01\x65\x01\x00\x00\x36\x04\x05\x41\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x4a\x00\x00\x00\x00\x00\x00\xa4\x01\xdc\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x41\x0e\x00\x1d\x35\x21\x33\xa0\x33\x5f\x45\x2a\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x2c\x00\x00\x00\x00\xd3\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x01\x47\x09\x16\x02\xc5\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x02\xbd\x16\x00\x00\x00\x00\x34\x2c\x34\x2c\x2c\x2f\x00\x00\x60\x02\x00\x00\x00\x00\x00\x00\x48\x02\x83\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x02\x00\x00\x00\x00\x34\x2c\x3f\x00\xac\x25\x59\x03\xca\x03\x8c\x31\xca\x03\x8c\x31\xef\x02\x24\x01\x05\x03\x94\x2e\x8c\x31\xc4\x2f\x8c\x31\x54\x20\x5c\x1d\xf4\x1d\x9a\x32\x2f\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x2c\x34\x2c\x13\x3a\xb6\x04\x34\x2c\x00\x00\x34\x2c\xfb\x44\x57\x02\x00\x00\x07\x03\x80\x03\x00\x00\x5f\x03\x6c\x03\x00\x00\x00\x00\x00\x00\xf8\x04\x7e\x03\x2f\x03\x81\x00\x2f\x03\xc5\x45\xa7\x47\x7e\x03\x8c\x1e\x00\x00\x13\x03\x8c\x31\x13\x03\x13\x03\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x07\x00\x00\x00\x00\x00\x00\x00\x00\x05\x41\xd0\x03\xb7\x03\xbd\x02\x9f\x04\x00\x00\x9c\x35\xf9\x00\xe2\x47\xce\x03\x0f\x48\x0f\x48\x7a\x47\x8c\x31\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x03\x00\x00\xcb\x03\x3c\x04\xd4\x03\x56\x04\xf7\x03\x88\x04\x00\x00\x00\x00\x00\x00\x4b\x04\x60\x04\x59\x00\x8f\x02\x8f\x02\xa8\x04\x8d\x04\x58\x04\x8c\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x31\x7b\x04\x0a\x07\x47\x01\x00\x00\x80\x00\xa6\x04\x53\x01\x00\x00\x80\x00\x54\x01\x00\x00\x90\x04\xab\x02\x0d\x49\xcc\x04\x43\x01\x37\x01\x00\x00\x1a\x04\x1a\x04\x5d\x00\xce\x04\xd4\x04\xd0\x00\x0d\x3d\x05\x41\x52\x03\x13\x3a\xe4\x04\xf0\x04\xfc\x04\x0d\x05\x00\x00\x30\x05\x00\x00\x00\x00\x00\x00\x05\x41\x13\x3a\x05\x41\x0c\x05\x0e\x05\x00\x00\x58\x04\x00\x00\xfc\x2d\x00\x00\x00\x00\x1b\x36\x8f\x43\x05\x41\x26\x05\x00\x05\x00\x00\x22\x05\xbd\x16\x96\x02\x1e\x05\x00\x00\x34\x2c\x00\x00\x00\x00\x00\x00\x49\x05\x4f\x05\x5e\x05\x64\x05\x24\x1f\xec\x20\x00\x00\xc4\x2f\x00\x00\x00\x00\x8f\x43\x1c\x05\x41\x05\x8b\x05\x00\x00\x8c\x05\x00\x00\x89\x05\x00\x00\xf2\x45\x31\x00\xc5\x45\x00\x00\xb7\x00\xc5\x45\x13\x3a\xc5\x45\x00\x00\xd6\x05\xc4\x1c\xc4\x1c\x53\x49\x9a\x36\x3b\x04\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x05\x89\x09\xc6\x02\xdc\x05\x9d\x05\xa5\x05\x00\x00\x00\x00\xcf\x05\x65\x04\xdf\x05\x00\x00\x00\x00\x70\x0b\x00\x00\x00\x00\xb2\x01\xf9\x05\x00\x00\x00\x00\xbc\x1f\x00\x00\xff\x05\xf4\x01\x0a\x06\x04\x06\x00\x00\x00\x00\x5c\x30\x00\x00\x00\x00\xf4\x30\x16\x05\x8c\x31\x09\x06\x3e\x06\x40\x06\x41\x06\x00\x00\x00\x00\x44\x26\x44\x26\x28\x06\x00\x00\x87\x06\x2e\x06\x57\x00\x00\x00\x00\x00\xd4\x29\x4c\x06\x00\x00\x8a\x06\x8c\x31\x34\x2c\x8c\x45\x00\x00\x84\x41\x00\x00\x00\x00\x34\x2c\x13\x3a\x34\x2c\x34\x2c\x34\x2c\x34\x2c\x2f\x06\x30\x06\x2d\x03\x38\x06\x39\x06\x9b\x01\x3a\x06\x3b\x06\x3c\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x3a\x1f\x34\x28\x45\x36\x06\x37\x06\x3c\x01\x3d\x06\x3f\x06\x88\x03\x00\x00\xfb\x02\x42\x06\x2c\x03\x45\x06\x00\x00\xba\x01\x00\x00\x48\x06\x00\x00\xbe\x01\x00\x00\x53\x49\x00\x00\x97\x44\x00\x00\x00\x00\x4f\x00\x07\x4a\x00\x00\xc7\x32\x05\x41\x00\x00\x13\x3a\x13\x3a\x13\x3a\xb0\x00\x00\x00\x94\x0f\x54\x00\x00\x00\x4a\x06\x00\x00\x9d\x03\x9d\x03\x15\x03\x00\x00\x00\x00\x15\x03\x00\x00\x00\x00\xa2\x06\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x06\x98\x06\x5f\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x06\x00\x00\x13\x3a\x00\x00\x00\x00\x3f\x01\x00\x00\x34\x03\x50\x06\x00\x00\x00\x00\x13\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x3a\x00\x00\x00\x00\x00\x00\x13\x3a\x13\x3a\x00\x00\x00\x00\x52\x06\x51\x06\x5a\x06\x61\x06\x62\x06\x63\x06\x64\x06\x68\x06\x70\x06\x71\x06\x72\x06\x73\x06\x7b\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x06\x00\x00\x77\x06\x9a\x06\x00\x00\x00\x00\x00\x00\x16\x05\x23\x02\x96\x06\x80\x06\x00\x00\x00\x00\x00\x00\xdc\x06\x00\x00\x34\x2c\x34\x2c\x61\x00\x00\x00\xe3\x00\x34\x2c\x00\x00\x00\x00\xa8\x06\x00\x00\x00\x00\x7c\x24\x34\x19\xf4\x30\xa5\x06\xe4\x23\x00\x00\x34\x2c\xdc\x26\xe4\x23\x00\x00\x8c\x06\x00\x00\x00\x00\x00\x00\x84\x21\xab\x06\x00\x00\x13\x32\x00\x00\x00\x00\x00\x00\x00\x00\xcc\x19\x59\x00\x9c\x06\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x06\x00\x00\x9d\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x48\x00\x00\x00\x00\xb3\x06\x00\x00\x62\x00\xbe\x06\x05\x41\x07\x4a\x87\x01\x6a\x00\x00\x00\x00\x00\x79\x0e\x00\x00\x1c\x22\xb4\x22\x68\x01\x00\x00\xc0\x06\x56\x01\x3d\x02\xc5\x06\x00\x00\xc8\x06\xc6\x06\xa0\x06\xaf\x06\xd0\x06\x00\x00\xd5\x06\xb7\x06\xb9\x06\x4a\x48\x4a\x48\x00\x00\xd9\x06\xf3\x03\x7e\x03\xb4\x06\xb5\x06\xd6\x06\x00\x00\xbc\x06\x5d\x0c\x00\x00\x00\x00\x34\x2c\xe4\x23\x3c\x00\x8c\x3d\x1d\x00\x00\x00\xd2\x06\x97\x01\xdd\x06\x07\x4a\x00\x00\x00\x00\x58\x00\x00\x00\x34\x2c\xd4\x29\x05\x41\x0e\x07\x00\x00\xdf\x06\xca\x06\x00\x00\x9f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x1c\x07\x5c\x00\x19\x06\x3c\x03\x00\x00\xe8\x06\x07\x4a\x9a\x36\x9a\x36\x52\x03\xa5\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x42\x40\x32\xcd\x06\x9a\x36\x00\x00\x40\x32\x53\x49\x6c\x2a\x6c\x2a\x1f\x07\x00\x00\x3b\x01\x00\x00\xc7\x06\x00\x00\xcb\x06\x00\x00\x00\x00\x77\x48\x77\x48\x00\x00\x00\x00\x77\x48\x8c\x31\xef\x06\xfd\x06\x00\x00\x00\x00\x35\x07\x00\x00\xf8\x03\xf8\x03\x00\x00\x00\x00\x00\x00\x43\x07\x00\x00\xe3\x06\x00\x00\xcc\x19\xff\x06\x80\x00\x80\x00\xff\x06\xec\x06\x00\x00\x00\x00\x00\x00\x1b\x07\x00\x00\x00\x00\x00\x00\x69\x02\x00\x00\x00\x00\x79\x01\x05\x07\x34\x2c\x80\x49\x57\x07\x00\x00\x0f\x07\x02\x07\x00\x00\x00\x00\x08\x07\x00\x00\x35\x42\x00\x00\x25\x07\x28\x07\x2e\x07\x2f\x07\xad\x49\x00\x00\x00\x00\x00\x00\x30\x07\x00\x00\x2a\x07\x13\x3a\x38\x07\x13\x3a\x07\x4a\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x05\x13\x3a\x00\x00\x00\x00\x13\x3a\x1d\x07\x00\x00\xa8\x46\x00\x00\x55\x05\x00\x00\x3c\x07\x75\x07\x00\x00\x00\x00\x68\x05\x4f\x00\x05\x41\x3d\x07\x19\x37\x19\x37\x77\x07\x8d\x07\x46\x07\x13\x3a\x1d\x00\x3f\x07\x00\x00\x34\x4a\x00\x00\x55\x07\x00\x00\x00\x00\x50\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x3a\x00\x00\x40\x07\x13\x3a\x00\x00\x00\x00\x00\x00\x32\x07\x00\x00\xc4\x1c\x34\x2c\x00\x00\x00\x00\x98\x37\xad\x49\x4f\x00\x4f\x07\x05\x41\x98\x37\x98\x37\x3b\x04\x00\x00\x00\x00\x44\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x02\x00\x00\x00\x00\x00\x00\xaa\x01\x00\x00\x00\x00\xcc\x2c\x00\x00\x00\x00\x64\x2d\x00\x00\x59\x00\x48\x07\x00\x00\x85\x05\x00\x00\x74\x27\x58\x07\x00\x00\x33\x07\x00\x00\x00\x00\x0c\x28\x00\x00\x00\x00\x00\x00\x64\x2d\x04\x2b\x64\x2d\x00\x00\x00\x00\xe4\x23\x8c\x45\x00\x00\x00\x00\x00\x00\x13\x3a\x00\x00\x00\x00\x6a\x07\x00\x00\x53\x07\x5e\x07\x36\x07\x13\x3a\x00\x00\x13\x3a\xdf\x48\x7e\x05\x00\x00\x5c\x07\x5c\x07\xad\x07\xd6\x03\xb0\x07\x00\x00\x30\x00\x30\x00\x00\x00\x60\x07\x45\x07\x00\x00\x47\x07\x00\x00\x00\x00\x61\x07\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x07\x00\x00\x78\x07\x00\x00\x00\x00\x00\x00\xb6\x07\x81\x07\x64\x2d\x9c\x2b\x00\x00\x00\x00\xa7\x07\x27\x04\xa4\x28\xa4\x28\x64\x2d\x68\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x37\x98\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x07\x6d\x07\x93\x07\x00\x00\x94\x07\x00\x00\x82\x07\x05\x41\xc7\x07\xdd\x07\x00\x00\x65\x07\x00\x00\xe0\x07\x00\x00\x4c\x00\xe0\x07\x99\x05\x98\x37\x85\x04\x17\x38\x00\x00\x00\x00\x64\x2d\x00\x00\x64\x1a\x64\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x1a\xfc\x1a\x00\x00\x00\x00\x00\x00\xe1\x07\xc7\x32\x00\x00\x05\x41\x13\x3a\xb2\x07\x96\x38\x00\x00\x00\x00\xad\x49\x00\x00\x00\x00\xaa\x05\xa2\x07\xda\x49\x00\x00\x40\x32\x09\x0b\x00\x00\x00\x00\xa0\x07\x00\x00\x8c\x07\x00\x00\x9d\x03\x00\x00\xf0\x07\xc0\x07\xc5\x07\xf8\x07\xa4\x07\x00\x00\xb0\x05\x00\x00\x00\x00\xb0\x05\xfe\x07\x00\x00\x00\x00\x64\x2d\xc8\x07\x00\x00\xfd\x07\xc4\x1c\xc4\x1c\x00\x00\x00\x00\x96\x38\x00\x00\xca\x07\x00\x00\xc6\x07\x00\x00\xca\x05\x00\x00\x0a\x08\x00\x00\x6a\x01\x00\x00\x00\x00\x0a\x08\x40\x02\x00\x00\xc7\x32\x00\x00\x00\x00\x8f\x01\x00\x00\xf9\x07\x64\x2d\x15\x39\x75\x02\x00\x00\x00\x00\x00\x00\xf0\x05\xf0\x05\x00\x00\x83\x03\xea\x07\x97\x07\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x34\x00\x00\x25\x00\x00\x00\x08\x08\x00\x00\x1e\x08\x00\x00\x05\x41\x00\x00\x00\x00\x13\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x2d\x64\x2d\x64\x2d\x00\x00\x00\x00\x00\x00\xa9\x07\x26\x08\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x01\x00\x00\x7b\x00\x62\x42\xc4\x02\xda\x05\xd1\x07\x00\x00\xbc\x43\xd6\x03\x00\x00\x00\x00\x00\x00\xda\x05\x00\x00\x00\x00\x00\x00\x00\x00\xd6\x03\xc9\x07\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x03\xb8\x03\x61\x04\xa9\x0a\xd6\x03\x00\x00\x00\x00\x00\x00\x43\x00\xd4\x07\xcb\x07\x8f\x42\x02\x08\x9d\x03\x00\x00\x64\x2d\xf4\x07\x00\x00\x00\x00\x15\x08\x00\x00\xee\x07\x00\x00\x00\x00\x0b\x3e\x34\x4a\xfa\x07\xd6\x07\xe5\x07\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\xdc\x07\x00\x00\x05\x08\xe7\x07\xf5\x07\x00\x00\x94\x1b\x00\x00\x6d\x04\x8a\x3e\x05\x41\x37\x18\x05\x41\x00\x00\x00\x00\x00\x00\x2c\x1c\x8a\x3e\x00\x00\x00\x00\x16\x08\x00\x00\x92\x3a\x11\x3b\xc7\x32\x90\x3b\x00\x00\xf0\x01\xd6\x02\xda\x49\x90\x3b\x00\x00\x58\x08\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x08\x4b\x00\x9d\x03\xf2\x07\x07\x08\x00\x00\x00\x00\x00\x00\xc7\x32\x00\x00\xff\x01\x00\x00\x59\x00\xf5\x02\x06\x08\x09\x3f\x00\x00\x00\x00\x11\x08\x94\x39\x8e\x04\x00\x00\x00\x00\x90\x3b\x0f\x3c\x00\x00\x00\x00\x7e\x03\x94\x39\xf0\x05\x00\x00\x00\x00\x94\x39\xe8\x07\x14\x08\x12\x08\x00\x00\x8e\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x05\x41\x64\x2d\xf7\x07\x00\x00\x26\x02\x9d\x03\x00\x00\x9d\x03\x00\x00\x9d\x03\x00\x00\x00\x00\x0d\x08\x0e\x08\x13\x08\x19\x08\x00\x00\x98\x02\x00\x00\x00\x00\x00\x00\x5d\x44\x0b\x08\x00\x00\x00\x00\xd6\x03\x1c\x08\x0c\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x03\x00\x00\x7e\x08\xc7\x02\x00\x00\x3d\x00\x26\x02\x21\x08\x33\x08\x00\x00\x00\x00\x00\x00\x88\x3f\x00\x00\x04\x08\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x08\x3b\x08\x21\x33\x00\x00\x00\x00\x34\x4a\x00\x00\x00\x00\x1d\x00\x00\x00\x00\x00\x07\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x08\xd6\x03\x00\x00\x00\x00\x2a\x08\xd6\x03\x00\x00\x76\x08\x89\x08\x47\x08\xc7\x32\x00\x00\x86\x40\x00\x00\x00\x00\x7d\x08\x2e\x08\x50\x09\x9d\x03\x00\x00\x9d\x03\x9d\x03\x00\x00\x9d\x03\x5d\x44\x00\x00\x00\x00\xf5\x43\x00\x00\x00\x00\x00\x00\x00\x00\x24\x08\x4d\x08\x00\x00\x9d\x03\x82\x08\xe6\x05\x00\x00\x00\x00\x95\x08\x35\x08\x00\x00\x00\x00\x00\x00\x00\x00\xe6\x05\x2c\x08\x9d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\x05\x00\xfe\xff\x72\x08\x01\x4e\x4a\x01\x95\x52\xbd\x51\xd0\xff\x49\x4e\x01\x00\x81\x12\x71\x00\x07\x00\x92\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x04\x00\x00\x00\x00\x00\x00\x90\x02\x00\x00\x00\x00\x00\x00\xba\x02\x00\x00\x00\x00\xf6\x04\x02\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x04\x2c\x00\x9e\x12\x34\x0e\x14\x0e\x86\x02\x35\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x04\x73\x07\x24\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x0b\x00\x00\x00\x00\x25\x53\x6d\x53\xfc\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\x53\xb7\x07\x55\x50\x40\x05\xbc\x07\xdd\x35\xbd\x07\x5c\x36\x00\x00\x00\x00\x00\x00\x24\x13\xdb\x36\x10\x14\x5a\x37\x01\x4a\x79\x45\x5f\x46\x50\x3c\x4b\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\x53\x95\x5b\xbb\x12\xda\x07\x45\x54\x00\x00\x8d\x54\x69\x04\x75\x08\x00\x00\x00\x00\xf0\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x05\xa1\x01\x06\x05\x31\x05\x37\x05\x3a\x03\xf7\x06\x47\x02\xec\x45\x00\x00\x00\x00\xd9\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x01\x00\x00\x00\x00\x00\x00\x00\x00\x57\x03\x00\x00\x00\x00\xfd\x05\x6c\x08\x00\x00\x1a\x01\x31\x08\x94\x00\xdb\x05\x81\x02\x1d\x01\xd1\x05\xd7\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x08\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x01\x00\x00\x21\x02\x00\x00\x9b\x02\x86\x07\x87\x07\x88\x07\x83\x08\x00\x00\x94\x04\x56\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd5\x39\xb4\x07\xe2\x04\x00\x00\x00\x00\x42\x08\x00\x00\x00\x00\x00\x00\x45\x08\x00\x00\x00\x00\xdd\x05\x00\x00\xc0\xff\x00\x00\xb9\x00\xfe\x02\x00\x00\x46\x08\x48\x08\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x04\x44\x16\x7d\x03\xe9\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x16\xa9\x10\x78\x16\x28\x08\x00\x00\x00\x00\xb3\x04\x00\x00\x60\x34\x00\x00\x00\x00\x56\x08\x24\x03\xb1\x07\x6e\x08\x00\x00\x00\x00\x00\x00\xdd\x0c\x8c\xff\x00\x00\x00\x00\xdd\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x4a\x4b\x4b\x00\x00\x10\x14\x00\x00\x00\x00\xe6\x03\x00\x00\x4c\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x05\x00\x00\x03\x04\x00\x00\x00\x00\x06\x04\x0b\x0f\x23\x04\x00\x00\x00\x00\x08\x03\x50\x03\xb7\xff\x7c\x08\xeb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x01\x9a\x07\x00\x00\x00\x00\x00\x00\x0d\x00\x11\x00\x00\x00\x12\x0e\x00\x00\x00\x00\x00\x00\x0c\x04\xfb\x07\x00\x00\x8c\xff\x00\x00\x00\x00\x00\x00\x6f\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x3a\x00\x00\x00\x00\x7b\x09\xf1\x07\xd3\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\x4e\xd9\x4e\x00\x00\x00\x00\x00\x00\x10\x08\x7f\xff\x00\x00\x00\x00\x26\x4f\x72\x05\x00\x00\x00\x00\x52\x3b\xd5\x54\x4f\x02\x00\x00\x2d\x05\x00\x00\x00\x00\xb1\x5c\x8c\x10\x1d\x55\x65\x55\xad\x55\xf5\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x10\xee\x0d\x75\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\x02\x00\x00\xac\x00\x00\x00\xb1\x04\x00\x00\x00\x00\x4a\x08\x55\x01\x00\x00\x8a\xff\xdd\x16\x00\x00\x45\x15\x62\x15\x50\x13\x00\x00\x00\x00\x16\x00\xb3\x07\x00\x00\xda\x01\x00\x00\xa6\x07\xaf\x07\xca\x08\x00\x00\x00\x00\xd0\x08\x00\x00\x00\x00\xb9\x08\x00\x00\x00\x00\x00\x00\x00\x00\xe7\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x15\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x03\x00\x00\x00\x00\x00\x00\xe3\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x11\x00\x00\x00\x00\x00\x00\x95\x11\xb2\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x08\x03\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x56\x85\x56\xc4\x07\x00\x00\x00\x00\xcd\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x4f\xb7\x49\x5e\x35\x00\x00\xb9\x4b\x00\x00\x15\x57\x71\x4d\x27\x4c\x00\x00\x8f\xff\x00\x00\x00\x00\x00\x00\xdd\x4a\x00\x00\x00\x00\xc4\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x92\x01\xcd\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x02\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x07\x00\x00\x1e\x18\x90\x01\x00\x00\xce\x07\x00\x00\x00\x00\x78\x01\x00\x00\x00\x00\x00\x00\xd0\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x06\xa0\x04\x00\x00\x00\x00\xb8\x02\x5c\x02\x00\x00\x00\x00\x25\x05\x00\x00\x00\x00\x12\x0e\x00\x00\x00\x00\xb1\x5c\x95\x4c\x00\x00\x0f\x08\xb0\xff\x00\x00\x00\x00\xc1\x07\x00\x00\x99\x01\x00\x00\x00\x00\x06\x00\x00\x00\x5d\x57\xc0\x4f\xf7\x16\x8e\x08\x1e\x04\xa4\x08\x00\x00\x00\x00\xb6\x08\x00\x00\x00\x00\x00\x00\x00\x00\x93\x08\x77\x05\x4a\x05\xab\x08\x00\x00\x00\x00\x9d\x01\x32\x0c\x4f\x0c\x02\x04\xc1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\xff\xdc\x02\xd7\x07\xbe\x08\x00\x00\xd4\xff\x51\x00\x05\x52\x4d\x52\x8f\x08\x00\x00\x00\x00\x00\x00\x91\x08\x00\x00\x8a\x08\x00\x00\x00\x00\xc0\x00\xd3\x07\x00\x00\x00\x00\xdc\x00\xd1\x3b\x00\x00\x00\x00\x00\x00\x00\x00\xd2\x08\x00\x00\xf2\x08\xf3\x08\x00\x00\x00\x00\x00\x00\xe8\x02\x00\x00\xe0\x08\x00\x00\x92\x01\xed\x08\x94\x08\x9b\x08\xef\x08\xde\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x5c\xe5\xff\xb5\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x13\xd5\x08\x8a\x13\x56\x00\x00\x00\xbb\x08\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x08\xa0\x0f\x00\x00\x00\x00\xa7\x13\x00\x00\x00\x00\x4b\x02\x00\x00\xbc\x08\x00\x00\x00\x00\xb7\x08\x00\x00\x00\x00\xf2\x05\x9c\x08\x11\x17\x00\x00\x28\x0b\x45\x0b\x7f\x08\x33\x05\x00\x00\x3c\x14\xbf\xff\x00\x00\x00\x00\xe4\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x0f\x00\x00\x00\x00\xda\x0f\x00\x00\x00\x00\x00\x00\x6b\x05\x00\x00\xcf\x06\xa5\x57\x00\x00\x00\x00\x1c\x09\xa7\x03\x9e\x08\x00\x00\x24\x17\x6c\x0c\x02\x0d\x0e\x03\x00\x00\x00\x00\xfd\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x57\x00\x00\x00\x00\x35\x58\x00\x00\x01\x08\x00\x00\x00\x00\xbd\x04\x00\x00\x0d\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x50\x00\x00\x00\x00\x00\x00\x7d\x58\x2d\x51\xc5\x58\x00\x00\x00\x00\x03\x4d\xf6\x01\x00\x00\x00\x00\x00\x00\xcf\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x03\x14\x16\x00\x00\x59\x14\x22\x00\x24\x09\x00\x00\x17\x09\x18\x09\x00\x00\x15\x00\x00\x00\x00\x00\xfb\xff\xfd\xff\x00\x00\x00\x00\x71\x03\x00\x00\xa1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x08\x52\x08\x0d\x59\x75\x51\x00\x00\x00\x00\x00\x00\x00\x00\xb9\x4d\xe5\x50\x55\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x0d\x3c\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x17\x9a\x08\x6a\x05\x00\x00\x84\x00\x00\x00\x8d\x08\x00\x00\x0c\x00\x6d\x05\x00\x00\x59\x0d\x00\x00\x62\x0b\x00\x00\x00\x00\x9d\x59\x00\x00\xeb\x03\x33\x04\x00\x00\x9f\x08\xc4\x05\x00\x00\x00\x00\x00\x00\x29\x02\x71\x02\x00\x00\x00\x00\x00\x00\xf8\x08\x1b\x00\x00\x00\xbd\x17\x76\x14\x00\x00\x5e\x09\x00\x00\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe8\xff\x00\x00\xeb\x02\x12\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x09\x00\x00\x00\x00\x2f\x09\x14\x09\x00\x00\x00\x00\xe5\x59\x00\x00\x00\x00\x00\x00\xcd\x05\x4e\x06\x00\x00\x00\x00\x84\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x01\x09\x00\x00\x2b\x08\x00\x00\x00\x00\x03\x09\x00\x00\x00\x00\x4b\x02\x00\x00\x00\x00\x2d\x08\x00\x00\x09\x09\x6d\x5c\x99\x06\x00\x00\x00\x00\x00\x00\x00\x00\x77\x02\xb1\x02\x00\x00\xdc\xff\x19\x09\x29\x08\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x0b\x00\x00\x42\x03\x00\x00\xaf\x08\x00\x00\x70\x05\x00\x00\x37\x0a\x00\x00\x00\x00\xf7\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x5a\x75\x5a\xbd\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x08\x00\x00\x00\x00\x26\x00\x00\x00\x43\x09\x00\x00\x00\x00\x55\x00\xe3\xff\x00\x00\x00\x00\x00\x00\x4e\x09\x00\x00\xe6\x02\xe7\x02\x00\x00\x27\x00\x3d\x09\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x08\x53\x04\xdb\x02\x84\x04\x2b\x00\x00\x00\x00\x00\x00\x00\x03\x00\x64\x09\x00\x00\x29\x00\x3f\x09\x4b\x08\x00\x00\x05\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x0a\x34\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x05\x00\x00\x25\x09\x18\x07\xd7\x17\x12\x0e\xea\x17\x00\x00\x00\x00\x00\x00\xca\x04\x52\x07\x00\x00\x00\x00\x27\x09\x00\x00\x24\x05\x31\x06\x46\x00\x93\x14\x00\x00\x62\x08\x00\x00\x20\x00\x31\x16\x00\x00\x5c\x09\x00\x00\x3a\x02\x5f\x02\x00\x00\x64\x08\x00\x00\x44\x06\x66\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x02\x00\x00\x65\x08\x00\x00\x68\x08\x00\x00\x00\x00\x22\x08\x00\x00\x00\x00\x46\x09\xca\x09\x48\x09\x00\x00\x00\x00\x28\x15\x64\x12\x00\x00\x00\x00\x2d\x01\x24\x0a\x39\x04\x00\x00\x00\x00\x15\x0c\x95\x03\x00\x00\x00\x00\x00\x00\x91\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x04\x18\x4d\x5b\x00\x00\x00\x00\x86\x09\x78\x08\x00\x00\xff\xff\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x01\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8e\x09\x88\x09\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x0a\x00\x00\x98\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\x0e\x00\x00\x00\x00\x52\x01\x00\x00\x00\x00\xc9\xff\x00\x00\x00\x00\x76\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x06\x09\x73\x05\x00\x00\x1c\x00\x00\x00\x91\x0a\x00\x00\x00\x00\x00\x00\x8d\x09\x1f\x00\x7a\x08\x00\x00\x02\x00\x8b\x08\x00\x00\xf5\xff\x5f\x00\x00\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x08\x00\x00\x99\x09\x00\x00\x00\x00\x76\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x09\x00\x00\x90\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyAdjustOffset :: Happy_GHC_Exts.Int# -> Happy_GHC_Exts.Int#+happyAdjustOffset off = off++happyDefActions :: HappyAddr+happyDefActions = HappyA# "\xbf\xff\xc0\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\xfd\x00\x00\x00\x00\xbe\xff\xbf\xff\x00\x00\xf2\xff\x0a\xfd\x07\xfd\x04\xfd\xf4\xfc\xf2\xfc\xf3\xfc\x00\xfd\xf1\xfc\xf0\xfc\xef\xfc\x02\xfd\x01\xfd\x03\xfd\xff\xfc\xfe\xfc\xee\xfc\xed\xfc\xec\xfc\xeb\xfc\xea\xfc\xe9\xfc\xe8\xfc\xe7\xfc\xe6\xfc\xe5\xfc\xe3\xfc\xe4\xfc\x00\x00\x05\xfd\x06\xfd\x00\x00\x8a\xff\x00\x00\xb0\xff\xc1\xff\x8a\xff\xc2\xfc\x00\x00\x00\x00\x00\x00\x7b\xfe\x00\x00\x9f\xfe\x00\x00\x98\xfe\x91\xfe\x84\xfe\x83\xfe\x81\xfe\x6f\xfe\x6e\xfe\x00\x00\x7a\xfe\x41\xfd\x7f\xfe\x3c\xfd\x32\xfd\x35\xfd\x2c\xfd\x79\xfe\x7e\xfe\x13\xfd\x10\xfd\x66\xfe\x5b\xfe\x0e\xfd\x0d\xfd\x0f\xfd\x00\x00\x00\x00\x29\xfd\x25\xfd\x28\xfd\x27\xfd\x78\xfe\x26\xfd\x00\x00\xbe\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\xfd\x2f\xfd\x2a\xfd\x2b\xfd\x33\xfd\x2d\xfd\x2e\xfd\x68\xfd\x67\xfe\x68\xfe\xc9\xfd\x00\x00\x0f\xfe\x0e\xfe\x00\x00\xf1\xff\x57\xfd\x4a\xfd\x56\xfd\xef\xff\xf0\xff\x17\xfd\xfc\xfc\xfd\xfc\xf8\xfc\xf5\xfc\x55\xfd\xdf\xfc\x46\xfd\xdc\xfc\xd9\xfc\xf7\xfc\xe2\xfc\xe0\xfc\xe1\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfc\xf6\xfc\xda\xfc\xde\xfc\xf9\xfc\xdb\xfc\xcd\xfd\x75\xfd\x08\xfe\xff\xfd\x07\xfe\x00\x00\x00\x00\x00\xfe\xf5\xfd\xe9\xfd\xe7\xfd\xd9\xfd\xd8\xfd\x00\x00\x00\x00\x7b\xfd\x78\xfd\xe4\xfd\xe3\xfd\xe5\xfd\xe6\xfd\xe2\xfd\xda\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\xfd\xd8\xfc\xd7\xfc\xe1\xfd\xe0\xfd\xd4\xfc\xd3\xfc\xd6\xfc\xd5\xfc\xd2\xfc\xd1\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\xfd\x00\x00\xd3\xfd\x77\xff\x1c\xfe\x00\x00\x00\x00\x05\xfe\x00\x00\x07\xfd\x75\xff\x74\xff\x73\xff\x00\x00\x00\x00\x13\xfe\x13\xfe\x13\xfe\x00\x00\x65\xfd\x00\x00\x00\x00\x89\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xff\x6c\xff\x6b\xff\x6a\xff\x13\xff\x69\xff\x68\xff\x28\xfe\x62\xff\x27\xfe\x30\xfe\x61\xff\x2b\xfe\x60\xff\x2f\xfe\x2e\xfe\x2d\xfe\x2c\xfe\x00\x00\x27\xff\x00\x00\x45\xff\x4e\xff\x26\xff\x00\x00\x00\x00\x00\x00\xda\xfe\xc4\xfe\xc9\xfe\x00\x00\x00\x00\xc6\xfc\xc5\xfc\xc4\xfc\xc3\xfc\x00\x00\x79\xfd\x00\x00\x84\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8a\xff\xc2\xff\x8a\xff\x00\x00\x87\xff\x00\x00\x00\x00\x00\x00\x82\xff\x00\x00\x00\x00\x00\x00\x5a\xfd\x51\xfd\x5b\xfd\x0c\xfd\x53\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xca\xfe\x00\x00\x5d\xfd\x00\x00\xc5\xfe\x00\x00\x00\x00\xdb\xfe\xd8\xfe\x00\x00\x50\xfd\x00\x00\x00\x00\x00\x00\x66\xff\x00\x00\x00\x00\x00\x00\x00\x00\x91\xfe\x41\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\xff\x00\x00\x47\xff\x49\xff\x48\xff\x00\x00\x61\xfe\x00\x00\x58\xfe\x00\x00\x1a\xff\x00\x00\x1d\xfd\x00\x00\x1c\xfd\x1e\xfd\x00\x00\x00\x00\x00\x00\x13\xff\x00\x00\x88\xfd\xbe\xfd\x08\xfe\x00\x00\x00\x00\x1a\xfd\x00\x00\x19\xfd\x1b\xfd\x15\xfd\xfa\xfc\x00\x00\xfb\xfc\x46\xfd\x00\x00\x00\x00\xc7\xfc\xf7\xfc\x4e\xfd\xcb\xfc\x00\x00\x50\xfd\xab\xfe\x00\x00\x66\xfd\x64\xfd\x62\xfd\x61\xfd\x5e\xfd\x00\x00\x00\x00\x00\x00\x12\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe2\xfe\x00\x00\xe5\xfe\xe5\xfe\x00\x00\x00\x00\x00\x00\x76\xff\xd4\xfd\x44\xfd\xd5\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\xff\x6e\xff\x00\x00\x00\x00\x00\x00\xd6\xfd\xd7\xfd\x00\x00\xc4\xfd\xe6\xfd\x00\x00\x00\x00\xfa\xfc\xfb\xfc\x00\x00\x4c\xfd\x00\x00\xb2\xfd\x00\x00\xb1\xfd\x49\xfd\x86\xfd\x03\xfe\xf3\xfd\x85\xfd\x82\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xfd\x77\xfd\x7c\xfd\x7c\xfd\x00\x00\xeb\xfd\x74\xfd\xfc\xfd\x00\x00\xee\xfd\x8d\xfd\x00\x00\x00\x00\xec\xfd\x00\x00\x00\x00\x00\x00\x72\xfd\xf8\xfd\x00\x00\x02\xfe\xfe\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xfe\x59\xfd\x58\xfd\x7d\xfe\x7c\xfe\x6a\xfe\x20\xfd\x61\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x60\xfe\x00\x00\x00\x00\x00\x00\x74\xfe\x00\x00\x35\xfd\x00\x00\x00\x00\x76\xfe\x00\x00\x3d\xfd\x00\x00\x3e\xfe\x3c\xfe\xbf\xfc\x00\x00\x80\xfe\x00\x00\xa2\xfe\xa3\xfe\x00\x00\x5b\xfe\x5a\xfe\x00\x00\x00\x00\x82\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe8\xff\x00\x00\x00\x00\xad\xff\x87\xff\xac\xff\x00\x00\x00\x00\xbb\xff\xce\xfc\xcd\xfc\xbb\xff\xab\xff\xa9\xff\xaa\xff\x8b\xff\xec\xff\xcf\xfc\xd0\xfc\xe9\xff\x00\x00\xd8\xff\xdc\xff\xd9\xff\xdb\xff\xda\xff\xdd\xff\xeb\xff\x51\xfe\x9e\xfe\x9a\xfe\x90\xfe\x99\xfe\x00\x00\x5c\xfe\x00\x00\xa0\xfe\xa1\xfe\x00\x00\xa6\xfe\x00\x00\x00\x00\x77\xfe\x71\xfe\x00\x00\x3e\xfd\x40\xfd\xcc\xfc\x3b\xfd\x70\xfe\x00\x00\x3f\xfd\x72\xfe\x73\xfe\x00\x00\x00\x00\x12\xfd\x34\xfd\x00\x00\x00\x00\x00\x00\x29\xfd\x28\xfd\x27\xfd\x78\xfe\x26\xfd\x2a\xfd\x2b\xfd\x2e\xfd\x60\xfe\x00\x00\x62\xfe\xc8\xfd\xed\xff\xee\xff\x4d\xfd\x54\xfd\x08\xfd\x4b\xfd\x45\xfd\x16\xfd\x09\xfe\x0a\xfe\x0b\xfe\x0c\xfe\x0d\xfe\xa9\xfe\x06\xfe\xf7\xfd\x00\x00\x73\xfd\x70\xfd\x6d\xfd\x6f\xfd\x76\xfd\xf4\xfd\x00\x00\x00\x00\x00\x00\x9e\xfd\x9c\xfd\x8e\xfd\x8b\xfd\x00\x00\xfd\xfd\x00\x00\x00\x00\x00\x00\x7d\xfd\x00\x00\x00\x00\xfb\xfd\xfa\xfd\x00\x00\x84\xfd\xf0\xfd\x00\x00\x00\x00\x82\xfd\x00\x00\x00\x00\xdb\xfd\xb0\xfd\x00\x00\x00\x00\x09\xfd\xb4\xfd\xb8\xfd\xdc\xfd\xba\xfd\xb3\xfd\xb9\xfd\xdd\xfd\x00\x00\xd2\xfd\xcf\xfd\xd0\xfd\xbf\xfd\xc0\xfd\x00\x00\x00\x00\xce\xfd\xd1\xfd\xc6\xfd\x42\xfd\x00\x00\x43\xfd\x1d\xfe\x23\xfd\x71\xff\x24\xfd\x48\xfd\x22\xfd\x21\xfd\x00\x00\x1f\xfe\xa8\xfe\x00\x00\x94\xfe\x8f\xfe\x00\x00\x00\x00\x5b\xfe\x00\x00\x00\x00\x26\xfe\xe6\xfe\xad\xfe\x25\xfe\xcb\xfd\xca\xfd\x00\x00\x6a\xfd\xe4\xfd\x00\x00\x00\x00\x00\x00\x65\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\xfc\xc8\xfc\x09\xfd\xbc\xfd\xde\xfd\xdf\xfd\xbd\xfd\x00\x00\x00\x00\x00\x00\x25\xff\xac\xfe\x00\x00\x8f\xfe\x00\x00\x5b\xfe\x04\xfe\x29\xfe\xde\xfe\x21\xfe\x00\x00\x00\x00\x00\x00\xf3\xfe\x53\xfe\x23\xff\x00\x00\x4a\xff\x4e\xff\x4f\xff\x50\xff\x52\xff\x51\xff\xe9\xfe\x10\xff\x00\x00\x21\xff\x55\xff\x00\x00\x5b\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xb7\xfe\xb6\xfe\xb5\xfe\xb4\xfe\xb3\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x07\xff\x04\xff\x00\x00\x00\x00\x00\x00\xd1\xfe\xd7\xfe\x00\x00\x63\xff\xdc\xfe\xc3\xfe\xbe\xfe\xc2\xfe\x65\xff\xc6\xfe\x00\x00\xc8\xfe\x64\xff\xcb\xfe\x00\x00\x00\x00\x00\x00\x2a\xfe\x85\xff\x7e\xff\x83\xff\xbb\xff\xbb\xff\xb7\xff\xb6\xff\xb3\xff\x6e\xff\xb8\xff\x89\xff\xb4\xff\xb5\xff\xa7\xff\x00\x00\x00\x00\xa7\xff\x80\xff\x7f\xff\xbd\xfe\xbb\xfe\x00\x00\xcc\xfe\x5c\xfd\xc7\xfe\x00\x00\xbf\xfe\xdd\xfe\x00\x00\x00\x00\x00\x00\xcf\xfe\x09\xff\x0a\xff\x00\x00\x02\xff\x03\xff\xfe\xfe\x00\x00\x06\xff\x00\x00\xb9\xfe\x00\x00\xb1\xfe\xb0\xfe\xb2\xfe\x00\x00\xb8\xfe\x58\xff\x59\xff\x9d\xfe\x5e\xff\x00\x00\x00\x00\x44\xff\x00\x00\x00\x00\x11\xff\x0f\xff\x0e\xff\x0b\xff\x0c\xff\x56\xff\x00\x00\x00\x00\x67\xff\x5a\xff\x00\x00\x57\xfe\x55\xfe\x00\x00\x5f\xff\x00\x00\x1b\xff\x00\x00\xde\xfe\x23\xfe\x22\xfe\x00\x00\x00\x00\x00\x00\x8e\xfe\x00\x00\x00\x00\x4e\xfe\x3a\xfe\x00\x00\x00\x00\x25\xff\x00\x00\x16\xff\x5b\xfe\x14\xff\x00\x00\xbb\xfd\xb7\xfd\xca\xfc\x18\xfd\x14\xfd\x4f\xfd\xaa\xfe\x1b\xfe\x63\xfd\x60\xfd\x52\xfd\x5f\xfd\x18\xfe\x00\x00\x11\xfe\x00\x00\x00\x00\x15\xfe\x1a\xfe\xe1\xfe\x6b\xfd\xe4\xfe\xe7\xfe\x00\x00\xe0\xfe\xe3\xfe\x00\x00\x00\x00\x00\x00\x8d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xc2\xfd\xc1\xfd\x70\xff\xc3\xfd\xc5\xfd\xcc\xfd\xb6\xfd\xb5\xfd\xbe\xfd\xaa\xfd\xac\xfd\xa9\xfd\xa7\xfd\xa4\xfd\xa3\xfd\x00\x00\xae\xfd\xab\xfd\x00\x00\x83\xfd\x00\x00\x97\xfd\x93\xfd\x00\x00\x98\xfd\x00\x00\x00\x00\x99\xfd\x00\x00\x01\xfe\x81\xfd\x7e\xfd\x80\xfd\xea\xfd\xf1\xfd\x00\x00\x00\x00\x00\x00\x8c\xfd\xed\xfd\x00\x00\x00\x00\xe8\xfd\x6b\xfe\x0b\xfd\x00\x00\x1f\xfd\x5f\xfe\x5e\xfe\x5d\xfe\x00\x00\x00\x00\xc0\xfc\x00\x00\x9b\xfe\x00\x00\x00\x00\x00\x00\xea\xff\xa7\xff\xa7\xff\x00\x00\xa0\xff\x00\x00\xe7\xff\xc0\xff\xc0\xff\xd7\xff\x00\x00\xc0\xfc\xc1\xfc\xbe\xfc\x69\xfe\x75\xfe\x00\x00\x71\xfd\x6e\xfd\x8a\xfd\x9d\xfd\xfc\xfd\x7f\xfd\x00\x00\x9b\xfd\x96\xfd\x92\xfd\xde\xfe\x8f\xfd\x00\x00\x94\xfd\x9a\xfd\xf2\xfd\xa2\xfd\xe9\xfc\x00\x00\x00\x00\xaf\xfd\x6f\xff\x8c\xff\x72\xff\x96\xfe\x8c\xfe\x95\xfe\x00\x00\x00\x00\xa7\xfe\x1e\xfe\x69\xfd\xe8\xfe\x6c\xfd\x00\x00\xa5\xfe\x00\x00\x10\xfe\x00\x00\x15\xff\x00\x00\x00\x00\x4e\xfe\x3a\xfe\x24\xff\xbe\xfc\x5c\xff\x39\xfe\x37\xfe\x00\x00\x3a\xfe\x00\x00\x00\x00\x95\xfe\x00\x00\xdf\xfe\x24\xfe\x00\x00\xf4\xfe\xf7\xfe\xf7\xfe\x52\xfe\x53\xfe\x53\xfe\x22\xff\x12\xff\xea\xfe\xed\xfe\xed\xfe\x0d\xff\x1f\xff\x20\xff\x3f\xff\x00\x00\x34\xff\x00\x00\x00\x00\x00\x00\x00\x00\xba\xfe\x47\xfd\x00\x00\x05\xff\x08\xff\x00\x00\x00\x00\xcf\xfe\xce\xfe\x00\x00\x00\x00\xd6\xfe\xd4\xfe\x00\x00\xc1\xfe\x00\x00\xbc\xfe\x00\x00\x81\xff\x00\x00\x00\x00\x00\x00\x00\x00\x88\xff\x8d\xff\x00\x00\xbd\xff\xbc\xff\x00\x00\x7e\xff\xc0\xfe\xd5\xfe\x00\x00\x00\x00\xd0\xfe\xd2\xfe\xe5\xfe\xe5\xfe\x01\xff\xae\xfe\x00\x00\x9c\xfe\x00\x00\x43\xff\x00\x00\x5d\xff\x00\x00\xf2\xfe\x2c\xff\xee\xfe\x00\x00\xf1\xfe\x27\xff\x2c\xff\x00\x00\x56\xfe\x54\xfe\xfd\xfe\xf8\xfe\x00\x00\xfc\xfe\x2e\xff\x00\x00\x00\x00\x00\x00\x20\xfe\x97\xfe\x8b\xfe\x4b\xfe\x4b\xfe\x5b\xff\x00\x00\x36\xfe\x31\xfd\x33\xfe\x4b\xff\x4d\xff\x4c\xff\x00\x00\x38\xfe\x47\xfe\x45\xfe\x41\xfe\x54\xff\x3a\xfe\x17\xff\x00\x00\x16\xfe\x17\xfe\x00\x00\x8a\xfe\xad\xfd\xa6\xfd\xa5\xfd\xa8\xfd\x00\x00\x00\x00\x00\x00\x95\xfd\x90\xfd\x91\xfd\x00\x00\x00\x00\x6c\xfe\x3d\xfe\x3b\xfe\x59\xfe\x00\x00\xcb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\xff\xa2\xff\xa0\xff\x9d\xff\x9e\xff\x9f\xff\x00\x00\xb1\xff\x8a\xff\x8a\xff\xa1\xff\xa0\xff\x99\xff\x91\xff\x8e\xff\x3a\xfd\x8f\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa0\xff\xa8\xff\xb2\xff\xcf\xff\xcc\xff\xd6\xff\xe6\xff\xe3\xfc\x84\xff\x00\x00\xce\xff\x00\x00\x00\x00\xa1\xfd\xa0\xfd\x00\x00\xa4\xfe\x00\x00\x18\xff\x53\xff\x00\x00\x5b\xfe\x00\x00\x64\xfe\x00\x00\x32\xfe\x30\xfd\x34\xfe\x35\xfe\x00\x00\x4c\xfe\x49\xfe\x00\x00\x00\x00\x00\x00\xf6\xfe\xf9\xfe\x30\xff\x1e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x2d\xff\xf5\xfe\xec\xfe\xef\xfe\x00\x00\x2b\xff\xeb\xfe\x13\xff\x3e\xff\x36\xff\x36\xff\x00\x00\x00\x00\xaf\xfe\x00\x00\x00\x00\xcf\xfe\x00\x00\xd9\xfe\x7c\xff\xc4\xff\x8a\xff\x8a\xff\xc3\xff\x00\x00\x00\x00\x7a\xff\x00\x00\x00\x00\x00\x00\x00\xff\xff\xfe\x35\xff\x42\xff\x40\xff\x00\x00\x37\xff\x00\x00\x00\x00\x00\x00\x00\x00\x2a\xff\xf0\xfe\x23\xff\x00\x00\x1e\xff\x2f\xff\x32\xff\x00\x00\x00\x00\xfa\xfe\x50\xfe\x00\x00\x00\x00\x4b\xfe\x4f\xfe\x31\xfe\x00\x00\xc0\xfc\x00\x00\x00\x00\x92\xfe\x40\xfe\x88\xfe\x86\xfe\x43\xfe\x85\xfe\x00\x00\x00\x00\x00\x00\xef\xfd\xc7\xff\x00\x00\xc5\xff\x00\x00\xc6\xff\x00\x00\xcd\xff\xa6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9a\xff\x00\x00\x90\xff\x9b\xff\x9c\xff\x97\xff\xa3\xff\xae\xff\xaf\xff\xa0\xff\x00\x00\x96\xff\x94\xff\x93\xff\x92\xff\x39\xfd\x38\xfd\x36\xfd\x37\xfd\x00\x00\xd2\xff\xd0\xff\x00\x00\xe2\xff\x00\x00\xc8\xff\xa7\xff\x00\x00\x9f\xfd\x19\xff\x87\xfe\x00\x00\x42\xfe\xbe\xfc\x63\xfe\x4d\xfe\x48\xfe\x4a\xfe\x00\x00\x79\xfe\x00\x00\x1d\xff\x31\xff\x00\x00\xfb\xfe\x33\xff\x25\xff\x3b\xff\x3d\xff\x38\xff\x3a\xff\x3c\xff\x41\xff\xd3\xfe\xcd\xfe\x7d\xff\x86\xff\x7b\xff\x00\x00\xa0\xff\xba\xff\xb9\xff\x00\x00\xa0\xff\x39\xff\x4e\xfe\x3a\xfe\x79\xfe\x00\x00\x46\xfe\x40\xfe\x44\xfe\xf9\xfd\x00\x00\xa7\xff\x00\x00\x00\x00\xe5\xff\xe3\xff\x00\x00\xd5\xff\xd3\xff\x00\x00\x98\xff\xa4\xff\xa2\xff\x95\xff\xd4\xff\xd1\xff\xe4\xff\x00\x00\x00\x00\xe1\xff\x00\x00\x00\x00\x00\x00\x1c\xff\x29\xff\x3a\xfe\x00\x00\x79\xff\x78\xff\x28\xff\xc9\xff\x00\x00\x00\x00\x00\x00\xe0\xff\xde\xff\xdf\xff\xca\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\x00\x00\x0d\x00\x53\x00\x05\x00\x06\x00\x23\x00\x24\x00\x06\x00\x39\x00\x0f\x00\x10\x00\x0f\x00\x10\x00\x13\x00\x11\x00\x13\x00\x13\x00\x53\x00\x10\x00\x0c\x00\x0d\x00\x13\x00\x12\x00\x13\x00\x14\x00\x13\x00\x14\x00\x53\x00\x18\x00\x08\x00\x09\x00\x0a\x00\x61\x00\x1b\x00\x04\x00\x1d\x00\x3a\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x04\x00\x09\x00\x0a\x00\x04\x00\x08\x00\x09\x00\x0a\x00\x08\x00\x09\x00\x0a\x00\x64\x00\x61\x00\x21\x00\x22\x00\x23\x00\x24\x00\x21\x00\x22\x00\x23\x00\x24\x00\x87\x00\x21\x00\x22\x00\x23\x00\x24\x00\x82\x00\xac\x00\x22\x00\x23\x00\x24\x00\x3b\x00\x3c\x00\x23\x00\x24\x00\x3b\x00\x3c\x00\x23\x00\x24\x00\x44\x00\xb0\x00\xb1\x00\x13\x00\x00\x00\x0a\x00\x13\x00\x00\x00\x13\x00\x00\x00\xaa\x00\x76\x00\x77\x00\x01\x00\x76\x00\x77\x00\x14\x00\x00\x00\xd6\x00\x48\x00\x48\x00\xd6\x00\x36\x00\xe8\x00\x87\x00\xaa\x00\x00\x00\x4e\x00\x4f\x00\x00\x00\x81\x00\x82\x00\x62\x00\x19\x00\x01\x00\xaa\x00\x11\x00\x35\x00\x70\x00\x52\x00\x35\x00\x36\x00\x25\x00\x13\x00\x4b\x00\x31\x00\x32\x00\x2a\x00\x2b\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x15\x00\x4b\x00\x29\x00\x2a\x00\x2b\x00\x61\x00\x4f\x00\xbd\x00\x13\x00\x49\x00\xc0\x00\xb5\x00\x11\x00\xc3\x00\xc4\x00\x87\x00\x76\x00\x77\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x35\x00\xce\x00\xcf\x00\x61\x00\x61\x00\x63\x00\x54\x00\x87\x00\x1b\x01\x61\x00\x1d\x01\x45\x00\x52\x00\x52\x00\x4e\x00\x87\x00\x2e\x01\x5f\x00\x7e\x00\x35\x00\x27\x01\x75\x00\x62\x00\x69\x00\x69\x00\x54\x00\x87\x00\x64\x00\x57\x00\x7e\x00\x64\x00\x30\x01\x64\x00\x32\x01\x30\x01\x74\x00\xb5\x00\xbc\x00\x6f\x00\x78\x00\x64\x00\x62\x00\x87\x00\xf8\x00\xf9\x00\x87\x00\x33\x01\x87\x00\x70\x00\x64\x00\x73\x00\x6f\x00\x39\x01\x02\x01\x03\x01\x33\x01\x1e\x01\x06\x01\x07\x01\x21\x01\x6f\x00\x39\x01\xaf\x00\xb0\x00\xb1\x00\x27\x01\x1e\x01\xd3\x00\x21\x01\x21\x01\x33\x01\xd3\x00\x65\x00\x65\x00\x27\x01\x27\x01\x39\x01\x88\x00\x0f\x01\x10\x01\x11\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x33\x01\x08\x01\x60\x00\x21\x01\xa0\x00\x27\x01\x39\x01\x29\x01\x2a\x01\x27\x01\x33\x01\x2d\x01\x7e\x00\x14\x01\x15\x01\x82\x00\x39\x01\x02\x01\x03\x01\x0c\x00\x21\x01\x06\x01\x07\x01\x21\x01\x09\x01\x1e\x01\x27\x01\x56\x00\x21\x01\x27\x01\x25\x01\x26\x01\x62\x00\x28\x01\x27\x01\x1c\x00\x33\x01\x2c\x01\x35\x01\x36\x01\x19\x01\x0f\x01\x10\x01\x11\x01\x4e\x00\x6f\x00\x1f\x01\x20\x01\x21\x01\x22\x01\x2f\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2f\x01\xab\x00\xac\x00\x2f\x01\x37\x01\x87\x00\x37\x01\x37\x01\x7f\x00\x2f\x01\x1d\x01\x1d\x01\x37\x01\x7b\x00\x37\x01\x27\x01\x37\x01\x0c\x00\x70\x00\x21\x01\x27\x01\x27\x01\x99\x00\x62\x00\x27\x01\x27\x01\x33\x01\x27\x01\x35\x01\x36\x01\x33\x01\x27\x01\x35\x01\x36\x01\x27\x01\x33\x01\x6f\x00\x35\x01\x36\x01\x79\x00\x33\x01\x34\x00\x35\x01\x36\x01\x33\x01\x41\x00\x35\x01\x36\x01\x33\x01\x33\x01\x35\x01\x36\x01\x0d\x01\x1d\x01\x0f\x01\x39\x01\x11\x01\x0d\x01\x00\x00\x0f\x01\x00\x00\x11\x01\x0d\x01\x27\x01\x0f\x01\x1e\x01\x11\x01\x1b\x01\x21\x01\x1d\x01\x1f\x01\x20\x01\x21\x01\x99\x00\x27\x01\x1f\x01\x20\x01\x21\x01\x27\x01\x27\x01\x1f\x01\x20\x01\x21\x01\x27\x01\x1e\x01\x39\x00\x4d\x00\x21\x01\x27\x01\x3d\x00\x3e\x00\x3f\x00\x40\x00\x27\x01\x42\x00\x4e\x00\x52\x00\x00\x00\x4d\x00\x56\x00\x4b\x00\x9f\x00\xa0\x00\x78\x00\x79\x00\x73\x00\x04\x01\x05\x01\x06\x01\x07\x01\x52\x00\x1e\x01\x4b\x00\x4b\x00\x21\x01\x6a\x00\x7e\x00\x89\x00\x5a\x00\x5b\x00\x27\x01\x70\x00\x00\x00\x5f\x00\x4e\x00\x91\x00\x70\x00\x76\x00\x64\x00\x70\x00\x96\x00\x97\x00\x98\x00\x99\x00\x71\x00\x21\x01\x6f\x00\x33\x01\x62\x00\x76\x00\x7f\x00\x27\x01\x57\x00\x39\x01\x2a\x01\xff\x00\x00\x01\x08\x01\x6f\x00\x6f\x00\x04\x01\x6f\x00\x06\x01\x07\x01\x7e\x00\x19\x00\x1e\x01\x39\x00\x64\x00\x21\x01\x64\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x27\x01\x42\x00\x4e\x00\xa9\x00\x6f\x00\x4e\x00\x6f\x00\xc0\x00\xff\x00\x00\x01\x2d\x00\x1e\x01\x66\x00\x04\x01\x21\x01\x06\x01\x07\x01\x52\x00\x2c\x01\x4f\x00\x27\x01\xce\x00\x52\x00\x2a\x01\x54\x00\x5a\x00\x5b\x00\x57\x00\x4b\x00\x00\x00\x5f\x00\xa0\x00\x64\x00\x9f\x00\xa0\x00\x64\x00\x70\x00\x7f\x00\x1f\x00\x1e\x01\x83\x00\x52\x00\x21\x01\x6f\x00\x00\x00\xb6\x00\xb7\x00\xb8\x00\x27\x01\x52\x00\x6a\x00\x2a\x01\xbd\x00\x2e\x00\x2f\x00\xc0\x00\x70\x00\x64\x00\xc3\x00\xc4\x00\x1b\x01\x7e\x00\x1d\x01\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6f\x00\xce\x00\xcf\x00\x70\x00\x27\x01\xff\x00\x00\x01\x6c\x00\x88\x00\x66\x00\x04\x01\x70\x00\x06\x01\x07\x01\x0b\x01\x0c\x01\x4b\x00\x0e\x01\x0f\x01\x70\x00\x11\x01\x12\x01\x13\x01\x70\x00\x9f\x00\xa0\x00\x04\x01\x05\x01\x06\x01\x07\x01\x1b\x01\x1c\x01\x1d\x01\x9f\x00\xa0\x00\x19\x00\x1e\x01\x9f\x00\xa0\x00\x21\x01\x19\x00\x4c\x00\x27\x01\xf8\x00\xf9\x00\x27\x01\x87\x00\x52\x00\x2a\x01\xb6\x00\xb7\x00\xb8\x00\x66\x00\x02\x01\x03\x01\x2d\x00\xbd\x00\x06\x01\x07\x01\xc0\x00\x19\x00\x64\x00\xc3\x00\xc4\x00\x2a\x01\x12\x01\x13\x01\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6f\x00\xce\x00\xcf\x00\x39\x00\x64\x00\x70\x00\x3f\x00\x40\x00\x2d\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x99\x00\x1b\x01\x6f\x00\x1d\x01\x1b\x01\x27\x01\x1d\x01\x29\x01\x2a\x01\x52\x00\x30\x01\x2d\x01\x19\x00\x27\x01\x51\x00\x52\x00\x27\x01\x33\x01\x34\x01\x35\x01\x36\x01\x09\x01\x6c\x00\x9f\x00\xa0\x00\x62\x00\x70\x00\x89\x00\x5f\x00\x53\x00\xf8\x00\xf9\x00\x2d\x00\x64\x00\x16\x01\x69\x00\x18\x01\x19\x01\x69\x00\x6a\x00\x02\x01\x03\x01\x98\x00\x99\x00\x06\x01\x07\x01\x22\x01\x53\x00\x24\x01\x25\x01\x26\x01\x62\x00\x28\x01\x4c\x00\x62\x00\x2b\x01\x2c\x01\x04\x01\x05\x01\x06\x01\x07\x01\x54\x00\x39\x00\x1b\x01\x6f\x00\x1d\x01\x1e\x00\x6f\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x1b\x01\x1a\x00\x1d\x01\x27\x01\x1b\x01\x27\x01\x1d\x01\x29\x01\x2a\x01\x2d\x00\xc0\x00\x2d\x01\x27\x01\x61\x00\x51\x00\x52\x00\x27\x01\x33\x01\x34\x01\x35\x01\x36\x01\x2e\x00\x2f\x00\x2a\x01\xce\x00\x2b\x01\x2c\x01\x66\x00\x5f\x00\x14\x00\x30\x01\x9f\x00\xa0\x00\x64\x00\x7f\x00\x62\x00\x1e\x00\x70\x00\x69\x00\x6a\x00\x58\x00\x59\x00\x5a\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x5f\x00\x6f\x00\x4d\x00\xbd\x00\x2d\x00\x52\x00\xc0\x00\xf4\x00\xf5\x00\xc3\x00\xc4\x00\x31\x00\x32\x00\x33\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x75\x00\x4f\x00\x7a\x00\x7b\x00\x79\x00\x53\x00\x1b\x01\x6a\x00\x1d\x01\x6a\x00\x74\x00\x1e\x00\x1e\x00\x70\x00\x78\x00\x70\x00\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\x76\x00\x11\x01\x12\x01\x13\x01\x7a\x00\x2d\x00\x2d\x00\x1f\x01\x20\x01\x21\x01\x30\x00\x1b\x01\x1c\x01\x1d\x01\x99\x00\x27\x01\xa7\x00\xa8\x00\xa9\x00\xf8\x00\xf9\x00\x3b\x00\x3c\x00\x27\x01\x62\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x02\x01\x03\x01\x66\x00\xbd\x00\x06\x01\x07\x01\xc0\x00\x6c\x00\x6f\x00\xc3\x00\xc4\x00\x70\x00\x70\x00\x62\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x39\x00\xf3\x00\xf4\x00\xf5\x00\x6f\x00\x55\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x04\x01\x05\x01\x06\x01\x07\x01\x1b\x01\x27\x01\x1d\x01\x29\x01\x2a\x01\x3f\x00\x40\x00\x2d\x01\x62\x00\xa7\x00\xa8\x00\xa9\x00\x27\x01\x33\x01\x34\x01\x35\x01\x36\x01\x04\x01\x05\x01\x06\x01\x07\x01\x6f\x00\x6a\x00\x1b\x01\x5f\x00\x1d\x01\xf8\x00\xf9\x00\x70\x00\x64\x00\x7e\x00\x1f\x01\x20\x01\x21\x01\x2a\x01\x27\x01\x02\x01\x03\x01\x6d\x00\x27\x01\x06\x01\x07\x01\x21\x01\x1d\x01\x04\x01\x05\x01\x06\x01\x07\x01\x27\x01\xff\x00\x00\x01\x2a\x01\x7e\x00\x27\x01\x04\x01\x2a\x01\x06\x01\x07\x01\x39\x00\x4e\x00\x4f\x00\x58\x00\x59\x00\x5a\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x5f\x00\x65\x00\x0f\x01\x6a\x00\x11\x01\x27\x01\x6c\x00\x29\x01\x2a\x01\x70\x00\x70\x00\x2d\x01\x1e\x01\x99\x00\x2a\x01\x21\x01\x1d\x01\x33\x01\x34\x01\x35\x01\x36\x01\x27\x01\x75\x00\x33\x01\x2a\x01\x99\x00\x27\x01\x57\x00\x5f\x00\x39\x01\x1f\x01\x20\x01\x21\x01\x64\x00\x04\x01\x05\x01\x06\x01\x07\x01\x27\x01\x61\x00\x69\x00\x63\x00\x6d\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x0a\x01\x0b\x01\x0c\x01\xbd\x00\x74\x00\x0f\x01\xc0\x00\x11\x01\x78\x00\xc3\x00\xc4\x00\x4d\x00\x4e\x00\x70\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x58\x00\x59\x00\x5a\x00\x2a\x01\x70\x00\x02\x01\x03\x01\x5f\x00\x89\x00\x06\x01\x07\x01\x65\x00\x33\x01\x6a\x00\x8f\x00\x69\x00\x91\x00\x6b\x00\x39\x01\x70\x00\x69\x00\x96\x00\x97\x00\x98\x00\x99\x00\x71\x00\x74\x00\x23\x00\x6c\x00\x75\x00\x76\x00\x74\x00\x70\x00\x79\x00\x7a\x00\x78\x00\x33\x01\x21\x01\xf6\x00\xf7\x00\xf8\x00\xf9\x00\x39\x01\x27\x01\x29\x01\x2a\x01\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x02\x01\x03\x01\x21\x01\xbd\x00\x06\x01\x07\x01\xc0\x00\x74\x00\x27\x01\xc3\x00\xc4\x00\x78\x00\x08\x01\xc0\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x69\x00\x69\x00\x14\x01\x15\x01\x39\x00\xce\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x2c\x01\x61\x00\x74\x00\x63\x00\x30\x01\x27\x01\x78\x00\x29\x01\x2a\x01\x25\x01\x26\x01\x2d\x01\x28\x01\x3f\x00\x40\x00\x4e\x00\x2c\x01\x33\x01\x34\x01\x35\x01\x36\x01\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x20\x01\x21\x01\xf6\x00\xf7\x00\xf8\x00\xf9\x00\x5f\x00\x27\x01\x7e\x00\x29\x01\x2a\x01\x64\x00\x65\x00\x66\x00\x02\x01\x03\x01\x2d\x00\x2e\x00\x06\x01\x07\x01\x65\x00\x1f\x01\x20\x01\x21\x01\x69\x00\x87\x00\x6b\x00\x89\x00\x8a\x00\x27\x01\x0b\x01\x0c\x01\x99\x00\x0e\x01\x0f\x01\x74\x00\x11\x01\x12\x01\x13\x01\x78\x00\x39\x00\x99\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x1b\x01\x1c\x01\x1d\x01\x33\x01\x3a\x00\x27\x01\x34\x01\x29\x01\x2a\x01\x39\x01\x38\x01\x2d\x01\x27\x01\x25\x01\x26\x01\x4e\x00\x28\x01\x33\x01\x34\x01\x35\x01\x36\x01\x4d\x00\x4d\x00\x0c\x01\x54\x00\x35\x00\x0f\x01\x57\x00\x11\x01\x54\x00\x99\x00\x56\x00\x5f\x00\x58\x00\x59\x00\x5a\x00\x21\x01\x64\x00\x65\x00\x66\x00\x5f\x00\x13\x00\x27\x01\x1e\x01\x29\x01\x2a\x01\x21\x01\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x34\x01\x27\x01\x4f\x00\xbd\x00\x38\x01\x52\x00\xc0\x00\x71\x00\x62\x00\xc3\x00\xc4\x00\x75\x00\x76\x00\x4d\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x4e\x00\x4f\x00\x58\x00\x59\x00\x5a\x00\xa2\x00\xa3\x00\xa4\x00\x89\x00\x5f\x00\x1e\x01\x65\x00\x1f\x00\x21\x01\x34\x01\x69\x00\x91\x00\x6b\x00\x38\x01\x27\x01\x6f\x00\x96\x00\x97\x00\x98\x00\x99\x00\x4f\x00\x74\x00\x71\x00\x52\x00\x4b\x00\x78\x00\x75\x00\x76\x00\x4e\x00\x4f\x00\x79\x00\x7a\x00\xa7\x00\xa8\x00\xa9\x00\xf8\x00\xf9\x00\x46\x00\x47\x00\x48\x00\x49\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x02\x01\x03\x01\x74\x00\xbd\x00\x06\x01\x07\x01\xc0\x00\x8f\x00\x65\x00\xc3\x00\xc4\x00\x02\x00\x03\x00\xc0\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x39\x00\x02\x00\x03\x00\x20\x01\x21\x01\xce\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x27\x01\x0c\x01\x29\x01\x2a\x01\x0f\x01\x27\x01\x11\x01\x29\x01\x2a\x01\x70\x00\x61\x00\x2d\x01\x63\x00\x4e\x00\x51\x00\x52\x00\x4f\x00\x33\x01\x34\x01\x35\x01\x36\x01\x1f\x01\x20\x01\x21\x01\x1f\x01\x20\x01\x21\x01\x54\x00\x5f\x00\x27\x01\xf8\x00\xf9\x00\x27\x01\x64\x00\x4b\x00\x24\x01\x25\x01\x26\x01\x69\x00\x28\x01\x02\x01\x03\x01\x2b\x01\x2c\x01\x06\x01\x07\x01\x4b\x00\x30\x01\x04\x01\x05\x01\x06\x01\x07\x01\x11\x00\x1f\x01\x20\x01\x21\x01\x0b\x01\x0c\x01\x4b\x00\x0e\x01\x0f\x01\x27\x01\x11\x01\x12\x01\x13\x01\xba\x00\xbb\x00\xbc\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x1b\x01\x1c\x01\x1d\x01\x4b\x00\x61\x00\x27\x01\x63\x00\x29\x01\x2a\x01\x52\x00\x0c\x01\x2d\x01\x27\x01\x0f\x01\x2a\x01\x11\x01\x57\x00\x33\x01\x34\x01\x35\x01\x36\x01\x99\x00\x45\x00\x33\x01\xba\x00\xbb\x00\xbc\x00\x4c\x00\x4d\x00\x39\x01\x0a\x01\x0b\x01\x0c\x01\x54\x00\x61\x00\x0f\x01\x63\x00\x11\x01\x24\x01\x25\x01\x26\x01\x7e\x00\x28\x01\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x1b\x01\x39\x00\x1d\x01\xbd\x00\x6a\x00\x61\x00\xc0\x00\x63\x00\x70\x00\xc3\x00\xc4\x00\x4e\x00\x27\x01\xc0\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x4e\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xce\x00\x00\x01\xe4\x00\xe5\x00\xe6\x00\x04\x01\xe8\x00\x06\x01\x07\x01\x24\x01\x25\x01\x26\x01\x5f\x00\x28\x01\x89\x00\x6e\x00\x6f\x00\x64\x00\x65\x00\x01\x01\x6a\x00\x03\x01\x91\x00\x61\x00\x06\x01\x63\x00\x6a\x00\x96\x00\x97\x00\x98\x00\x99\x00\x1e\x01\x6e\x00\x6f\x00\x21\x01\xf8\x00\xf9\x00\xbe\x00\xbf\x00\x99\x00\x27\x01\x6a\x00\x61\x00\x2a\x01\x63\x00\x02\x01\x03\x01\x6a\x00\x1e\x01\x06\x01\x07\x01\x21\x01\x5c\x00\x5d\x00\x5e\x00\x4b\x00\x52\x00\x27\x01\x54\x00\x29\x01\x2a\x01\x0b\x01\x0c\x01\x52\x00\x61\x00\x0f\x01\x63\x00\x11\x01\x0d\x00\xc0\x00\xb2\x00\xb3\x00\xb4\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x1b\x01\xc0\x00\x1d\x01\xbe\x00\xbf\x00\x27\x01\xce\x00\x29\x01\x2a\x01\xbe\x00\xbf\x00\x2d\x01\x27\x01\x70\x00\x61\x00\xce\x00\x63\x00\x33\x01\x34\x01\x35\x01\x36\x01\x66\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x39\x00\x25\x01\x26\x01\xbd\x00\x28\x01\x61\x00\xc0\x00\x63\x00\x2c\x01\xc3\x00\xc4\x00\x61\x00\x30\x01\x63\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xb2\x00\xb3\x00\xb4\x00\xb2\x00\xb3\x00\xb4\x00\xb2\x00\xb3\x00\xb4\x00\xb2\x00\xb3\x00\xb4\x00\xb2\x00\xb3\x00\xb4\x00\x61\x00\x5f\x00\x63\x00\x91\x00\x0b\x01\x0c\x01\x64\x00\x0e\x01\x0f\x01\x8f\x00\x11\x01\x12\x01\x13\x01\x0b\x01\x0c\x01\x6d\x00\x61\x00\x0f\x01\x63\x00\x11\x01\x1b\x01\x1c\x01\x1d\x01\x45\x00\x46\x00\xf8\x00\xf9\x00\x6a\x00\x61\x00\x1b\x01\x63\x00\x1d\x01\x27\x01\x71\x00\x72\x00\x02\x01\x03\x01\x73\x00\x74\x00\x06\x01\x07\x01\x27\x01\x65\x00\x31\x01\x32\x01\xe6\x00\x69\x00\xe8\x00\x6b\x00\x12\x01\x13\x01\x8f\x00\x6f\x00\x6e\x00\x6f\x00\xf7\x00\xf8\x00\x74\x00\x6c\x00\x4d\x00\xa3\x00\xa4\x00\x6a\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x8f\x00\x56\x00\x66\x00\x58\x00\x59\x00\x27\x01\x70\x00\x29\x01\x2a\x01\x87\x00\x5f\x00\x2d\x01\x36\x00\x37\x00\x54\x00\x4c\x00\x4d\x00\x33\x01\x34\x01\x35\x01\x36\x01\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x39\x00\x7f\x00\x4b\x00\xbd\x00\x4b\x00\x4b\x00\xc0\x00\x75\x00\x76\x00\xc3\x00\xc4\x00\x79\x00\x7a\x00\x0d\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x6f\x00\x52\x00\x15\x00\x71\x00\x71\x00\x6a\x00\x6a\x00\x6a\x00\x6a\x00\x6a\x00\x71\x00\x71\x00\x6c\x00\x62\x00\x6c\x00\x6a\x00\x5f\x00\x0c\x00\x6a\x00\x34\x00\x19\x00\x64\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\x58\x00\x00\x01\x6f\x00\x89\x00\x6d\x00\x04\x01\x4e\x00\x06\x01\x07\x01\x70\x00\x70\x00\x91\x00\x71\x00\x6a\x00\xf8\x00\xf9\x00\x96\x00\x97\x00\x98\x00\x99\x00\x6a\x00\x6a\x00\x6a\x00\x6a\x00\x02\x01\x03\x01\x00\x01\x6a\x00\x06\x01\x07\x01\x04\x01\x1e\x01\x06\x01\x07\x01\x21\x01\x6a\x00\x6a\x00\x6a\x00\x25\x01\x26\x01\x27\x01\x28\x01\x66\x00\x2a\x01\x70\x00\x2c\x01\x62\x00\x4d\x00\x70\x00\x30\x01\x4f\x00\x54\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x1e\x01\x70\x00\xc0\x00\x21\x01\x17\x00\x27\x01\x4d\x00\x29\x01\x2a\x01\x27\x01\x54\x00\x2d\x01\x2a\x01\x70\x00\x52\x00\x62\x00\xce\x00\x33\x01\x34\x01\x35\x01\x36\x01\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x39\x00\x6a\x00\x57\x00\xbd\x00\x4e\x00\x70\x00\xc0\x00\x4f\x00\x4b\x00\xc3\x00\xc4\x00\x4b\x00\x4e\x00\x66\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x4e\x00\x7f\x00\x4b\x00\x6a\x00\x89\x00\x6a\x00\x4b\x00\x71\x00\x71\x00\x19\x00\x52\x00\x57\x00\x91\x00\x4e\x00\x70\x00\x4e\x00\x5f\x00\x96\x00\x97\x00\x98\x00\x99\x00\x64\x00\x6a\x00\x19\x00\x01\x01\x4f\x00\x03\x01\x1a\x00\x4b\x00\x06\x01\x0b\x01\x0c\x01\x09\x01\x0e\x01\x0f\x01\x74\x00\x11\x01\x12\x01\x13\x01\x7e\x00\xf8\x00\xf9\x00\x4b\x00\x7e\x00\x15\x01\x16\x00\x1b\x01\x1c\x01\x1d\x01\x0c\x00\x02\x01\x03\x01\x6f\x00\x1e\x01\x06\x01\x07\x01\x21\x01\x4d\x00\x27\x01\xc0\x00\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x58\x00\x59\x00\x5a\x00\x4d\x00\x4b\x00\xce\x00\x69\x00\x5f\x00\x7e\x00\x66\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\x19\x00\x62\x00\x70\x00\x4e\x00\x6a\x00\x27\x01\x4e\x00\x29\x01\x2a\x01\x71\x00\x70\x00\x2d\x01\x4e\x00\x4e\x00\x4e\x00\x75\x00\x76\x00\x33\x01\x34\x01\x35\x01\x36\x01\xb6\x00\xb7\x00\xb8\x00\xb9\x00\x5f\x00\x52\x00\x4f\x00\xbd\x00\x70\x00\x19\x00\xc0\x00\x19\x00\x54\x00\xc3\x00\xc4\x00\x07\x00\x4f\x00\x57\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\x4d\x00\x4b\x00\x89\x00\x52\x00\x54\x00\x0b\x01\x0c\x01\x66\x00\x0e\x01\x0f\x01\x91\x00\x11\x01\x12\x01\x13\x01\x7b\x00\x96\x00\x97\x00\x98\x00\x99\x00\x7f\x00\x6f\x00\x1b\x01\x1c\x01\x1d\x01\x6f\x00\xfd\x00\xfe\x00\x62\x00\x00\x01\x52\x00\x6a\x00\x88\x00\x04\x01\x27\x01\x06\x01\x07\x01\x4d\x00\x66\x00\x69\x00\x19\x00\xf8\x00\xf9\x00\x19\x00\x6a\x00\x6a\x00\x6f\x00\x88\x00\x87\x00\x19\x00\x58\x00\x02\x01\x03\x01\x52\x00\x2d\x00\x06\x01\x07\x01\x6f\x00\xc0\x00\x1e\x01\x4f\x00\x89\x00\x21\x01\x70\x00\x4b\x00\x4b\x00\x19\x00\x5f\x00\x27\x01\x91\x00\x07\x00\x2a\x01\xce\x00\x07\x00\x96\x00\x97\x00\x98\x00\x99\x00\x87\x00\x1e\x01\x1f\x01\x20\x01\x21\x01\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\x27\x01\x00\x01\x29\x01\x2a\x01\x19\x00\x04\x01\x2d\x01\x06\x01\x07\x01\x89\x00\x4e\x00\x5f\x00\x33\x01\x34\x01\x35\x01\x36\x01\x66\x00\x91\x00\x57\x00\x19\x00\x7e\x00\x4b\x00\x96\x00\x97\x00\x98\x00\x99\x00\x4b\x00\x19\x00\xc0\x00\x6f\x00\x16\x00\x1e\x01\x4e\x00\x1a\x00\x21\x01\x4f\x00\x54\x00\x11\x00\x23\x00\x33\x00\x27\x01\x88\x00\xce\x00\x2a\x01\x1a\x00\x0b\x01\x0c\x01\x07\x00\x0e\x01\x0f\x01\x7f\x00\x11\x01\x12\x01\x13\x01\x4d\x00\x4e\x00\x4f\x00\x09\x00\x65\x00\x52\x00\x69\x00\x1b\x01\x1c\x01\x1d\x01\xc0\x00\x58\x00\x59\x00\x5a\x00\x89\x00\x6a\x00\x3a\x00\x69\x00\x5f\x00\x27\x01\x8f\x00\x4d\x00\x91\x00\x2e\x00\xce\x00\x57\x00\x70\x00\x96\x00\x97\x00\x98\x00\x99\x00\x6f\x00\x52\x00\x02\x01\x03\x01\x6a\x00\x71\x00\x06\x01\x07\x01\x4e\x00\x75\x00\x76\x00\x6f\x00\x62\x00\x79\x00\x7a\x00\x02\x00\x45\x00\x6a\x00\x0b\x01\x0c\x01\x4e\x00\x0e\x01\x0f\x01\x62\x00\x11\x01\x12\x01\x13\x01\x5f\x00\x58\x00\x62\x00\x57\x00\x1f\x01\x20\x01\x21\x01\x1b\x01\x1c\x01\x1d\x01\x88\x00\xc0\x00\x27\x01\x5f\x00\x29\x01\x2a\x01\x7f\x00\x6a\x00\x6a\x00\x27\x01\x58\x00\x70\x00\x70\x00\x6a\x00\x4b\x00\xce\x00\x02\x00\x0b\x01\x0c\x01\x6a\x00\x0e\x01\x0f\x01\x6a\x00\x11\x01\x12\x01\x13\x01\x69\x00\x87\x00\x52\x00\x52\x00\x69\x00\x19\x00\x07\x00\x1b\x01\x1c\x01\x1d\x01\x6a\x00\x4e\x00\x19\x00\x69\x00\x89\x00\x75\x00\x4d\x00\x19\x00\x07\x00\x27\x01\x8f\x00\x6a\x00\x91\x00\x75\x00\x30\x00\x30\x01\xed\x00\x96\x00\x97\x00\x98\x00\x99\x00\xed\x00\xed\x00\x89\x00\xd2\x00\x38\x00\x59\x00\x43\x00\x7f\x00\x8f\x00\x31\x00\x91\x00\x2e\x01\x32\x00\x2f\x01\x2f\x01\x96\x00\x97\x00\x98\x00\x99\x00\x0b\x01\x0c\x01\x7c\x00\x0e\x01\x0f\x01\x7c\x00\x11\x01\x12\x01\x13\x01\x11\x01\x80\x00\x59\x00\x80\x00\xa1\x00\x30\x01\xd0\x00\x1b\x01\x1c\x01\x1d\x01\xc0\x00\x84\x00\xe0\x00\xff\x00\x00\x01\x8a\x00\x2f\x01\xc6\x00\x04\x01\x27\x01\x06\x01\x07\x01\x85\x00\x86\x00\xce\x00\x2f\x01\x89\x00\x16\x00\x2e\x01\xc0\x00\x8d\x00\x8e\x00\x8f\x00\x16\x00\x91\x00\x92\x00\x30\x00\x03\x00\xe8\x00\x96\x00\x97\x00\x98\x00\x99\x00\xce\x00\x1e\x01\x2e\x01\x34\x01\x21\x01\x34\x01\x68\x00\xe0\x00\x54\x00\x43\x00\x27\x01\x2e\x01\x2e\x01\x2a\x01\x2e\x01\x6c\x00\x55\x00\x2a\x01\x86\x00\x72\x00\x75\x00\x89\x00\x34\x00\x7d\x00\x16\x00\x16\x00\x8e\x00\x8f\x00\x2c\x00\x20\x00\x92\x00\x20\x00\x7c\x00\x33\x00\x96\x00\x97\x00\x98\x00\x99\x00\xc0\x00\x7c\x00\x63\x00\x5e\x00\x0b\x01\x0c\x01\x47\x00\x0e\x01\x0f\x01\x6b\x00\x11\x01\x12\x01\x13\x01\x67\x00\xce\x00\xa6\x00\x8a\x00\x70\x00\x8a\x00\x2c\x00\x1b\x01\x1c\x01\x1d\x01\x0b\x01\x0c\x01\x2e\x01\x0e\x01\x0f\x01\x0e\x00\x11\x01\x12\x01\x13\x01\x27\x01\x20\x00\x20\x00\xc6\x00\xe8\x00\x70\x00\xc0\x00\x1b\x01\x1c\x01\x1d\x01\xa6\x00\xb4\x00\x4a\x00\xa4\x00\x86\x00\x17\x00\x17\x00\x89\x00\x34\x00\x27\x01\xce\x00\x4b\x00\x8e\x00\x8f\x00\xf8\x00\x2f\x01\x92\x00\x50\x00\x02\x00\x50\x00\x96\x00\x97\x00\x98\x00\x99\x00\x4f\x00\x2e\x01\x0a\x00\x2e\x01\xad\x00\x34\x01\x45\x00\x1c\x00\x2e\x01\x0b\x01\x0c\x01\x26\x00\x0e\x01\x0f\x01\x16\x00\x11\x01\x12\x01\x13\x01\x1c\x00\x2f\x01\x1c\x00\x1d\x00\x1e\x00\x0b\x00\x31\x00\x1b\x01\x1c\x01\x1d\x01\xf8\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2f\x01\x56\x00\x2c\x00\x27\x01\xc0\x00\x2e\x01\x59\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0b\x01\x0c\x01\x33\x01\x0e\x01\x0f\x01\xce\x00\x11\x01\x12\x01\x13\x01\x2e\x01\x35\x00\x2e\x01\x2e\x01\x4d\x00\x2f\x01\x2e\x01\x1b\x01\x1c\x01\x1d\x01\x54\x00\x54\x00\x16\x00\x56\x00\x56\x00\x58\x00\x59\x00\x5a\x00\x86\x00\x27\x01\x16\x00\x89\x00\x5f\x00\x2f\x01\x20\x00\x2f\x01\x8e\x00\x8f\x00\xa6\x00\x20\x00\x92\x00\x33\x01\x17\x00\x6a\x00\x96\x00\x97\x00\x98\x00\x99\x00\xf8\x00\x70\x00\x17\x00\xff\xff\x2f\x01\x2f\x01\x75\x00\x76\x00\xff\xff\x2f\x01\x79\x00\x7a\x00\xff\xff\x73\x00\x74\x00\x75\x00\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\x7e\x00\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xc0\x00\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\x86\x00\x27\x01\xff\xff\x89\x00\x5f\x00\xff\xff\xce\x00\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\x33\x01\xff\xff\x6a\x00\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x86\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\xf8\x00\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xce\x00\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xc0\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\x33\x01\x86\x00\xff\xff\xce\x00\x89\x00\xff\xff\xff\xff\xf8\x00\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xeb\x00\xec\x00\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xf8\x00\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\x33\x01\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xce\x00\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\x86\x00\x27\x01\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\x33\x01\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x89\x00\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x1b\x01\x1c\x01\x1d\x01\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x90\x00\x27\x01\xce\x00\x93\x00\x94\x00\x95\x00\x4d\x00\xc0\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x33\x01\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xce\x00\xff\xff\x89\x00\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xae\x00\xff\xff\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\xff\xff\x98\x00\x99\x00\xff\xff\xff\xff\x89\x00\xff\xff\xf8\x00\xff\xff\x75\x00\x76\x00\xc0\x00\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x95\x00\xff\xff\xff\xff\x98\x00\x99\x00\xff\xff\xae\x00\xff\xff\xce\x00\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x1b\x01\x1c\x01\x1d\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\x27\x01\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x1b\x01\x1c\x01\x1d\x01\xff\xff\x4d\x00\x33\x01\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xce\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x1b\x01\x1c\x01\x1d\x01\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x34\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\x89\x00\x34\x01\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x27\x01\x91\x00\x92\x00\xff\xff\xff\xff\x4d\x00\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x34\x01\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x89\x00\x5f\x00\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\xff\xff\x91\x00\x92\x00\xff\xff\xff\xff\x6a\x00\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xc0\x00\x79\x00\x7a\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\xff\xff\x91\x00\x92\x00\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\x8c\x00\x09\x01\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\x16\x01\x9b\x00\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\x22\x01\xff\xff\x24\x01\x25\x01\x26\x01\xff\xff\x28\x01\xff\xff\xff\xff\x2b\x01\x2c\x01\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\x89\x00\xff\xff\xff\xff\x8c\x00\xff\xff\x8e\x00\x8f\x00\xff\xff\x27\x01\x92\x00\xff\xff\xff\xff\x4d\x00\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\x9b\x00\xff\xff\x33\x01\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x89\x00\x5f\x00\xff\xff\x8c\x00\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xc0\x00\x79\x00\x7a\x00\x89\x00\xff\xff\xff\xff\x8c\x00\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\x09\x01\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\x22\x01\xff\xff\x24\x01\x25\x01\x26\x01\xff\xff\x28\x01\xff\xff\xff\xff\x2b\x01\x2c\x01\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\xff\xff\x27\x01\x92\x00\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\x09\x01\x8e\x00\x8f\x00\xff\xff\xff\xff\x92\x00\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\x22\x01\xff\xff\x24\x01\x25\x01\x26\x01\xff\xff\x28\x01\xff\xff\xff\xff\x2b\x01\x2c\x01\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\x33\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xc0\x00\xff\xff\xff\xff\x9d\x00\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x4d\x00\x4e\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xc0\x00\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\x71\x00\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x01\x26\x01\x27\x01\x28\x01\xff\xff\xff\xff\x2b\x01\x2c\x01\x09\x01\xff\xff\xff\xff\x30\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\x16\x01\xff\xff\x18\x01\x19\x01\xf8\x00\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\x22\x01\xff\xff\x24\x01\x25\x01\x26\x01\xff\xff\x28\x01\x27\x01\xff\xff\x2b\x01\x2c\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\x30\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\x30\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x85\x00\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x85\x00\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\x02\x00\xce\x00\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\x0a\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\xff\xff\xff\xff\xff\xff\xc0\x00\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xf8\x00\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xce\x00\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\x30\x01\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\x1b\x01\x1c\x01\x1d\x01\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x85\x00\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x85\x00\xff\xff\xff\xff\x88\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x85\x00\xc0\x00\xff\xff\x88\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x85\x00\xc0\x00\xff\xff\x88\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x85\x00\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x9c\x00\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\x9e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xc0\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xa5\x00\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xeb\x00\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xf8\x00\xf9\x00\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xc0\x00\xff\xff\xa5\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\x27\x01\xa5\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xc0\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xa5\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xa5\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xf8\x00\xf9\x00\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xc0\x00\xff\xff\xa5\x00\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xc0\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xa5\x00\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xf8\x00\xf9\x00\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xc0\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xce\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xf8\x00\xff\xff\xc0\x00\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\x27\x01\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\x8d\x00\xff\xff\x8f\x00\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xc0\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x89\x00\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\x4d\x00\x4e\x00\xf8\x00\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xce\x00\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\xff\xff\xc0\x00\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xf8\x00\xff\xff\xff\xff\xce\x00\xff\xff\x71\x00\x1b\x01\x1c\x01\x1d\x01\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xc0\x00\xff\xff\xff\xff\x27\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\x91\x00\x11\x01\x12\x01\x13\x01\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\x91\x00\x11\x01\x12\x01\x13\x01\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xc0\x00\xff\xff\x27\x01\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xce\x00\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xc0\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xc0\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\x91\x00\x11\x01\x12\x01\x13\x01\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\xff\xff\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\x89\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x00\xff\xff\xc0\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\x4d\x00\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x89\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x91\x00\x5f\x00\xc0\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\x89\x00\x71\x00\xff\xff\xc0\x00\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x96\x00\x97\x00\x98\x00\x99\x00\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\x0b\x01\x0c\x01\xff\xff\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\x27\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\x01\x1c\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\x0c\x01\x27\x01\x0e\x01\x0f\x01\xff\xff\x11\x01\x12\x01\x13\x01\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\x1b\x01\x1c\x01\x1d\x01\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\x43\x00\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\x14\x00\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\x06\x00\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\x14\x00\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\x66\x00\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\x4e\x00\x4f\x00\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\x4e\x00\x4f\x00\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\x0e\x00\x0f\x00\x10\x00\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x44\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\x17\x00\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\x17\x00\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\x3d\x00\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3c\x00\xff\xff\x3e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\x51\x00\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\x59\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x0a\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\x6e\x00\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x0a\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\x8e\x00\xff\xff\x90\x00\x0a\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\xff\xff\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xc4\x00\x87\x00\xff\xff\x0a\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\x66\x00\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xeb\x00\xec\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x11\x00\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\x87\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x4c\x00\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x4c\x00\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xcc\x00\xff\xff\xce\x00\xcf\x00\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\x1f\x01\x20\x01\x21\x01\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x27\x01\x6b\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\xff\xff\x16\x00\xff\xff\x97\x00\x98\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x02\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\x0a\x00\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7e\x00\x7f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\x92\x00\x93\x00\x73\x00\xff\xff\xff\xff\x97\x00\x98\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x7e\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7e\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7e\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x7e\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\x02\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\x71\x00\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\x01\x00\x02\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\x71\x00\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\xff\xff\x7a\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x00\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\x13\x00\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\x69\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x02\x00\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x69\x00\x02\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x69\x00\x02\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x65\x00\x02\x00\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\x77\x00\x78\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\x02\x00\xff\xff\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\x78\x00\x4c\x00\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\x69\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\xff\xff\x77\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\xc0\x00\xc1\x00\xc2\x00\x77\x00\xc4\x00\xc5\x00\x4d\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\x58\x00\x59\x00\x5a\x00\xd4\x00\xd5\x00\xff\xff\xff\xff\x5f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xff\xff\xff\xff\x30\x01\x02\x00\x32\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\x0a\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\x16\x00\xff\xff\xd4\x00\xd5\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x25\x01\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xff\xff\x73\x00\x30\x01\xff\xff\x32\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xd5\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\x02\x00\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\x0a\x00\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\x13\x00\xff\xff\x30\x01\x16\x00\x32\x01\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x65\x00\xff\xff\x2c\x00\xff\xff\x69\x00\x02\x00\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x65\x00\xff\xff\x2c\x00\xff\xff\x69\x00\x02\x00\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x69\x00\x02\x00\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x65\x00\xff\xff\x2c\x00\xff\xff\x69\x00\x02\x00\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\x73\x00\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x02\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\x73\x00\x74\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\x0a\x00\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x61\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x70\x00\xff\xff\x2c\x00\x73\x00\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\x73\x00\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe1\x00\xe2\x00\xe3\x00\xff\xff\xff\xff\x69\x00\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\x1f\x01\x20\x01\x21\x01\xd8\x00\xd9\x00\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\x2e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xd7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xd7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\x09\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x18\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\x23\x01\x24\x01\xff\xff\x26\x01\x27\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x2c\x01\x2d\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xda\x00\xdb\x00\xdc\x00\xdd\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xdb\x00\xdc\x00\xdd\x00\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xf1\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xef\x00\xff\xff\xf1\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xee\x00\xff\xff\xff\xff\xf1\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xee\x00\xff\xff\xff\xff\xf1\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xde\x00\xdf\x00\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xe1\x00\xe2\x00\xe3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xde\x00\xdf\x00\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xe1\x00\xe2\x00\xe3\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xe6\x00\xe7\x00\xe8\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf1\x00\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xdd\x00\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xea\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xe3\x00\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xe9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xc1\x00\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xc0\x00\xff\xff\xc2\x00\xff\xff\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xc0\x00\xff\xff\x06\x01\x07\x01\xc4\x00\xc5\x00\xff\xff\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xff\xff\xce\x00\xcf\x00\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xcc\x00\xff\xff\xce\x00\xcf\x00\x27\x01\xd1\x00\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\xff\xff\xf8\x00\xf9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x01\x03\x01\xff\xff\xff\xff\x06\x01\x07\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x01\xff\xff\x29\x01\x2a\x01\xff\xff\xff\xff\x2d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++happyTable :: HappyAddr+happyTable = HappyA# "\x00\x00\x70\x00\x83\x05\x61\x03\x42\x05\x43\x05\xa3\x04\x9b\x04\x85\x05\xcd\x00\x96\x04\x93\x04\x92\x04\x93\x04\x94\x04\x0d\x01\x94\x04\x0e\x01\x02\x04\x26\x05\x3f\x05\x40\x05\x94\x04\x0f\x01\x10\x01\x11\x01\x2d\x00\x2e\x00\x6d\x05\x12\x01\x12\x02\x13\x02\x14\x02\xf6\x02\x2f\x00\x87\x05\x30\x00\x91\x02\x88\x05\xb4\x04\x13\x02\x14\x02\xb3\x04\x13\x02\xd0\x03\x22\x05\xb4\x04\x13\x02\x14\x02\xb4\x04\x13\x02\x14\x02\xce\x00\x31\x03\x98\x04\x99\x04\x9a\x04\x9b\x04\x6a\x05\x99\x04\x9a\x04\x9b\x04\xa1\x02\x8f\x05\x99\x04\x9a\x04\x9b\x04\x3c\x03\x71\x05\x80\x05\x81\x05\x9b\x04\x87\x02\x88\x02\x32\x05\x9b\x04\x87\x02\x88\x02\x27\x05\x9b\x04\x6e\x04\x8f\x04\xed\x01\xc0\xff\x10\x02\x67\x05\xc0\xff\x10\x02\xc0\xff\x10\x02\x62\x03\x2d\x04\x2e\x04\x4a\x03\x49\x04\x2e\x04\x73\x04\x10\x02\x7f\x02\x52\x04\x8c\x05\x94\x03\x96\x04\x63\x02\x34\x00\x03\x04\x10\x02\x65\x03\xbe\xfc\xff\xff\x35\x03\x36\x03\x3f\xfe\x5c\x03\x34\x00\x6e\x05\x57\x01\xc0\xff\x59\x03\xbe\xfc\xc0\xff\x96\x04\xa4\x04\x05\x02\xb6\x02\x74\x04\x75\x04\xa5\x04\xa6\x04\x36\x05\x37\x05\x38\x05\x39\x05\xa6\x04\x35\x00\x6a\x03\x82\x05\x39\x05\xa6\x04\x37\x00\x78\x05\xcf\x00\xb7\x04\xfa\x04\x8f\x00\xca\x04\x7c\x01\xd0\x00\xd1\x00\x06\x01\xf6\x04\x2e\x04\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x06\x02\x9a\x00\x9b\x00\xb1\x01\x33\x00\xb2\x01\x23\x02\x06\x01\x1f\x02\x14\x01\x4c\x00\x58\x01\xba\x01\xd7\x02\xeb\x02\x06\x01\x64\x02\x24\x02\xb7\x02\xb8\x04\x4d\x00\x79\x05\x2f\x03\x68\x05\x76\x04\x8b\x03\x34\x00\x11\x02\x93\xfe\x6b\x03\x11\x02\x80\x02\x11\x02\x81\x02\x80\x02\x64\x00\x6f\x04\x5a\x03\x12\x02\x67\x00\x11\x02\x4d\x04\x34\x00\xa0\x00\xa1\x00\x34\x00\xee\x01\x34\x00\xec\x02\x11\x02\x4b\x03\xad\x03\x79\x04\xa2\x00\x72\x00\xee\x01\x25\x02\x73\x00\x74\x00\x20\x01\x82\x03\xef\x01\xeb\x01\xec\x01\xed\x01\x11\x00\x37\x03\x8a\x02\xf7\x02\x20\x01\xee\x01\x89\x02\x02\x03\x7a\x01\x11\x00\x11\x00\x63\x03\x07\x01\x70\x04\x71\x04\x47\x00\xd2\x00\xa3\x00\x0f\x00\xd3\x00\xee\x01\x92\x02\x2f\x01\xf7\x02\x1e\x04\x11\x00\x63\x03\x7c\x00\x7d\x00\x11\x00\xee\x01\xa4\x00\x03\x03\x93\x02\x94\x02\x27\x04\x63\x03\x71\x00\x72\x00\x36\x01\x2f\x04\x73\x00\x74\x00\x2f\x04\x75\x00\x37\x03\x11\x00\xb3\x02\x20\x01\x11\x00\xd9\x01\x7a\x00\x1a\x02\x7b\x00\x11\x00\x37\x01\x9c\x04\x95\x02\x9d\x04\x9e\x04\x76\x00\x70\x04\x71\x04\x47\x00\x57\xff\x12\x02\x0e\x00\x0f\x00\x10\x00\x77\x00\x41\x05\x78\x00\x79\x00\x7a\x00\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x44\x05\x77\x04\x78\x04\x44\x05\x31\x00\x24\x02\x31\x00\x31\x00\xb4\x02\x41\x05\x53\x04\x53\x04\x31\x00\x25\x03\x31\x00\x15\x02\x31\x00\x0d\x01\x57\xff\x2f\x04\x4d\x00\x4d\x00\xff\xff\xac\x03\x15\x02\x11\x00\x9c\x04\x15\x02\x9d\x04\x9e\x04\x9c\x04\x15\x02\x9d\x04\x9e\x04\x15\x02\x9c\x04\xad\x03\x9d\x04\x9e\x04\x23\x03\x9c\x04\x00\x02\x9d\x04\x9e\x04\x9c\x04\x37\x01\x9d\x04\x9e\x04\x9c\x04\xee\x01\x9d\x04\x9e\x04\xa7\x04\xfb\x04\xa8\x04\xef\x01\x47\x00\xa7\x04\x10\x02\xa8\x04\x10\x02\x47\x00\xa7\x04\x4d\x00\xa8\x04\x30\x03\x47\x00\xf6\x01\x20\x01\x4c\x00\xa9\x04\x0f\x00\x10\x00\xff\xff\x11\x00\xa9\x04\x0f\x00\x10\x00\x11\x00\x4d\x00\xa9\x04\x0f\x00\x10\x00\x11\x00\x30\x03\xcd\x00\x81\x00\x20\x01\x11\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\x11\x00\xe8\x00\xc3\x03\x35\x02\x10\x02\x81\x00\x2a\x03\x08\x03\xf4\x01\xf5\x01\x25\x01\x26\x01\xac\x01\x30\x01\x31\x01\x73\x00\x1e\x01\xe9\x00\x37\x03\x04\x03\xff\x02\x20\x01\x6b\x01\xad\x01\x37\x00\xea\x00\xeb\x00\x11\x00\x6c\x01\x10\x02\xec\x00\xfd\x01\x38\x01\x36\x02\x8c\x00\xce\x00\x87\x03\x39\x01\x3d\x00\x3e\x00\x3f\x00\xf5\x02\x32\x01\x09\x03\xee\x01\x81\x03\x8c\x00\x2b\x03\x11\x00\xfc\x01\x79\x04\x21\x01\x2b\x01\x28\x01\xf3\x02\x05\x03\x00\x03\x1d\x01\x82\x03\x73\x00\x1e\x01\xed\x00\x16\x01\x25\x02\xcd\x00\x11\x02\x20\x01\x11\x02\x8f\x03\xe5\x00\xe6\x00\xe7\x00\x11\x00\xe8\x00\x86\x03\x51\x05\x80\x03\xf9\x01\xdd\x04\x40\x00\x27\x01\x28\x01\x15\x01\x1f\x01\x34\x04\x1d\x01\x20\x01\x73\x00\x1e\x01\xe9\x00\x95\x02\x91\xfe\x11\x00\x41\x00\x91\xfe\x21\x01\x60\x03\xea\x00\xeb\x00\x93\xfe\xf4\x01\x10\x02\xec\x00\x52\x05\x11\x02\x20\x02\xf5\x01\xce\x00\x87\x03\x35\x04\x0a\x02\x1f\x01\x4e\x01\xeb\x03\x20\x01\xd3\x04\x10\x02\xee\x00\xef\x00\xf0\x00\x11\x00\x69\x01\x4a\x02\x21\x01\xf1\x00\x0b\x02\x0c\x02\x8f\x00\x2e\x02\x11\x02\xf2\x00\xd1\x00\xf6\x01\xed\x00\x4c\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xb3\x04\x9a\x00\x9b\x00\xec\x03\x4d\x00\x27\x01\x28\x01\x83\x02\x07\x01\x2a\x02\x1d\x01\x6c\x01\x73\x00\x1e\x01\x43\x00\x3a\x01\xf3\x01\x45\x00\x46\x00\x2b\x02\x47\x00\x48\x00\x49\x00\xbe\xfc\x87\x03\xf5\x01\x6d\x01\xce\x04\x73\x00\x1e\x01\x4a\x00\x4b\x00\x4c\x00\x5c\x03\xf5\x01\x14\x01\x1f\x01\x41\x03\xf5\x01\x20\x01\xbb\xff\x79\x02\x4d\x00\xa0\x00\xa1\x00\x11\x00\x06\x01\x7a\x02\x21\x01\xee\x00\xef\x00\xf0\x00\xa3\x01\xa2\x00\x72\x00\x15\x01\xf1\x00\x73\x00\x74\x00\x8f\x00\xf2\x04\x11\x02\xf2\x00\xd1\x00\x21\x01\x8f\x02\x49\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x82\x03\x9a\x00\x9b\x00\xcd\x00\x11\x02\x7b\x02\x1c\x03\x1d\x03\x15\x01\xd2\x00\xa3\x00\x0f\x00\xd3\x00\xff\xff\xf6\x01\x5e\x05\x4c\x00\xf6\x01\x11\x00\x4c\x00\x7c\x00\x7d\x00\xba\x01\xe6\x01\xa4\x00\xf1\x04\x4d\x00\x56\x04\x57\x04\x4d\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\x4f\x01\x9e\x01\x00\x04\xf5\x01\xb4\x03\x6c\x01\x37\x00\xec\x00\x87\xfd\xa0\x00\xa1\x00\x15\x01\xce\x00\x50\x01\xbb\xff\x51\x01\x52\x01\x58\x04\x5d\x04\xa2\x00\x72\x00\xf9\x01\x3f\x00\x73\x00\x74\x00\x77\x00\xbf\x01\x78\x00\x79\x00\x7a\x00\x7f\x03\x7b\x00\xed\x03\xdc\x04\x7e\x00\x7f\x00\x6d\x01\x31\x01\x73\x00\x1e\x01\xc9\x02\xcd\x00\xf6\x01\x80\x03\x4c\x00\x03\x02\xdd\x04\xd2\x00\xa3\x00\x0f\x00\xd3\x00\xf6\x01\x13\x03\x4c\x00\x4d\x00\xf6\x01\x11\x00\x4c\x00\x7c\x00\x7d\x00\x02\x02\x40\x00\xa4\x00\x4d\x00\xc0\x01\x56\x04\x57\x04\x4d\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\x14\x03\x15\x03\x21\x01\x41\x00\xce\x01\x7f\x00\x36\x04\xec\x00\x46\x01\xcf\x01\x14\x05\xf5\x01\xce\x00\x85\x01\xd2\x04\x01\x02\x37\x04\x58\x04\x59\x04\x82\x00\x83\x00\x84\x00\xee\x00\xef\x00\xa3\x02\x5a\x04\x85\x00\xd3\x04\x81\x00\xf1\x00\x02\x02\x69\x01\x8f\x00\xd8\x03\x59\x02\xa5\x02\xd1\x00\x47\x01\x48\x01\x49\x01\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x8b\x00\xfa\x02\x29\x01\x2a\x01\x8e\x00\xfb\x02\xf6\x01\xc7\x02\x4c\x00\x6b\x01\x08\x02\x34\x05\x33\x05\x6c\x01\x09\x02\x6c\x01\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x8c\x00\x47\x00\x48\x00\x49\x00\x8f\x00\x02\x02\x02\x02\x5a\x02\x0f\x00\x10\x00\x17\x03\x4a\x00\x4b\x00\x4c\x00\xff\xff\x11\x00\xd0\x04\xcc\x04\xcd\x04\xa0\x00\xa1\x00\x18\x03\x19\x03\x4d\x00\xb2\x04\xee\x00\xef\x00\xa3\x02\x5a\x04\xa2\x00\x72\x00\x7a\x05\xf1\x00\x73\x00\x74\x00\x8f\x00\x8f\x02\xb3\x04\xa5\x02\xd1\x00\x6c\x01\x7b\x05\xf8\x04\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\xcd\x00\x57\x02\x58\x02\x59\x02\x82\x03\xbe\x01\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x6d\x01\x6e\x01\x73\x00\x1e\x01\xf6\x01\x11\x00\x4c\x00\x7c\x00\x7d\x00\x1c\x03\x1d\x03\xa4\x00\x5d\x05\xcb\x04\xcc\x04\xcd\x04\x4d\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\x6d\x01\x70\x03\x73\x00\x1e\x01\x5e\x05\x30\x02\x15\x04\xec\x00\x4c\x00\xa0\x00\xa1\x00\x31\x02\xce\x00\xae\x01\x5a\x02\x0f\x00\x10\x00\x21\x01\x4d\x00\xa2\x00\x72\x00\xac\x02\x11\x00\x73\x00\x74\x00\x38\x02\x60\x05\x6d\x01\xce\x04\x73\x00\x1e\x01\x11\x00\x2b\x01\x28\x01\x33\x03\xab\x01\x4d\x00\x1d\x01\x21\x01\x73\x00\x1e\x01\xcd\x00\x45\x03\x46\x03\x82\x00\x83\x00\x84\x00\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x85\x00\x7a\x01\xdd\x01\x2d\x02\x47\x00\x11\x00\x4d\x02\x7c\x00\x7d\x00\x2e\x02\x2e\x02\xa4\x00\x1f\x01\xff\xff\x21\x01\x20\x01\xde\x01\xf3\x00\xf4\x00\xf5\x00\xf6\x00\x11\x00\x8b\x00\xee\x01\x21\x01\xff\xff\x4d\x00\x4b\x01\xec\x00\xcf\x04\x0e\x00\x0f\x00\x10\x00\xce\x00\x6d\x01\xce\x04\x73\x00\x1e\x01\x11\x00\x80\x01\xe5\x02\x81\x01\xa2\x02\xee\x00\xef\x00\xa3\x02\xa4\x02\x71\x03\x86\x01\x44\x00\xf1\x00\x64\x00\x46\x00\x8f\x00\x47\x00\x67\x00\xa5\x02\xd1\x00\x81\x00\x83\x01\x82\x01\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x82\x00\x83\x00\x84\x00\x21\x01\x0c\xfd\x2c\x05\x72\x00\x85\x00\x37\x00\x73\x00\x74\x00\x86\x00\xee\x01\x7d\x05\x4c\x01\x34\x01\x4d\x01\x88\x00\xcf\x04\x7e\x05\x76\x04\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x55\x01\x8a\x00\x4b\x01\x32\x02\x8b\x00\x8c\x00\x64\x00\x2e\x02\x8e\x00\x8f\x00\x67\x00\xee\x01\x34\x03\xad\x02\xaa\x02\xab\x02\xa1\x00\x27\x02\x11\x00\x7c\x00\x7d\x00\xee\x00\xef\x00\xa3\x02\xa4\x02\xa2\x00\x72\x00\x48\x04\xf1\x00\x73\x00\x74\x00\x8f\x00\x08\x02\x11\x00\xa5\x02\xd1\x00\x09\x02\x92\x02\x40\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x4a\x01\xe5\x02\xef\x03\x94\x02\xcd\x00\x41\x00\xd2\x00\xa3\x00\x0f\x00\xd3\x00\xb8\x02\xb1\x01\x64\x00\xb2\x01\xcf\x01\x11\x00\x67\x00\x7c\x00\x7d\x00\xd9\x01\x7a\x00\xa4\x00\x7b\x00\x1c\x03\x1d\x03\x60\x04\x95\x02\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xee\x02\xef\x02\xf0\x02\xf1\x02\xf2\x02\xca\x01\x10\x00\xa9\x02\xaa\x02\xab\x02\xa1\x00\xec\x00\x11\x00\x2f\x01\xcb\x01\x7d\x00\xce\x00\x61\x04\x67\x04\xa2\x00\x72\x00\x87\x04\x88\x04\x73\x00\x74\x00\x89\x01\x76\x01\x0f\x00\x10\x00\x8a\x01\x06\x01\x8b\x01\x08\x01\x09\x01\x11\x00\x43\x00\x44\x00\xff\xff\x45\x00\x46\x00\x64\x00\x47\x00\x48\x00\x49\x00\x67\x00\xcd\x00\xff\xff\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x4a\x00\x4b\x00\x4c\x00\xee\x01\x1b\x01\x11\x00\xd3\x03\x7c\x00\x7d\x00\xc4\x04\xd4\x03\xa4\x00\x4d\x00\x3a\x02\x7a\x00\x60\x04\x7b\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xe6\x02\x81\x00\xe3\x02\xfb\x01\x19\x01\x46\x00\x93\xfe\x47\x00\x97\x02\xff\xff\x98\x02\xec\x00\x82\x00\x83\x00\x84\x00\x38\x02\xce\x00\x61\x04\x62\x04\x85\x00\x18\x01\x11\x00\x25\x04\xcb\x01\x7d\x00\x20\x01\xee\x00\xef\x00\xa3\x02\x63\x04\xd3\x03\x11\x00\xd6\x02\xf1\x00\x90\x04\xd7\x02\x8f\x00\x99\x02\x17\x03\xa5\x02\xd1\x00\x8b\x00\x8c\x00\x81\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x0a\x05\x0b\x05\x82\x00\x83\x00\x84\x00\x51\x03\x52\x03\x53\x03\x37\x00\x85\x00\xf5\x03\x86\x00\x10\x03\x20\x01\xd3\x03\x2e\x05\xe7\x02\x88\x00\x4d\x05\x11\x00\x0e\x02\x39\x01\x3d\x00\x3e\x00\x3f\x00\x99\xfe\x8a\x00\x55\x01\x99\xfe\x0e\x03\x8d\x00\x8b\x00\x8c\x00\x0a\x05\x58\x05\x8e\x00\x8f\x00\x4f\x05\xcc\x04\xcd\x04\xa0\x00\xa1\x00\x40\x01\x41\x01\x42\x01\x43\x01\xee\x00\xef\x00\xa3\x02\x63\x04\xa2\x00\x72\x00\x64\x00\xf1\x00\x73\x00\x74\x00\x8f\x00\x86\x02\xfe\x02\xa5\x02\xd1\x00\x00\x02\xfe\x01\x40\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\xcd\x00\xfd\x01\xfe\x01\xbf\x02\x10\x00\x41\x00\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x11\x00\x3d\x03\xcb\x01\x7d\x00\x46\x00\x11\x00\x47\x00\x7c\x00\x7d\x00\x06\x03\x8f\x01\xa4\x00\x90\x01\xf6\x02\x56\x04\x57\x04\xea\x02\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xb4\x02\x0f\x00\x10\x00\xb1\x02\x0f\x00\x10\x00\xfb\x01\xec\x00\x11\x00\xa0\x00\xa1\x00\x11\x00\xce\x00\xe2\x02\xcd\x01\x9e\x01\x7a\x00\x03\x05\x7b\x00\xa2\x00\x72\x00\xce\x01\x7f\x00\x73\x00\x74\x00\xe1\x02\xcf\x01\x6d\x01\xce\x04\x73\x00\x1e\x01\xde\x02\xae\x02\x0f\x00\x10\x00\x43\x00\x44\x00\xe0\x02\x45\x00\x46\x00\x11\x00\x47\x00\x48\x00\x49\x00\x0c\x03\xd3\x02\xd4\x02\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x4a\x00\x4b\x00\x4c\x00\xdf\x02\x80\x01\x11\x00\x81\x01\x7c\x00\x7d\x00\xda\x02\x2e\x05\xa4\x00\x4d\x00\x46\x00\x21\x01\x47\x00\xd8\x02\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf0\x01\x58\x01\xee\x01\xd2\x02\xd3\x02\xd4\x02\xff\x04\xfd\x04\xcf\x04\x85\x01\x86\x01\x44\x00\xc9\x02\x73\x02\x46\x00\x74\x02\x47\x00\xcd\x01\x9e\x01\x7a\x00\xca\x02\x7b\x00\xee\x00\xef\x00\xa3\x02\x5a\x04\x87\x01\xcd\x00\x4c\x00\xf1\x00\xc6\x02\x1c\x04\x8f\x00\x1d\x04\xbf\x02\xa5\x02\xd1\x00\xbe\x02\x4d\x00\x40\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x60\x04\x73\x03\x71\x01\x72\x01\x73\x01\x41\x00\x74\x01\xe1\x03\xe2\x03\xe3\x03\x1d\x01\xb8\x01\x73\x00\x1e\x01\xcd\x01\x9e\x01\x7a\x00\xec\x00\x7b\x00\x37\x00\x7d\x01\xb4\x01\xce\x00\x0b\x05\xd3\x01\x4c\x02\xd4\x01\xe7\x02\x14\x04\xd5\x01\x15\x04\xc4\x02\x39\x01\x3d\x00\x3e\x00\x3f\x00\x1f\x01\x7d\x01\x7e\x01\x20\x01\xa0\x00\xa1\x00\x7c\x01\x78\x01\x56\x02\x11\x00\xf8\xfc\x80\x01\x21\x01\x81\x01\xa2\x00\x72\x00\x4b\x02\xd8\x01\x73\x00\x74\x00\x20\x01\x46\x03\x47\x03\x48\x03\xbc\x02\xba\x01\x11\x00\xe5\x03\x7c\x00\x7d\x00\x43\x00\x44\x00\xbb\x02\xcf\x03\x46\x00\xd0\x03\x47\x00\x68\x02\x40\x00\x06\x04\x07\x04\x08\x04\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x4a\x00\x40\x00\x4c\x00\x7a\x01\x78\x01\x11\x00\x41\x00\x7c\x00\x7d\x00\x77\x01\x78\x01\xa4\x00\x4d\x00\xba\x02\x6c\x04\x41\x00\x6d\x04\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xeb\x01\xee\x00\xef\x00\xa3\x02\x63\x04\xcd\x00\x3a\x02\x7a\x00\xf1\x00\x7b\x00\x4c\x04\x8f\x00\x4d\x04\xb8\x02\xa5\x02\xd1\x00\xef\x04\xcf\x01\xf0\x04\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x7a\x04\x07\x04\x08\x04\x6d\x04\x07\x04\x08\x04\xc1\x04\x07\x04\x08\x04\x8d\x05\x07\x04\x08\x04\x92\x05\x07\x04\x08\x04\xe3\x04\xec\x00\xe4\x04\x8d\x02\x43\x00\x44\x00\xce\x00\x45\x00\x46\x00\x8c\x02\x47\x00\x48\x00\x49\x00\x43\x00\x44\x00\xe8\x04\xa2\x04\x46\x00\xa3\x04\x47\x00\x4a\x00\x4b\x00\x4c\x00\x43\x01\x44\x01\xa0\x00\xa1\x00\x8e\x02\xef\x04\x4a\x00\xf0\x04\x4c\x00\x4d\x00\x2c\x01\x2d\x01\xa2\x00\x72\x00\xfb\x02\xfc\x02\x73\x00\x74\x00\x4d\x00\x86\x00\x6c\x03\x6d\x03\x5f\x02\x34\x01\xb8\x01\x88\x00\x8f\x02\x49\x00\x87\x02\xbe\xfc\x7d\x01\x0f\x04\xf9\x03\xfa\x03\x8a\x00\x7f\x02\x56\x00\x5e\x04\x53\x03\x7c\x02\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x85\x02\x57\x00\x78\x02\x58\x00\x59\x00\x11\x00\x77\x02\x7c\x00\x7d\x00\x06\x01\x5b\x00\xa4\x00\x64\x05\x65\x05\x69\x02\xfc\x04\xfd\x04\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xee\x00\xef\x00\xa3\x02\xa4\x02\xcd\x00\x70\x02\x6f\x02\xf1\x00\x6e\x02\x6d\x02\x8f\x00\x65\x00\x66\x00\xa5\x02\xd1\x00\x68\x00\x69\x00\x68\x02\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x67\x02\xba\x01\x5f\x02\x4f\x02\x4e\x02\x4c\x02\x4b\x02\x49\x02\x48\x02\x47\x02\x38\x02\x37\x02\x34\x02\x29\x02\x33\x02\x2f\x02\xec\x00\x0d\x01\x2c\x02\x00\x02\xc7\x03\xce\x00\xb7\x02\x71\x01\x72\x01\x73\x01\xc6\x03\x74\x01\x0e\x02\x37\x00\xe7\x04\x1d\x01\xc5\x03\x73\x00\x1e\x01\xc2\x03\xbb\x03\xe7\x02\xbc\x03\xba\x03\xa0\x00\xa1\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\xd9\xfc\xf7\xfc\xe2\xfc\xe0\xfc\xa2\x00\x72\x00\x1c\x01\xe1\xfc\x73\x00\x74\x00\x1d\x01\x1f\x01\x73\x00\x1e\x01\x20\x01\xf6\xfc\xda\xfc\xdb\xfc\x3a\x02\x7a\x00\x11\x00\x7b\x00\xb9\x03\x21\x01\x36\x02\xb8\x02\xb8\x03\xd3\x04\xb7\x03\xcf\x01\xb6\x03\xb3\x03\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x1f\x01\xb2\x03\x40\x00\x20\x01\xb1\x03\x11\x00\xaa\x03\x7c\x00\x7d\x00\x11\x00\xa0\x03\xa4\x00\x21\x01\x6c\x01\xc3\x02\x8e\x03\x41\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xee\x00\xef\x00\xa3\x02\xa4\x02\xcd\x00\x2f\x02\x8c\x03\xf1\x00\x8a\x03\x8d\x03\x8f\x00\x83\x03\x7e\x03\xa5\x02\xd1\x00\x7d\x03\x7c\x03\x7a\x03\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x79\x03\x7b\x03\x78\x03\x77\x03\x37\x00\x76\x03\x73\x03\x70\x03\x6f\x03\x56\x03\x69\x01\x61\x03\xd4\x04\x5e\x03\x0b\xfd\x51\x03\xec\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\xce\x00\x4f\x03\x4d\x03\xd3\x01\x43\x03\xd4\x01\x2d\x03\x22\x03\xd5\x01\x43\x00\x44\x00\xd6\x01\x45\x00\x46\x00\x8a\x00\x47\x00\x48\x00\x49\x00\x2f\x01\xa0\x00\xa1\x00\x21\x03\x28\x03\xd7\x01\x20\x03\x4a\x00\x4b\x00\x4c\x00\x0d\x01\xa2\x00\x72\x00\xef\x03\xd8\x01\x73\x00\x74\x00\x20\x01\x81\x00\x4d\x00\x40\x00\xd9\x01\x7a\x00\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x82\x00\x83\x00\x84\x00\x07\x05\x38\x04\x41\x00\xcc\x03\x85\x00\x3a\x04\x33\x04\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x2d\x04\x2b\x04\x2a\x04\x27\x04\x6b\x01\x11\x00\x02\xfd\x7c\x00\x7d\x00\x29\x04\x6c\x01\xa4\x00\x01\xfd\x03\xfd\x25\x04\x8b\x00\x8c\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xee\x00\xef\x00\xa3\x02\xf8\x03\x24\x04\x22\x04\x12\x04\xf1\x00\x18\x04\x5c\x03\x8f\x00\x0c\x04\x0d\x04\xa5\x02\xd1\x00\x0a\x04\x06\x04\x02\x04\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xa6\x02\xa7\x02\xa8\x02\x02\x05\x00\x04\x37\x00\xc3\x02\xf4\x03\x43\x00\x44\x00\xfe\x03\x45\x00\x46\x00\xe7\x02\x47\x00\x48\x00\x49\x00\x6a\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\xdf\x03\xef\x03\x4a\x00\x4b\x00\x4c\x00\xe6\x03\x74\x03\x73\x01\xe0\x03\x74\x01\x35\x02\xd7\x03\x07\x01\x1d\x01\x4d\x00\x73\x00\x1e\x01\x6c\x05\xd6\x03\xcc\x03\xa0\x04\xa0\x00\xa1\x00\x98\x04\x92\x04\x8f\x04\x67\x02\x07\x01\x06\x01\x5c\x03\x8d\x04\xa2\x00\x72\x00\xba\x01\x89\x04\x73\x00\x74\x00\x40\x04\x40\x00\x1f\x01\x83\x03\x37\x00\x20\x01\x81\x04\x80\x04\x7f\x04\x0c\x04\x7e\x04\x11\x00\xe7\x02\x0a\x04\x21\x01\x41\x00\x0a\x04\x39\x01\x3d\x00\x3e\x00\x3f\x00\x06\x01\xd2\x00\xa3\x00\x0f\x00\xd3\x00\x6f\x01\x70\x01\x71\x01\x72\x01\x73\x01\x11\x00\x74\x01\x7c\x00\x7d\x00\x56\x04\x1d\x01\xa4\x00\x73\x00\x1e\x01\x37\x00\x50\x04\x4b\x04\xf3\x00\xf4\x00\xf5\x00\xf6\x00\x47\x04\xe7\x02\xcb\x02\x44\x04\x46\x04\x43\x04\x39\x01\x3d\x00\x3e\x00\x3f\x00\x42\x04\x41\x04\x40\x00\x40\x04\x20\x03\x1f\x01\xeb\x04\xea\x04\x20\x01\xe6\x04\xe5\x04\xdf\x04\xda\x04\x49\x01\x11\x00\x07\x01\x41\x00\x21\x01\xc4\x04\x43\x00\x44\x00\x0a\x04\x45\x00\x46\x00\xbb\x04\x47\x00\x48\x00\x49\x00\x81\x00\x54\x01\xad\xfe\xba\x04\x24\x05\xad\xfe\x32\x05\x4a\x00\x4b\x00\x4c\x00\x40\x00\x82\x00\x83\x00\x84\x00\x37\x00\xb0\x04\x1b\x01\x26\x05\x85\x00\x4d\x00\x4c\x01\x1f\x05\x4d\x01\x1e\x05\x41\x00\x1d\x05\x13\x05\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x10\x05\x14\x05\x93\x01\x72\x00\x12\x05\x55\x01\x73\x00\x74\x00\x0f\x05\x8b\x00\x8c\x00\x0e\x05\x0d\x05\x8e\x00\x8f\x00\xf5\x04\x58\x01\x63\x05\x43\x00\x44\x00\x51\x03\x45\x00\x46\x00\x69\x05\x47\x00\x48\x00\x49\x00\x62\x05\x65\x03\x5c\x05\x4c\x05\x94\x01\x0f\x00\x10\x00\x4a\x00\x4b\x00\x4c\x00\x07\x01\x40\x00\x11\x00\x4d\x05\x7c\x00\x7d\x00\x48\x05\x3f\x05\x3e\x05\x4d\x00\x5a\x05\x36\x05\x7f\x05\x3d\x05\x75\x05\x41\x00\x7c\x05\x43\x00\x44\x00\x3c\x05\x45\x00\x46\x00\x80\x05\x47\x00\x48\x00\x49\x00\xcc\x03\x06\x01\x71\x05\x5a\xfe\x6c\x05\x0c\x04\x0a\x04\x4a\x00\x4b\x00\x4c\x00\x91\x05\xc5\x03\x8c\x05\xcc\x03\x37\x00\x98\x05\x97\x05\x95\x05\x0a\x04\x4d\x00\x66\x03\x92\x05\x67\x03\x9a\x05\x0b\x01\xcc\x01\xbb\x01\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xb3\x01\xaf\x01\x37\x00\x8d\x01\x83\x01\x55\x01\x3e\x01\x34\x01\x66\x03\x19\x01\x67\x03\x12\x03\x0e\x03\x11\x03\x10\x03\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x43\x00\x44\x00\x06\x03\x45\x00\x46\x00\x00\x03\x47\x00\x48\x00\x49\x00\x09\x03\xf2\x02\xca\x02\xec\x02\xd8\x02\xe2\x01\x83\x02\x4a\x00\x4b\x00\x4c\x00\x40\x00\xbc\x02\x71\x02\x24\x03\x28\x01\x21\x02\x09\x02\x65\x02\x1d\x01\x4d\x00\x73\x00\x1e\x01\xcc\x02\x99\x02\x41\x00\x06\x02\x37\x00\xc9\x03\x0e\x02\x40\x00\x54\x02\x9a\x02\xcd\x02\xc8\x03\x3b\x00\x9c\x02\x17\x03\xc7\x03\x63\x02\xce\x02\x3d\x00\x3e\x00\x3f\x00\x41\x00\x1f\x01\xad\x03\x5e\x03\x20\x01\x5e\x03\x54\x03\xb4\x03\x4f\x03\x4d\x03\x11\x00\x8e\x03\x84\x03\x21\x01\x83\x03\x4b\x03\x43\x03\x33\x03\x99\x02\x28\x03\x2b\x03\x37\x00\x1e\x03\x26\x03\x1d\x03\x1a\x03\x9a\x02\x9b\x02\x3e\x04\x3d\x04\x9c\x02\x3a\x04\x3c\x04\x38\x04\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x40\x00\x3b\x04\x2b\x04\x1d\x04\x43\x00\x44\x00\x20\x04\x45\x00\x46\x00\x1a\x04\x47\x00\x48\x00\x49\x00\x12\x04\x41\x00\x0a\x04\x0e\x04\x10\x04\xf4\x03\xed\x03\x4a\x00\x4b\x00\x4c\x00\x43\x00\x44\x00\xe6\x03\x45\x00\x46\x00\xcd\x03\x47\x00\x48\x00\x49\x00\x4d\x00\xcc\x03\xca\x03\x8d\x04\x63\x02\x8b\x04\x40\x00\x4a\x00\x4b\x00\x4c\x00\x7b\x04\x76\x04\x54\x04\x5f\x04\x32\x03\xf0\x04\xed\x04\x37\x00\xec\x04\x4d\x00\x41\x00\xe1\x04\x9a\x02\x9b\x02\xcf\x02\x44\x04\x9c\x02\xe0\x04\x13\x00\xdd\x04\x9d\x02\x3d\x00\x3e\x00\x3f\x00\xd8\x04\xdf\x04\x14\x00\xda\x04\xc2\x04\xc8\x04\xc9\x04\xb0\x04\xb8\x04\x43\x00\x44\x00\x30\x05\x45\x00\x46\x00\x15\x00\x47\x00\x48\x00\x49\x00\xa0\x04\x2f\x05\x17\x00\x18\x00\x19\x00\x24\x05\x21\x05\x4a\x00\x4b\x00\x4c\x00\x9e\x02\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x20\x05\x08\x05\x24\x00\x4d\x00\x40\x00\x10\x05\x01\x05\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x43\x00\x44\x00\x9f\x02\x45\x00\x46\x00\x41\x00\x47\x00\x48\x00\x49\x00\xf8\x04\xf3\x04\x69\x05\x5f\x05\x81\x00\x63\x05\x5e\x05\x4a\x00\x4b\x00\x4c\x00\x59\x05\xd1\x01\x46\x05\xd2\x01\x56\x05\x82\x00\x83\x00\x84\x00\xf6\x03\x4d\x00\x76\x05\x37\x00\x85\x00\x45\x05\x75\x05\x86\x05\x9a\x02\x9b\x02\x8e\x05\x8a\x05\x9c\x02\x9f\x02\x93\x05\x6b\x01\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x9e\x02\x6c\x01\x9a\x05\x00\x00\x84\x05\x95\x05\x8b\x00\x8c\x00\x00\x00\x98\x05\x8e\x00\x8f\x00\x00\x00\x17\x02\x18\x02\x8a\x05\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x19\x02\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x40\x00\xe8\x01\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x00\x00\x4e\x04\x4d\x00\x00\x00\x37\x00\x5b\x00\x00\x00\x41\x00\x00\x00\x9a\x02\x9b\x02\x00\x00\x00\x00\x9c\x02\x9f\x02\x00\x00\x91\x02\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x6c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x65\x00\x66\x00\x00\x00\x00\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe6\x04\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x02\x9b\x02\x9e\x02\x00\x00\x9c\x02\x00\x00\x00\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x41\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x40\x00\xa6\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x02\x58\x05\x00\x00\x41\x00\x37\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x9a\x02\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x00\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x74\x02\x75\x02\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x9e\x02\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x9f\x02\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x41\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x50\x05\x4d\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x02\x9b\x02\x00\x00\x00\x00\x9c\x02\x9f\x02\x00\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x37\x00\x00\x00\x9e\x02\x00\x00\x00\x00\x00\x00\xbf\x04\x00\x00\xc0\x04\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x05\x4d\x00\x41\x00\x16\x05\x17\x05\x18\x05\x29\x05\x40\x00\x19\x05\x3f\x00\x00\x00\x00\x00\x00\x00\x9f\x02\x00\x00\x2a\x05\x00\x00\x82\x00\x83\x00\x84\x00\x00\x00\x41\x00\x00\x00\x37\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x05\x00\x00\x00\x00\x00\x00\x72\x05\x18\x05\x00\x00\x00\x00\x19\x05\x3f\x00\x00\x00\x00\x00\x37\x00\x00\x00\x9e\x02\x00\x00\x8b\x00\x2b\x05\x40\x00\x00\x00\x8e\x00\x2c\x05\x00\x00\x00\x00\x4a\x05\x00\x00\x00\x00\x19\x05\x3f\x00\x00\x00\x73\x05\x00\x00\x41\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x4a\x00\x4b\x00\x4c\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x4d\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x81\x00\x9f\x02\x48\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x41\x00\x00\x00\x82\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x01\x4a\x00\x4b\x00\x4c\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x1b\x05\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x37\x00\x1b\x05\x00\x00\x00\x00\x1d\x02\xf1\x03\xcd\x02\x4d\x00\x3b\x00\x9c\x02\x00\x00\x00\x00\x81\x00\xce\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x1b\x05\x00\x00\x00\x00\x82\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x37\x00\x85\x00\x00\x00\x00\x00\x1c\x02\xf0\x03\xcd\x02\x00\x00\x3b\x00\x9c\x02\x00\x00\x00\x00\x6b\x01\xce\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x6c\x01\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x40\x00\x8e\x00\x8f\x00\x37\x00\x00\x00\x00\x00\x00\x00\xc3\x03\x69\x04\xcd\x02\x00\x00\x3b\x00\x9c\x02\x00\x00\x41\x00\x00\x00\xce\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\xc5\x04\x4f\x01\x3f\x03\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x41\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\xc4\x01\xc6\x04\x51\x01\x52\x01\x00\x00\x00\x00\x00\x00\xcf\x02\x00\x00\x40\x00\x00\x00\x00\x00\x77\x00\x00\x00\x78\x00\x79\x00\x7a\x00\x00\x00\x7b\x00\x00\x00\x00\x00\x7e\x00\x7f\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\xcf\x02\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\xcf\x02\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x9e\x02\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x37\x00\x00\x00\x00\x00\xc5\x04\x00\x00\x3f\x03\x9b\x02\x00\x00\x4d\x00\x9c\x02\x00\x00\x00\x00\x81\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x4e\x05\x00\x00\x9f\x02\x00\x00\x00\x00\x82\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x37\x00\x85\x00\x00\x00\x40\x03\x00\x00\x3f\x03\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x00\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x55\x01\x00\x00\x00\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x40\x00\x8e\x00\x8f\x00\x37\x00\x00\x00\x00\x00\x3e\x03\x00\x00\x3f\x03\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x41\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x4f\x01\xf1\x03\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x41\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x50\x01\x00\x00\x51\x01\x52\x01\x00\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x40\x00\x00\x00\x00\x00\x77\x00\x00\x00\x78\x00\x79\x00\x7a\x00\x00\x00\x7b\x00\x00\x00\x00\x00\x7e\x00\x7f\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x9e\x02\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x9e\x02\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x9e\x02\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x03\x9b\x02\x00\x00\x4d\x00\x9c\x02\x00\x00\x00\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x04\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x00\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x04\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x41\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x4f\x01\x6a\x04\x9b\x02\x00\x00\x00\x00\x9c\x02\x00\x00\x41\x00\x00\x00\x9d\x02\x3d\x00\x3e\x00\x3f\x00\xc7\x02\x00\x00\x51\x01\x52\x01\x00\x00\x00\x00\x00\x00\x9e\x02\x00\x00\x40\x00\x00\x00\x00\x00\x77\x00\x00\x00\x78\x00\x79\x00\x7a\x00\x00\x00\x7b\x00\x00\x00\x00\x00\x7e\x00\x7f\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x9e\x02\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x9e\x02\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x9e\x02\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x39\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\xdf\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x00\x00\x00\x00\xe0\x01\xe1\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x37\x00\x00\x00\xe4\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x81\x00\x54\x01\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x82\x00\x83\x00\x84\x00\x40\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x55\x01\x00\x00\x00\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x02\x7a\x00\x4d\x00\x7b\x00\x00\x00\x00\x00\xce\x01\x7f\x00\x4f\x01\x00\x00\x00\x00\xcf\x01\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\xc4\x01\x00\x00\x51\x01\x52\x01\x42\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x77\x00\x00\x00\x78\x00\x79\x00\x7a\x00\x00\x00\x7b\x00\x4d\x00\x00\x00\x7e\x00\x7f\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\xe2\x01\x47\x00\xe5\x01\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\xe4\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\xe6\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x02\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x54\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xe2\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x02\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x13\x00\x41\x00\x54\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x14\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xb0\x02\x00\x00\x00\x00\x00\x00\x40\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x42\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x41\x00\x47\x00\xe5\x01\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x6f\x05\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\xe6\x01\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x4a\x00\x4b\x00\x4c\x00\x17\x02\x18\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x19\x02\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x02\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x00\x00\x00\x00\x54\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x19\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\x03\x00\x00\x00\x00\xfe\x03\x37\x00\x00\x00\x00\x00\x00\x00\x54\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\x03\x40\x00\x00\x00\xfc\x03\x37\x00\x00\x00\x00\x00\x00\x00\x54\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\x03\x40\x00\x00\x00\xbe\x04\x37\x00\x00\x00\x00\x00\x00\x00\x54\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x02\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x00\x00\x00\x00\x54\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x43\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xdb\x02\x45\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x43\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x44\x02\x45\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x43\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xc0\x03\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x43\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xbf\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\xbd\x03\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x03\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x43\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xbc\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x43\x02\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xd7\x03\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x22\x04\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x52\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x38\x00\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\xe9\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x90\x01\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x53\x05\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x8f\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x1b\x02\x37\x00\x00\x00\x22\x04\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x01\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\xa0\x00\xa1\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x40\x00\x00\x00\x1f\x04\x37\x00\x00\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x42\x00\x00\x00\x40\x00\x11\x00\x18\x04\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x8f\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xa4\x01\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x04\x04\x37\x00\x00\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\xd1\x03\x37\x00\x00\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\xa0\x00\xa1\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x40\x00\x00\x00\x50\x04\x37\x00\x00\x00\xf9\x04\x00\x00\x39\x00\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x42\x00\x00\x00\x40\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x00\x00\x00\x00\x1a\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x8f\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x55\x05\x37\x00\x00\x00\x00\x00\x00\x00\x1d\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x1c\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\xa0\x00\xa1\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x40\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\xc3\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x41\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x42\x00\x00\x00\x40\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x37\x00\x00\x00\x00\x00\x00\x00\xd2\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\xf5\x04\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\xe5\x02\x00\x00\x00\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x02\x00\x00\x40\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x37\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x02\x81\x00\xc6\x01\x42\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x41\x00\x00\x00\x00\x00\x82\x00\x83\x00\x84\x00\xc7\x01\xc8\x01\xc9\x01\xca\x01\x85\x00\x00\x00\x40\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x42\x00\x00\x00\x00\x00\x41\x00\x00\x00\x55\x01\x4a\x00\x4b\x00\x4c\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x40\x00\x00\x00\x00\x00\x4d\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x1e\x02\x47\x00\x48\x00\x49\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x56\x03\x47\x00\x48\x00\x49\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x40\x00\x00\x00\x4d\x00\x00\x00\x00\x00\x0d\x04\x00\x00\x00\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x41\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x03\x00\x00\x40\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x04\x00\x00\x40\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x51\x04\x47\x00\x48\x00\x49\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\x00\x00\x00\x00\x06\x05\x00\x00\x00\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x05\x00\x00\x40\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x81\x00\x06\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x37\x00\x00\x00\x82\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x49\x05\x85\x00\x40\x00\x00\x00\x00\x00\x39\x01\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x37\x00\x55\x01\x00\x00\x40\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x8e\x00\x8f\x00\x00\x00\x00\x00\x88\x03\x3d\x00\x3e\x00\x3f\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x43\x00\x44\x00\x00\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x4d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x44\x00\x4d\x00\x45\x00\x46\x00\x00\x00\x47\x00\x48\x00\x49\x00\x00\x00\x00\x00\x10\x02\xa6\x00\x13\x00\xa7\x00\x00\x00\x4a\x00\x4b\x00\x4c\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4d\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x02\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\xa7\x03\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\xfc\x00\xd8\x00\x00\x00\xfd\x00\x00\x00\x15\x00\x00\x00\xfe\x00\x00\x00\x16\x00\xff\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x01\x01\xaf\x00\xdd\x00\xb1\x00\x02\x01\x03\x01\x00\x00\x00\x00\x04\x01\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x06\x01\x07\x01\x08\x01\x09\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x65\x04\x66\x04\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x67\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xaf\x00\xdd\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x06\x01\x07\x01\x08\x01\x09\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x5c\x04\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\xfd\x00\x00\x00\x15\x00\x00\x00\x5d\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xaf\x00\xdd\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x06\x01\x07\x01\x08\x01\x09\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x65\x04\x66\x04\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x67\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xaf\x00\xdd\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x06\x01\x07\x01\x08\x01\x09\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x5c\x04\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\xfd\x00\x00\x00\x15\x00\x00\x00\x5d\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xaf\x00\xdd\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x06\x01\x07\x01\x08\x01\x09\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x01\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xaf\x00\xdd\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x05\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x06\x01\x07\x01\x08\x01\x09\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x69\x01\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x6a\x01\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x6b\x01\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x6c\x01\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x69\x01\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x9e\x01\xb9\x00\x00\x00\x00\x00\x6c\x01\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x69\x01\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x6a\x01\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x6b\x01\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x6c\x01\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x4a\x02\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x2e\x02\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x4d\x02\xb9\x00\x00\x00\x00\x00\x2e\x02\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\xa3\x01\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xc3\x02\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x2e\x02\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xfd\x00\x00\xd9\xfd\xd9\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xfd\x00\x00\x00\x00\x00\x00\xd9\xfd\x00\x00\x00\x00\x00\x00\xd9\xfd\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\xd9\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\xd9\xfd\x00\x00\x00\x00\x00\x00\xd9\xfd\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\x00\x00\x00\x00\xd9\xfd\x00\x00\x00\x00\x00\x00\xd9\xfd\x00\x00\xd9\xfd\x00\x00\xd9\xfd\x00\x00\x00\x00\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\x00\x00\xd9\xfd\x00\x00\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd9\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\x00\x00\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\xd8\xfd\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\xd8\xfd\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\xd8\xfd\x00\x00\xd8\xfd\x00\x00\xd8\xfd\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\x00\x00\xd8\xfd\x00\x00\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xd8\xfd\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\xd5\x00\xd6\x00\xd7\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\xd9\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xda\x00\xdb\x00\xdc\x00\x00\x00\x00\x00\xaf\x00\xdd\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x6d\x01\xba\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x03\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\xa7\x03\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\xad\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xba\x01\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x01\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\xad\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x15\x00\x9d\x03\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\xa7\x03\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\xad\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x15\x00\x9d\x03\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\xea\x03\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb0\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\xa9\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x00\x00\xaa\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xae\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x00\x00\xaa\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x00\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\xa6\x00\x13\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x14\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xab\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xac\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\xa6\x00\x13\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x14\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x93\x03\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\xa6\x00\x13\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x14\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb8\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x00\x00\x6a\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x00\x00\x4f\x00\x13\x00\x00\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\x00\x00\xca\x00\x14\x00\x6d\x00\x6e\x00\xcb\x00\xcc\x00\xcd\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x63\x00\x50\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x01\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\xe9\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x50\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\xe4\x01\x00\x00\x00\x00\x00\x00\x6c\x01\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x50\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x3d\x02\x3e\x02\x3f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x40\x02\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x6b\x01\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x01\x61\x00\x62\x00\x63\x00\x64\x00\x41\x02\x42\x02\x00\x00\x67\x00\x68\x00\x43\x02\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xa1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\xc8\x04\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\xd1\x02\x06\x01\x00\x00\x14\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x50\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\xeb\x01\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x01\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x3d\x01\x3e\x01\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\xa6\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xd1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x74\x02\xa0\x03\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x14\x00\x00\x00\x00\x00\xb2\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xa1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x14\x00\x00\x00\x00\x00\xae\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xd1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x14\x00\x00\x00\x00\x00\xa5\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xa1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x14\x00\x00\x00\x00\x00\xa3\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xd1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x14\x00\x00\x00\x00\x00\x58\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xa1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\x04\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xe9\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\xd7\x04\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x1b\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xa1\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\x00\x00\x14\x00\x00\x00\x00\x00\x0b\x03\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x50\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x0a\x03\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xe9\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x01\x05\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\xc0\x01\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xe9\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\xff\x04\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x70\x02\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x50\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x5d\x02\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x50\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x55\x05\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x22\x03\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x89\xfe\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\xa3\x00\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x01\x00\x00\x9a\x00\x9b\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xe9\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x97\x01\x0f\x00\x10\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x11\x00\x60\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x69\x03\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xe9\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x69\x03\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\xe9\x02\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x01\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x58\x00\x59\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x5c\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x00\x00\x67\x00\x68\x00\x69\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x4f\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x15\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x13\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x14\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x00\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x01\x63\x00\x64\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x27\x02\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x2c\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x3c\x03\x17\x00\x18\x00\x19\x00\x39\x03\x3a\x03\x3b\x03\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x03\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\xb6\x04\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x03\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x02\x18\x02\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x19\x02\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x02\x18\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x02\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x13\x00\x00\x00\x87\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x89\x00\x00\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x2d\x00\x8d\x00\x8e\x00\x8f\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x83\x00\x84\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x01\xc1\x02\x13\x00\x00\x00\xdc\x01\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\xdd\x01\x00\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x00\x00\x8d\x00\x00\x00\x8f\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x04\x00\x00\x00\x00\x15\x00\x00\x00\xac\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xad\x04\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\xab\x04\x00\x00\x00\x00\x15\x00\x00\x00\xac\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xad\x04\xae\x04\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xaf\x04\x00\x00\x00\x00\x2c\x00\x64\x00\x13\x00\x00\x00\x2d\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xae\x04\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x14\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\xac\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x86\x00\x00\x00\x00\x00\x00\x00\x96\x01\x13\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x00\x00\x3b\x05\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\xae\x04\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x14\x00\x2c\x00\x64\x00\x00\x00\x00\x00\x2d\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\xdb\x01\x13\x00\x00\x00\x00\x00\xdc\x01\x00\x00\x88\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x8d\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x2d\x00\x8d\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x89\x01\x13\x00\x00\x00\x00\x00\x8a\x01\x00\x00\x8b\x01\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x64\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x8d\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x63\x00\x64\x00\x00\x00\x00\x00\x00\x00\x67\x00\x5c\x02\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x2b\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x8f\x00\x59\x01\x5a\x01\x2d\x00\x92\x00\x93\x00\x81\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x82\x00\x83\x00\x84\x00\x5b\x01\x5c\x01\x00\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x76\x01\x6b\x01\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x01\x00\x00\x00\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x62\x01\x9e\x01\x64\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x65\x01\x7f\x00\xa4\x00\x00\x00\x00\x00\x66\x01\x13\x00\x67\x01\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x14\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x15\x00\x00\x00\x5b\x01\x5c\x01\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x62\x01\x63\x01\x64\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x65\x01\x7f\x00\xa4\x00\x00\x00\x63\x00\x66\x01\x00\x00\x67\x01\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x01\x99\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x13\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x14\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x23\x01\x00\x00\x9c\x01\x15\x00\x67\x01\x24\x01\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x25\x01\x13\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x86\x00\x00\x00\x24\x00\x00\x00\x76\x01\x13\x00\x88\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x34\x01\x13\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x86\x00\x00\x00\x24\x00\x00\x00\x25\x01\x13\x00\x88\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x76\x01\x13\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x86\x00\x00\x00\x24\x00\x00\x00\x25\x01\x13\x00\x88\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x13\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x2c\x00\x8a\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x02\x18\x02\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\xff\x14\x00\x00\x00\x00\x00\x04\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\xf9\x02\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xbf\x02\x00\x00\x24\x00\x2c\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x51\x00\x52\x00\x53\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xe0\x00\x91\x00\x63\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\x03\xa2\x03\xa3\x03\x00\x00\x00\x00\xf8\x01\x00\x00\x00\x00\xa4\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x01\xa3\x00\x0f\x00\x10\x00\xa0\x01\xa1\x01\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\xa5\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x02\x00\x00\x00\x00\x7d\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x02\x00\x00\x00\x00\x93\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x95\x03\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x59\x01\x5a\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x01\x5f\x01\x00\x00\x60\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x61\x01\x9a\x01\x00\x00\x9b\x01\x11\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xa4\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x03\x98\x03\x99\x03\x9a\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x85\x04\x99\x03\x9a\x03\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x01\x0a\x01\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x00\x00\x00\x9e\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x6b\x02\x00\x00\x00\x00\x6a\x02\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x69\x02\x00\x00\x00\x00\x6a\x02\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x60\x02\x61\x02\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xe0\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\xa7\x03\xa2\x03\xa3\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x57\x03\x61\x02\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x00\xe0\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\xe0\x03\xa2\x03\xa3\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xb5\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\xb6\x01\xb7\x01\xb8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x03\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x83\x04\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xe0\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x89\x04\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\xa4\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xe0\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\xe1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xe0\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x2e\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xe0\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x2d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xe3\x00\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xd2\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xc3\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xc2\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xbc\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x92\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x8c\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x8b\x01\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x5c\x02\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x52\x02\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x51\x02\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x50\x02\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x4f\x02\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xaf\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xae\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xaa\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x9d\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x58\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xf7\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xe8\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xe7\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xdc\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xda\x03\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x8a\x04\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x82\x04\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x68\x04\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xeb\x04\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xbd\x04\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xbc\x04\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\xbb\x04\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x1f\x05\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x48\x05\x91\x00\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x00\x00\x91\x01\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x00\x00\xc4\x02\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x00\x00\x31\x04\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x8f\x00\x00\x00\xd7\x04\x00\x00\x92\x00\x93\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x8f\x00\x00\x00\x73\x00\x74\x00\x92\x00\x55\x02\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x00\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x90\x03\x00\x00\x9a\x00\x9b\x00\x11\x00\x91\x03\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\xa0\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x72\x00\x00\x00\x00\x00\x73\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\x01\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyReduceArr = Happy_Data_Array.array (13, 833) [+	(13 , happyReduce_13),+	(14 , happyReduce_14),+	(15 , happyReduce_15),+	(16 , happyReduce_16),+	(17 , happyReduce_17),+	(18 , happyReduce_18),+	(19 , happyReduce_19),+	(20 , happyReduce_20),+	(21 , happyReduce_21),+	(22 , happyReduce_22),+	(23 , happyReduce_23),+	(24 , happyReduce_24),+	(25 , happyReduce_25),+	(26 , happyReduce_26),+	(27 , happyReduce_27),+	(28 , happyReduce_28),+	(29 , happyReduce_29),+	(30 , happyReduce_30),+	(31 , happyReduce_31),+	(32 , happyReduce_32),+	(33 , happyReduce_33),+	(34 , happyReduce_34),+	(35 , happyReduce_35),+	(36 , happyReduce_36),+	(37 , happyReduce_37),+	(38 , happyReduce_38),+	(39 , happyReduce_39),+	(40 , happyReduce_40),+	(41 , happyReduce_41),+	(42 , happyReduce_42),+	(43 , happyReduce_43),+	(44 , happyReduce_44),+	(45 , happyReduce_45),+	(46 , happyReduce_46),+	(47 , happyReduce_47),+	(48 , happyReduce_48),+	(49 , happyReduce_49),+	(50 , happyReduce_50),+	(51 , happyReduce_51),+	(52 , happyReduce_52),+	(53 , happyReduce_53),+	(54 , happyReduce_54),+	(55 , happyReduce_55),+	(56 , happyReduce_56),+	(57 , happyReduce_57),+	(58 , happyReduce_58),+	(59 , happyReduce_59),+	(60 , happyReduce_60),+	(61 , happyReduce_61),+	(62 , happyReduce_62),+	(63 , happyReduce_63),+	(64 , happyReduce_64),+	(65 , happyReduce_65),+	(66 , happyReduce_66),+	(67 , happyReduce_67),+	(68 , happyReduce_68),+	(69 , happyReduce_69),+	(70 , happyReduce_70),+	(71 , happyReduce_71),+	(72 , happyReduce_72),+	(73 , happyReduce_73),+	(74 , happyReduce_74),+	(75 , happyReduce_75),+	(76 , happyReduce_76),+	(77 , happyReduce_77),+	(78 , happyReduce_78),+	(79 , happyReduce_79),+	(80 , happyReduce_80),+	(81 , happyReduce_81),+	(82 , happyReduce_82),+	(83 , happyReduce_83),+	(84 , happyReduce_84),+	(85 , happyReduce_85),+	(86 , happyReduce_86),+	(87 , happyReduce_87),+	(88 , happyReduce_88),+	(89 , happyReduce_89),+	(90 , happyReduce_90),+	(91 , happyReduce_91),+	(92 , happyReduce_92),+	(93 , happyReduce_93),+	(94 , happyReduce_94),+	(95 , happyReduce_95),+	(96 , happyReduce_96),+	(97 , happyReduce_97),+	(98 , happyReduce_98),+	(99 , happyReduce_99),+	(100 , happyReduce_100),+	(101 , happyReduce_101),+	(102 , happyReduce_102),+	(103 , happyReduce_103),+	(104 , happyReduce_104),+	(105 , happyReduce_105),+	(106 , happyReduce_106),+	(107 , happyReduce_107),+	(108 , happyReduce_108),+	(109 , happyReduce_109),+	(110 , happyReduce_110),+	(111 , happyReduce_111),+	(112 , happyReduce_112),+	(113 , happyReduce_113),+	(114 , happyReduce_114),+	(115 , happyReduce_115),+	(116 , happyReduce_116),+	(117 , happyReduce_117),+	(118 , happyReduce_118),+	(119 , happyReduce_119),+	(120 , happyReduce_120),+	(121 , happyReduce_121),+	(122 , happyReduce_122),+	(123 , happyReduce_123),+	(124 , happyReduce_124),+	(125 , happyReduce_125),+	(126 , happyReduce_126),+	(127 , happyReduce_127),+	(128 , happyReduce_128),+	(129 , happyReduce_129),+	(130 , happyReduce_130),+	(131 , happyReduce_131),+	(132 , happyReduce_132),+	(133 , happyReduce_133),+	(134 , happyReduce_134),+	(135 , happyReduce_135),+	(136 , happyReduce_136),+	(137 , happyReduce_137),+	(138 , happyReduce_138),+	(139 , happyReduce_139),+	(140 , happyReduce_140),+	(141 , happyReduce_141),+	(142 , happyReduce_142),+	(143 , happyReduce_143),+	(144 , happyReduce_144),+	(145 , happyReduce_145),+	(146 , happyReduce_146),+	(147 , happyReduce_147),+	(148 , happyReduce_148),+	(149 , happyReduce_149),+	(150 , happyReduce_150),+	(151 , happyReduce_151),+	(152 , happyReduce_152),+	(153 , happyReduce_153),+	(154 , happyReduce_154),+	(155 , happyReduce_155),+	(156 , happyReduce_156),+	(157 , happyReduce_157),+	(158 , happyReduce_158),+	(159 , happyReduce_159),+	(160 , happyReduce_160),+	(161 , happyReduce_161),+	(162 , happyReduce_162),+	(163 , happyReduce_163),+	(164 , happyReduce_164),+	(165 , happyReduce_165),+	(166 , happyReduce_166),+	(167 , happyReduce_167),+	(168 , happyReduce_168),+	(169 , happyReduce_169),+	(170 , happyReduce_170),+	(171 , happyReduce_171),+	(172 , happyReduce_172),+	(173 , happyReduce_173),+	(174 , happyReduce_174),+	(175 , happyReduce_175),+	(176 , happyReduce_176),+	(177 , happyReduce_177),+	(178 , happyReduce_178),+	(179 , happyReduce_179),+	(180 , happyReduce_180),+	(181 , happyReduce_181),+	(182 , happyReduce_182),+	(183 , happyReduce_183),+	(184 , happyReduce_184),+	(185 , happyReduce_185),+	(186 , happyReduce_186),+	(187 , happyReduce_187),+	(188 , happyReduce_188),+	(189 , happyReduce_189),+	(190 , happyReduce_190),+	(191 , happyReduce_191),+	(192 , happyReduce_192),+	(193 , happyReduce_193),+	(194 , happyReduce_194),+	(195 , happyReduce_195),+	(196 , happyReduce_196),+	(197 , happyReduce_197),+	(198 , happyReduce_198),+	(199 , happyReduce_199),+	(200 , happyReduce_200),+	(201 , happyReduce_201),+	(202 , happyReduce_202),+	(203 , happyReduce_203),+	(204 , happyReduce_204),+	(205 , happyReduce_205),+	(206 , happyReduce_206),+	(207 , happyReduce_207),+	(208 , happyReduce_208),+	(209 , happyReduce_209),+	(210 , happyReduce_210),+	(211 , happyReduce_211),+	(212 , happyReduce_212),+	(213 , happyReduce_213),+	(214 , happyReduce_214),+	(215 , happyReduce_215),+	(216 , happyReduce_216),+	(217 , happyReduce_217),+	(218 , happyReduce_218),+	(219 , happyReduce_219),+	(220 , happyReduce_220),+	(221 , happyReduce_221),+	(222 , happyReduce_222),+	(223 , happyReduce_223),+	(224 , happyReduce_224),+	(225 , happyReduce_225),+	(226 , happyReduce_226),+	(227 , happyReduce_227),+	(228 , happyReduce_228),+	(229 , happyReduce_229),+	(230 , happyReduce_230),+	(231 , happyReduce_231),+	(232 , happyReduce_232),+	(233 , happyReduce_233),+	(234 , happyReduce_234),+	(235 , happyReduce_235),+	(236 , happyReduce_236),+	(237 , happyReduce_237),+	(238 , happyReduce_238),+	(239 , happyReduce_239),+	(240 , happyReduce_240),+	(241 , happyReduce_241),+	(242 , happyReduce_242),+	(243 , happyReduce_243),+	(244 , happyReduce_244),+	(245 , happyReduce_245),+	(246 , happyReduce_246),+	(247 , happyReduce_247),+	(248 , happyReduce_248),+	(249 , happyReduce_249),+	(250 , happyReduce_250),+	(251 , happyReduce_251),+	(252 , happyReduce_252),+	(253 , happyReduce_253),+	(254 , happyReduce_254),+	(255 , happyReduce_255),+	(256 , happyReduce_256),+	(257 , happyReduce_257),+	(258 , happyReduce_258),+	(259 , happyReduce_259),+	(260 , happyReduce_260),+	(261 , happyReduce_261),+	(262 , happyReduce_262),+	(263 , happyReduce_263),+	(264 , happyReduce_264),+	(265 , happyReduce_265),+	(266 , happyReduce_266),+	(267 , happyReduce_267),+	(268 , happyReduce_268),+	(269 , happyReduce_269),+	(270 , happyReduce_270),+	(271 , happyReduce_271),+	(272 , happyReduce_272),+	(273 , happyReduce_273),+	(274 , happyReduce_274),+	(275 , happyReduce_275),+	(276 , happyReduce_276),+	(277 , happyReduce_277),+	(278 , happyReduce_278),+	(279 , happyReduce_279),+	(280 , happyReduce_280),+	(281 , happyReduce_281),+	(282 , happyReduce_282),+	(283 , happyReduce_283),+	(284 , happyReduce_284),+	(285 , happyReduce_285),+	(286 , happyReduce_286),+	(287 , happyReduce_287),+	(288 , happyReduce_288),+	(289 , happyReduce_289),+	(290 , happyReduce_290),+	(291 , happyReduce_291),+	(292 , happyReduce_292),+	(293 , happyReduce_293),+	(294 , happyReduce_294),+	(295 , happyReduce_295),+	(296 , happyReduce_296),+	(297 , happyReduce_297),+	(298 , happyReduce_298),+	(299 , happyReduce_299),+	(300 , happyReduce_300),+	(301 , happyReduce_301),+	(302 , happyReduce_302),+	(303 , happyReduce_303),+	(304 , happyReduce_304),+	(305 , happyReduce_305),+	(306 , happyReduce_306),+	(307 , happyReduce_307),+	(308 , happyReduce_308),+	(309 , happyReduce_309),+	(310 , happyReduce_310),+	(311 , happyReduce_311),+	(312 , happyReduce_312),+	(313 , happyReduce_313),+	(314 , happyReduce_314),+	(315 , happyReduce_315),+	(316 , happyReduce_316),+	(317 , happyReduce_317),+	(318 , happyReduce_318),+	(319 , happyReduce_319),+	(320 , happyReduce_320),+	(321 , happyReduce_321),+	(322 , happyReduce_322),+	(323 , happyReduce_323),+	(324 , happyReduce_324),+	(325 , happyReduce_325),+	(326 , happyReduce_326),+	(327 , happyReduce_327),+	(328 , happyReduce_328),+	(329 , happyReduce_329),+	(330 , happyReduce_330),+	(331 , happyReduce_331),+	(332 , happyReduce_332),+	(333 , happyReduce_333),+	(334 , happyReduce_334),+	(335 , happyReduce_335),+	(336 , happyReduce_336),+	(337 , happyReduce_337),+	(338 , happyReduce_338),+	(339 , happyReduce_339),+	(340 , happyReduce_340),+	(341 , happyReduce_341),+	(342 , happyReduce_342),+	(343 , happyReduce_343),+	(344 , happyReduce_344),+	(345 , happyReduce_345),+	(346 , happyReduce_346),+	(347 , happyReduce_347),+	(348 , happyReduce_348),+	(349 , happyReduce_349),+	(350 , happyReduce_350),+	(351 , happyReduce_351),+	(352 , happyReduce_352),+	(353 , happyReduce_353),+	(354 , happyReduce_354),+	(355 , happyReduce_355),+	(356 , happyReduce_356),+	(357 , happyReduce_357),+	(358 , happyReduce_358),+	(359 , happyReduce_359),+	(360 , happyReduce_360),+	(361 , happyReduce_361),+	(362 , happyReduce_362),+	(363 , happyReduce_363),+	(364 , happyReduce_364),+	(365 , happyReduce_365),+	(366 , happyReduce_366),+	(367 , happyReduce_367),+	(368 , happyReduce_368),+	(369 , happyReduce_369),+	(370 , happyReduce_370),+	(371 , happyReduce_371),+	(372 , happyReduce_372),+	(373 , happyReduce_373),+	(374 , happyReduce_374),+	(375 , happyReduce_375),+	(376 , happyReduce_376),+	(377 , happyReduce_377),+	(378 , happyReduce_378),+	(379 , happyReduce_379),+	(380 , happyReduce_380),+	(381 , happyReduce_381),+	(382 , happyReduce_382),+	(383 , happyReduce_383),+	(384 , happyReduce_384),+	(385 , happyReduce_385),+	(386 , happyReduce_386),+	(387 , happyReduce_387),+	(388 , happyReduce_388),+	(389 , happyReduce_389),+	(390 , happyReduce_390),+	(391 , happyReduce_391),+	(392 , happyReduce_392),+	(393 , happyReduce_393),+	(394 , happyReduce_394),+	(395 , happyReduce_395),+	(396 , happyReduce_396),+	(397 , happyReduce_397),+	(398 , happyReduce_398),+	(399 , happyReduce_399),+	(400 , happyReduce_400),+	(401 , happyReduce_401),+	(402 , happyReduce_402),+	(403 , happyReduce_403),+	(404 , happyReduce_404),+	(405 , happyReduce_405),+	(406 , happyReduce_406),+	(407 , happyReduce_407),+	(408 , happyReduce_408),+	(409 , happyReduce_409),+	(410 , happyReduce_410),+	(411 , happyReduce_411),+	(412 , happyReduce_412),+	(413 , happyReduce_413),+	(414 , happyReduce_414),+	(415 , happyReduce_415),+	(416 , happyReduce_416),+	(417 , happyReduce_417),+	(418 , happyReduce_418),+	(419 , happyReduce_419),+	(420 , happyReduce_420),+	(421 , happyReduce_421),+	(422 , happyReduce_422),+	(423 , happyReduce_423),+	(424 , happyReduce_424),+	(425 , happyReduce_425),+	(426 , happyReduce_426),+	(427 , happyReduce_427),+	(428 , happyReduce_428),+	(429 , happyReduce_429),+	(430 , happyReduce_430),+	(431 , happyReduce_431),+	(432 , happyReduce_432),+	(433 , happyReduce_433),+	(434 , happyReduce_434),+	(435 , happyReduce_435),+	(436 , happyReduce_436),+	(437 , happyReduce_437),+	(438 , happyReduce_438),+	(439 , happyReduce_439),+	(440 , happyReduce_440),+	(441 , happyReduce_441),+	(442 , happyReduce_442),+	(443 , happyReduce_443),+	(444 , happyReduce_444),+	(445 , happyReduce_445),+	(446 , happyReduce_446),+	(447 , happyReduce_447),+	(448 , happyReduce_448),+	(449 , happyReduce_449),+	(450 , happyReduce_450),+	(451 , happyReduce_451),+	(452 , happyReduce_452),+	(453 , happyReduce_453),+	(454 , happyReduce_454),+	(455 , happyReduce_455),+	(456 , happyReduce_456),+	(457 , happyReduce_457),+	(458 , happyReduce_458),+	(459 , happyReduce_459),+	(460 , happyReduce_460),+	(461 , happyReduce_461),+	(462 , happyReduce_462),+	(463 , happyReduce_463),+	(464 , happyReduce_464),+	(465 , happyReduce_465),+	(466 , happyReduce_466),+	(467 , happyReduce_467),+	(468 , happyReduce_468),+	(469 , happyReduce_469),+	(470 , happyReduce_470),+	(471 , happyReduce_471),+	(472 , happyReduce_472),+	(473 , happyReduce_473),+	(474 , happyReduce_474),+	(475 , happyReduce_475),+	(476 , happyReduce_476),+	(477 , happyReduce_477),+	(478 , happyReduce_478),+	(479 , happyReduce_479),+	(480 , happyReduce_480),+	(481 , happyReduce_481),+	(482 , happyReduce_482),+	(483 , happyReduce_483),+	(484 , happyReduce_484),+	(485 , happyReduce_485),+	(486 , happyReduce_486),+	(487 , happyReduce_487),+	(488 , happyReduce_488),+	(489 , happyReduce_489),+	(490 , happyReduce_490),+	(491 , happyReduce_491),+	(492 , happyReduce_492),+	(493 , happyReduce_493),+	(494 , happyReduce_494),+	(495 , happyReduce_495),+	(496 , happyReduce_496),+	(497 , happyReduce_497),+	(498 , happyReduce_498),+	(499 , happyReduce_499),+	(500 , happyReduce_500),+	(501 , happyReduce_501),+	(502 , happyReduce_502),+	(503 , happyReduce_503),+	(504 , happyReduce_504),+	(505 , happyReduce_505),+	(506 , happyReduce_506),+	(507 , happyReduce_507),+	(508 , happyReduce_508),+	(509 , happyReduce_509),+	(510 , happyReduce_510),+	(511 , happyReduce_511),+	(512 , happyReduce_512),+	(513 , happyReduce_513),+	(514 , happyReduce_514),+	(515 , happyReduce_515),+	(516 , happyReduce_516),+	(517 , happyReduce_517),+	(518 , happyReduce_518),+	(519 , happyReduce_519),+	(520 , happyReduce_520),+	(521 , happyReduce_521),+	(522 , happyReduce_522),+	(523 , happyReduce_523),+	(524 , happyReduce_524),+	(525 , happyReduce_525),+	(526 , happyReduce_526),+	(527 , happyReduce_527),+	(528 , happyReduce_528),+	(529 , happyReduce_529),+	(530 , happyReduce_530),+	(531 , happyReduce_531),+	(532 , happyReduce_532),+	(533 , happyReduce_533),+	(534 , happyReduce_534),+	(535 , happyReduce_535),+	(536 , happyReduce_536),+	(537 , happyReduce_537),+	(538 , happyReduce_538),+	(539 , happyReduce_539),+	(540 , happyReduce_540),+	(541 , happyReduce_541),+	(542 , happyReduce_542),+	(543 , happyReduce_543),+	(544 , happyReduce_544),+	(545 , happyReduce_545),+	(546 , happyReduce_546),+	(547 , happyReduce_547),+	(548 , happyReduce_548),+	(549 , happyReduce_549),+	(550 , happyReduce_550),+	(551 , happyReduce_551),+	(552 , happyReduce_552),+	(553 , happyReduce_553),+	(554 , happyReduce_554),+	(555 , happyReduce_555),+	(556 , happyReduce_556),+	(557 , happyReduce_557),+	(558 , happyReduce_558),+	(559 , happyReduce_559),+	(560 , happyReduce_560),+	(561 , happyReduce_561),+	(562 , happyReduce_562),+	(563 , happyReduce_563),+	(564 , happyReduce_564),+	(565 , happyReduce_565),+	(566 , happyReduce_566),+	(567 , happyReduce_567),+	(568 , happyReduce_568),+	(569 , happyReduce_569),+	(570 , happyReduce_570),+	(571 , happyReduce_571),+	(572 , happyReduce_572),+	(573 , happyReduce_573),+	(574 , happyReduce_574),+	(575 , happyReduce_575),+	(576 , happyReduce_576),+	(577 , happyReduce_577),+	(578 , happyReduce_578),+	(579 , happyReduce_579),+	(580 , happyReduce_580),+	(581 , happyReduce_581),+	(582 , happyReduce_582),+	(583 , happyReduce_583),+	(584 , happyReduce_584),+	(585 , happyReduce_585),+	(586 , happyReduce_586),+	(587 , happyReduce_587),+	(588 , happyReduce_588),+	(589 , happyReduce_589),+	(590 , happyReduce_590),+	(591 , happyReduce_591),+	(592 , happyReduce_592),+	(593 , happyReduce_593),+	(594 , happyReduce_594),+	(595 , happyReduce_595),+	(596 , happyReduce_596),+	(597 , happyReduce_597),+	(598 , happyReduce_598),+	(599 , happyReduce_599),+	(600 , happyReduce_600),+	(601 , happyReduce_601),+	(602 , happyReduce_602),+	(603 , happyReduce_603),+	(604 , happyReduce_604),+	(605 , happyReduce_605),+	(606 , happyReduce_606),+	(607 , happyReduce_607),+	(608 , happyReduce_608),+	(609 , happyReduce_609),+	(610 , happyReduce_610),+	(611 , happyReduce_611),+	(612 , happyReduce_612),+	(613 , happyReduce_613),+	(614 , happyReduce_614),+	(615 , happyReduce_615),+	(616 , happyReduce_616),+	(617 , happyReduce_617),+	(618 , happyReduce_618),+	(619 , happyReduce_619),+	(620 , happyReduce_620),+	(621 , happyReduce_621),+	(622 , happyReduce_622),+	(623 , happyReduce_623),+	(624 , happyReduce_624),+	(625 , happyReduce_625),+	(626 , happyReduce_626),+	(627 , happyReduce_627),+	(628 , happyReduce_628),+	(629 , happyReduce_629),+	(630 , happyReduce_630),+	(631 , happyReduce_631),+	(632 , happyReduce_632),+	(633 , happyReduce_633),+	(634 , happyReduce_634),+	(635 , happyReduce_635),+	(636 , happyReduce_636),+	(637 , happyReduce_637),+	(638 , happyReduce_638),+	(639 , happyReduce_639),+	(640 , happyReduce_640),+	(641 , happyReduce_641),+	(642 , happyReduce_642),+	(643 , happyReduce_643),+	(644 , happyReduce_644),+	(645 , happyReduce_645),+	(646 , happyReduce_646),+	(647 , happyReduce_647),+	(648 , happyReduce_648),+	(649 , happyReduce_649),+	(650 , happyReduce_650),+	(651 , happyReduce_651),+	(652 , happyReduce_652),+	(653 , happyReduce_653),+	(654 , happyReduce_654),+	(655 , happyReduce_655),+	(656 , happyReduce_656),+	(657 , happyReduce_657),+	(658 , happyReduce_658),+	(659 , happyReduce_659),+	(660 , happyReduce_660),+	(661 , happyReduce_661),+	(662 , happyReduce_662),+	(663 , happyReduce_663),+	(664 , happyReduce_664),+	(665 , happyReduce_665),+	(666 , happyReduce_666),+	(667 , happyReduce_667),+	(668 , happyReduce_668),+	(669 , happyReduce_669),+	(670 , happyReduce_670),+	(671 , happyReduce_671),+	(672 , happyReduce_672),+	(673 , happyReduce_673),+	(674 , happyReduce_674),+	(675 , happyReduce_675),+	(676 , happyReduce_676),+	(677 , happyReduce_677),+	(678 , happyReduce_678),+	(679 , happyReduce_679),+	(680 , happyReduce_680),+	(681 , happyReduce_681),+	(682 , happyReduce_682),+	(683 , happyReduce_683),+	(684 , happyReduce_684),+	(685 , happyReduce_685),+	(686 , happyReduce_686),+	(687 , happyReduce_687),+	(688 , happyReduce_688),+	(689 , happyReduce_689),+	(690 , happyReduce_690),+	(691 , happyReduce_691),+	(692 , happyReduce_692),+	(693 , happyReduce_693),+	(694 , happyReduce_694),+	(695 , happyReduce_695),+	(696 , happyReduce_696),+	(697 , happyReduce_697),+	(698 , happyReduce_698),+	(699 , happyReduce_699),+	(700 , happyReduce_700),+	(701 , happyReduce_701),+	(702 , happyReduce_702),+	(703 , happyReduce_703),+	(704 , happyReduce_704),+	(705 , happyReduce_705),+	(706 , happyReduce_706),+	(707 , happyReduce_707),+	(708 , happyReduce_708),+	(709 , happyReduce_709),+	(710 , happyReduce_710),+	(711 , happyReduce_711),+	(712 , happyReduce_712),+	(713 , happyReduce_713),+	(714 , happyReduce_714),+	(715 , happyReduce_715),+	(716 , happyReduce_716),+	(717 , happyReduce_717),+	(718 , happyReduce_718),+	(719 , happyReduce_719),+	(720 , happyReduce_720),+	(721 , happyReduce_721),+	(722 , happyReduce_722),+	(723 , happyReduce_723),+	(724 , happyReduce_724),+	(725 , happyReduce_725),+	(726 , happyReduce_726),+	(727 , happyReduce_727),+	(728 , happyReduce_728),+	(729 , happyReduce_729),+	(730 , happyReduce_730),+	(731 , happyReduce_731),+	(732 , happyReduce_732),+	(733 , happyReduce_733),+	(734 , happyReduce_734),+	(735 , happyReduce_735),+	(736 , happyReduce_736),+	(737 , happyReduce_737),+	(738 , happyReduce_738),+	(739 , happyReduce_739),+	(740 , happyReduce_740),+	(741 , happyReduce_741),+	(742 , happyReduce_742),+	(743 , happyReduce_743),+	(744 , happyReduce_744),+	(745 , happyReduce_745),+	(746 , happyReduce_746),+	(747 , happyReduce_747),+	(748 , happyReduce_748),+	(749 , happyReduce_749),+	(750 , happyReduce_750),+	(751 , happyReduce_751),+	(752 , happyReduce_752),+	(753 , happyReduce_753),+	(754 , happyReduce_754),+	(755 , happyReduce_755),+	(756 , happyReduce_756),+	(757 , happyReduce_757),+	(758 , happyReduce_758),+	(759 , happyReduce_759),+	(760 , happyReduce_760),+	(761 , happyReduce_761),+	(762 , happyReduce_762),+	(763 , happyReduce_763),+	(764 , happyReduce_764),+	(765 , happyReduce_765),+	(766 , happyReduce_766),+	(767 , happyReduce_767),+	(768 , happyReduce_768),+	(769 , happyReduce_769),+	(770 , happyReduce_770),+	(771 , happyReduce_771),+	(772 , happyReduce_772),+	(773 , happyReduce_773),+	(774 , happyReduce_774),+	(775 , happyReduce_775),+	(776 , happyReduce_776),+	(777 , happyReduce_777),+	(778 , happyReduce_778),+	(779 , happyReduce_779),+	(780 , happyReduce_780),+	(781 , happyReduce_781),+	(782 , happyReduce_782),+	(783 , happyReduce_783),+	(784 , happyReduce_784),+	(785 , happyReduce_785),+	(786 , happyReduce_786),+	(787 , happyReduce_787),+	(788 , happyReduce_788),+	(789 , happyReduce_789),+	(790 , happyReduce_790),+	(791 , happyReduce_791),+	(792 , happyReduce_792),+	(793 , happyReduce_793),+	(794 , happyReduce_794),+	(795 , happyReduce_795),+	(796 , happyReduce_796),+	(797 , happyReduce_797),+	(798 , happyReduce_798),+	(799 , happyReduce_799),+	(800 , happyReduce_800),+	(801 , happyReduce_801),+	(802 , happyReduce_802),+	(803 , happyReduce_803),+	(804 , happyReduce_804),+	(805 , happyReduce_805),+	(806 , happyReduce_806),+	(807 , happyReduce_807),+	(808 , happyReduce_808),+	(809 , happyReduce_809),+	(810 , happyReduce_810),+	(811 , happyReduce_811),+	(812 , happyReduce_812),+	(813 , happyReduce_813),+	(814 , happyReduce_814),+	(815 , happyReduce_815),+	(816 , happyReduce_816),+	(817 , happyReduce_817),+	(818 , happyReduce_818),+	(819 , happyReduce_819),+	(820 , happyReduce_820),+	(821 , happyReduce_821),+	(822 , happyReduce_822),+	(823 , happyReduce_823),+	(824 , happyReduce_824),+	(825 , happyReduce_825),+	(826 , happyReduce_826),+	(827 , happyReduce_827),+	(828 , happyReduce_828),+	(829 , happyReduce_829),+	(830 , happyReduce_830),+	(831 , happyReduce_831),+	(832 , happyReduce_832),+	(833 , happyReduce_833)+	]++happy_n_terms = 154 :: Int+happy_n_nonterms = 314 :: Int++happyReduce_13 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_13 = happySpecReduce_1  0# happyReduction_13+happyReduction_13 happy_x_1+	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> +	happyIn16+		 (happy_var_1+	)}++happyReduce_14 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_14 = happySpecReduce_1  0# happyReduction_14+happyReduction_14 happy_x_1+	 =  case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> +	happyIn16+		 (happy_var_1+	)}++happyReduce_15 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_15 = happySpecReduce_1  0# happyReduction_15+happyReduction_15 happy_x_1+	 =  case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> +	happyIn16+		 (happy_var_1+	)}++happyReduce_16 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_16 = happySpecReduce_1  0# happyReduction_16+happyReduction_16 happy_x_1+	 =  case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> +	happyIn16+		 (happy_var_1+	)}++happyReduce_17 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_17 = happyMonadReduce 3# 0# happyReduction_17+happyReduction_17 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ getRdrName funTyCon)+                               [mop happy_var_1,mu AnnRarrow happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn16 r))++happyReduce_18 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_18 = happyMonadReduce 3# 0# happyReduction_18+happyReduction_18 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ eqTyCon_RDR)+                               [mop happy_var_1,mj AnnTilde happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn16 r))++happyReduce_19 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_19 = happySpecReduce_3  1# happyReduction_19+happyReduction_19 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> +	happyIn17+		 (fromOL happy_var_2+	)}++happyReduce_20 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_20 = happySpecReduce_3  1# happyReduction_20+happyReduction_20 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_2 of { (HappyWrap18 happy_var_2) -> +	happyIn17+		 (fromOL happy_var_2+	)}++happyReduce_21 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_21 = happySpecReduce_3  2# happyReduction_21+happyReduction_21 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> +	case happyOut19 happy_x_3 of { (HappyWrap19 happy_var_3) -> +	happyIn18+		 (happy_var_1 `appOL` unitOL happy_var_3+	)}}++happyReduce_22 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_22 = happySpecReduce_2  2# happyReduction_22+happyReduction_22 happy_x_2+	happy_x_1+	 =  case happyOut18 happy_x_1 of { (HappyWrap18 happy_var_1) -> +	happyIn18+		 (happy_var_1+	)}++happyReduce_23 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_23 = happySpecReduce_1  2# happyReduction_23+happyReduction_23 happy_x_1+	 =  case happyOut19 happy_x_1 of { (HappyWrap19 happy_var_1) -> +	happyIn18+		 (unitOL happy_var_1+	)}++happyReduce_24 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_24 = happyReduce 4# 3# happyReduction_24+happyReduction_24 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut24 happy_x_2 of { (HappyWrap24 happy_var_2) -> +	case happyOut30 happy_x_4 of { (HappyWrap30 happy_var_4) -> +	happyIn19+		 (sL1 happy_var_1 $ HsUnit { hsunitName = happy_var_2+                              , hsunitBody = fromOL happy_var_4 }+	) `HappyStk` happyRest}}}++happyReduce_25 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_25 = happySpecReduce_1  4# happyReduction_25+happyReduction_25 happy_x_1+	 =  case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> +	happyIn20+		 (sL1 happy_var_1 $ HsUnitId happy_var_1 []+	)}++happyReduce_26 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_26 = happyReduce 4# 4# happyReduction_26+happyReduction_26 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut24 happy_x_1 of { (HappyWrap24 happy_var_1) -> +	case happyOut21 happy_x_3 of { (HappyWrap21 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn20+		 (sLL happy_var_1 happy_var_4 $ HsUnitId happy_var_1 (fromOL happy_var_3)+	) `HappyStk` happyRest}}}++happyReduce_27 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_27 = happySpecReduce_3  5# happyReduction_27+happyReduction_27 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> +	case happyOut22 happy_x_3 of { (HappyWrap22 happy_var_3) -> +	happyIn21+		 (happy_var_1 `appOL` unitOL happy_var_3+	)}}++happyReduce_28 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_28 = happySpecReduce_2  5# happyReduction_28+happyReduction_28 happy_x_2+	happy_x_1+	 =  case happyOut21 happy_x_1 of { (HappyWrap21 happy_var_1) -> +	happyIn21+		 (happy_var_1+	)}++happyReduce_29 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_29 = happySpecReduce_1  5# happyReduction_29+happyReduction_29 happy_x_1+	 =  case happyOut22 happy_x_1 of { (HappyWrap22 happy_var_1) -> +	happyIn21+		 (unitOL happy_var_1+	)}++happyReduce_30 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_30 = happySpecReduce_3  6# happyReduction_30+happyReduction_30 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> +	case happyOut23 happy_x_3 of { (HappyWrap23 happy_var_3) -> +	happyIn22+		 (sLL happy_var_1 happy_var_3 $ (happy_var_1, happy_var_3)+	)}}++happyReduce_31 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_31 = happyReduce 4# 6# happyReduction_31+happyReduction_31 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn22+		 (sLL happy_var_1 happy_var_4 $ (happy_var_1, sLL happy_var_2 happy_var_4 $ HsModuleVar happy_var_3)+	) `HappyStk` happyRest}}}}++happyReduce_32 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_32 = happySpecReduce_3  7# happyReduction_32+happyReduction_32 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut319 happy_x_2 of { (HappyWrap319 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn23+		 (sLL happy_var_1 happy_var_3 $ HsModuleVar happy_var_2+	)}}}++happyReduce_33 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_33 = happySpecReduce_3  7# happyReduction_33+happyReduction_33 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut20 happy_x_1 of { (HappyWrap20 happy_var_1) -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	happyIn23+		 (sLL happy_var_1 happy_var_3 $ HsModuleId happy_var_1 happy_var_3+	)}}++happyReduce_34 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_34 = happySpecReduce_1  8# happyReduction_34+happyReduction_34 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn24+		 (sL1 happy_var_1 $ PackageName (getSTRING happy_var_1)+	)}++happyReduce_35 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_35 = happySpecReduce_1  8# happyReduction_35+happyReduction_35 happy_x_1+	 =  case happyOut26 happy_x_1 of { (HappyWrap26 happy_var_1) -> +	happyIn24+		 (sL1 happy_var_1 $ PackageName (unLoc happy_var_1)+	)}++happyReduce_36 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_36 = happySpecReduce_1  9# happyReduction_36+happyReduction_36 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn25+		 (sL1 happy_var_1 $ getVARID happy_var_1+	)}++happyReduce_37 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_37 = happySpecReduce_1  9# happyReduction_37+happyReduction_37 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn25+		 (sL1 happy_var_1 $ getCONID happy_var_1+	)}++happyReduce_38 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_38 = happySpecReduce_1  9# happyReduction_38+happyReduction_38 happy_x_1+	 =  case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> +	happyIn25+		 (happy_var_1+	)}++happyReduce_39 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_39 = happySpecReduce_1  10# happyReduction_39+happyReduction_39 happy_x_1+	 =  case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> +	happyIn26+		 (happy_var_1+	)}++happyReduce_40 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_40 = happySpecReduce_3  10# happyReduction_40+happyReduction_40 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut25 happy_x_1 of { (HappyWrap25 happy_var_1) -> +	case happyOut26 happy_x_3 of { (HappyWrap26 happy_var_3) -> +	happyIn26+		 (sLL happy_var_1 happy_var_3 $ appendFS (unLoc happy_var_1) (consFS '-' (unLoc happy_var_3))+	)}}++happyReduce_41 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_41 = happySpecReduce_0  11# happyReduction_41+happyReduction_41  =  happyIn27+		 (Nothing+	)++happyReduce_42 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_42 = happySpecReduce_3  11# happyReduction_42+happyReduction_42 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut28 happy_x_2 of { (HappyWrap28 happy_var_2) -> +	happyIn27+		 (Just (fromOL happy_var_2)+	)}++happyReduce_43 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_43 = happySpecReduce_3  12# happyReduction_43+happyReduction_43 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut28 happy_x_1 of { (HappyWrap28 happy_var_1) -> +	case happyOut29 happy_x_3 of { (HappyWrap29 happy_var_3) -> +	happyIn28+		 (happy_var_1 `appOL` unitOL happy_var_3+	)}}++happyReduce_44 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_44 = happySpecReduce_2  12# happyReduction_44+happyReduction_44 happy_x_2+	happy_x_1+	 =  case happyOut28 happy_x_1 of { (HappyWrap28 happy_var_1) -> +	happyIn28+		 (happy_var_1+	)}++happyReduce_45 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_45 = happySpecReduce_1  12# happyReduction_45+happyReduction_45 happy_x_1+	 =  case happyOut29 happy_x_1 of { (HappyWrap29 happy_var_1) -> +	happyIn28+		 (unitOL happy_var_1+	)}++happyReduce_46 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_46 = happySpecReduce_3  13# happyReduction_46+happyReduction_46 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	happyIn29+		 (sLL happy_var_1 happy_var_3 $ Renaming happy_var_1 (Just happy_var_3)+	)}}++happyReduce_47 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_47 = happySpecReduce_1  13# happyReduction_47+happyReduction_47 happy_x_1+	 =  case happyOut319 happy_x_1 of { (HappyWrap319 happy_var_1) -> +	happyIn29+		 (sL1 happy_var_1    $ Renaming happy_var_1 Nothing+	)}++happyReduce_48 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_48 = happySpecReduce_3  14# happyReduction_48+happyReduction_48 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { (HappyWrap31 happy_var_2) -> +	happyIn30+		 (happy_var_2+	)}++happyReduce_49 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_49 = happySpecReduce_3  14# happyReduction_49+happyReduction_49 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_2 of { (HappyWrap31 happy_var_2) -> +	happyIn30+		 (happy_var_2+	)}++happyReduce_50 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_50 = happySpecReduce_3  15# happyReduction_50+happyReduction_50 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_1 of { (HappyWrap31 happy_var_1) -> +	case happyOut32 happy_x_3 of { (HappyWrap32 happy_var_3) -> +	happyIn31+		 (happy_var_1 `appOL` unitOL happy_var_3+	)}}++happyReduce_51 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_51 = happySpecReduce_2  15# happyReduction_51+happyReduction_51 happy_x_2+	happy_x_1+	 =  case happyOut31 happy_x_1 of { (HappyWrap31 happy_var_1) -> +	happyIn31+		 (happy_var_1+	)}++happyReduce_52 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_52 = happySpecReduce_1  15# happyReduction_52+happyReduction_52 happy_x_1+	 =  case happyOut32 happy_x_1 of { (HappyWrap32 happy_var_1) -> +	happyIn31+		 (unitOL happy_var_1+	)}++happyReduce_53 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_53 = happyReduce 8# 16# happyReduction_53+happyReduction_53 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut65 happy_x_3 of { (HappyWrap65 happy_var_3) -> +	case happyOut319 happy_x_4 of { (HappyWrap319 happy_var_4) -> +	case happyOut38 happy_x_5 of { (HappyWrap38 happy_var_5) -> +	case happyOut48 happy_x_6 of { (HappyWrap48 happy_var_6) -> +	case happyOut39 happy_x_8 of { (HappyWrap39 happy_var_8) -> +	happyIn32+		 (sL1 happy_var_2 $ DeclD+                 (case snd happy_var_3 of+                   False -> HsSrcFile+                   True  -> HsBootFile)+                 happy_var_4+                 (Just $ sL1 happy_var_2 (HsModule (Just happy_var_4) happy_var_6 (fst $ snd happy_var_8) (snd $ snd happy_var_8) happy_var_5 happy_var_1))+	) `HappyStk` happyRest}}}}}}}++happyReduce_54 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_54 = happyReduce 7# 16# happyReduction_54+happyReduction_54 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> +	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> +	case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> +	happyIn32+		 (sL1 happy_var_2 $ DeclD+                 HsigFile+                 happy_var_3+                 (Just $ sL1 happy_var_2 (HsModule (Just happy_var_3) happy_var_5 (fst $ snd happy_var_7) (snd $ snd happy_var_7) happy_var_4 happy_var_1))+	) `HappyStk` happyRest}}}}}}++happyReduce_55 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_55 = happyReduce 4# 16# happyReduction_55+happyReduction_55 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut65 happy_x_3 of { (HappyWrap65 happy_var_3) -> +	case happyOut319 happy_x_4 of { (HappyWrap319 happy_var_4) -> +	happyIn32+		 (sL1 happy_var_2 $ DeclD (case snd happy_var_3 of+                   False -> HsSrcFile+                   True  -> HsBootFile) happy_var_4 Nothing+	) `HappyStk` happyRest}}}++happyReduce_56 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_56 = happySpecReduce_3  16# happyReduction_56+happyReduction_56 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	happyIn32+		 (sL1 happy_var_2 $ DeclD HsigFile happy_var_3 Nothing+	)}}++happyReduce_57 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_57 = happySpecReduce_3  16# happyReduction_57+happyReduction_57 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut20 happy_x_2 of { (HappyWrap20 happy_var_2) -> +	case happyOut27 happy_x_3 of { (HappyWrap27 happy_var_3) -> +	happyIn32+		 (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_2+                                              , idModRenaming = happy_var_3+                                              , idSignatureInclude = False })+	)}}}++happyReduce_58 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_58 = happySpecReduce_3  16# happyReduction_58+happyReduction_58 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut20 happy_x_3 of { (HappyWrap20 happy_var_3) -> +	happyIn32+		 (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_3+                                              , idModRenaming = Nothing+                                              , idSignatureInclude = True })+	)}}++happyReduce_59 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_59 = happyMonadReduce 7# 17# happyReduction_59+happyReduction_59 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> +	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> +	( fileSrcSpan >>= \ loc ->+                ams (cL loc (HsModule (Just happy_var_3) happy_var_5 (fst $ snd happy_var_7)+                              (snd $ snd happy_var_7) happy_var_4 happy_var_1)+                    )+                    ([mj AnnSignature happy_var_2, mj AnnWhere happy_var_6] ++ fst happy_var_7))}}}}}}})+	) (\r -> happyReturn (happyIn33 r))++happyReduce_60 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_60 = happyMonadReduce 7# 18# happyReduction_60+happyReduction_60 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> +	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	case happyOut39 happy_x_7 of { (HappyWrap39 happy_var_7) -> +	( fileSrcSpan >>= \ loc ->+                ams (cL loc (HsModule (Just happy_var_3) happy_var_5 (fst $ snd happy_var_7)+                              (snd $ snd happy_var_7) happy_var_4 happy_var_1)+                    )+                    ([mj AnnModule happy_var_2, mj AnnWhere happy_var_6] ++ fst happy_var_7))}}}}}}})+	) (\r -> happyReturn (happyIn34 r))++happyReduce_61 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_61 = happyMonadReduce 1# 18# happyReduction_61+happyReduction_61 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut40 happy_x_1 of { (HappyWrap40 happy_var_1) -> +	( fileSrcSpan >>= \ loc ->+                   ams (cL loc (HsModule Nothing Nothing+                               (fst $ snd happy_var_1) (snd $ snd happy_var_1) Nothing Nothing))+                       (fst happy_var_1))})+	) (\r -> happyReturn (happyIn34 r))++happyReduce_62 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_62 = happySpecReduce_1  19# happyReduction_62+happyReduction_62 happy_x_1+	 =  case happyOut327 happy_x_1 of { (HappyWrap327 happy_var_1) -> +	happyIn35+		 (happy_var_1+	)}++happyReduce_63 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_63 = happySpecReduce_0  19# happyReduction_63+happyReduction_63  =  happyIn35+		 (Nothing+	)++happyReduce_64 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_64 = happyMonadReduce 0# 20# happyReduction_64+happyReduction_64 (happyRest) tk+	 = happyThen ((( pushModuleContext))+	) (\r -> happyReturn (happyIn36 r))++happyReduce_65 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_65 = happyMonadReduce 0# 21# happyReduction_65+happyReduction_65 (happyRest) tk+	 = happyThen ((( pushModuleContext))+	) (\r -> happyReturn (happyIn37 r))++happyReduce_66 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_66 = happyMonadReduce 3# 22# happyReduction_66+happyReduction_66 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut140 happy_x_2 of { (HappyWrap140 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ajs (sLL happy_var_1 happy_var_3 $ DeprecatedTxt (sL1 happy_var_1 (getDEPRECATED_PRAGs happy_var_1)) (snd $ unLoc happy_var_2))+                             (mo happy_var_1:mc happy_var_3: (fst $ unLoc happy_var_2)))}}})+	) (\r -> happyReturn (happyIn38 r))++happyReduce_67 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_67 = happyMonadReduce 3# 22# happyReduction_67+happyReduction_67 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut140 happy_x_2 of { (HappyWrap140 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ajs (sLL happy_var_1 happy_var_3 $ WarningTxt (sL1 happy_var_1 (getWARNING_PRAGs happy_var_1)) (snd $ unLoc happy_var_2))+                                (mo happy_var_1:mc happy_var_3 : (fst $ unLoc happy_var_2)))}}})+	) (\r -> happyReturn (happyIn38 r))++happyReduce_68 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_68 = happySpecReduce_0  22# happyReduction_68+happyReduction_68  =  happyIn38+		 (Nothing+	)++happyReduce_69 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_69 = happySpecReduce_3  23# happyReduction_69+happyReduction_69 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn39+		 ((moc happy_var_1:mcc happy_var_3:(fst happy_var_2)+                                         , snd happy_var_2)+	)}}}++happyReduce_70 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_70 = happySpecReduce_3  23# happyReduction_70+happyReduction_70 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> +	happyIn39+		 ((fst happy_var_2, snd happy_var_2)+	)}++happyReduce_71 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_71 = happySpecReduce_3  24# happyReduction_71+happyReduction_71 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn40+		 ((moc happy_var_1:mcc happy_var_3+                                                   :(fst happy_var_2), snd happy_var_2)+	)}}}++happyReduce_72 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_72 = happySpecReduce_3  24# happyReduction_72+happyReduction_72 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut41 happy_x_2 of { (HappyWrap41 happy_var_2) -> +	happyIn40+		 (([],snd happy_var_2)+	)}++happyReduce_73 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_73 = happySpecReduce_2  25# happyReduction_73+happyReduction_73 happy_x_2+	happy_x_1+	 =  case happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> +	case happyOut42 happy_x_2 of { (HappyWrap42 happy_var_2) -> +	happyIn41+		 ((happy_var_1, happy_var_2)+	)}}++happyReduce_74 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_74 = happySpecReduce_2  26# happyReduction_74+happyReduction_74 happy_x_2+	happy_x_1+	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> +	case happyOut76 happy_x_2 of { (HappyWrap76 happy_var_2) -> +	happyIn42+		 ((reverse happy_var_1, cvTopDecls happy_var_2)+	)}}++happyReduce_75 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_75 = happySpecReduce_2  26# happyReduction_75+happyReduction_75 happy_x_2+	happy_x_1+	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> +	case happyOut75 happy_x_2 of { (HappyWrap75 happy_var_2) -> +	happyIn42+		 ((reverse happy_var_1, cvTopDecls happy_var_2)+	)}}++happyReduce_76 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_76 = happySpecReduce_1  26# happyReduction_76+happyReduction_76 happy_x_1+	 =  case happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> +	happyIn42+		 ((reverse happy_var_1, [])+	)}++happyReduce_77 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_77 = happyMonadReduce 7# 27# happyReduction_77+happyReduction_77 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> +	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	case happyOut44 happy_x_7 of { (HappyWrap44 happy_var_7) -> +	( fileSrcSpan >>= \ loc ->+                   ams (cL loc (HsModule (Just happy_var_3) happy_var_5 happy_var_7 [] happy_var_4 happy_var_1+                          )) [mj AnnModule happy_var_2,mj AnnWhere happy_var_6])}}}}}}})+	) (\r -> happyReturn (happyIn43 r))++happyReduce_78 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_78 = happyMonadReduce 7# 27# happyReduction_78+happyReduction_78 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut35 happy_x_1 of { (HappyWrap35 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut319 happy_x_3 of { (HappyWrap319 happy_var_3) -> +	case happyOut38 happy_x_4 of { (HappyWrap38 happy_var_4) -> +	case happyOut48 happy_x_5 of { (HappyWrap48 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	case happyOut44 happy_x_7 of { (HappyWrap44 happy_var_7) -> +	( fileSrcSpan >>= \ loc ->+                   ams (cL loc (HsModule (Just happy_var_3) happy_var_5 happy_var_7 [] happy_var_4 happy_var_1+                          )) [mj AnnModule happy_var_2,mj AnnWhere happy_var_6])}}}}}}})+	) (\r -> happyReturn (happyIn43 r))++happyReduce_79 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_79 = happyMonadReduce 1# 27# happyReduction_79+happyReduction_79 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut45 happy_x_1 of { (HappyWrap45 happy_var_1) -> +	( fileSrcSpan >>= \ loc ->+                   return (cL loc (HsModule Nothing Nothing happy_var_1 [] Nothing+                          Nothing)))})+	) (\r -> happyReturn (happyIn43 r))++happyReduce_80 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_80 = happySpecReduce_2  28# happyReduction_80+happyReduction_80 happy_x_2+	happy_x_1+	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> +	happyIn44+		 (happy_var_2+	)}++happyReduce_81 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_81 = happySpecReduce_2  28# happyReduction_81+happyReduction_81 happy_x_2+	happy_x_1+	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> +	happyIn44+		 (happy_var_2+	)}++happyReduce_82 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_82 = happySpecReduce_2  29# happyReduction_82+happyReduction_82 happy_x_2+	happy_x_1+	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> +	happyIn45+		 (happy_var_2+	)}++happyReduce_83 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_83 = happySpecReduce_2  29# happyReduction_83+happyReduction_83 happy_x_2+	happy_x_1+	 =  case happyOut46 happy_x_2 of { (HappyWrap46 happy_var_2) -> +	happyIn45+		 (happy_var_2+	)}++happyReduce_84 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_84 = happySpecReduce_2  30# happyReduction_84+happyReduction_84 happy_x_2+	happy_x_1+	 =  case happyOut47 happy_x_2 of { (HappyWrap47 happy_var_2) -> +	happyIn46+		 (happy_var_2+	)}++happyReduce_85 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_85 = happySpecReduce_1  31# happyReduction_85+happyReduction_85 happy_x_1+	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> +	happyIn47+		 (happy_var_1+	)}++happyReduce_86 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_86 = happySpecReduce_1  31# happyReduction_86+happyReduction_86 happy_x_1+	 =  case happyOut62 happy_x_1 of { (HappyWrap62 happy_var_1) -> +	happyIn47+		 (happy_var_1+	)}++happyReduce_87 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_87 = happyMonadReduce 3# 32# happyReduction_87+happyReduction_87 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut49 happy_x_2 of { (HappyWrap49 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( amsL (comb2 happy_var_1 happy_var_3) [mop happy_var_1,mcp happy_var_3] >>+                                       return (Just (sLL happy_var_1 happy_var_3 (fromOL happy_var_2))))}}})+	) (\r -> happyReturn (happyIn48 r))++happyReduce_88 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_88 = happySpecReduce_0  32# happyReduction_88+happyReduction_88  =  happyIn48+		 (Nothing+	)++happyReduce_89 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_89 = happyMonadReduce 3# 33# happyReduction_89+happyReduction_89 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> +	( addAnnotation (oll happy_var_1) AnnComma (gl happy_var_2)+                                         >> return (happy_var_1 `appOL` happy_var_3))}}})+	) (\r -> happyReturn (happyIn49 r))++happyReduce_90 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_90 = happySpecReduce_1  33# happyReduction_90+happyReduction_90 happy_x_1+	 =  case happyOut50 happy_x_1 of { (HappyWrap50 happy_var_1) -> +	happyIn49+		 (happy_var_1+	)}++happyReduce_91 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_91 = happyMonadReduce 5# 34# happyReduction_91+happyReduction_91 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> +	case happyOut53 happy_x_2 of { (HappyWrap53 happy_var_2) -> +	case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut50 happy_x_5 of { (HappyWrap50 happy_var_5) -> +	( (addAnnotation (oll (happy_var_1 `appOL` happy_var_2 `appOL` happy_var_3))+                                            AnnComma (gl happy_var_4) ) >>+                              return (happy_var_1 `appOL` happy_var_2 `appOL` happy_var_3 `appOL` happy_var_5))}}}}})+	) (\r -> happyReturn (happyIn50 r))++happyReduce_92 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_92 = happySpecReduce_3  34# happyReduction_92+happyReduction_92 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> +	case happyOut53 happy_x_2 of { (HappyWrap53 happy_var_2) -> +	case happyOut51 happy_x_3 of { (HappyWrap51 happy_var_3) -> +	happyIn50+		 (happy_var_1 `appOL` happy_var_2 `appOL` happy_var_3+	)}}}++happyReduce_93 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_93 = happySpecReduce_1  34# happyReduction_93+happyReduction_93 happy_x_1+	 =  case happyOut51 happy_x_1 of { (HappyWrap51 happy_var_1) -> +	happyIn50+		 (happy_var_1+	)}++happyReduce_94 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_94 = happySpecReduce_2  35# happyReduction_94+happyReduction_94 happy_x_2+	happy_x_1+	 =  case happyOut52 happy_x_1 of { (HappyWrap52 happy_var_1) -> +	case happyOut51 happy_x_2 of { (HappyWrap51 happy_var_2) -> +	happyIn51+		 (happy_var_1 `appOL` happy_var_2+	)}}++happyReduce_95 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_95 = happySpecReduce_0  35# happyReduction_95+happyReduction_95  =  happyIn51+		 (nilOL+	)++happyReduce_96 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_96 = happySpecReduce_1  36# happyReduction_96+happyReduction_96 happy_x_1+	 =  case happyOut326 happy_x_1 of { (HappyWrap326 happy_var_1) -> +	happyIn52+		 (unitOL (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> IEGroup noExtField n doc))+	)}++happyReduce_97 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_97 = happySpecReduce_1  36# happyReduction_97+happyReduction_97 happy_x_1+	 =  case happyOut325 happy_x_1 of { (HappyWrap325 happy_var_1) -> +	happyIn52+		 (unitOL (sL1 happy_var_1 (IEDocNamed noExtField ((fst . unLoc) happy_var_1)))+	)}++happyReduce_98 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_98 = happySpecReduce_1  36# happyReduction_98+happyReduction_98 happy_x_1+	 =  case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> +	happyIn52+		 (unitOL (sL1 happy_var_1 (IEDoc noExtField (unLoc happy_var_1)))+	)}++happyReduce_99 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_99 = happyMonadReduce 2# 37# happyReduction_99+happyReduction_99 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut58 happy_x_1 of { (HappyWrap58 happy_var_1) -> +	case happyOut54 happy_x_2 of { (HappyWrap54 happy_var_2) -> +	( mkModuleImpExp happy_var_1 (snd $ unLoc happy_var_2)+                                          >>= \ie -> amsu (sLL happy_var_1 happy_var_2 ie) (fst $ unLoc happy_var_2))}})+	) (\r -> happyReturn (happyIn53 r))++happyReduce_100 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_100 = happyMonadReduce 2# 37# happyReduction_100+happyReduction_100 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut319 happy_x_2 of { (HappyWrap319 happy_var_2) -> +	( amsu (sLL happy_var_1 happy_var_2 (IEModuleContents noExtField happy_var_2))+                                             [mj AnnModule happy_var_1])}})+	) (\r -> happyReturn (happyIn53 r))++happyReduce_101 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_101 = happyMonadReduce 2# 37# happyReduction_101+happyReduction_101 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut274 happy_x_2 of { (HappyWrap274 happy_var_2) -> +	( amsu (sLL happy_var_1 happy_var_2 (IEVar noExtField (sLL happy_var_1 happy_var_2 (IEPattern happy_var_2))))+                                             [mj AnnPattern happy_var_1])}})+	) (\r -> happyReturn (happyIn53 r))++happyReduce_102 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_102 = happySpecReduce_0  38# happyReduction_102+happyReduction_102  =  happyIn54+		 (sL0 ([],ImpExpAbs)+	)++happyReduce_103 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_103 = happyMonadReduce 3# 38# happyReduction_103+happyReduction_103 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut55 happy_x_2 of { (HappyWrap55 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( mkImpExpSubSpec (reverse (snd happy_var_2))+                                      >>= \(as,ie) -> return $ sLL happy_var_1 happy_var_3+                                            (as ++ [mop happy_var_1,mcp happy_var_3] ++ fst happy_var_2, ie))}}})+	) (\r -> happyReturn (happyIn54 r))++happyReduce_104 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_104 = happySpecReduce_0  39# happyReduction_104+happyReduction_104  =  happyIn55+		 (([],[])+	)++happyReduce_105 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_105 = happySpecReduce_1  39# happyReduction_105+happyReduction_105 happy_x_1+	 =  case happyOut56 happy_x_1 of { (HappyWrap56 happy_var_1) -> +	happyIn55+		 (happy_var_1+	)}++happyReduce_106 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_106 = happyMonadReduce 3# 40# happyReduction_106+happyReduction_106 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut56 happy_x_1 of { (HappyWrap56 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut57 happy_x_3 of { (HappyWrap57 happy_var_3) -> +	( case (head (snd happy_var_1)) of+                                                    l@(dL->L _ ImpExpQcWildcard) ->+                                                       return ([mj AnnComma happy_var_2, mj AnnDotdot l]+                                                               ,(snd (unLoc happy_var_3)  : snd happy_var_1))+                                                    l -> (ams (head (snd happy_var_1)) [mj AnnComma happy_var_2] >>+                                                          return (fst happy_var_1 ++ fst (unLoc happy_var_3),+                                                                  snd (unLoc happy_var_3) : snd happy_var_1)))}}})+	) (\r -> happyReturn (happyIn56 r))++happyReduce_107 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_107 = happySpecReduce_1  40# happyReduction_107+happyReduction_107 happy_x_1+	 =  case happyOut57 happy_x_1 of { (HappyWrap57 happy_var_1) -> +	happyIn56+		 ((fst (unLoc happy_var_1),[snd (unLoc happy_var_1)])+	)}++happyReduce_108 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_108 = happySpecReduce_1  41# happyReduction_108+happyReduction_108 happy_x_1+	 =  case happyOut58 happy_x_1 of { (HappyWrap58 happy_var_1) -> +	happyIn57+		 (sL1 happy_var_1 ([],happy_var_1)+	)}++happyReduce_109 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_109 = happySpecReduce_1  41# happyReduction_109+happyReduction_109 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn57+		 (sL1 happy_var_1 ([mj AnnDotdot happy_var_1], sL1 happy_var_1 ImpExpQcWildcard)+	)}++happyReduce_110 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_110 = happySpecReduce_1  42# happyReduction_110+happyReduction_110 happy_x_1+	 =  case happyOut59 happy_x_1 of { (HappyWrap59 happy_var_1) -> +	happyIn58+		 (sL1 happy_var_1 (ImpExpQcName happy_var_1)+	)}++happyReduce_111 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_111 = happyMonadReduce 2# 42# happyReduction_111+happyReduction_111 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut284 happy_x_2 of { (HappyWrap284 happy_var_2) -> +	( do { n <- mkTypeImpExp happy_var_2+                                          ; ams (sLL happy_var_1 happy_var_2 (ImpExpQcType n))+                                                [mj AnnType happy_var_1] })}})+	) (\r -> happyReturn (happyIn58 r))++happyReduce_112 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_112 = happySpecReduce_1  43# happyReduction_112+happyReduction_112 happy_x_1+	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> +	happyIn59+		 (happy_var_1+	)}++happyReduce_113 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_113 = happySpecReduce_1  43# happyReduction_113+happyReduction_113 happy_x_1+	 =  case happyOut285 happy_x_1 of { (HappyWrap285 happy_var_1) -> +	happyIn59+		 (happy_var_1+	)}++happyReduce_114 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_114 = happySpecReduce_2  44# happyReduction_114+happyReduction_114 happy_x_2+	happy_x_1+	 =  case happyOut60 happy_x_1 of { (HappyWrap60 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn60+		 (mj AnnSemi happy_var_2 : happy_var_1+	)}}++happyReduce_115 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_115 = happySpecReduce_1  44# happyReduction_115+happyReduction_115 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn60+		 ([mj AnnSemi happy_var_1]+	)}++happyReduce_116 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_116 = happySpecReduce_2  45# happyReduction_116+happyReduction_116 happy_x_2+	happy_x_1+	 =  case happyOut61 happy_x_1 of { (HappyWrap61 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn61+		 (mj AnnSemi happy_var_2 : happy_var_1+	)}}++happyReduce_117 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_117 = happySpecReduce_0  45# happyReduction_117+happyReduction_117  =  happyIn61+		 ([]+	)++happyReduce_118 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_118 = happySpecReduce_2  46# happyReduction_118+happyReduction_118 happy_x_2+	happy_x_1+	 =  case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> +	case happyOut64 happy_x_2 of { (HappyWrap64 happy_var_2) -> +	happyIn62+		 (happy_var_2 : happy_var_1+	)}}++happyReduce_119 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_119 = happyMonadReduce 3# 47# happyReduction_119+happyReduction_119 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut63 happy_x_1 of { (HappyWrap63 happy_var_1) -> +	case happyOut64 happy_x_2 of { (HappyWrap64 happy_var_2) -> +	case happyOut60 happy_x_3 of { (HappyWrap60 happy_var_3) -> +	( ams happy_var_2 happy_var_3 >> return (happy_var_2 : happy_var_1))}}})+	) (\r -> happyReturn (happyIn63 r))++happyReduce_120 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_120 = happySpecReduce_0  47# happyReduction_120+happyReduction_120  =  happyIn63+		 ([]+	)++happyReduce_121 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_121 = happyMonadReduce 9# 48# happyReduction_121+happyReduction_121 (happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut65 happy_x_2 of { (HappyWrap65 happy_var_2) -> +	case happyOut66 happy_x_3 of { (HappyWrap66 happy_var_3) -> +	case happyOut68 happy_x_4 of { (HappyWrap68 happy_var_4) -> +	case happyOut67 happy_x_5 of { (HappyWrap67 happy_var_5) -> +	case happyOut319 happy_x_6 of { (HappyWrap319 happy_var_6) -> +	case happyOut68 happy_x_7 of { (HappyWrap68 happy_var_7) -> +	case happyOut69 happy_x_8 of { (HappyWrap69 happy_var_8) -> +	case happyOut70 happy_x_9 of { (HappyWrap70 happy_var_9) -> +	( do {+                  ; checkImportDecl happy_var_4 happy_var_7+                  ; ams (cL (comb4 happy_var_1 happy_var_6 (snd happy_var_8) happy_var_9) $+                      ImportDecl { ideclExt = noExtField+                                  , ideclSourceSrc = snd $ fst happy_var_2+                                  , ideclName = happy_var_6, ideclPkgQual = snd happy_var_5+                                  , ideclSource = snd happy_var_2, ideclSafe = snd happy_var_3+                                  , ideclQualified = importDeclQualifiedStyle happy_var_4 happy_var_7+                                  , ideclImplicit = False+                                  , ideclAs = unLoc (snd happy_var_8)+                                  , ideclHiding = unLoc happy_var_9 })+                         (mj AnnImport happy_var_1 : fst (fst happy_var_2) ++ fst happy_var_3 ++ fmap (mj AnnQualified) (maybeToList happy_var_4)+                                          ++ fst happy_var_5 ++ fmap (mj AnnQualified) (maybeToList happy_var_7) ++ fst happy_var_8)+                  })}}}}}}}}})+	) (\r -> happyReturn (happyIn64 r))++happyReduce_122 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_122 = happySpecReduce_2  49# happyReduction_122+happyReduction_122 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn65+		 ((([mo happy_var_1,mc happy_var_2],getSOURCE_PRAGs happy_var_1)+                                      , True)+	)}}++happyReduce_123 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_123 = happySpecReduce_0  49# happyReduction_123+happyReduction_123  =  happyIn65+		 ((([],NoSourceText),False)+	)++happyReduce_124 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_124 = happySpecReduce_1  50# happyReduction_124+happyReduction_124 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn66+		 (([mj AnnSafe happy_var_1],True)+	)}++happyReduce_125 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_125 = happySpecReduce_0  50# happyReduction_125+happyReduction_125  =  happyIn66+		 (([],False)+	)++happyReduce_126 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_126 = happyMonadReduce 1# 51# happyReduction_126+happyReduction_126 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( do { let { pkgFS = getSTRING happy_var_1 }+                        ; unless (looksLikePackageName (unpackFS pkgFS)) $+                             addError (getLoc happy_var_1) $ vcat [+                             text "Parse error" <> colon <+> quotes (ppr pkgFS),+                             text "Version number or non-alphanumeric" <+>+                             text "character in package name"]+                        ; return ([mj AnnPackageName happy_var_1], Just (StringLiteral (getSTRINGs happy_var_1) pkgFS)) })})+	) (\r -> happyReturn (happyIn67 r))++happyReduce_127 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_127 = happySpecReduce_0  51# happyReduction_127+happyReduction_127  =  happyIn67+		 (([],Nothing)+	)++happyReduce_128 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_128 = happySpecReduce_1  52# happyReduction_128+happyReduction_128 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn68+		 (Just happy_var_1+	)}++happyReduce_129 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_129 = happySpecReduce_0  52# happyReduction_129+happyReduction_129  =  happyIn68+		 (Nothing+	)++happyReduce_130 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_130 = happySpecReduce_2  53# happyReduction_130+happyReduction_130 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut319 happy_x_2 of { (HappyWrap319 happy_var_2) -> +	happyIn69+		 (([mj AnnAs happy_var_1]+                                                 ,sLL happy_var_1 happy_var_2 (Just happy_var_2))+	)}}++happyReduce_131 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_131 = happySpecReduce_0  53# happyReduction_131+happyReduction_131  =  happyIn69+		 (([],noLoc Nothing)+	)++happyReduce_132 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_132 = happyMonadReduce 1# 54# happyReduction_132+happyReduction_132 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut71 happy_x_1 of { (HappyWrap71 happy_var_1) -> +	( let (b, ie) = unLoc happy_var_1 in+                                       checkImportSpec ie+                                        >>= \checkedIe ->+                                          return (cL (gl happy_var_1) (Just (b, checkedIe))))})+	) (\r -> happyReturn (happyIn70 r))++happyReduce_133 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_133 = happySpecReduce_0  54# happyReduction_133+happyReduction_133  =  happyIn70+		 (noLoc Nothing+	)++happyReduce_134 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_134 = happyMonadReduce 3# 55# happyReduction_134+happyReduction_134 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut49 happy_x_2 of { (HappyWrap49 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (False,+                                                      sLL happy_var_1 happy_var_3 $ fromOL happy_var_2))+                                                   [mop happy_var_1,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn71 r))++happyReduce_135 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_135 = happyMonadReduce 4# 55# happyReduction_135+happyReduction_135 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut49 happy_x_3 of { (HappyWrap49 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( ams (sLL happy_var_1 happy_var_4 (True,+                                                      sLL happy_var_1 happy_var_4 $ fromOL happy_var_3))+                                               [mj AnnHiding happy_var_1,mop happy_var_2,mcp happy_var_4])}}}})+	) (\r -> happyReturn (happyIn71 r))++happyReduce_136 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_136 = happySpecReduce_0  56# happyReduction_136+happyReduction_136  =  happyIn72+		 (noLoc (NoSourceText,9)+	)++happyReduce_137 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_137 = happySpecReduce_1  56# happyReduction_137+happyReduction_137 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn72+		 (sL1 happy_var_1 (getINTEGERs happy_var_1,fromInteger (il_value (getINTEGER happy_var_1)))+	)}++happyReduce_138 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_138 = happySpecReduce_1  57# happyReduction_138+happyReduction_138 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn73+		 (sL1 happy_var_1 InfixN+	)}++happyReduce_139 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_139 = happySpecReduce_1  57# happyReduction_139+happyReduction_139 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn73+		 (sL1 happy_var_1 InfixL+	)}++happyReduce_140 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_140 = happySpecReduce_1  57# happyReduction_140+happyReduction_140 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn73+		 (sL1 happy_var_1 InfixR+	)}++happyReduce_141 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_141 = happyMonadReduce 3# 58# happyReduction_141+happyReduction_141 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut74 happy_x_1 of { (HappyWrap74 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut292 happy_x_3 of { (HappyWrap292 happy_var_3) -> +	( addAnnotation (oll $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>+                              return (sLL happy_var_1 happy_var_3 ((unLoc happy_var_1) `appOL` unitOL happy_var_3)))}}})+	) (\r -> happyReturn (happyIn74 r))++happyReduce_142 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_142 = happySpecReduce_1  58# happyReduction_142+happyReduction_142 happy_x_1+	 =  case happyOut292 happy_x_1 of { (HappyWrap292 happy_var_1) -> +	happyIn74+		 (sL1 happy_var_1 (unitOL happy_var_1)+	)}++happyReduce_143 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_143 = happySpecReduce_2  59# happyReduction_143+happyReduction_143 happy_x_2+	happy_x_1+	 =  case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> +	case happyOut77 happy_x_2 of { (HappyWrap77 happy_var_2) -> +	happyIn75+		 (happy_var_1 `snocOL` happy_var_2+	)}}++happyReduce_144 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_144 = happyMonadReduce 3# 60# happyReduction_144+happyReduction_144 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> +	case happyOut77 happy_x_2 of { (HappyWrap77 happy_var_2) -> +	case happyOut60 happy_x_3 of { (HappyWrap60 happy_var_3) -> +	( ams happy_var_2 happy_var_3 >> return (happy_var_1 `snocOL` happy_var_2))}}})+	) (\r -> happyReturn (happyIn76 r))++happyReduce_145 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_145 = happySpecReduce_0  60# happyReduction_145+happyReduction_145  =  happyIn76+		 (nilOL+	)++happyReduce_146 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_146 = happySpecReduce_1  61# happyReduction_146+happyReduction_146 happy_x_1+	 =  case happyOut78 happy_x_1 of { (HappyWrap78 happy_var_1) -> +	happyIn77+		 (sL1 happy_var_1 (TyClD noExtField (unLoc happy_var_1))+	)}++happyReduce_147 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_147 = happySpecReduce_1  61# happyReduction_147+happyReduction_147 happy_x_1+	 =  case happyOut79 happy_x_1 of { (HappyWrap79 happy_var_1) -> +	happyIn77+		 (sL1 happy_var_1 (TyClD noExtField (unLoc happy_var_1))+	)}++happyReduce_148 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_148 = happySpecReduce_1  61# happyReduction_148+happyReduction_148 happy_x_1+	 =  case happyOut80 happy_x_1 of { (HappyWrap80 happy_var_1) -> +	happyIn77+		 (sL1 happy_var_1 (KindSigD noExtField (unLoc happy_var_1))+	)}++happyReduce_149 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_149 = happySpecReduce_1  61# happyReduction_149+happyReduction_149 happy_x_1+	 =  case happyOut82 happy_x_1 of { (HappyWrap82 happy_var_1) -> +	happyIn77+		 (sL1 happy_var_1 (InstD noExtField (unLoc happy_var_1))+	)}++happyReduce_150 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_150 = happySpecReduce_1  61# happyReduction_150+happyReduction_150 happy_x_1+	 =  case happyOut106 happy_x_1 of { (HappyWrap106 happy_var_1) -> +	happyIn77+		 (sLL happy_var_1 happy_var_1 (DerivD noExtField (unLoc happy_var_1))+	)}++happyReduce_151 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_151 = happySpecReduce_1  61# happyReduction_151+happyReduction_151 happy_x_1+	 =  case happyOut107 happy_x_1 of { (HappyWrap107 happy_var_1) -> +	happyIn77+		 (sL1 happy_var_1 (RoleAnnotD noExtField (unLoc happy_var_1))+	)}++happyReduce_152 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_152 = happyMonadReduce 4# 61# happyReduction_152+happyReduction_152 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut172 happy_x_3 of { (HappyWrap172 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( ams (sLL happy_var_1 happy_var_4 (DefD noExtField (DefaultDecl noExtField happy_var_3)))+                                                         [mj AnnDefault happy_var_1+                                                         ,mop happy_var_2,mcp happy_var_4])}}}})+	) (\r -> happyReturn (happyIn77 r))++happyReduce_153 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_153 = happyMonadReduce 2# 61# happyReduction_153+happyReduction_153 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut143 happy_x_2 of { (HappyWrap143 happy_var_2) -> +	( ams (sLL happy_var_1 happy_var_2 (snd $ unLoc happy_var_2))+                                           (mj AnnForeign happy_var_1:(fst $ unLoc happy_var_2)))}})+	) (\r -> happyReturn (happyIn77 r))++happyReduce_154 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_154 = happyMonadReduce 3# 61# happyReduction_154+happyReduction_154 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut138 happy_x_2 of { (HappyWrap138 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ WarningD noExtField (Warnings noExtField (getDEPRECATED_PRAGs happy_var_1) (fromOL happy_var_2)))+                                                       [mo happy_var_1,mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn77 r))++happyReduce_155 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_155 = happyMonadReduce 3# 61# happyReduction_155+happyReduction_155 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut136 happy_x_2 of { (HappyWrap136 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ WarningD noExtField (Warnings noExtField (getWARNING_PRAGs happy_var_1) (fromOL happy_var_2)))+                                                       [mo happy_var_1,mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn77 r))++happyReduce_156 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_156 = happyMonadReduce 3# 61# happyReduction_156+happyReduction_156 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut129 happy_x_2 of { (HappyWrap129 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ RuleD noExtField (HsRules noExtField (getRULES_PRAGs happy_var_1) (fromOL happy_var_2)))+                                                       [mo happy_var_1,mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn77 r))++happyReduce_157 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_157 = happySpecReduce_1  61# happyReduction_157+happyReduction_157 happy_x_1+	 =  case happyOut142 happy_x_1 of { (HappyWrap142 happy_var_1) -> +	happyIn77+		 (happy_var_1+	)}++happyReduce_158 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_158 = happySpecReduce_1  61# happyReduction_158+happyReduction_158 happy_x_1+	 =  case happyOut200 happy_x_1 of { (HappyWrap200 happy_var_1) -> +	happyIn77+		 (happy_var_1+	)}++happyReduce_159 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_159 = happyMonadReduce 1# 61# happyReduction_159+happyReduction_159 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut211 happy_x_1 of { (HappyWrap211 happy_var_1) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                                   return $ sLL happy_var_1 happy_var_1 $ mkSpliceDecl happy_var_1)})+	) (\r -> happyReturn (happyIn77 r))++happyReduce_160 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_160 = happyMonadReduce 4# 62# happyReduction_160+happyReduction_160 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut103 happy_x_2 of { (HappyWrap103 happy_var_2) -> +	case happyOut177 happy_x_3 of { (HappyWrap177 happy_var_3) -> +	case happyOut120 happy_x_4 of { (HappyWrap120 happy_var_4) -> +	( amms (mkClassDecl (comb4 happy_var_1 happy_var_2 happy_var_3 happy_var_4) happy_var_2 happy_var_3 (snd $ unLoc happy_var_4))+                        (mj AnnClass happy_var_1:(fst $ unLoc happy_var_3)++(fst $ unLoc happy_var_4)))}}}})+	) (\r -> happyReturn (happyIn78 r))++happyReduce_161 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_161 = happyMonadReduce 4# 63# happyReduction_161+happyReduction_161 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut161 happy_x_2 of { (HappyWrap161 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut156 happy_x_4 of { (HappyWrap156 happy_var_4) -> +	( amms (mkTySynonym (comb2 happy_var_1 happy_var_4) happy_var_2 happy_var_4)+                        [mj AnnType happy_var_1,mj AnnEqual happy_var_3])}}}})+	) (\r -> happyReturn (happyIn79 r))++happyReduce_162 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_162 = happyMonadReduce 6# 63# happyReduction_162+happyReduction_162 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	case happyOut101 happy_x_4 of { (HappyWrap101 happy_var_4) -> +	case happyOut87 happy_x_5 of { (HappyWrap87 happy_var_5) -> +	case happyOut90 happy_x_6 of { (HappyWrap90 happy_var_6) -> +	( amms (mkFamDecl (comb4 happy_var_1 happy_var_3 happy_var_4 happy_var_5) (snd $ unLoc happy_var_6) happy_var_3+                                   (snd $ unLoc happy_var_4) (snd $ unLoc happy_var_5))+                        (mj AnnType happy_var_1:mj AnnFamily happy_var_2:(fst $ unLoc happy_var_4)+                           ++ (fst $ unLoc happy_var_5) ++ (fst $ unLoc happy_var_6)))}}}}}})+	) (\r -> happyReturn (happyIn79 r))++happyReduce_163 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_163 = happyMonadReduce 5# 63# happyReduction_163+happyReduction_163 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> +	case happyOut105 happy_x_2 of { (HappyWrap105 happy_var_2) -> +	case happyOut103 happy_x_3 of { (HappyWrap103 happy_var_3) -> +	case happyOut186 happy_x_4 of { (HappyWrap186 happy_var_4) -> +	case happyOut194 happy_x_5 of { (HappyWrap194 happy_var_5) -> +	( amms (mkTyData (comb4 happy_var_1 happy_var_3 happy_var_4 happy_var_5) (snd $ unLoc happy_var_1) happy_var_2 happy_var_3+                           Nothing (reverse (snd $ unLoc happy_var_4))+                                   (fmap reverse happy_var_5))+                                   -- We need the location on tycl_hdr in case+                                   -- constrs and deriving are both empty+                        ((fst $ unLoc happy_var_1):(fst $ unLoc happy_var_4)))}}}}})+	) (\r -> happyReturn (happyIn79 r))++happyReduce_164 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_164 = happyMonadReduce 6# 63# happyReduction_164+happyReduction_164 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> +	case happyOut105 happy_x_2 of { (HappyWrap105 happy_var_2) -> +	case happyOut103 happy_x_3 of { (HappyWrap103 happy_var_3) -> +	case happyOut99 happy_x_4 of { (HappyWrap99 happy_var_4) -> +	case happyOut182 happy_x_5 of { (HappyWrap182 happy_var_5) -> +	case happyOut194 happy_x_6 of { (HappyWrap194 happy_var_6) -> +	( amms (mkTyData (comb4 happy_var_1 happy_var_3 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_2 happy_var_3+                            (snd $ unLoc happy_var_4) (snd $ unLoc happy_var_5)+                            (fmap reverse happy_var_6) )+                                   -- We need the location on tycl_hdr in case+                                   -- constrs and deriving are both empty+                    ((fst $ unLoc happy_var_1):(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})+	) (\r -> happyReturn (happyIn79 r))++happyReduce_165 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_165 = happyMonadReduce 4# 63# happyReduction_165+happyReduction_165 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	case happyOut100 happy_x_4 of { (HappyWrap100 happy_var_4) -> +	( amms (mkFamDecl (comb3 happy_var_1 happy_var_2 happy_var_4) DataFamily happy_var_3+                                   (snd $ unLoc happy_var_4) Nothing)+                        (mj AnnData happy_var_1:mj AnnFamily happy_var_2:(fst $ unLoc happy_var_4)))}}}})+	) (\r -> happyReturn (happyIn79 r))++happyReduce_166 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_166 = happyMonadReduce 4# 64# happyReduction_166+happyReduction_166 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut81 happy_x_2 of { (HappyWrap81 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut156 happy_x_4 of { (HappyWrap156 happy_var_4) -> +	( amms (mkStandaloneKindSig (comb2 happy_var_1 happy_var_4) happy_var_2 happy_var_4)+              [mj AnnType happy_var_1,mu AnnDcolon happy_var_3])}}}})+	) (\r -> happyReturn (happyIn80 r))++happyReduce_167 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_167 = happyMonadReduce 3# 65# happyReduction_167+happyReduction_167 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut81 happy_x_1 of { (HappyWrap81 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut284 happy_x_3 of { (HappyWrap284 happy_var_3) -> +	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>+         return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})+	) (\r -> happyReturn (happyIn81 r))++happyReduce_168 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_168 = happySpecReduce_1  65# happyReduction_168+happyReduction_168 happy_x_1+	 =  case happyOut284 happy_x_1 of { (HappyWrap284 happy_var_1) -> +	happyIn81+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_169 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_169 = happyMonadReduce 4# 66# happyReduction_169+happyReduction_169 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut83 happy_x_2 of { (HappyWrap83 happy_var_2) -> +	case happyOut170 happy_x_3 of { (HappyWrap170 happy_var_3) -> +	case happyOut124 happy_x_4 of { (HappyWrap124 happy_var_4) -> +	( do { (binds, sigs, _, ats, adts, _) <- cvBindsAndSigs (snd $ unLoc happy_var_4)+             ; let cid = ClsInstDecl { cid_ext = noExtField+                                     , cid_poly_ty = happy_var_3, cid_binds = binds+                                     , cid_sigs = mkClassOpSigs sigs+                                     , cid_tyfam_insts = ats+                                     , cid_overlap_mode = happy_var_2+                                     , cid_datafam_insts = adts }+             ; ams (cL (comb3 happy_var_1 (hsSigType happy_var_3) happy_var_4) (ClsInstD { cid_d_ext = noExtField, cid_inst = cid }))+                   (mj AnnInstance happy_var_1 : (fst $ unLoc happy_var_4)) })}}}})+	) (\r -> happyReturn (happyIn82 r))++happyReduce_170 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_170 = happyMonadReduce 3# 66# happyReduction_170+happyReduction_170 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut93 happy_x_3 of { (HappyWrap93 happy_var_3) -> +	( ams happy_var_3 (fst $ unLoc happy_var_3)+                >> amms (mkTyFamInst (comb2 happy_var_1 happy_var_3) (snd $ unLoc happy_var_3))+                    (mj AnnType happy_var_1:mj AnnInstance happy_var_2:(fst $ unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn82 r))++happyReduce_171 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_171 = happyMonadReduce 6# 66# happyReduction_171+happyReduction_171 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut105 happy_x_3 of { (HappyWrap105 happy_var_3) -> +	case happyOut104 happy_x_4 of { (HappyWrap104 happy_var_4) -> +	case happyOut186 happy_x_5 of { (HappyWrap186 happy_var_5) -> +	case happyOut194 happy_x_6 of { (HappyWrap194 happy_var_6) -> +	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (snd $ unLoc happy_var_4)+                                      Nothing (reverse (snd  $ unLoc happy_var_5))+                                              (fmap reverse happy_var_6))+                    ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2:(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})+	) (\r -> happyReturn (happyIn82 r))++happyReduce_172 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_172 = happyMonadReduce 7# 66# happyReduction_172+happyReduction_172 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut105 happy_x_3 of { (HappyWrap105 happy_var_3) -> +	case happyOut104 happy_x_4 of { (HappyWrap104 happy_var_4) -> +	case happyOut99 happy_x_5 of { (HappyWrap99 happy_var_5) -> +	case happyOut182 happy_x_6 of { (HappyWrap182 happy_var_6) -> +	case happyOut194 happy_x_7 of { (HappyWrap194 happy_var_7) -> +	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3 (snd $ unLoc happy_var_4)+                                   (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)+                                   (fmap reverse happy_var_7))+                    ((fst $ unLoc happy_var_1):mj AnnInstance happy_var_2+                       :(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})+	) (\r -> happyReturn (happyIn82 r))++happyReduce_173 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_173 = happyMonadReduce 2# 67# happyReduction_173+happyReduction_173 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ajs (sLL happy_var_1 happy_var_2 (Overlappable (getOVERLAPPABLE_PRAGs happy_var_1)))+                                       [mo happy_var_1,mc happy_var_2])}})+	) (\r -> happyReturn (happyIn83 r))++happyReduce_174 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_174 = happyMonadReduce 2# 67# happyReduction_174+happyReduction_174 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ajs (sLL happy_var_1 happy_var_2 (Overlapping (getOVERLAPPING_PRAGs happy_var_1)))+                                       [mo happy_var_1,mc happy_var_2])}})+	) (\r -> happyReturn (happyIn83 r))++happyReduce_175 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_175 = happyMonadReduce 2# 67# happyReduction_175+happyReduction_175 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ajs (sLL happy_var_1 happy_var_2 (Overlaps (getOVERLAPS_PRAGs happy_var_1)))+                                       [mo happy_var_1,mc happy_var_2])}})+	) (\r -> happyReturn (happyIn83 r))++happyReduce_176 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_176 = happyMonadReduce 2# 67# happyReduction_176+happyReduction_176 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ajs (sLL happy_var_1 happy_var_2 (Incoherent (getINCOHERENT_PRAGs happy_var_1)))+                                       [mo happy_var_1,mc happy_var_2])}})+	) (\r -> happyReturn (happyIn83 r))++happyReduce_177 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_177 = happySpecReduce_0  67# happyReduction_177+happyReduction_177  =  happyIn83+		 (Nothing+	)++happyReduce_178 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_178 = happyMonadReduce 1# 68# happyReduction_178+happyReduction_178 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ams (sL1 happy_var_1 StockStrategy)+                                       [mj AnnStock happy_var_1])})+	) (\r -> happyReturn (happyIn84 r))++happyReduce_179 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_179 = happyMonadReduce 1# 68# happyReduction_179+happyReduction_179 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ams (sL1 happy_var_1 AnyclassStrategy)+                                       [mj AnnAnyclass happy_var_1])})+	) (\r -> happyReturn (happyIn84 r))++happyReduce_180 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_180 = happyMonadReduce 1# 68# happyReduction_180+happyReduction_180 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ams (sL1 happy_var_1 NewtypeStrategy)+                                       [mj AnnNewtype happy_var_1])})+	) (\r -> happyReturn (happyIn84 r))++happyReduce_181 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_181 = happyMonadReduce 2# 69# happyReduction_181+happyReduction_181 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut161 happy_x_2 of { (HappyWrap161 happy_var_2) -> +	( ams (sLL happy_var_1 happy_var_2 (ViaStrategy (mkLHsSigType happy_var_2)))+                                            [mj AnnVia happy_var_1])}})+	) (\r -> happyReturn (happyIn85 r))++happyReduce_182 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_182 = happyMonadReduce 1# 70# happyReduction_182+happyReduction_182 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ajs (sL1 happy_var_1 StockStrategy)+                                       [mj AnnStock happy_var_1])})+	) (\r -> happyReturn (happyIn86 r))++happyReduce_183 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_183 = happyMonadReduce 1# 70# happyReduction_183+happyReduction_183 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ajs (sL1 happy_var_1 AnyclassStrategy)+                                       [mj AnnAnyclass happy_var_1])})+	) (\r -> happyReturn (happyIn86 r))++happyReduce_184 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_184 = happyMonadReduce 1# 70# happyReduction_184+happyReduction_184 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ajs (sL1 happy_var_1 NewtypeStrategy)+                                       [mj AnnNewtype happy_var_1])})+	) (\r -> happyReturn (happyIn86 r))++happyReduce_185 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_185 = happySpecReduce_1  70# happyReduction_185+happyReduction_185 happy_x_1+	 =  case happyOut85 happy_x_1 of { (HappyWrap85 happy_var_1) -> +	happyIn86+		 (Just happy_var_1+	)}++happyReduce_186 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_186 = happySpecReduce_0  70# happyReduction_186+happyReduction_186  =  happyIn86+		 (Nothing+	)++happyReduce_187 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_187 = happySpecReduce_0  71# happyReduction_187+happyReduction_187  =  happyIn87+		 (noLoc ([], Nothing)+	)++happyReduce_188 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_188 = happySpecReduce_2  71# happyReduction_188+happyReduction_188 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut88 happy_x_2 of { (HappyWrap88 happy_var_2) -> +	happyIn87+		 (sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]+                                                , Just (happy_var_2))+	)}}++happyReduce_189 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_189 = happyMonadReduce 3# 72# happyReduction_189+happyReduction_189 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut301 happy_x_1 of { (HappyWrap301 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut89 happy_x_3 of { (HappyWrap89 happy_var_3) -> +	( ams (sLL happy_var_1 happy_var_3 (InjectivityAnn happy_var_1 (reverse (unLoc happy_var_3))))+                  [mu AnnRarrow happy_var_2])}}})+	) (\r -> happyReturn (happyIn88 r))++happyReduce_190 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_190 = happySpecReduce_2  73# happyReduction_190+happyReduction_190 happy_x_2+	happy_x_1+	 =  case happyOut89 happy_x_1 of { (HappyWrap89 happy_var_1) -> +	case happyOut301 happy_x_2 of { (HappyWrap301 happy_var_2) -> +	happyIn89+		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)+	)}}++happyReduce_191 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_191 = happySpecReduce_1  73# happyReduction_191+happyReduction_191 happy_x_1+	 =  case happyOut301 happy_x_1 of { (HappyWrap301 happy_var_1) -> +	happyIn89+		 (sLL happy_var_1 happy_var_1 [happy_var_1]+	)}++happyReduce_192 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_192 = happySpecReduce_0  74# happyReduction_192+happyReduction_192  =  happyIn90+		 (noLoc ([],OpenTypeFamily)+	)++happyReduce_193 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_193 = happySpecReduce_2  74# happyReduction_193+happyReduction_193 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut91 happy_x_2 of { (HappyWrap91 happy_var_2) -> +	happyIn90+		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)+                    ,ClosedTypeFamily (fmap reverse $ snd $ unLoc happy_var_2))+	)}}++happyReduce_194 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_194 = happySpecReduce_3  75# happyReduction_194+happyReduction_194 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut92 happy_x_2 of { (HappyWrap92 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn91+		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]+                                                ,Just (unLoc happy_var_2))+	)}}}++happyReduce_195 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_195 = happySpecReduce_3  75# happyReduction_195+happyReduction_195 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut92 happy_x_2 of { (HappyWrap92 happy_var_2) -> +	happyIn91+		 (let (dL->L loc _) = happy_var_2 in+                                             cL loc ([],Just (unLoc happy_var_2))+	)}++happyReduce_196 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_196 = happySpecReduce_3  75# happyReduction_196+happyReduction_196 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn91+		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mj AnnDotdot happy_var_2+                                                 ,mcc happy_var_3],Nothing)+	)}}}++happyReduce_197 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_197 = happySpecReduce_3  75# happyReduction_197+happyReduction_197 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn91+		 (let (dL->L loc _) = happy_var_2 in+                                             cL loc ([mj AnnDotdot happy_var_2],Nothing)+	)}++happyReduce_198 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_198 = happyMonadReduce 3# 76# happyReduction_198+happyReduction_198 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut92 happy_x_1 of { (HappyWrap92 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut93 happy_x_3 of { (HappyWrap93 happy_var_3) -> +	( let (dL->L loc (anns, eqn)) = happy_var_3 in+                                         asl (unLoc happy_var_1) happy_var_2 (cL loc eqn)+                                         >> ams happy_var_3 anns+                                         >> return (sLL happy_var_1 happy_var_3 (cL loc eqn : unLoc happy_var_1)))}}})+	) (\r -> happyReturn (happyIn92 r))++happyReduce_199 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_199 = happyMonadReduce 2# 76# happyReduction_199+happyReduction_199 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut92 happy_x_1 of { (HappyWrap92 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( addAnnotation (gl happy_var_1) AnnSemi (gl happy_var_2)+                                         >> return (sLL happy_var_1 happy_var_2  (unLoc happy_var_1)))}})+	) (\r -> happyReturn (happyIn92 r))++happyReduce_200 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_200 = happyMonadReduce 1# 76# happyReduction_200+happyReduction_200 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut93 happy_x_1 of { (HappyWrap93 happy_var_1) -> +	( let (dL->L loc (anns, eqn)) = happy_var_1 in+                                         ams happy_var_1 anns+                                         >> return (sLL happy_var_1 happy_var_1 [cL loc eqn]))})+	) (\r -> happyReturn (happyIn92 r))++happyReduce_201 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_201 = happySpecReduce_0  76# happyReduction_201+happyReduction_201  =  happyIn92+		 (noLoc []+	)++happyReduce_202 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_202 = happyMonadReduce 6# 77# happyReduction_202+happyReduction_202 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut161 happy_x_4 of { (HappyWrap161 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	case happyOut155 happy_x_6 of { (HappyWrap155 happy_var_6) -> +	( do { hintExplicitForall happy_var_1+                    ; (eqn,ann) <- mkTyFamInstEqn (Just happy_var_2) happy_var_4 happy_var_6+                    ; return (sLL happy_var_1 happy_var_6+                               (mu AnnForall happy_var_1:mj AnnDot happy_var_3:mj AnnEqual happy_var_5:ann,eqn)) })}}}}}})+	) (\r -> happyReturn (happyIn93 r))++happyReduce_203 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_203 = happyMonadReduce 3# 77# happyReduction_203+happyReduction_203 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut155 happy_x_3 of { (HappyWrap155 happy_var_3) -> +	( do { (eqn,ann) <- mkTyFamInstEqn Nothing happy_var_1 happy_var_3+                    ; return (sLL happy_var_1 happy_var_3 (mj AnnEqual happy_var_2:ann, eqn))  })}}})+	) (\r -> happyReturn (happyIn93 r))++happyReduce_204 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_204 = happyMonadReduce 4# 78# happyReduction_204+happyReduction_204 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut95 happy_x_2 of { (HappyWrap95 happy_var_2) -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	case happyOut100 happy_x_4 of { (HappyWrap100 happy_var_4) -> +	( amms (liftM mkTyClD (mkFamDecl (comb3 happy_var_1 happy_var_3 happy_var_4) DataFamily happy_var_3+                                                  (snd $ unLoc happy_var_4) Nothing))+                        (mj AnnData happy_var_1:happy_var_2++(fst $ unLoc happy_var_4)))}}}})+	) (\r -> happyReturn (happyIn94 r))++happyReduce_205 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_205 = happyMonadReduce 3# 78# happyReduction_205+happyReduction_205 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut161 happy_x_2 of { (HappyWrap161 happy_var_2) -> +	case happyOut102 happy_x_3 of { (HappyWrap102 happy_var_3) -> +	( amms (liftM mkTyClD+                        (mkFamDecl (comb3 happy_var_1 happy_var_2 happy_var_3) OpenTypeFamily happy_var_2+                                   (fst . snd $ unLoc happy_var_3)+                                   (snd . snd $ unLoc happy_var_3)))+                       (mj AnnType happy_var_1:(fst $ unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn94 r))++happyReduce_206 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_206 = happyMonadReduce 4# 78# happyReduction_206+happyReduction_206 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	case happyOut102 happy_x_4 of { (HappyWrap102 happy_var_4) -> +	( amms (liftM mkTyClD+                        (mkFamDecl (comb3 happy_var_1 happy_var_3 happy_var_4) OpenTypeFamily happy_var_3+                                   (fst . snd $ unLoc happy_var_4)+                                   (snd . snd $ unLoc happy_var_4)))+                       (mj AnnType happy_var_1:mj AnnFamily happy_var_2:(fst $ unLoc happy_var_4)))}}}})+	) (\r -> happyReturn (happyIn94 r))++happyReduce_207 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_207 = happyMonadReduce 2# 78# happyReduction_207+happyReduction_207 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut93 happy_x_2 of { (HappyWrap93 happy_var_2) -> +	( ams happy_var_2 (fst $ unLoc happy_var_2) >>+                   amms (liftM mkInstD (mkTyFamInst (comb2 happy_var_1 happy_var_2) (snd $ unLoc happy_var_2)))+                        (mj AnnType happy_var_1:(fst $ unLoc happy_var_2)))}})+	) (\r -> happyReturn (happyIn94 r))++happyReduce_208 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_208 = happyMonadReduce 3# 78# happyReduction_208+happyReduction_208 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut93 happy_x_3 of { (HappyWrap93 happy_var_3) -> +	( ams happy_var_3 (fst $ unLoc happy_var_3) >>+                   amms (liftM mkInstD (mkTyFamInst (comb2 happy_var_1 happy_var_3) (snd $ unLoc happy_var_3)))+                        (mj AnnType happy_var_1:mj AnnInstance happy_var_2:(fst $ unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn94 r))++happyReduce_209 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_209 = happySpecReduce_0  79# happyReduction_209+happyReduction_209  =  happyIn95+		 ([]+	)++happyReduce_210 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_210 = happySpecReduce_1  79# happyReduction_210+happyReduction_210 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn95+		 ([mj AnnFamily happy_var_1]+	)}++happyReduce_211 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_211 = happySpecReduce_0  80# happyReduction_211+happyReduction_211  =  happyIn96+		 ([]+	)++happyReduce_212 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_212 = happySpecReduce_1  80# happyReduction_212+happyReduction_212 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn96+		 ([mj AnnInstance happy_var_1]+	)}++happyReduce_213 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_213 = happyMonadReduce 3# 81# happyReduction_213+happyReduction_213 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut96 happy_x_2 of { (HappyWrap96 happy_var_2) -> +	case happyOut93 happy_x_3 of { (HappyWrap93 happy_var_3) -> +	( ams happy_var_3 (fst $ unLoc happy_var_3) >>+                   amms (mkTyFamInst (comb2 happy_var_1 happy_var_3) (snd $ unLoc happy_var_3))+                        (mj AnnType happy_var_1:happy_var_2++(fst $ unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn97 r))++happyReduce_214 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_214 = happyMonadReduce 6# 81# happyReduction_214+happyReduction_214 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> +	case happyOut96 happy_x_2 of { (HappyWrap96 happy_var_2) -> +	case happyOut105 happy_x_3 of { (HappyWrap105 happy_var_3) -> +	case happyOut104 happy_x_4 of { (HappyWrap104 happy_var_4) -> +	case happyOut186 happy_x_5 of { (HappyWrap186 happy_var_5) -> +	case happyOut194 happy_x_6 of { (HappyWrap194 happy_var_6) -> +	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_5 happy_var_6) (snd $ unLoc happy_var_1) happy_var_3 (snd $ unLoc happy_var_4)+                                    Nothing (reverse (snd $ unLoc happy_var_5))+                                            (fmap reverse happy_var_6))+                       ((fst $ unLoc happy_var_1):happy_var_2++(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)))}}}}}})+	) (\r -> happyReturn (happyIn97 r))++happyReduce_215 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_215 = happyMonadReduce 7# 81# happyReduction_215+happyReduction_215 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut98 happy_x_1 of { (HappyWrap98 happy_var_1) -> +	case happyOut96 happy_x_2 of { (HappyWrap96 happy_var_2) -> +	case happyOut105 happy_x_3 of { (HappyWrap105 happy_var_3) -> +	case happyOut104 happy_x_4 of { (HappyWrap104 happy_var_4) -> +	case happyOut99 happy_x_5 of { (HappyWrap99 happy_var_5) -> +	case happyOut182 happy_x_6 of { (HappyWrap182 happy_var_6) -> +	case happyOut194 happy_x_7 of { (HappyWrap194 happy_var_7) -> +	( amms (mkDataFamInst (comb4 happy_var_1 happy_var_4 happy_var_6 happy_var_7) (snd $ unLoc happy_var_1) happy_var_3+                                (snd $ unLoc happy_var_4) (snd $ unLoc happy_var_5) (snd $ unLoc happy_var_6)+                                (fmap reverse happy_var_7))+                        ((fst $ unLoc happy_var_1):happy_var_2++(fst $ unLoc happy_var_4)++(fst $ unLoc happy_var_5)++(fst $ unLoc happy_var_6)))}}}}}}})+	) (\r -> happyReturn (happyIn97 r))++happyReduce_216 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_216 = happySpecReduce_1  82# happyReduction_216+happyReduction_216 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn98+		 (sL1 happy_var_1 (mj AnnData    happy_var_1,DataType)+	)}++happyReduce_217 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_217 = happySpecReduce_1  82# happyReduction_217+happyReduction_217 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn98+		 (sL1 happy_var_1 (mj AnnNewtype happy_var_1,NewType)+	)}++happyReduce_218 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_218 = happySpecReduce_0  83# happyReduction_218+happyReduction_218  =  happyIn99+		 (noLoc     ([]               , Nothing)+	)++happyReduce_219 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_219 = happySpecReduce_2  83# happyReduction_219+happyReduction_219 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut181 happy_x_2 of { (HappyWrap181 happy_var_2) -> +	happyIn99+		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], Just happy_var_2)+	)}}++happyReduce_220 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_220 = happySpecReduce_0  84# happyReduction_220+happyReduction_220  =  happyIn100+		 (noLoc     ([]               , noLoc (NoSig noExtField)         )+	)++happyReduce_221 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_221 = happySpecReduce_2  84# happyReduction_221+happyReduction_221 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut181 happy_x_2 of { (HappyWrap181 happy_var_2) -> +	happyIn100+		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], sLL happy_var_1 happy_var_2 (KindSig noExtField happy_var_2))+	)}}++happyReduce_222 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_222 = happySpecReduce_0  85# happyReduction_222+happyReduction_222  =  happyIn101+		 (noLoc     ([]               , noLoc     (NoSig    noExtField)   )+	)++happyReduce_223 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_223 = happySpecReduce_2  85# happyReduction_223+happyReduction_223 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut181 happy_x_2 of { (HappyWrap181 happy_var_2) -> +	happyIn101+		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], sLL happy_var_1 happy_var_2 (KindSig  noExtField happy_var_2))+	)}}++happyReduce_224 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_224 = happySpecReduce_2  85# happyReduction_224+happyReduction_224 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut176 happy_x_2 of { (HappyWrap176 happy_var_2) -> +	happyIn101+		 (sLL happy_var_1 happy_var_2 ([mj AnnEqual happy_var_1] , sLL happy_var_1 happy_var_2 (TyVarSig noExtField happy_var_2))+	)}}++happyReduce_225 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_225 = happySpecReduce_0  86# happyReduction_225+happyReduction_225  =  happyIn102+		 (noLoc ([], (noLoc (NoSig noExtField), Nothing))+	)++happyReduce_226 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_226 = happySpecReduce_2  86# happyReduction_226+happyReduction_226 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut181 happy_x_2 of { (HappyWrap181 happy_var_2) -> +	happyIn102+		 (sLL happy_var_1 happy_var_2 ( [mu AnnDcolon happy_var_1]+                                 , (sLL happy_var_2 happy_var_2 (KindSig noExtField happy_var_2), Nothing))+	)}}++happyReduce_227 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_227 = happyReduce 4# 86# happyReduction_227+happyReduction_227 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut176 happy_x_2 of { (HappyWrap176 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut88 happy_x_4 of { (HappyWrap88 happy_var_4) -> +	happyIn102+		 (sLL happy_var_1 happy_var_4 ([mj AnnEqual happy_var_1, mj AnnVbar happy_var_3]+                            , (sLL happy_var_1 happy_var_2 (TyVarSig noExtField happy_var_2), Just happy_var_4))+	) `HappyStk` happyRest}}}}++happyReduce_228 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_228 = happyMonadReduce 3# 87# happyReduction_228+happyReduction_228 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)+                                       >> (return (sLL happy_var_1 happy_var_3 (Just happy_var_1, happy_var_3))))}}})+	) (\r -> happyReturn (happyIn103 r))++happyReduce_229 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_229 = happySpecReduce_1  87# happyReduction_229+happyReduction_229 happy_x_1+	 =  case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> +	happyIn103+		 (sL1 happy_var_1 (Nothing, happy_var_1)+	)}++happyReduce_230 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_230 = happyMonadReduce 6# 88# happyReduction_230+happyReduction_230 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut159 happy_x_4 of { (HappyWrap159 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	case happyOut161 happy_x_6 of { (HappyWrap161 happy_var_6) -> +	( hintExplicitForall happy_var_1+                                                       >> (addAnnotation (gl happy_var_4) (toUnicodeAnn AnnDarrow happy_var_5) (gl happy_var_5)+                                                           >> return (sLL happy_var_1 happy_var_6 ([mu AnnForall happy_var_1, mj AnnDot happy_var_3]+                                                                                , (Just happy_var_4, Just happy_var_2, happy_var_6)))+                                                          ))}}}}}})+	) (\r -> happyReturn (happyIn104 r))++happyReduce_231 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_231 = happyMonadReduce 4# 88# happyReduction_231+happyReduction_231 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut161 happy_x_4 of { (HappyWrap161 happy_var_4) -> +	( hintExplicitForall happy_var_1+                                          >> return (sLL happy_var_1 happy_var_4 ([mu AnnForall happy_var_1, mj AnnDot happy_var_3]+                                                               , (Nothing, Just happy_var_2, happy_var_4))))}}}})+	) (\r -> happyReturn (happyIn104 r))++happyReduce_232 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_232 = happyMonadReduce 3# 88# happyReduction_232+happyReduction_232 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)+                                       >> (return (sLL happy_var_1 happy_var_3([], (Just happy_var_1, Nothing, happy_var_3)))))}}})+	) (\r -> happyReturn (happyIn104 r))++happyReduce_233 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_233 = happySpecReduce_1  88# happyReduction_233+happyReduction_233 happy_x_1+	 =  case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> +	happyIn104+		 (sL1 happy_var_1 ([], (Nothing, Nothing, happy_var_1))+	)}++happyReduce_234 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_234 = happyMonadReduce 4# 89# happyReduction_234+happyReduction_234 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( ajs (sLL happy_var_1 happy_var_4 (CType (getCTYPEs happy_var_1) (Just (Header (getSTRINGs happy_var_2) (getSTRING happy_var_2)))+                                        (getSTRINGs happy_var_3,getSTRING happy_var_3)))+                              [mo happy_var_1,mj AnnHeader happy_var_2,mj AnnVal happy_var_3,mc happy_var_4])}}}})+	) (\r -> happyReturn (happyIn105 r))++happyReduce_235 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_235 = happyMonadReduce 3# 89# happyReduction_235+happyReduction_235 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ajs (sLL happy_var_1 happy_var_3 (CType (getCTYPEs happy_var_1) Nothing (getSTRINGs happy_var_2, getSTRING happy_var_2)))+                              [mo happy_var_1,mj AnnVal happy_var_2,mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn105 r))++happyReduce_236 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_236 = happySpecReduce_0  89# happyReduction_236+happyReduction_236  =  happyIn105+		 (Nothing+	)++happyReduce_237 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_237 = happyMonadReduce 5# 90# happyReduction_237+happyReduction_237 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut86 happy_x_2 of { (HappyWrap86 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut83 happy_x_4 of { (HappyWrap83 happy_var_4) -> +	case happyOut170 happy_x_5 of { (HappyWrap170 happy_var_5) -> +	( do { let { err = text "in the stand-alone deriving instance"+                                    <> colon <+> quotes (ppr happy_var_5) }+                      ; ams (sLL happy_var_1 (hsSigType happy_var_5)+                                 (DerivDecl noExtField (mkHsWildCardBndrs happy_var_5) happy_var_2 happy_var_4))+                            [mj AnnDeriving happy_var_1, mj AnnInstance happy_var_3] })}}}}})+	) (\r -> happyReturn (happyIn106 r))++happyReduce_238 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_238 = happyMonadReduce 4# 91# happyReduction_238+happyReduction_238 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut284 happy_x_3 of { (HappyWrap284 happy_var_3) -> +	case happyOut108 happy_x_4 of { (HappyWrap108 happy_var_4) -> +	( amms (mkRoleAnnotDecl (comb3 happy_var_1 happy_var_3 happy_var_4) happy_var_3 (reverse (unLoc happy_var_4)))+                  [mj AnnType happy_var_1,mj AnnRole happy_var_2])}}}})+	) (\r -> happyReturn (happyIn107 r))++happyReduce_239 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_239 = happySpecReduce_0  92# happyReduction_239+happyReduction_239  =  happyIn108+		 (noLoc []+	)++happyReduce_240 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_240 = happySpecReduce_1  92# happyReduction_240+happyReduction_240 happy_x_1+	 =  case happyOut109 happy_x_1 of { (HappyWrap109 happy_var_1) -> +	happyIn108+		 (happy_var_1+	)}++happyReduce_241 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_241 = happySpecReduce_1  93# happyReduction_241+happyReduction_241 happy_x_1+	 =  case happyOut110 happy_x_1 of { (HappyWrap110 happy_var_1) -> +	happyIn109+		 (sLL happy_var_1 happy_var_1 [happy_var_1]+	)}++happyReduce_242 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_242 = happySpecReduce_2  93# happyReduction_242+happyReduction_242 happy_x_2+	happy_x_1+	 =  case happyOut109 happy_x_1 of { (HappyWrap109 happy_var_1) -> +	case happyOut110 happy_x_2 of { (HappyWrap110 happy_var_2) -> +	happyIn109+		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1+	)}}++happyReduce_243 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_243 = happySpecReduce_1  94# happyReduction_243+happyReduction_243 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn110+		 (sL1 happy_var_1 $ Just $ getVARID happy_var_1+	)}++happyReduce_244 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_244 = happySpecReduce_1  94# happyReduction_244+happyReduction_244 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn110+		 (sL1 happy_var_1 Nothing+	)}++happyReduce_245 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_245 = happyMonadReduce 4# 95# happyReduction_245+happyReduction_245 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut112 happy_x_2 of { (HappyWrap112 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut249 happy_x_4 of { (HappyWrap249 happy_var_4) -> +	(      let (name, args,as ) = happy_var_2 in+                 ams (sLL happy_var_1 happy_var_4 . ValD noExtField $ mkPatSynBind name args happy_var_4+                                                    ImplicitBidirectional)+               (as ++ [mj AnnPattern happy_var_1, mj AnnEqual happy_var_3]))}}}})+	) (\r -> happyReturn (happyIn111 r))++happyReduce_246 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_246 = happyMonadReduce 4# 95# happyReduction_246+happyReduction_246 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut112 happy_x_2 of { (HappyWrap112 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut249 happy_x_4 of { (HappyWrap249 happy_var_4) -> +	(    let (name, args, as) = happy_var_2 in+               ams (sLL happy_var_1 happy_var_4 . ValD noExtField $ mkPatSynBind name args happy_var_4 Unidirectional)+               (as ++ [mj AnnPattern happy_var_1,mu AnnLarrow happy_var_3]))}}}})+	) (\r -> happyReturn (happyIn111 r))++happyReduce_247 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_247 = happyMonadReduce 5# 95# happyReduction_247+happyReduction_247 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut112 happy_x_2 of { (HappyWrap112 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut249 happy_x_4 of { (HappyWrap249 happy_var_4) -> +	case happyOut115 happy_x_5 of { (HappyWrap115 happy_var_5) -> +	( do { let (name, args, as) = happy_var_2+                  ; mg <- mkPatSynMatchGroup name (snd $ unLoc happy_var_5)+                  ; ams (sLL happy_var_1 happy_var_5 . ValD noExtField $+                           mkPatSynBind name args happy_var_4 (ExplicitBidirectional mg))+                       (as ++ ((mj AnnPattern happy_var_1:mu AnnLarrow happy_var_3:(fst $ unLoc happy_var_5))) )+                   })}}}}})+	) (\r -> happyReturn (happyIn111 r))++happyReduce_248 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_248 = happySpecReduce_2  96# happyReduction_248+happyReduction_248 happy_x_2+	happy_x_1+	 =  case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> +	case happyOut113 happy_x_2 of { (HappyWrap113 happy_var_2) -> +	happyIn112+		 ((happy_var_1, PrefixCon happy_var_2, [])+	)}}++happyReduce_249 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_249 = happySpecReduce_3  96# happyReduction_249+happyReduction_249 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> +	case happyOut280 happy_x_2 of { (HappyWrap280 happy_var_2) -> +	case happyOut305 happy_x_3 of { (HappyWrap305 happy_var_3) -> +	happyIn112+		 ((happy_var_2, InfixCon happy_var_1 happy_var_3, [])+	)}}}++happyReduce_250 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_250 = happyReduce 4# 96# happyReduction_250+happyReduction_250 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut114 happy_x_3 of { (HappyWrap114 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn112+		 ((happy_var_1, RecCon happy_var_3, [moc happy_var_2, mcc happy_var_4] )+	) `HappyStk` happyRest}}}}++happyReduce_251 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_251 = happySpecReduce_0  97# happyReduction_251+happyReduction_251  =  happyIn113+		 ([]+	)++happyReduce_252 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_252 = happySpecReduce_2  97# happyReduction_252+happyReduction_252 happy_x_2+	happy_x_1+	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> +	case happyOut113 happy_x_2 of { (HappyWrap113 happy_var_2) -> +	happyIn113+		 (happy_var_1 : happy_var_2+	)}}++happyReduce_253 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_253 = happySpecReduce_1  98# happyReduction_253+happyReduction_253 happy_x_1+	 =  case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> +	happyIn114+		 ([RecordPatSynField happy_var_1 happy_var_1]+	)}++happyReduce_254 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_254 = happyMonadReduce 3# 98# happyReduction_254+happyReduction_254 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut114 happy_x_3 of { (HappyWrap114 happy_var_3) -> +	( addAnnotation (getLoc happy_var_1) AnnComma (getLoc happy_var_2) >>+                                         return ((RecordPatSynField happy_var_1 happy_var_1) : happy_var_3 ))}}})+	) (\r -> happyReturn (happyIn114 r))++happyReduce_255 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_255 = happyReduce 4# 99# happyReduction_255+happyReduction_255 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut125 happy_x_3 of { (HappyWrap125 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn115+		 (sLL happy_var_1 happy_var_4 ((mj AnnWhere happy_var_1:moc happy_var_2+                                           :mcc happy_var_4:(fst $ unLoc happy_var_3)),sL1 happy_var_3 (snd $ unLoc happy_var_3))+	) `HappyStk` happyRest}}}}++happyReduce_256 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_256 = happyReduce 4# 99# happyReduction_256+happyReduction_256 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut125 happy_x_3 of { (HappyWrap125 happy_var_3) -> +	happyIn115+		 (cL (comb2 happy_var_1 happy_var_3) ((mj AnnWhere happy_var_1:(fst $ unLoc happy_var_3))+                                          ,sL1 happy_var_3 (snd $ unLoc happy_var_3))+	) `HappyStk` happyRest}}++happyReduce_257 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_257 = happyMonadReduce 4# 100# happyReduction_257+happyReduction_257 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut277 happy_x_2 of { (HappyWrap277 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut150 happy_x_4 of { (HappyWrap150 happy_var_4) -> +	( ams (sLL happy_var_1 happy_var_4 $ PatSynSig noExtField (unLoc happy_var_2) (mkLHsSigType happy_var_4))+                          [mj AnnPattern happy_var_1, mu AnnDcolon happy_var_3])}}}})+	) (\r -> happyReturn (happyIn116 r))++happyReduce_258 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_258 = happySpecReduce_1  101# happyReduction_258+happyReduction_258 happy_x_1+	 =  case happyOut94 happy_x_1 of { (HappyWrap94 happy_var_1) -> +	happyIn117+		 (happy_var_1+	)}++happyReduce_259 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_259 = happySpecReduce_1  101# happyReduction_259+happyReduction_259 happy_x_1+	 =  case happyOut201 happy_x_1 of { (HappyWrap201 happy_var_1) -> +	happyIn117+		 (happy_var_1+	)}++happyReduce_260 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_260 = happyMonadReduce 4# 101# happyReduction_260+happyReduction_260 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut210 happy_x_2 of { (HappyWrap210 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut150 happy_x_4 of { (HappyWrap150 happy_var_4) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                       do { v <- checkValSigLhs happy_var_2+                          ; let err = text "in default signature" <> colon <+>+                                      quotes (ppr happy_var_2)+                          ; ams (sLL happy_var_1 happy_var_4 $ SigD noExtField $ ClassOpSig noExtField True [v] $ mkLHsSigType happy_var_4)+                                [mj AnnDefault happy_var_1,mu AnnDcolon happy_var_3] })}}}})+	) (\r -> happyReturn (happyIn117 r))++happyReduce_261 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_261 = happyMonadReduce 3# 102# happyReduction_261+happyReduction_261 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut118 happy_x_1 of { (HappyWrap118 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut117 happy_x_3 of { (HappyWrap117 happy_var_3) -> +	( if isNilOL (snd $ unLoc happy_var_1)+                                             then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                                    , unitOL happy_var_3))+                                             else ams (lastOL (snd $ unLoc happy_var_1)) [mj AnnSemi happy_var_2]+                                           >> return (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1+                                                                ,(snd $ unLoc happy_var_1) `appOL` unitOL happy_var_3)))}}})+	) (\r -> happyReturn (happyIn118 r))++happyReduce_262 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_262 = happyMonadReduce 2# 102# happyReduction_262+happyReduction_262 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut118 happy_x_1 of { (HappyWrap118 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( if isNilOL (snd $ unLoc happy_var_1)+                                             then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                                                   ,snd $ unLoc happy_var_1))+                                             else ams (lastOL (snd $ unLoc happy_var_1)) [mj AnnSemi happy_var_2]+                                           >> return (sLL happy_var_1 happy_var_2  (unLoc happy_var_1)))}})+	) (\r -> happyReturn (happyIn118 r))++happyReduce_263 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_263 = happySpecReduce_1  102# happyReduction_263+happyReduction_263 happy_x_1+	 =  case happyOut117 happy_x_1 of { (HappyWrap117 happy_var_1) -> +	happyIn118+		 (sL1 happy_var_1 ([], unitOL happy_var_1)+	)}++happyReduce_264 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_264 = happySpecReduce_0  102# happyReduction_264+happyReduction_264  =  happyIn118+		 (noLoc ([],nilOL)+	)++happyReduce_265 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_265 = happySpecReduce_3  103# happyReduction_265+happyReduction_265 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut118 happy_x_2 of { (HappyWrap118 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn119+		 (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2)+                                             ,snd $ unLoc happy_var_2)+	)}}}++happyReduce_266 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_266 = happySpecReduce_3  103# happyReduction_266+happyReduction_266 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut118 happy_x_2 of { (HappyWrap118 happy_var_2) -> +	happyIn119+		 (happy_var_2+	)}++happyReduce_267 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_267 = happySpecReduce_2  104# happyReduction_267+happyReduction_267 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut119 happy_x_2 of { (HappyWrap119 happy_var_2) -> +	happyIn120+		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)+                                             ,snd $ unLoc happy_var_2)+	)}}++happyReduce_268 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_268 = happySpecReduce_0  104# happyReduction_268+happyReduction_268  =  happyIn120+		 (noLoc ([],nilOL)+	)++happyReduce_269 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_269 = happySpecReduce_1  105# happyReduction_269+happyReduction_269 happy_x_1+	 =  case happyOut97 happy_x_1 of { (HappyWrap97 happy_var_1) -> +	happyIn121+		 (sLL happy_var_1 happy_var_1 (unitOL (sL1 happy_var_1 (InstD noExtField (unLoc happy_var_1))))+	)}++happyReduce_270 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_270 = happySpecReduce_1  105# happyReduction_270+happyReduction_270 happy_x_1+	 =  case happyOut201 happy_x_1 of { (HappyWrap201 happy_var_1) -> +	happyIn121+		 (sLL happy_var_1 happy_var_1 (unitOL happy_var_1)+	)}++happyReduce_271 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_271 = happyMonadReduce 3# 106# happyReduction_271+happyReduction_271 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut122 happy_x_1 of { (HappyWrap122 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut121 happy_x_3 of { (HappyWrap121 happy_var_3) -> +	( if isNilOL (snd $ unLoc happy_var_1)+                                             then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                                    , unLoc happy_var_3))+                                             else ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]+                                           >> return+                                            (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1+                                                       ,(snd $ unLoc happy_var_1) `appOL` unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn122 r))++happyReduce_272 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_272 = happyMonadReduce 2# 106# happyReduction_272+happyReduction_272 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut122 happy_x_1 of { (HappyWrap122 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( if isNilOL (snd $ unLoc happy_var_1)+                                             then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                                                   ,snd $ unLoc happy_var_1))+                                             else ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]+                                           >> return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1)))}})+	) (\r -> happyReturn (happyIn122 r))++happyReduce_273 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_273 = happySpecReduce_1  106# happyReduction_273+happyReduction_273 happy_x_1+	 =  case happyOut121 happy_x_1 of { (HappyWrap121 happy_var_1) -> +	happyIn122+		 (sL1 happy_var_1 ([],unLoc happy_var_1)+	)}++happyReduce_274 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_274 = happySpecReduce_0  106# happyReduction_274+happyReduction_274  =  happyIn122+		 (noLoc ([],nilOL)+	)++happyReduce_275 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_275 = happySpecReduce_3  107# happyReduction_275+happyReduction_275 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut122 happy_x_2 of { (HappyWrap122 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn123+		 (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2),snd $ unLoc happy_var_2)+	)}}}++happyReduce_276 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_276 = happySpecReduce_3  107# happyReduction_276+happyReduction_276 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut122 happy_x_2 of { (HappyWrap122 happy_var_2) -> +	happyIn123+		 (cL (gl happy_var_2) (unLoc happy_var_2)+	)}++happyReduce_277 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_277 = happySpecReduce_2  108# happyReduction_277+happyReduction_277 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut123 happy_x_2 of { (HappyWrap123 happy_var_2) -> +	happyIn124+		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)+                                             ,(snd $ unLoc happy_var_2))+	)}}++happyReduce_278 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_278 = happySpecReduce_0  108# happyReduction_278+happyReduction_278  =  happyIn124+		 (noLoc ([],nilOL)+	)++happyReduce_279 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_279 = happyMonadReduce 3# 109# happyReduction_279+happyReduction_279 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut125 happy_x_1 of { (HappyWrap125 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut201 happy_x_3 of { (HappyWrap201 happy_var_3) -> +	( if isNilOL (snd $ unLoc happy_var_1)+                                 then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                        , unitOL happy_var_3))+                                 else do ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]+                                           >> return (+                                          let { this = unitOL happy_var_3;+                                                rest = snd $ unLoc happy_var_1;+                                                these = rest `appOL` this }+                                          in rest `seq` this `seq` these `seq`+                                             (sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1,these))))}}})+	) (\r -> happyReturn (happyIn125 r))++happyReduce_280 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_280 = happyMonadReduce 2# 109# happyReduction_280+happyReduction_280 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut125 happy_x_1 of { (HappyWrap125 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( if isNilOL (snd $ unLoc happy_var_1)+                                  then return (sLL happy_var_1 happy_var_2 ((mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                          ,snd $ unLoc happy_var_1)))+                                  else ams (lastOL $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]+                                           >> return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1)))}})+	) (\r -> happyReturn (happyIn125 r))++happyReduce_281 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_281 = happySpecReduce_1  109# happyReduction_281+happyReduction_281 happy_x_1+	 =  case happyOut201 happy_x_1 of { (HappyWrap201 happy_var_1) -> +	happyIn125+		 (sL1 happy_var_1 ([], unitOL happy_var_1)+	)}++happyReduce_282 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_282 = happySpecReduce_0  109# happyReduction_282+happyReduction_282  =  happyIn125+		 (noLoc ([],nilOL)+	)++happyReduce_283 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_283 = happySpecReduce_3  110# happyReduction_283+happyReduction_283 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn126+		 (sLL happy_var_1 happy_var_3 (moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2)+                                                   ,sL1 happy_var_2 $ snd $ unLoc happy_var_2)+	)}}}++happyReduce_284 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_284 = happySpecReduce_3  110# happyReduction_284+happyReduction_284 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut125 happy_x_2 of { (HappyWrap125 happy_var_2) -> +	happyIn126+		 (cL (gl happy_var_2) (fst $ unLoc happy_var_2,sL1 happy_var_2 $ snd $ unLoc happy_var_2)+	)}++happyReduce_285 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_285 = happyMonadReduce 1# 111# happyReduction_285+happyReduction_285 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut126 happy_x_1 of { (HappyWrap126 happy_var_1) -> +	( do { val_binds <- cvBindGroup (unLoc $ snd $ unLoc happy_var_1)+                                  ; return (sL1 happy_var_1 (fst $ unLoc happy_var_1+                                                    ,sL1 happy_var_1 $ HsValBinds noExtField val_binds)) })})+	) (\r -> happyReturn (happyIn127 r))++happyReduce_286 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_286 = happySpecReduce_3  111# happyReduction_286+happyReduction_286 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut262 happy_x_2 of { (HappyWrap262 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn127+		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]+                                             ,sL1 happy_var_2 $ HsIPBinds noExtField (IPBinds noExtField (reverse $ unLoc happy_var_2)))+	)}}}++happyReduce_287 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_287 = happySpecReduce_3  111# happyReduction_287+happyReduction_287 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut262 happy_x_2 of { (HappyWrap262 happy_var_2) -> +	happyIn127+		 (cL (getLoc happy_var_2) ([]+                                            ,sL1 happy_var_2 $ HsIPBinds noExtField (IPBinds noExtField (reverse $ unLoc happy_var_2)))+	)}++happyReduce_288 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_288 = happySpecReduce_2  112# happyReduction_288+happyReduction_288 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut127 happy_x_2 of { (HappyWrap127 happy_var_2) -> +	happyIn128+		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1 : (fst $ unLoc happy_var_2)+                                             ,snd $ unLoc happy_var_2)+	)}}++happyReduce_289 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_289 = happySpecReduce_0  112# happyReduction_289+happyReduction_289  =  happyIn128+		 (noLoc ([],noLoc emptyLocalBinds)+	)++happyReduce_290 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_290 = happyMonadReduce 3# 113# happyReduction_290+happyReduction_290 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut129 happy_x_1 of { (HappyWrap129 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut130 happy_x_3 of { (HappyWrap130 happy_var_3) -> +	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)+                                          >> return (happy_var_1 `snocOL` happy_var_3))}}})+	) (\r -> happyReturn (happyIn129 r))++happyReduce_291 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_291 = happyMonadReduce 2# 113# happyReduction_291+happyReduction_291 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut129 happy_x_1 of { (HappyWrap129 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)+                                          >> return happy_var_1)}})+	) (\r -> happyReturn (happyIn129 r))++happyReduce_292 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_292 = happySpecReduce_1  113# happyReduction_292+happyReduction_292 happy_x_1+	 =  case happyOut130 happy_x_1 of { (HappyWrap130 happy_var_1) -> +	happyIn129+		 (unitOL happy_var_1+	)}++happyReduce_293 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_293 = happySpecReduce_0  113# happyReduction_293+happyReduction_293  =  happyIn129+		 (nilOL+	)++happyReduce_294 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_294 = happyMonadReduce 6# 114# happyReduction_294+happyReduction_294 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut131 happy_x_2 of { (HappyWrap131 happy_var_2) -> +	case happyOut133 happy_x_3 of { (HappyWrap133 happy_var_3) -> +	case happyOut210 happy_x_4 of { (HappyWrap210 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	case happyOut209 happy_x_6 of { (HappyWrap209 happy_var_6) -> +	(runECP_P happy_var_4 >>= \ happy_var_4 ->+           runECP_P happy_var_6 >>= \ happy_var_6 ->+           ams (sLL happy_var_1 happy_var_6 $ HsRule { rd_ext = noExtField+                                   , rd_name = cL (gl happy_var_1) (getSTRINGs happy_var_1, getSTRING happy_var_1)+                                   , rd_act = (snd happy_var_2) `orElse` AlwaysActive+                                   , rd_tyvs = sndOf3 happy_var_3, rd_tmvs = thdOf3 happy_var_3+                                   , rd_lhs = happy_var_4, rd_rhs = happy_var_6 })+               (mj AnnEqual happy_var_5 : (fst happy_var_2) ++ (fstOf3 happy_var_3)))}}}}}})+	) (\r -> happyReturn (happyIn130 r))++happyReduce_295 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_295 = happySpecReduce_0  115# happyReduction_295+happyReduction_295  =  happyIn131+		 (([],Nothing)+	)++happyReduce_296 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_296 = happySpecReduce_1  115# happyReduction_296+happyReduction_296 happy_x_1+	 =  case happyOut132 happy_x_1 of { (HappyWrap132 happy_var_1) -> +	happyIn131+		 ((fst happy_var_1,Just (snd happy_var_1))+	)}++happyReduce_297 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_297 = happySpecReduce_3  116# happyReduction_297+happyReduction_297 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn132+		 (([mos happy_var_1,mj AnnVal happy_var_2,mcs happy_var_3]+                                  ,ActiveAfter  (getINTEGERs happy_var_2) (fromInteger (il_value (getINTEGER happy_var_2))))+	)}}}++happyReduce_298 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_298 = happyReduce 4# 116# happyReduction_298+happyReduction_298 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn132+		 (([mos happy_var_1,mj AnnTilde happy_var_2,mj AnnVal happy_var_3,mcs happy_var_4]+                                  ,ActiveBefore (getINTEGERs happy_var_3) (fromInteger (il_value (getINTEGER happy_var_3))))+	) `HappyStk` happyRest}}}}++happyReduce_299 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_299 = happySpecReduce_3  116# happyReduction_299+happyReduction_299 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn132+		 (([mos happy_var_1,mj AnnTilde happy_var_2,mcs happy_var_3]+                                  ,NeverActive)+	)}}}++happyReduce_300 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_300 = happyMonadReduce 6# 117# happyReduction_300+happyReduction_300 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut134 happy_x_5 of { (HappyWrap134 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	( let tyvs = mkRuleTyVarBndrs happy_var_2+                                                              in hintExplicitForall happy_var_1+                                                              >> checkRuleTyVarBndrNames (mkRuleTyVarBndrs happy_var_2)+                                                              >> return ([mu AnnForall happy_var_1,mj AnnDot happy_var_3,+                                                                          mu AnnForall happy_var_4,mj AnnDot happy_var_6],+                                                                         Just (mkRuleTyVarBndrs happy_var_2), mkRuleBndrs happy_var_5))}}}}}})+	) (\r -> happyReturn (happyIn133 r))++happyReduce_301 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_301 = happySpecReduce_3  117# happyReduction_301+happyReduction_301 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn133+		 (([mu AnnForall happy_var_1,mj AnnDot happy_var_3],+                                                              Nothing, mkRuleBndrs happy_var_2)+	)}}}++happyReduce_302 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_302 = happySpecReduce_0  117# happyReduction_302+happyReduction_302  =  happyIn133+		 (([], Nothing, [])+	)++happyReduce_303 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_303 = happySpecReduce_2  118# happyReduction_303+happyReduction_303 happy_x_2+	happy_x_1+	 =  case happyOut135 happy_x_1 of { (HappyWrap135 happy_var_1) -> +	case happyOut134 happy_x_2 of { (HappyWrap134 happy_var_2) -> +	happyIn134+		 (happy_var_1 : happy_var_2+	)}}++happyReduce_304 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_304 = happySpecReduce_0  118# happyReduction_304+happyReduction_304  =  happyIn134+		 ([]+	)++happyReduce_305 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_305 = happySpecReduce_1  119# happyReduction_305+happyReduction_305 happy_x_1+	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> +	happyIn135+		 (sLL happy_var_1 happy_var_1 (RuleTyTmVar happy_var_1 Nothing)+	)}++happyReduce_306 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_306 = happyMonadReduce 5# 119# happyReduction_306+happyReduction_306 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut305 happy_x_2 of { (HappyWrap305 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut157 happy_x_4 of { (HappyWrap157 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	( ams (sLL happy_var_1 happy_var_5 (RuleTyTmVar happy_var_2 (Just happy_var_4)))+                                               [mop happy_var_1,mu AnnDcolon happy_var_3,mcp happy_var_5])}}}}})+	) (\r -> happyReturn (happyIn135 r))++happyReduce_307 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_307 = happyMonadReduce 3# 120# happyReduction_307+happyReduction_307 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut136 happy_x_1 of { (HappyWrap136 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut137 happy_x_3 of { (HappyWrap137 happy_var_3) -> +	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)+                                          >> return (happy_var_1 `appOL` happy_var_3))}}})+	) (\r -> happyReturn (happyIn136 r))++happyReduce_308 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_308 = happyMonadReduce 2# 120# happyReduction_308+happyReduction_308 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut136 happy_x_1 of { (HappyWrap136 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)+                                          >> return happy_var_1)}})+	) (\r -> happyReturn (happyIn136 r))++happyReduce_309 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_309 = happySpecReduce_1  120# happyReduction_309+happyReduction_309 happy_x_1+	 =  case happyOut137 happy_x_1 of { (HappyWrap137 happy_var_1) -> +	happyIn136+		 (happy_var_1+	)}++happyReduce_310 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_310 = happySpecReduce_0  120# happyReduction_310+happyReduction_310  =  happyIn136+		 (nilOL+	)++happyReduce_311 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_311 = happyMonadReduce 2# 121# happyReduction_311+happyReduction_311 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> +	case happyOut140 happy_x_2 of { (HappyWrap140 happy_var_2) -> +	( amsu (sLL happy_var_1 happy_var_2 (Warning noExtField (unLoc happy_var_1) (WarningTxt (noLoc NoSourceText) $ snd $ unLoc happy_var_2)))+                     (fst $ unLoc happy_var_2))}})+	) (\r -> happyReturn (happyIn137 r))++happyReduce_312 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_312 = happyMonadReduce 3# 122# happyReduction_312+happyReduction_312 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut138 happy_x_1 of { (HappyWrap138 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut139 happy_x_3 of { (HappyWrap139 happy_var_3) -> +	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)+                                          >> return (happy_var_1 `appOL` happy_var_3))}}})+	) (\r -> happyReturn (happyIn138 r))++happyReduce_313 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_313 = happyMonadReduce 2# 122# happyReduction_313+happyReduction_313 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut138 happy_x_1 of { (HappyWrap138 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)+                                          >> return happy_var_1)}})+	) (\r -> happyReturn (happyIn138 r))++happyReduce_314 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_314 = happySpecReduce_1  122# happyReduction_314+happyReduction_314 happy_x_1+	 =  case happyOut139 happy_x_1 of { (HappyWrap139 happy_var_1) -> +	happyIn138+		 (happy_var_1+	)}++happyReduce_315 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_315 = happySpecReduce_0  122# happyReduction_315+happyReduction_315  =  happyIn138+		 (nilOL+	)++happyReduce_316 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_316 = happyMonadReduce 2# 123# happyReduction_316+happyReduction_316 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut271 happy_x_1 of { (HappyWrap271 happy_var_1) -> +	case happyOut140 happy_x_2 of { (HappyWrap140 happy_var_2) -> +	( amsu (sLL happy_var_1 happy_var_2 $ (Warning noExtField (unLoc happy_var_1) (DeprecatedTxt (noLoc NoSourceText) $ snd $ unLoc happy_var_2)))+                     (fst $ unLoc happy_var_2))}})+	) (\r -> happyReturn (happyIn139 r))++happyReduce_317 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_317 = happySpecReduce_1  124# happyReduction_317+happyReduction_317 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn140+		 (sL1 happy_var_1 ([],[cL (gl happy_var_1) (getStringLiteral happy_var_1)])+	)}++happyReduce_318 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_318 = happySpecReduce_3  124# happyReduction_318+happyReduction_318 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut141 happy_x_2 of { (HappyWrap141 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn140+		 (sLL happy_var_1 happy_var_3 $ ([mos happy_var_1,mcs happy_var_3],fromOL (unLoc happy_var_2))+	)}}}++happyReduce_319 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_319 = happyMonadReduce 3# 125# happyReduction_319+happyReduction_319 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut141 happy_x_1 of { (HappyWrap141 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( addAnnotation (oll $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>+                               return (sLL happy_var_1 happy_var_3 (unLoc happy_var_1 `snocOL`+                                                  (cL (gl happy_var_3) (getStringLiteral happy_var_3)))))}}})+	) (\r -> happyReturn (happyIn141 r))++happyReduce_320 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_320 = happySpecReduce_1  125# happyReduction_320+happyReduction_320 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn141+		 (sLL happy_var_1 happy_var_1 (unitOL (cL (gl happy_var_1) (getStringLiteral happy_var_1)))+	)}++happyReduce_321 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_321 = happySpecReduce_0  125# happyReduction_321+happyReduction_321  =  happyIn141+		 (noLoc nilOL+	)++happyReduce_322 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_322 = happyMonadReduce 4# 126# happyReduction_322+happyReduction_322 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut272 happy_x_2 of { (HappyWrap272 happy_var_2) -> +	case happyOut218 happy_x_3 of { (HappyWrap218 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( runECP_P happy_var_3 >>= \ happy_var_3 ->+                                            ams (sLL happy_var_1 happy_var_4 (AnnD noExtField $ HsAnnotation noExtField+                                            (getANN_PRAGs happy_var_1)+                                            (ValueAnnProvenance happy_var_2) happy_var_3))+                                            [mo happy_var_1,mc happy_var_4])}}}})+	) (\r -> happyReturn (happyIn142 r))++happyReduce_323 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_323 = happyMonadReduce 5# 126# happyReduction_323+happyReduction_323 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut289 happy_x_3 of { (HappyWrap289 happy_var_3) -> +	case happyOut218 happy_x_4 of { (HappyWrap218 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	( runECP_P happy_var_4 >>= \ happy_var_4 ->+                                            ams (sLL happy_var_1 happy_var_5 (AnnD noExtField $ HsAnnotation noExtField+                                            (getANN_PRAGs happy_var_1)+                                            (TypeAnnProvenance happy_var_3) happy_var_4))+                                            [mo happy_var_1,mj AnnType happy_var_2,mc happy_var_5])}}}}})+	) (\r -> happyReturn (happyIn142 r))++happyReduce_324 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_324 = happyMonadReduce 4# 126# happyReduction_324+happyReduction_324 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut218 happy_x_3 of { (HappyWrap218 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( runECP_P happy_var_3 >>= \ happy_var_3 ->+                                            ams (sLL happy_var_1 happy_var_4 (AnnD noExtField $ HsAnnotation noExtField+                                                (getANN_PRAGs happy_var_1)+                                                 ModuleAnnProvenance happy_var_3))+                                                [mo happy_var_1,mj AnnModule happy_var_2,mc happy_var_4])}}}})+	) (\r -> happyReturn (happyIn142 r))++happyReduce_325 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_325 = happyMonadReduce 4# 127# happyReduction_325+happyReduction_325 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> +	case happyOut145 happy_x_3 of { (HappyWrap145 happy_var_3) -> +	case happyOut146 happy_x_4 of { (HappyWrap146 happy_var_4) -> +	( mkImport happy_var_2 happy_var_3 (snd $ unLoc happy_var_4) >>= \i ->+                 return (sLL happy_var_1 happy_var_4 (mj AnnImport happy_var_1 : (fst $ unLoc happy_var_4),i)))}}}})+	) (\r -> happyReturn (happyIn143 r))++happyReduce_326 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_326 = happyMonadReduce 3# 127# happyReduction_326+happyReduction_326 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> +	case happyOut146 happy_x_3 of { (HappyWrap146 happy_var_3) -> +	( do { d <- mkImport happy_var_2 (noLoc PlaySafe) (snd $ unLoc happy_var_3);+                    return (sLL happy_var_1 happy_var_3 (mj AnnImport happy_var_1 : (fst $ unLoc happy_var_3),d)) })}}})+	) (\r -> happyReturn (happyIn143 r))++happyReduce_327 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_327 = happyMonadReduce 3# 127# happyReduction_327+happyReduction_327 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut144 happy_x_2 of { (HappyWrap144 happy_var_2) -> +	case happyOut146 happy_x_3 of { (HappyWrap146 happy_var_3) -> +	( mkExport happy_var_2 (snd $ unLoc happy_var_3) >>= \i ->+                  return (sLL happy_var_1 happy_var_3 (mj AnnExport happy_var_1 : (fst $ unLoc happy_var_3),i) ))}}})+	) (\r -> happyReturn (happyIn143 r))++happyReduce_328 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_328 = happySpecReduce_1  128# happyReduction_328+happyReduction_328 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn144+		 (sLL happy_var_1 happy_var_1 StdCallConv+	)}++happyReduce_329 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_329 = happySpecReduce_1  128# happyReduction_329+happyReduction_329 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn144+		 (sLL happy_var_1 happy_var_1 CCallConv+	)}++happyReduce_330 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_330 = happySpecReduce_1  128# happyReduction_330+happyReduction_330 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn144+		 (sLL happy_var_1 happy_var_1 CApiConv+	)}++happyReduce_331 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_331 = happySpecReduce_1  128# happyReduction_331+happyReduction_331 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn144+		 (sLL happy_var_1 happy_var_1 PrimCallConv+	)}++happyReduce_332 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_332 = happySpecReduce_1  128# happyReduction_332+happyReduction_332 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn144+		 (sLL happy_var_1 happy_var_1 JavaScriptCallConv+	)}++happyReduce_333 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_333 = happySpecReduce_1  129# happyReduction_333+happyReduction_333 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn145+		 (sLL happy_var_1 happy_var_1 PlayRisky+	)}++happyReduce_334 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_334 = happySpecReduce_1  129# happyReduction_334+happyReduction_334 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn145+		 (sLL happy_var_1 happy_var_1 PlaySafe+	)}++happyReduce_335 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_335 = happySpecReduce_1  129# happyReduction_335+happyReduction_335 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn145+		 (sLL happy_var_1 happy_var_1 PlayInterruptible+	)}++happyReduce_336 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_336 = happyReduce 4# 130# happyReduction_336+happyReduction_336 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut302 happy_x_2 of { (HappyWrap302 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut150 happy_x_4 of { (HappyWrap150 happy_var_4) -> +	happyIn146+		 (sLL happy_var_1 happy_var_4 ([mu AnnDcolon happy_var_3]+                                             ,(cL (getLoc happy_var_1)+                                                    (getStringLiteral happy_var_1), happy_var_2, mkLHsSigType happy_var_4))+	) `HappyStk` happyRest}}}}++happyReduce_337 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_337 = happySpecReduce_3  130# happyReduction_337+happyReduction_337 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut150 happy_x_3 of { (HappyWrap150 happy_var_3) -> +	happyIn146+		 (sLL happy_var_1 happy_var_3 ([mu AnnDcolon happy_var_2]+                                             ,(noLoc (StringLiteral NoSourceText nilFS), happy_var_1, mkLHsSigType happy_var_3))+	)}}}++happyReduce_338 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_338 = happySpecReduce_0  131# happyReduction_338+happyReduction_338  =  happyIn147+		 (([],Nothing)+	)++happyReduce_339 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_339 = happySpecReduce_2  131# happyReduction_339+happyReduction_339 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut149 happy_x_2 of { (HappyWrap149 happy_var_2) -> +	happyIn147+		 (([mu AnnDcolon happy_var_1],Just happy_var_2)+	)}}++happyReduce_340 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_340 = happySpecReduce_0  132# happyReduction_340+happyReduction_340  =  happyIn148+		 (([], Nothing)+	)++happyReduce_341 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_341 = happySpecReduce_2  132# happyReduction_341+happyReduction_341 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut282 happy_x_2 of { (HappyWrap282 happy_var_2) -> +	happyIn148+		 (([mu AnnDcolon happy_var_1], Just happy_var_2)+	)}}++happyReduce_342 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_342 = happySpecReduce_1  133# happyReduction_342+happyReduction_342 happy_x_1+	 =  case happyOut157 happy_x_1 of { (HappyWrap157 happy_var_1) -> +	happyIn149+		 (happy_var_1+	)}++happyReduce_343 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_343 = happySpecReduce_1  134# happyReduction_343+happyReduction_343 happy_x_1+	 =  case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> +	happyIn150+		 (happy_var_1+	)}++happyReduce_344 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_344 = happyMonadReduce 3# 135# happyReduction_344+happyReduction_344 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut151 happy_x_1 of { (HappyWrap151 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut302 happy_x_3 of { (HappyWrap302 happy_var_3) -> +	( addAnnotation (gl $ head $ unLoc happy_var_1)+                                                       AnnComma (gl happy_var_2)+                                         >> return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})+	) (\r -> happyReturn (happyIn151 r))++happyReduce_345 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_345 = happySpecReduce_1  135# happyReduction_345+happyReduction_345 happy_x_1+	 =  case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> +	happyIn151+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_346 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_346 = happySpecReduce_1  136# happyReduction_346+happyReduction_346 happy_x_1+	 =  case happyOut149 happy_x_1 of { (HappyWrap149 happy_var_1) -> +	happyIn152+		 (unitOL (mkLHsSigType happy_var_1)+	)}++happyReduce_347 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_347 = happyMonadReduce 3# 136# happyReduction_347+happyReduction_347 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut149 happy_x_1 of { (HappyWrap149 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut152 happy_x_3 of { (HappyWrap152 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)+                                >> return (unitOL (mkLHsSigType happy_var_1) `appOL` happy_var_3))}}})+	) (\r -> happyReturn (happyIn152 r))++happyReduce_348 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_348 = happySpecReduce_2  137# happyReduction_348+happyReduction_348 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn153+		 (sLL happy_var_1 happy_var_2 ([mo happy_var_1, mc happy_var_2], getUNPACK_PRAGs happy_var_1, SrcUnpack)+	)}}++happyReduce_349 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_349 = happySpecReduce_2  137# happyReduction_349+happyReduction_349 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn153+		 (sLL happy_var_1 happy_var_2 ([mo happy_var_1, mc happy_var_2], getNOUNPACK_PRAGs happy_var_1, SrcNoUnpack)+	)}}++happyReduce_350 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_350 = happySpecReduce_1  138# happyReduction_350+happyReduction_350 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn154+		 ((mj AnnDot happy_var_1,    ForallInvis)+	)}++happyReduce_351 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_351 = happySpecReduce_1  138# happyReduction_351+happyReduction_351 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn154+		 ((mu AnnRarrow happy_var_1, ForallVis)+	)}++happyReduce_352 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_352 = happySpecReduce_1  139# happyReduction_352+happyReduction_352 happy_x_1+	 =  case happyOut157 happy_x_1 of { (HappyWrap157 happy_var_1) -> +	happyIn155+		 (happy_var_1+	)}++happyReduce_353 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_353 = happyMonadReduce 3# 139# happyReduction_353+happyReduction_353 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut157 happy_x_1 of { (HappyWrap157 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut181 happy_x_3 of { (HappyWrap181 happy_var_3) -> +	( ams (sLL happy_var_1 happy_var_3 $ HsKindSig noExtField happy_var_1 happy_var_3)+                                      [mu AnnDcolon happy_var_2])}}})+	) (\r -> happyReturn (happyIn155 r))++happyReduce_354 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_354 = happySpecReduce_1  140# happyReduction_354+happyReduction_354 happy_x_1+	 =  case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> +	happyIn156+		 (happy_var_1+	)}++happyReduce_355 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_355 = happyMonadReduce 3# 140# happyReduction_355+happyReduction_355 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut158 happy_x_1 of { (HappyWrap158 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut181 happy_x_3 of { (HappyWrap181 happy_var_3) -> +	( ams (sLL happy_var_1 happy_var_3 $ HsKindSig noExtField happy_var_1 happy_var_3)+                                      [mu AnnDcolon happy_var_2])}}})+	) (\r -> happyReturn (happyIn156 r))++happyReduce_356 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_356 = happyMonadReduce 4# 141# happyReduction_356+happyReduction_356 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> +	case happyOut154 happy_x_3 of { (HappyWrap154 happy_var_3) -> +	case happyOut157 happy_x_4 of { (HappyWrap157 happy_var_4) -> +	( let (fv_ann, fv_flag) = happy_var_3 in+                                           hintExplicitForall happy_var_1 *>+                                           ams (sLL happy_var_1 happy_var_4 $+                                                HsForAllTy { hst_fvf = fv_flag+                                                           , hst_bndrs = happy_var_2+                                                           , hst_xforall = noExtField+                                                           , hst_body = happy_var_4 })+                                               [mu AnnForall happy_var_1,fv_ann])}}}})+	) (\r -> happyReturn (happyIn157 r))++happyReduce_357 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_357 = happyMonadReduce 3# 141# happyReduction_357+happyReduction_357 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut157 happy_x_3 of { (HappyWrap157 happy_var_3) -> +	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)+                                         >> return (sLL happy_var_1 happy_var_3 $+                                            HsQualTy { hst_ctxt = happy_var_1+                                                     , hst_xqual = noExtField+                                                     , hst_body = happy_var_3 }))}}})+	) (\r -> happyReturn (happyIn157 r))++happyReduce_358 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_358 = happyMonadReduce 3# 141# happyReduction_358+happyReduction_358 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	( ams (sLL happy_var_1 happy_var_3 (HsIParamTy noExtField happy_var_1 happy_var_3))+                                             [mu AnnDcolon happy_var_2])}}})+	) (\r -> happyReturn (happyIn157 r))++happyReduce_359 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_359 = happySpecReduce_1  141# happyReduction_359+happyReduction_359 happy_x_1+	 =  case happyOut161 happy_x_1 of { (HappyWrap161 happy_var_1) -> +	happyIn157+		 (happy_var_1+	)}++happyReduce_360 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_360 = happyMonadReduce 4# 142# happyReduction_360+happyReduction_360 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> +	case happyOut154 happy_x_3 of { (HappyWrap154 happy_var_3) -> +	case happyOut158 happy_x_4 of { (HappyWrap158 happy_var_4) -> +	( let (fv_ann, fv_flag) = happy_var_3 in+                                            hintExplicitForall happy_var_1 *>+                                            ams (sLL happy_var_1 happy_var_4 $+                                                 HsForAllTy { hst_fvf = fv_flag+                                                            , hst_bndrs = happy_var_2+                                                            , hst_xforall = noExtField+                                                            , hst_body = happy_var_4 })+                                                [mu AnnForall happy_var_1,fv_ann])}}}})+	) (\r -> happyReturn (happyIn158 r))++happyReduce_361 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_361 = happyMonadReduce 3# 142# happyReduction_361+happyReduction_361 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut159 happy_x_1 of { (HappyWrap159 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> +	( addAnnotation (gl happy_var_1) (toUnicodeAnn AnnDarrow happy_var_2) (gl happy_var_2)+                                         >> return (sLL happy_var_1 happy_var_3 $+                                            HsQualTy { hst_ctxt = happy_var_1+                                                     , hst_xqual = noExtField+                                                     , hst_body = happy_var_3 }))}}})+	) (\r -> happyReturn (happyIn158 r))++happyReduce_362 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_362 = happyMonadReduce 3# 142# happyReduction_362+happyReduction_362 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut161 happy_x_3 of { (HappyWrap161 happy_var_3) -> +	( ams (sLL happy_var_1 happy_var_3 (HsIParamTy noExtField happy_var_1 happy_var_3))+                                             [mu AnnDcolon happy_var_2])}}})+	) (\r -> happyReturn (happyIn158 r))++happyReduce_363 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_363 = happySpecReduce_1  142# happyReduction_363+happyReduction_363 happy_x_1+	 =  case happyOut162 happy_x_1 of { (HappyWrap162 happy_var_1) -> +	happyIn158+		 (happy_var_1+	)}++happyReduce_364 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_364 = happyMonadReduce 1# 143# happyReduction_364+happyReduction_364 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> +	( do { (anns,ctx) <- checkContext happy_var_1+                                                ; if null (unLoc ctx)+                                                   then addAnnotation (gl happy_var_1) AnnUnit (gl happy_var_1)+                                                   else return ()+                                                ; ams ctx anns+                                                })})+	) (\r -> happyReturn (happyIn159 r))++happyReduce_365 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_365 = happyMonadReduce 1# 144# happyReduction_365+happyReduction_365 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut163 happy_x_1 of { (HappyWrap163 happy_var_1) -> +	( do { (anns,ctx) <- checkContext happy_var_1+                                                ; if null (unLoc ctx)+                                                   then addAnnotation (gl happy_var_1) AnnUnit (gl happy_var_1)+                                                   else return ()+                                                ; ams ctx anns+                                                })})+	) (\r -> happyReturn (happyIn160 r))++happyReduce_366 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_366 = happySpecReduce_1  145# happyReduction_366+happyReduction_366 happy_x_1+	 =  case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> +	happyIn161+		 (happy_var_1+	)}++happyReduce_367 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_367 = happyMonadReduce 3# 145# happyReduction_367+happyReduction_367 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut157 happy_x_3 of { (HappyWrap157 happy_var_3) -> +	( ams happy_var_1 [mu AnnRarrow happy_var_2] -- See note [GADT decl discards annotations]+                                       >> ams (sLL happy_var_1 happy_var_3 $ HsFunTy noExtField happy_var_1 happy_var_3)+                                              [mu AnnRarrow happy_var_2])}}})+	) (\r -> happyReturn (happyIn161 r))++happyReduce_368 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_368 = happySpecReduce_1  146# happyReduction_368+happyReduction_368 happy_x_1+	 =  case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> +	happyIn162+		 (happy_var_1+	)}++happyReduce_369 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_369 = happySpecReduce_2  146# happyReduction_369+happyReduction_369 happy_x_2+	happy_x_1+	 =  case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> +	case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> +	happyIn162+		 (sLL happy_var_1 happy_var_2 $ HsDocTy noExtField happy_var_1 happy_var_2+	)}}++happyReduce_370 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_370 = happySpecReduce_2  146# happyReduction_370+happyReduction_370 happy_x_2+	happy_x_1+	 =  case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> +	case happyOut166 happy_x_2 of { (HappyWrap166 happy_var_2) -> +	happyIn162+		 (sLL happy_var_1 happy_var_2 $ HsDocTy noExtField happy_var_2 happy_var_1+	)}}++happyReduce_371 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_371 = happyMonadReduce 3# 146# happyReduction_371+happyReduction_371 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut158 happy_x_3 of { (HappyWrap158 happy_var_3) -> +	( ams happy_var_1 [mu AnnRarrow happy_var_2] -- See note [GADT decl discards annotations]+                                         >> ams (sLL happy_var_1 happy_var_3 $ HsFunTy noExtField happy_var_1 happy_var_3)+                                                [mu AnnRarrow happy_var_2])}}})+	) (\r -> happyReturn (happyIn162 r))++happyReduce_372 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_372 = happyMonadReduce 4# 146# happyReduction_372+happyReduction_372 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut166 happy_x_1 of { (HappyWrap166 happy_var_1) -> +	case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut158 happy_x_4 of { (HappyWrap158 happy_var_4) -> +	( ams happy_var_1 [mu AnnRarrow happy_var_3] -- See note [GADT decl discards annotations]+                                         >> ams (sLL happy_var_1 happy_var_4 $+                                                 HsFunTy noExtField (cL (comb2 happy_var_1 happy_var_2)+                                                            (HsDocTy noExtField happy_var_1 happy_var_2))+                                                         happy_var_4)+                                                [mu AnnRarrow happy_var_3])}}}})+	) (\r -> happyReturn (happyIn162 r))++happyReduce_373 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_373 = happyMonadReduce 4# 146# happyReduction_373+happyReduction_373 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> +	case happyOut166 happy_x_2 of { (HappyWrap166 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut158 happy_x_4 of { (HappyWrap158 happy_var_4) -> +	( ams happy_var_2 [mu AnnRarrow happy_var_3] -- See note [GADT decl discards annotations]+                                         >> ams (sLL happy_var_1 happy_var_4 $+                                                 HsFunTy noExtField (cL (comb2 happy_var_1 happy_var_2)+                                                            (HsDocTy noExtField happy_var_2 happy_var_1))+                                                         happy_var_4)+                                                [mu AnnRarrow happy_var_3])}}}})+	) (\r -> happyReturn (happyIn162 r))++happyReduce_374 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_374 = happyMonadReduce 1# 147# happyReduction_374+happyReduction_374 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> +	( mergeOps (unLoc happy_var_1))})+	) (\r -> happyReturn (happyIn163 r))++happyReduce_375 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_375 = happySpecReduce_1  148# happyReduction_375+happyReduction_375 happy_x_1+	 =  case happyOut165 happy_x_1 of { (HappyWrap165 happy_var_1) -> +	happyIn164+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_376 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_376 = happySpecReduce_2  148# happyReduction_376+happyReduction_376 happy_x_2+	happy_x_1+	 =  case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> +	case happyOut165 happy_x_2 of { (HappyWrap165 happy_var_2) -> +	happyIn164+		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : (unLoc happy_var_1)+	)}}++happyReduce_377 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_377 = happySpecReduce_1  149# happyReduction_377+happyReduction_377 happy_x_1+	 =  case happyOut168 happy_x_1 of { (HappyWrap168 happy_var_1) -> +	happyIn165+		 (happy_var_1+	)}++happyReduce_378 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_378 = happySpecReduce_1  149# happyReduction_378+happyReduction_378 happy_x_1+	 =  case happyOut324 happy_x_1 of { (HappyWrap324 happy_var_1) -> +	happyIn165+		 (sL1 happy_var_1 $ TyElDocPrev (unLoc happy_var_1)+	)}++happyReduce_379 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_379 = happyMonadReduce 1# 150# happyReduction_379+happyReduction_379 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut167 happy_x_1 of { (HappyWrap167 happy_var_1) -> +	( mergeOps happy_var_1)})+	) (\r -> happyReturn (happyIn166 r))++happyReduce_380 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_380 = happySpecReduce_1  151# happyReduction_380+happyReduction_380 happy_x_1+	 =  case happyOut168 happy_x_1 of { (HappyWrap168 happy_var_1) -> +	happyIn167+		 ([happy_var_1]+	)}++happyReduce_381 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_381 = happySpecReduce_2  151# happyReduction_381+happyReduction_381 happy_x_2+	happy_x_1+	 =  case happyOut167 happy_x_1 of { (HappyWrap167 happy_var_1) -> +	case happyOut168 happy_x_2 of { (HappyWrap168 happy_var_2) -> +	happyIn167+		 (happy_var_2 : happy_var_1+	)}}++happyReduce_382 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_382 = happySpecReduce_1  152# happyReduction_382+happyReduction_382 happy_x_1+	 =  case happyOut169 happy_x_1 of { (HappyWrap169 happy_var_1) -> +	happyIn168+		 (sL1 happy_var_1 $ TyElOpd (unLoc happy_var_1)+	)}++happyReduce_383 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_383 = happySpecReduce_2  152# happyReduction_383+happyReduction_383 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut169 happy_x_2 of { (HappyWrap169 happy_var_2) -> +	happyIn168+		 (sLL happy_var_1 happy_var_2 $ (TyElKindApp (comb2 happy_var_1 happy_var_2) happy_var_2)+	)}}++happyReduce_384 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_384 = happySpecReduce_1  152# happyReduction_384+happyReduction_384 happy_x_1+	 =  case happyOut286 happy_x_1 of { (HappyWrap286 happy_var_1) -> +	happyIn168+		 (sL1 happy_var_1 $ if isBangRdr (unLoc happy_var_1) then TyElBang else+                                                   if isTildeRdr (unLoc happy_var_1) then TyElTilde else+                                                   TyElOpr (unLoc happy_var_1)+	)}++happyReduce_385 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_385 = happySpecReduce_1  152# happyReduction_385+happyReduction_385 happy_x_1+	 =  case happyOut300 happy_x_1 of { (HappyWrap300 happy_var_1) -> +	happyIn168+		 (sL1 happy_var_1 $ TyElOpr (unLoc happy_var_1)+	)}++happyReduce_386 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_386 = happyMonadReduce 2# 152# happyReduction_386+happyReduction_386 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut281 happy_x_2 of { (HappyWrap281 happy_var_2) -> +	( ams (sLL happy_var_1 happy_var_2 $ TyElOpr (unLoc happy_var_2))+                                               [mj AnnSimpleQuote happy_var_1,mj AnnVal happy_var_2])}})+	) (\r -> happyReturn (happyIn168 r))++happyReduce_387 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_387 = happyMonadReduce 2# 152# happyReduction_387+happyReduction_387 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut293 happy_x_2 of { (HappyWrap293 happy_var_2) -> +	( ams (sLL happy_var_1 happy_var_2 $ TyElOpr (unLoc happy_var_2))+                                               [mj AnnSimpleQuote happy_var_1,mj AnnVal happy_var_2])}})+	) (\r -> happyReturn (happyIn168 r))++happyReduce_388 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_388 = happySpecReduce_1  152# happyReduction_388+happyReduction_388 happy_x_1+	 =  case happyOut153 happy_x_1 of { (HappyWrap153 happy_var_1) -> +	happyIn168+		 (sL1 happy_var_1 $ TyElUnpackedness (unLoc happy_var_1)+	)}++happyReduce_389 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_389 = happySpecReduce_1  153# happyReduction_389+happyReduction_389 happy_x_1+	 =  case happyOut283 happy_x_1 of { (HappyWrap283 happy_var_1) -> +	happyIn169+		 (sL1 happy_var_1 (HsTyVar noExtField NotPromoted happy_var_1)+	)}++happyReduce_390 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_390 = happySpecReduce_1  153# happyReduction_390+happyReduction_390 happy_x_1+	 =  case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> +	happyIn169+		 (sL1 happy_var_1 (HsTyVar noExtField NotPromoted happy_var_1)+	)}++happyReduce_391 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_391 = happyMonadReduce 1# 153# happyReduction_391+happyReduction_391 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( do { warnStarIsType (getLoc happy_var_1)+                                               ; return $ sL1 happy_var_1 (HsStarTy noExtField (isUnicode happy_var_1)) })})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_392 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_392 = happyMonadReduce 3# 153# happyReduction_392+happyReduction_392 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut191 happy_x_2 of { (HappyWrap191 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( amms (checkRecordSyntax+                                                    (sLL happy_var_1 happy_var_3 $ HsRecTy noExtField happy_var_2))+                                                        -- Constructor sigs only+                                                 [moc happy_var_1,mcc happy_var_3])}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_393 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_393 = happyMonadReduce 2# 153# happyReduction_393+happyReduction_393 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 $ HsTupleTy noExtField+                                                    HsBoxedOrConstraintTuple [])+                                                [mop happy_var_1,mcp happy_var_2])}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_394 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_394 = happyMonadReduce 5# 153# happyReduction_394+happyReduction_394 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut155 happy_x_2 of { (HappyWrap155 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut173 happy_x_4 of { (HappyWrap173 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	( addAnnotation (gl happy_var_2) AnnComma+                                                          (gl happy_var_3) >>+                                            ams (sLL happy_var_1 happy_var_5 $ HsTupleTy noExtField++                                             HsBoxedOrConstraintTuple (happy_var_2 : happy_var_4))+                                                [mop happy_var_1,mcp happy_var_5])}}}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_395 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_395 = happyMonadReduce 2# 153# happyReduction_395+happyReduction_395 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 $ HsTupleTy noExtField HsUnboxedTuple [])+                                             [mo happy_var_1,mc happy_var_2])}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_396 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_396 = happyMonadReduce 3# 153# happyReduction_396+happyReduction_396 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut173 happy_x_2 of { (HappyWrap173 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ HsTupleTy noExtField HsUnboxedTuple happy_var_2)+                                             [mo happy_var_1,mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_397 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_397 = happyMonadReduce 3# 153# happyReduction_397+happyReduction_397 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut174 happy_x_2 of { (HappyWrap174 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ HsSumTy noExtField happy_var_2)+                                             [mo happy_var_1,mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_398 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_398 = happyMonadReduce 3# 153# happyReduction_398+happyReduction_398 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut155 happy_x_2 of { (HappyWrap155 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ HsListTy  noExtField happy_var_2) [mos happy_var_1,mcs happy_var_3])}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_399 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_399 = happyMonadReduce 3# 153# happyReduction_399+happyReduction_399 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut155 happy_x_2 of { (HappyWrap155 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ HsParTy   noExtField happy_var_2) [mop happy_var_1,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_400 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_400 = happySpecReduce_1  153# happyReduction_400+happyReduction_400 happy_x_1+	 =  case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> +	happyIn169+		 (mapLoc (HsSpliceTy noExtField) happy_var_1+	)}++happyReduce_401 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_401 = happySpecReduce_1  153# happyReduction_401+happyReduction_401 happy_x_1+	 =  case happyOut222 happy_x_1 of { (HappyWrap222 happy_var_1) -> +	happyIn169+		 (mapLoc (HsSpliceTy noExtField) happy_var_1+	)}++happyReduce_402 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_402 = happyMonadReduce 2# 153# happyReduction_402+happyReduction_402 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut273 happy_x_2 of { (HappyWrap273 happy_var_2) -> +	( ams (sLL happy_var_1 happy_var_2 $ HsTyVar noExtField IsPromoted happy_var_2) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_403 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_403 = happyMonadReduce 6# 153# happyReduction_403+happyReduction_403 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut155 happy_x_3 of { (HappyWrap155 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut173 happy_x_5 of { (HappyWrap173 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	( addAnnotation (gl happy_var_3) AnnComma (gl happy_var_4) >>+                                ams (sLL happy_var_1 happy_var_6 $ HsExplicitTupleTy noExtField (happy_var_3 : happy_var_5))+                                    [mj AnnSimpleQuote happy_var_1,mop happy_var_2,mcp happy_var_6])}}}}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_404 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_404 = happyMonadReduce 4# 153# happyReduction_404+happyReduction_404 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut172 happy_x_3 of { (HappyWrap172 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( ams (sLL happy_var_1 happy_var_4 $ HsExplicitListTy noExtField IsPromoted happy_var_3)+                                                       [mj AnnSimpleQuote happy_var_1,mos happy_var_2,mcs happy_var_4])}}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_405 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_405 = happyMonadReduce 2# 153# happyReduction_405+happyReduction_405 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut302 happy_x_2 of { (HappyWrap302 happy_var_2) -> +	( ams (sLL happy_var_1 happy_var_2 $ HsTyVar noExtField IsPromoted happy_var_2)+                                                       [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_406 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_406 = happyMonadReduce 5# 153# happyReduction_406+happyReduction_406 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut155 happy_x_2 of { (HappyWrap155 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut173 happy_x_4 of { (HappyWrap173 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	( addAnnotation (gl happy_var_2) AnnComma+                                                           (gl happy_var_3) >>+                                             ams (sLL happy_var_1 happy_var_5 $ HsExplicitListTy noExtField NotPromoted (happy_var_2 : happy_var_4))+                                                 [mos happy_var_1,mcs happy_var_5])}}}}})+	) (\r -> happyReturn (happyIn169 r))++happyReduce_407 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_407 = happySpecReduce_1  153# happyReduction_407+happyReduction_407 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn169+		 (sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsNumTy (getINTEGERs happy_var_1)+                                                           (il_value (getINTEGER happy_var_1))+	)}++happyReduce_408 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_408 = happySpecReduce_1  153# happyReduction_408+happyReduction_408 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn169+		 (sLL happy_var_1 happy_var_1 $ HsTyLit noExtField $ HsStrTy (getSTRINGs happy_var_1)+                                                                     (getSTRING  happy_var_1)+	)}++happyReduce_409 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_409 = happySpecReduce_1  153# happyReduction_409+happyReduction_409 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn169+		 (sL1 happy_var_1 $ mkAnonWildCardTy+	)}++happyReduce_410 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_410 = happySpecReduce_1  154# happyReduction_410+happyReduction_410 happy_x_1+	 =  case happyOut149 happy_x_1 of { (HappyWrap149 happy_var_1) -> +	happyIn170+		 (mkLHsSigType happy_var_1+	)}++happyReduce_411 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_411 = happySpecReduce_1  155# happyReduction_411+happyReduction_411 happy_x_1+	 =  case happyOut156 happy_x_1 of { (HappyWrap156 happy_var_1) -> +	happyIn171+		 ([mkLHsSigType happy_var_1]+	)}++happyReduce_412 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_412 = happyMonadReduce 3# 155# happyReduction_412+happyReduction_412 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut156 happy_x_1 of { (HappyWrap156 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut171 happy_x_3 of { (HappyWrap171 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)+                                           >> return (mkLHsSigType happy_var_1 : happy_var_3))}}})+	) (\r -> happyReturn (happyIn171 r))++happyReduce_413 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_413 = happySpecReduce_1  156# happyReduction_413+happyReduction_413 happy_x_1+	 =  case happyOut173 happy_x_1 of { (HappyWrap173 happy_var_1) -> +	happyIn172+		 (happy_var_1+	)}++happyReduce_414 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_414 = happySpecReduce_0  156# happyReduction_414+happyReduction_414  =  happyIn172+		 ([]+	)++happyReduce_415 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_415 = happySpecReduce_1  157# happyReduction_415+happyReduction_415 happy_x_1+	 =  case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> +	happyIn173+		 ([happy_var_1]+	)}++happyReduce_416 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_416 = happyMonadReduce 3# 157# happyReduction_416+happyReduction_416 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut173 happy_x_3 of { (HappyWrap173 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)+                                          >> return (happy_var_1 : happy_var_3))}}})+	) (\r -> happyReturn (happyIn173 r))++happyReduce_417 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_417 = happyMonadReduce 3# 158# happyReduction_417+happyReduction_417 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut155 happy_x_3 of { (HappyWrap155 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnVbar (gl happy_var_2)+                                          >> return [happy_var_1,happy_var_3])}}})+	) (\r -> happyReturn (happyIn174 r))++happyReduce_418 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_418 = happyMonadReduce 3# 158# happyReduction_418+happyReduction_418 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut155 happy_x_1 of { (HappyWrap155 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut174 happy_x_3 of { (HappyWrap174 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnVbar (gl happy_var_2)+                                          >> return (happy_var_1 : happy_var_3))}}})+	) (\r -> happyReturn (happyIn174 r))++happyReduce_419 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_419 = happySpecReduce_2  159# happyReduction_419+happyReduction_419 happy_x_2+	happy_x_1+	 =  case happyOut176 happy_x_1 of { (HappyWrap176 happy_var_1) -> +	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> +	happyIn175+		 (happy_var_1 : happy_var_2+	)}}++happyReduce_420 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_420 = happySpecReduce_0  159# happyReduction_420+happyReduction_420  =  happyIn175+		 ([]+	)++happyReduce_421 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_421 = happySpecReduce_1  160# happyReduction_421+happyReduction_421 happy_x_1+	 =  case happyOut299 happy_x_1 of { (HappyWrap299 happy_var_1) -> +	happyIn176+		 (sL1 happy_var_1 (UserTyVar noExtField happy_var_1)+	)}++happyReduce_422 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_422 = happyMonadReduce 5# 160# happyReduction_422+happyReduction_422 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut181 happy_x_4 of { (HappyWrap181 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	( ams (sLL happy_var_1 happy_var_5  (KindedTyVar noExtField happy_var_2 happy_var_4))+                                               [mop happy_var_1,mu AnnDcolon happy_var_3+                                               ,mcp happy_var_5])}}}}})+	) (\r -> happyReturn (happyIn176 r))++happyReduce_423 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_423 = happySpecReduce_0  161# happyReduction_423+happyReduction_423  =  happyIn177+		 (noLoc ([],[])+	)++happyReduce_424 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_424 = happySpecReduce_2  161# happyReduction_424+happyReduction_424 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut178 happy_x_2 of { (HappyWrap178 happy_var_2) -> +	happyIn177+		 ((sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]+                                                 ,reverse (unLoc happy_var_2)))+	)}}++happyReduce_425 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_425 = happyMonadReduce 3# 162# happyReduction_425+happyReduction_425 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut178 happy_x_1 of { (HappyWrap178 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut179 happy_x_3 of { (HappyWrap179 happy_var_3) -> +	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2)+                           >> return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})+	) (\r -> happyReturn (happyIn178 r))++happyReduce_426 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_426 = happySpecReduce_1  162# happyReduction_426+happyReduction_426 happy_x_1+	 =  case happyOut179 happy_x_1 of { (HappyWrap179 happy_var_1) -> +	happyIn178+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_427 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_427 = happyMonadReduce 3# 163# happyReduction_427+happyReduction_427 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut180 happy_x_1 of { (HappyWrap180 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut180 happy_x_3 of { (HappyWrap180 happy_var_3) -> +	( ams (cL (comb3 happy_var_1 happy_var_2 happy_var_3)+                                       (reverse (unLoc happy_var_1), reverse (unLoc happy_var_3)))+                                       [mu AnnRarrow happy_var_2])}}})+	) (\r -> happyReturn (happyIn179 r))++happyReduce_428 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_428 = happySpecReduce_0  164# happyReduction_428+happyReduction_428  =  happyIn180+		 (noLoc []+	)++happyReduce_429 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_429 = happySpecReduce_2  164# happyReduction_429+happyReduction_429 happy_x_2+	happy_x_1+	 =  case happyOut180 happy_x_1 of { (HappyWrap180 happy_var_1) -> +	case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> +	happyIn180+		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)+	)}}++happyReduce_430 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_430 = happySpecReduce_1  165# happyReduction_430+happyReduction_430 happy_x_1+	 =  case happyOut157 happy_x_1 of { (HappyWrap157 happy_var_1) -> +	happyIn181+		 (happy_var_1+	)}++happyReduce_431 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_431 = happyMonadReduce 4# 166# happyReduction_431+happyReduction_431 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut183 happy_x_3 of { (HappyWrap183 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( checkEmptyGADTs $+                                                      cL (comb2 happy_var_1 happy_var_3)+                                                        ([mj AnnWhere happy_var_1+                                                         ,moc happy_var_2+                                                         ,mcc happy_var_4]+                                                        , unLoc happy_var_3))}}}})+	) (\r -> happyReturn (happyIn182 r))++happyReduce_432 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_432 = happyMonadReduce 4# 166# happyReduction_432+happyReduction_432 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut183 happy_x_3 of { (HappyWrap183 happy_var_3) -> +	( checkEmptyGADTs $+                                                      cL (comb2 happy_var_1 happy_var_3)+                                                        ([mj AnnWhere happy_var_1]+                                                        , unLoc happy_var_3))}})+	) (\r -> happyReturn (happyIn182 r))++happyReduce_433 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_433 = happySpecReduce_0  166# happyReduction_433+happyReduction_433  =  happyIn182+		 (noLoc ([],[])+	)++happyReduce_434 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_434 = happyMonadReduce 3# 167# happyReduction_434+happyReduction_434 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut184 happy_x_1 of { (HappyWrap184 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut183 happy_x_3 of { (HappyWrap183 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnSemi (gl happy_var_2)+                     >> return (cL (comb2 happy_var_1 happy_var_3) (happy_var_1 : unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn183 r))++happyReduce_435 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_435 = happySpecReduce_1  167# happyReduction_435+happyReduction_435 happy_x_1+	 =  case happyOut184 happy_x_1 of { (HappyWrap184 happy_var_1) -> +	happyIn183+		 (cL (gl happy_var_1) [happy_var_1]+	)}++happyReduce_436 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_436 = happySpecReduce_0  167# happyReduction_436+happyReduction_436  =  happyIn183+		 (noLoc []+	)++happyReduce_437 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_437 = happyMonadReduce 3# 168# happyReduction_437+happyReduction_437 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut329 happy_x_1 of { (HappyWrap329 happy_var_1) -> +	case happyOut185 happy_x_3 of { (HappyWrap185 happy_var_3) -> +	( return $ addConDoc happy_var_3 happy_var_1)}})+	) (\r -> happyReturn (happyIn184 r))++happyReduce_438 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_438 = happyMonadReduce 1# 168# happyReduction_438+happyReduction_438 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut185 happy_x_1 of { (HappyWrap185 happy_var_1) -> +	( return happy_var_1)})+	) (\r -> happyReturn (happyIn184 r))++happyReduce_439 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_439 = happyMonadReduce 3# 169# happyReduction_439+happyReduction_439 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut277 happy_x_1 of { (HappyWrap277 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut150 happy_x_3 of { (HappyWrap150 happy_var_3) -> +	( let (gadt,anns) = mkGadtDecl (unLoc happy_var_1) happy_var_3+                   in ams (sLL happy_var_1 happy_var_3 gadt)+                       (mu AnnDcolon happy_var_2:anns))}}})+	) (\r -> happyReturn (happyIn185 r))++happyReduce_440 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_440 = happySpecReduce_3  170# happyReduction_440+happyReduction_440 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut329 happy_x_1 of { (HappyWrap329 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut187 happy_x_3 of { (HappyWrap187 happy_var_3) -> +	happyIn186+		 (cL (comb2 happy_var_2 happy_var_3) ([mj AnnEqual happy_var_2]+                                                     ,addConDocs (unLoc happy_var_3) happy_var_1)+	)}}}++happyReduce_441 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_441 = happyMonadReduce 5# 171# happyReduction_441+happyReduction_441 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut187 happy_x_1 of { (HappyWrap187 happy_var_1) -> +	case happyOut329 happy_x_2 of { (HappyWrap329 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut328 happy_x_4 of { (HappyWrap328 happy_var_4) -> +	case happyOut188 happy_x_5 of { (HappyWrap188 happy_var_5) -> +	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnVbar (gl happy_var_3)+               >> return (sLL happy_var_1 happy_var_5 (addConDoc happy_var_5 happy_var_2 : addConDocFirst (unLoc happy_var_1) happy_var_4)))}}}}})+	) (\r -> happyReturn (happyIn187 r))++happyReduce_442 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_442 = happySpecReduce_1  171# happyReduction_442+happyReduction_442 happy_x_1+	 =  case happyOut188 happy_x_1 of { (HappyWrap188 happy_var_1) -> +	happyIn187+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_443 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_443 = happyMonadReduce 5# 172# happyReduction_443+happyReduction_443 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut329 happy_x_1 of { (HappyWrap329 happy_var_1) -> +	case happyOut189 happy_x_2 of { (HappyWrap189 happy_var_2) -> +	case happyOut160 happy_x_3 of { (HappyWrap160 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut190 happy_x_5 of { (HappyWrap190 happy_var_5) -> +	( ams (let (con,details,doc_prev) = unLoc happy_var_5 in+                  addConDoc (cL (comb4 happy_var_2 happy_var_3 happy_var_4 happy_var_5) (mkConDeclH98 con+                                                       (snd $ unLoc happy_var_2)+                                                       (Just happy_var_3)+                                                       details))+                            (happy_var_1 `mplus` doc_prev))+                        (mu AnnDarrow happy_var_4:(fst $ unLoc happy_var_2)))}}}}})+	) (\r -> happyReturn (happyIn188 r))++happyReduce_444 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_444 = happyMonadReduce 3# 172# happyReduction_444+happyReduction_444 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut329 happy_x_1 of { (HappyWrap329 happy_var_1) -> +	case happyOut189 happy_x_2 of { (HappyWrap189 happy_var_2) -> +	case happyOut190 happy_x_3 of { (HappyWrap190 happy_var_3) -> +	( ams ( let (con,details,doc_prev) = unLoc happy_var_3 in+                  addConDoc (cL (comb2 happy_var_2 happy_var_3) (mkConDeclH98 con+                                                      (snd $ unLoc happy_var_2)+                                                      Nothing   -- No context+                                                      details))+                            (happy_var_1 `mplus` doc_prev))+                       (fst $ unLoc happy_var_2))}}})+	) (\r -> happyReturn (happyIn188 r))++happyReduce_445 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_445 = happySpecReduce_3  173# happyReduction_445+happyReduction_445 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut175 happy_x_2 of { (HappyWrap175 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn189+		 (sLL happy_var_1 happy_var_3 ([mu AnnForall happy_var_1,mj AnnDot happy_var_3], Just happy_var_2)+	)}}}++happyReduce_446 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_446 = happySpecReduce_0  173# happyReduction_446+happyReduction_446  =  happyIn189+		 (noLoc ([], Nothing)+	)++happyReduce_447 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_447 = happyMonadReduce 1# 174# happyReduction_447+happyReduction_447 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut164 happy_x_1 of { (HappyWrap164 happy_var_1) -> +	( do { c <- mergeDataCon (unLoc happy_var_1)+                                                 ; return $ sL1 happy_var_1 c })})+	) (\r -> happyReturn (happyIn190 r))++happyReduce_448 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_448 = happySpecReduce_0  175# happyReduction_448+happyReduction_448  =  happyIn191+		 ([]+	)++happyReduce_449 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_449 = happySpecReduce_1  175# happyReduction_449+happyReduction_449 happy_x_1+	 =  case happyOut192 happy_x_1 of { (HappyWrap192 happy_var_1) -> +	happyIn191+		 (happy_var_1+	)}++happyReduce_450 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_450 = happyMonadReduce 5# 176# happyReduction_450+happyReduction_450 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut193 happy_x_1 of { (HappyWrap193 happy_var_1) -> +	case happyOut329 happy_x_2 of { (HappyWrap329 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut328 happy_x_4 of { (HappyWrap328 happy_var_4) -> +	case happyOut192 happy_x_5 of { (HappyWrap192 happy_var_5) -> +	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_3) >>+               return ((addFieldDoc happy_var_1 happy_var_4) : addFieldDocs happy_var_5 happy_var_2))}}}}})+	) (\r -> happyReturn (happyIn192 r))++happyReduce_451 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_451 = happySpecReduce_1  176# happyReduction_451+happyReduction_451 happy_x_1+	 =  case happyOut193 happy_x_1 of { (HappyWrap193 happy_var_1) -> +	happyIn192+		 ([happy_var_1]+	)}++happyReduce_452 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_452 = happyMonadReduce 5# 177# happyReduction_452+happyReduction_452 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut329 happy_x_1 of { (HappyWrap329 happy_var_1) -> +	case happyOut151 happy_x_2 of { (HappyWrap151 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut157 happy_x_4 of { (HappyWrap157 happy_var_4) -> +	case happyOut328 happy_x_5 of { (HappyWrap328 happy_var_5) -> +	( ams (cL (comb2 happy_var_2 happy_var_4)+                      (ConDeclField noExtField (reverse (map (\ln@(dL->L l n) -> cL l $ FieldOcc noExtField ln) (unLoc happy_var_2))) happy_var_4 (happy_var_1 `mplus` happy_var_5)))+                   [mu AnnDcolon happy_var_3])}}}}})+	) (\r -> happyReturn (happyIn193 r))++happyReduce_453 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_453 = happySpecReduce_0  178# happyReduction_453+happyReduction_453  =  happyIn194+		 (noLoc []+	)++happyReduce_454 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_454 = happySpecReduce_1  178# happyReduction_454+happyReduction_454 happy_x_1+	 =  case happyOut195 happy_x_1 of { (HappyWrap195 happy_var_1) -> +	happyIn194+		 (happy_var_1+	)}++happyReduce_455 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_455 = happySpecReduce_2  179# happyReduction_455+happyReduction_455 happy_x_2+	happy_x_1+	 =  case happyOut195 happy_x_1 of { (HappyWrap195 happy_var_1) -> +	case happyOut196 happy_x_2 of { (HappyWrap196 happy_var_2) -> +	happyIn195+		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1+	)}}++happyReduce_456 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_456 = happySpecReduce_1  179# happyReduction_456+happyReduction_456 happy_x_1+	 =  case happyOut196 happy_x_1 of { (HappyWrap196 happy_var_1) -> +	happyIn195+		 (sLL happy_var_1 happy_var_1 [happy_var_1]+	)}++happyReduce_457 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_457 = happyMonadReduce 2# 180# happyReduction_457+happyReduction_457 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut197 happy_x_2 of { (HappyWrap197 happy_var_2) -> +	( let { full_loc = comb2 happy_var_1 happy_var_2 }+                 in ams (cL full_loc $ HsDerivingClause noExtField Nothing happy_var_2)+                        [mj AnnDeriving happy_var_1])}})+	) (\r -> happyReturn (happyIn196 r))++happyReduce_458 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_458 = happyMonadReduce 3# 180# happyReduction_458+happyReduction_458 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut84 happy_x_2 of { (HappyWrap84 happy_var_2) -> +	case happyOut197 happy_x_3 of { (HappyWrap197 happy_var_3) -> +	( let { full_loc = comb2 happy_var_1 happy_var_3 }+                 in ams (cL full_loc $ HsDerivingClause noExtField (Just happy_var_2) happy_var_3)+                        [mj AnnDeriving happy_var_1])}}})+	) (\r -> happyReturn (happyIn196 r))++happyReduce_459 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_459 = happyMonadReduce 3# 180# happyReduction_459+happyReduction_459 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut197 happy_x_2 of { (HappyWrap197 happy_var_2) -> +	case happyOut85 happy_x_3 of { (HappyWrap85 happy_var_3) -> +	( let { full_loc = comb2 happy_var_1 happy_var_3 }+                 in ams (cL full_loc $ HsDerivingClause noExtField (Just happy_var_3) happy_var_2)+                        [mj AnnDeriving happy_var_1])}}})+	) (\r -> happyReturn (happyIn196 r))++happyReduce_460 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_460 = happySpecReduce_1  181# happyReduction_460+happyReduction_460 happy_x_1+	 =  case happyOut288 happy_x_1 of { (HappyWrap288 happy_var_1) -> +	happyIn197+		 (sL1 happy_var_1 [mkLHsSigType happy_var_1]+	)}++happyReduce_461 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_461 = happyMonadReduce 2# 181# happyReduction_461+happyReduction_461 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 [])+                                     [mop happy_var_1,mcp happy_var_2])}})+	) (\r -> happyReturn (happyIn197 r))++happyReduce_462 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_462 = happyMonadReduce 3# 181# happyReduction_462+happyReduction_462 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut171 happy_x_2 of { (HappyWrap171 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 happy_var_2)+                                     [mop happy_var_1,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn197 r))++happyReduce_463 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_463 = happySpecReduce_1  182# happyReduction_463+happyReduction_463 happy_x_1+	 =  case happyOut199 happy_x_1 of { (HappyWrap199 happy_var_1) -> +	happyIn198+		 (sL1 happy_var_1 (DocD noExtField (unLoc happy_var_1))+	)}++happyReduce_464 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_464 = happySpecReduce_1  183# happyReduction_464+happyReduction_464 happy_x_1+	 =  case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> +	happyIn199+		 (sL1 happy_var_1 (DocCommentNext (unLoc happy_var_1))+	)}++happyReduce_465 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_465 = happySpecReduce_1  183# happyReduction_465+happyReduction_465 happy_x_1+	 =  case happyOut324 happy_x_1 of { (HappyWrap324 happy_var_1) -> +	happyIn199+		 (sL1 happy_var_1 (DocCommentPrev (unLoc happy_var_1))+	)}++happyReduce_466 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_466 = happySpecReduce_1  183# happyReduction_466+happyReduction_466 happy_x_1+	 =  case happyOut325 happy_x_1 of { (HappyWrap325 happy_var_1) -> +	happyIn199+		 (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> DocCommentNamed n doc)+	)}++happyReduce_467 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_467 = happySpecReduce_1  183# happyReduction_467+happyReduction_467 happy_x_1+	 =  case happyOut326 happy_x_1 of { (HappyWrap326 happy_var_1) -> +	happyIn199+		 (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> DocGroup n doc)+	)}++happyReduce_468 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_468 = happySpecReduce_1  184# happyReduction_468+happyReduction_468 happy_x_1+	 =  case happyOut205 happy_x_1 of { (HappyWrap205 happy_var_1) -> +	happyIn200+		 (happy_var_1+	)}++happyReduce_469 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_469 = happyMonadReduce 3# 184# happyReduction_469+happyReduction_469 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	case happyOut202 happy_x_3 of { (HappyWrap202 happy_var_3) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                   do { let { e = patBuilderBang (getLoc happy_var_1) happy_var_2+                                            ; l = comb2 happy_var_1 happy_var_3 };+                                        (ann, r) <- checkValDef SrcStrict e Nothing happy_var_3 ;+                                        runPV $ hintBangPat (comb2 happy_var_1 happy_var_2) (unLoc e) ;+                                        -- Depending upon what the pattern looks like we might get either+                                        -- a FunBind or PatBind back from checkValDef. See Note+                                        -- [FunBind vs PatBind]+                                        case r of {+                                          (FunBind _ n _ _ _) ->+                                                amsL l [mj AnnFunId n] >> return () ;+                                          (PatBind _ (dL->L l _) _rhs _) ->+                                                amsL l [] >> return () } ;++                                        _ <- amsL l (ann ++ fst (unLoc happy_var_3) ++ [mj AnnBang happy_var_1]) ;+                                        return $! (sL l $ ValD noExtField r) })}}})+	) (\r -> happyReturn (happyIn200 r))++happyReduce_470 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_470 = happyMonadReduce 3# 184# happyReduction_470+happyReduction_470 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut211 happy_x_1 of { (HappyWrap211 happy_var_1) -> +	case happyOut147 happy_x_2 of { (HappyWrap147 happy_var_2) -> +	case happyOut202 happy_x_3 of { (HappyWrap202 happy_var_3) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                       do { (ann,r) <- checkValDef NoSrcStrict happy_var_1 (snd happy_var_2) happy_var_3;+                                        let { l = comb2 happy_var_1 happy_var_3 };+                                        -- Depending upon what the pattern looks like we might get either+                                        -- a FunBind or PatBind back from checkValDef. See Note+                                        -- [FunBind vs PatBind]+                                        case r of {+                                          (FunBind _ n _ _ _) ->+                                                amsL l (mj AnnFunId n:(fst happy_var_2)) >> return () ;+                                          (PatBind _ (dL->L lh _lhs) _rhs _) ->+                                                amsL lh (fst happy_var_2) >> return () } ;+                                        _ <- amsL l (ann ++ (fst $ unLoc happy_var_3));+                                        return $! (sL l $ ValD noExtField r) })}}})+	) (\r -> happyReturn (happyIn200 r))++happyReduce_471 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_471 = happySpecReduce_1  184# happyReduction_471+happyReduction_471 happy_x_1+	 =  case happyOut111 happy_x_1 of { (HappyWrap111 happy_var_1) -> +	happyIn200+		 (happy_var_1+	)}++happyReduce_472 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_472 = happySpecReduce_1  184# happyReduction_472+happyReduction_472 happy_x_1+	 =  case happyOut198 happy_x_1 of { (HappyWrap198 happy_var_1) -> +	happyIn200+		 (happy_var_1+	)}++happyReduce_473 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_473 = happySpecReduce_1  185# happyReduction_473+happyReduction_473 happy_x_1+	 =  case happyOut200 happy_x_1 of { (HappyWrap200 happy_var_1) -> +	happyIn201+		 (happy_var_1+	)}++happyReduce_474 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_474 = happySpecReduce_1  185# happyReduction_474+happyReduction_474 happy_x_1+	 =  case happyOut221 happy_x_1 of { (HappyWrap221 happy_var_1) -> +	happyIn201+		 (sLL happy_var_1 happy_var_1 $ mkSpliceDecl happy_var_1+	)}++happyReduce_475 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_475 = happyMonadReduce 3# 186# happyReduction_475+happyReduction_475 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOut128 happy_x_3 of { (HappyWrap128 happy_var_3) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 -> return $+                                  sL (comb3 happy_var_1 happy_var_2 happy_var_3)+                                    ((mj AnnEqual happy_var_1 : (fst $ unLoc happy_var_3))+                                    ,GRHSs noExtField (unguardedRHS (comb3 happy_var_1 happy_var_2 happy_var_3) happy_var_2)+                                   (snd $ unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn202 r))++happyReduce_476 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_476 = happySpecReduce_2  186# happyReduction_476+happyReduction_476 happy_x_2+	happy_x_1+	 =  case happyOut203 happy_x_1 of { (HappyWrap203 happy_var_1) -> +	case happyOut128 happy_x_2 of { (HappyWrap128 happy_var_2) -> +	happyIn202+		 (sLL happy_var_1 happy_var_2  (fst $ unLoc happy_var_2+                                    ,GRHSs noExtField (reverse (unLoc happy_var_1))+                                                    (snd $ unLoc happy_var_2))+	)}}++happyReduce_477 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_477 = happySpecReduce_2  187# happyReduction_477+happyReduction_477 happy_x_2+	happy_x_1+	 =  case happyOut203 happy_x_1 of { (HappyWrap203 happy_var_1) -> +	case happyOut204 happy_x_2 of { (HappyWrap204 happy_var_2) -> +	happyIn203+		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)+	)}}++happyReduce_478 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_478 = happySpecReduce_1  187# happyReduction_478+happyReduction_478 happy_x_1+	 =  case happyOut204 happy_x_1 of { (HappyWrap204 happy_var_1) -> +	happyIn203+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_479 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_479 = happyMonadReduce 4# 188# happyReduction_479+happyReduction_479 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut238 happy_x_2 of { (HappyWrap238 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	( runECP_P happy_var_4 >>= \ happy_var_4 ->+                                     ams (sL (comb2 happy_var_1 happy_var_4) $ GRHS noExtField (unLoc happy_var_2) happy_var_4)+                                         [mj AnnVbar happy_var_1,mj AnnEqual happy_var_3])}}}})+	) (\r -> happyReturn (happyIn204 r))++happyReduce_480 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_480 = happyMonadReduce 3# 189# happyReduction_480+happyReduction_480 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut211 happy_x_1 of { (HappyWrap211 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut150 happy_x_3 of { (HappyWrap150 happy_var_3) -> +	( do { happy_var_1 <- runECP_P happy_var_1+                              ; v <- checkValSigLhs happy_var_1+                              ; _ <- amsL (comb2 happy_var_1 happy_var_3) [mu AnnDcolon happy_var_2]+                              ; return (sLL happy_var_1 happy_var_3 $ SigD noExtField $+                                  TypeSig noExtField [v] (mkLHsSigWcType happy_var_3))})}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_481 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_481 = happyMonadReduce 5# 189# happyReduction_481+happyReduction_481 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut151 happy_x_3 of { (HappyWrap151 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut150 happy_x_5 of { (HappyWrap150 happy_var_5) -> +	( do { let sig = TypeSig noExtField (happy_var_1 : reverse (unLoc happy_var_3))+                                     (mkLHsSigWcType happy_var_5)+                 ; addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)+                 ; ams ( sLL happy_var_1 happy_var_5 $ SigD noExtField sig )+                       [mu AnnDcolon happy_var_4] })}}}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_482 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_482 = happyMonadReduce 3# 189# happyReduction_482+happyReduction_482 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut73 happy_x_1 of { (HappyWrap73 happy_var_1) -> +	case happyOut72 happy_x_2 of { (HappyWrap72 happy_var_2) -> +	case happyOut74 happy_x_3 of { (HappyWrap74 happy_var_3) -> +	( checkPrecP happy_var_2 happy_var_3 >>+                 ams (sLL happy_var_1 happy_var_3 $ SigD noExtField+                        (FixSig noExtField (FixitySig noExtField (fromOL $ unLoc happy_var_3)+                                (Fixity (fst $ unLoc happy_var_2) (snd $ unLoc happy_var_2) (unLoc happy_var_1)))))+                     [mj AnnInfix happy_var_1,mj AnnVal happy_var_2])}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_483 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_483 = happySpecReduce_1  189# happyReduction_483+happyReduction_483 happy_x_1+	 =  case happyOut116 happy_x_1 of { (HappyWrap116 happy_var_1) -> +	happyIn205+		 (sLL happy_var_1 happy_var_1 . SigD noExtField . unLoc $ happy_var_1+	)}++happyReduce_484 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_484 = happyMonadReduce 4# 189# happyReduction_484+happyReduction_484 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut277 happy_x_2 of { (HappyWrap277 happy_var_2) -> +	case happyOut148 happy_x_3 of { (HappyWrap148 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( let (dcolon, tc) = happy_var_3+                   in ams+                       (sLL happy_var_1 happy_var_4+                         (SigD noExtField (CompleteMatchSig noExtField (getCOMPLETE_PRAGs happy_var_1) happy_var_2 tc)))+                    ([ mo happy_var_1 ] ++ dcolon ++ [mc happy_var_4]))}}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_485 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_485 = happyMonadReduce 4# 189# happyReduction_485+happyReduction_485 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> +	case happyOut303 happy_x_3 of { (HappyWrap303 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( ams ((sLL happy_var_1 happy_var_4 $ SigD noExtField (InlineSig noExtField happy_var_3+                            (mkInlinePragma (getINLINE_PRAGs happy_var_1) (getINLINE happy_var_1)+                                            (snd happy_var_2)))))+                       ((mo happy_var_1:fst happy_var_2) ++ [mc happy_var_4]))}}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_486 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_486 = happyMonadReduce 3# 189# happyReduction_486+happyReduction_486 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut303 happy_x_2 of { (HappyWrap303 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (SigD noExtField (SCCFunSig noExtField (getSCC_PRAGs happy_var_1) happy_var_2 Nothing)))+                 [mo happy_var_1, mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_487 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_487 = happyMonadReduce 4# 189# happyReduction_487+happyReduction_487 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut303 happy_x_2 of { (HappyWrap303 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( do { scc <- getSCC happy_var_3+                ; let str_lit = StringLiteral (getSTRINGs happy_var_3) scc+                ; ams (sLL happy_var_1 happy_var_4 (SigD noExtField (SCCFunSig noExtField (getSCC_PRAGs happy_var_1) happy_var_2 (Just ( sL1 happy_var_3 str_lit)))))+                      [mo happy_var_1, mc happy_var_4] })}}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_488 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_488 = happyMonadReduce 6# 189# happyReduction_488+happyReduction_488 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> +	case happyOut303 happy_x_3 of { (HappyWrap303 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut152 happy_x_5 of { (HappyWrap152 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	( ams (+                 let inl_prag = mkInlinePragma (getSPEC_PRAGs happy_var_1)+                                             (NoUserInline, FunLike) (snd happy_var_2)+                  in sLL happy_var_1 happy_var_6 $ SigD noExtField (SpecSig noExtField happy_var_3 (fromOL happy_var_5) inl_prag))+                    (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)))}}}}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_489 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_489 = happyMonadReduce 6# 189# happyReduction_489+happyReduction_489 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut206 happy_x_2 of { (HappyWrap206 happy_var_2) -> +	case happyOut303 happy_x_3 of { (HappyWrap303 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut152 happy_x_5 of { (HappyWrap152 happy_var_5) -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	( ams (sLL happy_var_1 happy_var_6 $ SigD noExtField (SpecSig noExtField happy_var_3 (fromOL happy_var_5)+                               (mkInlinePragma (getSPEC_INLINE_PRAGs happy_var_1)+                                               (getSPEC_INLINE happy_var_1) (snd happy_var_2))))+                       (mo happy_var_1:mu AnnDcolon happy_var_4:mc happy_var_6:(fst happy_var_2)))}}}}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_490 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_490 = happyMonadReduce 4# 189# happyReduction_490+happyReduction_490 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut170 happy_x_3 of { (HappyWrap170 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( ams (sLL happy_var_1 happy_var_4+                                  $ SigD noExtField (SpecInstSig noExtField (getSPEC_PRAGs happy_var_1) happy_var_3))+                       [mo happy_var_1,mj AnnInstance happy_var_2,mc happy_var_4])}}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_491 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_491 = happyMonadReduce 3# 189# happyReduction_491+happyReduction_491 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut266 happy_x_2 of { (HappyWrap266 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ SigD noExtField (MinimalSig noExtField (getMINIMAL_PRAGs happy_var_1) happy_var_2))+                   [mo happy_var_1,mc happy_var_3])}}})+	) (\r -> happyReturn (happyIn205 r))++happyReduce_492 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_492 = happySpecReduce_0  190# happyReduction_492+happyReduction_492  =  happyIn206+		 (([],Nothing)+	)++happyReduce_493 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_493 = happySpecReduce_1  190# happyReduction_493+happyReduction_493 happy_x_1+	 =  case happyOut207 happy_x_1 of { (HappyWrap207 happy_var_1) -> +	happyIn206+		 ((fst happy_var_1,Just (snd happy_var_1))+	)}++happyReduce_494 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_494 = happySpecReduce_3  191# happyReduction_494+happyReduction_494 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn207+		 (([mj AnnOpenS happy_var_1,mj AnnVal happy_var_2,mj AnnCloseS happy_var_3]+                                  ,ActiveAfter  (getINTEGERs happy_var_2) (fromInteger (il_value (getINTEGER happy_var_2))))+	)}}}++happyReduce_495 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_495 = happyReduce 4# 191# happyReduction_495+happyReduction_495 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn207+		 (([mj AnnOpenS happy_var_1,mj AnnTilde happy_var_2,mj AnnVal happy_var_3+                                                 ,mj AnnCloseS happy_var_4]+                                  ,ActiveBefore (getINTEGERs happy_var_3) (fromInteger (il_value (getINTEGER happy_var_3))))+	) `HappyStk` happyRest}}}}++happyReduce_496 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_496 = happySpecReduce_1  192# happyReduction_496+happyReduction_496 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn208+		 (let { loc = getLoc happy_var_1+                                ; ITquasiQuote (quoter, quote, quoteSpan) = unLoc happy_var_1+                                ; quoterId = mkUnqual varName quoter }+                            in sL1 happy_var_1 (mkHsQuasiQuote quoterId (RealSrcSpan quoteSpan) quote)+	)}++happyReduce_497 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_497 = happySpecReduce_1  192# happyReduction_497+happyReduction_497 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn208+		 (let { loc = getLoc happy_var_1+                                ; ITqQuasiQuote (qual, quoter, quote, quoteSpan) = unLoc happy_var_1+                                ; quoterId = mkQual varName (qual, quoter) }+                            in sL (getLoc happy_var_1) (mkHsQuasiQuote quoterId (RealSrcSpan quoteSpan) quote)+	)}++happyReduce_498 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_498 = happySpecReduce_3  193# happyReduction_498+happyReduction_498 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut149 happy_x_3 of { (HappyWrap149 happy_var_3) -> +	happyIn209+		 (ECP $+                                   runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                   amms (mkHsTySigPV (comb2 happy_var_1 happy_var_3) happy_var_1 happy_var_3)+                                       [mu AnnDcolon happy_var_2]+	)}}}++happyReduce_499 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_499 = happyMonadReduce 3# 193# happyReduction_499+happyReduction_499 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                   runECP_P happy_var_3 >>= \ happy_var_3 ->+                                   fmap ecpFromCmd $+                                   ams (sLL happy_var_1 happy_var_3 $ HsCmdArrApp noExtField happy_var_1 happy_var_3+                                                        HsFirstOrderApp True)+                                       [mu Annlarrowtail happy_var_2])}}})+	) (\r -> happyReturn (happyIn209 r))++happyReduce_500 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_500 = happyMonadReduce 3# 193# happyReduction_500+happyReduction_500 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                   runECP_P happy_var_3 >>= \ happy_var_3 ->+                                   fmap ecpFromCmd $+                                   ams (sLL happy_var_1 happy_var_3 $ HsCmdArrApp noExtField happy_var_3 happy_var_1+                                                      HsFirstOrderApp False)+                                       [mu Annrarrowtail happy_var_2])}}})+	) (\r -> happyReturn (happyIn209 r))++happyReduce_501 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_501 = happyMonadReduce 3# 193# happyReduction_501+happyReduction_501 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                   runECP_P happy_var_3 >>= \ happy_var_3 ->+                                   fmap ecpFromCmd $+                                   ams (sLL happy_var_1 happy_var_3 $ HsCmdArrApp noExtField happy_var_1 happy_var_3+                                                      HsHigherOrderApp True)+                                       [mu AnnLarrowtail happy_var_2])}}})+	) (\r -> happyReturn (happyIn209 r))++happyReduce_502 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_502 = happyMonadReduce 3# 193# happyReduction_502+happyReduction_502 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                   runECP_P happy_var_3 >>= \ happy_var_3 ->+                                   fmap ecpFromCmd $+                                   ams (sLL happy_var_1 happy_var_3 $ HsCmdArrApp noExtField happy_var_3 happy_var_1+                                                      HsHigherOrderApp False)+                                       [mu AnnRarrowtail happy_var_2])}}})+	) (\r -> happyReturn (happyIn209 r))++happyReduce_503 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_503 = happySpecReduce_1  193# happyReduction_503+happyReduction_503 happy_x_1+	 =  case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	happyIn209+		 (happy_var_1+	)}++happyReduce_504 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_504 = happySpecReduce_1  194# happyReduction_504+happyReduction_504 happy_x_1+	 =  case happyOut213 happy_x_1 of { (HappyWrap213 happy_var_1) -> +	happyIn210+		 (happy_var_1+	)}++happyReduce_505 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_505 = happySpecReduce_3  194# happyReduction_505+happyReduction_505 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	case happyOut294 happy_x_2 of { (HappyWrap294 happy_var_2) -> +	case happyOut213 happy_x_3 of { (HappyWrap213 happy_var_3) -> +	happyIn210+		 (ECP $+                                 superInfixOp $+                                 happy_var_2 >>= \ happy_var_2 ->+                                 runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                 runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                 amms (mkHsOpAppPV (comb2 happy_var_1 happy_var_3) happy_var_1 happy_var_2 happy_var_3)+                                     [mj AnnVal happy_var_2]+	)}}}++happyReduce_506 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_506 = happySpecReduce_1  195# happyReduction_506+happyReduction_506 happy_x_1+	 =  case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> +	happyIn211+		 (happy_var_1+	)}++happyReduce_507 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_507 = happySpecReduce_3  195# happyReduction_507+happyReduction_507 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut211 happy_x_1 of { (HappyWrap211 happy_var_1) -> +	case happyOut294 happy_x_2 of { (HappyWrap294 happy_var_2) -> +	case happyOut212 happy_x_3 of { (HappyWrap212 happy_var_3) -> +	happyIn211+		 (ECP $+                                         superInfixOp $+                                         happy_var_2 >>= \ happy_var_2 ->+                                         runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                         runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                         amms (mkHsOpAppPV (comb2 happy_var_1 happy_var_3) happy_var_1 happy_var_2 happy_var_3)+                                              [mj AnnVal happy_var_2]+	)}}}++happyReduce_508 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_508 = happySpecReduce_2  196# happyReduction_508+happyReduction_508 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut217 happy_x_2 of { (HappyWrap217 happy_var_2) -> +	happyIn212+		 (ECP $+                                           runECP_PV happy_var_2 >>= \ happy_var_2 ->+                                           amms (mkHsNegAppPV (comb2 happy_var_1 happy_var_2) happy_var_2)+                                               [mj AnnMinus happy_var_1]+	)}}++happyReduce_509 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_509 = happyMonadReduce 2# 196# happyReduction_509+happyReduction_509 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut216 happy_x_1 of { (HappyWrap216 happy_var_1) -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                  fmap ecpFromExp $+                                  ams (sLL happy_var_1 happy_var_2 $ HsTickPragma noExtField (snd $ fst $ fst $ unLoc happy_var_1)+                                                                (snd $ fst $ unLoc happy_var_1) (snd $ unLoc happy_var_1) happy_var_2)+                                      (fst $ fst $ fst $ unLoc happy_var_1))}})+	) (\r -> happyReturn (happyIn212 r))++happyReduce_510 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_510 = happyMonadReduce 4# 196# happyReduction_510+happyReduction_510 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	( runECP_P happy_var_4 >>= \ happy_var_4 ->+                                          fmap ecpFromExp $+                                          ams (sLL happy_var_1 happy_var_4 $ HsCoreAnn noExtField (getCORE_PRAGs happy_var_1) (getStringLiteral happy_var_2) happy_var_4)+                                              [mo happy_var_1,mj AnnVal happy_var_2+                                              ,mc happy_var_3])}}}})+	) (\r -> happyReturn (happyIn212 r))++happyReduce_511 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_511 = happySpecReduce_1  196# happyReduction_511+happyReduction_511 happy_x_1+	 =  case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> +	happyIn212+		 (happy_var_1+	)}++happyReduce_512 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_512 = happySpecReduce_1  197# happyReduction_512+happyReduction_512 happy_x_1+	 =  case happyOut212 happy_x_1 of { (HappyWrap212 happy_var_1) -> +	happyIn213+		 (happy_var_1+	)}++happyReduce_513 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_513 = happyMonadReduce 2# 197# happyReduction_513+happyReduction_513 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut215 happy_x_1 of { (HappyWrap215 happy_var_1) -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                  fmap ecpFromExp $+                                  ams (sLL happy_var_1 happy_var_2 $ HsSCC noExtField (snd $ fst $ unLoc happy_var_1) (snd $ unLoc happy_var_1) happy_var_2)+                                      (fst $ fst $ unLoc happy_var_1))}})+	) (\r -> happyReturn (happyIn213 r))++happyReduce_514 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_514 = happySpecReduce_1  198# happyReduction_514+happyReduction_514 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn214+		 (([happy_var_1],True)+	)}++happyReduce_515 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_515 = happySpecReduce_0  198# happyReduction_515+happyReduction_515  =  happyIn214+		 (([],False)+	)++happyReduce_516 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_516 = happyMonadReduce 3# 199# happyReduction_516+happyReduction_516 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( do scc <- getSCC happy_var_2+                                            ; return $ sLL happy_var_1 happy_var_3+                                               (([mo happy_var_1,mj AnnValStr happy_var_2+                                                ,mc happy_var_3],getSCC_PRAGs happy_var_1),(StringLiteral (getSTRINGs happy_var_2) scc)))}}})+	) (\r -> happyReturn (happyIn215 r))++happyReduce_517 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_517 = happySpecReduce_3  199# happyReduction_517+happyReduction_517 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn215+		 (sLL happy_var_1 happy_var_3 (([mo happy_var_1,mj AnnVal happy_var_2+                                         ,mc happy_var_3],getSCC_PRAGs happy_var_1)+                                        ,(StringLiteral NoSourceText (getVARID happy_var_2)))+	)}}}++happyReduce_518 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_518 = happyReduce 10# 200# happyReduction_518+happyReduction_518 (happy_x_10 `HappyStk`+	happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	case happyOutTok happy_x_6 of { happy_var_6 -> +	case happyOutTok happy_x_7 of { happy_var_7 -> +	case happyOutTok happy_x_8 of { happy_var_8 -> +	case happyOutTok happy_x_9 of { happy_var_9 -> +	case happyOutTok happy_x_10 of { happy_var_10 -> +	happyIn216+		 (sLL happy_var_1 happy_var_10 $ ((([mo happy_var_1,mj AnnVal happy_var_2+                                              ,mj AnnVal happy_var_3,mj AnnColon happy_var_4+                                              ,mj AnnVal happy_var_5,mj AnnMinus happy_var_6+                                              ,mj AnnVal happy_var_7,mj AnnColon happy_var_8+                                              ,mj AnnVal happy_var_9,mc happy_var_10],+                                                getGENERATED_PRAGs happy_var_1)+                                              ,((getStringLiteral happy_var_2)+                                               ,( fromInteger $ il_value $ getINTEGER happy_var_3+                                                , fromInteger $ il_value $ getINTEGER happy_var_5+                                                )+                                               ,( fromInteger $ il_value $ getINTEGER happy_var_7+                                                , fromInteger $ il_value $ getINTEGER happy_var_9+                                                )+                                               ))+                                             , (( getINTEGERs happy_var_3+                                                , getINTEGERs happy_var_5+                                                )+                                               ,( getINTEGERs happy_var_7+                                                , getINTEGERs happy_var_9+                                                )))+	) `HappyStk` happyRest}}}}}}}}}}++happyReduce_519 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_519 = happySpecReduce_2  201# happyReduction_519+happyReduction_519 happy_x_2+	happy_x_1+	 =  case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	happyIn217+		 (ECP $+                                          superFunArg $+                                          runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                          runECP_PV happy_var_2 >>= \ happy_var_2 ->+                                          mkHsAppPV (comb2 happy_var_1 happy_var_2) happy_var_1 happy_var_2+	)}}++happyReduce_520 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_520 = happyMonadReduce 3# 201# happyReduction_520+happyReduction_520 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut217 happy_x_1 of { (HappyWrap217 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut169 happy_x_3 of { (HappyWrap169 happy_var_3) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                        runPV (checkExpBlockArguments happy_var_1) >>= \_ ->+                                        fmap ecpFromExp $+                                        ams (sLL happy_var_1 happy_var_3 $ HsAppType noExtField happy_var_1 (mkHsWildCardBndrs happy_var_3))+                                            [mj AnnAt happy_var_2])}}})+	) (\r -> happyReturn (happyIn217 r))++happyReduce_521 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_521 = happyMonadReduce 2# 201# happyReduction_521+happyReduction_521 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                        fmap ecpFromExp $+                                        ams (sLL happy_var_1 happy_var_2 $ HsStatic noExtField happy_var_2)+                                            [mj AnnStatic happy_var_1])}})+	) (\r -> happyReturn (happyIn217 r))++happyReduce_522 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_522 = happySpecReduce_1  201# happyReduction_522+happyReduction_522 happy_x_1+	 =  case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> +	happyIn217+		 (happy_var_1+	)}++happyReduce_523 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_523 = happySpecReduce_3  202# happyReduction_523+happyReduction_523 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut218 happy_x_3 of { (HappyWrap218 happy_var_3) -> +	happyIn218+		 (ECP $+                                   runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                   amms (mkHsAsPatPV (comb2 happy_var_1 happy_var_3) happy_var_1 happy_var_3) [mj AnnAt happy_var_2]+	)}}}++happyReduce_524 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_524 = happySpecReduce_2  202# happyReduction_524+happyReduction_524 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	happyIn218+		 (ECP $+                                   runECP_PV happy_var_2 >>= \ happy_var_2 ->+                                   amms (mkHsLazyPatPV (comb2 happy_var_1 happy_var_2) happy_var_2) [mj AnnTilde happy_var_1]+	)}}++happyReduce_525 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_525 = happyReduce 5# 202# happyReduction_525+happyReduction_525 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut251 happy_x_2 of { (HappyWrap251 happy_var_2) -> +	case happyOut252 happy_x_3 of { (HappyWrap252 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut209 happy_x_5 of { (HappyWrap209 happy_var_5) -> +	happyIn218+		 (ECP $+                      runECP_PV happy_var_5 >>= \ happy_var_5 ->+                      amms (mkHsLamPV (comb2 happy_var_1 happy_var_5) (mkMatchGroup FromSource+                            [sLL happy_var_1 happy_var_5 $ Match { m_ext = noExtField+                                               , m_ctxt = LambdaExpr+                                               , m_pats = happy_var_2:happy_var_3+                                               , m_grhss = unguardedGRHSs happy_var_5 }]))+                          [mj AnnLam happy_var_1, mu AnnRarrow happy_var_4]+	) `HappyStk` happyRest}}}}}++happyReduce_526 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_526 = happyReduce 4# 202# happyReduction_526+happyReduction_526 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut127 happy_x_2 of { (HappyWrap127 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	happyIn218+		 (ECP $+                                           runECP_PV happy_var_4 >>= \ happy_var_4 ->+                                           amms (mkHsLetPV (comb2 happy_var_1 happy_var_4) (snd (unLoc happy_var_2)) happy_var_4)+                                               (mj AnnLet happy_var_1:mj AnnIn happy_var_3+                                                 :(fst $ unLoc happy_var_2))+	) `HappyStk` happyRest}}}}++happyReduce_527 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_527 = happyMonadReduce 3# 202# happyReduction_527+happyReduction_527 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut240 happy_x_3 of { (HappyWrap240 happy_var_3) -> +	( runPV happy_var_3 >>= \ happy_var_3 ->+               fmap ecpFromExp $+               ams (sLL happy_var_1 happy_var_3 $ HsLamCase noExtField+                                   (mkMatchGroup FromSource (snd $ unLoc happy_var_3)))+                   (mj AnnLam happy_var_1:mj AnnCase happy_var_2:(fst $ unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn218 r))++happyReduce_528 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_528 = happyMonadReduce 8# 202# happyReduction_528+happyReduction_528 (happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOut214 happy_x_3 of { (HappyWrap214 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut209 happy_x_5 of { (HappyWrap209 happy_var_5) -> +	case happyOut214 happy_x_6 of { (HappyWrap214 happy_var_6) -> +	case happyOutTok happy_x_7 of { happy_var_7 -> +	case happyOut209 happy_x_8 of { (HappyWrap209 happy_var_8) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                            return $ ECP $+                              runECP_PV happy_var_5 >>= \ happy_var_5 ->+                              runECP_PV happy_var_8 >>= \ happy_var_8 ->+                              amms (mkHsIfPV (comb2 happy_var_1 happy_var_8) happy_var_2 (snd happy_var_3) happy_var_5 (snd happy_var_6) happy_var_8)+                                  (mj AnnIf happy_var_1:mj AnnThen happy_var_4+                                     :mj AnnElse happy_var_7+                                     :(map (\l -> mj AnnSemi l) (fst happy_var_3))+                                    ++(map (\l -> mj AnnSemi l) (fst happy_var_6))))}}}}}}}})+	) (\r -> happyReturn (happyIn218 r))++happyReduce_529 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_529 = happyMonadReduce 2# 202# happyReduction_529+happyReduction_529 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut247 happy_x_2 of { (HappyWrap247 happy_var_2) -> +	( hintMultiWayIf (getLoc happy_var_1) >>= \_ ->+                                           fmap ecpFromExp $+                                           ams (sLL happy_var_1 happy_var_2 $ HsMultiIf noExtField+                                                     (reverse $ snd $ unLoc happy_var_2))+                                               (mj AnnIf happy_var_1:(fst $ unLoc happy_var_2)))}})+	) (\r -> happyReturn (happyIn218 r))++happyReduce_530 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_530 = happyMonadReduce 4# 202# happyReduction_530+happyReduction_530 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut240 happy_x_4 of { (HappyWrap240 happy_var_4) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                         return $ ECP $+                                           happy_var_4 >>= \ happy_var_4 ->+                                           amms (mkHsCasePV (comb3 happy_var_1 happy_var_3 happy_var_4) happy_var_2 (mkMatchGroup+                                                   FromSource (snd $ unLoc happy_var_4)))+                                               (mj AnnCase happy_var_1:mj AnnOf happy_var_3+                                                  :(fst $ unLoc happy_var_4)))}}}})+	) (\r -> happyReturn (happyIn218 r))++happyReduce_531 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_531 = happySpecReduce_2  202# happyReduction_531+happyReduction_531 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut253 happy_x_2 of { (HappyWrap253 happy_var_2) -> +	happyIn218+		 (ECP $+                                        happy_var_2 >>= \ happy_var_2 ->+                                        amms (mkHsDoPV (comb2 happy_var_1 happy_var_2) (mapLoc snd happy_var_2))+                                               (mj AnnDo happy_var_1:(fst $ unLoc happy_var_2))+	)}}++happyReduce_532 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_532 = happyMonadReduce 2# 202# happyReduction_532+happyReduction_532 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut253 happy_x_2 of { (HappyWrap253 happy_var_2) -> +	( runPV happy_var_2 >>= \ happy_var_2 ->+                                       fmap ecpFromExp $+                                       ams (cL (comb2 happy_var_1 happy_var_2)+                                              (mkHsDo MDoExpr (snd $ unLoc happy_var_2)))+                                           (mj AnnMdo happy_var_1:(fst $ unLoc happy_var_2)))}})+	) (\r -> happyReturn (happyIn218 r))++happyReduce_533 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_533 = happyMonadReduce 4# 202# happyReduction_533+happyReduction_533 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	( (checkPattern <=< runECP_P) happy_var_2 >>= \ p ->+                           runECP_P happy_var_4 >>= \ happy_var_4@cmd ->+                           fmap ecpFromExp $+                           ams (sLL happy_var_1 happy_var_4 $ HsProc noExtField p (sLL happy_var_1 happy_var_4 $ HsCmdTop noExtField cmd))+                                            -- TODO: is LL right here?+                               [mj AnnProc happy_var_1,mu AnnRarrow happy_var_3])}}}})+	) (\r -> happyReturn (happyIn218 r))++happyReduce_534 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_534 = happySpecReduce_1  202# happyReduction_534+happyReduction_534 happy_x_1+	 =  case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> +	happyIn218+		 (happy_var_1+	)}++happyReduce_535 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_535 = happyReduce 4# 203# happyReduction_535+happyReduction_535 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut219 happy_x_1 of { (HappyWrap219 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut259 happy_x_3 of { (HappyWrap259 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn219+		 (ECP $+                                  runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                  happy_var_3 >>= \ happy_var_3 ->+                                  amms (mkHsRecordPV (comb2 happy_var_1 happy_var_4) (comb2 happy_var_2 happy_var_4) happy_var_1 (snd happy_var_3))+                                       (moc happy_var_2:mcc happy_var_4:(fst happy_var_3))+	) `HappyStk` happyRest}}}}++happyReduce_536 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_536 = happySpecReduce_1  203# happyReduction_536+happyReduction_536 happy_x_1+	 =  case happyOut220 happy_x_1 of { (HappyWrap220 happy_var_1) -> +	happyIn219+		 (happy_var_1+	)}++happyReduce_537 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_537 = happySpecReduce_1  204# happyReduction_537+happyReduction_537 happy_x_1+	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> +	happyIn220+		 (ECP $ mkHsVarPV $! happy_var_1+	)}++happyReduce_538 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_538 = happySpecReduce_1  204# happyReduction_538+happyReduction_538 happy_x_1+	 =  case happyOut274 happy_x_1 of { (HappyWrap274 happy_var_1) -> +	happyIn220+		 (ECP $ mkHsVarPV $! happy_var_1+	)}++happyReduce_539 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_539 = happySpecReduce_1  204# happyReduction_539+happyReduction_539 happy_x_1+	 =  case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> +	happyIn220+		 (ecpFromExp $ sL1 happy_var_1 (HsIPVar noExtField $! unLoc happy_var_1)+	)}++happyReduce_540 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_540 = happySpecReduce_1  204# happyReduction_540+happyReduction_540 happy_x_1+	 =  case happyOut265 happy_x_1 of { (HappyWrap265 happy_var_1) -> +	happyIn220+		 (ecpFromExp $ sL1 happy_var_1 (HsOverLabel noExtField Nothing $! unLoc happy_var_1)+	)}++happyReduce_541 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_541 = happySpecReduce_1  204# happyReduction_541+happyReduction_541 happy_x_1+	 =  case happyOut317 happy_x_1 of { (HappyWrap317 happy_var_1) -> +	happyIn220+		 (ECP $ mkHsLitPV $! happy_var_1+	)}++happyReduce_542 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_542 = happySpecReduce_1  204# happyReduction_542+happyReduction_542 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn220+		 (ECP $ mkHsOverLitPV (sL1 happy_var_1 $ mkHsIntegral   (getINTEGER  happy_var_1))+	)}++happyReduce_543 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_543 = happySpecReduce_1  204# happyReduction_543+happyReduction_543 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn220+		 (ECP $ mkHsOverLitPV (sL1 happy_var_1 $ mkHsFractional (getRATIONAL happy_var_1))+	)}++happyReduce_544 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_544 = happySpecReduce_3  204# happyReduction_544+happyReduction_544 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut228 happy_x_2 of { (HappyWrap228 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn220+		 (ECP $+                                           runECP_PV happy_var_2 >>= \ happy_var_2 ->+                                           amms (mkHsParPV (comb2 happy_var_1 happy_var_3) happy_var_2) [mop happy_var_1,mcp happy_var_3]+	)}}}++happyReduce_545 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_545 = happySpecReduce_3  204# happyReduction_545+happyReduction_545 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut229 happy_x_2 of { (HappyWrap229 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn220+		 (ECP $+                                           happy_var_2 >>= \ happy_var_2 ->+                                           amms (mkSumOrTuplePV (comb2 happy_var_1 happy_var_3) Boxed (snd happy_var_2))+                                                ((mop happy_var_1:fst happy_var_2) ++ [mcp happy_var_3])+	)}}}++happyReduce_546 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_546 = happySpecReduce_3  204# happyReduction_546+happyReduction_546 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut228 happy_x_2 of { (HappyWrap228 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn220+		 (ECP $+                                           runECP_PV happy_var_2 >>= \ happy_var_2 ->+                                           amms (mkSumOrTuplePV (comb2 happy_var_1 happy_var_3) Unboxed (Tuple [cL (gl happy_var_2) (Just happy_var_2)]))+                                                [mo happy_var_1,mc happy_var_3]+	)}}}++happyReduce_547 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_547 = happySpecReduce_3  204# happyReduction_547+happyReduction_547 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut229 happy_x_2 of { (HappyWrap229 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn220+		 (ECP $+                                           happy_var_2 >>= \ happy_var_2 ->+                                           amms (mkSumOrTuplePV (comb2 happy_var_1 happy_var_3) Unboxed (snd happy_var_2))+                                                ((mo happy_var_1:fst happy_var_2) ++ [mc happy_var_3])+	)}}}++happyReduce_548 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_548 = happySpecReduce_3  204# happyReduction_548+happyReduction_548 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut232 happy_x_2 of { (HappyWrap232 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn220+		 (ECP $ happy_var_2 (comb2 happy_var_1 happy_var_3) >>= \a -> ams a [mos happy_var_1,mcs happy_var_3]+	)}}}++happyReduce_549 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_549 = happySpecReduce_1  204# happyReduction_549+happyReduction_549 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn220+		 (ECP $ mkHsWildCardPV (getLoc happy_var_1)+	)}++happyReduce_550 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_550 = happySpecReduce_1  204# happyReduction_550+happyReduction_550 happy_x_1+	 =  case happyOut222 happy_x_1 of { (HappyWrap222 happy_var_1) -> +	happyIn220+		 (ECP $ mkHsSplicePV happy_var_1+	)}++happyReduce_551 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_551 = happySpecReduce_1  204# happyReduction_551+happyReduction_551 happy_x_1+	 =  case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> +	happyIn220+		 (ecpFromExp $ mapLoc (HsSpliceE noExtField) happy_var_1+	)}++happyReduce_552 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_552 = happyMonadReduce 2# 204# happyReduction_552+happyReduction_552 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut303 happy_x_2 of { (HappyWrap303 happy_var_2) -> +	( fmap ecpFromExp $ ams (sLL happy_var_1 happy_var_2 $ HsBracket noExtField (VarBr noExtField True  (unLoc happy_var_2))) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_553 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_553 = happyMonadReduce 2# 204# happyReduction_553+happyReduction_553 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut274 happy_x_2 of { (HappyWrap274 happy_var_2) -> +	( fmap ecpFromExp $ ams (sLL happy_var_1 happy_var_2 $ HsBracket noExtField (VarBr noExtField True  (unLoc happy_var_2))) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_554 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_554 = happyMonadReduce 2# 204# happyReduction_554+happyReduction_554 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut299 happy_x_2 of { (HappyWrap299 happy_var_2) -> +	( fmap ecpFromExp $ ams (sLL happy_var_1 happy_var_2 $ HsBracket noExtField (VarBr noExtField False (unLoc happy_var_2))) [mj AnnThTyQuote happy_var_1,mj AnnName happy_var_2])}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_555 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_555 = happyMonadReduce 2# 204# happyReduction_555+happyReduction_555 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut282 happy_x_2 of { (HappyWrap282 happy_var_2) -> +	( fmap ecpFromExp $ ams (sLL happy_var_1 happy_var_2 $ HsBracket noExtField (VarBr noExtField False (unLoc happy_var_2))) [mj AnnThTyQuote happy_var_1,mj AnnName happy_var_2])}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_556 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_556 = happyMonadReduce 1# 204# happyReduction_556+happyReduction_556 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( reportEmptyDoubleQuotes (getLoc happy_var_1))})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_557 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_557 = happyMonadReduce 3# 204# happyReduction_557+happyReduction_557 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                 fmap ecpFromExp $+                                 ams (sLL happy_var_1 happy_var_3 $ HsBracket noExtField (ExpBr noExtField happy_var_2))+                                      (if (hasE happy_var_1) then [mj AnnOpenE happy_var_1, mu AnnCloseQ happy_var_3]+                                                    else [mu AnnOpenEQ happy_var_1,mu AnnCloseQ happy_var_3]))}}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_558 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_558 = happyMonadReduce 3# 204# happyReduction_558+happyReduction_558 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                 fmap ecpFromExp $+                                 ams (sLL happy_var_1 happy_var_3 $ HsBracket noExtField (TExpBr noExtField happy_var_2))+                                      (if (hasE happy_var_1) then [mj AnnOpenE happy_var_1,mc happy_var_3] else [mo happy_var_1,mc happy_var_3]))}}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_559 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_559 = happyMonadReduce 3# 204# happyReduction_559+happyReduction_559 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut155 happy_x_2 of { (HappyWrap155 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( fmap ecpFromExp $+                                 ams (sLL happy_var_1 happy_var_3 $ HsBracket noExtField (TypBr noExtField happy_var_2)) [mo happy_var_1,mu AnnCloseQ happy_var_3])}}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_560 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_560 = happyMonadReduce 3# 204# happyReduction_560+happyReduction_560 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut210 happy_x_2 of { (HappyWrap210 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( (checkPattern <=< runECP_P) happy_var_2 >>= \p ->+                                      fmap ecpFromExp $+                                      ams (sLL happy_var_1 happy_var_3 $ HsBracket noExtField (PatBr noExtField p))+                                          [mo happy_var_1,mu AnnCloseQ happy_var_3])}}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_561 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_561 = happyMonadReduce 3# 204# happyReduction_561+happyReduction_561 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut226 happy_x_2 of { (HappyWrap226 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( fmap ecpFromExp $+                                  ams (sLL happy_var_1 happy_var_3 $ HsBracket noExtField (DecBrL noExtField (snd happy_var_2)))+                                      (mo happy_var_1:mu AnnCloseQ happy_var_3:fst happy_var_2))}}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_562 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_562 = happySpecReduce_1  204# happyReduction_562+happyReduction_562 happy_x_1+	 =  case happyOut208 happy_x_1 of { (HappyWrap208 happy_var_1) -> +	happyIn220+		 (ECP $ mkHsSplicePV happy_var_1+	)}++happyReduce_563 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_563 = happyMonadReduce 4# 204# happyReduction_563+happyReduction_563 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut220 happy_x_2 of { (HappyWrap220 happy_var_2) -> +	case happyOut224 happy_x_3 of { (HappyWrap224 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                      fmap ecpFromCmd $+                                      ams (sLL happy_var_1 happy_var_4 $ HsCmdArrForm noExtField happy_var_2 Prefix+                                                           Nothing (reverse happy_var_3))+                                          [mu AnnOpenB happy_var_1,mu AnnCloseB happy_var_4])}}}})+	) (\r -> happyReturn (happyIn220 r))++happyReduce_564 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_564 = happySpecReduce_1  205# happyReduction_564+happyReduction_564 happy_x_1+	 =  case happyOut222 happy_x_1 of { (HappyWrap222 happy_var_1) -> +	happyIn221+		 (mapLoc (HsSpliceE noExtField) happy_var_1+	)}++happyReduce_565 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_565 = happySpecReduce_1  205# happyReduction_565+happyReduction_565 happy_x_1+	 =  case happyOut223 happy_x_1 of { (HappyWrap223 happy_var_1) -> +	happyIn221+		 (mapLoc (HsSpliceE noExtField) happy_var_1+	)}++happyReduce_566 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_566 = happyMonadReduce 1# 206# happyReduction_566+happyReduction_566 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ams (sL1 happy_var_1 $ mkUntypedSplice HasDollar+                                        (sL1 happy_var_1 $ HsVar noExtField (sL1 happy_var_1 (mkUnqual varName+                                                           (getTH_ID_SPLICE happy_var_1)))))+                                       [mj AnnThIdSplice happy_var_1])})+	) (\r -> happyReturn (happyIn222 r))++happyReduce_567 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_567 = happyMonadReduce 3# 206# happyReduction_567+happyReduction_567 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                   ams (sLL happy_var_1 happy_var_3 $ mkUntypedSplice HasParens happy_var_2)+                                       [mj AnnOpenPE happy_var_1,mj AnnCloseP happy_var_3])}}})+	) (\r -> happyReturn (happyIn222 r))++happyReduce_568 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_568 = happyMonadReduce 1# 207# happyReduction_568+happyReduction_568 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ams (sL1 happy_var_1 $ mkTypedSplice HasDollar+                                        (sL1 happy_var_1 $ HsVar noExtField (sL1 happy_var_1 (mkUnqual varName+                                                        (getTH_ID_TY_SPLICE happy_var_1)))))+                                       [mj AnnThIdTySplice happy_var_1])})+	) (\r -> happyReturn (happyIn223 r))++happyReduce_569 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_569 = happyMonadReduce 3# 207# happyReduction_569+happyReduction_569 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                    ams (sLL happy_var_1 happy_var_3 $ mkTypedSplice HasParens happy_var_2)+                                       [mj AnnOpenPTE happy_var_1,mj AnnCloseP happy_var_3])}}})+	) (\r -> happyReturn (happyIn223 r))++happyReduce_570 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_570 = happySpecReduce_2  208# happyReduction_570+happyReduction_570 happy_x_2+	happy_x_1+	 =  case happyOut224 happy_x_1 of { (HappyWrap224 happy_var_1) -> +	case happyOut225 happy_x_2 of { (HappyWrap225 happy_var_2) -> +	happyIn224+		 (happy_var_2 : happy_var_1+	)}}++happyReduce_571 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_571 = happySpecReduce_0  208# happyReduction_571+happyReduction_571  =  happyIn224+		 ([]+	)++happyReduce_572 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_572 = happyMonadReduce 1# 209# happyReduction_572+happyReduction_572 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut220 happy_x_1 of { (HappyWrap220 happy_var_1) -> +	( runECP_P happy_var_1 >>= \ cmd ->+                                    return (sL1 cmd $ HsCmdTop noExtField cmd))})+	) (\r -> happyReturn (happyIn225 r))++happyReduce_573 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_573 = happySpecReduce_3  210# happyReduction_573+happyReduction_573 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut227 happy_x_2 of { (HappyWrap227 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn226+		 (([mj AnnOpenC happy_var_1+                                                  ,mj AnnCloseC happy_var_3],happy_var_2)+	)}}}++happyReduce_574 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_574 = happySpecReduce_3  210# happyReduction_574+happyReduction_574 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut227 happy_x_2 of { (HappyWrap227 happy_var_2) -> +	happyIn226+		 (([],happy_var_2)+	)}++happyReduce_575 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_575 = happySpecReduce_1  211# happyReduction_575+happyReduction_575 happy_x_1+	 =  case happyOut76 happy_x_1 of { (HappyWrap76 happy_var_1) -> +	happyIn227+		 (cvTopDecls happy_var_1+	)}++happyReduce_576 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_576 = happySpecReduce_1  211# happyReduction_576+happyReduction_576 happy_x_1+	 =  case happyOut75 happy_x_1 of { (HappyWrap75 happy_var_1) -> +	happyIn227+		 (cvTopDecls happy_var_1+	)}++happyReduce_577 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_577 = happySpecReduce_1  212# happyReduction_577+happyReduction_577 happy_x_1+	 =  case happyOut209 happy_x_1 of { (HappyWrap209 happy_var_1) -> +	happyIn228+		 (happy_var_1+	)}++happyReduce_578 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_578 = happyMonadReduce 2# 212# happyReduction_578+happyReduction_578 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut210 happy_x_1 of { (HappyWrap210 happy_var_1) -> +	case happyOut294 happy_x_2 of { (HappyWrap294 happy_var_2) -> +	( runECP_P happy_var_1 >>= \ happy_var_1 ->+                                runPV happy_var_2 >>= \ happy_var_2 ->+                                return $ ecpFromExp $+                                sLL happy_var_1 happy_var_2 $ SectionL noExtField happy_var_1 happy_var_2)}})+	) (\r -> happyReturn (happyIn228 r))++happyReduce_579 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_579 = happySpecReduce_2  212# happyReduction_579+happyReduction_579 happy_x_2+	happy_x_1+	 =  case happyOut295 happy_x_1 of { (HappyWrap295 happy_var_1) -> +	case happyOut210 happy_x_2 of { (HappyWrap210 happy_var_2) -> +	happyIn228+		 (ECP $+                                superInfixOp $+                                runECP_PV happy_var_2 >>= \ happy_var_2 ->+                                happy_var_1 >>= \ happy_var_1 ->+                                mkHsSectionR_PV (comb2 happy_var_1 happy_var_2) happy_var_1 happy_var_2+	)}}++happyReduce_580 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_580 = happySpecReduce_3  212# happyReduction_580+happyReduction_580 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut209 happy_x_1 of { (HappyWrap209 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut228 happy_x_3 of { (HappyWrap228 happy_var_3) -> +	happyIn228+		 (ECP $+                             runECP_PV happy_var_1 >>= \ happy_var_1 ->+                             runECP_PV happy_var_3 >>= \ happy_var_3 ->+                             amms (mkHsViewPatPV (comb2 happy_var_1 happy_var_3) happy_var_1 happy_var_3) [mu AnnRarrow happy_var_2]+	)}}}++happyReduce_581 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_581 = happySpecReduce_2  213# happyReduction_581+happyReduction_581 happy_x_2+	happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOut230 happy_x_2 of { (HappyWrap230 happy_var_2) -> +	happyIn229+		 (runECP_PV happy_var_1 >>= \ happy_var_1 ->+                             happy_var_2 >>= \ happy_var_2 ->+                             do { addAnnotation (gl happy_var_1) AnnComma (fst happy_var_2)+                                ; return ([],Tuple ((sL1 happy_var_1 (Just happy_var_1)) : snd happy_var_2)) }+	)}}++happyReduce_582 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_582 = happySpecReduce_2  213# happyReduction_582+happyReduction_582 happy_x_2+	happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOut322 happy_x_2 of { (HappyWrap322 happy_var_2) -> +	happyIn229+		 (runECP_PV happy_var_1 >>= \ happy_var_1 -> return $+                            (mvbars (fst happy_var_2), Sum 1  (snd happy_var_2 + 1) happy_var_1)+	)}}++happyReduce_583 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_583 = happySpecReduce_2  213# happyReduction_583+happyReduction_583 happy_x_2+	happy_x_1+	 =  case happyOut320 happy_x_1 of { (HappyWrap320 happy_var_1) -> +	case happyOut231 happy_x_2 of { (HappyWrap231 happy_var_2) -> +	happyIn229+		 (happy_var_2 >>= \ happy_var_2 ->+                   do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (fst happy_var_1)+                      ; return+                           ([],Tuple (map (\l -> cL l Nothing) (fst happy_var_1) ++ happy_var_2)) }+	)}}++happyReduce_584 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_584 = happySpecReduce_3  213# happyReduction_584+happyReduction_584 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut322 happy_x_1 of { (HappyWrap322 happy_var_1) -> +	case happyOut228 happy_x_2 of { (HappyWrap228 happy_var_2) -> +	case happyOut321 happy_x_3 of { (HappyWrap321 happy_var_3) -> +	happyIn229+		 (runECP_PV happy_var_2 >>= \ happy_var_2 -> return $+                  (mvbars (fst happy_var_1) ++ mvbars (fst happy_var_3), Sum (snd happy_var_1 + 1) (snd happy_var_1 + snd happy_var_3 + 1) happy_var_2)+	)}}}++happyReduce_585 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_585 = happySpecReduce_2  214# happyReduction_585+happyReduction_585 happy_x_2+	happy_x_1+	 =  case happyOut320 happy_x_1 of { (HappyWrap320 happy_var_1) -> +	case happyOut231 happy_x_2 of { (HappyWrap231 happy_var_2) -> +	happyIn230+		 (happy_var_2 >>= \ happy_var_2 ->+          do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (tail $ fst happy_var_1)+             ; return (+            (head $ fst happy_var_1+            ,(map (\l -> cL l Nothing) (tail $ fst happy_var_1)) ++ happy_var_2)) }+	)}}++happyReduce_586 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_586 = happySpecReduce_2  215# happyReduction_586+happyReduction_586 happy_x_2+	happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOut230 happy_x_2 of { (HappyWrap230 happy_var_2) -> +	happyIn231+		 (runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                   happy_var_2 >>= \ happy_var_2 ->+                                   addAnnotation (gl happy_var_1) AnnComma (fst happy_var_2) >>+                                   return ((cL (gl happy_var_1) (Just happy_var_1)) : snd happy_var_2)+	)}}++happyReduce_587 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_587 = happySpecReduce_1  215# happyReduction_587+happyReduction_587 happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	happyIn231+		 (runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                   return [cL (gl happy_var_1) (Just happy_var_1)]+	)}++happyReduce_588 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_588 = happySpecReduce_0  215# happyReduction_588+happyReduction_588  =  happyIn231+		 (return [noLoc Nothing]+	)++happyReduce_589 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_589 = happySpecReduce_1  216# happyReduction_589+happyReduction_589 happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	happyIn232+		 (\loc -> runECP_PV happy_var_1 >>= \ happy_var_1 ->+                            mkHsExplicitListPV loc [happy_var_1]+	)}++happyReduce_590 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_590 = happySpecReduce_1  216# happyReduction_590+happyReduction_590 happy_x_1+	 =  case happyOut233 happy_x_1 of { (HappyWrap233 happy_var_1) -> +	happyIn232+		 (\loc -> happy_var_1 >>= \ happy_var_1 ->+                            mkHsExplicitListPV loc (reverse happy_var_1)+	)}++happyReduce_591 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_591 = happySpecReduce_2  216# happyReduction_591+happyReduction_591 happy_x_2+	happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn232+		 (\loc ->    runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                  ams (cL loc $ ArithSeq noExtField Nothing (From happy_var_1))+                                      [mj AnnDotdot happy_var_2]+                                      >>= ecpFromExp'+	)}}++happyReduce_592 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_592 = happyReduce 4# 216# happyReduction_592+happyReduction_592 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	happyIn232+		 (\loc ->+                                   runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                   runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                   ams (cL loc $ ArithSeq noExtField Nothing (FromThen happy_var_1 happy_var_3))+                                       [mj AnnComma happy_var_2,mj AnnDotdot happy_var_4]+                                       >>= ecpFromExp'+	) `HappyStk` happyRest}}}}++happyReduce_593 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_593 = happySpecReduce_3  216# happyReduction_593+happyReduction_593 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	happyIn232+		 (\loc -> runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                   runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                   ams (cL loc $ ArithSeq noExtField Nothing (FromTo happy_var_1 happy_var_3))+                                       [mj AnnDotdot happy_var_2]+                                       >>= ecpFromExp'+	)}}}++happyReduce_594 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_594 = happyReduce 5# 216# happyReduction_594+happyReduction_594 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	case happyOutTok happy_x_4 of { happy_var_4 -> +	case happyOut209 happy_x_5 of { (HappyWrap209 happy_var_5) -> +	happyIn232+		 (\loc ->+                                   runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                   runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                   runECP_PV happy_var_5 >>= \ happy_var_5 ->+                                   ams (cL loc $ ArithSeq noExtField Nothing (FromThenTo happy_var_1 happy_var_3 happy_var_5))+                                       [mj AnnComma happy_var_2,mj AnnDotdot happy_var_4]+                                       >>= ecpFromExp'+	) `HappyStk` happyRest}}}}}++happyReduce_595 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_595 = happySpecReduce_3  216# happyReduction_595+happyReduction_595 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut234 happy_x_3 of { (HappyWrap234 happy_var_3) -> +	happyIn232+		 (\loc ->+                checkMonadComp >>= \ ctxt ->+                runECP_PV happy_var_1 >>= \ happy_var_1 ->+                ams (cL loc $ mkHsComp ctxt (unLoc happy_var_3) happy_var_1)+                    [mj AnnVbar happy_var_2]+                    >>= ecpFromExp'+	)}}}++happyReduce_596 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_596 = happySpecReduce_3  217# happyReduction_596+happyReduction_596 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut233 happy_x_1 of { (HappyWrap233 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut228 happy_x_3 of { (HappyWrap228 happy_var_3) -> +	happyIn233+		 (happy_var_1 >>= \ happy_var_1 ->+                                     runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                     addAnnotation (gl $ head $ happy_var_1)+                                                            AnnComma (gl happy_var_2) >>+                                      return (((:) $! happy_var_3) $! happy_var_1)+	)}}}++happyReduce_597 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_597 = happySpecReduce_3  217# happyReduction_597+happyReduction_597 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut228 happy_x_1 of { (HappyWrap228 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut228 happy_x_3 of { (HappyWrap228 happy_var_3) -> +	happyIn233+		 (runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                      runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                      addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>+                                      return [happy_var_3,happy_var_1]+	)}}}++happyReduce_598 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_598 = happySpecReduce_1  218# happyReduction_598+happyReduction_598 happy_x_1+	 =  case happyOut235 happy_x_1 of { (HappyWrap235 happy_var_1) -> +	happyIn234+		 (case (unLoc happy_var_1) of+                    [qs] -> sL1 happy_var_1 qs+                    -- We just had one thing in our "parallel" list so+                    -- we simply return that thing directly++                    qss -> sL1 happy_var_1 [sL1 happy_var_1 $ ParStmt noExtField [ParStmtBlock noExtField qs [] noSyntaxExpr |+                                            qs <- qss]+                                            noExpr noSyntaxExpr]+                    -- We actually found some actual parallel lists so+                    -- we wrap them into as a ParStmt+	)}++happyReduce_599 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_599 = happyMonadReduce 3# 219# happyReduction_599+happyReduction_599 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut236 happy_x_1 of { (HappyWrap236 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut235 happy_x_3 of { (HappyWrap235 happy_var_3) -> +	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnVbar (gl happy_var_2) >>+                        return (sLL happy_var_1 happy_var_3 (reverse (unLoc happy_var_1) : unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn235 r))++happyReduce_600 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_600 = happySpecReduce_1  219# happyReduction_600+happyReduction_600 happy_x_1+	 =  case happyOut236 happy_x_1 of { (HappyWrap236 happy_var_1) -> +	happyIn235+		 (cL (getLoc happy_var_1) [reverse (unLoc happy_var_1)]+	)}++happyReduce_601 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_601 = happyMonadReduce 3# 220# happyReduction_601+happyReduction_601 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut236 happy_x_1 of { (HappyWrap236 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut237 happy_x_3 of { (HappyWrap237 happy_var_3) -> +	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>+                amsL (comb2 happy_var_1 happy_var_3) (fst $ unLoc happy_var_3) >>+                return (sLL happy_var_1 happy_var_3 [sLL happy_var_1 happy_var_3 ((snd $ unLoc happy_var_3) (reverse (unLoc happy_var_1)))]))}}})+	) (\r -> happyReturn (happyIn236 r))++happyReduce_602 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_602 = happyMonadReduce 3# 220# happyReduction_602+happyReduction_602 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut236 happy_x_1 of { (HappyWrap236 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut258 happy_x_3 of { (HappyWrap258 happy_var_3) -> +	( runPV happy_var_3 >>= \ happy_var_3 ->+                addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>+                return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})+	) (\r -> happyReturn (happyIn236 r))++happyReduce_603 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_603 = happyMonadReduce 1# 220# happyReduction_603+happyReduction_603 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut237 happy_x_1 of { (HappyWrap237 happy_var_1) -> +	( ams happy_var_1 (fst $ unLoc happy_var_1) >>+                              return (sLL happy_var_1 happy_var_1 [cL (getLoc happy_var_1) ((snd $ unLoc happy_var_1) [])]))})+	) (\r -> happyReturn (happyIn236 r))++happyReduce_604 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_604 = happyMonadReduce 1# 220# happyReduction_604+happyReduction_604 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> +	( runPV happy_var_1 >>= \ happy_var_1 ->+                                            return $ sL1 happy_var_1 [happy_var_1])})+	) (\r -> happyReturn (happyIn236 r))++happyReduce_605 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_605 = happyMonadReduce 2# 221# happyReduction_605+happyReduction_605 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 -> return $+                                 sLL happy_var_1 happy_var_2 ([mj AnnThen happy_var_1], \ss -> (mkTransformStmt ss happy_var_2)))}})+	) (\r -> happyReturn (happyIn237 r))++happyReduce_606 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_606 = happyMonadReduce 4# 221# happyReduction_606+happyReduction_606 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                 runECP_P happy_var_4 >>= \ happy_var_4 ->+                                 return $ sLL happy_var_1 happy_var_4 ([mj AnnThen happy_var_1,mj AnnBy  happy_var_3],+                                                     \ss -> (mkTransformByStmt ss happy_var_2 happy_var_4)))}}}})+	) (\r -> happyReturn (happyIn237 r))++happyReduce_607 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_607 = happyMonadReduce 4# 221# happyReduction_607+happyReduction_607 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	( runECP_P happy_var_4 >>= \ happy_var_4 ->+               return $ sLL happy_var_1 happy_var_4 ([mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnUsing happy_var_3],+                                   \ss -> (mkGroupUsingStmt ss happy_var_4)))}}}})+	) (\r -> happyReturn (happyIn237 r))++happyReduce_608 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_608 = happyMonadReduce 6# 221# happyReduction_608+happyReduction_608 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	case happyOutTok happy_x_5 of { happy_var_5 -> +	case happyOut209 happy_x_6 of { (HappyWrap209 happy_var_6) -> +	( runECP_P happy_var_4 >>= \ happy_var_4 ->+               runECP_P happy_var_6 >>= \ happy_var_6 ->+               return $ sLL happy_var_1 happy_var_6 ([mj AnnThen happy_var_1,mj AnnGroup happy_var_2,mj AnnBy happy_var_3,mj AnnUsing happy_var_5],+                                   \ss -> (mkGroupByUsingStmt ss happy_var_4 happy_var_6)))}}}}}})+	) (\r -> happyReturn (happyIn237 r))++happyReduce_609 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_609 = happySpecReduce_1  222# happyReduction_609+happyReduction_609 happy_x_1+	 =  case happyOut239 happy_x_1 of { (HappyWrap239 happy_var_1) -> +	happyIn238+		 (cL (getLoc happy_var_1) (reverse (unLoc happy_var_1))+	)}++happyReduce_610 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_610 = happyMonadReduce 3# 223# happyReduction_610+happyReduction_610 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut239 happy_x_1 of { (HappyWrap239 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut258 happy_x_3 of { (HappyWrap258 happy_var_3) -> +	( runPV happy_var_3 >>= \ happy_var_3 ->+                               addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma+                                             (gl happy_var_2) >>+                               return (sLL happy_var_1 happy_var_3 (happy_var_3 : unLoc happy_var_1)))}}})+	) (\r -> happyReturn (happyIn239 r))++happyReduce_611 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_611 = happyMonadReduce 1# 223# happyReduction_611+happyReduction_611 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> +	( runPV happy_var_1 >>= \ happy_var_1 ->+                               return $ sL1 happy_var_1 [happy_var_1])})+	) (\r -> happyReturn (happyIn239 r))++happyReduce_612 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_612 = happySpecReduce_3  224# happyReduction_612+happyReduction_612 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut241 happy_x_2 of { (HappyWrap241 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn240+		 (happy_var_2 >>= \ happy_var_2 -> return $+                                     sLL happy_var_1 happy_var_3 ((moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2))+                                               ,(reverse (snd $ unLoc happy_var_2)))+	)}}}++happyReduce_613 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_613 = happySpecReduce_3  224# happyReduction_613+happyReduction_613 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut241 happy_x_2 of { (HappyWrap241 happy_var_2) -> +	happyIn240+		 (happy_var_2 >>= \ happy_var_2 -> return $+                                       cL (getLoc happy_var_2) (fst $ unLoc happy_var_2+                                        ,(reverse (snd $ unLoc happy_var_2)))+	)}++happyReduce_614 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_614 = happySpecReduce_2  224# happyReduction_614+happyReduction_614 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn240+		 (return $ sLL happy_var_1 happy_var_2 ([moc happy_var_1,mcc happy_var_2],[])+	)}}++happyReduce_615 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_615 = happySpecReduce_2  224# happyReduction_615+happyReduction_615 happy_x_2+	happy_x_1+	 =  happyIn240+		 (return $ noLoc ([],[])+	)++happyReduce_616 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_616 = happySpecReduce_1  225# happyReduction_616+happyReduction_616 happy_x_1+	 =  case happyOut242 happy_x_1 of { (HappyWrap242 happy_var_1) -> +	happyIn241+		 (happy_var_1 >>= \ happy_var_1 -> return $+                                     sL1 happy_var_1 (fst $ unLoc happy_var_1,snd $ unLoc happy_var_1)+	)}++happyReduce_617 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_617 = happySpecReduce_2  225# happyReduction_617+happyReduction_617 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut241 happy_x_2 of { (HappyWrap241 happy_var_2) -> +	happyIn241+		 (happy_var_2 >>= \ happy_var_2 -> return $+                                     sLL happy_var_1 happy_var_2 ((mj AnnSemi happy_var_1:(fst $ unLoc happy_var_2))+                                               ,snd $ unLoc happy_var_2)+	)}}++happyReduce_618 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_618 = happySpecReduce_3  226# happyReduction_618+happyReduction_618 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut242 happy_x_1 of { (HappyWrap242 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut243 happy_x_3 of { (HappyWrap243 happy_var_3) -> +	happyIn242+		 (happy_var_1 >>= \ happy_var_1 ->+                                  happy_var_3 >>= \ happy_var_3 ->+                                     if null (snd $ unLoc happy_var_1)+                                     then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                  ,[happy_var_3]))+                                     else (ams (head $ snd $ unLoc happy_var_1)+                                               (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1))+                                           >> return (sLL happy_var_1 happy_var_3 ([],happy_var_3 : (snd $ unLoc happy_var_1))) )+	)}}}++happyReduce_619 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_619 = happySpecReduce_2  226# happyReduction_619+happyReduction_619 happy_x_2+	happy_x_1+	 =  case happyOut242 happy_x_1 of { (HappyWrap242 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn242+		 (happy_var_1 >>= \ happy_var_1 ->+                                   if null (snd $ unLoc happy_var_1)+                                     then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                  ,snd $ unLoc happy_var_1))+                                     else (ams (head $ snd $ unLoc happy_var_1)+                                               (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1))+                                           >> return (sLL happy_var_1 happy_var_2 ([],snd $ unLoc happy_var_1)))+	)}}++happyReduce_620 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_620 = happySpecReduce_1  226# happyReduction_620+happyReduction_620 happy_x_1+	 =  case happyOut243 happy_x_1 of { (HappyWrap243 happy_var_1) -> +	happyIn242+		 (happy_var_1 >>= \ happy_var_1 -> return $ sL1 happy_var_1 ([],[happy_var_1])+	)}++happyReduce_621 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_621 = happySpecReduce_2  227# happyReduction_621+happyReduction_621 happy_x_2+	happy_x_1+	 =  case happyOut249 happy_x_1 of { (HappyWrap249 happy_var_1) -> +	case happyOut244 happy_x_2 of { (HappyWrap244 happy_var_2) -> +	happyIn243+		 (happy_var_2 >>= \ happy_var_2 ->+                            ams (sLL happy_var_1 happy_var_2 (Match { m_ext = noExtField+                                                  , m_ctxt = CaseAlt+                                                  , m_pats = [happy_var_1]+                                                  , m_grhss = snd $ unLoc happy_var_2 }))+                                      (fst $ unLoc happy_var_2)+	)}}++happyReduce_622 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_622 = happySpecReduce_2  228# happyReduction_622+happyReduction_622 happy_x_2+	happy_x_1+	 =  case happyOut245 happy_x_1 of { (HappyWrap245 happy_var_1) -> +	case happyOut128 happy_x_2 of { (HappyWrap128 happy_var_2) -> +	happyIn244+		 (happy_var_1 >>= \alt ->+                                      return $ sLL alt happy_var_2 (fst $ unLoc happy_var_2, GRHSs noExtField (unLoc alt) (snd $ unLoc happy_var_2))+	)}}++happyReduce_623 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_623 = happySpecReduce_2  229# happyReduction_623+happyReduction_623 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut209 happy_x_2 of { (HappyWrap209 happy_var_2) -> +	happyIn245+		 (runECP_PV happy_var_2 >>= \ happy_var_2 ->+                                ams (sLL happy_var_1 happy_var_2 (unguardedRHS (comb2 happy_var_1 happy_var_2) happy_var_2))+                                    [mu AnnRarrow happy_var_1]+	)}}++happyReduce_624 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_624 = happySpecReduce_1  229# happyReduction_624+happyReduction_624 happy_x_1+	 =  case happyOut246 happy_x_1 of { (HappyWrap246 happy_var_1) -> +	happyIn245+		 (happy_var_1 >>= \gdpats ->+                                return $ sL1 gdpats (reverse (unLoc gdpats))+	)}++happyReduce_625 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_625 = happySpecReduce_2  230# happyReduction_625+happyReduction_625 happy_x_2+	happy_x_1+	 =  case happyOut246 happy_x_1 of { (HappyWrap246 happy_var_1) -> +	case happyOut248 happy_x_2 of { (HappyWrap248 happy_var_2) -> +	happyIn246+		 (happy_var_1 >>= \gdpats ->+                         happy_var_2 >>= \gdpat ->+                         return $ sLL gdpats gdpat (gdpat : unLoc gdpats)+	)}}++happyReduce_626 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_626 = happySpecReduce_1  230# happyReduction_626+happyReduction_626 happy_x_1+	 =  case happyOut248 happy_x_1 of { (HappyWrap248 happy_var_1) -> +	happyIn246+		 (happy_var_1 >>= \gdpat -> return $ sL1 gdpat [gdpat]+	)}++happyReduce_627 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_627 = happyMonadReduce 3# 231# happyReduction_627+happyReduction_627 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut246 happy_x_2 of { (HappyWrap246 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( runPV happy_var_2 >>= \ happy_var_2 ->+                                             return $ sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3],unLoc happy_var_2))}}})+	) (\r -> happyReturn (happyIn247 r))++happyReduce_628 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_628 = happyMonadReduce 2# 231# happyReduction_628+happyReduction_628 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut246 happy_x_1 of { (HappyWrap246 happy_var_1) -> +	( runPV happy_var_1 >>= \ happy_var_1 ->+                                             return $ sL1 happy_var_1 ([],unLoc happy_var_1))})+	) (\r -> happyReturn (happyIn247 r))++happyReduce_629 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_629 = happyReduce 4# 232# happyReduction_629+happyReduction_629 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut238 happy_x_2 of { (HappyWrap238 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	case happyOut209 happy_x_4 of { (HappyWrap209 happy_var_4) -> +	happyIn248+		 (runECP_PV happy_var_4 >>= \ happy_var_4 ->+                                     ams (sL (comb2 happy_var_1 happy_var_4) $ GRHS noExtField (unLoc happy_var_2) happy_var_4)+                                         [mj AnnVbar happy_var_1,mu AnnRarrow happy_var_3]+	) `HappyStk` happyRest}}}}++happyReduce_630 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_630 = happyMonadReduce 1# 233# happyReduction_630+happyReduction_630 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut209 happy_x_1 of { (HappyWrap209 happy_var_1) -> +	( (checkPattern <=< runECP_P) happy_var_1)})+	) (\r -> happyReturn (happyIn249 r))++happyReduce_631 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_631 = happyMonadReduce 2# 233# happyReduction_631+happyReduction_631 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                           amms (checkPattern (patBuilderBang (getLoc happy_var_1) happy_var_2))+                                [mj AnnBang happy_var_1])}})+	) (\r -> happyReturn (happyIn249 r))++happyReduce_632 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_632 = happyMonadReduce 1# 234# happyReduction_632+happyReduction_632 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut209 happy_x_1 of { (HappyWrap209 happy_var_1) -> +	( -- See Note [Parser-Validator ReaderT SDoc] in RdrHsSyn+                             checkPattern_msg (text "Possibly caused by a missing 'do'?")+                                              (runECP_PV happy_var_1))})+	) (\r -> happyReturn (happyIn250 r))++happyReduce_633 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_633 = happyMonadReduce 2# 234# happyReduction_633+happyReduction_633 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	( -- See Note [Parser-Validator ReaderT SDoc] in RdrHsSyn+                             amms (checkPattern_msg (text "Possibly caused by a missing 'do'?")+                                     (patBuilderBang (getLoc happy_var_1) `fmap` runECP_PV happy_var_2))+                                  [mj AnnBang happy_var_1])}})+	) (\r -> happyReturn (happyIn250 r))++happyReduce_634 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_634 = happyMonadReduce 1# 235# happyReduction_634+happyReduction_634 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut218 happy_x_1 of { (HappyWrap218 happy_var_1) -> +	( (checkPattern <=< runECP_P) happy_var_1)})+	) (\r -> happyReturn (happyIn251 r))++happyReduce_635 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_635 = happyMonadReduce 2# 235# happyReduction_635+happyReduction_635 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut218 happy_x_2 of { (HappyWrap218 happy_var_2) -> +	( runECP_P happy_var_2 >>= \ happy_var_2 ->+                                   amms (checkPattern (patBuilderBang (getLoc happy_var_1) happy_var_2))+                                        [mj AnnBang happy_var_1])}})+	) (\r -> happyReturn (happyIn251 r))++happyReduce_636 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_636 = happySpecReduce_2  236# happyReduction_636+happyReduction_636 happy_x_2+	happy_x_1+	 =  case happyOut251 happy_x_1 of { (HappyWrap251 happy_var_1) -> +	case happyOut252 happy_x_2 of { (HappyWrap252 happy_var_2) -> +	happyIn252+		 (happy_var_1 : happy_var_2+	)}}++happyReduce_637 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_637 = happySpecReduce_0  236# happyReduction_637+happyReduction_637  =  happyIn252+		 ([]+	)++happyReduce_638 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_638 = happySpecReduce_3  237# happyReduction_638+happyReduction_638 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut254 happy_x_2 of { (HappyWrap254 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn253+		 (happy_var_2 >>= \ happy_var_2 -> return $+                                          sLL happy_var_1 happy_var_3 ((moc happy_var_1:mcc happy_var_3:(fst $ unLoc happy_var_2))+                                             ,(reverse $ snd $ unLoc happy_var_2))+	)}}}++happyReduce_639 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_639 = happySpecReduce_3  237# happyReduction_639+happyReduction_639 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut254 happy_x_2 of { (HappyWrap254 happy_var_2) -> +	happyIn253+		 (happy_var_2 >>= \ happy_var_2 -> return $+                                          cL (gl happy_var_2) (fst $ unLoc happy_var_2+                                                    ,reverse $ snd $ unLoc happy_var_2)+	)}++happyReduce_640 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_640 = happySpecReduce_3  238# happyReduction_640+happyReduction_640 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut254 happy_x_1 of { (HappyWrap254 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut257 happy_x_3 of { (HappyWrap257 happy_var_3) -> +	happyIn254+		 (happy_var_1 >>= \ happy_var_1 ->+                            happy_var_3 >>= \ happy_var_3 ->+                            if null (snd $ unLoc happy_var_1)+                              then return (sLL happy_var_1 happy_var_3 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1)+                                                     ,happy_var_3 : (snd $ unLoc happy_var_1)))+                              else do+                               { ams (head $ snd $ unLoc happy_var_1) [mj AnnSemi happy_var_2]+                               ; return $ sLL happy_var_1 happy_var_3 (fst $ unLoc happy_var_1,happy_var_3 :(snd $ unLoc happy_var_1)) }+	)}}}++happyReduce_641 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_641 = happySpecReduce_2  238# happyReduction_641+happyReduction_641 happy_x_2+	happy_x_1+	 =  case happyOut254 happy_x_1 of { (HappyWrap254 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn254+		 (happy_var_1 >>= \ happy_var_1 ->+                           if null (snd $ unLoc happy_var_1)+                             then return (sLL happy_var_1 happy_var_2 (mj AnnSemi happy_var_2:(fst $ unLoc happy_var_1),snd $ unLoc happy_var_1))+                             else do+                               { ams (head $ snd $ unLoc happy_var_1)+                                               [mj AnnSemi happy_var_2]+                               ; return happy_var_1 }+	)}}++happyReduce_642 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_642 = happySpecReduce_1  238# happyReduction_642+happyReduction_642 happy_x_1+	 =  case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> +	happyIn254+		 (happy_var_1 >>= \ happy_var_1 ->+                                   return $ sL1 happy_var_1 ([],[happy_var_1])+	)}++happyReduce_643 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_643 = happySpecReduce_0  238# happyReduction_643+happyReduction_643  =  happyIn254+		 (return $ noLoc ([],[])+	)++happyReduce_644 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_644 = happyMonadReduce 1# 239# happyReduction_644+happyReduction_644 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> +	( fmap Just (runPV happy_var_1))})+	) (\r -> happyReturn (happyIn255 r))++happyReduce_645 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_645 = happySpecReduce_0  239# happyReduction_645+happyReduction_645  =  happyIn255+		 (Nothing+	)++happyReduce_646 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_646 = happyMonadReduce 1# 240# happyReduction_646+happyReduction_646 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut257 happy_x_1 of { (HappyWrap257 happy_var_1) -> +	( runPV happy_var_1)})+	) (\r -> happyReturn (happyIn256 r))++happyReduce_647 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_647 = happySpecReduce_1  241# happyReduction_647+happyReduction_647 happy_x_1+	 =  case happyOut258 happy_x_1 of { (HappyWrap258 happy_var_1) -> +	happyIn257+		 (happy_var_1+	)}++happyReduce_648 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_648 = happySpecReduce_2  241# happyReduction_648+happyReduction_648 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut253 happy_x_2 of { (HappyWrap253 happy_var_2) -> +	happyIn257+		 (happy_var_2 >>= \ happy_var_2 ->+                                           ams (sLL happy_var_1 happy_var_2 $ mkRecStmt (snd $ unLoc happy_var_2))+                                               (mj AnnRec happy_var_1:(fst $ unLoc happy_var_2))+	)}}++happyReduce_649 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_649 = happySpecReduce_3  242# happyReduction_649+happyReduction_649 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut250 happy_x_1 of { (HappyWrap250 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	happyIn258+		 (runECP_PV happy_var_3 >>= \ happy_var_3 ->+                                           ams (sLL happy_var_1 happy_var_3 $ mkBindStmt happy_var_1 happy_var_3)+                                               [mu AnnLarrow happy_var_2]+	)}}}++happyReduce_650 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_650 = happySpecReduce_1  242# happyReduction_650+happyReduction_650 happy_x_1+	 =  case happyOut209 happy_x_1 of { (HappyWrap209 happy_var_1) -> +	happyIn258+		 (runECP_PV happy_var_1 >>= \ happy_var_1 ->+                                           return $ sL1 happy_var_1 $ mkBodyStmt happy_var_1+	)}++happyReduce_651 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_651 = happySpecReduce_2  242# happyReduction_651+happyReduction_651 happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut127 happy_x_2 of { (HappyWrap127 happy_var_2) -> +	happyIn258+		 (ams (sLL happy_var_1 happy_var_2 $ LetStmt noExtField (snd $ unLoc happy_var_2))+                                               (mj AnnLet happy_var_1:(fst $ unLoc happy_var_2))+	)}}++happyReduce_652 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_652 = happySpecReduce_1  243# happyReduction_652+happyReduction_652 happy_x_1+	 =  case happyOut260 happy_x_1 of { (HappyWrap260 happy_var_1) -> +	happyIn259+		 (happy_var_1+	)}++happyReduce_653 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_653 = happySpecReduce_0  243# happyReduction_653+happyReduction_653  =  happyIn259+		 (return ([],([], Nothing))+	)++happyReduce_654 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_654 = happySpecReduce_3  244# happyReduction_654+happyReduction_654 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut261 happy_x_1 of { (HappyWrap261 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut260 happy_x_3 of { (HappyWrap260 happy_var_3) -> +	happyIn260+		 (happy_var_1 >>= \ happy_var_1 ->+                   happy_var_3 >>= \ happy_var_3 ->+                   addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>+                   return (case happy_var_3 of (ma,(flds, dd)) -> (ma,(happy_var_1 : flds, dd)))+	)}}}++happyReduce_655 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_655 = happySpecReduce_1  244# happyReduction_655+happyReduction_655 happy_x_1+	 =  case happyOut261 happy_x_1 of { (HappyWrap261 happy_var_1) -> +	happyIn260+		 (happy_var_1 >>= \ happy_var_1 ->+                                          return ([],([happy_var_1], Nothing))+	)}++happyReduce_656 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_656 = happySpecReduce_1  244# happyReduction_656+happyReduction_656 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn260+		 (return ([mj AnnDotdot happy_var_1],([],   Just (getLoc happy_var_1)))+	)}++happyReduce_657 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_657 = happySpecReduce_3  245# happyReduction_657+happyReduction_657 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut228 happy_x_3 of { (HappyWrap228 happy_var_3) -> +	happyIn261+		 (runECP_PV happy_var_3 >>= \ happy_var_3 ->+                           ams  (sLL happy_var_1 happy_var_3 $ HsRecField (sL1 happy_var_1 $ mkFieldOcc happy_var_1) happy_var_3 False)+                                [mj AnnEqual happy_var_2]+	)}}}++happyReduce_658 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_658 = happySpecReduce_1  245# happyReduction_658+happyReduction_658 happy_x_1+	 =  case happyOut303 happy_x_1 of { (HappyWrap303 happy_var_1) -> +	happyIn261+		 (placeHolderPunRhs >>= \rhs ->+                          return $ sLL happy_var_1 happy_var_1 $ HsRecField (sL1 happy_var_1 $ mkFieldOcc happy_var_1) rhs True+	)}++happyReduce_659 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_659 = happyMonadReduce 3# 246# happyReduction_659+happyReduction_659 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut262 happy_x_1 of { (HappyWrap262 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut263 happy_x_3 of { (HappyWrap263 happy_var_3) -> +	( addAnnotation (gl $ last $ unLoc happy_var_1) AnnSemi (gl happy_var_2) >>+                         return (let { this = happy_var_3; rest = unLoc happy_var_1 }+                              in rest `seq` this `seq` sLL happy_var_1 happy_var_3 (this : rest)))}}})+	) (\r -> happyReturn (happyIn262 r))++happyReduce_660 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_660 = happyMonadReduce 2# 246# happyReduction_660+happyReduction_660 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut262 happy_x_1 of { (HappyWrap262 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( addAnnotation (gl $ last $ unLoc happy_var_1) AnnSemi (gl happy_var_2) >>+                         return (sLL happy_var_1 happy_var_2 (unLoc happy_var_1)))}})+	) (\r -> happyReturn (happyIn262 r))++happyReduce_661 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_661 = happySpecReduce_1  246# happyReduction_661+happyReduction_661 happy_x_1+	 =  case happyOut263 happy_x_1 of { (HappyWrap263 happy_var_1) -> +	happyIn262+		 (let this = happy_var_1 in this `seq` sL1 happy_var_1 [this]+	)}++happyReduce_662 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_662 = happyMonadReduce 3# 247# happyReduction_662+happyReduction_662 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut264 happy_x_1 of { (HappyWrap264 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut209 happy_x_3 of { (HappyWrap209 happy_var_3) -> +	( runECP_P happy_var_3 >>= \ happy_var_3 ->+                                          ams (sLL happy_var_1 happy_var_3 (IPBind noExtField (Left happy_var_1) happy_var_3))+                                              [mj AnnEqual happy_var_2])}}})+	) (\r -> happyReturn (happyIn263 r))++happyReduce_663 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_663 = happySpecReduce_1  248# happyReduction_663+happyReduction_663 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn264+		 (sL1 happy_var_1 (HsIPName (getIPDUPVARID happy_var_1))+	)}++happyReduce_664 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_664 = happySpecReduce_1  249# happyReduction_664+happyReduction_664 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn265+		 (sL1 happy_var_1 (getLABELVARID happy_var_1)+	)}++happyReduce_665 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_665 = happySpecReduce_1  250# happyReduction_665+happyReduction_665 happy_x_1+	 =  case happyOut267 happy_x_1 of { (HappyWrap267 happy_var_1) -> +	happyIn266+		 (happy_var_1+	)}++happyReduce_666 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_666 = happySpecReduce_0  250# happyReduction_666+happyReduction_666  =  happyIn266+		 (noLoc mkTrue+	)++happyReduce_667 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_667 = happySpecReduce_1  251# happyReduction_667+happyReduction_667 happy_x_1+	 =  case happyOut268 happy_x_1 of { (HappyWrap268 happy_var_1) -> +	happyIn267+		 (happy_var_1+	)}++happyReduce_668 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_668 = happyMonadReduce 3# 251# happyReduction_668+happyReduction_668 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut268 happy_x_1 of { (HappyWrap268 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut267 happy_x_3 of { (HappyWrap267 happy_var_3) -> +	( aa happy_var_1 (AnnVbar, happy_var_2)+                              >> return (sLL happy_var_1 happy_var_3 (Or [happy_var_1,happy_var_3])))}}})+	) (\r -> happyReturn (happyIn267 r))++happyReduce_669 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_669 = happySpecReduce_1  252# happyReduction_669+happyReduction_669 happy_x_1+	 =  case happyOut269 happy_x_1 of { (HappyWrap269 happy_var_1) -> +	happyIn268+		 (sLL (head happy_var_1) (last happy_var_1) (And (happy_var_1))+	)}++happyReduce_670 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_670 = happySpecReduce_1  253# happyReduction_670+happyReduction_670 happy_x_1+	 =  case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> +	happyIn269+		 ([happy_var_1]+	)}++happyReduce_671 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_671 = happyMonadReduce 3# 253# happyReduction_671+happyReduction_671 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut270 happy_x_1 of { (HappyWrap270 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut269 happy_x_3 of { (HappyWrap269 happy_var_3) -> +	( aa happy_var_1 (AnnComma, happy_var_2) >> return (happy_var_1 : happy_var_3))}}})+	) (\r -> happyReturn (happyIn269 r))++happyReduce_672 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_672 = happyMonadReduce 3# 254# happyReduction_672+happyReduction_672 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut267 happy_x_2 of { (HappyWrap267 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (Parens happy_var_2)) [mop happy_var_1,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn270 r))++happyReduce_673 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_673 = happySpecReduce_1  254# happyReduction_673+happyReduction_673 happy_x_1+	 =  case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> +	happyIn270+		 (sL1 happy_var_1 (Var happy_var_1)+	)}++happyReduce_674 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_674 = happySpecReduce_1  255# happyReduction_674+happyReduction_674 happy_x_1+	 =  case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> +	happyIn271+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_675 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_675 = happyMonadReduce 3# 255# happyReduction_675+happyReduction_675 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut272 happy_x_1 of { (HappyWrap272 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut271 happy_x_3 of { (HappyWrap271 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>+                                    return (sLL happy_var_1 happy_var_3 (happy_var_1 : unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn271 r))++happyReduce_676 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_676 = happySpecReduce_1  256# happyReduction_676+happyReduction_676 happy_x_1+	 =  case happyOut302 happy_x_1 of { (HappyWrap302 happy_var_1) -> +	happyIn272+		 (happy_var_1+	)}++happyReduce_677 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_677 = happySpecReduce_1  256# happyReduction_677+happyReduction_677 happy_x_1+	 =  case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> +	happyIn272+		 (happy_var_1+	)}++happyReduce_678 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_678 = happySpecReduce_1  257# happyReduction_678+happyReduction_678 happy_x_1+	 =  case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> +	happyIn273+		 (happy_var_1+	)}++happyReduce_679 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_679 = happySpecReduce_1  257# happyReduction_679+happyReduction_679 happy_x_1+	 =  case happyOut278 happy_x_1 of { (HappyWrap278 happy_var_1) -> +	happyIn273+		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc happy_var_1))+	)}++happyReduce_680 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_680 = happySpecReduce_1  258# happyReduction_680+happyReduction_680 happy_x_1+	 =  case happyOut275 happy_x_1 of { (HappyWrap275 happy_var_1) -> +	happyIn274+		 (happy_var_1+	)}++happyReduce_681 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_681 = happySpecReduce_1  258# happyReduction_681+happyReduction_681 happy_x_1+	 =  case happyOut279 happy_x_1 of { (HappyWrap279 happy_var_1) -> +	happyIn274+		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc happy_var_1))+	)}++happyReduce_682 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_682 = happySpecReduce_1  259# happyReduction_682+happyReduction_682 happy_x_1+	 =  case happyOut313 happy_x_1 of { (HappyWrap313 happy_var_1) -> +	happyIn275+		 (happy_var_1+	)}++happyReduce_683 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_683 = happyMonadReduce 3# 259# happyReduction_683+happyReduction_683 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut315 happy_x_2 of { (HappyWrap315 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                   [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn275 r))++happyReduce_684 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_684 = happySpecReduce_1  260# happyReduction_684+happyReduction_684 happy_x_1+	 =  case happyOut314 happy_x_1 of { (HappyWrap314 happy_var_1) -> +	happyIn276+		 (happy_var_1+	)}++happyReduce_685 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_685 = happyMonadReduce 3# 260# happyReduction_685+happyReduction_685 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut316 happy_x_2 of { (HappyWrap316 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn276 r))++happyReduce_686 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_686 = happySpecReduce_1  260# happyReduction_686+happyReduction_686 happy_x_1+	 =  case happyOut279 happy_x_1 of { (HappyWrap279 happy_var_1) -> +	happyIn276+		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc happy_var_1))+	)}++happyReduce_687 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_687 = happySpecReduce_1  261# happyReduction_687+happyReduction_687 happy_x_1+	 =  case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> +	happyIn277+		 (sL1 happy_var_1 [happy_var_1]+	)}++happyReduce_688 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_688 = happyMonadReduce 3# 261# happyReduction_688+happyReduction_688 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOut276 happy_x_1 of { (HappyWrap276 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOut277 happy_x_3 of { (HappyWrap277 happy_var_3) -> +	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2) >>+                                   return (sLL happy_var_1 happy_var_3 (happy_var_1 : unLoc happy_var_3)))}}})+	) (\r -> happyReturn (happyIn277 r))++happyReduce_689 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_689 = happyMonadReduce 2# 262# happyReduction_689+happyReduction_689 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 unitDataCon) [mop happy_var_1,mcp happy_var_2])}})+	) (\r -> happyReturn (happyIn278 r))++happyReduce_690 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_690 = happyMonadReduce 3# 262# happyReduction_690+happyReduction_690 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut320 happy_x_2 of { (HappyWrap320 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ tupleDataCon Boxed (snd happy_var_2 + 1))+                                       (mop happy_var_1:mcp happy_var_3:(mcommas (fst happy_var_2))))}}})+	) (\r -> happyReturn (happyIn278 r))++happyReduce_691 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_691 = happyMonadReduce 2# 262# happyReduction_691+happyReduction_691 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 $ unboxedUnitDataCon) [mo happy_var_1,mc happy_var_2])}})+	) (\r -> happyReturn (happyIn278 r))++happyReduce_692 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_692 = happyMonadReduce 3# 262# happyReduction_692+happyReduction_692 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut320 happy_x_2 of { (HappyWrap320 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ tupleDataCon Unboxed (snd happy_var_2 + 1))+                                       (mo happy_var_1:mc happy_var_3:(mcommas (fst happy_var_2))))}}})+	) (\r -> happyReturn (happyIn278 r))++happyReduce_693 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_693 = happySpecReduce_1  263# happyReduction_693+happyReduction_693 happy_x_1+	 =  case happyOut278 happy_x_1 of { (HappyWrap278 happy_var_1) -> +	happyIn279+		 (happy_var_1+	)}++happyReduce_694 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_694 = happyMonadReduce 2# 263# happyReduction_694+happyReduction_694 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 nilDataCon) [mos happy_var_1,mcs happy_var_2])}})+	) (\r -> happyReturn (happyIn279 r))++happyReduce_695 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_695 = happySpecReduce_1  264# happyReduction_695+happyReduction_695 happy_x_1+	 =  case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> +	happyIn280+		 (happy_var_1+	)}++happyReduce_696 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_696 = happyMonadReduce 3# 264# happyReduction_696+happyReduction_696 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut314 happy_x_2 of { (HappyWrap314 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                       ,mj AnnBackquote happy_var_3])}}})+	) (\r -> happyReturn (happyIn280 r))++happyReduce_697 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_697 = happySpecReduce_1  265# happyReduction_697+happyReduction_697 happy_x_1+	 =  case happyOut315 happy_x_1 of { (HappyWrap315 happy_var_1) -> +	happyIn281+		 (happy_var_1+	)}++happyReduce_698 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_698 = happyMonadReduce 3# 265# happyReduction_698+happyReduction_698 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut313 happy_x_2 of { (HappyWrap313 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                       ,mj AnnBackquote happy_var_3])}}})+	) (\r -> happyReturn (happyIn281 r))++happyReduce_699 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_699 = happySpecReduce_1  266# happyReduction_699+happyReduction_699 happy_x_1+	 =  case happyOut283 happy_x_1 of { (HappyWrap283 happy_var_1) -> +	happyIn282+		 (happy_var_1+	)}++happyReduce_700 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_700 = happyMonadReduce 2# 266# happyReduction_700+happyReduction_700 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 $ getRdrName unitTyCon)+                                              [mop happy_var_1,mcp happy_var_2])}})+	) (\r -> happyReturn (happyIn282 r))++happyReduce_701 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_701 = happyMonadReduce 2# 266# happyReduction_701+happyReduction_701 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 $ getRdrName unboxedUnitTyCon)+                                              [mo happy_var_1,mc happy_var_2])}})+	) (\r -> happyReturn (happyIn282 r))++happyReduce_702 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_702 = happySpecReduce_1  267# happyReduction_702+happyReduction_702 happy_x_1+	 =  case happyOut284 happy_x_1 of { (HappyWrap284 happy_var_1) -> +	happyIn283+		 (happy_var_1+	)}++happyReduce_703 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_703 = happyMonadReduce 3# 267# happyReduction_703+happyReduction_703 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut320 happy_x_2 of { (HappyWrap320 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Boxed+                                                        (snd happy_var_2 + 1)))+                                       (mop happy_var_1:mcp happy_var_3:(mcommas (fst happy_var_2))))}}})+	) (\r -> happyReturn (happyIn283 r))++happyReduce_704 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_704 = happyMonadReduce 3# 267# happyReduction_704+happyReduction_704 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut320 happy_x_2 of { (HappyWrap320 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ getRdrName (tupleTyCon Unboxed+                                                        (snd happy_var_2 + 1)))+                                       (mo happy_var_1:mc happy_var_3:(mcommas (fst happy_var_2))))}}})+	) (\r -> happyReturn (happyIn283 r))++happyReduce_705 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_705 = happyMonadReduce 3# 267# happyReduction_705+happyReduction_705 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ getRdrName funTyCon)+                                       [mop happy_var_1,mu AnnRarrow happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn283 r))++happyReduce_706 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_706 = happyMonadReduce 2# 267# happyReduction_706+happyReduction_706 (happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	( ams (sLL happy_var_1 happy_var_2 $ listTyCon_RDR) [mos happy_var_1,mcs happy_var_2])}})+	) (\r -> happyReturn (happyIn283 r))++happyReduce_707 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_707 = happySpecReduce_1  268# happyReduction_707+happyReduction_707 happy_x_1+	 =  case happyOut287 happy_x_1 of { (HappyWrap287 happy_var_1) -> +	happyIn284+		 (happy_var_1+	)}++happyReduce_708 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_708 = happyMonadReduce 3# 268# happyReduction_708+happyReduction_708 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut290 happy_x_2 of { (HappyWrap290 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                               [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn284 r))++happyReduce_709 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_709 = happySpecReduce_1  269# happyReduction_709+happyReduction_709 happy_x_1+	 =  case happyOut287 happy_x_1 of { (HappyWrap287 happy_var_1) -> +	happyIn285+		 (happy_var_1+	)}++happyReduce_710 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_710 = happyMonadReduce 3# 269# happyReduction_710+happyReduction_710 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( let { name :: Located RdrName+                                    ; name = sL1 happy_var_2 $! mkQual tcClsName (getQCONSYM happy_var_2) }+                                in ams (sLL happy_var_1 happy_var_3 (unLoc name)) [mop happy_var_1,mj AnnVal name,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn285 r))++happyReduce_711 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_711 = happyMonadReduce 3# 269# happyReduction_711+happyReduction_711 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( let { name :: Located RdrName+                                    ; name = sL1 happy_var_2 $! mkUnqual tcClsName (getCONSYM happy_var_2) }+                                in ams (sLL happy_var_1 happy_var_3 (unLoc name)) [mop happy_var_1,mj AnnVal name,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn285 r))++happyReduce_712 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_712 = happyMonadReduce 3# 269# happyReduction_712+happyReduction_712 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( let { name :: Located RdrName+                                    ; name = sL1 happy_var_2 $! consDataCon_RDR }+                                in ams (sLL happy_var_1 happy_var_3 (unLoc name)) [mop happy_var_1,mj AnnVal name,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn285 r))++happyReduce_713 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_713 = happyMonadReduce 3# 269# happyReduction_713+happyReduction_713 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 $ eqTyCon_RDR) [mop happy_var_1,mj AnnTilde happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn285 r))++happyReduce_714 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_714 = happySpecReduce_1  270# happyReduction_714+happyReduction_714 happy_x_1+	 =  case happyOut290 happy_x_1 of { (HappyWrap290 happy_var_1) -> +	happyIn286+		 (happy_var_1+	)}++happyReduce_715 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_715 = happyMonadReduce 3# 270# happyReduction_715+happyReduction_715 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut287 happy_x_2 of { (HappyWrap287 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                               [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                               ,mj AnnBackquote happy_var_3])}}})+	) (\r -> happyReturn (happyIn286 r))++happyReduce_716 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_716 = happySpecReduce_1  271# happyReduction_716+happyReduction_716 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn287+		 (sL1 happy_var_1 $! mkQual tcClsName (getQCONID happy_var_1)+	)}++happyReduce_717 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_717 = happySpecReduce_1  271# happyReduction_717+happyReduction_717 happy_x_1+	 =  case happyOut289 happy_x_1 of { (HappyWrap289 happy_var_1) -> +	happyIn287+		 (happy_var_1+	)}++happyReduce_718 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_718 = happySpecReduce_1  272# happyReduction_718+happyReduction_718 happy_x_1+	 =  case happyOut287 happy_x_1 of { (HappyWrap287 happy_var_1) -> +	happyIn288+		 (sL1 happy_var_1                           (HsTyVar noExtField NotPromoted happy_var_1)+	)}++happyReduce_719 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_719 = happySpecReduce_2  272# happyReduction_719+happyReduction_719 happy_x_2+	happy_x_1+	 =  case happyOut287 happy_x_1 of { (HappyWrap287 happy_var_1) -> +	case happyOut324 happy_x_2 of { (HappyWrap324 happy_var_2) -> +	happyIn288+		 (sLL happy_var_1 happy_var_2 (HsDocTy noExtField (sL1 happy_var_1 (HsTyVar noExtField NotPromoted happy_var_1)) happy_var_2)+	)}}++happyReduce_720 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_720 = happySpecReduce_1  273# happyReduction_720+happyReduction_720 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn289+		 (sL1 happy_var_1 $! mkUnqual tcClsName (getCONID happy_var_1)+	)}++happyReduce_721 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_721 = happySpecReduce_1  274# happyReduction_721+happyReduction_721 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn290+		 (sL1 happy_var_1 $! mkQual tcClsName (getQCONSYM happy_var_1)+	)}++happyReduce_722 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_722 = happySpecReduce_1  274# happyReduction_722+happyReduction_722 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn290+		 (sL1 happy_var_1 $! mkQual tcClsName (getQVARSYM happy_var_1)+	)}++happyReduce_723 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_723 = happySpecReduce_1  274# happyReduction_723+happyReduction_723 happy_x_1+	 =  case happyOut291 happy_x_1 of { (HappyWrap291 happy_var_1) -> +	happyIn290+		 (happy_var_1+	)}++happyReduce_724 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_724 = happySpecReduce_1  275# happyReduction_724+happyReduction_724 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn291+		 (sL1 happy_var_1 $! mkUnqual tcClsName (getCONSYM happy_var_1)+	)}++happyReduce_725 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_725 = happySpecReduce_1  275# happyReduction_725+happyReduction_725 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn291+		 (sL1 happy_var_1 $! mkUnqual tcClsName (getVARSYM happy_var_1)+	)}++happyReduce_726 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_726 = happySpecReduce_1  275# happyReduction_726+happyReduction_726 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn291+		 (sL1 happy_var_1 $! consDataCon_RDR+	)}++happyReduce_727 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_727 = happySpecReduce_1  275# happyReduction_727+happyReduction_727 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn291+		 (sL1 happy_var_1 $! mkUnqual tcClsName (fsLit "-")+	)}++happyReduce_728 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_728 = happySpecReduce_1  275# happyReduction_728+happyReduction_728 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn291+		 (sL1 happy_var_1 $! mkUnqual tcClsName (fsLit "!")+	)}++happyReduce_729 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_729 = happySpecReduce_1  275# happyReduction_729+happyReduction_729 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn291+		 (sL1 happy_var_1 $! mkUnqual tcClsName (fsLit ".")+	)}++happyReduce_730 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_730 = happySpecReduce_1  275# happyReduction_730+happyReduction_730 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn291+		 (sL1 happy_var_1 $ eqTyCon_RDR+	)}++happyReduce_731 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_731 = happySpecReduce_1  276# happyReduction_731+happyReduction_731 happy_x_1+	 =  case happyOut293 happy_x_1 of { (HappyWrap293 happy_var_1) -> +	happyIn292+		 (happy_var_1+	)}++happyReduce_732 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_732 = happySpecReduce_1  276# happyReduction_732+happyReduction_732 happy_x_1+	 =  case happyOut280 happy_x_1 of { (HappyWrap280 happy_var_1) -> +	happyIn292+		 (happy_var_1+	)}++happyReduce_733 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_733 = happySpecReduce_1  276# happyReduction_733+happyReduction_733 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn292+		 (sL1 happy_var_1 $ getRdrName funTyCon+	)}++happyReduce_734 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_734 = happySpecReduce_1  276# happyReduction_734+happyReduction_734 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn292+		 (sL1 happy_var_1 $ eqTyCon_RDR+	)}++happyReduce_735 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_735 = happySpecReduce_1  277# happyReduction_735+happyReduction_735 happy_x_1+	 =  case happyOut309 happy_x_1 of { (HappyWrap309 happy_var_1) -> +	happyIn293+		 (happy_var_1+	)}++happyReduce_736 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_736 = happyMonadReduce 3# 277# happyReduction_736+happyReduction_736 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut305 happy_x_2 of { (HappyWrap305 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                       ,mj AnnBackquote happy_var_3])}}})+	) (\r -> happyReturn (happyIn293 r))++happyReduce_737 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_737 = happySpecReduce_1  278# happyReduction_737+happyReduction_737 happy_x_1+	 =  case happyOut297 happy_x_1 of { (HappyWrap297 happy_var_1) -> +	happyIn294+		 (mkHsVarOpPV happy_var_1+	)}++happyReduce_738 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_738 = happySpecReduce_1  278# happyReduction_738+happyReduction_738 happy_x_1+	 =  case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> +	happyIn294+		 (mkHsConOpPV happy_var_1+	)}++happyReduce_739 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_739 = happySpecReduce_1  278# happyReduction_739+happyReduction_739 happy_x_1+	 =  case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> +	happyIn294+		 (happy_var_1+	)}++happyReduce_740 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_740 = happySpecReduce_1  279# happyReduction_740+happyReduction_740 happy_x_1+	 =  case happyOut298 happy_x_1 of { (HappyWrap298 happy_var_1) -> +	happyIn295+		 (mkHsVarOpPV happy_var_1+	)}++happyReduce_741 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_741 = happySpecReduce_1  279# happyReduction_741+happyReduction_741 happy_x_1+	 =  case happyOut281 happy_x_1 of { (HappyWrap281 happy_var_1) -> +	happyIn295+		 (mkHsConOpPV happy_var_1+	)}++happyReduce_742 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_742 = happySpecReduce_1  279# happyReduction_742+happyReduction_742 happy_x_1+	 =  case happyOut296 happy_x_1 of { (HappyWrap296 happy_var_1) -> +	happyIn295+		 (happy_var_1+	)}++happyReduce_743 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_743 = happySpecReduce_3  280# happyReduction_743+happyReduction_743 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	happyIn296+		 (amms (mkHsInfixHolePV (comb2 happy_var_1 happy_var_3))+                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                       ,mj AnnBackquote happy_var_3]+	)}}}++happyReduce_744 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_744 = happySpecReduce_1  281# happyReduction_744+happyReduction_744 happy_x_1+	 =  case happyOut306 happy_x_1 of { (HappyWrap306 happy_var_1) -> +	happyIn297+		 (happy_var_1+	)}++happyReduce_745 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_745 = happyMonadReduce 3# 281# happyReduction_745+happyReduction_745 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut304 happy_x_2 of { (HappyWrap304 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                       ,mj AnnBackquote happy_var_3])}}})+	) (\r -> happyReturn (happyIn297 r))++happyReduce_746 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_746 = happySpecReduce_1  282# happyReduction_746+happyReduction_746 happy_x_1+	 =  case happyOut307 happy_x_1 of { (HappyWrap307 happy_var_1) -> +	happyIn298+		 (happy_var_1+	)}++happyReduce_747 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_747 = happyMonadReduce 3# 282# happyReduction_747+happyReduction_747 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut304 happy_x_2 of { (HappyWrap304 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                       ,mj AnnBackquote happy_var_3])}}})+	) (\r -> happyReturn (happyIn298 r))++happyReduce_748 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_748 = happySpecReduce_1  283# happyReduction_748+happyReduction_748 happy_x_1+	 =  case happyOut301 happy_x_1 of { (HappyWrap301 happy_var_1) -> +	happyIn299+		 (happy_var_1+	)}++happyReduce_749 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_749 = happyMonadReduce 3# 284# happyReduction_749+happyReduction_749 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut301 happy_x_2 of { (HappyWrap301 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2+                                       ,mj AnnBackquote happy_var_3])}}})+	) (\r -> happyReturn (happyIn300 r))++happyReduce_750 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_750 = happySpecReduce_1  285# happyReduction_750+happyReduction_750 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn301+		 (sL1 happy_var_1 $! mkUnqual tvName (getVARID happy_var_1)+	)}++happyReduce_751 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_751 = happySpecReduce_1  285# happyReduction_751+happyReduction_751 happy_x_1+	 =  case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> +	happyIn301+		 (sL1 happy_var_1 $! mkUnqual tvName (unLoc happy_var_1)+	)}++happyReduce_752 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_752 = happySpecReduce_1  285# happyReduction_752+happyReduction_752 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn301+		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "unsafe")+	)}++happyReduce_753 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_753 = happySpecReduce_1  285# happyReduction_753+happyReduction_753 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn301+		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "safe")+	)}++happyReduce_754 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_754 = happySpecReduce_1  285# happyReduction_754+happyReduction_754 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn301+		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "interruptible")+	)}++happyReduce_755 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_755 = happySpecReduce_1  286# happyReduction_755+happyReduction_755 happy_x_1+	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> +	happyIn302+		 (happy_var_1+	)}++happyReduce_756 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_756 = happyMonadReduce 3# 286# happyReduction_756+happyReduction_756 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut309 happy_x_2 of { (HappyWrap309 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn302 r))++happyReduce_757 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_757 = happySpecReduce_1  287# happyReduction_757+happyReduction_757 happy_x_1+	 =  case happyOut304 happy_x_1 of { (HappyWrap304 happy_var_1) -> +	happyIn303+		 (happy_var_1+	)}++happyReduce_758 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_758 = happyMonadReduce 3# 287# happyReduction_758+happyReduction_758 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut309 happy_x_2 of { (HappyWrap309 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn303 r))++happyReduce_759 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_759 = happyMonadReduce 3# 287# happyReduction_759+happyReduction_759 (happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	case happyOut308 happy_x_2 of { (HappyWrap308 happy_var_2) -> +	case happyOutTok happy_x_3 of { happy_var_3 -> +	( ams (sLL happy_var_1 happy_var_3 (unLoc happy_var_2))+                                       [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})+	) (\r -> happyReturn (happyIn303 r))++happyReduce_760 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_760 = happySpecReduce_1  288# happyReduction_760+happyReduction_760 happy_x_1+	 =  case happyOut305 happy_x_1 of { (HappyWrap305 happy_var_1) -> +	happyIn304+		 (happy_var_1+	)}++happyReduce_761 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_761 = happySpecReduce_1  288# happyReduction_761+happyReduction_761 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn304+		 (sL1 happy_var_1 $! mkQual varName (getQVARID happy_var_1)+	)}++happyReduce_762 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_762 = happySpecReduce_1  289# happyReduction_762+happyReduction_762 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (getVARID happy_var_1)+	)}++happyReduce_763 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_763 = happySpecReduce_1  289# happyReduction_763+happyReduction_763 happy_x_1+	 =  case happyOut311 happy_x_1 of { (HappyWrap311 happy_var_1) -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (unLoc happy_var_1)+	)}++happyReduce_764 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_764 = happySpecReduce_1  289# happyReduction_764+happyReduction_764 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "unsafe")+	)}++happyReduce_765 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_765 = happySpecReduce_1  289# happyReduction_765+happyReduction_765 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "safe")+	)}++happyReduce_766 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_766 = happySpecReduce_1  289# happyReduction_766+happyReduction_766 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "interruptible")+	)}++happyReduce_767 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_767 = happySpecReduce_1  289# happyReduction_767+happyReduction_767 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "forall")+	)}++happyReduce_768 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_768 = happySpecReduce_1  289# happyReduction_768+happyReduction_768 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "family")+	)}++happyReduce_769 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_769 = happySpecReduce_1  289# happyReduction_769+happyReduction_769 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn305+		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "role")+	)}++happyReduce_770 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_770 = happySpecReduce_1  290# happyReduction_770+happyReduction_770 happy_x_1+	 =  case happyOut309 happy_x_1 of { (HappyWrap309 happy_var_1) -> +	happyIn306+		 (happy_var_1+	)}++happyReduce_771 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_771 = happySpecReduce_1  290# happyReduction_771+happyReduction_771 happy_x_1+	 =  case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> +	happyIn306+		 (happy_var_1+	)}++happyReduce_772 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_772 = happySpecReduce_1  291# happyReduction_772+happyReduction_772 happy_x_1+	 =  case happyOut310 happy_x_1 of { (HappyWrap310 happy_var_1) -> +	happyIn307+		 (happy_var_1+	)}++happyReduce_773 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_773 = happySpecReduce_1  291# happyReduction_773+happyReduction_773 happy_x_1+	 =  case happyOut308 happy_x_1 of { (HappyWrap308 happy_var_1) -> +	happyIn307+		 (happy_var_1+	)}++happyReduce_774 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_774 = happySpecReduce_1  292# happyReduction_774+happyReduction_774 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn308+		 (sL1 happy_var_1 $ mkQual varName (getQVARSYM happy_var_1)+	)}++happyReduce_775 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_775 = happySpecReduce_1  293# happyReduction_775+happyReduction_775 happy_x_1+	 =  case happyOut310 happy_x_1 of { (HappyWrap310 happy_var_1) -> +	happyIn309+		 (happy_var_1+	)}++happyReduce_776 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_776 = happySpecReduce_1  293# happyReduction_776+happyReduction_776 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn309+		 (sL1 happy_var_1 $ mkUnqual varName (fsLit "-")+	)}++happyReduce_777 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_777 = happySpecReduce_1  294# happyReduction_777+happyReduction_777 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn310+		 (sL1 happy_var_1 $ mkUnqual varName (getVARSYM happy_var_1)+	)}++happyReduce_778 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_778 = happySpecReduce_1  294# happyReduction_778+happyReduction_778 happy_x_1+	 =  case happyOut312 happy_x_1 of { (HappyWrap312 happy_var_1) -> +	happyIn310+		 (sL1 happy_var_1 $ mkUnqual varName (unLoc happy_var_1)+	)}++happyReduce_779 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_779 = happySpecReduce_1  295# happyReduction_779+happyReduction_779 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "as")+	)}++happyReduce_780 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_780 = happySpecReduce_1  295# happyReduction_780+happyReduction_780 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "qualified")+	)}++happyReduce_781 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_781 = happySpecReduce_1  295# happyReduction_781+happyReduction_781 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "hiding")+	)}++happyReduce_782 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_782 = happySpecReduce_1  295# happyReduction_782+happyReduction_782 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "export")+	)}++happyReduce_783 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_783 = happySpecReduce_1  295# happyReduction_783+happyReduction_783 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "label")+	)}++happyReduce_784 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_784 = happySpecReduce_1  295# happyReduction_784+happyReduction_784 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "dynamic")+	)}++happyReduce_785 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_785 = happySpecReduce_1  295# happyReduction_785+happyReduction_785 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "stdcall")+	)}++happyReduce_786 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_786 = happySpecReduce_1  295# happyReduction_786+happyReduction_786 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "ccall")+	)}++happyReduce_787 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_787 = happySpecReduce_1  295# happyReduction_787+happyReduction_787 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "capi")+	)}++happyReduce_788 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_788 = happySpecReduce_1  295# happyReduction_788+happyReduction_788 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "prim")+	)}++happyReduce_789 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_789 = happySpecReduce_1  295# happyReduction_789+happyReduction_789 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "javascript")+	)}++happyReduce_790 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_790 = happySpecReduce_1  295# happyReduction_790+happyReduction_790 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "group")+	)}++happyReduce_791 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_791 = happySpecReduce_1  295# happyReduction_791+happyReduction_791 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "stock")+	)}++happyReduce_792 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_792 = happySpecReduce_1  295# happyReduction_792+happyReduction_792 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "anyclass")+	)}++happyReduce_793 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_793 = happySpecReduce_1  295# happyReduction_793+happyReduction_793 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "via")+	)}++happyReduce_794 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_794 = happySpecReduce_1  295# happyReduction_794+happyReduction_794 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "unit")+	)}++happyReduce_795 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_795 = happySpecReduce_1  295# happyReduction_795+happyReduction_795 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "dependency")+	)}++happyReduce_796 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_796 = happySpecReduce_1  295# happyReduction_796+happyReduction_796 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn311+		 (sL1 happy_var_1 (fsLit "signature")+	)}++happyReduce_797 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_797 = happyMonadReduce 1# 296# happyReduction_797+happyReduction_797 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( ams (sL1 happy_var_1 (fsLit "!")) [mj AnnBang happy_var_1])})+	) (\r -> happyReturn (happyIn312 r))++happyReduce_798 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_798 = happySpecReduce_1  296# happyReduction_798+happyReduction_798 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn312+		 (sL1 happy_var_1 (fsLit ".")+	)}++happyReduce_799 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_799 = happySpecReduce_1  296# happyReduction_799+happyReduction_799 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn312+		 (sL1 happy_var_1 (fsLit (starSym (isUnicode happy_var_1)))+	)}++happyReduce_800 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_800 = happySpecReduce_1  297# happyReduction_800+happyReduction_800 happy_x_1+	 =  case happyOut314 happy_x_1 of { (HappyWrap314 happy_var_1) -> +	happyIn313+		 (happy_var_1+	)}++happyReduce_801 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_801 = happySpecReduce_1  297# happyReduction_801+happyReduction_801 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn313+		 (sL1 happy_var_1 $! mkQual dataName (getQCONID happy_var_1)+	)}++happyReduce_802 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_802 = happySpecReduce_1  298# happyReduction_802+happyReduction_802 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn314+		 (sL1 happy_var_1 $ mkUnqual dataName (getCONID happy_var_1)+	)}++happyReduce_803 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_803 = happySpecReduce_1  299# happyReduction_803+happyReduction_803 happy_x_1+	 =  case happyOut316 happy_x_1 of { (HappyWrap316 happy_var_1) -> +	happyIn315+		 (happy_var_1+	)}++happyReduce_804 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_804 = happySpecReduce_1  299# happyReduction_804+happyReduction_804 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn315+		 (sL1 happy_var_1 $ mkQual dataName (getQCONSYM happy_var_1)+	)}++happyReduce_805 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_805 = happySpecReduce_1  300# happyReduction_805+happyReduction_805 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn316+		 (sL1 happy_var_1 $ mkUnqual dataName (getCONSYM happy_var_1)+	)}++happyReduce_806 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_806 = happySpecReduce_1  300# happyReduction_806+happyReduction_806 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn316+		 (sL1 happy_var_1 $ consDataCon_RDR+	)}++happyReduce_807 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_807 = happySpecReduce_1  301# happyReduction_807+happyReduction_807 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsChar       (getCHARs happy_var_1) $ getCHAR happy_var_1+	)}++happyReduce_808 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_808 = happySpecReduce_1  301# happyReduction_808+happyReduction_808 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsString     (getSTRINGs happy_var_1)+                                                    $ getSTRING happy_var_1+	)}++happyReduce_809 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_809 = happySpecReduce_1  301# happyReduction_809+happyReduction_809 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsIntPrim    (getPRIMINTEGERs happy_var_1)+                                                    $ getPRIMINTEGER happy_var_1+	)}++happyReduce_810 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_810 = happySpecReduce_1  301# happyReduction_810+happyReduction_810 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsWordPrim   (getPRIMWORDs happy_var_1)+                                                    $ getPRIMWORD happy_var_1+	)}++happyReduce_811 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_811 = happySpecReduce_1  301# happyReduction_811+happyReduction_811 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsCharPrim   (getPRIMCHARs happy_var_1)+                                                    $ getPRIMCHAR happy_var_1+	)}++happyReduce_812 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_812 = happySpecReduce_1  301# happyReduction_812+happyReduction_812 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsStringPrim (getPRIMSTRINGs happy_var_1)+                                                    $ getPRIMSTRING happy_var_1+	)}++happyReduce_813 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_813 = happySpecReduce_1  301# happyReduction_813+happyReduction_813 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsFloatPrim  noExtField $ getPRIMFLOAT happy_var_1+	)}++happyReduce_814 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_814 = happySpecReduce_1  301# happyReduction_814+happyReduction_814 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn317+		 (sL1 happy_var_1 $ HsDoublePrim noExtField $ getPRIMDOUBLE happy_var_1+	)}++happyReduce_815 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_815 = happySpecReduce_1  302# happyReduction_815+happyReduction_815 happy_x_1+	 =  happyIn318+		 (()+	)++happyReduce_816 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_816 = happyMonadReduce 1# 302# happyReduction_816+happyReduction_816 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((( popContext))+	) (\r -> happyReturn (happyIn318 r))++happyReduce_817 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_817 = happySpecReduce_1  303# happyReduction_817+happyReduction_817 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn319+		 (sL1 happy_var_1 $ mkModuleNameFS (getCONID happy_var_1)+	)}++happyReduce_818 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_818 = happySpecReduce_1  303# happyReduction_818+happyReduction_818 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn319+		 (sL1 happy_var_1 $ let (mod,c) = getQCONID happy_var_1 in+                                  mkModuleNameFS+                                   (mkFastString+                                     (unpackFS mod ++ '.':unpackFS c))+	)}++happyReduce_819 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_819 = happySpecReduce_2  304# happyReduction_819+happyReduction_819 happy_x_2+	happy_x_1+	 =  case happyOut320 happy_x_1 of { (HappyWrap320 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn320+		 (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)+	)}}++happyReduce_820 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_820 = happySpecReduce_1  304# happyReduction_820+happyReduction_820 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn320+		 (([gl happy_var_1],1)+	)}++happyReduce_821 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_821 = happySpecReduce_1  305# happyReduction_821+happyReduction_821 happy_x_1+	 =  case happyOut322 happy_x_1 of { (HappyWrap322 happy_var_1) -> +	happyIn321+		 (happy_var_1+	)}++happyReduce_822 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_822 = happySpecReduce_0  305# happyReduction_822+happyReduction_822  =  happyIn321+		 (([], 0)+	)++happyReduce_823 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_823 = happySpecReduce_2  306# happyReduction_823+happyReduction_823 happy_x_2+	happy_x_1+	 =  case happyOut322 happy_x_1 of { (HappyWrap322 happy_var_1) -> +	case happyOutTok happy_x_2 of { happy_var_2 -> +	happyIn322+		 (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)+	)}}++happyReduce_824 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_824 = happySpecReduce_1  306# happyReduction_824+happyReduction_824 happy_x_1+	 =  case happyOutTok happy_x_1 of { happy_var_1 -> +	happyIn322+		 (([gl happy_var_1],1)+	)}++happyReduce_825 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_825 = happyMonadReduce 1# 307# happyReduction_825+happyReduction_825 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( return (sL1 happy_var_1 (mkHsDocString (getDOCNEXT happy_var_1))))})+	) (\r -> happyReturn (happyIn323 r))++happyReduce_826 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_826 = happyMonadReduce 1# 308# happyReduction_826+happyReduction_826 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( return (sL1 happy_var_1 (mkHsDocString (getDOCPREV happy_var_1))))})+	) (\r -> happyReturn (happyIn324 r))++happyReduce_827 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_827 = happyMonadReduce 1# 309# happyReduction_827+happyReduction_827 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	(+      let string = getDOCNAMED happy_var_1+          (name, rest) = break isSpace string+      in return (sL1 happy_var_1 (name, mkHsDocString rest)))})+	) (\r -> happyReturn (happyIn325 r))++happyReduce_828 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_828 = happyMonadReduce 1# 310# happyReduction_828+happyReduction_828 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( let (n, doc) = getDOCSECTION happy_var_1 in+        return (sL1 happy_var_1 (n, mkHsDocString doc)))})+	) (\r -> happyReturn (happyIn326 r))++happyReduce_829 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_829 = happyMonadReduce 1# 311# happyReduction_829+happyReduction_829 (happy_x_1 `HappyStk`+	happyRest) tk+	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> +	( let string = getDOCNEXT happy_var_1 in+                     return (Just (sL1 happy_var_1 (mkHsDocString string))))})+	) (\r -> happyReturn (happyIn327 r))++happyReduce_830 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_830 = happySpecReduce_1  312# happyReduction_830+happyReduction_830 happy_x_1+	 =  case happyOut324 happy_x_1 of { (HappyWrap324 happy_var_1) -> +	happyIn328+		 (Just happy_var_1+	)}++happyReduce_831 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_831 = happySpecReduce_0  312# happyReduction_831+happyReduction_831  =  happyIn328+		 (Nothing+	)++happyReduce_832 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_832 = happySpecReduce_1  313# happyReduction_832+happyReduction_832 happy_x_1+	 =  case happyOut323 happy_x_1 of { (HappyWrap323 happy_var_1) -> +	happyIn329+		 (Just happy_var_1+	)}++happyReduce_833 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )+happyReduce_833 = happySpecReduce_0  313# happyReduction_833+happyReduction_833  =  happyIn329+		 (Nothing+	)++happyNewToken action sts stk+	= (lexer True)(\tk -> +	let cont i = happyDoAction i tk action sts stk in+	case tk of {+	L _ ITeof -> happyDoAction 153# tk action sts stk;+	L _ ITunderscore -> cont 1#;+	L _ ITas -> cont 2#;+	L _ ITcase -> cont 3#;+	L _ ITclass -> cont 4#;+	L _ ITdata -> cont 5#;+	L _ ITdefault -> cont 6#;+	L _ ITderiving -> cont 7#;+	L _ ITdo -> cont 8#;+	L _ ITelse -> cont 9#;+	L _ IThiding -> cont 10#;+	L _ ITif -> cont 11#;+	L _ ITimport -> cont 12#;+	L _ ITin -> cont 13#;+	L _ ITinfix -> cont 14#;+	L _ ITinfixl -> cont 15#;+	L _ ITinfixr -> cont 16#;+	L _ ITinstance -> cont 17#;+	L _ ITlet -> cont 18#;+	L _ ITmodule -> cont 19#;+	L _ ITnewtype -> cont 20#;+	L _ ITof -> cont 21#;+	L _ ITqualified -> cont 22#;+	L _ ITthen -> cont 23#;+	L _ ITtype -> cont 24#;+	L _ ITwhere -> cont 25#;+	L _ (ITforall _) -> cont 26#;+	L _ ITforeign -> cont 27#;+	L _ ITexport -> cont 28#;+	L _ ITlabel -> cont 29#;+	L _ ITdynamic -> cont 30#;+	L _ ITsafe -> cont 31#;+	L _ ITinterruptible -> cont 32#;+	L _ ITunsafe -> cont 33#;+	L _ ITmdo -> cont 34#;+	L _ ITfamily -> cont 35#;+	L _ ITrole -> cont 36#;+	L _ ITstdcallconv -> cont 37#;+	L _ ITccallconv -> cont 38#;+	L _ ITcapiconv -> cont 39#;+	L _ ITprimcallconv -> cont 40#;+	L _ ITjavascriptcallconv -> cont 41#;+	L _ ITproc -> cont 42#;+	L _ ITrec -> cont 43#;+	L _ ITgroup -> cont 44#;+	L _ ITby -> cont 45#;+	L _ ITusing -> cont 46#;+	L _ ITpattern -> cont 47#;+	L _ ITstatic -> cont 48#;+	L _ ITstock -> cont 49#;+	L _ ITanyclass -> cont 50#;+	L _ ITvia -> cont 51#;+	L _ ITunit -> cont 52#;+	L _ ITsignature -> cont 53#;+	L _ ITdependency -> cont 54#;+	L _ (ITinline_prag _ _ _) -> cont 55#;+	L _ (ITspec_prag _) -> cont 56#;+	L _ (ITspec_inline_prag _ _) -> cont 57#;+	L _ (ITsource_prag _) -> cont 58#;+	L _ (ITrules_prag _) -> cont 59#;+	L _ (ITcore_prag _) -> cont 60#;+	L _ (ITscc_prag _) -> cont 61#;+	L _ (ITgenerated_prag _) -> cont 62#;+	L _ (ITdeprecated_prag _) -> cont 63#;+	L _ (ITwarning_prag _) -> cont 64#;+	L _ (ITunpack_prag _) -> cont 65#;+	L _ (ITnounpack_prag _) -> cont 66#;+	L _ (ITann_prag _) -> cont 67#;+	L _ (ITminimal_prag _) -> cont 68#;+	L _ (ITctype _) -> cont 69#;+	L _ (IToverlapping_prag _) -> cont 70#;+	L _ (IToverlappable_prag _) -> cont 71#;+	L _ (IToverlaps_prag _) -> cont 72#;+	L _ (ITincoherent_prag _) -> cont 73#;+	L _ (ITcomplete_prag _) -> cont 74#;+	L _ ITclose_prag -> cont 75#;+	L _ ITdotdot -> cont 76#;+	L _ ITcolon -> cont 77#;+	L _ (ITdcolon _) -> cont 78#;+	L _ ITequal -> cont 79#;+	L _ ITlam -> cont 80#;+	L _ ITlcase -> cont 81#;+	L _ ITvbar -> cont 82#;+	L _ (ITlarrow _) -> cont 83#;+	L _ (ITrarrow _) -> cont 84#;+	L _ ITat -> cont 85#;+	L _ ITtilde -> cont 86#;+	L _ (ITdarrow _) -> cont 87#;+	L _ ITminus -> cont 88#;+	L _ ITbang -> cont 89#;+	L _ (ITstar _) -> cont 90#;+	L _ (ITlarrowtail _) -> cont 91#;+	L _ (ITrarrowtail _) -> cont 92#;+	L _ (ITLarrowtail _) -> cont 93#;+	L _ (ITRarrowtail _) -> cont 94#;+	L _ ITdot -> cont 95#;+	L _ ITtypeApp -> cont 96#;+	L _ ITocurly -> cont 97#;+	L _ ITccurly -> cont 98#;+	L _ ITvocurly -> cont 99#;+	L _ ITvccurly -> cont 100#;+	L _ ITobrack -> cont 101#;+	L _ ITcbrack -> cont 102#;+	L _ ITopabrack -> cont 103#;+	L _ ITcpabrack -> cont 104#;+	L _ IToparen -> cont 105#;+	L _ ITcparen -> cont 106#;+	L _ IToubxparen -> cont 107#;+	L _ ITcubxparen -> cont 108#;+	L _ (IToparenbar _) -> cont 109#;+	L _ (ITcparenbar _) -> cont 110#;+	L _ ITsemi -> cont 111#;+	L _ ITcomma -> cont 112#;+	L _ ITbackquote -> cont 113#;+	L _ ITsimpleQuote -> cont 114#;+	L _ (ITvarid    _) -> cont 115#;+	L _ (ITconid    _) -> cont 116#;+	L _ (ITvarsym   _) -> cont 117#;+	L _ (ITconsym   _) -> cont 118#;+	L _ (ITqvarid   _) -> cont 119#;+	L _ (ITqconid   _) -> cont 120#;+	L _ (ITqvarsym  _) -> cont 121#;+	L _ (ITqconsym  _) -> cont 122#;+	L _ (ITdupipvarid   _) -> cont 123#;+	L _ (ITlabelvarid   _) -> cont 124#;+	L _ (ITchar   _ _) -> cont 125#;+	L _ (ITstring _ _) -> cont 126#;+	L _ (ITinteger _) -> cont 127#;+	L _ (ITrational _) -> cont 128#;+	L _ (ITprimchar   _ _) -> cont 129#;+	L _ (ITprimstring _ _) -> cont 130#;+	L _ (ITprimint    _ _) -> cont 131#;+	L _ (ITprimword   _ _) -> cont 132#;+	L _ (ITprimfloat  _) -> cont 133#;+	L _ (ITprimdouble _) -> cont 134#;+	L _ (ITdocCommentNext _) -> cont 135#;+	L _ (ITdocCommentPrev _) -> cont 136#;+	L _ (ITdocCommentNamed _) -> cont 137#;+	L _ (ITdocSection _ _) -> cont 138#;+	L _ (ITopenExpQuote _ _) -> cont 139#;+	L _ ITopenPatQuote -> cont 140#;+	L _ ITopenTypQuote -> cont 141#;+	L _ ITopenDecQuote -> cont 142#;+	L _ (ITcloseQuote _) -> cont 143#;+	L _ (ITopenTExpQuote _) -> cont 144#;+	L _ ITcloseTExpQuote -> cont 145#;+	L _ (ITidEscape _) -> cont 146#;+	L _ ITparenEscape -> cont 147#;+	L _ (ITidTyEscape _) -> cont 148#;+	L _ ITparenTyEscape -> cont 149#;+	L _ ITtyQuote -> cont 150#;+	L _ (ITquasiQuote _) -> cont 151#;+	L _ (ITqQuasiQuote _) -> cont 152#;+	_ -> happyError' (tk, [])+	})++happyError_ explist 153# tk = happyError' (tk, explist)+happyError_ explist _ tk = happyError' (tk, explist)++happyThen :: () => P a -> (a -> P b) -> P b+happyThen = (>>=)+happyReturn :: () => a -> P a+happyReturn = (return)+happyParse :: () => Happy_GHC_Exts.Int# -> P (HappyAbsSyn )++happyNewToken :: () => Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )++happyDoAction :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )++happyReduceArr :: () => Happy_Data_Array.Array Int (Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn ))++happyThen1 :: () => P a -> (a -> P b) -> P b+happyThen1 = happyThen+happyReturn1 :: () => a -> P a+happyReturn1 = happyReturn+happyError' :: () => (((Located Token)), [String]) -> P a+happyError' tk = (\(tokens, explist) -> happyError) tk+parseModule = happySomeParser where+ happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (let {(HappyWrap34 x') = happyOut34 x} in x'))++parseSignature = happySomeParser where+ happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (let {(HappyWrap33 x') = happyOut33 x} in x'))++parseImport = happySomeParser where+ happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (let {(HappyWrap64 x') = happyOut64 x} in x'))++parseStatement = happySomeParser where+ happySomeParser = happyThen (happyParse 3#) (\x -> happyReturn (let {(HappyWrap256 x') = happyOut256 x} in x'))++parseDeclaration = happySomeParser where+ happySomeParser = happyThen (happyParse 4#) (\x -> happyReturn (let {(HappyWrap77 x') = happyOut77 x} in x'))++parseExpression = happySomeParser where+ happySomeParser = happyThen (happyParse 5#) (\x -> happyReturn (let {(HappyWrap209 x') = happyOut209 x} in x'))++parsePattern = happySomeParser where+ happySomeParser = happyThen (happyParse 6#) (\x -> happyReturn (let {(HappyWrap249 x') = happyOut249 x} in x'))++parseTypeSignature = happySomeParser where+ happySomeParser = happyThen (happyParse 7#) (\x -> happyReturn (let {(HappyWrap205 x') = happyOut205 x} in x'))++parseStmt = happySomeParser where+ happySomeParser = happyThen (happyParse 8#) (\x -> happyReturn (let {(HappyWrap255 x') = happyOut255 x} in x'))++parseIdentifier = happySomeParser where+ happySomeParser = happyThen (happyParse 9#) (\x -> happyReturn (let {(HappyWrap16 x') = happyOut16 x} in x'))++parseType = happySomeParser where+ happySomeParser = happyThen (happyParse 10#) (\x -> happyReturn (let {(HappyWrap155 x') = happyOut155 x} in x'))++parseBackpack = happySomeParser where+ happySomeParser = happyThen (happyParse 11#) (\x -> happyReturn (let {(HappyWrap17 x') = happyOut17 x} in x'))++parseHeader = happySomeParser where+ happySomeParser = happyThen (happyParse 12#) (\x -> happyReturn (let {(HappyWrap43 x') = happyOut43 x} in x'))++happySeq = happyDoSeq+++happyError :: P a+happyError = srcParseFail++getVARID        (dL->L _ (ITvarid    x)) = x+getCONID        (dL->L _ (ITconid    x)) = x+getVARSYM       (dL->L _ (ITvarsym   x)) = x+getCONSYM       (dL->L _ (ITconsym   x)) = x+getQVARID       (dL->L _ (ITqvarid   x)) = x+getQCONID       (dL->L _ (ITqconid   x)) = x+getQVARSYM      (dL->L _ (ITqvarsym  x)) = x+getQCONSYM      (dL->L _ (ITqconsym  x)) = x+getIPDUPVARID   (dL->L _ (ITdupipvarid   x)) = x+getLABELVARID   (dL->L _ (ITlabelvarid   x)) = x+getCHAR         (dL->L _ (ITchar   _ x)) = x+getSTRING       (dL->L _ (ITstring _ x)) = x+getINTEGER      (dL->L _ (ITinteger x))  = x+getRATIONAL     (dL->L _ (ITrational x)) = x+getPRIMCHAR     (dL->L _ (ITprimchar _ x)) = x+getPRIMSTRING   (dL->L _ (ITprimstring _ x)) = x+getPRIMINTEGER  (dL->L _ (ITprimint  _ x)) = x+getPRIMWORD     (dL->L _ (ITprimword _ x)) = x+getPRIMFLOAT    (dL->L _ (ITprimfloat x)) = x+getPRIMDOUBLE   (dL->L _ (ITprimdouble x)) = x+getTH_ID_SPLICE (dL->L _ (ITidEscape x)) = x+getTH_ID_TY_SPLICE (dL->L _ (ITidTyEscape x)) = x+getINLINE       (dL->L _ (ITinline_prag _ inl conl)) = (inl,conl)+getSPEC_INLINE  (dL->L _ (ITspec_inline_prag _ True))  = (Inline,  FunLike)+getSPEC_INLINE  (dL->L _ (ITspec_inline_prag _ False)) = (NoInline,FunLike)+getCOMPLETE_PRAGs (dL->L _ (ITcomplete_prag x)) = x++getDOCNEXT (dL->L _ (ITdocCommentNext x)) = x+getDOCPREV (dL->L _ (ITdocCommentPrev x)) = x+getDOCNAMED (dL->L _ (ITdocCommentNamed x)) = x+getDOCSECTION (dL->L _ (ITdocSection n x)) = (n, x)++getINTEGERs     (dL->L _ (ITinteger (IL src _ _))) = src+getCHARs        (dL->L _ (ITchar       src _)) = src+getSTRINGs      (dL->L _ (ITstring     src _)) = src+getPRIMCHARs    (dL->L _ (ITprimchar   src _)) = src+getPRIMSTRINGs  (dL->L _ (ITprimstring src _)) = src+getPRIMINTEGERs (dL->L _ (ITprimint    src _)) = src+getPRIMWORDs    (dL->L _ (ITprimword   src _)) = src++-- See Note [Pragma source text] in BasicTypes for the following+getINLINE_PRAGs       (dL->L _ (ITinline_prag       src _ _)) = src+getSPEC_PRAGs         (dL->L _ (ITspec_prag         src))     = src+getSPEC_INLINE_PRAGs  (dL->L _ (ITspec_inline_prag  src _))   = src+getSOURCE_PRAGs       (dL->L _ (ITsource_prag       src)) = src+getRULES_PRAGs        (dL->L _ (ITrules_prag        src)) = src+getWARNING_PRAGs      (dL->L _ (ITwarning_prag      src)) = src+getDEPRECATED_PRAGs   (dL->L _ (ITdeprecated_prag   src)) = src+getSCC_PRAGs          (dL->L _ (ITscc_prag          src)) = src+getGENERATED_PRAGs    (dL->L _ (ITgenerated_prag    src)) = src+getCORE_PRAGs         (dL->L _ (ITcore_prag         src)) = src+getUNPACK_PRAGs       (dL->L _ (ITunpack_prag       src)) = src+getNOUNPACK_PRAGs     (dL->L _ (ITnounpack_prag     src)) = src+getANN_PRAGs          (dL->L _ (ITann_prag          src)) = src+getMINIMAL_PRAGs      (dL->L _ (ITminimal_prag      src)) = src+getOVERLAPPABLE_PRAGs (dL->L _ (IToverlappable_prag src)) = src+getOVERLAPPING_PRAGs  (dL->L _ (IToverlapping_prag  src)) = src+getOVERLAPS_PRAGs     (dL->L _ (IToverlaps_prag     src)) = src+getINCOHERENT_PRAGs   (dL->L _ (ITincoherent_prag   src)) = src+getCTYPEs             (dL->L _ (ITctype             src)) = src++getStringLiteral l = StringLiteral (getSTRINGs l) (getSTRING l)++isUnicode :: Located Token -> Bool+isUnicode (dL->L _ (ITforall         iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITdarrow         iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITdcolon         iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITlarrow         iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITrarrow         iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITlarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITrarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITLarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITRarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (IToparenbar      iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITcparenbar      iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITopenExpQuote _ iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITcloseQuote     iu)) = iu == UnicodeSyntax+isUnicode (dL->L _ (ITstar           iu)) = iu == UnicodeSyntax+isUnicode _                           = False++hasE :: Located Token -> Bool+hasE (dL->L _ (ITopenExpQuote HasE _)) = True+hasE (dL->L _ (ITopenTExpQuote HasE))  = True+hasE _                             = False++getSCC :: Located Token -> P FastString+getSCC lt = do let s = getSTRING lt+                   err = "Spaces are not allowed in SCCs"+               -- We probably actually want to be more restrictive than this+               if ' ' `elem` unpackFS s+                   then addFatalError (getLoc lt) (text err)+                   else return s++-- Utilities for combining source spans+comb2 :: (HasSrcSpan a , HasSrcSpan b) => a -> b -> SrcSpan+comb2 a b = a `seq` b `seq` combineLocs a b++comb3 :: (HasSrcSpan a , HasSrcSpan b , HasSrcSpan c) =>+         a -> b -> c -> SrcSpan+comb3 a b c = a `seq` b `seq` c `seq`+    combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLoc c))++comb4 :: (HasSrcSpan a , HasSrcSpan b , HasSrcSpan c , HasSrcSpan d) =>+         a -> b -> c -> d -> SrcSpan+comb4 a b c d = a `seq` b `seq` c `seq` d `seq`+    (combineSrcSpans (getLoc a) $ combineSrcSpans (getLoc b) $+                combineSrcSpans (getLoc c) (getLoc d))++-- strict constructor version:+{-# INLINE sL #-}+sL :: HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a+sL span a = span `seq` a `seq` cL span a++-- See Note [Adding location info] for how these utility functions are used++-- replaced last 3 CPP macros in this file+{-# INLINE sL0 #-}+sL0 :: HasSrcSpan a => SrcSpanLess a -> a+sL0 = cL noSrcSpan       -- #define L0   L noSrcSpan++{-# INLINE sL1 #-}+sL1 :: (HasSrcSpan a , HasSrcSpan b) => a -> SrcSpanLess b -> b+sL1 x = sL (getLoc x)   -- #define sL1   sL (getLoc $1)++{-# INLINE sLL #-}+sLL :: (HasSrcSpan a , HasSrcSpan b , HasSrcSpan c) =>+       a -> b -> SrcSpanLess c -> c+sLL x y = sL (comb2 x y) -- #define LL   sL (comb2 $1 $>)++{- Note [Adding location info]+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~++This is done using the three functions below, sL0, sL1+and sLL.  Note that these functions were mechanically+converted from the three macros that used to exist before,+namely L0, L1 and LL.++They each add a SrcSpan to their argument.++   sL0  adds 'noSrcSpan', used for empty productions+     -- This doesn't seem to work anymore -=chak++   sL1  for a production with a single token on the lhs.  Grabs the SrcSpan+        from that token.++   sLL  for a production with >1 token on the lhs.  Makes up a SrcSpan from+        the first and last tokens.++These suffice for the majority of cases.  However, we must be+especially careful with empty productions: sLL won't work if the first+or last token on the lhs can represent an empty span.  In these cases,+we have to calculate the span using more of the tokens from the lhs, eg.++        | 'newtype' tycl_hdr '=' newconstr deriving+                { L (comb3 $1 $4 $5)+                    (mkTyData NewType (unLoc $2) $4 (unLoc $5)) }++We provide comb3 and comb4 functions which are useful in such cases.++Be careful: there's no checking that you actually got this right, the+only symptom will be that the SrcSpans of your syntax will be+incorrect.++-}++-- Make a source location for the file.  We're a bit lazy here and just+-- make a point SrcSpan at line 1, column 0.  Strictly speaking we should+-- try to find the span of the whole file (ToDo).+fileSrcSpan :: P SrcSpan+fileSrcSpan = do+  l <- getRealSrcLoc;+  let loc = mkSrcLoc (srcLocFile l) 1 1;+  return (mkSrcSpan loc loc)++-- Hint about the MultiWayIf extension+hintMultiWayIf :: SrcSpan -> P ()+hintMultiWayIf span = do+  mwiEnabled <- getBit MultiWayIfBit+  unless mwiEnabled $ addError span $+    text "Multi-way if-expressions need MultiWayIf turned on"++-- Hint about explicit-forall+hintExplicitForall :: Located Token -> P ()+hintExplicitForall tok = do+    forall   <- getBit ExplicitForallBit+    rulePrag <- getBit InRulePragBit+    unless (forall || rulePrag) $ addError (getLoc tok) $ vcat+      [ text "Illegal symbol" <+> quotes forallSymDoc <+> text "in type"+      , text "Perhaps you intended to use RankNTypes or a similar language"+      , text "extension to enable explicit-forall syntax:" <+>+        forallSymDoc <+> text "<tvs>. <type>"+      ]+  where+    forallSymDoc = text (forallSym (isUnicode tok))++-- When two single quotes don't followed by tyvar or gtycon, we report the+-- error as empty character literal, or TH quote that missing proper type+-- variable or constructor. See #13450.+reportEmptyDoubleQuotes :: SrcSpan -> P a+reportEmptyDoubleQuotes span = do+    thQuotes <- getBit ThQuotesBit+    if thQuotes+      then addFatalError span $ vcat+        [ text "Parser error on `''`"+        , text "Character literals may not be empty"+        , text "Or perhaps you intended to use quotation syntax of TemplateHaskell,"+        , text "but the type variable or constructor is missing"+        ]+      else addFatalError span $ vcat+        [ text "Parser error on `''`"+        , text "Character literals may not be empty"+        ]++{-+%************************************************************************+%*                                                                      *+        Helper functions for generating annotations in the parser+%*                                                                      *+%************************************************************************++For the general principles of the following routines, see Note [Api annotations]+in ApiAnnotation.hs++-}++-- |Construct an AddAnn from the annotation keyword and the location+-- of the keyword itself+mj :: HasSrcSpan e => AnnKeywordId -> e -> AddAnn+mj a l = AddAnn a (gl l)++mjL :: AnnKeywordId -> SrcSpan -> AddAnn+mjL = AddAnn++++-- |Construct an AddAnn from the annotation keyword and the Located Token. If+-- the token has a unicode equivalent and this has been used, provide the+-- unicode variant of the annotation.+mu :: AnnKeywordId -> Located Token -> AddAnn+mu a lt@(dL->L l t) = AddAnn (toUnicodeAnn a lt) l++-- | If the 'Token' is using its unicode variant return the unicode variant of+--   the annotation+toUnicodeAnn :: AnnKeywordId -> Located Token -> AnnKeywordId+toUnicodeAnn a t = if isUnicode t then unicodeAnn a else a++gl :: HasSrcSpan a => a -> SrcSpan+gl = getLoc++-- |Add an annotation to the located element, and return the located+-- element as a pass through+aa :: (HasSrcSpan a , HasSrcSpan c) => a -> (AnnKeywordId, c) -> P a+aa a@(dL->L l _) (b,s) = addAnnotation l b (gl s) >> return a++-- |Add an annotation to a located element resulting from a monadic action+am :: (HasSrcSpan a , HasSrcSpan b) => P a -> (AnnKeywordId, b) -> P a+am a (b,s) = do+  av@(dL->L l _) <- a+  addAnnotation l b (gl s)+  return av++-- | Add a list of AddAnns to the given AST element.  For example,+-- the parsing rule for @let@ looks like:+--+-- @+--      | 'let' binds 'in' exp    {% ams (sLL $1 $> $ HsLet (snd $ unLoc $2) $4)+--                                       (mj AnnLet $1:mj AnnIn $3+--                                         :(fst $ unLoc $2)) }+-- @+--+-- This adds an AnnLet annotation for @let@, an AnnIn for @in@, as well+-- as any annotations that may arise in the binds. This will include open+-- and closing braces if they are used to delimit the let expressions.+--+ams :: (MonadP m, HasSrcSpan a) => a -> [AddAnn] -> m a+ams a@(dL->L l _) bs = addAnnsAt l bs >> return a++amsL :: SrcSpan -> [AddAnn] -> P ()+amsL sp bs = addAnnsAt sp bs >> return ()++-- |Add all [AddAnn] to an AST element, and wrap it in a 'Just'+ajs :: (MonadP m, HasSrcSpan a) => a -> [AddAnn] -> m (Maybe a)+ajs a bs = Just <$> ams a bs++-- |Add a list of AddAnns to the given AST element, where the AST element is the+--  result of a monadic action+amms :: MonadP m => HasSrcSpan a => m a -> [AddAnn] -> m a+amms a bs = do { av@(dL->L l _) <- a+               ; addAnnsAt l bs+               ; return av }++-- |Add a list of AddAnns to the AST element, and return the element as a+--  OrdList+amsu :: HasSrcSpan a => a -> [AddAnn] -> P (OrdList a)+amsu a@(dL->L l _) bs = addAnnsAt l bs >> return (unitOL a)++-- |Synonyms for AddAnn versions of AnnOpen and AnnClose+mo,mc :: Located Token -> AddAnn+mo ll = mj AnnOpen ll+mc ll = mj AnnClose ll++moc,mcc :: Located Token -> AddAnn+moc ll = mj AnnOpenC ll+mcc ll = mj AnnCloseC ll++mop,mcp :: Located Token -> AddAnn+mop ll = mj AnnOpenP ll+mcp ll = mj AnnCloseP ll++mos,mcs :: Located Token -> AddAnn+mos ll = mj AnnOpenS ll+mcs ll = mj AnnCloseS ll++-- |Given a list of the locations of commas, provide a [AddAnn] with an AnnComma+--  entry for each SrcSpan+mcommas :: [SrcSpan] -> [AddAnn]+mcommas ss = map (mjL AnnCommaTuple) ss++-- |Given a list of the locations of '|'s, provide a [AddAnn] with an AnnVbar+--  entry for each SrcSpan+mvbars :: [SrcSpan] -> [AddAnn]+mvbars ss = map (mjL AnnVbar) ss++-- |Get the location of the last element of a OrdList, or noSrcSpan+oll :: HasSrcSpan a => OrdList a -> SrcSpan+oll l =+  if isNilOL l then noSrcSpan+               else getLoc (lastOL l)++-- |Add a semicolon annotation in the right place in a list. If the+-- leading list is empty, add it to the tail+asl :: (HasSrcSpan a , HasSrcSpan b) => [a] -> b -> a -> P()+asl [] (dL->L ls _) (dL->L l _) = addAnnotation l          AnnSemi ls+asl (x:_xs) (dL->L ls _) _x = addAnnotation (getLoc x) AnnSemi ls+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "templates/GenericTemplate.hs" #-}+{-# LINE 1 "<built-in>" #-}+{-# LINE 1 "<command-line>" #-}+{-# LINE 11 "<command-line>" #-}+# 1 "/nix/store/jk3nrdm3jd67i897db9dcpam75gh3iw6-glibc-2.27-dev/include/stdc-predef.h" 1 3 4++# 17 "/nix/store/jk3nrdm3jd67i897db9dcpam75gh3iw6-glibc-2.27-dev/include/stdc-predef.h" 3 4+++++++++++++++++++++++++++++++++++++++++++++++{-# LINE 11 "<command-line>" #-}+{-# LINE 1 "/nix/store/hg3na12737n7wws1kndxvs95ai88fgn8-ghc-8.6.5/lib/ghc-8.6.5/include/ghcversion.h" #-}++++++++++++++++{-# LINE 11 "<command-line>" #-}+{-# LINE 1 "/build/ghc807_0/ghc_2.h" #-}+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++{-# LINE 11 "<command-line>" #-} {-# LINE 1 "templates/GenericTemplate.hs" #-} -- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp  
parser/RdrHsSyn.hs view
@@ -6,2351 +6,3262 @@  {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE MagicHash #-}-{-# LANGUAGE ViewPatterns #-}--module   RdrHsSyn (-        mkHsOpApp,-        mkHsIntegral, mkHsFractional, mkHsIsString,-        mkHsDo, mkSpliceDecl,-        mkRoleAnnotDecl,-        mkClassDecl,-        mkTyData, mkDataFamInst,-        mkTySynonym, mkTyFamInstEqn,-        mkTyFamInst,-        mkFamDecl, mkLHsSigType,-        mkInlinePragma,-        mkPatSynMatchGroup,-        mkRecConstrOrUpdate, -- HsExp -> [HsFieldUpdate] -> P HsExp-        mkTyClD, mkInstD,-        mkRdrRecordCon, mkRdrRecordUpd,-        setRdrNameSpace,-        filterCTuple,--        cvBindGroup,-        cvBindsAndSigs,-        cvTopDecls,-        placeHolderPunRhs,--        -- Stuff to do with Foreign declarations-        mkImport,-        parseCImport,-        mkExport,-        mkExtName,    -- RdrName -> CLabelString-        mkGadtDecl,   -- [Located RdrName] -> LHsType RdrName -> ConDecl RdrName-        mkConDeclH98,-        mkATDefault,--        -- Bunch of functions in the parser monad for-        -- checking and constructing values-        checkBlockArguments,-        checkPrecP,           -- Int -> P Int-        checkContext,         -- HsType -> P HsContext-        checkPattern,         -- HsExp -> P HsPat-        bang_RDR,-        isBangRdr,-        checkPatterns,        -- SrcLoc -> [HsExp] -> P [HsPat]-        checkMonadComp,       -- P (HsStmtContext RdrName)-        checkCommand,         -- LHsExpr RdrName -> P (LHsCmd RdrName)-        checkValDef,          -- (SrcLoc, HsExp, HsRhs, [HsDecl]) -> P HsDecl-        checkValSigLhs,-        checkDoAndIfThenElse,-        LRuleTyTmVar, RuleTyTmVar(..),-        mkRuleBndrs, mkRuleTyVarBndrs,-        checkRuleTyVarBndrNames,-        checkRecordSyntax,-        checkEmptyGADTs,-        parseErrorSDoc, hintBangPat,-        TyEl(..), mergeOps, mergeDataCon,--        -- Help with processing exports-        ImpExpSubSpec(..),-        ImpExpQcSpec(..),-        mkModuleImpExp,-        mkTypeImpExp,-        mkImpExpSubSpec,-        checkImportSpec,--        -- Token symbols-        forallSym,-        starSym,--        -- Warnings and errors-        warnStarIsType,-        failOpFewArgs,--        SumOrTuple (..), mkSumOrTuple--    ) where--import GhcPrelude-import HsSyn            -- Lots of it-import TyCon            ( TyCon, isTupleTyCon, tyConSingleDataCon_maybe )-import DataCon          ( DataCon, dataConTyCon )-import ConLike          ( ConLike(..) )-import CoAxiom          ( Role, fsFromRole )-import RdrName-import Name-import BasicTypes-import TcEvidence       ( idHsWrapper )-import Lexer-import Lexeme           ( isLexCon )-import Type             ( TyThing(..), funTyCon )-import TysWiredIn       ( cTupleTyConName, tupleTyCon, tupleDataCon,-                          nilDataConName, nilDataConKey,-                          listTyConName, listTyConKey, eqTyCon_RDR,-                          tupleTyConName, cTupleTyConNameArity_maybe )-import ForeignCall-import PrelNames        ( allNameStrings )-import SrcLoc-import Unique           ( hasKey )-import OrdList          ( OrdList, fromOL )-import Bag              ( emptyBag, consBag )-import Outputable-import FastString-import Maybes-import Util-import ApiAnnotation-import Data.List-import DynFlags ( WarningFlag(..) )--import Control.Monad-import Text.ParserCombinators.ReadP as ReadP-import Data.Char-import qualified Data.Monoid as Monoid-import Data.Data       ( dataTypeOf, fromConstr, dataTypeConstrs )--#include "HsVersions.h"---{- **********************************************************************--  Construction functions for Rdr stuff--  ********************************************************************* -}---- | mkClassDecl builds a RdrClassDecl, filling in the names for tycon and--- datacon by deriving them from the name of the class.  We fill in the names--- for the tycon and datacon corresponding to the class, by deriving them--- from the name of the class itself.  This saves recording the names in the--- interface file (which would be equally good).---- Similarly for mkConDecl, mkClassOpSig and default-method names.----         *** See Note [The Naming story] in HsDecls ****--mkTyClD :: LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p)-mkTyClD (dL->L loc d) = cL loc (TyClD noExt d)--mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)-mkInstD (dL->L loc d) = cL loc (InstD noExt d)--mkClassDecl :: SrcSpan-            -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs)-            -> Located (a,[LHsFunDep GhcPs])-            -> OrdList (LHsDecl GhcPs)-            -> P (LTyClDecl GhcPs)--mkClassDecl loc (dL->L _ (mcxt, tycl_hdr)) fds where_cls-  = do { (binds, sigs, ats, at_insts, _, docs) <- cvBindsAndSigs where_cls-       ; let cxt = fromMaybe (noLoc []) mcxt-       ; (cls, tparams, fixity, ann) <- checkTyClHdr True tycl_hdr-       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan-       ; (tyvars,annst) <- checkTyVarsP (text "class") whereDots cls tparams-       ; addAnnsAt loc annst -- Add any API Annotations to the top SrcSpan-       ; (at_defs, annsi) <- mapAndUnzipM (eitherToP . mkATDefault) at_insts-       ; sequence_ annsi-       ; return (cL loc (ClassDecl { tcdCExt = noExt, tcdCtxt = cxt-                                   , tcdLName = cls, tcdTyVars = tyvars-                                   , tcdFixity = fixity-                                   , tcdFDs = snd (unLoc fds)-                                   , tcdSigs = mkClassOpSigs sigs-                                   , tcdMeths = binds-                                   , tcdATs = ats, tcdATDefs = at_defs-                                   , tcdDocs  = docs })) }--mkATDefault :: LTyFamInstDecl GhcPs-            -> Either (SrcSpan, SDoc) (LTyFamDefltEqn GhcPs, P ())--- ^ Take a type-family instance declaration and turn it into--- a type-family default equation for a class declaration.--- We parse things as the former and use this function to convert to the latter------ We use the Either monad because this also called from "Convert".------ The @P ()@ we return corresponds represents an action which will add--- some necessary paren annotations to the parsing context. Naturally, this--- is not something that the "Convert" use cares about.-mkATDefault (dL->L loc (TyFamInstDecl { tfid_eqn = HsIB { hsib_body = e }}))-      | FamEqn { feqn_tycon = tc, feqn_bndrs = bndrs, feqn_pats = pats-               , feqn_fixity = fixity, feqn_rhs = rhs } <- e-      = do { (tvs, anns) <- checkTyVars (text "default") equalsDots tc pats-           ; let f = cL loc (FamEqn { feqn_ext    = noExt-                                    , feqn_tycon  = tc-                                    , feqn_bndrs  = ASSERT( isNothing bndrs )-                                                    Nothing-                                    , feqn_pats   = tvs-                                    , feqn_fixity = fixity-                                    , feqn_rhs    = rhs })-           ; pure (f, addAnnsAt loc anns) }-mkATDefault (dL->L _ (TyFamInstDecl (HsIB _ (XFamEqn _)))) = panic "mkATDefault"-mkATDefault (dL->L _ (TyFamInstDecl (XHsImplicitBndrs _))) = panic "mkATDefault"-mkATDefault _ = panic "mkATDefault: Impossible Match"-                                -- due to #15884--mkTyData :: SrcSpan-         -> NewOrData-         -> Maybe (Located CType)-         -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs)-         -> Maybe (LHsKind GhcPs)-         -> [LConDecl GhcPs]-         -> HsDeriving GhcPs-         -> P (LTyClDecl GhcPs)-mkTyData loc new_or_data cType (dL->L _ (mcxt, tycl_hdr))-         ksig data_cons maybe_deriv-  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False tycl_hdr-       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan-       ; (tyvars, anns) <- checkTyVarsP (ppr new_or_data) equalsDots tc tparams-       ; addAnnsAt loc anns -- Add any API Annotations to the top SrcSpan-       ; defn <- mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv-       ; return (cL loc (DataDecl { tcdDExt = noExt,-                                    tcdLName = tc, tcdTyVars = tyvars,-                                    tcdFixity = fixity,-                                    tcdDataDefn = defn })) }--mkDataDefn :: NewOrData-           -> Maybe (Located CType)-           -> Maybe (LHsContext GhcPs)-           -> Maybe (LHsKind GhcPs)-           -> [LConDecl GhcPs]-           -> HsDeriving GhcPs-           -> P (HsDataDefn GhcPs)-mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv-  = do { checkDatatypeContext mcxt-       ; let cxt = fromMaybe (noLoc []) mcxt-       ; return (HsDataDefn { dd_ext = noExt-                            , dd_ND = new_or_data, dd_cType = cType-                            , dd_ctxt = cxt-                            , dd_cons = data_cons-                            , dd_kindSig = ksig-                            , dd_derivs = maybe_deriv }) }---mkTySynonym :: SrcSpan-            -> LHsType GhcPs  -- LHS-            -> LHsType GhcPs  -- RHS-            -> P (LTyClDecl GhcPs)-mkTySynonym loc lhs rhs-  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs-       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan-       ; (tyvars, anns) <- checkTyVarsP (text "type") equalsDots tc tparams-       ; addAnnsAt loc anns -- Add any API Annotations to the top SrcSpan-       ; return (cL loc (SynDecl { tcdSExt = noExt-                                 , tcdLName = tc, tcdTyVars = tyvars-                                 , tcdFixity = fixity-                                 , tcdRhs = rhs })) }--mkTyFamInstEqn :: Maybe [LHsTyVarBndr GhcPs]-               -> LHsType GhcPs-               -> LHsType GhcPs-               -> P (TyFamInstEqn GhcPs,[AddAnn])-mkTyFamInstEqn bndrs lhs rhs-  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs-       ; return (mkHsImplicitBndrs-                  (FamEqn { feqn_ext    = noExt-                          , feqn_tycon  = tc-                          , feqn_bndrs  = bndrs-                          , feqn_pats   = tparams-                          , feqn_fixity = fixity-                          , feqn_rhs    = rhs }),-                 ann) }--mkDataFamInst :: SrcSpan-              -> NewOrData-              -> Maybe (Located CType)-              -> (Maybe ( LHsContext GhcPs), Maybe [LHsTyVarBndr GhcPs]-                        , LHsType GhcPs)-              -> Maybe (LHsKind GhcPs)-              -> [LConDecl GhcPs]-              -> HsDeriving GhcPs-              -> P (LInstDecl GhcPs)-mkDataFamInst loc new_or_data cType (mcxt, bndrs, tycl_hdr)-              ksig data_cons maybe_deriv-  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False tycl_hdr-       ; mapM_ (\a -> a loc) ann -- Add any API Annotations to the top SrcSpan-       ; defn <- mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv-       ; return (cL loc (DataFamInstD noExt (DataFamInstDecl (mkHsImplicitBndrs-                  (FamEqn { feqn_ext    = noExt-                          , feqn_tycon  = tc-                          , feqn_bndrs  = bndrs-                          , feqn_pats   = tparams-                          , feqn_fixity = fixity-                          , feqn_rhs    = defn }))))) }--mkTyFamInst :: SrcSpan-            -> TyFamInstEqn GhcPs-            -> P (LInstDecl GhcPs)-mkTyFamInst loc eqn-  = return (cL loc (TyFamInstD noExt (TyFamInstDecl eqn)))--mkFamDecl :: SrcSpan-          -> FamilyInfo GhcPs-          -> LHsType GhcPs                   -- LHS-          -> Located (FamilyResultSig GhcPs) -- Optional result signature-          -> Maybe (LInjectivityAnn GhcPs)   -- Injectivity annotation-          -> P (LTyClDecl GhcPs)-mkFamDecl loc info lhs ksig injAnn-  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs-       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan-       ; (tyvars, anns) <- checkTyVarsP (ppr info) equals_or_where tc tparams-       ; addAnnsAt loc anns -- Add any API Annotations to the top SrcSpan-       ; return (cL loc (FamDecl noExt (FamilyDecl-                                           { fdExt       = noExt-                                           , fdInfo      = info, fdLName = tc-                                           , fdTyVars    = tyvars-                                           , fdFixity    = fixity-                                           , fdResultSig = ksig-                                           , fdInjectivityAnn = injAnn }))) }-  where-    equals_or_where = case info of-                        DataFamily          -> empty-                        OpenTypeFamily      -> empty-                        ClosedTypeFamily {} -> whereDots--mkSpliceDecl :: LHsExpr GhcPs -> HsDecl GhcPs--- If the user wrote---      [pads| ... ]   then return a QuasiQuoteD---      $(e)           then return a SpliceD--- but if she wrote, say,---      f x            then behave as if she'd written $(f x)---                     ie a SpliceD------ Typed splices are not allowed at the top level, thus we do not represent them--- as spliced declaration.  See #10945-mkSpliceDecl lexpr@(dL->L loc expr)-  | HsSpliceE _ splice@(HsUntypedSplice {}) <- expr-  = SpliceD noExt (SpliceDecl noExt (cL loc splice) ExplicitSplice)--  | HsSpliceE _ splice@(HsQuasiQuote {}) <- expr-  = SpliceD noExt (SpliceDecl noExt (cL loc splice) ExplicitSplice)--  | otherwise-  = SpliceD noExt (SpliceDecl noExt (cL loc (mkUntypedSplice NoParens lexpr))-                              ImplicitSplice)--mkRoleAnnotDecl :: SrcSpan-                -> Located RdrName                -- type being annotated-                -> [Located (Maybe FastString)]      -- roles-                -> P (LRoleAnnotDecl GhcPs)-mkRoleAnnotDecl loc tycon roles-  = do { roles' <- mapM parse_role roles-       ; return $ cL loc $ RoleAnnotDecl noExt tycon roles' }-  where-    role_data_type = dataTypeOf (undefined :: Role)-    all_roles = map fromConstr $ dataTypeConstrs role_data_type-    possible_roles = [(fsFromRole role, role) | role <- all_roles]--    parse_role (dL->L loc_role Nothing) = return $ cL loc_role Nothing-    parse_role (dL->L loc_role (Just role))-      = case lookup role possible_roles of-          Just found_role -> return $ cL loc_role $ Just found_role-          Nothing         ->-            let nearby = fuzzyLookup (unpackFS role)-                  (mapFst unpackFS possible_roles)-            in-            parseErrorSDoc loc_role-              (text "Illegal role name" <+> quotes (ppr role) $$-               suggestions nearby)-    parse_role _ = panic "parse_role: Impossible Match"-                                -- due to #15884--    suggestions []   = empty-    suggestions [r]  = text "Perhaps you meant" <+> quotes (ppr r)-      -- will this last case ever happen??-    suggestions list = hang (text "Perhaps you meant one of these:")-                       2 (pprWithCommas (quotes . ppr) list)--{- **********************************************************************--  #cvBinds-etc# Converting to @HsBinds@, etc.--  ********************************************************************* -}---- | Function definitions are restructured here. Each is assumed to be recursive--- initially, and non recursive definitions are discovered by the dependency--- analyser.-----  | Groups together bindings for a single function-cvTopDecls :: OrdList (LHsDecl GhcPs) -> [LHsDecl GhcPs]-cvTopDecls decls = go (fromOL decls)-  where-    go :: [LHsDecl GhcPs] -> [LHsDecl GhcPs]-    go []                     = []-    go ((dL->L l (ValD x b)) : ds)-      = cL l' (ValD x b') : go ds'-        where (dL->L l' b', ds') = getMonoBind (cL l b) ds-    go (d : ds)                    = d : go ds---- Declaration list may only contain value bindings and signatures.-cvBindGroup :: OrdList (LHsDecl GhcPs) -> P (HsValBinds GhcPs)-cvBindGroup binding-  = do { (mbs, sigs, fam_ds, tfam_insts-         , dfam_insts, _) <- cvBindsAndSigs binding-       ; ASSERT( null fam_ds && null tfam_insts && null dfam_insts)-         return $ ValBinds noExt mbs sigs }--cvBindsAndSigs :: OrdList (LHsDecl GhcPs)-  -> P (LHsBinds GhcPs, [LSig GhcPs], [LFamilyDecl GhcPs]-          , [LTyFamInstDecl GhcPs], [LDataFamInstDecl GhcPs], [LDocDecl])--- Input decls contain just value bindings and signatures--- and in case of class or instance declarations also--- associated type declarations. They might also contain Haddock comments.-cvBindsAndSigs fb = go (fromOL fb)-  where-    go []              = return (emptyBag, [], [], [], [], [])-    go ((dL->L l (ValD _ b)) : ds)-      = do { (bs, ss, ts, tfis, dfis, docs) <- go ds'-           ; return (b' `consBag` bs, ss, ts, tfis, dfis, docs) }-      where-        (b', ds') = getMonoBind (cL l b) ds-    go ((dL->L l decl) : ds)-      = do { (bs, ss, ts, tfis, dfis, docs) <- go ds-           ; case decl of-               SigD _ s-                 -> return (bs, cL l s : ss, ts, tfis, dfis, docs)-               TyClD _ (FamDecl _ t)-                 -> return (bs, ss, cL l t : ts, tfis, dfis, docs)-               InstD _ (TyFamInstD { tfid_inst = tfi })-                 -> return (bs, ss, ts, cL l tfi : tfis, dfis, docs)-               InstD _ (DataFamInstD { dfid_inst = dfi })-                 -> return (bs, ss, ts, tfis, cL l dfi : dfis, docs)-               DocD _ d-                 -> return (bs, ss, ts, tfis, dfis, cL l d : docs)-               SpliceD _ d-                 -> parseErrorSDoc l $-                    hang (text "Declaration splices are allowed only" <+>-                          text "at the top level:")-                       2 (ppr d)-               _ -> pprPanic "cvBindsAndSigs" (ppr decl) }---------------------------------------------------------------------------------- Group function bindings into equation groups--getMonoBind :: LHsBind GhcPs -> [LHsDecl GhcPs]-  -> (LHsBind GhcPs, [LHsDecl GhcPs])--- Suppose      (b',ds') = getMonoBind b ds---      ds is a list of parsed bindings---      b is a MonoBinds that has just been read off the front---- Then b' is the result of grouping more equations from ds that--- belong with b into a single MonoBinds, and ds' is the depleted--- list of parsed bindings.------ All Haddock comments between equations inside the group are--- discarded.------ No AndMonoBinds or EmptyMonoBinds here; just single equations--getMonoBind (dL->L loc1 (FunBind { fun_id = fun_id1@(dL->L _ f1)-                                 , fun_matches =-                                   MG { mg_alts = (dL->L _ mtchs1) } }))-            binds-  | has_args mtchs1-  = go mtchs1 loc1 binds []-  where-    go mtchs loc-       ((dL->L loc2 (ValD _ (FunBind { fun_id = (dL->L _ f2)-                                    , fun_matches =-                                        MG { mg_alts = (dL->L _ mtchs2) } })))-         : binds) _-        | f1 == f2 = go (mtchs2 ++ mtchs)-                        (combineSrcSpans loc loc2) binds []-    go mtchs loc (doc_decl@(dL->L loc2 (DocD {})) : binds) doc_decls-        = let doc_decls' = doc_decl : doc_decls-          in go mtchs (combineSrcSpans loc loc2) binds doc_decls'-    go mtchs loc binds doc_decls-        = ( cL loc (makeFunBind fun_id1 (reverse mtchs))-          , (reverse doc_decls) ++ binds)-        -- Reverse the final matches, to get it back in the right order-        -- Do the same thing with the trailing doc comments--getMonoBind bind binds = (bind, binds)--has_args :: [LMatch GhcPs (LHsExpr GhcPs)] -> Bool-has_args []                                    = panic "RdrHsSyn:has_args"-has_args ((dL->L _ (Match { m_pats = args })) : _) = not (null args)-        -- Don't group together FunBinds if they have-        -- no arguments.  This is necessary now that variable bindings-        -- with no arguments are now treated as FunBinds rather-        -- than pattern bindings (tests/rename/should_fail/rnfail002).-has_args ((dL->L _ (XMatch _)) : _) = panic "has_args"-has_args (_ : _) = panic "has_args:Impossible Match" -- due to #15884--{- **********************************************************************--  #PrefixToHS-utils# Utilities for conversion--  ********************************************************************* -}--{- Note [Parsing data constructors is hard]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--The problem with parsing data constructors is that they look a lot like types.-Compare:--  (s1)   data T = C t1 t2-  (s2)   type T = C t1 t2--Syntactically, there's little difference between these declarations, except in-(s1) 'C' is a data constructor, but in (s2) 'C' is a type constructor.--This similarity would pose no problem if we knew ahead of time if we are-parsing a type or a constructor declaration. Looking at (s1) and (s2), a simple-(but wrong!) rule comes to mind: in 'data' declarations assume we are parsing-data constructors, and in other contexts (e.g. 'type' declarations) assume we-are parsing type constructors.--This simple rule does not work because of two problematic cases:--  (p1)   data T = C t1 t2 :+ t3-  (p2)   data T = C t1 t2 => t3--In (p1) we encounter (:+) and it turns out we are parsing an infix data-declaration, so (C t1 t2) is a type and 'C' is a type constructor.-In (p2) we encounter (=>) and it turns out we are parsing an existential-context, so (C t1 t2) is a constraint and 'C' is a type constructor.--As the result, in order to determine whether (C t1 t2) declares a data-constructor, a type, or a context, we would need unlimited lookahead which-'happy' is not so happy with.--To further complicate matters, the interpretation of (!) and (~) is different-in constructors and types:--  (b1)   type T = C ! D-  (b2)   data T = C ! D-  (b3)   data T = C ! D => E--In (b1) and (b3), (!) is a type operator with two arguments: 'C' and 'D'. At-the same time, in (b2) it is a strictness annotation: 'C' is a data constructor-with a single strict argument 'D'. For the programmer, these cases are usually-easy to tell apart due to whitespace conventions:--  (b2)   data T = C !D         -- no space after the bang hints that-                               -- it is a strictness annotation--For the parser, on the other hand, this whitespace does not matter. We cannot-tell apart (b2) from (b3) until we encounter (=>), so it requires unlimited-lookahead.--The solution that accounts for all of these issues is to initially parse data-declarations and types as a reversed list of TyEl:--  data TyEl = TyElOpr RdrName-            | TyElOpd (HsType GhcPs)-            | TyElBang | TyElTilde-            | ...--For example, both occurences of (C ! D) in the following example are parsed-into equal lists of TyEl:--  data T = C ! D => C ! D   results in   [ TyElOpd (HsTyVar "D")-                                         , TyElBang-                                         , TyElOpd (HsTyVar "C") ]--Note that elements are in reverse order. Also, 'C' is parsed as a type-constructor (HsTyVar) even when it is a data constructor. We fix this in-`tyConToDataCon`.--By the time the list of TyEl is assembled, we have looked ahead enough to-decide whether to reduce using `mergeOps` (for types) or `mergeDataCon` (for-data constructors). These functions are where the actual job of parsing is-done.---}---- | Reinterpret a type constructor, including type operators, as a data---   constructor.--- See Note [Parsing data constructors is hard]-tyConToDataCon :: SrcSpan -> RdrName -> Either (SrcSpan, SDoc) (Located RdrName)-tyConToDataCon loc tc-  | isTcOcc occ || isDataOcc occ-  , isLexCon (occNameFS occ)-  = return (cL loc (setRdrNameSpace tc srcDataName))--  | otherwise-  = Left (loc, msg)-  where-    occ = rdrNameOcc tc-    msg = text "Not a data constructor:" <+> quotes (ppr tc)--mkPatSynMatchGroup :: Located RdrName-                   -> Located (OrdList (LHsDecl GhcPs))-                   -> P (MatchGroup GhcPs (LHsExpr GhcPs))-mkPatSynMatchGroup (dL->L loc patsyn_name) (dL->L _ decls) =-    do { matches <- mapM fromDecl (fromOL decls)-       ; when (null matches) (wrongNumberErr loc)-       ; return $ mkMatchGroup FromSource matches }-  where-    fromDecl (dL->L loc decl@(ValD _ (PatBind _-                             pat@(dL->L _ (ConPatIn ln@(dL->L _ name) details))-                                   rhs _))) =-        do { unless (name == patsyn_name) $-               wrongNameBindingErr loc decl-           ; match <- case details of-               PrefixCon pats -> return $ Match { m_ext = noExt-                                                , m_ctxt = ctxt, m_pats = pats-                                                , m_grhss = rhs }-                   where-                     ctxt = FunRhs { mc_fun = ln-                                   , mc_fixity = Prefix-                                   , mc_strictness = NoSrcStrict }--               InfixCon p1 p2 -> return $ Match { m_ext = noExt-                                                , m_ctxt = ctxt-                                                , m_pats = [p1, p2]-                                                , m_grhss = rhs }-                   where-                     ctxt = FunRhs { mc_fun = ln-                                   , mc_fixity = Infix-                                   , mc_strictness = NoSrcStrict }--               RecCon{} -> recordPatSynErr loc pat-           ; return $ cL loc match }-    fromDecl (dL->L loc decl) = extraDeclErr loc decl--    extraDeclErr loc decl =-        parseErrorSDoc loc $-        text "pattern synonym 'where' clause must contain a single binding:" $$-        ppr decl--    wrongNameBindingErr loc decl =-      parseErrorSDoc loc $-      text "pattern synonym 'where' clause must bind the pattern synonym's name"-      <+> quotes (ppr patsyn_name) $$ ppr decl--    wrongNumberErr loc =-      parseErrorSDoc loc $-      text "pattern synonym 'where' clause cannot be empty" $$-      text "In the pattern synonym declaration for: " <+> ppr (patsyn_name)--recordPatSynErr :: SrcSpan -> LPat GhcPs -> P a-recordPatSynErr loc pat =-    parseErrorSDoc loc $-    text "record syntax not supported for pattern synonym declarations:" $$-    ppr pat--mkConDeclH98 :: Located RdrName -> Maybe [LHsTyVarBndr GhcPs]-                -> Maybe (LHsContext GhcPs) -> HsConDeclDetails GhcPs-                -> ConDecl GhcPs--mkConDeclH98 name mb_forall mb_cxt args-  = ConDeclH98 { con_ext    = noExt-               , con_name   = name-               , con_forall = noLoc $ isJust mb_forall-               , con_ex_tvs = mb_forall `orElse` []-               , con_mb_cxt = mb_cxt-               , con_args   = args'-               , con_doc    = Nothing }-  where-    args' = nudgeHsSrcBangs args--mkGadtDecl :: [Located RdrName]-           -> LHsType GhcPs     -- Always a HsForAllTy-           -> (ConDecl GhcPs, [AddAnn])-mkGadtDecl names ty-  = (ConDeclGADT { con_g_ext  = noExt-                 , con_names  = names-                 , con_forall = cL l $ isLHsForAllTy ty'-                 , con_qvars  = mkHsQTvs tvs-                 , con_mb_cxt = mcxt-                 , con_args   = args'-                 , con_res_ty = res_ty-                 , con_doc    = Nothing }-    , anns1 ++ anns2)-  where-    (ty'@(dL->L l _),anns1) = peel_parens ty []-    (tvs, rho) = splitLHsForAllTy ty'-    (mcxt, tau, anns2) = split_rho rho []--    split_rho (dL->L _ (HsQualTy { hst_ctxt = cxt, hst_body = tau })) ann-      = (Just cxt, tau, ann)-    split_rho (dL->L l (HsParTy _ ty)) ann-      = split_rho ty (ann++mkParensApiAnn l)-    split_rho tau                  ann-      = (Nothing, tau, ann)--    (args, res_ty) = split_tau tau-    args' = nudgeHsSrcBangs args--    -- See Note [GADT abstract syntax] in HsDecls-    split_tau (dL->L _ (HsFunTy _ (dL->L loc (HsRecTy _ rf)) res_ty))-      = (RecCon (cL loc rf), res_ty)-    split_tau tau-      = (PrefixCon [], tau)--    peel_parens (dL->L l (HsParTy _ ty)) ann = peel_parens ty-                                                       (ann++mkParensApiAnn l)-    peel_parens ty                   ann = (ty, ann)--nudgeHsSrcBangs :: HsConDeclDetails GhcPs -> HsConDeclDetails GhcPs--- ^ This function ensures that fields with strictness or packedness--- annotations put these annotations on an outer 'HsBangTy'.------ The problem is that in the parser, strictness and packedness annotations--- bind more tightly that docstrings. However, the expectation downstream of--- the parser (by functions such as 'getBangType' and 'getBangStrictness')--- is that docstrings bind more tightly so that 'HsBangTy' may end up as the--- top-level type.------ See #15206-nudgeHsSrcBangs details-  = case details of-      PrefixCon as -> PrefixCon (map go as)-      RecCon r -> RecCon r-      InfixCon a1 a2 -> InfixCon (go a1) (go a2)-  where-    go (dL->L l (HsDocTy _ (dL->L _ (HsBangTy _ s lty)) lds)) =-      cL l (HsBangTy noExt s (addCLoc lty lds (HsDocTy noExt lty lds)))-    go lty = lty---setRdrNameSpace :: RdrName -> NameSpace -> RdrName--- ^ This rather gruesome function is used mainly by the parser.--- When parsing:------ > data T a = T | T1 Int------ we parse the data constructors as /types/ because of parser ambiguities,--- so then we need to change the /type constr/ to a /data constr/------ The exact-name case /can/ occur when parsing:------ > data [] a = [] | a : [a]------ For the exact-name case we return an original name.-setRdrNameSpace (Unqual occ) ns = Unqual (setOccNameSpace ns occ)-setRdrNameSpace (Qual m occ) ns = Qual m (setOccNameSpace ns occ)-setRdrNameSpace (Orig m occ) ns = Orig m (setOccNameSpace ns occ)-setRdrNameSpace (Exact n)    ns-  | Just thing <- wiredInNameTyThing_maybe n-  = setWiredInNameSpace thing ns-    -- Preserve Exact Names for wired-in things,-    -- notably tuples and lists--  | isExternalName n-  = Orig (nameModule n) occ--  | otherwise   -- This can happen when quoting and then-                -- splicing a fixity declaration for a type-  = Exact (mkSystemNameAt (nameUnique n) occ (nameSrcSpan n))-  where-    occ = setOccNameSpace ns (nameOccName n)--setWiredInNameSpace :: TyThing -> NameSpace -> RdrName-setWiredInNameSpace (ATyCon tc) ns-  | isDataConNameSpace ns-  = ty_con_data_con tc-  | isTcClsNameSpace ns-  = Exact (getName tc)      -- No-op--setWiredInNameSpace (AConLike (RealDataCon dc)) ns-  | isTcClsNameSpace ns-  = data_con_ty_con dc-  | isDataConNameSpace ns-  = Exact (getName dc)      -- No-op--setWiredInNameSpace thing ns-  = pprPanic "setWiredinNameSpace" (pprNameSpace ns <+> ppr thing)--ty_con_data_con :: TyCon -> RdrName-ty_con_data_con tc-  | isTupleTyCon tc-  , Just dc <- tyConSingleDataCon_maybe tc-  = Exact (getName dc)--  | tc `hasKey` listTyConKey-  = Exact nilDataConName--  | otherwise  -- See Note [setRdrNameSpace for wired-in names]-  = Unqual (setOccNameSpace srcDataName (getOccName tc))--data_con_ty_con :: DataCon -> RdrName-data_con_ty_con dc-  | let tc = dataConTyCon dc-  , isTupleTyCon tc-  = Exact (getName tc)--  | dc `hasKey` nilDataConKey-  = Exact listTyConName--  | otherwise  -- See Note [setRdrNameSpace for wired-in names]-  = Unqual (setOccNameSpace tcClsName (getOccName dc))---- | Replaces constraint tuple names with corresponding boxed ones.-filterCTuple :: RdrName -> RdrName-filterCTuple (Exact n)-  | Just arity <- cTupleTyConNameArity_maybe n-  = Exact $ tupleTyConName BoxedTuple arity-filterCTuple rdr = rdr---{- Note [setRdrNameSpace for wired-in names]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In GHC.Types, which declares (:), we have-  infixr 5 :-The ambiguity about which ":" is meant is resolved by parsing it as a-data constructor, but then using dataTcOccs to try the type constructor too;-and that in turn calls setRdrNameSpace to change the name-space of ":" to-tcClsName.  There isn't a corresponding ":" type constructor, but it's painful-to make setRdrNameSpace partial, so we just make an Unqual name instead. It-really doesn't matter!--}--checkTyVarsP :: SDoc -> SDoc -> Located RdrName -> [LHsTypeArg GhcPs]-             -> P (LHsQTyVars GhcPs, [AddAnn])--- Same as checkTyVars, but in the P monad-checkTyVarsP pp_what equals_or_where tc tparms-  = do { let checkedTvs = checkTyVars pp_what equals_or_where tc tparms-       ; eitherToP checkedTvs }--eitherToP :: Either (SrcSpan, SDoc) a -> P a--- Adapts the Either monad to the P monad-eitherToP (Left (loc, doc)) = parseErrorSDoc loc doc-eitherToP (Right thing)     = return thing--checkTyVars :: SDoc -> SDoc -> Located RdrName -> [LHsTypeArg GhcPs]-            -> Either (SrcSpan, SDoc)-                      ( LHsQTyVars GhcPs  -- the synthesized type variables-                      , [AddAnn] )        -- action which adds annotations--- ^ Check whether the given list of type parameters are all type variables--- (possibly with a kind signature).--- We use the Either monad because it's also called (via 'mkATDefault') from--- "Convert".-checkTyVars pp_what equals_or_where tc tparms-  = do { (tvs, anns) <- fmap unzip $ mapM check tparms-       ; return (mkHsQTvs tvs, concat anns) }-  where-    check (HsTypeArg _ ki@(L loc _))-                              = Left (loc,-                                      vcat [ text "Unexpected type application" <+>-                                            text "@" <> ppr ki-                                          , text "In the" <+> pp_what <+>-                                            ptext (sLit "declaration for") <+> quotes (ppr tc)])-    check (HsValArg ty) = chkParens [] ty-    check (HsArgPar sp) = Left (sp, vcat [text "Malformed" <+> pp_what-                           <+> text "declaration for" <+> quotes (ppr tc)])-        -- Keep around an action for adjusting the annotations of extra parens-    chkParens :: [AddAnn] -> LHsType GhcPs-              -> Either (SrcSpan, SDoc) (LHsTyVarBndr GhcPs, [AddAnn])-    chkParens acc (dL->L l (HsParTy _ ty)) = chkParens (mkParensApiAnn l-                                                        ++ acc) ty-    chkParens acc ty = case chk ty of-      Left err -> Left err-      Right tv -> Right (tv, reverse acc)--        -- Check that the name space is correct!-    chk :: LHsType GhcPs -> Either (SrcSpan, SDoc) (LHsTyVarBndr GhcPs)-    chk (dL->L l (HsKindSig _ (dL->L lv (HsTyVar _ _ (dL->L _ tv))) k))-        | isRdrTyVar tv    = return (cL l (KindedTyVar noExt (cL lv tv) k))-    chk (dL->L l (HsTyVar _ _ (dL->L ltv tv)))-        | isRdrTyVar tv    = return (cL l (UserTyVar noExt (cL ltv tv)))-    chk t@(dL->L loc _)-        = Left (loc,-                vcat [ text "Unexpected type" <+> quotes (ppr t)-                     , text "In the" <+> pp_what-                       <+> ptext (sLit "declaration for") <+> quotes tc'-                     , vcat[ (text "A" <+> pp_what-                              <+> ptext (sLit "declaration should have form"))-                     , nest 2-                       (pp_what-                        <+> tc'-                        <+> hsep (map text (takeList tparms allNameStrings))-                        <+> equals_or_where) ] ])--    -- Avoid printing a constraint tuple in the error message. Print-    -- a plain old tuple instead (since that's what the user probably-    -- wrote). See #14907-    tc' = ppr $ fmap filterCTuple tc----whereDots, equalsDots :: SDoc--- Second argument to checkTyVars-whereDots  = text "where ..."-equalsDots = text "= ..."--checkDatatypeContext :: Maybe (LHsContext GhcPs) -> P ()-checkDatatypeContext Nothing = return ()-checkDatatypeContext (Just c)-    = do allowed <- getBit DatatypeContextsBit-         unless allowed $-             parseErrorSDoc (getLoc c)-                 (text "Illegal datatype context (use DatatypeContexts):"-                  <+> pprLHsContext c)--type LRuleTyTmVar = Located RuleTyTmVar-data RuleTyTmVar = RuleTyTmVar (Located RdrName) (Maybe (LHsType GhcPs))--- ^ Essentially a wrapper for a @RuleBndr GhcPs@---- turns RuleTyTmVars into RuleBnrs - this is straightforward-mkRuleBndrs :: [LRuleTyTmVar] -> [LRuleBndr GhcPs]-mkRuleBndrs = fmap (fmap cvt_one)-  where cvt_one (RuleTyTmVar v Nothing)    = RuleBndr    noExt v-        cvt_one (RuleTyTmVar v (Just sig)) =-          RuleBndrSig noExt v (mkLHsSigWcType sig)---- turns RuleTyTmVars into HsTyVarBndrs - this is more interesting-mkRuleTyVarBndrs :: [LRuleTyTmVar] -> [LHsTyVarBndr GhcPs]-mkRuleTyVarBndrs = fmap (fmap cvt_one)-  where cvt_one (RuleTyTmVar v Nothing)    = UserTyVar   noExt (fmap tm_to_ty v)-        cvt_one (RuleTyTmVar v (Just sig))-          = KindedTyVar noExt (fmap tm_to_ty v) sig-    -- takes something in namespace 'varName' to something in namespace 'tvName'-        tm_to_ty (Unqual occ) = Unqual (setOccNameSpace tvName occ)-        tm_to_ty _ = panic "mkRuleTyVarBndrs"---- See note [Parsing explicit foralls in Rules] in Parser.y-checkRuleTyVarBndrNames :: [LHsTyVarBndr GhcPs] -> P ()-checkRuleTyVarBndrNames = mapM_ (check . fmap hsTyVarName)-  where check (dL->L loc (Unqual occ)) = do-          when ((occNameString occ ==) `any` ["forall","family","role"])-               (parseErrorSDoc loc (text $ "parse error on input "-                                    ++ occNameString occ))-        check _ = panic "checkRuleTyVarBndrNames"--checkRecordSyntax :: Outputable a => Located a -> P (Located a)-checkRecordSyntax lr@(dL->L loc r)-    = do allowed <- getBit TraditionalRecordSyntaxBit-         if allowed-             then return lr-             else parseErrorSDoc loc-                   (text "Illegal record syntax (use TraditionalRecordSyntax):"-                    <+> ppr r)---- | Check if the gadt_constrlist is empty. Only raise parse error for--- `data T where` to avoid affecting existing error message, see #8258.-checkEmptyGADTs :: Located ([AddAnn], [LConDecl GhcPs])-                -> P (Located ([AddAnn], [LConDecl GhcPs]))-checkEmptyGADTs gadts@(dL->L span (_, []))           -- Empty GADT declaration.-    = do gadtSyntax <- getBit GadtSyntaxBit   -- GADTs implies GADTSyntax-         if gadtSyntax-            then return gadts-            else parseErrorSDoc span $ vcat-              [ text "Illegal keyword 'where' in data declaration"-              , text "Perhaps you intended to use GADTs or a similar language"-              , text "extension to enable syntax: data T where"-              ]-checkEmptyGADTs gadts = return gadts              -- Ordinary GADT declaration.--checkTyClHdr :: Bool               -- True  <=> class header-                                   -- False <=> type header-             -> LHsType GhcPs-             -> P (Located RdrName,      -- the head symbol (type or class name)-                   [LHsTypeArg GhcPs],      -- parameters of head symbol-                   LexicalFixity,        -- the declaration is in infix format-                   [AddAnn]) -- API Annotation for HsParTy when stripping parens--- Well-formedness check and decomposition of type and class heads.--- Decomposes   T ty1 .. tyn   into    (T, [ty1, ..., tyn])---              Int :*: Bool   into    (:*:, [Int, Bool])--- returning the pieces-checkTyClHdr is_cls ty-  = goL ty [] [] Prefix-  where-    goL (dL->L l ty) acc ann fix = go l ty acc ann fix--    -- workaround to define '*' despite StarIsType-    go lp (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix-      = do { warnStarBndr l-           ; let name = mkOccName tcClsName (starSym isUni)-           ; return (cL l (Unqual name), acc, fix, (ann ++ mkParensApiAnn lp)) }--    go l (HsTyVar _ _ (dL->L _ tc)) acc ann fix-      | isRdrTc tc               = return (cL l tc, acc, fix, ann)-    go _ (HsOpTy _ t1 ltc@(dL->L _ tc) t2) acc ann _fix-      | isRdrTc tc               = return (ltc, HsValArg t1:HsValArg t2:acc, Infix, ann)-    go l (HsParTy _ ty)    acc ann fix = goL ty acc (ann ++mkParensApiAnn l) fix-    go _ (HsAppTy _ t1 t2) acc ann fix = goL t1 (HsValArg t2:acc) ann fix-    go _ (HsAppKindTy l ty ki) acc ann fix = goL ty (HsTypeArg l ki:acc) ann fix-    go l (HsTupleTy _ HsBoxedOrConstraintTuple ts) [] ann fix-      = return (cL l (nameRdrName tup_name), map HsValArg ts, fix, ann)-      where-        arity = length ts-        tup_name | is_cls    = cTupleTyConName arity-                 | otherwise = getName (tupleTyCon Boxed arity)-          -- See Note [Unit tuples] in HsTypes  (TODO: is this still relevant?)-    go l _ _ _ _-      = parseErrorSDoc l (text "Malformed head of type or class declaration:"-                          <+> ppr ty)---- | Yield a parse error if we have a function applied directly to a do block--- etc. and BlockArguments is not enabled.-checkBlockArguments :: LHsExpr GhcPs -> P ()-checkBlockArguments expr = case unLoc expr of-    HsDo _ DoExpr _ -> check "do block"-    HsDo _ MDoExpr _ -> check "mdo block"-    HsLam {} -> check "lambda expression"-    HsCase {} -> check "case expression"-    HsLamCase {} -> check "lambda-case expression"-    HsLet {} -> check "let expression"-    HsIf {} -> check "if expression"-    HsProc {} -> check "proc expression"-    _ -> return ()-  where-    check element = do-      blockArguments <- getBit BlockArgumentsBit-      unless blockArguments $-        parseErrorSDoc (getLoc expr) $-          text "Unexpected " <> text element <> text " in function application:"-           $$ nest 4 (ppr expr)-           $$ text "You could write it with parentheses"-           $$ text "Or perhaps you meant to enable BlockArguments?"---- | Validate the context constraints and break up a context into a list--- of predicates.------ @---     (Eq a, Ord b)        -->  [Eq a, Ord b]---     Eq a                 -->  [Eq a]---     (Eq a)               -->  [Eq a]---     (((Eq a)))           -->  [Eq a]--- @-checkContext :: LHsType GhcPs -> P ([AddAnn],LHsContext GhcPs)-checkContext (dL->L l orig_t)-  = check [] (cL l orig_t)- where-  check anns (dL->L lp (HsTupleTy _ HsBoxedOrConstraintTuple ts))-    -- (Eq a, Ord b) shows up as a tuple type. Only boxed tuples can-    -- be used as context constraints.-    = return (anns ++ mkParensApiAnn lp,cL l ts)                -- Ditto ()--  check anns (dL->L lp1 (HsParTy _ ty))-                                  -- to be sure HsParTy doesn't get into the way-       = check anns' ty-         where anns' = if l == lp1 then anns-                                   else (anns ++ mkParensApiAnn lp1)--  -- no need for anns, returning original-  check _anns t = checkNoDocs msg t *> return ([],cL l [cL l orig_t])--  msg = text "data constructor context"---- | Check recursively if there are any 'HsDocTy's in the given type.--- This only works on a subset of types produced by 'btype_no_ops'-checkNoDocs :: SDoc -> LHsType GhcPs -> P ()-checkNoDocs msg ty = go ty-  where-    go (dL->L _ (HsAppKindTy _ ty ki)) = go ty *> go ki-    go (dL->L _ (HsAppTy _ t1 t2)) = go t1 *> go t2-    go (dL->L l (HsDocTy _ t ds)) = parseErrorSDoc l $ hsep-                                  [ text "Unexpected haddock", quotes (ppr ds)-                                  , text "on", msg, quotes (ppr t) ]-    go _ = pure ()---- ---------------------------------------------------------------------------- Checking Patterns.---- We parse patterns as expressions and check for valid patterns below,--- converting the expression into a pattern at the same time.--checkPattern :: SDoc -> LHsExpr GhcPs -> P (LPat GhcPs)-checkPattern msg e = checkLPat msg e--checkPatterns :: SDoc -> [LHsExpr GhcPs] -> P [LPat GhcPs]-checkPatterns msg es = mapM (checkPattern msg) es--checkLPat :: SDoc -> LHsExpr GhcPs -> P (LPat GhcPs)-checkLPat msg e@(dL->L l _) = checkPat msg l e []--checkPat :: SDoc -> SrcSpan -> LHsExpr GhcPs -> [LPat GhcPs]-         -> P (LPat GhcPs)-checkPat _ loc (dL->L l e@(HsVar _ (dL->L _ c))) args-  | isRdrDataCon c = return (cL loc (ConPatIn (cL l c) (PrefixCon args)))-  | not (null args) && patIsRec c =-      patFail (text "Perhaps you intended to use RecursiveDo") l e-checkPat msg loc e args     -- OK to let this happen even if bang-patterns-                        -- are not enabled, because there is no valid-                        -- non-bang-pattern parse of (C ! e)-  | Just (e', args') <- splitBang e-  = do  { args'' <- checkPatterns msg args'-        ; checkPat msg loc e' (args'' ++ args) }-checkPat msg loc (dL->L _ (HsApp _ f e)) args-  = do p <- checkLPat msg e-       checkPat msg loc f (p : args)-checkPat msg loc (dL->L _ e) []-  = do p <- checkAPat msg loc e-       return (cL loc p)-checkPat msg loc e _-  = patFail msg loc (unLoc e)--checkAPat :: SDoc -> SrcSpan -> HsExpr GhcPs -> P (Pat GhcPs)-checkAPat msg loc e0 = do- nPlusKPatterns <- getBit NPlusKPatternsBit- case e0 of-   EWildPat _ -> return (WildPat noExt)-   HsVar _ x  -> return (VarPat noExt x)-   HsLit _ (HsStringPrim _ _) -- (#13260)-       -> parseErrorSDoc loc (text "Illegal unboxed string literal in pattern:"-                              $$ ppr e0)--   HsLit _ l  -> return (LitPat noExt l)--   -- Overloaded numeric patterns (e.g. f 0 x = x)-   -- Negation is recorded separately, so that the literal is zero or +ve-   -- NB. Negative *primitive* literals are already handled by the lexer-   HsOverLit _ pos_lit          -> return (mkNPat (cL loc pos_lit) Nothing)-   NegApp _ (dL->L l (HsOverLit _ pos_lit)) _-                        -> return (mkNPat (cL l pos_lit) (Just noSyntaxExpr))--   SectionR _ (dL->L lb (HsVar _ (dL->L _ bang))) e    -- (! x)-        | bang == bang_RDR-        -> do { hintBangPat loc e0-              ; e' <- checkLPat msg e-              ; addAnnotation loc AnnBang lb-              ; return  (BangPat noExt e') }--   ELazyPat _ e         -> checkLPat msg e >>= (return . (LazyPat noExt))-   EAsPat _ n e         -> checkLPat msg e >>= (return . (AsPat noExt) n)-   -- view pattern is well-formed if the pattern is-   EViewPat _ expr patE -> checkLPat msg patE >>=-                            (return . (\p -> ViewPat noExt expr p))-   ExprWithTySig _ e t  -> do e <- checkLPat msg e-                              return (SigPat noExt e t)--   -- n+k patterns-   OpApp _ (dL->L nloc (HsVar _ (dL->L _ n)))-           (dL->L _    (HsVar _ (dL->L _ plus)))-           (dL->L lloc (HsOverLit _ lit@(OverLit {ol_val = HsIntegral {}})))-                      | nPlusKPatterns && (plus == plus_RDR)-                      -> return (mkNPlusKPat (cL nloc n) (cL lloc lit))-   OpApp _ l (dL->L cl (HsVar _ (dL->L _ c))) r-     | isDataOcc (rdrNameOcc c) -> do-         l <- checkLPat msg l-         r <- checkLPat msg r-         return (ConPatIn (cL cl c) (InfixCon l r))--   OpApp {}           -> patFail msg loc e0--   ExplicitList _ _ es -> do ps <- mapM (checkLPat msg) es-                             return (ListPat noExt ps)--   HsPar _ e          -> checkLPat msg e >>= (return . (ParPat noExt))--   ExplicitTuple _ es b-     | all tupArgPresent es  -> do ps <- mapM (checkLPat msg)-                                           [e | (dL->L _ (Present _ e)) <- es]-                                   return (TuplePat noExt ps b)-     | otherwise -> parseErrorSDoc loc (text "Illegal tuple section in pattern:"-                                        $$ ppr e0)--   ExplicitSum _ alt arity expr -> do-     p <- checkLPat msg expr-     return (SumPat noExt p alt arity)--   RecordCon { rcon_con_name = c, rcon_flds = HsRecFields fs dd }-                        -> do fs <- mapM (checkPatField msg) fs-                              return (ConPatIn c (RecCon (HsRecFields fs dd)))-   HsSpliceE _ s | not (isTypedSplice s)-               -> return (SplicePat noExt s)-   _           -> patFail msg loc e0--placeHolderPunRhs :: LHsExpr GhcPs--- The RHS of a punned record field will be filled in by the renamer--- It's better not to make it an error, in case we want to print it when--- debugging-placeHolderPunRhs = noLoc (HsVar noExt (noLoc pun_RDR))--plus_RDR, bang_RDR, pun_RDR :: RdrName-plus_RDR = mkUnqual varName (fsLit "+") -- Hack-bang_RDR = mkUnqual varName (fsLit "!") -- Hack-pun_RDR  = mkUnqual varName (fsLit "pun-right-hand-side")--isBangRdr :: RdrName -> Bool-isBangRdr (Unqual occ) = occNameFS occ == fsLit "!"-isBangRdr _ = False--checkPatField :: SDoc -> LHsRecField GhcPs (LHsExpr GhcPs)-              -> P (LHsRecField GhcPs (LPat GhcPs))-checkPatField msg (dL->L l fld) = do p <- checkLPat msg (hsRecFieldArg fld)-                                     return (cL l (fld { hsRecFieldArg = p }))--patFail :: SDoc -> SrcSpan -> HsExpr GhcPs -> P a-patFail msg loc e = parseErrorSDoc loc err-    where err = text "Parse error in pattern:" <+> ppr e-             $$ msg--patIsRec :: RdrName -> Bool-patIsRec e = e == mkUnqual varName (fsLit "rec")--------------------------------------------------------------------------------- Check Equation Syntax--checkValDef :: SDoc-            -> SrcStrictness-            -> LHsExpr GhcPs-            -> Maybe (LHsType GhcPs)-            -> Located (a,GRHSs GhcPs (LHsExpr GhcPs))-            -> P ([AddAnn],HsBind GhcPs)--checkValDef msg _strictness lhs (Just sig) grhss-        -- x :: ty = rhs  parses as a *pattern* binding-  = checkPatBind msg (cL (combineLocs lhs sig)-                        (ExprWithTySig noExt lhs (mkLHsSigWcType sig))) grhss--checkValDef msg strictness lhs Nothing g@(dL->L l (_,grhss))-  = do  { mb_fun <- isFunLhs lhs-        ; case mb_fun of-            Just (fun, is_infix, pats, ann) ->-              checkFunBind msg strictness ann (getLoc lhs)-                           fun is_infix pats (cL l grhss)-            Nothing -> checkPatBind msg lhs g }--checkFunBind :: SDoc-             -> SrcStrictness-             -> [AddAnn]-             -> SrcSpan-             -> Located RdrName-             -> LexicalFixity-             -> [LHsExpr GhcPs]-             -> Located (GRHSs GhcPs (LHsExpr GhcPs))-             -> P ([AddAnn],HsBind GhcPs)-checkFunBind msg strictness ann lhs_loc fun is_infix pats (dL->L rhs_span grhss)-  = do  ps <- checkPatterns msg pats-        let match_span = combineSrcSpans lhs_loc rhs_span-        -- Add back the annotations stripped from any HsPar values in the lhs-        -- mapM_ (\a -> a match_span) ann-        return (ann, makeFunBind fun-                  [cL match_span (Match { m_ext = noExt-                                        , m_ctxt = FunRhs-                                            { mc_fun    = fun-                                            , mc_fixity = is_infix-                                            , mc_strictness = strictness }-                                        , m_pats = ps-                                        , m_grhss = grhss })])-        -- The span of the match covers the entire equation.-        -- That isn't quite right, but it'll do for now.--makeFunBind :: Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)]-            -> HsBind GhcPs--- Like HsUtils.mkFunBind, but we need to be able to set the fixity too-makeFunBind fn ms-  = FunBind { fun_ext = noExt,-              fun_id = fn,-              fun_matches = mkMatchGroup FromSource ms,-              fun_co_fn = idHsWrapper,-              fun_tick = [] }--checkPatBind :: SDoc-             -> LHsExpr GhcPs-             -> Located (a,GRHSs GhcPs (LHsExpr GhcPs))-             -> P ([AddAnn],HsBind GhcPs)-checkPatBind msg lhs (dL->L _ (_,grhss))-  = do  { lhs <- checkPattern msg lhs-        ; return ([],PatBind noExt lhs grhss-                    ([],[])) }--checkValSigLhs :: LHsExpr GhcPs -> P (Located RdrName)-checkValSigLhs (dL->L _ (HsVar _ lrdr@(dL->L _ v)))-  | isUnqual v-  , not (isDataOcc (rdrNameOcc v))-  = return lrdr--checkValSigLhs lhs@(dL->L l _)-  = parseErrorSDoc l ((text "Invalid type signature:" <+>-                       ppr lhs <+> text ":: ...")-                      $$ text hint)-  where-    hint | foreign_RDR `looks_like` lhs-         = "Perhaps you meant to use ForeignFunctionInterface?"-         | default_RDR `looks_like` lhs-         = "Perhaps you meant to use DefaultSignatures?"-         | pattern_RDR `looks_like` lhs-         = "Perhaps you meant to use PatternSynonyms?"-         | otherwise-         = "Should be of form <variable> :: <type>"--    -- A common error is to forget the ForeignFunctionInterface flag-    -- so check for that, and suggest.  cf Trac #3805-    -- Sadly 'foreign import' still barfs 'parse error' because-    --  'import' is a keyword-    looks_like s (dL->L _ (HsVar _ (dL->L _ v))) = v == s-    looks_like s (dL->L _ (HsApp _ lhs _))   = looks_like s lhs-    looks_like _ _                       = False--    foreign_RDR = mkUnqual varName (fsLit "foreign")-    default_RDR = mkUnqual varName (fsLit "default")-    pattern_RDR = mkUnqual varName (fsLit "pattern")---checkDoAndIfThenElse :: LHsExpr GhcPs-                     -> Bool-                     -> LHsExpr GhcPs-                     -> Bool-                     -> LHsExpr GhcPs-                     -> P ()-checkDoAndIfThenElse guardExpr semiThen thenExpr semiElse elseExpr- | semiThen || semiElse-    = do doAndIfThenElse <- getBit DoAndIfThenElseBit-         unless doAndIfThenElse $ do-             parseErrorSDoc (combineLocs guardExpr elseExpr)-                            (text "Unexpected semi-colons in conditional:"-                          $$ nest 4 expr-                          $$ text "Perhaps you meant to use DoAndIfThenElse?")- | otherwise            = return ()-    where pprOptSemi True  = semi-          pprOptSemi False = empty-          expr = text "if"   <+> ppr guardExpr <> pprOptSemi semiThen <+>-                 text "then" <+> ppr thenExpr  <> pprOptSemi semiElse <+>-                 text "else" <+> ppr elseExpr---        -- The parser left-associates, so there should-        -- not be any OpApps inside the e's-splitBang :: LHsExpr GhcPs -> Maybe (LHsExpr GhcPs, [LHsExpr GhcPs])--- Splits (f ! g a b) into (f, [(! g), a, b])-splitBang (dL->L _ (OpApp _ l_arg bang@(dL->L _ (HsVar _ (dL->L _ op))) r_arg))-  | op == bang_RDR = Just (l_arg, cL l' (SectionR noExt bang arg1) : argns)-  where-    l' = combineLocs bang arg1-    (arg1,argns) = split_bang r_arg []-    split_bang (dL->L _ (HsApp _ f e)) es = split_bang f (e:es)-    split_bang e                       es = (e,es)-splitBang _ = Nothing---- See Note [isFunLhs vs mergeDataCon]-isFunLhs :: LHsExpr GhcPs-      -> P (Maybe (Located RdrName, LexicalFixity, [LHsExpr GhcPs],[AddAnn]))--- A variable binding is parsed as a FunBind.--- Just (fun, is_infix, arg_pats) if e is a function LHS------ The whole LHS is parsed as a single expression.--- Any infix operators on the LHS will parse left-associatively--- E.g.         f !x y !z---      will parse (rather strangely) as---              (f ! x y) ! z---      It's up to isFunLhs to sort out the mess------ a .!. !b--isFunLhs e = go e [] []- where-   go (dL->L loc (HsVar _ (dL->L _ f))) es ann-       | not (isRdrDataCon f)        = return (Just (cL loc f, Prefix, es, ann))-   go (dL->L _ (HsApp _ f e)) es       ann = go f (e:es) ann-   go (dL->L l (HsPar _ e))   es@(_:_) ann = go e es (ann ++ mkParensApiAnn l)--        -- Things of the form `!x` are also FunBinds-        -- See Note [FunBind vs PatBind]-   go (dL->L _ (SectionR _ (dL->L _ (HsVar _ (dL->L _ bang)))-                (dL->L l (HsVar _ (L _ var))))) [] ann-        | bang == bang_RDR-        , not (isRdrDataCon var)     = return (Just (cL l var, Prefix, [], ann))--      -- For infix function defns, there should be only one infix *function*-      -- (though there may be infix *datacons* involved too).  So we don't-      -- need fixity info to figure out which function is being defined.-      --      a `K1` b `op` c `K2` d-      -- must parse as-      --      (a `K1` b) `op` (c `K2` d)-      -- The renamer checks later that the precedences would yield such a parse.-      ---      -- There is a complication to deal with bang patterns.-      ---      -- ToDo: what about this?-      --              x + 1 `op` y = ...--   go e@(L loc (OpApp _ l (dL->L loc' (HsVar _ (dL->L _ op))) r)) es ann-        | Just (e',es') <- splitBang e-        = do { bang_on <- getBit BangPatBit-             ; if bang_on then go e' (es' ++ es) ann-               else return (Just (cL loc' op, Infix, (l:r:es), ann)) }-                -- No bangs; behave just like the next case-        | not (isRdrDataCon op)         -- We have found the function!-        = return (Just (cL loc' op, Infix, (l:r:es), ann))-        | otherwise                     -- Infix data con; keep going-        = do { mb_l <- go l es ann-             ; case mb_l of-                 Just (op', Infix, j : k : es', ann')-                   -> return (Just (op', Infix, j : op_app : es', ann'))-                   where-                     op_app = cL loc (OpApp noExt k-                               (cL loc' (HsVar noExt (cL loc' op))) r)-                 _ -> return Nothing }-   go _ _ _ = return Nothing---- | Either an operator or an operand.-data TyEl = TyElOpr RdrName | TyElOpd (HsType GhcPs)-          | TyElKindApp SrcSpan (LHsType GhcPs)-          -- See Note [TyElKindApp SrcSpan interpretation]-          | TyElTilde | TyElBang-          | TyElUnpackedness ([AddAnn], SourceText, SrcUnpackedness)-          | TyElDocPrev HsDocString---{- Note [TyElKindApp SrcSpan interpretation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--A TyElKindApp captures type application written in haskell as--    @ Foo--where Foo is some type.--The SrcSpan reflects both elements, and there are AnnAt and AnnVal API-Annotations attached to this SrcSpan for the specific locations of-each within it.--}--instance Outputable TyEl where-  ppr (TyElOpr name) = ppr name-  ppr (TyElOpd ty) = ppr ty-  ppr (TyElKindApp _ ki) = text "@" <> ppr ki-  ppr TyElTilde = text "~"-  ppr TyElBang = text "!"-  ppr (TyElUnpackedness (_, _, unpk)) = ppr unpk-  ppr (TyElDocPrev doc) = ppr doc--tyElStrictness :: TyEl -> Maybe (AnnKeywordId, SrcStrictness)-tyElStrictness TyElTilde = Just (AnnTilde, SrcLazy)-tyElStrictness TyElBang = Just (AnnBang, SrcStrict)-tyElStrictness _ = Nothing---- | Extract a strictness/unpackedness annotation from the front of a reversed--- 'TyEl' list.-pStrictMark-  :: [Located TyEl] -- reversed TyEl-  -> Maybe ( Located HsSrcBang {- a strictness/upnackedness marker -}-           , [AddAnn]-           , [Located TyEl] {- remaining TyEl -})-pStrictMark ((dL->L l1 x1) : (dL->L l2 x2) : xs)-  | Just (strAnnId, str) <- tyElStrictness x1-  , TyElUnpackedness (unpkAnns, prag, unpk) <- x2-  = Just ( cL (combineSrcSpans l1 l2) (HsSrcBang prag unpk str)-         , unpkAnns ++ [\s -> addAnnotation s strAnnId l1]-         , xs )-pStrictMark ((dL->L l x1) : xs)-  | Just (strAnnId, str) <- tyElStrictness x1-  = Just ( cL l (HsSrcBang NoSourceText NoSrcUnpack str)-         , [\s -> addAnnotation s strAnnId l]-         , xs )-pStrictMark ((dL->L l x1) : xs)-  | TyElUnpackedness (anns, prag, unpk) <- x1-  = Just ( cL l (HsSrcBang prag unpk NoSrcStrict)-         , anns-         , xs )-pStrictMark _ = Nothing--pBangTy-  :: LHsType GhcPs  -- a type to be wrapped inside HsBangTy-  -> [Located TyEl] -- reversed TyEl-  -> ( Bool           {- has a strict mark been consumed? -}-     , LHsType GhcPs  {- the resulting BangTy -}-     , P ()           {- add annotations -}-     , [Located TyEl] {- remaining TyEl -})-pBangTy lt@(dL->L l1 _) xs =-  case pStrictMark xs of-    Nothing -> (False, lt, pure (), xs)-    Just (dL->L l2 strictMark, anns, xs') ->-      let bl = combineSrcSpans l1 l2-          bt = HsBangTy noExt strictMark lt-      in (True, cL bl bt, addAnnsAt bl anns, xs')---- | Merge a /reversed/ and /non-empty/ soup of operators and operands---   into a type.------ User input: @F x y + G a b * X@--- Input to 'mergeOps': [X, *, b, a, G, +, y, x, F]--- Output corresponds to what the user wrote assuming all operators are of the--- same fixity and right-associative.------ It's a bit silly that we're doing it at all, as the renamer will have to--- rearrange this, and it'd be easier to keep things separate.------ See Note [Parsing data constructors is hard]-mergeOps :: [Located TyEl] -> P (LHsType GhcPs)-mergeOps ((dL->L l1 (TyElOpd t)) : xs)-  | (_, t', addAnns, xs') <- pBangTy (cL l1 t) xs-  , null xs' -- We accept a BangTy only when there are no preceding TyEl.-  = addAnns >> return t'-mergeOps all_xs = go (0 :: Int) [] id all_xs-  where-    -- NB. When modifying clauses in 'go', make sure that the reasoning in-    -- Note [Non-empty 'acc' in mergeOps clause [end]] is still correct.--    -- clause [unpk]:-    -- handle (NO)UNPACK pragmas-    go k acc ops_acc ((dL->L l (TyElUnpackedness (anns, unpkSrc, unpk))):xs) =-      if not (null acc) && null xs-      then do { acc' <- eitherToP $ mergeOpsAcc acc-              ; let a = ops_acc acc'-                    strictMark = HsSrcBang unpkSrc unpk NoSrcStrict-                    bl = combineSrcSpans l (getLoc a)-                    bt = HsBangTy noExt strictMark a-              ; addAnnsAt bl anns-              ; return (cL bl bt) }-      else parseErrorSDoc l unpkError-      where-        unpkSDoc = case unpkSrc of-          NoSourceText -> ppr unpk-          SourceText str -> text str <> text " #-}"-        unpkError-          | not (null xs) = unpkSDoc <+> text "cannot appear inside a type."-          | null acc && k == 0 = unpkSDoc <+> text "must be applied to a type."-          | otherwise =-              -- See Note [Impossible case in mergeOps clause [unpk]]-              panic "mergeOps.UNPACK: impossible position"--    -- clause [doc]:-    -- we do not expect to encounter any docs-    go _ _ _ ((dL->L l (TyElDocPrev _)):_) =-      failOpDocPrev l--    -- to improve error messages, we do a bit of guesswork to determine if the-    -- user intended a '!' or a '~' as a strictness annotation-    go k acc ops_acc ((dL->L l x) : xs)-      | Just (_, str) <- tyElStrictness x-      , let guess [] = True-            guess ((dL->L _ (TyElOpd _)):_) = False-            guess ((dL->L _ (TyElOpr _)):_) = True-            guess ((dL->L _ (TyElKindApp _ _)):_) = False-            guess ((dL->L _ (TyElTilde)):_) = True-            guess ((dL->L _ (TyElBang)):_) = True-            guess ((dL->L _ (TyElUnpackedness _)):_) = True-            guess ((dL->L _ (TyElDocPrev _)):xs') = guess xs'-            guess _ = panic "mergeOps.go.guess: Impossible Match"-                      -- due to #15884-        in guess xs-      = if not (null acc) && (k > 1 || length acc > 1)-        then do { a <- eitherToP (mergeOpsAcc acc)-                ; failOpStrictnessCompound (cL l str) (ops_acc a) }-        else failOpStrictnessPosition (cL l str)--    -- clause [opr]:-    -- when we encounter an operator, we must have accumulated-    -- something for its rhs, and there must be something left-    -- to build its lhs.-    go k acc ops_acc ((dL->L l (TyElOpr op)):xs) =-      if null acc || null (filter isTyElOpd xs)-        then failOpFewArgs (cL l op)-        else do { acc' <- eitherToP (mergeOpsAcc acc)-                ; go (k + 1) [] (\c -> mkLHsOpTy c (cL l op) (ops_acc acc')) xs }-      where-        isTyElOpd (dL->L _ (TyElOpd _)) = True-        isTyElOpd _ = False--    -- clause [opr.1]: interpret 'TyElTilde' as an operator-    go k acc ops_acc ((dL->L l TyElTilde):xs) =-      let op = eqTyCon_RDR-      in go k acc ops_acc (cL l (TyElOpr op):xs)--    -- clause [opr.2]: interpret 'TyElBang' as an operator-    go k acc ops_acc ((dL->L l TyElBang):xs) =-      let op = mkUnqual tcClsName (fsLit "!")-      in go k acc ops_acc (cL l (TyElOpr op):xs)--    -- clause [opd]:-    -- whenever an operand is encountered, it is added to the accumulator-    go k acc ops_acc ((dL->L l (TyElOpd a)):xs) = go k (HsValArg (cL l a):acc) ops_acc xs--    -- clause [tyapp]:-    -- whenever a type application is encountered, it is added to the accumulator-    go k acc ops_acc ((dL->L _ (TyElKindApp l a)):xs) = go k (HsTypeArg l a:acc) ops_acc xs--    -- clause [end]-    -- See Note [Non-empty 'acc' in mergeOps clause [end]]-    go _ acc ops_acc [] = do { acc' <- eitherToP (mergeOpsAcc acc)-                             ; return (ops_acc acc') }--    go _ _ _ _ = panic "mergeOps.go: Impossible Match"-                        -- due to #15884--mergeOpsAcc :: [HsArg (LHsType GhcPs) (LHsKind GhcPs)]-         -> Either (SrcSpan, SDoc) (LHsType GhcPs)-mergeOpsAcc [] = panic "mergeOpsAcc: empty input"-mergeOpsAcc (HsTypeArg _ (L loc ki):_)-  = Left (loc, text "Unexpected type application:" <+> ppr ki)-mergeOpsAcc (HsValArg ty : xs) = go1 ty xs-  where-    go1 :: LHsType GhcPs-        -> [HsArg (LHsType GhcPs) (LHsKind GhcPs)]-        -> Either (SrcSpan, SDoc) (LHsType GhcPs)-    go1 lhs []     = Right lhs-    go1 lhs (x:xs) = case x of-        HsValArg ty -> go1 (mkHsAppTy lhs ty) xs-        HsTypeArg loc ki -> let ty = mkHsAppKindTy loc lhs ki-                            in go1 ty xs-        HsArgPar _ -> go1 lhs xs-mergeOpsAcc (HsArgPar _: xs) = mergeOpsAcc xs--{- Note [Impossible case in mergeOps clause [unpk]]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-This case should never occur. Let us consider all possible-variations of 'acc', 'xs', and 'k':--  acc          xs        k-==============================-  null   |    null       0      -- "must be applied to a type"-  null   |  not null     0      -- "must be applied to a type"-not null |    null       0      -- successful parse-not null |  not null     0      -- "cannot appear inside a type"-  null   |    null      >0      -- handled in clause [opr]-  null   |  not null    >0      -- "cannot appear inside a type"-not null |    null      >0      -- successful parse-not null |  not null    >0      -- "cannot appear inside a type"--The (null acc && null xs && k>0) case is handled in clause [opr]-by the following check:--    if ... || null (filter isTyElOpd xs)-     then failOpFewArgs (L l op)--We know that this check has been performed because k>0, and by-the time we reach the end of the list (null xs), the only way-for (null acc) to hold is that there was not a single TyElOpd-between the operator and the end of the list. But this case is-caught by the check and reported as 'failOpFewArgs'.--}--{- Note [Non-empty 'acc' in mergeOps clause [end]]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In clause [end] we need to know that 'acc' is non-empty to call 'mergeAcc'-without a check.--Running 'mergeOps' with an empty input list is forbidden, so we do not consider-this possibility. This means we'll hit at least one other clause before we-reach clause [end].--* Clauses [unpk] and [doc] do not call 'go' recursively, so we cannot hit-  clause [end] from there.-* Clause [opd] makes 'acc' non-empty, so if we hit clause [end] after it, 'acc'-  will be non-empty.-* Clause [opr] checks that (filter isTyElOpd xs) is not null - so we are going-  to hit clause [opd] at least once before we reach clause [end], making 'acc'-  non-empty.-* There are no other clauses.--Therefore, it is safe to omit a check for non-emptiness of 'acc' in clause-[end].---}--pInfixSide :: [Located TyEl] -> Maybe (LHsType GhcPs, P (), [Located TyEl])-pInfixSide ((dL->L l (TyElOpd t)):xs)-  | (True, t', addAnns, xs') <- pBangTy (cL l t) xs-  = Just (t', addAnns, xs')-pInfixSide (el:xs1)-  | Just t1 <- pLHsTypeArg el-  = go [t1] xs1-   where-     go :: [HsArg (LHsType GhcPs) (LHsKind GhcPs)]-        -> [Located TyEl] -> Maybe (LHsType GhcPs, P (), [Located TyEl])-     go acc (el:xs)-       | Just t <- pLHsTypeArg el-       = go (t:acc) xs-     go acc xs = case mergeOpsAcc acc of-       Left _ -> Nothing-       Right acc' -> Just (acc', pure (), xs)-pInfixSide _ = Nothing--pLHsTypeArg :: Located TyEl -> Maybe (HsArg (LHsType GhcPs) (LHsKind GhcPs))-pLHsTypeArg (dL->L l (TyElOpd a)) = Just (HsValArg (L l a))-pLHsTypeArg (dL->L _ (TyElKindApp l a)) = Just (HsTypeArg l a)-pLHsTypeArg _ = Nothing--pDocPrev :: [Located TyEl] -> (Maybe LHsDocString, [Located TyEl])-pDocPrev = go Nothing-  where-    go mTrailingDoc ((dL->L l (TyElDocPrev doc)):xs) =-      go (mTrailingDoc `mplus` Just (cL l doc)) xs-    go mTrailingDoc xs = (mTrailingDoc, xs)--orErr :: Maybe a -> b -> Either b a-orErr (Just a) _ = Right a-orErr Nothing b = Left b--{- Note [isFunLhs vs mergeDataCon]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--When parsing a function LHS, we do not know whether to treat (!) as-a strictness annotation or an infix operator:--  f ! a = ...--Without -XBangPatterns, this parses as   (!) f a = ...-   with -XBangPatterns, this parses as   f (!a) = ...--So in function declarations we opted to always parse as if -XBangPatterns-were off, and then rejig in 'isFunLhs'.--There are two downsides to this approach:--1. It is not particularly elegant, as there's a point in our pipeline where-   the representation is awfully incorrect. For instance,-      f !a b !c = ...-   will be first parsed as-      (f ! a b) ! c = ...--2. There are cases that it fails to cover, for instance infix declarations:-      !a + !b = ...-   will trigger an error.--Unfortunately, we cannot define different productions in the 'happy' grammar-depending on whether -XBangPatterns are enabled.--When parsing data constructors, we face a similar issue:-  (a) data T1 = C ! D-  (b) data T2 = C ! D => ...--In (a) the first bang is a strictness annotation, but in (b) it is a type-operator. A 'happy'-based parser does not have unlimited lookahead to check for-=>, so we must first parse (C ! D) into a common representation.--If we tried to mirror the approach used in functions, we would parse both sides-of => as types, and then rejig. However, we take a different route and use an-intermediate data structure, a reversed list of 'TyEl'.-See Note [Parsing data constructors is hard] for details.--This approach does not suffer from the issues of 'isFunLhs':--1. A sequence of 'TyEl' is a dedicated intermediate representation, not an-   incorrectly parsed type. Therefore, we do not have confusing states in our-   pipeline. (Except for representing data constructors as type variables).--2. We can handle infix data constructors with strictness annotations:-    data T a b = !a :+ !b---}----- | Merge a /reversed/ and /non-empty/ soup of operators and operands---   into a data constructor.------ User input: @C !A B -- ^ doc@--- Input to 'mergeDataCon': ["doc", B, !, A, C]--- Output: (C, PrefixCon [!A, B], "doc")------ See Note [Parsing data constructors is hard]--- See Note [isFunLhs vs mergeDataCon]-mergeDataCon-      :: [Located TyEl]-      -> P ( Located RdrName         -- constructor name-           , HsConDeclDetails GhcPs  -- constructor field information-           , Maybe LHsDocString      -- docstring to go on the constructor-           )-mergeDataCon all_xs =-  do { (addAnns, a) <- eitherToP res-     ; addAnns-     ; return a }-  where-    -- We start by splitting off the trailing documentation comment,-    -- if any exists.-    (mTrailingDoc, all_xs') = pDocPrev all_xs--    -- Determine whether the trailing documentation comment exists and is the-    -- only docstring in this constructor declaration.-    ---    -- When true, it means that it applies to the constructor itself:-    --    data T = C-    --             A-    --             B -- ^ Comment on C (singleDoc == True)-    ---    -- When false, it means that it applies to the last field:-    --    data T = C -- ^ Comment on C-    --             A -- ^ Comment on A-    --             B -- ^ Comment on B (singleDoc == False)-    singleDoc = isJust mTrailingDoc &&-                null [ () | (dL->L _ (TyElDocPrev _)) <- all_xs' ]--    -- The result of merging the list of reversed TyEl into a-    -- data constructor, along with [AddAnn].-    res = goFirst all_xs'--    -- Take the trailing docstring into account when interpreting-    -- the docstring near the constructor.-    ---    --    data T = C -- ^ docstring right after C-    --             A-    --             B -- ^ trailing docstring-    ---    -- 'mkConDoc' must be applied to the docstring right after C, so that it-    -- falls back to the trailing docstring when appropriate (see singleDoc).-    mkConDoc mDoc | singleDoc = mDoc `mplus` mTrailingDoc-                  | otherwise = mDoc--    -- The docstring for the last field of a data constructor.-    trailingFieldDoc | singleDoc = Nothing-                     | otherwise = mTrailingDoc--    goFirst [ dL->L l (TyElOpd (HsTyVar _ _ (dL->L _ tc))) ]-      = do { data_con <- tyConToDataCon l tc-           ; return (pure (), (data_con, PrefixCon [], mTrailingDoc)) }-    goFirst ((dL->L l (TyElOpd (HsRecTy _ fields))):xs)-      | (mConDoc, xs') <- pDocPrev xs-      , [ dL->L l' (TyElOpd (HsTyVar _ _ (dL->L _ tc))) ] <- xs'-      = do { data_con <- tyConToDataCon l' tc-           ; let mDoc = mTrailingDoc `mplus` mConDoc-           ; return (pure (), (data_con, RecCon (cL l fields), mDoc)) }-    goFirst [dL->L l (TyElOpd (HsTupleTy _ HsBoxedOrConstraintTuple ts))]-      = return ( pure ()-               , ( cL l (getRdrName (tupleDataCon Boxed (length ts)))-                 , PrefixCon ts-                 , mTrailingDoc ) )-    goFirst ((dL->L l (TyElOpd t)):xs)-      | (_, t', addAnns, xs') <- pBangTy (cL l t) xs-      = go addAnns Nothing [mkLHsDocTyMaybe t' trailingFieldDoc] xs'-    goFirst (L l (TyElKindApp _ _):_)-      = goInfix Monoid.<> Left (l, kindAppErr)-    goFirst xs-      = go (pure ()) mTrailingDoc [] xs--    go addAnns mLastDoc ts [ dL->L l (TyElOpd (HsTyVar _ _ (dL->L _ tc))) ]-      = do { data_con <- tyConToDataCon l tc-           ; return (addAnns, (data_con, PrefixCon ts, mkConDoc mLastDoc)) }-    go addAnns mLastDoc ts ((dL->L l (TyElDocPrev doc)):xs) =-      go addAnns (mLastDoc `mplus` Just (cL l doc)) ts xs-    go addAnns mLastDoc ts ((dL->L l (TyElOpd t)):xs)-      | (_, t', addAnns', xs') <- pBangTy (cL l t) xs-      , t'' <- mkLHsDocTyMaybe t' mLastDoc-      = go (addAnns >> addAnns') Nothing (t'':ts) xs'-    go _ _ _ ((dL->L _ (TyElOpr _)):_) =-      -- Encountered an operator: backtrack to the beginning and attempt-      -- to parse as an infix definition.-      goInfix-    go _ _ _ (L l (TyElKindApp _ _):_) =  goInfix Monoid.<> Left (l, kindAppErr)-    go _ _ _ _ = Left malformedErr-      where-        malformedErr =-          ( foldr combineSrcSpans noSrcSpan (map getLoc all_xs')-          , text "Cannot parse data constructor" <+>-            text "in a data/newtype declaration:" $$-            nest 2 (hsep . reverse $ map ppr all_xs'))--    goInfix =-      do { let xs0 = all_xs'-         ; (rhs_t, rhs_addAnns, xs1) <- pInfixSide xs0 `orErr` malformedErr-         ; let (mOpDoc, xs2) = pDocPrev xs1-         ; (op, xs3) <- case xs2 of-              (dL->L l (TyElOpr op)) : xs3 ->-                do { data_con <- tyConToDataCon l op-                   ; return (data_con, xs3) }-              _ -> Left malformedErr-         ; let (mLhsDoc, xs4) = pDocPrev xs3-         ; (lhs_t, lhs_addAnns, xs5) <- pInfixSide xs4 `orErr` malformedErr-         ; unless (null xs5) (Left malformedErr)-         ; let rhs = mkLHsDocTyMaybe rhs_t trailingFieldDoc-               lhs = mkLHsDocTyMaybe lhs_t mLhsDoc-               addAnns = lhs_addAnns >> rhs_addAnns-         ; return (addAnns, (op, InfixCon lhs rhs, mkConDoc mOpDoc)) }-      where-        malformedErr =-          ( foldr combineSrcSpans noSrcSpan (map getLoc all_xs')-          , text "Cannot parse an infix data constructor" <+>-            text "in a data/newtype declaration:" $$-            nest 2 (hsep . reverse $ map ppr all_xs'))--    kindAppErr =-      text "Unexpected kind application" <+>-      text "in a data/newtype declaration:" $$-      nest 2 (hsep . reverse $ map ppr all_xs')-------------------------------------------------------------------------------- | Check for monad comprehensions------ If the flag MonadComprehensions is set, return a 'MonadComp' context,--- otherwise use the usual 'ListComp' context--checkMonadComp :: P (HsStmtContext Name)-checkMonadComp = do-    monadComprehensions <- getBit MonadComprehensionsBit-    return $ if monadComprehensions-                then MonadComp-                else ListComp---- ---------------------------------------------------------------------------- Checking arrow syntax.---- We parse arrow syntax as expressions and check for valid syntax below,--- converting the expression into a pattern at the same time.--checkCommand :: LHsExpr GhcPs -> P (LHsCmd GhcPs)-checkCommand lc = locMap checkCmd lc--locMap :: (SrcSpan -> a -> P b) -> Located a -> P (Located b)-locMap f (dL->L l a) = f l a >>= (\b -> return $ cL l b)--checkCmd :: SrcSpan -> HsExpr GhcPs -> P (HsCmd GhcPs)-checkCmd _ (HsArrApp _ e1 e2 haat b) =-    return $ HsCmdArrApp noExt e1 e2 haat b-checkCmd _ (HsArrForm _ e mf args) =-    return $ HsCmdArrForm noExt e Prefix mf args-checkCmd _ (HsApp _ e1 e2) =-    checkCommand e1 >>= (\c -> return $ HsCmdApp noExt c e2)-checkCmd _ (HsLam _ mg) =-    checkCmdMatchGroup mg >>= (\mg' -> return $ HsCmdLam noExt mg')-checkCmd _ (HsPar _ e) =-    checkCommand e >>= (\c -> return $ HsCmdPar noExt c)-checkCmd _ (HsCase _ e mg) =-    checkCmdMatchGroup mg >>= (\mg' -> return $ HsCmdCase noExt e mg')-checkCmd _ (HsIf _ cf ep et ee) = do-    pt <- checkCommand et-    pe <- checkCommand ee-    return $ HsCmdIf noExt cf ep pt pe-checkCmd _ (HsLet _ lb e) =-    checkCommand e >>= (\c -> return $ HsCmdLet noExt lb c)-checkCmd _ (HsDo _ DoExpr (dL->L l stmts)) =-    mapM checkCmdLStmt stmts >>=-    (\ss -> return $ HsCmdDo noExt (cL l ss) )--checkCmd _ (OpApp _ eLeft op eRight) = do-    -- OpApp becomes a HsCmdArrForm with a (Just fixity) in it-    c1 <- checkCommand eLeft-    c2 <- checkCommand eRight-    let arg1 = cL (getLoc c1) $ HsCmdTop noExt c1-        arg2 = cL (getLoc c2) $ HsCmdTop noExt c2-    return $ HsCmdArrForm noExt op Infix Nothing [arg1, arg2]--checkCmd l e = cmdFail l e--checkCmdLStmt :: ExprLStmt GhcPs -> P (CmdLStmt GhcPs)-checkCmdLStmt = locMap checkCmdStmt--checkCmdStmt :: SrcSpan -> ExprStmt GhcPs -> P (CmdStmt GhcPs)-checkCmdStmt _ (LastStmt x e s r) =-    checkCommand e >>= (\c -> return $ LastStmt x c s r)-checkCmdStmt _ (BindStmt x pat e b f) =-    checkCommand e >>= (\c -> return $ BindStmt x pat c b f)-checkCmdStmt _ (BodyStmt x e t g) =-    checkCommand e >>= (\c -> return $ BodyStmt x c t g)-checkCmdStmt _ (LetStmt x bnds) = return $ LetStmt x bnds-checkCmdStmt _ stmt@(RecStmt { recS_stmts = stmts }) = do-    ss <- mapM checkCmdLStmt stmts-    return $ stmt { recS_ext = noExt, recS_stmts = ss }-checkCmdStmt _ (XStmtLR _) = panic "checkCmdStmt"-checkCmdStmt l stmt = cmdStmtFail l stmt--checkCmdMatchGroup :: MatchGroup GhcPs (LHsExpr GhcPs)-                   -> P (MatchGroup GhcPs (LHsCmd GhcPs))-checkCmdMatchGroup mg@(MG { mg_alts = (dL->L l ms) }) = do-    ms' <- mapM (locMap $ const convert) ms-    return $ mg { mg_ext = noExt-                , mg_alts = cL l ms' }-    where convert match@(Match { m_grhss = grhss }) = do-            grhss' <- checkCmdGRHSs grhss-            return $ match { m_ext = noExt, m_grhss = grhss'}-          convert (XMatch _) = panic "checkCmdMatchGroup.XMatch"-checkCmdMatchGroup (XMatchGroup {}) = panic "checkCmdMatchGroup"--checkCmdGRHSs :: GRHSs GhcPs (LHsExpr GhcPs) -> P (GRHSs GhcPs (LHsCmd GhcPs))-checkCmdGRHSs (GRHSs x grhss binds) = do-    grhss' <- mapM checkCmdGRHS grhss-    return $ GRHSs x grhss' binds-checkCmdGRHSs (XGRHSs _) = panic "checkCmdGRHSs"--checkCmdGRHS :: LGRHS GhcPs (LHsExpr GhcPs) -> P (LGRHS GhcPs (LHsCmd GhcPs))-checkCmdGRHS = locMap $ const convert-  where-    convert (GRHS x stmts e) = do-        c <- checkCommand e---        cmdStmts <- mapM checkCmdLStmt stmts-        return $ GRHS x {- cmdStmts -} stmts c-    convert (XGRHS _) = panic "checkCmdGRHS"---cmdFail :: SrcSpan -> HsExpr GhcPs -> P a-cmdFail loc e = parseErrorSDoc loc (text "Parse error in command:" <+> ppr e)-cmdStmtFail :: SrcSpan -> Stmt GhcPs (LHsExpr GhcPs) -> P a-cmdStmtFail loc e = parseErrorSDoc loc-                    (text "Parse error in command statement:" <+> ppr e)-------------------------------------------------------------------------------- Miscellaneous utilities---- | Check if a fixity is valid. We support bypassing the usual bound checks--- for some special operators.-checkPrecP-        :: Located (SourceText,Int)             -- ^ precedence-        -> Located (OrdList (Located RdrName))  -- ^ operators-        -> P ()-checkPrecP (dL->L l (_,i)) (dL->L _ ol)- | 0 <= i, i <= maxPrecedence = pure ()- | all specialOp ol = pure ()- | otherwise = parseErrorSDoc l (text ("Precedence out of range: " ++ show i))-  where-    specialOp op = unLoc op `elem` [ eqTyCon_RDR-                                   , getRdrName funTyCon ]--mkRecConstrOrUpdate-        :: LHsExpr GhcPs-        -> SrcSpan-        -> ([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)-        -> P (HsExpr GhcPs)--mkRecConstrOrUpdate (dL->L l (HsVar _ (dL->L _ c))) _ (fs,dd)-  | isRdrDataCon c-  = return (mkRdrRecordCon (cL l c) (mk_rec_fields fs dd))-mkRecConstrOrUpdate exp@(dL->L l _) _ (fs,dd)-  | dd        = parseErrorSDoc l (text "You cannot use `..' in a record update")-  | otherwise = return (mkRdrRecordUpd exp (map (fmap mk_rec_upd_field) fs))--mkRdrRecordUpd :: LHsExpr GhcPs -> [LHsRecUpdField GhcPs] -> HsExpr GhcPs-mkRdrRecordUpd exp flds-  = RecordUpd { rupd_ext  = noExt-              , rupd_expr = exp-              , rupd_flds = flds }--mkRdrRecordCon :: Located RdrName -> HsRecordBinds GhcPs -> HsExpr GhcPs-mkRdrRecordCon con flds-  = RecordCon { rcon_ext = noExt, rcon_con_name = con, rcon_flds = flds }--mk_rec_fields :: [LHsRecField id arg] -> Bool -> HsRecFields id arg-mk_rec_fields fs False = HsRecFields { rec_flds = fs, rec_dotdot = Nothing }-mk_rec_fields fs True  = HsRecFields { rec_flds = fs-                                     , rec_dotdot = Just (length fs) }--mk_rec_upd_field :: HsRecField GhcPs (LHsExpr GhcPs) -> HsRecUpdField GhcPs-mk_rec_upd_field (HsRecField (dL->L loc (FieldOcc _ rdr)) arg pun)-  = HsRecField (L loc (Unambiguous noExt rdr)) arg pun-mk_rec_upd_field (HsRecField (dL->L _ (XFieldOcc _)) _ _)-  = panic "mk_rec_upd_field"-mk_rec_upd_field (HsRecField _ _ _)-  = panic "mk_rec_upd_field: Impossible Match" -- due to #15884--mkInlinePragma :: SourceText -> (InlineSpec, RuleMatchInfo) -> Maybe Activation-               -> InlinePragma--- The (Maybe Activation) is because the user can omit--- the activation spec (and usually does)-mkInlinePragma src (inl, match_info) mb_act-  = InlinePragma { inl_src = src -- Note [Pragma source text] in BasicTypes-                 , inl_inline = inl-                 , inl_sat    = Nothing-                 , inl_act    = act-                 , inl_rule   = match_info }-  where-    act = case mb_act of-            Just act -> act-            Nothing  -> -- No phase specified-                        case inl of-                          NoInline -> NeverActive-                          _other   -> AlwaysActive---------------------------------------------------------------------------------- utilities for foreign declarations---- construct a foreign import declaration----mkImport :: Located CCallConv-         -> Located Safety-         -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs)-         -> P (HsDecl GhcPs)-mkImport cconv safety (L loc (StringLiteral esrc entity), v, ty) =-    case unLoc cconv of-      CCallConv          -> mkCImport-      CApiConv           -> mkCImport-      StdCallConv        -> mkCImport-      PrimCallConv       -> mkOtherImport-      JavaScriptCallConv -> mkOtherImport-  where-    -- Parse a C-like entity string of the following form:-    --   "[static] [chname] [&] [cid]" | "dynamic" | "wrapper"-    -- If 'cid' is missing, the function name 'v' is used instead as symbol-    -- name (cf section 8.5.1 in Haskell 2010 report).-    mkCImport = do-      let e = unpackFS entity-      case parseCImport cconv safety (mkExtName (unLoc v)) e (cL loc esrc) of-        Nothing         -> parseErrorSDoc loc (text "Malformed entity string")-        Just importSpec -> returnSpec importSpec--    -- currently, all the other import conventions only support a symbol name in-    -- the entity string. If it is missing, we use the function name instead.-    mkOtherImport = returnSpec importSpec-      where-        entity'    = if nullFS entity-                        then mkExtName (unLoc v)-                        else entity-        funcTarget = CFunction (StaticTarget esrc entity' Nothing True)-        importSpec = CImport cconv safety Nothing funcTarget (cL loc esrc)--    returnSpec spec = return $ ForD noExt $ ForeignImport-          { fd_i_ext  = noExt-          , fd_name   = v-          , fd_sig_ty = ty-          , fd_fi     = spec-          }------ the string "foo" is ambiguous: either a header or a C identifier.  The--- C identifier case comes first in the alternatives below, so we pick--- that one.-parseCImport :: Located CCallConv -> Located Safety -> FastString -> String-             -> Located SourceText-             -> Maybe ForeignImport-parseCImport cconv safety nm str sourceText =- listToMaybe $ map fst $ filter (null.snd) $-     readP_to_S parse str- where-   parse = do-       skipSpaces-       r <- choice [-          string "dynamic" >> return (mk Nothing (CFunction DynamicTarget)),-          string "wrapper" >> return (mk Nothing CWrapper),-          do optional (token "static" >> skipSpaces)-             ((mk Nothing <$> cimp nm) +++-              (do h <- munch1 hdr_char-                  skipSpaces-                  mk (Just (Header (SourceText h) (mkFastString h)))-                      <$> cimp nm))-         ]-       skipSpaces-       return r--   token str = do _ <- string str-                  toks <- look-                  case toks of-                      c : _-                       | id_char c -> pfail-                      _            -> return ()--   mk h n = CImport cconv safety h n sourceText--   hdr_char c = not (isSpace c)-   -- header files are filenames, which can contain-   -- pretty much any char (depending on the platform),-   -- so just accept any non-space character-   id_first_char c = isAlpha    c || c == '_'-   id_char       c = isAlphaNum c || c == '_'--   cimp nm = (ReadP.char '&' >> skipSpaces >> CLabel <$> cid)-             +++ (do isFun <- case unLoc cconv of-                               CApiConv ->-                                  option True-                                         (do token "value"-                                             skipSpaces-                                             return False)-                               _ -> return True-                     cid' <- cid-                     return (CFunction (StaticTarget NoSourceText cid'-                                        Nothing isFun)))-          where-            cid = return nm +++-                  (do c  <- satisfy id_first_char-                      cs <-  many (satisfy id_char)-                      return (mkFastString (c:cs)))----- construct a foreign export declaration----mkExport :: Located CCallConv-         -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs)-         -> P (HsDecl GhcPs)-mkExport (dL->L lc cconv) (dL->L le (StringLiteral esrc entity), v, ty)- = return $ ForD noExt $-   ForeignExport { fd_e_ext = noExt, fd_name = v, fd_sig_ty = ty-                 , fd_fe = CExport (cL lc (CExportStatic esrc entity' cconv))-                                   (cL le esrc) }-  where-    entity' | nullFS entity = mkExtName (unLoc v)-            | otherwise     = entity---- Supplying the ext_name in a foreign decl is optional; if it--- isn't there, the Haskell name is assumed. Note that no transformation--- of the Haskell name is then performed, so if you foreign export (++),--- it's external name will be "++". Too bad; it's important because we don't--- want z-encoding (e.g. names with z's in them shouldn't be doubled)----mkExtName :: RdrName -> CLabelString-mkExtName rdrNm = mkFastString (occNameString (rdrNameOcc rdrNm))------------------------------------------------------------------------------------- Help with module system imports/exports--data ImpExpSubSpec = ImpExpAbs-                   | ImpExpAll-                   | ImpExpList [Located ImpExpQcSpec]-                   | ImpExpAllWith [Located ImpExpQcSpec]--data ImpExpQcSpec = ImpExpQcName (Located RdrName)-                  | ImpExpQcType (Located RdrName)-                  | ImpExpQcWildcard--mkModuleImpExp :: Located ImpExpQcSpec -> ImpExpSubSpec -> P (IE GhcPs)-mkModuleImpExp (dL->L l specname) subs =-  case subs of-    ImpExpAbs-      | isVarNameSpace (rdrNameSpace name)-                       -> return $ IEVar noExt (cL l (ieNameFromSpec specname))-      | otherwise      -> IEThingAbs noExt . cL l <$> nameT-    ImpExpAll          -> IEThingAll noExt . cL l <$> nameT-    ImpExpList xs      ->-      (\newName -> IEThingWith noExt (cL l newName)-        NoIEWildcard (wrapped xs) []) <$> nameT-    ImpExpAllWith xs                       ->-      do allowed <- getBit PatternSynonymsBit-         if allowed-          then-            let withs = map unLoc xs-                pos   = maybe NoIEWildcard IEWildcard-                          (findIndex isImpExpQcWildcard withs)-                ies   = wrapped $ filter (not . isImpExpQcWildcard . unLoc) xs-            in (\newName-                        -> IEThingWith noExt (cL l newName) pos ies [])-               <$> nameT-          else parseErrorSDoc l-            (text "Illegal export form (use PatternSynonyms to enable)")-  where-    name = ieNameVal specname-    nameT =-      if isVarNameSpace (rdrNameSpace name)-        then parseErrorSDoc l-              (text "Expecting a type constructor but found a variable,"-               <+> quotes (ppr name) <> text "."-              $$ if isSymOcc $ rdrNameOcc name-                   then text "If" <+> quotes (ppr name)-                        <+> text "is a type constructor"-           <+> text "then enable ExplicitNamespaces and use the 'type' keyword."-                   else empty)-        else return $ ieNameFromSpec specname--    ieNameVal (ImpExpQcName ln)  = unLoc ln-    ieNameVal (ImpExpQcType ln)  = unLoc ln-    ieNameVal (ImpExpQcWildcard) = panic "ieNameVal got wildcard"--    ieNameFromSpec (ImpExpQcName ln)  = IEName ln-    ieNameFromSpec (ImpExpQcType ln)  = IEType ln-    ieNameFromSpec (ImpExpQcWildcard) = panic "ieName got wildcard"--    wrapped = map (onHasSrcSpan ieNameFromSpec)--mkTypeImpExp :: Located RdrName   -- TcCls or Var name space-             -> P (Located RdrName)-mkTypeImpExp name =-  do allowed <- getBit ExplicitNamespacesBit-     if allowed-       then return (fmap (`setRdrNameSpace` tcClsName) name)-       else parseErrorSDoc (getLoc name)-              (text "Illegal keyword 'type' (use ExplicitNamespaces to enable)")--checkImportSpec :: Located [LIE GhcPs] -> P (Located [LIE GhcPs])-checkImportSpec ie@(dL->L _ specs) =-    case [l | (dL->L l (IEThingWith _ _ (IEWildcard _) _ _)) <- specs] of-      [] -> return ie-      (l:_) -> importSpecError l-  where-    importSpecError l =-      parseErrorSDoc l-        (text "Illegal import form, this syntax can only be used to bundle"-        $+$ text "pattern synonyms with types in module exports.")---- In the correct order-mkImpExpSubSpec :: [Located ImpExpQcSpec] -> P ([AddAnn], ImpExpSubSpec)-mkImpExpSubSpec [] = return ([], ImpExpList [])-mkImpExpSubSpec [dL->L _ ImpExpQcWildcard] =-  return ([], ImpExpAll)-mkImpExpSubSpec xs =-  if (any (isImpExpQcWildcard . unLoc) xs)-    then return $ ([], ImpExpAllWith xs)-    else return $ ([], ImpExpList xs)--isImpExpQcWildcard :: ImpExpQcSpec -> Bool-isImpExpQcWildcard ImpExpQcWildcard = True-isImpExpQcWildcard _                = False---------------------------------------------------------------------------------- Warnings and failures--warnStarIsType :: SrcSpan -> P ()-warnStarIsType span = addWarning Opt_WarnStarIsType span msg-  where-    msg =  text "Using" <+> quotes (text "*")-           <+> text "(or its Unicode variant) to mean"-           <+> quotes (text "Data.Kind.Type")-        $$ text "relies on the StarIsType extension, which will become"-        $$ text "deprecated in the future."-        $$ text "Suggested fix: use" <+> quotes (text "Type")-           <+> text "from" <+> quotes (text "Data.Kind") <+> text "instead."--warnStarBndr :: SrcSpan -> P ()-warnStarBndr span = addWarning Opt_WarnStarBinder span msg-  where-    msg =  text "Found binding occurrence of" <+> quotes (text "*")-           <+> text "yet StarIsType is enabled."-        $$ text "NB. To use (or export) this operator in"-           <+> text "modules with StarIsType,"-        $$ text "    including the definition module, you must qualify it."--failOpFewArgs :: Located RdrName -> P a-failOpFewArgs (dL->L loc op) =-  do { star_is_type <- getBit StarIsTypeBit-     ; let msg = too_few $$ starInfo star_is_type op-     ; parseErrorSDoc loc msg }-  where-    too_few = text "Operator applied to too few arguments:" <+> ppr op--failOpDocPrev :: SrcSpan -> P a-failOpDocPrev loc = parseErrorSDoc loc msg-  where-    msg = text "Unexpected documentation comment."--failOpStrictnessCompound :: Located SrcStrictness -> LHsType GhcPs -> P a-failOpStrictnessCompound (dL->L _ str) (dL->L loc ty) = parseErrorSDoc loc msg-  where-    msg = text "Strictness annotation applied to a compound type." $$-          text "Did you mean to add parentheses?" $$-          nest 2 (ppr str <> parens (ppr ty))--failOpStrictnessPosition :: Located SrcStrictness -> P a-failOpStrictnessPosition (dL->L loc _) = parseErrorSDoc loc msg-  where-    msg = text "Strictness annotation cannot appear in this position."---------------------------------------------------------------------------------- Misc utils--parseErrorSDoc :: SrcSpan -> SDoc -> P a-parseErrorSDoc span s = failSpanMsgP span s---- | Hint about bang patterns, assuming @BangPatterns@ is off.-hintBangPat :: SrcSpan -> HsExpr GhcPs -> P ()-hintBangPat span e = do-    bang_on <- getBit BangPatBit-    unless bang_on $-      parseErrorSDoc span-        (text "Illegal bang-pattern (use BangPatterns):" $$ ppr e)--data SumOrTuple-  = Sum ConTag Arity (LHsExpr GhcPs)-  | Tuple [LHsTupArg GhcPs]--mkSumOrTuple :: Boxity -> SrcSpan -> SumOrTuple -> P (HsExpr GhcPs)---- Tuple-mkSumOrTuple boxity _ (Tuple es) = return (ExplicitTuple noExt es boxity)---- Sum-mkSumOrTuple Unboxed _ (Sum alt arity e) =-    return (ExplicitSum noExt alt arity e)-mkSumOrTuple Boxed l (Sum alt arity (dL->L _ e)) =-    parseErrorSDoc l (hang (text "Boxed sums not supported:") 2-                      (ppr_boxed_sum alt arity e))-  where-    ppr_boxed_sum :: ConTag -> Arity -> HsExpr GhcPs -> SDoc-    ppr_boxed_sum alt arity e =-      text "(" <+> ppr_bars (alt - 1) <+> ppr e <+> ppr_bars (arity - alt)-      <+> text ")"--    ppr_bars n = hsep (replicate n (Outputable.char '|'))--mkLHsOpTy :: LHsType GhcPs -> Located RdrName -> LHsType GhcPs -> LHsType GhcPs-mkLHsOpTy x op y =-  let loc = getLoc x `combineSrcSpans` getLoc op `combineSrcSpans` getLoc y-  in cL loc (mkHsOpTy x op y)--mkLHsDocTy :: LHsType GhcPs -> LHsDocString -> LHsType GhcPs-mkLHsDocTy t doc =-  let loc = getLoc t `combineSrcSpans` getLoc doc-  in cL loc (HsDocTy noExt t doc)+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MagicHash #-}+{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}++module   RdrHsSyn (+        mkHsOpApp,+        mkHsIntegral, mkHsFractional, mkHsIsString,+        mkHsDo, mkSpliceDecl,+        mkRoleAnnotDecl,+        mkClassDecl,+        mkTyData, mkDataFamInst,+        mkTySynonym, mkTyFamInstEqn,+        mkStandaloneKindSig,+        mkTyFamInst,+        mkFamDecl, mkLHsSigType,+        mkInlinePragma,+        mkPatSynMatchGroup,+        mkRecConstrOrUpdate, -- HsExp -> [HsFieldUpdate] -> P HsExp+        mkTyClD, mkInstD,+        mkRdrRecordCon, mkRdrRecordUpd,+        setRdrNameSpace,+        filterCTuple,++        cvBindGroup,+        cvBindsAndSigs,+        cvTopDecls,+        placeHolderPunRhs,++        -- Stuff to do with Foreign declarations+        mkImport,+        parseCImport,+        mkExport,+        mkExtName,    -- RdrName -> CLabelString+        mkGadtDecl,   -- [Located RdrName] -> LHsType RdrName -> ConDecl RdrName+        mkConDeclH98,++        -- Bunch of functions in the parser monad for+        -- checking and constructing values+        checkImportDecl,+        checkExpBlockArguments,+        checkPrecP,           -- Int -> P Int+        checkContext,         -- HsType -> P HsContext+        checkPattern,         -- HsExp -> P HsPat+        checkPattern_msg,+        isBangRdr,+        isTildeRdr,+        checkMonadComp,       -- P (HsStmtContext RdrName)+        checkValDef,          -- (SrcLoc, HsExp, HsRhs, [HsDecl]) -> P HsDecl+        checkValSigLhs,+        LRuleTyTmVar, RuleTyTmVar(..),+        mkRuleBndrs, mkRuleTyVarBndrs,+        checkRuleTyVarBndrNames,+        checkRecordSyntax,+        checkEmptyGADTs,+        addFatalError, hintBangPat,+        TyEl(..), mergeOps, mergeDataCon,++        -- Help with processing exports+        ImpExpSubSpec(..),+        ImpExpQcSpec(..),+        mkModuleImpExp,+        mkTypeImpExp,+        mkImpExpSubSpec,+        checkImportSpec,++        -- Token symbols+        forallSym,+        starSym,++        -- Warnings and errors+        warnStarIsType,+        warnPrepositiveQualifiedModule,+        failOpFewArgs,+        failOpNotEnabledImportQualifiedPost,+        failOpImportQualifiedTwice,++        SumOrTuple (..),++        -- Expression/command/pattern ambiguity resolution+        PV,+        runPV,+        ECP(ECP, runECP_PV),+        runECP_P,+        DisambInfixOp(..),+        DisambECP(..),+        ecpFromExp,+        ecpFromCmd,+        PatBuilder,+        patBuilderBang,++    ) where++import GhcPrelude+import GHC.Hs           -- Lots of it+import TyCon            ( TyCon, isTupleTyCon, tyConSingleDataCon_maybe )+import DataCon          ( DataCon, dataConTyCon )+import ConLike          ( ConLike(..) )+import CoAxiom          ( Role, fsFromRole )+import RdrName+import Name+import BasicTypes+import TcEvidence       ( idHsWrapper )+import Lexer+import Lexeme           ( isLexCon )+import Type             ( TyThing(..), funTyCon )+import TysWiredIn       ( cTupleTyConName, tupleTyCon, tupleDataCon,+                          nilDataConName, nilDataConKey,+                          listTyConName, listTyConKey, eqTyCon_RDR,+                          tupleTyConName, cTupleTyConNameArity_maybe )+import ForeignCall+import PrelNames        ( allNameStrings )+import SrcLoc+import Unique           ( hasKey )+import OrdList          ( OrdList, fromOL )+import Bag              ( emptyBag, consBag )+import Outputable+import FastString+import Maybes+import Util+import ApiAnnotation+import Data.List+import DynFlags ( WarningFlag(..), DynFlags )+import ErrUtils ( Messages )++import Control.Monad+import Text.ParserCombinators.ReadP as ReadP+import Data.Char+import qualified Data.Monoid as Monoid+import Data.Data       ( dataTypeOf, fromConstr, dataTypeConstrs )++#include "HsVersions.h"+++{- **********************************************************************++  Construction functions for Rdr stuff++  ********************************************************************* -}++-- | mkClassDecl builds a RdrClassDecl, filling in the names for tycon and+-- datacon by deriving them from the name of the class.  We fill in the names+-- for the tycon and datacon corresponding to the class, by deriving them+-- from the name of the class itself.  This saves recording the names in the+-- interface file (which would be equally good).++-- Similarly for mkConDecl, mkClassOpSig and default-method names.++--         *** See Note [The Naming story] in GHC.Hs.Decls ****++mkTyClD :: LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p)+mkTyClD (dL->L loc d) = cL loc (TyClD noExtField d)++mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)+mkInstD (dL->L loc d) = cL loc (InstD noExtField d)++mkClassDecl :: SrcSpan+            -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs)+            -> Located (a,[LHsFunDep GhcPs])+            -> OrdList (LHsDecl GhcPs)+            -> P (LTyClDecl GhcPs)++mkClassDecl loc (dL->L _ (mcxt, tycl_hdr)) fds where_cls+  = do { (binds, sigs, ats, at_defs, _, docs) <- cvBindsAndSigs where_cls+       ; let cxt = fromMaybe (noLoc []) mcxt+       ; (cls, tparams, fixity, ann) <- checkTyClHdr True tycl_hdr+       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan+       ; (tyvars,annst) <- checkTyVars (text "class") whereDots cls tparams+       ; addAnnsAt loc annst -- Add any API Annotations to the top SrcSpan+       ; return (cL loc (ClassDecl { tcdCExt = noExtField, tcdCtxt = cxt+                                   , tcdLName = cls, tcdTyVars = tyvars+                                   , tcdFixity = fixity+                                   , tcdFDs = snd (unLoc fds)+                                   , tcdSigs = mkClassOpSigs sigs+                                   , tcdMeths = binds+                                   , tcdATs = ats, tcdATDefs = at_defs+                                   , tcdDocs  = docs })) }++mkTyData :: SrcSpan+         -> NewOrData+         -> Maybe (Located CType)+         -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs)+         -> Maybe (LHsKind GhcPs)+         -> [LConDecl GhcPs]+         -> HsDeriving GhcPs+         -> P (LTyClDecl GhcPs)+mkTyData loc new_or_data cType (dL->L _ (mcxt, tycl_hdr))+         ksig data_cons maybe_deriv+  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False tycl_hdr+       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan+       ; (tyvars, anns) <- checkTyVars (ppr new_or_data) equalsDots tc tparams+       ; addAnnsAt loc anns -- Add any API Annotations to the top SrcSpan+       ; defn <- mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv+       ; return (cL loc (DataDecl { tcdDExt = noExtField,+                                    tcdLName = tc, tcdTyVars = tyvars,+                                    tcdFixity = fixity,+                                    tcdDataDefn = defn })) }++mkDataDefn :: NewOrData+           -> Maybe (Located CType)+           -> Maybe (LHsContext GhcPs)+           -> Maybe (LHsKind GhcPs)+           -> [LConDecl GhcPs]+           -> HsDeriving GhcPs+           -> P (HsDataDefn GhcPs)+mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv+  = do { checkDatatypeContext mcxt+       ; let cxt = fromMaybe (noLoc []) mcxt+       ; return (HsDataDefn { dd_ext = noExtField+                            , dd_ND = new_or_data, dd_cType = cType+                            , dd_ctxt = cxt+                            , dd_cons = data_cons+                            , dd_kindSig = ksig+                            , dd_derivs = maybe_deriv }) }+++mkTySynonym :: SrcSpan+            -> LHsType GhcPs  -- LHS+            -> LHsType GhcPs  -- RHS+            -> P (LTyClDecl GhcPs)+mkTySynonym loc lhs rhs+  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs+       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan+       ; (tyvars, anns) <- checkTyVars (text "type") equalsDots tc tparams+       ; addAnnsAt loc anns -- Add any API Annotations to the top SrcSpan+       ; return (cL loc (SynDecl { tcdSExt = noExtField+                                 , tcdLName = tc, tcdTyVars = tyvars+                                 , tcdFixity = fixity+                                 , tcdRhs = rhs })) }++mkStandaloneKindSig+  :: SrcSpan+  -> Located [Located RdrName] -- LHS+  -> LHsKind GhcPs             -- RHS+  -> P (LStandaloneKindSig GhcPs)+mkStandaloneKindSig loc lhs rhs =+  do { vs <- mapM check_lhs_name (unLoc lhs)+     ; v <- check_singular_lhs (reverse vs)+     ; return $ cL loc $ StandaloneKindSig noExtField v (mkLHsSigType rhs) }+  where+    check_lhs_name v@(unLoc->name) =+      if isUnqual name && isTcOcc (rdrNameOcc name)+      then return v+      else addFatalError (getLoc v) $+           hang (text "Expected an unqualified type constructor:") 2 (ppr v)+    check_singular_lhs vs =+      case vs of+        [] -> panic "mkStandaloneKindSig: empty left-hand side"+        [v] -> return v+        _ -> addFatalError (getLoc lhs) $+             vcat [ hang (text "Standalone kind signatures do not support multiple names at the moment:")+                       2 (pprWithCommas ppr vs)+                  , text "See https://gitlab.haskell.org/ghc/ghc/issues/16754 for details." ]++mkTyFamInstEqn :: Maybe [LHsTyVarBndr GhcPs]+               -> LHsType GhcPs+               -> LHsType GhcPs+               -> P (TyFamInstEqn GhcPs,[AddAnn])+mkTyFamInstEqn bndrs lhs rhs+  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs+       ; return (mkHsImplicitBndrs+                  (FamEqn { feqn_ext    = noExtField+                          , feqn_tycon  = tc+                          , feqn_bndrs  = bndrs+                          , feqn_pats   = tparams+                          , feqn_fixity = fixity+                          , feqn_rhs    = rhs }),+                 ann) }++mkDataFamInst :: SrcSpan+              -> NewOrData+              -> Maybe (Located CType)+              -> (Maybe ( LHsContext GhcPs), Maybe [LHsTyVarBndr GhcPs]+                        , LHsType GhcPs)+              -> Maybe (LHsKind GhcPs)+              -> [LConDecl GhcPs]+              -> HsDeriving GhcPs+              -> P (LInstDecl GhcPs)+mkDataFamInst loc new_or_data cType (mcxt, bndrs, tycl_hdr)+              ksig data_cons maybe_deriv+  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False tycl_hdr+       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan+       ; defn <- mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv+       ; return (cL loc (DataFamInstD noExtField (DataFamInstDecl (mkHsImplicitBndrs+                  (FamEqn { feqn_ext    = noExtField+                          , feqn_tycon  = tc+                          , feqn_bndrs  = bndrs+                          , feqn_pats   = tparams+                          , feqn_fixity = fixity+                          , feqn_rhs    = defn }))))) }++mkTyFamInst :: SrcSpan+            -> TyFamInstEqn GhcPs+            -> P (LInstDecl GhcPs)+mkTyFamInst loc eqn+  = return (cL loc (TyFamInstD noExtField (TyFamInstDecl eqn)))++mkFamDecl :: SrcSpan+          -> FamilyInfo GhcPs+          -> LHsType GhcPs                   -- LHS+          -> Located (FamilyResultSig GhcPs) -- Optional result signature+          -> Maybe (LInjectivityAnn GhcPs)   -- Injectivity annotation+          -> P (LTyClDecl GhcPs)+mkFamDecl loc info lhs ksig injAnn+  = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs+       ; addAnnsAt loc ann -- Add any API Annotations to the top SrcSpan+       ; (tyvars, anns) <- checkTyVars (ppr info) equals_or_where tc tparams+       ; addAnnsAt loc anns -- Add any API Annotations to the top SrcSpan+       ; return (cL loc (FamDecl noExtField (FamilyDecl+                                           { fdExt       = noExtField+                                           , fdInfo      = info, fdLName = tc+                                           , fdTyVars    = tyvars+                                           , fdFixity    = fixity+                                           , fdResultSig = ksig+                                           , fdInjectivityAnn = injAnn }))) }+  where+    equals_or_where = case info of+                        DataFamily          -> empty+                        OpenTypeFamily      -> empty+                        ClosedTypeFamily {} -> whereDots++mkSpliceDecl :: LHsExpr GhcPs -> HsDecl GhcPs+-- If the user wrote+--      [pads| ... ]   then return a QuasiQuoteD+--      $(e)           then return a SpliceD+-- but if she wrote, say,+--      f x            then behave as if she'd written $(f x)+--                     ie a SpliceD+--+-- Typed splices are not allowed at the top level, thus we do not represent them+-- as spliced declaration.  See #10945+mkSpliceDecl lexpr@(dL->L loc expr)+  | HsSpliceE _ splice@(HsUntypedSplice {}) <- expr+  = SpliceD noExtField (SpliceDecl noExtField (cL loc splice) ExplicitSplice)++  | HsSpliceE _ splice@(HsQuasiQuote {}) <- expr+  = SpliceD noExtField (SpliceDecl noExtField (cL loc splice) ExplicitSplice)++  | otherwise+  = SpliceD noExtField (SpliceDecl noExtField (cL loc (mkUntypedSplice NoParens lexpr))+                              ImplicitSplice)++mkRoleAnnotDecl :: SrcSpan+                -> Located RdrName                -- type being annotated+                -> [Located (Maybe FastString)]      -- roles+                -> P (LRoleAnnotDecl GhcPs)+mkRoleAnnotDecl loc tycon roles+  = do { roles' <- mapM parse_role roles+       ; return $ cL loc $ RoleAnnotDecl noExtField tycon roles' }+  where+    role_data_type = dataTypeOf (undefined :: Role)+    all_roles = map fromConstr $ dataTypeConstrs role_data_type+    possible_roles = [(fsFromRole role, role) | role <- all_roles]++    parse_role (dL->L loc_role Nothing) = return $ cL loc_role Nothing+    parse_role (dL->L loc_role (Just role))+      = case lookup role possible_roles of+          Just found_role -> return $ cL loc_role $ Just found_role+          Nothing         ->+            let nearby = fuzzyLookup (unpackFS role)+                  (mapFst unpackFS possible_roles)+            in+            addFatalError loc_role+              (text "Illegal role name" <+> quotes (ppr role) $$+               suggestions nearby)+    parse_role _ = panic "parse_role: Impossible Match"+                                -- due to #15884++    suggestions []   = empty+    suggestions [r]  = text "Perhaps you meant" <+> quotes (ppr r)+      -- will this last case ever happen??+    suggestions list = hang (text "Perhaps you meant one of these:")+                       2 (pprWithCommas (quotes . ppr) list)++{- **********************************************************************++  #cvBinds-etc# Converting to @HsBinds@, etc.++  ********************************************************************* -}++-- | Function definitions are restructured here. Each is assumed to be recursive+-- initially, and non recursive definitions are discovered by the dependency+-- analyser.+++--  | Groups together bindings for a single function+cvTopDecls :: OrdList (LHsDecl GhcPs) -> [LHsDecl GhcPs]+cvTopDecls decls = go (fromOL decls)+  where+    go :: [LHsDecl GhcPs] -> [LHsDecl GhcPs]+    go []                     = []+    go ((dL->L l (ValD x b)) : ds)+      = cL l' (ValD x b') : go ds'+        where (dL->L l' b', ds') = getMonoBind (cL l b) ds+    go (d : ds)                    = d : go ds++-- Declaration list may only contain value bindings and signatures.+cvBindGroup :: OrdList (LHsDecl GhcPs) -> P (HsValBinds GhcPs)+cvBindGroup binding+  = do { (mbs, sigs, fam_ds, tfam_insts+         , dfam_insts, _) <- cvBindsAndSigs binding+       ; ASSERT( null fam_ds && null tfam_insts && null dfam_insts)+         return $ ValBinds noExtField mbs sigs }++cvBindsAndSigs :: OrdList (LHsDecl GhcPs)+  -> P (LHsBinds GhcPs, [LSig GhcPs], [LFamilyDecl GhcPs]+          , [LTyFamInstDecl GhcPs], [LDataFamInstDecl GhcPs], [LDocDecl])+-- Input decls contain just value bindings and signatures+-- and in case of class or instance declarations also+-- associated type declarations. They might also contain Haddock comments.+cvBindsAndSigs fb = go (fromOL fb)+  where+    go []              = return (emptyBag, [], [], [], [], [])+    go ((dL->L l (ValD _ b)) : ds)+      = do { (bs, ss, ts, tfis, dfis, docs) <- go ds'+           ; return (b' `consBag` bs, ss, ts, tfis, dfis, docs) }+      where+        (b', ds') = getMonoBind (cL l b) ds+    go ((dL->L l decl) : ds)+      = do { (bs, ss, ts, tfis, dfis, docs) <- go ds+           ; case decl of+               SigD _ s+                 -> return (bs, cL l s : ss, ts, tfis, dfis, docs)+               TyClD _ (FamDecl _ t)+                 -> return (bs, ss, cL l t : ts, tfis, dfis, docs)+               InstD _ (TyFamInstD { tfid_inst = tfi })+                 -> return (bs, ss, ts, cL l tfi : tfis, dfis, docs)+               InstD _ (DataFamInstD { dfid_inst = dfi })+                 -> return (bs, ss, ts, tfis, cL l dfi : dfis, docs)+               DocD _ d+                 -> return (bs, ss, ts, tfis, dfis, cL l d : docs)+               SpliceD _ d+                 -> addFatalError l $+                    hang (text "Declaration splices are allowed only" <+>+                          text "at the top level:")+                       2 (ppr d)+               _ -> pprPanic "cvBindsAndSigs" (ppr decl) }++-----------------------------------------------------------------------------+-- Group function bindings into equation groups++getMonoBind :: LHsBind GhcPs -> [LHsDecl GhcPs]+  -> (LHsBind GhcPs, [LHsDecl GhcPs])+-- Suppose      (b',ds') = getMonoBind b ds+--      ds is a list of parsed bindings+--      b is a MonoBinds that has just been read off the front++-- Then b' is the result of grouping more equations from ds that+-- belong with b into a single MonoBinds, and ds' is the depleted+-- list of parsed bindings.+--+-- All Haddock comments between equations inside the group are+-- discarded.+--+-- No AndMonoBinds or EmptyMonoBinds here; just single equations++getMonoBind (dL->L loc1 (FunBind { fun_id = fun_id1@(dL->L _ f1)+                                 , fun_matches =+                                   MG { mg_alts = (dL->L _ mtchs1) } }))+            binds+  | has_args mtchs1+  = go mtchs1 loc1 binds []+  where+    go mtchs loc+       ((dL->L loc2 (ValD _ (FunBind { fun_id = (dL->L _ f2)+                                    , fun_matches =+                                        MG { mg_alts = (dL->L _ mtchs2) } })))+         : binds) _+        | f1 == f2 = go (mtchs2 ++ mtchs)+                        (combineSrcSpans loc loc2) binds []+    go mtchs loc (doc_decl@(dL->L loc2 (DocD {})) : binds) doc_decls+        = let doc_decls' = doc_decl : doc_decls+          in go mtchs (combineSrcSpans loc loc2) binds doc_decls'+    go mtchs loc binds doc_decls+        = ( cL loc (makeFunBind fun_id1 (reverse mtchs))+          , (reverse doc_decls) ++ binds)+        -- Reverse the final matches, to get it back in the right order+        -- Do the same thing with the trailing doc comments++getMonoBind bind binds = (bind, binds)++has_args :: [LMatch GhcPs (LHsExpr GhcPs)] -> Bool+has_args []                                    = panic "RdrHsSyn:has_args"+has_args ((dL->L _ (Match { m_pats = args })) : _) = not (null args)+        -- Don't group together FunBinds if they have+        -- no arguments.  This is necessary now that variable bindings+        -- with no arguments are now treated as FunBinds rather+        -- than pattern bindings (tests/rename/should_fail/rnfail002).+has_args ((dL->L _ (XMatch nec)) : _) = noExtCon nec+has_args (_ : _) = panic "has_args:Impossible Match" -- due to #15884++{- **********************************************************************++  #PrefixToHS-utils# Utilities for conversion++  ********************************************************************* -}++{- Note [Parsing data constructors is hard]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++The problem with parsing data constructors is that they look a lot like types.+Compare:++  (s1)   data T = C t1 t2+  (s2)   type T = C t1 t2++Syntactically, there's little difference between these declarations, except in+(s1) 'C' is a data constructor, but in (s2) 'C' is a type constructor.++This similarity would pose no problem if we knew ahead of time if we are+parsing a type or a constructor declaration. Looking at (s1) and (s2), a simple+(but wrong!) rule comes to mind: in 'data' declarations assume we are parsing+data constructors, and in other contexts (e.g. 'type' declarations) assume we+are parsing type constructors.++This simple rule does not work because of two problematic cases:++  (p1)   data T = C t1 t2 :+ t3+  (p2)   data T = C t1 t2 => t3++In (p1) we encounter (:+) and it turns out we are parsing an infix data+declaration, so (C t1 t2) is a type and 'C' is a type constructor.+In (p2) we encounter (=>) and it turns out we are parsing an existential+context, so (C t1 t2) is a constraint and 'C' is a type constructor.++As the result, in order to determine whether (C t1 t2) declares a data+constructor, a type, or a context, we would need unlimited lookahead which+'happy' is not so happy with.++To further complicate matters, the interpretation of (!) and (~) is different+in constructors and types:++  (b1)   type T = C ! D+  (b2)   data T = C ! D+  (b3)   data T = C ! D => E++In (b1) and (b3), (!) is a type operator with two arguments: 'C' and 'D'. At+the same time, in (b2) it is a strictness annotation: 'C' is a data constructor+with a single strict argument 'D'. For the programmer, these cases are usually+easy to tell apart due to whitespace conventions:++  (b2)   data T = C !D         -- no space after the bang hints that+                               -- it is a strictness annotation++For the parser, on the other hand, this whitespace does not matter. We cannot+tell apart (b2) from (b3) until we encounter (=>), so it requires unlimited+lookahead.++The solution that accounts for all of these issues is to initially parse data+declarations and types as a reversed list of TyEl:++  data TyEl = TyElOpr RdrName+            | TyElOpd (HsType GhcPs)+            | TyElBang | TyElTilde+            | ...++For example, both occurences of (C ! D) in the following example are parsed+into equal lists of TyEl:++  data T = C ! D => C ! D   results in   [ TyElOpd (HsTyVar "D")+                                         , TyElBang+                                         , TyElOpd (HsTyVar "C") ]++Note that elements are in reverse order. Also, 'C' is parsed as a type+constructor (HsTyVar) even when it is a data constructor. We fix this in+`tyConToDataCon`.++By the time the list of TyEl is assembled, we have looked ahead enough to+decide whether to reduce using `mergeOps` (for types) or `mergeDataCon` (for+data constructors). These functions are where the actual job of parsing is+done.++-}++-- | Reinterpret a type constructor, including type operators, as a data+--   constructor.+-- See Note [Parsing data constructors is hard]+tyConToDataCon :: SrcSpan -> RdrName -> Either (SrcSpan, SDoc) (Located RdrName)+tyConToDataCon loc tc+  | isTcOcc occ || isDataOcc occ+  , isLexCon (occNameFS occ)+  = return (cL loc (setRdrNameSpace tc srcDataName))++  | otherwise+  = Left (loc, msg)+  where+    occ = rdrNameOcc tc+    msg = text "Not a data constructor:" <+> quotes (ppr tc)++mkPatSynMatchGroup :: Located RdrName+                   -> Located (OrdList (LHsDecl GhcPs))+                   -> P (MatchGroup GhcPs (LHsExpr GhcPs))+mkPatSynMatchGroup (dL->L loc patsyn_name) (dL->L _ decls) =+    do { matches <- mapM fromDecl (fromOL decls)+       ; when (null matches) (wrongNumberErr loc)+       ; return $ mkMatchGroup FromSource matches }+  where+    fromDecl (dL->L loc decl@(ValD _ (PatBind _+                             pat@(dL->L _ (ConPatIn ln@(dL->L _ name) details))+                                   rhs _))) =+        do { unless (name == patsyn_name) $+               wrongNameBindingErr loc decl+           ; match <- case details of+               PrefixCon pats -> return $ Match { m_ext = noExtField+                                                , m_ctxt = ctxt, m_pats = pats+                                                , m_grhss = rhs }+                   where+                     ctxt = FunRhs { mc_fun = ln+                                   , mc_fixity = Prefix+                                   , mc_strictness = NoSrcStrict }++               InfixCon p1 p2 -> return $ Match { m_ext = noExtField+                                                , m_ctxt = ctxt+                                                , m_pats = [p1, p2]+                                                , m_grhss = rhs }+                   where+                     ctxt = FunRhs { mc_fun = ln+                                   , mc_fixity = Infix+                                   , mc_strictness = NoSrcStrict }++               RecCon{} -> recordPatSynErr loc pat+           ; return $ cL loc match }+    fromDecl (dL->L loc decl) = extraDeclErr loc decl++    extraDeclErr loc decl =+        addFatalError loc $+        text "pattern synonym 'where' clause must contain a single binding:" $$+        ppr decl++    wrongNameBindingErr loc decl =+      addFatalError loc $+      text "pattern synonym 'where' clause must bind the pattern synonym's name"+      <+> quotes (ppr patsyn_name) $$ ppr decl++    wrongNumberErr loc =+      addFatalError loc $+      text "pattern synonym 'where' clause cannot be empty" $$+      text "In the pattern synonym declaration for: " <+> ppr (patsyn_name)++recordPatSynErr :: SrcSpan -> LPat GhcPs -> P a+recordPatSynErr loc pat =+    addFatalError loc $+    text "record syntax not supported for pattern synonym declarations:" $$+    ppr pat++mkConDeclH98 :: Located RdrName -> Maybe [LHsTyVarBndr GhcPs]+                -> Maybe (LHsContext GhcPs) -> HsConDeclDetails GhcPs+                -> ConDecl GhcPs++mkConDeclH98 name mb_forall mb_cxt args+  = ConDeclH98 { con_ext    = noExtField+               , con_name   = name+               , con_forall = noLoc $ isJust mb_forall+               , con_ex_tvs = mb_forall `orElse` []+               , con_mb_cxt = mb_cxt+               , con_args   = args+               , con_doc    = Nothing }++mkGadtDecl :: [Located RdrName]+           -> LHsType GhcPs     -- Always a HsForAllTy+           -> (ConDecl GhcPs, [AddAnn])+mkGadtDecl names ty+  = (ConDeclGADT { con_g_ext  = noExtField+                 , con_names  = names+                 , con_forall = cL l $ isLHsForAllTy ty'+                 , con_qvars  = mkHsQTvs tvs+                 , con_mb_cxt = mcxt+                 , con_args   = args+                 , con_res_ty = res_ty+                 , con_doc    = Nothing }+    , anns1 ++ anns2)+  where+    (ty'@(dL->L l _),anns1) = peel_parens ty []+    (tvs, rho) = splitLHsForAllTyInvis ty'+    (mcxt, tau, anns2) = split_rho rho []++    split_rho (dL->L _ (HsQualTy { hst_ctxt = cxt, hst_body = tau })) ann+      = (Just cxt, tau, ann)+    split_rho (dL->L l (HsParTy _ ty)) ann+      = split_rho ty (ann++mkParensApiAnn l)+    split_rho tau                  ann+      = (Nothing, tau, ann)++    (args, res_ty) = split_tau tau++    -- See Note [GADT abstract syntax] in GHC.Hs.Decls+    split_tau (dL->L _ (HsFunTy _ (dL->L loc (HsRecTy _ rf)) res_ty))+      = (RecCon (cL loc rf), res_ty)+    split_tau tau+      = (PrefixCon [], tau)++    peel_parens (dL->L l (HsParTy _ ty)) ann = peel_parens ty+                                                       (ann++mkParensApiAnn l)+    peel_parens ty                   ann = (ty, ann)+++setRdrNameSpace :: RdrName -> NameSpace -> RdrName+-- ^ This rather gruesome function is used mainly by the parser.+-- When parsing:+--+-- > data T a = T | T1 Int+--+-- we parse the data constructors as /types/ because of parser ambiguities,+-- so then we need to change the /type constr/ to a /data constr/+--+-- The exact-name case /can/ occur when parsing:+--+-- > data [] a = [] | a : [a]+--+-- For the exact-name case we return an original name.+setRdrNameSpace (Unqual occ) ns = Unqual (setOccNameSpace ns occ)+setRdrNameSpace (Qual m occ) ns = Qual m (setOccNameSpace ns occ)+setRdrNameSpace (Orig m occ) ns = Orig m (setOccNameSpace ns occ)+setRdrNameSpace (Exact n)    ns+  | Just thing <- wiredInNameTyThing_maybe n+  = setWiredInNameSpace thing ns+    -- Preserve Exact Names for wired-in things,+    -- notably tuples and lists++  | isExternalName n+  = Orig (nameModule n) occ++  | otherwise   -- This can happen when quoting and then+                -- splicing a fixity declaration for a type+  = Exact (mkSystemNameAt (nameUnique n) occ (nameSrcSpan n))+  where+    occ = setOccNameSpace ns (nameOccName n)++setWiredInNameSpace :: TyThing -> NameSpace -> RdrName+setWiredInNameSpace (ATyCon tc) ns+  | isDataConNameSpace ns+  = ty_con_data_con tc+  | isTcClsNameSpace ns+  = Exact (getName tc)      -- No-op++setWiredInNameSpace (AConLike (RealDataCon dc)) ns+  | isTcClsNameSpace ns+  = data_con_ty_con dc+  | isDataConNameSpace ns+  = Exact (getName dc)      -- No-op++setWiredInNameSpace thing ns+  = pprPanic "setWiredinNameSpace" (pprNameSpace ns <+> ppr thing)++ty_con_data_con :: TyCon -> RdrName+ty_con_data_con tc+  | isTupleTyCon tc+  , Just dc <- tyConSingleDataCon_maybe tc+  = Exact (getName dc)++  | tc `hasKey` listTyConKey+  = Exact nilDataConName++  | otherwise  -- See Note [setRdrNameSpace for wired-in names]+  = Unqual (setOccNameSpace srcDataName (getOccName tc))++data_con_ty_con :: DataCon -> RdrName+data_con_ty_con dc+  | let tc = dataConTyCon dc+  , isTupleTyCon tc+  = Exact (getName tc)++  | dc `hasKey` nilDataConKey+  = Exact listTyConName++  | otherwise  -- See Note [setRdrNameSpace for wired-in names]+  = Unqual (setOccNameSpace tcClsName (getOccName dc))++-- | Replaces constraint tuple names with corresponding boxed ones.+filterCTuple :: RdrName -> RdrName+filterCTuple (Exact n)+  | Just arity <- cTupleTyConNameArity_maybe n+  = Exact $ tupleTyConName BoxedTuple arity+filterCTuple rdr = rdr+++{- Note [setRdrNameSpace for wired-in names]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In GHC.Types, which declares (:), we have+  infixr 5 :+The ambiguity about which ":" is meant is resolved by parsing it as a+data constructor, but then using dataTcOccs to try the type constructor too;+and that in turn calls setRdrNameSpace to change the name-space of ":" to+tcClsName.  There isn't a corresponding ":" type constructor, but it's painful+to make setRdrNameSpace partial, so we just make an Unqual name instead. It+really doesn't matter!+-}++eitherToP :: Either (SrcSpan, SDoc) a -> P a+-- Adapts the Either monad to the P monad+eitherToP (Left (loc, doc)) = addFatalError loc doc+eitherToP (Right thing)     = return thing++checkTyVars :: SDoc -> SDoc -> Located RdrName -> [LHsTypeArg GhcPs]+            -> P ( LHsQTyVars GhcPs  -- the synthesized type variables+                 , [AddAnn] )        -- action which adds annotations+-- ^ Check whether the given list of type parameters are all type variables+-- (possibly with a kind signature).+checkTyVars pp_what equals_or_where tc tparms+  = do { (tvs, anns) <- fmap unzip $ mapM check tparms+       ; return (mkHsQTvs tvs, concat anns) }+  where+    check (HsTypeArg _ ki@(L loc _))+                              = addFatalError loc $+                                      vcat [ text "Unexpected type application" <+>+                                            text "@" <> ppr ki+                                          , text "In the" <+> pp_what <+>+                                            ptext (sLit "declaration for") <+> quotes (ppr tc)]+    check (HsValArg ty) = chkParens [] ty+    check (HsArgPar sp) = addFatalError sp $+                          vcat [text "Malformed" <+> pp_what+                            <+> text "declaration for" <+> quotes (ppr tc)]+        -- Keep around an action for adjusting the annotations of extra parens+    chkParens :: [AddAnn] -> LHsType GhcPs+              -> P (LHsTyVarBndr GhcPs, [AddAnn])+    chkParens acc (dL->L l (HsParTy _ ty)) = chkParens (mkParensApiAnn l+                                                        ++ acc) ty+    chkParens acc ty = do+      tv <- chk ty+      return (tv, reverse acc)++        -- Check that the name space is correct!+    chk :: LHsType GhcPs -> P (LHsTyVarBndr GhcPs)+    chk (dL->L l (HsKindSig _ (dL->L lv (HsTyVar _ _ (dL->L _ tv))) k))+        | isRdrTyVar tv    = return (cL l (KindedTyVar noExtField (cL lv tv) k))+    chk (dL->L l (HsTyVar _ _ (dL->L ltv tv)))+        | isRdrTyVar tv    = return (cL l (UserTyVar noExtField (cL ltv tv)))+    chk t@(dL->L loc _)+        = addFatalError loc $+                vcat [ text "Unexpected type" <+> quotes (ppr t)+                     , text "In the" <+> pp_what+                       <+> ptext (sLit "declaration for") <+> quotes tc'+                     , vcat[ (text "A" <+> pp_what+                              <+> ptext (sLit "declaration should have form"))+                     , nest 2+                       (pp_what+                        <+> tc'+                        <+> hsep (map text (takeList tparms allNameStrings))+                        <+> equals_or_where) ] ]++    -- Avoid printing a constraint tuple in the error message. Print+    -- a plain old tuple instead (since that's what the user probably+    -- wrote). See #14907+    tc' = ppr $ fmap filterCTuple tc++++whereDots, equalsDots :: SDoc+-- Second argument to checkTyVars+whereDots  = text "where ..."+equalsDots = text "= ..."++checkDatatypeContext :: Maybe (LHsContext GhcPs) -> P ()+checkDatatypeContext Nothing = return ()+checkDatatypeContext (Just c)+    = do allowed <- getBit DatatypeContextsBit+         unless allowed $+             addError (getLoc c)+                 (text "Illegal datatype context (use DatatypeContexts):"+                  <+> pprLHsContext c)++type LRuleTyTmVar = Located RuleTyTmVar+data RuleTyTmVar = RuleTyTmVar (Located RdrName) (Maybe (LHsType GhcPs))+-- ^ Essentially a wrapper for a @RuleBndr GhcPs@++-- turns RuleTyTmVars into RuleBnrs - this is straightforward+mkRuleBndrs :: [LRuleTyTmVar] -> [LRuleBndr GhcPs]+mkRuleBndrs = fmap (fmap cvt_one)+  where cvt_one (RuleTyTmVar v Nothing)    = RuleBndr    noExtField v+        cvt_one (RuleTyTmVar v (Just sig)) =+          RuleBndrSig noExtField v (mkLHsSigWcType sig)++-- turns RuleTyTmVars into HsTyVarBndrs - this is more interesting+mkRuleTyVarBndrs :: [LRuleTyTmVar] -> [LHsTyVarBndr GhcPs]+mkRuleTyVarBndrs = fmap (fmap cvt_one)+  where cvt_one (RuleTyTmVar v Nothing)    = UserTyVar   noExtField (fmap tm_to_ty v)+        cvt_one (RuleTyTmVar v (Just sig))+          = KindedTyVar noExtField (fmap tm_to_ty v) sig+    -- takes something in namespace 'varName' to something in namespace 'tvName'+        tm_to_ty (Unqual occ) = Unqual (setOccNameSpace tvName occ)+        tm_to_ty _ = panic "mkRuleTyVarBndrs"++-- See note [Parsing explicit foralls in Rules] in Parser.y+checkRuleTyVarBndrNames :: [LHsTyVarBndr GhcPs] -> P ()+checkRuleTyVarBndrNames = mapM_ (check . fmap hsTyVarName)+  where check (dL->L loc (Unqual occ)) = do+          when ((occNameString occ ==) `any` ["forall","family","role"])+               (addFatalError loc (text $ "parse error on input "+                                    ++ occNameString occ))+        check _ = panic "checkRuleTyVarBndrNames"++checkRecordSyntax :: (MonadP m, Outputable a) => Located a -> m (Located a)+checkRecordSyntax lr@(dL->L loc r)+    = do allowed <- getBit TraditionalRecordSyntaxBit+         unless allowed $ addError loc $+           text "Illegal record syntax (use TraditionalRecordSyntax):" <+> ppr r+         return lr++-- | Check if the gadt_constrlist is empty. Only raise parse error for+-- `data T where` to avoid affecting existing error message, see #8258.+checkEmptyGADTs :: Located ([AddAnn], [LConDecl GhcPs])+                -> P (Located ([AddAnn], [LConDecl GhcPs]))+checkEmptyGADTs gadts@(dL->L span (_, []))           -- Empty GADT declaration.+    = do gadtSyntax <- getBit GadtSyntaxBit   -- GADTs implies GADTSyntax+         unless gadtSyntax $ addError span $ vcat+           [ text "Illegal keyword 'where' in data declaration"+           , text "Perhaps you intended to use GADTs or a similar language"+           , text "extension to enable syntax: data T where"+           ]+         return gadts+checkEmptyGADTs gadts = return gadts              -- Ordinary GADT declaration.++checkTyClHdr :: Bool               -- True  <=> class header+                                   -- False <=> type header+             -> LHsType GhcPs+             -> P (Located RdrName,      -- the head symbol (type or class name)+                   [LHsTypeArg GhcPs],      -- parameters of head symbol+                   LexicalFixity,        -- the declaration is in infix format+                   [AddAnn]) -- API Annotation for HsParTy when stripping parens+-- Well-formedness check and decomposition of type and class heads.+-- Decomposes   T ty1 .. tyn   into    (T, [ty1, ..., tyn])+--              Int :*: Bool   into    (:*:, [Int, Bool])+-- returning the pieces+checkTyClHdr is_cls ty+  = goL ty [] [] Prefix+  where+    goL (dL->L l ty) acc ann fix = go l ty acc ann fix++    -- workaround to define '*' despite StarIsType+    go lp (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix+      = do { warnStarBndr l+           ; let name = mkOccName tcClsName (starSym isUni)+           ; return (cL l (Unqual name), acc, fix, (ann ++ mkParensApiAnn lp)) }++    go _ (HsTyVar _ _ ltc@(dL->L _ tc)) acc ann fix+      | isRdrTc tc               = return (ltc, acc, fix, ann)+    go _ (HsOpTy _ t1 ltc@(dL->L _ tc) t2) acc ann _fix+      | isRdrTc tc               = return (ltc, HsValArg t1:HsValArg t2:acc, Infix, ann)+    go l (HsParTy _ ty)    acc ann fix = goL ty acc (ann ++mkParensApiAnn l) fix+    go _ (HsAppTy _ t1 t2) acc ann fix = goL t1 (HsValArg t2:acc) ann fix+    go _ (HsAppKindTy l ty ki) acc ann fix = goL ty (HsTypeArg l ki:acc) ann fix+    go l (HsTupleTy _ HsBoxedOrConstraintTuple ts) [] ann fix+      = return (cL l (nameRdrName tup_name), map HsValArg ts, fix, ann)+      where+        arity = length ts+        tup_name | is_cls    = cTupleTyConName arity+                 | otherwise = getName (tupleTyCon Boxed arity)+          -- See Note [Unit tuples] in GHC.Hs.Types  (TODO: is this still relevant?)+    go l _ _ _ _+      = addFatalError l (text "Malformed head of type or class declaration:"+                          <+> ppr ty)++-- | Yield a parse error if we have a function applied directly to a do block+-- etc. and BlockArguments is not enabled.+checkExpBlockArguments :: LHsExpr GhcPs -> PV ()+checkCmdBlockArguments :: LHsCmd GhcPs -> PV ()+(checkExpBlockArguments, checkCmdBlockArguments) = (checkExpr, checkCmd)+  where+    checkExpr :: LHsExpr GhcPs -> PV ()+    checkExpr expr = case unLoc expr of+      HsDo _ DoExpr _ -> check "do block" expr+      HsDo _ MDoExpr _ -> check "mdo block" expr+      HsLam {} -> check "lambda expression" expr+      HsCase {} -> check "case expression" expr+      HsLamCase {} -> check "lambda-case expression" expr+      HsLet {} -> check "let expression" expr+      HsIf {} -> check "if expression" expr+      HsProc {} -> check "proc expression" expr+      _ -> return ()++    checkCmd :: LHsCmd GhcPs -> PV ()+    checkCmd cmd = case unLoc cmd of+      HsCmdLam {} -> check "lambda command" cmd+      HsCmdCase {} -> check "case command" cmd+      HsCmdIf {} -> check "if command" cmd+      HsCmdLet {} -> check "let command" cmd+      HsCmdDo {} -> check "do command" cmd+      _ -> return ()++    check :: (HasSrcSpan a, Outputable a) => String -> a -> PV ()+    check element a = do+      blockArguments <- getBit BlockArgumentsBit+      unless blockArguments $+        addError (getLoc a) $+          text "Unexpected " <> text element <> text " in function application:"+           $$ nest 4 (ppr a)+           $$ text "You could write it with parentheses"+           $$ text "Or perhaps you meant to enable BlockArguments?"++-- | Validate the context constraints and break up a context into a list+-- of predicates.+--+-- @+--     (Eq a, Ord b)        -->  [Eq a, Ord b]+--     Eq a                 -->  [Eq a]+--     (Eq a)               -->  [Eq a]+--     (((Eq a)))           -->  [Eq a]+-- @+checkContext :: LHsType GhcPs -> P ([AddAnn],LHsContext GhcPs)+checkContext (dL->L l orig_t)+  = check [] (cL l orig_t)+ where+  check anns (dL->L lp (HsTupleTy _ HsBoxedOrConstraintTuple ts))+    -- (Eq a, Ord b) shows up as a tuple type. Only boxed tuples can+    -- be used as context constraints.+    = return (anns ++ mkParensApiAnn lp,cL l ts)                -- Ditto ()++  check anns (dL->L lp1 (HsParTy _ ty))+                                  -- to be sure HsParTy doesn't get into the way+       = check anns' ty+         where anns' = if l == lp1 then anns+                                   else (anns ++ mkParensApiAnn lp1)++  -- no need for anns, returning original+  check _anns t = checkNoDocs msg t *> return ([],cL l [cL l orig_t])++  msg = text "data constructor context"++-- | Check recursively if there are any 'HsDocTy's in the given type.+-- This only works on a subset of types produced by 'btype_no_ops'+checkNoDocs :: SDoc -> LHsType GhcPs -> P ()+checkNoDocs msg ty = go ty+  where+    go (dL->L _ (HsAppKindTy _ ty ki)) = go ty *> go ki+    go (dL->L _ (HsAppTy _ t1 t2)) = go t1 *> go t2+    go (dL->L l (HsDocTy _ t ds)) = addError l $ hsep+                                  [ text "Unexpected haddock", quotes (ppr ds)+                                  , text "on", msg, quotes (ppr t) ]+    go _ = pure ()++checkImportDecl :: Maybe (Located Token)+                -> Maybe (Located Token)+                -> P ()+checkImportDecl mPre mPost = do+  let whenJust mg f = maybe (pure ()) f mg++  importQualifiedPostEnabled <- getBit ImportQualifiedPostBit++  -- Error if 'qualified' found in postpostive position and+  -- 'ImportQualifiedPost' is not in effect.+  whenJust mPost $ \post ->+    when (not importQualifiedPostEnabled) $+      failOpNotEnabledImportQualifiedPost (getLoc post)++  -- Error if 'qualified' occurs in both pre and postpositive+  -- positions.+  whenJust mPost $ \post ->+    when (isJust mPre) $+      failOpImportQualifiedTwice (getLoc post)++  -- Warn if 'qualified' found in prepositive position and+  -- 'Opt_WarnPrepositiveQualifiedModule' is enabled.+  whenJust mPre $ \pre ->+    warnPrepositiveQualifiedModule (getLoc pre)++-- -------------------------------------------------------------------------+-- Checking Patterns.++-- We parse patterns as expressions and check for valid patterns below,+-- converting the expression into a pattern at the same time.++checkPattern :: Located (PatBuilder GhcPs) -> P (LPat GhcPs)+checkPattern = runPV . checkLPat++checkPattern_msg :: SDoc -> PV (Located (PatBuilder GhcPs)) -> P (LPat GhcPs)+checkPattern_msg msg pp = runPV_msg msg (pp >>= checkLPat)++checkLPat :: Located (PatBuilder GhcPs) -> PV (LPat GhcPs)+checkLPat e@(dL->L l _) = checkPat l e []++checkPat :: SrcSpan -> Located (PatBuilder GhcPs) -> [LPat GhcPs]+         -> PV (LPat GhcPs)+checkPat loc (dL->L l e@(PatBuilderVar (dL->L _ c))) args+  | isRdrDataCon c = return (cL loc (ConPatIn (cL l c) (PrefixCon args)))+  | not (null args) && patIsRec c =+      localPV_msg (\_ -> text "Perhaps you intended to use RecursiveDo") $+      patFail l (ppr e)+checkPat loc e args     -- OK to let this happen even if bang-patterns+                        -- are not enabled, because there is no valid+                        -- non-bang-pattern parse of (C ! e)+  | Just (e', args') <- splitBang e+  = do  { args'' <- mapM checkLPat args'+        ; checkPat loc e' (args'' ++ args) }+checkPat loc (dL->L _ (PatBuilderApp f e)) args+  = do p <- checkLPat e+       checkPat loc f (p : args)+checkPat loc (dL->L _ e) []+  = do p <- checkAPat loc e+       return (cL loc p)+checkPat loc e _+  = patFail loc (ppr e)++checkAPat :: SrcSpan -> PatBuilder GhcPs -> PV (Pat GhcPs)+checkAPat loc e0 = do+ nPlusKPatterns <- getBit NPlusKPatternsBit+ case e0 of+   PatBuilderPat p -> return p+   PatBuilderVar x -> return (VarPat noExtField x)++   -- Overloaded numeric patterns (e.g. f 0 x = x)+   -- Negation is recorded separately, so that the literal is zero or +ve+   -- NB. Negative *primitive* literals are already handled by the lexer+   PatBuilderOverLit pos_lit -> return (mkNPat (cL loc pos_lit) Nothing)++   PatBuilderBang lb e   -- (! x)+        -> do { hintBangPat loc e0+              ; e' <- checkLPat e+              ; addAnnotation loc AnnBang lb+              ; return  (BangPat noExtField e') }++   -- n+k patterns+   PatBuilderOpApp+           (dL->L nloc (PatBuilderVar (dL->L _ n)))+           (dL->L _ plus)+           (dL->L lloc (PatBuilderOverLit lit@(OverLit {ol_val = HsIntegral {}})))+                      | nPlusKPatterns && (plus == plus_RDR)+                      -> return (mkNPlusKPat (cL nloc n) (cL lloc lit))++   PatBuilderOpApp l (dL->L cl c) r+     | isRdrDataCon c -> do+         l <- checkLPat l+         r <- checkLPat r+         return (ConPatIn (cL cl c) (InfixCon l r))++   PatBuilderPar e    -> checkLPat e >>= (return . (ParPat noExtField))+   _           -> patFail loc (ppr e0)++placeHolderPunRhs :: DisambECP b => PV (Located b)+-- The RHS of a punned record field will be filled in by the renamer+-- It's better not to make it an error, in case we want to print it when+-- debugging+placeHolderPunRhs = mkHsVarPV (noLoc pun_RDR)++plus_RDR, pun_RDR :: RdrName+plus_RDR = mkUnqual varName (fsLit "+") -- Hack+pun_RDR  = mkUnqual varName (fsLit "pun-right-hand-side")++isBangRdr, isTildeRdr :: RdrName -> Bool+isBangRdr (Unqual occ) = occNameFS occ == fsLit "!"+isBangRdr _ = False+isTildeRdr = (==eqTyCon_RDR)++checkPatField :: LHsRecField GhcPs (Located (PatBuilder GhcPs))+              -> PV (LHsRecField GhcPs (LPat GhcPs))+checkPatField (dL->L l fld) = do p <- checkLPat (hsRecFieldArg fld)+                                 return (cL l (fld { hsRecFieldArg = p }))++patFail :: SrcSpan -> SDoc -> PV a+patFail loc e = addFatalError loc $ text "Parse error in pattern:" <+> ppr e++patIsRec :: RdrName -> Bool+patIsRec e = e == mkUnqual varName (fsLit "rec")++---------------------------------------------------------------------------+-- Check Equation Syntax++checkValDef :: SrcStrictness+            -> Located (PatBuilder GhcPs)+            -> Maybe (LHsType GhcPs)+            -> Located (a,GRHSs GhcPs (LHsExpr GhcPs))+            -> P ([AddAnn],HsBind GhcPs)++checkValDef _strictness lhs (Just sig) grhss+        -- x :: ty = rhs  parses as a *pattern* binding+  = do lhs' <- runPV $ mkHsTySigPV (combineLocs lhs sig) lhs sig >>= checkLPat+       checkPatBind lhs' grhss++checkValDef strictness lhs Nothing g@(dL->L l (_,grhss))+  = do  { mb_fun <- isFunLhs lhs+        ; case mb_fun of+            Just (fun, is_infix, pats, ann) ->+              checkFunBind strictness ann (getLoc lhs)+                           fun is_infix pats (cL l grhss)+            Nothing -> do+              lhs' <- checkPattern lhs+              checkPatBind lhs' g }++checkFunBind :: SrcStrictness+             -> [AddAnn]+             -> SrcSpan+             -> Located RdrName+             -> LexicalFixity+             -> [Located (PatBuilder GhcPs)]+             -> Located (GRHSs GhcPs (LHsExpr GhcPs))+             -> P ([AddAnn],HsBind GhcPs)+checkFunBind strictness ann lhs_loc fun is_infix pats (dL->L rhs_span grhss)+  = do  ps <- mapM checkPattern pats+        let match_span = combineSrcSpans lhs_loc rhs_span+        -- Add back the annotations stripped from any HsPar values in the lhs+        -- mapM_ (\a -> a match_span) ann+        return (ann, makeFunBind fun+                  [cL match_span (Match { m_ext = noExtField+                                        , m_ctxt = FunRhs+                                            { mc_fun    = fun+                                            , mc_fixity = is_infix+                                            , mc_strictness = strictness }+                                        , m_pats = ps+                                        , m_grhss = grhss })])+        -- The span of the match covers the entire equation.+        -- That isn't quite right, but it'll do for now.++makeFunBind :: Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)]+            -> HsBind GhcPs+-- Like GHC.Hs.Utils.mkFunBind, but we need to be able to set the fixity too+makeFunBind fn ms+  = FunBind { fun_ext = noExtField,+              fun_id = fn,+              fun_matches = mkMatchGroup FromSource ms,+              fun_co_fn = idHsWrapper,+              fun_tick = [] }++checkPatBind :: LPat GhcPs+             -> Located (a,GRHSs GhcPs (LHsExpr GhcPs))+             -> P ([AddAnn],HsBind GhcPs)+checkPatBind lhs (dL->L _ (_,grhss))+  = return ([],PatBind noExtField lhs grhss ([],[]))++checkValSigLhs :: LHsExpr GhcPs -> P (Located RdrName)+checkValSigLhs (dL->L _ (HsVar _ lrdr@(dL->L _ v)))+  | isUnqual v+  , not (isDataOcc (rdrNameOcc v))+  = return lrdr++checkValSigLhs lhs@(dL->L l _)+  = addFatalError l ((text "Invalid type signature:" <+>+                       ppr lhs <+> text ":: ...")+                      $$ text hint)+  where+    hint | foreign_RDR `looks_like` lhs+         = "Perhaps you meant to use ForeignFunctionInterface?"+         | default_RDR `looks_like` lhs+         = "Perhaps you meant to use DefaultSignatures?"+         | pattern_RDR `looks_like` lhs+         = "Perhaps you meant to use PatternSynonyms?"+         | otherwise+         = "Should be of form <variable> :: <type>"++    -- A common error is to forget the ForeignFunctionInterface flag+    -- so check for that, and suggest.  cf #3805+    -- Sadly 'foreign import' still barfs 'parse error' because+    --  'import' is a keyword+    looks_like s (dL->L _ (HsVar _ (dL->L _ v))) = v == s+    looks_like s (dL->L _ (HsApp _ lhs _))   = looks_like s lhs+    looks_like _ _                       = False++    foreign_RDR = mkUnqual varName (fsLit "foreign")+    default_RDR = mkUnqual varName (fsLit "default")+    pattern_RDR = mkUnqual varName (fsLit "pattern")++checkDoAndIfThenElse+  :: (HasSrcSpan a, Outputable a, Outputable b, HasSrcSpan c, Outputable c)+  => a -> Bool -> b -> Bool -> c -> PV ()+checkDoAndIfThenElse guardExpr semiThen thenExpr semiElse elseExpr+ | semiThen || semiElse+    = do doAndIfThenElse <- getBit DoAndIfThenElseBit+         unless doAndIfThenElse $ do+             addError (combineLocs guardExpr elseExpr)+                            (text "Unexpected semi-colons in conditional:"+                          $$ nest 4 expr+                          $$ text "Perhaps you meant to use DoAndIfThenElse?")+ | otherwise            = return ()+    where pprOptSemi True  = semi+          pprOptSemi False = empty+          expr = text "if"   <+> ppr guardExpr <> pprOptSemi semiThen <+>+                 text "then" <+> ppr thenExpr  <> pprOptSemi semiElse <+>+                 text "else" <+> ppr elseExpr+++        -- The parser left-associates, so there should+        -- not be any OpApps inside the e's+splitBang :: Located (PatBuilder GhcPs) -> Maybe (Located (PatBuilder GhcPs), [Located (PatBuilder GhcPs)])+-- Splits (f ! g a b) into (f, [(! g), a, b])+splitBang (dL->L _ (PatBuilderOpApp l_arg op r_arg))+  | isBangRdr (unLoc op)+  = Just (l_arg, cL l' (PatBuilderBang (getLoc op) arg1) : argns)+  where+    l' = combineLocs op arg1+    (arg1,argns) = split_bang r_arg []+    split_bang (dL->L _ (PatBuilderApp f e)) es = split_bang f (e:es)+    split_bang e                       es = (e,es)+splitBang _ = Nothing++-- See Note [isFunLhs vs mergeDataCon]+isFunLhs :: Located (PatBuilder GhcPs)+      -> P (Maybe (Located RdrName, LexicalFixity, [Located (PatBuilder GhcPs)],[AddAnn]))+-- A variable binding is parsed as a FunBind.+-- Just (fun, is_infix, arg_pats) if e is a function LHS+--+-- The whole LHS is parsed as a single expression.+-- Any infix operators on the LHS will parse left-associatively+-- E.g.         f !x y !z+--      will parse (rather strangely) as+--              (f ! x y) ! z+--      It's up to isFunLhs to sort out the mess+--+-- a .!. !b++isFunLhs e = go e [] []+ where+   go (dL->L loc (PatBuilderVar (dL->L _ f))) es ann+       | not (isRdrDataCon f)        = return (Just (cL loc f, Prefix, es, ann))+   go (dL->L _ (PatBuilderApp f e)) es       ann = go f (e:es) ann+   go (dL->L l (PatBuilderPar e))   es@(_:_) ann = go e es (ann ++ mkParensApiAnn l)++        -- Things of the form `!x` are also FunBinds+        -- See Note [FunBind vs PatBind]+   go (dL->L _ (PatBuilderBang _ (L _ (PatBuilderVar (dL -> L l var))))) [] ann+        | not (isRdrDataCon var)     = return (Just (cL l var, Prefix, [], ann))++      -- For infix function defns, there should be only one infix *function*+      -- (though there may be infix *datacons* involved too).  So we don't+      -- need fixity info to figure out which function is being defined.+      --      a `K1` b `op` c `K2` d+      -- must parse as+      --      (a `K1` b) `op` (c `K2` d)+      -- The renamer checks later that the precedences would yield such a parse.+      --+      -- There is a complication to deal with bang patterns.+      --+      -- ToDo: what about this?+      --              x + 1 `op` y = ...++   go e@(L loc (PatBuilderOpApp l (dL->L loc' op) r)) es ann+        | Just (e',es') <- splitBang e+        = do { bang_on <- getBit BangPatBit+             ; if bang_on then go e' (es' ++ es) ann+               else return (Just (cL loc' op, Infix, (l:r:es), ann)) }+                -- No bangs; behave just like the next case+        | not (isRdrDataCon op)         -- We have found the function!+        = return (Just (cL loc' op, Infix, (l:r:es), ann))+        | otherwise                     -- Infix data con; keep going+        = do { mb_l <- go l es ann+             ; case mb_l of+                 Just (op', Infix, j : k : es', ann')+                   -> return (Just (op', Infix, j : op_app : es', ann'))+                   where+                     op_app = cL loc (PatBuilderOpApp k+                               (cL loc' op) r)+                 _ -> return Nothing }+   go _ _ _ = return Nothing++-- | Either an operator or an operand.+data TyEl = TyElOpr RdrName | TyElOpd (HsType GhcPs)+          | TyElKindApp SrcSpan (LHsType GhcPs)+          -- See Note [TyElKindApp SrcSpan interpretation]+          | TyElTilde | TyElBang+          | TyElUnpackedness ([AddAnn], SourceText, SrcUnpackedness)+          | TyElDocPrev HsDocString+++{- Note [TyElKindApp SrcSpan interpretation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++A TyElKindApp captures type application written in haskell as++    @ Foo++where Foo is some type.++The SrcSpan reflects both elements, and there are AnnAt and AnnVal API+Annotations attached to this SrcSpan for the specific locations of+each within it.+-}++instance Outputable TyEl where+  ppr (TyElOpr name) = ppr name+  ppr (TyElOpd ty) = ppr ty+  ppr (TyElKindApp _ ki) = text "@" <> ppr ki+  ppr TyElTilde = text "~"+  ppr TyElBang = text "!"+  ppr (TyElUnpackedness (_, _, unpk)) = ppr unpk+  ppr (TyElDocPrev doc) = ppr doc++tyElStrictness :: TyEl -> Maybe (AnnKeywordId, SrcStrictness)+tyElStrictness TyElTilde = Just (AnnTilde, SrcLazy)+tyElStrictness TyElBang = Just (AnnBang, SrcStrict)+tyElStrictness _ = Nothing++-- | Extract a strictness/unpackedness annotation from the front of a reversed+-- 'TyEl' list.+pStrictMark+  :: [Located TyEl] -- reversed TyEl+  -> Maybe ( Located HsSrcBang {- a strictness/upnackedness marker -}+           , [AddAnn]+           , [Located TyEl] {- remaining TyEl -})+pStrictMark ((dL->L l1 x1) : (dL->L l2 x2) : xs)+  | Just (strAnnId, str) <- tyElStrictness x1+  , TyElUnpackedness (unpkAnns, prag, unpk) <- x2+  = Just ( cL (combineSrcSpans l1 l2) (HsSrcBang prag unpk str)+         , unpkAnns ++ [AddAnn strAnnId l1]+         , xs )+pStrictMark ((dL->L l x1) : xs)+  | Just (strAnnId, str) <- tyElStrictness x1+  = Just ( cL l (HsSrcBang NoSourceText NoSrcUnpack str)+         , [AddAnn strAnnId l]+         , xs )+pStrictMark ((dL->L l x1) : xs)+  | TyElUnpackedness (anns, prag, unpk) <- x1+  = Just ( cL l (HsSrcBang prag unpk NoSrcStrict)+         , anns+         , xs )+pStrictMark _ = Nothing++pBangTy+  :: LHsType GhcPs  -- a type to be wrapped inside HsBangTy+  -> [Located TyEl] -- reversed TyEl+  -> ( Bool           {- has a strict mark been consumed? -}+     , LHsType GhcPs  {- the resulting BangTy -}+     , P ()           {- add annotations -}+     , [Located TyEl] {- remaining TyEl -})+pBangTy lt@(dL->L l1 _) xs =+  case pStrictMark xs of+    Nothing -> (False, lt, pure (), xs)+    Just (dL->L l2 strictMark, anns, xs') ->+      let bl = combineSrcSpans l1 l2+          bt = HsBangTy noExtField strictMark lt+      in (True, cL bl bt, addAnnsAt bl anns, xs')++-- | Merge a /reversed/ and /non-empty/ soup of operators and operands+--   into a type.+--+-- User input: @F x y + G a b * X@+-- Input to 'mergeOps': [X, *, b, a, G, +, y, x, F]+-- Output corresponds to what the user wrote assuming all operators are of the+-- same fixity and right-associative.+--+-- It's a bit silly that we're doing it at all, as the renamer will have to+-- rearrange this, and it'd be easier to keep things separate.+--+-- See Note [Parsing data constructors is hard]+mergeOps :: [Located TyEl] -> P (LHsType GhcPs)+mergeOps ((dL->L l1 (TyElOpd t)) : xs)+  | (_, t', addAnns, xs') <- pBangTy (cL l1 t) xs+  , null xs' -- We accept a BangTy only when there are no preceding TyEl.+  = addAnns >> return t'+mergeOps all_xs = go (0 :: Int) [] id all_xs+  where+    -- NB. When modifying clauses in 'go', make sure that the reasoning in+    -- Note [Non-empty 'acc' in mergeOps clause [end]] is still correct.++    -- clause [unpk]:+    -- handle (NO)UNPACK pragmas+    go k acc ops_acc ((dL->L l (TyElUnpackedness (anns, unpkSrc, unpk))):xs) =+      if not (null acc) && null xs+      then do { acc' <- eitherToP $ mergeOpsAcc acc+              ; let a = ops_acc acc'+                    strictMark = HsSrcBang unpkSrc unpk NoSrcStrict+                    bl = combineSrcSpans l (getLoc a)+                    bt = HsBangTy noExtField strictMark a+              ; addAnnsAt bl anns+              ; return (cL bl bt) }+      else addFatalError l unpkError+      where+        unpkSDoc = case unpkSrc of+          NoSourceText -> ppr unpk+          SourceText str -> text str <> text " #-}"+        unpkError+          | not (null xs) = unpkSDoc <+> text "cannot appear inside a type."+          | null acc && k == 0 = unpkSDoc <+> text "must be applied to a type."+          | otherwise =+              -- See Note [Impossible case in mergeOps clause [unpk]]+              panic "mergeOps.UNPACK: impossible position"++    -- clause [doc]:+    -- we do not expect to encounter any docs+    go _ _ _ ((dL->L l (TyElDocPrev _)):_) =+      failOpDocPrev l++    -- to improve error messages, we do a bit of guesswork to determine if the+    -- user intended a '!' or a '~' as a strictness annotation+    go k acc ops_acc ((dL->L l x) : xs)+      | Just (_, str) <- tyElStrictness x+      , let guess [] = True+            guess ((dL->L _ (TyElOpd _)):_) = False+            guess ((dL->L _ (TyElOpr _)):_) = True+            guess ((dL->L _ (TyElKindApp _ _)):_) = False+            guess ((dL->L _ (TyElTilde)):_) = True+            guess ((dL->L _ (TyElBang)):_) = True+            guess ((dL->L _ (TyElUnpackedness _)):_) = True+            guess ((dL->L _ (TyElDocPrev _)):xs') = guess xs'+            guess _ = panic "mergeOps.go.guess: Impossible Match"+                      -- due to #15884+        in guess xs+      = if not (null acc) && (k > 1 || length acc > 1)+        then do { a <- eitherToP (mergeOpsAcc acc)+                ; failOpStrictnessCompound (cL l str) (ops_acc a) }+        else failOpStrictnessPosition (cL l str)++    -- clause [opr]:+    -- when we encounter an operator, we must have accumulated+    -- something for its rhs, and there must be something left+    -- to build its lhs.+    go k acc ops_acc ((dL->L l (TyElOpr op)):xs) =+      if null acc || null (filter isTyElOpd xs)+        then failOpFewArgs (cL l op)+        else do { acc' <- eitherToP (mergeOpsAcc acc)+                ; go (k + 1) [] (\c -> mkLHsOpTy c (cL l op) (ops_acc acc')) xs }+      where+        isTyElOpd (dL->L _ (TyElOpd _)) = True+        isTyElOpd _ = False++    -- clause [opr.1]: interpret 'TyElTilde' as an operator+    go k acc ops_acc ((dL->L l TyElTilde):xs) =+      let op = eqTyCon_RDR+      in go k acc ops_acc (cL l (TyElOpr op):xs)++    -- clause [opr.2]: interpret 'TyElBang' as an operator+    go k acc ops_acc ((dL->L l TyElBang):xs) =+      let op = mkUnqual tcClsName (fsLit "!")+      in go k acc ops_acc (cL l (TyElOpr op):xs)++    -- clause [opd]:+    -- whenever an operand is encountered, it is added to the accumulator+    go k acc ops_acc ((dL->L l (TyElOpd a)):xs) = go k (HsValArg (cL l a):acc) ops_acc xs++    -- clause [tyapp]:+    -- whenever a type application is encountered, it is added to the accumulator+    go k acc ops_acc ((dL->L _ (TyElKindApp l a)):xs) = go k (HsTypeArg l a:acc) ops_acc xs++    -- clause [end]+    -- See Note [Non-empty 'acc' in mergeOps clause [end]]+    go _ acc ops_acc [] = do { acc' <- eitherToP (mergeOpsAcc acc)+                             ; return (ops_acc acc') }++    go _ _ _ _ = panic "mergeOps.go: Impossible Match"+                        -- due to #15884++mergeOpsAcc :: [HsArg (LHsType GhcPs) (LHsKind GhcPs)]+         -> Either (SrcSpan, SDoc) (LHsType GhcPs)+mergeOpsAcc [] = panic "mergeOpsAcc: empty input"+mergeOpsAcc (HsTypeArg _ (L loc ki):_)+  = Left (loc, text "Unexpected type application:" <+> ppr ki)+mergeOpsAcc (HsValArg ty : xs) = go1 ty xs+  where+    go1 :: LHsType GhcPs+        -> [HsArg (LHsType GhcPs) (LHsKind GhcPs)]+        -> Either (SrcSpan, SDoc) (LHsType GhcPs)+    go1 lhs []     = Right lhs+    go1 lhs (x:xs) = case x of+        HsValArg ty -> go1 (mkHsAppTy lhs ty) xs+        HsTypeArg loc ki -> let ty = mkHsAppKindTy loc lhs ki+                            in go1 ty xs+        HsArgPar _ -> go1 lhs xs+mergeOpsAcc (HsArgPar _: xs) = mergeOpsAcc xs++{- Note [Impossible case in mergeOps clause [unpk]]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This case should never occur. Let us consider all possible+variations of 'acc', 'xs', and 'k':++  acc          xs        k+==============================+  null   |    null       0      -- "must be applied to a type"+  null   |  not null     0      -- "must be applied to a type"+not null |    null       0      -- successful parse+not null |  not null     0      -- "cannot appear inside a type"+  null   |    null      >0      -- handled in clause [opr]+  null   |  not null    >0      -- "cannot appear inside a type"+not null |    null      >0      -- successful parse+not null |  not null    >0      -- "cannot appear inside a type"++The (null acc && null xs && k>0) case is handled in clause [opr]+by the following check:++    if ... || null (filter isTyElOpd xs)+     then failOpFewArgs (L l op)++We know that this check has been performed because k>0, and by+the time we reach the end of the list (null xs), the only way+for (null acc) to hold is that there was not a single TyElOpd+between the operator and the end of the list. But this case is+caught by the check and reported as 'failOpFewArgs'.+-}++{- Note [Non-empty 'acc' in mergeOps clause [end]]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In clause [end] we need to know that 'acc' is non-empty to call 'mergeAcc'+without a check.++Running 'mergeOps' with an empty input list is forbidden, so we do not consider+this possibility. This means we'll hit at least one other clause before we+reach clause [end].++* Clauses [unpk] and [doc] do not call 'go' recursively, so we cannot hit+  clause [end] from there.+* Clause [opd] makes 'acc' non-empty, so if we hit clause [end] after it, 'acc'+  will be non-empty.+* Clause [opr] checks that (filter isTyElOpd xs) is not null - so we are going+  to hit clause [opd] at least once before we reach clause [end], making 'acc'+  non-empty.+* There are no other clauses.++Therefore, it is safe to omit a check for non-emptiness of 'acc' in clause+[end].++-}++pInfixSide :: [Located TyEl] -> Maybe (LHsType GhcPs, P (), [Located TyEl])+pInfixSide ((dL->L l (TyElOpd t)):xs)+  | (True, t', addAnns, xs') <- pBangTy (cL l t) xs+  = Just (t', addAnns, xs')+pInfixSide (el:xs1)+  | Just t1 <- pLHsTypeArg el+  = go [t1] xs1+   where+     go :: [HsArg (LHsType GhcPs) (LHsKind GhcPs)]+        -> [Located TyEl] -> Maybe (LHsType GhcPs, P (), [Located TyEl])+     go acc (el:xs)+       | Just t <- pLHsTypeArg el+       = go (t:acc) xs+     go acc xs = case mergeOpsAcc acc of+       Left _ -> Nothing+       Right acc' -> Just (acc', pure (), xs)+pInfixSide _ = Nothing++pLHsTypeArg :: Located TyEl -> Maybe (HsArg (LHsType GhcPs) (LHsKind GhcPs))+pLHsTypeArg (dL->L l (TyElOpd a)) = Just (HsValArg (L l a))+pLHsTypeArg (dL->L _ (TyElKindApp l a)) = Just (HsTypeArg l a)+pLHsTypeArg _ = Nothing++pDocPrev :: [Located TyEl] -> (Maybe LHsDocString, [Located TyEl])+pDocPrev = go Nothing+  where+    go mTrailingDoc ((dL->L l (TyElDocPrev doc)):xs) =+      go (mTrailingDoc `mplus` Just (cL l doc)) xs+    go mTrailingDoc xs = (mTrailingDoc, xs)++orErr :: Maybe a -> b -> Either b a+orErr (Just a) _ = Right a+orErr Nothing b = Left b++{- Note [isFunLhs vs mergeDataCon]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++When parsing a function LHS, we do not know whether to treat (!) as+a strictness annotation or an infix operator:++  f ! a = ...++Without -XBangPatterns, this parses as   (!) f a = ...+   with -XBangPatterns, this parses as   f (!a) = ...++So in function declarations we opted to always parse as if -XBangPatterns+were off, and then rejig in 'isFunLhs'.++There are two downsides to this approach:++1. It is not particularly elegant, as there's a point in our pipeline where+   the representation is awfully incorrect. For instance,+      f !a b !c = ...+   will be first parsed as+      (f ! a b) ! c = ...++2. There are cases that it fails to cover, for instance infix declarations:+      !a + !b = ...+   will trigger an error.++Unfortunately, we cannot define different productions in the 'happy' grammar+depending on whether -XBangPatterns are enabled.++When parsing data constructors, we face a similar issue:+  (a) data T1 = C ! D+  (b) data T2 = C ! D => ...++In (a) the first bang is a strictness annotation, but in (b) it is a type+operator. A 'happy'-based parser does not have unlimited lookahead to check for+=>, so we must first parse (C ! D) into a common representation.++If we tried to mirror the approach used in functions, we would parse both sides+of => as types, and then rejig. However, we take a different route and use an+intermediate data structure, a reversed list of 'TyEl'.+See Note [Parsing data constructors is hard] for details.++This approach does not suffer from the issues of 'isFunLhs':++1. A sequence of 'TyEl' is a dedicated intermediate representation, not an+   incorrectly parsed type. Therefore, we do not have confusing states in our+   pipeline. (Except for representing data constructors as type variables).++2. We can handle infix data constructors with strictness annotations:+    data T a b = !a :+ !b++-}+++-- | Merge a /reversed/ and /non-empty/ soup of operators and operands+--   into a data constructor.+--+-- User input: @C !A B -- ^ doc@+-- Input to 'mergeDataCon': ["doc", B, !, A, C]+-- Output: (C, PrefixCon [!A, B], "doc")+--+-- See Note [Parsing data constructors is hard]+-- See Note [isFunLhs vs mergeDataCon]+mergeDataCon+      :: [Located TyEl]+      -> P ( Located RdrName         -- constructor name+           , HsConDeclDetails GhcPs  -- constructor field information+           , Maybe LHsDocString      -- docstring to go on the constructor+           )+mergeDataCon all_xs =+  do { (addAnns, a) <- eitherToP res+     ; addAnns+     ; return a }+  where+    -- We start by splitting off the trailing documentation comment,+    -- if any exists.+    (mTrailingDoc, all_xs') = pDocPrev all_xs++    -- Determine whether the trailing documentation comment exists and is the+    -- only docstring in this constructor declaration.+    --+    -- When true, it means that it applies to the constructor itself:+    --    data T = C+    --             A+    --             B -- ^ Comment on C (singleDoc == True)+    --+    -- When false, it means that it applies to the last field:+    --    data T = C -- ^ Comment on C+    --             A -- ^ Comment on A+    --             B -- ^ Comment on B (singleDoc == False)+    singleDoc = isJust mTrailingDoc &&+                null [ () | (dL->L _ (TyElDocPrev _)) <- all_xs' ]++    -- The result of merging the list of reversed TyEl into a+    -- data constructor, along with [AddAnn].+    res = goFirst all_xs'++    -- Take the trailing docstring into account when interpreting+    -- the docstring near the constructor.+    --+    --    data T = C -- ^ docstring right after C+    --             A+    --             B -- ^ trailing docstring+    --+    -- 'mkConDoc' must be applied to the docstring right after C, so that it+    -- falls back to the trailing docstring when appropriate (see singleDoc).+    mkConDoc mDoc | singleDoc = mDoc `mplus` mTrailingDoc+                  | otherwise = mDoc++    -- The docstring for the last field of a data constructor.+    trailingFieldDoc | singleDoc = Nothing+                     | otherwise = mTrailingDoc++    goFirst [ dL->L l (TyElOpd (HsTyVar _ _ (dL->L _ tc))) ]+      = do { data_con <- tyConToDataCon l tc+           ; return (pure (), (data_con, PrefixCon [], mTrailingDoc)) }+    goFirst ((dL->L l (TyElOpd (HsRecTy _ fields))):xs)+      | (mConDoc, xs') <- pDocPrev xs+      , [ dL->L l' (TyElOpd (HsTyVar _ _ (dL->L _ tc))) ] <- xs'+      = do { data_con <- tyConToDataCon l' tc+           ; let mDoc = mTrailingDoc `mplus` mConDoc+           ; return (pure (), (data_con, RecCon (cL l fields), mDoc)) }+    goFirst [dL->L l (TyElOpd (HsTupleTy _ HsBoxedOrConstraintTuple ts))]+      = return ( pure ()+               , ( cL l (getRdrName (tupleDataCon Boxed (length ts)))+                 , PrefixCon ts+                 , mTrailingDoc ) )+    goFirst ((dL->L l (TyElOpd t)):xs)+      | (_, t', addAnns, xs') <- pBangTy (cL l t) xs+      = go addAnns Nothing [mkLHsDocTyMaybe t' trailingFieldDoc] xs'+    goFirst (L l (TyElKindApp _ _):_)+      = goInfix Monoid.<> Left (l, kindAppErr)+    goFirst xs+      = go (pure ()) mTrailingDoc [] xs++    go addAnns mLastDoc ts [ dL->L l (TyElOpd (HsTyVar _ _ (dL->L _ tc))) ]+      = do { data_con <- tyConToDataCon l tc+           ; return (addAnns, (data_con, PrefixCon ts, mkConDoc mLastDoc)) }+    go addAnns mLastDoc ts ((dL->L l (TyElDocPrev doc)):xs) =+      go addAnns (mLastDoc `mplus` Just (cL l doc)) ts xs+    go addAnns mLastDoc ts ((dL->L l (TyElOpd t)):xs)+      | (_, t', addAnns', xs') <- pBangTy (cL l t) xs+      , t'' <- mkLHsDocTyMaybe t' mLastDoc+      = go (addAnns >> addAnns') Nothing (t'':ts) xs'+    go _ _ _ ((dL->L _ (TyElOpr _)):_) =+      -- Encountered an operator: backtrack to the beginning and attempt+      -- to parse as an infix definition.+      goInfix+    go _ _ _ (L l (TyElKindApp _ _):_) =  goInfix Monoid.<> Left (l, kindAppErr)+    go _ _ _ _ = Left malformedErr+      where+        malformedErr =+          ( foldr combineSrcSpans noSrcSpan (map getLoc all_xs')+          , text "Cannot parse data constructor" <+>+            text "in a data/newtype declaration:" $$+            nest 2 (hsep . reverse $ map ppr all_xs'))++    goInfix =+      do { let xs0 = all_xs'+         ; (rhs_t, rhs_addAnns, xs1) <- pInfixSide xs0 `orErr` malformedErr+         ; let (mOpDoc, xs2) = pDocPrev xs1+         ; (op, xs3) <- case xs2 of+              (dL->L l (TyElOpr op)) : xs3 ->+                do { data_con <- tyConToDataCon l op+                   ; return (data_con, xs3) }+              _ -> Left malformedErr+         ; let (mLhsDoc, xs4) = pDocPrev xs3+         ; (lhs_t, lhs_addAnns, xs5) <- pInfixSide xs4 `orErr` malformedErr+         ; unless (null xs5) (Left malformedErr)+         ; let rhs = mkLHsDocTyMaybe rhs_t trailingFieldDoc+               lhs = mkLHsDocTyMaybe lhs_t mLhsDoc+               addAnns = lhs_addAnns >> rhs_addAnns+         ; return (addAnns, (op, InfixCon lhs rhs, mkConDoc mOpDoc)) }+      where+        malformedErr =+          ( foldr combineSrcSpans noSrcSpan (map getLoc all_xs')+          , text "Cannot parse an infix data constructor" <+>+            text "in a data/newtype declaration:" $$+            nest 2 (hsep . reverse $ map ppr all_xs'))++    kindAppErr =+      text "Unexpected kind application" <+>+      text "in a data/newtype declaration:" $$+      nest 2 (hsep . reverse $ map ppr all_xs')++---------------------------------------------------------------------------+-- | Check for monad comprehensions+--+-- If the flag MonadComprehensions is set, return a 'MonadComp' context,+-- otherwise use the usual 'ListComp' context++checkMonadComp :: PV (HsStmtContext Name)+checkMonadComp = do+    monadComprehensions <- getBit MonadComprehensionsBit+    return $ if monadComprehensions+                then MonadComp+                else ListComp++-- -------------------------------------------------------------------------+-- Expression/command/pattern ambiguity.+-- See Note [Ambiguous syntactic categories]+--++-- See Note [Parser-Validator]+-- See Note [Ambiguous syntactic categories]+newtype ECP =+  ECP { runECP_PV :: forall b. DisambECP b => PV (Located b) }++runECP_P :: DisambECP b => ECP -> P (Located b)+runECP_P p = runPV (runECP_PV p)++ecpFromExp :: LHsExpr GhcPs -> ECP+ecpFromExp a = ECP (ecpFromExp' a)++ecpFromCmd :: LHsCmd GhcPs -> ECP+ecpFromCmd a = ECP (ecpFromCmd' a)++-- | Disambiguate infix operators.+-- See Note [Ambiguous syntactic categories]+class DisambInfixOp b where+  mkHsVarOpPV :: Located RdrName -> PV (Located b)+  mkHsConOpPV :: Located RdrName -> PV (Located b)+  mkHsInfixHolePV :: SrcSpan -> PV (Located b)++instance p ~ GhcPs => DisambInfixOp (HsExpr p) where+  mkHsVarOpPV v = return $ cL (getLoc v) (HsVar noExtField v)+  mkHsConOpPV v = return $ cL (getLoc v) (HsVar noExtField v)+  mkHsInfixHolePV l = return $ cL l hsHoleExpr++instance DisambInfixOp RdrName where+  mkHsConOpPV (dL->L l v) = return $ cL l v+  mkHsVarOpPV (dL->L l v) = return $ cL l v+  mkHsInfixHolePV l =+    addFatalError l $ text "Invalid infix hole, expected an infix operator"++-- | Disambiguate constructs that may appear when we do not know ahead of time whether we are+-- parsing an expression, a command, or a pattern.+-- See Note [Ambiguous syntactic categories]+class b ~ (Body b) GhcPs => DisambECP b where+  -- | See Note [Body in DisambECP]+  type Body b :: * -> *+  -- | Return a command without ambiguity, or fail in a non-command context.+  ecpFromCmd' :: LHsCmd GhcPs -> PV (Located b)+  -- | Return an expression without ambiguity, or fail in a non-expression context.+  ecpFromExp' :: LHsExpr GhcPs -> PV (Located b)+  -- | Disambiguate "\... -> ..." (lambda)+  mkHsLamPV :: SrcSpan -> MatchGroup GhcPs (Located b) -> PV (Located b)+  -- | Disambiguate "let ... in ..."+  mkHsLetPV :: SrcSpan -> LHsLocalBinds GhcPs -> Located b -> PV (Located b)+  -- | Infix operator representation+  type InfixOp b+  -- | Bring superclass constraints on FunArg into scope.+  -- See Note [UndecidableSuperClasses for associated types]+  superInfixOp :: (DisambInfixOp (InfixOp b) => PV (Located b )) -> PV (Located b)+  -- | Disambiguate "f # x" (infix operator)+  mkHsOpAppPV :: SrcSpan -> Located b -> Located (InfixOp b) -> Located b -> PV (Located b)+  -- | Disambiguate "case ... of ..."+  mkHsCasePV :: SrcSpan -> LHsExpr GhcPs -> MatchGroup GhcPs (Located b) -> PV (Located b)+  -- | Function argument representation+  type FunArg b+  -- | Bring superclass constraints on FunArg into scope.+  -- See Note [UndecidableSuperClasses for associated types]+  superFunArg :: (DisambECP (FunArg b) => PV (Located b)) -> PV (Located b)+  -- | Disambiguate "f x" (function application)+  mkHsAppPV :: SrcSpan -> Located b -> Located (FunArg b) -> PV (Located b)+  -- | Disambiguate "if ... then ... else ..."+  mkHsIfPV :: SrcSpan+         -> LHsExpr GhcPs+         -> Bool  -- semicolon?+         -> Located b+         -> Bool  -- semicolon?+         -> Located b+         -> PV (Located b)+  -- | Disambiguate "do { ... }" (do notation)+  mkHsDoPV :: SrcSpan -> Located [LStmt GhcPs (Located b)] -> PV (Located b)+  -- | Disambiguate "( ... )" (parentheses)+  mkHsParPV :: SrcSpan -> Located b -> PV (Located b)+  -- | Disambiguate a variable "f" or a data constructor "MkF".+  mkHsVarPV :: Located RdrName -> PV (Located b)+  -- | Disambiguate a monomorphic literal+  mkHsLitPV :: Located (HsLit GhcPs) -> PV (Located b)+  -- | Disambiguate an overloaded literal+  mkHsOverLitPV :: Located (HsOverLit GhcPs) -> PV (Located b)+  -- | Disambiguate a wildcard+  mkHsWildCardPV :: SrcSpan -> PV (Located b)+  -- | Disambiguate "a :: t" (type annotation)+  mkHsTySigPV :: SrcSpan -> Located b -> LHsType GhcPs -> PV (Located b)+  -- | Disambiguate "[a,b,c]" (list syntax)+  mkHsExplicitListPV :: SrcSpan -> [Located b] -> PV (Located b)+  -- | Disambiguate "$(...)" and "[quasi|...|]" (TH splices)+  mkHsSplicePV :: Located (HsSplice GhcPs) -> PV (Located b)+  -- | Disambiguate "f { a = b, ... }" syntax (record construction and record updates)+  mkHsRecordPV ::+    SrcSpan ->+    SrcSpan ->+    Located b ->+    ([LHsRecField GhcPs (Located b)], Maybe SrcSpan) ->+    PV (Located b)+  -- | Disambiguate "-a" (negation)+  mkHsNegAppPV :: SrcSpan -> Located b -> PV (Located b)+  -- | Disambiguate "(# a)" (right operator section)+  mkHsSectionR_PV :: SrcSpan -> Located (InfixOp b) -> Located b -> PV (Located b)+  -- | Disambiguate "(a -> b)" (view pattern)+  mkHsViewPatPV :: SrcSpan -> LHsExpr GhcPs -> Located b -> PV (Located b)+  -- | Disambiguate "a@b" (as-pattern)+  mkHsAsPatPV :: SrcSpan -> Located RdrName -> Located b -> PV (Located b)+  -- | Disambiguate "~a" (lazy pattern)+  mkHsLazyPatPV :: SrcSpan -> Located b -> PV (Located b)+  -- | Disambiguate tuple sections and unboxed sums+  mkSumOrTuplePV :: SrcSpan -> Boxity -> SumOrTuple b -> PV (Located b)++{- Note [UndecidableSuperClasses for associated types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Assume we have a class C with an associated type T:++  class C a where+    type T a+    ...++If we want to add 'C (T a)' as a superclass, we need -XUndecidableSuperClasses:++  {-# LANGUAGE UndecidableSuperClasses #-}+  class C (T a) => C a where+    type T a+    ...++Unfortunately, -XUndecidableSuperClasses don't work all that well, sometimes+making GHC loop. The workaround is to bring this constraint into scope+manually with a helper method:++  class C a where+    type T a+    superT :: (C (T a) => r) -> r++In order to avoid ambiguous types, 'r' must mention 'a'.++For consistency, we use this approach for all constraints on associated types,+even when -XUndecidableSuperClasses are not required.+-}++{- Note [Body in DisambECP]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+There are helper functions (mkBodyStmt, mkBindStmt, unguardedRHS, etc) that+require their argument to take a form of (body GhcPs) for some (body :: * ->+*). To satisfy this requirement, we say that (b ~ Body b GhcPs) in the+superclass constraints of DisambECP.++The alternative is to change mkBodyStmt, mkBindStmt, unguardedRHS, etc, to drop+this requirement. It is possible and would allow removing the type index of+PatBuilder, but leads to worse type inference, breaking some code in the+typechecker.+-}++instance p ~ GhcPs => DisambECP (HsCmd p) where+  type Body (HsCmd p) = HsCmd+  ecpFromCmd' = return+  ecpFromExp' (dL-> L l e) = cmdFail l (ppr e)+  mkHsLamPV l mg = return $ cL l (HsCmdLam noExtField mg)+  mkHsLetPV l bs e = return $ cL l (HsCmdLet noExtField bs e)+  type InfixOp (HsCmd p) = HsExpr p+  superInfixOp m = m+  mkHsOpAppPV l c1 op c2 = do+    let cmdArg c = cL (getLoc c) $ HsCmdTop noExtField c+    return $ cL l $ HsCmdArrForm noExtField op Infix Nothing [cmdArg c1, cmdArg c2]+  mkHsCasePV l c mg = return $ cL l (HsCmdCase noExtField c mg)+  type FunArg (HsCmd p) = HsExpr p+  superFunArg m = m+  mkHsAppPV l c e = do+    checkCmdBlockArguments c+    checkExpBlockArguments e+    return $ cL l (HsCmdApp noExtField c e)+  mkHsIfPV l c semi1 a semi2 b = do+    checkDoAndIfThenElse c semi1 a semi2 b+    return $ cL l (mkHsCmdIf c a b)+  mkHsDoPV l stmts = return $ cL l (HsCmdDo noExtField stmts)+  mkHsParPV l c = return $ cL l (HsCmdPar noExtField c)+  mkHsVarPV (dL->L l v) = cmdFail l (ppr v)+  mkHsLitPV (dL->L l a) = cmdFail l (ppr a)+  mkHsOverLitPV (dL->L l a) = cmdFail l (ppr a)+  mkHsWildCardPV l = cmdFail l (text "_")+  mkHsTySigPV l a sig = cmdFail l (ppr a <+> text "::" <+> ppr sig)+  mkHsExplicitListPV l xs = cmdFail l $+    brackets (fsep (punctuate comma (map ppr xs)))+  mkHsSplicePV (dL->L l sp) = cmdFail l (ppr sp)+  mkHsRecordPV l _ a (fbinds, ddLoc) = cmdFail l $+    ppr a <+> ppr (mk_rec_fields fbinds ddLoc)+  mkHsNegAppPV l a = cmdFail l (text "-" <> ppr a)+  mkHsSectionR_PV l op c = cmdFail l $+    let pp_op = fromMaybe (panic "cannot print infix operator")+                          (ppr_infix_expr (unLoc op))+    in pp_op <> ppr c+  mkHsViewPatPV l a b = cmdFail l $+    ppr a <+> text "->" <+> ppr b+  mkHsAsPatPV l v c = cmdFail l $+    pprPrefixOcc (unLoc v) <> text "@" <> ppr c+  mkHsLazyPatPV l c = cmdFail l $+    text "~" <> ppr c+  mkSumOrTuplePV l boxity a = cmdFail l (pprSumOrTuple boxity a)++cmdFail :: SrcSpan -> SDoc -> PV a+cmdFail loc e = addFatalError loc $+  hang (text "Parse error in command:") 2 (ppr e)++instance p ~ GhcPs => DisambECP (HsExpr p) where+  type Body (HsExpr p) = HsExpr+  ecpFromCmd' (dL -> L l c) = do+    addError l $ vcat+      [ text "Arrow command found where an expression was expected:",+        nest 2 (ppr c) ]+    return (cL l hsHoleExpr)+  ecpFromExp' = return+  mkHsLamPV l mg = return $ cL l (HsLam noExtField mg)+  mkHsLetPV l bs c = return $ cL l (HsLet noExtField bs c)+  type InfixOp (HsExpr p) = HsExpr p+  superInfixOp m = m+  mkHsOpAppPV l e1 op e2 = do+    return $ cL l $ OpApp noExtField e1 op e2+  mkHsCasePV l e mg = return $ cL l (HsCase noExtField e mg)+  type FunArg (HsExpr p) = HsExpr p+  superFunArg m = m+  mkHsAppPV l e1 e2 = do+    checkExpBlockArguments e1+    checkExpBlockArguments e2+    return $ cL l (HsApp noExtField e1 e2)+  mkHsIfPV l c semi1 a semi2 b = do+    checkDoAndIfThenElse c semi1 a semi2 b+    return $ cL l (mkHsIf c a b)+  mkHsDoPV l stmts = return $ cL l (HsDo noExtField DoExpr stmts)+  mkHsParPV l e = return $ cL l (HsPar noExtField e)+  mkHsVarPV v@(getLoc -> l) = return $ cL l (HsVar noExtField v)+  mkHsLitPV (dL->L l a) = return $ cL l (HsLit noExtField a)+  mkHsOverLitPV (dL->L l a) = return $ cL l (HsOverLit noExtField a)+  mkHsWildCardPV l = return $ cL l hsHoleExpr+  mkHsTySigPV l a sig = return $ cL l (ExprWithTySig noExtField a (mkLHsSigWcType sig))+  mkHsExplicitListPV l xs = return $ cL l (ExplicitList noExtField Nothing xs)+  mkHsSplicePV sp = return $ mapLoc (HsSpliceE noExtField) sp+  mkHsRecordPV l lrec a (fbinds, ddLoc) = do+    r <- mkRecConstrOrUpdate a lrec (fbinds, ddLoc)+    checkRecordSyntax (cL l r)+  mkHsNegAppPV l a = return $ cL l (NegApp noExtField a noSyntaxExpr)+  mkHsSectionR_PV l op e = return $ cL l (SectionR noExtField op e)+  mkHsViewPatPV l a b = patSynErr l (ppr a <+> text "->" <+> ppr b) empty+  mkHsAsPatPV l v e = do+    opt_TypeApplications <- getBit TypeApplicationsBit+    let msg | opt_TypeApplications+            = "Type application syntax requires a space before '@'"+            | otherwise+            = "Did you mean to enable TypeApplications?"+    patSynErr l (pprPrefixOcc (unLoc v) <> text "@" <> ppr e) (text msg)+  mkHsLazyPatPV l e = patSynErr l (text "~" <> ppr e) empty+  mkSumOrTuplePV = mkSumOrTupleExpr++patSynErr :: SrcSpan -> SDoc -> SDoc -> PV (LHsExpr GhcPs)+patSynErr l e explanation =+  do { addError l $+        sep [text "Pattern syntax in expression context:",+             nest 4 (ppr e)] $$+        explanation+     ; return (cL l hsHoleExpr) }++hsHoleExpr :: HsExpr (GhcPass id)+hsHoleExpr = HsUnboundVar noExtField (TrueExprHole (mkVarOcc "_"))++-- | See Note [Ambiguous syntactic categories] and Note [PatBuilder]+data PatBuilder p+  = PatBuilderPat (Pat p)+  | PatBuilderBang SrcSpan (Located (PatBuilder p))+  | PatBuilderPar (Located (PatBuilder p))+  | PatBuilderApp (Located (PatBuilder p)) (Located (PatBuilder p))+  | PatBuilderOpApp (Located (PatBuilder p)) (Located RdrName) (Located (PatBuilder p))+  | PatBuilderVar (Located RdrName)+  | PatBuilderOverLit (HsOverLit GhcPs)++patBuilderBang :: SrcSpan -> Located (PatBuilder p) -> Located (PatBuilder p)+patBuilderBang bang p =+  cL (bang `combineSrcSpans` getLoc p) $+  PatBuilderBang bang p++instance Outputable (PatBuilder GhcPs) where+  ppr (PatBuilderPat p) = ppr p+  ppr (PatBuilderBang _ (L _ p)) = text "!" <+> ppr p+  ppr (PatBuilderPar (L _ p)) = parens (ppr p)+  ppr (PatBuilderApp (L _ p1) (L _ p2)) = ppr p1 <+> ppr p2+  ppr (PatBuilderOpApp (L _ p1) op (L _ p2)) = ppr p1 <+> ppr op <+> ppr p2+  ppr (PatBuilderVar v) = ppr v+  ppr (PatBuilderOverLit l) = ppr l++instance DisambECP (PatBuilder GhcPs) where+  type Body (PatBuilder GhcPs) = PatBuilder+  ecpFromCmd' (dL-> L l c) =+    addFatalError l $+      text "Command syntax in pattern:" <+> ppr c+  ecpFromExp' (dL-> L l e) =+    addFatalError l $+      text "Expression syntax in pattern:" <+> ppr e+  mkHsLamPV l _ = addFatalError l $+    text "Lambda-syntax in pattern." $$+    text "Pattern matching on functions is not possible."+  mkHsLetPV l _ _ = addFatalError l $ text "(let ... in ...)-syntax in pattern"+  type InfixOp (PatBuilder GhcPs) = RdrName+  superInfixOp m = m+  mkHsOpAppPV l p1 op p2 = do+    warnSpaceAfterBang op (getLoc p2)+    return $ cL l $ PatBuilderOpApp p1 op p2+  mkHsCasePV l _ _ = addFatalError l $ text "(case ... of ...)-syntax in pattern"+  type FunArg (PatBuilder GhcPs) = PatBuilder GhcPs+  superFunArg m = m+  mkHsAppPV l p1 p2 = return $ cL l (PatBuilderApp p1 p2)+  mkHsIfPV l _ _ _ _ _ = addFatalError l $ text "(if ... then ... else ...)-syntax in pattern"+  mkHsDoPV l _ = addFatalError l $ text "do-notation in pattern"+  mkHsParPV l p = return $ cL l (PatBuilderPar p)+  mkHsVarPV v@(getLoc -> l) = return $ cL l (PatBuilderVar v)+  mkHsLitPV lit@(dL->L l a) = do+    checkUnboxedStringLitPat lit+    return $ cL l (PatBuilderPat (LitPat noExtField a))+  mkHsOverLitPV (dL->L l a) = return $ cL l (PatBuilderOverLit a)+  mkHsWildCardPV l = return $ cL l (PatBuilderPat (WildPat noExtField))+  mkHsTySigPV l b sig = do+    p <- checkLPat b+    return $ cL l (PatBuilderPat (SigPat noExtField p (mkLHsSigWcType sig)))+  mkHsExplicitListPV l xs = do+    ps <- traverse checkLPat xs+    return (cL l (PatBuilderPat (ListPat noExtField ps)))+  mkHsSplicePV (dL->L l sp) = return $ cL l (PatBuilderPat (SplicePat noExtField sp))+  mkHsRecordPV l _ a (fbinds, ddLoc) = do+    r <- mkPatRec a (mk_rec_fields fbinds ddLoc)+    checkRecordSyntax (cL l r)+  mkHsNegAppPV l (dL->L lp p) = do+    lit <- case p of+      PatBuilderOverLit pos_lit -> return (cL lp pos_lit)+      _ -> patFail l (text "-" <> ppr p)+    return $ cL l (PatBuilderPat (mkNPat lit (Just noSyntaxExpr)))+  mkHsSectionR_PV l op p+    | isBangRdr (unLoc op) = return $ cL l $ PatBuilderBang (getLoc op) p+    | otherwise = patFail l (pprInfixOcc (unLoc op) <> ppr p)+  mkHsViewPatPV l a b = do+    p <- checkLPat b+    return $ cL l (PatBuilderPat (ViewPat noExtField a p))+  mkHsAsPatPV l v e = do+    p <- checkLPat e+    return $ cL l (PatBuilderPat (AsPat noExtField v p))+  mkHsLazyPatPV l e = do+    p <- checkLPat e+    return $ cL l (PatBuilderPat (LazyPat noExtField p))+  mkSumOrTuplePV = mkSumOrTuplePat++checkUnboxedStringLitPat :: Located (HsLit GhcPs) -> PV ()+checkUnboxedStringLitPat (dL->L loc lit) =+  case lit of+    HsStringPrim _ _  -- Trac #13260+      -> addFatalError loc (text "Illegal unboxed string literal in pattern:" $$ ppr lit)+    _ -> return ()++mkPatRec ::+  Located (PatBuilder GhcPs) ->+  HsRecFields GhcPs (Located (PatBuilder GhcPs)) ->+  PV (PatBuilder GhcPs)+mkPatRec (unLoc -> PatBuilderVar c) (HsRecFields fs dd)+  | isRdrDataCon (unLoc c)+  = do fs <- mapM checkPatField fs+       return (PatBuilderPat (ConPatIn c (RecCon (HsRecFields fs dd))))+mkPatRec p _ =+  addFatalError (getLoc p) $ text "Not a record constructor:" <+> ppr p++-- | Warn about missing space after bang+warnSpaceAfterBang :: Located RdrName -> SrcSpan -> PV ()+warnSpaceAfterBang (dL->L opLoc op) argLoc = do+    bang_on <- getBit BangPatBit+    when (not bang_on && noSpace && isBangRdr op) $+      addWarning Opt_WarnSpaceAfterBang span msg+    where+      span = combineSrcSpans opLoc argLoc+      noSpace = srcSpanEnd opLoc == srcSpanStart argLoc+      msg = text "Did you forget to enable BangPatterns?" $$+            text "If you mean to bind (!) then perhaps you want" $$+            text "to add a space after the bang for clarity."++{- Note [Ambiguous syntactic categories]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++There are places in the grammar where we do not know whether we are parsing an+expression or a pattern without unlimited lookahead (which we do not have in+'happy'):++View patterns:++    f (Con a b     ) = ...  -- 'Con a b' is a pattern+    f (Con a b -> x) = ...  -- 'Con a b' is an expression++do-notation:++    do { Con a b <- x } -- 'Con a b' is a pattern+    do { Con a b }      -- 'Con a b' is an expression++Guards:++    x | True <- p && q = ...  -- 'True' is a pattern+    x | True           = ...  -- 'True' is an expression++Top-level value/function declarations (FunBind/PatBind):++    f !a         -- TH splice+    f !a = ...   -- function declaration++    Until we encounter the = sign, we don't know if it's a top-level+    TemplateHaskell splice where ! is an infix operator, or if it's a function+    declaration where ! is a strictness annotation.++There are also places in the grammar where we do not know whether we are+parsing an expression or a command:++    proc x -> do { (stuff) -< x }   -- 'stuff' is an expression+    proc x -> do { (stuff) }        -- 'stuff' is a command++    Until we encounter arrow syntax (-<) we don't know whether to parse 'stuff'+    as an expression or a command.++In fact, do-notation is subject to both ambiguities:++    proc x -> do { (stuff) -< x }        -- 'stuff' is an expression+    proc x -> do { (stuff) <- f -< x }   -- 'stuff' is a pattern+    proc x -> do { (stuff) }             -- 'stuff' is a command++There are many possible solutions to this problem. For an overview of the ones+we decided against, see Note [Resolving parsing ambiguities: non-taken alternatives]++The solution that keeps basic definitions (such as HsExpr) clean, keeps the+concerns local to the parser, and does not require duplication of hsSyn types,+or an extra pass over the entire AST, is to parse into an overloaded+parser-validator (a so-called tagless final encoding):++    class DisambECP b where ...+    instance p ~ GhcPs => DisambECP (HsCmd p) where ...+    instance p ~ GhcPs => DisambECP (HsExp p) where ...+    instance p ~ GhcPs => DisambECP (PatBuilder p) where ...++The 'DisambECP' class contains functions to build and validate 'b'. For example,+to add parentheses we have:++  mkHsParPV :: DisambECP b => SrcSpan -> Located b -> PV (Located b)++'mkHsParPV' will wrap the inner value in HsCmdPar for commands, HsPar for+expressions, and 'PatBuilderPar' for patterns (later transformed into ParPat,+see Note [PatBuilder]).++Consider the 'alts' production used to parse case-of alternatives:++  alts :: { Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]) }+    : alts1     { sL1 $1 (fst $ unLoc $1,snd $ unLoc $1) }+    | ';' alts  { sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2) }++We abstract over LHsExpr GhcPs, and it becomes:++  alts :: { forall b. DisambECP b => PV (Located ([AddAnn],[LMatch GhcPs (Located b)])) }+    : alts1     { $1 >>= \ $1 ->+                  return $ sL1 $1 (fst $ unLoc $1,snd $ unLoc $1) }+    | ';' alts  { $2 >>= \ $2 ->+                  return $ sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2) }++Compared to the initial definition, the added bits are:++    forall b. DisambECP b => PV ( ... ) -- in the type signature+    $1 >>= \ $1 -> return $             -- in one reduction rule+    $2 >>= \ $2 -> return $             -- in another reduction rule++The overhead is constant relative to the size of the rest of the reduction+rule, so this approach scales well to large parser productions.++-}+++{- Note [Resolving parsing ambiguities: non-taken alternatives]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Alternative I, extra constructors in GHC.Hs.Expr+------------------------------------------------+We could add extra constructors to HsExpr to represent command-specific and+pattern-specific syntactic constructs. Under this scheme, we parse patterns+and commands as expressions and rejig later.  This is what GHC used to do, and+it polluted 'HsExpr' with irrelevant constructors:++  * for commands: 'HsArrForm', 'HsArrApp'+  * for patterns: 'EWildPat', 'EAsPat', 'EViewPat', 'ELazyPat'++(As of now, we still do that for patterns, but we plan to fix it).++There are several issues with this:++  * The implementation details of parsing are leaking into hsSyn definitions.++  * Code that uses HsExpr has to panic on these impossible-after-parsing cases.++  * HsExpr is arbitrarily selected as the extension basis. Why not extend+    HsCmd or HsPat with extra constructors instead?++  * We cannot handle corner cases. For instance, the following function+    declaration LHS is not a valid expression (see #1087):++      !a + !b = ...++  * There are points in the pipeline where the representation was awfully+    incorrect. For instance,++      f !a b !c = ...++    is first parsed as++      (f ! a b) ! c = ...+++Alternative II, extra constructors in GHC.Hs.Expr for GhcPs+-----------------------------------------------------------+We could address some of the problems with Alternative I by using Trees That+Grow and extending HsExpr only in the GhcPs pass. However, GhcPs corresponds to+the output of parsing, not to its intermediate results, so we wouldn't want+them there either.++Alternative III, extra constructors in GHC.Hs.Expr for GhcPrePs+---------------------------------------------------------------+We could introduce a new pass, GhcPrePs, to keep GhcPs pristine.+Unfortunately, creating a new pass would significantly bloat conversion code+and slow down the compiler by adding another linear-time pass over the entire+AST. For example, in order to build HsExpr GhcPrePs, we would need to build+HsLocalBinds GhcPrePs (as part of HsLet), and we never want HsLocalBinds+GhcPrePs.+++Alternative IV, sum type and bottom-up data flow+------------------------------------------------+Expressions and commands are disjoint. There are no user inputs that could be+interpreted as either an expression or a command depending on outer context:++  5        -- definitely an expression+  x -< y   -- definitely a command++Even though we have both 'HsLam' and 'HsCmdLam', we can look at+the body to disambiguate:++  \p -> 5        -- definitely an expression+  \p -> x -< y   -- definitely a command++This means we could use a bottom-up flow of information to determine+whether we are parsing an expression or a command, using a sum type+for intermediate results:++  Either (LHsExpr GhcPs) (LHsCmd GhcPs)++There are two problems with this:++  * We cannot handle the ambiguity between expressions and+    patterns, which are not disjoint.++  * Bottom-up flow of information leads to poor error messages. Consider++        if ... then 5 else (x -< y)++    Do we report that '5' is not a valid command or that (x -< y) is not a+    valid expression?  It depends on whether we want the entire node to be+    'HsIf' or 'HsCmdIf', and this information flows top-down, from the+    surrounding parsing context (are we in 'proc'?)++Alternative V, backtracking with parser combinators+---------------------------------------------------+One might think we could sidestep the issue entirely by using a backtracking+parser and doing something along the lines of (try pExpr <|> pPat).++Turns out, this wouldn't work very well, as there can be patterns inside+expressions (e.g. via 'case', 'let', 'do') and expressions inside patterns+(e.g. view patterns). To handle this, we would need to backtrack while+backtracking, and unbound levels of backtracking lead to very fragile+performance.++Alternative VI, an intermediate data type+-----------------------------------------+There are common syntactic elements of expressions, commands, and patterns+(e.g. all of them must have balanced parentheses), and we can capture this+common structure in an intermediate data type, Frame:++data Frame+  = FrameVar RdrName+    -- ^ Identifier: Just, map, BS.length+  | FrameTuple [LTupArgFrame] Boxity+    -- ^ Tuple (section): (a,b) (a,b,c) (a,,) (,a,)+  | FrameTySig LFrame (LHsSigWcType GhcPs)+    -- ^ Type signature: x :: ty+  | FramePar (SrcSpan, SrcSpan) LFrame+    -- ^ Parentheses+  | FrameIf LFrame LFrame LFrame+    -- ^ If-expression: if p then x else y+  | FrameCase LFrame [LFrameMatch]+    -- ^ Case-expression: case x of { p1 -> e1; p2 -> e2 }+  | FrameDo (HsStmtContext Name) [LFrameStmt]+    -- ^ Do-expression: do { s1; a <- s2; s3 }+  ...+  | FrameExpr (HsExpr GhcPs)   -- unambiguously an expression+  | FramePat (HsPat GhcPs)     -- unambiguously a pattern+  | FrameCommand (HsCmd GhcPs) -- unambiguously a command++To determine which constructors 'Frame' needs to have, we take the union of+intersections between HsExpr, HsCmd, and HsPat.++The intersection between HsPat and HsExpr:++  HsPat  =  VarPat   | TuplePat      | SigPat        | ParPat   | ...+  HsExpr =  HsVar    | ExplicitTuple | ExprWithTySig | HsPar    | ...+  -------------------------------------------------------------------+  Frame  =  FrameVar | FrameTuple    | FrameTySig    | FramePar | ...++The intersection between HsCmd and HsExpr:++  HsCmd  = HsCmdIf | HsCmdCase | HsCmdDo | HsCmdPar+  HsExpr = HsIf    | HsCase    | HsDo    | HsPar+  ------------------------------------------------+  Frame = FrameIf  | FrameCase | FrameDo | FramePar++The intersection between HsCmd and HsPat:++  HsPat  = ParPat   | ...+  HsCmd  = HsCmdPar | ...+  -----------------------+  Frame  = FramePar | ...++Take the union of each intersection and this yields the final 'Frame' data+type. The problem with this approach is that we end up duplicating a good+portion of hsSyn:++    Frame         for  HsExpr, HsPat, HsCmd+    TupArgFrame   for  HsTupArg+    FrameMatch    for  Match+    FrameStmt     for  StmtLR+    FrameGRHS     for  GRHS+    FrameGRHSs    for  GRHSs+    ...++Alternative VII, a product type+-------------------------------+We could avoid the intermediate representation of Alternative VI by parsing+into a product of interpretations directly:++    -- See Note [Parser-Validator]+    type ExpCmdPat = ( PV (LHsExpr GhcPs)+                     , PV (LHsCmd GhcPs)+                     , PV (LHsPat GhcPs) )++This means that in positions where we do not know whether to produce+expression, a pattern, or a command, we instead produce a parser-validator for+each possible option.++Then, as soon as we have parsed far enough to resolve the ambiguity, we pick+the appropriate component of the product, discarding the rest:++    checkExpOf3 (e, _, _) = e  -- interpret as an expression+    checkCmdOf3 (_, c, _) = c  -- interpret as a command+    checkPatOf3 (_, _, p) = p  -- interpret as a pattern++We can easily define ambiguities between arbitrary subsets of interpretations.+For example, when we know ahead of type that only an expression or a command is+possible, but not a pattern, we can use a smaller type:++    -- See Note [Parser-Validator]+    type ExpCmd = (PV (LHsExpr GhcPs), PV (LHsCmd GhcPs))++    checkExpOf2 (e, _) = e  -- interpret as an expression+    checkCmdOf2 (_, c) = c  -- interpret as a command++However, there is a slight problem with this approach, namely code duplication+in parser productions. Consider the 'alts' production used to parse case-of+alternatives:++  alts :: { Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]) }+    : alts1     { sL1 $1 (fst $ unLoc $1,snd $ unLoc $1) }+    | ';' alts  { sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2) }++Under the new scheme, we have to completely duplicate its type signature and+each reduction rule:++  alts :: { ( PV (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)])) -- as an expression+            , PV (Located ([AddAnn],[LMatch GhcPs (LHsCmd GhcPs)]))  -- as a command+            ) }+    : alts1+        { ( checkExpOf2 $1 >>= \ $1 ->+            return $ sL1 $1 (fst $ unLoc $1,snd $ unLoc $1)+          , checkCmdOf2 $1 >>= \ $1 ->+            return $ sL1 $1 (fst $ unLoc $1,snd $ unLoc $1)+          ) }+    | ';' alts+        { ( checkExpOf2 $2 >>= \ $2 ->+            return $ sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2)+          , checkCmdOf2 $2 >>= \ $2 ->+            return $ sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2)+          ) }++And the same goes for other productions: 'altslist', 'alts1', 'alt', 'alt_rhs',+'ralt', 'gdpats', 'gdpat', 'exp', ... and so on. That is a lot of code!++Alternative VIII, a function from a GADT+----------------------------------------+We could avoid code duplication of the Alternative VII by representing the product+as a function from a GADT:++    data ExpCmdG b where+      ExpG :: ExpCmdG HsExpr+      CmdG :: ExpCmdG HsCmd++    type ExpCmd = forall b. ExpCmdG b -> PV (Located (b GhcPs))++    checkExp :: ExpCmd -> PV (LHsExpr GhcPs)+    checkCmd :: ExpCmd -> PV (LHsCmd GhcPs)+    checkExp f = f ExpG  -- interpret as an expression+    checkCmd f = f CmdG  -- interpret as a command++Consider the 'alts' production used to parse case-of alternatives:++  alts :: { Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]) }+    : alts1     { sL1 $1 (fst $ unLoc $1,snd $ unLoc $1) }+    | ';' alts  { sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2) }++We abstract over LHsExpr, and it becomes:++  alts :: { forall b. ExpCmdG b -> PV (Located ([AddAnn],[LMatch GhcPs (Located (b GhcPs))])) }+    : alts1+        { \tag -> $1 tag >>= \ $1 ->+                  return $ sL1 $1 (fst $ unLoc $1,snd $ unLoc $1) }+    | ';' alts+        { \tag -> $2 tag >>= \ $2 ->+                  return $ sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2) }++Note that 'ExpCmdG' is a singleton type, the value is completely+determined by the type:++  when (b~HsExpr),  tag = ExpG+  when (b~HsCmd),   tag = CmdG++This is a clear indication that we can use a class to pass this value behind+the scenes:++  class    ExpCmdI b      where expCmdG :: ExpCmdG b+  instance ExpCmdI HsExpr where expCmdG = ExpG+  instance ExpCmdI HsCmd  where expCmdG = CmdG++And now the 'alts' production is simplified, as we no longer need to+thread 'tag' explicitly:++  alts :: { forall b. ExpCmdI b => PV (Located ([AddAnn],[LMatch GhcPs (Located (b GhcPs))])) }+    : alts1     { $1 >>= \ $1 ->+                  return $ sL1 $1 (fst $ unLoc $1,snd $ unLoc $1) }+    | ';' alts  { $2 >>= \ $2 ->+                  return $ sLL $1 $> ((mj AnnSemi $1:(fst $ unLoc $2)),snd $ unLoc $2) }++This encoding works well enough, but introduces an extra GADT unlike the+tagless final encoding, and there's no need for this complexity.++-}++{- Note [PatBuilder]+~~~~~~~~~~~~~~~~~~~~+Unlike HsExpr or HsCmd, the Pat type cannot accomodate all intermediate forms,+so we introduce the notion of a PatBuilder.++Consider a pattern like this:++  Con a b c++We parse arguments to "Con" one at a time in the  fexp aexp  parser production,+building the result with mkHsAppPV, so the intermediate forms are:++  1. Con+  2. Con a+  3. Con a b+  4. Con a b c++In 'HsExpr', we have 'HsApp', so the intermediate forms are represented like+this (pseudocode):++  1. "Con"+  2. HsApp "Con" "a"+  3. HsApp (HsApp "Con" "a") "b"+  3. HsApp (HsApp (HsApp "Con" "a") "b") "c"++Similarly, in 'HsCmd' we have 'HsCmdApp'. In 'Pat', however, what we have+instead is 'ConPatIn', which is very awkward to modify and thus unsuitable for+the intermediate forms.++Worse yet, some intermediate forms are not valid patterns at all. For example:++  Con !a !b c++This is parsed as ((Con ! a) ! (b c)) with ! as an infix operator, and then+rearranged in 'splitBang'. But of course, neither (b c) nor (Con ! a) are valid+patterns, so we cannot represent them as Pat.++We also need an intermediate representation to postpone disambiguation between+FunBind and PatBind. Consider:++  a `Con` b = ...+  a `fun` b = ...++How do we know that (a `Con` b) is a PatBind but (a `fun` b) is a FunBind? We+learn this by inspecting an intermediate representation in 'isFunLhs' and+seeing that 'Con' is a data constructor but 'f' is not. We need an intermediate+representation capable of representing both a FunBind and a PatBind, so Pat is+insufficient.++PatBuilder is an extension of Pat that is capable of representing intermediate+parsing results for patterns and function bindings:++  data PatBuilder p+    = PatBuilderPat (Pat p)+    | PatBuilderApp (Located (PatBuilder p)) (Located (PatBuilder p))+    | PatBuilderOpApp (Located (PatBuilder p)) (Located RdrName) (Located (PatBuilder p))+    ...++It can represent any pattern via 'PatBuilderPat', but it also has a variety of+other constructors which were added by following a simple principle: we never+pattern match on the pattern stored inside 'PatBuilderPat'.++For example, in 'splitBang' we need to match on space-separated and+bang-separated patterns, so these are represented with dedicated constructors+'PatBuilderApp' and 'PatBuilderOpApp'.  In 'isFunLhs', we pattern match on+variables, so we have a dedicated 'PatBuilderVar' constructor for this despite+the existence of 'VarPat'.+-}++---------------------------------------------------------------------------+-- Miscellaneous utilities++-- | Check if a fixity is valid. We support bypassing the usual bound checks+-- for some special operators.+checkPrecP+        :: Located (SourceText,Int)             -- ^ precedence+        -> Located (OrdList (Located RdrName))  -- ^ operators+        -> P ()+checkPrecP (dL->L l (_,i)) (dL->L _ ol)+ | 0 <= i, i <= maxPrecedence = pure ()+ | all specialOp ol = pure ()+ | otherwise = addFatalError l (text ("Precedence out of range: " ++ show i))+  where+    specialOp op = unLoc op `elem` [ eqTyCon_RDR+                                   , getRdrName funTyCon ]++mkRecConstrOrUpdate+        :: LHsExpr GhcPs+        -> SrcSpan+        -> ([LHsRecField GhcPs (LHsExpr GhcPs)], Maybe SrcSpan)+        -> PV (HsExpr GhcPs)++mkRecConstrOrUpdate (dL->L l (HsVar _ (dL->L _ c))) _ (fs,dd)+  | isRdrDataCon c+  = return (mkRdrRecordCon (cL l c) (mk_rec_fields fs dd))+mkRecConstrOrUpdate exp _ (fs,dd)+  | Just dd_loc <- dd = addFatalError dd_loc (text "You cannot use `..' in a record update")+  | otherwise = return (mkRdrRecordUpd exp (map (fmap mk_rec_upd_field) fs))++mkRdrRecordUpd :: LHsExpr GhcPs -> [LHsRecUpdField GhcPs] -> HsExpr GhcPs+mkRdrRecordUpd exp flds+  = RecordUpd { rupd_ext  = noExtField+              , rupd_expr = exp+              , rupd_flds = flds }++mkRdrRecordCon :: Located RdrName -> HsRecordBinds GhcPs -> HsExpr GhcPs+mkRdrRecordCon con flds+  = RecordCon { rcon_ext = noExtField, rcon_con_name = con, rcon_flds = flds }++mk_rec_fields :: [LHsRecField id arg] -> Maybe SrcSpan -> HsRecFields id arg+mk_rec_fields fs Nothing = HsRecFields { rec_flds = fs, rec_dotdot = Nothing }+mk_rec_fields fs (Just s)  = HsRecFields { rec_flds = fs+                                     , rec_dotdot = Just (cL s (length fs)) }++mk_rec_upd_field :: HsRecField GhcPs (LHsExpr GhcPs) -> HsRecUpdField GhcPs+mk_rec_upd_field (HsRecField (dL->L loc (FieldOcc _ rdr)) arg pun)+  = HsRecField (L loc (Unambiguous noExtField rdr)) arg pun+mk_rec_upd_field (HsRecField (dL->L _ (XFieldOcc nec)) _ _)+  = noExtCon nec+mk_rec_upd_field (HsRecField _ _ _)+  = panic "mk_rec_upd_field: Impossible Match" -- due to #15884++mkInlinePragma :: SourceText -> (InlineSpec, RuleMatchInfo) -> Maybe Activation+               -> InlinePragma+-- The (Maybe Activation) is because the user can omit+-- the activation spec (and usually does)+mkInlinePragma src (inl, match_info) mb_act+  = InlinePragma { inl_src = src -- Note [Pragma source text] in BasicTypes+                 , inl_inline = inl+                 , inl_sat    = Nothing+                 , inl_act    = act+                 , inl_rule   = match_info }+  where+    act = case mb_act of+            Just act -> act+            Nothing  -> -- No phase specified+                        case inl of+                          NoInline -> NeverActive+                          _other   -> AlwaysActive++-----------------------------------------------------------------------------+-- utilities for foreign declarations++-- construct a foreign import declaration+--+mkImport :: Located CCallConv+         -> Located Safety+         -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs)+         -> P (HsDecl GhcPs)+mkImport cconv safety (L loc (StringLiteral esrc entity), v, ty) =+    case unLoc cconv of+      CCallConv          -> mkCImport+      CApiConv           -> mkCImport+      StdCallConv        -> mkCImport+      PrimCallConv       -> mkOtherImport+      JavaScriptCallConv -> mkOtherImport+  where+    -- Parse a C-like entity string of the following form:+    --   "[static] [chname] [&] [cid]" | "dynamic" | "wrapper"+    -- If 'cid' is missing, the function name 'v' is used instead as symbol+    -- name (cf section 8.5.1 in Haskell 2010 report).+    mkCImport = do+      let e = unpackFS entity+      case parseCImport cconv safety (mkExtName (unLoc v)) e (cL loc esrc) of+        Nothing         -> addFatalError loc (text "Malformed entity string")+        Just importSpec -> returnSpec importSpec++    -- currently, all the other import conventions only support a symbol name in+    -- the entity string. If it is missing, we use the function name instead.+    mkOtherImport = returnSpec importSpec+      where+        entity'    = if nullFS entity+                        then mkExtName (unLoc v)+                        else entity+        funcTarget = CFunction (StaticTarget esrc entity' Nothing True)+        importSpec = CImport cconv safety Nothing funcTarget (cL loc esrc)++    returnSpec spec = return $ ForD noExtField $ ForeignImport+          { fd_i_ext  = noExtField+          , fd_name   = v+          , fd_sig_ty = ty+          , fd_fi     = spec+          }++++-- the string "foo" is ambiguous: either a header or a C identifier.  The+-- C identifier case comes first in the alternatives below, so we pick+-- that one.+parseCImport :: Located CCallConv -> Located Safety -> FastString -> String+             -> Located SourceText+             -> Maybe ForeignImport+parseCImport cconv safety nm str sourceText =+ listToMaybe $ map fst $ filter (null.snd) $+     readP_to_S parse str+ where+   parse = do+       skipSpaces+       r <- choice [+          string "dynamic" >> return (mk Nothing (CFunction DynamicTarget)),+          string "wrapper" >> return (mk Nothing CWrapper),+          do optional (token "static" >> skipSpaces)+             ((mk Nothing <$> cimp nm) ++++              (do h <- munch1 hdr_char+                  skipSpaces+                  mk (Just (Header (SourceText h) (mkFastString h)))+                      <$> cimp nm))+         ]+       skipSpaces+       return r++   token str = do _ <- string str+                  toks <- look+                  case toks of+                      c : _+                       | id_char c -> pfail+                      _            -> return ()++   mk h n = CImport cconv safety h n sourceText++   hdr_char c = not (isSpace c)+   -- header files are filenames, which can contain+   -- pretty much any char (depending on the platform),+   -- so just accept any non-space character+   id_first_char c = isAlpha    c || c == '_'+   id_char       c = isAlphaNum c || c == '_'++   cimp nm = (ReadP.char '&' >> skipSpaces >> CLabel <$> cid)+             +++ (do isFun <- case unLoc cconv of+                               CApiConv ->+                                  option True+                                         (do token "value"+                                             skipSpaces+                                             return False)+                               _ -> return True+                     cid' <- cid+                     return (CFunction (StaticTarget NoSourceText cid'+                                        Nothing isFun)))+          where+            cid = return nm ++++                  (do c  <- satisfy id_first_char+                      cs <-  many (satisfy id_char)+                      return (mkFastString (c:cs)))+++-- construct a foreign export declaration+--+mkExport :: Located CCallConv+         -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs)+         -> P (HsDecl GhcPs)+mkExport (dL->L lc cconv) (dL->L le (StringLiteral esrc entity), v, ty)+ = return $ ForD noExtField $+   ForeignExport { fd_e_ext = noExtField, fd_name = v, fd_sig_ty = ty+                 , fd_fe = CExport (cL lc (CExportStatic esrc entity' cconv))+                                   (cL le esrc) }+  where+    entity' | nullFS entity = mkExtName (unLoc v)+            | otherwise     = entity++-- Supplying the ext_name in a foreign decl is optional; if it+-- isn't there, the Haskell name is assumed. Note that no transformation+-- of the Haskell name is then performed, so if you foreign export (++),+-- it's external name will be "++". Too bad; it's important because we don't+-- want z-encoding (e.g. names with z's in them shouldn't be doubled)+--+mkExtName :: RdrName -> CLabelString+mkExtName rdrNm = mkFastString (occNameString (rdrNameOcc rdrNm))++--------------------------------------------------------------------------------+-- Help with module system imports/exports++data ImpExpSubSpec = ImpExpAbs+                   | ImpExpAll+                   | ImpExpList [Located ImpExpQcSpec]+                   | ImpExpAllWith [Located ImpExpQcSpec]++data ImpExpQcSpec = ImpExpQcName (Located RdrName)+                  | ImpExpQcType (Located RdrName)+                  | ImpExpQcWildcard++mkModuleImpExp :: Located ImpExpQcSpec -> ImpExpSubSpec -> P (IE GhcPs)+mkModuleImpExp (dL->L l specname) subs =+  case subs of+    ImpExpAbs+      | isVarNameSpace (rdrNameSpace name)+                       -> return $ IEVar noExtField (cL l (ieNameFromSpec specname))+      | otherwise      -> IEThingAbs noExtField . cL l <$> nameT+    ImpExpAll          -> IEThingAll noExtField . cL l <$> nameT+    ImpExpList xs      ->+      (\newName -> IEThingWith noExtField (cL l newName)+        NoIEWildcard (wrapped xs) []) <$> nameT+    ImpExpAllWith xs                       ->+      do allowed <- getBit PatternSynonymsBit+         if allowed+          then+            let withs = map unLoc xs+                pos   = maybe NoIEWildcard IEWildcard+                          (findIndex isImpExpQcWildcard withs)+                ies   = wrapped $ filter (not . isImpExpQcWildcard . unLoc) xs+            in (\newName+                        -> IEThingWith noExtField (cL l newName) pos ies [])+               <$> nameT+          else addFatalError l+            (text "Illegal export form (use PatternSynonyms to enable)")+  where+    name = ieNameVal specname+    nameT =+      if isVarNameSpace (rdrNameSpace name)+        then addFatalError l+              (text "Expecting a type constructor but found a variable,"+               <+> quotes (ppr name) <> text "."+              $$ if isSymOcc $ rdrNameOcc name+                   then text "If" <+> quotes (ppr name)+                        <+> text "is a type constructor"+           <+> text "then enable ExplicitNamespaces and use the 'type' keyword."+                   else empty)+        else return $ ieNameFromSpec specname++    ieNameVal (ImpExpQcName ln)  = unLoc ln+    ieNameVal (ImpExpQcType ln)  = unLoc ln+    ieNameVal (ImpExpQcWildcard) = panic "ieNameVal got wildcard"++    ieNameFromSpec (ImpExpQcName ln)  = IEName ln+    ieNameFromSpec (ImpExpQcType ln)  = IEType ln+    ieNameFromSpec (ImpExpQcWildcard) = panic "ieName got wildcard"++    wrapped = map (onHasSrcSpan ieNameFromSpec)++mkTypeImpExp :: Located RdrName   -- TcCls or Var name space+             -> P (Located RdrName)+mkTypeImpExp name =+  do allowed <- getBit ExplicitNamespacesBit+     unless allowed $ addError (getLoc name) $+       text "Illegal keyword 'type' (use ExplicitNamespaces to enable)"+     return (fmap (`setRdrNameSpace` tcClsName) name)++checkImportSpec :: Located [LIE GhcPs] -> P (Located [LIE GhcPs])+checkImportSpec ie@(dL->L _ specs) =+    case [l | (dL->L l (IEThingWith _ _ (IEWildcard _) _ _)) <- specs] of+      [] -> return ie+      (l:_) -> importSpecError l+  where+    importSpecError l =+      addFatalError l+        (text "Illegal import form, this syntax can only be used to bundle"+        $+$ text "pattern synonyms with types in module exports.")++-- In the correct order+mkImpExpSubSpec :: [Located ImpExpQcSpec] -> P ([AddAnn], ImpExpSubSpec)+mkImpExpSubSpec [] = return ([], ImpExpList [])+mkImpExpSubSpec [dL->L _ ImpExpQcWildcard] =+  return ([], ImpExpAll)+mkImpExpSubSpec xs =+  if (any (isImpExpQcWildcard . unLoc) xs)+    then return $ ([], ImpExpAllWith xs)+    else return $ ([], ImpExpList xs)++isImpExpQcWildcard :: ImpExpQcSpec -> Bool+isImpExpQcWildcard ImpExpQcWildcard = True+isImpExpQcWildcard _                = False++-----------------------------------------------------------------------------+-- Warnings and failures++warnPrepositiveQualifiedModule :: SrcSpan -> P ()+warnPrepositiveQualifiedModule span =+  addWarning Opt_WarnPrepositiveQualifiedModule span msg+  where+    msg = text "Found" <+> quotes (text "qualified")+           <+> text "in prepositive position"+       $$ text "Suggested fix: place " <+> quotes (text "qualified")+           <+> text "after the module name instead."++failOpNotEnabledImportQualifiedPost :: SrcSpan -> P ()+failOpNotEnabledImportQualifiedPost loc = addError loc msg+  where+    msg = text "Found" <+> quotes (text "qualified")+          <+> text "in postpositive position. "+      $$ text "To allow this, enable language extension 'ImportQualifiedPost'"++failOpImportQualifiedTwice :: SrcSpan -> P ()+failOpImportQualifiedTwice loc = addError loc msg+  where+    msg = text "Multiple occurences of 'qualified'"++warnStarIsType :: SrcSpan -> P ()+warnStarIsType span = addWarning Opt_WarnStarIsType span msg+  where+    msg =  text "Using" <+> quotes (text "*")+           <+> text "(or its Unicode variant) to mean"+           <+> quotes (text "Data.Kind.Type")+        $$ text "relies on the StarIsType extension, which will become"+        $$ text "deprecated in the future."+        $$ text "Suggested fix: use" <+> quotes (text "Type")+           <+> text "from" <+> quotes (text "Data.Kind") <+> text "instead."++warnStarBndr :: SrcSpan -> P ()+warnStarBndr span = addWarning Opt_WarnStarBinder span msg+  where+    msg =  text "Found binding occurrence of" <+> quotes (text "*")+           <+> text "yet StarIsType is enabled."+        $$ text "NB. To use (or export) this operator in"+           <+> text "modules with StarIsType,"+        $$ text "    including the definition module, you must qualify it."++failOpFewArgs :: Located RdrName -> P a+failOpFewArgs (dL->L loc op) =+  do { star_is_type <- getBit StarIsTypeBit+     ; let msg = too_few $$ starInfo star_is_type op+     ; addFatalError loc msg }+  where+    too_few = text "Operator applied to too few arguments:" <+> ppr op++failOpDocPrev :: SrcSpan -> P a+failOpDocPrev loc = addFatalError loc msg+  where+    msg = text "Unexpected documentation comment."++failOpStrictnessCompound :: Located SrcStrictness -> LHsType GhcPs -> P a+failOpStrictnessCompound (dL->L _ str) (dL->L loc ty) = addFatalError loc msg+  where+    msg = text "Strictness annotation applied to a compound type." $$+          text "Did you mean to add parentheses?" $$+          nest 2 (ppr str <> parens (ppr ty))++failOpStrictnessPosition :: Located SrcStrictness -> P a+failOpStrictnessPosition (dL->L loc _) = addFatalError loc msg+  where+    msg = text "Strictness annotation cannot appear in this position."++-----------------------------------------------------------------------------+-- Misc utils++data PV_Context =+  PV_Context+    { pv_options :: ParserFlags+    , pv_hint :: SDoc  -- See Note [Parser-Validator Hint]+    }++data PV_Accum =+  PV_Accum+    { pv_messages :: DynFlags -> Messages+    , pv_annotations :: [(ApiAnnKey,[SrcSpan])]+    , pv_comment_q :: [Located AnnotationComment]+    , pv_annotations_comments :: [(SrcSpan,[Located AnnotationComment])]+    }++data PV_Result a = PV_Ok PV_Accum a | PV_Failed PV_Accum++-- See Note [Parser-Validator]+newtype PV a = PV { unPV :: PV_Context -> PV_Accum -> PV_Result a }++instance Functor PV where+  fmap = liftM++instance Applicative PV where+  pure a = a `seq` PV (\_ acc -> PV_Ok acc a)+  (<*>) = ap++instance Monad PV where+  m >>= f = PV $ \ctx acc ->+    case unPV m ctx acc of+      PV_Ok acc' a -> unPV (f a) ctx acc'+      PV_Failed acc' -> PV_Failed acc'++runPV :: PV a -> P a+runPV = runPV_msg empty++runPV_msg :: SDoc -> PV a -> P a+runPV_msg msg m =+  P $ \s ->+    let+      pv_ctx = PV_Context+        { pv_options = options s+        , pv_hint = msg }+      pv_acc = PV_Accum+        { pv_messages = messages s+        , pv_annotations = annotations s+        , pv_comment_q = comment_q s+        , pv_annotations_comments = annotations_comments s }+      mkPState acc' =+        s { messages = pv_messages acc'+          , annotations = pv_annotations acc'+          , comment_q = pv_comment_q acc'+          , annotations_comments = pv_annotations_comments acc' }+    in+      case unPV m pv_ctx pv_acc of+        PV_Ok acc' a -> POk (mkPState acc') a+        PV_Failed acc' -> PFailed (mkPState acc')++localPV_msg :: (SDoc -> SDoc) -> PV a -> PV a+localPV_msg f m =+  let modifyHint ctx = ctx{pv_hint = f (pv_hint ctx)} in+  PV (\ctx acc -> unPV m (modifyHint ctx) acc)++instance MonadP PV where+  addError srcspan msg =+    PV $ \ctx acc@PV_Accum{pv_messages=m} ->+      let msg' = msg $$ pv_hint ctx in+      PV_Ok acc{pv_messages=appendError srcspan msg' m} ()+  addWarning option srcspan warning =+    PV $ \PV_Context{pv_options=o} acc@PV_Accum{pv_messages=m} ->+      PV_Ok acc{pv_messages=appendWarning o option srcspan warning m} ()+  addFatalError srcspan msg =+    addError srcspan msg >> PV (const PV_Failed)+  getBit ext =+    PV $ \ctx acc ->+      let b = ext `xtest` pExtsBitmap (pv_options ctx) in+      PV_Ok acc $! b+  addAnnotation l a v =+    PV $ \_ acc ->+      let+        (comment_q', new_ann_comments) = allocateComments l (pv_comment_q acc)+        annotations_comments' = new_ann_comments ++ pv_annotations_comments acc+        annotations' = ((l,a), [v]) : pv_annotations acc+        acc' = acc+          { pv_annotations = annotations'+          , pv_comment_q = comment_q'+          , pv_annotations_comments = annotations_comments' }+      in+        PV_Ok acc' ()++{- Note [Parser-Validator]+~~~~~~~~~~~~~~~~~~~~~~~~~~++When resolving ambiguities, we need to postpone failure to make a choice later.+For example, if we have ambiguity between some A and B, our parser could be++  abParser :: P (Maybe A, Maybe B)++This way we can represent four possible outcomes of parsing:++    (Just a, Nothing)       -- definitely A+    (Nothing, Just b)       -- definitely B+    (Just a, Just b)        -- either A or B+    (Nothing, Nothing)      -- neither A nor B++However, if we want to report informative parse errors, accumulate warnings,+and add API annotations, we are better off using 'P' instead of 'Maybe':++  abParser :: P (P A, P B)++So we have an outer layer of P that consumes the input and builds the inner+layer, which validates the input.++For clarity, we introduce the notion of a parser-validator: a parser that does+not consume any input, but may fail or use other effects. Thus we have:++  abParser :: P (PV A, PV B)++-}++{- Note [Parser-Validator Hint]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A PV computation is parametrized by a hint for error messages, which can be set+depending on validation context. We use this in checkPattern to fix #984.++Consider this example, where the user has forgotten a 'do':++  f _ = do+    x <- computation+    case () of+      _ ->+        result <- computation+        case () of () -> undefined++GHC parses it as follows:++  f _ = do+    x <- computation+    (case () of+      _ ->+        result) <- computation+        case () of () -> undefined++Note that this fragment is parsed as a pattern:++  case () of+    _ ->+      result++We attempt to detect such cases and add a hint to the error messages:++  T984.hs:6:9:+    Parse error in pattern: case () of { _ -> result }+    Possibly caused by a missing 'do'?++The "Possibly caused by a missing 'do'?" suggestion is the hint that is passed+as the 'pv_hint' field 'PV_Context'. When validating in a context other than+'bindpat' (a pattern to the left of <-), we set the hint to 'empty' and it has+no effect on the error messages.++-}++-- | Hint about bang patterns, assuming @BangPatterns@ is off.+hintBangPat :: SrcSpan -> PatBuilder GhcPs -> PV ()+hintBangPat span e = do+    bang_on <- getBit BangPatBit+    unless bang_on $+      addFatalError span+        (text "Illegal bang-pattern (use BangPatterns):" $$ ppr e)++data SumOrTuple b+  = Sum ConTag Arity (Located b)+  | Tuple [Located (Maybe (Located b))]++pprSumOrTuple :: Outputable b => Boxity -> SumOrTuple b -> SDoc+pprSumOrTuple boxity = \case+    Sum alt arity e ->+      parOpen <+> ppr_bars (alt - 1) <+> ppr e <+> ppr_bars (arity - alt)+              <+> parClose+    Tuple xs ->+      parOpen <> (fcat . punctuate comma $ map (maybe empty ppr . unLoc) xs)+              <> parClose+  where+    ppr_bars n = hsep (replicate n (Outputable.char '|'))+    (parOpen, parClose) =+      case boxity of+        Boxed -> (text "(", text ")")+        Unboxed -> (text "(#", text "#)")++mkSumOrTupleExpr :: SrcSpan -> Boxity -> SumOrTuple (HsExpr GhcPs) -> PV (LHsExpr GhcPs)++-- Tuple+mkSumOrTupleExpr l boxity (Tuple es) =+    return $ cL l (ExplicitTuple noExtField (map toTupArg es) boxity)+  where+    toTupArg :: Located (Maybe (LHsExpr GhcPs)) -> LHsTupArg GhcPs+    toTupArg = mapLoc (maybe missingTupArg (Present noExtField))++-- Sum+mkSumOrTupleExpr l Unboxed (Sum alt arity e) =+    return $ cL l (ExplicitSum noExtField alt arity e)+mkSumOrTupleExpr l Boxed a@Sum{} =+    addFatalError l (hang (text "Boxed sums not supported:") 2+                      (pprSumOrTuple Boxed a))++mkSumOrTuplePat :: SrcSpan -> Boxity -> SumOrTuple (PatBuilder GhcPs) -> PV (Located (PatBuilder GhcPs))++-- Tuple+mkSumOrTuplePat l boxity (Tuple ps) = do+  ps' <- traverse toTupPat ps+  return $ cL l (PatBuilderPat (TuplePat noExtField ps' boxity))+  where+    toTupPat :: Located (Maybe (Located (PatBuilder GhcPs))) -> PV (LPat GhcPs)+    toTupPat (dL -> L l p) = case p of+      Nothing -> addFatalError l (text "Tuple section in pattern context")+      Just p' -> checkLPat p'++-- Sum+mkSumOrTuplePat l Unboxed (Sum alt arity p) = do+   p' <- checkLPat p+   return $ cL l (PatBuilderPat (SumPat noExtField p' alt arity))+mkSumOrTuplePat l Boxed a@Sum{} =+    addFatalError l (hang (text "Boxed sums not supported:") 2+                      (pprSumOrTuple Boxed a))++mkLHsOpTy :: LHsType GhcPs -> Located RdrName -> LHsType GhcPs -> LHsType GhcPs+mkLHsOpTy x op y =+  let loc = getLoc x `combineSrcSpans` getLoc op `combineSrcSpans` getLoc y+  in cL loc (mkHsOpTy x op y)++mkLHsDocTy :: LHsType GhcPs -> LHsDocString -> LHsType GhcPs+mkLHsDocTy t doc =+  let loc = getLoc t `combineSrcSpans` getLoc doc+  in cL loc (HsDocTy noExtField t doc)  mkLHsDocTyMaybe :: LHsType GhcPs -> Maybe LHsDocString -> LHsType GhcPs mkLHsDocTyMaybe t = maybe t (mkLHsDocTy t)
parser/cutils.c view
@@ -3,15 +3,9 @@ places in the GHC library. */ -#include "Rts.h"--#include "HsFFI.h"--#include <string.h>+#include <Rts.h> -#if defined(HAVE_UNISTD_H)-#include <unistd.h>-#endif+#include <HsFFI.h>  void enableTimingStats( void )       /* called from the driver */
parser/cutils.h view
@@ -4,7 +4,7 @@  *  * -------------------------------------------------------------------------- */ -#include "HsFFI.h"+#include <HsFFI.h>  void enableTimingStats( void ); void setHeapSize( HsInt size );
prelude/PrelInfo.hs view
@@ -215,7 +215,8 @@ knownNamesInfo = unitNameEnv coercibleTyConName $     vcat [ text "Coercible is a special constraint with custom solving rules."          , text "It is not a class."-         , text "Please see section 9.14.4 of the user's guide for details." ]+         , text "Please see section `The Coercible constraint`"+         , text "of the user's guide for details." ]  {- We let a lot of "non-standard" values be visible, so that we can make
prelude/PrelNames.hs view
@@ -360,7 +360,7 @@         -- Others         otherwiseIdName, inlineIdName,         eqStringName, assertName, breakpointName, breakpointCondName,-        breakpointAutoName,  opaqueTyConName,+        opaqueTyConName,         assertErrorName, traceName,         printName, fstName, sndName,         dollarName,@@ -501,10 +501,10 @@     gHC_CLASSES, gHC_PRIMOPWRAPPERS, gHC_BASE, gHC_ENUM,     gHC_GHCI, gHC_GHCI_HELPERS, gHC_CSTRING,     gHC_SHOW, gHC_READ, gHC_NUM, gHC_MAYBE, gHC_INTEGER_TYPE, gHC_NATURAL,-    gHC_LIST, gHC_TUPLE, dATA_TUPLE, dATA_EITHER, dATA_STRING,+    gHC_LIST, gHC_TUPLE, dATA_TUPLE, dATA_EITHER, dATA_LIST, dATA_STRING,     dATA_FOLDABLE, dATA_TRAVERSABLE,     gHC_CONC, gHC_IO, gHC_IO_Exception,-    gHC_ST, gHC_ARR, gHC_STABLE, gHC_PTR, gHC_ERR, gHC_REAL,+    gHC_ST, gHC_IX, gHC_STABLE, gHC_PTR, gHC_ERR, gHC_REAL,     gHC_FLOAT, gHC_TOP_HANDLER, sYSTEM_IO, dYNAMIC,     tYPEABLE, tYPEABLE_INTERNAL, gENERICS,     rEAD_PREC, lEX, gHC_INT, gHC_WORD, mONAD, mONAD_FIX, mONAD_ZIP, mONAD_FAIL,@@ -533,6 +533,7 @@ gHC_TUPLE       = mkPrimModule (fsLit "GHC.Tuple") dATA_TUPLE      = mkBaseModule (fsLit "Data.Tuple") dATA_EITHER     = mkBaseModule (fsLit "Data.Either")+dATA_LIST       = mkBaseModule (fsLit "Data.List") dATA_STRING     = mkBaseModule (fsLit "Data.String") dATA_FOLDABLE   = mkBaseModule (fsLit "Data.Foldable") dATA_TRAVERSABLE= mkBaseModule (fsLit "Data.Traversable")@@ -540,7 +541,7 @@ gHC_IO          = mkBaseModule (fsLit "GHC.IO") gHC_IO_Exception = mkBaseModule (fsLit "GHC.IO.Exception") gHC_ST          = mkBaseModule (fsLit "GHC.ST")-gHC_ARR         = mkBaseModule (fsLit "GHC.Arr")+gHC_IX          = mkBaseModule (fsLit "GHC.Ix") gHC_STABLE      = mkBaseModule (fsLit "GHC.Stable") gHC_PTR         = mkBaseModule (fsLit "GHC.Ptr") gHC_ERR         = mkBaseModule (fsLit "GHC.Err")@@ -750,11 +751,11 @@ pred_RDR                = varQual_RDR gHC_ENUM (fsLit "pred") minBound_RDR            = varQual_RDR gHC_ENUM (fsLit "minBound") maxBound_RDR            = varQual_RDR gHC_ENUM (fsLit "maxBound")-range_RDR               = varQual_RDR gHC_ARR (fsLit "range")-inRange_RDR             = varQual_RDR gHC_ARR (fsLit "inRange")-index_RDR               = varQual_RDR gHC_ARR (fsLit "index")-unsafeIndex_RDR         = varQual_RDR gHC_ARR (fsLit "unsafeIndex")-unsafeRangeSize_RDR     = varQual_RDR gHC_ARR (fsLit "unsafeRangeSize")+range_RDR               = varQual_RDR gHC_IX (fsLit "range")+inRange_RDR             = varQual_RDR gHC_IX (fsLit "inRange")+index_RDR               = varQual_RDR gHC_IX (fsLit "index")+unsafeIndex_RDR         = varQual_RDR gHC_IX (fsLit "unsafeIndex")+unsafeRangeSize_RDR     = varQual_RDR gHC_IX (fsLit "unsafeRangeSize")  readList_RDR, readListDefault_RDR, readListPrec_RDR, readListPrecDefault_RDR,     readPrec_RDR, parens_RDR, choose_RDR, lexP_RDR, expectP_RDR :: RdrName@@ -1078,7 +1079,7 @@ -- Random PrelBase functions fromStringName, otherwiseIdName, foldrName, buildName, augmentName,     mapName, appendName, assertName,-    breakpointName, breakpointCondName, breakpointAutoName,+    breakpointName, breakpointCondName,     opaqueTyConName, dollarName :: Name dollarName        = varQual gHC_BASE (fsLit "$")          dollarIdKey otherwiseIdName   = varQual gHC_BASE (fsLit "otherwise")  otherwiseIdKey@@ -1090,29 +1091,9 @@ assertName        = varQual gHC_BASE (fsLit "assert")     assertIdKey breakpointName    = varQual gHC_BASE (fsLit "breakpoint") breakpointIdKey breakpointCondName= varQual gHC_BASE (fsLit "breakpointCond") breakpointCondIdKey-breakpointAutoName= varQual gHC_BASE (fsLit "breakpointAuto") breakpointAutoIdKey opaqueTyConName   = tcQual  gHC_BASE (fsLit "Opaque")     opaqueTyConKey fromStringName = varQual dATA_STRING (fsLit "fromString") fromStringClassOpKey -breakpointJumpName :: Name-breakpointJumpName-    = mkInternalName-        breakpointJumpIdKey-        (mkOccNameFS varName (fsLit "breakpointJump"))-        noSrcSpan-breakpointCondJumpName :: Name-breakpointCondJumpName-    = mkInternalName-        breakpointCondJumpIdKey-        (mkOccNameFS varName (fsLit "breakpointCondJump"))-        noSrcSpan-breakpointAutoJumpName :: Name-breakpointAutoJumpName-    = mkInternalName-        breakpointAutoJumpIdKey-        (mkOccNameFS varName (fsLit "breakpointAutoJump"))-        noSrcSpan- -- PrelTup fstName, sndName :: Name fstName           = varQual dATA_TUPLE (fsLit "fst") fstIdKey@@ -1234,7 +1215,7 @@  -- Class Ix ixClassName :: Name-ixClassName = clsQual gHC_ARR (fsLit "Ix") ixClassKey+ixClassName = clsQual gHC_IX (fsLit "Ix") ixClassKey  -- Typeable representation types trModuleTyConName@@ -2044,7 +2025,7 @@ runtimeRepSimpleDataConKeys, unliftedSimpleRepDataConKeys, unliftedRepDataConKeys :: [Unique] liftedRepDataConKey :: Unique runtimeRepSimpleDataConKeys@(liftedRepDataConKey : unliftedSimpleRepDataConKeys)-  = map mkPreludeDataConUnique [74..86]+  = map mkPreludeDataConUnique [74..88]  unliftedRepDataConKeys = vecRepDataConKey :                          tupleRepDataConKey :@@ -2054,29 +2035,29 @@ -- See Note [Wiring in RuntimeRep] in TysWiredIn -- VecCount vecCountDataConKeys :: [Unique]-vecCountDataConKeys = map mkPreludeDataConUnique [87..92]+vecCountDataConKeys = map mkPreludeDataConUnique [89..94]  -- See Note [Wiring in RuntimeRep] in TysWiredIn -- VecElem vecElemDataConKeys :: [Unique]-vecElemDataConKeys = map mkPreludeDataConUnique [93..102]+vecElemDataConKeys = map mkPreludeDataConUnique [95..104]  -- Typeable things kindRepTyConAppDataConKey, kindRepVarDataConKey, kindRepAppDataConKey,     kindRepFunDataConKey, kindRepTYPEDataConKey,     kindRepTypeLitSDataConKey, kindRepTypeLitDDataConKey     :: Unique-kindRepTyConAppDataConKey = mkPreludeDataConUnique 103-kindRepVarDataConKey      = mkPreludeDataConUnique 104-kindRepAppDataConKey      = mkPreludeDataConUnique 105-kindRepFunDataConKey      = mkPreludeDataConUnique 106-kindRepTYPEDataConKey     = mkPreludeDataConUnique 107-kindRepTypeLitSDataConKey = mkPreludeDataConUnique 108-kindRepTypeLitDDataConKey = mkPreludeDataConUnique 109+kindRepTyConAppDataConKey = mkPreludeDataConUnique 105+kindRepVarDataConKey      = mkPreludeDataConUnique 106+kindRepAppDataConKey      = mkPreludeDataConUnique 107+kindRepFunDataConKey      = mkPreludeDataConUnique 108+kindRepTYPEDataConKey     = mkPreludeDataConUnique 109+kindRepTypeLitSDataConKey = mkPreludeDataConUnique 110+kindRepTypeLitDDataConKey = mkPreludeDataConUnique 111  typeLitSymbolDataConKey, typeLitNatDataConKey :: Unique-typeLitSymbolDataConKey   = mkPreludeDataConUnique 110-typeLitNatDataConKey      = mkPreludeDataConUnique 111+typeLitSymbolDataConKey   = mkPreludeDataConUnique 112+typeLitNatDataConKey      = mkPreludeDataConUnique 113   ---------------- Template Haskell -------------------@@ -2221,15 +2202,9 @@ traceKey :: Unique traceKey                      = mkPreludeMiscIdUnique 108 -breakpointIdKey, breakpointCondIdKey, breakpointAutoIdKey,-    breakpointJumpIdKey, breakpointCondJumpIdKey,-    breakpointAutoJumpIdKey :: Unique+breakpointIdKey, breakpointCondIdKey :: Unique breakpointIdKey               = mkPreludeMiscIdUnique 110 breakpointCondIdKey           = mkPreludeMiscIdUnique 111-breakpointAutoIdKey           = mkPreludeMiscIdUnique 112-breakpointJumpIdKey           = mkPreludeMiscIdUnique 113-breakpointCondJumpIdKey       = mkPreludeMiscIdUnique 114-breakpointAutoJumpIdKey       = mkPreludeMiscIdUnique 115  inlineIdKey, noinlineIdKey :: Unique inlineIdKey                   = mkPreludeMiscIdUnique 120
prelude/PrelRules.hs view
@@ -12,7 +12,8 @@    (i1 + i2) only if it results in a valid Float. -} -{-# LANGUAGE CPP, RankNTypes, PatternSynonyms, ViewPatterns, RecordWildCards #-}+{-# LANGUAGE CPP, RankNTypes, PatternSynonyms, ViewPatterns, RecordWildCards,+    DeriveFunctor #-} {-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-}  module PrelRules@@ -23,7 +24,6 @@ where  #include "HsVersions.h"-#include "MachDeps.h"  import GhcPrelude @@ -41,7 +41,7 @@                    , isNewTyCon, unwrapNewTyCon_maybe, tyConDataCons                    , tyConFamilySize ) import DataCon     ( dataConTagZ, dataConTyCon, dataConWorkId )-import CoreUtils   ( cheapEqExpr, exprIsHNF, exprType )+import CoreUtils   ( cheapEqExpr, cheapEqExpr', exprIsHNF, exprType, stripTicksTop, stripTicksTopT, mkTicks ) import CoreUnfold  ( exprIsConApp_maybe ) import Type import OccName     ( occNameFS )@@ -52,7 +52,7 @@ import FastString import BasicTypes import DynFlags-import Platform+import GHC.Platform import Util import Coercion     (mkUnbranchedAxInstCo,mkSymCo,Role(..)) @@ -344,7 +344,7 @@   case x of     3.8#::Float# -> this     _            -> that-See Trac #9238.  Reason: comparing floating-point values for equality+See #9238.  Reason: comparing floating-point values for equality delicate, and we don't want to implement that delicacy in the code for case expressions.  So we make it an invariant of Core that a case expression never scrutinises a Float# or Double#.@@ -432,10 +432,10 @@ -- Shift right, putting zeros in rather than sign-propagating as Bits.shiftR would do -- Do this by converting to Word and back.  Obviously this won't work for big -- values, but its ok as we use it here-shiftRightLogical dflags x n-  | wordSizeInBits dflags == 32 = fromIntegral (fromInteger x `shiftR` n :: Word32)-  | wordSizeInBits dflags == 64 = fromIntegral (fromInteger x `shiftR` n :: Word64)-  | otherwise = panic "shiftRightLogical: unsupported word size"+shiftRightLogical dflags x n =+    case platformWordSize (targetPlatform dflags) of+      PW4 -> fromIntegral (fromInteger x `shiftR` n :: Word32)+      PW8 -> fromIntegral (fromInteger x `shiftR` n :: Word64)  -------------------------- retLit :: (DynFlags -> Literal) -> RuleM CoreExpr@@ -488,7 +488,7 @@            _ -> mzero }  wordSizeInBits :: DynFlags -> Integer-wordSizeInBits dflags = toInteger (platformWordSize (targetPlatform dflags) `shiftL` 3)+wordSizeInBits dflags = toInteger (platformWordSizeInBits (targetPlatform dflags))  -------------------------- floatOp2 :: (Rational -> Rational -> Rational)@@ -758,9 +758,7 @@  newtype RuleM r = RuleM   { runRuleM :: DynFlags -> InScopeEnv -> [CoreExpr] -> Maybe r }--instance Functor RuleM where-    fmap = liftM+  deriving (Functor)  instance Applicative RuleM where     pure x = RuleM $ \_ _ _ -> Just x@@ -803,11 +801,12 @@ removeOp32 :: RuleM CoreExpr removeOp32 = do   dflags <- getDynFlags-  if wordSizeInBits dflags == 32-  then do-    [e] <- getArgs-    return e-  else mzero+  case platformWordSize (targetPlatform dflags) of+    PW4 -> do+      [e] <- getArgs+      return e+    PW8 ->+      mzero  getArgs :: RuleM [CoreExpr] getArgs = RuleM $ \_ _ args -> Just args@@ -1061,9 +1060,9 @@       dflags <- getDynFlags       [_, val_arg] <- getArgs       in_scope <- getInScopeEnv-      (dc,_,_) <- liftMaybe $ exprIsConApp_maybe in_scope val_arg+      (_,floats, dc,_,_) <- liftMaybe $ exprIsConApp_maybe in_scope val_arg       ASSERT( not (isNewTyCon (dataConTyCon dc)) ) return ()-      return $ mkIntVal dflags (toInteger (dataConTagZ dc))+      return $ wrapFloats floats (mkIntVal dflags (toInteger (dataConTagZ dc)))  {- Note [dataToTag# magic] ~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1079,7 +1078,7 @@   regardless of the evaluated-ness of their argument.   See CoreUtils Note [exprOkForSpeculation and SeqOp/DataToTagOp] -* There is a special case for DataToTagOp in StgCmmExpr.cgExpr,+* There is a special case for DataToTagOp in GHC.StgToCmm.Expr.cgExpr,   that evaluates its argument and then extracts the tag from   the returned value. @@ -1092,7 +1091,7 @@      case e of <transformed alts>   by PrelRules.caseRules; see Note [caseRules for dataToTag] -See Trac #15696 for a long saga.+See #15696 for a long saga.   ************************************************************************@@ -1125,7 +1124,7 @@   why not instead say this?       case x of { DEFAULT -> blah) -  Reason (see Trac #5129): if we saw+  Reason (see #5129): if we saw     catch# (\s -> case x of { DEFAULT -> raiseIO# exn s }) handler    then we'd drop the 'case x' because the body of the case is bottom@@ -1146,7 +1145,7 @@  - PrelRules.seqRule: eliminate (seq# <whnf> s) -- StgCmmExpr.cgExpr, and cgCase: special case for seq#+- GHC.StgToCmm.Expr.cgExpr, and cgCase: special case for seq#  - CoreUtils.exprOkForSpeculation;   see Note [exprOkForSpeculation and SeqOp/DataToTagOp] in CoreUtils@@ -1387,20 +1386,27 @@         [ Type ty1         , lit1         , c1-        , Var unpk `App` Type ty2-                   `App` lit2-                   `App` c2-                   `App` n+        , e2         ]-  | unpk `hasKey` unpackCStringFoldrIdKey &&-    c1 `cheapEqExpr` c2+  -- N.B. Ensure that we strip off any ticks (e.g. source notes) from the+  -- `lit` and `c` arguments, lest this may fail to fire when building with+  -- -g3. See #16740.+  | (strTicks, Var unpk `App` Type ty2+                        `App` lit2+                        `App` c2+                        `App` n) <- stripTicksTop tickishFloatable e2+  , unpk `hasKey` unpackCStringFoldrIdKey+  , cheapEqExpr' tickishFloatable c1 c2+  , (c1Ticks, c1') <- stripTicksTop tickishFloatable c1+  , c2Ticks <- stripTicksTopT tickishFloatable c2   , Just (LitString s1) <- exprIsLiteral_maybe id_unf lit1   , Just (LitString s2) <- exprIsLiteral_maybe id_unf lit2   = ASSERT( ty1 `eqType` ty2 )-    Just (Var unpk `App` Type ty1-                   `App` Lit (LitString (s1 `BS.append` s2))-                   `App` c1-                   `App` n)+    Just $ mkTicks strTicks+         $ Var unpk `App` Type ty1+                    `App` Lit (LitString (s1 `BS.append` s2))+                    `App` mkTicks (c1Ticks ++ c2Ticks) c1'+                    `App` n  match_append_lit _ _ _ _ = Nothing @@ -1533,7 +1539,7 @@ For most types the bitInteger operation can be implemented in terms of shifts. The integer-gmp package, however, can do substantially better than this if allowed to provide its own implementation. However, in so doing it previously lost-constant-folding (see Trac #8832). The bitInteger rule above provides constant folding+constant-folding (see #8832). The bitInteger rule above provides constant folding specifically for this function.  There is, however, a bit of trickiness here when it comes to ranges. While the@@ -1553,7 +1559,7 @@     -- Make sure x is small enough to yield a decently small iteger     -- Attempting to construct the Integer for     --    (bitInteger 9223372036854775807#)-    -- would be a bad idea (Trac #14959)+    -- would be a bad idea (#14959)   , let x_int = fromIntegral x :: Int   = case splitFunTy_maybe (idType fn) of     Just (_, integerTy)@@ -1639,7 +1645,7 @@   , y >= 0   , y <= 4   -- Restrict constant-folding of shifts on Integers, somewhat              -- arbitrary.  We can get huge shifts in inaccessible code-             -- (Trac #15673)+             -- (#15673)   = Just (Lit (mkLitInteger (x `binop` fromIntegral y) i)) match_Integer_shift_op _ _ _ _ _ = Nothing @@ -2136,7 +2142,7 @@     True  -> e2 and it is nice to then get rid of the tagToEnum. -Beware (Trac #14768): avoid the temptation to map constructor 0 to+Beware (#14768): avoid the temptation to map constructor 0 to DEFAULT, in the hope of getting this   case (x ># y) of     DEFAULT -> e1@@ -2190,5 +2196,5 @@ Hence caseRules returns (AltCon -> Maybe AltCon), with Nothing indicating an alternative that is unreachable. -You may wonder how this can happen: check out Trac #15436.+You may wonder how this can happen: check out #15436. -}
prelude/PrimOp.hs view
@@ -6,9 +6,6 @@  {-# LANGUAGE CPP #-} --- The default is a bit too low for the quite large primOpInfo definition-{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}- module PrimOp (         PrimOp(..), PrimOpVecCat(..), allThePrimOps,         primOpType, primOpSig,@@ -349,7 +346,7 @@   * NB1: if you inline unsafePerformIO, you may end up with    side-effecting ops whose 'state' output is discarded.-   And programmers may do that by hand; see Trac #9390.+   And programmers may do that by hand; see #9390.    That is why we (conservatively) do not discard write-effecting    primops even if both their state and result is discarded. @@ -393,13 +390,13 @@   Arguably you should be able to discard this, since the   returned stat token is not used, but that relies on NEVER   inlining unsafePerformIO, and programmers sometimes write-  this kind of stuff by hand (Trac #9390).  So we (conservatively)+  this kind of stuff by hand (#9390).  So we (conservatively)   never discard a has_side_effects primop.    However, it's fine to discard a can_fail primop.  For example      case (indexIntArray# a i) of _ -> True   We can discard indexIntArray#; it has can_fail, but not-  has_side_effects; see Trac #5658 which was all about this.+  has_side_effects; see #5658 which was all about this.   Notice that indexIntArray# is (in a more general handling of   effects) read effect, but we don't care about that here, and   treat read effects as *not* has_side_effects.@@ -450,7 +447,7 @@   (All these bindings are boxed.)  If we inline p at its two call   sites, we get a catastrophe: because the read is performed once when   s' is demanded, and once when 'r' is demanded, which may be much-  later.  Utterly wrong.  Trac #3207 is real example of this happening.+  later.  Utterly wrong.  #3207 is real example of this happening.    However, it's fine to duplicate a can_fail primop.  That is really   the only difference between can_fail and has_side_effects.@@ -568,7 +565,7 @@     Compare _occ ty -> compare_fun_ty ty      GenPrimOp _occ tyvars arg_tys res_ty ->-        mkSpecForAllTys tyvars (mkFunTys arg_tys res_ty)+        mkSpecForAllTys tyvars (mkVisFunTys arg_tys res_ty)  primOpOcc :: PrimOp -> OccName primOpOcc op = case primOpInfo op of@@ -676,9 +673,9 @@ -- Utils:  dyadic_fun_ty, monadic_fun_ty, compare_fun_ty :: Type -> Type-dyadic_fun_ty  ty = mkFunTys [ty, ty] ty-monadic_fun_ty ty = mkFunTy  ty ty-compare_fun_ty ty = mkFunTys [ty, ty] intPrimTy+dyadic_fun_ty  ty = mkVisFunTys [ty, ty] ty+monadic_fun_ty ty = mkVisFunTy  ty ty+compare_fun_ty ty = mkVisFunTys [ty, ty] intPrimTy  -- Output stuff: 
prelude/THNames.hs view
@@ -27,7 +27,7 @@ -- Should stay in sync with the import list of DsMeta  templateHaskellNames = [-    returnQName, bindQName, sequenceQName, newNameName, liftName,+    returnQName, bindQName, sequenceQName, newNameName, liftName, liftTypedName,     mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName, mkNameLName,     mkNameSName,     liftStringName,@@ -68,7 +68,7 @@     -- Dec     funDName, valDName, dataDName, newtypeDName, tySynDName,     classDName, instanceWithOverlapDName,-    standaloneDerivWithStrategyDName, sigDName, forImpDName,+    standaloneDerivWithStrategyDName, sigDName, kiSigDName, forImpDName,     pragInlDName, pragSpecDName, pragSpecInlDName, pragSpecInstDName,     pragRuleDName, pragCompleteDName, pragAnnDName, defaultSigDName,     dataFamilyDName, openTypeFamilyDName, closedTypeFamilyDName,@@ -96,9 +96,9 @@     -- PatSynArgs (for pattern synonyms)     prefixPatSynName, infixPatSynName, recordPatSynName,     -- Type-    forallTName, varTName, conTName, infixTName, appTName, appKindTName,-    equalityTName, tupleTName, unboxedTupleTName, unboxedSumTName,-    arrowTName, listTName, sigTName, litTName,+    forallTName, forallVisTName, varTName, conTName, infixTName, appTName,+    appKindTName, equalityTName, tupleTName, unboxedTupleTName,+    unboxedSumTName, arrowTName, listTName, sigTName, litTName,     promotedTName, promotedTupleTName, promotedNilTName, promotedConsTName,     wildCardTName, implicitParamTName,     -- TyLit@@ -206,7 +206,7 @@ returnQName, bindQName, sequenceQName, newNameName, liftName,     mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName,     mkNameLName, mkNameSName, liftStringName, unTypeName, unTypeQName,-    unsafeTExpCoerceName :: Name+    unsafeTExpCoerceName, liftTypedName :: Name returnQName    = thFun (fsLit "returnQ")   returnQIdKey bindQName      = thFun (fsLit "bindQ")     bindQIdKey sequenceQName  = thFun (fsLit "sequenceQ") sequenceQIdKey@@ -222,6 +222,7 @@ unTypeName     = thFun (fsLit "unType")     unTypeIdKey unTypeQName    = thFun (fsLit "unTypeQ")    unTypeQIdKey unsafeTExpCoerceName = thFun (fsLit "unsafeTExpCoerce") unsafeTExpCoerceIdKey+liftTypedName = thFun (fsLit "liftTyped") liftTypedIdKey   -------------------- TH.Lib -----------------------@@ -340,7 +341,7 @@  -- data Dec = ... funDName, valDName, dataDName, newtypeDName, tySynDName, classDName,-    instanceWithOverlapDName, sigDName, forImpDName, pragInlDName,+    instanceWithOverlapDName, sigDName, kiSigDName, forImpDName, pragInlDName,     pragSpecDName, pragSpecInlDName, pragSpecInstDName, pragRuleDName,     pragAnnDName, standaloneDerivWithStrategyDName, defaultSigDName,     dataInstDName, newtypeInstDName, tySynInstDName, dataFamilyDName,@@ -356,6 +357,7 @@ instanceWithOverlapDName         = libFun (fsLit "instanceWithOverlapD")         instanceWithOverlapDIdKey standaloneDerivWithStrategyDName = libFun (fsLit "standaloneDerivWithStrategyD") standaloneDerivWithStrategyDIdKey sigDName                         = libFun (fsLit "sigD")                         sigDIdKey+kiSigDName                       = libFun (fsLit "kiSigD")                       kiSigDIdKey defaultSigDName                  = libFun (fsLit "defaultSigD")                  defaultSigDIdKey forImpDName                      = libFun (fsLit "forImpD")                      forImpDIdKey pragInlDName                     = libFun (fsLit "pragInlD")                     pragInlDIdKey@@ -429,12 +431,13 @@ recordPatSynName = libFun (fsLit "recordPatSyn") recordPatSynIdKey  -- data Type = ...-forallTName, varTName, conTName, infixTName, tupleTName, unboxedTupleTName,-    unboxedSumTName, arrowTName, listTName, appTName, appKindTName,-    sigTName, equalityTName, litTName, promotedTName,+forallTName, forallVisTName, varTName, conTName, infixTName, tupleTName,+    unboxedTupleTName, unboxedSumTName, arrowTName, listTName, appTName,+    appKindTName, sigTName, equalityTName, litTName, promotedTName,     promotedTupleTName, promotedNilTName, promotedConsTName,     wildCardTName, implicitParamTName :: Name forallTName         = libFun (fsLit "forallT")        forallTIdKey+forallVisTName      = libFun (fsLit "forallVisT")     forallVisTIdKey varTName            = libFun (fsLit "varT")           varTIdKey conTName            = libFun (fsLit "conT")           conTIdKey tupleTName          = libFun (fsLit "tupleT")         tupleTIdKey@@ -725,7 +728,7 @@ returnQIdKey, bindQIdKey, sequenceQIdKey, liftIdKey, newNameIdKey,     mkNameIdKey, mkNameG_vIdKey, mkNameG_dIdKey, mkNameG_tcIdKey,     mkNameLIdKey, mkNameSIdKey, unTypeIdKey, unTypeQIdKey,-    unsafeTExpCoerceIdKey :: Unique+    unsafeTExpCoerceIdKey, liftTypedIdKey :: Unique returnQIdKey        = mkPreludeMiscIdUnique 200 bindQIdKey          = mkPreludeMiscIdUnique 201 sequenceQIdKey      = mkPreludeMiscIdUnique 202@@ -740,6 +743,7 @@ unTypeIdKey          = mkPreludeMiscIdUnique 211 unTypeQIdKey         = mkPreludeMiscIdUnique 212 unsafeTExpCoerceIdKey = mkPreludeMiscIdUnique 213+liftTypedIdKey        = mkPreludeMiscIdUnique 214   -- data Lit = ...@@ -865,7 +869,8 @@     openTypeFamilyDIdKey, closedTypeFamilyDIdKey, dataInstDIdKey,     newtypeInstDIdKey, tySynInstDIdKey, standaloneDerivWithStrategyDIdKey,     infixLDIdKey, infixRDIdKey, infixNDIdKey, roleAnnotDIdKey, patSynDIdKey,-    patSynSigDIdKey, pragCompleteDIdKey, implicitParamBindDIdKey :: Unique+    patSynSigDIdKey, pragCompleteDIdKey, implicitParamBindDIdKey,+    kiSigDIdKey :: Unique funDIdKey                         = mkPreludeMiscIdUnique 320 valDIdKey                         = mkPreludeMiscIdUnique 321 dataDIdKey                        = mkPreludeMiscIdUnique 322@@ -898,6 +903,7 @@ patSynSigDIdKey                   = mkPreludeMiscIdUnique 349 pragCompleteDIdKey                = mkPreludeMiscIdUnique 350 implicitParamBindDIdKey           = mkPreludeMiscIdUnique 351+kiSigDIdKey                       = mkPreludeMiscIdUnique 352  -- type Cxt = ... cxtIdKey :: Unique@@ -950,79 +956,80 @@ recordPatSynIdKey = mkPreludeMiscIdUnique 382  -- data Type = ...-forallTIdKey, varTIdKey, conTIdKey, tupleTIdKey, unboxedTupleTIdKey,-    unboxedSumTIdKey, arrowTIdKey, listTIdKey, appTIdKey, appKindTIdKey,-    sigTIdKey, equalityTIdKey, litTIdKey, promotedTIdKey,+forallTIdKey, forallVisTIdKey, varTIdKey, conTIdKey, tupleTIdKey,+    unboxedTupleTIdKey, unboxedSumTIdKey, arrowTIdKey, listTIdKey, appTIdKey,+    appKindTIdKey, sigTIdKey, equalityTIdKey, litTIdKey, promotedTIdKey,     promotedTupleTIdKey, promotedNilTIdKey, promotedConsTIdKey,     wildCardTIdKey, implicitParamTIdKey, infixTIdKey :: Unique forallTIdKey        = mkPreludeMiscIdUnique 390-varTIdKey           = mkPreludeMiscIdUnique 391-conTIdKey           = mkPreludeMiscIdUnique 392-tupleTIdKey         = mkPreludeMiscIdUnique 393-unboxedTupleTIdKey  = mkPreludeMiscIdUnique 394-unboxedSumTIdKey    = mkPreludeMiscIdUnique 395-arrowTIdKey         = mkPreludeMiscIdUnique 396-listTIdKey          = mkPreludeMiscIdUnique 397-appTIdKey           = mkPreludeMiscIdUnique 398-appKindTIdKey       = mkPreludeMiscIdUnique 399-sigTIdKey           = mkPreludeMiscIdUnique 400-equalityTIdKey      = mkPreludeMiscIdUnique 401-litTIdKey           = mkPreludeMiscIdUnique 402-promotedTIdKey      = mkPreludeMiscIdUnique 403-promotedTupleTIdKey = mkPreludeMiscIdUnique 404-promotedNilTIdKey   = mkPreludeMiscIdUnique 405-promotedConsTIdKey  = mkPreludeMiscIdUnique 406-wildCardTIdKey      = mkPreludeMiscIdUnique 407-implicitParamTIdKey = mkPreludeMiscIdUnique 408-infixTIdKey         = mkPreludeMiscIdUnique 409+forallVisTIdKey     = mkPreludeMiscIdUnique 391+varTIdKey           = mkPreludeMiscIdUnique 392+conTIdKey           = mkPreludeMiscIdUnique 393+tupleTIdKey         = mkPreludeMiscIdUnique 394+unboxedTupleTIdKey  = mkPreludeMiscIdUnique 395+unboxedSumTIdKey    = mkPreludeMiscIdUnique 396+arrowTIdKey         = mkPreludeMiscIdUnique 397+listTIdKey          = mkPreludeMiscIdUnique 398+appTIdKey           = mkPreludeMiscIdUnique 399+appKindTIdKey       = mkPreludeMiscIdUnique 400+sigTIdKey           = mkPreludeMiscIdUnique 401+equalityTIdKey      = mkPreludeMiscIdUnique 402+litTIdKey           = mkPreludeMiscIdUnique 403+promotedTIdKey      = mkPreludeMiscIdUnique 404+promotedTupleTIdKey = mkPreludeMiscIdUnique 405+promotedNilTIdKey   = mkPreludeMiscIdUnique 406+promotedConsTIdKey  = mkPreludeMiscIdUnique 407+wildCardTIdKey      = mkPreludeMiscIdUnique 408+implicitParamTIdKey = mkPreludeMiscIdUnique 409+infixTIdKey         = mkPreludeMiscIdUnique 410  -- data TyLit = ... numTyLitIdKey, strTyLitIdKey :: Unique-numTyLitIdKey = mkPreludeMiscIdUnique 410-strTyLitIdKey = mkPreludeMiscIdUnique 411+numTyLitIdKey = mkPreludeMiscIdUnique 411+strTyLitIdKey = mkPreludeMiscIdUnique 412  -- data TyVarBndr = ... plainTVIdKey, kindedTVIdKey :: Unique-plainTVIdKey       = mkPreludeMiscIdUnique 412-kindedTVIdKey      = mkPreludeMiscIdUnique 413+plainTVIdKey       = mkPreludeMiscIdUnique 413+kindedTVIdKey      = mkPreludeMiscIdUnique 414  -- data Role = ... nominalRIdKey, representationalRIdKey, phantomRIdKey, inferRIdKey :: Unique-nominalRIdKey          = mkPreludeMiscIdUnique 414-representationalRIdKey = mkPreludeMiscIdUnique 415-phantomRIdKey          = mkPreludeMiscIdUnique 416-inferRIdKey            = mkPreludeMiscIdUnique 417+nominalRIdKey          = mkPreludeMiscIdUnique 415+representationalRIdKey = mkPreludeMiscIdUnique 416+phantomRIdKey          = mkPreludeMiscIdUnique 417+inferRIdKey            = mkPreludeMiscIdUnique 418  -- data Kind = ... varKIdKey, conKIdKey, tupleKIdKey, arrowKIdKey, listKIdKey, appKIdKey,   starKIdKey, constraintKIdKey :: Unique-varKIdKey         = mkPreludeMiscIdUnique 418-conKIdKey         = mkPreludeMiscIdUnique 419-tupleKIdKey       = mkPreludeMiscIdUnique 420-arrowKIdKey       = mkPreludeMiscIdUnique 421-listKIdKey        = mkPreludeMiscIdUnique 422-appKIdKey         = mkPreludeMiscIdUnique 423-starKIdKey        = mkPreludeMiscIdUnique 424-constraintKIdKey  = mkPreludeMiscIdUnique 425+varKIdKey         = mkPreludeMiscIdUnique 419+conKIdKey         = mkPreludeMiscIdUnique 420+tupleKIdKey       = mkPreludeMiscIdUnique 421+arrowKIdKey       = mkPreludeMiscIdUnique 422+listKIdKey        = mkPreludeMiscIdUnique 423+appKIdKey         = mkPreludeMiscIdUnique 424+starKIdKey        = mkPreludeMiscIdUnique 425+constraintKIdKey  = mkPreludeMiscIdUnique 426  -- data FamilyResultSig = ... noSigIdKey, kindSigIdKey, tyVarSigIdKey :: Unique-noSigIdKey        = mkPreludeMiscIdUnique 426-kindSigIdKey      = mkPreludeMiscIdUnique 427-tyVarSigIdKey     = mkPreludeMiscIdUnique 428+noSigIdKey        = mkPreludeMiscIdUnique 427+kindSigIdKey      = mkPreludeMiscIdUnique 428+tyVarSigIdKey     = mkPreludeMiscIdUnique 429  -- data InjectivityAnn = ... injectivityAnnIdKey :: Unique-injectivityAnnIdKey = mkPreludeMiscIdUnique 429+injectivityAnnIdKey = mkPreludeMiscIdUnique 430  -- data Callconv = ... cCallIdKey, stdCallIdKey, cApiCallIdKey, primCallIdKey,   javaScriptCallIdKey :: Unique-cCallIdKey          = mkPreludeMiscIdUnique 430-stdCallIdKey        = mkPreludeMiscIdUnique 431-cApiCallIdKey       = mkPreludeMiscIdUnique 432-primCallIdKey       = mkPreludeMiscIdUnique 433-javaScriptCallIdKey = mkPreludeMiscIdUnique 434+cCallIdKey          = mkPreludeMiscIdUnique 431+stdCallIdKey        = mkPreludeMiscIdUnique 432+cApiCallIdKey       = mkPreludeMiscIdUnique 433+primCallIdKey       = mkPreludeMiscIdUnique 434+javaScriptCallIdKey = mkPreludeMiscIdUnique 435  -- data Safety = ... unsafeIdKey, safeIdKey, interruptibleIdKey :: Unique@@ -1076,8 +1083,9 @@ ************************************************************************ -} -lift_RDR, mkNameG_dRDR, mkNameG_vRDR :: RdrName+lift_RDR, liftTyped_RDR, mkNameG_dRDR, mkNameG_vRDR :: RdrName lift_RDR     = nameRdrName liftName+liftTyped_RDR = nameRdrName liftTypedName mkNameG_dRDR = nameRdrName mkNameG_dName mkNameG_vRDR = nameRdrName mkNameG_vName 
prelude/TysPrim.hs view
@@ -13,7 +13,7 @@         mkPrimTyConName, -- For implicit parameters in TysWiredIn only          mkTemplateKindVars, mkTemplateTyVars, mkTemplateTyVarsFrom,-        mkTemplateKiTyVars,+        mkTemplateKiTyVars, mkTemplateKiTyVar,          mkTemplateTyConBinders, mkTemplateKindTyConBinders,         mkTemplateAnonTyConBinders,@@ -81,6 +81,7 @@         eqPrimTyCon,            -- ty1 ~# ty2         eqReprPrimTyCon,        -- ty1 ~R# ty2  (at role Representational)         eqPhantPrimTyCon,       -- ty1 ~P# ty2  (at role Phantom)+        equalityTyCon,          -- * SIMD #include "primop-vector-tys-exports.hs-incl"@@ -93,9 +94,11 @@ import {-# SOURCE #-} TysWiredIn   ( runtimeRepTy, unboxedTupleKind, liftedTypeKind   , vecRepDataConTyCon, tupleRepDataConTyCon-  , liftedRepDataConTy, unliftedRepDataConTy, intRepDataConTy, int8RepDataConTy-  , int16RepDataConTy, word16RepDataConTy-  , wordRepDataConTy, int64RepDataConTy, word8RepDataConTy, word64RepDataConTy+  , liftedRepDataConTy, unliftedRepDataConTy+  , intRepDataConTy+  , int8RepDataConTy, int16RepDataConTy, int32RepDataConTy, int64RepDataConTy+  , wordRepDataConTy+  , word16RepDataConTy, word8RepDataConTy, word32RepDataConTy, word64RepDataConTy   , addrRepDataConTy   , floatRepDataConTy, doubleRepDataConTy   , vec2DataConTy, vec4DataConTy, vec8DataConTy, vec16DataConTy, vec32DataConTy@@ -106,7 +109,7 @@   , doubleElemRepDataConTy   , mkPromotedListTy ) -import Var              ( TyVar, VarBndr(Bndr), mkTyVar )+import Var              ( TyVar, mkTyVar ) import Name import TyCon import SrcLoc@@ -132,8 +135,8 @@  -- | Primitive 'TyCon's that are defined in "GHC.Prim" but not exposed. -- It's important to keep these separate as we don't want users to be able to--- write them (see Trac #15209) or see them in GHCi's @:browse@ output--- (see Trac #12023).+-- write them (see #15209) or see them in GHCi's @:browse@ output+-- (see #12023). unexposedPrimTyCons :: [TyCon] unexposedPrimTyCons   = [ eqPrimTyCon@@ -251,14 +254,15 @@         ["a", "b", ..., "z", "t1", "t2", ... ] -} +mkTemplateKindVar :: Kind -> TyVar+mkTemplateKindVar = mkTyVar (mk_tv_name 0 "k")+ mkTemplateKindVars :: [Kind] -> [TyVar] -- k0  with unique (mkAlphaTyVarUnique 0) -- k1  with unique (mkAlphaTyVarUnique 1) -- ... etc-mkTemplateKindVars [kind]-  = [mkTyVar (mk_tv_name 0 "k") kind]-    -- Special case for one kind: just "k"-+mkTemplateKindVars [kind] = [mkTemplateKindVar kind]+  -- Special case for one kind: just "k" mkTemplateKindVars kinds   = [ mkTyVar (mk_tv_name u ('k' : show u)) kind     | (kind, u) <- kinds `zip` [0..] ]@@ -307,7 +311,7 @@     -> [TyVar]   -- [kv1:k1, ..., kvn:kn, av1:ak1, ..., avm:akm] -- Example: if you want the tyvars for --   forall (r:RuntimeRep) (a:TYPE r) (b:*). blah--- call mkTemplateKiTyVars [RuntimeRep] (\[r]. [TYPE r, *)+-- call mkTemplateKiTyVars [RuntimeRep] (\[r] -> [TYPE r, *]) mkTemplateKiTyVars kind_var_kinds mk_arg_kinds   = kv_bndrs ++ tv_bndrs   where@@ -315,15 +319,30 @@     anon_kinds = mk_arg_kinds (mkTyVarTys kv_bndrs)     tv_bndrs   = mkTemplateTyVarsFrom (length kv_bndrs) anon_kinds +mkTemplateKiTyVar+    :: Kind                  -- [k1, .., kn]   Kind of kind-forall'd var+    -> (Kind -> [Kind])      -- Arg is kv1:k1+                             -- Result is anon arg kinds [ak1, .., akm]+    -> [TyVar]   -- [kv1:k1, ..., kvn:kn, av1:ak1, ..., avm:akm]+-- Example: if you want the tyvars for+--   forall (r:RuntimeRep) (a:TYPE r) (b:*). blah+-- call mkTemplateKiTyVar RuntimeRep (\r -> [TYPE r, *])+mkTemplateKiTyVar kind mk_arg_kinds+  = kv_bndr : tv_bndrs+  where+    kv_bndr    = mkTemplateKindVar kind+    anon_kinds = mk_arg_kinds (mkTyVarTy kv_bndr)+    tv_bndrs   = mkTemplateTyVarsFrom 1 anon_kinds+ mkTemplateKindTyConBinders :: [Kind] -> [TyConBinder] -- Makes named, Specified binders mkTemplateKindTyConBinders kinds = [mkNamedTyConBinder Specified tv | tv <- mkTemplateKindVars kinds]  mkTemplateAnonTyConBinders :: [Kind] -> [TyConBinder]-mkTemplateAnonTyConBinders kinds = map mkAnonTyConBinder (mkTemplateTyVars kinds)+mkTemplateAnonTyConBinders kinds = mkAnonTyConBinders VisArg (mkTemplateTyVars kinds)  mkTemplateAnonTyConBindersFrom :: Int -> [Kind] -> [TyConBinder]-mkTemplateAnonTyConBindersFrom n kinds = map mkAnonTyConBinder (mkTemplateTyVarsFrom n kinds)+mkTemplateAnonTyConBindersFrom n kinds = mkAnonTyConBinders VisArg (mkTemplateTyVarsFrom n kinds)  alphaTyVars :: [TyVar] alphaTyVars = mkTemplateTyVars $ repeat liftedTypeKind@@ -383,9 +402,8 @@ funTyCon :: TyCon funTyCon = mkFunTyCon funTyConName tc_bndrs tc_rep_nm   where-    tc_bndrs = [ Bndr runtimeRep1TyVar (NamedTCB Inferred)-               , Bndr runtimeRep2TyVar (NamedTCB Inferred)-               ]+    tc_bndrs = [ mkNamedTyConBinder Inferred runtimeRep1TyVar+               , mkNamedTyConBinder Inferred runtimeRep2TyVar ]                ++ mkTemplateAnonTyConBinders [ tYPE runtimeRep1Ty                                              , tYPE runtimeRep2Ty                                              ]@@ -534,10 +552,12 @@   IntRep        -> intRepDataConTy   Int8Rep       -> int8RepDataConTy   Int16Rep      -> int16RepDataConTy-  WordRep       -> wordRepDataConTy+  Int32Rep      -> int32RepDataConTy   Int64Rep      -> int64RepDataConTy+  WordRep       -> wordRepDataConTy   Word8Rep      -> word8RepDataConTy   Word16Rep     -> word16RepDataConTy+  Word32Rep     -> word32RepDataConTy   Word64Rep     -> word64RepDataConTy   AddrRep       -> addrRepDataConTy   FloatRep      -> floatRepDataConTy@@ -592,7 +612,7 @@ int32PrimTy :: Type int32PrimTy     = mkTyConTy int32PrimTyCon int32PrimTyCon :: TyCon-int32PrimTyCon  = pcPrimTyCon0 int32PrimTyConName IntRep+int32PrimTyCon  = pcPrimTyCon0 int32PrimTyConName Int32Rep  int64PrimTy :: Type int64PrimTy     = mkTyConTy int64PrimTyCon@@ -617,7 +637,7 @@ word32PrimTy :: Type word32PrimTy    = mkTyConTy word32PrimTyCon word32PrimTyCon :: TyCon-word32PrimTyCon = pcPrimTyCon0 word32PrimTyConName WordRep+word32PrimTyCon = pcPrimTyCon0 word32PrimTyConName Word32Rep  word64PrimTy :: Type word64PrimTy    = mkTyConTy word64PrimTyCon@@ -680,7 +700,7 @@     -------------------------- This is The Type Of Equality in GHC. It classifies nominal coercions. This type is used in the solver for recording equality constraints.-It responds "yes" to Type.isEqPred and classifies as an EqPred in+It responds "yes" to Type.isEqPrimPred and classifies as an EqPred in Type.classifyPredType.  All wanted constraints of this type are built with coercion holes.@@ -855,9 +875,9 @@ mkProxyPrimTy k ty = TyConApp proxyPrimTyCon [k, ty]  proxyPrimTyCon :: TyCon-proxyPrimTyCon = mkPrimTyCon proxyPrimTyConName binders res_kind [Nominal,Nominal]+proxyPrimTyCon = mkPrimTyCon proxyPrimTyConName binders res_kind [Nominal,Phantom]   where-     -- Kind: forall k. k -> Void#+     -- Kind: forall k. k -> TYPE (Tuple '[])      binders = mkTemplateTyConBinders [liftedTypeKind] id      res_kind = unboxedTupleKind [] @@ -873,7 +893,7 @@                       -- See Note [The equality types story] eqPrimTyCon  = mkPrimTyCon eqPrimTyConName binders res_kind roles   where-    -- Kind :: forall k1 k2. k1 -> k2 -> Void#+    -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (Tuple '[])     binders  = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id     res_kind = unboxedTupleKind []     roles    = [Nominal, Nominal, Nominal, Nominal]@@ -884,7 +904,7 @@ eqReprPrimTyCon :: TyCon   -- See Note [The equality types story] eqReprPrimTyCon = mkPrimTyCon eqReprPrimTyConName binders res_kind roles   where-    -- Kind :: forall k1 k2. k1 -> k2 -> Void#+    -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (Tuple '[])     binders  = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id     res_kind = unboxedTupleKind []     roles    = [Nominal, Nominal, Representational, Representational]@@ -895,10 +915,16 @@ eqPhantPrimTyCon :: TyCon eqPhantPrimTyCon = mkPrimTyCon eqPhantPrimTyConName binders res_kind roles   where-    -- Kind :: forall k1 k2. k1 -> k2 -> Void#+    -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (Tuple '[])     binders  = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id     res_kind = unboxedTupleKind []     roles    = [Nominal, Nominal, Phantom, Phantom]++-- | Given a Role, what TyCon is the type of equality predicates at that role?+equalityTyCon :: Role -> TyCon+equalityTyCon Nominal          = eqPrimTyCon+equalityTyCon Representational = eqReprPrimTyCon+equalityTyCon Phantom          = eqPhantPrimTyCon  {- ********************************************************************* *                                                                      *
prelude/TysWiredIn.hs view
@@ -16,8 +16,6 @@          mkWiredInIdName,    -- used in MkId -        mkFunKind, mkForAllKind,-         -- * All wired in things         wiredInTyCons, isBuiltInOcc_maybe, @@ -70,7 +68,7 @@         justDataCon, justDataConName, promotedJustDataCon,          -- * Tuples-        mkTupleTy, mkBoxedTupleTy,+        mkTupleTy, mkTupleTy1, mkBoxedTupleTy, mkTupleStr,         tupleTyCon, tupleDataCon, tupleTyConName,         promotedTupleDataCon,         unitTyCon, unitDataCon, unitDataConId, unitTy, unitTyConKey,@@ -86,13 +84,17 @@         -- * Any         anyTyCon, anyTy, anyTypeOfKind, +        -- * Recovery TyCon+        makeRecoveryTyCon,+         -- * Sums         mkSumTy, sumTyCon, sumDataCon,          -- * Kinds         typeNatKindCon, typeNatKind, typeSymbolKindCon, typeSymbolKind,-        isLiftedTypeKindTyConName, liftedTypeKind, constraintKind,-        liftedTypeKindTyCon, constraintKindTyCon,+        isLiftedTypeKindTyConName, liftedTypeKind,+        typeToTypeKind, constraintKind,+        liftedTypeKindTyCon, constraintKindTyCon,  constraintKindTyConName,         liftedTypeKindTyConName,          -- * Equality predicates@@ -107,9 +109,11 @@          vecRepDataConTyCon, tupleRepDataConTyCon, sumRepDataConTyCon, -        liftedRepDataConTy, unliftedRepDataConTy, intRepDataConTy, int8RepDataConTy,-        int16RepDataConTy, word16RepDataConTy,-        wordRepDataConTy, int64RepDataConTy, word8RepDataConTy, word64RepDataConTy,+        liftedRepDataConTy, unliftedRepDataConTy,+        intRepDataConTy,+        int8RepDataConTy, int16RepDataConTy, int32RepDataConTy, int64RepDataConTy,+        wordRepDataConTy,+        word8RepDataConTy, word16RepDataConTy, word32RepDataConTy, word64RepDataConTy,         addrRepDataConTy,         floatRepDataConTy, doubleRepDataConTy, @@ -124,7 +128,6 @@     ) where  #include "HsVersions.h"-#include "MachDeps.h"  import GhcPrelude @@ -181,6 +184,8 @@ in GHC.Types. All places where such lists exist should contain a reference to this Note, so a search for this Note's name should find all the lists. +See also Note [Getting from RuntimeRep to PrimRep] in RepType.+ ************************************************************************ *                                                                      * \subsection{Wired in type constructors}@@ -203,7 +208,7 @@ -- See also Note [Known-key names] wiredInTyCons :: [TyCon] -wiredInTyCons = [ -- Units are not treated like other tuples, because then+wiredInTyCons = [ -- Units are not treated like other tuples, because they                   -- are defined in GHC.Base, and there's only a few of them. We                   -- put them in wiredInTyCons so that they will pre-populate                   -- the name cache, so the parser in isBuiltInOcc_maybe doesn't@@ -395,6 +400,29 @@ anyTypeOfKind :: Kind -> Type anyTypeOfKind kind = mkTyConApp anyTyCon [kind] +-- | Make a fake, recovery 'TyCon' from an existing one.+-- Used when recovering from errors in type declarations+makeRecoveryTyCon :: TyCon -> TyCon+makeRecoveryTyCon tc+  = mkTcTyCon (tyConName tc)+              bndrs res_kind+              noTcTyConScopedTyVars+              True             -- Fully generalised+              flavour          -- Keep old flavour+  where+    flavour = tyConFlavour tc+    [kv] = mkTemplateKindVars [liftedTypeKind]+    (bndrs, res_kind)+       = case flavour of+           PromotedDataConFlavour -> ([mkNamedTyConBinder Inferred kv], mkTyVarTy kv)+           _ -> (tyConBinders tc, tyConResKind tc)+        -- For data types we have already validated their kind, so it+        -- makes sense to keep it. For promoted data constructors we haven't,+        -- so we recover with kind (forall k. k).  Otherwise consider+        --     data T a where { MkT :: Show a => T a }+        -- If T is for some reason invalid, we don't want to fall over+        -- at (promoted) use-sites of MkT.+ -- Kinds typeNatKindConName, typeSymbolKindConName :: Name typeNatKindConName    = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Nat")    typeNatKindConNameKey    typeNatKindCon@@ -416,19 +444,13 @@ runtimeRepSimpleDataConNames :: [Name] runtimeRepSimpleDataConNames   = zipWith3Lazy mk_special_dc_name-      [ fsLit "LiftedRep"-      , fsLit "UnliftedRep"+      [ fsLit "LiftedRep", fsLit "UnliftedRep"       , fsLit "IntRep"+      , fsLit "Int8Rep", fsLit "Int16Rep", fsLit "Int32Rep", fsLit "Int64Rep"       , fsLit "WordRep"-      , fsLit "Int8Rep"-      , fsLit "Int16Rep"-      , fsLit "Int64Rep"-      , fsLit "Word8Rep"-      , fsLit "Word16Rep"-      , fsLit "Word64Rep"+      , fsLit "Word8Rep", fsLit "Word16Rep", fsLit "Word32Rep", fsLit "Word64Rep"       , fsLit "AddrRep"-      , fsLit "FloatRep"-      , fsLit "DoubleRep"+      , fsLit "FloatRep", fsLit "DoubleRep"       ]       runtimeRepSimpleDataConKeys       runtimeRepSimpleDataCons@@ -484,7 +506,7 @@ pcTyCon :: Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon pcTyCon name cType tyvars cons   = mkAlgTyCon name-                (mkAnonTyConBinders tyvars)+                (mkAnonTyConBinders VisArg tyvars)                 liftedTypeKind                 (map (const Representational) tyvars)                 cType@@ -591,18 +613,11 @@ constraintKindTyCon :: TyCon constraintKindTyCon = pcTyCon constraintKindTyConName Nothing [] [] -liftedTypeKind, constraintKind :: Kind+liftedTypeKind, typeToTypeKind, constraintKind :: Kind liftedTypeKind   = tYPE liftedRepTy+typeToTypeKind   = liftedTypeKind `mkVisFunTy` liftedTypeKind constraintKind   = mkTyConApp constraintKindTyCon [] --- mkFunKind and mkForAllKind are defined here--- solely so that TyCon can use them via a SOURCE import-mkFunKind :: Kind -> Kind -> Kind-mkFunKind = mkFunTy--mkForAllKind :: TyCoVar -> ArgFlag -> Kind -> Kind-mkForAllKind = mkForAllTy- {- ************************************************************************ *                                                                      *@@ -681,9 +696,18 @@   data Unit a = Unit a   data (a,b)  = (a,b) -NB (Feb 16): for /constraint/ one-tuples I have 'Unit%' but no class-decl in GHC.Classes, so I think this part may not work properly. But-it's unused I think.+There is no way to write a boxed one-tuple in Haskell, but it can be+created in Template Haskell or in, e.g., `deriving` code. There is+nothing special about one-tuples in Core; in particular, they have no+custom pretty-printing, just using `Unit`.++Note that there is *not* a unary constraint tuple, unlike for other forms of+tuples. See [Ignore unary constraint tuples] in TcHsType for more+details.++See also Note [Flattening one-tuples] in MkCore and+Note [Don't flatten tuples from HsSyn] in MkCore.+ -}  -- | Built-in syntax isn't "in scope" so these OccNames map to wired-in Names@@ -738,7 +762,7 @@                 in Just $ dataConName $ sumDataCon alt arity       _ -> Nothing   where-    name = fastStringToByteString $ occNameFS occ+    name = bytesFS $ occNameFS occ      choose_ns :: Name -> Name -> Name     choose_ns tc dc@@ -759,6 +783,10 @@ mkCTupleOcc :: NameSpace -> Arity -> OccName mkCTupleOcc ns ar = mkOccName ns (mkConstraintTupleStr ar) +mkTupleStr :: Boxity -> Arity -> String+mkTupleStr Boxed   = mkBoxedTupleStr+mkTupleStr Unboxed = mkUnboxedTupleStr+ mkBoxedTupleStr :: Arity -> String mkBoxedTupleStr 0  = "()" mkBoxedTupleStr 1  = "Unit"   -- See Note [One-tuples]@@ -854,7 +882,7 @@     tycon = mkTupleTyCon tc_name tc_binders tc_res_kind tc_arity tuple_con                          BoxedTuple flavour -    tc_binders  = mkTemplateAnonTyConBinders (nOfThem arity liftedTypeKind)+    tc_binders  = mkTemplateAnonTyConBinders (replicate arity liftedTypeKind)     tc_res_kind = liftedTypeKind     tc_arity    = arity     flavour     = VanillaAlgTyCon (mkPrelTyConRepName tc_name)@@ -879,7 +907,7 @@      -- See Note [Unboxed tuple RuntimeRep vars] in TyCon     -- Kind:  forall (k1:RuntimeRep) (k2:RuntimeRep). TYPE k1 -> TYPE k2 -> #-    tc_binders = mkTemplateTyConBinders (nOfThem arity runtimeRepTy)+    tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy)                                         (\ks -> map tYPE ks)      tc_res_kind = unboxedTupleKind rr_tys@@ -999,7 +1027,7 @@     -- Unboxed sums are currently not Typeable due to efficiency concerns. See #13276.     rep_name = Nothing -- Just $ mkPrelTyConRepName tc_name -    tc_binders = mkTemplateTyConBinders (nOfThem arity runtimeRepTy)+    tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy)                                         (\ks -> map tYPE ks)      tyvars = binderVars tc_binders@@ -1136,6 +1164,7 @@                                  runtimeRepTyCon                                  (RuntimeRep prim_rep_fun)   where+    -- See Note [Getting from RuntimeRep to PrimRep] in RepType     prim_rep_fun [count, elem]       | VecCount n <- tyConRuntimeRepInfo (tyConAppTyCon count)       , VecElem  e <- tyConRuntimeRepInfo (tyConAppTyCon elem)@@ -1150,6 +1179,7 @@ tupleRepDataCon = pcSpecialDataCon tupleRepDataConName [ mkListTy runtimeRepTy ]                                    runtimeRepTyCon (RuntimeRep prim_rep_fun)   where+    -- See Note [Getting from RuntimeRep to PrimRep] in RepType     prim_rep_fun [rr_ty_list]       = concatMap (runtimeRepPrimRep doc) rr_tys       where@@ -1165,6 +1195,7 @@ sumRepDataCon = pcSpecialDataCon sumRepDataConName [ mkListTy runtimeRepTy ]                                  runtimeRepTyCon (RuntimeRep prim_rep_fun)   where+    -- See Note [Getting from RuntimeRep to PrimRep] in RepType     prim_rep_fun [rr_ty_list]       = map slotPrimRep (ubxSumRepType prim_repss)       where@@ -1178,12 +1209,19 @@ sumRepDataConTyCon = promoteDataCon sumRepDataCon  -- See Note [Wiring in RuntimeRep]+-- See Note [Getting from RuntimeRep to PrimRep] in RepType runtimeRepSimpleDataCons :: [DataCon] liftedRepDataCon :: DataCon runtimeRepSimpleDataCons@(liftedRepDataCon : _)   = zipWithLazy mk_runtime_rep_dc-    [ LiftedRep, UnliftedRep, IntRep, WordRep, Int8Rep, Int16Rep, Int64Rep-    , Word8Rep, Word16Rep, Word64Rep, AddrRep, FloatRep, DoubleRep ]+    [ LiftedRep, UnliftedRep+    , IntRep+    , Int8Rep, Int16Rep, Int32Rep, Int64Rep+    , WordRep+    , Word8Rep, Word16Rep, Word32Rep, Word64Rep+    , AddrRep+    , FloatRep, DoubleRep+    ]     runtimeRepSimpleDataConNames   where     mk_runtime_rep_dc primrep name@@ -1191,13 +1229,20 @@  -- See Note [Wiring in RuntimeRep] liftedRepDataConTy, unliftedRepDataConTy,-  intRepDataConTy, int8RepDataConTy, int16RepDataConTy, wordRepDataConTy, int64RepDataConTy,-  word8RepDataConTy, word16RepDataConTy, word64RepDataConTy, addrRepDataConTy,+  intRepDataConTy,+  int8RepDataConTy, int16RepDataConTy, int32RepDataConTy, int64RepDataConTy,+  wordRepDataConTy,+  word8RepDataConTy, word16RepDataConTy, word32RepDataConTy, word64RepDataConTy,+  addrRepDataConTy,   floatRepDataConTy, doubleRepDataConTy :: Type [liftedRepDataConTy, unliftedRepDataConTy,-   intRepDataConTy, wordRepDataConTy, int8RepDataConTy, int16RepDataConTy, int64RepDataConTy,-   word8RepDataConTy, word16RepDataConTy, word64RepDataConTy,-   addrRepDataConTy, floatRepDataConTy, doubleRepDataConTy]+   intRepDataConTy,+   int8RepDataConTy, int16RepDataConTy, int32RepDataConTy, int64RepDataConTy,+   wordRepDataConTy,+   word8RepDataConTy, word16RepDataConTy, word32RepDataConTy, word64RepDataConTy,+   addrRepDataConTy,+   floatRepDataConTy, doubleRepDataConTy+   ]   = map (mkTyConTy . promoteDataCon) runtimeRepSimpleDataCons  vecCountTyCon :: TyCon@@ -1452,6 +1497,7 @@                 False                 (VanillaAlgTyCon $ mkPrelTyConRepName listTyConName) +-- See also Note [Empty lists] in GHC.Hs.Expr. nilDataCon :: DataCon nilDataCon  = pcDataCon nilDataConName alpha_tyvar [] listTyCon @@ -1525,15 +1571,24 @@ -}  -- | Make a tuple type. The list of types should /not/ include any--- RuntimeRep specifications.+-- RuntimeRep specifications. Boxed 1-tuples are flattened.+-- See Note [One-tuples] mkTupleTy :: Boxity -> [Type] -> Type -- Special case for *boxed* 1-tuples, which are represented by the type itself mkTupleTy Boxed   [ty] = ty-mkTupleTy Boxed   tys  = mkTyConApp (tupleTyCon Boxed (length tys)) tys-mkTupleTy Unboxed tys  = mkTyConApp (tupleTyCon Unboxed (length tys))-                                        (map getRuntimeRep tys ++ tys)+mkTupleTy boxity  tys  = mkTupleTy1 boxity tys +-- | Make a tuple type. The list of types should /not/ include any+-- RuntimeRep specifications. Boxed 1-tuples are *not* flattened.+-- See Note [One-tuples] and Note [Don't flatten tuples from HsSyn]+-- in MkCore+mkTupleTy1 :: Boxity -> [Type] -> Type+mkTupleTy1 Boxed   tys  = mkTyConApp (tupleTyCon Boxed (length tys)) tys+mkTupleTy1 Unboxed tys  = mkTyConApp (tupleTyCon Unboxed (length tys))+                                         (map getRuntimeRep tys ++ tys)+ -- | Build the type of a small tuple that holds the specified type of thing+-- Flattens 1-tuples. See Note [One-tuples]. mkBoxedTupleTy :: [Type] -> Type mkBoxedTupleTy tys = mkTupleTy Boxed tys 
prelude/TysWiredIn.hs-boot view
@@ -1,12 +1,10 @@ module TysWiredIn where -import Var( TyVar, ArgFlag ) import {-# SOURCE #-} TyCon      ( TyCon ) import {-# SOURCE #-} TyCoRep    (Type, Kind) --mkFunKind :: Kind -> Kind -> Kind-mkForAllKind :: TyVar -> ArgFlag -> Kind -> Kind+import BasicTypes (Arity, TupleSort)+import Name (Name)  listTyCon :: TyCon typeNatKind, typeSymbolKind :: Type@@ -24,10 +22,13 @@  liftedRepDataConTyCon, vecRepDataConTyCon, tupleRepDataConTyCon :: TyCon -liftedRepDataConTy, unliftedRepDataConTy, intRepDataConTy, int8RepDataConTy,-  int16RepDataConTy, word16RepDataConTy,-  wordRepDataConTy, int64RepDataConTy, word8RepDataConTy, word64RepDataConTy,-  addrRepDataConTy, floatRepDataConTy, doubleRepDataConTy :: Type+liftedRepDataConTy, unliftedRepDataConTy,+  intRepDataConTy,+  int8RepDataConTy, int16RepDataConTy, int32RepDataConTy, int64RepDataConTy,+  wordRepDataConTy,+  word8RepDataConTy, word16RepDataConTy, word32RepDataConTy, word64RepDataConTy,+  addrRepDataConTy,+  floatRepDataConTy, doubleRepDataConTy :: Type  vec2DataConTy, vec4DataConTy, vec8DataConTy, vec16DataConTy, vec32DataConTy,   vec64DataConTy :: Type@@ -40,3 +41,5 @@ anyTypeOfKind :: Kind -> Type unboxedTupleKind :: [Type] -> Type mkPromotedListTy :: Type -> [Type] -> Type++tupleTyConName :: TupleSort -> Arity -> Name
rename/RnBinds.hs view
@@ -30,7 +30,7 @@  import {-# SOURCE #-} RnExpr( rnLExpr, rnStmts ) -import HsSyn+import GHC.Hs import TcRnMonad import RnTypes import RnPat@@ -38,7 +38,8 @@ import RnEnv import RnFixity import RnUtils          ( HsDocContext(..), mapFvRn, extendTyVarEnvFVRn-                        , checkDupRdrNames, warnUnusedLocalBinds+                        , checkDupRdrNames, warnUnusedLocalBinds,+                        checkUnusedRecordWildcard                         , checkDupAndShadowedNames, bindLocalNamesFV ) import DynFlags import Module@@ -48,13 +49,14 @@ import RdrName          ( RdrName, rdrNameOcc ) import SrcLoc import ListSetOps       ( findDupsEq )-import BasicTypes       ( RecFlag(..) )+import BasicTypes       ( RecFlag(..), TypeOrKind(..) ) import Digraph          ( SCC(..) ) import Bag import Util import Outputable import UniqSet import Maybes           ( orElse )+import OrdList import qualified GHC.LanguageExtensions as LangExt  import Control.Monad@@ -214,19 +216,19 @@     (thing, fvs_thing) <- thing_inside (HsIPBinds x binds') fv_binds     return (thing, fvs_thing `plusFV` fv_binds) -rnLocalBindsAndThen (XHsLocalBindsLR _) _ = panic "rnLocalBindsAndThen"+rnLocalBindsAndThen (XHsLocalBindsLR nec) _ = noExtCon nec  rnIPBinds :: HsIPBinds GhcPs -> RnM (HsIPBinds GhcRn, FreeVars) rnIPBinds (IPBinds _ ip_binds ) = do     (ip_binds', fvs_s) <- mapAndUnzipM (wrapLocFstM rnIPBind) ip_binds-    return (IPBinds noExt ip_binds', plusFVs fvs_s)-rnIPBinds (XHsIPBinds _) = panic "rnIPBinds"+    return (IPBinds noExtField ip_binds', plusFVs fvs_s)+rnIPBinds (XHsIPBinds nec) = noExtCon nec  rnIPBind :: IPBind GhcPs -> RnM (IPBind GhcRn, FreeVars) rnIPBind (IPBind _ ~(Left n) expr) = do     (expr',fvExpr) <- rnLExpr expr-    return (IPBind noExt (Left n) expr', fvExpr)-rnIPBind (XIPBind _) = panic "rnIPBind"+    return (IPBind noExtField (Left n) expr', fvExpr)+rnIPBind (XIPBind nec) = noExtCon nec  {- ************************************************************************@@ -246,7 +248,7 @@           -- Check for duplicates and shadowing          -- Must do this *after* renaming the patterns-         -- See Note [Collect binders only after renaming] in HsUtils+         -- See Note [Collect binders only after renaming] in GHC.Hs.Utils           -- We need to check for dups here because we          -- don't don't bind all of the variables from the ValBinds at once@@ -306,7 +308,7 @@                 -- Note [Pattern synonym builders don't yield dependencies]                 -- But psb_fvs /does/ include those builder fvs.  So we                 -- add them back in here to avoid bogus warnings about-                -- unused variables (Trac #12548)+                -- unused variables (#12548)               valbind'_dus = anal_dus `plusDU` usesOnly sig_fvs                                      `plusDU` usesOnly patsyn_fvs@@ -362,7 +364,12 @@         ; let real_uses = findUses dus result_fvs               -- Insert fake uses for variables introduced implicitly by               -- wildcards (#4404)-              implicit_uses = hsValBindsImplicits binds'+              rec_uses = hsValBindsImplicits binds'+              implicit_uses = mkNameSet $ concatMap snd+                                        $ rec_uses+        ; mapM_ (\(loc, ns) ->+                    checkUnusedRecordWildcard loc real_uses (Just ns))+                rec_uses         ; warnUnusedLocalBinds bound_names                                       (real_uses `unionNameSet` implicit_uses) @@ -416,19 +423,19 @@ rnBindLHS name_maker _ bind@(FunBind { fun_id = rdr_name })   = do { name <- applyNameMaker name_maker rdr_name        ; return (bind { fun_id = name-                      , fun_ext = noExt }) }+                      , fun_ext = noExtField }) }  rnBindLHS name_maker _ (PatSynBind x psb@PSB{ psb_id = rdrname })   | isTopRecNameMaker name_maker   = do { addLocM checkConName rdrname        ; name <- lookupLocatedTopBndrRn rdrname   -- Should be in scope already-       ; return (PatSynBind x psb{ psb_ext = noExt, psb_id = name }) }+       ; return (PatSynBind x psb{ psb_ext = noExtField, psb_id = name }) }    | otherwise  -- Pattern synonym, not at top level   = do { addErr localPatternSynonymErr  -- Complain, but make up a fake                                         -- name so that we can carry on        ; name <- applyNameMaker name_maker rdrname-       ; return (PatSynBind x psb{ psb_ext = noExt, psb_id = name }) }+       ; return (PatSynBind x psb{ psb_ext = noExtField, psb_id = name }) }   where     localPatternSynonymErr :: SDoc     localPatternSynonymErr@@ -530,7 +537,7 @@ * A strict pattern binding; that is, one with an outermost bang      !Just _ = e   This can fail, so unlike the lazy variant, it is not a no-op.-  Moreover, Trac #13646 argues that even for single constructor+  Moreover, #13646 argues that even for single constructor   types, you might want to write the constructor.  See also #9127.  * A splice pattern@@ -562,7 +569,7 @@ -- Dependency analysis; this is important so that -- unused-binding reporting is accurate depAnalBinds binds_w_dus-  = (map get_binds sccs, map get_du sccs)+  = (map get_binds sccs, toOL $ map get_du sccs)   where     sccs = depAnal (\(_, defs, _) -> defs)                    (\(_, _, uses) -> nonDetEltsUniqSet uses)@@ -623,7 +630,7 @@    add_one_sig env (L loc (FixitySig _ names fixity)) =      foldlM add_one env [ (loc,name_loc,name,fixity)                         | L name_loc name <- names ]-   add_one_sig _ (L _ (XFixitySig _)) = panic "makeMiniFixityEnv"+   add_one_sig _ (L _ (XFixitySig nec)) = noExtCon nec     add_one env (loc, name_loc, name,fixity) = do      { -- this fixity decl is a duplicate iff@@ -734,7 +741,7 @@       = hang (text "Illegal pattern synonym declaration")            2 (text "Use -XPatternSynonyms to enable this extension") -rnPatSynBind _ (XPatSynBind _) = panic "rnPatSynBind"+rnPatSynBind _ (XPatSynBind nec) = noExtCon nec  {- Note [Renaming pattern synonym variables]@@ -799,7 +806,7 @@    (which is then used for dependency analysis)  * But we /do/ include them in the psb_fvs for the PatSynBind  * In rnValBinds we record these builder uses, to avoid bogus-   unused-variable warnings (Trac #12548)+   unused-variable warnings (#12548) -}  {- *********************************************************************@@ -846,7 +853,7 @@              -- for instance decls too         -- Rename the bindings LHSs-       ; binds' <- foldrBagM (rnMethodBindLHS is_cls_decl cls) emptyBag binds+       ; binds' <- foldrM (rnMethodBindLHS is_cls_decl cls) emptyBag binds         -- Rename the pragmas and signatures        -- Annoyingly the type variables /are/ in scope for signatures, but@@ -868,7 +875,7 @@        ; scoped_tvs  <- xoptM LangExt.ScopedTypeVariables        ; (binds'', bind_fvs) <- maybe_extend_tyvar_env scoped_tvs $               do { binds_w_dus <- mapBagM (rnLBind (mkScopedTvFn other_sigs')) binds'-                 ; let bind_fvs = foldrBag (\(_,_,fv1) fv2 -> fv1 `plusFV` fv2)+                 ; let bind_fvs = foldr (\(_,_,fv1) fv2 -> fv1 `plusFV` fv2)                                            emptyFVs binds_w_dus                  ; return (mapBag fstOf3 binds_w_dus, bind_fvs) } @@ -889,7 +896,7 @@   = setSrcSpan loc $ do     do { sel_name <- wrapLocM (lookupInstDeclBndr cls (text "method")) name                      -- We use the selector name as the binder-       ; let bind' = bind { fun_id = sel_name, fun_ext = noExt }+       ; let bind' = bind { fun_id = sel_name, fun_ext = noExtField }        ; return (L loc bind' `consBag` rest ) }  -- Report error for all other forms of bindings@@ -953,29 +960,29 @@  renameSig :: HsSigCtxt -> Sig GhcPs -> RnM (Sig GhcRn, FreeVars) renameSig _ (IdSig _ x)-  = return (IdSig noExt x, emptyFVs)    -- Actually this never occurs+  = return (IdSig noExtField x, emptyFVs)    -- Actually this never occurs  renameSig ctxt sig@(TypeSig _ vs ty)   = do  { new_vs <- mapM (lookupSigOccRn ctxt sig) vs         ; let doc = TypeSigCtx (ppr_sig_bndrs vs)         ; (new_ty, fvs) <- rnHsSigWcType BindUnlessForall doc ty-        ; return (TypeSig noExt new_vs new_ty, fvs) }+        ; return (TypeSig noExtField new_vs new_ty, fvs) }  renameSig ctxt sig@(ClassOpSig _ is_deflt vs ty)   = do  { defaultSigs_on <- xoptM LangExt.DefaultSignatures         ; when (is_deflt && not defaultSigs_on) $           addErr (defaultSigErr sig)         ; new_v <- mapM (lookupSigOccRn ctxt sig) vs-        ; (new_ty, fvs) <- rnHsSigType ty_ctxt ty-        ; return (ClassOpSig noExt is_deflt new_v new_ty, fvs) }+        ; (new_ty, fvs) <- rnHsSigType ty_ctxt TypeLevel ty+        ; return (ClassOpSig noExtField is_deflt new_v new_ty, fvs) }   where     (v1:_) = vs     ty_ctxt = GenericCtx (text "a class method signature for"                           <+> quotes (ppr v1))  renameSig _ (SpecInstSig _ src ty)-  = do  { (new_ty, fvs) <- rnHsSigType SpecInstSigCtx ty-        ; return (SpecInstSig noExt src new_ty,fvs) }+  = do  { (new_ty, fvs) <- rnHsSigType SpecInstSigCtx TypeLevel ty+        ; return (SpecInstSig noExtField src new_ty,fvs) }  -- {-# SPECIALISE #-} pragmas can refer to imported Ids -- so, in the top-level case (when mb_names is Nothing)@@ -986,37 +993,37 @@                      TopSigCtxt {} -> lookupLocatedOccRn v                      _             -> lookupSigOccRn ctxt sig v         ; (new_ty, fvs) <- foldM do_one ([],emptyFVs) tys-        ; return (SpecSig noExt new_v new_ty inl, fvs) }+        ; return (SpecSig noExtField new_v new_ty inl, fvs) }   where     ty_ctxt = GenericCtx (text "a SPECIALISE signature for"                           <+> quotes (ppr v))     do_one (tys,fvs) ty-      = do { (new_ty, fvs_ty) <- rnHsSigType ty_ctxt ty+      = do { (new_ty, fvs_ty) <- rnHsSigType ty_ctxt TypeLevel ty            ; return ( new_ty:tys, fvs_ty `plusFV` fvs) }  renameSig ctxt sig@(InlineSig _ v s)   = do  { new_v <- lookupSigOccRn ctxt sig v-        ; return (InlineSig noExt new_v s, emptyFVs) }+        ; return (InlineSig noExtField new_v s, emptyFVs) }  renameSig ctxt (FixSig _ fsig)   = do  { new_fsig <- rnSrcFixityDecl ctxt fsig-        ; return (FixSig noExt new_fsig, emptyFVs) }+        ; return (FixSig noExtField new_fsig, emptyFVs) }  renameSig ctxt sig@(MinimalSig _ s (L l bf))   = do new_bf <- traverse (lookupSigOccRn ctxt sig) bf-       return (MinimalSig noExt s (L l new_bf), emptyFVs)+       return (MinimalSig noExtField s (L l new_bf), emptyFVs)  renameSig ctxt sig@(PatSynSig _ vs ty)   = do  { new_vs <- mapM (lookupSigOccRn ctxt sig) vs-        ; (ty', fvs) <- rnHsSigType ty_ctxt ty-        ; return (PatSynSig noExt new_vs ty', fvs) }+        ; (ty', fvs) <- rnHsSigType ty_ctxt TypeLevel ty+        ; return (PatSynSig noExtField new_vs ty', fvs) }   where     ty_ctxt = GenericCtx (text "a pattern synonym signature for"                           <+> ppr_sig_bndrs vs)  renameSig ctxt sig@(SCCFunSig _ st v s)   = do  { new_v <- lookupSigOccRn ctxt sig v-        ; return (SCCFunSig noExt st new_v s, emptyFVs) }+        ; return (SCCFunSig noExtField st new_v s, emptyFVs) }  -- COMPLETE Sigs can refer to imported IDs which is why we use -- lookupLocatedOccRn rather than lookupSigOccRn@@ -1029,7 +1036,7 @@          -- Why 'any'? See Note [Orphan COMPLETE pragmas]          addErrCtxt (text "In" <+> ppr sig) $ failWithTc orphanError -       return (CompleteMatchSig noExt s (L l new_bf) new_mty, emptyFVs)+       return (CompleteMatchSig noExtField s (L l new_bf) new_mty, emptyFVs)   where     orphanError :: SDoc     orphanError =@@ -1037,7 +1044,7 @@       text "A COMPLETE pragma must mention at least one data constructor" $$       text "or pattern synonym defined in the same module." -renameSig _ (XSig _) = panic "renameSig"+renameSig _ (XSig nec) = noExtCon nec  {- Note [Orphan COMPLETE pragmas]@@ -1064,7 +1071,7 @@ ppr_sig_bndrs :: [Located RdrName] -> SDoc ppr_sig_bndrs bs = quotes (pprWithCommas ppr bs) -okHsSig :: HsSigCtxt -> LSig a -> Bool+okHsSig :: HsSigCtxt -> LSig (GhcPass a) -> Bool okHsSig ctxt (L _ sig)   = case (sig, ctxt) of      (ClassOpSig {}, ClsDeclCtxt {})  -> True@@ -1105,7 +1112,7 @@      (CompleteMatchSig {}, TopSigCtxt {} ) -> True      (CompleteMatchSig {}, _)              -> False -     (XSig _, _) -> panic "okHsSig"+     (XSig nec, _) -> noExtCon nec  ------------------- findDupSigs :: [LSig GhcPs] -> [NonEmpty (Located RdrName, Sig GhcPs)]@@ -1161,7 +1168,7 @@        ; when (null ms && not empty_case_ok) (addErr (emptyCaseErr ctxt))        ; (new_ms, ms_fvs) <- mapFvRn (rnMatch ctxt rnBody) ms        ; return (mkMatchGroup origin new_ms, ms_fvs) }-rnMatchGroup _ _ (XMatchGroup {}) = panic "rnMatchGroup"+rnMatchGroup _ _ (XMatchGroup nec) = noExtCon nec  rnMatch :: Outputable (body GhcPs) => HsMatchContext Name         -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))@@ -1181,9 +1188,9 @@                       (FunRhs { mc_fun = L _ funid }, FunRhs { mc_fun = L lf _ })                                             -> mf { mc_fun = L lf funid }                       _                     -> ctxt-        ; return (Match { m_ext = noExt, m_ctxt = mf', m_pats = pats'+        ; return (Match { m_ext = noExtField, m_ctxt = mf', m_pats = pats'                         , m_grhss = grhss'}, grhss_fvs ) }}-rnMatch' _ _ (XMatch _) = panic "rnMatch'"+rnMatch' _ _ (XMatch nec) = noExtCon nec  emptyCaseErr :: HsMatchContext Name -> SDoc emptyCaseErr ctxt = hang (text "Empty list of alternatives in" <+> pp_ctxt)@@ -1209,8 +1216,8 @@ rnGRHSs ctxt rnBody (GRHSs _ grhss (L l binds))   = rnLocalBindsAndThen binds   $ \ binds' _ -> do     (grhss', fvGRHSs) <- mapFvRn (rnGRHS ctxt rnBody) grhss-    return (GRHSs noExt grhss' (L l binds'), fvGRHSs)-rnGRHSs _ _ (XGRHSs _) = panic "rnGRHSs"+    return (GRHSs noExtField grhss' (L l binds'), fvGRHSs)+rnGRHSs _ _ (XGRHSs nec) = noExtCon nec  rnGRHS :: HsMatchContext Name        -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))@@ -1230,7 +1237,7 @@         ; unless (pattern_guards_allowed || is_standard_guard guards')                  (addWarn NoReason (nonStdGuardErr guards')) -        ; return (GRHS noExt guards' rhs', fvs) }+        ; return (GRHS noExtField guards' rhs', fvs) }   where         -- Standard Haskell 1.4 guards are just a single boolean         -- expression, rather than a list of qualifiers as in the@@ -1238,7 +1245,7 @@     is_standard_guard []                  = True     is_standard_guard [L _ (BodyStmt {})] = True     is_standard_guard _                   = False-rnGRHS' _ _ (XGRHS _) = panic "rnGRHS'"+rnGRHS' _ _ (XGRHS nec) = noExtCon nec  {- *********************************************************@@ -1261,8 +1268,8 @@         -- return a fixity sig for each (slightly odd)     rn_decl (FixitySig _ fnames fixity)       = do names <- concatMapM lookup_one fnames-           return (FixitySig noExt names fixity)-    rn_decl (XFixitySig _) = panic "rnSrcFixityDecl"+           return (FixitySig noExtField names fixity)+    rn_decl (XFixitySig nec) = noExtCon nec      lookup_one :: Located RdrName -> RnM [Located Name]     lookup_one (L name_loc rdr_name)
rename/RnEnv.hs view
@@ -48,7 +48,7 @@  import LoadIface        ( loadInterfaceForName, loadSrcInterface_maybe ) import IfaceEnv-import HsSyn+import GHC.Hs import RdrName import HscTypes import TcEnv@@ -68,6 +68,7 @@ import BasicTypes       ( pprWarningTxtForMsg, TopLevelFlag(..)) import SrcLoc import Outputable+import UniqSet          ( uniqSetAny ) import Util import Maybes import DynFlags@@ -220,7 +221,7 @@  Note [Type and class operator definitions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We want to reject all of these unless we have -XTypeOperators (Trac #3265)+We want to reject all of these unless we have -XTypeOperators (#3265)    data a :*: b  = ...    class a :*: b where ...    data (:*:) a b  = ....@@ -518,7 +519,7 @@ Whenever we fail to find the field or it is not in scope, mb_field will be False, and we fall back on looking it up normally using lookupGlobalOccRn.  We don't report an error immediately because the-actual problem might be located elsewhere.  For example (Trac #9975):+actual problem might be located elsewhere.  For example (#9975):     data Test = Test { x :: Int }    pattern Test wat = Test { x = wat }@@ -531,7 +532,7 @@ (nonexistent) fields of the pattern synonym.  Alternatively, the scope check can fail due to Template Haskell.-Consider (Trac #12130):+Consider (#12130):     module Foo where      import M@@ -844,7 +845,7 @@  So how can we get multiple gres in lookupExactOcc_maybe?  Because in TH we might use the same TH NameU in two different name spaces.-eg (Trac #7241):+eg (#7241):    $(newName "Foo" >>= \o -> return [DataD [] o [] [RecC o []] [''Show]]) Here we generate a type constructor and data constructor with the same unique, but different name spaces.@@ -972,7 +973,7 @@  {- Note [Promoted variables in types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (Trac #12686):+Consider this (#12686):    x = True    data Bad = Bad 'x @@ -1054,7 +1055,10 @@ -- lookupInfoOccRn is intended for use in GHCi's ":info" command -- It finds all the GREs that RdrName could mean, not complaining -- about ambiguity, but rather returning them all--- C.f. Trac #9881+-- C.f. #9881+-- lookupInfoOccRn is also used in situations where we check for+-- at least one definition of the RdrName, not complaining about+-- multiple definitions. (See #17832) lookupInfoOccRn rdr_name =   lookupExactOrOrig rdr_name (:[]) $     do { rdr_env <- getGlobalRdrEnv@@ -1188,7 +1192,7 @@ Note [Handling of deprecations] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * We report deprecations at each *occurrence* of the deprecated thing-  (see Trac #5867)+  (see #5867)  * We do not report deprecations for locally-defined names. For a   start, we may be exporting a deprecated thing. Also we may use a@@ -1203,7 +1207,7 @@ -}  addUsedDataCons :: GlobalRdrEnv -> TyCon -> RnM ()--- Remember use of in-scope data constructors (Trac #7969)+-- Remember use of in-scope data constructors (#7969) addUsedDataCons rdr_env tycon   = addUsedGREs [ gre                 | dc <- tyConDataCons tycon@@ -1265,10 +1269,10 @@  lookupImpDeprec :: ModIface -> GlobalRdrElt -> Maybe WarningTxt lookupImpDeprec iface gre-  = mi_warn_fn iface (greOccName gre) `mplus`  -- Bleat if the thing,+  = mi_warn_fn (mi_final_exts iface) (greOccName gre) `mplus`  -- Bleat if the thing,     case gre_par gre of                      -- or its parent, is warn'd-       ParentIs  p              -> mi_warn_fn iface (nameOccName p)-       FldParent { par_is = p } -> mi_warn_fn iface (nameOccName p)+       ParentIs  p              -> mi_warn_fn (mi_final_exts iface) (nameOccName p)+       FldParent { par_is = p } -> mi_warn_fn (mi_final_exts iface) (nameOccName p)        NoParent                 -> Nothing  {-@@ -1374,7 +1378,7 @@         f :: Int -> Int         g x = x We don't want to say 'f' is out of scope; instead, we want to-return the imported 'f', so that later on the reanamer will+return the imported 'f', so that later on the renamer will correctly report "misplaced type sig".  Note [Signatures for top level things]@@ -1462,7 +1466,9 @@       RoleAnnotCtxt ns -> lookup_top (`elemNameSet` ns)       LocalBindCtxt ns -> lookup_group ns       ClsDeclCtxt  cls -> lookup_cls_op cls-      InstDeclCtxt ns  -> lookup_top (`elemNameSet` ns)+      InstDeclCtxt ns  -> if uniqSetAny isUnboundName ns -- #16610+                          then return (Right $ mkUnboundNameRdr rdr_name)+                          else lookup_top (`elemNameSet` ns)   where     lookup_cls_op cls       = lookupSubBndrOcc True cls doc rdr_name@@ -1472,18 +1478,30 @@     lookup_top keep_me       = do { env <- getGlobalRdrEnv            ; let all_gres = lookupGlobalRdrEnv env (rdrNameOcc rdr_name)+                 names_in_scope = -- If rdr_name lacks a binding, only+                                  -- recommend alternatives from related+                                  -- namespaces. See #17593.+                                  filter (\n -> nameSpacesRelated+                                                  (rdrNameSpace rdr_name)+                                                  (nameNameSpace n))+                                $ map gre_name+                                $ filter isLocalGRE+                                $ globalRdrEnvElts env+                 candidates_msg = candidates names_in_scope            ; case filter (keep_me . gre_name) all_gres of-               [] | null all_gres -> bale_out_with Outputable.empty+               [] | null all_gres -> bale_out_with candidates_msg                   | otherwise     -> bale_out_with local_msg                (gre:_)            -> return (Right (gre_name gre)) }      lookup_group bound_names  -- Look in the local envt (not top level)       = do { mname <- lookupLocalOccRn_maybe rdr_name+           ; env <- getLocalRdrEnv+           ; let candidates_msg = candidates $ localRdrEnvElts env            ; case mname of                Just n                  | n `elemNameSet` bound_names -> return (Right n)                  | otherwise                   -> bale_out_with local_msg-               Nothing                         -> bale_out_with Outputable.empty }+               Nothing                         -> bale_out_with candidates_msg }      bale_out_with msg         = return (Left (sep [ text "The" <+> what@@ -1494,7 +1512,23 @@     local_msg = parens $ text "The"  <+> what <+> ptext (sLit "must be given where")                            <+> quotes (ppr rdr_name) <+> text "is declared" +    -- Identify all similar names and produce a message listing them+    candidates :: [Name] -> MsgDoc+    candidates names_in_scope+      = case similar_names of+          []  -> Outputable.empty+          [n] -> text "Perhaps you meant" <+> pp_item n+          _   -> sep [ text "Perhaps you meant one of these:"+                     , nest 2 (pprWithCommas pp_item similar_names) ]+      where+        similar_names+          = fuzzyLookup (unpackFS $ occNameFS $ rdrNameOcc rdr_name)+                        $ map (\x -> ((unpackFS $ occNameFS $ nameOccName x), x))+                              names_in_scope +        pp_item x = quotes (ppr x) <+> parens (pprDefinedAt x)++ --------------- lookupLocalTcNames :: HsSigCtxt -> SDoc -> RdrName -> RnM [(RdrName, Name)] -- GHC extension: look up both the tycon and data con or variable.@@ -1634,10 +1668,10 @@ lookupSyntaxNames std_names   = do { rebindable_on <- xoptM LangExt.RebindableSyntax        ; if not rebindable_on then-             return (map (HsVar noExt . noLoc) std_names, emptyFVs)+             return (map (HsVar noExtField . noLoc) std_names, emptyFVs)         else           do { usr_names <- mapM (lookupOccRn . mkRdrUnqual . nameOccName) std_names-             ; return (map (HsVar noExt . noLoc) usr_names, mkFVs usr_names) } }+             ; return (map (HsVar noExtField . noLoc) usr_names, mkFVs usr_names) } }  -- Error messages @@ -1660,6 +1694,6 @@     --     --   $(pure [ValD (VarP 'succ) (NormalB (ConE 'True)) []])     ---    -- (See Trac #13968.)+    -- (See #13968.)   where     occ = rdrNameOcc $ filterCTuple name
rename/RnExpr.hs view
@@ -26,7 +26,7 @@  import RnBinds   ( rnLocalBindsAndThen, rnLocalValBindsLHS, rnLocalValBindsRHS,                    rnMatchGroup, rnGRHS, makeMiniFixityEnv)-import HsSyn+import GHC.Hs import TcEnv            ( isBrackStage ) import TcRnMonad import Module           ( getModule )@@ -35,7 +35,8 @@ import RnUtils          ( HsDocContext(..), bindLocalNamesFV, checkDupNames                         , bindLocalNames                         , mapMaybeFvRn, mapFvRn-                        , warnUnusedLocalBinds, typeAppErr )+                        , warnUnusedLocalBinds, typeAppErr+                        , checkUnusedRecordWildcard ) import RnUnbound        ( reportUnboundName ) import RnSplice         ( rnBracket, rnSpliceExpr, checkThLocalName ) import RnTypes@@ -99,7 +100,7 @@  = do { this_mod <- getModule       ; when (nameIsLocalOrFrom this_mod name) $         checkThLocalName name-      ; return (HsVar noExt (L l name), unitFV name) }+      ; return (HsVar noExtField (L l name), unitFV name) }  rnUnboundVar :: RdrName -> RnM (HsExpr GhcRn, FreeVars) rnUnboundVar v@@ -111,34 +112,40 @@                 ; uv <- if startsWithUnderscore occ                         then return (TrueExprHole occ)                         else OutOfScope occ <$> getGlobalRdrEnv-                ; return (HsUnboundVar noExt uv, emptyFVs) }+                ; return (HsUnboundVar noExtField uv, emptyFVs) }          else -- Fail immediately (qualified name)              do { n <- reportUnboundName v-                ; return (HsVar noExt (noLoc n), emptyFVs) } }+                ; return (HsVar noExtField (noLoc n), emptyFVs) } }  rnExpr (HsVar _ (L l v))   = do { opt_DuplicateRecordFields <- xoptM LangExt.DuplicateRecordFields        ; mb_name <- lookupOccRn_overloaded opt_DuplicateRecordFields v+       ; dflags <- getDynFlags        ; case mb_name of {            Nothing -> rnUnboundVar v ;            Just (Left name)               | name == nilDataConName -- Treat [] as an ExplicitList, so that                                        -- OverloadedLists works correctly-              -> rnExpr (ExplicitList noExt Nothing [])+                                       -- Note [Empty lists] in GHC.Hs.Expr+              , xopt LangExt.OverloadedLists dflags+              -> rnExpr (ExplicitList noExtField Nothing [])                | otherwise               -> finishHsVar (L l name) ;             Just (Right [s]) ->-              return ( HsRecFld noExt (Unambiguous s (L l v) ), unitFV s) ;+              return ( HsRecFld noExtField (Unambiguous s (L l v) ), unitFV s) ;            Just (Right fs@(_:_:_)) ->-              return ( HsRecFld noExt (Ambiguous noExt (L l v))+              return ( HsRecFld noExtField (Ambiguous noExtField (L l v))                      , mkFVs fs);            Just (Right [])         -> panic "runExpr/HsVar" } }  rnExpr (HsIPVar x v)   = return (HsIPVar x v, emptyFVs) +rnExpr (HsUnboundVar x v)+  = return (HsUnboundVar x v, emptyFVs)+ rnExpr (HsOverLabel x _ v)   = do { rebindable_on <- xoptM LangExt.RebindableSyntax        ; if rebindable_on@@ -204,8 +211,6 @@  ------------------------------------------ -- Template Haskell extensions--- Don't ifdef-GHCI them because we want to fail gracefully--- (not with an rnExpr crash) in a stage-1 compiler. rnExpr e@(HsBracket _ br_body) = rnBracket e br_body  rnExpr (HsSpliceE _ splice) = rnSpliceExpr splice@@ -286,9 +291,9 @@   where     rnTupArg (L l (Present x e)) = do { (e',fvs) <- rnLExpr e                                       ; return (L l (Present x e'), fvs) }-    rnTupArg (L l (Missing _)) = return (L l (Missing noExt)+    rnTupArg (L l (Missing _)) = return (L l (Missing noExtField)                                         , emptyFVs)-    rnTupArg (L _ (XTupArg {})) = panic "rnExpr.XTupArg"+    rnTupArg (L _ (XTupArg nec)) = noExtCon nec  rnExpr (ExplicitSum x alt arity expr)   = do { (expr', fvs) <- rnLExpr expr@@ -300,18 +305,18 @@        ; (flds, fvs)   <- rnHsRecFields (HsRecFieldCon con_name) mk_hs_var rec_binds        ; (flds', fvss) <- mapAndUnzipM rn_field flds        ; let rec_binds' = HsRecFields { rec_flds = flds', rec_dotdot = dd }-       ; return (RecordCon { rcon_ext = noExt+       ; return (RecordCon { rcon_ext = noExtField                            , rcon_con_name = con_lname, rcon_flds = rec_binds' }                 , fvs `plusFV` plusFVs fvss `addOneFV` con_name) }   where-    mk_hs_var l n = HsVar noExt (L l n)+    mk_hs_var l n = HsVar noExtField (L l n)     rn_field (L l fld) = do { (arg', fvs) <- rnLExpr (hsRecFieldArg fld)                             ; return (L l (fld { hsRecFieldArg = arg' }), fvs) }  rnExpr (RecordUpd { rupd_expr = expr, rupd_flds = rbinds })   = do  { (expr', fvExpr) <- rnLExpr expr         ; (rbinds', fvRbinds) <- rnHsRecUpdFields rbinds-        ; return (RecordUpd { rupd_ext = noExt, rupd_expr = expr'+        ; return (RecordUpd { rupd_ext = noExtField, rupd_expr = expr'                             , rupd_flds = rbinds' }                  , fvExpr `plusFV` fvRbinds) } @@ -319,7 +324,7 @@   = do  { (pty', fvTy)    <- rnHsSigWcType BindUnlessForall ExprWithTySigCtx pty         ; (expr', fvExpr) <- bindSigTyVarsFV (hsWcScopedTvs pty') $                              rnLExpr expr-        ; return (ExprWithTySig noExt expr' pty', fvExpr `plusFV` fvTy) }+        ; return (ExprWithTySig noExtField expr' pty', fvExpr `plusFV` fvTy) }  rnExpr (HsIf x _ p b1 b2)   = do { (p', fvP) <- rnLExpr p@@ -345,24 +350,6 @@             return (ArithSeq x Nothing new_seq, fvs) }  {--These three are pattern syntax appearing in expressions.-Since all the symbols are reservedops we can simply reject them.-We return a (bogus) EWildPat in each case.--}--rnExpr (EWildPat _)  = return (hsHoleExpr, emptyFVs)   -- "_" is just a hole-rnExpr e@(EAsPat {})-  = do { opt_TypeApplications <- xoptM LangExt.TypeApplications-       ; let msg | opt_TypeApplications-                    = "Type application syntax requires a space before '@'"-                 | otherwise-                    = "Did you mean to enable TypeApplications?"-       ; patSynErr e (text msg)-       }-rnExpr e@(EViewPat {}) = patSynErr e empty-rnExpr e@(ELazyPat {}) = patSynErr e empty--{- ************************************************************************ *                                                                      *         Static values@@ -411,24 +398,9 @@       { (body',fvBody) <- rnCmdTop body       ; return (HsProc x pat' body', fvBody) } --- Ideally, these would be done in parsing, but to keep parsing simple, we do it here.-rnExpr e@(HsArrApp {})  = arrowFail e-rnExpr e@(HsArrForm {}) = arrowFail e- rnExpr other = pprPanic "rnExpr: unexpected expression" (ppr other)         -- HsWrap -hsHoleExpr :: HsExpr (GhcPass id)-hsHoleExpr = HsUnboundVar noExt (TrueExprHole (mkVarOcc "_"))--arrowFail :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars)-arrowFail e-  = do { addErr (vcat [ text "Arrow command found where an expression was expected:"-                      , nest 2 (ppr e) ])-         -- Return a place-holder hole, so that we can carry on-         -- to report other errors-       ; return (hsHoleExpr, emptyFVs) }- ---------------------- -- See Note [Parsing sections] in Parser.y rnSection :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars)@@ -473,7 +445,7 @@          ; return (HsCmdTop (cmd_names `zip` cmd_names') cmd',                   fvCmd `plusFV` cmd_fvs) }-  rnCmdTop' (XCmdTop{}) = panic "rnCmdTop"+  rnCmdTop' (XCmdTop nec) = noExtCon nec  rnLCmd :: LHsCmd GhcPs -> RnM (LHsCmd GhcRn, FreeVars) rnLCmd = wrapLocFstM rnCmd@@ -547,7 +519,7 @@         ; return ( HsCmdDo x (L l stmts'), fvs ) }  rnCmd cmd@(HsCmdWrap {}) = pprPanic "rnCmd" (ppr cmd)-rnCmd cmd@(XCmd {})      = pprPanic "rnCmd" (ppr cmd)+rnCmd     (XCmd nec)     = noExtCon nec  --------------------------------------------------- type CmdNeeds = FreeVars        -- Only inhabitants are@@ -579,7 +551,7 @@ methodNamesCmd (HsCmdCase _ _ matches)   = methodNamesMatch matches `addOneFV` choiceAName -methodNamesCmd (XCmd {}) = panic "methodNamesCmd"+methodNamesCmd (XCmd nec) = noExtCon nec  --methodNamesCmd _ = emptyFVs    -- Other forms can't occur in commands, but it's not convenient@@ -592,20 +564,20 @@   = plusFVs (map do_one ms)  where     do_one (L _ (Match { m_grhss = grhss })) = methodNamesGRHSs grhss-    do_one (L _ (XMatch _)) = panic "methodNamesMatch.XMatch"-methodNamesMatch (XMatchGroup _) = panic "methodNamesMatch"+    do_one (L _ (XMatch nec)) = noExtCon nec+methodNamesMatch (XMatchGroup nec) = noExtCon nec  ------------------------------------------------- -- gaw 2004 methodNamesGRHSs :: GRHSs GhcRn (LHsCmd GhcRn) -> FreeVars methodNamesGRHSs (GRHSs _ grhss _) = plusFVs (map methodNamesGRHS grhss)-methodNamesGRHSs (XGRHSs _) = panic "methodNamesGRHSs"+methodNamesGRHSs (XGRHSs nec) = noExtCon nec  -------------------------------------------------  methodNamesGRHS :: Located (GRHS GhcRn (LHsCmd GhcRn)) -> CmdNeeds methodNamesGRHS (L _ (GRHS _ _ rhs)) = methodNamesLCmd rhs-methodNamesGRHS (L _ (XGRHS _)) = panic "methodNamesGRHS"+methodNamesGRHS (L _ (XGRHS nec)) = noExtCon nec  --------------------------------------------------- methodNamesStmts :: [Located (StmtLR GhcRn GhcRn (LHsCmd GhcRn))] -> FreeVars@@ -627,7 +599,7 @@ methodNamesStmt ApplicativeStmt{}              = emptyFVs    -- ParStmt and TransStmt can't occur in commands, but it's not    -- convenient to error here so we just do what's convenient-methodNamesStmt (XStmtLR {}) = panic "methodNamesStmt"+methodNamesStmt (XStmtLR nec) = noExtCon nec  {- ************************************************************************@@ -837,10 +809,10 @@                             -- The 'return' in a LastStmt is used only                             -- for MonadComp; and we don't want to report                             -- "non in scope: return" in other cases-                            -- Trac #15607+                            -- #15607          ; (thing,  fvs3) <- thing_inside []-        ; return (([(L loc (LastStmt noExt body' noret ret_op), fv_expr)]+        ; return (([(L loc (LastStmt noExtField body' noret ret_op), fv_expr)]                   , thing), fv_expr `plusFV` fvs1 `plusFV` fvs3) }  rnStmt ctxt rnBody (L loc (BodyStmt _ body _ _)) thing_inside@@ -855,7 +827,7 @@                               -- Here "gd" is a guard          ; (thing, fvs3)    <- thing_inside []-        ; return ( ([(L loc (BodyStmt noExt body' then_op guard_op), fv_expr)]+        ; return ( ([(L loc (BodyStmt noExtField body' then_op guard_op), fv_expr)]                   , thing), fv_expr `plusFV` fvs1 `plusFV` fvs2 `plusFV` fvs3) }  rnStmt ctxt rnBody (L loc (BindStmt _ pat body _ _)) thing_inside@@ -867,7 +839,7 @@          ; rnPat (StmtCtxt ctxt) pat $ \ pat' -> do         { (thing, fvs3) <- thing_inside (collectPatBinders pat')-        ; return (( [( L loc (BindStmt noExt pat' body' bind_op fail_op)+        ; return (( [( L loc (BindStmt noExtField pat' body' bind_op fail_op)                      , fv_expr )]                   , thing),                   fv_expr `plusFV` fvs1 `plusFV` fvs2 `plusFV` fvs3) }}@@ -877,7 +849,7 @@ rnStmt _ _ (L loc (LetStmt _ (L l binds))) thing_inside   = do  { rnLocalBindsAndThen binds $ \binds' bind_fvs -> do         { (thing, fvs) <- thing_inside (collectLocalBinders binds')-        ; return ( ([(L loc (LetStmt noExt (L l binds')), bind_fvs)], thing)+        ; return ( ([(L loc (LetStmt noExtField (L l binds')), bind_fvs)], thing)                  , fvs) }  }  rnStmt ctxt rnBody (L loc (RecStmt { recS_stmts = rec_stmts })) thing_inside@@ -915,7 +887,7 @@         ; (bind_op, fvs2)   <- lookupStmtName ctxt bindMName         ; (return_op, fvs3) <- lookupStmtName ctxt returnMName         ; ((segs', thing), fvs4) <- rnParallelStmts (ParStmtCtxt ctxt) return_op segs thing_inside-        ; return (([(L loc (ParStmt noExt segs' mzip_op bind_op), fvs4)], thing)+        ; return (([(L loc (ParStmt noExtField segs' mzip_op bind_op), fvs4)], thing)                  , fvs1 `plusFV` fvs2 `plusFV` fvs3 `plusFV` fvs4) }  rnStmt ctxt _ (L loc (TransStmt { trS_stmts = stmts, trS_by = by, trS_form = form@@ -945,10 +917,10 @@        ; let all_fvs  = fvs1 `plusFV` fvs2 `plusFV` fvs3                              `plusFV` fvs4 `plusFV` fvs5              bndr_map = used_bndrs `zip` used_bndrs-             -- See Note [TransStmt binder map] in HsExpr+             -- See Note [TransStmt binder map] in GHC.Hs.Expr         ; traceRn "rnStmt: implicitly rebound these used binders:" (ppr bndr_map)-       ; return (([(L loc (TransStmt { trS_ext = noExt+       ; return (([(L loc (TransStmt { trS_ext = noExtField                                     , trS_stmts = stmts', trS_bndrs = bndr_map                                     , trS_by = by', trS_using = using', trS_form = form                                     , trS_ret = return_op, trS_bind = bind_op@@ -957,8 +929,8 @@ rnStmt _ _ (L _ ApplicativeStmt{}) _ =   panic "rnStmt: ApplicativeStmt" -rnStmt _ _ (L _ XStmtLR{}) _ =-  panic "rnStmt: XStmtLR"+rnStmt _ _ (L _ (XStmtLR nec)) _ =+  noExtCon nec  rnParallelStmts :: forall thing. HsStmtContext Name                 -> SyntaxExpr GhcRn@@ -989,7 +961,7 @@             ; let seg' = ParStmtBlock x stmts' used_bndrs return_op            ; return ((seg':segs', thing), fvs) }-    rn_segs _ _ (XParStmtBlock{}:_) = panic "rnParallelStmts"+    rn_segs _ _ (XParStmtBlock nec:_) = noExtCon nec      cmpByOcc n1 n2 = nameOccName n1 `compare` nameOccName n2     dupErr vs = addErr (text "Duplicate binding in parallel list comprehension for:"@@ -1009,12 +981,12 @@   = do { rebindable_on <- xoptM LangExt.RebindableSyntax        ; if rebindable_on          then do { fm <- lookupOccRn (nameRdrName name)-                 ; return (HsVar noExt (noLoc fm), unitFV fm) }+                 ; return (HsVar noExtField (noLoc fm), unitFV fm) }          else not_rebindable }   | otherwise   = not_rebindable   where-    not_rebindable = return (HsVar noExt (noLoc name), emptyFVs)+    not_rebindable = return (HsVar noExtField (noLoc name), emptyFVs)  -- | Is this a context where we respect RebindableSyntax? -- but ListComp are never rebindable@@ -1089,13 +1061,16 @@           --    ...bring them and their fixities into scope         ; let bound_names = collectLStmtsBinders (map fst new_lhs_and_fv)               -- Fake uses of variables introduced implicitly (warning suppression, see #4404)-              implicit_uses = lStmtsImplicits (map fst new_lhs_and_fv)+              rec_uses = lStmtsImplicits (map fst new_lhs_and_fv)+              implicit_uses = mkNameSet $ concatMap snd $ rec_uses         ; bindLocalNamesFV bound_names $           addLocalFixities fix_env bound_names $ do            -- (C) do the right-hand-sides and thing-inside         { segs <- rn_rec_stmts rnBody bound_names new_lhs_and_fv         ; (res, fvs) <- cont segs+        ; mapM_ (\(loc, ns) -> checkUnusedRecordWildcard loc fvs (Just ns))+                rec_uses         ; warnUnusedLocalBinds bound_names (fvs `unionNameSet` implicit_uses)         ; return (res, fvs) }} @@ -1119,23 +1094,23 @@                 -> RnM [(LStmtLR GhcRn GhcPs body, FreeVars)]  rn_rec_stmt_lhs _ (L loc (BodyStmt _ body a b))-  = return [(L loc (BodyStmt noExt body a b), emptyFVs)]+  = return [(L loc (BodyStmt noExtField body a b), emptyFVs)]  rn_rec_stmt_lhs _ (L loc (LastStmt _ body noret a))-  = return [(L loc (LastStmt noExt body noret a), emptyFVs)]+  = return [(L loc (LastStmt noExtField body noret a), emptyFVs)]  rn_rec_stmt_lhs fix_env (L loc (BindStmt _ pat body a b))   = do       -- should the ctxt be MDo instead?       (pat', fv_pat) <- rnBindPat (localRecNameMaker fix_env) pat-      return [(L loc (BindStmt noExt pat' body a b), fv_pat)]+      return [(L loc (BindStmt noExtField pat' body a b), fv_pat)]  rn_rec_stmt_lhs _ (L _ (LetStmt _ (L _ binds@(HsIPBinds {}))))   = failWith (badIpBinds (text "an mdo expression") binds)  rn_rec_stmt_lhs fix_env (L loc (LetStmt _ (L l (HsValBinds x binds))))     = do (_bound_names, binds') <- rnLocalValBindsLHS fix_env binds-         return [(L loc (LetStmt noExt (L l (HsValBinds x binds'))),+         return [(L loc (LetStmt noExtField (L l (HsValBinds x binds'))),                  -- Warning: this is bogus; see function invariant                  emptyFVs                  )]@@ -1155,10 +1130,10 @@  rn_rec_stmt_lhs _ (L _ (LetStmt _ (L _ (EmptyLocalBinds _))))   = panic "rn_rec_stmt LetStmt EmptyLocalBinds"-rn_rec_stmt_lhs _ (L _ (LetStmt _ (L _ (XHsLocalBindsLR _))))-  = panic "rn_rec_stmt LetStmt XHsLocalBindsLR"-rn_rec_stmt_lhs _ (L _ (XStmtLR _))-  = panic "rn_rec_stmt XStmtLR"+rn_rec_stmt_lhs _ (L _ (LetStmt _ (L _ (XHsLocalBindsLR nec))))+  = noExtCon nec+rn_rec_stmt_lhs _ (L _ (XStmtLR nec))+  = noExtCon nec  rn_rec_stmts_lhs :: Outputable body => MiniFixityEnv                  -> [LStmt GhcPs body]@@ -1187,13 +1162,13 @@   = do  { (body', fv_expr) <- rnBody body         ; (ret_op, fvs1)   <- lookupSyntaxName returnMName         ; return [(emptyNameSet, fv_expr `plusFV` fvs1, emptyNameSet,-                   L loc (LastStmt noExt body' noret ret_op))] }+                   L loc (LastStmt noExtField body' noret ret_op))] }  rn_rec_stmt rnBody _ (L loc (BodyStmt _ body _ _), _)   = do { (body', fvs) <- rnBody body        ; (then_op, fvs1) <- lookupSyntaxName thenMName        ; return [(emptyNameSet, fvs `plusFV` fvs1, emptyNameSet,-                 L loc (BodyStmt noExt body' then_op noSyntaxExpr))] }+                 L loc (BodyStmt noExtField body' then_op noSyntaxExpr))] }  rn_rec_stmt rnBody _ (L loc (BindStmt _ pat' body _ _), fv_pat)   = do { (body', fv_expr) <- rnBody body@@ -1204,7 +1179,7 @@        ; let bndrs = mkNameSet (collectPatBinders pat')              fvs   = fv_expr `plusFV` fv_pat `plusFV` fvs1 `plusFV` fvs2        ; return [(bndrs, fvs, bndrs `intersectNameSet` fvs,-                  L loc (BindStmt noExt pat' body' bind_op fail_op))] }+                  L loc (BindStmt noExtField pat' body' bind_op fail_op))] }  rn_rec_stmt _ _ (L _ (LetStmt _ (L _ binds@(HsIPBinds {}))), _)   = failWith (badIpBinds (text "an mdo expression") binds)@@ -1214,7 +1189,7 @@            -- fixities and unused are handled above in rnRecStmtsAndThen        ; let fvs = allUses du_binds        ; return [(duDefs du_binds, fvs, emptyNameSet,-                 L loc (LetStmt noExt (L l (HsValBinds x binds'))))] }+                 L loc (LetStmt noExtField (L l (HsValBinds x binds'))))] }  -- no RecStmt case because they get flattened above when doing the LHSes rn_rec_stmt _ _ stmt@(L _ (RecStmt {}), _)@@ -1226,8 +1201,8 @@ rn_rec_stmt _ _ stmt@(L _ (TransStmt {}), _)     -- Syntactically illegal in mdo   = pprPanic "rn_rec_stmt: TransStmt" (ppr stmt) -rn_rec_stmt _ _ (L _ (LetStmt _ (L _ (XHsLocalBindsLR _))), _)-  = panic "rn_rec_stmt: LetStmt XHsLocalBindsLR"+rn_rec_stmt _ _ (L _ (LetStmt _ (L _ (XHsLocalBindsLR nec))), _)+  = noExtCon nec  rn_rec_stmt _ _ (L _ (LetStmt _ (L _ (EmptyLocalBinds _))), _)   = panic "rn_rec_stmt: LetStmt EmptyLocalBinds"@@ -1235,8 +1210,8 @@ rn_rec_stmt _ _ stmt@(L _ (ApplicativeStmt {}), _)   = pprPanic "rn_rec_stmt: ApplicativeStmt" (ppr stmt) -rn_rec_stmt _ _ stmt@(L _ (XStmtLR {}), _)-  = pprPanic "rn_rec_stmt: XStmtLR" (ppr stmt)+rn_rec_stmt _ _ (L _ (XStmtLR nec), _)+  = noExtCon nec  rn_rec_stmts :: Outputable (body GhcPs) =>                 (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))@@ -1313,7 +1288,7 @@ ~~~~~~~~~~~~~~~~~~~~~ NB. June 7 2012: We only glom segments that appear in an explicit mdo; and leave those found in "do rec"'s intact.  See-http://ghc.haskell.org/trac/ghc/ticket/4148 for the discussion+https://gitlab.haskell.org/ghc/ghc/issues/4148 for the discussion leading to this design choice.  Hence the test in segmentRecStmts.  Note [Glomming segments]@@ -1521,12 +1496,45 @@      <*> ...      <*> argexpr(arg_n) += Relevant modules in the rest of the compiler =++ApplicativeDo touches a few phases in the compiler:++* Renamer: The journey begins here in the renamer, where do-blocks are+  scheduled as outlined above and transformed into applicative+  combinators.  However, the code is still represented as a do-block+  with special forms of applicative statements. This allows us to+  recover the original do-block when e.g. printing type errors, where+  we don't want to show any of the applicative combinators since they+  don't exist in the source code.+  See ApplicativeStmt and ApplicativeArg in HsExpr.++* Typechecker: ApplicativeDo passes through the typechecker much like any+  other form of expression. The only crux is that the typechecker has to+  be aware of the special ApplicativeDo statements in the do-notation, and+  typecheck them appropriately.+  Relevant module: TcMatches++* Desugarer: Any do-block which contains applicative statements is desugared+  as outlined above, to use the Applicative combinators.+  Relevant module: DsExpr+ -}  -- | The 'Name's of @return@ and @pure@. These may not be 'returnName' and -- 'pureName' due to @RebindableSyntax@. data MonadNames = MonadNames { return_name, pure_name :: Name } +instance Outputable MonadNames where+  ppr (MonadNames {return_name=return_name,pure_name=pure_name}) =+    hcat+    [text "MonadNames { return_name = "+    ,ppr return_name+    ,text ", pure_name = "+    ,ppr pure_name+    ,text "}"+    ]+ -- | rearrange a list of statements using ApplicativeDoStmt.  See -- Note [ApplicativeDo]. rearrangeForApplicativeDo@@ -1669,16 +1677,27 @@ -- In the spec, but we do it here rather than in the desugarer, -- because we need the typechecker to typecheck the <$> form rather than -- the bind form, which would give rise to a Monad constraint.-stmtTreeToStmts monad_names ctxt (StmtTreeOne (L _ (BindStmt _ pat rhs _ _), _))+stmtTreeToStmts monad_names ctxt (StmtTreeOne (L _ (BindStmt _ pat rhs _ fail_op), _))                 tail _tail_fvs   | not (isStrictPattern pat), (False,tail') <- needJoin monad_names tail   -- See Note [ApplicativeDo and strict patterns]-  = mkApplicativeStmt ctxt [ApplicativeArgOne noExt pat rhs False] False tail'+  = mkApplicativeStmt ctxt [ApplicativeArgOne+                            { xarg_app_arg_one = noExtField+                            , app_arg_pattern  = pat+                            , arg_expr         = rhs+                            , is_body_stmt     = False+                            , fail_operator    = fail_op}]+                      False tail' stmtTreeToStmts monad_names ctxt (StmtTreeOne (L _ (BodyStmt _ rhs _ _),_))                 tail _tail_fvs   | (False,tail') <- needJoin monad_names tail   = mkApplicativeStmt ctxt-      [ApplicativeArgOne noExt nlWildPatName rhs True] False tail'+      [ApplicativeArgOne+       { xarg_app_arg_one = noExtField+       , app_arg_pattern  = nlWildPatName+       , arg_expr         = rhs+       , is_body_stmt     = True+       , fail_operator    = noSyntaxExpr}] False tail'  stmtTreeToStmts _monad_names _ctxt (StmtTreeOne (s,_)) tail _tail_fvs =   return (s : tail, emptyNameSet)@@ -1692,14 +1711,31 @@ stmtTreeToStmts monad_names ctxt (StmtTreeApplicative trees) tail tail_fvs = do    pairs <- mapM (stmtTreeArg ctxt tail_fvs) trees    let (stmts', fvss) = unzip pairs-   let (need_join, tail') = needJoin monad_names tail+   let (need_join, tail') =+     -- See Note [ApplicativeDo and refutable patterns]+         if any hasRefutablePattern stmts'+         then (True, tail)+         else needJoin monad_names tail+    (stmts, fvs) <- mkApplicativeStmt ctxt stmts' need_join tail'    return (stmts, unionNameSets (fvs:fvss))  where-   stmtTreeArg _ctxt _tail_fvs (StmtTreeOne (L _ (BindStmt _ pat exp _ _), _))-     = return (ApplicativeArgOne noExt pat exp False, emptyFVs)+   stmtTreeArg _ctxt _tail_fvs (StmtTreeOne (L _ (BindStmt _ pat exp _ fail_op), _))+     = return (ApplicativeArgOne+               { xarg_app_arg_one = noExtField+               , app_arg_pattern  = pat+               , arg_expr         = exp+               , is_body_stmt     = False+               , fail_operator    = fail_op+               }, emptyFVs)    stmtTreeArg _ctxt _tail_fvs (StmtTreeOne (L _ (BodyStmt _ exp _ _), _)) =-     return (ApplicativeArgOne noExt nlWildPatName exp True, emptyFVs)+     return (ApplicativeArgOne+             { xarg_app_arg_one = noExtField+             , app_arg_pattern  = nlWildPatName+             , arg_expr         = exp+             , is_body_stmt     = True+             , fail_operator    = noSyntaxExpr+             }, emptyFVs)    stmtTreeArg ctxt tail_fvs tree = do      let stmts = flattenStmtTree tree          pvarset = mkNameSet (concatMap (collectStmtBinders.unLoc.fst) stmts)@@ -1713,9 +1749,15 @@         if | L _ ApplicativeStmt{} <- last stmts' ->              return (unLoc tup, emptyNameSet)            | otherwise -> do-             (ret,fvs) <- lookupStmtNamePoly ctxt returnMName-             return (HsApp noExt (noLoc ret) tup, fvs)-     return ( ApplicativeArgMany noExt stmts' mb_ret pat+             ret <- lookupSyntaxName' returnMName+             let expr = HsApp noExtField (noLoc (HsVar noExtField (noLoc ret))) tup+             return (expr, emptyFVs)+     return ( ApplicativeArgMany+              { xarg_app_arg_many = noExtField+              , app_stmts         = stmts'+              , final_expr        = mb_ret+              , bv_pattern        = pat+              }             , fvs1 `plusFV` fvs2)  @@ -1819,6 +1861,20 @@     SplicePat{}     -> True     _otherwise -> panic "isStrictPattern" +{-+Note [ApplicativeDo and refutable patterns]++Refutable patterns in do blocks are desugared to use the monadic 'fail' operation.+This means that sometimes an applicative block needs to be wrapped in 'join' simply because+of a refutable pattern, in order for the types to work out.++-}++hasRefutablePattern :: ApplicativeArg GhcRn -> Bool+hasRefutablePattern (ApplicativeArgOne { app_arg_pattern = pat+                                       , is_body_stmt = False}) = not (isIrrefutableHsPat pat)+hasRefutablePattern _ = False+ isLetStmt :: LStmt a b -> Bool isLetStmt (L _ LetStmt{}) = True isLetStmt _ = False@@ -1858,7 +1914,7 @@   -- an infinite loop (#14163).   go lets indep bndrs ((L loc (BindStmt _ pat body bind_op fail_op), fvs): rest)     | isEmptyNameSet (bndrs `intersectNameSet` fvs) && not (isStrictPattern pat)-    = go lets ((L loc (BindStmt noExt pat body bind_op fail_op), fvs) : indep)+    = go lets ((L loc (BindStmt noExtField pat body bind_op fail_op), fvs) : indep)          bndrs' rest     where bndrs' = bndrs `unionNameSet` mkNameSet (collectPatBinders pat)   -- If we encounter a LetStmt that doesn't depend on a BindStmt in this@@ -1866,9 +1922,9 @@   -- grouping more BindStmts.   -- TODO: perhaps we shouldn't do this if there are any strict bindings,   -- because we might be moving evaluation earlier.-  go lets indep bndrs ((L loc (LetStmt noExt binds), fvs) : rest)+  go lets indep bndrs ((L loc (LetStmt noExtField binds), fvs) : rest)     | isEmptyNameSet (bndrs `intersectNameSet` fvs)-    = go ((L loc (LetStmt noExt binds), fvs) : lets) indep bndrs rest+    = go ((L loc (LetStmt noExtField binds), fvs) : lets) indep bndrs rest   go _ []  _ _ = Nothing   go _ [_] _ _ = Nothing   go lets indep _ stmts = Just (reverse lets, reverse indep, stmts)@@ -1901,7 +1957,7 @@                 ; return (Just join_op, fvs) }            else              return (Nothing, emptyNameSet)-       ; let applicative_stmt = noLoc $ ApplicativeStmt noExt+       ; let applicative_stmt = noLoc $ ApplicativeStmt noExtField                (zip (fmap_op : repeat ap_op) args)                mb_join        ; return ( applicative_stmt : body_stmts@@ -1915,7 +1971,7 @@ needJoin _monad_names [] = (False, [])  -- we're in an ApplicativeArg needJoin monad_names  [L loc (LastStmt _ e _ t)]  | Just arg <- isReturnApp monad_names e =-       (False, [L loc (LastStmt noExt arg True t)])+       (False, [L loc (LastStmt noExtField arg True t)]) needJoin _monad_names stmts = (True, stmts)  -- | @Just e@, if the expression is @return e@ or @return $ e@,@@ -2004,7 +2060,7 @@    msg = sep [ text "Unexpected" <+> pprStmtCat stmt <+> ptext (sLit "statement")              , text "in" <+> pprAStmtContext ctxt ] -pprStmtCat :: Stmt a body -> SDoc+pprStmtCat :: Stmt (GhcPass a) body -> SDoc pprStmtCat (TransStmt {})     = text "transform" pprStmtCat (LastStmt {})      = text "return expression" pprStmtCat (BodyStmt {})      = text "body"@@ -2013,7 +2069,7 @@ pprStmtCat (RecStmt {})       = text "rec" pprStmtCat (ParStmt {})       = text "parallel" pprStmtCat (ApplicativeStmt {}) = panic "pprStmtCat: ApplicativeStmt"-pprStmtCat (XStmtLR {})         = panic "pprStmtCat: XStmtLR"+pprStmtCat (XStmtLR nec)        = noExtCon nec  ------------ emptyInvalid :: Validity  -- Payload is the empty document@@ -2079,7 +2135,7 @@        RecStmt {}  -> emptyInvalid        LastStmt {} -> emptyInvalid  -- Should not happen (dealt with by checkLastStmt)        ApplicativeStmt {} -> emptyInvalid-       XStmtLR{} -> panic "okCompStmt"+       XStmtLR nec -> noExtCon nec  --------- checkTupleSection :: [LHsTupArg GhcPs] -> RnM ()@@ -2095,12 +2151,6 @@   = hang (text "A section must be enclosed in parentheses")        2 (text "thus:" <+> (parens (ppr expr))) -patSynErr :: HsExpr GhcPs -> SDoc -> RnM (HsExpr GhcRn, FreeVars)-patSynErr e explanation = do { addErr (sep [text "Pattern syntax in expression context:",-                                nest 4 (ppr e)] $$-                                  explanation)-                 ; return (EWildPat noExt, emptyFVs) }- badIpBinds :: Outputable a => SDoc -> a -> SDoc badIpBinds what binds   = hang (text "Implicit-parameter bindings illegal in" <+> what)@@ -2166,7 +2216,7 @@                       (nlHsApp (noLoc $ syn_expr fromStringExpr)                                 (noLoc $ syn_expr arg_syn_expr))         let failAfterFromStringExpr :: HsExpr GhcRn =-              unLoc $ mkHsLam [noLoc $ VarPat noExt $ noLoc arg_name] body+              unLoc $ mkHsLam [noLoc $ VarPat noExtField $ noLoc arg_name] body         let failAfterFromStringSynExpr :: SyntaxExpr GhcRn =               mkSyntaxExpr failAfterFromStringExpr         return (failAfterFromStringSynExpr, failFvs `plusFV` fromStringFvs)
rename/RnExpr.hs-boot view
@@ -1,6 +1,6 @@ module RnExpr where import Name-import HsSyn+import GHC.Hs import NameSet     ( FreeVars ) import TcRnTypes import SrcLoc      ( Located )
rename/RnFixity.hs view
@@ -14,7 +14,7 @@ import GhcPrelude  import LoadIface-import HsSyn+import GHC.Hs import RdrName import HscTypes import TcRnMonad@@ -124,7 +124,7 @@   = return (False, Fixity NoSourceText minPrecedence InfixL)     -- Minimise errors from ubound names; eg     --    a>0 `foo` b>0-    -- where 'foo' is not in scope, should not give an error (Trac #7937)+    -- where 'foo' is not in scope, should not give an error (#7937)    | otherwise   = do { local_fix_env <- getFixityEnv@@ -157,7 +157,7 @@       -- loadInterfaceForName will find B.hi even if B is a hidden module,       -- and that's what we want.       = do { iface <- loadInterfaceForName doc name-           ; let mb_fix = mi_fix_fn iface occ+           ; let mb_fix = mi_fix_fn (mi_final_exts iface) occ            ; let msg = case mb_fix of                             Nothing ->                                   text "looking up name" <+> ppr name@@ -178,7 +178,7 @@ -- | Look up the fixity of a (possibly ambiguous) occurrence of a record field -- selector.  We use 'lookupFixityRn'' so that we can specifiy the 'OccName' as -- the field label, which might be different to the 'OccName' of the selector--- 'Name' if @DuplicateRecordFields@ is in use (Trac #1173). If there are+-- 'Name' if @DuplicateRecordFields@ is in use (#1173). If there are -- multiple possible selectors with different fixities, generate an error. lookupFieldFixityRn :: AmbiguousFieldOcc GhcRn -> RnM Fixity lookupFieldFixityRn (Unambiguous n lrdr)@@ -211,4 +211,4 @@      format_ambig (elt, fix) = hang (ppr fix)                                  2 (pprNameProvenance elt)-lookupFieldFixityRn (XAmbiguousFieldOcc{}) = panic "lookupFieldFixityRn"+lookupFieldFixityRn (XAmbiguousFieldOcc nec) = noExtCon nec
rename/RnHsDoc.hs view
@@ -5,7 +5,7 @@ import GhcPrelude  import TcRnTypes-import HsSyn+import GHC.Hs import SrcLoc  
rename/RnNames.hs view
@@ -32,7 +32,8 @@ import GhcPrelude  import DynFlags-import HsSyn+import TyCoPpr+import GHC.Hs import TcEnv import RnEnv import RnFixity@@ -239,7 +240,7 @@ if there's a lot of overlap in the imp_finsts of imports, the Set doesn't really need to grow and we don't need to allocate. -Running generateModules from Trac #14693 with DEPTH=16, WIDTH=30 finishes in+Running generateModules from #14693 with DEPTH=16, WIDTH=30 finishes in 23s before, and 11s after. -} @@ -263,11 +264,11 @@ rnImportDecl  :: Module -> LImportDecl GhcPs              -> RnM (LImportDecl GhcRn, GlobalRdrEnv, ImportAvails, AnyHpcUsage) rnImportDecl this_mod-             (L loc decl@(ImportDecl { ideclExt = noExt+             (L loc decl@(ImportDecl { ideclExt = noExtField                                      , ideclName = loc_imp_mod_name                                      , ideclPkgQual = mb_pkg                                      , ideclSource = want_boot, ideclSafe = mod_safe-                                     , ideclQualified = qual_only, ideclImplicit = implicit+                                     , ideclQualified = qual_style, ideclImplicit = implicit                                      , ideclAs = as_mod, ideclHiding = imp_details }))   = setSrcSpan loc $ do @@ -275,12 +276,14 @@         pkg_imports <- xoptM LangExt.PackageImports         when (not pkg_imports) $ addErr packageImportErr +    let qual_only = isImportDeclQualified qual_style+     -- If there's an error in loadInterface, (e.g. interface     -- file not found) we get lots of spurious errors from 'filterImports'     let imp_mod_name = unLoc loc_imp_mod_name         doc = ppr imp_mod_name <+> text "is directly imported" -    -- Check for self-import, which confuses the typechecker (Trac #9032)+    -- Check for self-import, which confuses the typechecker (#9032)     -- ghc --make rejects self-import cycles already, but batch-mode may not     -- at least not until TcIface.tcHiBootIface, which is too late to avoid     -- typechecker crashes.  (Indirect self imports are not caught until@@ -296,7 +299,7 @@           (case mb_pkg of  -- If we have import "<pkg>" M, then we should                            -- check that "<pkg>" is "this" (which is magic)                            -- or the name of this_mod's package.  Yurgh!-                           -- c.f. GHC.findModule, and Trac #9997+                           -- c.f. GHC.findModule, and #9997              Nothing         -> True              Just (StringLiteral _ pkg_fs) -> pkg_fs == fsLit "this" ||                             fsToUnitId pkg_fs == moduleUnitId this_mod))@@ -374,11 +377,14 @@           _           -> return ()      ) -    let new_imp_decl = L loc (decl { ideclExt = noExt, ideclSafe = mod_safe'+    -- Complain about -Wcompat-unqualified-imports violations.+    warnUnqualifiedImport decl iface++    let new_imp_decl = L loc (decl { ideclExt = noExtField, ideclSafe = mod_safe'                                    , ideclHiding = new_imp_details })      return (new_imp_decl, gbl_env, imports, mi_hpc iface)-rnImportDecl _ (L _ (XImportDecl _)) = panic "rnImportDecl"+rnImportDecl _ (L _ (XImportDecl nec)) = noExtCon nec  -- | Calculate the 'ImportAvails' induced by an import of a particular -- interface, but without 'imp_mods'.@@ -391,8 +397,8 @@ calculateAvails dflags iface mod_safe' want_boot imported_by =   let imp_mod    = mi_module iface       imp_sem_mod= mi_semantic_module iface-      orph_iface = mi_orphan iface-      has_finsts = mi_finsts iface+      orph_iface = mi_orphan (mi_final_exts iface)+      has_finsts = mi_finsts (mi_final_exts iface)       deps       = mi_deps iface       trust      = getSafeMode $ mi_trust iface       trust_pkg  = mi_trust_pkg iface@@ -481,6 +487,40 @@      }  +-- | Issue a warning if the user imports Data.List without either an import+-- list or `qualified`. This is part of the migration plan for the+-- `Data.List.singleton` proposal. See #17244.+warnUnqualifiedImport :: ImportDecl GhcPs -> ModIface -> RnM ()+warnUnqualifiedImport decl iface =+    whenWOptM Opt_WarnCompatUnqualifiedImports+    $ when bad_import+    $ addWarnAt (Reason Opt_WarnCompatUnqualifiedImports) loc warning+  where+    mod = mi_module iface+    loc = getLoc $ ideclName decl++    is_qual = isImportDeclQualified (ideclQualified decl)+    has_import_list =+      -- We treat a `hiding` clause as not having an import list although+      -- it's not entirely clear this is the right choice.+      case ideclHiding decl of+        Just (False, _) -> True+        _               -> False+    bad_import =+      mod `elemModuleSet` qualifiedMods+      && not is_qual+      && not has_import_list++    warning = vcat+      [ text "To ensure compatibility with future core libraries changes"+      , text "imports to" <+> ppr (ideclName decl) <+> text "should be"+      , text "either qualified or have an explicit import list."+      ]++    -- Modules for which we warn if we see unqualified imports+    qualifiedMods = mkModuleSet [ dATA_LIST ]++ warnRedundantSourceImport :: ModuleName -> SDoc warnRedundantSourceImport mod_name   = text "Unnecessary {-# SOURCE #-} in the import of module"@@ -605,7 +645,7 @@     getLocalDeclBindersd@ returns the names for an HsDecl              It's used for source code. -        *** See Note [The Naming story] in HsDecls ****+        *** See Note [The Naming story] in GHC.Hs.Decls **** *                                                                      * ********************************************************************* -} @@ -721,7 +761,7 @@           = expectJust "getLocalNonValBinders/find_con_decl_fld" $               find (\ fl -> flLabel fl == lbl) flds           where lbl = occNameFS (rdrNameOcc rdr)-        find_con_decl_fld (L _ (XFieldOcc _)) = panic "getLocalNonValBinders"+        find_con_decl_fld (L _ (XFieldOcc nec)) = noExtCon nec      new_assoc :: Bool -> LInstDecl GhcPs               -> RnM ([AvailInfo], [(Name, [FieldLabel])])@@ -733,16 +773,32 @@            ; return ([avail], flds) }     new_assoc overload_ok (L _ (ClsInstD _ (ClsInstDecl { cid_poly_ty = inst_ty                                                       , cid_datafam_insts = adts })))-      | Just (L loc cls_rdr) <- getLHsInstDeclClass_maybe inst_ty-      = do { cls_nm <- setSrcSpan loc $ lookupGlobalOccRn cls_rdr-           ; (avails, fldss)-                    <- mapAndUnzipM (new_loc_di overload_ok (Just cls_nm)) adts-           ; return (avails, concat fldss) }-      | otherwise-      = return ([], [])    -- Do not crash on ill-formed instances-                           -- Eg   instance !Show Int   Trac #3811c-    new_assoc _ (L _ (ClsInstD _ (XClsInstDecl _))) = panic "new_assoc"-    new_assoc _ (L _ (XInstDecl _))                 = panic "new_assoc"+      = do -- First, attempt to grab the name of the class from the instance.+           -- This step could fail if the instance is not headed by a class,+           -- such as in the following examples:+           --+           -- (1) The class is headed by a bang pattern, such as in+           --     `instance !Show Int` (#3811c)+           -- (2) The class is headed by a type variable, such as in+           --     `instance c` (#16385)+           --+           -- If looking up the class name fails, then mb_cls_nm will+           -- be Nothing.+           mb_cls_nm <- runMaybeT $ do+             -- See (1) above+             L loc cls_rdr <- MaybeT $ pure $ getLHsInstDeclClass_maybe inst_ty+             -- See (2) above+             MaybeT $ setSrcSpan loc $ lookupGlobalOccRn_maybe cls_rdr+           -- Assuming the previous step succeeded, process any associated data+           -- family instances. If the previous step failed, bail out.+           case mb_cls_nm of+             Nothing -> pure ([], [])+             Just cls_nm -> do+               (avails, fldss)+                 <- mapAndUnzipM (new_loc_di overload_ok (Just cls_nm)) adts+               pure (avails, concat fldss)+    new_assoc _ (L _ (ClsInstD _ (XClsInstDecl nec))) = noExtCon nec+    new_assoc _ (L _ (XInstDecl nec))                 = noExtCon nec      new_di :: Bool -> Maybe Name -> DataFamInstDecl GhcPs                    -> RnM (AvailInfo, [(Name, [FieldLabel])])@@ -756,16 +812,16 @@                                   -- main_name is not bound here!                    fld_env  = mk_fld_env (feqn_rhs ti_decl) sub_names flds'              ; return (avail, fld_env) }-    new_di _ _ (DataFamInstDecl (XHsImplicitBndrs _)) = panic "new_di"+    new_di _ _ (DataFamInstDecl (XHsImplicitBndrs nec)) = noExtCon nec      new_loc_di :: Bool -> Maybe Name -> LDataFamInstDecl GhcPs                    -> RnM (AvailInfo, [(Name, [FieldLabel])])     new_loc_di overload_ok mb_cls (L _ d) = new_di overload_ok mb_cls d-getLocalNonValBinders _ (XHsGroup _) = panic "getLocalNonValBinders"+getLocalNonValBinders _ (XHsGroup nec) = noExtCon nec  newRecordSelector :: Bool -> [Name] -> LFieldOcc GhcPs -> RnM FieldLabel newRecordSelector _ [] _ = error "newRecordSelector: datatype has no constructors!"-newRecordSelector _ _ (L _ (XFieldOcc _)) = panic "newRecordSelector"+newRecordSelector _ _ (L _ (XFieldOcc nec)) = noExtCon nec newRecordSelector overload_ok (dc:_) (L loc (FieldOcc _ (L _ fld)))   = do { selName <- newTopSrcBinder $ L loc $ field        ; return $ qualFieldLbl { flSelector = selName } }@@ -889,7 +945,7 @@         -- 'combine' is only called for associated data types which appear         -- twice in the all_avails. In the example, we combine         --    T(T,T1,T2,T3) and C(C,T)  to give   (T, T(T,T1,T2,T3), Just C)-        -- NB: the AvailTC can have fields as well as data constructors (Trac #12127)+        -- NB: the AvailTC can have fields as well as data constructors (#12127)         combine (name1, a1@(AvailTC p1 _ _), mp1)                 (name2, a2@(AvailTC p2 _ _), mp2)           = ASSERT2( name1 == name2 && isNothing mp1 && isNothing mp2@@ -948,7 +1004,7 @@       case ie of         IEVar _ (L l n) -> do             (name, avail, _) <- lookup_name ie $ ieWrappedName n-            return ([(IEVar noExt (L l (replaceWrappedName n name)),+            return ([(IEVar noExtField (L l (replaceWrappedName n name)),                                                   trimAvail avail name)], [])          IEThingAll _ (L l tc) -> do@@ -967,7 +1023,7 @@                             | otherwise                             -> [] -                renamed_ie = IEThingAll noExt (L l (replaceWrappedName tc name))+                renamed_ie = IEThingAll noExtField (L l (replaceWrappedName tc name))                 sub_avails = case avail of                                Avail {}              -> []                                AvailTC name2 subs fs -> [(renamed_ie, AvailTC name2 (subs \\ [name]) fs)]@@ -996,7 +1052,7 @@         IEThingWith xt ltc@(L l rdr_tc) wc rdr_ns rdr_fs ->           ASSERT2(null rdr_fs, ppr rdr_fs) do            (name, avail, mb_parent)-               <- lookup_name (IEThingAbs noExt ltc) (ieWrappedName rdr_tc)+               <- lookup_name (IEThingAbs noExtField ltc) (ieWrappedName rdr_tc)             let (ns,subflds) = case avail of                                 AvailTC _ ns' subflds' -> (ns',subflds')@@ -1014,13 +1070,13 @@                                 -- We are trying to import T( a,b,c,d ), and failed                                 -- to find 'b' and 'd'.  So we make up an import item                                 -- to report as failing, namely T( b, d ).-                                -- c.f. Trac #15412+                                -- c.f. #15412               Succeeded (childnames, childflds) ->                case mb_parent of                  -- non-associated ty/cls                  Nothing-                   -> return ([(IEThingWith noExt (L l name') wc childnames'+                   -> return ([(IEThingWith noExtField (L l name') wc childnames'                                                                  childflds,                                AvailTC name (name:map unLoc childnames) (map unLoc childflds))],                               [])@@ -1029,10 +1085,10 @@                          -- childnames' = postrn_ies childnames                  -- associated ty                  Just parent-                   -> return ([(IEThingWith noExt (L l name') wc childnames'+                   -> return ([(IEThingWith noExtField (L l name') wc childnames'                                                            childflds,                                 AvailTC name (map unLoc childnames) (map unLoc childflds)),-                               (IEThingWith noExt (L l name') wc childnames'+                               (IEThingWith noExtField (L l name') wc childnames'                                                            childflds,                                 AvailTC parent [name] [])],                               [])@@ -1045,9 +1101,9 @@        where         mkIEThingAbs tc l (n, av, Nothing    )-          = (IEThingAbs noExt (L l (replaceWrappedName tc n)), trimAvail av n)+          = (IEThingAbs noExtField (L l (replaceWrappedName tc n)), trimAvail av n)         mkIEThingAbs tc l (n, _,  Just parent)-          = (IEThingAbs noExt (L l (replaceWrappedName tc n))+          = (IEThingAbs noExtField (L l (replaceWrappedName tc n))              , AvailTC parent [n] [])          handle_bad_import m = catchIELookup m $ \err -> case err of@@ -1172,16 +1228,16 @@ ********************************************************* -} -reportUnusedNames :: Maybe (Located [LIE GhcPs])  -- Export list-                  -> TcGblEnv -> RnM ()-reportUnusedNames _export_decls gbl_env-  = do  { traceRn "RUN" (ppr (tcg_dus gbl_env))+reportUnusedNames :: TcGblEnv -> RnM ()+reportUnusedNames gbl_env+  = do  { keep <- readTcRef (tcg_keep gbl_env)+        ; traceRn "RUN" (ppr (tcg_dus gbl_env))         ; warnUnusedImportDecls gbl_env-        ; warnUnusedTopBinds unused_locals+        ; warnUnusedTopBinds $ unused_locals keep         ; warnMissingSignatures gbl_env }   where-    used_names :: NameSet-    used_names = findUses (tcg_dus gbl_env) emptyNameSet+    used_names :: NameSet -> NameSet+    used_names keep = findUses (tcg_dus gbl_env) emptyNameSet `unionNameSet` keep     -- NB: currently, if f x = g, we only treat 'g' as used if 'f' is used     -- Hence findUses @@ -1189,13 +1245,6 @@     defined_names :: [GlobalRdrElt]     defined_names = globalRdrEnvElts (tcg_rdr_env gbl_env) -    -- Note that defined_and_used, defined_but_not_used-    -- are both [GRE]; that's why we need defined_and_used-    -- rather than just used_names-    _defined_and_used, defined_but_not_used :: [GlobalRdrElt]-    (_defined_and_used, defined_but_not_used)-        = partition (gre_is_used used_names) defined_names-     kids_env = mkChildEnv defined_names     -- This is done in mkExports too; duplicated work @@ -1210,8 +1259,16 @@     --  (a) defined in this module, and     --  (b) not defined by a 'deriving' clause     -- The latter have an Internal Name, so we can filter them out easily-    unused_locals :: [GlobalRdrElt]-    unused_locals = filter is_unused_local defined_but_not_used+    unused_locals :: NameSet -> [GlobalRdrElt]+    unused_locals keep =+      let -- Note that defined_and_used, defined_but_not_used+          -- are both [GRE]; that's why we need defined_and_used+          -- rather than just used_names+          _defined_and_used, defined_but_not_used :: [GlobalRdrElt]+          (_defined_and_used, defined_but_not_used)+              = partition (gre_is_used (used_names keep)) defined_names++      in filter is_unused_local defined_but_not_used     is_unused_local :: GlobalRdrElt -> Bool     is_unused_local gre = isLocalGRE gre && isExternalName (gre_name gre) @@ -1287,7 +1344,7 @@  This code finds which import declarations are unused.  The specification and implementation notes are here:-  http://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/UnusedImports+  https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/unused-imports  See also Note [Choosing the best import declaration] in RdrName -}@@ -1342,7 +1399,7 @@         used_names   = mkNameSet (map      gre_name        used_gres)         used_parents = mkNameSet (mapMaybe greParent_maybe used_gres) -        unused_imps   -- Not trivial; see eg Trac #7454+        unused_imps   -- Not trivial; see eg #7454           = case imps of               Just (False, L _ imp_ies) ->                                  foldr (add_unused . unLoc) emptyNameSet imp_ies@@ -1376,7 +1433,7 @@        -- If you use 'signum' from Num, then the user may well have        -- imported Num(signum).  We don't want to complain that        -- Num is not itself mentioned.  Hence the two cases in add_unused_with.-    unused_decl (L _ (XImportDecl _)) = panic "unused_decl"+    unused_decl (L _ (XImportDecl nec)) = noExtCon nec   {- Note [The ImportMap]@@ -1387,7 +1444,7 @@  The SrcLoc is the location of the END of a particular 'import' declaration.  Why *END*?  Because we don't want to get confused-by the implicit Prelude import. Consider (Trac #7476) the module+by the implicit Prelude import. Consider (#7476) the module     import Foo( foo )     main = print foo There is an implicit 'import Prelude(print)', and it gets a SrcSpan@@ -1454,8 +1511,8 @@                , text "from module" <+> quotes pp_mod <+> is_redundant]     pp_herald  = text "The" <+> pp_qual <+> text "import of"     pp_qual-      | ideclQualified decl = text "qualified"-      | otherwise           = Outputable.empty+      | isImportDeclQualified (ideclQualified decl)= text "qualified"+      | otherwise                                  = Outputable.empty     pp_mod       = ppr (unLoc (ideclName decl))     is_redundant = text "is redundant" @@ -1477,7 +1534,7 @@ We do not warn about    import Prelude hiding( x, y ) because even if nothing else from Prelude is used, it may be essential to hide-x,y to avoid name-shadowing warnings.  Example (Trac #9061)+x,y to avoid name-shadowing warnings.  Example (#9061)    import Prelude hiding( log )    f x = log where log = () @@ -1517,25 +1574,25 @@     -- we want to say "T(..)", but if we're importing only a subset we want     -- to say "T(A,B,C)".  So we have to find out what the module exports.     to_ie _ (Avail n)-       = [IEVar noExt (to_ie_post_rn $ noLoc n)]+       = [IEVar noExtField (to_ie_post_rn $ noLoc n)]     to_ie _ (AvailTC n [m] [])-       | n==m = [IEThingAbs noExt (to_ie_post_rn $ noLoc n)]+       | n==m = [IEThingAbs noExtField (to_ie_post_rn $ noLoc n)]     to_ie iface (AvailTC n ns fs)       = case [(xs,gs) |  AvailTC x xs gs <- mi_exports iface                  , x == n                  , x `elem` xs    -- Note [Partial export]                  ] of-           [xs] | all_used xs -> [IEThingAll noExt (to_ie_post_rn $ noLoc n)]+           [xs] | all_used xs -> [IEThingAll noExtField (to_ie_post_rn $ noLoc n)]                 | otherwise   ->-                   [IEThingWith noExt (to_ie_post_rn $ noLoc n) NoIEWildcard+                   [IEThingWith noExtField (to_ie_post_rn $ noLoc n) NoIEWildcard                                 (map (to_ie_post_rn . noLoc) (filter (/= n) ns))                                 (map noLoc fs)]                                           -- Note [Overloaded field import]            _other | all_non_overloaded fs-                           -> map (IEVar noExt . to_ie_post_rn_var . noLoc) $ ns+                           -> map (IEVar noExtField . to_ie_post_rn_var . noLoc) $ ns                                  ++ map flSelector fs                   | otherwise ->-                      [IEThingWith noExt (to_ie_post_rn $ noLoc n) NoIEWildcard+                      [IEThingWith noExtField (to_ie_post_rn $ noLoc n) NoIEWildcard                                 (map (to_ie_post_rn . noLoc) (filter (/= n) ns))                                 (map noLoc fs)]         where@@ -1700,7 +1757,7 @@           text "but it has none" ]  dodgyMsgInsert :: forall p . IdP (GhcPass p) -> IE (GhcPass p)-dodgyMsgInsert tc = IEThingAll noExt ii+dodgyMsgInsert tc = IEThingAll noExtField ii   where     ii :: LIEWrappedName (IdP (GhcPass p))     ii = noLoc (IEName $ noLoc tc)
rename/RnPat.hs view
@@ -16,6 +16,7 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE DeriveFunctor #-}  module RnPat (-- main entry points               rnPat, rnPats, rnBindPat, rnPatAndThen,@@ -47,13 +48,14 @@  #include "HsVersions.h" -import HsSyn+import GHC.Hs import TcRnMonad import TcHsSyn             ( hsOverLitName ) import RnEnv import RnFixity import RnUtils             ( HsDocContext(..), newLocalBndrRn, bindLocalNames                            , warnUnusedMatches, newLocalBndrRn+                           , checkUnusedRecordWildcard                            , checkDupNames, checkDupAndShadowedNames                            , checkTupSize , unknownSubordinateErr ) import RnTypes@@ -71,7 +73,7 @@ import DataCon import qualified GHC.LanguageExtensions as LangExt -import Control.Monad       ( when, liftM, ap, guard )+import Control.Monad       ( when, ap, guard ) import qualified Data.List.NonEmpty as NE import Data.Ratio @@ -106,11 +108,9 @@  newtype CpsRn b = CpsRn { unCpsRn :: forall r. (b -> RnM (r, FreeVars))                                             -> RnM (r, FreeVars) }+        deriving (Functor)         -- See Note [CpsRn monad] -instance Functor CpsRn where-    fmap = liftM- instance Applicative CpsRn where     pure x = CpsRn (\k -> k x)     (<*>) = ap@@ -159,7 +159,7 @@  Arguably we should report T2 as unused, even though it appears in a pattern, because it never occurs in a constructed position.  See-Trac #7336.+#7336. However, implementing this in the face of pattern synonyms would be less straightforward, since given two pattern synonyms @@ -257,7 +257,7 @@ Here the pattern binds 'r', and then uses it *only* in the view pattern. We want to "see" this use, and in let-bindings we collect all uses and report unused variables at the binding level. So we must use bindLocalNames-here, *not* bindLocalNameFV.  Trac #3943.+here, *not* bindLocalNameFV.  #3943.   Note [Don't report shadowing for pattern synonyms]@@ -319,7 +319,7 @@         ; unCpsRn (rnLPatsAndThen (matchNameMaker ctxt) pats) $ \ pats' -> do         { -- Check for duplicated and shadowed names           -- Must do this *after* renaming the patterns-          -- See Note [Collect binders only after renaming] in HsUtils+          -- See Note [Collect binders only after renaming] in GHC.Hs.Utils           -- Because we don't bind the vars all at once, we can't           --    check incrementally for duplicates;           -- Nor can we check incrementally for shadowing, else we'll@@ -384,7 +384,7 @@ rnLPatAndThen nm lpat = wrapSrcSpanCps (rnPatAndThen nm) lpat  rnPatAndThen :: NameMaker -> Pat GhcPs -> CpsRn (Pat GhcRn)-rnPatAndThen _  (WildPat _)   = return (WildPat noExt)+rnPatAndThen _  (WildPat _)   = return (WildPat noExtField) rnPatAndThen mk (ParPat x pat)  = do { pat' <- rnLPatAndThen mk pat                                      ; return (ParPat x pat') } rnPatAndThen mk (LazyPat x pat) = do { pat' <- rnLPatAndThen mk pat@@ -471,7 +471,7 @@    -- The pattern for the empty list needs to be replaced by an empty explicit list pattern when overloaded lists is turned on.   = case unLoc con == nameRdrName (dataConName nilDataCon) of       True    -> do { ol_flag <- liftCps $ xoptM LangExt.OverloadedLists-                    ; if ol_flag then rnPatAndThen mk (ListPat noExt [])+                    ; if ol_flag then rnPatAndThen mk (ListPat noExtField [])                                  else rnConPatAndThen mk con stuff}       False   -> rnConPatAndThen mk con stuff @@ -529,6 +529,12 @@         ; rpats' <- rnHsRecPatsAndThen mk con' rpats         ; return (ConPatIn con' (RecCon rpats')) } +checkUnusedRecordWildcardCps :: SrcSpan -> Maybe [Name] -> CpsRn ()+checkUnusedRecordWildcardCps loc dotdot_names =+  CpsRn (\thing -> do+                    (r, fvs) <- thing ()+                    checkUnusedRecordWildcard loc fvs dotdot_names+                    return (r, fvs) ) -------------------- rnHsRecPatsAndThen :: NameMaker                    -> Located Name      -- Constructor@@ -539,17 +545,31 @@   = do { flds <- liftCpsFV $ rnHsRecFields (HsRecFieldPat con) mkVarPat                                             hs_rec_fields        ; flds' <- mapM rn_field (flds `zip` [1..])+       ; check_unused_wildcard (implicit_binders flds' <$> dd)        ; return (HsRecFields { rec_flds = flds', rec_dotdot = dd }) }   where-    mkVarPat l n = VarPat noExt (cL l n)+    mkVarPat l n = VarPat noExtField (cL l n)     rn_field (dL->L l fld, n') =       do { arg' <- rnLPatAndThen (nested_mk dd mk n') (hsRecFieldArg fld)          ; return (cL l (fld { hsRecFieldArg = arg' })) } +    loc = maybe noSrcSpan getLoc dd++    -- Get the arguments of the implicit binders+    implicit_binders fs (unLoc -> n) = collectPatsBinders implicit_pats+      where+        implicit_pats = map (hsRecFieldArg . unLoc) (drop n fs)++    -- Don't warn for let P{..} = ... in ...+    check_unused_wildcard = case mk of+                              LetMk{} -> const (return ())+                              LamMk{} -> checkUnusedRecordWildcardCps loc+         -- Suppress unused-match reporting for fields introduced by ".."     nested_mk Nothing  mk                    _  = mk     nested_mk (Just _) mk@(LetMk {})         _  = mk-    nested_mk (Just n) (LamMk report_unused) n' = LamMk (report_unused && (n' <= n))+    nested_mk (Just (unLoc -> n)) (LamMk report_unused) n'+      = LamMk (report_unused && (n' <= n))  {- ************************************************************************@@ -622,19 +642,18 @@                                 -- due to #15884  -    rn_dotdot :: Maybe Int      -- See Note [DotDot fields] in HsPat+    rn_dotdot :: Maybe (Located Int)      -- See Note [DotDot fields] in GHC.Hs.Pat               -> Maybe Name -- The constructor (Nothing for an                                 --    out of scope constructor)               -> [LHsRecField GhcRn arg] -- Explicit fields-              -> RnM [LHsRecField GhcRn arg]   -- Filled in .. fields-    rn_dotdot (Just n) (Just con) flds -- ".." on record construction / pat match+              -> RnM ([LHsRecField GhcRn arg])   -- Field Labels we need to fill in+    rn_dotdot (Just (dL -> L loc n)) (Just con) flds -- ".." on record construction / pat match       | not (isUnboundName con) -- This test is because if the constructor                                 -- isn't in scope the constructor lookup will add                                 -- an error but still return an unbound name. We                                 -- don't want that to screw up the dot-dot fill-in stuff.       = ASSERT( flds `lengthIs` n )-        do { loc <- getSrcSpanM -- Rather approximate-           ; dd_flag <- xoptM LangExt.RecordWildCards+        do { dd_flag <- xoptM LangExt.RecordWildCards            ; checkErr dd_flag (needFlagDotDot ctxt)            ; (rdr_env, lcl_env) <- getRdrEnvs            ; con_fields <- lookupConstructorFields con@@ -728,7 +747,7 @@                      then do { checkErr pun_ok (badPun (cL loc lbl))                                -- Discard any module qualifier (#11662)                              ; let arg_rdr = mkRdrUnqual (rdrNameOcc lbl)-                             ; return (cL loc (HsVar noExt (cL loc arg_rdr))) }+                             ; return (cL loc (HsVar noExtField (cL loc arg_rdr))) }                      else return arg            ; (arg'', fvs) <- rnLExpr arg' @@ -738,10 +757,10 @@                           Right _       -> fvs                  lbl' = case sel of                           Left sel_name ->-                                     cL loc (Unambiguous sel_name  (cL loc lbl))+                                     cL loc (Unambiguous sel_name   (cL loc lbl))                           Right [sel_name] ->-                                     cL loc (Unambiguous sel_name  (cL loc lbl))-                          Right _ -> cL loc (Ambiguous   noExt     (cL loc lbl))+                                     cL loc (Unambiguous sel_name   (cL loc lbl))+                          Right _ -> cL loc (Ambiguous   noExtField (cL loc lbl))             ; return (cL l (HsRecField { hsRecFieldLbl = lbl'                                       , hsRecFieldArg = arg''@@ -833,7 +852,7 @@ zero value. So we had to add explicit field 'neg' which would hold information about literal sign. Here in rnOverLit we use it to detect negative zeroes and in this case return not only literal itself but also negateName so that users-can apply it explicitly. In this case it stays negative zero.  Trac #13211+can apply it explicitly. In this case it stays negative zero.  #13211 -}  rnOverLit :: HsOverLit t ->
rename/RnSource.hs view
@@ -21,7 +21,7 @@ import {-# SOURCE #-} RnExpr( rnLExpr ) import {-# SOURCE #-} RnSplice ( rnSpliceDecl, rnTopSpliceDecls ) -import HsSyn+import GHC.Hs import FieldLabel import RdrName import RnTypes@@ -52,7 +52,7 @@ import Avail import Outputable import Bag-import BasicTypes       ( pprRuleName )+import BasicTypes       ( pprRuleName, TypeOrKind(..) ) import FastString import SrcLoc import DynFlags@@ -62,6 +62,7 @@ import Digraph          ( SCC, flattenSCC, flattenSCCs, Node(..)                         , stronglyConnCompFromEdgedVerticesUniq ) import UniqSet+import OrdList import qualified GHC.LanguageExtensions as LangExt  import Control.Monad@@ -69,8 +70,9 @@ import Data.List ( mapAccumL ) import qualified Data.List.NonEmpty as NE import Data.List.NonEmpty ( NonEmpty(..) )-import Data.Maybe ( isNothing, fromMaybe )+import Data.Maybe ( isNothing, fromMaybe, mapMaybe ) import qualified Data.Set as Set ( difference, fromList, toList, null )+import Data.Function ( on )  {- | @rnSourceDecl@ "renames" declarations. It simultaneously performs dependency analysis and precedence parsing.@@ -126,7 +128,7 @@     -- (D1) Bring pattern synonyms into scope.    --      Need to do this before (D2) because rnTopBindsLHS-   --      looks up those pattern synonyms (Trac #9889)+   --      looks up those pattern synonyms (#9889)     extendPatSynEnv val_decls local_fix_env $ \pat_syn_bndrs -> do { @@ -197,7 +199,7 @@     last_tcg_env <- getGblEnv ;    -- (I) Compute the results and return-   let {rn_group = HsGroup { hs_ext     = noExt,+   let {rn_group = HsGroup { hs_ext     = noExtField,                              hs_valds   = rn_val_decls,                              hs_splcds  = rn_splice_decls,                              hs_tyclds  = rn_tycl_decls,@@ -217,7 +219,7 @@                               src_fvs5, src_fvs6, src_fvs7] ;                 -- It is tiresome to gather the binders from type and class decls -        src_dus = [other_def] `plusDU` bind_dus `plusDU` usesOnly other_fvs ;+        src_dus = unitOL other_def `plusDU` bind_dus `plusDU` usesOnly other_fvs ;                 -- Instance decls may have occurrences of things bound in bind_dus                 -- so we must put other_fvs last @@ -229,7 +231,7 @@    traceRn "finish Dus" (ppr src_dus ) ;    return (final_tcg_env, rn_group)                     }}}}-rnSrcDecls (XHsGroup _) = panic "rnSrcDecls"+rnSrcDecls (XHsGroup nec) = noExtCon nec  addTcgDUs :: TcGblEnv -> DefUses -> TcGblEnv -- This function could be defined lower down in the module hierarchy,@@ -297,7 +299,7 @@      = do { names <- concatMapM (lookupLocalTcNames sig_ctxt what . unLoc)                                 rdr_names           ; return [(rdrNameOcc rdr, txt) | (rdr, _) <- names] }-   rn_deprec (XWarnDecl _) = panic "rnSrcWarnDecls"+   rn_deprec (XWarnDecl nec) = noExtCon nec     what = text "deprecation" @@ -331,9 +333,9 @@     do { (provenance', provenance_fvs) <- rnAnnProvenance provenance        ; (expr', expr_fvs) <- setStage (Splice Untyped) $                               rnLExpr expr-       ; return (HsAnnotation noExt s provenance' expr',+       ; return (HsAnnotation noExtField s provenance' expr',                  provenance_fvs `plusFV` expr_fvs) }-rnAnnDecl (XAnnDecl _) = panic "rnAnnDecl"+rnAnnDecl (XAnnDecl nec) = noExtCon nec  rnAnnProvenance :: AnnProvenance RdrName                 -> RnM (AnnProvenance Name, FreeVars)@@ -352,10 +354,10 @@ rnDefaultDecl :: DefaultDecl GhcPs -> RnM (DefaultDecl GhcRn, FreeVars) rnDefaultDecl (DefaultDecl _ tys)   = do { (tys', fvs) <- rnLHsTypes doc_str tys-       ; return (DefaultDecl noExt tys', fvs) }+       ; return (DefaultDecl noExtField tys', fvs) }   where     doc_str = DefaultDeclCtx-rnDefaultDecl (XDefaultDecl _) = panic "rnDefaultDecl"+rnDefaultDecl (XDefaultDecl nec) = noExtCon nec  {- *********************************************************@@ -369,20 +371,20 @@ rnHsForeignDecl (ForeignImport { fd_name = name, fd_sig_ty = ty, fd_fi = spec })   = do { topEnv :: HscEnv <- getTopEnv        ; name' <- lookupLocatedTopBndrRn name-       ; (ty', fvs) <- rnHsSigType (ForeignDeclCtx name) ty+       ; (ty', fvs) <- rnHsSigType (ForeignDeclCtx name) TypeLevel ty          -- Mark any PackageTarget style imports as coming from the current package        ; let unitId = thisPackage $ hsc_dflags topEnv              spec'      = patchForeignImport unitId spec -       ; return (ForeignImport { fd_i_ext = noExt+       ; return (ForeignImport { fd_i_ext = noExtField                                , fd_name = name', fd_sig_ty = ty'                                , fd_fi = spec' }, fvs) }  rnHsForeignDecl (ForeignExport { fd_name = name, fd_sig_ty = ty, fd_fe = spec })   = do { name' <- lookupLocatedOccRn name-       ; (ty', fvs) <- rnHsSigType (ForeignDeclCtx name) ty-       ; return (ForeignExport { fd_e_ext = noExt+       ; (ty', fvs) <- rnHsSigType (ForeignDeclCtx name) TypeLevel ty+       ; return (ForeignExport { fd_e_ext = noExtField                                , fd_name = name', fd_sig_ty = ty'                                , fd_fe = spec }                 , fvs `addOneFV` unLoc name') }@@ -390,7 +392,7 @@         --     we add it to the free-variable list.  It might, for example,         --     be imported from another module -rnHsForeignDecl (XForeignDecl _) = panic "rnHsForeignDecl"+rnHsForeignDecl (XForeignDecl nec) = noExtCon nec  -- | For Windows DLLs we need to know what packages imported symbols are from --      to generate correct calls. Imported symbols are tagged with the current@@ -424,20 +426,20 @@  rnSrcInstDecl :: InstDecl GhcPs -> RnM (InstDecl GhcRn, FreeVars) rnSrcInstDecl (TyFamInstD { tfid_inst = tfi })-  = do { (tfi', fvs) <- rnTyFamInstDecl Nothing tfi-       ; return (TyFamInstD { tfid_ext = noExt, tfid_inst = tfi' }, fvs) }+  = do { (tfi', fvs) <- rnTyFamInstDecl NonAssocTyFamEqn tfi+       ; return (TyFamInstD { tfid_ext = noExtField, tfid_inst = tfi' }, fvs) }  rnSrcInstDecl (DataFamInstD { dfid_inst = dfi })-  = do { (dfi', fvs) <- rnDataFamInstDecl Nothing dfi-       ; return (DataFamInstD { dfid_ext = noExt, dfid_inst = dfi' }, fvs) }+  = do { (dfi', fvs) <- rnDataFamInstDecl NonAssocTyFamEqn dfi+       ; return (DataFamInstD { dfid_ext = noExtField, dfid_inst = dfi' }, fvs) }  rnSrcInstDecl (ClsInstD { cid_inst = cid })   = do { traceRn "rnSrcIstDecl {" (ppr cid)        ; (cid', fvs) <- rnClsInstDecl cid        ; traceRn "rnSrcIstDecl end }" empty-       ; return (ClsInstD { cid_d_ext = noExt, cid_inst = cid' }, fvs) }+       ; return (ClsInstD { cid_d_ext = noExtField, cid_inst = cid' }, fvs) } -rnSrcInstDecl (XInstDecl _) = panic "rnSrcInstDecl"+rnSrcInstDecl (XInstDecl nec) = noExtCon nec  -- | Warn about non-canonical typeclass instance declarations --@@ -606,7 +608,7 @@                            , cid_overlap_mode = oflag                            , cid_datafam_insts = adts })   = do { (inst_ty', inst_fvs)-           <- rnHsSigType (GenericCtx $ text "an instance declaration") inst_ty+           <- rnHsSigType (GenericCtx $ text "an instance declaration") TypeLevel inst_ty        ; let (ktv_names, _, head_ty') = splitLHsInstDeclTy inst_ty'        ; cls <-            case hsTyGetAppHead_maybe head_ty' of@@ -617,7 +619,7 @@                -- we report an error and continue for as long as we can.                -- Importantly, this error should be thrown before we reach the                -- typechecker, lest we encounter different errors that are-               -- hopelessly confusing (such as the one in Trac #16114).+               -- hopelessly confusing (such as the one in #16114).                addErrAt (getLoc (hsSigType inst_ty)) $                  hang (text "Illegal class instance:" <+> quotes (ppr inst_ty))                     2 (vcat [ text "Class instances must be of the form"@@ -647,7 +649,7 @@         ; let all_fvs = meth_fvs `plusFV` more_fvs                                 `plusFV` inst_fvs-       ; return (ClsInstDecl { cid_ext = noExt+       ; return (ClsInstDecl { cid_ext = noExtField                              , cid_poly_ty = inst_ty', cid_binds = mbinds'                              , cid_sigs = uprags', cid_tyfam_insts = ats'                              , cid_overlap_mode = oflag@@ -663,36 +665,33 @@              --     the instance context after renaming.  This is a bit              --     strange, but should not matter (and it would be more work              --     to remove the context).-rnClsInstDecl (XClsInstDecl _) = panic "rnClsInstDecl"+rnClsInstDecl (XClsInstDecl nec) = noExtCon nec  rnFamInstEqn :: HsDocContext-             -> Maybe (Name, [Name]) -- Nothing => not associated-                                     -- Just (cls,tvs) => associated,-                                     --   and gives class and tyvars of the-                                     --   parent instance decl+             -> AssocTyFamInfo              -> [Located RdrName]    -- Kind variables from the equation's RHS              -> FamInstEqn GhcPs rhs              -> (HsDocContext -> rhs -> RnM (rhs', FreeVars))              -> RnM (FamInstEqn GhcRn rhs', FreeVars)-rnFamInstEqn doc mb_cls rhs_kvars+rnFamInstEqn doc atfi rhs_kvars     (HsIB { hsib_body = FamEqn { feqn_tycon  = tycon                                , feqn_bndrs  = mb_bndrs                                , feqn_pats   = pats                                , feqn_fixity = fixity                                , feqn_rhs    = payload }}) rn_payload-  = do { tycon'   <- lookupFamInstName (fmap fst mb_cls) tycon+  = do { let mb_cls = case atfi of+                        NonAssocTyFamEqn     -> Nothing+                        AssocTyFamDeflt cls  -> Just cls+                        AssocTyFamInst cls _ -> Just cls+       ; tycon'   <- lookupFamInstName mb_cls tycon        ; let pat_kity_vars_with_dups = extractHsTyArgRdrKiTyVarsDup pats              -- Use the "...Dups" form because it's needed              -- below to report unsed binder on the LHS-       ; let pat_kity_vars = rmDupsInRdrTyVars pat_kity_vars_with_dups -         -- all pat vars not explicitly bound (see extractHsTvBndrs)-       ; let mb_imp_kity_vars = extractHsTvBndrs <$> mb_bndrs <*> pure pat_kity_vars-             imp_vars = case mb_imp_kity_vars of-                          -- kind vars are the only ones free if we have an explicit forall-                          Just nbnd_kity_vars -> freeKiTyVarsKindVars nbnd_kity_vars-                          -- all pattern vars are free otherwise-                          Nothing             -> freeKiTyVarsAllVars pat_kity_vars+         -- Implicitly bound variables, empty if we have an explicit 'forall' according+         -- to the "forall-or-nothing" rule.+       ; let imp_vars | isNothing mb_bndrs = nubL pat_kity_vars_with_dups+                      | otherwise = []        ; imp_var_names <- mapM (newTyVarNameRn mb_cls) imp_vars         ; let bndrs = fromMaybe [] mb_bndrs@@ -723,7 +722,7 @@                        -- See Note [Unused type variables in family instances]                     ; let groups :: [NonEmpty (Located RdrName)]                           groups = equivClasses cmpLocated $-                                   freeKiTyVarsAllVars pat_kity_vars_with_dups+                                   pat_kity_vars_with_dups                     ; nms_dups <- mapM (lookupOccRn . unLoc) $                                      [ tv | (tv :| (_:_)) <- groups ]                           -- Add to the used variables@@ -734,11 +733,11 @@                           --     Note [Unused type variables in family instances]                     ; let nms_used = extendNameSetList rhs_fvs $                                         inst_tvs ++ nms_dups-                          inst_tvs = case mb_cls of-                                       Nothing            -> []-                                       Just (_, inst_tvs) -> inst_tvs-                          all_nms = all_imp_var_names-                                      ++ map hsLTyVarName bndrs'+                          inst_tvs = case atfi of+                                       NonAssocTyFamEqn          -> []+                                       AssocTyFamDeflt _         -> []+                                       AssocTyFamInst _ inst_tvs -> inst_tvs+                          all_nms = all_imp_var_names ++ hsLTyVarNames bndrs'                     ; warnUnusedTypePatterns all_nms nms_used                      ; return ((bndrs', pats', payload'), rhs_fvs `plusFV` pat_fvs) }@@ -748,25 +747,37 @@         ; return (HsIB { hsib_ext = all_imp_var_names -- Note [Wildcards in family instances]                       , hsib_body-                          = FamEqn { feqn_ext    = noExt+                          = FamEqn { feqn_ext    = noExtField                                    , feqn_tycon  = tycon'                                    , feqn_bndrs  = bndrs' <$ mb_bndrs                                    , feqn_pats   = pats'                                    , feqn_fixity = fixity                                    , feqn_rhs    = payload' } },                  all_fvs) }-rnFamInstEqn _ _ _ (HsIB _ (XFamEqn _)) _ = panic "rnFamInstEqn"-rnFamInstEqn _ _ _ (XHsImplicitBndrs _) _ = panic "rnFamInstEqn"+rnFamInstEqn _ _ _ (HsIB _ (XFamEqn nec)) _ = noExtCon nec+rnFamInstEqn _ _ _ (XHsImplicitBndrs nec) _ = noExtCon nec -rnTyFamInstDecl :: Maybe (Name, [Name]) -- Just (cls,tvs) => associated,-                                        --   and gives class and tyvars of-                                        --   the parent instance decl+rnTyFamInstDecl :: AssocTyFamInfo                 -> TyFamInstDecl GhcPs                 -> RnM (TyFamInstDecl GhcRn, FreeVars)-rnTyFamInstDecl mb_cls (TyFamInstDecl { tfid_eqn = eqn })-  = do { (eqn', fvs) <- rnTyFamInstEqn mb_cls NotClosedTyFam eqn+rnTyFamInstDecl atfi (TyFamInstDecl { tfid_eqn = eqn })+  = do { (eqn', fvs) <- rnTyFamInstEqn atfi NotClosedTyFam eqn        ; return (TyFamInstDecl { tfid_eqn = eqn' }, fvs) } +-- | Tracks whether we are renaming:+--+-- 1. A type family equation that is not associated+--    with a parent type class ('NonAssocTyFamEqn')+--+-- 2. An associated type family default delcaration ('AssocTyFamDeflt')+--+-- 3. An associated type family instance declaration ('AssocTyFamInst')+data AssocTyFamInfo+  = NonAssocTyFamEqn+  | AssocTyFamDeflt Name   -- Name of the parent class+  | AssocTyFamInst  Name   -- Name of the parent class+                    [Name] -- Names of the tyvars of the parent instance decl+ -- | Tracks whether we are renaming an equation in a closed type family -- equation ('ClosedTyFam') or not ('NotClosedTyFam'). data ClosedTyFamInfo@@ -774,17 +785,17 @@   | ClosedTyFam (Located RdrName) Name                 -- The names (RdrName and Name) of the closed type family -rnTyFamInstEqn :: Maybe (Name, [Name])+rnTyFamInstEqn :: AssocTyFamInfo                -> ClosedTyFamInfo                -> TyFamInstEqn GhcPs                -> RnM (TyFamInstEqn GhcRn, FreeVars)-rnTyFamInstEqn mb_cls ctf_info+rnTyFamInstEqn atfi ctf_info     eqn@(HsIB { hsib_body = FamEqn { feqn_tycon = tycon                                    , feqn_rhs   = rhs }})   = do { let rhs_kvs = extractHsTyRdrTyVarsKindVars rhs        ; (eqn'@(HsIB { hsib_body =                        FamEqn { feqn_tycon = dL -> L _ tycon' }}), fvs)-           <- rnFamInstEqn (TySynCtx tycon) mb_cls rhs_kvs eqn rnTySyn+           <- rnFamInstEqn (TySynCtx tycon) atfi rhs_kvs eqn rnTySyn        ; case ctf_info of            NotClosedTyFam -> pure ()            ClosedTyFam fam_rdr_name fam_name ->@@ -792,46 +803,28 @@              withHsDocContext (TyFamilyCtx fam_rdr_name) $              wrongTyFamName fam_name tycon'        ; pure (eqn', fvs) }-rnTyFamInstEqn _ _ (HsIB _ (XFamEqn _)) = panic "rnTyFamInstEqn"-rnTyFamInstEqn _ _ (XHsImplicitBndrs _) = panic "rnTyFamInstEqn"+rnTyFamInstEqn _ _ (HsIB _ (XFamEqn nec)) = noExtCon nec+rnTyFamInstEqn _ _ (XHsImplicitBndrs nec) = noExtCon nec -rnTyFamDefltEqn :: Name-                -> TyFamDefltEqn GhcPs-                -> RnM (TyFamDefltEqn GhcRn, FreeVars)-rnTyFamDefltEqn cls (FamEqn { feqn_tycon  = tycon-                            , feqn_bndrs  = bndrs-                            , feqn_pats   = tyvars-                            , feqn_fixity = fixity-                            , feqn_rhs    = rhs })-  = do { let kvs = extractHsTyRdrTyVarsKindVars rhs-       ; bindHsQTyVars ctx Nothing (Just cls) kvs tyvars $ \ tyvars' _ ->-    do { tycon'      <- lookupFamInstName (Just cls) tycon-       ; (rhs', fvs) <- rnLHsType ctx rhs-       ; return (FamEqn { feqn_ext    = noExt-                        , feqn_tycon  = tycon'-                        , feqn_bndrs  = ASSERT( isNothing bndrs )-                                        Nothing-                        , feqn_pats   = tyvars'-                        , feqn_fixity = fixity-                        , feqn_rhs    = rhs' }, fvs) } }-  where-    ctx = TyFamilyCtx tycon-rnTyFamDefltEqn _ (XFamEqn _) = panic "rnTyFamDefltEqn"+rnTyFamDefltDecl :: Name+                 -> TyFamDefltDecl GhcPs+                 -> RnM (TyFamDefltDecl GhcRn, FreeVars)+rnTyFamDefltDecl cls = rnTyFamInstDecl (AssocTyFamDeflt cls) -rnDataFamInstDecl :: Maybe (Name, [Name])+rnDataFamInstDecl :: AssocTyFamInfo                   -> DataFamInstDecl GhcPs                   -> RnM (DataFamInstDecl GhcRn, FreeVars)-rnDataFamInstDecl mb_cls (DataFamInstDecl { dfid_eqn = eqn@(HsIB { hsib_body =-                           FamEqn { feqn_tycon = tycon-                                  , feqn_rhs   = rhs }})})+rnDataFamInstDecl atfi (DataFamInstDecl { dfid_eqn = eqn@(HsIB { hsib_body =+                         FamEqn { feqn_tycon = tycon+                                , feqn_rhs   = rhs }})})   = do { let rhs_kvs = extractDataDefnKindVars rhs        ; (eqn', fvs) <--           rnFamInstEqn (TyDataCtx tycon) mb_cls rhs_kvs eqn rnDataDefn+           rnFamInstEqn (TyDataCtx tycon) atfi rhs_kvs eqn rnDataDefn        ; return (DataFamInstDecl { dfid_eqn = eqn' }, fvs) }-rnDataFamInstDecl _ (DataFamInstDecl (HsIB _ (XFamEqn _)))-  = panic "rnDataFamInstDecl"-rnDataFamInstDecl _ (DataFamInstDecl (XHsImplicitBndrs _))-  = panic "rnDataFamInstDecl"+rnDataFamInstDecl _ (DataFamInstDecl (HsIB _ (XFamEqn nec)))+  = noExtCon nec+rnDataFamInstDecl _ (DataFamInstDecl (XHsImplicitBndrs nec))+  = noExtCon nec  -- Renaming of the associated types in instances. @@ -842,8 +835,8 @@ rnATDecls cls at_decls   = rnList (rnFamDecl (Just cls)) at_decls -rnATInstDecls :: (Maybe (Name, [Name]) -> -- The function that renames-                  decl GhcPs ->            -- an instance. rnTyFamInstDecl+rnATInstDecls :: (AssocTyFamInfo ->           -- The function that renames+                  decl GhcPs ->               -- an instance. rnTyFamInstDecl                   RnM (decl GhcRn, FreeVars)) -- or rnDataFamInstDecl               -> Name      -- Class               -> [Name]@@ -855,7 +848,7 @@ -- NB: We allow duplicate associated-type decls; --     See Note [Associated type instances] in TcInstDcls rnATInstDecls rnFun cls tv_ns at_insts-  = rnList (rnFun (Just (cls, tv_ns))) at_insts+  = rnList (rnFun (AssocTyFamInst cls tv_ns)) at_insts     -- See Note [Renaming associated types]  {- Note [Wildcards in family instances]@@ -917,7 +910,7 @@       type F a x :: *    instance C (p,q) r where       type F (p,q) x = (x, r)   -- BAD: mentions 'r'-c.f. Trac #5515+c.f. #5515  Kind variables, on the other hand, are allowed to be implicitly or explicitly bound. As examples, this (#9574) is acceptable:@@ -942,7 +935,7 @@  All this applies only for *instance* declarations.  In *class* declarations there is no RHS to worry about, and the class variables-can all be in scope (Trac #5862):+can all be in scope (#5862):     class Category (x :: k -> k -> *) where       type Ob x :: k -> Constraint       id :: Ob x a => x a a@@ -959,7 +952,7 @@      type forall b. T (Maybe a) b = Either a b  Even though `a` is not bound by the forall, this is still accepted because `a`-was previously bound by the `instance C (Maybe a)` part. (see Trac #16116).+was previously bound by the `instance C (Maybe a)` part. (see #16116).  In each case, the function which detects improperly bound variables on the RHS is TcValidity.checkValidFamPats.@@ -979,14 +972,13 @@   = do { standalone_deriv_ok <- xoptM LangExt.StandaloneDeriving        ; unless standalone_deriv_ok (addErr standaloneDerivErr)        ; (mds', ty', fvs)-           <- rnLDerivStrategy DerivDeclCtx mds $ \strat_tvs ppr_via_ty ->-              rnAndReportFloatingViaTvs strat_tvs loc ppr_via_ty "instance" $+           <- rnLDerivStrategy DerivDeclCtx mds $               rnHsSigWcType BindUnlessForall DerivDeclCtx ty        ; warnNoDerivStrat mds' loc-       ; return (DerivDecl noExt ty' mds' overlap, fvs) }+       ; return (DerivDecl noExtField ty' mds' overlap, fvs) }   where     loc = getLoc $ hsib_body $ hswc_body ty-rnSrcDerivDecl (XDerivDecl _) = panic "rnSrcDerivDecl"+rnSrcDerivDecl (XDerivDecl nec) = noExtCon nec  standaloneDerivErr :: SDoc standaloneDerivErr@@ -1005,10 +997,10 @@ rnHsRuleDecls (HsRules { rds_src = src                        , rds_rules = rules })   = do { (rn_rules,fvs) <- rnList rnHsRuleDecl rules-       ; return (HsRules { rds_ext = noExt+       ; return (HsRules { rds_ext = noExtField                          , rds_src = src                          , rds_rules = rn_rules }, fvs) }-rnHsRuleDecls (XRuleDecls _) = panic "rnHsRuleDecls"+rnHsRuleDecls (XRuleDecls nec) = noExtCon nec  rnHsRuleDecl :: RuleDecl GhcPs -> RnM (RuleDecl GhcRn, FreeVars) rnHsRuleDecl (HsRule { rd_name = rule_name@@ -1037,9 +1029,9 @@   where     get_var (RuleBndrSig _ v _) = v     get_var (RuleBndr _ v)      = v-    get_var (XRuleBndr _)       = panic "rnHsRuleDecl"+    get_var (XRuleBndr nec)     = noExtCon nec     in_rule = text "in the rule" <+> pprFullRuleName rule_name-rnHsRuleDecl (XRuleDecl _) = panic "rnHsRuleDecl"+rnHsRuleDecl (XRuleDecl nec) = noExtCon nec  bindRuleTmVars :: HsDocContext -> Maybe ty_bndrs                -> [LRuleBndr GhcPs] -> [Name]@@ -1051,13 +1043,13 @@   where     go ((dL->L l (RuleBndr _ (dL->L loc _))) : vars) (n : ns) thing_inside       = go vars ns $ \ vars' ->-        thing_inside (cL l (RuleBndr noExt (cL loc n)) : vars')+        thing_inside (cL l (RuleBndr noExtField (cL loc n)) : vars')      go ((dL->L l (RuleBndrSig _ (dL->L loc _) bsig)) : vars)        (n : ns) thing_inside       = rnHsSigWcTypeScoped bind_free_tvs doc bsig $ \ bsig' ->         go vars ns $ \ vars' ->-        thing_inside (cL l (RuleBndrSig noExt (cL loc n) bsig') : vars')+        thing_inside (cL l (RuleBndrSig noExtField (cL loc n) bsig') : vars')      go [] [] thing_inside = thing_inside []     go vars names _ = pprPanic "bindRuleVars" (ppr vars $$ ppr names)@@ -1187,7 +1179,7 @@   This has a kind error, but the error message is better if you   check T first, (fixing its kind) and *then* S.  If you do kind   inference together, you might get an error reported in S, which-  is jolly confusing.  See Trac #4875+  is jolly confusing.  See #4875   * Increase kind polymorphism.  See TcTyClsDecls@@ -1195,7 +1187,7 @@  Why do the instance declarations participate?  At least two reasons -* Consider (Trac #11348)+* Consider (#11348)       type family F a      type instance F Int = Bool@@ -1208,7 +1200,7 @@   know that unless we've looked at the type instance declaration for F   before kind-checking Foo. -* Another example is this (Trac #3990).+* Another example is this (#3990).       data family Complex a      data instance Complex Double = CD {-# UNPACK #-} !Double@@ -1297,71 +1289,130 @@ -- Rename the declarations and do dependency analysis on them rnTyClDecls tycl_ds   = do { -- Rename the type/class, instance, and role declaraations-         tycls_w_fvs <- mapM (wrapLocFstM rnTyClDecl)-                             (tyClGroupTyClDecls tycl_ds)+       ; tycls_w_fvs <- mapM (wrapLocFstM rnTyClDecl) (tyClGroupTyClDecls tycl_ds)        ; let tc_names = mkNameSet (map (tcdName . unLoc . fst) tycls_w_fvs)-+       ; kisigs_w_fvs <- rnStandaloneKindSignatures tc_names (tyClGroupKindSigs tycl_ds)        ; instds_w_fvs <- mapM (wrapLocFstM rnSrcInstDecl) (tyClGroupInstDecls tycl_ds)        ; role_annots  <- rnRoleAnnots tc_names (tyClGroupRoleDecls tycl_ds)         -- Do SCC analysis on the type/class decls        ; rdr_env <- getGlobalRdrEnv-       ; let tycl_sccs = depAnalTyClDecls rdr_env tycls_w_fvs+       ; let tycl_sccs = depAnalTyClDecls rdr_env kisig_fv_env tycls_w_fvs              role_annot_env = mkRoleAnnotEnv role_annots+             (kisig_env, kisig_fv_env) = mkKindSig_fv_env kisigs_w_fvs               inst_ds_map = mkInstDeclFreeVarsMap rdr_env tc_names instds_w_fvs              (init_inst_ds, rest_inst_ds) = getInsts [] inst_ds_map               first_group                | null init_inst_ds = []-               | otherwise = [TyClGroup { group_ext    = noExt+               | otherwise = [TyClGroup { group_ext    = noExtField                                         , group_tyclds = []+                                        , group_kisigs = []                                         , group_roles  = []                                         , group_instds = init_inst_ds }] -             ((final_inst_ds, orphan_roles), groups)-                = mapAccumL mk_group (rest_inst_ds, role_annot_env) tycl_sccs-+             (final_inst_ds, groups)+                = mapAccumL (mk_group role_annot_env kisig_env) rest_inst_ds tycl_sccs -             all_fvs = plusFV (foldr (plusFV . snd) emptyFVs tycls_w_fvs)-                              (foldr (plusFV . snd) emptyFVs instds_w_fvs)+             all_fvs = foldr (plusFV . snd) emptyFVs tycls_w_fvs  `plusFV`+                       foldr (plusFV . snd) emptyFVs instds_w_fvs `plusFV`+                       foldr (plusFV . snd) emptyFVs kisigs_w_fvs               all_groups = first_group ++ groups -       ; ASSERT2( null final_inst_ds,  ppr instds_w_fvs $$ ppr inst_ds_map+       ; MASSERT2( null final_inst_ds,  ppr instds_w_fvs $$ ppr inst_ds_map                                        $$ ppr (flattenSCCs tycl_sccs) $$ ppr final_inst_ds  )-         mapM_ orphanRoleAnnotErr (nameEnvElts orphan_roles)         ; traceRn "rnTycl dependency analysis made groups" (ppr all_groups)        ; return (all_groups, all_fvs) }   where-    mk_group :: (InstDeclFreeVarsMap, RoleAnnotEnv)+    mk_group :: RoleAnnotEnv+             -> KindSigEnv+             -> InstDeclFreeVarsMap              -> SCC (LTyClDecl GhcRn)-             -> ( (InstDeclFreeVarsMap, RoleAnnotEnv)-                , TyClGroup GhcRn )-    mk_group (inst_map, role_env) scc-      = ((inst_map', role_env'), group)+             -> (InstDeclFreeVarsMap, TyClGroup GhcRn)+    mk_group role_env kisig_env inst_map scc+      = (inst_map', group)       where         tycl_ds              = flattenSCC scc         bndrs                = map (tcdName . unLoc) tycl_ds+        roles                = getRoleAnnots bndrs role_env+        kisigs               = getKindSigs   bndrs kisig_env         (inst_ds, inst_map') = getInsts      bndrs inst_map-        (roles,   role_env') = getRoleAnnots bndrs role_env-        group = TyClGroup { group_ext    = noExt+        group = TyClGroup { group_ext    = noExtField                           , group_tyclds = tycl_ds+                          , group_kisigs = kisigs                           , group_roles  = roles                           , group_instds = inst_ds } +-- | Free variables of standalone kind signatures.+newtype KindSig_FV_Env = KindSig_FV_Env (NameEnv FreeVars) +lookupKindSig_FV_Env :: KindSig_FV_Env -> Name -> FreeVars+lookupKindSig_FV_Env (KindSig_FV_Env e) name+  = fromMaybe emptyFVs (lookupNameEnv e name)++-- | Standalone kind signatures.+type KindSigEnv = NameEnv (LStandaloneKindSig GhcRn)++mkKindSig_fv_env :: [(LStandaloneKindSig GhcRn, FreeVars)] -> (KindSigEnv, KindSig_FV_Env)+mkKindSig_fv_env kisigs_w_fvs = (kisig_env, kisig_fv_env)+  where+    kisig_env = mapNameEnv fst compound_env+    kisig_fv_env = KindSig_FV_Env (mapNameEnv snd compound_env)+    compound_env :: NameEnv (LStandaloneKindSig GhcRn, FreeVars)+      = mkNameEnvWith (standaloneKindSigName . unLoc . fst) kisigs_w_fvs++getKindSigs :: [Name] -> KindSigEnv -> [LStandaloneKindSig GhcRn]+getKindSigs bndrs kisig_env = mapMaybe (lookupNameEnv kisig_env) bndrs++rnStandaloneKindSignatures+  :: NameSet  -- names of types and classes in the current TyClGroup+  -> [LStandaloneKindSig GhcPs]+  -> RnM [(LStandaloneKindSig GhcRn, FreeVars)]+rnStandaloneKindSignatures tc_names kisigs+  = do { let (no_dups, dup_kisigs) = removeDups (compare `on` get_name) kisigs+             get_name = standaloneKindSigName . unLoc+       ; mapM_ dupKindSig_Err dup_kisigs+       ; mapM (wrapLocFstM (rnStandaloneKindSignature tc_names)) no_dups+       }++rnStandaloneKindSignature+  :: NameSet  -- names of types and classes in the current TyClGroup+  -> StandaloneKindSig GhcPs+  -> RnM (StandaloneKindSig GhcRn, FreeVars)+rnStandaloneKindSignature tc_names (StandaloneKindSig _ v ki)+  = do  { standalone_ki_sig_ok <- xoptM LangExt.StandaloneKindSignatures+        ; unless standalone_ki_sig_ok $ addErr standaloneKiSigErr+        ; new_v <- lookupSigCtxtOccRn (TopSigCtxt tc_names) (text "standalone kind signature") v+        ; let doc = StandaloneKindSigCtx (ppr v)+        ; (new_ki, fvs) <- rnHsSigType doc KindLevel ki+        ; return (StandaloneKindSig noExtField new_v new_ki, fvs)+        }+  where+    standaloneKiSigErr :: SDoc+    standaloneKiSigErr =+      hang (text "Illegal standalone kind signature")+         2 (text "Did you mean to enable StandaloneKindSignatures?")+rnStandaloneKindSignature _ (XStandaloneKindSig nec) = noExtCon nec+ depAnalTyClDecls :: GlobalRdrEnv+                 -> KindSig_FV_Env                  -> [(LTyClDecl GhcRn, FreeVars)]                  -> [SCC (LTyClDecl GhcRn)] -- See Note [Dependency analysis of type, class, and instance decls]-depAnalTyClDecls rdr_env ds_w_fvs+depAnalTyClDecls rdr_env kisig_fv_env ds_w_fvs   = stronglyConnCompFromEdgedVerticesUniq edges   where     edges :: [ Node Name (LTyClDecl GhcRn) ]-    edges = [ DigraphNode d (tcdName (unLoc d)) (map (getParent rdr_env) (nonDetEltsUniqSet fvs))-            | (d, fvs) <- ds_w_fvs ]+    edges = [ DigraphNode d name (map (getParent rdr_env) (nonDetEltsUniqSet deps))+            | (d, fvs) <- ds_w_fvs,+              let { name = tcdName (unLoc d)+                  ; kisig_fvs = lookupKindSig_FV_Env kisig_fv_env name+                  ; deps = fvs `plusFV` kisig_fvs+                  }+            ]             -- It's OK to use nonDetEltsUFM here as             -- stronglyConnCompFromEdgedVertices is still deterministic             -- even if the edges are in nondeterministic order as explained@@ -1401,9 +1452,8 @@ rnRoleAnnots tc_names role_annots   = do {  -- Check for duplicates *before* renaming, to avoid           -- lumping together all the unboundNames-         let (no_dups, dup_annots) = removeDups role_annots_cmp role_annots-             role_annots_cmp (dL->L _ annot1) (dL->L _ annot2)-               = roleAnnotDeclName annot1 `compare` roleAnnotDeclName annot2+         let (no_dups, dup_annots) = removeDups (compare `on` get_name) role_annots+             get_name = roleAnnotDeclName . unLoc        ; mapM_ dupRoleAnnotErr dup_annots        ; mapM (wrapLocM rn_role_annot1) no_dups }   where@@ -1413,8 +1463,8 @@              tycon' <- lookupSigCtxtOccRn (RoleAnnotCtxt tc_names)                                           (text "role annotation")                                           tycon-           ; return $ RoleAnnotDecl noExt tycon' roles }-    rn_role_annot1 (XRoleAnnotDecl _) = panic "rnRoleAnnots"+           ; return $ RoleAnnotDecl noExtField tycon' roles }+    rn_role_annot1 (XRoleAnnotDecl nec) = noExtCon nec  dupRoleAnnotErr :: NonEmpty (LRoleAnnotDecl GhcPs) -> RnM () dupRoleAnnotErr list@@ -1431,16 +1481,21 @@        cmp_annot (dL->L loc1 _) (dL->L loc2 _) = loc1 `compare` loc2 -orphanRoleAnnotErr :: LRoleAnnotDecl GhcRn -> RnM ()-orphanRoleAnnotErr (dL->L loc decl)+dupKindSig_Err :: NonEmpty (LStandaloneKindSig GhcPs) -> RnM ()+dupKindSig_Err list   = addErrAt loc $-    hang (text "Role annotation for a type previously declared:")-       2 (ppr decl) $$-    parens (text "The role annotation must be given where" <+>-            quotes (ppr $ roleAnnotDeclName decl) <+>-            text "is declared.")+    hang (text "Duplicate standalone kind signatures for" <+>+          quotes (ppr $ standaloneKindSigName first_decl) <> colon)+       2 (vcat $ map pp_kisig $ NE.toList sorted_list)+    where+      sorted_list = NE.sortBy cmp_loc list+      ((dL->L loc first_decl) :| _) = sorted_list +      pp_kisig (dL->L loc decl) =+        hang (ppr decl) 4 (text "-- written at" <+> ppr loc) +      cmp_loc (dL->L loc1 _) (dL->L loc2 _) = loc1 `compare` loc2+ {- Note [Role annotations in the renamer] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We must ensure that a type's role annotation is put in the same group as the@@ -1455,21 +1510,8 @@ of one another.  The renaming process, as usual, might identify and report errors for unbound-names. We exclude the annotations for unbound names in the annotation-environment to avoid spurious errors for orphaned annotations.--We then (in rnTyClDecls) do a check for orphan role annotations (role-annotations without an accompanying type decl). The check works by folding-over components (of type [[Either (TyClDecl Name) (InstDecl Name)]]), selecting-out the relevant role declarations for each group, as well as diminishing the-annotation environment. After the fold is complete, anything left over in the-name environment must be an orphan, and errors are generated.--An earlier version of this algorithm short-cut the orphan check by renaming-only with names declared in this module. But, this check is insufficient in-the case of staged module compilation (Template Haskell, GHCi).-See #8485. With the new lookup process (which includes types declared in other-modules), we get better error messages, too.+names. This is done by using lookupSigCtxtOccRn in rnRoleAnnots (using+lookupGlobalOccRn led to #8485). -}  @@ -1527,12 +1569,11 @@ rnTyClDecl :: TyClDecl GhcPs            -> RnM (TyClDecl GhcRn, FreeVars) --- All flavours of type family declarations ("type family", "newtype family",--- and "data family"), both top level and (for an associated type)--- in a class decl-rnTyClDecl (FamDecl { tcdFam = decl })-  = do { (decl', fvs) <- rnFamDecl Nothing decl-       ; return (FamDecl noExt decl', fvs) }+-- All flavours of top-level type family declarations ("type family", "newtype+-- family", and "data family")+rnTyClDecl (FamDecl { tcdFam = fam })+  = do { (fam', fvs) <- rnFamDecl Nothing fam+       ; return (FamDecl noExtField fam', fvs) }  rnTyClDecl (SynDecl { tcdLName = tycon, tcdTyVars = tyvars,                       tcdFixity = fixity, tcdRhs = rhs })@@ -1547,18 +1588,20 @@                          , tcdRhs = rhs', tcdSExt = fvs }, fvs) } }  -- "data", "newtype" declarations--- both top level and (for an associated type) in an instance decl-rnTyClDecl (DataDecl { tcdLName = tycon, tcdTyVars = tyvars,-                       tcdFixity = fixity, tcdDataDefn = defn })+rnTyClDecl (DataDecl _ _ _ _ (XHsDataDefn nec)) = noExtCon nec+rnTyClDecl (DataDecl+    { tcdLName = tycon, tcdTyVars = tyvars,+      tcdFixity = fixity,+      tcdDataDefn = defn@HsDataDefn{ dd_ND = new_or_data+                                   , dd_kindSig = kind_sig} })   = do { tycon' <- lookupLocatedTopBndrRn tycon        ; let kvs = extractDataDefnKindVars defn              doc = TyDataCtx tycon        ; traceRn "rntycl-data" (ppr tycon <+> ppr kvs)        ; bindHsQTyVars doc Nothing Nothing kvs tyvars $ \ tyvars' no_rhs_kvs ->     do { (defn', fvs) <- rnDataDefn doc defn-          -- See Note [Complete user-supplied kind signatures] in HsDecls-       ; let cusk = hsTvbAllKinded tyvars' && no_rhs_kvs-             rn_info = DataDeclRn { tcdDataCusk = cusk+       ; cusk <- data_decl_has_cusk tyvars' new_or_data no_rhs_kvs kind_sig+       ; let rn_info = DataDeclRn { tcdDataCusk = cusk                                   , tcdFVs      = fvs }        ; traceRn "rndata" (ppr tycon <+> ppr cusk <+> ppr no_rhs_kvs)        ; return (DataDecl { tcdLName    = tycon'@@ -1589,7 +1632,7 @@                          fv_ats              ; return ((tyvars', context', fds', ats'), fvs) } -        ; (at_defs', fv_at_defs) <- rnList (rnTyFamDefltEqn cls') at_defs+        ; (at_defs', fv_at_defs) <- rnList (rnTyFamDefltDecl cls') at_defs          -- No need to check for duplicate associated type decls         -- since that is done by RnNames.extendGlobalRdrEnvRn@@ -1632,8 +1675,42 @@   where     cls_doc  = ClassDeclCtx lcls -rnTyClDecl (XTyClDecl _) = panic "rnTyClDecl"+rnTyClDecl (XTyClDecl nec) = noExtCon nec +-- Does the data type declaration include a CUSK?+data_decl_has_cusk :: LHsQTyVars pass -> NewOrData -> Bool -> Maybe (LHsKind pass') -> RnM Bool+data_decl_has_cusk tyvars new_or_data no_rhs_kvs kind_sig = do+  { -- See Note [Unlifted Newtypes and CUSKs], and for a broader+    -- picture, see Note [Implementation of UnliftedNewtypes].+  ; unlifted_newtypes <- xoptM LangExt.UnliftedNewtypes+  ; let non_cusk_newtype+          | NewType <- new_or_data =+              unlifted_newtypes && isNothing kind_sig+          | otherwise = False+    -- See Note [CUSKs: complete user-supplied kind signatures] in GHC.Hs.Decls+  ; return $ hsTvbAllKinded tyvars && no_rhs_kvs && not non_cusk_newtype+  }++{- Note [Unlifted Newtypes and CUSKs]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When unlifted newtypes are enabled, a newtype must have a kind signature+in order to be considered have a CUSK. This is because the flow of+kind inference works differently. Consider:++  newtype Foo = FooC Int++When UnliftedNewtypes is disabled, we decide that Foo has kind+`TYPE 'LiftedRep` without looking inside the data constructor. So, we+can say that Foo has a CUSK. However, when UnliftedNewtypes is enabled,+we fill in the kind of Foo as a metavar that gets solved by unification+with the kind of the field inside FooC (that is, Int, whose kind is+`TYPE 'LiftedRep`). But since we have to look inside the data constructors+to figure out the kind signature of Foo, it does not have a CUSK.++See Note [Implementation of UnliftedNewtypes] for where this fits in to+the broader picture of UnliftedNewtypes.+-}+ -- "type" and "type instance" declarations rnTySyn :: HsDocContext -> LHsType GhcPs -> RnM (LHsType GhcRn, FreeVars) rnTySyn doc rhs = rnLHsType doc rhs@@ -1664,7 +1741,7 @@          ; let all_fvs = fvs1 `plusFV` fvs3 `plusFV`                         con_fvs `plusFV` sig_fvs-        ; return ( HsDataDefn { dd_ext = noExt+        ; return ( HsDataDefn { dd_ext = noExtField                               , dd_ND = new_or_data, dd_cType = cType                               , dd_ctxt = context', dd_kindSig = m_sig'                               , dd_cons = condecls'@@ -1682,7 +1759,7 @@                multipleDerivClausesErr            ; (ds', fvs) <- mapFvRn (rnLHsDerivingClause doc) ds            ; return (cL loc ds', fvs) }-rnDataDefn _ (XHsDataDefn _) = panic "rnDataDefn"+rnDataDefn _ (XHsDataDefn nec) = noExtCon nec  warnNoDerivStrat :: Maybe (LDerivStrategy GhcRn)                  -> SrcSpan@@ -1711,46 +1788,37 @@                     -> RnM (LHsDerivingClause GhcRn, FreeVars) rnLHsDerivingClause doc                 (dL->L loc (HsDerivingClause-                              { deriv_clause_ext = noExt+                              { deriv_clause_ext = noExtField                               , deriv_clause_strategy = dcs                               , deriv_clause_tys = (dL->L loc' dct) }))   = do { (dcs', dct', fvs)-           <- rnLDerivStrategy doc dcs $ \strat_tvs ppr_via_ty ->-              mapFvRn (rn_deriv_ty strat_tvs ppr_via_ty) dct+           <- rnLDerivStrategy doc dcs $ mapFvRn (rnHsSigType doc TypeLevel) dct        ; warnNoDerivStrat dcs' loc-       ; pure ( cL loc (HsDerivingClause { deriv_clause_ext = noExt+       ; pure ( cL loc (HsDerivingClause { deriv_clause_ext = noExtField                                          , deriv_clause_strategy = dcs'                                          , deriv_clause_tys = cL loc' dct' })               , fvs ) }-  where-    rn_deriv_ty :: [Name] -> SDoc -> LHsSigType GhcPs-                -> RnM (LHsSigType GhcRn, FreeVars)-    rn_deriv_ty strat_tvs ppr_via_ty deriv_ty@(HsIB {hsib_body = dL->L loc _}) =-      rnAndReportFloatingViaTvs strat_tvs loc ppr_via_ty "class" $-      rnHsSigType doc deriv_ty-    rn_deriv_ty _ _ (XHsImplicitBndrs _) = panic "rn_deriv_ty"-rnLHsDerivingClause _ (dL->L _ (XHsDerivingClause _))-  = panic "rnLHsDerivingClause"+rnLHsDerivingClause _ (dL->L _ (XHsDerivingClause nec))+  = noExtCon nec rnLHsDerivingClause _ _ = panic "rnLHsDerivingClause: Impossible Match"                                 -- due to #15884  rnLDerivStrategy :: forall a.                     HsDocContext                  -> Maybe (LDerivStrategy GhcPs)-                 -> ([Name]   -- The tyvars bound by the via type-                      -> SDoc -- The pretty-printed via type (used for-                              -- error message reporting)-                      -> RnM (a, FreeVars))+                 -> RnM (a, FreeVars)                  -> RnM (Maybe (LDerivStrategy GhcRn), a, FreeVars) rnLDerivStrategy doc mds thing_inside   = case mds of       Nothing -> boring_case Nothing-      Just ds -> do (ds', thing, fvs) <- rn_deriv_strat ds-                    pure (Just ds', thing, fvs)+      Just (dL->L loc ds) ->+        setSrcSpan loc $ do+          (ds', thing, fvs) <- rn_deriv_strat ds+          pure (Just (cL loc ds'), thing, fvs)   where-    rn_deriv_strat :: LDerivStrategy GhcPs-                   -> RnM (LDerivStrategy GhcRn, a, FreeVars)-    rn_deriv_strat (dL->L loc ds) = do+    rn_deriv_strat :: DerivStrategy GhcPs+                   -> RnM (DerivStrategy GhcRn, a, FreeVars)+    rn_deriv_strat ds = do       let extNeeded :: LangExt.Extension           extNeeded             | ViaStrategy{} <- ds@@ -1762,75 +1830,23 @@         failWith $ illegalDerivStrategyErr ds        case ds of-        StockStrategy    -> boring_case (cL loc StockStrategy)-        AnyclassStrategy -> boring_case (cL loc AnyclassStrategy)-        NewtypeStrategy  -> boring_case (cL loc NewtypeStrategy)+        StockStrategy    -> boring_case StockStrategy+        AnyclassStrategy -> boring_case AnyclassStrategy+        NewtypeStrategy  -> boring_case NewtypeStrategy         ViaStrategy via_ty ->-          do (via_ty', fvs1) <- rnHsSigType doc via_ty+          do (via_ty', fvs1) <- rnHsSigType doc TypeLevel via_ty              let HsIB { hsib_ext  = via_imp_tvs                       , hsib_body = via_body } = via_ty'-                 (via_exp_tv_bndrs, _, _) = splitLHsSigmaTy via_body-                 via_exp_tvs = map hsLTyVarName via_exp_tv_bndrs+                 (via_exp_tv_bndrs, _, _) = splitLHsSigmaTyInvis via_body+                 via_exp_tvs = hsLTyVarNames via_exp_tv_bndrs                  via_tvs = via_imp_tvs ++ via_exp_tvs-             (thing, fvs2) <- extendTyVarEnvFVRn via_tvs $-                              thing_inside via_tvs (ppr via_ty')-             pure (cL loc (ViaStrategy via_ty'), thing, fvs1 `plusFV` fvs2)--    boring_case :: mds-                -> RnM (mds, a, FreeVars)-    boring_case mds = do-      (thing, fvs) <- thing_inside [] empty-      pure (mds, thing, fvs)---- | Errors if a @via@ type binds any floating type variables.--- See @Note [Floating `via` type variables]@-rnAndReportFloatingViaTvs-  :: forall a. Outputable a-  => [Name]  -- ^ The bound type variables from a @via@ type.-  -> SrcSpan -- ^ The source span (for error reporting only).-  -> SDoc    -- ^ The pretty-printed @via@ type (for error reporting only).-  -> String  -- ^ A description of what the @via@ type scopes over-             --   (for error reporting only).-  -> RnM (a, FreeVars) -- ^ The thing the @via@ type scopes over.-  -> RnM (a, FreeVars)-rnAndReportFloatingViaTvs tv_names loc ppr_via_ty via_scope_desc thing_inside-  = do (thing, thing_fvs) <- thing_inside-       setSrcSpan loc $ mapM_ (report_floating_via_tv thing thing_fvs) tv_names-       pure (thing, thing_fvs)-  where-    report_floating_via_tv :: a -> FreeVars -> Name -> RnM ()-    report_floating_via_tv thing used_names tv_name-      = unless (tv_name `elemNameSet` used_names) $ addErr $ vcat-          [ text "Type variable" <+> quotes (ppr tv_name) <+>-            text "is bound in the" <+> quotes (text "via") <+>-            text "type" <+> quotes ppr_via_ty-          , text "but is not mentioned in the derived" <+>-            text via_scope_desc <+> quotes (ppr thing) <>-            text ", which is illegal" ]--{--Note [Floating `via` type variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Imagine the following `deriving via` clause:--    data Quux-      deriving Eq via (Const a Quux)--This should be rejected. Why? Because it would generate the following instance:--    instance Eq Quux where-      (==) = coerce @(Quux         -> Quux         -> Bool)-                    @(Const a Quux -> Const a Quux -> Bool)-                    (==) :: Const a Quux -> Const a Quux -> Bool--This instance is ill-formed, as the `a` in `Const a Quux` is unbound. The-problem is that `a` is never used anywhere in the derived class `Eq`. Since-`a` is bound but has no use sites, we refer to it as "floating".+             (thing, fvs2) <- extendTyVarEnvFVRn via_tvs thing_inside+             pure (ViaStrategy via_ty', thing, fvs1 `plusFV` fvs2) -We use the rnAndReportFloatingViaTvs function to check that any type renamed-within the context of the `via` deriving strategy actually uses all bound-`via` type variables, and if it doesn't, it throws an error.--}+    boring_case :: ds -> RnM (ds, a, FreeVars)+    boring_case ds = do+      (thing, fvs) <- thing_inside+      pure (ds, thing, fvs)  badGadtStupidTheta :: HsDocContext -> SDoc badGadtStupidTheta _@@ -1873,7 +1889,7 @@                                           injectivity                ; return ( (tyvars', res_sig', injectivity') , fv_kind ) }        ; (info', fv2) <- rn_info tycon' info-       ; return (FamilyDecl { fdExt = noExt+       ; return (FamilyDecl { fdExt = noExtField                             , fdLName = tycon', fdTyVars = tyvars'                             , fdFixity = fixity                             , fdInfo = info', fdResultSig = res_sig'@@ -1888,7 +1904,7 @@              -> FamilyInfo GhcPs -> RnM (FamilyInfo GhcRn, FreeVars)      rn_info (dL->L _ fam_name) (ClosedTypeFamily (Just eqns))        = do { (eqns', fvs)-                <- rnList (rnTyFamInstEqn Nothing (ClosedTyFam tycon fam_name))+                <- rnList (rnTyFamInstEqn NonAssocTyFamEqn (ClosedTyFam tycon fam_name))                                           -- no class context                           eqns             ; return (ClosedTypeFamily (Just eqns'), fvs) }@@ -1896,16 +1912,16 @@        = return (ClosedTypeFamily Nothing, emptyFVs)      rn_info _ OpenTypeFamily = return (OpenTypeFamily, emptyFVs)      rn_info _ DataFamily     = return (DataFamily, emptyFVs)-rnFamDecl _ (XFamilyDecl _) = panic "rnFamDecl"+rnFamDecl _ (XFamilyDecl nec) = noExtCon nec  rnFamResultSig :: HsDocContext                -> FamilyResultSig GhcPs                -> RnM (FamilyResultSig GhcRn, FreeVars) rnFamResultSig _ (NoSig _)-   = return (NoSig noExt, emptyFVs)+   = return (NoSig noExtField, emptyFVs) rnFamResultSig doc (KindSig _ kind)    = do { (rndKind, ftvs) <- rnLHsKind doc kind-        ;  return (KindSig noExt rndKind, ftvs) }+        ;  return (KindSig noExtField rndKind, ftvs) } rnFamResultSig doc (TyVarSig _ tvbndr)    = do { -- `TyVarSig` tells us that user named the result of a type family by           -- writing `= tyvar` or `= (tyvar :: kind)`. In such case we want to@@ -1927,8 +1943,8 @@        ; bindLHsTyVarBndr doc Nothing -- This might be a lie, but it's used for                                       -- scoping checks that are irrelevant here                           tvbndr $ \ tvbndr' ->-         return (TyVarSig noExt tvbndr', unitFV (hsLTyVarName tvbndr')) }-rnFamResultSig _ (XFamilyResultSig _) = panic "rnFamResultSig"+         return (TyVarSig noExtField tvbndr', unitFV (hsLTyVarName tvbndr')) }+rnFamResultSig _ (XFamilyResultSig nec) = noExtCon nec  -- Note [Renaming injectivity annotation] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2026,7 +2042,7 @@ {- Note [Stupid theta] ~~~~~~~~~~~~~~~~~~~-Trac #3850 complains about a regression wrt 6.10 for+#3850 complains about a regression wrt 6.10 for      data Show a => T a There is no reason not to allow the stupid theta if there are no data constructors.  It's still stupid, but does no harm, and I don't want@@ -2079,7 +2095,7 @@              [ text "ex_tvs:" <+> ppr ex_tvs              , text "new_ex_dqtvs':" <+> ppr new_ex_tvs ]) -        ; return (decl { con_ext = noExt+        ; return (decl { con_ext = noExtField                        , con_name = new_name, con_ex_tvs = new_ex_tvs                        , con_mb_cxt = new_context, con_args = new_args                        , con_doc = mb_doc' },@@ -2104,7 +2120,7 @@           -- order of their appearance in the constructor type.           -- That order governs the order the implicitly-quantified type           -- variable, and hence the order needed for visible type application-          -- See Trac #14808.+          -- See #14808.               free_tkvs = extractHsTvBndrs explicit_tkvs $                           extractHsTysRdrTyVarsDups (theta ++ arg_tys ++ [res_ty]) @@ -2125,22 +2141,20 @@                       RecCon {}    -> (new_args, new_res_ty)                       PrefixCon as | (arg_tys, final_res_ty) <- splitHsFunType new_res_ty                                    -> ASSERT( null as )-                                      -- See Note [GADT abstract syntax] in HsDecls+                                      -- See Note [GADT abstract syntax] in GHC.Hs.Decls                                       (PrefixCon arg_tys, final_res_ty) -              new_qtvs =  HsQTvs { hsq_ext = HsQTvsRn-                                     { hsq_implicit  = implicit_tkvs-                                     , hsq_dependent = emptyNameSet }+              new_qtvs =  HsQTvs { hsq_ext = implicit_tkvs                                  , hsq_explicit  = explicit_tkvs }          ; traceRn "rnConDecl2" (ppr names $$ ppr implicit_tkvs $$ ppr explicit_tkvs)-        ; return (decl { con_g_ext = noExt, con_names = new_names+        ; return (decl { con_g_ext = noExtField, con_names = new_names                        , con_qvars = new_qtvs, con_mb_cxt = new_cxt                        , con_args = args', con_res_ty = res_ty'                        , con_doc = mb_doc' },                   all_fvs) } } -rnConDecl (XConDecl _) = panic "rnConDecl"+rnConDecl (XConDecl nec) = noExtCon nec   rnMbContext :: HsDocContext -> Maybe (LHsContext GhcPs)@@ -2189,7 +2203,7 @@    ; setEnvs (final_gbl_env, lcl_env) (thing pat_syn_bndrs) }   where     new_ps :: HsValBinds GhcPs -> TcM [(Name, [FieldLabel])]-    new_ps (ValBinds _ binds _) = foldrBagM new_ps' [] binds+    new_ps (ValBinds _ binds _) = foldrM new_ps' [] binds     new_ps _ = panic "new_ps"      new_ps' :: LHsBindLR GhcPs GhcPs@@ -2202,7 +2216,7 @@           bnd_name <- newTopSrcBinder (cL bind_loc n)           let rnames = map recordPatSynSelectorId as               mkFieldOcc :: Located RdrName -> LFieldOcc GhcPs-              mkFieldOcc (dL->L l name) = cL l (FieldOcc noExt (cL l name))+              mkFieldOcc (dL->L l name) = cL l (FieldOcc noExtField (cL l name))               field_occs =  map mkFieldOcc rnames           flds     <- mapM (newRecordSelector False [bnd_name]) field_occs           return ((bnd_name, flds): names)@@ -2289,7 +2303,7 @@                      -- The compiler should suggest the above, and not using                      -- TemplateHaskell since the former suggestion is more                      -- relevant to the larger base of users.-                     -- See Trac #12146 for discussion.+                     -- See #12146 for discussion.  -- Class declarations: pull out the fixity signatures to the top add gp@(HsGroup {hs_tyclds = ts, hs_fixds = fs}) l (TyClD _ d) ds@@ -2303,6 +2317,11 @@ -- Signatures: fixity sigs go a different place than all others add gp@(HsGroup {hs_fixds = ts}) l (SigD _ (FixSig _ f)) ds   = addl (gp {hs_fixds = cL l f : ts}) ds++-- Standalone kind signatures: added to the TyClGroup+add gp@(HsGroup {hs_tyclds = ts}) l (KindSigD _ s) ds+  = addl (gp {hs_tyclds = add_kisig (cL l s) ts}) ds+ add gp@(HsGroup {hs_valds = ts}) l (SigD _ d) ds   = addl (gp {hs_valds = add_sig (cL l d) ts}) ds @@ -2335,45 +2354,61 @@   = addl (gp { hs_ruleds = cL l d : ts }) ds add gp l (DocD _ d) ds   = addl (gp { hs_docs = (cL l d) : (hs_docs gp) })  ds-add (HsGroup {}) _ (SpliceD _ (XSpliceDecl _)) _ = panic "RnSource.add"-add (HsGroup {}) _ (XHsDecl _)                 _ = panic "RnSource.add"-add (XHsGroup _) _ _                           _ = panic "RnSource.add"+add (HsGroup {}) _ (SpliceD _ (XSpliceDecl nec)) _ = noExtCon nec+add (HsGroup {}) _ (XHsDecl nec)                 _ = noExtCon nec+add (XHsGroup nec) _ _                           _ = noExtCon nec  add_tycld :: LTyClDecl (GhcPass p) -> [TyClGroup (GhcPass p)]           -> [TyClGroup (GhcPass p)]-add_tycld d []       = [TyClGroup { group_ext    = noExt+add_tycld d []       = [TyClGroup { group_ext    = noExtField                                   , group_tyclds = [d]+                                  , group_kisigs = []                                   , group_roles  = []                                   , group_instds = []                                   }                        ] add_tycld d (ds@(TyClGroup { group_tyclds = tyclds }):dss)   = ds { group_tyclds = d : tyclds } : dss-add_tycld _ (XTyClGroup _: _) = panic "add_tycld"+add_tycld _ (XTyClGroup nec: _) = noExtCon nec  add_instd :: LInstDecl (GhcPass p) -> [TyClGroup (GhcPass p)]           -> [TyClGroup (GhcPass p)]-add_instd d []       = [TyClGroup { group_ext    = noExt+add_instd d []       = [TyClGroup { group_ext    = noExtField                                   , group_tyclds = []+                                  , group_kisigs = []                                   , group_roles  = []                                   , group_instds = [d]                                   }                        ] add_instd d (ds@(TyClGroup { group_instds = instds }):dss)   = ds { group_instds = d : instds } : dss-add_instd _ (XTyClGroup _: _) = panic "add_instd"+add_instd _ (XTyClGroup nec: _) = noExtCon nec  add_role_annot :: LRoleAnnotDecl (GhcPass p) -> [TyClGroup (GhcPass p)]                -> [TyClGroup (GhcPass p)]-add_role_annot d [] = [TyClGroup { group_ext    = noExt+add_role_annot d [] = [TyClGroup { group_ext    = noExtField                                  , group_tyclds = []+                                 , group_kisigs = []                                  , group_roles  = [d]                                  , group_instds = []                                  }                       ] add_role_annot d (tycls@(TyClGroup { group_roles = roles }) : rest)   = tycls { group_roles = d : roles } : rest-add_role_annot _ (XTyClGroup _: _) = panic "add_role_annot"+add_role_annot _ (XTyClGroup nec: _) = noExtCon nec++add_kisig :: LStandaloneKindSig (GhcPass p)+         -> [TyClGroup (GhcPass p)] -> [TyClGroup (GhcPass p)]+add_kisig d [] = [TyClGroup { group_ext    = noExtField+                            , group_tyclds = []+                            , group_kisigs = [d]+                            , group_roles  = []+                            , group_instds = []+                            }+                 ]+add_kisig d (tycls@(TyClGroup { group_kisigs = kisigs }) : rest)+  = tycls { group_kisigs = d : kisigs } : rest+add_kisig _ (XTyClGroup nec : _) = noExtCon nec  add_bind :: LHsBind a -> HsValBinds a -> HsValBinds a add_bind b (ValBinds x bs sigs) = ValBinds x (bs `snocBag` b) sigs
rename/RnSplice.hs view
@@ -16,7 +16,7 @@  import Name import NameSet-import HsSyn+import GHC.Hs import RdrName import TcRnMonad @@ -104,7 +104,7 @@                         ; (body', fvs_e) <-                           setStage (Brack cur_stage RnPendingTyped) $                                    rn_bracket cur_stage br_body-                        ; return (HsBracket noExt body', fvs_e) }+                        ; return (HsBracket noExtField body', fvs_e) }              False -> do { traceRn "Renaming untyped TH bracket" empty                         ; ps_var <- newMutVar []@@ -112,7 +112,7 @@                           setStage (Brack cur_stage (RnPendingUntyped ps_var)) $                                    rn_bracket cur_stage br_body                         ; pendings <- readMutVar ps_var-                        ; return (HsRnBracketOut noExt body' pendings, fvs_e) }+                        ; return (HsRnBracketOut noExtField body' pendings, fvs_e) }        }  rn_bracket :: ThStage -> HsBracket GhcPs -> RnM (HsBracket GhcRn, FreeVars)@@ -180,7 +180,7 @@ rn_bracket _ (TExpBr x e) = do { (e', fvs) <- rnLExpr e                                ; return (TExpBr x e', fvs) } -rn_bracket _ (XBracket {}) = panic "rn_bracket: unexpected XBracket"+rn_bracket _ (XBracket nec) = noExtCon nec  quotationCtxtDoc :: HsBracket GhcPs -> SDoc quotationCtxtDoc br_body@@ -303,7 +303,7 @@                 HsTypedSplice {}          -> pprPanic "runRnSplice" (ppr splice)                 HsSpliced {}              -> pprPanic "runRnSplice" (ppr splice)                 HsSplicedT {}             -> pprPanic "runRnSplice" (ppr splice)-                XSplice {}                -> pprPanic "runRnSplice" (ppr splice)+                XSplice nec               -> noExtCon nec               -- Typecheck the expression        ; meta_exp_ty   <- tcMetaTy meta_ty_name@@ -352,8 +352,8 @@   = pprPanic "makePending" (ppr splice) makePending _ splice@(HsSplicedT {})   = pprPanic "makePending" (ppr splice)-makePending _ splice@(XSplice {})-  = pprPanic "makePending" (ppr splice)+makePending _ (XSplice nec)+  = noExtCon nec  ------------------ mkQuasiQuoteExpr :: UntypedSpliceFlavour -> Name -> SrcSpan -> FastString@@ -361,13 +361,13 @@ -- Return the expression (quoter "...quote...") -- which is what we must run in a quasi-quote mkQuasiQuoteExpr flavour quoter q_span quote-  = cL q_span $ HsApp noExt (cL q_span-              $ HsApp noExt (cL q_span (HsVar noExt (cL q_span quote_selector)))-                            quoterExpr)+  = cL q_span $ HsApp noExtField (cL q_span+              $ HsApp noExtField (cL q_span (HsVar noExtField (cL q_span quote_selector)))+                                 quoterExpr)                      quoteExpr   where-    quoterExpr = cL q_span $! HsVar noExt $! (cL q_span quoter)-    quoteExpr  = cL q_span $! HsLit noExt $! HsString NoSourceText quote+    quoterExpr = cL q_span $! HsVar noExtField $! (cL q_span quoter)+    quoteExpr  = cL q_span $! HsLit noExtField $! HsString NoSourceText quote     quote_selector = case flavour of                        UntypedExpSplice  -> quoteExpName                        UntypedPatSplice  -> quotePatName@@ -378,22 +378,19 @@ rnSplice :: HsSplice GhcPs -> RnM (HsSplice GhcRn, FreeVars) -- Not exported...used for all rnSplice (HsTypedSplice x hasParen splice_name expr)-  = do  { checkTH expr "Template Haskell typed splice"-        ; loc  <- getSrcSpanM+  = do  { loc  <- getSrcSpanM         ; n' <- newLocalBndrRn (cL loc splice_name)         ; (expr', fvs) <- rnLExpr expr         ; return (HsTypedSplice x hasParen n' expr', fvs) }  rnSplice (HsUntypedSplice x hasParen splice_name expr)-  = do  { checkTH expr "Template Haskell untyped splice"-        ; loc  <- getSrcSpanM+  = do  { loc  <- getSrcSpanM         ; n' <- newLocalBndrRn (cL loc splice_name)         ; (expr', fvs) <- rnLExpr expr         ; return (HsUntypedSplice x hasParen n' expr', fvs) }  rnSplice (HsQuasiQuote x splice_name quoter q_loc quote)-  = do  { checkTH quoter "Template Haskell quasi-quote"-        ; loc  <- getSrcSpanM+  = do  { loc  <- getSrcSpanM         ; splice_name' <- newLocalBndrRn (cL loc splice_name)            -- Rename the quoter; akin to the HsVar case of rnExpr@@ -407,7 +404,7 @@  rnSplice splice@(HsSpliced {}) = pprPanic "rnSplice" (ppr splice) rnSplice splice@(HsSplicedT {}) = pprPanic "rnSplice" (ppr splice)-rnSplice splice@(XSplice {})   = pprPanic "rnSplice" (ppr splice)+rnSplice        (XSplice nec)   = noExtCon nec  --------------------- rnSpliceExpr :: HsSplice GhcPs -> RnM (HsExpr GhcRn, FreeVars)@@ -416,7 +413,7 @@   where     pend_expr_splice :: HsSplice GhcRn -> (PendingRnSplice, HsExpr GhcRn)     pend_expr_splice rn_splice-        = (makePending UntypedExpSplice rn_splice, HsSpliceE noExt rn_splice)+        = (makePending UntypedExpSplice rn_splice, HsSpliceE noExtField rn_splice)      run_expr_splice :: HsSplice GhcRn -> RnM (HsExpr GhcRn, FreeVars)     run_expr_splice rn_splice@@ -429,7 +426,7 @@                                                      , isLocalGRE gre]                  lcl_names = mkNameSet (localRdrEnvElts lcl_rdr) -           ; return (HsSpliceE noExt rn_splice, lcl_names `plusFV` gbl_names) }+           ; return (HsSpliceE noExtField rn_splice, lcl_names `plusFV` gbl_names) }        | otherwise  -- Run it here, see Note [Running splices in the Renamer]       = do { traceRn "rnSpliceExpr: untyped expression splice" empty@@ -437,8 +434,8 @@                 runRnSplice UntypedExpSplice runMetaE ppr rn_splice            ; (lexpr3, fvs) <- checkNoErrs (rnLExpr rn_expr)              -- See Note [Delaying modFinalizers in untyped splices].-           ; return ( HsPar noExt $ HsSpliceE noExt-                            . HsSpliced noExt (ThModFinalizers mod_finalizers)+           ; return ( HsPar noExtField $ HsSpliceE noExtField+                            . HsSpliced noExtField (ThModFinalizers mod_finalizers)                             . HsSplicedExpr <$>                             lexpr3                     , fvs)@@ -447,16 +444,16 @@ {- Note [Running splices in the Renamer] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Splices used to be run in the typechecker, which led to (Trac #4364). Since the+Splices used to be run in the typechecker, which led to (#4364). Since the renamer must decide which expressions depend on which others, and it cannot reliably do this for arbitrary splices, we used to conservatively say that splices depend on all other expressions in scope. Unfortunately, this led to-the problem of cyclic type declarations seen in (Trac #4364). Instead, by+the problem of cyclic type declarations seen in (#4364). Instead, by running splices in the renamer, we side-step the problem of determining dependencies: by the time the dependency analysis happens, any splices have already been run, and expression dependencies can be determined as usual. -However, see (Trac #9813), for an example where we would like to run splices+However, see (#9813), for an example where we would like to run splices *after* performing dependency analysis (that is, after renaming). It would be desirable to typecheck "non-splicy" expressions (those expressions that do not contain splices directly or via dependence on an expression that does) before@@ -477,7 +474,7 @@ making them available to reify, but cannot accurately determine dependencies without running splices in the renamer! -Indeed, the conclusion of (Trac #9813) was that it is not worth the complexity+Indeed, the conclusion of (#9813) was that it is not worth the complexity to try and  a) implement and maintain the code for renaming/typechecking non-splicy     expressions before splicy expressions,@@ -490,7 +487,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  When splices run in the renamer, 'reify' does not have access to the local-type environment (Trac #11832, [1]).+type environment (#11832, [1]).  For instance, in @@ -525,7 +522,7 @@  References: -[1] https://ghc.haskell.org/trac/ghc/wiki/TemplateHaskell/Reify+[1] https://gitlab.haskell.org/ghc/ghc/wikis/template-haskell/reify [2] 'rnSpliceExpr' [3] 'TcSplice.qAddModFinalizer' [4] 'TcExpr.tcExpr' ('HsSpliceE' ('HsSpliced' ...))@@ -541,7 +538,7 @@   where     pend_type_splice rn_splice        = ( makePending UntypedTypeSplice rn_splice-         , HsSpliceTy noExt rn_splice)+         , HsSpliceTy noExtField rn_splice)      run_type_splice rn_splice       = do { traceRn "rnSpliceType: untyped type splice" empty@@ -551,8 +548,9 @@                                  ; checkNoErrs $ rnLHsType doc hs_ty2 }                                     -- checkNoErrs: see Note [Renamer errors]              -- See Note [Delaying modFinalizers in untyped splices].-           ; return ( HsParTy noExt $ HsSpliceTy noExt-                              . HsSpliced noExt (ThModFinalizers mod_finalizers)+           ; return ( HsParTy noExtField+                              $ HsSpliceTy noExtField+                              . HsSpliced noExtField (ThModFinalizers mod_finalizers)                               . HsSplicedTy <$>                               hs_ty3                     , fvs@@ -611,7 +609,7 @@                        (PendingRnSplice, Either b (Pat GhcRn))     pend_pat_splice rn_splice       = (makePending UntypedPatSplice rn_splice-        , Right (SplicePat noExt rn_splice))+        , Right (SplicePat noExtField rn_splice))      run_pat_splice :: HsSplice GhcRn ->                       RnM (Either (Pat GhcPs) (Pat GhcRn), FreeVars)@@ -620,8 +618,8 @@            ; (pat, mod_finalizers) <-                 runRnSplice UntypedPatSplice runMetaP ppr rn_splice              -- See Note [Delaying modFinalizers in untyped splices].-           ; return ( Left $ ParPat noExt $ ((SplicePat noExt)-                              . HsSpliced noExt (ThModFinalizers mod_finalizers)+           ; return ( Left $ ParPat noExtField $ ((SplicePat noExtField)+                              . HsSpliced noExtField (ThModFinalizers mod_finalizers)                               . HsSplicedPat)  `onHasSrcSpan`                               pat                     , emptyFVs@@ -636,10 +634,10 @@   where     pend_decl_splice rn_splice        = ( makePending UntypedDeclSplice rn_splice-         , SpliceDecl noExt (cL loc rn_splice) flg)+         , SpliceDecl noExtField (cL loc rn_splice) flg) -    run_decl_splice rn_splice = pprPanic "rnSpliceDecl" (ppr rn_splice)-rnSpliceDecl (XSpliceDecl _) = panic "rnSpliceDecl"+    run_decl_splice rn_splice  = pprPanic "rnSpliceDecl" (ppr rn_splice)+rnSpliceDecl (XSpliceDecl nec) = noExtCon nec  rnTopSpliceDecls :: HsSplice GhcPs -> RnM ([LHsDecl GhcPs], FreeVars) -- Declaration splice at the very top level of the module@@ -856,7 +854,7 @@  This must be done by the renamer, not the type checker (as of old), because the type checker doesn't typecheck the body of untyped-brackets (Trac #8540).+brackets (#8540).  A thing can have a bind_lvl of outerLevel, but have an internal name:    foo = [d| op = 3
rename/RnSplice.hs-boot view
@@ -1,7 +1,7 @@ module RnSplice where  import GhcPrelude-import HsSyn+import GHC.Hs import TcRnMonad import NameSet 
rename/RnTypes.hs view
@@ -26,14 +26,11 @@         -- Binding related stuff         bindLHsTyVarBndr, bindLHsTyVarBndrs, rnImplicitBndrs,         bindSigTyVarsFV, bindHsQTyVars, bindLRdrNames,-        extractFilteredRdrTyVars, extractFilteredRdrTyVarsDups,         extractHsTyRdrTyVars, extractHsTyRdrTyVarsKindVars,-        extractHsTyRdrTyVarsDups, extractHsTysRdrTyVars,-        extractHsTysRdrTyVarsDups, rmDupsInRdrTyVars,+        extractHsTysRdrTyVarsDups,         extractRdrKindSigVars, extractDataDefnKindVars,         extractHsTvBndrs, extractHsTyArgRdrKiTyVarsDup,-        freeKiTyVarsAllVars, freeKiTyVarsKindVars, freeKiTyVarsTypeVars,-        elemRdr+        nubL, elemRdr   ) where  import GhcPrelude@@ -41,7 +38,7 @@ import {-# SOURCE #-} RnSplice( rnSpliceType )  import DynFlags-import HsSyn+import GHC.Hs import RnHsDoc          ( rnLHsDoc, rnMbLHsDoc ) import RnEnv import RnUtils          ( HsDocContext(..), withHsDocContext, mapFvRn@@ -60,8 +57,9 @@  import Util import ListSetOps       ( deleteBys )-import BasicTypes       ( compareFixity, funTyFixity, negateFixity,-                          Fixity(..), FixityDirection(..), LexicalFixity(..) )+import BasicTypes       ( compareFixity, funTyFixity, negateFixity+                        , Fixity(..), FixityDirection(..), LexicalFixity(..)+                        , TypeOrKind(..) ) import Outputable import FastString import Maybes@@ -127,7 +125,7 @@                   (HsWC { hswc_body = HsIB { hsib_body = hs_ty }})                   thing_inside   = do { free_vars <- extractFilteredRdrTyVarsDups hs_ty-       ; (tv_rdrs, nwc_rdrs') <- partition_nwcs free_vars+       ; (nwc_rdrs', tv_rdrs) <- partition_nwcs free_vars        ; let nwc_rdrs = nubL nwc_rdrs'              bind_free_tvs = case scoping of                                AlwaysBind       -> True@@ -140,19 +138,19 @@                             , hsib_body = hs_ty' }        ; (res, fvs2) <- thing_inside sig_ty'        ; return (res, fvs1 `plusFV` fvs2) } }-rn_hs_sig_wc_type _ _ (HsWC _ (XHsImplicitBndrs _)) _-  = panic "rn_hs_sig_wc_type"-rn_hs_sig_wc_type _ _ (XHsWildCardBndrs _) _-  = panic "rn_hs_sig_wc_type"+rn_hs_sig_wc_type _ _ (HsWC _ (XHsImplicitBndrs nec)) _+  = noExtCon nec+rn_hs_sig_wc_type _ _ (XHsWildCardBndrs nec) _+  = noExtCon nec  rnHsWcType :: HsDocContext -> LHsWcType GhcPs -> RnM (LHsWcType GhcRn, FreeVars) rnHsWcType ctxt (HsWC { hswc_body = hs_ty })   = do { free_vars <- extractFilteredRdrTyVars hs_ty-       ; (_, nwc_rdrs) <- partition_nwcs free_vars+       ; (nwc_rdrs, _) <- partition_nwcs free_vars        ; (wcs, hs_ty', fvs) <- rnWcBody ctxt nwc_rdrs hs_ty        ; let sig_ty' = HsWC { hswc_ext = wcs, hswc_body = hs_ty' }        ; return (sig_ty', fvs) }-rnHsWcType _ (XHsWildCardBndrs _) = panic "rnHsWcType"+rnHsWcType _ (XHsWildCardBndrs nec) = noExtCon nec  rnWcBody :: HsDocContext -> [Located RdrName] -> LHsType GhcPs          -> RnM ([Name], LHsType GhcRn, FreeVars)@@ -173,11 +171,13 @@      rn_ty :: RnTyKiEnv -> HsType GhcPs -> RnM (HsType GhcRn, FreeVars)     -- A lot of faff just to allow the extra-constraints wildcard to appear-    rn_ty env hs_ty@(HsForAllTy { hst_bndrs = tvs, hst_body = hs_body })+    rn_ty env hs_ty@(HsForAllTy { hst_fvf = fvf, hst_bndrs = tvs+                                , hst_body = hs_body })       = bindLHsTyVarBndrs (rtke_ctxt env) (Just $ inTypeDoc hs_ty) Nothing tvs $ \ tvs' ->         do { (hs_body', fvs) <- rn_lty env hs_body-           ; return (HsForAllTy { hst_xforall = noExt, hst_bndrs = tvs'-                                , hst_body = hs_body' }, fvs) }+           ; return (HsForAllTy { hst_fvf = fvf, hst_xforall = noExtField+                                , hst_bndrs = tvs', hst_body = hs_body' }+                    , fvs) }      rn_ty env (HsQualTy { hst_ctxt = dL->L cx hs_ctxt                         , hst_body = hs_ty })@@ -185,16 +185,16 @@       , (dL->L lx (HsWildCardTy _))  <- ignoreParens hs_ctxt_last       = do { (hs_ctxt1', fvs1) <- mapFvRn (rn_top_constraint env) hs_ctxt1            ; setSrcSpan lx $ checkExtraConstraintWildCard env hs_ctxt1-           ; let hs_ctxt' = hs_ctxt1' ++ [cL lx (HsWildCardTy noExt)]+           ; let hs_ctxt' = hs_ctxt1' ++ [cL lx (HsWildCardTy noExtField)]            ; (hs_ty', fvs2) <- rnLHsTyKi env hs_ty-           ; return (HsQualTy { hst_xqual = noExt+           ; return (HsQualTy { hst_xqual = noExtField                               , hst_ctxt = cL cx hs_ctxt', hst_body = hs_ty' }                     , fvs1 `plusFV` fvs2) }        | otherwise       = do { (hs_ctxt', fvs1) <- mapFvRn (rn_top_constraint env) hs_ctxt            ; (hs_ty', fvs2)   <- rnLHsTyKi env hs_ty-           ; return (HsQualTy { hst_xqual = noExt+           ; return (HsQualTy { hst_xqual = noExtField                               , hst_ctxt = cL cx hs_ctxt'                               , hst_body = hs_ty' }                     , fvs1 `plusFV` fvs2) }@@ -243,6 +243,7 @@       TypeSigCtx {}       -> True       ExprWithTySigCtx {} -> True       DerivDeclCtx {}     -> True+      StandaloneKindSigCtx {} -> False  -- See Note [Wildcards in standalone kind signatures] in GHC/Hs/Decls       _                   -> False  -- | Finds free type and kind variables in a type,@@ -251,9 +252,7 @@ --   NB: this includes named wildcards, which look like perfectly --       ordinary type variables at this point extractFilteredRdrTyVars :: LHsType GhcPs -> RnM FreeKiTyVarsNoDups-extractFilteredRdrTyVars hs_ty-  = do { rdr_env <- getLocalRdrEnv-       ; return (filterInScope rdr_env (extractHsTyRdrTyVars hs_ty)) }+extractFilteredRdrTyVars hs_ty = filterInScopeM (extractHsTyRdrTyVars hs_ty)  -- | Finds free type and kind variables in a type, --     with duplicates, but@@ -261,22 +260,20 @@ --   NB: this includes named wildcards, which look like perfectly --       ordinary type variables at this point extractFilteredRdrTyVarsDups :: LHsType GhcPs -> RnM FreeKiTyVarsWithDups-extractFilteredRdrTyVarsDups hs_ty-  = do { rdr_env <- getLocalRdrEnv-       ; return (filterInScope rdr_env (extractHsTyRdrTyVarsDups hs_ty)) }+extractFilteredRdrTyVarsDups hs_ty = filterInScopeM (extractHsTyRdrTyVarsDups hs_ty)  -- | When the NamedWildCards extension is enabled, partition_nwcs -- removes type variables that start with an underscore from the -- FreeKiTyVars in the argument and returns them in a separate list. -- When the extension is disabled, the function returns the argument -- and empty list.  See Note [Renaming named wild cards]-partition_nwcs :: FreeKiTyVars -> RnM (FreeKiTyVars, [Located RdrName])-partition_nwcs free_vars@(FKTV { fktv_tys = tys })-  = do { wildcards_enabled <- fmap (xopt LangExt.NamedWildCards) getDynFlags-       ; let (nwcs, no_nwcs) | wildcards_enabled = partition is_wildcard tys-                             | otherwise         = ([], tys)-             free_vars' = free_vars { fktv_tys = no_nwcs }-       ; return (free_vars', nwcs) }+partition_nwcs :: FreeKiTyVars -> RnM ([Located RdrName], FreeKiTyVars)+partition_nwcs free_vars+  = do { wildcards_enabled <- xoptM LangExt.NamedWildCards+       ; return $+           if wildcards_enabled+           then partition is_wildcard free_vars+           else ([], free_vars) }   where      is_wildcard :: Located RdrName -> Bool      is_wildcard rdr = startsWithUnderscore (rdrNameOcc (unLoc rdr))@@ -285,7 +282,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Identifiers starting with an underscore are always parsed as type variables. It is only here in the renamer that we give the special treatment.-See Note [The wildcard story for types] in HsTypes.+See Note [The wildcard story for types] in GHC.Hs.Types.  It's easy!  When we collect the implicitly bound type variables, ready to bring them into scope, and NamedWildCards is on, we partition the@@ -300,19 +297,22 @@ *                                                       * ****************************************************** -} -rnHsSigType :: HsDocContext -> LHsSigType GhcPs+rnHsSigType :: HsDocContext+            -> TypeOrKind+            -> LHsSigType GhcPs             -> RnM (LHsSigType GhcRn, FreeVars) -- Used for source-language type signatures -- that cannot have wildcards-rnHsSigType ctx (HsIB { hsib_body = hs_ty })+rnHsSigType ctx level (HsIB { hsib_body = hs_ty })   = do { traceRn "rnHsSigType" (ppr hs_ty)        ; vars <- extractFilteredRdrTyVarsDups hs_ty        ; rnImplicitBndrs (not (isLHsForAllTy hs_ty)) vars $ \ vars ->-    do { (body', fvs) <- rnLHsType ctx hs_ty+    do { (body', fvs) <- rnLHsTyKi (mkTyKiEnv ctx level RnTypeBody) hs_ty+        ; return ( HsIB { hsib_ext = vars                        , hsib_body = body' }                 , fvs ) } }-rnHsSigType _ (XHsImplicitBndrs _) = panic "rnHsSigType"+rnHsSigType _ _ (XHsImplicitBndrs nec) = noExtCon nec  rnImplicitBndrs :: Bool    -- True <=> bring into scope any free type variables                            -- E.g.  f :: forall a. a->b@@ -326,51 +326,20 @@                 -> ([Name] -> RnM (a, FreeVars))                 -> RnM (a, FreeVars) rnImplicitBndrs bind_free_tvs-                fvs_with_dups@(FKTV { fktv_kis = kvs_with_dups-                                    , fktv_tys = tvs_with_dups })+                fvs_with_dups                 thing_inside-  = do { let FKTV kvs tvs = rmDupsInRdrTyVars fvs_with_dups-             real_tvs | bind_free_tvs = tvs+  = do { let fvs = nubL fvs_with_dups+             real_fvs | bind_free_tvs = fvs                       | otherwise     = []-             -- We always bind over free /kind/ variables.-             -- Bind free /type/ variables only if there is no-             -- explicit forall.  E.g.-             --    f :: Proxy (a :: k) -> b-             --         Quantify over {k} and {a,b}-             --    g :: forall a. Proxy (a :: k) -> b-             --         Quantify over {k} and {}-             -- Note that we always do the implicit kind-quantification-             -- but, rather arbitrarily, we switch off the type-quantification-             -- if there is an explicit forall -       ; traceRn "rnImplicitBndrs" (vcat [ ppr kvs, ppr tvs, ppr real_tvs ])--       ; whenWOptM Opt_WarnImplicitKindVars $-         unless (bind_free_tvs || null kvs) $-         addWarnAt (Reason Opt_WarnImplicitKindVars) (getLoc (head kvs)) $-         implicit_kind_vars_msg kvs+       ; traceRn "rnImplicitBndrs" $+         vcat [ ppr fvs_with_dups, ppr fvs, ppr real_fvs ]         ; loc <- getSrcSpanM-          -- NB: kinds before tvs, as mandated by-          -- Note [Ordering of implicit variables]-       ; vars <- mapM (newLocalBndrRn . cL loc . unLoc) (kvs ++ real_tvs)--       ; traceRn "checkMixedVars2" $-           vcat [ text "kvs_with_dups" <+> ppr kvs_with_dups-                , text "tvs_with_dups" <+> ppr tvs_with_dups ]+       ; vars <- mapM (newLocalBndrRn . cL loc . unLoc) real_fvs         ; bindLocalNamesFV vars $          thing_inside vars }-  where-    implicit_kind_vars_msg kvs =-      vcat [ text "An explicit" <+> quotes (text "forall") <+>-             text "was used, but the following kind variables" <+>-             text "are not quantified:" <+>-             hsep (punctuate comma (map (quotes . ppr) kvs))-           , text "Despite this fact, GHC will introduce them into scope," <+>-             text "but it will stop doing so in the future."-           , text "Suggested fix: add" <+>-             quotes (text "forall" <+> hsep (map ppr kvs) <> char '.') ]  {- ****************************************************** *                                                       *@@ -388,7 +357,7 @@ when (1) they are in a type signature not beginning with "forall" or (2) in any qualified type T => R. We are phasing out (2) since it leads to inconsistencies-(Trac #4426):+(#4426):  data A = A (a -> a)           is an error data A = A (Eq a => a -> a)   binds "a"@@ -517,20 +486,21 @@  rnHsTyKi :: RnTyKiEnv -> HsType GhcPs -> RnM (HsType GhcRn, FreeVars) -rnHsTyKi env ty@(HsForAllTy { hst_bndrs = tyvars, hst_body  = tau })+rnHsTyKi env ty@(HsForAllTy { hst_fvf = fvf, hst_bndrs = tyvars+                            , hst_body = tau })   = do { checkPolyKinds env ty        ; bindLHsTyVarBndrs (rtke_ctxt env) (Just $ inTypeDoc ty)                            Nothing tyvars $ \ tyvars' ->     do { (tau',  fvs) <- rnLHsTyKi env tau-       ; return ( HsForAllTy { hst_xforall = noExt, hst_bndrs = tyvars'-                             , hst_body =  tau' }+       ; return ( HsForAllTy { hst_fvf = fvf, hst_xforall = noExtField+                             , hst_bndrs = tyvars' , hst_body =  tau' }                 , fvs) } }  rnHsTyKi env ty@(HsQualTy { hst_ctxt = lctxt, hst_body = tau })   = do { checkPolyKinds env ty  -- See Note [QualTy in kinds]        ; (ctxt', fvs1) <- rnTyKiContext env lctxt        ; (tau',  fvs2) <- rnLHsTyKi env tau-       ; return (HsQualTy { hst_xqual = noExt, hst_ctxt = ctxt'+       ; return (HsQualTy { hst_xqual = noExtField, hst_ctxt = ctxt'                           , hst_body =  tau' }                 , fvs1 `plusFV` fvs2) } @@ -543,7 +513,7 @@            -- Any type variable at the kind level is illegal without the use            -- of PolyKinds (see #14710)        ; name <- rnTyVar env rdr_name-       ; return (HsTyVar noExt ip (cL loc name), unitFV name) }+       ; return (HsTyVar noExtField ip (cL loc name), unitFV name) }  rnHsTyKi env ty@(HsOpTy _ ty1 l_op ty2)   = setSrcSpan (getLoc l_op) $@@ -551,23 +521,23 @@         ; fix   <- lookupTyFixityRn l_op'         ; (ty1', fvs2) <- rnLHsTyKi env ty1         ; (ty2', fvs3) <- rnLHsTyKi env ty2-        ; res_ty <- mkHsOpTyRn (\t1 t2 -> HsOpTy noExt t1 l_op' t2)+        ; res_ty <- mkHsOpTyRn (\t1 t2 -> HsOpTy noExtField t1 l_op' t2)                                (unLoc l_op') fix ty1' ty2'         ; return (res_ty, plusFVs [fvs1, fvs2, fvs3]) }  rnHsTyKi env (HsParTy _ ty)   = do { (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsParTy noExt ty', fvs) }+       ; return (HsParTy noExtField ty', fvs) }  rnHsTyKi env (HsBangTy _ b ty)   = do { (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsBangTy noExt b ty', fvs) }+       ; return (HsBangTy noExtField b ty', fvs) }  rnHsTyKi env ty@(HsRecTy _ flds)   = do { let ctxt = rtke_ctxt env        ; fls          <- get_fields ctxt        ; (flds', fvs) <- rnConDeclFields ctxt fls flds-       ; return (HsRecTy noExt flds', fvs) }+       ; return (HsRecTy noExtField flds', fvs) }   where     get_fields (ConDeclCtx names)       = concatMapM (lookupConstructorFields . unLoc) names@@ -584,7 +554,7 @@         -- when we find return :: forall m. Monad m -> forall a. a -> m a          -- Check for fixity rearrangements-       ; res_ty <- mkHsOpTyRn (HsFunTy noExt) funTyConName funTyFixity ty1' ty2'+       ; res_ty <- mkHsOpTyRn (HsFunTy noExtField) funTyConName funTyFixity ty1' ty2'        ; return (res_ty, fvs1 `plusFV` fvs2) }  rnHsTyKi env listTy@(HsListTy _ ty)@@ -592,15 +562,15 @@        ; when (not data_kinds && isRnKindLevel env)               (addErr (dataKindsErr env listTy))        ; (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsListTy noExt ty', fvs) }+       ; return (HsListTy noExtField ty', fvs) }  rnHsTyKi env t@(HsKindSig _ ty k)   = do { checkPolyKinds env t        ; kind_sigs_ok <- xoptM LangExt.KindSignatures        ; unless kind_sigs_ok (badKindSigErr (rtke_ctxt env) ty)-       ; (ty', fvs1) <- rnLHsTyKi env ty-       ; (k', fvs2)  <- rnLHsTyKi (env { rtke_level = KindLevel }) k-       ; return (HsKindSig noExt ty' k', fvs1 `plusFV` fvs2) }+       ; (ty', lhs_fvs) <- rnLHsTyKi env ty+       ; (k', sig_fvs)  <- rnLHsTyKi (env { rtke_level = KindLevel }) k+       ; return (HsKindSig noExtField ty' k', lhs_fvs `plusFV` sig_fvs) }  -- Unboxed tuples are allowed to have poly-typed arguments.  These -- sometimes crop up as a result of CPR worker-wrappering dictionaries.@@ -609,14 +579,14 @@        ; when (not data_kinds && isRnKindLevel env)               (addErr (dataKindsErr env tupleTy))        ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys-       ; return (HsTupleTy noExt tup_con tys', fvs) }+       ; return (HsTupleTy noExtField tup_con tys', fvs) }  rnHsTyKi env sumTy@(HsSumTy _ tys)   = do { data_kinds <- xoptM LangExt.DataKinds        ; when (not data_kinds && isRnKindLevel env)               (addErr (dataKindsErr env sumTy))        ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys-       ; return (HsSumTy noExt tys', fvs) }+       ; return (HsSumTy noExtField tys', fvs) }  -- Ensure that a type-level integer is nonnegative (#8306, #8412) rnHsTyKi env tyLit@(HsTyLit _ t)@@ -624,7 +594,7 @@        ; unless data_kinds (addErr (dataKindsErr env tyLit))        ; when (negLit t) (addErr negLitErr)        ; checkPolyKinds env tyLit-       ; return (HsTyLit noExt t, emptyFVs) }+       ; return (HsTyLit noExtField t, emptyFVs) }   where     negLit (HsStrTy _ _) = False     negLit (HsNumTy _ i) = i < 0@@ -633,7 +603,7 @@ rnHsTyKi env (HsAppTy _ ty1 ty2)   = do { (ty1', fvs1) <- rnLHsTyKi env ty1        ; (ty2', fvs2) <- rnLHsTyKi env ty2-       ; return (HsAppTy noExt ty1' ty2', fvs1 `plusFV` fvs2) }+       ; return (HsAppTy noExtField ty1' ty2', fvs1 `plusFV` fvs2) }  rnHsTyKi env (HsAppKindTy l ty k)   = do { kind_app <- xoptM LangExt.TypeApplications@@ -645,10 +615,10 @@ rnHsTyKi env t@(HsIParamTy _ n ty)   = do { notInKinds env t        ; (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsIParamTy noExt n ty', fvs) }+       ; return (HsIParamTy noExtField n ty', fvs) }  rnHsTyKi _ (HsStarTy _ isUni)-  = return (HsStarTy noExt isUni, emptyFVs)+  = return (HsStarTy noExtField isUni, emptyFVs)  rnHsTyKi _ (HsSpliceTy _ sp)   = rnSpliceType sp@@ -656,7 +626,7 @@ rnHsTyKi env (HsDocTy _ ty haddock_doc)   = do { (ty', fvs) <- rnLHsTyKi env ty        ; haddock_doc' <- rnLHsDoc haddock_doc-       ; return (HsDocTy noExt ty' haddock_doc', fvs) }+       ; return (HsDocTy noExtField ty' haddock_doc', fvs) }  rnHsTyKi _ (XHsType (NHsCoreTy ty))   = return (XHsType (NHsCoreTy ty), emptyFVs)@@ -668,18 +638,18 @@        ; data_kinds <- xoptM LangExt.DataKinds        ; unless data_kinds (addErr (dataKindsErr env ty))        ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys-       ; return (HsExplicitListTy noExt ip tys', fvs) }+       ; return (HsExplicitListTy noExtField ip tys', fvs) }  rnHsTyKi env ty@(HsExplicitTupleTy _ tys)   = do { checkPolyKinds env ty        ; data_kinds <- xoptM LangExt.DataKinds        ; unless data_kinds (addErr (dataKindsErr env ty))        ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys-       ; return (HsExplicitTupleTy noExt tys', fvs) }+       ; return (HsExplicitTupleTy noExtField tys', fvs) }  rnHsTyKi env (HsWildCardTy _)   = do { checkAnonWildCard env-       ; return (HsWildCardTy noExt, emptyFVs) }+       ; return (HsWildCardTy noExtField, emptyFVs) }  -------------- rnTyVar :: RnTyKiEnv -> RdrName -> RnM Name@@ -728,8 +698,8 @@            | otherwise            = case rtke_what env of                RnTypeBody      -> Nothing-               RnConstraint    -> Just constraint_msg                RnTopConstraint -> Just constraint_msg+               RnConstraint    -> Just constraint_msg      constraint_msg = hang                          (notAllowed pprAnonWildCard <+> text "in a constraint")@@ -749,7 +719,10 @@            | otherwise            = case rtke_what env of                RnTypeBody      -> Nothing   -- Allowed-               RnTopConstraint -> Nothing   -- Allowed+               RnTopConstraint -> Nothing   -- Allowed; e.g.+                  -- f :: (Eq _a) => _a -> Int+                  -- g :: (_a, _b) => T _a _b -> Int+                  -- The named tyvars get filled in from elsewhere                RnConstraint    -> Just constraint_msg     constraint_msg = notAllowed (ppr name) <+> text "in a constraint" @@ -766,6 +739,7 @@        FamPatCtx {}        -> True   -- Not named wildcards though        GHCiCtx {}          -> True        HsTypeCtx {}        -> True+       StandaloneKindSigCtx {} -> False  -- See Note [Wildcards in standalone kind signatures] in GHC/Hs/Decls        _                   -> False  @@ -835,7 +809,7 @@                   -- The Bool is True <=> all kind variables used in the                   -- kind signature are bound on the left.  Reason:                   -- the last clause of Note [CUSKs: Complete user-supplied-                  -- kind signatures] in HsDecls+                  -- kind signatures] in GHC.Hs.Decls               -> RnM (b, FreeVars)  -- See Note [bindHsQTyVars examples]@@ -857,11 +831,7 @@                                  -- body kvs, as mandated by                                  -- Note [Ordering of implicit variables]              implicit_kvs = filter_occs bndrs kv_occs-             -- dep_bndrs is the subset of bndrs that are dependent-             --   i.e. appear in bndr/body_kv_occs-             -- Can't use implicit_kvs because we've deleted bndrs from that!-             dep_bndrs = filter (`elemRdr` kv_occs) bndrs-             del       = deleteBys eqLocated+             del          = deleteBys eqLocated              all_bound_on_lhs = null ((body_kv_occs `del` bndrs) `del` bndr_kv_occs)         ; traceRn "checkMixedVars3" $@@ -876,10 +846,7 @@        ; bindLocalNamesFV implicit_kv_nms                     $          bindLHsTyVarBndrs doc mb_in_doc mb_assoc hs_tv_bndrs $ \ rn_bndrs ->     do { traceRn "bindHsQTyVars" (ppr hsq_bndrs $$ ppr implicit_kv_nms $$ ppr rn_bndrs)-       ; dep_bndr_nms <- mapM (lookupLocalOccRn . unLoc) dep_bndrs-       ; thing_inside (HsQTvs { hsq_ext = HsQTvsRn-                                   { hsq_implicit  = implicit_kv_nms-                                   , hsq_dependent = mkNameSet dep_bndr_nms }+       ; thing_inside (HsQTvs { hsq_ext = implicit_kv_nms                               , hsq_explicit  = rn_bndrs })                       all_bound_on_lhs } } @@ -914,9 +881,6 @@  * We want to quantify add implicit bindings for implicit_kvs -* The "dependent" bndrs (hsq_dependent) are the subset of-  bndrs that are free in bndr_kv_occs or body_kv_occs- * If implicit_body_kvs is non-empty, then there is a kind variable   mentioned in the kind signature that is not bound "on the left".   That's one of the rules for a CUSK, so we pass that info on@@ -1042,7 +1006,7 @@                $ thing_inside (cL loc (KindedTyVar x (cL lv tv_nm) kind'))            ; return (b, fvs1 `plusFV` fvs2) } -bindLHsTyVarBndr _ _ (dL->L _ (XTyVarBndr{})) _ = panic "bindLHsTyVarBndr"+bindLHsTyVarBndr _ _ (dL->L _ (XTyVarBndr nec)) _ = noExtCon nec bindLHsTyVarBndr _ _ _ _ = panic "bindLHsTyVarBndr: Impossible Match"                              -- due to #15884 @@ -1084,7 +1048,7 @@   = do { let new_names = map (fmap lookupField) names        ; (new_ty, fvs) <- rnLHsTyKi env ty        ; new_haddock_doc <- rnMbLHsDoc haddock_doc-       ; return (cL l (ConDeclField noExt new_names new_ty new_haddock_doc)+       ; return (cL l (ConDeclField noExtField new_names new_ty new_haddock_doc)                 , fvs) }   where     lookupField :: FieldOcc GhcPs -> FieldOcc GhcRn@@ -1093,8 +1057,8 @@       where         lbl = occNameFS $ rdrNameOcc rdr         fl  = expectJust "rnField" $ lookupFsEnv fl_env lbl-    lookupField (XFieldOcc{}) = panic "rnField"-rnField _ _ (dL->L _ (XConDeclField _)) = panic "rnField"+    lookupField (XFieldOcc nec) = noExtCon nec+rnField _ _ (dL->L _ (XConDeclField nec)) = noExtCon nec rnField _ _ _ = panic "rnField: Impossible Match"                              -- due to #15884 @@ -1130,15 +1094,15 @@            -> Name -> Fixity -> LHsType GhcRn -> LHsType GhcRn            -> RnM (HsType GhcRn) -mkHsOpTyRn mk1 pp_op1 fix1 ty1 (dL->L loc2 (HsOpTy noExt ty21 op2 ty22))+mkHsOpTyRn mk1 pp_op1 fix1 ty1 (dL->L loc2 (HsOpTy noExtField ty21 op2 ty22))   = do  { fix2 <- lookupTyFixityRn op2         ; mk_hs_op_ty mk1 pp_op1 fix1 ty1-                      (\t1 t2 -> HsOpTy noExt t1 op2 t2)+                      (\t1 t2 -> HsOpTy noExtField t1 op2 t2)                       (unLoc op2) fix2 ty21 ty22 loc2 }  mkHsOpTyRn mk1 pp_op1 fix1 ty1 (dL->L loc2 (HsFunTy _ ty21 ty22))   = mk_hs_op_ty mk1 pp_op1 fix1 ty1-                (HsFunTy noExt) funTyConName funTyFixity ty21 ty22 loc2+                (HsFunTy noExtField) funTyConName funTyFixity ty21 ty22 loc2  mkHsOpTyRn mk1 _ _ ty1 ty2              -- Default case, no rearrangment   = return (mk1 ty1 ty2)@@ -1190,7 +1154,7 @@    | associate_right   = do new_e <- mkOpAppRn neg_arg op2 fix2 e2-       return (NegApp noExt (cL loc' new_e) neg_name)+       return (NegApp noExtField (cL loc' new_e) neg_name)   where     loc' = combineLocs neg_arg e2     (nofix_error, associate_right) = compareFixity negateFixity fix2@@ -1252,7 +1216,7 @@            -> RnM (HsExpr (GhcPass id)) mkNegAppRn neg_arg neg_name   = ASSERT( not_op_app (unLoc neg_arg) )-    return (NegApp noExt neg_arg neg_name)+    return (NegApp noExtField neg_arg neg_name)  not_op_app :: HsExpr id -> Bool not_op_app (OpApp {}) = False@@ -1276,7 +1240,7 @@    | associate_right   = do new_c <- mkOpFormRn a12 op2 fix2 a2-       return (HsCmdArrForm noExt op1 f (Just fix1)+       return (HsCmdArrForm noExtField op1 f (Just fix1)                [a11, cL loc (HsCmdTop [] (cL loc new_c))])         -- TODO: locs are wrong   where@@ -1284,7 +1248,7 @@  --      Default case mkOpFormRn arg1 op fix arg2                     -- Default case, no rearrangment-  = return (HsCmdArrForm noExt op Infix (Just fix) [arg1, arg2])+  = return (HsCmdArrForm noExtField op Infix (Just fix) [arg1, arg2])   --------------------------------------@@ -1338,7 +1302,7 @@         -- but the second eqn has no args (an error, but not discovered         -- until the type checker).  So we don't want to crash on the         -- second eqn.-checkPrecMatch _ (XMatchGroup {}) = panic "checkPrecMatch"+checkPrecMatch _ (XMatchGroup nec) = noExtCon nec  checkPrec :: Name -> Pat GhcRn -> Bool -> IOEnv (Env TcGblEnv TcLclEnv) () checkPrec op (ConPatIn op1 (InfixCon _ _)) right = do@@ -1380,7 +1344,7 @@  -- | Look up the fixity for an operator name.  Be careful to use -- 'lookupFieldFixityRn' for (possibly ambiguous) record fields--- (see Trac #13132).+-- (see #13132). lookupFixityOp :: OpName -> RnM Fixity lookupFixityOp (NormalOp n)  = lookupFixityRn n lookupFixityOp NegateOp      = lookupFixityRn negateName@@ -1474,8 +1438,7 @@  Note [Kind and type-variable binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In a type signature we may implicitly bind type variable and, more-recently, kind variables.  For example:+In a type signature we may implicitly bind type/kind variables. For example:   *   f :: a -> a       f = ...     Here we need to find the free type variables of (a -> a),@@ -1493,42 +1456,11 @@   *   type instance F (T (a :: Maybe k)) = ...a...k...     Here we want to constrain the kind of 'a', and bind 'k'. -In general we want to walk over a type, and find-  * Its free type variables-  * The free kind variables of any kind signatures in the type--Hence we return a pair (kind-vars, type vars)-(See Note [HsBSig binder lists] in HsTypes.)-Moreover, we preserve the left-to-right order of the first occurrence of each-variable, while preserving dependency order.-(See Note [Ordering of implicit variables].)--Most clients of this code just want to know the kind/type vars, without-duplicates. The function rmDupsInRdrTyVars removes duplicates. That function-also makes sure that no variable is reported as both a kind var and-a type var, preferring kind vars. Why kind vars? Consider this:-- foo :: forall (a :: k). Proxy k -> Proxy a -> ...--Should that be accepted?--Normally, if a type signature has an explicit forall, it must list *all*-tyvars mentioned in the type. But there's an exception for tyvars mentioned in-a kind, as k is above. Note that k is also used "as a type variable", as the-argument to the first Proxy. So, do we consider k to be type-variable-like and-require it in the forall? Or do we consider k to be kind-variable-like and not-require it?--It's not just in type signatures: kind variables are implicitly brought into-scope in a variety of places. Should vars used at both the type level and kind-level be treated this way?+To do that, we need to walk over a type and find its free type/kind variables.+We preserve the left-to-right order of each variable occurrence.+See Note [Ordering of implicit variables]. -GHC indeed allows kind variables to be brought into scope implicitly even when-the kind variable is also used as a type variable. Thus, we must prefer to keep-a variable listed as a kind var in rmDupsInRdrTyVars. If we kept it as a type-var, then this would prevent it from being implicitly quantified (see-rnImplicitBndrs). In the `foo` example above, that would have the consequence-of the k in Proxy k being reported as out of scope.+Clients of this code can remove duplicates with nubL.  Note [Ordering of implicit variables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1558,30 +1490,98 @@  Implicitly bound variables are collected by any function which returns a FreeKiTyVars, FreeKiTyVarsWithDups, or FreeKiTyVarsNoDups, which notably-includes the `extract-` family of functions (extractHsTysRdrTyVars,+includes the `extract-` family of functions (extractHsTysRdrTyVarsDups, extractHsTyVarBndrsKVs, etc.). These functions thus promise to keep left-to-right ordering.-Look for pointers to this note to see the places where the action happens. -Note that we also maintain this ordering in kind signatures. Even though-there's no visible kind application (yet), having implicit variables be-quantified in left-to-right order in kind signatures is nice since:+Note [Implicit quantification in type synonyms]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We typically bind type/kind variables implicitly when they are in a kind+annotation on the LHS, for example: -* It's consistent with the treatment for type signatures.-* It can affect how types are displayed with -fprint-explicit-kinds (see-  #15568 for an example), which is a situation where knowing the order in-  which implicit variables are quantified can be useful.-* In the event that visible kind application is implemented, the order in-  which we would expect implicit variables to be ordered in kinds will have-  already been established.+  data Proxy (a :: k) = Proxy+  type KindOf (a :: k) = k++Here 'k' is in the kind annotation of a type variable binding, KindedTyVar, and+we want to implicitly quantify over it.  This is easy: just extract all free+variables from the kind signature. That's what we do in extract_hs_tv_bndrs_kvs++By contrast, on the RHS we can't simply collect *all* free variables. Which of+the following are allowed?++  type TySyn1 = a :: Type+  type TySyn2 = 'Nothing :: Maybe a+  type TySyn3 = 'Just ('Nothing :: Maybe a)+  type TySyn4 = 'Left a :: Either Type a++After some design deliberations (see non-taken alternatives below), the answer+is to reject TySyn1 and TySyn3, but allow TySyn2 and TySyn4, at least for now.+We implicitly quantify over free variables of the outermost kind signature, if+one exists:++  * In TySyn1, the outermost kind signature is (:: Type), and it does not have+    any free variables.+  * In TySyn2, the outermost kind signature is (:: Maybe a), it contains a+    free variable 'a', which we implicitly quantify over.+  * In TySyn3, there is no outermost kind signature. The (:: Maybe a) signature+    is hidden inside 'Just.+  * In TySyn4, the outermost kind signature is (:: Either Type a), it contains+    a free variable 'a', which we implicitly quantify over. That is why we can+    also use it to the left of the double colon: 'Left a++The logic resides in extractHsTyRdrTyVarsKindVars. We use it both for type+synonyms and type family instances.++This is something of a stopgap solution until we can explicitly bind invisible+type/kind variables:++  type TySyn3 :: forall a. Maybe a+  type TySyn3 @a = 'Just ('Nothing :: Maybe a)++Note [Implicit quantification in type synonyms: non-taken alternatives]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Alternative I: No quantification+--------------------------------+We could offer no implicit quantification on the RHS, accepting none of the+TySyn<N> examples. The user would have to bind the variables explicitly:++  type TySyn1 a = a :: Type+  type TySyn2 a = 'Nothing :: Maybe a+  type TySyn3 a = 'Just ('Nothing :: Maybe a)+  type TySyn4 a = 'Left a :: Either Type a++However, this would mean that one would have to specify 'a' at call sites every+time, which could be undesired.++Alternative II: Indiscriminate quantification+---------------------------------------------+We could implicitly quantify over all free variables on the RHS just like we do+on the LHS. Then we would infer the following kinds:++  TySyn1 :: forall {a}. Type+  TySyn2 :: forall {a}. Maybe a+  TySyn3 :: forall {a}. Maybe (Maybe a)+  TySyn4 :: forall {a}. Either Type a++This would work fine for TySyn<2,3,4>, but TySyn1 is clearly bogus: the variable+is free-floating, not fixed by anything.++Alternative III: reportFloatingKvs+----------------------------------+We could augment Alternative II by hunting down free-floating variables during+type checking. While viable, this would mean we'd end up accepting this:++  data Prox k (a :: k)+  type T = Prox k+ -}  -- See Note [Kind and type-variable binders] -- These lists are guaranteed to preserve left-to-right ordering of -- the types the variables were extracted from. See also -- Note [Ordering of implicit variables].-data FreeKiTyVars = FKTV { fktv_kis    :: [Located RdrName]-                         , fktv_tys    :: [Located RdrName] }+type FreeKiTyVars = [Located RdrName]  -- | A 'FreeKiTyVars' list that is allowed to have duplicate variables. type FreeKiTyVarsWithDups = FreeKiTyVars@@ -1589,94 +1589,70 @@ -- | A 'FreeKiTyVars' list that contains no duplicate variables. type FreeKiTyVarsNoDups   = FreeKiTyVars -instance Outputable FreeKiTyVars where-  ppr (FKTV { fktv_kis = kis, fktv_tys = tys}) = ppr (kis, tys)--emptyFKTV :: FreeKiTyVarsNoDups-emptyFKTV = FKTV { fktv_kis = [], fktv_tys = [] }--freeKiTyVarsAllVars :: FreeKiTyVars -> [Located RdrName]-freeKiTyVarsAllVars (FKTV { fktv_kis = kvs, fktv_tys = tvs }) = kvs ++ tvs--freeKiTyVarsKindVars :: FreeKiTyVars -> [Located RdrName]-freeKiTyVarsKindVars = fktv_kis--freeKiTyVarsTypeVars :: FreeKiTyVars -> [Located RdrName]-freeKiTyVarsTypeVars = fktv_tys- filterInScope :: LocalRdrEnv -> FreeKiTyVars -> FreeKiTyVars-filterInScope rdr_env (FKTV { fktv_kis = kis, fktv_tys = tys })-  = FKTV { fktv_kis = filterOut in_scope kis-         , fktv_tys = filterOut in_scope tys }-  where-    in_scope = inScope rdr_env . unLoc+filterInScope rdr_env = filterOut (inScope rdr_env . unLoc) +filterInScopeM :: FreeKiTyVars -> RnM FreeKiTyVars+filterInScopeM vars+  = do { rdr_env <- getLocalRdrEnv+       ; return (filterInScope rdr_env vars) }+ inScope :: LocalRdrEnv -> RdrName -> Bool inScope rdr_env rdr = rdr `elemLocalRdrEnv` rdr_env --- | 'extractHsTyRdrTyVars' finds the---        free (kind, type) variables of an 'HsType'--- or the free (sort, kind) variables of an 'HsKind'.--- It's used when making the @forall@s explicit.--- Does not return any wildcards.--- When the same name occurs multiple times in the types, only the first--- occurrence is returned.--- See Note [Kind and type-variable binders]-- extract_tyarg :: LHsTypeArg GhcPs -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups-extract_tyarg (HsValArg ty) acc = extract_lty TypeLevel ty acc-extract_tyarg (HsTypeArg _ ki) acc = extract_lty KindLevel ki acc+extract_tyarg (HsValArg ty) acc = extract_lty ty acc+extract_tyarg (HsTypeArg _ ki) acc = extract_lty ki acc extract_tyarg (HsArgPar _) acc = acc  extract_tyargs :: [LHsTypeArg GhcPs] -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups extract_tyargs args acc = foldr extract_tyarg acc args  extractHsTyArgRdrKiTyVarsDup :: [LHsTypeArg GhcPs] -> FreeKiTyVarsWithDups-extractHsTyArgRdrKiTyVarsDup args = extract_tyargs args emptyFKTV+extractHsTyArgRdrKiTyVarsDup args+  = extract_tyargs args [] +-- | 'extractHsTyRdrTyVars' finds the type/kind variables+--                          of a HsType/HsKind.+-- It's used when making the @forall@s explicit.+-- When the same name occurs multiple times in the types, only the first+-- occurrence is returned.+-- See Note [Kind and type-variable binders] extractHsTyRdrTyVars :: LHsType GhcPs -> FreeKiTyVarsNoDups extractHsTyRdrTyVars ty-  = rmDupsInRdrTyVars (extractHsTyRdrTyVarsDups ty)+  = nubL (extractHsTyRdrTyVarsDups ty) --- | 'extractHsTyRdrTyVarsDups' find the---        free (kind, type) variables of an 'HsType'--- or the free (sort, kind) variables of an 'HsKind'.+-- | 'extractHsTyRdrTyVarsDups' finds the type/kind variables+--                              of a HsType/HsKind. -- It's used when making the @forall@s explicit.--- Does not return any wildcards. -- When the same name occurs multiple times in the types, all occurrences -- are returned. extractHsTyRdrTyVarsDups :: LHsType GhcPs -> FreeKiTyVarsWithDups extractHsTyRdrTyVarsDups ty-  = extract_lty TypeLevel ty emptyFKTV+  = extract_lty ty [] --- | Extracts the free kind variables (but not the type variables) of an--- 'HsType'. Does not return any wildcards.+-- | Extracts the free type/kind variables from the kind signature of a HsType.+--   This is used to implicitly quantify over @k@ in @type T = Nothing :: Maybe k@. -- When the same name occurs multiple times in the type, only the first -- occurrence is returned, and the left-to-right order of variables is -- preserved. -- See Note [Kind and type-variable binders] and--- Note [Ordering of implicit variables].-extractHsTyRdrTyVarsKindVars :: LHsType GhcPs -> [Located RdrName]-extractHsTyRdrTyVarsKindVars ty-  = freeKiTyVarsKindVars (extractHsTyRdrTyVars ty)---- | Extracts free type and kind variables from types in a list.--- When the same name occurs multiple times in the types, only the first--- occurrence is returned and the rest is filtered out.--- See Note [Kind and type-variable binders]-extractHsTysRdrTyVars :: [LHsType GhcPs] -> FreeKiTyVarsNoDups-extractHsTysRdrTyVars tys-  = rmDupsInRdrTyVars (extractHsTysRdrTyVarsDups tys)+--     Note [Ordering of implicit variables] and+--     Note [Implicit quantification in type synonyms].+extractHsTyRdrTyVarsKindVars :: LHsType GhcPs -> FreeKiTyVarsNoDups+extractHsTyRdrTyVarsKindVars (unLoc -> ty) =+  case ty of+    HsParTy _ ty -> extractHsTyRdrTyVarsKindVars ty+    HsKindSig _ _ ki -> extractHsTyRdrTyVars ki+    _ -> []  -- | Extracts free type and kind variables from types in a list. -- When the same name occurs multiple times in the types, all occurrences -- are returned. extractHsTysRdrTyVarsDups :: [LHsType GhcPs] -> FreeKiTyVarsWithDups extractHsTysRdrTyVarsDups tys-  = extract_ltys TypeLevel tys emptyFKTV+  = extract_ltys tys [] -extractHsTyVarBndrsKVs :: [LHsTyVarBndr GhcPs] -> [Located RdrName] -- Returns the free kind variables of any explictly-kinded binders, returning -- variable occurrences in left-to-right order. -- See Note [Ordering of implicit variables].@@ -1684,124 +1660,76 @@ --     However duplicates are removed --     E.g. given  [k1, a:k1, b:k2] --          the function returns [k1,k2], even though k1 is bound here+extractHsTyVarBndrsKVs :: [LHsTyVarBndr GhcPs] -> FreeKiTyVarsNoDups extractHsTyVarBndrsKVs tv_bndrs   = nubL (extract_hs_tv_bndrs_kvs tv_bndrs) --- | Removes multiple occurrences of the same name from FreeKiTyVars. If a--- variable occurs as both a kind and a type variable, only keep the occurrence--- as a kind variable.--- See also Note [Kind and type-variable binders]-rmDupsInRdrTyVars :: FreeKiTyVarsWithDups -> FreeKiTyVarsNoDups-rmDupsInRdrTyVars (FKTV { fktv_kis = kis, fktv_tys = tys })-  = FKTV { fktv_kis = kis'-         , fktv_tys = nubL (filterOut (`elemRdr` kis') tys) }-  where-    kis' = nubL kis--extractRdrKindSigVars :: LFamilyResultSig GhcPs -> [Located RdrName] -- Returns the free kind variables in a type family result signature, returning -- variable occurrences in left-to-right order. -- See Note [Ordering of implicit variables].+extractRdrKindSigVars :: LFamilyResultSig GhcPs -> [Located RdrName] extractRdrKindSigVars (dL->L _ resultSig)-  | KindSig _ k                              <- resultSig = kindRdrNameFromSig k-  | TyVarSig _ (dL->L _ (KindedTyVar _ _ k)) <- resultSig = kindRdrNameFromSig k+  | KindSig _ k                              <- resultSig = extractHsTyRdrTyVars k+  | TyVarSig _ (dL->L _ (KindedTyVar _ _ k)) <- resultSig = extractHsTyRdrTyVars k   | otherwise =  []-    where-      kindRdrNameFromSig k = freeKiTyVarsAllVars (extractHsTyRdrTyVars k) -extractDataDefnKindVars :: HsDataDefn GhcPs -> [Located RdrName]--- Get the scoped kind variables mentioned free in the constructor decls--- Eg: data T a = T1 (S (a :: k) | forall (b::k). T2 (S b)---     Here k should scope over the whole definition+-- Get type/kind variables mentioned in the kind signature, preserving+-- left-to-right order and without duplicates: ----- However, do NOT collect free kind vars from the deriving clauses:--- Eg: (Trac #14331)    class C p q---                      data D = D deriving ( C (a :: k) )---     Here k should /not/ scope over the whole definition.  We intend---     this to elaborate to:---         class C @k1 @k2 (p::k1) (q::k2)---         data D = D---         instance forall k (a::k). C @k @* a D where ...+--  * data T a (b :: k1) :: k2 -> k1 -> k2 -> Type   -- result: [k2,k1]+--  * data T a (b :: k1)                             -- result: [] ----- This returns variable occurrences in left-to-right order. -- See Note [Ordering of implicit variables].-extractDataDefnKindVars (HsDataDefn { dd_ctxt = ctxt, dd_kindSig = ksig-                                    , dd_cons = cons })-  = (nubL . freeKiTyVarsKindVars) $-    (extract_lctxt TypeLevel ctxt  $-     extract_mb extract_lkind ksig $-     foldr (extract_con . unLoc) emptyFKTV cons)-  where-    extract_con (ConDeclGADT { }) acc = acc-    extract_con (ConDeclH98 { con_ex_tvs = ex_tvs-                            , con_mb_cxt = ctxt, con_args = args }) acc-      = extract_hs_tv_bndrs ex_tvs acc $-        extract_mlctxt ctxt            $-        extract_ltys TypeLevel (hsConDeclArgTys args) emptyFKTV-    extract_con (XConDecl { }) _ = panic "extractDataDefnKindVars"-extractDataDefnKindVars (XHsDataDefn _) = panic "extractDataDefnKindVars"--extract_mlctxt :: Maybe (LHsContext GhcPs)-               -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups-extract_mlctxt Nothing     acc = acc-extract_mlctxt (Just ctxt) acc = extract_lctxt TypeLevel ctxt acc+extractDataDefnKindVars :: HsDataDefn GhcPs ->  FreeKiTyVarsNoDups+extractDataDefnKindVars (HsDataDefn { dd_kindSig = ksig })+  = maybe [] extractHsTyRdrTyVars ksig+extractDataDefnKindVars (XHsDataDefn nec) = noExtCon nec -extract_lctxt :: TypeOrKind-              -> LHsContext GhcPs+extract_lctxt :: LHsContext GhcPs               -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups-extract_lctxt t_or_k ctxt = extract_ltys t_or_k (unLoc ctxt)+extract_lctxt ctxt = extract_ltys (unLoc ctxt) -extract_ltys :: TypeOrKind-             -> [LHsType GhcPs]+extract_ltys :: [LHsType GhcPs]              -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups-extract_ltys t_or_k tys acc = foldr (extract_lty t_or_k) acc tys--extract_mb :: (a -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups)-           -> Maybe a-           -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups-extract_mb _ Nothing  acc = acc-extract_mb f (Just x) acc = f x acc--extract_lkind :: LHsType GhcPs -> FreeKiTyVars -> FreeKiTyVars-extract_lkind = extract_lty KindLevel+extract_ltys tys acc = foldr extract_lty acc tys -extract_lty :: TypeOrKind -> LHsType GhcPs+extract_lty :: LHsType GhcPs             -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups-extract_lty t_or_k (dL->L _ ty) acc+extract_lty (dL->L _ ty) acc   = case ty of-      HsTyVar _ _  ltv            -> extract_tv t_or_k ltv acc-      HsBangTy _ _ ty             -> extract_lty t_or_k ty acc-      HsRecTy _ flds              -> foldr (extract_lty t_or_k+      HsTyVar _ _  ltv            -> extract_tv ltv acc+      HsBangTy _ _ ty             -> extract_lty ty acc+      HsRecTy _ flds              -> foldr (extract_lty                                             . cd_fld_type . unLoc) acc                                            flds-      HsAppTy _ ty1 ty2           -> extract_lty t_or_k ty1 $-                                     extract_lty t_or_k ty2 acc-      HsAppKindTy _ ty k          -> extract_lty t_or_k ty $-                                     extract_lty KindLevel k acc-      HsListTy _ ty               -> extract_lty t_or_k ty acc-      HsTupleTy _ _ tys           -> extract_ltys t_or_k tys acc-      HsSumTy _ tys               -> extract_ltys t_or_k tys acc-      HsFunTy _ ty1 ty2           -> extract_lty t_or_k ty1 $-                                     extract_lty t_or_k ty2 acc-      HsIParamTy _ _ ty           -> extract_lty t_or_k ty acc-      HsOpTy _ ty1 tv ty2         -> extract_tv t_or_k tv   $-                                     extract_lty t_or_k ty1 $-                                     extract_lty t_or_k ty2 acc-      HsParTy _ ty                -> extract_lty t_or_k ty acc+      HsAppTy _ ty1 ty2           -> extract_lty ty1 $+                                     extract_lty ty2 acc+      HsAppKindTy _ ty k          -> extract_lty ty $+                                     extract_lty k acc+      HsListTy _ ty               -> extract_lty ty acc+      HsTupleTy _ _ tys           -> extract_ltys tys acc+      HsSumTy _ tys               -> extract_ltys tys acc+      HsFunTy _ ty1 ty2           -> extract_lty ty1 $+                                     extract_lty ty2 acc+      HsIParamTy _ _ ty           -> extract_lty ty acc+      HsOpTy _ ty1 tv ty2         -> extract_tv tv $+                                     extract_lty ty1 $+                                     extract_lty ty2 acc+      HsParTy _ ty                -> extract_lty ty acc       HsSpliceTy {}               -> acc  -- Type splices mention no tvs-      HsDocTy _ ty _              -> extract_lty t_or_k ty acc-      HsExplicitListTy _ _ tys    -> extract_ltys t_or_k tys acc-      HsExplicitTupleTy _ tys     -> extract_ltys t_or_k tys acc+      HsDocTy _ ty _              -> extract_lty ty acc+      HsExplicitListTy _ _ tys    -> extract_ltys tys acc+      HsExplicitTupleTy _ tys     -> extract_ltys tys acc       HsTyLit _ _                 -> acc       HsStarTy _ _                -> acc-      HsKindSig _ ty ki           -> extract_lty t_or_k ty $-                                     extract_lkind ki acc+      HsKindSig _ ty ki           -> extract_lty ty $+                                     extract_lty ki acc       HsForAllTy { hst_bndrs = tvs, hst_body = ty }                                   -> extract_hs_tv_bndrs tvs acc $-                                     extract_lty t_or_k ty emptyFKTV+                                     extract_lty ty []       HsQualTy { hst_ctxt = ctxt, hst_body = ty }-                                  -> extract_lctxt t_or_k ctxt $-                                     extract_lty t_or_k ty acc+                                  -> extract_lctxt ctxt $+                                     extract_lty ty acc       XHsType {}                  -> acc       -- We deal with these separately in rnLHsTypeWithWildCards       HsWildCardTy {}             -> acc@@ -1810,7 +1738,7 @@                  -> FreeKiTyVarsWithDups           -- Free in body                  -> FreeKiTyVarsWithDups       -- Free in result extractHsTvBndrs tv_bndrs body_fvs-  = extract_hs_tv_bndrs tv_bndrs emptyFKTV body_fvs+  = extract_hs_tv_bndrs tv_bndrs [] body_fvs  extract_hs_tv_bndrs :: [LHsTyVarBndr GhcPs]                     -> FreeKiTyVarsWithDups  -- Accumulator@@ -1820,27 +1748,14 @@ --     'a' is bound by the forall --     'b' is a free type variable --     'e' is a free kind variable-extract_hs_tv_bndrs tv_bndrs-      (FKTV { fktv_kis = acc_kvs,  fktv_tys = acc_tvs })   -- Accumulator-      (FKTV { fktv_kis = body_kvs, fktv_tys = body_tvs })  -- Free in the body-  | null tv_bndrs-  = FKTV { fktv_kis = body_kvs ++ acc_kvs-         , fktv_tys = body_tvs ++ acc_tvs }-  | otherwise-  = FKTV { fktv_kis = filterOut (`elemRdr` tv_bndr_rdrs) all_kv_occs-                      -- NB: delete all tv_bndr_rdrs from bndr_kvs as well-                      -- as body_kvs; see Note [Kind variable scoping]-                      ++ acc_kvs-         , fktv_tys = filterOut (`elemRdr` tv_bndr_rdrs) body_tvs ++ acc_tvs }+extract_hs_tv_bndrs tv_bndrs acc_vars body_vars+  | null tv_bndrs = body_vars ++ acc_vars+  | otherwise = filterOut (`elemRdr` tv_bndr_rdrs) (bndr_vars ++ body_vars) ++ acc_vars+    -- NB: delete all tv_bndr_rdrs from bndr_vars as well as body_vars.+    -- See Note [Kind variable scoping]   where-    bndr_kvs = extract_hs_tv_bndrs_kvs tv_bndrs--    tv_bndr_rdrs, all_kv_occs :: [Located RdrName]+    bndr_vars = extract_hs_tv_bndrs_kvs tv_bndrs     tv_bndr_rdrs = map hsLTyVarLocName tv_bndrs-    all_kv_occs = bndr_kvs ++ body_kvs-       -- We must include both kind variables from the binding as well-       -- as the body of the `forall` type.-       -- See Note [Variables used as both types and kinds].  extract_hs_tv_bndrs_kvs :: [LHsTyVarBndr GhcPs] -> [Located RdrName] -- Returns the free kind variables of any explictly-kinded binders, returning@@ -1850,17 +1765,14 @@ --     Duplicates are /not/ removed --     E.g. given  [k1, a:k1, b:k2] --          the function returns [k1,k2], even though k1 is bound here-extract_hs_tv_bndrs_kvs tv_bndrs-  = freeKiTyVarsKindVars $        -- There will /be/ no free tyvars!-    foldr extract_lkind emptyFKTV+extract_hs_tv_bndrs_kvs tv_bndrs =+    foldr extract_lty []           [k | (dL->L _ (KindedTyVar _ _ k)) <- tv_bndrs] -extract_tv :: TypeOrKind -> Located RdrName-           -> FreeKiTyVarsWithDups -> FreeKiTyVarsWithDups-extract_tv t_or_k ltv@(dL->L _ tv) acc@(FKTV kvs tvs)-  | not (isRdrTyVar tv) = acc-  | isTypeLevel t_or_k  = FKTV { fktv_kis = kvs, fktv_tys = ltv : tvs }-  | otherwise           = FKTV { fktv_kis = ltv : kvs, fktv_tys = tvs }+extract_tv :: Located RdrName+           -> [Located RdrName] -> [Located RdrName]+extract_tv tv acc =+  if isRdrTyVar (unLoc tv) then tv:acc else acc  -- Deletes duplicates in a list of Located things. --
rename/RnUtils.hs view
@@ -14,6 +14,7 @@         addFvRn, mapFvRn, mapMaybeFvRn,         warnUnusedMatches, warnUnusedTypePatterns,         warnUnusedTopBinds, warnUnusedLocalBinds,+        checkUnusedRecordWildcard,         mkFieldEnv,         unknownSubordinateErr, badQualBndrErr, typeAppErr,         HsDocContext(..), pprHsDocContext,@@ -32,7 +33,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import RdrName import HscTypes import TcEnv@@ -148,7 +149,7 @@   where     check_shadow n         | startsWithUnderscore occ = return ()  -- Do not report shadowing for "_x"-                                                -- See Trac #3262+                                                -- See #3262         | Just n <- mb_local = complain [text "bound at" <+> ppr (nameSrcLoc n)]         | otherwise = do { gres' <- filterM is_shadowed_gre gres                          ; complain (map pprNameProvenance gres') }@@ -166,7 +167,7 @@      is_shadowed_gre :: GlobalRdrElt -> RnM Bool         -- Returns False for record selectors that are shadowed, when-        -- punning or wild-cards are on (cf Trac #2723)+        -- punning or wild-cards are on (cf #2723)     is_shadowed_gre gre | isRecFldGRE gre         = do { dflags <- getDynFlags              ; return $ not (xopt LangExt.RecordPuns dflags@@ -222,6 +223,57 @@                                else                 gres          warnUnusedGREs gres' ++-- | Checks to see if we need to warn for -Wunused-record-wildcards or+-- -Wredundant-record-wildcards+checkUnusedRecordWildcard :: SrcSpan+                          -> FreeVars+                          -> Maybe [Name]+                          -> RnM ()+checkUnusedRecordWildcard _ _ Nothing    = return ()+checkUnusedRecordWildcard loc _ (Just [])  = do+  -- Add a new warning if the .. pattern binds no variables+  setSrcSpan loc $ warnRedundantRecordWildcard+checkUnusedRecordWildcard loc fvs (Just dotdot_names) =+  setSrcSpan loc $ warnUnusedRecordWildcard dotdot_names fvs+++-- | Produce a warning when the `..` pattern binds no new+-- variables.+--+-- @+--   data P = P { x :: Int }+--+--   foo (P{x, ..}) = x+-- @+--+-- The `..` here doesn't bind any variables as `x` is already bound.+warnRedundantRecordWildcard :: RnM ()+warnRedundantRecordWildcard =+  whenWOptM Opt_WarnRedundantRecordWildcards+            (addWarn (Reason Opt_WarnRedundantRecordWildcards)+                     redundantWildcardWarning)+++-- | Produce a warning when no variables bound by a `..` pattern are used.+--+-- @+--   data P = P { x :: Int }+--+--   foo (P{..}) = ()+-- @+--+-- The `..` pattern binds `x` but it is not used in the RHS so we issue+-- a warning.+warnUnusedRecordWildcard :: [Name] -> FreeVars -> RnM ()+warnUnusedRecordWildcard ns used_names = do+  let used = filter (`elemNameSet` used_names) ns+  traceRn "warnUnused" (ppr ns $$ ppr used_names $$ ppr used)+  warnIfFlag Opt_WarnUnusedRecordWildcards (null used)+    unusedRecordWildcardWarning+++ warnUnusedLocalBinds, warnUnusedMatches, warnUnusedTypePatterns   :: [Name] -> FreeVars -> RnM () warnUnusedLocalBinds   = check_unused Opt_WarnUnusedLocalBinds@@ -296,6 +348,20 @@          nest 2 $ pprNonVarNameSpace (occNameSpace occ)                         <+> quotes (ppr occ)] +unusedRecordWildcardWarning :: SDoc+unusedRecordWildcardWarning =+  wildcardDoc $ text "No variables bound in the record wildcard match are used"++redundantWildcardWarning :: SDoc+redundantWildcardWarning =+  wildcardDoc $ text "Record wildcard does not bind any new variables"++wildcardDoc :: SDoc -> SDoc+wildcardDoc herald =+  herald+    $$ nest 2 (text "Possible fix" <> colon <+> text "omit the"+                                            <+> quotes (text ".."))+ addNameClashErrRn :: RdrName -> [GlobalRdrElt] -> RnM () addNameClashErrRn rdr_name gres   | all isLocalGRE gres && not (all isRecFldGRE gres)@@ -319,7 +385,7 @@     --   It could refer to either ‘T15487a.null’,     --                            imported from ‘Prelude’ at T15487.hs:1:8-13     --                     or ...-    -- See Trac #15487+    -- See #15487     pp_gre_name gre@(GRE { gre_name = name, gre_par = parent                          , gre_lcl = lcl, gre_imp = iss })       | FldParent { par_lbl = Just lbl } <- parent@@ -392,6 +458,7 @@ --          Merge TcType.UserTypeContext in to it. data HsDocContext   = TypeSigCtx SDoc+  | StandaloneKindSigCtx SDoc   | PatCtx   | SpecInstSigCtx   | DefaultDeclCtx@@ -421,6 +488,7 @@ pprHsDocContext :: HsDocContext -> SDoc pprHsDocContext (GenericCtx doc)      = doc pprHsDocContext (TypeSigCtx doc)      = text "the type signature for" <+> doc+pprHsDocContext (StandaloneKindSigCtx doc) = text "the standalone kind signature for" <+> doc pprHsDocContext PatCtx                = text "a pattern type-signature" pprHsDocContext SpecInstSigCtx        = text "a SPECIALISE instance pragma" pprHsDocContext DefaultDeclCtx        = text "a `default' declaration"
simplCore/CSE.hs view
@@ -15,7 +15,7 @@ import CoreSubst import Var              ( Var ) import VarEnv           ( elemInScopeSet, mkInScopeSet )-import Id               ( Id, idType, isDeadBinder+import Id               ( Id, idType, isDeadBinder, idHasRules                         , idInlineActivation, setInlineActivation                         , zapIdOccInfo, zapIdUsageInfo, idInlinePragma                         , isJoinId, isJoinId_maybe )@@ -84,7 +84,7 @@      - First, the original RHS might have been (g z) which has CSE'd       with an enclosing (let y = g z in ...).  This is super-important.-      See Trac #5996:+      See #5996:          x1 = C a b          x2 = C x1 b          y1 = C a b@@ -104,7 +104,7 @@    Note that we use EXTEND even for a trivial expression, provided it   is not a variable or literal. In particular this /includes/ type-  applications. This can be important (Trac #13156); e.g.+  applications. This can be important (#13156); e.g.      case f @ Int of { r1 ->      case f @ Int of { r2 -> ...   Here we want to common-up the two uses of (f @ Int) so we can@@ -392,9 +392,15 @@  delayInlining :: TopLevelFlag -> Id -> Id -- Add a NOINLINE[2] if the Id doesn't have an INLNE pragma already+-- See Note [Delay inlining after CSE] delayInlining top_lvl bndr   | isTopLevel top_lvl   , isAlwaysActive (idInlineActivation bndr)+  , idHasRules bndr  -- Only if the Id has some RULES,+                     -- which might otherwise get lost+       -- These rules are probably auto-generated specialisations,+       -- since Ids with manual rules usually have manually-inserted+       -- delayed inlining anyway   = bndr `setInlineActivation` activeAfterInitial   | otherwise   = bndr@@ -419,7 +425,7 @@        -- Putting the Id into the cs_map makes it possible that        -- it'll become shared more than it is now, which would        -- invalidate (the usage part of) its demand info.-       --    This caused Trac #100218.+       --    This caused #100218.        -- Easiest thing is to zap the usage info; subsequently        -- performing late demand-analysis will restore it.  Don't zap        -- the strictness info; it's not necessary to do so, and losing@@ -475,11 +481,11 @@   - Use SUBSTITUTE, by extending the substitution with  y :-> x   - but leave the original binding for y undisturbed -This is done by cse_bind.  I got it wrong the first time (Trac #13367).+This is done by cse_bind.  I got it wrong the first time (#13367).  Note [Delay inlining after CSE] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose (Trac #15445) we have+Suppose (#15445) we have    f,g :: Num a => a -> a    f x = ...f (x-1).....    g y = ...g (y-1) ....@@ -494,13 +500,49 @@ Now there is terrible danger that, in an importing module, we'll inline 'g' before we have a chance to run its specialisation! -Solution: during CSE, when adding a top-level-  g = f-binding after a "hit" in the CSE cache, add a NOINLINE[2] activation-to it, to ensure it's not inlined right away.+Solution: during CSE, afer a "hit" in the CSE cache+  * when adding a binding+        g = f+  * for a top-level function g+  * and g has specialisation RULES+add a NOINLINE[2] activation to it, to ensure it's not inlined+right away. -Why top level only?  Because for nested bindings we are already past-phase 2 and will never return there.+Notes:+* Why top level only?  Because for nested bindings we are already past+  phase 2 and will never return there.++* Why "only if g has RULES"?  Because there is no point in+  doing this if there are no RULES; and other things being+  equal it delays optimisation to delay inlining (#17409)+++---- Historical note ---++This patch is simpler and more direct than an earlier+version:++  commit 2110738b280543698407924a16ac92b6d804dc36+  Author: Simon Peyton Jones <simonpj@microsoft.com>+  Date:   Mon Jul 30 13:43:56 2018 +0100++  Don't inline functions with RULES too early++We had to revert this patch because it made GHC itself slower.++Why? It delayed inlining of /all/ functions with RULES, and that was+very bad in TcFlatten.flatten_ty_con_app++* It delayed inlining of liftM+* That delayed the unravelling of the recursion in some dictionary+  bindings.+* That delayed some eta expansion, leaving+     flatten_ty_con_app = \x y. let <stuff> in \z. blah+* That allowed the float-out pass to put sguff between+  the \y and \z.+* And that permanently stopped eta expasion of the function,+  even once <stuff> was simplified.+ -}  tryForCSE :: CSEnv -> InExpr -> OutExpr
simplCore/CallArity.hs view
@@ -418,7 +418,7 @@ The analysis *could* make use of the fact that join points are always evaluated in the same context as the join-binding they are defined in and are always one-shot, and handle join points separately, as suggested in-https://ghc.haskell.org/trac/ghc/ticket/13479#comment:10.+https://gitlab.haskell.org/ghc/ghc/issues/13479#note_134870. This *might* be more efficient (for example, join points would not have to be considered interesting variables), but it would also add redundant code. So for now we do not do that.
simplCore/CoreMonad.hs view
@@ -5,6 +5,7 @@ -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-}  module CoreMonad (     -- * Configuration of the core-to-core passes@@ -27,7 +28,7 @@     -- ** Reading from the monad     getHscEnv, getRuleBase, getModule,     getDynFlags, getOrigNameCache, getPackageFamInstEnv,-    getVisibleOrphanMods,+    getVisibleOrphanMods, getUniqMask,     getPrintUnqualified, getSrcSpanM,      -- ** Writing to the monad@@ -35,11 +36,7 @@      -- ** Lifting into the monad     liftIO, liftIOWithCount,-    liftIO1, liftIO2, liftIO3, liftIO4, -    -- ** Global initialization-    reinitializeGlobals,-     -- ** Dealing with annotations     getAnnotations, getFirstAnnotations, @@ -71,7 +68,7 @@ import MonadUtils import NameCache import SrcLoc-import Data.List+import Data.List (intersperse, groupBy, sortBy) import Data.Ord import Data.Dynamic import Data.IORef@@ -81,6 +78,7 @@ import Data.Word import Control.Monad import Control.Applicative ( Alternative(..) )+import Panic (throwGhcException, GhcException(..))  {- ************************************************************************@@ -317,7 +315,13 @@              | otherwise       = sc2  plusSimplCount (VerySimplCount n) (VerySimplCount m) = VerySimplCount (n+m)-plusSimplCount _                  _                  = panic "plusSimplCount"+plusSimplCount lhs                rhs                =+  throwGhcException . PprProgramError "plusSimplCount" $ vcat+    [ text "lhs"+    , pprSimplCount lhs+    , text "rhs"+    , pprSimplCount rhs+    ]        -- We use one or the other consistently  pprSimplCount (VerySimplCount n) = text "Total ticks:" <+> int n@@ -542,10 +546,6 @@ ************************************************************************ -} -newtype CoreState = CoreState {-        cs_uniq_supply :: UniqSupply-}- data CoreReader = CoreReader {         cr_hsc_env             :: HscEnv,         cr_rule_base           :: RuleBase,@@ -553,12 +553,13 @@         cr_print_unqual        :: PrintUnqualified,         cr_loc                 :: SrcSpan,   -- Use this for log/error messages so they                                              -- are at least tagged with the right source file-        cr_visible_orphan_mods :: !ModuleSet+        cr_visible_orphan_mods :: !ModuleSet,+        cr_uniq_mask           :: !Char      -- Mask for creating unique values }  -- Note: CoreWriter used to be defined with data, rather than newtype.  If it -- is defined that way again, the cw_simpl_count field, at least, must be--- strict to avoid a space leak (Trac #7702).+-- strict to avoid a space leak (#7702). newtype CoreWriter = CoreWriter {         cw_simpl_count :: SimplCount }@@ -575,57 +576,51 @@  type CoreIOEnv = IOEnv CoreReader --- | The monad used by Core-to-Core passes to access common state, register simplification--- statistics and so on-newtype CoreM a = CoreM { unCoreM :: CoreState -> CoreIOEnv (a, CoreState, CoreWriter) }--instance Functor CoreM where-    fmap = liftM+-- | The monad used by Core-to-Core passes to register simplification statistics.+--  Also used to have common state (in the form of UniqueSupply) for generating Uniques.+newtype CoreM a = CoreM { unCoreM :: CoreIOEnv (a, CoreWriter) }+    deriving (Functor)  instance Monad CoreM where-    mx >>= f = CoreM $ \s -> do-            (x, s', w1) <- unCoreM mx s-            (y, s'', w2) <- unCoreM (f x) s'+    mx >>= f = CoreM $ do+            (x, w1) <- unCoreM mx+            (y, w2) <- unCoreM (f x)             let w = w1 `plusWriter` w2-            return $ seq w (y, s'', w)+            return $ seq w (y, w)             -- forcing w before building the tuple avoids a space leak-            -- (Trac #7702)+            -- (#7702)  instance Applicative CoreM where-    pure x = CoreM $ \s -> nop s x+    pure x = CoreM $ nop x     (<*>) = ap     m *> k = m >>= \_ -> k  instance Alternative CoreM where-    empty   = CoreM (const Control.Applicative.empty)-    m <|> n = CoreM (\rs -> unCoreM m rs <|> unCoreM n rs)+    empty   = CoreM Control.Applicative.empty+    m <|> n = CoreM (unCoreM m <|> unCoreM n)  instance MonadPlus CoreM  instance MonadUnique CoreM where     getUniqueSupplyM = do-        us <- getS cs_uniq_supply-        let (us1, us2) = splitUniqSupply us-        modifyS (\s -> s { cs_uniq_supply = us2 })-        return us1+        mask <- read cr_uniq_mask+        liftIO $! mkSplitUniqSupply mask      getUniqueM = do-        us <- getS cs_uniq_supply-        let (u,us') = takeUniqFromSupply us-        modifyS (\s -> s { cs_uniq_supply = us' })-        return u+        mask <- read cr_uniq_mask+        liftIO $! uniqFromMask mask  runCoreM :: HscEnv          -> RuleBase-         -> UniqSupply+         -> Char -- ^ Mask          -> Module          -> ModuleSet          -> PrintUnqualified          -> SrcSpan          -> CoreM a          -> IO (a, SimplCount)-runCoreM hsc_env rule_base us mod orph_imps print_unqual loc m-  = liftM extract $ runIOEnv reader $ unCoreM m state+runCoreM hsc_env rule_base mask mod orph_imps print_unqual loc m+  = liftM extract $ runIOEnv reader $ unCoreM m   where     reader = CoreReader {             cr_hsc_env = hsc_env,@@ -633,14 +628,12 @@             cr_module = mod,             cr_visible_orphan_mods = orph_imps,             cr_print_unqual = print_unqual,-            cr_loc = loc-        }-    state = CoreState {-            cs_uniq_supply = us+            cr_loc = loc,+            cr_uniq_mask = mask         } -    extract :: (a, CoreState, CoreWriter) -> (a, SimplCount)-    extract (value, _, writer) = (value, cw_simpl_count writer)+    extract :: (a, CoreWriter) -> (a, SimplCount)+    extract (value, writer) = (value, cw_simpl_count writer)  {- ************************************************************************@@ -650,28 +643,22 @@ ************************************************************************ -} -nop :: CoreState -> a -> CoreIOEnv (a, CoreState, CoreWriter)-nop s x = do+nop :: a -> CoreIOEnv (a, CoreWriter)+nop x = do     r <- getEnv-    return (x, s, emptyWriter $ (hsc_dflags . cr_hsc_env) r)+    return (x, emptyWriter $ (hsc_dflags . cr_hsc_env) r)  read :: (CoreReader -> a) -> CoreM a-read f = CoreM (\s -> getEnv >>= (\r -> nop s (f r)))--getS :: (CoreState -> a) -> CoreM a-getS f = CoreM (\s -> nop s (f s))--modifyS :: (CoreState -> CoreState) -> CoreM ()-modifyS f = CoreM (\s -> nop (f s) ())+read f = CoreM $ getEnv >>= (\r -> nop (f r))  write :: CoreWriter -> CoreM ()-write w = CoreM (\s -> return ((), s, w))+write w = CoreM $ return ((), w)  -- \subsection{Lifting IO into the monad}  -- | Lift an 'IOEnv' operation into 'CoreM' liftIOEnv :: CoreIOEnv a -> CoreM a-liftIOEnv mx = CoreM (\s -> mx >>= (\x -> nop s x))+liftIOEnv mx = CoreM (mx >>= (\x -> nop x))  instance MonadIO CoreM where     liftIO = liftIOEnv . IOEnv.liftIO@@ -706,6 +693,9 @@ addSimplCount :: SimplCount -> CoreM () addSimplCount count = write (CoreWriter { cw_simpl_count = count }) +getUniqMask :: CoreM Char+getUniqMask = read cr_uniq_mask+ -- Convenience accessors for useful fields of HscEnv  instance HasDynFlags CoreM where@@ -727,10 +717,6 @@     eps <- liftIO $ hscEPS hsc_env     return $ eps_fam_inst_env eps -{-# DEPRECATED reinitializeGlobals "It is not necessary to call reinitializeGlobals. Since GHC 8.2, this function is a no-op and will be removed in GHC 8.4" #-}-reinitializeGlobals :: CoreM ()-reinitializeGlobals = return ()- {- ************************************************************************ *                                                                      *@@ -785,8 +771,8 @@ ************************************************************************ -} -msg :: Severity -> SDoc -> CoreM ()-msg sev doc+msg :: Severity -> WarnReason -> SDoc -> CoreM ()+msg sev reason doc   = do { dflags <- getDynFlags        ; loc    <- getSrcSpanM        ; unqual <- getPrintUnqualified@@ -798,7 +784,7 @@              err_sty  = mkErrStyle dflags unqual              user_sty = mkUserStyle dflags unqual AllTheWay              dump_sty = mkDumpStyle dflags unqual-       ; liftIO $ putLogMsg dflags NoReason sev loc sty doc }+       ; liftIO $ putLogMsg dflags reason sev loc sty doc }  -- | Output a String message to the screen putMsgS :: String -> CoreM ()@@ -806,7 +792,7 @@  -- | Output a message to the screen putMsg :: SDoc -> CoreM ()-putMsg = msg SevInfo+putMsg = msg SevInfo NoReason  -- | Output an error to the screen. Does not cause the compiler to die. errorMsgS :: String -> CoreM ()@@ -814,9 +800,9 @@  -- | Output an error to the screen. Does not cause the compiler to die. errorMsg :: SDoc -> CoreM ()-errorMsg = msg SevError+errorMsg = msg SevError NoReason -warnMsg :: SDoc -> CoreM ()+warnMsg :: WarnReason -> SDoc -> CoreM () warnMsg = msg SevWarning  -- | Output a fatal error to the screen. Does not cause the compiler to die.@@ -825,7 +811,7 @@  -- | Output a fatal error to the screen. Does not cause the compiler to die. fatalErrorMsg :: SDoc -> CoreM ()-fatalErrorMsg = msg SevFatal+fatalErrorMsg = msg SevFatal NoReason  -- | Output a string debugging message at verbosity level of @-v@ or higher debugTraceMsgS :: String -> CoreM ()@@ -833,7 +819,7 @@  -- | Outputs a debugging message at verbosity level of @-v@ or higher debugTraceMsg :: SDoc -> CoreM ()-debugTraceMsg = msg SevDump+debugTraceMsg = msg SevDump NoReason  -- | Show some labelled 'SDoc' if a particular flag is set or at a verbosity level of @-v -ddump-most@ or higher dumpIfSet_dyn :: DumpFlag -> String -> SDoc -> CoreM ()
simplCore/CoreMonad.hs-boot view
@@ -12,12 +12,7 @@ import GhcPrelude  import IOEnv ( IOEnv )-import UniqSupply ( UniqSupply ) -newtype CoreState = CoreState {-        cs_uniq_supply :: UniqSupply-}- type CoreIOEnv = IOEnv CoreReader  data CoreReader@@ -28,9 +23,7 @@  data SimplCount -newtype CoreM a-          = CoreM { unCoreM :: CoreState-                                 -> CoreIOEnv (a, CoreState, CoreWriter) }+newtype CoreM a = CoreM { unCoreM :: CoreIOEnv (a, CoreWriter) }  instance Monad CoreM 
simplCore/Exitify.hs view
@@ -245,7 +245,7 @@                                | otherwise           = (fvs',               acc)          -- We are going to abstract over these variables, so we must-        -- zap any IdInfo they have; see Trac #15005+        -- zap any IdInfo they have; see #15005         -- cf. SetLevels.abstractVars         zap v | isId v = setIdInfo v vanillaIdInfo               | otherwise = v
simplCore/FloatIn.hs view
@@ -22,7 +22,7 @@ import GhcPrelude  import CoreSyn-import MkCore+import MkCore hiding    ( wrapFloats ) import HscTypes         ( ModGuts(..) ) import CoreUtils import CoreFVs@@ -210,7 +210,7 @@ /in the original input program/.  e.g.    case x of { DEFAULT -> 1# } But, while this may be unusual it is not actually wrong, and it did-once happen (Trac #15696).+once happen (#15696).  Note [Do not destroy the let/app invariant] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -307,7 +307,7 @@  fiExpr dflags to_drop lam@(_, AnnLam _ _)   | noFloatIntoLam bndrs       -- Dump it all here-     -- NB: Must line up with noFloatIntoRhs (AnnLam...); see Trac #7088+     -- NB: Must line up with noFloatIntoRhs (AnnLam...); see #7088   = wrapFloats to_drop (mkLams bndrs (fiExpr dflags [] body))    | otherwise           -- Float inside@@ -391,7 +391,7 @@ {- Note [Floating primops] ~~~~~~~~~~~~~~~~~~~~~~~~~~ We try to float-in a case expression over an unlifted type.  The-motivating example was Trac #5658: in particular, this change allows+motivating example was #5658: in particular, this change allows array indexing operations, which have a single DEFAULT alternative without any binders, to be floated inward. @@ -421,10 +421,10 @@   Solution: only float cases into the branches of other cases, and   not into the arguments of an application, or the RHS of a let. This   is somewhat conservative, but it's simple.  And it still hits the-  cases like Trac #5658.   This is implemented in sepBindsByJoinPoint;+  cases like #5658.   This is implemented in sepBindsByJoinPoint;   if is_case is False we dump all floating cases right here. -* Trac #14511 is another example of why we want to restrict float-in+* #14511 is another example of why we want to restrict float-in   of case-expressions.  Consider      case indexArray# a n of (# r #) -> writeArray# ma i (f r)   Now, floating that indexing operation into the (f r) thunk will@@ -613,7 +613,7 @@      (a) any non-one-shot value lambdas   or (b) all type lambdas   In both cases we'll float straight back out again-  NB: Must line up with fiExpr (AnnLam...); see Trac #7088+  NB: Must line up with fiExpr (AnnLam...); see #7088    (a) is important: we /must/ float into a one-shot lambda group   (which includes join points). This makes a big difference
simplCore/FloatOut.hs view
@@ -305,7 +305,7 @@     f = case x of I# y -> \xy. body because now f's arity might get worse, which is Not Good. (And if there's an SCC around the RHS it might not get better again.-See Trac #5342.)+See #5342.)  So, gruesomely, we split the floats into  * the outer FloatLets, which can join the Rec, and@@ -629,7 +629,7 @@  addTopFloatPairs :: Bag CoreBind -> [(Id,CoreExpr)] -> [(Id,CoreExpr)] addTopFloatPairs float_bag prs-  = foldrBag add prs float_bag+  = foldr add prs float_bag   where     add (NonRec b r) prs  = (b,r):prs     add (Rec prs1)   prs2 = prs1 ++ prs2@@ -673,7 +673,7 @@  install :: Bag FloatBind -> CoreExpr -> CoreExpr install defn_groups expr-  = foldrBag wrapFloat expr defn_groups+  = foldr wrapFloat expr defn_groups  partitionByLevel         :: Level                -- Partitioning level
simplCore/OccurAnal.hs view
@@ -129,7 +129,7 @@  {- Note [Plugin rules] ~~~~~~~~~~~~~~~~~~~~~~-Conal Elliott (Trac #11651) built a GHC plugin that added some+Conal Elliott (#11651) built a GHC plugin that added some BuiltinRules (for imported Ids) to the mg_rules field of ModGuts, to do some domain-specific transformations that could not be expressed with an ordinary pattern-matching CoreRule.  But then we can't extract@@ -1025,7 +1025,7 @@ iterations.  You might thing that it's very unlikely, but RULES make it much-more likely.  Here's a real example from Trac #1969:+more likely.  Here's a real example from #1969:   Rec { $dm = \d.\x. op d         {-# RULES forall d. $dm Int d  = $s$dm1                   forall d. $dm Bool d = $s$dm2 #-}@@ -1444,7 +1444,7 @@ To choose a loop breaker, we give a NodeScore to each node in the SCC, and pick the one with the best score (according to 'betterLB'). -We need to be jolly careful (Trac #12425, #12234) about the stability+We need to be jolly careful (#12425, #12234) about the stability of this choice. Suppose we have      let rec { f = ...g...g...@@ -1615,10 +1615,10 @@    join j = Just x  We want to inline x into j right away, so we don't want to give-the join point a RhsCtxt (Trac #14137).  It's not a huge deal, because+the join point a RhsCtxt (#14137).  It's not a huge deal, because the FloatIn pass knows to float into join point RHSs; and the simplifier does not float things out of join point RHSs.  But it's a simple, cheap-thing to do.  See Trac #14137.+thing to do.  See #14137.  Note [Cascading inlines] ~~~~~~~~~~~~~~~~~~~~~~~~@@ -1937,7 +1937,7 @@     that sense, f is saturated, and we may proceed as described above.      Hence the computation of 'guaranteed_val_args' in occAnalApp, using-    '(occ_one_shots env)'.  See also Trac #13227, comment:9+    '(occ_one_shots env)'.  See also #13227, comment:9  B:  Let-bindings:  eg   let f = \c. let ... in \n -> blah                         in (build f, build f)@@ -2215,18 +2215,46 @@  Note [Binder swap] ~~~~~~~~~~~~~~~~~~-We do these two transformations right here:+The "binder swap" tranformation swaps occurence of the+scrutinee of a case for occurrences of the case-binder: - (1)   case x of b { pi -> ri }-    ==>+ (1)  case x of b { pi -> ri }+         ==>       case x of b { pi -> let x=b in ri }   (2)  case (x |> co) of b { pi -> ri }-    ==>+        ==>       case (x |> co) of b { pi -> let x = b |> sym co in ri } -    Why (2)?  See Note [Case of cast]+In both cases, the trivial 'let' can be eliminated by the+immediately following simplifier pass. +There are two reasons for making this swap:++(A) It reduces the number of occurrences of the scrutinee, x.+    That in turn might reduce its occurrences to one, so we+    can inline it and save an allocation.  E.g.+      let x = factorial y in case x of b { I# v -> ...x... }+    If we replace 'x' by 'b' in the alternative we get+      let x = factorial y in case x of b { I# v -> ...b... }+    and now we can inline 'x', thus+      case (factorial y) of b { I# v -> ...b... }++(B) The case-binder b has unfolding information; in the+    example above we know that b = I# v. That in turn allows+    nested cases to simplify.  Consider+       case x of b { I# v ->+       ...(case x of b2 { I# v2 -> rhs })...+    If we replace 'x' by 'b' in the alternative we get+       case x of b { I# v ->+       ...(case b of b2 { I# v2 -> rhs })...+    and now it is trivial to simplify the inner case:+       case x of b { I# v ->+       ...(let b2 = b in rhs)...++    The same can happen even if the scrutinee is a variable+    with a cast: see Note [Case of cast]+ In both cases, in a particular alternative (pi -> ri), we only add the binding if   (a) x occurs free in (pi -> ri)@@ -2241,18 +2269,19 @@   * The deliberate shadowing of 'x'.   * That (a) rapidly becomes false, so no bindings are injected. -The reason for doing these transformations here is because it allows-us to adjust the OccInfo for 'x' and 'b' as we go.+The reason for doing these transformations /here in the occurrence+analyser/ is because it allows us to adjust the OccInfo for 'x' and+'b' as we go.    * Suppose the only occurrences of 'x' are the scrutinee and in the     ri; then this transformation makes it occur just once, and hence     get inlined right away. -  * If we do this in the Simplifier, we don't know whether 'x' is used-    in ri, so we are forced to pessimistically zap b's OccInfo even-    though it is typically dead (ie neither it nor x appear in the-    ri).  There's nothing actually wrong with zapping it, except that-    it's kind of nice to know which variables are dead.  My nose+  * If instead we do this in the Simplifier, we don't know whether 'x'+    is used in ri, so we are forced to pessimistically zap b's OccInfo+    even though it is typically dead (ie neither it nor x appear in+    the ri).  There's nothing actually wrong with zapping it, except+    that it's kind of nice to know which variables are dead.  My nose     tells me to keep this information as robustly as possible.  The Maybe (Id,CoreExpr) passed to occAnalAlt is the extra let-binding@@ -2298,7 +2327,7 @@  Core Lint never expects to find an *occurrence* of an Id marked as Dead, so we must zap the OccInfo on cb before making the-binding x = cb.  See Trac #5028.+binding x = cb.  See #5028.  NB: the OccInfo on /occurrences/ really doesn't matter much; the simplifier doesn't use it. So this is only to satisfy the perhpas-over-picky Lint.@@ -2385,7 +2414,7 @@                        , Just (localise v, rhs) )       -- ToDO: this isGlobalId stuff is a TEMPORARY FIX       --       to avoid the binder-swap for GlobalIds-      --       See Trac #16346+      --       See #16346      case_bndr' = Var (zapIdOccInfo case_bndr)                    -- See Note [Zap case binders in proxy bindings]@@ -2532,7 +2561,7 @@ Currently we don't traverse types to gather usase info for CoVars, so we had better treat them as having noOccInfo. -This showed up in Trac #15696 we had something like+This showed up in #15696 we had something like   case eq_sel d of co -> ...(typeError @(...co...) "urk")...  Then 'd' was substitued by a dictionary, so the expression@@ -2804,7 +2833,7 @@ convert g to be a join point, its unfolding will still have arity 1 (since it is stable, and we don't meddle with stable unfoldings), and Lint will complain (see Note [Invariants on join points], (2a), in-CoreSyn.  Trac #13413.+CoreSyn.  #13413.  Moreover, since g is going to be inlined anyway, there is no benefit from making it a join point.
simplCore/SAT.hs view
@@ -69,7 +69,7 @@ import UniqSet import Outputable -import Data.List+import Data.List (mapAccumL) import FastString  #include "HsVersions.h"
simplCore/SetLevels.hs view
@@ -89,7 +89,7 @@ import Name             ( getOccName, mkSystemVarName ) import OccName          ( occNameString ) import Type             ( Type, mkLamTypes, splitTyConApp_maybe, tyCoVarsOfType-                        , isUnliftedType, closeOverKindsDSet )+                        , mightBeUnliftedType, closeOverKindsDSet ) import BasicTypes       ( Arity, RecFlag(..), isRec ) import DataCon          ( dataConOrigResTy ) import TysWiredIn@@ -536,6 +536,32 @@   * We only do this with a single-alternative case ++Note [Setting levels when floating single-alternative cases]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Handling level-setting when floating a single-alternative case binding+is a bit subtle, as evidenced by #16978.  In particular, we must keep+in mind that we are merely moving the case and its binders, not the+body. For example, suppose 'a' is known to be evaluated and we have++  \z -> case a of+          (x,_) -> <body involving x and z>++After floating we may have:++  case a of+    (x,_) -> \z -> <body involving x and z>+      {- some expression involving x and z -}++When analysing <body involving...> we want to use the /ambient/ level,+and /not/ the desitnation level of the 'case a of (x,-) ->' binding.++#16978 was caused by us setting the context level to the destination+level of `x` when analysing <body>. This led us to conclude that we+needed to quantify over some of its free variables (e.g. z), resulting+in shadowing and very confusing Core Lint failures.++ Note [Check the output scrutinee for exprIsHNF] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider this:@@ -549,7 +575,7 @@ the *input* one 'y'.  The latter *is* in HNF here (because y is evaluated), but the former is not -- and indeed we can't float the inner case out, at least not unless x is also evaluated at its binding-site.  See Trac #5453.+site.  See #5453.  That's why we apply exprIsHNF to scrut' and not to scrut. @@ -756,7 +782,7 @@ Note [Floating join point bindings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mostly we only float a join point if it can /stay/ a join point.  But-there is one exception: if it can go to the top level (Trac #13286).+there is one exception: if it can go to the top level (#13286). Consider   f x = joinrec j y n = <...j y' n'...>         in jump j x 0@@ -809,7 +835,7 @@    case (case y of I# r -> r) of r -> blah  Being able to float unboxed expressions is sometimes important; see-Trac #12603.  I'm not sure how /often/ it is important, but it's+#12603.  I'm not sure how /often/ it is important, but it's not hard to achieve.  We only do it for a fixed collection of types for which we have a@@ -913,7 +939,7 @@     errors, e.g. via a case with empty alternatives:  (case x of {})     Lint complains unless the scrutinee of such a case is clearly bottom. -    This was reported in Trac #11290.   But since the whole bottoming-float+    This was reported in #11290.   But since the whole bottoming-float     thing is based on the cheap-and-cheerful exprIsBottom, I'm not sure     that it'll nail all such cases. @@ -977,18 +1003,17 @@     go (Tick t e) n  = not (tickishIsCode t) && go e n     go (Cast e _)  n = go e n     go (App e arg) n-       | Type {}     <- arg = go e n-       | Coercion {} <- arg = go e n-       | n==0               = False-       | is_triv arg        = go e (n-1)-       | otherwise          = False-    go _ _                  = False+       -- See Note [Floating applications to coercions]+       | Type {} <- arg = go e n+       | n==0           = False+       | is_triv arg    = go e (n-1)+       | otherwise      = False+    go _ _              = False      is_triv (Lit {})              = True        -- Treat all literals as trivial     is_triv (Var {})              = True        -- (ie not worth floating)     is_triv (Cast e _)            = is_triv e-    is_triv (App e (Type {}))     = is_triv e-    is_triv (App e (Coercion {})) = is_triv e+    is_triv (App e (Type {}))     = is_triv e   -- See Note [Floating applications to coercions]     is_triv (Tick t e)            = not (tickishIsCode t) && is_triv e     is_triv _                     = False @@ -1002,6 +1027,14 @@ Ditto literal strings (LitString), which we'd like to float to top level, which is now possible. +Note [Floating applications to coercions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We don’t float out variables applied only to type arguments, since the+extra binding would be pointless: type arguments are completely erased.+But *coercion* arguments aren’t (see Note [Coercion tokens] in+CoreToStg.hs and Note [Count coercion arguments in boring contexts] in+CoreUnfold.hs), so we still want to float out variables applied only to+coercion arguments.  Note [Escaping a value lambda] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1099,8 +1132,8 @@   |  floatTopLvlOnly env && not (isTopLvl dest_lvl)          -- Only floating to the top level is allowed.   || not (profitableFloat env dest_lvl)-  || (isTopLvl dest_lvl && any (isUnliftedType . idType) bndrs)-       -- This isUnliftedType stuff is the same test as in the non-rec case+  || (isTopLvl dest_lvl && any (mightBeUnliftedType . idType) bndrs)+       -- This mightBeUnliftedType stuff is the same test as in the non-rec case        -- You might wonder whether we can have a recursive binding for        -- an unlifted value -- but we can if it's a /join binding/ (#16978)        -- (Ultimately I think we should not use SetLevels to@@ -1276,7 +1309,7 @@   * any value lambdas in the original function, and   * this is not a bottoming function (the is_bot argument) Use lvlExpr otherwise.  A little subtle, and I got it wrong at least twice-(e.g. Trac #13369).+(e.g. #13369). -}  {-@@ -1407,7 +1440,7 @@ is just tOP_LEVEL; but occasionally a coercion variable (which is an Id) mentioned in type prevents this. -Example Trac #14270 comment:15.+Example #14270 comment:15. -}  @@ -1669,11 +1702,16 @@       | otherwise       = mkSysLocalOrCoVar (mkFastString "lvl") uniq rhs_ty +-- | Clone the binders bound by a single-alternative case. cloneCaseBndrs :: LevelEnv -> Level -> [Var] -> LvlM (LevelEnv, [Var]) cloneCaseBndrs env@(LE { le_subst = subst, le_lvl_env = lvl_env, le_env = id_env })                new_lvl vs   = do { us <- getUniqueSupplyM        ; let (subst', vs') = cloneBndrs subst us vs+             -- N.B. We are not moving the body of the case, merely its case+             -- binders.  Consequently we should *not* set le_ctxt_lvl and+             -- le_join_ceil.  See Note [Setting levels when floating+             -- single-alternative cases].              env' = env { le_lvl_env   = addLvls new_lvl lvl_env vs'                         , le_subst     = subst'                         , le_env       = foldl' add_id id_env (vs `zip` vs') }
simplCore/SimplCore.hs view
@@ -36,7 +36,7 @@ import FloatOut         ( floatOutwards ) import FamInstEnv import Id-import ErrUtils         ( withTiming )+import ErrUtils         ( withTiming, withTimingD ) import BasicTypes       ( CompilerPhase(..), isDefaultInlinePragma, defaultInlinePragma ) import VarSet import VarEnv@@ -72,13 +72,13 @@                                 , mg_loc     = loc                                 , mg_deps    = deps                                 , mg_rdr_env = rdr_env })-  = do { us <- mkSplitUniqSupply 's'-       -- make sure all plugins are loaded+  = do { -- make sure all plugins are loaded         ; let builtin_passes = getCoreToDo dflags              orph_mods = mkModuleSet (mod : dep_orphs deps)+             uniq_mask = 's'        ;-       ; (guts2, stats) <- runCoreM hsc_env hpt_rule_base us mod+       ; (guts2, stats) <- runCoreM hsc_env hpt_rule_base uniq_mask mod                                     orph_mods print_unqual loc $                            do { hsc_env' <- getHscEnv                               ; dflags' <- liftIO $ initializePlugins hsc_env'@@ -339,7 +339,7 @@         -- really really one-shot thunks. Only needed if the demand analyser         -- has run at all. See Note [Final Demand Analyser run] in DmdAnal         -- It is EXTREMELY IMPORTANT to run this pass, otherwise execution-        -- can become /exponentially/ more expensive. See Trac #11731, #12996.+        -- can become /exponentially/ more expensive. See #11731, #12996.         runWhen (strictness || late_dmd_anal) CoreDoStrictness,          maybe_rule_check (Phase 0)@@ -410,10 +410,9 @@   where     do_pass guts CoreDoNothing = return guts     do_pass guts (CoreDoPasses ps) = runCorePasses ps guts-    do_pass guts pass-       = withTiming getDynFlags-                    (ppr pass <+> brackets (ppr mod))-                    (const ()) $ do+    do_pass guts pass = do+       withTimingD (ppr pass <+> brackets (ppr mod))+                   (const ()) $ do             { guts' <- lintAnnots (ppr pass) (doCorePass pass) guts             ; endPass pass (mg_binds guts') (mg_rules guts')             ; return guts' }@@ -462,11 +461,7 @@ doCorePass CoreDoNothing                = return doCorePass (CoreDoPasses passes)        = runCorePasses passes -#if defined(GHCI) doCorePass (CoreDoPluginPass _ pass) = {-# SCC "Plugin" #-} pass-#else-doCorePass pass@CoreDoPluginPass {}  = pprPanic "doCorePass" (ppr pass)-#endif  doCorePass pass@CoreDesugar          = pprPanic "doCorePass" (ppr pass) doCorePass pass@CoreDesugarOpt       = pprPanic "doCorePass" (ppr pass)@@ -488,9 +483,8 @@  ruleCheckPass :: CompilerPhase -> String -> ModGuts -> CoreM ModGuts ruleCheckPass current_phase pat guts =-    withTiming getDynFlags-               (text "RuleCheck"<+>brackets (ppr $ mg_module guts))-               (const ()) $ do+    withTimingD (text "RuleCheck"<+>brackets (ppr $ mg_module guts))+                (const ()) $ do     { rb <- getRuleBase     ; dflags <- getDynFlags     ; vis_orphs <- getVisibleOrphanMods@@ -568,7 +562,7 @@ -- -- Also used by Template Haskell simplifyExpr dflags expr-  = withTiming (pure dflags) (text "Simplify [expr]") (const ()) $+  = withTiming dflags (text "Simplify [expr]") (const ()) $     do  {         ; us <-  mkSplitUniqSupply 's' 
simplCore/SimplEnv.hs view
@@ -69,7 +69,7 @@ import Util import UniqFM                   ( pprUniqFM ) -import Data.List+import Data.List (mapAccumL)  {- ************************************************************************@@ -667,7 +667,9 @@          -- Get the most up-to-date thing from the in-scope set         -- Even though it isn't in the substitution, it may be in-        -- the in-scope set with better IdInfo+        -- the in-scope set with better IdInfo.+        --+        -- See also Note [In-scope set as a substitution] in Simplify.  refineFromInScope :: InScopeSet -> Var -> Var refineFromInScope in_scope v
simplCore/SimplMonad.hs view
@@ -4,6 +4,7 @@ \section[SimplMonad]{The simplifier Monad} -} +{-# LANGUAGE DeriveFunctor #-} module SimplMonad (         -- The monad         SimplM,@@ -21,7 +22,7 @@  import GhcPrelude -import Var              ( Var, isTyVar, mkLocalVar )+import Var              ( Var, isId, mkLocalVar ) import Name             ( mkSystemVarName ) import Id               ( Id, mkSysLocalOrCoVar ) import IdInfo           ( IdDetails(..), vanillaIdInfo, setArityInfo )@@ -35,9 +36,10 @@ import FastString import MonadUtils import ErrUtils as Err-import Panic (throwGhcExceptionIO, GhcException (..))+import Util                ( count )+import Panic               (throwGhcExceptionIO, GhcException (..)) import BasicTypes          ( IntWithInf, treatZeroAsInf, mkIntWithInf )-import Control.Monad       ( liftM, ap )+import Control.Monad       ( ap )  {- ************************************************************************@@ -57,6 +59,7 @@                 -> SimplCount                 -> IO (result, UniqSupply, SimplCount)}   -- we only need IO here for dump output+    deriving (Functor)  data SimplTopEnv   = STE { st_flags     :: DynFlags@@ -97,16 +100,13 @@         -- MAGIC NUMBER, multiplies the simplTickFactor         -- We can afford to be generous; this is really         -- just checking for loops, and shouldn't usually fire-        -- A figure of 20 was too small: see Trac #5539.+        -- A figure of 20 was too small: see #5539.  {-# INLINE thenSmpl #-} {-# INLINE thenSmpl_ #-} {-# INLINE returnSmpl #-}  -instance Functor SimplM where-    fmap = liftM- instance Applicative SimplM where     pure  = returnSmpl     (<*>) = ap@@ -187,7 +187,8 @@   = do { uniq <- getUniqueM        ; let name       = mkSystemVarName uniq (fsLit "$j")              join_id_ty = mkLamTypes bndrs body_ty  -- Note [Funky mkLamTypes]-             arity      = length (filter (not . isTyVar) bndrs)+             arity      = count isId bndrs+             -- arity: See Note [Invariants on join points] invariant 2b, in CoreSyn              join_arity = length bndrs              details    = JoinId join_arity              id_info    = vanillaIdInfo `setArityInfo` arity
simplCore/SimplUtils.hs view
@@ -46,6 +46,7 @@ import CoreSyn import qualified CoreSubst import PprCore+import TyCoPpr          ( pprParendType ) import CoreFVs import CoreUtils import CoreArity@@ -412,8 +413,8 @@ contHoleType (StrictArg { sc_fun = ai })      = funArgTy (ai_type ai) contHoleType (ApplyToTy  { sc_hole_ty = ty }) = ty  -- See Note [The hole type in ApplyToTy] contHoleType (ApplyToVal { sc_arg = e, sc_env = se, sc_dup = dup, sc_cont = k })-  = mkFunTy (perhapsSubstTy dup se (exprType e))-            (contHoleType k)+  = mkVisFunTy (perhapsSubstTy dup se (exprType e))+               (contHoleType k) contHoleType (Select { sc_dup = d, sc_bndr =  b, sc_env = se })   = perhapsSubstTy d se (idType b) @@ -542,7 +543,7 @@  Note [Do not expose strictness if sm_inline=False] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Trac #15163 showed a case in which we had+#15163 showed a case in which we had    {-# INLINE [1] zip #-}   zip = undefined@@ -708,7 +709,7 @@ exprIsHNF.  Before 2009 we said it was interesting if the argument had *any* structure-at all; i.e. (hasSomeUnfolding v).  But does too much inlining; see Trac #3016.+at all; i.e. (hasSomeUnfolding v).  But does too much inlining; see #3016.  But we don't regard (f x y) as interesting, unless f is unsaturated. If it's saturated and f hasn't inlined, then it's probably not going@@ -822,12 +823,12 @@ of other RULES.  Doing anything to the LHS is plain confusing, because it means that what the-rule matches is not what the user wrote. c.f. Trac #10595, and #10528.+rule matches is not what the user wrote. c.f. #10595, and #10528. Moreover, inlining (or applying rules) on rule LHSs risks introducing-Ticks into the LHS, which makes matching trickier. Trac #10665, #10745.+Ticks into the LHS, which makes matching trickier. #10665, #10745.  Doing this to either side confounds tools like HERMIT, which seek to reason-about and apply the RULES as originally written. See Trac #10829.+about and apply the RULES as originally written. See #10829.  Note [No eta expansion in stable unfoldings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -844,7 +845,7 @@   --    = (/\a \(d:Ord a) (x:a) (eta:State#). bla eta) |> co  because not specialisation of the overloading doesn't work properly-(see Note [Specialisation shape] in Specialise), Trac #9509.+(see Note [Specialisation shape] in Specialise), #9509.  So we disable eta-expansion in stable unfoldings. @@ -1109,7 +1110,7 @@ at each of fInt's call sites.  The INLINE pragma will only inline when the application is saturated for exactly this reason; and we don't want PreInlineUnconditionally to second-guess it.  A live example is-Trac #3736.+#3736.     c.f. Note [Stable unfoldings and postInlineUnconditionally]  NB: if the pragma is INLINEABLE, then we don't want to behave in@@ -1508,7 +1509,7 @@                 -> SimplM (Arity, Bool, OutExpr) -- See Note [Eta-expanding at let bindings] -- If tryEtaExpandRhs rhs = (n, is_bot, rhs') then---   (a) rhs' has manifest arity+--   (a) rhs' has manifest arity n --   (b) if is_bot is True then rhs' applied to n args is guaranteed bottom tryEtaExpandRhs mode bndr rhs   | Just join_arity <- isJoinId_maybe bndr@@ -1516,7 +1517,8 @@        ; return (count isId join_bndrs, exprIsBottom join_body, rhs) }          -- Note [Do not eta-expand join points]          -- But do return the correct arity and bottom-ness, because-         -- these are used to set the bndr's IdInfo (Trac #15517)+         -- these are used to set the bndr's IdInfo (#15517)+         -- Note [Invariants on join points] invariant 2b, in CoreSyn    | otherwise   = do { (new_arity, is_bot, new_rhs) <- try_expand@@ -1614,7 +1616,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We used to have old_arity = manifestArity rhs, which meant that we would eta-expand even PAPs.  But this gives no particular advantage,-and can lead to a massive blow-up in code size, exhibited by Trac #9020.+and can lead to a massive blow-up in code size, exhibited by #9020. Suppose we have a PAP     foo :: IO ()     foo = returnIO ()@@ -1731,7 +1733,7 @@          poly_t = /\ a b -> (e1, e2)          poly_x = /\ a   -> fst (poly_t a *b*) -  * We must do closeOverKinds.  Example (Trac #10934):+  * We must do closeOverKinds.  Example (#10934):        f = /\k (f:k->*) (a:k). let t = AccFailure @ (f a) in ...     Here we want to float 't', but we must remember to abstract over     'k' as well, even though it is not explicitly mentioned in the RHS,@@ -2204,8 +2206,10 @@            ; return (ex_tvs ++ arg_ids) }     mk_new_bndrs _ _ = return [] -    re_sort :: [CoreAlt] -> [CoreAlt]  -- Re-sort the alternatives to-    re_sort alts = sortBy cmpAlt alts  -- preserve the #case_invariants#+    re_sort :: [CoreAlt] -> [CoreAlt]+    -- Sort the alternatives to re-establish+    -- CoreSyn Note [Case expression invariants]+    re_sort alts = sortBy cmpAlt alts      add_default :: [CoreAlt] -> [CoreAlt]     -- See Note [Literal cases]
simplCore/Simplify.hs view
@@ -22,7 +22,8 @@ import Literal          ( litIsLifted ) --, mkLitInt ) -- temporalily commented out. See #8326 import Id import MkId             ( seqId )-import MkCore           ( mkImpossibleExpr, castBottomExpr )+import MkCore           ( FloatBind, mkImpossibleExpr, castBottomExpr )+import qualified MkCore as MkCore import IdInfo import Name             ( mkSystemVarName, isExternalName, getOccFS ) import Coercion hiding  ( substCo, substCoVar )@@ -40,7 +41,7 @@ import CoreOpt          ( pushCoTyArg, pushCoValArg                         , joinPointBinding_maybe, joinPointBindings_maybe ) import Rules            ( mkRuleInfo, lookupRule, getRules )-import Demand           ( mkClosedStrictSig, topDmd, exnRes )+import Demand           ( mkClosedStrictSig, topDmd, botRes ) import BasicTypes       ( TopLevelFlag(..), isNotTopLevel, isTopLevel,                           RecFlag(..), Arity ) import MonadUtils       ( mapAccumLM, liftIO )@@ -117,6 +118,40 @@ we should eta expand wherever we find a (value) lambda?  Then the eta expansion at a let RHS can concentrate solely on the PAP case. +Note [In-scope set as a substitution]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As per Note [Lookups in in-scope set], an in-scope set can act as+a substitution. Specifically, it acts as a substitution from variable to+variables /with the same unique/.++Why do we need this? Well, during the course of the simplifier, we may want to+adjust inessential properties of a variable. For instance, when performing a+beta-reduction, we change++    (\x. e) u ==> let x = u in e++We typically want to add an unfolding to `x` so that it inlines to (the+simplification of) `u`.++We do that by adding the unfolding to the binder `x`, which is added to the+in-scope set. When simplifying occurrences of `x` (every occurrence!), they are+replaced by their “updated” version from the in-scope set, hence inherit the+unfolding. This happens in `SimplEnv.substId`.++Another example. Consider++   case x of y { Node a b -> ...y...+               ; Leaf v   -> ...y... }++In the Node branch want y's unfolding to be (Node a b); in the Leaf branch we+want y's unfolding to be (Leaf v). We achieve this by adding the appropriate+unfolding to y, and re-adding it to the in-scope set. See the calls to+`addBinderUnfolding` in `Simplify.addAltUnfoldings` and elsewhere.++It's quite convenient. This way we don't need to manipulate the substitution all+the time: every update to a binder is automatically reflected to its bound+occurrences.+ ************************************************************************ *                                                                      * \subsection{Bindings}@@ -658,6 +693,7 @@                                            final_rhs (idType new_bndr) old_unf        ; let final_bndr = addLetBndrInfo new_bndr new_arity is_bot new_unfolding+        -- See Note [In-scope set as a substitution]        ; if postInlineUnconditionally env top_lvl final_bndr occ_info final_rhs @@ -695,7 +731,7 @@      -- Bottoming bindings: see Note [Bottoming bindings]     info4 | is_bot    = info3 `setStrictnessInfo`-                        mkClosedStrictSig (replicate new_arity topDmd) exnRes+                        mkClosedStrictSig (replicate new_arity topDmd) botRes           | otherwise = info3       -- Zap call arity info. We have used it by now (via@@ -745,7 +781,7 @@ does a simple bottoming-expression analysis.  So all we need to do is propagate that info to the binder's IdInfo. -This showed up in Trac #12150; see comment:16.+This showed up in #12150; see comment:16.  Note [Setting the demand info] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1217,7 +1253,7 @@ {- Note [Optimising reflexivity] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's important (for compiler performance) to get rid of reflexivity as soon-as it appears.  See Trac #11735, #14737, and #15019.+as it appears.  See #11735, #14737, and #15019.  In particular, we want to behave well on @@ -1231,7 +1267,7 @@    build up NthCo stacks.  Silly to do that if co is reflexive.  However, we don't want to call isReflexiveCo too much, because it uses-type equality which is expensive on big types (Trac #14737 comment:7).+type equality which is expensive on big types (#14737 comment:7).  A good compromise (determined experimentally) seems to be to call isReflexiveCo@@ -1239,7 +1275,7 @@  * at the end  In investigating this I saw missed opportunities for on-the-fly-coercion shrinkage. See Trac #15090.+coercion shrinkage. See #15090. -}  @@ -1268,7 +1304,11 @@          addCoerce co cont@(ApplyToTy { sc_arg_ty = arg_ty, sc_cont = tail })           | Just (arg_ty', m_co') <- pushCoTyArg co arg_ty-          , Pair hole_ty _ <- coercionKind co+            -- N.B. As mentioned in Note [The hole type in ApplyToTy] this is+            -- only needed by `sc_hole_ty` which is often not forced.+            -- Consequently it is worthwhile using a lazy pattern match here to+            -- avoid unnecessary coercionKind evaluations.+          , ~(Pair hole_ty _) <- coercionKind co           = {-#SCC "addCoerce-pushCoTyArg" #-}             do { tail' <- addCoerceM m_co' tail                ; return (cont { sc_arg_ty  = arg_ty'@@ -1295,7 +1335,7 @@                     -- 'co' with the InExpr 'arg', so we simplify                     -- to make it all consistent.  It's a bit messy.                     -- But it isn't a common case.-                    -- Example of use: Trac #995+                    -- Example of use: #995                ; return (ApplyToVal { sc_arg  = mkCast arg' co1                                     , sc_env  = arg_se'                                     , sc_dup  = dup'@@ -1527,7 +1567,7 @@ simplifying the right-hand side, so we remember whether or not it is a join point, and what 'cont' is, in a value of type MaybeJoinCont -Trac #13900 wsa caused by forgetting to push 'cont' into the RHS+#13900 wsa caused by forgetting to push 'cont' into the RHS of a SpecConstr-generated RULE for a join point. -} @@ -2050,11 +2090,16 @@     no_cast_scrut = drop_casts scrut     scrut_ty  = exprType no_cast_scrut     seq_id_ty = idType seqId+    res1_ty   = piResultTy seq_id_ty rhs_rep+    res2_ty   = piResultTy res1_ty   scrut_ty     rhs_ty    = substTy in_env (exprType rhs)-    out_args  = [ TyArg { as_arg_ty  = scrut_ty+    rhs_rep   = getRuntimeRep rhs_ty+    out_args  = [ TyArg { as_arg_ty  = rhs_rep                         , as_hole_ty = seq_id_ty }+                , TyArg { as_arg_ty  = scrut_ty+                        , as_hole_ty = res1_ty }                 , TyArg { as_arg_ty  = rhs_ty-                       , as_hole_ty  = piResultTy seq_id_ty scrut_ty }+                        , as_hole_ty = res2_ty }                 , ValArg no_cast_scrut]     rule_cont = ApplyToVal { sc_dup = NoDup, sc_arg = rhs                            , sc_env = in_env, sc_cont = cont }@@ -2272,7 +2317,7 @@ This is a Good Thing, because 'r' might be dead (if the body just calls error), or might be used just once (in which case it can be inlined); or we might be able to float the let-binding up or down.-E.g. Trac #15631 has an example.+E.g. #15631 has an example.  Note that this can change the error behaviour.  For example, we might transform@@ -2283,7 +2328,7 @@  Nevertheless, the paper "A semantics for imprecise exceptions" allows this transformation. If you want to fix the evaluation order, use-'pseq'.  See Trac #8900 for an example where the loss of this+'pseq'.  See #8900 for an example where the loss of this transformation bit us in practice.  See also Note [Empty case alternatives] in CoreSyn.@@ -2301,7 +2346,7 @@     scrut_is_demanded_var _          = False    This only fired if the scrutinee was a /variable/, which seems-  an unnecessary restriction. So in Trac #15631 I relaxed it to allow+  an unnecessary restriction. So in #15631 I relaxed it to allow   arbitrary scrutinees.  Less code, less to explain -- but the change   had 0.00% effect on nofib. @@ -2316,7 +2361,7 @@     case_bndr_evald_next (Case e _ _ _)  = case_bndr_evald_next e     case_bndr_evald_next _               = False -  This patch was part of fixing Trac #7542. See also+  This patch was part of fixing #7542. See also   Note [Eta reduction of an eval'd function] in CoreUtils.)  @@ -2358,6 +2403,26 @@ wrong to drop even unnecessary evaluations, and in practice they may be a result of 'seq' so we *definitely* don't want to drop those. I don't really know how to improve this situation.+++Note [FloatBinds from constructor wrappers]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we have FloatBinds coming from the constructor wrapper+(as in Note [exprIsConApp_maybe on data constructors with wrappers]),+ew cannot float past them. We'd need to float the FloatBind+together with the simplify floats, unfortunately the+simplifier doesn't have case-floats. The simplest thing we can+do is to wrap all the floats here. The next iteration of the+simplifier will take care of all these cases and lets.++Given data T = MkT !Bool, this allows us to simplify+case $WMkT b of { MkT x -> f x }+to+case b of { b' -> f b' }.++We could try and be more clever (like maybe wfloats only contain+let binders, so we could float them). But the need for the+extra complication is not clear. -}  ---------------------------------------------------------@@ -2367,7 +2432,7 @@    :: SimplEnv    -> OutExpr          -- Scrutinee    -> InId             -- Case binder-   -> [InAlt]          -- Alternatives (inceasing order)+   -> [InAlt]          -- Alternatives (increasing order)    -> SimplCont    -> SimplM (SimplFloats, OutExpr) @@ -2382,25 +2447,37 @@   = do  { tick (KnownBranch case_bndr)         ; case findAlt (LitAlt lit) alts of             Nothing           -> missingAlt env case_bndr alts cont-            Just (_, bs, rhs) -> simple_rhs bs rhs }+            Just (_, bs, rhs) -> simple_rhs env [] scrut bs rhs } -  | Just (con, ty_args, other_args) <- exprIsConApp_maybe (getUnfoldingInRuleMatch env) scrut+  | Just (in_scope', wfloats, con, ty_args, other_args)+      <- exprIsConApp_maybe (getUnfoldingInRuleMatch env) scrut         -- Works when the scrutinee is a variable with a known unfolding         -- as well as when it's an explicit constructor application+  , let env0 = setInScopeSet env in_scope'   = do  { tick (KnownBranch case_bndr)         ; case findAlt (DataAlt con) alts of-            Nothing  -> missingAlt env case_bndr alts cont-            Just (DEFAULT, bs, rhs) -> simple_rhs bs rhs-            Just (_, bs, rhs)       -> knownCon env scrut con ty_args other_args+            Nothing  -> missingAlt env0 case_bndr alts cont+            Just (DEFAULT, bs, rhs) -> let con_app = Var (dataConWorkId con)+                                                 `mkTyApps` ty_args+                                                 `mkApps`   other_args+                                       in simple_rhs env0 wfloats con_app bs rhs+            Just (_, bs, rhs)       -> knownCon env0 scrut wfloats con ty_args other_args                                                 case_bndr bs rhs cont         }   where-    simple_rhs bs rhs = ASSERT( null bs )-                        do { (floats1, env') <- simplNonRecX env case_bndr scrut-                               -- scrut is a constructor application,-                               -- hence satisfies let/app invariant-                           ; (floats2, expr') <- simplExprF env' rhs cont-                           ; return (floats1 `addFloats` floats2, expr') }+    simple_rhs env wfloats scrut' bs rhs =+      ASSERT( null bs )+      do { (floats1, env') <- simplNonRecX env case_bndr scrut'+             -- scrut is a constructor application,+             -- hence satisfies let/app invariant+         ; (floats2, expr') <- simplExprF env' rhs cont+         ; case wfloats of+             [] -> return (floats1 `addFloats` floats2, expr')+             _ -> return+               -- See Note [FloatBinds from constructor wrappers]+                   ( emptyFloats env,+                     MkCore.wrapFloats wfloats $+                     wrapFloats (floats1 `addFloats` floats2) expr' )}   --------------------------------------------------@@ -2533,7 +2610,7 @@ so that 'rhs' can take advantage of the form of x'.  Notice that Note [Case of cast] (in OccurAnal) may then apply to the result. -We'd also like to eliminate empty types (Trac #13468). So if+We'd also like to eliminate empty types (#13468). So if      data Void     type instance F Bool = Void@@ -2669,7 +2746,7 @@  In addition to handling data constructor fields with !s, addEvals also records the fact that the result of seq# is always in WHNF.-See Note [seq# magic] in PrelRules.  Example (Trac #15226):+See Note [seq# magic] in PrelRules.  Example (#15226):    case seq# v s of     (# s', v' #) -> E@@ -2678,7 +2755,7 @@  Open problem: we don't record that v itself is in WHNF (and we can't do it here).  The right thing is to do some kind of binder-swap;-see Trac #15226 for discussion.+see #15226 for discussion. -}  addEvals :: Maybe OutExpr -> DataCon -> [Id] -> [Id]@@ -2770,7 +2847,7 @@ reallyUnsafePtrEq#, which it is.  But we still want that to be true if we propagate binders to occurrences. -This showed up in Trac #13027.+This showed up in #13027.  Note [Add unfolding for scrutinee] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2828,17 +2905,24 @@ -}  knownCon :: SimplEnv-         -> OutExpr                             -- The scrutinee-         -> DataCon -> [OutType] -> [OutExpr]   -- The scrutinee (in pieces)-         -> InId -> [InBndr] -> InExpr          -- The alternative+         -> OutExpr                                           -- The scrutinee+         -> [FloatBind] -> DataCon -> [OutType] -> [OutExpr]  -- The scrutinee (in pieces)+         -> InId -> [InBndr] -> InExpr                        -- The alternative          -> SimplCont          -> SimplM (SimplFloats, OutExpr) -knownCon env scrut dc dc_ty_args dc_args bndr bs rhs cont+knownCon env scrut dc_floats dc dc_ty_args dc_args bndr bs rhs cont   = do  { (floats1, env1)  <- bind_args env bs dc_args         ; (floats2, env2) <- bind_case_bndr env1         ; (floats3, expr') <- simplExprF env2 rhs cont-        ; return (floats1 `addFloats` floats2 `addFloats` floats3, expr') }+        ; case dc_floats of+            [] ->+              return (floats1 `addFloats` floats2 `addFloats` floats3, expr')+            _ ->+              return ( emptyFloats env+               -- See Note [FloatBinds from constructor wrappers]+                     , MkCore.wrapFloats dc_floats $+                       wrapFloats (floats1 `addFloats` floats2 `addFloats` floats3) expr') }   where     zap_occ = zapBndrOccInfo (isDeadBinder bndr)    -- bndr is an InId @@ -2939,7 +3023,7 @@        of alts then we can just duplicate those alts because the A and C cases will disappear immediately.  This is more direct than creating-join points and inlining them away.  See Trac #4930.+join points and inlining them away.  See #4930. -}  --------------------@@ -3172,7 +3256,7 @@ This is just what we want because the rn produces a box that the case rn cancels with. -See Trac #4957 a fuller example.+See #4957 a fuller example.  Note [Case binders and join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -3270,7 +3354,7 @@ Now if the thing in the hole is a case expression (which is when we'll call mkDupableCont), we'll push the function call into the branches, which is what we want.  Now RULES for f may fire, and-call-pattern specialisation.  Here's an example from Trac #3116+call-pattern specialisation.  Here's an example from #3116      go (n+1) (case l of                  1  -> bs'                  _  -> Chunk p fpc (o+1) (l-1) bs')@@ -3453,7 +3537,7 @@                         -- has got small. This happens, notably in the inlinings                         -- for dfuns for single-method classes; see                         -- Note [Single-method classes] in TcInstDcls.-                        -- A test case is Trac #4138+                        -- A test case is #4138                         -- But retain a previous boring_ok of True; e.g. see                         -- the way it is set in calcUnfoldingGuidanceWithArity                         in return (mkCoreUnfolding src is_top_lvl expr' guide')
simplStg/RepType.hs view
@@ -108,7 +108,7 @@ countFunRepArgs 0 _   = 0 countFunRepArgs n ty-  | FunTy arg res <- unwrapType ty+  | FunTy _ arg res <- unwrapType ty   = length (typePrimRepArgs arg) + countFunRepArgs (n - 1) res   | otherwise   = pprPanic "countFunRepArgs: arity greater than type can handle" (ppr (n, ty, typePrimRep ty))@@ -120,7 +120,7 @@     go 0 _       = 0     go n ty-      | FunTy arg res <- unwrapType ty+      | FunTy _ arg res <- unwrapType ty       = length (typePrimRep arg) + go (n - 1) res       | otherwise       = pprPanic "countConRepArgs: arity greater than type can handle" (ppr (n, ty, typePrimRep ty))@@ -260,10 +260,12 @@ primRepSlot IntRep      = WordSlot primRepSlot Int8Rep     = WordSlot primRepSlot Int16Rep    = WordSlot+primRepSlot Int32Rep    = WordSlot primRepSlot Int64Rep    = Word64Slot primRepSlot WordRep     = WordSlot primRepSlot Word8Rep    = WordSlot primRepSlot Word16Rep   = WordSlot+primRepSlot Word32Rep   = WordSlot primRepSlot Word64Rep   = Word64Slot primRepSlot AddrRep     = WordSlot primRepSlot FloatRep    = FloatSlot@@ -305,18 +307,175 @@ *                                                                       *                    PrimRep *                                                                       *-********************************************************************** -}+************************************************************************* +Note [RuntimeRep and PrimRep]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This Note describes the relationship between GHC.Types.RuntimeRep+(of levity-polymorphism fame) and TyCon.PrimRep, as these types+are closely related.++A "primitive entity" is one that can be+ * stored in one register+ * manipulated with one machine instruction+++Examples include:+ * a 32-bit integer+ * a 32-bit float+ * a 64-bit float+ * a machine address (heap pointer), etc.+ * a quad-float (on a machine with SIMD register and instructions)+ * ...etc...++The "representation or a primitive entity" specifies what kind of register is+needed and how many bits are required. The data type TyCon.PrimRep+enumerates all the possiblities.++data PrimRep+  = VoidRep+  | LiftedRep     -- ^ Lifted pointer+  | UnliftedRep   -- ^ Unlifted pointer+  | Int8Rep       -- ^ Signed, 8-bit value+  | Int16Rep      -- ^ Signed, 16-bit value+  ...etc...+  | VecRep Int PrimElemRep  -- ^ SIMD fixed-width vector++The Haskell source language is a bit more flexible: a single value may need multiple PrimReps.+For example++  utup :: (# Int, Int #) -> Bool+  utup x = ...++Here x :: (# Int, Int #), and that takes two registers, and two instructions to move around.+Unboxed sums are similar.++Every Haskell expression e has a type ty, whose kind is of form TYPE rep+   e :: ty :: TYPE rep+where rep :: RuntimeRep. Here rep describes the runtime representation for e's value,+but RuntimeRep has some extra cases:++data RuntimeRep = VecRep VecCount VecElem   -- ^ a SIMD vector type+                | TupleRep [RuntimeRep]     -- ^ An unboxed tuple of the given reps+                | SumRep [RuntimeRep]       -- ^ An unboxed sum of the given reps+                | LiftedRep       -- ^ lifted; represented by a pointer+                | UnliftedRep     -- ^ unlifted; represented by a pointer+                | IntRep          -- ^ signed, word-sized value+                ...etc...++It's all in 1-1 correspondence with PrimRep except for TupleRep and SumRep,+which describe unboxed products and sums respectively. RuntimeRep is defined+in the library ghc-prim:GHC.Types. It is also "wired-in" to GHC: see+TysWiredIn.runtimeRepTyCon. The unarisation pass, in StgUnarise, transforms the+program, so that that every variable has a type that has a PrimRep. For+example, unarisation transforms our utup function above, to take two Int+arguments instead of one (# Int, Int #) argument.++See also Note [Getting from RuntimeRep to PrimRep] and Note [VoidRep].++Note [VoidRep]+~~~~~~~~~~~~~~+PrimRep contains a constructor VoidRep, while RuntimeRep does+not. Yet representations are often characterised by a list of PrimReps,+where a void would be denoted as []. (See also Note [RuntimeRep and PrimRep].)++However, after the unariser, all identifiers have exactly one PrimRep, but+void arguments still exist. Thus, PrimRep includes VoidRep to describe these+binders. Perhaps post-unariser representations (which need VoidRep) should be+a different type than pre-unariser representations (which use a list and do+not need VoidRep), but we have what we have.++RuntimeRep instead uses TupleRep '[] to denote a void argument. When+converting a TupleRep '[] into a list of PrimReps, we get an empty list.++Note [Getting from RuntimeRep to PrimRep]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+General info on RuntimeRep and PrimRep is in Note [RuntimeRep and PrimRep].++How do we get from an Id to the the list or PrimReps used to store it? We get+the Id's type ty (using idType), then ty's kind ki (using typeKind), then+pattern-match on ki to extract rep (in kindPrimRep), then extract the PrimRep+from the RuntimeRep (in runtimeRepPrimRep).++We now must convert the RuntimeRep to a list of PrimReps. Let's look at two+examples:++  1. x :: Int#+  2. y :: (# Int, Word# #)++With these types, we can extract these kinds:++  1. Int# :: TYPE IntRep+  2. (# Int, Word# #) :: TYPE (TupleRep [LiftedRep, WordRep])++In the end, we will get these PrimReps:++  1. [IntRep]+  2. [LiftedRep, WordRep]++It would thus seem that we should have a function somewhere of+type `RuntimeRep -> [PrimRep]`. This doesn't work though: when we+look at the argument of TYPE, we get something of type Type (of course).+RuntimeRep exists in the user's program, but not in GHC as such.+Instead, we must decompose the Type of kind RuntimeRep into tycons and+extract the PrimReps from the TyCons. This is what runtimeRepPrimRep does:+it takes a Type and returns a [PrimRep]++runtimeRepPrimRep works by using tyConRuntimeRepInfo. That function+should be passed the TyCon produced by promoting one of the constructors+of RuntimeRep into type-level data. The RuntimeRep promoted datacons are+associated with a RuntimeRepInfo (stored directly in the PromotedDataCon+constructor of TyCon). This pairing happens in TysWiredIn. A RuntimeRepInfo+usually(*) contains a function from [Type] to [PrimRep]: the [Type] are+the arguments to the promoted datacon. These arguments are necessary+for the TupleRep and SumRep constructors, so that this process can recur,+producing a flattened list of PrimReps. Calling this extracted function+happens in runtimeRepPrimRep; the functions themselves are defined in+tupleRepDataCon and sumRepDataCon, both in TysWiredIn.++The (*) above is to support vector representations. RuntimeRep refers+to VecCount and VecElem, whose promoted datacons have nuggets of information+related to vectors; these form the other alternatives for RuntimeRepInfo.++Returning to our examples, the Types we get (after stripping off TYPE) are++  1. TyConApp (PromotedDataCon "IntRep") []+  2. TyConApp (PromotedDataCon "TupleRep")+              [TyConApp (PromotedDataCon ":")+                        [ TyConApp (AlgTyCon "RuntimeRep") []+                        , TyConApp (PromotedDataCon "LiftedRep") []+                        , TyConApp (PromotedDataCon ":")+                                   [ TyConApp (AlgTyCon "RuntimeRep") []+                                   , TyConApp (PromotedDataCon "WordRep") []+                                   , TyConApp (PromotedDataCon "'[]")+                                              [TyConApp (AlgTyCon "RuntimeRep") []]]]]++runtimeRepPrimRep calls tyConRuntimeRepInfo on (PromotedDataCon "IntRep"), resp.+(PromotedDataCon "TupleRep"), extracting a function that will produce the PrimReps.+In example 1, this function is passed an empty list (the empty list of args to IntRep)+and returns the PrimRep IntRep. (See the definition of runtimeRepSimpleDataCons in+TysWiredIn and its helper function mk_runtime_rep_dc.) Example 2 passes the promoted+list as the one argument to the extracted function. The extracted function is defined+as prim_rep_fun within tupleRepDataCon in TysWiredIn. It takes one argument, decomposes+the promoted list (with extractPromotedList), and then recurs back to runtimeRepPrimRep+to process the LiftedRep and WordRep, concatentating the results.++-}+ -- | Discovers the primitive representation of a 'Type'. Returns -- a list of 'PrimRep': it's a list because of the possibility of -- no runtime representation (void) or multiple (unboxed tuple/sum)+-- See also Note [Getting from RuntimeRep to PrimRep] typePrimRep :: HasDebugCallStack => Type -> [PrimRep] typePrimRep ty = kindPrimRep (text "typePrimRep" <+>                               parens (ppr ty <+> dcolon <+> ppr (typeKind ty)))                              (typeKind ty)  -- | Like 'typePrimRep', but assumes that there is precisely one 'PrimRep' output;--- an empty list of PrimReps becomes a VoidRep+-- an empty list of PrimReps becomes a VoidRep.+-- This assumption holds after unarise, see Note [Post-unarisation invariants].+-- Before unarise it may or may not hold.+-- See also Note [RuntimeRep and PrimRep] and Note [VoidRep] typePrimRep1 :: HasDebugCallStack => UnaryType -> PrimRep typePrimRep1 ty = case typePrimRep ty of   []    -> VoidRep@@ -325,6 +484,7 @@  -- | Find the runtime representation of a 'TyCon'. Defined here to -- avoid module loops. Returns a list of the register shapes necessary.+-- See also Note [Getting from RuntimeRep to PrimRep] tyConPrimRep :: HasDebugCallStack => TyCon -> [PrimRep] tyConPrimRep tc   = kindPrimRep (text "kindRep tc" <+> ppr tc $$ ppr res_kind)@@ -334,6 +494,7 @@  -- | Like 'tyConPrimRep', but assumed that there is precisely zero or -- one 'PrimRep' output+-- See also Note [Getting from RuntimeRep to PrimRep] and Note [VoidRep] tyConPrimRep1 :: HasDebugCallStack => TyCon -> PrimRep tyConPrimRep1 tc = case tyConPrimRep tc of   []    -> VoidRep@@ -342,6 +503,7 @@  -- | Take a kind (of shape @TYPE rr@) and produce the 'PrimRep's -- of values of types of this kind.+-- See also Note [Getting from RuntimeRep to PrimRep] kindPrimRep :: HasDebugCallStack => SDoc -> Kind -> [PrimRep] kindPrimRep doc ki   | Just ki' <- coreView ki@@ -353,7 +515,7 @@   = pprPanic "kindPrimRep" (ppr ki $$ doc)  -- | Take a type of kind RuntimeRep and extract the list of 'PrimRep' that--- it encodes.+-- it encodes. See also Note [Getting from RuntimeRep to PrimRep] runtimeRepPrimRep :: HasDebugCallStack => SDoc -> Type -> [PrimRep] runtimeRepPrimRep doc rr_ty   | Just rr_ty' <- coreView rr_ty@@ -366,5 +528,6 @@  -- | Convert a PrimRep back to a Type. Used only in the unariser to give types -- to fresh Ids. Really, only the type's representation matters.+-- See also Note [RuntimeRep and PrimRep] primRepToType :: PrimRep -> Type primRepToType = anyTypeOfKind . tYPE . primRepToRuntimeRep
simplStg/SimplStg.hs view
@@ -32,15 +32,17 @@ import Control.Monad.IO.Class import Control.Monad.Trans.State.Strict -newtype StgM a = StgM { _unStgM :: StateT UniqSupply IO a }+newtype StgM a = StgM { _unStgM :: StateT Char IO a }   deriving (Functor, Applicative, Monad, MonadIO)  instance MonadUnique StgM where-  getUniqueSupplyM = StgM (state splitUniqSupply)-  getUniqueM = StgM (state takeUniqFromSupply)+  getUniqueSupplyM = StgM $ do { mask <- get+                               ; liftIO $! mkSplitUniqSupply mask}+  getUniqueM = StgM $ do { mask <- get+                         ; liftIO $! uniqFromMask mask} -runStgM :: UniqSupply -> StgM a -> IO a-runStgM us (StgM m) = evalStateT m us+runStgM :: Char -> StgM a -> IO a+runStgM mask (StgM m) = evalStateT m mask  stg2stg :: DynFlags                  -- includes spec of what stg-to-stg passes to do         -> Module                    -- module being compiled@@ -48,22 +50,21 @@         -> IO [StgTopBinding]        -- output program  stg2stg dflags this_mod binds-  = do  { showPass dflags "Stg2Stg"-        ; us <- mkSplitUniqSupply 'g'-+  = do  { dump_when Opt_D_dump_stg "STG:" binds+        ; showPass dflags "Stg2Stg"         -- Do the main business!-        ; binds' <- runStgM us $+        ; binds' <- runStgM 'g' $             foldM do_stg_pass binds (getStgToDo dflags) -        ; dump_when Opt_D_dump_stg "STG syntax:" binds'+        ; dump_when Opt_D_dump_stg_final "Final STG:" binds'          ; return binds'    }    where-    stg_linter what+    stg_linter unarised       | gopt Opt_DoStgLinting dflags-      = lintStgTopBindings dflags this_mod what+      = lintStgTopBindings dflags this_mod unarised       | otherwise       = \ _whodunnit _binds -> return () @@ -87,10 +88,10 @@             end_pass "StgLiftLams" binds'            StgUnarise -> do-            liftIO (dump_when Opt_D_dump_stg "Pre unarise:" binds)             us <- getUniqueSupplyM             liftIO (stg_linter False "Pre-unarise" binds)             let binds' = unarise us binds+            liftIO (dump_when Opt_D_dump_stg_unarised "Unarised STG:" binds')             liftIO (stg_linter True "Unarise" binds')             return binds' 
simplStg/StgCse.hs view
@@ -78,7 +78,7 @@ These two terms are not equal as they unarise to different unboxed tuples. However if we run StgCse before Unarise, it'll think the two terms (# 1 | #) are equal, and replace one of these with a binder to-the other. That's bad -- Trac #15300.+the other. That's bad -- #15300.  Solution: do unarise first. @@ -245,8 +245,8 @@     new_id = uniqAway (ce_in_scope env) old_id     no_change = new_id == old_id     env' = env { ce_in_scope = ce_in_scope env `extendInScopeSet` new_id }-    new_env | no_change = env' { ce_subst = extendVarEnv (ce_subst env) old_id new_id }-            | otherwise = env'+    new_env | no_change = env'+            | otherwise = env' { ce_subst = extendVarEnv (ce_subst env) old_id new_id }  substBndrs :: CseEnv -> [InVar] -> (CseEnv, [OutVar]) substBndrs env bndrs = mapAccumL substBndr env bndrs
simplStg/StgLiftLams.hs view
@@ -17,8 +17,8 @@ -- Note [Late lambda lifting in STG] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- $note--- See also the <https://ghc.haskell.org/trac/ghc/wiki/LateLamLift wiki page>--- and Trac #9476.+-- See also the <https://gitlab.haskell.org/ghc/ghc/wikis/late-lam-lift wiki page>+-- and #9476. -- -- The basic idea behind lambda lifting is to turn locally defined functions -- into top-level functions. Free variables are then passed as additional
simplStg/StgLiftLams/Analysis.hs view
@@ -28,9 +28,9 @@ import Id import SMRep ( WordOff ) import StgSyn-import qualified StgCmmArgRep-import qualified StgCmmClosure-import qualified StgCmmLayout+import qualified GHC.StgToCmm.ArgRep  as StgToCmm.ArgRep+import qualified GHC.StgToCmm.Closure as StgToCmm.Closure+import qualified GHC.StgToCmm.Layout  as StgToCmm.Layout import Outputable import Util import VarSet@@ -81,7 +81,7 @@ --  "StgLiftLams.Analysis#clogro" and is what most of this module is ultimately --  concerned with. ----- There's a <https://ghc.haskell.org/trac/ghc/wiki/LateLamLift wiki page> with+-- There's a <https://gitlab.haskell.org/ghc/ghc/wikis/late-lam-lift wiki page> with -- some more background and history.  -- Note [Estimating closure growth]@@ -102,7 +102,7 @@ -- -- A more detailed treatment of computing closure growth, including examples, -- can be found in the paper referenced from the--- <https://ghc.haskell.org/trac/ghc/wiki/LateLamLift wiki page>.+-- <https://gitlab.haskell.org/ghc/ghc/wikis/late-lam-lift wiki page>.  llTrace :: String -> SDoc -> a -> a llTrace _ _ c = c@@ -447,7 +447,7 @@       -- to lift it       n_args         = length-        . StgCmmClosure.nonVoidIds -- void parameters don't appear in Cmm+        . StgToCmm.Closure.nonVoidIds -- void parameters don't appear in Cmm         . (dVarSetElems abs_ids ++)         . rhsLambdaBndrs       max_n_args@@ -484,26 +484,25 @@ -- | The size in words of a function closure closing over the given 'Id's, -- including the header. closureSize :: DynFlags -> [Id] -> WordOff-closureSize dflags ids = words+closureSize dflags ids = words + sTD_HDR_SIZE dflags+  -- We go through sTD_HDR_SIZE rather than fixedHdrSizeW so that we don't+  -- optimise differently when profiling is enabled.   where     (words, _, _)       -- Functions have a StdHeader (as opposed to ThunkHeader).-      -- Note that mkVirtHeadOffsets will account for profiling headers, so-      -- lifting decisions vary if we begin to profile stuff. Maybe we shouldn't-      -- do this or deactivate profiling in @dflags@?-      = StgCmmLayout.mkVirtHeapOffsets dflags StgCmmLayout.StdHeader-      . StgCmmClosure.addIdReps-      . StgCmmClosure.nonVoidIds+      = StgToCmm.Layout.mkVirtHeapOffsets dflags StgToCmm.Layout.StdHeader+      . StgToCmm.Closure.addIdReps+      . StgToCmm.Closure.nonVoidIds       $ ids  -- | The number of words a single 'Id' adds to a closure's size. -- Note that this can't handle unboxed tuples (which may still be present in -- let-no-escapes, even after Unarise), in which case--- @'StgCmmClosure.idPrimRep'@ will crash.+-- @'GHC.StgToCmm.Closure.idPrimRep'@ will crash. idClosureFootprint:: DynFlags -> Id -> WordOff idClosureFootprint dflags-  = StgCmmArgRep.argRepSizeW dflags-  . StgCmmArgRep.idArgRep+  = StgToCmm.ArgRep.argRepSizeW dflags+  . StgToCmm.ArgRep.idArgRep  -- | @closureGrowth expander sizer f fvs@ computes the closure growth in words -- as a result of lifting @f@ to top-level. If there was any growing closure
simplStg/StgLiftLams/Transformation.hs view
@@ -107,12 +107,12 @@ liftRhs Nothing (StgRhsClosure _ ccs upd infos body) = do   -- This RHS wasn't lifted.   withSubstBndrs (map binderInfoBndr infos) $ \bndrs' ->-    StgRhsClosure noExtSilent ccs upd bndrs' <$> liftExpr body+    StgRhsClosure noExtFieldSilent ccs upd bndrs' <$> liftExpr body liftRhs (Just former_fvs) (StgRhsClosure _ ccs upd infos body) = do   -- This RHS was lifted. Insert extra binders for @former_fvs@.   withSubstBndrs (map binderInfoBndr infos) $ \bndrs' -> do     let bndrs'' = dVarSetElems former_fvs ++ bndrs'-    StgRhsClosure noExtSilent ccs upd bndrs'' <$> liftExpr body+    StgRhsClosure noExtFieldSilent ccs upd bndrs'' <$> liftExpr body  liftArgs :: InStgArg -> LiftM OutStgArg liftArgs a@(StgLitArg _) = pure a@@ -142,13 +142,13 @@       body' <- liftExpr body       case mb_bind' of         Nothing -> pure body' -- withLiftedBindPairs decided to lift it and already added floats-        Just bind' -> pure (StgLet noExtSilent bind' body')+        Just bind' -> pure (StgLet noExtFieldSilent bind' body') liftExpr (StgLetNoEscape scope bind body)   = withLiftedBind NotTopLevel bind scope $ \mb_bind' -> do       body' <- liftExpr body       case mb_bind' of         Nothing -> pprPanic "stgLiftLams" (text "Should never decide to lift LNEs")-        Just bind' -> pure (StgLetNoEscape noExtSilent bind' body')+        Just bind' -> pure (StgLetNoEscape noExtFieldSilent bind' body')  liftAlt :: LlStgAlt -> LiftM OutStgAlt liftAlt (con, infos, rhs) = withSubstBndrs (map binderInfoBndr infos) $ \bndrs' ->
simplStg/UnariseStg.hs view
@@ -185,9 +185,11 @@    * DataCon applications (StgRhsCon and StgConApp) don't have void arguments.     This means that it's safe to wrap `StgArg`s of DataCon applications with-    `StgCmmEnv.NonVoid`, for example.+    `GHC.StgToCmm.Env.NonVoid`, for example.    * Alt binders (binders in patterns) are always non-void.++  * Binders always have zero (for void arguments) or one PrimRep. -}  {-# LANGUAGE CPP, TupleSections #-}
specialise/Rules.hs view
@@ -40,7 +40,8 @@                           stripTicksTopT, stripTicksTopE,                           isJoinBind ) import PprCore          ( pprRules )-import Type             ( Type, Kind, substTy, mkTCvSubst )+import Type             ( Type, TCvSubst, extendTvSubst, extendCvSubst+                        , mkEmptyTCvSubst, substTy ) import TcType           ( tcSplitTyConApp_maybe ) import TysWiredIn       ( anyTypeOfKind ) import Coercion@@ -440,7 +441,7 @@ -- anything else, because we want user-define rules to "win" -- In particular, class ops have a built-in rule, but we -- any user-specific rules to win---   eg (Trac #4397)+--   eg (#4397) --      truncate :: (RealFrac a, Integral b) => a -> b --      {-# RULES "truncate/Double->Int" truncate = double2Int #-} --      double2Int :: Double -> Int@@ -448,8 +449,9 @@ isMoreSpecific (BuiltinRule {}) _                = False isMoreSpecific (Rule {})        (BuiltinRule {}) = True isMoreSpecific (Rule { ru_bndrs = bndrs1, ru_args = args1 })-               (Rule { ru_bndrs = bndrs2, ru_args = args2, ru_name = rule_name2 })-  = isJust (matchN (in_scope, id_unfolding_fun) rule_name2 bndrs2 args2 args1)+               (Rule { ru_bndrs = bndrs2, ru_args = args2+                     , ru_name = rule_name2, ru_rhs = rhs })+  = isJust (matchN (in_scope, id_unfolding_fun) rule_name2 bndrs2 args2 args1 rhs)   where    id_unfolding_fun _ = NoUnfolding     -- Don't expand in templates    in_scope = mkInScopeSet (mkVarSet bndrs1)@@ -516,29 +518,26 @@                 , ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs })   | not (is_active act)               = Nothing   | ruleCantMatch tpl_tops rough_args = Nothing-  | otherwise-  = case matchN in_scope rule_name tpl_vars tpl_args args of-        Nothing                       -> Nothing-        Just (bind_wrapper, tpl_vals) -> Just (bind_wrapper $-                                               rule_fn `mkApps` tpl_vals)-  where-    rule_fn = mkLams tpl_vars rhs+  | otherwise = matchN in_scope rule_name tpl_vars tpl_args args rhs  --------------------------------------- matchN  :: InScopeEnv         -> RuleName -> [Var] -> [CoreExpr]-        -> [CoreExpr]           -- ^ Target; can have more elements than the template-        -> Maybe (BindWrapper,  -- Floated bindings; see Note [Matching lets]-                  [CoreExpr])+        -> [CoreExpr] -> CoreExpr           -- ^ Target; can have more elements than the template+        -> Maybe CoreExpr -- For a given match template and context, find bindings to wrap around -- the entire result and what should be substituted for each template variable. -- Fail if there are two few actual arguments from the target to match the template -matchN (in_scope, id_unf) rule_name tmpl_vars tmpl_es target_es-  = do  { subst <- go init_menv emptyRuleSubst tmpl_es target_es-        ; let (_, matched_es) = mapAccumL lookup_tmpl subst $+matchN (in_scope, id_unf) rule_name tmpl_vars tmpl_es target_es rhs+  = do  { rule_subst <- go init_menv emptyRuleSubst tmpl_es target_es+        ; let (_, matched_es) = mapAccumL (lookup_tmpl rule_subst)+                                          (mkEmptyTCvSubst in_scope) $                                 tmpl_vars `zip` tmpl_vars1-        ; return (rs_binds subst, matched_es) }+              bind_wrapper = rs_binds rule_subst+                             -- Floated bindings; see Note [Matching lets]+       ; return (bind_wrapper $+                 mkLams tmpl_vars rhs `mkApps` matched_es) }   where     (init_rn_env, tmpl_vars1) = mapAccumL rnBndrL (mkRnEnv2 in_scope) tmpl_vars                   -- See Note [Cloning the template binders]@@ -553,29 +552,32 @@     go menv subst (t:ts) (e:es) = do { subst1 <- match menv subst t e                                      ; go menv subst1 ts es } -    lookup_tmpl :: RuleSubst -> (InVar,OutVar) -> (RuleSubst, CoreExpr)+    lookup_tmpl :: RuleSubst -> TCvSubst -> (InVar,OutVar) -> (TCvSubst, CoreExpr)                    -- Need to return a RuleSubst solely for the benefit of mk_fake_ty-    lookup_tmpl rs@(RS { rs_tv_subst = tv_subst, rs_id_subst = id_subst })-                (tmpl_var, tmpl_var1)+    lookup_tmpl (RS { rs_tv_subst = tv_subst, rs_id_subst = id_subst })+                tcv_subst (tmpl_var, tmpl_var1)         | isId tmpl_var1         = case lookupVarEnv id_subst tmpl_var1 of-             Just e -> (rs, e)-             Nothing | Just refl_co <- isReflCoVar_maybe tmpl_var1-                     , let co_expr   = Coercion refl_co-                           id_subst' = extendVarEnv id_subst tmpl_var1 co_expr-                           rs'       = rs { rs_id_subst = id_subst' }-                     -> (rs', co_expr) -- See Note [Unbound RULE binders]-                     | otherwise-                     -> unbound tmpl_var+            Just e | Coercion co <- e+                   -> (Type.extendCvSubst tcv_subst tmpl_var1 co, Coercion co)+                   | otherwise+                   -> (tcv_subst, e)+            Nothing | Just refl_co <- isReflCoVar_maybe tmpl_var1+                    , let co = Coercion.substCo tcv_subst refl_co+                    -> -- See Note [Unbound RULE binders]+                       (Type.extendCvSubst tcv_subst tmpl_var1 co, Coercion co)+                    | otherwise+                    -> unbound tmpl_var+         | otherwise-        = case lookupVarEnv tv_subst tmpl_var1 of-             Just ty -> (rs, Type ty)-             Nothing -> (rs', Type fake_ty) -- See Note [Unbound RULE binders]+        = (Type.extendTvSubst tcv_subst tmpl_var1 ty', Type ty')         where-          rs'     = rs { rs_tv_subst = extendVarEnv tv_subst tmpl_var1 fake_ty }-          fake_ty = mk_fake_ty in_scope rs tmpl_var1-                    -- This call is the sole reason we accumulate-                    -- RuleSubst in lookup_tmpl+          ty' = case lookupVarEnv tv_subst tmpl_var1 of+                  Just ty -> ty+                  Nothing -> fake_ty   -- See Note [Unbound RULE binders]+          fake_ty = anyTypeOfKind (Type.substTy tcv_subst (tyVarKind tmpl_var1))+                    -- This substitution is the sole reason we accumulate+                    -- TCvSubst in lookup_tmpl      unbound tmpl_var        = pprPanic "Template variable unbound in rewrite rule" $@@ -586,40 +588,13 @@               , text "Actual args:" <+> ppr target_es ]  -mk_fake_ty :: InScopeSet -> RuleSubst -> TyVar -> Kind--- Roughly:---    mk_fake_ty subst tv = Any @(subst (tyVarKind tv))--- That is: apply the substitution to the kind of the given tyvar,--- and make an 'any' type of that kind.--- Tiresomely, the RuleSubst is not well adapted to substTy, leading to--- horrible impedence matching.------ Happily, this function is seldom called-mk_fake_ty in_scope (RS { rs_tv_subst = tv_subst, rs_id_subst = id_subst }) tmpl_var1-  = anyTypeOfKind kind-  where-    kind = Type.substTy (mkTCvSubst in_scope (tv_subst, cv_subst))-                        (tyVarKind tmpl_var1)--    cv_subst = to_co_env id_subst--    to_co_env :: IdSubstEnv -> CvSubstEnv-    to_co_env env = nonDetFoldUFM_Directly to_co emptyVarEnv env-      -- It's OK to use nonDetFoldUFM_Directly because we forget the-      -- order immediately by creating a new env--    to_co uniq expr env-      = case exprToCoercion_maybe expr of-          Just co -> extendVarEnv_Directly env uniq co-          Nothing -> env- {- Note [Unbound RULE binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It can be the case that the binder in a rule is not actually bound on the LHS:  * Type variables.  Type synonyms with phantom args can give rise to-  unbound template type variables.  Consider this (Trac #10689,+  unbound template type variables.  Consider this (#10689,   simplCore/should_compile/T10689):      type Foo a b = b@@ -643,7 +618,7 @@   Now, if that binding is inlined, so that a=b=Int, we'd get     RULE forall (c :: Int~Int). f (x |> c) = e   and now when we simplify the LHS (Simplify.simplRule) we-  optCoercion will turn that 'c' into Refl:+  optCoercion (look at the CoVarCo case) will turn that 'c' into Refl:     RULE forall (c :: Int~Int). f (x |> <Int>) = e   and then perhaps drop it altogether.  Now 'c' is unbound. @@ -653,8 +628,7 @@   fires we can substitute <t> for c.    This actually happened (in a RULE for a local function)-  in Trac #13410, and also in test T10602.-+  in #13410, and also in test T10602.  Note [Cloning the template binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -674,11 +648,11 @@ ------ Historical note ------- At one point I tried simply adding the template binders to the in-scope set /without/ cloning them, but that failed in a horribly-obscure way in Trac #14777.  Problem was that during matching we look+obscure way in #14777.  Problem was that during matching we look up target-term variables in the in-scope set (see Note [Lookup in-scope]).  If a target-term variable happens to name-clash with a template variable, that lookup will find the template variable, which-is /utterly/ bogus.  In Trac #14777, this transformed a term variable+is /utterly/ bogus.  In #14777, this transformed a term variable into a type variable, and then crashed when we wanted its idInfo. ------ End of historical note ------- 
specialise/SpecConstr.hs view
@@ -506,13 +506,13 @@   * Ignore specConstrCount, to make arbitrary numbers of specialisations         (see specialise)   * Specialise even for arguments that are not scrutinised in the loop-        (see argToPat; Trac #4448)+        (see argToPat; #4448)   * Only specialise on recursive types a finite number of times-        (see is_too_recursive; Trac #5550; Note [Limit recursive specialisation])+        (see is_too_recursive; #5550; Note [Limit recursive specialisation])  The flag holds only for specialising a single binding group, and NOT for nested bindings.  (So really it should be passed around explicitly-and not stored in ScEnv.)  Trac #14379 turned out to be caused by+and not stored in ScEnv.)  #14379 turned out to be caused by    f SPEC x = let g1 x = ...               in ... We force-specialise f (because of the SPEC), but that generates a specialised@@ -599,7 +599,7 @@     specialisations.  If sc_count is "no limit" then we arbitrarily     choose 10 as the limit (ugh). -See Trac #5550.   Also Trac #13623, where this test had become over-aggressive,+See #5550.   Also #13623, where this test had become over-aggressive, and we lost a wonderful specialisation that we really wanted!  Note [NoSpecConstr]@@ -746,7 +746,7 @@  This seldom happens because let-bound constructor applications are ANF-ised, but it can happen as a result of on-the-fly transformations in-SpecConstr itself.  Here is Trac #7865:+SpecConstr itself.  Here is #7865:          let {           a'_shr =@@ -946,7 +946,7 @@ extendValEnv :: ScEnv -> Id -> Maybe Value -> ScEnv extendValEnv env _  Nothing   = env extendValEnv env id (Just cv)- | valueIsWorkFree cv      -- Don't duplicate work!!  Trac #7865+ | valueIsWorkFree cv      -- Don't duplicate work!!  #7865  = env { sc_vals = extendVarEnv (sc_vals env) id cv } extendValEnv env _ _ = env @@ -1048,7 +1048,7 @@ else we lose a useful specialisation for f.  This is necessary even though the simplifier has systematically replaced uses of 'x' with 'y' and 'b' with 'c' in the code.  The use of 'b' in the ValueEnv came-from outside the case.  See Trac #4908 for the live example.+from outside the case.  See #4908 for the live example.  Note [Avoiding exponential blowup] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1786,7 +1786,7 @@ The caller can, indeed must, assume this.  He should not combine in rhs_usg himself, or he'll get rhs_usg twice -- and that can lead to an exponential blowup of duplicates in the CallEnv.  This is what gave rise to the massive-performance loss in Trac #8852.+performance loss in #8852.  Note [Specialise original body] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1827,7 +1827,7 @@ when calling f_spec instead of call-by-value.  And that can result in unbounded worsening in space (cf the classic foldl vs foldl') -See Trac #3437 for a good example.+See #3437 for a good example.  The function calcSpecStrictness performs the calculation. @@ -1862,7 +1862,7 @@ BUT phantom type synonyms can mess this reasoning up,   eg   x::T b   with  type T b = Int So we apply expandTypeSynonyms to the bound Ids.-See Trac # 5458.  Yuk.+See # 5458.  Yuk.  Note [SpecConstr call patterns] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1875,7 +1875,7 @@ former case such optimisation benign, because the rule will match more terms; but in the latter we may lose a binding of 'g1' or 'g2', and end up with a rule LHS that doesn't bind the template variables-(Trac #10602).+(#10602).  The simplifier eliminates such things, but SpecConstr itself constructs new terms by substituting.  So the 'mkCast' in the Cast case of scExpr@@ -1902,7 +1902,7 @@  Note [SpecConstr and casts] ~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #14270) a call like+Consider (#14270) a call like      let f = e     in ... f (K @(a |> co)) ...@@ -1925,7 +1925,7 @@  I think this is very rare. -It is important (e.g. Trac #14936) that this /only/ applies to+It is important (e.g. #14936) that this /only/ applies to coercions mentioned in casts.  We don't want to be discombobulated by casts in terms!  For example, consider    f ((e1,e2) |> sym co)@@ -2049,7 +2049,7 @@      emit_trace result        | debugIsOn || hasPprDebug (sc_dflags env)-         -- Suppress this scary message for ordinary users!  Trac #5125+         -- Suppress this scary message for ordinary users!  #5125        = pprTrace "SpecConstr" msg result        | otherwise        = result
specialise/Specialise.hs view
@@ -5,6 +5,8 @@ -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE ViewPatterns #-} module Specialise ( specProgram, specUnfolding ) where  #include "HsVersions.h"@@ -14,6 +16,7 @@ import Id import TcType hiding( substTy ) import Type   hiding( substTy, extendTvSubstList )+import Predicate import Module( Module, HasModule(..) ) import Coercion( Coercion ) import CoreMonad@@ -25,13 +28,13 @@ import CoreSyn import Rules import CoreOpt          ( collectBindersPushingCo )-import CoreUtils        ( exprIsTrivial, applyTypeToArgs, mkCast )+import CoreUtils        ( exprIsTrivial, mkCast, exprType ) import CoreFVs import CoreArity        ( etaExpandToJoinPointRule ) import UniqSupply import Name import MkId             ( voidArgId, voidPrimId )-import Maybes           ( catMaybes, isJust )+import Maybes           ( mapMaybe, isJust ) import MonadUtils       ( foldlM ) import BasicTypes import HscTypes@@ -42,6 +45,7 @@ import FastString import State import UniqDFM+import TyCoRep (TyCoBinder (..))  import Control.Monad import qualified Control.Monad.Fail as MonadFail@@ -628,9 +632,193 @@ -fno-cross-module-specialise option was introduced to allow users to being bitten by such instances to revert to the pre-7.10 behavior. -See Trac #10491+See #10491 -} +-- | An argument that we might want to specialise.+-- See Note [Specialising Calls] for the nitty gritty details.+data SpecArg+  =+    -- | Type arguments that should be specialised, due to appearing+    -- free in the type of a 'SpecDict'.+    SpecType Type+    -- | Type arguments that should remain polymorphic.+  | UnspecType+    -- | Dictionaries that should be specialised.+  | SpecDict DictExpr+    -- | Value arguments that should not be specialised.+  | UnspecArg++instance Outputable SpecArg where+  ppr (SpecType t) = text "SpecType" <+> ppr t+  ppr UnspecType   = text "UnspecType"+  ppr (SpecDict d) = text "SpecDict" <+> ppr d+  ppr UnspecArg    = text "UnspecArg"++getSpecDicts :: [SpecArg] -> [DictExpr]+getSpecDicts = mapMaybe go+  where+    go (SpecDict d) = Just d+    go _            = Nothing++getSpecTypes :: [SpecArg] -> [Type]+getSpecTypes = mapMaybe go+  where+    go (SpecType t) = Just t+    go _            = Nothing++isUnspecArg :: SpecArg -> Bool+isUnspecArg UnspecArg  = True+isUnspecArg UnspecType = True+isUnspecArg _          = False++isValueArg :: SpecArg -> Bool+isValueArg UnspecArg    = True+isValueArg (SpecDict _) = True+isValueArg _            = False++-- | Given binders from an original function 'f', and the 'SpecArg's+-- corresponding to its usage, compute everything necessary to build+-- a specialisation.+--+-- We will use a running example. Consider the function+--+--    foo :: forall a b. Eq a => Int -> blah+--    foo @a @b dEqA i = blah+--+-- which is called with the 'CallInfo'+--+--    [SpecType T1, UnspecType, SpecDict dEqT1, UnspecArg]+--+-- We'd eventually like to build the RULE+--+--    RULE "SPEC foo @T1 _"+--      forall @a @b (dEqA' :: Eq a).+--        foo @T1 @b dEqA' = $sfoo @b+--+-- and the specialisation '$sfoo'+--+--    $sfoo :: forall b. Int -> blah+--    $sfoo @b = \i -> SUBST[a->T1, dEqA->dEqA'] blah+--+-- The cases for 'specHeader' below are presented in the same order as this+-- running example. The result of 'specHeader' for this example is as follows:+--+--    ( -- Returned arguments+--      env + [a -> T1, deqA -> dEqA']+--    , []+--+--      -- RULE helpers+--    , [b, dx', i]+--    , [T1, b, dx', i]+--+--      -- Specialised function helpers+--    , [b, i]+--    , [dx]+--    , [T1, b, dx_spec, i]+--    )+specHeader+     :: SpecEnv+     -> [CoreBndr]  -- The binders from the original function 'f'+     -> [SpecArg]   -- From the CallInfo+     -> SpecM ( -- Returned arguments+                SpecEnv      -- Substitution to apply to the body of 'f'+              , [CoreBndr]   -- All the remaining unspecialised args from the original function 'f'++                -- RULE helpers+              , [CoreBndr]   -- Binders for the RULE+              , [CoreArg]    -- Args for the LHS of the rule++                -- Specialised function helpers+              , [CoreBndr]   -- Binders for $sf+              , [DictBind]   -- Auxiliary dictionary bindings+              , [CoreExpr]   -- Specialised arguments for unfolding+              )++-- We want to specialise on type 'T1', and so we must construct a substitution+-- 'a->T1', as well as a LHS argument for the resulting RULE and unfolding+-- details.+specHeader env (bndr : bndrs) (SpecType t : args)+  = do { let env' = extendTvSubstList env [(bndr, t)]+       ; (env'', unused_bndrs, rule_bs, rule_es, bs', dx, spec_args)+            <- specHeader env' bndrs args+       ; pure ( env''+              , unused_bndrs+              , rule_bs+              , Type t : rule_es+              , bs'+              , dx+              , Type t : spec_args+              )+       }++-- Next we have a type that we don't want to specialise. We need to perform+-- a substitution on it (in case the type refers to 'a'). Additionally, we need+-- to produce a binder, LHS argument and RHS argument for the resulting rule,+-- /and/ a binder for the specialised body.+specHeader env (bndr : bndrs) (UnspecType : args)+  = do { let (env', bndr') = substBndr env bndr+       ; (env'', unused_bndrs, rule_bs, rule_es, bs', dx, spec_args)+            <- specHeader env' bndrs args+       ; pure ( env''+              , unused_bndrs+              , bndr' : rule_bs+              , varToCoreExpr bndr' : rule_es+              , bndr' : bs'+              , dx+              , varToCoreExpr bndr' : spec_args+              )+       }++-- Next we want to specialise the 'Eq a' dict away. We need to construct+-- a wildcard binder to match the dictionary (See Note [Specialising Calls] for+-- the nitty-gritty), as a LHS rule and unfolding details.+specHeader env (bndr : bndrs) (SpecDict d : args)+  = do { inst_dict_id <- newDictBndr env bndr+       ; let (rhs_env2, dx_binds, spec_dict_args')+                = bindAuxiliaryDicts env [bndr] [d] [inst_dict_id]+       ; (env', unused_bndrs, rule_bs, rule_es, bs', dx, spec_args)+             <- specHeader rhs_env2 bndrs args+       ; pure ( env'+              , unused_bndrs+              -- See Note [Evidence foralls]+              , exprFreeIdsList (varToCoreExpr inst_dict_id) ++ rule_bs+              , varToCoreExpr inst_dict_id : rule_es+              , bs'+              , dx_binds ++ dx+              , spec_dict_args' ++ spec_args+              )+       }++-- Finally, we have the unspecialised argument 'i'. We need to produce+-- a binder, LHS and RHS argument for the RULE, and a binder for the+-- specialised body.+--+-- NB: Calls to 'specHeader' will trim off any trailing 'UnspecArg's, which is+-- why 'i' doesn't appear in our RULE above. But we have no guarantee that+-- there aren't 'UnspecArg's which come /before/ all of the dictionaries, so+-- this case must be here.+specHeader env (bndr : bndrs) (UnspecArg : args)+  = do { let (env', bndr') = substBndr env bndr+       ; (env'', unused_bndrs, rule_bs, rule_es, bs', dx, spec_args)+             <- specHeader env' bndrs args+       ; pure ( env''+              , unused_bndrs+              , bndr' : rule_bs+              , varToCoreExpr bndr' : rule_es+              , bndr' : bs'+              , dx+              , varToCoreExpr bndr' : spec_args+              )+       }++-- Return all remaining binders from the original function. These have the+-- invariant that they should all correspond to unspecialised arguments, so+-- it's safe to stop processing at this point.+specHeader env bndrs [] = pure (env, bndrs, [], [], [], [], [])+specHeader env [] _     = pure (env, [], [], [], [], [], [])++ -- | Specialise a set of calls to imported bindings specImports :: DynFlags             -> Module@@ -730,28 +918,35 @@         ; return (rules2 ++ rules1, final_binds) } -  |  warnMissingSpecs dflags callers-  = do { warnMsg (vcat [ hang (text "Could not specialise imported function" <+> quotes (ppr fn))-                            2 (vcat [ text "when specialising" <+> quotes (ppr caller)-                                    | caller <- callers])-                      , whenPprDebug (text "calls:" <+> vcat (map (pprCallInfo fn) calls_for_fn))-                      , text "Probable fix: add INLINABLE pragma on" <+> quotes (ppr fn) ])-       ; return ([], []) }+  | otherwise = do { tryWarnMissingSpecs dflags callers fn calls_for_fn+                   ; return ([], [])} -  | otherwise-  = return ([], [])   where     unfolding = realIdUnfolding fn   -- We want to see the unfolding even for loop breakers -warnMissingSpecs :: DynFlags -> [Id] -> Bool+-- | Returns whether or not to show a missed-spec warning.+-- If -Wall-missed-specializations is on, show the warning.+-- Otherwise, if -Wmissed-specializations is on, only show a warning+-- if there is at least one imported function being specialized,+-- and if all imported functions are marked with an inline pragma+-- Use the most specific warning as the reason.+tryWarnMissingSpecs :: DynFlags -> [Id] -> Id -> [CallInfo] -> CoreM () -- See Note [Warning about missed specialisations]-warnMissingSpecs dflags callers-  | wopt Opt_WarnAllMissedSpecs dflags = True-  | not (wopt Opt_WarnMissedSpecs dflags) = False-  | null callers                       = False-  | otherwise                          = all has_inline_prag callers+tryWarnMissingSpecs dflags callers fn calls_for_fn+  | wopt Opt_WarnMissedSpecs dflags+    && not (null callers)+    && allCallersInlined                  = doWarn $ Reason Opt_WarnMissedSpecs+  | wopt Opt_WarnAllMissedSpecs dflags    = doWarn $ Reason Opt_WarnAllMissedSpecs+  | otherwise                             = return ()   where-    has_inline_prag id = isAnyInlinePragma (idInlinePragma id)+    allCallersInlined = all (isAnyInlinePragma . idInlinePragma) callers+    doWarn reason =+      warnMsg reason+        (vcat [ hang (text ("Could not specialise imported function") <+> quotes (ppr fn))+                2 (vcat [ text "when specialising" <+> quotes (ppr caller)+                        | caller <- callers])+          , whenPprDebug (text "calls:" <+> vcat (map (pprCallInfo fn) calls_for_fn))+          , text "Probable fix: add INLINABLE pragma on" <+> quotes (ppr fn) ])  wantSpecImport :: DynFlags -> Unfolding -> Bool -- See Note [Specialise imported INLINABLE things]@@ -793,7 +988,7 @@ but with -fspecialise-aggressively we add  * Anything with an unfolding template -Trac #8874 has a good example of why we want to auto-specialise DFuns.+#8874 has a good example of why we want to auto-specialise DFuns.  We have the -fspecialise-aggressively flag (usually off), because we risk lots of orphan modules from over-vigorous specialisation.@@ -1164,8 +1359,7 @@  specCalls mb_mod env existing_rules calls_for_me fn rhs         -- The first case is the interesting one-  |  rhs_tyvars `lengthIs`      n_tyvars -- Rhs of fn's defn has right number of big lambdas-  && rhs_bndrs1 `lengthAtLeast` n_dicts -- and enough dict args+  |  callSpecArity pis <= fn_arity      -- See Note [Specialisation Must Preserve Sharing]   && notNull calls_for_me               -- And there are some calls to specialise   && not (isNeverActive (idInlineActivation fn))         -- Don't specialise NOINLINE things@@ -1186,15 +1380,14 @@     -- pprTrace "specDefn: none" (ppr fn <+> ppr calls_for_me) $     return ([], [], emptyUDs)   where-    _trace_doc = sep [ ppr rhs_tyvars, ppr n_tyvars-                     , ppr rhs_bndrs, ppr n_dicts+    _trace_doc = sep [ ppr rhs_tyvars, ppr rhs_bndrs                      , ppr (idInlineActivation fn) ]      fn_type                 = idType fn     fn_arity                = idArity fn     fn_unf                  = realIdUnfolding fn  -- Ignore loop-breaker-ness here-    (tyvars, theta, _)      = tcSplitSigmaTy fn_type-    n_tyvars                = length tyvars+    pis                     = fst $ splitPiTys fn_type+    theta                   = getTheta pis     n_dicts                 = length theta     inl_prag                = idInlinePragma fn     inl_act                 = inlinePragmaActivation inl_prag@@ -1205,10 +1398,7 @@      (rhs_bndrs, rhs_body)      = collectBindersPushingCo rhs                                  -- See Note [Account for casts in binding]-    (rhs_tyvars, rhs_bndrs1)   = span isTyVar rhs_bndrs-    (rhs_dict_ids, rhs_bndrs2) = splitAt n_dicts rhs_bndrs1-    body                       = mkLams rhs_bndrs2 rhs_body-                                 -- Glue back on the non-dict lambdas+    rhs_tyvars = filter isTyVar rhs_bndrs      in_scope = CoreSubst.substInScope (se_subst env) @@ -1220,59 +1410,19 @@          -- NB: we look both in the new_rules (generated by this invocation          --     of specCalls), and in existing_rules (passed in to specCalls) -    mk_ty_args :: [Maybe Type] -> [TyVar] -> [CoreExpr]-    mk_ty_args [] poly_tvs-      = ASSERT( null poly_tvs ) []-    mk_ty_args (Nothing : call_ts) (poly_tv : poly_tvs)-      = Type (mkTyVarTy poly_tv) : mk_ty_args call_ts poly_tvs-    mk_ty_args (Just ty : call_ts) poly_tvs-      = Type ty : mk_ty_args call_ts poly_tvs-    mk_ty_args (Nothing : _) [] = panic "mk_ty_args"-     ----------------------------------------------------------         -- Specialise to one particular call pattern     spec_call :: SpecInfo                         -- Accumulating parameter               -> CallInfo                         -- Call instance               -> SpecM SpecInfo     spec_call spec_acc@(rules_acc, pairs_acc, uds_acc)-              (CI { ci_key = CallKey call_ts, ci_args = call_ds })-      = ASSERT( call_ts `lengthIs` n_tyvars  && call_ds `lengthIs` n_dicts )--        -- Suppose f's defn is  f = /\ a b c -> \ d1 d2 -> rhs-        -- Suppose the call is for f [Just t1, Nothing, Just t3] [dx1, dx2]--        -- Construct the new binding-        --      f1 = SUBST[a->t1,c->t3, d1->d1', d2->d2'] (/\ b -> rhs)-        -- PLUS the rule-        --      RULE "SPEC f" forall b d1' d2'. f b d1' d2' = f1 b-        --      In the rule, d1' and d2' are just wildcards, not used in the RHS-        -- PLUS the usage-details-        --      { d1' = dx1; d2' = dx2 }-        -- where d1', d2' are cloned versions of d1,d2, with the type substitution-        -- applied.  These auxiliary bindings just avoid duplication of dx1, dx2-        ---        -- Note that the substitution is applied to the whole thing.-        -- This is convenient, but just slightly fragile.  Notably:-        --      * There had better be no name clashes in a/b/c-        do { let-                -- poly_tyvars = [b] in the example above-                -- spec_tyvars = [a,c]-                -- ty_args     = [t1,b,t3]-                spec_tv_binds = [(tv,ty) | (tv, Just ty) <- rhs_tyvars `zip` call_ts]-                env1          = extendTvSubstList env spec_tv_binds-                (rhs_env, poly_tyvars) = substBndrs env1-                                            [tv | (tv, Nothing) <- rhs_tyvars `zip` call_ts]--             -- Clone rhs_dicts, including instantiating their types-           ; inst_dict_ids <- mapM (newDictBndr rhs_env) rhs_dict_ids-           ; let (rhs_env2, dx_binds, spec_dict_args)-                            = bindAuxiliaryDicts rhs_env rhs_dict_ids call_ds inst_dict_ids-                 ty_args    = mk_ty_args call_ts poly_tyvars-                 ev_args    = map varToCoreExpr inst_dict_ids  -- ev_args, ev_bndrs:-                 ev_bndrs   = exprsFreeIdsList ev_args         -- See Note [Evidence foralls]-                 rule_args  = ty_args     ++ ev_args-                 rule_bndrs = poly_tyvars ++ ev_bndrs+              (CI { ci_key = call_args, ci_arity = call_arity })+      = ASSERT(call_arity <= fn_arity) +        -- See Note [Specialising Calls]+        do { (rhs_env2, unused_bndrs, rule_bndrs, rule_args, unspec_bndrs, dx_binds, spec_args)+               <- specHeader env rhs_bndrs $ dropWhileEndLE isUnspecArg call_args+           ; let rhs_body' = mkLams unused_bndrs rhs_body            ; dflags <- getDynFlags            ; if already_covered dflags rules_acc rule_args              then return spec_acc@@ -1281,25 +1431,28 @@                   --                           , ppr dx_binds ]) $                   do            {    -- Figure out the type of the specialised function-             let body_ty = applyTypeToArgs rhs fn_type rule_args-                 (lam_args, app_args)           -- Add a dummy argument if body_ty is unlifted+             let body = mkLams unspec_bndrs rhs_body'+                 body_ty = substTy rhs_env2 $ exprType body+                 (lam_extra_args, app_args)     -- See Note [Specialisations Must Be Lifted]                    | isUnliftedType body_ty     -- C.f. WwLib.mkWorkerArgs                    , not (isJoinId fn)-                   = (poly_tyvars ++ [voidArgId], poly_tyvars ++ [voidPrimId])-                   | otherwise = (poly_tyvars, poly_tyvars)-                 spec_id_ty = mkLamTypes lam_args body_ty+                   = ([voidArgId], voidPrimId : unspec_bndrs)+                   | otherwise = ([], unspec_bndrs)                  join_arity_change = length app_args - length rule_args                  spec_join_arity | Just orig_join_arity <- isJoinId_maybe fn                                  = Just (orig_join_arity + join_arity_change)                                  | otherwise                                  = Nothing +           ; (spec_rhs, rhs_uds) <- specExpr rhs_env2 (mkLams lam_extra_args body)+           ; let spec_id_ty = exprType spec_rhs            ; spec_f <- newSpecIdSM fn spec_id_ty spec_join_arity-           ; (spec_rhs, rhs_uds) <- specExpr rhs_env2 (mkLams lam_args body)            ; this_mod <- getModule            ; let                 -- The rule to put in the function's specialisation is:-                --      forall b, d1',d2'.  f t1 b t3 d1' d2' = f1 b+                --      forall x @b d1' d2'.+                --          f x @T1 @b @T2 d1' d2' = f1 x @b+                -- See Note [Specialising Calls]                 herald = case mb_mod of                            Nothing        -- Specialising local fn                                -> text "SPEC"@@ -1308,7 +1461,7 @@                  rule_name = mkFastString $ showSDoc dflags $                             herald <+> ftext (occNameFS (getOccName fn))-                                   <+> hsep (map ppr_call_key_ty call_ts)+                                   <+> hsep (mapMaybe ppr_call_key_ty call_args)                             -- This name ends up in interface files, so use occNameString.                             -- Otherwise uniques end up there, making builds                             -- less deterministic (See #4012 comment:61 ff)@@ -1331,6 +1484,7 @@                       Nothing -> rule_wout_eta                  -- Add the { d1' = dx1; d2' = dx2 } usage stuff+                -- See Note [Specialising Calls]                 spec_uds = foldr consDictBind rhs_uds dx_binds                  --------------------------------------@@ -1345,11 +1499,9 @@                   = (inl_prag { inl_inline = NoUserInline }, noUnfolding)                    | otherwise-                  = (inl_prag, specUnfolding dflags poly_tyvars spec_app-                                             arity_decrease fn_unf)+                  = (inl_prag, specUnfolding dflags unspec_bndrs spec_app n_dicts fn_unf) -                arity_decrease = length spec_dict_args-                spec_app e = (e `mkApps` ty_args) `mkApps` spec_dict_args+                spec_app e = e `mkApps` spec_args                  --------------------------------------                 -- Adding arity information just propagates it a bit faster@@ -1361,13 +1513,116 @@                                         `setIdUnfolding`  spec_unf                                         `asJoinId_maybe`  spec_join_arity -           ; return ( spec_rule                  : rules_acc+                _rule_trace_doc = vcat [ ppr spec_f, ppr fn_type, ppr spec_id_ty+                                       , ppr rhs_bndrs, ppr call_args+                                       , ppr spec_rule+                                       ]++           ; -- pprTrace "spec_call: rule" _rule_trace_doc+             return ( spec_rule                  : rules_acc                     , (spec_f_w_arity, spec_rhs) : pairs_acc                     , spec_uds           `plusUDs` uds_acc                     ) } } -{- Note [Account for casts in binding]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Specialisation Must Preserve Sharing]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider a function:++    f :: forall a. Eq a => a -> blah+    f =+      if expensive+         then f1+         else f2++As written, all calls to 'f' will share 'expensive'. But if we specialise 'f'+at 'Int', eg:++    $sfInt = SUBST[a->Int,dict->dEqInt] (if expensive then f1 else f2)++    RULE "SPEC f"+      forall (d :: Eq Int).+        f Int _ = $sfIntf++We've now lost sharing between 'f' and '$sfInt' for 'expensive'. Yikes!++To avoid this, we only generate specialisations for functions whose arity is+enough to bind all of the arguments we need to specialise.  This ensures our+specialised functions don't do any work before receiving all of their dicts,+and thus avoids the 'f' case above.++Note [Specialisations Must Be Lifted]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider a function 'f':++    f = forall a. Eq a => Array# a++used like++    case x of+      True -> ...f @Int dEqInt...+      False -> 0++Naively, we might generate an (expensive) specialisation++    $sfInt :: Array# Int++even in the case that @x = False@! Instead, we add a dummy 'Void#' argument to+the specialisation '$sfInt' ($sfInt :: Void# -> Array# Int) in order to+preserve laziness.++Note [Specialising Calls]+~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have a function:++    f :: Int -> forall a b c. (Foo a, Foo c) => Bar -> Qux+    f = \x -> /\ a b c -> \d1 d2 bar -> rhs++and suppose it is called at:++    f 7 @T1 @T2 @T3 dFooT1 dFooT3 bar++This call is described as a 'CallInfo' whose 'ci_key' is++    [ UnspecArg, SpecType T1, UnspecType, SpecType T3, SpecDict dFooT1+    , SpecDict dFooT3, UnspecArg ]++Why are 'a' and 'c' identified as 'SpecType', while 'b' is 'UnspecType'?+Because we must specialise the function on type variables that appear+free in its *dictionary* arguments; but not on type variables that do not+appear in any dictionaries, i.e. are fully polymorphic.++Because this call has dictionaries applied, we'd like to specialise+the call on any type argument that appears free in those dictionaries.+In this case, those are (a ~ T1, c ~ T3).++As a result, we'd like to generate a function:++    $sf :: Int -> forall b. Bar -> Qux+    $sf = SUBST[a->T1, c->T3, d1->d1', d2->d2'] (\x -> /\ b -> \bar -> rhs)++Note that the substitution is applied to the whole thing.  This is+convenient, but just slightly fragile.  Notably:+  * There had better be no name clashes in a/b/c++We must construct a rewrite rule:++    RULE "SPEC f @T1 _ @T3"+      forall (x :: Int) (@b :: Type) (d1' :: Foo T1) (d2' :: Foo T3).+        f x @T1 @b @T3 d1' d2' = $sf x @b++In the rule, d1' and d2' are just wildcards, not used in the RHS.  Note+additionally that 'bar' isn't captured by this rule --- we bind only+enough etas in order to capture all of the *specialised* arguments.++Finally, we must also construct the usage-details++     { d1' = dx1; d2' = dx2 }++where d1', d2' are cloned versions of d1,d2, with the type substitution+applied.  These auxiliary bindings just avoid duplication of dx1, dx2.++Note [Account for casts in binding]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider    f :: Eq a => a -> IO ()    {-# INLINABLE f@@ -1384,7 +1639,7 @@  Note [Evidence foralls] ~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose (Trac #12212) that we are specialising+Suppose (#12212) that we are specialising    f :: forall a b. (Num a, F a ~ F b) => blah with a=b=Int. Then the RULE will be something like    RULE forall (d:Num Int) (g :: F Int ~ F Int).@@ -1506,7 +1761,7 @@ Note [Avoiding loops] ~~~~~~~~~~~~~~~~~~~~~ When specialising /dictionary functions/ we must be very careful to-avoid building loops. Here is an example that bit us badly: Trac #3591+avoid building loops. Here is an example that bit us badly: #3591       class Eq a => C a      instance Eq [a] => C [a]@@ -1547,7 +1802,7 @@  -------------- Here's another example, this time for an imported dfun, so the call-to filterCalls is in specImports (Trac #13429). Suppose we have+to filterCalls is in specImports (#13429). Suppose we have   class Monoid v => C v a where ...  We start with a call@@ -1785,7 +2040,7 @@    This particular example had a huge effect on the call to replicateM_    in nofib/shootout/n-body. -Why (b): discard INLINABLE pragmas? See Trac #4874 for persuasive examples.+Why (b): discard INLINABLE pragmas? See #4874 for persuasive examples. Suppose we have     {-# INLINABLE f #-}     f :: Ord a => [a] -> Int@@ -1803,7 +2058,7 @@ a complete solution; ignoring specialisation for now, INLINABLE functions don't get properly strictness analysed, for example. But it works well for examples involving specialisation, which is the dominant use of-INLINABLE.  See Trac #4874.+INLINABLE.  See #4874.   ************************************************************************@@ -1881,16 +2136,14 @@   -- These dups are eliminated by already_covered in specCalls  data CallInfo-  = CI { ci_key  :: CallKey     -- Type arguments-       , ci_args :: [DictExpr]  -- Dictionary arguments-       , ci_fvs  :: VarSet      -- Free vars of the ci_key and ci_args+  = CI { ci_key  :: [SpecArg]   -- All arguments+       , ci_arity :: Int        -- The number of variables necessary to bind+                                -- all of the specialised arguments+       , ci_fvs  :: VarSet      -- Free vars of the ci_key                                 -- call (including tyvars)                                 -- [*not* include the main id itself, of course]     } -newtype CallKey   = CallKey [Maybe Type]-  -- Nothing => unconstrained type argument- type DictExpr = CoreExpr  ciSetFilter :: (CallInfo -> Bool) -> CallInfoSet -> CallInfoSet@@ -1904,16 +2157,15 @@ pprCallInfo fn (CI { ci_key = key })   = ppr fn <+> ppr key -ppr_call_key_ty :: Maybe Type -> SDoc-ppr_call_key_ty Nothing   = char '_'-ppr_call_key_ty (Just ty) = char '@' <+> pprParendType ty--instance Outputable CallKey where-  ppr (CallKey ts) = brackets (fsep (map ppr_call_key_ty ts))+ppr_call_key_ty :: SpecArg -> Maybe SDoc+ppr_call_key_ty (SpecType ty) = Just $ char '@' <+> pprParendType ty+ppr_call_key_ty UnspecType    = Just $ char '_'+ppr_call_key_ty (SpecDict _)  = Nothing+ppr_call_key_ty UnspecArg     = Nothing  instance Outputable CallInfo where-  ppr (CI { ci_key = key, ci_args = args, ci_fvs = fvs })-    = text "CI" <> braces (hsep [ ppr key, ppr args, ppr fvs ])+  ppr (CI { ci_key = key, ci_fvs = fvs })+    = text "CI" <> braces (hsep [ fsep (mapMaybe ppr_call_key_ty key), ppr fvs ])  unionCalls :: CallDetails -> CallDetails -> CallDetails unionCalls c1 c2 = plusDVarEnv_C unionCallInfoSet c1 c2@@ -1930,19 +2182,31 @@  callInfoFVs :: CallInfoSet -> VarSet callInfoFVs (CIS _ call_info) =-  foldrBag (\(CI { ci_fvs = fv }) vs -> unionVarSet fv vs) emptyVarSet call_info+  foldr (\(CI { ci_fvs = fv }) vs -> unionVarSet fv vs) emptyVarSet call_info +computeArity :: [SpecArg] -> Int+computeArity = length . filter isValueArg . dropWhileEndLE isUnspecArg++callSpecArity :: [TyCoBinder] -> Int+callSpecArity = length . filter (not . isNamedBinder) . dropWhileEndLE isVisibleBinder++getTheta :: [TyCoBinder] -> [PredType]+getTheta = fmap tyBinderType . filter isInvisibleBinder . filter (not . isNamedBinder)++ -------------------------------------------------------------singleCall :: Id -> [Maybe Type] -> [DictExpr] -> UsageDetails-singleCall id tys dicts+singleCall :: Id -> [SpecArg] -> UsageDetails+singleCall id args   = MkUD {ud_binds = emptyBag,           ud_calls = unitDVarEnv id $ CIS id $-                     unitBag (CI { ci_key = CallKey tys-                                 , ci_args = dicts+                     unitBag (CI { ci_key  = args -- used to be tys+                                 , ci_arity = computeArity args                                  , ci_fvs  = call_fvs }) }   where+    tys      = getSpecTypes args+    dicts    = getSpecDicts args     call_fvs = exprsFreeVars dicts `unionVarSet` tys_fvs-    tys_fvs  = tyCoVarsOfTypes (catMaybes tys)+    tys_fvs  = tyCoVarsOfTypes tys         -- The type args (tys) are guaranteed to be part of the dictionary         -- types, because they are just the constrained types,         -- and the dictionary is therefore sure to be bound@@ -1966,8 +2230,8 @@   = emptyUDs    |  not (all type_determines_value theta)-  || not (spec_tys `lengthIs` n_tyvars)-  || not ( dicts   `lengthIs` n_dicts)+  || not (computeArity ci_key <= idArity f)+  || not (length dicts == length theta)   || not (any (interestingDict env) dicts)    -- Note [Interesting dictionary arguments]   -- See also Note [Specialisations already covered]   = -- pprTrace "mkCallUDs: discarding" _trace_doc@@ -1975,27 +2239,28 @@    | otherwise   = -- pprTrace "mkCallUDs: keeping" _trace_doc-    singleCall f spec_tys dicts+    singleCall f ci_key   where-    _trace_doc = vcat [ppr f, ppr args, ppr n_tyvars, ppr n_dicts-                      , ppr (map (interestingDict env) dicts)]-    (tyvars, theta, _)      = tcSplitSigmaTy (idType f)-    constrained_tyvars      = tyCoVarsOfTypes theta-    n_tyvars                = length tyvars-    n_dicts                 = length theta--    spec_tys = [mk_spec_ty tv ty | (tv, ty) <- tyvars `type_zip` args]-    dicts    = [dict_expr | (_, dict_expr) <- theta `zip` (drop n_tyvars args)]+    _trace_doc = vcat [ppr f, ppr args, ppr (map (interestingDict env) dicts)]+    pis                = fst $ splitPiTys $ idType f+    theta              = getTheta pis+    constrained_tyvars = tyCoVarsOfTypes theta -    -- ignores Coercion arguments-    type_zip :: [TyVar] -> [CoreExpr] -> [(TyVar, Type)]-    type_zip tvs      (Coercion _ : args) = type_zip tvs args-    type_zip (tv:tvs) (Type ty : args)    = (tv, ty) : type_zip tvs args-    type_zip _        _                   = []+    ci_key :: [SpecArg]+    ci_key = fmap (\(t, a) ->+      case t of+        Named (binderVar -> tyVar)+          |  tyVar `elemVarSet` constrained_tyvars+          -> case a of+              Type ty -> SpecType ty+              _ -> pprPanic "ci_key" $ ppr a+          |  otherwise+          -> UnspecType+        Anon InvisArg _ -> SpecDict a+        Anon VisArg _ -> UnspecArg+                ) $ zip pis args -    mk_spec_ty tyvar ty-        | tyvar `elemVarSet` constrained_tyvars = Just ty-        | otherwise                             = Nothing+    dicts = getSpecDicts ci_key      want_calls_for f = isLocalId f || isJust (maybeUnfoldingTemplate (realIdUnfolding f))          -- For imported things, we gather call instances if@@ -2009,7 +2274,7 @@             ClassPred cls _ -> not (isIPClass cls)  -- Superclasses can't be IPs             EqPred {}       -> True             IrredPred {}    -> True   -- Things like (D []) where D is a-                                      -- Constraint-ranged family; Trac #7785+                                      -- Constraint-ranged family; #7785             ForAllPred {}   -> True  {-@@ -2018,7 +2283,7 @@ Only specialise if all overloading is on non-IP *class* params, because these are the ones whose *type* determines their *value*.  In parrticular, with implicit params, the type args *don't* say what the-value of the implicit param is!  See Trac #7101+value of the implicit param is!  See #7101  However, consider          type family D (v::*->*) :: Constraint@@ -2032,7 +2297,7 @@ type-family constraint like (D a).  Well, no.  We don't allow         type instance D Maybe = ?x:Int Hence the IrredPred case in type_determines_value.-See Trac #7785.+See #7785.  Note [Interesting dictionary arguments] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2058,7 +2323,7 @@  We accidentally lost accurate tracking of local variables for a long time, because cloned variables don't have unfoldings. But makes a-massive difference in a few cases, eg Trac #5113. For nofib as a+massive difference in a few cases, eg #5113. For nofib as a whole it's only a small win: 2.2% improvement in allocation for ansi, 1.2% for bspt, but mostly 0.0!  Average 0.1% increase in binary size. -}@@ -2086,7 +2351,7 @@  ----------------------------- _dictBindBndrs :: Bag DictBind -> [Id]-_dictBindBndrs dbs = foldrBag ((++) . bindersOf . fst) [] dbs+_dictBindBndrs dbs = foldr ((++) . bindersOf . fst) [] dbs  -- | Construct a 'DictBind' from a 'CoreBind' mkDB :: CoreBind -> DictBind@@ -2117,7 +2382,7 @@         --         involving an imported dfun.  We must know whether         --         a dictionary binding depends on an imported dfun,         --         in case we try to specialise that imported dfun-        --         Trac #13429 illustrates+        --         #13429 illustrates  -- | Flatten a set of "dumped" 'DictBind's, and some other binding -- pairs, into a single recursive binding.@@ -2125,7 +2390,7 @@ recWithDumpedDicts pairs dbs   = (Rec bindings, fvs)   where-    (bindings, fvs) = foldrBag add+    (bindings, fvs) = foldr add                                ([], emptyVarSet)                                (dbs `snocBag` mkDB (Rec pairs))     add (NonRec b r, fvs') (pairs, fvs) =@@ -2149,13 +2414,13 @@  wrapDictBinds :: Bag DictBind -> [CoreBind] -> [CoreBind] wrapDictBinds dbs binds-  = foldrBag add binds dbs+  = foldr add binds dbs   where     add (bind,_) binds = bind : binds  wrapDictBindsE :: Bag DictBind -> CoreExpr -> CoreExpr wrapDictBindsE dbs expr-  = foldrBag add expr dbs+  = foldr add expr dbs   where     add (bind,_) expr = Let bind expr @@ -2214,7 +2479,7 @@ filterCalls (CIS fn call_bag) dbs   = filter ok_call (bagToList call_bag)   where-    dump_set = foldlBag go (unitVarSet fn) dbs+    dump_set = foldl' go (unitVarSet fn) dbs       -- This dump-set could also be computed by splitDictBinds       --   (_,_,dump_set) = splitDictBinds dbs {fn}       -- But this variant is shorter@@ -2234,8 +2499,8 @@ --   * free_dbs does not depend on bndrs --   * dump_set = bndrs `union` bndrs(dump_dbs) splitDictBinds dbs bndr_set-   = foldlBag split_db (emptyBag, emptyBag, bndr_set) dbs-                -- Important that it's foldl not foldr;+   = foldl' split_db (emptyBag, emptyBag, bndr_set) dbs+                -- Important that it's foldl' not foldr;                 -- we're accumulating the set of dumped ids in dump_set    where     split_db (free_dbs, dump_dbs, dump_idset) db@(bind, fvs)@@ -2267,16 +2532,13 @@ ************************************************************************ -} -newtype SpecM a = SpecM (State SpecState a)+newtype SpecM a = SpecM (State SpecState a) deriving (Functor)  data SpecState = SpecState {                      spec_uniq_supply :: UniqSupply,                      spec_module :: Module,                      spec_dflags :: DynFlags                  }--instance Functor SpecM where-    fmap = liftM  instance Applicative SpecM where     pure x = SpecM $ return x
stgSyn/CoreToStg.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, DeriveFunctor #-}  -- -- (c) The GRASP/AQUA Project, Glasgow University, 1993-1998@@ -50,7 +50,7 @@  import Data.List.NonEmpty (nonEmpty, toList) import Data.Maybe    (fromMaybe)-import Control.Monad (liftM, ap)+import Control.Monad (ap)  -- Note [Live vs free] -- ~~~~~~~~~~~~~~~~~~~@@ -115,7 +115,7 @@ -- bitmap in each info table describing which entries of this table the closure -- references. ----- See also: Commentary/Rts/Storage/GC/CAFs on the GHC Wiki.+-- See also: commentary/rts/storage/gc/CAFs on the GHC Wiki.  -- Note [What is a non-escaping let] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -198,6 +198,26 @@ --                 do we set CCCS from it; so we just slam in --                 dontCareCostCentre. +-- Note [Coercion tokens]+-- ~~~~~~~~~~~~~~~~~~~~~~+-- In coreToStgArgs, we drop type arguments completely, but we replace+-- coercions with a special coercionToken# placeholder. Why? Consider:+--+--   f :: forall a. Int ~# Bool -> a+--   f = /\a. \(co :: Int ~# Bool) -> error "impossible"+--+-- If we erased the coercion argument completely, we’d end up with just+-- f = error "impossible", but then f `seq` () would be ⊥!+--+-- This is an artificial example, but back in the day we *did* treat+-- coercion lambdas like type lambdas, and we had bug reports as a+-- result. So now we treat coercion lambdas like value lambdas, but we+-- treat coercions themselves as zero-width arguments — coercionToken#+-- has representation VoidRep — which gets the best of both worlds.+--+-- (For the gory details, see also the (unpublished) paper, “Practical+-- aspects of evidence-based compilation in System FC.”)+ -- -------------------------------------------------------------- -- Setting variable info: top-level, binds, RHSs -- --------------------------------------------------------------@@ -263,12 +283,12 @@         how_bound = LetBound TopLet $! manifestArity rhs          (stg_rhs, ccs') =-            initCts env $+            initCts dflags env $               coreToTopStgRhs dflags ccs this_mod (id,rhs)          bind = StgTopLifted $ StgNonRec id stg_rhs     in-    assertConsistentCaInfo dflags id bind (ppr bind)+    assertConsistentCafInfo dflags id bind (ppr bind)       -- NB: previously the assertion printed 'rhs' and 'bind'       --     as well as 'id', but that led to a black hole       --     where printing the assertion error tripped the@@ -286,7 +306,7 @@          -- generate StgTopBindings and CAF cost centres created for CAFs         (ccs', stg_rhss)-          = initCts env' $ do+          = initCts dflags env' $ do                mapAccumLM (\ccs rhs -> do                             (rhs', ccs') <-                               coreToTopStgRhs dflags ccs this_mod rhs@@ -296,17 +316,17 @@          bind = StgTopLifted $ StgRec (zip binders stg_rhss)     in-    assertConsistentCaInfo dflags (head binders) bind (ppr binders)+    assertConsistentCafInfo dflags (head binders) bind (ppr binders)     (env', ccs', bind)  -- | CAF consistency issues will generally result in segfaults and are quite -- difficult to debug (see #16846). We enable checking of the -- 'consistentCafInfo' invariant with @-dstg-lint@ to increase the chance that -- we catch these issues.-assertConsistentCaInfo :: DynFlags -> Id -> StgTopBinding -> SDoc -> a -> a-assertConsistentCaInfo dflags id bind err_doc result+assertConsistentCafInfo :: DynFlags -> Id -> StgTopBinding -> SDoc -> a -> a+assertConsistentCafInfo dflags id bind err_doc result   | gopt Opt_DoStgLinting dflags || debugIsOn-  , not $ consistentCafInfo id bind = pprPanic "assertConsistentCaInfo" err_doc+  , not $ consistentCafInfo id bind = pprPanic "assertConsistentCafInfo" err_doc   | otherwise = result  -- Assertion helper: this checks that the CafInfo on the Id matches@@ -345,7 +365,7 @@         -- It's vital that the arity on a top-level Id matches         -- the arity of the generated STG binding, else an importing         -- module will use the wrong calling convention-        --      (Trac #2844 was an example where this happened)+        --      (#2844 was an example where this happened)         -- NB1: we can't move the assertion further out without         --      blocking the "knot" tied in coreTopBindsToStg         -- NB2: the arity check is only needed for Ids with External@@ -384,11 +404,13 @@   -- We lower 'LitRubbish' to @()@ here, which is much easier than doing it in   -- a STG to Cmm pass.   = coreToStgExpr (Var unitDataConId)-coreToStgExpr (Var v)      = coreToStgApp Nothing v               [] []-coreToStgExpr (Coercion _) = coreToStgApp Nothing coercionTokenId [] []+coreToStgExpr (Var v) = coreToStgApp v [] []+coreToStgExpr (Coercion _)+  -- See Note [Coercion tokens]+  = coreToStgApp coercionTokenId [] []  coreToStgExpr expr@(App _ _)-  = coreToStgApp Nothing f args ticks+  = coreToStgApp f args ticks   where     (f, args, ticks) = myCollectArgs expr @@ -502,18 +524,11 @@ -- Applications -- --------------------------------------------------------------------------- -coreToStgApp-         :: Maybe UpdateFlag            -- Just upd <=> this application is-                                        -- the rhs of a thunk binding-                                        --      x = [...] \upd [] -> the_app-                                        -- with specified update flag-        -> Id                           -- Function-        -> [CoreArg]                    -- Arguments-        -> [Tickish Id]                 -- Debug ticks-        -> CtsM StgExpr---coreToStgApp _ f args ticks = do+coreToStgApp :: Id            -- Function+             -> [CoreArg]     -- Arguments+             -> [Tickish Id]  -- Debug ticks+             -> CtsM StgExpr+coreToStgApp f args ticks = do     (args', ticks') <- coreToStgArgs args     how_bound <- lookupVarCts f @@ -552,7 +567,7 @@                  -- A regular foreign call.                 FCallId call     -> ASSERT( saturated )-                                    StgOpApp (StgFCallOp call (idUnique f)) args' res_ty+                                    StgOpApp (StgFCallOp call (idType f)) args' res_ty                  TickBoxOpId {}   -> pprPanic "coreToStg TickBox" $ ppr (f,args')                 _other           -> StgApp f args'@@ -576,7 +591,7 @@     (args', ts) <- coreToStgArgs args     return (args', ts) -coreToStgArgs (Coercion _ : args)  -- Coercion argument; replace with place holder+coreToStgArgs (Coercion _ : args) -- Coercion argument; See Note [Coercion tokens]   = do { (args', ts) <- coreToStgArgs args        ; return (StgVarArg coercionTokenId : args', ts) } @@ -605,16 +620,12 @@         -- This matters particularly when the function is a primop         -- or foreign call.         -- Wanted: a better solution than this hacky warning++    dflags <- getDynFlags     let-        arg_ty = exprType arg-        stg_arg_ty = stgArgType stg_arg-        bad_args = (isUnliftedType arg_ty && not (isUnliftedType stg_arg_ty))-                || (typePrimRep arg_ty /= typePrimRep stg_arg_ty)-        -- In GHCi we coerce an argument of type BCO# (unlifted) to HValue (lifted),-        -- and pass it to a function expecting an HValue (arg_ty).  This is ok because-        -- we can treat an unlifted value as lifted.  But the other way round-        -- we complain.-        -- We also want to check if a pointer is cast to a non-ptr etc+        arg_rep = typePrimRep (exprType arg)+        stg_arg_rep = typePrimRep (stgArgType stg_arg)+        bad_args = not (primRepsCompatible dflags arg_rep stg_arg_rep)      WARN( bad_args, text "Dangerous-looking argument. Probable cause: bad unsafeCoerce#" $$ ppr arg )      return (stg_arg : stg_args, ticks ++ aticks)@@ -644,8 +655,8 @@          -- Compute the new let-expression     let-        new_let | isJoinBind bind = StgLetNoEscape noExtSilent bind2 body2-                | otherwise       = StgLet noExtSilent bind2 body2+        new_let | isJoinBind bind = StgLetNoEscape noExtFieldSilent bind2 body2+                | otherwise       = StgLet noExtFieldSilent bind2 body2      return new_let   where@@ -688,7 +699,7 @@ mkTopStgRhs dflags this_mod ccs bndr rhs   | StgLam bndrs body <- rhs   = -- StgLam can't have empty arguments, so not CAF-    ( StgRhsClosure noExtSilent+    ( StgRhsClosure noExtFieldSilent                     dontCareCCS                     ReEntrant                     (toList bndrs) body@@ -704,19 +715,19 @@    -- Otherwise it's a CAF, see Note [Cost-centre initialization plan].   | gopt Opt_AutoSccsOnIndividualCafs dflags-  = ( StgRhsClosure noExtSilent+  = ( StgRhsClosure noExtFieldSilent                     caf_ccs                     upd_flag [] rhs     , collectCC caf_cc caf_ccs ccs )    | otherwise-  = ( StgRhsClosure noExtSilent+  = ( StgRhsClosure noExtFieldSilent                     all_cafs_ccs                     upd_flag [] rhs     , ccs )    where-    (_, unticked_rhs) = stripStgTicksTop (not . tickishIsCode) rhs+    unticked_rhs = stripStgTicksTopE (not . tickishIsCode) rhs      upd_flag | isUsedOnce (idDemandInfo bndr) = SingleEntry              | otherwise                      = Updatable@@ -738,14 +749,14 @@ mkStgRhs :: Id -> StgExpr -> StgRhs mkStgRhs bndr rhs   | StgLam bndrs body <- rhs-  = StgRhsClosure noExtSilent+  = StgRhsClosure noExtFieldSilent                   currentCCS                   ReEntrant                   (toList bndrs) body    | isJoinId bndr -- must be a nullary join point   = ASSERT(idJoinArity bndr == 0)-    StgRhsClosure noExtSilent+    StgRhsClosure noExtFieldSilent                   currentCCS                   ReEntrant -- ignored for LNE                   [] rhs@@ -754,11 +765,11 @@   = StgRhsCon currentCCS con args    | otherwise-  = StgRhsClosure noExtSilent+  = StgRhsClosure noExtFieldSilent                   currentCCS                   upd_flag [] rhs   where-    (_, unticked_rhs) = stripStgTicksTop (not . tickishIsCode) rhs+    unticked_rhs = stripStgTicksTopE (not . tickishIsCode) rhs      upd_flag | isUsedOnce (idDemandInfo bndr) = SingleEntry              | otherwise                      = Updatable@@ -823,9 +834,11 @@ -- *down*.  newtype CtsM a = CtsM-    { unCtsM :: IdEnv HowBound+    { unCtsM :: DynFlags -- Needed for checking for bad coercions in coreToStgArgs+             -> IdEnv HowBound              -> a     }+    deriving (Functor)  data HowBound   = ImportBound         -- Used only as a response to lookupBinding; never@@ -859,8 +872,8 @@  -- The std monad functions: -initCts :: IdEnv HowBound -> CtsM a -> a-initCts env m = unCtsM m env+initCts :: DynFlags -> IdEnv HowBound -> CtsM a -> a+initCts dflags env m = unCtsM m dflags env   @@ -868,14 +881,11 @@ {-# INLINE returnCts #-}  returnCts :: a -> CtsM a-returnCts e = CtsM $ \_ -> e+returnCts e = CtsM $ \_ _ -> e  thenCts :: CtsM a -> (a -> CtsM b) -> CtsM b-thenCts m k = CtsM $ \env-  -> unCtsM (k (unCtsM m env)) env--instance Functor CtsM where-    fmap = liftM+thenCts m k = CtsM $ \dflags env+  -> unCtsM (k (unCtsM m dflags env)) dflags env  instance Applicative CtsM where     pure = returnCts@@ -884,15 +894,18 @@ instance Monad CtsM where     (>>=)  = thenCts +instance HasDynFlags CtsM where+    getDynFlags = CtsM $ \dflags _ -> dflags+ -- Functions specific to this monad:  extendVarEnvCts :: [(Id, HowBound)] -> CtsM a -> CtsM a extendVarEnvCts ids_w_howbound expr-   =    CtsM $   \env-   -> unCtsM expr (extendVarEnvList env ids_w_howbound)+   =    CtsM $   \dflags env+   -> unCtsM expr dflags (extendVarEnvList env ids_w_howbound)  lookupVarCts :: Id -> CtsM HowBound-lookupVarCts v = CtsM $ \env -> lookupBinding env v+lookupVarCts v = CtsM $ \_ env -> lookupBinding env v  lookupBinding :: IdEnv HowBound -> Id -> HowBound lookupBinding env v = case lookupVarEnv env v of
stgSyn/StgLint.hs view
@@ -32,7 +32,8 @@ basic properties listed above. -} -{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, TypeFamilies #-}+{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, TypeFamilies,+  DeriveFunctor #-}  module StgLint ( lintStgTopBindings ) where @@ -258,6 +259,7 @@               -> Bag MsgDoc        -- Error messages so far               -> (a, Bag MsgDoc)   -- Result and error messages (if any)     }+    deriving (Functor)  data LintFlags = LintFlags { lf_unarised :: !Bool                              -- ^ have we run the unariser yet?@@ -292,9 +294,6 @@       Nothing   else       Just (vcat (punctuate blankLine (bagToList errs)))--instance Functor LintM where-      fmap = liftM  instance Applicative LintM where       pure a = LintM $ \_mod _lf _loc _scope errs -> (a, errs)
stgSyn/StgSubst.hs view
@@ -72,7 +72,7 @@ extendInScope id (Subst in_scope env) = Subst (in_scope `extendInScopeSet` id) env  -- | Add a substitution for an 'Id' to the 'Subst': you must ensure that the--- in-scope set is such that TyCORep Note [The substitution invariant]+-- in-scope set is such that TyCoSubst Note [The substitution invariant] -- holds after extending the substitution like this. extendSubst :: Id -> Id -> Subst -> Subst extendSubst id new_id (Subst in_scope env)
stgSyn/StgSyn.hs view
@@ -1,7 +1,8 @@ {- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -\section[StgSyn]{Shared term graph (STG) syntax for spineless-tagless code generation}+Shared term graph (STG) syntax for spineless-tagless code generation+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  This data type represents programs just before code generation (conversion to @Cmm@): basically, what we have is a stylised form of @CoreSyntax@, the style@@ -25,7 +26,7 @@         GenStgAlt, AltType(..),          StgPass(..), BinderP, XRhsClosure, XLet, XLetNoEscape,-        NoExtSilent, noExtSilent,+        NoExtFieldSilent, noExtFieldSilent,         OutputablePass,          UpdateFlag(..), isUpdatable,@@ -50,7 +51,7 @@         topStgBindHasCafRefs, stgArgHasCafRefs, stgRhsArity,         isDllConApp,         stgArgType,-        stripStgTicksTop,+        stripStgTicksTop, stripStgTicksTopE,         stgCaseBndrInScope,          pprStgBinding, pprGenStgTopBindings, pprStgTopBindings@@ -67,7 +68,6 @@ import Data.List   ( intersperse ) import DataCon import DynFlags-import FastString import ForeignCall ( ForeignCall ) import Id import IdInfo      ( mayHaveCafRefs )@@ -76,13 +76,12 @@ import Module      ( Module ) import Outputable import Packages    ( isDllName )-import Platform+import GHC.Platform import PprCore     ( {- instances -} ) import PrimOp      ( PrimOp, PrimCall ) import TyCon       ( PrimRep(..), TyCon ) import Type        ( Type ) import RepType     ( typePrimRep1 )-import Unique      ( Unique ) import Util  import Data.List.NonEmpty ( NonEmpty, toList )@@ -90,14 +89,13 @@ {- ************************************************************************ *                                                                      *-\subsection{@GenStgBinding@}+GenStgBinding *                                                                      * ************************************************************************ -As usual, expressions are interesting; other things are boring. Here-are the boring things [except note the @GenStgRhs@], parameterised-with respect to binder and occurrence information (just as in-@CoreSyn@):+As usual, expressions are interesting; other things are boring. Here are the+boring things (except note the @GenStgRhs@), parameterised with respect to+binder and occurrence information (just as in @CoreSyn@): -}  -- | A top-level binding.@@ -113,7 +111,7 @@ {- ************************************************************************ *                                                                      *-\subsection{@StgArg@}+StgArg *                                                                      * ************************************************************************ -}@@ -122,8 +120,8 @@   = StgVarArg  Id   | StgLitArg  Literal --- | Does this constructor application refer to--- anything in a different *Windows* DLL?+-- | Does this constructor application refer to anything in a different+-- *Windows* DLL? -- If so, we can't allocate it statically isDllConApp :: DynFlags -> Module -> DataCon -> [StgArg] -> Bool isDllConApp dflags this_mod con args@@ -138,17 +136,22 @@                              && isDllName dflags this_mod (idName v)     is_dll_arg _             = False --- True of machine addresses; these are the things that don't--- work across DLLs. The key point here is that VoidRep comes--- out False, so that a top level nullary GADT constructor is--- False for isDllConApp+-- True of machine addresses; these are the things that don't work across DLLs.+-- The key point here is that VoidRep comes out False, so that a top level+-- nullary GADT constructor is False for isDllConApp+-- --    data T a where --      T1 :: T Int+-- -- gives+-- --    T1 :: forall a. (a~Int) -> T a+-- -- and hence the top-level binding+-- --    $WT1 :: T Int --    $WT1 = T1 Int (Coercion (Refl Int))+-- -- The coercion argument here gets VoidRep isAddrRep :: PrimRep -> Bool isAddrRep AddrRep     = True@@ -164,12 +167,18 @@ stgArgType (StgLitArg lit) = literalType lit  --- | Strip ticks of a given type from an STG expression+-- | Strip ticks of a given type from an STG expression. stripStgTicksTop :: (Tickish Id -> Bool) -> GenStgExpr p -> ([Tickish Id], GenStgExpr p) stripStgTicksTop p = go []    where go ts (StgTick t e) | p t = go (t:ts) e          go ts other               = (reverse ts, other) +-- | Strip ticks of a given type from an STG expression returning only the expression.+stripStgTicksTopE :: (Tickish Id -> Bool) -> GenStgExpr p -> GenStgExpr p+stripStgTicksTopE p = go+   where go (StgTick t e) | p t = go e+         go other               = other+ -- | Given an alt type and whether the program is unarised, return whether the -- case binder is in scope. --@@ -186,26 +195,25 @@ {- ************************************************************************ *                                                                      *-\subsection{STG expressions}+STG expressions *                                                                      * ************************************************************************ -The @GenStgExpr@ data type is parameterised on binder and occurrence-info, as before.+The @GenStgExpr@ data type is parameterised on binder and occurrence info, as+before.  ************************************************************************ *                                                                      *-\subsubsection{@GenStgExpr@ application}+GenStgExpr *                                                                      * ************************************************************************ -An application is of a function to a list of atoms [not expressions].-Operationally, we want to push the arguments on the stack and call the-function. (If the arguments were expressions, we would have to build-their closures first.)+An application is of a function to a list of atoms (not expressions).+Operationally, we want to push the arguments on the stack and call the function.+(If the arguments were expressions, we would have to build their closures+first.) -There is no constructor for a lone variable; it would appear as-@StgApp var []@.+There is no constructor for a lone variable; it would appear as @StgApp var []@. -}  data GenStgExpr pass@@ -216,18 +224,18 @@ {- ************************************************************************ *                                                                      *-\subsubsection{@StgConApp@ and @StgPrimApp@---saturated applications}+StgConApp and StgPrimApp --- saturated applications *                                                                      * ************************************************************************ -There are specialised forms of application, for constructors,-primitives, and literals.+There are specialised forms of application, for constructors, primitives, and+literals. -}    | StgLit      Literal          -- StgConApp is vital for returning unboxed tuples or sums-        -- which can't be let-bound first+        -- which can't be let-bound   | StgConApp   DataCon                 [StgArg] -- Saturated                 [Type]   -- See Note [Types in StgConApp] in UnariseStg@@ -241,13 +249,13 @@ {- ************************************************************************ *                                                                      *-\subsubsection{@StgLam@}+StgLam *                                                                      * ************************************************************************ -StgLam is used *only* during CoreToStg's work. Before CoreToStg has-finished it encodes (\x -> e) as (let f = \x -> e in f)-TODO: Encode this via an extension to GenStgExpr à la TTG.+StgLam is used *only* during CoreToStg's work. Before CoreToStg has finished it+encodes (\x -> e) as (let f = \x -> e in f) TODO: Encode this via an extension+to GenStgExpr à la TTG. -}    | StgLam@@ -257,7 +265,7 @@ {- ************************************************************************ *                                                                      *-\subsubsection{@GenStgExpr@: case-expressions}+GenStgExpr: case-expressions *                                                                      * ************************************************************************ @@ -275,94 +283,75 @@ {- ************************************************************************ *                                                                      *-\subsubsection{@GenStgExpr@: @let(rec)@-expressions}+GenStgExpr: let(rec)-expressions *                                                                      * ************************************************************************ -The various forms of let(rec)-expression encode most of the-interesting things we want to do.-\begin{enumerate}-\item-\begin{verbatim}-let-closure x = [free-vars] [args] expr-in e-\end{verbatim}-is equivalent to-\begin{verbatim}-let x = (\free-vars -> \args -> expr) free-vars-\end{verbatim}-\tr{args} may be empty (and is for most closures).  It isn't under-circumstances like this:-\begin{verbatim}-let x = (\y -> y+z)-\end{verbatim}-This gets mangled to-\begin{verbatim}-let-closure x = [z] [y] (y+z)-\end{verbatim}-The idea is that we compile code for @(y+z)@ in an environment in which-@z@ is bound to an offset from \tr{Node}, and @y@ is bound to an-offset from the stack pointer.+The various forms of let(rec)-expression encode most of the interesting things+we want to do. -(A let-closure is an @StgLet@ with a @StgRhsClosure@ RHS.)+-   let-closure x = [free-vars] [args] expr in e -\item-\begin{verbatim}-let-constructor x = Constructor [args]-in e-\end{verbatim}+  is equivalent to -(A let-constructor is an @StgLet@ with a @StgRhsCon@ RHS.)+    let x = (\free-vars -> \args -> expr) free-vars -\item-Letrec-expressions are essentially the same deal as-let-closure/let-constructor, so we use a common structure and-distinguish between them with an @is_recursive@ boolean flag.+  @args@ may be empty (and is for most closures). It isn't under circumstances+  like this: -\item-\begin{verbatim}-let-unboxed u = an arbitrary arithmetic expression in unboxed values-in e-\end{verbatim}-All the stuff on the RHS must be fully evaluated.-No function calls either!+    let x = (\y -> y+z) -(We've backed away from this toward case-expressions with-suitably-magical alts ...)+  This gets mangled to -\item-~[Advanced stuff here! Not to start with, but makes pattern matching-generate more efficient code.]+    let-closure x = [z] [y] (y+z) -\begin{verbatim}-let-escapes-not fail = expr-in e'-\end{verbatim}-Here the idea is that @e'@ guarantees not to put @fail@ in a data structure,-or pass it to another function. All @e'@ will ever do is tail-call @fail@.-Rather than build a closure for @fail@, all we need do is to record the stack-level at the moment of the @let-escapes-not@; then entering @fail@ is just-a matter of adjusting the stack pointer back down to that point and entering-the code for it.+  The idea is that we compile code for @(y+z)@ in an environment in which @z@ is+  bound to an offset from Node, and `y` is bound to an offset from the stack+  pointer. -Another example:-\begin{verbatim}-f x y = let z = huge-expression in-        if y==1 then z else-        if y==2 then z else-        1-\end{verbatim}+  (A let-closure is an @StgLet@ with a @StgRhsClosure@ RHS.) -(A let-escapes-not is an @StgLetNoEscape@.)+-   let-constructor x = Constructor [args] in e -\item-We may eventually want:-\begin{verbatim}-let-literal x = Literal-in e-\end{verbatim}-\end{enumerate}+  (A let-constructor is an @StgLet@ with a @StgRhsCon@ RHS.) +- Letrec-expressions are essentially the same deal as let-closure/+  let-constructor, so we use a common structure and distinguish between them+  with an @is_recursive@ boolean flag.++-   let-unboxed u = <an arbitrary arithmetic expression in unboxed values> in e++  All the stuff on the RHS must be fully evaluated. No function calls either!++  (We've backed away from this toward case-expressions with suitably-magical+  alts ...)++- Advanced stuff here! Not to start with, but makes pattern matching generate+  more efficient code.++    let-escapes-not fail = expr+    in e'++  Here the idea is that @e'@ guarantees not to put @fail@ in a data structure,+  or pass it to another function. All @e'@ will ever do is tail-call @fail@.+  Rather than build a closure for @fail@, all we need do is to record the stack+  level at the moment of the @let-escapes-not@; then entering @fail@ is just a+  matter of adjusting the stack pointer back down to that point and entering the+  code for it.++  Another example:++    f x y = let z = huge-expression in+            if y==1 then z else+            if y==2 then z else+            1++  (A let-escapes-not is an @StgLetNoEscape@.)++- We may eventually want:++    let-literal x = Literal in e+ And so the code for let(rec)-things: -} @@ -377,11 +366,11 @@         (GenStgExpr pass)       -- body  {--%************************************************************************-%*                                                                      *-\subsubsection{@GenStgExpr@: @hpc@, @scc@ and other debug annotations}-%*                                                                      *-%************************************************************************+*************************************************************************+*                                                                      *+GenStgExpr: hpc, scc and other debug annotations+*                                                                      *+*************************************************************************  Finally for @hpc@ expressions we introduce a new STG construct. -}@@ -395,12 +384,12 @@ {- ************************************************************************ *                                                                      *-\subsection{STG right-hand sides}+STG right-hand sides *                                                                      * ************************************************************************ -Here's the rest of the interesting stuff for @StgLet@s; the first-flavour is for closures:+Here's the rest of the interesting stuff for @StgLet@s; the first flavour is for+closures: -}  data GenStgRhs pass@@ -415,18 +404,19 @@  {- An example may be in order.  Consider:-\begin{verbatim}-let t = \x -> \y -> ... x ... y ... p ... q in e-\end{verbatim}++  let t = \x -> \y -> ... x ... y ... p ... q in e+ Pulling out the free vars and stylising somewhat, we get the equivalent:-\begin{verbatim}-let t = (\[p,q] -> \[x,y] -> ... x ... y ... p ...q) p q-\end{verbatim}-Stg-operationally, the @[x,y]@ are on the stack, the @[p,q]@ are-offsets from @Node@ into the closure, and the code ptr for the closure-will be exactly that in parentheses above. -The second flavour of right-hand-side is for constructors (simple but important):+  let t = (\[p,q] -> \[x,y] -> ... x ... y ... p ...q) p q++Stg-operationally, the @[x,y]@ are on the stack, the @[p,q]@ are offsets from+@Node@ into the closure, and the code ptr for the closure will be exactly that+in parentheses above.++The second flavour of right-hand-side is for constructors (simple but+important): -}    | StgRhsCon@@ -445,20 +435,20 @@   | LiftLams   | CodeGen --- | Like 'HsExpression.NoExt', but with an 'Outputable' instance that returns--- 'empty'.-data NoExtSilent = NoExtSilent+-- | Like 'GHC.Hs.Extension.NoExtField', but with an 'Outputable' instance that+-- returns 'empty'.+data NoExtFieldSilent = NoExtFieldSilent   deriving (Data, Eq, Ord) -instance Outputable NoExtSilent where+instance Outputable NoExtFieldSilent where   ppr _ = empty  -- | Used when constructing a term with an unused extension point that should -- not appear in pretty-printed output at all.-noExtSilent :: NoExtSilent-noExtSilent = NoExtSilent--- TODO: Maybe move this to HsExtensions? I'm not sure about the implications--- on build time...+noExtFieldSilent :: NoExtFieldSilent+noExtFieldSilent = NoExtFieldSilent+-- TODO: Maybe move this to GHC.Hs.Extension? I'm not sure about the+-- implications on build time...  -- TODO: Do we really want to the extension point type families to have a closed -- domain?@@ -467,17 +457,17 @@ type instance BinderP 'CodeGen = Id  type family XRhsClosure (pass :: StgPass)-type instance XRhsClosure 'Vanilla = NoExtSilent+type instance XRhsClosure 'Vanilla = NoExtFieldSilent -- | Code gen needs to track non-global free vars type instance XRhsClosure 'CodeGen = DIdSet  type family XLet (pass :: StgPass)-type instance XLet 'Vanilla = NoExtSilent-type instance XLet 'CodeGen = NoExtSilent+type instance XLet 'Vanilla = NoExtFieldSilent+type instance XLet 'CodeGen = NoExtFieldSilent  type family XLetNoEscape (pass :: StgPass)-type instance XLetNoEscape 'Vanilla = NoExtSilent-type instance XLetNoEscape 'CodeGen = NoExtSilent+type instance XLetNoEscape 'Vanilla = NoExtFieldSilent+type instance XLetNoEscape 'CodeGen = NoExtFieldSilent  stgRhsArity :: StgRhs -> Int stgRhsArity (StgRhsClosure _ _ _ bndrs _)@@ -564,20 +554,19 @@ {- ************************************************************************ *                                                                      *-\subsection[Stg-case-alternatives]{STG case alternatives}+STG case alternatives *                                                                      * ************************************************************************  Very like in @CoreSyntax@ (except no type-world stuff). -The type constructor is guaranteed not to be abstract; that is, we can-see its representation. This is important because the code generator-uses it to determine return conventions etc. But it's not trivial-where there's a module loop involved, because some versions of a type-constructor might not have all the constructors visible. So-mkStgAlgAlts (in CoreToStg) ensures that it gets the TyCon from the-constructors or literals (which are guaranteed to have the Real McCoy)-rather than from the scrutinee type.+The type constructor is guaranteed not to be abstract; that is, we can see its+representation. This is important because the code generator uses it to+determine return conventions etc. But it's not trivial where there's a module+loop involved, because some versions of a type constructor might not have all+the constructors visible. So mkStgAlgAlts (in CoreToStg) ensures that it gets+the TyCon from the constructors or literals (which are guaranteed to have the+Real McCoy) rather than from the scrutinee type. -}  type GenStgAlt pass@@ -596,7 +585,7 @@ {- ************************************************************************ *                                                                      *-\subsection[Stg]{The Plain STG parameterisation}+The Plain STG parameterisation *                                                                      * ************************************************************************ @@ -643,17 +632,16 @@  ************************************************************************ *                                                                      *-\subsubsection[UpdateFlag-datatype]{@UpdateFlag@}+UpdateFlag *                                                                      * ************************************************************************  This is also used in @LambdaFormInfo@ in the @ClosureInfo@ module. -A @ReEntrant@ closure may be entered multiple times, but should not be-updated or blackholed. An @Updatable@ closure should be updated after-evaluation (and may be blackholed during evaluation). A @SingleEntry@-closure will only be entered once, and so need not be updated but may-safely be blackholed.+A @ReEntrant@ closure may be entered multiple times, but should not be updated+or blackholed. An @Updatable@ closure should be updated after evaluation (and+may be blackholed during evaluation). A @SingleEntry@ closure will only be+entered once, and so need not be updated but may safely be blackholed. -}  data UpdateFlag = ReEntrant | Updatable | SingleEntry@@ -672,13 +660,12 @@ {- ************************************************************************ *                                                                      *-\subsubsection{StgOp}+StgOp *                                                                      * ************************************************************************ -An StgOp allows us to group together PrimOps and ForeignCalls.-It's quite useful to move these around together, notably-in StgOpApp and COpStmt.+An StgOp allows us to group together PrimOps and ForeignCalls. It's quite useful+to move these around together, notably in StgOpApp and COpStmt. -}  data StgOp@@ -686,20 +673,21 @@    | StgPrimCallOp PrimCall -  | StgFCallOp ForeignCall Unique-        -- The Unique is occasionally needed by the C pretty-printer-        -- (which lacks a unique supply), notably when generating a-        -- typedef for foreign-export-dynamic+  | StgFCallOp ForeignCall Type+        -- The Type, which is obtained from the foreign import declaration+        -- itself, is needed by the stg-to-cmm pass to determine the offset to+        -- apply to unlifted boxed arguments in GHC.StgToCmm.Foreign. See Note+        -- [Unlifted boxed arguments to foreign calls]  {- ************************************************************************ *                                                                      *-\subsection[Stg-pretty-printing]{Pretty-printing}+Pretty-printing *                                                                      * ************************************************************************ -Robin Popplestone asked for semi-colon separators on STG binds; here's-hoping he likes terminators instead...  Ditto for case alternatives.+Robin Popplestone asked for semi-colon separators on STG binds; here's hoping he+likes terminators instead...  Ditto for case alternatives. -}  type OutputablePass pass =@@ -726,7 +714,7 @@  pprGenStgBinding (StgRec pairs)   = vcat [ text "Rec {"-         , vcat (map ppr_bind pairs)+         , vcat (intersperse blankLine (map ppr_bind pairs))          , text "end Rec }" ]   where     ppr_bind (bndr, expr)@@ -831,19 +819,32 @@     else sep [ ppr tickish, pprStgExpr expr ]  +-- Don't indent for a single case alternative.+pprStgExpr (StgCase expr bndr alt_type [alt])+  = sep [sep [text "case",+           nest 4 (hsep [pprStgExpr expr,+             whenPprDebug (dcolon <+> ppr alt_type)]),+           text "of", pprBndr CaseBind bndr, char '{'],+           pprStgAlt False alt,+           char '}']+ pprStgExpr (StgCase expr bndr alt_type alts)   = sep [sep [text "case",            nest 4 (hsep [pprStgExpr expr,              whenPprDebug (dcolon <+> ppr alt_type)]),            text "of", pprBndr CaseBind bndr, char '{'],-           nest 2 (vcat (map pprStgAlt alts)),+           nest 2 (vcat (map (pprStgAlt True) alts)),            char '}'] -pprStgAlt :: OutputablePass pass => GenStgAlt pass -> SDoc-pprStgAlt (con, params, expr)-  = hang (hsep [ppr con, sep (map (pprBndr CasePatBind) params), text "->"])-         4 (ppr expr <> semi) +pprStgAlt :: OutputablePass pass => Bool -> GenStgAlt pass -> SDoc+pprStgAlt indent (con, params, expr)+  | indent    = hang altPattern 4 (ppr expr <> semi)+  | otherwise = sep [altPattern, ppr expr <> semi]+    where+      altPattern = (hsep [ppr con, sep (map (pprBndr CasePatBind) params), text "->"])++ pprStgOp :: StgOp -> SDoc pprStgOp (StgPrimOp  op)   = ppr op pprStgOp (StgPrimCallOp op)= ppr op@@ -857,15 +858,6 @@  pprStgRhs :: OutputablePass pass => GenStgRhs pass -> SDoc --- special case-pprStgRhs (StgRhsClosure ext cc upd_flag [{-no args-}] (StgApp func []))-  = sdocWithDynFlags $ \dflags ->-    hsep [ ppr cc,-           if not $ gopt Opt_SuppressStgExts dflags-             then ppr ext else empty,-           text " \\", ppr upd_flag, ptext (sLit " [] "), ppr func ]---- general case pprStgRhs (StgRhsClosure ext cc upd_flag args body)   = sdocWithDynFlags $ \dflags ->     hang (hsep [if gopt Opt_SccProfilingOn dflags then ppr cc else empty,
stranal/DmdAnal.hs view
@@ -23,7 +23,7 @@ import Outputable import VarEnv import BasicTypes-import Data.List+import Data.List        ( mapAccumL, sortBy ) import DataCon import Id import CoreUtils        ( exprIsHNF, exprType, exprIsTrivial, exprOkForSpeculation )@@ -93,7 +93,7 @@ no references holding on to the input Core program.  This makes a ~30% reduction in peak memory usage when compiling-DynFlags (cf Trac #9675 and #13426).+DynFlags (cf #9675 and #13426).  This is particularly important when we are doing late demand analysis, since we don't do a seqBinds at any point thereafter. Hence code@@ -189,7 +189,7 @@ dmdAnal' env dmd (App fun arg)   = -- This case handles value arguments (type args handled above)     -- Crucially, coercions /are/ handled here, because they are-    -- value arguments (Trac #10288)+    -- value arguments (#10288)     let         call_dmd          = mkCallDmd dmd         (fun_ty, fun')    = dmdAnal env call_dmd fun@@ -206,7 +206,6 @@ --         , text "overall res dmd_ty =" <+> ppr (res_ty `bothDmdType` arg_ty) ])     (res_ty `bothDmdType` arg_ty, App fun' arg') --- this is an anonymous lambda, since @dmdAnalRhsLetDown@ uses @collectBinders@ dmdAnal' env dmd (Lam var body)   | isTyVar var   = let@@ -286,10 +285,7 @@ -- This is used for a non-recursive local let without manifest lambdas. -- This is the LetUp rule in the paper “Higher-Order Cardinality Analysis”. dmdAnal' env dmd (Let (NonRec id rhs) body)-  | useLetUp id rhs-  , Nothing <- unpackTrivial rhs-      -- dmdAnalRhsLetDown treats trivial right hand sides specially-      -- so if we have a trival right hand side, fall through to that.+  | useLetUp id   = (final_ty, Let (NonRec id' rhs') body')   where     (body_ty, body')   = dmdAnal env dmd body@@ -376,7 +372,7 @@         other      -> return () So the 'y' isn't necessarily going to be evaluated -A more complete example (Trac #148, #1592) where this shows up is:+A more complete example (#148, #1592) where this shows up is:      do { let len = <expensive> ;         ; when (...) (exitWith ExitSuccess)         ; print len }@@ -582,25 +578,6 @@  -} --- Trivial RHS--- See Note [Demand analysis for trivial right-hand sides]-dmdAnalTrivialRhs ::-    AnalEnv -> Id -> CoreExpr -> Var ->-    (DmdEnv, Id, CoreExpr)-dmdAnalTrivialRhs env id rhs fn-  = (fn_fv, set_idStrictness env id fn_str, rhs)-  where-    fn_str = getStrictness env fn-    fn_fv | isLocalId fn = unitVarEnv fn topDmd-          | otherwise    = emptyDmdEnv-    -- Note [Remember to demand the function itself]-    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-    -- fn_fv: don't forget to produce a demand for fn itself-    -- Lacking this caused Trac #9128-    -- The demand is very conservative (topDmd), but that doesn't-    -- matter; trivial bindings are usually inlined, so it only-    -- kicks in for top-level bindings and NOINLINE bindings- -- Let bindings can be processed in two ways: -- Down (RHS before body) or Up (body before RHS). -- dmdAnalRhsLetDown implements the Down variant:@@ -621,28 +598,23 @@ -- Process the RHS of the binding, add the strictness signature -- to the Id, and augment the environment with the signature as well. dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs-  | Just fn <- unpackTrivial rhs   -- See Note [Demand analysis for trivial right-hand sides]-  = dmdAnalTrivialRhs env id rhs fn--  | otherwise-  = (lazy_fv, id', mkLams bndrs' body')+  = (lazy_fv, id', rhs')   where-    (bndrs, body, body_dmd)-       = case isJoinId_maybe id of-           Just join_arity  -- See Note [Demand analysis for join points]-                   | (bndrs, body) <- collectNBinders join_arity rhs-                   -> (bndrs, body, let_dmd)--           Nothing | (bndrs, body) <- collectBinders rhs-                   -> (bndrs, body, mkBodyDmd env body)--    env_body         = foldl' extendSigsWithLam env bndrs-    (body_ty, body') = dmdAnal env_body body_dmd body-    body_ty'         = removeDmdTyArgs body_ty -- zap possible deep CPR info-    (DmdType rhs_fv rhs_dmds rhs_res, bndrs')-                     = annotateLamBndrs env (isDFunId id) body_ty' bndrs-    sig_ty           = mkStrictSig (mkDmdType sig_fv rhs_dmds rhs_res')-    id'              = set_idStrictness env id sig_ty+    rhs_arity      = idArity id+    rhs_dmd+      -- See Note [Demand analysis for join points]+      -- See Note [Invariants on join points] invariant 2b, in CoreSyn+      --     rhs_arity matches the join arity of the join point+      | isJoinId id+      = mkCallDmds rhs_arity let_dmd+      | otherwise+      -- NB: rhs_arity+      -- See Note [Demand signatures are computed for a threshold demand based on idArity]+      = mkRhsDmd env rhs_arity rhs+    (DmdType rhs_fv rhs_dmds rhs_res, rhs')+                   = dmdAnal env rhs_dmd rhs+    sig            = mkStrictSigForArity rhs_arity (mkDmdType sig_fv rhs_dmds rhs_res')+    id'            = set_idStrictness env id sig         -- See Note [NOINLINE and strictness]  @@ -666,36 +638,63 @@        || not (isStrictDmd (idDemandInfo id) || ae_virgin env)           -- See Note [Optimistic CPR in the "virgin" case] -mkBodyDmd :: AnalEnv -> CoreExpr -> CleanDemand--- See Note [Product demands for function body]-mkBodyDmd env body-  = case deepSplitProductType_maybe (ae_fam_envs env) (exprType body) of-       Nothing            -> cleanEvalDmd-       Just (dc, _, _, _) -> cleanEvalProdDmd (dataConRepArity dc)--unpackTrivial :: CoreExpr -> Maybe Id--- Returns (Just v) if the arg is really equal to v, modulo--- casts, type applications etc--- See Note [Demand analysis for trivial right-hand sides]-unpackTrivial (Var v)                 = Just v-unpackTrivial (Cast e _)              = unpackTrivial e-unpackTrivial (Lam v e) | isTyVar v   = unpackTrivial e-unpackTrivial (App e a) | isTypeArg a = unpackTrivial e-unpackTrivial _                       = Nothing+-- | @mkRhsDmd env rhs_arity rhs@ creates a 'CleanDemand' for+-- unleashing on the given function's @rhs@, by creating a call demand of+-- @rhs_arity@ with a body demand appropriate for possible product types.+-- See Note [Product demands for function body].+-- For example, a call of the form @mkRhsDmd _ 2 (\x y -> (x, y))@ returns a+-- clean usage demand of @C1(C1(U(U,U)))@.+mkRhsDmd :: AnalEnv -> Arity -> CoreExpr -> CleanDemand+mkRhsDmd env rhs_arity rhs =+  case peelTsFuns rhs_arity (findTypeShape (ae_fam_envs env) (exprType rhs)) of+    Just (TsProd tss) -> mkCallDmds rhs_arity (cleanEvalProdDmd (length tss))+    _                 -> mkCallDmds rhs_arity cleanEvalDmd --- | If given the RHS of a let-binding, this 'useLetUp' determines--- whether we should process the binding up (body before rhs) or--- down (rhs before body).+-- | If given the let-bound 'Id', 'useLetUp' determines whether we should+-- process the binding up (body before rhs) or down (rhs before body). ----- We use LetDown if there is a chance to get a useful strictness signature.--- This is the case when there are manifest value lambdas or the binding is a--- join point (hence always acts like a function, not a value).-useLetUp :: Var -> CoreExpr -> Bool-useLetUp f _         | isJoinId f = False-useLetUp f (Lam v e) | isTyVar v  = useLetUp f e-useLetUp _ (Lam _ _)              = False-useLetUp _ _                      = True-+-- We use LetDown if there is a chance to get a useful strictness signature to+-- unleash at call sites. LetDown is generally more precise than LetUp if we can+-- correctly guess how it will be used in the body, that is, for which incoming+-- demand the strictness signature should be computed, which allows us to+-- unleash higher-order demands on arguments at call sites. This is mostly the+-- case when+--+--   * The binding takes any arguments before performing meaningful work (cf.+--     'idArity'), in which case we are interested to see how it uses them.+--   * The binding is a join point, hence acting like a function, not a value.+--     As a big plus, we know *precisely* how it will be used in the body; since+--     it's always tail-called, we can directly unleash the incoming demand of+--     the let binding on its RHS when computing a strictness signature. See+--     [Demand analysis for join points].+--+-- Thus, if the binding is not a join point and its arity is 0, we have a thunk+-- and use LetUp, implying that we have no usable demand signature available+-- when we analyse the let body.+--+-- Since thunk evaluation is memoised, we want to unleash its 'DmdEnv' of free+-- vars at most once, regardless of how many times it was forced in the body.+-- This makes a real difference wrt. usage demands. The other reason is being+-- able to unleash a more precise product demand on its RHS once we know how the+-- thunk was used in the let body.+--+-- Characteristic examples, always assuming a single evaluation:+--+--   * @let x = 2*y in x + x@ => LetUp. Compared to LetDown, we find out that+--     the expression uses @y@ at most once.+--   * @let x = (a,b) in fst x@ => LetUp. Compared to LetDown, we find out that+--     @b@ is absent.+--   * @let f x = x*2 in f y@ => LetDown. Compared to LetUp, we find out that+--     the expression uses @y@ strictly, because we have @f@'s demand signature+--     available at the call site.+--   * @join exit = 2*y in if a then exit else if b then exit else 3*y@ =>+--     LetDown. Compared to LetUp, we find out that the expression uses @y@+--     strictly, because we can unleash @exit@'s signature at each call site.+--   * For a more convincing example with join points, see Note [Demand analysis+--     for join points].+--+useLetUp :: Var -> Bool+useLetUp f = idArity f == 0 && not (isJoinId f)  {- Note [Demand analysis for join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -726,24 +725,158 @@ analyse its body with the demand from the entire join-binding (written let_dmd here). -Another win for join points!  Trac #13543.+Another win for join points!  #13543. +However, note that the strictness signature for a join point can+look a little puzzling.  E.g.++    (join j x = \y. error "urk")+    (in case v of              )+    (     A -> j 3             )  x+    (     B -> j 4             )+    (     C -> \y. blah        )++The entire thing is in a C(S) context, so j's strictness signature+will be    [A]b+meaning one absent argument, returns bottom.  That seems odd because+there's a \y inside.  But it's right because when consumed in a C(1)+context the RHS of the join point is indeed bottom.++Note [Demand signatures are computed for a threshold demand based on idArity]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We compute demand signatures assuming idArity incoming arguments to approximate+behavior for when we have a call site with at least that many arguments. idArity+is /at least/ the number of manifest lambdas, but might be higher for PAPs and+trivial RHS (see Note [Demand analysis for trivial right-hand sides]).++Because idArity of a function varies independently of its cardinality properties+(cf. Note [idArity varies independently of dmdTypeDepth]), we implicitly encode+the arity for when a demand signature is sound to unleash in its 'dmdTypeDepth'+(cf. Note [Understanding DmdType and StrictSig] in Demand). It is unsound to+unleash a demand signature when the incoming number of arguments is less than+that. See Note [What are demand signatures?] for more details on soundness.++Why idArity arguments? Because that's a conservative estimate of how many+arguments we must feed a function before it does anything interesting with them.+Also it elegantly subsumes the trivial RHS and PAP case.++There might be functions for which we might want to analyse for more incoming+arguments than idArity. Example:++  f x =+    if expensive+      then \y -> ... y ...+      else \y -> ... y ...++We'd analyse `f` under a unary call demand C(S), corresponding to idArity+being 1. That's enough to look under the manifest lambda and find out how a+unary call would use `x`, but not enough to look into the lambdas in the if+branches.++On the other hand, if we analysed for call demand C(C(S)), we'd get useful+strictness info for `y` (and more precise info on `x`) and possibly CPR+information, but++  * We would no longer be able to unleash the signature at unary call sites+  * Performing the worker/wrapper split based on this information would be+    implicitly eta-expanding `f`, playing fast and loose with divergence and+    even being unsound in the presence of newtypes, so we refrain from doing so.+    Also see Note [Don't eta expand in w/w] in WorkWrap.++Since we only compute one signature, we do so for arity 1. Computing multiple+signatures for different arities (i.e., polyvariance) would be entirely+possible, if it weren't for the additional runtime and implementation+complexity.++Note [idArity varies independently of dmdTypeDepth]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We used to check in CoreLint that dmdTypeDepth <= idArity for a let-bound+identifier. But that means we would have to zap demand signatures every time we+reset or decrease arity. That's an unnecessary dependency, because++  * The demand signature captures a semantic property that is independent of+    what the binding's current arity is+  * idArity is analysis information itself, thus volatile+  * We already *have* dmdTypeDepth, wo why not just use it to encode the+    threshold for when to unleash the signature+    (cf. Note [Understanding DmdType and StrictSig] in Demand)++Consider the following expression, for example:++    (let go x y = `x` seq ... in go) |> co++`go` might have a strictness signature of `<S><L>`. The simplifier will identify+`go` as a nullary join point through `joinPointBinding_maybe` and float the+coercion into the binding, leading to an arity decrease:++    join go = (\x y -> `x` seq ...) |> co in go++With the CoreLint check, we would have to zap `go`'s perfectly viable strictness+signature.++Note [What are demand signatures?]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Demand analysis interprets expressions in the abstract domain of demand+transformers. Given an incoming demand we put an expression under, its abstract+transformer gives us back a demand type denoting how other things (like+arguments and free vars) were used when the expression was evaluated.+Here's an example:++  f x y =+    if x + expensive+      then \z -> z + y * ...+      else \z -> z * ...++The abstract transformer (let's call it F_e) of the if expression (let's call it+e) would transform an incoming head demand <S,HU> into a demand type like+{x-><S,1*U>,y-><L,U>}<L,U>. In pictures:++     Demand ---F_e---> DmdType+     <S,HU>            {x-><S,1*U>,y-><L,U>}<L,U>++Let's assume that the demand transformers we compute for an expression are+correct wrt. to some concrete semantics for Core. How do demand signatures fit+in? They are strange beasts, given that they come with strict rules when to+it's sound to unleash them.++Fortunately, we can formalise the rules with Galois connections. Consider+f's strictness signature, {}<S,1*U><L,U>. It's a single-point approximation of+the actual abstract transformer of f's RHS for arity 2. So, what happens is that+we abstract *once more* from the abstract domain we already are in, replacing+the incoming Demand by a simple lattice with two elements denoting incoming+arity: A_2 = {<2, >=2} (where '<2' is the top element and >=2 the bottom+element). Here's the diagram:++     A_2 -----f_f----> DmdType+      ^                   |+      | α               γ |+      |                   v+     Demand ---F_f---> DmdType++With+  α(C1(C1(_))) = >=2 -- example for usage demands, but similar for strictness+  α(_)         =  <2+  γ(ty)        =  ty+and F_f being the abstract transformer of f's RHS and f_f being the abstracted+abstract transformer computable from our demand signature simply by++  f_f(>=2) = {}<S,1*U><L,U>+  f_f(<2)  = postProcessUnsat {}<S,1*U><L,U>++where postProcessUnsat makes a proper top element out of the given demand type.+ Note [Demand analysis for trivial right-hand sides] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider-        foo = plusInt |> co+    foo = plusInt |> co where plusInt is an arity-2 function with known strictness.  Clearly we want plusInt's strictness to propagate to foo!  But because it has no manifest lambdas, it won't do so automatically, and indeed 'co' might-have type (Int->Int->Int) ~ T, so we *can't* eta-expand.  So we have a-special case for right-hand sides that are "trivial", namely variables,-casts, type applications, and the like.+have type (Int->Int->Int) ~ T. -Note that this can mean that 'foo' has an arity that is smaller than that-indicated by its demand info.  e.g. if co :: (Int->Int->Int) ~ T, then-foo's arity will be zero (see Note [exprArity invariant] in CoreArity),-but its demand signature will be that of plusInt. A small example is the-test case of Trac #8963.+Fortunately, CoreArity gives 'foo' arity 2, which is enough for LetDown to+forward plusInt's demand signature, and all is well (see Note [Newtype arity] in+CoreArity)! A small example is the test case NewtypeArity.   Note [Product demands for function body]@@ -841,13 +974,6 @@   where     (dmd_ty', dmd) = findBndrDmd env False dmd_ty var -annotateLamBndrs :: AnalEnv -> DFunFlag -> DmdType -> [Var] -> (DmdType, [Var])-annotateLamBndrs env args_of_dfun ty bndrs = mapAccumR annotate ty bndrs-  where-    annotate dmd_ty bndr-      | isId bndr = annotateLamIdBndr env args_of_dfun dmd_ty bndr-      | otherwise = (dmd_ty, bndr)- annotateLamIdBndr :: AnalEnv                   -> DFunFlag   -- is this lambda at the top of the RHS of a dfun?                   -> DmdType    -- Demand type of body@@ -1160,12 +1286,6 @@ lookupSigEnv :: AnalEnv -> Id -> Maybe (StrictSig, TopLevelFlag) lookupSigEnv env id = lookupVarEnv (ae_sigs env) id -getStrictness :: AnalEnv -> Id -> StrictSig-getStrictness env fn-  | isGlobalId fn                        = idStrictness fn-  | Just (sig, _) <- lookupSigEnv env fn = sig-  | otherwise                            = nopSig- nonVirgin :: AnalEnv -> AnalEnv nonVirgin env = env { ae_virgin = False } @@ -1304,7 +1424,7 @@    Slightly ad-hoc, because even if the scrutinee *is* a variable it    might not be a onre of the arguments to the original function, or a    sub-component thereof.  But it's simple, and nothing terrible-   happens if we get it wrong.  e.g. Trac #10694.+   happens if we get it wrong.  e.g. #10694.   Note [Initial CPR for strict binders]
stranal/WorkWrap.hs view
@@ -9,6 +9,7 @@  import GhcPrelude +import CoreArity        ( manifestArity ) import CoreSyn import CoreUnfold       ( certainlyWillInline, mkWwInlineRule, mkWorkerUnfolding ) import CoreUtils        ( exprType, exprIsHNF )@@ -185,7 +186,7 @@ one! So the function would no longer be INLNABLE, and in particular will not be specialised at call sites in other modules. -This comes in practice (Trac #6056).+This comes in practice (#6056).  Solution: do the w/w for strictness analysis, but transfer the Stable unfolding to the *worker*.  So we will get something like this:@@ -240,8 +241,39 @@ Solution: do worker/wrapper even on NOINLINE things; but move the NOINLINE pragma to the worker. -(See Trac #13143 for a real-world example.)+(See #13143 for a real-world example.) +It is crucial that we do this for *all* NOINLINE functions. #10069+demonstrates what happens when we promise to w/w a (NOINLINE) leaf function, but+fail to deliver:++  data C = C Int# Int#++  {-# NOINLINE c1 #-}+  c1 :: C -> Int#+  c1 (C _ n) = n++  {-# NOINLINE fc #-}+  fc :: C -> Int#+  fc c = 2 *# c1 c++Failing to w/w `c1`, but still w/wing `fc` leads to the following code:++  c1 :: C -> Int#+  c1 (C _ n) = n++  $wfc :: Int# -> Int#+  $wfc n = let c = C 0# n in 2 #* c1 c++  fc :: C -> Int#+  fc (C _ n) = $wfc n++Yikes! The reboxed `C` in `$wfc` can't cancel out, so we are in a bad place.+This generalises to any function that derives its strictness signature from+its callees, so we have to make sure that when a function announces particular+strictness properties, we have to w/w them accordingly, even if it means+splitting a NOINLINE function.+ Note [Worker activation] ~~~~~~~~~~~~~~~~~~~~~~~~ Follows on from Note [Worker-wrapper for INLINABLE functions]@@ -357,7 +389,7 @@    Note [Worker-wrapper for NOINLINE functions]  3. For ordinary functions with no pragmas we want to inline the-   wrapper as early as possible (Trac #15056).  Suppose another module+   wrapper as early as possible (#15056).  Suppose another module    defines    f x = g x x    and suppose there is some RULE for (g True True).  Then if we have    a call (f True), we'd expect to inline 'f' and the RULE will fire.@@ -426,7 +458,7 @@         -- See Note [Don't w/w INLINE things]         -- See Note [Don't w/w inline small non-loop-breaker things] -  | is_fun+  | is_fun && is_eta_exp   = splitFun dflags fam_envs new_fn_id fn_info wrap_dmds res_info rhs    | is_thunk                                   -- See Note [Thunk splitting]@@ -443,9 +475,11 @@         -- See Note [Zapping DmdEnv after Demand Analyzer] and         -- See Note [Zapping Used Once info in WorkWrap] -    is_fun    = notNull wrap_dmds || isJoinId fn_id-    is_thunk  = not is_fun && not (exprIsHNF rhs) && not (isJoinId fn_id)-                           && not (isUnliftedType (idType fn_id))+    is_fun     = notNull wrap_dmds || isJoinId fn_id+    -- See Note [Don't eta expand in w/w]+    is_eta_exp = length wrap_dmds == manifestArity rhs+    is_thunk   = not is_fun && not (exprIsHNF rhs) && not (isJoinId fn_id)+                            && not (isUnliftedType (idType fn_id))  {- Note [Zapping DmdEnv after Demand Analyzer]@@ -485,6 +519,36 @@  We do not do it in the demand analyser for the same reasons outlined in Note [Zapping DmdEnv after Demand Analyzer] above.++Note [Don't eta expand in w/w]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A binding where the manifestArity of the RHS is less than idArity of the binder+means CoreArity didn't eta expand that binding. When this happens, it does so+for a reason (see Note [exprArity invariant] in CoreArity) and we probably have+a PAP, cast or trivial expression as RHS.++Performing the worker/wrapper split will implicitly eta-expand the binding to+idArity, overriding CoreArity's decision. Other than playing fast and loose with+divergence, it's also broken for newtypes:++  f = (\xy.blah) |> co+    where+      co :: (Int -> Int -> Char) ~ T++Then idArity is 2 (despite the type T), and it can have a StrictSig based on a+threshold of 2. But we can't w/w it without a type error.++The situation is less grave for PAPs, but the implicit eta expansion caused a+compiler allocation regression in T15164, where huge recursive instance method+groups, mostly consisting of PAPs, got w/w'd. This caused great churn in the+simplifier, when simply waiting for the PAPs to inline arrived at the same+output program.++Note there is the worry here that such PAPs and trivial RHSs might not *always*+be inlined. That would lead to reboxing, because the analysis tacitly assumes+that we W/W'd for idArity and will propagate analysis information under that+assumption. So far, this doesn't seem to matter in practice.+See https://gitlab.haskell.org/ghc/ghc/merge_requests/312#note_192064. -}  
stranal/WwLib.hs view
@@ -16,7 +16,7 @@ import GhcPrelude  import CoreSyn-import CoreUtils        ( exprType, mkCast )+import CoreUtils        ( exprType, mkCast, mkDefaultCase, mkSingleAltCase ) import Id import IdInfo           ( JoinArity ) import DataCon@@ -30,6 +30,7 @@ import VarEnv           ( mkInScopeSet ) import VarSet           ( VarSet ) import Type+import Predicate        ( isClassPred ) import RepType          ( isVoidTy, typePrimRep ) import Coercion import FamInstEnv@@ -134,7 +135,7 @@ -- wrap_fn_str E        = case x of { (a,b) -> --                        case a of { (a1,a2) -> --                        E a1 a2 b y }}--- work_fn_str E        = \a2 a2 b y ->+-- work_fn_str E        = \a1 a2 b y -> --                        let a = (a1,a2) in --                        let x = (a,b) in --                        E@@ -214,12 +215,12 @@ And if something *has* been given the CPR property and we don't w/w, it's a disaster, because then the enclosing function might say it has the CPR property, but now doesn't and there a cascade of disaster.  A good example-is Trac #5920.+is #5920.  Note [Limit w/w arity] ~~~~~~~~~~~~~~~~~~~~~~~~ Guard against high worker arity as it generates a lot of stack traffic.-A simplified example is Trac #11565#comment:6+A simplified example is #11565#comment:6  Current strategy is very simple: don't perform w/w transformation at all if the result produces a wrapper with arity higher than -fmax-worker-args=.@@ -483,7 +484,7 @@    * We use a fresh unique for both type-variable and term-variable binders     Originally we lacked this freshness for type variables, and that led-    to the very obscure Trac #12562.  (A type variable in the worker shadowed+    to the very obscure #12562.  (A type variable in the worker shadowed     an outer term-variable binding.)    * Because of this cloning we have to substitute in the type/kind of the@@ -621,7 +622,7 @@                                          data_con unpk_args                 arg_no_unf = zapStableUnfolding arg                              -- See Note [Zap unfolding when beta-reducing]-                             -- in Simplify.hs; and see Trac #13890+                             -- in Simplify.hs; and see #13890                 rebox_fn   = Let (NonRec arg_no_unf con_app)                 con_app    = mkConApp2 data_con inst_tys unpk_args `mkCast` mkSymCo co          ; (_, worker_args, wrap_fn, work_fn) <- mkWWstr dflags fam_envs False unpk_args@@ -836,7 +837,7 @@ Note [mkWWstr and unsafeCoerce] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By using unsafeCoerce, it is possible to make the number of demands fail to-match the number of constructor arguments; this happened in Trac #8037.+match the number of constructor arguments; this happened in #8037. If so, the worker/wrapper split doesn't work right and we get a Core Lint bug.  The fix here is simply to decline to do w/w if that happens. @@ -875,10 +876,10 @@  Solution: use setCaseBndrEvald when creating  (A) The arg binders x1,x2 in mkWstr_one-         See Trac #13077, test T13077+         See #13077, test T13077  (B) The result binders r1,r2 in mkWWcpr_help          See Trace #13077, test T13077a-         And Trac #13027 comment:20, item (4)+         And #13027 comment:20, item (4) to record that the relevant binder is evaluated.  @@ -901,13 +902,13 @@ BUT if f is strict in the Ord dictionary, we might unpack it, to get    fw :: (a->a->Bool) -> [a] -> Int# -> a and the type-class specialiser can't specialise that.  An example is-Trac #6056.+#6056.  But in any other situation a dictionary is just an ordinary value, and can be unpacked.  So we track the INLINABLE pragma, and switch off the unpacking in mkWWstr_one (see the isClassPred test). -Historical note: Trac #14955 describes how I got this fix wrong+Historical note: #14955 describes how I got this fix wrong the first time. -} @@ -1027,10 +1028,10 @@              con_app   = mkConApp2 data_con inst_tys [arg] `mkCast` mkSymCo co         ; return ( True-                , \ wkr_call -> Case wkr_call arg (exprType con_app) [(DEFAULT, [], con_app)]+                , \ wkr_call -> mkDefaultCase wkr_call arg con_app                 , \ body     -> mkUnpackCase body co work_uniq data_con [arg] (varToCoreExpr arg)                                 -- varToCoreExpr important here: arg can be a coercion-                                -- Lacking this caused Trac #10658+                                -- Lacking this caused #10658                 , arg_ty1 ) }    | otherwise   -- The general case@@ -1042,9 +1043,11 @@              ubx_tup_ty  = exprType ubx_tup_app              ubx_tup_app = mkCoreUbxTup (map fst arg_tys) (map varToCoreExpr args)              con_app     = mkConApp2 data_con inst_tys args `mkCast` mkSymCo co+             tup_con     = tupleDataCon Unboxed (length arg_tys)         ; return (True-                , \ wkr_call -> Case wkr_call wrap_wild (exprType con_app)  [(DataAlt (tupleDataCon Unboxed (length arg_tys)), args, con_app)]+                , \ wkr_call -> mkSingleAltCase wkr_call wrap_wild+                                                (DataAlt tup_con) args con_app                 , \ body     -> mkUnpackCase body co work_uniq data_con args ubx_tup_app                 , ubx_tup_ty ) } @@ -1056,8 +1059,8 @@ mkUnpackCase (Tick tickish e) co uniq con args body   -- See Note [Profiling and unpacking]   = Tick tickish (mkUnpackCase e co uniq con args body) mkUnpackCase scrut co uniq boxing_con unpk_args body-  = Case casted_scrut bndr (exprType body)-         [(DataAlt boxing_con, unpk_args, body)]+  = mkSingleAltCase casted_scrut bndr+                    (DataAlt boxing_con) unpk_args body   where     casted_scrut = scrut `mkCast` co     bndr = mk_ww_local uniq (exprType casted_scrut, MarkedStrict)@@ -1115,7 +1118,7 @@ buggily is used we'll get a runtime error message.  Coping with absence for *unlifted* types is important; see, for-example, Trac #4306 and Trac #15627.  In the UnliftedRep case, we can+example, #4306 and #15627.  In the UnliftedRep case, we can use LitRubbish, which we need to apply to the required type. For the unlifted types of singleton kind like Float#, Addr#, etc. we also find a suitable literal, using Literal.absentLiteralOf.  We don't@@ -1167,7 +1170,7 @@   = WARN( True, text "No absent value for" <+> ppr arg_ty )     Nothing -- Can happen for 'State#' and things of 'VecRep'   where-    lifted_arg   = arg `setIdStrictness` exnSig+    lifted_arg   = arg `setIdStrictness` botSig               -- Note in strictness signature that this is bottoming               -- (for the sake of the "empty case scrutinee not known to               -- diverge for sure lint" warning)
typecheck/ClsInst.hs view
@@ -3,7 +3,7 @@ module ClsInst (      matchGlobalInst,      ClsInstResult(..),-     InstanceWhat(..), safeOverlap,+     InstanceWhat(..), safeOverlap, instanceReturnsDictCon,      AssocInstInfo(..), isNotAssociated   ) where @@ -14,9 +14,10 @@ import TcEnv import TcRnMonad import TcType+import TcTypeable import TcMType import TcEvidence-import TcTypeableValidity+import Predicate import RnEnv( addUsedGRE ) import RdrName( lookupGRE_FieldLabel ) import InstEnv@@ -31,7 +32,7 @@ import Type import MkCore ( mkStringExprFS, mkNaturalExpr ) -import Name   ( Name )+import Name   ( Name, pprDefinedAt ) import VarEnv ( VarEnv ) import DataCon import TyCon@@ -91,6 +92,8 @@  data InstanceWhat   = BuiltinInstance+  | BuiltinEqInstance   -- A built-in "equality instance"; see the+                        -- TcSMonad Note [Solved dictionaries]   | LocalInstance   | TopLevInstance { iw_dfun_id   :: DFunId                    , iw_safe_over :: SafeOverlapping }@@ -103,15 +106,24 @@     = text "OneInst" <+> vcat [ppr ev, ppr what]  instance Outputable InstanceWhat where-  ppr BuiltinInstance = text "built-in instance"-  ppr LocalInstance   = text "locally-quantified instance"-  ppr (TopLevInstance { iw_safe_over = so })-     = text "top-level instance" <+> (text $ if so then "[safe]" else "[unsafe]")+  ppr BuiltinInstance   = text "a built-in instance"+  ppr BuiltinEqInstance = text "a built-in equality instance"+  ppr LocalInstance     = text "a locally-quantified instance"+  ppr (TopLevInstance { iw_dfun_id = dfun })+      = hang (text "instance" <+> pprSigmaType (idType dfun))+           2 (text "--" <+> pprDefinedAt (idName dfun))  safeOverlap :: InstanceWhat -> Bool safeOverlap (TopLevInstance { iw_safe_over = so }) = so safeOverlap _                                      = True +instanceReturnsDictCon :: InstanceWhat -> Bool+-- See Note [Solved dictionaries] in TcSMonad+instanceReturnsDictCon (TopLevInstance {}) = True+instanceReturnsDictCon BuiltinInstance     = True+instanceReturnsDictCon BuiltinEqInstance   = False+instanceReturnsDictCon LocalInstance       = False+ matchGlobalInst :: DynFlags                 -> Bool      -- True <=> caller is the short-cut solver                              -- See Note [Shortcut solving: overlap]@@ -162,7 +174,7 @@                 , isOverlappable ispec                 -- If the instance has OVERLAPPABLE or OVERLAPS or INCOHERENT                 -- then don't let the short-cut solver choose it, because a-                -- later instance might overlap it.  Trac #14434 is an example+                -- later instance might overlap it.  #14434 is an example                 -- See Note [Shortcut solving: overlap]                 -> do { traceTc "matchClass: ignoring overlappable" (ppr pred)                       ; return NotSure }@@ -207,13 +219,13 @@  We don't want to solve the wanted constraint with the overlappable instance; rather we want to use the supplied (C a)! That was the whole-point of it being overlappable!  Trac #14434 wwas an example.+point of it being overlappable!  #14434 wwas an example.  Alas even if the instance has no overlap flag, thus   instance C a where ... there is nothing to stop it being overlapped. GHC provides no way to declare an instance as "final" so it can't be overlapped.  But really-only final instances are OK for short-cut solving.  Sigh. Trac #15135+only final instances are OK for short-cut solving.  Sigh. #15135 was a puzzling example. -} @@ -514,7 +526,7 @@    Typeable (() => Int)    Typeable (((),()) => Int) -See Trac #9858.  For forall's the case is clear: we simply don't have+See #9858.  For forall's the case is clear: we simply don't have a TypeRep for them.  For qualified but not polymorphic types, like (Eq a => a -> a), things are murkier.  But: @@ -561,14 +573,14 @@ matchHeteroEquality args   = return (OneInst { cir_new_theta = [ mkTyConApp eqPrimTyCon args ]                     , cir_mk_ev     = evDataConApp heqDataCon args-                    , cir_what      = BuiltinInstance })+                    , cir_what      = BuiltinEqInstance })  matchHomoEquality :: [Type] -> TcM ClsInstResult -- Solves (t1 ~ t2) matchHomoEquality args@[k,t1,t2]   = return (OneInst { cir_new_theta = [ mkTyConApp eqPrimTyCon [k,k,t1,t2] ]                     , cir_mk_ev     = evDataConApp eqDataCon args-                    , cir_what      = BuiltinInstance })+                    , cir_what      = BuiltinEqInstance }) matchHomoEquality args = pprPanic "matchHomoEquality" (ppr args)  -- See also Note [The equality types story] in TysPrim@@ -576,7 +588,7 @@ matchCoercible args@[k, t1, t2]   = return (OneInst { cir_new_theta = [ mkTyConApp eqReprPrimTyCon args' ]                     , cir_mk_ev     = evDataConApp coercibleDataCon args-                    , cir_what      = BuiltinInstance })+                    , cir_what      = BuiltinEqInstance })   where     args' = [k, k, t1, t2] matchCoercible args = pprPanic "matchLiftedCoercible" (ppr args)@@ -671,7 +683,7 @@                          -- the HasField x r a dictionary.  The preds will                          -- typically be empty, but if the datatype has a                          -- "stupid theta" then we have to include it here.-                   ; let theta = mkPrimEqPred sel_ty (mkFunTy r_ty a_ty) : preds+                   ; let theta = mkPrimEqPred sel_ty (mkVisFunTy r_ty a_ty) : preds                           -- Use the equality proof to cast the selector Id to                          -- type (r -> a), then use the newtype coercion to cast
+ typecheck/Constraint.hs view
@@ -0,0 +1,1832 @@+{-++This module defines types and simple operations over constraints,+as used in the type-checker and constraint solver.++-}++{-# LANGUAGE CPP, GeneralizedNewtypeDeriving #-}++module Constraint (+        -- QCInst+        QCInst(..), isPendingScInst,++        -- Canonical constraints+        Xi, Ct(..), Cts, emptyCts, andCts, andManyCts, pprCts,+        singleCt, listToCts, ctsElts, consCts, snocCts, extendCtsList,+        isEmptyCts, isCTyEqCan, isCFunEqCan,+        isPendingScDict, superClassesMightHelp, getPendingWantedScs,+        isCDictCan_Maybe, isCFunEqCan_maybe,+        isCNonCanonical, isWantedCt, isDerivedCt,+        isGivenCt, isHoleCt, isOutOfScopeCt, isExprHoleCt, isTypeHoleCt,+        isUserTypeErrorCt, getUserTypeErrorMsg,+        ctEvidence, ctLoc, setCtLoc, ctPred, ctFlavour, ctEqRel, ctOrigin,+        ctEvId, mkTcEqPredLikeEv,+        mkNonCanonical, mkNonCanonicalCt, mkGivens,+        mkIrredCt, mkInsolubleCt,+        ctEvPred, ctEvLoc, ctEvOrigin, ctEvEqRel,+        ctEvExpr, ctEvTerm, ctEvCoercion, ctEvEvId,+        tyCoVarsOfCt, tyCoVarsOfCts,+        tyCoVarsOfCtList, tyCoVarsOfCtsList,++        WantedConstraints(..), insolubleWC, emptyWC, isEmptyWC,+        isSolvedWC, andWC, unionsWC, mkSimpleWC, mkImplicWC,+        addInsols, insolublesOnly, addSimples, addImplics,+        tyCoVarsOfWC, dropDerivedWC, dropDerivedSimples,+        tyCoVarsOfWCList, insolubleCt, insolubleEqCt,+        isDroppableCt, insolubleImplic,+        arisesFromGivens,++        Implication(..), implicationPrototype,+        ImplicStatus(..), isInsolubleStatus, isSolvedStatus,+        SubGoalDepth, initialSubGoalDepth, maxSubGoalDepth,+        bumpSubGoalDepth, subGoalDepthExceeded,+        CtLoc(..), ctLocSpan, ctLocEnv, ctLocLevel, ctLocOrigin,+        ctLocTypeOrKind_maybe,+        ctLocDepth, bumpCtLocDepth, isGivenLoc,+        setCtLocOrigin, updateCtLocOrigin, setCtLocEnv, setCtLocSpan,+        pprCtLoc,++        -- CtEvidence+        CtEvidence(..), TcEvDest(..),+        mkKindLoc, toKindLoc, mkGivenLoc,+        isWanted, isGiven, isDerived, isGivenOrWDeriv,+        ctEvRole,++        wrapType, wrapTypeWithImplication,++        CtFlavour(..), ShadowInfo(..), ctEvFlavour,+        CtFlavourRole, ctEvFlavourRole, ctFlavourRole,+        eqCanRewrite, eqCanRewriteFR, eqMayRewriteFR,+        eqCanDischargeFR,+        funEqCanDischarge, funEqCanDischargeF,++        -- Pretty printing+        pprEvVarTheta,+        pprEvVars, pprEvVarWithType,++        -- holes+        Hole(..), holeOcc,++  )+  where++#include "HsVersions.h"++import GhcPrelude++import {-# SOURCE #-} TcRnTypes ( TcLclEnv, setLclEnvTcLevel, getLclEnvTcLevel+                                , setLclEnvLoc, getLclEnvLoc )++import GHC.Hs.Expr ( UnboundVar(..), unboundVarOcc )+import Predicate+import Type+import Coercion+import Class+import TyCon+import Var+import Id++import TcType+import TcEvidence+import TcOrigin++import CoreSyn++import TyCoPpr+import OccName+import FV+import VarSet+import DynFlags+import BasicTypes++import Outputable+import SrcLoc+import Bag+import Util++import Control.Monad ( msum )++{-+************************************************************************+*                                                                      *+*                       Canonical constraints                          *+*                                                                      *+*   These are the constraints the low-level simplifier works with      *+*                                                                      *+************************************************************************+-}++-- The syntax of xi (ξ) types:+-- xi ::= a | T xis | xis -> xis | ... | forall a. tau+-- Two important notes:+--      (i) No type families, unless we are under a ForAll+--      (ii) Note that xi types can contain unexpanded type synonyms;+--           however, the (transitive) expansions of those type synonyms+--           will not contain any type functions, unless we are under a ForAll.+-- We enforce the structure of Xi types when we flatten (TcCanonical)++type Xi = Type       -- In many comments, "xi" ranges over Xi++type Cts = Bag Ct++data Ct+  -- Atomic canonical constraints+  = CDictCan {  -- e.g.  Num xi+      cc_ev     :: CtEvidence, -- See Note [Ct/evidence invariant]++      cc_class  :: Class,+      cc_tyargs :: [Xi],   -- cc_tyargs are function-free, hence Xi++      cc_pend_sc :: Bool   -- See Note [The superclass story] in TcCanonical+                           -- True <=> (a) cc_class has superclasses+                           --          (b) we have not (yet) added those+                           --              superclasses as Givens+    }++  | CIrredCan {  -- These stand for yet-unusable predicates+      cc_ev    :: CtEvidence,   -- See Note [Ct/evidence invariant]+      cc_insol :: Bool   -- True  <=> definitely an error, can never be solved+                         -- False <=> might be soluble++        -- For the might-be-soluble case, the ctev_pred of the evidence is+        -- of form   (tv xi1 xi2 ... xin)   with a tyvar at the head+        --      or   (tv1 ~ ty2)   where the CTyEqCan  kind invariant fails+        --      or   (F tys ~ ty)  where the CFunEqCan kind invariant fails+        -- See Note [CIrredCan constraints]++        -- The definitely-insoluble case is for things like+        --    Int ~ Bool      tycons don't match+        --    a ~ [a]         occurs check+    }++  | CTyEqCan {  -- tv ~ rhs+       -- Invariants:+       --   * See Note [inert_eqs: the inert equalities] in TcSMonad+       --   * tv not in tvs(rhs)   (occurs check)+       --   * If tv is a TauTv, then rhs has no foralls+       --       (this avoids substituting a forall for the tyvar in other types)+       --   * tcTypeKind ty `tcEqKind` tcTypeKind tv; Note [Ct kind invariant]+       --   * rhs may have at most one top-level cast+       --   * rhs (perhaps under the one cast) is *almost function-free*,+       --       See Note [Almost function-free]+       --   * If the equality is representational, rhs has no top-level newtype+       --     See Note [No top-level newtypes on RHS of representational+       --     equalities] in TcCanonical+       --   * If rhs (perhaps under the cast) is also a tv, then it is oriented+       --     to give best chance of+       --     unification happening; eg if rhs is touchable then lhs is too+      cc_ev     :: CtEvidence, -- See Note [Ct/evidence invariant]+      cc_tyvar  :: TcTyVar,+      cc_rhs    :: TcType,     -- Not necessarily function-free (hence not Xi)+                               -- See invariants above++      cc_eq_rel :: EqRel       -- INVARIANT: cc_eq_rel = ctEvEqRel cc_ev+    }++  | CFunEqCan {  -- F xis ~ fsk+       -- Invariants:+       --   * isTypeFamilyTyCon cc_fun+       --   * tcTypeKind (F xis) = tyVarKind fsk; Note [Ct kind invariant]+       --   * always Nominal role+      cc_ev     :: CtEvidence,  -- See Note [Ct/evidence invariant]+      cc_fun    :: TyCon,       -- A type function++      cc_tyargs :: [Xi],        -- cc_tyargs are function-free (hence Xi)+        -- Either under-saturated or exactly saturated+        --    *never* over-saturated (because if so+        --    we should have decomposed)++      cc_fsk    :: TcTyVar  -- [G]  always a FlatSkolTv+                            -- [W], [WD], or [D] always a FlatMetaTv+        -- See Note [The flattening story] in TcFlatten+    }++  | CNonCanonical {        -- See Note [NonCanonical Semantics] in TcSMonad+      cc_ev  :: CtEvidence+    }++  | CHoleCan {             -- See Note [Hole constraints]+       -- Treated as an "insoluble" constraint+       -- See Note [Insoluble constraints]+      cc_ev   :: CtEvidence,+      cc_hole :: Hole+    }++  | CQuantCan QCInst       -- A quantified constraint+      -- NB: I expect to make more of the cases in Ct+      --     look like this, with the payload in an+      --     auxiliary type++------------+data QCInst  -- A much simplified version of ClsInst+             -- See Note [Quantified constraints] in TcCanonical+  = QCI { qci_ev   :: CtEvidence -- Always of type forall tvs. context => ty+                                 -- Always Given+        , qci_tvs  :: [TcTyVar]  -- The tvs+        , qci_pred :: TcPredType -- The ty+        , qci_pend_sc :: Bool    -- Same as cc_pend_sc flag in CDictCan+                                 -- Invariant: True => qci_pred is a ClassPred+    }++instance Outputable QCInst where+  ppr (QCI { qci_ev = ev }) = ppr ev++------------+-- | An expression or type hole+data Hole = ExprHole UnboundVar+            -- ^ Either an out-of-scope variable or a "true" hole in an+            -- expression (TypedHoles)+          | TypeHole OccName+            -- ^ A hole in a type (PartialTypeSignatures)++instance Outputable Hole where+  ppr (ExprHole ub)  = ppr ub+  ppr (TypeHole occ) = text "TypeHole" <> parens (ppr occ)++holeOcc :: Hole -> OccName+holeOcc (ExprHole uv)  = unboundVarOcc uv+holeOcc (TypeHole occ) = occ++{- Note [Hole constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~+CHoleCan constraints are used for two kinds of holes,+distinguished by cc_hole:++  * For holes in expressions (includings variables not in scope)+    e.g.   f x = g _ x++  * For holes in type signatures+    e.g.   f :: _ -> _+           f x = [x,True]++Note [CIrredCan constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+CIrredCan constraints are used for constraints that are "stuck"+   - we can't solve them (yet)+   - we can't use them to solve other constraints+   - but they may become soluble if we substitute for some+     of the type variables in the constraint++Example 1:  (c Int), where c :: * -> Constraint.  We can't do anything+            with this yet, but if later c := Num, *then* we can solve it++Example 2:  a ~ b, where a :: *, b :: k, where k is a kind variable+            We don't want to use this to substitute 'b' for 'a', in case+            'k' is subsequently unifed with (say) *->*, because then+            we'd have ill-kinded types floating about.  Rather we want+            to defer using the equality altogether until 'k' get resolved.++Note [Ct/evidence invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If  ct :: Ct, then extra fields of 'ct' cache precisely the ctev_pred field+of (cc_ev ct), and is fully rewritten wrt the substitution.   Eg for CDictCan,+   ctev_pred (cc_ev ct) = (cc_class ct) (cc_tyargs ct)+This holds by construction; look at the unique place where CDictCan is+built (in TcCanonical).++In contrast, the type of the evidence *term* (ctev_dest / ctev_evar) in+the evidence may *not* be fully zonked; we are careful not to look at it+during constraint solving. See Note [Evidence field of CtEvidence].++Note [Ct kind invariant]+~~~~~~~~~~~~~~~~~~~~~~~~+CTyEqCan and CFunEqCan both require that the kind of the lhs matches the kind+of the rhs. This is necessary because both constraints are used for substitutions+during solving. If the kinds differed, then the substitution would take a well-kinded+type to an ill-kinded one.++Note [Almost function-free]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+A type is *almost function-free* if it has no type functions (something that+responds True to isTypeFamilyTyCon), except (possibly)+ * under a forall, or+ * in a coercion (either in a CastTy or a CercionTy)++The RHS of a CTyEqCan must be almost function-free. This is for two reasons:++1. There cannot be a top-level function. If there were, the equality should+   really be a CFunEqCan, not a CTyEqCan.++2. Nested functions aren't too bad, on the other hand. However, consider this+   scenario:++     type family F a = r | r -> a++     [D] F ty1 ~ fsk1+     [D] F ty2 ~ fsk2+     [D] fsk1 ~ [G Int]+     [D] fsk2 ~ [G Bool]++     type instance G Int = Char+     type instance G Bool = Char++   If it was the case that fsk1 = fsk2, then we could unifty ty1 and ty2 --+   good! They don't look equal -- but if we aggressively reduce that G Int and+   G Bool they would become equal. The "almost function free" makes sure that+   these redexes are exposed.++   Note that this equality does *not* depend on casts or coercions, and so+   skipping these forms is OK. In addition, the result of a type family cannot+   be a polytype, so skipping foralls is OK, too. We skip foralls because we+   want the output of the flattener to be almost function-free. See Note+   [Flattening under a forall] in TcFlatten.++   As I (Richard E) write this, it is unclear if the scenario pictured above+   can happen -- I would expect the G Int and G Bool to be reduced. But+   perhaps it can arise somehow, and maintaining almost function-free is cheap.++Historical note: CTyEqCans used to require only condition (1) above: that no+type family was at the top of an RHS. But work on #16512 suggested that the+injectivity checks were not complete, and adding the requirement that functions+do not appear even in a nested fashion was easy (it was already true, but+unenforced).++The almost-function-free property is checked by isAlmostFunctionFree in TcType.+The flattener (in TcFlatten) produces types that are almost function-free.++-}++mkNonCanonical :: CtEvidence -> Ct+mkNonCanonical ev = CNonCanonical { cc_ev = ev }++mkNonCanonicalCt :: Ct -> Ct+mkNonCanonicalCt ct = CNonCanonical { cc_ev = cc_ev ct }++mkIrredCt :: CtEvidence -> Ct+mkIrredCt ev = CIrredCan { cc_ev = ev, cc_insol = False }++mkInsolubleCt :: CtEvidence -> Ct+mkInsolubleCt ev = CIrredCan { cc_ev = ev, cc_insol = True }++mkGivens :: CtLoc -> [EvId] -> [Ct]+mkGivens loc ev_ids+  = map mk ev_ids+  where+    mk ev_id = mkNonCanonical (CtGiven { ctev_evar = ev_id+                                       , ctev_pred = evVarPred ev_id+                                       , ctev_loc = loc })++ctEvidence :: Ct -> CtEvidence+ctEvidence (CQuantCan (QCI { qci_ev = ev })) = ev+ctEvidence ct = cc_ev ct++ctLoc :: Ct -> CtLoc+ctLoc = ctEvLoc . ctEvidence++setCtLoc :: Ct -> CtLoc -> Ct+setCtLoc ct loc = ct { cc_ev = (cc_ev ct) { ctev_loc = loc } }++ctOrigin :: Ct -> CtOrigin+ctOrigin = ctLocOrigin . ctLoc++ctPred :: Ct -> PredType+-- See Note [Ct/evidence invariant]+ctPred ct = ctEvPred (ctEvidence ct)++ctEvId :: Ct -> EvVar+-- The evidence Id for this Ct+ctEvId ct = ctEvEvId (ctEvidence ct)++-- | Makes a new equality predicate with the same role as the given+-- evidence.+mkTcEqPredLikeEv :: CtEvidence -> TcType -> TcType -> TcType+mkTcEqPredLikeEv ev+  = case predTypeEqRel pred of+      NomEq  -> mkPrimEqPred+      ReprEq -> mkReprPrimEqPred+  where+    pred = ctEvPred ev++-- | Get the flavour of the given 'Ct'+ctFlavour :: Ct -> CtFlavour+ctFlavour = ctEvFlavour . ctEvidence++-- | Get the equality relation for the given 'Ct'+ctEqRel :: Ct -> EqRel+ctEqRel = ctEvEqRel . ctEvidence++instance Outputable Ct where+  ppr ct = ppr (ctEvidence ct) <+> parens pp_sort+    where+      pp_sort = case ct of+         CTyEqCan {}      -> text "CTyEqCan"+         CFunEqCan {}     -> text "CFunEqCan"+         CNonCanonical {} -> text "CNonCanonical"+         CDictCan { cc_pend_sc = pend_sc }+            | pend_sc   -> text "CDictCan(psc)"+            | otherwise -> text "CDictCan"+         CIrredCan { cc_insol = insol }+            | insol     -> text "CIrredCan(insol)"+            | otherwise -> text "CIrredCan(sol)"+         CHoleCan { cc_hole = hole } -> text "CHoleCan:" <+> ppr hole+         CQuantCan (QCI { qci_pend_sc = pend_sc })+            | pend_sc   -> text "CQuantCan(psc)"+            | otherwise -> text "CQuantCan"++{-+************************************************************************+*                                                                      *+        Simple functions over evidence variables+*                                                                      *+************************************************************************+-}++---------------- Getting free tyvars -------------------------++-- | Returns free variables of constraints as a non-deterministic set+tyCoVarsOfCt :: Ct -> TcTyCoVarSet+tyCoVarsOfCt = fvVarSet . tyCoFVsOfCt++-- | Returns free variables of constraints as a deterministically ordered.+-- list. See Note [Deterministic FV] in FV.+tyCoVarsOfCtList :: Ct -> [TcTyCoVar]+tyCoVarsOfCtList = fvVarList . tyCoFVsOfCt++-- | Returns free variables of constraints as a composable FV computation.+-- See Note [Deterministic FV] in FV.+tyCoFVsOfCt :: Ct -> FV+tyCoFVsOfCt (CTyEqCan { cc_tyvar = tv, cc_rhs = xi })+  = tyCoFVsOfType xi `unionFV` FV.unitFV tv+                     `unionFV` tyCoFVsOfType (tyVarKind tv)+tyCoFVsOfCt (CFunEqCan { cc_tyargs = tys, cc_fsk = fsk })+  = tyCoFVsOfTypes tys `unionFV` FV.unitFV fsk+                       `unionFV` tyCoFVsOfType (tyVarKind fsk)+tyCoFVsOfCt (CDictCan { cc_tyargs = tys }) = tyCoFVsOfTypes tys+tyCoFVsOfCt ct = tyCoFVsOfType (ctPred ct)++-- | Returns free variables of a bag of constraints as a non-deterministic+-- set. See Note [Deterministic FV] in FV.+tyCoVarsOfCts :: Cts -> TcTyCoVarSet+tyCoVarsOfCts = fvVarSet . tyCoFVsOfCts++-- | Returns free variables of a bag of constraints as a deterministically+-- odered list. See Note [Deterministic FV] in FV.+tyCoVarsOfCtsList :: Cts -> [TcTyCoVar]+tyCoVarsOfCtsList = fvVarList . tyCoFVsOfCts++-- | Returns free variables of a bag of constraints as a composable FV+-- computation. See Note [Deterministic FV] in FV.+tyCoFVsOfCts :: Cts -> FV+tyCoFVsOfCts = foldr (unionFV . tyCoFVsOfCt) emptyFV++-- | Returns free variables of WantedConstraints as a non-deterministic+-- set. See Note [Deterministic FV] in FV.+tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet+-- Only called on *zonked* things, hence no need to worry about flatten-skolems+tyCoVarsOfWC = fvVarSet . tyCoFVsOfWC++-- | Returns free variables of WantedConstraints as a deterministically+-- ordered list. See Note [Deterministic FV] in FV.+tyCoVarsOfWCList :: WantedConstraints -> [TyCoVar]+-- Only called on *zonked* things, hence no need to worry about flatten-skolems+tyCoVarsOfWCList = fvVarList . tyCoFVsOfWC++-- | Returns free variables of WantedConstraints as a composable FV+-- computation. See Note [Deterministic FV] in FV.+tyCoFVsOfWC :: WantedConstraints -> FV+-- Only called on *zonked* things, hence no need to worry about flatten-skolems+tyCoFVsOfWC (WC { wc_simple = simple, wc_impl = implic })+  = tyCoFVsOfCts simple `unionFV`+    tyCoFVsOfBag tyCoFVsOfImplic implic++-- | Returns free variables of Implication as a composable FV computation.+-- See Note [Deterministic FV] in FV.+tyCoFVsOfImplic :: Implication -> FV+-- Only called on *zonked* things, hence no need to worry about flatten-skolems+tyCoFVsOfImplic (Implic { ic_skols = skols+                        , ic_given = givens+                        , ic_wanted = wanted })+  | isEmptyWC wanted+  = emptyFV+  | otherwise+  = tyCoFVsVarBndrs skols  $+    tyCoFVsVarBndrs givens $+    tyCoFVsOfWC wanted++tyCoFVsOfBag :: (a -> FV) -> Bag a -> FV+tyCoFVsOfBag tvs_of = foldr (unionFV . tvs_of) emptyFV++---------------------------+dropDerivedWC :: WantedConstraints -> WantedConstraints+-- See Note [Dropping derived constraints]+dropDerivedWC wc@(WC { wc_simple = simples })+  = wc { wc_simple = dropDerivedSimples simples }+    -- The wc_impl implications are already (recursively) filtered++--------------------------+dropDerivedSimples :: Cts -> Cts+-- Drop all Derived constraints, but make [W] back into [WD],+-- so that if we re-simplify these constraints we will get all+-- the right derived constraints re-generated.  Forgetting this+-- step led to #12936+dropDerivedSimples simples = mapMaybeBag dropDerivedCt simples++dropDerivedCt :: Ct -> Maybe Ct+dropDerivedCt ct+  = case ctEvFlavour ev of+      Wanted WOnly -> Just (ct' { cc_ev = ev_wd })+      Wanted _     -> Just ct'+      _ | isDroppableCt ct -> Nothing+        | otherwise        -> Just ct+  where+    ev    = ctEvidence ct+    ev_wd = ev { ctev_nosh = WDeriv }+    ct'   = setPendingScDict ct -- See Note [Resetting cc_pend_sc]++{- Note [Resetting cc_pend_sc]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we discard Derived constraints, in dropDerivedSimples, we must+set the cc_pend_sc flag to True, so that if we re-process this+CDictCan we will re-generate its derived superclasses. Otherwise+we might miss some fundeps.  #13662 showed this up.++See Note [The superclass story] in TcCanonical.+-}++isDroppableCt :: Ct -> Bool+isDroppableCt ct+  = isDerived ev && not keep_deriv+    -- Drop only derived constraints, and then only if they+    -- obey Note [Dropping derived constraints]+  where+    ev   = ctEvidence ct+    loc  = ctEvLoc ev+    orig = ctLocOrigin loc++    keep_deriv+      = case ct of+          CHoleCan {} -> True+          CIrredCan { cc_insol = insoluble }+                      -> keep_eq insoluble+          _           -> keep_eq False++    keep_eq definitely_insoluble+       | isGivenOrigin orig    -- Arising only from givens+       = definitely_insoluble  -- Keep only definitely insoluble+       | otherwise+       = case orig of+           KindEqOrigin {} -> True    -- See Note [Dropping derived constraints]++           -- See Note [Dropping derived constraints]+           -- For fundeps, drop wanted/wanted interactions+           FunDepOrigin2 {} -> True   -- Top-level/Wanted+           FunDepOrigin1 _ orig1 _ _ orig2 _+             | g1 || g2  -> True  -- Given/Wanted errors: keep all+             | otherwise -> False -- Wanted/Wanted errors: discard+             where+               g1 = isGivenOrigin orig1+               g2 = isGivenOrigin orig2++           _ -> False++arisesFromGivens :: Ct -> Bool+arisesFromGivens ct+  = case ctEvidence ct of+      CtGiven {}                   -> True+      CtWanted {}                  -> False+      CtDerived { ctev_loc = loc } -> isGivenLoc loc++isGivenLoc :: CtLoc -> Bool+isGivenLoc loc = isGivenOrigin (ctLocOrigin loc)++{- Note [Dropping derived constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In general we discard derived constraints at the end of constraint solving;+see dropDerivedWC.  For example++ * Superclasses: if we have an unsolved [W] (Ord a), we don't want to+   complain about an unsolved [D] (Eq a) as well.++ * If we have [W] a ~ Int, [W] a ~ Bool, improvement will generate+   [D] Int ~ Bool, and we don't want to report that because it's+   incomprehensible. That is why we don't rewrite wanteds with wanteds!++ * We might float out some Wanteds from an implication, leaving behind+   their insoluble Deriveds. For example:++   forall a[2]. [W] alpha[1] ~ Int+                [W] alpha[1] ~ Bool+                [D] Int ~ Bool++   The Derived is insoluble, but we very much want to drop it when floating+   out.++But (tiresomely) we do keep *some* Derived constraints:++ * Type holes are derived constraints, because they have no evidence+   and we want to keep them, so we get the error report++ * Insoluble kind equalities (e.g. [D] * ~ (* -> *)), with+   KindEqOrigin, may arise from a type equality a ~ Int#, say.  See+   Note [Equalities with incompatible kinds] in TcCanonical.+   Keeping these around produces better error messages, in practice.+   E.g., test case dependent/should_fail/T11471++ * We keep most derived equalities arising from functional dependencies+      - Given/Given interactions (subset of FunDepOrigin1):+        The definitely-insoluble ones reflect unreachable code.++        Others not-definitely-insoluble ones like [D] a ~ Int do not+        reflect unreachable code; indeed if fundeps generated proofs, it'd+        be a useful equality.  See #14763.   So we discard them.++      - Given/Wanted interacGiven or Wanted interacting with an+        instance declaration (FunDepOrigin2)++      - Given/Wanted interactions (FunDepOrigin1); see #9612++      - But for Wanted/Wanted interactions we do /not/ want to report an+        error (#13506).  Consider [W] C Int Int, [W] C Int Bool, with+        a fundep on class C.  We don't want to report an insoluble Int~Bool;+        c.f. "wanteds do not rewrite wanteds".++To distinguish these cases we use the CtOrigin.++NB: we keep *all* derived insolubles under some circumstances:++  * They are looked at by simplifyInfer, to decide whether to+    generalise.  Example: [W] a ~ Int, [W] a ~ Bool+    We get [D] Int ~ Bool, and indeed the constraints are insoluble,+    and we want simplifyInfer to see that, even though we don't+    ultimately want to generate an (inexplicable) error message from it+++************************************************************************+*                                                                      *+                    CtEvidence+         The "flavor" of a canonical constraint+*                                                                      *+************************************************************************+-}++isWantedCt :: Ct -> Bool+isWantedCt = isWanted . ctEvidence++isGivenCt :: Ct -> Bool+isGivenCt = isGiven . ctEvidence++isDerivedCt :: Ct -> Bool+isDerivedCt = isDerived . ctEvidence++isCTyEqCan :: Ct -> Bool+isCTyEqCan (CTyEqCan {})  = True+isCTyEqCan (CFunEqCan {}) = False+isCTyEqCan _              = False++isCDictCan_Maybe :: Ct -> Maybe Class+isCDictCan_Maybe (CDictCan {cc_class = cls })  = Just cls+isCDictCan_Maybe _              = Nothing++isCFunEqCan_maybe :: Ct -> Maybe (TyCon, [Type])+isCFunEqCan_maybe (CFunEqCan { cc_fun = tc, cc_tyargs = xis }) = Just (tc, xis)+isCFunEqCan_maybe _ = Nothing++isCFunEqCan :: Ct -> Bool+isCFunEqCan (CFunEqCan {}) = True+isCFunEqCan _ = False++isCNonCanonical :: Ct -> Bool+isCNonCanonical (CNonCanonical {}) = True+isCNonCanonical _ = False++isHoleCt:: Ct -> Bool+isHoleCt (CHoleCan {}) = True+isHoleCt _ = False++isOutOfScopeCt :: Ct -> Bool+-- We treat expression holes representing out-of-scope variables a bit+-- differently when it comes to error reporting+isOutOfScopeCt (CHoleCan { cc_hole = ExprHole (OutOfScope {}) }) = True+isOutOfScopeCt _ = False++isExprHoleCt :: Ct -> Bool+isExprHoleCt (CHoleCan { cc_hole = ExprHole {} }) = True+isExprHoleCt _ = False++isTypeHoleCt :: Ct -> Bool+isTypeHoleCt (CHoleCan { cc_hole = TypeHole {} }) = True+isTypeHoleCt _ = False+++{- Note [Custom type errors in constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++When GHC reports a type-error about an unsolved-constraint, we check+to see if the constraint contains any custom-type errors, and if so+we report them.  Here are some examples of constraints containing type+errors:++TypeError msg           -- The actual constraint is a type error++TypError msg ~ Int      -- Some type was supposed to be Int, but ended up+                        -- being a type error instead++Eq (TypeError msg)      -- A class constraint is stuck due to a type error++F (TypeError msg) ~ a   -- A type function failed to evaluate due to a type err++It is also possible to have constraints where the type error is nested deeper,+for example see #11990, and also:++Eq (F (TypeError msg))  -- Here the type error is nested under a type-function+                        -- call, which failed to evaluate because of it,+                        -- and so the `Eq` constraint was unsolved.+                        -- This may happen when one function calls another+                        -- and the called function produced a custom type error.+-}++-- | A constraint is considered to be a custom type error, if it contains+-- custom type errors anywhere in it.+-- See Note [Custom type errors in constraints]+getUserTypeErrorMsg :: Ct -> Maybe Type+getUserTypeErrorMsg ct = findUserTypeError (ctPred ct)+  where+  findUserTypeError t = msum ( userTypeError_maybe t+                             : map findUserTypeError (subTys t)+                             )++  subTys t            = case splitAppTys t of+                          (t,[]) ->+                            case splitTyConApp_maybe t of+                              Nothing     -> []+                              Just (_,ts) -> ts+                          (t,ts) -> t : ts+++++isUserTypeErrorCt :: Ct -> Bool+isUserTypeErrorCt ct = case getUserTypeErrorMsg ct of+                         Just _ -> True+                         _      -> False++isPendingScDict :: Ct -> Maybe Ct+-- Says whether this is a CDictCan with cc_pend_sc is True,+-- AND if so flips the flag+isPendingScDict ct@(CDictCan { cc_pend_sc = True })+                  = Just (ct { cc_pend_sc = False })+isPendingScDict _ = Nothing++isPendingScInst :: QCInst -> Maybe QCInst+-- Same as isPrendinScDict, but for QCInsts+isPendingScInst qci@(QCI { qci_pend_sc = True })+                  = Just (qci { qci_pend_sc = False })+isPendingScInst _ = Nothing++setPendingScDict :: Ct -> Ct+-- Set the cc_pend_sc flag to True+setPendingScDict ct@(CDictCan { cc_pend_sc = False })+                    = ct { cc_pend_sc = True }+setPendingScDict ct = ct++superClassesMightHelp :: WantedConstraints -> Bool+-- ^ True if taking superclasses of givens, or of wanteds (to perhaps+-- expose more equalities or functional dependencies) might help to+-- solve this constraint.  See Note [When superclasses help]+superClassesMightHelp (WC { wc_simple = simples, wc_impl = implics })+  = anyBag might_help_ct simples || anyBag might_help_implic implics+  where+    might_help_implic ic+       | IC_Unsolved <- ic_status ic = superClassesMightHelp (ic_wanted ic)+       | otherwise                   = False++    might_help_ct ct = isWantedCt ct && not (is_ip ct)++    is_ip (CDictCan { cc_class = cls }) = isIPClass cls+    is_ip _                             = False++getPendingWantedScs :: Cts -> ([Ct], Cts)+getPendingWantedScs simples+  = mapAccumBagL get [] simples+  where+    get acc ct | Just ct' <- isPendingScDict ct+               = (ct':acc, ct')+               | otherwise+               = (acc,     ct)++{- Note [When superclasses help]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+First read Note [The superclass story] in TcCanonical.++We expand superclasses and iterate only if there is at unsolved wanted+for which expansion of superclasses (e.g. from given constraints)+might actually help. The function superClassesMightHelp tells if+doing this superclass expansion might help solve this constraint.+Note that++  * We look inside implications; maybe it'll help to expand the Givens+    at level 2 to help solve an unsolved Wanted buried inside an+    implication.  E.g.+        forall a. Ord a => forall b. [W] Eq a++  * Superclasses help only for Wanted constraints.  Derived constraints+    are not really "unsolved" and we certainly don't want them to+    trigger superclass expansion. This was a good part of the loop+    in  #11523++  * Even for Wanted constraints, we say "no" for implicit parameters.+    we have [W] ?x::ty, expanding superclasses won't help:+      - Superclasses can't be implicit parameters+      - If we have a [G] ?x:ty2, then we'll have another unsolved+        [D] ty ~ ty2 (from the functional dependency)+        which will trigger superclass expansion.++    It's a bit of a special case, but it's easy to do.  The runtime cost+    is low because the unsolved set is usually empty anyway (errors+    aside), and the first non-imlicit-parameter will terminate the search.++    The special case is worth it (#11480, comment:2) because it+    applies to CallStack constraints, which aren't type errors. If we have+       f :: (C a) => blah+       f x = ...undefined...+    we'll get a CallStack constraint.  If that's the only unsolved+    constraint it'll eventually be solved by defaulting.  So we don't+    want to emit warnings about hitting the simplifier's iteration+    limit.  A CallStack constraint really isn't an unsolved+    constraint; it can always be solved by defaulting.+-}++singleCt :: Ct -> Cts+singleCt = unitBag++andCts :: Cts -> Cts -> Cts+andCts = unionBags++listToCts :: [Ct] -> Cts+listToCts = listToBag++ctsElts :: Cts -> [Ct]+ctsElts = bagToList++consCts :: Ct -> Cts -> Cts+consCts = consBag++snocCts :: Cts -> Ct -> Cts+snocCts = snocBag++extendCtsList :: Cts -> [Ct] -> Cts+extendCtsList cts xs | null xs   = cts+                     | otherwise = cts `unionBags` listToBag xs++andManyCts :: [Cts] -> Cts+andManyCts = unionManyBags++emptyCts :: Cts+emptyCts = emptyBag++isEmptyCts :: Cts -> Bool+isEmptyCts = isEmptyBag++pprCts :: Cts -> SDoc+pprCts cts = vcat (map ppr (bagToList cts))++{-+************************************************************************+*                                                                      *+                Wanted constraints+     These are forced to be in TcRnTypes because+           TcLclEnv mentions WantedConstraints+           WantedConstraint mentions CtLoc+           CtLoc mentions ErrCtxt+           ErrCtxt mentions TcM+*                                                                      *+v%************************************************************************+-}++data WantedConstraints+  = WC { wc_simple :: Cts              -- Unsolved constraints, all wanted+       , wc_impl   :: Bag Implication+    }++emptyWC :: WantedConstraints+emptyWC = WC { wc_simple = emptyBag, wc_impl = emptyBag }++mkSimpleWC :: [CtEvidence] -> WantedConstraints+mkSimpleWC cts+  = WC { wc_simple = listToBag (map mkNonCanonical cts)+       , wc_impl = emptyBag }++mkImplicWC :: Bag Implication -> WantedConstraints+mkImplicWC implic+  = WC { wc_simple = emptyBag, wc_impl = implic }++isEmptyWC :: WantedConstraints -> Bool+isEmptyWC (WC { wc_simple = f, wc_impl = i })+  = isEmptyBag f && isEmptyBag i+++-- | Checks whether a the given wanted constraints are solved, i.e.+-- that there are no simple constraints left and all the implications+-- are solved.+isSolvedWC :: WantedConstraints -> Bool+isSolvedWC WC {wc_simple = wc_simple, wc_impl = wc_impl} =+  isEmptyBag wc_simple && allBag (isSolvedStatus . ic_status) wc_impl++andWC :: WantedConstraints -> WantedConstraints -> WantedConstraints+andWC (WC { wc_simple = f1, wc_impl = i1 })+      (WC { wc_simple = f2, wc_impl = i2 })+  = WC { wc_simple = f1 `unionBags` f2+       , wc_impl   = i1 `unionBags` i2 }++unionsWC :: [WantedConstraints] -> WantedConstraints+unionsWC = foldr andWC emptyWC++addSimples :: WantedConstraints -> Bag Ct -> WantedConstraints+addSimples wc cts+  = wc { wc_simple = wc_simple wc `unionBags` cts }+    -- Consider: Put the new constraints at the front, so they get solved first++addImplics :: WantedConstraints -> Bag Implication -> WantedConstraints+addImplics wc implic = wc { wc_impl = wc_impl wc `unionBags` implic }++addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints+addInsols wc cts+  = wc { wc_simple = wc_simple wc `unionBags` cts }++insolublesOnly :: WantedConstraints -> WantedConstraints+-- Keep only the definitely-insoluble constraints+insolublesOnly (WC { wc_simple = simples, wc_impl = implics })+  = WC { wc_simple = filterBag insolubleCt simples+       , wc_impl   = mapBag implic_insols_only implics }+  where+    implic_insols_only implic+      = implic { ic_wanted = insolublesOnly (ic_wanted implic) }++isSolvedStatus :: ImplicStatus -> Bool+isSolvedStatus (IC_Solved {}) = True+isSolvedStatus _              = False++isInsolubleStatus :: ImplicStatus -> Bool+isInsolubleStatus IC_Insoluble    = True+isInsolubleStatus IC_BadTelescope = True+isInsolubleStatus _               = False++insolubleImplic :: Implication -> Bool+insolubleImplic ic = isInsolubleStatus (ic_status ic)++insolubleWC :: WantedConstraints -> Bool+insolubleWC (WC { wc_impl = implics, wc_simple = simples })+  =  anyBag insolubleCt simples+  || anyBag insolubleImplic implics++insolubleCt :: Ct -> Bool+-- Definitely insoluble, in particular /excluding/ type-hole constraints+-- Namely: a) an equality constraint+--         b) that is insoluble+--         c) and does not arise from a Given+insolubleCt ct+  | isHoleCt ct            = isOutOfScopeCt ct  -- See Note [Insoluble holes]+  | not (insolubleEqCt ct) = False+  | arisesFromGivens ct    = False              -- See Note [Given insolubles]+  | otherwise              = True++insolubleEqCt :: Ct -> Bool+-- Returns True of /equality/ constraints+-- that are /definitely/ insoluble+-- It won't detect some definite errors like+--       F a ~ T (F a)+-- where F is a type family, which actually has an occurs check+--+-- The function is tuned for application /after/ constraint solving+--       i.e. assuming canonicalisation has been done+-- E.g.  It'll reply True  for     a ~ [a]+--               but False for   [a] ~ a+-- and+--                   True for  Int ~ F a Int+--               but False for  Maybe Int ~ F a Int Int+--               (where F is an arity-1 type function)+insolubleEqCt (CIrredCan { cc_insol = insol }) = insol+insolubleEqCt _                                = False++instance Outputable WantedConstraints where+  ppr (WC {wc_simple = s, wc_impl = i})+   = text "WC" <+> braces (vcat+        [ ppr_bag (text "wc_simple") s+        , ppr_bag (text "wc_impl") i ])++ppr_bag :: Outputable a => SDoc -> Bag a -> SDoc+ppr_bag doc bag+ | isEmptyBag bag = empty+ | otherwise      = hang (doc <+> equals)+                       2 (foldr (($$) . ppr) empty bag)++{- Note [Given insolubles]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#14325, comment:)+    class (a~b) => C a b++    foo :: C a c => a -> c+    foo x = x++    hm3 :: C (f b) b => b -> f b+    hm3 x = foo x++In the RHS of hm3, from the [G] C (f b) b we get the insoluble+[G] f b ~# b.  Then we also get an unsolved [W] C b (f b).+Residual implication looks like+    forall b. C (f b) b => [G] f b ~# b+                           [W] C f (f b)++We do /not/ want to set the implication status to IC_Insoluble,+because that'll suppress reports of [W] C b (f b).  But we+may not report the insoluble [G] f b ~# b either (see Note [Given errors]+in TcErrors), so we may fail to report anything at all!  Yikes.++The same applies to Derived constraints that /arise from/ Givens.+E.g.   f :: (C Int [a]) => blah+where a fundep means we get+       [D] Int ~ [a]+By the same reasoning we must not suppress other errors (#15767)++Bottom line: insolubleWC (called in TcSimplify.setImplicationStatus)+             should ignore givens even if they are insoluble.++Note [Insoluble holes]+~~~~~~~~~~~~~~~~~~~~~~+Hole constraints that ARE NOT treated as truly insoluble:+  a) type holes, arising from PartialTypeSignatures,+  b) "true" expression holes arising from TypedHoles++An "expression hole" or "type hole" constraint isn't really an error+at all; it's a report saying "_ :: Int" here.  But an out-of-scope+variable masquerading as expression holes IS treated as truly+insoluble, so that it trumps other errors during error reporting.+Yuk!++************************************************************************+*                                                                      *+                Implication constraints+*                                                                      *+************************************************************************+-}++data Implication+  = Implic {   -- Invariants for a tree of implications:+               -- see TcType Note [TcLevel and untouchable type variables]++      ic_tclvl :: TcLevel,       -- TcLevel of unification variables+                                 -- allocated /inside/ this implication++      ic_skols :: [TcTyVar],     -- Introduced skolems+      ic_info  :: SkolemInfo,    -- See Note [Skolems in an implication]+                                 -- See Note [Shadowing in a constraint]++      ic_telescope :: Maybe SDoc,  -- User-written telescope, if there is one+                                   -- See Note [Checking telescopes]++      ic_given  :: [EvVar],      -- Given evidence variables+                                 --   (order does not matter)+                                 -- See Invariant (GivenInv) in TcType++      ic_no_eqs :: Bool,         -- True  <=> ic_givens have no equalities, for sure+                                 -- False <=> ic_givens might have equalities++      ic_warn_inaccessible :: Bool,+                                 -- True  <=> -Winaccessible-code is enabled+                                 -- at construction. See+                                 -- Note [Avoid -Winaccessible-code when deriving]+                                 -- in TcInstDcls++      ic_env   :: TcLclEnv,+                                 -- Records the TcLClEnv at the time of creation.+                                 --+                                 -- The TcLclEnv gives the source location+                                 -- and error context for the implication, and+                                 -- hence for all the given evidence variables.++      ic_wanted :: WantedConstraints,  -- The wanteds+                                       -- See Invariang (WantedInf) in TcType++      ic_binds  :: EvBindsVar,    -- Points to the place to fill in the+                                  -- abstraction and bindings.++      -- The ic_need fields keep track of which Given evidence+      -- is used by this implication or its children+      -- NB: including stuff used by nested implications that have since+      --     been discarded+      -- See Note [Needed evidence variables]+      ic_need_inner :: VarSet,    -- Includes all used Given evidence+      ic_need_outer :: VarSet,    -- Includes only the free Given evidence+                                  --  i.e. ic_need_inner after deleting+                                  --       (a) givens (b) binders of ic_binds++      ic_status   :: ImplicStatus+    }++implicationPrototype :: Implication+implicationPrototype+   = Implic { -- These fields must be initialised+              ic_tclvl      = panic "newImplic:tclvl"+            , ic_binds      = panic "newImplic:binds"+            , ic_info       = panic "newImplic:info"+            , ic_env        = panic "newImplic:env"+            , ic_warn_inaccessible = panic "newImplic:warn_inaccessible"++              -- The rest have sensible default values+            , ic_skols      = []+            , ic_telescope  = Nothing+            , ic_given      = []+            , ic_wanted     = emptyWC+            , ic_no_eqs     = False+            , ic_status     = IC_Unsolved+            , ic_need_inner = emptyVarSet+            , ic_need_outer = emptyVarSet }++data ImplicStatus+  = IC_Solved     -- All wanteds in the tree are solved, all the way down+       { ics_dead :: [EvVar] }  -- Subset of ic_given that are not needed+         -- See Note [Tracking redundant constraints] in TcSimplify++  | IC_Insoluble  -- At least one insoluble constraint in the tree++  | IC_BadTelescope  -- solved, but the skolems in the telescope are out of+                     -- dependency order++  | IC_Unsolved   -- Neither of the above; might go either way++instance Outputable Implication where+  ppr (Implic { ic_tclvl = tclvl, ic_skols = skols+              , ic_given = given, ic_no_eqs = no_eqs+              , ic_wanted = wanted, ic_status = status+              , ic_binds = binds+              , ic_need_inner = need_in, ic_need_outer = need_out+              , ic_info = info })+   = hang (text "Implic" <+> lbrace)+        2 (sep [ text "TcLevel =" <+> ppr tclvl+               , text "Skolems =" <+> pprTyVars skols+               , text "No-eqs =" <+> ppr no_eqs+               , text "Status =" <+> ppr status+               , hang (text "Given =")  2 (pprEvVars given)+               , hang (text "Wanted =") 2 (ppr wanted)+               , text "Binds =" <+> ppr binds+               , whenPprDebug (text "Needed inner =" <+> ppr need_in)+               , whenPprDebug (text "Needed outer =" <+> ppr need_out)+               , pprSkolInfo info ] <+> rbrace)++instance Outputable ImplicStatus where+  ppr IC_Insoluble    = text "Insoluble"+  ppr IC_BadTelescope = text "Bad telescope"+  ppr IC_Unsolved     = text "Unsolved"+  ppr (IC_Solved { ics_dead = dead })+    = text "Solved" <+> (braces (text "Dead givens =" <+> ppr dead))++{- Note [Checking telescopes]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When kind-checking a /user-written/ type, we might have a "bad telescope"+like this one:+  data SameKind :: forall k. k -> k -> Type+  type Foo :: forall a k (b :: k). SameKind a b -> Type++The kind of 'a' mentions 'k' which is bound after 'a'.  Oops.++Knowing this means that unification etc must have happened, so it's+convenient to detect it in the constraint solver:++* We make a single implication constraint when kind-checking+  the 'forall' in Foo's kind, something like+      forall a k (b::k). { wanted constraints }++* Having solved {wanted}, before discarding the now-solved implication,+  the costraint solver checks the dependency order of the skolem+  variables (ic_skols).  This is done in setImplicationStatus.++* This check is only necessary if the implication was born from a+  user-written signature.  If, say, it comes from checking a pattern+  match that binds existentials, where the type of the data constructor+  is known to be valid (it in tcConPat), no need for the check.++  So the check is done if and only if ic_telescope is (Just blah).++* If ic_telesope is (Just d), the d::SDoc displays the original,+  user-written type variables.++* Be careful /NOT/ to discard an implication with non-Nothing+  ic_telescope, even if ic_wanted is empty.  We must give the+  constraint solver a chance to make that bad-telesope test!  Hence+  the extra guard in emitResidualTvConstraint; see #16247++See also TcHsType Note [Keeping scoped variables in order: Explicit]++Note [Needed evidence variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Th ic_need_evs field holds the free vars of ic_binds, and all the+ic_binds in nested implications.++  * Main purpose: if one of the ic_givens is not mentioned in here, it+    is redundant.++  * solveImplication may drop an implication altogether if it has no+    remaining 'wanteds'. But we still track the free vars of its+    evidence binds, even though it has now disappeared.++Note [Shadowing in a constraint]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We assume NO SHADOWING in a constraint.  Specifically+ * The unification variables are all implicitly quantified at top+   level, and are all unique+ * The skolem variables bound in ic_skols are all freah when the+   implication is created.+So we can safely substitute. For example, if we have+   forall a.  a~Int => ...(forall b. ...a...)...+we can push the (a~Int) constraint inwards in the "givens" without+worrying that 'b' might clash.++Note [Skolems in an implication]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The skolems in an implication are not there to perform a skolem escape+check.  That happens because all the environment variables are in the+untouchables, and therefore cannot be unified with anything at all,+let alone the skolems.++Instead, ic_skols is used only when considering floating a constraint+outside the implication in TcSimplify.floatEqualities or+TcSimplify.approximateImplications++Note [Insoluble constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Some of the errors that we get during canonicalization are best+reported when all constraints have been simplified as much as+possible. For instance, assume that during simplification the+following constraints arise:++ [Wanted]   F alpha ~  uf1+ [Wanted]   beta ~ uf1 beta++When canonicalizing the wanted (beta ~ uf1 beta), if we eagerly fail+we will simply see a message:+    'Can't construct the infinite type  beta ~ uf1 beta'+and the user has no idea what the uf1 variable is.++Instead our plan is that we will NOT fail immediately, but:+    (1) Record the "frozen" error in the ic_insols field+    (2) Isolate the offending constraint from the rest of the inerts+    (3) Keep on simplifying/canonicalizing++At the end, we will hopefully have substituted uf1 := F alpha, and we+will be able to report a more informative error:+    'Can't construct the infinite type beta ~ F alpha beta'++Insoluble constraints *do* include Derived constraints. For example,+a functional dependency might give rise to [D] Int ~ Bool, and we must+report that.  If insolubles did not contain Deriveds, reportErrors would+never see it.+++************************************************************************+*                                                                      *+            Pretty printing+*                                                                      *+************************************************************************+-}++pprEvVars :: [EvVar] -> SDoc    -- Print with their types+pprEvVars ev_vars = vcat (map pprEvVarWithType ev_vars)++pprEvVarTheta :: [EvVar] -> SDoc+pprEvVarTheta ev_vars = pprTheta (map evVarPred ev_vars)++pprEvVarWithType :: EvVar -> SDoc+pprEvVarWithType v = ppr v <+> dcolon <+> pprType (evVarPred v)++++-- | Wraps the given type with the constraints (via ic_given) in the given+-- implication, according to the variables mentioned (via ic_skols)+-- in the implication, but taking care to only wrap those variables+-- that are mentioned in the type or the implication.+wrapTypeWithImplication :: Type -> Implication -> Type+wrapTypeWithImplication ty impl = wrapType ty mentioned_skols givens+    where givens = map idType $ ic_given impl+          skols = ic_skols impl+          freeVars = fvVarSet $ tyCoFVsOfTypes (ty:givens)+          mentioned_skols = filter (`elemVarSet` freeVars) skols++wrapType :: Type -> [TyVar] -> [PredType] -> Type+wrapType ty skols givens = mkSpecForAllTys skols $ mkPhiTy givens ty+++{-+************************************************************************+*                                                                      *+            CtEvidence+*                                                                      *+************************************************************************++Note [Evidence field of CtEvidence]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+During constraint solving we never look at the type of ctev_evar/ctev_dest;+instead we look at the ctev_pred field.  The evtm/evar field+may be un-zonked.++Note [Bind new Givens immediately]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For Givens we make new EvVars and bind them immediately. Two main reasons:+  * Gain sharing.  E.g. suppose we start with g :: C a b, where+       class D a => C a b+       class (E a, F a) => D a+    If we generate all g's superclasses as separate EvTerms we might+    get    selD1 (selC1 g) :: E a+           selD2 (selC1 g) :: F a+           selC1 g :: D a+    which we could do more economically as:+           g1 :: D a = selC1 g+           g2 :: E a = selD1 g1+           g3 :: F a = selD2 g1++  * For *coercion* evidence we *must* bind each given:+      class (a~b) => C a b where ....+      f :: C a b => ....+    Then in f's Givens we have g:(C a b) and the superclass sc(g,0):a~b.+    But that superclass selector can't (yet) appear in a coercion+    (see evTermCoercion), so the easy thing is to bind it to an Id.++So a Given has EvVar inside it rather than (as previously) an EvTerm.++-}++-- | A place for type-checking evidence to go after it is generated.+-- Wanted equalities are always HoleDest; other wanteds are always+-- EvVarDest.+data TcEvDest+  = EvVarDest EvVar         -- ^ bind this var to the evidence+              -- EvVarDest is always used for non-type-equalities+              -- e.g. class constraints++  | HoleDest  CoercionHole  -- ^ fill in this hole with the evidence+              -- HoleDest is always used for type-equalities+              -- See Note [Coercion holes] in TyCoRep++data CtEvidence+  = CtGiven    -- Truly given, not depending on subgoals+      { ctev_pred :: TcPredType      -- See Note [Ct/evidence invariant]+      , ctev_evar :: EvVar           -- See Note [Evidence field of CtEvidence]+      , ctev_loc  :: CtLoc }+++  | CtWanted   -- Wanted goal+      { ctev_pred :: TcPredType     -- See Note [Ct/evidence invariant]+      , ctev_dest :: TcEvDest+      , ctev_nosh :: ShadowInfo     -- See Note [Constraint flavours]+      , ctev_loc  :: CtLoc }++  | CtDerived  -- A goal that we don't really have to solve and can't+               -- immediately rewrite anything other than a derived+               -- (there's no evidence!) but if we do manage to solve+               -- it may help in solving other goals.+      { ctev_pred :: TcPredType+      , ctev_loc  :: CtLoc }++ctEvPred :: CtEvidence -> TcPredType+-- The predicate of a flavor+ctEvPred = ctev_pred++ctEvLoc :: CtEvidence -> CtLoc+ctEvLoc = ctev_loc++ctEvOrigin :: CtEvidence -> CtOrigin+ctEvOrigin = ctLocOrigin . ctEvLoc++-- | Get the equality relation relevant for a 'CtEvidence'+ctEvEqRel :: CtEvidence -> EqRel+ctEvEqRel = predTypeEqRel . ctEvPred++-- | Get the role relevant for a 'CtEvidence'+ctEvRole :: CtEvidence -> Role+ctEvRole = eqRelRole . ctEvEqRel++ctEvTerm :: CtEvidence -> EvTerm+ctEvTerm ev = EvExpr (ctEvExpr ev)++ctEvExpr :: CtEvidence -> EvExpr+ctEvExpr ev@(CtWanted { ctev_dest = HoleDest _ })+            = Coercion $ ctEvCoercion ev+ctEvExpr ev = evId (ctEvEvId ev)++ctEvCoercion :: HasDebugCallStack => CtEvidence -> TcCoercion+ctEvCoercion (CtGiven { ctev_evar = ev_id })+  = mkTcCoVarCo ev_id+ctEvCoercion (CtWanted { ctev_dest = dest })+  | HoleDest hole <- dest+  = -- ctEvCoercion is only called on type equalities+    -- and they always have HoleDests+    mkHoleCo hole+ctEvCoercion ev+  = pprPanic "ctEvCoercion" (ppr ev)++ctEvEvId :: CtEvidence -> EvVar+ctEvEvId (CtWanted { ctev_dest = EvVarDest ev }) = ev+ctEvEvId (CtWanted { ctev_dest = HoleDest h })   = coHoleCoVar h+ctEvEvId (CtGiven  { ctev_evar = ev })           = ev+ctEvEvId ctev@(CtDerived {}) = pprPanic "ctEvId:" (ppr ctev)++instance Outputable TcEvDest where+  ppr (HoleDest h)   = text "hole" <> ppr h+  ppr (EvVarDest ev) = ppr ev++instance Outputable CtEvidence where+  ppr ev = ppr (ctEvFlavour ev)+           <+> pp_ev+           <+> braces (ppr (ctl_depth (ctEvLoc ev))) <> dcolon+                  -- Show the sub-goal depth too+           <+> ppr (ctEvPred ev)+    where+      pp_ev = case ev of+             CtGiven { ctev_evar = v } -> ppr v+             CtWanted {ctev_dest = d } -> ppr d+             CtDerived {}              -> text "_"++isWanted :: CtEvidence -> Bool+isWanted (CtWanted {}) = True+isWanted _ = False++isGiven :: CtEvidence -> Bool+isGiven (CtGiven {})  = True+isGiven _ = False++isDerived :: CtEvidence -> Bool+isDerived (CtDerived {}) = True+isDerived _              = False++{-+%************************************************************************+%*                                                                      *+            CtFlavour+%*                                                                      *+%************************************************************************++Note [Constraint flavours]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Constraints come in four flavours:++* [G] Given: we have evidence++* [W] Wanted WOnly: we want evidence++* [D] Derived: any solution must satisfy this constraint, but+      we don't need evidence for it.  Examples include:+        - superclasses of [W] class constraints+        - equalities arising from functional dependencies+          or injectivity++* [WD] Wanted WDeriv: a single constraint that represents+                      both [W] and [D]+  We keep them paired as one both for efficiency, and because+  when we have a finite map  F tys -> CFunEqCan, it's inconvenient+  to have two CFunEqCans in the range++The ctev_nosh field of a Wanted distinguishes between [W] and [WD]++Wanted constraints are born as [WD], but are split into [W] and its+"shadow" [D] in TcSMonad.maybeEmitShadow.++See Note [The improvement story and derived shadows] in TcSMonad+-}++data CtFlavour  -- See Note [Constraint flavours]+  = Given+  | Wanted ShadowInfo+  | Derived+  deriving Eq++data ShadowInfo+  = WDeriv   -- [WD] This Wanted constraint has no Derived shadow,+             -- so it behaves like a pair of a Wanted and a Derived+  | WOnly    -- [W] It has a separate derived shadow+             -- See Note [The improvement story and derived shadows] in TcSMonad+  deriving( Eq )++isGivenOrWDeriv :: CtFlavour -> Bool+isGivenOrWDeriv Given           = True+isGivenOrWDeriv (Wanted WDeriv) = True+isGivenOrWDeriv _               = False++instance Outputable CtFlavour where+  ppr Given           = text "[G]"+  ppr (Wanted WDeriv) = text "[WD]"+  ppr (Wanted WOnly)  = text "[W]"+  ppr Derived         = text "[D]"++ctEvFlavour :: CtEvidence -> CtFlavour+ctEvFlavour (CtWanted { ctev_nosh = nosh }) = Wanted nosh+ctEvFlavour (CtGiven {})                    = Given+ctEvFlavour (CtDerived {})                  = Derived++-- | Whether or not one 'Ct' can rewrite another is determined by its+-- flavour and its equality relation. See also+-- Note [Flavours with roles] in TcSMonad+type CtFlavourRole = (CtFlavour, EqRel)++-- | Extract the flavour, role, and boxity from a 'CtEvidence'+ctEvFlavourRole :: CtEvidence -> CtFlavourRole+ctEvFlavourRole ev = (ctEvFlavour ev, ctEvEqRel ev)++-- | Extract the flavour and role from a 'Ct'+ctFlavourRole :: Ct -> CtFlavourRole+-- Uses short-cuts to role for special cases+ctFlavourRole (CDictCan { cc_ev = ev })+  = (ctEvFlavour ev, NomEq)+ctFlavourRole (CTyEqCan { cc_ev = ev, cc_eq_rel = eq_rel })+  = (ctEvFlavour ev, eq_rel)+ctFlavourRole (CFunEqCan { cc_ev = ev })+  = (ctEvFlavour ev, NomEq)+ctFlavourRole (CHoleCan { cc_ev = ev })+  = (ctEvFlavour ev, NomEq)  -- NomEq: CHoleCans can be rewritten by+                             -- by nominal equalities but empahatically+                             -- not by representational equalities+ctFlavourRole ct+  = ctEvFlavourRole (ctEvidence ct)++{- Note [eqCanRewrite]+~~~~~~~~~~~~~~~~~~~~~~+(eqCanRewrite ct1 ct2) holds if the constraint ct1 (a CTyEqCan of form+tv ~ ty) can be used to rewrite ct2.  It must satisfy the properties of+a can-rewrite relation, see Definition [Can-rewrite relation] in+TcSMonad.++With the solver handling Coercible constraints like equality constraints,+the rewrite conditions must take role into account, never allowing+a representational equality to rewrite a nominal one.++Note [Wanteds do not rewrite Wanteds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We don't allow Wanteds to rewrite Wanteds, because that can give rise+to very confusing type error messages.  A good example is #8450.+Here's another+   f :: a -> Bool+   f x = ( [x,'c'], [x,True] ) `seq` True+Here we get+  [W] a ~ Char+  [W] a ~ Bool+but we do not want to complain about Bool ~ Char!++Note [Deriveds do rewrite Deriveds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+However we DO allow Deriveds to rewrite Deriveds, because that's how+improvement works; see Note [The improvement story] in TcInteract.++However, for now at least I'm only letting (Derived,NomEq) rewrite+(Derived,NomEq) and not doing anything for ReprEq.  If we have+    eqCanRewriteFR (Derived, NomEq) (Derived, _)  = True+then we lose property R2 of Definition [Can-rewrite relation]+in TcSMonad+  R2.  If f1 >= f, and f2 >= f,+       then either f1 >= f2 or f2 >= f1+Consider f1 = (Given, ReprEq)+         f2 = (Derived, NomEq)+          f = (Derived, ReprEq)++I thought maybe we could never get Derived ReprEq constraints, but+we can; straight from the Wanteds during improvement. And from a Derived+ReprEq we could conceivably get a Derived NomEq improvement (by decomposing+a type constructor with Nomninal role), and hence unify.+-}++eqCanRewrite :: EqRel -> EqRel -> Bool+eqCanRewrite NomEq  _      = True+eqCanRewrite ReprEq ReprEq = True+eqCanRewrite ReprEq NomEq  = False++eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool+-- Can fr1 actually rewrite fr2?+-- Very important function!+-- See Note [eqCanRewrite]+-- See Note [Wanteds do not rewrite Wanteds]+-- See Note [Deriveds do rewrite Deriveds]+eqCanRewriteFR (Given,         r1)    (_,       r2)    = eqCanRewrite r1 r2+eqCanRewriteFR (Wanted WDeriv, NomEq) (Derived, NomEq) = True+eqCanRewriteFR (Derived,       NomEq) (Derived, NomEq) = True+eqCanRewriteFR _                      _                = False++eqMayRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool+-- Is it /possible/ that fr1 can rewrite fr2?+-- This is used when deciding which inerts to kick out,+-- at which time a [WD] inert may be split into [W] and [D]+eqMayRewriteFR (Wanted WDeriv, NomEq) (Wanted WDeriv, NomEq) = True+eqMayRewriteFR (Derived,       NomEq) (Wanted WDeriv, NomEq) = True+eqMayRewriteFR fr1 fr2 = eqCanRewriteFR fr1 fr2++-----------------+{- Note [funEqCanDischarge]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have two CFunEqCans with the same LHS:+    (x1:F ts ~ f1) `funEqCanDischarge` (x2:F ts ~ f2)+Can we drop x2 in favour of x1, either unifying+f2 (if it's a flatten meta-var) or adding a new Given+(f1 ~ f2), if x2 is a Given?++Answer: yes if funEqCanDischarge is true.+-}++funEqCanDischarge+  :: CtEvidence -> CtEvidence+  -> ( SwapFlag   -- NotSwapped => lhs can discharge rhs+                  -- Swapped    => rhs can discharge lhs+     , Bool)      -- True <=> upgrade non-discharded one+                  --          from [W] to [WD]+-- See Note [funEqCanDischarge]+funEqCanDischarge ev1 ev2+  = ASSERT2( ctEvEqRel ev1 == NomEq, ppr ev1 )+    ASSERT2( ctEvEqRel ev2 == NomEq, ppr ev2 )+    -- CFunEqCans are all Nominal, hence asserts+    funEqCanDischargeF (ctEvFlavour ev1) (ctEvFlavour ev2)++funEqCanDischargeF :: CtFlavour -> CtFlavour -> (SwapFlag, Bool)+funEqCanDischargeF Given           _               = (NotSwapped, False)+funEqCanDischargeF _               Given           = (IsSwapped,  False)+funEqCanDischargeF (Wanted WDeriv) _               = (NotSwapped, False)+funEqCanDischargeF _               (Wanted WDeriv) = (IsSwapped,  True)+funEqCanDischargeF (Wanted WOnly)  (Wanted WOnly)  = (NotSwapped, False)+funEqCanDischargeF (Wanted WOnly)  Derived         = (NotSwapped, True)+funEqCanDischargeF Derived         (Wanted WOnly)  = (IsSwapped,  True)+funEqCanDischargeF Derived         Derived         = (NotSwapped, False)+++{- Note [eqCanDischarge]+~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have two identical CTyEqCan equality constraints+(i.e. both LHS and RHS are the same)+      (x1:a~t) `eqCanDischarge` (xs:a~t)+Can we just drop x2 in favour of x1?++Answer: yes if eqCanDischarge is true.++Note that we do /not/ allow Wanted to discharge Derived.+We must keep both.  Why?  Because the Derived may rewrite+other Deriveds in the model whereas the Wanted cannot.++However a Wanted can certainly discharge an identical Wanted.  So+eqCanDischarge does /not/ define a can-rewrite relation in the+sense of Definition [Can-rewrite relation] in TcSMonad.++We /do/ say that a [W] can discharge a [WD].  In evidence terms it+certainly can, and the /caller/ arranges that the otherwise-lost [D]+is spat out as a new Derived.  -}++eqCanDischargeFR :: CtFlavourRole -> CtFlavourRole -> Bool+-- See Note [eqCanDischarge]+eqCanDischargeFR (f1,r1) (f2, r2) =  eqCanRewrite r1 r2+                                  && eqCanDischargeF f1 f2++eqCanDischargeF :: CtFlavour -> CtFlavour -> Bool+eqCanDischargeF Given   _                  = True+eqCanDischargeF (Wanted _)      (Wanted _) = True+eqCanDischargeF (Wanted WDeriv) Derived    = True+eqCanDischargeF Derived         Derived    = True+eqCanDischargeF _               _          = False+++{-+************************************************************************+*                                                                      *+            SubGoalDepth+*                                                                      *+************************************************************************++Note [SubGoalDepth]+~~~~~~~~~~~~~~~~~~~+The 'SubGoalDepth' takes care of stopping the constraint solver from looping.++The counter starts at zero and increases. It includes dictionary constraints,+equality simplification, and type family reduction. (Why combine these? Because+it's actually quite easy to mistake one for another, in sufficiently involved+scenarios, like ConstraintKinds.)++The flag -freduction-depth=n fixes the maximium level.++* The counter includes the depth of type class instance declarations.  Example:+     [W] d{7} : Eq [Int]+  That is d's dictionary-constraint depth is 7.  If we use the instance+     $dfEqList :: Eq a => Eq [a]+  to simplify it, we get+     d{7} = $dfEqList d'{8}+  where d'{8} : Eq Int, and d' has depth 8.++  For civilised (decidable) instance declarations, each increase of+  depth removes a type constructor from the type, so the depth never+  gets big; i.e. is bounded by the structural depth of the type.++* The counter also increments when resolving+equalities involving type functions. Example:+  Assume we have a wanted at depth 7:+    [W] d{7} : F () ~ a+  If there is a type function equation "F () = Int", this would be rewritten to+    [W] d{8} : Int ~ a+  and remembered as having depth 8.++  Again, without UndecidableInstances, this counter is bounded, but without it+  can resolve things ad infinitum. Hence there is a maximum level.++* Lastly, every time an equality is rewritten, the counter increases. Again,+  rewriting an equality constraint normally makes progress, but it's possible+  the "progress" is just the reduction of an infinitely-reducing type family.+  Hence we need to track the rewrites.++When compiling a program requires a greater depth, then GHC recommends turning+off this check entirely by setting -freduction-depth=0. This is because the+exact number that works is highly variable, and is likely to change even between+minor releases. Because this check is solely to prevent infinite compilation+times, it seems safe to disable it when a user has ascertained that their program+doesn't loop at the type level.++-}++-- | See Note [SubGoalDepth]+newtype SubGoalDepth = SubGoalDepth Int+  deriving (Eq, Ord, Outputable)++initialSubGoalDepth :: SubGoalDepth+initialSubGoalDepth = SubGoalDepth 0++bumpSubGoalDepth :: SubGoalDepth -> SubGoalDepth+bumpSubGoalDepth (SubGoalDepth n) = SubGoalDepth (n + 1)++maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth+maxSubGoalDepth (SubGoalDepth n) (SubGoalDepth m) = SubGoalDepth (n `max` m)++subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool+subGoalDepthExceeded dflags (SubGoalDepth d)+  = mkIntWithInf d > reductionDepth dflags++{-+************************************************************************+*                                                                      *+            CtLoc+*                                                                      *+************************************************************************++The 'CtLoc' gives information about where a constraint came from.+This is important for decent error message reporting because+dictionaries don't appear in the original source code.+type will evolve...++-}++data CtLoc = CtLoc { ctl_origin :: CtOrigin+                   , ctl_env    :: TcLclEnv+                   , ctl_t_or_k :: Maybe TypeOrKind  -- OK if we're not sure+                   , ctl_depth  :: !SubGoalDepth }++  -- The TcLclEnv includes particularly+  --    source location:  tcl_loc   :: RealSrcSpan+  --    context:          tcl_ctxt  :: [ErrCtxt]+  --    binder stack:     tcl_bndrs :: TcBinderStack+  --    level:            tcl_tclvl :: TcLevel++mkKindLoc :: TcType -> TcType   -- original *types* being compared+          -> CtLoc -> CtLoc+mkKindLoc s1 s2 loc = setCtLocOrigin (toKindLoc loc)+                        (KindEqOrigin s1 (Just s2) (ctLocOrigin loc)+                                      (ctLocTypeOrKind_maybe loc))++-- | Take a CtLoc and moves it to the kind level+toKindLoc :: CtLoc -> CtLoc+toKindLoc loc = loc { ctl_t_or_k = Just KindLevel }++mkGivenLoc :: TcLevel -> SkolemInfo -> TcLclEnv -> CtLoc+mkGivenLoc tclvl skol_info env+  = CtLoc { ctl_origin = GivenOrigin skol_info+          , ctl_env    = setLclEnvTcLevel env tclvl+          , ctl_t_or_k = Nothing    -- this only matters for error msgs+          , ctl_depth  = initialSubGoalDepth }++ctLocEnv :: CtLoc -> TcLclEnv+ctLocEnv = ctl_env++ctLocLevel :: CtLoc -> TcLevel+ctLocLevel loc = getLclEnvTcLevel (ctLocEnv loc)++ctLocDepth :: CtLoc -> SubGoalDepth+ctLocDepth = ctl_depth++ctLocOrigin :: CtLoc -> CtOrigin+ctLocOrigin = ctl_origin++ctLocSpan :: CtLoc -> RealSrcSpan+ctLocSpan (CtLoc { ctl_env = lcl}) = getLclEnvLoc lcl++ctLocTypeOrKind_maybe :: CtLoc -> Maybe TypeOrKind+ctLocTypeOrKind_maybe = ctl_t_or_k++setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc+setCtLocSpan ctl@(CtLoc { ctl_env = lcl }) loc = setCtLocEnv ctl (setLclEnvLoc lcl loc)++bumpCtLocDepth :: CtLoc -> CtLoc+bumpCtLocDepth loc@(CtLoc { ctl_depth = d }) = loc { ctl_depth = bumpSubGoalDepth d }++setCtLocOrigin :: CtLoc -> CtOrigin -> CtLoc+setCtLocOrigin ctl orig = ctl { ctl_origin = orig }++updateCtLocOrigin :: CtLoc -> (CtOrigin -> CtOrigin) -> CtLoc+updateCtLocOrigin ctl@(CtLoc { ctl_origin = orig }) upd+  = ctl { ctl_origin = upd orig }++setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc+setCtLocEnv ctl env = ctl { ctl_env = env }++pprCtLoc :: CtLoc -> SDoc+-- "arising from ... at ..."+-- Not an instance of Outputable because of the "arising from" prefix+pprCtLoc (CtLoc { ctl_origin = o, ctl_env = lcl})+  = sep [ pprCtOrigin o+        , text "at" <+> ppr (getLclEnvLoc lcl)]
typecheck/FamInst.hs view
@@ -1,6 +1,6 @@ -- The @FamInst@ type: family instance heads -{-# LANGUAGE CPP, GADTs #-}+{-# LANGUAGE CPP, GADTs, ViewPatterns #-}  module FamInst (         FamInstEnvs, tcGetFamInstEnvs,@@ -10,7 +10,7 @@         newFamInst,          -- * Injectivity-        makeInjectivityErrors, injTyVarsOfType, injTyVarsOfTypes+        reportInjectivityErrors, reportConflictingInjectivityErrs     ) where  import GhcPrelude@@ -34,16 +34,20 @@ import RdrName import DataCon ( dataConName ) import Maybes-import Type import TyCoRep+import TyCoFVs+import TyCoPpr ( pprWithExplicitKindsWhen ) import TcMType import Name-import Pair import Panic import VarSet+import FV import Bag( Bag, unionBags, unitBag ) import Control.Monad+import Data.List.NonEmpty ( NonEmpty(..) ) +import qualified GHC.LanguageExtensions  as LangExt+ #include "HsVersions.h"  {- Note [The type family instance consistency story]@@ -158,8 +162,10 @@ -- Freshen the type variables of the FamInst branches newFamInst flavor axiom@(CoAxiom { co_ax_tc = fam_tc })   = ASSERT2( tyCoVarsOfTypes lhs `subVarSet` tcv_set, text "lhs" <+> pp_ax )-    ASSERT2( tyCoVarsOfType  rhs `subVarSet` tcv_set, text "rhs" <+> pp_ax )     ASSERT2( lhs_kind `eqType` rhs_kind, text "kind" <+> pp_ax $$ ppr lhs_kind $$ ppr rhs_kind )+    -- We used to have an assertion that the tyvars of the RHS were bound+    -- by tcv_set, but in error situations like  F Int = a that isn't+    -- true; a later check in checkValidFamInst rejects it     do { (subst, tvs') <- freshenTyVarBndrs tvs        ; (subst, cvs') <- freshenCoVarBndrsX subst cvs        ; dflags <- getDynFlags@@ -299,13 +305,12 @@ -- See Note [The type family instance consistency story]. checkFamInstConsistency :: [Module] -> TcM () checkFamInstConsistency directlyImpMods-  = do { dflags     <- getDynFlags-       ; (eps, hpt) <- getEpsAndHpt+  = do { (eps, hpt) <- getEpsAndHpt        ; traceTc "checkFamInstConsistency" (ppr directlyImpMods)        ; let { -- Fetch the iface of a given module.  Must succeed as                -- all directly imported modules must already have been loaded.                modIface mod =-                 case lookupIfaceByModule dflags hpt (eps_PIT eps) mod of+                 case lookupIfaceByModule hpt (eps_PIT eps) mod of                    Nothing    -> panicDoc "FamInst.checkFamInstConsistency"                                           (ppr mod $$ pprHPT hpt)                    Just iface -> iface@@ -317,7 +322,7 @@                -- Note [Checking family instance optimization]              ; modConsistent :: Module -> [Module]              ; modConsistent mod =-                 if mi_finsts (modIface mod) then mod:deps else deps+                 if mi_finsts (mi_final_exts (modIface mod)) then mod:deps else deps                  where                  deps = dep_finsts . mi_deps . modIface $ mod @@ -678,10 +683,13 @@              home_fie' = extendFamInstEnv home_fie fam_inst             -- Check for conflicting instance decls and injectivity violations-       ; no_conflict    <- checkForConflicts            inst_envs fam_inst-       ; injectivity_ok <- checkForInjectivityConflicts inst_envs fam_inst+       ; ((), no_errs) <- askNoErrs $+         do { checkForConflicts            inst_envs fam_inst+            ; checkForInjectivityConflicts inst_envs fam_inst+            ; checkInjectiveEquation       fam_inst+            } -       ; if no_conflict && injectivity_ok then+       ; if no_errs then             return (home_fie', fam_inst : my_fis)          else             return (home_fie,  my_fis) }@@ -697,7 +705,8 @@ environments (one for the EPS and one for the HPT). -} -checkForConflicts :: FamInstEnvs -> FamInst -> TcM Bool+-- | Checks to make sure no two family instances overlap.+checkForConflicts :: FamInstEnvs -> FamInst -> TcM () checkForConflicts inst_envs fam_inst   = do { let conflicts = lookupFamInstEnvConflicts inst_envs fam_inst        ; traceTc "checkForConflicts" $@@ -705,136 +714,74 @@               , ppr fam_inst               -- , ppr inst_envs          ]-       ; reportConflictInstErr fam_inst conflicts-       ; return (null conflicts) }+       ; reportConflictInstErr fam_inst conflicts } +checkForInjectivityConflicts :: FamInstEnvs -> FamInst -> TcM ()+  -- see Note [Verifying injectivity annotation] in FamInstEnv, check 1B1.+checkForInjectivityConflicts instEnvs famInst+    | isTypeFamilyTyCon tycon   -- as opposed to data family tycon+    , Injective inj <- tyConInjectivityInfo tycon+    = let conflicts = lookupFamInstEnvInjectivityConflicts inj instEnvs famInst in+      reportConflictingInjectivityErrs tycon conflicts (coAxiomSingleBranch (fi_axiom famInst))++    | otherwise+    = return ()++    where tycon = famInstTyCon famInst+ -- | Check whether a new open type family equation can be added without -- violating injectivity annotation supplied by the user. Returns True when -- this is possible and False if adding this equation would violate injectivity--- annotation.-checkForInjectivityConflicts :: FamInstEnvs -> FamInst -> TcM Bool-checkForInjectivityConflicts instEnvs famInst+-- annotation. This looks only at the one equation; it does not look for+-- interaction between equations. Use checkForInjectivityConflicts for that.+-- Does checks (2)-(4) of Note [Verifying injectivity annotation] in FamInstEnv.+checkInjectiveEquation :: FamInst -> TcM ()+checkInjectiveEquation famInst     | isTypeFamilyTyCon tycon     -- type family is injective in at least one argument     , Injective inj <- tyConInjectivityInfo tycon = do-    { let axiom = coAxiomSingleBranch fi_ax-          conflicts = lookupFamInstEnvInjectivityConflicts inj instEnvs famInst+    { dflags <- getDynFlags+    ; let axiom = coAxiomSingleBranch fi_ax           -- see Note [Verifying injectivity annotation] in FamInstEnv-          errs = makeInjectivityErrors fi_ax axiom inj conflicts-    ; mapM_ (\(err, span) -> setSrcSpan span $ addErr err) errs-    ; return (null errs)+    ; reportInjectivityErrors dflags fi_ax axiom inj     }      -- if there was no injectivity annotation or tycon does not represent a     -- type family we report no conflicts-    | otherwise = return True+    | otherwise+    = return ()+     where tycon = famInstTyCon famInst           fi_ax = fi_axiom famInst --- | Build a list of injectivity errors together with their source locations.-makeInjectivityErrors-   :: CoAxiom br   -- ^ Type family for which we generate errors+-- | Report a list of injectivity errors together with their source locations.+-- Looks only at one equation; does not look for conflicts *among* equations.+reportInjectivityErrors+   :: DynFlags+   -> CoAxiom br   -- ^ Type family for which we generate errors    -> CoAxBranch   -- ^ Currently checked equation (represented by axiom)    -> [Bool]       -- ^ Injectivity annotation-   -> [CoAxBranch] -- ^ List of injectivity conflicts-   -> [(SDoc, SrcSpan)]-makeInjectivityErrors fi_ax axiom inj conflicts+   -> TcM ()+reportInjectivityErrors dflags fi_ax axiom inj   = ASSERT2( any id inj, text "No injective type variables" )-    let lhs             = coAxBranchLHS axiom-        rhs             = coAxBranchRHS axiom-        fam_tc          = coAxiomTyCon fi_ax-        are_conflicts   = not $ null conflicts-        unused_inj_tvs  = unusedInjTvsInRHS fam_tc inj lhs rhs-        inj_tvs_unused  = not $ and (isEmptyVarSet <$> unused_inj_tvs)-        tf_headed       = isTFHeaded rhs-        bare_variables  = bareTvInRHSViolated lhs rhs-        wrong_bare_rhs  = not $ null bare_variables--        err_builder herald eqns-                        = ( hang herald-                               2 (vcat (map (pprCoAxBranchUser fam_tc) eqns))-                          , coAxBranchSpan (head eqns) )-        errorIf p f     = if p then [f err_builder axiom] else []-     in    errorIf are_conflicts  (conflictInjInstErr     conflicts     )-        ++ errorIf inj_tvs_unused (unusedInjectiveVarsErr unused_inj_tvs)-        ++ errorIf tf_headed       tfHeadedErr-        ++ errorIf wrong_bare_rhs (bareVariableInRHSErr   bare_variables)----- | Return a list of type variables that the function is injective in and that--- do not appear on injective positions in the RHS of a family instance--- declaration. The returned Pair includes invisible vars followed by visible ones-unusedInjTvsInRHS :: TyCon -> [Bool] -> [Type] -> Type -> Pair TyVarSet--- INVARIANT: [Bool] list contains at least one True value--- See Note [Verifying injectivity annotation]. This function implements fourth--- check described there.--- In theory, instead of implementing this whole check in this way, we could--- attempt to unify equation with itself.  We would reject exactly the same--- equations but this method gives us more precise error messages by returning--- precise names of variables that are not mentioned in the RHS.-unusedInjTvsInRHS tycon injList lhs rhs =-  (`minusVarSet` injRhsVars) <$> injLHSVars-    where-      inj_pairs :: [(Type, ArgFlag)]-      -- All the injective arguments, paired with their visibility-      inj_pairs = ASSERT2( injList `equalLength` lhs-                         , ppr tycon $$ ppr injList $$ ppr lhs )-                  filterByList injList (lhs `zip` tyConArgFlags tycon lhs)--      -- set of type and kind variables in which type family is injective-      invis_lhs, vis_lhs :: [Type]-      (invis_lhs, vis_lhs) = partitionInvisibles inj_pairs--      invis_vars = tyCoVarsOfTypes invis_lhs-      Pair invis_vars' vis_vars = splitVisVarsOfTypes vis_lhs-      injLHSVars-        = Pair (invis_vars `minusVarSet` vis_vars `unionVarSet` invis_vars')-               vis_vars--      -- set of type variables appearing in the RHS on an injective position.-      -- For all returned variables we assume their associated kind variables-      -- also appear in the RHS.-      injRhsVars = injTyVarsOfType rhs--injTyVarsOfType :: TcTauType -> TcTyVarSet--- Collect all type variables that are either arguments to a type---   constructor or to /injective/ type families.--- Determining the overall type determines thes variables------ E.g.   Suppose F is injective in its second arg, but not its first---        then injVarOfType (Either a (F [b] (a,c))) = {a,c}---        Determining the overall type determines a,c but not b.-injTyVarsOfType ty-  | Just ty' <- coreView ty -- #12430-  = injTyVarsOfType ty'-injTyVarsOfType (TyVarTy v)-  = unitVarSet v `unionVarSet` injTyVarsOfType (tyVarKind v)-injTyVarsOfType (TyConApp tc tys)-  | isTypeFamilyTyCon tc-   = case tyConInjectivityInfo tc of-        NotInjective  -> emptyVarSet-        Injective inj -> injTyVarsOfTypes (filterByList inj tys)-  | otherwise-  = injTyVarsOfTypes tys-injTyVarsOfType (LitTy {})-  = emptyVarSet-injTyVarsOfType (FunTy arg res)-  = injTyVarsOfType arg `unionVarSet` injTyVarsOfType res-injTyVarsOfType (AppTy fun arg)-  = injTyVarsOfType fun `unionVarSet` injTyVarsOfType arg--- No forall types in the RHS of a type family-injTyVarsOfType (CastTy ty _)   = injTyVarsOfType ty-injTyVarsOfType (CoercionTy {}) = emptyVarSet-injTyVarsOfType (ForAllTy {})    =-    panic "unusedInjTvsInRHS.injTyVarsOfType"+    do let lhs             = coAxBranchLHS axiom+           rhs             = coAxBranchRHS axiom+           fam_tc          = coAxiomTyCon fi_ax+           (unused_inj_tvs, unused_vis, undec_inst_flag)+                           = unusedInjTvsInRHS dflags fam_tc lhs rhs+           inj_tvs_unused  = not $ isEmptyVarSet unused_inj_tvs+           tf_headed       = isTFHeaded rhs+           bare_variables  = bareTvInRHSViolated lhs rhs+           wrong_bare_rhs  = not $ null bare_variables -injTyVarsOfTypes :: [Type] -> VarSet-injTyVarsOfTypes tys = mapUnionVarSet injTyVarsOfType tys+       when inj_tvs_unused $ reportUnusedInjectiveVarsErr fam_tc unused_inj_tvs+                                                          unused_vis undec_inst_flag axiom+       when tf_headed      $ reportTfHeadedErr            fam_tc axiom+       when wrong_bare_rhs $ reportBareVariableInRHSErr   fam_tc bare_variables axiom  -- | Is type headed by a type family application? isTFHeaded :: Type -> Bool--- See Note [Verifying injectivity annotation]. This function implements third--- check described there.+-- See Note [Verifying injectivity annotation], case 3. isTFHeaded ty | Just ty' <- coreView ty               = isTFHeaded ty' isTFHeaded ty | (TyConApp tc args) <- ty@@ -846,85 +793,239 @@ -- | If a RHS is a bare type variable return a set of LHS patterns that are not -- bare type variables. bareTvInRHSViolated :: [Type] -> Type -> [Type]--- See Note [Verifying injectivity annotation]. This function implements second--- check described there.+-- See Note [Verifying injectivity annotation], case 2. bareTvInRHSViolated pats rhs | isTyVarTy rhs    = filter (not . isTyVarTy) pats bareTvInRHSViolated _ _ = [] +------------------------------------------------------------------+-- Checking for the coverage condition for injective type families+------------------------------------------------------------------ --- | Type of functions that use error message and a list of axioms to build full--- error message (with a source location) for injective type families.-type InjErrorBuilder = SDoc -> [CoAxBranch] -> (SDoc, SrcSpan)+{-+Note [Coverage condition for injective type families]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The Injective Type Families paper describes how we can tell whether+or not a type family equation upholds the injectivity condition.+Briefly, consider the following: --- | Build injecivity error herald common to all injectivity errors.-injectivityErrorHerald :: Bool -> SDoc-injectivityErrorHerald isSingular =-  text "Type family equation" <> s isSingular <+> text "violate" <>-  s (not isSingular) <+> text "injectivity annotation" <>-  if isSingular then dot else colon-  -- Above is an ugly hack.  We want this: "sentence. herald:" (note the dot and-  -- colon).  But if herald is empty we want "sentence:" (note the colon).  We-  -- can't test herald for emptiness so we rely on the fact that herald is empty-  -- only when isSingular is False.  If herald is non empty it must end with a-  -- colon.-    where-      s False = text "s"-      s True  = empty+  type family F a b = r | r -> a      -- NB: b is not injective --- | Build error message for a pair of equations violating an injectivity--- annotation.-conflictInjInstErr :: [CoAxBranch] -> InjErrorBuilder -> CoAxBranch-                   -> (SDoc, SrcSpan)-conflictInjInstErr conflictingEqns errorBuilder tyfamEqn-  | confEqn : _ <- conflictingEqns-  = errorBuilder (injectivityErrorHerald False) [confEqn, tyfamEqn]-  | otherwise-  = panic "conflictInjInstErr"+  type instance F ty1 ty2 = ty3 --- | Build error message for equation with injective type variables unused in--- the RHS.-unusedInjectiveVarsErr :: Pair TyVarSet -> InjErrorBuilder -> CoAxBranch-                       -> (SDoc, SrcSpan)-unusedInjectiveVarsErr (Pair invis_vars vis_vars) errorBuilder tyfamEqn-  = let (doc, loc) = errorBuilder (injectivityErrorHerald True $$ msg)-                                  [tyfamEqn]-    in (pprWithExplicitKindsWhen has_kinds doc, loc)+We need to make sure that all variables mentioned in ty1 are mentioned in ty3+-- that's how we know that knowing ty3 determines ty1. But they can't be+mentioned just anywhere in ty3: they must be in *injective* positions in ty3.+For example:++  type instance F a Int = Maybe (G a)++This is no good, if G is not injective. However, if G is indeed injective,+then this would appear to meet our needs. There is a trap here, though: while+knowing G a does indeed determine a, trying to compute a from G a might not+terminate. This is precisely the same problem that we have with functional+dependencies and their liberal coverage condition. Here is the test case:++  type family G a = r | r -> a+  type instance G [a] = [G a]+  [W] G alpha ~ [alpha]++We see that the equation given applies, because G alpha equals a list. So we+learn that alpha must be [beta] for some beta. We then have++  [W] G [beta] ~ [[beta]]++This can reduce to++  [W] [G beta] ~ [[beta]]++which then decomposes to++  [W] G beta ~ [beta]++right where we started. The equation G [a] = [G a] thus is dangerous: while+it does not violate the injectivity assumption, it might throw us into a loop,+with a particularly dastardly Wanted.++We thus do what functional dependencies do: require -XUndecidableInstances to+accept this.++Checking the coverage condition is not terribly hard, but we also want to produce+a nice error message. A nice error message has at least two properties:++1. If any of the variables involved are invisible or are used in an invisible context,+we want to print invisible arguments (as -fprint-explicit-kinds does).++2. If we fail to accept the equation because we're worried about non-termination,+we want to suggest UndecidableInstances.++To gather the right information, we can talk about the *usage* of a variable. Every+variable is used either visibly or invisibly, and it is either not used at all,+in a context where acceptance requires UndecidableInstances, or in a context that+does not require UndecidableInstances. If a variable is used both visibly and+invisibly, then we want to remember the fact that it was used invisibly: printing+out invisibles will be helpful for the user to understand what is going on.+If a variable is used where we need -XUndecidableInstances and where we don't,+we can similarly just remember the latter.++We thus define Visibility and NeedsUndecInstFlag below. These enumerations are+*ordered*, and we used their Ord instances. We then define VarUsage, which is just a pair+of a Visibility and a NeedsUndecInstFlag. (The visibility is irrelevant when a+variable is NotPresent, but this extra slack in the representation causes no+harm.) We finally define VarUsages as a mapping from variables to VarUsage.+Its Monoid instance combines two maps, using the Semigroup instance of VarUsage+to combine elements that are represented in both maps. In this way, we can+compositionally analyze types (and portions thereof).++To do the injectivity check:++1. We build VarUsages that represent the LHS (rather, the portion of the LHS+that is flagged as injective); each usage on the LHS is NotPresent, because we+hvae not yet looked at the RHS.++2. We also build a VarUsage for the RHS, done by injTyVarUsages.++3. We then combine these maps. Now, every variable in the injective components of the LHS+will be mapped to its correct usage (either NotPresent or perhaps needing+-XUndecidableInstances in order to be seen as injective).++4. We look up each var used in an injective argument on the LHS in+the map, making a list of tvs that should be determined by the RHS+but aren't.++5. We then return the set of bad variables, whether any of the bad+ones were used invisibly, and whether any bad ones need -XUndecidableInstances.+If -XUndecidableInstances is enabled, than a var that needs the flag+won't be bad, so it won't appear in this list.++6. We use all this information to produce a nice error message, (a) switching+on -fprint-explicit-kinds if appropriate and (b) telling the user about+-XUndecidableInstances if appropriate.++-}++-- | Return the set of type variables that a type family equation is+-- expected to be injective in but is not. Suppose we have @type family+-- F a b = r | r -> a@. Then any variables that appear free in the first+-- argument to F in an equation must be fixed by that equation's RHS.+-- This function returns all such variables that are not indeed fixed.+-- It also returns whether any of these variables appear invisibly+-- and whether -XUndecidableInstances would help.+-- See Note [Coverage condition for injective type families].+unusedInjTvsInRHS :: DynFlags+                  -> TyCon  -- type family+                  -> [Type] -- LHS arguments+                  -> Type   -- the RHS+                  -> ( TyVarSet+                     , Bool   -- True <=> one or more variable is used invisibly+                     , Bool ) -- True <=> suggest -XUndecidableInstances+-- See Note [Verifying injectivity annotation] in FamInstEnv.+-- This function implements check (4) described there, further+-- described in Note [Coverage condition for injective type families].+-- In theory (and modulo the -XUndecidableInstances wrinkle),+-- instead of implementing this whole check in this way, we could+-- attempt to unify equation with itself.  We would reject exactly the same+-- equations but this method gives us more precise error messages by returning+-- precise names of variables that are not mentioned in the RHS.+unusedInjTvsInRHS dflags tycon@(tyConInjectivityInfo -> Injective inj_list) lhs rhs =+  -- Note [Coverage condition for injective type families], step 5+  (bad_vars, any_invisible, suggest_undec)     where-      tvs = invis_vars `unionVarSet` vis_vars-      has_types = not $ isEmptyVarSet vis_vars-      has_kinds = not $ isEmptyVarSet invis_vars+      undec_inst = xopt LangExt.UndecidableInstances dflags -      doc = sep [ what <+> text "variable" <>+      inj_lhs = filterByList inj_list lhs+      lhs_vars = tyCoVarsOfTypes inj_lhs++      rhs_inj_vars = fvVarSet $ injectiveVarsOfType undec_inst rhs++      bad_vars = lhs_vars `minusVarSet` rhs_inj_vars++      any_bad = not $ isEmptyVarSet bad_vars++      invis_vars = fvVarSet $ invisibleVarsOfTypes [mkTyConApp tycon lhs, rhs]++      any_invisible = any_bad && (bad_vars `intersectsVarSet` invis_vars)+      suggest_undec = any_bad &&+                      not undec_inst &&+                      (lhs_vars `subVarSet` fvVarSet (injectiveVarsOfType True rhs))++-- When the type family is not injective in any arguments+unusedInjTvsInRHS _ _ _ _ = (emptyVarSet, False, False)++---------------------------------------+-- Producing injectivity error messages+---------------------------------------++-- | Report error message for a pair of equations violating an injectivity+-- annotation. No error message if there are no branches.+reportConflictingInjectivityErrs :: TyCon -> [CoAxBranch] -> CoAxBranch -> TcM ()+reportConflictingInjectivityErrs _ [] _ = return ()+reportConflictingInjectivityErrs fam_tc (confEqn1:_) tyfamEqn+  = addErrs [buildInjectivityError fam_tc herald (confEqn1 :| [tyfamEqn])]+  where+    herald = text "Type family equation right-hand sides overlap; this violates" $$+             text "the family's injectivity annotation:"++-- | Injectivity error herald common to all injectivity errors.+injectivityErrorHerald :: SDoc+injectivityErrorHerald =+  text "Type family equation violates the family's injectivity annotation."+++-- | Report error message for equation with injective type variables unused in+-- the RHS. Note [Coverage condition for injective type families], step 6+reportUnusedInjectiveVarsErr :: TyCon+                             -> TyVarSet+                             -> Bool   -- True <=> print invisible arguments+                             -> Bool   -- True <=> suggest -XUndecidableInstances+                             -> CoAxBranch+                             -> TcM ()+reportUnusedInjectiveVarsErr fam_tc tvs has_kinds undec_inst tyfamEqn+  = let (loc, doc) = buildInjectivityError fam_tc+                                  (injectivityErrorHerald $$+                                   herald $$+                                   text "In the type family equation:")+                                  (tyfamEqn :| [])+    in addErrAt loc (pprWithExplicitKindsWhen has_kinds doc)+    where+      herald = sep [ what <+> text "variable" <>                   pluralVarSet tvs <+> pprVarSet tvs (pprQuotedList . scopedSort)                 , text "cannot be inferred from the right-hand side." ]-      what = case (has_types, has_kinds) of-               (True, True)   -> text "Type and kind"-               (True, False)  -> text "Type"-               (False, True)  -> text "Kind"-               (False, False) -> pprPanic "mkUnusedInjectiveVarsErr" $ ppr tvs-      msg = doc $$ text "In the type family equation:"+               $$ extra --- | Build error message for equation that has a type family call at the top+      what | has_kinds = text "Type/kind"+           | otherwise = text "Type"++      extra | undec_inst = text "Using UndecidableInstances might help"+            | otherwise  = empty++-- | Report error message for equation that has a type family call at the top -- level of RHS-tfHeadedErr :: InjErrorBuilder -> CoAxBranch-            -> (SDoc, SrcSpan)-tfHeadedErr errorBuilder famInst-  = errorBuilder (injectivityErrorHerald True $$-                  text "RHS of injective type family equation cannot" <+>-                  text "be a type family:") [famInst]+reportTfHeadedErr :: TyCon -> CoAxBranch -> TcM ()+reportTfHeadedErr fam_tc branch+  = addErrs [buildInjectivityError fam_tc+               (injectivityErrorHerald $$+                 text "RHS of injective type family equation cannot" <+>+                 text "be a type family:")+               (branch :| [])] --- | Build error message for equation that has a bare type variable in the RHS+-- | Report error message for equation that has a bare type variable in the RHS -- but LHS pattern is not a bare type variable.-bareVariableInRHSErr :: [Type] -> InjErrorBuilder -> CoAxBranch-                     -> (SDoc, SrcSpan)-bareVariableInRHSErr tys errorBuilder famInst-  = errorBuilder (injectivityErrorHerald True $$+reportBareVariableInRHSErr :: TyCon -> [Type] -> CoAxBranch -> TcM ()+reportBareVariableInRHSErr fam_tc tys branch+  = addErrs [buildInjectivityError fam_tc+                 (injectivityErrorHerald $$                   text "RHS of injective type family equation is a bare" <+>                   text "type variable" $$                   text "but these LHS type and kind patterns are not bare" <+>-                  text "variables:" <+> pprQuotedList tys) [famInst]+                  text "variables:" <+> pprQuotedList tys)+                 (branch :| [])] +buildInjectivityError :: TyCon -> SDoc -> NonEmpty CoAxBranch -> (SrcSpan, SDoc)+buildInjectivityError fam_tc herald (eqn1 :| rest_eqns)+  = ( coAxBranchSpan eqn1+    , hang herald+         2 (vcat (map (pprCoAxBranchUser fam_tc) (eqn1 : rest_eqns))) )  reportConflictInstErr :: FamInst -> [FamInstMatch] -> TcRn () reportConflictInstErr _ []
typecheck/FunDeps.hs view
@@ -24,14 +24,17 @@ import Name import Var import Class+import Predicate import Type import TcType( transSuperClasses ) import CoAxiom( TypeEqn ) import Unify-import FamInst( injTyVarsOfTypes ) import InstEnv import VarSet import VarEnv+import TyCoFVs+import TyCoPpr( pprWithExplicitKindsWhen )+import FV import Outputable import ErrUtils( Validity(..), allValid ) import SrcLoc@@ -322,7 +325,7 @@                         --          (b) we must apply 'subst' to the kinds, in case we have                         --              matched out a kind variable, but not a type variable                         --              whose kind mentions that kind variable!-                        --          Trac #6015, #6068+                        --          #6015, #6068   where     (ltys1, rtys1) = instFD fd clas_tvs tys_inst     (ltys2, rtys2) = instFD fd clas_tvs tys_actual@@ -427,15 +430,15 @@ then fixing x really fixes k2 as well, and so k2 should be added to the lhs tyvars in the fundep check. -Example (Trac #8391), using liberal coverage+Example (#8391), using liberal coverage       data Foo a = ...  -- Foo :: forall k. k -> *       class Bar a b | a -> b       instance Bar a (Foo a)      In the instance decl, (a:k) does fix (Foo k a), but only if we notice-    that (a:k) fixes k.  Trac #10109 is another example.+    that (a:k) fixes k.  #10109 is another example. -Here is a more subtle example, from HList-0.4.0.0 (Trac #10564)+Here is a more subtle example, from HList-0.4.0.0 (#10564)    class HasFieldM (l :: k) r (v :: Maybe *)         | l r -> v where ...@@ -468,7 +471,7 @@   * And that fixes v.  However, we must closeOverKinds whenever augmenting the seed set-in oclose!  Consider Trac #10109:+in oclose!  Consider #10109:    data Succ a   -- Succ :: forall k. k -> *   class Add (a :: k1) (b :: k2) (ab :: k3) | a b -> ab@@ -516,11 +519,11 @@ So when oclose expands superclasses we'll get a (a ~# [b]) superclass. But that's an EqPred not a ClassPred, and we jolly well do want to account for the mutual functional dependencies implied by (t1 ~# t2).-Hence the EqPred handling in oclose.  See Trac #10778.+Hence the EqPred handling in oclose.  See #10778.  Note [Care with type functions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #12803)+Consider (#12803)   class C x y | x -> y   type family F a b   type family G c d = r | r -> d@@ -549,7 +552,7 @@             -- closeOverKinds: see Note [Closing over kinds in coverage]      tv_fds  :: [(TyCoVarSet,TyCoVarSet)]-    tv_fds  = [ (tyCoVarsOfTypes ls, injTyVarsOfTypes rs)+    tv_fds  = [ (tyCoVarsOfTypes ls, fvVarSet $ injectiveVarsOfTypes True rs)                   -- See Note [Care with type functions]               | pred <- preds               , pred' <- pred : transSuperClasses pred@@ -603,7 +606,7 @@ In checkFunDeps we check that a new ClsInst is consistent with all the ClsInsts in the environment. -The bogus aspect is discussed in Trac #10675. Currenty it if the two+The bogus aspect is discussed in #10675. Currenty it if the two types are *contradicatory*, using (isNothing . tcUnifyTys).  But all the papers say we should check if the two types are *equal* thus    not (substTys subst rtys1 `eqTypes` substTys subst rtys2)@@ -638,7 +641,7 @@       = case tcUnifyTyKis bind_fn ltys1 ltys2 of           Nothing         -> False           Just subst-            -> isNothing $   -- Bogus legacy test (Trac #10675)+            -> isNothing $   -- Bogus legacy test (#10675)                              -- See Note [Bogus consistency check]                tcUnifyTyKis bind_fn (substTysUnchecked subst rtys1) (substTysUnchecked subst rtys2) 
typecheck/Inst.hs view
@@ -15,7 +15,7 @@        instCall, instDFunType, instStupidTheta, instTyVarsWith,        newWanted, newWanteds, -       tcInstTyBinders, tcInstTyBinder,+       tcInstInvisibleTyBinders, tcInstInvisibleTyBinder,         newOverloadedLit, mkOverLit, @@ -39,9 +39,12 @@  import BasicTypes ( IntegralLit(..), SourceText(..) ) import FastString-import HsSyn+import GHC.Hs import TcHsSyn import TcRnMonad+import Constraint+import Predicate+import TcOrigin import TcEnv import TcEvidence import InstEnv@@ -51,6 +54,7 @@ import TcMType import Type import TyCoRep+import TyCoPpr     ( debugPprType ) import TcType import HscTypes import Class( Class )@@ -58,7 +62,7 @@ import CoreSyn( Expr(..) )  -- For the Coercion constructor import Id import Name-import Var      ( EvVar, mkTyVar, tyVarName, VarBndr(..) )+import Var      ( EvVar, tyVarName, VarBndr(..) ) import DataCon import VarEnv import PrelNames@@ -66,6 +70,7 @@ import DynFlags import Util import Outputable+import BasicTypes ( TypeOrKind(..) ) import qualified GHC.LanguageExtensions as LangExt  import Control.Monad( unless )@@ -78,26 +83,32 @@ ************************************************************************ -} -newMethodFromName :: CtOrigin -> Name -> TcRhoType -> TcM (HsExpr GhcTcId)--- Used when Name is the wired-in name for a wired-in class method,+newMethodFromName+  :: CtOrigin              -- ^ why do we need this?+  -> Name                  -- ^ name of the method+  -> [TcRhoType]           -- ^ types with which to instantiate the class+  -> TcM (HsExpr GhcTcId)+-- ^ Used when 'Name' is the wired-in name for a wired-in class method, -- so the caller knows its type for sure, which should be of form---    forall a. C a => <blah>--- newMethodFromName is supposed to instantiate just the outer+--+-- > forall a. C a => <blah>+--+-- 'newMethodFromName' is supposed to instantiate just the outer -- type variable and constraint -newMethodFromName origin name inst_ty+newMethodFromName origin name ty_args   = do { id <- tcLookupId name               -- Use tcLookupId not tcLookupGlobalId; the method is almost               -- always a class op, but with -XRebindableSyntax GHC is               -- meant to find whatever thing is in scope, and that may               -- be an ordinary function. -       ; let ty = piResultTy (idType id) inst_ty+       ; let ty = piResultTys (idType id) ty_args              (theta, _caller_knows_this) = tcSplitPhiTy ty        ; wrap <- ASSERT( not (isForAllTy ty) && isSingleton theta )-                 instCall origin [inst_ty] theta+                 instCall origin ty_args theta -       ; return (mkHsWrap wrap (HsVar noExt (noLoc id))) }+       ; return (mkHsWrap wrap (HsVar noExtField (noLoc id))) }  {- ************************************************************************@@ -158,7 +169,7 @@                       <.> mkWpEvVarApps ids1                     , tv_prs1  ++ tvs_prs2                     , ev_vars1 ++ ev_vars2-                    , mkFunTys arg_tys' rho ) }+                    , mkVisFunTys arg_tys' rho ) }        | otherwise       = return (idHsWrapper, [], [], substTy subst ty)@@ -197,7 +208,7 @@        ; (subst, inst_tvs') <- mapAccumLM newMetaTyVarX empty_subst inst_tvs        ; let inst_theta' = substTheta subst inst_theta              sigma'      = substTy subst (mkForAllTys leave_bndrs $-                                          mkFunTys leave_theta rho)+                                          mkPhiTy leave_theta rho)              inst_tv_tys' = mkTyVarTys inst_tvs'         ; wrap1 <- instCall orig inst_tv_tys' inst_theta'@@ -272,7 +283,7 @@                     <.> wrap2                     <.> wrap1                     <.> mkWpEvVarApps ids1,-                 mkFunTys arg_tys' rho2) }+                 mkVisFunTys arg_tys' rho2) }    | otherwise   = do { let ty' = substTy subst ty@@ -287,28 +298,27 @@ instTyVarsWith :: CtOrigin -> [TyVar] -> [TcType] -> TcM TCvSubst -- Use this when you want to instantiate (forall a b c. ty) with -- types [ta, tb, tc], but when the kinds of 'a' and 'ta' might--- not yet match (perhaps because there are unsolved constraints; Trac #14154)+-- not yet match (perhaps because there are unsolved constraints; #14154) -- If they don't match, emit a kind-equality to promise that they will -- eventually do so, and thus make a kind-homongeneous substitution. instTyVarsWith orig tvs tys-  = go empty_subst tvs tys+  = go emptyTCvSubst tvs tys   where-    empty_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfTypes tys))-     go subst [] []       = return subst     go subst (tv:tvs) (ty:tys)       | tv_kind `tcEqType` ty_kind-      = go (extendTCvSubst subst tv ty) tvs tys+      = go (extendTvSubstAndInScope subst tv ty) tvs tys       | otherwise       = do { co <- emitWantedEq orig KindLevel Nominal ty_kind tv_kind-           ; go (extendTCvSubst subst tv (ty `mkCastTy` co)) tvs tys }+           ; go (extendTvSubstAndInScope subst tv (ty `mkCastTy` co)) tvs tys }       where         tv_kind = substTy subst (tyVarKind tv)         ty_kind = tcTypeKind ty      go _ _ _ = pprPanic "instTysWith" (ppr tvs $$ ppr tys) + {- ************************************************************************ *                                                                      *@@ -402,179 +412,76 @@   = do  { _co <- instCallConstraints orig theta -- Discard the coercion         ; return () } -{--************************************************************************++{- ********************************************************************* *                                                                      *          Instantiating Kinds *                                                                      *-************************************************************************--Note [Constraints handled in types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Generally, we cannot handle constraints written in types. For example,-if we declare--  data C a where-    MkC :: Show a => a -> C a--we will not be able to use MkC in types, as we have no way of creating-a type-level Show dictionary.--However, we make an exception for equality types. Consider--  data T1 a where-    MkT1 :: T1 Bool--  data T2 a where-    MkT2 :: a ~ Bool => T2 a--MkT1 has a constrained return type, while MkT2 uses an explicit equality-constraint. These two types are often written interchangeably, with a-reasonable expectation that they mean the same thing. For this to work ---and for us to be able to promote GADTs -- we need to be able to instantiate-equality constraints in types.--One wrinkle is that the equality in MkT2 is *lifted*. But, for proper-GADT equalities, GHC produces *unlifted* constraints. (This unlifting comes-from DataCon.eqSpecPreds, which uses mkPrimEqPred.) And, perhaps a wily-user will use (~~) for a heterogeneous equality. We thus must support-all of (~), (~~), and (~#) in types. (See Note [The equality types story]-in TysPrim for a primer on these equality types.)--The get_eq_tys_maybe function recognizes these three forms of equality,-returning a suitable type formation function and the two types related-by the equality constraint. In the lifted case, it uses mkHEqBoxTy or-mkEqBoxTy, which promote the datacons of the (~~) or (~) datatype,-respectively.--One might reasonably wonder who *unpacks* these boxes once they are-made. After all, there is no type-level `case` construct. The surprising-answer is that no one ever does. Instead, if a GADT constructor is used-on the left-hand side of a type family equation, that occurrence forces-GHC to unify the types in question. For example:--  data G a where-    MkG :: G Bool--  type family F (x :: G a) :: a where-    F MkG = False--When checking the LHS `F MkG`, GHC sees the MkG constructor and then must-unify F's implicit parameter `a` with Bool. This succeeds, making the equation--    F Bool (MkG @Bool <Bool>) = False--Note that we never need unpack the coercion. This is because type family-equations are *not* parametric in their kind variables. That is, we could have-just said--  type family H (x :: G a) :: a where-    H _ = False--The presence of False on the RHS also forces `a` to become Bool, giving us--    H Bool _ = False--The fact that any of this works stems from the lack of phase separation between-types and kinds (unlike the very present phase separation between terms and types).--Once we have the ability to pattern-match on types below top-level, this will-no longer cut it, but it seems fine for now.---}+********************************************************************* -} ------------------------------- | Instantantiate the TyConBinders of a forall type,---   given its decomposed form (tvs, ty)-tcInstTyBinders :: HasDebugCallStack-              => ([TyCoBinder], TcKind)   -- ^ The type (forall bs. ty)-              -> TcM ([TcType], TcKind)   -- ^ Instantiated bs, substituted ty--- Takes a pair because that is what splitPiTysInvisible returns--- See also Note [Bidirectional type checking]-tcInstTyBinders (bndrs, ty)-  | null bndrs        -- It's fine for bndrs to be empty e.g.-  = return ([], ty)   -- Check that (Maybe :: forall {k}. k->*),-                      --       and see the call to instTyBinders in checkExpectedKind-                      -- A user bug to be reported as such; it is not a compiler crash!+-- | Instantiates up to n invisible binders+-- Returns the instantiating types, and body kind+tcInstInvisibleTyBinders :: Int -> TcKind -> TcM ([TcType], TcKind) -  | otherwise-  = do { (subst, args) <- mapAccumLM (tcInstTyBinder Nothing) empty_subst bndrs-       ; ty' <- zonkTcType (substTy subst ty)-                   -- Why zonk the result? So that tcTyVar can-                   -- obey (IT6) of Note [The tcType invariant] in TcHsType-                   -- ToDo: SLPJ: I don't think this is needed-       ; return (args, ty') }+tcInstInvisibleTyBinders 0 kind+  = return ([], kind)+tcInstInvisibleTyBinders n ty+  = go n empty_subst ty   where-     empty_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfType ty))+    empty_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfType ty)) --- | Used only in *types*-tcInstTyBinder :: Maybe (VarEnv Kind)-               -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)-tcInstTyBinder mb_kind_info subst (Named (Bndr tv _))-  = case lookup_tv tv of-      Just ki -> return (extendTvSubstAndInScope subst tv ki, ki)-      Nothing -> do { (subst', tv') <- newMetaTyVarX subst tv-                    ; return (subst', mkTyVarTy tv') }-  where-    lookup_tv tv = do { env <- mb_kind_info   -- `Maybe` monad-                      ; lookupVarEnv env tv }+    go n subst kind+      | n > 0+      , Just (bndr, body) <- tcSplitPiTy_maybe kind+      , isInvisibleBinder bndr+      = do { (subst', arg) <- tcInstInvisibleTyBinder subst bndr+           ; (args, inner_ty) <- go (n-1) subst' body+           ; return (arg:args, inner_ty) }+      | otherwise+      = return ([], substTy subst kind) +-- | Used only in *types*+tcInstInvisibleTyBinder :: TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)+tcInstInvisibleTyBinder subst (Named (Bndr tv _))+  = do { (subst', tv') <- newMetaTyVarX subst tv+       ; return (subst', mkTyVarTy tv') } -tcInstTyBinder _ subst (Anon ty)-     -- This is the *only* constraint currently handled in types.-  | Just (mk, k1, k2) <- get_eq_tys_maybe substed_ty-  = do { co <- unifyKind Nothing k1 k2+tcInstInvisibleTyBinder subst (Anon af ty)+  | Just (mk, k1, k2) <- get_eq_tys_maybe (substTy subst ty)+    -- Equality is the *only* constraint currently handled in types.+    -- See Note [Constraints in kinds] in TyCoRep+  = ASSERT( af == InvisArg )+    do { co <- unifyKind Nothing k1 k2        ; arg' <- mk co        ; return (subst, arg') } -  | isPredTy substed_ty-  = do { let (env, tidy_ty) = tidyOpenType emptyTidyEnv substed_ty-       ; addErrTcM (env, text "Illegal constraint in a kind:" <+> ppr tidy_ty)+  | otherwise  -- This should never happen+               -- See TyCoRep Note [Constraints in kinds]+  = pprPanic "tcInvisibleTyBinder" (ppr ty) -         -- just invent a new variable so that we can continue-       ; u <- newUnique-       ; let name = mkSysTvName u (fsLit "dict")-       ; return (subst, mkTyVarTy $ mkTyVar name substed_ty) }+-------------------------------+get_eq_tys_maybe :: Type+                 -> Maybe ( Coercion -> TcM Type+                             -- given a coercion proving t1 ~# t2, produce the+                             -- right instantiation for the TyBinder at hand+                          , Type  -- t1+                          , Type  -- t2+                          )+-- See Note [Constraints in kinds] in TyCoRep+get_eq_tys_maybe ty+  -- Lifted heterogeneous equality (~~)+  | Just (tc, [_, _, k1, k2]) <- splitTyConApp_maybe ty+  , tc `hasKey` heqTyConKey+  = Just (\co -> mkHEqBoxTy co k1 k2, k1, k2) +  -- Lifted homogeneous equality (~)+  | Just (tc, [_, k1, k2]) <- splitTyConApp_maybe ty+  , tc `hasKey` eqTyConKey+  = Just (\co -> mkEqBoxTy co k1 k2, k1, k2)    | otherwise-  = do { tv_ty <- newFlexiTyVarTy substed_ty-       ; return (subst, tv_ty) }--  where-    substed_ty = substTy subst ty--      -- See Note [Constraints handled in types]-    get_eq_tys_maybe :: Type-                     -> Maybe ( Coercion -> TcM Type-                                 -- given a coercion proving t1 ~# t2, produce the-                                 -- right instantiation for the TyBinder at hand-                              , Type  -- t1-                              , Type  -- t2-                              )-    get_eq_tys_maybe ty-        -- unlifted equality (~#)-      | Just (Nominal, k1, k2) <- getEqPredTys_maybe ty-      = Just (\co -> return $ mkCoercionTy co, k1, k2)--        -- lifted heterogeneous equality (~~)-      | Just (tc, [_, _, k1, k2]) <- splitTyConApp_maybe ty-      = if | tc `hasKey` heqTyConKey-             -> Just (\co -> mkHEqBoxTy co k1 k2, k1, k2)-           | otherwise-             -> Nothing--        -- lifted homogeneous equality (~)-      | Just (tc, [_, k1, k2]) <- splitTyConApp_maybe ty-      = if | tc `hasKey` eqTyConKey-             -> Just (\co -> mkEqBoxTy co k1 k2, k1, k2)-           | otherwise-             -> Nothing--      | otherwise-      = Nothing+  = Nothing -------------------------------- -- | This takes @a ~# b@ and returns @a ~~ b@. mkHEqBoxTy :: TcCoercion -> Type -> Type -> TcM Type -- monadic just for convenience with mkEqBoxTy@@ -632,7 +539,7 @@   = newNonTrivialOverloadedLit orig lit res_ty   where     orig = LiteralOrigin lit-newOverloadedLit XOverLit{} _ = panic "newOverloadedLit"+newOverloadedLit (XOverLit nec) _ = noExtCon nec  -- Does not handle things that 'shortCutLit' can handle. See also -- newOverloadedLit in TcUnify@@ -664,7 +571,7 @@  mkOverLit (HsFractional r)   = do  { rat_ty <- tcMetaTy rationalTyConName-        ; return (HsRat noExt r rat_ty) }+        ; return (HsRat noExtField r rat_ty) }  mkOverLit (HsIsString src s) = return (HsString src s) @@ -706,11 +613,11 @@              -> TcM (Name, HsExpr GhcTcId)                                        -- ^ (Standard name, suitable expression) -- USED ONLY FOR CmdTop (sigh) ***--- See Note [CmdSyntaxTable] in HsExpr+-- See Note [CmdSyntaxTable] in GHC.Hs.Expr  tcSyntaxName orig ty (std_nm, HsVar _ (L _ user_nm))   | std_nm == user_nm-  = do rhs <- newMethodFromName orig std_nm ty+  = do rhs <- newMethodFromName orig std_nm [ty]        return (std_nm, rhs)  tcSyntaxName orig ty (std_nm, user_nm_expr) = do
typecheck/TcAnnotations.hs view
@@ -18,7 +18,7 @@ import DynFlags import Control.Monad ( when ) -import HsSyn+import GHC.Hs import Name import Annotations import TcRnMonad@@ -28,7 +28,7 @@ -- Some platforms don't support the external interpreter, and -- compilation on those platforms shouldn't fail just due to -- annotations-#ifndef GHCI+#if !defined(HAVE_INTERNAL_INTERPRETER) tcAnnotations :: [LAnnDecl GhcRn] -> TcM [Annotation] tcAnnotations anns = do   dflags <- getDynFlags@@ -36,7 +36,7 @@     True  -> tcAnnotations' anns     False -> warnAnns anns warnAnns :: [LAnnDecl GhcRn] -> TcM [Annotation]---- No GHCI; emit a warning (not an error) and ignore. cf Trac #4268+--- No GHCI; emit a warning (not an error) and ignore. cf #4268 warnAnns [] = return [] warnAnns anns@(L loc _ : _)   = do { setSrcSpan loc $ addWarnTc NoReason $@@ -65,8 +65,8 @@       runAnnotation target expr     where       safeHsErr = vcat [ text "Annotations are not compatible with Safe Haskell."-                  , text "See https://ghc.haskell.org/trac/ghc/ticket/10826" ]-tcAnnotation (L _ (XAnnDecl _)) = panic "tcAnnotation"+                  , text "See https://gitlab.haskell.org/ghc/ghc/issues/10826" ]+tcAnnotation (L _ (XAnnDecl nec)) = noExtCon nec  annProvenanceToTarget :: Module -> AnnProvenance Name                       -> AnnTarget Name@@ -74,6 +74,6 @@ annProvenanceToTarget _   (TypeAnnProvenance (L _ name))  = NamedTarget name annProvenanceToTarget mod ModuleAnnProvenance             = ModuleTarget mod -annCtxt :: (OutputableBndrId (GhcPass p)) => AnnDecl (GhcPass p) -> SDoc+annCtxt :: (OutputableBndrId p) => AnnDecl (GhcPass p) -> SDoc annCtxt ann   = hang (text "In the annotation:") 2 (ppr ann)
typecheck/TcArrows.hs view
@@ -14,7 +14,7 @@  import {-# SOURCE #-}   TcExpr( tcMonoExpr, tcInferRho, tcSyntaxOp, tcCheckId, tcPolyExpr ) -import HsSyn+import GHC.Hs import TcMatches import TcHsSyn( hsLPatType ) import TcType@@ -24,6 +24,7 @@ import TcUnify import TcRnMonad import TcEnv+import TcOrigin import TcEvidence import Id( mkLocalId ) import Inst@@ -126,7 +127,7 @@     do  { cmd'   <- tcCmd env cmd cmd_ty         ; names' <- mapM (tcSyntaxName ProcOrigin (cmd_arr env)) names         ; return (L loc $ HsCmdTop (CmdTopTc cmd_stk res_ty names') cmd') }-tcCmdTop _ (L _ XCmdTop{}) _ = panic "tcCmdTop"+tcCmdTop _ (L _ (XCmdTop nec)) _ = noExtCon nec  ---------------------------------------- tcCmd  :: CmdEnv -> LHsCmd GhcRn -> CmdType -> TcM (LHsCmd GhcTcId)@@ -254,7 +255,7 @@                              tcPats LambdaExpr pats (map mkCheckExpType arg_tys) $                              tc_grhss grhss cmd_stk' (mkCheckExpType res_ty) -        ; let match' = L mtch_loc (Match { m_ext = noExt+        ; let match' = L mtch_loc (Match { m_ext = noExtField                                          , m_ctxt = LambdaExpr, m_pats = pats'                                          , m_grhss = grhss' })               arg_tys = map hsLPatType pats'@@ -271,14 +272,14 @@         = do { (binds', grhss') <- tcLocalBinds binds $                                    mapM (wrapLocM (tc_grhs stk_ty res_ty)) grhss              ; return (GRHSs x grhss' (L l binds')) }-    tc_grhss (XGRHSs _) _ _ = panic "tc_grhss"+    tc_grhss (XGRHSs nec) _ _ = noExtCon nec      tc_grhs stk_ty res_ty (GRHS x guards body)         = do { (guards', rhs') <- tcStmtsAndThen pg_ctxt tcGuardStmt guards res_ty $                                   \ res_ty -> tcCmd env body                                                 (stk_ty, checkingExpType "tc_grhs" res_ty)              ; return (GRHS x guards' rhs') }-    tc_grhs _ _ (XGRHS _) = panic "tc_grhs"+    tc_grhs _ _ (XGRHS nec) = noExtCon nec  ------------------------------------------- --              Do notation@@ -308,7 +309,7 @@     do  { (cmd_args', cmd_tys) <- mapAndUnzipM tc_cmd_arg cmd_args                               -- We use alphaTyVar for 'w'         ; let e_ty = mkInvForAllTy alphaTyVar $-                     mkFunTys cmd_tys $+                     mkVisFunTys cmd_tys $                      mkCmdArrTy env (mkPairTy alphaTy cmd_stk) res_ty         ; expr' <- tcPolyExpr expr e_ty         ; return (HsCmdArrForm x expr' f fixity cmd_args') }@@ -323,7 +324,7 @@             ; cmd' <- tcCmdTop env' cmd (stk_ty, res_ty)             ; return (cmd',  mkCmdArrTy env' (mkPairTy alphaTy stk_ty) res_ty) } -tc_cmd _ (XCmd {}) _ = panic "tc_cmd"+tc_cmd _ (XCmd nec) _ = noExtCon nec  ----------------------------------------------------------------- --              Base case for illegal commands@@ -388,7 +389,7 @@                 -- NB:  The rec_ids for the recursive things                 --      already scope over this part. This binding may shadow                 --      some of them with polymorphic things with the same Name-                --      (see note [RecStmt] in HsExpr)+                --      (see note [RecStmt] in GHC.Hs.Expr)          ; let rec_ids = takeList rec_names tup_ids         ; later_ids <- tcLookupLocalIds later_names@@ -426,7 +427,7 @@ mkPairTy t1 t2 = mkTyConApp pairTyCon [t1,t2]  arrowTyConKind :: Kind          --  *->*->*-arrowTyConKind = mkFunTys [liftedTypeKind, liftedTypeKind] liftedTypeKind+arrowTyConKind = mkVisFunTys [liftedTypeKind, liftedTypeKind] liftedTypeKind  {- ************************************************************************
typecheck/TcBackpack.hs view
@@ -19,11 +19,11 @@  import GhcPrelude -import BasicTypes (defaultFixity)+import BasicTypes (defaultFixity, TypeOrKind(..)) import Packages import TcRnExports import DynFlags-import HsSyn+import GHC.Hs import RdrName import TcRnMonad import TcTyDecls@@ -34,6 +34,8 @@ import TcMType import TcType import TcSimplify+import Constraint+import TcOrigin import LoadIface import RnNames import ErrUtils@@ -91,7 +93,7 @@     -- implementation cases.     checkBootDeclM False sig_thing real_thing     real_fixity <- lookupFixityRn name-    let sig_fixity = case mi_fix_fn sig_iface (occName name) of+    let sig_fixity = case mi_fix_fn (mi_final_exts sig_iface) (occName name) of                         Nothing -> defaultFixity                         Just f -> f     when (real_fixity /= sig_fixity) $@@ -329,7 +331,7 @@     HscEnv -> UnitId ->     IO (Messages, Maybe ()) tcRnCheckUnitId hsc_env uid =-   withTiming (pure dflags)+   withTiming dflags               (text "Check unit id" <+> ppr uid)               (const ()) $    initTc hsc_env@@ -349,7 +351,7 @@ tcRnMergeSignatures :: HscEnv -> HsParsedModule -> TcGblEnv {- from local sig -} -> ModIface                     -> IO (Messages, Maybe TcGblEnv) tcRnMergeSignatures hsc_env hpm orig_tcg_env iface =-  withTiming (pure dflags)+  withTiming dflags              (text "Signature merging" <+> brackets (ppr this_mod))              (const ()) $   initTc hsc_env HsigFile False this_mod real_loc $@@ -832,7 +834,7 @@             -- This is a HACK to prevent calculateAvails from including imp_mod             -- in the listing.  We don't want it because a module is NOT             -- supposed to include itself in its dep_orphs/dep_finsts.  See #13214-            iface' = iface { mi_orphan = False, mi_finsts = False }+            iface' = iface { mi_final_exts = (mi_final_exts iface){ mi_orphan = False, mi_finsts = False } }             avails = plusImportAvails (tcg_imports tcg_env) $                         calculateAvails dflags iface' False False ImportedBySystem         return tcg_env {@@ -843,7 +845,7 @@                 if outer_mod == mi_module iface                     -- Don't add ourselves!                     then tcg_merged tcg_env-                    else (mi_module iface, mi_mod_hash iface) : tcg_merged tcg_env+                    else (mi_module iface, mi_mod_hash (mi_final_exts iface)) : tcg_merged tcg_env             }      -- Note [Signature merging DFuns]@@ -878,7 +880,7 @@     HscEnv -> Module -> RealSrcSpan ->     IO (Messages, Maybe TcGblEnv) tcRnInstantiateSignature hsc_env this_mod real_loc =-   withTiming (pure dflags)+   withTiming dflags               (text "Signature instantiation"<+>brackets (ppr this_mod))               (const ()) $    initTc hsc_env HsigFile False this_mod real_loc $ instantiateSignature
typecheck/TcBinds.hs view
@@ -12,7 +12,6 @@  module TcBinds ( tcLocalBinds, tcTopBinds, tcValBinds,                  tcHsBootSigs, tcPolyCheck,-                 addTypecheckedBinds,                  chooseInferredQuantifiers,                  badBootDeclErr ) where @@ -25,10 +24,10 @@ import CostCentre (mkUserCC, CCFlavour(DeclCC)) import DynFlags import FastString-import HsSyn-import HscTypes( isHsBootOrSig )+import GHC.Hs import TcSigs import TcRnMonad+import TcOrigin import TcEnv import TcUnify import TcSimplify@@ -67,24 +66,10 @@ import ConLike  import Control.Monad+import Data.Foldable (find)  #include "HsVersions.h" -{- *********************************************************************-*                                                                      *-               A useful helper function-*                                                                      *-********************************************************************* -}--addTypecheckedBinds :: TcGblEnv -> [LHsBinds GhcTc] -> TcGblEnv-addTypecheckedBinds tcg_env binds-  | isHsBootOrSig (tcg_src tcg_env) = tcg_env-    -- Do not add the code for record-selector bindings-    -- when compiling hs-boot files-  | otherwise = tcg_env { tcg_binds = foldr unionBags-                                            (tcg_binds tcg_env)-                                            binds }- {- ************************************************************************ *                                                                      *@@ -256,7 +241,11 @@            mkMatch :: [ConLike] -> TyCon -> CompleteMatch           mkMatch cls ty_con = CompleteMatch {-            completeMatchConLikes = map conLikeName cls,+            -- foldM is a left-fold and will have accumulated the ConLikes in+            -- the reverse order. foldrM would accumulate in the correct order,+            -- but would type-check the last ConLike first, which might also be+            -- confusing from the user's perspective. Hence reverse here.+            completeMatchConLikes = reverse (map conLikeName cls),             completeMatchTyCon = tyConName ty_con             }       doOne _ = return Nothing@@ -302,7 +291,10 @@                   <+> parens (quotes (ppr tc)                                <+> text "resp."                                <+> quotes (ppr tc'))-  in  mapMaybeM (addLocM doOne) sigs+  -- For some reason I haven't investigated further, the signatures come in+  -- backwards wrt. declaration order. So we reverse them here, because it makes+  -- a difference for incomplete match suggestions.+  in  mapMaybeM (addLocM doOne) (reverse sigs) -- process in declaration order  tcHsBootSigs :: [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM [Id] -- A hs-boot file has only one BindGroup, and it only has type@@ -359,17 +351,17 @@             ; ip_id <- newDict ipClass [ p, ty ]             ; expr' <- tcMonoExpr expr (mkCheckExpType ty)             ; let d = toDict ipClass p ty `fmap` expr'-            ; return (ip_id, (IPBind noExt (Right ip_id) d)) }+            ; return (ip_id, (IPBind noExtField (Right ip_id) d)) }     tc_ip_bind _ (IPBind _ (Right {}) _) = panic "tc_ip_bind"-    tc_ip_bind _ (XIPBind _) = panic "tc_ip_bind"+    tc_ip_bind _ (XIPBind nec) = noExtCon nec      -- Coerces a `t` into a dictionry for `IP "x" t`.     -- co : t -> IP "x" t     toDict ipClass x ty = mkHsWrap $ mkWpCastR $                           wrapIP $ mkClassPred ipClass [x,ty] -tcLocalBinds (HsIPBinds _ (XHsIPBinds _ )) _ = panic "tcLocalBinds"-tcLocalBinds (XHsLocalBindsLR _)           _ = panic "tcLocalBinds"+tcLocalBinds (HsIPBinds _ (XHsIPBinds nec)) _ = noExtCon nec+tcLocalBinds (XHsLocalBindsLR nec)          _ = noExtCon nec  {- Note [Implicit parameter untouchables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -485,12 +477,13 @@         -- (This used to be optional, but isn't now.)         -- See Note [Polymorphic recursion] in HsBinds.     do  { traceTc "tc_group rec" (pprLHsBinds binds)-        ; when hasPatSyn $ recursivePatSynErr binds+        ; whenIsJust mbFirstPatSyn $ \lpat_syn ->+            recursivePatSynErr (getLoc lpat_syn) binds         ; (binds1, thing) <- go sccs         ; return ([(Recursive, binds1)], thing) }                 -- Rec them all together   where-    hasPatSyn = anyBag (isPatSyn . unLoc) binds+    mbFirstPatSyn = find (isPatSyn . unLoc) binds     isPatSyn PatSynBind{} = True     isPatSyn _ = False @@ -511,10 +504,14 @@     tc_sub_group rec_tc binds =       tcPolyBinds sig_fn prag_fn Recursive rec_tc closed binds -recursivePatSynErr :: OutputableBndrId (GhcPass p) =>-                      LHsBinds (GhcPass p) -> TcM a-recursivePatSynErr binds-  = failWithTc $+recursivePatSynErr ::+     OutputableBndrId p =>+     SrcSpan -- ^ The location of the first pattern synonym binding+             --   (for error reporting)+  -> LHsBinds (GhcPass p)+  -> TcM a+recursivePatSynErr loc binds+  = failAt loc $     hang (text "Recursive pattern synonym definition with following bindings:")        2 (vcat $ map pprLBind . bagToList $ binds)   where@@ -639,7 +636,7 @@ -- Another alternative would be (forall (a :: TYPE kappa). a), where -- kappa is a unification variable. But I don't think we need that -- complication here. I'm going to just use (forall (a::*). a).--- See Trac #15276+-- See #15276 forall_a_a = mkSpecForAllTys [alphaTyVar] alphaTy  {- *********************************************************************@@ -720,14 +717,14 @@                              , fun_ext     = placeHolderNamesTc                              , fun_tick    = tick } -             export = ABE { abe_ext = noExt-                          , abe_wrap = idHsWrapper+             export = ABE { abe_ext   = noExtField+                          , abe_wrap  = idHsWrapper                           , abe_poly  = poly_id                           , abe_mono  = mono_id                           , abe_prags = SpecPrags spec_prags }               abs_bind = cL loc $-                        AbsBinds { abs_ext = noExt+                        AbsBinds { abs_ext      = noExtField                                  , abs_tvs      = skol_tvs                                  , abs_ev_vars  = ev_vars                                  , abs_ev_binds = [ev_binds]@@ -810,7 +807,7 @@        ; loc <- getSrcSpanM        ; let poly_ids = map abe_poly exports              abs_bind = cL loc $-                        AbsBinds { abs_ext = noExt+                        AbsBinds { abs_ext = noExtField                                  , abs_tvs = qtvs                                  , abs_ev_vars = givens, abs_ev_binds = [ev_binds]                                  , abs_exports = exports, abs_binds = binds'@@ -871,7 +868,7 @@         ; when warn_missing_sigs $               localSigWarn Opt_WarnMissingLocalSignatures poly_id mb_sig -        ; return (ABE { abe_ext = noExt+        ; return (ABE { abe_ext = noExtField                       , abe_wrap = wrap                         -- abe_wrap :: idType poly_id ~ (forall qtvs. theta => mono_ty)                       , abe_poly  = poly_id@@ -919,7 +916,7 @@          checkValidType (InfSigCtxt poly_name) inferred_poly_ty          -- See Note [Validity of inferred types]          -- If we found an insoluble error in the function definition, don't-         -- do this check; otherwise (Trac #14000) we may report an ambiguity+         -- do this check; otherwise (#14000) we may report an ambiguity          -- error for a rather bogus type.         ; return (mkLocalIdOrCoVar poly_name inferred_poly_ty) }@@ -933,7 +930,7 @@ chooseInferredQuantifiers inferred_theta tau_tvs qtvs Nothing   = -- No type signature (partial or complete) for this binder,     do { let free_tvs = closeOverKinds (growThetaTyVars inferred_theta tau_tvs)-                        -- Include kind variables!  Trac #7916+                        -- Include kind variables!  #7916              my_theta = pickCapturedPreds free_tvs inferred_theta              binders  = [ mkTyVarBinder Inferred tv                         | tv <- qtvs@@ -1020,7 +1017,7 @@             ; case tcGetCastedTyVar_maybe wc_var_ty of                -- We know that wc_co must have type kind(wc_var) ~ Constraint, as it-               -- comes from the checkExpectedKind in TcHsType.tcWildCardOcc. So, to+               -- comes from the checkExpectedKind in TcHsType.tcAnonWildCardOcc. So, to                -- make the kinds work out, we reverse the cast here.                Just (wc_var, wc_co) -> writeMetaTyVar wc_var (ctuple `mkCastTy` mkTcSymCo wc_co)                Nothing              -> pprPanic "chooseInferredQuantifiers 1" (ppr wc_var_ty)@@ -1087,7 +1084,7 @@ --   K f = e -- The MR applies, but the signature is overloaded, and it's -- best to complain about this directly--- c.f Trac #11339+-- c.f #11339 checkOverloadedSig monomorphism_restriction_applies sig   | not (null (sig_inst_theta sig))   , monomorphism_restriction_applies@@ -1125,7 +1122,7 @@ way to get per-binding inferred generalisation.  We apply the MR if /all/ of the partial signatures lack a context.-In particular (Trac #11016):+In particular (#11016):    f2 :: (?loc :: Int) => _    f2 = ?loc It's stupid to apply the MR here.  This test includes an extra-constraints@@ -1151,7 +1148,7 @@ We want to get an error from this, because 'a' and 'b' get unified. So we make a test, one per parital signature, to check that the explicitly-quantified type variables have not been unified together.-Trac #14449 showed this up.+#14449 showed this up.   Note [Validity of inferred types]@@ -1201,7 +1198,7 @@      forall qtvs. theta => f_mono_ty   is more polymorphic than   f's polytype and the proof is the impedance matcher. -Notice that the impedance matcher may do defaulting.  See Trac #7173.+Notice that the impedance matcher may do defaulting.  See #7173.  It also cleverly does an ambiguity check; for example, rejecting    f :: F a -> F a@@ -1269,7 +1266,7 @@     do  { ((co_fn, matches'), rhs_ty)             <- tcInferInst $ \ exp_ty ->                   -- tcInferInst: see TcUnify,-                  -- Note [Deep instantiation of InferResult]+                  -- Note [Deep instantiation of InferResult] in TcUnify                tcExtendBinderStack [TcIdBndr_ExpType name exp_ty NotTopLevel] $                   -- We extend the error context even for a non-recursive                   -- function so that in type error messages we show the@@ -1488,7 +1485,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Look at:    - typecheck/should_compile/ExPat-   - Trac #12427, typecheck/should_compile/T12427{a,b}+   - #12427, typecheck/should_compile/T12427{a,b}    data T where     MkT :: Integral a => a -> Int -> T@@ -1567,7 +1564,7 @@        CheckGen), then the let_bndr_spec will be LetLclBndr.  In that case        we want to bind a cloned, local version of the variable, with the        type given by the pattern context, *not* by the signature (even if-       there is one; see Trac #7268). The mkExport part of the+       there is one; see #7268). The mkExport part of the        generalisation step will do the checking and impedance matching        against the signature. @@ -1589,7 +1586,7 @@  Example for (E2), we generate      q :: beta:1, with constraint (forall:3 a. Integral a => Int ~ beta)-The beta is untoucable, but floats out of the constraint and can+The beta is untouchable, but floats out of the constraint and can be solved absolutely fine.  @@ -1637,7 +1634,7 @@       = [ null theta         | TcIdSig (PartialSig { psig_hs_ty = hs_ty })             <- mapMaybe sig_fn (collectHsBindListBinders lbinds)-        , let (_, dL->L _ theta, _) = splitLHsSigmaTy (hsSigWcType hs_ty) ]+        , let (_, dL->L _ theta, _) = splitLHsSigmaTyInvis (hsSigWcType hs_ty) ]      has_partial_sigs   = not (null partial_sig_mrs) @@ -1732,7 +1729,7 @@  -- This one is called on LHS, when pat and grhss are both Name -- and on RHS, when pat is TcId and grhss is still Name-patMonoBindsCtxt :: (OutputableBndrId (GhcPass p), Outputable body)+patMonoBindsCtxt :: (OutputableBndrId p, Outputable body)                  => LPat (GhcPass p) -> GRHSs GhcRn body -> SDoc patMonoBindsCtxt pat grhss   = hang (text "In a pattern binding:") 2 (pprPatBind pat grhss)
typecheck/TcCanonical.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-}  module TcCanonical(      canonicalize,@@ -12,7 +13,9 @@  import GhcPrelude -import TcRnTypes+import Constraint+import Predicate+import TcOrigin import TcUnify( swapOverTyVars, metaTyVarUpdateOK ) import TcType import Type@@ -35,7 +38,7 @@ import DynFlags( DynFlags ) import NameSet import RdrName-import HsTypes( HsIPName(..) )+import GHC.Hs.Types( HsIPName(..) )  import Pair import Util@@ -47,6 +50,7 @@ import BasicTypes  import Data.Bifunctor ( bimap )+import Data.Foldable ( traverse_ )  {- ************************************************************************@@ -102,7 +106,7 @@ canonicalize (CIrredCan { cc_ev = ev })   | EqPred eq_rel ty1 ty2 <- classifyPredType (ctEvPred ev)   = -- For insolubles (all of which are equalities, do /not/ flatten the arguments-    -- In Trac #14350 doing so led entire-unnecessary and ridiculously large+    -- In #14350 doing so led entire-unnecessary and ridiculously large     -- type function expansion.  Instead, canEqNC just applies     -- the substitution to the predicate, and may do decomposition;     --    e.g. a ~ [a], where [G] a ~ [Int], can decompose@@ -248,7 +252,7 @@   is a waste of time.  * (Major) if we want recursive superclasses, there would be an infinite-  number of them.  Here is a real-life example (Trac #10318);+  number of them.  Here is a real-life example (#10318);       class (Frac (Frac a) ~ Frac a,             Fractional (Frac a),@@ -275,13 +279,13 @@    solveSimpleWanteds; Note [Danger of adding superclasses during solving]     However, /do/ continue to eagerly expand superlasses for new /given/-   /non-canonical/ constraints (canClassNC does this).  As Trac #12175+   /non-canonical/ constraints (canClassNC does this).  As #12175    showed, a type-family application can expand to a class constraint,    and we want to see its superclasses for just the same reason as    Note [Eagerly expand given superclasses].  3. If we have any remaining unsolved wanteds-        (see Note [When superclasses help] in TcRnTypes)+        (see Note [When superclasses help] in Constraint)    try harder: take both the Givens and Wanteds, and expand    superclasses again.  See the calls to expandSuperClasses in    TcSimplify.simpl_loop and solveWanteds.@@ -296,7 +300,7 @@         of the implication tree       - We may be inside a type where we can't create term-level         evidence anyway, so we can't superclass-expand, say,-        (a ~ b) to get (a ~# b).  This happened in Trac #15290.+        (a ~ b) to get (a ~# b).  This happened in #15290.  4. Go round to (2) again.  This loop (2,3,4) is implemented    in TcSimplify.simpl_loop.@@ -409,7 +413,7 @@  Note [Danger of adding superclasses during solving] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Here's a serious, but now out-dated example, from Trac #4497:+Here's a serious, but now out-dated example, from #4497:     class Num (RealOf t) => Normed t    type family RealOf x@@ -509,7 +513,7 @@        = loc   -- For tuple predicates, just take them apart, without                -- adding their (large) size into the chain.  When we                -- get down to a base predicate, we'll include its size.-               -- Trac #10335+               -- #10335         | GivenOrigin skol_info <- ctLocOrigin loc          -- See Note [Solving superclass constraints] in TcInstDcls@@ -582,7 +586,7 @@  {- Note [Equality superclasses in quantified constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #15359, #15593, #15625)+Consider (#15359, #15593, #15625)   f :: (forall a. theta => a ~ b) => stuff  It's a bit odd to have a local, quantified constraint for `(a~b)`,@@ -614,7 +618,7 @@ which looks for primitive equalities specially in the quantified constraints. -See also Note [Evidence for quantified constraints] in Type.+See also Note [Evidence for quantified constraints] in Predicate.   ************************************************************************@@ -670,7 +674,7 @@ constraint which arises form the (==) definition.  The wiki page is-  https://ghc.haskell.org/trac/ghc/wiki/QuantifiedConstraints+  https://gitlab.haskell.org/ghc/ghc/wikis/quantified-constraints which in turn contains a link to the GHC Proposal where the change is specified, and a Haskell Symposium paper about it. @@ -698,7 +702,7 @@   * checkValidType gets some changes to accept forall-constraints     only in the right places. -  * Type.PredTree gets a new constructor ForAllPred, and+  * Predicate.Pred gets a new constructor ForAllPred, and     and classifyPredType analyses a PredType to decompose     the new forall-constraints @@ -824,7 +828,6 @@  Note [FunTy and decomposing tycon applications] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- When can_eq_nc' attempts to decompose a tycon application we haven't yet zonked. This means that we may very well have a FunTy containing a type of some unknown kind. For instance, we may have,@@ -873,9 +876,9 @@    -> TcS (StopOrContinue Ct)  -- Expand synonyms first; see Note [Type synonyms and canonicalization]-can_eq_nc' flat _rdr_env _envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2-  | Just ty1' <- tcView ty1 = can_eq_nc flat ev eq_rel ty1' ps_ty1 ty2  ps_ty2-  | Just ty2' <- tcView ty2 = can_eq_nc flat ev eq_rel ty1  ps_ty1 ty2' ps_ty2+can_eq_nc' flat rdr_env envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2+  | Just ty1' <- tcView ty1 = can_eq_nc' flat rdr_env envs ev eq_rel ty1' ps_ty1 ty2  ps_ty2+  | Just ty2' <- tcView ty2 = can_eq_nc' flat rdr_env envs ev eq_rel ty1  ps_ty1 ty2' ps_ty2  -- need to check for reflexivity in the ReprEq case. -- See Note [Eager reflexivity check]@@ -923,8 +926,8 @@ -- Including FunTy (s -> t) can_eq_nc' _flat _rdr_env _envs ev eq_rel ty1 _ ty2 _     --- See Note [FunTy and decomposing type constructor applications].-  | Just (tc1, tys1) <- tcRepSplitTyConApp_maybe' ty1-  , Just (tc2, tys2) <- tcRepSplitTyConApp_maybe' ty2+  | Just (tc1, tys1) <- repSplitTyConApp_maybe ty1+  , Just (tc2, tys2) <- repSplitTyConApp_maybe ty2   , not (isTypeFamilyTyCon tc1)   , not (isTypeFamilyTyCon tc2)   = canTyConApp ev eq_rel tc1 tys1 tc2 tys2@@ -965,7 +968,7 @@   (a b ~R# Int) that is not necessarily insoluble!  Maybe 'a' will turn out to be a newtype. So we want to make it a potentially-soluble Irred not an insoluble one.-Missing this point is what caused Trac #15431+Missing this point is what caused #15431 -}  ---------------------------------@@ -978,7 +981,7 @@ -- But remember also to unify the kinds of as and bs --  (this is the 'go' loop), and actually substitute phi2[as |> cos / bs] -- Remember also that we might have forall z (a:z). blah---  so we must proceed one binder at a time (Trac #13879)+--  so we must proceed one binder at a time (#13879)  can_eq_nc_forall ev eq_rel s1 s2  | CtWanted { ctev_loc = loc, ctev_dest = orig_dest } <- ev@@ -1007,8 +1010,10 @@               = do { let tv2 = binderVar bndr2                    ; (kind_co, wanteds1) <- unify loc Nominal (tyVarKind skol_tv)                                                   (substTy subst (tyVarKind tv2))-                   ; let subst' = extendTvSubst subst tv2+                   ; let subst' = extendTvSubstAndInScope subst tv2                                        (mkCastTy (mkTyVarTy skol_tv) kind_co)+                         -- skol_tv is already in the in-scope set, but the+                         -- free vars of kind_co are not; hence "...AndInScope"                    ; (co, wanteds2) <- go skol_tvs subst' bndrs2                    ; return ( mkTcForAllCo skol_tv kind_co co                             , wanteds1 `unionBags` wanteds2 ) }@@ -1016,7 +1021,7 @@             -- Done: unify phi1 ~ phi2             go [] subst bndrs2               = ASSERT( null bndrs2 )-                unify loc (eqRelRole eq_rel) phi1' (substTy subst phi2)+                unify loc (eqRelRole eq_rel) phi1' (substTyUnchecked subst phi2)              go _ _ _ = panic "cna_eq_nc_forall"  -- case (s:ss) [] @@ -1048,7 +1053,7 @@ -- | Compare types for equality, while zonking as necessary. Gives up -- as soon as it finds that two types are not equal. -- This is quite handy when some unification has made two--- types in an inert wanted to be equal. We can discover the equality without+-- types in an inert Wanted to be equal. We can discover the equality without -- flattening, which is sometimes very expensive (in the case of type functions). -- In particular, this function makes a ~20% improvement in test case -- perf/compiler/T5030.@@ -1080,7 +1085,7 @@       , Just (arg2, res2) <- split2       = do { res_a <- go arg1 arg2            ; res_b <- go res1 res2-           ; return $ combine_rev mkFunTy res_b res_a+           ; return $ combine_rev mkVisFunTy res_b res_a            }       | isJust split1 || isJust split2       = bale_out ty1 ty2@@ -1089,15 +1094,15 @@         split2 = tcSplitFunTy_maybe ty2      go ty1 ty2-      | Just (tc1, tys1) <- tcRepSplitTyConApp_maybe ty1-      , Just (tc2, tys2) <- tcRepSplitTyConApp_maybe ty2+      | Just (tc1, tys1) <- repSplitTyConApp_maybe ty1+      , Just (tc2, tys2) <- repSplitTyConApp_maybe ty2       = if tc1 == tc2 && tys1 `equalLength` tys2           -- Crucial to check for equal-length args, because           -- we cannot assume that the two args to 'go' have           -- the same kind.  E.g go (Proxy *      (Maybe Int))           --                        (Proxy (*->*) Maybe)           -- We'll call (go (Maybe Int) Maybe)-          -- See Trac #13083+          -- See #13083         then tycon tc1 tys1 tys2         else bale_out ty1 ty2 @@ -1199,7 +1204,7 @@ which is easier to satisfy.  Bottom line: unwrap newtypes before decomposing them!-c.f. Trac #9123 comment:52,53 for a compelling example.+c.f. #9123 comment:52,53 for a compelling example.  Note [Newtypes can blow the stack] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1265,13 +1270,22 @@          -- check for blowing our stack:          -- See Note [Newtypes can blow the stack]        ; checkReductionDepth (ctEvLoc ev) ty1-       ; addUsedGREs (bagToList gres)-           -- we have actually used the newtype constructor here, so-           -- make sure we don't warn about importing it! +         -- Next, we record uses of newtype constructors, since coercing+         -- through newtypes is tantamount to using their constructors.+       ; addUsedGREs gre_list+         -- If a newtype constructor was imported, don't warn about not+         -- importing it...+       ; traverse_ keepAlive $ map gre_name gre_list+         -- ...and similarly, if a newtype constructor was defined in the same+         -- module, don't warn about it being unused.+         -- See Note [Tracking unused binding and imports] in TcRnTypes.+        ; new_ev <- rewriteEqEvidence ev swapped ty1' ps_ty2                                      (mkTcSymCo co) (mkTcReflCo Representational ps_ty2)        ; can_eq_nc False new_ev ReprEq ty1' ty1' ty2 ps_ty2 }+  where+    gre_list = bagToList gres  --------- -- ^ Decompose a type application.@@ -1286,10 +1300,10 @@ -- to an irreducible constraint; see typecheck/should_compile/T10494 -- See Note [Decomposing equality], note {4} can_eq_app ev s1 t1 s2 t2-  | CtDerived { ctev_loc = loc } <- ev+  | CtDerived {} <- ev   = do { unifyDeriveds loc [Nominal, Nominal] [s1, t1] [s2, t2]        ; stopWith ev "Decomposed [D] AppTy" }-  | CtWanted { ctev_dest = dest, ctev_loc = loc } <- ev+  | CtWanted { ctev_dest = dest } <- ev   = do { co_s <- unifyWanted loc Nominal s1 s2        ; let arg_loc                | isNextArgVisible s1 = loc@@ -1307,7 +1321,7 @@   | s1k `mismatches` s2k   = canEqHardFailure ev (s1 `mkAppTy` t1) (s2 `mkAppTy` t2) -  | CtGiven { ctev_evar = evar, ctev_loc = loc } <- ev+  | CtGiven { ctev_evar = evar } <- ev   = do { let co   = mkTcCoVarCo evar              co_s = mkTcLRCo CLeft  co              co_t = mkTcLRCo CRight co@@ -1319,6 +1333,8 @@        ; canEqNC evar_s NomEq s1 s2 }    where+    loc = ctEvLoc ev+     s1k = tcTypeKind s1     s2k = tcTypeKind s2 @@ -1569,6 +1585,7 @@ Conclusion:   * Decompose [W] N s ~R N t  iff there no given constraint that could     later solve it.+ -}  canDecomposableTyConAppOK :: CtEvidence -> EqRel@@ -1769,7 +1786,7 @@  We use `isTcReflexiveCo`, to ensure that we only use the hetero-kinded case if we really need to.  Of course `flattenArgsNom` should return `Refl`-whenever possible, but Trac #15577 was an infinite loop because even+whenever possible, but #15577 was an infinite loop because even though the coercion was homo-kinded, `kind_co` was not `Refl`, so we made a new (identical) CFunEqCan, and then the entire process repeated. -}@@ -1832,14 +1849,15 @@            -> TcType                -- lhs: pretty lhs, already flat            -> TcType -> TcType      -- rhs: already flat            -> TcS (StopOrContinue Ct)-canEqTyVar ev eq_rel swapped tv1 ps_ty1 xi2 ps_xi2+canEqTyVar ev eq_rel swapped tv1 ps_xi1 xi2 ps_xi2   | k1 `tcEqType` k2-  = canEqTyVarHomo ev eq_rel swapped tv1 ps_ty1 xi2 ps_xi2+  = canEqTyVarHomo ev eq_rel swapped tv1 ps_xi1 xi2 ps_xi2 -         -- Note [Flattening] in TcFlatten gives us (F2), which says that-         -- flattening is always homogeneous (doesn't change kinds). But-         -- perhaps by flattening the kinds of the two sides of the equality-         -- at hand makes them equal. So let's try that.+  -- So the LHS and RHS don't have equal kinds+  -- Note [Flattening] in TcFlatten gives us (F2), which says that+  -- flattening is always homogeneous (doesn't change kinds). But+  -- perhaps by flattening the kinds of the two sides of the equality+  -- at hand makes them equal. So let's try that.   | otherwise   = do { (flat_k1, k1_co) <- flattenKind loc flav k1  -- k1_co :: flat_k1 ~N kind(xi1)        ; (flat_k2, k2_co) <- flattenKind loc flav k2  -- k2_co :: flat_k2 ~N kind(xi2)@@ -1852,7 +1870,7 @@                         , ppr flat_k2                         , ppr k2_co ]) -         -- we know the LHS is a tyvar. So let's dump all the coercions on the RHS+         -- We know the LHS is a tyvar. So let's dump all the coercions on the RHS          -- If flat_k1 == flat_k2, let's dump all the coercions on the RHS and          -- then call canEqTyVarHomo. If they don't equal, just rewriteEqEvidence          -- (as an optimization, so that we don't have to flatten the kinds again)@@ -1872,7 +1890,7 @@                                                (mkTcReflCo role xi1) rhs_co                        -- NB: rewriteEqEvidence executes a swap, if any, so we're                        -- NotSwapped now.-                 ; canEqTyVarHomo new_ev eq_rel NotSwapped tv1 ps_ty1 new_rhs ps_rhs }+                 ; canEqTyVarHomo new_ev eq_rel NotSwapped tv1 ps_xi1 new_rhs ps_rhs }          else     do { let sym_k1_co = mkTcSymCo k1_co  -- :: kind(xi1) ~N flat_k1              sym_k2_co = mkTcSymCo k2_co  -- :: kind(xi2) ~N flat_k2@@ -1888,7 +1906,7 @@         ; new_ev <- rewriteEqEvidence ev swapped new_lhs new_rhs lhs_co rhs_co          -- no longer swapped, due to rewriteEqEvidence-       ; canEqTyVarHetero new_ev eq_rel tv1 sym_k1_co flat_k1 ps_ty1+       ; canEqTyVarHetero new_ev eq_rel tv1 sym_k1_co flat_k1 ps_xi1                                         new_rhs flat_k2 ps_rhs } }   where     xi1 = mkTyVarTy tv1@@ -1934,7 +1952,7 @@    -- See Note [Equalities with incompatible kinds]   | otherwise   -- Wanted and Derived-                  -- NB: all kind equalities are Nominal+                -- NB: all kind equalities are Nominal   = do { emitNewDerivedEq kind_loc Nominal ki1 ki2              -- kind_ev :: (ki1 :: *) ~ (ki2 :: *)        ; traceTcS "Hetero equality gives rise to derived kind equality" $@@ -1952,16 +1970,16 @@ canEqTyVarHomo :: CtEvidence                -> EqRel -> SwapFlag                -> TcTyVar                -- lhs: tv1-               -> TcType                 -- pretty lhs-               -> TcType -> TcType       -- rhs (might not be flat)+               -> TcType                 -- pretty lhs, flat+               -> TcType -> TcType       -- rhs, flat                -> TcS (StopOrContinue Ct)-canEqTyVarHomo ev eq_rel swapped tv1 ps_ty1 ty2 _-  | Just (tv2, _) <- tcGetCastedTyVar_maybe ty2+canEqTyVarHomo ev eq_rel swapped tv1 ps_xi1 xi2 _+  | Just (tv2, _) <- tcGetCastedTyVar_maybe xi2   , tv1 == tv2   = canEqReflexive ev eq_rel (mkTyVarTy tv1)     -- we don't need to check co because it must be reflexive -  | Just (tv2, co2) <- tcGetCastedTyVar_maybe ty2+  | Just (tv2, co2) <- tcGetCastedTyVar_maybe xi2   , swapOverTyVars tv1 tv2   = do { traceTcS "canEqTyVar swapOver" (ppr tv1 $$ ppr tv2 $$ ppr swapped)          -- FM_Avoid commented out: see Note [Lazy flattening] in TcFlatten@@ -1981,11 +1999,11 @@        ; new_ev <- rewriteEqEvidence ev swapped new_lhs new_rhs lhs_co rhs_co         ; dflags <- getDynFlags-       ; canEqTyVar2 dflags new_ev eq_rel IsSwapped tv2 (ps_ty1 `mkCastTy` sym_co2) }+       ; canEqTyVar2 dflags new_ev eq_rel IsSwapped tv2 (ps_xi1 `mkCastTy` sym_co2) } -canEqTyVarHomo ev eq_rel swapped tv1 _ _ ps_ty2+canEqTyVarHomo ev eq_rel swapped tv1 _ _ ps_xi2   = do { dflags <- getDynFlags-       ; canEqTyVar2 dflags ev eq_rel swapped tv1 ps_ty2 }+       ; canEqTyVar2 dflags ev eq_rel swapped tv1 ps_xi2 }  -- The RHS here is either not a casted tyvar, or it's a tyvar but we want -- to rewrite the LHS to the RHS (as per swapOverTyVars)@@ -1994,7 +2012,7 @@             -> EqRel             -> SwapFlag             -> TcTyVar                  -- lhs = tv, flat-            -> TcType                   -- rhs+            -> TcType                   -- rhs, flat             -> TcS (StopOrContinue Ct) -- LHS is an inert type variable, -- and RHS is fully rewritten, but with type synonyms@@ -2003,7 +2021,7 @@   | Just rhs' <- metaTyVarUpdateOK dflags tv1 rhs  -- No occurs check      -- Must do the occurs check even on tyvar/tyvar      -- equalities, in case have  x ~ (y :: ..x...)-     -- Trac #12593+     -- #12593   = do { new_ev <- rewriteEqEvidence ev swapped lhs rhs' rewrite_co1 rewrite_co2        ; continueWith (CTyEqCan { cc_ev = new_ev, cc_tyvar = tv1                                 , cc_rhs = rhs', cc_eq_rel = eq_rel }) }@@ -2099,7 +2117,7 @@ is embarrassing. See #11198 for more tales of destruction.  The reason for this odd behavior is much the same as-Note [Wanteds do not rewrite Wanteds] in TcRnTypes: note that the+Note [Wanteds do not rewrite Wanteds] in Constraint: note that the new `co` is a Wanted.  The solution is then not to use `co` to "rewrite" -- that is, cast -- `w`, but@@ -2169,7 +2187,7 @@ application on one side and a variable on the other side, we should NOT (necessarily) expand the type synonym, since for the purpose of good error messages we want to leave type synonyms unexpanded as much-as possible.  Hence the ps_ty1, ps_ty2 argument passed to canEqTyVar.+as possible.  Hence the ps_xi1, ps_xi2 argument passed to canEqTyVar.  -} @@ -2188,10 +2206,7 @@   | Stop CtEvidence   -- The (rewritten) constraint was solved          SDoc         -- Tells how it was solved                       -- Any new sub-goals have been put on the work list--instance Functor StopOrContinue where-  fmap f (ContinueWith x) = ContinueWith (f x)-  fmap _ (Stop ev s)      = Stop ev s+  deriving (Functor)  instance Outputable a => Outputable (StopOrContinue a) where   ppr (Stop ev s)      = text "Stop" <> parens s <+> ppr ev@@ -2258,7 +2273,7 @@     -- Why?  Because for *Derived* constraints, c, the coercion, which     -- was produced by flattening, may contain suspended calls to     -- (ctEvExpr c), which fails for Derived constraints.-    -- (Getting this wrong caused Trac #7384.)+    -- (Getting this wrong caused #7384.)     continueWith (old_ev { ctev_pred = new_pred })  rewriteEvidence old_ev new_pred co@@ -2275,8 +2290,12 @@                                                        (mkTcSymCo co))  rewriteEvidence ev@(CtWanted { ctev_dest = dest+                             , ctev_nosh = si                              , ctev_loc = loc }) new_pred co-  = do { mb_new_ev <- newWanted loc new_pred+  = do { mb_new_ev <- newWanted_SI si loc new_pred+               -- The "_SI" varant ensures that we make a new Wanted+               -- with the same shadow-info as the existing one+               -- with the same shadow-info as the existing one (#16735)        ; MASSERT( tcCoercionRole co == ctEvRole ev )        ; setWantedEvTerm dest             (mkEvCast (getEvExpr mb_new_ev)@@ -2324,8 +2343,10 @@                                   `mkTcTransCo` mkTcSymCo rhs_co)        ; newGivenEvVar loc' (new_pred, new_tm) } -  | CtWanted { ctev_dest = dest } <- old_ev-  = do { (new_ev, hole_co) <- newWantedEq loc' (ctEvRole old_ev) nlhs nrhs+  | CtWanted { ctev_dest = dest, ctev_nosh = si } <- old_ev+  = do { (new_ev, hole_co) <- newWantedEq_SI si loc' (ctEvRole old_ev) nlhs nrhs+               -- The "_SI" varant ensures that we make a new Wanted+               -- with the same shadow-info as the existing one (#16735)        ; let co = maybeSym swapped $                   mkSymCo lhs_co                   `mkTransCo` hole_co@@ -2375,7 +2396,7 @@     go ty1 ty2 | Just ty1' <- tcView ty1 = go ty1' ty2     go ty1 ty2 | Just ty2' <- tcView ty2 = go ty1 ty2' -    go (FunTy s1 t1) (FunTy s2 t2)+    go (FunTy _ s1 t1) (FunTy _ s2 t2)       = do { co_s <- unifyWanted loc role s1 s2            ; co_t <- unifyWanted loc role t1 t2            ; return (mkFunCo role co_s co_t) }@@ -2426,7 +2447,7 @@     go ty1 ty2 | Just ty1' <- tcView ty1 = go ty1' ty2     go ty1 ty2 | Just ty2' <- tcView ty2 = go ty1 ty2' -    go (FunTy s1 t1) (FunTy s2 t2)+    go (FunTy _ s1 t1) (FunTy _ s2 t2)       = do { unify_derived loc role s1 s2            ; unify_derived loc role t1 t2 }     go (TyConApp tc1 tys1) (TyConApp tc2 tys2)
typecheck/TcClassDcl.hs view
@@ -22,7 +22,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import TcEnv import TcSigs import TcEvidence ( idHsWrapper )@@ -30,7 +30,9 @@ import TcUnify import TcHsType import TcMType-import Type     ( getClassPredTys_maybe, piResultTys )+import Type     ( piResultTys )+import Predicate+import TcOrigin import TcType import TcRnMonad import DriverPhases (HscSource(..))@@ -284,12 +286,12 @@                   tcPolyCheck no_prag_fn local_dm_sig                               (L bind_loc lm_bind) -       ; let export = ABE { abe_ext   = noExt+       ; let export = ABE { abe_ext   = noExtField                           , abe_poly  = global_dm_id                           , abe_mono  = local_dm_id                           , abe_wrap  = idHsWrapper                           , abe_prags = IsDefaultMethod }-             full_bind = AbsBinds { abs_ext      = noExt+             full_bind = AbsBinds { abs_ext      = noExtField                                   , abs_tvs      = tyvars                                   , abs_ev_vars  = [this_dict]                                   , abs_exports  = [export]@@ -369,7 +371,7 @@                 -- site of the method binder, and any inline or                 -- specialisation pragmas findMethodBind sel_name binds prag_fn-  = foldlBag mplus Nothing (mapBag f binds)+  = foldl' mplus Nothing (mapBag f binds)   where     prags    = lookupPragEnv prag_fn sel_name 
typecheck/TcDefaults.hs view
@@ -10,7 +10,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import Class import TcRnMonad import TcEnv@@ -66,7 +66,7 @@ tcDefaults decls@(L locn (DefaultDecl _ _) : _)   = setSrcSpan locn $     failWithTc (dupDefaultDeclErr decls)-tcDefaults (L _ (XDefaultDecl _):_) = panic "tcDefaults"+tcDefaults (L _ (XDefaultDecl nec):_) = noExtCon nec   tc_default_ty :: [Class] -> LHsType GhcRn -> TcM Type@@ -100,8 +100,8 @@   where     pp (L locn (DefaultDecl _ _))       = text "here was another default declaration" <+> ppr locn-    pp (L _ (XDefaultDecl _)) = panic "dupDefaultDeclErr"-dupDefaultDeclErr (L _ (XDefaultDecl _) : _) = panic "dupDefaultDeclErr"+    pp (L _ (XDefaultDecl nec)) = noExtCon nec+dupDefaultDeclErr (L _ (XDefaultDecl nec) : _) = noExtCon nec dupDefaultDeclErr [] = panic "dupDefaultDeclErr []"  badDefaultTy :: Type -> [Class] -> SDoc
typecheck/TcDeriv.hs view
@@ -7,2225 +7,2282 @@ -}  {-# LANGUAGE CPP #-}-{-# LANGUAGE TypeFamilies #-}--module TcDeriv ( tcDeriving, DerivInfo(..), mkDerivInfos ) where--#include "HsVersions.h"--import GhcPrelude--import HsSyn-import DynFlags--import TcRnMonad-import FamInst-import TcDerivInfer-import TcDerivUtils-import TcValidity( allDistinctTyVars )-import TcClassDcl( instDeclCtxt3, tcATDefault, tcMkDeclCtxt )-import TcEnv-import TcGenDeriv                       -- Deriv stuff-import TcValidity( checkValidInstHead )-import InstEnv-import Inst-import FamInstEnv-import TcHsType-import TyCoRep--import RnNames( extendGlobalRdrEnvRn )-import RnBinds-import RnEnv-import RnUtils    ( bindLocalNamesFV )-import RnSource   ( addTcgDUs )-import Avail--import Unify( tcUnifyTy )-import Class-import Type-import ErrUtils-import DataCon-import Maybes-import RdrName-import Name-import NameSet-import TyCon-import TcType-import Var-import VarEnv-import VarSet-import PrelNames-import SrcLoc-import Util-import Outputable-import FastString-import Bag-import Pair-import FV (fvVarList, unionFV, mkFVs)-import qualified GHC.LanguageExtensions as LangExt--import Control.Monad-import Control.Monad.Trans.Class-import Control.Monad.Trans.Reader-import Data.List--{--************************************************************************-*                                                                      *-                Overview-*                                                                      *-************************************************************************--Overall plan-~~~~~~~~~~~~-1.  Convert the decls (i.e. data/newtype deriving clauses,-    plus standalone deriving) to [EarlyDerivSpec]--2.  Infer the missing contexts for the InferTheta's--3.  Add the derived bindings, generating InstInfos--}--data EarlyDerivSpec = InferTheta (DerivSpec [ThetaOrigin])-                    | GivenTheta (DerivSpec ThetaType)-        -- InferTheta ds => the context for the instance should be inferred-        --      In this case ds_theta is the list of all the sets of-        --      constraints needed, such as (Eq [a], Eq a), together with a-        --      suitable CtLoc to get good error messages.-        --      The inference process is to reduce this to a-        --      simpler form (e.g. Eq a)-        ---        -- GivenTheta ds => the exact context for the instance is supplied-        --                  by the programmer; it is ds_theta-        -- See Note [Inferring the instance context] in TcDerivInfer--earlyDSLoc :: EarlyDerivSpec -> SrcSpan-earlyDSLoc (InferTheta spec) = ds_loc spec-earlyDSLoc (GivenTheta spec) = ds_loc spec--splitEarlyDerivSpec :: [EarlyDerivSpec]-                    -> ([DerivSpec [ThetaOrigin]], [DerivSpec ThetaType])-splitEarlyDerivSpec [] = ([],[])-splitEarlyDerivSpec (InferTheta spec : specs) =-    case splitEarlyDerivSpec specs of (is, gs) -> (spec : is, gs)-splitEarlyDerivSpec (GivenTheta spec : specs) =-    case splitEarlyDerivSpec specs of (is, gs) -> (is, spec : gs)--instance Outputable EarlyDerivSpec where-  ppr (InferTheta spec) = ppr spec <+> text "(Infer)"-  ppr (GivenTheta spec) = ppr spec <+> text "(Given)"--{--Note [Data decl contexts]-~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--        data (RealFloat a) => Complex a = !a :+ !a deriving( Read )--We will need an instance decl like:--        instance (Read a, RealFloat a) => Read (Complex a) where-          ...--The RealFloat in the context is because the read method for Complex is bound-to construct a Complex, and doing that requires that the argument type is-in RealFloat.--But this ain't true for Show, Eq, Ord, etc, since they don't construct-a Complex; they only take them apart.--Our approach: identify the offending classes, and add the data type-context to the instance decl.  The "offending classes" are--        Read, Enum?--FURTHER NOTE ADDED March 2002.  In fact, Haskell98 now requires that-pattern matching against a constructor from a data type with a context-gives rise to the constraints for that context -- or at least the thinned-version.  So now all classes are "offending".--Note [Newtype deriving]-~~~~~~~~~~~~~~~~~~~~~~~-Consider this:-    class C a b-    instance C [a] Char-    newtype T = T Char deriving( C [a] )--Notice the free 'a' in the deriving.  We have to fill this out to-    newtype T = T Char deriving( forall a. C [a] )--And then translate it to:-    instance C [a] Char => C [a] T where ...---Note [Newtype deriving superclasses]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-(See also Trac #1220 for an interesting exchange on newtype-deriving and superclasses.)--The 'tys' here come from the partial application in the deriving-clause. The last arg is the new instance type.--We must pass the superclasses; the newtype might be an instance-of them in a different way than the representation type-E.g.            newtype Foo a = Foo a deriving( Show, Num, Eq )-Then the Show instance is not done via Coercible; it shows-        Foo 3 as "Foo 3"-The Num instance is derived via Coercible, but the Show superclass-dictionary must the Show instance for Foo, *not* the Show dictionary-gotten from the Num dictionary. So we must build a whole new dictionary-not just use the Num one.  The instance we want is something like:-     instance (Num a, Show (Foo a), Eq (Foo a)) => Num (Foo a) where-        (+) = ((+)@a)-        ...etc...-There may be a coercion needed which we get from the tycon for the newtype-when the dict is constructed in TcInstDcls.tcInstDecl2---Note [Unused constructors and deriving clauses]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See Trac #3221.  Consider-   data T = T1 | T2 deriving( Show )-Are T1 and T2 unused?  Well, no: the deriving clause expands to mention-both of them.  So we gather defs/uses from deriving just like anything else.---}---- | Stuff needed to process a datatype's `deriving` clauses-data DerivInfo = DerivInfo { di_rep_tc  :: TyCon-                             -- ^ The data tycon for normal datatypes,-                             -- or the *representation* tycon for data families-                           , di_clauses :: [LHsDerivingClause GhcRn]-                           , di_ctxt    :: SDoc -- ^ error context-                           }---- | Extract `deriving` clauses of proper data type (skips data families)-mkDerivInfos :: [LTyClDecl GhcRn] -> TcM [DerivInfo]-mkDerivInfos decls = concatMapM (mk_deriv . unLoc) decls-  where--    mk_deriv decl@(DataDecl { tcdLName = L _ data_name-                            , tcdDataDefn =-                                HsDataDefn { dd_derivs = L _ clauses } })-      = do { tycon <- tcLookupTyCon data_name-           ; return [DerivInfo { di_rep_tc = tycon, di_clauses = clauses-                               , di_ctxt = tcMkDeclCtxt decl }] }-    mk_deriv _ = return []--{---************************************************************************-*                                                                      *-\subsection[TcDeriv-driver]{Top-level function for \tr{derivings}}-*                                                                      *-************************************************************************--}--tcDeriving  :: [DerivInfo]       -- All `deriving` clauses-            -> [LDerivDecl GhcRn] -- All stand-alone deriving declarations-            -> TcM (TcGblEnv, Bag (InstInfo GhcRn), HsValBinds GhcRn)-tcDeriving deriv_infos deriv_decls-  = recoverM (do { g <- getGblEnv-                 ; return (g, emptyBag, emptyValBindsOut)}) $-    do  {       -- Fish the "deriving"-related information out of the TcEnv-                -- And make the necessary "equations".-          is_boot <- tcIsHsBootOrSig-        ; traceTc "tcDeriving" (ppr is_boot)--        ; early_specs <- makeDerivSpecs is_boot deriv_infos deriv_decls-        ; traceTc "tcDeriving 1" (ppr early_specs)--        ; let (infer_specs, given_specs) = splitEarlyDerivSpec early_specs-        ; insts1 <- mapM genInst given_specs-        ; insts2 <- mapM genInst infer_specs--        ; dflags <- getDynFlags--        ; let (_, deriv_stuff, fvs) = unzip3 (insts1 ++ insts2)-        ; loc <- getSrcSpanM-        ; let (binds, famInsts) = genAuxBinds dflags loc-                                    (unionManyBags deriv_stuff)--        ; let mk_inst_infos1 = map fstOf3 insts1-        ; inst_infos1 <- apply_inst_infos mk_inst_infos1 given_specs--          -- We must put all the derived type family instances (from both-          -- infer_specs and given_specs) in the local instance environment-          -- before proceeding, or else simplifyInstanceContexts might-          -- get stuck if it has to reason about any of those family instances.-          -- See Note [Staging of tcDeriving]-        ; tcExtendLocalFamInstEnv (bagToList famInsts) $-          -- NB: only call tcExtendLocalFamInstEnv once, as it performs-          -- validity checking for all of the family instances you give it.-          -- If the family instances have errors, calling it twice will result-          -- in duplicate error messages!--     do {-        -- the stand-alone derived instances (@inst_infos1@) are used when-        -- inferring the contexts for "deriving" clauses' instances-        -- (@infer_specs@)-        ; final_specs <- extendLocalInstEnv (map iSpec inst_infos1) $-                         simplifyInstanceContexts infer_specs--        ; let mk_inst_infos2 = map fstOf3 insts2-        ; inst_infos2 <- apply_inst_infos mk_inst_infos2 final_specs-        ; let inst_infos = inst_infos1 ++ inst_infos2--        ; (inst_info, rn_binds, rn_dus) <--            renameDeriv is_boot inst_infos binds--        ; unless (isEmptyBag inst_info) $-             liftIO (dumpIfSet_dyn dflags Opt_D_dump_deriv "Derived instances"-                        (ddump_deriving inst_info rn_binds famInsts))--        ; gbl_env <- tcExtendLocalInstEnv (map iSpec (bagToList inst_info))-                                          getGblEnv-        ; let all_dus = rn_dus `plusDU` usesOnly (NameSet.mkFVs $ concat fvs)-        ; return (addTcgDUs gbl_env all_dus, inst_info, rn_binds) } }-  where-    ddump_deriving :: Bag (InstInfo GhcRn) -> HsValBinds GhcRn-                   -> Bag FamInst             -- ^ Rep type family instances-                   -> SDoc-    ddump_deriving inst_infos extra_binds repFamInsts-      =    hang (text "Derived class instances:")-              2 (vcat (map (\i -> pprInstInfoDetails i $$ text "") (bagToList inst_infos))-                 $$ ppr extra_binds)-        $$ hangP "Derived type family instances:"-             (vcat (map pprRepTy (bagToList repFamInsts)))--    hangP s x = text "" $$ hang (ptext (sLit s)) 2 x--    -- Apply the suspended computations given by genInst calls.-    -- See Note [Staging of tcDeriving]-    apply_inst_infos :: [ThetaType -> TcM (InstInfo GhcPs)]-                     -> [DerivSpec ThetaType] -> TcM [InstInfo GhcPs]-    apply_inst_infos = zipWithM (\f ds -> f (ds_theta ds))---- Prints the representable type family instance-pprRepTy :: FamInst -> SDoc-pprRepTy fi@(FamInst { fi_tys = lhs })-  = text "type" <+> ppr (mkTyConApp (famInstTyCon fi) lhs) <+>-      equals <+> ppr rhs-  where rhs = famInstRHS fi--renameDeriv :: Bool-            -> [InstInfo GhcPs]-            -> Bag (LHsBind GhcPs, LSig GhcPs)-            -> TcM (Bag (InstInfo GhcRn), HsValBinds GhcRn, DefUses)-renameDeriv is_boot inst_infos bagBinds-  | is_boot     -- If we are compiling a hs-boot file, don't generate any derived bindings-                -- The inst-info bindings will all be empty, but it's easier to-                -- just use rn_inst_info to change the type appropriately-  = do  { (rn_inst_infos, fvs) <- mapAndUnzipM rn_inst_info inst_infos-        ; return ( listToBag rn_inst_infos-                 , emptyValBindsOut, usesOnly (plusFVs fvs)) }--  | otherwise-  = discardWarnings $-    -- Discard warnings about unused bindings etc-    setXOptM LangExt.EmptyCase $-    -- Derived decls (for empty types) can have-    --    case x of {}-    setXOptM LangExt.ScopedTypeVariables $-    setXOptM LangExt.KindSignatures $-    -- Derived decls (for newtype-deriving) can use ScopedTypeVariables &-    -- KindSignatures-    setXOptM LangExt.TypeApplications $-    -- GND/DerivingVia uses TypeApplications in generated code-    -- (See Note [Newtype-deriving instances] in TcGenDeriv)-    unsetXOptM LangExt.RebindableSyntax $-    -- See Note [Avoid RebindableSyntax when deriving]-    do  {-        -- Bring the extra deriving stuff into scope-        -- before renaming the instances themselves-        ; traceTc "rnd" (vcat (map (\i -> pprInstInfoDetails i $$ text "") inst_infos))-        ; (aux_binds, aux_sigs) <- mapAndUnzipBagM return bagBinds-        ; let aux_val_binds = ValBinds noExt aux_binds (bagToList aux_sigs)-        ; rn_aux_lhs <- rnTopBindsLHS emptyFsEnv aux_val_binds-        ; let bndrs = collectHsValBinders rn_aux_lhs-        ; envs <- extendGlobalRdrEnvRn (map avail bndrs) emptyFsEnv ;-        ; setEnvs envs $-    do  { (rn_aux, dus_aux) <- rnValBindsRHS (TopSigCtxt (mkNameSet bndrs)) rn_aux_lhs-        ; (rn_inst_infos, fvs_insts) <- mapAndUnzipM rn_inst_info inst_infos-        ; return (listToBag rn_inst_infos, rn_aux,-                  dus_aux `plusDU` usesOnly (plusFVs fvs_insts)) } }--  where-    rn_inst_info :: InstInfo GhcPs -> TcM (InstInfo GhcRn, FreeVars)-    rn_inst_info-      inst_info@(InstInfo { iSpec = inst-                          , iBinds = InstBindings-                            { ib_binds = binds-                            , ib_tyvars = tyvars-                            , ib_pragmas = sigs-                            , ib_extensions = exts -- Only for type-checking-                            , ib_derived = sa } })-        =  ASSERT( null sigs )-           bindLocalNamesFV tyvars $-           do { (rn_binds,_, fvs) <- rnMethodBinds False (is_cls_nm inst) [] binds []-              ; let binds' = InstBindings { ib_binds = rn_binds-                                          , ib_tyvars = tyvars-                                          , ib_pragmas = []-                                          , ib_extensions = exts-                                          , ib_derived = sa }-              ; return (inst_info { iBinds = binds' }, fvs) }--{--Note [Newtype deriving and unused constructors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (see Trac #1954):--  module Bug(P) where-  newtype P a = MkP (IO a) deriving Monad--If you compile with -Wunused-binds you do not expect the warning-"Defined but not used: data constructor MkP". Yet the newtype deriving-code does not explicitly mention MkP, but it should behave as if you-had written-  instance Monad P where-     return x = MkP (return x)-     ...etc...--So we want to signal a user of the data constructor 'MkP'.-This is the reason behind the [Name] part of the return type-of genInst.--Note [Staging of tcDeriving]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Here's a tricky corner case for deriving (adapted from Trac #2721):--    class C a where-      type T a-      foo :: a -> T a--    instance C Int where-      type T Int = Int-      foo = id--    newtype N = N Int deriving C--This will produce an instance something like this:--    instance C N where-      type T N = T Int-      foo = coerce (foo :: Int -> T Int) :: N -> T N--We must be careful in order to typecheck this code. When determining the-context for the instance (in simplifyInstanceContexts), we need to determine-that T N and T Int have the same representation, but to do that, the T N-instance must be in the local family instance environment. Otherwise, GHC-would be unable to conclude that T Int is representationally equivalent to-T Int, and simplifyInstanceContexts would get stuck.--Previously, tcDeriving would defer adding any derived type family instances to-the instance environment until the very end, which meant that-simplifyInstanceContexts would get called without all the type family instances-it needed in the environment in order to properly simplify instance like-the C N instance above.--To avoid this scenario, we carefully structure the order of events in-tcDeriving. We first call genInst on the standalone derived instance specs and-the instance specs obtained from deriving clauses. Note that the return type of-genInst is a triple:--    TcM (ThetaType -> TcM (InstInfo RdrName), BagDerivStuff, Maybe Name)--The type family instances are in the BagDerivStuff. The first field of the-triple is a suspended computation which, given an instance context, produces-the rest of the instance. The fact that it is suspended is important, because-right now, we don't have ThetaTypes for the instances that use deriving clauses-(only the standalone-derived ones).--Now we can can collect the type family instances and extend the local instance-environment. At this point, it is safe to run simplifyInstanceContexts on the-deriving-clause instance specs, which gives us the ThetaTypes for the-deriving-clause instances. Now we can feed all the ThetaTypes to the-suspended computations and obtain our InstInfos, at which point-tcDeriving is done.--An alternative design would be to split up genInst so that the-family instances are generated separately from the InstInfos. But this would-require carving up a lot of the GHC deriving internals to accommodate the-change. On the other hand, we can keep all of the InstInfo and type family-instance logic together in genInst simply by converting genInst to-continuation-returning style, so we opt for that route.--Note [Why we don't pass rep_tc into deriveTyData]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Down in the bowels of mkEqnHelp, we need to convert the fam_tc back into-the rep_tc by means of a lookup. And yet we have the rep_tc right here!-Why look it up again? Answer: it's just easier this way.-We drop some number of arguments from the end of the datatype definition-in deriveTyData. The arguments are dropped from the fam_tc.-This action may drop a *different* number of arguments-passed to the rep_tc, depending on how many free variables, etc., the-dropped patterns have.--Also, this technique carries over the kind substitution from deriveTyData-nicely.--Note [Avoid RebindableSyntax when deriving]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The RebindableSyntax extension interacts awkwardly with the derivation of-any stock class whose methods require the use of string literals. The Show-class is a simple example (see Trac #12688):--  {-# LANGUAGE RebindableSyntax, OverloadedStrings #-}-  newtype Text = Text String-  fromString :: String -> Text-  fromString = Text--  data Foo = Foo deriving Show--This will generate code to the effect of:--  instance Show Foo where-    showsPrec _ Foo = showString "Foo"--But because RebindableSyntax and OverloadedStrings are enabled, the "Foo"-string literal is now of type Text, not String, which showString doesn't-accept! This causes the generated Show instance to fail to typecheck.--To avoid this kind of scenario, we simply turn off RebindableSyntax entirely-in derived code.--************************************************************************-*                                                                      *-                From HsSyn to DerivSpec-*                                                                      *-************************************************************************--@makeDerivSpecs@ fishes around to find the info about needed derived instances.--}--makeDerivSpecs :: Bool-               -> [DerivInfo]-               -> [LDerivDecl GhcRn]-               -> TcM [EarlyDerivSpec]-makeDerivSpecs is_boot deriv_infos deriv_decls-  = do  { -- We carefully set up uses of recoverM to minimize error message-          -- cascades. See Note [Flattening deriving clauses].-        ; eqns1 <- sequenceA-                     [ recoverM (pure Nothing)-                                (deriveClause rep_tc (fmap unLoc dcs)-                                                      pred err_ctxt)-                     | DerivInfo { di_rep_tc = rep_tc, di_clauses = clauses-                                 , di_ctxt = err_ctxt } <- deriv_infos-                     , L _ (HsDerivingClause { deriv_clause_strategy = dcs-                                             , deriv_clause_tys = L _ preds })-                         <- clauses-                     , pred <- preds-                     ]-        ; eqns2 <- mapM (recoverM (pure Nothing) . deriveStandalone) deriv_decls-        ; let eqns = catMaybes (eqns1 ++ eqns2)--        ; if is_boot then   -- No 'deriving' at all in hs-boot files-              do { unless (null eqns) (add_deriv_err (head eqns))-                 ; return [] }-          else return eqns }-  where-    add_deriv_err eqn-       = setSrcSpan (earlyDSLoc eqn) $-         addErr (hang (text "Deriving not permitted in hs-boot file")-                    2 (text "Use an instance declaration instead"))--{--Note [Flattening deriving clauses]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider what happens if you run this program (from Trac #10684) without-DeriveGeneric enabled:--    data A = A deriving (Show, Generic)-    data B = B A deriving (Show)--Naturally, you'd expect GHC to give an error to the effect of:--    Can't make a derived instance of `Generic A':-      You need -XDeriveGeneric to derive an instance for this class--And *only* that error, since the other two derived Show instances appear to be-independent of this derived Generic instance. Yet GHC also used to give this-additional error on the program above:--    No instance for (Show A)-      arising from the 'deriving' clause of a data type declaration-    When deriving the instance for (Show B)--This was happening because when GHC encountered any error within a single-data type's set of deriving clauses, it would call recoverM and move on-to the next data type's deriving clauses. One unfortunate consequence of-this design is that if A's derived Generic instance failed, so its derived-Show instance would be skipped entirely, leading to the "No instance for-(Show A)" error cascade.--The solution to this problem is to "flatten" the set of classes that are-derived for a particular data type via deriving clauses. That is, if-you have:--    newtype C = C D-      deriving (E, F, G)-      deriving anyclass (H, I, J)-      deriving newtype  (K, L, M)--Then instead of processing instances E through M under the scope of a single-recoverM, we flatten these deriving clauses into the list:--    [ E (Nothing)-    , F (Nothing)-    , G (Nothing)-    , H (Just anyclass)-    , I (Just anyclass)-    , J (Just anyclass)-    , K (Just newtype)-    , L (Just newtype)-    , M (Just newtype) ]--And then process each class individually, under its own recoverM scope. That-way, failure to derive one class doesn't cancel out other classes in the-same set of clause-derived classes.--}----------------------------------------------------------------------- | Process a single class in a `deriving` clause.-deriveClause :: TyCon -> Maybe (DerivStrategy GhcRn)-             -> LHsSigType GhcRn -> SDoc-             -> TcM (Maybe EarlyDerivSpec)-deriveClause rep_tc mb_strat pred err_ctxt-  = addErrCtxt err_ctxt $-    deriveTyData tvs tc tys mb_strat pred-  where-    tvs = tyConTyVars rep_tc-    (tc, tys) = case tyConFamInstSig_maybe rep_tc of-                        -- data family:-                  Just (fam_tc, pats, _) -> (fam_tc, pats)-      -- NB: deriveTyData wants the *user-specified*-      -- name. See Note [Why we don't pass rep_tc into deriveTyData]--                  _ -> (rep_tc, mkTyVarTys tvs)     -- datatype---------------------------------------------------------------------deriveStandalone :: LDerivDecl GhcRn -> TcM (Maybe EarlyDerivSpec)--- Process a single standalone deriving declaration---  e.g.   deriving instance Show a => Show (T a)--- Rather like tcLocalInstDecl------ This returns a Maybe because the user might try to derive Typeable, which is--- a no-op nowadays.-deriveStandalone (L loc (DerivDecl _ deriv_ty mbl_deriv_strat overlap_mode))-  = setSrcSpan loc                   $-    addErrCtxt (standaloneCtxt deriv_ty)  $-    do { traceTc "Standalone deriving decl for" (ppr deriv_ty)-       ; let mb_deriv_strat = fmap unLoc mbl_deriv_strat-             ctxt           = TcType.InstDeclCtxt True-       ; traceTc "Deriving strategy (standalone deriving)" $-           vcat [ppr mb_deriv_strat, ppr deriv_ty]-       ; (mb_deriv_strat', tvs', (deriv_ctxt', cls, inst_tys'))-           <- tcDerivStrategy mb_deriv_strat $ do-                (tvs, deriv_ctxt, cls, inst_tys)-                  <- tcStandaloneDerivInstType ctxt deriv_ty-                pure (tvs, (deriv_ctxt, cls, inst_tys))-       ; checkTc (not (null inst_tys')) derivingNullaryErr-       ; let inst_ty' = last inst_tys'-         -- See Note [Unify kinds in deriving]-       ; (tvs, deriv_ctxt, inst_tys) <--           case mb_deriv_strat' of-             -- Perform an additional unification with the kind of the `via`-             -- type and the result of the previous kind unification.-             Just (ViaStrategy via_ty) -> do-               let via_kind     = tcTypeKind via_ty-                   inst_ty_kind = tcTypeKind inst_ty'-                   mb_match     = tcUnifyTy inst_ty_kind via_kind--               checkTc (isJust mb_match)-                       (derivingViaKindErr cls inst_ty_kind-                                           via_ty via_kind)--               let Just kind_subst = mb_match-                   ki_subst_range  = getTCvSubstRangeFVs kind_subst-                   -- See Note [Unification of two kind variables in deriving]-                   unmapped_tkvs = filter (\v -> v `notElemTCvSubst` kind_subst-                                        && not (v `elemVarSet` ki_subst_range))-                                          tvs'-                   (subst, _)    = substTyVarBndrs kind_subst unmapped_tkvs-                   (final_deriv_ctxt, final_deriv_ctxt_tys)-                     = case deriv_ctxt' of-                         InferContext wc -> (InferContext wc, [])-                         SupplyContext theta ->-                           let final_theta = substTheta subst theta-                           in (SupplyContext final_theta, final_theta)-                   final_inst_tys   = substTys subst inst_tys'-                   final_tvs        = tyCoVarsOfTypesWellScoped $-                                      final_deriv_ctxt_tys ++ final_inst_tys-               pure (final_tvs, final_deriv_ctxt, final_inst_tys)--             _ -> pure (tvs', deriv_ctxt', inst_tys')-       ; let cls_tys = take (length inst_tys - 1) inst_tys-             inst_ty = last inst_tys-       ; traceTc "Standalone deriving;" $ vcat-              [ text "tvs:" <+> ppr tvs-              , text "mb_deriv_strat:" <+> ppr mb_deriv_strat'-              , text "deriv_ctxt:" <+> ppr deriv_ctxt-              , text "cls:" <+> ppr cls-              , text "tys:" <+> ppr inst_tys ]-                -- C.f. TcInstDcls.tcLocalInstDecl1-       ; traceTc "Standalone deriving:" $ vcat-              [ text "class:" <+> ppr cls-              , text "class types:" <+> ppr cls_tys-              , text "type:" <+> ppr inst_ty ]--       ; let bale_out msg = failWithTc (derivingThingErr False cls cls_tys-                              inst_ty mb_deriv_strat' msg)--       ; case tcSplitTyConApp_maybe inst_ty of-           Just (tc, tc_args)-              | className cls == typeableClassName-              -> do warnUselessTypeable-                    return Nothing--              | otherwise-              -> Just <$> mkEqnHelp (fmap unLoc overlap_mode)-                                    tvs cls cls_tys tc tc_args-                                    deriv_ctxt mb_deriv_strat'--           _  -> -- Complain about functions, primitive types, etc,-                 bale_out $-                 text "The last argument of the instance must be a data or newtype application"-        }-deriveStandalone (L _ (XDerivDecl _)) = panic "deriveStandalone"---- Typecheck the type in a standalone deriving declaration.------ This may appear dense, but it's mostly huffing and puffing to recognize--- the special case of a type with an extra-constraints wildcard context, e.g.,------   deriving instance _ => Eq (Foo a)------ If there is such a wildcard, we typecheck this as if we had written--- @deriving instance Eq (Foo a)@, and return @'InferContext' ('Just' loc)@,--- as the 'DerivContext', where loc is the location of the wildcard used for--- error reporting. This indicates that we should infer the context as if we--- were deriving Eq via a deriving clause--- (see Note [Inferring the instance context] in TcDerivInfer).------ If there is no wildcard, then proceed as normal, and instead return--- @'SupplyContext' theta@, where theta is the typechecked context.------ Note that this will never return @'InferContext' 'Nothing'@, as that can--- only happen with @deriving@ clauses.-tcStandaloneDerivInstType-  :: UserTypeCtxt -> LHsSigWcType GhcRn-  -> TcM ([TyVar], DerivContext, Class, [Type])-tcStandaloneDerivInstType ctxt-    (HsWC { hswc_body = deriv_ty@(HsIB { hsib_ext = vars-                                       , hsib_body   = deriv_ty_body })})-  | (tvs, theta, rho) <- splitLHsSigmaTy deriv_ty_body-  , L _ [wc_pred] <- theta-  , L wc_span (HsWildCardTy _) <- ignoreParens wc_pred-  = do dfun_ty <- tcHsClsInstType ctxt $-                  HsIB { hsib_ext = vars-                       , hsib_body-                           = L (getLoc deriv_ty_body) $-                             HsForAllTy { hst_bndrs = tvs-                                        , hst_xforall = noExt-                                        , hst_body  = rho }}-       let (tvs, _theta, cls, inst_tys) = tcSplitDFunTy dfun_ty-       pure (tvs, InferContext (Just wc_span), cls, inst_tys)-  | otherwise-  = do dfun_ty <- tcHsClsInstType ctxt deriv_ty-       let (tvs, theta, cls, inst_tys) = tcSplitDFunTy dfun_ty-       pure (tvs, SupplyContext theta, cls, inst_tys)--tcStandaloneDerivInstType _ (HsWC _ (XHsImplicitBndrs _))-  = panic "tcStandaloneDerivInstType"-tcStandaloneDerivInstType _ (XHsWildCardBndrs _)-  = panic "tcStandaloneDerivInstType"--warnUselessTypeable :: TcM ()-warnUselessTypeable-  = do { warn <- woptM Opt_WarnDerivingTypeable-       ; when warn $ addWarnTc (Reason Opt_WarnDerivingTypeable)-                   $ text "Deriving" <+> quotes (ppr typeableClassName) <+>-                     text "has no effect: all types now auto-derive Typeable" }---------------------------------------------------------------------deriveTyData :: [TyVar] -> TyCon -> [Type]   -- LHS of data or data instance-                    -- Can be a data instance, hence [Type] args-                    -- and in that case the TyCon is the /family/ tycon-             -> Maybe (DerivStrategy GhcRn)  -- The optional deriving strategy-             -> LHsSigType GhcRn             -- The deriving predicate-             -> TcM (Maybe EarlyDerivSpec)--- The deriving clause of a data or newtype declaration--- I.e. not standalone deriving------ This returns a Maybe because the user might try to derive Typeable, which is--- a no-op nowadays.-deriveTyData tvs tc tc_args mb_deriv_strat deriv_pred-  = setSrcSpan (getLoc (hsSigType deriv_pred)) $-    -- Use loc of the 'deriving' item-    do  { (mb_deriv_strat', deriv_tvs, (cls, cls_tys, cls_arg_kinds))-                <- tcExtendTyVarEnv tvs $-                -- Deriving preds may (now) mention-                -- the type variables for the type constructor, hence tcExtendTyVarenv-                -- The "deriv_pred" is a LHsType to take account of the fact that for-                -- newtype deriving we allow deriving (forall a. C [a]).--                -- Typeable is special, because Typeable :: forall k. k -> Constraint-                -- so the argument kind 'k' is not decomposable by splitKindFunTys-                -- as is the case for all other derivable type classes-                     tcDerivStrategy mb_deriv_strat $-                     tcHsDeriv deriv_pred--        ; when (cls_arg_kinds `lengthIsNot` 1) $-            failWithTc (nonUnaryErr deriv_pred)-        ; let [cls_arg_kind] = cls_arg_kinds-        ; if className cls == typeableClassName-          then do warnUselessTypeable-                  return Nothing-          else--     do {  -- Given data T a b c = ... deriving( C d ),-           -- we want to drop type variables from T so that (C d (T a)) is well-kinded-          let (arg_kinds, _)  = splitFunTys cls_arg_kind-              n_args_to_drop  = length arg_kinds-              n_args_to_keep  = length tc_args - n_args_to_drop-                                -- See Note [tc_args and tycon arity]-              (tc_args_to_keep, args_to_drop)-                              = splitAt n_args_to_keep tc_args-              inst_ty_kind    = tcTypeKind (mkTyConApp tc tc_args_to_keep)--              -- Match up the kinds, and apply the resulting kind substitution-              -- to the types.  See Note [Unify kinds in deriving]-              -- We are assuming the tycon tyvars and the class tyvars are distinct-              mb_match        = tcUnifyTy inst_ty_kind cls_arg_kind-              enough_args     = n_args_to_keep >= 0--        -- Check that the result really is well-kinded-        ; checkTc (enough_args && isJust mb_match)-                  (derivingKindErr tc cls cls_tys cls_arg_kind enough_args)--        ; let propagate_subst kind_subst tkvs' cls_tys' tc_args'-                = (final_tkvs, final_cls_tys, final_tc_args)-                where-                  ki_subst_range  = getTCvSubstRangeFVs kind_subst-                  -- See Note [Unification of two kind variables in deriving]-                  unmapped_tkvs   = filter (\v -> v `notElemTCvSubst` kind_subst-                                         && not (v `elemVarSet` ki_subst_range))-                                           tkvs'-                  (subst, _)      = substTyVarBndrs kind_subst unmapped_tkvs-                  final_tc_args   = substTys subst tc_args'-                  final_cls_tys   = substTys subst cls_tys'-                  final_tkvs      = tyCoVarsOfTypesWellScoped $-                                    final_cls_tys ++ final_tc_args--        ; let tkvs = scopedSort $ fvVarList $-                     unionFV (tyCoFVsOfTypes tc_args_to_keep)-                             (FV.mkFVs deriv_tvs)-              Just kind_subst = mb_match-              (tkvs', final_cls_tys', final_tc_args')-                = propagate_subst kind_subst tkvs cls_tys tc_args_to_keep--          -- See Note [Unify kinds in deriving]-        ; (tkvs, final_cls_tys, final_tc_args, final_mb_deriv_strat) <--            case mb_deriv_strat' of-              -- Perform an additional unification with the kind of the `via`-              -- type and the result of the previous kind unification.-              Just (ViaStrategy via_ty) -> do-                let final_via_ty   = via_ty-                    final_via_kind = tcTypeKind final_via_ty-                    final_inst_ty_kind-                              = tcTypeKind (mkTyConApp tc final_tc_args')-                    via_match = tcUnifyTy final_inst_ty_kind final_via_kind--                checkTc (isJust via_match)-                        (derivingViaKindErr cls final_inst_ty_kind-                                            final_via_ty final_via_kind)--                let Just via_subst = via_match-                    (final_tkvs, final_cls_tys, final_tc_args)-                      = propagate_subst via_subst tkvs'-                                        final_cls_tys' final_tc_args'-                pure ( final_tkvs, final_cls_tys, final_tc_args-                     , Just $ ViaStrategy $ substTy via_subst via_ty-                     )--              _ -> pure ( tkvs', final_cls_tys', final_tc_args'-                        , mb_deriv_strat' )--        ; traceTc "Deriving strategy (deriving clause)" $-            vcat [ppr final_mb_deriv_strat, ppr deriv_pred]--        ; traceTc "derivTyData1" (vcat [ pprTyVars tvs, ppr tc, ppr tc_args-                                       , ppr deriv_pred-                                       , pprTyVars (tyCoVarsOfTypesList tc_args)-                                       , ppr n_args_to_keep, ppr n_args_to_drop-                                       , ppr inst_ty_kind, ppr cls_arg_kind, ppr mb_match-                                       , ppr final_tc_args, ppr final_cls_tys ])--        ; traceTc "derivTyData2" (vcat [ ppr tkvs ])--        ; let final_tc_app = mkTyConApp tc final_tc_args-        ; checkTc (allDistinctTyVars (mkVarSet tkvs) args_to_drop)     -- (a, b, c)-                  (derivingEtaErr cls final_cls_tys final_tc_app)-                -- Check that-                --  (a) The args to drop are all type variables; eg reject:-                --              data instance T a Int = .... deriving( Monad )-                --  (b) The args to drop are all *distinct* type variables; eg reject:-                --              class C (a :: * -> * -> *) where ...-                --              data instance T a a = ... deriving( C )-                --  (c) The type class args, or remaining tycon args,-                --      do not mention any of the dropped type variables-                --              newtype T a s = ... deriving( ST s )-                --              newtype instance K a a = ... deriving( Monad )-                ---                -- It is vital that the implementation of allDistinctTyVars-                -- expand any type synonyms.-                -- See Note [Eta-reducing type synonyms]--        ; checkValidInstHead DerivClauseCtxt cls $-                             final_cls_tys ++ [final_tc_app]-                -- Check that we aren't deriving an instance of a magical-                -- type like (~) or Coercible (#14916).--        ; spec <- mkEqnHelp Nothing tkvs-                            cls final_cls_tys tc final_tc_args-                            (InferContext Nothing) final_mb_deriv_strat-        ; traceTc "derivTyData" (ppr spec)-        ; return $ Just spec } }---{- Note [tc_args and tycon arity]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-You might wonder if we could use (tyConArity tc) at this point, rather-than (length tc_args).  But for data families the two can differ!  The-tc and tc_args passed into 'deriveTyData' come from 'deriveClause' which-in turn gets them from 'tyConFamInstSig_maybe' which in turn gets them-from DataFamInstTyCon:--| DataFamInstTyCon          -- See Note [Data type families]-      (CoAxiom Unbranched)-      TyCon   -- The family TyCon-      [Type]  -- Argument types (mentions the tyConTyVars of this TyCon)-              -- No shorter in length than the tyConTyVars of the family TyCon-              -- How could it be longer? See [Arity of data families] in FamInstEnv--Notice that the arg tys might not be the same as the family tycon arity-(= length tyConTyVars).--Note [Unify kinds in deriving]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #8534)-    data T a b = MkT a deriving( Functor )-    -- where Functor :: (*->*) -> Constraint--So T :: forall k. * -> k -> *.   We want to get-    instance Functor (T * (a:*)) where ...-Notice the '*' argument to T.--Moreover, as well as instantiating T's kind arguments, we may need to instantiate-C's kind args.  Consider (Trac #8865):-  newtype T a b = MkT (Either a b) deriving( Category )-where-  Category :: forall k. (k -> k -> *) -> Constraint-We need to generate the instance-  instance Category * (Either a) where ...-Notice the '*' argument to Category.--So we need to- * drop arguments from (T a b) to match the number of-   arrows in the (last argument of the) class;- * and then *unify* kind of the remaining type against the-   expected kind, to figure out how to instantiate C's and T's-   kind arguments.--In the two examples,- * we unify   kind-of( T k (a:k) ) ~ kind-of( Functor )-         i.e.      (k -> *) ~ (* -> *)   to find k:=*.-         yielding  k:=*-- * we unify   kind-of( Either ) ~ kind-of( Category )-         i.e.      (* -> * -> *)  ~ (k -> k -> k)-         yielding  k:=*--Now we get a kind substitution.  We then need to:--  1. Remove the substituted-out kind variables from the quantified kind vars--  2. Apply the substitution to the kinds of quantified *type* vars-     (and extend the substitution to reflect this change)--  3. Apply that extended substitution to the non-dropped args (types and-     kinds) of the type and class--Forgetting step (2) caused Trac #8893:-  data V a = V [a] deriving Functor-  data P (x::k->*) (a:k) = P (x a) deriving Functor-  data C (x::k->*) (a:k) = C (V (P x a)) deriving Functor--When deriving Functor for P, we unify k to *, but we then want-an instance   $df :: forall (x:*->*). Functor x => Functor (P * (x:*->*))-and similarly for C.  Notice the modified kind of x, both at binding-and occurrence sites.--This can lead to some surprising results when *visible* kind binder is-unified (in contrast to the above examples, in which only non-visible kind-binders were considered). Consider this example from Trac #11732:--    data T k (a :: k) = MkT deriving Functor--Since unification yields k:=*, this results in a generated instance of:--    instance Functor (T *) where ...--which looks odd at first glance, since one might expect the instance head-to be of the form Functor (T k). Indeed, one could envision an alternative-generated instance of:--    instance (k ~ *) => Functor (T k) where--But this does not typecheck by design: kind equalities are not allowed to be-bound in types, only terms. But in essence, the two instance declarations are-entirely equivalent, since even though (T k) matches any kind k, the only-possibly value for k is *, since anything else is ill-typed. As a result, we can-just as comfortably use (T *).--Another way of thinking about is: deriving clauses often infer constraints.-For example:--    data S a = S a deriving Eq--infers an (Eq a) constraint in the derived instance. By analogy, when we-are deriving Functor, we might infer an equality constraint (e.g., k ~ *).-The only distinction is that GHC instantiates equality constraints directly-during the deriving process.--Another quirk of this design choice manifests when typeclasses have visible-kind parameters. Consider this code (also from Trac #11732):--    class Cat k (cat :: k -> k -> *) where-      catId   :: cat a a-      catComp :: cat b c -> cat a b -> cat a c--    instance Cat * (->) where-      catId   = id-      catComp = (.)--    newtype Fun a b = Fun (a -> b) deriving (Cat k)--Even though we requested a derived instance of the form (Cat k Fun), the-kind unification will actually generate (Cat * Fun) (i.e., the same thing as if-the user wrote deriving (Cat *)).--What happens with DerivingVia, when you have yet another type? Consider:--  newtype Foo (a :: Type) = MkFoo (Proxy a)-    deriving Functor via Proxy--As before, we unify the kind of Foo (* -> *) with the kind of the argument to-Functor (* -> *). But that's not enough: the `via` type, Proxy, has the kind-(k -> *), which is more general than what we want. So we must additionally-unify (k -> *) with (* -> *).--Currently, all of this unification is implemented kludgily with the pure-unifier, which is rather tiresome. Trac #14331 lays out a plan for how this-might be made cleaner.--Note [Unification of two kind variables in deriving]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As a special case of the Note above, it is possible to derive an instance of-a poly-kinded typeclass for a poly-kinded datatype. For example:--    class Category (cat :: k -> k -> *) where-    newtype T (c :: k -> k -> *) a b = MkT (c a b) deriving Category--This case is suprisingly tricky. To see why, let's write out what instance GHC-will attempt to derive (using -fprint-explicit-kinds syntax):--    instance Category k1 (T k2 c) where ...--GHC will attempt to unify k1 and k2, which produces a substitution (kind_subst)-that looks like [k2 :-> k1]. Importantly, we need to apply this substitution to-the type variable binder for c, since its kind is (k2 -> k2 -> *).--We used to accomplish this by doing the following:--    unmapped_tkvs = filter (`notElemTCvSubst` kind_subst) all_tkvs-    (subst, _)    = substTyVarBndrs kind_subst unmapped_tkvs--Where all_tkvs contains all kind variables in the class and instance types (in-this case, all_tkvs = [k1,k2]). But since kind_subst only has one mapping,-this results in unmapped_tkvs being [k1], and as a consequence, k1 gets mapped-to another kind variable in subst! That is, subst = [k2 :-> k1, k1 :-> k_new].-This is bad, because applying that substitution yields the following instance:--   instance Category k_new (T k1 c) where ...--In other words, keeping k1 in unmapped_tvks taints the substitution, resulting-in an ill-kinded instance (this caused Trac #11837).--To prevent this, we need to filter out any variable from all_tkvs which either--1. Appears in the domain of kind_subst. notElemTCvSubst checks this.-2. Appears in the range of kind_subst. To do this, we compute the free-   variable set of the range of kind_subst with getTCvSubstRangeFVs, and check-   if a kind variable appears in that set.--Note [Eta-reducing type synonyms]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-One can instantiate a type in a data family instance with a type synonym that-mentions other type variables:--  type Const a b = a-  data family Fam (f :: * -> *) (a :: *)-  newtype instance Fam f (Const a f) = Fam (f a) deriving Functor--It is also possible to define kind synonyms, and they can mention other types in-a datatype declaration. For example,--  type Const a b = a-  newtype T f (a :: Const * f) = T (f a) deriving Functor--When deriving, we need to perform eta-reduction analysis to ensure that none of-the eta-reduced type variables are mentioned elsewhere in the declaration. But-we need to be careful, because if we don't expand through the Const type-synonym, we will mistakenly believe that f is an eta-reduced type variable and-fail to derive Functor, even though the code above is correct (see Trac #11416,-where this was first noticed). For this reason, we expand the type synonyms in-the eta-reduced types before doing any analysis.--}--mkEqnHelp :: Maybe OverlapMode-          -> [TyVar]-          -> Class -> [Type]-          -> TyCon -> [Type]-          -> DerivContext-               -- SupplyContext => context supplied (standalone deriving)-               -- InferContext  => context inferred (deriving on data decl, or-               --                  standalone deriving decl with a wildcard)-          -> Maybe (DerivStrategy GhcTc)-          -> TcRn EarlyDerivSpec--- Make the EarlyDerivSpec for an instance---      forall tvs. theta => cls (tys ++ [ty])--- where the 'theta' is optional (that's the Maybe part)--- Assumes that this declaration is well-kinded--mkEqnHelp overlap_mode tvs cls cls_tys tycon tc_args deriv_ctxt deriv_strat-  = do {      -- Find the instance of a data family-              -- Note [Looking up family instances for deriving]-         fam_envs <- tcGetFamInstEnvs-       ; let (rep_tc, rep_tc_args, _co) = tcLookupDataFamInst fam_envs tycon tc_args-              -- If it's still a data family, the lookup failed; i.e no instance exists-       ; when (isDataFamilyTyCon rep_tc)-              (bale_out (text "No family instance for" <+> quotes (pprTypeApp tycon tc_args)))-       ; is_boot <- tcIsHsBootOrSig-       ; when is_boot $-              bale_out (text "Cannot derive instances in hs-boot files"-                    $+$ text "Write an instance declaration instead")--       ; let deriv_env = DerivEnv-                         { denv_overlap_mode = overlap_mode-                         , denv_tvs          = tvs-                         , denv_cls          = cls-                         , denv_cls_tys      = cls_tys-                         , denv_tc           = tycon-                         , denv_tc_args      = tc_args-                         , denv_rep_tc       = rep_tc-                         , denv_rep_tc_args  = rep_tc_args-                         , denv_ctxt         = deriv_ctxt-                         , denv_strat        = deriv_strat }-       ; flip runReaderT deriv_env $-         if isNewTyCon rep_tc then mkNewTypeEqn else mkDataTypeEqn }-  where-     bale_out msg = failWithTc (derivingThingErr False cls cls_tys-                      (mkTyConApp tycon tc_args) deriv_strat msg)--{--Note [Looking up family instances for deriving]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-tcLookupFamInstExact is an auxiliary lookup wrapper which requires-that looked-up family instances exist.  If called with a vanilla-tycon, the old type application is simply returned.--If we have-  data instance F () = ... deriving Eq-  data instance F () = ... deriving Eq-then tcLookupFamInstExact will be confused by the two matches;-but that can't happen because tcInstDecls1 doesn't call tcDeriving-if there are any overlaps.--There are two other things that might go wrong with the lookup.-First, we might see a standalone deriving clause-   deriving Eq (F ())-when there is no data instance F () in scope.--Note that it's OK to have-  data instance F [a] = ...-  deriving Eq (F [(a,b)])-where the match is not exact; the same holds for ordinary data types-with standalone deriving declarations.--Note [Deriving, type families, and partial applications]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When there are no type families, it's quite easy:--    newtype S a = MkS [a]-    -- :CoS :: S  ~ []  -- Eta-reduced--    instance Eq [a] => Eq (S a)         -- by coercion sym (Eq (:CoS a)) : Eq [a] ~ Eq (S a)-    instance Monad [] => Monad S        -- by coercion sym (Monad :CoS)  : Monad [] ~ Monad S--When type familes are involved it's trickier:--    data family T a b-    newtype instance T Int a = MkT [a] deriving( Eq, Monad )-    -- :RT is the representation type for (T Int a)-    --  :Co:RT    :: :RT ~ []          -- Eta-reduced!-    --  :CoF:RT a :: T Int a ~ :RT a   -- Also eta-reduced!--    instance Eq [a] => Eq (T Int a)     -- easy by coercion-       -- d1 :: Eq [a]-       -- d2 :: Eq (T Int a) = d1 |> Eq (sym (:Co:RT a ; :coF:RT a))--    instance Monad [] => Monad (T Int)  -- only if we can eta reduce???-       -- d1 :: Monad []-       -- d2 :: Monad (T Int) = d1 |> Monad (sym (:Co:RT ; :coF:RT))--Note the need for the eta-reduced rule axioms.  After all, we can-write it out-    instance Monad [] => Monad (T Int)  -- only if we can eta reduce???-      return x = MkT [x]-      ... etc ...--See Note [Eta reduction for data families] in FamInstEnv--%************************************************************************-%*                                                                      *-                Deriving data types-*                                                                      *-************************************************************************--}---- | Derive an instance for a data type (i.e., non-newtype).-mkDataTypeEqn :: DerivM EarlyDerivSpec-mkDataTypeEqn-  = do mb_strat <- asks denv_strat-       let bale_out msg = do err <- derivingThingErrM False msg-                             lift $ failWithTc err-       case mb_strat of-         Just StockStrategy    -> mk_eqn_stock    mk_originative_eqn bale_out-         Just AnyclassStrategy -> mk_eqn_anyclass mk_originative_eqn bale_out-         Just (ViaStrategy ty) -> mk_eqn_via ty-         -- GeneralizedNewtypeDeriving makes no sense for non-newtypes-         Just NewtypeStrategy  -> bale_out gndNonNewtypeErr-         -- Lacking a user-requested deriving strategy, we will try to pick-         -- between the stock or anyclass strategies-         Nothing -> mk_eqn_no_mechanism mk_originative_eqn bale_out---- Derive an instance by way of an originative deriving strategy--- (stock or anyclass).------ See Note [Deriving strategies]-mk_originative_eqn-  :: DerivSpecMechanism -- Invariant: This will be DerivSpecStock or-                        -- DerivSpecAnyclass-  -> DerivM EarlyDerivSpec-mk_originative_eqn mechanism-  = do DerivEnv { denv_overlap_mode = overlap_mode-                , denv_tvs          = tvs-                , denv_tc           = tc-                , denv_tc_args      = tc_args-                , denv_rep_tc       = rep_tc-                , denv_cls          = cls-                , denv_cls_tys      = cls_tys-                , denv_ctxt         = deriv_ctxt } <- ask-       let inst_ty  = mkTyConApp tc tc_args-           inst_tys = cls_tys ++ [inst_ty]-       doDerivInstErrorChecks1 mechanism-       loc       <- lift getSrcSpanM-       dfun_name <- lift $ newDFunName' cls tc-       case deriv_ctxt of-        InferContext wildcard ->-          do { (inferred_constraints, tvs', inst_tys')-                 <- inferConstraints mechanism-             ; return $ InferTheta $ DS-                   { ds_loc = loc-                   , ds_name = dfun_name, ds_tvs = tvs'-                   , ds_cls = cls, ds_tys = inst_tys'-                   , ds_tc = rep_tc-                   , ds_theta = inferred_constraints-                   , ds_overlap = overlap_mode-                   , ds_standalone_wildcard = wildcard-                   , ds_mechanism = mechanism } }--        SupplyContext theta ->-            return $ GivenTheta $ DS-                   { ds_loc = loc-                   , ds_name = dfun_name, ds_tvs = tvs-                   , ds_cls = cls, ds_tys = inst_tys-                   , ds_tc = rep_tc-                   , ds_theta = theta-                   , ds_overlap = overlap_mode-                   , ds_standalone_wildcard = Nothing-                   , ds_mechanism = mechanism }---- Derive an instance by way of a coerce-based deriving strategy--- (newtype or via).------ See Note [Deriving strategies]-mk_coerce_based_eqn-  :: (Type -> DerivSpecMechanism) -- Invariant: This will be DerivSpecNewtype-                                  -- or DerivSpecVia-  -> Type -- The type to coerce-  -> DerivM EarlyDerivSpec-mk_coerce_based_eqn mk_mechanism coerced_ty-  = do DerivEnv { denv_overlap_mode = overlap_mode-                , denv_tvs          = tvs-                , denv_tc           = tycon-                , denv_tc_args      = tc_args-                , denv_rep_tc       = rep_tycon-                , denv_cls          = cls-                , denv_cls_tys      = cls_tys-                , denv_ctxt         = deriv_ctxt } <- ask-       sa_wildcard <- isStandaloneWildcardDeriv-       let -- The following functions are polymorphic over the representation-           -- type, since we might either give it the underlying type of a-           -- newtype (for GeneralizedNewtypeDeriving) or a @via@ type-           -- (for DerivingVia).-           rep_tys ty  = cls_tys ++ [ty]-           rep_pred ty = mkClassPred cls (rep_tys ty)-           rep_pred_o ty = mkPredOrigin deriv_origin TypeLevel (rep_pred ty)-                   -- rep_pred is the representation dictionary, from where-                   -- we are going to get all the methods for the final-                   -- dictionary--           -- Next we figure out what superclass dictionaries to use-           -- See Note [Newtype deriving superclasses] above-           sc_preds   :: [PredOrigin]-           cls_tyvars = classTyVars cls-           inst_ty    = mkTyConApp tycon tc_args-           inst_tys   = cls_tys ++ [inst_ty]-           sc_preds   = map (mkPredOrigin deriv_origin TypeLevel) $-                        substTheta (zipTvSubst cls_tyvars inst_tys) $-                        classSCTheta cls-           deriv_origin = mkDerivOrigin sa_wildcard--           -- Next we collect constraints for the class methods-           -- If there are no methods, we don't need any constraints-           -- Otherwise we need (C rep_ty), for the representation methods,-           -- and constraints to coerce each individual method-           meth_preds :: Type -> [PredOrigin]-           meths = classMethods cls-           meth_preds ty-             | null meths = [] -- No methods => no constraints-                               -- (Trac #12814)-             | otherwise = rep_pred_o ty : coercible_constraints ty-           coercible_constraints ty-             = [ mkPredOrigin (DerivOriginCoerce meth t1 t2 sa_wildcard)-                              TypeLevel (mkReprPrimEqPred t1 t2)-               | meth <- meths-               , let (Pair t1 t2) = mkCoerceClassMethEqn cls tvs-                                            inst_tys ty meth ]--           all_thetas :: Type -> [ThetaOrigin]-           all_thetas ty = [mkThetaOriginFromPreds $ meth_preds ty ++ sc_preds]--           inferred_thetas = all_thetas coerced_ty-       lift $ traceTc "newtype deriving:" $-         ppr tycon <+> ppr (rep_tys coerced_ty) <+> ppr inferred_thetas-       let mechanism = mk_mechanism coerced_ty-           bale_out msg = do err <- derivingThingErrMechanism mechanism msg-                             lift $ failWithTc err-       atf_coerce_based_error_checks cls bale_out-       doDerivInstErrorChecks1 mechanism-       dfun_name <- lift $ newDFunName' cls tycon-       loc       <- lift getSrcSpanM-       case deriv_ctxt of-        SupplyContext theta -> return $ GivenTheta $ DS-            { ds_loc = loc-            , ds_name = dfun_name, ds_tvs = tvs-            , ds_cls = cls, ds_tys = inst_tys-            , ds_tc = rep_tycon-            , ds_theta = theta-            , ds_overlap = overlap_mode-            , ds_standalone_wildcard = Nothing-            , ds_mechanism = mechanism }-        InferContext wildcard -> return $ InferTheta $ DS-            { ds_loc = loc-            , ds_name = dfun_name, ds_tvs = tvs-            , ds_cls = cls, ds_tys = inst_tys-            , ds_tc = rep_tycon-            , ds_theta = inferred_thetas-            , ds_overlap = overlap_mode-            , ds_standalone_wildcard = wildcard-            , ds_mechanism = mechanism }---- Ensure that a class's associated type variables are suitable for--- GeneralizedNewtypeDeriving or DerivingVia.------ See Note [GND and associated type families]-atf_coerce_based_error_checks-  :: Class-  -> (SDoc -> DerivM ())-  -> DerivM ()-atf_coerce_based_error_checks cls bale_out-  = let cls_tyvars = classTyVars cls--        ats_look_sensible-           =  -- Check (a) from Note [GND and associated type families]-              no_adfs-              -- Check (b) from Note [GND and associated type families]-           && isNothing at_without_last_cls_tv-              -- Check (d) from Note [GND and associated type families]-           && isNothing at_last_cls_tv_in_kinds--        (adf_tcs, atf_tcs) = partition isDataFamilyTyCon at_tcs-        no_adfs            = null adf_tcs-               -- We cannot newtype-derive data family instances--        at_without_last_cls_tv-          = find (\tc -> last_cls_tv `notElem` tyConTyVars tc) atf_tcs-        at_last_cls_tv_in_kinds-          = find (\tc -> any (at_last_cls_tv_in_kind . tyVarKind)-                             (tyConTyVars tc)-                      || at_last_cls_tv_in_kind (tyConResKind tc)) atf_tcs-        at_last_cls_tv_in_kind kind-          = last_cls_tv `elemVarSet` exactTyCoVarsOfType kind-        at_tcs = classATs cls-        last_cls_tv = ASSERT( notNull cls_tyvars )-                      last cls_tyvars--        cant_derive_err-           = vcat [ ppUnless no_adfs adfs_msg-                  , maybe empty at_without_last_cls_tv_msg-                          at_without_last_cls_tv-                  , maybe empty at_last_cls_tv_in_kinds_msg-                          at_last_cls_tv_in_kinds-                  ]-        adfs_msg  = text "the class has associated data types"-        at_without_last_cls_tv_msg at_tc = hang-          (text "the associated type" <+> quotes (ppr at_tc)-           <+> text "is not parameterized over the last type variable")-          2 (text "of the class" <+> quotes (ppr cls))-        at_last_cls_tv_in_kinds_msg at_tc = hang-          (text "the associated type" <+> quotes (ppr at_tc)-           <+> text "contains the last type variable")-         2 (text "of the class" <+> quotes (ppr cls)-           <+> text "in a kind, which is not (yet) allowed")-    in unless ats_look_sensible $ bale_out cant_derive_err--mk_eqn_stock :: (DerivSpecMechanism -> DerivM EarlyDerivSpec)-             -> (SDoc -> DerivM EarlyDerivSpec)-             -> DerivM EarlyDerivSpec-mk_eqn_stock go_for_it bale_out-  = do DerivEnv { denv_tc      = tc-                , denv_rep_tc  = rep_tc-                , denv_cls     = cls-                , denv_cls_tys = cls_tys-                , denv_ctxt    = deriv_ctxt } <- ask-       dflags <- getDynFlags-       case checkOriginativeSideConditions dflags deriv_ctxt cls cls_tys-                                           tc rep_tc of-         CanDeriveStock gen_fn -> go_for_it $ DerivSpecStock gen_fn-         StockClassError msg   -> bale_out msg-         _                     -> bale_out (nonStdErr cls)--mk_eqn_anyclass :: (DerivSpecMechanism -> DerivM EarlyDerivSpec)-                -> (SDoc -> DerivM EarlyDerivSpec)-                -> DerivM EarlyDerivSpec-mk_eqn_anyclass go_for_it bale_out-  = do dflags <- getDynFlags-       case canDeriveAnyClass dflags of-         IsValid      -> go_for_it DerivSpecAnyClass-         NotValid msg -> bale_out msg--mk_eqn_newtype :: Type -- The newtype's representation type-               -> DerivM EarlyDerivSpec-mk_eqn_newtype = mk_coerce_based_eqn DerivSpecNewtype--mk_eqn_via :: Type -- The @via@ type-           -> DerivM EarlyDerivSpec-mk_eqn_via = mk_coerce_based_eqn DerivSpecVia--mk_eqn_no_mechanism :: (DerivSpecMechanism -> DerivM EarlyDerivSpec)-                    -> (SDoc -> DerivM EarlyDerivSpec)-                    -> DerivM EarlyDerivSpec-mk_eqn_no_mechanism go_for_it bale_out-  = do DerivEnv { denv_tc      = tc-                , denv_rep_tc  = rep_tc-                , denv_cls     = cls-                , denv_cls_tys = cls_tys-                , denv_ctxt    = deriv_ctxt } <- ask-       dflags <- getDynFlags--           -- See Note [Deriving instances for classes themselves]-       let dac_error msg-             | isClassTyCon rep_tc-             = quotes (ppr tc) <+> text "is a type class,"-                               <+> text "and can only have a derived instance"-                               $+$ text "if DeriveAnyClass is enabled"-             | otherwise-             = nonStdErr cls $$ msg--       case checkOriginativeSideConditions dflags deriv_ctxt cls cls_tys-                                           tc rep_tc of-           -- NB: pass the *representation* tycon to-           -- checkOriginativeSideConditions-           NonDerivableClass   msg -> bale_out (dac_error msg)-           StockClassError msg     -> bale_out msg-           CanDeriveStock gen_fn   -> go_for_it $ DerivSpecStock gen_fn-           CanDeriveAnyClass       -> go_for_it DerivSpecAnyClass--{--************************************************************************-*                                                                      *-            GeneralizedNewtypeDeriving and DerivingVia-*                                                                      *-************************************************************************--}---- | Derive an instance for a newtype.-mkNewTypeEqn :: DerivM EarlyDerivSpec-mkNewTypeEqn--- Want: instance (...) => cls (cls_tys ++ [tycon tc_args]) where ...-  = do DerivEnv { denv_tc           = tycon-                , denv_rep_tc       = rep_tycon-                , denv_rep_tc_args  = rep_tc_args-                , denv_cls          = cls-                , denv_cls_tys      = cls_tys-                , denv_ctxt         = deriv_ctxt-                , denv_strat        = mb_strat } <- ask-       dflags <- getDynFlags--       let newtype_deriving  = xopt LangExt.GeneralizedNewtypeDeriving dflags-           deriveAnyClass    = xopt LangExt.DeriveAnyClass             dflags-           bale_out        = bale_out' newtype_deriving-           bale_out' b msg = do err <- derivingThingErrM b msg-                                lift $ failWithTc err--           non_std     = nonStdErr cls-           suggest_gnd = text "Try GeneralizedNewtypeDeriving for GHC's"-                     <+> text "newtype-deriving extension"--           -- Here is the plan for newtype derivings.  We see-           --        newtype T a1...an = MkT (t ak+1...an)-           --          deriving (.., C s1 .. sm, ...)-           -- where t is a type,-           --       ak+1...an is a suffix of a1..an, and are all tyvars-           --       ak+1...an do not occur free in t, nor in the s1..sm-           --       (C s1 ... sm) is a  *partial applications* of class C-           --                      with the last parameter missing-           --       (T a1 .. ak) matches the kind of C's last argument-           --              (and hence so does t)-           -- The latter kind-check has been done by deriveTyData already,-           -- and tc_args are already trimmed-           ---           -- We generate the instance-           --       instance forall ({a1..ak} u fvs(s1..sm)).-           --                C s1 .. sm t => C s1 .. sm (T a1...ak)-           -- where T a1...ap is the partial application of-           --       the LHS of the correct kind and p >= k-           ---           --      NB: the variables below are:-           --              tc_tvs = [a1, ..., an]-           --              tyvars_to_keep = [a1, ..., ak]-           --              rep_ty = t ak .. an-           --              deriv_tvs = fvs(s1..sm) \ tc_tvs-           --              tys = [s1, ..., sm]-           --              rep_fn' = t-           ---           -- Running example: newtype T s a = MkT (ST s a) deriving( Monad )-           -- We generate the instance-           --      instance Monad (ST s) => Monad (T s) where--           nt_eta_arity = newTyConEtadArity rep_tycon-                   -- For newtype T a b = MkT (S a a b), the TyCon-                   -- machinery already eta-reduces the representation type, so-                   -- we know that-                   --      T a ~ S a a-                   -- That's convenient here, because we may have to apply-                   -- it to fewer than its original complement of arguments--           -- Note [Newtype representation]-           -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-           -- Need newTyConRhs (*not* a recursive representation finder)-           -- to get the representation type. For example-           --      newtype B = MkB Int-           --      newtype A = MkA B deriving( Num )-           -- We want the Num instance of B, *not* the Num instance of Int,-           -- when making the Num instance of A!-           rep_inst_ty = newTyConInstRhs rep_tycon rep_tc_args--           --------------------------------------------------------------------           --  Figuring out whether we can only do this newtype-deriving thing--           -- See Note [Determining whether newtype-deriving is appropriate]-           might_be_newtype_derivable-              =  not (non_coercible_class cls)-              && eta_ok---            && not (isRecursiveTyCon tycon)      -- Note [Recursive newtypes]--           -- Check that eta reduction is OK-           eta_ok = rep_tc_args `lengthAtLeast` nt_eta_arity-             -- The newtype can be eta-reduced to match the number-             --     of type argument actually supplied-             --        newtype T a b = MkT (S [a] b) deriving( Monad )-             --     Here the 'b' must be the same in the rep type (S [a] b)-             --     And the [a] must not mention 'b'.  That's all handled-             --     by nt_eta_rity.--           cant_derive_err = ppUnless eta_ok  eta_msg-           eta_msg = text "cannot eta-reduce the representation type enough"--       MASSERT( cls_tys `lengthIs` (classArity cls - 1) )-       case mb_strat of-         Just StockStrategy    -> mk_eqn_stock    mk_originative_eqn bale_out-         Just AnyclassStrategy -> mk_eqn_anyclass mk_originative_eqn bale_out-         Just NewtypeStrategy  ->-           -- Since the user explicitly asked for GeneralizedNewtypeDeriving,-           -- we don't need to perform all of the checks we normally would,-           -- such as if the class being derived is known to produce ill-roled-           -- coercions (e.g., Traversable), since we can just derive the-           -- instance and let it error if need be.-           -- See Note [Determining whether newtype-deriving is appropriate]-           if eta_ok && newtype_deriving-             then mk_eqn_newtype rep_inst_ty-             else bale_out (cant_derive_err $$-                            if newtype_deriving then empty else suggest_gnd)-         Just (ViaStrategy via_ty) ->-           -- NB: For DerivingVia, we don't need to any eta-reduction checking,-           -- since the @via@ type is already "eta-reduced".-           mk_eqn_via via_ty-         Nothing-           | might_be_newtype_derivable-             && ((newtype_deriving && not deriveAnyClass)-                  || std_class_via_coercible cls)-          -> mk_eqn_newtype rep_inst_ty-           | otherwise-          -> case checkOriginativeSideConditions dflags deriv_ctxt cls cls_tys-                                                 tycon rep_tycon of-               StockClassError msg-                 -- There's a particular corner case where-                 ---                 -- 1. -XGeneralizedNewtypeDeriving and -XDeriveAnyClass are-                 --    both enabled at the same time-                 -- 2. We're deriving a particular stock derivable class-                 --    (such as Functor)-                 ---                 -- and the previous cases won't catch it. This fixes the bug-                 -- reported in Trac #10598.-                 | might_be_newtype_derivable && newtype_deriving-                -> mk_eqn_newtype rep_inst_ty-                 -- Otherwise, throw an error for a stock class-                 | might_be_newtype_derivable && not newtype_deriving-                -> bale_out (msg $$ suggest_gnd)-                 | otherwise-                -> bale_out msg--               -- Must use newtype deriving or DeriveAnyClass-               NonDerivableClass _msg-                 -- Too hard, even with newtype deriving-                 | newtype_deriving           -> bale_out cant_derive_err-                 -- Try newtype deriving!-                 -- Here we suggest GeneralizedNewtypeDeriving even in cases-                 -- where it may not be applicable. See Trac #9600.-                 | otherwise                  -> bale_out (non_std $$ suggest_gnd)--               -- DeriveAnyClass-               CanDeriveAnyClass -> do-                 -- If both DeriveAnyClass and GeneralizedNewtypeDeriving are-                 -- enabled, we take the diplomatic approach of defaulting to-                 -- DeriveAnyClass, but emitting a warning about the choice.-                 -- See Note [Deriving strategies]-                 when (newtype_deriving && deriveAnyClass) $-                   lift $ addWarnTc NoReason $ sep-                     [ text "Both DeriveAnyClass and"-                       <+> text "GeneralizedNewtypeDeriving are enabled"-                     , text "Defaulting to the DeriveAnyClass strategy"-                       <+> text "for instantiating" <+> ppr cls-                     , text "Use DerivingStrategies to pick"-                       <+> text "a different strategy"-                      ]-                 mk_originative_eqn DerivSpecAnyClass-               -- CanDeriveStock-               CanDeriveStock gen_fn -> mk_originative_eqn $-                                        DerivSpecStock gen_fn--{--Note [Recursive newtypes]-~~~~~~~~~~~~~~~~~~~~~~~~~-Newtype deriving works fine, even if the newtype is recursive.-e.g.    newtype S1 = S1 [T1 ()]-        newtype T1 a = T1 (StateT S1 IO a ) deriving( Monad )-Remember, too, that type families are currently (conservatively) given-a recursive flag, so this also allows newtype deriving to work-for type famillies.--We used to exclude recursive types, because we had a rather simple-minded way of generating the instance decl:-   newtype A = MkA [A]-   instance Eq [A] => Eq A      -- Makes typechecker loop!-But now we require a simple context, so it's ok.--Note [Determining whether newtype-deriving is appropriate]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we see-  newtype NT = MkNT Foo-    deriving C-we have to decide how to perform the deriving. Do we do newtype deriving,-or do we do normal deriving? In general, we prefer to do newtype deriving-wherever possible. So, we try newtype deriving unless there's a glaring-reason not to.--"Glaring reasons not to" include trying to derive a class for which a-coercion-based instance doesn't make sense. These classes are listed in-the definition of non_coercible_class. They include Show (since it must-show the name of the datatype) and Traversable (since a coercion-based-Traversable instance is ill-roled).--However, non_coercible_class is ignored if the user explicitly requests-to derive an instance with GeneralizedNewtypeDeriving using the newtype-deriving strategy. In such a scenario, GHC will unquestioningly try to-derive the instance via coercions (even if the final generated code is-ill-roled!). See Note [Deriving strategies].--Note that newtype deriving might fail, even after we commit to it. This-is because the derived instance uses `coerce`, which must satisfy its-`Coercible` constraint. This is different than other deriving scenarios,-where we're sure that the resulting instance will type-check.--Note [GND and associated type families]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It's possible to use GeneralizedNewtypeDeriving (GND) to derive instances for-classes with associated type families. A general recipe is:--    class C x y z where-      type T y z x-      op :: x -> [y] -> z--    newtype N a = MkN <rep-type> deriving( C )--    =====>--    instance C x y <rep-type> => C x y (N a) where-      type T y (N a) x = T y <rep-type> x-      op = coerce (op :: x -> [y] -> <rep-type>)--However, we must watch out for three things:--(a) The class must not contain any data families. If it did, we'd have to-    generate a fresh data constructor name for the derived data family-    instance, and it's not clear how to do this.--(b) Each associated type family's type variables must mention the last type-    variable of the class. As an example, you wouldn't be able to use GND to-    derive an instance of this class:--      class C a b where-        type T a--    But you would be able to derive an instance of this class:--      class C a b where-        type T b--    The difference is that in the latter T mentions the last parameter of C-    (i.e., it mentions b), but the former T does not. If you tried, e.g.,--      newtype Foo x = Foo x deriving (C a)--    with the former definition of C, you'd end up with something like this:--      instance C a (Foo x) where-        type T a = T ???--    This T family instance doesn't mention the newtype (or its representation-    type) at all, so we disallow such constructions with GND.--(c) UndecidableInstances might need to be enabled. Here's a case where it is-    most definitely necessary:--      class C a where-        type T a-      newtype Loop = Loop MkLoop deriving C--      =====>--      instance C Loop where-        type T Loop = T Loop--    Obviously, T Loop would send the typechecker into a loop. Unfortunately,-    you might even need UndecidableInstances even in cases where the-    typechecker would be guaranteed to terminate. For example:--      instance C Int where-        type C Int = Int-      newtype MyInt = MyInt Int deriving C--      =====>--      instance C MyInt where-        type T MyInt = T Int--    GHC's termination checker isn't sophisticated enough to conclude that the-    definition of T MyInt terminates, so UndecidableInstances is required.--(d) For the time being, we do not allow the last type variable of the class to-    appear in a /kind/ of an associated type family definition. For instance:--    class C a where-      type T1 a        -- OK-      type T2 (x :: a) -- Illegal: a appears in the kind of x-      type T3 y :: a   -- Illegal: a appears in the kind of (T3 y)--    The reason we disallow this is because our current approach to deriving-    associated type family instances—i.e., by unwrapping the newtype's type-    constructor as shown above—is ill-equipped to handle the scenario when-    the last type variable appears as an implicit argument. In the worst case,-    allowing the last variable to appear in a kind can result in improper Core-    being generated (see #14728).--    There is hope for this feature being added some day, as one could-    conceivably take a newtype axiom (which witnesses a coercion between a-    newtype and its representation type) at lift that through each associated-    type at the Core level. See #14728, comment:3 for a sketch of how this-    might work. Until then, we disallow this featurette wholesale.--The same criteria apply to DerivingVia.--************************************************************************-*                                                                      *-\subsection[TcDeriv-normal-binds]{Bindings for the various classes}-*                                                                      *-************************************************************************--After all the trouble to figure out the required context for the-derived instance declarations, all that's left is to chug along to-produce them.  They will then be shoved into @tcInstDecls2@, which-will do all its usual business.--There are lots of possibilities for code to generate.  Here are-various general remarks.--PRINCIPLES:-\begin{itemize}-\item-We want derived instances of @Eq@ and @Ord@ (both v common) to be-``you-couldn't-do-better-by-hand'' efficient.--\item-Deriving @Show@---also pretty common--- should also be reasonable good code.--\item-Deriving for the other classes isn't that common or that big a deal.-\end{itemize}--PRAGMATICS:--\begin{itemize}-\item-Deriving @Ord@ is done mostly with the 1.3 @compare@ method.--\item-Deriving @Eq@ also uses @compare@, if we're deriving @Ord@, too.--\item-We {\em normally} generate code only for the non-defaulted methods;-there are some exceptions for @Eq@ and (especially) @Ord@...--\item-Sometimes we use a @_con2tag_<tycon>@ function, which returns a data-constructor's numeric (@Int#@) tag.  These are generated by-@gen_tag_n_con_binds@, and the heuristic for deciding if one of-these is around is given by @hasCon2TagFun@.--The examples under the different sections below will make this-clearer.--\item-Much less often (really just for deriving @Ix@), we use a-@_tag2con_<tycon>@ function.  See the examples.--\item-We use the renamer!!!  Reason: we're supposed to be-producing @LHsBinds Name@ for the methods, but that means-producing correctly-uniquified code on the fly.  This is entirely-possible (the @TcM@ monad has a @UniqueSupply@), but it is painful.-So, instead, we produce @MonoBinds RdrName@ then heave 'em through-the renamer.  What a great hack!-\end{itemize}--}---- Generate the InstInfo for the required instance paired with the---   *representation* tycon for that instance,--- plus any auxiliary bindings required------ Representation tycons differ from the tycon in the instance signature in--- case of instances for indexed families.----genInst :: DerivSpec theta-        -> TcM (ThetaType -> TcM (InstInfo GhcPs), BagDerivStuff, [Name])--- We must use continuation-returning style here to get the order in which we--- typecheck family instances and derived instances right.--- See Note [Staging of tcDeriving]-genInst spec@(DS { ds_tvs = tvs, ds_tc = rep_tycon-                 , ds_mechanism = mechanism, ds_tys = tys-                 , ds_cls = clas, ds_loc = loc-                 , ds_standalone_wildcard = wildcard })-  = do (meth_binds, deriv_stuff, unusedNames)-         <- set_span_and_ctxt $-            genDerivStuff mechanism loc clas rep_tycon tys tvs-       let mk_inst_info theta = set_span_and_ctxt $ do-             inst_spec <- newDerivClsInst theta spec-             doDerivInstErrorChecks2 clas inst_spec theta wildcard mechanism-             traceTc "newder" (ppr inst_spec)-             return $ InstInfo-                       { iSpec   = inst_spec-                       , iBinds  = InstBindings-                                     { ib_binds = meth_binds-                                     , ib_tyvars = map Var.varName tvs-                                     , ib_pragmas = []-                                     , ib_extensions = extensions-                                     , ib_derived = True } }-       return (mk_inst_info, deriv_stuff, unusedNames)-  where-    extensions :: [LangExt.Extension]-    extensions-      | isDerivSpecNewtype mechanism || isDerivSpecVia mechanism-        -- Both these flags are needed for higher-rank uses of coerce-        -- See Note [Newtype-deriving instances] in TcGenDeriv-      = [LangExt.ImpredicativeTypes, LangExt.RankNTypes]-      | otherwise-      = []--    set_span_and_ctxt :: TcM a -> TcM a-    set_span_and_ctxt = setSrcSpan loc . addErrCtxt (instDeclCtxt3 clas tys)--doDerivInstErrorChecks1 :: DerivSpecMechanism -> DerivM ()-doDerivInstErrorChecks1 mechanism = do-    DerivEnv { denv_tc      = tc-             , denv_rep_tc  = rep_tc } <- ask-    standalone <- isStandaloneDeriv-    let anyclass_strategy = isDerivSpecAnyClass mechanism-        via_strategy      = isDerivSpecVia mechanism-        bale_out msg = do err <- derivingThingErrMechanism mechanism msg-                          lift $ failWithTc err--    -- For standalone deriving, check that all the data constructors are in-    -- scope...-    rdr_env <- lift getGlobalRdrEnv-    let data_con_names = map dataConName (tyConDataCons rep_tc)-        hidden_data_cons = not (isWiredInName (tyConName rep_tc)) &&-                           (isAbstractTyCon rep_tc ||-                            any not_in_scope data_con_names)-        not_in_scope dc  = isNothing (lookupGRE_Name rdr_env dc)--    lift $ addUsedDataCons rdr_env rep_tc--    -- ...however, we don't perform this check if we're using DeriveAnyClass,-    -- since it doesn't generate any code that requires use of a data-    -- constructor. Nor do we perform this check with @deriving via@, as it-    -- doesn't explicitly require the constructors to be in scope.-    unless (anyclass_strategy || via_strategy-            || not standalone || not hidden_data_cons) $-           bale_out $ derivingHiddenErr tc--doDerivInstErrorChecks2 :: Class -> ClsInst -> ThetaType -> Maybe SrcSpan-                        -> DerivSpecMechanism -> TcM ()-doDerivInstErrorChecks2 clas clas_inst theta wildcard mechanism-  = do { traceTc "doDerivInstErrorChecks2" (ppr clas_inst)-       ; dflags <- getDynFlags-       ; xpartial_sigs <- xoptM LangExt.PartialTypeSignatures-       ; wpartial_sigs <- woptM Opt_WarnPartialTypeSignatures--         -- Error if PartialTypeSignatures isn't enabled when a user tries-         -- to write @deriving instance _ => Eq (Foo a)@. Or, if that-         -- extension is enabled, give a warning if -Wpartial-type-signatures-         -- is enabled.-       ; case wildcard of-           Nothing -> pure ()-           Just span -> setSrcSpan span $ do-             checkTc xpartial_sigs (hang partial_sig_msg 2 pts_suggestion)-             warnTc (Reason Opt_WarnPartialTypeSignatures)-                    wpartial_sigs partial_sig_msg--         -- Check for Generic instances that are derived with an exotic-         -- deriving strategy like DAC-         -- See Note [Deriving strategies]-       ; when (exotic_mechanism && className clas `elem` genericClassNames) $-         do { failIfTc (safeLanguageOn dflags) gen_inst_err-            ; when (safeInferOn dflags) (recordUnsafeInfer emptyBag) } }-  where-    exotic_mechanism = not $ isDerivSpecStock mechanism--    partial_sig_msg = text "Found type wildcard" <+> quotes (char '_')-                  <+> text "standing for" <+> quotes (pprTheta theta)--    pts_suggestion-      = text "To use the inferred type, enable PartialTypeSignatures"--    gen_inst_err = text "Generic instances can only be derived in"-               <+> text "Safe Haskell using the stock strategy."--genDerivStuff :: DerivSpecMechanism -> SrcSpan -> Class-              -> TyCon -> [Type] -> [TyVar]-              -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name])-genDerivStuff mechanism loc clas tycon inst_tys tyvars-  = case mechanism of-      -- See Note [Bindings for Generalised Newtype Deriving]-      DerivSpecNewtype rhs_ty -> gen_newtype_or_via rhs_ty--      -- Try a stock deriver-      DerivSpecStock gen_fn -> gen_fn loc tycon inst_tys--      -- Try DeriveAnyClass-      DerivSpecAnyClass -> do-        let mini_env   = mkVarEnv (classTyVars clas `zip` inst_tys)-            mini_subst = mkTvSubst (mkInScopeSet (mkVarSet tyvars)) mini_env-        dflags <- getDynFlags-        tyfam_insts <--          -- canDeriveAnyClass should ensure that this code can't be reached-          -- unless -XDeriveAnyClass is enabled.-          ASSERT2( isValid (canDeriveAnyClass dflags)-                 , ppr "genDerivStuff: bad derived class" <+> ppr clas )-          mapM (tcATDefault loc mini_subst emptyNameSet)-               (classATItems clas)-        return ( emptyBag -- No method bindings are needed...-               , listToBag (map DerivFamInst (concat tyfam_insts))-               -- ...but we may need to generate binding for associated type-               -- family default instances.-               -- See Note [DeriveAnyClass and default family instances]-               , [] )--      -- Try DerivingVia-      DerivSpecVia via_ty -> gen_newtype_or_via via_ty-  where-    gen_newtype_or_via ty = do-      (binds, faminsts) <- gen_Newtype_binds loc clas tyvars inst_tys ty-      return (binds, faminsts, maybeToList unusedConName)--    unusedConName :: Maybe Name-    unusedConName-      | isDerivSpecNewtype mechanism-        -- See Note [Newtype deriving and unused constructors]-      = Just $ getName $ head $ tyConDataCons tycon-      | otherwise-      = Nothing--{--Note [Bindings for Generalised Newtype Deriving]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-  class Eq a => C a where-     f :: a -> a-  newtype N a = MkN [a] deriving( C )-  instance Eq (N a) where ...--The 'deriving C' clause generates, in effect-  instance (C [a], Eq a) => C (N a) where-     f = coerce (f :: [a] -> [a])--This generates a cast for each method, but allows the superclasse to-be worked out in the usual way.  In this case the superclass (Eq (N-a)) will be solved by the explicit Eq (N a) instance.  We do *not*-create the superclasses by casting the superclass dictionaries for the-representation type.--See the paper "Safe zero-cost coercions for Haskell".--Note [DeriveAnyClass and default family instances]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--When a class has a associated type family with a default instance, e.g.:--  class C a where-    type T a-    type T a = Char--then there are a couple of scenarios in which a user would expect T a to-default to Char. One is when an instance declaration for C is given without-an implementation for T:--  instance C Int--Another scenario in which this can occur is when the -XDeriveAnyClass extension-is used:--  data Example = Example deriving (C, Generic)--In the latter case, we must take care to check if C has any associated type-families with default instances, because -XDeriveAnyClass will never provide-an implementation for them. We "fill in" the default instances using the-tcATDefault function from TcClassDcl (which is also used in TcInstDcls to-handle the empty instance declaration case).--Note [Deriving strategies]-~~~~~~~~~~~~~~~~~~~~~~~~~~-GHC has a notion of deriving strategies, which allow the user to explicitly-request which approach to use when deriving an instance (enabled with the--XDerivingStrategies language extension). For more information, refer to the-original Trac ticket (#10598) or the associated wiki page:-https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DerivingStrategies--A deriving strategy can be specified in a deriving clause:--    newtype Foo = MkFoo Bar-      deriving newtype C--Or in a standalone deriving declaration:--    deriving anyclass instance C Foo---XDerivingStrategies also allows the use of multiple deriving clauses per data-declaration so that a user can derive some instance with one deriving strategy-and other instances with another deriving strategy. For example:--    newtype Baz = Baz Quux-      deriving          (Eq, Ord)-      deriving stock    (Read, Show)-      deriving newtype  (Num, Floating)-      deriving anyclass C--Currently, the deriving strategies are:--* stock: Have GHC implement a "standard" instance for a data type, if possible-  (e.g., Eq, Ord, Generic, Data, Functor, etc.)--* anyclass: Use -XDeriveAnyClass--* newtype: Use -XGeneralizedNewtypeDeriving--* via: Use -XDerivingVia--The latter two strategies (newtype and via) are referred to as the-"coerce-based" strategies, since they generate code that relies on the `coerce`-function. The former two strategies (stock and anyclass), in contrast, are-referred to as the "originative" strategies, since they create "original"-instances instead of "reusing" old instances (by way of `coerce`).--If an explicit deriving strategy is not given, GHC has an algorithm it uses to-determine which strategy it will actually use. The algorithm is quite long,-so it lives in the Haskell wiki at-https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DerivingStrategies-("The deriving strategy resolution algorithm" section).--Internally, GHC uses the DerivStrategy datatype to denote a user-requested-deriving strategy, and it uses the DerivSpecMechanism datatype to denote what-GHC will use to derive the instance after taking the above steps. In other-words, GHC will always settle on a DerivSpecMechnism, even if the user did not-ask for a particular DerivStrategy (using the algorithm linked to above).--Note [Deriving instances for classes themselves]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Much of the code in TcDeriv assumes that deriving only works on data types.-But this assumption doesn't hold true for DeriveAnyClass, since it's perfectly-reasonable to do something like this:--  {-# LANGUAGE DeriveAnyClass #-}-  class C1 (a :: Constraint) where-  class C2 where-  deriving instance C1 C2-    -- This is equivalent to `instance C1 C2`--If DeriveAnyClass isn't enabled in the code above (i.e., it defaults to stock-deriving), we throw a special error message indicating that DeriveAnyClass is-the only way to go. We don't bother throwing this error if an explicit 'stock'-or 'newtype' keyword is used, since both options have their own perfectly-sensible error messages in the case of the above code (as C1 isn't a stock-derivable class, and C2 isn't a newtype).--************************************************************************-*                                                                      *-\subsection[TcDeriv-taggery-Names]{What con2tag/tag2con functions are available?}-*                                                                      *-************************************************************************--}--nonUnaryErr :: LHsSigType GhcRn -> SDoc-nonUnaryErr ct = quotes (ppr ct)-  <+> text "is not a unary constraint, as expected by a deriving clause"--nonStdErr :: Class -> SDoc-nonStdErr cls =-      quotes (ppr cls)-  <+> text "is not a stock derivable class (Eq, Show, etc.)"--gndNonNewtypeErr :: SDoc-gndNonNewtypeErr =-  text "GeneralizedNewtypeDeriving cannot be used on non-newtypes"--derivingNullaryErr :: MsgDoc-derivingNullaryErr = text "Cannot derive instances for nullary classes"--derivingKindErr :: TyCon -> Class -> [Type] -> Kind -> Bool -> MsgDoc-derivingKindErr tc cls cls_tys cls_kind enough_args-  = sep [ hang (text "Cannot derive well-kinded instance of form"-                      <+> quotes (pprClassPred cls cls_tys-                                    <+> parens (ppr tc <+> text "...")))-               2 gen1_suggestion-        , nest 2 (text "Class" <+> quotes (ppr cls)-                      <+> text "expects an argument of kind"-                      <+> quotes (pprKind cls_kind))-        ]-  where-    gen1_suggestion | cls `hasKey` gen1ClassKey && enough_args-                    = text "(Perhaps you intended to use PolyKinds)"-                    | otherwise = Outputable.empty--derivingViaKindErr :: Class -> Kind -> Type -> Kind -> MsgDoc-derivingViaKindErr cls cls_kind via_ty via_kind-  = hang (text "Cannot derive instance via" <+> quotes (pprType via_ty))-       2 (text "Class" <+> quotes (ppr cls)-               <+> text "expects an argument of kind"-               <+> quotes (pprKind cls_kind) <> char ','-      $+$ text "but" <+> quotes (pprType via_ty)-               <+> text "has kind" <+> quotes (pprKind via_kind))--derivingEtaErr :: Class -> [Type] -> Type -> MsgDoc-derivingEtaErr cls cls_tys inst_ty-  = sep [text "Cannot eta-reduce to an instance of form",-         nest 2 (text "instance (...) =>"-                <+> pprClassPred cls (cls_tys ++ [inst_ty]))]--derivingThingErr :: Bool -> Class -> [Type] -> Type-                 -> Maybe (DerivStrategy GhcTc) -> MsgDoc -> MsgDoc-derivingThingErr newtype_deriving cls cls_tys inst_ty mb_strat why-  = derivingThingErr' newtype_deriving cls cls_tys inst_ty mb_strat-                      (maybe empty derivStrategyName mb_strat) why--derivingThingErrM :: Bool -> MsgDoc -> DerivM MsgDoc-derivingThingErrM newtype_deriving why-  = do DerivEnv { denv_tc      = tc-                , denv_tc_args = tc_args-                , denv_cls     = cls-                , denv_cls_tys = cls_tys-                , denv_strat   = mb_strat } <- ask-       pure $ derivingThingErr newtype_deriving cls cls_tys-                               (mkTyConApp tc tc_args) mb_strat why--derivingThingErrMechanism :: DerivSpecMechanism -> MsgDoc -> DerivM MsgDoc-derivingThingErrMechanism mechanism why-  = do DerivEnv { denv_tc      = tc-                , denv_tc_args = tc_args-                , denv_cls     = cls-                , denv_cls_tys = cls_tys-                , denv_strat   = mb_strat } <- ask-       pure $ derivingThingErr' (isDerivSpecNewtype mechanism) cls cls_tys-                (mkTyConApp tc tc_args) mb_strat-                (derivStrategyName $ derivSpecMechanismToStrategy mechanism)-                why--derivingThingErr' :: Bool -> Class -> [Type] -> Type-                  -> Maybe (DerivStrategy GhcTc) -> MsgDoc -> MsgDoc -> MsgDoc-derivingThingErr' newtype_deriving cls cls_tys inst_ty mb_strat strat_msg why-  = sep [(hang (text "Can't make a derived instance of")-             2 (quotes (ppr pred) <+> via_mechanism)-          $$ nest 2 extra) <> colon,-         nest 2 why]-  where-    strat_used = isJust mb_strat-    extra | not strat_used, newtype_deriving-          = text "(even with cunning GeneralizedNewtypeDeriving)"-          | otherwise = empty-    pred = mkClassPred cls (cls_tys ++ [inst_ty])+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE TypeFamilies #-}++module TcDeriv ( tcDeriving, DerivInfo(..) ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.Hs+import DynFlags++import TcRnMonad+import FamInst+import TcOrigin+import Predicate+import TcDerivInfer+import TcDerivUtils+import TcValidity( allDistinctTyVars )+import TcClassDcl( instDeclCtxt3, tcATDefault )+import TcEnv+import TcGenDeriv                       -- Deriv stuff+import TcValidity( checkValidInstHead )+import InstEnv+import Inst+import FamInstEnv+import TcHsType+import TyCoRep+import TyCoPpr    ( pprTyVars )++import RnNames( extendGlobalRdrEnvRn )+import RnBinds+import RnEnv+import RnUtils    ( bindLocalNamesFV )+import RnSource   ( addTcgDUs )+import Avail++import Unify( tcUnifyTy )+import Class+import Type+import ErrUtils+import DataCon+import Maybes+import RdrName+import Name+import NameSet+import TyCon+import TcType+import Var+import VarEnv+import VarSet+import PrelNames+import SrcLoc+import Util+import Outputable+import FastString+import Bag+import FV (fvVarList, unionFV, mkFVs)+import qualified GHC.LanguageExtensions as LangExt++import Control.Monad+import Control.Monad.Trans.Class+import Control.Monad.Trans.Reader+import Data.List (partition, find)++{-+************************************************************************+*                                                                      *+                Overview+*                                                                      *+************************************************************************++Overall plan+~~~~~~~~~~~~+1.  Convert the decls (i.e. data/newtype deriving clauses,+    plus standalone deriving) to [EarlyDerivSpec]++2.  Infer the missing contexts for the InferTheta's++3.  Add the derived bindings, generating InstInfos+-}++data EarlyDerivSpec = InferTheta (DerivSpec [ThetaOrigin])+                    | GivenTheta (DerivSpec ThetaType)+        -- InferTheta ds => the context for the instance should be inferred+        --      In this case ds_theta is the list of all the sets of+        --      constraints needed, such as (Eq [a], Eq a), together with a+        --      suitable CtLoc to get good error messages.+        --      The inference process is to reduce this to a+        --      simpler form (e.g. Eq a)+        --+        -- GivenTheta ds => the exact context for the instance is supplied+        --                  by the programmer; it is ds_theta+        -- See Note [Inferring the instance context] in TcDerivInfer++splitEarlyDerivSpec :: [EarlyDerivSpec]+                    -> ([DerivSpec [ThetaOrigin]], [DerivSpec ThetaType])+splitEarlyDerivSpec [] = ([],[])+splitEarlyDerivSpec (InferTheta spec : specs) =+    case splitEarlyDerivSpec specs of (is, gs) -> (spec : is, gs)+splitEarlyDerivSpec (GivenTheta spec : specs) =+    case splitEarlyDerivSpec specs of (is, gs) -> (is, spec : gs)++instance Outputable EarlyDerivSpec where+  ppr (InferTheta spec) = ppr spec <+> text "(Infer)"+  ppr (GivenTheta spec) = ppr spec <+> text "(Given)"++{-+Note [Data decl contexts]+~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++        data (RealFloat a) => Complex a = !a :+ !a deriving( Read )++We will need an instance decl like:++        instance (Read a, RealFloat a) => Read (Complex a) where+          ...++The RealFloat in the context is because the read method for Complex is bound+to construct a Complex, and doing that requires that the argument type is+in RealFloat.++But this ain't true for Show, Eq, Ord, etc, since they don't construct+a Complex; they only take them apart.++Our approach: identify the offending classes, and add the data type+context to the instance decl.  The "offending classes" are++        Read, Enum?++FURTHER NOTE ADDED March 2002.  In fact, Haskell98 now requires that+pattern matching against a constructor from a data type with a context+gives rise to the constraints for that context -- or at least the thinned+version.  So now all classes are "offending".++Note [Newtype deriving]+~~~~~~~~~~~~~~~~~~~~~~~+Consider this:+    class C a b+    instance C [a] Char+    newtype T = T Char deriving( C [a] )++Notice the free 'a' in the deriving.  We have to fill this out to+    newtype T = T Char deriving( forall a. C [a] )++And then translate it to:+    instance C [a] Char => C [a] T where ...++Note [Unused constructors and deriving clauses]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See #3221.  Consider+   data T = T1 | T2 deriving( Show )+Are T1 and T2 unused?  Well, no: the deriving clause expands to mention+both of them.  So we gather defs/uses from deriving just like anything else.++-}++-- | Stuff needed to process a datatype's `deriving` clauses+data DerivInfo = DerivInfo { di_rep_tc  :: TyCon+                             -- ^ The data tycon for normal datatypes,+                             -- or the *representation* tycon for data families+                           , di_scoped_tvs :: ![(Name,TyVar)]+                             -- ^ Variables that scope over the deriving clause.+                           , di_clauses :: [LHsDerivingClause GhcRn]+                           , di_ctxt    :: SDoc -- ^ error context+                           }++{-++************************************************************************+*                                                                      *+\subsection[TcDeriv-driver]{Top-level function for \tr{derivings}}+*                                                                      *+************************************************************************+-}++tcDeriving  :: [DerivInfo]       -- All `deriving` clauses+            -> [LDerivDecl GhcRn] -- All stand-alone deriving declarations+            -> TcM (TcGblEnv, Bag (InstInfo GhcRn), HsValBinds GhcRn)+tcDeriving deriv_infos deriv_decls+  = recoverM (do { g <- getGblEnv+                 ; return (g, emptyBag, emptyValBindsOut)}) $+    do  { -- Fish the "deriving"-related information out of the TcEnv+          -- And make the necessary "equations".+          early_specs <- makeDerivSpecs deriv_infos deriv_decls+        ; traceTc "tcDeriving" (ppr early_specs)++        ; let (infer_specs, given_specs) = splitEarlyDerivSpec early_specs+        ; insts1 <- mapM genInst given_specs+        ; insts2 <- mapM genInst infer_specs++        ; dflags <- getDynFlags++        ; let (_, deriv_stuff, fvs) = unzip3 (insts1 ++ insts2)+        ; loc <- getSrcSpanM+        ; let (binds, famInsts) = genAuxBinds dflags loc+                                    (unionManyBags deriv_stuff)++        ; let mk_inst_infos1 = map fstOf3 insts1+        ; inst_infos1 <- apply_inst_infos mk_inst_infos1 given_specs++          -- We must put all the derived type family instances (from both+          -- infer_specs and given_specs) in the local instance environment+          -- before proceeding, or else simplifyInstanceContexts might+          -- get stuck if it has to reason about any of those family instances.+          -- See Note [Staging of tcDeriving]+        ; tcExtendLocalFamInstEnv (bagToList famInsts) $+          -- NB: only call tcExtendLocalFamInstEnv once, as it performs+          -- validity checking for all of the family instances you give it.+          -- If the family instances have errors, calling it twice will result+          -- in duplicate error messages!++     do {+        -- the stand-alone derived instances (@inst_infos1@) are used when+        -- inferring the contexts for "deriving" clauses' instances+        -- (@infer_specs@)+        ; final_specs <- extendLocalInstEnv (map iSpec inst_infos1) $+                         simplifyInstanceContexts infer_specs++        ; let mk_inst_infos2 = map fstOf3 insts2+        ; inst_infos2 <- apply_inst_infos mk_inst_infos2 final_specs+        ; let inst_infos = inst_infos1 ++ inst_infos2++        ; (inst_info, rn_binds, rn_dus) <- renameDeriv inst_infos binds++        ; unless (isEmptyBag inst_info) $+             liftIO (dumpIfSet_dyn dflags Opt_D_dump_deriv "Derived instances"+                        (ddump_deriving inst_info rn_binds famInsts))++        ; gbl_env <- tcExtendLocalInstEnv (map iSpec (bagToList inst_info))+                                          getGblEnv+        ; let all_dus = rn_dus `plusDU` usesOnly (NameSet.mkFVs $ concat fvs)+        ; return (addTcgDUs gbl_env all_dus, inst_info, rn_binds) } }+  where+    ddump_deriving :: Bag (InstInfo GhcRn) -> HsValBinds GhcRn+                   -> Bag FamInst             -- ^ Rep type family instances+                   -> SDoc+    ddump_deriving inst_infos extra_binds repFamInsts+      =    hang (text "Derived class instances:")+              2 (vcat (map (\i -> pprInstInfoDetails i $$ text "") (bagToList inst_infos))+                 $$ ppr extra_binds)+        $$ hangP "Derived type family instances:"+             (vcat (map pprRepTy (bagToList repFamInsts)))++    hangP s x = text "" $$ hang (ptext (sLit s)) 2 x++    -- Apply the suspended computations given by genInst calls.+    -- See Note [Staging of tcDeriving]+    apply_inst_infos :: [ThetaType -> TcM (InstInfo GhcPs)]+                     -> [DerivSpec ThetaType] -> TcM [InstInfo GhcPs]+    apply_inst_infos = zipWithM (\f ds -> f (ds_theta ds))++-- Prints the representable type family instance+pprRepTy :: FamInst -> SDoc+pprRepTy fi@(FamInst { fi_tys = lhs })+  = text "type" <+> ppr (mkTyConApp (famInstTyCon fi) lhs) <+>+      equals <+> ppr rhs+  where rhs = famInstRHS fi++renameDeriv :: [InstInfo GhcPs]+            -> Bag (LHsBind GhcPs, LSig GhcPs)+            -> TcM (Bag (InstInfo GhcRn), HsValBinds GhcRn, DefUses)+renameDeriv inst_infos bagBinds+  = discardWarnings $+    -- Discard warnings about unused bindings etc+    setXOptM LangExt.EmptyCase $+    -- Derived decls (for empty types) can have+    --    case x of {}+    setXOptM LangExt.ScopedTypeVariables $+    setXOptM LangExt.KindSignatures $+    -- Derived decls (for newtype-deriving) can use ScopedTypeVariables &+    -- KindSignatures+    setXOptM LangExt.TypeApplications $+    -- GND/DerivingVia uses TypeApplications in generated code+    -- (See Note [Newtype-deriving instances] in TcGenDeriv)+    unsetXOptM LangExt.RebindableSyntax $+    -- See Note [Avoid RebindableSyntax when deriving]+    setXOptM LangExt.TemplateHaskellQuotes $+    -- DeriveLift makes uses of quotes+    do  {+        -- Bring the extra deriving stuff into scope+        -- before renaming the instances themselves+        ; traceTc "rnd" (vcat (map (\i -> pprInstInfoDetails i $$ text "") inst_infos))+        ; (aux_binds, aux_sigs) <- mapAndUnzipBagM return bagBinds+        ; let aux_val_binds = ValBinds noExtField aux_binds (bagToList aux_sigs)+        ; rn_aux_lhs <- rnTopBindsLHS emptyFsEnv aux_val_binds+        ; let bndrs = collectHsValBinders rn_aux_lhs+        ; envs <- extendGlobalRdrEnvRn (map avail bndrs) emptyFsEnv ;+        ; setEnvs envs $+    do  { (rn_aux, dus_aux) <- rnValBindsRHS (TopSigCtxt (mkNameSet bndrs)) rn_aux_lhs+        ; (rn_inst_infos, fvs_insts) <- mapAndUnzipM rn_inst_info inst_infos+        ; return (listToBag rn_inst_infos, rn_aux,+                  dus_aux `plusDU` usesOnly (plusFVs fvs_insts)) } }++  where+    rn_inst_info :: InstInfo GhcPs -> TcM (InstInfo GhcRn, FreeVars)+    rn_inst_info+      inst_info@(InstInfo { iSpec = inst+                          , iBinds = InstBindings+                            { ib_binds = binds+                            , ib_tyvars = tyvars+                            , ib_pragmas = sigs+                            , ib_extensions = exts -- Only for type-checking+                            , ib_derived = sa } })+        =  ASSERT( null sigs )+           bindLocalNamesFV tyvars $+           do { (rn_binds,_, fvs) <- rnMethodBinds False (is_cls_nm inst) [] binds []+              ; let binds' = InstBindings { ib_binds = rn_binds+                                          , ib_tyvars = tyvars+                                          , ib_pragmas = []+                                          , ib_extensions = exts+                                          , ib_derived = sa }+              ; return (inst_info { iBinds = binds' }, fvs) }++{-+Note [Staging of tcDeriving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Here's a tricky corner case for deriving (adapted from #2721):++    class C a where+      type T a+      foo :: a -> T a++    instance C Int where+      type T Int = Int+      foo = id++    newtype N = N Int deriving C++This will produce an instance something like this:++    instance C N where+      type T N = T Int+      foo = coerce (foo :: Int -> T Int) :: N -> T N++We must be careful in order to typecheck this code. When determining the+context for the instance (in simplifyInstanceContexts), we need to determine+that T N and T Int have the same representation, but to do that, the T N+instance must be in the local family instance environment. Otherwise, GHC+would be unable to conclude that T Int is representationally equivalent to+T Int, and simplifyInstanceContexts would get stuck.++Previously, tcDeriving would defer adding any derived type family instances to+the instance environment until the very end, which meant that+simplifyInstanceContexts would get called without all the type family instances+it needed in the environment in order to properly simplify instance like+the C N instance above.++To avoid this scenario, we carefully structure the order of events in+tcDeriving. We first call genInst on the standalone derived instance specs and+the instance specs obtained from deriving clauses. Note that the return type of+genInst is a triple:++    TcM (ThetaType -> TcM (InstInfo RdrName), BagDerivStuff, Maybe Name)++The type family instances are in the BagDerivStuff. The first field of the+triple is a suspended computation which, given an instance context, produces+the rest of the instance. The fact that it is suspended is important, because+right now, we don't have ThetaTypes for the instances that use deriving clauses+(only the standalone-derived ones).++Now we can can collect the type family instances and extend the local instance+environment. At this point, it is safe to run simplifyInstanceContexts on the+deriving-clause instance specs, which gives us the ThetaTypes for the+deriving-clause instances. Now we can feed all the ThetaTypes to the+suspended computations and obtain our InstInfos, at which point+tcDeriving is done.++An alternative design would be to split up genInst so that the+family instances are generated separately from the InstInfos. But this would+require carving up a lot of the GHC deriving internals to accommodate the+change. On the other hand, we can keep all of the InstInfo and type family+instance logic together in genInst simply by converting genInst to+continuation-returning style, so we opt for that route.++Note [Why we don't pass rep_tc into deriveTyData]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Down in the bowels of mk_deriv_inst_tys_maybe, we need to convert the fam_tc+back into the rep_tc by means of a lookup. And yet we have the rep_tc right+here! Why look it up again? Answer: it's just easier this way.+We drop some number of arguments from the end of the datatype definition+in deriveTyData. The arguments are dropped from the fam_tc.+This action may drop a *different* number of arguments+passed to the rep_tc, depending on how many free variables, etc., the+dropped patterns have.++Also, this technique carries over the kind substitution from deriveTyData+nicely.++Note [Avoid RebindableSyntax when deriving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The RebindableSyntax extension interacts awkwardly with the derivation of+any stock class whose methods require the use of string literals. The Show+class is a simple example (see #12688):++  {-# LANGUAGE RebindableSyntax, OverloadedStrings #-}+  newtype Text = Text String+  fromString :: String -> Text+  fromString = Text++  data Foo = Foo deriving Show++This will generate code to the effect of:++  instance Show Foo where+    showsPrec _ Foo = showString "Foo"++But because RebindableSyntax and OverloadedStrings are enabled, the "Foo"+string literal is now of type Text, not String, which showString doesn't+accept! This causes the generated Show instance to fail to typecheck.++To avoid this kind of scenario, we simply turn off RebindableSyntax entirely+in derived code.++************************************************************************+*                                                                      *+                From HsSyn to DerivSpec+*                                                                      *+************************************************************************++@makeDerivSpecs@ fishes around to find the info about needed derived instances.+-}++makeDerivSpecs :: [DerivInfo]+               -> [LDerivDecl GhcRn]+               -> TcM [EarlyDerivSpec]+makeDerivSpecs deriv_infos deriv_decls+  = do  { eqns1 <- sequenceA+                     [ deriveClause rep_tc scoped_tvs dcs preds err_ctxt+                     | DerivInfo { di_rep_tc = rep_tc+                                 , di_scoped_tvs = scoped_tvs+                                 , di_clauses = clauses+                                 , di_ctxt = err_ctxt } <- deriv_infos+                     , L _ (HsDerivingClause { deriv_clause_strategy = dcs+                                             , deriv_clause_tys = L _ preds })+                         <- clauses+                     ]+        ; eqns2 <- mapM (recoverM (pure Nothing) . deriveStandalone) deriv_decls+        ; return $ concat eqns1 ++ catMaybes eqns2 }++------------------------------------------------------------------+-- | Process the derived classes in a single @deriving@ clause.+deriveClause :: TyCon+             -> [(Name, TcTyVar)]  -- Scoped type variables taken from tcTyConScopedTyVars+                                   -- See Note [Scoped tyvars in a TcTyCon] in types/TyCon+             -> Maybe (LDerivStrategy GhcRn)+             -> [LHsSigType GhcRn] -> SDoc+             -> TcM [EarlyDerivSpec]+deriveClause rep_tc scoped_tvs mb_lderiv_strat deriv_preds err_ctxt+  = addErrCtxt err_ctxt $ do+      traceTc "deriveClause" $ vcat+        [ text "tvs"             <+> ppr tvs+        , text "scoped_tvs"      <+> ppr scoped_tvs+        , text "tc"              <+> ppr tc+        , text "tys"             <+> ppr tys+        , text "mb_lderiv_strat" <+> ppr mb_lderiv_strat ]+      tcExtendNameTyVarEnv scoped_tvs $ do+        (mb_lderiv_strat', via_tvs) <- tcDerivStrategy mb_lderiv_strat+        tcExtendTyVarEnv via_tvs $+        -- Moreover, when using DerivingVia one can bind type variables in+        -- the `via` type as well, so these type variables must also be+        -- brought into scope.+          mapMaybeM (derivePred tc tys mb_lderiv_strat' via_tvs) deriv_preds+          -- After typechecking the `via` type once, we then typecheck all+          -- of the classes associated with that `via` type in the+          -- `deriving` clause.+          -- See also Note [Don't typecheck too much in DerivingVia].+  where+    tvs = tyConTyVars rep_tc+    (tc, tys) = case tyConFamInstSig_maybe rep_tc of+                        -- data family:+                  Just (fam_tc, pats, _) -> (fam_tc, pats)+      -- NB: deriveTyData wants the *user-specified*+      -- name. See Note [Why we don't pass rep_tc into deriveTyData]++                  _ -> (rep_tc, mkTyVarTys tvs)     -- datatype++-- | Process a single predicate in a @deriving@ clause.+--+-- This returns a 'Maybe' because the user might try to derive 'Typeable',+-- which is a no-op nowadays.+derivePred :: TyCon -> [Type] -> Maybe (LDerivStrategy GhcTc) -> [TyVar]+           -> LHsSigType GhcRn -> TcM (Maybe EarlyDerivSpec)+derivePred tc tys mb_lderiv_strat via_tvs deriv_pred =+  -- We carefully set up uses of recoverM to minimize error message+  -- cascades. See Note [Recovering from failures in deriving clauses].+  recoverM (pure Nothing) $+  setSrcSpan (getLoc (hsSigType deriv_pred)) $ do+    traceTc "derivePred" $ vcat+      [ text "tc"              <+> ppr tc+      , text "tys"             <+> ppr tys+      , text "deriv_pred"      <+> ppr deriv_pred+      , text "mb_lderiv_strat" <+> ppr mb_lderiv_strat+      , text "via_tvs"         <+> ppr via_tvs ]+    (cls_tvs, cls, cls_tys, cls_arg_kinds) <- tcHsDeriv deriv_pred+    when (cls_arg_kinds `lengthIsNot` 1) $+      failWithTc (nonUnaryErr deriv_pred)+    let [cls_arg_kind] = cls_arg_kinds+        mb_deriv_strat = fmap unLoc mb_lderiv_strat+    if (className cls == typeableClassName)+    then do warnUselessTypeable+            return Nothing+    else let deriv_tvs = via_tvs ++ cls_tvs in+         Just <$> deriveTyData tc tys mb_deriv_strat+                               deriv_tvs cls cls_tys cls_arg_kind++{-+Note [Don't typecheck too much in DerivingVia]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the following example:++  data D = ...+    deriving (A1 t, ..., A20 t) via T t++GHC used to be engineered such that it would typecheck the `deriving`+clause like so:++1. Take the first class in the clause (`A1`).+2. Typecheck the `via` type (`T t`) and bring its bound type variables+   into scope (`t`).+3. Typecheck the class (`A1`).+4. Move on to the next class (`A2`) and repeat the process until all+   classes have been typechecked.++This algorithm gets the job done most of the time, but it has two notable+flaws. One flaw is that it is wasteful: it requires that `T t` be typechecked+20 different times, once for each class in the `deriving` clause. This is+unnecessary because we only need to typecheck `T t` once in order to get+access to its bound type variable.++The other issue with this algorithm arises when there are no classes in the+`deriving` clause, like in the following example:++  data D2 = ...+    deriving () via Maybe Maybe++Because there are no classes, the algorithm above will simply do nothing.+As a consequence, GHC will completely miss the fact that `Maybe Maybe`+is ill-kinded nonsense (#16923).++To address both of these problems, GHC now uses this algorithm instead:++1. Typecheck the `via` type and bring its boudn type variables into scope.+2. Take the first class in the `deriving` clause.+3. Typecheck the class.+4. Move on to the next class and repeat the process until all classes have been+   typechecked.++This algorithm ensures that the `via` type is always typechecked, even if there+are no classes in the `deriving` clause. Moreover, it typecheck the `via` type+/exactly/ once and no more, even if there are multiple classes in the clause.++Note [Recovering from failures in deriving clauses]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider what happens if you run this program (from #10684) without+DeriveGeneric enabled:++    data A = A deriving (Show, Generic)+    data B = B A deriving (Show)++Naturally, you'd expect GHC to give an error to the effect of:++    Can't make a derived instance of `Generic A':+      You need -XDeriveGeneric to derive an instance for this class++And *only* that error, since the other two derived Show instances appear to be+independent of this derived Generic instance. Yet GHC also used to give this+additional error on the program above:++    No instance for (Show A)+      arising from the 'deriving' clause of a data type declaration+    When deriving the instance for (Show B)++This was happening because when GHC encountered any error within a single+data type's set of deriving clauses, it would call recoverM and move on+to the next data type's deriving clauses. One unfortunate consequence of+this design is that if A's derived Generic instance failed, its derived+Show instance would be skipped entirely, leading to the "No instance for+(Show A)" error cascade.++The solution to this problem is to push through uses of recoverM to the+level of the individual derived classes in a particular data type's set of+deriving clauses. That is, if you have:++    newtype C = C D+      deriving (E, F, G)++Then instead of processing instances E through M under the scope of a single+recoverM, as in the following pseudocode:++  recoverM (pure Nothing) $ mapM derivePred [E, F, G]++We instead use recoverM in each iteration of the loop:++  mapM (recoverM (pure Nothing) . derivePred) [E, F, G]++And then process each class individually, under its own recoverM scope. That+way, failure to derive one class doesn't cancel out other classes in the+same set of clause-derived classes.+-}++------------------------------------------------------------------+deriveStandalone :: LDerivDecl GhcRn -> TcM (Maybe EarlyDerivSpec)+-- Process a single standalone deriving declaration+--  e.g.   deriving instance Show a => Show (T a)+-- Rather like tcLocalInstDecl+--+-- This returns a Maybe because the user might try to derive Typeable, which is+-- a no-op nowadays.+deriveStandalone (L loc (DerivDecl _ deriv_ty mb_lderiv_strat overlap_mode))+  = setSrcSpan loc                   $+    addErrCtxt (standaloneCtxt deriv_ty)  $+    do { traceTc "Standalone deriving decl for" (ppr deriv_ty)+       ; let ctxt = TcOrigin.InstDeclCtxt True+       ; traceTc "Deriving strategy (standalone deriving)" $+           vcat [ppr mb_lderiv_strat, ppr deriv_ty]+       ; (mb_lderiv_strat, via_tvs) <- tcDerivStrategy mb_lderiv_strat+       ; (cls_tvs, deriv_ctxt, cls, inst_tys)+           <- tcExtendTyVarEnv via_tvs $+              tcStandaloneDerivInstType ctxt deriv_ty+       ; let mb_deriv_strat = fmap unLoc mb_lderiv_strat+             tvs            = via_tvs ++ cls_tvs+         -- See Note [Unify kinds in deriving]+       ; (tvs', deriv_ctxt', inst_tys', mb_deriv_strat') <-+           case mb_deriv_strat of+             -- Perform an additional unification with the kind of the `via`+             -- type and the result of the previous kind unification.+             Just (ViaStrategy via_ty)+                  -- This unification must be performed on the last element of+                  -- inst_tys, but we have not yet checked for this property.+                  -- (This is done later in expectNonNullaryClsArgs). For now,+                  -- simply do nothing if inst_tys is empty, since+                  -- expectNonNullaryClsArgs will error later if this+                  -- is the case.+               |  Just inst_ty <- lastMaybe inst_tys+               -> do+               let via_kind     = tcTypeKind via_ty+                   inst_ty_kind = tcTypeKind inst_ty+                   mb_match     = tcUnifyTy inst_ty_kind via_kind++               checkTc (isJust mb_match)+                       (derivingViaKindErr cls inst_ty_kind+                                           via_ty via_kind)++               let Just kind_subst = mb_match+                   ki_subst_range  = getTCvSubstRangeFVs kind_subst+                   -- See Note [Unification of two kind variables in deriving]+                   unmapped_tkvs = filter (\v -> v `notElemTCvSubst` kind_subst+                                        && not (v `elemVarSet` ki_subst_range))+                                          tvs+                   (subst, _)    = substTyVarBndrs kind_subst unmapped_tkvs+                   (final_deriv_ctxt, final_deriv_ctxt_tys)+                     = case deriv_ctxt of+                         InferContext wc -> (InferContext wc, [])+                         SupplyContext theta ->+                           let final_theta = substTheta subst theta+                           in (SupplyContext final_theta, final_theta)+                   final_inst_tys   = substTys subst inst_tys+                   final_via_ty     = substTy  subst via_ty+                   -- See Note [Floating `via` type variables]+                   final_tvs        = tyCoVarsOfTypesWellScoped $+                                      final_deriv_ctxt_tys ++ final_inst_tys+                                        ++ [final_via_ty]+               pure ( final_tvs, final_deriv_ctxt, final_inst_tys+                    , Just (ViaStrategy final_via_ty) )++             _ -> pure (tvs, deriv_ctxt, inst_tys, mb_deriv_strat)+       ; traceTc "Standalone deriving;" $ vcat+              [ text "tvs':" <+> ppr tvs'+              , text "mb_deriv_strat':" <+> ppr mb_deriv_strat'+              , text "deriv_ctxt':" <+> ppr deriv_ctxt'+              , text "cls:" <+> ppr cls+              , text "inst_tys':" <+> ppr inst_tys' ]+                -- C.f. TcInstDcls.tcLocalInstDecl1++       ; if className cls == typeableClassName+         then do warnUselessTypeable+                 return Nothing+         else Just <$> mkEqnHelp (fmap unLoc overlap_mode)+                                 tvs' cls inst_tys'+                                 deriv_ctxt' mb_deriv_strat' }+deriveStandalone (L _ (XDerivDecl nec)) = noExtCon nec++-- Typecheck the type in a standalone deriving declaration.+--+-- This may appear dense, but it's mostly huffing and puffing to recognize+-- the special case of a type with an extra-constraints wildcard context, e.g.,+--+--   deriving instance _ => Eq (Foo a)+--+-- If there is such a wildcard, we typecheck this as if we had written+-- @deriving instance Eq (Foo a)@, and return @'InferContext' ('Just' loc)@,+-- as the 'DerivContext', where loc is the location of the wildcard used for+-- error reporting. This indicates that we should infer the context as if we+-- were deriving Eq via a deriving clause+-- (see Note [Inferring the instance context] in TcDerivInfer).+--+-- If there is no wildcard, then proceed as normal, and instead return+-- @'SupplyContext' theta@, where theta is the typechecked context.+--+-- Note that this will never return @'InferContext' 'Nothing'@, as that can+-- only happen with @deriving@ clauses.+tcStandaloneDerivInstType+  :: UserTypeCtxt -> LHsSigWcType GhcRn+  -> TcM ([TyVar], DerivContext, Class, [Type])+tcStandaloneDerivInstType ctxt+    (HsWC { hswc_body = deriv_ty@(HsIB { hsib_ext = vars+                                       , hsib_body   = deriv_ty_body })})+  | (tvs, theta, rho) <- splitLHsSigmaTyInvis deriv_ty_body+  , L _ [wc_pred] <- theta+  , L wc_span (HsWildCardTy _) <- ignoreParens wc_pred+  = do dfun_ty <- tcHsClsInstType ctxt $+                  HsIB { hsib_ext = vars+                       , hsib_body+                           = L (getLoc deriv_ty_body) $+                             HsForAllTy { hst_fvf = ForallInvis+                                        , hst_bndrs = tvs+                                        , hst_xforall = noExtField+                                        , hst_body  = rho }}+       let (tvs, _theta, cls, inst_tys) = tcSplitDFunTy dfun_ty+       pure (tvs, InferContext (Just wc_span), cls, inst_tys)+  | otherwise+  = do dfun_ty <- tcHsClsInstType ctxt deriv_ty+       let (tvs, theta, cls, inst_tys) = tcSplitDFunTy dfun_ty+       pure (tvs, SupplyContext theta, cls, inst_tys)++tcStandaloneDerivInstType _ (HsWC _ (XHsImplicitBndrs nec))+  = noExtCon nec+tcStandaloneDerivInstType _ (XHsWildCardBndrs nec)+  = noExtCon nec++warnUselessTypeable :: TcM ()+warnUselessTypeable+  = do { warn <- woptM Opt_WarnDerivingTypeable+       ; when warn $ addWarnTc (Reason Opt_WarnDerivingTypeable)+                   $ text "Deriving" <+> quotes (ppr typeableClassName) <+>+                     text "has no effect: all types now auto-derive Typeable" }++------------------------------------------------------------------+deriveTyData :: TyCon -> [Type] -- LHS of data or data instance+                    -- Can be a data instance, hence [Type] args+                    -- and in that case the TyCon is the /family/ tycon+             -> Maybe (DerivStrategy GhcTc) -- The optional deriving strategy+             -> [TyVar] -- The type variables bound by the derived class+             -> Class   -- The derived class+             -> [Type]  -- The derived class's arguments+             -> Kind    -- The function argument in the derived class's kind.+                        -- (e.g., if `deriving Functor`, this would be+                        -- `Type -> Type` since+                        -- `Functor :: (Type -> Type) -> Constraint`)+             -> TcM EarlyDerivSpec+-- The deriving clause of a data or newtype declaration+-- I.e. not standalone deriving+deriveTyData tc tc_args mb_deriv_strat deriv_tvs cls cls_tys cls_arg_kind+   = do {  -- Given data T a b c = ... deriving( C d ),+           -- we want to drop type variables from T so that (C d (T a)) is well-kinded+          let (arg_kinds, _)  = splitFunTys cls_arg_kind+              n_args_to_drop  = length arg_kinds+              n_args_to_keep  = length tc_args - n_args_to_drop+                                -- See Note [tc_args and tycon arity]+              (tc_args_to_keep, args_to_drop)+                              = splitAt n_args_to_keep tc_args+              inst_ty_kind    = tcTypeKind (mkTyConApp tc tc_args_to_keep)++              -- Match up the kinds, and apply the resulting kind substitution+              -- to the types.  See Note [Unify kinds in deriving]+              -- We are assuming the tycon tyvars and the class tyvars are distinct+              mb_match        = tcUnifyTy inst_ty_kind cls_arg_kind+              enough_args     = n_args_to_keep >= 0++        -- Check that the result really is well-kinded+        ; checkTc (enough_args && isJust mb_match)+                  (derivingKindErr tc cls cls_tys cls_arg_kind enough_args)++        ; let -- Returns a singleton-element list if using ViaStrategy and an+              -- empty list otherwise. Useful for free-variable calculations.+              deriv_strat_tys :: Maybe (DerivStrategy GhcTc) -> [Type]+              deriv_strat_tys = foldMap (foldDerivStrategy [] (:[]))++              propagate_subst kind_subst tkvs' cls_tys' tc_args' mb_deriv_strat'+                = (final_tkvs, final_cls_tys, final_tc_args, final_mb_deriv_strat)+                where+                  ki_subst_range  = getTCvSubstRangeFVs kind_subst+                  -- See Note [Unification of two kind variables in deriving]+                  unmapped_tkvs   = filter (\v -> v `notElemTCvSubst` kind_subst+                                         && not (v `elemVarSet` ki_subst_range))+                                           tkvs'+                  (subst, _)           = substTyVarBndrs kind_subst unmapped_tkvs+                  final_tc_args        = substTys subst tc_args'+                  final_cls_tys        = substTys subst cls_tys'+                  final_mb_deriv_strat = fmap (mapDerivStrategy (substTy subst))+                                              mb_deriv_strat'+                  -- See Note [Floating `via` type variables]+                  final_tkvs           = tyCoVarsOfTypesWellScoped $+                                         final_cls_tys ++ final_tc_args+                                           ++ deriv_strat_tys final_mb_deriv_strat++        ; let tkvs = scopedSort $ fvVarList $+                     unionFV (tyCoFVsOfTypes tc_args_to_keep)+                             (FV.mkFVs deriv_tvs)+              Just kind_subst = mb_match+              (tkvs', cls_tys', tc_args', mb_deriv_strat')+                = propagate_subst kind_subst tkvs cls_tys+                                  tc_args_to_keep mb_deriv_strat++          -- See Note [Unify kinds in deriving]+        ; (final_tkvs, final_cls_tys, final_tc_args, final_mb_deriv_strat) <-+            case mb_deriv_strat' of+              -- Perform an additional unification with the kind of the `via`+              -- type and the result of the previous kind unification.+              Just (ViaStrategy via_ty) -> do+                let via_kind = tcTypeKind via_ty+                    inst_ty_kind+                              = tcTypeKind (mkTyConApp tc tc_args')+                    via_match = tcUnifyTy inst_ty_kind via_kind++                checkTc (isJust via_match)+                        (derivingViaKindErr cls inst_ty_kind via_ty via_kind)++                let Just via_subst = via_match+                pure $ propagate_subst via_subst tkvs' cls_tys'+                                       tc_args' mb_deriv_strat'++              _ -> pure (tkvs', cls_tys', tc_args', mb_deriv_strat')++        ; traceTc "deriveTyData 1" $ vcat+            [ ppr final_mb_deriv_strat, pprTyVars deriv_tvs, ppr tc, ppr tc_args+            , pprTyVars (tyCoVarsOfTypesList tc_args)+            , ppr n_args_to_keep, ppr n_args_to_drop+            , ppr inst_ty_kind, ppr cls_arg_kind, ppr mb_match+            , ppr final_tc_args, ppr final_cls_tys ]++        ; traceTc "deriveTyData 2" $ vcat+            [ ppr final_tkvs ]++        ; let final_tc_app   = mkTyConApp tc final_tc_args+              final_cls_args = final_cls_tys ++ [final_tc_app]+        ; checkTc (allDistinctTyVars (mkVarSet final_tkvs) args_to_drop) -- (a, b, c)+                  (derivingEtaErr cls final_cls_tys final_tc_app)+                -- Check that+                --  (a) The args to drop are all type variables; eg reject:+                --              data instance T a Int = .... deriving( Monad )+                --  (b) The args to drop are all *distinct* type variables; eg reject:+                --              class C (a :: * -> * -> *) where ...+                --              data instance T a a = ... deriving( C )+                --  (c) The type class args, or remaining tycon args,+                --      do not mention any of the dropped type variables+                --              newtype T a s = ... deriving( ST s )+                --              newtype instance K a a = ... deriving( Monad )+                --+                -- It is vital that the implementation of allDistinctTyVars+                -- expand any type synonyms.+                -- See Note [Eta-reducing type synonyms]++        ; checkValidInstHead DerivClauseCtxt cls final_cls_args+                -- Check that we aren't deriving an instance of a magical+                -- type like (~) or Coercible (#14916).++        ; spec <- mkEqnHelp Nothing final_tkvs cls final_cls_args+                            (InferContext Nothing) final_mb_deriv_strat+        ; traceTc "deriveTyData 3" (ppr spec)+        ; return spec }+++{- Note [tc_args and tycon arity]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+You might wonder if we could use (tyConArity tc) at this point, rather+than (length tc_args).  But for data families the two can differ!  The+tc and tc_args passed into 'deriveTyData' come from 'deriveClause' which+in turn gets them from 'tyConFamInstSig_maybe' which in turn gets them+from DataFamInstTyCon:++| DataFamInstTyCon          -- See Note [Data type families]+      (CoAxiom Unbranched)+      TyCon   -- The family TyCon+      [Type]  -- Argument types (mentions the tyConTyVars of this TyCon)+              -- No shorter in length than the tyConTyVars of the family TyCon+              -- How could it be longer? See [Arity of data families] in FamInstEnv++Notice that the arg tys might not be the same as the family tycon arity+(= length tyConTyVars).++Note [Unify kinds in deriving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (#8534)+    data T a b = MkT a deriving( Functor )+    -- where Functor :: (*->*) -> Constraint++So T :: forall k. * -> k -> *.   We want to get+    instance Functor (T * (a:*)) where ...+Notice the '*' argument to T.++Moreover, as well as instantiating T's kind arguments, we may need to instantiate+C's kind args.  Consider (#8865):+  newtype T a b = MkT (Either a b) deriving( Category )+where+  Category :: forall k. (k -> k -> *) -> Constraint+We need to generate the instance+  instance Category * (Either a) where ...+Notice the '*' argument to Category.++So we need to+ * drop arguments from (T a b) to match the number of+   arrows in the (last argument of the) class;+ * and then *unify* kind of the remaining type against the+   expected kind, to figure out how to instantiate C's and T's+   kind arguments.++In the two examples,+ * we unify   kind-of( T k (a:k) ) ~ kind-of( Functor )+         i.e.      (k -> *) ~ (* -> *)   to find k:=*.+         yielding  k:=*++ * we unify   kind-of( Either ) ~ kind-of( Category )+         i.e.      (* -> * -> *)  ~ (k -> k -> k)+         yielding  k:=*++Now we get a kind substitution.  We then need to:++  1. Remove the substituted-out kind variables from the quantified kind vars++  2. Apply the substitution to the kinds of quantified *type* vars+     (and extend the substitution to reflect this change)++  3. Apply that extended substitution to the non-dropped args (types and+     kinds) of the type and class++Forgetting step (2) caused #8893:+  data V a = V [a] deriving Functor+  data P (x::k->*) (a:k) = P (x a) deriving Functor+  data C (x::k->*) (a:k) = C (V (P x a)) deriving Functor++When deriving Functor for P, we unify k to *, but we then want+an instance   $df :: forall (x:*->*). Functor x => Functor (P * (x:*->*))+and similarly for C.  Notice the modified kind of x, both at binding+and occurrence sites.++This can lead to some surprising results when *visible* kind binder is+unified (in contrast to the above examples, in which only non-visible kind+binders were considered). Consider this example from #11732:++    data T k (a :: k) = MkT deriving Functor++Since unification yields k:=*, this results in a generated instance of:++    instance Functor (T *) where ...++which looks odd at first glance, since one might expect the instance head+to be of the form Functor (T k). Indeed, one could envision an alternative+generated instance of:++    instance (k ~ *) => Functor (T k) where++But this does not typecheck by design: kind equalities are not allowed to be+bound in types, only terms. But in essence, the two instance declarations are+entirely equivalent, since even though (T k) matches any kind k, the only+possibly value for k is *, since anything else is ill-typed. As a result, we can+just as comfortably use (T *).++Another way of thinking about is: deriving clauses often infer constraints.+For example:++    data S a = S a deriving Eq++infers an (Eq a) constraint in the derived instance. By analogy, when we+are deriving Functor, we might infer an equality constraint (e.g., k ~ *).+The only distinction is that GHC instantiates equality constraints directly+during the deriving process.++Another quirk of this design choice manifests when typeclasses have visible+kind parameters. Consider this code (also from #11732):++    class Cat k (cat :: k -> k -> *) where+      catId   :: cat a a+      catComp :: cat b c -> cat a b -> cat a c++    instance Cat * (->) where+      catId   = id+      catComp = (.)++    newtype Fun a b = Fun (a -> b) deriving (Cat k)++Even though we requested a derived instance of the form (Cat k Fun), the+kind unification will actually generate (Cat * Fun) (i.e., the same thing as if+the user wrote deriving (Cat *)).++What happens with DerivingVia, when you have yet another type? Consider:++  newtype Foo (a :: Type) = MkFoo (Proxy a)+    deriving Functor via Proxy++As before, we unify the kind of Foo (* -> *) with the kind of the argument to+Functor (* -> *). But that's not enough: the `via` type, Proxy, has the kind+(k -> *), which is more general than what we want. So we must additionally+unify (k -> *) with (* -> *).++Currently, all of this unification is implemented kludgily with the pure+unifier, which is rather tiresome. #14331 lays out a plan for how this+might be made cleaner.++Note [Unification of two kind variables in deriving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As a special case of the Note above, it is possible to derive an instance of+a poly-kinded typeclass for a poly-kinded datatype. For example:++    class Category (cat :: k -> k -> *) where+    newtype T (c :: k -> k -> *) a b = MkT (c a b) deriving Category++This case is suprisingly tricky. To see why, let's write out what instance GHC+will attempt to derive (using -fprint-explicit-kinds syntax):++    instance Category k1 (T k2 c) where ...++GHC will attempt to unify k1 and k2, which produces a substitution (kind_subst)+that looks like [k2 :-> k1]. Importantly, we need to apply this substitution to+the type variable binder for c, since its kind is (k2 -> k2 -> *).++We used to accomplish this by doing the following:++    unmapped_tkvs = filter (`notElemTCvSubst` kind_subst) all_tkvs+    (subst, _)    = substTyVarBndrs kind_subst unmapped_tkvs++Where all_tkvs contains all kind variables in the class and instance types (in+this case, all_tkvs = [k1,k2]). But since kind_subst only has one mapping,+this results in unmapped_tkvs being [k1], and as a consequence, k1 gets mapped+to another kind variable in subst! That is, subst = [k2 :-> k1, k1 :-> k_new].+This is bad, because applying that substitution yields the following instance:++   instance Category k_new (T k1 c) where ...++In other words, keeping k1 in unmapped_tvks taints the substitution, resulting+in an ill-kinded instance (this caused #11837).++To prevent this, we need to filter out any variable from all_tkvs which either++1. Appears in the domain of kind_subst. notElemTCvSubst checks this.+2. Appears in the range of kind_subst. To do this, we compute the free+   variable set of the range of kind_subst with getTCvSubstRangeFVs, and check+   if a kind variable appears in that set.++Note [Eta-reducing type synonyms]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+One can instantiate a type in a data family instance with a type synonym that+mentions other type variables:++  type Const a b = a+  data family Fam (f :: * -> *) (a :: *)+  newtype instance Fam f (Const a f) = Fam (f a) deriving Functor++It is also possible to define kind synonyms, and they can mention other types in+a datatype declaration. For example,++  type Const a b = a+  newtype T f (a :: Const * f) = T (f a) deriving Functor++When deriving, we need to perform eta-reduction analysis to ensure that none of+the eta-reduced type variables are mentioned elsewhere in the declaration. But+we need to be careful, because if we don't expand through the Const type+synonym, we will mistakenly believe that f is an eta-reduced type variable and+fail to derive Functor, even though the code above is correct (see #11416,+where this was first noticed). For this reason, we expand the type synonyms in+the eta-reduced types before doing any analysis.++Note [Floating `via` type variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When generating a derived instance, it will be of the form:++  instance forall ???. C c_args (D d_args) where ...++To fill in ???, GHC computes the free variables of `c_args` and `d_args`.+`DerivingVia` adds an extra wrinkle to this formula, since we must also+include the variables bound by the `via` type when computing the binders+used to fill in ???. This might seem strange, since if a `via` type binds+any type variables, then in almost all scenarios it will appear free in+`c_args` or `d_args`. There are certain corner cases where this does not hold,+however, such as in the following example (adapted from #15831):++  newtype Age = MkAge Int+    deriving Eq via Const Int a++In this example, the `via` type binds the type variable `a`, but `a` appears+nowhere in `Eq Age`. Nevertheless, we include it in the generated instance:++  instance forall a. Eq Age where+    (==) = coerce @(Const Int a -> Const Int a -> Bool)+                  @(Age         -> Age         -> Bool)+                  (==)++The use of `forall a` is certainly required here, since the `a` in+`Const Int a` would not be in scope otherwise. This instance is somewhat+strange in that nothing in the instance head `Eq Age` ever determines what `a`+will be, so any code that uses this instance will invariably instantiate `a`+to be `Any`. We refer to this property of `a` as being a "floating" `via`+type variable. Programs with floating `via` type variables are the only known+class of program in which the `via` type quantifies type variables that aren't+mentioned in the instance head in the generated instance.++Fortunately, the choice to instantiate floating `via` type variables to `Any`+is one that is completely transparent to the user (since the instance will+work as expected regardless of what `a` is instantiated to), so we decide to+permit them. An alternative design would make programs with floating `via`+variables illegal, by requiring that every variable mentioned in the `via` type+is also mentioned in the data header or the derived class. That restriction+would require the user to pick a particular type (the choice does not matter);+for example:++  newtype Age = MkAge Int+    -- deriving Eq via Const Int a  -- Floating 'a'+    deriving Eq via Const Int ()    -- Choose a=()+    deriving Eq via Const Int Any   -- Choose a=Any++No expressiveness would be lost thereby, but stylistically it seems preferable+to allow a type variable to indicate "it doesn't matter".++Note that by quantifying the `a` in `forall a. Eq Age`, we are deferring the+work of instantiating `a` to `Any` at every use site of the instance. An+alternative approach would be to generate an instance that directly defaulted+to `Any`:++  instance Eq Age where+    (==) = coerce @(Const Int Any -> Const Int Any -> Bool)+                  @(Age           -> Age           -> Bool)+                  (==)++We do not implement this approach since it would require a nontrivial amount+of implementation effort to substitute `Any` for the floating `via` type+variables, and since the end result isn't distinguishable from the former+instance (at least from the user's perspective), the amount of engineering+required to obtain the latter instance just isn't worth it.+-}++mkEqnHelp :: Maybe OverlapMode+          -> [TyVar]+          -> Class -> [Type]+          -> DerivContext+               -- SupplyContext => context supplied (standalone deriving)+               -- InferContext  => context inferred (deriving on data decl, or+               --                  standalone deriving decl with a wildcard)+          -> Maybe (DerivStrategy GhcTc)+          -> TcRn EarlyDerivSpec+-- Make the EarlyDerivSpec for an instance+--      forall tvs. theta => cls (tys ++ [ty])+-- where the 'theta' is optional (that's the Maybe part)+-- Assumes that this declaration is well-kinded++mkEqnHelp overlap_mode tvs cls cls_args deriv_ctxt deriv_strat = do+  is_boot <- tcIsHsBootOrSig+  when is_boot $+       bale_out (text "Cannot derive instances in hs-boot files"+             $+$ text "Write an instance declaration instead")+  runReaderT mk_eqn deriv_env+  where+    deriv_env = DerivEnv { denv_overlap_mode = overlap_mode+                         , denv_tvs          = tvs+                         , denv_cls          = cls+                         , denv_inst_tys     = cls_args+                         , denv_ctxt         = deriv_ctxt+                         , denv_strat        = deriv_strat }++    bale_out msg = failWithTc $ derivingThingErr False cls cls_args deriv_strat msg++    mk_eqn :: DerivM EarlyDerivSpec+    mk_eqn = do+      DerivEnv { denv_inst_tys = cls_args+               , denv_strat    = mb_strat } <- ask+      case mb_strat of+        Just StockStrategy -> do+          (cls_tys, inst_ty) <- expectNonNullaryClsArgs cls_args+          dit                <- expectAlgTyConApp cls_tys inst_ty+          mk_eqn_stock dit++        Just AnyclassStrategy -> mk_eqn_anyclass++        Just (ViaStrategy via_ty) -> do+          (cls_tys, inst_ty) <- expectNonNullaryClsArgs cls_args+          mk_eqn_via cls_tys inst_ty via_ty++        Just NewtypeStrategy -> do+          (cls_tys, inst_ty) <- expectNonNullaryClsArgs cls_args+          dit                <- expectAlgTyConApp cls_tys inst_ty+          unless (isNewTyCon (dit_rep_tc dit)) $+            derivingThingFailWith False gndNonNewtypeErr+          mkNewTypeEqn True dit++        Nothing -> mk_eqn_no_strategy++-- @expectNonNullaryClsArgs inst_tys@ checks if @inst_tys@ is non-empty.+-- If so, return @(init inst_tys, last inst_tys)@.+-- Otherwise, throw an error message.+-- See @Note [DerivEnv and DerivSpecMechanism]@ in "TcDerivUtils" for why this+-- property is important.+expectNonNullaryClsArgs :: [Type] -> DerivM ([Type], Type)+expectNonNullaryClsArgs inst_tys =+  maybe (derivingThingFailWith False derivingNullaryErr) pure $+  snocView inst_tys++-- @expectAlgTyConApp cls_tys inst_ty@ checks if @inst_ty@ is an application+-- of an algebraic type constructor. If so, return a 'DerivInstTys' consisting+-- of @cls_tys@ and the constituent pars of @inst_ty@.+-- Otherwise, throw an error message.+-- See @Note [DerivEnv and DerivSpecMechanism]@ in "TcDerivUtils" for why this+-- property is important.+expectAlgTyConApp :: [Type] -- All but the last argument to the class in a+                            -- derived instance+                  -> Type   -- The last argument to the class in a+                            -- derived instance+                  -> DerivM DerivInstTys+expectAlgTyConApp cls_tys inst_ty = do+  fam_envs <- lift tcGetFamInstEnvs+  case mk_deriv_inst_tys_maybe fam_envs cls_tys inst_ty of+    Nothing -> derivingThingFailWith False $+                   text "The last argument of the instance must be a"+               <+> text "data or newtype application"+    Just dit -> do expectNonDataFamTyCon dit+                   pure dit++-- @expectNonDataFamTyCon dit@ checks if @dit_rep_tc dit@ is a representation+-- type constructor for a data family instance, and if not,+-- throws an error message.+-- See @Note [DerivEnv and DerivSpecMechanism]@ in "TcDerivUtils" for why this+-- property is important.+expectNonDataFamTyCon :: DerivInstTys -> DerivM ()+expectNonDataFamTyCon (DerivInstTys { dit_tc      = tc+                                    , dit_tc_args = tc_args+                                    , dit_rep_tc  = rep_tc }) =+  -- If it's still a data family, the lookup failed; i.e no instance exists+  when (isDataFamilyTyCon rep_tc) $+    derivingThingFailWith False $+    text "No family instance for" <+> quotes (pprTypeApp tc tc_args)++mk_deriv_inst_tys_maybe :: FamInstEnvs+                        -> [Type] -> Type -> Maybe DerivInstTys+mk_deriv_inst_tys_maybe fam_envs cls_tys inst_ty =+  fmap lookup $ tcSplitTyConApp_maybe inst_ty+  where+    lookup :: (TyCon, [Type]) -> DerivInstTys+    lookup (tc, tc_args) =+      -- Find the instance of a data family+      -- Note [Looking up family instances for deriving]+      let (rep_tc, rep_tc_args, _co) = tcLookupDataFamInst fam_envs tc tc_args+      in DerivInstTys { dit_cls_tys     = cls_tys+                      , dit_tc          = tc+                      , dit_tc_args     = tc_args+                      , dit_rep_tc      = rep_tc+                      , dit_rep_tc_args = rep_tc_args }++{-+Note [Looking up family instances for deriving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+tcLookupFamInstExact is an auxiliary lookup wrapper which requires+that looked-up family instances exist.  If called with a vanilla+tycon, the old type application is simply returned.++If we have+  data instance F () = ... deriving Eq+  data instance F () = ... deriving Eq+then tcLookupFamInstExact will be confused by the two matches;+but that can't happen because tcInstDecls1 doesn't call tcDeriving+if there are any overlaps.++There are two other things that might go wrong with the lookup.+First, we might see a standalone deriving clause+   deriving Eq (F ())+when there is no data instance F () in scope.++Note that it's OK to have+  data instance F [a] = ...+  deriving Eq (F [(a,b)])+where the match is not exact; the same holds for ordinary data types+with standalone deriving declarations.++Note [Deriving, type families, and partial applications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When there are no type families, it's quite easy:++    newtype S a = MkS [a]+    -- :CoS :: S  ~ []  -- Eta-reduced++    instance Eq [a] => Eq (S a)         -- by coercion sym (Eq (:CoS a)) : Eq [a] ~ Eq (S a)+    instance Monad [] => Monad S        -- by coercion sym (Monad :CoS)  : Monad [] ~ Monad S++When type familes are involved it's trickier:++    data family T a b+    newtype instance T Int a = MkT [a] deriving( Eq, Monad )+    -- :RT is the representation type for (T Int a)+    --  :Co:RT    :: :RT ~ []          -- Eta-reduced!+    --  :CoF:RT a :: T Int a ~ :RT a   -- Also eta-reduced!++    instance Eq [a] => Eq (T Int a)     -- easy by coercion+       -- d1 :: Eq [a]+       -- d2 :: Eq (T Int a) = d1 |> Eq (sym (:Co:RT a ; :coF:RT a))++    instance Monad [] => Monad (T Int)  -- only if we can eta reduce???+       -- d1 :: Monad []+       -- d2 :: Monad (T Int) = d1 |> Monad (sym (:Co:RT ; :coF:RT))++Note the need for the eta-reduced rule axioms.  After all, we can+write it out+    instance Monad [] => Monad (T Int)  -- only if we can eta reduce???+      return x = MkT [x]+      ... etc ...++See Note [Eta reduction for data families] in FamInstEnv++%************************************************************************+%*                                                                      *+                Deriving data types+*                                                                      *+************************************************************************+-}++-- Once the DerivSpecMechanism is known, we can finally produce an+-- EarlyDerivSpec from it.+mk_eqn_from_mechanism :: DerivSpecMechanism -> DerivM EarlyDerivSpec+mk_eqn_from_mechanism mechanism+  = do DerivEnv { denv_overlap_mode = overlap_mode+                , denv_tvs          = tvs+                , denv_cls          = cls+                , denv_inst_tys     = inst_tys+                , denv_ctxt         = deriv_ctxt } <- ask+       doDerivInstErrorChecks1 mechanism+       loc       <- lift getSrcSpanM+       dfun_name <- lift $ newDFunName cls inst_tys loc+       case deriv_ctxt of+        InferContext wildcard ->+          do { (inferred_constraints, tvs', inst_tys')+                 <- inferConstraints mechanism+             ; return $ InferTheta $ DS+                   { ds_loc = loc+                   , ds_name = dfun_name, ds_tvs = tvs'+                   , ds_cls = cls, ds_tys = inst_tys'+                   , ds_theta = inferred_constraints+                   , ds_overlap = overlap_mode+                   , ds_standalone_wildcard = wildcard+                   , ds_mechanism = mechanism } }++        SupplyContext theta ->+            return $ GivenTheta $ DS+                   { ds_loc = loc+                   , ds_name = dfun_name, ds_tvs = tvs+                   , ds_cls = cls, ds_tys = inst_tys+                   , ds_theta = theta+                   , ds_overlap = overlap_mode+                   , ds_standalone_wildcard = Nothing+                   , ds_mechanism = mechanism }++mk_eqn_stock :: DerivInstTys -- Information about the arguments to the class+             -> DerivM EarlyDerivSpec+mk_eqn_stock dit@(DerivInstTys { dit_cls_tys = cls_tys+                               , dit_tc      = tc+                               , dit_rep_tc  = rep_tc })+  = do DerivEnv { denv_cls  = cls+                , denv_ctxt = deriv_ctxt } <- ask+       dflags <- getDynFlags+       case checkOriginativeSideConditions dflags deriv_ctxt cls cls_tys+                                           tc rep_tc of+         CanDeriveStock gen_fn -> mk_eqn_from_mechanism $+                                  DerivSpecStock { dsm_stock_dit    = dit+                                                 , dsm_stock_gen_fn = gen_fn }+         StockClassError msg   -> derivingThingFailWith False msg+         _                     -> derivingThingFailWith False (nonStdErr cls)++mk_eqn_anyclass :: DerivM EarlyDerivSpec+mk_eqn_anyclass+  = do dflags <- getDynFlags+       case canDeriveAnyClass dflags of+         IsValid      -> mk_eqn_from_mechanism DerivSpecAnyClass+         NotValid msg -> derivingThingFailWith False msg++mk_eqn_newtype :: DerivInstTys -- Information about the arguments to the class+               -> Type         -- The newtype's representation type+               -> DerivM EarlyDerivSpec+mk_eqn_newtype dit rep_ty =+  mk_eqn_from_mechanism $ DerivSpecNewtype { dsm_newtype_dit    = dit+                                           , dsm_newtype_rep_ty = rep_ty }++mk_eqn_via :: [Type] -- All arguments to the class besides the last+           -> Type   -- The last argument to the class+           -> Type   -- The @via@ type+           -> DerivM EarlyDerivSpec+mk_eqn_via cls_tys inst_ty via_ty =+  mk_eqn_from_mechanism $ DerivSpecVia { dsm_via_cls_tys = cls_tys+                                       , dsm_via_inst_ty = inst_ty+                                       , dsm_via_ty      = via_ty }++-- Derive an instance without a user-requested deriving strategy. This uses+-- heuristics to determine which deriving strategy to use.+-- See Note [Deriving strategies].+mk_eqn_no_strategy :: DerivM EarlyDerivSpec+mk_eqn_no_strategy = do+  DerivEnv { denv_cls      = cls+           , denv_inst_tys = cls_args } <- ask+  fam_envs <- lift tcGetFamInstEnvs++  -- First, check if the last argument is an application of a type constructor.+  -- If not, fall back to DeriveAnyClass.+  if |  Just (cls_tys, inst_ty) <- snocView cls_args+     ,  Just dit <- mk_deriv_inst_tys_maybe fam_envs cls_tys inst_ty+     -> if |  isNewTyCon (dit_rep_tc dit)+              -- We have a dedicated code path for newtypes (see the+              -- documentation for mkNewTypeEqn as to why this is the case)+           -> mkNewTypeEqn False dit++           |  otherwise+           -> do -- Otherwise, our only other options are stock or anyclass.+                 -- If it is stock, we must confirm that the last argument's+                 -- type constructor is algebraic.+                 -- See Note [DerivEnv and DerivSpecMechanism] in TcDerivUtils+                 whenIsJust (hasStockDeriving cls) $ \_ ->+                   expectNonDataFamTyCon dit+                 mk_eqn_originative dit++     |  otherwise+     -> mk_eqn_anyclass+  where+    -- Use heuristics (checkOriginativeSideConditions) to determine whether+    -- stock or anyclass deriving should be used.+    mk_eqn_originative :: DerivInstTys -> DerivM EarlyDerivSpec+    mk_eqn_originative dit@(DerivInstTys { dit_cls_tys = cls_tys+                                         , dit_tc      = tc+                                         , dit_rep_tc  = rep_tc }) = do+      DerivEnv { denv_cls  = cls+               , denv_ctxt = deriv_ctxt } <- ask+      dflags <- getDynFlags++      -- See Note [Deriving instances for classes themselves]+      let dac_error msg+            | isClassTyCon rep_tc+            = quotes (ppr tc) <+> text "is a type class,"+                              <+> text "and can only have a derived instance"+                              $+$ text "if DeriveAnyClass is enabled"+            | otherwise+            = nonStdErr cls $$ msg++      case checkOriginativeSideConditions dflags deriv_ctxt cls+             cls_tys tc rep_tc of+        NonDerivableClass   msg -> derivingThingFailWith False (dac_error msg)+        StockClassError msg     -> derivingThingFailWith False msg+        CanDeriveStock gen_fn   -> mk_eqn_from_mechanism $+                                   DerivSpecStock { dsm_stock_dit    = dit+                                                  , dsm_stock_gen_fn = gen_fn }+        CanDeriveAnyClass       -> mk_eqn_from_mechanism DerivSpecAnyClass++{-+************************************************************************+*                                                                      *+            Deriving instances for newtypes+*                                                                      *+************************************************************************+-}++-- Derive an instance for a newtype. We put this logic into its own function+-- because+--+-- (a) When no explicit deriving strategy is requested, we have special+--     heuristics for newtypes to determine which deriving strategy should+--     actually be used. See Note [Deriving strategies].+-- (b) We make an effort to give error messages specifically tailored to+--     newtypes.+mkNewTypeEqn :: Bool -- Was this instance derived using an explicit @newtype@+                     -- deriving strategy?+             -> DerivInstTys -> DerivM EarlyDerivSpec+mkNewTypeEqn newtype_strat dit@(DerivInstTys { dit_cls_tys     = cls_tys+                                             , dit_tc          = tycon+                                             , dit_rep_tc      = rep_tycon+                                             , dit_rep_tc_args = rep_tc_args })+-- Want: instance (...) => cls (cls_tys ++ [tycon tc_args]) where ...+  = do DerivEnv { denv_cls   = cls+                , denv_ctxt  = deriv_ctxt } <- ask+       dflags <- getDynFlags++       let newtype_deriving  = xopt LangExt.GeneralizedNewtypeDeriving dflags+           deriveAnyClass    = xopt LangExt.DeriveAnyClass             dflags++           bale_out = derivingThingFailWith newtype_deriving++           non_std     = nonStdErr cls+           suggest_gnd = text "Try GeneralizedNewtypeDeriving for GHC's"+                     <+> text "newtype-deriving extension"++           -- Here is the plan for newtype derivings.  We see+           --        newtype T a1...an = MkT (t ak+1...an)+           --          deriving (.., C s1 .. sm, ...)+           -- where t is a type,+           --       ak+1...an is a suffix of a1..an, and are all tyvars+           --       ak+1...an do not occur free in t, nor in the s1..sm+           --       (C s1 ... sm) is a  *partial applications* of class C+           --                      with the last parameter missing+           --       (T a1 .. ak) matches the kind of C's last argument+           --              (and hence so does t)+           -- The latter kind-check has been done by deriveTyData already,+           -- and tc_args are already trimmed+           --+           -- We generate the instance+           --       instance forall ({a1..ak} u fvs(s1..sm)).+           --                C s1 .. sm t => C s1 .. sm (T a1...ak)+           -- where T a1...ap is the partial application of+           --       the LHS of the correct kind and p >= k+           --+           --      NB: the variables below are:+           --              tc_tvs = [a1, ..., an]+           --              tyvars_to_keep = [a1, ..., ak]+           --              rep_ty = t ak .. an+           --              deriv_tvs = fvs(s1..sm) \ tc_tvs+           --              tys = [s1, ..., sm]+           --              rep_fn' = t+           --+           -- Running example: newtype T s a = MkT (ST s a) deriving( Monad )+           -- We generate the instance+           --      instance Monad (ST s) => Monad (T s) where++           nt_eta_arity = newTyConEtadArity rep_tycon+                   -- For newtype T a b = MkT (S a a b), the TyCon+                   -- machinery already eta-reduces the representation type, so+                   -- we know that+                   --      T a ~ S a a+                   -- That's convenient here, because we may have to apply+                   -- it to fewer than its original complement of arguments++           -- Note [Newtype representation]+           -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+           -- Need newTyConRhs (*not* a recursive representation finder)+           -- to get the representation type. For example+           --      newtype B = MkB Int+           --      newtype A = MkA B deriving( Num )+           -- We want the Num instance of B, *not* the Num instance of Int,+           -- when making the Num instance of A!+           rep_inst_ty = newTyConInstRhs rep_tycon rep_tc_args++           -------------------------------------------------------------------+           --  Figuring out whether we can only do this newtype-deriving thing++           -- See Note [Determining whether newtype-deriving is appropriate]+           might_be_newtype_derivable+              =  not (non_coercible_class cls)+              && eta_ok+--            && not (isRecursiveTyCon tycon)      -- Note [Recursive newtypes]++           -- Check that eta reduction is OK+           eta_ok = rep_tc_args `lengthAtLeast` nt_eta_arity+             -- The newtype can be eta-reduced to match the number+             --     of type argument actually supplied+             --        newtype T a b = MkT (S [a] b) deriving( Monad )+             --     Here the 'b' must be the same in the rep type (S [a] b)+             --     And the [a] must not mention 'b'.  That's all handled+             --     by nt_eta_rity.++           cant_derive_err = ppUnless eta_ok  eta_msg+           eta_msg = text "cannot eta-reduce the representation type enough"++       MASSERT( cls_tys `lengthIs` (classArity cls - 1) )+       if newtype_strat+       then+           -- Since the user explicitly asked for GeneralizedNewtypeDeriving,+           -- we don't need to perform all of the checks we normally would,+           -- such as if the class being derived is known to produce ill-roled+           -- coercions (e.g., Traversable), since we can just derive the+           -- instance and let it error if need be.+           -- See Note [Determining whether newtype-deriving is appropriate]+           if eta_ok && newtype_deriving+             then mk_eqn_newtype dit rep_inst_ty+             else bale_out (cant_derive_err $$+                            if newtype_deriving then empty else suggest_gnd)+       else+         if might_be_newtype_derivable+             && ((newtype_deriving && not deriveAnyClass)+                  || std_class_via_coercible cls)+         then mk_eqn_newtype dit rep_inst_ty+         else case checkOriginativeSideConditions dflags deriv_ctxt cls cls_tys+                                                 tycon rep_tycon of+               StockClassError msg+                 -- There's a particular corner case where+                 --+                 -- 1. -XGeneralizedNewtypeDeriving and -XDeriveAnyClass are+                 --    both enabled at the same time+                 -- 2. We're deriving a particular stock derivable class+                 --    (such as Functor)+                 --+                 -- and the previous cases won't catch it. This fixes the bug+                 -- reported in #10598.+                 | might_be_newtype_derivable && newtype_deriving+                -> mk_eqn_newtype dit rep_inst_ty+                 -- Otherwise, throw an error for a stock class+                 | might_be_newtype_derivable && not newtype_deriving+                -> bale_out (msg $$ suggest_gnd)+                 | otherwise+                -> bale_out msg++               -- Must use newtype deriving or DeriveAnyClass+               NonDerivableClass _msg+                 -- Too hard, even with newtype deriving+                 | newtype_deriving           -> bale_out cant_derive_err+                 -- Try newtype deriving!+                 -- Here we suggest GeneralizedNewtypeDeriving even in cases+                 -- where it may not be applicable. See #9600.+                 | otherwise                  -> bale_out (non_std $$ suggest_gnd)++               -- DeriveAnyClass+               CanDeriveAnyClass -> do+                 -- If both DeriveAnyClass and GeneralizedNewtypeDeriving are+                 -- enabled, we take the diplomatic approach of defaulting to+                 -- DeriveAnyClass, but emitting a warning about the choice.+                 -- See Note [Deriving strategies]+                 when (newtype_deriving && deriveAnyClass) $+                   lift $ whenWOptM Opt_WarnDerivingDefaults $+                     addWarnTc (Reason Opt_WarnDerivingDefaults) $ sep+                     [ text "Both DeriveAnyClass and"+                       <+> text "GeneralizedNewtypeDeriving are enabled"+                     , text "Defaulting to the DeriveAnyClass strategy"+                       <+> text "for instantiating" <+> ppr cls+                     , text "Use DerivingStrategies to pick"+                       <+> text "a different strategy"+                      ]+                 mk_eqn_from_mechanism DerivSpecAnyClass+               -- CanDeriveStock+               CanDeriveStock gen_fn -> mk_eqn_from_mechanism $+                                        DerivSpecStock { dsm_stock_dit    = dit+                                                       , dsm_stock_gen_fn = gen_fn }++{-+Note [Recursive newtypes]+~~~~~~~~~~~~~~~~~~~~~~~~~+Newtype deriving works fine, even if the newtype is recursive.+e.g.    newtype S1 = S1 [T1 ()]+        newtype T1 a = T1 (StateT S1 IO a ) deriving( Monad )+Remember, too, that type families are currently (conservatively) given+a recursive flag, so this also allows newtype deriving to work+for type famillies.++We used to exclude recursive types, because we had a rather simple+minded way of generating the instance decl:+   newtype A = MkA [A]+   instance Eq [A] => Eq A      -- Makes typechecker loop!+But now we require a simple context, so it's ok.++Note [Determining whether newtype-deriving is appropriate]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we see+  newtype NT = MkNT Foo+    deriving C+we have to decide how to perform the deriving. Do we do newtype deriving,+or do we do normal deriving? In general, we prefer to do newtype deriving+wherever possible. So, we try newtype deriving unless there's a glaring+reason not to.++"Glaring reasons not to" include trying to derive a class for which a+coercion-based instance doesn't make sense. These classes are listed in+the definition of non_coercible_class. They include Show (since it must+show the name of the datatype) and Traversable (since a coercion-based+Traversable instance is ill-roled).++However, non_coercible_class is ignored if the user explicitly requests+to derive an instance with GeneralizedNewtypeDeriving using the newtype+deriving strategy. In such a scenario, GHC will unquestioningly try to+derive the instance via coercions (even if the final generated code is+ill-roled!). See Note [Deriving strategies].++Note that newtype deriving might fail, even after we commit to it. This+is because the derived instance uses `coerce`, which must satisfy its+`Coercible` constraint. This is different than other deriving scenarios,+where we're sure that the resulting instance will type-check.++Note [GND and associated type families]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It's possible to use GeneralizedNewtypeDeriving (GND) to derive instances for+classes with associated type families. A general recipe is:++    class C x y z where+      type T y z x+      op :: x -> [y] -> z++    newtype N a = MkN <rep-type> deriving( C )++    =====>++    instance C x y <rep-type> => C x y (N a) where+      type T y (N a) x = T y <rep-type> x+      op = coerce (op :: x -> [y] -> <rep-type>)++However, we must watch out for three things:++(a) The class must not contain any data families. If it did, we'd have to+    generate a fresh data constructor name for the derived data family+    instance, and it's not clear how to do this.++(b) Each associated type family's type variables must mention the last type+    variable of the class. As an example, you wouldn't be able to use GND to+    derive an instance of this class:++      class C a b where+        type T a++    But you would be able to derive an instance of this class:++      class C a b where+        type T b++    The difference is that in the latter T mentions the last parameter of C+    (i.e., it mentions b), but the former T does not. If you tried, e.g.,++      newtype Foo x = Foo x deriving (C a)++    with the former definition of C, you'd end up with something like this:++      instance C a (Foo x) where+        type T a = T ???++    This T family instance doesn't mention the newtype (or its representation+    type) at all, so we disallow such constructions with GND.++(c) UndecidableInstances might need to be enabled. Here's a case where it is+    most definitely necessary:++      class C a where+        type T a+      newtype Loop = Loop MkLoop deriving C++      =====>++      instance C Loop where+        type T Loop = T Loop++    Obviously, T Loop would send the typechecker into a loop. Unfortunately,+    you might even need UndecidableInstances even in cases where the+    typechecker would be guaranteed to terminate. For example:++      instance C Int where+        type C Int = Int+      newtype MyInt = MyInt Int deriving C++      =====>++      instance C MyInt where+        type T MyInt = T Int++    GHC's termination checker isn't sophisticated enough to conclude that the+    definition of T MyInt terminates, so UndecidableInstances is required.++(d) For the time being, we do not allow the last type variable of the class to+    appear in a /kind/ of an associated type family definition. For instance:++    class C a where+      type T1 a        -- OK+      type T2 (x :: a) -- Illegal: a appears in the kind of x+      type T3 y :: a   -- Illegal: a appears in the kind of (T3 y)++    The reason we disallow this is because our current approach to deriving+    associated type family instances—i.e., by unwrapping the newtype's type+    constructor as shown above—is ill-equipped to handle the scenario when+    the last type variable appears as an implicit argument. In the worst case,+    allowing the last variable to appear in a kind can result in improper Core+    being generated (see #14728).++    There is hope for this feature being added some day, as one could+    conceivably take a newtype axiom (which witnesses a coercion between a+    newtype and its representation type) at lift that through each associated+    type at the Core level. See #14728, comment:3 for a sketch of how this+    might work. Until then, we disallow this featurette wholesale.++The same criteria apply to DerivingVia.++************************************************************************+*                                                                      *+\subsection[TcDeriv-normal-binds]{Bindings for the various classes}+*                                                                      *+************************************************************************++After all the trouble to figure out the required context for the+derived instance declarations, all that's left is to chug along to+produce them.  They will then be shoved into @tcInstDecls2@, which+will do all its usual business.++There are lots of possibilities for code to generate.  Here are+various general remarks.++PRINCIPLES:+\begin{itemize}+\item+We want derived instances of @Eq@ and @Ord@ (both v common) to be+``you-couldn't-do-better-by-hand'' efficient.++\item+Deriving @Show@---also pretty common--- should also be reasonable good code.++\item+Deriving for the other classes isn't that common or that big a deal.+\end{itemize}++PRAGMATICS:++\begin{itemize}+\item+Deriving @Ord@ is done mostly with the 1.3 @compare@ method.++\item+Deriving @Eq@ also uses @compare@, if we're deriving @Ord@, too.++\item+We {\em normally} generate code only for the non-defaulted methods;+there are some exceptions for @Eq@ and (especially) @Ord@...++\item+Sometimes we use a @_con2tag_<tycon>@ function, which returns a data+constructor's numeric (@Int#@) tag.  These are generated by+@gen_tag_n_con_binds@, and the heuristic for deciding if one of+these is around is given by @hasCon2TagFun@.++The examples under the different sections below will make this+clearer.++\item+Much less often (really just for deriving @Ix@), we use a+@_tag2con_<tycon>@ function.  See the examples.++\item+We use the renamer!!!  Reason: we're supposed to be+producing @LHsBinds Name@ for the methods, but that means+producing correctly-uniquified code on the fly.  This is entirely+possible (the @TcM@ monad has a @UniqueSupply@), but it is painful.+So, instead, we produce @MonoBinds RdrName@ then heave 'em through+the renamer.  What a great hack!+\end{itemize}+-}++-- Generate the InstInfo for the required instance+-- plus any auxiliary bindings required+genInst :: DerivSpec theta+        -> TcM (ThetaType -> TcM (InstInfo GhcPs), BagDerivStuff, [Name])+-- We must use continuation-returning style here to get the order in which we+-- typecheck family instances and derived instances right.+-- See Note [Staging of tcDeriving]+genInst spec@(DS { ds_tvs = tvs, ds_mechanism = mechanism+                 , ds_tys = tys, ds_cls = clas, ds_loc = loc+                 , ds_standalone_wildcard = wildcard })+  = do (meth_binds, deriv_stuff, unusedNames)+         <- set_span_and_ctxt $+            genDerivStuff mechanism loc clas tys tvs+       let mk_inst_info theta = set_span_and_ctxt $ do+             inst_spec <- newDerivClsInst theta spec+             doDerivInstErrorChecks2 clas inst_spec theta wildcard mechanism+             traceTc "newder" (ppr inst_spec)+             return $ InstInfo+                       { iSpec   = inst_spec+                       , iBinds  = InstBindings+                                     { ib_binds = meth_binds+                                     , ib_tyvars = map Var.varName tvs+                                     , ib_pragmas = []+                                     , ib_extensions = extensions+                                     , ib_derived = True } }+       return (mk_inst_info, deriv_stuff, unusedNames)+  where+    extensions :: [LangExt.Extension]+    extensions+      | isDerivSpecNewtype mechanism || isDerivSpecVia mechanism+        -- Both these flags are needed for higher-rank uses of coerce+        -- See Note [Newtype-deriving instances] in TcGenDeriv+      = [LangExt.ImpredicativeTypes, LangExt.RankNTypes]+      | otherwise+      = []++    set_span_and_ctxt :: TcM a -> TcM a+    set_span_and_ctxt = setSrcSpan loc . addErrCtxt (instDeclCtxt3 clas tys)++-- Checks:+--+-- * All of the data constructors for a data type are in scope for a+--   standalone-derived instance (for `stock` and `newtype` deriving).+--+-- * All of the associated type families of a class are suitable for+--   GeneralizedNewtypeDeriving or DerivingVia (for `newtype` and `via`+--   deriving).+doDerivInstErrorChecks1 :: DerivSpecMechanism -> DerivM ()+doDerivInstErrorChecks1 mechanism =+  case mechanism of+    DerivSpecStock{dsm_stock_dit = dit}+      -> data_cons_in_scope_check dit+    DerivSpecNewtype{dsm_newtype_dit = dit}+      -> do atf_coerce_based_error_checks+            data_cons_in_scope_check dit+    DerivSpecAnyClass{}+      -> pure ()+    DerivSpecVia{}+      -> atf_coerce_based_error_checks+  where+    -- When processing a standalone deriving declaration, check that all of the+    -- constructors for the data type are in scope. For instance:+    --+    --   import M (T)+    --   deriving stock instance Eq T+    --+    -- This should be rejected, as the derived Eq instance would need to refer+    -- to the constructors for T, which are not in scope.+    --+    -- Note that the only strategies that require this check are `stock` and+    -- `newtype`. Neither `anyclass` nor `via` require it as the code that they+    -- generate does not require using data constructors.+    data_cons_in_scope_check :: DerivInstTys -> DerivM ()+    data_cons_in_scope_check (DerivInstTys { dit_tc     = tc+                                           , dit_rep_tc = rep_tc }) = do+      standalone <- isStandaloneDeriv+      when standalone $ do+        let bale_out msg = do err <- derivingThingErrMechanism mechanism msg+                              lift $ failWithTc err++        rdr_env <- lift getGlobalRdrEnv+        let data_con_names = map dataConName (tyConDataCons rep_tc)+            hidden_data_cons = not (isWiredInName (tyConName rep_tc)) &&+                               (isAbstractTyCon rep_tc ||+                                any not_in_scope data_con_names)+            not_in_scope dc  = isNothing (lookupGRE_Name rdr_env dc)++        -- Make sure to also mark the data constructors as used so that GHC won't+        -- mistakenly emit -Wunused-imports warnings about them.+        lift $ addUsedDataCons rdr_env rep_tc++        unless (not hidden_data_cons) $+          bale_out $ derivingHiddenErr tc++    -- Ensure that a class's associated type variables are suitable for+    -- GeneralizedNewtypeDeriving or DerivingVia. Unsurprisingly, this check is+    -- only required for the `newtype` and `via` strategies.+    --+    -- See Note [GND and associated type families]+    atf_coerce_based_error_checks :: DerivM ()+    atf_coerce_based_error_checks = do+      cls <- asks denv_cls+      let bale_out msg = do err <- derivingThingErrMechanism mechanism msg+                            lift $ failWithTc err++          cls_tyvars = classTyVars cls++          ats_look_sensible+             =  -- Check (a) from Note [GND and associated type families]+                no_adfs+                -- Check (b) from Note [GND and associated type families]+             && isNothing at_without_last_cls_tv+                -- Check (d) from Note [GND and associated type families]+             && isNothing at_last_cls_tv_in_kinds++          (adf_tcs, atf_tcs) = partition isDataFamilyTyCon at_tcs+          no_adfs            = null adf_tcs+                 -- We cannot newtype-derive data family instances++          at_without_last_cls_tv+            = find (\tc -> last_cls_tv `notElem` tyConTyVars tc) atf_tcs+          at_last_cls_tv_in_kinds+            = find (\tc -> any (at_last_cls_tv_in_kind . tyVarKind)+                               (tyConTyVars tc)+                        || at_last_cls_tv_in_kind (tyConResKind tc)) atf_tcs+          at_last_cls_tv_in_kind kind+            = last_cls_tv `elemVarSet` exactTyCoVarsOfType kind+          at_tcs = classATs cls+          last_cls_tv = ASSERT( notNull cls_tyvars )+                        last cls_tyvars++          cant_derive_err+             = vcat [ ppUnless no_adfs adfs_msg+                    , maybe empty at_without_last_cls_tv_msg+                            at_without_last_cls_tv+                    , maybe empty at_last_cls_tv_in_kinds_msg+                            at_last_cls_tv_in_kinds+                    ]+          adfs_msg  = text "the class has associated data types"+          at_without_last_cls_tv_msg at_tc = hang+            (text "the associated type" <+> quotes (ppr at_tc)+             <+> text "is not parameterized over the last type variable")+            2 (text "of the class" <+> quotes (ppr cls))+          at_last_cls_tv_in_kinds_msg at_tc = hang+            (text "the associated type" <+> quotes (ppr at_tc)+             <+> text "contains the last type variable")+           2 (text "of the class" <+> quotes (ppr cls)+             <+> text "in a kind, which is not (yet) allowed")+      unless ats_look_sensible $ bale_out cant_derive_err++doDerivInstErrorChecks2 :: Class -> ClsInst -> ThetaType -> Maybe SrcSpan+                        -> DerivSpecMechanism -> TcM ()+doDerivInstErrorChecks2 clas clas_inst theta wildcard mechanism+  = do { traceTc "doDerivInstErrorChecks2" (ppr clas_inst)+       ; dflags <- getDynFlags+       ; xpartial_sigs <- xoptM LangExt.PartialTypeSignatures+       ; wpartial_sigs <- woptM Opt_WarnPartialTypeSignatures++         -- Error if PartialTypeSignatures isn't enabled when a user tries+         -- to write @deriving instance _ => Eq (Foo a)@. Or, if that+         -- extension is enabled, give a warning if -Wpartial-type-signatures+         -- is enabled.+       ; case wildcard of+           Nothing -> pure ()+           Just span -> setSrcSpan span $ do+             checkTc xpartial_sigs (hang partial_sig_msg 2 pts_suggestion)+             warnTc (Reason Opt_WarnPartialTypeSignatures)+                    wpartial_sigs partial_sig_msg++         -- Check for Generic instances that are derived with an exotic+         -- deriving strategy like DAC+         -- See Note [Deriving strategies]+       ; when (exotic_mechanism && className clas `elem` genericClassNames) $+         do { failIfTc (safeLanguageOn dflags) gen_inst_err+            ; when (safeInferOn dflags) (recordUnsafeInfer emptyBag) } }+  where+    exotic_mechanism = not $ isDerivSpecStock mechanism++    partial_sig_msg = text "Found type wildcard" <+> quotes (char '_')+                  <+> text "standing for" <+> quotes (pprTheta theta)++    pts_suggestion+      = text "To use the inferred type, enable PartialTypeSignatures"++    gen_inst_err = text "Generic instances can only be derived in"+               <+> text "Safe Haskell using the stock strategy."++derivingThingFailWith :: Bool -- If True, add a snippet about how not even+                              -- GeneralizedNewtypeDeriving would make this+                              -- declaration work. This only kicks in when+                              -- an explicit deriving strategy is not given.+                      -> SDoc -- The error message+                      -> DerivM a+derivingThingFailWith newtype_deriving msg = do+  err <- derivingThingErrM newtype_deriving msg+  lift $ failWithTc err++genDerivStuff :: DerivSpecMechanism -> SrcSpan -> Class+              -> [Type] -> [TyVar]+              -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name])+genDerivStuff mechanism loc clas inst_tys tyvars+  = case mechanism of+      -- See Note [Bindings for Generalised Newtype Deriving]+      DerivSpecNewtype { dsm_newtype_rep_ty = rhs_ty}+        -> gen_newtype_or_via rhs_ty++      -- Try a stock deriver+      DerivSpecStock { dsm_stock_dit    = DerivInstTys{dit_rep_tc = rep_tc}+                     , dsm_stock_gen_fn = gen_fn }+        -> gen_fn loc rep_tc inst_tys++      -- Try DeriveAnyClass+      DerivSpecAnyClass -> do+        let mini_env   = mkVarEnv (classTyVars clas `zip` inst_tys)+            mini_subst = mkTvSubst (mkInScopeSet (mkVarSet tyvars)) mini_env+        dflags <- getDynFlags+        tyfam_insts <-+          -- canDeriveAnyClass should ensure that this code can't be reached+          -- unless -XDeriveAnyClass is enabled.+          ASSERT2( isValid (canDeriveAnyClass dflags)+                 , ppr "genDerivStuff: bad derived class" <+> ppr clas )+          mapM (tcATDefault loc mini_subst emptyNameSet)+               (classATItems clas)+        return ( emptyBag -- No method bindings are needed...+               , listToBag (map DerivFamInst (concat tyfam_insts))+               -- ...but we may need to generate binding for associated type+               -- family default instances.+               -- See Note [DeriveAnyClass and default family instances]+               , [] )++      -- Try DerivingVia+      DerivSpecVia{dsm_via_ty = via_ty}+        -> gen_newtype_or_via via_ty+  where+    gen_newtype_or_via ty = do+      (binds, faminsts) <- gen_Newtype_binds loc clas tyvars inst_tys ty+      return (binds, faminsts, [])++{-+Note [Bindings for Generalised Newtype Deriving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  class Eq a => C a where+     f :: a -> a+  newtype N a = MkN [a] deriving( C )+  instance Eq (N a) where ...++The 'deriving C' clause generates, in effect+  instance (C [a], Eq a) => C (N a) where+     f = coerce (f :: [a] -> [a])++This generates a cast for each method, but allows the superclasse to+be worked out in the usual way.  In this case the superclass (Eq (N+a)) will be solved by the explicit Eq (N a) instance.  We do *not*+create the superclasses by casting the superclass dictionaries for the+representation type.++See the paper "Safe zero-cost coercions for Haskell".++Note [DeriveAnyClass and default family instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++When a class has a associated type family with a default instance, e.g.:++  class C a where+    type T a+    type T a = Char++then there are a couple of scenarios in which a user would expect T a to+default to Char. One is when an instance declaration for C is given without+an implementation for T:++  instance C Int++Another scenario in which this can occur is when the -XDeriveAnyClass extension+is used:++  data Example = Example deriving (C, Generic)++In the latter case, we must take care to check if C has any associated type+families with default instances, because -XDeriveAnyClass will never provide+an implementation for them. We "fill in" the default instances using the+tcATDefault function from TcClassDcl (which is also used in TcInstDcls to+handle the empty instance declaration case).++Note [Deriving strategies]+~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC has a notion of deriving strategies, which allow the user to explicitly+request which approach to use when deriving an instance (enabled with the+-XDerivingStrategies language extension). For more information, refer to the+original issue (#10598) or the associated wiki page:+https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/deriving-strategies++A deriving strategy can be specified in a deriving clause:++    newtype Foo = MkFoo Bar+      deriving newtype C++Or in a standalone deriving declaration:++    deriving anyclass instance C Foo++-XDerivingStrategies also allows the use of multiple deriving clauses per data+declaration so that a user can derive some instance with one deriving strategy+and other instances with another deriving strategy. For example:++    newtype Baz = Baz Quux+      deriving          (Eq, Ord)+      deriving stock    (Read, Show)+      deriving newtype  (Num, Floating)+      deriving anyclass C++Currently, the deriving strategies are:++* stock: Have GHC implement a "standard" instance for a data type, if possible+  (e.g., Eq, Ord, Generic, Data, Functor, etc.)++* anyclass: Use -XDeriveAnyClass++* newtype: Use -XGeneralizedNewtypeDeriving++* via: Use -XDerivingVia++The latter two strategies (newtype and via) are referred to as the+"coerce-based" strategies, since they generate code that relies on the `coerce`+function. See, for instance, TcDerivInfer.inferConstraintsCoerceBased.++The former two strategies (stock and anyclass), in contrast, are+referred to as the "originative" strategies, since they create "original"+instances instead of "reusing" old instances (by way of `coerce`).+See, for instance, TcDerivUtils.checkOriginativeSideConditions.++If an explicit deriving strategy is not given, GHC has an algorithm it uses to+determine which strategy it will actually use. The algorithm is quite long,+so it lives in the Haskell wiki at+https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/deriving-strategies+("The deriving strategy resolution algorithm" section).++Internally, GHC uses the DerivStrategy datatype to denote a user-requested+deriving strategy, and it uses the DerivSpecMechanism datatype to denote what+GHC will use to derive the instance after taking the above steps. In other+words, GHC will always settle on a DerivSpecMechnism, even if the user did not+ask for a particular DerivStrategy (using the algorithm linked to above).++Note [Deriving instances for classes themselves]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Much of the code in TcDeriv assumes that deriving only works on data types.+But this assumption doesn't hold true for DeriveAnyClass, since it's perfectly+reasonable to do something like this:++  {-# LANGUAGE DeriveAnyClass #-}+  class C1 (a :: Constraint) where+  class C2 where+  deriving instance C1 C2+    -- This is equivalent to `instance C1 C2`++If DeriveAnyClass isn't enabled in the code above (i.e., it defaults to stock+deriving), we throw a special error message indicating that DeriveAnyClass is+the only way to go. We don't bother throwing this error if an explicit 'stock'+or 'newtype' keyword is used, since both options have their own perfectly+sensible error messages in the case of the above code (as C1 isn't a stock+derivable class, and C2 isn't a newtype).++************************************************************************+*                                                                      *+\subsection[TcDeriv-taggery-Names]{What con2tag/tag2con functions are available?}+*                                                                      *+************************************************************************+-}++nonUnaryErr :: LHsSigType GhcRn -> SDoc+nonUnaryErr ct = quotes (ppr ct)+  <+> text "is not a unary constraint, as expected by a deriving clause"++nonStdErr :: Class -> SDoc+nonStdErr cls =+      quotes (ppr cls)+  <+> text "is not a stock derivable class (Eq, Show, etc.)"++gndNonNewtypeErr :: SDoc+gndNonNewtypeErr =+  text "GeneralizedNewtypeDeriving cannot be used on non-newtypes"++derivingNullaryErr :: MsgDoc+derivingNullaryErr = text "Cannot derive instances for nullary classes"++derivingKindErr :: TyCon -> Class -> [Type] -> Kind -> Bool -> MsgDoc+derivingKindErr tc cls cls_tys cls_kind enough_args+  = sep [ hang (text "Cannot derive well-kinded instance of form"+                      <+> quotes (pprClassPred cls cls_tys+                                    <+> parens (ppr tc <+> text "...")))+               2 gen1_suggestion+        , nest 2 (text "Class" <+> quotes (ppr cls)+                      <+> text "expects an argument of kind"+                      <+> quotes (pprKind cls_kind))+        ]+  where+    gen1_suggestion | cls `hasKey` gen1ClassKey && enough_args+                    = text "(Perhaps you intended to use PolyKinds)"+                    | otherwise = Outputable.empty++derivingViaKindErr :: Class -> Kind -> Type -> Kind -> MsgDoc+derivingViaKindErr cls cls_kind via_ty via_kind+  = hang (text "Cannot derive instance via" <+> quotes (pprType via_ty))+       2 (text "Class" <+> quotes (ppr cls)+               <+> text "expects an argument of kind"+               <+> quotes (pprKind cls_kind) <> char ','+      $+$ text "but" <+> quotes (pprType via_ty)+               <+> text "has kind" <+> quotes (pprKind via_kind))++derivingEtaErr :: Class -> [Type] -> Type -> MsgDoc+derivingEtaErr cls cls_tys inst_ty+  = sep [text "Cannot eta-reduce to an instance of form",+         nest 2 (text "instance (...) =>"+                <+> pprClassPred cls (cls_tys ++ [inst_ty]))]++derivingThingErr :: Bool -> Class -> [Type]+                 -> Maybe (DerivStrategy GhcTc) -> MsgDoc -> MsgDoc+derivingThingErr newtype_deriving cls cls_args mb_strat why+  = derivingThingErr' newtype_deriving cls cls_args mb_strat+                      (maybe empty derivStrategyName mb_strat) why++derivingThingErrM :: Bool -> MsgDoc -> DerivM MsgDoc+derivingThingErrM newtype_deriving why+  = do DerivEnv { denv_cls      = cls+                , denv_inst_tys = cls_args+                , denv_strat    = mb_strat } <- ask+       pure $ derivingThingErr newtype_deriving cls cls_args mb_strat why++derivingThingErrMechanism :: DerivSpecMechanism -> MsgDoc -> DerivM MsgDoc+derivingThingErrMechanism mechanism why+  = do DerivEnv { denv_cls      = cls+                , denv_inst_tys = cls_args+                , denv_strat    = mb_strat } <- ask+       pure $ derivingThingErr' (isDerivSpecNewtype mechanism) cls cls_args mb_strat+                (derivStrategyName $ derivSpecMechanismToStrategy mechanism) why++derivingThingErr' :: Bool -> Class -> [Type]+                  -> Maybe (DerivStrategy GhcTc) -> MsgDoc -> MsgDoc -> MsgDoc+derivingThingErr' newtype_deriving cls cls_args mb_strat strat_msg why+  = sep [(hang (text "Can't make a derived instance of")+             2 (quotes (ppr pred) <+> via_mechanism)+          $$ nest 2 extra) <> colon,+         nest 2 why]+  where+    strat_used = isJust mb_strat+    extra | not strat_used, newtype_deriving+          = text "(even with cunning GeneralizedNewtypeDeriving)"+          | otherwise = empty+    pred = mkClassPred cls cls_args     via_mechanism | strat_used                   = text "with the" <+> strat_msg <+> text "strategy"                   | otherwise
typecheck/TcDerivInfer.hs view
@@ -22,19 +22,26 @@ import ErrUtils import Inst import Outputable+import Pair import PrelNames import TcDerivUtils import TcEnv+import TcGenDeriv import TcGenFunctor import TcGenGenerics import TcMType import TcRnMonad+import TcOrigin+import Constraint+import Predicate import TcType import TyCon+import TyCoPpr (pprTyVars) import Type import TcSimplify import TcValidity (validDerivPred) import TcUnify (buildImplicationFor, checkConstraints)+import TysWiredIn (typeToTypeKind) import Unify (tcUnifyTy) import Util import Var@@ -43,7 +50,7 @@ import Control.Monad import Control.Monad.Trans.Class  (lift) import Control.Monad.Trans.Reader (ask)-import Data.List+import Data.List                  (sortBy) import Data.Maybe  ----------------------@@ -66,18 +73,38 @@ -- generated method definitions should succeed.   This set will be simplified -- before being used in the instance declaration inferConstraints mechanism-  = do { DerivEnv { denv_tc          = tc-                  , denv_tc_args     = tc_args-                  , denv_cls         = main_cls-                  , denv_cls_tys     = cls_tys } <- ask+  = do { DerivEnv { denv_tvs      = tvs+                  , denv_cls      = main_cls+                  , denv_inst_tys = inst_tys } <- ask        ; wildcard <- isStandaloneWildcardDeriv-       ; let is_anyclass = isDerivSpecAnyClass mechanism-             infer_constraints-               | is_anyclass = inferConstraintsDAC inst_tys-               | otherwise   = inferConstraintsDataConArgs inst_ty inst_tys+       ; let infer_constraints :: DerivM ([ThetaOrigin], [TyVar], [TcType])+             infer_constraints =+               case mechanism of+                 DerivSpecStock{dsm_stock_dit = dit}+                   -> inferConstraintsStock dit+                 DerivSpecAnyClass+                   -> infer_constraints_simple inferConstraintsAnyclass+                 DerivSpecNewtype { dsm_newtype_dit =+                                      DerivInstTys{dit_cls_tys = cls_tys}+                                  , dsm_newtype_rep_ty = rep_ty }+                   -> infer_constraints_simple $+                      inferConstraintsCoerceBased cls_tys rep_ty+                 DerivSpecVia { dsm_via_cls_tys = cls_tys+                              , dsm_via_ty = via_ty }+                   -> infer_constraints_simple $+                      inferConstraintsCoerceBased cls_tys via_ty -             inst_ty  = mkTyConApp tc tc_args-             inst_tys = cls_tys ++ [inst_ty]+             -- Most deriving strategies do not need to do anything special to+             -- the type variables and arguments to the class in the derived+             -- instance, so they can pass through unchanged. The exception to+             -- this rule is stock deriving. See+             -- Note [Inferring the instance context].+             infer_constraints_simple+               :: DerivM [ThetaOrigin]+               -> DerivM ([ThetaOrigin], [TyVar], [TcType])+             infer_constraints_simple infer_thetas = do+               thetas <- infer_thetas+               pure (thetas, tvs, inst_tys)               -- Constraints arising from superclasses              -- See Note [Superclasses of derived instance]@@ -98,20 +125,43 @@        ; return ( sc_constraints ++ inferred_constraints                 , tvs', inst_tys' ) } --- | Like 'inferConstraints', but used only in the case of deriving strategies--- where the constraints are inferred by inspecting the fields of each data--- constructor (i.e., stock- and newtype-deriving).-inferConstraintsDataConArgs :: TcType -> [TcType]-                            -> DerivM ([ThetaOrigin], [TyVar], [TcType])-inferConstraintsDataConArgs inst_ty inst_tys-  = do DerivEnv { denv_tvs         = tvs-                , denv_rep_tc      = rep_tc-                , denv_rep_tc_args = rep_tc_args-                , denv_cls         = main_cls-                , denv_cls_tys     = cls_tys } <- ask+-- | Like 'inferConstraints', but used only in the case of the @stock@ deriving+-- strategy. The constraints are inferred by inspecting the fields of each data+-- constructor. In this example:+--+-- > data Foo = MkFoo Int Char deriving Show+--+-- We would infer the following constraints ('ThetaOrigin's):+--+-- > (Show Int, Show Char)+--+-- Note that this function also returns the type variables ('TyVar's) and+-- class arguments ('TcType's) for the resulting instance. This is because+-- when deriving 'Functor'-like classes, we must sometimes perform kind+-- substitutions to ensure the resulting instance is well kinded, which may+-- affect the type variables and class arguments. In this example:+--+-- > newtype Compose (f :: k -> Type) (g :: Type -> k) (a :: Type) =+-- >   Compose (f (g a)) deriving stock Functor+--+-- We must unify @k@ with @Type@ in order for the resulting 'Functor' instance+-- to be well kinded, so we return @[]@/@[Type, f, g]@ for the+-- 'TyVar's/'TcType's, /not/ @[k]@/@[k, f, g]@.+-- See Note [Inferring the instance context].+inferConstraintsStock :: DerivInstTys+                      -> DerivM ([ThetaOrigin], [TyVar], [TcType])+inferConstraintsStock (DerivInstTys { dit_cls_tys     = cls_tys+                                    , dit_tc          = tc+                                    , dit_tc_args     = tc_args+                                    , dit_rep_tc      = rep_tc+                                    , dit_rep_tc_args = rep_tc_args })+  = do DerivEnv { denv_tvs      = tvs+                , denv_cls      = main_cls+                , denv_inst_tys = inst_tys } <- ask        wildcard <- isStandaloneWildcardDeriv -       let tc_binders = tyConBinders rep_tc+       let inst_ty    = mkTyConApp tc tc_args+           tc_binders = tyConBinders rep_tc            choose_level bndr              | isNamedTyConBinder bndr = KindLevel              | otherwise               = TypeLevel@@ -272,7 +322,7 @@                        $$ ppr rep_tc_tvs $$ ppr all_rep_tc_args )                 do { let (arg_constraints, tvs', inst_tys')                            = con_arg_constraints get_std_constrained_tys-                   ; lift $ traceTc "inferConstraintsDataConArgs" $ vcat+                   ; lift $ traceTc "inferConstraintsStock" $ vcat                           [ ppr main_cls <+> ppr inst_tys'                           , ppr arg_constraints                           ]@@ -280,9 +330,6 @@                                                  ++ arg_constraints                             , tvs', inst_tys') } -typeToTypeKind :: Kind-typeToTypeKind = liftedTypeKind `mkFunTy` liftedTypeKind- -- | Like 'inferConstraints', but used only in the case of @DeriveAnyClass@, -- which gathers its constraints based on the type signatures of the class's -- methods instead of the types of the data constructor's field.@@ -290,10 +337,10 @@ -- See Note [Gathering and simplifying constraints for DeriveAnyClass] -- for an explanation of how these constraints are used to determine the -- derived instance context.-inferConstraintsDAC :: [TcType] -> DerivM ([ThetaOrigin], [TyVar], [TcType])-inferConstraintsDAC inst_tys-  = do { DerivEnv { denv_tvs = tvs-                  , denv_cls = cls } <- ask+inferConstraintsAnyclass :: DerivM [ThetaOrigin]+inferConstraintsAnyclass+  = do { DerivEnv { denv_cls      = cls+                  , denv_inst_tys = inst_tys } <- ask        ; wildcard <- isStandaloneWildcardDeriv         ; let gen_dms = [ (sel_id, dm_ty)@@ -320,8 +367,59 @@                                 meth_tvs dm_tvs meth_theta (tau_eq:dm_theta)) }         ; theta_origins <- lift $ mapM do_one_meth gen_dms-       ; return (theta_origins, tvs, inst_tys) }+       ; return theta_origins } +-- Like 'inferConstraints', but used only for @GeneralizedNewtypeDeriving@ and+-- @DerivingVia@. Since both strategies generate code involving 'coerce', the+-- inferred constraints set up the scaffolding needed to typecheck those uses+-- of 'coerce'. In this example:+--+-- > newtype Age = MkAge Int deriving newtype Num+--+-- We would infer the following constraints ('ThetaOrigin's):+--+-- > (Num Int, Coercible Age Int)+inferConstraintsCoerceBased :: [Type] -> Type+                            -> DerivM [ThetaOrigin]+inferConstraintsCoerceBased cls_tys rep_ty = do+  DerivEnv { denv_tvs      = tvs+           , denv_cls      = cls+           , denv_inst_tys = inst_tys } <- ask+  sa_wildcard <- isStandaloneWildcardDeriv+  let -- The following functions are polymorphic over the representation+      -- type, since we might either give it the underlying type of a+      -- newtype (for GeneralizedNewtypeDeriving) or a @via@ type+      -- (for DerivingVia).+      rep_tys ty  = cls_tys ++ [ty]+      rep_pred ty = mkClassPred cls (rep_tys ty)+      rep_pred_o ty = mkPredOrigin deriv_origin TypeLevel (rep_pred ty)+              -- rep_pred is the representation dictionary, from where+              -- we are going to get all the methods for the final+              -- dictionary+      deriv_origin = mkDerivOrigin sa_wildcard++      -- Next we collect constraints for the class methods+      -- If there are no methods, we don't need any constraints+      -- Otherwise we need (C rep_ty), for the representation methods,+      -- and constraints to coerce each individual method+      meth_preds :: Type -> [PredOrigin]+      meth_preds ty+        | null meths = [] -- No methods => no constraints+                          -- (#12814)+        | otherwise = rep_pred_o ty : coercible_constraints ty+      meths = classMethods cls+      coercible_constraints ty+        = [ mkPredOrigin (DerivOriginCoerce meth t1 t2 sa_wildcard)+                         TypeLevel (mkReprPrimEqPred t1 t2)+          | meth <- meths+          , let (Pair t1 t2) = mkCoerceClassMethEqn cls tvs+                                       inst_tys ty meth ]++      all_thetas :: Type -> [ThetaOrigin]+      all_thetas ty = [mkThetaOriginFromPreds $ meth_preds ty]++  pure (all_thetas rep_ty)+ {- Note [Inferring the instance context] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are two sorts of 'deriving', as represented by the two constructors@@ -346,7 +444,7 @@     the instance context (theta) is user-supplied  For the InferContext case, we must figure out the-instance context (inferConstraintsDataConArgs). Suppose we are inferring+instance context (inferConstraintsStock). Suppose we are inferring the instance context for     C t1 .. tn (T s1 .. sm) There are two cases@@ -365,7 +463,7 @@  In the functor-like case, we may need to unify some kind variables with * in order for the generated instance to be well-kinded. An example from-Trac #10524:+#10524:    newtype Compose (f :: k2 -> *) (g :: k1 -> k2) (a :: k1)     = Compose (f (g a)) deriving Functor@@ -456,7 +554,7 @@         Eq (T a b) = (Ping a, Pong b, ...)  Now we can get a (recursive) equation from the data decl.  This part-is done by inferConstraintsDataConArgs.+is done by inferConstraintsStock.          Eq (T a b) = Eq (Foo a) u Eq (Bar b)    -- From C1                    u Eq (T b a) u Eq Int        -- From C2@@ -848,7 +946,7 @@ Note that it is vital that we instantiate the `c` in $gdm_bar's type with a new unification variable for each iteration of simplifyDeriv. If we re-use the same unification variable across multiple iterations, then bad things can happen,-such as Trac #14933.+such as #14933.  Similarly for 'baz', givng the constraint C2 
typecheck/TcDerivUtils.hs view
@@ -10,7 +10,7 @@  module TcDerivUtils (         DerivM, DerivEnv(..),-        DerivSpec(..), pprDerivSpec,+        DerivSpec(..), pprDerivSpec, DerivInstTys(..),         DerivSpecMechanism(..), derivSpecMechanismToStrategy, isDerivSpecStock,         isDerivSpecNewtype, isDerivSpecAnyClass, isDerivSpecVia,         DerivContext(..), OriginativeDerivStatus(..),@@ -32,7 +32,7 @@ import DynFlags import ErrUtils import HscTypes (lookupFixity, mi_fix)-import HsSyn+import GHC.Hs import Inst import InstEnv import LoadIface (loadInterfaceForName)@@ -44,10 +44,12 @@ import TcGenDeriv import TcGenFunctor import TcGenGenerics+import TcOrigin import TcRnMonad import TcType import THNames (liftClassKey) import TyCon+import TyCoPpr (pprSourceTyCon) import Type import Util import VarSet@@ -89,6 +91,7 @@  -- | Contains all of the information known about a derived instance when -- determining what its @EarlyDerivSpec@ should be.+-- See @Note [DerivEnv and DerivSpecMechanism]@. data DerivEnv = DerivEnv   { denv_overlap_mode :: Maybe OverlapMode     -- ^ Is this an overlapping instance?@@ -96,19 +99,8 @@     -- ^ Universally quantified type variables in the instance   , denv_cls          :: Class     -- ^ Class for which we need to derive an instance-  , denv_cls_tys      :: [Type]-    -- ^ Other arguments to the class except the last-  , denv_tc           :: TyCon-    -- ^ Type constructor for which the instance is requested-    --   (last arguments to the type class)-  , denv_tc_args      :: [Type]-    -- ^ Arguments to the type constructor-  , denv_rep_tc       :: TyCon-    -- ^ The representation tycon for 'denv_tc'-    --   (for data family instances)-  , denv_rep_tc_args  :: [Type]-    -- ^ The representation types for 'denv_tc_args'-    --   (for data family instances)+  , denv_inst_tys     :: [Type]+    -- ^ All arguments to to 'denv_cls' in the derived instance.   , denv_ctxt         :: DerivContext     -- ^ @'SupplyContext' theta@ for standalone deriving (where @theta@ is the     --   context of the instance).@@ -124,22 +116,14 @@   ppr (DerivEnv { denv_overlap_mode = overlap_mode                 , denv_tvs          = tvs                 , denv_cls          = cls-                , denv_cls_tys      = cls_tys-                , denv_tc           = tc-                , denv_tc_args      = tc_args-                , denv_rep_tc       = rep_tc-                , denv_rep_tc_args  = rep_tc_args+                , denv_inst_tys     = inst_tys                 , denv_ctxt         = ctxt                 , denv_strat        = mb_strat })     = hang (text "DerivEnv")          2 (vcat [ text "denv_overlap_mode" <+> ppr overlap_mode                  , text "denv_tvs"          <+> ppr tvs                  , text "denv_cls"          <+> ppr cls-                 , text "denv_cls_tys"      <+> ppr cls_tys-                 , text "denv_tc"           <+> ppr tc-                 , text "denv_tc_args"      <+> ppr tc_args-                 , text "denv_rep_tc"       <+> ppr rep_tc-                 , text "denv_rep_tc_args"  <+> ppr rep_tc_args+                 , text "denv_inst_tys"     <+> ppr inst_tys                  , text "denv_ctxt"         <+> ppr ctxt                  , text "denv_strat"        <+> ppr mb_strat ]) @@ -149,7 +133,6 @@                           , ds_theta               :: theta                           , ds_cls                 :: Class                           , ds_tys                 :: [Type]-                          , ds_tc                  :: TyCon                           , ds_overlap             :: Maybe OverlapMode                           , ds_standalone_wildcard :: Maybe SrcSpan                               -- See Note [Inferring the instance context]@@ -159,10 +142,6 @@         --       df :: forall tvs. theta => C tys         -- The Name is the name for the DFun we'll build         -- The tyvars bind all the variables in the theta-        -- For type families, the tycon in-        --       in ds_tys is the *family* tycon-        --       in ds_tc is the *representation* type-        -- For non-family tycons, both are the same          -- the theta is either the given and final theta, in standalone deriving,         -- or the not-yet-simplified list of constraints together with their origin@@ -179,7 +158,7 @@      axiom :RTList a = Tree a       DS { ds_tvs = [a,s], ds_cls = C, ds_tys = [s, T [a]]-        , ds_tc = :RTList, ds_mechanism = DerivSpecNewtype (Tree a) }+        , ds_mechanism = DerivSpecNewtype (Tree a) } -}  pprDerivSpec :: Outputable theta => DerivSpec theta -> SDoc@@ -199,41 +178,95 @@ instance Outputable theta => Outputable (DerivSpec theta) where   ppr = pprDerivSpec --- What action to take in order to derive a class instance.--- See Note [Deriving strategies] in TcDeriv+-- | Information about the arguments to the class in a stock- or+-- newtype-derived instance.+-- See @Note [DerivEnv and DerivSpecMechanism]@.+data DerivInstTys = DerivInstTys+  { dit_cls_tys     :: [Type]+    -- ^ Other arguments to the class except the last+  , dit_tc          :: TyCon+    -- ^ Type constructor for which the instance is requested+    --   (last arguments to the type class)+  , dit_tc_args     :: [Type]+    -- ^ Arguments to the type constructor+  , dit_rep_tc      :: TyCon+    -- ^ The representation tycon for 'dit_tc'+    --   (for data family instances). Otherwise the same as 'dit_tc'.+  , dit_rep_tc_args :: [Type]+    -- ^ The representation types for 'dit_tc_args'+    --   (for data family instances). Otherwise the same as 'dit_tc_args'.+  }++instance Outputable DerivInstTys where+  ppr (DerivInstTys { dit_cls_tys = cls_tys, dit_tc = tc, dit_tc_args = tc_args+                    , dit_rep_tc = rep_tc, dit_rep_tc_args = rep_tc_args })+    = hang (text "DITTyConHead")+         2 (vcat [ text "dit_cls_tys"     <+> ppr cls_tys+                 , text "dit_tc"          <+> ppr tc+                 , text "dit_tc_args"     <+> ppr tc_args+                 , text "dit_rep_tc"      <+> ppr rep_tc+                 , text "dit_rep_tc_args" <+> ppr rep_tc_args ])++-- | What action to take in order to derive a class instance.+-- See @Note [DerivEnv and DerivSpecMechanism]@, as well as+-- @Note [Deriving strategies]@ in "TcDeriv". data DerivSpecMechanism-  = DerivSpecStock   -- "Standard" classes-      (SrcSpan -> TyCon-               -> [Type]-               -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name]))-      -- This function returns three things:+    -- | \"Standard\" classes+  = DerivSpecStock+    { dsm_stock_dit    :: DerivInstTys+      -- ^ Information about the arguments to the class in the derived+      -- instance, including what type constructor the last argument is+      -- headed by. See @Note [DerivEnv and DerivSpecMechanism]@.+    , dsm_stock_gen_fn ::+        SrcSpan -> TyCon+                -> [Type]+                -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name])+      -- ^ This function returns three things:       --       -- 1. @LHsBinds GhcPs@: The derived instance's function bindings       --    (e.g., @compare (T x) (T y) = compare x y@)+      --       -- 2. @BagDerivStuff@: Auxiliary bindings needed to support the derived       --    instance. As examples, derived 'Generic' instances require       --    associated type family instances, and derived 'Eq' and 'Ord'       --    instances require top-level @con2tag@ functions.-      --    See Note [Auxiliary binders] in TcGenDeriv.+      --    See @Note [Auxiliary binders]@ in "TcGenDeriv".+      --       -- 3. @[Name]@: A list of Names for which @-Wunused-binds@ should be       --    suppressed. This is used to suppress unused warnings for record       --    selectors when deriving 'Read', 'Show', or 'Generic'.-      --    See Note [Deriving and unused record selectors].+      --    See @Note [Deriving and unused record selectors]@.+    } -  | DerivSpecNewtype -- -XGeneralizedNewtypeDeriving-      Type -- The newtype rep type+    -- | @GeneralizedNewtypeDeriving@+  | DerivSpecNewtype+    { dsm_newtype_dit    :: DerivInstTys+      -- ^ Information about the arguments to the class in the derived+      -- instance, including what type constructor the last argument is+      -- headed by. See @Note [DerivEnv and DerivSpecMechanism]@.+    , dsm_newtype_rep_ty :: Type+      -- ^ The newtype rep type.+    } -  | DerivSpecAnyClass -- -XDeriveAnyClass+    -- | @DeriveAnyClass@+  | DerivSpecAnyClass -  | DerivSpecVia -- -XDerivingVia-      Type -- The @via@ type+    -- | @DerivingVia@+  | DerivSpecVia+    { dsm_via_cls_tys :: [Type]+      -- ^ All arguments to the class besides the last one.+    , dsm_via_inst_ty :: Type+      -- ^ The last argument to the class.+    , dsm_via_ty      :: Type+      -- ^ The @via@ type+    }  -- | Convert a 'DerivSpecMechanism' to its corresponding 'DerivStrategy'. derivSpecMechanismToStrategy :: DerivSpecMechanism -> DerivStrategy GhcTc-derivSpecMechanismToStrategy DerivSpecStock{}   = StockStrategy-derivSpecMechanismToStrategy DerivSpecNewtype{} = NewtypeStrategy-derivSpecMechanismToStrategy DerivSpecAnyClass  = AnyclassStrategy-derivSpecMechanismToStrategy (DerivSpecVia t)   = ViaStrategy t+derivSpecMechanismToStrategy DerivSpecStock{}               = StockStrategy+derivSpecMechanismToStrategy DerivSpecNewtype{}             = NewtypeStrategy+derivSpecMechanismToStrategy DerivSpecAnyClass              = AnyclassStrategy+derivSpecMechanismToStrategy (DerivSpecVia{dsm_via_ty = t}) = ViaStrategy t  isDerivSpecStock, isDerivSpecNewtype, isDerivSpecAnyClass, isDerivSpecVia   :: DerivSpecMechanism -> Bool@@ -250,11 +283,117 @@ isDerivSpecVia _                = False  instance Outputable DerivSpecMechanism where-  ppr (DerivSpecStock{})   = text "DerivSpecStock"-  ppr (DerivSpecNewtype t) = text "DerivSpecNewtype" <> colon <+> ppr t-  ppr DerivSpecAnyClass    = text "DerivSpecAnyClass"-  ppr (DerivSpecVia t)     = text "DerivSpecVia" <> colon <+> ppr t+  ppr (DerivSpecStock{dsm_stock_dit = dit})+    = hang (text "DerivSpecStock")+         2 (vcat [ text "dsm_stock_dit" <+> ppr dit ])+  ppr (DerivSpecNewtype { dsm_newtype_dit = dit, dsm_newtype_rep_ty = rep_ty })+    = hang (text "DerivSpecNewtype")+         2 (vcat [ text "dsm_newtype_dit"    <+> ppr dit+                 , text "dsm_newtype_rep_ty" <+> ppr rep_ty ])+  ppr DerivSpecAnyClass = text "DerivSpecAnyClass"+  ppr (DerivSpecVia { dsm_via_cls_tys = cls_tys, dsm_via_inst_ty = inst_ty+                    , dsm_via_ty = via_ty })+    = hang (text "DerivSpecVia")+         2 (vcat [ text "dsm_via_cls_tys" <+> ppr cls_tys+                 , text "dsm_via_inst_ty" <+> ppr inst_ty+                 , text "dsm_via_ty"      <+> ppr via_ty ]) +{-+Note [DerivEnv and DerivSpecMechanism]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+DerivEnv contains all of the bits and pieces that are common to every+deriving strategy. (See Note [Deriving strategies] in TcDeriv.) Some deriving+strategies impose stricter requirements on the types involved in the derived+instance than others, and these differences are factored out into the+DerivSpecMechanism type. Suppose that the derived instance looks like this:++  instance ... => C arg_1 ... arg_n++Each deriving strategy imposes restrictions on arg_1 through arg_n as follows:++* stock (DerivSpecStock):++  Stock deriving requires that:++  - n must be a positive number. This is checked by+    TcDeriv.expectNonNullaryClsArgs+  - arg_n must be an application of an algebraic type constructor. Here,+    "algebraic type constructor" means:++    + An ordinary data type constructor, or+    + A data family type constructor such that the arguments it is applied to+      give rise to a data family instance.++    This is checked by TcDeriv.expectAlgTyConApp.++  This extra structure is witnessed by the DerivInstTys data type, which stores+  arg_1 through arg_(n-1) (dit_cls_tys), the algebraic type constructor+  (dit_tc), and its arguments (dit_tc_args). If dit_tc is an ordinary data type+  constructor, then dit_rep_tc/dit_rep_tc_args are the same as+  dit_tc/dit_tc_args. If dit_tc is a data family type constructor, then+  dit_rep_tc is the representation type constructor for the data family+  instance, and dit_rep_tc_args are the arguments to the representation type+  constructor in the corresponding instance.++* newtype (DerivSpecNewtype):++  Newtype deriving imposes the same DerivInstTys requirements as stock+  deriving. This is necessary because we need to know what the underlying type+  that the newtype wraps is, and this information can only be learned by+  knowing dit_rep_tc.++* anyclass (DerivSpecAnyclass):++  DeriveAnyClass is the most permissive deriving strategy of all, as it+  essentially imposes no requirements on the derived instance. This is because+  DeriveAnyClass simply derives an empty instance, so it does not need any+  particular knowledge about the types involved. It can do several things+  that stock/newtype deriving cannot do (#13154):++  - n can be 0. That is, one is allowed to anyclass-derive an instance with+    no arguments to the class, such as in this example:++      class C+      deriving anyclass instance C++  - One can derive an instance for a type that is not headed by a type+    constructor, such as in the following example:++      class C (n :: Nat)+      deriving instance C 0+      deriving instance C 1+      ...++  - One can derive an instance for a data family with no data family instances,+    such as in the following example:++      data family Foo a+      class C a+      deriving anyclass instance C (Foo a)++* via (DerivSpecVia):++  Like newtype deriving, DerivingVia requires that n must be a positive number.+  This is because when one derives something like this:++    deriving via Foo instance C Bar++  Then the generated code must specifically mention Bar. However, in+  contrast with newtype deriving, DerivingVia does *not* require Bar to be+  an application of an algebraic type constructor. This is because the+  generated code simply defers to invoking `coerce`, which does not need to+  know anything in particular about Bar (besides that it is representationally+  equal to Foo). This allows DerivingVia to do some things that are not+  possible with newtype deriving, such as deriving instances for data families+  without data instances (#13154):++    data family Foo a+    newtype ByBar a = ByBar a+    class Baz a where ...+    instance Baz (ByBar a) where ...+    deriving via ByBar (Foo a) instance Baz (Foo a)+-}+ -- | Whether GHC is processing a @deriving@ clause or a standalone deriving -- declaration. data DerivContext@@ -474,7 +613,7 @@ {- Note [Deriving and unused record selectors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (see Trac #13919):+Consider this (see #13919):    module Main (main) where @@ -505,7 +644,7 @@ -- If the TyCon is locally defined, we want the local fixity env; -- but if it is imported (which happens for standalone deriving) -- we need to get the fixity env from the interface file--- c.f. RnEnv.lookupFixity, and Trac #9830+-- c.f. RnEnv.lookupFixity, and #9830 getDataConFixityFun tc   = do { this_mod <- getModule        ; if nameIsLocalOrFrom this_mod name@@ -738,8 +877,10 @@                          (cond_isProduct `andCond` cond_args cls)  cond_args :: Class -> Condition--- For some classes (eg Eq, Ord) we allow unlifted arg types--- by generating specialised code.  For others (eg Data) we don't.+-- ^ For some classes (eg 'Eq', 'Ord') we allow unlifted arg types+-- by generating specialised code.  For others (eg 'Data') we don't.+-- For even others (eg 'Lift'), unlifted types aren't even a special+-- consideration! cond_args cls _ _ rep_tc   = case bad_args of       []     -> IsValid@@ -748,7 +889,7 @@   where     bad_args = [ arg_ty | con <- tyConDataCons rep_tc                         , arg_ty <- dataConOrigArgTys con-                        , isUnliftedType arg_ty+                        , isLiftedType_maybe arg_ty /= Just True                         , not (ok_ty arg_ty) ]      cls_key = classKey cls@@ -756,7 +897,7 @@      | cls_key == eqClassKey   = check_in arg_ty ordOpTbl      | cls_key == ordClassKey  = check_in arg_ty ordOpTbl      | cls_key == showClassKey = check_in arg_ty boxConTbl-     | cls_key == liftClassKey = check_in arg_ty litConTbl+     | cls_key == liftClassKey = True     -- Lift is levity-polymorphic      | otherwise               = False    -- Read, Ix etc      check_in :: Type -> [(Type,a)] -> Bool@@ -801,7 +942,7 @@   = allValid (map check_con data_cons)   where     tc_tvs            = tyConTyVars rep_tc-    Just (_, last_tv) = snocView tc_tvs+    last_tv           = last tc_tvs     bad_stupid_theta  = filter is_bad (tyConStupidTheta rep_tc)     is_bad pred       = last_tv `elemVarSet` exactTyCoVarsOfType pred       -- See Note [Check that the type variable is truly universal]@@ -917,12 +1058,9 @@ This is not restricted to Generics; any class can be derived, simply giving rise to an empty instance. -Unfortunately, it is not clear how to determine the context (when using a-deriving clause; in standalone deriving, the user provides the context).-GHC uses the same heuristic for figuring out the class context that it uses for-Eq in the case of *-kinded classes, and for Functor in the case of-* -> *-kinded classes. That may not be optimal or even wrong. But in such-cases, standalone deriving can still be used.+See Note [Gathering and simplifying constraints for DeriveAnyClass] in+TcDerivInfer for an explanation hof how the instance context is inferred for+DeriveAnyClass.  Note [Check that the type variable is truly universal] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -938,7 +1076,7 @@      T6 :: T a (b,b)            -- No!  'b' is constrained  Notice that only the first of these constructors is vanilla H-98. We only-need to take care about the last argument (b in this case).  See Trac #8678.+need to take care about the last argument (b in this case).  See #8678. Eg. for T1-T3 we can write       fmap f (T1 a b) = T1 a (f b)@@ -970,5 +1108,5 @@ type variable b. But this is OK, because expanding the type synonym C would give us the context (Show a), which doesn't mention b. Therefore, we must make sure to expand type synonyms before performing this check. Not doing so led to-Trac #13813.+#13813. -}
typecheck/TcEnv.hs view
@@ -4,7 +4,7 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}  -- instance MonadThings is necessarily an                                        -- orphan {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]-                                      -- in module PlaceHolder+                                      -- in module GHC.Hs.PlaceHolder {-# LANGUAGE TypeFamilies #-}  module TcEnv(@@ -25,6 +25,7 @@         tcLookupLocatedGlobalId, tcLookupLocatedTyCon,         tcLookupLocatedClass, tcLookupAxiom,         lookupGlobal, ioLookupDataCon,+        addTypecheckedBinds,          -- Local environment         tcExtendKindEnv, tcExtendKindEnvList,@@ -36,6 +37,7 @@          tcLookup, tcLookupLocated, tcLookupLocalIds,         tcLookupId, tcLookupIdMaybe, tcLookupTyVar,+        tcLookupTcTyCon,         tcLookupLcl_maybe,         getInLocalScope,         wrongThingErr, pprBinders,@@ -56,15 +58,12 @@         -- Defaults         tcGetDefaultTys, -        -- Global type variables-        tcGetGlobalTyCoVars,-         -- Template Haskell stuff         checkWellStaged, tcMetaTy, thLevel,         topIdLvl, isBrackStage,          -- New Ids-        newDFunName, newDFunName', newFamInstTyConName,+        newDFunName, newFamInstTyConName,         newFamInstAxiomName,         mkStableIdFromString, mkStableIdFromName,         mkWrapperName@@ -74,7 +73,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import IfaceEnv import TcRnMonad import TcMType@@ -84,7 +83,6 @@ import TysWiredIn import Id import Var-import VarSet import RdrName import InstEnv import DataCon ( DataCon )@@ -106,14 +104,15 @@ import Outputable import Encoding import FastString+import Bag import ListSetOps import ErrUtils-import Util import Maybes( MaybeErr(..), orElse ) import qualified GHC.LanguageExtensions as LangExt+import Util ( HasDebugCallStack )  import Data.IORef-import Data.List+import Data.List (intercalate) import Control.Monad  {- *********************************************************************@@ -187,6 +186,15 @@           pprTcTyThingCategory (AGlobal thing) <+> quotes (ppr name) <+>                 text "used as a data constructor" +addTypecheckedBinds :: TcGblEnv -> [LHsBinds GhcTc] -> TcGblEnv+addTypecheckedBinds tcg_env binds+  | isHsBootOrSig (tcg_src tcg_env) = tcg_env+    -- Do not add the code for record-selector bindings+    -- when compiling hs-boot files+  | otherwise = tcg_env { tcg_binds = foldr unionBags+                                            (tcg_binds tcg_env)+                                            binds }+ {- ************************************************************************ *                                                                      *@@ -448,6 +456,13 @@                 Just (ATcId { tct_id = id }) ->  id                 _ -> pprPanic "tcLookupLocalIds" (ppr name) +tcLookupTcTyCon :: HasDebugCallStack => Name -> TcM TcTyCon+tcLookupTcTyCon name = do+    thing <- tcLookup name+    case thing of+        ATcTyCon tc -> return tc+        _           -> pprPanic "tcLookupTcTyCon" (ppr name)+ getInLocalScope :: TcM (Name -> Bool) getInLocalScope = do { lcl_env <- getLclTypeEnv                      ; return (`elemNameEnv` lcl_env) }@@ -576,7 +591,7 @@ -- as free in the types of extra_env.   = do  { traceTc "tc_extend_local_env" (ppr extra_env)         ; env0 <- getLclEnv-        ; env1 <- tcExtendLocalTypeEnv env0 extra_env+        ; let env1 = tcExtendLocalTypeEnv env0 extra_env         ; stage <- getStage         ; let env2 = extend_local_env (top_lvl, thLevel stage) extra_env env1         ; setLclEnv env2 thing_inside }@@ -594,52 +609,9 @@             , tcl_th_bndrs = extendNameEnvList th_bndrs  -- We only track Ids in tcl_th_bndrs                                  [(n, thlvl) | (n, ATcId {}) <- pairs] } -tcExtendLocalTypeEnv :: TcLclEnv -> [(Name, TcTyThing)] -> TcM TcLclEnv+tcExtendLocalTypeEnv :: TcLclEnv -> [(Name, TcTyThing)] -> TcLclEnv tcExtendLocalTypeEnv lcl_env@(TcLclEnv { tcl_env = lcl_type_env }) tc_ty_things-  | isEmptyVarSet extra_tvs-  = return (lcl_env { tcl_env = extendNameEnvList lcl_type_env tc_ty_things })-  | otherwise-  = do { global_tvs <- readMutVar (tcl_tyvars lcl_env)-       ; new_g_var  <- newMutVar (global_tvs `unionVarSet` extra_tvs)-       ; return (lcl_env { tcl_tyvars = new_g_var-                         , tcl_env = extendNameEnvList lcl_type_env tc_ty_things } ) }-  where-    extra_tvs = foldr get_tvs emptyVarSet tc_ty_things--    get_tvs (_, ATcId { tct_id = id, tct_info = closed }) tvs-      = case closed of-          ClosedLet -> ASSERT2( is_closed_type, ppr id $$ ppr (idType id) )-                       tvs-          _other    -> tvs `unionVarSet` id_tvs-        where-           id_ty          = idType id-           id_tvs         = tyCoVarsOfType id_ty-           id_co_tvs      = closeOverKinds (coVarsOfType id_ty)-           is_closed_type = not (anyVarSet isTyVar (id_tvs `minusVarSet` id_co_tvs))-           -- We only care about being closed wrt /type/ variables-           -- E.g. a top-level binding might have a type like-           --          foo :: t |> co-           -- where co :: * ~ *-           -- or some other as-yet-unsolved kind coercion--    get_tvs (_, ATyVar _ tv) tvs          -- See Note [Global TyVars]-      = tvs `unionVarSet` tyCoVarsOfType (tyVarKind tv) `extendVarSet` tv--    get_tvs (_, ATcTyCon tc) tvs = tvs `unionVarSet` tyCoVarsOfType (tyConKind tc)--    get_tvs (_, AGlobal {})       tvs = tvs-    get_tvs (_, APromotionErr {}) tvs = tvs--        -- Note [Global TyVars]-        -- It's important to add the in-scope tyvars to the global tyvar set-        -- as well.  Consider-        --      f (_::r) = let g y = y::r in ...-        -- Here, g mustn't be generalised.  This is also important during-        -- class and instance decls, when we mustn't generalise the class tyvars-        -- when typechecking the methods.-        ---        -- Nor must we generalise g over any kind variables free in r's kind-+  = lcl_env { tcl_env = extendNameEnvList lcl_type_env tc_ty_things }  {- ********************************************************************* *                                                                      *@@ -671,7 +643,7 @@             ; tyvar2 <- zonkTcTyVarToTyVar tyvar1               -- Be sure to zonk here!  Tidying applies to zonked               -- types, so if we don't zonk we may create an-              -- ill-kinded type (Trac #14175)+              -- ill-kinded type (#14175)             ; go (env', extendVarEnv subst tyvar tyvar2) bs }       | otherwise       = go (env, subst) bs@@ -706,18 +678,18 @@     get_cons (L _ (DataFamInstD { dfid_inst = fid }))  = get_fi_cons fid     get_cons (L _ (ClsInstD { cid_inst = ClsInstDecl { cid_datafam_insts = fids } }))       = concatMap (get_fi_cons . unLoc) fids-    get_cons (L _ (ClsInstD _ (XClsInstDecl _))) = panic "get_cons"-    get_cons (L _ (XInstDecl _)) = panic "get_cons"+    get_cons (L _ (ClsInstD _ (XClsInstDecl nec))) = noExtCon nec+    get_cons (L _ (XInstDecl nec)) = noExtCon nec      get_fi_cons :: DataFamInstDecl GhcRn -> [Name]     get_fi_cons (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =                   FamEqn { feqn_rhs = HsDataDefn { dd_cons = cons } }}})       = map unLoc $ concatMap (getConNames . unLoc) cons     get_fi_cons (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-                  FamEqn { feqn_rhs = XHsDataDefn _ }}})-      = panic "get_fi_cons"-    get_fi_cons (DataFamInstDecl (HsIB _ (XFamEqn _))) = panic "get_fi_cons"-    get_fi_cons (DataFamInstDecl (XHsImplicitBndrs _)) = panic "get_fi_cons"+                  FamEqn { feqn_rhs = XHsDataDefn nec }}})+      = noExtCon nec+    get_fi_cons (DataFamInstDecl (HsIB _ (XFamEqn nec))) = noExtCon nec+    get_fi_cons (DataFamInstDecl (XHsImplicitBndrs nec)) = noExtCon nec   tcAddPatSynPlaceholders :: [PatSynBind GhcRn GhcRn] -> TcM a -> TcM a@@ -758,20 +730,20 @@ constructors, bound to AFamDataCon, so that if we trip over 'MkT' when type checking 'S' we'll produce a decent error message. -Trac #12088 describes this limitation. Of course, when MkT and S live in+#12088 describes this limitation. Of course, when MkT and S live in different modules then all is well.  Note [Don't promote pattern synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We never promote pattern synonyms. -Consider this (Trac #11265):+Consider this (#11265):   pattern A = True   instance Eq A We want a civilised error message from the occurrence of 'A' in the instance, yet 'A' really has not yet been type checked. -Similarly (Trac #9161)+Similarly (#9161)   {-# LANGUAGE PatternSynonyms, DataKinds #-}   pattern A = ()   b :: A@@ -879,7 +851,7 @@   = do  { dflags <- getDynFlags         ; let ovl_strings = xopt LangExt.OverloadedStrings dflags               extended_defaults = xopt LangExt.ExtendedDefaultRules dflags-                                        -- See also Trac #1974+                                        -- See also #1974               flags = (ovl_strings, extended_defaults)          ; mb_defaults <- getDeclaredDefaultTys@@ -913,7 +885,7 @@ want the GHCi repl loop to try to print that 'undefined'.  The neatest thing is to default the 'a' to (), rather than to Integer (which is what would otherwise happen; and then GHCi doesn't attempt to print the ().  So in interactive mode, we add-() to the list of defaulting types.  See Trac #1200.+() to the list of defaulting types.  See #1200.  Additionally, the list type [] is added as a default specialization for Traversable and Foldable. As such the default default list now has types of@@ -970,11 +942,11 @@            --          Used only to improve error messages       } -instance (OutputableBndrId (GhcPass a))+instance (OutputableBndrId a)        => Outputable (InstInfo (GhcPass a)) where     ppr = pprInstInfoDetails -pprInstInfoDetails :: (OutputableBndrId (GhcPass a))+pprInstInfoDetails :: (OutputableBndrId a)                    => InstInfo (GhcPass a) -> SDoc pprInstInfoDetails info    = hang (pprInstanceHdr (iSpec info) <+> text "where")@@ -1007,21 +979,6 @@         ; dfun_occ <- chooseUniqueOccTc (mkDFunOcc info_string is_boot)         ; newGlobalBinder mod dfun_occ loc } --- | Special case of 'newDFunName' to generate dict fun name for a single TyCon.-newDFunName' :: Class -> TyCon -> TcM Name-newDFunName' clas tycon        -- Just a simple wrapper-  = do { loc <- getSrcSpanM     -- The location of the instance decl,-                                -- not of the tycon-       ; newDFunName clas [mkTyConApp tycon []] loc }-       -- The type passed to newDFunName is only used to generate-       -- a suitable string; hence the empty type arg list--{--Make a name for the representation tycon of a family instance.  It's an-*external* name, like other top-level names, and hence must be made with-newGlobalBinder.--}- newFamInstTyConName :: Located Name -> [Type] -> TcM Name newFamInstTyConName (L loc name) tys = mk_fam_inst_name id loc name [tys] @@ -1112,7 +1069,7 @@        ; case stage of   -- See Note [Out of scope might be a staging error]            Splice {}              | isUnboundName name -> failM  -- If the name really isn't in scope-                                            -- don't report it again (Trac #11941)+                                            -- don't report it again (#11941)              | otherwise -> stageRestrictionError (quotes (ppr name))            _ -> failWithTc $                 vcat[text "GHC internal error:" <+> quotes (ppr name) <+>@@ -1145,5 +1102,5 @@ But in fact the type checker processes types first, so 'x' won't even be in the type envt when we look for it in $(foo x).  So inside splices we report something missing from the type env as a staging error.-See Trac #5752 and #5795.+See #5752 and #5795. -}
typecheck/TcErrors.hs view
@@ -15,13 +15,17 @@  import TcRnTypes import TcRnMonad+import Constraint+import Predicate import TcMType-import TcUnify( occCheckForErrors, OccCheckResult(..) )+import TcUnify( occCheckForErrors, MetaTyVarUpdateResult(..) ) import TcEnv( tcInitTidyEnv ) import TcType+import TcOrigin import RnUnbound ( unknownNameSuggestions ) import Type import TyCoRep+import TyCoPpr          ( pprTyVars, pprWithExplicitKindsWhen, pprSourceTyCon, pprWithTYPE ) import Unify            ( tcMatchTys ) import Module import FamInst@@ -33,8 +37,8 @@ import DataCon import TcEvidence import TcEvTerm-import HsExpr  ( UnboundVar(..) )-import HsBinds ( PatSynBind(..) )+import GHC.Hs.Expr  ( UnboundVar(..) )+import GHC.Hs.Binds ( PatSynBind(..) ) import Name import RdrName ( lookupGlobalRdrEnv, lookupGRE_Name, GlobalRdrEnv                , mkRdrUnqual, isLocalGRE, greSrcSpan )@@ -227,7 +231,7 @@                                  -- See Note [Suppressing error messages]                                  -- Suppress low-priority errors if there                                  -- are insolule errors anywhere;-                                 -- See Trac #15539 and c.f. setting ic_status+                                 -- See #15539 and c.f. setting ic_status                                  -- in TcSimplify.setImplicationStatus                             , cec_warn_redundant = warn_redundant                             , cec_binds    = binds_var }@@ -389,7 +393,7 @@  But we need to take care: flags can turn errors into warnings, and we don't want those warnings to suppress subsequent errors (including-suppressing the essential addTcEvBind for them: Trac #15152). So in+suppressing the essential addTcEvBind for them: #15152). So in tryReporter we use askNoErrs to see if any error messages were /actually/ produced; if not, we don't switch on suppression. @@ -418,7 +422,7 @@          warnRedundantConstraints ctxt' tcl_env info' dead_givens        ; when bad_telescope $ reportBadTelescope ctxt tcl_env m_telescope tvs }   where-    tcl_env      = implicLclEnv implic+    tcl_env      = ic_env implic     insoluble    = isInsolubleStatus status     (env1, tvs') = mapAccumL tidyVarBndr (cec_tidy ctxt) tvs     info'        = tidySkolemInfo env1 info@@ -432,7 +436,7 @@           -- type errors.  You could imagine using the /enclosing/           -- bindings (in cec_binds), but that may not have enough stuff           -- in scope for the bindings to be well typed.  So we just-          -- switch off deferred type errors altogether.  See Trac #14605.+          -- switch off deferred type errors altogether.  See #14605.      ctxt' = ctxt1 { cec_tidy     = env1                   , cec_encl     = implic' : cec_encl ctxt@@ -441,7 +445,7 @@                         -- Suppress inessential errors if there                         -- are insolubles anywhere in the                         -- tree rooted here, or we've come across-                        -- a suppress-worthy constraint higher up (Trac #11541)+                        -- a suppress-worthy constraint higher up (#11541)                    , cec_binds    = evb } @@ -505,7 +509,7 @@ {- Note [Redundant constraints in instance decls] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For instance declarations, we don't report unused givens if-they can give rise to improvement.  Example (Trac #10100):+they can give rise to improvement.  Example (#10100):     class Add a b ab | a b -> ab, a ab -> b     instance Add Zero b b     instance Add a b ab => Add (Succ a) b (Succ ab)@@ -583,7 +587,7 @@      -- rigid_nom_eq, rigid_nom_tv_eq,     is_hole, is_dict,-      is_equality, is_ip, is_irred :: Ct -> PredTree -> Bool+      is_equality, is_ip, is_irred :: Ct -> Pred -> Bool      is_given_eq ct pred        | EqPred {} <- pred = arisesFromGivens ct@@ -635,14 +639,14 @@           -- Reason: we don't report all given errors           --         (see mkGivenErrorReporter), and we should only suppress           --         subsequent errors if we actually report this one!-          --         Trac #13446 is an example+          --         #13446 is an example      -- See Note [Given errors]     has_gadt_match [] = False     has_gadt_match (implic : implics)       | PatSkol {} <- ic_info implic       , not (ic_no_eqs implic)-      , wopt Opt_WarnInaccessibleCode (implicDynFlags implic)+      , ic_warn_inaccessible implic           -- Don't bother doing this if -Winaccessible-code isn't enabled.           -- See Note [Avoid -Winaccessible-code when deriving] in TcInstDcls.       = True@@ -675,7 +679,7 @@   = ReportErrCtxt -> [Ct] -> TcM () type ReporterSpec   = ( String                     -- Name-    , Ct -> PredTree -> Bool     -- Pick these ones+    , Ct -> Pred -> Bool         -- Pick these ones     , Bool                       -- True <=> suppress subsequent reporters     , Reporter)                  -- The reporter itself @@ -723,7 +727,7 @@        ; dflags <- getDynFlags        ; let (implic:_) = cec_encl ctxt                  -- Always non-empty when mkGivenErrorReporter is called-             ct' = setCtLoc ct (setCtLocEnv (ctLoc ct) (implicLclEnv implic))+             ct' = setCtLoc ct (setCtLocEnv (ctLoc ct) (ic_env implic))                    -- For given constraints we overwrite the env (and hence src-loc)                    -- with one from the immediately-enclosing implication.                    -- See Note [Inaccessible code]@@ -824,7 +828,7 @@                             -- Add deferred bindings for all                             -- Redundant if we are going to abort compilation,                             -- but that's hard to know for sure, and if we don't-                            -- abort, we need bindings for all (e.g. Trac #12156)+                            -- abort, we need bindings for all (e.g. #12156)   where     isMonadFailInstanceMissing ct =         case ctLocOrigin (ctLoc ct) of@@ -837,11 +841,11 @@ maybeReportHoleError ctxt ct err   -- When -XPartialTypeSignatures is on, warnings (instead of errors) are   -- generated for holes in partial type signatures.-  -- Unless -fwarn_partial_type_signatures is not on,+  -- Unless -fwarn-partial-type-signatures is not on,   -- in which case the messages are discarded.   | isTypeHoleCt ct   = -- For partial type signatures, generate warnings only, and do that-    -- only if -fwarn_partial_type_signatures is on+    -- only if -fwarn-partial-type-signatures is on     case cec_type_holes ctxt of        HoleError -> reportError err        HoleWarn  -> reportWarning (Reason Opt_WarnPartialTypeSignatures) err@@ -850,7 +854,7 @@   -- Always report an error for out-of-scope variables   -- Unless -fdefer-out-of-scope-variables is on,   -- in which case the messages are discarded.-  -- See Trac #12170, #12406+  -- See #12170, #12406   | isOutOfScopeCt ct   = -- If deferring, report a warning only if -Wout-of-scope-variables is on     case cec_out_of_scope_holes ctxt of@@ -1165,7 +1169,7 @@ mkHoleError tidy_simples ctxt ct@(CHoleCan { cc_hole = hole })   -- Explicit holes, like "_" or "_f"   = do { (ctxt, binds_msg, ct) <- relevantBindings False ctxt ct-               -- The 'False' means "don't filter the bindings"; see Trac #8191+               -- The 'False' means "don't filter the bindings"; see #8191         ; show_hole_constraints <- goptM Opt_ShowHoleConstraints        ; let constraints_msg@@ -1263,7 +1267,7 @@         constraints =           do { implic@Implic{ ic_given = given } <- cec_encl ctxt              ; constraint <- given-             ; return (varType constraint, tcl_loc (implicLclEnv implic)) }+             ; return (varType constraint, tcl_loc (ic_env implic)) }          pprConstraint (constraint, loc) =           ppr constraint <+> nest 2 (parens (text "from" <+> ppr loc))@@ -1439,13 +1443,13 @@ Here the second equation is unreachable. The original constraint (a~Int) from the signature gets rewritten by the pattern-match to (Bool~Int), so the danger is that we report the error as coming from-the *signature* (Trac #7293).  So, for Given errors we replace the+the *signature* (#7293).  So, for Given errors we replace the env (and hence src-loc) on its CtLoc with that from the immediately enclosing implication.  Note [Error messages for untouchables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #9109)+Consider (#9109)   data G a where { GBool :: G Bool }   foo x = case x of GBool -> True @@ -1640,7 +1644,7 @@         , report         ] -  | OC_Occurs <- occ_check_expand+  | MTVU_Occurs <- occ_check_expand     -- We report an "occurs check" even for  a ~ F t a, where F is a type     -- function; it's not insoluble (because in principle F could reduce)     -- but we have certainly been unable to solve it@@ -1665,10 +1669,10 @@        ; mkErrorMsgFromCt ctxt ct $          mconcat [important main_msg, extra2, extra3, report] } -  | OC_Bad <- occ_check_expand+  | MTVU_Bad <- occ_check_expand   = do { let msg = vcat [ text "Cannot instantiate unification variable"                           <+> quotes (ppr tv1)-                        , hang (text "with a" <+> what <+> text "involving foralls:") 2 (ppr ty2)+                        , hang (text "with a" <+> what <+> text "involving polytypes:") 2 (ppr ty2)                         , nest 2 (text "GHC doesn't yet support impredicative polymorphism") ]        -- Unlike the other reports, this discards the old 'report_important'        -- instead of augmenting it.  This is because the details are not likely@@ -1726,7 +1730,7 @@                                <+> text "bound by"                              , nest 2 $ ppr skol_info                              , nest 2 $ text "at" <+>-                               ppr (tcl_loc (implicLclEnv implic)) ] ]+                               ppr (tcl_loc (ic_env implic)) ] ]        ; mkErrorMsgFromCt ctxt ct (mconcat [msg, tv_extra, report]) }    -- Nastiest case: attempt to unify an untouchable variable@@ -1745,7 +1749,7 @@                       , nest 2 $ text "inside the constraints:" <+> pprEvVarTheta given                       , nest 2 $ text "bound by" <+> ppr skol_info                       , nest 2 $ text "at" <+>-                        ppr (tcl_loc (implicLclEnv implic)) ]+                        ppr (tcl_loc (ic_env implic)) ]              tv_extra = important $ extraTyVarEqInfo ctxt tv1 ty2              add_sig  = important $ suggestAddSig ctxt ty1 ty2        ; mkErrorMsgFromCt ctxt ct $ mconcat@@ -1753,7 +1757,7 @@    | otherwise   = reportEqErr ctxt report ct oriented (mkTyVarTy tv1) ty2-        -- This *can* happen (Trac #6123, and test T2627b)+        -- This *can* happen (#6123, and test T2627b)         -- Consider an ambiguous top-level constraint (a ~ F a)         -- Not an occurs check, because F is a type function.   where@@ -1840,7 +1844,7 @@              -- See Note [Suppress redundant givens during error reporting]              -- for why we use mkMinimalBySCs above.                 2 (sep [ text "bound by" <+> ppr skol_info-                       , text "at" <+> ppr (tcl_loc (implicLclEnv implic)) ])+                       , text "at" <+> ppr (tcl_loc (ic_env implic)) ])  {- Note [Suppress redundant givens during error reporting]@@ -1983,17 +1987,16 @@ -- themselves. pprWithExplicitKindsWhenMismatch :: Type -> Type -> CtOrigin                                  -> SDoc -> SDoc-pprWithExplicitKindsWhenMismatch ty1 ty2 ct =-  pprWithExplicitKindsWhen mismatch+pprWithExplicitKindsWhenMismatch ty1 ty2 ct+  = pprWithExplicitKindsWhen show_kinds   where     (act_ty, exp_ty) = case ct of       TypeEqOrigin { uo_actual = act                    , uo_expected = exp } -> (act, exp)       _                                  -> (ty1, ty2)-    mismatch | Just vis <- tcEqTypeVis act_ty exp_ty-             = not vis-             | otherwise-             = False+    show_kinds = tcEqTypeVis act_ty exp_ty+                 -- True when the visible bit of the types look the same,+                 -- so we want to show the kinds in the displayed type  mkExpectedActualMsg :: Type -> Type -> CtOrigin -> Maybe TypeOrKind -> Bool                     -> (Bool, Maybe SwapFlag, SDoc)@@ -2016,11 +2019,11 @@     level = m_level `orElse` TypeLevel      occurs_check_error-      | Just act_tv <- tcGetTyVar_maybe act-      , act_tv `elemVarSet` tyCoVarsOfType exp+      | Just tv <- tcGetTyVar_maybe ty1+      , tv `elemVarSet` tyCoVarsOfType ty2       = True-      | Just exp_tv <- tcGetTyVar_maybe exp-      , exp_tv `elemVarSet` tyCoVarsOfType act+      | Just tv <- tcGetTyVar_maybe ty2+      , tv `elemVarSet` tyCoVarsOfType ty1       = True       | otherwise       = False@@ -2044,13 +2047,17 @@         -> empty      thing_msg = case maybe_thing of-                  Just thing -> \_ -> quotes thing <+> text "is"-                  Nothing    -> \vowel -> text "got a" <>-                                          if vowel then char 'n' else empty+                  Just thing -> \_ levity ->+                    quotes thing <+> text "is" <+> levity+                  Nothing    -> \vowel levity ->+                    text "got a" <>+                    (if vowel then char 'n' else empty) <+>+                    levity <+>+                    text "type"     msg2 = sep [ text "Expecting a lifted type, but"-               , thing_msg True, text "unlifted" ]+               , thing_msg True (text "unlifted") ]     msg3 = sep [ text "Expecting an unlifted type, but"-               , thing_msg False, text "lifted" ]+               , thing_msg False (text "lifted") ]     msg4 = maybe_num_args_msg $$            sep [ text "Expected a type, but"                , maybe (text "found something with kind")@@ -2115,7 +2122,7 @@  {- Note [Insoluble occurs check wins] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider [G] a ~ [a],  [W] a ~ [a] (Trac #13674).  The Given is insoluble+Consider [G] a ~ [a],  [W] a ~ [a] (#13674).  The Given is insoluble so we don't use it for rewriting.  The Wanted is also insoluble, and we don't solve it from the Given.  It's very confusing to say     Cannot solve a ~ [a] from given constraints a ~ [a]@@ -2208,10 +2215,11 @@           (t1_2', t2_2') = go t1_2 t2_2        in (mkAppTy t1_1' t1_2', mkAppTy t2_1' t2_2') -    go (FunTy t1_1 t1_2) (FunTy t2_1 t2_2) =+    go ty1@(FunTy _ t1_1 t1_2) ty2@(FunTy _ t2_1 t2_2) =       let (t1_1', t2_1') = go t1_1 t2_1           (t1_2', t2_2') = go t1_2 t2_2-       in (mkFunTy t1_1' t1_2', mkFunTy t2_1' t2_2')+       in ( ty1 { ft_arg = t1_1', ft_res = t1_2' }+          , ty2 { ft_arg = t2_1', ft_res = t2_2' })      go (ForAllTy b1 t1) (ForAllTy b2 t2) =       -- NOTE: We may have a bug here, but we just can't reproduce it easily.@@ -2325,11 +2333,11 @@ type variable is bound by an *inferred* signature, and suggests adding a declared signature instead. -This initially came up in Trac #8968, concerning pattern synonyms.+This initially came up in #8968, concerning pattern synonyms.  Note [Disambiguating (X ~ X) errors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See Trac #8278+See #8278  Note [Reporting occurs-check errors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2584,16 +2592,16 @@              _  -> Just $ hang (pprTheta ev_vars_matching)                             2 (sep [ text "bound by" <+> ppr skol_info                                    , text "at" <+>-                                     ppr (tcl_loc (implicLclEnv implic)) ])-        where ev_vars_matching = filter ev_var_matches (map evVarPred evvars)-              ev_var_matches ty = case getClassPredTys_maybe ty of-                 Just (clas', tys')-                   | clas' == clas-                   , Just _ <- tcMatchTys tys tys'-                   -> True-                   | otherwise-                   -> any ev_var_matches (immSuperClasses clas' tys')-                 Nothing -> False+                                     ppr (tcl_loc (ic_env implic)) ])+        where ev_vars_matching = [ pred+                                 | ev_var <- evvars+                                 , let pred = evVarPred ev_var+                                 , any can_match (pred : transSuperClasses pred) ]+              can_match pred+                 = case getClassPredTys_maybe pred of+                     Just (clas', tys') -> clas' == clas+                                          && isJust (tcMatchTys tys tys')+                     Nothing -> False      -- Overlap error because of Safe Haskell (first     -- match should be the most specific match)@@ -2677,7 +2685,7 @@     No instance for (Num Int) arising from the literal ‘3’     There are instances for similar types:       instance Num GHC.Types.Int -- Defined in ‘GHC.Num’-Discussion in Trac #9611.+Discussion in #9611.  Note [Highlighting ambiguous type variables] ~-------------------------------------------@@ -2724,7 +2732,7 @@  So we suppress that Implication in discardProvCtxtGivens.  It's painfully ad-hoc but the truth is that adding it to the "required"-constraints would work.  Suprressing it solves two problems.  First,+constraints would work.  Suppressing it solves two problems.  First, we never tell the user that we could not deduce a "provided" constraint from the "required" context. Second, we never give a possible fix that suggests to add a "provided" constraint to the@@ -2843,7 +2851,7 @@  Note [Kind arguments in error messages] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It can be terribly confusing to get an error message like (Trac #9171)+It can be terribly confusing to get an error message like (#9171)      Couldn't match expected type ‘GetParam Base (GetParam Base Int)’                 with actual type ‘GetParam Base (GetParam Base Int)’@@ -2947,10 +2955,10 @@ -- We must be careful to pass it a zonked type variable, too. -- -- We always remove closed top-level bindings, though,--- since they are never relevant (cf Trac #8233)+-- since they are never relevant (cf #8233)  relevantBindings :: Bool  -- True <=> filter by tyvar; False <=> no filtering-                          -- See Trac #8191+                          -- See #8191                  -> ReportErrCtxt -> Ct                  -> TcM (ReportErrCtxt, SDoc, Ct) -- Also returns the zonked and tidied CtOrigin of the constraint
typecheck/TcEvTerm.hs view
@@ -29,7 +29,7 @@     Var errorId `mkTyApps` [getRuntimeRep ty, ty] `mkApps` [litMsg]   where     errorId = tYPE_ERROR_ID-    litMsg  = Lit (LitString (fastStringToByteString msg))+    litMsg  = Lit (LitString (bytesFS msg))  -- Dictionary for CallStack implicit parameters evCallStack :: (MonadThings m, HasModule m, HasDynFlags m) =>
typecheck/TcEvidence.hs view
@@ -8,7 +8,8 @@   HsWrapper(..),   (<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams,   mkWpLams, mkWpLet, mkWpCastN, mkWpCastR, collectHsWrapBinders,-  mkWpFun, mkWpFuns, idHsWrapper, isIdHsWrapper, pprHsWrapper,+  mkWpFun, idHsWrapper, isIdHsWrapper, isErasableHsWrapper,+  pprHsWrapper,    -- Evidence bindings   TcEvBinds(..), EvBindsVar(..),@@ -29,6 +30,7 @@    -- TcCoercion   TcCoercion, TcCoercionR, TcCoercionN, TcCoercionP, CoercionHole,+  TcMCoercion,   Role(..), LeftOrRight(..), pickLR,   mkTcReflCo, mkTcNomReflCo, mkTcRepReflCo,   mkTcTyConAppCo, mkTcAppCo, mkTcFunCo,@@ -41,7 +43,7 @@   mkTcKindCo,   tcCoercionKind, coVarsOfTcCo,   mkTcCoVarCo,-  isTcReflCo, isTcReflexiveCo,+  isTcReflCo, isTcReflexiveCo, isTcGReflMCo, tcCoToMCo,   tcCoercionRole,   unwrapIP, wrapIP   ) where@@ -62,12 +64,12 @@ import DynFlags   ( gopt, GeneralFlag(Opt_PrintTypecheckerElaboration) ) import VarEnv import VarSet+import Predicate import Name import Pair  import CoreSyn import Class ( classSCSelId )-import Id ( isEvVar ) import CoreFVs ( exprSomeFreeVars )  import Util@@ -97,6 +99,7 @@ type TcCoercionN = CoercionN    -- A Nominal          coercion ~N type TcCoercionR = CoercionR    -- A Representational coercion ~R type TcCoercionP = CoercionP    -- a phantom coercion+type TcMCoercion = MCoercion  mkTcReflCo             :: Role -> TcType -> TcCoercion mkTcSymCo              :: TcCoercion -> TcCoercion@@ -115,7 +118,6 @@ mkTcNthCo              :: Role -> Int -> TcCoercion -> TcCoercion mkTcLRCo               :: LeftOrRight -> TcCoercion -> TcCoercion mkTcSubCo              :: TcCoercionN -> TcCoercionR-maybeTcSubCo           :: EqRel -> TcCoercion -> TcCoercion tcDowngradeRole        :: Role -> Role -> TcCoercion -> TcCoercion mkTcAxiomRuleCo        :: CoAxiomRule -> [TcCoercion] -> TcCoercionR mkTcGReflRightCo       :: Role -> TcType -> TcCoercionN -> TcCoercion@@ -132,6 +134,7 @@ tcCoercionRole         :: TcCoercion -> Role coVarsOfTcCo           :: TcCoercion -> TcTyCoVarSet isTcReflCo             :: TcCoercion -> Bool+isTcGReflMCo           :: TcMCoercion -> Bool  -- | This version does a slow check, calculating the related types and seeing -- if they are equal.@@ -152,7 +155,6 @@ mkTcNthCo              = mkNthCo mkTcLRCo               = mkLRCo mkTcSubCo              = mkSubCo-maybeTcSubCo           = maybeSubCo tcDowngradeRole        = downgradeRole mkTcAxiomRuleCo        = mkAxiomRuleCo mkTcGReflRightCo       = mkGReflRightCo@@ -167,8 +169,19 @@ tcCoercionRole         = coercionRole coVarsOfTcCo           = coVarsOfCo isTcReflCo             = isReflCo+isTcGReflMCo           = isGReflMCo isTcReflexiveCo        = isReflexiveCo +tcCoToMCo :: TcCoercion -> TcMCoercion+tcCoToMCo = coToMCo++-- | If the EqRel is ReprEq, makes a SubCo; otherwise, does nothing.+-- Note that the input coercion should always be nominal.+maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion+maybeTcSubCo NomEq  = id+maybeTcSubCo ReprEq = mkTcSubCo++ {- %************************************************************************ %*                                                                      *@@ -292,21 +305,6 @@ mkWpFun (WpCast co1) (WpCast co2) _  _  _ = WpCast (mkTcFunCo Representational (mkTcSymCo co1) co2) mkWpFun co1          co2          t1 _  d = WpFun co1 co2 t1 d --- | @mkWpFuns [(ty1, wrap1), (ty2, wrap2)] ty_res wrap_res@,--- where @wrap1 :: ty1 "->" ty1'@ and @wrap2 :: ty2 "->" ty2'@,--- @wrap3 :: ty3 "->" ty3'@ and @ty_res@ is /either/ @ty3@ or @ty3'@,--- gives a wrapper @(ty1' -> ty2' -> ty3) "->" (ty1 -> ty2 -> ty3')@.--- Notice that the result wrapper goes the other way round to all--- the others. This is a result of sub-typing contravariance.--- The SDoc is a description of what you were doing when you called mkWpFuns.-mkWpFuns :: [(TcType, HsWrapper)] -> TcType -> HsWrapper -> SDoc -> HsWrapper-mkWpFuns args res_ty res_wrap doc = snd $ go args res_ty res_wrap-  where-    go [] res_ty res_wrap = (res_ty, res_wrap)-    go ((arg_ty, arg_wrap) : args) res_ty res_wrap-      = let (tail_ty, tail_wrap) = go args res_ty res_wrap in-        (arg_ty `mkFunTy` tail_ty, mkWpFun arg_wrap tail_wrap arg_ty tail_ty doc)- mkWpCastR :: TcCoercionR -> HsWrapper mkWpCastR co   | isTcReflCo co = WpHole@@ -355,6 +353,21 @@ isIdHsWrapper WpHole = True isIdHsWrapper _      = False +-- | Is the wrapper erasable, i.e., will not affect runtime semantics?+isErasableHsWrapper :: HsWrapper -> Bool+isErasableHsWrapper = go+  where+    go WpHole                  = True+    go (WpCompose wrap1 wrap2) = go wrap1 && go wrap2+    -- not so sure about WpFun. But it eta-expands, so...+    go WpFun{}                 = False+    go WpCast{}                = True+    go WpEvLam{}               = False -- case in point+    go WpEvApp{}               = False+    go WpTyLam{}               = True+    go WpTyApp{}               = True+    go WpLet{}                 = False+ collectHsWrapBinders :: HsWrapper -> ([Var], HsWrapper) -- Collect the outer lambda binders of a HsWrapper, -- stopping as soon as you get to a non-lambda binder@@ -584,7 +597,7 @@     -- ^ Dictionary for a type literal,     -- e.g. @Typeable "foo"@ or @Typeable 3@     -- The 'EvTerm' is evidence of, e.g., @KnownNat 3@-    -- (see Trac #10348)+    -- (see #10348)   deriving Data.Data  -- | Evidence for @CallStack@ implicit parameters.@@ -633,7 +646,7 @@     g1 :: a~Bool = g |> ax7 a and the constraint     [G] g1 :: a~Bool-See Trac [7238] and Note [Bind new Givens immediately] in TcRnTypes+See #7238 and Note [Bind new Givens immediately] in Constraint  Note [EvBinds/EvTerm] ~~~~~~~~~~~~~~~~~~~~~@@ -655,7 +668,7 @@  Note [Overview of implicit CallStacks] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-(See https://ghc.haskell.org/trac/ghc/wiki/ExplicitCallStack/ImplicitLocations)+(See https://gitlab.haskell.org/ghc/ghc/wikis/explicit-call-stack/implicit-locations)  The goal of CallStack evidence terms is to reify locations in the program source as runtime values, without any support
typecheck/TcExpr.hs view
@@ -24,7 +24,7 @@ import {-# SOURCE #-}   TcSplice( tcSpliceExpr, tcTypedBracket, tcUntypedBracket ) import THNames( liftStringName, liftName ) -import HsSyn+import GHC.Hs import TcHsSyn import TcRnMonad import TcUnify@@ -44,6 +44,7 @@ import TcPatSyn( tcPatSynBuilderOcc, nonBidirectionalErr ) import TcPat import TcMType+import TcOrigin import TcType import Id import IdInfo@@ -56,12 +57,13 @@ import RdrName import TyCon import TyCoRep+import TyCoPpr+import TyCoSubst (substTyWithInScope) import Type import TcEvidence import VarSet-import MkId( seqId ) import TysWiredIn-import TysPrim( intPrimTy, mkTemplateTyVars, tYPE )+import TysPrim( intPrimTy ) import PrimOp( tagToEnumKey ) import PrelNames import DynFlags@@ -78,7 +80,7 @@ import qualified GHC.LanguageExtensions as LangExt  import Data.Function-import Data.List+import Data.List (partition, sortBy, groupBy, intersect) import qualified Data.Set as Set  {-@@ -211,7 +213,7 @@        ; ipClass <- tcLookupClass ipClassName        ; ip_var <- emitWantedEvVar origin (mkClassPred ipClass [ip_name, ip_ty])        ; tcWrapResult e-                   (fromDict ipClass ip_name ip_ty (HsVar noExt (noLoc ip_var)))+                   (fromDict ipClass ip_name ip_ty (HsVar noExtField (noLoc ip_var)))                    ip_ty res_ty }   where   -- Coerces a dictionary for `IP "x" t` into `t`.@@ -230,7 +232,7 @@                          ; loc <- getSrcSpanM                          ; var <- emitWantedEvVar origin pred                          ; tcWrapResult e-                                       (fromDict pred (HsVar noExt (L loc var)))+                                       (fromDict pred (HsVar noExtField (L loc var)))                                         alpha res_ty } }   where   -- Coerces a dictionary for `IsLabel "x" t` into `t`,@@ -240,9 +242,9 @@   lbl = mkStrLitTy l    applyFromLabel loc fromLabel =-    HsAppType noExt-         (L loc (HsVar noExt (L loc fromLabel)))-         (mkEmptyWildCardBndrs (L loc (HsTyLit noExt (HsStrTy NoSourceText l))))+    HsAppType noExtField+         (L loc (HsVar noExtField (L loc fromLabel)))+         (mkEmptyWildCardBndrs (L loc (HsTyLit noExtField (HsStrTy NoSourceText l))))  tcExpr (HsLam x match) res_ty   = do  { (match', wrap) <- tcMatchLambda herald match_ctxt match res_ty@@ -271,7 +273,7 @@        ; sig_info <- checkNoErrs $  -- Avoid error cascade                      tcUserTypeSig loc sig_ty Nothing        ; (expr', poly_ty) <- tcExprSig expr sig_info-       ; let expr'' = ExprWithTySig noExt expr' sig_ty+       ; let expr'' = ExprWithTySig noExtField expr' sig_ty        ; tcWrapResult e expr'' poly_ty res_ty }  {-@@ -331,40 +333,10 @@   * Decompose it; should be of form (arg2_ty -> res_ty),        where arg2_ty might be a polytype   * Use arg2_ty to typecheck arg2--Note [Typing rule for seq]-~~~~~~~~~~~~~~~~~~~~~~~~~~-We want to allow-       x `seq` (# p,q #)-which suggests this type for seq:-   seq :: forall (a:*) (b:Open). a -> b -> b,-with (b:Open) meaning that be can be instantiated with an unboxed-tuple.  The trouble is that this might accept a partially-applied-'seq', and I'm just not certain that would work.  I'm only sure it's-only going to work when it's fully applied, so it turns into-    case x of _ -> (# p,q #)--So it seems more uniform to treat 'seq' as if it was a language-construct.--See also Note [seqId magic] in MkId -}  tcExpr expr@(OpApp fix arg1 op arg2) res_ty   | (L loc (HsVar _ (L lv op_name))) <- op-  , op_name `hasKey` seqIdKey           -- Note [Typing rule for seq]-  = do { arg1_ty <- newFlexiTyVarTy liftedTypeKind-       ; let arg2_exp_ty = res_ty-       ; arg1' <- tcArg op arg1 arg1_ty 1-       ; arg2' <- addErrCtxt (funAppCtxt op arg2 2) $-                  tc_poly_expr_nc arg2 arg2_exp_ty-       ; arg2_ty <- readExpType arg2_exp_ty-       ; op_id <- tcLookupId op_name-       ; let op' = L loc (mkHsWrap (mkWpTyApps [arg1_ty, arg2_ty])-                                   (HsVar noExt (L lv op_id)))-       ; return $ OpApp fix arg1' op' arg2' }--  | (L loc (HsVar _ (L lv op_name))) <- op   , op_name `hasKey` dollarIdKey        -- Note [Typing rule for ($)]   = do { traceTc "Application rule" (ppr op)        ; (arg1', arg1_ty) <- tcInferSigma arg1@@ -378,49 +350,42 @@          -- So: arg1_ty = arg2_ty -> op_res_ty          -- where arg2_sigma maybe polymorphic; that's the point -       ; arg2'  <- tcArg op arg2 arg2_sigma 2+       ; arg2' <- tcArg op arg2 arg2_sigma 2         -- Make sure that the argument type has kind '*'        --   ($) :: forall (r:RuntimeRep) (a:*) (b:TYPE r). (a->b) -> a -> b-       -- Eg we do not want to allow  (D#  $  4.0#)   Trac #5570+       -- Eg we do not want to allow  (D#  $  4.0#)   #5570        --    (which gives a seg fault)-       ---       -- The *result* type can have any kind (Trac #8739),-       -- so we don't need to check anything for that        ; _ <- unifyKind (Just (XHsType $ NHsCoreTy arg2_sigma))                         (tcTypeKind arg2_sigma) liftedTypeKind-           -- ignore the evidence. arg2_sigma must have type * or #,-           -- because we know arg2_sigma -> or_res_ty is well-kinded+           -- Ignore the evidence. arg2_sigma must have type * or #,+           -- because we know (arg2_sigma -> op_res_ty) is well-kinded            -- (because otherwise matchActualFunTys would fail)-           -- There's no possibility here of, say, a kind family reducing to *.+           -- So this 'unifyKind' will either succeed with Refl, or will+           -- produce an insoluble constraint * ~ #, which we'll report later. -       ; wrap_res <- tcSubTypeHR orig1 (Just expr) op_res_ty res_ty-                       -- op_res -> res+       -- NB: unlike the argument type, the *result* type, op_res_ty can+       -- have any kind (#8739), so we don't need to check anything for that         ; op_id  <- tcLookupId op_name-       ; res_ty <- readExpType res_ty-       ; let op' = L loc (mkHsWrap (mkWpTyApps [ getRuntimeRep res_ty+       ; let op' = L loc (mkHsWrap (mkWpTyApps [ getRuntimeRep op_res_ty                                                , arg2_sigma-                                               , res_ty])-                                   (HsVar noExt (L lv op_id)))+                                               , op_res_ty])+                                   (HsVar noExtField (L lv op_id)))              -- arg1' :: arg1_ty              -- wrap_arg1 :: arg1_ty "->" (arg2_sigma -> op_res_ty)-             -- wrap_res :: op_res_ty "->" res_ty-             -- op' :: (a2_ty -> res_ty) -> a2_ty -> res_ty+             -- op' :: (a2_ty -> op_res_ty) -> a2_ty -> op_res_ty -             -- wrap1 :: arg1_ty "->" (arg2_sigma -> res_ty)-             wrap1 = mkWpFun idHsWrapper wrap_res arg2_sigma res_ty doc-                     <.> wrap_arg1-             doc = text "When looking at the argument to ($)"+             expr' = OpApp fix (mkLHsWrap wrap_arg1 arg1') op' arg2' -       ; return (OpApp fix (mkLHsWrap wrap1 arg1') op' arg2') }+       ; tcWrapResult expr expr' op_res_ty res_ty }    | (L loc (HsRecFld _ (Ambiguous _ lbl))) <- op   , Just sig_ty <- obviousSig (unLoc arg1)     -- See Note [Disambiguating record fields]   = do { sig_tc_ty <- tcHsSigWcType ExprSigCtxt sig_ty        ; sel_name <- disambiguateSelector lbl sig_tc_ty-       ; let op' = L loc (HsRecFld noExt (Unambiguous sel_name lbl))+       ; let op' = L loc (HsRecFld noExtField (Unambiguous sel_name lbl))        ; tcExpr (OpApp fix arg1 op' arg2) res_ty        } @@ -439,7 +404,7 @@        ; (wrap_fun, [arg1_ty, arg2_ty], op_res_ty)                   <- matchActualFunTys (mk_op_msg op) fn_orig (Just (unLoc op)) 2 op_ty        ; wrap_res <- tcSubTypeHR SectionOrigin (Just expr)-                                 (mkFunTy arg1_ty op_res_ty) res_ty+                                 (mkVisFunTy arg1_ty op_res_ty) res_ty        ; arg2' <- tcArg op arg2 arg2_ty 2        ; return ( mkHsWrap wrap_res $                   SectionR x (mkLHsWrap wrap_fun op') arg2' ) }@@ -447,7 +412,7 @@     fn_orig = lexprCtOrigin op     -- It's important to use the origin of 'op', so that call-stacks     -- come out right; they are driven by the OccurrenceOf CtOrigin-    -- See Trac #13285+    -- See #13285  tcExpr expr@(SectionL x arg1 op) res_ty   = do { (op', op_ty) <- tcInferFun op@@ -459,7 +424,7 @@            <- matchActualFunTys (mk_op_msg op) fn_orig (Just (unLoc op))                                 n_reqd_args op_ty        ; wrap_res <- tcSubTypeHR SectionOrigin (Just expr)-                                 (mkFunTys arg_tys op_res_ty) res_ty+                                 (mkVisFunTys arg_tys op_res_ty) res_ty        ; arg1' <- tcArg op arg1 arg1_ty 1        ; return ( mkHsWrap wrap_res $                   SectionL x arg1' (mkLHsWrap wrap_fn op') ) }@@ -467,12 +432,14 @@     fn_orig = lexprCtOrigin op     -- It's important to use the origin of 'op', so that call-stacks     -- come out right; they are driven by the OccurrenceOf CtOrigin-    -- See Trac #13285+    -- See #13285  tcExpr expr@(ExplicitTuple x tup_args boxity) res_ty   | all tupArgPresent tup_args   = do { let arity  = length tup_args              tup_tc = tupleTyCon boxity arity+               -- NB: tupleTyCon doesn't flatten 1-tuples+               -- See Note [Don't flatten tuples from HsSyn] in MkCore        ; res_ty <- expTypeToType res_ty        ; (coi, arg_tys) <- matchExpectedTyConApp tup_tc res_ty                            -- Unboxed tuples have RuntimeRep vars, which we@@ -491,8 +458,9 @@            { Boxed   -> newFlexiTyVarTys arity liftedTypeKind            ; Unboxed -> replicateM arity newOpenFlexiTyVarTy }        ; let actual_res_ty-                 = mkFunTys [ty | (ty, (L _ (Missing _))) <- arg_tys `zip` tup_args]-                            (mkTupleTy boxity arg_tys)+                 = mkVisFunTys [ty | (ty, (L _ (Missing _))) <- arg_tys `zip` tup_args]+                            (mkTupleTy1 boxity arg_tys)+                   -- See Note [Don't flatten tuples from HsSyn] in MkCore         ; wrap <- tcSubTypeHR (Shouldn'tHappenOrigin "ExpTuple")                              (Just expr)@@ -512,6 +480,8 @@        ; expr' <- tcPolyExpr expr (arg_tys' `getNth` (alt - 1))        ; return $ mkHsWrapCo coi (ExplicitSum arg_tys' alt arity expr' ) } +-- This will see the empty list only when -XOverloadedLists.+-- See Note [Empty lists] in GHC.Hs.Expr. tcExpr (ExplicitList _ witness exprs) res_ty   = case witness of       Nothing   -> do  { res_ty <- expTypeToType res_ty@@ -639,10 +609,11 @@         ; emitStaticConstraints lie          -- Wrap the static form with the 'fromStaticPtr' call.-        ; fromStaticPtr <- newMethodFromName StaticOrigin fromStaticPtrName p_ty+        ; fromStaticPtr <- newMethodFromName StaticOrigin fromStaticPtrName+                                             [p_ty]         ; let wrap = mkWpTyApps [expr_ty]         ; loc <- getSrcSpanM-        ; return $ mkHsWrapCo co $ HsApp noExt+        ; return $ mkHsWrapCo co $ HsApp noExtField                                          (L loc $ mkHsWrap wrap fromStaticPtr)                                          (L loc (HsStatic fvs expr'))         }@@ -700,7 +671,7 @@ not (T a b c),   because 'b' *is not* mentioned in a non-updated field not (T a b' c'), because 'c' *is*     mentioned in a non-updated field NB that it's not good enough to look at just one constructor; we must-look at them all; cf Trac #3219+look at them all; cf #3219  After all, upd should be equivalent to:         upd t x = case t of@@ -1040,7 +1011,7 @@   = do { (wrap, elt_ty, wit') <- arithSeqEltType witness res_ty        ; expr' <- tcPolyExpr expr elt_ty        ; enum_from <- newMethodFromName (ArithSeqOrigin seq)-                              enumFromName elt_ty+                              enumFromName [elt_ty]        ; return $ mkHsWrap wrap $          ArithSeq enum_from wit' (From expr') } @@ -1049,7 +1020,7 @@        ; expr1' <- tcPolyExpr expr1 elt_ty        ; expr2' <- tcPolyExpr expr2 elt_ty        ; enum_from_then <- newMethodFromName (ArithSeqOrigin seq)-                              enumFromThenName elt_ty+                              enumFromThenName [elt_ty]        ; return $ mkHsWrap wrap $          ArithSeq enum_from_then wit' (FromThen expr1' expr2') } @@ -1058,7 +1029,7 @@        ; expr1' <- tcPolyExpr expr1 elt_ty        ; expr2' <- tcPolyExpr expr2 elt_ty        ; enum_from_to <- newMethodFromName (ArithSeqOrigin seq)-                              enumFromToName elt_ty+                              enumFromToName [elt_ty]        ; return $ mkHsWrap wrap $          ArithSeq enum_from_to wit' (FromTo expr1' expr2') } @@ -1068,7 +1039,7 @@         ; expr2' <- tcPolyExpr expr2 elt_ty         ; expr3' <- tcPolyExpr expr3 elt_ty         ; eft <- newMethodFromName (ArithSeqOrigin seq)-                              enumFromThenToName elt_ty+                              enumFromThenToName [elt_ty]         ; return $ mkHsWrap wrap $           ArithSeq eft wit' (FromThenTo expr1' expr2' expr3') } @@ -1093,7 +1064,7 @@ ************************************************************************ -} --- HsArg is defined in HsTypes.hs+-- HsArg is defined in GHC.Hs.Types  wrapHsArgs :: (NoGhcTc (GhcPass id) ~ GhcRn)            => LHsExpr (GhcPass id)@@ -1102,13 +1073,17 @@ wrapHsArgs f []                     = f wrapHsArgs f (HsValArg  a : args)   = wrapHsArgs (mkHsApp f a)          args wrapHsArgs f (HsTypeArg _ t : args) = wrapHsArgs (mkHsAppType f t)      args-wrapHsArgs f (HsArgPar sp : args)   = wrapHsArgs (L sp $ HsPar noExt f) args+wrapHsArgs f (HsArgPar sp : args)   = wrapHsArgs (L sp $ HsPar noExtField f) args  isHsValArg :: HsArg tm ty -> Bool isHsValArg (HsValArg {})  = True isHsValArg (HsTypeArg {}) = False isHsValArg (HsArgPar {})  = False +isHsTypeArg :: HsArg tm ty -> Bool+isHsTypeArg (HsTypeArg {}) = True+isHsTypeArg _              = False+ isArgPar :: HsArg tm ty -> Bool isArgPar (HsArgPar {})  = True isArgPar (HsValArg {})  = False@@ -1154,39 +1129,14 @@        ; (tc_fun, fun_ty) <- tcInferRecSelId (Unambiguous sel_name lbl)        ; tcFunApp m_herald fun (L loc tc_fun) fun_ty args res_ty } -tcApp m_herald fun@(L loc (HsVar _ (L _ fun_id))) args res_ty+tcApp _m_herald (L loc (HsVar _ (L _ fun_id))) args res_ty   -- Special typing rule for tagToEnum#   | fun_id `hasKey` tagToEnumKey   , n_val_args == 1   = tcTagToEnum loc fun_id args res_ty--  -- Special typing rule for 'seq'-  -- In the saturated case, behave as if seq had type-  --    forall a (b::TYPE r). a -> b -> b-  -- for some type r.  See Note [Typing rule for seq]-  | fun_id `hasKey` seqIdKey-  , n_val_args == 2-  = do { rep <- newFlexiTyVarTy runtimeRepTy-       ; let [alpha, beta] = mkTemplateTyVars [liftedTypeKind, tYPE rep]-             seq_ty = mkSpecForAllTys [alpha,beta]-                      (mkTyVarTy alpha `mkFunTy` mkTyVarTy beta `mkFunTy` mkTyVarTy beta)-             seq_fun = L loc (HsVar noExt (L loc seqId))-             -- seq_ty = forall (a:*) (b:TYPE r). a -> b -> b-             -- where 'r' is a meta type variable-        ; tcFunApp m_herald fun seq_fun seq_ty args res_ty }   where     n_val_args = count isHsValArg args -tcApp _ (L loc (ExplicitList _ Nothing [])) [HsTypeArg _ ty_arg] res_ty-  -- See Note [Visible type application for the empty list constructor]-  = do { ty_arg' <- tcHsTypeApp ty_arg liftedTypeKind-       ; let list_ty = TyConApp listTyCon [ty_arg']-       ; _ <- tcSubTypeDS (OccurrenceOf nilDataConName) GenSigCtxt-                          list_ty res_ty-       ; let expr :: LHsExpr GhcTcId-             expr = L loc $ ExplicitList ty_arg' Nothing []-       ; return (idHsWrapper, expr, []) }- tcApp m_herald fun args res_ty   = do { (tc_fun, fun_ty) <- tcInferFun fun        ; tcFunApp m_herald fun tc_fun fun_ty args res_ty }@@ -1238,26 +1188,6 @@ mk_op_msg :: LHsExpr GhcRn -> SDoc mk_op_msg op = text "The operator" <+> quotes (ppr op) <+> text "takes" -{--Note [Visible type application for the empty list constructor]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Getting the expression [] @Int to typecheck is slightly tricky since [] isn't-an ordinary data constructor. By default, when tcExpr typechecks a list-expression, it wraps the expression in a coercion, which gives it a type to the-effect of p[a]. It isn't until later zonking that the type becomes-forall a. [a], but that's too late for visible type application.--The workaround is to check for empty list expressions that have a visible type-argument in tcApp, and if so, directly typecheck [] @ty data constructor name.-This avoids the intermediate coercion and produces an expression of type [ty],-as one would intuitively expect.--Unfortunately, this workaround isn't terribly robust, since more involved-expressions such as (let in []) @Int won't work. Until a more elegant fix comes-along, however, this at least allows direct type application on [] to work,-which is better than before.--}- ---------------- tcInferFun :: LHsExpr GhcRn -> TcM (LHsExpr GhcTcId, TcSigmaType) -- Infer type of a function@@ -1274,7 +1204,7 @@ tcInferFun fun   = tcInferSigma fun       -- NB: tcInferSigma; see TcUnify-      -- Note [Deep instantiation of InferResult]+      -- Note [Deep instantiation of InferResult] in TcUnify   ----------------@@ -1288,6 +1218,14 @@        -> TcM (HsWrapper, [LHsExprArgOut], TcSigmaType)           -- ^ (a wrapper for the function, the tc'd args, result type) tcArgs fun orig_fun_ty fun_orig orig_args herald+  | fun_is_out_of_scope+  , any isHsTypeArg orig_args+  = failM  -- See Note [VTA for out-of-scope functions]+    -- We have /already/ emitted a CHoleCan constraint (in tcInferFun),+    -- which will later cough up a "Variable not in scope error", so+    -- we can simply fail now, avoiding a confusing error cascade++  | otherwise   = go [] 1 orig_fun_ty orig_args   where     -- Don't count visible type arguments when determining how many arguments@@ -1296,6 +1234,11 @@     -- See Note [Herald for matchExpectedFunTys] in TcUnify.     orig_expr_args_arity = count isHsValArg orig_args +    fun_is_out_of_scope  -- See Note [VTA for out-of-scope functions]+      = case fun of+          L _ (HsUnboundVar {}) -> True+          _                     -> False+     go _ _ fun_ty [] = return (idHsWrapper, [], fun_ty)      go acc_args n fun_ty (HsArgPar sp : args)@@ -1362,7 +1305,7 @@  {- Note [Required quantifiers in the type of a term] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #15859)+Consider (#15859)    data A k :: k -> Type      -- A      :: forall k -> k -> Type   type KindOf (a :: k) = k   -- KindOf :: forall k. k -> Type@@ -1379,6 +1322,33 @@ The ice is thin; c.f. Note [No Required TyCoBinder in terms] in TyCoRep. +Note [VTA for out-of-scope functions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose 'wurble' is not in scope, and we have+   (wurble @Int @Bool True 'x')++Then the renamer will make (HsUnboundVar "wurble) for 'wurble',+and the typechecker will typecheck it with tcUnboundId, giving it+a type 'alpha', and emitting a deferred CHoleCan constraint, to+be reported later.++But then comes the visible type application. If we do nothing, we'll+generate an immediate failure (in tc_app_err), saying that a function+of type 'alpha' can't be applied to Bool.  That's insane!  And indeed+users complain bitterly (#13834, #17150.)++The right error is the CHoleCan, which reports 'wurble' as out of+scope, and tries to give its type.++Fortunately in tcArgs we still have acces to the function, so+we can check if it is a HsUnboundVar.  If so, we simply fail+immediately.  We've already inferred the type of the function,+so we'll /already/ have emitted a CHoleCan constraint; failing+preserves that constraint.++A mild shortcoming of this approach is that we thereby+don't typecheck any of the arguments, but so be it.+ Note [Visible type application zonk] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Substitutions should be kind-preserving, so we need kind(tv) = kind(ty_arg).@@ -1390,7 +1360,7 @@  So we must zonk inner_ty as well, to guarantee consistency between zonk(tv) and inner_ty.  Otherwise we can build an ill-kinded type.  An example was-Trac #14158, where we had:+#14158, where we had:    id :: forall k. forall (cat :: k -> k -> *). forall (a :: k). cat a a and we had the visible type application   id @(->)@@ -1405,7 +1375,7 @@   but we must first zonk the inner_ty to get       forall (a :: TYPE q1). cat a a   so that the result of substitution is well-kinded-  Failing to do so led to Trac #14158.+  Failing to do so led to #14158. -}  ----------------@@ -1425,7 +1395,7 @@     go (L l (Missing {}),   arg_ty) = return (L l (Missing arg_ty))     go (L l (Present x expr), arg_ty) = do { expr' <- tcPolyExpr expr arg_ty                                            ; return (L l (Present x expr')) }-    go (L _ (XTupArg{}), _) = panic "tcTupArgs"+    go (L _ (XTupArg nec), _) = noExtCon nec  --------------------------- -- See TcType.SyntaxOpType also for commentary@@ -1451,9 +1421,11 @@               -> TcM (a, SyntaxExpr GhcTcId) tcSyntaxOpGen orig op arg_tys res_ty thing_inside   = do { (expr, sigma) <- tcInferSigma $ noLoc $ syn_expr op+       ; traceTc "tcSyntaxOpGen" (ppr op $$ ppr expr $$ ppr sigma)        ; (result, expr_wrap, arg_wraps, res_wrap)            <- tcSynArgA orig sigma arg_tys res_ty $               thing_inside+       ; traceTc "tcSyntaxOpGen" (ppr op $$ ppr expr $$ ppr sigma )        ; return (result, SyntaxExpr { syn_expr = mkHsWrap expr_wrap $ unLoc expr                                     , syn_arg_wraps = arg_wraps                                     , syn_res_wrap  = res_wrap }) }@@ -1702,7 +1674,7 @@    e :: _ => IO _     do not apply the MR just like in TcBinds.decideGeneralisationPlan -This makes a difference (Trac #11670):+This makes a difference (#11670):    peek :: Ptr a -> IO CLong    peek ptr = peekElemOff undefined 0 :: _ from (peekElemOff undefined 0) we get@@ -1725,14 +1697,14 @@ tcCheckId name res_ty   = do { (expr, actual_res_ty) <- tcInferId name        ; traceTc "tcCheckId" (vcat [ppr name, ppr actual_res_ty, ppr res_ty])-       ; addFunResCtxt False (HsVar noExt (noLoc name)) actual_res_ty res_ty $-         tcWrapResultO (OccurrenceOf name) (HsVar noExt (noLoc name)) expr+       ; addFunResCtxt False (HsVar noExtField (noLoc name)) actual_res_ty res_ty $+         tcWrapResultO (OccurrenceOf name) (HsVar noExtField (noLoc name)) expr                                                           actual_res_ty res_ty }  tcCheckRecSelId :: HsExpr GhcRn -> AmbiguousFieldOcc GhcRn -> ExpRhoType -> TcM (HsExpr GhcTcId) tcCheckRecSelId rn_expr f@(Unambiguous _ (L _ lbl)) res_ty   = do { (expr, actual_res_ty) <- tcInferRecSelId f-       ; addFunResCtxt False (HsRecFld noExt f) actual_res_ty res_ty $+       ; addFunResCtxt False (HsRecFld noExtField f) actual_res_ty res_ty $          tcWrapResultO (OccurrenceOfRecSel lbl) rn_expr expr actual_res_ty res_ty } tcCheckRecSelId rn_expr (Ambiguous _ lbl) res_ty   = case tcSplitFunTy_maybe =<< checkingExpType_maybe res_ty of@@ -1740,7 +1712,7 @@       Just (arg, _) -> do { sel_name <- disambiguateSelector lbl arg                           ; tcCheckRecSelId rn_expr (Unambiguous sel_name lbl)                                                     res_ty }-tcCheckRecSelId _ (XAmbiguousFieldOcc _) _ = panic "tcCheckRecSelId"+tcCheckRecSelId _ (XAmbiguousFieldOcc nec) _ = noExtCon nec  ------------------------ tcInferRecSelId :: AmbiguousFieldOcc GhcRn -> TcM (HsExpr GhcTcId, TcRhoType)@@ -1749,7 +1721,7 @@        ; return (expr', ty) } tcInferRecSelId (Ambiguous _ lbl)   = ambiguousSelector lbl-tcInferRecSelId (XAmbiguousFieldOcc _) = panic "tcInferRecSelId"+tcInferRecSelId (XAmbiguousFieldOcc nec) = noExtCon nec  ------------------------ tcInferId :: Name -> TcM (HsExpr GhcTcId, TcSigmaType)@@ -1778,7 +1750,7 @@   = do { assert_error_id <- tcLookupId assertErrorName        ; (wrap, id_rho) <- topInstantiate (OccurrenceOf assert_name)                                           (idType assert_error_id)-       ; return (mkHsWrap wrap (HsVar noExt (noLoc assert_error_id)), id_rho)+       ; return (mkHsWrap wrap (HsVar noExtField (noLoc assert_error_id)), id_rho)        }  tc_infer_id :: RdrName -> Name -> TcM (HsExpr GhcTcId, TcSigmaType)@@ -1804,12 +1776,12 @@              _ -> failWithTc $                   ppr thing <+> text "used where a value identifier was expected" }   where-    return_id id = return (HsVar noExt (noLoc id), idType id)+    return_id id = return (HsVar noExtField (noLoc id), idType id)      return_data_con con        -- For data constructors, must perform the stupid-theta check       | null stupid_theta-      = return (HsConLikeOut noExt (RealDataCon con), con_ty)+      = return (HsConLikeOut noExtField (RealDataCon con), con_ty)        | otherwise        -- See Note [Instantiating stupid theta]@@ -1820,7 +1792,7 @@                  rho'   = substTy subst rho            ; wrap <- instCall (OccurrenceOf id_name) tys' theta'            ; addDataConStupidTheta con tys'-           ; return ( mkHsWrap wrap (HsConLikeOut noExt (RealDataCon con))+           ; return ( mkHsWrap wrap (HsConLikeOut noExtField (RealDataCon con))                     , rho') }        where@@ -1842,14 +1814,14 @@ -- Id; and indeed the evidence for the CHoleCan does bind it, so it's -- not unbound any more! tcUnboundId rn_expr unbound res_ty- = do { ty <- newOpenFlexiTyVarTy  -- Allow Int# etc (Trac #12531)+ = do { ty <- newOpenFlexiTyVarTy  -- Allow Int# etc (#12531)       ; let occ = unboundVarOcc unbound       ; name <- newSysName occ       ; let ev = mkLocalId name ty       ; can <- newHoleCt (ExprHole unbound) ev ty       ; emitInsoluble can-      ; tcWrapResultO (UnboundOccurrenceOf occ) rn_expr (HsVar noExt (noLoc ev))-                                                                     ty res_ty }+      ; tcWrapResultO (UnboundOccurrenceOf occ) rn_expr+          (HsVar noExtField (noLoc ev)) ty res_ty }   {-@@ -1945,7 +1917,7 @@                  (mk_error ty' doc2)         ; arg' <- tcMonoExpr arg (mkCheckExpType intPrimTy)-       ; let fun' = L loc (mkHsWrap (WpTyApp rep_ty) (HsVar noExt (L loc fun)))+       ; let fun' = L loc (mkHsWrap (WpTyApp rep_ty) (HsVar noExtField (L loc fun)))              rep_ty = mkTyConApp rep_tc rep_args              out_args = concat               [ pars1@@ -1974,7 +1946,7 @@   where     pp (HsValArg e)                             = ppr e     pp (HsTypeArg _ (HsWC { hswc_body = L _ t })) = pprHsType t-    pp (HsTypeArg _ (XHsWildCardBndrs _)) = panic "too_many_args"+    pp (HsTypeArg _ (XHsWildCardBndrs nec)) = noExtCon nec     pp (HsArgPar _) = empty  @@ -2034,12 +2006,13 @@         ; lift <- if isStringTy id_ty then                      do { sid <- tcLookupId THNames.liftStringName                                      -- See Note [Lifting strings]-                        ; return (HsVar noExt (noLoc sid)) }+                        ; return (HsVar noExtField (noLoc sid)) }                   else                      setConstraintVar lie_var   $                           -- Put the 'lift' constraint into the right LIE                      newMethodFromName (OccurrenceOf id_name)-                                       THNames.liftName id_ty+                                       THNames.liftName+                                       [getRuntimeRep id_ty, id_ty]                     -- Update the pending splices         ; ps <- readMutVar ps_var@@ -2195,7 +2168,7 @@ omitted. Moreover, this might change the behaviour of typechecker in non-obvious ways. -See also Note [HsRecField and HsRecUpdField] in HsPat.+See also Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat. -}  -- Given a RdrName that refers to multiple record fields, and the type@@ -2449,7 +2422,7 @@            ; return Nothing }   where         field_lbl = occNameFS $ rdrNameOcc (unLoc lbl)-tcRecordField _ _ (L _ (XFieldOcc _)) _ = panic "tcRecordField"+tcRecordField _ _ (L _ (XFieldOcc nec)) _ = noExtCon nec   checkMissingFields ::  ConLike -> HsRecordBinds GhcRn -> TcM ()@@ -2689,7 +2662,7 @@    r { x=e1, y=e2, z=e3 }, we  Finding the smallest subset is hard, so the code here makes-a decent stab, no more.  See Trac #7989.+a decent stab, no more.  See #7989. -}  naughtyRecordSel :: RdrName -> SDoc
typecheck/TcExpr.hs-boot view
@@ -1,9 +1,10 @@ module TcExpr where import Name-import HsSyn    ( HsExpr, LHsExpr, SyntaxExpr )+import GHC.Hs    ( HsExpr, LHsExpr, SyntaxExpr ) import TcType   ( TcRhoType, TcSigmaType, SyntaxOpType, ExpType, ExpRhoType )-import TcRnTypes( TcM, CtOrigin )-import HsExtension ( GhcRn, GhcTcId )+import TcRnTypes( TcM )+import TcOrigin ( CtOrigin )+import GHC.Hs.Extension ( GhcRn, GhcTcId )  tcPolyExpr ::           LHsExpr GhcRn@@ -15,11 +16,11 @@        -> ExpRhoType        -> TcM (LHsExpr GhcTcId) -tcInferSigma, tcInferSigmaNC ::+tcInferSigma ::           LHsExpr GhcRn        -> TcM (LHsExpr GhcTcId, TcSigmaType) -tcInferRho ::+tcInferRho, tcInferRhoNC ::           LHsExpr GhcRn        -> TcM (LHsExpr GhcTcId, TcRhoType) 
typecheck/TcFlatten.hs view
@@ -1,8 +1,9 @@-{-# LANGUAGE CPP, ViewPatterns, BangPatterns #-}+{-# LANGUAGE CPP, DeriveFunctor, ViewPatterns, BangPatterns #-}  module TcFlatten(    FlattenMode(..),    flatten, flattenKind, flattenArgsNom,+   rewriteTyVar,     unflattenWanteds  ) where@@ -12,6 +13,9 @@ import GhcPrelude  import TcRnTypes+import TyCoPpr       ( pprTyVar )+import Constraint+import Predicate import TcType import Type import TcEvidence@@ -29,6 +33,7 @@ import Bag import Control.Monad import MonadUtils    ( zipWith3M )+import Data.Foldable ( foldrM )  import Control.Arrow ( first ) @@ -222,7 +227,7 @@  Note [Unflattening can force the solver to iterate] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Look at Trac #10340:+Look at #10340:    type family Any :: *   -- No instances    get :: MonadState s m => m s    instance MonadState s (State s) where ...@@ -426,7 +431,7 @@ G a ~ Bool.  ---------------------------Trac #9318 has a very simple program leading to+#9318 has a very simple program leading to    [W] F Int ~ Int   [W] F Int ~ Bool@@ -453,7 +458,8 @@  data FlattenEnv   = FE { fe_mode    :: !FlattenMode-       , fe_loc     :: !CtLoc             -- See Note [Flattener CtLoc]+       , fe_loc     :: CtLoc              -- See Note [Flattener CtLoc]+                      -- unbanged because it's bogus in rewriteTyVar        , fe_flavour :: !CtFlavour        , fe_eq_rel  :: !EqRel             -- See Note [Flattener EqRels]        , fe_work    :: !FlatWorkListRef } -- See Note [The flattening work list]@@ -485,15 +491,13 @@ -- See Note [The flattening work list]. newtype FlatM a   = FlatM { runFlatM :: FlattenEnv -> TcS a }+  deriving (Functor)  instance Monad FlatM where   m >>= k  = FlatM $ \env ->              do { a  <- runFlatM m env                 ; runFlatM (k a) env } -instance Functor FlatM where-  fmap = liftM- instance Applicative FlatM where   pure x = FlatM $ const (pure x)   (<*>) = ap@@ -519,7 +523,8 @@ runFlatten mode loc flav eq_rel thing_inside   = do { flat_ref <- newTcRef []        ; let fmode = FE { fe_mode = mode-                        , fe_loc  = loc+                        , fe_loc  = bumpCtLocDepth loc+                            -- See Note [Flatten when discharging CFunEqCan]                         , fe_flavour = flav                         , fe_eq_rel = eq_rel                         , fe_work = flat_ref }@@ -625,7 +630,7 @@    * Processing w3 first is BAD, because we can't reduce i t,so it'll     get put into the inert set, and later kicked out when w1, w2 are-    solved.  In Trac #9872 this led to inert sets containing hundreds+    solved.  In #9872 this led to inert sets containing hundreds     of suspended calls.    * So we want to process w1, w2 first.@@ -742,8 +747,27 @@ *  They are all wrapped in runFlatten, so their                        * *  flattening work gets put into the work list                         * *                                                                      *-********************************************************************* -}+********************************************************************* +Note [rewriteTyVar]+~~~~~~~~~~~~~~~~~~~~~~+Suppose we have an injective function F and+  inert_funeqs:   F t1 ~ fsk1+                  F t2 ~ fsk2+  inert_eqs:      fsk1 ~ [a]+                  a ~ Int+                  fsk2 ~ [Int]++We never rewrite the RHS (cc_fsk) of a CFunEqCan. But we /do/ want to get the+[D] t1 ~ t2 from the injectiveness of F. So we flatten cc_fsk of CFunEqCans+when trying to find derived equalities arising from injectivity.+-}++-- | See Note [Flattening].+-- If (xi, co) <- flatten mode ev ty, then co :: xi ~r ty+-- where r is the role in @ev@. If @mode@ is 'FM_FlattenAll',+-- then 'xi' is almost function-free (Note [Almost function-free]+-- in TcRnTypes). flatten :: FlattenMode -> CtEvidence -> TcType         -> TcS (Xi, TcCoercion) flatten mode ev ty@@ -752,8 +776,27 @@        ; traceTcS "flatten }" (ppr ty')        ; return (ty', co) } +-- Apply the inert set as an *inert generalised substitution* to+-- a variable, zonking along the way.+-- See Note [inert_eqs: the inert equalities] in TcSMonad.+-- Equivalently, this flattens the variable with respect to NomEq+-- in a Derived constraint. (Why Derived? Because Derived allows the+-- most about of rewriting.) Returns no coercion, because we're+-- using Derived constraints.+-- See Note [rewriteTyVar]+rewriteTyVar :: TcTyVar -> TcS TcType+rewriteTyVar tv+  = do { traceTcS "rewriteTyVar {" (ppr tv)+       ; (ty, _) <- runFlatten FM_SubstOnly fake_loc Derived NomEq $+                    flattenTyVar tv+       ; traceTcS "rewriteTyVar }" (ppr ty)+       ; return ty }+  where+    fake_loc = pprPanic "rewriteTyVar used a CtLoc" (ppr tv)+ -- specialized to flattening kinds: never Derived, always Nominal -- See Note [No derived kind equalities]+-- See Note [Flattening] flattenKind :: CtLoc -> CtFlavour -> TcType -> TcS (Xi, TcCoercionN) flattenKind loc flav ty   = do { traceTcS "flattenKind {" (ppr flav <+> ppr ty)@@ -764,6 +807,7 @@        ; traceTcS "flattenKind }" (ppr ty' $$ ppr co) -- co is never a panic        ; return (ty', co) } +-- See Note [Flattening] flattenArgsNom :: CtEvidence -> TyCon -> [TcType] -> TcS ([Xi], [TcCoercion], TcCoercionN) -- Externally-callable, hence runFlatten -- Flatten a vector of types all at once; in fact they are@@ -810,11 +854,14 @@   * zonks, removing any metavariables, and   * applies the substitution embodied in the inert set +The result of flattening is *almost function-free*. See+Note [Almost function-free] in TcRnTypes.+ Because flattening zonks and the returned coercion ("co" above) is also zonked, it's possible that (co :: xi ~ ty) isn't quite true. So, instead, we can rely on this fact: -  (F1) tcTypeKind(xi) succeeds and returns a fully zonked kind+  (F0) co :: xi ~ zonk(ty)  Note that the left-hand type of co is *always* precisely xi. The right-hand type may or may not be ty, however: if ty has unzonked filled-in metavariables,@@ -894,7 +941,7 @@ Note [flatten_exact_fam_app_fully performance] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The refactor of GRefl seems to cause performance trouble for T9872x: the allocation of flatten_exact_fam_app_fully_performance increased. See note [Generalized reflexive coercion] in TyCoRep for more information about GRefl and Trac #15192 for the current state.+The refactor of GRefl seems to cause performance trouble for T9872x: the allocation of flatten_exact_fam_app_fully_performance increased. See note [Generalized reflexive coercion] in TyCoRep for more information about GRefl and #15192 for the current state.  The explicit pattern match in homogenise_result helps with T9872a, b, c. @@ -1114,11 +1161,12 @@ --                   _ -> fmode   = flatten_ty_con_app tc tys -flatten_one (FunTy ty1 ty2)+flatten_one ty@(FunTy _ ty1 ty2)   = do { (xi1,co1) <- flatten_one ty1        ; (xi2,co2) <- flatten_one ty2        ; role <- getRole-       ; return (mkFunTy xi1 xi2, mkFunCo role co1 co2) }+       ; return (ty { ft_arg = xi1, ft_res = xi2 }+                , mkFunCo role co1 co2) }  flatten_one ty@(ForAllTy {}) -- TODO (RAE): This is inadequate, as it doesn't flatten the kind of@@ -1268,7 +1316,7 @@ synonym.  This works because TcTyConAppCo can deal with synonyms (unlike TyConAppCo), see Note [TcCoercions] in TcEvidence. -But (Trac #8979) for+But (#8979) for    type T a = (F a, a)    where F is a type function we must expand the synonym in (say) T Int, to expose the type function to the flattener.@@ -1329,8 +1377,7 @@   -- See Note [Reduce type family applications eagerly]      -- the following tcTypeKind should never be evaluated, as it's just used in      -- casting, and casts by refl are dropped-  = do { let reduce_co = mkNomReflCo (tcTypeKind (mkTyConApp tc tys))-       ; mOut <- try_to_reduce_nocache tc tys reduce_co id+  = do { mOut <- try_to_reduce_nocache tc tys        ; case mOut of            Just out -> pure out            Nothing -> do@@ -1363,7 +1410,7 @@                            ; let xi  = fsk_xi `mkCastTy` kind_co                                  co' = mkTcCoherenceLeftCo role fsk_xi kind_co fsk_co                                        `mkTransCo`-                                       maybeSubCo eq_rel (mkSymCo co)+                                       maybeTcSubCo eq_rel (mkSymCo co)                                        `mkTransCo` ret_co                            ; return (xi, co')                            }@@ -1398,7 +1445,7 @@                                  --     the xis are flattened                                  ; let fsk_ty = mkTyVarTy fsk                                        xi = fsk_ty `mkCastTy` kind_co-                                       co' = mkTcCoherenceLeftCo role fsk_ty kind_co (maybeSubCo eq_rel (mkSymCo co))+                                       co' = mkTcCoherenceLeftCo role fsk_ty kind_co (maybeTcSubCo eq_rel (mkSymCo co))                                              `mkTransCo` ret_co                                  ; return (xi, co')                                  }@@ -1436,7 +1483,7 @@                               ]                        ; (xi, final_co) <- bumpDepth $ flatten_one norm_ty                        ; eq_rel <- getEqRel-                       ; let co = maybeSubCo eq_rel norm_co+                       ; let co = maybeTcSubCo eq_rel norm_co                                    `mkTransCo` mkSymCo final_co                        ; flavour <- getFlavour                            -- NB: only extend cache with nominal equalities@@ -1452,16 +1499,8 @@      try_to_reduce_nocache :: TyCon   -- F, family tycon                           -> [Type]  -- args, not necessarily flattened-                          -> CoercionN -- kind_co :: tcTypeKind(F args)-                                       --            ~N tcTypeKind(F orig_args)-                                       -- where-                                       -- orig_args is what was passed to the-                                       -- outer function-                          -> (   Coercion     -- :: (xi |> kind_co) ~ F args-                              -> Coercion )   -- what to return from outer-                                              -- function                           -> FlatM (Maybe (Xi, Coercion))-    try_to_reduce_nocache tc tys kind_co update_co+    try_to_reduce_nocache tc tys       = do { checkStackDepth (mkTyConApp tc tys)            ; mb_match <- liftTcS $ matchFam tc tys            ; case mb_match of@@ -1470,13 +1509,9 @@                Just (norm_co, norm_ty)                  -> do { (xi, final_co) <- bumpDepth $ flatten_one norm_ty                        ; eq_rel <- getEqRel-                       ; let co  = maybeSubCo eq_rel norm_co-                                    `mkTransCo` mkSymCo final_co-                             role = eqRelRole eq_rel-                             xi' = xi `mkCastTy` kind_co-                             co' = update_co $-                                   mkTcCoherenceLeftCo role xi kind_co (mkSymCo co)-                       ; return $ Just (xi', co') }+                       ; let co  = mkSymCo (maybeTcSubCo eq_rel norm_co+                                            `mkTransCo` mkSymCo final_co)+                       ; return $ Just (xi, co) }                Nothing -> pure Nothing }  {- Note [Reduce type family applications eagerly]@@ -1546,7 +1581,7 @@                    ; return (ty2, co2 `mkTransCo` co1) }             FTRNotFollowed   -- Done, but make sure the kind is zonked-                            -- Note [Flattening] invariant (F1)+                            -- Note [Flattening] invariant (F0) and (F1)              -> do { tv' <- liftTcS $ updateTyVarKindM zonkTcType tv                    ; role <- getRole                    ; let ty' = mkTyVarTy tv'@@ -1566,7 +1601,7 @@                              (ppr tv <+> equals <+> ppr ty)                          ; role <- getRole                          ; return (FTRFollowed ty (mkReflCo role ty)) } ;-           Nothing -> do { traceFlat "Unfilled tyvar" (ppr tv)+           Nothing -> do { traceFlat "Unfilled tyvar" (pprTyVar tv)                          ; fr <- getFlavourRole                          ; flatten_tyvar2 tv fr } } @@ -1586,7 +1621,7 @@                         , cc_rhs = rhs_ty, cc_eq_rel = ct_eq_rel } <- ct              , let ct_fr = (ctEvFlavour ctev, ct_eq_rel)              , ct_fr `eqCanRewriteFR` fr  -- This is THE key call of eqCanRewriteFR-             ->  do { traceFlat "Following inert tyvar"+             -> do { traceFlat "Following inert tyvar"                         (ppr mode <+>                          ppr tv <+>                          equals <+>@@ -1629,7 +1664,7 @@         (b) the inert cannot rewrite the work item  This is significantly harder to think about. It can save a LOT of work-in occurs-check cases, but we don't care about them much.  Trac #5837+in occurs-check cases, but we don't care about them much.  #5837 is an example; all the constraints here are Givens               [G] a ~ TF (a,Int)@@ -1704,11 +1739,11 @@          --                 ==> (flatten) [W] F alpha ~ fmv, [W] alpha ~ [fmv]          --                 ==> (unify)   [W] F [fmv] ~ fmv          -- See Note [Unflatten using funeqs first]-      ; funeqs <- foldrBagM unflatten_funeq emptyCts funeqs+      ; funeqs <- foldrM unflatten_funeq emptyCts funeqs       ; traceTcS "Unflattening 1" $ braces (pprCts funeqs)            -- Step 2: unify the tv_eqs, if possible-      ; tv_eqs  <- foldrBagM (unflatten_eq tclvl) emptyCts tv_eqs+      ; tv_eqs  <- foldrM (unflatten_eq tclvl) emptyCts tv_eqs       ; traceTcS "Unflattening 2" $ braces (pprCts tv_eqs)            -- Step 3: fill any remaining fmvs with fresh unification variables@@ -1716,7 +1751,7 @@       ; traceTcS "Unflattening 3" $ braces (pprCts funeqs)            -- Step 4: remove any tv_eqs that look like ty ~ ty-      ; tv_eqs <- foldrBagM finalise_eq emptyCts tv_eqs+      ; tv_eqs <- foldrM finalise_eq emptyCts tv_eqs        ; let all_flat = tv_eqs `andCts` funeqs       ; traceTcS "Unflattening done" $ braces (pprCts all_flat)@@ -1872,8 +1907,9 @@   split orig_ty ty | Just ty' <- coreView ty = split orig_ty ty'   split _       (ForAllTy b res) = let (bs, ty, _) = split res res                                    in  (Named b : bs, ty, True)-  split _       (FunTy arg res)  = let (bs, ty, named) = split res res-                                   in  (Anon arg : bs, ty, named)+  split _       (FunTy { ft_af = af, ft_arg = arg, ft_res = res })+                                 = let (bs, ty, named) = split res res+                                   in  (Anon af arg : bs, ty, named)   split orig_ty _                = ([], orig_ty, False) {-# INLINE split_pi_tys' #-} @@ -1884,7 +1920,7 @@   where     go (Bndr tv (NamedTCB vis)) (bndrs, _)       = (Named (Bndr tv vis) : bndrs, True)-    go (Bndr tv AnonTCB)        (bndrs, n)-      = (Anon (tyVarKind tv)   : bndrs, n)+    go (Bndr tv (AnonTCB af))   (bndrs, n)+      = (Anon af (tyVarKind tv)   : bndrs, n)     {-# INLINE go #-} {-# INLINE ty_con_binders_ty_binders' #-}
typecheck/TcForeign.hs view
@@ -35,7 +35,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs  import TcRnMonad import TcHsType@@ -57,14 +57,13 @@ import PrelNames import DynFlags import Outputable-import Platform+import GHC.Platform import SrcLoc import Bag import Hooks import qualified GHC.LanguageExtensions as LangExt  import Control.Monad-import Data.Maybe  -- Defines a binding isForeignImport :: LForeignDecl name -> Bool@@ -206,7 +205,7 @@ want to report it as "defined but not used" or "imported but not used". eg     newtype D = MkD Int        foreign import foo :: D -> IO ()-Here 'MkD' us used.  See Trac #7408.+Here 'MkD' us used.  See #7408.  GHC also expands type functions during this process, so it's not enough just to look at the free variables of the declaration.@@ -251,8 +250,7 @@        ; let            -- Drop the foralls before inspecting the            -- structure of the foreign type.-             (bndrs, res_ty)   = tcSplitPiTys norm_sig_ty-             arg_tys           = mapMaybe binderRelevantType_maybe bndrs+             (arg_tys, res_ty) = tcSplitFunTys (dropForAlls norm_sig_ty)              id                = mkLocalId nm sig_ty                  -- Use a LocalId to obey the invariant that locally-defined                  -- things are LocalIds.  However, it does not need zonking,@@ -277,7 +275,7 @@   = do checkCg checkCOrAsmOrLlvmOrInterp        -- NB check res_ty not sig_ty!        --    In case sig_ty is (forall a. ForeignPtr a)-       check (isFFILabelTy (mkFunTys arg_tys res_ty)) (illegalForeignTyErr Outputable.empty)+       check (isFFILabelTy (mkVisFunTys arg_tys res_ty)) (illegalForeignTyErr Outputable.empty)        cconv' <- checkCConv cconv        return (CImport (L lc cconv') safety mh l src) @@ -307,7 +305,7 @@           addErrTc (illegalForeignTyErr Outputable.empty (text "At least one argument expected"))         (arg1_ty:arg_tys) -> do           dflags <- getDynFlags-          let curried_res_ty = mkFunTys arg_tys res_ty+          let curried_res_ty = mkVisFunTys arg_tys res_ty           check (isFFIDynTy curried_res_ty arg1_ty)                 (illegalForeignTyErr argument)           checkForeignArgs (isFFIArgumentTy dflags safety) arg_tys@@ -424,10 +422,9 @@     checkForeignRes nonIOok noCheckSafe isFFIExportResultTy res_ty     return (CExport (L l (CExportStatic esrc str cconv')) src)   where-      -- Drop the foralls before inspecting n+      -- Drop the foralls before inspecting       -- the structure of the foreign type.-    (bndrs, res_ty) = tcSplitPiTys sig_ty-    arg_tys         = mapMaybe binderRelevantType_maybe bndrs+    (arg_tys, res_ty) = tcSplitFunTys (dropForAlls sig_ty)  {- ************************************************************************@@ -457,6 +454,11 @@   | Just (_, res_ty) <- tcSplitIOType_maybe ty   =     -- Got an IO result type, that's always fine!      check (pred_res_ty res_ty) (illegalForeignTyErr result)++  -- We disallow nested foralls in foreign types+  -- (at least, for the time being). See #16702.+  | tcIsForAllTy ty+  = addErrTc $ illegalForeignTyErr result (text "Unexpected nested forall")    -- Case for non-IO result type with FFI Import   | not non_io_result_ok
typecheck/TcGenDeriv.hs view
@@ -40,7 +40,7 @@ import GhcPrelude  import TcRnMonad-import HsSyn+import GHC.Hs import RdrName import BasicTypes import DataCon@@ -54,8 +54,6 @@ import FamInstEnv import PrelNames import THNames-import Module ( moduleName, moduleNameString-              , moduleUnitId, unitIdString ) import MkId ( coerceId ) import PrimOp import SrcLoc@@ -217,7 +215,7 @@         nested_eq_expr tys as bs           = foldr1 and_Expr (zipWith3Equal "nested_eq" nested_eq tys as bs)           -- Using 'foldr1' here ensures that the derived code is correctly-          -- associated. See Trac #10859.+          -- associated. See #10859.           where             nested_eq ty a b = nlHsPar (eq_Expr ty (nlHsVar a) (nlHsVar b)) @@ -278,7 +276,7 @@ Note [Game plan for deriving Ord] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a bad idea to define only 'compare', and build the other binary-comparisons on top of it; see Trac #2130, #4019.  Reason: we don't+comparisons on top of it; see #2130, #4019.  Reason: we don't want to laboriously make a three-way comparison, only to extract a binary result, something like this:      (>) (I# x) (I# y) = case <# x y of@@ -360,11 +358,11 @@       = emptyBag      negate_expr = nlHsApp (nlHsVar not_RDR)-    lE = mk_easy_FunBind loc le_RDR [a_Pat, b_Pat] $+    lE = mkSimpleGeneratedFunBind loc le_RDR [a_Pat, b_Pat] $         negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr)-    gT = mk_easy_FunBind loc gt_RDR [a_Pat, b_Pat] $+    gT = mkSimpleGeneratedFunBind loc gt_RDR [a_Pat, b_Pat] $         nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr-    gE = mk_easy_FunBind loc ge_RDR [a_Pat, b_Pat] $+    gE = mkSimpleGeneratedFunBind loc ge_RDR [a_Pat, b_Pat] $         negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) a_Expr) b_Expr)      get_tag con = dataConTag con - fIRST_TAG@@ -383,7 +381,7 @@      mkOrdOp :: DynFlags -> OrdOp -> LHsBind GhcPs     -- Returns a binding   op a b = ... compares a and b according to op ....-    mkOrdOp dflags op = mk_easy_FunBind loc (ordMethRdr op) [a_Pat, b_Pat]+    mkOrdOp dflags op = mkSimpleGeneratedFunBind loc (ordMethRdr op) [a_Pat, b_Pat]                                         (mkOrdOpRhs dflags op)      mkOrdOpRhs :: DynFlags -> OrdOp -> LHsExpr GhcPs@@ -450,7 +448,7 @@                                  , mkHsCaseAlt nlWildPat (gtResult op) ]       where         tag     = get_tag data_con-        tag_lit = noLoc (HsLit noExt (HsIntPrim NoSourceText (toInteger tag)))+        tag_lit = noLoc (HsLit noExtField (HsIntPrim NoSourceText (toInteger tag)))      mkInnerEqAlt :: OrdOp -> DataCon -> LMatch GhcPs (LHsExpr GhcPs)     -- First argument 'a' known to be built with K@@ -599,7 +597,7 @@     occ_nm = getOccString tycon      succ_enum dflags-      = mk_easy_FunBind loc succ_RDR [a_Pat] $+      = mkSimpleGeneratedFunBind loc succ_RDR [a_Pat] $         untag_Expr dflags tycon [(a_RDR, ah_RDR)] $         nlHsIf (nlHsApps eq_RDR [nlHsVar (maxtag_RDR dflags tycon),                                nlHsVarApps intDataCon_RDR [ah_RDR]])@@ -609,7 +607,7 @@                                         nlHsIntLit 1]))      pred_enum dflags-      = mk_easy_FunBind loc pred_RDR [a_Pat] $+      = mkSimpleGeneratedFunBind loc pred_RDR [a_Pat] $         untag_Expr dflags tycon [(a_RDR, ah_RDR)] $         nlHsIf (nlHsApps eq_RDR [nlHsIntLit 0,                                nlHsVarApps intDataCon_RDR [ah_RDR]])@@ -617,11 +615,11 @@              (nlHsApp (nlHsVar (tag2con_RDR dflags tycon))                       (nlHsApps plus_RDR                             [ nlHsVarApps intDataCon_RDR [ah_RDR]-                            , nlHsLit (HsInt noExt+                            , nlHsLit (HsInt noExtField                                                 (mkIntegralLit (-1 :: Int)))]))      to_enum dflags-      = mk_easy_FunBind loc toEnum_RDR [a_Pat] $+      = mkSimpleGeneratedFunBind loc toEnum_RDR [a_Pat] $         nlHsIf (nlHsApps and_RDR                 [nlHsApps ge_RDR [nlHsVar a_RDR, nlHsIntLit 0],                  nlHsApps le_RDR [ nlHsVar a_RDR@@ -630,7 +628,7 @@              (illegal_toEnum_tag occ_nm (maxtag_RDR dflags tycon))      enum_from dflags-      = mk_easy_FunBind loc enumFrom_RDR [a_Pat] $+      = mkSimpleGeneratedFunBind loc enumFrom_RDR [a_Pat] $           untag_Expr dflags tycon [(a_RDR, ah_RDR)] $           nlHsApps map_RDR                 [nlHsVar (tag2con_RDR dflags tycon),@@ -639,7 +637,7 @@                             (nlHsVar (maxtag_RDR dflags tycon)))]      enum_from_then dflags-      = mk_easy_FunBind loc enumFromThen_RDR [a_Pat, b_Pat] $+      = mkSimpleGeneratedFunBind loc enumFromThen_RDR [a_Pat, b_Pat] $           untag_Expr dflags tycon [(a_RDR, ah_RDR), (b_RDR, bh_RDR)] $           nlHsApp (nlHsVarApps map_RDR [tag2con_RDR dflags tycon]) $             nlHsPar (enum_from_then_to_Expr@@ -652,7 +650,7 @@                            ))      from_enum dflags-      = mk_easy_FunBind loc fromEnum_RDR [a_Pat] $+      = mkSimpleGeneratedFunBind loc fromEnum_RDR [a_Pat] $           untag_Expr dflags tycon [(a_RDR, ah_RDR)] $           (nlHsVarApps intDataCon_RDR [ah_RDR]) @@ -687,9 +685,9 @@     arity          = dataConSourceArity data_con_1      min_bound_1con = mkHsVarBind loc minBound_RDR $-                     nlHsVarApps data_con_1_RDR (nOfThem arity minBound_RDR)+                     nlHsVarApps data_con_1_RDR (replicate arity minBound_RDR)     max_bound_1con = mkHsVarBind loc maxBound_RDR $-                     nlHsVarApps data_con_1_RDR (nOfThem arity maxBound_RDR)+                     nlHsVarApps data_con_1_RDR (replicate arity maxBound_RDR)  {- ************************************************************************@@ -768,7 +766,7 @@       ]      enum_range dflags-      = mk_easy_FunBind loc range_RDR [nlTuplePat [a_Pat, b_Pat] Boxed] $+      = mkSimpleGeneratedFunBind loc range_RDR [nlTuplePat [a_Pat, b_Pat] Boxed] $           untag_Expr dflags tycon [(a_RDR, ah_RDR)] $           untag_Expr dflags tycon [(b_RDR, bh_RDR)] $           nlHsApp (nlHsVarApps map_RDR [tag2con_RDR dflags tycon]) $@@ -777,8 +775,8 @@                         (nlHsVarApps intDataCon_RDR [bh_RDR]))      enum_index dflags-      = mk_easy_FunBind loc unsafeIndex_RDR-                [noLoc (AsPat noExt (noLoc c_RDR)+      = mkSimpleGeneratedFunBind loc unsafeIndex_RDR+                [noLoc (AsPat noExtField (noLoc c_RDR)                            (nlTuplePat [a_Pat, nlWildPat] Boxed)),                                 d_Pat] (            untag_Expr dflags tycon [(a_RDR, ah_RDR)] (@@ -794,7 +792,7 @@      -- This produces something like `(ch >= ah) && (ch <= bh)`     enum_inRange dflags-      = mk_easy_FunBind loc inRange_RDR [nlTuplePat [a_Pat, b_Pat] Boxed, c_Pat] $+      = mkSimpleGeneratedFunBind loc inRange_RDR [nlTuplePat [a_Pat, b_Pat] Boxed, c_Pat] $           untag_Expr dflags tycon [(a_RDR, ah_RDR)] (           untag_Expr dflags tycon [(b_RDR, bh_RDR)] (           untag_Expr dflags tycon [(c_RDR, ch_RDR)] (@@ -827,7 +825,7 @@      --------------------------------------------------------------     single_con_range-      = mk_easy_FunBind loc range_RDR+      = mkSimpleGeneratedFunBind loc range_RDR           [nlTuplePat [con_pat as_needed, con_pat bs_needed] Boxed] $         noLoc (mkHsComp ListComp stmts con_expr)       where@@ -839,7 +837,7 @@      ----------------     single_con_index-      = mk_easy_FunBind loc unsafeIndex_RDR+      = mkSimpleGeneratedFunBind loc unsafeIndex_RDR                 [nlTuplePat [con_pat as_needed, con_pat bs_needed] Boxed,                  con_pat cs_needed]         -- We need to reverse the order we consider the components in@@ -865,12 +863,12 @@      ------------------     single_con_inRange-      = mk_easy_FunBind loc inRange_RDR+      = mkSimpleGeneratedFunBind loc inRange_RDR                 [nlTuplePat [con_pat as_needed, con_pat bs_needed] Boxed,                  con_pat cs_needed] $           if con_arity == 0              -- If the product type has no fields, inRange is trivially true-             -- (see Trac #12853).+             -- (see #12853).              then true_Expr              else foldl1 and_Expr (zipWith3Equal "single_con_inRange" in_range                     as_needed bs_needed cs_needed)@@ -927,12 +925,12 @@    Ident "T1" <- lexP The latter desugares to inline code for matching the Ident and the string, and this can be very voluminous. The former is much more-compact.  Cf Trac #7258, although that also concerned non-linearity in+compact.  Cf #7258, although that also concerned non-linearity in the occurrence analyser, a separate issue.  Note [Read for empty data types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-What should we get for this?  (Trac #7931)+What should we get for this?  (#7931)    data Emp deriving( Read )   -- No data constructors  Here we want@@ -1060,7 +1058,7 @@      -- For constructors and field labels ending in '#', we hackily     -- let the lexer generate two tokens, and look for both in sequence-    -- Thus [Ident "I"; Symbol "#"].  See Trac #5041+    -- Thus [Ident "I"; Symbol "#"].  See #5041     ident_h_pat s | Just (ss, '#') <- snocView s = [ ident_pat ss, symbol_pat "#" ]                   | otherwise                    = [ ident_pat s ] @@ -1150,7 +1148,7 @@       | otherwise   =          ([a_Pat, con_pat],           showParen_Expr (genOpApp a_Expr ge_RDR (nlHsLit-                         (HsInt noExt (mkIntegralLit con_prec_plus_one))))+                         (HsInt noExtField (mkIntegralLit con_prec_plus_one))))                          (nlHsPar (nested_compose_Expr show_thingies)))         where              data_con_RDR  = getRdrName data_con@@ -1243,7 +1241,7 @@ -- | showsPrec :: Show a => Int -> a -> ShowS mk_showsPrec_app :: Integer -> LHsExpr GhcPs -> LHsExpr GhcPs mk_showsPrec_app p x-  = nlHsApps showsPrec_RDR [nlHsLit (HsInt noExt (mkIntegralLit p)), x]+  = nlHsApps showsPrec_RDR [nlHsLit (HsInt noExtField (mkIntegralLit p)), x]  -- | shows :: Show a => a -> ShowS mk_shows_app :: LHsExpr GhcPs -> LHsExpr GhcPs@@ -1313,7 +1311,7 @@         -- Make unique names for the data type and constructor        -- auxiliary bindings.  Start with the name of the TyCon/DataCon-       -- but that might not be unique: see Trac #12245.+       -- but that might not be unique: see #12245.        ; dt_occ  <- chooseUniqueOccTc (mkDataTOcc (getOccName rep_tc))        ; dc_occs <- mapM (chooseUniqueOccTc . mkDataCOcc . getOccName)                          (tyConDataCons rep_tc)@@ -1340,7 +1338,7 @@     genDataTyCon :: DerivStuff     genDataTyCon        --  $dT       = DerivHsBind (mkHsVarBind loc data_type_name rhs,-                     L loc (TypeSig noExt [L loc data_type_name] sig_ty))+                     L loc (TypeSig noExtField [L loc data_type_name] sig_ty))      sig_ty = mkLHsSigWcType (nlHsTyVar dataType_RDR)     rhs    = nlHsVar mkDataType_RDR@@ -1350,7 +1348,7 @@     genDataDataCon :: DataCon -> RdrName -> DerivStuff     genDataDataCon dc constr_name       --  $cT1 etc       = DerivHsBind (mkHsVarBind loc constr_name rhs,-                     L loc (TypeSig noExt [L loc constr_name] sig_ty))+                     L loc (TypeSig noExtField [L loc constr_name] sig_ty))       where         sig_ty   = mkLHsSigWcType (nlHsTyVar constr_RDR)         rhs      = nlHsApps mkConstr_RDR constr_args@@ -1382,7 +1380,7 @@                      mk_k_app e v = nlHsPar (nlHsOpApp e k_RDR (nlHsVar v))          ------------ gunfold-    gunfold_bind = mk_easy_FunBind loc+    gunfold_bind = mkSimpleGeneratedFunBind loc                      gunfold_RDR                      [k_Pat, z_Pat, if one_constr then nlWildPat else c_Pat]                      gunfold_rhs@@ -1411,7 +1409,7 @@     to_con_eqn dc con_name = ([nlWildConPat dc], nlHsVar con_name)          ------------ dataTypeOf-    dataTypeOf_bind = mk_easy_FunBind+    dataTypeOf_bind = mkSimpleGeneratedFunBind                         loc                         dataTypeOf_RDR                         [nlWildPat]@@ -1430,7 +1428,7 @@         -- because D :: * -> *         -- even though rep_tc has kind * -> * -> * -> *         -- Hence looking for the kind of fam_tc not rep_tc-        -- See Trac #4896+        -- See #4896     tycon_kind = case tyConFamInst_maybe rep_tc of                     Just (fam_tc, _) -> tyConKind fam_tc                     Nothing          -> tyConKind rep_tc@@ -1438,13 +1436,13 @@                 | tycon_kind `tcEqKind` kind2 = mk_gcast dataCast2_RDR gcast2_RDR                 | otherwise                 = emptyBag     mk_gcast dataCast_RDR gcast_RDR-      = unitBag (mk_easy_FunBind loc dataCast_RDR [nlVarPat f_RDR]+      = unitBag (mkSimpleGeneratedFunBind loc dataCast_RDR [nlVarPat f_RDR]                                  (nlHsVar gcast_RDR `nlHsApp` nlHsVar f_RDR))   kind1, kind2 :: Kind-kind1 = liftedTypeKind `mkFunTy` liftedTypeKind-kind2 = liftedTypeKind `mkFunTy` kind1+kind1 = typeToTypeKind+kind2 = liftedTypeKind `mkVisFunTy` kind1  gfoldl_RDR, gunfold_RDR, toConstr_RDR, dataTypeOf_RDR, mkConstr_RDR,     mkDataType_RDR, conIndex_RDR, prefix_RDR, infix_RDR,@@ -1559,68 +1557,36 @@     ==>      instance (Lift a) => Lift (Foo a) where-        lift (Foo a)-          = appE-              (conE-                (mkNameG_d "package-name" "ModuleName" "Foo"))-              (lift a)-        lift (u :^: v)-          = infixApp-              (lift u)-              (conE-                (mkNameG_d "package-name" "ModuleName" ":^:"))-              (lift v)+        lift (Foo a) = [| Foo a |]+        lift ((:^:) u v) = [| (:^:) u v |] -Note that (mkNameG_d "package-name" "ModuleName" "Foo") is equivalent to what-'Foo would be when using the -XTemplateHaskell extension. To make sure that--XDeriveLift can be used on stage-1 compilers, however, we explicitly invoke-makeG_d.+        liftTyped (Foo a) = [|| Foo a ||]+        liftTyped ((:^:) u v) = [|| (:^:) u v ||] -} + gen_Lift_binds :: SrcSpan -> TyCon -> (LHsBinds GhcPs, BagDerivStuff)-gen_Lift_binds loc tycon = (unitBag lift_bind, emptyBag)+gen_Lift_binds loc tycon = (listToBag [lift_bind, liftTyped_bind], emptyBag)   where-    lift_bind = mkFunBindEC 1 loc lift_RDR (nlHsApp pure_Expr)-                            (map pats_etc data_cons)+    lift_bind      = mkFunBindEC 1 loc lift_RDR (nlHsApp pure_Expr)+                                 (map (pats_etc mk_exp) data_cons)+    liftTyped_bind = mkFunBindEC 1 loc liftTyped_RDR (nlHsApp pure_Expr)+                                 (map (pats_etc mk_texp) data_cons)++    mk_exp = ExpBr noExtField+    mk_texp = TExpBr noExtField     data_cons = tyConDataCons tycon -    pats_etc data_con+    pats_etc mk_bracket data_con       = ([con_pat], lift_Expr)        where             con_pat      = nlConVarPat data_con_RDR as_needed             data_con_RDR = getRdrName data_con             con_arity    = dataConSourceArity data_con             as_needed    = take con_arity as_RDRs-            lifted_as    = zipWithEqual "mk_lift_app" mk_lift_app-                             tys_needed as_needed-            tycon_name   = tyConName tycon-            is_infix     = dataConIsInfix data_con-            tys_needed   = dataConOrigArgTys data_con--            mk_lift_app ty a-              | not (isUnliftedType ty) = nlHsApp (nlHsVar lift_RDR)-                                                  (nlHsVar a)-              | otherwise = nlHsApp (nlHsVar litE_RDR)-                              (primLitOp (mkBoxExp (nlHsVar a)))-              where (primLitOp, mkBoxExp) = primLitOps "Lift" ty--            pkg_name = unitIdString . moduleUnitId-                     . nameModule $ tycon_name-            mod_name = moduleNameString . moduleName . nameModule $ tycon_name-            con_name = occNameString . nameOccName . dataConName $ data_con--            conE_Expr = nlHsApp (nlHsVar conE_RDR)-                                (nlHsApps mkNameG_dRDR-                                  (map (nlHsLit . mkHsString)-                                    [pkg_name, mod_name, con_name]))--            lift_Expr-              | is_infix  = nlHsApps infixApp_RDR [a1, conE_Expr, a2]-              | otherwise = foldl' mk_appE_app conE_Expr lifted_as-            (a1:a2:_) = lifted_as--mk_appE_app :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs-mk_appE_app a b = nlHsApps appE_RDR [a, b]+            lift_Expr    = noLoc (HsBracket noExtField (mk_bracket br_body))+            br_body      = nlHsApps (Exact (dataConName data_con))+                                    (map nlHsVar as_needed)  {- ************************************************************************@@ -1684,7 +1650,7 @@  Note [Newtype-deriving trickiness] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #12768):+Consider (#12768):   class C a where { op :: D a => a -> a }    instance C a  => C [a] where { op = opList }@@ -1895,12 +1861,12 @@     underlying_inst_tys = changeLast inst_tys rhs_ty  nlHsAppType :: LHsExpr GhcPs -> Type -> LHsExpr GhcPs-nlHsAppType e s = noLoc (HsAppType noExt e hs_ty)+nlHsAppType e s = noLoc (HsAppType noExtField e hs_ty)   where     hs_ty = mkHsWildCardBndrs $ parenthesizeHsType appPrec (typeToLHsType s)  nlExprWithTySig :: LHsExpr GhcPs -> Type -> LHsExpr GhcPs-nlExprWithTySig e s = noLoc $ ExprWithTySig noExt (parenthesizeHsExpr sigPrec e) hs_ty+nlExprWithTySig e s = noLoc $ ExprWithTySig noExtField (parenthesizeHsExpr sigPrec e) hs_ty   where     hs_ty = mkLHsSigWcType (typeToLHsType s) @@ -1950,13 +1916,13 @@                   -> (LHsBind GhcPs, LSig GhcPs) genAuxBindSpec dflags loc (DerivCon2Tag tycon)   = (mkFunBindSE 0 loc rdr_name eqns,-     L loc (TypeSig noExt [L loc rdr_name] sig_ty))+     L loc (TypeSig noExtField [L loc rdr_name] sig_ty))   where     rdr_name = con2tag_RDR dflags tycon      sig_ty = mkLHsSigWcType $ L loc $ XHsType $ NHsCoreTy $              mkSpecSigmaTy (tyConTyVars tycon) (tyConStupidTheta tycon) $-             mkParentType tycon `mkFunTy` intPrimTy+             mkParentType tycon `mkVisFunTy` intPrimTy      lots_of_constructors = tyConFamilySize tycon > 8                         -- was: mAX_FAMILY_SIZE_FOR_VEC_RETURNS@@ -1976,17 +1942,17 @@   = (mkFunBindSE 0 loc rdr_name         [([nlConVarPat intDataCon_RDR [a_RDR]],            nlHsApp (nlHsVar tagToEnum_RDR) a_Expr)],-     L loc (TypeSig noExt [L loc rdr_name] sig_ty))+     L loc (TypeSig noExtField [L loc rdr_name] sig_ty))   where     sig_ty = mkLHsSigWcType $ L loc $              XHsType $ NHsCoreTy $ mkSpecForAllTys (tyConTyVars tycon) $-             intTy `mkFunTy` mkParentType tycon+             intTy `mkVisFunTy` mkParentType tycon      rdr_name = tag2con_RDR dflags tycon  genAuxBindSpec dflags loc (DerivMaxTag tycon)   = (mkHsVarBind loc rdr_name rhs,-     L loc (TypeSig noExt [L loc rdr_name] sig_ty))+     L loc (TypeSig noExtField [L loc rdr_name] sig_ty))   where     rdr_name = maxtag_RDR dflags tycon     sig_ty = mkLHsSigWcType (L loc (XHsType (NHsCoreTy intTy)))@@ -2007,11 +1973,11 @@   splitDerivAuxBind (DerivAuxBind x) = Left x   splitDerivAuxBind  x               = Right x -  rm_dups = foldrBag dup_check emptyBag+  rm_dups = foldr dup_check emptyBag   dup_check a b = if anyBag (== a) b then b else consBag a b    genAuxBinds' :: BagDerivStuff -> SeparateBagsDerivStuff-  genAuxBinds' = foldrBag f ( mapBag (genAuxBindSpec dflags loc) (rm_dups b1)+  genAuxBinds' = foldr f ( mapBag (genAuxBindSpec dflags loc) (rm_dups b1)                             , emptyBag )   f :: DerivStuff -> SeparateBagsDerivStuff -> SeparateBagsDerivStuff   f (DerivAuxBind _) = panic "genAuxBinds'" -- We have removed these before@@ -2053,7 +2019,7 @@ mkRdrFunBind :: Located RdrName -> [LMatch GhcPs (LHsExpr GhcPs)]              -> LHsBind GhcPs mkRdrFunBind fun@(L loc _fun_rdr) matches-  = L loc (mkFunBind fun matches)+  = L loc (mkFunBind Generated fun matches)  -- | Make a function binding. If no equations are given, produce a function -- with the given arity that uses an empty case expression for the last@@ -2081,7 +2047,7 @@                -> [LMatch GhcPs (LHsExpr GhcPs)]                -> LHsBind GhcPs mkRdrFunBindEC arity catch_all-                 fun@(L loc _fun_rdr) matches = L loc (mkFunBind fun matches')+                 fun@(L loc _fun_rdr) matches = L loc (mkFunBind Generated fun matches')  where    -- Catch-all eqn looks like    --     fmap _ z = case z of {}@@ -2091,7 +2057,7 @@    --     foldMap _ z = mempty    -- It's needed if there no data cons at all,    -- which can happen with -XEmptyDataDecls-   -- See Trac #4302+   -- See #4302    matches' = if null matches               then [mkMatch (mkPrefixFunRhs fun)                             (replicate (arity - 1) nlWildPat ++ [z_Pat])@@ -2105,13 +2071,13 @@ mkRdrFunBindSE :: Arity -> Located RdrName ->                     [LMatch GhcPs (LHsExpr GhcPs)] -> LHsBind GhcPs mkRdrFunBindSE arity-                 fun@(L loc fun_rdr) matches = L loc (mkFunBind fun matches')+                 fun@(L loc fun_rdr) matches = L loc (mkFunBind Generated fun matches')  where    -- Catch-all eqn looks like    --     compare _ _ = error "Void compare"    -- It's needed if there no data cons at all,    -- which can happen with -XEmptyDataDecls-   -- See Trac #4302+   -- See #4302    matches' = if null matches               then [mkMatch (mkPrefixFunRhs fun)                             (replicate arity nlWildPat)@@ -2134,17 +2100,6 @@ -- See Note [Deriving and unboxed types] in TcDerivInfer primOrdOps str ty = assoc_ty_id str ordOpTbl ty -primLitOps :: String -- The class involved-           -> Type   -- The type-           -> ( LHsExpr GhcPs -> LHsExpr GhcPs -- Constructs a Q Exp value-              , LHsExpr GhcPs -> LHsExpr GhcPs -- Constructs a boxed value-              )-primLitOps str ty = (assoc_ty_id str litConTbl ty, \v -> boxed v)-  where-    boxed v-      | ty `eqType` addrPrimTy = nlHsVar unpackCString_RDR `nlHsApp` v-      | otherwise = assoc_ty_id str boxConTbl ty v- ordOpTbl :: [(Type, (RdrName, RdrName, RdrName, RdrName, RdrName))] ordOpTbl  =  [(charPrimTy  , (ltChar_RDR  , leChar_RDR@@ -2425,7 +2380,7 @@ Of course these top-level bindings should all have distinct name, and we are generating RdrNames here.  We can't just use the TyCon or DataCon to distinguish because with standalone deriving two imported TyCons might both be called T!-(See Trac #7947.)+(See #7947.)  So we use package name, module name and the name of the parent (T in this example) as part of the OccName we generate for the new binding.
typecheck/TcGenFunctor.hs view
@@ -23,7 +23,7 @@ import Bag import DataCon import FastString-import HsSyn+import GHC.Hs import Panic import PrelNames import RdrName@@ -369,10 +369,11 @@      go co ty | Just ty' <- tcView ty = go co ty'     go co (TyVarTy    v) | v == var = (if co then caseCoVar else caseVar,True)-    go co (FunTy x y)  | isPredTy x = go co y-                       | xc || yc   = (caseFun xr yr,True)-        where (xr,xc) = go (not co) x-              (yr,yc) = go co       y+    go co (FunTy { ft_arg = x, ft_res = y, ft_af = af })+       | InvisArg <- af = go co y+       | xc || yc       = (caseFun xr yr,True)+       where (xr,xc) = go (not co) x+             (yr,yc) = go co       y     go co (AppTy    x y) | xc = (caseWrongArg,   True)                          | yc = (caseTyApp x yr, True)         where (_, xc) = go co x@@ -390,7 +391,7 @@          -- When folding over an unboxed tuple, we must explicitly drop the          -- runtime rep arguments, or else GHC will generate twice as many          -- variables in a unboxed tuple pattern match and expression as it-         -- actually needs. See Trac #12399+         -- actually needs. See #12399          (xrs,xcs) = unzip (map (go co) (dropRuntimeRepArgs args))     go co (ForAllTy (Bndr v vis) x)        | isVisibleArgFlag vis = panic "unexpected visible binder"@@ -1050,8 +1051,8 @@ that is syntactically equivalent to the last type parameter, so only E1's argument will be folded over in a derived Foldable instance. -See Trac #10447 for the original discussion on this feature. Also see-https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DeriveFunctor+See #10447 for the original discussion on this feature. Also see+https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/derive-functor for a more in-depth explanation.  Note [FFoldType and functorLikeTraverse]@@ -1153,7 +1154,7 @@ 1. The Traversable instance doesn't typecheck! Int# is of kind #, but pure    expects an argument whose type is of kind *. This effectively prevents    Traversable from being derived for any datatype with an unlifted argument-   type (Trac #11174).+   type (#11174).  2. The generated code contains superfluous expressions. By the Monoid laws,    we can reduce (f a <> mempty) to (f a), and by the Applicative laws, we can
typecheck/TcGenGenerics.hs view
@@ -16,7 +16,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import Type import TcType import TcGenDeriv@@ -431,7 +431,7 @@            env        = zipTyEnv env_tyvars env_inst_args            in_scope   = mkInScopeSet (tyCoVarsOfTypes inst_tys)            subst      = mkTvSubst in_scope env-           repTy'     = substTy  subst repTy+           repTy'     = substTyUnchecked  subst repTy            tcv'       = tyCoVarsOfTypeList inst_ty            (tv', cv') = partition isTyVar tcv'            tvs'       = scopedSort tv'@@ -577,17 +577,15 @@         mkS mlbl su ss ib a = mkTyConApp s1 [k, metaSelTy mlbl su ss ib, a]          -- Sums and products are done in the same way for both Rep and Rep1-        sumP [] = mkTyConApp v1 [k]-        sumP l  = foldBal mkSum' . map mkC  $ l+        sumP l = foldBal mkSum' (mkTyConApp v1 [k]) . map mkC $ l         -- The Bool is True if this constructor has labelled fields         prod :: [Type] -> [HsSrcBang] -> [HsImplBang] -> [FieldLabel] -> Type-        prod [] _  _  _  = mkTyConApp u1 [k]-        prod l  sb ib fl = foldBal mkProd-                                   [ ASSERT(null fl || lengthExceeds fl j)-                                     arg t sb' ib' (if null fl-                                                       then Nothing-                                                       else Just (fl !! j))-                                   | (t,sb',ib',j) <- zip4 l sb ib [0..] ]+        prod l sb ib fl = foldBal mkProd (mkTyConApp u1 [k])+                                  [ ASSERT(null fl || lengthExceeds fl j)+                                    arg t sb' ib' (if null fl+                                                      then Nothing+                                                      else Just (fl !! j))+                                  | (t,sb',ib',j) <- zip4 l sb ib [0..] ]          arg :: Type -> HsSrcBang -> HsImplBang -> Maybe FieldLabel -> Type         arg t (HsSrcBang _ su ss) ib fl = mkS fl su ss ib $ case gk_ of@@ -739,14 +737,13 @@      datacon_varTys = zip (map mkGenericLocal [us .. us+n_args-1]) argTys     datacon_vars = map fst datacon_varTys-    us'          = us + n_args      datacon_rdr  = getRdrName datacon      from_alt     = (nlConVarPat datacon_rdr datacon_vars, from_alt_rhs)-    from_alt_rhs = genLR_E i n (mkProd_E gk_ us' datacon_varTys)+    from_alt_rhs = genLR_E i n (mkProd_E gk_ datacon_varTys) -    to_alt     = ( genLR_P i n (mkProd_P gk us' datacon_varTys)+    to_alt     = ( genLR_P i n (mkProd_P gk datacon_varTys)                  , to_alt_rhs                  ) -- These M1s are meta-information for the datatype     to_alt_rhs = case gk_ of@@ -788,13 +785,11 @@  -- Build a product expression mkProd_E :: GenericKind_DC    -- Generic or Generic1?-         -> US                -- Base for unique names          -> [(RdrName, Type)]                        -- List of variables matched on the lhs and their types          -> LHsExpr GhcPs   -- Resulting product expression-mkProd_E _   _ []     = mkM1_E (nlHsVar u1DataCon_RDR)-mkProd_E gk_ _ varTys = mkM1_E (foldBal prod appVars)-                     -- These M1s are meta-information for the constructor+mkProd_E gk_ varTys = mkM1_E (foldBal prod (nlHsVar u1DataCon_RDR) appVars)+                      -- These M1s are meta-information for the constructor   where     appVars = map (wrapArg_E gk_) varTys     prod a b = prodDataCon_RDR `nlHsApps` [a,b]@@ -833,12 +828,10 @@  -- Build a product pattern mkProd_P :: GenericKind       -- Gen0 or Gen1-         -> US                -- Base for unique names          -> [(RdrName, Type)] -- List of variables to match,                               --   along with their types          -> LPat GhcPs      -- Resulting product pattern-mkProd_P _  _ []     = mkM1_P (nlNullaryConPat u1DataCon_RDR)-mkProd_P gk _ varTys = mkM1_P (foldBal prod appVars)+mkProd_P gk varTys = mkM1_P (foldBal prod (nlNullaryConPat u1DataCon_RDR) appVars)                      -- These M1s are meta-information for the constructor   where     appVars = unzipWith (wrapArg_P gk) varTys@@ -870,15 +863,12 @@ nlHsCompose :: LHsExpr GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs nlHsCompose x y = compose_RDR `nlHsApps` [x, y] --- | Variant of foldr1 for producing balanced lists-foldBal :: (a -> a -> a) -> [a] -> a-foldBal op = foldBal' op (error "foldBal: empty list")--foldBal' :: (a -> a -> a) -> a -> [a] -> a-foldBal' _  x []  = x-foldBal' _  _ [y] = y-foldBal' op x l   = let (a,b) = splitAt (length l `div` 2) l-                    in foldBal' op x a `op` foldBal' op x b+-- | Variant of foldr for producing balanced lists+foldBal :: (a -> a -> a) -> a -> [a] -> a+foldBal _  x []  = x+foldBal _  _ [y] = y+foldBal op x l   = let (a,b) = splitAt (length l `div` 2) l+                   in foldBal op x a `op` foldBal op x b  {- Note [Generics and unlifted types]@@ -890,7 +880,7 @@ to see if the type is actually one of the unlifted types for which URec has a data family instance; if so, we generate that instead. -See wiki:Commentary/Compiler/GenericDeriving#Handlingunliftedtypes for more+See wiki:commentary/compiler/generic-deriving#handling-unlifted-types for more details on why URec is implemented the way it is.  Note [Generating a correctly typed Rep instance]@@ -906,7 +896,7 @@ result, tc_mkRepTy builds the most generalized Rep(1) instance possible using the type variables it learns from the TyCon (i.e., it uses tyConTyVars). This can cause problems when the instance has instantiated type variables-(see Trac #11732). As an example:+(see #11732). As an example:      data T a = MkT a     deriving instance Generic (T Int)@@ -990,7 +980,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deriving Generic(1) is known to have a large constant factor during compilation, which contributes to noticeable compilation slowdowns when-deriving Generic(1) for large datatypes (see Trac #5642).+deriving Generic(1) for large datatypes (see #5642).  To ease the pain, there is a trick one can play when generating definitions for to(1) and from(1). If you have a datatype like:
typecheck/TcHoleErrors.hs view
@@ -1,11 +1,25 @@-module TcHoleErrors ( findValidHoleFits, tcFilterHoleFits, HoleFit (..)-                    , HoleFitCandidate (..), tcCheckHoleFit, tcSubsumes-                    , withoutUnification ) where+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE ExistentialQuantification #-}+module TcHoleErrors ( findValidHoleFits, tcFilterHoleFits+                    , tcCheckHoleFit, tcSubsumes+                    , withoutUnification+                    , fromPureHFPlugin+                    -- Re-exports for convenience+                    , hfIsLcl+                    , pprHoleFit, debugHoleFitDispConfig +                    -- Re-exported from TcHoleFitTypes+                    , TypedHole (..), HoleFit (..), HoleFitCandidate (..)+                    , CandPlugin, FitPlugin+                    , HoleFitPlugin (..), HoleFitPluginR (..)+                    ) where+ import GhcPrelude  import TcRnTypes import TcRnMonad+import Constraint+import TcOrigin import TcMType import TcEvidence import TcType@@ -28,10 +42,9 @@  import Control.Arrow ( (&&&) ) -import Control.Monad    ( filterM, replicateM )+import Control.Monad    ( filterM, replicateM, foldM ) import Data.List        ( partition, sort, sortOn, nubBy ) import Data.Graph       ( graphFromEdges, topSort )-import Data.Function    ( on )   import TcSimplify    ( simpl_top, runTcSDeriveds )@@ -39,13 +52,15 @@  import ExtractDocs ( extractDocs ) import qualified Data.Map as Map-import HsDoc           ( HsDocString, unpackHDS, DeclDocMap(..) )-import HscTypes        ( ModIface(..) )+import GHC.Hs.Doc      ( unpackHDS, DeclDocMap(..) )+import HscTypes        ( ModIface_(..) ) import LoadIface       ( loadInterfaceForNameMaybe )  import PrelInfo (knownKeyNames) +import TcHoleFitTypes + {- Note [Valid hole fits include ...] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -323,7 +338,7 @@ Note [Relevant Constraints] ~~~~~~~~~~~~~~~~~~~ -As highlighted by Trac #14273, we need to check any relevant constraints as well+As highlighted by #14273, we need to check any relevant constraints as well as checking for subsumption. Relevant constraints are the simple constraints whose free unification variables are mentioned in the type of the hole. @@ -420,72 +435,6 @@                               then BySize                               else NoSorting } ---- | HoleFitCandidates are passed to the filter and checked whether they can be--- made to fit.-data HoleFitCandidate = IdHFCand Id             -- An id, like locals.-                      | NameHFCand Name         -- A name, like built-in syntax.-                      | GreHFCand GlobalRdrElt  -- A global, like imported ids.-                      deriving (Eq)-instance Outputable HoleFitCandidate where-  ppr = pprHoleFitCand--pprHoleFitCand :: HoleFitCandidate -> SDoc-pprHoleFitCand (IdHFCand id) = text "Id HFC: " <> ppr id-pprHoleFitCand (NameHFCand name) = text "Name HFC: " <> ppr name-pprHoleFitCand (GreHFCand gre) = text "Gre HFC: " <> ppr gre--instance HasOccName HoleFitCandidate where-  occName hfc = case hfc of-                  IdHFCand id -> occName id-                  NameHFCand name -> occName name-                  GreHFCand gre -> occName (gre_name gre)---- | HoleFit is the type we use for valid hole fits. It contains the--- element that was checked, the Id of that element as found by `tcLookup`,--- and the refinement level of the fit, which is the number of extra argument--- holes that this fit uses (e.g. if hfRefLvl is 2, the fit is for `Id _ _`).-data HoleFit =-  HoleFit { hfId   :: Id       -- The elements id in the TcM-          , hfCand :: HoleFitCandidate  -- The candidate that was checked.-          , hfType :: TcType -- The type of the id, possibly zonked.-          , hfRefLvl :: Int  -- The number of holes in this fit.-          , hfWrap :: [TcType] -- The wrapper for the match.-          , hfMatches :: [TcType]  -- What the refinement variables got matched-                                   -- with, if anything-          , hfDoc :: Maybe HsDocString } -- Documentation of this HoleFit, if-                                         -- available.---hfName :: HoleFit -> Name-hfName hf = case hfCand hf of-              IdHFCand id -> idName id-              NameHFCand name -> name-              GreHFCand gre -> gre_name gre--hfIsLcl :: HoleFit -> Bool-hfIsLcl hf = case hfCand hf of-               IdHFCand _    -> True-               NameHFCand _  -> False-               GreHFCand gre -> gre_lcl gre---- We define an Eq and Ord instance to be able to build a graph.-instance Eq HoleFit where-   (==) = (==) `on` hfId---- We compare HoleFits by their name instead of their Id, since we don't--- want our tests to be affected by the non-determinism of `nonDetCmpVar`,--- which is used to compare Ids. When comparing, we want HoleFits with a lower--- refinement level to come first.-instance Ord HoleFit where-  compare a b = cmp a b-    where cmp  = if hfRefLvl a == hfRefLvl b-                 then compare `on` hfName-                 else compare `on` hfRefLvl--instance Outputable HoleFit where-    ppr = pprHoleFit debugHoleFitDispConfig- -- If enabled, we go through the fits and add any associated documentation, -- by looking it up in the module or the environment (for local fits) addDocs :: [HoleFit] -> TcM [HoleFit]@@ -499,62 +448,71 @@    msg = text "TcHoleErrors addDocs"    lookupInIface name (ModIface { mi_decl_docs = DeclDocMap dmap })      = Map.lookup name dmap-   upd lclDocs fit =-     let name = hfName fit in-     do { doc <- if hfIsLcl fit-                 then pure (Map.lookup name lclDocs)-                 else do { mbIface <- loadInterfaceForNameMaybe msg name-                         ; return $ mbIface >>= lookupInIface name }-        ; return $ fit {hfDoc = doc} }+   upd lclDocs fit@(HoleFit {hfCand = cand}) =+        do { let name = getName cand+           ; doc <- if hfIsLcl fit+                    then pure (Map.lookup name lclDocs)+                    else do { mbIface <- loadInterfaceForNameMaybe msg name+                            ; return $ mbIface >>= lookupInIface name }+           ; return $ fit {hfDoc = doc} }+   upd _ fit = return fit  -- For pretty printing hole fits, we display the name and type of the fit, -- with added '_' to represent any extra arguments in case of a non-zero -- refinement level. pprHoleFit :: HoleFitDispConfig -> HoleFit -> SDoc-pprHoleFit (HFDC sWrp sWrpVars sTy sProv sMs) hf = hang display 2 provenance-    where name = hfName hf-          ty = hfType hf-          matches =  hfMatches hf-          wrap = hfWrap hf-          tyApp = sep $ map ((text "@" <>) . pprParendType) wrap-          tyAppVars = sep $ punctuate comma $-              map (\(v,t) -> ppr v <+> text "~" <+> pprParendType t) $-                zip vars wrap-            where-              vars = unwrapTypeVars ty-              -- Attempts to get all the quantified type variables in a type,-              -- e.g.-              -- return :: forall (m :: * -> *) Monad m => (forall a . a) -> m a-              -- into [m, a]-              unwrapTypeVars :: Type -> [TyVar]-              unwrapTypeVars t = vars ++ case splitFunTy_maybe unforalled of-                                  Just (_, unfunned) -> unwrapTypeVars unfunned-                                  _ -> []-                where (vars, unforalled) = splitForAllTys t-          holeVs = sep $ map (parens . (text "_" <+> dcolon <+>) . ppr) matches-          holeDisp = if sMs then holeVs-                     else sep $ replicate (length matches) $ text "_"-          occDisp = pprPrefixOcc name-          tyDisp = ppWhen sTy $ dcolon <+> ppr ty-          has = not . null-          wrapDisp = ppWhen (has wrap && (sWrp || sWrpVars))-                      $ text "with" <+> if sWrp || not sTy-                                        then occDisp <+> tyApp-                                        else tyAppVars-          docs = case hfDoc hf of-                   Just d -> text "{-^" <>-                             (vcat . map text . lines . unpackHDS) d-                             <> text "-}"-                   _ -> empty-          funcInfo = ppWhen (has matches && sTy) $-                       text "where" <+> occDisp <+> tyDisp-          subDisp = occDisp <+> if has matches then holeDisp else tyDisp-          display =  subDisp $$ nest 2 (funcInfo $+$ docs $+$ wrapDisp)-          provenance = ppWhen sProv $ parens $-                case hfCand hf of-                    GreHFCand gre -> pprNameProvenance gre-                    _ -> text "bound at" <+> ppr (getSrcLoc name)+pprHoleFit _ (RawHoleFit sd) = sd+pprHoleFit (HFDC sWrp sWrpVars sTy sProv sMs) (HoleFit {..}) =+ hang display 2 provenance+ where name =  getName hfCand+       tyApp = sep $ zipWithEqual "pprHoleFit" pprArg vars hfWrap+         where pprArg b arg = case binderArgFlag b of+                                Specified -> text "@" <> pprParendType arg+                                -- Do not print type application for inferred+                                -- variables (#16456)+                                Inferred  -> empty+                                Required  -> pprPanic "pprHoleFit: bad Required"+                                                         (ppr b <+> ppr arg)+       tyAppVars = sep $ punctuate comma $+           zipWithEqual "pprHoleFit" (\v t -> ppr (binderVar v) <+>+                                               text "~" <+> pprParendType t)+           vars hfWrap +       vars = unwrapTypeVars hfType+         where+           -- Attempts to get all the quantified type variables in a type,+           -- e.g.+           -- return :: forall (m :: * -> *) Monad m => (forall a . a -> m a)+           -- into [m, a]+           unwrapTypeVars :: Type -> [TyCoVarBinder]+           unwrapTypeVars t = vars ++ case splitFunTy_maybe unforalled of+                               Just (_, unfunned) -> unwrapTypeVars unfunned+                               _ -> []+             where (vars, unforalled) = splitForAllVarBndrs t+       holeVs = sep $ map (parens . (text "_" <+> dcolon <+>) . ppr) hfMatches+       holeDisp = if sMs then holeVs+                  else sep $ replicate (length hfMatches) $ text "_"+       occDisp = pprPrefixOcc name+       tyDisp = ppWhen sTy $ dcolon <+> ppr hfType+       has = not . null+       wrapDisp = ppWhen (has hfWrap && (sWrp || sWrpVars))+                   $ text "with" <+> if sWrp || not sTy+                                     then occDisp <+> tyApp+                                     else tyAppVars+       docs = case hfDoc of+                Just d -> text "{-^" <>+                          (vcat . map text . lines . unpackHDS) d+                          <> text "-}"+                _ -> empty+       funcInfo = ppWhen (has hfMatches && sTy) $+                    text "where" <+> occDisp <+> tyDisp+       subDisp = occDisp <+> if has hfMatches then holeDisp else tyDisp+       display =  subDisp $$ nest 2 (funcInfo $+$ docs $+$ wrapDisp)+       provenance = ppWhen sProv $ parens $+             case hfCand of+                 GreHFCand gre -> pprNameProvenance gre+                 _ -> text "bound at" <+> ppr (getSrcLoc name)+ getLocalBindings :: TidyEnv -> Ct -> TcM [Id] getLocalBindings tidy_orig ct  = do { (env1, _) <- zonkTidyOrigin tidy_orig (ctLocOrigin loc)@@ -589,11 +547,15 @@      ; maxVSubs <- maxValidHoleFits <$> getDynFlags      ; hfdc <- getHoleFitDispConfig      ; sortingAlg <- getSortingAlg+     ; dflags <- getDynFlags+     ; hfPlugs <- tcg_hf_plugins <$> getGblEnv      ; let findVLimit = if sortingAlg > NoSorting then Nothing else maxVSubs-     ; refLevel <- refLevelHoleFits <$> getDynFlags-     ; traceTc "findingValidHoleFitsFor { " $ ppr ct+           refLevel = refLevelHoleFits dflags+           hole = TyH (listToBag relevantCts) implics (Just ct)+           (candidatePlugins, fitPlugins) =+             unzip $ map (\p-> ((candPlugin p) hole, (fitPlugin p) hole)) hfPlugs+     ; traceTc "findingValidHoleFitsFor { " $ ppr hole      ; traceTc "hole_lvl is:" $ ppr hole_lvl-     ; traceTc "implics are: " $ ppr implics      ; traceTc "simples are: " $ ppr simples      ; traceTc "locals are: " $ ppr lclBinds      ; let (lcl, gbl) = partition gre_lcl (globalRdrEnvElts rdr_env)@@ -606,11 +568,14 @@            globals = map GreHFCand gbl            syntax = map NameHFCand builtIns            to_check = locals ++ syntax ++ globals+     ; cands <- foldM (flip ($)) to_check candidatePlugins+     ; traceTc "numPlugins are:" $ ppr (length candidatePlugins)      ; (searchDiscards, subs) <--        tcFilterHoleFits findVLimit implics relevantCts (hole_ty, []) to_check+        tcFilterHoleFits findVLimit hole (hole_ty, []) cands      ; (tidy_env, tidy_subs) <- zonkSubs tidy_env subs      ; tidy_sorted_subs <- sortFits sortingAlg tidy_subs-     ; let (pVDisc, limited_subs) = possiblyDiscard maxVSubs tidy_sorted_subs+     ; plugin_handled_subs <- foldM (flip ($)) tidy_sorted_subs fitPlugins+     ; let (pVDisc, limited_subs) = possiblyDiscard maxVSubs plugin_handled_subs            vDiscards = pVDisc || searchDiscards      ; subs_with_docs <- addDocs limited_subs      ; let vMsg = ppUnless (null subs_with_docs) $@@ -629,8 +594,8 @@             ; traceTc "ref_tys are" $ ppr ref_tys             ; let findRLimit = if sortingAlg > NoSorting then Nothing                                                          else maxRSubs-            ; refDs <- mapM (flip (tcFilterHoleFits findRLimit implics-                                     relevantCts) to_check) ref_tys+            ; refDs <- mapM (flip (tcFilterHoleFits findRLimit hole)+                              cands) ref_tys             ; (tidy_env, tidy_rsubs) <- zonkSubs tidy_env $ concatMap snd refDs             ; tidy_sorted_rsubs <- sortFits sortingAlg tidy_rsubs             -- For refinement substitutions we want matches@@ -640,8 +605,10 @@             ; (tidy_env, tidy_hole_ty) <- zonkTidyTcType tidy_env hole_ty             ; let hasExactApp = any (tcEqType tidy_hole_ty) . hfWrap                   (exact, not_exact) = partition hasExactApp tidy_sorted_rsubs-                  (pRDisc, exact_last_rfits) =-                    possiblyDiscard maxRSubs $ not_exact ++ exact+            ; plugin_handled_rsubs <- foldM (flip ($))+                                        (not_exact ++ exact) fitPlugins+            ; let (pRDisc, exact_last_rfits) =+                    possiblyDiscard maxRSubs $ plugin_handled_rsubs                   rDiscards = pRDisc || any fst refDs             ; rsubs_with_docs <- addDocs exact_last_rfits             ; return (tidy_env,@@ -676,7 +643,7 @@       where newTyVars = replicateM refLvl $ setLvl <$>                             (newOpenTypeKind >>= newFlexiTyVar)             setLvl = flip setMetaTyVarTcLevel hole_lvl-            wrapWithVars vars = mkFunTys (map mkTyVarTy vars) hole_ty+            wrapWithVars vars = mkVisFunTys (map mkTyVarTy vars) hole_ty      sortFits :: SortingAlg    -- How we should sort the hole fits              -> [HoleFit]     -- The subs to sort@@ -723,6 +690,9 @@       where zonkSubs' zs env [] = return (env, reverse zs)             zonkSubs' zs env (hf:hfs) = do { (env', z) <- zonkSub env hf                                            ; zonkSubs' (z:zs) env' hfs }++            zonkSub :: TidyEnv -> HoleFit -> TcM (TidyEnv, HoleFit)+            zonkSub env hf@RawHoleFit{} = return (env, hf)             zonkSub env hf@HoleFit{hfType = ty, hfMatches = m, hfWrap = wrp}               = do { (env, ty') <- zonkTidyTcType env ty                    ; (env, m') <- zonkTidyTcTypes env m@@ -777,10 +747,7 @@ -- running the type checker. Stops after finding limit matches. tcFilterHoleFits :: Maybe Int                -- ^ How many we should output, if limited-               -> [Implication]-               -- ^ Enclosing implications for givens-               -> [Ct]-               -- ^ Any relevant unsolved simple constraints+               -> TypedHole -- ^ The hole to filter against                -> (TcType, [TcTyVar])                -- ^ The type to check for fits and a list of refinement                -- variables (free type variables in the type) for emulating@@ -790,8 +757,8 @@                -> TcM (Bool, [HoleFit])                -- ^ We return whether or not we stopped due to hitting the limit                -- and the fits we found.-tcFilterHoleFits (Just 0) _ _ _ _ = return (False, []) -- Stop right away on 0-tcFilterHoleFits limit implics relevantCts ht@(hole_ty, _) candidates =+tcFilterHoleFits (Just 0) _ _ _ = return (False, []) -- Stop right away on 0+tcFilterHoleFits limit (TyH {..}) ht@(hole_ty, _) candidates =   do { traceTc "checkingFitsFor {" $ ppr hole_ty      ; (discards, subs) <- go [] emptyVarSet limit ht candidates      ; traceTc "checkingFitsFor }" empty@@ -892,7 +859,7 @@     -- refinement hole fits, so we can't wrap the side-effects deeper than this.       withoutUnification fvs $       do { traceTc "checkingFitOf {" $ ppr ty-         ; (fits, wrp) <- tcCheckHoleFit (listToBag relevantCts) implics h_ty ty+         ; (fits, wrp) <- tcCheckHoleFit hole h_ty ty          ; traceTc "Did it fit?" $ ppr fits          ; traceTc "wrap is: " $ ppr wrp          ; traceTc "checkingFitOf }" empty@@ -925,6 +892,7 @@                           else return Nothing }            else return Nothing }      where fvs = mkFVs ref_vars `unionFV` hole_fvs `unionFV` tyCoFVsOfType ty+           hole = TyH tyHRelevantCts tyHImplics Nothing   subsDiscardMsg :: SDoc@@ -961,8 +929,8 @@ -- discarding any errors. Subsumption here means that the ty_b can fit into the -- ty_a, i.e. `tcSubsumes a b == True` if b is a subtype of a. tcSubsumes :: TcSigmaType -> TcSigmaType -> TcM Bool-tcSubsumes ty_a ty_b = fst <$> tcCheckHoleFit emptyBag [] ty_a ty_b-+tcSubsumes ty_a ty_b = fst <$> tcCheckHoleFit dummyHole ty_a ty_b+  where dummyHole = TyH emptyBag [] Nothing  -- | A tcSubsumes which takes into account relevant constraints, to fix trac -- #14273. This makes sure that when checking whether a type fits the hole,@@ -970,24 +938,22 @@ -- constraints on the type of the hole. -- Note: The simplifier may perform unification, so make sure to restore any -- free type variables to avoid side-effects.-tcCheckHoleFit :: Cts                   -- ^  Any relevant Cts to the hole.-               -> [Implication]-               -- ^ The nested implications of the hole with the innermost-               -- implication first.-               -> TcSigmaType           -- ^ The type of the hole.-               -> TcSigmaType           -- ^ The type to check whether fits.+tcCheckHoleFit :: TypedHole   -- ^ The hole to check against+               -> TcSigmaType+               -- ^ The type to check against (possibly modified, e.g. refined)+               -> TcSigmaType -- ^ The type to check whether fits.                -> TcM (Bool, HsWrapper)                -- ^ Whether it was a match, and the wrapper from hole_ty to ty.-tcCheckHoleFit _ _ hole_ty ty | hole_ty `eqType` ty+tcCheckHoleFit _ hole_ty ty | hole_ty `eqType` ty     = return (True, idHsWrapper)-tcCheckHoleFit relevantCts implics hole_ty ty = discardErrs $+tcCheckHoleFit (TyH {..}) hole_ty ty = discardErrs $   do { -- We wrap the subtype constraint in the implications to pass along the        -- givens, and so we must ensure that any nested implications and skolems        -- end up with the correct level. The implications are ordered so that        -- the innermost (the one with the highest level) is first, so it        -- suffices to get the level of the first one (or the current level, if        -- there are no implications involved).-       innermost_lvl <- case implics of+       innermost_lvl <- case tyHImplics of                           [] -> getTcLevel                           -- imp is the innermost implication                           (imp:_) -> return (ic_tclvl imp)@@ -995,15 +961,15 @@                           tcSubType_NC ExprSigCtxt ty hole_ty      ; traceTc "Checking hole fit {" empty      ; traceTc "wanteds are: " $ ppr wanted-     ; if isEmptyWC wanted && isEmptyBag relevantCts+     ; if isEmptyWC wanted && isEmptyBag tyHRelevantCts        then traceTc "}" empty >> return (True, wrp)        else do { fresh_binds <- newTcEvBinds                 -- The relevant constraints may contain HoleDests, so we must                 -- take care to clone them as well (to avoid #15370).-               ; cloned_relevants <- mapBagM cloneWanted relevantCts+               ; cloned_relevants <- mapBagM cloneWanted tyHRelevantCts                  -- We wrap the WC in the nested implications, see                  -- Note [Nested Implications]-               ; let outermost_first = reverse implics+               ; let outermost_first = reverse tyHImplics                      setWC = setWCAndBinds fresh_binds                     -- We add the cloned relevants to the wanteds generated by                     -- the call to tcSubType_NC, see Note [Relevant Constraints]@@ -1026,3 +992,10 @@        setWCAndBinds binds imp wc          = WC { wc_simple = emptyBag               , wc_impl = unitBag $ imp { ic_wanted = wc , ic_binds = binds } }++-- | Maps a plugin that needs no state to one with an empty one.+fromPureHFPlugin :: HoleFitPlugin -> HoleFitPluginR+fromPureHFPlugin plug =+  HoleFitPluginR { hfPluginInit = newTcRef ()+                 , hfPluginRun = const plug+                 , hfPluginStop = const $ return () }
typecheck/TcHoleErrors.hs-boot view
@@ -4,7 +4,8 @@ -- + which calls 'TcSimplify.simpl_top' module TcHoleErrors where -import TcRnTypes  ( TcM, Ct, Implication )+import TcRnTypes  ( TcM )+import Constraint ( Ct, Implication ) import Outputable ( SDoc ) import VarEnv     ( TidyEnv ) 
+ typecheck/TcHoleFitTypes.hs view
@@ -0,0 +1,145 @@+{-# LANGUAGE ExistentialQuantification #-}+module TcHoleFitTypes (+  TypedHole (..), HoleFit (..), HoleFitCandidate (..),+  CandPlugin, FitPlugin, HoleFitPlugin (..), HoleFitPluginR (..),+  hfIsLcl, pprHoleFitCand+  ) where++import GhcPrelude++import TcRnTypes+import Constraint+import TcType++import RdrName++import GHC.Hs.Doc+import Id++import Outputable+import Name++import Data.Function ( on )++data TypedHole = TyH { tyHRelevantCts :: Cts+                       -- ^ Any relevant Cts to the hole+                     , tyHImplics :: [Implication]+                       -- ^ The nested implications of the hole with the+                       --   innermost implication first.+                     , tyHCt :: Maybe Ct+                       -- ^ The hole constraint itself, if available.+                     }++instance Outputable TypedHole where+  ppr (TyH rels implics ct)+    = hang (text "TypedHole") 2+        (ppr rels $+$ ppr implics $+$ ppr ct)+++-- | HoleFitCandidates are passed to hole fit plugins and then+-- checked whether they fit a given typed-hole.+data HoleFitCandidate = IdHFCand Id             -- An id, like locals.+                      | NameHFCand Name         -- A name, like built-in syntax.+                      | GreHFCand GlobalRdrElt  -- A global, like imported ids.+                      deriving (Eq)++instance Outputable HoleFitCandidate where+  ppr = pprHoleFitCand++pprHoleFitCand :: HoleFitCandidate -> SDoc+pprHoleFitCand (IdHFCand cid) = text "Id HFC: " <> ppr cid+pprHoleFitCand (NameHFCand cname) = text "Name HFC: " <> ppr cname+pprHoleFitCand (GreHFCand cgre) = text "Gre HFC: " <> ppr cgre+++++instance NamedThing HoleFitCandidate where+  getName hfc = case hfc of+                     IdHFCand cid -> idName cid+                     NameHFCand cname -> cname+                     GreHFCand cgre -> gre_name cgre+  getOccName hfc = case hfc of+                     IdHFCand cid -> occName cid+                     NameHFCand cname -> occName cname+                     GreHFCand cgre -> occName (gre_name cgre)++instance HasOccName HoleFitCandidate where+  occName = getOccName++instance Ord HoleFitCandidate where+  compare = compare `on` getName++-- | HoleFit is the type we use for valid hole fits. It contains the+-- element that was checked, the Id of that element as found by `tcLookup`,+-- and the refinement level of the fit, which is the number of extra argument+-- holes that this fit uses (e.g. if hfRefLvl is 2, the fit is for `Id _ _`).+data HoleFit =+  HoleFit { hfId   :: Id       -- ^ The elements id in the TcM+          , hfCand :: HoleFitCandidate  -- ^ The candidate that was checked.+          , hfType :: TcType -- ^ The type of the id, possibly zonked.+          , hfRefLvl :: Int  -- ^ The number of holes in this fit.+          , hfWrap :: [TcType] -- ^ The wrapper for the match.+          , hfMatches :: [TcType]+          -- ^ What the refinement variables got matched with, if anything+          , hfDoc :: Maybe HsDocString+          -- ^ Documentation of this HoleFit, if available.+          }+ | RawHoleFit SDoc+ -- ^ A fit that is just displayed as is. Here so thatHoleFitPlugins+ --   can inject any fit they want.++-- We define an Eq and Ord instance to be able to build a graph.+instance Eq HoleFit where+   (==) = (==) `on` hfId++instance Outputable HoleFit where+  ppr (RawHoleFit sd) = sd+  ppr (HoleFit _ cand ty _ _ mtchs _) =+    hang (name <+> holes) 2 (text "where" <+> name <+> dcolon <+> (ppr ty))+    where name = ppr $ getName cand+          holes = sep $ map (parens . (text "_" <+> dcolon <+>) . ppr) mtchs++-- We compare HoleFits by their name instead of their Id, since we don't+-- want our tests to be affected by the non-determinism of `nonDetCmpVar`,+-- which is used to compare Ids. When comparing, we want HoleFits with a lower+-- refinement level to come first.+instance Ord HoleFit where+  compare (RawHoleFit _) (RawHoleFit _) = EQ+  compare (RawHoleFit _) _ = LT+  compare _ (RawHoleFit _) = GT+  compare a@(HoleFit {}) b@(HoleFit {}) = cmp a b+    where cmp  = if hfRefLvl a == hfRefLvl b+                 then compare `on` (getName . hfCand)+                 else compare `on` hfRefLvl++hfIsLcl :: HoleFit -> Bool+hfIsLcl hf@(HoleFit {}) = case hfCand hf of+                            IdHFCand _    -> True+                            NameHFCand _  -> False+                            GreHFCand gre -> gre_lcl gre+hfIsLcl _ = False+++-- | A plugin for modifying the candidate hole fits *before* they're checked.+type CandPlugin = TypedHole -> [HoleFitCandidate] -> TcM [HoleFitCandidate]++-- | A plugin for modifying hole fits  *after* they've been found.+type FitPlugin =  TypedHole -> [HoleFit] -> TcM [HoleFit]++-- | A HoleFitPlugin is a pair of candidate and fit plugins.+data HoleFitPlugin = HoleFitPlugin+  { candPlugin :: CandPlugin+  , fitPlugin :: FitPlugin }++-- | HoleFitPluginR adds a TcRef to hole fit plugins so that plugins can+-- track internal state. Note the existential quantification, ensuring that+-- the state cannot be modified from outside the plugin.+data HoleFitPluginR = forall s. HoleFitPluginR+  { hfPluginInit :: TcM (TcRef s)+    -- ^ Initializes the TcRef to be passed to the plugin+  , hfPluginRun :: TcRef s -> HoleFitPlugin+    -- ^ The function defining the plugin itself+  , hfPluginStop :: TcRef s -> TcM ()+    -- ^ Cleanup of state, guaranteed to be called even on error+  }
+ typecheck/TcHoleFitTypes.hs-boot view
@@ -0,0 +1,10 @@+-- This boot file is in place to break the loop where:+-- + TcRnTypes needs 'HoleFitPlugin',+-- + which needs 'TcHoleFitTypes'+-- + which needs 'TcRnTypes'+module TcHoleFitTypes where++-- Build ordering+import GHC.Base()++data HoleFitPlugin
typecheck/TcHsSyn.hs view
@@ -16,7 +16,7 @@  module TcHsSyn (         -- * Extracting types from HsSyn-        hsLitType, hsLPatType, hsPatType,+        hsLitType, hsPatType, hsLPatType,          -- * Other HsSyn functions         mkHsDictLet, mkHsApp,@@ -34,7 +34,7 @@         zonkTopBndrs,         ZonkEnv, ZonkFlexi(..), emptyZonkEnv, mkEmptyZonkEnv, initZonkEnv,         zonkTyVarBinders, zonkTyVarBindersX, zonkTyVarBinderX,-        zonkTyBndrs, zonkTyBndrsX,+        zonkTyBndrs, zonkTyBndrsX, zonkRecTyVarBndrs,         zonkTcTypeToType,  zonkTcTypeToTypeX,         zonkTcTypesToTypes, zonkTcTypesToTypesX,         zonkTyVarOcc,@@ -48,9 +48,10 @@  import GhcPrelude -import HsSyn+import GHC.Hs import Id import IdInfo+import Predicate import TcRnMonad import PrelNames import BuildTyCl ( TcMethInfo, MethInfo )@@ -58,6 +59,7 @@ import TcMType import TcEnv   ( tcLookupGlobalOnly ) import TcEvidence+import TyCoPpr ( pprTyVar ) import TysPrim import TyCon import TysWiredIn@@ -96,8 +98,8 @@  -} -hsLPatType :: OutPat GhcTc -> Type-hsLPatType lpat = hsPatType (unLoc lpat)+hsLPatType :: LPat GhcTc -> Type+hsLPatType (dL->L _ p) = hsPatType p  hsPatType :: Pat GhcTc -> Type hsPatType (ParPat _ pat)                = hsLPatType pat@@ -110,7 +112,8 @@ hsPatType (ViewPat ty _ _)              = ty hsPatType (ListPat (ListPatTc ty Nothing) _)      = mkListTy ty hsPatType (ListPat (ListPatTc _ (Just (ty,_))) _) = ty-hsPatType (TuplePat tys _ bx)           = mkTupleTy bx tys+hsPatType (TuplePat tys _ bx)           = mkTupleTy1 bx tys+                  -- See Note [Don't flatten tuples from HsSyn] in MkCore hsPatType (SumPat tys _ _ _ )           = mkSumTy tys hsPatType (ConPatOut { pat_con = lcon                      , pat_arg_tys = tys })@@ -119,7 +122,9 @@ hsPatType (NPat ty _ _ _)               = ty hsPatType (NPlusKPat ty _ _ _ _ _)      = ty hsPatType (CoPat _ _ _ ty)              = ty-hsPatType p                             = pprPanic "hsPatType" (ppr p)+hsPatType (XPat n)                      = noExtCon n+hsPatType ConPatIn{}                    = panic "hsPatType: ConPatIn"+hsPatType SplicePat{}                   = panic "hsPatType: SplicePat"  hsLitType :: HsLit (GhcPass p) -> TcType hsLitType (HsChar _ _)       = charTy@@ -135,15 +140,15 @@ hsLitType (HsRat _ _ ty)     = ty hsLitType (HsFloatPrim _ _)  = floatPrimTy hsLitType (HsDoublePrim _ _) = doublePrimTy-hsLitType (XLit p)           = pprPanic "hsLitType" (ppr p)+hsLitType (XLit nec)         = noExtCon nec  -- Overloaded literals. Here mainly because it uses isIntTy etc  shortCutLit :: DynFlags -> OverLitVal -> TcType -> Maybe (HsExpr GhcTcId) shortCutLit dflags (HsIntegral int@(IL src neg i)) ty-  | isIntTy ty  && inIntRange  dflags i = Just (HsLit noExt (HsInt noExt int))+  | isIntTy ty  && inIntRange  dflags i = Just (HsLit noExtField (HsInt noExtField int))   | isWordTy ty && inWordRange dflags i = Just (mkLit wordDataCon (HsWordPrim src i))-  | isIntegerTy ty = Just (HsLit noExt (HsInteger src i ty))+  | isIntegerTy ty = Just (HsLit noExtField (HsInteger src i ty))   | otherwise = shortCutLit dflags (HsFractional (integralFractionalLit neg i)) ty         -- The 'otherwise' case is important         -- Consider (3 :: Float).  Syntactically it looks like an IntLit,@@ -152,16 +157,16 @@         -- literals, compiled without -O  shortCutLit _ (HsFractional f) ty-  | isFloatTy ty  = Just (mkLit floatDataCon  (HsFloatPrim noExt f))-  | isDoubleTy ty = Just (mkLit doubleDataCon (HsDoublePrim noExt f))+  | isFloatTy ty  = Just (mkLit floatDataCon  (HsFloatPrim noExtField f))+  | isDoubleTy ty = Just (mkLit doubleDataCon (HsDoublePrim noExtField f))   | otherwise     = Nothing  shortCutLit _ (HsIsString src s) ty-  | isStringTy ty = Just (HsLit noExt (HsString src s))+  | isStringTy ty = Just (HsLit noExtField (HsString src s))   | otherwise     = Nothing  mkLit :: DataCon -> HsLit GhcTc -> HsExpr GhcTc-mkLit con lit = HsApp noExt (nlHsDataCon con) (nlHsLit lit)+mkLit con lit = HsApp noExtField (nlHsDataCon con) (nlHsLit lit)  ------------------------------ hsOverLitName :: OverLitVal -> Name@@ -204,6 +209,7 @@             , ze_tv_env :: TyCoVarEnv TyCoVar             , ze_id_env :: IdEnv      Id             , ze_meta_tv_env :: TcRef (TyVarEnv Type) }+ {- Note [The ZonkEnv] ~~~~~~~~~~~~~~~~~~~~~ * ze_flexi :: ZonkFlexi says what to do with a@@ -277,7 +283,11 @@   | RuntimeUnkFlexi -- Used in the GHCi debugger  instance Outputable ZonkEnv where-  ppr (ZonkEnv { ze_id_env =  var_env}) = pprUFM var_env (vcat . map ppr)+  ppr (ZonkEnv { ze_tv_env = tv_env+               , ze_id_env = id_env })+    = text "ZE" <+> braces (vcat+         [ text "ze_tv_env =" <+> ppr tv_env+         , text "ze_id_env =" <+> ppr id_env ])  -- The EvBinds have to already be zonked, but that's usually the case. emptyZonkEnv :: TcM ZonkEnv@@ -291,9 +301,9 @@                          , ze_id_env = emptyVarEnv                          , ze_meta_tv_env = mtv_env_ref }) } -initZonkEnv :: (ZonkEnv -> a -> TcM b) -> a -> TcM b-initZonkEnv do_it x = do { ze <- mkEmptyZonkEnv DefaultFlexi-                         ; do_it ze x }+initZonkEnv :: (ZonkEnv -> TcM b) -> TcM b+initZonkEnv thing_inside = do { ze <- mkEmptyZonkEnv DefaultFlexi+                              ; thing_inside ze }  -- | Extend the knot-tied environment. extendIdZonkEnvRec :: ZonkEnv -> [Var] -> ZonkEnv@@ -323,6 +333,12 @@ extendTyZonkEnv1 ze@(ZonkEnv { ze_tv_env = ty_env }) tv   = ze { ze_tv_env = extendVarEnv ty_env tv tv } +extendTyZonkEnvN :: ZonkEnv -> [(Name,TyVar)] -> ZonkEnv+extendTyZonkEnvN ze@(ZonkEnv { ze_tv_env = ty_env }) pairs+  = ze { ze_tv_env = foldl add ty_env pairs }+  where+    add env (name, tv) = extendVarEnv_Directly env (getUnique name) tv+ setZonkType :: ZonkEnv -> ZonkFlexi -> ZonkEnv setZonkType ze flexi = ze { ze_flexi = flexi } @@ -373,12 +389,12 @@ zonkIdBndrs env ids = mapM (zonkIdBndr env) ids  zonkTopBndrs :: [TcId] -> TcM [Id]-zonkTopBndrs ids = initZonkEnv zonkIdBndrs ids+zonkTopBndrs ids = initZonkEnv $ \ ze -> zonkIdBndrs ze ids  zonkFieldOcc :: ZonkEnv -> FieldOcc GhcTcId -> TcM (FieldOcc GhcTc) zonkFieldOcc env (FieldOcc sel lbl)   = fmap ((flip FieldOcc) lbl) $ zonkIdBndr env sel-zonkFieldOcc _ (XFieldOcc _) = panic "zonkFieldOcc"+zonkFieldOcc _ (XFieldOcc nec) = noExtCon nec  zonkEvBndrsX :: ZonkEnv -> [EvVar] -> TcM (ZonkEnv, [Var]) zonkEvBndrsX = mapAccumLM zonkEvBndrX@@ -418,7 +434,7 @@ zonkCoreBndrsX = mapAccumLM zonkCoreBndrX  zonkTyBndrs :: [TcTyVar] -> TcM (ZonkEnv, [TyVar])-zonkTyBndrs = initZonkEnv zonkTyBndrsX+zonkTyBndrs tvs = initZonkEnv $ \ze -> zonkTyBndrsX ze tvs  zonkTyBndrsX :: ZonkEnv -> [TcTyVar] -> TcM (ZonkEnv, [TyVar]) zonkTyBndrsX = mapAccumLM zonkTyBndrX@@ -435,7 +451,7 @@  zonkTyVarBinders ::  [VarBndr TcTyVar vis]                  -> TcM (ZonkEnv, [VarBndr TyVar vis])-zonkTyVarBinders = initZonkEnv zonkTyVarBindersX+zonkTyVarBinders tvbs = initZonkEnv $ \ ze -> zonkTyVarBindersX ze tvbs  zonkTyVarBindersX :: ZonkEnv -> [VarBndr TcTyVar vis]                              -> TcM (ZonkEnv, [VarBndr TyVar vis])@@ -448,11 +464,27 @@   = do { (env', tv') <- zonkTyBndrX env tv        ; return (env', Bndr tv' vis) } +zonkRecTyVarBndrs :: [Name] -> [TcTyVar] -> TcM (ZonkEnv, [TyVar])+-- This rather specialised function is used in exactly one place.+-- See Note [Tricky scoping in generaliseTcTyCon] in TcTyClsDecls.+zonkRecTyVarBndrs names tc_tvs+  = initZonkEnv $ \ ze ->+    fixM $ \ ~(_, rec_new_tvs) ->+    do { let ze' = extendTyZonkEnvN ze $+                   zipWithLazy (\ tc_tv new_tv -> (getName tc_tv, new_tv))+                               tc_tvs rec_new_tvs+       ; new_tvs <- zipWithM (zonk_one ze') names tc_tvs+       ; return (ze', new_tvs) }+  where+    zonk_one ze name tc_tv+      = do { ki <- zonkTcTypeToTypeX ze (tyVarKind tc_tv)+           ; return (mkTyVar name ki) }+ zonkTopExpr :: HsExpr GhcTcId -> TcM (HsExpr GhcTc)-zonkTopExpr e = initZonkEnv zonkExpr e+zonkTopExpr e = initZonkEnv $ \ ze -> zonkExpr ze e  zonkTopLExpr :: LHsExpr GhcTcId -> TcM (LHsExpr GhcTc)-zonkTopLExpr e = initZonkEnv zonkLExpr e+zonkTopLExpr e = initZonkEnv $ \ ze -> zonkLExpr ze e  zonkTopDecls :: Bag EvBind              -> LHsBinds GhcTcId@@ -465,7 +497,7 @@                      [LTcSpecPrag],                      [LRuleDecl    GhcTc]) zonkTopDecls ev_binds binds rules imp_specs fords-  = do  { (env1, ev_binds') <- initZonkEnv zonkEvBinds ev_binds+  = do  { (env1, ev_binds') <- initZonkEnv $ \ ze -> zonkEvBinds ze ev_binds         ; (env2, binds')    <- zonkRecMonoBinds env1 binds                         -- Top level is implicitly recursive         ; rules' <- zonkRules env2 rules@@ -505,12 +537,12 @@         = do n' <- mapIPNameTc (zonkIdBndr env) n              e' <- zonkLExpr env e              return (IPBind x n' e')-    zonk_ip_bind (XIPBind _) = panic "zonkLocalBinds : XCIPBind"+    zonk_ip_bind (XIPBind nec) = noExtCon nec -zonkLocalBinds _ (HsIPBinds _ (XHsIPBinds _))-  = panic "zonkLocalBinds" -- Not in typechecker output-zonkLocalBinds _ (XHsLocalBindsLR _)-  = panic "zonkLocalBinds" -- Not in typechecker output+zonkLocalBinds _ (HsIPBinds _ (XHsIPBinds nec))+  = noExtCon nec+zonkLocalBinds _ (XHsLocalBindsLR nec)+  = noExtCon nec  --------------------------------------------- zonkRecMonoBinds :: ZonkEnv -> LHsBinds GhcTcId -> TcM (ZonkEnv, LHsBinds GhcTc)@@ -570,7 +602,7 @@             ; new_val_binds <- mapBagM (zonk_val_bind env3) val_binds             ; new_exports   <- mapM (zonk_export env3) exports             ; return (new_val_binds, new_exports) }-       ; return (AbsBinds { abs_ext = noExt+       ; return (AbsBinds { abs_ext = noExtField                           , abs_tvs = new_tyvars, abs_ev_vars = new_evs                           , abs_ev_binds = new_ev_binds                           , abs_exports = new_exports, abs_binds = new_val_bind@@ -606,7 +638,7 @@                         , abe_poly = new_poly_id                         , abe_mono = zonkIdOcc env mono_id                         , abe_prags = new_prags })-    zonk_export _ (XABExport _) = panic "zonk_bind: XABExport"+    zonk_export _ (XABExport nec) = noExtCon nec  zonk_bind env (PatSynBind x bind@(PSB { psb_id = (dL->L loc id)                                       , psb_args = details@@ -622,8 +654,8 @@                        , psb_def = lpat'                        , psb_dir = dir' } } -zonk_bind _ (PatSynBind _ (XPatSynBind _)) = panic "zonk_bind"-zonk_bind _ (XHsBindsLR _)                 = panic "zonk_bind"+zonk_bind _ (PatSynBind _ (XPatSynBind nec)) = noExtCon nec+zonk_bind _ (XHsBindsLR nec)                 = noExtCon nec  zonkPatSynDetails :: ZonkEnv                   -> HsPatSynDetails (Located TcId)@@ -677,7 +709,7 @@         ; return (MG { mg_alts = cL l ms'                      , mg_ext = MatchGroupTc arg_tys' res_ty'                      , mg_origin = origin }) }-zonkMatchGroup _ _ (XMatchGroup {}) = panic "zonkMatchGroup"+zonkMatchGroup _ _ (XMatchGroup nec) = noExtCon nec  zonkMatch :: ZonkEnv           -> (ZonkEnv -> Located (body GhcTcId) -> TcM (Located (body GhcTc)))@@ -688,7 +720,7 @@   = do  { (env1, new_pats) <- zonkPats env pats         ; new_grhss <- zonkGRHSs env1 zBody grhss         ; return (cL loc (match { m_pats = new_pats, m_grhss = new_grhss })) }-zonkMatch _ _ (dL->L  _ (XMatch _)) = panic "zonkMatch"+zonkMatch _ _ (dL->L  _ (XMatch nec)) = noExtCon nec zonkMatch _ _ _ = panic "zonkMatch: Impossible Match"                              -- due to #15884 @@ -705,10 +737,10 @@           = do (env2, new_guarded) <- zonkStmts new_env zonkLExpr guarded                new_rhs <- zBody env2 rhs                return (GRHS xx new_guarded new_rhs)-        zonk_grhs (XGRHS _) = panic "zonkGRHSs"+        zonk_grhs (XGRHS nec) = noExtCon nec     new_grhss <- mapM (wrapLocM zonk_grhs) grhss     return (GRHSs x new_grhss (cL l new_binds))-zonkGRHSs _ _ (XGRHSs _) = panic "zonkGRHSs"+zonkGRHSs _ _ (XGRHSs nec) = noExtCon nec  {- ************************************************************************@@ -814,7 +846,7 @@                                               ; return (cL l (Present x e')) }     zonk_tup_arg (dL->L l (Missing t)) = do { t' <- zonkTcTypeToTypeX env t                                             ; return (cL l (Missing t')) }-    zonk_tup_arg (dL->L _ (XTupArg{})) = panic "zonkExpr.XTupArg"+    zonk_tup_arg (dL->L _ (XTupArg nec)) = noExtCon nec     zonk_tup_arg _ = panic "zonk_tup_arg: Impossible Match"                              -- due to #15884 @@ -850,7 +882,7 @@           = do { (env', guard') <- zonkStmts env zonkLExpr guard                ; expr'          <- zonkLExpr env' expr                ; return $ GRHS x guard' expr' }-        zonk_alt (XGRHS _) = panic "zonkExpr.HsMultiIf"+        zonk_alt (XGRHS nec) = noExtCon nec  zonkExpr env (HsLet x (dL->L l binds) expr)   = do (new_env, new_binds) <- zonkLocalBinds env binds@@ -894,7 +926,7 @@  zonkExpr env (ExprWithTySig _ e ty)   = do { e' <- zonkLExpr env e-       ; return (ExprWithTySig noExt e' ty) }+       ; return (ExprWithTySig noExtField e' ty) }  zonkExpr env (ArithSeq expr wit info)   = do (env1, new_wit) <- zonkWit env wit@@ -1030,7 +1062,7 @@        new_ty <- zonkTcTypeToTypeX env ty        return (HsCmdDo new_ty (cL l new_stmts)) -zonkCmd _ (XCmd{}) = panic "zonkCmd"+zonkCmd _ (XCmd nec) = noExtCon nec   @@ -1050,7 +1082,7 @@          -- rules for arrows         return (HsCmdTop (CmdTopTc new_stack_tys new_ty new_ids) new_cmd)-zonk_cmd_top _ (XCmdTop {}) = panic "zonk_cmd_top"+zonk_cmd_top _ (XCmdTop nec) = noExtCon nec  ------------------------------------------------------------------------- zonkCoFn :: ZonkEnv -> HsWrapper -> TcM (ZonkEnv, HsWrapper)@@ -1083,7 +1115,7 @@         ; e' <- zonkExpr env e         ; return (lit { ol_witness = e', ol_ext = OverLitTc r ty' }) } -zonkOverLit _ XOverLit{} = panic "zonkOverLit"+zonkOverLit _ (XOverLit nec) = noExtCon nec  ------------------------------------------------------------------------- zonkArithSeq :: ZonkEnv -> ArithSeqInfo GhcTcId -> TcM (ArithSeqInfo GhcTc)@@ -1139,7 +1171,7 @@             ; (env3, new_return) <- zonkSyntaxExpr env2 return_op             ; return (ParStmtBlock x new_stmts (zonkIdOccs env3 bndrs)                                                                    new_return) }-    zonk_branch _ (XParStmtBlock{}) = panic "zonkStmt"+    zonk_branch _ (XParStmtBlock nec) = noExtCon nec  zonkStmt env zBody (RecStmt { recS_stmts = segStmts, recS_later_ids = lvs, recS_rec_ids = rvs                             , recS_ret_fn = ret_id, recS_mfix_fn = mfix_id@@ -1230,20 +1262,21 @@   = do  { (env1, new_mb_join)   <- zonk_join env mb_join         ; (env2, new_args)      <- zonk_args env1 args         ; new_body_ty           <- zonkTcTypeToTypeX env2 body_ty-        ; return (env2, ApplicativeStmt new_body_ty new_args new_mb_join) }+        ; return ( env2+                 , ApplicativeStmt new_body_ty new_args new_mb_join) }   where     zonk_join env Nothing  = return (env, Nothing)     zonk_join env (Just j) = second Just <$> zonkSyntaxExpr env j -    get_pat (_, ApplicativeArgOne _ pat _ _) = pat+    get_pat (_, ApplicativeArgOne _ pat _ _ _) = pat     get_pat (_, ApplicativeArgMany _ _ _ pat) = pat-    get_pat (_, XApplicativeArg _) = panic "zonkStmt"+    get_pat (_, XApplicativeArg nec) = noExtCon nec -    replace_pat pat (op, ApplicativeArgOne x _ a isBody)-      = (op, ApplicativeArgOne x pat a isBody)+    replace_pat pat (op, ApplicativeArgOne x _ a isBody fail_op)+      = (op, ApplicativeArgOne x pat a isBody fail_op)     replace_pat pat (op, ApplicativeArgMany x a b _)       = (op, ApplicativeArgMany x a b pat)-    replace_pat _ (_, XApplicativeArg _) = panic "zonkStmt"+    replace_pat _ (_, XApplicativeArg nec) = noExtCon nec      zonk_args env args       = do { (env1, new_args_rev) <- zonk_args_rev env (reverse args)@@ -1260,16 +1293,17 @@            ; return (env2, (new_op, new_arg) : new_args) }     zonk_args_rev env [] = return (env, []) -    zonk_arg env (ApplicativeArgOne x pat expr isBody)+    zonk_arg env (ApplicativeArgOne x pat expr isBody fail_op)       = do { new_expr <- zonkLExpr env expr-           ; return (ApplicativeArgOne x pat new_expr isBody) }+           ; (_, new_fail) <- zonkSyntaxExpr env fail_op+           ; return (ApplicativeArgOne x pat new_expr isBody new_fail) }     zonk_arg env (ApplicativeArgMany x stmts ret pat)       = do { (env1, new_stmts) <- zonkStmts env zonkLExpr stmts            ; new_ret           <- zonkExpr env1 ret            ; return (ApplicativeArgMany x new_stmts new_ret pat) }-    zonk_arg _ (XApplicativeArg _) = panic "zonkStmt.XApplicativeArg"+    zonk_arg _ (XApplicativeArg nec) = noExtCon nec -zonkStmt _ _ (XStmtLR _) = panic "zonkStmt"+zonkStmt _ _ (XStmtLR nec) = noExtCon nec  ------------------------------------------------------------------------- zonkRecFields :: ZonkEnv -> HsRecordBinds GhcTcId -> TcM (HsRecordBinds GhcTcId)@@ -1513,7 +1547,7 @@       = do { (env', v') <- zonk_it env v            ; return (env', cL l (RuleBndr x (cL loc v'))) }    zonk_tm_bndr _ (dL->L _ (RuleBndrSig {})) = panic "zonk_tm_bndr RuleBndrSig"-   zonk_tm_bndr _ (dL->L _ (XRuleBndr {})) = panic "zonk_tm_bndr XRuleBndr"+   zonk_tm_bndr _ (dL->L _ (XRuleBndr nec)) = noExtCon nec    zonk_tm_bndr _ _ = panic "zonk_tm_bndr: Impossible Match"                             -- due to #15884 @@ -1525,7 +1559,7 @@                     -- DV: used to be return (env,v) but that is plain                     -- wrong because we may need to go inside the kind                     -- of v and zonk there!-zonkRule _ (XRuleDecl _) = panic "zonkRule"+zonkRule _ (XRuleDecl nec) = noExtCon nec  {- ************************************************************************@@ -1650,7 +1684,7 @@          ; return (env1, binds') })   where     collect_ev_bndrs :: Bag EvBind -> [EvVar]-    collect_ev_bndrs = foldrBag add []+    collect_ev_bndrs = foldr add []     add (EvBind { eb_lhs = var }) vars = var : vars  zonkEvBind :: ZonkEnv -> EvBind -> TcM EvBind@@ -1659,7 +1693,7 @@           -- Optimise the common case of Refl coercions          -- See Note [Optimise coercion zonking]-         -- This has a very big effect on some programs (eg Trac #5030)+         -- This has a very big effect on some programs (eg #5030)         ; term' <- case getEqPredTys_maybe (idType var') of            Just (r, ty1, ty2) | ty1 `eqType` ty2@@ -1681,7 +1715,7 @@ use Refl on the right, ignoring the actual coercion on the RHS.  This can have a very big effect, because the constraint solver sometimes does go-to a lot of effort to prove Refl!  (Eg when solving  10+3 = 10+3; cf Trac #5030)+to a lot of effort to prove Refl!  (Eg when solving  10+3 = 10+3; cf #5030)   ************************************************************************@@ -1697,7 +1731,7 @@      In TcMType.zonkTcTyVar, we short-circuit (Indirect ty) to     (Indirect zty), see Note [Sharing in zonking] in TcMType. But we-    /can't/ do this when zonking a TcType to a Type (Trac #15552, esp+    /can't/ do this when zonking a TcType to a Type (#15552, esp     comment:3).  Suppose we have         alpha -> alpha@@ -1725,7 +1759,7 @@     the same as zonkTcTypeToType. (If we distinguished TcType from     Type, this issue would have been a type error!) -Solution: (see Trac #15552 for other variants)+Solution: (see #15552 for other variants)      One possible solution is simply not to do the short-circuiting.     That has less sharing, but maybe sharing is rare. And indeed,@@ -1743,9 +1777,9 @@      * The map is of course stateful, held in a TcRef. (That is unlike       the treatment of lexically-scoped variables in ze_tv_env and-      ze_id_env.+      ze_id_env.) -    Is the extra work worth it.  Some non-sytematic perf measurements+    Is the extra work worth it?  Some non-sytematic perf measurements     suggest that compiler allocation is reduced overall (by 0.5% or so)     but compile time really doesn't change. -}@@ -1847,12 +1881,11 @@  zonk_tycomapper :: TyCoMapper ZonkEnv TcM zonk_tycomapper = TyCoMapper-  { tcm_smart = True   -- Establish type invariants-  , tcm_tyvar = zonkTyVarOcc-  , tcm_covar = zonkCoVarOcc-  , tcm_hole  = zonkCoHole+  { tcm_tyvar      = zonkTyVarOcc+  , tcm_covar      = zonkCoVarOcc+  , tcm_hole       = zonkCoHole   , tcm_tycobinder = \env tv _vis -> zonkTyBndrX env tv-  , tcm_tycon = zonkTcTyConToTyCon }+  , tcm_tycon      = zonkTcTyConToTyCon }  -- Zonk a TyCon by changing a TcTyCon to a regular TyCon zonkTcTyConToTyCon :: TcTyCon -> TcM TyCon@@ -1865,13 +1898,13 @@  -- Confused by zonking? See Note [What is zonking?] in TcMType. zonkTcTypeToType :: TcType -> TcM Type-zonkTcTypeToType = initZonkEnv zonkTcTypeToTypeX+zonkTcTypeToType ty = initZonkEnv $ \ ze -> zonkTcTypeToTypeX ze ty  zonkTcTypeToTypeX :: ZonkEnv -> TcType -> TcM Type zonkTcTypeToTypeX = mapType zonk_tycomapper  zonkTcTypesToTypes :: [TcType] -> TcM [Type]-zonkTcTypesToTypes = initZonkEnv zonkTcTypesToTypesX+zonkTcTypesToTypes tys = initZonkEnv $ \ ze -> zonkTcTypesToTypesX ze tys  zonkTcTypesToTypesX :: ZonkEnv -> [TcType] -> TcM [Type] zonkTcTypesToTypesX env tys = mapM (zonkTcTypeToTypeX env) tys
typecheck/TcHsType.hs view
@@ -7,2871 +7,3491 @@  {-# LANGUAGE CPP, TupleSections, MultiWayIf, RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeFamilies #-}--module TcHsType (-        -- Type signatures-        kcClassSigType, tcClassSigType,-        tcHsSigType, tcHsSigWcType,-        tcHsPartialSigType,-        funsSigCtxt, addSigCtxt, pprSigCtxt,--        tcHsClsInstType,-        tcHsDeriv, tcDerivStrategy,-        tcHsTypeApp,-        UserTypeCtxt(..),-        bindImplicitTKBndrs_Tv, bindImplicitTKBndrs_Skol,-            bindImplicitTKBndrs_Q_Tv, bindImplicitTKBndrs_Q_Skol,-        bindExplicitTKBndrs_Tv, bindExplicitTKBndrs_Skol,-            bindExplicitTKBndrs_Q_Tv, bindExplicitTKBndrs_Q_Skol,-        ContextKind(..),--                -- Type checking type and class decls-        kcLookupTcTyCon, bindTyClTyVars,-        etaExpandAlgTyCon, tcbVisibilities,--          -- tyvars-        zonkAndScopedSort,--        -- Kind-checking types-        -- No kind generalisation, no checkValidType-        kcLHsQTyVars,-        tcWildCardBinders,-        tcHsLiftedType,   tcHsOpenType,-        tcHsLiftedTypeNC, tcHsOpenTypeNC,-        tcLHsType, tcLHsTypeUnsaturated, tcCheckLHsType,-        tcHsMbContext, tcHsContext, tcLHsPredType, tcInferApps,-        failIfEmitsConstraints,-        solveEqualities, -- useful re-export--        typeLevelMode, kindLevelMode,--        kindGeneralize, checkExpectedKind, RequireSaturation(..),-        reportFloatingKvs,--        -- Sort-checking kinds-        tcLHsKindSig, badKindSig,--        -- Zonking and promoting-        zonkPromoteType,--        -- Pattern type signatures-        tcHsPatSigType, tcPatSig,--        -- Error messages-        funAppCtxt, addTyConFlavCtxt-   ) where--#include "HsVersions.h"--import GhcPrelude--import HsSyn-import TcRnMonad-import TcEvidence-import TcEnv-import TcMType-import TcValidity-import TcUnify-import TcIface-import TcSimplify-import TcHsSyn-import TcErrors ( reportAllUnsolved )-import TcType-import Inst   ( tcInstTyBinders, tcInstTyBinder )-import TyCoRep( TyCoBinder(..), TyBinder, tyCoBinderArgFlag )  -- Used in etaExpandAlgTyCon-import Type-import TysPrim-import Coercion-import RdrName( lookupLocalRdrOcc )-import Var-import VarSet-import TyCon-import ConLike-import DataCon-import Class-import Name-import NameSet-import VarEnv-import TysWiredIn-import BasicTypes-import SrcLoc-import Constants ( mAX_CTUPLE_SIZE )-import ErrUtils( MsgDoc )-import Unique-import UniqSet-import Util-import UniqSupply-import Outputable-import FastString-import PrelNames hiding ( wildCardName )-import DynFlags ( WarningFlag (Opt_WarnPartialTypeSignatures) )-import qualified GHC.LanguageExtensions as LangExt--import Maybes-import Data.List ( find )-import Control.Monad--{--        -----------------------------                General notes-        ------------------------------Unlike with expressions, type-checking types both does some checking and-desugars at the same time. This is necessary because we often want to perform-equality checks on the types right away, and it would be incredibly painful-to do this on un-desugared types. Luckily, desugared types are close enough-to HsTypes to make the error messages sane.--During type-checking, we perform as little validity checking as possible.-Generally, after type-checking, you will want to do validity checking, say-with TcValidity.checkValidType.--Validity checking-~~~~~~~~~~~~~~~~~-Some of the validity check could in principle be done by the kind checker,-but not all:--- During desugaring, we normalise by expanding type synonyms.  Only-  after this step can we check things like type-synonym saturation-  e.g.  type T k = k Int-        type S a = a-  Then (T S) is ok, because T is saturated; (T S) expands to (S Int);-  and then S is saturated.  This is a GHC extension.--- Similarly, also a GHC extension, we look through synonyms before complaining-  about the form of a class or instance declaration--- Ambiguity checks involve functional dependencies--Also, in a mutually recursive group of types, we can't look at the TyCon until we've-finished building the loop.  So to keep things simple, we postpone most validity-checking until step (3).--%************************************************************************-%*                                                                      *-              Check types AND do validity checking-*                                                                      *-************************************************************************--}--funsSigCtxt :: [Located Name] -> UserTypeCtxt--- Returns FunSigCtxt, with no redundant-context-reporting,--- form a list of located names-funsSigCtxt (L _ name1 : _) = FunSigCtxt name1 False-funsSigCtxt []              = panic "funSigCtxt"--addSigCtxt :: UserTypeCtxt -> LHsType GhcRn -> TcM a -> TcM a-addSigCtxt ctxt hs_ty thing_inside-  = setSrcSpan (getLoc hs_ty) $-    addErrCtxt (pprSigCtxt ctxt hs_ty) $-    thing_inside--pprSigCtxt :: UserTypeCtxt -> LHsType GhcRn -> SDoc--- (pprSigCtxt ctxt <extra> <type>)--- prints    In the type signature for 'f':---              f :: <type>--- The <extra> is either empty or "the ambiguity check for"-pprSigCtxt ctxt hs_ty-  | Just n <- isSigMaybe ctxt-  = hang (text "In the type signature:")-       2 (pprPrefixOcc n <+> dcolon <+> ppr hs_ty)--  | otherwise-  = hang (text "In" <+> pprUserTypeCtxt ctxt <> colon)-       2 (ppr hs_ty)--tcHsSigWcType :: UserTypeCtxt -> LHsSigWcType GhcRn -> TcM Type--- This one is used when we have a LHsSigWcType, but in--- a place where wildcards aren't allowed. The renamer has--- already checked this, so we can simply ignore it.-tcHsSigWcType ctxt sig_ty = tcHsSigType ctxt (dropWildCards sig_ty)--kcClassSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM ()-kcClassSigType skol_info names sig_ty-  = discardResult $-    tcClassSigType skol_info names sig_ty-  -- tcClassSigType does a fair amount of extra work that we don't need,-  -- such as ordering quantified variables. But we absolutely do need-  -- to push the level when checking method types and solve local equalities,-  -- and so it seems easier just to call tcClassSigType than selectively-  -- extract the lines of code from tc_hs_sig_type that we really need.-  -- If we don't push the level, we get #16517, where GHC accepts-  --   class C a where-  --     meth :: forall k. Proxy (a :: k) -> ()-  -- Note that k is local to meth -- this is hogwash.--tcClassSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM Type--- Does not do validity checking-tcClassSigType skol_info names sig_ty-  = addSigCtxt (funsSigCtxt names) (hsSigType sig_ty) $-    snd <$> tc_hs_sig_type skol_info sig_ty (TheKind liftedTypeKind)-       -- Do not zonk-to-Type, nor perform a validity check-       -- We are in a knot with the class and associated types-       -- Zonking and validity checking is done by tcClassDecl-       -- No need to fail here if the type has an error:-       --   If we're in the kind-checking phase, the solveEqualities-       --     in kcTyClGroup catches the error-       --   If we're in the type-checking phase, the solveEqualities-       --     in tcClassDecl1 gets it-       -- Failing fast here degrades the error message in, e.g., tcfail135:-       --   class Foo f where-       --     baa :: f a -> f-       -- If we fail fast, we're told that f has kind `k1` when we wanted `*`.-       -- It should be that f has kind `k2 -> *`, but we never get a chance-       -- to run the solver where the kind of f is touchable. This is-       -- painfully delicate.--tcHsSigType :: UserTypeCtxt -> LHsSigType GhcRn -> TcM Type--- Does validity checking--- See Note [Recipe for checking a signature]-tcHsSigType ctxt sig_ty-  = addSigCtxt ctxt (hsSigType sig_ty) $-    do { traceTc "tcHsSigType {" (ppr sig_ty)--          -- Generalise here: see Note [Kind generalisation]-       ; (insol, ty) <- tc_hs_sig_type skol_info sig_ty-                                       (expectedKindInCtxt ctxt)-       ; ty <- zonkTcType ty--       ; when insol failM-       -- See Note [Fail fast if there are insoluble kind equalities] in TcSimplify--       ; checkValidType ctxt ty-       ; traceTc "end tcHsSigType }" (ppr ty)-       ; return ty }-  where-    skol_info = SigTypeSkol ctxt--tc_hs_sig_type :: SkolemInfo -> LHsSigType GhcRn-               -> ContextKind -> TcM (Bool, TcType)--- Kind-checks/desugars an 'LHsSigType',---   solve equalities,---   and then kind-generalizes.--- This will never emit constraints, as it uses solveEqualities interally.--- No validity checking or zonking--- Returns also a Bool indicating whether the type induced an insoluble constraint;--- True <=> constraint is insoluble-tc_hs_sig_type skol_info hs_sig_type ctxt_kind-  | HsIB { hsib_ext = sig_vars, hsib_body = hs_ty } <- hs_sig_type-  = do { (tc_lvl, (wanted, (spec_tkvs, ty)))-              <- pushTcLevelM                           $-                 solveLocalEqualitiesX "tc_hs_sig_type" $-                 bindImplicitTKBndrs_Skol sig_vars      $-                 do { kind <- newExpectedKind ctxt_kind--                    ; tc_lhs_type typeLevelMode hs_ty kind }-       -- Any remaining variables (unsolved in the solveLocalEqualities)-       -- should be in the global tyvars, and therefore won't be quantified--       ; spec_tkvs <- zonkAndScopedSort spec_tkvs-       ; let ty1 = mkSpecForAllTys spec_tkvs ty-       ; kvs <- kindGeneralizeLocal wanted ty1-       ; emitResidualTvConstraint skol_info Nothing (kvs ++ spec_tkvs)-                                  tc_lvl wanted--       ; return (insolubleWC wanted, mkInvForAllTys kvs ty1) }--tc_hs_sig_type _ (XHsImplicitBndrs _) _ = panic "tc_hs_sig_type"--tcTopLHsType :: LHsSigType GhcRn -> ContextKind -> TcM Type--- tcTopLHsType is used for kind-checking top-level HsType where---   we want to fully solve /all/ equalities, and report errors--- Does zonking, but not validity checking because it's used---   for things (like deriving and instances) that aren't---   ordinary types-tcTopLHsType hs_sig_type ctxt_kind-  | HsIB { hsib_ext = sig_vars, hsib_body = hs_ty } <- hs_sig_type-  = do { traceTc "tcTopLHsType {" (ppr hs_ty)-       ; (spec_tkvs, ty)-              <- pushTcLevelM_                     $-                 solveEqualities                   $-                 bindImplicitTKBndrs_Skol sig_vars $-                 do { kind <- newExpectedKind ctxt_kind-                    ; tc_lhs_type typeLevelMode hs_ty kind }--       ; spec_tkvs <- zonkAndScopedSort spec_tkvs-       ; let ty1 = mkSpecForAllTys spec_tkvs ty-       ; kvs <- kindGeneralize ty1-       ; final_ty <- zonkTcTypeToType (mkInvForAllTys kvs ty1)-       ; traceTc "End tcTopLHsType }" (vcat [ppr hs_ty, ppr final_ty])-       ; return final_ty}--tcTopLHsType (XHsImplicitBndrs _) _ = panic "tcTopLHsType"--------------------tcHsDeriv :: LHsSigType GhcRn -> TcM ([TyVar], (Class, [Type], [Kind]))--- Like tcHsSigType, but for the ...deriving( C t1 ty2 ) clause--- Returns the C, [ty1, ty2, and the kinds of C's remaining arguments--- E.g.    class C (a::*) (b::k->k)---         data T a b = ... deriving( C Int )---    returns ([k], C, [k, Int], [k->k])--- Return values are fully zonked-tcHsDeriv hs_ty-  = do { ty <- checkNoErrs $  -- Avoid redundant error report-                              -- with "illegal deriving", below-               tcTopLHsType hs_ty AnyKind-       ; let (tvs, pred)    = splitForAllTys ty-             (kind_args, _) = splitFunTys (typeKind pred)-       ; case getClassPredTys_maybe pred of-           Just (cls, tys) -> return (tvs, (cls, tys, kind_args))-           Nothing -> failWithTc (text "Illegal deriving item" <+> quotes (ppr hs_ty)) }---- | Typecheck something within the context of a deriving strategy.--- This is of particular importance when the deriving strategy is @via@.--- For instance:------ @--- deriving via (S a) instance C (T a)--- @------ We need to typecheck @S a@, and moreover, we need to extend the tyvar--- environment with @a@ before typechecking @C (T a)@, since @S a@ quantified--- the type variable @a@.-tcDerivStrategy-  :: forall a.-     Maybe (DerivStrategy GhcRn) -- ^ The deriving strategy-  -> TcM ([TyVar], a) -- ^ The thing to typecheck within the context of the-                      -- deriving strategy, which might quantify some type-                      -- variables of its own.-  -> TcM (Maybe (DerivStrategy GhcTc), [TyVar], a)-     -- ^ The typechecked deriving strategy, all quantified tyvars, and-     -- the payload of the typechecked thing.-tcDerivStrategy mds thing_inside-  = case mds of-      Nothing -> boring_case Nothing-      Just ds -> do (ds', tvs, thing) <- tc_deriv_strategy ds-                    pure (Just ds', tvs, thing)-  where-    tc_deriv_strategy :: DerivStrategy GhcRn-                      -> TcM (DerivStrategy GhcTc, [TyVar], a)-    tc_deriv_strategy StockStrategy    = boring_case StockStrategy-    tc_deriv_strategy AnyclassStrategy = boring_case AnyclassStrategy-    tc_deriv_strategy NewtypeStrategy  = boring_case NewtypeStrategy-    tc_deriv_strategy (ViaStrategy ty) = do-      ty' <- checkNoErrs $-             tcTopLHsType ty AnyKind-      let (via_tvs, via_pred) = splitForAllTys ty'-      tcExtendTyVarEnv via_tvs $ do-        (thing_tvs, thing) <- thing_inside-        pure (ViaStrategy via_pred, via_tvs ++ thing_tvs, thing)--    boring_case :: mds -> TcM (mds, [TyVar], a)-    boring_case mds = do-      (thing_tvs, thing) <- thing_inside-      pure (mds, thing_tvs, thing)--tcHsClsInstType :: UserTypeCtxt    -- InstDeclCtxt or SpecInstCtxt-                -> LHsSigType GhcRn-                -> TcM Type--- Like tcHsSigType, but for a class instance declaration-tcHsClsInstType user_ctxt hs_inst_ty-  = setSrcSpan (getLoc (hsSigType hs_inst_ty)) $-    do { -- Fail eagerly if tcTopLHsType fails.  We are at top level so-         -- these constraints will never be solved later. And failing-         -- eagerly avoids follow-on errors when checkValidInstance-         -- sees an unsolved coercion hole-         inst_ty <- checkNoErrs $-                    tcTopLHsType hs_inst_ty (TheKind constraintKind)-       ; checkValidInstance user_ctxt hs_inst_ty inst_ty-       ; return inst_ty }--------------------------------------------------- | Type-check a visible type application-tcHsTypeApp :: LHsWcType GhcRn -> Kind -> TcM Type--- See Note [Recipe for checking a signature] in TcHsType-tcHsTypeApp wc_ty kind-  | HsWC { hswc_ext = sig_wcs, hswc_body = hs_ty } <- wc_ty-  = do { ty <- solveLocalEqualities "tcHsTypeApp" $-               -- We are looking at a user-written type, very like a-               -- signature so we want to solve its equalities right now-               unsetWOptM Opt_WarnPartialTypeSignatures $-               setXOptM LangExt.PartialTypeSignatures $-               -- See Note [Wildcards in visible type application]-               tcWildCardBinders sig_wcs $ \ _ ->-               tcCheckLHsType hs_ty kind-       -- We must promote here. Ex:-       --   f :: forall a. a-       --   g = f @(forall b. Proxy b -> ()) @Int ...-       -- After when processing the @Int, we'll have to check its kind-       -- against the as-yet-unknown kind of b. This check causes an assertion-       -- failure if we don't promote.-       ; ty <- zonkPromoteType ty-       ; checkValidType TypeAppCtxt ty-       ; return ty }-tcHsTypeApp (XHsWildCardBndrs _) _ = panic "tcHsTypeApp"--{- Note [Wildcards in visible type application]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--A HsWildCardBndrs's hswc_ext now only includes named wildcards, so any unnamed-wildcards stay unchanged in hswc_body and when called in tcHsTypeApp, tcCheckLHsType-will call emitWildCardHoleConstraints on them. However, this would trigger-error/warning when an unnamed wildcard is passed in as a visible type argument,-which we do not want because users should be able to write @_ to skip a instantiating-a type variable variable without fuss. The solution is to switch the-PartialTypeSignatures flags here to let the typechecker know that it's checking-a '@_' and do not emit hole constraints on it.-See related Note [Wildcards in visible kind application]-and Note [The wildcard story for types] in HsTypes.hs---}--{--************************************************************************-*                                                                      *-            The main kind checker: no validity checks here-*                                                                      *-************************************************************************--        First a couple of simple wrappers for kcHsType--}------------------------------tcHsOpenType, tcHsLiftedType,-  tcHsOpenTypeNC, tcHsLiftedTypeNC :: LHsType GhcRn -> TcM TcType--- Used for type signatures--- Do not do validity checking-tcHsOpenType ty   = addTypeCtxt ty $ tcHsOpenTypeNC ty-tcHsLiftedType ty = addTypeCtxt ty $ tcHsLiftedTypeNC ty--tcHsOpenTypeNC   ty = do { ek <- newOpenTypeKind-                         ; tc_lhs_type typeLevelMode ty ek }-tcHsLiftedTypeNC ty = tc_lhs_type typeLevelMode ty liftedTypeKind---- Like tcHsType, but takes an expected kind-tcCheckLHsType :: LHsType GhcRn -> Kind -> TcM TcType-tcCheckLHsType hs_ty exp_kind-  = addTypeCtxt hs_ty $-    tc_lhs_type typeLevelMode hs_ty exp_kind--tcLHsType :: LHsType GhcRn -> TcM (TcType, TcKind)--- Called from outside: set the context-tcLHsType ty = addTypeCtxt ty (tc_infer_lhs_type typeLevelMode ty)---- Like tcLHsType, but use it in a context where type synonyms and type families--- do not need to be saturated, like in a GHCi :kind call-tcLHsTypeUnsaturated :: LHsType GhcRn -> TcM (TcType, TcKind)-tcLHsTypeUnsaturated ty = addTypeCtxt ty (tc_infer_lhs_type mode ty)-  where-    mode = allowUnsaturated typeLevelMode--{--************************************************************************-*                                                                      *-      Type-checking modes-*                                                                      *-************************************************************************--The kind-checker is parameterised by a TcTyMode, which contains some-information about where we're checking a type.--The renamer issues errors about what it can. All errors issued here must-concern things that the renamer can't handle.---}---- | Do we require type families to be saturated?-data RequireSaturation-  = YesSaturation-  | NoSaturation   -- e.g. during a call to GHCi's :kind---- | Info about the context in which we're checking a type. Currently,--- differentiates only between types and kinds, but this will likely--- grow, at least to include the distinction between patterns and--- not-patterns.-data TcTyMode-  = TcTyMode { mode_level :: TypeOrKind-             , mode_sat   :: RequireSaturation-             }- -- The mode_unsat field is solely so that type families/synonyms can be unsaturated- -- in GHCi :kind calls--typeLevelMode :: TcTyMode-typeLevelMode = TcTyMode { mode_level = TypeLevel, mode_sat = YesSaturation }--kindLevelMode :: TcTyMode-kindLevelMode = TcTyMode { mode_level = KindLevel, mode_sat = YesSaturation }--allowUnsaturated :: TcTyMode -> TcTyMode-allowUnsaturated mode = mode { mode_sat = NoSaturation }---- switch to kind level-kindLevel :: TcTyMode -> TcTyMode-kindLevel mode = mode { mode_level = KindLevel }--instance Outputable RequireSaturation where-  ppr YesSaturation = text "YesSaturation"-  ppr NoSaturation  = text "NoSaturation"--instance Outputable TcTyMode where-  ppr = ppr . mode_level--{--Note [Bidirectional type checking]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In expressions, whenever we see a polymorphic identifier, say `id`, we are-free to instantiate it with metavariables, knowing that we can always-re-generalize with type-lambdas when necessary. For example:--  rank2 :: (forall a. a -> a) -> ()-  x = rank2 id--When checking the body of `x`, we can instantiate `id` with a metavariable.-Then, when we're checking the application of `rank2`, we notice that we really-need a polymorphic `id`, and then re-generalize over the unconstrained-metavariable.--In types, however, we're not so lucky, because *we cannot re-generalize*!-There is no lambda. So, we must be careful only to instantiate at the last-possible moment, when we're sure we're never going to want the lost polymorphism-again. This is done in calls to tcInstTyBinders.--To implement this behavior, we use bidirectional type checking, where we-explicitly think about whether we know the kind of the type we're checking-or not. Note that there is a difference between not knowing a kind and-knowing a metavariable kind: the metavariables are TauTvs, and cannot become-forall-quantified kinds. Previously (before dependent types), there were-no higher-rank kinds, and so we could instantiate early and be sure that-no types would have polymorphic kinds, and so we could always assume that-the kind of a type was a fresh metavariable. Not so anymore, thus the-need for two algorithms.--For HsType forms that can never be kind-polymorphic, we implement only the-"down" direction, where we safely assume a metavariable kind. For HsType forms-that *can* be kind-polymorphic, we implement just the "up" (functions with-"infer" in their name) version, as we gain nothing by also implementing the-"down" version.--Note [Future-proofing the type checker]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As discussed in Note [Bidirectional type checking], each HsType form is-handled in *either* tc_infer_hs_type *or* tc_hs_type. These functions-are mutually recursive, so that either one can work for any type former.-But, we want to make sure that our pattern-matches are complete. So,-we have a bunch of repetitive code just so that we get warnings if we're-missing any patterns.--Note [The tcType invariant]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-(IT1) If    tc_ty = tc_hs_type hs_ty exp_kind-      then  tcTypeKind tc_ty = exp_kind-without any zonking needed.  The reason for this is that in-tcInferApps we see (F ty), and we kind-check 'ty' with an-expected-kind coming from F.  Then, to make the resulting application-well kinded --- see Note [The well-kinded type invariant] in TcType ----we need the kind-checked 'ty' to have exactly the kind that F expects,-with no funny zonking nonsense in between.--The tcType invariant also applies to checkExpectedKind:--(IT2) if-        (tc_ty, _, _) = checkExpectedKind ty act_ki exp_ki-      then-        tcTypeKind tc_ty = exp_ki--These other invariants are all necessary, too, as these functions-are used within tc_hs_type:--(IT3) If (ty, ki) <- tc_infer_hs_type ..., then tcTypeKind ty == ki.--(IT4) If (ty, ki) <- tc_infer_hs_type ..., then zonk ki == ki.-      (In other words, the result kind of tc_infer_hs_type is zonked.)--(IT5) If (ty, ki) <- tcTyVar ..., then tcTypeKind ty == ki.--(IT6) If (ty, ki) <- tcTyVar ..., then zonk ki == ki.-      (In other words, the result kind of tcTyVar is zonked.)---}----------------------------------------------- | Check and desugar a type, returning the core type and its--- possibly-polymorphic kind. Much like 'tcInferRho' at the expression--- level.-tc_infer_lhs_type :: TcTyMode -> LHsType GhcRn -> TcM (TcType, TcKind)-tc_infer_lhs_type mode (L span ty)-  = setSrcSpan span $-    do { (ty', kind) <- tc_infer_hs_type mode ty-       ; return (ty', kind) }---- | Infer the kind of a type and desugar. This is the "up" type-checker,--- as described in Note [Bidirectional type checking]-tc_infer_hs_type :: TcTyMode -> HsType GhcRn -> TcM (TcType, TcKind)-tc_infer_hs_type mode (HsParTy _ t)          = tc_infer_lhs_type mode t-tc_infer_hs_type mode (HsTyVar _ _ (L _ tv)) = tcTyVar mode tv--tc_infer_hs_type mode e@(HsAppTy {}) = tcTyApp mode e-tc_infer_hs_type mode e@(HsAppKindTy {}) = tcTyApp mode e--tc_infer_hs_type mode (HsOpTy _ lhs lhs_op@(L _ hs_op) rhs)-  | not (hs_op `hasKey` funTyConKey)-  = do { (op, op_kind) <- tcTyVar mode hs_op-       ; tcTyApps mode (noLoc $ HsTyVar noExt NotPromoted lhs_op) op op_kind-                       [HsValArg lhs, HsValArg rhs] }--tc_infer_hs_type mode (HsKindSig _ ty sig)-  = do { sig' <- tcLHsKindSig KindSigCtxt sig-                 -- We must typecheck the kind signature, and solve all-                 -- its equalities etc; from this point on we may do-                 -- things like instantiate its foralls, so it needs-                 -- to be fully determined (Trac #14904)-       ; traceTc "tc_infer_hs_type:sig" (ppr ty $$ ppr sig')-       ; ty' <- tc_lhs_type mode ty sig'-       ; return (ty', sig') }---- HsSpliced is an annotation produced by 'RnSplice.rnSpliceType' to communicate--- the splice location to the typechecker. Here we skip over it in order to have--- the same kind inferred for a given expression whether it was produced from--- splices or not.------ See Note [Delaying modFinalizers in untyped splices].-tc_infer_hs_type mode (HsSpliceTy _ (HsSpliced _ _ (HsSplicedTy ty)))-  = tc_infer_hs_type mode ty--tc_infer_hs_type mode (HsDocTy _ ty _) = tc_infer_lhs_type mode ty-tc_infer_hs_type _    (XHsType (NHsCoreTy ty))-  = do { ty <- zonkTcType ty  -- (IT3) and (IT4) of Note [The tcType invariant]-       ; return (ty, tcTypeKind ty) }--tc_infer_hs_type _ (HsExplicitListTy _ _ tys)-  | null tys  -- this is so that we can use visible kind application with '[]-              -- e.g ... '[] @Bool-  = return (mkTyConTy promotedNilDataCon,-            mkSpecForAllTys [alphaTyVar] $ mkListTy alphaTy)--tc_infer_hs_type mode other_ty-  = do { kv <- newMetaKindVar-       ; ty' <- tc_hs_type mode other_ty kv-       ; return (ty', kv) }---------------------------------------------tc_lhs_type :: TcTyMode -> LHsType GhcRn -> TcKind -> TcM TcType-tc_lhs_type mode (L span ty) exp_kind-  = setSrcSpan span $-    tc_hs_type mode ty exp_kind---------------------------------------------tc_fun_type :: TcTyMode -> LHsType GhcRn -> LHsType GhcRn -> TcKind-            -> TcM TcType-tc_fun_type mode ty1 ty2 exp_kind = case mode_level mode of-  TypeLevel ->-    do { arg_k <- newOpenTypeKind-       ; res_k <- newOpenTypeKind-       ; ty1' <- tc_lhs_type mode ty1 arg_k-       ; ty2' <- tc_lhs_type mode ty2 res_k-       ; checkExpectedKindMode mode (ppr $ HsFunTy noExt ty1 ty2) (mkFunTy ty1' ty2')-                           liftedTypeKind exp_kind }-  KindLevel ->  -- no representation polymorphism in kinds. yet.-    do { ty1' <- tc_lhs_type mode ty1 liftedTypeKind-       ; ty2' <- tc_lhs_type mode ty2 liftedTypeKind-       ; checkExpectedKindMode mode (ppr $ HsFunTy noExt ty1 ty2) (mkFunTy ty1' ty2')-                           liftedTypeKind exp_kind }---------------------------------------------tc_hs_type :: TcTyMode -> HsType GhcRn -> TcKind -> TcM TcType--- See Note [The tcType invariant]--- See Note [Bidirectional type checking]--tc_hs_type mode (HsParTy _ ty)   exp_kind = tc_lhs_type mode ty exp_kind-tc_hs_type mode (HsDocTy _ ty _) exp_kind = tc_lhs_type mode ty exp_kind-tc_hs_type _ ty@(HsBangTy _ bang _) _-    -- While top-level bangs at this point are eliminated (eg !(Maybe Int)),-    -- other kinds of bangs are not (eg ((!Maybe) Int)). These kinds of-    -- bangs are invalid, so fail. (#7210, #14761)-    = do { let bangError err = failWith $-                 text "Unexpected" <+> text err <+> text "annotation:" <+> ppr ty $$-                 text err <+> text "annotation cannot appear nested inside a type"-         ; case bang of-             HsSrcBang _ SrcUnpack _           -> bangError "UNPACK"-             HsSrcBang _ SrcNoUnpack _         -> bangError "NOUNPACK"-             HsSrcBang _ NoSrcUnpack SrcLazy   -> bangError "laziness"-             HsSrcBang _ _ _                   -> bangError "strictness" }-tc_hs_type _ ty@(HsRecTy {})      _-      -- Record types (which only show up temporarily in constructor-      -- signatures) should have been removed by now-    = failWithTc (text "Record syntax is illegal here:" <+> ppr ty)---- HsSpliced is an annotation produced by 'RnSplice.rnSpliceType'.--- Here we get rid of it and add the finalizers to the global environment--- while capturing the local environment.------ See Note [Delaying modFinalizers in untyped splices].-tc_hs_type mode (HsSpliceTy _ (HsSpliced _ mod_finalizers (HsSplicedTy ty)))-           exp_kind-  = do addModFinalizersWithLclEnv mod_finalizers-       tc_hs_type mode ty exp_kind---- This should never happen; type splices are expanded by the renamer-tc_hs_type _ ty@(HsSpliceTy {}) _exp_kind-  = failWithTc (text "Unexpected type splice:" <+> ppr ty)------------ Functions and applications-tc_hs_type mode (HsFunTy _ ty1 ty2) exp_kind-  = tc_fun_type mode ty1 ty2 exp_kind--tc_hs_type mode (HsOpTy _ ty1 (L _ op) ty2) exp_kind-  | op `hasKey` funTyConKey-  = tc_fun_type mode ty1 ty2 exp_kind----------- Foralls-tc_hs_type mode forall@(HsForAllTy { hst_bndrs = hs_tvs, hst_body = ty }) exp_kind-  = do { (tclvl, wanted, (tvs', ty'))-            <- pushLevelAndCaptureConstraints $-               bindExplicitTKBndrs_Skol hs_tvs $-               tc_lhs_type mode ty exp_kind-    -- Do not kind-generalise here!  See Note [Kind generalisation]-    -- Why exp_kind?  See Note [Body kind of HsForAllTy]-       ; let bndrs       = mkTyVarBinders Specified tvs'-             skol_info   = ForAllSkol (ppr forall)-             m_telescope = Just (sep (map ppr hs_tvs))--       ; emitResidualTvConstraint skol_info m_telescope tvs' tclvl wanted--       ; return (mkForAllTys bndrs ty') }--tc_hs_type mode (HsQualTy { hst_ctxt = ctxt, hst_body = ty }) exp_kind-  | null (unLoc ctxt)-  = tc_lhs_type mode ty exp_kind--  | otherwise-  = do { ctxt' <- tc_hs_context mode ctxt--         -- See Note [Body kind of a HsQualTy]-       ; ty' <- if tcIsConstraintKind exp_kind-                then tc_lhs_type mode ty constraintKind-                else do { ek <- newOpenTypeKind-                                -- The body kind (result of the function)-                                -- can be TYPE r, for any r, hence newOpenTypeKind-                        ; ty' <- tc_lhs_type mode ty ek-                        ; checkExpectedKindMode mode (ppr ty) ty' liftedTypeKind exp_kind }--       ; return (mkPhiTy ctxt' ty') }----------- Lists, arrays, and tuples-tc_hs_type mode rn_ty@(HsListTy _ elt_ty) exp_kind-  = do { tau_ty <- tc_lhs_type mode elt_ty liftedTypeKind-       ; checkWiredInTyCon listTyCon-       ; checkExpectedKindMode mode (ppr rn_ty) (mkListTy tau_ty) liftedTypeKind exp_kind }---- See Note [Distinguishing tuple kinds] in HsTypes--- See Note [Inferring tuple kinds]-tc_hs_type mode rn_ty@(HsTupleTy _ HsBoxedOrConstraintTuple hs_tys) exp_kind-     -- (NB: not zonking before looking at exp_k, to avoid left-right bias)-  | Just tup_sort <- tupKindSort_maybe exp_kind-  = traceTc "tc_hs_type tuple" (ppr hs_tys) >>-    tc_tuple rn_ty mode tup_sort hs_tys exp_kind-  | otherwise-  = do { traceTc "tc_hs_type tuple 2" (ppr hs_tys)-       ; (tys, kinds) <- mapAndUnzipM (tc_infer_lhs_type mode) hs_tys-       ; kinds <- mapM zonkTcType kinds-           -- Infer each arg type separately, because errors can be-           -- confusing if we give them a shared kind.  Eg Trac #7410-           -- (Either Int, Int), we do not want to get an error saying-           -- "the second argument of a tuple should have kind *->*"--       ; let (arg_kind, tup_sort)-               = case [ (k,s) | k <- kinds-                              , Just s <- [tupKindSort_maybe k] ] of-                    ((k,s) : _) -> (k,s)-                    [] -> (liftedTypeKind, BoxedTuple)-         -- In the [] case, it's not clear what the kind is, so guess *--       ; tys' <- sequence [ setSrcSpan loc $-                            checkExpectedKindMode mode (ppr hs_ty) ty kind arg_kind-                          | ((L loc hs_ty),ty,kind) <- zip3 hs_tys tys kinds ]--       ; finish_tuple rn_ty mode tup_sort tys' (map (const arg_kind) tys') exp_kind }---tc_hs_type mode rn_ty@(HsTupleTy _ hs_tup_sort tys) exp_kind-  = tc_tuple rn_ty mode tup_sort tys exp_kind-  where-    tup_sort = case hs_tup_sort of  -- Fourth case dealt with above-                  HsUnboxedTuple    -> UnboxedTuple-                  HsBoxedTuple      -> BoxedTuple-                  HsConstraintTuple -> ConstraintTuple-                  _                 -> panic "tc_hs_type HsTupleTy"--tc_hs_type mode rn_ty@(HsSumTy _ hs_tys) exp_kind-  = do { let arity = length hs_tys-       ; arg_kinds <- mapM (\_ -> newOpenTypeKind) hs_tys-       ; tau_tys   <- zipWithM (tc_lhs_type mode) hs_tys arg_kinds-       ; let arg_reps = map kindRep arg_kinds-             arg_tys  = arg_reps ++ tau_tys-       ; checkExpectedKindMode mode (ppr rn_ty)-                           (mkTyConApp (sumTyCon arity) arg_tys)-                           (unboxedSumKind arg_reps)-                           exp_kind-       }----------- Promoted lists and tuples-tc_hs_type mode rn_ty@(HsExplicitListTy _ _ tys) exp_kind-  = do { tks <- mapM (tc_infer_lhs_type mode) tys-       ; (taus', kind) <- unifyKinds tys tks-       ; let ty = (foldr (mk_cons kind) (mk_nil kind) taus')-       ; checkExpectedKindMode mode (ppr rn_ty) ty (mkListTy kind) exp_kind }-  where-    mk_cons k a b = mkTyConApp (promoteDataCon consDataCon) [k, a, b]-    mk_nil  k     = mkTyConApp (promoteDataCon nilDataCon) [k]--tc_hs_type mode rn_ty@(HsExplicitTupleTy _ tys) exp_kind-  -- using newMetaKindVar means that we force instantiations of any polykinded-  -- types. At first, I just used tc_infer_lhs_type, but that led to #11255.-  = do { ks   <- replicateM arity newMetaKindVar-       ; taus <- zipWithM (tc_lhs_type mode) tys ks-       ; let kind_con   = tupleTyCon           Boxed arity-             ty_con     = promotedTupleDataCon Boxed arity-             tup_k      = mkTyConApp kind_con ks-       ; checkExpectedKindMode mode (ppr rn_ty) (mkTyConApp ty_con (ks ++ taus)) tup_k exp_kind }-  where-    arity = length tys----------- Constraint types-tc_hs_type mode rn_ty@(HsIParamTy _ (L _ n) ty) exp_kind-  = do { MASSERT( isTypeLevel (mode_level mode) )-       ; ty' <- tc_lhs_type mode ty liftedTypeKind-       ; let n' = mkStrLitTy $ hsIPNameFS n-       ; ipClass <- tcLookupClass ipClassName-       ; checkExpectedKindMode mode (ppr rn_ty) (mkClassPred ipClass [n',ty'])-           constraintKind exp_kind }--tc_hs_type mode rn_ty@(HsStarTy _ _) exp_kind-  -- Desugaring 'HsStarTy' to 'Data.Kind.Type' here means that we don't have to-  -- handle it in 'coreView' and 'tcView'.-  = checkExpectedKindMode mode (ppr rn_ty) liftedTypeKind liftedTypeKind exp_kind----------- Literals-tc_hs_type mode rn_ty@(HsTyLit _ (HsNumTy _ n)) exp_kind-  = do { checkWiredInTyCon typeNatKindCon-       ; checkExpectedKindMode mode (ppr rn_ty) (mkNumLitTy n) typeNatKind exp_kind }--tc_hs_type mode rn_ty@(HsTyLit _ (HsStrTy _ s)) exp_kind-  = do { checkWiredInTyCon typeSymbolKindCon-       ; checkExpectedKindMode mode (ppr rn_ty) (mkStrLitTy s) typeSymbolKind exp_kind }----------- Potentially kind-polymorphic types: call the "up" checker--- See Note [Future-proofing the type checker]-tc_hs_type mode ty@(HsTyVar {})   ek = tc_infer_hs_type_ek mode ty ek-tc_hs_type mode ty@(HsAppTy {})   ek = tc_infer_hs_type_ek mode ty ek-tc_hs_type mode ty@(HsAppKindTy{}) ek = tc_infer_hs_type_ek mode ty ek-tc_hs_type mode ty@(HsOpTy {})    ek = tc_infer_hs_type_ek mode ty ek-tc_hs_type mode ty@(HsKindSig {}) ek = tc_infer_hs_type_ek mode ty ek-tc_hs_type mode ty@(XHsType (NHsCoreTy{})) ek = tc_infer_hs_type_ek mode ty ek--tc_hs_type mode wc@(HsWildCardTy _) exp_kind-  = do { wc_ty <- tcWildCardOcc mode wc exp_kind-       ; return (mkNakedCastTy wc_ty (mkTcNomReflCo exp_kind))-         -- Take care here! Even though the coercion is Refl,-         -- we still need it to establish Note [The tcType invariant]-       }--tcWildCardOcc :: TcTyMode -> HsType GhcRn -> Kind -> TcM TcType-tcWildCardOcc mode wc exp_kind-  = do { wc_tv <- newWildTyVar-          -- The wildcard's kind should be an un-filled-in meta tyvar-       ; loc <- getSrcSpanM-       ; uniq <- newUnique-       ; let name = mkInternalName uniq (mkTyVarOcc "_") loc-       ; part_tysig <- xoptM LangExt.PartialTypeSignatures-       ; warning <- woptM Opt_WarnPartialTypeSignatures-       -- See Note [Wildcards in visible kind application]-       ; unless (part_tysig && not warning)-             (emitWildCardHoleConstraints [(name,wc_tv)])-       ; checkExpectedKindMode mode (ppr wc) (mkTyVarTy wc_tv)-                           (tyVarKind wc_tv) exp_kind }--{- Note [Wildcards in visible kind application]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There are cases where users might want to pass in a wildcard as a visible kind-argument, for instance:--data T :: forall k1 k2. k1 → k2 → Type where-  MkT :: T a b-x :: T @_ @Nat False n-x = MkT--So we should allow '@_' without emitting any hole constraints, and-regardless of whether PartialTypeSignatures is enabled or not. But how would-the typechecker know which '_' is being used in VKA and which is not when it-calls emitWildCardHoleConstraints in tcHsPartialSigType on all HsWildCardBndrs?-The solution then is to neither rename nor include unnamed wildcards in HsWildCardBndrs,-but instead give every unnamed wildcard a fresh wild tyvar in tcWildCardOcc.-And whenever we see a '@', we automatically turn on PartialTypeSignatures and-turn off hole constraint warnings, and never call emitWildCardHoleConstraints-under these conditions.-See related Note [Wildcards in visible type application] here and-Note [The wildcard story for types] in HsTypes.hs---}------------------------------- | Call 'tc_infer_hs_type' and check its result against an expected kind.-tc_infer_hs_type_ek :: HasDebugCallStack => TcTyMode -> HsType GhcRn -> TcKind -> TcM TcType-tc_infer_hs_type_ek mode hs_ty ek-  = do { (ty, k) <- tc_infer_hs_type mode hs_ty-       ; checkExpectedKindMode mode (ppr hs_ty) ty k ek }------------------------------tupKindSort_maybe :: TcKind -> Maybe TupleSort-tupKindSort_maybe k-  | Just (k', _) <- splitCastTy_maybe k = tupKindSort_maybe k'-  | Just k'      <- tcView k            = tupKindSort_maybe k'-  | tcIsConstraintKind k = Just ConstraintTuple-  | tcIsLiftedTypeKind k   = Just BoxedTuple-  | otherwise            = Nothing--tc_tuple :: HsType GhcRn -> TcTyMode -> TupleSort -> [LHsType GhcRn] -> TcKind -> TcM TcType-tc_tuple rn_ty mode tup_sort tys exp_kind-  = do { arg_kinds <- case tup_sort of-           BoxedTuple      -> return (nOfThem arity liftedTypeKind)-           UnboxedTuple    -> mapM (\_ -> newOpenTypeKind) tys-           ConstraintTuple -> return (nOfThem arity constraintKind)-       ; tau_tys <- zipWithM (tc_lhs_type mode) tys arg_kinds-       ; finish_tuple rn_ty mode tup_sort tau_tys arg_kinds exp_kind }-  where-    arity   = length tys--finish_tuple :: HsType GhcRn-             -> TcTyMode-             -> TupleSort-             -> [TcType]    -- ^ argument types-             -> [TcKind]    -- ^ of these kinds-             -> TcKind      -- ^ expected kind of the whole tuple-             -> TcM TcType-finish_tuple rn_ty mode tup_sort tau_tys tau_kinds exp_kind-  = do { traceTc "finish_tuple" (ppr res_kind $$ ppr tau_kinds $$ ppr exp_kind)-       ; let arg_tys  = case tup_sort of-                   -- See also Note [Unboxed tuple RuntimeRep vars] in TyCon-                 UnboxedTuple    -> tau_reps ++ tau_tys-                 BoxedTuple      -> tau_tys-                 ConstraintTuple -> tau_tys-       ; tycon <- case tup_sort of-           ConstraintTuple-             | arity > mAX_CTUPLE_SIZE-                         -> failWith (bigConstraintTuple arity)-             | otherwise -> tcLookupTyCon (cTupleTyConName arity)-           BoxedTuple    -> do { let tc = tupleTyCon Boxed arity-                               ; checkWiredInTyCon tc-                               ; return tc }-           UnboxedTuple  -> return (tupleTyCon Unboxed arity)-       ; checkExpectedKindMode mode (ppr rn_ty) (mkTyConApp tycon arg_tys) res_kind exp_kind }-  where-    arity = length tau_tys-    tau_reps = map kindRep tau_kinds-    res_kind = case tup_sort of-                 UnboxedTuple    -> unboxedTupleKind tau_reps-                 BoxedTuple      -> liftedTypeKind-                 ConstraintTuple -> constraintKind--bigConstraintTuple :: Arity -> MsgDoc-bigConstraintTuple arity-  = hang (text "Constraint tuple arity too large:" <+> int arity-          <+> parens (text "max arity =" <+> int mAX_CTUPLE_SIZE))-       2 (text "Instead, use a nested tuple")-------------------------------- | Apply a type of a given kind to a list of arguments. This instantiates--- invisible parameters as necessary. Always consumes all the arguments,--- using matchExpectedFunKind as necessary.--- This takes an optional @VarEnv Kind@ which maps kind variables to kinds.---- These kinds should be used to instantiate invisible kind variables;--- they come from an enclosing class for an associated type/data family.-tcInferApps :: TcTyMode-            -> LHsType GhcRn        -- ^ Function (for printing only)-            -> TcType               -- ^ Function-            -> TcKind               -- ^ Function kind (zonked)-            -> [LHsTypeArg GhcRn]   -- ^ Args-            -> TcM (TcType, TcKind) -- ^ (f args, args, result kind)--- Precondition: tcTypeKind fun_ty = fun_ki---    Reason: we will return a type application like (fun_ty arg1 ... argn),---            and that type must be well-kinded---            See Note [The tcType invariant]--- Postcondition: Result kind is zonked.-tcInferApps mode orig_hs_ty fun_ty fun_ki orig_hs_args-  = do { traceTc "tcInferApps {" (ppr orig_hs_ty $$ ppr orig_hs_args $$ ppr fun_ki)-       ; (f_args, res_k) <- go 1 empty_subst fun_ty orig_ki_binders orig_inner_ki orig_hs_args-       ; traceTc "tcInferApps }" empty-       ; res_k <- zonkTcType res_k  -- Uphold (IT4) of Note [The tcType invariant]-       ; return (f_args, res_k) }-  where-    empty_subst                      = mkEmptyTCvSubst $ mkInScopeSet $-                                       tyCoVarsOfType fun_ki-    (orig_ki_binders, orig_inner_ki) = tcSplitPiTys fun_ki--    go :: Int             -- the # of the next argument-       -> TCvSubst        -- instantiating substitution-       -> TcType          -- function applied to some args-       -> [TyBinder]      -- binders in function kind (both vis. and invis.)-       -> TcKind          -- function kind body (not a Pi-type)-       -> [LHsTypeArg GhcRn] -- un-type-checked args-       -> TcM (TcType, TcKind)  -- same as overall return type--      -- no user-written args left. We're done!-    go _ subst fun ki_binders inner_ki []-      = return ( fun-               , nakedSubstTy subst $ mkPiTys ki_binders inner_ki)-                 -- nakedSubstTy: see Note [The well-kinded type invariant]-    go n subst fun all_kindbinder inner_ki (HsArgPar _:args)-      = go n subst fun all_kindbinder inner_ki args-      -- The function's kind has a binder. Is it visible or invisible?-    go n subst fun all_kindbinder@(ki_binder:ki_binders) inner_ki-       all_args@(arg:args)-      | Specified <- tyCoBinderArgFlag ki_binder-      , HsTypeArg _ ki <- arg-         -- Invisible and specified binder with visible kind argument-         = do { traceTc "tcInferApps (vis kind app)" (vcat [ ppr ki_binder, ppr ki-                                                     , ppr (tyBinderType ki_binder)-                                                     , ppr subst, ppr (tyCoBinderArgFlag ki_binder) ])-                  ; let exp_kind = nakedSubstTy subst $ tyBinderType ki_binder-                    -- nakedSubstTy: see Note [The well-kinded type invariant]-                  ; arg' <- addErrCtxt (funAppCtxt orig_hs_ty ki n) $-                            unsetWOptM Opt_WarnPartialTypeSignatures $-                            setXOptM LangExt.PartialTypeSignatures $-                            -- see Note [Wildcards in visible kind application]-                            tc_lhs_type (kindLevel mode) ki exp_kind-                  ; traceTc "tcInferApps (vis kind app)" (ppr exp_kind)-                  ; let subst' = extendTvSubstBinderAndInScope subst ki_binder arg'-                  ; go (n+1) subst'-                       (mkNakedAppTy fun arg')-                       ki_binders inner_ki args }--      | isInvisibleBinder ki_binder-          -- Instantiate if not specified or if there is no kind application-      = do { traceTc "tcInferApps (invis normal app)" (ppr ki_binder $$ ppr subst $$ ppr (tyCoBinderArgFlag ki_binder))-           ; (subst', arg') <- tcInstTyBinder Nothing subst ki_binder-           ; go n subst' (mkNakedAppTy fun arg')-                        ki_binders inner_ki all_args }--      | otherwise -- if binder is visible-         = case arg of-             HsValArg ty -- check the next argument-               -> do { traceTc "tcInferApps (vis normal app)"-                         (vcat [ ppr ki_binder-                               , ppr ty-                               , ppr (tyBinderType ki_binder)-                               , ppr subst ])-                     ; let exp_kind = nakedSubstTy subst $ tyBinderType ki_binder-                     -- nakedSubstTy: see Note [The well-kinded type invariant]-                     ; arg' <- addErrCtxt (funAppCtxt orig_hs_ty ty n) $-                               tc_lhs_type mode ty exp_kind-                     ; traceTc "tcInferApps (vis normal app)" (ppr exp_kind)-                     ; let subst' = extendTvSubstBinderAndInScope subst ki_binder arg'-                     ; go (n+1) subst'-                          (mkNakedAppTy fun arg')-                          ki_binders inner_ki args }-            -- error if the argument is a kind application-             HsTypeArg _ ki -> do { traceTc "tcInferApps (error)"-                                    (vcat [ ppr ki_binder-                                          , ppr ki-                                          , ppr (tyBinderType ki_binder)-                                          , ppr subst-                                          , ppr (isInvisibleBinder ki_binder) ])-                                  ; ty_app_err ki $ nakedSubstTy subst $-                                                  mkPiTys all_kindbinder inner_ki }--             HsArgPar _ -> panic "tcInferApps"  -- handled in separate clause of "go"--       -- We've run out of known binders in the functions's kind.-    go n subst fun [] inner_ki all_args@(arg:args)-      | not (null new_ki_binders)-         -- But, after substituting, we have more binders.-      = go n zapped_subst fun new_ki_binders new_inner_ki all_args--      | otherwise-      = case arg of-        (HsValArg _)-         -- Even after substituting, still no binders. Use matchExpectedFunKind-         -> do { traceTc "tcInferApps (no binder)" (ppr new_inner_ki $$ ppr zapped_subst)-               ; (co, arg_k, res_k) <- matchExpectedFunKind hs_ty substed_inner_ki-               ; let new_in_scope = tyCoVarsOfTypes [arg_k, res_k]-                     subst'       = zapped_subst `extendTCvInScopeSet` new_in_scope-               ; go n subst'-                    (fun `mkNakedCastTy` co)  -- See Note [The well-kinded type invariant]-                    [mkAnonBinder arg_k]-                    res_k all_args }-        (HsTypeArg _ ki) -> ty_app_err ki substed_inner_ki-        (HsArgPar _) -> go n subst fun [] inner_ki args-      where-        substed_inner_ki               = substTy subst inner_ki-        (new_ki_binders, new_inner_ki) = tcSplitPiTys substed_inner_ki-        zapped_subst                   = zapTCvSubst subst-        hs_ty = appTypeToArg orig_hs_ty (take (n-1) orig_hs_args)--    ty_app_err arg ty = failWith $ text "Cannot apply function of kind" <+> quotes (ppr ty)-                           $$ text "to visible kind argument" <+> quotes (ppr arg)--appTypeToArg :: LHsType GhcRn -> [LHsTypeArg GhcRn] -> LHsType GhcRn-appTypeToArg f [] = f-appTypeToArg f (HsValArg arg : args) = appTypeToArg (mkHsAppTy f arg) args-appTypeToArg f (HsTypeArg l arg : args)-  = appTypeToArg (mkHsAppKindTy l f arg) args-appTypeToArg f (HsArgPar _ : arg) = appTypeToArg f arg---- | Applies a type to a list of arguments.--- Always consumes all the arguments, using 'matchExpectedFunKind' as--- necessary. If you wish to apply a type to a list of HsTypes, this is--- your function.--- Used for type-checking types only.-tcTyApps :: TcTyMode-         -> LHsType GhcRn        -- ^ Function (for printing only)-         -> TcType               -- ^ Function-         -> TcKind               -- ^ Function kind (zonked)-         -> [LHsTypeArg GhcRn]   -- ^ Args-         -> TcM (TcType, TcKind) -- ^ (f args, result kind)   result kind is zonked--- Precondition: see precondition for tcInferApps-tcTyApps mode orig_hs_ty fun_ty fun_ki args-  = do { (ty', ki') <- tcInferApps mode orig_hs_ty fun_ty fun_ki args-       ; return (ty' `mkNakedCastTy` mkNomReflCo ki', ki') }-          -- The mkNakedCastTy is for (IT3) of Note [The tcType invariant]--tcTyApp :: TcTyMode -> HsType GhcRn -> TcM (TcType, TcKind) -- only HsAppTy or HsAppKindTy-tcTyApp mode e-  = do { let (hs_fun_ty, hs_args) = splitHsAppTys e-       ; (fun_ty, fun_kind) <- tc_infer_lhs_type mode hs_fun_ty-          -- NB: (IT4) of Note [The tcType invariant] ensures that fun_kind is zonked-       ; tcTyApps mode hs_fun_ty fun_ty fun_kind hs_args }------------------------------ Internally-callable version of checkExpectedKind-checkExpectedKindMode :: HasDebugCallStack-                      => TcTyMode-                      -> SDoc        -- type we're checking-                      -> TcType      -- type we're checking-                      -> TcKind      -- kind of that type-                      -> TcKind      -- expected kind-                      -> TcM TcType-checkExpectedKindMode mode = checkExpectedKind (mode_sat mode)---- | This instantiates invisible arguments for the type being checked if it must--- be saturated and is not yet saturated. It then calls and uses the result--- from checkExpectedKindX to build the final type--- Obeys Note [The tcType invariant]-checkExpectedKind :: HasDebugCallStack-                  => RequireSaturation  -- ^ Do we require all type families to be saturated?-                  -> SDoc           -- ^ type we're checking (for printing)-                  -> TcType         -- ^ type we're checking-                  -> TcKind         -- ^ the known kind of that type-                  -> TcKind         -- ^ the expected kind-                  -> TcM TcType-checkExpectedKind sat hs_ty ty act exp-  = do { (new_ty, new_act) <- case splitTyConApp_maybe ty of-           Just (tc, args)-             -- if the family tycon must be saturated and is not yet satured-             -- If we don't do this, we get #11246-             | YesSaturation <- sat-             , not (mightBeUnsaturatedTyCon tc) && length args < tyConArity tc-             -> do {-                   -- we need to instantiate all invisible arguments up until saturation-                   (tc_args, kind) <- tcInstTyBinders (splitPiTysInvisibleN-                                                        (tyConArity tc - length args)-                                                        act)-                   ; let tc_ty = mkTyConApp tc $ args ++ tc_args-                   ; traceTc "checkExpectedKind:satTyFam" (vcat [ ppr tc <+> dcolon <+> ppr act-                                                   , ppr kind ])-                   ; return (tc_ty, kind) }-           _ -> return (ty, act)-       ; (new_args, co_k) <- checkExpectedKindX hs_ty new_act exp-       ; return (new_ty `mkNakedAppTys` new_args `mkNakedCastTy` co_k) }--checkExpectedKindX :: HasDebugCallStack-                   => SDoc                 -- HsType whose kind we're checking-                   -> TcKind               -- the known kind of that type, k-                   -> TcKind               -- the expected kind, exp_kind-                   -> TcM ([TcType], TcCoercionN)-    -- (the new args, the coercion)--- Instantiate a kind (if necessary) and then call unifyType---      (checkExpectedKind ty act_kind exp_kind)--- checks that the actual kind act_kind is compatible---      with the expected kind exp_kind-checkExpectedKindX pp_hs_ty act_kind exp_kind-  = do { -- We need to make sure that both kinds have the same number of implicit-         -- foralls out front. If the actual kind has more, instantiate accordingly.-         -- Otherwise, just pass the type & kind through: the errors are caught-         -- in unifyType.-         let n_exp_invis_bndrs = invisibleTyBndrCount exp_kind-             n_act_invis_bndrs = invisibleTyBndrCount act_kind-             n_to_inst         = n_act_invis_bndrs - n_exp_invis_bndrs-       ; (new_args, act_kind') <- tcInstTyBinders (splitPiTysInvisibleN n_to_inst act_kind)--       ; let origin = TypeEqOrigin { uo_actual   = act_kind'-                                   , uo_expected = exp_kind-                                   , uo_thing    = Just pp_hs_ty-                                   , uo_visible  = True } -- the hs_ty is visible--       ; traceTc "checkExpectedKindX" $-         vcat [ pp_hs_ty-              , text "act_kind:" <+> ppr act_kind-              , text "act_kind':" <+> ppr act_kind'-              , text "exp_kind:" <+> ppr exp_kind ]--       ; if act_kind' `tcEqType` exp_kind-         then return (new_args, mkTcNomReflCo exp_kind)  -- This is very common-         else do { co_k <- uType KindLevel origin act_kind' exp_kind-                 ; traceTc "checkExpectedKind" (vcat [ ppr act_kind-                                                     , ppr exp_kind-                                                     , ppr co_k ])-                      -- See Note [The tcType invariant]-                ; return (new_args, co_k) } }------------------------------tcHsMbContext :: Maybe (LHsContext GhcRn) -> TcM [PredType]-tcHsMbContext Nothing    = return []-tcHsMbContext (Just cxt) = tcHsContext cxt--tcHsContext :: LHsContext GhcRn -> TcM [PredType]-tcHsContext = tc_hs_context typeLevelMode--tcLHsPredType :: LHsType GhcRn -> TcM PredType-tcLHsPredType = tc_lhs_pred typeLevelMode--tc_hs_context :: TcTyMode -> LHsContext GhcRn -> TcM [PredType]-tc_hs_context mode ctxt = mapM (tc_lhs_pred mode) (unLoc ctxt)--tc_lhs_pred :: TcTyMode -> LHsType GhcRn -> TcM PredType-tc_lhs_pred mode pred = tc_lhs_type mode pred constraintKind------------------------------tcTyVar :: TcTyMode -> Name -> TcM (TcType, TcKind)--- See Note [Type checking recursive type and class declarations]--- in TcTyClsDecls-tcTyVar mode name         -- Could be a tyvar, a tycon, or a datacon-  = do { traceTc "lk1" (ppr name)-       ; thing <- tcLookup name-       ; case thing of-           ATyVar _ tv -> -- Important: zonk before returning-                          -- We may have the application ((a::kappa) b)-                          -- where kappa is already unified to (k1 -> k2)-                          -- Then we want to see that arrow.  Best done-                          -- here because we are also maintaining-                          -- Note [The tcType invariant], so we don't just-                          -- want to zonk the kind, leaving the TyVar-                          -- un-zonked  (Trac #14873)-                          do { ty <- zonkTcTyVar tv-                             ; return (ty, tcTypeKind ty) }--           ATcTyCon tc_tc-             -> do { -- See Note [GADT kind self-reference]-                     unless (isTypeLevel (mode_level mode))-                            (promotionErr name TyConPE)-                   ; check_tc tc_tc-                   ; tc_kind <- zonkTcType (tyConKind tc_tc)-                        -- (IT6) of Note [The tcType invariant]-                   ; return (mkTyConTy tc_tc `mkNakedCastTy` mkNomReflCo tc_kind, tc_kind) }-                        -- the mkNakedCastTy ensures (IT5) of Note [The tcType invariant]--           AGlobal (ATyCon tc)-             -> do { check_tc tc-                   ; return (mkTyConTy tc, tyConKind tc) }--           AGlobal (AConLike (RealDataCon dc))-             -> do { data_kinds <- xoptM LangExt.DataKinds-                   ; unless (data_kinds || specialPromotedDc dc) $-                       promotionErr name NoDataKindsDC-                   ; when (isFamInstTyCon (dataConTyCon dc)) $-                       -- see Trac #15245-                       promotionErr name FamDataConPE-                   ; let (_, _, _, theta, _, _) = dataConFullSig dc-                   ; case dc_theta_illegal_constraint theta of-                       Just pred -> promotionErr name $-                                    ConstrainedDataConPE pred-                       Nothing   -> pure ()-                   ; let tc = promoteDataCon dc-                   ; return (mkTyConApp tc [], tyConKind tc) }--           APromotionErr err -> promotionErr name err--           _  -> wrongThingErr "type" thing name }-  where-    check_tc :: TyCon -> TcM ()-    check_tc tc = do { data_kinds   <- xoptM LangExt.DataKinds-                     ; unless (isTypeLevel (mode_level mode) ||-                               data_kinds ||-                               isKindTyCon tc) $-                       promotionErr name NoDataKindsTC }--    -- We cannot promote a data constructor with a context that contains-    -- constraints other than equalities, so error if we find one.-    -- See Note [Constraints handled in types] in Inst.-    dc_theta_illegal_constraint :: ThetaType -> Maybe PredType-    dc_theta_illegal_constraint = find go-      where-        go :: PredType -> Bool-        go pred | Just tc <- tyConAppTyCon_maybe pred-                = not $  tc `hasKey` eqTyConKey-                      || tc `hasKey` heqTyConKey-                | otherwise = True--{--Note [GADT kind self-reference]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--A promoted type cannot be used in the body of that type's declaration.-Trac #11554 shows this example, which made GHC loop:--  import Data.Kind-  data P (x :: k) = Q-  data A :: Type where-    B :: forall (a :: A). P a -> A--In order to check the constructor B, we need to have the promoted type A, but in-order to get that promoted type, B must first be checked. To prevent looping, a-TyConPE promotion error is given when tcTyVar checks an ATcTyCon in kind mode.-Any ATcTyCon is a TyCon being defined in the current recursive group (see data-type decl for TcTyThing), and all such TyCons are illegal in kinds.--Trac #11962 proposes checking the head of a data declaration separately from-its constructors. This would allow the example above to pass.--Note [Body kind of a HsForAllTy]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The body of a forall is usually a type, but in principle-there's no reason to prohibit *unlifted* types.-In fact, GHC can itself construct a function with an-unboxed tuple inside a for-all (via CPR analysis; see-typecheck/should_compile/tc170).--Moreover in instance heads we get forall-types with-kind Constraint.--It's tempting to check that the body kind is either * or #. But this is-wrong. For example:--  class C a b-  newtype N = Mk Foo deriving (C a)--We're doing newtype-deriving for C. But notice how `a` isn't in scope in-the predicate `C a`. So we quantify, yielding `forall a. C a` even though-`C a` has kind `* -> Constraint`. The `forall a. C a` is a bit cheeky, but-convenient. Bottom line: don't check for * or # here.--Note [Body kind of a HsQualTy]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If ctxt is non-empty, the HsQualTy really is a /function/, so the-kind of the result really is '*', and in that case the kind of the-body-type can be lifted or unlifted.--However, consider-    instance Eq a => Eq [a] where ...-or-    f :: (Eq a => Eq [a]) => blah-Here both body-kind of the HsQualTy is Constraint rather than *.-Rather crudely we tell the difference by looking at exp_kind. It's-very convenient to typecheck instance types like any other HsSigType.--Admittedly the '(Eq a => Eq [a]) => blah' case is erroneous, but it's-better to reject in checkValidType.  If we say that the body kind-should be '*' we risk getting TWO error messages, one saying that Eq-[a] doens't have kind '*', and one saying that we need a Constraint to-the left of the outer (=>).--How do we figure out the right body kind?  Well, it's a bit of a-kludge: I just look at the expected kind.  If it's Constraint, we-must be in this instance situation context. It's a kludge because it-wouldn't work if any unification was involved to compute that result-kind -- but it isn't.  (The true way might be to use the 'mode'-parameter, but that seemed like a sledgehammer to crack a nut.)--Note [Inferring tuple kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Give a tuple type (a,b,c), which the parser labels as HsBoxedOrConstraintTuple,-we try to figure out whether it's a tuple of kind * or Constraint.-  Step 1: look at the expected kind-  Step 2: infer argument kinds--If after Step 2 it's not clear from the arguments that it's-Constraint, then it must be *.  Once having decided that we re-check-the Check the arguments again to give good error messages-in eg. `(Maybe, Maybe)`--Note that we will still fail to infer the correct kind in this case:--  type T a = ((a,a), D a)-  type family D :: Constraint -> Constraint--While kind checking T, we do not yet know the kind of D, so we will default the-kind of T to * -> *. It works if we annotate `a` with kind `Constraint`.--Note [Desugaring types]-~~~~~~~~~~~~~~~~~~~~~~~-The type desugarer is phase 2 of dealing with HsTypes.  Specifically:--  * It transforms from HsType to Type--  * It zonks any kinds.  The returned type should have no mutable kind-    or type variables (hence returning Type not TcType):-      - any unconstrained kind variables are defaulted to (Any *) just-        as in TcHsSyn.-      - there are no mutable type variables because we are-        kind-checking a type-    Reason: the returned type may be put in a TyCon or DataCon where-    it will never subsequently be zonked.--You might worry about nested scopes:-        ..a:kappa in scope..-            let f :: forall b. T '[a,b] -> Int-In this case, f's type could have a mutable kind variable kappa in it;-and we might then default it to (Any *) when dealing with f's type-signature.  But we don't expect this to happen because we can't get a-lexically scoped type variable with a mutable kind variable in it.  A-delicate point, this.  If it becomes an issue we might need to-distinguish top-level from nested uses.--Moreover-  * it cannot fail,-  * it does no unifications-  * it does no validity checking, except for structural matters, such as-        (a) spurious ! annotations.-        (b) a class used as a type--Note [Kind of a type splice]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider these terms, each with TH type splice inside:-     [| e1 :: Maybe $(..blah..) |]-     [| e2 :: $(..blah..) |]-When kind-checking the type signature, we'll kind-check the splice-$(..blah..); we want to give it a kind that can fit in any context,-as if $(..blah..) :: forall k. k.--In the e1 example, the context of the splice fixes kappa to *.  But-in the e2 example, we'll desugar the type, zonking the kind unification-variables as we go.  When we encounter the unconstrained kappa, we-want to default it to '*', not to (Any *).--Help functions for type applications-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--}--addTypeCtxt :: LHsType GhcRn -> TcM a -> TcM a-        -- Wrap a context around only if we want to show that contexts.-        -- Omit invisible ones and ones user's won't grok-addTypeCtxt (L _ (HsWildCardTy _)) thing = thing   -- "In the type '_'" just isn't helpful.-addTypeCtxt (L _ ty) thing-  = addErrCtxt doc thing-  where-    doc = text "In the type" <+> quotes (ppr ty)--{--************************************************************************-*                                                                      *-                Type-variable binders-%*                                                                      *-%************************************************************************--Note [Dependent LHsQTyVars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-We track (in the renamer) which explicitly bound variables in a-LHsQTyVars are manifestly dependent; only precisely these variables-may be used within the LHsQTyVars. We must do this so that kcLHsQTyVars-can produce the right TyConBinders, and tell Anon vs. Required.--Example   data T k1 (a:k1) (b:k2) c-               = MkT (Proxy a) (Proxy b) (Proxy c)--Here-  (a:k1),(b:k2),(c:k3)-       are Anon     (explicitly specified as a binder, not used-                     in the kind of any other binder-  k1   is Required  (explicitly specifed as a binder, but used-                     in the kind of another binder i.e. dependently)-  k2   is Specified (not explicitly bound, but used in the kind-                     of another binder)-  k3   in Inferred  (not lexically in scope at all, but inferred-                     by kind inference)-and-  T :: forall {k3} k1. forall k3 -> k1 -> k2 -> k3 -> *--See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility]-in TyCoRep.--kcLHsQTyVars uses the hsq_dependent field to decide whether-k1, a, b, c should be Required or Anon.--Earlier, thought it would work simply to do a free-variable check-during kcLHsQTyVars, but this is bogus, because there may be-unsolved equalities about. And we don't want to eagerly solve the-equalities, because we may get further information after-kcLHsQTyVars is called.  (Recall that kcLHsQTyVars is called-only from getInitialKind.)-This is what implements the rule that all variables intended to be-dependent must be manifestly so.--Sidenote: It's quite possible that later, we'll consider (t -> s)-as a degenerate case of some (pi (x :: t) -> s) and then this will-all get more permissive.--Note [Keeping scoped variables in order: Explicit]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When the user writes `forall a b c. blah`, we bring a, b, and c into-scope and then check blah. In the process of checking blah, we might-learn the kinds of a, b, and c, and these kinds might indicate that-b depends on c, and thus that we should reject the user-written type.--One approach to doing this would be to bring each of a, b, and c into-scope, one at a time, creating an implication constraint and-bumping the TcLevel for each one. This would work, because the kind-of, say, b would be untouchable when c is in scope (and the constraint-couldn't float out because c blocks it). However, it leads to terrible-error messages, complaining about skolem escape. While it is indeed-a problem of skolem escape, we can do better.--Instead, our approach is to bring the block of variables into scope-all at once, creating one implication constraint for the lot. The-user-written variables are skolems in the implication constraint. In-TcSimplify.setImplicationStatus, we check to make sure that the ordering-is correct, choosing ImplicationStatus IC_BadTelescope if they aren't.-Then, in TcErrors, we report if there is a bad telescope. This way,-we can report a suggested ordering to the user if there is a problem.--Note [Keeping scoped variables in order: Implicit]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When the user implicitly quantifies over variables (say, in a type-signature), we need to come up with some ordering on these variables.-This is done by bumping the TcLevel, bringing the tyvars into scope,-and then type-checking the thing_inside. The constraints are all-wrapped in an implication, which is then solved. Finally, we can-zonk all the binders and then order them with scopedSort.--It's critical to solve before zonking and ordering in order to uncover-any unifications. You might worry that this eager solving could cause-trouble elsewhere. I don't think it will. Because it will solve only-in an increased TcLevel, it can't unify anything that was mentioned-elsewhere. Additionally, we require that the order of implicitly-quantified variables is manifest by the scope of these variables, so-we're not going to learn more information later that will help order-these variables.--Note [Recipe for checking a signature]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Checking a user-written signature requires several steps:-- 1. Generate constraints.- 2. Solve constraints.- 3. Zonk.- 4. Promote tyvars and/or kind-generalize.- 5. Zonk.- 6. Check validity.--There may be some surprises in here:--Step 2 is necessary for two reasons: most signatures also bring-implicitly quantified variables into scope, and solving is necessary-to get these in the right order (see Note [Keeping scoped variables in-order: Implicit]). Additionally, solving is necessary in order to-kind-generalize correctly.--In Step 4, we have to deal with the fact that metatyvars generated-in the type may have a bumped TcLevel, because explicit foralls-raise the TcLevel. To avoid these variables from ever being visible-in the surrounding context, we must obey the following dictum:--  Every metavariable in a type must either be-    (A) promoted-    (B) generalized, or-    (C) zapped to Any--If a variable is generalized, then it becomes a skolem and no longer-has a proper TcLevel. (I'm ignoring the TcLevel on a skolem here, as-it's not really in play here.) On the other hand, if it is not-generalized (because we're not generalizing the construct -- e.g., pattern-sig -- or because the metavars are constrained -- see kindGeneralizeLocal)-we need to promote to maintain (MetaTvInv) of Note [TcLevel and untouchable type variables]-in TcType.--For more about (C), see Note [Naughty quantification candidates] in TcMType.--After promoting/generalizing, we need to zonk *again* because both-promoting and generalizing fill in metavariables.--To avoid the double-zonk, we do two things:- 1. When we're not generalizing:-    zonkPromoteType and friends zonk and promote at the same time.-    Accordingly, the function does steps 3-5 all at once, preventing-    the need for multiple traversals.-- 2. When we are generalizing:-    kindGeneralize does not require a zonked type -- it zonks as it-    gathers free variables. So this way effectively sidesteps step 3.--}--tcWildCardBinders :: [Name]-                  -> ([(Name, TcTyVar)] -> TcM a)-                  -> TcM a-tcWildCardBinders wc_names thing_inside-  = do { wcs <- mapM (const newWildTyVar) wc_names-       ; let wc_prs = wc_names `zip` wcs-       ; tcExtendNameTyVarEnv wc_prs $-         thing_inside wc_prs }--newWildTyVar :: TcM TcTyVar--- ^ New unification variable for a wildcard-newWildTyVar-  = do { kind <- newMetaKindVar-       ; uniq <- newUnique-       ; details <- newMetaDetails TauTv-       ; let name = mkSysTvName uniq (fsLit "_")-             tyvar = (mkTcTyVar name kind details)-       ; traceTc "newWildTyVar" (ppr tyvar)-       ; return tyvar }--{- *********************************************************************-*                                                                      *-             Kind inference for type declarations-*                                                                      *-********************************************************************* -}--{- Note [The initial kind of a type constructor]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-kcLHsQTyVars is responsible for getting the initial kind of-a type constructor.--It has two cases:-- * The TyCon has a CUSK.  In that case, find the full, final,-   poly-kinded kind of the TyCon.  It's very like a term-level-   binding where we have a complete type signature for the-   function.-- * It does not have a CUSK.  Find a monomorphic kind, with-   unification variables in it; they will be generalised later.-   It's very like a term-level binding where we do not have-   a type signature (or, more accurately, where we have a-   partial type signature), so we infer the type and generalise.--}------------------------------------ | Kind-check a 'LHsQTyVars'. If the decl under consideration has a complete,--- user-supplied kind signature (CUSK), generalise the result.--- Used in 'getInitialKind' (for tycon kinds and other kinds)--- and in kind-checking (but not for tycon kinds, which are checked with--- tcTyClDecls). See Note [CUSKs: complete user-supplied kind signatures]--- in HsDecls.------ This function does not do telescope checking.-kcLHsQTyVars :: Name              -- ^ of the thing being checked-             -> TyConFlavour      -- ^ What sort of 'TyCon' is being checked-             -> Bool              -- ^ True <=> the decl being checked has a CUSK-             -> LHsQTyVars GhcRn-             -> TcM Kind          -- ^ The result kind-             -> TcM TcTyCon       -- ^ A suitably-kinded TcTyCon-kcLHsQTyVars name flav cusk tvs thing_inside-  | cusk      = kcLHsQTyVars_Cusk    name flav tvs thing_inside-  | otherwise = kcLHsQTyVars_NonCusk name flav tvs thing_inside---kcLHsQTyVars_Cusk, kcLHsQTyVars_NonCusk-    :: Name              -- ^ of the thing being checked-    -> TyConFlavour      -- ^ What sort of 'TyCon' is being checked-    -> LHsQTyVars GhcRn-    -> TcM Kind          -- ^ The result kind-    -> TcM TcTyCon       -- ^ A suitably-kinded TcTyCon---------------------------------kcLHsQTyVars_Cusk name flav-  user_tyvars@(HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = kv_ns-                                           , hsq_dependent = dep_names }-                      , hsq_explicit = hs_tvs }) thing_inside-  -- CUSK case-  -- See note [Required, Specified, and Inferred for types] in TcTyClsDecls-  = addTyConFlavCtxt name flav $-    do { (scoped_kvs, (tc_tvs, res_kind))-           <- pushTcLevelM_                               $-              solveEqualities                             $-              bindImplicitTKBndrs_Q_Skol kv_ns            $-              bindExplicitTKBndrs_Q_Skol ctxt_kind hs_tvs $-              thing_inside--           -- Now, because we're in a CUSK,-           -- we quantify over the mentioned kind vars-       ; let spec_req_tkvs = scoped_kvs ++ tc_tvs-             all_kinds     = res_kind : map tyVarKind spec_req_tkvs--       ; candidates <- candidateQTyVarsOfKinds all_kinds-             -- 'candidates' are all the variables that we are going to-             -- skolemise and then quantify over.  We do not include spec_req_tvs-             -- because they are /already/ skolems--       ; let inf_candidates = candidates `delCandidates` spec_req_tkvs--       ; inferred <- quantifyTyVars emptyVarSet inf_candidates-                     -- NB: 'inferred' comes back sorted in dependency order--       ; scoped_kvs <- mapM zonkTyCoVarKind scoped_kvs-       ; tc_tvs     <- mapM zonkTyCoVarKind tc_tvs-       ; res_kind   <- zonkTcType           res_kind--       ; let mentioned_kv_set = candidateKindVars candidates-             specified        = scopedSort scoped_kvs-                                -- NB: maintain the L-R order of scoped_kvs--             final_tc_binders =  mkNamedTyConBinders Inferred  inferred-                              ++ mkNamedTyConBinders Specified specified-                              ++ map (mkRequiredTyConBinder mentioned_kv_set) tc_tvs--             all_tv_prs = mkTyVarNamePairs (scoped_kvs ++ tc_tvs)-             tycon = mkTcTyCon name (ppr user_tyvars)-                               final_tc_binders-                               res_kind-                               all_tv_prs-                               True {- it is generalised -} flav-         -- If the ordering from-         -- Note [Required, Specified, and Inferred for types] in TcTyClsDecls-         -- doesn't work, we catch it here, before an error cascade-       ; checkValidTelescope tycon--          -- If any of the specified tyvars aren't actually mentioned in a binder's-          -- kind (or the return kind), then we're in the CUSK case from-          -- Note [Free-floating kind vars]-       ; let unmentioned_kvs   = filterOut (`elemVarSet` mentioned_kv_set) specified-       ; reportFloatingKvs name flav (map binderVar final_tc_binders) unmentioned_kvs---       ; traceTc "kcLHsQTyVars: cusk" $-         vcat [ text "name" <+> ppr name-              , text "kv_ns" <+> ppr kv_ns-              , text "hs_tvs" <+> ppr hs_tvs-              , text "dep_names" <+> ppr dep_names-              , text "scoped_kvs" <+> ppr scoped_kvs-              , text "tc_tvs" <+> ppr tc_tvs-              , text "res_kind" <+> ppr res_kind-              , text "candidates" <+> ppr candidates-              , text "inferred" <+> ppr inferred-              , text "specified" <+> ppr specified-              , text "final_tc_binders" <+> ppr final_tc_binders-              , text "mkTyConKind final_tc_bndrs res_kind"-                <+> ppr (mkTyConKind final_tc_binders res_kind)-              , text "all_tv_prs" <+> ppr all_tv_prs ]--       ; return tycon }-  where-    ctxt_kind | tcFlavourIsOpen flav = TheKind liftedTypeKind-              | otherwise            = AnyKind--kcLHsQTyVars_Cusk _ _ (XLHsQTyVars _) _ = panic "kcLHsQTyVars"---------------------------------kcLHsQTyVars_NonCusk name flav-  user_tyvars@(HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = kv_ns-                                           , hsq_dependent = dep_names }-                      , hsq_explicit = hs_tvs }) thing_inside-  -- Non_CUSK case-  -- See note [Required, Specified, and Inferred for types] in TcTyClsDecls-  = do { (scoped_kvs, (tc_tvs, res_kind))-           -- Why bindImplicitTKBndrs_Q_Tv which uses newTyVarTyVar?-           -- See Note [Inferring kinds for type declarations] in TcTyClsDecls-           <- bindImplicitTKBndrs_Q_Tv kv_ns            $-              bindExplicitTKBndrs_Q_Tv ctxt_kind hs_tvs $-              thing_inside-              -- Why "_Tv" not "_Skol"? See third wrinkle in-              -- Note [Inferring kinds for type declarations] in TcTyClsDecls,--       ; let   -- NB: Don't add scoped_kvs to tyConTyVars, because they-               -- might unify with kind vars in other types in a mutually-               -- recursive group.-               -- See Note [Inferring kinds for type declarations] in TcTyClsDecls-             tc_binders = zipWith mk_tc_binder hs_tvs tc_tvs-               -- Also, note that tc_binders has the tyvars from only the-               -- user-written tyvarbinders. See S1 in Note [How TcTyCons work]-               -- in TcTyClsDecls-             tycon = mkTcTyCon name (ppr user_tyvars) tc_binders res_kind-                               (mkTyVarNamePairs (scoped_kvs ++ tc_tvs))-                               False -- not yet generalised-                               flav--       ; traceTc "kcLHsQTyVars: not-cusk" $-         vcat [ ppr name, ppr kv_ns, ppr hs_tvs, ppr dep_names-              , ppr scoped_kvs-              , ppr tc_tvs, ppr (mkTyConKind tc_binders res_kind) ]-       ; return tycon }-  where-    ctxt_kind | tcFlavourIsOpen flav = TheKind liftedTypeKind-              | otherwise            = AnyKind--    mk_tc_binder :: LHsTyVarBndr GhcRn -> TyVar -> TyConBinder-    -- See Note [Dependent LHsQTyVars]-    mk_tc_binder hs_tv tv-       | hsLTyVarName hs_tv `elemNameSet` dep_names-       = mkNamedTyConBinder Required tv-       | otherwise-       = mkAnonTyConBinder tv--kcLHsQTyVars_NonCusk _ _ (XLHsQTyVars _) _ = panic "kcLHsQTyVars"---{- Note [Kind-checking tyvar binders for associated types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When kind-checking the type-variable binders for associated-   data/newtype decls-   family decls-we behave specially for type variables that are already in scope;-that is, bound by the enclosing class decl.  This is done in-kcLHsQTyVarBndrs:-  * The use of tcImplicitQTKBndrs-  * The tcLookupLocal_maybe code in kc_hs_tv--See Note [Associated type tyvar names] in Class and-    Note [TyVar binders for associated decls] in HsDecls--We must do the same for family instance decls, where the in-scope-variables may be bound by the enclosing class instance decl.-Hence the use of tcImplicitQTKBndrs in tcFamTyPatsAndGen.--Note [Kind variable ordering for associated types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-What should be the kind of `T` in the following example? (#15591)--  class C (a :: Type) where-    type T (x :: f a)--As per Note [Ordering of implicit variables] in RnTypes, we want to quantify-the kind variables in left-to-right order of first occurrence in order to-support visible kind application. But we cannot perform this analysis on just-T alone, since its variable `a` actually occurs /before/ `f` if you consider-the fact that `a` was previously bound by the parent class `C`. That is to say,-the kind of `T` should end up being:--  T :: forall a f. f a -> Type--(It wouldn't necessarily be /wrong/ if the kind ended up being, say,-forall f a. f a -> Type, but that would not be as predictable for users of-visible kind application.)--In contrast, if `T` were redefined to be a top-level type family, like `T2`-below:--  type family T2 (x :: f (a :: Type))--Then `a` first appears /after/ `f`, so the kind of `T2` should be:--  T2 :: forall f a. f a -> Type--In order to make this distinction, we need to know (in kcLHsQTyVars) which-type variables have been bound by the parent class (if there is one). With-the class-bound variables in hand, we can ensure that we always quantify-these first.--}---{- *********************************************************************-*                                                                      *-             Expected kinds-*                                                                      *-********************************************************************* -}---- | Describes the kind expected in a certain context.-data ContextKind = TheKind Kind   -- ^ a specific kind-                 | AnyKind        -- ^ any kind will do-                 | OpenKind       -- ^ something of the form @TYPE _@--------------------------newExpectedKind :: ContextKind -> TcM Kind-newExpectedKind (TheKind k) = return k-newExpectedKind AnyKind     = newMetaKindVar-newExpectedKind OpenKind    = newOpenTypeKind--------------------------expectedKindInCtxt :: UserTypeCtxt -> ContextKind--- Depending on the context, we might accept any kind (for instance, in a TH--- splice), or only certain kinds (like in type signatures).-expectedKindInCtxt (TySynCtxt _)   = AnyKind-expectedKindInCtxt ThBrackCtxt     = AnyKind-expectedKindInCtxt (GhciCtxt {})   = AnyKind--- The types in a 'default' decl can have varying kinds--- See Note [Extended defaults]" in TcEnv-expectedKindInCtxt DefaultDeclCtxt     = AnyKind-expectedKindInCtxt TypeAppCtxt         = AnyKind-expectedKindInCtxt (ForSigCtxt _)      = TheKind liftedTypeKind-expectedKindInCtxt (InstDeclCtxt {})   = TheKind constraintKind-expectedKindInCtxt SpecInstCtxt        = TheKind constraintKind-expectedKindInCtxt _                   = OpenKind---{- *********************************************************************-*                                                                      *-             Bringing type variables into scope-*                                                                      *-********************************************************************* -}------------------------------------------- Implicit binders-----------------------------------------bindImplicitTKBndrs_Skol, bindImplicitTKBndrs_Tv,-  bindImplicitTKBndrs_Q_Skol, bindImplicitTKBndrs_Q_Tv-  :: [Name]-  -> TcM a-  -> TcM ([TcTyVar], a)-bindImplicitTKBndrs_Skol   = bindImplicitTKBndrsX newFlexiKindedSkolemTyVar-bindImplicitTKBndrs_Tv     = bindImplicitTKBndrsX newFlexiKindedTyVarTyVar-bindImplicitTKBndrs_Q_Skol = bindImplicitTKBndrsX (newImplicitTyVarQ newFlexiKindedSkolemTyVar)-bindImplicitTKBndrs_Q_Tv   = bindImplicitTKBndrsX (newImplicitTyVarQ newFlexiKindedTyVarTyVar)--bindImplicitTKBndrsX :: (Name -> TcM TcTyVar) -- new_tv function-                    -> [Name]-                    -> TcM a-                    -> TcM ([TcTyVar], a)   -- these tyvars are dependency-ordered--- * Guarantees to call solveLocalEqualities to unify---   all constraints from thing_inside.------ * Returned TcTyVars have the supplied HsTyVarBndrs,---   but may be in different order to the original [Name]---   (because of sorting to respect dependency)------ * Returned TcTyVars have zonked kinds---   See Note [Keeping scoped variables in order: Implicit]-bindImplicitTKBndrsX new_tv tv_names thing_inside-  = do { tkvs <- mapM new_tv tv_names-       ; result <- tcExtendTyVarEnv tkvs thing_inside-       ; traceTc "bindImplicitTKBndrs" (ppr tv_names $$ ppr tkvs)-       ; return (tkvs, result) }--newImplicitTyVarQ :: (Name -> TcM TcTyVar) ->  Name -> TcM TcTyVar--- Behave like new_tv, except that if the tyvar is in scope, use it-newImplicitTyVarQ new_tv name-  = do { mb_tv <- tcLookupLcl_maybe name-       ; case mb_tv of-           Just (ATyVar _ tv) -> return tv-           _ -> new_tv name }--newFlexiKindedTyVar :: (Name -> Kind -> TcM TyVar) -> Name -> TcM TyVar-newFlexiKindedTyVar new_tv name-  = do { kind <- newMetaKindVar-       ; new_tv name kind }--newFlexiKindedSkolemTyVar :: Name -> TcM TyVar-newFlexiKindedSkolemTyVar = newFlexiKindedTyVar newSkolemTyVar--newFlexiKindedTyVarTyVar :: Name -> TcM TyVar-newFlexiKindedTyVarTyVar = newFlexiKindedTyVar newTyVarTyVar------------------------------------------- Explicit binders-----------------------------------------bindExplicitTKBndrs_Skol, bindExplicitTKBndrs_Tv-    :: [LHsTyVarBndr GhcRn]-    -> TcM a-    -> TcM ([TcTyVar], a)--bindExplicitTKBndrs_Skol = bindExplicitTKBndrsX (tcHsTyVarBndr newSkolemTyVar)-bindExplicitTKBndrs_Tv   = bindExplicitTKBndrsX (tcHsTyVarBndr newTyVarTyVar)--bindExplicitTKBndrs_Q_Skol, bindExplicitTKBndrs_Q_Tv-    :: ContextKind-    -> [LHsTyVarBndr GhcRn]-    -> TcM a-    -> TcM ([TcTyVar], a)--bindExplicitTKBndrs_Q_Skol ctxt_kind = bindExplicitTKBndrsX (tcHsQTyVarBndr ctxt_kind newSkolemTyVar)-bindExplicitTKBndrs_Q_Tv   ctxt_kind = bindExplicitTKBndrsX (tcHsQTyVarBndr ctxt_kind newTyVarTyVar)---- | Used during the "kind-checking" pass in TcTyClsDecls only,--- and even then only for data-con declarations.-bindExplicitTKBndrsX-    :: (HsTyVarBndr GhcRn -> TcM TcTyVar)-    -> [LHsTyVarBndr GhcRn]-    -> TcM a-    -> TcM ([TcTyVar], a)-bindExplicitTKBndrsX tc_tv hs_tvs thing_inside-  = do { traceTc "bindExplicTKBndrs" (ppr hs_tvs)-       ; go hs_tvs }-  where-    go [] = do { res <- thing_inside-               ; return ([], res) }-    go (L _ hs_tv : hs_tvs)-       = do { tv <- tc_tv hs_tv-            ; (tvs, res) <- tcExtendTyVarEnv [tv] (go hs_tvs)-            ; return (tv:tvs, res) }--------------------tcHsTyVarBndr :: (Name -> Kind -> TcM TyVar)-              -> HsTyVarBndr GhcRn -> TcM TcTyVar--- Returned TcTyVar has the same name; no cloning-tcHsTyVarBndr new_tv (UserTyVar _ (L _ tv_nm))-  = do { kind <- newMetaKindVar-       ; new_tv tv_nm kind }-tcHsTyVarBndr new_tv (KindedTyVar _ (L _ tv_nm) lhs_kind)-  = do { kind <- tcLHsKindSig (TyVarBndrKindCtxt tv_nm) lhs_kind-       ; new_tv tv_nm kind }-tcHsTyVarBndr _ (XTyVarBndr _) = panic "tcHsTyVarBndr"--------------------tcHsQTyVarBndr :: ContextKind-               -> (Name -> Kind -> TcM TyVar)-               -> HsTyVarBndr GhcRn -> TcM TcTyVar--- Just like tcHsTyVarBndr, but also---   - uses the in-scope TyVar from class, if it exists---   - takes a ContextKind to use for the no-sig case-tcHsQTyVarBndr ctxt_kind new_tv (UserTyVar _ (L _ tv_nm))-  = do { mb_tv <- tcLookupLcl_maybe tv_nm-       ; case mb_tv of-           Just (ATyVar _ tv) -> return tv-           _ -> do { kind <- newExpectedKind ctxt_kind-                   ; new_tv tv_nm kind } }--tcHsQTyVarBndr _ new_tv (KindedTyVar _ (L _ tv_nm) lhs_kind)-  = do { kind <- tcLHsKindSig (TyVarBndrKindCtxt tv_nm) lhs_kind-       ; mb_tv <- tcLookupLcl_maybe tv_nm-       ; case mb_tv of-           Just (ATyVar _ tv)-             -> do { discardResult $ unifyKind (Just hs_tv)-                                        kind (tyVarKind tv)-                       -- This unify rejects:-                       --    class C (m :: * -> *) where-                       --      type F (m :: *) = ...-                   ; return tv }--           _ -> new_tv tv_nm kind }-  where-    hs_tv = HsTyVar noExt NotPromoted (noLoc tv_nm)-            -- Used for error messages only--tcHsQTyVarBndr _ _ (XTyVarBndr _) = panic "tcHsTyVarBndr"-------------------------------------------- Binding type/class variables in the--- kind-checking and typechecking phases-----------------------------------------bindTyClTyVars :: Name-               -> ([TyConBinder] -> Kind -> TcM a) -> TcM a--- ^ Used for the type variables of a type or class decl--- in the "kind checking" and "type checking" pass,--- but not in the initial-kind run.-bindTyClTyVars tycon_name thing_inside-  = do { tycon <- kcLookupTcTyCon tycon_name-       ; let scoped_prs = tcTyConScopedTyVars tycon-             res_kind   = tyConResKind tycon-             binders    = tyConBinders tycon-       ; traceTc "bindTyClTyVars" (ppr tycon_name <+> ppr binders)-       ; tcExtendNameTyVarEnv scoped_prs $-         thing_inside binders res_kind }---- getInitialKind has made a suitably-shaped kind for the type or class--- Look it up in the local environment. This is used only for tycons--- that we're currently type-checking, so we're sure to find a TcTyCon.-kcLookupTcTyCon :: Name -> TcM TcTyCon-kcLookupTcTyCon nm-  = do { tc_ty_thing <- tcLookup nm-       ; return $ case tc_ty_thing of-           ATcTyCon tc -> tc-           _           -> pprPanic "kcLookupTcTyCon" (ppr tc_ty_thing) }---{- *********************************************************************-*                                                                      *-             Kind generalisation-*                                                                      *-********************************************************************* -}--zonkAndScopedSort :: [TcTyVar] -> TcM [TcTyVar]-zonkAndScopedSort spec_tkvs-  = do { spec_tkvs <- mapM zonkTcTyCoVarBndr spec_tkvs-          -- Use zonkTcTyCoVarBndr because a skol_tv might be a TyVarTv--       -- Do a stable topological sort, following-       -- Note [Ordering of implicit variables] in RnTypes-       ; return (scopedSort spec_tkvs) }--kindGeneralize :: TcType -> TcM [KindVar]--- Quantify the free kind variables of a kind or type--- In the latter case the type is closed, so it has no free--- type variables.  So in both cases, all the free vars are kind vars--- Input needn't be zonked. All variables to be quantified must--- have a TcLevel higher than the ambient TcLevel.--- NB: You must call solveEqualities or solveLocalEqualities before--- kind generalization------ NB: this function is just a specialised version of---        kindGeneralizeLocal emptyWC kind_or_type----kindGeneralize kind_or_type-  = do { kt <- zonkTcType kind_or_type-       ; traceTc "kindGeneralise1" (ppr kt)-       ; dvs <- candidateQTyVarsOfKind kind_or_type-       ; gbl_tvs <- tcGetGlobalTyCoVars -- Already zonked-       ; traceTc "kindGeneralize" (vcat [ ppr kind_or_type-                                        , ppr dvs ])-       ; quantifyTyVars gbl_tvs dvs }---- | This variant of 'kindGeneralize' refuses to generalize over any--- variables free in the given WantedConstraints. Instead, it promotes--- these variables into an outer TcLevel. All variables to be quantified must--- have a TcLevel higher than the ambient TcLevel. See also--- Note [Promoting unification variables] in TcSimplify-kindGeneralizeLocal :: WantedConstraints -> TcType -> TcM [KindVar]-kindGeneralizeLocal wanted kind_or_type-  = do {-       -- This bit is very much like decideMonoTyVars in TcSimplify,-       -- but constraints are so much simpler in kinds, it is much-       -- easier here. (In particular, we never quantify over a-       -- constraint in a type.)-       ; constrained <- zonkTyCoVarsAndFV (tyCoVarsOfWC wanted)-       ; (_, constrained) <- promoteTyVarSet constrained--       ; gbl_tvs <- tcGetGlobalTyCoVars -- Already zonked-       ; let mono_tvs = gbl_tvs `unionVarSet` constrained--         -- use the "Kind" variant here, as any types we see-         -- here will already have all type variables quantified;-         -- thus, every free variable is really a kv, never a tv.-       ; dvs <- candidateQTyVarsOfKind kind_or_type--       ; traceTc "kindGeneralizeLocal" $-         vcat [ text "Wanted:" <+> ppr wanted-              , text "Kind or type:" <+> ppr kind_or_type-              , text "tcvs of wanted:" <+> pprTyVars (nonDetEltsUniqSet (tyCoVarsOfWC wanted))-              , text "constrained:" <+> pprTyVars (nonDetEltsUniqSet constrained)-              , text "mono_tvs:" <+> pprTyVars (nonDetEltsUniqSet mono_tvs)-              , text "dvs:" <+> ppr dvs ]--       ; quantifyTyVars mono_tvs dvs }--{- Note [Levels and generalisation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-  f x = e-with no type signature. We are currently at level i.-We must-  * Push the level to level (i+1)-  * Allocate a fresh alpha[i+1] for the result type-  * Check that e :: alpha[i+1], gathering constraint WC-  * Solve WC as far as possible-  * Zonking the result type alpha[i+1], say to beta[i-1] -> gamma[i]-  * Find the free variables with level > i, in this case gamma[i]-  * Skolemise those free variables and quantify over them, giving-       f :: forall g. beta[i-1] -> g-  * Emit the residiual constraint wrapped in an implication for g,-    thus   forall g. WC--All of this happens for types too.  Consider-  f :: Int -> (forall a. Proxy a -> Int)--Note [Kind generalisation]-~~~~~~~~~~~~~~~~~~~~~~~~~~-We do kind generalisation only at the outer level of a type signature.-For example, consider-  T :: forall k. k -> *-  f :: (forall a. T a -> Int) -> Int-When kind-checking f's type signature we generalise the kind at-the outermost level, thus:-  f1 :: forall k. (forall (a:k). T k a -> Int) -> Int  -- YES!-and *not* at the inner forall:-  f2 :: (forall k. forall (a:k). T k a -> Int) -> Int  -- NO!-Reason: same as for HM inference on value level declarations,-we want to infer the most general type.  The f2 type signature-would be *less applicable* than f1, because it requires a more-polymorphic argument.--NB: There are no explicit kind variables written in f's signature.-When there are, the renamer adds these kind variables to the list of-variables bound by the forall, so you can indeed have a type that's-higher-rank in its kind. But only by explicit request.--Note [Kinds of quantified type variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-tcTyVarBndrsGen quantifies over a specified list of type variables,-*and* over the kind variables mentioned in the kinds of those tyvars.--Note that we must zonk those kinds (obviously) but less obviously, we-must return type variables whose kinds are zonked too. Example-    (a :: k7)  where  k7 := k9 -> k9-We must return-    [k9, a:k9->k9]-and NOT-    [k9, a:k7]-Reason: we're going to turn this into a for-all type,-   forall k9. forall (a:k7). blah-which the type checker will then instantiate, and instantiate does not-look through unification variables!--Hence using zonked_kinds when forming tvs'.---}--------------------------------------etaExpandAlgTyCon :: [TyConBinder]-                  -> Kind-                  -> TcM ([TyConBinder], Kind)--- GADT decls can have a (perhaps partial) kind signature---      e.g.  data T a :: * -> * -> * where ...--- This function makes up suitable (kinded) TyConBinders for the--- argument kinds.  E.g. in this case it might return---   ([b::*, c::*], *)--- Never emits constraints.--- It's a little trickier than you might think: see--- Note [TyConBinders for the result kind signature of a data type]-etaExpandAlgTyCon tc_bndrs kind-  = do  { loc     <- getSrcSpanM-        ; uniqs   <- newUniqueSupply-        ; rdr_env <- getLocalRdrEnv-        ; let new_occs = [ occ-                         | str <- allNameStrings-                         , let occ = mkOccName tvName str-                         , isNothing (lookupLocalRdrOcc rdr_env occ)-                         -- Note [Avoid name clashes for associated data types]-                         , not (occ `elem` lhs_occs) ]-              new_uniqs = uniqsFromSupply uniqs-              subst = mkEmptyTCvSubst (mkInScopeSet (mkVarSet lhs_tvs))-        ; return (go loc new_occs new_uniqs subst [] kind) }-  where-    lhs_tvs  = map binderVar tc_bndrs-    lhs_occs = map getOccName lhs_tvs--    go loc occs uniqs subst acc kind-      = case splitPiTy_maybe kind of-          Nothing -> (reverse acc, substTy subst kind)--          Just (Anon arg, kind')-            -> go loc occs' uniqs' subst' (tcb : acc) kind'-            where-              arg'   = substTy subst arg-              tv     = mkTyVar (mkInternalName uniq occ loc) arg'-              subst' = extendTCvInScope subst tv-              tcb    = Bndr tv AnonTCB-              (uniq:uniqs') = uniqs-              (occ:occs')   = occs--          Just (Named (Bndr tv vis), kind')-            -> go loc occs uniqs subst' (tcb : acc) kind'-            where-              (subst', tv') = substTyVarBndr subst tv-              tcb = Bndr tv' (NamedTCB vis)--badKindSig :: Bool -> Kind -> SDoc-badKindSig check_for_type kind- = hang (sep [ text "Kind signature on data type declaration has non-*"-             , (if check_for_type then empty else text "and non-variable") <+>-               text "return kind" ])-        2 (ppr kind)--tcbVisibilities :: TyCon -> [Type] -> [TyConBndrVis]--- Result is in 1-1 correpondence with orig_args-tcbVisibilities tc orig_args-  = go (tyConKind tc) init_subst orig_args-  where-    init_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfTypes orig_args))-    go _ _ []-      = []--    go fun_kind subst all_args@(arg : args)-      | Just (tcb, inner_kind) <- splitPiTy_maybe fun_kind-      = case tcb of-          Anon _              -> AnonTCB      : go inner_kind subst  args-          Named (Bndr tv vis) -> NamedTCB vis : go inner_kind subst' args-                 where-                    subst' = extendTCvSubst subst tv arg--      | not (isEmptyTCvSubst subst)-      = go (substTy subst fun_kind) init_subst all_args--      | otherwise-      = pprPanic "addTcbVisibilities" (ppr tc <+> ppr orig_args)---{- Note [TyConBinders for the result kind signature of a data type]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Given-  data T (a::*) :: * -> forall k. k -> *-we want to generate the extra TyConBinders for T, so we finally get-  (a::*) (b::*) (k::*) (c::k)-The function etaExpandAlgTyCon generates these extra TyConBinders from-the result kind signature.--We need to take care to give the TyConBinders-  (a) OccNames that are fresh (because the TyConBinders of a TyCon-      must have distinct OccNames--  (b) Uniques that are fresh (obviously)--For (a) we need to avoid clashes with the tyvars declared by-the user before the "::"; in the above example that is 'a'.-And also see Note [Avoid name clashes for associated data types].--For (b) suppose we have-   data T :: forall k. k -> forall k. k -> *-where the two k's are identical even up to their uniques.  Surprisingly,-this can happen: see Trac #14515.--It's reasonably easy to solve all this; just run down the list with a-substitution; hence the recursive 'go' function.  But it has to be-done.--Note [Avoid name clashes for associated data types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider    class C a b where-               data D b :: * -> *-When typechecking the decl for D, we'll invent an extra type variable-for D, to fill out its kind.  Ideally we don't want this type variable-to be 'a', because when pretty printing we'll get-            class C a b where-               data D b a0-(NB: the tidying happens in the conversion to IfaceSyn, which happens-as part of pretty-printing a TyThing.)--That's why we look in the LocalRdrEnv to see what's in scope. This is-important only to get nice-looking output when doing ":info C" in GHCi.-It isn't essential for correctness.---************************************************************************-*                                                                      *-             Partial signatures-*                                                                      *-************************************************************************---}--tcHsPartialSigType-  :: UserTypeCtxt-  -> LHsSigWcType GhcRn       -- The type signature-  -> TcM ( [(Name, TcTyVar)]  -- Wildcards-         , Maybe TcType       -- Extra-constraints wildcard-         , [Name]             -- Original tyvar names, in correspondence with ...-         , [TcTyVar]          -- ... Implicitly and explicitly bound type variables-         , TcThetaType        -- Theta part-         , TcType )           -- Tau part--- See Note [Recipe for checking a signature]-tcHsPartialSigType ctxt sig_ty-  | HsWC { hswc_ext  = sig_wcs,         hswc_body = ib_ty } <- sig_ty-  , HsIB { hsib_ext = implicit_hs_tvs-         , hsib_body = hs_ty } <- ib_ty-  , (explicit_hs_tvs, L _ hs_ctxt, hs_tau) <- splitLHsSigmaTy hs_ty-  = addSigCtxt ctxt hs_ty $-    do { (implicit_tvs, (explicit_tvs, (wcs, wcx, theta, tau)))-            <- tcWildCardBinders sig_wcs $ \ wcs ->-               bindImplicitTKBndrs_Tv implicit_hs_tvs       $-               bindExplicitTKBndrs_Tv explicit_hs_tvs       $-               do {   -- Instantiate the type-class context; but if there-                      -- is an extra-constraints wildcard, just discard it here-                    (theta, wcx) <- tcPartialContext hs_ctxt--                  ; tau <- tcHsOpenType hs_tau--                  ; return (wcs, wcx, theta, tau) }--         -- We must return these separately, because all the zonking below-         -- might change the name of a TyVarTv. This, in turn, causes trouble-         -- in partial type signatures that bind scoped type variables, as-         -- we bring the wrong name into scope in the function body.-         -- Test case: partial-sigs/should_compile/LocalDefinitionBug-       ; let tv_names = map tyVarName (implicit_tvs ++ explicit_tvs)--       -- Spit out the wildcards (including the extra-constraints one)-       -- as "hole" constraints, so that they'll be reported if necessary-       -- See Note [Extra-constraint holes in partial type signatures]-       ; emitWildCardHoleConstraints wcs--         -- The TyVarTvs created above will sometimes have too high a TcLevel-         -- (note that they are generated *after* bumping the level in-         -- the tc{Im,Ex}plicitTKBndrsSig functions. Bumping the level-         -- is still important here, because the kinds of these variables-         -- do indeed need to have the higher level, so they can unify-         -- with other local type variables. But, now that we've type-checked-         -- everything (and solved equalities in the tcImplicit call)-         -- we need to promote the TyVarTvs so we don't violate the TcLevel-         -- invariant-       ; implicit_tvs <- zonkAndScopedSort implicit_tvs-       ; explicit_tvs <- mapM zonkTcTyCoVarBndr explicit_tvs-       ; theta        <- mapM zonkTcType theta-       ; tau          <- zonkTcType tau--       ; let all_tvs = implicit_tvs ++ explicit_tvs--       ; checkValidType ctxt (mkSpecForAllTys all_tvs $ mkPhiTy theta tau)--       ; traceTc "tcHsPartialSigType" (ppr all_tvs)-       ; return (wcs, wcx, tv_names, all_tvs, theta, tau) }--tcHsPartialSigType _ (HsWC _ (XHsImplicitBndrs _)) = panic "tcHsPartialSigType"-tcHsPartialSigType _ (XHsWildCardBndrs _) = panic "tcHsPartialSigType"--tcPartialContext :: HsContext GhcRn -> TcM (TcThetaType, Maybe TcType)-tcPartialContext hs_theta-  | Just (hs_theta1, hs_ctxt_last) <- snocView hs_theta-  , L _ wc@(HsWildCardTy _) <- ignoreParens hs_ctxt_last-  = do { wc_tv_ty <- tcWildCardOcc typeLevelMode wc constraintKind-       ; theta <- mapM tcLHsPredType hs_theta1-       ; return (theta, Just wc_tv_ty) }-  | otherwise-  = do { theta <- mapM tcLHsPredType hs_theta-       ; return (theta, Nothing) }--{- Note [Extra-constraint holes in partial type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-  f :: (_) => a -> a-  f x = ...--* The renamer leaves '_' untouched.--* Then, in tcHsPartialSigType, we make a new hole TcTyVar, in-  tcWildCardBinders.--* TcBinds.chooseInferredQuantifiers fills in that hole TcTyVar-  with the inferred constraints, e.g. (Eq a, Show a)--* TcErrors.mkHoleError finally reports the error.--An annoying difficulty happens if there are more than 62 inferred-constraints. Then we need to fill in the TcTyVar with (say) a 70-tuple.-Where do we find the TyCon?  For good reasons we only have constraint-tuples up to 62 (see Note [How tuples work] in TysWiredIn).  So how-can we make a 70-tuple?  This was the root cause of Trac #14217.--It's incredibly tiresome, because we only need this type to fill-in the hole, to communicate to the error reporting machinery.  Nothing-more.  So I use a HACK:--* I make an /ordinary/ tuple of the constraints, in-  TcBinds.chooseInferredQuantifiers. This is ill-kinded because-  ordinary tuples can't contain constraints, but it works fine. And for-  ordinary tuples we don't have the same limit as for constraint-  tuples (which need selectors and an assocated class).--* Because it is ill-kinded, it trips an assert in writeMetaTyVar,-  so now I disable the assertion if we are writing a type of-  kind Constraint.  (That seldom/never normally happens so we aren't-  losing much.)--Result works fine, but it may eventually bite us.---************************************************************************-*                                                                      *-      Pattern signatures (i.e signatures that occur in patterns)-*                                                                      *-********************************************************************* -}--tcHsPatSigType :: UserTypeCtxt-               -> LHsSigWcType GhcRn          -- The type signature-               -> TcM ( [(Name, TcTyVar)]     -- Wildcards-                      , [(Name, TcTyVar)]     -- The new bit of type environment, binding-                                              -- the scoped type variables-                      , TcType)       -- The type--- Used for type-checking type signatures in--- (a) patterns           e.g  f (x::Int) = e--- (b) RULE forall bndrs  e.g. forall (x::Int). f x = x------ This may emit constraints--- See Note [Recipe for checking a signature]-tcHsPatSigType ctxt sig_ty-  | HsWC { hswc_ext = sig_wcs,   hswc_body = ib_ty } <- sig_ty-  , HsIB { hsib_ext = sig_vars-         , hsib_body = hs_ty } <- ib_ty-  = addSigCtxt ctxt hs_ty $-    do { sig_tkvs <- mapM new_implicit_tv sig_vars-       ; (wcs, sig_ty)-            <- solveLocalEqualities "tcHsPatSigType" $-                 -- Always solve local equalities if possible,-                 -- else casts get in the way of deep skolemisation-                 -- (Trac #16033)-               tcWildCardBinders sig_wcs  $ \ wcs ->-               tcExtendTyVarEnv sig_tkvs                           $-               do { sig_ty <- tcHsOpenType hs_ty-                  ; return (wcs, sig_ty) }--        ; emitWildCardHoleConstraints wcs--          -- sig_ty might have tyvars that are at a higher TcLevel (if hs_ty-          -- contains a forall). Promote these.-          -- Ex: f (x :: forall a. Proxy a -> ()) = ... x ...-          -- When we instantiate x, we have to compare the kind of the argument-          -- to a's kind, which will be a metavariable.-        ; sig_ty <- zonkPromoteType sig_ty-        ; checkValidType ctxt sig_ty--        ; let tv_pairs = mkTyVarNamePairs sig_tkvs--        ; traceTc "tcHsPatSigType" (ppr sig_vars)-        ; return (wcs, tv_pairs, sig_ty) }-  where-    new_implicit_tv name = do { kind <- newMetaKindVar-                              ; new_tv name kind }--    new_tv = case ctxt of-               RuleSigCtxt {} -> newSkolemTyVar-               _              -> newTauTyVar-      -- See Note [Pattern signature binders]---tcHsPatSigType _ (HsWC _ (XHsImplicitBndrs _)) = panic "tcHsPatSigType"-tcHsPatSigType _ (XHsWildCardBndrs _)          = panic "tcHsPatSigType"--tcPatSig :: Bool                    -- True <=> pattern binding-         -> LHsSigWcType GhcRn-         -> ExpSigmaType-         -> TcM (TcType,            -- The type to use for "inside" the signature-                 [(Name,TcTyVar)],  -- The new bit of type environment, binding-                                    -- the scoped type variables-                 [(Name,TcTyVar)],  -- The wildcards-                 HsWrapper)         -- Coercion due to unification with actual ty-                                    -- Of shape:  res_ty ~ sig_ty-tcPatSig in_pat_bind sig res_ty- = do  { (sig_wcs, sig_tvs, sig_ty) <- tcHsPatSigType PatSigCtxt sig-        -- sig_tvs are the type variables free in 'sig',-        -- and not already in scope. These are the ones-        -- that should be brought into scope--        ; if null sig_tvs then do {-                -- Just do the subsumption check and return-                  wrap <- addErrCtxtM (mk_msg sig_ty) $-                          tcSubTypeET PatSigOrigin PatSigCtxt res_ty sig_ty-                ; return (sig_ty, [], sig_wcs, wrap)-        } else do-                -- Type signature binds at least one scoped type variable--                -- A pattern binding cannot bind scoped type variables-                -- It is more convenient to make the test here-                -- than in the renamer-        { when in_pat_bind (addErr (patBindSigErr sig_tvs))--                -- Check that all newly-in-scope tyvars are in fact-                -- constrained by the pattern.  This catches tiresome-                -- cases like-                --      type T a = Int-                --      f :: Int -> Int-                --      f (x :: T a) = ...-                -- Here 'a' doesn't get a binding.  Sigh-        ; let bad_tvs = filterOut (`elemVarSet` exactTyCoVarsOfType sig_ty)-                                  (tyCoVarsOfTypeList sig_ty)-        ; checkTc (null bad_tvs) (badPatTyVarTvs sig_ty bad_tvs)--        -- Now do a subsumption check of the pattern signature against res_ty-        ; wrap <- addErrCtxtM (mk_msg sig_ty) $-                  tcSubTypeET PatSigOrigin PatSigCtxt res_ty sig_ty--        -- Phew!-        ; return (sig_ty, sig_tvs, sig_wcs, wrap)-        } }-  where-    mk_msg sig_ty tidy_env-       = do { (tidy_env, sig_ty) <- zonkTidyTcType tidy_env sig_ty-            ; res_ty <- readExpType res_ty   -- should be filled in by now-            ; (tidy_env, res_ty) <- zonkTidyTcType tidy_env res_ty-            ; let msg = vcat [ hang (text "When checking that the pattern signature:")-                                  4 (ppr sig_ty)-                             , nest 2 (hang (text "fits the type of its context:")-                                          2 (ppr res_ty)) ]-            ; return (tidy_env, msg) }--patBindSigErr :: [(Name,TcTyVar)] -> SDoc-patBindSigErr sig_tvs-  = hang (text "You cannot bind scoped type variable" <> plural sig_tvs-          <+> pprQuotedList (map fst sig_tvs))-       2 (text "in a pattern binding signature")--{- Note [Pattern signature binders]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also Note [Type variables in the type environment] in TcRnTypes.-Consider--  data T where-    MkT :: forall a. a -> (a -> Int) -> T--  f :: T -> ...-  f (MkT x (f :: b -> c)) = <blah>--Here- * The pattern (MkT p1 p2) creates a *skolem* type variable 'a_sk',-   It must be a skolem so that that it retains its identity, and-   TcErrors.getSkolemInfo can thereby find the binding site for the skolem.-- * The type signature pattern (f :: b -> c) makes freshs meta-tyvars-   beta and gamma (TauTvs), and binds "b" :-> beta, "c" :-> gamma in the-   environment-- * Then unification makes beta := a_sk, gamma := Int-   That's why we must make beta and gamma a MetaTv,-   not a SkolemTv, so that it can unify to a_sk (or Int, respectively).-- * Finally, in '<blah>' we have the envt "b" :-> beta, "c" :-> gamma,-   so we return the pairs ("b" :-> beta, "c" :-> gamma) from tcHsPatSigType,--Another example (Trac #13881):-   fl :: forall (l :: [a]). Sing l -> Sing l-   fl (SNil :: Sing (l :: [y])) = SNil-When we reach the pattern signature, 'l' is in scope from the-outer 'forall':-   "a" :-> a_sk :: *-   "l" :-> l_sk :: [a_sk]-We make up a fresh meta-TauTv, y_sig, for 'y', and kind-check-the pattern signature-   Sing (l :: [y])-That unifies y_sig := a_sk.  We return from tcHsPatSigType with-the pair ("y" :-> y_sig).--For RULE binders, though, things are a bit different (yuk).-  RULE "foo" forall (x::a) (y::[a]).  f x y = ...-Here this really is the binding site of the type variable so we'd like-to use a skolem, so that we get a complaint if we unify two of them-together.  Hence the new_tv function in tcHsPatSigType.---************************************************************************-*                                                                      *-        Checking kinds-*                                                                      *-************************************************************************---}--unifyKinds :: [LHsType GhcRn] -> [(TcType, TcKind)] -> TcM ([TcType], TcKind)-unifyKinds rn_tys act_kinds-  = do { kind <- newMetaKindVar-       ; let check rn_ty (ty, act_kind) = checkExpectedKind YesSaturation (ppr $ unLoc rn_ty) ty act_kind kind-       ; tys' <- zipWithM check rn_tys act_kinds-       ; return (tys', kind) }--{--************************************************************************-*                                                                      *-    Promotion-*                                                                      *-************************************************************************--}---- | Whenever a type is about to be added to the environment, it's necessary--- to make sure that any free meta-tyvars in the type are promoted to the--- current TcLevel. (They might be at a higher level due to the level-bumping--- in tcExplicitTKBndrs, for example.) This function both zonks *and*--- promotes. Why at the same time? See Note [Recipe for checking a signature]-zonkPromoteType :: TcType -> TcM TcType-zonkPromoteType = mapType zonkPromoteMapper ()---- cf. TcMType.zonkTcTypeMapper-zonkPromoteMapper :: TyCoMapper () TcM-zonkPromoteMapper = TyCoMapper { tcm_smart    = True-                               , tcm_tyvar    = const zonkPromoteTcTyVar-                               , tcm_covar    = const covar-                               , tcm_hole     = const hole-                               , tcm_tycobinder = const tybinder-                               , tcm_tycon    = return }-  where-    covar cv-      = mkCoVarCo <$> zonkPromoteTyCoVarKind cv--    hole :: CoercionHole -> TcM Coercion-    hole h-      = do { contents <- unpackCoercionHole_maybe h-           ; case contents of-               Just co -> do { co <- zonkPromoteCoercion co-                             ; checkCoercionHole cv co }-               Nothing -> do { cv' <- zonkPromoteTyCoVarKind cv-                             ; return $ mkHoleCo (setCoHoleCoVar h cv') } }-      where-        cv = coHoleCoVar h--    tybinder :: TyVar -> ArgFlag -> TcM ((), TyVar)-    tybinder tv _flag = ((), ) <$> zonkPromoteTyCoVarKind tv--zonkPromoteTcTyVar :: TyCoVar -> TcM TcType-zonkPromoteTcTyVar tv-  | isMetaTyVar tv-  = do { let ref = metaTyVarRef tv-       ; contents <- readTcRef ref-       ; case contents of-           Flexi -> do { (_, promoted_tv) <- promoteTyVar tv-                       ; mkTyVarTy <$> zonkPromoteTyCoVarKind promoted_tv }-           Indirect ty -> zonkPromoteType ty }--  | isTcTyVar tv && isSkolemTyVar tv  -- NB: isSkolemTyVar says "True" to pure TyVars-  = do { tc_lvl <- getTcLevel-       ; mkTyVarTy <$> zonkPromoteTyCoVarKind (promoteSkolem tc_lvl tv) }--  | otherwise-  = mkTyVarTy <$> zonkPromoteTyCoVarKind tv--zonkPromoteTyCoVarKind :: TyCoVar -> TcM TyCoVar-zonkPromoteTyCoVarKind = updateTyVarKindM zonkPromoteType--zonkPromoteCoercion :: Coercion -> TcM Coercion-zonkPromoteCoercion = mapCoercion zonkPromoteMapper ()--{--************************************************************************-*                                                                      *-        Sort checking kinds-*                                                                      *-************************************************************************--tcLHsKindSig converts a user-written kind to an internal, sort-checked kind.-It does sort checking and desugaring at the same time, in one single pass.--}--tcLHsKindSig :: UserTypeCtxt -> LHsKind GhcRn -> TcM Kind-tcLHsKindSig ctxt hs_kind--- See  Note [Recipe for checking a signature] in TcHsType--- Result is zonked-  = do { kind <- solveLocalEqualities "tcLHsKindSig" $-                 tc_lhs_kind kindLevelMode hs_kind-       ; traceTc "tcLHsKindSig" (ppr hs_kind $$ ppr kind)-       -- No generalization, so we must promote-       ; kind <- zonkPromoteType kind-         -- This zonk is very important in the case of higher rank kinds-         -- E.g. Trac #13879    f :: forall (p :: forall z (y::z). <blah>).-         --                          <more blah>-         --      When instantiating p's kind at occurrences of p in <more blah>-         --      it's crucial that the kind we instantiate is fully zonked,-         --      else we may fail to substitute properly--       ; checkValidType ctxt kind-       ; traceTc "tcLHsKindSig2" (ppr kind)-       ; return kind }--tc_lhs_kind :: TcTyMode -> LHsKind GhcRn -> TcM Kind-tc_lhs_kind mode k-  = addErrCtxt (text "In the kind" <+> quotes (ppr k)) $-    tc_lhs_type (kindLevel mode) k liftedTypeKind--promotionErr :: Name -> PromotionErr -> TcM a-promotionErr name err-  = failWithTc (hang (pprPECategory err <+> quotes (ppr name) <+> text "cannot be used here")-                   2 (parens reason))-  where-    reason = case err of-               ConstrainedDataConPE pred-                              -> text "it has an unpromotable context"-                                 <+> quotes (ppr pred)-               FamDataConPE   -> text "it comes from a data family instance"-               NoDataKindsTC  -> text "perhaps you intended to use DataKinds"-               NoDataKindsDC  -> text "perhaps you intended to use DataKinds"-               PatSynPE       -> text "pattern synonyms cannot be promoted"-               PatSynExPE     -> sep [ text "the existential variables of a pattern synonym"-                                     , text "signature do not scope over the pattern" ]-               _ -> text "it is defined and used in the same recursive group"--{--************************************************************************-*                                                                      *-                Scoped type variables-*                                                                      *-************************************************************************--}--badPatTyVarTvs :: TcType -> [TyVar] -> SDoc-badPatTyVarTvs sig_ty bad_tvs-  = vcat [ fsep [text "The type variable" <> plural bad_tvs,-                 quotes (pprWithCommas ppr bad_tvs),-                 text "should be bound by the pattern signature" <+> quotes (ppr sig_ty),-                 text "but are actually discarded by a type synonym" ]-         , text "To fix this, expand the type synonym"-         , text "[Note: I hope to lift this restriction in due course]" ]--{--************************************************************************-*                                                                      *-          Error messages and such-*                                                                      *-************************************************************************--}---{- Note [Free-floating kind vars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--  data S a = MkS (Proxy (a :: k))--According to the rules around implicitly-bound kind variables,-that k scopes over the whole declaration. The renamer grabs-it and adds it to the hsq_implicits field of the HsQTyVars of the-tycon.  So we get-   S :: forall {k}. k -> Type--That's fine.  But consider this variant:-  data T = MkT (forall (a :: k). Proxy a)-  -- from test ghci/scripts/T7873--This is not an existential datatype, but a higher-rank one (the forall-to the right of MkT). Again, 'k' scopes over the whole declaration,-but we do not want to get-   T :: forall {k}. Type-Why not? Because the kind variable isn't fixed by anything. For-a variable like k to be implicit, it needs to be mentioned in the kind-of a tycon tyvar. But it isn't.--Rejecting T depends on whether or not the datatype has a CUSK.--Non-CUSK (handled in TcTyClsDecls.kcTyClGroup (generalise)):-   When generalising the TyCon we check that every Specified 'k'-   appears free in the kind of the TyCon; that is, in the kind of-   one of its Required arguments, or the result kind.--CUSK (handled in TcHsType.kcLHsQTyVars, the CUSK case):-   When we determine the tycon's final, never-to-be-changed kind-   in kcLHsQTyVars, we check to make sure all implicitly-bound kind-   vars are indeed mentioned in a kind somewhere. If not, error.--We also perform free-floating kind var analysis for type family instances-(see #13985). Here is an interesting example:--    type family   T :: k-    type instance T = (Nothing :: Maybe a)--Upon a cursory glance, it may appear that the kind variable `a` is-free-floating above, since there are no (visible) LHS patterns in `T`. However,-there is an *invisible* pattern due to the return kind, so inside of GHC, the-instance looks closer to this:--    type family T @k :: k-    type instance T @(Maybe a) = (Nothing :: Maybe a)--Here, we can see that `a` really is bound by a LHS type pattern, so `a` is in-fact not free-floating. Contrast that with this example:--    type instance T = Proxy (Nothing :: Maybe a)--This would looks like this inside of GHC:--    type instance T @(*) = Proxy (Nothing :: Maybe a)--So this time, `a` is neither bound by a visible nor invisible type pattern on-the LHS, so it would be reported as free-floating.--Finally, here's one more brain-teaser (from #9574). In the example below:--    class Funct f where-      type Codomain f :: *-    instance Funct ('KProxy :: KProxy o) where-      type Codomain 'KProxy = NatTr (Proxy :: o -> *)--As it turns out, `o` is not free-floating in this example. That is because `o`-bound by the kind signature of the LHS type pattern 'KProxy. To make this more-obvious, one can also write the instance like so:--    instance Funct ('KProxy :: KProxy o) where-      type Codomain ('KProxy :: KProxy o) = NatTr (Proxy :: o -> *)--}---- See Note [Free-floating kind vars]-reportFloatingKvs :: Name         -- of the tycon-                  -> TyConFlavour -- What sort of TyCon it is-                  -> [TcTyVar]    -- all tyvars, not necessarily zonked-                  -> [TcTyVar]    -- floating tyvars-                  -> TcM ()-reportFloatingKvs tycon_name flav all_tvs bad_tvs-  = unless (null bad_tvs) $  -- don't bother zonking if there's no error-    do { all_tvs <- mapM zonkTcTyVarToTyVar all_tvs-       ; bad_tvs <- mapM zonkTcTyVarToTyVar bad_tvs-       ; let (tidy_env, tidy_all_tvs) = tidyOpenTyCoVars emptyTidyEnv all_tvs-             tidy_bad_tvs             = map (tidyTyCoVarOcc tidy_env) bad_tvs-       ; mapM_ (report tidy_all_tvs) tidy_bad_tvs }-  where-    report tidy_all_tvs tidy_bad_tv-      = addErr $-        vcat [ text "Kind variable" <+> quotes (ppr tidy_bad_tv) <+>-               text "is implicitly bound in" <+> ppr flav-             , quotes (ppr tycon_name) <> comma <+>-               text "but does not appear as the kind of any"-             , text "of its type variables. Perhaps you meant"-             , text "to bind it explicitly somewhere?"-             , ppWhen (not (null tidy_all_tvs)) $-                 hang (text "Type variables with inferred kinds:")-                 2 (ppr_tv_bndrs tidy_all_tvs) ]--    ppr_tv_bndrs tvs = sep (map pp_tv tvs)-    pp_tv tv         = parens (ppr tv <+> dcolon <+> ppr (tyVarKind tv))+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns #-}++module TcHsType (+        -- Type signatures+        kcClassSigType, tcClassSigType,+        tcHsSigType, tcHsSigWcType,+        tcHsPartialSigType,+        tcStandaloneKindSig,+        funsSigCtxt, addSigCtxt, pprSigCtxt,++        tcHsClsInstType,+        tcHsDeriv, tcDerivStrategy,+        tcHsTypeApp,+        UserTypeCtxt(..),+        bindImplicitTKBndrs_Tv, bindImplicitTKBndrs_Skol,+            bindImplicitTKBndrs_Q_Tv, bindImplicitTKBndrs_Q_Skol,+        bindExplicitTKBndrs_Tv, bindExplicitTKBndrs_Skol,+            bindExplicitTKBndrs_Q_Tv, bindExplicitTKBndrs_Q_Skol,+        ContextKind(..),++                -- Type checking type and class decls+        kcLookupTcTyCon, bindTyClTyVars,+        etaExpandAlgTyCon, tcbVisibilities,++          -- tyvars+        zonkAndScopedSort,++        -- Kind-checking types+        -- No kind generalisation, no checkValidType+        InitialKindStrategy(..),+        SAKS_or_CUSK(..),+        kcDeclHeader,+        tcNamedWildCardBinders,+        tcHsLiftedType,   tcHsOpenType,+        tcHsLiftedTypeNC, tcHsOpenTypeNC,+        tcLHsType, tcLHsTypeUnsaturated, tcCheckLHsType,+        tcHsMbContext, tcHsContext, tcLHsPredType, tcInferApps,+        failIfEmitsConstraints,+        solveEqualities, -- useful re-export++        typeLevelMode, kindLevelMode,++        kindGeneralizeAll, kindGeneralizeSome, kindGeneralizeNone,+        checkExpectedKind_pp,++        -- Sort-checking kinds+        tcLHsKindSig, checkDataKindSig, DataSort(..),+        checkClassKindSig,++        -- Pattern type signatures+        tcHsPatSigType, tcPatSig,++        -- Error messages+        funAppCtxt, addTyConFlavCtxt+   ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.Hs+import TcRnMonad+import TcOrigin+import Predicate+import Constraint+import TcEvidence+import TcEnv+import TcMType+import TcValidity+import TcUnify+import TcIface+import TcSimplify+import TcHsSyn+import TyCoRep+import TyCoPpr+import TcErrors ( reportAllUnsolved )+import TcType+import Inst   ( tcInstInvisibleTyBinders, tcInstInvisibleTyBinder )+import Type+import TysPrim+import RdrName( lookupLocalRdrOcc )+import Var+import VarSet+import TyCon+import ConLike+import DataCon+import Class+import Name+-- import NameSet+import VarEnv+import TysWiredIn+import BasicTypes+import SrcLoc+import Constants ( mAX_CTUPLE_SIZE )+import ErrUtils( MsgDoc )+import Unique+import UniqSet+import Util+import UniqSupply+import Outputable+import FastString+import PrelNames hiding ( wildCardName )+import DynFlags+import qualified GHC.LanguageExtensions as LangExt++import Maybes+import Data.List ( find )+import Control.Monad++{-+        ----------------------------+                General notes+        ----------------------------++Unlike with expressions, type-checking types both does some checking and+desugars at the same time. This is necessary because we often want to perform+equality checks on the types right away, and it would be incredibly painful+to do this on un-desugared types. Luckily, desugared types are close enough+to HsTypes to make the error messages sane.++During type-checking, we perform as little validity checking as possible.+Generally, after type-checking, you will want to do validity checking, say+with TcValidity.checkValidType.++Validity checking+~~~~~~~~~~~~~~~~~+Some of the validity check could in principle be done by the kind checker,+but not all:++- During desugaring, we normalise by expanding type synonyms.  Only+  after this step can we check things like type-synonym saturation+  e.g.  type T k = k Int+        type S a = a+  Then (T S) is ok, because T is saturated; (T S) expands to (S Int);+  and then S is saturated.  This is a GHC extension.++- Similarly, also a GHC extension, we look through synonyms before complaining+  about the form of a class or instance declaration++- Ambiguity checks involve functional dependencies++Also, in a mutually recursive group of types, we can't look at the TyCon until we've+finished building the loop.  So to keep things simple, we postpone most validity+checking until step (3).++%************************************************************************+%*                                                                      *+              Check types AND do validity checking+*                                                                      *+************************************************************************+-}++funsSigCtxt :: [Located Name] -> UserTypeCtxt+-- Returns FunSigCtxt, with no redundant-context-reporting,+-- form a list of located names+funsSigCtxt (L _ name1 : _) = FunSigCtxt name1 False+funsSigCtxt []              = panic "funSigCtxt"++addSigCtxt :: UserTypeCtxt -> LHsType GhcRn -> TcM a -> TcM a+addSigCtxt ctxt hs_ty thing_inside+  = setSrcSpan (getLoc hs_ty) $+    addErrCtxt (pprSigCtxt ctxt hs_ty) $+    thing_inside++pprSigCtxt :: UserTypeCtxt -> LHsType GhcRn -> SDoc+-- (pprSigCtxt ctxt <extra> <type>)+-- prints    In the type signature for 'f':+--              f :: <type>+-- The <extra> is either empty or "the ambiguity check for"+pprSigCtxt ctxt hs_ty+  | Just n <- isSigMaybe ctxt+  = hang (text "In the type signature:")+       2 (pprPrefixOcc n <+> dcolon <+> ppr hs_ty)++  | otherwise+  = hang (text "In" <+> pprUserTypeCtxt ctxt <> colon)+       2 (ppr hs_ty)++tcHsSigWcType :: UserTypeCtxt -> LHsSigWcType GhcRn -> TcM Type+-- This one is used when we have a LHsSigWcType, but in+-- a place where wildcards aren't allowed. The renamer has+-- already checked this, so we can simply ignore it.+tcHsSigWcType ctxt sig_ty = tcHsSigType ctxt (dropWildCards sig_ty)++kcClassSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM ()+kcClassSigType skol_info names sig_ty+  = discardResult $+    tcClassSigType skol_info names sig_ty+  -- tcClassSigType does a fair amount of extra work that we don't need,+  -- such as ordering quantified variables. But we absolutely do need+  -- to push the level when checking method types and solve local equalities,+  -- and so it seems easier just to call tcClassSigType than selectively+  -- extract the lines of code from tc_hs_sig_type that we really need.+  -- If we don't push the level, we get #16517, where GHC accepts+  --   class C a where+  --     meth :: forall k. Proxy (a :: k) -> ()+  -- Note that k is local to meth -- this is hogwash.++tcClassSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM Type+-- Does not do validity checking+tcClassSigType skol_info names sig_ty+  = addSigCtxt (funsSigCtxt names) (hsSigType sig_ty) $+    snd <$> tc_hs_sig_type skol_info sig_ty (TheKind liftedTypeKind)+       -- Do not zonk-to-Type, nor perform a validity check+       -- We are in a knot with the class and associated types+       -- Zonking and validity checking is done by tcClassDecl+       -- No need to fail here if the type has an error:+       --   If we're in the kind-checking phase, the solveEqualities+       --     in kcTyClGroup catches the error+       --   If we're in the type-checking phase, the solveEqualities+       --     in tcClassDecl1 gets it+       -- Failing fast here degrades the error message in, e.g., tcfail135:+       --   class Foo f where+       --     baa :: f a -> f+       -- If we fail fast, we're told that f has kind `k1` when we wanted `*`.+       -- It should be that f has kind `k2 -> *`, but we never get a chance+       -- to run the solver where the kind of f is touchable. This is+       -- painfully delicate.++tcHsSigType :: UserTypeCtxt -> LHsSigType GhcRn -> TcM Type+-- Does validity checking+-- See Note [Recipe for checking a signature]+tcHsSigType ctxt sig_ty+  = addSigCtxt ctxt (hsSigType sig_ty) $+    do { traceTc "tcHsSigType {" (ppr sig_ty)++          -- Generalise here: see Note [Kind generalisation]+       ; (insol, ty) <- tc_hs_sig_type skol_info sig_ty+                                       (expectedKindInCtxt ctxt)+       ; ty <- zonkTcType ty++       ; when insol failM+       -- See Note [Fail fast if there are insoluble kind equalities] in TcSimplify++       ; checkValidType ctxt ty+       ; traceTc "end tcHsSigType }" (ppr ty)+       ; return ty }+  where+    skol_info = SigTypeSkol ctxt++-- Does validity checking and zonking.+tcStandaloneKindSig :: LStandaloneKindSig GhcRn -> TcM (Name, Kind)+tcStandaloneKindSig (L _ kisig) = case kisig of+  StandaloneKindSig _ (L _ name) ksig ->+    let ctxt = StandaloneKindSigCtxt name in+    addSigCtxt ctxt (hsSigType ksig) $+    do { kind <- tcTopLHsType kindLevelMode ksig (expectedKindInCtxt ctxt)+       ; checkValidType ctxt kind+       ; return (name, kind) }+  XStandaloneKindSig nec -> noExtCon nec++tc_hs_sig_type :: SkolemInfo -> LHsSigType GhcRn+               -> ContextKind -> TcM (Bool, TcType)+-- Kind-checks/desugars an 'LHsSigType',+--   solve equalities,+--   and then kind-generalizes.+-- This will never emit constraints, as it uses solveEqualities interally.+-- No validity checking or zonking+-- Returns also a Bool indicating whether the type induced an insoluble constraint;+-- True <=> constraint is insoluble+tc_hs_sig_type skol_info hs_sig_type ctxt_kind+  | HsIB { hsib_ext = sig_vars, hsib_body = hs_ty } <- hs_sig_type+  = do { (tc_lvl, (wanted, (spec_tkvs, ty)))+              <- pushTcLevelM                           $+                 solveLocalEqualitiesX "tc_hs_sig_type" $+                 bindImplicitTKBndrs_Skol sig_vars      $+                 do { kind <- newExpectedKind ctxt_kind+                    ; tc_lhs_type typeLevelMode hs_ty kind }+       -- Any remaining variables (unsolved in the solveLocalEqualities)+       -- should be in the global tyvars, and therefore won't be quantified++       ; spec_tkvs <- zonkAndScopedSort spec_tkvs+       ; let ty1 = mkSpecForAllTys spec_tkvs ty++       -- This bit is very much like decideMonoTyVars in TcSimplify,+       -- but constraints are so much simpler in kinds, it is much+       -- easier here. (In particular, we never quantify over a+       -- constraint in a type.)+       ; constrained <- zonkTyCoVarsAndFV (tyCoVarsOfWC wanted)+       ; let should_gen = not . (`elemVarSet` constrained)++       ; kvs <- kindGeneralizeSome should_gen ty1+       ; emitResidualTvConstraint skol_info Nothing (kvs ++ spec_tkvs)+                                  tc_lvl wanted++       ; return (insolubleWC wanted, mkInvForAllTys kvs ty1) }++tc_hs_sig_type _ (XHsImplicitBndrs nec) _ = noExtCon nec++tcTopLHsType :: TcTyMode -> LHsSigType GhcRn -> ContextKind -> TcM Type+-- tcTopLHsType is used for kind-checking top-level HsType where+--   we want to fully solve /all/ equalities, and report errors+-- Does zonking, but not validity checking because it's used+--   for things (like deriving and instances) that aren't+--   ordinary types+tcTopLHsType mode hs_sig_type ctxt_kind+  | HsIB { hsib_ext = sig_vars, hsib_body = hs_ty } <- hs_sig_type+  = do { traceTc "tcTopLHsType {" (ppr hs_ty)+       ; (spec_tkvs, ty)+              <- pushTcLevelM_                     $+                 solveEqualities                   $+                 bindImplicitTKBndrs_Skol sig_vars $+                 do { kind <- newExpectedKind ctxt_kind+                    ; tc_lhs_type mode hs_ty kind }++       ; spec_tkvs <- zonkAndScopedSort spec_tkvs+       ; let ty1 = mkSpecForAllTys spec_tkvs ty+       ; kvs <- kindGeneralizeAll ty1  -- "All" because it's a top-level type+       ; final_ty <- zonkTcTypeToType (mkInvForAllTys kvs ty1)+       ; traceTc "End tcTopLHsType }" (vcat [ppr hs_ty, ppr final_ty])+       ; return final_ty}++tcTopLHsType _ (XHsImplicitBndrs nec) _ = noExtCon nec++-----------------+tcHsDeriv :: LHsSigType GhcRn -> TcM ([TyVar], Class, [Type], [Kind])+-- Like tcHsSigType, but for the ...deriving( C t1 ty2 ) clause+-- Returns the C, [ty1, ty2, and the kinds of C's remaining arguments+-- E.g.    class C (a::*) (b::k->k)+--         data T a b = ... deriving( C Int )+--    returns ([k], C, [k, Int], [k->k])+-- Return values are fully zonked+tcHsDeriv hs_ty+  = do { ty <- checkNoErrs $  -- Avoid redundant error report+                              -- with "illegal deriving", below+               tcTopLHsType typeLevelMode hs_ty AnyKind+       ; let (tvs, pred)    = splitForAllTys ty+             (kind_args, _) = splitFunTys (tcTypeKind pred)+       ; case getClassPredTys_maybe pred of+           Just (cls, tys) -> return (tvs, cls, tys, kind_args)+           Nothing -> failWithTc (text "Illegal deriving item" <+> quotes (ppr hs_ty)) }++-- | Typecheck a deriving strategy. For most deriving strategies, this is a+-- no-op, but for the @via@ strategy, this requires typechecking the @via@ type.+tcDerivStrategy ::+     Maybe (LDerivStrategy GhcRn)+     -- ^ The deriving strategy+  -> TcM (Maybe (LDerivStrategy GhcTc), [TyVar])+     -- ^ The typechecked deriving strategy and the tyvars that it binds+     -- (if using 'ViaStrategy').+tcDerivStrategy mb_lds+  = case mb_lds of+      Nothing -> boring_case Nothing+      Just (dL->L loc ds) ->+        setSrcSpan loc $ do+          (ds', tvs) <- tc_deriv_strategy ds+          pure (Just (cL loc ds'), tvs)+  where+    tc_deriv_strategy :: DerivStrategy GhcRn+                      -> TcM (DerivStrategy GhcTc, [TyVar])+    tc_deriv_strategy StockStrategy    = boring_case StockStrategy+    tc_deriv_strategy AnyclassStrategy = boring_case AnyclassStrategy+    tc_deriv_strategy NewtypeStrategy  = boring_case NewtypeStrategy+    tc_deriv_strategy (ViaStrategy ty) = do+      ty' <- checkNoErrs $ tcTopLHsType typeLevelMode ty AnyKind+      let (via_tvs, via_pred) = splitForAllTys ty'+      pure (ViaStrategy via_pred, via_tvs)++    boring_case :: ds -> TcM (ds, [TyVar])+    boring_case ds = pure (ds, [])++tcHsClsInstType :: UserTypeCtxt    -- InstDeclCtxt or SpecInstCtxt+                -> LHsSigType GhcRn+                -> TcM Type+-- Like tcHsSigType, but for a class instance declaration+tcHsClsInstType user_ctxt hs_inst_ty+  = setSrcSpan (getLoc (hsSigType hs_inst_ty)) $+    do { -- Fail eagerly if tcTopLHsType fails.  We are at top level so+         -- these constraints will never be solved later. And failing+         -- eagerly avoids follow-on errors when checkValidInstance+         -- sees an unsolved coercion hole+         inst_ty <- checkNoErrs $+                    tcTopLHsType typeLevelMode hs_inst_ty (TheKind constraintKind)+       ; checkValidInstance user_ctxt hs_inst_ty inst_ty+       ; return inst_ty }++----------------------------------------------+-- | Type-check a visible type application+tcHsTypeApp :: LHsWcType GhcRn -> Kind -> TcM Type+-- See Note [Recipe for checking a signature] in TcHsType+tcHsTypeApp wc_ty kind+  | HsWC { hswc_ext = sig_wcs, hswc_body = hs_ty } <- wc_ty+  = do { ty <- solveLocalEqualities "tcHsTypeApp" $+               -- We are looking at a user-written type, very like a+               -- signature so we want to solve its equalities right now+               unsetWOptM Opt_WarnPartialTypeSignatures $+               setXOptM LangExt.PartialTypeSignatures $+               -- See Note [Wildcards in visible type application]+               tcNamedWildCardBinders sig_wcs $ \ _ ->+               tcCheckLHsType hs_ty kind+       -- We do not kind-generalize type applications: we just+       -- instantiate with exactly what the user says.+       -- See Note [No generalization in type application]+       -- We still must call kindGeneralizeNone, though, according+       -- to Note [Recipe for checking a signature]+       ; kindGeneralizeNone ty+       ; ty <- zonkTcType ty+       ; checkValidType TypeAppCtxt ty+       ; return ty }+tcHsTypeApp (XHsWildCardBndrs nec) _ = noExtCon nec++{- Note [Wildcards in visible type application]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A HsWildCardBndrs's hswc_ext now only includes /named/ wildcards, so+any unnamed wildcards stay unchanged in hswc_body.  When called in+tcHsTypeApp, tcCheckLHsType will call emitAnonWildCardHoleConstraint+on these anonymous wildcards. However, this would trigger+error/warning when an anonymous wildcard is passed in as a visible type+argument, which we do not want because users should be able to write+@_ to skip a instantiating a type variable variable without fuss. The+solution is to switch the PartialTypeSignatures flags here to let the+typechecker know that it's checking a '@_' and do not emit hole+constraints on it.  See related Note [Wildcards in visible kind+application] and Note [The wildcard story for types] in GHC.Hs.Types++Ugh!++Note [No generalization in type application]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We do not kind-generalize type applications. Imagine++  id @(Proxy Nothing)++If we kind-generalized, we would get++  id @(forall {k}. Proxy @(Maybe k) (Nothing @k))++which is very sneakily impredicative instantiation.++There is also the possibility of mentioning a wildcard+(`id @(Proxy _)`), which definitely should not be kind-generalized.++-}++{-+************************************************************************+*                                                                      *+            The main kind checker: no validity checks here+*                                                                      *+************************************************************************+-}++---------------------------+tcHsOpenType, tcHsLiftedType,+  tcHsOpenTypeNC, tcHsLiftedTypeNC :: LHsType GhcRn -> TcM TcType+-- Used for type signatures+-- Do not do validity checking+tcHsOpenType ty   = addTypeCtxt ty $ tcHsOpenTypeNC ty+tcHsLiftedType ty = addTypeCtxt ty $ tcHsLiftedTypeNC ty++tcHsOpenTypeNC   ty = do { ek <- newOpenTypeKind+                         ; tc_lhs_type typeLevelMode ty ek }+tcHsLiftedTypeNC ty = tc_lhs_type typeLevelMode ty liftedTypeKind++-- Like tcHsType, but takes an expected kind+tcCheckLHsType :: LHsType GhcRn -> Kind -> TcM TcType+tcCheckLHsType hs_ty exp_kind+  = addTypeCtxt hs_ty $+    tc_lhs_type typeLevelMode hs_ty exp_kind++tcLHsType :: LHsType GhcRn -> TcM (TcType, TcKind)+-- Called from outside: set the context+tcLHsType ty = addTypeCtxt ty (tc_infer_lhs_type typeLevelMode ty)++-- Like tcLHsType, but use it in a context where type synonyms and type families+-- do not need to be saturated, like in a GHCi :kind call+tcLHsTypeUnsaturated :: LHsType GhcRn -> TcM (TcType, TcKind)+tcLHsTypeUnsaturated hs_ty+  | Just (hs_fun_ty, hs_args) <- splitHsAppTys (unLoc hs_ty)+  = addTypeCtxt hs_ty $+    do { (fun_ty, _ki) <- tcInferAppHead mode hs_fun_ty+       ; tcInferApps_nosat mode hs_fun_ty fun_ty hs_args }+         -- Notice the 'nosat'; do not instantiate trailing+         -- invisible arguments of a type family.+         -- See Note [Dealing with :kind]++  | otherwise+  = addTypeCtxt hs_ty $+    tc_infer_lhs_type mode hs_ty++  where+    mode = typeLevelMode++{- Note [Dealing with :kind]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this GHCi command+  ghci> type family F :: Either j k+  ghci> :kind F+  F :: forall {j,k}. Either j k++We will only get the 'forall' if we /refrain/ from saturating those+invisible binders. But generally we /do/ saturate those invisible+binders (see tcInferApps), and we want to do so for nested application+even in GHCi.  Consider for example (#16287)+  ghci> type family F :: k+  ghci> data T :: (forall k. k) -> Type+  ghci> :kind T F+We want to reject this. It's just at the very top level that we want+to switch off saturation.++So tcLHsTypeUnsaturated does a little special case for top level+applications.  Actually the common case is a bare variable, as above.+++************************************************************************+*                                                                      *+      Type-checking modes+*                                                                      *+************************************************************************++The kind-checker is parameterised by a TcTyMode, which contains some+information about where we're checking a type.++The renamer issues errors about what it can. All errors issued here must+concern things that the renamer can't handle.++-}++-- | Info about the context in which we're checking a type. Currently,+-- differentiates only between types and kinds, but this will likely+-- grow, at least to include the distinction between patterns and+-- not-patterns.+--+-- To find out where the mode is used, search for 'mode_level'+data TcTyMode = TcTyMode { mode_level :: TypeOrKind }++typeLevelMode :: TcTyMode+typeLevelMode = TcTyMode { mode_level = TypeLevel }++kindLevelMode :: TcTyMode+kindLevelMode = TcTyMode { mode_level = KindLevel }++-- switch to kind level+kindLevel :: TcTyMode -> TcTyMode+kindLevel mode = mode { mode_level = KindLevel }++instance Outputable TcTyMode where+  ppr = ppr . mode_level++{-+Note [Bidirectional type checking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In expressions, whenever we see a polymorphic identifier, say `id`, we are+free to instantiate it with metavariables, knowing that we can always+re-generalize with type-lambdas when necessary. For example:++  rank2 :: (forall a. a -> a) -> ()+  x = rank2 id++When checking the body of `x`, we can instantiate `id` with a metavariable.+Then, when we're checking the application of `rank2`, we notice that we really+need a polymorphic `id`, and then re-generalize over the unconstrained+metavariable.++In types, however, we're not so lucky, because *we cannot re-generalize*!+There is no lambda. So, we must be careful only to instantiate at the last+possible moment, when we're sure we're never going to want the lost polymorphism+again. This is done in calls to tcInstInvisibleTyBinders.++To implement this behavior, we use bidirectional type checking, where we+explicitly think about whether we know the kind of the type we're checking+or not. Note that there is a difference between not knowing a kind and+knowing a metavariable kind: the metavariables are TauTvs, and cannot become+forall-quantified kinds. Previously (before dependent types), there were+no higher-rank kinds, and so we could instantiate early and be sure that+no types would have polymorphic kinds, and so we could always assume that+the kind of a type was a fresh metavariable. Not so anymore, thus the+need for two algorithms.++For HsType forms that can never be kind-polymorphic, we implement only the+"down" direction, where we safely assume a metavariable kind. For HsType forms+that *can* be kind-polymorphic, we implement just the "up" (functions with+"infer" in their name) version, as we gain nothing by also implementing the+"down" version.++Note [Future-proofing the type checker]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As discussed in Note [Bidirectional type checking], each HsType form is+handled in *either* tc_infer_hs_type *or* tc_hs_type. These functions+are mutually recursive, so that either one can work for any type former.+But, we want to make sure that our pattern-matches are complete. So,+we have a bunch of repetitive code just so that we get warnings if we're+missing any patterns.++-}++------------------------------------------+-- | Check and desugar a type, returning the core type and its+-- possibly-polymorphic kind. Much like 'tcInferRho' at the expression+-- level.+tc_infer_lhs_type :: TcTyMode -> LHsType GhcRn -> TcM (TcType, TcKind)+tc_infer_lhs_type mode (L span ty)+  = setSrcSpan span $+    tc_infer_hs_type mode ty++---------------------------+-- | Call 'tc_infer_hs_type' and check its result against an expected kind.+tc_infer_hs_type_ek :: HasDebugCallStack => TcTyMode -> HsType GhcRn -> TcKind -> TcM TcType+tc_infer_hs_type_ek mode hs_ty ek+  = do { (ty, k) <- tc_infer_hs_type mode hs_ty+       ; checkExpectedKind hs_ty ty k ek }++---------------------------+-- | Infer the kind of a type and desugar. This is the "up" type-checker,+-- as described in Note [Bidirectional type checking]+tc_infer_hs_type :: TcTyMode -> HsType GhcRn -> TcM (TcType, TcKind)++tc_infer_hs_type mode (HsParTy _ t)+  = tc_infer_lhs_type mode t++tc_infer_hs_type mode ty+  | Just (hs_fun_ty, hs_args) <- splitHsAppTys ty+  = do { (fun_ty, _ki) <- tcInferAppHead mode hs_fun_ty+       ; tcInferApps mode hs_fun_ty fun_ty hs_args }++tc_infer_hs_type mode (HsKindSig _ ty sig)+  = do { sig' <- tcLHsKindSig KindSigCtxt sig+                 -- We must typecheck the kind signature, and solve all+                 -- its equalities etc; from this point on we may do+                 -- things like instantiate its foralls, so it needs+                 -- to be fully determined (#14904)+       ; traceTc "tc_infer_hs_type:sig" (ppr ty $$ ppr sig')+       ; ty' <- tc_lhs_type mode ty sig'+       ; return (ty', sig') }++-- HsSpliced is an annotation produced by 'RnSplice.rnSpliceType' to communicate+-- the splice location to the typechecker. Here we skip over it in order to have+-- the same kind inferred for a given expression whether it was produced from+-- splices or not.+--+-- See Note [Delaying modFinalizers in untyped splices].+tc_infer_hs_type mode (HsSpliceTy _ (HsSpliced _ _ (HsSplicedTy ty)))+  = tc_infer_hs_type mode ty++tc_infer_hs_type mode (HsDocTy _ ty _) = tc_infer_lhs_type mode ty+tc_infer_hs_type _    (XHsType (NHsCoreTy ty))+  = return (ty, tcTypeKind ty)++tc_infer_hs_type _ (HsExplicitListTy _ _ tys)+  | null tys  -- this is so that we can use visible kind application with '[]+              -- e.g ... '[] @Bool+  = return (mkTyConTy promotedNilDataCon,+            mkSpecForAllTys [alphaTyVar] $ mkListTy alphaTy)++tc_infer_hs_type mode other_ty+  = do { kv <- newMetaKindVar+       ; ty' <- tc_hs_type mode other_ty kv+       ; return (ty', kv) }++------------------------------------------+tc_lhs_type :: TcTyMode -> LHsType GhcRn -> TcKind -> TcM TcType+tc_lhs_type mode (L span ty) exp_kind+  = setSrcSpan span $+    tc_hs_type mode ty exp_kind++tc_hs_type :: TcTyMode -> HsType GhcRn -> TcKind -> TcM TcType+-- See Note [Bidirectional type checking]++tc_hs_type mode (HsParTy _ ty)   exp_kind = tc_lhs_type mode ty exp_kind+tc_hs_type mode (HsDocTy _ ty _) exp_kind = tc_lhs_type mode ty exp_kind+tc_hs_type _ ty@(HsBangTy _ bang _) _+    -- While top-level bangs at this point are eliminated (eg !(Maybe Int)),+    -- other kinds of bangs are not (eg ((!Maybe) Int)). These kinds of+    -- bangs are invalid, so fail. (#7210, #14761)+    = do { let bangError err = failWith $+                 text "Unexpected" <+> text err <+> text "annotation:" <+> ppr ty $$+                 text err <+> text "annotation cannot appear nested inside a type"+         ; case bang of+             HsSrcBang _ SrcUnpack _           -> bangError "UNPACK"+             HsSrcBang _ SrcNoUnpack _         -> bangError "NOUNPACK"+             HsSrcBang _ NoSrcUnpack SrcLazy   -> bangError "laziness"+             HsSrcBang _ _ _                   -> bangError "strictness" }+tc_hs_type _ ty@(HsRecTy {})      _+      -- Record types (which only show up temporarily in constructor+      -- signatures) should have been removed by now+    = failWithTc (text "Record syntax is illegal here:" <+> ppr ty)++-- HsSpliced is an annotation produced by 'RnSplice.rnSpliceType'.+-- Here we get rid of it and add the finalizers to the global environment+-- while capturing the local environment.+--+-- See Note [Delaying modFinalizers in untyped splices].+tc_hs_type mode (HsSpliceTy _ (HsSpliced _ mod_finalizers (HsSplicedTy ty)))+           exp_kind+  = do addModFinalizersWithLclEnv mod_finalizers+       tc_hs_type mode ty exp_kind++-- This should never happen; type splices are expanded by the renamer+tc_hs_type _ ty@(HsSpliceTy {}) _exp_kind+  = failWithTc (text "Unexpected type splice:" <+> ppr ty)++---------- Functions and applications+tc_hs_type mode (HsFunTy _ ty1 ty2) exp_kind+  = tc_fun_type mode ty1 ty2 exp_kind++tc_hs_type mode (HsOpTy _ ty1 (L _ op) ty2) exp_kind+  | op `hasKey` funTyConKey+  = tc_fun_type mode ty1 ty2 exp_kind++--------- Foralls+tc_hs_type mode forall@(HsForAllTy { hst_fvf = fvf, hst_bndrs = hs_tvs+                                   , hst_body = ty }) exp_kind+  = do { (tclvl, wanted, (tvs', ty'))+            <- pushLevelAndCaptureConstraints $+               bindExplicitTKBndrs_Skol hs_tvs $+               tc_lhs_type mode ty exp_kind+    -- Do not kind-generalise here!  See Note [Kind generalisation]+    -- Why exp_kind?  See Note [Body kind of HsForAllTy]+       ; let argf        = case fvf of+                             ForallVis   -> Required+                             ForallInvis -> Specified+             bndrs       = mkTyVarBinders argf tvs'+             skol_info   = ForAllSkol (ppr forall)+             m_telescope = Just (sep (map ppr hs_tvs))++       ; emitResidualTvConstraint skol_info m_telescope tvs' tclvl wanted++       ; return (mkForAllTys bndrs ty') }++tc_hs_type mode (HsQualTy { hst_ctxt = ctxt, hst_body = rn_ty }) exp_kind+  | null (unLoc ctxt)+  = tc_lhs_type mode rn_ty exp_kind++  -- See Note [Body kind of a HsQualTy]+  | tcIsConstraintKind exp_kind+  = do { ctxt' <- tc_hs_context mode ctxt+       ; ty'   <- tc_lhs_type mode rn_ty constraintKind+       ; return (mkPhiTy ctxt' ty') }++  | otherwise+  = do { ctxt' <- tc_hs_context mode ctxt++       ; ek <- newOpenTypeKind  -- The body kind (result of the function) can+                                -- be TYPE r, for any r, hence newOpenTypeKind+       ; ty' <- tc_lhs_type mode rn_ty ek+       ; checkExpectedKind (unLoc rn_ty) (mkPhiTy ctxt' ty')+                           liftedTypeKind exp_kind }++--------- Lists, arrays, and tuples+tc_hs_type mode rn_ty@(HsListTy _ elt_ty) exp_kind+  = do { tau_ty <- tc_lhs_type mode elt_ty liftedTypeKind+       ; checkWiredInTyCon listTyCon+       ; checkExpectedKind rn_ty (mkListTy tau_ty) liftedTypeKind exp_kind }++-- See Note [Distinguishing tuple kinds] in GHC.Hs.Types+-- See Note [Inferring tuple kinds]+tc_hs_type mode rn_ty@(HsTupleTy _ HsBoxedOrConstraintTuple hs_tys) exp_kind+     -- (NB: not zonking before looking at exp_k, to avoid left-right bias)+  | Just tup_sort <- tupKindSort_maybe exp_kind+  = traceTc "tc_hs_type tuple" (ppr hs_tys) >>+    tc_tuple rn_ty mode tup_sort hs_tys exp_kind+  | otherwise+  = do { traceTc "tc_hs_type tuple 2" (ppr hs_tys)+       ; (tys, kinds) <- mapAndUnzipM (tc_infer_lhs_type mode) hs_tys+       ; kinds <- mapM zonkTcType kinds+           -- Infer each arg type separately, because errors can be+           -- confusing if we give them a shared kind.  Eg #7410+           -- (Either Int, Int), we do not want to get an error saying+           -- "the second argument of a tuple should have kind *->*"++       ; let (arg_kind, tup_sort)+               = case [ (k,s) | k <- kinds+                              , Just s <- [tupKindSort_maybe k] ] of+                    ((k,s) : _) -> (k,s)+                    [] -> (liftedTypeKind, BoxedTuple)+         -- In the [] case, it's not clear what the kind is, so guess *++       ; tys' <- sequence [ setSrcSpan loc $+                            checkExpectedKind hs_ty ty kind arg_kind+                          | ((L loc hs_ty),ty,kind) <- zip3 hs_tys tys kinds ]++       ; finish_tuple rn_ty tup_sort tys' (map (const arg_kind) tys') exp_kind }+++tc_hs_type mode rn_ty@(HsTupleTy _ hs_tup_sort tys) exp_kind+  = tc_tuple rn_ty mode tup_sort tys exp_kind+  where+    tup_sort = case hs_tup_sort of  -- Fourth case dealt with above+                  HsUnboxedTuple    -> UnboxedTuple+                  HsBoxedTuple      -> BoxedTuple+                  HsConstraintTuple -> ConstraintTuple+                  _                 -> panic "tc_hs_type HsTupleTy"++tc_hs_type mode rn_ty@(HsSumTy _ hs_tys) exp_kind+  = do { let arity = length hs_tys+       ; arg_kinds <- mapM (\_ -> newOpenTypeKind) hs_tys+       ; tau_tys   <- zipWithM (tc_lhs_type mode) hs_tys arg_kinds+       ; let arg_reps = map kindRep arg_kinds+             arg_tys  = arg_reps ++ tau_tys+             sum_ty   = mkTyConApp (sumTyCon arity) arg_tys+             sum_kind = unboxedSumKind arg_reps+       ; checkExpectedKind rn_ty sum_ty sum_kind exp_kind+       }++--------- Promoted lists and tuples+tc_hs_type mode rn_ty@(HsExplicitListTy _ _ tys) exp_kind+  = do { tks <- mapM (tc_infer_lhs_type mode) tys+       ; (taus', kind) <- unifyKinds tys tks+       ; let ty = (foldr (mk_cons kind) (mk_nil kind) taus')+       ; checkExpectedKind rn_ty ty (mkListTy kind) exp_kind }+  where+    mk_cons k a b = mkTyConApp (promoteDataCon consDataCon) [k, a, b]+    mk_nil  k     = mkTyConApp (promoteDataCon nilDataCon) [k]++tc_hs_type mode rn_ty@(HsExplicitTupleTy _ tys) exp_kind+  -- using newMetaKindVar means that we force instantiations of any polykinded+  -- types. At first, I just used tc_infer_lhs_type, but that led to #11255.+  = do { ks   <- replicateM arity newMetaKindVar+       ; taus <- zipWithM (tc_lhs_type mode) tys ks+       ; let kind_con   = tupleTyCon           Boxed arity+             ty_con     = promotedTupleDataCon Boxed arity+             tup_k      = mkTyConApp kind_con ks+       ; checkExpectedKind rn_ty (mkTyConApp ty_con (ks ++ taus)) tup_k exp_kind }+  where+    arity = length tys++--------- Constraint types+tc_hs_type mode rn_ty@(HsIParamTy _ (L _ n) ty) exp_kind+  = do { MASSERT( isTypeLevel (mode_level mode) )+       ; ty' <- tc_lhs_type mode ty liftedTypeKind+       ; let n' = mkStrLitTy $ hsIPNameFS n+       ; ipClass <- tcLookupClass ipClassName+       ; checkExpectedKind rn_ty (mkClassPred ipClass [n',ty'])+                           constraintKind exp_kind }++tc_hs_type _ rn_ty@(HsStarTy _ _) exp_kind+  -- Desugaring 'HsStarTy' to 'Data.Kind.Type' here means that we don't have to+  -- handle it in 'coreView' and 'tcView'.+  = checkExpectedKind rn_ty liftedTypeKind liftedTypeKind exp_kind++--------- Literals+tc_hs_type _ rn_ty@(HsTyLit _ (HsNumTy _ n)) exp_kind+  = do { checkWiredInTyCon typeNatKindCon+       ; checkExpectedKind rn_ty (mkNumLitTy n) typeNatKind exp_kind }++tc_hs_type _ rn_ty@(HsTyLit _ (HsStrTy _ s)) exp_kind+  = do { checkWiredInTyCon typeSymbolKindCon+       ; checkExpectedKind rn_ty (mkStrLitTy s) typeSymbolKind exp_kind }++--------- Potentially kind-polymorphic types: call the "up" checker+-- See Note [Future-proofing the type checker]+tc_hs_type mode ty@(HsTyVar {})            ek = tc_infer_hs_type_ek mode ty ek+tc_hs_type mode ty@(HsAppTy {})            ek = tc_infer_hs_type_ek mode ty ek+tc_hs_type mode ty@(HsAppKindTy{})         ek = tc_infer_hs_type_ek mode ty ek+tc_hs_type mode ty@(HsOpTy {})             ek = tc_infer_hs_type_ek mode ty ek+tc_hs_type mode ty@(HsKindSig {})          ek = tc_infer_hs_type_ek mode ty ek+tc_hs_type mode ty@(XHsType (NHsCoreTy{})) ek = tc_infer_hs_type_ek mode ty ek+tc_hs_type _    wc@(HsWildCardTy _)        ek = tcAnonWildCardOcc wc ek++------------------------------------------+tc_fun_type :: TcTyMode -> LHsType GhcRn -> LHsType GhcRn -> TcKind+            -> TcM TcType+tc_fun_type mode ty1 ty2 exp_kind = case mode_level mode of+  TypeLevel ->+    do { arg_k <- newOpenTypeKind+       ; res_k <- newOpenTypeKind+       ; ty1' <- tc_lhs_type mode ty1 arg_k+       ; ty2' <- tc_lhs_type mode ty2 res_k+       ; checkExpectedKind (HsFunTy noExtField ty1 ty2) (mkVisFunTy ty1' ty2')+                           liftedTypeKind exp_kind }+  KindLevel ->  -- no representation polymorphism in kinds. yet.+    do { ty1' <- tc_lhs_type mode ty1 liftedTypeKind+       ; ty2' <- tc_lhs_type mode ty2 liftedTypeKind+       ; checkExpectedKind (HsFunTy noExtField ty1 ty2) (mkVisFunTy ty1' ty2')+                           liftedTypeKind exp_kind }++---------------------------+tcAnonWildCardOcc :: HsType GhcRn -> Kind -> TcM TcType+tcAnonWildCardOcc wc exp_kind+  = do { wc_tv <- newWildTyVar  -- The wildcard's kind will be an un-filled-in meta tyvar++       ; part_tysig <- xoptM LangExt.PartialTypeSignatures+       ; warning <- woptM Opt_WarnPartialTypeSignatures++       ; unless (part_tysig && not warning) $+         emitAnonWildCardHoleConstraint wc_tv+         -- Why the 'unless' guard?+         -- See Note [Wildcards in visible kind application]++       ; checkExpectedKind wc (mkTyVarTy wc_tv)+                           (tyVarKind wc_tv) exp_kind }++{- Note [Wildcards in visible kind application]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There are cases where users might want to pass in a wildcard as a visible kind+argument, for instance:++data T :: forall k1 k2. k1 → k2 → Type where+  MkT :: T a b+x :: T @_ @Nat False n+x = MkT++So we should allow '@_' without emitting any hole constraints, and+regardless of whether PartialTypeSignatures is enabled or not. But how would+the typechecker know which '_' is being used in VKA and which is not when it+calls emitNamedWildCardHoleConstraints in tcHsPartialSigType on all HsWildCardBndrs?+The solution then is to neither rename nor include unnamed wildcards in HsWildCardBndrs,+but instead give every anonymous wildcard a fresh wild tyvar in tcAnonWildCardOcc.+And whenever we see a '@', we automatically turn on PartialTypeSignatures and+turn off hole constraint warnings, and do not call emitAnonWildCardHoleConstraint+under these conditions.+See related Note [Wildcards in visible type application] here and+Note [The wildcard story for types] in GHC.Hs.Types++-}++{- *********************************************************************+*                                                                      *+                Tuples+*                                                                      *+********************************************************************* -}++---------------------------+tupKindSort_maybe :: TcKind -> Maybe TupleSort+tupKindSort_maybe k+  | Just (k', _) <- splitCastTy_maybe k = tupKindSort_maybe k'+  | Just k'      <- tcView k            = tupKindSort_maybe k'+  | tcIsConstraintKind k = Just ConstraintTuple+  | tcIsLiftedTypeKind k   = Just BoxedTuple+  | otherwise            = Nothing++tc_tuple :: HsType GhcRn -> TcTyMode -> TupleSort -> [LHsType GhcRn] -> TcKind -> TcM TcType+tc_tuple rn_ty mode tup_sort tys exp_kind+  = do { arg_kinds <- case tup_sort of+           BoxedTuple      -> return (replicate arity liftedTypeKind)+           UnboxedTuple    -> replicateM arity newOpenTypeKind+           ConstraintTuple -> return (replicate arity constraintKind)+       ; tau_tys <- zipWithM (tc_lhs_type mode) tys arg_kinds+       ; finish_tuple rn_ty tup_sort tau_tys arg_kinds exp_kind }+  where+    arity   = length tys++finish_tuple :: HsType GhcRn+             -> TupleSort+             -> [TcType]    -- ^ argument types+             -> [TcKind]    -- ^ of these kinds+             -> TcKind      -- ^ expected kind of the whole tuple+             -> TcM TcType+finish_tuple rn_ty tup_sort tau_tys tau_kinds exp_kind = do+  traceTc "finish_tuple" (ppr tup_sort $$ ppr tau_kinds $$ ppr exp_kind)+  case tup_sort of+    ConstraintTuple+      |  [tau_ty] <- tau_tys+         -- Drop any uses of 1-tuple constraints here.+         -- See Note [Ignore unary constraint tuples]+      -> check_expected_kind tau_ty constraintKind+      |  arity > mAX_CTUPLE_SIZE+      -> failWith (bigConstraintTuple arity)+      |  otherwise+      -> do tycon <- tcLookupTyCon (cTupleTyConName arity)+            check_expected_kind (mkTyConApp tycon tau_tys) constraintKind+    BoxedTuple -> do+      let tycon = tupleTyCon Boxed arity+      checkWiredInTyCon tycon+      check_expected_kind (mkTyConApp tycon tau_tys) liftedTypeKind+    UnboxedTuple ->+      let tycon    = tupleTyCon Unboxed arity+          tau_reps = map kindRep tau_kinds+          -- See also Note [Unboxed tuple RuntimeRep vars] in TyCon+          arg_tys  = tau_reps ++ tau_tys+          res_kind = unboxedTupleKind tau_reps in+      check_expected_kind (mkTyConApp tycon arg_tys) res_kind+  where+    arity = length tau_tys+    check_expected_kind ty act_kind =+      checkExpectedKind rn_ty ty act_kind exp_kind++bigConstraintTuple :: Arity -> MsgDoc+bigConstraintTuple arity+  = hang (text "Constraint tuple arity too large:" <+> int arity+          <+> parens (text "max arity =" <+> int mAX_CTUPLE_SIZE))+       2 (text "Instead, use a nested tuple")++{-+Note [Ignore unary constraint tuples]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC provides unary tuples and unboxed tuples (see Note [One-tuples] in+TysWiredIn) but does *not* provide unary constraint tuples. Why? First,+recall the definition of a unary tuple data type:++  data Unit a = Unit a++Note that `Unit a` is *not* the same thing as `a`, since Unit is boxed and+lazy. Therefore, the presence of `Unit` matters semantically. On the other+hand, suppose we had a unary constraint tuple:++  class a => Unit% a++This compiles down a newtype (i.e., a cast) in Core, so `Unit% a` is+semantically equivalent to `a`. Therefore, a 1-tuple constraint would have+no user-visible impact, nor would it allow you to express anything that+you couldn't otherwise.++We could simply add Unit% for consistency with tuples (Unit) and unboxed+tuples (Unit#), but that would require even more magic to wire in another+magical class, so we opt not to do so. We must be careful, however, since+one can try to sneak in uses of unary constraint tuples through Template+Haskell, such as in this program (from #17511):++  f :: $(pure (ForallT [] [TupleT 1 `AppT` (ConT ''Show `AppT` ConT ''Int)]+                       (ConT ''String)))+  -- f :: Unit% (Show Int) => String+  f = "abc"++This use of `TupleT 1` will produce an HsBoxedOrConstraintTuple of arity 1,+and since it is used in a Constraint position, GHC will attempt to treat+it as thought it were a constraint tuple, which can potentially lead to+trouble if one attempts to look up the name of a constraint tuple of arity+1 (as it won't exist). To avoid this trouble, we simply take any unary+constraint tuples discovered when typechecking and drop them—i.e., treat+"Unit% a" as though the user had written "a". This is always safe to do+since the two constraints should be semantically equivalent.+-}++{- *********************************************************************+*                                                                      *+                Type applications+*                                                                      *+********************************************************************* -}++splitHsAppTys :: HsType GhcRn -> Maybe (LHsType GhcRn, [LHsTypeArg GhcRn])+splitHsAppTys hs_ty+  | is_app hs_ty = Just (go (noLoc hs_ty) [])+  | otherwise    = Nothing+  where+    is_app :: HsType GhcRn -> Bool+    is_app (HsAppKindTy {})        = True+    is_app (HsAppTy {})            = True+    is_app (HsOpTy _ _ (L _ op) _) = not (op `hasKey` funTyConKey)+      -- I'm not sure why this funTyConKey test is necessary+      -- Can it even happen?  Perhaps for   t1 `(->)` t2+      -- but then maybe it's ok to treat that like a normal+      -- application rather than using the special rule for HsFunTy+    is_app (HsTyVar {})            = True+    is_app (HsParTy _ (L _ ty))    = is_app ty+    is_app _                       = False++    go (L _  (HsAppTy _ f a))      as = go f (HsValArg a : as)+    go (L _  (HsAppKindTy l ty k)) as = go ty (HsTypeArg l k : as)+    go (L sp (HsParTy _ f))        as = go f (HsArgPar sp : as)+    go (L _  (HsOpTy _ l op@(L sp _) r)) as+      = ( L sp (HsTyVar noExtField NotPromoted op)+        , HsValArg l : HsValArg r : as )+    go f as = (f, as)++---------------------------+tcInferAppHead :: TcTyMode -> LHsType GhcRn -> TcM (TcType, TcKind)+-- Version of tc_infer_lhs_type specialised for the head of an+-- application. In particular, for a HsTyVar (which includes type+-- constructors, it does not zoom off into tcInferApps and family+-- saturation+tcInferAppHead mode (L _ (HsTyVar _ _ (L _ tv)))+  = tcTyVar mode tv+tcInferAppHead mode ty+  = tc_infer_lhs_type mode ty++---------------------------+-- | Apply a type of a given kind to a list of arguments. This instantiates+-- invisible parameters as necessary. Always consumes all the arguments,+-- using matchExpectedFunKind as necessary.+-- This takes an optional @VarEnv Kind@ which maps kind variables to kinds.-+-- These kinds should be used to instantiate invisible kind variables;+-- they come from an enclosing class for an associated type/data family.+--+-- tcInferApps also arranges to saturate any trailing invisible arguments+--   of a type-family application, which is usually the right thing to do+-- tcInferApps_nosat does not do this saturation; it is used only+--   by ":kind" in GHCi+tcInferApps, tcInferApps_nosat+    :: TcTyMode+    -> LHsType GhcRn        -- ^ Function (for printing only)+    -> TcType               -- ^ Function+    -> [LHsTypeArg GhcRn]   -- ^ Args+    -> TcM (TcType, TcKind) -- ^ (f args, args, result kind)+tcInferApps mode hs_ty fun hs_args+  = do { (f_args, res_k) <- tcInferApps_nosat mode hs_ty fun hs_args+       ; saturateFamApp f_args res_k }++tcInferApps_nosat mode orig_hs_ty fun orig_hs_args+  = do { traceTc "tcInferApps {" (ppr orig_hs_ty $$ ppr orig_hs_args)+       ; (f_args, res_k) <- go_init 1 fun orig_hs_args+       ; traceTc "tcInferApps }" (ppr f_args <+> dcolon <+> ppr res_k)+       ; return (f_args, res_k) }+  where++    -- go_init just initialises the auxiliary+    -- arguments of the 'go' loop+    go_init n fun all_args+      = go n fun empty_subst fun_ki all_args+      where+        fun_ki = tcTypeKind fun+           -- We do (tcTypeKind fun) here, even though the caller+           -- knows the function kind, to absolutely guarantee+           -- INVARIANT for 'go'+           -- Note that in a typical application (F t1 t2 t3),+           -- the 'fun' is just a TyCon, so tcTypeKind is fast++        empty_subst = mkEmptyTCvSubst $ mkInScopeSet $+                      tyCoVarsOfType fun_ki++    go :: Int             -- The # of the next argument+       -> TcType          -- Function applied to some args+       -> TCvSubst        -- Applies to function kind+       -> TcKind          -- Function kind+       -> [LHsTypeArg GhcRn]    -- Un-type-checked args+       -> TcM (TcType, TcKind)  -- Result type and its kind+    -- INVARIANT: in any call (go n fun subst fun_ki args)+    --               tcTypeKind fun  =  subst(fun_ki)+    -- So the 'subst' and 'fun_ki' arguments are simply+    -- there to avoid repeatedly calling tcTypeKind.+    --+    -- Reason for INVARIANT: to support the Purely Kinded Type Invariant+    -- it's important that if fun_ki has a forall, then so does+    -- (tcTypeKind fun), because the next thing we are going to do+    -- is apply 'fun' to an argument type.++    -- Dispatch on all_args first, for performance reasons+    go n fun subst fun_ki all_args = case (all_args, tcSplitPiTy_maybe fun_ki) of++      ---------------- No user-written args left. We're done!+      ([], _) -> return (fun, substTy subst fun_ki)++      ---------------- HsArgPar: We don't care about parens here+      (HsArgPar _ : args, _) -> go n fun subst fun_ki args++      ---------------- HsTypeArg: a kind application (fun @ki)+      (HsTypeArg _ hs_ki_arg : hs_args, Just (ki_binder, inner_ki)) ->+        case ki_binder of++        -- FunTy with PredTy on LHS, or ForAllTy with Inferred+        Named (Bndr _ Inferred) -> instantiate ki_binder inner_ki+        Anon InvisArg _         -> instantiate ki_binder inner_ki++        Named (Bndr _ Specified) ->  -- Visible kind application+          do { traceTc "tcInferApps (vis kind app)"+                       (vcat [ ppr ki_binder, ppr hs_ki_arg+                             , ppr (tyBinderType ki_binder)+                             , ppr subst ])++             ; let exp_kind = substTy subst $ tyBinderType ki_binder++             ; ki_arg <- addErrCtxt (funAppCtxt orig_hs_ty hs_ki_arg n) $+                         unsetWOptM Opt_WarnPartialTypeSignatures $+                         setXOptM LangExt.PartialTypeSignatures $+                             -- Urgh!  see Note [Wildcards in visible kind application]+                             -- ToDo: must kill this ridiculous messing with DynFlags+                         tc_lhs_type (kindLevel mode) hs_ki_arg exp_kind++             ; traceTc "tcInferApps (vis kind app)" (ppr exp_kind)+             ; (subst', fun') <- mkAppTyM subst fun ki_binder ki_arg+             ; go (n+1) fun' subst' inner_ki hs_args }++        -- Attempted visible kind application (fun @ki), but fun_ki is+        --   forall k -> blah   or   k1 -> k2+        -- So we need a normal application.  Error.+        _ -> ty_app_err hs_ki_arg $ substTy subst fun_ki++      -- No binder; try applying the substitution, or fail if that's not possible+      (HsTypeArg _ ki_arg : _, Nothing) -> try_again_after_substing_or $+                                           ty_app_err ki_arg substed_fun_ki++      ---------------- HsValArg: a nomal argument (fun ty)+      (HsValArg arg : args, Just (ki_binder, inner_ki))+        -- next binder is invisible; need to instantiate it+        | isInvisibleBinder ki_binder   -- FunTy with InvisArg on LHS;+                                        -- or ForAllTy with Inferred or Specified+         -> instantiate ki_binder inner_ki++        -- "normal" case+        | otherwise+         -> do { traceTc "tcInferApps (vis normal app)"+                          (vcat [ ppr ki_binder+                                , ppr arg+                                , ppr (tyBinderType ki_binder)+                                , ppr subst ])+                ; let exp_kind = substTy subst $ tyBinderType ki_binder+                ; arg' <- addErrCtxt (funAppCtxt orig_hs_ty arg n) $+                          tc_lhs_type mode arg exp_kind+                ; traceTc "tcInferApps (vis normal app) 2" (ppr exp_kind)+                ; (subst', fun') <- mkAppTyM subst fun ki_binder arg'+                ; go (n+1) fun' subst' inner_ki args }++          -- no binder; try applying the substitution, or infer another arrow in fun kind+      (HsValArg _ : _, Nothing)+        -> try_again_after_substing_or $+           do { let arrows_needed = n_initial_val_args all_args+              ; co <- matchExpectedFunKind hs_ty arrows_needed substed_fun_ki++              ; fun' <- zonkTcType (fun `mkTcCastTy` co)+                     -- This zonk is essential, to expose the fruits+                     -- of matchExpectedFunKind to the 'go' loop++              ; traceTc "tcInferApps (no binder)" $+                   vcat [ ppr fun <+> dcolon <+> ppr fun_ki+                        , ppr arrows_needed+                        , ppr co+                        , ppr fun' <+> dcolon <+> ppr (tcTypeKind fun')]+              ; go_init n fun' all_args }+                -- Use go_init to establish go's INVARIANT+      where+        instantiate ki_binder inner_ki+          = do { traceTc "tcInferApps (need to instantiate)"+                         (vcat [ ppr ki_binder, ppr subst])+               ; (subst', arg') <- tcInstInvisibleTyBinder subst ki_binder+               ; go n (mkAppTy fun arg') subst' inner_ki all_args }+                 -- Because tcInvisibleTyBinder instantiate ki_binder,+                 -- the kind of arg' will have the same shape as the kind+                 -- of ki_binder.  So we don't need mkAppTyM here.++        try_again_after_substing_or fallthrough+          | not (isEmptyTCvSubst subst)+          = go n fun zapped_subst substed_fun_ki all_args+          | otherwise+          = fallthrough++        zapped_subst   = zapTCvSubst subst+        substed_fun_ki = substTy subst fun_ki+        hs_ty          = appTypeToArg orig_hs_ty (take (n-1) orig_hs_args)++    n_initial_val_args :: [HsArg tm ty] -> Arity+    -- Count how many leading HsValArgs we have+    n_initial_val_args (HsValArg {} : args) = 1 + n_initial_val_args args+    n_initial_val_args (HsArgPar {} : args) = n_initial_val_args args+    n_initial_val_args _                    = 0++    ty_app_err arg ty+      = failWith $ text "Cannot apply function of kind" <+> quotes (ppr ty)+                $$ text "to visible kind argument" <+> quotes (ppr arg)+++mkAppTyM :: TCvSubst+         -> TcType -> TyCoBinder    -- fun, plus its top-level binder+         -> TcType                  -- arg+         -> TcM (TCvSubst, TcType)  -- Extended subst, plus (fun arg)+-- Precondition: the application (fun arg) is well-kinded after zonking+--               That is, the application makes sense+--+-- Precondition: for (mkAppTyM subst fun bndr arg)+--       tcTypeKind fun  =  Pi bndr. body+--  That is, fun always has a ForAllTy or FunTy at the top+--           and 'bndr' is fun's pi-binder+--+-- Postcondition: if fun and arg satisfy (PKTI), the purely-kinded type+--                invariant, then so does the result type (fun arg)+--+-- We do not require that+--    tcTypeKind arg = tyVarKind (binderVar bndr)+-- This must be true after zonking (precondition 1), but it's not+-- required for the (PKTI).+mkAppTyM subst fun ki_binder arg+  | -- See Note [mkAppTyM]: Nasty case 2+    TyConApp tc args <- fun+  , isTypeSynonymTyCon tc+  , args `lengthIs` (tyConArity tc - 1)+  , any isTrickyTvBinder (tyConTyVars tc) -- We could cache this in the synonym+  = do { arg'  <- zonkTcType  arg+       ; args' <- zonkTcTypes args+       ; let subst' = case ki_binder of+                        Anon {}           -> subst+                        Named (Bndr tv _) -> extendTvSubstAndInScope subst tv arg'+       ; return (subst', mkTyConApp tc (args' ++ [arg'])) }+++mkAppTyM subst fun (Anon {}) arg+   = return (subst, mk_app_ty fun arg)++mkAppTyM subst fun (Named (Bndr tv _)) arg+  = do { arg' <- if isTrickyTvBinder tv+                 then -- See Note [mkAppTyM]: Nasty case 1+                      zonkTcType arg+                 else return     arg+       ; return ( extendTvSubstAndInScope subst tv arg'+                , mk_app_ty fun arg' ) }++mk_app_ty :: TcType -> TcType -> TcType+-- This function just adds an ASSERT for mkAppTyM's precondition+mk_app_ty fun arg+  = ASSERT2( isPiTy fun_kind+           ,  ppr fun <+> dcolon <+> ppr fun_kind $$ ppr arg )+    mkAppTy fun arg+  where+    fun_kind = tcTypeKind fun++isTrickyTvBinder :: TcTyVar -> Bool+-- NB: isTrickyTvBinder is just an optimisation+-- It would be absolutely sound to return True always+isTrickyTvBinder tv = isPiTy (tyVarKind tv)++{- Note [The Purely Kinded Type Invariant (PKTI)]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+During type inference, we maintain this invariant++ (PKTI) It is legal to call 'tcTypeKind' on any Type ty,+        on any sub-term of ty, /without/ zonking ty++        Moreover, any such returned kind+        will itself satisfy (PKTI)++By "legal to call tcTypeKind" we mean "tcTypeKind will not crash".+The way in which tcTypeKind can crash is in applications+    (a t1 t2 .. tn)+if 'a' is a type variable whose kind doesn't have enough arrows+or foralls.  (The crash is in piResultTys.)++The loop in tcInferApps has to be very careful to maintain the (PKTI).+For example, suppose+    kappa is a unification variable+    We have already unified kappa := Type+      yielding    co :: Refl (Type -> Type)+    a :: kappa+then consider the type+    (a Int)+If we call tcTypeKind on that, we'll crash, because the (un-zonked)+kind of 'a' is just kappa, not an arrow kind.  So we must zonk first.++So the type inference engine is very careful when building applications.+This happens in tcInferApps. Suppose we are kind-checking the type (a Int),+where (a :: kappa).  Then in tcInferApps we'll run out of binders on+a's kind, so we'll call matchExpectedFunKind, and unify+   kappa := kappa1 -> kappa2,  with evidence co :: kappa ~ (kappa1 ~ kappa2)+At this point we must zonk the function type to expose the arrrow, so+that (a Int) will satisfy (PKTI).++The absence of this caused #14174 and #14520.++The calls to mkAppTyM is the other place we are very careful.++Note [mkAppTyM]+~~~~~~~~~~~~~~~+mkAppTyM is trying to guarantee the Purely Kinded Type Invariant+(PKTI) for its result type (fun arg).  There are two ways it can go wrong:++* Nasty case 1: forall types (polykinds/T14174a)+    T :: forall (p :: *->*). p Int -> p Bool+  Now kind-check (T x), where x::kappa.+  Well, T and x both satisfy the PKTI, but+     T x :: x Int -> x Bool+  and (x Int) does /not/ satisfy the PKTI.++* Nasty case 2: type synonyms+    type S f a = f a+  Even though (S ff aa) would satisfy the (PKTI) if S was a data type+  (i.e. nasty case 1 is dealt with), it might still not satisfy (PKTI)+  if S is a type synonym, because the /expansion/ of (S ff aa) is+  (ff aa), and /that/ does not satisfy (PKTI).  E.g. perhaps+  (ff :: kappa), where 'kappa' has already been unified with (*->*).++  We check for nasty case 2 on the final argument of a type synonym.++Notice that in both cases the trickiness only happens if the+bound variable has a pi-type.  Hence isTrickyTvBinder.+-}+++saturateFamApp :: TcType -> TcKind -> TcM (TcType, TcKind)+-- Precondition for (saturateFamApp ty kind):+--     tcTypeKind ty = kind+--+-- If 'ty' is an unsaturated family application wtih trailing+-- invisible arguments, instanttiate them.+-- See Note [saturateFamApp]++saturateFamApp ty kind+  | Just (tc, args) <- tcSplitTyConApp_maybe ty+  , mustBeSaturated tc+  , let n_to_inst = tyConArity tc - length args+  = do { (extra_args, ki') <- tcInstInvisibleTyBinders n_to_inst kind+       ; return (ty `mkTcAppTys` extra_args, ki') }+  | otherwise+  = return (ty, kind)++{- Note [saturateFamApp]+~~~~~~~~~~~~~~~~~~~~~~~~+Consider+   type family F :: Either j k+   type instance F @Type = Right Maybe+   type instance F @Type = Right Either```++Then F :: forall {j,k}. Either j k++The two type instances do a visible kind application that instantiates+'j' but not 'k'.  But we want to end up with instances that look like+  type instance F @Type @(*->*) = Right @Type @(*->*) Maybe++so that F has arity 2.  We must instantiate that trailing invisible+binder. In general, Invisible binders precede Specified and Required,+so this is only going to bite for apparently-nullary families.++Note that+  type family F2 :: forall k. k -> *+is quite different and really does have arity 0.++It's not just type instances where we need to saturate those+unsaturated arguments: see #11246.  Hence doing this in tcInferApps.+-}++appTypeToArg :: LHsType GhcRn -> [LHsTypeArg GhcRn] -> LHsType GhcRn+appTypeToArg f []                       = f+appTypeToArg f (HsValArg arg    : args) = appTypeToArg (mkHsAppTy f arg) args+appTypeToArg f (HsArgPar _      : args) = appTypeToArg f                 args+appTypeToArg f (HsTypeArg l arg : args)+  = appTypeToArg (mkHsAppKindTy l f arg) args+++{- *********************************************************************+*                                                                      *+                checkExpectedKind+*                                                                      *+********************************************************************* -}++-- | This instantiates invisible arguments for the type being checked if it must+-- be saturated and is not yet saturated. It then calls and uses the result+-- from checkExpectedKindX to build the final type+checkExpectedKind :: HasDebugCallStack+                  => HsType GhcRn       -- ^ type we're checking (for printing)+                  -> TcType             -- ^ type we're checking+                  -> TcKind             -- ^ the known kind of that type+                  -> TcKind             -- ^ the expected kind+                  -> TcM TcType+-- Just a convenience wrapper to save calls to 'ppr'+checkExpectedKind hs_ty ty act exp+  = checkExpectedKind_pp (ppr hs_ty) ty act exp++checkExpectedKind_pp :: HasDebugCallStack+                     => SDoc               -- ^ The thing we are checking+                     -> TcType             -- ^ type we're checking+                     -> TcKind             -- ^ the known kind of that type+                     -> TcKind             -- ^ the expected kind+                     -> TcM TcType+checkExpectedKind_pp pp_hs_ty ty act_kind exp_kind+  = do { traceTc "checkExpectedKind" (ppr ty $$ ppr act_kind)++       ; (new_args, act_kind') <- tcInstInvisibleTyBinders n_to_inst act_kind++       ; let origin = TypeEqOrigin { uo_actual   = act_kind'+                                   , uo_expected = exp_kind+                                   , uo_thing    = Just pp_hs_ty+                                   , uo_visible  = True } -- the hs_ty is visible++       ; traceTc "checkExpectedKindX" $+         vcat [ pp_hs_ty+              , text "act_kind':" <+> ppr act_kind'+              , text "exp_kind:" <+> ppr exp_kind ]++       ; let res_ty = ty `mkTcAppTys` new_args++       ; if act_kind' `tcEqType` exp_kind+         then return res_ty  -- This is very common+         else do { co_k <- uType KindLevel origin act_kind' exp_kind+                 ; traceTc "checkExpectedKind" (vcat [ ppr act_kind+                                                     , ppr exp_kind+                                                     , ppr co_k ])+                ; return (res_ty `mkTcCastTy` co_k) } }+    where+      -- We need to make sure that both kinds have the same number of implicit+      -- foralls out front. If the actual kind has more, instantiate accordingly.+      -- Otherwise, just pass the type & kind through: the errors are caught+      -- in unifyType.+      n_exp_invis_bndrs = invisibleTyBndrCount exp_kind+      n_act_invis_bndrs = invisibleTyBndrCount act_kind+      n_to_inst         = n_act_invis_bndrs - n_exp_invis_bndrs+++---------------------------+tcHsMbContext :: Maybe (LHsContext GhcRn) -> TcM [PredType]+tcHsMbContext Nothing    = return []+tcHsMbContext (Just cxt) = tcHsContext cxt++tcHsContext :: LHsContext GhcRn -> TcM [PredType]+tcHsContext = tc_hs_context typeLevelMode++tcLHsPredType :: LHsType GhcRn -> TcM PredType+tcLHsPredType = tc_lhs_pred typeLevelMode++tc_hs_context :: TcTyMode -> LHsContext GhcRn -> TcM [PredType]+tc_hs_context mode ctxt = mapM (tc_lhs_pred mode) (unLoc ctxt)++tc_lhs_pred :: TcTyMode -> LHsType GhcRn -> TcM PredType+tc_lhs_pred mode pred = tc_lhs_type mode pred constraintKind++---------------------------+tcTyVar :: TcTyMode -> Name -> TcM (TcType, TcKind)+-- See Note [Type checking recursive type and class declarations]+-- in TcTyClsDecls+tcTyVar mode name         -- Could be a tyvar, a tycon, or a datacon+  = do { traceTc "lk1" (ppr name)+       ; thing <- tcLookup name+       ; case thing of+           ATyVar _ tv -> return (mkTyVarTy tv, tyVarKind tv)++           ATcTyCon tc_tc+             -> do { -- See Note [GADT kind self-reference]+                     unless (isTypeLevel (mode_level mode))+                            (promotionErr name TyConPE)+                   ; check_tc tc_tc+                   ; return (mkTyConTy tc_tc, tyConKind tc_tc) }++           AGlobal (ATyCon tc)+             -> do { check_tc tc+                   ; return (mkTyConTy tc, tyConKind tc) }++           AGlobal (AConLike (RealDataCon dc))+             -> do { data_kinds <- xoptM LangExt.DataKinds+                   ; unless (data_kinds || specialPromotedDc dc) $+                       promotionErr name NoDataKindsDC+                   ; when (isFamInstTyCon (dataConTyCon dc)) $+                       -- see #15245+                       promotionErr name FamDataConPE+                   ; let (_, _, _, theta, _, _) = dataConFullSig dc+                   ; traceTc "tcTyVar" (ppr dc <+> ppr theta $$ ppr (dc_theta_illegal_constraint theta))+                   ; case dc_theta_illegal_constraint theta of+                       Just pred -> promotionErr name $+                                    ConstrainedDataConPE pred+                       Nothing   -> pure ()+                   ; let tc = promoteDataCon dc+                   ; return (mkTyConApp tc [], tyConKind tc) }++           APromotionErr err -> promotionErr name err++           _  -> wrongThingErr "type" thing name }+  where+    check_tc :: TyCon -> TcM ()+    check_tc tc = do { data_kinds   <- xoptM LangExt.DataKinds+                     ; unless (isTypeLevel (mode_level mode) ||+                               data_kinds ||+                               isKindTyCon tc) $+                       promotionErr name NoDataKindsTC }++    -- We cannot promote a data constructor with a context that contains+    -- constraints other than equalities, so error if we find one.+    -- See Note [Constraints in kinds] in TyCoRep+    dc_theta_illegal_constraint :: ThetaType -> Maybe PredType+    dc_theta_illegal_constraint = find (not . isEqPred)++{-+Note [GADT kind self-reference]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++A promoted type cannot be used in the body of that type's declaration.+#11554 shows this example, which made GHC loop:++  import Data.Kind+  data P (x :: k) = Q+  data A :: Type where+    B :: forall (a :: A). P a -> A++In order to check the constructor B, we need to have the promoted type A, but in+order to get that promoted type, B must first be checked. To prevent looping, a+TyConPE promotion error is given when tcTyVar checks an ATcTyCon in kind mode.+Any ATcTyCon is a TyCon being defined in the current recursive group (see data+type decl for TcTyThing), and all such TyCons are illegal in kinds.++#11962 proposes checking the head of a data declaration separately from+its constructors. This would allow the example above to pass.++Note [Body kind of a HsForAllTy]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The body of a forall is usually a type, but in principle+there's no reason to prohibit *unlifted* types.+In fact, GHC can itself construct a function with an+unboxed tuple inside a for-all (via CPR analysis; see+typecheck/should_compile/tc170).++Moreover in instance heads we get forall-types with+kind Constraint.++It's tempting to check that the body kind is either * or #. But this is+wrong. For example:++  class C a b+  newtype N = Mk Foo deriving (C a)++We're doing newtype-deriving for C. But notice how `a` isn't in scope in+the predicate `C a`. So we quantify, yielding `forall a. C a` even though+`C a` has kind `* -> Constraint`. The `forall a. C a` is a bit cheeky, but+convenient. Bottom line: don't check for * or # here.++Note [Body kind of a HsQualTy]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If ctxt is non-empty, the HsQualTy really is a /function/, so the+kind of the result really is '*', and in that case the kind of the+body-type can be lifted or unlifted.++However, consider+    instance Eq a => Eq [a] where ...+or+    f :: (Eq a => Eq [a]) => blah+Here both body-kind of the HsQualTy is Constraint rather than *.+Rather crudely we tell the difference by looking at exp_kind. It's+very convenient to typecheck instance types like any other HsSigType.++Admittedly the '(Eq a => Eq [a]) => blah' case is erroneous, but it's+better to reject in checkValidType.  If we say that the body kind+should be '*' we risk getting TWO error messages, one saying that Eq+[a] doens't have kind '*', and one saying that we need a Constraint to+the left of the outer (=>).++How do we figure out the right body kind?  Well, it's a bit of a+kludge: I just look at the expected kind.  If it's Constraint, we+must be in this instance situation context. It's a kludge because it+wouldn't work if any unification was involved to compute that result+kind -- but it isn't.  (The true way might be to use the 'mode'+parameter, but that seemed like a sledgehammer to crack a nut.)++Note [Inferring tuple kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Give a tuple type (a,b,c), which the parser labels as HsBoxedOrConstraintTuple,+we try to figure out whether it's a tuple of kind * or Constraint.+  Step 1: look at the expected kind+  Step 2: infer argument kinds++If after Step 2 it's not clear from the arguments that it's+Constraint, then it must be *.  Once having decided that we re-check+the arguments to give good error messages in+  e.g.  (Maybe, Maybe)++Note that we will still fail to infer the correct kind in this case:++  type T a = ((a,a), D a)+  type family D :: Constraint -> Constraint++While kind checking T, we do not yet know the kind of D, so we will default the+kind of T to * -> *. It works if we annotate `a` with kind `Constraint`.++Note [Desugaring types]+~~~~~~~~~~~~~~~~~~~~~~~+The type desugarer is phase 2 of dealing with HsTypes.  Specifically:++  * It transforms from HsType to Type++  * It zonks any kinds.  The returned type should have no mutable kind+    or type variables (hence returning Type not TcType):+      - any unconstrained kind variables are defaulted to (Any *) just+        as in TcHsSyn.+      - there are no mutable type variables because we are+        kind-checking a type+    Reason: the returned type may be put in a TyCon or DataCon where+    it will never subsequently be zonked.++You might worry about nested scopes:+        ..a:kappa in scope..+            let f :: forall b. T '[a,b] -> Int+In this case, f's type could have a mutable kind variable kappa in it;+and we might then default it to (Any *) when dealing with f's type+signature.  But we don't expect this to happen because we can't get a+lexically scoped type variable with a mutable kind variable in it.  A+delicate point, this.  If it becomes an issue we might need to+distinguish top-level from nested uses.++Moreover+  * it cannot fail,+  * it does no unifications+  * it does no validity checking, except for structural matters, such as+        (a) spurious ! annotations.+        (b) a class used as a type++Note [Kind of a type splice]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider these terms, each with TH type splice inside:+     [| e1 :: Maybe $(..blah..) |]+     [| e2 :: $(..blah..) |]+When kind-checking the type signature, we'll kind-check the splice+$(..blah..); we want to give it a kind that can fit in any context,+as if $(..blah..) :: forall k. k.++In the e1 example, the context of the splice fixes kappa to *.  But+in the e2 example, we'll desugar the type, zonking the kind unification+variables as we go.  When we encounter the unconstrained kappa, we+want to default it to '*', not to (Any *).++Help functions for type applications+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-}++addTypeCtxt :: LHsType GhcRn -> TcM a -> TcM a+        -- Wrap a context around only if we want to show that contexts.+        -- Omit invisible ones and ones user's won't grok+addTypeCtxt (L _ (HsWildCardTy _)) thing = thing   -- "In the type '_'" just isn't helpful.+addTypeCtxt (L _ ty) thing+  = addErrCtxt doc thing+  where+    doc = text "In the type" <+> quotes (ppr ty)++{-+************************************************************************+*                                                                      *+                Type-variable binders+%*                                                                      *+%************************************************************************++Note [Keeping scoped variables in order: Explicit]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When the user writes `forall a b c. blah`, we bring a, b, and c into+scope and then check blah. In the process of checking blah, we might+learn the kinds of a, b, and c, and these kinds might indicate that+b depends on c, and thus that we should reject the user-written type.++One approach to doing this would be to bring each of a, b, and c into+scope, one at a time, creating an implication constraint and+bumping the TcLevel for each one. This would work, because the kind+of, say, b would be untouchable when c is in scope (and the constraint+couldn't float out because c blocks it). However, it leads to terrible+error messages, complaining about skolem escape. While it is indeed+a problem of skolem escape, we can do better.++Instead, our approach is to bring the block of variables into scope+all at once, creating one implication constraint for the lot. The+user-written variables are skolems in the implication constraint. In+TcSimplify.setImplicationStatus, we check to make sure that the ordering+is correct, choosing ImplicationStatus IC_BadTelescope if they aren't.+Then, in TcErrors, we report if there is a bad telescope. This way,+we can report a suggested ordering to the user if there is a problem.++See also Note [Checking telescopes] in Constraint++Note [Keeping scoped variables in order: Implicit]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When the user implicitly quantifies over variables (say, in a type+signature), we need to come up with some ordering on these variables.+This is done by bumping the TcLevel, bringing the tyvars into scope,+and then type-checking the thing_inside. The constraints are all+wrapped in an implication, which is then solved. Finally, we can+zonk all the binders and then order them with scopedSort.++It's critical to solve before zonking and ordering in order to uncover+any unifications. You might worry that this eager solving could cause+trouble elsewhere. I don't think it will. Because it will solve only+in an increased TcLevel, it can't unify anything that was mentioned+elsewhere. Additionally, we require that the order of implicitly+quantified variables is manifest by the scope of these variables, so+we're not going to learn more information later that will help order+these variables.++Note [Recipe for checking a signature]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Checking a user-written signature requires several steps:++ 1. Generate constraints.+ 2. Solve constraints.+ 3. Promote tyvars and/or kind-generalize.+ 4. Zonk.+ 5. Check validity.++There may be some surprises in here:++Step 2 is necessary for two reasons: most signatures also bring+implicitly quantified variables into scope, and solving is necessary+to get these in the right order (see Note [Keeping scoped variables in+order: Implicit]). Additionally, solving is necessary in order to+kind-generalize correctly: otherwise, we do not know which metavariables+are left unsolved.++Step 3 is done by a call to candidateQTyVarsOfType, followed by a call to+kindGeneralize{All,Some,None}. Here, we have to deal with the fact that+metatyvars generated in the type may have a bumped TcLevel, because explicit+foralls raise the TcLevel. To avoid these variables from ever being visible in+the surrounding context, we must obey the following dictum:++  Every metavariable in a type must either be+    (A) generalized, or+    (B) promoted, or        See Note [Promotion in signatures]+    (C) zapped to Any       See Note [Naughty quantification candidates] in TcMType++The kindGeneralize functions do not require pre-zonking; they zonk as they+go.++If you are actually doing kind-generalization, you need to bump the level+before generating constraints, as we will only generalize variables with+a TcLevel higher than the ambient one.++After promoting/generalizing, we need to zonk again because both+promoting and generalizing fill in metavariables.++Note [Promotion in signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If an unsolved metavariable in a signature is not generalized+(because we're not generalizing the construct -- e.g., pattern+sig -- or because the metavars are constrained -- see kindGeneralizeSome)+we need to promote to maintain (MetaTvInv) of Note [TcLevel and untouchable type variables]+in TcType. Note that promotion is identical in effect to generalizing+and the reinstantiating with a fresh metavariable at the current level.+So in some sense, we generalize *all* variables, but then re-instantiate+some of them.++Here is an example of why we must promote:+  foo (x :: forall a. a -> Proxy b) = ...++In the pattern signature, `b` is unbound, and will thus be brought into+scope. We do not know its kind: it will be assigned kappa[2]. Note that+kappa is at TcLevel 2, because it is invented under a forall. (A priori,+the kind kappa might depend on `a`, so kappa rightly has a higher TcLevel+than the surrounding context.) This kappa cannot be solved for while checking+the pattern signature (which is not kind-generalized). When we are checking+the *body* of foo, though, we need to unify the type of x with the argument+type of bar. At this point, the ambient TcLevel is 1, and spotting a+matavariable with level 2 would violate the (MetaTvInv) invariant of+Note [TcLevel and untouchable type variables]. So, instead of kind-generalizing,+we promote the metavariable to level 1. This is all done in kindGeneralizeNone.++-}++tcNamedWildCardBinders :: [Name]+                       -> ([(Name, TcTyVar)] -> TcM a)+                       -> TcM a+-- Bring into scope the /named/ wildcard binders.  Remember that+-- plain wildcards _ are anonymous and dealt with by HsWildCardTy+-- Soe Note [The wildcard story for types] in GHC.Hs.Types+tcNamedWildCardBinders wc_names thing_inside+  = do { wcs <- mapM (const newWildTyVar) wc_names+       ; let wc_prs = wc_names `zip` wcs+       ; tcExtendNameTyVarEnv wc_prs $+         thing_inside wc_prs }++newWildTyVar :: TcM TcTyVar+-- ^ New unification variable '_' for a wildcard+newWildTyVar+  = do { kind <- newMetaKindVar+       ; uniq <- newUnique+       ; details <- newMetaDetails TauTv+       ; let name  = mkSysTvName uniq (fsLit "_")+             tyvar = mkTcTyVar name kind details+       ; traceTc "newWildTyVar" (ppr tyvar)+       ; return tyvar }++{- *********************************************************************+*                                                                      *+             Kind inference for type declarations+*                                                                      *+********************************************************************* -}++-- See Note [kcCheckDeclHeader vs kcInferDeclHeader]+data InitialKindStrategy+  = InitialKindCheck SAKS_or_CUSK+  | InitialKindInfer++-- Does the declaration have a standalone kind signature (SAKS) or a complete+-- user-specified kind (CUSK)?+data SAKS_or_CUSK+  = SAKS Kind  -- Standalone kind signature, fully zonked! (zonkTcTypeToType)+  | CUSK       -- Complete user-specified kind (CUSK)++instance Outputable SAKS_or_CUSK where+  ppr (SAKS k) = text "SAKS" <+> ppr k+  ppr CUSK = text "CUSK"++-- See Note [kcCheckDeclHeader vs kcInferDeclHeader]+kcDeclHeader+  :: InitialKindStrategy+  -> Name              -- ^ of the thing being checked+  -> TyConFlavour      -- ^ What sort of 'TyCon' is being checked+  -> LHsQTyVars GhcRn  -- ^ Binders in the header+  -> TcM ContextKind   -- ^ The result kind+  -> TcM TcTyCon       -- ^ A suitably-kinded TcTyCon+kcDeclHeader (InitialKindCheck msig) = kcCheckDeclHeader msig+kcDeclHeader InitialKindInfer = kcInferDeclHeader++{- Note [kcCheckDeclHeader vs kcInferDeclHeader]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+kcCheckDeclHeader and kcInferDeclHeader are responsible for getting the initial kind+of a type constructor.++* kcCheckDeclHeader: the TyCon has a standalone kind signature or a CUSK. In that+  case, find the full, final, poly-kinded kind of the TyCon.  It's very like a+  term-level binding where we have a complete type signature for the function.++* kcInferDeclHeader: the TyCon has neither a standalone kind signature nor a+  CUSK. Find a monomorphic kind, with unification variables in it; they will be+  generalised later.  It's very like a term-level binding where we do not have a+  type signature (or, more accurately, where we have a partial type signature),+  so we infer the type and generalise.+-}++------------------------------+kcCheckDeclHeader+  :: SAKS_or_CUSK+  -> Name              -- ^ of the thing being checked+  -> TyConFlavour      -- ^ What sort of 'TyCon' is being checked+  -> LHsQTyVars GhcRn  -- ^ Binders in the header+  -> TcM ContextKind   -- ^ The result kind. AnyKind == no result signature+  -> TcM TcTyCon       -- ^ A suitably-kinded generalized TcTyCon+kcCheckDeclHeader (SAKS sig) = kcCheckDeclHeader_sig sig+kcCheckDeclHeader CUSK       = kcCheckDeclHeader_cusk++kcCheckDeclHeader_cusk+  :: Name              -- ^ of the thing being checked+  -> TyConFlavour      -- ^ What sort of 'TyCon' is being checked+  -> LHsQTyVars GhcRn  -- ^ Binders in the header+  -> TcM ContextKind   -- ^ The result kind+  -> TcM TcTyCon       -- ^ A suitably-kinded generalized TcTyCon+kcCheckDeclHeader_cusk name flav+              (HsQTvs { hsq_ext = kv_ns+                      , hsq_explicit = hs_tvs }) kc_res_ki+  -- CUSK case+  -- See note [Required, Specified, and Inferred for types] in TcTyClsDecls+  = addTyConFlavCtxt name flav $+    do { (scoped_kvs, (tc_tvs, res_kind))+           <- pushTcLevelM_                               $+              solveEqualities                             $+              bindImplicitTKBndrs_Q_Skol kv_ns            $+              bindExplicitTKBndrs_Q_Skol ctxt_kind hs_tvs $+              newExpectedKind =<< kc_res_ki++           -- Now, because we're in a CUSK,+           -- we quantify over the mentioned kind vars+       ; let spec_req_tkvs = scoped_kvs ++ tc_tvs+             all_kinds     = res_kind : map tyVarKind spec_req_tkvs++       ; candidates' <- candidateQTyVarsOfKinds all_kinds+             -- 'candidates' are all the variables that we are going to+             -- skolemise and then quantify over.  We do not include spec_req_tvs+             -- because they are /already/ skolems++       ; let non_tc_candidates = filter (not . isTcTyVar) (nonDetEltsUniqSet (tyCoVarsOfTypes all_kinds))+             candidates = candidates' { dv_kvs = dv_kvs candidates' `extendDVarSetList` non_tc_candidates }+             inf_candidates = candidates `delCandidates` spec_req_tkvs++       ; inferred <- quantifyTyVars inf_candidates+                     -- NB: 'inferred' comes back sorted in dependency order++       ; scoped_kvs <- mapM zonkTyCoVarKind scoped_kvs+       ; tc_tvs     <- mapM zonkTyCoVarKind tc_tvs+       ; res_kind   <- zonkTcType           res_kind++       ; let mentioned_kv_set = candidateKindVars candidates+             specified        = scopedSort scoped_kvs+                                -- NB: maintain the L-R order of scoped_kvs++             final_tc_binders =  mkNamedTyConBinders Inferred  inferred+                              ++ mkNamedTyConBinders Specified specified+                              ++ map (mkRequiredTyConBinder mentioned_kv_set) tc_tvs++             all_tv_prs = mkTyVarNamePairs (scoped_kvs ++ tc_tvs)+             tycon = mkTcTyCon name final_tc_binders res_kind all_tv_prs+                               True -- it is generalised+                               flav+         -- If the ordering from+         -- Note [Required, Specified, and Inferred for types] in TcTyClsDecls+         -- doesn't work, we catch it here, before an error cascade+       ; checkTyConTelescope tycon++       ; traceTc "kcCheckDeclHeader_cusk " $+         vcat [ text "name" <+> ppr name+              , text "kv_ns" <+> ppr kv_ns+              , text "hs_tvs" <+> ppr hs_tvs+              , text "scoped_kvs" <+> ppr scoped_kvs+              , text "tc_tvs" <+> ppr tc_tvs+              , text "res_kind" <+> ppr res_kind+              , text "candidates" <+> ppr candidates+              , text "inferred" <+> ppr inferred+              , text "specified" <+> ppr specified+              , text "final_tc_binders" <+> ppr final_tc_binders+              , text "mkTyConKind final_tc_bndrs res_kind"+                <+> ppr (mkTyConKind final_tc_binders res_kind)+              , text "all_tv_prs" <+> ppr all_tv_prs ]++       ; return tycon }+  where+    ctxt_kind | tcFlavourIsOpen flav = TheKind liftedTypeKind+              | otherwise            = AnyKind+kcCheckDeclHeader_cusk _ _ (XLHsQTyVars nec) _ = noExtCon nec++-- | Kind-check a 'LHsQTyVars'. Used in 'inferInitialKind' (for tycon kinds and+-- other kinds).+--+-- This function does not do telescope checking.+kcInferDeclHeader+  :: Name              -- ^ of the thing being checked+  -> TyConFlavour      -- ^ What sort of 'TyCon' is being checked+  -> LHsQTyVars GhcRn+  -> TcM ContextKind   -- ^ The result kind+  -> TcM TcTyCon       -- ^ A suitably-kinded non-generalized TcTyCon+kcInferDeclHeader name flav+              (HsQTvs { hsq_ext = kv_ns+                      , hsq_explicit = hs_tvs }) kc_res_ki+  -- No standalane kind signature and no CUSK.+  -- See note [Required, Specified, and Inferred for types] in TcTyClsDecls+  = do { (scoped_kvs, (tc_tvs, res_kind))+           -- Why bindImplicitTKBndrs_Q_Tv which uses newTyVarTyVar?+           -- See Note [Inferring kinds for type declarations] in TcTyClsDecls+           <- bindImplicitTKBndrs_Q_Tv kv_ns            $+              bindExplicitTKBndrs_Q_Tv ctxt_kind hs_tvs $+              newExpectedKind =<< kc_res_ki+              -- Why "_Tv" not "_Skol"? See third wrinkle in+              -- Note [Inferring kinds for type declarations] in TcTyClsDecls,++       ; let   -- NB: Don't add scoped_kvs to tyConTyVars, because they+               -- might unify with kind vars in other types in a mutually+               -- recursive group.+               -- See Note [Inferring kinds for type declarations] in TcTyClsDecls++             tc_binders = mkAnonTyConBinders VisArg tc_tvs+               -- Also, note that tc_binders has the tyvars from only the+               -- user-written tyvarbinders. See S1 in Note [How TcTyCons work]+               -- in TcTyClsDecls+               --+               -- mkAnonTyConBinder: see Note [No polymorphic recursion]++             all_tv_prs = (kv_ns                `zip` scoped_kvs) +++                          (hsLTyVarNames hs_tvs `zip` tc_tvs)+               -- NB: bindIplicitTKBndrs_Q_Tv makes /freshly-named/ unification+               --     variables, hence the need to zip here.  Ditto bindExplicit..+               -- See TcMType Note [Unification variables need fresh Names]++             tycon = mkTcTyCon name tc_binders res_kind all_tv_prs+                               False -- not yet generalised+                               flav++       ; traceTc "kcInferDeclHeader: not-cusk" $+         vcat [ ppr name, ppr kv_ns, ppr hs_tvs+              , ppr scoped_kvs+              , ppr tc_tvs, ppr (mkTyConKind tc_binders res_kind) ]+       ; return tycon }+  where+    ctxt_kind | tcFlavourIsOpen flav = TheKind liftedTypeKind+              | otherwise            = AnyKind++kcInferDeclHeader _ _ (XLHsQTyVars nec) _ = noExtCon nec++-- | Kind-check a declaration header against a standalone kind signature.+-- See Note [Arity inference in kcCheckDeclHeader_sig]+kcCheckDeclHeader_sig+  :: Kind              -- ^ Standalone kind signature, fully zonked! (zonkTcTypeToType)+  -> Name              -- ^ of the thing being checked+  -> TyConFlavour      -- ^ What sort of 'TyCon' is being checked+  -> LHsQTyVars GhcRn  -- ^ Binders in the header+  -> TcM ContextKind   -- ^ The result kind. AnyKind == no result signature+  -> TcM TcTyCon       -- ^ A suitably-kinded TcTyCon+kcCheckDeclHeader_sig kisig name flav ktvs kc_res_ki =+  addTyConFlavCtxt name flav $+    pushTcLevelM_ $+    solveEqualities $  -- #16687+    bind_implicit (hsq_ext ktvs) $ \implicit_tcv_prs -> do++      -- Step 1: zip user-written binders with quantifiers from the kind signature.+      -- For example:+      --+      --   type F :: forall k -> k -> forall j. j -> Type+      --   data F i a b = ...+      --+      -- Results in the following 'zipped_binders':+      --+      --                   TyBinder      LHsTyVarBndr+      --    ---------------------------------------+      --    ZippedBinder   forall k ->   i+      --    ZippedBinder   k ->          a+      --    ZippedBinder   forall j.+      --    ZippedBinder   j ->          b+      --+      let (zipped_binders, excess_bndrs, kisig') = zipBinders kisig (hsq_explicit ktvs)++      -- Report binders that don't have a corresponding quantifier.+      -- For example:+      --+      --   type T :: Type -> Type+      --   data T b1 b2 b3 = ...+      --+      -- Here, b1 is zipped with Type->, while b2 and b3 are excess binders.+      --+      unless (null excess_bndrs) $ failWithTc (tooManyBindersErr kisig' excess_bndrs)++      -- Convert each ZippedBinder to TyConBinder        for  tyConBinders+      --                       and to [(Name, TcTyVar)]  for  tcTyConScopedTyVars+      (vis_tcbs, concat -> explicit_tv_prs) <- mapAndUnzipM zipped_to_tcb zipped_binders++      tcExtendNameTyVarEnv explicit_tv_prs $ do++        -- Check that inline kind annotations on binders are valid.+        -- For example:+        --+        --   type T :: Maybe k -> Type+        --   data T (a :: Maybe j) = ...+        --+        -- Here we unify   Maybe k ~ Maybe j+        mapM_ check_zipped_binder zipped_binders++        -- Kind-check the result kind annotation, if present:+        --+        --    data T a b :: res_ki where+        --               ^^^^^^^^^+        -- We do it here because at this point the environment has been+        -- extended with both 'implicit_tcv_prs' and 'explicit_tv_prs'.+        m_res_ki <- kc_res_ki >>= \ctx_k ->+          case ctx_k of+            AnyKind -> return Nothing+            _ -> Just <$> newExpectedKind ctx_k++        -- Step 2: split off invisible binders.+        -- For example:+        --+        --   type F :: forall k1 k2. (k1, k2) -> Type+        --   type family F+        --+        -- Does 'forall k1 k2' become a part of 'tyConBinders' or 'tyConResKind'?+        -- See Note [Arity inference in kcCheckDeclHeader_sig]+        let (invis_binders, r_ki) = split_invis kisig' m_res_ki++        -- Convert each invisible TyCoBinder to TyConBinder for tyConBinders.+        invis_tcbs <- mapM invis_to_tcb invis_binders++        -- Check that the inline result kind annotation is valid.+        -- For example:+        --+        --   type T :: Type -> Maybe k+        --   type family T a :: Maybe j where+        --+        -- Here we unify   Maybe k ~ Maybe j+        whenIsJust m_res_ki $ \res_ki ->+          discardResult $ -- See Note [discardResult in kcCheckDeclHeader_sig]+          unifyKind Nothing r_ki res_ki++        -- Zonk the implicitly quantified variables.+        implicit_tv_prs <- mapSndM zonkTcTyVarToTyVar implicit_tcv_prs++        -- Build the final, generalized TcTyCon+        let tcbs       = vis_tcbs ++ invis_tcbs+            all_tv_prs = implicit_tv_prs ++ explicit_tv_prs+            tc = mkTcTyCon name tcbs r_ki all_tv_prs True flav++        traceTc "kcCheckDeclHeader_sig done:" $ vcat+          [ text "tyConName = " <+> ppr (tyConName tc)+          , text "kisig =" <+> debugPprType kisig+          , text "tyConKind =" <+> debugPprType (tyConKind tc)+          , text "tyConBinders = " <+> ppr (tyConBinders tc)+          , text "tcTyConScopedTyVars" <+> ppr (tcTyConScopedTyVars tc)+          , text "tyConResKind" <+> debugPprType (tyConResKind tc)+          ]+        return tc+  where+    -- Consider this declaration:+    --+    --    type T :: forall a. forall b -> (a~b) => Proxy a -> Type+    --    data T x p = MkT+    --+    -- Here, we have every possible variant of ZippedBinder:+    --+    --                   TyBinder           LHsTyVarBndr+    --    ----------------------------------------------+    --    ZippedBinder   forall {k}.+    --    ZippedBinder   forall (a::k).+    --    ZippedBinder   forall (b::k) ->   x+    --    ZippedBinder   (a~b) =>+    --    ZippedBinder   Proxy a ->         p+    --+    -- Given a ZippedBinder zipped_to_tcb produces:+    --+    --  * TyConBinder      for  tyConBinders+    --  * (Name, TcTyVar)  for  tcTyConScopedTyVars, if there's a user-written LHsTyVarBndr+    --+    zipped_to_tcb :: ZippedBinder -> TcM (TyConBinder, [(Name, TcTyVar)])+    zipped_to_tcb zb = case zb of++      -- Inferred variable, no user-written binder.+      -- Example:   forall {k}.+      ZippedBinder (Named (Bndr v Specified)) Nothing ->+        return (mkNamedTyConBinder Specified v, [])++      -- Specified variable, no user-written binder.+      -- Example:   forall (a::k).+      ZippedBinder (Named (Bndr v Inferred)) Nothing ->+        return (mkNamedTyConBinder Inferred v, [])++      -- Constraint, no user-written binder.+      -- Example:   (a~b) =>+      ZippedBinder (Anon InvisArg bndr_ki) Nothing -> do+        name <- newSysName (mkTyVarOccFS (fsLit "ev"))+        let tv = mkTyVar name bndr_ki+        return (mkAnonTyConBinder InvisArg tv, [])++      -- Non-dependent visible argument with a user-written binder.+      -- Example:   Proxy a ->+      ZippedBinder (Anon VisArg bndr_ki) (Just b) ->+        return $+          let v_name = getName b+              tv = mkTyVar v_name bndr_ki+              tcb = mkAnonTyConBinder VisArg tv+          in (tcb, [(v_name, tv)])++      -- Dependent visible argument with a user-written binder.+      -- Example:   forall (b::k) ->+      ZippedBinder (Named (Bndr v Required)) (Just b) ->+        return $+          let v_name = getName b+              tcb = mkNamedTyConBinder Required v+          in (tcb, [(v_name, v)])++      -- 'zipBinders' does not produce any other variants of ZippedBinder.+      _ -> panic "goVis: invalid ZippedBinder"++    -- Given an invisible binder that comes from 'split_invis',+    -- convert it to TyConBinder.+    invis_to_tcb :: TyCoBinder -> TcM TyConBinder+    invis_to_tcb tb = do+      (tcb, stv) <- zipped_to_tcb (ZippedBinder tb Nothing)+      MASSERT(null stv)+      return tcb++    -- similar to:  bindImplicitTKBndrs_Tv+    bind_implicit :: [Name] -> ([(Name,TcTyVar)] -> TcM a) -> TcM a+    bind_implicit tv_names thing_inside =+      do { let new_tv name = do { tcv <- newFlexiKindedTyVarTyVar name+                                ; return (name, tcv) }+         ; tcvs <- mapM new_tv tv_names+         ; tcExtendNameTyVarEnv tcvs (thing_inside tcvs) }++    -- Check that the inline kind annotation on a binder is valid+    -- by unifying it with the kind of the quantifier.+    check_zipped_binder :: ZippedBinder -> TcM ()+    check_zipped_binder (ZippedBinder _ Nothing) = return ()+    check_zipped_binder (ZippedBinder tb (Just b)) =+      case unLoc b of+        UserTyVar _ _ -> return ()+        KindedTyVar _ v v_hs_ki -> do+          v_ki <- tcLHsKindSig (TyVarBndrKindCtxt (unLoc v)) v_hs_ki+          discardResult $ -- See Note [discardResult in kcCheckDeclHeader_sig]+            unifyKind (Just (HsTyVar noExtField NotPromoted v))+                      (tyBinderType tb)+                      v_ki+        XTyVarBndr nec -> noExtCon nec++    -- Split the invisible binders that should become a part of 'tyConBinders'+    -- rather than 'tyConResKind'.+    -- See Note [Arity inference in kcCheckDeclHeader_sig]+    split_invis :: Kind -> Maybe Kind -> ([TyCoBinder], Kind)+    split_invis sig_ki Nothing =+      -- instantiate all invisible binders+      splitPiTysInvisible sig_ki+    split_invis sig_ki (Just res_ki) =+      -- subtraction a la checkExpectedKind+      let n_res_invis_bndrs = invisibleTyBndrCount res_ki+          n_sig_invis_bndrs = invisibleTyBndrCount sig_ki+          n_inst = n_sig_invis_bndrs - n_res_invis_bndrs+      in splitPiTysInvisibleN n_inst sig_ki++-- A quantifier from a kind signature zipped with a user-written binder for it.+data ZippedBinder =+  ZippedBinder TyBinder (Maybe (LHsTyVarBndr GhcRn))++-- See Note [Arity inference in kcCheckDeclHeader_sig]+zipBinders+  :: Kind                      -- kind signature+  -> [LHsTyVarBndr GhcRn]      -- user-written binders+  -> ([ZippedBinder],          -- zipped binders+      [LHsTyVarBndr GhcRn],    -- remaining user-written binders+      Kind)                    -- remainder of the kind signature+zipBinders = zip_binders []+  where+    zip_binders acc ki [] = (reverse acc, [], ki)+    zip_binders acc ki (b:bs) =+      case tcSplitPiTy_maybe ki of+        Nothing -> (reverse acc, b:bs, ki)+        Just (tb, ki') ->+          let+            (zb, bs') | zippable  = (ZippedBinder tb (Just b),  bs)+                      | otherwise = (ZippedBinder tb Nothing, b:bs)+            zippable =+              case tb of+                Named (Bndr _ Specified) -> False+                Named (Bndr _ Inferred)  -> False+                Named (Bndr _ Required)  -> True+                Anon InvisArg _ -> False+                Anon VisArg   _ -> True+          in+            zip_binders (zb:acc) ki' bs'++tooManyBindersErr :: Kind -> [LHsTyVarBndr GhcRn] -> SDoc+tooManyBindersErr ki bndrs =+   hang (text "Not a function kind:")+      4 (ppr ki) $$+   hang (text "but extra binders found:")+      4 (fsep (map ppr bndrs))++{- Note [Arity inference in kcCheckDeclHeader_sig]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Given a kind signature 'kisig' and a declaration header, kcCheckDeclHeader_sig+verifies that the declaration conforms to the signature. The end result is a+TcTyCon 'tc' such that:++  tyConKind tc == kisig++This TcTyCon would be rather easy to produce if we didn't have to worry about+arity. Consider these declarations:++  type family S1 :: forall k. k -> Type+  type family S2 (a :: k) :: Type++Both S1 and S2 can be given the same standalone kind signature:++  type S2 :: forall k. k -> Type++And, indeed, tyConKind S1 == tyConKind S2. However, tyConKind is built from+tyConBinders and tyConResKind, such that++  tyConKind tc == mkTyConKind (tyConBinders tc) (tyConResKind tc)++For S1 and S2, tyConBinders and tyConResKind are different:++  tyConBinders S1  ==  []+  tyConResKind S1  ==  forall k. k -> Type+  tyConKind    S1  ==  forall k. k -> Type++  tyConBinders S2  ==  [spec k, anon-vis (a :: k)]+  tyConResKind S2  ==  Type+  tyConKind    S1  ==  forall k. k -> Type++This difference determines the arity:++  tyConArity tc == length (tyConBinders tc)++That is, the arity of S1 is 0, while the arity of S2 is 2.++'kcCheckDeclHeader_sig' needs to infer the desired arity to split the standalone+kind signature into binders and the result kind. It does so in two rounds:++1. zip user-written binders (vis_tcbs)+2. split off invisible binders (invis_tcbs)++Consider the following declarations:++    type F :: Type -> forall j. j -> forall k1 k2. (k1, k2) -> Type+    type family F a b++    type G :: Type -> forall j. j -> forall k1 k2. (k1, k2) -> Type+    type family G a b :: forall r2. (r1, r2) -> Type++In step 1 (zip user-written binders), we zip the quantifiers in the signature+with the binders in the header using 'zipBinders'. In both F and G, this results in+the following zipped binders:++                   TyBinder     LHsTyVarBndr+    ---------------------------------------+    ZippedBinder   Type ->      a+    ZippedBinder   forall j.+    ZippedBinder   j ->         b+++At this point, we have accumulated three zipped binders which correspond to a+prefix of the standalone kind signature:++  Type -> forall j. j -> ...++In step 2 (split off invisible binders), we have to decide how much remaining+invisible binders of the standalone kind signature to split off:++    forall k1 k2. (k1, k2) -> Type+    ^^^^^^^^^^^^^+    split off or not?++This decision is made in 'split_invis':++* If a user-written result kind signature is not provided, as in F,+  then split off all invisible binders. This is why we need special treatment+  for AnyKind.+* If a user-written result kind signature is provided, as in G,+  then do as checkExpectedKind does and split off (n_sig - n_res) binders.+  That is, split off such an amount of binders that the remainder of the+  standalone kind signature and the user-written result kind signature have the+  same amount of invisible quantifiers.++For F, split_invis splits away all invisible binders, and we have 2:++    forall k1 k2. (k1, k2) -> Type+    ^^^^^^^^^^^^^+    split away both binders++The resulting arity of F is 3+2=5.  (length vis_tcbs = 3,+                                     length invis_tcbs = 2,+                                     length tcbs = 5)++For G, split_invis decides to split off 1 invisible binder, so that we have the+same amount of invisible quantifiers left:++    res_ki  =  forall    r2. (r1, r2) -> Type+    kisig   =  forall k1 k2. (k1, k2) -> Type+                     ^^^+                     split off this one.++The resulting arity of G is 3+1=4. (length vis_tcbs = 3,+                                    length invis_tcbs = 1,+                                    length tcbs = 4)++-}++{- Note [discardResult in kcCheckDeclHeader_sig]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We use 'unifyKind' to check inline kind annotations in declaration headers+against the signature.++  type T :: [i] -> Maybe j -> Type+  data T (a :: [k1]) (b :: Maybe k2) :: Type where ...++Here, we will unify:++       [k1] ~ [i]+  Maybe k2  ~ Maybe j+      Type  ~ Type++The end result is that we fill in unification variables k1, k2:++    k1  :=  i+    k2  :=  j++We also validate that the user isn't confused:++  type T :: Type -> Type+  data T (a :: Bool) = ...++This will report that (Type ~ Bool) failed to unify.++Now, consider the following example:++  type family Id a where Id x = x+  type T :: Bool -> Type+  type T (a :: Id Bool) = ...++We will unify (Bool ~ Id Bool), and this will produce a non-reflexive coercion.+However, we are free to discard it, as the kind of 'T' is determined by the+signature, not by the inline kind annotation:++      we have   T ::    Bool -> Type+  rather than   T :: Id Bool -> Type++This (Id Bool) will not show up anywhere after we're done validating it, so we+have no use for the produced coercion.+-}++{- Note [No polymorphic recursion]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Should this kind-check?+  data T ka (a::ka) b  = MkT (T Type           Int   Bool)+                             (T (Type -> Type) Maybe Bool)++Notice that T is used at two different kinds in its RHS.  No!+This should not kind-check.  Polymorphic recursion is known to+be a tough nut.++Previously, we laboriously (with help from the renamer)+tried to give T the polymoprhic kind+   T :: forall ka -> ka -> kappa -> Type+where kappa is a unification variable, even in the inferInitialKinds+phase (which is what kcInferDeclHeader is all about).  But+that is dangerously fragile (see the ticket).++Solution: make kcInferDeclHeader give T a straightforward+monomorphic kind, with no quantification whatsoever. That's why+we use mkAnonTyConBinder for all arguments when figuring out+tc_binders.++But notice that (#16322 comment:3)++* The algorithm successfully kind-checks this declaration:+    data T2 ka (a::ka) = MkT2 (T2 Type a)++  Starting with (inferInitialKinds)+    T2 :: (kappa1 :: kappa2 :: *) -> (kappa3 :: kappa4 :: *) -> *+  we get+    kappa4 := kappa1   -- from the (a:ka) kind signature+    kappa1 := Type     -- From application T2 Type++  These constraints are soluble so generaliseTcTyCon gives+    T2 :: forall (k::Type) -> k -> *++  But now the /typechecking/ (aka desugaring, tcTyClDecl) phase+  fails, because the call (T2 Type a) in the RHS is ill-kinded.++  We'd really prefer all errors to show up in the kind checking+  phase.++* This algorithm still accepts (in all phases)+     data T3 ka (a::ka) = forall b. MkT3 (T3 Type b)+  although T3 is really polymorphic-recursive too.+  Perhaps we should somehow reject that.++Note [Kind-checking tyvar binders for associated types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When kind-checking the type-variable binders for associated+   data/newtype decls+   family decls+we behave specially for type variables that are already in scope;+that is, bound by the enclosing class decl.  This is done in+kcLHsQTyVarBndrs:+  * The use of tcImplicitQTKBndrs+  * The tcLookupLocal_maybe code in kc_hs_tv++See Note [Associated type tyvar names] in Class and+    Note [TyVar binders for associated decls] in GHC.Hs.Decls++We must do the same for family instance decls, where the in-scope+variables may be bound by the enclosing class instance decl.+Hence the use of tcImplicitQTKBndrs in tcFamTyPatsAndGen.++Note [Kind variable ordering for associated types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+What should be the kind of `T` in the following example? (#15591)++  class C (a :: Type) where+    type T (x :: f a)++As per Note [Ordering of implicit variables] in RnTypes, we want to quantify+the kind variables in left-to-right order of first occurrence in order to+support visible kind application. But we cannot perform this analysis on just+T alone, since its variable `a` actually occurs /before/ `f` if you consider+the fact that `a` was previously bound by the parent class `C`. That is to say,+the kind of `T` should end up being:++  T :: forall a f. f a -> Type++(It wouldn't necessarily be /wrong/ if the kind ended up being, say,+forall f a. f a -> Type, but that would not be as predictable for users of+visible kind application.)++In contrast, if `T` were redefined to be a top-level type family, like `T2`+below:++  type family T2 (x :: f (a :: Type))++Then `a` first appears /after/ `f`, so the kind of `T2` should be:++  T2 :: forall f a. f a -> Type++In order to make this distinction, we need to know (in kcCheckDeclHeader) which+type variables have been bound by the parent class (if there is one). With+the class-bound variables in hand, we can ensure that we always quantify+these first.+-}+++{- *********************************************************************+*                                                                      *+             Expected kinds+*                                                                      *+********************************************************************* -}++-- | Describes the kind expected in a certain context.+data ContextKind = TheKind Kind   -- ^ a specific kind+                 | AnyKind        -- ^ any kind will do+                 | OpenKind       -- ^ something of the form @TYPE _@++-----------------------+newExpectedKind :: ContextKind -> TcM Kind+newExpectedKind (TheKind k) = return k+newExpectedKind AnyKind     = newMetaKindVar+newExpectedKind OpenKind    = newOpenTypeKind++-----------------------+expectedKindInCtxt :: UserTypeCtxt -> ContextKind+-- Depending on the context, we might accept any kind (for instance, in a TH+-- splice), or only certain kinds (like in type signatures).+expectedKindInCtxt (TySynCtxt _)   = AnyKind+expectedKindInCtxt ThBrackCtxt     = AnyKind+expectedKindInCtxt (GhciCtxt {})   = AnyKind+-- The types in a 'default' decl can have varying kinds+-- See Note [Extended defaults]" in TcEnv+expectedKindInCtxt DefaultDeclCtxt     = AnyKind+expectedKindInCtxt TypeAppCtxt         = AnyKind+expectedKindInCtxt (ForSigCtxt _)      = TheKind liftedTypeKind+expectedKindInCtxt (InstDeclCtxt {})   = TheKind constraintKind+expectedKindInCtxt SpecInstCtxt        = TheKind constraintKind+expectedKindInCtxt _                   = OpenKind+++{- *********************************************************************+*                                                                      *+             Bringing type variables into scope+*                                                                      *+********************************************************************* -}++--------------------------------------+-- Implicit binders+--------------------------------------++bindImplicitTKBndrs_Skol, bindImplicitTKBndrs_Tv,+  bindImplicitTKBndrs_Q_Skol, bindImplicitTKBndrs_Q_Tv+  :: [Name] -> TcM a -> TcM ([TcTyVar], a)+bindImplicitTKBndrs_Skol   = bindImplicitTKBndrsX newFlexiKindedSkolemTyVar+bindImplicitTKBndrs_Tv     = bindImplicitTKBndrsX newFlexiKindedTyVarTyVar+bindImplicitTKBndrs_Q_Skol = bindImplicitTKBndrsX (newImplicitTyVarQ newFlexiKindedSkolemTyVar)+bindImplicitTKBndrs_Q_Tv   = bindImplicitTKBndrsX (newImplicitTyVarQ newFlexiKindedTyVarTyVar)++bindImplicitTKBndrsX+   :: (Name -> TcM TcTyVar) -- new_tv function+   -> [Name]+   -> TcM a+   -> TcM ([TcTyVar], a)   -- Returned [TcTyVar] are in 1-1 correspondence+                           -- with the passed in [Name]+bindImplicitTKBndrsX new_tv tv_names thing_inside+  = do { tkvs <- mapM new_tv tv_names+       ; traceTc "bindImplicitTKBndrs" (ppr tv_names $$ ppr tkvs)+       ; res <- tcExtendNameTyVarEnv (tv_names `zip` tkvs)+                thing_inside+       ; return (tkvs, res) }++newImplicitTyVarQ :: (Name -> TcM TcTyVar) ->  Name -> TcM TcTyVar+-- Behave like new_tv, except that if the tyvar is in scope, use it+newImplicitTyVarQ new_tv name+  = do { mb_tv <- tcLookupLcl_maybe name+       ; case mb_tv of+           Just (ATyVar _ tv) -> return tv+           _ -> new_tv name }++newFlexiKindedTyVar :: (Name -> Kind -> TcM TyVar) -> Name -> TcM TyVar+newFlexiKindedTyVar new_tv name+  = do { kind <- newMetaKindVar+       ; new_tv name kind }++newFlexiKindedSkolemTyVar :: Name -> TcM TyVar+newFlexiKindedSkolemTyVar = newFlexiKindedTyVar newSkolemTyVar++newFlexiKindedTyVarTyVar :: Name -> TcM TyVar+newFlexiKindedTyVarTyVar = newFlexiKindedTyVar newTyVarTyVar+   -- See Note [Unification variables need fresh Names] in TcMType++--------------------------------------+-- Explicit binders+--------------------------------------++bindExplicitTKBndrs_Skol, bindExplicitTKBndrs_Tv+    :: [LHsTyVarBndr GhcRn]+    -> TcM a+    -> TcM ([TcTyVar], a)++bindExplicitTKBndrs_Skol = bindExplicitTKBndrsX (tcHsTyVarBndr newSkolemTyVar)+bindExplicitTKBndrs_Tv   = bindExplicitTKBndrsX (tcHsTyVarBndr newTyVarTyVar)++bindExplicitTKBndrs_Q_Skol, bindExplicitTKBndrs_Q_Tv+    :: ContextKind+    -> [LHsTyVarBndr GhcRn]+    -> TcM a+    -> TcM ([TcTyVar], a)++bindExplicitTKBndrs_Q_Skol ctxt_kind = bindExplicitTKBndrsX (tcHsQTyVarBndr ctxt_kind newSkolemTyVar)+bindExplicitTKBndrs_Q_Tv   ctxt_kind = bindExplicitTKBndrsX (tcHsQTyVarBndr ctxt_kind newTyVarTyVar)++bindExplicitTKBndrsX+    :: (HsTyVarBndr GhcRn -> TcM TcTyVar)+    -> [LHsTyVarBndr GhcRn]+    -> TcM a+    -> TcM ([TcTyVar], a)  -- Returned [TcTyVar] are in 1-1 correspondence+                           -- with the passed-in [LHsTyVarBndr]+bindExplicitTKBndrsX tc_tv hs_tvs thing_inside+  = do { traceTc "bindExplicTKBndrs" (ppr hs_tvs)+       ; go hs_tvs }+  where+    go [] = do { res <- thing_inside+               ; return ([], res) }+    go (L _ hs_tv : hs_tvs)+       = do { tv <- tc_tv hs_tv+            -- Extend the environment as we go, in case a binder+            -- is mentioned in the kind of a later binder+            --   e.g. forall k (a::k). blah+            -- NB: tv's Name may differ from hs_tv's+            -- See TcMType Note [Unification variables need fresh Names]+            ; (tvs,res) <- tcExtendNameTyVarEnv [(hsTyVarName hs_tv, tv)] $+                           go hs_tvs+            ; return (tv:tvs, res) }++-----------------+tcHsTyVarBndr :: (Name -> Kind -> TcM TyVar)+              -> HsTyVarBndr GhcRn -> TcM TcTyVar+-- Returned TcTyVar has the same name; no cloning+tcHsTyVarBndr new_tv (UserTyVar _ (L _ tv_nm))+  = do { kind <- newMetaKindVar+       ; new_tv tv_nm kind }+tcHsTyVarBndr new_tv (KindedTyVar _ (L _ tv_nm) lhs_kind)+  = do { kind <- tcLHsKindSig (TyVarBndrKindCtxt tv_nm) lhs_kind+       ; new_tv tv_nm kind }+tcHsTyVarBndr _ (XTyVarBndr nec) = noExtCon nec++-----------------+tcHsQTyVarBndr :: ContextKind+               -> (Name -> Kind -> TcM TyVar)+               -> HsTyVarBndr GhcRn -> TcM TcTyVar+-- Just like tcHsTyVarBndr, but also+--   - uses the in-scope TyVar from class, if it exists+--   - takes a ContextKind to use for the no-sig case+tcHsQTyVarBndr ctxt_kind new_tv (UserTyVar _ (L _ tv_nm))+  = do { mb_tv <- tcLookupLcl_maybe tv_nm+       ; case mb_tv of+           Just (ATyVar _ tv) -> return tv+           _ -> do { kind <- newExpectedKind ctxt_kind+                   ; new_tv tv_nm kind } }++tcHsQTyVarBndr _ new_tv (KindedTyVar _ (L _ tv_nm) lhs_kind)+  = do { kind <- tcLHsKindSig (TyVarBndrKindCtxt tv_nm) lhs_kind+       ; mb_tv <- tcLookupLcl_maybe tv_nm+       ; case mb_tv of+           Just (ATyVar _ tv)+             -> do { discardResult $ unifyKind (Just hs_tv)+                                        kind (tyVarKind tv)+                       -- This unify rejects:+                       --    class C (m :: * -> *) where+                       --      type F (m :: *) = ...+                   ; return tv }++           _ -> new_tv tv_nm kind }+  where+    hs_tv = HsTyVar noExtField NotPromoted (noLoc tv_nm)+            -- Used for error messages only++tcHsQTyVarBndr _ _ (XTyVarBndr nec) = noExtCon nec++--------------------------------------+-- Binding type/class variables in the+-- kind-checking and typechecking phases+--------------------------------------++bindTyClTyVars :: Name+               -> ([TyConBinder] -> Kind -> TcM a) -> TcM a+-- ^ Used for the type variables of a type or class decl+-- in the "kind checking" and "type checking" pass,+-- but not in the initial-kind run.+bindTyClTyVars tycon_name thing_inside+  = do { tycon <- kcLookupTcTyCon tycon_name+       ; let scoped_prs = tcTyConScopedTyVars tycon+             res_kind   = tyConResKind tycon+             binders    = tyConBinders tycon+       ; traceTc "bindTyClTyVars" (ppr tycon_name <+> ppr binders $$ ppr scoped_prs)+       ; tcExtendNameTyVarEnv scoped_prs $+         thing_inside binders res_kind }++-- inferInitialKind has made a suitably-shaped kind for the type or class+-- Look it up in the local environment. This is used only for tycons+-- that we're currently type-checking, so we're sure to find a TcTyCon.+kcLookupTcTyCon :: Name -> TcM TcTyCon+kcLookupTcTyCon nm+  = do { tc_ty_thing <- tcLookup nm+       ; return $ case tc_ty_thing of+           ATcTyCon tc -> tc+           _           -> pprPanic "kcLookupTcTyCon" (ppr tc_ty_thing) }+++{- *********************************************************************+*                                                                      *+             Kind generalisation+*                                                                      *+********************************************************************* -}++zonkAndScopedSort :: [TcTyVar] -> TcM [TcTyVar]+zonkAndScopedSort spec_tkvs+  = do { spec_tkvs <- mapM zonkAndSkolemise spec_tkvs+          -- Use zonkAndSkolemise because a skol_tv might be a TyVarTv++       -- Do a stable topological sort, following+       -- Note [Ordering of implicit variables] in RnTypes+       ; return (scopedSort spec_tkvs) }++-- | Generalize some of the free variables in the given type.+-- All such variables should be *kind* variables; any type variables+-- should be explicitly quantified (with a `forall`) before now.+-- The supplied predicate says which free variables to quantify.+-- But in all cases,+-- generalize only those variables whose TcLevel is strictly greater+-- than the ambient level. This "strictly greater than" means that+-- you likely need to push the level before creating whatever type+-- gets passed here. Any variable whose level is greater than the+-- ambient level but is not selected to be generalized will be+-- promoted. (See [Promoting unification variables] in TcSimplify+-- and Note [Recipe for checking a signature].)+-- The resulting KindVar are the variables to+-- quantify over, in the correct, well-scoped order. They should+-- generally be Inferred, not Specified, but that's really up to+-- the caller of this function.+kindGeneralizeSome :: (TcTyVar -> Bool)+                   -> TcType    -- ^ needn't be zonked+                   -> TcM [KindVar]+kindGeneralizeSome should_gen kind_or_type+  = do { traceTc "kindGeneralizeSome {" (ppr kind_or_type)++         -- use the "Kind" variant here, as any types we see+         -- here will already have all type variables quantified;+         -- thus, every free variable is really a kv, never a tv.+       ; dvs <- candidateQTyVarsOfKind kind_or_type++       -- So 'dvs' are the variables free in kind_or_type, with a level greater+       -- than the ambient level, hence candidates for quantification+       -- Next: filter out the ones we don't want to generalize (specified by should_gen)+       -- and promote them instead++       ; let (to_promote, dvs') = partitionCandidates dvs (not . should_gen)++       ; (_, promoted) <- promoteTyVarSet (dVarSetToVarSet to_promote)+       ; qkvs <- quantifyTyVars dvs'++       ; traceTc "kindGeneralizeSome }" $+         vcat [ text "Kind or type:" <+> ppr kind_or_type+              , text "dvs:" <+> ppr dvs+              , text "dvs':" <+> ppr dvs'+              , text "to_promote:" <+> pprTyVars (dVarSetElems to_promote)+              , text "promoted:" <+> pprTyVars (nonDetEltsUniqSet promoted)+              , text "qkvs:" <+> pprTyVars qkvs ]++       ; return qkvs }++-- | Specialized version of 'kindGeneralizeSome', but where all variables+-- can be generalized. Use this variant when you can be sure that no more+-- constraints on the type's metavariables will arise or be solved.+kindGeneralizeAll :: TcType  -- needn't be zonked+                  -> TcM [KindVar]+kindGeneralizeAll ty = do { traceTc "kindGeneralizeAll" empty+                          ; kindGeneralizeSome (const True) ty }++-- | Specialized version of 'kindGeneralizeSome', but where no variables+-- can be generalized. Use this variant when it is unknowable whether metavariables+-- might later be constrained.+-- See Note [Recipe for checking a signature] for why and where this+-- function is needed.+kindGeneralizeNone :: TcType  -- needn't be zonked+                   -> TcM ()+kindGeneralizeNone ty+  = do { traceTc "kindGeneralizeNone" empty+       ; kvs <- kindGeneralizeSome (const False) ty+       ; MASSERT( null kvs )+       }++{- Note [Levels and generalisation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  f x = e+with no type signature. We are currently at level i.+We must+  * Push the level to level (i+1)+  * Allocate a fresh alpha[i+1] for the result type+  * Check that e :: alpha[i+1], gathering constraint WC+  * Solve WC as far as possible+  * Zonking the result type alpha[i+1], say to beta[i-1] -> gamma[i]+  * Find the free variables with level > i, in this case gamma[i]+  * Skolemise those free variables and quantify over them, giving+       f :: forall g. beta[i-1] -> g+  * Emit the residiual constraint wrapped in an implication for g,+    thus   forall g. WC++All of this happens for types too.  Consider+  f :: Int -> (forall a. Proxy a -> Int)++Note [Kind generalisation]+~~~~~~~~~~~~~~~~~~~~~~~~~~+We do kind generalisation only at the outer level of a type signature.+For example, consider+  T :: forall k. k -> *+  f :: (forall a. T a -> Int) -> Int+When kind-checking f's type signature we generalise the kind at+the outermost level, thus:+  f1 :: forall k. (forall (a:k). T k a -> Int) -> Int  -- YES!+and *not* at the inner forall:+  f2 :: (forall k. forall (a:k). T k a -> Int) -> Int  -- NO!+Reason: same as for HM inference on value level declarations,+we want to infer the most general type.  The f2 type signature+would be *less applicable* than f1, because it requires a more+polymorphic argument.++NB: There are no explicit kind variables written in f's signature.+When there are, the renamer adds these kind variables to the list of+variables bound by the forall, so you can indeed have a type that's+higher-rank in its kind. But only by explicit request.++Note [Kinds of quantified type variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+tcTyVarBndrsGen quantifies over a specified list of type variables,+*and* over the kind variables mentioned in the kinds of those tyvars.++Note that we must zonk those kinds (obviously) but less obviously, we+must return type variables whose kinds are zonked too. Example+    (a :: k7)  where  k7 := k9 -> k9+We must return+    [k9, a:k9->k9]+and NOT+    [k9, a:k7]+Reason: we're going to turn this into a for-all type,+   forall k9. forall (a:k7). blah+which the type checker will then instantiate, and instantiate does not+look through unification variables!++Hence using zonked_kinds when forming tvs'.++-}++-----------------------------------+etaExpandAlgTyCon :: [TyConBinder]+                  -> Kind+                  -> TcM ([TyConBinder], Kind)+-- GADT decls can have a (perhaps partial) kind signature+--      e.g.  data T a :: * -> * -> * where ...+-- This function makes up suitable (kinded) TyConBinders for the+-- argument kinds.  E.g. in this case it might return+--   ([b::*, c::*], *)+-- Never emits constraints.+-- It's a little trickier than you might think: see+-- Note [TyConBinders for the result kind signature of a data type]+etaExpandAlgTyCon tc_bndrs kind+  = do  { loc     <- getSrcSpanM+        ; uniqs   <- newUniqueSupply+        ; rdr_env <- getLocalRdrEnv+        ; let new_occs = [ occ+                         | str <- allNameStrings+                         , let occ = mkOccName tvName str+                         , isNothing (lookupLocalRdrOcc rdr_env occ)+                         -- Note [Avoid name clashes for associated data types]+                         , not (occ `elem` lhs_occs) ]+              new_uniqs = uniqsFromSupply uniqs+              subst = mkEmptyTCvSubst (mkInScopeSet (mkVarSet lhs_tvs))+        ; return (go loc new_occs new_uniqs subst [] kind) }+  where+    lhs_tvs  = map binderVar tc_bndrs+    lhs_occs = map getOccName lhs_tvs++    go loc occs uniqs subst acc kind+      = case splitPiTy_maybe kind of+          Nothing -> (reverse acc, substTy subst kind)++          Just (Anon af arg, kind')+            -> go loc occs' uniqs' subst' (tcb : acc) kind'+            where+              arg'   = substTy subst arg+              tv     = mkTyVar (mkInternalName uniq occ loc) arg'+              subst' = extendTCvInScope subst tv+              tcb    = Bndr tv (AnonTCB af)+              (uniq:uniqs') = uniqs+              (occ:occs')   = occs++          Just (Named (Bndr tv vis), kind')+            -> go loc occs uniqs subst' (tcb : acc) kind'+            where+              (subst', tv') = substTyVarBndr subst tv+              tcb = Bndr tv' (NamedTCB vis)++-- | A description of whether something is a+--+-- * @data@ or @newtype@ ('DataDeclSort')+--+-- * @data instance@ or @newtype instance@ ('DataInstanceSort')+--+-- * @data family@ ('DataFamilySort')+--+-- At present, this data type is only consumed by 'checkDataKindSig'.+data DataSort+  = DataDeclSort     NewOrData+  | DataInstanceSort NewOrData+  | DataFamilySort++-- | Checks that the return kind in a data declaration's kind signature is+-- permissible. There are three cases:+--+-- If dealing with a @data@, @newtype@, @data instance@, or @newtype instance@+-- declaration, check that the return kind is @Type@.+--+-- If the declaration is a @newtype@ or @newtype instance@ and the+-- @UnliftedNewtypes@ extension is enabled, this check is slightly relaxed so+-- that a return kind of the form @TYPE r@ (for some @r@) is permitted.+-- See @Note [Implementation of UnliftedNewtypes]@ in "TcTyClsDecls".+--+-- If dealing with a @data family@ declaration, check that the return kind is+-- either of the form:+--+-- 1. @TYPE r@ (for some @r@), or+--+-- 2. @k@ (where @k@ is a bare kind variable; see #12369)+checkDataKindSig :: DataSort -> Kind -> TcM ()+checkDataKindSig data_sort kind = do+  dflags <- getDynFlags+  checkTc (is_TYPE_or_Type dflags || is_kind_var) (err_msg dflags)+  where+    pp_dec :: SDoc+    pp_dec = text $+      case data_sort of+        DataDeclSort     DataType -> "data type"+        DataDeclSort     NewType  -> "newtype"+        DataInstanceSort DataType -> "data instance"+        DataInstanceSort NewType  -> "newtype instance"+        DataFamilySort            -> "data family"++    is_newtype :: Bool+    is_newtype =+      case data_sort of+        DataDeclSort     new_or_data -> new_or_data == NewType+        DataInstanceSort new_or_data -> new_or_data == NewType+        DataFamilySort               -> False++    is_data_family :: Bool+    is_data_family =+      case data_sort of+        DataDeclSort{}     -> False+        DataInstanceSort{} -> False+        DataFamilySort     -> True++    tYPE_ok :: DynFlags -> Bool+    tYPE_ok dflags =+         (is_newtype && xopt LangExt.UnliftedNewtypes dflags)+           -- With UnliftedNewtypes, we allow kinds other than Type, but they+           -- must still be of the form `TYPE r` since we don't want to accept+           -- Constraint or Nat.+           -- See Note [Implementation of UnliftedNewtypes] in TcTyClsDecls.+      || is_data_family+           -- If this is a `data family` declaration, we don't need to check if+           -- UnliftedNewtypes is enabled, since data family declarations can+           -- have return kind `TYPE r` unconditionally (#16827).++    is_TYPE :: Bool+    is_TYPE = tcIsRuntimeTypeKind kind++    is_TYPE_or_Type :: DynFlags -> Bool+    is_TYPE_or_Type dflags | tYPE_ok dflags = is_TYPE+                           | otherwise      = tcIsLiftedTypeKind kind++    -- In the particular case of a data family, permit a return kind of the+    -- form `:: k` (where `k` is a bare kind variable).+    is_kind_var :: Bool+    is_kind_var | is_data_family = isJust (tcGetCastedTyVar_maybe kind)+                | otherwise      = False++    err_msg :: DynFlags -> SDoc+    err_msg dflags =+      sep [ (sep [ text "Kind signature on" <+> pp_dec <+>+                   text "declaration has non-" <>+                   (if tYPE_ok dflags then text "TYPE" else ppr liftedTypeKind)+                 , (if is_data_family then text "and non-variable" else empty) <+>+                   text "return kind" <+> quotes (ppr kind) ])+          , if not (tYPE_ok dflags) && is_TYPE && is_newtype &&+               not (xopt LangExt.UnliftedNewtypes dflags)+            then text "Perhaps you intended to use UnliftedNewtypes"+            else empty ]++-- | Checks that the result kind of a class is exactly `Constraint`, rejecting+-- type synonyms and type families that reduce to `Constraint`. See #16826.+checkClassKindSig :: Kind -> TcM ()+checkClassKindSig kind = checkTc (tcIsConstraintKind kind) err_msg+  where+    err_msg :: SDoc+    err_msg =+      text "Kind signature on a class must end with" <+> ppr constraintKind $$+      text "unobscured by type families"++tcbVisibilities :: TyCon -> [Type] -> [TyConBndrVis]+-- Result is in 1-1 correpondence with orig_args+tcbVisibilities tc orig_args+  = go (tyConKind tc) init_subst orig_args+  where+    init_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfTypes orig_args))+    go _ _ []+      = []++    go fun_kind subst all_args@(arg : args)+      | Just (tcb, inner_kind) <- splitPiTy_maybe fun_kind+      = case tcb of+          Anon af _           -> AnonTCB af   : go inner_kind subst  args+          Named (Bndr tv vis) -> NamedTCB vis : go inner_kind subst' args+                 where+                    subst' = extendTCvSubst subst tv arg++      | not (isEmptyTCvSubst subst)+      = go (substTy subst fun_kind) init_subst all_args++      | otherwise+      = pprPanic "addTcbVisibilities" (ppr tc <+> ppr orig_args)+++{- Note [TyConBinders for the result kind signature of a data type]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Given+  data T (a::*) :: * -> forall k. k -> *+we want to generate the extra TyConBinders for T, so we finally get+  (a::*) (b::*) (k::*) (c::k)+The function etaExpandAlgTyCon generates these extra TyConBinders from+the result kind signature.++We need to take care to give the TyConBinders+  (a) OccNames that are fresh (because the TyConBinders of a TyCon+      must have distinct OccNames++  (b) Uniques that are fresh (obviously)++For (a) we need to avoid clashes with the tyvars declared by+the user before the "::"; in the above example that is 'a'.+And also see Note [Avoid name clashes for associated data types].++For (b) suppose we have+   data T :: forall k. k -> forall k. k -> *+where the two k's are identical even up to their uniques.  Surprisingly,+this can happen: see #14515.++It's reasonably easy to solve all this; just run down the list with a+substitution; hence the recursive 'go' function.  But it has to be+done.++Note [Avoid name clashes for associated data types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider    class C a b where+               data D b :: * -> *+When typechecking the decl for D, we'll invent an extra type variable+for D, to fill out its kind.  Ideally we don't want this type variable+to be 'a', because when pretty printing we'll get+            class C a b where+               data D b a0+(NB: the tidying happens in the conversion to IfaceSyn, which happens+as part of pretty-printing a TyThing.)++That's why we look in the LocalRdrEnv to see what's in scope. This is+important only to get nice-looking output when doing ":info C" in GHCi.+It isn't essential for correctness.+++************************************************************************+*                                                                      *+             Partial signatures+*                                                                      *+************************************************************************++-}++tcHsPartialSigType+  :: UserTypeCtxt+  -> LHsSigWcType GhcRn       -- The type signature+  -> TcM ( [(Name, TcTyVar)]  -- Wildcards+         , Maybe TcType       -- Extra-constraints wildcard+         , [(Name,TcTyVar)]   -- Original tyvar names, in correspondence with+                              --   the implicitly and explicitly bound type variables+         , TcThetaType        -- Theta part+         , TcType )           -- Tau part+-- See Note [Checking partial type signatures]+tcHsPartialSigType ctxt sig_ty+  | HsWC { hswc_ext  = sig_wcs, hswc_body = ib_ty } <- sig_ty+  , HsIB { hsib_ext = implicit_hs_tvs+         , hsib_body = hs_ty } <- ib_ty+  , (explicit_hs_tvs, L _ hs_ctxt, hs_tau) <- splitLHsSigmaTyInvis hs_ty+  = addSigCtxt ctxt hs_ty $+    do { (implicit_tvs, (explicit_tvs, (wcs, wcx, theta, tau)))+            <- solveLocalEqualities "tcHsPartialSigType"    $+                 -- This solveLocalEqualiltes fails fast if there are+                 -- insoluble equalities. See TcSimplify+                 -- Note [Fail fast if there are insoluble kind equalities]+               tcNamedWildCardBinders sig_wcs $ \ wcs ->+               bindImplicitTKBndrs_Tv implicit_hs_tvs       $+               bindExplicitTKBndrs_Tv explicit_hs_tvs       $+               do {   -- Instantiate the type-class context; but if there+                      -- is an extra-constraints wildcard, just discard it here+                    (theta, wcx) <- tcPartialContext hs_ctxt++                  ; tau <- tcHsOpenType hs_tau++                  ; return (wcs, wcx, theta, tau) }++         -- No kind-generalization here:+       ; kindGeneralizeNone (mkSpecForAllTys implicit_tvs $+                             mkSpecForAllTys explicit_tvs $+                             mkPhiTy theta $+                             tau)++       -- Spit out the wildcards (including the extra-constraints one)+       -- as "hole" constraints, so that they'll be reported if necessary+       -- See Note [Extra-constraint holes in partial type signatures]+       ; emitNamedWildCardHoleConstraints wcs++         -- We return a proper (Name,TyVar) environment, to be sure that+         -- we bring the right name into scope in the function body.+         -- Test case: partial-sigs/should_compile/LocalDefinitionBug+       ; let tv_prs = (implicit_hs_tvs                  `zip` implicit_tvs)+                      ++ (hsLTyVarNames explicit_hs_tvs `zip` explicit_tvs)++      -- NB: checkValidType on the final inferred type will be+      --     done later by checkInferredPolyId.  We can't do it+      --     here because we don't have a complete tuype to check++       ; traceTc "tcHsPartialSigType" (ppr tv_prs)+       ; return (wcs, wcx, tv_prs, theta, tau) }++tcHsPartialSigType _ (HsWC _ (XHsImplicitBndrs nec)) = noExtCon nec+tcHsPartialSigType _ (XHsWildCardBndrs nec) = noExtCon nec++tcPartialContext :: HsContext GhcRn -> TcM (TcThetaType, Maybe TcType)+tcPartialContext hs_theta+  | Just (hs_theta1, hs_ctxt_last) <- snocView hs_theta+  , L wc_loc wc@(HsWildCardTy _) <- ignoreParens hs_ctxt_last+  = do { wc_tv_ty <- setSrcSpan wc_loc $+                     tcAnonWildCardOcc wc constraintKind+       ; theta <- mapM tcLHsPredType hs_theta1+       ; return (theta, Just wc_tv_ty) }+  | otherwise+  = do { theta <- mapM tcLHsPredType hs_theta+       ; return (theta, Nothing) }++{- Note [Checking partial type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also Note [Recipe for checking a signature]++When we have a parital signature like+   f,g :: forall a. a -> _+we do the following++* In TcSigs.tcUserSigType we return a PartialSig, which (unlike+  the companion CompleteSig) contains the original, as-yet-unchecked+  source-code LHsSigWcType++* Then, for f and g /separately/, we call tcInstSig, which in turn+  call tchsPartialSig (defined near this Note).  It kind-checks the+  LHsSigWcType, creating fresh unification variables for each "_"+  wildcard.  It's important that the wildcards for f and g are distinct+  becase they migh get instantiated completely differently.  E.g.+     f,g :: forall a. a -> _+     f x = a+     g x = True+  It's really as if we'd written two distinct signatures.++* Note that we don't make quantified type (forall a. blah) and then+  instantiate it -- it makes no sense to instantiate a type with+  wildcards in it.  Rather, tcHsPartialSigType just returns the+  'a' and the 'blah' separately.++  Nor, for the same reason, do we push a level in tcHsPartialSigType.++Note [Extra-constraint holes in partial type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  f :: (_) => a -> a+  f x = ...++* The renamer leaves '_' untouched.++* Then, in tcHsPartialSigType, we make a new hole TcTyVar, in+  tcWildCardBinders.++* TcBinds.chooseInferredQuantifiers fills in that hole TcTyVar+  with the inferred constraints, e.g. (Eq a, Show a)++* TcErrors.mkHoleError finally reports the error.++An annoying difficulty happens if there are more than 62 inferred+constraints. Then we need to fill in the TcTyVar with (say) a 70-tuple.+Where do we find the TyCon?  For good reasons we only have constraint+tuples up to 62 (see Note [How tuples work] in TysWiredIn).  So how+can we make a 70-tuple?  This was the root cause of #14217.++It's incredibly tiresome, because we only need this type to fill+in the hole, to communicate to the error reporting machinery.  Nothing+more.  So I use a HACK:++* I make an /ordinary/ tuple of the constraints, in+  TcBinds.chooseInferredQuantifiers. This is ill-kinded because+  ordinary tuples can't contain constraints, but it works fine. And for+  ordinary tuples we don't have the same limit as for constraint+  tuples (which need selectors and an assocated class).++* Because it is ill-kinded, it trips an assert in writeMetaTyVar,+  so now I disable the assertion if we are writing a type of+  kind Constraint.  (That seldom/never normally happens so we aren't+  losing much.)++Result works fine, but it may eventually bite us.+++************************************************************************+*                                                                      *+      Pattern signatures (i.e signatures that occur in patterns)+*                                                                      *+********************************************************************* -}++tcHsPatSigType :: UserTypeCtxt+               -> LHsSigWcType GhcRn          -- The type signature+               -> TcM ( [(Name, TcTyVar)]     -- Wildcards+                      , [(Name, TcTyVar)]     -- The new bit of type environment, binding+                                              -- the scoped type variables+                      , TcType)       -- The type+-- Used for type-checking type signatures in+-- (a) patterns           e.g  f (x::Int) = e+-- (b) RULE forall bndrs  e.g. forall (x::Int). f x = x+--+-- This may emit constraints+-- See Note [Recipe for checking a signature]+tcHsPatSigType ctxt sig_ty+  | HsWC { hswc_ext = sig_wcs,   hswc_body = ib_ty } <- sig_ty+  , HsIB { hsib_ext = sig_ns+         , hsib_body = hs_ty } <- ib_ty+  = addSigCtxt ctxt hs_ty $+    do { sig_tkv_prs <- mapM new_implicit_tv sig_ns+       ; (wcs, sig_ty)+            <- solveLocalEqualities "tcHsPatSigType" $+                 -- Always solve local equalities if possible,+                 -- else casts get in the way of deep skolemisation+                 -- (#16033)+               tcNamedWildCardBinders sig_wcs        $ \ wcs ->+               tcExtendNameTyVarEnv sig_tkv_prs $+               do { sig_ty <- tcHsOpenType hs_ty+                  ; return (wcs, sig_ty) }++        ; emitNamedWildCardHoleConstraints wcs++          -- sig_ty might have tyvars that are at a higher TcLevel (if hs_ty+          -- contains a forall). Promote these.+          -- Ex: f (x :: forall a. Proxy a -> ()) = ... x ...+          -- When we instantiate x, we have to compare the kind of the argument+          -- to a's kind, which will be a metavariable.+          -- kindGeneralizeNone does this:+        ; kindGeneralizeNone sig_ty+        ; sig_ty <- zonkTcType sig_ty+        ; checkValidType ctxt sig_ty++        ; traceTc "tcHsPatSigType" (ppr sig_tkv_prs)+        ; return (wcs, sig_tkv_prs, sig_ty) }+  where+    new_implicit_tv name+      = do { kind <- newMetaKindVar+           ; tv   <- case ctxt of+                       RuleSigCtxt {} -> newSkolemTyVar name kind+                       _              -> newPatSigTyVar name kind+                       -- See Note [Pattern signature binders]+             -- NB: tv's Name may be fresh (in the case of newPatSigTyVar)+           ; return (name, tv) }++tcHsPatSigType _ (HsWC _ (XHsImplicitBndrs nec)) = noExtCon nec+tcHsPatSigType _ (XHsWildCardBndrs nec)          = noExtCon nec++tcPatSig :: Bool                    -- True <=> pattern binding+         -> LHsSigWcType GhcRn+         -> ExpSigmaType+         -> TcM (TcType,            -- The type to use for "inside" the signature+                 [(Name,TcTyVar)],  -- The new bit of type environment, binding+                                    -- the scoped type variables+                 [(Name,TcTyVar)],  -- The wildcards+                 HsWrapper)         -- Coercion due to unification with actual ty+                                    -- Of shape:  res_ty ~ sig_ty+tcPatSig in_pat_bind sig res_ty+ = do  { (sig_wcs, sig_tvs, sig_ty) <- tcHsPatSigType PatSigCtxt sig+        -- sig_tvs are the type variables free in 'sig',+        -- and not already in scope. These are the ones+        -- that should be brought into scope++        ; if null sig_tvs then do {+                -- Just do the subsumption check and return+                  wrap <- addErrCtxtM (mk_msg sig_ty) $+                          tcSubTypeET PatSigOrigin PatSigCtxt res_ty sig_ty+                ; return (sig_ty, [], sig_wcs, wrap)+        } else do+                -- Type signature binds at least one scoped type variable++                -- A pattern binding cannot bind scoped type variables+                -- It is more convenient to make the test here+                -- than in the renamer+        { when in_pat_bind (addErr (patBindSigErr sig_tvs))++        -- Now do a subsumption check of the pattern signature against res_ty+        ; wrap <- addErrCtxtM (mk_msg sig_ty) $+                  tcSubTypeET PatSigOrigin PatSigCtxt res_ty sig_ty++        -- Phew!+        ; return (sig_ty, sig_tvs, sig_wcs, wrap)+        } }+  where+    mk_msg sig_ty tidy_env+       = do { (tidy_env, sig_ty) <- zonkTidyTcType tidy_env sig_ty+            ; res_ty <- readExpType res_ty   -- should be filled in by now+            ; (tidy_env, res_ty) <- zonkTidyTcType tidy_env res_ty+            ; let msg = vcat [ hang (text "When checking that the pattern signature:")+                                  4 (ppr sig_ty)+                             , nest 2 (hang (text "fits the type of its context:")+                                          2 (ppr res_ty)) ]+            ; return (tidy_env, msg) }++patBindSigErr :: [(Name,TcTyVar)] -> SDoc+patBindSigErr sig_tvs+  = hang (text "You cannot bind scoped type variable" <> plural sig_tvs+          <+> pprQuotedList (map fst sig_tvs))+       2 (text "in a pattern binding signature")++{- Note [Pattern signature binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also Note [Type variables in the type environment] in TcRnTypes.+Consider++  data T where+    MkT :: forall a. a -> (a -> Int) -> T++  f :: T -> ...+  f (MkT x (f :: b -> c)) = <blah>++Here+ * The pattern (MkT p1 p2) creates a *skolem* type variable 'a_sk',+   It must be a skolem so that that it retains its identity, and+   TcErrors.getSkolemInfo can thereby find the binding site for the skolem.++ * The type signature pattern (f :: b -> c) makes freshs meta-tyvars+   beta and gamma (TauTvs), and binds "b" :-> beta, "c" :-> gamma in the+   environment++ * Then unification makes beta := a_sk, gamma := Int+   That's why we must make beta and gamma a MetaTv,+   not a SkolemTv, so that it can unify to a_sk (or Int, respectively).++ * Finally, in '<blah>' we have the envt "b" :-> beta, "c" :-> gamma,+   so we return the pairs ("b" :-> beta, "c" :-> gamma) from tcHsPatSigType,++Another example (#13881):+   fl :: forall (l :: [a]). Sing l -> Sing l+   fl (SNil :: Sing (l :: [y])) = SNil+When we reach the pattern signature, 'l' is in scope from the+outer 'forall':+   "a" :-> a_sk :: *+   "l" :-> l_sk :: [a_sk]+We make up a fresh meta-TauTv, y_sig, for 'y', and kind-check+the pattern signature+   Sing (l :: [y])+That unifies y_sig := a_sk.  We return from tcHsPatSigType with+the pair ("y" :-> y_sig).++For RULE binders, though, things are a bit different (yuk).+  RULE "foo" forall (x::a) (y::[a]).  f x y = ...+Here this really is the binding site of the type variable so we'd like+to use a skolem, so that we get a complaint if we unify two of them+together.  Hence the new_tv function in tcHsPatSigType.+++************************************************************************+*                                                                      *+        Checking kinds+*                                                                      *+************************************************************************++-}++unifyKinds :: [LHsType GhcRn] -> [(TcType, TcKind)] -> TcM ([TcType], TcKind)+unifyKinds rn_tys act_kinds+  = do { kind <- newMetaKindVar+       ; let check rn_ty (ty, act_kind)+               = checkExpectedKind (unLoc rn_ty) ty act_kind kind+       ; tys' <- zipWithM check rn_tys act_kinds+       ; return (tys', kind) }++{-+************************************************************************+*                                                                      *+        Sort checking kinds+*                                                                      *+************************************************************************++tcLHsKindSig converts a user-written kind to an internal, sort-checked kind.+It does sort checking and desugaring at the same time, in one single pass.+-}++tcLHsKindSig :: UserTypeCtxt -> LHsKind GhcRn -> TcM Kind+tcLHsKindSig ctxt hs_kind+-- See  Note [Recipe for checking a signature] in TcHsType+-- Result is zonked+  = do { kind <- solveLocalEqualities "tcLHsKindSig" $+                 tc_lhs_kind kindLevelMode hs_kind+       ; traceTc "tcLHsKindSig" (ppr hs_kind $$ ppr kind)+       -- No generalization:+       ; kindGeneralizeNone kind+       ; kind <- zonkTcType kind+         -- This zonk is very important in the case of higher rank kinds+         -- E.g. #13879    f :: forall (p :: forall z (y::z). <blah>).+         --                          <more blah>+         --      When instantiating p's kind at occurrences of p in <more blah>+         --      it's crucial that the kind we instantiate is fully zonked,+         --      else we may fail to substitute properly++       ; checkValidType ctxt kind+       ; traceTc "tcLHsKindSig2" (ppr kind)+       ; return kind }++tc_lhs_kind :: TcTyMode -> LHsKind GhcRn -> TcM Kind+tc_lhs_kind mode k+  = addErrCtxt (text "In the kind" <+> quotes (ppr k)) $+    tc_lhs_type (kindLevel mode) k liftedTypeKind++promotionErr :: Name -> PromotionErr -> TcM a+promotionErr name err+  = failWithTc (hang (pprPECategory err <+> quotes (ppr name) <+> text "cannot be used here")+                   2 (parens reason))+  where+    reason = case err of+               ConstrainedDataConPE pred+                              -> text "it has an unpromotable context"+                                 <+> quotes (ppr pred)+               FamDataConPE   -> text "it comes from a data family instance"+               NoDataKindsTC  -> text "perhaps you intended to use DataKinds"+               NoDataKindsDC  -> text "perhaps you intended to use DataKinds"+               PatSynPE       -> text "pattern synonyms cannot be promoted"+               _ -> text "it is defined and used in the same recursive group"++{-+************************************************************************+*                                                                      *+          Error messages and such+*                                                                      *+************************************************************************+-}+  -- | If the inner action emits constraints, report them as errors and fail; -- otherwise, propagates the return value. Useful as a wrapper around
typecheck/TcInstDcls.hs view
@@ -16,7 +16,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import TcBinds import TcTyClsDecls import TcTyDecls ( addTyConsToGblEnv )@@ -29,6 +29,8 @@ import TcHsSyn import TcMType import TcType+import Constraint+import TcOrigin import BuildTyCl import Inst import ClsInst( AssocInstInfo(..), isNotAssociated )@@ -239,7 +241,7 @@ end up with non-inlined dictionaries that look like     $df = $cop |> blah which adds an extra indirection to every use, which seems stupid.  See-Trac #4138 for an example (although the regression reported there+#4138 for an example (although the regression reported there wasn't due to the indirection).  There is an awkward wrinkle though: we want to be very@@ -254,7 +256,7 @@ pragma on the dfun itself; after all, it ends up being just a cast.  There is one more dark corner to the INLINE story, even more deeply-buried.  Consider this (Trac #3772):+buried.  Consider this (#3772):      class DeepSeq a => C a where       gen :: Int -> a@@ -392,17 +394,14 @@ --   (DerivDecl) to check and process all derived class instances. tcInstDeclsDeriv   :: [DerivInfo]-  -> [LTyClDecl GhcRn]   -> [LDerivDecl GhcRn]   -> TcM (TcGblEnv, [InstInfo GhcRn], HsValBinds GhcRn)-tcInstDeclsDeriv datafam_deriv_infos tyclds derivds+tcInstDeclsDeriv deriv_infos derivds   = do th_stage <- getStage -- See Note [Deriving inside TH brackets]        if isBrackStage th_stage        then do { gbl_env <- getGblEnv                ; return (gbl_env, bagToList emptyBag, emptyValBindsOut) }-       else do { data_deriv_infos <- mkDerivInfos tyclds-               ; let deriv_infos = datafam_deriv_infos ++ data_deriv_infos-               ; (tcg_env, info_bag, valbinds) <- tcDeriving deriv_infos derivds+       else do { (tcg_env, info_bag, valbinds) <- tcDeriving deriv_infos derivds                ; return (tcg_env, bagToList info_bag, valbinds) }  addClsInsts :: [InstInfo GhcRn] -> TcM a -> TcM a@@ -433,7 +432,7 @@  there is really no point in generating the derived code for deriving( Show) and then type-checking it. This will happen at the call site-anyway, and the type check should never fail!  Moreover (Trac #6005)+anyway, and the type check should never fail!  Moreover (#6005) the scoping of the generated code inside the bracket does not seem to work out. @@ -461,7 +460,7 @@   = do { (insts, fam_insts, deriv_infos) <- tcClsInstDecl (L loc decl)        ; return (insts, fam_insts, deriv_infos) } -tcLocalInstDecl (L _ (XInstDecl _)) = panic "tcLocalInstDecl"+tcLocalInstDecl (L _ (XInstDecl nec)) = noExtCon nec  tcClsInstDecl :: LClsInstDecl GhcRn               -> TcM ([InstInfo GhcRn], [FamInst], [DerivInfo])@@ -472,8 +471,7 @@                                   , cid_datafam_insts = adts }))   = setSrcSpan loc                      $     addErrCtxt (instDeclCtxt1 hs_ty)  $-    do  { traceTc "tcLocalInstDecl" (ppr hs_ty)-        ; dfun_ty <- tcHsClsInstType (InstDeclCtxt False) hs_ty+    do  { dfun_ty <- tcHsClsInstType (InstDeclCtxt False) hs_ty         ; let (tyvars, theta, clas, inst_tys) = tcSplitDFunTy dfun_ty              -- NB: tcHsClsInstType does checkValidInstance @@ -539,7 +537,7 @@                                         . dfid_eqn                                         . unLoc) adts) -tcClsInstDecl (L _ (XClsInstDecl _)) = panic "tcClsInstDecl"+tcClsInstDecl (L _ (XClsInstDecl nec)) = noExtCon nec  {- ************************************************************************@@ -660,10 +658,10 @@        ; gadt_syntax <- dataDeclChecks fam_name new_or_data hs_ctxt hs_cons           -- Do /not/ check that the number of patterns = tyConArity fam_tc           -- See [Arity of data families] in FamInstEnv-        ; (qtvs, pats, res_kind, stupid_theta)-             <- tcDataFamHeader mb_clsinfo fam_tc imp_vars mb_bndrs-                                fixity hs_ctxt hs_pats m_ksig hs_cons+             <- tcDataFamInstHeader mb_clsinfo fam_tc imp_vars mb_bndrs+                                    fixity hs_ctxt hs_pats m_ksig hs_cons+                                    new_or_data         -- Eta-reduce the axiom if possible        -- Quite tricky: see Note [Eta-reduction for data families]@@ -677,15 +675,18 @@                  -- Put the eta-removed tyvars at the end                  -- Remember, qtvs is in arbitrary order, except kind vars are                  -- first, so there is no reason to suppose that the eta_tvs-                 -- (obtained from the pats) are at the end (Trac #11148)+                 -- (obtained from the pats) are at the end (#11148) -       -- Eta-expand the representation tycon until it has reult kind *+       -- Eta-expand the representation tycon until it has result+       -- kind `TYPE r`, for some `r`. If UnliftedNewtypes is not enabled, we+       -- go one step further and ensure that it has kind `TYPE 'LiftedRep`.+       --        -- See also Note [Arity of data families] in FamInstEnv        -- NB: we can do this after eta-reducing the axiom, because if        --     we did it before the "extra" tvs from etaExpandAlgTyCon        --     would always be eta-reduced        ; (extra_tcbs, final_res_kind) <- etaExpandAlgTyCon full_tcbs res_kind-       ; checkTc (tcIsLiftedTypeKind final_res_kind) (badKindSig True res_kind)+       ; checkDataKindSig (DataInstanceSort new_or_data) final_res_kind        ; let extra_pats  = map (mkTyVarTy . binderVar) extra_tcbs              all_pats    = pats `chkAppend` extra_pats              orig_res_ty = mkTyConApp fam_tc all_pats@@ -703,9 +704,10 @@         ; (rep_tc, axiom) <- fixM $ \ ~(rec_rep_tc, _) ->            do { data_cons <- tcExtendTyVarEnv qtvs $-                             -- For H98 decls, the tyvars scope-                             -- over the data constructors-                             tcConDecls rec_rep_tc ty_binders orig_res_ty hs_cons+                  -- For H98 decls, the tyvars scope+                  -- over the data constructors+                  tcConDecls rec_rep_tc new_or_data ty_binders final_res_kind+                             orig_res_ty hs_cons                ; rep_tc_name <- newFamInstTyConName lfam_name pats               ; axiom_name  <- newFamInstAxiomName lfam_name [pats]@@ -722,7 +724,7 @@                       -- NB: Use the full ty_binders from the pats. See bullet toward                       -- the end of Note [Data type families] in TyCon                     rep_tc   = mkAlgTyCon rep_tc_name-                                          ty_binders liftedTypeKind+                                          ty_binders final_res_kind                                           (map (const Nominal) ty_binders)                                           (fmap unLoc cType) stupid_theta                                           tc_rhs parent@@ -746,6 +748,7 @@                L _ []    -> Nothing                L _ preds ->                  Just $ DerivInfo { di_rep_tc  = rep_tc+                                  , di_scoped_tvs = mkTyVarNamePairs (tyConTyVars rep_tc)                                   , di_clauses = preds                                   , di_ctxt    = tcMkDataFamInstCtxt decl } @@ -779,57 +782,78 @@ tcDataFamInstDecl _ _ = panic "tcDataFamInstDecl"  ------------------------tcDataFamHeader :: AssocInstInfo -> TyCon -> [Name] -> Maybe [LHsTyVarBndr GhcRn]-                -> LexicalFixity -> LHsContext GhcRn-                -> HsTyPats GhcRn -> Maybe (LHsKind GhcRn) -> [LConDecl GhcRn]-                -> TcM ([TyVar], [Type], Kind, ThetaType)--- The "header" is the part other than the data constructors themselves--- e.g.  data instance D [a] :: * -> * where ...+tcDataFamInstHeader+    :: AssocInstInfo -> TyCon -> [Name] -> Maybe [LHsTyVarBndr GhcRn]+    -> LexicalFixity -> LHsContext GhcRn+    -> HsTyPats GhcRn -> Maybe (LHsKind GhcRn) -> [LConDecl GhcRn]+    -> NewOrData+    -> TcM ([TyVar], [Type], Kind, ThetaType)+-- The "header" of a data family instance is the part other than+-- the data constructors themselves+--    e.g.  data instance D [a] :: * -> * where ... -- Here the "header" is the bit before the "where"-tcDataFamHeader mb_clsinfo fam_tc imp_vars mb_bndrs fixity hs_ctxt hs_pats m_ksig hs_cons-  = do { (imp_tvs, (exp_tvs, (stupid_theta, lhs_ty, res_kind)))+tcDataFamInstHeader mb_clsinfo fam_tc imp_vars mb_bndrs fixity+                    hs_ctxt hs_pats m_ksig hs_cons new_or_data+  = do { (imp_tvs, (exp_tvs, (stupid_theta, lhs_ty)))             <- pushTcLevelM_                                $                solveEqualities                              $                bindImplicitTKBndrs_Q_Skol imp_vars          $                bindExplicitTKBndrs_Q_Skol AnyKind exp_bndrs $                do { stupid_theta <- tcHsContext hs_ctxt                   ; (lhs_ty, lhs_kind) <- tcFamTyPats fam_tc hs_pats-                    -- Ensure that the instance is consistent with its-                    -- parent class++                  -- Ensure that the instance is consistent+                  -- with its parent class                   ; addConsistencyConstraints mb_clsinfo lhs_ty-                  ; mapM_ (wrapLocM_ kcConDecl) hs_cons++                  -- Add constraints from the result signature                   ; res_kind <- tc_kind_sig m_ksig-                  ; lhs_ty <- checkExpectedKind YesSaturation pp_lhs lhs_ty lhs_kind res_kind-                  ; return (stupid_theta, lhs_ty, res_kind) } +                  -- Add constraints from the data constructors+                  ; kcConDecls new_or_data res_kind hs_cons++                  ; lhs_ty <- checkExpectedKind_pp pp_lhs lhs_ty lhs_kind res_kind+                  ; return (stupid_theta, lhs_ty) }+        -- See TcTyClsDecls Note [Generalising in tcFamTyPatsGuts]        -- This code (and the stuff immediately above) is very similar-       -- to that in tcFamTyInstEqnGuts.  Maybe we should abstract the+       -- to that in tcTyFamInstEqnGuts.  Maybe we should abstract the        -- common code; but for the moment I concluded that it's        -- clearer to duplicate it.  Still, if you fix a bug here,        -- check there too!        ; let scoped_tvs = imp_tvs ++ exp_tvs        ; dvs  <- candidateQTyVarsOfTypes (lhs_ty : mkTyVarTys scoped_tvs)-       ; qtvs <- quantifyTyVars emptyVarSet dvs+       ; qtvs <- quantifyTyVars dvs         -- Zonk the patterns etc into the Type world        ; (ze, qtvs)   <- zonkTyBndrs qtvs-       ; lhs_ty       <- zonkTcTypeToTypeX ze lhs_ty-       ; res_kind     <- zonkTcTypeToTypeX ze res_kind+              -- See Note [Unifying data family kinds] about the discardCast+       ; lhs_ty       <- zonkTcTypeToTypeX ze (discardCast lhs_ty)        ; stupid_theta <- zonkTcTypesToTypesX ze stupid_theta         -- Check that type patterns match the class instance head-       ; let pats = unravelFamInstPats lhs_ty-       ; return (qtvs, pats, res_kind, stupid_theta) }+       -- The call to splitTyConApp_maybe here is just an inlining of+       -- the body of unravelFamInstPats.+       ; pats <- case splitTyConApp_maybe lhs_ty of+           Just (_, pats) -> pure pats+           Nothing -> pprPanic "tcDataFamInstHeader" (ppr lhs_ty)+       ; return (qtvs, pats, typeKind lhs_ty, stupid_theta) }+          -- See Note [Unifying data family kinds] about why we need typeKind here   where     fam_name  = tyConName fam_tc     data_ctxt = DataKindCtxt fam_name     pp_lhs    = pprHsFamInstLHS fam_name mb_bndrs hs_pats fixity hs_ctxt     exp_bndrs = mb_bndrs `orElse` [] -    -- See Note [Result kind signature for a data family instance]+    -- See Note [Implementation of UnliftedNewtypes] in TcTyClsDecls, wrinkle (2).     tc_kind_sig Nothing-      = return liftedTypeKind+      = do { unlifted_newtypes <- xoptM LangExt.UnliftedNewtypes+           ; if unlifted_newtypes && new_or_data == NewType+               then newOpenTypeKind+               else pure liftedTypeKind+           }++    -- See Note [Result kind signature for a data family instance]     tc_kind_sig (Just hs_kind)       = do { sig_kind <- tcLHsKindSig data_ctxt hs_kind            ; let (tvs, inner_kind) = tcSplitForAllTys sig_kind@@ -847,6 +871,36 @@ Thus: skolemise away. cf. Inst.deeplySkolemise and TcUnify.tcSkolemise Examples in indexed-types/should_compile/T12369 +Note [Unifying data family kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we kind-check a newtype instance with -XUnliftedNewtypes, we must+unify the kind of the data family with any declared kind in the instance+declaration. For example:++  data Color = Red | Blue+  type family Interpret (x :: Color) :: RuntimeRep where+    Interpret 'Red = 'IntRep+    Interpret 'Blue = 'WordRep+  data family Foo (x :: Color) :: TYPE (Interpret x)+  newtype instance Foo 'Red :: TYPE IntRep where+    FooRedC :: Int# -> Foo 'Red++We end up unifying `TYPE (Interpret 'Red)` (the kind of Foo, instantiated+with 'Red) and `TYPE IntRep` (the declared kind of the instance). This+unification succeeds, resulting in a coercion. The big question: what to+do with this coercion? Answer: nothing! A kind annotation on a newtype instance+is always redundant (except, perhaps, in that it helps guide unification). We+have a definitive kind for the data family from the data family declaration,+and so we learn nothing really new from the kind signature on an instance.+We still must perform this unification (done in the call to checkExpectedKind+toward the beginning of tcDataFamInstHeader), but the result is unhelpful. If there+is a cast, it will wrap the lhs_ty, and so we just drop it before splitting the+lhs_ty to reveal the underlying patterns. Because of the potential of dropping+a cast like this, we just use typeKind in the result instead of propagating res_kind+from above.++This Note is wrinkle (3) in Note [Implementation of UnliftedNewtypes] in TcTyClsDecls.+ Note [Eta-reduction for data families] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider@@ -894,7 +948,7 @@   'k1' and 'k2', as well as 'b'.    The skolemise bit is done in tc_kind_sig, while the instantiate bit-  is done by the checkExpectedKind that immediately follows.+  is done by tcFamTyPats.  * Very fiddly point.  When we eta-reduce to      axiom AxDrep forall a b. D [(a,b]] = Drep a b@@ -905,7 +959,7 @@   the TyConBndrVis on Drep's arguments. In particular do we have     (forall (k::*). blah) or (* -> blah)? -  We must match whatever D does!  In Trac #15817 we had+  We must match whatever D does!  In #15817 we had       data family X a :: forall k. * -> *   -- Note: a forall that is not used       data instance X Int b = MkX @@ -1044,14 +1098,14 @@                      --    con_app_scs  = MkD ty1 ty2 sc1 sc2                      --    con_app_args = MkD ty1 ty2 sc1 sc2 op1 op2              con_app_tys  = mkHsWrap (mkWpTyApps inst_tys)-                                  (HsConLikeOut noExt (RealDataCon dict_constr))+                                  (HsConLikeOut noExtField (RealDataCon dict_constr))                        -- NB: We *can* have covars in inst_tys, in the case of                        -- promoted GADT constructors.               con_app_args = foldl' app_to_meth con_app_tys sc_meth_ids               app_to_meth :: HsExpr GhcTc -> Id -> HsExpr GhcTc-             app_to_meth fun meth_id = HsApp noExt (L loc fun)+             app_to_meth fun meth_id = HsApp noExtField (L loc fun)                                             (L loc (wrapId arg_wrapper meth_id))               inst_tv_tys = mkTyVarTys inst_tyvars@@ -1065,13 +1119,13 @@                     -- Newtype dfuns just inline unconditionally,                     -- so don't attempt to specialise them -             export = ABE { abe_ext  = noExt+             export = ABE { abe_ext  = noExtField                           , abe_wrap = idHsWrapper                           , abe_poly = dfun_id_w_prags                           , abe_mono = self_dict                           , abe_prags = dfun_spec_prags }                           -- NB: see Note [SPECIALISE instance pragmas]-             main_bind = AbsBinds { abs_ext = noExt+             main_bind = AbsBinds { abs_ext = noExtField                                   , abs_tvs = inst_tyvars                                   , abs_ev_vars = dfun_ev_vars                                   , abs_exports = [export]@@ -1118,7 +1172,7 @@    is_newtype  = isNewTyCon clas_tc  wrapId :: HsWrapper -> IdP (GhcPass id) -> HsExpr (GhcPass id)-wrapId wrapper id = mkHsWrap wrapper (HsVar noExt (noLoc id))+wrapId wrapper id = mkHsWrap wrapper (HsVar noExtField (noLoc id))  {- Note [Typechecking plan for instance declarations] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1214,15 +1268,16 @@            ; sc_top_name  <- newName (mkSuperDictAuxOcc n (getOccName cls))            ; sc_ev_id     <- newEvVar sc_pred            ; addTcEvBind ev_binds_var $ mkWantedEvBind sc_ev_id sc_ev_tm-           ; let sc_top_ty = mkInvForAllTys tyvars (mkLamTypes dfun_evs sc_pred)+           ; let sc_top_ty = mkInvForAllTys tyvars $+                             mkPhiTy (map idType dfun_evs) sc_pred                  sc_top_id = mkLocalId sc_top_name sc_top_ty-                 export = ABE { abe_ext  = noExt+                 export = ABE { abe_ext  = noExtField                               , abe_wrap = idHsWrapper                               , abe_poly = sc_top_id                               , abe_mono = sc_ev_id                               , abe_prags = noSpecPrags }                  local_ev_binds = TcEvBinds ev_binds_var-                 bind = AbsBinds { abs_ext      = noExt+                 bind = AbsBinds { abs_ext      = noExtField                                  , abs_tvs      = tyvars                                  , abs_ev_vars  = dfun_evs                                  , abs_exports  = [export]@@ -1251,11 +1306,11 @@ {- Note [Recursive superclasses] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See Trac #3731, #4809, #5751, #5913, #6117, #6161, which all+See #3731, #4809, #5751, #5913, #6117, #6161, which all describe somewhat more complicated situations, but ones encountered in practice. -See also tests tcrun020, tcrun021, tcrun033, and Trac #11427.+See also tests tcrun020, tcrun021, tcrun033, and #11427.  ----- THE PROBLEM -------- The problem is that it is all too easy to create a class whose@@ -1320,7 +1375,7 @@ But for (i2) that isn't the case, so we must add an explicit, and perhaps surprising, (Ord r) argument to the instance declaration. -Here's another example from Trac #6161:+Here's another example from #6161:         class       Super a => Duper a  where ...        class Duper (Fam a) => Foo a    where ...@@ -1515,12 +1570,12 @@                              mkLHsWrap lam_wrapper (error_rhs dflags)            ; return (meth_id, meth_bind, Nothing) }       where-        error_rhs dflags = L inst_loc $ HsApp noExt error_fun (error_msg dflags)+        error_rhs dflags = L inst_loc $ HsApp noExtField error_fun (error_msg dflags)         error_fun    = L inst_loc $                        wrapId (mkWpTyApps                                 [ getRuntimeRep meth_tau, meth_tau])                               nO_METHOD_BINDING_ERROR_ID-        error_msg dflags = L inst_loc (HsLit noExt (HsStringPrim NoSourceText+        error_msg dflags = L inst_loc (HsLit noExtField (HsStringPrim NoSourceText                                               (unsafeMkByteString (error_string dflags))))         meth_tau     = funResultTy (piResultTys (idType sel_id) inst_tys)         error_string dflags = showSDoc dflags@@ -1607,10 +1662,8 @@  1. In tcMethods (which typechecks method bindings), disable    -Winaccessible-code.-2. When creating Implications during typechecking, record the Env-   (through ic_env) at the time of creation. Since the Env also stores-   DynFlags, this will remember that -Winaccessible-code was disabled over-   the scope of that implication.+2. When creating Implications during typechecking, record this flag+   (in ic_warn_inaccessible) at the time of creation. 3. After typechecking comes error reporting, where GHC must decide how to    report inaccessible code to the user, on an Implication-by-Implication    basis. If an Implication's DynFlags indicate that -Winaccessible-code was@@ -1648,14 +1701,14 @@        ; spec_prags     <- tcSpecPrags global_meth_id prags          ; let specs  = mk_meth_spec_prags global_meth_id spec_inst_prags spec_prags-              export = ABE { abe_ext   = noExt+              export = ABE { abe_ext   = noExtField                            , abe_poly  = global_meth_id                            , abe_mono  = local_meth_id                            , abe_wrap  = idHsWrapper                            , abe_prags = specs }                local_ev_binds = TcEvBinds ev_binds_var-              full_bind = AbsBinds { abs_ext      = noExt+              full_bind = AbsBinds { abs_ext      = noExtField                                    , abs_tvs      = tyvars                                    , abs_ev_vars  = dfun_ev_vars                                    , abs_exports  = [export]@@ -1698,14 +1751,14 @@         ; (tc_bind, [inner_id]) <- tcPolyCheck no_prag_fn inner_meth_sig meth_bind -       ; let export = ABE { abe_ext   = noExt+       ; let export = ABE { abe_ext   = noExtField                           , abe_poly  = local_meth_id                           , abe_mono  = inner_id                           , abe_wrap  = hs_wrap                           , abe_prags = noSpecPrags }         ; return (unitBag $ L (getLoc meth_bind) $-                 AbsBinds { abs_ext = noExt, abs_tvs = [], abs_ev_vars = []+                 AbsBinds { abs_ext = noExtField, abs_tvs = [], abs_ev_vars = []                           , abs_exports = [export]                           , abs_binds = tc_bind, abs_ev_binds = []                           , abs_sig = True }) }@@ -1851,7 +1904,7 @@         ; dm_id <- tcLookupId dm_name         ; let inline_prag = idInlinePragma dm_id               inline_prags | isAnyInlinePragma inline_prag-                           = [noLoc (InlineSig noExt fn inline_prag)]+                           = [noLoc (InlineSig noExtField fn inline_prag)]                            | otherwise                            = []                  -- Copy the inline pragma (if any) from the default method@@ -1871,7 +1924,7 @@        ; return (bind, inline_prags) }   where     mk_vta :: LHsExpr GhcRn -> Type -> LHsExpr GhcRn-    mk_vta fun ty = noLoc (HsAppType noExt fun (mkEmptyWildCardBndrs $ nlHsParTy+    mk_vta fun ty = noLoc (HsAppType noExtField fun (mkEmptyWildCardBndrs $ nlHsParTy                                                 $ noLoc $ XHsType $ NHsCoreTy ty))        -- NB: use visible type application        -- See Note [Default methods in instances]@@ -1928,8 +1981,8 @@    fooIntInt = $dmfoo @Int @Int  Lacking VTA we'd get ambiguity errors involving the default method.  This applies-equally to vanilla default methods (Trac #1061) and generic default methods-(Trac #12220).+equally to vanilla default methods (#1061) and generic default methods+(#12220).  Historical note: before we had VTA we had to generate post-type-checked code, which took a lot more code, and didn't work for@@ -2046,7 +2099,7 @@    * The specialised dictionary $s$dfIxPair is very much needed, in case we     call a function that takes a dictionary, but in a context where the-    specialised dictionary can be used.  See Trac #7797.+    specialised dictionary can be used.  See #7797.    * The ClassOp rule for 'range' works equally well on $s$dfIxPair, because     it still has a DFunUnfolding.  See Note [ClassOp/DFun selection]@@ -2080,7 +2133,7 @@         ; co_fn <- tcSpecWrapper SpecInstCtxt (idType dfun_id) spec_dfun_ty         ; return (SpecPrag dfun_id co_fn defaultInlinePragma) }   where-    spec_ctxt prag = hang (text "In the SPECIALISE pragma") 2 (ppr prag)+    spec_ctxt prag = hang (text "In the pragma:") 2 (ppr prag)  tcSpecInst _  _ = panic "tcSpecInst" 
typecheck/TcInstDcls.hs-boot view
@@ -5,7 +5,7 @@  module TcInstDcls ( tcInstDecls1 ) where -import HsSyn+import GHC.Hs import TcRnTypes import TcEnv( InstInfo ) import TcDeriv
typecheck/TcInteract.hs view
@@ -35,6 +35,9 @@ import Outputable  import TcRnTypes+import Constraint+import Predicate+import TcOrigin import TcSMonad import Bag import MonadUtils ( concatMapM, foldlM )@@ -97,7 +100,7 @@  * When floating an equality outwards, we don't need to worry about floating its    associated flattening constraints. - * Another tricky case becomes easy: Trac #4935+ * Another tricky case becomes easy: #4935        type instance F True a b = a        type instance F False a b = b @@ -223,7 +226,7 @@  solveSimples cts   = {-# SCC "solveSimples" #-}-    do { updWorkListTcS (\wl -> foldrBag extendWorkListCt wl cts)+    do { updWorkListTcS (\wl -> foldr extendWorkListCt wl cts)        ; solve_loop }   where     solve_loop@@ -559,9 +562,10 @@      ev_id_w = ctEvEvId ev_w       different_level_strategy  -- Both Given-       | isIPPred pred, lvl_w > lvl_i = KeepWork-       | lvl_w < lvl_i                = KeepWork-       | otherwise                    = KeepInert+       | isIPPred pred = if lvl_w > lvl_i then KeepWork  else KeepInert+       | otherwise     = if lvl_w > lvl_i then KeepInert else KeepWork+       -- See Note [Replacement vs keeping] (the different-level bullet)+       -- For the isIPPred case see Note [Shadowing of Implicit Parameters]       same_level_strategy binds -- Both Given        | GivenOrigin (InstSC s_i) <- ctLocOrigin loc_i@@ -628,7 +632,7 @@            Binds:     d3 = sc_sel d2, d2 = sc_sel d1            Work item: d3 :: C a            Then it'd be ridiculous to replace d1 with d3 in the inert set!-           Hence the findNeedEvVars test.  See Trac #14774.+           Hence the findNeedEvVars test.  See #14774.    * Finally, when there is still a choice, use KeepInert rather than     KeepWork, for two reasons:@@ -744,7 +748,7 @@  {- Note [Solving irreducible equalities] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #14333)+Consider (#14333)   [G] a b ~R# c d   [W] c d ~R# a b Clearly we should be able to solve this! Even though the constraints are@@ -905,7 +909,7 @@  Note [Shortcut solving: type families] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have (Trac #13943)+Suppose we have (#13943)   class Take (n :: Nat) where ...   instance {-# OVERLAPPING #-}                    Take 0 where ..   instance {-# OVERLAPPABLE #-} (Take (n - 1)) => Take n where ..@@ -1008,7 +1012,7 @@   solved_dicts state  ensures that we remember what we have already   tried to solve to avoid looping. -* As Trac #15164 showed, it can be important to exploit sharing between+* As #15164 showed, it can be important to exploit sharing between   goals. E.g. To solve G we may need G1 and G2. To solve G1 we may need H;   and to solve G2 we may need H. If we don't spot this sharing we may   solve H twice; and if this pattern repeats we may get exponentially bad@@ -1180,8 +1184,12 @@         inert_loc  = ctEvLoc inert_ev         derived_loc = work_loc { ctl_depth  = ctl_depth work_loc `maxSubGoalDepth`                                               ctl_depth inert_loc-                               , ctl_origin = FunDepOrigin1 work_pred  work_loc-                                                            inert_pred inert_loc }+                               , ctl_origin = FunDepOrigin1 work_pred+                                                            (ctLocOrigin work_loc)+                                                            (ctLocSpan work_loc)+                                                            inert_pred+                                                            (ctLocOrigin inert_loc)+                                                            (ctLocSpan inert_loc) }  {- **********************************************************************@@ -1246,6 +1254,9 @@  So the inner binding for ?x::Bool *overrides* the outer one. +See ticket #17104 for a rather tricky example of this overriding+behaviour.+ All this works for the normal cases but it has an odd side effect in some pathological programs like this: -- This is accepted, the second parameter shadows@@ -1332,59 +1343,61 @@     || not (isImprovable work_ev)   = return () -  | not (null improvement_eqns)-  = do { traceTcS "interactFunEq improvements: " $-         vcat [ text "Eqns:" <+> ppr improvement_eqns-              , text "Candidates:" <+> ppr funeqs_for_tc-              , text "Inert eqs:" <+> ppr ieqs ]-       ; emitFunDepDeriveds improvement_eqns }-   | otherwise-  = return ()+  = do { eqns <- improvement_eqns+       ; if not (null eqns)+         then do { traceTcS "interactFunEq improvements: " $+                   vcat [ text "Eqns:" <+> ppr eqns+                        , text "Candidates:" <+> ppr funeqs_for_tc+                        , text "Inert eqs:" <+> ppr (inert_eqs inerts) ]+                 ; emitFunDepDeriveds eqns }+         else return () }    where-    ieqs          = inert_eqs inerts     funeqs        = inert_funeqs inerts     funeqs_for_tc = findFunEqsByTyCon funeqs fam_tc-    rhs           = lookupFlattenTyVar ieqs fsk     work_loc      = ctEvLoc work_ev     work_pred     = ctEvPred work_ev     fam_inj_info  = tyConInjectivityInfo fam_tc      ---------------------    improvement_eqns :: [FunDepEqn CtLoc]+    improvement_eqns :: TcS [FunDepEqn CtLoc]     improvement_eqns       | Just ops <- isBuiltInSynFamTyCon_maybe fam_tc       =    -- Try built-in families, notably for arithmethic-         concatMap (do_one_built_in ops) funeqs_for_tc+        do { rhs <- rewriteTyVar fsk+           ; concatMapM (do_one_built_in ops rhs) funeqs_for_tc }        | Injective injective_args <- fam_inj_info       =    -- Try improvement from type families with injectivity annotations-        concatMap (do_one_injective injective_args) funeqs_for_tc+        do { rhs <- rewriteTyVar fsk+           ; concatMapM (do_one_injective injective_args rhs) funeqs_for_tc }        | otherwise-      = []+      = return []      ---------------------    do_one_built_in ops (CFunEqCan { cc_tyargs = iargs, cc_fsk = ifsk, cc_ev = inert_ev })-      = mk_fd_eqns inert_ev (sfInteractInert ops args rhs iargs-                                             (lookupFlattenTyVar ieqs ifsk))+    do_one_built_in ops rhs (CFunEqCan { cc_tyargs = iargs, cc_fsk = ifsk, cc_ev = inert_ev })+      = do { inert_rhs <- rewriteTyVar ifsk+           ; return $ mk_fd_eqns inert_ev (sfInteractInert ops args rhs iargs inert_rhs) } -    do_one_built_in _ _ = pprPanic "interactFunEq 1" (ppr fam_tc)+    do_one_built_in _ _ _ = pprPanic "interactFunEq 1" (ppr fam_tc)      --------------------     -- See Note [Type inference for type families with injectivity]-    do_one_injective inj_args (CFunEqCan { cc_tyargs = inert_args-                                         , cc_fsk = ifsk, cc_ev = inert_ev })+    do_one_injective inj_args rhs (CFunEqCan { cc_tyargs = inert_args+                                             , cc_fsk = ifsk, cc_ev = inert_ev })       | isImprovable inert_ev-      , rhs `tcEqType` lookupFlattenTyVar ieqs ifsk-      = mk_fd_eqns inert_ev $-            [ Pair arg iarg-            | (arg, iarg, True) <- zip3 args inert_args inj_args ]+      = do { inert_rhs <- rewriteTyVar ifsk+           ; return $ if rhs `tcEqType` inert_rhs+                      then mk_fd_eqns inert_ev $+                             [ Pair arg iarg+                             | (arg, iarg, True) <- zip3 args inert_args inj_args ]+                      else [] }       | otherwise-      = []+      = return [] -    do_one_injective _ _ = pprPanic "interactFunEq 2" (ppr fam_tc)+    do_one_injective _ _ _ = pprPanic "interactFunEq 2" (ppr fam_tc)      --------------------     mk_fd_eqns :: CtEvidence -> [TypeEqn] -> [FunDepEqn CtLoc]@@ -1671,7 +1684,7 @@   newtype N b = MkN b and we want to get alpha := N b. -See also Trac #15144, which was caused by unifying a representational+See also #15144, which was caused by unifying a representational equality (in the unflattener).  @@ -1688,7 +1701,7 @@  Danger 1: If we send the original constraint on down the pipeline            it may react with an instance declaration, and in delicate            situations (when a Given overlaps with an instance) that-           may produce new insoluble goals: see Trac #4952+           may produce new insoluble goals: see #4952   Danger 2: If we don't rewrite the constraint, it may re-react            with the same thing later, and produce the same equality@@ -1763,7 +1776,7 @@ the Wanted matches the second instance, so we never get as far as the fundeps. -Trac #7875 is a case in point.+#7875 is a case in point. -}  emitFunDepDeriveds :: [FunDepEqn CtLoc] -> TcS ()@@ -1856,9 +1869,66 @@ kind is not Constraint, such as (forall a. F a ~# b)  See- * Note [Evidence for quantified constraints] in Type+ * Note [Evidence for quantified constraints] in Predicate  * Note [Equality superclasses in quantified constraints]    in TcCanonical++Note [Flatten when discharging CFunEqCan]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We have the following scenario (#16512):++type family LV (as :: [Type]) (b :: Type) = (r :: Type) | r -> as b where+  LV (a ': as) b = a -> LV as b++[WD] w1 :: LV as0 (a -> b) ~ fmv1 (CFunEqCan)+[WD] w2 :: fmv1 ~ (a -> fmv2) (CTyEqCan)+[WD] w3 :: LV as0 b ~ fmv2 (CFunEqCan)++We start with w1. Because LV is injective, we wish to see if the RHS of the+equation matches the RHS of the CFunEqCan. The RHS of a CFunEqCan is always an+fmv, so we "look through" to get (a -> fmv2). Then we run tcUnifyTyWithTFs.+That performs the match, but it allows a type family application (such as the+LV in the RHS of the equation) to match with anything. (See "Injective type+families" by Stolarek et al., HS'15, Fig. 2) The matching succeeds, which+means we can improve as0 (and b, but that's not interesting here). However,+because the RHS of w1 can't see through fmv2 (we have no way of looking up a+LHS of a CFunEqCan from its RHS, and this use case isn't compelling enough),+we invent a new unification variable here. We thus get (as0 := a : as1).+Rewriting:++[WD] w1 :: LV (a : as1) (a -> b) ~ fmv1+[WD] w2 :: fmv1 ~ (a -> fmv2)+[WD] w3 :: LV (a : as1) b ~ fmv2++We can now reduce both CFunEqCans, using the equation for LV. We get++[WD] w2 :: (a -> LV as1 (a -> b)) ~ (a -> a -> LV as1 b)++Now we decompose (and flatten) to++[WD] w4 :: LV as1 (a -> b) ~ fmv3+[WD] w5 :: fmv3 ~ (a -> fmv1)+[WD] w6 :: LV as1 b ~ fmv4++which is exactly where we started. These goals really are insoluble, but+we would prefer not to loop. We thus need to find a way to bump the reduction+depth, so that we can detect the loop and abort.++The key observation is that we are performing a reduction. We thus wish+to bump the level when discharging a CFunEqCan. Where does this bumped+level go, though? It can't just go on the reduct, as that's a type. Instead,+it must go on any CFunEqCans produced after flattening. We thus flatten+when discharging, making sure that the level is bumped in the new+fun-eqs. The flattening happens in reduce_top_fun_eq and the level+is bumped when setting up the FlatM monad in TcFlatten.runFlatten.+(This bumping will happen for call sites other than this one, but that+makes sense -- any constraints emitted by the flattener are offshoots+the work item and should have a higher level. We don't have any test+cases that require the bumping in this other cases, but it's convenient+and causes no harm to bump at every flatten.)++Test case: typecheck/should_fail/T16512a+ -}  --------------------@@ -1887,6 +1957,7 @@                   -> TcS (StopOrContinue Ct) -- We have found an applicable top-level axiom: use it to reduce -- Precondition: fsk is not free in rhs_ty+-- ax_co :: F tys ~ rhs_ty, where F tys is the LHS of the old_ev reduce_top_fun_eq old_ev fsk (ax_co, rhs_ty)   | not (isDerived old_ev)  -- Precondition of shortCutReduction   , Just (tc, tc_args) <- tcSplitTyConApp_maybe rhs_ty@@ -1901,7 +1972,11 @@   = ASSERT2( not (fsk `elemVarSet` tyCoVarsOfType rhs_ty)            , ppr old_ev $$ ppr rhs_ty )            -- Guaranteed by Note [FunEq occurs-check principle]-    do { dischargeFunEq old_ev fsk ax_co rhs_ty+    do { (rhs_xi, flatten_co) <- flatten FM_FlattenAll old_ev rhs_ty+             -- flatten_co :: rhs_xi ~ rhs_ty+             -- See Note [Flatten when discharging CFunEqCan]+       ; let total_co = ax_co `mkTcTransCo` mkTcSymCo flatten_co+       ; dischargeFunEq old_ev fsk total_co rhs_xi        ; traceTcS "doTopReactFunEq" $          vcat [ text "old_ev:" <+> ppr old_ev               , nest 2 (text ":=") <+> ppr ax_co ]@@ -1915,16 +1990,16 @@   = return ()    | otherwise-  = do { ieqs <- getInertEqs-       ; fam_envs <- getFamInstEnvs-       ; eqns <- improve_top_fun_eqs fam_envs fam_tc args-                                    (lookupFlattenTyVar ieqs fsk)-       ; traceTcS "improveTopFunEqs" (vcat [ ppr fam_tc <+> ppr args <+> ppr fsk+  = do { fam_envs <- getFamInstEnvs+       ; rhs <- rewriteTyVar fsk+       ; eqns <- improve_top_fun_eqs fam_envs fam_tc args rhs+       ; traceTcS "improveTopFunEqs" (vcat [ ppr fam_tc <+> ppr args <+> ppr rhs                                           , ppr eqns ])        ; mapM_ (unifyDerived loc Nominal) eqns }   where-    loc = ctEvLoc ev  -- ToDo: this location is wrong; it should be FunDepOrigin2-                      -- See Trac #14778+    loc = bumpCtLocDepth (ctEvLoc ev)+        -- ToDo: this location is wrong; it should be FunDepOrigin2+        -- See #14778  improve_top_fun_eqs :: FamInstEnvs                     -> TyCon -> [TcType] -> TcType@@ -1988,7 +2063,7 @@                   -- If the current substitution bind [k -> *], and                   -- one of the un-substituted tyvars is (a::k), we'd better                   -- be sure to apply the current substitution to a's kind.-                  -- Hence instFlexiX.   Trac #13135 was an example.+                  -- Hence instFlexiX.   #13135 was an example.               ; return [ Pair (substTyUnchecked subst ax_arg) arg                         -- NB: the ax_arg part is on the left@@ -2100,12 +2175,12 @@  Examples: -* Trac #5837 has [G] a ~ TF (a,Int), with an instance+* #5837 has [G] a ~ TF (a,Int), with an instance     type instance TF (a,b) = (TF a, TF b)   This readily loops when solving givens.  But with the FunEq occurs   check principle, it rapidly gets stuck which is fine. -* Trac #12444 is a good example, explained in comment:2.  We have+* #12444 is a good example, explained in comment:2.  We have     type instance F (Succ x) = Succ (F x)     [W] alpha ~ Succ (F alpha)   If we allow the reduction to happen, we get an infinite loop@@ -2127,7 +2202,7 @@ Note [Improvement orientation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A very delicate point is the orientation of derived equalities-arising from injectivity improvement (Trac #12522).  Suppse we have+arising from injectivity improvement (#12522).  Suppse we have   type family F x = t | t -> x   type instance F (a, Int) = (Int, G a) where G is injective; and wanted constraints@@ -2248,9 +2323,8 @@         ; lkup_res <- matchClassInst dflags inerts cls xis dict_loc         ; case lkup_res of                OneInst { cir_what = what }-                  -> do { unless (safeOverlap what) $-                          insertSafeOverlapFailureTcS work_item-                        ; when (isWanted ev) $ addSolvedDict ev cls xis+                  -> do { insertSafeOverlapFailureTcS what work_item+                        ; addSolvedDict what ev cls xis                         ; chooseInstance work_item lkup_res }                _  ->  -- NoInstance or NotSure                      do { when (isImprovable ev) $@@ -2342,7 +2416,7 @@  {- Note [Instances in no-evidence implications] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In Trac #15290 we had+In #15290 we had   [G] forall p q. Coercible p q => Coercible (m p) (m q))   [W] forall <no-ev> a. m (Int, IntStateT m a)                           ~R#@@ -2441,7 +2515,7 @@ The end effect is that, much as we do for overlapping instances, we delay choosing a class instance if there is a possibility of another instance OR a given to match our constraint later on. This fixes-Trac #4981 and #5002.+#4981 and #5002.  Other notes: @@ -2463,10 +2537,10 @@   constraints, but it is possible. I've added a test case in   typecheck/should-compile/GivenOverlapping.hs -* Another "live" example is Trac #10195; another is #10177.+* Another "live" example is #10195; another is #10177.  * We ignore the overlap problem if -XIncoherentInstances is in force:-  see Trac #6002 for a worked-out example where this makes a+  see #6002 for a worked-out example where this makes a   difference.  * Moreover notice that our goals here are different than the goals of@@ -2487,7 +2561,7 @@   and suppose we have -XNoMonoLocalBinds, so that we attempt to find the most   general type for 'v'.  When generalising v's type we'll simplify its   Q [alpha] constraint, but we don't have Q [a] in the 'givens', so we-  will use the instance declaration after all. Trac #11948 was a case+  will use the instance declaration after all. #11948 was a case   in point.  All of this is disgustingly delicate, so to discourage people from writing@@ -2530,7 +2604,7 @@   superclasses invert the instance;  e.g.       class (c1, c2) => (% c1, c2 %)       instance (c1, c2) => (% c1, c2 %)-  Example in Trac #14218+  Example in #14218  Exammples: T5853, T10432, T5315, T9222, T2627b, T3028b @@ -2606,4 +2680,3 @@         qtv_set = mkVarSet qtvs         this_unif = mightMatchLater qpred (ctEvLoc ev) pred loc         (matches, unif) = match_local_inst qcis-
typecheck/TcMType.hs view
@@ -6,7 +6,7 @@ Monadic type operations  This module contains monadic operations over types that contain-mutable type variables+mutable type variables. -}  {-# LANGUAGE CPP, TupleSections, MultiWayIf #-}@@ -48,11 +48,13 @@   unpackCoercionHole, unpackCoercionHole_maybe,   checkCoercionHole, +  newImplication,+   --------------------------------   -- Instantiation   newMetaTyVars, newMetaTyVarX, newMetaTyVarsX,   newMetaTyVarTyVars, newMetaTyVarTyVarX,-  newTyVarTyVar, newTauTyVar, newSkolemTyVar, newWildCardX,+  newTyVarTyVar, newPatSigTyVar, newSkolemTyVar, newWildCardX,   tcInstType,   tcInstSkolTyVars, tcInstSkolTyVarsX, tcInstSkolTyVarsAt,   tcSkolDFunType, tcSuperSkolTyVars, tcInstSuperSkolTyVarsX,@@ -65,14 +67,13 @@   tidyEvVar, tidyCt, tidySkolemInfo,     zonkTcTyVar, zonkTcTyVars,   zonkTcTyVarToTyVar, zonkTyVarTyVarPairs,-  zonkTyCoVarsAndFV, zonkTcTypeAndFV,+  zonkTyCoVarsAndFV, zonkTcTypeAndFV, zonkDTyCoVarSetAndFV,   zonkTyCoVarsAndFVList,   candidateQTyVarsOfType,  candidateQTyVarsOfKind,   candidateQTyVarsOfTypes, candidateQTyVarsOfKinds,-  CandidatesQTvs(..), delCandidates, candidateKindVars,-  skolemiseQuantifiedTyVar, defaultTyVar,-  quantifyTyVars,-  zonkTcTyCoVarBndr, zonkTyConBinders,+  CandidatesQTvs(..), delCandidates, candidateKindVars, partitionCandidates,+  zonkAndSkolemise, skolemiseQuantifiedTyVar,+  defaultTyVar, quantifyTyVars, isQuantifiableTv,   zonkTcType, zonkTcTypes, zonkCo,   zonkTyCoVarKind, @@ -80,7 +81,7 @@   zonkId, zonkCoVar,   zonkCt, zonkSkolemInfo, -  tcGetGlobalTyCoVars,+  skolemiseUnboundMetaTyVar,    ------------------------------   -- Levity polymorphism@@ -93,15 +94,19 @@ import GhcPrelude  import TyCoRep+import TyCoPpr import TcType import Type import TyCon import Coercion import Class import Var+import Predicate+import TcOrigin  -- others: import TcRnMonad        -- TcType, amongst others+import Constraint import TcEvidence import Id import Name@@ -117,7 +122,9 @@ import Bag import Pair import UniqSet+import DynFlags import qualified GHC.LanguageExtensions as LangExt+import BasicTypes ( TypeOrKind(..) )  import Control.Monad import Maybes@@ -141,14 +148,15 @@ kind_var_occ = mkOccName tvName "k"  newMetaKindVar :: TcM TcKind-newMetaKindVar = do { uniq <- newUnique-                    ; details <- newMetaDetails TauTv-                    ; let kv = mkTcTyVar (mkKindName uniq) liftedTypeKind details-                    ; traceTc "newMetaKindVar" (ppr kv)-                    ; return (mkTyVarTy kv) }+newMetaKindVar+  = do { details <- newMetaDetails TauTv+       ; uniq <- newUnique+       ; let kv = mkTcTyVar (mkKindName uniq) liftedTypeKind details+       ; traceTc "newMetaKindVar" (ppr kv)+       ; return (mkTyVarTy kv) }  newMetaKindVars :: Int -> TcM [TcKind]-newMetaKindVars n = mapM (\ _ -> newMetaKindVar) (nOfThem n ())+newMetaKindVars n = replicateM n newMetaKindVar  {- ************************************************************************@@ -172,8 +180,8 @@ -- Deals with both equality and non-equality predicates newWanted orig t_or_k pty   = do loc <- getCtLocM orig t_or_k-       d <- if isEqPred pty then HoleDest  <$> newCoercionHole pty-                            else EvVarDest <$> newEvVar pty+       d <- if isEqPrimPred pty then HoleDest  <$> newCoercionHole pty+                                else EvVarDest <$> newEvVar pty        return $ CtWanted { ctev_dest = d                          , ctev_pred = pty                          , ctev_nosh = WDeriv@@ -286,6 +294,22 @@     IrredPred {}    -> mkVarOccFS (fsLit "irred")     ForAllPred {}   -> mkVarOccFS (fsLit "df") +-- | Create a new 'Implication' with as many sensible defaults for its fields+-- as possible. Note that the 'ic_tclvl', 'ic_binds', and 'ic_info' fields do+-- /not/ have sensible defaults, so they are initialized with lazy thunks that+-- will 'panic' if forced, so one should take care to initialize these fields+-- after creation.+--+-- This is monadic to look up the 'TcLclEnv', which is used to initialize+-- 'ic_env', and to set the -Winaccessible-code flag. See+-- Note [Avoid -Winaccessible-code when deriving] in TcInstDcls.+newImplication :: TcM Implication+newImplication+  = do env <- getLclEnv+       warn_inaccessible <- woptM Opt_WarnInaccessibleCode+       return (implicationPrototype { ic_env = env+                                    , ic_warn_inaccessible = warn_inaccessible })+ {- ************************************************************************ *                                                                      *@@ -383,7 +407,7 @@ By defining ExpType, separately from Type, we can achieve goals 1 and 2 statically. -See also [wiki:Typechecking]+See also [wiki:typechecking]  Note [TcLevel of ExpType] ~~~~~~~~~~~~~~~~~~~~~~~~~@@ -661,42 +685,118 @@ * In partial type signatures, see Note [Quantified variables in partial type signatures] -} --- see Note [TyVarTv]+newMetaTyVarName :: FastString -> TcM Name+-- Makes a /System/ Name, which is eagerly eliminated by+-- the unifier; see TcUnify.nicer_to_update_tv1, and+-- TcCanonical.canEqTyVarTyVar (nicer_to_update_tv2)+newMetaTyVarName str+  = do { uniq <- newUnique+       ; return (mkSystemName uniq (mkTyVarOccFS str)) }++cloneMetaTyVarName :: Name -> TcM Name+cloneMetaTyVarName name+  = do { uniq <- newUnique+       ; return (mkSystemName uniq (nameOccName name)) }+         -- See Note [Name of an instantiated type variable]++{- Note [Name of an instantiated type variable]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+At the moment we give a unification variable a System Name, which+influences the way it is tidied; see TypeRep.tidyTyVarBndr.++Note [Unification variables need fresh Names]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Whenever we allocate a unification variable (MetaTyVar) we give+it a fresh name.   #16221 is a very tricky case that illustrates+why this is important:++   data SameKind :: k -> k -> *+   data T0 a = forall k2 (b :: k2). MkT0 (SameKind a b) !Int++When kind-checking T0, we give (a :: kappa1). Then, in kcConDecl+we allocate a unification variable kappa2 for k2, and then we+end up unifying kappa1 := kappa2 (because of the (SameKind a b).++Now we generalise over kappa2; but if kappa2's Name is k2,+we'll end up giving T0 the kind forall k2. k2 -> *.  Nothing+directly wrong with that but when we typecheck the data constrautor+we end up giving it the type+  MkT0 :: forall k1 (a :: k1) k2 (b :: k2).+          SameKind @k2 a b -> Int -> T0 @{k2} a+which is bogus.  The result type should be T0 @{k1} a.++And there no reason /not/ to clone the Name when making a+unification variable.  So that's what we do.+-}++newAnonMetaTyVar :: MetaInfo -> Kind -> TcM TcTyVar+-- Make a new meta tyvar out of thin air+newAnonMetaTyVar meta_info kind+  = do  { let s = case meta_info of+                        TauTv       -> fsLit "t"+                        FlatMetaTv  -> fsLit "fmv"+                        FlatSkolTv  -> fsLit "fsk"+                        TyVarTv      -> fsLit "a"+        ; name    <- newMetaTyVarName s+        ; details <- newMetaDetails meta_info+        ; let tyvar = mkTcTyVar name kind details+        ; traceTc "newAnonMetaTyVar" (ppr tyvar)+        ; return tyvar }++-- makes a new skolem tv+newSkolemTyVar :: Name -> Kind -> TcM TcTyVar+newSkolemTyVar name kind+  = do { lvl <- getTcLevel+       ; return (mkTcTyVar name kind (SkolemTv lvl False)) }+ newTyVarTyVar :: Name -> Kind -> TcM TcTyVar+-- See Note [TyVarTv]+-- See Note [Unification variables need fresh Names] newTyVarTyVar name kind   = do { details <- newMetaDetails TyVarTv-       ; let tyvar = mkTcTyVar name kind details+       ; uniq <- newUnique+       ; let name' = name `setNameUnique` uniq+             tyvar = mkTcTyVar name' kind details+         -- Don't use cloneMetaTyVar, which makes a SystemName+         -- We want to keep the original more user-friendly Name+         -- In practical terms that means that in error messages,+         -- when the Name is tidied we get 'a' rather than 'a0'        ; traceTc "newTyVarTyVar" (ppr tyvar)        ; return tyvar } +newPatSigTyVar :: Name -> Kind -> TcM TcTyVar+newPatSigTyVar name kind+  = do { details <- newMetaDetails TauTv+       ; uniq <- newUnique+       ; let name' = name `setNameUnique` uniq+             tyvar = mkTcTyVar name' kind details+         -- Don't use cloneMetaTyVar;+         -- same reasoning as in newTyVarTyVar+       ; traceTc "newPatSigTyVar" (ppr tyvar)+       ; return tyvar } --- makes a new skolem tv-newSkolemTyVar :: Name -> Kind -> TcM TcTyVar-newSkolemTyVar name kind = do { lvl <- getTcLevel-                              ; return (mkTcTyVar name kind (SkolemTv lvl False)) }+cloneAnonMetaTyVar :: MetaInfo -> TyVar -> TcKind -> TcM TcTyVar+-- Make a fresh MetaTyVar, basing the name+-- on that of the supplied TyVar+cloneAnonMetaTyVar info tv kind+  = do  { details <- newMetaDetails info+        ; name    <- cloneMetaTyVarName (tyVarName tv)+        ; let tyvar = mkTcTyVar name kind details+        ; traceTc "cloneAnonMetaTyVar" (ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar))+        ; return tyvar }  newFskTyVar :: TcType -> TcM TcTyVar newFskTyVar fam_ty-  = do { uniq <- newUnique-       ; ref  <- newMutVar Flexi-       ; tclvl <- getTcLevel-       ; let details = MetaTv { mtv_info  = FlatSkolTv-                              , mtv_ref   = ref-                              , mtv_tclvl = tclvl }-             name = mkMetaTyVarName uniq (fsLit "fsk")+  = do { details <- newMetaDetails FlatSkolTv+       ; name <- newMetaTyVarName (fsLit "fsk")        ; return (mkTcTyVar name (tcTypeKind fam_ty) details) }  newFmvTyVar :: TcType -> TcM TcTyVar -- Very like newMetaTyVar, except sets mtv_tclvl to one less -- so that the fmv is untouchable. newFmvTyVar fam_ty-  = do { uniq <- newUnique-       ; ref  <- newMutVar Flexi-       ; tclvl <- getTcLevel-       ; let details = MetaTv { mtv_info  = FlatMetaTv-                              , mtv_ref   = ref-                              , mtv_tclvl = tclvl }-             name = mkMetaTyVarName uniq (fsLit "s")+  = do { details <- newMetaDetails FlatMetaTv+       ; name <- newMetaTyVarName (fsLit "s")        ; return (mkTcTyVar name (tcTypeKind fam_ty) details) }  newMetaDetails :: MetaInfo -> TcM TcTyVarDetails@@ -710,10 +810,9 @@ cloneMetaTyVar :: TcTyVar -> TcM TcTyVar cloneMetaTyVar tv   = ASSERT( isTcTyVar tv )-    do  { uniq <- newUnique-        ; ref  <- newMutVar Flexi-        ; let name'    = setNameUnique (tyVarName tv) uniq-              details' = case tcTyVarDetails tv of+    do  { ref  <- newMutVar Flexi+        ; name' <- cloneMetaTyVarName (tyVarName tv)+        ; let details' = case tcTyVarDetails tv of                            details@(MetaTv {}) -> details { mtv_ref = ref }                            _ -> pprPanic "cloneMetaTyVar" (ppr tv)               tyvar = mkTcTyVar name' (tyVarKind tv) details'@@ -784,10 +883,8 @@   = do { meta_details <- readMutVar ref;        -- Zonk kinds to allow the error check to work        ; zonked_tv_kind <- zonkTcType tv_kind-       ; zonked_ty      <- zonkTcType ty-       ; let zonked_ty_kind = tcTypeKind zonked_ty  -- Need to zonk even before typeKind;-                                                    -- otherwise, we can panic in piResultTy-             kind_check_ok = tcIsConstraintKind zonked_tv_kind+       ; zonked_ty_kind <- zonkTcType ty_kind+       ; let kind_check_ok = tcIsConstraintKind zonked_tv_kind                           || tcEqKind zonked_ty_kind zonked_tv_kind              -- Hack alert! tcIsConstraintKind: see TcHsType              -- Note [Extra-constraint holes in partial type signatures]@@ -813,6 +910,7 @@        ; writeMutVar ref (Indirect ty) }   where     tv_kind = tyVarKind tyvar+    ty_kind = tcTypeKind ty      tv_lvl = tcTyVarLevel tyvar     ty_lvl = tcTypeLevel ty@@ -860,52 +958,7 @@ that can't ever appear in user code, so we're safe! -} -newTauTyVar :: Name -> Kind -> TcM TcTyVar-newTauTyVar name kind-  = do { details <- newMetaDetails TauTv-       ; let tyvar = mkTcTyVar name kind details-       ; traceTc "newTauTyVar" (ppr tyvar)-       ; return tyvar } --mkMetaTyVarName :: Unique -> FastString -> Name--- Makes a /System/ Name, which is eagerly eliminated by--- the unifier; see TcUnify.nicer_to_update_tv1, and--- TcCanonical.canEqTyVarTyVar (nicer_to_update_tv2)-mkMetaTyVarName uniq str = mkSystemName uniq (mkTyVarOccFS str)--newAnonMetaTyVar :: MetaInfo -> Kind -> TcM TcTyVar--- Make a new meta tyvar out of thin air-newAnonMetaTyVar meta_info kind-  = do  { uniq <- newUnique-        ; let name = mkMetaTyVarName uniq s-              s = case meta_info of-                        TauTv       -> fsLit "t"-                        FlatMetaTv  -> fsLit "fmv"-                        FlatSkolTv  -> fsLit "fsk"-                        TyVarTv      -> fsLit "a"-        ; details <- newMetaDetails meta_info-        ; let tyvar = mkTcTyVar name kind details-        ; traceTc "newAnonMetaTyVar" (ppr tyvar)-        ; return tyvar }--cloneAnonMetaTyVar :: MetaInfo -> TyVar -> TcKind -> TcM TcTyVar--- Same as newAnonMetaTyVar, but use a supplied TyVar as the source of the print-name-cloneAnonMetaTyVar info tv kind-  = do  { uniq    <- newUnique-        ; details <- newMetaDetails info-        ; let name = mkSystemName uniq (getOccName tv)-                       -- See Note [Name of an instantiated type variable]-              tyvar = mkTcTyVar name kind details-        ; traceTc "cloneAnonMetaTyVar" (ppr tyvar)-        ; return tyvar }--{- Note [Name of an instantiated type variable]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-At the moment we give a unification variable a System Name, which-influences the way it is tidied; see TypeRep.tidyTyVarBndr.--}- newFlexiTyVar :: Kind -> TcM TcTyVar newFlexiTyVar kind = newAnonMetaTyVar TauTv kind @@ -915,7 +968,7 @@     return (mkTyVarTy tc_tyvar)  newFlexiTyVarTys :: Int -> Kind -> TcM [TcType]-newFlexiTyVarTys n kind = mapM newFlexiTyVarTy (nOfThem n kind)+newFlexiTyVarTys n kind = replicateM n (newFlexiTyVarTy kind)  newOpenTypeKind :: TcM TcKind newOpenTypeKind@@ -967,22 +1020,21 @@         ; return (subst1, new_tv) }   where     substd_kind = substTyUnchecked subst (tyVarKind tv)-      -- NOTE: Trac #12549 is fixed so we could use+      -- NOTE: #12549 is fixed so we could use       -- substTy here, but the tc_infer_args problem       -- is not yet fixed so leaving as unchecked for now.       -- OLD NOTE:       -- Unchecked because we call newMetaTyVarX from       -- tcInstTyBinder, which is called from tcInferApps       -- which does not yet take enough trouble to ensure-      -- the in-scope set is right; e.g. Trac #12785 trips+      -- the in-scope set is right; e.g. #12785 trips       -- if we use substTy here  newMetaTyVarTyAtLevel :: TcLevel -> TcKind -> TcM TcType newMetaTyVarTyAtLevel tc_lvl kind-  = do  { uniq <- newUnique-        ; ref  <- newMutVar Flexi-        ; let name = mkMetaTyVarName uniq (fsLit "p")-              details = MetaTv { mtv_info  = TauTv+  = do  { ref  <- newMutVar Flexi+        ; name <- newMetaTyVarName (fsLit "p")+        ; let details = MetaTv { mtv_info  = TauTv                                , mtv_ref   = ref                                , mtv_tclvl = tc_lvl }         ; return (mkTyVarTy (mkTcTyVar name kind details)) }@@ -1000,14 +1052,17 @@ we default the kind variables to *.  So, to support this defaulting, and only for that reason, when-collecting the free vars of a type, prior to quantifying, we must keep-the type and kind variables separate.+collecting the free vars of a type (in candidateQTyVarsOfType and friends),+prior to quantifying, we must keep the type and kind variables separate.  But what does that mean in a system where kind variables /are/ type variables? It's a fairly arbitrary distinction based on how the variables appear:    - "Kind variables" appear in the kind of some other free variable+    or in the kind of a locally quantified type variable+    (forall (a :: kappa). ...) or in the kind of a coercion+    (a |> (co :: kappa1 ~ kappa2)).       These are the ones we default to * if -XPolyKinds is off @@ -1056,7 +1111,7 @@   accumulating-parameter style for candidateQTyVarsOfType so that we   add variables one at a time, left to right.  That means we tend to   produce the variables in left-to-right order.  This is just to make-  it bit more predicatable for the programmer.+  it bit more predictable for the programmer.  Note [Naughty quantification candidates] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1095,8 +1150,8 @@ the final zonk (which zaps any lingering metavariables to Any).  We do this eager zapping in candidateQTyVars, which always precedes-generalisation, because at that moment we have a clear picture of-what skolems are in scope.+generalisation, because at that moment we have a clear picture of what+skolems are in scope within the type itself (e.g. that 'forall arg').  Wrinkle: @@ -1107,7 +1162,7 @@ to treat it as naughty. We say "strictly greater than" because the call to candidateQTyVars is made outside the bumped TcLevel, as stated in the comment to candidateQTyVarsOfType. The level check is done in go_tv-in collect_cant_qtvs. Skipping this check caused #16517.+in collect_cand_qtvs. Skipping this check caused #16517.  -} @@ -1116,9 +1171,19 @@   -- See Note [CandidatesQTvs determinism and order]   --   -- Invariants:-  --   * All variables stored here are MetaTvs. No exceptions.   --   * All variables are fully zonked, including their kinds+  --   * All variables are at a level greater than the ambient level+  --     See Note [Use level numbers for quantification]   --+  -- This *can* contain skolems. For example, in `data X k :: k -> Type`+  -- we need to know that the k is a dependent variable. This is done+  -- by collecting the candidates in the kind after skolemising. It also+  -- comes up when generalizing a associated type instance, where instance+  -- variables are skolems. (Recall that associated type instances are generalized+  -- independently from their enclosing class instance, and the associated+  -- type instance may be generalized by more, fewer, or different variables+  -- than the class instance.)+  --   = DV { dv_kvs :: DTyVarSet    -- "kind" metavariables (dependent)        , dv_tvs :: DTyVarSet    -- "type" metavariables (non-dependent)          -- A variable may appear in both sets@@ -1127,9 +1192,8 @@          -- See Note [Dependent type variables]         , dv_cvs :: CoVarSet-         -- These are covars. We will *not* quantify over these, but-         -- we must make sure also not to quantify over any cv's kinds,-         -- so we include them here as further direction for quantifyTyVars+         -- These are covars. Included only so that we don't repeatedly+         -- look at covars' kinds in accumulator. Not used by quantifyTyVars.     }  instance Semi.Semigroup CandidatesQTvs where@@ -1153,6 +1217,14 @@ candidateKindVars :: CandidatesQTvs -> TyVarSet candidateKindVars dvs = dVarSetToVarSet (dv_kvs dvs) +partitionCandidates :: CandidatesQTvs -> (TyVar -> Bool) -> (DTyVarSet, CandidatesQTvs)+partitionCandidates dvs@(DV { dv_kvs = kvs, dv_tvs = tvs }) pred+  = (extracted, dvs { dv_kvs = rest_kvs, dv_tvs = rest_tvs })+  where+    (extracted_kvs, rest_kvs) = partitionDVarSet pred kvs+    (extracted_tvs, rest_tvs) = partitionDVarSet pred tvs+    extracted = extracted_kvs `unionDVarSet` extracted_tvs+ -- | Gathers free variables to use as quantification candidates (in -- 'quantifyTyVars'). This might output the same var -- in both sets, if it's used in both a type and a kind.@@ -1214,20 +1286,20 @@     -----------------     go :: CandidatesQTvs -> TcType -> TcM CandidatesQTvs     -- Uses accumulating-parameter style-    go dv (AppTy t1 t2)    = foldlM go dv [t1, t2]-    go dv (TyConApp _ tys) = foldlM go dv tys-    go dv (FunTy arg res)  = foldlM go dv [arg, res]-    go dv (LitTy {})       = return dv-    go dv (CastTy ty co)   = do dv1 <- go dv ty-                                collect_cand_qtvs_co bound dv1 co-    go dv (CoercionTy co)  = collect_cand_qtvs_co bound dv co+    go dv (AppTy t1 t2)     = foldlM go dv [t1, t2]+    go dv (TyConApp _ tys)  = foldlM go dv tys+    go dv (FunTy _ arg res) = foldlM go dv [arg, res]+    go dv (LitTy {})        = return dv+    go dv (CastTy ty co)    = do dv1 <- go dv ty+                                 collect_cand_qtvs_co bound dv1 co+    go dv (CoercionTy co)   = collect_cand_qtvs_co bound dv co      go dv (TyVarTy tv)-      | is_bound tv = return dv-      | otherwise   = do { m_contents <- isFilledMetaTyVar_maybe tv-                         ; case m_contents of-                             Just ind_ty -> go dv ind_ty-                             Nothing     -> go_tv dv tv }+      | is_bound tv      = return dv+      | otherwise        = do { m_contents <- isFilledMetaTyVar_maybe tv+                              ; case m_contents of+                                  Just ind_ty -> go dv ind_ty+                                  Nothing     -> go_tv dv tv }      go dv (ForAllTy (Bndr tv _) ty)       = do { dv1 <- collect_cand_qtvs True bound dv (tyVarKind tv)@@ -1246,27 +1318,38 @@       = do { tv_kind <- zonkTcType (tyVarKind tv)                  -- This zonk is annoying, but it is necessary, both to                  -- ensure that the collected candidates have zonked kinds-                 -- (Trac #15795) and to make the naughty check+                 -- (#15795) and to make the naughty check                  -- (which comes next) works correctly             ; cur_lvl <- getTcLevel-           ; if tcTyVarLevel tv `strictlyDeeperThan` cur_lvl &&-                   -- this tyvar is from an outer context: see Wrinkle-                   -- in Note [Naughty quantification candidates]+           ; if |  tcTyVarLevel tv <= cur_lvl+                -> return dv   -- this variable is from an outer context; skip+                               -- See Note [Use level numbers ofor quantification] -                intersectsVarSet bound (tyCoVarsOfType tv_kind)+                |  intersectsVarSet bound (tyCoVarsOfType tv_kind)+                   -- the tyvar must not be from an outer context, but we have+                   -- already checked for this.+                   -- See Note [Naughty quantification candidates]+                -> do { traceTc "Zapping naughty quantifier" $+                          vcat [ ppr tv <+> dcolon <+> ppr tv_kind+                               , text "bound:" <+> pprTyVars (nonDetEltsUniqSet bound)+                               , text "fvs:" <+> pprTyVars (nonDetEltsUniqSet $+                                                            tyCoVarsOfType tv_kind) ] -             then -- See Note [Naughty quantification candidates]-                  do { traceTc "Zapping naughty quantifier" (pprTyVar tv)-                     ; writeMetaTyVar tv (anyTypeOfKind tv_kind)-                     ; collect_cand_qtvs True bound dv tv_kind }+                      ; writeMetaTyVar tv (anyTypeOfKind tv_kind) -             else do { let tv' = tv `setTyVarKind` tv_kind-                           dv' | is_dep    = dv { dv_kvs = kvs `extendDVarSet` tv' }-                               | otherwise = dv { dv_tvs = tvs `extendDVarSet` tv' }-                               -- See Note [Order of accumulation]-                     ; collect_cand_qtvs True emptyVarSet dv' tv_kind } }+                      -- See Note [Recurring into kinds for candidateQTyVars]+                      ; collect_cand_qtvs True bound dv tv_kind } +                |  otherwise+                -> do { let tv' = tv `setTyVarKind` tv_kind+                            dv' | is_dep    = dv { dv_kvs = kvs `extendDVarSet` tv' }+                                | otherwise = dv { dv_tvs = tvs `extendDVarSet` tv' }+                                -- See Note [Order of accumulation]++                        -- See Note [Recurring into kinds for candidateQTyVars]+                      ; collect_cand_qtvs True bound dv' tv_kind } }+ collect_cand_qtvs_co :: VarSet -- bound variables                      -> CandidatesQTvs -> Coercion                      -> TcM CandidatesQTvs@@ -1291,10 +1374,11 @@     go_co dv (KindCo co)           = go_co dv co     go_co dv (SubCo co)            = go_co dv co -    go_co dv (HoleCo hole) = do m_co <- unpackCoercionHole_maybe hole-                                case m_co of-                                  Just co -> go_co dv co-                                  Nothing -> go_cv dv (coHoleCoVar hole)+    go_co dv (HoleCo hole)+      = do m_co <- unpackCoercionHole_maybe hole+           case m_co of+             Just co -> go_co dv co+             Nothing -> go_cv dv (coHoleCoVar hole)      go_co dv (CoVarCo cv) = go_cv dv cv @@ -1314,7 +1398,9 @@     go_cv dv@(DV { dv_cvs = cvs }) cv       | is_bound cv         = return dv       | cv `elemVarSet` cvs = return dv-      | otherwise           = collect_cand_qtvs True emptyVarSet++        -- See Note [Recurring into kinds for candidateQTyVars]+      | otherwise           = collect_cand_qtvs True bound                                     (dv { dv_cvs = cvs `extendVarSet` cv })                                     (idType cv) @@ -1339,6 +1425,44 @@  Note that the unitDVarSet/mappend implementation would not be wrong against any specification -- just suboptimal and confounding to users.++Note [Recurring into kinds for candidateQTyVars]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+First, read Note [Closing over free variable kinds] in TyCoFVs, paying+attention to the end of the Note about using an empty bound set when+traversing a variable's kind.++That Note concludes with the recommendation that we empty out the bound+set when recurring into the kind of a type variable. Yet, we do not do+this here. I have two tasks in order to convince you that this code is+right. First, I must show why it is safe to ignore the reasoning in that+Note. Then, I must show why is is necessary to contradict the reasoning in+that Note.++Why it is safe: There can be no+shadowing in the candidateQ... functions: they work on the output of+type inference, which is seeded by the renamer and its insistence to+use different Uniques for different variables. (In contrast, the Core+functions work on the output of optimizations, which may introduce+shadowing.) Without shadowing, the problem studied by+Note [Closing over free variable kinds] in TyCoFVs cannot happen.++Why it is necessary:+Wiping the bound set would be just plain wrong here. Consider++  forall k1 k2 (a :: k1). Proxy k2 (a |> (hole :: k1 ~# k2))++We really don't want to think k1 and k2 are free here. (It's true that we'll+never be able to fill in `hole`, but we don't want to go off the rails just+because we have an insoluble coercion hole.) So: why is it wrong to wipe+the bound variables here but right in Core? Because the final statement+in Note [Closing over free variable kinds] in TyCoFVs is wrong: not+every variable is either free or bound. A variable can be a hole, too!+The reasoning in that Note then breaks down.++And the reasoning applies just as well to free non-hole variables, so we+retain the bound set always.+ -}  {- *********************************************************************@@ -1353,17 +1477,8 @@ are about to wrap in a forall.  It takes these free type/kind variables (partitioned into dependent and-non-dependent variables) and-  1. Zonks them and remove globals and covars-  2. Extends kvs1 with free kind vars in the kinds of tvs (removing globals)-  3. Calls skolemiseQuantifiedTyVar on each--Step (2) is often unimportant, because the kind variable is often-also free in the type.  Eg-     Typeable k (a::k)-has free vars {k,a}.  But the type (see Trac #7916)-    (f::k->*) (a::k)-has free vars {f,a}, but we must add 'k' as well! Hence step (2).+non-dependent variables) skolemises metavariables with a TcLevel greater+than the ambient level (see Note [Use level numbers of quantification]).  * This function distinguishes between dependent and non-dependent   variables only to keep correct defaulting behavior with -XNoPolyKinds.@@ -1373,6 +1488,48 @@     - a coercion variable (or any tv mentioned in the kind of a covar)     - a runtime-rep variable +Note [Use level numbers for quantification]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The level numbers assigned to metavariables are very useful. Not only+do they track touchability (Note [TcLevel and untouchable type variables]+in TcType), but they also allow us to determine which variables to+generalise. The rule is this:++  When generalising, quantify only metavariables with a TcLevel greater+  than the ambient level.++This works because we bump the level every time we go inside a new+source-level construct. In a traditional generalisation algorithm, we+would gather all free variables that aren't free in an environment.+However, if a variable is in that environment, it will always have a lower+TcLevel: it came from an outer scope. So we can replace the "free in+environment" check with a level-number check.++Here is an example:++  f x = x + (z True)+    where+      z y = x * x++We start by saying (x :: alpha[1]). When inferring the type of z, we'll+quickly discover that z :: alpha[1]. But it would be disastrous to+generalise over alpha in the type of z. So we need to know that alpha+comes from an outer environment. By contrast, the type of y is beta[2],+and we are free to generalise over it. What's the difference between+alpha[1] and beta[2]? Their levels. beta[2] has the right TcLevel for+generalisation, and so we generalise it. alpha[1] does not, and so+we leave it alone.++Note that not *every* variable with a higher level will get generalised,+either due to the monomorphism restriction or other quirks. See, for+example, the code in TcSimplify.decideMonoTyVars and in+TcHsType.kindGeneralizeSome, both of which exclude certain otherwise-eligible+variables from being generalised.++Using level numbers for quantification is implemented in the candidateQTyVars...+functions, by adding only those variables with a level strictly higher than+the ambient level to the set of candidates.+ Note [quantifyTyVars determinism] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The results of quantifyTyVars are wrapped in a forall and can end up in the@@ -1388,60 +1545,39 @@ -}  quantifyTyVars-  :: TcTyCoVarSet     -- Global tvs; already zonked-  -> CandidatesQTvs   -- See Note [Dependent type variables]+  :: CandidatesQTvs   -- See Note [Dependent type variables]                       -- Already zonked   -> TcM [TcTyVar] -- See Note [quantifyTyVars] -- Can be given a mixture of TcTyVars and TyVars, in the case of --   associated type declarations. Also accepts covars, but *never* returns any.-quantifyTyVars gbl_tvs-               dvs@(DV{ dv_kvs = dep_tkvs, dv_tvs = nondep_tkvs, dv_cvs = covars })-  = do { outer_tclvl <- getTcLevel-       ; traceTc "quantifyTyVars 1" (vcat [ppr outer_tclvl, ppr dvs, ppr gbl_tvs])-       ; let co_tvs = closeOverKinds covars-             mono_tvs = gbl_tvs `unionVarSet` co_tvs-              -- NB: All variables in the kind of a covar must not be-              -- quantified over, as we don't quantify over the covar.+-- According to Note [Use level numbers for quantification] and the+-- invariants on CandidateQTvs, we do not have to filter out variables+-- free in the environment here. Just quantify unconditionally, subject+-- to the restrictions in Note [quantifyTyVars].+quantifyTyVars dvs@(DV{ dv_kvs = dep_tkvs, dv_tvs = nondep_tkvs })+       -- short-circuit common case+  | isEmptyDVarSet dep_tkvs+  , isEmptyDVarSet nondep_tkvs+  = do { traceTc "quantifyTyVars has nothing to quantify" empty+       ; return [] } -             dep_kvs = dVarSetElemsWellScoped $-                       dep_tkvs `dVarSetMinusVarSet` mono_tvs-                       -- dVarSetElemsWellScoped: put the kind variables into+  | otherwise+  = do { traceTc "quantifyTyVars 1" (ppr dvs)++       ; let dep_kvs     = scopedSort $ dVarSetElems dep_tkvs+                       -- scopedSort: put the kind variables into                        --    well-scoped order.                        --    E.g.  [k, (a::k)] not the other way roud -             nondep_tvs = dVarSetElems $-                          (nondep_tkvs `minusDVarSet` dep_tkvs)-                           `dVarSetMinusVarSet` mono_tvs+             nondep_tvs  = dVarSetElems (nondep_tkvs `minusDVarSet` dep_tkvs)                  -- See Note [Dependent type variables]                  -- The `minus` dep_tkvs removes any kind-level vars                  --    e.g. T k (a::k)   Since k appear in a kind it'll                  --    be in dv_kvs, and is dependent. So remove it from                  --    dv_tvs which will also contain k-                 -- No worry about dependent covars here;-                 --    they are all in dep_tkvs                  -- NB kinds of tvs are zonked by zonkTyCoVarsAndFV -       -- This block uses level numbers to decide what to quantify-       -- and emits a warning if the two methods do not give the same answer-       ; let dep_kvs2    = dVarSetElemsWellScoped $-                           filterDVarSet (quantifiableTv outer_tclvl) dep_tkvs-             nondep_tvs2 = filter (quantifiableTv outer_tclvl) $-                           dVarSetElems (nondep_tkvs `minusDVarSet` dep_tkvs)--             all_ok = dep_kvs == dep_kvs2 && nondep_tvs == nondep_tvs2-             bad_msg = hang (text "Quantification by level numbers would fail")-                          2 (vcat [ text "Outer level =" <+> ppr outer_tclvl-                                  , text "dep_tkvs ="    <+> ppr dep_tkvs-                                  , text "co_vars ="     <+> vcat [ ppr cv <+> dcolon <+> ppr (varType cv)-                                                                  | cv <- nonDetEltsUniqSet covars ]-                                  , text "co_tvs ="      <+> ppr co_tvs-                                  , text "dep_kvs ="     <+> ppr dep_kvs-                                  , text "dep_kvs2 ="    <+> ppr dep_kvs2-                                  , text "nondep_tvs ="  <+> ppr nondep_tvs-                                  , text "nondep_tvs2 =" <+> ppr nondep_tvs2 ])-       ; WARN( not all_ok, bad_msg ) return ()-              -- In the non-PolyKinds case, default the kind variables              -- to *, and zonk the tyvars as usual.  Notice that this              -- may make quantifyTyVars return a shorter list@@ -1455,9 +1591,7 @@            -- now refer to the dep_kvs'         ; traceTc "quantifyTyVars 2"-           (vcat [ text "globals:"    <+> ppr gbl_tvs-                 , text "mono_tvs:"   <+> ppr mono_tvs-                 , text "nondep:"     <+> pprTyVars nondep_tvs+           (vcat [ text "nondep:"     <+> pprTyVars nondep_tvs                  , text "dep:"        <+> pprTyVars dep_kvs                  , text "dep_kvs'"    <+> pprTyVars dep_kvs'                  , text "nondep_tvs'" <+> pprTyVars nondep_tvs' ])@@ -1477,11 +1611,10 @@       = return Nothing   -- this can happen for a covar that's associated with                          -- a coercion hole. Test case: typecheck/should_compile/T2494 -      | not (isTcTyVar tkv)  -- I don't think this can ever happen.-                             -- Hence the assert-      = ASSERT2( False, text "quantifying over a TyVar" <+> ppr tkv)-        return (Just tkv)-+      | not (isTcTyVar tkv)+      = return (Just tkv)  -- For associated types in a class with a standalone+                           -- kind signature, we have the class variables in+                           -- scope, and they are TyVars not TcTyVars       | otherwise       = do { deflt_done <- defaultTyVar default_kind tkv            ; case deflt_done of@@ -1489,15 +1622,33 @@                False -> do { tv <- skolemiseQuantifiedTyVar tkv                            ; return (Just tv) } } -quantifiableTv :: TcLevel   -- Level of the context, outside the quantification-               -> TcTyVar-               -> Bool-quantifiableTv outer_tclvl tcv-  | isTcTyVar tcv  -- Might be a CoVar; change this when gather covars separtely+isQuantifiableTv :: TcLevel   -- Level of the context, outside the quantification+                 -> TcTyVar+                 -> Bool+isQuantifiableTv outer_tclvl tcv+  | isTcTyVar tcv  -- Might be a CoVar; change this when gather covars separately   = tcTyVarLevel tcv > outer_tclvl   | otherwise   = False +zonkAndSkolemise :: TcTyCoVar -> TcM TcTyCoVar+-- A tyvar binder is never a unification variable (TauTv),+-- rather it is always a skolem. It *might* be a TyVarTv.+-- (Because non-CUSK type declarations use TyVarTvs.)+-- Regardless, it may have a kind that has not yet been zonked,+-- and may include kind unification variables.+zonkAndSkolemise tyvar+  | isTyVarTyVar tyvar+     -- We want to preserve the binding location of the original TyVarTv.+     -- This is important for error messages. If we don't do this, then+     -- we get bad locations in, e.g., typecheck/should_fail/T2688+  = do { zonked_tyvar <- zonkTcTyVarToTyVar tyvar+       ; skolemiseQuantifiedTyVar zonked_tyvar }++  | otherwise+  = ASSERT2( isImmutableTyVar tyvar || isCoVar tyvar, pprTyVar tyvar )+    zonkTyCoVarKind tyvar+ skolemiseQuantifiedTyVar :: TcTyVar -> TcM TcTyVar -- The quantified type variables often include meta type variables -- we want to freeze them into ordinary type variables@@ -1532,7 +1683,7 @@   | isTyVarTyVar tv     -- Do not default TyVarTvs. Doing so would violate the invariants     -- on TyVarTvs; see Note [Signature skolems] in TcType.-    -- Trac #13343 is an example; #14555 is another+    -- #13343 is an example; #14555 is another     -- See Note [Inferring kinds for type declarations] in TcTyClsDecls   = return False @@ -1543,15 +1694,14 @@        ; writeMetaTyVar tv liftedRepTy        ; return True } -  | default_kind                 -- -XNoPolyKinds and this is a kind var-  = do { default_kind_var tv     -- so default it to * if possible-       ; return True }+  | default_kind            -- -XNoPolyKinds and this is a kind var+  = default_kind_var tv     -- so default it to * if possible    | otherwise   = return False    where-    default_kind_var :: TyVar -> TcM ()+    default_kind_var :: TyVar -> TcM Bool        -- defaultKindVar is used exclusively with -XNoPolyKinds        -- See Note [Defaulting with -XNoPolyKinds]        -- It takes an (unconstrained) meta tyvar and defaults it.@@ -1559,11 +1709,20 @@     default_kind_var kv       | isLiftedTypeKind (tyVarKind kv)       = do { traceTc "Defaulting a kind var to *" (ppr kv)-           ; writeMetaTyVar kv liftedTypeKind }+           ; writeMetaTyVar kv liftedTypeKind+           ; return True }       | otherwise-      = addErr (vcat [ text "Cannot default kind variable" <+> quotes (ppr kv')-                     , text "of kind:" <+> ppr (tyVarKind kv')-                     , text "Perhaps enable PolyKinds or add a kind signature" ])+      = do { addErr (vcat [ text "Cannot default kind variable" <+> quotes (ppr kv')+                          , text "of kind:" <+> ppr (tyVarKind kv')+                          , text "Perhaps enable PolyKinds or add a kind signature" ])+           -- We failed to default it, so return False to say so.+           -- Hence, it'll get skolemised.  That might seem odd, but we must either+           -- promote, skolemise, or zap-to-Any, to satisfy TcHsType+           --    Note [Recipe for checking a signature]+           -- Otherwise we get level-number assertion failures. It doesn't matter much+           -- because we are in an error siutation anyway.+           ; return False+        }       where         (_, kv') = tidyOpenTyCoVar emptyTidyEnv kv @@ -1630,7 +1789,7 @@     reverse :: forall a. [a] -> [a] So we know that the argument `f xs` must be a "list of something". But what is the "something"? We don't know until we explore the `f xs` a bit more. So we set-out what we do know at the call of `reverse` by instantiate its type with a fresh+out what we do know at the call of `reverse` by instantiating its type with a fresh meta tyvar, `alpha` say. So now the type of the argument `f xs`, and of the result, is `[alpha]`. The unification variable `alpha` stands for the as-yet-unknown type of the elements of the list.@@ -1744,22 +1903,6 @@  -} --- | @tcGetGlobalTyCoVars@ returns a fully-zonked set of *scoped* tyvars free in--- the environment. To improve subsequent calls to the same function it writes--- the zonked set back into the environment. Note that this returns all--- variables free in anything (term-level or type-level) in scope. We thus--- don't have to worry about clashes with things that are not in scope, because--- if they are reachable, then they'll be returned here.--- NB: This is closed over kinds, so it can return unification variables mentioned--- in the kinds of in-scope tyvars.-tcGetGlobalTyCoVars :: TcM TcTyVarSet-tcGetGlobalTyCoVars-  = do { (TcLclEnv {tcl_tyvars = gtv_var}) <- getLclEnv-       ; gbl_tvs  <- readMutVar gtv_var-       ; gbl_tvs' <- zonkTyCoVarsAndFV gbl_tvs-       ; writeMutVar gtv_var gbl_tvs'-       ; return gbl_tvs' }- zonkTcTypeAndFV :: TcType -> TcM DTyCoVarSet -- Zonk a type and take its free variables -- With kind polymorphism it can be essential to zonk *first*@@ -1788,6 +1931,10 @@   -- the ordering by turning it into a nondeterministic set and the order   -- of zonking doesn't matter for determinism. +zonkDTyCoVarSetAndFV :: DTyCoVarSet -> TcM DTyCoVarSet+zonkDTyCoVarSetAndFV tycovars+  = mkDVarSet <$> (zonkTyCoVarsAndFVList $ dVarSetElems tycovars)+ -- Takes a list of TyCoVars, zonks them and returns a -- deterministically ordered list of their free variables. zonkTyCoVarsAndFVList :: [TyCoVar] -> TcM [TyCoVar]@@ -1819,7 +1966,7 @@                                , ic_wanted = wanted                                , ic_info   = info })   = do { skols'  <- mapM zonkTyCoVarKind skols  -- Need to zonk their kinds!-                                                -- as Trac #7230 showed+                                                -- as #7230 showed        ; given'  <- mapM zonkEvVar given        ; info'   <- zonkSkolemInfo info        ; wanted' <- zonkWCRec wanted@@ -1843,13 +1990,10 @@        ; return (WC { wc_simple = simple', wc_impl = implic' }) }  zonkSimples :: Cts -> TcM Cts-zonkSimples cts = do { cts' <- mapBagM zonkCt' cts+zonkSimples cts = do { cts' <- mapBagM zonkCt cts                      ; traceTc "zonkSimples done:" (ppr cts')                      ; return cts' } -zonkCt' :: Ct -> TcM Ct-zonkCt' ct = zonkCt ct- {- Note [zonkCt behaviour] ~~~~~~~~~~~~~~~~~~~~~~~~~~ zonkCt tries to maintain the canonical form of a Ct.  For example,@@ -1863,7 +2007,7 @@   simple wanted and plugin loop, looks for @CDictCan@s. If a plugin is in use,   constraints are zonked before being passed to the plugin. This means if we   don't preserve a canonical form, @expandSuperClasses@ fails to expand-  superclasses. This is what happened in Trac #11525.+  superclasses. This is what happened in #11525.  - For CHoleCan, once we forget that it's a hole, we can never recover that info. @@ -1888,15 +2032,12 @@        ; args' <- mapM zonkTcType args        ; return $ ct { cc_ev = ev', cc_tyargs = args' } } -zonkCt ct@(CTyEqCan { cc_ev = ev, cc_tyvar = tv, cc_rhs = rhs })-  = do { ev'    <- zonkCtEvidence ev-       ; tv_ty' <- zonkTcTyVar tv-       ; case getTyVar_maybe tv_ty' of-           Just tv' -> do { rhs' <- zonkTcType rhs-                          ; return ct { cc_ev    = ev'-                                      , cc_tyvar = tv'-                                      , cc_rhs   = rhs' } }-           Nothing  -> return (mkNonCanonical ev') }+zonkCt (CTyEqCan { cc_ev = ev })+  = mkNonCanonical <$> zonkCtEvidence ev+  -- CTyEqCan has some delicate invariants that may be violated by+  -- zonking (documented with the Ct type) , so we don't want to create+  -- a CTyEqCan here. Besides, this will be canonicalized again anyway,+  -- so there is very little benefit in keeping the CTyEqCan constructor.  zonkCt ct@(CIrredCan { cc_ev = ev }) -- Preserve the cc_insol flag   = do { ev' <- zonkCtEvidence ev@@ -1957,12 +2098,11 @@ -- before all metavars are filled in. zonkTcTypeMapper :: TyCoMapper () TcM zonkTcTypeMapper = TyCoMapper-  { tcm_smart = True-  , tcm_tyvar = const zonkTcTyVar+  { tcm_tyvar = const zonkTcTyVar   , tcm_covar = const (\cv -> mkCoVarCo <$> zonkTyCoVarKind cv)   , tcm_hole  = hole   , tcm_tycobinder = \_env tv _vis -> ((), ) <$> zonkTyCoVarKind tv-  , tcm_tycon = return }+  , tcm_tycon      = zonkTcTyCon }   where     hole :: () -> CoercionHole -> TcM Coercion     hole _ hole@(CoercionHole { ch_ref = ref, ch_co_var = cv })@@ -1973,6 +2113,15 @@                Nothing -> do { cv' <- zonkCoVar cv                              ; return $ HoleCo (hole { ch_co_var = cv' }) } } +zonkTcTyCon :: TcTyCon -> TcM TcTyCon+-- Only called on TcTyCons+-- A non-poly TcTyCon may have unification+-- variables that need zonking, but poly ones cannot+zonkTcTyCon tc+ | tcTyConIsPoly tc = return tc+ | otherwise        = do { tck' <- zonkTcType (tyConKind tc)+                         ; return (setTcTyConKind tc tck') }+ -- For unbound, mutable tyvars, zonkType uses the function given to it -- For tyvars bound at a for-all, zonkType zonks them to an immutable --      type variable and zonks the kind too@@ -1983,35 +2132,6 @@ zonkCo :: Coercion -> TcM Coercion zonkCo = mapCoercion zonkTcTypeMapper () -zonkTcTyCoVarBndr :: TcTyCoVar -> TcM TcTyCoVar--- A tyvar binder is never a unification variable (TauTv),--- rather it is always a skolem. It *might* be a TyVarTv.--- (Because non-CUSK type declarations use TyVarTvs.)--- Regardless, it may have a kind--- that has not yet been zonked, and may include kind--- unification variables.-zonkTcTyCoVarBndr tyvar-  | isTyVarTyVar tyvar-     -- We want to preserve the binding location of the original TyVarTv.-     -- This is important for error messages. If we don't do this, then-     -- we get bad locations in, e.g., typecheck/should_fail/T2688-  = do { zonked_ty <- zonkTcTyVar tyvar-       ; let zonked_tyvar = tcGetTyVar "zonkTcTyCoVarBndr TyVarTv" zonked_ty-             zonked_name  = getName zonked_tyvar-             reloc'd_name = setNameLoc zonked_name (getSrcSpan tyvar)-       ; return (setTyVarName zonked_tyvar reloc'd_name) }--  | otherwise-  = ASSERT2( isImmutableTyVar tyvar || isCoVar tyvar, pprTyVar tyvar )-    zonkTyCoVarKind tyvar--zonkTyConBinders :: [TyConBinder] -> TcM [TyConBinder]-zonkTyConBinders = mapM zonk1-  where-    zonk1 (Bndr tv vis)-      = do { tv' <- zonkTcTyCoVarBndr tv-           ; return (Bndr tv' vis) }- zonkTcTyVar :: TcTyVar -> TcM TcType -- Simply look through all Flexis zonkTcTyVar tv@@ -2108,10 +2228,10 @@                              Nothing  -> return (env1, Nothing)        ; (env3, orig')  <- zonkTidyOrigin env2 orig        ; return (env3, KindEqOrigin ty1' m_ty2' orig' t_or_k) }-zonkTidyOrigin env (FunDepOrigin1 p1 l1 p2 l2)+zonkTidyOrigin env (FunDepOrigin1 p1 o1 l1 p2 o2 l2)   = do { (env1, p1') <- zonkTidyTcType env  p1        ; (env2, p2') <- zonkTidyTcType env1 p2-       ; return (env2, FunDepOrigin1 p1' l1 p2' l2) }+       ; return (env2, FunDepOrigin1 p1' o1 l1 p2' o2 l2) } zonkTidyOrigin env (FunDepOrigin2 p1 o1 p2 l2)   = do { (env1, p1') <- zonkTidyTcType env  p1        ; (env2, p2') <- zonkTidyTcType env1 p2@@ -2154,7 +2274,7 @@ tidySigSkol :: TidyEnv -> UserTypeCtxt             -> TcType -> [(Name,TcTyVar)] -> SkolemInfo -- We need to take special care when tidying SigSkol--- See Note [SigSkol SkolemInfo] in TcRnTypes+-- See Note [SigSkol SkolemInfo] in Origin tidySigSkol env cx ty tv_prs   = SigSkol cx (tidy_ty env ty) tv_prs'   where@@ -2166,8 +2286,8 @@       where         (env', tv') = tidy_tv_bndr env tv -    tidy_ty env (FunTy arg res)-      = FunTy (tidyType env arg) (tidy_ty env res)+    tidy_ty env ty@(FunTy _ arg res)+      = ty { ft_arg = tidyType env arg, ft_res = tidy_ty env res }      tidy_ty env ty = tidyType env ty @@ -2192,7 +2312,7 @@ -}  -- | According to the rules around representation polymorphism--- (see https://ghc.haskell.org/trac/ghc/wiki/NoSubKinds), no binder+-- (see https://gitlab.haskell.org/ghc/ghc/wikis/no-sub-kinds), no binder -- can have a representation-polymorphic type. This check ensures -- that we respect this rule. It is a bit regrettable that this error -- occurs in zonking, after which we should have reported all errors.
typecheck/TcMatches.hs view
@@ -12,6 +12,7 @@ {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE RecordWildCards #-}  module TcMatches ( tcMatchesFun, tcGRHS, tcGRHSsPat, tcMatchesCase, tcMatchLambda,                    TcMatchCtxt(..), TcStmtChecker, TcExprStmtChecker, TcCmdStmtChecker,@@ -21,11 +22,11 @@  import GhcPrelude -import {-# SOURCE #-}   TcExpr( tcSyntaxOp, tcInferSigmaNC, tcInferSigma+import {-# SOURCE #-}   TcExpr( tcSyntaxOp, tcInferRhoNC, tcInferRho                               , tcCheckId, tcMonoExpr, tcMonoExprNC, tcPolyExpr )  import BasicTypes (LexicalFixity(..))-import HsSyn+import GHC.Hs import TcRnMonad import TcEnv import TcPat@@ -33,6 +34,7 @@ import TcType import TcBinds import TcUnify+import TcOrigin import Name import TysWiredIn import Id@@ -72,7 +74,7 @@  tcMatchesFun :: Located Name              -> MatchGroup GhcRn (LHsExpr GhcRn)-             -> ExpRhoType     -- Expected type of function+             -> ExpSigmaType    -- Expected type of function              -> TcM (HsWrapper, MatchGroup GhcTcId (LHsExpr GhcTcId))                                 -- Returns type of body tcMatchesFun fn@(L _ fun_name) matches exp_ty@@ -219,7 +221,7 @@        ; return (MG { mg_alts = L l matches'                     , mg_ext = MatchGroupTc pat_tys rhs_ty                     , mg_origin = origin }) }-tcMatches _ _ _ (XMatchGroup {}) = panic "tcMatches"+tcMatches _ _ _ (XMatchGroup nec) = noExtCon nec  ------------- tcMatch :: (Outputable (body GhcRn)) => TcMatchCtxt body@@ -236,10 +238,10 @@       = add_match_ctxt match $         do { (pats', grhss') <- tcPats (mc_what ctxt) pats pat_tys $                                 tcGRHSs ctxt grhss rhs_ty-           ; return (Match { m_ext = noExt+           ; return (Match { m_ext = noExtField                            , m_ctxt = mc_what ctxt, m_pats = pats'                            , m_grhss = grhss' }) }-    tc_match  _ _ _ (XMatch _) = panic "tcMatch"+    tc_match  _ _ _ (XMatch nec) = noExtCon nec          -- For (\x -> e), tcExpr has already said "In the expression \x->e"         -- so we don't want to add "In the lambda abstraction \x->e"@@ -263,8 +265,8 @@             <- tcLocalBinds binds $                mapM (wrapLocM (tcGRHS ctxt res_ty)) grhss -        ; return (GRHSs noExt grhss' (L l binds')) }-tcGRHSs _ (XGRHSs _) _ = panic "tcGRHSs"+        ; return (GRHSs noExtField grhss' (L l binds')) }+tcGRHSs _ (XGRHSs nec) _ = noExtCon nec  ------------- tcGRHS :: TcMatchCtxt body -> ExpRhoType -> GRHS GhcRn (Located (body GhcRn))@@ -274,10 +276,10 @@   = do  { (guards', rhs')             <- tcStmtsAndThen stmt_ctxt tcGuardStmt guards res_ty $                mc_body ctxt rhs-        ; return (GRHS noExt guards' rhs') }+        ; return (GRHS noExtField guards' rhs') }   where     stmt_ctxt  = PatGuard (mc_what ctxt)-tcGRHS _ _ (XGRHS _) = panic "tcGRHS"+tcGRHS _ _ (XGRHS nec) = noExtCon nec  {- ************************************************************************@@ -404,7 +406,7 @@         ; return (BodyStmt boolTy guard' noSyntaxExpr noSyntaxExpr, thing) }  tcGuardStmt ctxt (BindStmt _ pat rhs _ _) res_ty thing_inside-  = do  { (rhs', rhs_ty) <- tcInferSigmaNC rhs+  = do  { (rhs', rhs_ty) <- tcInferRhoNC rhs                                    -- Stmt has a context already         ; (pat', thing)  <- tcPat_O (StmtCtxt ctxt) (lexprCtOrigin rhs)                                     pat (mkCheckExpType rhs_ty) $@@ -467,7 +469,7 @@                       ; (pairs', thing) <- loop pairs                       ; return (ids, pairs', thing) }            ; return ( ParStmtBlock x stmts' ids noSyntaxExpr : pairs', thing ) }-    loop (XParStmtBlock{}:_) = panic "tcLcStmt"+    loop (XParStmtBlock nec:_) = noExtCon nec  tcLcStmt m_tc ctxt (TransStmt { trS_form = form, trS_stmts = stmts                               , trS_bndrs =  bindersMap@@ -478,7 +480,7 @@              --  passed in to tcStmtsAndThen is never looked at        ; (stmts', (bndr_ids, by'))             <- tcStmtsAndThen (TransStmtCtxt ctxt) (tcLcStmt m_tc) stmts unused_ty $ \_ -> do-               { by' <- traverse tcInferSigma by+               { by' <- traverse tcInferRho by                ; bndr_ids <- tcLookupLocalIds bndr_names                ; return (bndr_ids, by') } @@ -496,14 +498,14 @@              by_arrow :: Type -> Type     -- Wraps 'ty' to '(a->t) -> ty' if the By is present              by_arrow = case by' of                           Nothing       -> \ty -> ty-                          Just (_,e_ty) -> \ty -> (alphaTy `mkFunTy` e_ty) `mkFunTy` ty+                          Just (_,e_ty) -> \ty -> (alphaTy `mkVisFunTy` e_ty) `mkVisFunTy` ty               tup_ty        = mkBigCoreVarTupTy bndr_ids              poly_arg_ty   = m_app alphaTy              poly_res_ty   = m_app (n_app alphaTy)              using_poly_ty = mkInvForAllTy alphaTyVar $                              by_arrow $-                             poly_arg_ty `mkFunTy` poly_res_ty+                             poly_arg_ty `mkVisFunTy` poly_res_ty         ; using' <- tcPolyExpr using using_poly_ty        ; let final_using = fmap (mkHsWrap (WpTyApp tup_ty)) using'@@ -516,7 +518,7 @@               -- Ensure that every old binder of type `b` is linked up with its              -- new binder which should have type `n b`-             -- See Note [GroupStmt binder map] in HsExpr+             -- See Note [GroupStmt binder map] in GHC.Hs.Expr              n_bndr_ids  = zipWith mk_n_bndr n_bndr_names bndr_ids              bindersMap' = bndr_ids `zip` n_bndr_ids @@ -616,23 +618,22 @@                          , trS_by = by, trS_using = using, trS_form = form                          , trS_ret = return_op, trS_bind = bind_op                          , trS_fmap = fmap_op }) res_ty thing_inside-  = do { let star_star_kind = liftedTypeKind `mkFunTy` liftedTypeKind-       ; m1_ty   <- newFlexiTyVarTy star_star_kind-       ; m2_ty   <- newFlexiTyVarTy star_star_kind+  = do { m1_ty   <- newFlexiTyVarTy typeToTypeKind+       ; m2_ty   <- newFlexiTyVarTy typeToTypeKind        ; tup_ty  <- newFlexiTyVarTy liftedTypeKind        ; by_e_ty <- newFlexiTyVarTy liftedTypeKind  -- The type of the 'by' expression (if any)           -- n_app :: Type -> Type   -- Wraps a 'ty' into '(n ty)' for GroupForm        ; n_app <- case form of                     ThenForm -> return (\ty -> ty)-                    _        -> do { n_ty <- newFlexiTyVarTy star_star_kind+                    _        -> do { n_ty <- newFlexiTyVarTy typeToTypeKind                                    ; return (n_ty `mkAppTy`) }        ; let by_arrow :: Type -> Type              -- (by_arrow res) produces ((alpha->e_ty) -> res)     ('by' present)              --                          or res                    ('by' absent)              by_arrow = case by of                           Nothing -> \res -> res-                          Just {} -> \res -> (alphaTy `mkFunTy` by_e_ty) `mkFunTy` res+                          Just {} -> \res -> (alphaTy `mkVisFunTy` by_e_ty) `mkVisFunTy` res               poly_arg_ty  = m1_ty `mkAppTy` alphaTy              using_arg_ty = m1_ty `mkAppTy` tup_ty@@ -640,7 +641,7 @@              using_res_ty = m2_ty `mkAppTy` n_app tup_ty              using_poly_ty = mkInvForAllTy alphaTyVar $                              by_arrow $-                             poly_arg_ty `mkFunTy` poly_res_ty+                             poly_arg_ty `mkVisFunTy` poly_res_ty               -- 'stmts' returns a result of type (m1_ty tuple_ty),              -- typically something like [(Int,Bool,Int)]@@ -671,7 +672,7 @@        ; new_res_ty <- newFlexiTyVarTy liftedTypeKind        ; (_, bind_op')  <- tcSyntaxOp MCompOrigin bind_op                              [ synKnownType using_res_ty-                             , synKnownType (n_app tup_ty `mkFunTy` new_res_ty) ]+                             , synKnownType (n_app tup_ty `mkVisFunTy` new_res_ty) ]                              res_ty $ \ _ -> return ()         --------------- Typecheck the 'fmap' function -------------@@ -680,9 +681,9 @@                        _ -> fmap unLoc . tcPolyExpr (noLoc fmap_op) $                             mkInvForAllTy alphaTyVar $                             mkInvForAllTy betaTyVar  $-                            (alphaTy `mkFunTy` betaTy)-                            `mkFunTy` (n_app alphaTy)-                            `mkFunTy` (n_app betaTy)+                            (alphaTy `mkVisFunTy` betaTy)+                            `mkVisFunTy` (n_app alphaTy)+                            `mkVisFunTy` (n_app betaTy)         --------------- Typecheck the 'using' function -------------        -- using :: ((a,b,c)->t) -> m1 (a,b,c) -> m2 (n (a,b,c))@@ -696,7 +697,7 @@               -- Ensure that every old binder of type `b` is linked up with its              -- new binder which should have type `n b`-             -- See Note [GroupStmt binder map] in HsExpr+             -- See Note [GroupStmt binder map] in GHC.Hs.Expr              n_bndr_ids = zipWith mk_n_bndr n_bndr_names bndr_ids              bindersMap' = bndr_ids `zip` n_bndr_ids @@ -741,14 +742,13 @@ --        -> m (st1, (st2, st3)) -- tcMcStmt ctxt (ParStmt _ bndr_stmts_s mzip_op bind_op) res_ty thing_inside-  = do { let star_star_kind = liftedTypeKind `mkFunTy` liftedTypeKind-       ; m_ty   <- newFlexiTyVarTy star_star_kind+  = do { m_ty   <- newFlexiTyVarTy typeToTypeKind         ; let mzip_ty  = mkInvForAllTys [alphaTyVar, betaTyVar] $                         (m_ty `mkAppTy` alphaTy)-                        `mkFunTy`+                        `mkVisFunTy`                         (m_ty `mkAppTy` betaTy)-                        `mkFunTy`+                        `mkVisFunTy`                         (m_ty `mkAppTy` mkBoxedTupleTy [alphaTy, betaTy])        ; mzip_op' <- unLoc `fmap` tcPolyExpr (noLoc mzip_op) mzip_ty @@ -820,7 +820,7 @@   = do  {       -- Deal with rebindable syntax:                 --       (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty                 -- This level of generality is needed for using do-notation-                -- in full generality; see Trac #1537+                -- in full generality; see #1537            ((rhs', pat', new_res_ty, thing), bind_op')             <- tcSyntaxOp DoOrigin bind_op [SynRho, SynFun SynAny SynRho] res_ty $@@ -884,7 +884,7 @@         ; ((_, mfix_op'), mfix_res_ty)             <- tcInferInst $ \ exp_ty ->                tcSyntaxOp DoOrigin mfix_op-                          [synKnownType (mkFunTy tup_ty stmts_ty)] exp_ty $+                          [synKnownType (mkVisFunTy tup_ty stmts_ty)] exp_ty $                \ _ -> return ()          ; ((thing, new_res_ty), bind_op')@@ -949,7 +949,7 @@ pushing info from the context into the RHS.  To do this, we check the rebindable syntax first, and push that information into (tcMonoExprNC rhs). Otherwise the error shows up when checking the rebindable syntax, and-the expected/inferred stuff is back to front (see Trac #3613).+the expected/inferred stuff is back to front (see #3613).  Note [typechecking ApplicativeStmt] @@ -982,7 +982,7 @@       ; ts <- replicateM (arity-1) $ newInferExpTypeInst       ; exp_tys <- replicateM arity $ newFlexiTyVarTy liftedTypeKind       ; pat_tys <- replicateM arity $ newFlexiTyVarTy liftedTypeKind-      ; let fun_ty = mkFunTys pat_tys body_ty+      ; let fun_ty = mkVisFunTys pat_tys body_ty         -- NB. do the <$>,<*> operators first, we don't want type errors here        --     i.e. goOps before goArgs@@ -992,7 +992,7 @@        -- Typecheck each ApplicativeArg separately       -- See Note [ApplicativeDo and constraints]-      ; args' <- mapM goArg (zip3 args pat_tys exp_tys)+      ; args' <- mapM (goArg body_ty) (zip3 args pat_tys exp_tys)        -- Bring into scope all the things bound by the args,       -- and typecheck the thing_inside@@ -1012,18 +1012,30 @@            ; ops' <- goOps t_i ops            ; return (op' : ops') } -    goArg :: (ApplicativeArg GhcRn, Type, Type)+    goArg :: Type -> (ApplicativeArg GhcRn, Type, Type)           -> TcM (ApplicativeArg GhcTcId) -    goArg (ApplicativeArgOne x pat rhs isBody, pat_ty, exp_ty)+    goArg body_ty (ApplicativeArgOne+                    { app_arg_pattern = pat+                    , arg_expr        = rhs+                    , fail_operator   = fail_op+                    , ..+                    }, pat_ty, exp_ty)       = setSrcSpan (combineSrcSpans (getLoc pat) (getLoc rhs)) $         addErrCtxt (pprStmtInCtxt ctxt (mkBindStmt pat rhs))   $         do { rhs' <- tcMonoExprNC rhs (mkCheckExpType exp_ty)            ; (pat', _) <- tcPat (StmtCtxt ctxt) pat (mkCheckExpType pat_ty) $                           return ()-           ; return (ApplicativeArgOne x pat' rhs' isBody) }+           ; fail_op' <- tcMonadFailOp (DoPatOrigin pat) pat' fail_op body_ty -    goArg (ApplicativeArgMany x stmts ret pat, pat_ty, exp_ty)+           ; return (ApplicativeArgOne+                      { app_arg_pattern = pat'+                      , arg_expr        = rhs'+                      , fail_operator   = fail_op'+                      , .. }+                    ) }++    goArg _body_ty (ApplicativeArgMany x stmts ret pat, pat_ty, exp_ty)       = do { (stmts', (ret',pat')) <-                 tcStmtsAndThen ctxt tcDoStmt stmts (mkCheckExpType exp_ty) $                 \res_ty  -> do@@ -1034,19 +1046,18 @@                   }            ; return (ApplicativeArgMany x stmts' ret' pat') } -    goArg (XApplicativeArg _, _, _) = panic "tcApplicativeStmts"+    goArg _body_ty (XApplicativeArg nec, _, _) = noExtCon nec      get_arg_bndrs :: ApplicativeArg GhcTcId -> [Id]-    get_arg_bndrs (ApplicativeArgOne _ pat _ _)  = collectPatBinders pat-    get_arg_bndrs (ApplicativeArgMany _ _ _ pat) = collectPatBinders pat-    get_arg_bndrs (XApplicativeArg _)            = panic "tcApplicativeStmts"-+    get_arg_bndrs (ApplicativeArgOne { app_arg_pattern = pat }) = collectPatBinders pat+    get_arg_bndrs (ApplicativeArgMany { bv_pattern =  pat }) = collectPatBinders pat+    get_arg_bndrs (XApplicativeArg nec)          = noExtCon nec  {- Note [ApplicativeDo and constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An applicative-do is supposed to take place in parallel, so constraints bound in one arm can't possibly be available in another-(Trac #13242).  Our current rule is this (more details and discussion+(#13242).  Our current rule is this (more details and discussion on the ticket). Consider     ...stmts...@@ -1096,5 +1107,5 @@      args_in_match :: LMatch GhcRn body -> Int     args_in_match (L _ (Match { m_pats = pats })) = length pats-    args_in_match (L _ (XMatch _)) = panic "checkArgs"-checkArgs _ (XMatchGroup{}) = panic "checkArgs"+    args_in_match (L _ (XMatch nec)) = noExtCon nec+checkArgs _ (XMatchGroup nec) = noExtCon nec
typecheck/TcMatches.hs-boot view
@@ -1,11 +1,11 @@ module TcMatches where-import HsSyn    ( GRHSs, MatchGroup, LHsExpr )+import GHC.Hs   ( GRHSs, MatchGroup, LHsExpr ) import TcEvidence( HsWrapper ) import Name     ( Name )-import TcType   ( ExpRhoType, TcRhoType )+import TcType   ( ExpSigmaType, TcRhoType ) import TcRnTypes( TcM ) import SrcLoc   ( Located )-import HsExtension ( GhcRn, GhcTcId )+import GHC.Hs.Extension ( GhcRn, GhcTcId )  tcGRHSsPat    :: GRHSs GhcRn (LHsExpr GhcRn)               -> TcRhoType@@ -13,5 +13,5 @@  tcMatchesFun :: Located Name              -> MatchGroup GhcRn (LHsExpr GhcRn)-             -> ExpRhoType+             -> ExpSigmaType              -> TcM (HsWrapper, MatchGroup GhcTcId (LHsExpr GhcTcId))
+ typecheck/TcOrigin.hs view
@@ -0,0 +1,660 @@+{-++Describes the provenance of types as they flow through the type-checker.+The datatypes here are mainly used for error message generation.++-}++{-# LANGUAGE CPP #-}++module TcOrigin (+  -- UserTypeCtxt+  UserTypeCtxt(..), pprUserTypeCtxt, isSigMaybe,++  -- SkolemInfo+  SkolemInfo(..), pprSigSkolInfo, pprSkolInfo,++  -- CtOrigin+  CtOrigin(..), exprCtOrigin, lexprCtOrigin, matchesCtOrigin, grhssCtOrigin,+  isVisibleOrigin, toInvisibleOrigin,+  pprCtOrigin, isGivenOrigin++  ) where++#include "HsVersions.h"++import GhcPrelude++import TcType++import GHC.Hs++import Id+import DataCon+import ConLike+import TyCon+import InstEnv+import PatSyn++import Module+import Name+import RdrName+import qualified GHC.LanguageExtensions as LangExt+import DynFlags++import SrcLoc+import FastString+import Outputable+import BasicTypes++{- *********************************************************************+*                                                                      *+          UserTypeCtxt+*                                                                      *+********************************************************************* -}++-------------------------------------+-- | UserTypeCtxt describes the origin of the polymorphic type+-- in the places where we need an expression to have that type+data UserTypeCtxt+  = FunSigCtxt      -- Function type signature, when checking the type+                    -- Also used for types in SPECIALISE pragmas+       Name              -- Name of the function+       Bool              -- True <=> report redundant constraints+                            -- This is usually True, but False for+                            --   * Record selectors (not important here)+                            --   * Class and instance methods.  Here+                            --     the code may legitimately be more+                            --     polymorphic than the signature+                            --     generated from the class+                            --     declaration++  | InfSigCtxt Name     -- Inferred type for function+  | ExprSigCtxt         -- Expression type signature+  | KindSigCtxt         -- Kind signature+  | StandaloneKindSigCtxt  -- Standalone kind signature+       Name                -- Name of the type/class+  | TypeAppCtxt         -- Visible type application+  | ConArgCtxt Name     -- Data constructor argument+  | TySynCtxt Name      -- RHS of a type synonym decl+  | PatSynCtxt Name     -- Type sig for a pattern synonym+  | PatSigCtxt          -- Type sig in pattern+                        --   eg  f (x::t) = ...+                        --   or  (x::t, y) = e+  | RuleSigCtxt Name    -- LHS of a RULE forall+                        --    RULE "foo" forall (x :: a -> a). f (Just x) = ...+  | ResSigCtxt          -- Result type sig+                        --      f x :: t = ....+  | ForSigCtxt Name     -- Foreign import or export signature+  | DefaultDeclCtxt     -- Types in a default declaration+  | InstDeclCtxt Bool   -- An instance declaration+                        --    True:  stand-alone deriving+                        --    False: vanilla instance declaration+  | SpecInstCtxt        -- SPECIALISE instance pragma+  | ThBrackCtxt         -- Template Haskell type brackets [t| ... |]+  | GenSigCtxt          -- Higher-rank or impredicative situations+                        -- e.g. (f e) where f has a higher-rank type+                        -- We might want to elaborate this+  | GhciCtxt Bool       -- GHCi command :kind <type>+                        -- The Bool indicates if we are checking the outermost+                        -- type application.+                        -- See Note [Unsaturated type synonyms in GHCi] in+                        -- TcValidity.++  | ClassSCCtxt Name    -- Superclasses of a class+  | SigmaCtxt           -- Theta part of a normal for-all type+                        --      f :: <S> => a -> a+  | DataTyCtxt Name     -- The "stupid theta" part of a data decl+                        --      data <S> => T a = MkT a+  | DerivClauseCtxt     -- A 'deriving' clause+  | TyVarBndrKindCtxt Name  -- The kind of a type variable being bound+  | DataKindCtxt Name   -- The kind of a data/newtype (instance)+  | TySynKindCtxt Name  -- The kind of the RHS of a type synonym+  | TyFamResKindCtxt Name   -- The result kind of a type family++{-+-- Notes re TySynCtxt+-- We allow type synonyms that aren't types; e.g.  type List = []+--+-- If the RHS mentions tyvars that aren't in scope, we'll+-- quantify over them:+--      e.g.    type T = a->a+-- will become  type T = forall a. a->a+--+-- With gla-exts that's right, but for H98 we should complain.+-}+++pprUserTypeCtxt :: UserTypeCtxt -> SDoc+pprUserTypeCtxt (FunSigCtxt n _)  = text "the type signature for" <+> quotes (ppr n)+pprUserTypeCtxt (InfSigCtxt n)    = text "the inferred type for" <+> quotes (ppr n)+pprUserTypeCtxt (RuleSigCtxt n)   = text "a RULE for" <+> quotes (ppr n)+pprUserTypeCtxt ExprSigCtxt       = text "an expression type signature"+pprUserTypeCtxt KindSigCtxt       = text "a kind signature"+pprUserTypeCtxt (StandaloneKindSigCtxt n) = text "a standalone kind signature for" <+> quotes (ppr n)+pprUserTypeCtxt TypeAppCtxt       = text "a type argument"+pprUserTypeCtxt (ConArgCtxt c)    = text "the type of the constructor" <+> quotes (ppr c)+pprUserTypeCtxt (TySynCtxt c)     = text "the RHS of the type synonym" <+> quotes (ppr c)+pprUserTypeCtxt ThBrackCtxt       = text "a Template Haskell quotation [t|...|]"+pprUserTypeCtxt PatSigCtxt        = text "a pattern type signature"+pprUserTypeCtxt ResSigCtxt        = text "a result type signature"+pprUserTypeCtxt (ForSigCtxt n)    = text "the foreign declaration for" <+> quotes (ppr n)+pprUserTypeCtxt DefaultDeclCtxt   = text "a type in a `default' declaration"+pprUserTypeCtxt (InstDeclCtxt False) = text "an instance declaration"+pprUserTypeCtxt (InstDeclCtxt True)  = text "a stand-alone deriving instance declaration"+pprUserTypeCtxt SpecInstCtxt      = text "a SPECIALISE instance pragma"+pprUserTypeCtxt GenSigCtxt        = text "a type expected by the context"+pprUserTypeCtxt (GhciCtxt {})     = text "a type in a GHCi command"+pprUserTypeCtxt (ClassSCCtxt c)   = text "the super-classes of class" <+> quotes (ppr c)+pprUserTypeCtxt SigmaCtxt         = text "the context of a polymorphic type"+pprUserTypeCtxt (DataTyCtxt tc)   = text "the context of the data type declaration for" <+> quotes (ppr tc)+pprUserTypeCtxt (PatSynCtxt n)    = text "the signature for pattern synonym" <+> quotes (ppr n)+pprUserTypeCtxt (DerivClauseCtxt) = text "a `deriving' clause"+pprUserTypeCtxt (TyVarBndrKindCtxt n) = text "the kind annotation on the type variable" <+> quotes (ppr n)+pprUserTypeCtxt (DataKindCtxt n)  = text "the kind annotation on the declaration for" <+> quotes (ppr n)+pprUserTypeCtxt (TySynKindCtxt n) = text "the kind annotation on the declaration for" <+> quotes (ppr n)+pprUserTypeCtxt (TyFamResKindCtxt n) = text "the result kind for" <+> quotes (ppr n)++isSigMaybe :: UserTypeCtxt -> Maybe Name+isSigMaybe (FunSigCtxt n _) = Just n+isSigMaybe (ConArgCtxt n)   = Just n+isSigMaybe (ForSigCtxt n)   = Just n+isSigMaybe (PatSynCtxt n)   = Just n+isSigMaybe _                = Nothing++{-+************************************************************************+*                                                                      *+                SkolemInfo+*                                                                      *+************************************************************************+-}++-- SkolemInfo gives the origin of *given* constraints+--   a) type variables are skolemised+--   b) an implication constraint is generated+data SkolemInfo+  = SigSkol -- A skolem that is created by instantiating+            -- a programmer-supplied type signature+            -- Location of the binding site is on the TyVar+            -- See Note [SigSkol SkolemInfo]+       UserTypeCtxt        -- What sort of signature+       TcType              -- Original type signature (before skolemisation)+       [(Name,TcTyVar)]    -- Maps the original name of the skolemised tyvar+                           -- to its instantiated version++  | SigTypeSkol UserTypeCtxt+                 -- like SigSkol, but when we're kind-checking the *type*+                 -- hence, we have less info++  | ForAllSkol SDoc     -- Bound by a user-written "forall".++  | DerivSkol Type      -- Bound by a 'deriving' clause;+                        -- the type is the instance we are trying to derive++  | InstSkol            -- Bound at an instance decl+  | InstSC TypeSize     -- A "given" constraint obtained by superclass selection.+                        -- If (C ty1 .. tyn) is the largest class from+                        --    which we made a superclass selection in the chain,+                        --    then TypeSize = sizeTypes [ty1, .., tyn]+                        -- See Note [Solving superclass constraints] in TcInstDcls++  | FamInstSkol         -- Bound at a family instance decl+  | PatSkol             -- An existential type variable bound by a pattern for+      ConLike           -- a data constructor with an existential type.+      (HsMatchContext Name)+             -- e.g.   data T = forall a. Eq a => MkT a+             --        f (MkT x) = ...+             -- The pattern MkT x will allocate an existential type+             -- variable for 'a'.++  | ArrowSkol           -- An arrow form (see TcArrows)++  | IPSkol [HsIPName]   -- Binding site of an implicit parameter++  | RuleSkol RuleName   -- The LHS of a RULE++  | InferSkol [(Name,TcType)]+                        -- We have inferred a type for these (mutually-recursivive)+                        -- polymorphic Ids, and are now checking that their RHS+                        -- constraints are satisfied.++  | BracketSkol         -- Template Haskell bracket++  | UnifyForAllSkol     -- We are unifying two for-all types+       TcType           -- The instantiated type *inside* the forall++  | TyConSkol TyConFlavour Name  -- bound in a type declaration of the given flavour++  | DataConSkol Name    -- bound as an existential in a Haskell98 datacon decl or+                        -- as any variable in a GADT datacon decl++  | ReifySkol           -- Bound during Template Haskell reification++  | QuantCtxtSkol       -- Quantified context, e.g.+                        --   f :: forall c. (forall a. c a => c [a]) => blah++  | UnkSkol             -- Unhelpful info (until I improve it)++instance Outputable SkolemInfo where+  ppr = pprSkolInfo++pprSkolInfo :: SkolemInfo -> SDoc+-- Complete the sentence "is a rigid type variable bound by..."+pprSkolInfo (SigSkol cx ty _) = pprSigSkolInfo cx ty+pprSkolInfo (SigTypeSkol cx)  = pprUserTypeCtxt cx+pprSkolInfo (ForAllSkol doc)  = quotes doc+pprSkolInfo (IPSkol ips)      = text "the implicit-parameter binding" <> plural ips <+> text "for"+                                 <+> pprWithCommas ppr ips+pprSkolInfo (DerivSkol pred)  = text "the deriving clause for" <+> quotes (ppr pred)+pprSkolInfo InstSkol          = text "the instance declaration"+pprSkolInfo (InstSC n)        = text "the instance declaration" <> whenPprDebug (parens (ppr n))+pprSkolInfo FamInstSkol       = text "a family instance declaration"+pprSkolInfo BracketSkol       = text "a Template Haskell bracket"+pprSkolInfo (RuleSkol name)   = text "the RULE" <+> pprRuleName name+pprSkolInfo ArrowSkol         = text "an arrow form"+pprSkolInfo (PatSkol cl mc)   = sep [ pprPatSkolInfo cl+                                    , text "in" <+> pprMatchContext mc ]+pprSkolInfo (InferSkol ids)   = hang (text "the inferred type" <> plural ids <+> text "of")+                                   2 (vcat [ ppr name <+> dcolon <+> ppr ty+                                                   | (name,ty) <- ids ])+pprSkolInfo (UnifyForAllSkol ty) = text "the type" <+> ppr ty+pprSkolInfo (TyConSkol flav name) = text "the" <+> ppr flav <+> text "declaration for" <+> quotes (ppr name)+pprSkolInfo (DataConSkol name)= text "the data constructor" <+> quotes (ppr name)+pprSkolInfo ReifySkol         = text "the type being reified"++pprSkolInfo (QuantCtxtSkol {}) = text "a quantified context"++-- UnkSkol+-- For type variables the others are dealt with by pprSkolTvBinding.+-- For Insts, these cases should not happen+pprSkolInfo UnkSkol = WARN( True, text "pprSkolInfo: UnkSkol" ) text "UnkSkol"++pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc+-- The type is already tidied+pprSigSkolInfo ctxt ty+  = case ctxt of+       FunSigCtxt f _ -> vcat [ text "the type signature for:"+                              , nest 2 (pprPrefixOcc f <+> dcolon <+> ppr ty) ]+       PatSynCtxt {}  -> pprUserTypeCtxt ctxt  -- See Note [Skolem info for pattern synonyms]+       _              -> vcat [ pprUserTypeCtxt ctxt <> colon+                              , nest 2 (ppr ty) ]++pprPatSkolInfo :: ConLike -> SDoc+pprPatSkolInfo (RealDataCon dc)+  = sep [ text "a pattern with constructor:"+        , nest 2 $ ppr dc <+> dcolon+          <+> pprType (dataConUserType dc) <> comma ]+          -- pprType prints forall's regardless of -fprint-explicit-foralls+          -- which is what we want here, since we might be saying+          -- type variable 't' is bound by ...++pprPatSkolInfo (PatSynCon ps)+  = sep [ text "a pattern with pattern synonym:"+        , nest 2 $ ppr ps <+> dcolon+                   <+> pprPatSynType ps <> comma ]++{- Note [Skolem info for pattern synonyms]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For pattern synonym SkolemInfo we have+   SigSkol (PatSynCtxt p) ty _+but the type 'ty' is not very helpful.  The full pattern-synonym type+has the provided and required pieces, which it is inconvenient to+record and display here. So we simply don't display the type at all,+contenting outselves with just the name of the pattern synonym, which+is fine.  We could do more, but it doesn't seem worth it.++Note [SigSkol SkolemInfo]+~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we (deeply) skolemise a type+   f :: forall a. a -> forall b. b -> a+Then we'll instantiate [a :-> a', b :-> b'], and with the instantiated+      a' -> b' -> a.+But when, in an error message, we report that "b is a rigid type+variable bound by the type signature for f", we want to show the foralls+in the right place.  So we proceed as follows:++* In SigSkol we record+    - the original signature forall a. a -> forall b. b -> a+    - the instantiation mapping [a :-> a', b :-> b']++* Then when tidying in TcMType.tidySkolemInfo, we first tidy a' to+  whatever it tidies to, say a''; and then we walk over the type+  replacing the binder a by the tidied version a'', to give+       forall a''. a'' -> forall b''. b'' -> a''+  We need to do this under function arrows, to match what deeplySkolemise+  does.++* Typically a'' will have a nice pretty name like "a", but the point is+  that the foral-bound variables of the signature we report line up with+  the instantiated skolems lying  around in other types.+++************************************************************************+*                                                                      *+            CtOrigin+*                                                                      *+************************************************************************+-}++data CtOrigin+  = GivenOrigin SkolemInfo++  -- All the others are for *wanted* constraints+  | OccurrenceOf Name              -- Occurrence of an overloaded identifier+  | OccurrenceOfRecSel RdrName     -- Occurrence of a record selector+  | AppOrigin                      -- An application of some kind++  | SpecPragOrigin UserTypeCtxt    -- Specialisation pragma for+                                   -- function or instance++  | TypeEqOrigin { uo_actual   :: TcType+                 , uo_expected :: TcType+                 , uo_thing    :: Maybe SDoc+                       -- ^ The thing that has type "actual"+                 , uo_visible  :: Bool+                       -- ^ Is at least one of the three elements above visible?+                       -- (Errors from the polymorphic subsumption check are considered+                       -- visible.) Only used for prioritizing error messages.+                 }++  | KindEqOrigin  -- See Note [Equalities with incompatible kinds] in TcCanonical.+      TcType (Maybe TcType)     -- A kind equality arising from unifying these two types+      CtOrigin                  -- originally arising from this+      (Maybe TypeOrKind)        -- the level of the eq this arises from++  | IPOccOrigin  HsIPName       -- Occurrence of an implicit parameter+  | OverLabelOrigin FastString  -- Occurrence of an overloaded label++  | LiteralOrigin (HsOverLit GhcRn)     -- Occurrence of a literal+  | NegateOrigin                        -- Occurrence of syntactic negation++  | ArithSeqOrigin (ArithSeqInfo GhcRn) -- [x..], [x..y] etc+  | AssocFamPatOrigin   -- When matching the patterns of an associated+                        -- family instance with that of its parent class+  | SectionOrigin+  | TupleOrigin         -- (..,..)+  | ExprSigOrigin       -- e :: ty+  | PatSigOrigin        -- p :: ty+  | PatOrigin           -- Instantiating a polytyped pattern at a constructor+  | ProvCtxtOrigin      -- The "provided" context of a pattern synonym signature+        (PatSynBind GhcRn GhcRn) -- Information about the pattern synonym, in+                                 -- particular the name and the right-hand side+  | RecordUpdOrigin+  | ViewPatOrigin++  | ScOrigin TypeSize   -- Typechecking superclasses of an instance declaration+                        -- If the instance head is C ty1 .. tyn+                        --    then TypeSize = sizeTypes [ty1, .., tyn]+                        -- See Note [Solving superclass constraints] in TcInstDcls++  | DerivClauseOrigin   -- Typechecking a deriving clause (as opposed to+                        -- standalone deriving).+  | DerivOriginDC DataCon Int Bool+      -- Checking constraints arising from this data con and field index. The+      -- Bool argument in DerivOriginDC and DerivOriginCoerce is True if+      -- standalong deriving (with a wildcard constraint) is being used. This+      -- is used to inform error messages on how to recommended fixes (e.g., if+      -- the argument is True, then don't recommend "use standalone deriving",+      -- but rather "fill in the wildcard constraint yourself").+      -- See Note [Inferring the instance context] in TcDerivInfer+  | DerivOriginCoerce Id Type Type Bool+                        -- DerivOriginCoerce id ty1 ty2: Trying to coerce class method `id` from+                        -- `ty1` to `ty2`.+  | StandAloneDerivOrigin -- Typechecking stand-alone deriving. Useful for+                          -- constraints coming from a wildcard constraint,+                          -- e.g., deriving instance _ => Eq (Foo a)+                          -- See Note [Inferring the instance context]+                          -- in TcDerivInfer+  | DefaultOrigin       -- Typechecking a default decl+  | DoOrigin            -- Arising from a do expression+  | DoPatOrigin (LPat GhcRn) -- Arising from a failable pattern in+                             -- a do expression+  | MCompOrigin         -- Arising from a monad comprehension+  | MCompPatOrigin (LPat GhcRn) -- Arising from a failable pattern in a+                                -- monad comprehension+  | IfOrigin            -- Arising from an if statement+  | ProcOrigin          -- Arising from a proc expression+  | AnnOrigin           -- An annotation++  | FunDepOrigin1       -- A functional dependency from combining+        PredType CtOrigin RealSrcSpan      -- This constraint arising from ...+        PredType CtOrigin RealSrcSpan      -- and this constraint arising from ...++  | FunDepOrigin2       -- A functional dependency from combining+        PredType CtOrigin   -- This constraint arising from ...+        PredType SrcSpan    -- and this top-level instance+        -- We only need a CtOrigin on the first, because the location+        -- is pinned on the entire error message++  | HoleOrigin+  | UnboundOccurrenceOf OccName+  | ListOrigin          -- An overloaded list+  | StaticOrigin        -- A static form+  | FailablePattern (LPat GhcTcId) -- A failable pattern in do-notation for the+                                   -- MonadFail Proposal (MFP). Obsolete when+                                   -- actual desugaring to MonadFail.fail is+                                   -- live.+  | Shouldn'tHappenOrigin String+                            -- the user should never see this one,+                            -- unless ImpredicativeTypes is on, where all+                            -- bets are off+  | InstProvidedOrigin Module ClsInst+        -- Skolem variable arose when we were testing if an instance+        -- is solvable or not.+-- An origin is visible if the place where the constraint arises is manifest+-- in user code. Currently, all origins are visible except for invisible+-- TypeEqOrigins. This is used when choosing which error of+-- several to report+isVisibleOrigin :: CtOrigin -> Bool+isVisibleOrigin (TypeEqOrigin { uo_visible = vis }) = vis+isVisibleOrigin (KindEqOrigin _ _ sub_orig _)       = isVisibleOrigin sub_orig+isVisibleOrigin _                                   = True++-- Converts a visible origin to an invisible one, if possible. Currently,+-- this works only for TypeEqOrigin+toInvisibleOrigin :: CtOrigin -> CtOrigin+toInvisibleOrigin orig@(TypeEqOrigin {}) = orig { uo_visible = False }+toInvisibleOrigin orig                   = orig++isGivenOrigin :: CtOrigin -> Bool+isGivenOrigin (GivenOrigin {})              = True+isGivenOrigin (FunDepOrigin1 _ o1 _ _ o2 _) = isGivenOrigin o1 && isGivenOrigin o2+isGivenOrigin (FunDepOrigin2 _ o1 _ _)      = isGivenOrigin o1+isGivenOrigin _                             = False++instance Outputable CtOrigin where+  ppr = pprCtOrigin++ctoHerald :: SDoc+ctoHerald = text "arising from"++-- | Extract a suitable CtOrigin from a HsExpr+lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin+lexprCtOrigin (L _ e) = exprCtOrigin e++exprCtOrigin :: HsExpr GhcRn -> CtOrigin+exprCtOrigin (HsVar _ (L _ name)) = OccurrenceOf name+exprCtOrigin (HsUnboundVar _ uv)  = UnboundOccurrenceOf (unboundVarOcc uv)+exprCtOrigin (HsConLikeOut {})    = panic "exprCtOrigin HsConLikeOut"+exprCtOrigin (HsRecFld _ f)    = OccurrenceOfRecSel (rdrNameAmbiguousFieldOcc f)+exprCtOrigin (HsOverLabel _ _ l)  = OverLabelOrigin l+exprCtOrigin (HsIPVar _ ip)       = IPOccOrigin ip+exprCtOrigin (HsOverLit _ lit)    = LiteralOrigin lit+exprCtOrigin (HsLit {})           = Shouldn'tHappenOrigin "concrete literal"+exprCtOrigin (HsLam _ matches)    = matchesCtOrigin matches+exprCtOrigin (HsLamCase _ ms)     = matchesCtOrigin ms+exprCtOrigin (HsApp _ e1 _)       = lexprCtOrigin e1+exprCtOrigin (HsAppType _ e1 _)   = lexprCtOrigin e1+exprCtOrigin (OpApp _ _ op _)     = lexprCtOrigin op+exprCtOrigin (NegApp _ e _)       = lexprCtOrigin e+exprCtOrigin (HsPar _ e)          = lexprCtOrigin e+exprCtOrigin (SectionL _ _ _)     = SectionOrigin+exprCtOrigin (SectionR _ _ _)     = SectionOrigin+exprCtOrigin (ExplicitTuple {})   = Shouldn'tHappenOrigin "explicit tuple"+exprCtOrigin ExplicitSum{}        = Shouldn'tHappenOrigin "explicit sum"+exprCtOrigin (HsCase _ _ matches) = matchesCtOrigin matches+exprCtOrigin (HsIf _ (Just syn) _ _ _) = exprCtOrigin (syn_expr syn)+exprCtOrigin (HsIf {})           = Shouldn'tHappenOrigin "if expression"+exprCtOrigin (HsMultiIf _ rhs)   = lGRHSCtOrigin rhs+exprCtOrigin (HsLet _ _ e)       = lexprCtOrigin e+exprCtOrigin (HsDo {})           = DoOrigin+exprCtOrigin (ExplicitList {})   = Shouldn'tHappenOrigin "list"+exprCtOrigin (RecordCon {})      = Shouldn'tHappenOrigin "record construction"+exprCtOrigin (RecordUpd {})      = Shouldn'tHappenOrigin "record update"+exprCtOrigin (ExprWithTySig {})  = ExprSigOrigin+exprCtOrigin (ArithSeq {})       = Shouldn'tHappenOrigin "arithmetic sequence"+exprCtOrigin (HsSCC _ _ _ e)     = lexprCtOrigin e+exprCtOrigin (HsCoreAnn _ _ _ e) = lexprCtOrigin e+exprCtOrigin (HsBracket {})      = Shouldn'tHappenOrigin "TH bracket"+exprCtOrigin (HsRnBracketOut {})= Shouldn'tHappenOrigin "HsRnBracketOut"+exprCtOrigin (HsTcBracketOut {})= panic "exprCtOrigin HsTcBracketOut"+exprCtOrigin (HsSpliceE {})      = Shouldn'tHappenOrigin "TH splice"+exprCtOrigin (HsProc {})         = Shouldn'tHappenOrigin "proc"+exprCtOrigin (HsStatic {})       = Shouldn'tHappenOrigin "static expression"+exprCtOrigin (HsTick _ _ e)           = lexprCtOrigin e+exprCtOrigin (HsBinTick _ _ _ e)      = lexprCtOrigin e+exprCtOrigin (HsTickPragma _ _ _ _ e) = lexprCtOrigin e+exprCtOrigin (HsWrap {})        = panic "exprCtOrigin HsWrap"+exprCtOrigin (XExpr nec)        = noExtCon nec++-- | Extract a suitable CtOrigin from a MatchGroup+matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin+matchesCtOrigin (MG { mg_alts = alts })+  | L _ [L _ match] <- alts+  , Match { m_grhss = grhss } <- match+  = grhssCtOrigin grhss++  | otherwise+  = Shouldn'tHappenOrigin "multi-way match"+matchesCtOrigin (XMatchGroup nec) = noExtCon nec++-- | Extract a suitable CtOrigin from guarded RHSs+grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin+grhssCtOrigin (GRHSs { grhssGRHSs = lgrhss }) = lGRHSCtOrigin lgrhss+grhssCtOrigin (XGRHSs nec) = noExtCon nec++-- | Extract a suitable CtOrigin from a list of guarded RHSs+lGRHSCtOrigin :: [LGRHS GhcRn (LHsExpr GhcRn)] -> CtOrigin+lGRHSCtOrigin [L _ (GRHS _ _ (L _ e))] = exprCtOrigin e+lGRHSCtOrigin [L _ (XGRHS nec)] = noExtCon nec+lGRHSCtOrigin _ = Shouldn'tHappenOrigin "multi-way GRHS"++pprCtOrigin :: CtOrigin -> SDoc+-- "arising from ..."+-- Not an instance of Outputable because of the "arising from" prefix+pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk++pprCtOrigin (SpecPragOrigin ctxt)+  = case ctxt of+       FunSigCtxt n _ -> text "for" <+> quotes (ppr n)+       SpecInstCtxt   -> text "a SPECIALISE INSTANCE pragma"+       _              -> text "a SPECIALISE pragma"  -- Never happens I think++pprCtOrigin (FunDepOrigin1 pred1 orig1 loc1 pred2 orig2 loc2)+  = hang (ctoHerald <+> text "a functional dependency between constraints:")+       2 (vcat [ hang (quotes (ppr pred1)) 2 (pprCtOrigin orig1 <+> text "at" <+> ppr loc1)+               , hang (quotes (ppr pred2)) 2 (pprCtOrigin orig2 <+> text "at" <+> ppr loc2) ])++pprCtOrigin (FunDepOrigin2 pred1 orig1 pred2 loc2)+  = hang (ctoHerald <+> text "a functional dependency between:")+       2 (vcat [ hang (text "constraint" <+> quotes (ppr pred1))+                    2 (pprCtOrigin orig1 )+               , hang (text "instance" <+> quotes (ppr pred2))+                    2 (text "at" <+> ppr loc2) ])++pprCtOrigin (KindEqOrigin t1 (Just t2) _ _)+  = hang (ctoHerald <+> text "a kind equality arising from")+       2 (sep [ppr t1, char '~', ppr t2])++pprCtOrigin AssocFamPatOrigin+  = text "when matching a family LHS with its class instance head"++pprCtOrigin (KindEqOrigin t1 Nothing _ _)+  = hang (ctoHerald <+> text "a kind equality when matching")+       2 (ppr t1)++pprCtOrigin (UnboundOccurrenceOf name)+  = ctoHerald <+> text "an undeclared identifier" <+> quotes (ppr name)++pprCtOrigin (DerivOriginDC dc n _)+  = hang (ctoHerald <+> text "the" <+> speakNth n+          <+> text "field of" <+> quotes (ppr dc))+       2 (parens (text "type" <+> quotes (ppr ty)))+  where+    ty = dataConOrigArgTys dc !! (n-1)++pprCtOrigin (DerivOriginCoerce meth ty1 ty2 _)+  = hang (ctoHerald <+> text "the coercion of the method" <+> quotes (ppr meth))+       2 (sep [ text "from type" <+> quotes (ppr ty1)+              , nest 2 $ text "to type" <+> quotes (ppr ty2) ])++pprCtOrigin (DoPatOrigin pat)+    = ctoHerald <+> text "a do statement"+      $$+      text "with the failable pattern" <+> quotes (ppr pat)++pprCtOrigin (MCompPatOrigin pat)+    = ctoHerald <+> hsep [ text "the failable pattern"+           , quotes (ppr pat)+           , text "in a statement in a monad comprehension" ]+pprCtOrigin (FailablePattern pat)+    = ctoHerald <+> text "the failable pattern" <+> quotes (ppr pat)+      $$+      text "(this will become an error in a future GHC release)"++pprCtOrigin (Shouldn'tHappenOrigin note)+  = sdocWithDynFlags $ \dflags ->+    if xopt LangExt.ImpredicativeTypes dflags+    then text "a situation created by impredicative types"+    else+    vcat [ text "<< This should not appear in error messages. If you see this"+         , text "in an error message, please report a bug mentioning" <+> quotes (text note) <+> text "at"+         , text "https://gitlab.haskell.org/ghc/ghc/wikis/report-a-bug >>" ]++pprCtOrigin (ProvCtxtOrigin PSB{ psb_id = (L _ name) })+  = hang (ctoHerald <+> text "the \"provided\" constraints claimed by")+       2 (text "the signature of" <+> quotes (ppr name))++pprCtOrigin (InstProvidedOrigin mod cls_inst)+  = vcat [ text "arising when attempting to show that"+         , ppr cls_inst+         , text "is provided by" <+> quotes (ppr mod)]++pprCtOrigin simple_origin+  = ctoHerald <+> pprCtO simple_origin++-- | Short one-liners+pprCtO :: CtOrigin -> SDoc+pprCtO (OccurrenceOf name)   = hsep [text "a use of", quotes (ppr name)]+pprCtO (OccurrenceOfRecSel name) = hsep [text "a use of", quotes (ppr name)]+pprCtO AppOrigin             = text "an application"+pprCtO (IPOccOrigin name)    = hsep [text "a use of implicit parameter", quotes (ppr name)]+pprCtO (OverLabelOrigin l)   = hsep [text "the overloaded label"+                                    ,quotes (char '#' <> ppr l)]+pprCtO RecordUpdOrigin       = text "a record update"+pprCtO ExprSigOrigin         = text "an expression type signature"+pprCtO PatSigOrigin          = text "a pattern type signature"+pprCtO PatOrigin             = text "a pattern"+pprCtO ViewPatOrigin         = text "a view pattern"+pprCtO IfOrigin              = text "an if expression"+pprCtO (LiteralOrigin lit)   = hsep [text "the literal", quotes (ppr lit)]+pprCtO (ArithSeqOrigin seq)  = hsep [text "the arithmetic sequence", quotes (ppr seq)]+pprCtO SectionOrigin         = text "an operator section"+pprCtO AssocFamPatOrigin     = text "the LHS of a famly instance"+pprCtO TupleOrigin           = text "a tuple"+pprCtO NegateOrigin          = text "a use of syntactic negation"+pprCtO (ScOrigin n)          = text "the superclasses of an instance declaration"+                               <> whenPprDebug (parens (ppr n))+pprCtO DerivClauseOrigin     = text "the 'deriving' clause of a data type declaration"+pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"+pprCtO DefaultOrigin         = text "a 'default' declaration"+pprCtO DoOrigin              = text "a do statement"+pprCtO MCompOrigin           = text "a statement in a monad comprehension"+pprCtO ProcOrigin            = text "a proc expression"+pprCtO (TypeEqOrigin t1 t2 _ _)= text "a type equality" <+> sep [ppr t1, char '~', ppr t2]+pprCtO AnnOrigin             = text "an annotation"+pprCtO HoleOrigin            = text "a use of" <+> quotes (text "_")+pprCtO ListOrigin            = text "an overloaded list"+pprCtO StaticOrigin          = text "a static form"+pprCtO _                     = panic "pprCtOrigin"
typecheck/TcPat.hs view
@@ -21,7 +21,7 @@  import {-# SOURCE #-}   TcExpr( tcSyntaxOp, tcSyntaxOpGen, tcInferSigma ) -import HsSyn+import GHC.Hs import TcHsSyn import TcSigs( TcPragEnv, lookupPragEnv, addInlinePrags ) import TcRnMonad@@ -33,12 +33,13 @@ import TcEnv import TcMType import TcValidity( arityErr )-import Type ( pprTyVars )+import TyCoPpr ( pprTyVars ) import TcType import TcUnify import TcHsType import TysWiredIn import TcEvidence+import TcOrigin import TyCon import DataCon import PatSyn@@ -446,6 +447,8 @@ tc_pat penv (TuplePat _ pats boxity) pat_ty thing_inside   = do  { let arity = length pats               tc = tupleTyCon boxity arity+              -- NB: tupleTyCon does not flatten 1-tuples+              -- See Note [Don't flatten tuples from HsSyn] in MkCore         ; (coi, arg_tys) <- matchExpectedPatTy (matchExpectedTyConApp tc)                                                penv pat_ty                      -- Unboxed tuples have RuntimeRep vars, which we discard:@@ -466,7 +469,7 @@                                  -- pat_ty /= pat_ty iff coi /= IdCo               possibly_mangled_result                 | gopt Opt_IrrefutableTuples dflags &&-                  isBoxed boxity      = LazyPat noExt (noLoc unmangled_result)+                  isBoxed boxity      = LazyPat noExtField (noLoc unmangled_result)                 | otherwise           = unmangled_result          ; pat_ty <- readExpType pat_ty@@ -743,7 +746,7 @@         ; checkExistentials ex_tvs all_arg_tys penv          ; tenv <- instTyVarsWith PatOrigin univ_tvs ctxt_res_tys-                  -- NB: Do not use zipTvSubst!  See Trac #14154+                  -- NB: Do not use zipTvSubst!  See #14154                   -- We want to create a well-kinded substitution, so                   -- that the instantiated type is well-kinded @@ -784,7 +787,7 @@         { let theta'     = substTheta tenv (eqSpecPreds eq_spec ++ theta)                            -- order is *important* as we generate the list of                            -- dictionary binders from theta'-              no_equalities = not (any isNomEqPred theta')+              no_equalities = null eq_spec && not (any isEqPred theta)               skol_info = PatSkol (RealDataCon data_con) mc               mc = case pe_ctxt penv of                      LamPat mc -> mc@@ -795,7 +798,7 @@         ; checkTc (no_equalities || gadts_on || families_on)                   (text "A pattern match on a GADT requires the" <+>                    text "GADTs or TypeFamilies language extension")-                  -- Trac #2905 decided that a *pattern-match* of a GADT+                  -- #2905 decided that a *pattern-match* of a GADT                   -- should require the GADT language flag.                   -- Re TypeFamilies see also #7156 @@ -1006,7 +1009,7 @@                  -- No matching field; chances are this field label comes from some                 -- other record type (or maybe none).  If this happens, just fail,-                -- otherwise we get crashes later (Trac #8570), and similar:+                -- otherwise we get crashes later (#8570), and similar:                 --      f (R { foo = (a,b) }) = a+b                 -- If foo isn't one of R's fields, we don't want to crash when                 -- typechecking the "a+b".
typecheck/TcPatSyn.hs view
@@ -16,7 +16,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import TcPat import Type( tidyTyCoVarBinders, tidyTypes, tidyType ) import TcRnMonad@@ -40,10 +40,11 @@ import BasicTypes import TcSimplify import TcUnify-import Type( PredTree(..), EqRel(..), classifyPredType )+import Predicate import TysWiredIn import TcType import TcEvidence+import TcOrigin import BuildTyCl import VarSet import MkId@@ -102,7 +103,7 @@          matcher_id = mkLocalId matcher_name $                       mkSpecForAllTys [alphaTyVar] alphaTy -recoverPSB (XPatSynBind {}) = panic "recoverPSB"+recoverPSB (XPatSynBind nec) = noExtCon nec  {- Note [Pattern synonym error recovery] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -110,14 +111,14 @@ the rest of tc_patsyn_finish, because we may get knock-on errors, or even a crash.  E.g. from    pattern What = True :: Maybe-we get a kind error; and we must stop right away (Trac #15289).+we get a kind error; and we must stop right away (#15289).  We stop if there are /any/ unsolved constraints, not just insoluble ones; because pattern synonyms are top-level things, we will never solve them later if we can't solve them now.  And if we were to carry on, tc_patsyn_finish does zonkTcTypeToType, which defaults any unsolved unificatdion variables to Any, which confuses the error-reporting no end (Trac #15685).+reporting no end (#15685).  So we use simplifyTop to completely solve the constraint, report any errors, throw an exception.@@ -151,7 +152,7 @@              named_taus = (name, pat_ty) : map mk_named_tau args              mk_named_tau arg                = (getName arg, mkSpecForAllTys ex_tvs (varType arg))-               -- The mkSpecForAllTys is important (Trac #14552), albeit+               -- The mkSpecForAllTys is important (#14552), albeit                -- slightly artifical (there is no variable with this funny type).                -- We do not want to quantify over variable (alpha::k)                -- that mention the existentially-bound type variables@@ -187,7 +188,7 @@                             , mkTyVarTys ex_tvs, prov_theta, prov_evs)                           (map nlHsVar args, map idType args)                           pat_ty rec_fields } }-tcInferPatSynDecl (XPatSynBind _) = panic "tcInferPatSynDecl"+tcInferPatSynDecl (XPatSynBind nec) = noExtCon nec  mkProvEvidence :: EvId -> Maybe (PredType, EvTerm) -- See Note [Equality evidence in pattern synonyms]@@ -246,7 +247,7 @@ pattern (AST a), nor is it existentially bound.  It's really only fixed by the type of the continuation. -Trac #14552 showed that this can go wrong if the kind of 's' mentions+#14552 showed that this can go wrong if the kind of 's' mentions existentially bound variables.  We obviously can't make a type like   $mP :: forall (s::k->*) a. Prj s => AST a -> (forall k. s a -> r)                                    -> r -> r@@ -270,7 +271,7 @@ (NB: technically the (k1~k2) existential dictionary is not necessary, but it's there at the moment.) -Now consider (Trac #14394):+Now consider (#14394):    pattern Foo = HRefl in a non-poly-kinded module.  We don't want to get     pattern Foo :: () => (* ~ *, b ~ a) => a :~~: b@@ -300,7 +301,7 @@   $bP :: forall a b. (a ~# Maybe b, Eq b) => [b] -> X a  and that is bad because (a ~# Maybe b) is not a predicate type-(see Note [Types for coercions, predicates, and evidence] in Type)+(see Note [Types for coercions, predicates, and evidence] in TyCoRep and is not implicitly instantiated.  So in mkProvEvidence we lift (a ~# b) to (a ~ b).  Tiresome, and@@ -310,7 +311,7 @@  Note [Coercions that escape] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Trac #14507 showed an example where the inferred type of the matcher+#14507 showed an example where the inferred type of the matcher for the pattern synonym was somethign like    $mSO :: forall (r :: TYPE rep) kk (a :: k).            TypeRep k a@@ -384,9 +385,6 @@            ASSERT2( equalLength arg_names arg_tys, ppr name $$ ppr arg_names $$ ppr arg_tys )            pushLevelAndCaptureConstraints            $            tcExtendTyVarEnv univ_tvs                 $-           tcExtendKindEnvList [(getName (binderVar ex_tv), APromotionErr PatSynExPE)-                               | ex_tv <- extra_ex] $-               -- See Note [Pattern synonym existentials do not scope]            tcPat PatSyn lpat (mkCheckExpType pat_ty) $            do { let in_scope    = mkInScopeSet (mkVarSet univ_tvs)                     empty_subst = mkEmptyTCvSubst in_scope@@ -400,7 +398,7 @@                   -- satisfy the substitution invariant. There's no need to                   -- add 'ex_tvs' as they are already in the domain of the                   -- substitution.-                  -- See also Note [The substitution invariant] in TyCoRep.+                  -- See also Note [The substitution invariant] in TyCoSubst.               ; prov_dicts <- mapM (emitWanted (ProvCtxtOrigin psb)) prov_theta'               ; args'      <- zipWithM (tc_arg subst) arg_names arg_tys               ; return (ex_tvs', prov_dicts, args') }@@ -408,11 +406,11 @@        ; let skol_info = SigSkol (PatSynCtxt name) pat_ty []                          -- The type here is a bit bogus, but we do not print                          -- the type for PatSynCtxt, so it doesn't matter-                         -- See TcRnTypes Note [Skolem info for pattern synonyms]+                         -- See Note [Skolem info for pattern synonyms] in Origin        ; (implics, ev_binds) <- buildImplicationFor tclvl skol_info univ_tvs req_dicts wanted         -- Solve the constraints now, because we are about to make a PatSyn,-       -- which should not contain unification variables and the like (Trac #10997)+       -- which should not contain unification variables and the like (#10997)        ; simplifyTopImplic implics         -- ToDo: in the bidirectional case, check that the ex_tvs' are all distinct@@ -437,7 +435,7 @@                 -- Why do we need tcSubType here?                 -- See Note [Pattern synonyms and higher rank types]            ; return (mkLHsWrap wrap $ nlHsVar arg_id) }-tcCheckPatSynDecl (XPatSynBind _) _ = panic "tcCheckPatSynDecl"+tcCheckPatSynDecl (XPatSynBind nec) _ = noExtCon nec  {- [Pattern synonyms and higher rank types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -449,55 +447,7 @@  This should work.  But in the matcher we must match against MkT, and then instantiate its argument 'x', to get a function of type (Int -> Int).-Equality is not enough!  Trac #13752 was an example.--Note [Pattern synonym existentials do not scope]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (Trac #14498):-  pattern SS :: forall (t :: k). () =>-                => forall (a :: kk -> k) (n :: kk).-                => TypeRep n -> TypeRep t-  pattern SS n <- (App (Typeable :: TypeRep (a::kk -> k)) n)--Here 'k' is implicitly bound in the signature, but (with--XScopedTypeVariables) it does still scope over the pattern-synonym-definition.  But what about 'kk', which is oexistential?  It too is-implicitly bound in the signature; should it too scope?  And if so,-what type variable is it bound to?--The trouble is that the type variable to which it is bound is itself-only brought into scope in part the pattern, so it makes no sense for-'kk' to scope over the whole pattern.  See the discussion on-Trac #14498, esp comment:16ff. Here is a simpler example:-  data T where { MkT :: x -> (x->Int) -> T }-  pattern P :: () => forall x. x -> (x->Int) -> T-  pattern P a b = (MkT a b, True)--Here it would make no sense to mention 'x' in the True pattern,-like this:-  pattern P a b = (MkT a b, True :: x)--The 'x' only makes sense "under" the MkT pattern. Conclusion: the-existential type variables of a pattern-synonym signature should not-scope.--But it's not that easy to implement, because we don't know-exactly what the existentials /are/ until we get to type checking.-(See Note [The pattern-synonym signature splitting rule], and-the partition of implicit_tvs in tcCheckPatSynDecl.)--So we do this:--- The reaner brings all the implicitly-bound kind variables into-  scope, without trying to distinguish universal from existential--- tcCheckPatSynDecl uses tcExtendKindEnvList to bind the-  implicitly-bound existentials to-      APromotionErr PatSynExPE-  It's not really a promotion error, but it's a way to bind the Name-  (which the renamer has not complained about) to something that, when-  looked up, will cause a complaint (in this case-  TcHsType.promotionErr)+Equality is not enough!  #13752 was an example.   Note [The pattern-synonym signature splitting rule]@@ -506,7 +456,7 @@      the kind-generalised variables, and      the implicitly-bound variables into universal and existential.  The rule is this-(see discussion on Trac #11224):+(see discussion on #11224):       The universal tyvars are the ones mentioned in           - univ_tvs: the user-specified (forall'd) universals@@ -527,7 +477,7 @@  This is an odd example because Q has only one syntactic argument, and so presumably is defined by a view pattern matching a function.  But-it can happen (Trac #11977, #12108).+it can happen (#11977, #12108).  We don't know Q's arity from the pattern signature, so we have to wait until we see the pattern declaration itself before deciding res_ty is,@@ -600,7 +550,7 @@   TauTvs) in tcCheckPatSynDecl.  But (a) strengthening the check here   is redundant since tcPatSynBuilderBind does the job, (b) it was   still incomplete (TyVarTvs can unify with each other), and (c) it-  didn't even work (Trac #13441 was accepted with+  didn't even work (#13441 was accepted with   ExplicitBidirectional, but rejected if expressed in   ImplicitBidirectional form.  Conclusion: trying to be too clever is   a bad idea.@@ -750,16 +700,16 @@                | is_unlifted = ([nlHsVar voidPrimId], [voidPrimTy])                | otherwise   = (args,                 arg_tys)              cont_ty = mkInfSigmaTy ex_tvs prov_theta $-                       mkFunTys cont_arg_tys res_ty+                       mkVisFunTys cont_arg_tys res_ty -             fail_ty  = mkFunTy voidPrimTy res_ty+             fail_ty  = mkVisFunTy voidPrimTy res_ty         ; matcher_name <- newImplicitBinder name mkMatcherOcc        ; scrutinee    <- newSysLocalId (fsLit "scrut") pat_ty        ; cont         <- newSysLocalId (fsLit "cont")  cont_ty        ; fail         <- newSysLocalId (fsLit "fail")  fail_ty -       ; let matcher_tau   = mkFunTys [pat_ty, cont_ty, fail_ty] res_ty+       ; let matcher_tau   = mkVisFunTys [pat_ty, cont_ty, fail_ty] res_ty              matcher_sigma = mkInfSigmaTy (rr_tv:res_tv:univ_tvs) req_theta matcher_tau              matcher_id    = mkExportedVanillaId matcher_name matcher_sigma                              -- See Note [Exported LocalIds] in Id@@ -777,13 +727,13 @@                            mkHsCaseAlt lwpat fail']              body = mkLHsWrap (mkWpLet req_ev_binds) $                     cL (getLoc lpat) $-                    HsCase noExt (nlHsVar scrutinee) $+                    HsCase noExtField (nlHsVar scrutinee) $                     MG{ mg_alts = cL (getLoc lpat) cases                       , mg_ext = MatchGroupTc [pat_ty] res_ty                       , mg_origin = Generated                       }              body' = noLoc $-                     HsLam noExt $+                     HsLam noExtField $                      MG{ mg_alts = noLoc [mkSimpleMatch LambdaExpr                                                         args body]                        , mg_ext = MatchGroupTc [pat_ty, cont_ty, fail_ty] res_ty@@ -792,7 +742,7 @@              match = mkMatch (mkPrefixFunRhs (cL loc name)) []                              (mkHsLams (rr_tv:res_tv:univ_tvs)                                        req_dicts body')-                             (noLoc (EmptyLocalBinds noExt))+                             (noLoc (EmptyLocalBinds noExtField))              mg :: MatchGroup GhcTc (LHsExpr GhcTc)              mg = MG{ mg_alts = cL (getLoc match) [match]                     , mg_ext = MatchGroupTc [] res_ty@@ -848,8 +798,8 @@              builder_sigma  = add_void need_dummy_arg $                               mkForAllTys univ_bndrs $                               mkForAllTys ex_bndrs $-                              mkFunTys theta $-                              mkFunTys arg_tys $+                              mkPhiTy theta $+                              mkVisFunTys arg_tys $                               pat_ty              builder_id     = mkExportedVanillaId builder_name builder_sigma               -- See Note [Exported LocalIds] in Id@@ -914,11 +864,11 @@     mk_mg :: LHsExpr GhcRn -> MatchGroup GhcRn (LHsExpr GhcRn)     mk_mg body = mkMatchGroup Generated [builder_match]           where-            builder_args  = [cL loc (VarPat noExt (cL loc n))+            builder_args  = [cL loc (VarPat noExtField (cL loc n))                             | (dL->L loc n) <- args]             builder_match = mkMatch (mkPrefixFunRhs (cL loc name))                                     builder_args body-                                    (noLoc (EmptyLocalBinds noExt))+                                    (noLoc (EmptyLocalBinds noExtField))      args = case details of               PrefixCon args     -> args@@ -933,13 +883,13 @@       = mg { mg_alts = cL l [cL loc (match { m_pats = nlWildPatName : pats })] }     add_dummy_arg other_mg = pprPanic "add_dummy_arg" $                              pprMatches other_mg-tcPatSynBuilderBind (XPatSynBind _) = panic "tcPatSynBuilderBind"+tcPatSynBuilderBind (XPatSynBind nec) = noExtCon nec  tcPatSynBuilderOcc :: PatSyn -> TcM (HsExpr GhcTcId, TcSigmaType) -- monadic only for failure tcPatSynBuilderOcc ps   | Just (builder_id, add_void_arg) <- builder-  , let builder_expr = HsConLikeOut noExt (PatSynCon ps)+  , let builder_expr = HsConLikeOut noExtField (PatSynCon ps)         builder_ty   = idType builder_id   = return $     if add_void_arg@@ -956,7 +906,7 @@  add_void :: Bool -> Type -> Type add_void need_dummy_arg ty-  | need_dummy_arg = mkFunTy voidPrimTy ty+  | need_dummy_arg = mkVisFunTy voidPrimTy ty   | otherwise      = ty  tcPatToExpr :: Name -> [Located Name] -> LPat GhcRn@@ -978,14 +928,14 @@                     -> Either MsgDoc (HsExpr GhcRn)     mkPrefixConExpr lcon@(dL->L loc _) pats       = do { exprs <- mapM go pats-           ; return (foldl' (\x y -> HsApp noExt (cL loc x) y)-                            (HsVar noExt lcon) exprs) }+           ; return (foldl' (\x y -> HsApp noExtField (cL loc x) y)+                            (HsVar noExtField lcon) exprs) }      mkRecordConExpr :: Located Name -> HsRecFields GhcRn (LPat GhcRn)                     -> Either MsgDoc (HsExpr GhcRn)     mkRecordConExpr con fields       = do { exprFields <- mapM go fields-           ; return (RecordCon noExt con exprFields) }+           ; return (RecordCon noExtField con exprFields) }      go :: LPat GhcRn -> Either MsgDoc (LHsExpr GhcRn)     go (dL->L loc p) = cL loc <$> go1 p@@ -1002,27 +952,27 @@      go1 (VarPat _ (dL->L l var))         | var `elemNameSet` lhsVars-        = return $ HsVar noExt (cL l var)+        = return $ HsVar noExtField (cL l var)         | otherwise         = Left (quotes (ppr var) <+> text "is not bound by the LHS of the pattern synonym")-    go1 (ParPat _ pat)          = fmap (HsPar noExt) $ go pat+    go1 (ParPat _ pat)          = fmap (HsPar noExtField) $ go pat     go1 p@(ListPat reb pats)       | Nothing <- reb = do { exprs <- mapM go pats-                            ; return $ ExplicitList noExt Nothing exprs }+                            ; return $ ExplicitList noExtField Nothing exprs }       | otherwise                   = notInvertibleListPat p     go1 (TuplePat _ pats box)       = do { exprs <- mapM go pats-                                         ; return $ ExplicitTuple noExt-                                           (map (noLoc . (Present noExt)) exprs)+                                         ; return $ ExplicitTuple noExtField+                                           (map (noLoc . (Present noExtField)) exprs)                                                                            box }     go1 (SumPat _ pat alt arity)    = do { expr <- go1 (unLoc pat)-                                         ; return $ ExplicitSum noExt alt arity+                                         ; return $ ExplicitSum noExtField alt arity                                                                    (noLoc expr)                                          }-    go1 (LitPat _ lit)              = return $ HsLit noExt lit+    go1 (LitPat _ lit)              = return $ HsLit noExtField lit     go1 (NPat _ (dL->L _ n) mb_neg _)         | Just neg <- mb_neg        = return $ unLoc $ nlHsSyntaxApps neg-                                                     [noLoc (HsOverLit noExt n)]-        | otherwise                 = return $ HsOverLit noExt n+                                                     [noLoc (HsOverLit noExtField n)]+        | otherwise                 = return $ HsOverLit noExtField n     go1 (ConPatOut{})               = panic "ConPatOut in output of renamer"     go1 (CoPat{})                   = panic "CoPat in output of renamer"     go1 (SplicePat _ (HsSpliced _ _ (HsSplicedPat pat)))@@ -1058,12 +1008,12 @@      -- We should really be able to invert list patterns, even when     -- rebindable syntax is on, but doing so involves a bit of-    -- refactoring; see Trac #14380.  Until then we reject with a+    -- refactoring; see #14380.  Until then we reject with a     -- helpful error message.     notInvertibleListPat p       = Left (vcat [ not_invertible_msg p                    , text "Reason: rebindable syntax is on."-                   , text "This is fixable: add use-case to Trac #14380" ])+                   , text "This is fixable: add use-case to #14380" ])  {- Note [Builder for a bidirectional pattern synonym] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1132,7 +1082,7 @@   $buildL x = Left x :: Either [a] [b] because that wil either mean (forall a b. Either [a] [b]), or we'll get a complaint that 'a' and 'b' are out of scope. (Actually the-latter; Trac #9867.)  No, the job of the signature is done, so when+latter; #9867.)  No, the job of the signature is done, so when converting the pattern to an expression (for the builder RHS) we simply discard the signature. 
typecheck/TcPatSyn.hs-boot view
@@ -1,10 +1,10 @@ module TcPatSyn where -import HsSyn     ( PatSynBind, LHsBinds )+import GHC.Hs    ( PatSynBind, LHsBinds ) import TcRnTypes ( TcM, TcSigInfo ) import TcRnMonad ( TcGblEnv) import Outputable ( Outputable )-import HsExtension ( GhcRn, GhcTc )+import GHC.Hs.Extension ( GhcRn, GhcTc ) import Data.Maybe  ( Maybe )  tcPatSynDecl :: PatSynBind GhcRn GhcRn
typecheck/TcPluginM.hs view
@@ -3,7 +3,6 @@ -- access select functions of the 'TcM', principally those to do with -- reading parts of the state. module TcPluginM (-#if defined(GHCI)         -- * Basic TcPluginM functionality         TcPluginM,         tcPluginIO,@@ -49,10 +48,8 @@         newEvVar,         setEvBind,         getEvBindsTcPluginM-#endif     ) where -#if defined(GHCI) import GhcPrelude  import qualified TcRnMonad as TcM@@ -64,14 +61,14 @@ import qualified Finder  import FamInstEnv ( FamInstEnv )-import TcRnMonad  ( TcGblEnv, TcLclEnv, Ct, CtLoc, TcPluginM+import TcRnMonad  ( TcGblEnv, TcLclEnv, TcPluginM                   , unsafeTcPluginTcM, getEvBindsTcPluginM                   , liftIO, traceTc )+import Constraint ( Ct, CtLoc, CtEvidence(..), ctLocOrigin ) import TcMType    ( TcTyVar, TcType ) import TcEnv      ( TcTyThing ) import TcEvidence ( TcCoercion, CoercionHole, EvTerm(..)                   , EvExpr, EvBind, mkGivenEvBind )-import TcRnTypes  ( CtEvidence(..) ) import Var        ( EvVar )  import Module@@ -161,7 +158,7 @@ -- | Create a new wanted constraint. newWanted  :: CtLoc -> PredType -> TcPluginM CtEvidence newWanted loc pty-  = unsafeTcPluginTcM (TcM.newWanted (TcM.ctLocOrigin loc) Nothing pty)+  = unsafeTcPluginTcM (TcM.newWanted (ctLocOrigin loc) Nothing pty)  -- | Create a new derived constraint. newDerived :: CtLoc -> PredType -> TcPluginM CtEvidence@@ -190,7 +187,3 @@ setEvBind ev_bind = do     tc_evbinds <- getEvBindsTcPluginM     unsafeTcPluginTcM $ TcM.addTcEvBind tc_evbinds ev_bind-#else--- this dummy import is needed as a consequence of NoImplicitPrelude-import GhcPrelude ()-#endif
typecheck/TcRnDriver.hs view
@@ -4,7 +4,7 @@  \section[TcRnDriver]{Typechecking a whole module} -https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/TypeChecker+https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/type-checker -}  {-# LANGUAGE CPP #-}@@ -24,7 +24,7 @@         getModuleInterface,         tcRnDeclsi,         isGHCiMonad,-        runTcInteractive,    -- Used by GHC API clients (Trac #8878)+        runTcInteractive,    -- Used by GHC API clients (#8878)         tcRnLookupName,         tcRnGetInfo,         tcRnModule, tcRnModuleTcRnM,@@ -64,7 +64,7 @@ import TysWiredIn ( unitTy, mkListTy ) import Plugins import DynFlags-import HsSyn+import GHC.Hs import IfaceSyn ( ShowSub(..), showToHeader ) import IfaceType( ShowForAllFlag(..) ) import PatSyn( pprPatSynType )@@ -76,6 +76,8 @@ import TcRnMonad import TcRnExports import TcEvidence+import Constraint+import TcOrigin import qualified BooleanFormula as BF import PprTyThing( pprTyThingInContext ) import CoreFVs( orphNamesOfFamInst )@@ -134,12 +136,15 @@ import Inst (tcGetInsts) import qualified GHC.LanguageExtensions as LangExt import Data.Data ( Data )-import HsDumpAst+import GHC.Hs.Dump import qualified Data.Set as S  import Control.DeepSeq import Control.Monad +import TcHoleFitTypes ( HoleFitPluginR (..) )++ #include "HsVersions.h"  {-@@ -160,11 +165,11 @@ tcRnModule hsc_env mod_sum save_rn_syntax    parsedModule@HsParsedModule {hpm_module= (dL->L loc this_module)}  | RealSrcSpan real_loc <- loc- = withTiming (pure dflags)+ = withTiming dflags               (text "Renamer/typechecker"<+>brackets (ppr this_mod))               (const ()) $    initTc hsc_env hsc_src save_rn_syntax this_mod real_loc $-          withTcPlugins hsc_env $+          withTcPlugins hsc_env $ withHoleFitPlugins hsc_env $            tcRnModuleTcRnM hsc_env mod_sum parsedModule pair @@ -291,7 +296,7 @@                         -- Do this /after/ typeinference, so that when reporting                         -- a function with no type signature we can give the                         -- inferred type-                        reportUnusedNames export_ies tcg_env+                        reportUnusedNames tcg_env                       ; -- add extra source files to tcg_dependent_files                         addDependentFiles src_files                       ; tcg_env <- runTypecheckerPlugin mod_sum hsc_env tcg_env@@ -400,8 +405,8 @@          -- Check for the 'main' declaration         -- Must do this inside the captureTopConstraints+        -- NB: always set envs *before* captureTopConstraints       ; (tcg_env, lie_main) <- setEnvs (tcg_env, tcl_env) $-                               -- always set envs *before* captureTopConstraints                                captureTopConstraints $                                checkMain explicit_mod_hdr @@ -503,10 +508,13 @@     let run_finalizer (lcl_env, f) =             setLclEnv lcl_env (runRemoteModFinalizers f) -    (_, lie_th) <- captureTopConstraints $ mapM_ run_finalizer th_modfinalizers+    (_, lie_th) <- captureTopConstraints $+                   mapM_ run_finalizer th_modfinalizers+       -- Finalizers can add top-level declarations with addTopDecls, so       -- we have to run tc_rn_src_decls to get them     (tcg_env, tcl_env, lie_top_decls) <- tc_rn_src_decls []+     setEnvs (tcg_env, tcl_env) $ do       -- Subsequent rounds of finalizers run after any new constraints are       -- simplified, or some types might not be complete when using reify@@ -533,7 +541,7 @@         -- Get TH-generated top-level declarations and make sure they don't         -- contain any splices since we don't handle that at the moment         ---        -- The plumbing here is a bit odd: see Trac #10853+        -- The plumbing here is a bit odd: see #10853       ; th_topdecls_var <- fmap tcg_th_topdecls getGblEnv       ; th_ds <- readTcRef th_topdecls_var       ; writeTcRef th_topdecls_var []@@ -550,7 +558,7 @@                                 ("Declaration splices are not "                                   ++ "permitted inside top-level "                                   ++ "declarations added with addTopDecls"))-                        ; Just (XSpliceDecl _, _) -> panic "tc_rn_src_decls"+                        ; Just (XSpliceDecl nec, _) -> noExtCon nec                         }                       -- Rename TH-generated top-level declarations                     ; (tcg_env, th_rn_decls) <- setGblEnv tcg_env@@ -593,7 +601,7 @@                 ; return (tcg_env, tcl_env, lie1 `andWC` lie2)                }-          ; Just (XSpliceDecl _, _) -> panic "tc_rn_src_decls"+          ; Just (XSpliceDecl nec, _) -> noExtCon nec           }       } @@ -617,11 +625,12 @@                             , hs_defds  = def_decls                             , hs_ruleds = rule_decls                             , hs_annds  = _-                            , hs_valds-                                 = XValBindsLR (NValBinds val_binds val_sigs) })+                            , hs_valds  = XValBindsLR (NValBinds val_binds val_sigs) })               <- rnTopSrcDecls first_group+         -- The empty list is for extra dependencies coming from .hs-boot files         -- See Note [Extra dependencies from .hs-boot files] in RnSource+         ; (gbl_env, lie) <- setGblEnv tcg_env $ captureTopConstraints $ do {               -- NB: setGblEnv **before** captureTopConstraints so that               -- if the latter reports errors, it knows what's in scope@@ -629,8 +638,8 @@                 -- Check for illegal declarations         ; case group_tail of              Just (SpliceDecl _ d _, _) -> badBootDecl hsc_src "splice" d-             Just (XSpliceDecl _, _) -> panic "tcRnHsBootDecls"-             Nothing                  -> return ()+             Just (XSpliceDecl nec, _)  -> noExtCon nec+             Nothing                    -> return ()         ; mapM_ (badBootDecl hsc_src "foreign") for_decls         ; mapM_ (badBootDecl hsc_src "default") def_decls         ; mapM_ (badBootDecl hsc_src "rule")    rule_decls@@ -760,7 +769,7 @@ It is much more directly simply to extract the DFunIds from the md_types of the SelfBootInfo. -See Trac #4003, #16038 for why we need to take care here.+See #4003, #16038 for why we need to take care here. -}  checkHiBootIface' :: [ClsInst] -> TypeEnv -> [AvailInfo]@@ -851,12 +860,12 @@           --    That ensures that the TyCon etc inside the type are           --    the ones defined in this module, not the ones gotten           --    from the hi-boot file, which may have a lot less info-          --    (Trac #8743, comment:10).+          --    (#8743, comment:10).           --           --  * The DFunIds from boot_details are /GlobalIds/, because           --    they come from typechecking M.hi-boot.           --    But all bindings in this module should be for /LocalIds/,-          --    otherwise dependency analysis fails (Trac #16038). This+          --    otherwise dependency analysis fails (#16038). This           --    is another reason for using mkExportedVanillaId, rather           --    that modifying boot_dfun, to make local_boot_fun. @@ -1453,7 +1462,7 @@                           foe_binds              ; fo_gres = fi_gres `unionBags` foe_gres-            ; fo_fvs = foldrBag (\gre fvs -> fvs `addOneFV` gre_name gre)+            ; fo_fvs = foldr (\gre fvs -> fvs `addOneFV` gre_name gre)                                 emptyFVs fo_gres              ; sig_names = mkNameSet (collectHsValBinders hs_val_binds)@@ -1564,7 +1573,7 @@          -- Unqualified import?         isUnqualified :: ImportDecl GhcRn -> Bool-        isUnqualified = not . ideclQualified+        isUnqualified = not . isImportDeclQualified . ideclQualified          -- List of explicitly imported (or hidden) Names from a single import.         --   Nothing -> No explicit imports@@ -1677,7 +1686,7 @@ tcTyClsInstDecls tycl_decls deriv_decls binds  = tcAddDataFamConPlaceholders (tycl_decls >>= group_instds) $    tcAddPatSynPlaceholders (getPatSynBinds binds) $-   do { (tcg_env, inst_info, datafam_deriv_info)+   do { (tcg_env, inst_info, deriv_info)           <- tcTyAndClassDecls tycl_decls ;       ; setGblEnv tcg_env $ do {           -- With the @TyClDecl@s and @InstDecl@s checked we're ready to@@ -1687,9 +1696,8 @@           -- Careful to quit now in case there were instance errors, so that           -- the deriving errors don't pile up as well.           ; failIfErrsM-          ; let tyclds = tycl_decls >>= group_tyclds           ; (tcg_env', inst_info', val_binds)-              <- tcInstDeclsDeriv datafam_deriv_info tyclds deriv_decls+              <- tcInstDeclsDeriv deriv_info deriv_decls           ; setGblEnv tcg_env' $ do {                 failIfErrsM               ; pure (tcg_env', inst_info' ++ inst_info, val_binds)@@ -1735,7 +1743,7 @@         ; (ev_binds, main_expr)                <- checkConstraints skol_info [] [] $                   addErrCtxt mainCtxt    $-                  tcMonoExpr (cL loc (HsVar noExt (cL loc main_name)))+                  tcMonoExpr (cL loc (HsVar noExtField (cL loc main_name)))                              (mkCheckExpType io_ty)                  -- See Note [Root-main Id]@@ -1751,7 +1759,7 @@               -- The ev_binds of the `main` function may contain deferred               -- type error when type of `main` is not `IO a`. The `ev_binds`               -- must be put inside `runMainIO` to ensure the deferred type-              -- error can be emitted correctly. See Trac #13838.+              -- error can be emitted correctly. See #13838.               ; rhs = nlHsApp (mkLHsWrap co (nlHsVar run_main_id)) $                         mkHsDictLet ev_binds main_expr               ; main_bind = mkVarBind root_main_id rhs }@@ -1837,7 +1845,7 @@ -- Initialise the tcg_inst_env with instances from all home modules. -- This mimics the more selective call to hptInstances in tcRnImports runTcInteractive hsc_env thing_inside-  = initTcInteractive hsc_env $ withTcPlugins hsc_env $+  = initTcInteractive hsc_env $ withTcPlugins hsc_env $ withHoleFitPlugins hsc_env $     do { traceTc "setInteractiveContext" $             vcat [ text "ic_tythings:" <+> vcat (map ppr (ic_tythings icxt))                  , text "ic_insts:" <+> vcat (map (pprBndr LetBind . instanceDFunId) ic_insts)@@ -1883,7 +1891,8 @@                          , tcg_imports      = imports                          } -       ; lcl_env' <- tcExtendLocalTypeEnv lcl_env lcl_ids+             lcl_env' = tcExtendLocalTypeEnv lcl_env lcl_ids+        ; setEnvs (gbl_env', lcl_env') thing_inside }   where     (home_insts, home_fam_insts) = hptInstances hsc_env (\_ -> True)@@ -1925,9 +1934,8 @@ types.  If we don't register these free TyVars as global TyVars then the typechecker will try to quantify over them and fall over in skolemiseQuantifiedTyVar. so we must add any free TyVars to the-typechecker's global TyVar set.  That is most conveniently by using-tcExtendLocalTypeEnv, which automatically extends the global TyVar-set.+typechecker's global TyVar set.  That is done by using+tcExtendLocalTypeEnv.  We do this by splitting out the Ids with open types, using 'is_closed' to do the partition.  The top-level things go in the global TypeEnv;@@ -2063,35 +2071,35 @@               -- (if we are at a breakpoint, say).  We must put those free vars                -- [let it = expr]-              let_stmt  = cL loc $ LetStmt noExt $ noLoc $ HsValBinds noExt+              let_stmt  = cL loc $ LetStmt noExtField $ noLoc $ HsValBinds noExtField                            $ XValBindsLR                                (NValBinds [(NonRecursive,unitBag the_bind)] [])                -- [it <- e]-              bind_stmt = cL loc $ BindStmt noExt-                                       (cL loc (VarPat noExt (cL loc fresh_it)))+              bind_stmt = cL loc $ BindStmt noExtField+                                       (cL loc (VarPat noExtField (cL loc fresh_it)))                                        (nlHsApp ghciStep rn_expr)                                        (mkRnSyntaxExpr bindIOName)                                        noSyntaxExpr                -- [; print it]-              print_it  = cL loc $ BodyStmt noExt+              print_it  = cL loc $ BodyStmt noExtField                                            (nlHsApp (nlHsVar interPrintName)                                            (nlHsVar fresh_it))                                            (mkRnSyntaxExpr thenIOName)                                                   noSyntaxExpr                -- NewA-              no_it_a = cL loc $ BodyStmt noExt (nlHsApps bindIOName+              no_it_a = cL loc $ BodyStmt noExtField (nlHsApps bindIOName                                        [rn_expr , nlHsVar interPrintName])                                        (mkRnSyntaxExpr thenIOName)                                        noSyntaxExpr -              no_it_b = cL loc $ BodyStmt noExt (rn_expr)+              no_it_b = cL loc $ BodyStmt noExtField (rn_expr)                                        (mkRnSyntaxExpr thenIOName)                                        noSyntaxExpr -              no_it_c = cL loc $ BodyStmt noExt+              no_it_c = cL loc $ BodyStmt noExtField                                       (nlHsApp (nlHsVar interPrintName) rn_expr)                                       (mkRnSyntaxExpr thenIOName)                                       noSyntaxExpr@@ -2150,10 +2158,10 @@ expression gets evaluated right away anyway. It also would potentially emit two redundant type-error warnings, one from each plan. -Trac #14963 reveals another bug that when deferred type errors is enabled+#14963 reveals another bug that when deferred type errors is enabled in GHCi, any reference of imported/loaded variables (directly or indirectly) in interactively issued naked expressions will cause ghc panic. See more-detailed dicussion in Trac #14963.+detailed dicussion in #14963.  The interactively issued declarations, statements, as well as the modules loaded into GHCi, are not affected. That means, for declaration, you could@@ -2225,7 +2233,7 @@            ; when (isUnitTy v_ty || not (isTauTy v_ty)) failM            ; return stuff }       where-        print_v  = cL loc $ BodyStmt noExt (nlHsApp (nlHsVar printName)+        print_v  = cL loc $ BodyStmt noExtField (nlHsApp (nlHsVar printName)                                     (nlHsVar v))                                     (mkRnSyntaxExpr thenIOName) noSyntaxExpr @@ -2311,14 +2319,15 @@         ioM     = nlHsAppTy (nlHsTyVar ioTyConName) (nlHsTyVar a_tv)          step_ty = noLoc $ HsForAllTy-                     { hst_bndrs = [noLoc $ UserTyVar noExt (noLoc a_tv)]-                     , hst_xforall = noExt+                     { hst_fvf = ForallInvis+                     , hst_bndrs = [noLoc $ UserTyVar noExtField (noLoc a_tv)]+                     , hst_xforall = noExtField                      , hst_body  = nlHsFunTy ghciM ioM }          stepTy :: LHsSigWcType GhcRn         stepTy = mkEmptyWildCardBndrs (mkEmptyImplicitBndrs step_ty) -    return (noLoc $ ExprWithTySig noExt (nlHsVar ghciStepIoMName) stepTy)+    return (noLoc $ ExprWithTySig noExtField (nlHsVar ghciStepIoMName) stepTy)  isGHCiMonad :: HscEnv -> String -> IO (Messages, Maybe Name) isGHCiMonad hsc_env ty@@ -2359,8 +2368,9 @@     uniq <- newUnique ;     let { fresh_it  = itName uniq (getLoc rdr_expr)         ; orig = lexprCtOrigin rn_expr } ;-    (tclvl, lie, res_ty)-          <- pushLevelAndCaptureConstraints $+    ((tclvl, res_ty), lie)+          <- captureTopConstraints $+             pushTcLevelM          $              do { (_tc_expr, expr_ty) <- tcInferSigma rn_expr                 ; if inst                   then snd <$> deeplyInstantiate orig expr_ty@@ -2377,7 +2387,8 @@     _ <- perhaps_disable_default_warnings $          simplifyInteractive residual ; -    let { all_expr_ty = mkInvForAllTys qtvs (mkLamTypes dicts res_ty) } ;+    let { all_expr_ty = mkInvForAllTys qtvs $+                        mkPhiTy (map idType dicts) res_ty } ;     ty <- zonkTcType all_expr_ty ;      -- We normalise type families, so that the type of an expression is the@@ -2411,10 +2422,11 @@  -- tcRnType just finds the kind of a type tcRnType :: HscEnv+         -> ZonkFlexi          -> Bool        -- Normalise the returned type          -> LHsType GhcPs          -> IO (Messages, Maybe (Type, Kind))-tcRnType hsc_env normalise rdr_type+tcRnType hsc_env flexi normalise rdr_type   = runTcInteractive hsc_env $     setXOptM LangExt.PolyKinds $   -- See Note [Kind-generalise in tcRnType]     do { (HsWC { hswc_ext = wcs, hswc_body = rn_type }, _fvs)@@ -2423,6 +2435,8 @@                   -- generalisation; e.g.   :kind (T _)        ; failIfErrsM +        -- We follow Note [Recipe for checking a signature] in TcHsType here+         -- Now kind-check the type         -- It can have any rank or kind         -- First bring into scope any wildcards@@ -2431,15 +2445,16 @@                         -- must push level to satisfy level precondition of                         -- kindGeneralize, below                        solveEqualities       $-                       tcWildCardBinders wcs $ \ wcs' ->-                       do { emitWildCardHoleConstraints wcs'+                       tcNamedWildCardBinders wcs $ \ wcs' ->+                       do { emitNamedWildCardHoleConstraints wcs'                           ; tcLHsTypeUnsaturated rn_type }         -- Do kind generalisation; see Note [Kind-generalise in tcRnType]-       ; kind <- zonkTcType kind-       ; kvs <- kindGeneralize kind-       ; ty  <- zonkTcTypeToType ty+       ; kvs <- kindGeneralizeAll kind+       ; e <- mkEmptyZonkEnv flexi +       ; ty  <- zonkTcTypeToTypeX e ty+        -- Do validity checking on type        ; checkValidType (GhciCtxt True) ty @@ -2871,6 +2886,30 @@ getTcPlugins :: DynFlags -> [TcRnMonad.TcPlugin] getTcPlugins dflags = catMaybes $ mapPlugins dflags (\p args -> tcPlugin p args) ++withHoleFitPlugins :: HscEnv -> TcM a -> TcM a+withHoleFitPlugins hsc_env m =+  case (getHfPlugins (hsc_dflags hsc_env)) of+    [] -> m  -- Common fast case+    plugins -> do (plugins,stops) <- unzip `fmap` mapM startPlugin plugins+                  -- This ensures that hfPluginStop is called even if a type+                  -- error occurs during compilation.+                  eitherRes <- tryM $ do+                    updGblEnv (\e -> e { tcg_hf_plugins = plugins }) m+                  sequence_ stops+                  case eitherRes of+                    Left _ -> failM+                    Right res -> return res+  where+    startPlugin (HoleFitPluginR init plugin stop) =+      do ref <- init+         return (plugin ref, stop ref)++getHfPlugins :: DynFlags -> [HoleFitPluginR]+getHfPlugins dflags =+  catMaybes $ mapPlugins dflags (\p args -> holeFitPlugin p args)++ runRenamerPlugin :: TcGblEnv                  -> HsGroup GhcRn                  -> TcM (TcGblEnv, HsGroup GhcRn)@@ -2904,7 +2943,8 @@       gbl_env  mark_plugin_unsafe :: DynFlags -> TcM ()-mark_plugin_unsafe dflags = recordUnsafeInfer pluginUnsafe+mark_plugin_unsafe dflags = unless (gopt Opt_PluginTrustworthy dflags) $+  recordUnsafeInfer pluginUnsafe   where     unsafeText = "Use of plugins makes the module unsafe"     pluginUnsafe = unitBag ( mkPlainWarnMsg dflags noSrcSpan
typecheck/TcRnExports.hs view
@@ -9,7 +9,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import PrelNames import RdrName import TcRnMonad@@ -65,7 +65,7 @@  Note [Exports of data families] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose you see (Trac #5306)+Suppose you see (#5306)         module M where           import X( F )           data instance F Int = FInt@@ -92,7 +92,7 @@  Note [Avails of associated data families] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose you have (Trac #16077)+Suppose you have (#16077)      {-# LANGUAGE TypeFamilies #-}     module A (module A) where@@ -170,22 +170,25 @@        -- list, to avoid bleating about re-exporting a deprecated        -- thing (especially via 'module Foo' export item)    do   {-        -- In interactive mode, we behave as if he had-        -- written "module Main where ..."         ; dflags <- getDynFlags         ; let is_main_mod = mainModIs dflags == this_mod         ; let default_main = case mainFunIs dflags of                  Just main_fun                      | is_main_mod -> mkUnqual varName (fsLit main_fun)                  _                 -> main_RDR_Unqual+        ; has_main <- (not . null) <$> lookupInfoOccRn default_main -- #17832+        -- If a module has no explicit header, and it has one or more main+        -- functions in scope, then add a header like+        -- "module Main(main) where ..."                               #13839+        -- See Note [Modules without a module header]         ; let real_exports                  | explicit_mod = exports-                 | ghcLink dflags == LinkInMemory = Nothing-                 | otherwise-                          = Just (noLoc [noLoc (IEVar noExt+                 | has_main+                          = Just (noLoc [noLoc (IEVar noExtField                                      (noLoc (IEName $ noLoc default_main)))])                         -- ToDo: the 'noLoc' here is unhelpful if 'main'                         --       turns out to be out of scope+                 | otherwise = Nothing          ; let do_it = exports_from_avail real_exports rdr_env imports this_mod         ; (rn_exports, final_avails)@@ -267,7 +270,7 @@      -- See Note [Avails of associated data families]     expand_tyty_gre :: GlobalRdrElt -> [GlobalRdrElt]-    expand_tyty_gre (gre @ GRE { gre_name = me, gre_par = ParentIs p })+    expand_tyty_gre (gre@GRE { gre_name = me, gre_par = ParentIs p })       | isTyConName p, isTyConName me = [gre, gre{ gre_par = NoParent }]     expand_tyty_gre gre = [gre] @@ -315,7 +318,7 @@                              , ppr new_exports ])               ; return (Just ( ExportAccum occs' mods-                            , ( cL loc (IEModuleContents noExt lmod)+                            , ( cL loc (IEModuleContents noExtField lmod)                               , new_exports))) }      exports_from_item acc@(ExportAccum occs mods) (dL->L loc ie)@@ -338,18 +341,18 @@     lookup_ie :: IE GhcPs -> RnM (IE GhcRn, AvailInfo)     lookup_ie (IEVar _ (dL->L l rdr))         = do (name, avail) <- lookupGreAvailRn $ ieWrappedName rdr-             return (IEVar noExt (cL l (replaceWrappedName rdr name)), avail)+             return (IEVar noExtField (cL l (replaceWrappedName rdr name)), avail)      lookup_ie (IEThingAbs _ (dL->L l rdr))         = do (name, avail) <- lookupGreAvailRn $ ieWrappedName rdr-             return (IEThingAbs noExt (cL l (replaceWrappedName rdr name))+             return (IEThingAbs noExtField (cL l (replaceWrappedName rdr name))                     , avail)      lookup_ie ie@(IEThingAll _ n')         = do             (n, avail, flds) <- lookup_ie_all ie n'             let name = unLoc n-            return (IEThingAll noExt (replaceLWrappedName n' (unLoc n))+            return (IEThingAll noExtField (replaceLWrappedName n' (unLoc n))                    , AvailTC name (name:avail) flds)  @@ -362,7 +365,7 @@                 NoIEWildcard -> return (lname, [], [])                 IEWildcard _ -> lookup_ie_all ie l             let name = unLoc lname-            return (IEThingWith noExt (replaceLWrappedName l name) wc subs+            return (IEThingWith noExtField (replaceLWrappedName l name) wc subs                                 (flds ++ (map noLoc all_flds)),                     AvailTC name (name : avails ++ all_avail)                                  (map unLoc flds ++ all_flds))@@ -404,10 +407,10 @@     -------------     lookup_doc_ie :: IE GhcPs -> RnM (IE GhcRn)     lookup_doc_ie (IEGroup _ lev doc) = do rn_doc <- rnHsDoc doc-                                           return (IEGroup noExt lev rn_doc)+                                           return (IEGroup noExtField lev rn_doc)     lookup_doc_ie (IEDoc _ doc)       = do rn_doc <- rnHsDoc doc-                                           return (IEDoc noExt rn_doc)-    lookup_doc_ie (IEDocNamed _ str)  = return (IEDocNamed noExt str)+                                           return (IEDoc noExtField rn_doc)+    lookup_doc_ie (IEDocNamed _ str)  = return (IEDocNamed noExtField str)     lookup_doc_ie _ = panic "lookup_doc_ie"    -- Other cases covered earlier      -- In an export item M.T(A,B,C), we want to treat the uses of@@ -436,8 +439,40 @@ -- Renaming and typechecking of exports happens after everything else has -- been typechecked. +{-+Note [Modules without a module header]+-------------------------------------------------- +The Haskell 2010 report says in section 5.1: +>> An abbreviated form of module, consisting only of the module body, is+>> permitted. If this is used, the header is assumed to be+>> ‘module Main(main) where’.++For modules without a module header, this is implemented the+following way:++If the module has a main function in scope:+   Then create a module header and export the main function,+   as if a module header like ‘module Main(main) where...’ would exist.+   This has the effect to mark the main function and all top level+   functions called directly or indirectly via main as 'used',+   and later on, unused top-level functions can be reported correctly.+   There is no distinction between GHC and GHCi.+If the module has several main functions in scope:+   Then generate a header as above. The ambiguity is reported later in+   module  `TcRnDriver.hs` function `check_main`.+If the module has NO main function:+   Then export all top-level functions. This marks all top level+   functions as 'used'.+   In GHCi this has the effect, that we don't get any 'non-used' warnings.+   In GHC, however, the 'has-main-module' check in the module+   compiler/typecheck/TcRnDriver (functions checkMain / check-main) fires,+   and we get the error:+      The IO action ‘main’ is not defined in module ‘Main’+-}++ -- Renaming exports lists is a minefield. Five different things can appear in -- children export lists ( T(A, B, C) ). -- 1. Record selectors@@ -688,12 +723,12 @@ --        import A( f ) --        import B( f ) ----- Example of "yes" (Trac #2436)+-- Example of "yes" (#2436) --    module M( C(..), T(..) ) where --         class C a where { data T a } --         instance C Int where { data T Int = TInt } ----- Example of "yes" (Trac #2436)+-- Example of "yes" (#2436) --    module Foo ( T ) where --      data family T a --    module Bar ( T(..), module Foo ) where@@ -748,7 +783,7 @@   text "In the" <+> text (herald ++ ":") <+> ppr exp  -addExportErrCtxt :: (OutputableBndrId (GhcPass p))+addExportErrCtxt :: (OutputableBndrId p)                  => IE (GhcPass p) -> TcM a -> TcM a addExportErrCtxt ie = addErrCtxt exportCtxt   where
typecheck/TcRnMonad.hs view
@@ -75,7 +75,6 @@   askNoErrs, discardErrs, tryTcDiscardingErrs,   checkNoErrs, whenNoErrs,   ifErrsM, failIfErrsM,-  checkTH, failTH,    -- * Context management for the type checker   getErrCtxt, setErrCtxt, addErrCtxt, addErrCtxtM, addLandmarkErrCtxt,@@ -104,7 +103,8 @@   pushTcLevelM_, pushTcLevelM, pushTcLevelsM,   getTcLevel, setTcLevel, isTouchableTcM,   getLclTypeEnv, setLclTypeEnv,-  traceTcConstraints, emitWildCardHoleConstraints,+  traceTcConstraints,+  emitNamedWildCardHoleConstraints, emitAnonWildCardHoleConstraint,    -- * Template Haskell context   recordThUse, recordThSpliceUse, recordTopLevelSpliceLoc,@@ -146,9 +146,11 @@  import TcRnTypes        -- Re-export all import IOEnv            -- Re-export all+import Constraint import TcEvidence+import TcOrigin -import HsSyn hiding (LIE)+import GHC.Hs hiding (LIE) import HscTypes import Module import RdrName@@ -175,7 +177,7 @@ import Panic import Util import Annotations-import BasicTypes( TopLevelFlag )+import BasicTypes( TopLevelFlag, TypeOrKind(..) ) import Maybes import CostCentreState @@ -312,6 +314,7 @@                 tcg_safeInfer      = infer_var,                 tcg_dependent_files = dependent_files_var,                 tcg_tc_plugins     = [],+                tcg_hf_plugins     = [],                 tcg_top_loc        = loc,                 tcg_static_wc      = static_wc_var,                 tcg_complete_matches = [],@@ -330,8 +333,7 @@               -> TcM r               -> IO (Messages, Maybe r) initTcWithGbl hsc_env gbl_env loc do_this- = do { tvs_var      <- newIORef emptyVarSet-      ; lie_var      <- newIORef emptyWC+ = do { lie_var      <- newIORef emptyWC       ; errs_var     <- newIORef (emptyBag, emptyBag)       ; let lcl_env = TcLclEnv {                 tcl_errs       = errs_var,@@ -343,7 +345,6 @@                 tcl_arrow_ctxt = NoArrowCtxt,                 tcl_env        = emptyNameEnv,                 tcl_bndrs      = [],-                tcl_tyvars     = tvs_var,                 tcl_lie        = lie_var,                 tcl_tclvl      = topTcLevel                 }@@ -358,7 +359,7 @@       -- If we succeed (maybe_res = Just r), there should be       -- no unsolved constraints.  But if we exit via an       -- exception (maybe_res = Nothing), we may have skipped-      -- solving, so don't panic then (Trac #13466)+      -- solving, so don't panic then (#13466)       ; lie <- readIORef (tcl_lie lcl_env)       ; when (isJust maybe_res && not (isEmptyWC lie)) $         pprPanic "initTc: unsolved constraints" (ppr lie)@@ -401,17 +402,14 @@ ************************************************************************ -} -initTcRnIf :: Char              -- Tag for unique supply+initTcRnIf :: Char              -- ^ Mask for unique supply            -> HscEnv            -> gbl -> lcl            -> TcRnIf gbl lcl a            -> IO a-initTcRnIf uniq_tag hsc_env gbl_env lcl_env thing_inside-   = do { us     <- mkSplitUniqSupply uniq_tag ;-        ; us_var <- newIORef us ;--        ; let { env = Env { env_top = hsc_env,-                            env_us  = us_var,+initTcRnIf uniq_mask hsc_env gbl_env lcl_env thing_inside+   = do { let { env = Env { env_top = hsc_env,+                            env_um  = uniq_mask,                             env_gbl = gbl_env,                             env_lcl = lcl_env} } @@ -599,27 +597,15 @@  newUnique :: TcRnIf gbl lcl Unique newUnique- = do { env <- getEnv ;-        let { u_var = env_us env } ;-        us <- readMutVar u_var ;-        case takeUniqFromSupply us of { (uniq, us') -> do {-        writeMutVar u_var us' ;-        return $! uniq }}}-   -- NOTE 1: we strictly split the supply, to avoid the possibility of leaving-   -- a chain of unevaluated supplies behind.-   -- NOTE 2: we use the uniq in the supply from the MutVar directly, and-   -- throw away one half of the new split supply.  This is safe because this-   -- is the only place we use that unique.  Using the other half of the split-   -- supply is safer, but slower.+ = do { env <- getEnv+      ; let mask = env_um env+      ; liftIO $! uniqFromMask mask }  newUniqueSupply :: TcRnIf gbl lcl UniqSupply newUniqueSupply- = do { env <- getEnv ;-        let { u_var = env_us env } ;-        us <- readMutVar u_var ;-        case splitUniqSupply us of { (us1,us2) -> do {-        writeMutVar u_var us1 ;-        return us2 }}}+ = do { env <- getEnv+      ; let mask = env_um env+      ; liftIO $! mkSplitUniqSupply mask }  cloneLocalName :: Name -> TcM Name -- Make a fresh Internal name with the same OccName and SrcSpan@@ -1021,17 +1007,6 @@ -- Useful to avoid error cascades failIfErrsM = ifErrsM failM (return ()) -checkTH :: a -> String -> TcRn ()-checkTH _ _ = return () -- OK--failTH :: Outputable a => a -> String -> TcRn x-failTH e what  -- Raise an error in a stage-1 compiler-  = failWithTc (vcat [ hang (char 'A' <+> text what-                             <+> text "requires GHC with interpreter support:")-                          2 (ppr e)-                     , text "Perhaps you are using a stage-1 compiler?" ])-- {- ********************************************************************* *                                                                      *         Context management for the type checker@@ -1677,8 +1652,7 @@ setLclTypeEnv lcl_env thing_inside   = updLclEnv upd thing_inside   where-    upd env = env { tcl_env = tcl_env lcl_env,-                    tcl_tyvars = tcl_tyvars lcl_env }+    upd env = env { tcl_env = tcl_env lcl_env }  traceTcConstraints :: String -> TcM () traceTcConstraints msg@@ -1688,9 +1662,17 @@          hang (text (msg ++ ": LIE:")) 2 (ppr lie)        } -emitWildCardHoleConstraints :: [(Name, TcTyVar)] -> TcM ()-emitWildCardHoleConstraints wcs+emitAnonWildCardHoleConstraint :: TcTyVar -> TcM ()+emitAnonWildCardHoleConstraint tv   = do { ct_loc <- getCtLocM HoleOrigin Nothing+       ; emitInsolubles $ unitBag $+         CHoleCan { cc_ev = CtDerived { ctev_pred = mkTyVarTy tv+                                      , ctev_loc  = ct_loc }+                  , cc_hole = TypeHole (mkTyVarOcc "_") } }++emitNamedWildCardHoleConstraints :: [(Name, TcTyVar)] -> TcM ()+emitNamedWildCardHoleConstraints wcs+  = do { ct_loc <- getCtLocM HoleOrigin Nothing        ; emitInsolubles $ listToBag $          map (do_one ct_loc) wcs }   where@@ -1702,14 +1684,14 @@        where          real_span = case nameSrcSpan name of                            RealSrcSpan span  -> span-                           UnhelpfulSpan str -> pprPanic "emitWildCardHoleConstraints"+                           UnhelpfulSpan str -> pprPanic "emitNamedWildCardHoleConstraints"                                                       (ppr name <+> quotes (ftext str))                -- Wildcards are defined locally, and so have RealSrcSpans          ct_loc' = setCtLocSpan ct_loc real_span  {- Note [Constraints and errors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (Trac #12124):+Consider this (#12124):    foo :: Maybe Int   foo = return (case Left 3 of@@ -1737,7 +1719,7 @@ captureConstraints, and discard all the constraints. Some of those constraints might be "variable out of scope" Hole constraints, and that might have been the actual original cause of the exception!  For-example (Trac #12529):+example (#12529):    f = p @ Int Here 'p' is out of scope, so we get an insolube Hole constraint. But the visible type application fails in the monad (thows an exception).@@ -1748,7 +1730,7 @@   - insolublesOnly in tryCaptureConstraints   - emitConstraints in the Left case of captureConstraints -Hover note that fresly-generated constraints like (Int ~ Bool), or+However note that freshly-generated constraints like (Int ~ Bool), or ((a -> b) ~ Int) are all CNonCanonical, and hence won't be flagged as insoluble.  The constraint solver does that.  So they'll be discarded. That's probably ok; but see th/5358 as a not-so-good example:@@ -1837,13 +1819,13 @@ finalSafeMode dflags tcg_env = do     safeInf <- fst <$> readIORef (tcg_safeInfer tcg_env)     return $ case safeHaskell dflags of-        Sf_None | safeInferOn dflags && safeInf -> Sf_Safe+        Sf_None | safeInferOn dflags && safeInf -> Sf_SafeInferred                 | otherwise                     -> Sf_None         s -> s  -- | Switch instances to safe instances if we're in Safe mode. fixSafeInstances :: SafeHaskellMode -> [ClsInst] -> [ClsInst]-fixSafeInstances sfMode | sfMode /= Sf_Safe = id+fixSafeInstances sfMode | sfMode /= Sf_Safe && sfMode /= Sf_SafeInferred = id fixSafeInstances _ = map fixSafe   where fixSafe inst = let new_flag = (is_flag inst) { isSafeOverlap = True }                        in inst { is_flag = new_flag }@@ -1966,12 +1948,8 @@ -- signatures, which is pretty benign  forkM_maybe doc thing_inside- -- NB: Don't share the mutable env_us with the interleaved thread since env_us- --     does not get updated atomically (e.g. in newUnique and newUniqueSupply).- = do { child_us <- newUniqueSupply-      ; child_env_us <- newMutVar child_us-        -- see Note [Masking exceptions in forkM_maybe]-      ; unsafeInterleaveM $ uninterruptibleMaskM_ $ updEnv (\env -> env { env_us = child_env_us }) $+ = do { -- see Note [Masking exceptions in forkM_maybe]+      ; unsafeInterleaveM $ uninterruptibleMaskM_ $         do { traceIf (text "Starting fork {" <+> doc)            ; mb_res <- tryM $                        updLclEnv (\env -> env { if_loc = if_loc env $$ doc }) $
typecheck/TcRnTypes.hs view
@@ -16,3919 +16,1713 @@ of the stack mechanism), you should use a TcRef (= IORef) to store them. -} -{-# LANGUAGE CPP, ExistentialQuantification, GeneralizedNewtypeDeriving,-             ViewPatterns #-}--module TcRnTypes(-        TcRnIf, TcRn, TcM, RnM, IfM, IfL, IfG, -- The monad is opaque outside this module-        TcRef,--        -- The environment types-        Env(..),-        TcGblEnv(..), TcLclEnv(..),-        IfGblEnv(..), IfLclEnv(..),-        tcVisibleOrphanMods,--        -- Frontend types (shouldn't really be here)-        FrontendResult(..),--        -- Renamer types-        ErrCtxt, RecFieldEnv,-        ImportAvails(..), emptyImportAvails, plusImportAvails,-        WhereFrom(..), mkModDeps, modDepsElts,--        -- Typechecker types-        TcTypeEnv, TcBinderStack, TcBinder(..),-        TcTyThing(..), PromotionErr(..),-        IdBindingInfo(..), ClosedTypeId, RhsNames,-        IsGroupClosed(..),-        SelfBootInfo(..),-        pprTcTyThingCategory, pprPECategory, CompleteMatch(..),--        -- Desugaring types-        DsM, DsLclEnv(..), DsGblEnv(..),-        DsMetaEnv, DsMetaVal(..), CompleteMatchMap,-        mkCompleteMatchMap, extendCompleteMatchMap,--        -- Template Haskell-        ThStage(..), SpliceType(..), PendingStuff(..),-        topStage, topAnnStage, topSpliceStage,-        ThLevel, impLevel, outerLevel, thLevel,-        ForeignSrcLang(..),--        -- Arrows-        ArrowCtxt(..),--        -- TcSigInfo-        TcSigFun, TcSigInfo(..), TcIdSigInfo(..),-        TcIdSigInst(..), TcPatSynInfo(..),-        isPartialSig, hasCompleteSig,--        -- QCInst-        QCInst(..), isPendingScInst,--        -- Canonical constraints-        Xi, Ct(..), Cts, emptyCts, andCts, andManyCts, pprCts,-        singleCt, listToCts, ctsElts, consCts, snocCts, extendCtsList,-        isEmptyCts, isCTyEqCan, isCFunEqCan,-        isPendingScDict, superClassesMightHelp, getPendingWantedScs,-        isCDictCan_Maybe, isCFunEqCan_maybe,-        isCNonCanonical, isWantedCt, isDerivedCt,-        isGivenCt, isHoleCt, isOutOfScopeCt, isExprHoleCt, isTypeHoleCt,-        isUserTypeErrorCt, getUserTypeErrorMsg,-        ctEvidence, ctLoc, setCtLoc, ctPred, ctFlavour, ctEqRel, ctOrigin,-        ctEvId, mkTcEqPredLikeEv,-        mkNonCanonical, mkNonCanonicalCt, mkGivens,-        mkIrredCt, mkInsolubleCt,-        ctEvPred, ctEvLoc, ctEvOrigin, ctEvEqRel,-        ctEvExpr, ctEvTerm, ctEvCoercion, ctEvEvId,-        tyCoVarsOfCt, tyCoVarsOfCts,-        tyCoVarsOfCtList, tyCoVarsOfCtsList,--        WantedConstraints(..), insolubleWC, emptyWC, isEmptyWC,-        isSolvedWC, andWC, unionsWC, mkSimpleWC, mkImplicWC,-        addInsols, insolublesOnly, addSimples, addImplics,-        tyCoVarsOfWC, dropDerivedWC, dropDerivedSimples,-        tyCoVarsOfWCList, insolubleCt, insolubleEqCt,-        isDroppableCt, insolubleImplic,-        arisesFromGivens,--        Implication(..), newImplication, implicationPrototype,-        implicLclEnv, implicDynFlags,-        ImplicStatus(..), isInsolubleStatus, isSolvedStatus,-        SubGoalDepth, initialSubGoalDepth, maxSubGoalDepth,-        bumpSubGoalDepth, subGoalDepthExceeded,-        CtLoc(..), ctLocSpan, ctLocEnv, ctLocLevel, ctLocOrigin,-        ctLocTypeOrKind_maybe,-        ctLocDepth, bumpCtLocDepth, isGivenLoc,-        setCtLocOrigin, updateCtLocOrigin, setCtLocEnv, setCtLocSpan,-        CtOrigin(..), exprCtOrigin, lexprCtOrigin, matchesCtOrigin, grhssCtOrigin,-        isVisibleOrigin, toInvisibleOrigin,-        TypeOrKind(..), isTypeLevel, isKindLevel,-        pprCtOrigin, pprCtLoc,-        pushErrCtxt, pushErrCtxtSameOrigin,---        SkolemInfo(..), pprSigSkolInfo, pprSkolInfo,--        CtEvidence(..), TcEvDest(..),-        mkKindLoc, toKindLoc, mkGivenLoc,-        isWanted, isGiven, isDerived, isGivenOrWDeriv,-        ctEvRole,--        wrapType, wrapTypeWithImplication,-        removeBindingShadowing,--        -- Constraint solver plugins-        TcPlugin(..), TcPluginResult(..), TcPluginSolver,-        TcPluginM, runTcPluginM, unsafeTcPluginTcM,-        getEvBindsTcPluginM,--        CtFlavour(..), ShadowInfo(..), ctEvFlavour,-        CtFlavourRole, ctEvFlavourRole, ctFlavourRole,-        eqCanRewrite, eqCanRewriteFR, eqMayRewriteFR,-        eqCanDischargeFR,-        funEqCanDischarge, funEqCanDischargeF,--        -- Pretty printing-        pprEvVarTheta,-        pprEvVars, pprEvVarWithType,--        -- Misc other types-        TcId, TcIdSet,-        Hole(..), holeOcc,-        NameShape(..),--        -- Role annotations-        RoleAnnotEnv, emptyRoleAnnotEnv, mkRoleAnnotEnv,-        lookupRoleAnnot, getRoleAnnots,--  ) where--#include "HsVersions.h"--import GhcPrelude--import HsSyn-import CoreSyn-import HscTypes-import TcEvidence-import Type-import Class    ( Class )-import TyCon    ( TyCon, TyConFlavour, tyConKind )-import TyCoRep  ( coHoleCoVar )-import Coercion ( Coercion, mkHoleCo )-import ConLike  ( ConLike(..) )-import DataCon  ( DataCon, dataConUserType, dataConOrigArgTys )-import PatSyn   ( PatSyn, pprPatSynType )-import Id       ( idType, idName )-import FieldLabel ( FieldLabel )-import TcType-import Annotations-import InstEnv-import FamInstEnv-import PmExpr-import IOEnv-import RdrName-import Name-import NameEnv-import NameSet-import Avail-import Var-import FV-import VarEnv-import Module-import SrcLoc-import VarSet-import ErrUtils-import UniqFM-import UniqSupply-import BasicTypes-import Bag-import DynFlags-import Outputable-import ListSetOps-import FastString-import qualified GHC.LanguageExtensions as LangExt-import Fingerprint-import Util-import PrelNames ( isUnboundName )-import CostCentreState--import Control.Monad (ap, liftM, msum)-import qualified Control.Monad.Fail as MonadFail-import Data.Set      ( Set )-import qualified Data.Set as S--import Data.List ( sort )-import Data.Map ( Map )-import Data.Dynamic  ( Dynamic )-import Data.Typeable ( TypeRep )-import Data.Maybe    ( mapMaybe )-import GHCi.Message-import GHCi.RemoteTypes--import qualified Language.Haskell.TH as TH---- | A 'NameShape' is a substitution on 'Name's that can be used--- to refine the identities of a hole while we are renaming interfaces--- (see 'RnModIface').  Specifically, a 'NameShape' for--- 'ns_module_name' @A@, defines a mapping from @{A.T}@--- (for some 'OccName' @T@) to some arbitrary other 'Name'.------ The most intruiging thing about a 'NameShape', however, is--- how it's constructed.  A 'NameShape' is *implied* by the--- exported 'AvailInfo's of the implementor of an interface:--- if an implementor of signature @<H>@ exports @M.T@, you implicitly--- define a substitution from @{H.T}@ to @M.T@.  So a 'NameShape'--- is computed from the list of 'AvailInfo's that are exported--- by the implementation of a module, or successively merged--- together by the export lists of signatures which are joining--- together.------ It's not the most obvious way to go about doing this, but it--- does seem to work!------ NB: Can't boot this and put it in NameShape because then we--- start pulling in too many DynFlags things.-data NameShape = NameShape {-        ns_mod_name :: ModuleName,-        ns_exports :: [AvailInfo],-        ns_map :: OccEnv Name-    }---{--************************************************************************-*                                                                      *-               Standard monad definition for TcRn-    All the combinators for the monad can be found in TcRnMonad-*                                                                      *-************************************************************************--The monad itself has to be defined here, because it is mentioned by ErrCtxt--}--type TcRnIf a b = IOEnv (Env a b)-type TcRn       = TcRnIf TcGblEnv TcLclEnv    -- Type inference-type IfM lcl    = TcRnIf IfGblEnv lcl         -- Iface stuff-type IfG        = IfM ()                      --    Top level-type IfL        = IfM IfLclEnv                --    Nested-type DsM        = TcRnIf DsGblEnv DsLclEnv    -- Desugaring---- TcRn is the type-checking and renaming monad: the main monad that--- most type-checking takes place in.  The global environment is--- 'TcGblEnv', which tracks all of the top-level type-checking--- information we've accumulated while checking a module, while the--- local environment is 'TcLclEnv', which tracks local information as--- we move inside expressions.---- | Historical "renaming monad" (now it's just 'TcRn').-type RnM  = TcRn---- | Historical "type-checking monad" (now it's just 'TcRn').-type TcM  = TcRn---- We 'stack' these envs through the Reader like monad infrastructure--- as we move into an expression (although the change is focused in--- the lcl type).-data Env gbl lcl-  = Env {-        env_top  :: !HscEnv, -- Top-level stuff that never changes-                             -- Includes all info about imported things-                             -- BangPattern is to fix leak, see #15111--        env_us   :: {-# UNPACK #-} !(IORef UniqSupply),-                             -- Unique supply for local variables--        env_gbl  :: gbl,     -- Info about things defined at the top level-                             -- of the module being compiled--        env_lcl  :: lcl      -- Nested stuff; changes as we go into-    }--instance ContainsDynFlags (Env gbl lcl) where-    extractDynFlags env = hsc_dflags (env_top env)--instance ContainsModule gbl => ContainsModule (Env gbl lcl) where-    extractModule env = extractModule (env_gbl env)---{--************************************************************************-*                                                                      *-                The interface environments-              Used when dealing with IfaceDecls-*                                                                      *-************************************************************************--}--data IfGblEnv-  = IfGblEnv {-        -- Some information about where this environment came from;-        -- useful for debugging.-        if_doc :: SDoc,-        -- The type environment for the module being compiled,-        -- in case the interface refers back to it via a reference that-        -- was originally a hi-boot file.-        -- We need the module name so we can test when it's appropriate-        -- to look in this env.-        -- See Note [Tying the knot] in TcIface-        if_rec_types :: Maybe (Module, IfG TypeEnv)-                -- Allows a read effect, so it can be in a mutable-                -- variable; c.f. handling the external package type env-                -- Nothing => interactive stuff, no loops possible-    }--data IfLclEnv-  = IfLclEnv {-        -- The module for the current IfaceDecl-        -- So if we see   f = \x -> x-        -- it means M.f = \x -> x, where M is the if_mod-        -- NB: This is a semantic module, see-        -- Note [Identity versus semantic module]-        if_mod :: Module,--        -- Whether or not the IfaceDecl came from a boot-        -- file or not; we'll use this to choose between-        -- NoUnfolding and BootUnfolding-        if_boot :: Bool,--        -- The field is used only for error reporting-        -- if (say) there's a Lint error in it-        if_loc :: SDoc,-                -- Where the interface came from:-                --      .hi file, or GHCi state, or ext core-                -- plus which bit is currently being examined--        if_nsubst :: Maybe NameShape,--        -- This field is used to make sure "implicit" declarations-        -- (anything that cannot be exported in mi_exports) get-        -- wired up correctly in typecheckIfacesForMerging.  Most-        -- of the time it's @Nothing@.  See Note [Resolving never-exported Names in TcIface]-        -- in TcIface.-        if_implicits_env :: Maybe TypeEnv,--        if_tv_env  :: FastStringEnv TyVar,     -- Nested tyvar bindings-        if_id_env  :: FastStringEnv Id         -- Nested id binding-    }--{--************************************************************************-*                                                                      *-                Desugarer monad-*                                                                      *-************************************************************************--Now the mondo monad magic (yes, @DsM@ is a silly name)---carry around-a @UniqueSupply@ and some annotations, which-presumably include source-file location information:--}--data DsGblEnv-        = DsGblEnv-        { ds_mod          :: Module             -- For SCC profiling-        , ds_fam_inst_env :: FamInstEnv         -- Like tcg_fam_inst_env-        , ds_unqual  :: PrintUnqualified-        , ds_msgs    :: IORef Messages          -- Warning messages-        , ds_if_env  :: (IfGblEnv, IfLclEnv)    -- Used for looking up global,-                                                -- possibly-imported things-        , ds_complete_matches :: CompleteMatchMap-           -- Additional complete pattern matches-        , ds_cc_st   :: IORef CostCentreState-           -- Tracking indices for cost centre annotations-        }--instance ContainsModule DsGblEnv where-    extractModule = ds_mod--data DsLclEnv = DsLclEnv {-        dsl_meta    :: DsMetaEnv,        -- Template Haskell bindings-        dsl_loc     :: RealSrcSpan,      -- To put in pattern-matching error msgs--        -- See Note [Note [Type and Term Equality Propagation] in Check.hs-        -- These two fields are augmented as we walk inwards,-        -- through each patttern match in turn-        dsl_dicts   :: Bag EvVar,     -- Constraints from GADT pattern-matching-        dsl_tm_cs   :: Bag SimpleEq,  -- Constraints form term-level pattern matching--        dsl_pm_iter :: IORef Int  -- Number of iterations for pmcheck so far-                                  -- We fail if this gets too big-     }---- Inside [| |] brackets, the desugarer looks--- up variables in the DsMetaEnv-type DsMetaEnv = NameEnv DsMetaVal--data DsMetaVal-   = DsBound Id         -- Bound by a pattern inside the [| |].-                        -- Will be dynamically alpha renamed.-                        -- The Id has type THSyntax.Var--   | DsSplice (HsExpr GhcTc) -- These bindings are introduced by-                             -- the PendingSplices on a HsBracketOut---{--************************************************************************-*                                                                      *-                Global typechecker environment-*                                                                      *-************************************************************************--}---- | 'FrontendResult' describes the result of running the--- frontend of a Haskell module.  Usually, you'll get--- a 'FrontendTypecheck', since running the frontend involves--- typechecking a program, but for an hs-boot merge you'll--- just get a ModIface, since no actual typechecking occurred.------ This data type really should be in HscTypes, but it needs--- to have a TcGblEnv which is only defined here.-data FrontendResult-        = FrontendTypecheck TcGblEnv---- Note [Identity versus semantic module]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- When typechecking an hsig file, it is convenient to keep track--- of two different "this module" identifiers:------      - The IDENTITY module is simply thisPackage + the module---        name; i.e. it uniquely *identifies* the interface file---        we're compiling.  For example, p[A=<A>]:A is an---        identity module identifying the requirement named A---        from library p.------      - The SEMANTIC module, which is the actual module that---        this signature is intended to represent (e.g. if---        we have a identity module p[A=base:Data.IORef]:A,---        then the semantic module is base:Data.IORef)------ Which one should you use?------      - In the desugarer and later phases of compilation,---        identity and semantic modules coincide, since we never compile---        signatures (we just generate blank object files for---        hsig files.)------        A corrolary of this is that the following invariant holds at any point---        past desugaring,------            if I have a Module, this_mod, in hand representing the module---            currently being compiled,---            then moduleUnitId this_mod == thisPackage dflags------      - For any code involving Names, we want semantic modules.---        See lookupIfaceTop in IfaceEnv, mkIface and addFingerprints---        in MkIface, and tcLookupGlobal in TcEnv------      - When reading interfaces, we want the identity module to---        identify the specific interface we want (such interfaces---        should never be loaded into the EPS).  However, if a---        hole module <A> is requested, we look for A.hi---        in the home library we are compiling.  (See LoadIface.)---        Similarly, in RnNames we check for self-imports using---        identity modules, to allow signatures to import their implementor.------      - For recompilation avoidance, you want the identity module,---        since that will actually say the specific interface you---        want to track (and recompile if it changes)---- | 'TcGblEnv' describes the top-level of the module at the--- point at which the typechecker is finished work.--- It is this structure that is handed on to the desugarer--- For state that needs to be updated during the typechecking--- phase and returned at end, use a 'TcRef' (= 'IORef').-data TcGblEnv-  = TcGblEnv {-        tcg_mod     :: Module,         -- ^ Module being compiled-        tcg_semantic_mod :: Module,    -- ^ If a signature, the backing module-            -- See also Note [Identity versus semantic module]-        tcg_src     :: HscSource,-          -- ^ What kind of module (regular Haskell, hs-boot, hsig)--        tcg_rdr_env :: GlobalRdrEnv,   -- ^ Top level envt; used during renaming-        tcg_default :: Maybe [Type],-          -- ^ Types used for defaulting. @Nothing@ => no @default@ decl--        tcg_fix_env   :: FixityEnv,     -- ^ Just for things in this module-        tcg_field_env :: RecFieldEnv,   -- ^ Just for things in this module-                                        -- See Note [The interactive package] in HscTypes--        tcg_type_env :: TypeEnv,-          -- ^ Global type env for the module we are compiling now.  All-          -- TyCons and Classes (for this module) end up in here right away,-          -- along with their derived constructors, selectors.-          ---          -- (Ids defined in this module start in the local envt, though they-          --  move to the global envt during zonking)-          ---          -- NB: for what "things in this module" means, see-          -- Note [The interactive package] in HscTypes--        tcg_type_env_var :: TcRef TypeEnv,-                -- Used only to initialise the interface-file-                -- typechecker in initIfaceTcRn, so that it can see stuff-                -- bound in this module when dealing with hi-boot recursions-                -- Updated at intervals (e.g. after dealing with types and classes)--        tcg_inst_env     :: !InstEnv,-          -- ^ Instance envt for all /home-package/ modules;-          -- Includes the dfuns in tcg_insts-          -- NB. BangPattern is to fix a leak, see #15111-        tcg_fam_inst_env :: !FamInstEnv, -- ^ Ditto for family instances-          -- NB. BangPattern is to fix a leak, see #15111-        tcg_ann_env      :: AnnEnv,     -- ^ And for annotations--                -- Now a bunch of things about this module that are simply-                -- accumulated, but never consulted until the end.-                -- Nevertheless, it's convenient to accumulate them along-                -- with the rest of the info from this module.-        tcg_exports :: [AvailInfo],     -- ^ What is exported-        tcg_imports :: ImportAvails,-          -- ^ Information about what was imported from where, including-          -- things bound in this module. Also store Safe Haskell info-          -- here about transitive trusted package requirements.-          ---          -- There are not many uses of this field, so you can grep for-          -- all them.-          ---          -- The ImportAvails records information about the following-          -- things:-          ---          --    1. All of the modules you directly imported (tcRnImports)-          --    2. The orphans (only!) of all imported modules in a GHCi-          --       session (runTcInteractive)-          --    3. The module that instantiated a signature-          --    4. Each of the signatures that merged in-          ---          -- It is used in the following ways:-          --    - imp_orphs is used to determine what orphan modules should be-          --      visible in the context (tcVisibleOrphanMods)-          --    - imp_finsts is used to determine what family instances should-          --      be visible (tcExtendLocalFamInstEnv)-          --    - To resolve the meaning of the export list of a module-          --      (tcRnExports)-          --    - imp_mods is used to compute usage info (mkIfaceTc, deSugar)-          --    - imp_trust_own_pkg is used for Safe Haskell in interfaces-          --      (mkIfaceTc, as well as in HscMain)-          --    - To create the Dependencies field in interface (mkDependencies)--        tcg_dus       :: DefUses,   -- ^ What is defined in this module and what is used.-        tcg_used_gres :: TcRef [GlobalRdrElt],  -- ^ Records occurrences of imported entities-          -- One entry for each occurrence; but may have different GREs for-          -- the same Name See Note [Tracking unused binding and imports]--        tcg_keep :: TcRef NameSet,-          -- ^ Locally-defined top-level names to keep alive.-          ---          -- "Keep alive" means give them an Exported flag, so that the-          -- simplifier does not discard them as dead code, and so that they-          -- are exposed in the interface file (but not to export to the-          -- user).-          ---          -- Some things, like dict-fun Ids and default-method Ids are "born"-          -- with the Exported flag on, for exactly the above reason, but some-          -- we only discover as we go.  Specifically:-          ---          --   * The to/from functions for generic data types-          ---          --   * Top-level variables appearing free in the RHS of an orphan-          --     rule-          ---          --   * Top-level variables appearing free in a TH bracket--        tcg_th_used :: TcRef Bool,-          -- ^ @True@ <=> Template Haskell syntax used.-          ---          -- We need this so that we can generate a dependency on the-          -- Template Haskell package, because the desugarer is going-          -- to emit loads of references to TH symbols.  The reference-          -- is implicit rather than explicit, so we have to zap a-          -- mutable variable.--        tcg_th_splice_used :: TcRef Bool,-          -- ^ @True@ <=> A Template Haskell splice was used.-          ---          -- Splices disable recompilation avoidance (see #481)--        tcg_th_top_level_locs :: TcRef (Set RealSrcSpan),-          -- ^ Locations of the top-level splices; used for providing details on-          -- scope in error messages for out-of-scope variables--        tcg_dfun_n  :: TcRef OccSet,-          -- ^ Allows us to choose unique DFun names.--        tcg_merged :: [(Module, Fingerprint)],-          -- ^ The requirements we merged with; we always have to recompile-          -- if any of these changed.--        -- The next fields accumulate the payload of the module-        -- The binds, rules and foreign-decl fields are collected-        -- initially in un-zonked form and are finally zonked in tcRnSrcDecls--        tcg_rn_exports :: Maybe [(Located (IE GhcRn), Avails)],-                -- Nothing <=> no explicit export list-                -- Is always Nothing if we don't want to retain renamed-                -- exports.-                -- If present contains each renamed export list item-                -- together with its exported names.--        tcg_rn_imports :: [LImportDecl GhcRn],-                -- Keep the renamed imports regardless.  They are not-                -- voluminous and are needed if you want to report unused imports--        tcg_rn_decls :: Maybe (HsGroup GhcRn),-          -- ^ Renamed decls, maybe.  @Nothing@ <=> Don't retain renamed-          -- decls.--        tcg_dependent_files :: TcRef [FilePath], -- ^ dependencies from addDependentFile--        tcg_th_topdecls :: TcRef [LHsDecl GhcPs],-        -- ^ Top-level declarations from addTopDecls--        tcg_th_foreign_files :: TcRef [(ForeignSrcLang, FilePath)],-        -- ^ Foreign files emitted from TH.--        tcg_th_topnames :: TcRef NameSet,-        -- ^ Exact names bound in top-level declarations in tcg_th_topdecls--        tcg_th_modfinalizers :: TcRef [(TcLclEnv, ThModFinalizers)],-        -- ^ Template Haskell module finalizers.-        ---        -- They can use particular local environments.--        tcg_th_coreplugins :: TcRef [String],-        -- ^ Core plugins added by Template Haskell code.--        tcg_th_state :: TcRef (Map TypeRep Dynamic),-        tcg_th_remote_state :: TcRef (Maybe (ForeignRef (IORef QState))),-        -- ^ Template Haskell state--        tcg_ev_binds  :: Bag EvBind,        -- Top-level evidence bindings--        -- Things defined in this module, or (in GHCi)-        -- in the declarations for a single GHCi command.-        -- For the latter, see Note [The interactive package] in HscTypes-        tcg_tr_module :: Maybe Id,   -- Id for $trModule :: GHC.Types.Module-                                             -- for which every module has a top-level defn-                                             -- except in GHCi in which case we have Nothing-        tcg_binds     :: LHsBinds GhcTc,     -- Value bindings in this module-        tcg_sigs      :: NameSet,            -- ...Top-level names that *lack* a signature-        tcg_imp_specs :: [LTcSpecPrag],      -- ...SPECIALISE prags for imported Ids-        tcg_warns     :: Warnings,           -- ...Warnings and deprecations-        tcg_anns      :: [Annotation],       -- ...Annotations-        tcg_tcs       :: [TyCon],            -- ...TyCons and Classes-        tcg_insts     :: [ClsInst],          -- ...Instances-        tcg_fam_insts :: [FamInst],          -- ...Family instances-        tcg_rules     :: [LRuleDecl GhcTc],  -- ...Rules-        tcg_fords     :: [LForeignDecl GhcTc], -- ...Foreign import & exports-        tcg_patsyns   :: [PatSyn],            -- ...Pattern synonyms--        tcg_doc_hdr   :: Maybe LHsDocString, -- ^ Maybe Haddock header docs-        tcg_hpc       :: !AnyHpcUsage,       -- ^ @True@ if any part of the-                                             --  prog uses hpc instrumentation.-           -- NB. BangPattern is to fix a leak, see #15111--        tcg_self_boot :: SelfBootInfo,       -- ^ Whether this module has a-                                             -- corresponding hi-boot file--        tcg_main      :: Maybe Name,         -- ^ The Name of the main-                                             -- function, if this module is-                                             -- the main module.--        tcg_safeInfer :: TcRef (Bool, WarningMessages),-        -- ^ Has the typechecker inferred this module as -XSafe (Safe Haskell)-        -- See Note [Safe Haskell Overlapping Instances Implementation],-        -- although this is used for more than just that failure case.--        tcg_tc_plugins :: [TcPluginSolver],-        -- ^ A list of user-defined plugins for the constraint solver.--        tcg_top_loc :: RealSrcSpan,-        -- ^ The RealSrcSpan this module came from--        tcg_static_wc :: TcRef WantedConstraints,-          -- ^ Wanted constraints of static forms.-        -- See Note [Constraints in static forms].-        tcg_complete_matches :: [CompleteMatch],--        -- ^ Tracking indices for cost centre annotations-        tcg_cc_st   :: TcRef CostCentreState-    }---- NB: topModIdentity, not topModSemantic!--- Definition sites of orphan identities will be identity modules, not semantic--- modules.---- Note [Constraints in static forms]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ When a static form produces constraints like------ f :: StaticPtr (Bool -> String)--- f = static show------ we collect them in tcg_static_wc and resolve them at the end--- of type checking. They need to be resolved separately because--- we don't want to resolve them in the context of the enclosing--- expression. Consider------ g :: Show a => StaticPtr (a -> String)--- g = static show------ If the @Show a0@ constraint that the body of the static form produces was--- resolved in the context of the enclosing expression, then the body of the--- static form wouldn't be closed because the Show dictionary would come from--- g's context instead of coming from the top level.--tcVisibleOrphanMods :: TcGblEnv -> ModuleSet-tcVisibleOrphanMods tcg_env-    = mkModuleSet (tcg_mod tcg_env : imp_orphs (tcg_imports tcg_env))--instance ContainsModule TcGblEnv where-    extractModule env = tcg_semantic_mod env--type RecFieldEnv = NameEnv [FieldLabel]-        -- Maps a constructor name *in this module*-        -- to the fields for that constructor.-        -- This is used when dealing with ".." notation in record-        -- construction and pattern matching.-        -- The FieldEnv deals *only* with constructors defined in *this*-        -- module.  For imported modules, we get the same info from the-        -- TypeEnv--data SelfBootInfo-  = NoSelfBoot    -- No corresponding hi-boot file-  | SelfBoot-       { sb_mds :: ModDetails   -- There was a hi-boot file,-       , sb_tcs :: NameSet }    -- defining these TyCons,--- What is sb_tcs used for?  See Note [Extra dependencies from .hs-boot files]--- in RnSource---{- Note [Tracking unused binding and imports]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We gather two sorts of usage information-- * tcg_dus (defs/uses)-      Records *defined* Names (local, top-level)-          and *used*    Names (local or imported)--      Used (a) to report "defined but not used"-               (see RnNames.reportUnusedNames)-           (b) to generate version-tracking usage info in interface-               files (see MkIface.mkUsedNames)-   This usage info is mainly gathered by the renamer's-   gathering of free-variables-- * tcg_used_gres-      Used only to report unused import declarations--      Records each *occurrence* an *imported* (not locally-defined) entity.-      The occurrence is recorded by keeping a GlobalRdrElt for it.-      These is not the GRE that is in the GlobalRdrEnv; rather it-      is recorded *after* the filtering done by pickGREs.  So it reflect-      /how that occurrence is in scope/.   See Note [GRE filtering] in-      RdrName.---************************************************************************-*                                                                      *-                The local typechecker environment-*                                                                      *-************************************************************************--Note [The Global-Env/Local-Env story]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-During type checking, we keep in the tcg_type_env-        * All types and classes-        * All Ids derived from types and classes (constructors, selectors)--At the end of type checking, we zonk the local bindings,-and as we do so we add to the tcg_type_env-        * Locally defined top-level Ids--Why?  Because they are now Ids not TcIds.  This final GlobalEnv is-        a) fed back (via the knot) to typechecking the-           unfoldings of interface signatures-        b) used in the ModDetails of this module--}--data TcLclEnv           -- Changes as we move inside an expression-                        -- Discarded after typecheck/rename; not passed on to desugarer-  = TcLclEnv {-        tcl_loc        :: RealSrcSpan,     -- Source span-        tcl_ctxt       :: [ErrCtxt],       -- Error context, innermost on top-        tcl_tclvl      :: TcLevel,         -- Birthplace for new unification variables--        tcl_th_ctxt    :: ThStage,         -- Template Haskell context-        tcl_th_bndrs   :: ThBindEnv,       -- and binder info-            -- The ThBindEnv records the TH binding level of in-scope Names-            -- defined in this module (not imported)-            -- We can't put this info in the TypeEnv because it's needed-            -- (and extended) in the renamer, for untyed splices--        tcl_arrow_ctxt :: ArrowCtxt,       -- Arrow-notation context--        tcl_rdr :: LocalRdrEnv,         -- Local name envt-                -- Maintained during renaming, of course, but also during-                -- type checking, solely so that when renaming a Template-Haskell-                -- splice we have the right environment for the renamer.-                ---                --   Does *not* include global name envt; may shadow it-                --   Includes both ordinary variables and type variables;-                --   they are kept distinct because tyvar have a different-                --   occurrence constructor (Name.TvOcc)-                -- We still need the unsullied global name env so that-                --   we can look up record field names--        tcl_env  :: TcTypeEnv,    -- The local type environment:-                                  -- Ids and TyVars defined in this module--        tcl_bndrs :: TcBinderStack,   -- Used for reporting relevant bindings,-                                      -- and for tidying types--        tcl_tyvars :: TcRef TcTyVarSet, -- The "global tyvars"-                        -- Namely, the in-scope TyVars bound in tcl_env,-                        -- plus the tyvars mentioned in the types of Ids bound-                        -- in tcl_lenv.-                        -- Why mutable? see notes with tcGetGlobalTyCoVars--        tcl_lie  :: TcRef WantedConstraints,    -- Place to accumulate type constraints-        tcl_errs :: TcRef Messages              -- Place to accumulate errors-    }--type ErrCtxt = (Bool, TidyEnv -> TcM (TidyEnv, MsgDoc))-        -- Monadic so that we have a chance-        -- to deal with bound type variables just before error-        -- message construction--        -- Bool:  True <=> this is a landmark context; do not-        --                 discard it when trimming for display--type TcTypeEnv = NameEnv TcTyThing--type ThBindEnv = NameEnv (TopLevelFlag, ThLevel)-   -- Domain = all Ids bound in this module (ie not imported)-   -- The TopLevelFlag tells if the binding is syntactically top level.-   -- We need to know this, because the cross-stage persistence story allows-   -- cross-stage at arbitrary types if the Id is bound at top level.-   ---   -- Nota bene: a ThLevel of 'outerLevel' is *not* the same as being-   -- bound at top level!  See Note [Template Haskell levels] in TcSplice--{- Note [Given Insts]-   ~~~~~~~~~~~~~~~~~~-Because of GADTs, we have to pass inwards the Insts provided by type signatures-and existential contexts. Consider-        data T a where { T1 :: b -> b -> T [b] }-        f :: Eq a => T a -> Bool-        f (T1 x y) = [x]==[y]--The constructor T1 binds an existential variable 'b', and we need Eq [b].-Well, we have it, because Eq a refines to Eq [b], but we can only spot that if we-pass it inwards.---}---- | Type alias for 'IORef'; the convention is we'll use this for mutable--- bits of data in 'TcGblEnv' which are updated during typechecking and--- returned at the end.-type TcRef a     = IORef a--- ToDo: when should I refer to it as a 'TcId' instead of an 'Id'?-type TcId        = Id-type TcIdSet     = IdSet-------------------------------- The TcBinderStack------------------------------type TcBinderStack = [TcBinder]-   -- This is a stack of locally-bound ids and tyvars,-   --   innermost on top-   -- Used only in error reporting (relevantBindings in TcError),-   --   and in tidying-   -- We can't use the tcl_env type environment, because it doesn't-   --   keep track of the nesting order--data TcBinder-  = TcIdBndr-       TcId-       TopLevelFlag    -- Tells whether the binding is syntactically top-level-                       -- (The monomorphic Ids for a recursive group count-                       --  as not-top-level for this purpose.)--  | TcIdBndr_ExpType  -- Variant that allows the type to be specified as-                      -- an ExpType-       Name-       ExpType-       TopLevelFlag--  | TcTvBndr          -- e.g.   case x of P (y::a) -> blah-       Name           -- We bind the lexical name "a" to the type of y,-       TyVar          -- which might be an utterly different (perhaps-                      -- existential) tyvar--instance Outputable TcBinder where-   ppr (TcIdBndr id top_lvl)           = ppr id <> brackets (ppr top_lvl)-   ppr (TcIdBndr_ExpType id _ top_lvl) = ppr id <> brackets (ppr top_lvl)-   ppr (TcTvBndr name tv)              = ppr name <+> ppr tv--instance HasOccName TcBinder where-    occName (TcIdBndr id _)             = occName (idName id)-    occName (TcIdBndr_ExpType name _ _) = occName name-    occName (TcTvBndr name _)           = occName name---- fixes #12177--- Builds up a list of bindings whose OccName has not been seen before--- i.e., If    ys  = removeBindingShadowing xs--- then---  - ys is obtained from xs by deleting some elements---  - ys has no duplicate OccNames---  - The first duplicated OccName in xs is retained in ys--- Overloaded so that it can be used for both GlobalRdrElt in typed-hole--- substitutions and TcBinder when looking for relevant bindings.-removeBindingShadowing :: HasOccName a => [a] -> [a]-removeBindingShadowing bindings = reverse $ fst $ foldl-    (\(bindingAcc, seenNames) binding ->-    if occName binding `elemOccSet` seenNames -- if we've seen it-        then (bindingAcc, seenNames)              -- skip it-        else (binding:bindingAcc, extendOccSet seenNames (occName binding)))-    ([], emptyOccSet) bindings-------------------------------- Template Haskell stages and levels------------------------------data SpliceType = Typed | Untyped--data ThStage    -- See Note [Template Haskell state diagram] in TcSplice-  = Splice SpliceType -- Inside a top-level splice-                      -- This code will be run *at compile time*;-                      --   the result replaces the splice-                      -- Binding level = 0--  | RunSplice (TcRef [ForeignRef (TH.Q ())])-      -- Set when running a splice, i.e. NOT when renaming or typechecking the-      -- Haskell code for the splice. See Note [RunSplice ThLevel].-      ---      -- Contains a list of mod finalizers collected while executing the splice.-      ---      -- 'addModFinalizer' inserts finalizers here, and from here they are taken-      -- to construct an @HsSpliced@ annotation for untyped splices. See Note-      -- [Delaying modFinalizers in untyped splices] in "RnSplice".-      ---      -- For typed splices, the typechecker takes finalizers from here and-      -- inserts them in the list of finalizers in the global environment.-      ---      -- See Note [Collecting modFinalizers in typed splices] in "TcSplice".--  | Comp        -- Ordinary Haskell code-                -- Binding level = 1--  | Brack                       -- Inside brackets-      ThStage                   --   Enclosing stage-      PendingStuff--data PendingStuff-  = RnPendingUntyped              -- Renaming the inside of an *untyped* bracket-      (TcRef [PendingRnSplice])   -- Pending splices in here--  | RnPendingTyped                -- Renaming the inside of a *typed* bracket--  | TcPending                     -- Typechecking the inside of a typed bracket-      (TcRef [PendingTcSplice])   --   Accumulate pending splices here-      (TcRef WantedConstraints)   --     and type constraints here--topStage, topAnnStage, topSpliceStage :: ThStage-topStage       = Comp-topAnnStage    = Splice Untyped-topSpliceStage = Splice Untyped--instance Outputable ThStage where-   ppr (Splice _)    = text "Splice"-   ppr (RunSplice _) = text "RunSplice"-   ppr Comp          = text "Comp"-   ppr (Brack s _)   = text "Brack" <> parens (ppr s)--type ThLevel = Int-    -- NB: see Note [Template Haskell levels] in TcSplice-    -- Incremented when going inside a bracket,-    -- decremented when going inside a splice-    -- NB: ThLevel is one greater than the 'n' in Fig 2 of the-    --     original "Template meta-programming for Haskell" paper--impLevel, outerLevel :: ThLevel-impLevel = 0    -- Imported things; they can be used inside a top level splice-outerLevel = 1  -- Things defined outside brackets--thLevel :: ThStage -> ThLevel-thLevel (Splice _)    = 0-thLevel (RunSplice _) =-    -- See Note [RunSplice ThLevel].-    panic "thLevel: called when running a splice"-thLevel Comp          = 1-thLevel (Brack s _)   = thLevel s + 1--{- Node [RunSplice ThLevel]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The 'RunSplice' stage is set when executing a splice, and only when running a-splice. In particular it is not set when the splice is renamed or typechecked.--'RunSplice' is needed to provide a reference where 'addModFinalizer' can insert-the finalizer (see Note [Delaying modFinalizers in untyped splices]), and-'addModFinalizer' runs when doing Q things. Therefore, It doesn't make sense to-set 'RunSplice' when renaming or typechecking the splice, where 'Splice', -'Brack' or 'Comp' are used instead.---}-------------------------------- Arrow-notation context------------------------------{- Note [Escaping the arrow scope]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In arrow notation, a variable bound by a proc (or enclosed let/kappa)-is not in scope to the left of an arrow tail (-<) or the head of (|..|).-For example--        proc x -> (e1 -< e2)--Here, x is not in scope in e1, but it is in scope in e2.  This can get-a bit complicated:--        let x = 3 in-        proc y -> (proc z -> e1) -< e2--Here, x and z are in scope in e1, but y is not.--We implement this by-recording the environment when passing a proc (using newArrowScope),-and returning to that (using escapeArrowScope) on the left of -< and the-head of (|..|).--All this can be dealt with by the *renamer*. But the type checker needs-to be involved too.  Example (arrowfail001)-  class Foo a where foo :: a -> ()-  data Bar = forall a. Foo a => Bar a-  get :: Bar -> ()-  get = proc x -> case x of Bar a -> foo -< a-Here the call of 'foo' gives rise to a (Foo a) constraint that should not-be captured by the pattern match on 'Bar'.  Rather it should join the-constraints from further out.  So we must capture the constraint bag-from further out in the ArrowCtxt that we push inwards.--}--data ArrowCtxt   -- Note [Escaping the arrow scope]-  = NoArrowCtxt-  | ArrowCtxt LocalRdrEnv (TcRef WantedConstraints)--------------------------------- TcTyThing-------------------------------- | A typecheckable thing available in a local context.  Could be--- 'AGlobal' 'TyThing', but also lexically scoped variables, etc.--- See 'TcEnv' for how to retrieve a 'TyThing' given a 'Name'.-data TcTyThing-  = AGlobal TyThing             -- Used only in the return type of a lookup--  | ATcId           -- Ids defined in this module; may not be fully zonked-      { tct_id   :: TcId-      , tct_info :: IdBindingInfo   -- See Note [Meaning of IdBindingInfo]-      }--  | ATyVar  Name TcTyVar   -- See Note [Type variables in the type environment]--  | ATcTyCon TyCon   -- Used temporarily, during kind checking, for the-                     -- tycons and clases in this recursive group-                     -- The TyCon is always a TcTyCon.  Its kind-                     -- can be a mono-kind or a poly-kind; in TcTyClsDcls see-                     -- Note [Type checking recursive type and class declarations]--  | APromotionErr PromotionErr--data PromotionErr-  = TyConPE          -- TyCon used in a kind before we are ready-                     --     data T :: T -> * where ...-  | ClassPE          -- Ditto Class--  | FamDataConPE     -- Data constructor for a data family-                     -- See Note [AFamDataCon: not promoting data family constructors]-                     -- in TcEnv.-  | ConstrainedDataConPE PredType-                     -- Data constructor with a non-equality context-                     -- See Note [Don't promote data constructors with-                     --           non-equality contexts] in TcHsType-  | PatSynPE         -- Pattern synonyms-                     -- See Note [Don't promote pattern synonyms] in TcEnv--  | PatSynExPE       -- Pattern synonym existential type variable-                     -- See Note [Pattern synonym existentials do not scope] in TcPatSyn--  | RecDataConPE     -- Data constructor in a recursive loop-                     -- See Note [Recursion and promoting data constructors] in TcTyClsDecls-  | NoDataKindsTC    -- -XDataKinds not enabled (for a tycon)-  | NoDataKindsDC    -- -XDataKinds not enabled (for a datacon)--instance Outputable TcTyThing where     -- Debugging only-   ppr (AGlobal g)      = ppr g-   ppr elt@(ATcId {})   = text "Identifier" <>-                          brackets (ppr (tct_id elt) <> dcolon-                                 <> ppr (varType (tct_id elt)) <> comma-                                 <+> ppr (tct_info elt))-   ppr (ATyVar n tv)    = text "Type variable" <+> quotes (ppr n) <+> equals <+> ppr tv-                            <+> dcolon <+> ppr (varType tv)-   ppr (ATcTyCon tc)    = text "ATcTyCon" <+> ppr tc <+> dcolon <+> ppr (tyConKind tc)-   ppr (APromotionErr err) = text "APromotionErr" <+> ppr err---- | IdBindingInfo describes how an Id is bound.------ It is used for the following purposes:--- a) for static forms in TcExpr.checkClosedInStaticForm and--- b) to figure out when a nested binding can be generalised,---    in TcBinds.decideGeneralisationPlan.----data IdBindingInfo -- See Note [Meaning of IdBindingInfo and ClosedTypeId]-    = NotLetBound-    | ClosedLet-    | NonClosedLet-         RhsNames        -- Used for (static e) checks only-         ClosedTypeId    -- Used for generalisation checks-                         -- and for (static e) checks---- | IsGroupClosed describes a group of mutually-recursive bindings-data IsGroupClosed-  = IsGroupClosed-      (NameEnv RhsNames)  -- Free var info for the RHS of each binding in the goup-                          -- Used only for (static e) checks--      ClosedTypeId        -- True <=> all the free vars of the group are-                          --          imported or ClosedLet or-                          --          NonClosedLet with ClosedTypeId=True.-                          --          In particular, no tyvars, no NotLetBound--type RhsNames = NameSet   -- Names of variables, mentioned on the RHS of-                          -- a definition, that are not Global or ClosedLet--type ClosedTypeId = Bool-  -- See Note [Meaning of IdBindingInfo and ClosedTypeId]--{- Note [Meaning of IdBindingInfo]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-NotLetBound means that-  the Id is not let-bound (e.g. it is bound in a-  lambda-abstraction or in a case pattern)--ClosedLet means that-   - The Id is let-bound,-   - Any free term variables are also Global or ClosedLet-   - Its type has no free variables (NB: a top-level binding subject-     to the MR might have free vars in its type)-   These ClosedLets can definitely be floated to top level; and we-   may need to do so for static forms.--   Property:   ClosedLet-             is equivalent to-               NonClosedLet emptyNameSet True--(NonClosedLet (fvs::RhsNames) (cl::ClosedTypeId)) means that-   - The Id is let-bound--   - The fvs::RhsNames contains the free names of the RHS,-     excluding Global and ClosedLet ones.--   - For the ClosedTypeId field see Note [Bindings with closed types]--For (static e) to be valid, we need for every 'x' free in 'e',-that x's binding is floatable to the top level.  Specifically:-   * x's RhsNames must be empty-   * x's type has no free variables-See Note [Grand plan for static forms] in StaticPtrTable.hs.-This test is made in TcExpr.checkClosedInStaticForm.-Actually knowing x's RhsNames (rather than just its emptiness-or otherwise) is just so we can produce better error messages--Note [Bindings with closed types: ClosedTypeId]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--  f x = let g ys = map not ys-        in ...--Can we generalise 'g' under the OutsideIn algorithm?  Yes,-because all g's free variables are top-level; that is they themselves-have no free type variables, and it is the type variables in the-environment that makes things tricky for OutsideIn generalisation.--Here's the invariant:-   If an Id has ClosedTypeId=True (in its IdBindingInfo), then-   the Id's type is /definitely/ closed (has no free type variables).-   Specifically,-       a) The Id's acutal type is closed (has no free tyvars)-       b) Either the Id has a (closed) user-supplied type signature-          or all its free variables are Global/ClosedLet-             or NonClosedLet with ClosedTypeId=True.-          In particular, none are NotLetBound.--Why is (b) needed?   Consider-    \x. (x :: Int, let y = x+1 in ...)-Initially x::alpha.  If we happen to typecheck the 'let' before the-(x::Int), y's type will have a free tyvar; but if the other way round-it won't.  So we treat any let-bound variable with a free-non-let-bound variable as not ClosedTypeId, regardless of what the-free vars of its type actually are.--But if it has a signature, all is well:-   \x. ...(let { y::Int; y = x+1 } in-           let { v = y+2 } in ...)...-Here the signature on 'v' makes 'y' a ClosedTypeId, so we can-generalise 'v'.--Note that:--  * A top-level binding may not have ClosedTypeId=True, if it suffers-    from the MR--  * A nested binding may be closed (eg 'g' in the example we started-    with). Indeed, that's the point; whether a function is defined at-    top level or nested is orthogonal to the question of whether or-    not it is closed.--  * A binding may be non-closed because it mentions a lexically scoped-    *type variable*  Eg-        f :: forall a. blah-        f x = let g y = ...(y::a)...--Under OutsideIn we are free to generalise an Id all of whose free-variables have ClosedTypeId=True (or imported).  This is an extension-compared to the JFP paper on OutsideIn, which used "top-level" as a-proxy for "closed".  (It's not a good proxy anyway -- the MR can make-a top-level binding with a free type variable.)--Note [Type variables in the type environment]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The type environment has a binding for each lexically-scoped-type variable that is in scope.  For example--  f :: forall a. a -> a-  f x = (x :: a)--  g1 :: [a] -> a-  g1 (ys :: [b]) = head ys :: b--  g2 :: [Int] -> Int-  g2 (ys :: [c]) = head ys :: c--* The forall'd variable 'a' in the signature scopes over f's RHS.--* The pattern-bound type variable 'b' in 'g1' scopes over g1's-  RHS; note that it is bound to a skolem 'a' which is not itself-  lexically in scope.--* The pattern-bound type variable 'c' in 'g2' is bound to-  Int; that is, pattern-bound type variables can stand for-  arbitrary types. (see-    GHC proposal #128 "Allow ScopedTypeVariables to refer to types"-    https://github.com/ghc-proposals/ghc-proposals/pull/128,-  and the paper-    "Type variables in patterns", Haskell Symposium 2018.---This is implemented by the constructor-   ATyVar Name TcTyVar-in the type environment.--* The Name is the name of the original, lexically scoped type-  variable--* The TcTyVar is sometimes a skolem (like in 'f'), and sometimes-  a unification variable (like in 'g1', 'g2').  We never zonk the-  type environment so in the latter case it always stays as a-  unification variable, although that variable may be later-  unified with a type (such as Int in 'g2').--}--instance Outputable IdBindingInfo where-  ppr NotLetBound = text "NotLetBound"-  ppr ClosedLet = text "TopLevelLet"-  ppr (NonClosedLet fvs closed_type) =-    text "TopLevelLet" <+> ppr fvs <+> ppr closed_type--instance Outputable PromotionErr where-  ppr ClassPE                     = text "ClassPE"-  ppr TyConPE                     = text "TyConPE"-  ppr PatSynPE                    = text "PatSynPE"-  ppr PatSynExPE                  = text "PatSynExPE"-  ppr FamDataConPE                = text "FamDataConPE"-  ppr (ConstrainedDataConPE pred) = text "ConstrainedDataConPE"-                                      <+> parens (ppr pred)-  ppr RecDataConPE                = text "RecDataConPE"-  ppr NoDataKindsTC               = text "NoDataKindsTC"-  ppr NoDataKindsDC               = text "NoDataKindsDC"--pprTcTyThingCategory :: TcTyThing -> SDoc-pprTcTyThingCategory (AGlobal thing)    = pprTyThingCategory thing-pprTcTyThingCategory (ATyVar {})        = text "Type variable"-pprTcTyThingCategory (ATcId {})         = text "Local identifier"-pprTcTyThingCategory (ATcTyCon {})     = text "Local tycon"-pprTcTyThingCategory (APromotionErr pe) = pprPECategory pe--pprPECategory :: PromotionErr -> SDoc-pprPECategory ClassPE                = text "Class"-pprPECategory TyConPE                = text "Type constructor"-pprPECategory PatSynPE               = text "Pattern synonym"-pprPECategory PatSynExPE             = text "Pattern synonym existential"-pprPECategory FamDataConPE           = text "Data constructor"-pprPECategory ConstrainedDataConPE{} = text "Data constructor"-pprPECategory RecDataConPE           = text "Data constructor"-pprPECategory NoDataKindsTC          = text "Type constructor"-pprPECategory NoDataKindsDC          = text "Data constructor"--{--************************************************************************-*                                                                      *-        Operations over ImportAvails-*                                                                      *-************************************************************************--}---- | 'ImportAvails' summarises what was imported from where, irrespective of--- whether the imported things are actually used or not.  It is used:------  * when processing the export list,------  * when constructing usage info for the interface file,------  * to identify the list of directly imported modules for initialisation---    purposes and for optimised overlap checking of family instances,------  * when figuring out what things are really unused----data ImportAvails-   = ImportAvails {-        imp_mods :: ImportedMods,-          --      = ModuleEnv [ImportedModsVal],-          -- ^ Domain is all directly-imported modules-          ---          -- See the documentation on ImportedModsVal in HscTypes for the-          -- meaning of the fields.-          ---          -- We need a full ModuleEnv rather than a ModuleNameEnv here,-          -- because we might be importing modules of the same name from-          -- different packages. (currently not the case, but might be in the-          -- future).--        imp_dep_mods :: ModuleNameEnv (ModuleName, IsBootInterface),-          -- ^ Home-package modules needed by the module being compiled-          ---          -- It doesn't matter whether any of these dependencies-          -- are actually /used/ when compiling the module; they-          -- are listed if they are below it at all.  For-          -- example, suppose M imports A which imports X.  Then-          -- compiling M might not need to consult X.hi, but X-          -- is still listed in M's dependencies.--        imp_dep_pkgs :: Set InstalledUnitId,-          -- ^ Packages needed by the module being compiled, whether directly,-          -- or via other modules in this package, or via modules imported-          -- from other packages.--        imp_trust_pkgs :: Set InstalledUnitId,-          -- ^ This is strictly a subset of imp_dep_pkgs and records the-          -- packages the current module needs to trust for Safe Haskell-          -- compilation to succeed. A package is required to be trusted if-          -- we are dependent on a trustworthy module in that package.-          -- While perhaps making imp_dep_pkgs a tuple of (UnitId, Bool)-          -- where True for the bool indicates the package is required to be-          -- trusted is the more logical  design, doing so complicates a lot-          -- of code not concerned with Safe Haskell.-          -- See Note [RnNames . Tracking Trust Transitively]--        imp_trust_own_pkg :: Bool,-          -- ^ Do we require that our own package is trusted?-          -- This is to handle efficiently the case where a Safe module imports-          -- a Trustworthy module that resides in the same package as it.-          -- See Note [RnNames . Trust Own Package]--        imp_orphs :: [Module],-          -- ^ Orphan modules below us in the import tree (and maybe including-          -- us for imported modules)--        imp_finsts :: [Module]-          -- ^ Family instance modules below us in the import tree (and maybe-          -- including us for imported modules)-      }--mkModDeps :: [(ModuleName, IsBootInterface)]-          -> ModuleNameEnv (ModuleName, IsBootInterface)-mkModDeps deps = foldl' add emptyUFM deps-               where-                 add env elt@(m,_) = addToUFM env m elt--modDepsElts-  :: ModuleNameEnv (ModuleName, IsBootInterface)-  -> [(ModuleName, IsBootInterface)]-modDepsElts = sort . nonDetEltsUFM-  -- It's OK to use nonDetEltsUFM here because sorting by module names-  -- restores determinism--emptyImportAvails :: ImportAvails-emptyImportAvails = ImportAvails { imp_mods          = emptyModuleEnv,-                                   imp_dep_mods      = emptyUFM,-                                   imp_dep_pkgs      = S.empty,-                                   imp_trust_pkgs    = S.empty,-                                   imp_trust_own_pkg = False,-                                   imp_orphs         = [],-                                   imp_finsts        = [] }---- | Union two ImportAvails------ This function is a key part of Import handling, basically--- for each import we create a separate ImportAvails structure--- and then union them all together with this function.-plusImportAvails ::  ImportAvails ->  ImportAvails ->  ImportAvails-plusImportAvails-  (ImportAvails { imp_mods = mods1,-                  imp_dep_mods = dmods1, imp_dep_pkgs = dpkgs1,-                  imp_trust_pkgs = tpkgs1, imp_trust_own_pkg = tself1,-                  imp_orphs = orphs1, imp_finsts = finsts1 })-  (ImportAvails { imp_mods = mods2,-                  imp_dep_mods = dmods2, imp_dep_pkgs = dpkgs2,-                  imp_trust_pkgs = tpkgs2, imp_trust_own_pkg = tself2,-                  imp_orphs = orphs2, imp_finsts = finsts2 })-  = ImportAvails { imp_mods          = plusModuleEnv_C (++) mods1 mods2,-                   imp_dep_mods      = plusUFM_C plus_mod_dep dmods1 dmods2,-                   imp_dep_pkgs      = dpkgs1 `S.union` dpkgs2,-                   imp_trust_pkgs    = tpkgs1 `S.union` tpkgs2,-                   imp_trust_own_pkg = tself1 || tself2,-                   imp_orphs         = orphs1 `unionLists` orphs2,-                   imp_finsts        = finsts1 `unionLists` finsts2 }-  where-    plus_mod_dep r1@(m1, boot1) r2@(m2, boot2)-      | ASSERT2( m1 == m2, (ppr m1 <+> ppr m2) $$ (ppr boot1 <+> ppr boot2) )-        boot1 = r2-      | otherwise = r1-      -- If either side can "see" a non-hi-boot interface, use that-      -- Reusing existing tuples saves 10% of allocations on test-      -- perf/compiler/MultiLayerModules--{--************************************************************************-*                                                                      *-\subsection{Where from}-*                                                                      *-************************************************************************--The @WhereFrom@ type controls where the renamer looks for an interface file--}--data WhereFrom-  = ImportByUser IsBootInterface        -- Ordinary user import (perhaps {-# SOURCE #-})-  | ImportBySystem                      -- Non user import.-  | ImportByPlugin                      -- Importing a plugin;-                                        -- See Note [Care with plugin imports] in LoadIface--instance Outputable WhereFrom where-  ppr (ImportByUser is_boot) | is_boot     = text "{- SOURCE -}"-                             | otherwise   = empty-  ppr ImportBySystem                       = text "{- SYSTEM -}"-  ppr ImportByPlugin                       = text "{- PLUGIN -}"---{- *********************************************************************-*                                                                      *-                Type signatures-*                                                                      *-********************************************************************* -}---- These data types need to be here only because--- TcSimplify uses them, and TcSimplify is fairly--- low down in the module hierarchy--type TcSigFun  = Name -> Maybe TcSigInfo--data TcSigInfo = TcIdSig     TcIdSigInfo-               | TcPatSynSig TcPatSynInfo--data TcIdSigInfo   -- See Note [Complete and partial type signatures]-  = CompleteSig    -- A complete signature with no wildcards,-                   -- so the complete polymorphic type is known.-      { sig_bndr :: TcId          -- The polymorphic Id with that type--      , sig_ctxt :: UserTypeCtxt  -- In the case of type-class default methods,-                                  -- the Name in the FunSigCtxt is not the same-                                  -- as the TcId; the former is 'op', while the-                                  -- latter is '$dmop' or some such--      , sig_loc  :: SrcSpan       -- Location of the type signature-      }--  | PartialSig     -- A partial type signature (i.e. includes one or more-                   -- wildcards). In this case it doesn't make sense to give-                   -- the polymorphic Id, because we are going to /infer/ its-                   -- type, so we can't make the polymorphic Id ab-initio-      { psig_name  :: Name   -- Name of the function; used when report wildcards-      , psig_hs_ty :: LHsSigWcType GhcRn  -- The original partial signature in-                                          -- HsSyn form-      , sig_ctxt   :: UserTypeCtxt-      , sig_loc    :: SrcSpan            -- Location of the type signature-      }---{- Note [Complete and partial type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A type signature is partial when it contains one or more wildcards-(= type holes).  The wildcard can either be:-* A (type) wildcard occurring in sig_theta or sig_tau. These are-  stored in sig_wcs.-      f :: Bool -> _-      g :: Eq _a => _a -> _a -> Bool-* Or an extra-constraints wildcard, stored in sig_cts:-      h :: (Num a, _) => a -> a--A type signature is a complete type signature when there are no-wildcards in the type signature, i.e. iff sig_wcs is empty and-sig_extra_cts is Nothing.--}--data TcIdSigInst-  = TISI { sig_inst_sig :: TcIdSigInfo--         , sig_inst_skols :: [(Name, TcTyVar)]-               -- Instantiated type and kind variables, TyVarTvs-               -- The Name is the Name that the renamer chose;-               --   but the TcTyVar may come from instantiating-               --   the type and hence have a different unique.-               -- No need to keep track of whether they are truly lexically-               --   scoped because the renamer has named them uniquely-               -- See Note [Binding scoped type variables] in TcSigs--         , sig_inst_theta  :: TcThetaType-               -- Instantiated theta.  In the case of a-               -- PartialSig, sig_theta does not include-               -- the extra-constraints wildcard--         , sig_inst_tau :: TcSigmaType   -- Instantiated tau-               -- See Note [sig_inst_tau may be polymorphic]--         -- Relevant for partial signature only-         , sig_inst_wcs   :: [(Name, TcTyVar)]-               -- Like sig_inst_skols, but for wildcards.  The named-               -- wildcards scope over the binding, and hence their-               -- Names may appear in type signatures in the binding--         , sig_inst_wcx   :: Maybe TcType-               -- Extra-constraints wildcard to fill in, if any-               -- If this exists, it is surely of the form (meta_tv |> co)-               -- (where the co might be reflexive). This is filled in-               -- only from the return value of TcHsType.tcWildCardOcc-         }--{- Note [sig_inst_tau may be polymorphic]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Note that "sig_inst_tau" might actually be a polymorphic type,-if the original function had a signature like-   forall a. Eq a => forall b. Ord b => ....-But that's ok: tcMatchesFun (called by tcRhs) can deal with that-It happens, too!  See Note [Polymorphic methods] in TcClassDcl.--Note [Wildcards in partial signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The wildcards in psig_wcs may stand for a type mentioning-the universally-quantified tyvars of psig_ty--E.g.  f :: forall a. _ -> a-      f x = x-We get sig_inst_skols = [a]-       sig_inst_tau   = _22 -> a-       sig_inst_wcs   = [_22]-and _22 in the end is unified with the type 'a'--Moreover the kind of a wildcard in sig_inst_wcs may mention-the universally-quantified tyvars sig_inst_skols-e.g.   f :: t a -> t _-Here we get-   sig_inst_skols = [k:*, (t::k ->*), (a::k)]-   sig_inst_tau   = t a -> t _22-   sig_inst_wcs   = [ _22::k ]--}--data TcPatSynInfo-  = TPSI {-        patsig_name           :: Name,-        patsig_implicit_bndrs :: [TyVarBinder], -- Implicitly-bound kind vars (Inferred) and-                                                -- implicitly-bound type vars (Specified)-          -- See Note [The pattern-synonym signature splitting rule] in TcPatSyn-        patsig_univ_bndrs     :: [TyVar],       -- Bound by explicit user forall-        patsig_req            :: TcThetaType,-        patsig_ex_bndrs       :: [TyVar],       -- Bound by explicit user forall-        patsig_prov           :: TcThetaType,-        patsig_body_ty        :: TcSigmaType-    }--instance Outputable TcSigInfo where-  ppr (TcIdSig     idsi) = ppr idsi-  ppr (TcPatSynSig tpsi) = text "TcPatSynInfo" <+> ppr tpsi--instance Outputable TcIdSigInfo where-    ppr (CompleteSig { sig_bndr = bndr })-        = ppr bndr <+> dcolon <+> ppr (idType bndr)-    ppr (PartialSig { psig_name = name, psig_hs_ty = hs_ty })-        = text "psig" <+> ppr name <+> dcolon <+> ppr hs_ty--instance Outputable TcIdSigInst where-    ppr (TISI { sig_inst_sig = sig, sig_inst_skols = skols-              , sig_inst_theta = theta, sig_inst_tau = tau })-        = hang (ppr sig) 2 (vcat [ ppr skols, ppr theta <+> darrow <+> ppr tau ])--instance Outputable TcPatSynInfo where-    ppr (TPSI{ patsig_name = name}) = ppr name--isPartialSig :: TcIdSigInst -> Bool-isPartialSig (TISI { sig_inst_sig = PartialSig {} }) = True-isPartialSig _                                       = False---- | No signature or a partial signature-hasCompleteSig :: TcSigFun -> Name -> Bool-hasCompleteSig sig_fn name-  = case sig_fn name of-      Just (TcIdSig (CompleteSig {})) -> True-      _                               -> False---{--************************************************************************-*                                                                      *-*                       Canonical constraints                          *-*                                                                      *-*   These are the constraints the low-level simplifier works with      *-*                                                                      *-************************************************************************--}---- The syntax of xi (ξ) types:--- xi ::= a | T xis | xis -> xis | ... | forall a. tau--- Two important notes:---      (i) No type families, unless we are under a ForAll---      (ii) Note that xi types can contain unexpanded type synonyms;---           however, the (transitive) expansions of those type synonyms---           will not contain any type functions, unless we are under a ForAll.--- We enforce the structure of Xi types when we flatten (TcCanonical)--type Xi = Type       -- In many comments, "xi" ranges over Xi--type Cts = Bag Ct--data Ct-  -- Atomic canonical constraints-  = CDictCan {  -- e.g.  Num xi-      cc_ev     :: CtEvidence, -- See Note [Ct/evidence invariant]--      cc_class  :: Class,-      cc_tyargs :: [Xi],   -- cc_tyargs are function-free, hence Xi--      cc_pend_sc :: Bool   -- See Note [The superclass story] in TcCanonical-                           -- True <=> (a) cc_class has superclasses-                           --          (b) we have not (yet) added those-                           --              superclasses as Givens-    }--  | CIrredCan {  -- These stand for yet-unusable predicates-      cc_ev    :: CtEvidence,   -- See Note [Ct/evidence invariant]-      cc_insol :: Bool   -- True  <=> definitely an error, can never be solved-                         -- False <=> might be soluble--        -- For the might-be-soluble case, the ctev_pred of the evidence is-        -- of form   (tv xi1 xi2 ... xin)   with a tyvar at the head-        --      or   (tv1 ~ ty2)   where the CTyEqCan  kind invariant fails-        --      or   (F tys ~ ty)  where the CFunEqCan kind invariant fails-        -- See Note [CIrredCan constraints]--        -- The definitely-insoluble case is for things like-        --    Int ~ Bool      tycons don't match-        --    a ~ [a]         occurs check-    }--  | CTyEqCan {  -- tv ~ rhs-       -- Invariants:-       --   * See Note [Applying the inert substitution] in TcFlatten-       --   * tv not in tvs(rhs)   (occurs check)-       --   * If tv is a TauTv, then rhs has no foralls-       --       (this avoids substituting a forall for the tyvar in other types)-       --   * tcTypeKind ty `tcEqKind` tcTypeKind tv; Note [Ct kind invariant]-       --   * rhs may have at most one top-level cast-       --   * rhs (perhaps under the one cast) is not necessarily function-free,-       --       but it has no top-level function.-       --     E.g. a ~ [F b]  is fine-       --     but  a ~ F b    is not-       --   * If the equality is representational, rhs has no top-level newtype-       --     See Note [No top-level newtypes on RHS of representational-       --     equalities] in TcCanonical-       --   * If rhs (perhaps under the cast) is also a tv, then it is oriented-       --     to give best chance of-       --     unification happening; eg if rhs is touchable then lhs is too-      cc_ev     :: CtEvidence, -- See Note [Ct/evidence invariant]-      cc_tyvar  :: TcTyVar,-      cc_rhs    :: TcType,     -- Not necessarily function-free (hence not Xi)-                               -- See invariants above--      cc_eq_rel :: EqRel       -- INVARIANT: cc_eq_rel = ctEvEqRel cc_ev-    }--  | CFunEqCan {  -- F xis ~ fsk-       -- Invariants:-       --   * isTypeFamilyTyCon cc_fun-       --   * tcTypeKind (F xis) = tyVarKind fsk; Note [Ct kind invariant]-       --   * always Nominal role-      cc_ev     :: CtEvidence,  -- See Note [Ct/evidence invariant]-      cc_fun    :: TyCon,       -- A type function--      cc_tyargs :: [Xi],        -- cc_tyargs are function-free (hence Xi)-        -- Either under-saturated or exactly saturated-        --    *never* over-saturated (because if so-        --    we should have decomposed)--      cc_fsk    :: TcTyVar  -- [G]  always a FlatSkolTv-                            -- [W], [WD], or [D] always a FlatMetaTv-        -- See Note [The flattening story] in TcFlatten-    }--  | CNonCanonical {        -- See Note [NonCanonical Semantics] in TcSMonad-      cc_ev  :: CtEvidence-    }--  | CHoleCan {             -- See Note [Hole constraints]-       -- Treated as an "insoluble" constraint-       -- See Note [Insoluble constraints]-      cc_ev   :: CtEvidence,-      cc_hole :: Hole-    }--  | CQuantCan QCInst       -- A quantified constraint-      -- NB: I expect to make more of the cases in Ct-      --     look like this, with the payload in an-      --     auxiliary type---------------data QCInst  -- A much simplified version of ClsInst-             -- See Note [Quantified constraints] in TcCanonical-  = QCI { qci_ev   :: CtEvidence -- Always of type forall tvs. context => ty-                                 -- Always Given-        , qci_tvs  :: [TcTyVar]  -- The tvs-        , qci_pred :: TcPredType -- The ty-        , qci_pend_sc :: Bool    -- Same as cc_pend_sc flag in CDictCan-                                 -- Invariant: True => qci_pred is a ClassPred-    }--instance Outputable QCInst where-  ppr (QCI { qci_ev = ev }) = ppr ev----------------- | An expression or type hole-data Hole = ExprHole UnboundVar-            -- ^ Either an out-of-scope variable or a "true" hole in an-            -- expression (TypedHoles)-          | TypeHole OccName-            -- ^ A hole in a type (PartialTypeSignatures)--instance Outputable Hole where-  ppr (ExprHole ub)  = ppr ub-  ppr (TypeHole occ) = text "TypeHole" <> parens (ppr occ)--holeOcc :: Hole -> OccName-holeOcc (ExprHole uv)  = unboundVarOcc uv-holeOcc (TypeHole occ) = occ--{- Note [Hole constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~-CHoleCan constraints are used for two kinds of holes,-distinguished by cc_hole:--  * For holes in expressions (including variables not in scope)-    e.g.   f x = g _ x--  * For holes in type signatures-    e.g.   f :: _ -> _-           f x = [x,True]--Note [CIrredCan constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-CIrredCan constraints are used for constraints that are "stuck"-   - we can't solve them (yet)-   - we can't use them to solve other constraints-   - but they may become soluble if we substitute for some-     of the type variables in the constraint--Example 1:  (c Int), where c :: * -> Constraint.  We can't do anything-            with this yet, but if later c := Num, *then* we can solve it--Example 2:  a ~ b, where a :: *, b :: k, where k is a kind variable-            We don't want to use this to substitute 'b' for 'a', in case-            'k' is subsequently unifed with (say) *->*, because then-            we'd have ill-kinded types floating about.  Rather we want-            to defer using the equality altogether until 'k' get resolved.--Note [Ct/evidence invariant]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If  ct :: Ct, then extra fields of 'ct' cache precisely the ctev_pred field-of (cc_ev ct), and is fully rewritten wrt the substitution.   Eg for CDictCan,-   ctev_pred (cc_ev ct) = (cc_class ct) (cc_tyargs ct)-This holds by construction; look at the unique place where CDictCan is-built (in TcCanonical).--In contrast, the type of the evidence *term* (ctev_dest / ctev_evar) in-the evidence may *not* be fully zonked; we are careful not to look at it-during constraint solving. See Note [Evidence field of CtEvidence].--Note [Ct kind invariant]-~~~~~~~~~~~~~~~~~~~~~~~~-CTyEqCan and CFunEqCan both require that the kind of the lhs matches the kind-of the rhs. This is necessary because both constraints are used for substitutions-during solving. If the kinds differed, then the substitution would take a well-kinded-type to an ill-kinded one.---}--mkNonCanonical :: CtEvidence -> Ct-mkNonCanonical ev = CNonCanonical { cc_ev = ev }--mkNonCanonicalCt :: Ct -> Ct-mkNonCanonicalCt ct = CNonCanonical { cc_ev = cc_ev ct }--mkIrredCt :: CtEvidence -> Ct-mkIrredCt ev = CIrredCan { cc_ev = ev, cc_insol = False }--mkInsolubleCt :: CtEvidence -> Ct-mkInsolubleCt ev = CIrredCan { cc_ev = ev, cc_insol = True }--mkGivens :: CtLoc -> [EvId] -> [Ct]-mkGivens loc ev_ids-  = map mk ev_ids-  where-    mk ev_id = mkNonCanonical (CtGiven { ctev_evar = ev_id-                                       , ctev_pred = evVarPred ev_id-                                       , ctev_loc = loc })--ctEvidence :: Ct -> CtEvidence-ctEvidence (CQuantCan (QCI { qci_ev = ev })) = ev-ctEvidence ct = cc_ev ct--ctLoc :: Ct -> CtLoc-ctLoc = ctEvLoc . ctEvidence--setCtLoc :: Ct -> CtLoc -> Ct-setCtLoc ct loc = ct { cc_ev = (cc_ev ct) { ctev_loc = loc } }--ctOrigin :: Ct -> CtOrigin-ctOrigin = ctLocOrigin . ctLoc--ctPred :: Ct -> PredType--- See Note [Ct/evidence invariant]-ctPred ct = ctEvPred (ctEvidence ct)--ctEvId :: Ct -> EvVar--- The evidence Id for this Ct-ctEvId ct = ctEvEvId (ctEvidence ct)---- | Makes a new equality predicate with the same role as the given--- evidence.-mkTcEqPredLikeEv :: CtEvidence -> TcType -> TcType -> TcType-mkTcEqPredLikeEv ev-  = case predTypeEqRel pred of-      NomEq  -> mkPrimEqPred-      ReprEq -> mkReprPrimEqPred-  where-    pred = ctEvPred ev---- | Get the flavour of the given 'Ct'-ctFlavour :: Ct -> CtFlavour-ctFlavour = ctEvFlavour . ctEvidence---- | Get the equality relation for the given 'Ct'-ctEqRel :: Ct -> EqRel-ctEqRel = ctEvEqRel . ctEvidence--instance Outputable Ct where-  ppr ct = ppr (ctEvidence ct) <+> parens pp_sort-    where-      pp_sort = case ct of-         CTyEqCan {}      -> text "CTyEqCan"-         CFunEqCan {}     -> text "CFunEqCan"-         CNonCanonical {} -> text "CNonCanonical"-         CDictCan { cc_pend_sc = pend_sc }-            | pend_sc   -> text "CDictCan(psc)"-            | otherwise -> text "CDictCan"-         CIrredCan { cc_insol = insol }-            | insol     -> text "CIrredCan(insol)"-            | otherwise -> text "CIrredCan(sol)"-         CHoleCan { cc_hole = hole } -> text "CHoleCan:" <+> ppr hole-         CQuantCan (QCI { qci_pend_sc = pend_sc })-            | pend_sc   -> text "CQuantCan(psc)"-            | otherwise -> text "CQuantCan"--{--************************************************************************-*                                                                      *-        Simple functions over evidence variables-*                                                                      *-************************************************************************--}------------------ Getting free tyvars ----------------------------- | Returns free variables of constraints as a non-deterministic set-tyCoVarsOfCt :: Ct -> TcTyCoVarSet-tyCoVarsOfCt = fvVarSet . tyCoFVsOfCt---- | Returns free variables of constraints as a deterministically ordered.--- list. See Note [Deterministic FV] in FV.-tyCoVarsOfCtList :: Ct -> [TcTyCoVar]-tyCoVarsOfCtList = fvVarList . tyCoFVsOfCt---- | Returns free variables of constraints as a composable FV computation.--- See Note [Deterministic FV] in FV.-tyCoFVsOfCt :: Ct -> FV-tyCoFVsOfCt (CTyEqCan { cc_tyvar = tv, cc_rhs = xi })-  = tyCoFVsOfType xi `unionFV` FV.unitFV tv-                     `unionFV` tyCoFVsOfType (tyVarKind tv)-tyCoFVsOfCt (CFunEqCan { cc_tyargs = tys, cc_fsk = fsk })-  = tyCoFVsOfTypes tys `unionFV` FV.unitFV fsk-                       `unionFV` tyCoFVsOfType (tyVarKind fsk)-tyCoFVsOfCt (CDictCan { cc_tyargs = tys }) = tyCoFVsOfTypes tys-tyCoFVsOfCt ct = tyCoFVsOfType (ctPred ct)---- | Returns free variables of a bag of constraints as a non-deterministic--- set. See Note [Deterministic FV] in FV.-tyCoVarsOfCts :: Cts -> TcTyCoVarSet-tyCoVarsOfCts = fvVarSet . tyCoFVsOfCts---- | Returns free variables of a bag of constraints as a deterministically--- odered list. See Note [Deterministic FV] in FV.-tyCoVarsOfCtsList :: Cts -> [TcTyCoVar]-tyCoVarsOfCtsList = fvVarList . tyCoFVsOfCts---- | Returns free variables of a bag of constraints as a composable FV--- computation. See Note [Deterministic FV] in FV.-tyCoFVsOfCts :: Cts -> FV-tyCoFVsOfCts = foldrBag (unionFV . tyCoFVsOfCt) emptyFV---- | Returns free variables of WantedConstraints as a non-deterministic--- set. See Note [Deterministic FV] in FV.-tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet--- Only called on *zonked* things, hence no need to worry about flatten-skolems-tyCoVarsOfWC = fvVarSet . tyCoFVsOfWC---- | Returns free variables of WantedConstraints as a deterministically--- ordered list. See Note [Deterministic FV] in FV.-tyCoVarsOfWCList :: WantedConstraints -> [TyCoVar]--- Only called on *zonked* things, hence no need to worry about flatten-skolems-tyCoVarsOfWCList = fvVarList . tyCoFVsOfWC---- | Returns free variables of WantedConstraints as a composable FV--- computation. See Note [Deterministic FV] in FV.-tyCoFVsOfWC :: WantedConstraints -> FV--- Only called on *zonked* things, hence no need to worry about flatten-skolems-tyCoFVsOfWC (WC { wc_simple = simple, wc_impl = implic })-  = tyCoFVsOfCts simple `unionFV`-    tyCoFVsOfBag tyCoFVsOfImplic implic---- | Returns free variables of Implication as a composable FV computation.--- See Note [Deterministic FV] in FV.-tyCoFVsOfImplic :: Implication -> FV--- Only called on *zonked* things, hence no need to worry about flatten-skolems-tyCoFVsOfImplic (Implic { ic_skols = skols-                        , ic_given = givens-                        , ic_wanted = wanted })-  | isEmptyWC wanted-  = emptyFV-  | otherwise-  = tyCoFVsVarBndrs skols  $-    tyCoFVsVarBndrs givens $-    tyCoFVsOfWC wanted--tyCoFVsOfBag :: (a -> FV) -> Bag a -> FV-tyCoFVsOfBag tvs_of = foldrBag (unionFV . tvs_of) emptyFV------------------------------dropDerivedWC :: WantedConstraints -> WantedConstraints--- See Note [Dropping derived constraints]-dropDerivedWC wc@(WC { wc_simple = simples })-  = wc { wc_simple = dropDerivedSimples simples }-    -- The wc_impl implications are already (recursively) filtered-----------------------------dropDerivedSimples :: Cts -> Cts--- Drop all Derived constraints, but make [W] back into [WD],--- so that if we re-simplify these constraints we will get all--- the right derived constraints re-generated.  Forgetting this--- step led to #12936-dropDerivedSimples simples = mapMaybeBag dropDerivedCt simples--dropDerivedCt :: Ct -> Maybe Ct-dropDerivedCt ct-  = case ctEvFlavour ev of-      Wanted WOnly -> Just (ct' { cc_ev = ev_wd })-      Wanted _     -> Just ct'-      _ | isDroppableCt ct -> Nothing-        | otherwise        -> Just ct-  where-    ev    = ctEvidence ct-    ev_wd = ev { ctev_nosh = WDeriv }-    ct'   = setPendingScDict ct -- See Note [Resetting cc_pend_sc]--{- Note [Resetting cc_pend_sc]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-When we discard Derived constraints, in dropDerivedSimples, we must-set the cc_pend_sc flag to True, so that if we re-process this-CDictCan we will re-generate its derived superclasses. Otherwise-we might miss some fundeps.  Trac #13662 showed this up.--See Note [The superclass story] in TcCanonical.--}--isDroppableCt :: Ct -> Bool-isDroppableCt ct-  = isDerived ev && not keep_deriv-    -- Drop only derived constraints, and then only if they-    -- obey Note [Dropping derived constraints]-  where-    ev   = ctEvidence ct-    loc  = ctEvLoc ev-    orig = ctLocOrigin loc--    keep_deriv-      = case ct of-          CHoleCan {} -> True-          CIrredCan { cc_insol = insoluble }-                      -> keep_eq insoluble-          _           -> keep_eq False--    keep_eq definitely_insoluble-       | isGivenOrigin orig    -- Arising only from givens-       = definitely_insoluble  -- Keep only definitely insoluble-       | otherwise-       = case orig of-           KindEqOrigin {} -> True    -- See Note [Dropping derived constraints]--           -- See Note [Dropping derived constraints]-           -- For fundeps, drop wanted/wanted interactions-           FunDepOrigin2 {} -> True   -- Top-level/Wanted-           FunDepOrigin1 _ loc1 _ loc2-             | g1 || g2  -> True  -- Given/Wanted errors: keep all-             | otherwise -> False -- Wanted/Wanted errors: discard-             where-               g1 = isGivenLoc loc1-               g2 = isGivenLoc loc2--           _ -> False--arisesFromGivens :: Ct -> Bool-arisesFromGivens ct-  = case ctEvidence ct of-      CtGiven {}                   -> True-      CtWanted {}                  -> False-      CtDerived { ctev_loc = loc } -> isGivenLoc loc--isGivenLoc :: CtLoc -> Bool-isGivenLoc loc = isGivenOrigin (ctLocOrigin loc)--isGivenOrigin :: CtOrigin -> Bool-isGivenOrigin (GivenOrigin {})          = True-isGivenOrigin (FunDepOrigin1 _ l1 _ l2) = isGivenLoc l1 && isGivenLoc l2-isGivenOrigin (FunDepOrigin2 _ o1 _ _)  = isGivenOrigin o1-isGivenOrigin _                         = False--{- Note [Dropping derived constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In general we discard derived constraints at the end of constraint solving;-see dropDerivedWC.  For example-- * Superclasses: if we have an unsolved [W] (Ord a), we don't want to-   complain about an unsolved [D] (Eq a) as well.-- * If we have [W] a ~ Int, [W] a ~ Bool, improvement will generate-   [D] Int ~ Bool, and we don't want to report that because it's-   incomprehensible. That is why we don't rewrite wanteds with wanteds!-- * We might float out some Wanteds from an implication, leaving behind-   their insoluble Deriveds. For example:--   forall a[2]. [W] alpha[1] ~ Int-                [W] alpha[1] ~ Bool-                [D] Int ~ Bool--   The Derived is insoluble, but we very much want to drop it when floating-   out.--But (tiresomely) we do keep *some* Derived constraints:-- * Type holes are derived constraints, because they have no evidence-   and we want to keep them, so we get the error report-- * Insoluble kind equalities (e.g. [D] * ~ (* -> *)), with-   KindEqOrigin, may arise from a type equality a ~ Int#, say.  See-   Note [Equalities with incompatible kinds] in TcCanonical.-   Keeping these around produces better error messages, in practice.-   E.g., test case dependent/should_fail/T11471-- * We keep most derived equalities arising from functional dependencies-      - Given/Given interactions (subset of FunDepOrigin1):-        The definitely-insoluble ones reflect unreachable code.--        Others not-definitely-insoluble ones like [D] a ~ Int do not-        reflect unreachable code; indeed if fundeps generated proofs, it'd-        be a useful equality.  See Trac #14763.   So we discard them.--      - Given/Wanted interacGiven or Wanted interacting with an-        instance declaration (FunDepOrigin2)--      - Given/Wanted interactions (FunDepOrigin1); see Trac #9612--      - But for Wanted/Wanted interactions we do /not/ want to report an-        error (Trac #13506).  Consider [W] C Int Int, [W] C Int Bool, with-        a fundep on class C.  We don't want to report an insoluble Int~Bool;-        c.f. "wanteds do not rewrite wanteds".--To distinguish these cases we use the CtOrigin.--NB: we keep *all* derived insolubles under some circumstances:--  * They are looked at by simplifyInfer, to decide whether to-    generalise.  Example: [W] a ~ Int, [W] a ~ Bool-    We get [D] Int ~ Bool, and indeed the constraints are insoluble,-    and we want simplifyInfer to see that, even though we don't-    ultimately want to generate an (inexplicable) error message from it---************************************************************************-*                                                                      *-                    CtEvidence-         The "flavor" of a canonical constraint-*                                                                      *-************************************************************************--}--isWantedCt :: Ct -> Bool-isWantedCt = isWanted . ctEvidence--isGivenCt :: Ct -> Bool-isGivenCt = isGiven . ctEvidence--isDerivedCt :: Ct -> Bool-isDerivedCt = isDerived . ctEvidence--isCTyEqCan :: Ct -> Bool-isCTyEqCan (CTyEqCan {})  = True-isCTyEqCan (CFunEqCan {}) = False-isCTyEqCan _              = False--isCDictCan_Maybe :: Ct -> Maybe Class-isCDictCan_Maybe (CDictCan {cc_class = cls })  = Just cls-isCDictCan_Maybe _              = Nothing--isCFunEqCan_maybe :: Ct -> Maybe (TyCon, [Type])-isCFunEqCan_maybe (CFunEqCan { cc_fun = tc, cc_tyargs = xis }) = Just (tc, xis)-isCFunEqCan_maybe _ = Nothing--isCFunEqCan :: Ct -> Bool-isCFunEqCan (CFunEqCan {}) = True-isCFunEqCan _ = False--isCNonCanonical :: Ct -> Bool-isCNonCanonical (CNonCanonical {}) = True-isCNonCanonical _ = False--isHoleCt:: Ct -> Bool-isHoleCt (CHoleCan {}) = True-isHoleCt _ = False--isOutOfScopeCt :: Ct -> Bool--- We treat expression holes representing out-of-scope variables a bit--- differently when it comes to error reporting-isOutOfScopeCt (CHoleCan { cc_hole = ExprHole (OutOfScope {}) }) = True-isOutOfScopeCt _ = False--isExprHoleCt :: Ct -> Bool-isExprHoleCt (CHoleCan { cc_hole = ExprHole {} }) = True-isExprHoleCt _ = False--isTypeHoleCt :: Ct -> Bool-isTypeHoleCt (CHoleCan { cc_hole = TypeHole {} }) = True-isTypeHoleCt _ = False---{- Note [Custom type errors in constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--When GHC reports a type-error about an unsolved-constraint, we check-to see if the constraint contains any custom-type errors, and if so-we report them.  Here are some examples of constraints containing type-errors:--TypeError msg           -- The actual constraint is a type error--TypError msg ~ Int      -- Some type was supposed to be Int, but ended up-                        -- being a type error instead--Eq (TypeError msg)      -- A class constraint is stuck due to a type error--F (TypeError msg) ~ a   -- A type function failed to evaluate due to a type err--It is also possible to have constraints where the type error is nested deeper,-for example see #11990, and also:--Eq (F (TypeError msg))  -- Here the type error is nested under a type-function-                        -- call, which failed to evaluate because of it,-                        -- and so the `Eq` constraint was unsolved.-                        -- This may happen when one function calls another-                        -- and the called function produced a custom type error.--}---- | A constraint is considered to be a custom type error, if it contains--- custom type errors anywhere in it.--- See Note [Custom type errors in constraints]-getUserTypeErrorMsg :: Ct -> Maybe Type-getUserTypeErrorMsg ct = findUserTypeError (ctPred ct)-  where-  findUserTypeError t = msum ( userTypeError_maybe t-                             : map findUserTypeError (subTys t)-                             )--  subTys t            = case splitAppTys t of-                          (t,[]) ->-                            case splitTyConApp_maybe t of-                              Nothing     -> []-                              Just (_,ts) -> ts-                          (t,ts) -> t : ts-----isUserTypeErrorCt :: Ct -> Bool-isUserTypeErrorCt ct = case getUserTypeErrorMsg ct of-                         Just _ -> True-                         _      -> False--isPendingScDict :: Ct -> Maybe Ct--- Says whether this is a CDictCan with cc_pend_sc is True,--- AND if so flips the flag-isPendingScDict ct@(CDictCan { cc_pend_sc = True })-                  = Just (ct { cc_pend_sc = False })-isPendingScDict _ = Nothing--isPendingScInst :: QCInst -> Maybe QCInst--- Same as isPrendinScDict, but for QCInsts-isPendingScInst qci@(QCI { qci_pend_sc = True })-                  = Just (qci { qci_pend_sc = False })-isPendingScInst _ = Nothing--setPendingScDict :: Ct -> Ct--- Set the cc_pend_sc flag to True-setPendingScDict ct@(CDictCan { cc_pend_sc = False })-                    = ct { cc_pend_sc = True }-setPendingScDict ct = ct--superClassesMightHelp :: WantedConstraints -> Bool--- ^ True if taking superclasses of givens, or of wanteds (to perhaps--- expose more equalities or functional dependencies) might help to--- solve this constraint.  See Note [When superclasses help]-superClassesMightHelp (WC { wc_simple = simples, wc_impl = implics })-  = anyBag might_help_ct simples || anyBag might_help_implic implics-  where-    might_help_implic ic-       | IC_Unsolved <- ic_status ic = superClassesMightHelp (ic_wanted ic)-       | otherwise                   = False--    might_help_ct ct = isWantedCt ct && not (is_ip ct)--    is_ip (CDictCan { cc_class = cls }) = isIPClass cls-    is_ip _                             = False--getPendingWantedScs :: Cts -> ([Ct], Cts)-getPendingWantedScs simples-  = mapAccumBagL get [] simples-  where-    get acc ct | Just ct' <- isPendingScDict ct-               = (ct':acc, ct')-               | otherwise-               = (acc,     ct)--{- Note [When superclasses help]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-First read Note [The superclass story] in TcCanonical.--We expand superclasses and iterate only if there is at unsolved wanted-for which expansion of superclasses (e.g. from given constraints)-might actually help. The function superClassesMightHelp tells if-doing this superclass expansion might help solve this constraint.-Note that--  * We look inside implications; maybe it'll help to expand the Givens-    at level 2 to help solve an unsolved Wanted buried inside an-    implication.  E.g.-        forall a. Ord a => forall b. [W] Eq a--  * Superclasses help only for Wanted constraints.  Derived constraints-    are not really "unsolved" and we certainly don't want them to-    trigger superclass expansion. This was a good part of the loop-    in  Trac #11523--  * Even for Wanted constraints, we say "no" for implicit parameters.-    we have [W] ?x::ty, expanding superclasses won't help:-      - Superclasses can't be implicit parameters-      - If we have a [G] ?x:ty2, then we'll have another unsolved-        [D] ty ~ ty2 (from the functional dependency)-        which will trigger superclass expansion.--    It's a bit of a special case, but it's easy to do.  The runtime cost-    is low because the unsolved set is usually empty anyway (errors-    aside), and the first non-imlicit-parameter will terminate the search.--    The special case is worth it (Trac #11480, comment:2) because it-    applies to CallStack constraints, which aren't type errors. If we have-       f :: (C a) => blah-       f x = ...undefined...-    we'll get a CallStack constraint.  If that's the only unsolved-    constraint it'll eventually be solved by defaulting.  So we don't-    want to emit warnings about hitting the simplifier's iteration-    limit.  A CallStack constraint really isn't an unsolved-    constraint; it can always be solved by defaulting.--}--singleCt :: Ct -> Cts-singleCt = unitBag--andCts :: Cts -> Cts -> Cts-andCts = unionBags--listToCts :: [Ct] -> Cts-listToCts = listToBag--ctsElts :: Cts -> [Ct]-ctsElts = bagToList--consCts :: Ct -> Cts -> Cts-consCts = consBag--snocCts :: Cts -> Ct -> Cts-snocCts = snocBag--extendCtsList :: Cts -> [Ct] -> Cts-extendCtsList cts xs | null xs   = cts-                     | otherwise = cts `unionBags` listToBag xs--andManyCts :: [Cts] -> Cts-andManyCts = unionManyBags--emptyCts :: Cts-emptyCts = emptyBag--isEmptyCts :: Cts -> Bool-isEmptyCts = isEmptyBag--pprCts :: Cts -> SDoc-pprCts cts = vcat (map ppr (bagToList cts))--{--************************************************************************-*                                                                      *-                Wanted constraints-     These are forced to be in TcRnTypes because-           TcLclEnv mentions WantedConstraints-           WantedConstraint mentions CtLoc-           CtLoc mentions ErrCtxt-           ErrCtxt mentions TcM-*                                                                      *-v%************************************************************************--}--data WantedConstraints-  = WC { wc_simple :: Cts              -- Unsolved constraints, all wanted-       , wc_impl   :: Bag Implication-    }--emptyWC :: WantedConstraints-emptyWC = WC { wc_simple = emptyBag, wc_impl = emptyBag }--mkSimpleWC :: [CtEvidence] -> WantedConstraints-mkSimpleWC cts-  = WC { wc_simple = listToBag (map mkNonCanonical cts)-       , wc_impl = emptyBag }--mkImplicWC :: Bag Implication -> WantedConstraints-mkImplicWC implic-  = WC { wc_simple = emptyBag, wc_impl = implic }--isEmptyWC :: WantedConstraints -> Bool-isEmptyWC (WC { wc_simple = f, wc_impl = i })-  = isEmptyBag f && isEmptyBag i----- | Checks whether a the given wanted constraints are solved, i.e.--- that there are no simple constraints left and all the implications--- are solved.-isSolvedWC :: WantedConstraints -> Bool-isSolvedWC WC {wc_simple = wc_simple, wc_impl = wc_impl} =-  isEmptyBag wc_simple && allBag (isSolvedStatus . ic_status) wc_impl--andWC :: WantedConstraints -> WantedConstraints -> WantedConstraints-andWC (WC { wc_simple = f1, wc_impl = i1 })-      (WC { wc_simple = f2, wc_impl = i2 })-  = WC { wc_simple = f1 `unionBags` f2-       , wc_impl   = i1 `unionBags` i2 }--unionsWC :: [WantedConstraints] -> WantedConstraints-unionsWC = foldr andWC emptyWC--addSimples :: WantedConstraints -> Bag Ct -> WantedConstraints-addSimples wc cts-  = wc { wc_simple = wc_simple wc `unionBags` cts }-    -- Consider: Put the new constraints at the front, so they get solved first--addImplics :: WantedConstraints -> Bag Implication -> WantedConstraints-addImplics wc implic = wc { wc_impl = wc_impl wc `unionBags` implic }--addInsols :: WantedConstraints -> Bag Ct -> WantedConstraints-addInsols wc cts-  = wc { wc_simple = wc_simple wc `unionBags` cts }--insolublesOnly :: WantedConstraints -> WantedConstraints--- Keep only the definitely-insoluble constraints-insolublesOnly (WC { wc_simple = simples, wc_impl = implics })-  = WC { wc_simple = filterBag insolubleCt simples-       , wc_impl   = mapBag implic_insols_only implics }-  where-    implic_insols_only implic-      = implic { ic_wanted = insolublesOnly (ic_wanted implic) }--isSolvedStatus :: ImplicStatus -> Bool-isSolvedStatus (IC_Solved {}) = True-isSolvedStatus _              = False--isInsolubleStatus :: ImplicStatus -> Bool-isInsolubleStatus IC_Insoluble    = True-isInsolubleStatus IC_BadTelescope = True-isInsolubleStatus _               = False--insolubleImplic :: Implication -> Bool-insolubleImplic ic = isInsolubleStatus (ic_status ic)--insolubleWC :: WantedConstraints -> Bool-insolubleWC (WC { wc_impl = implics, wc_simple = simples })-  =  anyBag insolubleCt simples-  || anyBag insolubleImplic implics--insolubleCt :: Ct -> Bool--- Definitely insoluble, in particular /excluding/ type-hole constraints--- Namely: a) an equality constraint---         b) that is insoluble---         c) and does not arise from a Given-insolubleCt ct-  | isHoleCt ct            = isOutOfScopeCt ct  -- See Note [Insoluble holes]-  | not (insolubleEqCt ct) = False-  | arisesFromGivens ct    = False              -- See Note [Given insolubles]-  | otherwise              = True--insolubleEqCt :: Ct -> Bool--- Returns True of /equality/ constraints--- that are /definitely/ insoluble--- It won't detect some definite errors like---       F a ~ T (F a)--- where F is a type family, which actually has an occurs check------ The function is tuned for application /after/ constraint solving---       i.e. assuming canonicalisation has been done--- E.g.  It'll reply True  for     a ~ [a]---               but False for   [a] ~ a--- and---                   True for  Int ~ F a Int---               but False for  Maybe Int ~ F a Int Int---               (where F is an arity-1 type function)-insolubleEqCt (CIrredCan { cc_insol = insol }) = insol-insolubleEqCt _                                = False--instance Outputable WantedConstraints where-  ppr (WC {wc_simple = s, wc_impl = i})-   = text "WC" <+> braces (vcat-        [ ppr_bag (text "wc_simple") s-        , ppr_bag (text "wc_impl") i ])--ppr_bag :: Outputable a => SDoc -> Bag a -> SDoc-ppr_bag doc bag- | isEmptyBag bag = empty- | otherwise      = hang (doc <+> equals)-                       2 (foldrBag (($$) . ppr) empty bag)--{- Note [Given insolubles]-~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #14325, comment:)-    class (a~b) => C a b--    foo :: C a c => a -> c-    foo x = x--    hm3 :: C (f b) b => b -> f b-    hm3 x = foo x--In the RHS of hm3, from the [G] C (f b) b we get the insoluble-[G] f b ~# b.  Then we also get an unsolved [W] C b (f b).-Residual implication looks like-    forall b. C (f b) b => [G] f b ~# b-                           [W] C f (f b)--We do /not/ want to set the implication status to IC_Insoluble,-because that'll suppress reports of [W] C b (f b).  But we-may not report the insoluble [G] f b ~# b either (see Note [Given errors]-in TcErrors), so we may fail to report anything at all!  Yikes.--The same applies to Derived constraints that /arise from/ Givens.-E.g.   f :: (C Int [a]) => blah-where a fundep means we get-       [D] Int ~ [a]-By the same reasoning we must not suppress other errors (Trac #15767)--Bottom line: insolubleWC (called in TcSimplify.setImplicationStatus)-             should ignore givens even if they are insoluble.--Note [Insoluble holes]-~~~~~~~~~~~~~~~~~~~~~~-Hole constraints that ARE NOT treated as truly insoluble:-  a) type holes, arising from PartialTypeSignatures,-  b) "true" expression holes arising from TypedHoles--An "expression hole" or "type hole" constraint isn't really an error-at all; it's a report saying "_ :: Int" here.  But an out-of-scope-variable masquerading as expression holes IS treated as truly-insoluble, so that it trumps other errors during error reporting.-Yuk!--************************************************************************-*                                                                      *-                Implication constraints-*                                                                      *-************************************************************************--}--data Implication-  = Implic {   -- Invariants for a tree of implications:-               -- see TcType Note [TcLevel and untouchable type variables]--      ic_tclvl :: TcLevel,       -- TcLevel of unification variables-                                 -- allocated /inside/ this implication--      ic_skols :: [TcTyVar],     -- Introduced skolems-      ic_info  :: SkolemInfo,    -- See Note [Skolems in an implication]-                                 -- See Note [Shadowing in a constraint]-      ic_telescope :: Maybe SDoc,  -- User-written telescope, if there is one-                                   -- The list of skolems is order-checked-                                   -- if and only if this is a Just.-                                   -- See Note [Keeping scoped variables in order: Explicit]-                                   -- in TcHsType--      ic_given  :: [EvVar],      -- Given evidence variables-                                 --   (order does not matter)-                                 -- See Invariant (GivenInv) in TcType--      ic_no_eqs :: Bool,         -- True  <=> ic_givens have no equalities, for sure-                                 -- False <=> ic_givens might have equalities--      ic_env   :: Env TcGblEnv TcLclEnv,-                                 -- Records the Env at the time of creation.-                                 ---                                 -- This is primarly needed for the enclosed-                                 -- TcLclEnv, which gives the source location-                                 -- and error context for the implication, and-                                 -- hence for all the given evidence variables.-                                 ---                                 -- The enclosed DynFlags also influences error-                                 -- reporting. See Note [Avoid-                                 -- -Winaccessible-code when deriving] in-                                 -- TcInstDcls.--      ic_wanted :: WantedConstraints,  -- The wanteds-                                       -- See Invariang (WantedInf) in TcType--      ic_binds  :: EvBindsVar,    -- Points to the place to fill in the-                                  -- abstraction and bindings.--      -- The ic_need fields keep track of which Given evidence-      -- is used by this implication or its children-      -- NB: including stuff used by nested implications that have since-      --     been discarded-      ic_need_inner :: VarSet,    -- Includes all used Given evidence-      ic_need_outer :: VarSet,    -- Includes only the free Given evidence-                                  --  i.e. ic_need_inner after deleting-                                  --       (a) givens (b) binders of ic_binds--      ic_status   :: ImplicStatus-    }---- | Create a new 'Implication' with as many sensible defaults for its fields--- as possible. Note that the 'ic_tclvl', 'ic_binds', and 'ic_info' fields do--- /not/ have sensible defaults, so they are initialized with lazy thunks that--- will 'panic' if forced, so one should take care to initialize these fields--- after creation.------ This is monadic purely to look up the 'Env', which is used to initialize--- 'ic_env'.-newImplication :: TcM Implication-newImplication-  = do env <- getEnv-       return (implicationPrototype { ic_env = env })--implicationPrototype :: Implication-implicationPrototype-   = Implic { -- These fields must be initialised-              ic_tclvl      = panic "newImplic:tclvl"-            , ic_binds      = panic "newImplic:binds"-            , ic_info       = panic "newImplic:info"-            , ic_env        = panic "newImplic:env"--              -- The rest have sensible default values-            , ic_skols      = []-            , ic_telescope  = Nothing-            , ic_given      = []-            , ic_wanted     = emptyWC-            , ic_no_eqs     = False-            , ic_status     = IC_Unsolved-            , ic_need_inner = emptyVarSet-            , ic_need_outer = emptyVarSet }---- | Retrieve the enclosed 'TcLclEnv' from an 'Implication'.-implicLclEnv :: Implication -> TcLclEnv-implicLclEnv = env_lcl . ic_env---- | Retrieve the enclosed 'DynFlags' from an 'Implication'.-implicDynFlags :: Implication -> DynFlags-implicDynFlags = hsc_dflags . env_top . ic_env--data ImplicStatus-  = IC_Solved     -- All wanteds in the tree are solved, all the way down-       { ics_dead :: [EvVar] }  -- Subset of ic_given that are not needed-         -- See Note [Tracking redundant constraints] in TcSimplify--  | IC_Insoluble  -- At least one insoluble constraint in the tree--  | IC_BadTelescope  -- solved, but the skolems in the telescope are out of-                     -- dependency order--  | IC_Unsolved   -- Neither of the above; might go either way--instance Outputable Implication where-  ppr (Implic { ic_tclvl = tclvl, ic_skols = skols-              , ic_given = given, ic_no_eqs = no_eqs-              , ic_wanted = wanted, ic_status = status-              , ic_binds = binds-              , ic_need_inner = need_in, ic_need_outer = need_out-              , ic_info = info })-   = hang (text "Implic" <+> lbrace)-        2 (sep [ text "TcLevel =" <+> ppr tclvl-               , text "Skolems =" <+> pprTyVars skols-               , text "No-eqs =" <+> ppr no_eqs-               , text "Status =" <+> ppr status-               , hang (text "Given =")  2 (pprEvVars given)-               , hang (text "Wanted =") 2 (ppr wanted)-               , text "Binds =" <+> ppr binds-               , whenPprDebug (text "Needed inner =" <+> ppr need_in)-               , whenPprDebug (text "Needed outer =" <+> ppr need_out)-               , pprSkolInfo info ] <+> rbrace)--instance Outputable ImplicStatus where-  ppr IC_Insoluble    = text "Insoluble"-  ppr IC_BadTelescope = text "Bad telescope"-  ppr IC_Unsolved     = text "Unsolved"-  ppr (IC_Solved { ics_dead = dead })-    = text "Solved" <+> (braces (text "Dead givens =" <+> ppr dead))--{--Note [Needed evidence variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Th ic_need_evs field holds the free vars of ic_binds, and all the-ic_binds in nested implications.--  * Main purpose: if one of the ic_givens is not mentioned in here, it-    is redundant.--  * solveImplication may drop an implication altogether if it has no-    remaining 'wanteds'. But we still track the free vars of its-    evidence binds, even though it has now disappeared.--Note [Shadowing in a constraint]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We assume NO SHADOWING in a constraint.  Specifically- * The unification variables are all implicitly quantified at top-   level, and are all unique- * The skolem variables bound in ic_skols are all freah when the-   implication is created.-So we can safely substitute. For example, if we have-   forall a.  a~Int => ...(forall b. ...a...)...-we can push the (a~Int) constraint inwards in the "givens" without-worrying that 'b' might clash.--Note [Skolems in an implication]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The skolems in an implication are not there to perform a skolem escape-check.  That happens because all the environment variables are in the-untouchables, and therefore cannot be unified with anything at all,-let alone the skolems.--Instead, ic_skols is used only when considering floating a constraint-outside the implication in TcSimplify.floatEqualities or-TcSimplify.approximateImplications--Note [Insoluble constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Some of the errors that we get during canonicalization are best-reported when all constraints have been simplified as much as-possible. For instance, assume that during simplification the-following constraints arise:-- [Wanted]   F alpha ~  uf1- [Wanted]   beta ~ uf1 beta--When canonicalizing the wanted (beta ~ uf1 beta), if we eagerly fail-we will simply see a message:-    'Can't construct the infinite type  beta ~ uf1 beta'-and the user has no idea what the uf1 variable is.--Instead our plan is that we will NOT fail immediately, but:-    (1) Record the "frozen" error in the ic_insols field-    (2) Isolate the offending constraint from the rest of the inerts-    (3) Keep on simplifying/canonicalizing--At the end, we will hopefully have substituted uf1 := F alpha, and we-will be able to report a more informative error:-    'Can't construct the infinite type beta ~ F alpha beta'--Insoluble constraints *do* include Derived constraints. For example,-a functional dependency might give rise to [D] Int ~ Bool, and we must-report that.  If insolubles did not contain Deriveds, reportErrors would-never see it.---************************************************************************-*                                                                      *-            Pretty printing-*                                                                      *-************************************************************************--}--pprEvVars :: [EvVar] -> SDoc    -- Print with their types-pprEvVars ev_vars = vcat (map pprEvVarWithType ev_vars)--pprEvVarTheta :: [EvVar] -> SDoc-pprEvVarTheta ev_vars = pprTheta (map evVarPred ev_vars)--pprEvVarWithType :: EvVar -> SDoc-pprEvVarWithType v = ppr v <+> dcolon <+> pprType (evVarPred v)------ | Wraps the given type with the constraints (via ic_given) in the given--- implication, according to the variables mentioned (via ic_skols)--- in the implication, but taking care to only wrap those variables--- that are mentioned in the type or the implication.-wrapTypeWithImplication :: Type -> Implication -> Type-wrapTypeWithImplication ty impl = wrapType ty mentioned_skols givens-    where givens = map idType $ ic_given impl-          skols = ic_skols impl-          freeVars = fvVarSet $ tyCoFVsOfTypes (ty:givens)-          mentioned_skols = filter (`elemVarSet` freeVars) skols--wrapType :: Type -> [TyVar] -> [PredType] -> Type-wrapType ty skols givens = mkSpecForAllTys skols $ mkFunTys givens ty---{--************************************************************************-*                                                                      *-            CtEvidence-*                                                                      *-************************************************************************--Note [Evidence field of CtEvidence]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-During constraint solving we never look at the type of ctev_evar/ctev_dest;-instead we look at the ctev_pred field.  The evtm/evar field-may be un-zonked.--Note [Bind new Givens immediately]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For Givens we make new EvVars and bind them immediately. Two main reasons:-  * Gain sharing.  E.g. suppose we start with g :: C a b, where-       class D a => C a b-       class (E a, F a) => D a-    If we generate all g's superclasses as separate EvTerms we might-    get    selD1 (selC1 g) :: E a-           selD2 (selC1 g) :: F a-           selC1 g :: D a-    which we could do more economically as:-           g1 :: D a = selC1 g-           g2 :: E a = selD1 g1-           g3 :: F a = selD2 g1--  * For *coercion* evidence we *must* bind each given:-      class (a~b) => C a b where ....-      f :: C a b => ....-    Then in f's Givens we have g:(C a b) and the superclass sc(g,0):a~b.-    But that superclass selector can't (yet) appear in a coercion-    (see evTermCoercion), so the easy thing is to bind it to an Id.--So a Given has EvVar inside it rather than (as previously) an EvTerm.---}---- | A place for type-checking evidence to go after it is generated.--- Wanted equalities are always HoleDest; other wanteds are always--- EvVarDest.-data TcEvDest-  = EvVarDest EvVar         -- ^ bind this var to the evidence-              -- EvVarDest is always used for non-type-equalities-              -- e.g. class constraints--  | HoleDest  CoercionHole  -- ^ fill in this hole with the evidence-              -- HoleDest is always used for type-equalities-              -- See Note [Coercion holes] in TyCoRep--data CtEvidence-  = CtGiven    -- Truly given, not depending on subgoals-      { ctev_pred :: TcPredType      -- See Note [Ct/evidence invariant]-      , ctev_evar :: EvVar           -- See Note [Evidence field of CtEvidence]-      , ctev_loc  :: CtLoc }---  | CtWanted   -- Wanted goal-      { ctev_pred :: TcPredType     -- See Note [Ct/evidence invariant]-      , ctev_dest :: TcEvDest-      , ctev_nosh :: ShadowInfo     -- See Note [Constraint flavours]-      , ctev_loc  :: CtLoc }--  | CtDerived  -- A goal that we don't really have to solve and can't-               -- immediately rewrite anything other than a derived-               -- (there's no evidence!) but if we do manage to solve-               -- it may help in solving other goals.-      { ctev_pred :: TcPredType-      , ctev_loc  :: CtLoc }--ctEvPred :: CtEvidence -> TcPredType--- The predicate of a flavor-ctEvPred = ctev_pred--ctEvLoc :: CtEvidence -> CtLoc-ctEvLoc = ctev_loc--ctEvOrigin :: CtEvidence -> CtOrigin-ctEvOrigin = ctLocOrigin . ctEvLoc---- | Get the equality relation relevant for a 'CtEvidence'-ctEvEqRel :: CtEvidence -> EqRel-ctEvEqRel = predTypeEqRel . ctEvPred---- | Get the role relevant for a 'CtEvidence'-ctEvRole :: CtEvidence -> Role-ctEvRole = eqRelRole . ctEvEqRel--ctEvTerm :: CtEvidence -> EvTerm-ctEvTerm ev = EvExpr (ctEvExpr ev)--ctEvExpr :: CtEvidence -> EvExpr-ctEvExpr ev@(CtWanted { ctev_dest = HoleDest _ })-            = Coercion $ ctEvCoercion ev-ctEvExpr ev = evId (ctEvEvId ev)--ctEvCoercion :: HasDebugCallStack => CtEvidence -> Coercion-ctEvCoercion (CtGiven { ctev_evar = ev_id })-  = mkTcCoVarCo ev_id-ctEvCoercion (CtWanted { ctev_dest = dest })-  | HoleDest hole <- dest-  = -- ctEvCoercion is only called on type equalities-    -- and they always have HoleDests-    mkHoleCo hole-ctEvCoercion ev-  = pprPanic "ctEvCoercion" (ppr ev)--ctEvEvId :: CtEvidence -> EvVar-ctEvEvId (CtWanted { ctev_dest = EvVarDest ev }) = ev-ctEvEvId (CtWanted { ctev_dest = HoleDest h })   = coHoleCoVar h-ctEvEvId (CtGiven  { ctev_evar = ev })           = ev-ctEvEvId ctev@(CtDerived {}) = pprPanic "ctEvId:" (ppr ctev)--instance Outputable TcEvDest where-  ppr (HoleDest h)   = text "hole" <> ppr h-  ppr (EvVarDest ev) = ppr ev--instance Outputable CtEvidence where-  ppr ev = ppr (ctEvFlavour ev)-           <+> pp_ev-           <+> braces (ppr (ctl_depth (ctEvLoc ev))) <> dcolon-                  -- Show the sub-goal depth too-           <+> ppr (ctEvPred ev)-    where-      pp_ev = case ev of-             CtGiven { ctev_evar = v } -> ppr v-             CtWanted {ctev_dest = d } -> ppr d-             CtDerived {}              -> text "_"--isWanted :: CtEvidence -> Bool-isWanted (CtWanted {}) = True-isWanted _ = False--isGiven :: CtEvidence -> Bool-isGiven (CtGiven {})  = True-isGiven _ = False--isDerived :: CtEvidence -> Bool-isDerived (CtDerived {}) = True-isDerived _              = False--{--%************************************************************************-%*                                                                      *-            CtFlavour-%*                                                                      *-%************************************************************************--Note [Constraint flavours]-~~~~~~~~~~~~~~~~~~~~~~~~~~-Constraints come in four flavours:--* [G] Given: we have evidence--* [W] Wanted WOnly: we want evidence--* [D] Derived: any solution must satisfy this constraint, but-      we don't need evidence for it.  Examples include:-        - superclasses of [W] class constraints-        - equalities arising from functional dependencies-          or injectivity--* [WD] Wanted WDeriv: a single constraint that represents-                      both [W] and [D]-  We keep them paired as one both for efficiency, and because-  when we have a finite map  F tys -> CFunEqCan, it's inconvenient-  to have two CFunEqCans in the range--The ctev_nosh field of a Wanted distinguishes between [W] and [WD]--Wanted constraints are born as [WD], but are split into [W] and its-"shadow" [D] in TcSMonad.maybeEmitShadow.--See Note [The improvement story and derived shadows] in TcSMonad--}--data CtFlavour  -- See Note [Constraint flavours]-  = Given-  | Wanted ShadowInfo-  | Derived-  deriving Eq--data ShadowInfo-  = WDeriv   -- [WD] This Wanted constraint has no Derived shadow,-             -- so it behaves like a pair of a Wanted and a Derived-  | WOnly    -- [W] It has a separate derived shadow-             -- See Note [Derived shadows]-  deriving( Eq )--isGivenOrWDeriv :: CtFlavour -> Bool-isGivenOrWDeriv Given           = True-isGivenOrWDeriv (Wanted WDeriv) = True-isGivenOrWDeriv _               = False--instance Outputable CtFlavour where-  ppr Given           = text "[G]"-  ppr (Wanted WDeriv) = text "[WD]"-  ppr (Wanted WOnly)  = text "[W]"-  ppr Derived         = text "[D]"--ctEvFlavour :: CtEvidence -> CtFlavour-ctEvFlavour (CtWanted { ctev_nosh = nosh }) = Wanted nosh-ctEvFlavour (CtGiven {})                    = Given-ctEvFlavour (CtDerived {})                  = Derived---- | Whether or not one 'Ct' can rewrite another is determined by its--- flavour and its equality relation. See also--- Note [Flavours with roles] in TcSMonad-type CtFlavourRole = (CtFlavour, EqRel)---- | Extract the flavour, role, and boxity from a 'CtEvidence'-ctEvFlavourRole :: CtEvidence -> CtFlavourRole-ctEvFlavourRole ev = (ctEvFlavour ev, ctEvEqRel ev)---- | Extract the flavour and role from a 'Ct'-ctFlavourRole :: Ct -> CtFlavourRole--- Uses short-cuts to role for special cases-ctFlavourRole (CDictCan { cc_ev = ev })-  = (ctEvFlavour ev, NomEq)-ctFlavourRole (CTyEqCan { cc_ev = ev, cc_eq_rel = eq_rel })-  = (ctEvFlavour ev, eq_rel)-ctFlavourRole (CFunEqCan { cc_ev = ev })-  = (ctEvFlavour ev, NomEq)-ctFlavourRole (CHoleCan { cc_ev = ev })-  = (ctEvFlavour ev, NomEq)  -- NomEq: CHoleCans can be rewritten by-                             -- by nominal equalities but empahatically-                             -- not by representational equalities-ctFlavourRole ct-  = ctEvFlavourRole (ctEvidence ct)--{- Note [eqCanRewrite]-~~~~~~~~~~~~~~~~~~~~~~-(eqCanRewrite ct1 ct2) holds if the constraint ct1 (a CTyEqCan of form-tv ~ ty) can be used to rewrite ct2.  It must satisfy the properties of-a can-rewrite relation, see Definition [Can-rewrite relation] in-TcSMonad.--With the solver handling Coercible constraints like equality constraints,-the rewrite conditions must take role into account, never allowing-a representational equality to rewrite a nominal one.--Note [Wanteds do not rewrite Wanteds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We don't allow Wanteds to rewrite Wanteds, because that can give rise-to very confusing type error messages.  A good example is Trac #8450.-Here's another-   f :: a -> Bool-   f x = ( [x,'c'], [x,True] ) `seq` True-Here we get-  [W] a ~ Char-  [W] a ~ Bool-but we do not want to complain about Bool ~ Char!--Note [Deriveds do rewrite Deriveds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-However we DO allow Deriveds to rewrite Deriveds, because that's how-improvement works; see Note [The improvement story] in TcInteract.--However, for now at least I'm only letting (Derived,NomEq) rewrite-(Derived,NomEq) and not doing anything for ReprEq.  If we have-    eqCanRewriteFR (Derived, NomEq) (Derived, _)  = True-then we lose property R2 of Definition [Can-rewrite relation]-in TcSMonad-  R2.  If f1 >= f, and f2 >= f,-       then either f1 >= f2 or f2 >= f1-Consider f1 = (Given, ReprEq)-         f2 = (Derived, NomEq)-          f = (Derived, ReprEq)--I thought maybe we could never get Derived ReprEq constraints, but-we can; straight from the Wanteds during improvement. And from a Derived-ReprEq we could conceivably get a Derived NomEq improvement (by decomposing-a type constructor with Nomninal role), and hence unify.--}--eqCanRewrite :: EqRel -> EqRel -> Bool-eqCanRewrite NomEq  _      = True-eqCanRewrite ReprEq ReprEq = True-eqCanRewrite ReprEq NomEq  = False--eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool--- Can fr1 actually rewrite fr2?--- Very important function!--- See Note [eqCanRewrite]--- See Note [Wanteds do not rewrite Wanteds]--- See Note [Deriveds do rewrite Deriveds]-eqCanRewriteFR (Given,         r1)    (_,       r2)    = eqCanRewrite r1 r2-eqCanRewriteFR (Wanted WDeriv, NomEq) (Derived, NomEq) = True-eqCanRewriteFR (Derived,       NomEq) (Derived, NomEq) = True-eqCanRewriteFR _                      _                = False--eqMayRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool--- Is it /possible/ that fr1 can rewrite fr2?--- This is used when deciding which inerts to kick out,--- at which time a [WD] inert may be split into [W] and [D]-eqMayRewriteFR (Wanted WDeriv, NomEq) (Wanted WDeriv, NomEq) = True-eqMayRewriteFR (Derived,       NomEq) (Wanted WDeriv, NomEq) = True-eqMayRewriteFR fr1 fr2 = eqCanRewriteFR fr1 fr2--------------------{- Note [funEqCanDischarge]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have two CFunEqCans with the same LHS:-    (x1:F ts ~ f1) `funEqCanDischarge` (x2:F ts ~ f2)-Can we drop x2 in favour of x1, either unifying-f2 (if it's a flatten meta-var) or adding a new Given-(f1 ~ f2), if x2 is a Given?--Answer: yes if funEqCanDischarge is true.--}--funEqCanDischarge-  :: CtEvidence -> CtEvidence-  -> ( SwapFlag   -- NotSwapped => lhs can discharge rhs-                  -- Swapped    => rhs can discharge lhs-     , Bool)      -- True <=> upgrade non-discharded one-                  --          from [W] to [WD]--- See Note [funEqCanDischarge]-funEqCanDischarge ev1 ev2-  = ASSERT2( ctEvEqRel ev1 == NomEq, ppr ev1 )-    ASSERT2( ctEvEqRel ev2 == NomEq, ppr ev2 )-    -- CFunEqCans are all Nominal, hence asserts-    funEqCanDischargeF (ctEvFlavour ev1) (ctEvFlavour ev2)--funEqCanDischargeF :: CtFlavour -> CtFlavour -> (SwapFlag, Bool)-funEqCanDischargeF Given           _               = (NotSwapped, False)-funEqCanDischargeF _               Given           = (IsSwapped,  False)-funEqCanDischargeF (Wanted WDeriv) _               = (NotSwapped, False)-funEqCanDischargeF _               (Wanted WDeriv) = (IsSwapped,  True)-funEqCanDischargeF (Wanted WOnly)  (Wanted WOnly)  = (NotSwapped, False)-funEqCanDischargeF (Wanted WOnly)  Derived         = (NotSwapped, True)-funEqCanDischargeF Derived         (Wanted WOnly)  = (IsSwapped,  True)-funEqCanDischargeF Derived         Derived         = (NotSwapped, False)---{- Note [eqCanDischarge]-~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have two identical CTyEqCan equality constraints-(i.e. both LHS and RHS are the same)-      (x1:a~t) `eqCanDischarge` (xs:a~t)-Can we just drop x2 in favour of x1?--Answer: yes if eqCanDischarge is true.--Note that we do /not/ allow Wanted to discharge Derived.-We must keep both.  Why?  Because the Derived may rewrite-other Deriveds in the model whereas the Wanted cannot.--However a Wanted can certainly discharge an identical Wanted.  So-eqCanDischarge does /not/ define a can-rewrite relation in the-sense of Definition [Can-rewrite relation] in TcSMonad.--We /do/ say that a [W] can discharge a [WD].  In evidence terms it-certainly can, and the /caller/ arranges that the otherwise-lost [D]-is spat out as a new Derived.  -}--eqCanDischargeFR :: CtFlavourRole -> CtFlavourRole -> Bool--- See Note [eqCanDischarge]-eqCanDischargeFR (f1,r1) (f2, r2) =  eqCanRewrite r1 r2-                                  && eqCanDischargeF f1 f2--eqCanDischargeF :: CtFlavour -> CtFlavour -> Bool-eqCanDischargeF Given   _                  = True-eqCanDischargeF (Wanted _)      (Wanted _) = True-eqCanDischargeF (Wanted WDeriv) Derived    = True-eqCanDischargeF Derived         Derived    = True-eqCanDischargeF _               _          = False---{--************************************************************************-*                                                                      *-            SubGoalDepth-*                                                                      *-************************************************************************--Note [SubGoalDepth]-~~~~~~~~~~~~~~~~~~~-The 'SubGoalDepth' takes care of stopping the constraint solver from looping.--The counter starts at zero and increases. It includes dictionary constraints,-equality simplification, and type family reduction. (Why combine these? Because-it's actually quite easy to mistake one for another, in sufficiently involved-scenarios, like ConstraintKinds.)--The flag -fcontext-stack=n (not very well named!) fixes the maximium-level.--* The counter includes the depth of type class instance declarations.  Example:-     [W] d{7} : Eq [Int]-  That is d's dictionary-constraint depth is 7.  If we use the instance-     $dfEqList :: Eq a => Eq [a]-  to simplify it, we get-     d{7} = $dfEqList d'{8}-  where d'{8} : Eq Int, and d' has depth 8.--  For civilised (decidable) instance declarations, each increase of-  depth removes a type constructor from the type, so the depth never-  gets big; i.e. is bounded by the structural depth of the type.--* The counter also increments when resolving-equalities involving type functions. Example:-  Assume we have a wanted at depth 7:-    [W] d{7} : F () ~ a-  If there is a type function equation "F () = Int", this would be rewritten to-    [W] d{8} : Int ~ a-  and remembered as having depth 8.--  Again, without UndecidableInstances, this counter is bounded, but without it-  can resolve things ad infinitum. Hence there is a maximum level.--* Lastly, every time an equality is rewritten, the counter increases. Again,-  rewriting an equality constraint normally makes progress, but it's possible-  the "progress" is just the reduction of an infinitely-reducing type family.-  Hence we need to track the rewrites.--When compiling a program requires a greater depth, then GHC recommends turning-off this check entirely by setting -freduction-depth=0. This is because the-exact number that works is highly variable, and is likely to change even between-minor releases. Because this check is solely to prevent infinite compilation-times, it seems safe to disable it when a user has ascertained that their program-doesn't loop at the type level.---}---- | See Note [SubGoalDepth]-newtype SubGoalDepth = SubGoalDepth Int-  deriving (Eq, Ord, Outputable)--initialSubGoalDepth :: SubGoalDepth-initialSubGoalDepth = SubGoalDepth 0--bumpSubGoalDepth :: SubGoalDepth -> SubGoalDepth-bumpSubGoalDepth (SubGoalDepth n) = SubGoalDepth (n + 1)--maxSubGoalDepth :: SubGoalDepth -> SubGoalDepth -> SubGoalDepth-maxSubGoalDepth (SubGoalDepth n) (SubGoalDepth m) = SubGoalDepth (n `max` m)--subGoalDepthExceeded :: DynFlags -> SubGoalDepth -> Bool-subGoalDepthExceeded dflags (SubGoalDepth d)-  = mkIntWithInf d > reductionDepth dflags--{--************************************************************************-*                                                                      *-            CtLoc-*                                                                      *-************************************************************************--The 'CtLoc' gives information about where a constraint came from.-This is important for decent error message reporting because-dictionaries don't appear in the original source code.-type will evolve...---}--data CtLoc = CtLoc { ctl_origin :: CtOrigin-                   , ctl_env    :: TcLclEnv-                   , ctl_t_or_k :: Maybe TypeOrKind  -- OK if we're not sure-                   , ctl_depth  :: !SubGoalDepth }--  -- The TcLclEnv includes particularly-  --    source location:  tcl_loc   :: RealSrcSpan-  --    context:          tcl_ctxt  :: [ErrCtxt]-  --    binder stack:     tcl_bndrs :: TcBinderStack-  --    level:            tcl_tclvl :: TcLevel--mkKindLoc :: TcType -> TcType   -- original *types* being compared-          -> CtLoc -> CtLoc-mkKindLoc s1 s2 loc = setCtLocOrigin (toKindLoc loc)-                        (KindEqOrigin s1 (Just s2) (ctLocOrigin loc)-                                      (ctLocTypeOrKind_maybe loc))---- | Take a CtLoc and moves it to the kind level-toKindLoc :: CtLoc -> CtLoc-toKindLoc loc = loc { ctl_t_or_k = Just KindLevel }--mkGivenLoc :: TcLevel -> SkolemInfo -> TcLclEnv -> CtLoc-mkGivenLoc tclvl skol_info env-  = CtLoc { ctl_origin = GivenOrigin skol_info-          , ctl_env    = env { tcl_tclvl = tclvl }-          , ctl_t_or_k = Nothing    -- this only matters for error msgs-          , ctl_depth  = initialSubGoalDepth }--ctLocEnv :: CtLoc -> TcLclEnv-ctLocEnv = ctl_env--ctLocLevel :: CtLoc -> TcLevel-ctLocLevel loc = tcl_tclvl (ctLocEnv loc)--ctLocDepth :: CtLoc -> SubGoalDepth-ctLocDepth = ctl_depth--ctLocOrigin :: CtLoc -> CtOrigin-ctLocOrigin = ctl_origin--ctLocSpan :: CtLoc -> RealSrcSpan-ctLocSpan (CtLoc { ctl_env = lcl}) = tcl_loc lcl--ctLocTypeOrKind_maybe :: CtLoc -> Maybe TypeOrKind-ctLocTypeOrKind_maybe = ctl_t_or_k--setCtLocSpan :: CtLoc -> RealSrcSpan -> CtLoc-setCtLocSpan ctl@(CtLoc { ctl_env = lcl }) loc = setCtLocEnv ctl (lcl { tcl_loc = loc })--bumpCtLocDepth :: CtLoc -> CtLoc-bumpCtLocDepth loc@(CtLoc { ctl_depth = d }) = loc { ctl_depth = bumpSubGoalDepth d }--setCtLocOrigin :: CtLoc -> CtOrigin -> CtLoc-setCtLocOrigin ctl orig = ctl { ctl_origin = orig }--updateCtLocOrigin :: CtLoc -> (CtOrigin -> CtOrigin) -> CtLoc-updateCtLocOrigin ctl@(CtLoc { ctl_origin = orig }) upd-  = ctl { ctl_origin = upd orig }--setCtLocEnv :: CtLoc -> TcLclEnv -> CtLoc-setCtLocEnv ctl env = ctl { ctl_env = env }--pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc-pushErrCtxt o err loc@(CtLoc { ctl_env = lcl })-  = loc { ctl_origin = o, ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }--pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc--- Just add information w/o updating the origin!-pushErrCtxtSameOrigin err loc@(CtLoc { ctl_env = lcl })-  = loc { ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }--{--************************************************************************-*                                                                      *-                SkolemInfo-*                                                                      *-************************************************************************--}---- SkolemInfo gives the origin of *given* constraints---   a) type variables are skolemised---   b) an implication constraint is generated-data SkolemInfo-  = SigSkol -- A skolem that is created by instantiating-            -- a programmer-supplied type signature-            -- Location of the binding site is on the TyVar-            -- See Note [SigSkol SkolemInfo]-       UserTypeCtxt        -- What sort of signature-       TcType              -- Original type signature (before skolemisation)-       [(Name,TcTyVar)]    -- Maps the original name of the skolemised tyvar-                           -- to its instantiated version--  | SigTypeSkol UserTypeCtxt-                 -- like SigSkol, but when we're kind-checking the *type*-                 -- hence, we have less info--  | ForAllSkol SDoc     -- Bound by a user-written "forall".--  | DerivSkol Type      -- Bound by a 'deriving' clause;-                        -- the type is the instance we are trying to derive--  | InstSkol            -- Bound at an instance decl-  | InstSC TypeSize     -- A "given" constraint obtained by superclass selection.-                        -- If (C ty1 .. tyn) is the largest class from-                        --    which we made a superclass selection in the chain,-                        --    then TypeSize = sizeTypes [ty1, .., tyn]-                        -- See Note [Solving superclass constraints] in TcInstDcls--  | FamInstSkol         -- Bound at a family instance decl-  | PatSkol             -- An existential type variable bound by a pattern for-      ConLike           -- a data constructor with an existential type.-      (HsMatchContext Name)-             -- e.g.   data T = forall a. Eq a => MkT a-             --        f (MkT x) = ...-             -- The pattern MkT x will allocate an existential type-             -- variable for 'a'.--  | ArrowSkol           -- An arrow form (see TcArrows)--  | IPSkol [HsIPName]   -- Binding site of an implicit parameter--  | RuleSkol RuleName   -- The LHS of a RULE--  | InferSkol [(Name,TcType)]-                        -- We have inferred a type for these (mutually-recursivive)-                        -- polymorphic Ids, and are now checking that their RHS-                        -- constraints are satisfied.--  | BracketSkol         -- Template Haskell bracket--  | UnifyForAllSkol     -- We are unifying two for-all types-       TcType           -- The instantiated type *inside* the forall--  | TyConSkol TyConFlavour Name  -- bound in a type declaration of the given flavour--  | DataConSkol Name    -- bound as an existential in a Haskell98 datacon decl or-                        -- as any variable in a GADT datacon decl--  | ReifySkol           -- Bound during Template Haskell reification--  | QuantCtxtSkol       -- Quantified context, e.g.-                        --   f :: forall c. (forall a. c a => c [a]) => blah--  | UnkSkol             -- Unhelpful info (until I improve it)--instance Outputable SkolemInfo where-  ppr = pprSkolInfo--pprSkolInfo :: SkolemInfo -> SDoc--- Complete the sentence "is a rigid type variable bound by..."-pprSkolInfo (SigSkol cx ty _) = pprSigSkolInfo cx ty-pprSkolInfo (SigTypeSkol cx)  = pprUserTypeCtxt cx-pprSkolInfo (ForAllSkol doc)  = quotes doc-pprSkolInfo (IPSkol ips)      = text "the implicit-parameter binding" <> plural ips <+> text "for"-                                 <+> pprWithCommas ppr ips-pprSkolInfo (DerivSkol pred)  = text "the deriving clause for" <+> quotes (ppr pred)-pprSkolInfo InstSkol          = text "the instance declaration"-pprSkolInfo (InstSC n)        = text "the instance declaration" <> whenPprDebug (parens (ppr n))-pprSkolInfo FamInstSkol       = text "a family instance declaration"-pprSkolInfo BracketSkol       = text "a Template Haskell bracket"-pprSkolInfo (RuleSkol name)   = text "the RULE" <+> pprRuleName name-pprSkolInfo ArrowSkol         = text "an arrow form"-pprSkolInfo (PatSkol cl mc)   = sep [ pprPatSkolInfo cl-                                    , text "in" <+> pprMatchContext mc ]-pprSkolInfo (InferSkol ids)   = hang (text "the inferred type" <> plural ids <+> text "of")-                                   2 (vcat [ ppr name <+> dcolon <+> ppr ty-                                                   | (name,ty) <- ids ])-pprSkolInfo (UnifyForAllSkol ty) = text "the type" <+> ppr ty-pprSkolInfo (TyConSkol flav name) = text "the" <+> ppr flav <+> text "declaration for" <+> quotes (ppr name)-pprSkolInfo (DataConSkol name)= text "the data constructor" <+> quotes (ppr name)-pprSkolInfo ReifySkol         = text "the type being reified"--pprSkolInfo (QuantCtxtSkol {}) = text "a quantified context"---- UnkSkol--- For type variables the others are dealt with by pprSkolTvBinding.--- For Insts, these cases should not happen-pprSkolInfo UnkSkol = WARN( True, text "pprSkolInfo: UnkSkol" ) text "UnkSkol"--pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc--- The type is already tidied-pprSigSkolInfo ctxt ty-  = case ctxt of-       FunSigCtxt f _ -> vcat [ text "the type signature for:"-                              , nest 2 (pprPrefixOcc f <+> dcolon <+> ppr ty) ]-       PatSynCtxt {}  -> pprUserTypeCtxt ctxt  -- See Note [Skolem info for pattern synonyms]-       _              -> vcat [ pprUserTypeCtxt ctxt <> colon-                              , nest 2 (ppr ty) ]--pprPatSkolInfo :: ConLike -> SDoc-pprPatSkolInfo (RealDataCon dc)-  = sep [ text "a pattern with constructor:"-        , nest 2 $ ppr dc <+> dcolon-          <+> pprType (dataConUserType dc) <> comma ]-          -- pprType prints forall's regardless of -fprint-explicit-foralls-          -- which is what we want here, since we might be saying-          -- type variable 't' is bound by ...--pprPatSkolInfo (PatSynCon ps)-  = sep [ text "a pattern with pattern synonym:"-        , nest 2 $ ppr ps <+> dcolon-                   <+> pprPatSynType ps <> comma ]--{- Note [Skolem info for pattern synonyms]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For pattern synonym SkolemInfo we have-   SigSkol (PatSynCtxt p) ty _-but the type 'ty' is not very helpful.  The full pattern-synonym type-has the provided and required pieces, which it is inconvenient to-record and display here. So we simply don't display the type at all,-contenting outselves with just the name of the pattern synonym, which-is fine.  We could do more, but it doesn't seem worth it.--Note [SigSkol SkolemInfo]-~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we (deeply) skolemise a type-   f :: forall a. a -> forall b. b -> a-Then we'll instantiate [a :-> a', b :-> b'], and with the instantiated-      a' -> b' -> a.-But when, in an error message, we report that "b is a rigid type-variable bound by the type signature for f", we want to show the foralls-in the right place.  So we proceed as follows:--* In SigSkol we record-    - the original signature forall a. a -> forall b. b -> a-    - the instantiation mapping [a :-> a', b :-> b']--* Then when tidying in TcMType.tidySkolemInfo, we first tidy a' to-  whatever it tidies to, say a''; and then we walk over the type-  replacing the binder a by the tidied version a'', to give-       forall a''. a'' -> forall b''. b'' -> a''-  We need to do this under function arrows, to match what deeplySkolemise-  does.--* Typically a'' will have a nice pretty name like "a", but the point is-  that the foral-bound variables of the signature we report line up with-  the instantiated skolems lying  around in other types.---************************************************************************-*                                                                      *-            CtOrigin-*                                                                      *-************************************************************************--}--data CtOrigin-  = GivenOrigin SkolemInfo--  -- All the others are for *wanted* constraints-  | OccurrenceOf Name              -- Occurrence of an overloaded identifier-  | OccurrenceOfRecSel RdrName     -- Occurrence of a record selector-  | AppOrigin                      -- An application of some kind--  | SpecPragOrigin UserTypeCtxt    -- Specialisation pragma for-                                   -- function or instance--  | TypeEqOrigin { uo_actual   :: TcType-                 , uo_expected :: TcType-                 , uo_thing    :: Maybe SDoc-                       -- ^ The thing that has type "actual"-                 , uo_visible  :: Bool-                       -- ^ Is at least one of the three elements above visible?-                       -- (Errors from the polymorphic subsumption check are considered-                       -- visible.) Only used for prioritizing error messages.-                 }--  | KindEqOrigin  -- See Note [Equalities with incompatible kinds] in TcCanonical.-      TcType (Maybe TcType)     -- A kind equality arising from unifying these two types-      CtOrigin                  -- originally arising from this-      (Maybe TypeOrKind)        -- the level of the eq this arises from--  | IPOccOrigin  HsIPName       -- Occurrence of an implicit parameter-  | OverLabelOrigin FastString  -- Occurrence of an overloaded label--  | LiteralOrigin (HsOverLit GhcRn)     -- Occurrence of a literal-  | NegateOrigin                        -- Occurrence of syntactic negation--  | ArithSeqOrigin (ArithSeqInfo GhcRn) -- [x..], [x..y] etc-  | AssocFamPatOrigin   -- When matching the patterns of an associated-                        -- family instance with that of its parent class-  | SectionOrigin-  | TupleOrigin         -- (..,..)-  | ExprSigOrigin       -- e :: ty-  | PatSigOrigin        -- p :: ty-  | PatOrigin           -- Instantiating a polytyped pattern at a constructor-  | ProvCtxtOrigin      -- The "provided" context of a pattern synonym signature-        (PatSynBind GhcRn GhcRn) -- Information about the pattern synonym, in-                                 -- particular the name and the right-hand side-  | RecordUpdOrigin-  | ViewPatOrigin--  | ScOrigin TypeSize   -- Typechecking superclasses of an instance declaration-                        -- If the instance head is C ty1 .. tyn-                        --    then TypeSize = sizeTypes [ty1, .., tyn]-                        -- See Note [Solving superclass constraints] in TcInstDcls--  | DerivClauseOrigin   -- Typechecking a deriving clause (as opposed to-                        -- standalone deriving).-  | DerivOriginDC DataCon Int Bool-      -- Checking constraints arising from this data con and field index. The-      -- Bool argument in DerivOriginDC and DerivOriginCoerce is True if-      -- standalong deriving (with a wildcard constraint) is being used. This-      -- is used to inform error messages on how to recommended fixes (e.g., if-      -- the argument is True, then don't recommend "use standalone deriving",-      -- but rather "fill in the wildcard constraint yourself").-      -- See Note [Inferring the instance context] in TcDerivInfer-  | DerivOriginCoerce Id Type Type Bool-                        -- DerivOriginCoerce id ty1 ty2: Trying to coerce class method `id` from-                        -- `ty1` to `ty2`.-  | StandAloneDerivOrigin -- Typechecking stand-alone deriving. Useful for-                          -- constraints coming from a wildcard constraint,-                          -- e.g., deriving instance _ => Eq (Foo a)-                          -- See Note [Inferring the instance context]-                          -- in TcDerivInfer-  | DefaultOrigin       -- Typechecking a default decl-  | DoOrigin            -- Arising from a do expression-  | DoPatOrigin (LPat GhcRn) -- Arising from a failable pattern in-                             -- a do expression-  | MCompOrigin         -- Arising from a monad comprehension-  | MCompPatOrigin (LPat GhcRn) -- Arising from a failable pattern in a-                                -- monad comprehension-  | IfOrigin            -- Arising from an if statement-  | ProcOrigin          -- Arising from a proc expression-  | AnnOrigin           -- An annotation--  | FunDepOrigin1       -- A functional dependency from combining-        PredType CtLoc      -- This constraint arising from ...-        PredType CtLoc      -- and this constraint arising from ...--  | FunDepOrigin2       -- A functional dependency from combining-        PredType CtOrigin   -- This constraint arising from ...-        PredType SrcSpan    -- and this top-level instance-        -- We only need a CtOrigin on the first, because the location-        -- is pinned on the entire error message--  | HoleOrigin-  | UnboundOccurrenceOf OccName-  | ListOrigin          -- An overloaded list-  | StaticOrigin        -- A static form-  | FailablePattern (LPat GhcTcId) -- A failable pattern in do-notation for the-                                   -- MonadFail Proposal (MFP). Obsolete when-                                   -- actual desugaring to MonadFail.fail is-                                   -- live.-  | Shouldn'tHappenOrigin String-                            -- the user should never see this one,-                            -- unless ImpredicativeTypes is on, where all-                            -- bets are off-  | InstProvidedOrigin Module ClsInst-        -- Skolem variable arose when we were testing if an instance-        -- is solvable or not.---- | Flag to see whether we're type-checking terms or kind-checking types-data TypeOrKind = TypeLevel | KindLevel-  deriving Eq--instance Outputable TypeOrKind where-  ppr TypeLevel = text "TypeLevel"-  ppr KindLevel = text "KindLevel"--isTypeLevel :: TypeOrKind -> Bool-isTypeLevel TypeLevel = True-isTypeLevel KindLevel = False--isKindLevel :: TypeOrKind -> Bool-isKindLevel TypeLevel = False-isKindLevel KindLevel = True---- An origin is visible if the place where the constraint arises is manifest--- in user code. Currently, all origins are visible except for invisible--- TypeEqOrigins. This is used when choosing which error of--- several to report-isVisibleOrigin :: CtOrigin -> Bool-isVisibleOrigin (TypeEqOrigin { uo_visible = vis }) = vis-isVisibleOrigin (KindEqOrigin _ _ sub_orig _)       = isVisibleOrigin sub_orig-isVisibleOrigin _                                   = True---- Converts a visible origin to an invisible one, if possible. Currently,--- this works only for TypeEqOrigin-toInvisibleOrigin :: CtOrigin -> CtOrigin-toInvisibleOrigin orig@(TypeEqOrigin {}) = orig { uo_visible = False }-toInvisibleOrigin orig                   = orig--instance Outputable CtOrigin where-  ppr = pprCtOrigin--ctoHerald :: SDoc-ctoHerald = text "arising from"---- | Extract a suitable CtOrigin from a HsExpr-lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin-lexprCtOrigin (L _ e) = exprCtOrigin e--exprCtOrigin :: HsExpr GhcRn -> CtOrigin-exprCtOrigin (HsVar _ (L _ name)) = OccurrenceOf name-exprCtOrigin (HsUnboundVar _ uv)  = UnboundOccurrenceOf (unboundVarOcc uv)-exprCtOrigin (HsConLikeOut {})    = panic "exprCtOrigin HsConLikeOut"-exprCtOrigin (HsRecFld _ f)    = OccurrenceOfRecSel (rdrNameAmbiguousFieldOcc f)-exprCtOrigin (HsOverLabel _ _ l)  = OverLabelOrigin l-exprCtOrigin (HsIPVar _ ip)       = IPOccOrigin ip-exprCtOrigin (HsOverLit _ lit)    = LiteralOrigin lit-exprCtOrigin (HsLit {})           = Shouldn'tHappenOrigin "concrete literal"-exprCtOrigin (HsLam _ matches)    = matchesCtOrigin matches-exprCtOrigin (HsLamCase _ ms)     = matchesCtOrigin ms-exprCtOrigin (HsApp _ e1 _)       = lexprCtOrigin e1-exprCtOrigin (HsAppType _ e1 _)   = lexprCtOrigin e1-exprCtOrigin (OpApp _ _ op _)     = lexprCtOrigin op-exprCtOrigin (NegApp _ e _)       = lexprCtOrigin e-exprCtOrigin (HsPar _ e)          = lexprCtOrigin e-exprCtOrigin (SectionL _ _ _)     = SectionOrigin-exprCtOrigin (SectionR _ _ _)     = SectionOrigin-exprCtOrigin (ExplicitTuple {})   = Shouldn'tHappenOrigin "explicit tuple"-exprCtOrigin ExplicitSum{}        = Shouldn'tHappenOrigin "explicit sum"-exprCtOrigin (HsCase _ _ matches) = matchesCtOrigin matches-exprCtOrigin (HsIf _ (Just syn) _ _ _) = exprCtOrigin (syn_expr syn)-exprCtOrigin (HsIf {})           = Shouldn'tHappenOrigin "if expression"-exprCtOrigin (HsMultiIf _ rhs)   = lGRHSCtOrigin rhs-exprCtOrigin (HsLet _ _ e)       = lexprCtOrigin e-exprCtOrigin (HsDo {})           = DoOrigin-exprCtOrigin (ExplicitList {})   = Shouldn'tHappenOrigin "list"-exprCtOrigin (RecordCon {})      = Shouldn'tHappenOrigin "record construction"-exprCtOrigin (RecordUpd {})      = Shouldn'tHappenOrigin "record update"-exprCtOrigin (ExprWithTySig {})  = ExprSigOrigin-exprCtOrigin (ArithSeq {})       = Shouldn'tHappenOrigin "arithmetic sequence"-exprCtOrigin (HsSCC _ _ _ e)     = lexprCtOrigin e-exprCtOrigin (HsCoreAnn _ _ _ e) = lexprCtOrigin e-exprCtOrigin (HsBracket {})      = Shouldn'tHappenOrigin "TH bracket"-exprCtOrigin (HsRnBracketOut {})= Shouldn'tHappenOrigin "HsRnBracketOut"-exprCtOrigin (HsTcBracketOut {})= panic "exprCtOrigin HsTcBracketOut"-exprCtOrigin (HsSpliceE {})      = Shouldn'tHappenOrigin "TH splice"-exprCtOrigin (HsProc {})         = Shouldn'tHappenOrigin "proc"-exprCtOrigin (HsStatic {})       = Shouldn'tHappenOrigin "static expression"-exprCtOrigin (HsArrApp {})       = panic "exprCtOrigin HsArrApp"-exprCtOrigin (HsArrForm {})      = panic "exprCtOrigin HsArrForm"-exprCtOrigin (HsTick _ _ e)           = lexprCtOrigin e-exprCtOrigin (HsBinTick _ _ _ e)      = lexprCtOrigin e-exprCtOrigin (HsTickPragma _ _ _ _ e) = lexprCtOrigin e-exprCtOrigin (EWildPat {})      = panic "exprCtOrigin EWildPat"-exprCtOrigin (EAsPat {})        = panic "exprCtOrigin EAsPat"-exprCtOrigin (EViewPat {})      = panic "exprCtOrigin EViewPat"-exprCtOrigin (ELazyPat {})      = panic "exprCtOrigin ELazyPat"-exprCtOrigin (HsWrap {})        = panic "exprCtOrigin HsWrap"-exprCtOrigin (XExpr {})         = panic "exprCtOrigin XExpr"---- | Extract a suitable CtOrigin from a MatchGroup-matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin-matchesCtOrigin (MG { mg_alts = alts })-  | L _ [L _ match] <- alts-  , Match { m_grhss = grhss } <- match-  = grhssCtOrigin grhss--  | otherwise-  = Shouldn'tHappenOrigin "multi-way match"-matchesCtOrigin (XMatchGroup{}) = panic "matchesCtOrigin"---- | Extract a suitable CtOrigin from guarded RHSs-grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin-grhssCtOrigin (GRHSs { grhssGRHSs = lgrhss }) = lGRHSCtOrigin lgrhss-grhssCtOrigin (XGRHSs _) = panic "grhssCtOrigin"---- | Extract a suitable CtOrigin from a list of guarded RHSs-lGRHSCtOrigin :: [LGRHS GhcRn (LHsExpr GhcRn)] -> CtOrigin-lGRHSCtOrigin [L _ (GRHS _ _ (L _ e))] = exprCtOrigin e-lGRHSCtOrigin [L _ (XGRHS _)] = panic "lGRHSCtOrigin"-lGRHSCtOrigin _ = Shouldn'tHappenOrigin "multi-way GRHS"--pprCtLoc :: CtLoc -> SDoc--- "arising from ... at ..."--- Not an instance of Outputable because of the "arising from" prefix-pprCtLoc (CtLoc { ctl_origin = o, ctl_env = lcl})-  = sep [ pprCtOrigin o-        , text "at" <+> ppr (tcl_loc lcl)]--pprCtOrigin :: CtOrigin -> SDoc--- "arising from ..."--- Not an instance of Outputable because of the "arising from" prefix-pprCtOrigin (GivenOrigin sk) = ctoHerald <+> ppr sk--pprCtOrigin (SpecPragOrigin ctxt)-  = case ctxt of-       FunSigCtxt n _ -> text "a SPECIALISE pragma for" <+> quotes (ppr n)-       SpecInstCtxt   -> text "a SPECIALISE INSTANCE pragma"-       _              -> text "a SPECIALISE pragma"  -- Never happens I think--pprCtOrigin (FunDepOrigin1 pred1 loc1 pred2 loc2)-  = hang (ctoHerald <+> text "a functional dependency between constraints:")-       2 (vcat [ hang (quotes (ppr pred1)) 2 (pprCtLoc loc1)-               , hang (quotes (ppr pred2)) 2 (pprCtLoc loc2) ])--pprCtOrigin (FunDepOrigin2 pred1 orig1 pred2 loc2)-  = hang (ctoHerald <+> text "a functional dependency between:")-       2 (vcat [ hang (text "constraint" <+> quotes (ppr pred1))-                    2 (pprCtOrigin orig1 )-               , hang (text "instance" <+> quotes (ppr pred2))-                    2 (text "at" <+> ppr loc2) ])--pprCtOrigin (KindEqOrigin t1 (Just t2) _ _)-  = hang (ctoHerald <+> text "a kind equality arising from")-       2 (sep [ppr t1, char '~', ppr t2])--pprCtOrigin AssocFamPatOrigin-  = text "when matching a family LHS with its class instance head"--pprCtOrigin (KindEqOrigin t1 Nothing _ _)-  = hang (ctoHerald <+> text "a kind equality when matching")-       2 (ppr t1)--pprCtOrigin (UnboundOccurrenceOf name)-  = ctoHerald <+> text "an undeclared identifier" <+> quotes (ppr name)--pprCtOrigin (DerivOriginDC dc n _)-  = hang (ctoHerald <+> text "the" <+> speakNth n-          <+> text "field of" <+> quotes (ppr dc))-       2 (parens (text "type" <+> quotes (ppr ty)))-  where-    ty = dataConOrigArgTys dc !! (n-1)--pprCtOrigin (DerivOriginCoerce meth ty1 ty2 _)-  = hang (ctoHerald <+> text "the coercion of the method" <+> quotes (ppr meth))-       2 (sep [ text "from type" <+> quotes (ppr ty1)-              , nest 2 $ text "to type" <+> quotes (ppr ty2) ])--pprCtOrigin (DoPatOrigin pat)-    = ctoHerald <+> text "a do statement"-      $$-      text "with the failable pattern" <+> quotes (ppr pat)--pprCtOrigin (MCompPatOrigin pat)-    = ctoHerald <+> hsep [ text "the failable pattern"-           , quotes (ppr pat)-           , text "in a statement in a monad comprehension" ]-pprCtOrigin (FailablePattern pat)-    = ctoHerald <+> text "the failable pattern" <+> quotes (ppr pat)-      $$-      text "(this will become an error in a future GHC release)"--pprCtOrigin (Shouldn'tHappenOrigin note)-  = sdocWithDynFlags $ \dflags ->-    if xopt LangExt.ImpredicativeTypes dflags-    then text "a situation created by impredicative types"-    else-    vcat [ text "<< This should not appear in error messages. If you see this"-         , text "in an error message, please report a bug mentioning" <+> quotes (text note) <+> text "at"-         , text "https://ghc.haskell.org/trac/ghc/wiki/ReportABug >>" ]--pprCtOrigin (ProvCtxtOrigin PSB{ psb_id = (L _ name) })-  = hang (ctoHerald <+> text "the \"provided\" constraints claimed by")-       2 (text "the signature of" <+> quotes (ppr name))--pprCtOrigin (InstProvidedOrigin mod cls_inst)-  = vcat [ text "arising when attempting to show that"-         , ppr cls_inst-         , text "is provided by" <+> quotes (ppr mod)]--pprCtOrigin simple_origin-  = ctoHerald <+> pprCtO simple_origin---- | Short one-liners-pprCtO :: CtOrigin -> SDoc-pprCtO (OccurrenceOf name)   = hsep [text "a use of", quotes (ppr name)]-pprCtO (OccurrenceOfRecSel name) = hsep [text "a use of", quotes (ppr name)]-pprCtO AppOrigin             = text "an application"-pprCtO (IPOccOrigin name)    = hsep [text "a use of implicit parameter", quotes (ppr name)]-pprCtO (OverLabelOrigin l)   = hsep [text "the overloaded label"-                                    ,quotes (char '#' <> ppr l)]-pprCtO RecordUpdOrigin       = text "a record update"-pprCtO ExprSigOrigin         = text "an expression type signature"-pprCtO PatSigOrigin          = text "a pattern type signature"-pprCtO PatOrigin             = text "a pattern"-pprCtO ViewPatOrigin         = text "a view pattern"-pprCtO IfOrigin              = text "an if expression"-pprCtO (LiteralOrigin lit)   = hsep [text "the literal", quotes (ppr lit)]-pprCtO (ArithSeqOrigin seq)  = hsep [text "the arithmetic sequence", quotes (ppr seq)]-pprCtO SectionOrigin         = text "an operator section"-pprCtO AssocFamPatOrigin     = text "the LHS of a famly instance"-pprCtO TupleOrigin           = text "a tuple"-pprCtO NegateOrigin          = text "a use of syntactic negation"-pprCtO (ScOrigin n)          = text "the superclasses of an instance declaration"-                               <> whenPprDebug (parens (ppr n))-pprCtO DerivClauseOrigin     = text "the 'deriving' clause of a data type declaration"-pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"-pprCtO DefaultOrigin         = text "a 'default' declaration"-pprCtO DoOrigin              = text "a do statement"-pprCtO MCompOrigin           = text "a statement in a monad comprehension"-pprCtO ProcOrigin            = text "a proc expression"-pprCtO (TypeEqOrigin t1 t2 _ _)= text "a type equality" <+> sep [ppr t1, char '~', ppr t2]-pprCtO AnnOrigin             = text "an annotation"-pprCtO HoleOrigin            = text "a use of" <+> quotes (text "_")-pprCtO ListOrigin            = text "an overloaded list"-pprCtO StaticOrigin          = text "a static form"-pprCtO _                     = panic "pprCtOrigin"--{--Constraint Solver Plugins----------------------------}--type TcPluginSolver = [Ct]    -- given-                   -> [Ct]    -- derived-                   -> [Ct]    -- wanted-                   -> TcPluginM TcPluginResult--newtype TcPluginM a = TcPluginM (EvBindsVar -> TcM a)--instance Functor TcPluginM where-  fmap = liftM--instance Applicative TcPluginM where-  pure x = TcPluginM (const $ pure x)-  (<*>) = ap--instance Monad TcPluginM where-#if !MIN_VERSION_base(4,13,0)-  fail = MonadFail.fail-#endif-  TcPluginM m >>= k =-    TcPluginM (\ ev -> do a <- m ev-                          runTcPluginM (k a) ev)--instance MonadFail.MonadFail TcPluginM where-  fail x   = TcPluginM (const $ fail x)--runTcPluginM :: TcPluginM a -> EvBindsVar -> TcM a-runTcPluginM (TcPluginM m) = m---- | This function provides an escape for direct access to--- the 'TcM` monad.  It should not be used lightly, and--- the provided 'TcPluginM' API should be favoured instead.-unsafeTcPluginTcM :: TcM a -> TcPluginM a-unsafeTcPluginTcM = TcPluginM . const---- | Access the 'EvBindsVar' carried by the 'TcPluginM' during--- constraint solving.  Returns 'Nothing' if invoked during--- 'tcPluginInit' or 'tcPluginStop'.-getEvBindsTcPluginM :: TcPluginM EvBindsVar-getEvBindsTcPluginM = TcPluginM return---data TcPlugin = forall s. TcPlugin-  { tcPluginInit  :: TcPluginM s-    -- ^ Initialize plugin, when entering type-checker.--  , tcPluginSolve :: s -> TcPluginSolver-    -- ^ Solve some constraints.-    -- TODO: WRITE MORE DETAILS ON HOW THIS WORKS.--  , tcPluginStop  :: s -> TcPluginM ()-   -- ^ Clean up after the plugin, when exiting the type-checker.-  }--data TcPluginResult-  = TcPluginContradiction [Ct]-    -- ^ The plugin found a contradiction.-    -- The returned constraints are removed from the inert set,-    -- and recorded as insoluble.--  | TcPluginOk [(EvTerm,Ct)] [Ct]-    -- ^ The first field is for constraints that were solved.-    -- These are removed from the inert set,-    -- and the evidence for them is recorded.-    -- The second field contains new work, that should be processed by-    -- the constraint solver.--{- *********************************************************************-*                                                                      *-                        Role annotations-*                                                                      *-********************************************************************* -}--type RoleAnnotEnv = NameEnv (LRoleAnnotDecl GhcRn)--mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv-mkRoleAnnotEnv role_annot_decls- = mkNameEnv [ (name, ra_decl)-             | ra_decl <- role_annot_decls-             , let name = roleAnnotDeclName (unLoc ra_decl)-             , not (isUnboundName name) ]-       -- Some of the role annots will be unbound;-       -- we don't wish to include these--emptyRoleAnnotEnv :: RoleAnnotEnv-emptyRoleAnnotEnv = emptyNameEnv--lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn)-lookupRoleAnnot = lookupNameEnv--getRoleAnnots :: [Name] -> RoleAnnotEnv-              -> ([LRoleAnnotDecl GhcRn], RoleAnnotEnv)-getRoleAnnots bndrs role_env-  = ( mapMaybe (lookupRoleAnnot role_env) bndrs-    , delListFromNameEnv role_env bndrs )+{-# LANGUAGE CPP, DeriveFunctor, ExistentialQuantification, GeneralizedNewtypeDeriving,+             ViewPatterns #-}++module TcRnTypes(+        TcRnIf, TcRn, TcM, RnM, IfM, IfL, IfG, -- The monad is opaque outside this module+        TcRef,++        -- The environment types+        Env(..),+        TcGblEnv(..), TcLclEnv(..),+        setLclEnvTcLevel, getLclEnvTcLevel,+        setLclEnvLoc, getLclEnvLoc,+        IfGblEnv(..), IfLclEnv(..),+        tcVisibleOrphanMods,++        -- Frontend types (shouldn't really be here)+        FrontendResult(..),++        -- Renamer types+        ErrCtxt, RecFieldEnv, pushErrCtxt, pushErrCtxtSameOrigin,+        ImportAvails(..), emptyImportAvails, plusImportAvails,+        WhereFrom(..), mkModDeps, modDepsElts,++        -- Typechecker types+        TcTypeEnv, TcBinderStack, TcBinder(..),+        TcTyThing(..), PromotionErr(..),+        IdBindingInfo(..), ClosedTypeId, RhsNames,+        IsGroupClosed(..),+        SelfBootInfo(..),+        pprTcTyThingCategory, pprPECategory, CompleteMatch(..),++        -- Desugaring types+        DsM, DsLclEnv(..), DsGblEnv(..),+        DsMetaEnv, DsMetaVal(..), CompleteMatchMap,+        mkCompleteMatchMap, extendCompleteMatchMap,++        -- Template Haskell+        ThStage(..), SpliceType(..), PendingStuff(..),+        topStage, topAnnStage, topSpliceStage,+        ThLevel, impLevel, outerLevel, thLevel,+        ForeignSrcLang(..),++        -- Arrows+        ArrowCtxt(..),++        -- TcSigInfo+        TcSigFun, TcSigInfo(..), TcIdSigInfo(..),+        TcIdSigInst(..), TcPatSynInfo(..),+        isPartialSig, hasCompleteSig,++        -- Misc other types+        TcId, TcIdSet,+        Hole(..), holeOcc,+        NameShape(..),+        removeBindingShadowing,++        -- Constraint solver plugins+        TcPlugin(..), TcPluginResult(..), TcPluginSolver,+        TcPluginM, runTcPluginM, unsafeTcPluginTcM,+        getEvBindsTcPluginM,++        -- Role annotations+        RoleAnnotEnv, emptyRoleAnnotEnv, mkRoleAnnotEnv,+        lookupRoleAnnot, getRoleAnnots+  ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.Hs+import HscTypes+import TcEvidence+import Type+import TyCon    ( TyCon, tyConKind )+import PatSyn   ( PatSyn )+import Id       ( idType, idName )+import FieldLabel ( FieldLabel )+import TcType+import Constraint+import TcOrigin+import Annotations+import InstEnv+import FamInstEnv+import {-# SOURCE #-} GHC.HsToCore.PmCheck.Types (Delta)+import IOEnv+import RdrName+import Name+import NameEnv+import NameSet+import Avail+import Var+import VarEnv+import Module+import SrcLoc+import VarSet+import ErrUtils+import UniqFM+import BasicTypes+import Bag+import DynFlags+import Outputable+import ListSetOps+import Fingerprint+import Util+import PrelNames ( isUnboundName )+import CostCentreState++import Control.Monad (ap)+import qualified Control.Monad.Fail as MonadFail+import Data.Set      ( Set )+import qualified Data.Set as S++import Data.List ( sort )+import Data.Map ( Map )+import Data.Dynamic  ( Dynamic )+import Data.Typeable ( TypeRep )+import Data.Maybe    ( mapMaybe )+import GHCi.Message+import GHCi.RemoteTypes++import {-# SOURCE #-} TcHoleFitTypes ( HoleFitPlugin )++import qualified Language.Haskell.TH as TH++-- | A 'NameShape' is a substitution on 'Name's that can be used+-- to refine the identities of a hole while we are renaming interfaces+-- (see 'RnModIface').  Specifically, a 'NameShape' for+-- 'ns_module_name' @A@, defines a mapping from @{A.T}@+-- (for some 'OccName' @T@) to some arbitrary other 'Name'.+--+-- The most intruiging thing about a 'NameShape', however, is+-- how it's constructed.  A 'NameShape' is *implied* by the+-- exported 'AvailInfo's of the implementor of an interface:+-- if an implementor of signature @<H>@ exports @M.T@, you implicitly+-- define a substitution from @{H.T}@ to @M.T@.  So a 'NameShape'+-- is computed from the list of 'AvailInfo's that are exported+-- by the implementation of a module, or successively merged+-- together by the export lists of signatures which are joining+-- together.+--+-- It's not the most obvious way to go about doing this, but it+-- does seem to work!+--+-- NB: Can't boot this and put it in NameShape because then we+-- start pulling in too many DynFlags things.+data NameShape = NameShape {+        ns_mod_name :: ModuleName,+        ns_exports :: [AvailInfo],+        ns_map :: OccEnv Name+    }+++{-+************************************************************************+*                                                                      *+               Standard monad definition for TcRn+    All the combinators for the monad can be found in TcRnMonad+*                                                                      *+************************************************************************++The monad itself has to be defined here, because it is mentioned by ErrCtxt+-}++type TcRnIf a b = IOEnv (Env a b)+type TcRn       = TcRnIf TcGblEnv TcLclEnv    -- Type inference+type IfM lcl    = TcRnIf IfGblEnv lcl         -- Iface stuff+type IfG        = IfM ()                      --    Top level+type IfL        = IfM IfLclEnv                --    Nested+type DsM        = TcRnIf DsGblEnv DsLclEnv    -- Desugaring++-- TcRn is the type-checking and renaming monad: the main monad that+-- most type-checking takes place in.  The global environment is+-- 'TcGblEnv', which tracks all of the top-level type-checking+-- information we've accumulated while checking a module, while the+-- local environment is 'TcLclEnv', which tracks local information as+-- we move inside expressions.++-- | Historical "renaming monad" (now it's just 'TcRn').+type RnM  = TcRn++-- | Historical "type-checking monad" (now it's just 'TcRn').+type TcM  = TcRn++-- We 'stack' these envs through the Reader like monad infrastructure+-- as we move into an expression (although the change is focused in+-- the lcl type).+data Env gbl lcl+  = Env {+        env_top  :: !HscEnv, -- Top-level stuff that never changes+                             -- Includes all info about imported things+                             -- BangPattern is to fix leak, see #15111++        env_um   :: !Char,   -- Mask for Uniques++        env_gbl  :: gbl,     -- Info about things defined at the top level+                             -- of the module being compiled++        env_lcl  :: lcl      -- Nested stuff; changes as we go into+    }++instance ContainsDynFlags (Env gbl lcl) where+    extractDynFlags env = hsc_dflags (env_top env)++instance ContainsModule gbl => ContainsModule (Env gbl lcl) where+    extractModule env = extractModule (env_gbl env)+++{-+************************************************************************+*                                                                      *+                The interface environments+              Used when dealing with IfaceDecls+*                                                                      *+************************************************************************+-}++data IfGblEnv+  = IfGblEnv {+        -- Some information about where this environment came from;+        -- useful for debugging.+        if_doc :: SDoc,+        -- The type environment for the module being compiled,+        -- in case the interface refers back to it via a reference that+        -- was originally a hi-boot file.+        -- We need the module name so we can test when it's appropriate+        -- to look in this env.+        -- See Note [Tying the knot] in TcIface+        if_rec_types :: Maybe (Module, IfG TypeEnv)+                -- Allows a read effect, so it can be in a mutable+                -- variable; c.f. handling the external package type env+                -- Nothing => interactive stuff, no loops possible+    }++data IfLclEnv+  = IfLclEnv {+        -- The module for the current IfaceDecl+        -- So if we see   f = \x -> x+        -- it means M.f = \x -> x, where M is the if_mod+        -- NB: This is a semantic module, see+        -- Note [Identity versus semantic module]+        if_mod :: Module,++        -- Whether or not the IfaceDecl came from a boot+        -- file or not; we'll use this to choose between+        -- NoUnfolding and BootUnfolding+        if_boot :: Bool,++        -- The field is used only for error reporting+        -- if (say) there's a Lint error in it+        if_loc :: SDoc,+                -- Where the interface came from:+                --      .hi file, or GHCi state, or ext core+                -- plus which bit is currently being examined++        if_nsubst :: Maybe NameShape,++        -- This field is used to make sure "implicit" declarations+        -- (anything that cannot be exported in mi_exports) get+        -- wired up correctly in typecheckIfacesForMerging.  Most+        -- of the time it's @Nothing@.  See Note [Resolving never-exported Names in TcIface]+        -- in TcIface.+        if_implicits_env :: Maybe TypeEnv,++        if_tv_env  :: FastStringEnv TyVar,     -- Nested tyvar bindings+        if_id_env  :: FastStringEnv Id         -- Nested id binding+    }++{-+************************************************************************+*                                                                      *+                Desugarer monad+*                                                                      *+************************************************************************++Now the mondo monad magic (yes, @DsM@ is a silly name)---carry around+a @UniqueSupply@ and some annotations, which+presumably include source-file location information:+-}++data DsGblEnv+        = DsGblEnv+        { ds_mod          :: Module             -- For SCC profiling+        , ds_fam_inst_env :: FamInstEnv         -- Like tcg_fam_inst_env+        , ds_unqual  :: PrintUnqualified+        , ds_msgs    :: IORef Messages          -- Warning messages+        , ds_if_env  :: (IfGblEnv, IfLclEnv)    -- Used for looking up global,+                                                -- possibly-imported things+        , ds_complete_matches :: CompleteMatchMap+           -- Additional complete pattern matches+        , ds_cc_st   :: IORef CostCentreState+           -- Tracking indices for cost centre annotations+        }++instance ContainsModule DsGblEnv where+    extractModule = ds_mod++data DsLclEnv = DsLclEnv {+        dsl_meta    :: DsMetaEnv,        -- Template Haskell bindings+        dsl_loc     :: RealSrcSpan,      -- To put in pattern-matching error msgs++        -- See Note [Note [Type and Term Equality Propagation] in Check.hs+        -- The oracle state Delta is augmented as we walk inwards,+        -- through each pattern match in turn+        dsl_delta   :: Delta+     }++-- Inside [| |] brackets, the desugarer looks+-- up variables in the DsMetaEnv+type DsMetaEnv = NameEnv DsMetaVal++data DsMetaVal+   = DsBound Id         -- Bound by a pattern inside the [| |].+                        -- Will be dynamically alpha renamed.+                        -- The Id has type THSyntax.Var++   | DsSplice (HsExpr GhcTc) -- These bindings are introduced by+                             -- the PendingSplices on a HsBracketOut+++{-+************************************************************************+*                                                                      *+                Global typechecker environment+*                                                                      *+************************************************************************+-}++-- | 'FrontendResult' describes the result of running the+-- frontend of a Haskell module.  Usually, you'll get+-- a 'FrontendTypecheck', since running the frontend involves+-- typechecking a program, but for an hs-boot merge you'll+-- just get a ModIface, since no actual typechecking occurred.+--+-- This data type really should be in HscTypes, but it needs+-- to have a TcGblEnv which is only defined here.+data FrontendResult+        = FrontendTypecheck TcGblEnv++-- Note [Identity versus semantic module]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- When typechecking an hsig file, it is convenient to keep track+-- of two different "this module" identifiers:+--+--      - The IDENTITY module is simply thisPackage + the module+--        name; i.e. it uniquely *identifies* the interface file+--        we're compiling.  For example, p[A=<A>]:A is an+--        identity module identifying the requirement named A+--        from library p.+--+--      - The SEMANTIC module, which is the actual module that+--        this signature is intended to represent (e.g. if+--        we have a identity module p[A=base:Data.IORef]:A,+--        then the semantic module is base:Data.IORef)+--+-- Which one should you use?+--+--      - In the desugarer and later phases of compilation,+--        identity and semantic modules coincide, since we never compile+--        signatures (we just generate blank object files for+--        hsig files.)+--+--        A corrolary of this is that the following invariant holds at any point+--        past desugaring,+--+--            if I have a Module, this_mod, in hand representing the module+--            currently being compiled,+--            then moduleUnitId this_mod == thisPackage dflags+--+--      - For any code involving Names, we want semantic modules.+--        See lookupIfaceTop in IfaceEnv, mkIface and addFingerprints+--        in MkIface, and tcLookupGlobal in TcEnv+--+--      - When reading interfaces, we want the identity module to+--        identify the specific interface we want (such interfaces+--        should never be loaded into the EPS).  However, if a+--        hole module <A> is requested, we look for A.hi+--        in the home library we are compiling.  (See LoadIface.)+--        Similarly, in RnNames we check for self-imports using+--        identity modules, to allow signatures to import their implementor.+--+--      - For recompilation avoidance, you want the identity module,+--        since that will actually say the specific interface you+--        want to track (and recompile if it changes)++-- | 'TcGblEnv' describes the top-level of the module at the+-- point at which the typechecker is finished work.+-- It is this structure that is handed on to the desugarer+-- For state that needs to be updated during the typechecking+-- phase and returned at end, use a 'TcRef' (= 'IORef').+data TcGblEnv+  = TcGblEnv {+        tcg_mod     :: Module,         -- ^ Module being compiled+        tcg_semantic_mod :: Module,    -- ^ If a signature, the backing module+            -- See also Note [Identity versus semantic module]+        tcg_src     :: HscSource,+          -- ^ What kind of module (regular Haskell, hs-boot, hsig)++        tcg_rdr_env :: GlobalRdrEnv,   -- ^ Top level envt; used during renaming+        tcg_default :: Maybe [Type],+          -- ^ Types used for defaulting. @Nothing@ => no @default@ decl++        tcg_fix_env   :: FixityEnv,     -- ^ Just for things in this module+        tcg_field_env :: RecFieldEnv,   -- ^ Just for things in this module+                                        -- See Note [The interactive package] in HscTypes++        tcg_type_env :: TypeEnv,+          -- ^ Global type env for the module we are compiling now.  All+          -- TyCons and Classes (for this module) end up in here right away,+          -- along with their derived constructors, selectors.+          --+          -- (Ids defined in this module start in the local envt, though they+          --  move to the global envt during zonking)+          --+          -- NB: for what "things in this module" means, see+          -- Note [The interactive package] in HscTypes++        tcg_type_env_var :: TcRef TypeEnv,+                -- Used only to initialise the interface-file+                -- typechecker in initIfaceTcRn, so that it can see stuff+                -- bound in this module when dealing with hi-boot recursions+                -- Updated at intervals (e.g. after dealing with types and classes)++        tcg_inst_env     :: !InstEnv,+          -- ^ Instance envt for all /home-package/ modules;+          -- Includes the dfuns in tcg_insts+          -- NB. BangPattern is to fix a leak, see #15111+        tcg_fam_inst_env :: !FamInstEnv, -- ^ Ditto for family instances+          -- NB. BangPattern is to fix a leak, see #15111+        tcg_ann_env      :: AnnEnv,     -- ^ And for annotations++                -- Now a bunch of things about this module that are simply+                -- accumulated, but never consulted until the end.+                -- Nevertheless, it's convenient to accumulate them along+                -- with the rest of the info from this module.+        tcg_exports :: [AvailInfo],     -- ^ What is exported+        tcg_imports :: ImportAvails,+          -- ^ Information about what was imported from where, including+          -- things bound in this module. Also store Safe Haskell info+          -- here about transitive trusted package requirements.+          --+          -- There are not many uses of this field, so you can grep for+          -- all them.+          --+          -- The ImportAvails records information about the following+          -- things:+          --+          --    1. All of the modules you directly imported (tcRnImports)+          --    2. The orphans (only!) of all imported modules in a GHCi+          --       session (runTcInteractive)+          --    3. The module that instantiated a signature+          --    4. Each of the signatures that merged in+          --+          -- It is used in the following ways:+          --    - imp_orphs is used to determine what orphan modules should be+          --      visible in the context (tcVisibleOrphanMods)+          --    - imp_finsts is used to determine what family instances should+          --      be visible (tcExtendLocalFamInstEnv)+          --    - To resolve the meaning of the export list of a module+          --      (tcRnExports)+          --    - imp_mods is used to compute usage info (mkIfaceTc, deSugar)+          --    - imp_trust_own_pkg is used for Safe Haskell in interfaces+          --      (mkIfaceTc, as well as in HscMain)+          --    - To create the Dependencies field in interface (mkDependencies)++          -- These three fields track unused bindings and imports+          -- See Note [Tracking unused binding and imports]+        tcg_dus       :: DefUses,+        tcg_used_gres :: TcRef [GlobalRdrElt],+        tcg_keep      :: TcRef NameSet,++        tcg_th_used :: TcRef Bool,+          -- ^ @True@ <=> Template Haskell syntax used.+          --+          -- We need this so that we can generate a dependency on the+          -- Template Haskell package, because the desugarer is going+          -- to emit loads of references to TH symbols.  The reference+          -- is implicit rather than explicit, so we have to zap a+          -- mutable variable.++        tcg_th_splice_used :: TcRef Bool,+          -- ^ @True@ <=> A Template Haskell splice was used.+          --+          -- Splices disable recompilation avoidance (see #481)++        tcg_th_top_level_locs :: TcRef (Set RealSrcSpan),+          -- ^ Locations of the top-level splices; used for providing details on+          -- scope in error messages for out-of-scope variables++        tcg_dfun_n  :: TcRef OccSet,+          -- ^ Allows us to choose unique DFun names.++        tcg_merged :: [(Module, Fingerprint)],+          -- ^ The requirements we merged with; we always have to recompile+          -- if any of these changed.++        -- The next fields accumulate the payload of the module+        -- The binds, rules and foreign-decl fields are collected+        -- initially in un-zonked form and are finally zonked in tcRnSrcDecls++        tcg_rn_exports :: Maybe [(Located (IE GhcRn), Avails)],+                -- Nothing <=> no explicit export list+                -- Is always Nothing if we don't want to retain renamed+                -- exports.+                -- If present contains each renamed export list item+                -- together with its exported names.++        tcg_rn_imports :: [LImportDecl GhcRn],+                -- Keep the renamed imports regardless.  They are not+                -- voluminous and are needed if you want to report unused imports++        tcg_rn_decls :: Maybe (HsGroup GhcRn),+          -- ^ Renamed decls, maybe.  @Nothing@ <=> Don't retain renamed+          -- decls.++        tcg_dependent_files :: TcRef [FilePath], -- ^ dependencies from addDependentFile++        tcg_th_topdecls :: TcRef [LHsDecl GhcPs],+        -- ^ Top-level declarations from addTopDecls++        tcg_th_foreign_files :: TcRef [(ForeignSrcLang, FilePath)],+        -- ^ Foreign files emitted from TH.++        tcg_th_topnames :: TcRef NameSet,+        -- ^ Exact names bound in top-level declarations in tcg_th_topdecls++        tcg_th_modfinalizers :: TcRef [(TcLclEnv, ThModFinalizers)],+        -- ^ Template Haskell module finalizers.+        --+        -- They can use particular local environments.++        tcg_th_coreplugins :: TcRef [String],+        -- ^ Core plugins added by Template Haskell code.++        tcg_th_state :: TcRef (Map TypeRep Dynamic),+        tcg_th_remote_state :: TcRef (Maybe (ForeignRef (IORef QState))),+        -- ^ Template Haskell state++        tcg_ev_binds  :: Bag EvBind,        -- Top-level evidence bindings++        -- Things defined in this module, or (in GHCi)+        -- in the declarations for a single GHCi command.+        -- For the latter, see Note [The interactive package] in HscTypes+        tcg_tr_module :: Maybe Id,   -- Id for $trModule :: GHC.Types.Module+                                             -- for which every module has a top-level defn+                                             -- except in GHCi in which case we have Nothing+        tcg_binds     :: LHsBinds GhcTc,     -- Value bindings in this module+        tcg_sigs      :: NameSet,            -- ...Top-level names that *lack* a signature+        tcg_imp_specs :: [LTcSpecPrag],      -- ...SPECIALISE prags for imported Ids+        tcg_warns     :: Warnings,           -- ...Warnings and deprecations+        tcg_anns      :: [Annotation],       -- ...Annotations+        tcg_tcs       :: [TyCon],            -- ...TyCons and Classes+        tcg_insts     :: [ClsInst],          -- ...Instances+        tcg_fam_insts :: [FamInst],          -- ...Family instances+        tcg_rules     :: [LRuleDecl GhcTc],  -- ...Rules+        tcg_fords     :: [LForeignDecl GhcTc], -- ...Foreign import & exports+        tcg_patsyns   :: [PatSyn],            -- ...Pattern synonyms++        tcg_doc_hdr   :: Maybe LHsDocString, -- ^ Maybe Haddock header docs+        tcg_hpc       :: !AnyHpcUsage,       -- ^ @True@ if any part of the+                                             --  prog uses hpc instrumentation.+           -- NB. BangPattern is to fix a leak, see #15111++        tcg_self_boot :: SelfBootInfo,       -- ^ Whether this module has a+                                             -- corresponding hi-boot file++        tcg_main      :: Maybe Name,         -- ^ The Name of the main+                                             -- function, if this module is+                                             -- the main module.++        tcg_safeInfer :: TcRef (Bool, WarningMessages),+        -- ^ Has the typechecker inferred this module as -XSafe (Safe Haskell)+        -- See Note [Safe Haskell Overlapping Instances Implementation],+        -- although this is used for more than just that failure case.++        tcg_tc_plugins :: [TcPluginSolver],+        -- ^ A list of user-defined plugins for the constraint solver.+        tcg_hf_plugins :: [HoleFitPlugin],+        -- ^ A list of user-defined plugins for hole fit suggestions.++        tcg_top_loc :: RealSrcSpan,+        -- ^ The RealSrcSpan this module came from++        tcg_static_wc :: TcRef WantedConstraints,+          -- ^ Wanted constraints of static forms.+        -- See Note [Constraints in static forms].+        tcg_complete_matches :: [CompleteMatch],++        -- ^ Tracking indices for cost centre annotations+        tcg_cc_st   :: TcRef CostCentreState+    }++-- NB: topModIdentity, not topModSemantic!+-- Definition sites of orphan identities will be identity modules, not semantic+-- modules.++-- Note [Constraints in static forms]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- When a static form produces constraints like+--+-- f :: StaticPtr (Bool -> String)+-- f = static show+--+-- we collect them in tcg_static_wc and resolve them at the end+-- of type checking. They need to be resolved separately because+-- we don't want to resolve them in the context of the enclosing+-- expression. Consider+--+-- g :: Show a => StaticPtr (a -> String)+-- g = static show+--+-- If the @Show a0@ constraint that the body of the static form produces was+-- resolved in the context of the enclosing expression, then the body of the+-- static form wouldn't be closed because the Show dictionary would come from+-- g's context instead of coming from the top level.++tcVisibleOrphanMods :: TcGblEnv -> ModuleSet+tcVisibleOrphanMods tcg_env+    = mkModuleSet (tcg_mod tcg_env : imp_orphs (tcg_imports tcg_env))++instance ContainsModule TcGblEnv where+    extractModule env = tcg_semantic_mod env++type RecFieldEnv = NameEnv [FieldLabel]+        -- Maps a constructor name *in this module*+        -- to the fields for that constructor.+        -- This is used when dealing with ".." notation in record+        -- construction and pattern matching.+        -- The FieldEnv deals *only* with constructors defined in *this*+        -- module.  For imported modules, we get the same info from the+        -- TypeEnv++data SelfBootInfo+  = NoSelfBoot    -- No corresponding hi-boot file+  | SelfBoot+       { sb_mds :: ModDetails   -- There was a hi-boot file,+       , sb_tcs :: NameSet }    -- defining these TyCons,+-- What is sb_tcs used for?  See Note [Extra dependencies from .hs-boot files]+-- in RnSource+++{- Note [Tracking unused binding and imports]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We gather three sorts of usage information++ * tcg_dus :: DefUses (defs/uses)+      Records what is defined in this module and what is used.++      Records *defined* Names (local, top-level)+          and *used*    Names (local or imported)++      Used (a) to report "defined but not used"+               (see RnNames.reportUnusedNames)+           (b) to generate version-tracking usage info in interface+               files (see MkIface.mkUsedNames)+   This usage info is mainly gathered by the renamer's+   gathering of free-variables++ * tcg_used_gres :: TcRef [GlobalRdrElt]+      Records occurrences of imported entities.++      Used only to report unused import declarations++      Records each *occurrence* an *imported* (not locally-defined) entity.+      The occurrence is recorded by keeping a GlobalRdrElt for it.+      These is not the GRE that is in the GlobalRdrEnv; rather it+      is recorded *after* the filtering done by pickGREs.  So it reflect+      /how that occurrence is in scope/.   See Note [GRE filtering] in+      RdrName.++  * tcg_keep :: TcRef NameSet+      Records names of the type constructors, data constructors, and Ids that+      are used by the constraint solver.++      The typechecker may use find that some imported or+      locally-defined things are used, even though they+      do not appear to be mentioned in the source code:++      (a) The to/from functions for generic data types++      (b) Top-level variables appearing free in the RHS of an+          orphan rule++      (c) Top-level variables appearing free in a TH bracket+          See Note [Keeping things alive for Template Haskell]+          in RnSplice++      (d) The data constructor of a newtype that is used+          to solve a Coercible instance (e.g. #10347). Example+              module T10347 (N, mkN) where+                import Data.Coerce+                newtype N a = MkN Int+                mkN :: Int -> N a+                mkN = coerce++          Then we wish to record `MkN` as used, since it is (morally)+          used to perform the coercion in `mkN`. To do so, the+          Coercible solver updates tcg_keep's TcRef whenever it+          encounters a use of `coerce` that crosses newtype boundaries.++      The tcg_keep field is used in two distinct ways:++      * Desugar.addExportFlagsAndRules.  Where things like (a-c) are locally+        defined, we should give them an an Exported flag, so that the+        simplifier does not discard them as dead code, and so that they are+        exposed in the interface file (but not to export to the user).++      * RnNames.reportUnusedNames.  Where newtype data constructors like (d)+        are imported, we don't want to report them as unused.+++************************************************************************+*                                                                      *+                The local typechecker environment+*                                                                      *+************************************************************************++Note [The Global-Env/Local-Env story]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+During type checking, we keep in the tcg_type_env+        * All types and classes+        * All Ids derived from types and classes (constructors, selectors)++At the end of type checking, we zonk the local bindings,+and as we do so we add to the tcg_type_env+        * Locally defined top-level Ids++Why?  Because they are now Ids not TcIds.  This final GlobalEnv is+        a) fed back (via the knot) to typechecking the+           unfoldings of interface signatures+        b) used in the ModDetails of this module+-}++data TcLclEnv           -- Changes as we move inside an expression+                        -- Discarded after typecheck/rename; not passed on to desugarer+  = TcLclEnv {+        tcl_loc        :: RealSrcSpan,     -- Source span+        tcl_ctxt       :: [ErrCtxt],       -- Error context, innermost on top+        tcl_tclvl      :: TcLevel,         -- Birthplace for new unification variables++        tcl_th_ctxt    :: ThStage,         -- Template Haskell context+        tcl_th_bndrs   :: ThBindEnv,       -- and binder info+            -- The ThBindEnv records the TH binding level of in-scope Names+            -- defined in this module (not imported)+            -- We can't put this info in the TypeEnv because it's needed+            -- (and extended) in the renamer, for untyed splices++        tcl_arrow_ctxt :: ArrowCtxt,       -- Arrow-notation context++        tcl_rdr :: LocalRdrEnv,         -- Local name envt+                -- Maintained during renaming, of course, but also during+                -- type checking, solely so that when renaming a Template-Haskell+                -- splice we have the right environment for the renamer.+                --+                --   Does *not* include global name envt; may shadow it+                --   Includes both ordinary variables and type variables;+                --   they are kept distinct because tyvar have a different+                --   occurrence constructor (Name.TvOcc)+                -- We still need the unsullied global name env so that+                --   we can look up record field names++        tcl_env  :: TcTypeEnv,    -- The local type environment:+                                  -- Ids and TyVars defined in this module++        tcl_bndrs :: TcBinderStack,   -- Used for reporting relevant bindings,+                                      -- and for tidying types++        tcl_lie  :: TcRef WantedConstraints,    -- Place to accumulate type constraints+        tcl_errs :: TcRef Messages              -- Place to accumulate errors+    }++setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv+setLclEnvTcLevel env lvl = env { tcl_tclvl = lvl }++getLclEnvTcLevel :: TcLclEnv -> TcLevel+getLclEnvTcLevel = tcl_tclvl++setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv+setLclEnvLoc env loc = env { tcl_loc = loc }++getLclEnvLoc :: TcLclEnv -> RealSrcSpan+getLclEnvLoc = tcl_loc++type ErrCtxt = (Bool, TidyEnv -> TcM (TidyEnv, MsgDoc))+        -- Monadic so that we have a chance+        -- to deal with bound type variables just before error+        -- message construction++        -- Bool:  True <=> this is a landmark context; do not+        --                 discard it when trimming for display++-- These are here to avoid module loops: one might expect them+-- in Constraint, but they refer to ErrCtxt which refers to TcM.+-- Easier to just keep these definitions here, alongside TcM.+pushErrCtxt :: CtOrigin -> ErrCtxt -> CtLoc -> CtLoc+pushErrCtxt o err loc@(CtLoc { ctl_env = lcl })+  = loc { ctl_origin = o, ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }++pushErrCtxtSameOrigin :: ErrCtxt -> CtLoc -> CtLoc+-- Just add information w/o updating the origin!+pushErrCtxtSameOrigin err loc@(CtLoc { ctl_env = lcl })+  = loc { ctl_env = lcl { tcl_ctxt = err : tcl_ctxt lcl } }++type TcTypeEnv = NameEnv TcTyThing++type ThBindEnv = NameEnv (TopLevelFlag, ThLevel)+   -- Domain = all Ids bound in this module (ie not imported)+   -- The TopLevelFlag tells if the binding is syntactically top level.+   -- We need to know this, because the cross-stage persistence story allows+   -- cross-stage at arbitrary types if the Id is bound at top level.+   --+   -- Nota bene: a ThLevel of 'outerLevel' is *not* the same as being+   -- bound at top level!  See Note [Template Haskell levels] in TcSplice++{- Note [Given Insts]+   ~~~~~~~~~~~~~~~~~~+Because of GADTs, we have to pass inwards the Insts provided by type signatures+and existential contexts. Consider+        data T a where { T1 :: b -> b -> T [b] }+        f :: Eq a => T a -> Bool+        f (T1 x y) = [x]==[y]++The constructor T1 binds an existential variable 'b', and we need Eq [b].+Well, we have it, because Eq a refines to Eq [b], but we can only spot that if we+pass it inwards.++-}++-- | Type alias for 'IORef'; the convention is we'll use this for mutable+-- bits of data in 'TcGblEnv' which are updated during typechecking and+-- returned at the end.+type TcRef a     = IORef a+-- ToDo: when should I refer to it as a 'TcId' instead of an 'Id'?+type TcId        = Id+type TcIdSet     = IdSet++---------------------------+-- The TcBinderStack+---------------------------++type TcBinderStack = [TcBinder]+   -- This is a stack of locally-bound ids and tyvars,+   --   innermost on top+   -- Used only in error reporting (relevantBindings in TcError),+   --   and in tidying+   -- We can't use the tcl_env type environment, because it doesn't+   --   keep track of the nesting order++data TcBinder+  = TcIdBndr+       TcId+       TopLevelFlag    -- Tells whether the binding is syntactically top-level+                       -- (The monomorphic Ids for a recursive group count+                       --  as not-top-level for this purpose.)++  | TcIdBndr_ExpType  -- Variant that allows the type to be specified as+                      -- an ExpType+       Name+       ExpType+       TopLevelFlag++  | TcTvBndr          -- e.g.   case x of P (y::a) -> blah+       Name           -- We bind the lexical name "a" to the type of y,+       TyVar          -- which might be an utterly different (perhaps+                      -- existential) tyvar++instance Outputable TcBinder where+   ppr (TcIdBndr id top_lvl)           = ppr id <> brackets (ppr top_lvl)+   ppr (TcIdBndr_ExpType id _ top_lvl) = ppr id <> brackets (ppr top_lvl)+   ppr (TcTvBndr name tv)              = ppr name <+> ppr tv++instance HasOccName TcBinder where+    occName (TcIdBndr id _)             = occName (idName id)+    occName (TcIdBndr_ExpType name _ _) = occName name+    occName (TcTvBndr name _)           = occName name++-- fixes #12177+-- Builds up a list of bindings whose OccName has not been seen before+-- i.e., If    ys  = removeBindingShadowing xs+-- then+--  - ys is obtained from xs by deleting some elements+--  - ys has no duplicate OccNames+--  - The first duplicated OccName in xs is retained in ys+-- Overloaded so that it can be used for both GlobalRdrElt in typed-hole+-- substitutions and TcBinder when looking for relevant bindings.+removeBindingShadowing :: HasOccName a => [a] -> [a]+removeBindingShadowing bindings = reverse $ fst $ foldl+    (\(bindingAcc, seenNames) binding ->+    if occName binding `elemOccSet` seenNames -- if we've seen it+        then (bindingAcc, seenNames)              -- skip it+        else (binding:bindingAcc, extendOccSet seenNames (occName binding)))+    ([], emptyOccSet) bindings++---------------------------+-- Template Haskell stages and levels+---------------------------++data SpliceType = Typed | Untyped++data ThStage    -- See Note [Template Haskell state diagram] in TcSplice+  = Splice SpliceType -- Inside a top-level splice+                      -- This code will be run *at compile time*;+                      --   the result replaces the splice+                      -- Binding level = 0++  | RunSplice (TcRef [ForeignRef (TH.Q ())])+      -- Set when running a splice, i.e. NOT when renaming or typechecking the+      -- Haskell code for the splice. See Note [RunSplice ThLevel].+      --+      -- Contains a list of mod finalizers collected while executing the splice.+      --+      -- 'addModFinalizer' inserts finalizers here, and from here they are taken+      -- to construct an @HsSpliced@ annotation for untyped splices. See Note+      -- [Delaying modFinalizers in untyped splices] in "RnSplice".+      --+      -- For typed splices, the typechecker takes finalizers from here and+      -- inserts them in the list of finalizers in the global environment.+      --+      -- See Note [Collecting modFinalizers in typed splices] in "TcSplice".++  | Comp        -- Ordinary Haskell code+                -- Binding level = 1++  | Brack                       -- Inside brackets+      ThStage                   --   Enclosing stage+      PendingStuff++data PendingStuff+  = RnPendingUntyped              -- Renaming the inside of an *untyped* bracket+      (TcRef [PendingRnSplice])   -- Pending splices in here++  | RnPendingTyped                -- Renaming the inside of a *typed* bracket++  | TcPending                     -- Typechecking the inside of a typed bracket+      (TcRef [PendingTcSplice])   --   Accumulate pending splices here+      (TcRef WantedConstraints)   --     and type constraints here++topStage, topAnnStage, topSpliceStage :: ThStage+topStage       = Comp+topAnnStage    = Splice Untyped+topSpliceStage = Splice Untyped++instance Outputable ThStage where+   ppr (Splice _)    = text "Splice"+   ppr (RunSplice _) = text "RunSplice"+   ppr Comp          = text "Comp"+   ppr (Brack s _)   = text "Brack" <> parens (ppr s)++type ThLevel = Int+    -- NB: see Note [Template Haskell levels] in TcSplice+    -- Incremented when going inside a bracket,+    -- decremented when going inside a splice+    -- NB: ThLevel is one greater than the 'n' in Fig 2 of the+    --     original "Template meta-programming for Haskell" paper++impLevel, outerLevel :: ThLevel+impLevel = 0    -- Imported things; they can be used inside a top level splice+outerLevel = 1  -- Things defined outside brackets++thLevel :: ThStage -> ThLevel+thLevel (Splice _)    = 0+thLevel (RunSplice _) =+    -- See Note [RunSplice ThLevel].+    panic "thLevel: called when running a splice"+thLevel Comp          = 1+thLevel (Brack s _)   = thLevel s + 1++{- Node [RunSplice ThLevel]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The 'RunSplice' stage is set when executing a splice, and only when running a+splice. In particular it is not set when the splice is renamed or typechecked.++'RunSplice' is needed to provide a reference where 'addModFinalizer' can insert+the finalizer (see Note [Delaying modFinalizers in untyped splices]), and+'addModFinalizer' runs when doing Q things. Therefore, It doesn't make sense to+set 'RunSplice' when renaming or typechecking the splice, where 'Splice',+'Brack' or 'Comp' are used instead.++-}++---------------------------+-- Arrow-notation context+---------------------------++{- Note [Escaping the arrow scope]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In arrow notation, a variable bound by a proc (or enclosed let/kappa)+is not in scope to the left of an arrow tail (-<) or the head of (|..|).+For example++        proc x -> (e1 -< e2)++Here, x is not in scope in e1, but it is in scope in e2.  This can get+a bit complicated:++        let x = 3 in+        proc y -> (proc z -> e1) -< e2++Here, x and z are in scope in e1, but y is not.++We implement this by+recording the environment when passing a proc (using newArrowScope),+and returning to that (using escapeArrowScope) on the left of -< and the+head of (|..|).++All this can be dealt with by the *renamer*. But the type checker needs+to be involved too.  Example (arrowfail001)+  class Foo a where foo :: a -> ()+  data Bar = forall a. Foo a => Bar a+  get :: Bar -> ()+  get = proc x -> case x of Bar a -> foo -< a+Here the call of 'foo' gives rise to a (Foo a) constraint that should not+be captured by the pattern match on 'Bar'.  Rather it should join the+constraints from further out.  So we must capture the constraint bag+from further out in the ArrowCtxt that we push inwards.+-}++data ArrowCtxt   -- Note [Escaping the arrow scope]+  = NoArrowCtxt+  | ArrowCtxt LocalRdrEnv (TcRef WantedConstraints)+++---------------------------+-- TcTyThing+---------------------------++-- | A typecheckable thing available in a local context.  Could be+-- 'AGlobal' 'TyThing', but also lexically scoped variables, etc.+-- See 'TcEnv' for how to retrieve a 'TyThing' given a 'Name'.+data TcTyThing+  = AGlobal TyThing             -- Used only in the return type of a lookup++  | ATcId           -- Ids defined in this module; may not be fully zonked+      { tct_id   :: TcId+      , tct_info :: IdBindingInfo   -- See Note [Meaning of IdBindingInfo]+      }++  | ATyVar  Name TcTyVar   -- See Note [Type variables in the type environment]++  | ATcTyCon TyCon   -- Used temporarily, during kind checking, for the+                     -- tycons and clases in this recursive group+                     -- The TyCon is always a TcTyCon.  Its kind+                     -- can be a mono-kind or a poly-kind; in TcTyClsDcls see+                     -- Note [Type checking recursive type and class declarations]++  | APromotionErr PromotionErr++data PromotionErr+  = TyConPE          -- TyCon used in a kind before we are ready+                     --     data T :: T -> * where ...+  | ClassPE          -- Ditto Class++  | FamDataConPE     -- Data constructor for a data family+                     -- See Note [AFamDataCon: not promoting data family constructors]+                     -- in TcEnv.+  | ConstrainedDataConPE PredType+                     -- Data constructor with a non-equality context+                     -- See Note [Don't promote data constructors with+                     --           non-equality contexts] in TcHsType+  | PatSynPE         -- Pattern synonyms+                     -- See Note [Don't promote pattern synonyms] in TcEnv++  | RecDataConPE     -- Data constructor in a recursive loop+                     -- See Note [Recursion and promoting data constructors] in TcTyClsDecls+  | NoDataKindsTC    -- -XDataKinds not enabled (for a tycon)+  | NoDataKindsDC    -- -XDataKinds not enabled (for a datacon)++instance Outputable TcTyThing where     -- Debugging only+   ppr (AGlobal g)      = ppr g+   ppr elt@(ATcId {})   = text "Identifier" <>+                          brackets (ppr (tct_id elt) <> dcolon+                                 <> ppr (varType (tct_id elt)) <> comma+                                 <+> ppr (tct_info elt))+   ppr (ATyVar n tv)    = text "Type variable" <+> quotes (ppr n) <+> equals <+> ppr tv+                            <+> dcolon <+> ppr (varType tv)+   ppr (ATcTyCon tc)    = text "ATcTyCon" <+> ppr tc <+> dcolon <+> ppr (tyConKind tc)+   ppr (APromotionErr err) = text "APromotionErr" <+> ppr err++-- | IdBindingInfo describes how an Id is bound.+--+-- It is used for the following purposes:+-- a) for static forms in TcExpr.checkClosedInStaticForm and+-- b) to figure out when a nested binding can be generalised,+--    in TcBinds.decideGeneralisationPlan.+--+data IdBindingInfo -- See Note [Meaning of IdBindingInfo and ClosedTypeId]+    = NotLetBound+    | ClosedLet+    | NonClosedLet+         RhsNames        -- Used for (static e) checks only+         ClosedTypeId    -- Used for generalisation checks+                         -- and for (static e) checks++-- | IsGroupClosed describes a group of mutually-recursive bindings+data IsGroupClosed+  = IsGroupClosed+      (NameEnv RhsNames)  -- Free var info for the RHS of each binding in the goup+                          -- Used only for (static e) checks++      ClosedTypeId        -- True <=> all the free vars of the group are+                          --          imported or ClosedLet or+                          --          NonClosedLet with ClosedTypeId=True.+                          --          In particular, no tyvars, no NotLetBound++type RhsNames = NameSet   -- Names of variables, mentioned on the RHS of+                          -- a definition, that are not Global or ClosedLet++type ClosedTypeId = Bool+  -- See Note [Meaning of IdBindingInfo and ClosedTypeId]++{- Note [Meaning of IdBindingInfo]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+NotLetBound means that+  the Id is not let-bound (e.g. it is bound in a+  lambda-abstraction or in a case pattern)++ClosedLet means that+   - The Id is let-bound,+   - Any free term variables are also Global or ClosedLet+   - Its type has no free variables (NB: a top-level binding subject+     to the MR might have free vars in its type)+   These ClosedLets can definitely be floated to top level; and we+   may need to do so for static forms.++   Property:   ClosedLet+             is equivalent to+               NonClosedLet emptyNameSet True++(NonClosedLet (fvs::RhsNames) (cl::ClosedTypeId)) means that+   - The Id is let-bound++   - The fvs::RhsNames contains the free names of the RHS,+     excluding Global and ClosedLet ones.++   - For the ClosedTypeId field see Note [Bindings with closed types]++For (static e) to be valid, we need for every 'x' free in 'e',+that x's binding is floatable to the top level.  Specifically:+   * x's RhsNames must be empty+   * x's type has no free variables+See Note [Grand plan for static forms] in StaticPtrTable.hs.+This test is made in TcExpr.checkClosedInStaticForm.+Actually knowing x's RhsNames (rather than just its emptiness+or otherwise) is just so we can produce better error messages++Note [Bindings with closed types: ClosedTypeId]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++  f x = let g ys = map not ys+        in ...++Can we generalise 'g' under the OutsideIn algorithm?  Yes,+because all g's free variables are top-level; that is they themselves+have no free type variables, and it is the type variables in the+environment that makes things tricky for OutsideIn generalisation.++Here's the invariant:+   If an Id has ClosedTypeId=True (in its IdBindingInfo), then+   the Id's type is /definitely/ closed (has no free type variables).+   Specifically,+       a) The Id's acutal type is closed (has no free tyvars)+       b) Either the Id has a (closed) user-supplied type signature+          or all its free variables are Global/ClosedLet+             or NonClosedLet with ClosedTypeId=True.+          In particular, none are NotLetBound.++Why is (b) needed?   Consider+    \x. (x :: Int, let y = x+1 in ...)+Initially x::alpha.  If we happen to typecheck the 'let' before the+(x::Int), y's type will have a free tyvar; but if the other way round+it won't.  So we treat any let-bound variable with a free+non-let-bound variable as not ClosedTypeId, regardless of what the+free vars of its type actually are.++But if it has a signature, all is well:+   \x. ...(let { y::Int; y = x+1 } in+           let { v = y+2 } in ...)...+Here the signature on 'v' makes 'y' a ClosedTypeId, so we can+generalise 'v'.++Note that:++  * A top-level binding may not have ClosedTypeId=True, if it suffers+    from the MR++  * A nested binding may be closed (eg 'g' in the example we started+    with). Indeed, that's the point; whether a function is defined at+    top level or nested is orthogonal to the question of whether or+    not it is closed.++  * A binding may be non-closed because it mentions a lexically scoped+    *type variable*  Eg+        f :: forall a. blah+        f x = let g y = ...(y::a)...++Under OutsideIn we are free to generalise an Id all of whose free+variables have ClosedTypeId=True (or imported).  This is an extension+compared to the JFP paper on OutsideIn, which used "top-level" as a+proxy for "closed".  (It's not a good proxy anyway -- the MR can make+a top-level binding with a free type variable.)++Note [Type variables in the type environment]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The type environment has a binding for each lexically-scoped+type variable that is in scope.  For example++  f :: forall a. a -> a+  f x = (x :: a)++  g1 :: [a] -> a+  g1 (ys :: [b]) = head ys :: b++  g2 :: [Int] -> Int+  g2 (ys :: [c]) = head ys :: c++* The forall'd variable 'a' in the signature scopes over f's RHS.++* The pattern-bound type variable 'b' in 'g1' scopes over g1's+  RHS; note that it is bound to a skolem 'a' which is not itself+  lexically in scope.++* The pattern-bound type variable 'c' in 'g2' is bound to+  Int; that is, pattern-bound type variables can stand for+  arbitrary types. (see+    GHC proposal #128 "Allow ScopedTypeVariables to refer to types"+    https://github.com/ghc-proposals/ghc-proposals/pull/128,+  and the paper+    "Type variables in patterns", Haskell Symposium 2018.+++This is implemented by the constructor+   ATyVar Name TcTyVar+in the type environment.++* The Name is the name of the original, lexically scoped type+  variable++* The TcTyVar is sometimes a skolem (like in 'f'), and sometimes+  a unification variable (like in 'g1', 'g2').  We never zonk the+  type environment so in the latter case it always stays as a+  unification variable, although that variable may be later+  unified with a type (such as Int in 'g2').+-}++instance Outputable IdBindingInfo where+  ppr NotLetBound = text "NotLetBound"+  ppr ClosedLet = text "TopLevelLet"+  ppr (NonClosedLet fvs closed_type) =+    text "TopLevelLet" <+> ppr fvs <+> ppr closed_type++instance Outputable PromotionErr where+  ppr ClassPE                     = text "ClassPE"+  ppr TyConPE                     = text "TyConPE"+  ppr PatSynPE                    = text "PatSynPE"+  ppr FamDataConPE                = text "FamDataConPE"+  ppr (ConstrainedDataConPE pred) = text "ConstrainedDataConPE"+                                      <+> parens (ppr pred)+  ppr RecDataConPE                = text "RecDataConPE"+  ppr NoDataKindsTC               = text "NoDataKindsTC"+  ppr NoDataKindsDC               = text "NoDataKindsDC"++pprTcTyThingCategory :: TcTyThing -> SDoc+pprTcTyThingCategory (AGlobal thing)    = pprTyThingCategory thing+pprTcTyThingCategory (ATyVar {})        = text "Type variable"+pprTcTyThingCategory (ATcId {})         = text "Local identifier"+pprTcTyThingCategory (ATcTyCon {})     = text "Local tycon"+pprTcTyThingCategory (APromotionErr pe) = pprPECategory pe++pprPECategory :: PromotionErr -> SDoc+pprPECategory ClassPE                = text "Class"+pprPECategory TyConPE                = text "Type constructor"+pprPECategory PatSynPE               = text "Pattern synonym"+pprPECategory FamDataConPE           = text "Data constructor"+pprPECategory ConstrainedDataConPE{} = text "Data constructor"+pprPECategory RecDataConPE           = text "Data constructor"+pprPECategory NoDataKindsTC          = text "Type constructor"+pprPECategory NoDataKindsDC          = text "Data constructor"++{-+************************************************************************+*                                                                      *+        Operations over ImportAvails+*                                                                      *+************************************************************************+-}++-- | 'ImportAvails' summarises what was imported from where, irrespective of+-- whether the imported things are actually used or not.  It is used:+--+--  * when processing the export list,+--+--  * when constructing usage info for the interface file,+--+--  * to identify the list of directly imported modules for initialisation+--    purposes and for optimised overlap checking of family instances,+--+--  * when figuring out what things are really unused+--+data ImportAvails+   = ImportAvails {+        imp_mods :: ImportedMods,+          --      = ModuleEnv [ImportedModsVal],+          -- ^ Domain is all directly-imported modules+          --+          -- See the documentation on ImportedModsVal in HscTypes for the+          -- meaning of the fields.+          --+          -- We need a full ModuleEnv rather than a ModuleNameEnv here,+          -- because we might be importing modules of the same name from+          -- different packages. (currently not the case, but might be in the+          -- future).++        imp_dep_mods :: ModuleNameEnv (ModuleName, IsBootInterface),+          -- ^ Home-package modules needed by the module being compiled+          --+          -- It doesn't matter whether any of these dependencies+          -- are actually /used/ when compiling the module; they+          -- are listed if they are below it at all.  For+          -- example, suppose M imports A which imports X.  Then+          -- compiling M might not need to consult X.hi, but X+          -- is still listed in M's dependencies.++        imp_dep_pkgs :: Set InstalledUnitId,+          -- ^ Packages needed by the module being compiled, whether directly,+          -- or via other modules in this package, or via modules imported+          -- from other packages.++        imp_trust_pkgs :: Set InstalledUnitId,+          -- ^ This is strictly a subset of imp_dep_pkgs and records the+          -- packages the current module needs to trust for Safe Haskell+          -- compilation to succeed. A package is required to be trusted if+          -- we are dependent on a trustworthy module in that package.+          -- While perhaps making imp_dep_pkgs a tuple of (UnitId, Bool)+          -- where True for the bool indicates the package is required to be+          -- trusted is the more logical  design, doing so complicates a lot+          -- of code not concerned with Safe Haskell.+          -- See Note [RnNames . Tracking Trust Transitively]++        imp_trust_own_pkg :: Bool,+          -- ^ Do we require that our own package is trusted?+          -- This is to handle efficiently the case where a Safe module imports+          -- a Trustworthy module that resides in the same package as it.+          -- See Note [RnNames . Trust Own Package]++        imp_orphs :: [Module],+          -- ^ Orphan modules below us in the import tree (and maybe including+          -- us for imported modules)++        imp_finsts :: [Module]+          -- ^ Family instance modules below us in the import tree (and maybe+          -- including us for imported modules)+      }++mkModDeps :: [(ModuleName, IsBootInterface)]+          -> ModuleNameEnv (ModuleName, IsBootInterface)+mkModDeps deps = foldl' add emptyUFM deps+               where+                 add env elt@(m,_) = addToUFM env m elt++modDepsElts+  :: ModuleNameEnv (ModuleName, IsBootInterface)+  -> [(ModuleName, IsBootInterface)]+modDepsElts = sort . nonDetEltsUFM+  -- It's OK to use nonDetEltsUFM here because sorting by module names+  -- restores determinism++emptyImportAvails :: ImportAvails+emptyImportAvails = ImportAvails { imp_mods          = emptyModuleEnv,+                                   imp_dep_mods      = emptyUFM,+                                   imp_dep_pkgs      = S.empty,+                                   imp_trust_pkgs    = S.empty,+                                   imp_trust_own_pkg = False,+                                   imp_orphs         = [],+                                   imp_finsts        = [] }++-- | Union two ImportAvails+--+-- This function is a key part of Import handling, basically+-- for each import we create a separate ImportAvails structure+-- and then union them all together with this function.+plusImportAvails ::  ImportAvails ->  ImportAvails ->  ImportAvails+plusImportAvails+  (ImportAvails { imp_mods = mods1,+                  imp_dep_mods = dmods1, imp_dep_pkgs = dpkgs1,+                  imp_trust_pkgs = tpkgs1, imp_trust_own_pkg = tself1,+                  imp_orphs = orphs1, imp_finsts = finsts1 })+  (ImportAvails { imp_mods = mods2,+                  imp_dep_mods = dmods2, imp_dep_pkgs = dpkgs2,+                  imp_trust_pkgs = tpkgs2, imp_trust_own_pkg = tself2,+                  imp_orphs = orphs2, imp_finsts = finsts2 })+  = ImportAvails { imp_mods          = plusModuleEnv_C (++) mods1 mods2,+                   imp_dep_mods      = plusUFM_C plus_mod_dep dmods1 dmods2,+                   imp_dep_pkgs      = dpkgs1 `S.union` dpkgs2,+                   imp_trust_pkgs    = tpkgs1 `S.union` tpkgs2,+                   imp_trust_own_pkg = tself1 || tself2,+                   imp_orphs         = orphs1 `unionLists` orphs2,+                   imp_finsts        = finsts1 `unionLists` finsts2 }+  where+    plus_mod_dep r1@(m1, boot1) r2@(m2, boot2)+      | ASSERT2( m1 == m2, (ppr m1 <+> ppr m2) $$ (ppr boot1 <+> ppr boot2) )+        boot1 = r2+      | otherwise = r1+      -- If either side can "see" a non-hi-boot interface, use that+      -- Reusing existing tuples saves 10% of allocations on test+      -- perf/compiler/MultiLayerModules++{-+************************************************************************+*                                                                      *+\subsection{Where from}+*                                                                      *+************************************************************************++The @WhereFrom@ type controls where the renamer looks for an interface file+-}++data WhereFrom+  = ImportByUser IsBootInterface        -- Ordinary user import (perhaps {-# SOURCE #-})+  | ImportBySystem                      -- Non user import.+  | ImportByPlugin                      -- Importing a plugin;+                                        -- See Note [Care with plugin imports] in LoadIface++instance Outputable WhereFrom where+  ppr (ImportByUser is_boot) | is_boot     = text "{- SOURCE -}"+                             | otherwise   = empty+  ppr ImportBySystem                       = text "{- SYSTEM -}"+  ppr ImportByPlugin                       = text "{- PLUGIN -}"+++{- *********************************************************************+*                                                                      *+                Type signatures+*                                                                      *+********************************************************************* -}++-- These data types need to be here only because+-- TcSimplify uses them, and TcSimplify is fairly+-- low down in the module hierarchy++type TcSigFun  = Name -> Maybe TcSigInfo++data TcSigInfo = TcIdSig     TcIdSigInfo+               | TcPatSynSig TcPatSynInfo++data TcIdSigInfo   -- See Note [Complete and partial type signatures]+  = CompleteSig    -- A complete signature with no wildcards,+                   -- so the complete polymorphic type is known.+      { sig_bndr :: TcId          -- The polymorphic Id with that type++      , sig_ctxt :: UserTypeCtxt  -- In the case of type-class default methods,+                                  -- the Name in the FunSigCtxt is not the same+                                  -- as the TcId; the former is 'op', while the+                                  -- latter is '$dmop' or some such++      , sig_loc  :: SrcSpan       -- Location of the type signature+      }++  | PartialSig     -- A partial type signature (i.e. includes one or more+                   -- wildcards). In this case it doesn't make sense to give+                   -- the polymorphic Id, because we are going to /infer/ its+                   -- type, so we can't make the polymorphic Id ab-initio+      { psig_name  :: Name   -- Name of the function; used when report wildcards+      , psig_hs_ty :: LHsSigWcType GhcRn  -- The original partial signature in+                                          -- HsSyn form+      , sig_ctxt   :: UserTypeCtxt+      , sig_loc    :: SrcSpan            -- Location of the type signature+      }+++{- Note [Complete and partial type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A type signature is partial when it contains one or more wildcards+(= type holes).  The wildcard can either be:+* A (type) wildcard occurring in sig_theta or sig_tau. These are+  stored in sig_wcs.+      f :: Bool -> _+      g :: Eq _a => _a -> _a -> Bool+* Or an extra-constraints wildcard, stored in sig_cts:+      h :: (Num a, _) => a -> a++A type signature is a complete type signature when there are no+wildcards in the type signature, i.e. iff sig_wcs is empty and+sig_extra_cts is Nothing.+-}++data TcIdSigInst+  = TISI { sig_inst_sig :: TcIdSigInfo++         , sig_inst_skols :: [(Name, TcTyVar)]+               -- Instantiated type and kind variables, TyVarTvs+               -- The Name is the Name that the renamer chose;+               --   but the TcTyVar may come from instantiating+               --   the type and hence have a different unique.+               -- No need to keep track of whether they are truly lexically+               --   scoped because the renamer has named them uniquely+               -- See Note [Binding scoped type variables] in TcSigs+               --+               -- NB: The order of sig_inst_skols is irrelevant+               --     for a CompleteSig, but for a PartialSig see+               --     Note [Quantified varaibles in partial type signatures]++         , sig_inst_theta  :: TcThetaType+               -- Instantiated theta.  In the case of a+               -- PartialSig, sig_theta does not include+               -- the extra-constraints wildcard++         , sig_inst_tau :: TcSigmaType   -- Instantiated tau+               -- See Note [sig_inst_tau may be polymorphic]++         -- Relevant for partial signature only+         , sig_inst_wcs   :: [(Name, TcTyVar)]+               -- Like sig_inst_skols, but for /named/ wildcards (_a etc).+               -- The named wildcards scope over the binding, and hence+               -- their Names may appear in type signatures in the binding++         , sig_inst_wcx   :: Maybe TcType+               -- Extra-constraints wildcard to fill in, if any+               -- If this exists, it is surely of the form (meta_tv |> co)+               -- (where the co might be reflexive). This is filled in+               -- only from the return value of TcHsType.tcAnonWildCardOcc+         }++{- Note [sig_inst_tau may be polymorphic]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note that "sig_inst_tau" might actually be a polymorphic type,+if the original function had a signature like+   forall a. Eq a => forall b. Ord b => ....+But that's ok: tcMatchesFun (called by tcRhs) can deal with that+It happens, too!  See Note [Polymorphic methods] in TcClassDcl.++Note [Quantified varaibles in partial type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+   f :: forall a b. _ -> a -> _ -> b+   f (x,y) p q = q++Then we expect f's final type to be+  f :: forall {x,y}. forall a b. (x,y) -> a -> b -> b++Note that x,y are Inferred, and can't be use for visible type+application (VTA).  But a,b are Specified, and remain Specified+in the final type, so we can use VTA for them.  (Exception: if+it turns out that a's kind mentions b we need to reorder them+with scopedSort.)++The sig_inst_skols of the TISI from a partial signature records+that original order, and is used to get the variables of f's+final type in the correct order.+++Note [Wildcards in partial signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The wildcards in psig_wcs may stand for a type mentioning+the universally-quantified tyvars of psig_ty++E.g.  f :: forall a. _ -> a+      f x = x+We get sig_inst_skols = [a]+       sig_inst_tau   = _22 -> a+       sig_inst_wcs   = [_22]+and _22 in the end is unified with the type 'a'++Moreover the kind of a wildcard in sig_inst_wcs may mention+the universally-quantified tyvars sig_inst_skols+e.g.   f :: t a -> t _+Here we get+   sig_inst_skols = [k:*, (t::k ->*), (a::k)]+   sig_inst_tau   = t a -> t _22+   sig_inst_wcs   = [ _22::k ]+-}++data TcPatSynInfo+  = TPSI {+        patsig_name           :: Name,+        patsig_implicit_bndrs :: [TyVarBinder], -- Implicitly-bound kind vars (Inferred) and+                                                -- implicitly-bound type vars (Specified)+          -- See Note [The pattern-synonym signature splitting rule] in TcPatSyn+        patsig_univ_bndrs     :: [TyVar],       -- Bound by explicit user forall+        patsig_req            :: TcThetaType,+        patsig_ex_bndrs       :: [TyVar],       -- Bound by explicit user forall+        patsig_prov           :: TcThetaType,+        patsig_body_ty        :: TcSigmaType+    }++instance Outputable TcSigInfo where+  ppr (TcIdSig     idsi) = ppr idsi+  ppr (TcPatSynSig tpsi) = text "TcPatSynInfo" <+> ppr tpsi++instance Outputable TcIdSigInfo where+    ppr (CompleteSig { sig_bndr = bndr })+        = ppr bndr <+> dcolon <+> ppr (idType bndr)+    ppr (PartialSig { psig_name = name, psig_hs_ty = hs_ty })+        = text "psig" <+> ppr name <+> dcolon <+> ppr hs_ty++instance Outputable TcIdSigInst where+    ppr (TISI { sig_inst_sig = sig, sig_inst_skols = skols+              , sig_inst_theta = theta, sig_inst_tau = tau })+        = hang (ppr sig) 2 (vcat [ ppr skols, ppr theta <+> darrow <+> ppr tau ])++instance Outputable TcPatSynInfo where+    ppr (TPSI{ patsig_name = name}) = ppr name++isPartialSig :: TcIdSigInst -> Bool+isPartialSig (TISI { sig_inst_sig = PartialSig {} }) = True+isPartialSig _                                       = False++-- | No signature or a partial signature+hasCompleteSig :: TcSigFun -> Name -> Bool+hasCompleteSig sig_fn name+  = case sig_fn name of+      Just (TcIdSig (CompleteSig {})) -> True+      _                               -> False+++{-+Constraint Solver Plugins+-------------------------+-}++type TcPluginSolver = [Ct]    -- given+                   -> [Ct]    -- derived+                   -> [Ct]    -- wanted+                   -> TcPluginM TcPluginResult++newtype TcPluginM a = TcPluginM (EvBindsVar -> TcM a) deriving (Functor)++instance Applicative TcPluginM where+  pure x = TcPluginM (const $ pure x)+  (<*>) = ap++instance Monad TcPluginM where+#if !MIN_VERSION_base(4,13,0)+  fail = MonadFail.fail+#endif+  TcPluginM m >>= k =+    TcPluginM (\ ev -> do a <- m ev+                          runTcPluginM (k a) ev)++instance MonadFail.MonadFail TcPluginM where+  fail x   = TcPluginM (const $ fail x)++runTcPluginM :: TcPluginM a -> EvBindsVar -> TcM a+runTcPluginM (TcPluginM m) = m++-- | This function provides an escape for direct access to+-- the 'TcM` monad.  It should not be used lightly, and+-- the provided 'TcPluginM' API should be favoured instead.+unsafeTcPluginTcM :: TcM a -> TcPluginM a+unsafeTcPluginTcM = TcPluginM . const++-- | Access the 'EvBindsVar' carried by the 'TcPluginM' during+-- constraint solving.  Returns 'Nothing' if invoked during+-- 'tcPluginInit' or 'tcPluginStop'.+getEvBindsTcPluginM :: TcPluginM EvBindsVar+getEvBindsTcPluginM = TcPluginM return+++data TcPlugin = forall s. TcPlugin+  { tcPluginInit  :: TcPluginM s+    -- ^ Initialize plugin, when entering type-checker.++  , tcPluginSolve :: s -> TcPluginSolver+    -- ^ Solve some constraints.+    -- TODO: WRITE MORE DETAILS ON HOW THIS WORKS.++  , tcPluginStop  :: s -> TcPluginM ()+   -- ^ Clean up after the plugin, when exiting the type-checker.+  }++data TcPluginResult+  = TcPluginContradiction [Ct]+    -- ^ The plugin found a contradiction.+    -- The returned constraints are removed from the inert set,+    -- and recorded as insoluble.++  | TcPluginOk [(EvTerm,Ct)] [Ct]+    -- ^ The first field is for constraints that were solved.+    -- These are removed from the inert set,+    -- and the evidence for them is recorded.+    -- The second field contains new work, that should be processed by+    -- the constraint solver.++{- *********************************************************************+*                                                                      *+                        Role annotations+*                                                                      *+********************************************************************* -}++type RoleAnnotEnv = NameEnv (LRoleAnnotDecl GhcRn)++mkRoleAnnotEnv :: [LRoleAnnotDecl GhcRn] -> RoleAnnotEnv+mkRoleAnnotEnv role_annot_decls+ = mkNameEnv [ (name, ra_decl)+             | ra_decl <- role_annot_decls+             , let name = roleAnnotDeclName (unLoc ra_decl)+             , not (isUnboundName name) ]+       -- Some of the role annots will be unbound;+       -- we don't wish to include these++emptyRoleAnnotEnv :: RoleAnnotEnv+emptyRoleAnnotEnv = emptyNameEnv++lookupRoleAnnot :: RoleAnnotEnv -> Name -> Maybe (LRoleAnnotDecl GhcRn)+lookupRoleAnnot = lookupNameEnv++getRoleAnnots :: [Name] -> RoleAnnotEnv -> [LRoleAnnotDecl GhcRn]+getRoleAnnots bndrs role_env+  = mapMaybe (lookupRoleAnnot role_env) bndrs
typecheck/TcRnTypes.hs-boot view
@@ -1,6 +1,12 @@ module TcRnTypes where --- Build ordering-import GHC.Base()+import TcType+import SrcLoc  data TcLclEnv++setLclEnvTcLevel :: TcLclEnv -> TcLevel -> TcLclEnv+getLclEnvTcLevel :: TcLclEnv -> TcLevel++setLclEnvLoc :: TcLclEnv -> RealSrcSpan -> TcLclEnv+getLclEnvLoc :: TcLclEnv -> RealSrcSpan
typecheck/TcRules.hs view
@@ -13,10 +13,13 @@  import GhcPrelude -import HsSyn+import GHC.Hs import TcRnTypes import TcRnMonad import TcSimplify+import Constraint+import Predicate+import TcOrigin import TcMType import TcType import TcHsType@@ -66,10 +69,10 @@ tcRuleDecls (HsRules { rds_src = src                      , rds_rules = decls })    = do { tc_decls <- mapM (wrapLocM tcRule) decls-        ; return $ HsRules { rds_ext   = noExt+        ; return $ HsRules { rds_ext   = noExtField                            , rds_src   = src                            , rds_rules = tc_decls } }-tcRuleDecls (XRuleDecls _) = panic "tcRuleDecls"+tcRuleDecls (XRuleDecls nec) = noExtCon nec  tcRule :: RuleDecl GhcRn -> TcM (RuleDecl GhcTcId) tcRule (HsRule { rd_ext  = ext@@ -110,12 +113,10 @@        -- during zonking (see TcHsSyn.zonkRule)         ; let tpl_ids = lhs_evs ++ id_bndrs-       ; gbls  <- tcGetGlobalTyCoVars -- Even though top level, there might be top-level-                                      -- monomorphic bindings from the MR; test tc111        ; forall_tkvs <- candidateQTyVarsOfTypes $                         map (mkSpecForAllTys tv_bndrs) $  -- don't quantify over lexical tyvars                         rule_ty : map idType tpl_ids-       ; qtkvs <- quantifyTyVars gbls forall_tkvs+       ; qtkvs <- quantifyTyVars forall_tkvs        ; traceTc "tcRule" (vcat [ pprFullRuleName rname                                 , ppr forall_tkvs                                 , ppr qtkvs@@ -141,10 +142,11 @@                          , rd_name = rname                          , rd_act = act                          , rd_tyvs = ty_bndrs -- preserved for ppr-ing-                         , rd_tmvs = map (noLoc . RuleBndr noExt . noLoc) (all_qtkvs ++ tpl_ids)+                         , rd_tmvs = map (noLoc . RuleBndr noExtField . noLoc)+                                         (all_qtkvs ++ tpl_ids)                          , rd_lhs  = mkHsDictLet lhs_binds lhs'                          , rd_rhs  = mkHsDictLet rhs_binds rhs' } }-tcRule (XRuleDecl _) = panic "tcRule"+tcRule (XRuleDecl nec) = noExtCon nec  generateRuleConstraints :: Maybe [LHsTyVarBndr GhcRn] -> [LRuleBndr GhcRn]                         -> LHsExpr GhcRn -> LHsExpr GhcRn@@ -159,7 +161,7 @@               -- bndr_wanted constraints can include wildcard hole               -- constraints, which we should not forget about.               -- It may mention the skolem type variables bound by-              -- the RULE.  c.f. Trac #10072+              -- the RULE.  c.f. #10072         ; tcExtendTyVarEnv tv_bndrs $          tcExtendIdEnv    id_bndrs $@@ -203,7 +205,7 @@         ; (tyvars, tmvars) <- tcExtendNameTyVarEnv tvs $                                    tcRuleTmBndrs rule_bndrs         ; return (map snd tvs ++ tyvars, id : tmvars) }-tcRuleTmBndrs (L _ (XRuleBndr _) : _) = panic "tcRuleTmBndrs"+tcRuleTmBndrs (L _ (XRuleBndr nec) : _) = noExtCon nec  ruleCtxt :: FastString -> SDoc ruleCtxt name = text "When checking the transformation rule" <+>@@ -412,7 +414,7 @@ -- -- NB: we must look inside implications, because with --     -fdefer-type-errors we generate implications rather eagerly;---     see TcUnify.implicationNeeded. Not doing so caused Trac #14732.+--     see TcUnify.implicationNeeded. Not doing so caused #14732. -- -- Unlike simplifyInfer, we don't leave the WantedConstraints unchanged, --   and attempt to solve them from the quantified constraints.  That
typecheck/TcSMonad.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, TypeFamilies #-}+{-# LANGUAGE CPP, DeriveFunctor, TypeFamilies #-}  -- Type definitions for the constraint solver module TcSMonad (@@ -19,7 +19,7 @@     nestTcS, nestImplicTcS, setEvBindsTcS,     checkConstraintsTcS, checkTvConstraintsTcS, -    runTcPluginTcS, addUsedGRE, addUsedGREs,+    runTcPluginTcS, addUsedGRE, addUsedGREs, keepAlive,     matchGlobalInst, TcM.ClsInstResult(..),      QCInst(..),@@ -33,8 +33,10 @@     MaybeNew(..), freshGoals, isFresh, getEvExpr,      newTcEvBinds, newNoTcEvBinds,-    newWantedEq, emitNewWantedEq,-    newWanted, newWantedEvVar, newWantedNC, newWantedEvVarNC, newDerivedNC,+    newWantedEq, newWantedEq_SI, emitNewWantedEq,+    newWanted, newWanted_SI, newWantedEvVar,+    newWantedNC, newWantedEvVarNC,+    newDerivedNC,     newBoundEvVarId,     unifyTyVar, unflattenFmv, reportUnifications,     setEvBind, setWantedEq,@@ -77,7 +79,7 @@      -- Inert CTyEqCans     EqualCtList, findTyEqs, foldTyEqs, isInInertEqs,-    lookupFlattenTyVar, lookupInertTyVar,+    lookupInertTyVar,      -- Inert solved dictionaries     addSolvedDict, lookupSolvedDict,@@ -137,9 +139,7 @@ import qualified ClsInst as TcM( matchGlobalInst, ClsInstResult(..) ) import qualified TcEnv as TcM        ( checkWellStaged, tcGetDefaultTys, tcLookupClass, tcLookupId, topIdLvl )-import PrelNames( heqTyConKey, eqTyConKey )-import ClsInst( InstanceWhat(..) )-import Kind+import ClsInst( InstanceWhat(..), safeOverlap, instanceReturnsDictCon ) import TcType import DynFlags import Type@@ -163,6 +163,9 @@ import UniqSupply import Util import TcRnTypes+import TcOrigin+import Constraint+import Predicate  import Unique import UniqFM@@ -212,7 +215,7 @@   and then kicking it out later.  That's extra work compared to just   doing the equality first. -* (Avoiding fundep iteration) As Trac #14723 showed, it's possible to+* (Avoiding fundep iteration) As #14723 showed, it's possible to   get non-termination if we       - Emit the Derived fundep equalities for a class constraint,         generating some fresh unification variables.@@ -229,7 +232,7 @@ * (Kick-out) We want to apply this priority scheme to kicked-out   constraints too (see the call to extendWorkListCt in kick_out_rewritable   E.g. a CIrredCan can be a hetero-kinded (t1 ~ t2), which may become-  homo-kinded when kicked out, and hence we want to priotitise it.+  homo-kinded when kicked out, and hence we want to prioritise it.  * (Derived equalities) Originally we tried to postpone processing   Derived equalities, in the hope that we might never need to deal@@ -245,7 +248,7 @@  Failing to prioritise these is inefficient (more kick-outs etc). But, worse, it can prevent us spotting a "recursive knot" among-Wanted constraints.  See comment:10 of Trac #12734 for a worked-out+Wanted constraints.  See comment:10 of #12734 for a worked-out example.  So we arrange to put these particular class constraints in the wl_eqs.@@ -253,6 +256,7 @@   NB: since we do not currently apply the substitution to the   inert_solved_dicts, the knot-tying still seems a bit fragile.   But this makes it better.+ -}  -- See Note [WorkList priorities]@@ -328,8 +332,7 @@        -> extendWorkListEq ct wl       ClassPred cls _  -- See Note [Prioritise class equalities]-       |  cls `hasKey` heqTyConKey-       || cls `hasKey` eqTyConKey+       |  isEqPredClass cls        -> extendWorkListEq ct wl       _ -> extendWorkListNonEq ct wl@@ -483,6 +486,63 @@     d2 = d1  See Note [Example of recursive dictionaries]++VERY IMPORTANT INVARIANT:++ (Solved Dictionary Invariant)+    Every member of the inert_solved_dicts is the result+    of applying an instance declaration that "takes a step"++    An instance "takes a step" if it has the form+        dfunDList d1 d2 = MkD (...) (...) (...)+    That is, the dfun is lazy in its arguments, and guarantees to+    immediately return a dictionary constructor.  NB: all dictionary+    data constructors are lazy in their arguments.++    This property is crucial to ensure that all dictionaries are+    non-bottom, which in turn ensures that the whole "recursive+    dictionary" idea works at all, even if we get something like+        rec { d = dfunDList d dx }+    See Note [Recursive superclasses] in TcInstDcls.++ Reason:+   - All instances, except two exceptions listed below, "take a step"+     in the above sense++   - Exception 1: local quantified constraints have no such guarantee;+     indeed, adding a "solved dictionary" when appling a quantified+     constraint led to the ability to define unsafeCoerce+     in #17267.++   - Exception 2: the magic built-in instace for (~) has no+     such guarantee.  It behaves as if we had+         class    (a ~# b) => (a ~ b) where {}+         instance (a ~# b) => (a ~ b) where {}+     The "dfun" for the instance is strict in the coercion.+     Anyway there's no point in recording a "solved dict" for+     (t1 ~ t2); it's not going to allow a recursive dictionary+     to be constructed.  Ditto (~~) and Coercible.++THEREFORE we only add a "solved dictionary"+  - when applying an instance declaration+  - subject to Exceptions 1 and 2 above++In implementation terms+  - TcSMonad.addSolvedDict adds a new solved dictionary,+    conditional on the kind of instance++  - It is only called when applying an instance decl,+    in TcInteract.doTopReactDict++  - ClsInst.InstanceWhat says what kind of instance was+    used to solve the constraint.  In particular+      * LocalInstance identifies quantified constraints+      * BuiltinEqInstance identifies the strange built-in+        instances for equality.++  - ClsInst.instanceReturnsDictCon says which kind of+    instance guarantees to return a dictionary constructor+ Other notes about solved dictionaries  * See also Note [Do not add superclasses of solved dictionaries]@@ -490,7 +550,7 @@ * The inert_solved_dicts field is not rewritten by equalities,   so it may get out of date. -* THe inert_solved_dicts are all Wanteds, never givens+* The inert_solved_dicts are all Wanteds, never givens  * We only cache dictionaries from top-level instances, not from   local quantified constraints.  Reason: if we cached the latter@@ -500,8 +560,8 @@  Note [Do not add superclasses of solved dictionaries] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Every member of inert_solved_dicts is the result of applying a dictionary-function, NOT of applying superclass selection to anything.+Every member of inert_solved_dicts is the result of applying a+dictionary function, NOT of applying superclass selection to anything. Consider          class Ord a => C a where@@ -703,8 +763,7 @@     to the CTyEqCan equalities (modulo canRewrite of course;     eg a wanted cannot rewrite a given) -  * CTyEqCan equalities: see Note [Applying the inert substitution]-                         in TcFlatten+  * CTyEqCan equalities: see Note [inert_eqs: the inert equalities]  Note [EqualCtList invariants] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -980,7 +1039,7 @@ TcType.isTyVarHead. This is encoded in (K3b).  Beware: if we make this test succeed too often, we kick out too much,-and the solver might loop.  Consider (Trac #14363)+and the solver might loop.  Consider (#14363)   work item:   [G] a ~R f b   inert item:  [G] b ~R f a In GHC 8.2 the completeness tests more aggressive, and kicked out@@ -1043,7 +1102,7 @@ Note [The improvement story and derived shadows] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Because Wanteds cannot rewrite Wanteds (see Note [Wanteds do not-rewrite Wanteds] in TcRnTypes), we may miss some opportunities for+rewrite Wanteds] in Constraint), we may miss some opportunities for solving.  Here's a classic example (indexed-types/should_fail/T4093a)      Ambiguity check for f: (Foo e ~ Maybe e) => Foo e@@ -1236,7 +1295,7 @@  Note [Examples of how Derived shadows helps completeness] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Trac #10009, a very nasty example:+#10009, a very nasty example:      f :: (UnF (F b) ~ b) => F b -> () @@ -1276,7 +1335,7 @@  But (a) I have been unable to come up with an example of this         happening-    (b) see Trac #12660 for how adding the derived shadows+    (b) see #12660 for how adding the derived shadows         of a Given led to an infinite loop.     (c) It's unlikely that rewriting derived Givens will lead         to a unification because Givens don't mention touchable@@ -1316,7 +1375,7 @@ them.  If we forget the pend_sc flag, our cunning scheme for avoiding generating superclasses repeatedly will fail. -See Trac #11379 for a case of this.+See #11379 for a case of this.  Note [Do not do improvement for WOnly] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1347,7 +1406,7 @@   with the inert [W] C Int b in the inert set; after all,   it's the very constraint from which the [D] C Int Bool   was split!  We can avoid this by not doing improvement-  on [W] constraints. This came up in Trac #12860.+  on [W] constraints. This came up in #12860. -}  maybeEmitShadow :: InertCans -> Ct -> TcS Ct@@ -1459,25 +1518,6 @@       Just (CTyEqCan { cc_rhs = rhs, cc_eq_rel = NomEq } : _ ) -> Just rhs       _                                                        -> Nothing -lookupFlattenTyVar :: InertEqs -> TcTyVar -> TcType--- See Note [lookupFlattenTyVar]-lookupFlattenTyVar ieqs ftv-  = lookupInertTyVar ieqs ftv `orElse` mkTyVarTy ftv--{- Note [lookupFlattenTyVar]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have an injective function F and-  inert_funeqs:   F t1 ~ fsk1-                  F t2 ~ fsk2-  inert_eqs:      fsk1 ~ fsk2--We never rewrite the RHS (cc_fsk) of a CFunEqCan.  But we /do/ want to-get the [D] t1 ~ t2 from the injectiveness of F.  So we look up the-cc_fsk of CFunEqCans in the inert_eqs when trying to find derived-equalities arising from injectivity.--}-- {- ********************************************************************* *                                                                      *                    Inert instances: inert_insts@@ -1500,7 +1540,7 @@  {- Note [Do not add duplicate quantified instances] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (Trac #15244):+Consider this (#15244):    f :: (C g, D g) => ....   class S g => C g where ...@@ -1551,7 +1591,7 @@           [D] fmv1 ~ fmv2  and now improvement will discover [D] alpha ~ beta. This is important;-eg in Trac #9587.+eg in #9587.  So in kickOutRewritable we look at all the tyvars of the CFunEqCan, including the fsk.@@ -1663,12 +1703,12 @@      kicked_out :: WorkList     -- NB: use extendWorkList to ensure that kicked-out equalities get priority-    -- See Note [Prioritise equality constraints] (Kick-out).+    -- See Note [Prioritise equalities] (Kick-out).     -- The irreds may include non-canonical (hetero-kinded) equality     -- constraints, which perhaps may have become soluble after new_tv     -- is substituted; ditto the dictionaries, which may include (a~b)     -- or (a~~b) constraints.-    kicked_out = foldrBag extendWorkListCt+    kicked_out = foldr extendWorkListCt                           (emptyWorkList { wl_eqs    = tv_eqs_out                                          , wl_funeqs = feqs_out })                           ((dicts_out `andCts` irs_out)@@ -1810,7 +1850,7 @@  Similarly, if we have a CHoleCan, we'd like to rewrite it with any Givens, to give as informative an error messasge as possible-(Trac #12468, #11325).+(#12468, #11325).  Hence:  * In the main simlifier loops in TcSimplify (solveWanteds,@@ -1834,10 +1874,11 @@ addInertSafehask _ item   = pprPanic "addInertSafehask: can't happen! Inserting " $ ppr item -insertSafeOverlapFailureTcS :: Ct -> TcS ()+insertSafeOverlapFailureTcS :: InstanceWhat -> Ct -> TcS () -- See Note [Safe Haskell Overlapping Instances Implementation] in TcSimplify-insertSafeOverlapFailureTcS item-  = updInertCans (\ics -> addInertSafehask ics item)+insertSafeOverlapFailureTcS what item+  | safeOverlap what = return ()+  | otherwise        = updInertCans (\ics -> addInertSafehask ics item)  getSafeOverlapFailures :: TcS Cts -- See Note [Safe Haskell Overlapping Instances Implementation] in TcSimplify@@ -1846,16 +1887,17 @@       ; return $ foldDicts consCts safehask emptyCts }  ---------------addSolvedDict :: CtEvidence -> Class -> [Type] -> TcS ()--- Add a new item in the solved set of the monad+addSolvedDict :: InstanceWhat -> CtEvidence -> Class -> [Type] -> TcS ()+-- Conditionally add a new item in the solved set of the monad -- See Note [Solved dictionaries]-addSolvedDict item cls tys-  | isIPPred (ctEvPred item)    -- Never cache "solved" implicit parameters (not sure why!)-  = return ()-  | otherwise+addSolvedDict what item cls tys+  | isWanted item+  , instanceReturnsDictCon what   = do { traceTcS "updSolvedSetTcs:" $ ppr item        ; updInertTcS $ \ ics ->              ics { inert_solved_dicts = addDict (inert_solved_dicts ics) cls tys item } }+  | otherwise+  = return ()  getSolvedDicts :: TcS (DictMap CtEvidence) getSolvedDicts = do { ics <- getTcSInerts; return (inert_solved_dicts ics) }@@ -2054,7 +2096,7 @@ getNoGivenEqs tclvl skol_tvs   = do { inerts@(IC { inert_eqs = ieqs, inert_irreds = irreds })               <- getInertCans-       ; let has_given_eqs = foldrBag ((||) . ct_given_here) False irreds+       ; let has_given_eqs = foldr ((||) . ct_given_here) False irreds                           || anyDVarEnv eqs_given_here ieqs              insols = filterBag insolubleEqCt irreds                       -- Specifically includes ones that originated in some@@ -2157,7 +2199,7 @@ to () in an outer scope.  Then we can float the (alpha ~ Int) out just fine. So when deciding whether the givens contain an equality, we should canonicalise first, rather than just looking at the original-givens (Trac #8644).+givens (#8644).  So we simply look at the inert, canonical Givens and see if there are any equalities among them, the calculation of has_given_eqs.  There@@ -2209,7 +2251,7 @@    so we can safely discard it.  Notably, it doesn't need to be    returned as part of 'fsks' -For an example, see Trac #9211.+For an example, see #9211.  See also TcUnify Note [Deeper level on the left] for how we ensure that the right variable is on the left of the equality when both are@@ -2217,7 +2259,7 @@  You might wonder whether the skokem really needs to be bound "in the very same implication" as the equuality constraint.-(c.f. Trac #15009) Consider this:+(c.f. #15009) Consider this:    data S a where     MkS :: (a ~ Int) => S a@@ -2317,7 +2359,7 @@ ********************************************************************* -}  foldIrreds :: (Ct -> b -> b) -> Cts -> b -> b-foldIrreds k irreds z = foldrBag k z irreds+foldIrreds k irreds z = foldr k z irreds   {- *********************************************************************@@ -2402,7 +2444,7 @@  The call to 'g' gives rise to a Wanted constraint (?x::Int, C a). We must /not/ solve this from the Given (?x::Int, C a), because of-the intervening binding for (?x::Int).  Trac #14218.+the intervening binding for (?x::Int).  #14218.  We deal with this by arranging that we always fail when looking up a tuple constraint that hides an implicit parameter. Not that this applies@@ -2467,7 +2509,7 @@  addDictsByClass :: DictMap Ct -> Class -> Bag Ct -> DictMap Ct addDictsByClass m cls items-  = addToUDFM m cls (foldrBag add emptyTM items)+  = addToUDFM m cls (foldr add emptyTM items)   where     add ct@(CDictCan { cc_tyargs = tys }) tm = insertTM tys ct tm     add ct _ = pprPanic "addDictsByClass" (ppr ct)@@ -2601,10 +2643,7 @@     }  ----------------newtype TcS a = TcS { unTcS :: TcSEnv -> TcM a }--instance Functor TcS where-  fmap f m = TcS $ fmap f . unTcS m+newtype TcS a = TcS { unTcS :: TcSEnv -> TcM a } deriving (Functor)  instance Applicative TcS where   pure x = TcS (\_ -> return x)@@ -2765,7 +2804,7 @@     cycles = [c | CyclicSCC c <- stronglyConnCompFromEdgedVerticesUniq edges]      coercion_cycles = [c | c <- cycles, any is_co_bind c]-    is_co_bind (EvBind { eb_lhs = b }) = isEqPred (varType b)+    is_co_bind (EvBind { eb_lhs = b }) = isEqPrimPred (varType b)      edges :: [ Node EvVar EvBind ]     edges = [ DigraphNode bind bndr (nonDetEltsUniqSet (evVarsOfTerm rhs))@@ -2875,7 +2914,7 @@         ; unless (null wanteds) $          do { ev_binds_var <- TcM.newNoTcEvBinds-            ; imp <- newImplication+            ; imp <- TcM.newImplication             ; let wc = emptyWC { wc_simple = wanteds }                   imp' = imp { ic_tclvl  = new_tclvl                              , ic_skols  = skol_tvs@@ -2914,7 +2953,7 @@                                         thing_inside new_tcs_env         ; ev_binds_var <- TcM.newTcEvBinds-       ; imp <- newImplication+       ; imp <- TcM.newImplication        ; let wc = emptyWC { wc_simple = wanteds }              imp' = imp { ic_tclvl  = new_tclvl                         , ic_skols  = skol_tvs@@ -3069,6 +3108,8 @@ addUsedGRE :: Bool -> GlobalRdrElt -> TcS () addUsedGRE warn_if_deprec gre = wrapTcS $ TcM.addUsedGRE warn_if_deprec gre +keepAlive :: Name -> TcS ()+keepAlive = wrapTcS . TcM.keepAlive  -- Various smaller utilities [TODO, maybe will be absorbed in the instance matcher] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -3228,6 +3269,7 @@ --       - co :: F tys ~ xi --       - fmv/fsk `notElem` xi --       - fmv not filled (for Wanteds)+--       - xi is flattened (and obeys Note [Almost function-free] in TcRnTypes) -- -- Then for [W] or [WD], we actually fill in the fmv: --      set fmv := xi,@@ -3382,7 +3424,7 @@ -- Make a new variable of the given PredType, -- immediately bind it to the given term -- and return its CtEvidence--- See Note [Bind new Givens immediately] in TcRnTypes+-- See Note [Bind new Givens immediately] in Constraint newGivenEvVar loc (pred, rhs)   = do { new_ev <- newBoundEvVarId pred rhs        ; return (CtGiven { ctev_pred = pred, ctev_evar = new_ev, ctev_loc = loc }) }@@ -3401,19 +3443,23 @@ emitNewWantedEq :: CtLoc -> Role -> TcType -> TcType -> TcS Coercion -- | Emit a new Wanted equality into the work-list emitNewWantedEq loc role ty1 ty2-  | otherwise   = do { (ev, co) <- newWantedEq loc role ty1 ty2-       ; updWorkListTcS $-         extendWorkListEq (mkNonCanonical ev)+       ; updWorkListTcS (extendWorkListEq (mkNonCanonical ev))        ; return co }  -- | Make a new equality CtEvidence-newWantedEq :: CtLoc -> Role -> TcType -> TcType -> TcS (CtEvidence, Coercion)-newWantedEq loc role ty1 ty2+newWantedEq :: CtLoc -> Role -> TcType -> TcType+            -> TcS (CtEvidence, Coercion)+newWantedEq = newWantedEq_SI WDeriv++newWantedEq_SI :: ShadowInfo -> CtLoc -> Role+               -> TcType -> TcType+               -> TcS (CtEvidence, Coercion)+newWantedEq_SI si loc role ty1 ty2   = do { hole <- wrapTcS $ TcM.newCoercionHole pty        ; traceTcS "Emitting new coercion hole" (ppr hole <+> dcolon <+> ppr pty)        ; return ( CtWanted { ctev_pred = pty, ctev_dest = HoleDest hole-                           , ctev_nosh = WDeriv+                           , ctev_nosh = si                            , ctev_loc = loc}                 , mkHoleCo hole ) }   where@@ -3421,35 +3467,44 @@  -- no equalities here. Use newWantedEq instead newWantedEvVarNC :: CtLoc -> TcPredType -> TcS CtEvidence+newWantedEvVarNC = newWantedEvVarNC_SI WDeriv++newWantedEvVarNC_SI :: ShadowInfo -> CtLoc -> TcPredType -> TcS CtEvidence -- Don't look up in the solved/inerts; we know it's not there-newWantedEvVarNC loc pty+newWantedEvVarNC_SI si loc pty   = do { new_ev <- newEvVar pty        ; traceTcS "Emitting new wanted" (ppr new_ev <+> dcolon <+> ppr pty $$                                          pprCtLoc loc)        ; return (CtWanted { ctev_pred = pty, ctev_dest = EvVarDest new_ev-                          , ctev_nosh = WDeriv+                          , ctev_nosh = si                           , ctev_loc = loc })}  newWantedEvVar :: CtLoc -> TcPredType -> TcS MaybeNew+newWantedEvVar = newWantedEvVar_SI WDeriv++newWantedEvVar_SI :: ShadowInfo -> CtLoc -> TcPredType -> TcS MaybeNew -- For anything except ClassPred, this is the same as newWantedEvVarNC-newWantedEvVar loc pty+newWantedEvVar_SI si loc pty   = do { mb_ct <- lookupInInerts loc pty        ; case mb_ct of             Just ctev               | not (isDerived ctev)               -> do { traceTcS "newWantedEvVar/cache hit" $ ppr ctev                     ; return $ Cached (ctEvExpr ctev) }-            _ -> do { ctev <- newWantedEvVarNC loc pty+            _ -> do { ctev <- newWantedEvVarNC_SI si loc pty                     ; return (Fresh ctev) } } --- deals with both equalities and non equalities. Tries to look--- up non-equalities in the cache newWanted :: CtLoc -> PredType -> TcS MaybeNew-newWanted loc pty+-- Deals with both equalities and non equalities. Tries to look+-- up non-equalities in the cache+newWanted = newWanted_SI WDeriv++newWanted_SI :: ShadowInfo -> CtLoc -> PredType -> TcS MaybeNew+newWanted_SI si loc pty   | Just (role, ty1, ty2) <- getEqPredTys_maybe pty-  = Fresh . fst <$> newWantedEq loc role ty1 ty2+  = Fresh . fst <$> newWantedEq_SI si loc role ty1 ty2   | otherwise-  = newWantedEvVar loc pty+  = newWantedEvVar_SI si loc pty  -- deals with both equalities and non equalities. Doesn't do any cache lookups. newWantedNC :: CtLoc -> PredType -> TcS CtEvidence@@ -3494,11 +3549,12 @@          wrapErrTcS $          solverDepthErrorTcS loc ty } -matchFam :: TyCon -> [Type] -> TcS (Maybe (Coercion, TcType))+matchFam :: TyCon -> [Type] -> TcS (Maybe (CoercionN, TcType))+-- Given (F tys) return (ty, co), where co :: F tys ~N ty matchFam tycon args = wrapTcS $ matchFamTcM tycon args -matchFamTcM :: TyCon -> [Type] -> TcM (Maybe (Coercion, TcType))--- Given (F tys) return (ty, co), where co :: F tys ~ ty+matchFamTcM :: TyCon -> [Type] -> TcM (Maybe (CoercionN, TcType))+-- Given (F tys) return (ty, co), where co :: F tys ~N ty matchFamTcM tycon args   = do { fam_envs <- FamInst.tcGetFamInstEnvs        ; let match_fam_result
typecheck/TcSigs.hs view
@@ -27,10 +27,11 @@  import GhcPrelude -import HsSyn+import GHC.Hs import TcHsType import TcRnTypes import TcRnMonad+import TcOrigin import TcType import TcMType import TcValidity ( checkValidType )@@ -45,7 +46,6 @@ import Id       ( Id, idName, idType, idInlinePragma, setInlinePragma, mkLocalId ) import PrelNames( mkUnboundName ) import BasicTypes-import Bag( foldrBag ) import Module( getModule ) import Name import NameEnv@@ -222,6 +222,7 @@ tcUserTypeSig loc hs_sig_ty mb_name   | isCompleteHsSig hs_sig_ty   = do { sigma_ty <- tcHsSigWcType ctxt_F hs_sig_ty+       ; traceTc "tcuser" (ppr sigma_ty)        ; return $          CompleteSig { sig_bndr  = mkLocalId name sigma_ty                      , sig_ctxt  = ctxt_T@@ -257,8 +258,8 @@ isCompleteHsSig (HsWC { hswc_ext  = wcs                       , hswc_body = HsIB { hsib_body = hs_ty } })    = null wcs && no_anon_wc hs_ty-isCompleteHsSig (HsWC _ (XHsImplicitBndrs _)) = panic "isCompleteHsSig"-isCompleteHsSig (XHsWildCardBndrs _) = panic "isCompleteHsSig"+isCompleteHsSig (HsWC _ (XHsImplicitBndrs nec)) = noExtCon nec+isCompleteHsSig (XHsWildCardBndrs nec) = noExtCon nec  no_anon_wc :: LHsType GhcRn -> Bool no_anon_wc lty = go lty@@ -299,7 +300,7 @@   where     go (UserTyVar _ _)      = True     go (KindedTyVar _ _ ki) = no_anon_wc ki-    go (XTyVarBndr{})       = panic "no_anon_wc_bndrs"+    go (XTyVarBndr nec)     = noExtCon nec  {- Note [Fail eagerly on bad signatures] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -331,7 +332,7 @@  Note [Pattern synonym signatures] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Pattern synonym signatures are surprisingly tricky (see Trac #11224 for example).+Pattern synonym signatures are surprisingly tricky (see #11224 for example). In general they look like this:     pattern P :: forall univ_tvs. req_theta@@ -357,7 +358,7 @@ synonym signature, because we are going to zonk the signature to a Type (not a TcType), in TcPatSyn.tc_patsyn_finish, and that fails if there are un-filled-in coercion variables mentioned-in the type (Trac #15694).+in the type (#15694).  The best thing is simply to use solveEqualities to solve all the equalites, rather than leaving them in the ambient constraints@@ -376,8 +377,8 @@ tcPatSynSig name sig_ty   | HsIB { hsib_ext = implicit_hs_tvs          , hsib_body = hs_ty }  <- sig_ty-  , (univ_hs_tvs, hs_req,  hs_ty1)     <- splitLHsSigmaTy hs_ty-  , (ex_hs_tvs,   hs_prov, hs_body_ty) <- splitLHsSigmaTy hs_ty1+  , (univ_hs_tvs, hs_req,  hs_ty1)     <- splitLHsSigmaTyInvis hs_ty+  , (ex_hs_tvs,   hs_prov, hs_body_ty) <- splitLHsSigmaTyInvis hs_ty1   = do {  traceTc "tcPatSynSig 1" (ppr sig_ty)        ; (implicit_tvs, (univ_tvs, (ex_tvs, (req, prov, body_ty))))            <- pushTcLevelM_   $@@ -389,14 +390,14 @@                  ; prov    <- tcHsContext hs_prov                  ; body_ty <- tcHsOpenType hs_body_ty                      -- A (literal) pattern can be unlifted;-                     -- e.g. pattern Zero <- 0#   (Trac #12094)+                     -- e.g. pattern Zero <- 0#   (#12094)                  ; return (req, prov, body_ty) } -       ; let ungen_patsyn_ty = build_patsyn_type [] implicit_tvs univ_tvs req-                                                 ex_tvs prov body_ty+       ; let ungen_patsyn_ty = build_patsyn_type [] implicit_tvs univ_tvs+                                                 req ex_tvs prov body_ty         -- Kind generalisation-       ; kvs <- kindGeneralize ungen_patsyn_ty+       ; kvs <- kindGeneralizeAll ungen_patsyn_ty        ; traceTc "tcPatSynSig" (ppr ungen_patsyn_ty)         -- These are /signatures/ so we zonk to squeeze out any kind@@ -460,11 +461,11 @@     build_patsyn_type kvs imp univ req ex prov body       = mkInvForAllTys kvs $         mkSpecForAllTys (imp ++ univ) $-        mkFunTys req $+        mkPhiTy req $         mkSpecForAllTys ex $-        mkFunTys prov $+        mkPhiTy prov $         body-tcPatSynSig _ (XHsImplicitBndrs _) = panic "tcPatSynSig"+tcPatSynSig _ (XHsImplicitBndrs nec) = noExtCon nec  ppr_tvs :: [TyVar] -> SDoc ppr_tvs tvs = braces (vcat [ ppr tv <+> dcolon <+> ppr (tyVarKind tv)@@ -497,25 +498,14 @@                              , sig_loc = loc })   = setSrcSpan loc $  -- Set the binding site of the tyvars     do { traceTc "Staring partial sig {" (ppr hs_sig)-       ; (wcs, wcx, tv_names, tvs, theta, tau) <- tcHsPartialSigType ctxt hs_ty--        -- Clone the quantified tyvars-        -- Reason: we might have    f, g :: forall a. a -> _ -> a-        --         and we want it to behave exactly as if there were-        --         two separate signatures.  Cloning here seems like-        --         the easiest way to do so, and is very similar to-        --         the tcInstType in the CompleteSig case-        -- See Trac #14643-       ; (subst, tvs') <- newMetaTyVarTyVars tvs-                         -- Why newMetaTyVarTyVars?  See TcBinds-                         -- Note [Quantified variables in partial type signatures]-       ; let tv_prs = tv_names `zip` tvs'-             inst_sig = TISI { sig_inst_sig   = hs_sig+       ; (wcs, wcx, tv_prs, theta, tau) <- tcHsPartialSigType ctxt hs_ty+         -- See Note [Checking partial type signatures] in TcHsType+       ; let inst_sig = TISI { sig_inst_sig   = hs_sig                              , sig_inst_skols = tv_prs                              , sig_inst_wcs   = wcs                              , sig_inst_wcx   = wcx-                             , sig_inst_theta = substTys subst theta-                             , sig_inst_tau   = substTy  subst tau }+                             , sig_inst_theta = theta+                             , sig_inst_tau   = tau }        ; traceTc "End partial sig }" (ppr inst_sig)        ; return inst_sig } @@ -587,7 +577,7 @@      -- ar_env maps a local to the arity of its definition     ar_env :: NameEnv Arity-    ar_env = foldrBag lhsBindArity emptyNameEnv binds+    ar_env = foldr lhsBindArity emptyNameEnv binds  lhsBindArity :: LHsBind GhcRn -> NameEnv Arity -> NameEnv Arity lhsBindArity (L _ (FunBind { fun_id = id, fun_matches = ms })) env@@ -697,7 +687,7 @@    the "deeply" stuff may be too much, because it introduces lambdas,    though I think it can be made to work without too much trouble.) -2. We need to take care with type families (Trac #5821).  Consider+2. We need to take care with type families (#5821).  Consider       type instance F Int = Bool       f :: Num a => a -> F a       {-# SPECIALISE foo :: Int -> Bool #-}@@ -764,7 +754,7 @@ -- Example: SPECIALISE for a class method: the Name in the SpecSig is --          for the selector Id, but the poly_id is something like $cop -- However we want to use fun_name in the error message, since that is--- what the user wrote (Trac #8537)+-- what the user wrote (#8537)   = addErrCtxt (spec_ctxt prag) $     do  { warnIf (not (isOverloadedTy poly_ty || isInlinePragma inl))                  (text "SPECIALISE pragma for non-overloaded function"@@ -776,7 +766,7 @@   where     name      = idName poly_id     poly_ty   = idType poly_id-    spec_ctxt prag = hang (text "In the SPECIALISE pragma") 2 (ppr prag)+    spec_ctxt prag = hang (text "In the pragma:") 2 (ppr prag)      tc_one hs_ty       = do { spec_ty <- tcHsSigType   (FunSigCtxt name False) hs_ty
typecheck/TcSimplify.hs view
@@ -30,10 +30,8 @@  import Bag import Class         ( Class, classKey, classTyCon )-import DynFlags      ( WarningFlag ( Opt_WarnMonomorphism )-                     , WarnReason ( Reason )-                     , DynFlags( solverIterations ) )-import HsExpr        ( UnboundVar(..) )+import DynFlags+import GHC.Hs.Expr   ( UnboundVar(..) ) import Id            ( idType, mkLocalId ) import Inst import ListSetOps@@ -49,8 +47,10 @@ import TcMType   as TcM import TcRnMonad as TcM import TcSMonad  as TcS+import Constraint+import Predicate+import TcOrigin import TcType-import TrieMap       () -- DV: for now import Type import TysWiredIn    ( liftedRepTy ) import Unify         ( tcMatchTyKi )@@ -81,8 +81,21 @@ -- generates plus the constraints produced by static forms inside. -- If it fails with an exception, it reports any insolubles -- (out of scope variables) before doing so--- NB: bring any environments into scope before calling this, so that--- the reportUnsolved has access to the most complete GlobalRdrEnv+--+-- captureTopConstraints is used exclusively by TcRnDriver at the top+-- level of a module.+--+-- Importantly, if captureTopConstraints propagates an exception, it+-- reports any insoluble constraints first, lest they be lost+-- altogether.  This is important, because solveLocalEqualities (maybe+-- other things too) throws an exception without adding any error+-- messages; it just puts the unsolved constraints back into the+-- monad. See TcRnMonad Note [Constraints and errors]+-- #16376 is an example of what goes wrong if you don't do this.+--+-- NB: the caller should bring any environments into scope before+-- calling this, so that the reportUnsolved has access to the most+-- complete GlobalRdrEnv captureTopConstraints thing_inside   = do { static_wc_var <- TcM.newTcRef emptyWC ;        ; (mb_res, lie) <- TcM.updGblEnv (\env -> env { tcg_static_wc = static_wc_var } ) $@@ -216,12 +229,16 @@ simpl_top wanteds   = do { wc_first_go <- nestTcS (solveWantedsAndDrop wanteds)                             -- This is where the main work happens-       ; try_tyvar_defaulting wc_first_go }+       ; dflags <- getDynFlags+       ; try_tyvar_defaulting dflags wc_first_go }   where-    try_tyvar_defaulting :: WantedConstraints -> TcS WantedConstraints-    try_tyvar_defaulting wc+    try_tyvar_defaulting :: DynFlags -> WantedConstraints -> TcS WantedConstraints+    try_tyvar_defaulting dflags wc       | isEmptyWC wc       = return wc+      | insolubleWC wc+      , gopt Opt_PrintExplicitRuntimeReps dflags -- See Note [Defaulting insolubles]+      = try_class_defaulting wc       | otherwise       = do { free_tvs <- TcS.zonkTyCoVarsAndFVList (tyCoVarsOfWCList wc)            ; let meta_tvs = filter (isTyVar <&&> isMetaTyVar) free_tvs@@ -239,7 +256,7 @@      try_class_defaulting :: WantedConstraints -> TcS WantedConstraints     try_class_defaulting wc-      | isEmptyWC wc+      | isEmptyWC wc || insolubleWC wc -- See Note [Defaulting insolubles]       = return wc       | otherwise  -- See Note [When to do type-class defaulting]       = do { something_happened <- applyDefaultingRules wc@@ -311,7 +328,7 @@            <type> |> co-hole     where co-hole is not filled in.  Eeek!  That un-filled-in     hole actually causes GHC to crash with "fvProv falls into a hole"-    See Trac #11563, #11520, #11516, #11399+    See #11563, #11520, #11516, #11399  So it's important to use 'checkNoErrs' here! @@ -323,12 +340,12 @@ lot of errors that would be solved by defaulting; these errors are quite spurious because fixing the single insoluble error means that defaulting happens again, which makes all the other errors go away.-This is jolly confusing: Trac #9033.+This is jolly confusing: #9033.  So it seems better to always do type-class defaulting.  However, always doing defaulting does mean that we'll do it in-situations like this (Trac #5934):+situations like this (#5934):    run :: (forall s. GenST s) -> Int    run = fromInteger 0 We don't unify the return type of fromInteger with the given function@@ -349,7 +366,7 @@ which we couldn't solve because of the kind incompatibility, and 'a' is free. Then when we default 'a' we can solve the constraint.  And we want to do that before starting in on type classes.  We MUST do it before reporting-errors, because it isn't an error!  Trac #7967 was due to this.+errors, because it isn't an error!  #7967 was due to this.  Note [Top-level Defaulting Plan] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -500,11 +517,55 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When simplifying constraints for the ambiguity check, we use solveWantedsAndDrop, not simpl_top, so that we do no defaulting.-Trac #11947 was an example:+#11947 was an example:    f :: Num a => Int -> Int This is ambiguous of course, but we don't want to default the (Num alpha) constraint to (Num Int)!  Doing so gives a defaulting warning, but no error.++Note [Defaulting insolubles]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If a set of wanteds is insoluble, we have no hope of accepting the+program. Yet we do not stop constraint solving, etc., because we may+simplify the wanteds to produce better error messages. So, once+we have an insoluble constraint, everything we do is just about producing+helpful error messages.++Should we default in this case or not? Let's look at an example (tcfail004):++  (f,g) = (1,2,3)++With defaulting, we get a conflict between (a0,b0) and (Integer,Integer,Integer).+Without defaulting, we get a conflict between (a0,b0) and (a1,b1,c1). I (Richard)+find the latter more helpful. Several other test cases (e.g. tcfail005) suggest+similarly. So: we should not do class defaulting with insolubles.++On the other hand, RuntimeRep-defaulting is different. Witness tcfail078:++  f :: Integer i => i+  f =               0++Without RuntimeRep-defaulting, we GHC suggests that Integer should have kind+TYPE r0 -> Constraint and then complains that r0 is actually untouchable+(presumably, because it can't be sure if `Integer i` entails an equality).+If we default, we are told of a clash between (* -> Constraint) and Constraint.+The latter seems far better, suggesting we *should* do RuntimeRep-defaulting+even on insolubles.++But, evidently, not always. Witness UnliftedNewtypesInfinite:++  newtype Foo = FooC (# Int#, Foo #)++This should fail with an occurs-check error on the kind of Foo (with -XUnliftedNewtypes).+If we default RuntimeRep-vars, we get++  Expecting a lifted type, but ‘(# Int#, Foo #)’ is unlifted++which is just plain wrong.++Conclusion: we should do RuntimeRep-defaulting on insolubles only when the user does not+want to hear about RuntimeRep stuff -- that is, when -fprint-explicit-runtime-reps+is not set. -}  ------------------@@ -613,11 +674,11 @@ find superclasses, using try_harder.  Reason: we might have a type signature    f :: F op (Implements push) => ..-where F is a type function.  This happened in Trac #3972.+where F is a type function.  This happened in #3972.  We could do more than once but we'd have to have /some/ limit: in the the recursive case, we would go on forever in the common case where-the constraints /are/ satisfiable (Trac #10592 comment:12!).+the constraints /are/ satisfiable (#10592 comment:12!).  For stratightforard situations without type functions the try_harder step does nothing.@@ -630,10 +691,12 @@ the purpose of tcNormalise is to take a type, plus some local constraints, and normalise the type as much as possible with respect to those constraints. +It does *not* reduce type or data family applications or look through newtypes.+ Why is this useful? As one example, when coverage-checking an EmptyCase expression, it's possible that the type of the scrutinee will only reduce if some local equalities are solved for. See "Wrinkle: Local equalities"-in Note [Type normalisation for EmptyCase] in Check.+in Note [Type normalisation] in Check.  To accomplish its stated goal, tcNormalise first feeds the local constraints into solveSimpleGivens, then stuffs the argument type in a CHoleCan, and feeds@@ -704,9 +767,8 @@               psig_theta  = [ pred | sig <- partial_sigs                                    , pred <- sig_inst_theta sig ] -       ; gbl_tvs <- tcGetGlobalTyCoVars        ; dep_vars <- candidateQTyVarsOfTypes (psig_tv_tys ++ psig_theta ++ map snd name_taus)-       ; qtkvs <- quantifyTyVars gbl_tvs dep_vars+       ; qtkvs <- quantifyTyVars dep_vars        ; traceTc "simplifyInfer: empty WC" (ppr name_taus $$ ppr qtkvs)        ; return (qtkvs, [], emptyTcEvBinds, emptyWC, False) } @@ -770,7 +832,7 @@         -- We must produce bindings for the psig_theta_vars, because we may have        -- used them in evidence bindings constructed by solveWanteds earlier-       -- Easiest way to do this is to emit them as new Wanteds (Trac #14643)+       -- Easiest way to do this is to emit them as new Wanteds (#14643)        ; ct_loc <- getCtLocM AnnOrigin Nothing        ; let psig_wanted = [ CtWanted { ctev_pred = idType psig_theta_var                                       , ctev_dest = EvVarDest psig_theta_var@@ -779,7 +841,7 @@                            | psig_theta_var <- psig_theta_vars ]         -- Now construct the residual constraint-       ; residual_wanted <- mkResidualConstraints rhs_tclvl tc_env ev_binds_var+       ; residual_wanted <- mkResidualConstraints rhs_tclvl ev_binds_var                                  name_taus co_vars qtvs bound_theta_vars                                  (wanted_transformed `andWC` mkSimpleWC psig_wanted) @@ -798,13 +860,13 @@     partial_sigs = filter isPartialSig sigs  ---------------------mkResidualConstraints :: TcLevel -> Env TcGblEnv TcLclEnv -> EvBindsVar+mkResidualConstraints :: TcLevel -> EvBindsVar                       -> [(Name, TcTauType)]                       -> VarSet -> [TcTyVar] -> [EvVar]                       -> WantedConstraints -> TcM WantedConstraints -- Emit the remaining constraints from the RHS. -- See Note [Emitting the residual implication in simplifyInfer]-mkResidualConstraints rhs_tclvl tc_env ev_binds_var+mkResidualConstraints rhs_tclvl ev_binds_var                         name_taus co_vars qtvs full_theta_vars wanteds   | isEmptyWC wanteds   = return wanteds@@ -817,23 +879,22 @@         ; _ <- promoteTyVarSet (tyCoVarsOfCts outer_simple)          ; let inner_wanted = wanteds { wc_simple = inner_simple }+        ; implics <- if isEmptyWC inner_wanted+                     then return emptyBag+                     else do implic1 <- newImplication+                             return $ unitBag $+                                      implic1  { ic_tclvl  = rhs_tclvl+                                               , ic_skols  = qtvs+                                               , ic_telescope = Nothing+                                               , ic_given  = full_theta_vars+                                               , ic_wanted = inner_wanted+                                               , ic_binds  = ev_binds_var+                                               , ic_no_eqs = False+                                               , ic_info   = skol_info }+         ; return (WC { wc_simple = outer_simple-                     , wc_impl   = mk_implic inner_wanted })}+                     , wc_impl   = implics })}   where-    mk_implic inner_wanted-      | isEmptyWC inner_wanted-      = emptyBag-      | otherwise-      = unitBag (implicationPrototype { ic_tclvl  = rhs_tclvl-                                      , ic_skols  = qtvs-                                      , ic_telescope = Nothing-                                      , ic_given  = full_theta_vars-                                      , ic_wanted = inner_wanted-                                      , ic_binds  = ev_binds_var-                                      , ic_no_eqs = False-                                      , ic_info   = skol_info-                                      , ic_env    = tc_env })-     full_theta = map idType full_theta_vars     skol_info  = InferSkol [ (name, mkSigmaTy [] full_theta ty)                            | (name, ty) <- name_taus ]@@ -870,11 +931,11 @@ which takes the CoVars free in the inferred type, and pulls their constraints out.  (NB: this set of CoVars should be closed-over-kinds.) -All rather subtle; see Trac #14584.+All rather subtle; see #14584.  Note [Add signature contexts as givens] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (Trac #11016):+Consider this (#11016):   f2 :: (?x :: Int) => _   f2 = ?x or this@@ -924,7 +985,7 @@   not going to become further constrained), and re-simplify the   candidate constraints. -  Motivation for re-simplification (Trac #7857): imagine we have a+  Motivation for re-simplification (#7857): imagine we have a   constraint (C (a->b)), where 'a :: TYPE l1' and 'b :: TYPE l2' are   not free in the envt, and instance forall (a::*) (b::*). (C a) => C   (a -> b) The instance doesn't match while l1,l2 are polymorphic, but@@ -969,7 +1030,7 @@        ; candidates <- defaultTyVarsAndSimplify rhs_tclvl mono_tvs candidates         -- Step 3: decide which kind/type variables to quantify over-       ; qtvs <- decideQuantifiedTyVars mono_tvs name_taus psigs candidates+       ; qtvs <- decideQuantifiedTyVars name_taus psigs candidates         -- Step 4: choose which of the remaining candidate        --         predicates to actually quantify over@@ -981,7 +1042,7 @@                = pickQuantifiablePreds (mkVarSet qtvs) candidates              -- NB: do /not/ run pickQuantifiablePreds over psig_theta,              -- because we always want to quantify over psig_theta, and not-             -- drop any of them; e.g. CallStack constraints.  c.f Trac #14658+             -- drop any of them; e.g. CallStack constraints.  c.f #14658               theta = mkMinimalBySCs id $  -- See Note [Minimize by Superclasses]                      (psig_theta ++ quantifiable_candidates)@@ -1021,7 +1082,7 @@         ; taus <- mapM (TcM.zonkTcType . snd) name_taus -       ; mono_tvs0 <- tcGetGlobalTyCoVars+       ; tc_lvl <- TcM.getTcLevel        ; let psig_tys = mkTyVarTys psig_qtvs ++ psig_theta               co_vars = coVarsOfTypes (psig_tys ++ taus)@@ -1032,27 +1093,42 @@                -- E.g.  If we can't quantify over co :: k~Type, then we can't                --       quantify over k either!  Hence closeOverKinds +             mono_tvs0 = filterVarSet (not . isQuantifiableTv tc_lvl) $+                         tyCoVarsOfTypes candidates+               -- We need to grab all the non-quantifiable tyvars in the+               -- candidates so that we can grow this set to find other+               -- non-quantifiable tyvars. This can happen with something+               -- like+               --    f x y = ...+               --      where z = x 3+               -- The body of z tries to unify the type of x (call it alpha[1])+               -- with (beta[2] -> gamma[2]). This unification fails because+               -- alpha is untouchable. But we need to know not to quantify over+               -- beta or gamma, because they are in the equality constraint with+               -- alpha. Actual test case: typecheck/should_compile/tc213+              mono_tvs1 = mono_tvs0 `unionVarSet` co_var_tvs -             eq_constraints = filter isEqPred candidates+             eq_constraints = filter isEqPrimPred candidates              mono_tvs2      = growThetaTyVars eq_constraints mono_tvs1 -             constrained_tvs = (growThetaTyVars eq_constraints+             constrained_tvs = filterVarSet (isQuantifiableTv tc_lvl) $+                               (growThetaTyVars eq_constraints                                                (tyCoVarsOfTypes no_quant)                                 `minusVarSet` mono_tvs2)                                `delVarSetList` psig_qtvs              -- constrained_tvs: the tyvars that we are not going to-             -- quantify solely because of the moonomorphism restriction+             -- quantify solely because of the monomorphism restriction              ---             -- (`minusVarSet` mono_tvs1`): a type variable is only+             -- (`minusVarSet` mono_tvs2`): a type variable is only              --   "constrained" (so that the MR bites) if it is not-             --   free in the environment (Trac #13785)+             --   free in the environment (#13785)              --              -- (`delVarSetList` psig_qtvs): if the user has explicitly              --   asked for quantification, then that request "wins"              --   over the MR.  Note: do /not/ delete psig_qtvs from              --   mono_tvs1, because mono_tvs1 cannot under any circumstances-             --   be quantified (Trac #14479); see+             --   be quantified (#14479); see              --   Note [Quantification and partial signatures], Wrinkle 3, 4               mono_tvs = mono_tvs2 `unionVarSet` constrained_tvs@@ -1066,7 +1142,6 @@         ; traceTc "decideMonoTyVars" $ vcat            [ text "mono_tvs0 =" <+> ppr mono_tvs0-           , text "mono_tvs1 =" <+> ppr mono_tvs1            , text "no_quant =" <+> ppr no_quant            , text "maybe_quant =" <+> ppr maybe_quant            , text "eq_constraints =" <+> ppr eq_constraints@@ -1155,13 +1230,12 @@  ------------------ decideQuantifiedTyVars-   :: TyCoVarSet        -- Monomorphic tyvars-   -> [(Name,TcType)]   -- Annotated theta and (name,tau) pairs+   :: [(Name,TcType)]   -- Annotated theta and (name,tau) pairs    -> [TcIdSigInst]     -- Partial signatures    -> [PredType]        -- Candidates, zonked    -> TcM [TyVar] -- Fix what tyvars we are going to quantify over, and quantify them-decideQuantifiedTyVars mono_tvs name_taus psigs candidates+decideQuantifiedTyVars name_taus psigs candidates   = do {     -- Why psig_tys? We try to quantify over everything free in here              -- See Note [Quantification and partial signatures]              --     Wrinkles 2 and 3@@ -1170,7 +1244,6 @@        ; psig_theta <- mapM TcM.zonkTcType [ pred | sig <- psigs                                                   , pred <- sig_inst_theta sig ]        ; tau_tys  <- mapM (TcM.zonkTcType . snd) name_taus-       ; mono_tvs <- TcM.zonkTyCoVarsAndFV mono_tvs         ; let -- Try to quantify over variables free in these types              psig_tys = psig_tv_tys ++ psig_theta@@ -1184,7 +1257,7 @@        --        -- Keep the psig_tys first, so that candidateQTyVarsOfTypes produces        -- them in that order, so that the final qtvs quantifies in the same-       -- order as the partial signatures do (Trac #13524)+       -- order as the partial signatures do (#13524)        ; dv@DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs} <- candidateQTyVarsOfTypes $                                                          psig_tys ++ candidates ++ tau_tys        ; let pick     = (`dVarSetIntersectVarSet` grown_tcvs)@@ -1198,7 +1271,7 @@            , text "grown_tcvs =" <+> ppr grown_tcvs            , text "dvs =" <+> ppr dvs_plus]) -       ; quantifyTyVars mono_tvs dvs_plus }+       ; quantifyTyVars dvs_plus }  ------------------ growThetaTyVars :: ThetaType -> TyCoVarSet -> TyCoVarSet@@ -1280,14 +1353,14 @@   Bottom line: Try to quantify over any variable free in psig_theta,   just like the tau-part of the type. -* Wrinkle 3 (Trac #13482). Also consider+* Wrinkle 3 (#13482). Also consider     f :: forall a. _ => Int -> Int     f x = if (undefined :: a) == undefined then x else 0   Here we get an (Eq a) constraint, but it's not mentioned in the   psig_theta nor the type of 'f'.  But we still want to quantify   over 'a' even if the monomorphism restriction is on. -* Wrinkle 4 (Trac #14479)+* Wrinkle 4 (#14479)     foo :: Num a => a -> a     foo xxx = g xxx       where@@ -1330,7 +1403,7 @@     - Avoid downstream errors     - Do not perform an ambiguity test on a bogus type, which might well       fail spuriously, thereby obfuscating the original insoluble error.-      Trac #14000 is an example+      #14000 is an example  I tried an alternative approach: simply failM, after emitting the residual implication constraint; the exception will be caught in@@ -1343,7 +1416,7 @@ Example:     (a::*) ~ Int# We get an insoluble derived error *~#, and we don't want to discard-it before doing the isInsolubleWC test!  (Trac #8262)+it before doing the isInsolubleWC test!  (#8262)  Note [Default while Inferring] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1395,7 +1468,7 @@ Note [Avoid unnecessary constraint simplification] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     -------- NB NB NB (Jun 12) --------------    This note not longer applies; see the notes with Trac #4361.+    This note not longer applies; see the notes with #4361.     But I'm leaving it in here so we remember the issue.)     ---------------------------------------- When inferring the type of a let-binding, with simplifyInfer,@@ -1595,7 +1668,7 @@          -- Solve the nested constraints        ; (no_given_eqs, given_insols, residual_wanted)             <- nestImplicTcS ev_binds_var tclvl $-               do { let loc    = mkGivenLoc tclvl info (implicLclEnv imp)+               do { let loc    = mkGivenLoc tclvl info (ic_env imp)                         givens = mkGivens loc given_ids                   ; solveSimpleGivens givens @@ -1758,7 +1831,7 @@        _                           -> False    -- To think about: do we want to report redundant givens for-  -- pattern synonyms, PatSynSigSkol? c.f Trac #9953, comment:21.+  -- pattern synonyms, PatSynSigSkol? c.f #9953, comment:21. warnRedundantGivens (InstSkol {}) = True warnRedundantGivens _             = False @@ -1791,7 +1864,7 @@  = do { ev_binds <- TcS.getTcEvBindsMap ev_binds_var       ; tcvs     <- TcS.getTcEvTyCoVars ev_binds_var -      ; let seeds1        = foldrBag add_implic_seeds old_needs implics+      ; let seeds1        = foldr add_implic_seeds old_needs implics             seeds2        = foldEvBindMap add_wanted seeds1 ev_binds             seeds3        = seeds2 `unionVarSet` tcvs             need_inner    = findNeededEvVars ev_binds seeds3@@ -1844,7 +1917,7 @@ such dead superclass selections will eventually be dropped as dead code, but: - * It won't always be dropped (Trac #13032).  In the case of an+ * It won't always be dropped (#13032).  In the case of an    unlifted-equality superclass like d2 above, we generate        case heq_sc d1 of d2 -> ...    and we can't (in general) drop that case exrpession in case@@ -1867,7 +1940,7 @@ test T12227.  But we don't get to discard all redundant equality superclasses, alas;-see Trac #15205.+see #15205.  Note [Tracking redundant constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1959,7 +2032,7 @@  ----- Shortcomings -Consider (see Trac #9939)+Consider (see #9939)     f2 :: (Eq a, Ord a) => a -> a -> Bool     -- Ord a redundant, but Eq a is reported     f2 x y = (x == y)@@ -1971,7 +2044,7 @@ Note [Cutting off simpl_loop] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It is very important not to iterate in simpl_loop unless there is a chance-of progress.  Trac #8474 is a classic example:+of progress.  #8474 is a classic example:    * There's a deeply-nested chain of implication constraints.        ?x:alpha => ?y1:beta1 => ... ?yn:betan => [W] ?x:Int@@ -2069,7 +2142,7 @@         new_trapping_tvs = trapping_tvs `extendVarSetList` ic_skols imp      do_bag :: (a -> Bag c) -> Bag a -> Bag c-    do_bag f = foldrBag (unionBags.f) emptyBag+    do_bag f = foldr (unionBags.f) emptyBag      is_floatable skol_tvs ct        | isGivenCt ct     = False@@ -2107,12 +2180,12 @@     float out of such implications, which meant it would happily infer     non-principal types.) -   HOWEVER (Trac #12797) in findDefaultableGroups we are not worried about+   HOWEVER (#12797) in findDefaultableGroups we are not worried about    the most-general type; and we /do/ want to float out of equalities.    Hence the boolean flag to approximateWC.  ------ Historical note ------------There used to be a second caveat, driven by Trac #8155+There used to be a second caveat, driven by #8155     2. We do not float out an inner constraint that shares a type variable       (transitively) with one that is trapped by a skolem.  Eg@@ -2131,7 +2204,7 @@  But this transitive closure stuff gives rise to a complex rule for when defaulting actually happens, and one that was never documented.-Moreover (Trac #12923), the more complex rule is sometimes NOT what+Moreover (#12923), the more complex rule is sometimes NOT what you want.  So I simply removed the extra code to implement the contamination stuff.  There was zero effect on the testsuite (not even #8155).@@ -2175,8 +2248,8 @@ have an instance (C ((x:*) -> Int)).  The instance doesn't match -- but it should!  If we don't solve the constraint, we'll stupidly quantify over (C (a->Int)) and, worse, in doing so skolemiseQuantifiedTyVar will quantify over-(b:*) instead of (a:OpenKind), which can lead to disaster; see Trac #7332.-Trac #7641 is a simpler example.+(b:*) instead of (a:OpenKind), which can lead to disaster; see #7332.+#7641 is a simpler example.  Note [Promoting unification variables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2310,7 +2383,7 @@               seed_skols = mkVarSet skols     `unionVarSet`                           mkVarSet given_ids `unionVarSet`-                          foldrBag add_non_flt_ct emptyVarSet no_float_cts `unionVarSet`+                          foldr add_non_flt_ct emptyVarSet no_float_cts `unionVarSet`                           foldEvBindMap add_one_bind emptyVarSet binds              -- seed_skols: See Note [What prevents a constraint from floating] (1,2,3)              -- Include the EvIds of any non-floating constraints@@ -2349,7 +2422,7 @@       | otherwise      = not (ctEvId ct `elemVarSet` skols)      add_captured_ev_ids :: Cts -> VarSet -> VarSet-    add_captured_ev_ids cts skols = foldrBag extra_skol emptyVarSet cts+    add_captured_ev_ids cts skols = foldr extra_skol emptyVarSet cts        where          extra_skol ct acc            | isDerivedCt ct                           = acc@@ -2472,7 +2545,7 @@ (4) is done by the transCloVarSet call.  The possible dependence on givens, and evidence bindings, is more-subtle than we'd realised at first.  See Trac #14584.+subtle than we'd realised at first.  See #14584.   *********************************************************************************@@ -2531,7 +2604,7 @@          -- Finds unary type-class constraints         -- But take account of polykinded classes like Typeable,-        -- which may look like (Typeable * (a:*))   (Trac #8931)+        -- which may look like (Typeable * (a:*))   (#8931)     find_unary :: Ct -> Either (Ct, Class, TyVar) Ct     find_unary cc         | Just (cls,tys)   <- getClassPredTys_maybe (ctPred cc)
typecheck/TcSplice.hs view
@@ -33,7 +33,7 @@  import GhcPrelude -import HsSyn+import GHC.Hs import Annotations import Finder import Name@@ -46,6 +46,7 @@ import THNames import TcUnify import TcEnv+import TcOrigin import Coercion( etaExpandCoAxBranch ) import FileCleanup ( newTempName, TempFileLifetime(..) ) @@ -60,7 +61,7 @@ import RnSplice( traceSplice, SpliceInfo(..)) import RdrName import HscTypes-import Convert+import GHC.ThToHs import RnExpr import RnEnv import RnUtils ( HsDocContext(..) )@@ -177,14 +178,15 @@        ; (_tc_expr, expr_ty) <- setStage (Brack cur_stage (TcPending ps_ref lie_var)) $                                 tcInferRhoNC expr                                 -- NC for no context; tcBracket does that+       ; let rep = getRuntimeRep expr_ty         ; meta_ty <- tcTExpTy expr_ty        ; ps' <- readMutVar ps_ref        ; texpco <- tcLookupId unsafeTExpCoerceName        ; tcWrapResultO (Shouldn'tHappenOrigin "TExpBr")                        rn_expr-                       (unLoc (mkHsApp (nlHsTyApp texpco [expr_ty])-                                      (noLoc (HsTcBracketOut noExt brack ps'))))+                       (unLoc (mkHsApp (nlHsTyApp texpco [rep, expr_ty])+                                      (noLoc (HsTcBracketOut noExtField brack ps'))))                        meta_ty res_ty } tcTypedBracket _ other_brack _   = pprPanic "tcTypedBracket" (ppr other_brack)@@ -196,7 +198,7 @@        ; meta_ty <- tcBrackTy brack        ; traceTc "tc_bracket done untyped" (ppr meta_ty)        ; tcWrapResultO (Shouldn'tHappenOrigin "untyped bracket")-                       rn_expr (HsTcBracketOut noExt brack ps') meta_ty res_ty }+                       rn_expr (HsTcBracketOut noExtField brack ps') meta_ty res_ty }  --------------- tcBrackTy :: HsBracket GhcRn -> TcM TcType@@ -206,9 +208,9 @@ tcBrackTy (TypBr {})  = tcMetaTy typeQTyConName -- Result type is Type (= Q Typ) tcBrackTy (DecBrG {}) = tcMetaTy decsQTyConName -- Result type is Q [Dec] tcBrackTy (PatBr {})  = tcMetaTy patQTyConName  -- Result type is PatQ (= Q Pat)-tcBrackTy (DecBrL {})   = panic "tcBrackTy: Unexpected DecBrL"-tcBrackTy (TExpBr {})   = panic "tcUntypedBracket: Unexpected TExpBr"-tcBrackTy (XBracket {}) = panic "tcUntypedBracket: Unexpected XBracket"+tcBrackTy (DecBrL {}) = panic "tcBrackTy: Unexpected DecBrL"+tcBrackTy (TExpBr {}) = panic "tcUntypedBracket: Unexpected TExpBr"+tcBrackTy (XBracket nec) = noExtCon nec  --------------- tcPendingSplice :: PendingRnSplice -> TcM PendingTcSplice@@ -230,7 +232,8 @@   = do { unless (isTauTy exp_ty) $ addErr (err_msg exp_ty)        ; q    <- tcLookupTyCon qTyConName        ; texp <- tcLookupTyCon tExpTyConName-       ; return (mkTyConApp q [mkTyConApp texp [exp_ty]]) }+       ; let rep = getRuntimeRep exp_ty+       ; return (mkTyConApp q [mkTyConApp texp [rep, exp_ty]]) }   where     err_msg ty       = vcat [ text "Illegal polytype:" <+> ppr ty@@ -254,7 +257,7 @@   1. tcTopSpliceExpr: typecheck the body e of the splice $(e)    2. runMetaT: desugar, compile, run it, and convert result back to-     HsSyn RdrName (of the appropriate flavour, eg HsType RdrName,+     GHC.Hs syntax RdrName (of the appropriate flavour, eg HsType RdrName,      HsExpr RdrName etc)    3. treat the result as if that's what you saw in the first place@@ -428,6 +431,39 @@  -} +-- | We only want to produce warnings for TH-splices if the user requests so.+-- See Note [Warnings for TH splices].+getThSpliceOrigin :: TcM Origin+getThSpliceOrigin = do+  warn <- goptM Opt_EnableThSpliceWarnings+  if warn then return FromSource else return Generated++{- Note [Warnings for TH splices]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We only produce warnings for TH splices when the user requests so+(-fenable-th-splice-warnings). There are multiple reasons:++  * It's not clear that the user that compiles a splice is the author of the code+    that produces the warning. Think of the situation where she just splices in+    code from a third-party library that produces incomplete pattern matches.+    In this scenario, the user isn't even able to fix that warning.+  * Gathering information for producing the warnings (pattern-match check+    warnings in particular) is costly. There's no point in doing so if the user+    is not interested in those warnings.++That's why we store Origin flags in the Haskell AST. The functions from ThToHs+take such a flag and depending on whether TH splice warnings were enabled or+not, we pass FromSource (if the user requests warnings) or Generated+(otherwise). This is implemented in getThSpliceOrigin.++For correct pattern-match warnings it's crucial that we annotate the Origin+consistently (#17270). In the future we could offer the Origin as part of the+TH AST. That would enable us to give quotes from the current module get+FromSource origin, and/or third library authors to tag certain parts of+generated code as FromSource to enable warnings. That effort is tracked in+#14838.+-}+ {- ************************************************************************ *                                                                      *@@ -469,12 +505,13 @@     -- A splice inside brackets tcNestedSplice pop_stage (TcPending ps_var lie_var) splice_name expr res_ty   = do { res_ty <- expTypeToType res_ty+       ; let rep = getRuntimeRep res_ty        ; meta_exp_ty <- tcTExpTy res_ty        ; expr' <- setStage pop_stage $                   setConstraintVar lie_var $                   tcMonoExpr expr (mkCheckExpType meta_exp_ty)        ; untypeq <- tcLookupId unTypeQName-       ; let expr'' = mkHsApp (nlHsTyApp untypeq [res_ty]) expr'+       ; let expr'' = mkHsApp (nlHsTyApp untypeq [rep, res_ty]) expr'        ; ps <- readMutVar ps_var        ; writeMutVar ps_var (PendingTcSplice splice_name expr'' : ps) @@ -495,7 +532,7 @@        ; lcl_env <- getLclEnv        ; let delayed_splice               = DelayedSplice lcl_env expr res_ty q_expr-       ; return (HsSpliceE noExt (HsSplicedT delayed_splice))+       ; return (HsSpliceE noExtField (HsSplicedT delayed_splice))         } @@ -572,7 +609,7 @@                    -- going to run this code, but we do an unsafe                    -- coerce, so we get a seg-fault if, say we                    -- splice a type into a place where an expression-                   -- is expected (Trac #7276)+                   -- is expected (#7276)     setStage (Splice isTypedSplice) $     do {    -- Typecheck the expression          (expr', wanted) <- captureConstraints tc_action@@ -607,8 +644,8 @@               ; wrapper <- instCall AnnOrigin [expr_ty] [mkClassPred data_class [expr_ty]]               ; let specialised_to_annotation_wrapper_expr                       = L loc (mkHsWrap wrapper-                                 (HsVar noExt (L loc to_annotation_wrapper_id)))-              ; return (L loc (HsApp noExt+                                 (HsVar noExtField (L loc to_annotation_wrapper_id)))+              ; return (L loc (HsApp noExtField                                 specialised_to_annotation_wrapper_expr expr'))                                 }) @@ -682,15 +719,16 @@  runQResult   :: (a -> String)-  -> (SrcSpan -> a -> b)+  -> (Origin -> SrcSpan -> a -> b)   -> (ForeignHValue -> TcM a)   -> SrcSpan   -> ForeignHValue {- TH.Q a -}   -> TcM b runQResult show_th f runQ expr_span hval   = do { th_result <- runQ hval+       ; th_origin <- getThSpliceOrigin        ; traceTc "Got TH result:" (text (show_th th_result))-       ; return (f expr_span th_result) }+       ; return (f th_origin expr_span th_result) }   -----------------@@ -753,7 +791,7 @@         -- recovered giving it type f :: forall a.a, it'd be very dodgy         -- to carry ont.  Mind you, the staging restrictions mean we won't         -- actually run f, but it still seems wrong. And, more concretely,-        -- see Trac #5358 for an example that fell over when trying to+        -- see #5358 for an example that fell over when trying to         -- reify a function with a "?" kind in it.  (These don't occur         -- in type-correct programs.         ; failIfErrsM@@ -888,7 +926,7 @@   * 'qReport' forces the message to ensure any exception hidden in unevaluated    thunk doesn't get into the bag of errors. Otherwise the following splice-   will triger panic (Trac #8987):+   will triger panic (#8987):         $(fail undefined)    See also Note [Concealed TH exceptions] @@ -919,7 +957,7 @@  instance TH.Quasi TcM where   qNewName s = do { u <- newUnique-                  ; let i = getKey u+                  ; let i = toInteger (getKey u)                   ; return (TH.mkNameU s i) }    -- 'msg' is forced to ensure exceptions don't escape,@@ -942,6 +980,7 @@   qLookupName       = lookupName   qReify            = reify   qReifyFixity nm   = lookupThName nm >>= reifyFixity+  qReifyType        = reifyTypeOfThing   qReifyInstances   = reifyInstances   qReifyRoles       = reifyRoles   qReifyAnnotations = reifyAnnotations@@ -967,7 +1006,8 @@    qAddTopDecls thds = do       l <- getSrcSpanM-      let either_hval = convertToHsDecls l thds+      th_origin <- getThSpliceOrigin+      let either_hval = convertToHsDecls th_origin l thds       ds <- case either_hval of               Left exn -> failWithTc $                 hang (text "Error in a declaration passed to addTopDecls:")@@ -1207,6 +1247,7 @@   LookupName b str -> wrapTHResult $ TH.qLookupName b str   Reify n -> wrapTHResult $ TH.qReify n   ReifyFixity n -> wrapTHResult $ TH.qReifyFixity n+  ReifyType n -> wrapTHResult $ TH.qReifyType n   ReifyInstances n ts -> wrapTHResult $ TH.qReifyInstances n ts   ReifyRoles n -> wrapTHResult $ TH.qReifyRoles n   ReifyAnnotations lookup tyrep ->@@ -1249,10 +1290,11 @@    = addErrCtxt (text "In the argument of reifyInstances:"                  <+> ppr_th th_nm <+> sep (map ppr_th th_tys)) $      do { loc <- getSrcSpanM-        ; rdr_ty <- cvt loc (mkThAppTs (TH.ConT th_nm) th_tys)+        ; th_origin <- getThSpliceOrigin+        ; rdr_ty <- cvt th_origin loc (mkThAppTs (TH.ConT th_nm) th_tys)           -- #9262 says to bring vars into scope, like in HsForAllTy case           -- of rnHsTyKi-        ; let tv_rdrs = freeKiTyVarsAllVars (extractHsTyRdrTyVars rdr_ty)+        ; let tv_rdrs = extractHsTyRdrTyVars rdr_ty           -- Rename  to HsType Name         ; ((tv_names, rn_ty), _fvs)             <- checkNoErrs $ -- If there are out-of-scope Names here, then we@@ -1270,11 +1312,11 @@         ; ty <- zonkTcTypeToType ty                 -- Substitute out the meta type variables                 -- In particular, the type might have kind-                -- variables inside it (Trac #7477)+                -- variables inside it (#7477)          ; traceTc "reifyInstances" (ppr ty $$ ppr (tcTypeKind ty))         ; case splitTyConApp_maybe ty of   -- This expands any type synonyms-            Just (tc, tys)                 -- See Trac #7910+            Just (tc, tys)                 -- See #7910                | Just cls <- tyConClass_maybe tc                -> do { inst_envs <- tcGetInstEnvs                      ; let (matches, unifies, _) = lookupInstEnv False inst_envs cls tys@@ -1291,10 +1333,10 @@     doc = ClassInstanceCtx     bale_out msg = failWithTc msg -    cvt :: SrcSpan -> TH.Type -> TcM (LHsType GhcPs)-    cvt loc th_ty = case convertToHsType loc th_ty of-                      Left msg -> failWithTc msg-                      Right ty -> return ty+    cvt :: Origin -> SrcSpan -> TH.Type -> TcM (LHsType GhcPs)+    cvt origin loc th_ty = case convertToHsType origin loc th_ty of+      Left msg -> failWithTc msg+      Right ty -> return ty  {- ************************************************************************@@ -1488,7 +1530,8 @@   = return (TH.PrimTyConI (reifyName tc) 2                False)    | isPrimTyCon tc-  = return (TH.PrimTyConI (reifyName tc) (tyConArity tc) (isUnliftedTyCon tc))+  = return (TH.PrimTyConI (reifyName tc) (length (tyConVisibleTyVars tc))+                          (isUnliftedTyCon tc))    | isTypeFamilyTyCon tc   = do { let tvs      = tyConTyVars tc@@ -1878,7 +1921,7 @@        DataFamilyInst rep_tc ->         do { let -- eta-expand lhs types, because sometimes data/newtype-                 -- instances are eta-reduced; See Trac #9692+                 -- instances are eta-reduced; See #9692                  -- See Note [Eta reduction for data families] in FamInstEnv                  (ee_tvs, ee_lhs, _) = etaExpandCoAxBranch branch                  fam'     = reifyName fam@@ -1911,7 +1954,8 @@ reifyType ty                | tcIsLiftedTypeKind ty = return TH.StarT   -- Make sure to use tcIsLiftedTypeKind here, since we don't want to confuse it   -- with Constraint (#14869).-reifyType ty@(ForAllTy {})  = reify_for_all ty+reifyType ty@(ForAllTy (Bndr _ argf) _)+                            = reify_for_all argf ty reifyType (LitTy t)         = do { r <- reifyTyLit t; return (TH.LitT r) } reifyType (TyVarTy tv)      = return (TH.VarT (reifyName tv)) reifyType (TyConApp tc tys) = reify_tc_app tc tys   -- Do not expand type synonyms here@@ -1932,20 +1976,25 @@     filter_out_invisible_args ty_head ty_args =       filterByList (map isVisibleArgFlag $ appTyArgFlags ty_head ty_args)                    ty_args-reifyType ty@(FunTy t1 t2)-  | isPredTy t1 = reify_for_all ty  -- Types like ((?x::Int) => Char -> Char)-  | otherwise   = do { [r1,r2] <- reifyTypes [t1,t2] ; return (TH.ArrowT `TH.AppT` r1 `TH.AppT` r2) }+reifyType ty@(FunTy { ft_af = af, ft_arg = t1, ft_res = t2 })+  | InvisArg <- af = reify_for_all Inferred ty  -- Types like ((?x::Int) => Char -> Char)+  | otherwise      = do { [r1,r2] <- reifyTypes [t1,t2] ; return (TH.ArrowT `TH.AppT` r1 `TH.AppT` r2) } reifyType (CastTy t _)      = reifyType t -- Casts are ignored in TH reifyType ty@(CoercionTy {})= noTH (sLit "coercions in types") (ppr ty) -reify_for_all :: TyCoRep.Type -> TcM TH.Type-reify_for_all ty-  = do { cxt' <- reifyCxt cxt;-       ; tau' <- reifyType tau-       ; tvs' <- reifyTyVars tvs-       ; return (TH.ForallT tvs' cxt' tau') }+reify_for_all :: TyCoRep.ArgFlag -> TyCoRep.Type -> TcM TH.Type+-- Arg of reify_for_all is always ForAllTy or a predicate FunTy+reify_for_all argf ty = do+  tvs' <- reifyTyVars tvs+  case argToForallVisFlag argf of+    ForallVis   -> do phi' <- reifyType phi+                      pure $ TH.ForallVisT tvs' phi'+    ForallInvis -> do let (cxt, tau) = tcSplitPhiTy phi+                      cxt' <- reifyCxt cxt+                      tau' <- reifyType tau+                      pure $ TH.ForallT tvs' cxt' tau'   where-    (tvs, cxt, tau) = tcSplitSigmaTy ty+    (tvs, phi) = tcSplitForAllTysSameVis argf ty  reifyTyLit :: TyCoRep.TyLit -> TcM TH.TyLit reifyTyLit (NumTyLit n) = return (TH.NumTyLit n)@@ -1964,7 +2013,7 @@        ; req'        <- reifyCxt req        ; exTyVars'   <- reifyTyVars exTyVars        ; prov'       <- reifyCxt prov-       ; tau'        <- reifyType (mkFunTys argTys resTy)+       ; tau'        <- reifyType (mkVisFunTys argTys resTy)        ; return $ TH.ForallT univTyVars' req'                 $ TH.ForallT exTyVars' prov' tau' } @@ -2035,8 +2084,9 @@ ------------------------------ reifyName :: NamedThing n => n -> TH.Name reifyName thing-  | isExternalName name = mk_varg pkg_str mod_str occ_str-  | otherwise           = TH.mkNameU occ_str (getKey (getUnique name))+  | isExternalName name+              = mk_varg pkg_str mod_str occ_str+  | otherwise = TH.mkNameU occ_str (toInteger $ getKey (getUnique name))         -- Many of the things we reify have local bindings, and         -- NameL's aren't supposed to appear in binding positions, so         -- we use NameU.  When/if we start to reify nested things, that@@ -2101,6 +2151,23 @@ reifyDecidedStrictness HsLazy     = TH.DecidedLazy reifyDecidedStrictness HsStrict   = TH.DecidedStrict reifyDecidedStrictness HsUnpack{} = TH.DecidedUnpack++reifyTypeOfThing :: TH.Name -> TcM TH.Type+reifyTypeOfThing th_name = do+  thing <- getThing th_name+  case thing of+    AGlobal (AnId id) -> reifyType (idType id)+    AGlobal (ATyCon tc) -> reifyKind (tyConKind tc)+    AGlobal (AConLike (RealDataCon dc)) ->+      reifyType (idType (dataConWrapId dc))+    AGlobal (AConLike (PatSynCon ps)) ->+      reifyPatSynType (patSynSig ps)+    ATcId{tct_id = id} -> zonkTcType (idType id) >>= reifyType+    ATyVar _ tctv -> zonkTcTyVar tctv >>= reifyType+    -- Impossible cases, supposedly:+    AGlobal (ACoAxiom _) -> panic "reifyTypeOfThing: ACoAxiom"+    ATcTyCon _ -> panic "reifyTypeOfThing: ATcTyCon"+    APromotionErr _ -> panic "reifyTypeOfThing: APromotionErr"  ------------------------------ lookupThAnnLookup :: TH.AnnLookup -> TcM CoreAnnTarget
typecheck/TcSplice.hs-boot view
@@ -5,13 +5,13 @@  import GhcPrelude import Name-import HsExpr   ( PendingRnSplice, DelayedSplice )+import GHC.Hs.Expr ( PendingRnSplice, DelayedSplice ) import TcRnTypes( TcM , SpliceType ) import TcType   ( ExpRhoType ) import Annotations ( Annotation, CoreAnnTarget )-import HsExtension ( GhcTcId, GhcRn, GhcPs, GhcTc )+import GHC.Hs.Extension ( GhcTcId, GhcRn, GhcPs, GhcTc ) -import HsSyn      ( HsSplice, HsBracket, HsExpr, LHsExpr, LHsType, LPat,+import GHC.Hs     ( HsSplice, HsBracket, HsExpr, LHsExpr, LHsType, LPat,                     LHsDecl, ThModFinalizers ) import qualified Language.Haskell.TH as TH 
typecheck/TcTyClsDecls.hs view
@@ -15,3837 +15,4363 @@          -- Functions used by TcInstDcls to check         -- data/type family instance declarations-        kcConDecl, tcConDecls, dataDeclChecks, checkValidTyCon,-        tcFamTyPats, tcTyFamInstEqn,-        tcAddTyFamInstCtxt, tcMkDataFamInstCtxt, tcAddDataFamInstCtxt,-        unravelFamInstPats, addConsistencyConstraints,-        wrongKindOfFamily-    ) where--#include "HsVersions.h"--import GhcPrelude--import HsSyn-import HscTypes-import BuildTyCl-import TcRnMonad-import TcEnv-import TcValidity-import TcHsSyn-import TcTyDecls-import TcClassDcl-import {-# SOURCE #-} TcInstDcls( tcInstDecls1 )-import TcDeriv (DerivInfo)-import TcHsType-import ClsInst( AssocInstInfo(..) )-import Inst( tcInstTyBinders )-import TcMType-import TysWiredIn ( unitTy )-import TcType-import RnEnv( lookupConstructorFields )-import FamInst-import FamInstEnv-import Coercion-import Type-import TyCoRep   -- for checkValidRoles-import Class-import CoAxiom-import TyCon-import DataCon-import Id-import Var-import VarEnv-import VarSet-import Module-import Name-import NameSet-import NameEnv-import Outputable-import Maybes-import Unify-import Util-import SrcLoc-import ListSetOps-import DynFlags-import Unique-import ConLike( ConLike(..) )-import BasicTypes-import qualified GHC.LanguageExtensions as LangExt--import Control.Monad-import Data.List-import Data.List.NonEmpty ( NonEmpty(..) )-import qualified Data.Set as Set---{--************************************************************************-*                                                                      *-\subsection{Type checking for type and class declarations}-*                                                                      *-************************************************************************--Note [Grouping of type and class declarations]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-tcTyAndClassDecls is called on a list of `TyClGroup`s. Each group is a strongly-connected component of mutually dependent types and classes. We kind check and-type check each group separately to enhance kind polymorphism. Take the-following example:--  type Id a = a-  data X = X (Id Int)--If we were to kind check the two declarations together, we would give Id the-kind * -> *, since we apply it to an Int in the definition of X. But we can do-better than that, since Id really is kind polymorphic, and should get kind-forall (k::*). k -> k. Since it does not depend on anything else, it can be-kind-checked by itself, hence getting the most general kind. We then kind check-X, which works fine because we then know the polymorphic kind of Id, and simply-instantiate k to *.--Note [Check role annotations in a second pass]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Role inference potentially depends on the types of all of the datacons declared-in a mutually recursive group. The validity of a role annotation, in turn,-depends on the result of role inference. Because the types of datacons might-be ill-formed (see #7175 and Note [Checking GADT return types]) we must check-*all* the tycons in a group for validity before checking *any* of the roles.-Thus, we take two passes over the resulting tycons, first checking for general-validity and then checking for valid role annotations.--}--tcTyAndClassDecls :: [TyClGroup GhcRn]      -- Mutually-recursive groups in-                                            -- dependency order-                  -> TcM ( TcGblEnv         -- Input env extended by types and-                                            -- classes-                                            -- and their implicit Ids,DataCons-                         , [InstInfo GhcRn] -- Source-code instance decls info-                         , [DerivInfo]      -- data family deriving info-                         )--- Fails if there are any errors-tcTyAndClassDecls tyclds_s-  -- The code recovers internally, but if anything gave rise to-  -- an error we'd better stop now, to avoid a cascade-  -- Type check each group in dependency order folding the global env-  = checkNoErrs $ fold_env [] [] tyclds_s-  where-    fold_env :: [InstInfo GhcRn]-             -> [DerivInfo]-             -> [TyClGroup GhcRn]-             -> TcM (TcGblEnv, [InstInfo GhcRn], [DerivInfo])-    fold_env inst_info deriv_info []-      = do { gbl_env <- getGblEnv-           ; return (gbl_env, inst_info, deriv_info) }-    fold_env inst_info deriv_info (tyclds:tyclds_s)-      = do { (tcg_env, inst_info', deriv_info') <- tcTyClGroup tyclds-           ; setGblEnv tcg_env $-               -- remaining groups are typechecked in the extended global env.-             fold_env (inst_info' ++ inst_info)-                      (deriv_info' ++ deriv_info)-                      tyclds_s }--tcTyClGroup :: TyClGroup GhcRn-            -> TcM (TcGblEnv, [InstInfo GhcRn], [DerivInfo])--- Typecheck one strongly-connected component of type, class, and instance decls--- See Note [TyClGroups and dependency analysis] in HsDecls-tcTyClGroup (TyClGroup { group_tyclds = tyclds-                       , group_roles  = roles-                       , group_instds = instds })-  = do { let role_annots = mkRoleAnnotEnv roles--           -- Step 1: Typecheck the type/class declarations-       ; traceTc "---- tcTyClGroup ---- {" empty-       ; traceTc "Decls for" (ppr (map (tcdName . unLoc) tyclds))-       ; tyclss <- tcTyClDecls tyclds role_annots--           -- Step 1.5: Make sure we don't have any type synonym cycles-       ; traceTc "Starting synonym cycle check" (ppr tyclss)-       ; this_uid <- fmap thisPackage getDynFlags-       ; checkSynCycles this_uid tyclss tyclds-       ; traceTc "Done synonym cycle check" (ppr tyclss)--           -- Step 2: Perform the validity check on those types/classes-           -- We can do this now because we are done with the recursive knot-           -- Do it before Step 3 (adding implicit things) because the latter-           -- expects well-formed TyCons-       ; traceTc "Starting validity check" (ppr tyclss)-       ; tyclss <- concatMapM checkValidTyCl tyclss-       ; traceTc "Done validity check" (ppr tyclss)-       ; mapM_ (recoverM (return ()) . checkValidRoleAnnots role_annots) tyclss-           -- See Note [Check role annotations in a second pass]--       ; traceTc "---- end tcTyClGroup ---- }" empty--           -- Step 3: Add the implicit things;-           -- we want them in the environment because-           -- they may be mentioned in interface files-       ; gbl_env <- addTyConsToGblEnv tyclss--           -- Step 4: check instance declarations-       ; setGblEnv gbl_env $-         tcInstDecls1 instds }--tcTyClGroup (XTyClGroup _) = panic "tcTyClGroup"--tcTyClDecls :: [LTyClDecl GhcRn] -> RoleAnnotEnv -> TcM [TyCon]-tcTyClDecls tyclds role_annots-  = tcExtendKindEnv promotion_err_env $   --- See Note [Type environment evolution]-    do {    -- Step 1: kind-check this group and returns the final-            -- (possibly-polymorphic) kind of each TyCon and Class-            -- See Note [Kind checking for type and class decls]-         tc_tycons <- kcTyClGroup tyclds-       ; traceTc "tcTyAndCl generalized kinds" (vcat (map ppr_tc_tycon tc_tycons))--            -- Step 2: type-check all groups together, returning-            -- the final TyCons and Classes-            ---            -- NB: We have to be careful here to NOT eagerly unfold-            -- type synonyms, as we have not tested for type synonym-            -- loops yet and could fall into a black hole.-       ; fixM $ \ ~rec_tyclss -> do-           { tcg_env <- getGblEnv-           ; let roles = inferRoles (tcg_src tcg_env) role_annots rec_tyclss--                 -- Populate environment with knot-tied ATyCon for TyCons-                 -- NB: if the decls mention any ill-staged data cons-                 -- (see Note [Recursion and promoting data constructors])-                 -- we will have failed already in kcTyClGroup, so no worries here-           ; tcExtendRecEnv (zipRecTyClss tc_tycons rec_tyclss) $--                 -- Also extend the local type envt with bindings giving-                 -- a TcTyCon for each each knot-tied TyCon or Class-                 -- See Note [Type checking recursive type and class declarations]-                 -- and Note [Type environment evolution]-             tcExtendKindEnvWithTyCons tc_tycons $--                 -- Kind and type check declarations for this group-               mapM (tcTyClDecl roles) tyclds-           } }-  where-    promotion_err_env = mkPromotionErrorEnv tyclds-    ppr_tc_tycon tc = parens (sep [ ppr (tyConName tc) <> comma-                                  , ppr (tyConBinders tc) <> comma-                                  , ppr (tyConResKind tc)-                                  , ppr (isTcTyCon tc) ])--zipRecTyClss :: [TcTyCon]-             -> [TyCon]           -- Knot-tied-             -> [(Name,TyThing)]--- Build a name-TyThing mapping for the TyCons bound by decls--- being careful not to look at the knot-tied [TyThing]--- The TyThings in the result list must have a visible ATyCon,--- because typechecking types (in, say, tcTyClDecl) looks at--- this outer constructor-zipRecTyClss tc_tycons rec_tycons-  = [ (name, ATyCon (get name)) | tc_tycon <- tc_tycons, let name = getName tc_tycon ]-  where-    rec_tc_env :: NameEnv TyCon-    rec_tc_env = foldr add_tc emptyNameEnv rec_tycons--    add_tc :: TyCon -> NameEnv TyCon -> NameEnv TyCon-    add_tc tc env = foldr add_one_tc env (tc : tyConATs tc)--    add_one_tc :: TyCon -> NameEnv TyCon -> NameEnv TyCon-    add_one_tc tc env = extendNameEnv env (tyConName tc) tc--    get name = case lookupNameEnv rec_tc_env name of-                 Just tc -> tc-                 other   -> pprPanic "zipRecTyClss" (ppr name <+> ppr other)--{--************************************************************************-*                                                                      *-                Kind checking-*                                                                      *-************************************************************************--Note [Kind checking for type and class decls]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Kind checking is done thus:--   1. Make up a kind variable for each parameter of the declarations,-      and extend the kind environment (which is in the TcLclEnv)--   2. Kind check the declarations--We need to kind check all types in the mutually recursive group-before we know the kind of the type variables.  For example:--  class C a where-     op :: D b => a -> b -> b--  class D c where-     bop :: (Monad c) => ...--Here, the kind of the locally-polymorphic type variable "b"-depends on *all the uses of class D*.  For example, the use of-Monad c in bop's type signature means that D must have kind Type->Type.--Note: we don't treat type synonyms specially (we used to, in the past);-in particular, even if we have a type synonym cycle, we still kind check-it normally, and test for cycles later (checkSynCycles).  The reason-we can get away with this is because we have more systematic TYPE r-inference, which means that we can do unification between kinds that-aren't lifted (this historically was not true.)--The downside of not directly reading off the kinds off the RHS of-type synonyms in topological order is that we don't transparently-support making synonyms of types with higher-rank kinds.  But-you can always specify a CUSK directly to make this work out.-See tc269 for an example.--Note [Skip decls with CUSKs in kcLTyClDecl]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--    data T (a :: *) = MkT (S a)   -- Has CUSK-    data S a = MkS (T Int) (S a)  -- No CUSK--Via getInitialKinds we get-  T :: * -> *-  S :: kappa -> *--Then we call kcTyClDecl on each decl in the group, to constrain the-kind unification variables.  BUT we /skip/ the RHS of any decl with-a CUSK.  Here we skip the RHS of T, so we eventually get-  S :: forall k. k -> *--This gets us more polymorphism than we would otherwise get, similar-(but implemented strangely differently from) the treatment of type-signatures in value declarations.--Open type families-~~~~~~~~~~~~~~~~~~-This treatment of type synonyms only applies to Haskell 98-style synonyms.-General type functions can be recursive, and hence, appear in `alg_decls'.--The kind of an open type family is solely determinded by its kind signature;-hence, only kind signatures participate in the construction of the initial-kind environment (as constructed by `getInitialKind'). In fact, we ignore-instances of families altogether in the following. However, we need to include-the kinds of *associated* families into the construction of the initial kind-environment. (This is handled by `allDecls').--See also Note [Kind checking recursive type and class declarations]--Note [How TcTyCons work]-~~~~~~~~~~~~~~~~~~~~~~~~-TcTyCons are used for two distinct purposes--1.  When recovering from a type error in a type declaration,-    we want to put the erroneous TyCon in the environment in a-    way that won't lead to more errors.  We use a TcTyCon for this;-    see makeRecoveryTyCon.--2.  When checking a type/class declaration (in module TcTyClsDecls), we come-    upon knowledge of the eventual tycon in bits and pieces.--      S1) First, we use getInitialKinds to look over the user-provided-          kind signature of a tycon (including, for example, the number-          of parameters written to the tycon) to get an initial shape of-          the tycon's kind.  We record that shape in a TcTyCon.--          For CUSK tycons, the TcTyCon has the final, generalised kind.-          For non-CUSK tycons, the TcTyCon has as its tyConBinders only-          the explicit arguments given -- no kind variables, etc.--      S2) Then, using these initial kinds, we kind-check the body of the-          tycon (class methods, data constructors, etc.), filling in the-          metavariables in the tycon's initial kind.--      S3) We then generalize to get the (non-CUSK) tycon's final, fixed-          kind. Finally, once this has happened for all tycons in a-          mutually recursive group, we can desugar the lot.--    For convenience, we store partially-known tycons in TcTyCons, which-    might store meta-variables. These TcTyCons are stored in the local-    environment in TcTyClsDecls, until the real full TyCons can be created-    during desugaring. A desugared program should never have a TcTyCon.--3.  In a TcTyCon, everything is zonked after the kind-checking pass (S2).--4.  tyConScopedTyVars.  A challenging piece in all of this is that we-    end up taking three separate passes over every declaration:-      - one in getInitialKind (this pass look only at the head, not the body)-      - one in kcTyClDecls (to kind-check the body)-      - a final one in tcTyClDecls (to desugar)--    In the latter two passes, we need to connect the user-written type-    variables in an LHsQTyVars with the variables in the tycon's-    inferred kind. Because the tycon might not have a CUSK, this-    matching up is, in general, quite hard to do.  (Look through the-    git history between Dec 2015 and Apr 2016 for-    TcHsType.splitTelescopeTvs!)--    Instead of trying, we just store the list of type variables to-    bring into scope, in the tyConScopedTyVars field of the TcTyCon.-    These tyvars are brought into scope in TcHsType.bindTyClTyVars.--    In a TcTyCon, why is tyConScopedTyVars :: [(Name,TcTyVar)] rather-    than just [TcTyVar]?  Consider these mutually-recursive decls-       data T (a :: k1) b = MkT (S a b)-       data S (c :: k2) d = MkS (T c d)-    We start with k1 bound to kappa1, and k2 to kappa2; so initially-    in the (Name,TcTyVar) pairs the Name is that of the TcTyVar. But-    then kappa1 and kappa2 get unified; so after the zonking in-    'generalise' in 'kcTyClGroup' the Name and TcTyVar may differ.--See also Note [Type checking recursive type and class declarations].--Note [Type environment evolution]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As we typecheck a group of declarations the type environment evolves.-Consider for example:-  data B (a :: Type) = MkB (Proxy 'MkB)--We do the following steps:--  1. Start of tcTyClDecls: use mkPromotionErrorEnv to initialise the-     type env with promotion errors-            B   :-> TyConPE-            MkB :-> DataConPE--  2. kcTyCLGruup-      - Do getInitialKinds, which will signal a promotion-        error if B is used in any of the kinds needed to initialse-        B's kind (e.g. (a :: Type)) here--      - Extend the type env with these initial kinds (monomorphic for-        decls that lack a CUSK)-            B :-> TcTyCon <initial kind>-        (thereby overriding the B :-> TyConPE binding)-        and do kcLTyClDecl on each decl to get equality constraints on-        all those inital kinds--      - Generalise the inital kind, making a poly-kinded TcTyCon--  3. Back in tcTyDecls, extend the envt with bindings of the poly-kinded-     TcTyCons, again overriding the promotion-error bindings.--     But note that the data constructor promotion errors are still in place-     so that (in our example) a use of MkB will sitll be signalled as-     an error.--  4. Typecheck the decls.--  5. In tcTyClGroup, extend the envt with bindings for TyCon and DataCons---Note [Missed opportunity to retain higher-rank kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In 'kcTyClGroup', there is a missed opportunity to make kind-inference work in a few more cases.  The idea is analogous-to Note [Single function non-recursive binding special-case]:--     * If we have an SCC with a single decl, which is non-recursive,-       instead of creating a unification variable representing the-       kind of the decl and unifying it with the rhs, we can just-       read the type directly of the rhs.--     * Furthermore, we can update our SCC analysis to ignore-       dependencies on declarations which have CUSKs: we don't-       have to kind-check these all at once, since we can use-       the CUSK to initialize the kind environment.--Unfortunately this requires reworking a bit of the code in-'kcLTyClDecl' so I've decided to punt unless someone shouts about it.--Note [Don't process associated types in kcLHsQTyVars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Previously, we processed associated types in the thing_inside in kcLHsQTyVars,-but this was wrong -- we want to do ATs sepearately.-The consequence for not doing it this way is #15142:--  class ListTuple (tuple :: Type) (as :: [(k, Type)]) where-    type ListToTuple as :: Type--We assign k a kind kappa[1]. When checking the tuple (k, Type), we try to unify-kappa ~ Type, but this gets deferred because we bumped the TcLevel as we bring-`tuple` into scope. Thus, when we check ListToTuple, kappa[1] still hasn't-unified with Type. And then, when we generalize the kind of ListToTuple (which-indeed has a CUSK, according to the rules), we skolemize the free metavariable-kappa. Note that we wouldn't skolemize kappa when generalizing the kind of ListTuple,-because the solveEqualities in kcLHsQTyVars is at TcLevel 1 and so kappa[1]-will unify with Type.--Bottom line: as associated types should have no effect on a CUSK enclosing class,-we move processing them to a separate action, run after the outer kind has-been generalized.---}--kcTyClGroup :: [LTyClDecl GhcRn] -> TcM [TcTyCon]---- Kind check this group, kind generalize, and return the resulting local env--- This binds the TyCons and Classes of the group, but not the DataCons--- See Note [Kind checking for type and class decls]--- and Note [Inferring kinds for type declarations]-kcTyClGroup decls-  = do  { mod <- getModule-        ; traceTc "---- kcTyClGroup ---- {"-                  (text "module" <+> ppr mod $$ vcat (map ppr decls))--          -- Kind checking;-          --    1. Bind kind variables for decls-          --    2. Kind-check decls-          --    3. Generalise the inferred kinds-          -- See Note [Kind checking for type and class decls]--        ; let (cusk_decls, no_cusk_decls)-                 = partition (hsDeclHasCusk . unLoc) decls--        ; poly_cusk_tcs <- getInitialKinds True cusk_decls--        ; mono_tcs-            <- tcExtendKindEnvWithTyCons poly_cusk_tcs $-               pushTcLevelM_   $  -- We are going to kind-generalise, so-                                  -- unification variables in here must-                                  -- be one level in-               solveEqualities $-               do {  -- Step 1: Bind kind variables for all decls-                    mono_tcs <- getInitialKinds False no_cusk_decls--                  ; traceTc "kcTyClGroup: initial kinds" $-                    ppr_tc_kinds mono_tcs--                    -- Step 2: Set extended envt, kind-check the decls-                    -- NB: the environment extension overrides the tycon-                    --     promotion-errors bindings-                    --     See Note [Type environment evolution]-                  ; tcExtendKindEnvWithTyCons mono_tcs $-                    mapM_ kcLTyClDecl no_cusk_decls--                  ; return mono_tcs }--        -- Step 3: generalisation-        -- Finally, go through each tycon and give it its final kind,-        -- with all the required, specified, and inferred variables-        -- in order.-        ; poly_no_cusk_tcs <- mapAndReportM generaliseTcTyCon mono_tcs--        ; let poly_tcs = poly_cusk_tcs ++ poly_no_cusk_tcs-        ; traceTc "---- kcTyClGroup end ---- }" (ppr_tc_kinds poly_tcs)-        ; return poly_tcs }--  where-    ppr_tc_kinds tcs = vcat (map pp_tc tcs)-    pp_tc tc = ppr (tyConName tc) <+> dcolon <+> ppr (tyConKind tc)--generaliseTcTyCon :: TcTyCon -> TcM TcTyCon-generaliseTcTyCon tc-  -- See Note [Required, Specified, and Inferred for types]-  = setSrcSpan (getSrcSpan tc) $-    addTyConCtxt tc $-    do { let tc_name     = tyConName tc-             tc_flav     = tyConFlavour tc-             tc_res_kind = tyConResKind tc-             tc_tvs      = tyConTyVars  tc-             user_tyvars = tcTyConUserTyVars tc  -- ToDo: nuke--             (scoped_tv_names, scoped_tvs) = unzip (tcTyConScopedTyVars tc)-             -- NB: scoped_tvs includes both specified and required (tc_tvs)-             -- ToDo: Is this a good idea?--       -- Step 1: find all the variables we want to quantify over,-       --         including Inferred, Specfied, and Required-       ; dvs <- candidateQTyVarsOfKinds $-                (tc_res_kind : map tyVarKind scoped_tvs)-       ; tc_tvs      <- mapM zonkTcTyVarToTyVar tc_tvs-       ; let full_dvs = dvs { dv_tvs = mkDVarSet tc_tvs }--       -- Step 2: quantify, mainly meaning skolemise the free variables-       ; qtkvs <- quantifyTyVars emptyVarSet full_dvs-                  -- Returned 'qtkvs' are scope-sorted and skolemised--       -- Step 3: find the final identity of the Specified and Required tc_tvs-       -- (remember they all started as TyVarTvs).-       -- They have been skolemised by quantifyTyVars.-       ; scoped_tvs  <- mapM zonkTcTyVarToTyVar scoped_tvs-       ; tc_tvs      <- mapM zonkTcTyVarToTyVar tc_tvs-       ; tc_res_kind <- zonkTcType tc_res_kind--       ; traceTc "Generalise kind pre" $-         vcat [ text "tycon =" <+> ppr tc-              , text "tc_tvs =" <+> pprTyVars tc_tvs-              , text "scoped_tvs =" <+> pprTyVars scoped_tvs ]--       -- Step 4: Find the Specified and Inferred variables-       -- First, delete the Required tc_tvs from qtkvs; then-       -- partition by whether they are scoped (if so, Specified)-       ; let qtkv_set      = mkVarSet qtkvs-             tc_tv_set     = mkVarSet tc_tvs-             specified     = scopedSort $-                             [ tv | tv <- scoped_tvs-                                  , not (tv `elemVarSet` tc_tv_set)-                                  , tv `elemVarSet` qtkv_set ]-                             -- NB: maintain the L-R order of scoped_tvs-             spec_req_set  = mkVarSet specified `unionVarSet` tc_tv_set-             inferred      = filterOut (`elemVarSet` spec_req_set) qtkvs--       -- Step 5: Make the TyConBinders.-             dep_fv_set     = candidateKindVars dvs-             inferred_tcbs  = mkNamedTyConBinders Inferred inferred-             specified_tcbs = mkNamedTyConBinders Specified specified-             required_tcbs  = map (mkRequiredTyConBinder dep_fv_set) tc_tvs--       -- Step 6: Assemble the final list.-             final_tcbs = concat [ inferred_tcbs-                                 , specified_tcbs-                                 , required_tcbs ]--             scoped_tv_pairs = scoped_tv_names `zip` scoped_tvs--       -- Step 7: Make the result TcTyCon-             tycon = mkTcTyCon tc_name user_tyvars final_tcbs tc_res_kind-                            scoped_tv_pairs-                            True {- it's generalised now -}-                            (tyConFlavour tc)--       ; traceTc "Generalise kind" $-         vcat [ text "tycon =" <+> ppr tc-              , text "tc_tvs =" <+> pprTyVars tc_tvs-              , text "tc_res_kind =" <+> ppr tc_res_kind-              , text "scoped_tvs =" <+> pprTyVars scoped_tvs-              , text "inferred =" <+> pprTyVars inferred-              , text "specified =" <+> pprTyVars specified-              , text "required_tcbs =" <+> ppr required_tcbs-              , text "final_tcbs =" <+> ppr final_tcbs ]--       -- Step 8: check for floating kind vars-       -- See Note [Free-floating kind vars]-       -- They are easily identified by the fact that they-       -- have not been skolemised by quantifyTyVars-       ; let floating_specified = filter isTyVarTyVar scoped_tvs-       ; reportFloatingKvs tc_name tc_flav-                           scoped_tvs floating_specified--       -- Step 9: Check for duplicates-       -- E.g. data SameKind (a::k) (b::k)-       --      data T (a::k1) (b::k2) = MkT (SameKind a b)-       -- Here k1 and k2 start as TyVarTvs, and get unified with each other-       ; mapM_ report_sig_tv_err (findDupTyVarTvs scoped_tv_pairs)--       -- Step 10: Check for validity.-       -- We do this here because we're about to put the tycon into-       -- the environment, and we don't want anything malformed in the-       -- environment.-       ; checkValidTelescope tycon--       ; return tycon }-  where-    report_sig_tv_err (n1, n2)-      = setSrcSpan (getSrcSpan n2) $-        addErrTc (text "Couldn't match" <+> quotes (ppr n1)-                        <+> text "with" <+> quotes (ppr n2))--{- Note [Required, Specified, and Inferred for types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Each forall'd type variable in a type or kind is one of--  * Required: an argument must be provided at every call site--  * Specified: the argument can be inferred at call sites, but-    may be instantiated with visible type/kind application--  * Inferred: the must be inferred at call sites; it-    is unavailable for use with visible type/kind application.--Why have Inferred at all? Because we just can't make user-facing-promises about the ordering of some variables. These might swizzle-around even between minor released. By forbidding visible type-application, we ensure users aren't caught unawares.--Go read Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep.--The question for this Note is this:-   given a TyClDecl, how are its quantified type variables classified?-Much of the debate is memorialized in #15743.--Here is our design choice. When inferring the ordering of variables-for a TyCl declaration (that is, for those variables that he user-has not specified the order with an explicit `forall`), we use the-following order:-- 1. Inferred variables- 2. Specified variables; in the left-to-right order in which-    the user wrote them, modified by scopedSort (see below)-    to put them in depdendency order.- 3. Required variables before a top-level ::- 4. All variables after a top-level ::--If this ordering does not make a valid telescope, we reject the definition.--Example:-  data SameKind :: k -> k -> *-  data Bad a (c :: Proxy b) (d :: Proxy a) (x :: SameKind b d)--For X:-  - a, c, d, x are Required; they are explicitly listed by the user-    as the positional arguments of Bad-  - b is Specified; it appears explicitly in a kind signature-  - k, the kind of a, is Inferred; it is not mentioned explicitly at all--Putting variables in the order Inferred, Specified, Required-gives us this telescope:-  Inferred:  k-  Specified: b : Proxy a-  Required : (a : k) (c : Proxy b) (d : Proxy a) (x : SameKind b d)--But this order is ill-scoped, because b's kind mentions a, which occurs-after b in the telescope. So we reject Bad.--Associated types-~~~~~~~~~~~~~~~~-For associated types everything above is determined by the-associated-type declaration alone, ignoring the class header.-Here is an example (Trac #15592)-  class C (a :: k) b where-    type F (x :: b a)--In the kind of C, 'k' is Specified.  But what about F?-In the kind of F,-- * Should k be Inferred or Specified?  It's Specified for C,-   but not mentioned in F's declaration.-- * In which order should the Specified variables a and b occur?-   It's clearly 'a' then 'b' in C's declaration, but the L-R ordering-   in F's declaration is 'b' then 'a'.--In both cases we make the choice by looking at F's declaration alone,-so it gets the kind-   F :: forall {k}. forall b a. b a -> Type--How it works-~~~~~~~~~~~~-These design choices are implemented by two completely different code-paths for--  * Declarations with a compulete user-specified kind signature (CUSK)-    Handed by the CUSK case of kcLHsQTyVars.--  * Declarations without a CUSK are handled by kcTyClDecl; see-    Note [Inferring kinds for type declarations].--Note that neither code path worries about point (4) above, as this-is nicely handled by not mangling the res_kind. (Mangling res_kinds is done-*after* all this stuff, in tcDataDefn's call to etaExpandAlgTyCon.)--We can tell Inferred apart from Specified by looking at the scoped-tyvars; Specified are always included there.--Design alternatives-~~~~~~~~~~~~~~~~~~~--* For associated types we considered putting the class variables-  before the local variables, in a nod to the treatment for class-  methods. But it got too compilicated; see Trac #15592, comment:21ff.--* We rigidly require the ordering above, even though we could be much more-  permissive. Relevant musings are at-  https://ghc.haskell.org/trac/ghc/ticket/15743#comment:7-  The bottom line conclusion is that, if the user wants a different ordering,-  then can specify it themselves, and it is better to be predictable and dumb-  than clever and capricious.--  I (Richard) conjecture we could be fully permissive, allowing all classes-  of variables to intermix. We would have to augment ScopedSort to refuse to-  reorder Required variables (or check that it wouldn't have). But this would-  allow more programs. See #15743 for examples. Interestingly, Idris seems-  to allow this intermixing. The intermixing would be fully specified, in that-  we can be sure that inference wouldn't change between versions. However,-  would users be able to predict it? That I cannot answer.--Test cases (and tickets) relevant to these design decisions-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-  T15591*-  T15592*-  T15743*--Note [Inferring kinds for type declarations]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-This note deals with /inference/ for type declarations-that do not have a CUSK.  Consider-  data T (a :: k1) k2 (x :: k2) = MkT (S a k2 x)-  data S (b :: k3) k4 (y :: k4) = MkS (T b k4 y)--We do kind inference as follows:--* Step 1: Assign initial monomorophic kinds to S, T-          S :: kk1 -> * -> kk2 -> *-          T :: kk3 -> * -> kk4 -> *-  Here kk1 etc are TyVarTvs: that is, unification variables that-  are allowed to unify only with other type variables. See-  Note [Signature skolems] in TcType--* Step 2: Extend the environment with a TcTyCon for S and T, with-  these monomophic kinds.  Now kind-check the declarations, and solve-  the resulting equalities.  The goal here is to discover constraints-  on all these unification variables.--  Here we find that kk1 := kk3, and kk2 := kk4.--  This is why we can't use skolems for kk1 etc; they have to-  unify with each other.--* Step 3. Generalise each TyCon in turn (generaliseTcTyCon).-  We find the free variables of the kind, skolemise them,-  sort them out into Inferred/Required/Specified (see the above-  Note [Required, Specified, and Inferred for types]),-  and perform some validity checks.--  This makes the utterly-final TyConBinders for the TyCon--  All this is very similar at the level of terms: see TcBinds-  Note [Quantified variables in partial type signatures]--* Step 4.  Extend the type environment with a TcTyCon for S and T, now-  with their utterly-final polymorphic kinds (needed for recursive-  occurrences of S, T).  Now typecheck the declarations, and build the-  final AlgTyCOn for S and T resp.--The first three steps are in kcTyClGroup;-the fourth is in tcTyClDecls.--There are some wrinkles--* Do not default TyVarTvs.  We always want to kind-generalise over-  TyVarTvs, and /not/ default them to Type. By definition a TyVarTv is-  not allowed to unify with a type; it must stand for a type-  variable. Hence the check in TcSimplify.defaultTyVarTcS, and-  TcMType.defaultTyVar.  Here's another example (Trac #14555):-     data Exp :: [TYPE rep] -> TYPE rep -> Type where-        Lam :: Exp (a:xs) b -> Exp xs (a -> b)-  We want to kind-generalise over the 'rep' variable.-  Trac #14563 is another example.--* Duplicate type variables. Consider Trac #11203-    data SameKind :: k -> k -> *-    data Q (a :: k1) (b :: k2) c = MkQ (SameKind a b)-  Here we will unify k1 with k2, but this time doing so is an error,-  because k1 and k2 are bound in the same declaration.--  We spot this during validity checking (findDupTyVarTvs),-  in generaliseTcTyCon.--* Required arguments.  Even the Required arguments should be made-  into TyVarTvs, not skolems.  Consider-    data T k (a :: k)-  Here, k is a Required, dependent variable. For uniformity, it is helpful-  to have k be a TyVarTv, in parallel with other dependent variables.--* Duplicate skolemisation is expected.  When generalising in Step 3,-  we may find that one of the variables we want to quantify has-  already been skolemised.  For example, suppose we have already-  generalise S. When we come to T we'll find that kk1 (now the same as-  kk3) has already been skolemised.--  That's fine -- but it means that-    a) when collecting quantification candidates, in-       candidateQTyVarsOfKind, we must collect skolems-    b) quantifyTyVars should be a no-op on such a skolem--}-----------------tcExtendKindEnvWithTyCons :: [TcTyCon] -> TcM a -> TcM a-tcExtendKindEnvWithTyCons tcs-  = tcExtendKindEnvList [ (tyConName tc, ATcTyCon tc) | tc <- tcs ]-----------------mkPromotionErrorEnv :: [LTyClDecl GhcRn] -> TcTypeEnv--- Maps each tycon/datacon to a suitable promotion error---    tc :-> APromotionErr TyConPE---    dc :-> APromotionErr RecDataConPE---    See Note [Recursion and promoting data constructors]--mkPromotionErrorEnv decls-  = foldr (plusNameEnv . mk_prom_err_env . unLoc)-          emptyNameEnv decls--mk_prom_err_env :: TyClDecl GhcRn -> TcTypeEnv-mk_prom_err_env (ClassDecl { tcdLName = L _ nm, tcdATs = ats })-  = unitNameEnv nm (APromotionErr ClassPE)-    `plusNameEnv`-    mkNameEnv [ (name, APromotionErr TyConPE)-              | (dL->L _ (FamilyDecl { fdLName = (dL->L _ name) })) <- ats ]--mk_prom_err_env (DataDecl { tcdLName = (dL->L _ name)-                          , tcdDataDefn = HsDataDefn { dd_cons = cons } })-  = unitNameEnv name (APromotionErr TyConPE)-    `plusNameEnv`-    mkNameEnv [ (con, APromotionErr RecDataConPE)-              | (dL->L _ con') <- cons-              , (dL->L _ con)  <- getConNames con' ]--mk_prom_err_env decl-  = unitNameEnv (tcdName decl) (APromotionErr TyConPE)-    -- Works for family declarations too-----------------getInitialKinds :: Bool -> [LTyClDecl GhcRn] -> TcM [TcTyCon]--- Returns a TcTyCon for each TyCon bound by the decls,--- each with its initial kind--getInitialKinds cusk decls-  = do { traceTc "getInitialKinds {" empty-       ; tcs <- concatMapM (addLocM (getInitialKind cusk)) decls-       ; traceTc "getInitialKinds done }" empty-       ; return tcs }--getInitialKind :: Bool -> TyClDecl GhcRn -> TcM [TcTyCon]--- Allocate a fresh kind variable for each TyCon and Class--- For each tycon, return a TcTyCon with kind k--- where k is the kind of tc, derived from the LHS---         of the definition (and probably including---         kind unification variables)---      Example: data T a b = ...---      return (T, kv1 -> kv2 -> kv3)------ This pass deals with (ie incorporates into the kind it produces)---   * The kind signatures on type-variable binders---   * The result kinds signature on a TyClDecl------ No family instances are passed to getInitialKinds--getInitialKind cusk-    (ClassDecl { tcdLName = dL->L _ name-               , tcdTyVars = ktvs-               , tcdATs = ats })-  = do { tycon <- kcLHsQTyVars name ClassFlavour cusk ktvs $-                  return constraintKind-       ; let parent_tv_prs = tcTyConScopedTyVars tycon-            -- See Note [Don't process associated types in kcLHsQTyVars]-       ; inner_tcs <- tcExtendNameTyVarEnv parent_tv_prs $-                      getFamDeclInitialKinds (Just tycon) ats-       ; return (tycon : inner_tcs) }--getInitialKind cusk-    (DataDecl { tcdLName = dL->L _ name-              , tcdTyVars = ktvs-              , tcdDataDefn = HsDataDefn { dd_kindSig = m_sig-                                         , dd_ND = new_or_data } })-  = do  { let flav = newOrDataToFlavour new_or_data-        ; tc <- kcLHsQTyVars name flav cusk ktvs $-                case m_sig of-                   Just ksig -> tcLHsKindSig (DataKindCtxt name) ksig-                   Nothing   -> return liftedTypeKind-        ; return [tc] }--getInitialKind _ (FamDecl { tcdFam = decl })-  = do { tc <- getFamDeclInitialKind Nothing decl-       ; return [tc] }--getInitialKind cusk (SynDecl { tcdLName = dL->L _ name-                             , tcdTyVars = ktvs-                             , tcdRhs = rhs })-  = do  { tycon <- kcLHsQTyVars name TypeSynonymFlavour cusk ktvs $-                   case kind_annotation rhs of-                     Just ksig -> tcLHsKindSig (TySynKindCtxt name) ksig-                     Nothing   -> newMetaKindVar-        ; return [tycon] }-  where-    -- Keep this synchronized with 'hsDeclHasCusk'.-    kind_annotation (dL->L _ ty) = case ty of-        HsParTy _ lty     -> kind_annotation lty-        HsKindSig _ _ k   -> Just k-        _                 -> Nothing--getInitialKind _ (DataDecl _ _ _ _ (XHsDataDefn _)) = panic "getInitialKind"-getInitialKind _ (XTyClDecl _) = panic "getInitialKind"------------------------------------getFamDeclInitialKinds-  :: Maybe TcTyCon -- ^ Enclosing class TcTyCon, if any-  -> [LFamilyDecl GhcRn]-  -> TcM [TcTyCon]-getFamDeclInitialKinds mb_parent_tycon decls-  = mapM (addLocM (getFamDeclInitialKind mb_parent_tycon)) decls--getFamDeclInitialKind-  :: Maybe TcTyCon -- ^ Enclosing class TcTyCon, if any-  -> FamilyDecl GhcRn-  -> TcM TcTyCon-getFamDeclInitialKind mb_parent_tycon-    decl@(FamilyDecl { fdLName     = (dL->L _ name)-                     , fdTyVars    = ktvs-                     , fdResultSig = (dL->L _ resultSig)-                     , fdInfo      = info })-  = kcLHsQTyVars name flav cusk ktvs $-    case resultSig of-      KindSig _ ki                              -> tcLHsKindSig ctxt ki-      TyVarSig _ (dL->L _ (KindedTyVar _ _ ki)) -> tcLHsKindSig ctxt ki-      _ -- open type families have * return kind by default-        | tcFlavourIsOpen flav              -> return liftedTypeKind-               -- closed type families have their return kind inferred-               -- by default-        | otherwise                         -> newMetaKindVar-  where-    mb_cusk = tcTyConIsPoly <$> mb_parent_tycon-    cusk    = famDeclHasCusk mb_cusk decl-    flav  = case info of-      DataFamily         -> DataFamilyFlavour mb_parent_tycon-      OpenTypeFamily     -> OpenTypeFamilyFlavour mb_parent_tycon-      ClosedTypeFamily _ -> ASSERT( isNothing mb_parent_tycon )-                            ClosedTypeFamilyFlavour-    ctxt  = TyFamResKindCtxt name-getFamDeclInitialKind _ (XFamilyDecl _) = panic "getFamDeclInitialKind"---------------------------------------------------------------------------kcLTyClDecl :: LTyClDecl GhcRn -> TcM ()-  -- See Note [Kind checking for type and class decls]-kcLTyClDecl (dL->L loc decl)-  = setSrcSpan loc $-    tcAddDeclCtxt decl $-    do { traceTc "kcTyClDecl {" (ppr tc_name)-       ; kcTyClDecl decl-       ; traceTc "kcTyClDecl done }" (ppr tc_name) }-  where-    tc_name = tyClDeclLName decl--kcTyClDecl :: TyClDecl GhcRn -> TcM ()--- This function is used solely for its side effect on kind variables--- NB kind signatures on the type variables and---    result kind signature have already been dealt with---    by getInitialKind, so we can ignore them here.--kcTyClDecl (DataDecl { tcdLName    = (dL->L _ name)-                     , tcdDataDefn = defn })-  | HsDataDefn { dd_cons = cons@((dL->L _ (ConDeclGADT {})) : _)-               , dd_ctxt = (dL->L _ []) } <- defn-  = mapM_ (wrapLocM_ kcConDecl) cons-    -- hs_tvs and dd_kindSig already dealt with in getInitialKind-    -- This must be a GADT-style decl,-    --        (see invariants of DataDefn declaration)-    -- so (a) we don't need to bring the hs_tvs into scope, because the-    --        ConDecls bind all their own variables-    --    (b) dd_ctxt is not allowed for GADT-style decls, so we can ignore it--  | HsDataDefn { dd_ctxt = ctxt, dd_cons = cons } <- defn-  = bindTyClTyVars name $ \ _ _ ->-    do  { _ <- tcHsContext ctxt-        ; mapM_ (wrapLocM_ kcConDecl) cons }--kcTyClDecl (SynDecl { tcdLName = dL->L _ name, tcdRhs = rhs })-  = bindTyClTyVars name $ \ _ res_kind ->-    discardResult $ tcCheckLHsType rhs res_kind-        -- NB: check against the result kind that we allocated-        -- in getInitialKinds.--kcTyClDecl (ClassDecl { tcdLName = (dL->L _ name)-                      , tcdCtxt = ctxt, tcdSigs = sigs })-  = bindTyClTyVars name $ \ _ _ ->-    do  { _ <- tcHsContext ctxt-        ; mapM_ (wrapLocM_ kc_sig) sigs }-  where-    kc_sig (ClassOpSig _ _ nms op_ty) = kcClassSigType skol_info nms op_ty-    kc_sig _                          = return ()--    skol_info = TyConSkol ClassFlavour name--kcTyClDecl (FamDecl _ (FamilyDecl { fdLName  = (dL->L _ fam_tc_name)-                                  , fdInfo   = fd_info }))--- closed type families look at their equations, but other families don't--- do anything here-  = case fd_info of-      ClosedTypeFamily (Just eqns) ->-        do { fam_tc <- kcLookupTcTyCon fam_tc_name-           ; mapM_ (kcTyFamInstEqn fam_tc) eqns }-      _ -> return ()-kcTyClDecl (FamDecl _ (XFamilyDecl _))              = panic "kcTyClDecl"-kcTyClDecl (DataDecl _ _ _ _ (XHsDataDefn _)) = panic "kcTyClDecl"-kcTyClDecl (XTyClDecl _)                            = panic "kcTyClDecl"----------------------kcConDecl :: ConDecl GhcRn -> TcM ()-kcConDecl (ConDeclH98 { con_name = name, con_ex_tvs = ex_tvs-                      , con_mb_cxt = ex_ctxt, con_args = args })-  = addErrCtxt (dataConCtxtName [name]) $-    discardResult                   $-    bindExplicitTKBndrs_Skol ex_tvs $-    do { _ <- tcHsMbContext ex_ctxt-       ; traceTc "kcConDecl {" (ppr name $$ ppr args)-       ; mapM_ (tcHsOpenType . getBangType) (hsConDeclArgTys args)-       ; traceTc "kcConDecl }" (ppr name)-       }-              -- We don't need to check the telescope here, because that's-              -- done in tcConDecl--kcConDecl (ConDeclGADT { con_names = names-                       , con_qvars = qtvs, con_mb_cxt = cxt-                       , con_args = args, con_res_ty = res_ty })-  | HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = implicit_tkv_nms }-           , hsq_explicit = explicit_tkv_nms } <- qtvs-  = -- Even though the data constructor's type is closed, we-    -- must still kind-check the type, because that may influence-    -- the inferred kind of the /type/ constructor.  Example:-    --    data T f a where-    --      MkT :: f a -> T f a-    -- If we don't look at MkT we won't get the correct kind-    -- for the type constructor T-    addErrCtxt (dataConCtxtName names) $-    discardResult $-    bindImplicitTKBndrs_Tv implicit_tkv_nms $-    bindExplicitTKBndrs_Tv explicit_tkv_nms $-        -- Why "_Tv"?  See Note [Kind-checking for GADTs]-    do { _ <- tcHsMbContext cxt-       ; mapM_ (tcHsOpenType . getBangType) (hsConDeclArgTys args)-       ; _ <- tcHsOpenType res_ty-       ; return () }-kcConDecl (XConDecl _) = panic "kcConDecl"-kcConDecl (ConDeclGADT _ _ _ (XLHsQTyVars _) _ _ _ _) = panic "kcConDecl"--{--Note [Recursion and promoting data constructors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We don't want to allow promotion in a strongly connected component-when kind checking.--Consider:-  data T f = K (f (K Any))--When kind checking the `data T' declaration the local env contains the-mappings:-  T -> ATcTyCon <some initial kind>-  K -> APromotionErr--APromotionErr is only used for DataCons, and only used during type checking-in tcTyClGroup.--Note [Kind-checking for GADTs]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--  data Proxy a where-    MkProxy1 :: forall k (b :: k). Proxy b-    MkProxy2 :: forall j (c :: j). Proxy c--It seems reasonable that this should be accepted. But something very strange-is going on here: when we're kind-checking this declaration, we need to unify-the kind of `a` with k and j -- even though k and j's scopes are local to the type of-MkProxy{1,2}. The best approach we've come up with is to use TyVarTvs during-the kind-checking pass. First off, note that it's OK if the kind-checking pass-is too permissive: we'll snag the problems in the type-checking pass later.-(This extra permissiveness might happen with something like--  data SameKind :: k -> k -> Type-  data Bad a where-    MkBad :: forall k1 k2 (a :: k1) (b :: k2). Bad (SameKind a b)--which would be accepted if k1 and k2 were TyVarTvs. This is correctly rejected-in the second pass, though. Test case: polykinds/TyVarTvKinds3)-Recall that the kind-checking pass exists solely to collect constraints-on the kinds and to power unification.--To achieve the use of TyVarTvs, we must be careful to use specialized functions-that produce TyVarTvs, not ordinary skolems. This is why we need-kcExplicitTKBndrs and kcImplicitTKBndrs in TcHsType, separate from their-tc... variants.--The drawback of this approach is sometimes it will accept a definition that-a (hypothetical) declarative specification would likely reject. As a general-rule, we don't want to allow polymorphic recursion without a CUSK. Indeed,-the whole point of CUSKs is to allow polymorphic recursion. Yet, the TyVarTvs-approach allows a limited form of polymorphic recursion *without* a CUSK.--To wit:-  data T a = forall k (b :: k). MkT (T b) Int-  (test case: dependent/should_compile/T14066a)--Note that this is polymorphically recursive, with the recursive occurrence-of T used at a kind other than a's kind. The approach outlined here accepts-this definition, because this kind is still a kind variable (and so the-TyVarTvs unify). Stepping back, I (Richard) have a hard time envisioning a-way to describe exactly what declarations will be accepted and which will-be rejected (without a CUSK). However, the accepted definitions are indeed-well-kinded and any rejected definitions would be accepted with a CUSK,-and so this wrinkle need not cause anyone to lose sleep.--************************************************************************-*                                                                      *-\subsection{Type checking}-*                                                                      *-************************************************************************--Note [Type checking recursive type and class declarations]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-At this point we have completed *kind-checking* of a mutually-recursive group of type/class decls (done in kcTyClGroup). However,-we discarded the kind-checked types (eg RHSs of data type decls);-note that kcTyClDecl returns ().  There are two reasons:--  * It's convenient, because we don't have to rebuild a-    kinded HsDecl (a fairly elaborate type)--  * It's necessary, because after kind-generalisation, the-    TyCons/Classes may now be kind-polymorphic, and hence need-    to be given kind arguments.--Example:-       data T f a = MkT (f a) (T f a)-During kind-checking, we give T the kind T :: k1 -> k2 -> *-and figure out constraints on k1, k2 etc. Then we generalise-to get   T :: forall k. (k->*) -> k -> *-So now the (T f a) in the RHS must be elaborated to (T k f a).--However, during tcTyClDecl of T (above) we will be in a recursive-"knot". So we aren't allowed to look at the TyCon T itself; we are only-allowed to put it (lazily) in the returned structures.  But when-kind-checking the RHS of T's decl, we *do* need to know T's kind (so-that we can correctly elaboarate (T k f a).  How can we get T's kind-without looking at T?  Delicate answer: during tcTyClDecl, we extend--  *Global* env with T -> ATyCon (the (not yet built) final TyCon for T)-  *Local*  env with T -> ATcTyCon (TcTyCon with the polymorphic kind of T)--Then:--  * During TcHsType.tcTyVar we look in the *local* env, to get the-    fully-known, not knot-tied TcTyCon for T.--  * Then, in TcHsSyn.zonkTcTypeToType (and zonkTcTyCon in particular)-    we look in the *global* env to get the TyCon.--This fancy footwork (with two bindings for T) is only necessary for the-TyCons or Classes of this recursive group.  Earlier, finished groups,-live in the global env only.--See also Note [Kind checking recursive type and class declarations]--Note [Kind checking recursive type and class declarations]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Before we can type-check the decls, we must kind check them. This-is done by establishing an "initial kind", which is a rather uninformed-guess at a tycon's kind (by counting arguments, mainly) and then-using this initial kind for recursive occurrences.--The initial kind is stored in exactly the same way during-kind-checking as it is during type-checking (Note [Type checking-recursive type and class declarations]): in the *local* environment,-with ATcTyCon. But we still must store *something* in the *global*-environment. Even though we discard the result of kind-checking, we-sometimes need to produce error messages. These error messages will-want to refer to the tycons being checked, except that they don't-exist yet, and it would be Terribly Annoying to get the error messages-to refer back to HsSyn. So we create a TcTyCon and put it in the-global env. This tycon can print out its name and knows its kind, but-any other action taken on it will panic. Note that TcTyCons are *not*-knot-tied, unlike the rather valid but knot-tied ones that occur-during type-checking.--Note [Declarations for wired-in things]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-For wired-in things we simply ignore the declaration-and take the wired-in information.  That avoids complications.-e.g. the need to make the data constructor worker name for-     a constraint tuple match the wired-in one--}--tcTyClDecl :: RolesInfo -> LTyClDecl GhcRn -> TcM TyCon-tcTyClDecl roles_info (dL->L loc decl)-  | Just thing <- wiredInNameTyThing_maybe (tcdName decl)-  = case thing of -- See Note [Declarations for wired-in things]-      ATyCon tc -> return tc-      _ -> pprPanic "tcTyClDecl" (ppr thing)--  | otherwise-  = setSrcSpan loc $ tcAddDeclCtxt decl $-    do { traceTc "---- tcTyClDecl ---- {" (ppr decl)-       ; tc <- tcTyClDecl1 Nothing roles_info decl-       ; traceTc "---- tcTyClDecl end ---- }" (ppr tc)-       ; return tc }--  -- "type family" declarations-tcTyClDecl1 :: Maybe Class -> RolesInfo -> TyClDecl GhcRn -> TcM TyCon-tcTyClDecl1 parent _roles_info (FamDecl { tcdFam = fd })-  = tcFamDecl1 parent fd--  -- "type" synonym declaration-tcTyClDecl1 _parent roles_info-            (SynDecl { tcdLName = (dL->L _ tc_name)-                     , tcdRhs   = rhs })-  = ASSERT( isNothing _parent )-    bindTyClTyVars tc_name $ \ binders res_kind ->-    tcTySynRhs roles_info tc_name binders res_kind rhs--  -- "data/newtype" declaration-tcTyClDecl1 _parent roles_info-            (DataDecl { tcdLName = (dL->L _ tc_name)-                      , tcdDataDefn = defn })-  = ASSERT( isNothing _parent )-    bindTyClTyVars tc_name $ \ tycon_binders res_kind ->-    tcDataDefn roles_info tc_name tycon_binders res_kind defn--tcTyClDecl1 _parent roles_info-            (ClassDecl { tcdLName = (dL->L _ class_name)-                       , tcdCtxt = hs_ctxt-                       , tcdMeths = meths-                       , tcdFDs = fundeps-                       , tcdSigs = sigs-                       , tcdATs = ats-                       , tcdATDefs = at_defs })-  = ASSERT( isNothing _parent )-    do { clas <- tcClassDecl1 roles_info class_name hs_ctxt-                              meths fundeps sigs ats at_defs-       ; return (classTyCon clas) }--tcTyClDecl1 _ _ (XTyClDecl _) = panic "tcTyClDecl1"---{- *********************************************************************-*                                                                      *-          Class declarations-*                                                                      *-********************************************************************* -}--tcClassDecl1 :: RolesInfo -> Name -> LHsContext GhcRn-             -> LHsBinds GhcRn -> [LHsFunDep GhcRn] -> [LSig GhcRn]-             -> [LFamilyDecl GhcRn] -> [LTyFamDefltEqn GhcRn]-             -> TcM Class-tcClassDecl1 roles_info class_name hs_ctxt meths fundeps sigs ats at_defs-  = fixM $ \ clas ->-    -- We need the knot because 'clas' is passed into tcClassATs-    bindTyClTyVars class_name $ \ binders res_kind ->-    do { MASSERT2( tcIsConstraintKind res_kind-                 , ppr class_name $$ ppr res_kind )-       ; traceTc "tcClassDecl 1" (ppr class_name $$ ppr binders)-       ; let tycon_name = class_name        -- We use the same name-             roles = roles_info tycon_name  -- for TyCon and Class--       ; (ctxt, fds, sig_stuff, at_stuff)-            <- pushTcLevelM_   $-               solveEqualities $-               do { ctxt <- tcHsContext hs_ctxt-                  ; fds  <- mapM (addLocM tc_fundep) fundeps-                  ; sig_stuff <- tcClassSigs class_name sigs meths-                  ; at_stuff  <- tcClassATs class_name clas ats at_defs-                  ; return (ctxt, fds, sig_stuff, at_stuff) }--       -- The solveEqualities will report errors for any-       -- unsolved equalities, so these zonks should not encounter-       -- any unfilled coercion variables unless there is such an error-       -- The zonk also squeeze out the TcTyCons, and converts-       -- Skolems to tyvars.-       ; ze        <- emptyZonkEnv-       ; ctxt      <- zonkTcTypesToTypesX ze ctxt-       ; sig_stuff <- mapM (zonkTcMethInfoToMethInfoX ze) sig_stuff-         -- ToDo: do we need to zonk at_stuff?--       -- TODO: Allow us to distinguish between abstract class,-       -- and concrete class with no methods (maybe by-       -- specifying a trailing where or not--       ; mindef <- tcClassMinimalDef class_name sigs sig_stuff-       ; is_boot <- tcIsHsBootOrSig-       ; let body | is_boot, null ctxt, null at_stuff, null sig_stuff-                  = Nothing-                  | otherwise-                  = Just (ctxt, at_stuff, sig_stuff, mindef)--       ; clas <- buildClass class_name binders roles fds body-       ; traceTc "tcClassDecl" (ppr fundeps $$ ppr binders $$-                                ppr fds)-       ; return clas }-  where-    tc_fundep (tvs1, tvs2) = do { tvs1' <- mapM (tcLookupTyVar . unLoc) tvs1 ;-                                ; tvs2' <- mapM (tcLookupTyVar . unLoc) tvs2 ;-                                ; return (tvs1', tvs2') }---{- Note [Associated type defaults]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--The following is an example of associated type defaults:-             class C a where-               data D a--               type F a b :: *-               type F a b = [a]        -- Default--Note that we can get default definitions only for type families, not data-families.--}--tcClassATs :: Name                   -- The class name (not knot-tied)-           -> Class                  -- The class parent of this associated type-           -> [LFamilyDecl GhcRn]    -- Associated types.-           -> [LTyFamDefltEqn GhcRn] -- Associated type defaults.-           -> TcM [ClassATItem]-tcClassATs class_name cls ats at_defs-  = do {  -- Complain about associated type defaults for non associated-types-         sequence_ [ failWithTc (badATErr class_name n)-                   | n <- map at_def_tycon at_defs-                   , not (n `elemNameSet` at_names) ]-       ; mapM tc_at ats }-  where-    at_def_tycon :: LTyFamDefltEqn GhcRn -> Name-    at_def_tycon (dL->L _ eqn) = unLoc (feqn_tycon eqn)--    at_fam_name :: LFamilyDecl GhcRn -> Name-    at_fam_name (dL->L _ decl) = unLoc (fdLName decl)--    at_names = mkNameSet (map at_fam_name ats)--    at_defs_map :: NameEnv [LTyFamDefltEqn GhcRn]-    -- Maps an AT in 'ats' to a list of all its default defs in 'at_defs'-    at_defs_map = foldr (\at_def nenv -> extendNameEnv_C (++) nenv-                                          (at_def_tycon at_def) [at_def])-                        emptyNameEnv at_defs--    tc_at at = do { fam_tc <- addLocM (tcFamDecl1 (Just cls)) at-                  ; let at_defs = lookupNameEnv at_defs_map (at_fam_name at)-                                  `orElse` []-                  ; atd <- tcDefaultAssocDecl fam_tc at_defs-                  ; return (ATI fam_tc atd) }----------------------------tcDefaultAssocDecl :: TyCon                    -- ^ Family TyCon (not knot-tied)-                   -> [LTyFamDefltEqn GhcRn]        -- ^ Defaults-                   -> TcM (Maybe (KnotTied Type, SrcSpan))   -- ^ Type checked RHS-tcDefaultAssocDecl _ []-  = return Nothing  -- No default declaration--tcDefaultAssocDecl _ (d1:_:_)-  = failWithTc (text "More than one default declaration for"-                <+> ppr (feqn_tycon (unLoc d1)))--tcDefaultAssocDecl fam_tc [dL->L loc (FamEqn { feqn_tycon = L _ tc_name-                                             , feqn_pats = hs_tvs-                                             , feqn_rhs = hs_rhs_ty })]-  | HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = imp_vars}-           , hsq_explicit = exp_vars } <- hs_tvs-  = -- See Note [Type-checking default assoc decls]-    setSrcSpan loc $-    tcAddFamInstCtxt (text "default type instance") tc_name $-    do { traceTc "tcDefaultAssocDecl" (ppr tc_name)-       ; let fam_tc_name = tyConName fam_tc-             fam_arity = length (tyConVisibleTyVars fam_tc)--       -- Kind of family check-       ; ASSERT( fam_tc_name == tc_name )-         checkTc (isTypeFamilyTyCon fam_tc) (wrongKindOfFamily fam_tc)--       -- Arity check-       ; checkTc (exp_vars `lengthIs` fam_arity)-                 (wrongNumberOfParmsErr fam_arity)--       -- Typecheck RHS-       ; let hs_pats = map (HsValArg . hsLTyVarBndrToType) exp_vars--          -- NB: Use tcFamTyPats, not bindTyClTyVars. The latter expects to get-          -- the LHsQTyVars used for declaring a tycon, but the names here-          -- are different.--          -- You might think we should pass in some AssocInstInfo, as we're looking-          -- at an associated type. But this would be wrong, because an associated-          -- type default LHS can mention *different* type variables than the-          -- enclosing class. So it's treated more as a freestanding beast.-       ; (qtvs, pats, rhs_ty) <- tcTyFamInstEqnGuts fam_tc NotAssociated-                                                    imp_vars exp_vars-                                                    hs_pats hs_rhs_ty--         -- See Note [Type-checking default assoc decls]-       ; traceTc "tcDefault" (vcat [ppr (tyConTyVars fam_tc), ppr qtvs, ppr pats])-       ; case tcMatchTys pats (mkTyVarTys (tyConTyVars fam_tc)) of-           Just subst -> return (Just (substTyUnchecked subst rhs_ty, loc) )-           Nothing    -> failWithTc (defaultAssocKindErr fam_tc)-           -- We check for well-formedness and validity later,-           -- in checkValidClass-     }-tcDefaultAssocDecl _ [dL->L _ (XFamEqn _)] = panic "tcDefaultAssocDecl"-tcDefaultAssocDecl _ [dL->L _ (FamEqn _ _ _ (XLHsQTyVars _) _ _)]-  = panic "tcDefaultAssocDecl"-tcDefaultAssocDecl _ [_]-  = panic "tcDefaultAssocDecl: Impossible Match" -- due to #15884---{- Note [Type-checking default assoc decls]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this default declaration for an associated type--   class C a where-      type F (a :: k) b :: *-      type F x y = Proxy x -> y--Note that the class variable 'a' doesn't scope over the default assoc-decl (rather oddly I think), and (less oddly) neither does the second-argument 'b' of the associated type 'F', or the kind variable 'k'.-Instead, the default decl is treated more like a top-level type-instance.--However we store the default rhs (Proxy x -> y) in F's TyCon, using-F's own type variables, so we need to convert it to (Proxy a -> b).-We do this by calling tcMatchTys to match them up.  This also ensures-that x's kind matches a's and similarly for y and b.  The error-message isn't great, mind you.  (Trac #11361 was caused by not doing a-proper tcMatchTys here.)--Recall also that the left-hand side of an associated type family-default is always just variables -- no tycons here. Accordingly,-the patterns used in the tcMatchTys won't actually be knot-tied,-even though we're in the knot. This is too delicate for my taste,-but it works.---}--{- *********************************************************************-*                                                                      *-          Type family declarations-*                                                                      *-********************************************************************* -}--tcFamDecl1 :: Maybe Class -> FamilyDecl GhcRn -> TcM TyCon-tcFamDecl1 parent (FamilyDecl { fdInfo = fam_info-                              , fdLName = tc_lname@(dL->L _ tc_name)-                              , fdResultSig = (dL->L _ sig)-                              , fdTyVars = user_tyvars-                              , fdInjectivityAnn = inj })-  | DataFamily <- fam_info-  = bindTyClTyVars tc_name $ \ binders res_kind -> do-  { traceTc "data family:" (ppr tc_name)-  ; checkFamFlag tc_name--  -- Check that the result kind is OK-  -- We allow things like-  --   data family T (a :: Type) :: forall k. k -> Type-  -- We treat T as having arity 1, but result kind forall k. k -> Type-  -- But we want to check that the result kind finishes in-  --   Type or a kind-variable-  -- For the latter, consider-  --   data family D a :: forall k. Type -> k-  ; let (_, final_res_kind) = splitPiTys res_kind-  ; checkTc (tcIsLiftedTypeKind final_res_kind-             || isJust (tcGetCastedTyVar_maybe final_res_kind))-            (badKindSig False res_kind)--  ; tc_rep_name <- newTyConRepName tc_name-  ; let tycon = mkFamilyTyCon tc_name binders-                              res_kind-                              (resultVariableName sig)-                              (DataFamilyTyCon tc_rep_name)-                              parent NotInjective-  ; return tycon }--  | OpenTypeFamily <- fam_info-  = bindTyClTyVars tc_name $ \ binders res_kind -> do-  { traceTc "open type family:" (ppr tc_name)-  ; checkFamFlag tc_name-  ; inj' <- tcInjectivity binders inj-  ; let tycon = mkFamilyTyCon tc_name binders res_kind-                               (resultVariableName sig) OpenSynFamilyTyCon-                               parent inj'-  ; return tycon }--  | ClosedTypeFamily mb_eqns <- fam_info-  = -- Closed type families are a little tricky, because they contain the definition-    -- of both the type family and the equations for a CoAxiom.-    do { traceTc "Closed type family:" (ppr tc_name)-         -- the variables in the header scope only over the injectivity-         -- declaration but this is not involved here-       ; (inj', binders, res_kind)-            <- bindTyClTyVars tc_name $ \ binders res_kind ->-               do { inj' <- tcInjectivity binders inj-                  ; return (inj', binders, res_kind) }--       ; checkFamFlag tc_name -- make sure we have -XTypeFamilies--         -- If Nothing, this is an abstract family in a hs-boot file;-         -- but eqns might be empty in the Just case as well-       ; case mb_eqns of-           Nothing   ->-               return $ mkFamilyTyCon tc_name binders res_kind-                                      (resultVariableName sig)-                                      AbstractClosedSynFamilyTyCon parent-                                      inj'-           Just eqns -> do {--         -- Process the equations, creating CoAxBranches-       ; let tc_fam_tc = mkTcTyCon tc_name (ppr user_tyvars) binders res_kind-                                   [] False {- this doesn't matter here -}-                                   ClosedTypeFamilyFlavour--       ; branches <- mapAndReportM (tcTyFamInstEqn tc_fam_tc NotAssociated) eqns-         -- Do not attempt to drop equations dominated by earlier-         -- ones here; in the case of mutual recursion with a data-         -- type, we get a knot-tying failure.  Instead we check-         -- for this afterwards, in TcValidity.checkValidCoAxiom-         -- Example: tc265--         -- Create a CoAxiom, with the correct src location.-       ; co_ax_name <- newFamInstAxiomName tc_lname []--       ; let mb_co_ax-              | null eqns = Nothing   -- mkBranchedCoAxiom fails on empty list-              | otherwise = Just (mkBranchedCoAxiom co_ax_name fam_tc branches)--             fam_tc = mkFamilyTyCon tc_name binders res_kind (resultVariableName sig)-                      (ClosedSynFamilyTyCon mb_co_ax) parent inj'--         -- We check for instance validity later, when doing validity-         -- checking for the tycon. Exception: checking equations-         -- overlap done by dropDominatedAxioms-       ; return fam_tc } }--  | otherwise = panic "tcFamInst1"  -- Silence pattern-exhaustiveness checker-tcFamDecl1 _ (XFamilyDecl _) = panic "tcFamDecl1"---- | Maybe return a list of Bools that say whether a type family was declared--- injective in the corresponding type arguments. Length of the list is equal to--- the number of arguments (including implicit kind/coercion arguments).--- True on position--- N means that a function is injective in its Nth argument. False means it is--- not.-tcInjectivity :: [TyConBinder] -> Maybe (LInjectivityAnn GhcRn)-              -> TcM Injectivity-tcInjectivity _ Nothing-  = return NotInjective--  -- User provided an injectivity annotation, so for each tyvar argument we-  -- check whether a type family was declared injective in that argument. We-  -- return a list of Bools, where True means that corresponding type variable-  -- was mentioned in lInjNames (type family is injective in that argument) and-  -- False means that it was not mentioned in lInjNames (type family is not-  -- injective in that type variable). We also extend injectivity information to-  -- kind variables, so if a user declares:-  ---  --   type family F (a :: k1) (b :: k2) = (r :: k3) | r -> a-  ---  -- then we mark both `a` and `k1` as injective.-  -- NB: the return kind is considered to be *input* argument to a type family.-  -- Since injectivity allows to infer input arguments from the result in theory-  -- we should always mark the result kind variable (`k3` in this example) as-  -- injective.  The reason is that result type has always an assigned kind and-  -- therefore we can always infer the result kind if we know the result type.-  -- But this does not seem to be useful in any way so we don't do it.  (Another-  -- reason is that the implementation would not be straightforward.)-tcInjectivity tcbs (Just (dL->L loc (InjectivityAnn _ lInjNames)))-  = setSrcSpan loc $-    do { let tvs = binderVars tcbs-       ; dflags <- getDynFlags-       ; checkTc (xopt LangExt.TypeFamilyDependencies dflags)-                 (text "Illegal injectivity annotation" $$-                  text "Use TypeFamilyDependencies to allow this")-       ; inj_tvs <- mapM (tcLookupTyVar . unLoc) lInjNames-       ; inj_tvs <- mapM zonkTcTyVarToTyVar inj_tvs -- zonk the kinds-       ; let inj_ktvs = filterVarSet isTyVar $  -- no injective coercion vars-                        closeOverKinds (mkVarSet inj_tvs)-       ; let inj_bools = map (`elemVarSet` inj_ktvs) tvs-       ; traceTc "tcInjectivity" (vcat [ ppr tvs, ppr lInjNames, ppr inj_tvs-                                       , ppr inj_ktvs, ppr inj_bools ])-       ; return $ Injective inj_bools }--tcTySynRhs :: RolesInfo-           -> Name-           -> [TyConBinder] -> Kind-           -> LHsType GhcRn -> TcM TyCon-tcTySynRhs roles_info tc_name binders res_kind hs_ty-  = do { env <- getLclEnv-       ; traceTc "tc-syn" (ppr tc_name $$ ppr (tcl_env env))-       ; rhs_ty <- pushTcLevelM_   $-                   solveEqualities $-                   tcCheckLHsType hs_ty res_kind-       ; rhs_ty <- zonkTcTypeToType rhs_ty-       ; let roles = roles_info tc_name-             tycon = buildSynTyCon tc_name binders res_kind roles rhs_ty-       ; return tycon }--tcDataDefn :: RolesInfo -> Name-           -> [TyConBinder] -> Kind-           -> HsDataDefn GhcRn -> TcM TyCon-  -- NB: not used for newtype/data instances (whether associated or not)-tcDataDefn roles_info-           tc_name tycon_binders res_kind-           (HsDataDefn { dd_ND = new_or_data, dd_cType = cType-                       , dd_ctxt = ctxt-                       , dd_kindSig = mb_ksig  -- Already in tc's kind-                                               -- via getInitialKinds-                       , dd_cons = cons })- =  do { gadt_syntax <- dataDeclChecks tc_name new_or_data ctxt cons--       ; tcg_env <- getGblEnv-       ; (extra_bndrs, final_res_kind) <- etaExpandAlgTyCon tycon_binders res_kind--       ; let hsc_src = tcg_src tcg_env-       ; unless (mk_permissive_kind hsc_src cons) $-         checkTc (tcIsLiftedTypeKind final_res_kind) (badKindSig True res_kind)--       ; stupid_tc_theta <- pushTcLevelM_ $ solveEqualities $ tcHsContext ctxt-       ; stupid_theta    <- zonkTcTypesToTypes stupid_tc_theta-       ; kind_signatures <- xoptM LangExt.KindSignatures--             -- Check that we don't use kind signatures without Glasgow extensions-       ; when (isJust mb_ksig) $-         checkTc (kind_signatures) (badSigTyDecl tc_name)--       ; tycon <- fixM $ \ tycon -> do-             { let final_bndrs = tycon_binders `chkAppend` extra_bndrs-                   res_ty      = mkTyConApp tycon (mkTyVarTys (binderVars final_bndrs))-                   roles       = roles_info tc_name--             ; data_cons <- tcConDecls tycon final_bndrs res_ty cons-             ; tc_rhs    <- mk_tc_rhs hsc_src tycon data_cons-             ; tc_rep_nm <- newTyConRepName tc_name-             ; return (mkAlgTyCon tc_name-                                  final_bndrs-                                  final_res_kind-                                  roles-                                  (fmap unLoc cType)-                                  stupid_theta tc_rhs-                                  (VanillaAlgTyCon tc_rep_nm)-                                  gadt_syntax) }-       ; traceTc "tcDataDefn" (ppr tc_name $$ ppr tycon_binders $$ ppr extra_bndrs)-       ; return tycon }-  where-    -- Abstract data types in hsig files can have arbitrary kinds,-    -- because they may be implemented by type synonyms-    -- (which themselves can have arbitrary kinds, not just *)-    mk_permissive_kind HsigFile [] = True-    mk_permissive_kind _ _ = False--    -- In hs-boot, a 'data' declaration with no constructors-    -- indicates a nominally distinct abstract data type.-    mk_tc_rhs HsBootFile _ []-      = return AbstractTyCon--    mk_tc_rhs HsigFile _ [] -- ditto-      = return AbstractTyCon--    mk_tc_rhs _ tycon data_cons-      = case new_or_data of-          DataType -> return (mkDataTyConRhs data_cons)-          NewType  -> ASSERT( not (null data_cons) )-                      mkNewTyConRhs tc_name tycon (head data_cons)-tcDataDefn _ _ _ _ (XHsDataDefn _) = panic "tcDataDefn"-----------------------------kcTyFamInstEqn :: TcTyCon -> LTyFamInstEqn GhcRn -> TcM ()--- Used for the equations of a closed type family only--- Not used for data/type instances-kcTyFamInstEqn tc_fam_tc-    (dL->L loc (HsIB { hsib_ext = imp_vars-                     , hsib_body = FamEqn { feqn_tycon = dL->L _ eqn_tc_name-                                          , feqn_bndrs = mb_expl_bndrs-                                          , feqn_pats  = hs_pats-                                          , feqn_rhs   = hs_rhs_ty }}))-  = setSrcSpan loc $-    do { traceTc "kcTyFamInstEqn" (vcat-           [ text "tc_name ="    <+> ppr eqn_tc_name-           , text "fam_tc ="     <+> ppr tc_fam_tc <+> dcolon <+> ppr (tyConKind tc_fam_tc)-           , text "hsib_vars ="  <+> ppr imp_vars-           , text "feqn_bndrs =" <+> ppr mb_expl_bndrs-           , text "feqn_pats ="  <+> ppr hs_pats ])-          -- this check reports an arity error instead of a kind error; easier for user-       ; let vis_pats = numVisibleArgs hs_pats-       ; checkTc (vis_pats == vis_arity) $-                  wrongNumberOfParmsErr vis_arity-       ; discardResult $-         bindImplicitTKBndrs_Q_Tv imp_vars $-         bindExplicitTKBndrs_Q_Tv AnyKind (mb_expl_bndrs `orElse` []) $-         do { (_, res_kind) <- tcFamTyPats tc_fam_tc hs_pats-            ; tcCheckLHsType hs_rhs_ty res_kind }-             -- Why "_Tv" here?  Consider (Trac #14066-             --  type family Bar x y where-             --      Bar (x :: a) (y :: b) = Int-             --      Bar (x :: c) (y :: d) = Bool-             -- During kind-checkig, a,b,c,d should be TyVarTvs and unify appropriately-    }-  where-    vis_arity = length (tyConVisibleTyVars tc_fam_tc)--kcTyFamInstEqn _ (dL->L _ (XHsImplicitBndrs _)) = panic "kcTyFamInstEqn"-kcTyFamInstEqn _ (dL->L _ (HsIB _ (XFamEqn _))) = panic "kcTyFamInstEqn"-kcTyFamInstEqn _ _ = panic "kcTyFamInstEqn: Impossible Match" -- due to #15884------------------------------tcTyFamInstEqn :: TcTyCon -> AssocInstInfo -> LTyFamInstEqn GhcRn-               -> TcM (KnotTied CoAxBranch)--- Needs to be here, not in TcInstDcls, because closed families--- (typechecked here) have TyFamInstEqns--tcTyFamInstEqn fam_tc mb_clsinfo-    (dL->L loc (HsIB { hsib_ext = imp_vars-                 , hsib_body = FamEqn { feqn_tycon  = L _ eqn_tc_name-                                      , feqn_bndrs  = mb_expl_bndrs-                                      , feqn_pats   = hs_pats-                                      , feqn_rhs    = hs_rhs_ty }}))-  = ASSERT( getName fam_tc == eqn_tc_name )-    setSrcSpan loc $-    do {-       -- First, check the arity of visible arguments-       -- If we wait until validity checking, we'll get kind errors-       -- below when an arity error will be much easier to understand.-       ; let vis_arity = length (tyConVisibleTyVars fam_tc)-             vis_pats  = numVisibleArgs hs_pats-       ; checkTc (vis_pats == vis_arity) $-         wrongNumberOfParmsErr vis_arity--       ; (qtvs, pats, rhs_ty) <- tcTyFamInstEqnGuts fam_tc mb_clsinfo-                                      imp_vars (mb_expl_bndrs `orElse` [])-                                      hs_pats hs_rhs_ty--       -- Don't print results they may be knot-tied-       -- (tcFamInstEqnGuts zonks to Type)-       ; return (mkCoAxBranch qtvs [] [] pats rhs_ty-                              (map (const Nominal) qtvs)-                              loc) }--tcTyFamInstEqn _ _ _ = panic "tcTyFamInstEqn"--{--Kind check type patterns and kind annotate the embedded type variables.-     type instance F [a] = rhs-- * Here we check that a type instance matches its kind signature, but we do-   not check whether there is a pattern for each type index; the latter-   check is only required for type synonym instances.--Note [Instantiating a family tycon]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It's possible that kind-checking the result of a family tycon applied to-its patterns will instantiate the tycon further. For example, we might-have--  type family F :: k where-    F = Int-    F = Maybe--After checking (F :: forall k. k) (with no visible patterns), we still need-to instantiate the k. With data family instances, this problem can be even-more intricate, due to Note [Arity of data families] in FamInstEnv. See-indexed-types/should_compile/T12369 for an example.--So, the kind-checker must return the new skolems and args (that is, Type-or (Type -> Type) for the equations above) and the instantiated kind.--Note [Generalising in tcFamTyPatsGuts]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have something like-  type instance forall (a::k) b. F t1 t2 = rhs--Then  imp_vars = [k], exp_bndrs = [a::k, b]--We want to quantify over-  * k, a, and b  (all user-specified)-  * and any inferred free kind vars from-      - the kinds of k, a, b-      - the types t1, t2--However, unlike a type signature like-  f :: forall (a::k). blah--we do /not/ care about the Inferred/Specified designation-or order for the final quantified tyvars.  Type-family-instances are not invoked directly in Haskell source code,-so visible type application etc plays no role.--So, the simple thing is-   - gather candiates from [k, a, b] and pats-   - quantify over them--Hence the sligtly mysterious call:-    candidateQTyVarsOfTypes (pats ++ mkTyVarTys scoped_tvs)--Simple, neat, but a little non-obvious!--}-----------------------------tcTyFamInstEqnGuts :: TyCon -> AssocInstInfo-                   -> [Name] -> [LHsTyVarBndr GhcRn]  -- Implicit and explicicit binder-                   -> HsTyPats GhcRn                  -- Patterns-                   -> LHsType GhcRn                   -- RHS-                   -> TcM ([TyVar], [TcType], TcType)      -- (tyvars, pats, rhs)--- Used only for type families, not data families-tcTyFamInstEqnGuts fam_tc mb_clsinfo imp_vars exp_bndrs hs_pats hs_rhs_ty-  = do { traceTc "tcTyFamInstEqnGuts {" (vcat [ ppr fam_tc <+> ppr hs_pats ])--       -- By now, for type families (but not data families) we should-       -- have checked that the number of patterns matches tyConArity--       -- This code is closely related to the code-       -- in TcHsType.kcLHsQTyVars_Cusk-       ; (imp_tvs, (exp_tvs, (lhs_ty, rhs_ty)))-               <- pushTcLevelM_                                $-                  solveEqualities                              $-                  bindImplicitTKBndrs_Q_Skol imp_vars          $-                  bindExplicitTKBndrs_Q_Skol AnyKind exp_bndrs $-                  do { (lhs_ty, rhs_kind) <- tc_lhs-                       -- Ensure that the instance is consistent with its-                       -- parent class (#16008)-                     ; addConsistencyConstraints mb_clsinfo lhs_ty-                     ; rhs_ty <- tcCheckLHsType hs_rhs_ty rhs_kind-                     ; return (lhs_ty, rhs_ty) }--       -- See Note [Generalising in tcFamTyPatsGuts]-       -- This code (and the stuff immediately above) is very similar-       -- to that in tcDataFamHeader.  Maybe we should abstract the-       -- common code; but for the moment I concluded that it's-       -- clearer to duplicate it.  Still, if you fix a bug here,-       -- check there too!-       ; let scoped_tvs = imp_tvs ++ exp_tvs-       ; dvs  <- candidateQTyVarsOfTypes (lhs_ty : mkTyVarTys scoped_tvs)-       ; qtvs <- quantifyTyVars emptyVarSet dvs--       ; (ze, qtvs) <- zonkTyBndrs qtvs-       ; lhs_ty     <- zonkTcTypeToTypeX ze lhs_ty-       ; rhs_ty     <- zonkTcTypeToTypeX ze rhs_ty--       ; let pats = unravelFamInstPats lhs_ty-             -- Note that we do this after solveEqualities-             -- so that any strange coercions inside lhs_ty-             -- have been solved before we attempt to unravel it-       ; traceTc "tcTyFamInstEqnGuts }" (ppr fam_tc <+> pprTyVars qtvs)-       ; return (qtvs, pats, rhs_ty) }-  where-    tc_lhs | null hs_pats  -- See Note [Apparently-nullary families]-           = do { (args, rhs_kind) <- tcInstTyBinders $-                                      splitPiTysInvisibleN (tyConArity fam_tc)-                                                           (tyConKind  fam_tc)-                ; return (mkTyConApp fam_tc args, rhs_kind) }-           | otherwise-           = tcFamTyPats fam_tc hs_pats--{- Note [Apparently-nullary families]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-  type family F :: k -> *--This really means-  type family F @k :: k -> *--That is, the family has arity 1, and can match on the kind. So it's-not really a nullary family.   NB that-  type famly F2 :: forall k. k -> *-is quite different and really does have arity 0.--Returning to F we might have-  type instannce F = Maybe-which instantaite 'k' to '*' and really means-  type instannce F @* = Maybe--Conclusion: in this odd case where there are no LHS patterns, we-should instantiate any invisible foralls in F's kind, to saturate-its arity (but no more).  This is what happens in tc_lhs in-tcTyFamInstEqnGuts.--If there are any visible patterns, then the first will force-instantiation of any Inferred quantifiers for F -- remember,-Inferred quantifiers always come first.--}---------------------tcFamTyPats :: TyCon-            -> HsTyPats GhcRn                -- Patterns-            -> TcM (TcType, TcKind)          -- (lhs_type, lhs_kind)--- Used for both type and data families-tcFamTyPats fam_tc hs_pats-  = do { traceTc "tcFamTyPats {" $-         vcat [ ppr fam_tc <+> dcolon <+> ppr fam_kind-              , text "arity:" <+> ppr fam_arity-              , text "kind:" <+> ppr fam_kind ]--       ; let fun_ty = mkTyConApp fam_tc []--       ; (fam_app, res_kind) <- unsetWOptM Opt_WarnPartialTypeSignatures $-                                setXOptM LangExt.PartialTypeSignatures $-                                -- See Note [Wildcards in family instances] in-                                -- RnSource.hs-                                tcInferApps typeLevelMode lhs_fun fun_ty-                                            fam_kind hs_pats--       ; traceTc "End tcFamTyPats }" $-         vcat [ ppr fam_tc <+> dcolon <+> ppr fam_kind-              , text "res_kind:" <+> ppr res_kind ]--       ; return (fam_app, res_kind) }-  where-    fam_name  = tyConName fam_tc-    fam_arity = tyConArity fam_tc-    fam_kind  = tyConKind fam_tc-    lhs_fun   = noLoc (HsTyVar noExt NotPromoted (noLoc fam_name))--unravelFamInstPats :: TcType -> [TcType]--- Decompose fam_app to get the argument patterns------ We expect fam_app to look like (F t1 .. tn)--- tcInferApps is capable of returning ((F ty1 |> co) ty2),--- but that can't happen here because we already checked the--- arity of F matches the number of pattern-unravelFamInstPats fam_app-  = case splitTyConApp_maybe fam_app of-      Just (_, pats) -> pats-      Nothing        -> WARN( True, bad_lhs fam_app ) []-        -- The Nothing case cannot happen for type families, because-        -- we don't call unravelFamInstPats until we've solved the-        -- equalities.  For data families I wasn't quite as convinced-        -- so I've let it as a warning rather than a panic.-  where-    bad_lhs fam_app-      = hang (text "Ill-typed LHS of family instance")-           2 (debugPprType fam_app)--addConsistencyConstraints :: AssocInstInfo -> TcType -> TcM ()--- In the corresponding positions of the class and type-family,--- ensure the the family argument is the same as the class argument---   E.g    class C a b c d where---             F c x y a :: Type--- Here the first  arg of F should be the same as the third of C---  and the fourth arg of F should be the same as the first of C------ We emit /Derived/ constraints (a bit like fundeps) to encourage--- unification to happen, but without actually reporting errors.--- If, despite the efforts, corresponding positions do not match,--- checkConsistentFamInst will complain-addConsistencyConstraints mb_clsinfo fam_app-  | InClsInst { ai_inst_env = inst_env } <- mb_clsinfo-  , Just (fam_tc, pats) <- tcSplitTyConApp_maybe fam_app-  = do { let eqs = [ (cls_ty, pat)-                   | (fam_tc_tv, pat) <- tyConTyVars fam_tc `zip` pats-                   , Just cls_ty <- [lookupVarEnv inst_env fam_tc_tv] ]-       ; traceTc "addConsistencyConstraints" (ppr eqs)-       ; emitDerivedEqs AssocFamPatOrigin eqs }-    -- Improve inference-    -- Any mis-match is reports by checkConsistentFamInst-  | otherwise-  = return ()--{- Note [Constraints in patterns]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-NB: This isn't the whole story. See comment in tcFamTyPats.--At first glance, it seems there is a complicated story to tell in tcFamTyPats-around constraint solving. After all, type family patterns can now do-GADT pattern-matching, which is jolly complicated. But, there's a key fact-which makes this all simple: everything is at top level! There cannot-be untouchable type variables. There can't be weird interaction between-case branches. There can't be global skolems.--This means that the semantics of type-level GADT matching is a little-different than term level. If we have--  data G a where-    MkGBool :: G Bool--And then--  type family F (a :: G k) :: k-  type instance F MkGBool = True--we get--  axF : F Bool (MkGBool <Bool>) ~ True--Simple! No casting on the RHS, because we can affect the kind parameter-to F.--If we ever introduce local type families, this all gets a lot more-complicated, and will end up looking awfully like term-level GADT-pattern-matching.---** The new story **--Here is really what we want:--The matcher really can't deal with covars in arbitrary spots in coercions.-But it can deal with covars that are arguments to GADT data constructors.-So we somehow want to allow covars only in precisely those spots, then use-them as givens when checking the RHS. TODO (RAE): Implement plan.---Note [Quantifying over family patterns]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We need to quantify over two different lots of kind variables:--First, the ones that come from the kinds of the tyvar args of-tcTyVarBndrsKindGen, as usual-  data family Dist a--  -- Proxy :: forall k. k -> *-  data instance Dist (Proxy a) = DP-  -- Generates  data DistProxy = DP-  --            ax8 k (a::k) :: Dist * (Proxy k a) ~ DistProxy k a-  -- The 'k' comes from the tcTyVarBndrsKindGen (a::k)--Second, the ones that come from the kind argument of the type family-which we pick up using the (tyCoVarsOfTypes typats) in the result of-the thing_inside of tcHsTyvarBndrsGen.-  -- Any :: forall k. k-  data instance Dist Any = DA-  -- Generates  data DistAny k = DA-  --            ax7 k :: Dist k (Any k) ~ DistAny k-  -- The 'k' comes from kindGeneralizeKinds (Any k)--Note [Quantified kind variables of a family pattern]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider   type family KindFam (p :: k1) (q :: k1)-           data T :: Maybe k1 -> k2 -> *-           type instance KindFam (a :: Maybe k) b = T a b -> Int-The HsBSig for the family patterns will be ([k], [a])--Then in the family instance we want to-  * Bring into scope [ "k" -> k:*, "a" -> a:k ]-  * Kind-check the RHS-  * Quantify the type instance over k and k', as well as a,b, thus-       type instance [k, k', a:Maybe k, b:k']-                     KindFam (Maybe k) k' a b = T k k' a b -> Int--Notice that in the third step we quantify over all the visibly-mentioned-type variables (a,b), but also over the implicitly mentioned kind variables-(k, k').  In this case one is bound explicitly but often there will be-none. The role of the kind signature (a :: Maybe k) is to add a constraint-that 'a' must have that kind, and to bring 'k' into scope.----************************************************************************-*                                                                      *-               Data types-*                                                                      *-************************************************************************--}--dataDeclChecks :: Name -> NewOrData-               -> LHsContext GhcRn -> [LConDecl GhcRn]-               -> TcM Bool-dataDeclChecks tc_name new_or_data (L _ stupid_theta) cons-  = do {   -- Check that we don't use GADT syntax in H98 world-         gadtSyntax_ok <- xoptM LangExt.GADTSyntax-       ; let gadt_syntax = consUseGadtSyntax cons-       ; checkTc (gadtSyntax_ok || not gadt_syntax) (badGadtDecl tc_name)--           -- Check that the stupid theta is empty for a GADT-style declaration-       ; checkTc (null stupid_theta || not gadt_syntax) (badStupidTheta tc_name)--         -- Check that a newtype has exactly one constructor-         -- Do this before checking for empty data decls, so that-         -- we don't suggest -XEmptyDataDecls for newtypes-       ; checkTc (new_or_data == DataType || isSingleton cons)-                (newtypeConError tc_name (length cons))--         -- Check that there's at least one condecl,-         -- or else we're reading an hs-boot file, or -XEmptyDataDecls-       ; empty_data_decls <- xoptM LangExt.EmptyDataDecls-       ; is_boot <- tcIsHsBootOrSig  -- Are we compiling an hs-boot file?-       ; checkTc (not (null cons) || empty_data_decls || is_boot)-                 (emptyConDeclsErr tc_name)-       ; return gadt_syntax }---------------------------------------consUseGadtSyntax :: [LConDecl a] -> Bool-consUseGadtSyntax ((dL->L _ (ConDeclGADT {})) : _) = True-consUseGadtSyntax _                                = False-                 -- All constructors have same shape--------------------------------------tcConDecls :: KnotTied TyCon -> [KnotTied TyConBinder] -> KnotTied Type-           -> [LConDecl GhcRn] -> TcM [DataCon]-  -- Why both the tycon tyvars and binders? Because the tyvars-  -- have all the names and the binders have the visibilities.-tcConDecls rep_tycon tmpl_bndrs res_tmpl-  = concatMapM $ addLocM $-    tcConDecl rep_tycon (mkTyConTagMap rep_tycon) tmpl_bndrs res_tmpl-    -- It's important that we pay for tag allocation here, once per TyCon,-    -- See Note [Constructor tag allocation], fixes #14657--tcConDecl :: KnotTied TyCon          -- Representation tycon. Knot-tied!-          -> NameEnv ConTag-          -> [KnotTied TyConBinder] -> KnotTied Type-                 -- Return type template (with its template tyvars)-                 --    (tvs, T tys), where T is the family TyCon-          -> ConDecl GhcRn-          -> TcM [DataCon]--tcConDecl rep_tycon tag_map tmpl_bndrs res_tmpl-          (ConDeclH98 { con_name = name-                      , con_ex_tvs = explicit_tkv_nms-                      , con_mb_cxt = hs_ctxt-                      , con_args = hs_args })-  = addErrCtxt (dataConCtxtName [name]) $-    do { -- NB: the tyvars from the declaration header are in scope--         -- Get hold of the existential type variables-         -- e.g. data T a = forall k (b::k) f. MkT a (f b)-         -- Here tmpl_bndrs = {a}-         --      hs_qvars = HsQTvs { hsq_implicit = {k}-         --                        , hsq_explicit = {f,b} }--       ; traceTc "tcConDecl 1" (vcat [ ppr name, ppr explicit_tkv_nms ])--       ; (exp_tvs, (ctxt, arg_tys, field_lbls, stricts))-           <- pushTcLevelM_                             $-              solveEqualities                           $-              bindExplicitTKBndrs_Skol explicit_tkv_nms $-              do { ctxt <- tcHsMbContext hs_ctxt-                 ; btys <- tcConArgs hs_args-                 ; field_lbls <- lookupConstructorFields (unLoc name)-                 ; let (arg_tys, stricts) = unzip btys-                 ; return (ctxt, arg_tys, field_lbls, stricts)-                 }--         -- exp_tvs have explicit, user-written binding sites-         -- the kvs below are those kind variables entirely unmentioned by the user-         --   and discovered only by generalization--       ; kvs <- kindGeneralize (mkSpecForAllTys (binderVars tmpl_bndrs) $-                                mkSpecForAllTys exp_tvs $-                                mkFunTys ctxt $-                                mkFunTys arg_tys $-                                unitTy)-                 -- That type is a lie, of course. (It shouldn't end in ()!)-                 -- And we could construct a proper result type from the info-                 -- at hand. But the result would mention only the tmpl_tvs,-                 -- and so it just creates more work to do it right. Really,-                 -- we're only doing this to find the right kind variables to-                 -- quantify over, and this type is fine for that purpose.--             -- Zonk to Types-       ; (ze, qkvs)      <- zonkTyBndrs kvs-       ; (ze, user_qtvs) <- zonkTyBndrsX ze exp_tvs-       ; arg_tys         <- zonkTcTypesToTypesX ze arg_tys-       ; ctxt            <- zonkTcTypesToTypesX ze ctxt--       ; fam_envs <- tcGetFamInstEnvs--       -- Can't print univ_tvs, arg_tys etc, because we are inside the knot here-       ; traceTc "tcConDecl 2" (ppr name $$ ppr field_lbls)-       ; let-           univ_tvbs = tyConTyVarBinders tmpl_bndrs-           univ_tvs  = binderVars univ_tvbs-           ex_tvbs   = mkTyVarBinders Inferred qkvs ++-                       mkTyVarBinders Specified user_qtvs-           ex_tvs    = qkvs ++ user_qtvs-           -- For H98 datatypes, the user-written tyvar binders are precisely-           -- the universals followed by the existentials.-           -- See Note [DataCon user type variable binders] in DataCon.-           user_tvbs = univ_tvbs ++ ex_tvbs-           buildOneDataCon (dL->L _ name) = do-             { is_infix <- tcConIsInfixH98 name hs_args-             ; rep_nm   <- newTyConRepName name--             ; buildDataCon fam_envs name is_infix rep_nm-                            stricts Nothing field_lbls-                            univ_tvs ex_tvs user_tvbs-                            [{- no eq_preds -}] ctxt arg_tys-                            res_tmpl rep_tycon tag_map-                  -- NB:  we put data_tc, the type constructor gotten from the-                  --      constructor type signature into the data constructor;-                  --      that way checkValidDataCon can complain if it's wrong.-             }-       ; traceTc "tcConDecl 2" (ppr name)-       ; mapM buildOneDataCon [name]-       }--tcConDecl rep_tycon tag_map tmpl_bndrs res_tmpl-          (ConDeclGADT { con_names = names-                       , con_qvars = qtvs-                       , con_mb_cxt = cxt, con_args = hs_args-                       , con_res_ty = hs_res_ty })-  | HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = implicit_tkv_nms }-           , hsq_explicit = explicit_tkv_nms } <- qtvs-  = addErrCtxt (dataConCtxtName names) $-    do { traceTc "tcConDecl 1 gadt" (ppr names)-       ; let ((dL->L _ name) : _) = names--       ; (imp_tvs, (exp_tvs, (ctxt, arg_tys, res_ty, field_lbls, stricts)))-           <- pushTcLevelM_    $  -- We are going to generalise-              solveEqualities  $  -- We won't get another crack, and we don't-                                  -- want an error cascade-              bindImplicitTKBndrs_Skol implicit_tkv_nms $-              bindExplicitTKBndrs_Skol explicit_tkv_nms $-              do { ctxt <- tcHsMbContext cxt-                 ; btys <- tcConArgs hs_args-                 ; res_ty <- tcHsLiftedType hs_res_ty-                 ; field_lbls <- lookupConstructorFields name-                 ; let (arg_tys, stricts) = unzip btys-                 ; return (ctxt, arg_tys, res_ty, field_lbls, stricts)-                 }-       ; imp_tvs <- zonkAndScopedSort imp_tvs-       ; let user_tvs = imp_tvs ++ exp_tvs--       ; tkvs <- kindGeneralize (mkSpecForAllTys user_tvs $-                                 mkFunTys ctxt $-                                 mkFunTys arg_tys $-                                 res_ty)--             -- Zonk to Types-       ; (ze, tkvs)     <- zonkTyBndrs tkvs-       ; (ze, user_tvs) <- zonkTyBndrsX ze user_tvs-       ; arg_tys <- zonkTcTypesToTypesX ze arg_tys-       ; ctxt    <- zonkTcTypesToTypesX ze ctxt-       ; res_ty  <- zonkTcTypeToTypeX   ze res_ty--       ; let (univ_tvs, ex_tvs, tkvs', user_tvs', eq_preds, arg_subst)-               = rejigConRes tmpl_bndrs res_tmpl tkvs user_tvs res_ty-             -- NB: this is a /lazy/ binding, so we pass six thunks to-             --     buildDataCon without yet forcing the guards in rejigConRes-             -- See Note [Checking GADT return types]--             -- Compute the user-written tyvar binders. These have the same-             -- tyvars as univ_tvs/ex_tvs, but perhaps in a different order.-             -- See Note [DataCon user type variable binders] in DataCon.-             tkv_bndrs      = mkTyVarBinders Inferred  tkvs'-             user_tv_bndrs  = mkTyVarBinders Specified user_tvs'-             all_user_bndrs = tkv_bndrs ++ user_tv_bndrs--             ctxt'      = substTys arg_subst ctxt-             arg_tys'   = substTys arg_subst arg_tys-             res_ty'    = substTy  arg_subst res_ty---       ; fam_envs <- tcGetFamInstEnvs--       -- Can't print univ_tvs, arg_tys etc, because we are inside the knot here-       ; traceTc "tcConDecl 2" (ppr names $$ ppr field_lbls)-       ; let-           buildOneDataCon (dL->L _ name) = do-             { is_infix <- tcConIsInfixGADT name hs_args-             ; rep_nm   <- newTyConRepName name--             ; buildDataCon fam_envs name is_infix-                            rep_nm-                            stricts Nothing field_lbls-                            univ_tvs ex_tvs all_user_bndrs eq_preds-                            ctxt' arg_tys' res_ty' rep_tycon tag_map-                  -- NB:  we put data_tc, the type constructor gotten from the-                  --      constructor type signature into the data constructor;-                  --      that way checkValidDataCon can complain if it's wrong.-             }-       ; traceTc "tcConDecl 2" (ppr names)-       ; mapM buildOneDataCon names-       }-tcConDecl _ _ _ _ (ConDeclGADT _ _ _ (XLHsQTyVars _) _ _ _ _)-  = panic "tcConDecl"-tcConDecl _ _ _ _ (XConDecl _) = panic "tcConDecl"--tcConIsInfixH98 :: Name-             -> HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn])-             -> TcM Bool-tcConIsInfixH98 _   details-  = case details of-           InfixCon {}  -> return True-           _            -> return False--tcConIsInfixGADT :: Name-             -> HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn])-             -> TcM Bool-tcConIsInfixGADT con details-  = case details of-           InfixCon {}  -> return True-           RecCon {}    -> return False-           PrefixCon arg_tys           -- See Note [Infix GADT constructors]-               | isSymOcc (getOccName con)-               , [_ty1,_ty2] <- arg_tys-                  -> do { fix_env <- getFixityEnv-                        ; return (con `elemNameEnv` fix_env) }-               | otherwise -> return False--tcConArgs :: HsConDeclDetails GhcRn-          -> TcM [(TcType, HsSrcBang)]-tcConArgs (PrefixCon btys)-  = mapM tcConArg btys-tcConArgs (InfixCon bty1 bty2)-  = do { bty1' <- tcConArg bty1-       ; bty2' <- tcConArg bty2-       ; return [bty1', bty2'] }-tcConArgs (RecCon fields)-  = mapM tcConArg btys-  where-    -- We need a one-to-one mapping from field_names to btys-    combined = map (\(dL->L _ f) -> (cd_fld_names f,cd_fld_type f))-                   (unLoc fields)-    explode (ns,ty) = zip ns (repeat ty)-    exploded = concatMap explode combined-    (_,btys) = unzip exploded---tcConArg :: LHsType GhcRn -> TcM (TcType, HsSrcBang)-tcConArg bty-  = do  { traceTc "tcConArg 1" (ppr bty)-        ; arg_ty <- tcHsOpenType (getBangType bty)-             -- Newtypes can't have unboxed types, but we check-             -- that in checkValidDataCon; this tcConArg stuff-             -- doesn't happen for GADT-style declarations-        ; traceTc "tcConArg 2" (ppr bty)-        ; return (arg_ty, getBangStrictness bty) }--{--Note [Infix GADT constructors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We do not currently have syntax to declare an infix constructor in GADT syntax,-but it makes a (small) difference to the Show instance.  So as a slightly-ad-hoc solution, we regard a GADT data constructor as infix if-  a) it is an operator symbol-  b) it has two arguments-  c) there is a fixity declaration for it-For example:-   infix 6 (:--:)-   data T a where-     (:--:) :: t1 -> t2 -> T Int---Note [Checking GADT return types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There is a delicacy around checking the return types of a datacon. The-central problem is dealing with a declaration like--  data T a where-    MkT :: T a -> Q a--Note that the return type of MkT is totally bogus. When creating the T-tycon, we also need to create the MkT datacon, which must have a "rejigged"-return type. That is, the MkT datacon's type must be transformed to have-a uniform return type with explicit coercions for GADT-like type parameters.-This rejigging is what rejigConRes does. The problem is, though, that checking-that the return type is appropriate is much easier when done over *Type*,-not *HsType*, and doing a call to tcMatchTy will loop because T isn't fully-defined yet.--So, we want to make rejigConRes lazy and then check the validity of-the return type in checkValidDataCon.  To do this we /always/ return a-6-tuple from rejigConRes (so that we can compute the return type from it, which-checkValidDataCon needs), but the first three fields may be bogus if-the return type isn't valid (the last equation for rejigConRes).--This is better than an earlier solution which reduced the number of-errors reported in one pass.  See Trac #7175, and #10836.--}---- Example---   data instance T (b,c) where---      TI :: forall e. e -> T (e,e)------ The representation tycon looks like this:---   data :R7T b c where---      TI :: forall b1 c1. (b1 ~ c1) => b1 -> :R7T b1 c1--- In this case orig_res_ty = T (e,e)--rejigConRes :: [KnotTied TyConBinder] -> KnotTied Type    -- Template for result type; e.g.-                                  -- data instance T [a] b c ...-                                  --      gives template ([a,b,c], T [a] b c)-                                  -- Type must be of kind *!-            -> [TyVar]            -- The constructor's inferred type variables-            -> [TyVar]            -- The constructor's user-written, specified-                                  -- type variables-            -> KnotTied Type      -- res_ty type must be of kind *-            -> ([TyVar],          -- Universal-                [TyVar],          -- Existential (distinct OccNames from univs)-                [TyVar],          -- The constructor's rejigged, user-written,-                                  -- inferred type variables-                [TyVar],          -- The constructor's rejigged, user-written,-                                  -- specified type variables-                [EqSpec],      -- Equality predicates-                TCvSubst)      -- Substitution to apply to argument types-        -- We don't check that the TyCon given in the ResTy is-        -- the same as the parent tycon, because checkValidDataCon will do it--- NB: All arguments may potentially be knot-tied-rejigConRes tmpl_bndrs res_tmpl dc_inferred_tvs dc_specified_tvs res_ty-        -- E.g.  data T [a] b c where-        --         MkT :: forall x y z. T [(x,y)] z z-        -- The {a,b,c} are the tmpl_tvs, and the {x,y,z} are the dc_tvs-        --     (NB: unlike the H98 case, the dc_tvs are not all existential)-        -- Then we generate-        --      Univ tyvars     Eq-spec-        --          a              a~(x,y)-        --          b              b~z-        --          z-        -- Existentials are the leftover type vars: [x,y]-        -- The user-written type variables are what is listed in the forall:-        --   [x, y, z] (all specified). We must rejig these as well.-        --   See Note [DataCon user type variable binders] in DataCon.-        -- So we return ( [a,b,z], [x,y]-        --              , [], [x,y,z]-        --              , [a~(x,y),b~z], <arg-subst> )-  | Just subst <- ASSERT( isLiftedTypeKind (tcTypeKind res_ty) )-                  ASSERT( isLiftedTypeKind (tcTypeKind res_tmpl) )-                  tcMatchTy res_tmpl res_ty-  = let (univ_tvs, raw_eqs, kind_subst) = mkGADTVars tmpl_tvs dc_tvs subst-        raw_ex_tvs = dc_tvs `minusList` univ_tvs-        (arg_subst, substed_ex_tvs) = substTyVarBndrs kind_subst raw_ex_tvs--        -- After rejigging the existential tyvars, the resulting substitution-        -- gives us exactly what we need to rejig the user-written tyvars,-        -- since the dcUserTyVarBinders invariant guarantees that the-        -- substitution has *all* the tyvars in its domain.-        -- See Note [DataCon user type variable binders] in DataCon.-        subst_user_tvs = map (getTyVar "rejigConRes" . substTyVar arg_subst)-        substed_inferred_tvs  = subst_user_tvs dc_inferred_tvs-        substed_specified_tvs = subst_user_tvs dc_specified_tvs--        substed_eqs = map (substEqSpec arg_subst) raw_eqs-    in-    (univ_tvs, substed_ex_tvs, substed_inferred_tvs, substed_specified_tvs,-     substed_eqs, arg_subst)--  | otherwise-        -- If the return type of the data constructor doesn't match the parent-        -- type constructor, or the arity is wrong, the tcMatchTy will fail-        --    e.g   data T a b where-        --            T1 :: Maybe a   -- Wrong tycon-        --            T2 :: T [a]     -- Wrong arity-        -- We are detect that later, in checkValidDataCon, but meanwhile-        -- we must do *something*, not just crash.  So we do something simple-        -- albeit bogus, relying on checkValidDataCon to check the-        --  bad-result-type error before seeing that the other fields look odd-        -- See Note [Checking GADT return types]-  = (tmpl_tvs, dc_tvs `minusList` tmpl_tvs, dc_inferred_tvs, dc_specified_tvs,-     [], emptyTCvSubst)-  where-    dc_tvs   = dc_inferred_tvs ++ dc_specified_tvs-    tmpl_tvs = binderVars tmpl_bndrs--{- Note [mkGADTVars]-~~~~~~~~~~~~~~~~~~~~-Running example:--data T (k1 :: *) (k2 :: *) (a :: k2) (b :: k2) where-  MkT :: forall (x1 : *) (y :: x1) (z :: *).-         T x1 * (Proxy (y :: x1), z) z--We need the rejigged type to be--  MkT :: forall (x1 :: *) (k2 :: *) (a :: k2) (b :: k2).-         forall (y :: x1) (z :: *).-         (k2 ~ *, a ~ (Proxy x1 y, z), b ~ z)-      => T x1 k2 a b--You might naively expect that z should become a universal tyvar,-not an existential. (After all, x1 becomes a universal tyvar.)-But z has kind * while b has kind k2, so the return type-   T x1 k2 a z-is ill-kinded.  Another way to say it is this: the universal-tyvars must have exactly the same kinds as the tyConTyVars.--So we need an existential tyvar and a heterogeneous equality-constraint. (The b ~ z is a bit redundant with the k2 ~ * that-comes before in that b ~ z implies k2 ~ *. I'm sure we could do-some analysis that could eliminate k2 ~ *. But we don't do this-yet.)--The data con signature has already been fully kind-checked.-The return type--  T x1 * (Proxy (y :: x1), z) z-becomes-  qtkvs    = [x1 :: *, y :: x1, z :: *]-  res_tmpl = T x1 * (Proxy x1 y, z) z--We start off by matching (T k1 k2 a b) with (T x1 * (Proxy x1 y, z) z). We-know this match will succeed because of the validity check (actually done-later, but laziness saves us -- see Note [Checking GADT return types]).-Thus, we get--  subst := { k1 |-> x1, k2 |-> *, a |-> (Proxy x1 y, z), b |-> z }--Now, we need to figure out what the GADT equalities should be. In this case,-we *don't* want (k1 ~ x1) to be a GADT equality: it should just be a-renaming. The others should be GADT equalities. We also need to make-sure that the universally-quantified variables of the datacon match up-with the tyvars of the tycon, as required for Core context well-formedness.-(This last bit is why we have to rejig at all!)--`choose` walks down the tycon tyvars, figuring out what to do with each one.-It carries two substitutions:-  - t_sub's domain is *template* or *tycon* tyvars, mapping them to variables-    mentioned in the datacon signature.-  - r_sub's domain is *result* tyvars, names written by the programmer in-    the datacon signature. The final rejigged type will use these names, but-    the subst is still needed because sometimes the printed name of these variables-    is different. (See choose_tv_name, below.)--Before explaining the details of `choose`, let's just look at its operation-on our example:--  choose [] [] {} {} [k1, k2, a, b]-  -->          -- first branch of `case` statement-  choose-    univs:    [x1 :: *]-    eq_spec:  []-    t_sub:    {k1 |-> x1}-    r_sub:    {x1 |-> x1}-    t_tvs:    [k2, a, b]-  -->          -- second branch of `case` statement-  choose-    univs:    [k2 :: *, x1 :: *]-    eq_spec:  [k2 ~ *]-    t_sub:    {k1 |-> x1, k2 |-> k2}-    r_sub:    {x1 |-> x1}-    t_tvs:    [a, b]-  -->          -- second branch of `case` statement-  choose-    univs:    [a :: k2, k2 :: *, x1 :: *]-    eq_spec:  [ a ~ (Proxy x1 y, z)-              , k2 ~ * ]-    t_sub:    {k1 |-> x1, k2 |-> k2, a |-> a}-    r_sub:    {x1 |-> x1}-    t_tvs:    [b]-  -->          -- second branch of `case` statement-  choose-    univs:    [b :: k2, a :: k2, k2 :: *, x1 :: *]-    eq_spec:  [ b ~ z-              , a ~ (Proxy x1 y, z)-              , k2 ~ * ]-    t_sub:    {k1 |-> x1, k2 |-> k2, a |-> a, b |-> z}-    r_sub:    {x1 |-> x1}-    t_tvs:    []-  -->          -- end of recursion-  ( [x1 :: *, k2 :: *, a :: k2, b :: k2]-  , [k2 ~ *, a ~ (Proxy x1 y, z), b ~ z]-  , {x1 |-> x1} )--`choose` looks up each tycon tyvar in the matching (it *must* be matched!).--* If it finds a bare result tyvar (the first branch of the `case`-  statement), it checks to make sure that the result tyvar isn't yet-  in the list of univ_tvs.  If it is in that list, then we have a-  repeated variable in the return type, and we in fact need a GADT-  equality.--* It then checks to make sure that the kind of the result tyvar-  matches the kind of the template tyvar. This check is what forces-  `z` to be existential, as it should be, explained above.--* Assuming no repeated variables or kind-changing, we wish to use the-  variable name given in the datacon signature (that is, `x1` not-  `k1`), not the tycon signature (which may have been made up by-  GHC). So, we add a mapping from the tycon tyvar to the result tyvar-  to t_sub.--* If we discover that a mapping in `subst` gives us a non-tyvar (the-  second branch of the `case` statement), then we have a GADT equality-  to create.  We create a fresh equality, but we don't extend any-  substitutions. The template variable substitution is meant for use-  in universal tyvar kinds, and these shouldn't be affected by any-  GADT equalities.--This whole algorithm is quite delicate, indeed. I (Richard E.) see two ways-of simplifying it:--1) The first branch of the `case` statement is really an optimization, used-in order to get fewer GADT equalities. It might be possible to make a GADT-equality for *every* univ. tyvar, even if the equality is trivial, and then-either deal with the bigger type or somehow reduce it later.--2) This algorithm strives to use the names for type variables as specified-by the user in the datacon signature. If we always used the tycon tyvar-names, for example, this would be simplified. This change would almost-certainly degrade error messages a bit, though.--}---- ^ From information about a source datacon definition, extract out--- what the universal variables and the GADT equalities should be.--- See Note [mkGADTVars].-mkGADTVars :: [TyVar]    -- ^ The tycon vars-           -> [TyVar]    -- ^ The datacon vars-           -> TCvSubst   -- ^ The matching between the template result type-                         -- and the actual result type-           -> ( [TyVar]-              , [EqSpec]-              , TCvSubst ) -- ^ The univ. variables, the GADT equalities,-                           -- and a subst to apply to the GADT equalities-                           -- and existentials.-mkGADTVars tmpl_tvs dc_tvs subst-  = choose [] [] empty_subst empty_subst tmpl_tvs-  where-    in_scope = mkInScopeSet (mkVarSet tmpl_tvs `unionVarSet` mkVarSet dc_tvs)-               `unionInScope` getTCvInScope subst-    empty_subst = mkEmptyTCvSubst in_scope--    choose :: [TyVar]           -- accumulator of univ tvs, reversed-           -> [EqSpec]          -- accumulator of GADT equalities, reversed-           -> TCvSubst          -- template substitution-           -> TCvSubst          -- res. substitution-           -> [TyVar]           -- template tvs (the univ tvs passed in)-           -> ( [TyVar]         -- the univ_tvs-              , [EqSpec]        -- GADT equalities-              , TCvSubst )       -- a substitution to fix kinds in ex_tvs--    choose univs eqs _t_sub r_sub []-      = (reverse univs, reverse eqs, r_sub)-    choose univs eqs t_sub r_sub (t_tv:t_tvs)-      | Just r_ty <- lookupTyVar subst t_tv-      = case getTyVar_maybe r_ty of-          Just r_tv-            |  not (r_tv `elem` univs)-            ,  tyVarKind r_tv `eqType` (substTy t_sub (tyVarKind t_tv))-            -> -- simple, well-kinded variable substitution.-               choose (r_tv:univs) eqs-                      (extendTvSubst t_sub t_tv r_ty')-                      (extendTvSubst r_sub r_tv r_ty')-                      t_tvs-            where-              r_tv1  = setTyVarName r_tv (choose_tv_name r_tv t_tv)-              r_ty'  = mkTyVarTy r_tv1--               -- Not a simple substitution: make an equality predicate-          _ -> choose (t_tv':univs) (mkEqSpec t_tv' r_ty : eqs)-                      (extendTvSubst t_sub t_tv (mkTyVarTy t_tv'))-                         -- We've updated the kind of t_tv,-                         -- so add it to t_sub (Trac #14162)-                      r_sub t_tvs-            where-              t_tv' = updateTyVarKind (substTy t_sub) t_tv--      | otherwise-      = pprPanic "mkGADTVars" (ppr tmpl_tvs $$ ppr subst)--      -- choose an appropriate name for a univ tyvar.-      -- This *must* preserve the Unique of the result tv, so that we-      -- can detect repeated variables. It prefers user-specified names-      -- over system names. A result variable with a system name can-      -- happen with GHC-generated implicit kind variables.-    choose_tv_name :: TyVar -> TyVar -> Name-    choose_tv_name r_tv t_tv-      | isSystemName r_tv_name-      = setNameUnique t_tv_name (getUnique r_tv_name)--      | otherwise-      = r_tv_name--      where-        r_tv_name = getName r_tv-        t_tv_name = getName t_tv--{--Note [Substitution in template variables kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--data G (a :: Maybe k) where-  MkG :: G Nothing--With explicit kind variables--data G k (a :: Maybe k) where-  MkG :: G k1 (Nothing k1)--Note how k1 is distinct from k. So, when we match the template-`G k a` against `G k1 (Nothing k1)`, we get a subst-[ k |-> k1, a |-> Nothing k1 ]. Even though this subst has two-mappings, we surely don't want to add (k, k1) to the list of-GADT equalities -- that would be overly complex and would create-more untouchable variables than we need. So, when figuring out-which tyvars are GADT-like and which aren't (the fundamental-job of `choose`), we want to treat `k` as *not* GADT-like.-Instead, we wish to substitute in `a`'s kind, to get (a :: Maybe k1)-instead of (a :: Maybe k). This is the reason for dealing-with a substitution in here.--However, we do not *always* want to substitute. Consider--data H (a :: k) where-  MkH :: H Int--With explicit kind variables:--data H k (a :: k) where-  MkH :: H * Int--Here, we have a kind-indexed GADT. The subst in question is-[ k |-> *, a |-> Int ]. Now, we *don't* want to substitute in `a`'s-kind, because that would give a constructor with the type--MkH :: forall (k :: *) (a :: *). (k ~ *) -> (a ~ Int) -> H k a--The problem here is that a's kind is wrong -- it needs to be k, not *!-So, if the matching for a variable is anything but another bare variable,-we drop the mapping from the substitution before proceeding. This-was not an issue before kind-indexed GADTs because this case could-never happen.--************************************************************************-*                                                                      *-                Validity checking-*                                                                      *-************************************************************************--Validity checking is done once the mutually-recursive knot has been-tied, so we can look at things freely.--}--checkValidTyCl :: TyCon -> TcM [TyCon]--- The returned list is either a singleton (if valid)--- or a list of "fake tycons" (if not); the fake tycons--- include any implicits, like promoted data constructors--- See Note [Recover from validity error]-checkValidTyCl tc-  = setSrcSpan (getSrcSpan tc) $-    addTyConCtxt tc $-    recoverM recovery_code-             (do { traceTc "Starting validity for tycon" (ppr tc)-                 ; checkValidTyCon tc-                 ; traceTc "Done validity for tycon" (ppr tc)-                 ; return [tc] })-  where-    recovery_code -- See Note [Recover from validity error]-      = do { traceTc "Aborted validity for tycon" (ppr tc)-           ; return (concatMap mk_fake_tc $-                     ATyCon tc : implicitTyConThings tc) }--    mk_fake_tc (ATyCon tc)-      | isClassTyCon tc = [tc]   -- Ugh! Note [Recover from validity error]-      | otherwise       = [makeRecoveryTyCon tc]-    mk_fake_tc (AConLike (RealDataCon dc))-                        = [makeRecoveryTyCon (promoteDataCon dc)]-    mk_fake_tc _        = []--{- Note [Recover from validity error]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We recover from a validity error in a type or class, which allows us-to report multiple validity errors. In the failure case we return a-TyCon of the right kind, but with no interesting behaviour-(makeRecoveryTyCon). Why?  Suppose we have-   type T a = Fun-where Fun is a type family of arity 1.  The RHS is invalid, but we-want to go on checking validity of subsequent type declarations.-So we replace T with an abstract TyCon which will do no harm.-See indexed-types/should_fail/BadSock and Trac #10896--Some notes:--* We must make fakes for promoted DataCons too. Consider (Trac #15215)-      data T a = MkT ...-      data S a = ...T...MkT....-  If there is an error in the definition of 'T' we add a "fake type-  constructor" to the type environment, so that we can continue to-  typecheck 'S'.  But we /were not/ adding a fake anything for 'MkT'-  and so there was an internal error when we met 'MkT' in the body of-  'S'.--* Painfully, we *don't* want to do this for classes.-  Consider tcfail041:-     class (?x::Int) => C a where ...-     instance C Int-  The class is invalid because of the superclass constraint.  But-  we still want it to look like a /class/, else the instance bleats-  that the instance is mal-formed because it hasn't got a class in-  the head.--  This is really bogus; now we have in scope a Class that is invalid-  in some way, with unknown downstream consequences.  A better-  alterantive might be to make a fake class TyCon.  A job for another day.--}------------------------------ For data types declared with record syntax, we require--- that each constructor that has a field 'f'---      (a) has the same result type---      (b) has the same type for 'f'--- module alpha conversion of the quantified type variables--- of the constructor.------ Note that we allow existentials to match because the--- fields can never meet. E.g---      data T where---        T1 { f1 :: b, f2 :: a, f3 ::Int } :: T---        T2 { f1 :: c, f2 :: c, f3 ::Int } :: T--- Here we do not complain about f1,f2 because they are existential--checkValidTyCon :: TyCon -> TcM ()-checkValidTyCon tc-  | isPrimTyCon tc   -- Happens when Haddock'ing GHC.Prim-  = return ()--  | otherwise-  = do { traceTc "checkValidTyCon" (ppr tc $$ ppr (tyConClass_maybe tc))-       ; if | Just cl <- tyConClass_maybe tc-              -> checkValidClass cl--            | Just syn_rhs <- synTyConRhs_maybe tc-              -> do { checkValidType syn_ctxt syn_rhs-                    ; checkTySynRhs syn_ctxt syn_rhs }--            | Just fam_flav <- famTyConFlav_maybe tc-              -> case fam_flav of-               { ClosedSynFamilyTyCon (Just ax)-                   -> tcAddClosedTypeFamilyDeclCtxt tc $-                      checkValidCoAxiom ax-               ; ClosedSynFamilyTyCon Nothing   -> return ()-               ; AbstractClosedSynFamilyTyCon ->-                 do { hsBoot <- tcIsHsBootOrSig-                    ; checkTc hsBoot $-                      text "You may define an abstract closed type family" $$-                      text "only in a .hs-boot file" }-               ; DataFamilyTyCon {}           -> return ()-               ; OpenSynFamilyTyCon           -> return ()-               ; BuiltInSynFamTyCon _         -> return () }--             | otherwise -> do-               { -- Check the context on the data decl-                 traceTc "cvtc1" (ppr tc)-               ; checkValidTheta (DataTyCtxt name) (tyConStupidTheta tc)--               ; traceTc "cvtc2" (ppr tc)--               ; dflags          <- getDynFlags-               ; existential_ok  <- xoptM LangExt.ExistentialQuantification-               ; gadt_ok         <- xoptM LangExt.GADTs-               ; let ex_ok = existential_ok || gadt_ok-                     -- Data cons can have existential context-               ; mapM_ (checkValidDataCon dflags ex_ok tc) data_cons-               ; mapM_ (checkPartialRecordField data_cons) (tyConFieldLabels tc)--                -- Check that fields with the same name share a type-               ; mapM_ check_fields groups }}-  where-    syn_ctxt  = TySynCtxt name-    name      = tyConName tc-    data_cons = tyConDataCons tc--    groups = equivClasses cmp_fld (concatMap get_fields data_cons)-    cmp_fld (f1,_) (f2,_) = flLabel f1 `compare` flLabel f2-    get_fields con = dataConFieldLabels con `zip` repeat con-        -- dataConFieldLabels may return the empty list, which is fine--    -- See Note [GADT record selectors] in TcTyDecls-    -- We must check (a) that the named field has the same-    --                   type in each constructor-    --               (b) that those constructors have the same result type-    ---    -- However, the constructors may have differently named type variable-    -- and (worse) we don't know how the correspond to each other.  E.g.-    --     C1 :: forall a b. { f :: a, g :: b } -> T a b-    --     C2 :: forall d c. { f :: c, g :: c } -> T c d-    ---    -- So what we do is to ust Unify.tcMatchTys to compare the first candidate's-    -- result type against other candidates' types BOTH WAYS ROUND.-    -- If they magically agrees, take the substitution and-    -- apply them to the latter ones, and see if they match perfectly.-    check_fields ((label, con1) :| other_fields)-        -- These fields all have the same name, but are from-        -- different constructors in the data type-        = recoverM (return ()) $ mapM_ checkOne other_fields-                -- Check that all the fields in the group have the same type-                -- NB: this check assumes that all the constructors of a given-                -- data type use the same type variables-        where-        (_, _, _, res1) = dataConSig con1-        fty1 = dataConFieldType con1 lbl-        lbl = flLabel label--        checkOne (_, con2)    -- Do it both ways to ensure they are structurally identical-            = do { checkFieldCompat lbl con1 con2 res1 res2 fty1 fty2-                 ; checkFieldCompat lbl con2 con1 res2 res1 fty2 fty1 }-            where-                (_, _, _, res2) = dataConSig con2-                fty2 = dataConFieldType con2 lbl--checkPartialRecordField :: [DataCon] -> FieldLabel -> TcM ()--- Checks the partial record field selector, and warns.--- See Note [Checking partial record field]-checkPartialRecordField all_cons fld-  = setSrcSpan loc $-      warnIfFlag Opt_WarnPartialFields-        (not is_exhaustive && not (startsWithUnderscore occ_name))-        (sep [text "Use of partial record field selector" <> colon,-              nest 2 $ quotes (ppr occ_name)])-  where-    sel_name = flSelector fld-    loc    = getSrcSpan sel_name-    occ_name = getOccName sel_name--    (cons_with_field, cons_without_field) = partition has_field all_cons-    has_field con = fld `elem` (dataConFieldLabels con)-    is_exhaustive = all (dataConCannotMatch inst_tys) cons_without_field--    con1 = ASSERT( not (null cons_with_field) ) head cons_with_field-    (univ_tvs, _, eq_spec, _, _, _) = dataConFullSig con1-    eq_subst = mkTvSubstPrs (map eqSpecPair eq_spec)-    inst_tys = substTyVars eq_subst univ_tvs--checkFieldCompat :: FieldLabelString -> DataCon -> DataCon-                 -> Type -> Type -> Type -> Type -> TcM ()-checkFieldCompat fld con1 con2 res1 res2 fty1 fty2-  = do  { checkTc (isJust mb_subst1) (resultTypeMisMatch fld con1 con2)-        ; checkTc (isJust mb_subst2) (fieldTypeMisMatch fld con1 con2) }-  where-    mb_subst1 = tcMatchTy res1 res2-    mb_subst2 = tcMatchTyX (expectJust "checkFieldCompat" mb_subst1) fty1 fty2----------------------------------checkValidDataCon :: DynFlags -> Bool -> TyCon -> DataCon -> TcM ()-checkValidDataCon dflags existential_ok tc con-  = setSrcSpan (getSrcSpan con)  $-    addErrCtxt (dataConCtxt con) $-    do  { -- Check that the return type of the data constructor-          -- matches the type constructor; eg reject this:-          --   data T a where { MkT :: Bogus a }-          -- It's important to do this first:-          --  see Note [Checking GADT return types]-          --  and c.f. Note [Check role annotations in a second pass]-          let tc_tvs      = tyConTyVars tc-              res_ty_tmpl = mkFamilyTyConApp tc (mkTyVarTys tc_tvs)-              orig_res_ty = dataConOrigResTy con-        ; traceTc "checkValidDataCon" (vcat-              [ ppr con, ppr tc, ppr tc_tvs-              , ppr res_ty_tmpl <+> dcolon <+> ppr (tcTypeKind res_ty_tmpl)-              , ppr orig_res_ty <+> dcolon <+> ppr (tcTypeKind orig_res_ty)])---        ; checkTc (isJust (tcMatchTy res_ty_tmpl-                                     orig_res_ty))-                  (badDataConTyCon con res_ty_tmpl orig_res_ty)-            -- Note that checkTc aborts if it finds an error. This is-            -- critical to avoid panicking when we call dataConUserType-            -- on an un-rejiggable datacon!--        ; traceTc "checkValidDataCon 2" (ppr (dataConUserType con))--          -- Check that the result type is a *monotype*-          --  e.g. reject this:   MkT :: T (forall a. a->a)-          -- Reason: it's really the argument of an equality constraint-        ; checkValidMonoType orig_res_ty--          -- Check all argument types for validity-        ; checkValidType ctxt (dataConUserType con)-        ; mapM_ (checkForLevPoly empty)-                (dataConOrigArgTys con)--          -- Extra checks for newtype data constructors-        ; when (isNewTyCon tc) (checkNewDataCon con)--          -- Check that existentials are allowed if they are used-        ; checkTc (existential_ok || isVanillaDataCon con)-                  (badExistential con)--          -- Check that UNPACK pragmas and bangs work out-          -- E.g.  reject   data T = MkT {-# UNPACK #-} Int     -- No "!"-          --                data T = MkT {-# UNPACK #-} !a      -- Can't unpack-        ; zipWith3M_ check_bang (dataConSrcBangs con) (dataConImplBangs con) [1..]--          -- Check the dcUserTyVarBinders invariant-          -- See Note [DataCon user type variable binders] in DataCon-          -- checked here because we sometimes build invalid DataCons before-          -- erroring above here-        ; when debugIsOn $-          do { let (univs, exs, eq_spec, _, _, _) = dataConFullSig con-                   user_tvs                       = dataConUserTyVars con-                   user_tvbs_invariant-                     =    Set.fromList (filterEqSpec eq_spec univs ++ exs)-                       == Set.fromList user_tvs-             ; WARN( not user_tvbs_invariant-                       , vcat ([ ppr con-                               , ppr univs-                               , ppr exs-                               , ppr eq_spec-                               , ppr user_tvs ])) return () }--        ; traceTc "Done validity of data con" $-          vcat [ ppr con-               , text "Datacon user type:" <+> ppr (dataConUserType con)-               , text "Datacon rep type:" <+> ppr (dataConRepType con)-               , text "Rep typcon binders:" <+> ppr (tyConBinders (dataConTyCon con))-               , case tyConFamInst_maybe (dataConTyCon con) of-                   Nothing -> text "not family"-                   Just (f, _) -> ppr (tyConBinders f) ]-    }-  where-    ctxt = ConArgCtxt (dataConName con)--    check_bang :: HsSrcBang -> HsImplBang -> Int -> TcM ()-    check_bang (HsSrcBang _ _ SrcLazy) _ n-      | not (xopt LangExt.StrictData dflags)-      = addErrTc-          (bad_bang n (text "Lazy annotation (~) without StrictData"))-    check_bang (HsSrcBang _ want_unpack strict_mark) rep_bang n-      | isSrcUnpacked want_unpack, not is_strict-      = addWarnTc NoReason (bad_bang n (text "UNPACK pragma lacks '!'"))-      | isSrcUnpacked want_unpack-      , case rep_bang of { HsUnpack {} -> False; _ -> True }-      -- If not optimising, we don't unpack (rep_bang is never-      -- HsUnpack), so don't complain!  This happens, e.g., in Haddock.-      -- See dataConSrcToImplBang.-      , not (gopt Opt_OmitInterfacePragmas dflags)-      -- When typechecking an indefinite package in Backpack, we-      -- may attempt to UNPACK an abstract type.  The test here will-      -- conclude that this is unusable, but it might become usable-      -- when we actually fill in the abstract type.  As such, don't-      -- warn in this case (it gives users the wrong idea about whether-      -- or not UNPACK on abstract types is supported; it is!)-      , unitIdIsDefinite (thisPackage dflags)-      = addWarnTc NoReason (bad_bang n (text "Ignoring unusable UNPACK pragma"))-      where-        is_strict = case strict_mark of-                      NoSrcStrict -> xopt LangExt.StrictData dflags-                      bang        -> isSrcStrict bang--    check_bang _ _ _-      = return ()--    bad_bang n herald-      = hang herald 2 (text "on the" <+> speakNth n-                       <+> text "argument of" <+> quotes (ppr con))---------------------------------checkNewDataCon :: DataCon -> TcM ()--- Further checks for the data constructor of a newtype-checkNewDataCon con-  = do  { checkTc (isSingleton arg_tys) (newtypeFieldErr con (length arg_tys))-              -- One argument--        ; checkTc (not (isUnliftedType arg_ty1)) $-          text "A newtype cannot have an unlifted argument type"--        ; check_con (null eq_spec) $-          text "A newtype constructor must have a return type of form T a1 ... an"-                -- Return type is (T a b c)--        ; check_con (null theta) $-          text "A newtype constructor cannot have a context in its type"--        ; check_con (null ex_tvs) $-          text "A newtype constructor cannot have existential type variables"-                -- No existentials--        ; checkTc (all ok_bang (dataConSrcBangs con))-                  (newtypeStrictError con)-                -- No strictness annotations-    }-  where-    (_univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res_ty)-      = dataConFullSig con-    check_con what msg-       = checkTc what (msg $$ ppr con <+> dcolon <+> ppr (dataConUserType con))--    (arg_ty1 : _) = arg_tys--    ok_bang (HsSrcBang _ _ SrcStrict) = False-    ok_bang (HsSrcBang _ _ SrcLazy)   = False-    ok_bang _                         = True----------------------------------checkValidClass :: Class -> TcM ()-checkValidClass cls-  = do  { constrained_class_methods <- xoptM LangExt.ConstrainedClassMethods-        ; multi_param_type_classes  <- xoptM LangExt.MultiParamTypeClasses-        ; nullary_type_classes      <- xoptM LangExt.NullaryTypeClasses-        ; fundep_classes            <- xoptM LangExt.FunctionalDependencies-        ; undecidable_super_classes <- xoptM LangExt.UndecidableSuperClasses--        -- Check that the class is unary, unless multiparameter type classes-        -- are enabled; also recognize deprecated nullary type classes-        -- extension (subsumed by multiparameter type classes, Trac #8993)-        ; checkTc (multi_param_type_classes || cls_arity == 1 ||-                    (nullary_type_classes && cls_arity == 0))-                  (classArityErr cls_arity cls)-        ; checkTc (fundep_classes || null fundeps) (classFunDepsErr cls)--        -- Check the super-classes-        ; checkValidTheta (ClassSCCtxt (className cls)) theta--          -- Now check for cyclic superclasses-          -- If there are superclass cycles, checkClassCycleErrs bails.-        ; unless undecidable_super_classes $-          case checkClassCycles cls of-             Just err -> setSrcSpan (getSrcSpan cls) $-                         addErrTc err-             Nothing  -> return ()--        -- Check the class operations.-        -- But only if there have been no earlier errors-        -- See Note [Abort when superclass cycle is detected]-        ; whenNoErrs $-          mapM_ (check_op constrained_class_methods) op_stuff--        -- Check the associated type defaults are well-formed and instantiated-        ; mapM_ check_at at_stuff  }-  where-    (tyvars, fundeps, theta, _, at_stuff, op_stuff) = classExtraBigSig cls-    cls_arity = length (tyConVisibleTyVars (classTyCon cls))-       -- Ignore invisible variables-    cls_tv_set = mkVarSet tyvars--    check_op constrained_class_methods (sel_id, dm)-      = setSrcSpan (getSrcSpan sel_id) $-        addErrCtxt (classOpCtxt sel_id op_ty) $ do-        { traceTc "class op type" (ppr op_ty)-        ; checkValidType ctxt op_ty-                -- This implements the ambiguity check, among other things-                -- Example: tc223-                --   class Error e => Game b mv e | b -> mv e where-                --      newBoard :: MonadState b m => m ()-                -- Here, MonadState has a fundep m->b, so newBoard is fine--           -- a method cannot be levity polymorphic, as we have to store the-           -- method in a dictionary-           -- example of what this prevents:-           --   class BoundedX (a :: TYPE r) where minBound :: a-           -- See Note [Levity polymorphism checking] in DsMonad-        ; checkForLevPoly empty tau1--        ; unless constrained_class_methods $-          mapM_ check_constraint (tail (cls_pred:op_theta))--        ; check_dm ctxt sel_id cls_pred tau2 dm-        }-        where-          ctxt    = FunSigCtxt op_name True -- Report redundant class constraints-          op_name = idName sel_id-          op_ty   = idType sel_id-          (_,cls_pred,tau1) = tcSplitMethodTy op_ty-          -- See Note [Splitting nested sigma types in class type signatures]-          (_,op_theta,tau2) = tcSplitNestedSigmaTys tau1--          check_constraint :: TcPredType -> TcM ()-          check_constraint pred -- See Note [Class method constraints]-            = when (not (isEmptyVarSet pred_tvs) &&-                    pred_tvs `subVarSet` cls_tv_set)-                   (addErrTc (badMethPred sel_id pred))-            where-              pred_tvs = tyCoVarsOfType pred--    check_at (ATI fam_tc m_dflt_rhs)-      = do { checkTc (cls_arity == 0 || any (`elemVarSet` cls_tv_set) fam_tvs)-                     (noClassTyVarErr cls fam_tc)-                        -- Check that the associated type mentions at least-                        -- one of the class type variables-                        -- The check is disabled for nullary type classes,-                        -- since there is no possible ambiguity (Trac #10020)--             -- Check that any default declarations for associated types are valid-           ; whenIsJust m_dflt_rhs $ \ (rhs, loc) ->-             setSrcSpan loc $-             tcAddFamInstCtxt (text "default type instance") (getName fam_tc) $-             checkValidTyFamEqn fam_tc fam_tvs (mkTyVarTys fam_tvs) rhs }-        where-          fam_tvs = tyConTyVars fam_tc--    check_dm :: UserTypeCtxt -> Id -> PredType -> Type -> DefMethInfo -> TcM ()-    -- Check validity of the /top-level/ generic-default type-    -- E.g for   class C a where-    --             default op :: forall b. (a~b) => blah-    -- we do not want to do an ambiguity check on a type with-    -- a free TyVar 'a' (Trac #11608).  See TcType-    -- Note [TyVars and TcTyVars during type checking] in TcType-    -- Hence the mkDefaultMethodType to close the type.-    check_dm ctxt sel_id vanilla_cls_pred vanilla_tau-             (Just (dm_name, dm_spec@(GenericDM dm_ty)))-      = setSrcSpan (getSrcSpan dm_name) $ do-            -- We have carefully set the SrcSpan on the generic-            -- default-method Name to be that of the generic-            -- default type signature--          -- First, we check that that the method's default type signature-          -- aligns with the non-default type signature.-          -- See Note [Default method type signatures must align]-          let cls_pred = mkClassPred cls $ mkTyVarTys $ classTyVars cls-              -- Note that the second field of this tuple contains the context-              -- of the default type signature, making it apparent that we-              -- ignore method contexts completely when validity-checking-              -- default type signatures. See the end of-              -- Note [Default method type signatures must align]-              -- to learn why this is OK.-              ---              -- See also-              -- Note [Splitting nested sigma types in class type signatures]-              -- for an explanation of why we don't use tcSplitSigmaTy here.-              (_, _, dm_tau) = tcSplitNestedSigmaTys dm_ty--              -- Given this class definition:-              ---              --  class C a b where-              --    op         :: forall p q. (Ord a, D p q)-              --               => a -> b -> p -> (a, b)-              --    default op :: forall r s. E r-              --               => a -> b -> s -> (a, b)-              ---              -- We want to match up two types of the form:-              ---              --   Vanilla type sig: C aa bb => aa -> bb -> p -> (aa, bb)-              --   Default type sig: C a  b  => a  -> b  -> s -> (a,  b)-              ---              -- Notice that the two type signatures can be quantified over-              -- different class type variables! Therefore, it's important that-              -- we include the class predicate parts to match up a with aa and-              -- b with bb.-              vanilla_phi_ty = mkPhiTy [vanilla_cls_pred] vanilla_tau-              dm_phi_ty      = mkPhiTy [cls_pred] dm_tau--          traceTc "check_dm" $ vcat-              [ text "vanilla_phi_ty" <+> ppr vanilla_phi_ty-              , text "dm_phi_ty"      <+> ppr dm_phi_ty ]--          -- Actually checking that the types align is done with a call to-          -- tcMatchTys. We need to get a match in both directions to rule-          -- out degenerate cases like these:-          ---          --  class Foo a where-          --    foo1         :: a -> b-          --    default foo1 :: a -> Int-          ---          --    foo2         :: a -> Int-          --    default foo2 :: a -> b-          unless (isJust $ tcMatchTys [dm_phi_ty, vanilla_phi_ty]-                                      [vanilla_phi_ty, dm_phi_ty]) $ addErrTc $-               hang (text "The default type signature for"-                     <+> ppr sel_id <> colon)-                 2 (ppr dm_ty)-            $$ (text "does not match its corresponding"-                <+> text "non-default type signature")--          -- Now do an ambiguity check on the default type signature.-          checkValidType ctxt (mkDefaultMethodType cls sel_id dm_spec)-    check_dm _ _ _ _ _ = return ()--checkFamFlag :: Name -> TcM ()--- Check that we don't use families without -XTypeFamilies--- The parser won't even parse them, but I suppose a GHC API--- client might have a go!-checkFamFlag tc_name-  = do { idx_tys <- xoptM LangExt.TypeFamilies-       ; checkTc idx_tys err_msg }-  where-    err_msg = hang (text "Illegal family declaration for" <+> quotes (ppr tc_name))-                 2 (text "Enable TypeFamilies to allow indexed type families")--{- Note [Class method constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Haskell 2010 is supposed to reject-  class C a where-    op :: Eq a => a -> a-where the method type constrains only the class variable(s).  (The extension--XConstrainedClassMethods switches off this check.)  But regardless-we should not reject-  class C a where-    op :: (?x::Int) => a -> a-as pointed out in Trac #11793. So the test here rejects the program if-  * -XConstrainedClassMethods is off-  * the tyvars of the constraint are non-empty-  * all the tyvars are class tyvars, none are locally quantified--Note [Abort when superclass cycle is detected]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We must avoid doing the ambiguity check for the methods (in-checkValidClass.check_op) when there are already errors accumulated.-This is because one of the errors may be a superclass cycle, and-superclass cycles cause canonicalization to loop. Here is a-representative example:--  class D a => C a where-    meth :: D a => ()-  class C a => D a--This fixes Trac #9415, #9739--Note [Default method type signatures must align]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-GHC enforces the invariant that a class method's default type signature-must "align" with that of the method's non-default type signature, as per-GHC Trac #12918. For instance, if you have:--  class Foo a where-    bar :: forall b. Context => a -> b--Then a default type signature for bar must be alpha equivalent to-(forall b. a -> b). That is, the types must be the same modulo differences in-contexts. So the following would be acceptable default type signatures:--    default bar :: forall b. Context1 => a -> b-    default bar :: forall x. Context2 => a -> x--But the following are NOT acceptable default type signatures:--    default bar :: forall b. b -> a-    default bar :: forall x. x-    default bar :: a -> Int--Note that a is bound by the class declaration for Foo itself, so it is-not allowed to differ in the default type signature.--The default type signature (default bar :: a -> Int) deserves special mention,-since (a -> Int) is a straightforward instantiation of (forall b. a -> b). To-write this, you need to declare the default type signature like so:--    default bar :: forall b. (b ~ Int). a -> b--As noted in #12918, there are several reasons to do this:--1. It would make no sense to have a type that was flat-out incompatible with-   the non-default type signature. For instance, if you had:--     class Foo a where-       bar :: a -> Int-       default bar :: a -> Bool--   Then that would always fail in an instance declaration. So this check-   nips such cases in the bud before they have the chance to produce-   confusing error messages.--2. Internally, GHC uses TypeApplications to instantiate the default method in-   an instance. See Note [Default methods in instances] in TcInstDcls.-   Thus, GHC needs to know exactly what the universally quantified type-   variables are, and when instantiated that way, the default method's type-   must match the expected type.--3. Aesthetically, by only allowing the default type signature to differ in its-   context, we are making it more explicit the ways in which the default type-   signature is less polymorphic than the non-default type signature.--You might be wondering: why are the contexts allowed to be different, but not-the rest of the type signature? That's because default implementations often-rely on assumptions that the more general, non-default type signatures do not.-For instance, in the Enum class declaration:--    class Enum a where-      enum :: [a]-      default enum :: (Generic a, GEnum (Rep a)) => [a]-      enum = map to genum--    class GEnum f where-      genum :: [f a]--The default implementation for enum only works for types that are instances of-Generic, and for which their generic Rep type is an instance of GEnum. But-clearly enum doesn't _have_ to use this implementation, so naturally, the-context for enum is allowed to be different to accomodate this. As a result,-when we validity-check default type signatures, we ignore contexts completely.--Note that when checking whether two type signatures match, we must take care to-split as many foralls as it takes to retrieve the tau types we which to check.-See Note [Splitting nested sigma types in class type signatures].--Note [Splitting nested sigma types in class type signatures]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this type synonym and class definition:--  type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t--  class Each s t a b where-    each         ::                                      Traversal s t a b-    default each :: (Traversable g, s ~ g a, t ~ g b) => Traversal s t a b--It might seem obvious that the tau types in both type signatures for `each`-are the same, but actually getting GHC to conclude this is surprisingly tricky.-That is because in general, the form of a class method's non-default type-signature is:--  forall a. C a => forall d. D d => E a b--And the general form of a default type signature is:--  forall f. F f => E a f -- The variable `a` comes from the class--So it you want to get the tau types in each type signature, you might find it-reasonable to call tcSplitSigmaTy twice on the non-default type signature, and-call it once on the default type signature. For most classes and methods, this-will work, but Each is a bit of an exceptional case. The way `each` is written,-it doesn't quantify any additional type variables besides those of the Each-class itself, so the non-default type signature for `each` is actually this:--  forall s t a b. Each s t a b => Traversal s t a b--Notice that there _appears_ to only be one forall. But there's actually another-forall lurking in the Traversal type synonym, so if you call tcSplitSigmaTy-twice, you'll also go under the forall in Traversal! That is, you'll end up-with:--  (a -> f b) -> s -> f t--A problem arises because you only call tcSplitSigmaTy once on the default type-signature for `each`, which gives you--  Traversal s t a b--Or, equivalently:--  forall f. Applicative f => (a -> f b) -> s -> f t--This is _not_ the same thing as (a -> f b) -> s -> f t! So now tcMatchTy will-say that the tau types for `each` are not equal.--A solution to this problem is to use tcSplitNestedSigmaTys instead of-tcSplitSigmaTy. tcSplitNestedSigmaTys will always split any foralls that it-sees until it can't go any further, so if you called it on the default type-signature for `each`, it would return (a -> f b) -> s -> f t like we desired.--Note [Checking partial record field]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-This check checks the partial record field selector, and warns (Trac #7169).--For example:--  data T a = A { m1 :: a, m2 :: a } | B { m1 :: a }--The function 'm2' is partial record field, and will fail when it is applied to-'B'. The warning identifies such partial fields. The check is performed at the-declaration of T, not at the call-sites of m2.--The warning can be suppressed by prefixing the field-name with an underscore.-For example:--  data T a = A { m1 :: a, _m2 :: a } | B { m1 :: a }--************************************************************************-*                                                                      *-                Checking role validity-*                                                                      *-************************************************************************--}--checkValidRoleAnnots :: RoleAnnotEnv -> TyCon -> TcM ()-checkValidRoleAnnots role_annots tc-  | isTypeSynonymTyCon tc = check_no_roles-  | isFamilyTyCon tc      = check_no_roles-  | isAlgTyCon tc         = check_roles-  | otherwise             = return ()-  where-    -- Role annotations are given only on *explicit* variables,-    -- but a tycon stores roles for all variables.-    -- So, we drop the implicit roles (which are all Nominal, anyway).-    name                   = tyConName tc-    roles                  = tyConRoles tc-    (vis_roles, vis_vars)  = unzip $ mapMaybe pick_vis $-                             zip roles (tyConBinders tc)-    role_annot_decl_maybe  = lookupRoleAnnot role_annots name--    pick_vis :: (Role, TyConBinder) -> Maybe (Role, TyVar)-    pick_vis (role, tvb)-      | isVisibleTyConBinder tvb = Just (role, binderVar tvb)-      | otherwise                = Nothing--    check_roles-      = whenIsJust role_annot_decl_maybe $-          \decl@(dL->L loc (RoleAnnotDecl _ _ the_role_annots)) ->-          addRoleAnnotCtxt name $-          setSrcSpan loc $ do-          { role_annots_ok <- xoptM LangExt.RoleAnnotations-          ; checkTc role_annots_ok $ needXRoleAnnotations tc-          ; checkTc (vis_vars `equalLength` the_role_annots)-                    (wrongNumberOfRoles vis_vars decl)-          ; _ <- zipWith3M checkRoleAnnot vis_vars the_role_annots vis_roles-          -- Representational or phantom roles for class parameters-          -- quickly lead to incoherence. So, we require-          -- IncoherentInstances to have them. See #8773, #14292-          ; incoherent_roles_ok <- xoptM LangExt.IncoherentInstances-          ; checkTc (  incoherent_roles_ok-                    || (not $ isClassTyCon tc)-                    || (all (== Nominal) vis_roles))-                    incoherentRoles--          ; lint <- goptM Opt_DoCoreLinting-          ; when lint $ checkValidRoles tc }--    check_no_roles-      = whenIsJust role_annot_decl_maybe illegalRoleAnnotDecl--checkRoleAnnot :: TyVar -> Located (Maybe Role) -> Role -> TcM ()-checkRoleAnnot _  (dL->L _ Nothing)   _  = return ()-checkRoleAnnot tv (dL->L _ (Just r1)) r2-  = when (r1 /= r2) $-    addErrTc $ badRoleAnnot (tyVarName tv) r1 r2-checkRoleAnnot _ _ _ = panic "checkRoleAnnot: Impossible Match" -- due to #15884---- This is a double-check on the role inference algorithm. It is only run when--- -dcore-lint is enabled. See Note [Role inference] in TcTyDecls-checkValidRoles :: TyCon -> TcM ()--- If you edit this function, you may need to update the GHC formalism--- See Note [GHC Formalism] in CoreLint-checkValidRoles tc-  | isAlgTyCon tc-    -- tyConDataCons returns an empty list for data families-  = mapM_ check_dc_roles (tyConDataCons tc)-  | Just rhs <- synTyConRhs_maybe tc-  = check_ty_roles (zipVarEnv (tyConTyVars tc) (tyConRoles tc)) Representational rhs-  | otherwise-  = return ()-  where-    check_dc_roles datacon-      = do { traceTc "check_dc_roles" (ppr datacon <+> ppr (tyConRoles tc))-           ; mapM_ (check_ty_roles role_env Representational) $-                    eqSpecPreds eq_spec ++ theta ++ arg_tys }-                    -- See Note [Role-checking data constructor arguments] in TcTyDecls-      where-        (univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res_ty)-          = dataConFullSig datacon-        univ_roles = zipVarEnv univ_tvs (tyConRoles tc)-              -- zipVarEnv uses zipEqual, but we don't want that for ex_tvs-        ex_roles   = mkVarEnv (map (, Nominal) ex_tvs)-        role_env   = univ_roles `plusVarEnv` ex_roles--    check_ty_roles env role ty-      | Just ty' <- coreView ty -- #14101-      = check_ty_roles env role ty'--    check_ty_roles env role (TyVarTy tv)-      = case lookupVarEnv env tv of-          Just role' -> unless (role' `ltRole` role || role' == role) $-                        report_error $ text "type variable" <+> quotes (ppr tv) <+>-                                       text "cannot have role" <+> ppr role <+>-                                       text "because it was assigned role" <+> ppr role'-          Nothing    -> report_error $ text "type variable" <+> quotes (ppr tv) <+>-                                       text "missing in environment"--    check_ty_roles env Representational (TyConApp tc tys)-      = let roles' = tyConRoles tc in-        zipWithM_ (maybe_check_ty_roles env) roles' tys--    check_ty_roles env Nominal (TyConApp _ tys)-      = mapM_ (check_ty_roles env Nominal) tys--    check_ty_roles _   Phantom ty@(TyConApp {})-      = pprPanic "check_ty_roles" (ppr ty)--    check_ty_roles env role (AppTy ty1 ty2)-      =  check_ty_roles env role    ty1-      >> check_ty_roles env Nominal ty2--    check_ty_roles env role (FunTy ty1 ty2)-      =  check_ty_roles env role ty1-      >> check_ty_roles env role ty2--    check_ty_roles env role (ForAllTy (Bndr tv _) ty)-      =  check_ty_roles env Nominal (tyVarKind tv)-      >> check_ty_roles (extendVarEnv env tv Nominal) role ty--    check_ty_roles _   _    (LitTy {}) = return ()--    check_ty_roles env role (CastTy t _)-      = check_ty_roles env role t--    check_ty_roles _   role (CoercionTy co)-      = unless (role == Phantom) $-        report_error $ text "coercion" <+> ppr co <+> text "has bad role" <+> ppr role--    maybe_check_ty_roles env role ty-      = when (role == Nominal || role == Representational) $-        check_ty_roles env role ty--    report_error doc-      = addErrTc $ vcat [text "Internal error in role inference:",-                         doc,-                         text "Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug"]--{--************************************************************************-*                                                                      *-                Error messages-*                                                                      *-************************************************************************--}--tcAddTyFamInstCtxt :: TyFamInstDecl GhcRn -> TcM a -> TcM a-tcAddTyFamInstCtxt decl-  = tcAddFamInstCtxt (text "type instance") (tyFamInstDeclName decl)--tcMkDataFamInstCtxt :: DataFamInstDecl GhcRn -> SDoc-tcMkDataFamInstCtxt decl@(DataFamInstDecl { dfid_eqn =-                            HsIB { hsib_body = eqn }})-  = tcMkFamInstCtxt (pprDataFamInstFlavour decl <+> text "instance")-                    (unLoc (feqn_tycon eqn))-tcMkDataFamInstCtxt (DataFamInstDecl (XHsImplicitBndrs _))-  = panic "tcMkDataFamInstCtxt"--tcAddDataFamInstCtxt :: DataFamInstDecl GhcRn -> TcM a -> TcM a-tcAddDataFamInstCtxt decl-  = addErrCtxt (tcMkDataFamInstCtxt decl)--tcMkFamInstCtxt :: SDoc -> Name -> SDoc-tcMkFamInstCtxt flavour tycon-  = hsep [ text "In the" <+> flavour <+> text "declaration for"-         , quotes (ppr tycon) ]--tcAddFamInstCtxt :: SDoc -> Name -> TcM a -> TcM a-tcAddFamInstCtxt flavour tycon thing_inside-  = addErrCtxt (tcMkFamInstCtxt flavour tycon) thing_inside--tcAddClosedTypeFamilyDeclCtxt :: TyCon -> TcM a -> TcM a-tcAddClosedTypeFamilyDeclCtxt tc-  = addErrCtxt ctxt-  where-    ctxt = text "In the equations for closed type family" <+>-           quotes (ppr tc)--resultTypeMisMatch :: FieldLabelString -> DataCon -> DataCon -> SDoc-resultTypeMisMatch field_name con1 con2-  = vcat [sep [text "Constructors" <+> ppr con1 <+> text "and" <+> ppr con2,-                text "have a common field" <+> quotes (ppr field_name) <> comma],-          nest 2 $ text "but have different result types"]--fieldTypeMisMatch :: FieldLabelString -> DataCon -> DataCon -> SDoc-fieldTypeMisMatch field_name con1 con2-  = sep [text "Constructors" <+> ppr con1 <+> text "and" <+> ppr con2,-         text "give different types for field", quotes (ppr field_name)]--dataConCtxtName :: [Located Name] -> SDoc-dataConCtxtName [con]-   = text "In the definition of data constructor" <+> quotes (ppr con)-dataConCtxtName con-   = text "In the definition of data constructors" <+> interpp'SP con--dataConCtxt :: Outputable a => a -> SDoc-dataConCtxt con = text "In the definition of data constructor" <+> quotes (ppr con)--classOpCtxt :: Var -> Type -> SDoc-classOpCtxt sel_id tau = sep [text "When checking the class method:",-                              nest 2 (pprPrefixOcc sel_id <+> dcolon <+> ppr tau)]--classArityErr :: Int -> Class -> SDoc-classArityErr n cls-    | n == 0 = mkErr "No" "no-parameter"-    | otherwise = mkErr "Too many" "multi-parameter"-  where-    mkErr howMany allowWhat =-        vcat [text (howMany ++ " parameters for class") <+> quotes (ppr cls),-              parens (text ("Enable MultiParamTypeClasses to allow "-                                    ++ allowWhat ++ " classes"))]--classFunDepsErr :: Class -> SDoc-classFunDepsErr cls-  = vcat [text "Fundeps in class" <+> quotes (ppr cls),-          parens (text "Enable FunctionalDependencies to allow fundeps")]--badMethPred :: Id -> TcPredType -> SDoc-badMethPred sel_id pred-  = vcat [ hang (text "Constraint" <+> quotes (ppr pred)-                 <+> text "in the type of" <+> quotes (ppr sel_id))-              2 (text "constrains only the class type variables")-         , text "Enable ConstrainedClassMethods to allow it" ]--noClassTyVarErr :: Class -> TyCon -> SDoc-noClassTyVarErr clas fam_tc-  = sep [ text "The associated type" <+> quotes (ppr fam_tc)-        , text "mentions none of the type or kind variables of the class" <+>-                quotes (ppr clas <+> hsep (map ppr (classTyVars clas)))]--badDataConTyCon :: DataCon -> Type -> Type -> SDoc-badDataConTyCon data_con res_ty_tmpl actual_res_ty-  | ASSERT( all isTyVar actual_ex_tvs )-    tcIsForAllTy actual_res_ty-  = nested_foralls_contexts_suggestion-  | isJust (tcSplitPredFunTy_maybe actual_res_ty)-  = nested_foralls_contexts_suggestion-  | otherwise-  = hang (text "Data constructor" <+> quotes (ppr data_con) <+>-                text "returns type" <+> quotes (ppr actual_res_ty))-       2 (text "instead of an instance of its parent type" <+> quotes (ppr res_ty_tmpl))-  where-    -- This suggestion is useful for suggesting how to correct code like what-    -- was reported in Trac #12087:-    ---    --   data F a where-    --     MkF :: Ord a => Eq a => a -> F a-    ---    -- Although nested foralls or contexts are allowed in function type-    -- signatures, it is much more difficult to engineer GADT constructor type-    -- signatures to allow something similar, so we error in the latter case.-    -- Nevertheless, we can at least suggest how a user might reshuffle their-    -- exotic GADT constructor type signature so that GHC will accept.-    nested_foralls_contexts_suggestion =-      text "GADT constructor type signature cannot contain nested"-      <+> quotes forAllLit <> text "s or contexts"-      $+$ hang (text "Suggestion: instead use this type signature:")-             2 (ppr (dataConName data_con) <+> dcolon <+> ppr suggested_ty)--    -- To construct a type that GHC would accept (suggested_ty), we:-    ---    -- 1) Find the existentially quantified type variables and the class-    --    predicates from the datacon. (NB: We don't need the universally-    --    quantified type variables, since rejigConRes won't substitute them in-    --    the result type if it fails, as in this scenario.)-    -- 2) Split apart the return type (which is headed by a forall or a-    --    context) using tcSplitNestedSigmaTys, collecting the type variables-    --    and class predicates we find, as well as the rho type lurking-    --    underneath the nested foralls and contexts.-    -- 3) Smash together the type variables and class predicates from 1) and-    --    2), and prepend them to the rho type from 2).-    actual_ex_tvs = dataConExTyCoVars data_con-    actual_theta  = dataConTheta data_con-    (actual_res_tvs, actual_res_theta, actual_res_rho)-      = tcSplitNestedSigmaTys actual_res_ty-    suggested_ty = mkSpecForAllTys (actual_ex_tvs ++ actual_res_tvs) $-                   mkFunTys (actual_theta ++ actual_res_theta)-                   actual_res_rho--badGadtDecl :: Name -> SDoc-badGadtDecl tc_name-  = vcat [ text "Illegal generalised algebraic data declaration for" <+> quotes (ppr tc_name)-         , nest 2 (parens $ text "Enable the GADTs extension to allow this") ]--badExistential :: DataCon -> SDoc-badExistential con-  = hang (text "Data constructor" <+> quotes (ppr con) <+>-                text "has existential type variables, a context, or a specialised result type")-       2 (vcat [ ppr con <+> dcolon <+> ppr (dataConUserType con)-               , parens $ text "Enable ExistentialQuantification or GADTs to allow this" ])--badStupidTheta :: Name -> SDoc-badStupidTheta tc_name-  = text "A data type declared in GADT style cannot have a context:" <+> quotes (ppr tc_name)--newtypeConError :: Name -> Int -> SDoc-newtypeConError tycon n-  = sep [text "A newtype must have exactly one constructor,",-         nest 2 $ text "but" <+> quotes (ppr tycon) <+> text "has" <+> speakN n ]--newtypeStrictError :: DataCon -> SDoc-newtypeStrictError con-  = sep [text "A newtype constructor cannot have a strictness annotation,",-         nest 2 $ text "but" <+> quotes (ppr con) <+> text "does"]--newtypeFieldErr :: DataCon -> Int -> SDoc-newtypeFieldErr con_name n_flds-  = sep [text "The constructor of a newtype must have exactly one field",-         nest 2 $ text "but" <+> quotes (ppr con_name) <+> text "has" <+> speakN n_flds]--badSigTyDecl :: Name -> SDoc-badSigTyDecl tc_name-  = vcat [ text "Illegal kind signature" <+>-           quotes (ppr tc_name)-         , nest 2 (parens $ text "Use KindSignatures to allow kind signatures") ]--emptyConDeclsErr :: Name -> SDoc-emptyConDeclsErr tycon-  = sep [quotes (ppr tycon) <+> text "has no constructors",-         nest 2 $ text "(EmptyDataDecls permits this)"]--wrongKindOfFamily :: TyCon -> SDoc-wrongKindOfFamily family-  = text "Wrong category of family instance; declaration was for a"-    <+> kindOfFamily-  where-    kindOfFamily | isTypeFamilyTyCon family = text "type family"-                 | isDataFamilyTyCon family = text "data family"-                 | otherwise = pprPanic "wrongKindOfFamily" (ppr family)---- | Produce an error for oversaturated type family equations with too many--- required arguments.--- See Note [Oversaturated type family equations] in TcValidity.-wrongNumberOfParmsErr :: Arity -> SDoc-wrongNumberOfParmsErr max_args-  = text "Number of parameters must match family declaration; expected"-    <+> ppr max_args--defaultAssocKindErr :: TyCon -> SDoc-defaultAssocKindErr fam_tc-  = text "Kind mis-match on LHS of default declaration for"-    <+> quotes (ppr fam_tc)--badRoleAnnot :: Name -> Role -> Role -> SDoc-badRoleAnnot var annot inferred-  = hang (text "Role mismatch on variable" <+> ppr var <> colon)-       2 (sep [ text "Annotation says", ppr annot-              , text "but role", ppr inferred-              , text "is required" ])--wrongNumberOfRoles :: [a] -> LRoleAnnotDecl GhcRn -> SDoc-wrongNumberOfRoles tyvars d@(dL->L _ (RoleAnnotDecl _ _ annots))-  = hang (text "Wrong number of roles listed in role annotation;" $$-          text "Expected" <+> (ppr $ length tyvars) <> comma <+>-          text "got" <+> (ppr $ length annots) <> colon)-       2 (ppr d)-wrongNumberOfRoles _ (dL->L _ (XRoleAnnotDecl _)) = panic "wrongNumberOfRoles"-wrongNumberOfRoles _ _ = panic "wrongNumberOfRoles: Impossible Match"-                         -- due to #15884---illegalRoleAnnotDecl :: LRoleAnnotDecl GhcRn -> TcM ()-illegalRoleAnnotDecl (dL->L loc (RoleAnnotDecl _ tycon _))-  = setErrCtxt [] $-    setSrcSpan loc $-    addErrTc (text "Illegal role annotation for" <+> ppr tycon <> char ';' $$-              text "they are allowed only for datatypes and classes.")-illegalRoleAnnotDecl (dL->L _ (XRoleAnnotDecl _)) = panic "illegalRoleAnnotDecl"+        kcConDecls, tcConDecls, dataDeclChecks, checkValidTyCon,+        tcFamTyPats, tcTyFamInstEqn,+        tcAddTyFamInstCtxt, tcMkDataFamInstCtxt, tcAddDataFamInstCtxt,+        unravelFamInstPats, addConsistencyConstraints,+        wrongKindOfFamily+    ) where++#include "HsVersions.h"++import GhcPrelude++import GHC.Hs+import HscTypes+import BuildTyCl+import TcRnMonad+import TcEnv+import TcValidity+import TcHsSyn+import TcTyDecls+import TcClassDcl+import {-# SOURCE #-} TcInstDcls( tcInstDecls1 )+import TcDeriv (DerivInfo(..))+import TcUnify ( unifyKind )+import TcHsType+import ClsInst( AssocInstInfo(..) )+import TcMType+import TysWiredIn ( unitTy, makeRecoveryTyCon )+import TcType+import RnEnv( lookupConstructorFields )+import FamInst+import FamInstEnv+import Coercion+import TcOrigin+import Type+import TyCoRep   -- for checkValidRoles+import TyCoPpr( pprTyVars, pprWithExplicitKindsWhen )+import Class+import CoAxiom+import TyCon+import DataCon+import Id+import Var+import VarEnv+import VarSet+import Module+import Name+import NameSet+import NameEnv+import Outputable+import Maybes+import Unify+import Util+import SrcLoc+import ListSetOps+import DynFlags+import Unique+import ConLike( ConLike(..) )+import BasicTypes+import qualified GHC.LanguageExtensions as LangExt++import Control.Monad+import Data.Foldable+import Data.Function ( on )+import Data.List+import qualified Data.List.NonEmpty as NE+import Data.List.NonEmpty ( NonEmpty(..) )+import qualified Data.Set as Set+++{-+************************************************************************+*                                                                      *+\subsection{Type checking for type and class declarations}+*                                                                      *+************************************************************************++Note [Grouping of type and class declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+tcTyAndClassDecls is called on a list of `TyClGroup`s. Each group is a strongly+connected component of mutually dependent types and classes. We kind check and+type check each group separately to enhance kind polymorphism. Take the+following example:++  type Id a = a+  data X = X (Id Int)++If we were to kind check the two declarations together, we would give Id the+kind * -> *, since we apply it to an Int in the definition of X. But we can do+better than that, since Id really is kind polymorphic, and should get kind+forall (k::*). k -> k. Since it does not depend on anything else, it can be+kind-checked by itself, hence getting the most general kind. We then kind check+X, which works fine because we then know the polymorphic kind of Id, and simply+instantiate k to *.++Note [Check role annotations in a second pass]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Role inference potentially depends on the types of all of the datacons declared+in a mutually recursive group. The validity of a role annotation, in turn,+depends on the result of role inference. Because the types of datacons might+be ill-formed (see #7175 and Note [Checking GADT return types]) we must check+*all* the tycons in a group for validity before checking *any* of the roles.+Thus, we take two passes over the resulting tycons, first checking for general+validity and then checking for valid role annotations.+-}++tcTyAndClassDecls :: [TyClGroup GhcRn]      -- Mutually-recursive groups in+                                            -- dependency order+                  -> TcM ( TcGblEnv         -- Input env extended by types and+                                            -- classes+                                            -- and their implicit Ids,DataCons+                         , [InstInfo GhcRn] -- Source-code instance decls info+                         , [DerivInfo]      -- Deriving info+                         )+-- Fails if there are any errors+tcTyAndClassDecls tyclds_s+  -- The code recovers internally, but if anything gave rise to+  -- an error we'd better stop now, to avoid a cascade+  -- Type check each group in dependency order folding the global env+  = checkNoErrs $ fold_env [] [] tyclds_s+  where+    fold_env :: [InstInfo GhcRn]+             -> [DerivInfo]+             -> [TyClGroup GhcRn]+             -> TcM (TcGblEnv, [InstInfo GhcRn], [DerivInfo])+    fold_env inst_info deriv_info []+      = do { gbl_env <- getGblEnv+           ; return (gbl_env, inst_info, deriv_info) }+    fold_env inst_info deriv_info (tyclds:tyclds_s)+      = do { (tcg_env, inst_info', deriv_info') <- tcTyClGroup tyclds+           ; setGblEnv tcg_env $+               -- remaining groups are typechecked in the extended global env.+             fold_env (inst_info' ++ inst_info)+                      (deriv_info' ++ deriv_info)+                      tyclds_s }++tcTyClGroup :: TyClGroup GhcRn+            -> TcM (TcGblEnv, [InstInfo GhcRn], [DerivInfo])+-- Typecheck one strongly-connected component of type, class, and instance decls+-- See Note [TyClGroups and dependency analysis] in GHC.Hs.Decls+tcTyClGroup (TyClGroup { group_tyclds = tyclds+                       , group_roles  = roles+                       , group_kisigs = kisigs+                       , group_instds = instds })+  = do { let role_annots = mkRoleAnnotEnv roles++           -- Step 1: Typecheck the standalone kind signatures and type/class declarations+       ; traceTc "---- tcTyClGroup ---- {" empty+       ; traceTc "Decls for" (ppr (map (tcdName . unLoc) tyclds))+       ; (tyclss, data_deriv_info) <-+           tcExtendKindEnv (mkPromotionErrorEnv tyclds) $ -- See Note [Type environment evolution]+           do { kisig_env <- mkNameEnv <$> traverse tcStandaloneKindSig kisigs+              ; tcTyClDecls tyclds kisig_env role_annots }++           -- Step 1.5: Make sure we don't have any type synonym cycles+       ; traceTc "Starting synonym cycle check" (ppr tyclss)+       ; this_uid <- fmap thisPackage getDynFlags+       ; checkSynCycles this_uid tyclss tyclds+       ; traceTc "Done synonym cycle check" (ppr tyclss)++           -- Step 2: Perform the validity check on those types/classes+           -- We can do this now because we are done with the recursive knot+           -- Do it before Step 3 (adding implicit things) because the latter+           -- expects well-formed TyCons+       ; traceTc "Starting validity check" (ppr tyclss)+       ; tyclss <- concatMapM checkValidTyCl tyclss+       ; traceTc "Done validity check" (ppr tyclss)+       ; mapM_ (recoverM (return ()) . checkValidRoleAnnots role_annots) tyclss+           -- See Note [Check role annotations in a second pass]++       ; traceTc "---- end tcTyClGroup ---- }" empty++           -- Step 3: Add the implicit things;+           -- we want them in the environment because+           -- they may be mentioned in interface files+       ; gbl_env <- addTyConsToGblEnv tyclss++           -- Step 4: check instance declarations+       ; (gbl_env', inst_info, datafam_deriv_info) <-+         setGblEnv gbl_env $+         tcInstDecls1 instds++       ; let deriv_info = datafam_deriv_info ++ data_deriv_info+       ; return (gbl_env', inst_info, deriv_info) }+++tcTyClGroup (XTyClGroup nec) = noExtCon nec++-- Gives the kind for every TyCon that has a standalone kind signature+type KindSigEnv = NameEnv Kind++tcTyClDecls+  :: [LTyClDecl GhcRn]+  -> KindSigEnv+  -> RoleAnnotEnv+  -> TcM ([TyCon], [DerivInfo])+tcTyClDecls tyclds kisig_env role_annots+  = do {    -- Step 1: kind-check this group and returns the final+            -- (possibly-polymorphic) kind of each TyCon and Class+            -- See Note [Kind checking for type and class decls]+         tc_tycons <- kcTyClGroup kisig_env tyclds+       ; traceTc "tcTyAndCl generalized kinds" (vcat (map ppr_tc_tycon tc_tycons))++            -- Step 2: type-check all groups together, returning+            -- the final TyCons and Classes+            --+            -- NB: We have to be careful here to NOT eagerly unfold+            -- type synonyms, as we have not tested for type synonym+            -- loops yet and could fall into a black hole.+       ; fixM $ \ ~(rec_tyclss, _) -> do+           { tcg_env <- getGblEnv+           ; let roles = inferRoles (tcg_src tcg_env) role_annots rec_tyclss++                 -- Populate environment with knot-tied ATyCon for TyCons+                 -- NB: if the decls mention any ill-staged data cons+                 -- (see Note [Recursion and promoting data constructors])+                 -- we will have failed already in kcTyClGroup, so no worries here+           ; (tycons, data_deriv_infos) <-+             tcExtendRecEnv (zipRecTyClss tc_tycons rec_tyclss) $++                 -- Also extend the local type envt with bindings giving+                 -- a TcTyCon for each each knot-tied TyCon or Class+                 -- See Note [Type checking recursive type and class declarations]+                 -- and Note [Type environment evolution]+             tcExtendKindEnvWithTyCons tc_tycons $++                 -- Kind and type check declarations for this group+               mapAndUnzipM (tcTyClDecl roles) tyclds+           ; return (tycons, concat data_deriv_infos)+           } }+  where+    ppr_tc_tycon tc = parens (sep [ ppr (tyConName tc) <> comma+                                  , ppr (tyConBinders tc) <> comma+                                  , ppr (tyConResKind tc)+                                  , ppr (isTcTyCon tc) ])++zipRecTyClss :: [TcTyCon]+             -> [TyCon]           -- Knot-tied+             -> [(Name,TyThing)]+-- Build a name-TyThing mapping for the TyCons bound by decls+-- being careful not to look at the knot-tied [TyThing]+-- The TyThings in the result list must have a visible ATyCon,+-- because typechecking types (in, say, tcTyClDecl) looks at+-- this outer constructor+zipRecTyClss tc_tycons rec_tycons+  = [ (name, ATyCon (get name)) | tc_tycon <- tc_tycons, let name = getName tc_tycon ]+  where+    rec_tc_env :: NameEnv TyCon+    rec_tc_env = foldr add_tc emptyNameEnv rec_tycons++    add_tc :: TyCon -> NameEnv TyCon -> NameEnv TyCon+    add_tc tc env = foldr add_one_tc env (tc : tyConATs tc)++    add_one_tc :: TyCon -> NameEnv TyCon -> NameEnv TyCon+    add_one_tc tc env = extendNameEnv env (tyConName tc) tc++    get name = case lookupNameEnv rec_tc_env name of+                 Just tc -> tc+                 other   -> pprPanic "zipRecTyClss" (ppr name <+> ppr other)++{-+************************************************************************+*                                                                      *+                Kind checking+*                                                                      *+************************************************************************++Note [Kind checking for type and class decls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Kind checking is done thus:++   1. Make up a kind variable for each parameter of the declarations,+      and extend the kind environment (which is in the TcLclEnv)++   2. Kind check the declarations++We need to kind check all types in the mutually recursive group+before we know the kind of the type variables.  For example:++  class C a where+     op :: D b => a -> b -> b++  class D c where+     bop :: (Monad c) => ...++Here, the kind of the locally-polymorphic type variable "b"+depends on *all the uses of class D*.  For example, the use of+Monad c in bop's type signature means that D must have kind Type->Type.++Note: we don't treat type synonyms specially (we used to, in the past);+in particular, even if we have a type synonym cycle, we still kind check+it normally, and test for cycles later (checkSynCycles).  The reason+we can get away with this is because we have more systematic TYPE r+inference, which means that we can do unification between kinds that+aren't lifted (this historically was not true.)++The downside of not directly reading off the kinds of the RHS of+type synonyms in topological order is that we don't transparently+support making synonyms of types with higher-rank kinds.  But+you can always specify a CUSK directly to make this work out.+See tc269 for an example.++Note [Skip decls with CUSKs in kcLTyClDecl]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++    data T (a :: *) = MkT (S a)   -- Has CUSK+    data S a = MkS (T Int) (S a)  -- No CUSK++Via inferInitialKinds we get+  T :: * -> *+  S :: kappa -> *++Then we call kcTyClDecl on each decl in the group, to constrain the+kind unification variables.  BUT we /skip/ the RHS of any decl with+a CUSK.  Here we skip the RHS of T, so we eventually get+  S :: forall k. k -> *++This gets us more polymorphism than we would otherwise get, similar+(but implemented strangely differently from) the treatment of type+signatures in value declarations.++However, we only want to do so when we have PolyKinds.+When we have NoPolyKinds, we don't skip those decls, because we have defaulting+(#16609). Skipping won't bring us more polymorphism when we have defaulting.+Consider++  data T1 a = MkT1 T2        -- No CUSK+  data T2 = MkT2 (T1 Maybe)  -- Has CUSK++If we skip the rhs of T2 during kind-checking, the kind of a remains unsolved.+With PolyKinds, we do generalization to get T1 :: forall a. a -> *. And the+program type-checks.+But with NoPolyKinds, we do defaulting to get T1 :: * -> *. Defaulting happens+in quantifyTyVars, which is called from generaliseTcTyCon. Then type-checking+(T1 Maybe) will throw a type error.++Summary: with PolyKinds, we must skip; with NoPolyKinds, we must /not/ skip.++Open type families+~~~~~~~~~~~~~~~~~~+This treatment of type synonyms only applies to Haskell 98-style synonyms.+General type functions can be recursive, and hence, appear in `alg_decls'.++The kind of an open type family is solely determinded by its kind signature;+hence, only kind signatures participate in the construction of the initial+kind environment (as constructed by `inferInitialKind'). In fact, we ignore+instances of families altogether in the following. However, we need to include+the kinds of *associated* families into the construction of the initial kind+environment. (This is handled by `allDecls').++See also Note [Kind checking recursive type and class declarations]++Note [How TcTyCons work]+~~~~~~~~~~~~~~~~~~~~~~~~+TcTyCons are used for two distinct purposes++1.  When recovering from a type error in a type declaration,+    we want to put the erroneous TyCon in the environment in a+    way that won't lead to more errors.  We use a TcTyCon for this;+    see makeRecoveryTyCon.++2.  When checking a type/class declaration (in module TcTyClsDecls), we come+    upon knowledge of the eventual tycon in bits and pieces.++      S1) First, we use inferInitialKinds to look over the user-provided+          kind signature of a tycon (including, for example, the number+          of parameters written to the tycon) to get an initial shape of+          the tycon's kind.  We record that shape in a TcTyCon.++          For CUSK tycons, the TcTyCon has the final, generalised kind.+          For non-CUSK tycons, the TcTyCon has as its tyConBinders only+          the explicit arguments given -- no kind variables, etc.++      S2) Then, using these initial kinds, we kind-check the body of the+          tycon (class methods, data constructors, etc.), filling in the+          metavariables in the tycon's initial kind.++      S3) We then generalize to get the (non-CUSK) tycon's final, fixed+          kind. Finally, once this has happened for all tycons in a+          mutually recursive group, we can desugar the lot.++    For convenience, we store partially-known tycons in TcTyCons, which+    might store meta-variables. These TcTyCons are stored in the local+    environment in TcTyClsDecls, until the real full TyCons can be created+    during desugaring. A desugared program should never have a TcTyCon.++3.  In a TcTyCon, everything is zonked after the kind-checking pass (S2).++4.  tyConScopedTyVars.  A challenging piece in all of this is that we+    end up taking three separate passes over every declaration:+      - one in inferInitialKind (this pass look only at the head, not the body)+      - one in kcTyClDecls (to kind-check the body)+      - a final one in tcTyClDecls (to desugar)++    In the latter two passes, we need to connect the user-written type+    variables in an LHsQTyVars with the variables in the tycon's+    inferred kind. Because the tycon might not have a CUSK, this+    matching up is, in general, quite hard to do.  (Look through the+    git history between Dec 2015 and Apr 2016 for+    TcHsType.splitTelescopeTvs!)++    Instead of trying, we just store the list of type variables to+    bring into scope, in the tyConScopedTyVars field of the TcTyCon.+    These tyvars are brought into scope in TcHsType.bindTyClTyVars.++    In a TcTyCon, why is tyConScopedTyVars :: [(Name,TcTyVar)] rather+    than just [TcTyVar]?  Consider these mutually-recursive decls+       data T (a :: k1) b = MkT (S a b)+       data S (c :: k2) d = MkS (T c d)+    We start with k1 bound to kappa1, and k2 to kappa2; so initially+    in the (Name,TcTyVar) pairs the Name is that of the TcTyVar. But+    then kappa1 and kappa2 get unified; so after the zonking in+    'generalise' in 'kcTyClGroup' the Name and TcTyVar may differ.++See also Note [Type checking recursive type and class declarations].++Note [Type environment evolution]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As we typecheck a group of declarations the type environment evolves.+Consider for example:+  data B (a :: Type) = MkB (Proxy 'MkB)++We do the following steps:++  1. Start of tcTyClDecls: use mkPromotionErrorEnv to initialise the+     type env with promotion errors+            B   :-> TyConPE+            MkB :-> DataConPE++  2. kcTyCLGroup+      - Do inferInitialKinds, which will signal a promotion+        error if B is used in any of the kinds needed to initialise+        B's kind (e.g. (a :: Type)) here++      - Extend the type env with these initial kinds (monomorphic for+        decls that lack a CUSK)+            B :-> TcTyCon <initial kind>+        (thereby overriding the B :-> TyConPE binding)+        and do kcLTyClDecl on each decl to get equality constraints on+        all those inital kinds++      - Generalise the inital kind, making a poly-kinded TcTyCon++  3. Back in tcTyDecls, extend the envt with bindings of the poly-kinded+     TcTyCons, again overriding the promotion-error bindings.++     But note that the data constructor promotion errors are still in place+     so that (in our example) a use of MkB will sitll be signalled as+     an error.++  4. Typecheck the decls.++  5. In tcTyClGroup, extend the envt with bindings for TyCon and DataCons+++Note [Missed opportunity to retain higher-rank kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In 'kcTyClGroup', there is a missed opportunity to make kind+inference work in a few more cases.  The idea is analogous+to Note [Single function non-recursive binding special-case]:++     * If we have an SCC with a single decl, which is non-recursive,+       instead of creating a unification variable representing the+       kind of the decl and unifying it with the rhs, we can just+       read the type directly of the rhs.++     * Furthermore, we can update our SCC analysis to ignore+       dependencies on declarations which have CUSKs: we don't+       have to kind-check these all at once, since we can use+       the CUSK to initialize the kind environment.++Unfortunately this requires reworking a bit of the code in+'kcLTyClDecl' so I've decided to punt unless someone shouts about it.++Note [Don't process associated types in getInitialKind]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Previously, we processed associated types in the thing_inside in getInitialKind,+but this was wrong -- we want to do ATs sepearately.+The consequence for not doing it this way is #15142:++  class ListTuple (tuple :: Type) (as :: [(k, Type)]) where+    type ListToTuple as :: Type++We assign k a kind kappa[1]. When checking the tuple (k, Type), we try to unify+kappa ~ Type, but this gets deferred because we bumped the TcLevel as we bring+`tuple` into scope. Thus, when we check ListToTuple, kappa[1] still hasn't+unified with Type. And then, when we generalize the kind of ListToTuple (which+indeed has a CUSK, according to the rules), we skolemize the free metavariable+kappa. Note that we wouldn't skolemize kappa when generalizing the kind of ListTuple,+because the solveEqualities in kcInferDeclHeader is at TcLevel 1 and so kappa[1]+will unify with Type.++Bottom line: as associated types should have no effect on a CUSK enclosing class,+we move processing them to a separate action, run after the outer kind has+been generalized.++-}++kcTyClGroup :: KindSigEnv -> [LTyClDecl GhcRn] -> TcM [TcTyCon]++-- Kind check this group, kind generalize, and return the resulting local env+-- This binds the TyCons and Classes of the group, but not the DataCons+-- See Note [Kind checking for type and class decls]+-- and Note [Inferring kinds for type declarations]+kcTyClGroup kisig_env decls+  = do  { mod <- getModule+        ; traceTc "---- kcTyClGroup ---- {"+                  (text "module" <+> ppr mod $$ vcat (map ppr decls))++          -- Kind checking;+          --    1. Bind kind variables for decls+          --    2. Kind-check decls+          --    3. Generalise the inferred kinds+          -- See Note [Kind checking for type and class decls]++        ; cusks_enabled <- xoptM LangExt.CUSKs+        ; let (kindless_decls, kinded_decls) = partitionWith get_kind decls++              get_kind d+                | Just ki <- lookupNameEnv kisig_env (tcdName (unLoc d))+                = Right (d, SAKS ki)++                | cusks_enabled && hsDeclHasCusk (unLoc d)+                = Right (d, CUSK)++                | otherwise = Left d++        ; checked_tcs <- checkInitialKinds kinded_decls+        ; inferred_tcs+            <- tcExtendKindEnvWithTyCons checked_tcs $+               pushTcLevelM_   $  -- We are going to kind-generalise, so+                                  -- unification variables in here must+                                  -- be one level in+               solveEqualities $+               do {  -- Step 1: Bind kind variables for all decls+                    mono_tcs <- inferInitialKinds kindless_decls++                  ; traceTc "kcTyClGroup: initial kinds" $+                    ppr_tc_kinds mono_tcs++                    -- Step 2: Set extended envt, kind-check the decls+                    -- NB: the environment extension overrides the tycon+                    --     promotion-errors bindings+                    --     See Note [Type environment evolution]+                  ; poly_kinds  <- xoptM LangExt.PolyKinds+                  ; tcExtendKindEnvWithTyCons mono_tcs $+                    mapM_ kcLTyClDecl (if poly_kinds then kindless_decls else decls)+                    -- See Note [Skip decls with CUSKs in kcLTyClDecl]++                  ; return mono_tcs }++        -- Step 3: generalisation+        -- Finally, go through each tycon and give it its final kind,+        -- with all the required, specified, and inferred variables+        -- in order.+        ; generalized_tcs <- mapAndReportM generaliseTcTyCon inferred_tcs++        ; let poly_tcs = checked_tcs ++ generalized_tcs+        ; traceTc "---- kcTyClGroup end ---- }" (ppr_tc_kinds poly_tcs)+        ; return poly_tcs }++  where+    ppr_tc_kinds tcs = vcat (map pp_tc tcs)+    pp_tc tc = ppr (tyConName tc) <+> dcolon <+> ppr (tyConKind tc)++generaliseTcTyCon :: TcTyCon -> TcM TcTyCon+generaliseTcTyCon tc+  -- See Note [Required, Specified, and Inferred for types]+  = setSrcSpan (getSrcSpan tc) $+    addTyConCtxt tc $+    do { let tc_name      = tyConName tc+             tc_res_kind  = tyConResKind tc+             spec_req_prs = tcTyConScopedTyVars tc++             (spec_req_names, spec_req_tvs) = unzip spec_req_prs+             -- NB: spec_req_tvs includes both Specified and Required+             -- Running example in Note [Inferring kinds for type declarations]+             --    spec_req_prs = [ ("k1",kk1), ("a", (aa::kk1))+             --                   , ("k2",kk2), ("x", (xx::kk2))]+             -- where "k1" dnotes the Name k1, and kk1, aa, etc are MetaTyVars,+             -- specifically TyVarTvs++       -- Step 0: zonk and skolemise the Specified and Required binders+       -- It's essential that they are skolems, not MetaTyVars,+       -- for Step 3 to work right+       ; spec_req_tvs <- mapM zonkAndSkolemise spec_req_tvs+             -- Running example, where kk1 := kk2, so we get+             --   [kk2,kk2]++       -- Step 1: Check for duplicates+       -- E.g. data SameKind (a::k) (b::k)+       --      data T (a::k1) (b::k2) = MkT (SameKind a b)+       -- Here k1 and k2 start as TyVarTvs, and get unified with each other+       -- If this happens, things get very confused later, so fail fast+       ; checkDuplicateTyConBinders spec_req_names spec_req_tvs++       -- Step 2a: find all the Inferred variables we want to quantify over+       -- NB: candidateQTyVarsOfKinds zonks as it goes+       ; dvs1 <- candidateQTyVarsOfKinds $+                (tc_res_kind : map tyVarKind spec_req_tvs)+       ; let dvs2 = dvs1 `delCandidates` spec_req_tvs++       -- Step 2b: quantify, mainly meaning skolemise the free variables+       -- Returned 'inferred' are scope-sorted and skolemised+       ; inferred <- quantifyTyVars dvs2++       -- Step 3a: rename all the Specified and Required tyvars back to+       -- TyVars with their oroginal user-specified name.  Example+       --     class C a_r23 where ....+       -- By this point we have scoped_prs = [(a_r23, a_r89[TyVarTv])]+       -- We return with the TyVar a_r23[TyVar],+       --    and ze mapping a_r89 :-> a_r23[TyVar]+       ; traceTc "generaliseTcTyCon: before zonkRec"+           (vcat [ text "spec_req_tvs =" <+> pprTyVars spec_req_tvs+                 , text "inferred =" <+> pprTyVars inferred ])+       ; (ze, final_spec_req_tvs) <- zonkRecTyVarBndrs spec_req_names spec_req_tvs+           -- So ze maps from the tyvars that have ended up++       -- Step 3b: Apply that mapping to the other variables+       -- (remember they all started as TyVarTvs).+       -- They have been skolemised by quantifyTyVars.+       ; (ze, inferred) <- zonkTyBndrsX ze inferred+       ; tc_res_kind    <- zonkTcTypeToTypeX ze tc_res_kind++       ; traceTc "generaliseTcTyCon: post zonk" $+         vcat [ text "tycon =" <+> ppr tc+              , text "inferred =" <+> pprTyVars inferred+              , text "ze =" <+> ppr ze+              , text "spec_req_prs =" <+> ppr spec_req_prs+              , text "spec_req_tvs =" <+> pprTyVars spec_req_tvs+              , text "final_spec_req_tvs =" <+> pprTyVars final_spec_req_tvs ]++       -- Step 4: Find the Specified and Inferred variables+       -- NB: spec_req_tvs = spec_tvs ++ req_tvs+       --     And req_tvs is 1-1 with tyConTyVars+       --     See Note [Scoped tyvars in a TcTyCon] in TyCon+       ; let n_spec        = length final_spec_req_tvs - tyConArity tc+             (spec_tvs, req_tvs) = splitAt n_spec final_spec_req_tvs+             specified     = scopedSort spec_tvs+                             -- NB: maintain the L-R order of scoped_tvs++       -- Step 5: Make the TyConBinders.+             to_user tv     = lookupTyVarOcc ze tv `orElse` tv+             dep_fv_set     = mapVarSet to_user (candidateKindVars dvs1)+             inferred_tcbs  = mkNamedTyConBinders Inferred inferred+             specified_tcbs = mkNamedTyConBinders Specified specified+             required_tcbs  = map (mkRequiredTyConBinder dep_fv_set) req_tvs++       -- Step 6: Assemble the final list.+             final_tcbs = concat [ inferred_tcbs+                                 , specified_tcbs+                                 , required_tcbs ]++       -- Step 7: Make the result TcTyCon+             tycon = mkTcTyCon tc_name final_tcbs tc_res_kind+                            (mkTyVarNamePairs final_spec_req_tvs)+                            True {- it's generalised now -}+                            (tyConFlavour tc)++       ; traceTc "generaliseTcTyCon done" $+         vcat [ text "tycon =" <+> ppr tc+              , text "tc_res_kind =" <+> ppr tc_res_kind+              , text "dep_fv_set =" <+> ppr dep_fv_set+              , text "final_spec_req_tvs =" <+> pprTyVars final_spec_req_tvs+              , text "inferred =" <+> pprTyVars inferred+              , text "specified =" <+> pprTyVars specified+              , text "required_tcbs =" <+> ppr required_tcbs+              , text "final_tcbs =" <+> ppr final_tcbs ]++       -- Step 8: Check for validity.+       -- We do this here because we're about to put the tycon into the+       -- the environment, and we don't want anything malformed there+       ; checkTyConTelescope tycon++       ; return tycon }++checkDuplicateTyConBinders :: [Name] -> [TcTyVar] -> TcM ()+checkDuplicateTyConBinders spec_req_names spec_req_tvs+  | null dups = return ()+  | otherwise = mapM_ report_dup dups >> failM+  where+    dups :: [(Name,Name)]+    dups = findDupTyVarTvs $ spec_req_names `zip` spec_req_tvs++    report_dup (n1, n2)+      = setSrcSpan (getSrcSpan n2) $+        addErrTc (text "Couldn't match" <+> quotes (ppr n1)+                        <+> text "with" <+> quotes (ppr n2))++{- Note [Required, Specified, and Inferred for types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Each forall'd type variable in a type or kind is one of++  * Required: an argument must be provided at every call site++  * Specified: the argument can be inferred at call sites, but+    may be instantiated with visible type/kind application++  * Inferred: the must be inferred at call sites; it+    is unavailable for use with visible type/kind application.++Why have Inferred at all? Because we just can't make user-facing+promises about the ordering of some variables. These might swizzle+around even between minor released. By forbidding visible type+application, we ensure users aren't caught unawares.++Go read Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep.++The question for this Note is this:+   given a TyClDecl, how are its quantified type variables classified?+Much of the debate is memorialized in #15743.++Here is our design choice. When inferring the ordering of variables+for a TyCl declaration (that is, for those variables that he user+has not specified the order with an explicit `forall`), we use the+following order:++ 1. Inferred variables+ 2. Specified variables; in the left-to-right order in which+    the user wrote them, modified by scopedSort (see below)+    to put them in depdendency order.+ 3. Required variables before a top-level ::+ 4. All variables after a top-level ::++If this ordering does not make a valid telescope, we reject the definition.++Example:+  data SameKind :: k -> k -> *+  data Bad a (c :: Proxy b) (d :: Proxy a) (x :: SameKind b d)++For Bad:+  - a, c, d, x are Required; they are explicitly listed by the user+    as the positional arguments of Bad+  - b is Specified; it appears explicitly in a kind signature+  - k, the kind of a, is Inferred; it is not mentioned explicitly at all++Putting variables in the order Inferred, Specified, Required+gives us this telescope:+  Inferred:  k+  Specified: b : Proxy a+  Required : (a : k) (c : Proxy b) (d : Proxy a) (x : SameKind b d)++But this order is ill-scoped, because b's kind mentions a, which occurs+after b in the telescope. So we reject Bad.++Associated types+~~~~~~~~~~~~~~~~+For associated types everything above is determined by the+associated-type declaration alone, ignoring the class header.+Here is an example (#15592)+  class C (a :: k) b where+    type F (x :: b a)++In the kind of C, 'k' is Specified.  But what about F?+In the kind of F,++ * Should k be Inferred or Specified?  It's Specified for C,+   but not mentioned in F's declaration.++ * In which order should the Specified variables a and b occur?+   It's clearly 'a' then 'b' in C's declaration, but the L-R ordering+   in F's declaration is 'b' then 'a'.++In both cases we make the choice by looking at F's declaration alone,+so it gets the kind+   F :: forall {k}. forall b a. b a -> Type++How it works+~~~~~~~~~~~~+These design choices are implemented by two completely different code+paths for++  * Declarations with a standalone kind signature or a complete user-specified+    kind signature (CUSK). Handled by the kcCheckDeclHeader.++  * Declarations without a kind signature (standalone or CUSK) are handled by+    kcInferDeclHeader; see Note [Inferring kinds for type declarations].++Note that neither code path worries about point (4) above, as this+is nicely handled by not mangling the res_kind. (Mangling res_kinds is done+*after* all this stuff, in tcDataDefn's call to etaExpandAlgTyCon.)++We can tell Inferred apart from Specified by looking at the scoped+tyvars; Specified are always included there.++Design alternatives+~~~~~~~~~~~~~~~~~~~+* For associated types we considered putting the class variables+  before the local variables, in a nod to the treatment for class+  methods. But it got too compilicated; see #15592, comment:21ff.++* We rigidly require the ordering above, even though we could be much more+  permissive. Relevant musings are at+  https://gitlab.haskell.org/ghc/ghc/issues/15743#note_161623+  The bottom line conclusion is that, if the user wants a different ordering,+  then can specify it themselves, and it is better to be predictable and dumb+  than clever and capricious.++  I (Richard) conjecture we could be fully permissive, allowing all classes+  of variables to intermix. We would have to augment ScopedSort to refuse to+  reorder Required variables (or check that it wouldn't have). But this would+  allow more programs. See #15743 for examples. Interestingly, Idris seems+  to allow this intermixing. The intermixing would be fully specified, in that+  we can be sure that inference wouldn't change between versions. However,+  would users be able to predict it? That I cannot answer.++Test cases (and tickets) relevant to these design decisions+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+  T15591*+  T15592*+  T15743*++Note [Inferring kinds for type declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This note deals with /inference/ for type declarations+that do not have a CUSK.  Consider+  data T (a :: k1) k2 (x :: k2) = MkT (S a k2 x)+  data S (b :: k3) k4 (y :: k4) = MkS (T b k4 y)++We do kind inference as follows:++* Step 1: inferInitialKinds, and in particular kcInferDeclHeader.+  Make a unification variable for each of the Required and Specified+  type varialbes in the header.++  Record the connection between the Names the user wrote and the+  fresh unification variables in the tcTyConScopedTyVars field+  of the TcTyCon we are making+      [ (a,  aa)+      , (k1, kk1)+      , (k2, kk2)+      , (x,  xx) ]+  (I'm using the convention that double letter like 'aa' or 'kk'+  mean a unification variable.)++  These unification variables+    - Are TyVarTvs: that is, unification variables that can+      unify only with other type variables.+      See Note [Signature skolems] in TcType++    - Have complete fresh Names; see TcMType+      Note [Unification variables need fresh Names]++  Assign initial monomorophic kinds to S, T+          T :: kk1 -> * -> kk2 -> *+          S :: kk3 -> * -> kk4 -> *++* Step 2: kcTyClDecl. Extend the environment with a TcTyCon for S and+  T, with these monomophic kinds.  Now kind-check the declarations,+  and solve the resulting equalities.  The goal here is to discover+  constraints on all these unification variables.++  Here we find that kk1 := kk3, and kk2 := kk4.++  This is why we can't use skolems for kk1 etc; they have to+  unify with each other.++* Step 3: generaliseTcTyCon. Generalise each TyCon in turn.+  We find the free variables of the kind, skolemise them,+  sort them out into Inferred/Required/Specified (see the above+  Note [Required, Specified, and Inferred for types]),+  and perform some validity checks.++  This makes the utterly-final TyConBinders for the TyCon.++  All this is very similar at the level of terms: see TcBinds+  Note [Quantified variables in partial type signatures]++  But there some tricky corners: Note [Tricky scoping in generaliseTcTyCon]++* Step 4.  Extend the type environment with a TcTyCon for S and T, now+  with their utterly-final polymorphic kinds (needed for recursive+  occurrences of S, T).  Now typecheck the declarations, and build the+  final AlgTyCOn for S and T resp.++The first three steps are in kcTyClGroup; the fourth is in+tcTyClDecls.++There are some wrinkles++* Do not default TyVarTvs.  We always want to kind-generalise over+  TyVarTvs, and /not/ default them to Type. By definition a TyVarTv is+  not allowed to unify with a type; it must stand for a type+  variable. Hence the check in TcSimplify.defaultTyVarTcS, and+  TcMType.defaultTyVar.  Here's another example (#14555):+     data Exp :: [TYPE rep] -> TYPE rep -> Type where+        Lam :: Exp (a:xs) b -> Exp xs (a -> b)+  We want to kind-generalise over the 'rep' variable.+  #14563 is another example.++* Duplicate type variables. Consider #11203+    data SameKind :: k -> k -> *+    data Q (a :: k1) (b :: k2) c = MkQ (SameKind a b)+  Here we will unify k1 with k2, but this time doing so is an error,+  because k1 and k2 are bound in the same declaration.++  We spot this during validity checking (findDupTyVarTvs),+  in generaliseTcTyCon.++* Required arguments.  Even the Required arguments should be made+  into TyVarTvs, not skolems.  Consider+    data T k (a :: k)+  Here, k is a Required, dependent variable. For uniformity, it is helpful+  to have k be a TyVarTv, in parallel with other dependent variables.++* Duplicate skolemisation is expected.  When generalising in Step 3,+  we may find that one of the variables we want to quantify has+  already been skolemised.  For example, suppose we have already+  generalise S. When we come to T we'll find that kk1 (now the same as+  kk3) has already been skolemised.++  That's fine -- but it means that+    a) when collecting quantification candidates, in+       candidateQTyVarsOfKind, we must collect skolems+    b) quantifyTyVars should be a no-op on such a skolem++Note [Tricky scoping in generaliseTcTyCon]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider #16342+  class C (a::ka) x where+    cop :: D a x => x -> Proxy a -> Proxy a+    cop _ x = x :: Proxy (a::ka)++  class D (b::kb) y where+    dop :: C b y => y -> Proxy b -> Proxy b+    dop _ x = x :: Proxy (b::kb)++C and D are mutually recursive, by the time we get to+generaliseTcTyCon we'll have unified kka := kkb.++But when typechecking the default declarations for 'cop' and 'dop' in+tcDlassDecl2 we need {a, ka} and {b, kb} respectively to be in scope.+But at that point all we have is the utterly-final Class itself.++Conclusion: the classTyVars of a class must have the same Name as+that originally assigned by the user.  In our example, C must have+classTyVars {a, ka, x} while D has classTyVars {a, kb, y}.  Despite+the fact that kka and kkb got unified!++We achieve this sleight of hand in generaliseTcTyCon, using+the specialised function zonkRecTyVarBndrs.  We make the call+   zonkRecTyVarBndrs [ka,a,x] [kkb,aa,xxx]+where the [ka,a,x] are the Names originally assigned by the user, and+[kkb,aa,xx] are the corresponding (post-zonking, skolemised) TcTyVars.+zonkRecTyVarBndrs builds a recursive ZonkEnv that binds+   kkb :-> (ka :: <zonked kind of kkb>)+   aa  :-> (a  :: <konked kind of aa>)+   etc+That is, it maps each skolemised TcTyVars to the utterly-final+TyVar to put in the class, with its correct user-specified name.+When generalising D we'll do the same thing, but the ZonkEnv will map+   kkb :-> (kb :: <zonked kind of kkb>)+   bb  :-> (b  :: <konked kind of bb>)+   etc+Note that 'kkb' again appears in the domain of the mapping, but this+time mapped to 'kb'.  That's how C and D end up with differently-named+final TyVars despite the fact that we unified kka:=kkb++zonkRecTyVarBndrs we need to do knot-tying because of the need to+apply this same substitution to the kind of each.  -}++--------------+tcExtendKindEnvWithTyCons :: [TcTyCon] -> TcM a -> TcM a+tcExtendKindEnvWithTyCons tcs+  = tcExtendKindEnvList [ (tyConName tc, ATcTyCon tc) | tc <- tcs ]++--------------+mkPromotionErrorEnv :: [LTyClDecl GhcRn] -> TcTypeEnv+-- Maps each tycon/datacon to a suitable promotion error+--    tc :-> APromotionErr TyConPE+--    dc :-> APromotionErr RecDataConPE+--    See Note [Recursion and promoting data constructors]++mkPromotionErrorEnv decls+  = foldr (plusNameEnv . mk_prom_err_env . unLoc)+          emptyNameEnv decls++mk_prom_err_env :: TyClDecl GhcRn -> TcTypeEnv+mk_prom_err_env (ClassDecl { tcdLName = L _ nm, tcdATs = ats })+  = unitNameEnv nm (APromotionErr ClassPE)+    `plusNameEnv`+    mkNameEnv [ (name, APromotionErr TyConPE)+              | (dL->L _ (FamilyDecl { fdLName = (dL->L _ name) })) <- ats ]++mk_prom_err_env (DataDecl { tcdLName = (dL->L _ name)+                          , tcdDataDefn = HsDataDefn { dd_cons = cons } })+  = unitNameEnv name (APromotionErr TyConPE)+    `plusNameEnv`+    mkNameEnv [ (con, APromotionErr RecDataConPE)+              | (dL->L _ con') <- cons+              , (dL->L _ con)  <- getConNames con' ]++mk_prom_err_env decl+  = unitNameEnv (tcdName decl) (APromotionErr TyConPE)+    -- Works for family declarations too++--------------+inferInitialKinds :: [LTyClDecl GhcRn] -> TcM [TcTyCon]+-- Returns a TcTyCon for each TyCon bound by the decls,+-- each with its initial kind++inferInitialKinds decls+  = do { traceTc "inferInitialKinds {" $ ppr (map (tcdName . unLoc) decls)+       ; tcs <- concatMapM infer_initial_kind decls+       ; traceTc "inferInitialKinds done }" empty+       ; return tcs }+  where+    infer_initial_kind = addLocM (getInitialKind InitialKindInfer)++-- Check type/class declarations against their standalone kind signatures or+-- CUSKs, producing a generalized TcTyCon for each.+checkInitialKinds :: [(LTyClDecl GhcRn, SAKS_or_CUSK)] -> TcM [TcTyCon]+checkInitialKinds decls+  = do { traceTc "checkInitialKinds {" $ ppr (mapFst (tcdName . unLoc) decls)+       ; tcs <- concatMapM check_initial_kind decls+       ; traceTc "checkInitialKinds done }" empty+       ; return tcs }+  where+    check_initial_kind (ldecl, msig) =+      addLocM (getInitialKind (InitialKindCheck msig)) ldecl++-- | Get the initial kind of a TyClDecl, either generalized or non-generalized,+-- depending on the 'InitialKindStrategy'.+getInitialKind :: InitialKindStrategy -> TyClDecl GhcRn -> TcM [TcTyCon]++-- Allocate a fresh kind variable for each TyCon and Class+-- For each tycon, return a TcTyCon with kind k+-- where k is the kind of tc, derived from the LHS+--         of the definition (and probably including+--         kind unification variables)+--      Example: data T a b = ...+--      return (T, kv1 -> kv2 -> kv3)+--+-- This pass deals with (ie incorporates into the kind it produces)+--   * The kind signatures on type-variable binders+--   * The result kinds signature on a TyClDecl+--+-- No family instances are passed to checkInitialKinds/inferInitialKinds+getInitialKind strategy+    (ClassDecl { tcdLName = dL->L _ name+               , tcdTyVars = ktvs+               , tcdATs = ats })+  = do { cls <- kcDeclHeader strategy name ClassFlavour ktvs $+                return (TheKind constraintKind)+       ; let parent_tv_prs = tcTyConScopedTyVars cls+            -- See Note [Don't process associated types in getInitialKind]+       ; inner_tcs <-+           tcExtendNameTyVarEnv parent_tv_prs $+           mapM (addLocM (getAssocFamInitialKind cls)) ats+       ; return (cls : inner_tcs) }+  where+    getAssocFamInitialKind cls =+      case strategy of+        InitialKindInfer -> get_fam_decl_initial_kind (Just cls)+        InitialKindCheck _ -> check_initial_kind_assoc_fam cls++getInitialKind strategy+    (DataDecl { tcdLName = dL->L _ name+              , tcdTyVars = ktvs+              , tcdDataDefn = HsDataDefn { dd_kindSig = m_sig+                                         , dd_ND = new_or_data } })+  = do  { let flav = newOrDataToFlavour new_or_data+              ctxt = DataKindCtxt name+        ; tc <- kcDeclHeader strategy name flav ktvs $+                case m_sig of+                  Just ksig -> TheKind <$> tcLHsKindSig ctxt ksig+                  Nothing -> dataDeclDefaultResultKind new_or_data+        ; return [tc] }++getInitialKind InitialKindInfer (FamDecl { tcdFam = decl })+  = do { tc <- get_fam_decl_initial_kind Nothing decl+       ; return [tc] }++getInitialKind (InitialKindCheck msig) (FamDecl { tcdFam =+  FamilyDecl { fdLName     = unLoc -> name+             , fdTyVars    = ktvs+             , fdResultSig = unLoc -> resultSig+             , fdInfo      = info } } )+  = do { let flav = getFamFlav Nothing info+             ctxt = TyFamResKindCtxt name+       ; tc <- kcDeclHeader (InitialKindCheck msig) name flav ktvs $+               case famResultKindSignature resultSig of+                 Just ksig -> TheKind <$> tcLHsKindSig ctxt ksig+                 Nothing ->+                   case msig of+                     CUSK -> return (TheKind liftedTypeKind)+                     SAKS _ -> return AnyKind+       ; return [tc] }++getInitialKind strategy+    (SynDecl { tcdLName = dL->L _ name+             , tcdTyVars = ktvs+             , tcdRhs = rhs })+  = do { let ctxt = TySynKindCtxt name+       ; tc <- kcDeclHeader strategy name TypeSynonymFlavour ktvs $+               case hsTyKindSig rhs of+                 Just rhs_sig -> TheKind <$> tcLHsKindSig ctxt rhs_sig+                 Nothing -> return AnyKind+       ; return [tc] }++getInitialKind _ (DataDecl _ _ _ _ (XHsDataDefn nec)) = noExtCon nec+getInitialKind _ (FamDecl {tcdFam = XFamilyDecl nec}) = noExtCon nec+getInitialKind _ (XTyClDecl nec) = noExtCon nec++get_fam_decl_initial_kind+  :: Maybe TcTyCon -- ^ Just cls <=> this is an associated family of class cls+  -> FamilyDecl GhcRn+  -> TcM TcTyCon+get_fam_decl_initial_kind mb_parent_tycon+    FamilyDecl { fdLName     = (dL->L _ name)+               , fdTyVars    = ktvs+               , fdResultSig = (dL->L _ resultSig)+               , fdInfo      = info }+  = kcDeclHeader InitialKindInfer name flav ktvs $+    case resultSig of+      KindSig _ ki                              -> TheKind <$> tcLHsKindSig ctxt ki+      TyVarSig _ (dL->L _ (KindedTyVar _ _ ki)) -> TheKind <$> tcLHsKindSig ctxt ki+      _ -- open type families have * return kind by default+        | tcFlavourIsOpen flav              -> return (TheKind liftedTypeKind)+               -- closed type families have their return kind inferred+               -- by default+        | otherwise                         -> return AnyKind+  where+    flav = getFamFlav mb_parent_tycon info+    ctxt = TyFamResKindCtxt name+get_fam_decl_initial_kind _ (XFamilyDecl nec) = noExtCon nec++-- See Note [Standalone kind signatures for associated types]+check_initial_kind_assoc_fam+  :: TcTyCon -- parent class+  -> FamilyDecl GhcRn+  -> TcM TcTyCon+check_initial_kind_assoc_fam cls+  FamilyDecl+    { fdLName     = unLoc -> name+    , fdTyVars    = ktvs+    , fdResultSig = unLoc -> resultSig+    , fdInfo      = info }+  = kcDeclHeader (InitialKindCheck CUSK) name flav ktvs $+    case famResultKindSignature resultSig of+      Just ksig -> TheKind <$> tcLHsKindSig ctxt ksig+      Nothing -> return (TheKind liftedTypeKind)+  where+    ctxt = TyFamResKindCtxt name+    flav = getFamFlav (Just cls) info+check_initial_kind_assoc_fam _ (XFamilyDecl nec) = noExtCon nec++{- Note [Standalone kind signatures for associated types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++If associated types had standalone kind signatures, would they wear them++---------------------------+------------------------------+  like this? (OUT)         |   or like this? (IN)+---------------------------+------------------------------+  type T :: Type -> Type   |   class C a where+  class C a where          |     type T :: Type -> Type+    type T a               |     type T a++The (IN) variant is syntactically ambiguous:++  class C a where+    type T :: a   -- standalone kind signature?+    type T :: a   -- declaration header?++The (OUT) variant does not suffer from this issue, but it might not be the+direction in which we want to take Haskell: we seek to unify type families and+functions, and, by extension, associated types with class methods. And yet we+give class methods their signatures inside the class, not outside. Neither do+we have the counterpart of InstanceSigs for StandaloneKindSignatures.++For now, we dodge the question by using CUSKs for associated types instead of+standalone kind signatures. This is a simple addition to the rule we used to+have before standalone kind signatures:++  old rule:  associated type has a CUSK iff its parent class has a CUSK+  new rule:  associated type has a CUSK iff its parent class has a CUSK or a standalone kind signature++-}++-- See Note [Data declaration default result kind]+dataDeclDefaultResultKind :: NewOrData -> TcM ContextKind+dataDeclDefaultResultKind new_or_data = do+  -- See Note [Implementation of UnliftedNewtypes]+  unlifted_newtypes <- xoptM LangExt.UnliftedNewtypes+  return $ case new_or_data of+    NewType | unlifted_newtypes -> OpenKind+    _ -> TheKind liftedTypeKind++{- Note [Data declaration default result kind]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++When the user has not written an inline result kind annotation on a data+declaration, we assume it to be 'Type'. That is, the following declarations+D1 and D2 are considered equivalent:++  data D1         where ...+  data D2 :: Type where ...++The consequence of this assumption is that we reject D3 even though we+accept D4:++  data D3 where+    MkD3 :: ... -> D3 param++  data D4 :: Type -> Type where+    MkD4 :: ... -> D4 param++However, there's a twist: when -XUnliftedNewtypes are enabled, we must relax+the assumed result kind to (TYPE r) for newtypes:++  newtype D5 where+    MkD5 :: Int# -> D5++dataDeclDefaultResultKind takes care to produce the appropriate result kind.+-}++---------------------------------+getFamFlav+  :: Maybe TcTyCon    -- ^ Just cls <=> this is an associated family of class cls+  -> FamilyInfo pass+  -> TyConFlavour+getFamFlav mb_parent_tycon info =+  case info of+    DataFamily         -> DataFamilyFlavour mb_parent_tycon+    OpenTypeFamily     -> OpenTypeFamilyFlavour mb_parent_tycon+    ClosedTypeFamily _ -> ASSERT( isNothing mb_parent_tycon ) -- See Note [Closed type family mb_parent_tycon]+                          ClosedTypeFamilyFlavour++{- Note [Closed type family mb_parent_tycon]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There's no way to write a closed type family inside a class declaration:++  class C a where+    type family F a where  -- error: parse error on input ‘where’++In fact, it is not clear what the meaning of such a declaration would be.+Therefore, 'mb_parent_tycon' of any closed type family has to be Nothing.+-}++------------------------------------------------------------------------+kcLTyClDecl :: LTyClDecl GhcRn -> TcM ()+  -- See Note [Kind checking for type and class decls]+kcLTyClDecl (dL->L loc decl)+  = setSrcSpan loc $+    tcAddDeclCtxt decl $+    do { traceTc "kcTyClDecl {" (ppr tc_name)+       ; kcTyClDecl decl+       ; traceTc "kcTyClDecl done }" (ppr tc_name) }+  where+    tc_name = tyClDeclLName decl++kcTyClDecl :: TyClDecl GhcRn -> TcM ()+-- This function is used solely for its side effect on kind variables+-- NB kind signatures on the type variables and+--    result kind signature have already been dealt with+--    by inferInitialKind, so we can ignore them here.++kcTyClDecl (DataDecl { tcdLName    = (dL->L _ name)+                     , tcdDataDefn = defn })+  | HsDataDefn { dd_cons = cons@((dL->L _ (ConDeclGADT {})) : _)+               , dd_ctxt = (dL->L _ [])+               , dd_ND = new_or_data } <- defn+  = do { tyCon <- kcLookupTcTyCon name+         -- See Note [Implementation of UnliftedNewtypes] STEP 2+       ; kcConDecls new_or_data (tyConResKind tyCon) cons+       }+    -- hs_tvs and dd_kindSig already dealt with in inferInitialKind+    -- This must be a GADT-style decl,+    --        (see invariants of DataDefn declaration)+    -- so (a) we don't need to bring the hs_tvs into scope, because the+    --        ConDecls bind all their own variables+    --    (b) dd_ctxt is not allowed for GADT-style decls, so we can ignore it++  | HsDataDefn { dd_ctxt = ctxt+               , dd_cons = cons+               , dd_ND = new_or_data } <- defn+  = bindTyClTyVars name $ \ _ _ ->+    do { _ <- tcHsContext ctxt+       ; tyCon <- kcLookupTcTyCon name+       ; kcConDecls new_or_data (tyConResKind tyCon) cons+       }++kcTyClDecl (SynDecl { tcdLName = dL->L _ name, tcdRhs = rhs })+  = bindTyClTyVars name $ \ _ res_kind ->+    discardResult $ tcCheckLHsType rhs res_kind+        -- NB: check against the result kind that we allocated+        -- in inferInitialKinds.++kcTyClDecl (ClassDecl { tcdLName = (dL->L _ name)+                      , tcdCtxt = ctxt, tcdSigs = sigs })+  = bindTyClTyVars name $ \ _ _ ->+    do  { _ <- tcHsContext ctxt+        ; mapM_ (wrapLocM_ kc_sig) sigs }+  where+    kc_sig (ClassOpSig _ _ nms op_ty) = kcClassSigType skol_info nms op_ty+    kc_sig _                          = return ()++    skol_info = TyConSkol ClassFlavour name++kcTyClDecl (FamDecl _ (FamilyDecl { fdLName  = (dL->L _ fam_tc_name)+                                  , fdInfo   = fd_info }))+-- closed type families look at their equations, but other families don't+-- do anything here+  = case fd_info of+      ClosedTypeFamily (Just eqns) ->+        do { fam_tc <- kcLookupTcTyCon fam_tc_name+           ; mapM_ (kcTyFamInstEqn fam_tc) eqns }+      _ -> return ()+kcTyClDecl (FamDecl _ (XFamilyDecl nec))        = noExtCon nec+kcTyClDecl (DataDecl _ _ _ _ (XHsDataDefn nec)) = noExtCon nec+kcTyClDecl (XTyClDecl nec)                      = noExtCon nec++-------------------++-- | Unify the kind of the first type provided with the newtype's kind, if+-- -XUnliftedNewtypes is enabled and the NewOrData indicates Newtype. If there+-- is more than one type provided, do nothing: the newtype is in error, and this+-- will be caught in validity checking (which will give a better error than we can+-- here.)+unifyNewtypeKind :: DynFlags+                 -> NewOrData+                 -> [LHsType GhcRn]   -- user-written argument types, should be just 1+                 -> [TcType]          -- type-checked argument types, should be just 1+                 -> TcKind            -- expected kind of newtype+                 -> TcM [TcType]      -- casted argument types (should be just 1)+                                      --  result = orig_arg |> kind_co+                                      -- where kind_co :: orig_arg_ki ~N expected_ki+unifyNewtypeKind dflags NewType [hs_ty] [tc_ty] ki+  | xopt LangExt.UnliftedNewtypes dflags+  = do { traceTc "unifyNewtypeKind" (ppr hs_ty $$ ppr tc_ty $$ ppr ki)+       ; co <- unifyKind (Just (unLoc hs_ty)) (typeKind tc_ty) ki+       ; return [tc_ty `mkCastTy` co] }+  -- See comments above: just do nothing here+unifyNewtypeKind _ _ _ arg_tys _ = return arg_tys++-- Type check the types of the arguments to a data constructor.+-- This includes doing kind unification if the type is a newtype.+-- See Note [Implementation of UnliftedNewtypes] for why we need+-- the first two arguments.+kcConArgTys :: NewOrData -> Kind -> [LHsType GhcRn] -> TcM ()+kcConArgTys new_or_data res_kind arg_tys = do+  { arg_tc_tys <- mapM (tcHsOpenType . getBangType) arg_tys+    -- See Note [Implementation of UnliftedNewtypes], STEP 2+  ; dflags <- getDynFlags+  ; discardResult $+      unifyNewtypeKind dflags new_or_data arg_tys arg_tc_tys res_kind+  }++kcConDecls :: NewOrData+           -> Kind             -- The result kind signature+           -> [LConDecl GhcRn] -- The data constructors+           -> TcM ()+kcConDecls new_or_data res_kind cons+  = mapM_ (wrapLocM_ (kcConDecl new_or_data final_res_kind)) cons+  where+    (_, final_res_kind) = splitPiTys res_kind+        -- See Note [kcConDecls result kind]++-- Kind check a data constructor. In additional to the data constructor,+-- we also need to know about whether or not its corresponding type was+-- declared with data or newtype, and we need to know the result kind of+-- this type. See Note [Implementation of UnliftedNewtypes] for why+-- we need the first two arguments.+kcConDecl :: NewOrData+          -> Kind  -- Result kind of the type constructor+                   -- Usually Type but can be TYPE UnliftedRep+                   -- or even TYPE r, in the case of unlifted newtype+          -> ConDecl GhcRn+          -> TcM ()+kcConDecl new_or_data res_kind (ConDeclH98+  { con_name = name, con_ex_tvs = ex_tvs+  , con_mb_cxt = ex_ctxt, con_args = args })+  = addErrCtxt (dataConCtxtName [name]) $+    discardResult                   $+    bindExplicitTKBndrs_Tv ex_tvs $+    do { _ <- tcHsMbContext ex_ctxt+       ; kcConArgTys new_or_data res_kind (hsConDeclArgTys args)+         -- We don't need to check the telescope here,+         -- because that's done in tcConDecl+       }++kcConDecl new_or_data res_kind (ConDeclGADT+    { con_names = names, con_qvars = qtvs, con_mb_cxt = cxt+    , con_args = args, con_res_ty = res_ty })+  | HsQTvs { hsq_ext = implicit_tkv_nms+           , hsq_explicit = explicit_tkv_nms } <- qtvs+  = -- Even though the GADT-style data constructor's type is closed,+    -- we must still kind-check the type, because that may influence+    -- the inferred kind of the /type/ constructor.  Example:+    --    data T f a where+    --      MkT :: f a -> T f a+    -- If we don't look at MkT we won't get the correct kind+    -- for the type constructor T+    addErrCtxt (dataConCtxtName names) $+    discardResult $+    bindImplicitTKBndrs_Tv implicit_tkv_nms $+    bindExplicitTKBndrs_Tv explicit_tkv_nms $+        -- Why "_Tv"?  See Note [Kind-checking for GADTs]+    do { _ <- tcHsMbContext cxt+       ; kcConArgTys new_or_data res_kind (hsConDeclArgTys args)+       ; _ <- tcHsOpenType res_ty+       ; return () }+kcConDecl _ _ (ConDeclGADT _ _ _ (XLHsQTyVars nec) _ _ _ _) = noExtCon nec+kcConDecl _ _ (XConDecl nec) = noExtCon nec++{- Note [kcConDecls result kind]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We might have e.g.+    data T a :: Type -> Type where ...+or+    newtype instance N a :: Type -> Type  where ..+in which case, the 'res_kind' passed to kcConDecls will be+   Type->Type++We must look past those arrows, or even foralls, to the Type in the+corner, to pass to kcConDecl c.f. #16828. Hence the splitPiTys here.++I am a bit concerned about tycons with a declaration like+   data T a :: Type -> forall k. k -> Type  where ...++It does not have a CUSK, so kcInferDeclHeader will make a TcTyCon+with tyConResKind of Type -> forall k. k -> Type.  Even that is fine:+the splitPiTys will look past the forall.  But I'm bothered about+what if the type "in the corner" metions k?  This is incredibly+obscure but something like this could be bad:+   data T a :: Type -> foral k. k -> TYPE (F k) where ...++I bet we are not quite right here, but my brain suffered a buffer+overflow and I thought it best to nail the common cases right now.++Note [Recursion and promoting data constructors]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We don't want to allow promotion in a strongly connected component+when kind checking.++Consider:+  data T f = K (f (K Any))++When kind checking the `data T' declaration the local env contains the+mappings:+  T -> ATcTyCon <some initial kind>+  K -> APromotionErr++APromotionErr is only used for DataCons, and only used during type checking+in tcTyClGroup.++Note [Kind-checking for GADTs]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++  data Proxy a where+    MkProxy1 :: forall k (b :: k). Proxy b+    MkProxy2 :: forall j (c :: j). Proxy c++It seems reasonable that this should be accepted. But something very strange+is going on here: when we're kind-checking this declaration, we need to unify+the kind of `a` with k and j -- even though k and j's scopes are local to the type of+MkProxy{1,2}. The best approach we've come up with is to use TyVarTvs during+the kind-checking pass. First off, note that it's OK if the kind-checking pass+is too permissive: we'll snag the problems in the type-checking pass later.+(This extra permissiveness might happen with something like++  data SameKind :: k -> k -> Type+  data Bad a where+    MkBad :: forall k1 k2 (a :: k1) (b :: k2). Bad (SameKind a b)++which would be accepted if k1 and k2 were TyVarTvs. This is correctly rejected+in the second pass, though. Test case: polykinds/TyVarTvKinds3)+Recall that the kind-checking pass exists solely to collect constraints+on the kinds and to power unification.++To achieve the use of TyVarTvs, we must be careful to use specialized functions+that produce TyVarTvs, not ordinary skolems. This is why we need+kcExplicitTKBndrs and kcImplicitTKBndrs in TcHsType, separate from their+tc... variants.++The drawback of this approach is sometimes it will accept a definition that+a (hypothetical) declarative specification would likely reject. As a general+rule, we don't want to allow polymorphic recursion without a CUSK. Indeed,+the whole point of CUSKs is to allow polymorphic recursion. Yet, the TyVarTvs+approach allows a limited form of polymorphic recursion *without* a CUSK.++To wit:+  data T a = forall k (b :: k). MkT (T b) Int+  (test case: dependent/should_compile/T14066a)++Note that this is polymorphically recursive, with the recursive occurrence+of T used at a kind other than a's kind. The approach outlined here accepts+this definition, because this kind is still a kind variable (and so the+TyVarTvs unify). Stepping back, I (Richard) have a hard time envisioning a+way to describe exactly what declarations will be accepted and which will+be rejected (without a CUSK). However, the accepted definitions are indeed+well-kinded and any rejected definitions would be accepted with a CUSK,+and so this wrinkle need not cause anyone to lose sleep.++************************************************************************+*                                                                      *+\subsection{Type checking}+*                                                                      *+************************************************************************++Note [Type checking recursive type and class declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+At this point we have completed *kind-checking* of a mutually+recursive group of type/class decls (done in kcTyClGroup). However,+we discarded the kind-checked types (eg RHSs of data type decls);+note that kcTyClDecl returns ().  There are two reasons:++  * It's convenient, because we don't have to rebuild a+    kinded HsDecl (a fairly elaborate type)++  * It's necessary, because after kind-generalisation, the+    TyCons/Classes may now be kind-polymorphic, and hence need+    to be given kind arguments.++Example:+       data T f a = MkT (f a) (T f a)+During kind-checking, we give T the kind T :: k1 -> k2 -> *+and figure out constraints on k1, k2 etc. Then we generalise+to get   T :: forall k. (k->*) -> k -> *+So now the (T f a) in the RHS must be elaborated to (T k f a).++However, during tcTyClDecl of T (above) we will be in a recursive+"knot". So we aren't allowed to look at the TyCon T itself; we are only+allowed to put it (lazily) in the returned structures.  But when+kind-checking the RHS of T's decl, we *do* need to know T's kind (so+that we can correctly elaboarate (T k f a).  How can we get T's kind+without looking at T?  Delicate answer: during tcTyClDecl, we extend++  *Global* env with T -> ATyCon (the (not yet built) final TyCon for T)+  *Local*  env with T -> ATcTyCon (TcTyCon with the polymorphic kind of T)++Then:++  * During TcHsType.tcTyVar we look in the *local* env, to get the+    fully-known, not knot-tied TcTyCon for T.++  * Then, in TcHsSyn.zonkTcTypeToType (and zonkTcTyCon in particular)+    we look in the *global* env to get the TyCon.++This fancy footwork (with two bindings for T) is only necessary for the+TyCons or Classes of this recursive group.  Earlier, finished groups,+live in the global env only.++See also Note [Kind checking recursive type and class declarations]++Note [Kind checking recursive type and class declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Before we can type-check the decls, we must kind check them. This+is done by establishing an "initial kind", which is a rather uninformed+guess at a tycon's kind (by counting arguments, mainly) and then+using this initial kind for recursive occurrences.++The initial kind is stored in exactly the same way during+kind-checking as it is during type-checking (Note [Type checking+recursive type and class declarations]): in the *local* environment,+with ATcTyCon. But we still must store *something* in the *global*+environment. Even though we discard the result of kind-checking, we+sometimes need to produce error messages. These error messages will+want to refer to the tycons being checked, except that they don't+exist yet, and it would be Terribly Annoying to get the error messages+to refer back to HsSyn. So we create a TcTyCon and put it in the+global env. This tycon can print out its name and knows its kind, but+any other action taken on it will panic. Note that TcTyCons are *not*+knot-tied, unlike the rather valid but knot-tied ones that occur+during type-checking.++Note [Declarations for wired-in things]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For wired-in things we simply ignore the declaration+and take the wired-in information.  That avoids complications.+e.g. the need to make the data constructor worker name for+     a constraint tuple match the wired-in one++Note [Implementation of UnliftedNewtypes]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Expected behavior of UnliftedNewtypes:++* Proposal: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0013-unlifted-newtypes.rst+* Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/98++What follows is a high-level overview of the implementation of the+proposal.++STEP 1: Getting the initial kind, as done by inferInitialKind. We have+two sub-cases (assuming we have a newtype and -XUnliftedNewtypes is enabled):++* With a CUSK: no change in kind-checking; the tycon is given the kind+  the user writes, whatever it may be.++* Without a CUSK: If there is no kind signature, the tycon is given+  a kind `TYPE r`, for a fresh unification variable `r`.++STEP 2: Kind-checking, as done by kcTyClDecl. This step is skipped for CUSKs.+The key function here is kcConDecl, which looks at an individual constructor+declaration. In the unlifted-newtypes case (i.e., -XUnliftedNewtypes and,+indeed, we are processing a newtype), we call unifyNewtypeKind, which is a+thin wrapper around unifyKind, unifying the kind of the one argument and the+result kind of the newtype tycon.++Examples of newtypes affected by STEP 2, assuming -XUnliftedNewtypes is+enabled (we use r0 to denote a unification variable):++newtype Foo rep = MkFoo (forall (a :: TYPE rep). a)++ kcConDecl unifies (TYPE r0) with (TYPE rep), where (TYPE r0)+  is the kind that inferInitialKind invented for (Foo rep).++data Color = Red | Blue+type family Interpret (x :: Color) :: RuntimeRep where+  Interpret 'Red = 'IntRep+  Interpret 'Blue = 'WordRep+data family Foo (x :: Color) :: TYPE (Interpret x)+newtype instance Foo 'Red = FooRedC Int#++ kcConDecl unifies TYPE (Interpret 'Red) with TYPE 'IntRep++Note that, in the GADT case, we might have a kind signature with arrows+(newtype XYZ a b :: Type -> Type where ...). We want only the final+component of the kind for checking in kcConDecl, so we call etaExpandAlgTyCon+in kcTyClDecl.++STEP 3: Type-checking (desugaring), as done by tcTyClDecl. The key function+here is tcConDecl. Once again, we must call unifyNewtypeKind, for two reasons:++  A. It is possible that a GADT has a CUSK. (Note that this is *not*+     possible for H98 types. Recall that CUSK types don't go through+     kcTyClDecl, so we might not have done this kind check.+  B. We need to produce the coercion to put on the argument type+     if the kinds are different (for both H98 and GADT).++Example of (B):++type family F a where+  F Int = LiftedRep++newtype N :: TYPE (F Int) where+  MkN :: Int -> N++We really need to have the argument to MkN be (Int |> TYPE (sym axF)), where+axF :: F Int ~ LiftedRep. That way, the argument kind is the same as the+newtype kind, which is the principal correctness condition for newtypes.+This call to unifyNewtypeKind is what produces that coercion.++Note that this is possible in the H98 case only for a data family, because+the H98 syntax doesn't permit a kind signature on the newtype itself.+++1. In tcFamDecl1, we suppress a tcIsLiftedTypeKind check if+   UnliftedNewtypes is on. This allows us to write things like:+     data family Foo :: TYPE 'IntRep++2. In a newtype instance (with -XUnliftedNewtypes), if the user does+   not write a kind signature, we want to allow the possibility that+   the kind is not Type, so we use newOpenTypeKind instead of liftedTypeKind.+   This is done in tcDataFamInstHeader in TcInstDcls. Example:++       data family Bar (a :: RuntimeRep) :: TYPE a+       newtype instance Bar 'IntRep = BarIntC Int#+       newtype instance Bar 'WordRep :: TYPE 'WordRep where+         BarWordC :: Word# -> Bar 'WordRep++   The data instance corresponding to IntRep does not specify a kind signature,+   so tc_kind_sig just returns `TYPE r0` (where `r0` is a fresh metavariable).+   The data instance corresponding to WordRep does have a kind signature, so+   we use that kind signature.++3. A data family and its newtype instance may be declared with slightly+   different kinds. See Note [Unifying data family kinds] in TcInstDcls.++There's also a change in the renamer:++* In RnSource.rnTyClDecl, enabling UnliftedNewtypes changes what is means+  for a newtype to have a CUSK. This is necessary since UnliftedNewtypes+  means that, for newtypes without kind signatures, we must use the field+  inside the data constructor to determine the result kind.+  See Note [Unlifted Newtypes and CUSKs] for more detail.++For completeness, it was also neccessary to make coerce work on+unlifted types, resolving #13595.++-}++tcTyClDecl :: RolesInfo -> LTyClDecl GhcRn -> TcM (TyCon, [DerivInfo])+tcTyClDecl roles_info (dL->L loc decl)+  | Just thing <- wiredInNameTyThing_maybe (tcdName decl)+  = case thing of -- See Note [Declarations for wired-in things]+      ATyCon tc -> return (tc, wiredInDerivInfo tc decl)+      _ -> pprPanic "tcTyClDecl" (ppr thing)++  | otherwise+  = setSrcSpan loc $ tcAddDeclCtxt decl $+    do { traceTc "---- tcTyClDecl ---- {" (ppr decl)+       ; (tc, deriv_infos) <- tcTyClDecl1 Nothing roles_info decl+       ; traceTc "---- tcTyClDecl end ---- }" (ppr tc)+       ; return (tc, deriv_infos) }++noDerivInfos :: a -> (a, [DerivInfo])+noDerivInfos a = (a, [])++wiredInDerivInfo :: TyCon -> TyClDecl GhcRn -> [DerivInfo]+wiredInDerivInfo tycon decl+  | DataDecl { tcdDataDefn = dataDefn } <- decl+  , HsDataDefn { dd_derivs = derivs } <- dataDefn+  = [ DerivInfo { di_rep_tc = tycon+                , di_scoped_tvs =+                    if isFunTyCon tycon || isPrimTyCon tycon+                       then []  -- no tyConTyVars+                       else mkTyVarNamePairs (tyConTyVars tycon)+                , di_clauses = unLoc derivs+                , di_ctxt = tcMkDeclCtxt decl } ]+wiredInDerivInfo _ _ = []++  -- "type family" declarations+tcTyClDecl1 :: Maybe Class -> RolesInfo -> TyClDecl GhcRn -> TcM (TyCon, [DerivInfo])+tcTyClDecl1 parent _roles_info (FamDecl { tcdFam = fd })+  = fmap noDerivInfos $+    tcFamDecl1 parent fd++  -- "type" synonym declaration+tcTyClDecl1 _parent roles_info+            (SynDecl { tcdLName = (dL->L _ tc_name)+                     , tcdRhs   = rhs })+  = ASSERT( isNothing _parent )+    fmap noDerivInfos $+    bindTyClTyVars tc_name $ \ binders res_kind ->+    tcTySynRhs roles_info tc_name binders res_kind rhs++  -- "data/newtype" declaration+tcTyClDecl1 _parent roles_info+            decl@(DataDecl { tcdLName = (dL->L _ tc_name)+                           , tcdDataDefn = defn })+  = ASSERT( isNothing _parent )+    bindTyClTyVars tc_name $ \ tycon_binders res_kind ->+    tcDataDefn (tcMkDeclCtxt decl) roles_info tc_name+               tycon_binders res_kind defn++tcTyClDecl1 _parent roles_info+            (ClassDecl { tcdLName = (dL->L _ class_name)+                       , tcdCtxt = hs_ctxt+                       , tcdMeths = meths+                       , tcdFDs = fundeps+                       , tcdSigs = sigs+                       , tcdATs = ats+                       , tcdATDefs = at_defs })+  = ASSERT( isNothing _parent )+    do { clas <- tcClassDecl1 roles_info class_name hs_ctxt+                              meths fundeps sigs ats at_defs+       ; return (noDerivInfos (classTyCon clas)) }++tcTyClDecl1 _ _ (XTyClDecl nec) = noExtCon nec+++{- *********************************************************************+*                                                                      *+          Class declarations+*                                                                      *+********************************************************************* -}++tcClassDecl1 :: RolesInfo -> Name -> LHsContext GhcRn+             -> LHsBinds GhcRn -> [LHsFunDep GhcRn] -> [LSig GhcRn]+             -> [LFamilyDecl GhcRn] -> [LTyFamDefltDecl GhcRn]+             -> TcM Class+tcClassDecl1 roles_info class_name hs_ctxt meths fundeps sigs ats at_defs+  = fixM $ \ clas ->+    -- We need the knot because 'clas' is passed into tcClassATs+    bindTyClTyVars class_name $ \ binders res_kind ->+    do { checkClassKindSig res_kind+       ; traceTc "tcClassDecl 1" (ppr class_name $$ ppr binders)+       ; let tycon_name = class_name        -- We use the same name+             roles = roles_info tycon_name  -- for TyCon and Class++       ; (ctxt, fds, sig_stuff, at_stuff)+            <- pushTcLevelM_   $+               solveEqualities $+               do { ctxt <- tcHsContext hs_ctxt+                  ; fds  <- mapM (addLocM tc_fundep) fundeps+                  ; sig_stuff <- tcClassSigs class_name sigs meths+                  ; at_stuff  <- tcClassATs class_name clas ats at_defs+                  ; return (ctxt, fds, sig_stuff, at_stuff) }++       -- The solveEqualities will report errors for any+       -- unsolved equalities, so these zonks should not encounter+       -- any unfilled coercion variables unless there is such an error+       -- The zonk also squeeze out the TcTyCons, and converts+       -- Skolems to tyvars.+       ; ze        <- emptyZonkEnv+       ; ctxt      <- zonkTcTypesToTypesX ze ctxt+       ; sig_stuff <- mapM (zonkTcMethInfoToMethInfoX ze) sig_stuff+         -- ToDo: do we need to zonk at_stuff?++       -- TODO: Allow us to distinguish between abstract class,+       -- and concrete class with no methods (maybe by+       -- specifying a trailing where or not++       ; mindef <- tcClassMinimalDef class_name sigs sig_stuff+       ; is_boot <- tcIsHsBootOrSig+       ; let body | is_boot, null ctxt, null at_stuff, null sig_stuff+                  = Nothing+                  | otherwise+                  = Just (ctxt, at_stuff, sig_stuff, mindef)++       ; clas <- buildClass class_name binders roles fds body+       ; traceTc "tcClassDecl" (ppr fundeps $$ ppr binders $$+                                ppr fds)+       ; return clas }+  where+    tc_fundep (tvs1, tvs2) = do { tvs1' <- mapM (tcLookupTyVar . unLoc) tvs1 ;+                                ; tvs2' <- mapM (tcLookupTyVar . unLoc) tvs2 ;+                                ; return (tvs1', tvs2') }+++{- Note [Associated type defaults]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++The following is an example of associated type defaults:+             class C a where+               data D a++               type F a b :: *+               type F a b = [a]        -- Default++Note that we can get default definitions only for type families, not data+families.+-}++tcClassATs :: Name                    -- The class name (not knot-tied)+           -> Class                   -- The class parent of this associated type+           -> [LFamilyDecl GhcRn]     -- Associated types.+           -> [LTyFamDefltDecl GhcRn] -- Associated type defaults.+           -> TcM [ClassATItem]+tcClassATs class_name cls ats at_defs+  = do {  -- Complain about associated type defaults for non associated-types+         sequence_ [ failWithTc (badATErr class_name n)+                   | n <- map at_def_tycon at_defs+                   , not (n `elemNameSet` at_names) ]+       ; mapM tc_at ats }+  where+    at_def_tycon :: LTyFamDefltDecl GhcRn -> Name+    at_def_tycon (dL->L _ eqn) = tyFamInstDeclName eqn++    at_fam_name :: LFamilyDecl GhcRn -> Name+    at_fam_name (dL->L _ decl) = unLoc (fdLName decl)++    at_names = mkNameSet (map at_fam_name ats)++    at_defs_map :: NameEnv [LTyFamDefltDecl GhcRn]+    -- Maps an AT in 'ats' to a list of all its default defs in 'at_defs'+    at_defs_map = foldr (\at_def nenv -> extendNameEnv_C (++) nenv+                                          (at_def_tycon at_def) [at_def])+                        emptyNameEnv at_defs++    tc_at at = do { fam_tc <- addLocM (tcFamDecl1 (Just cls)) at+                  ; let at_defs = lookupNameEnv at_defs_map (at_fam_name at)+                                  `orElse` []+                  ; atd <- tcDefaultAssocDecl fam_tc at_defs+                  ; return (ATI fam_tc atd) }++-------------------------+tcDefaultAssocDecl ::+     TyCon                                -- ^ Family TyCon (not knot-tied)+  -> [LTyFamDefltDecl GhcRn]              -- ^ Defaults+  -> TcM (Maybe (KnotTied Type, SrcSpan)) -- ^ Type checked RHS+tcDefaultAssocDecl _ []+  = return Nothing  -- No default declaration++tcDefaultAssocDecl _ (d1:_:_)+  = failWithTc (text "More than one default declaration for"+                <+> ppr (tyFamInstDeclName (unLoc d1)))++tcDefaultAssocDecl fam_tc+  [dL->L loc (TyFamInstDecl { tfid_eqn =+         HsIB { hsib_ext  = imp_vars+              , hsib_body = FamEqn { feqn_tycon = L _ tc_name+                                   , feqn_bndrs = mb_expl_bndrs+                                   , feqn_pats  = hs_pats+                                   , feqn_rhs   = hs_rhs_ty }}})]+  = -- See Note [Type-checking default assoc decls]+    setSrcSpan loc $+    tcAddFamInstCtxt (text "default type instance") tc_name $+    do { traceTc "tcDefaultAssocDecl 1" (ppr tc_name)+       ; let fam_tc_name = tyConName fam_tc+             vis_arity = length (tyConVisibleTyVars fam_tc)+             vis_pats  = numVisibleArgs hs_pats++       -- Kind of family check+       ; ASSERT( fam_tc_name == tc_name )+         checkTc (isTypeFamilyTyCon fam_tc) (wrongKindOfFamily fam_tc)++       -- Arity check+       ; checkTc (vis_pats == vis_arity)+                 (wrongNumberOfParmsErr vis_arity)++       -- Typecheck RHS+       --+       -- You might think we should pass in some AssocInstInfo, as we're looking+       -- at an associated type. But this would be wrong, because an associated+       -- type default LHS can mention *different* type variables than the+       -- enclosing class. So it's treated more as a freestanding beast.+       ; (qtvs, pats, rhs_ty) <- tcTyFamInstEqnGuts fam_tc NotAssociated+                                                    imp_vars (mb_expl_bndrs `orElse` [])+                                                    hs_pats hs_rhs_ty++       ; let fam_tvs  = tyConTyVars fam_tc+             ppr_eqn  = ppr_default_eqn pats rhs_ty+             pats_vis = tyConArgFlags fam_tc pats+       ; traceTc "tcDefaultAssocDecl 2" (vcat+           [ text "fam_tvs" <+> ppr fam_tvs+           , text "qtvs"    <+> ppr qtvs+           , text "pats"    <+> ppr pats+           , text "rhs_ty"  <+> ppr rhs_ty+           ])+       ; pat_tvs <- zipWithM (extract_tv ppr_eqn) pats pats_vis+       ; check_all_distinct_tvs ppr_eqn $ zip pat_tvs pats_vis+       ; let subst = zipTvSubst pat_tvs (mkTyVarTys fam_tvs)+       ; pure $ Just (substTyUnchecked subst rhs_ty, loc)+           -- We also perform other checks for well-formedness and validity+           -- later, in checkValidClass+     }+  where+    -- Checks that a pattern on the LHS of a default is a type+    -- variable. If so, return the underlying type variable, and if+    -- not, throw an error.+    -- See Note [Type-checking default assoc decls]+    extract_tv :: SDoc    -- The pretty-printed default equation+                          -- (only used for error message purposes)+               -> Type    -- The particular type pattern from which to extract+                          -- its underlying type variable+               -> ArgFlag -- The visibility of the type pattern+                          -- (only used for error message purposes)+               -> TcM TyVar+    extract_tv ppr_eqn pat pat_vis =+      case getTyVar_maybe pat of+        Just tv -> pure tv+        Nothing -> failWithTc $+          pprWithExplicitKindsWhen (isInvisibleArgFlag pat_vis) $+          hang (text "Illegal argument" <+> quotes (ppr pat) <+> text "in:")+             2 (vcat [ppr_eqn, suggestion])+++    -- Checks that no type variables in an associated default declaration are+    -- duplicated. If that is the case, throw an error.+    -- See Note [Type-checking default assoc decls]+    check_all_distinct_tvs ::+         SDoc               -- The pretty-printed default equation (only used+                            -- for error message purposes)+      -> [(TyVar, ArgFlag)] -- The type variable arguments in the associated+                            -- default declaration, along with their respective+                            -- visibilities (the latter are only used for error+                            -- message purposes)+      -> TcM ()+    check_all_distinct_tvs ppr_eqn pat_tvs_vis =+      let dups = findDupsEq ((==) `on` fst) pat_tvs_vis in+      traverse_+        (\d -> let (pat_tv, pat_vis) = NE.head d in failWithTc $+               pprWithExplicitKindsWhen (isInvisibleArgFlag pat_vis) $+               hang (text "Illegal duplicate variable"+                       <+> quotes (ppr pat_tv) <+> text "in:")+                  2 (vcat [ppr_eqn, suggestion]))+        dups++    ppr_default_eqn :: [Type] -> Type -> SDoc+    ppr_default_eqn pats rhs_ty =+      quotes (text "type" <+> ppr (mkTyConApp fam_tc pats)+                <+> equals <+> ppr rhs_ty)++    suggestion :: SDoc+    suggestion = text "The arguments to" <+> quotes (ppr fam_tc)+             <+> text "must all be distinct type variables"+tcDefaultAssocDecl _ [_]+  = panic "tcDefaultAssocDecl: Impossible Match" -- due to #15884+++{- Note [Type-checking default assoc decls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this default declaration for an associated type++   class C a where+      type F (a :: k) b :: Type+      type F (x :: j) y = Proxy x -> y++Note that the class variable 'a' doesn't scope over the default assoc+decl (rather oddly I think), and (less oddly) neither does the second+argument 'b' of the associated type 'F', or the kind variable 'k'.+Instead, the default decl is treated more like a top-level type+instance.++However we store the default rhs (Proxy x -> y) in F's TyCon, using+F's own type variables, so we need to convert it to (Proxy a -> b).+We do this by creating a substitution [j |-> k, x |-> a, b |-> y] and+applying this substitution to the RHS.++In order to create this substitution, we must first ensure that all of+the arguments in the default instance consist of distinct type variables.+One might think that this is a simple task that could be implemented earlier+in the compiler, perhaps in the parser or the renamer. However, there are some+tricky corner cases that really do require the full power of typechecking to+weed out, as the examples below should illustrate.++First, we must check that all arguments are type variables. As a motivating+example, consider this erroneous program (inspired by #11361):++   class C a where+      type F (a :: k) b :: Type+      type F x        b = x++If you squint, you'll notice that the kind of `x` is actually Type. However,+we cannot substitute from [Type |-> k], so we reject this default.++Next, we must check that all arguments are distinct. Here is another offending+example, this time taken from #13971:++   class C2 (a :: j) where+      type F2 (a :: j) (b :: k)+      type F2 (x :: z) y = SameKind x y+   data SameKind :: k -> k -> Type++All of the arguments in the default equation for `F2` are type variables, so+that passes the first check. However, if we were to build this substitution,+then both `j` and `k` map to `z`! In terms of visible kind application, it's as+if we had written `type F2 @z @z x y = SameKind @z x y`, which makes it clear+that we have duplicated a use of `z` on the LHS. Therefore, `F2`'s default is+also rejected.++Since the LHS of an associated type family default is always just variables,+it won't contain any tycons. Accordingly, the patterns used in the substitution+won't actually be knot-tied, even though we're in the knot. This is too+delicate for my taste, but it works.+-}++{- *********************************************************************+*                                                                      *+          Type family declarations+*                                                                      *+********************************************************************* -}++tcFamDecl1 :: Maybe Class -> FamilyDecl GhcRn -> TcM TyCon+tcFamDecl1 parent (FamilyDecl { fdInfo = fam_info+                              , fdLName = tc_lname@(dL->L _ tc_name)+                              , fdResultSig = (dL->L _ sig)+                              , fdInjectivityAnn = inj })+  | DataFamily <- fam_info+  = bindTyClTyVars tc_name $ \ binders res_kind -> do+  { traceTc "data family:" (ppr tc_name)+  ; checkFamFlag tc_name++  -- Check that the result kind is OK+  -- We allow things like+  --   data family T (a :: Type) :: forall k. k -> Type+  -- We treat T as having arity 1, but result kind forall k. k -> Type+  -- But we want to check that the result kind finishes in+  --   Type or a kind-variable+  -- For the latter, consider+  --   data family D a :: forall k. Type -> k+  -- When UnliftedNewtypes is enabled, we loosen this restriction+  -- on the return kind. See Note [Implementation of UnliftedNewtypes], wrinkle (1).+  ; let (_, final_res_kind) = splitPiTys res_kind+  ; checkDataKindSig DataFamilySort final_res_kind+  ; tc_rep_name <- newTyConRepName tc_name+  ; let inj   = Injective $ replicate (length binders) True+        tycon = mkFamilyTyCon tc_name binders+                              res_kind+                              (resultVariableName sig)+                              (DataFamilyTyCon tc_rep_name)+                              parent inj+  ; return tycon }++  | OpenTypeFamily <- fam_info+  = bindTyClTyVars tc_name $ \ binders res_kind -> do+  { traceTc "open type family:" (ppr tc_name)+  ; checkFamFlag tc_name+  ; inj' <- tcInjectivity binders inj+  ; checkResultSigFlag tc_name sig  -- check after injectivity for better errors+  ; let tycon = mkFamilyTyCon tc_name binders res_kind+                               (resultVariableName sig) OpenSynFamilyTyCon+                               parent inj'+  ; return tycon }++  | ClosedTypeFamily mb_eqns <- fam_info+  = -- Closed type families are a little tricky, because they contain the definition+    -- of both the type family and the equations for a CoAxiom.+    do { traceTc "Closed type family:" (ppr tc_name)+         -- the variables in the header scope only over the injectivity+         -- declaration but this is not involved here+       ; (inj', binders, res_kind)+            <- bindTyClTyVars tc_name $ \ binders res_kind ->+               do { inj' <- tcInjectivity binders inj+                  ; return (inj', binders, res_kind) }++       ; checkFamFlag tc_name -- make sure we have -XTypeFamilies+       ; checkResultSigFlag tc_name sig++         -- If Nothing, this is an abstract family in a hs-boot file;+         -- but eqns might be empty in the Just case as well+       ; case mb_eqns of+           Nothing   ->+               return $ mkFamilyTyCon tc_name binders res_kind+                                      (resultVariableName sig)+                                      AbstractClosedSynFamilyTyCon parent+                                      inj'+           Just eqns -> do {++         -- Process the equations, creating CoAxBranches+       ; let tc_fam_tc = mkTcTyCon tc_name binders res_kind+                                   noTcTyConScopedTyVars+                                   False {- this doesn't matter here -}+                                   ClosedTypeFamilyFlavour++       ; branches <- mapAndReportM (tcTyFamInstEqn tc_fam_tc NotAssociated) eqns+         -- Do not attempt to drop equations dominated by earlier+         -- ones here; in the case of mutual recursion with a data+         -- type, we get a knot-tying failure.  Instead we check+         -- for this afterwards, in TcValidity.checkValidCoAxiom+         -- Example: tc265++         -- Create a CoAxiom, with the correct src location.+       ; co_ax_name <- newFamInstAxiomName tc_lname []++       ; let mb_co_ax+              | null eqns = Nothing   -- mkBranchedCoAxiom fails on empty list+              | otherwise = Just (mkBranchedCoAxiom co_ax_name fam_tc branches)++             fam_tc = mkFamilyTyCon tc_name binders res_kind (resultVariableName sig)+                      (ClosedSynFamilyTyCon mb_co_ax) parent inj'++         -- We check for instance validity later, when doing validity+         -- checking for the tycon. Exception: checking equations+         -- overlap done by dropDominatedAxioms+       ; return fam_tc } }++  | otherwise = panic "tcFamInst1"  -- Silence pattern-exhaustiveness checker+tcFamDecl1 _ (XFamilyDecl nec) = noExtCon nec++-- | Maybe return a list of Bools that say whether a type family was declared+-- injective in the corresponding type arguments. Length of the list is equal to+-- the number of arguments (including implicit kind/coercion arguments).+-- True on position+-- N means that a function is injective in its Nth argument. False means it is+-- not.+tcInjectivity :: [TyConBinder] -> Maybe (LInjectivityAnn GhcRn)+              -> TcM Injectivity+tcInjectivity _ Nothing+  = return NotInjective++  -- User provided an injectivity annotation, so for each tyvar argument we+  -- check whether a type family was declared injective in that argument. We+  -- return a list of Bools, where True means that corresponding type variable+  -- was mentioned in lInjNames (type family is injective in that argument) and+  -- False means that it was not mentioned in lInjNames (type family is not+  -- injective in that type variable). We also extend injectivity information to+  -- kind variables, so if a user declares:+  --+  --   type family F (a :: k1) (b :: k2) = (r :: k3) | r -> a+  --+  -- then we mark both `a` and `k1` as injective.+  -- NB: the return kind is considered to be *input* argument to a type family.+  -- Since injectivity allows to infer input arguments from the result in theory+  -- we should always mark the result kind variable (`k3` in this example) as+  -- injective.  The reason is that result type has always an assigned kind and+  -- therefore we can always infer the result kind if we know the result type.+  -- But this does not seem to be useful in any way so we don't do it.  (Another+  -- reason is that the implementation would not be straightforward.)+tcInjectivity tcbs (Just (dL->L loc (InjectivityAnn _ lInjNames)))+  = setSrcSpan loc $+    do { let tvs = binderVars tcbs+       ; dflags <- getDynFlags+       ; checkTc (xopt LangExt.TypeFamilyDependencies dflags)+                 (text "Illegal injectivity annotation" $$+                  text "Use TypeFamilyDependencies to allow this")+       ; inj_tvs <- mapM (tcLookupTyVar . unLoc) lInjNames+       ; inj_tvs <- mapM zonkTcTyVarToTyVar inj_tvs -- zonk the kinds+       ; let inj_ktvs = filterVarSet isTyVar $  -- no injective coercion vars+                        closeOverKinds (mkVarSet inj_tvs)+       ; let inj_bools = map (`elemVarSet` inj_ktvs) tvs+       ; traceTc "tcInjectivity" (vcat [ ppr tvs, ppr lInjNames, ppr inj_tvs+                                       , ppr inj_ktvs, ppr inj_bools ])+       ; return $ Injective inj_bools }++tcTySynRhs :: RolesInfo+           -> Name+           -> [TyConBinder] -> Kind+           -> LHsType GhcRn -> TcM TyCon+tcTySynRhs roles_info tc_name binders res_kind hs_ty+  = do { env <- getLclEnv+       ; traceTc "tc-syn" (ppr tc_name $$ ppr (tcl_env env))+       ; rhs_ty <- pushTcLevelM_   $+                   solveEqualities $+                   tcCheckLHsType hs_ty res_kind+       ; rhs_ty <- zonkTcTypeToType rhs_ty+       ; let roles = roles_info tc_name+             tycon = buildSynTyCon tc_name binders res_kind roles rhs_ty+       ; return tycon }++tcDataDefn :: SDoc+           -> RolesInfo -> Name+           -> [TyConBinder] -> Kind+           -> HsDataDefn GhcRn -> TcM (TyCon, [DerivInfo])+  -- NB: not used for newtype/data instances (whether associated or not)+tcDataDefn err_ctxt+           roles_info+           tc_name tycon_binders res_kind+           (HsDataDefn { dd_ND = new_or_data, dd_cType = cType+                       , dd_ctxt = ctxt+                       , dd_kindSig = mb_ksig  -- Already in tc's kind+                                               -- via inferInitialKinds+                       , dd_cons = cons+                       , dd_derivs = derivs })+ =  do { gadt_syntax <- dataDeclChecks tc_name new_or_data ctxt cons++       ; tcg_env <- getGblEnv+       ; (extra_bndrs, final_res_kind) <- etaExpandAlgTyCon tycon_binders res_kind+       ; let hsc_src = tcg_src tcg_env+       ; unless (mk_permissive_kind hsc_src cons) $+           checkDataKindSig (DataDeclSort new_or_data) final_res_kind++       ; stupid_tc_theta <- pushTcLevelM_ $ solveEqualities $ tcHsContext ctxt+       ; stupid_theta    <- zonkTcTypesToTypes stupid_tc_theta+       ; kind_signatures <- xoptM LangExt.KindSignatures++             -- Check that we don't use kind signatures without Glasgow extensions+       ; when (isJust mb_ksig) $+         checkTc (kind_signatures) (badSigTyDecl tc_name)++       ; tycon <- fixM $ \ tycon -> do+             { let final_bndrs = tycon_binders `chkAppend` extra_bndrs+                   res_ty      = mkTyConApp tycon (mkTyVarTys (binderVars final_bndrs))+                   roles       = roles_info tc_name+             ; data_cons <- tcConDecls+                              tycon+                              new_or_data+                              final_bndrs+                              final_res_kind+                              res_ty+                              cons+             ; tc_rhs    <- mk_tc_rhs hsc_src tycon data_cons+             ; tc_rep_nm <- newTyConRepName tc_name+             ; return (mkAlgTyCon tc_name+                                  final_bndrs+                                  final_res_kind+                                  roles+                                  (fmap unLoc cType)+                                  stupid_theta tc_rhs+                                  (VanillaAlgTyCon tc_rep_nm)+                                  gadt_syntax) }+       ; tctc <- tcLookupTcTyCon tc_name+            -- 'tctc' is a 'TcTyCon' and has the 'tcTyConScopedTyVars' that we need+            -- unlike the finalized 'tycon' defined above which is an 'AlgTyCon'+       ; let deriv_info = DerivInfo { di_rep_tc = tycon+                                    , di_scoped_tvs = tcTyConScopedTyVars tctc+                                    , di_clauses = unLoc derivs+                                    , di_ctxt = err_ctxt }+       ; traceTc "tcDataDefn" (ppr tc_name $$ ppr tycon_binders $$ ppr extra_bndrs)+       ; return (tycon, [deriv_info]) }+  where+    -- Abstract data types in hsig files can have arbitrary kinds,+    -- because they may be implemented by type synonyms+    -- (which themselves can have arbitrary kinds, not just *). See #13955.+    --+    -- Note that this is only a property that data type declarations possess,+    -- so one could not have, say, a data family instance in an hsig file that+    -- has kind `Bool`. Therfore, this check need only occur in the code that+    -- typechecks data type declarations.+    mk_permissive_kind HsigFile [] = True+    mk_permissive_kind _ _ = False++    -- In hs-boot, a 'data' declaration with no constructors+    -- indicates a nominally distinct abstract data type.+    mk_tc_rhs HsBootFile _ []+      = return AbstractTyCon++    mk_tc_rhs HsigFile _ [] -- ditto+      = return AbstractTyCon++    mk_tc_rhs _ tycon data_cons+      = case new_or_data of+          DataType -> return (mkDataTyConRhs data_cons)+          NewType  -> ASSERT( not (null data_cons) )+                      mkNewTyConRhs tc_name tycon (head data_cons)+tcDataDefn _ _ _ _ _ (XHsDataDefn nec) = noExtCon nec+++-------------------------+kcTyFamInstEqn :: TcTyCon -> LTyFamInstEqn GhcRn -> TcM ()+-- Used for the equations of a closed type family only+-- Not used for data/type instances+kcTyFamInstEqn tc_fam_tc+    (dL->L loc (HsIB { hsib_ext = imp_vars+                     , hsib_body = FamEqn { feqn_tycon = dL->L _ eqn_tc_name+                                          , feqn_bndrs = mb_expl_bndrs+                                          , feqn_pats  = hs_pats+                                          , feqn_rhs   = hs_rhs_ty }}))+  = setSrcSpan loc $+    do { traceTc "kcTyFamInstEqn" (vcat+           [ text "tc_name ="    <+> ppr eqn_tc_name+           , text "fam_tc ="     <+> ppr tc_fam_tc <+> dcolon <+> ppr (tyConKind tc_fam_tc)+           , text "hsib_vars ="  <+> ppr imp_vars+           , text "feqn_bndrs =" <+> ppr mb_expl_bndrs+           , text "feqn_pats ="  <+> ppr hs_pats ])+          -- this check reports an arity error instead of a kind error; easier for user+       ; let vis_pats = numVisibleArgs hs_pats+       ; checkTc (vis_pats == vis_arity) $+                  wrongNumberOfParmsErr vis_arity+       ; discardResult $+         bindImplicitTKBndrs_Q_Tv imp_vars $+         bindExplicitTKBndrs_Q_Tv AnyKind (mb_expl_bndrs `orElse` []) $+         do { (_fam_app, res_kind) <- tcFamTyPats tc_fam_tc hs_pats+            ; tcCheckLHsType hs_rhs_ty res_kind }+             -- Why "_Tv" here?  Consider (#14066+             --  type family Bar x y where+             --      Bar (x :: a) (y :: b) = Int+             --      Bar (x :: c) (y :: d) = Bool+             -- During kind-checkig, a,b,c,d should be TyVarTvs and unify appropriately+    }+  where+    vis_arity = length (tyConVisibleTyVars tc_fam_tc)++kcTyFamInstEqn _ (dL->L _ (XHsImplicitBndrs nec)) = noExtCon nec+kcTyFamInstEqn _ (dL->L _ (HsIB _ (XFamEqn nec))) = noExtCon nec+kcTyFamInstEqn _ _ = panic "kcTyFamInstEqn: Impossible Match" -- due to #15884+++--------------------------+tcTyFamInstEqn :: TcTyCon -> AssocInstInfo -> LTyFamInstEqn GhcRn+               -> TcM (KnotTied CoAxBranch)+-- Needs to be here, not in TcInstDcls, because closed families+-- (typechecked here) have TyFamInstEqns++tcTyFamInstEqn fam_tc mb_clsinfo+    (dL->L loc (HsIB { hsib_ext = imp_vars+                 , hsib_body = FamEqn { feqn_tycon  = L _ eqn_tc_name+                                      , feqn_bndrs  = mb_expl_bndrs+                                      , feqn_pats   = hs_pats+                                      , feqn_rhs    = hs_rhs_ty }}))+  = ASSERT( getName fam_tc == eqn_tc_name )+    setSrcSpan loc $+    do {+       -- First, check the arity of visible arguments+       -- If we wait until validity checking, we'll get kind errors+       -- below when an arity error will be much easier to understand.+       ; let vis_arity = length (tyConVisibleTyVars fam_tc)+             vis_pats  = numVisibleArgs hs_pats+       ; checkTc (vis_pats == vis_arity) $+         wrongNumberOfParmsErr vis_arity+       ; (qtvs, pats, rhs_ty) <- tcTyFamInstEqnGuts fam_tc mb_clsinfo+                                      imp_vars (mb_expl_bndrs `orElse` [])+                                      hs_pats hs_rhs_ty+       -- Don't print results they may be knot-tied+       -- (tcFamInstEqnGuts zonks to Type)+       ; return (mkCoAxBranch qtvs [] [] pats rhs_ty+                              (map (const Nominal) qtvs)+                              loc) }++tcTyFamInstEqn _ _ _ = panic "tcTyFamInstEqn"++{-+Kind check type patterns and kind annotate the embedded type variables.+     type instance F [a] = rhs++ * Here we check that a type instance matches its kind signature, but we do+   not check whether there is a pattern for each type index; the latter+   check is only required for type synonym instances.++Note [Instantiating a family tycon]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It's possible that kind-checking the result of a family tycon applied to+its patterns will instantiate the tycon further. For example, we might+have++  type family F :: k where+    F = Int+    F = Maybe++After checking (F :: forall k. k) (with no visible patterns), we still need+to instantiate the k. With data family instances, this problem can be even+more intricate, due to Note [Arity of data families] in FamInstEnv. See+indexed-types/should_compile/T12369 for an example.++So, the kind-checker must return the new skolems and args (that is, Type+or (Type -> Type) for the equations above) and the instantiated kind.++Note [Generalising in tcTyFamInstEqnGuts]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have something like+  type instance forall (a::k) b. F t1 t2 = rhs++Then  imp_vars = [k], exp_bndrs = [a::k, b]++We want to quantify over+  * k, a, and b  (all user-specified)+  * and any inferred free kind vars from+      - the kinds of k, a, b+      - the types t1, t2++However, unlike a type signature like+  f :: forall (a::k). blah++we do /not/ care about the Inferred/Specified designation+or order for the final quantified tyvars.  Type-family+instances are not invoked directly in Haskell source code,+so visible type application etc plays no role.++So, the simple thing is+   - gather candiates from [k, a, b] and pats+   - quantify over them++Hence the sligtly mysterious call:+    candidateQTyVarsOfTypes (pats ++ mkTyVarTys scoped_tvs)++Simple, neat, but a little non-obvious!+-}++--------------------------+tcTyFamInstEqnGuts :: TyCon -> AssocInstInfo+                   -> [Name] -> [LHsTyVarBndr GhcRn]  -- Implicit and explicicit binder+                   -> HsTyPats GhcRn                  -- Patterns+                   -> LHsType GhcRn                   -- RHS+                   -> TcM ([TyVar], [TcType], TcType)      -- (tyvars, pats, rhs)+-- Used only for type families, not data families+tcTyFamInstEqnGuts fam_tc mb_clsinfo imp_vars exp_bndrs hs_pats hs_rhs_ty+  = do { traceTc "tcTyFamInstEqnGuts {" (vcat [ ppr fam_tc <+> ppr hs_pats ])++       -- By now, for type families (but not data families) we should+       -- have checked that the number of patterns matches tyConArity++       -- This code is closely related to the code+       -- in TcHsType.kcCheckDeclHeader_cusk+       ; (imp_tvs, (exp_tvs, (lhs_ty, rhs_ty)))+               <- pushTcLevelM_                                $+                  solveEqualities                              $+                  bindImplicitTKBndrs_Q_Skol imp_vars          $+                  bindExplicitTKBndrs_Q_Skol AnyKind exp_bndrs $+                  do { (lhs_ty, rhs_kind) <- tcFamTyPats fam_tc hs_pats+                       -- Ensure that the instance is consistent with its+                       -- parent class (#16008)+                     ; addConsistencyConstraints mb_clsinfo lhs_ty+                     ; rhs_ty <- tcCheckLHsType hs_rhs_ty rhs_kind+                     ; return (lhs_ty, rhs_ty) }++       -- See Note [Generalising in tcTyFamInstEqnGuts]+       -- This code (and the stuff immediately above) is very similar+       -- to that in tcDataFamInstHeader.  Maybe we should abstract the+       -- common code; but for the moment I concluded that it's+       -- clearer to duplicate it.  Still, if you fix a bug here,+       -- check there too!+       ; let scoped_tvs = imp_tvs ++ exp_tvs+       ; dvs  <- candidateQTyVarsOfTypes (lhs_ty : mkTyVarTys scoped_tvs)+       ; qtvs <- quantifyTyVars dvs++       ; (ze, qtvs) <- zonkTyBndrs qtvs+       ; lhs_ty     <- zonkTcTypeToTypeX ze lhs_ty+       ; rhs_ty     <- zonkTcTypeToTypeX ze rhs_ty++       ; let pats = unravelFamInstPats lhs_ty+             -- Note that we do this after solveEqualities+             -- so that any strange coercions inside lhs_ty+             -- have been solved before we attempt to unravel it+       ; traceTc "tcTyFamInstEqnGuts }" (ppr fam_tc <+> pprTyVars qtvs)+       ; return (qtvs, pats, rhs_ty) }++-----------------+tcFamTyPats :: TyCon+            -> HsTyPats GhcRn                -- Patterns+            -> TcM (TcType, TcKind)          -- (lhs_type, lhs_kind)+-- Used for both type and data families+tcFamTyPats fam_tc hs_pats+  = do { traceTc "tcFamTyPats {" $+         vcat [ ppr fam_tc, text "arity:" <+> ppr fam_arity ]++       ; let fun_ty = mkTyConApp fam_tc []++       ; (fam_app, res_kind) <- unsetWOptM Opt_WarnPartialTypeSignatures $+                                setXOptM LangExt.PartialTypeSignatures $+                                -- See Note [Wildcards in family instances] in+                                -- RnSource.hs+                                tcInferApps typeLevelMode lhs_fun fun_ty hs_pats++       ; traceTc "End tcFamTyPats }" $+         vcat [ ppr fam_tc, text "res_kind:" <+> ppr res_kind ]++       ; return (fam_app, res_kind) }+  where+    fam_name  = tyConName fam_tc+    fam_arity = tyConArity fam_tc+    lhs_fun   = noLoc (HsTyVar noExtField NotPromoted (noLoc fam_name))++unravelFamInstPats :: TcType -> [TcType]+-- Decompose fam_app to get the argument patterns+--+-- We expect fam_app to look like (F t1 .. tn)+-- tcInferApps is capable of returning ((F ty1 |> co) ty2),+-- but that can't happen here because we already checked the+-- arity of F matches the number of pattern+unravelFamInstPats fam_app+  = case splitTyConApp_maybe fam_app of+      Just (_, pats) -> pats+      Nothing -> panic "unravelFamInstPats: Ill-typed LHS of family instance"+        -- The Nothing case cannot happen for type families, because+        -- we don't call unravelFamInstPats until we've solved the+        -- equalities. For data families, it shouldn't happen either,+        -- we need to fail hard and early if it does. See trac issue #15905+        -- for an example of this happening.++addConsistencyConstraints :: AssocInstInfo -> TcType -> TcM ()+-- In the corresponding positions of the class and type-family,+-- ensure the the family argument is the same as the class argument+--   E.g    class C a b c d where+--             F c x y a :: Type+-- Here the first  arg of F should be the same as the third of C+--  and the fourth arg of F should be the same as the first of C+--+-- We emit /Derived/ constraints (a bit like fundeps) to encourage+-- unification to happen, but without actually reporting errors.+-- If, despite the efforts, corresponding positions do not match,+-- checkConsistentFamInst will complain+addConsistencyConstraints mb_clsinfo fam_app+  | InClsInst { ai_inst_env = inst_env } <- mb_clsinfo+  , Just (fam_tc, pats) <- tcSplitTyConApp_maybe fam_app+  = do { let eqs = [ (cls_ty, pat)+                   | (fam_tc_tv, pat) <- tyConTyVars fam_tc `zip` pats+                   , Just cls_ty <- [lookupVarEnv inst_env fam_tc_tv] ]+       ; traceTc "addConsistencyConstraints" (ppr eqs)+       ; emitDerivedEqs AssocFamPatOrigin eqs }+    -- Improve inference+    -- Any mis-match is reports by checkConsistentFamInst+  | otherwise+  = return ()++{- Note [Constraints in patterns]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+NB: This isn't the whole story. See comment in tcFamTyPats.++At first glance, it seems there is a complicated story to tell in tcFamTyPats+around constraint solving. After all, type family patterns can now do+GADT pattern-matching, which is jolly complicated. But, there's a key fact+which makes this all simple: everything is at top level! There cannot+be untouchable type variables. There can't be weird interaction between+case branches. There can't be global skolems.++This means that the semantics of type-level GADT matching is a little+different than term level. If we have++  data G a where+    MkGBool :: G Bool++And then++  type family F (a :: G k) :: k+  type instance F MkGBool = True++we get++  axF : F Bool (MkGBool <Bool>) ~ True++Simple! No casting on the RHS, because we can affect the kind parameter+to F.++If we ever introduce local type families, this all gets a lot more+complicated, and will end up looking awfully like term-level GADT+pattern-matching.+++** The new story **++Here is really what we want:++The matcher really can't deal with covars in arbitrary spots in coercions.+But it can deal with covars that are arguments to GADT data constructors.+So we somehow want to allow covars only in precisely those spots, then use+them as givens when checking the RHS. TODO (RAE): Implement plan.++Note [Quantified kind variables of a family pattern]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider   type family KindFam (p :: k1) (q :: k1)+           data T :: Maybe k1 -> k2 -> *+           type instance KindFam (a :: Maybe k) b = T a b -> Int+The HsBSig for the family patterns will be ([k], [a])++Then in the family instance we want to+  * Bring into scope [ "k" -> k:*, "a" -> a:k ]+  * Kind-check the RHS+  * Quantify the type instance over k and k', as well as a,b, thus+       type instance [k, k', a:Maybe k, b:k']+                     KindFam (Maybe k) k' a b = T k k' a b -> Int++Notice that in the third step we quantify over all the visibly-mentioned+type variables (a,b), but also over the implicitly mentioned kind variables+(k, k').  In this case one is bound explicitly but often there will be+none. The role of the kind signature (a :: Maybe k) is to add a constraint+that 'a' must have that kind, and to bring 'k' into scope.++++************************************************************************+*                                                                      *+               Data types+*                                                                      *+************************************************************************+-}++dataDeclChecks :: Name -> NewOrData+               -> LHsContext GhcRn -> [LConDecl GhcRn]+               -> TcM Bool+dataDeclChecks tc_name new_or_data (L _ stupid_theta) cons+  = do {   -- Check that we don't use GADT syntax in H98 world+         gadtSyntax_ok <- xoptM LangExt.GADTSyntax+       ; let gadt_syntax = consUseGadtSyntax cons+       ; checkTc (gadtSyntax_ok || not gadt_syntax) (badGadtDecl tc_name)++           -- Check that the stupid theta is empty for a GADT-style declaration+       ; checkTc (null stupid_theta || not gadt_syntax) (badStupidTheta tc_name)++         -- Check that a newtype has exactly one constructor+         -- Do this before checking for empty data decls, so that+         -- we don't suggest -XEmptyDataDecls for newtypes+       ; checkTc (new_or_data == DataType || isSingleton cons)+                (newtypeConError tc_name (length cons))++         -- Check that there's at least one condecl,+         -- or else we're reading an hs-boot file, or -XEmptyDataDecls+       ; empty_data_decls <- xoptM LangExt.EmptyDataDecls+       ; is_boot <- tcIsHsBootOrSig  -- Are we compiling an hs-boot file?+       ; checkTc (not (null cons) || empty_data_decls || is_boot)+                 (emptyConDeclsErr tc_name)+       ; return gadt_syntax }+++-----------------------------------+consUseGadtSyntax :: [LConDecl a] -> Bool+consUseGadtSyntax ((dL->L _ (ConDeclGADT {})) : _) = True+consUseGadtSyntax _                                = False+                 -- All constructors have same shape++-----------------------------------+tcConDecls :: KnotTied TyCon -> NewOrData+           -> [TyConBinder] -> TcKind   -- binders and result kind of tycon+           -> KnotTied Type -> [LConDecl GhcRn] -> TcM [DataCon]+tcConDecls rep_tycon new_or_data tmpl_bndrs res_kind res_tmpl+  = concatMapM $ addLocM $+    tcConDecl rep_tycon (mkTyConTagMap rep_tycon)+              tmpl_bndrs res_kind res_tmpl new_or_data+    -- It's important that we pay for tag allocation here, once per TyCon,+    -- See Note [Constructor tag allocation], fixes #14657++tcConDecl :: KnotTied TyCon          -- Representation tycon. Knot-tied!+          -> NameEnv ConTag+          -> [TyConBinder] -> TcKind   -- tycon binders and result kind+          -> KnotTied Type+                 -- Return type template (T tys), where T is the family TyCon+          -> NewOrData+          -> ConDecl GhcRn+          -> TcM [DataCon]++tcConDecl rep_tycon tag_map tmpl_bndrs res_kind res_tmpl new_or_data+          (ConDeclH98 { con_name = name+                      , con_ex_tvs = explicit_tkv_nms+                      , con_mb_cxt = hs_ctxt+                      , con_args = hs_args })+  = addErrCtxt (dataConCtxtName [name]) $+    do { -- NB: the tyvars from the declaration header are in scope++         -- Get hold of the existential type variables+         -- e.g. data T a = forall k (b::k) f. MkT a (f b)+         -- Here tmpl_bndrs = {a}+         --      hs_qvars = HsQTvs { hsq_implicit = {k}+         --                        , hsq_explicit = {f,b} }++       ; traceTc "tcConDecl 1" (vcat [ ppr name, ppr explicit_tkv_nms ])++       ; (exp_tvs, (ctxt, arg_tys, field_lbls, stricts))+           <- pushTcLevelM_                             $+              solveEqualities                           $+              bindExplicitTKBndrs_Skol explicit_tkv_nms $+              do { ctxt <- tcHsMbContext hs_ctxt+                 ; btys <- tcConArgs hs_args+                 ; field_lbls <- lookupConstructorFields (unLoc name)+                 ; let (arg_tys, stricts) = unzip btys+                 ; dflags <- getDynFlags+                 ; final_arg_tys <-+                     unifyNewtypeKind dflags new_or_data+                                      (hsConDeclArgTys hs_args)+                                      arg_tys res_kind+                 ; return (ctxt, final_arg_tys, field_lbls, stricts)+                 }++         -- exp_tvs have explicit, user-written binding sites+         -- the kvs below are those kind variables entirely unmentioned by the user+         --   and discovered only by generalization++       ; kvs <- kindGeneralizeAll (mkSpecForAllTys (binderVars tmpl_bndrs) $+                                   mkSpecForAllTys exp_tvs $+                                   mkPhiTy ctxt $+                                   mkVisFunTys arg_tys $+                                   unitTy)+                 -- That type is a lie, of course. (It shouldn't end in ()!)+                 -- And we could construct a proper result type from the info+                 -- at hand. But the result would mention only the tmpl_tvs,+                 -- and so it just creates more work to do it right. Really,+                 -- we're only doing this to find the right kind variables to+                 -- quantify over, and this type is fine for that purpose.++             -- Zonk to Types+       ; (ze, qkvs)      <- zonkTyBndrs kvs+       ; (ze, user_qtvs) <- zonkTyBndrsX ze exp_tvs+       ; arg_tys         <- zonkTcTypesToTypesX ze arg_tys+       ; ctxt            <- zonkTcTypesToTypesX ze ctxt++       ; fam_envs <- tcGetFamInstEnvs++       -- Can't print univ_tvs, arg_tys etc, because we are inside the knot here+       ; traceTc "tcConDecl 2" (ppr name $$ ppr field_lbls)+       ; let+           univ_tvbs = tyConTyVarBinders tmpl_bndrs+           univ_tvs  = binderVars univ_tvbs+           ex_tvbs   = mkTyVarBinders Inferred qkvs +++                       mkTyVarBinders Specified user_qtvs+           ex_tvs    = qkvs ++ user_qtvs+           -- For H98 datatypes, the user-written tyvar binders are precisely+           -- the universals followed by the existentials.+           -- See Note [DataCon user type variable binders] in DataCon.+           user_tvbs = univ_tvbs ++ ex_tvbs+           buildOneDataCon (dL->L _ name) = do+             { is_infix <- tcConIsInfixH98 name hs_args+             ; rep_nm   <- newTyConRepName name++             ; buildDataCon fam_envs name is_infix rep_nm+                            stricts Nothing field_lbls+                            univ_tvs ex_tvs user_tvbs+                            [{- no eq_preds -}] ctxt arg_tys+                            res_tmpl rep_tycon tag_map+                  -- NB:  we put data_tc, the type constructor gotten from the+                  --      constructor type signature into the data constructor;+                  --      that way checkValidDataCon can complain if it's wrong.+             }+       ; traceTc "tcConDecl 2" (ppr name)+       ; mapM buildOneDataCon [name]+       }++tcConDecl rep_tycon tag_map tmpl_bndrs _res_kind res_tmpl new_or_data+  -- NB: don't use res_kind here, as it's ill-scoped. Instead, we get+  -- the res_kind by typechecking the result type.+          (ConDeclGADT { con_names = names+                       , con_qvars = qtvs+                       , con_mb_cxt = cxt, con_args = hs_args+                       , con_res_ty = hs_res_ty })+  | HsQTvs { hsq_ext = implicit_tkv_nms+           , hsq_explicit = explicit_tkv_nms } <- qtvs+  = addErrCtxt (dataConCtxtName names) $+    do { traceTc "tcConDecl 1 gadt" (ppr names)+       ; let ((dL->L _ name) : _) = names++       ; (imp_tvs, (exp_tvs, (ctxt, arg_tys, res_ty, field_lbls, stricts)))+           <- pushTcLevelM_    $  -- We are going to generalise+              solveEqualities  $  -- We won't get another crack, and we don't+                                  -- want an error cascade+              bindImplicitTKBndrs_Skol implicit_tkv_nms $+              bindExplicitTKBndrs_Skol explicit_tkv_nms $+              do { ctxt <- tcHsMbContext cxt+                 ; btys <- tcConArgs hs_args+                 ; let (arg_tys, stricts) = unzip btys+                 ; res_ty <- tcHsOpenType hs_res_ty+                   -- See Note [Implementation of UnliftedNewtypes]+                 ; dflags <- getDynFlags+                 ; final_arg_tys <-+                     unifyNewtypeKind dflags new_or_data+                                      (hsConDeclArgTys hs_args)+                                      arg_tys (typeKind res_ty)+                 ; field_lbls <- lookupConstructorFields name+                 ; return (ctxt, final_arg_tys, res_ty, field_lbls, stricts)+                 }+       ; imp_tvs <- zonkAndScopedSort imp_tvs+       ; let user_tvs      = imp_tvs ++ exp_tvs++       ; tkvs <- kindGeneralizeAll (mkSpecForAllTys user_tvs $+                                    mkPhiTy ctxt $+                                    mkVisFunTys arg_tys $+                                    res_ty)++             -- Zonk to Types+       ; (ze, tkvs)     <- zonkTyBndrs tkvs+       ; (ze, user_tvs) <- zonkTyBndrsX ze user_tvs+       ; arg_tys <- zonkTcTypesToTypesX ze arg_tys+       ; ctxt    <- zonkTcTypesToTypesX ze ctxt+       ; res_ty  <- zonkTcTypeToTypeX   ze res_ty++       ; let (univ_tvs, ex_tvs, tkvs', user_tvs', eq_preds, arg_subst)+               = rejigConRes tmpl_bndrs res_tmpl tkvs user_tvs res_ty+             -- NB: this is a /lazy/ binding, so we pass six thunks to+             --     buildDataCon without yet forcing the guards in rejigConRes+             -- See Note [Checking GADT return types]++             -- Compute the user-written tyvar binders. These have the same+             -- tyvars as univ_tvs/ex_tvs, but perhaps in a different order.+             -- See Note [DataCon user type variable binders] in DataCon.+             tkv_bndrs      = mkTyVarBinders Inferred  tkvs'+             user_tv_bndrs  = mkTyVarBinders Specified user_tvs'+             all_user_bndrs = tkv_bndrs ++ user_tv_bndrs++             ctxt'      = substTys arg_subst ctxt+             arg_tys'   = substTys arg_subst arg_tys+             res_ty'    = substTy  arg_subst res_ty+++       ; fam_envs <- tcGetFamInstEnvs++       -- Can't print univ_tvs, arg_tys etc, because we are inside the knot here+       ; traceTc "tcConDecl 2" (ppr names $$ ppr field_lbls)+       ; let+           buildOneDataCon (dL->L _ name) = do+             { is_infix <- tcConIsInfixGADT name hs_args+             ; rep_nm   <- newTyConRepName name++             ; buildDataCon fam_envs name is_infix+                            rep_nm+                            stricts Nothing field_lbls+                            univ_tvs ex_tvs all_user_bndrs eq_preds+                            ctxt' arg_tys' res_ty' rep_tycon tag_map+                  -- NB:  we put data_tc, the type constructor gotten from the+                  --      constructor type signature into the data constructor;+                  --      that way checkValidDataCon can complain if it's wrong.+             }+       ; traceTc "tcConDecl 2" (ppr names)+       ; mapM buildOneDataCon names+       }+tcConDecl _ _ _ _ _ _ (ConDeclGADT _ _ _ (XLHsQTyVars nec) _ _ _ _)+  = noExtCon nec+tcConDecl _ _ _ _ _ _ (XConDecl nec) = noExtCon nec++tcConIsInfixH98 :: Name+             -> HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn])+             -> TcM Bool+tcConIsInfixH98 _   details+  = case details of+           InfixCon {}  -> return True+           _            -> return False++tcConIsInfixGADT :: Name+             -> HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn])+             -> TcM Bool+tcConIsInfixGADT con details+  = case details of+           InfixCon {}  -> return True+           RecCon {}    -> return False+           PrefixCon arg_tys           -- See Note [Infix GADT constructors]+               | isSymOcc (getOccName con)+               , [_ty1,_ty2] <- arg_tys+                  -> do { fix_env <- getFixityEnv+                        ; return (con `elemNameEnv` fix_env) }+               | otherwise -> return False++tcConArgs :: HsConDeclDetails GhcRn+          -> TcM [(TcType, HsSrcBang)]+tcConArgs (PrefixCon btys)+  = mapM tcConArg btys+tcConArgs (InfixCon bty1 bty2)+  = do { bty1' <- tcConArg bty1+       ; bty2' <- tcConArg bty2+       ; return [bty1', bty2'] }+tcConArgs (RecCon fields)+  = mapM tcConArg btys+  where+    -- We need a one-to-one mapping from field_names to btys+    combined = map (\(dL->L _ f) -> (cd_fld_names f,cd_fld_type f))+                   (unLoc fields)+    explode (ns,ty) = zip ns (repeat ty)+    exploded = concatMap explode combined+    (_,btys) = unzip exploded+++tcConArg :: LHsType GhcRn -> TcM (TcType, HsSrcBang)+tcConArg bty+  = do  { traceTc "tcConArg 1" (ppr bty)+        ; arg_ty <- tcHsOpenType (getBangType bty)+             -- Newtypes can't have unboxed types, but we check+             -- that in checkValidDataCon; this tcConArg stuff+             -- doesn't happen for GADT-style declarations+        ; traceTc "tcConArg 2" (ppr bty)+        ; return (arg_ty, getBangStrictness bty) }++{-+Note [Infix GADT constructors]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We do not currently have syntax to declare an infix constructor in GADT syntax,+but it makes a (small) difference to the Show instance.  So as a slightly+ad-hoc solution, we regard a GADT data constructor as infix if+  a) it is an operator symbol+  b) it has two arguments+  c) there is a fixity declaration for it+For example:+   infix 6 (:--:)+   data T a where+     (:--:) :: t1 -> t2 -> T Int+++Note [Checking GADT return types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There is a delicacy around checking the return types of a datacon. The+central problem is dealing with a declaration like++  data T a where+    MkT :: T a -> Q a++Note that the return type of MkT is totally bogus. When creating the T+tycon, we also need to create the MkT datacon, which must have a "rejigged"+return type. That is, the MkT datacon's type must be transformed to have+a uniform return type with explicit coercions for GADT-like type parameters.+This rejigging is what rejigConRes does. The problem is, though, that checking+that the return type is appropriate is much easier when done over *Type*,+not *HsType*, and doing a call to tcMatchTy will loop because T isn't fully+defined yet.++So, we want to make rejigConRes lazy and then check the validity of+the return type in checkValidDataCon.  To do this we /always/ return a+6-tuple from rejigConRes (so that we can compute the return type from it, which+checkValidDataCon needs), but the first three fields may be bogus if+the return type isn't valid (the last equation for rejigConRes).++This is better than an earlier solution which reduced the number of+errors reported in one pass.  See #7175, and #10836.+-}++-- Example+--   data instance T (b,c) where+--      TI :: forall e. e -> T (e,e)+--+-- The representation tycon looks like this:+--   data :R7T b c where+--      TI :: forall b1 c1. (b1 ~ c1) => b1 -> :R7T b1 c1+-- In this case orig_res_ty = T (e,e)++rejigConRes :: [KnotTied TyConBinder] -> KnotTied Type    -- Template for result type; e.g.+                                  -- data instance T [a] b c ...+                                  --      gives template ([a,b,c], T [a] b c)+            -> [TyVar]            -- The constructor's inferred type variables+            -> [TyVar]            -- The constructor's user-written, specified+                                  -- type variables+            -> KnotTied Type      -- res_ty+            -> ([TyVar],          -- Universal+                [TyVar],          -- Existential (distinct OccNames from univs)+                [TyVar],          -- The constructor's rejigged, user-written,+                                  -- inferred type variables+                [TyVar],          -- The constructor's rejigged, user-written,+                                  -- specified type variables+                [EqSpec],      -- Equality predicates+                TCvSubst)      -- Substitution to apply to argument types+        -- We don't check that the TyCon given in the ResTy is+        -- the same as the parent tycon, because checkValidDataCon will do it+-- NB: All arguments may potentially be knot-tied+rejigConRes tmpl_bndrs res_tmpl dc_inferred_tvs dc_specified_tvs res_ty+        -- E.g.  data T [a] b c where+        --         MkT :: forall x y z. T [(x,y)] z z+        -- The {a,b,c} are the tmpl_tvs, and the {x,y,z} are the dc_tvs+        --     (NB: unlike the H98 case, the dc_tvs are not all existential)+        -- Then we generate+        --      Univ tyvars     Eq-spec+        --          a              a~(x,y)+        --          b              b~z+        --          z+        -- Existentials are the leftover type vars: [x,y]+        -- The user-written type variables are what is listed in the forall:+        --   [x, y, z] (all specified). We must rejig these as well.+        --   See Note [DataCon user type variable binders] in DataCon.+        -- So we return ( [a,b,z], [x,y]+        --              , [], [x,y,z]+        --              , [a~(x,y),b~z], <arg-subst> )+  | Just subst <- tcMatchTy res_tmpl res_ty+  = let (univ_tvs, raw_eqs, kind_subst) = mkGADTVars tmpl_tvs dc_tvs subst+        raw_ex_tvs = dc_tvs `minusList` univ_tvs+        (arg_subst, substed_ex_tvs) = substTyVarBndrs kind_subst raw_ex_tvs++        -- After rejigging the existential tyvars, the resulting substitution+        -- gives us exactly what we need to rejig the user-written tyvars,+        -- since the dcUserTyVarBinders invariant guarantees that the+        -- substitution has *all* the tyvars in its domain.+        -- See Note [DataCon user type variable binders] in DataCon.+        subst_user_tvs = map (getTyVar "rejigConRes" . substTyVar arg_subst)+        substed_inferred_tvs  = subst_user_tvs dc_inferred_tvs+        substed_specified_tvs = subst_user_tvs dc_specified_tvs++        substed_eqs = map (substEqSpec arg_subst) raw_eqs+    in+    (univ_tvs, substed_ex_tvs, substed_inferred_tvs, substed_specified_tvs,+     substed_eqs, arg_subst)++  | otherwise+        -- If the return type of the data constructor doesn't match the parent+        -- type constructor, or the arity is wrong, the tcMatchTy will fail+        --    e.g   data T a b where+        --            T1 :: Maybe a   -- Wrong tycon+        --            T2 :: T [a]     -- Wrong arity+        -- We are detect that later, in checkValidDataCon, but meanwhile+        -- we must do *something*, not just crash.  So we do something simple+        -- albeit bogus, relying on checkValidDataCon to check the+        --  bad-result-type error before seeing that the other fields look odd+        -- See Note [Checking GADT return types]+  = (tmpl_tvs, dc_tvs `minusList` tmpl_tvs, dc_inferred_tvs, dc_specified_tvs,+     [], emptyTCvSubst)+  where+    dc_tvs   = dc_inferred_tvs ++ dc_specified_tvs+    tmpl_tvs = binderVars tmpl_bndrs++{- Note [mkGADTVars]+~~~~~~~~~~~~~~~~~~~~+Running example:++data T (k1 :: *) (k2 :: *) (a :: k2) (b :: k2) where+  MkT :: forall (x1 : *) (y :: x1) (z :: *).+         T x1 * (Proxy (y :: x1), z) z++We need the rejigged type to be++  MkT :: forall (x1 :: *) (k2 :: *) (a :: k2) (b :: k2).+         forall (y :: x1) (z :: *).+         (k2 ~ *, a ~ (Proxy x1 y, z), b ~ z)+      => T x1 k2 a b++You might naively expect that z should become a universal tyvar,+not an existential. (After all, x1 becomes a universal tyvar.)+But z has kind * while b has kind k2, so the return type+   T x1 k2 a z+is ill-kinded.  Another way to say it is this: the universal+tyvars must have exactly the same kinds as the tyConTyVars.++So we need an existential tyvar and a heterogeneous equality+constraint. (The b ~ z is a bit redundant with the k2 ~ * that+comes before in that b ~ z implies k2 ~ *. I'm sure we could do+some analysis that could eliminate k2 ~ *. But we don't do this+yet.)++The data con signature has already been fully kind-checked.+The return type++  T x1 * (Proxy (y :: x1), z) z+becomes+  qtkvs    = [x1 :: *, y :: x1, z :: *]+  res_tmpl = T x1 * (Proxy x1 y, z) z++We start off by matching (T k1 k2 a b) with (T x1 * (Proxy x1 y, z) z). We+know this match will succeed because of the validity check (actually done+later, but laziness saves us -- see Note [Checking GADT return types]).+Thus, we get++  subst := { k1 |-> x1, k2 |-> *, a |-> (Proxy x1 y, z), b |-> z }++Now, we need to figure out what the GADT equalities should be. In this case,+we *don't* want (k1 ~ x1) to be a GADT equality: it should just be a+renaming. The others should be GADT equalities. We also need to make+sure that the universally-quantified variables of the datacon match up+with the tyvars of the tycon, as required for Core context well-formedness.+(This last bit is why we have to rejig at all!)++`choose` walks down the tycon tyvars, figuring out what to do with each one.+It carries two substitutions:+  - t_sub's domain is *template* or *tycon* tyvars, mapping them to variables+    mentioned in the datacon signature.+  - r_sub's domain is *result* tyvars, names written by the programmer in+    the datacon signature. The final rejigged type will use these names, but+    the subst is still needed because sometimes the printed name of these variables+    is different. (See choose_tv_name, below.)++Before explaining the details of `choose`, let's just look at its operation+on our example:++  choose [] [] {} {} [k1, k2, a, b]+  -->          -- first branch of `case` statement+  choose+    univs:    [x1 :: *]+    eq_spec:  []+    t_sub:    {k1 |-> x1}+    r_sub:    {x1 |-> x1}+    t_tvs:    [k2, a, b]+  -->          -- second branch of `case` statement+  choose+    univs:    [k2 :: *, x1 :: *]+    eq_spec:  [k2 ~ *]+    t_sub:    {k1 |-> x1, k2 |-> k2}+    r_sub:    {x1 |-> x1}+    t_tvs:    [a, b]+  -->          -- second branch of `case` statement+  choose+    univs:    [a :: k2, k2 :: *, x1 :: *]+    eq_spec:  [ a ~ (Proxy x1 y, z)+              , k2 ~ * ]+    t_sub:    {k1 |-> x1, k2 |-> k2, a |-> a}+    r_sub:    {x1 |-> x1}+    t_tvs:    [b]+  -->          -- second branch of `case` statement+  choose+    univs:    [b :: k2, a :: k2, k2 :: *, x1 :: *]+    eq_spec:  [ b ~ z+              , a ~ (Proxy x1 y, z)+              , k2 ~ * ]+    t_sub:    {k1 |-> x1, k2 |-> k2, a |-> a, b |-> z}+    r_sub:    {x1 |-> x1}+    t_tvs:    []+  -->          -- end of recursion+  ( [x1 :: *, k2 :: *, a :: k2, b :: k2]+  , [k2 ~ *, a ~ (Proxy x1 y, z), b ~ z]+  , {x1 |-> x1} )++`choose` looks up each tycon tyvar in the matching (it *must* be matched!).++* If it finds a bare result tyvar (the first branch of the `case`+  statement), it checks to make sure that the result tyvar isn't yet+  in the list of univ_tvs.  If it is in that list, then we have a+  repeated variable in the return type, and we in fact need a GADT+  equality.++* It then checks to make sure that the kind of the result tyvar+  matches the kind of the template tyvar. This check is what forces+  `z` to be existential, as it should be, explained above.++* Assuming no repeated variables or kind-changing, we wish to use the+  variable name given in the datacon signature (that is, `x1` not+  `k1`), not the tycon signature (which may have been made up by+  GHC). So, we add a mapping from the tycon tyvar to the result tyvar+  to t_sub.++* If we discover that a mapping in `subst` gives us a non-tyvar (the+  second branch of the `case` statement), then we have a GADT equality+  to create.  We create a fresh equality, but we don't extend any+  substitutions. The template variable substitution is meant for use+  in universal tyvar kinds, and these shouldn't be affected by any+  GADT equalities.++This whole algorithm is quite delicate, indeed. I (Richard E.) see two ways+of simplifying it:++1) The first branch of the `case` statement is really an optimization, used+in order to get fewer GADT equalities. It might be possible to make a GADT+equality for *every* univ. tyvar, even if the equality is trivial, and then+either deal with the bigger type or somehow reduce it later.++2) This algorithm strives to use the names for type variables as specified+by the user in the datacon signature. If we always used the tycon tyvar+names, for example, this would be simplified. This change would almost+certainly degrade error messages a bit, though.+-}++-- ^ From information about a source datacon definition, extract out+-- what the universal variables and the GADT equalities should be.+-- See Note [mkGADTVars].+mkGADTVars :: [TyVar]    -- ^ The tycon vars+           -> [TyVar]    -- ^ The datacon vars+           -> TCvSubst   -- ^ The matching between the template result type+                         -- and the actual result type+           -> ( [TyVar]+              , [EqSpec]+              , TCvSubst ) -- ^ The univ. variables, the GADT equalities,+                           -- and a subst to apply to the GADT equalities+                           -- and existentials.+mkGADTVars tmpl_tvs dc_tvs subst+  = choose [] [] empty_subst empty_subst tmpl_tvs+  where+    in_scope = mkInScopeSet (mkVarSet tmpl_tvs `unionVarSet` mkVarSet dc_tvs)+               `unionInScope` getTCvInScope subst+    empty_subst = mkEmptyTCvSubst in_scope++    choose :: [TyVar]           -- accumulator of univ tvs, reversed+           -> [EqSpec]          -- accumulator of GADT equalities, reversed+           -> TCvSubst          -- template substitution+           -> TCvSubst          -- res. substitution+           -> [TyVar]           -- template tvs (the univ tvs passed in)+           -> ( [TyVar]         -- the univ_tvs+              , [EqSpec]        -- GADT equalities+              , TCvSubst )       -- a substitution to fix kinds in ex_tvs++    choose univs eqs _t_sub r_sub []+      = (reverse univs, reverse eqs, r_sub)+    choose univs eqs t_sub r_sub (t_tv:t_tvs)+      | Just r_ty <- lookupTyVar subst t_tv+      = case getTyVar_maybe r_ty of+          Just r_tv+            |  not (r_tv `elem` univs)+            ,  tyVarKind r_tv `eqType` (substTy t_sub (tyVarKind t_tv))+            -> -- simple, well-kinded variable substitution.+               choose (r_tv:univs) eqs+                      (extendTvSubst t_sub t_tv r_ty')+                      (extendTvSubst r_sub r_tv r_ty')+                      t_tvs+            where+              r_tv1  = setTyVarName r_tv (choose_tv_name r_tv t_tv)+              r_ty'  = mkTyVarTy r_tv1++               -- Not a simple substitution: make an equality predicate+          _ -> choose (t_tv':univs) (mkEqSpec t_tv' r_ty : eqs)+                      (extendTvSubst t_sub t_tv (mkTyVarTy t_tv'))+                         -- We've updated the kind of t_tv,+                         -- so add it to t_sub (#14162)+                      r_sub t_tvs+            where+              t_tv' = updateTyVarKind (substTy t_sub) t_tv++      | otherwise+      = pprPanic "mkGADTVars" (ppr tmpl_tvs $$ ppr subst)++      -- choose an appropriate name for a univ tyvar.+      -- This *must* preserve the Unique of the result tv, so that we+      -- can detect repeated variables. It prefers user-specified names+      -- over system names. A result variable with a system name can+      -- happen with GHC-generated implicit kind variables.+    choose_tv_name :: TyVar -> TyVar -> Name+    choose_tv_name r_tv t_tv+      | isSystemName r_tv_name+      = setNameUnique t_tv_name (getUnique r_tv_name)++      | otherwise+      = r_tv_name++      where+        r_tv_name = getName r_tv+        t_tv_name = getName t_tv++{-+Note [Substitution in template variables kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++data G (a :: Maybe k) where+  MkG :: G Nothing++With explicit kind variables++data G k (a :: Maybe k) where+  MkG :: G k1 (Nothing k1)++Note how k1 is distinct from k. So, when we match the template+`G k a` against `G k1 (Nothing k1)`, we get a subst+[ k |-> k1, a |-> Nothing k1 ]. Even though this subst has two+mappings, we surely don't want to add (k, k1) to the list of+GADT equalities -- that would be overly complex and would create+more untouchable variables than we need. So, when figuring out+which tyvars are GADT-like and which aren't (the fundamental+job of `choose`), we want to treat `k` as *not* GADT-like.+Instead, we wish to substitute in `a`'s kind, to get (a :: Maybe k1)+instead of (a :: Maybe k). This is the reason for dealing+with a substitution in here.++However, we do not *always* want to substitute. Consider++data H (a :: k) where+  MkH :: H Int++With explicit kind variables:++data H k (a :: k) where+  MkH :: H * Int++Here, we have a kind-indexed GADT. The subst in question is+[ k |-> *, a |-> Int ]. Now, we *don't* want to substitute in `a`'s+kind, because that would give a constructor with the type++MkH :: forall (k :: *) (a :: *). (k ~ *) -> (a ~ Int) -> H k a++The problem here is that a's kind is wrong -- it needs to be k, not *!+So, if the matching for a variable is anything but another bare variable,+we drop the mapping from the substitution before proceeding. This+was not an issue before kind-indexed GADTs because this case could+never happen.++************************************************************************+*                                                                      *+                Validity checking+*                                                                      *+************************************************************************++Validity checking is done once the mutually-recursive knot has been+tied, so we can look at things freely.+-}++checkValidTyCl :: TyCon -> TcM [TyCon]+-- The returned list is either a singleton (if valid)+-- or a list of "fake tycons" (if not); the fake tycons+-- include any implicits, like promoted data constructors+-- See Note [Recover from validity error]+checkValidTyCl tc+  = setSrcSpan (getSrcSpan tc) $+    addTyConCtxt tc            $+    recoverM recovery_code     $+    do { traceTc "Starting validity for tycon" (ppr tc)+       ; checkValidTyCon tc+       ; traceTc "Done validity for tycon" (ppr tc)+       ; return [tc] }+  where+    recovery_code -- See Note [Recover from validity error]+      = do { traceTc "Aborted validity for tycon" (ppr tc)+           ; return (concatMap mk_fake_tc $+                     ATyCon tc : implicitTyConThings tc) }++    mk_fake_tc (ATyCon tc)+      | isClassTyCon tc = [tc]   -- Ugh! Note [Recover from validity error]+      | otherwise       = [makeRecoveryTyCon tc]+    mk_fake_tc (AConLike (RealDataCon dc))+                        = [makeRecoveryTyCon (promoteDataCon dc)]+    mk_fake_tc _        = []++{- Note [Recover from validity error]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We recover from a validity error in a type or class, which allows us+to report multiple validity errors. In the failure case we return a+TyCon of the right kind, but with no interesting behaviour+(makeRecoveryTyCon). Why?  Suppose we have+   type T a = Fun+where Fun is a type family of arity 1.  The RHS is invalid, but we+want to go on checking validity of subsequent type declarations.+So we replace T with an abstract TyCon which will do no harm.+See indexed-types/should_fail/BadSock and #10896++Some notes:++* We must make fakes for promoted DataCons too. Consider (#15215)+      data T a = MkT ...+      data S a = ...T...MkT....+  If there is an error in the definition of 'T' we add a "fake type+  constructor" to the type environment, so that we can continue to+  typecheck 'S'.  But we /were not/ adding a fake anything for 'MkT'+  and so there was an internal error when we met 'MkT' in the body of+  'S'.++* Painfully, we *don't* want to do this for classes.+  Consider tcfail041:+     class (?x::Int) => C a where ...+     instance C Int+  The class is invalid because of the superclass constraint.  But+  we still want it to look like a /class/, else the instance bleats+  that the instance is mal-formed because it hasn't got a class in+  the head.++  This is really bogus; now we have in scope a Class that is invalid+  in some way, with unknown downstream consequences.  A better+  alterantive might be to make a fake class TyCon.  A job for another day.+-}++-------------------------+-- For data types declared with record syntax, we require+-- that each constructor that has a field 'f'+--      (a) has the same result type+--      (b) has the same type for 'f'+-- module alpha conversion of the quantified type variables+-- of the constructor.+--+-- Note that we allow existentials to match because the+-- fields can never meet. E.g+--      data T where+--        T1 { f1 :: b, f2 :: a, f3 ::Int } :: T+--        T2 { f1 :: c, f2 :: c, f3 ::Int } :: T+-- Here we do not complain about f1,f2 because they are existential++checkValidTyCon :: TyCon -> TcM ()+checkValidTyCon tc+  | isPrimTyCon tc   -- Happens when Haddock'ing GHC.Prim+  = return ()++  | otherwise+  = do { traceTc "checkValidTyCon" (ppr tc $$ ppr (tyConClass_maybe tc))+       ; if | Just cl <- tyConClass_maybe tc+              -> checkValidClass cl++            | Just syn_rhs <- synTyConRhs_maybe tc+              -> do { checkValidType syn_ctxt syn_rhs+                    ; checkTySynRhs syn_ctxt syn_rhs }++            | Just fam_flav <- famTyConFlav_maybe tc+              -> case fam_flav of+               { ClosedSynFamilyTyCon (Just ax)+                   -> tcAddClosedTypeFamilyDeclCtxt tc $+                      checkValidCoAxiom ax+               ; ClosedSynFamilyTyCon Nothing   -> return ()+               ; AbstractClosedSynFamilyTyCon ->+                 do { hsBoot <- tcIsHsBootOrSig+                    ; checkTc hsBoot $+                      text "You may define an abstract closed type family" $$+                      text "only in a .hs-boot file" }+               ; DataFamilyTyCon {}           -> return ()+               ; OpenSynFamilyTyCon           -> return ()+               ; BuiltInSynFamTyCon _         -> return () }++             | otherwise -> do+               { -- Check the context on the data decl+                 traceTc "cvtc1" (ppr tc)+               ; checkValidTheta (DataTyCtxt name) (tyConStupidTheta tc)++               ; traceTc "cvtc2" (ppr tc)++               ; dflags          <- getDynFlags+               ; existential_ok  <- xoptM LangExt.ExistentialQuantification+               ; gadt_ok         <- xoptM LangExt.GADTs+               ; let ex_ok = existential_ok || gadt_ok+                     -- Data cons can have existential context+               ; mapM_ (checkValidDataCon dflags ex_ok tc) data_cons+               ; mapM_ (checkPartialRecordField data_cons) (tyConFieldLabels tc)++                -- Check that fields with the same name share a type+               ; mapM_ check_fields groups }}+  where+    syn_ctxt  = TySynCtxt name+    name      = tyConName tc+    data_cons = tyConDataCons tc++    groups = equivClasses cmp_fld (concatMap get_fields data_cons)+    cmp_fld (f1,_) (f2,_) = flLabel f1 `compare` flLabel f2+    get_fields con = dataConFieldLabels con `zip` repeat con+        -- dataConFieldLabels may return the empty list, which is fine++    -- See Note [GADT record selectors] in TcTyDecls+    -- We must check (a) that the named field has the same+    --                   type in each constructor+    --               (b) that those constructors have the same result type+    --+    -- However, the constructors may have differently named type variable+    -- and (worse) we don't know how the correspond to each other.  E.g.+    --     C1 :: forall a b. { f :: a, g :: b } -> T a b+    --     C2 :: forall d c. { f :: c, g :: c } -> T c d+    --+    -- So what we do is to ust Unify.tcMatchTys to compare the first candidate's+    -- result type against other candidates' types BOTH WAYS ROUND.+    -- If they magically agrees, take the substitution and+    -- apply them to the latter ones, and see if they match perfectly.+    check_fields ((label, con1) :| other_fields)+        -- These fields all have the same name, but are from+        -- different constructors in the data type+        = recoverM (return ()) $ mapM_ checkOne other_fields+                -- Check that all the fields in the group have the same type+                -- NB: this check assumes that all the constructors of a given+                -- data type use the same type variables+        where+        (_, _, _, res1) = dataConSig con1+        fty1 = dataConFieldType con1 lbl+        lbl = flLabel label++        checkOne (_, con2)    -- Do it both ways to ensure they are structurally identical+            = do { checkFieldCompat lbl con1 con2 res1 res2 fty1 fty2+                 ; checkFieldCompat lbl con2 con1 res2 res1 fty2 fty1 }+            where+                (_, _, _, res2) = dataConSig con2+                fty2 = dataConFieldType con2 lbl++checkPartialRecordField :: [DataCon] -> FieldLabel -> TcM ()+-- Checks the partial record field selector, and warns.+-- See Note [Checking partial record field]+checkPartialRecordField all_cons fld+  = setSrcSpan loc $+      warnIfFlag Opt_WarnPartialFields+        (not is_exhaustive && not (startsWithUnderscore occ_name))+        (sep [text "Use of partial record field selector" <> colon,+              nest 2 $ quotes (ppr occ_name)])+  where+    sel_name = flSelector fld+    loc    = getSrcSpan sel_name+    occ_name = getOccName sel_name++    (cons_with_field, cons_without_field) = partition has_field all_cons+    has_field con = fld `elem` (dataConFieldLabels con)+    is_exhaustive = all (dataConCannotMatch inst_tys) cons_without_field++    con1 = ASSERT( not (null cons_with_field) ) head cons_with_field+    (univ_tvs, _, eq_spec, _, _, _) = dataConFullSig con1+    eq_subst = mkTvSubstPrs (map eqSpecPair eq_spec)+    inst_tys = substTyVars eq_subst univ_tvs++checkFieldCompat :: FieldLabelString -> DataCon -> DataCon+                 -> Type -> Type -> Type -> Type -> TcM ()+checkFieldCompat fld con1 con2 res1 res2 fty1 fty2+  = do  { checkTc (isJust mb_subst1) (resultTypeMisMatch fld con1 con2)+        ; checkTc (isJust mb_subst2) (fieldTypeMisMatch fld con1 con2) }+  where+    mb_subst1 = tcMatchTy res1 res2+    mb_subst2 = tcMatchTyX (expectJust "checkFieldCompat" mb_subst1) fty1 fty2++-------------------------------+checkValidDataCon :: DynFlags -> Bool -> TyCon -> DataCon -> TcM ()+checkValidDataCon dflags existential_ok tc con+  = setSrcSpan (getSrcSpan con)  $+    addErrCtxt (dataConCtxt con) $+    do  { -- Check that the return type of the data constructor+          -- matches the type constructor; eg reject this:+          --   data T a where { MkT :: Bogus a }+          -- It's important to do this first:+          --  see Note [Checking GADT return types]+          --  and c.f. Note [Check role annotations in a second pass]+          let tc_tvs      = tyConTyVars tc+              res_ty_tmpl = mkFamilyTyConApp tc (mkTyVarTys tc_tvs)+              orig_res_ty = dataConOrigResTy con+        ; traceTc "checkValidDataCon" (vcat+              [ ppr con, ppr tc, ppr tc_tvs+              , ppr res_ty_tmpl <+> dcolon <+> ppr (tcTypeKind res_ty_tmpl)+              , ppr orig_res_ty <+> dcolon <+> ppr (tcTypeKind orig_res_ty)])+++        ; checkTc (isJust (tcMatchTy res_ty_tmpl orig_res_ty))+                  (badDataConTyCon con res_ty_tmpl)+            -- Note that checkTc aborts if it finds an error. This is+            -- critical to avoid panicking when we call dataConUserType+            -- on an un-rejiggable datacon!++        ; traceTc "checkValidDataCon 2" (ppr (dataConUserType con))++          -- Check that the result type is a *monotype*+          --  e.g. reject this:   MkT :: T (forall a. a->a)+          -- Reason: it's really the argument of an equality constraint+        ; checkValidMonoType orig_res_ty++          -- Check all argument types for validity+        ; checkValidType ctxt (dataConUserType con)++          -- If we are dealing with a newtype, we allow levity polymorphism+          -- regardless of whether or not UnliftedNewtypes is enabled. A+          -- later check in checkNewDataCon handles this, producing a+          -- better error message than checkForLevPoly would.+        ; unless (isNewTyCon tc)+            (mapM_ (checkForLevPoly empty) (dataConOrigArgTys con))++          -- Extra checks for newtype data constructors+        ; when (isNewTyCon tc) (checkNewDataCon con)++          -- Check that existentials are allowed if they are used+        ; checkTc (existential_ok || isVanillaDataCon con)+                  (badExistential con)++          -- Check that UNPACK pragmas and bangs work out+          -- E.g.  reject   data T = MkT {-# UNPACK #-} Int     -- No "!"+          --                data T = MkT {-# UNPACK #-} !a      -- Can't unpack+        ; zipWith3M_ check_bang (dataConSrcBangs con) (dataConImplBangs con) [1..]++          -- Check the dcUserTyVarBinders invariant+          -- See Note [DataCon user type variable binders] in DataCon+          -- checked here because we sometimes build invalid DataCons before+          -- erroring above here+        ; when debugIsOn $+          do { let (univs, exs, eq_spec, _, _, _) = dataConFullSig con+                   user_tvs                       = dataConUserTyVars con+                   user_tvbs_invariant+                     =    Set.fromList (filterEqSpec eq_spec univs ++ exs)+                       == Set.fromList user_tvs+             ; WARN( not user_tvbs_invariant+                       , vcat ([ ppr con+                               , ppr univs+                               , ppr exs+                               , ppr eq_spec+                               , ppr user_tvs ])) return () }++        ; traceTc "Done validity of data con" $+          vcat [ ppr con+               , text "Datacon user type:" <+> ppr (dataConUserType con)+               , text "Datacon rep type:" <+> ppr (dataConRepType con)+               , text "Rep typcon binders:" <+> ppr (tyConBinders (dataConTyCon con))+               , case tyConFamInst_maybe (dataConTyCon con) of+                   Nothing -> text "not family"+                   Just (f, _) -> ppr (tyConBinders f) ]+    }+  where+    ctxt = ConArgCtxt (dataConName con)++    check_bang :: HsSrcBang -> HsImplBang -> Int -> TcM ()+    check_bang (HsSrcBang _ _ SrcLazy) _ n+      | not (xopt LangExt.StrictData dflags)+      = addErrTc+          (bad_bang n (text "Lazy annotation (~) without StrictData"))+    check_bang (HsSrcBang _ want_unpack strict_mark) rep_bang n+      | isSrcUnpacked want_unpack, not is_strict+      = addWarnTc NoReason (bad_bang n (text "UNPACK pragma lacks '!'"))+      | isSrcUnpacked want_unpack+      , case rep_bang of { HsUnpack {} -> False; _ -> True }+      -- If not optimising, we don't unpack (rep_bang is never+      -- HsUnpack), so don't complain!  This happens, e.g., in Haddock.+      -- See dataConSrcToImplBang.+      , not (gopt Opt_OmitInterfacePragmas dflags)+      -- When typechecking an indefinite package in Backpack, we+      -- may attempt to UNPACK an abstract type.  The test here will+      -- conclude that this is unusable, but it might become usable+      -- when we actually fill in the abstract type.  As such, don't+      -- warn in this case (it gives users the wrong idea about whether+      -- or not UNPACK on abstract types is supported; it is!)+      , unitIdIsDefinite (thisPackage dflags)+      = addWarnTc NoReason (bad_bang n (text "Ignoring unusable UNPACK pragma"))+      where+        is_strict = case strict_mark of+                      NoSrcStrict -> xopt LangExt.StrictData dflags+                      bang        -> isSrcStrict bang++    check_bang _ _ _+      = return ()++    bad_bang n herald+      = hang herald 2 (text "on the" <+> speakNth n+                       <+> text "argument of" <+> quotes (ppr con))+-------------------------------+checkNewDataCon :: DataCon -> TcM ()+-- Further checks for the data constructor of a newtype+checkNewDataCon con+  = do  { checkTc (isSingleton arg_tys) (newtypeFieldErr con (length arg_tys))+              -- One argument++        ; unlifted_newtypes <- xoptM LangExt.UnliftedNewtypes+        ; let allowedArgType =+                unlifted_newtypes || isLiftedType_maybe arg_ty1 == Just True+        ; checkTc allowedArgType $ vcat+          [ text "A newtype cannot have an unlifted argument type"+          , text "Perhaps you intended to use UnliftedNewtypes"+          ]++        ; check_con (null eq_spec) $+          text "A newtype constructor must have a return type of form T a1 ... an"+                -- Return type is (T a b c)++        ; check_con (null theta) $+          text "A newtype constructor cannot have a context in its type"++        ; check_con (null ex_tvs) $+          text "A newtype constructor cannot have existential type variables"+                -- No existentials++        ; checkTc (all ok_bang (dataConSrcBangs con))+                  (newtypeStrictError con)+                -- No strictness annotations+    }+  where+    (_univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res_ty)+      = dataConFullSig con+    check_con what msg+       = checkTc what (msg $$ ppr con <+> dcolon <+> ppr (dataConUserType con))++    (arg_ty1 : _) = arg_tys++    ok_bang (HsSrcBang _ _ SrcStrict) = False+    ok_bang (HsSrcBang _ _ SrcLazy)   = False+    ok_bang _                         = True++-------------------------------+checkValidClass :: Class -> TcM ()+checkValidClass cls+  = do  { constrained_class_methods <- xoptM LangExt.ConstrainedClassMethods+        ; multi_param_type_classes  <- xoptM LangExt.MultiParamTypeClasses+        ; nullary_type_classes      <- xoptM LangExt.NullaryTypeClasses+        ; fundep_classes            <- xoptM LangExt.FunctionalDependencies+        ; undecidable_super_classes <- xoptM LangExt.UndecidableSuperClasses++        -- Check that the class is unary, unless multiparameter type classes+        -- are enabled; also recognize deprecated nullary type classes+        -- extension (subsumed by multiparameter type classes, #8993)+        ; checkTc (multi_param_type_classes || cls_arity == 1 ||+                    (nullary_type_classes && cls_arity == 0))+                  (classArityErr cls_arity cls)+        ; checkTc (fundep_classes || null fundeps) (classFunDepsErr cls)++        -- Check the super-classes+        ; checkValidTheta (ClassSCCtxt (className cls)) theta++          -- Now check for cyclic superclasses+          -- If there are superclass cycles, checkClassCycleErrs bails.+        ; unless undecidable_super_classes $+          case checkClassCycles cls of+             Just err -> setSrcSpan (getSrcSpan cls) $+                         addErrTc err+             Nothing  -> return ()++        -- Check the class operations.+        -- But only if there have been no earlier errors+        -- See Note [Abort when superclass cycle is detected]+        ; whenNoErrs $+          mapM_ (check_op constrained_class_methods) op_stuff++        -- Check the associated type defaults are well-formed and instantiated+        ; mapM_ check_at at_stuff  }+  where+    (tyvars, fundeps, theta, _, at_stuff, op_stuff) = classExtraBigSig cls+    cls_arity = length (tyConVisibleTyVars (classTyCon cls))+       -- Ignore invisible variables+    cls_tv_set = mkVarSet tyvars++    check_op constrained_class_methods (sel_id, dm)+      = setSrcSpan (getSrcSpan sel_id) $+        addErrCtxt (classOpCtxt sel_id op_ty) $ do+        { traceTc "class op type" (ppr op_ty)+        ; checkValidType ctxt op_ty+                -- This implements the ambiguity check, among other things+                -- Example: tc223+                --   class Error e => Game b mv e | b -> mv e where+                --      newBoard :: MonadState b m => m ()+                -- Here, MonadState has a fundep m->b, so newBoard is fine++           -- a method cannot be levity polymorphic, as we have to store the+           -- method in a dictionary+           -- example of what this prevents:+           --   class BoundedX (a :: TYPE r) where minBound :: a+           -- See Note [Levity polymorphism checking] in DsMonad+        ; checkForLevPoly empty tau1++        ; unless constrained_class_methods $+          mapM_ check_constraint (tail (cls_pred:op_theta))++        ; check_dm ctxt sel_id cls_pred tau2 dm+        }+        where+          ctxt    = FunSigCtxt op_name True -- Report redundant class constraints+          op_name = idName sel_id+          op_ty   = idType sel_id+          (_,cls_pred,tau1) = tcSplitMethodTy op_ty+          -- See Note [Splitting nested sigma types in class type signatures]+          (_,op_theta,tau2) = tcSplitNestedSigmaTys tau1++          check_constraint :: TcPredType -> TcM ()+          check_constraint pred -- See Note [Class method constraints]+            = when (not (isEmptyVarSet pred_tvs) &&+                    pred_tvs `subVarSet` cls_tv_set)+                   (addErrTc (badMethPred sel_id pred))+            where+              pred_tvs = tyCoVarsOfType pred++    check_at (ATI fam_tc m_dflt_rhs)+      = do { checkTc (cls_arity == 0 || any (`elemVarSet` cls_tv_set) fam_tvs)+                     (noClassTyVarErr cls fam_tc)+                        -- Check that the associated type mentions at least+                        -- one of the class type variables+                        -- The check is disabled for nullary type classes,+                        -- since there is no possible ambiguity (#10020)++             -- Check that any default declarations for associated types are valid+           ; whenIsJust m_dflt_rhs $ \ (rhs, loc) ->+             setSrcSpan loc $+             tcAddFamInstCtxt (text "default type instance") (getName fam_tc) $+             checkValidTyFamEqn fam_tc fam_tvs (mkTyVarTys fam_tvs) rhs }+        where+          fam_tvs = tyConTyVars fam_tc++    check_dm :: UserTypeCtxt -> Id -> PredType -> Type -> DefMethInfo -> TcM ()+    -- Check validity of the /top-level/ generic-default type+    -- E.g for   class C a where+    --             default op :: forall b. (a~b) => blah+    -- we do not want to do an ambiguity check on a type with+    -- a free TyVar 'a' (#11608).  See TcType+    -- Note [TyVars and TcTyVars during type checking] in TcType+    -- Hence the mkDefaultMethodType to close the type.+    check_dm ctxt sel_id vanilla_cls_pred vanilla_tau+             (Just (dm_name, dm_spec@(GenericDM dm_ty)))+      = setSrcSpan (getSrcSpan dm_name) $ do+            -- We have carefully set the SrcSpan on the generic+            -- default-method Name to be that of the generic+            -- default type signature++          -- First, we check that that the method's default type signature+          -- aligns with the non-default type signature.+          -- See Note [Default method type signatures must align]+          let cls_pred = mkClassPred cls $ mkTyVarTys $ classTyVars cls+              -- Note that the second field of this tuple contains the context+              -- of the default type signature, making it apparent that we+              -- ignore method contexts completely when validity-checking+              -- default type signatures. See the end of+              -- Note [Default method type signatures must align]+              -- to learn why this is OK.+              --+              -- See also+              -- Note [Splitting nested sigma types in class type signatures]+              -- for an explanation of why we don't use tcSplitSigmaTy here.+              (_, _, dm_tau) = tcSplitNestedSigmaTys dm_ty++              -- Given this class definition:+              --+              --  class C a b where+              --    op         :: forall p q. (Ord a, D p q)+              --               => a -> b -> p -> (a, b)+              --    default op :: forall r s. E r+              --               => a -> b -> s -> (a, b)+              --+              -- We want to match up two types of the form:+              --+              --   Vanilla type sig: C aa bb => aa -> bb -> p -> (aa, bb)+              --   Default type sig: C a  b  => a  -> b  -> s -> (a,  b)+              --+              -- Notice that the two type signatures can be quantified over+              -- different class type variables! Therefore, it's important that+              -- we include the class predicate parts to match up a with aa and+              -- b with bb.+              vanilla_phi_ty = mkPhiTy [vanilla_cls_pred] vanilla_tau+              dm_phi_ty      = mkPhiTy [cls_pred] dm_tau++          traceTc "check_dm" $ vcat+              [ text "vanilla_phi_ty" <+> ppr vanilla_phi_ty+              , text "dm_phi_ty"      <+> ppr dm_phi_ty ]++          -- Actually checking that the types align is done with a call to+          -- tcMatchTys. We need to get a match in both directions to rule+          -- out degenerate cases like these:+          --+          --  class Foo a where+          --    foo1         :: a -> b+          --    default foo1 :: a -> Int+          --+          --    foo2         :: a -> Int+          --    default foo2 :: a -> b+          unless (isJust $ tcMatchTys [dm_phi_ty, vanilla_phi_ty]+                                      [vanilla_phi_ty, dm_phi_ty]) $ addErrTc $+               hang (text "The default type signature for"+                     <+> ppr sel_id <> colon)+                 2 (ppr dm_ty)+            $$ (text "does not match its corresponding"+                <+> text "non-default type signature")++          -- Now do an ambiguity check on the default type signature.+          checkValidType ctxt (mkDefaultMethodType cls sel_id dm_spec)+    check_dm _ _ _ _ _ = return ()++checkFamFlag :: Name -> TcM ()+-- Check that we don't use families without -XTypeFamilies+-- The parser won't even parse them, but I suppose a GHC API+-- client might have a go!+checkFamFlag tc_name+  = do { idx_tys <- xoptM LangExt.TypeFamilies+       ; checkTc idx_tys err_msg }+  where+    err_msg = hang (text "Illegal family declaration for" <+> quotes (ppr tc_name))+                 2 (text "Enable TypeFamilies to allow indexed type families")++checkResultSigFlag :: Name -> FamilyResultSig GhcRn -> TcM ()+checkResultSigFlag tc_name (TyVarSig _ tvb)+  = do { ty_fam_deps <- xoptM LangExt.TypeFamilyDependencies+       ; checkTc ty_fam_deps $+         hang (text "Illegal result type variable" <+> ppr tvb <+> text "for" <+> quotes (ppr tc_name))+            2 (text "Enable TypeFamilyDependencies to allow result variable names") }+checkResultSigFlag _ _ = return ()  -- other cases OK++{- Note [Class method constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Haskell 2010 is supposed to reject+  class C a where+    op :: Eq a => a -> a+where the method type constrains only the class variable(s).  (The extension+-XConstrainedClassMethods switches off this check.)  But regardless+we should not reject+  class C a where+    op :: (?x::Int) => a -> a+as pointed out in #11793. So the test here rejects the program if+  * -XConstrainedClassMethods is off+  * the tyvars of the constraint are non-empty+  * all the tyvars are class tyvars, none are locally quantified++Note [Abort when superclass cycle is detected]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We must avoid doing the ambiguity check for the methods (in+checkValidClass.check_op) when there are already errors accumulated.+This is because one of the errors may be a superclass cycle, and+superclass cycles cause canonicalization to loop. Here is a+representative example:++  class D a => C a where+    meth :: D a => ()+  class C a => D a++This fixes #9415, #9739++Note [Default method type signatures must align]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+GHC enforces the invariant that a class method's default type signature+must "align" with that of the method's non-default type signature, as per+GHC #12918. For instance, if you have:++  class Foo a where+    bar :: forall b. Context => a -> b++Then a default type signature for bar must be alpha equivalent to+(forall b. a -> b). That is, the types must be the same modulo differences in+contexts. So the following would be acceptable default type signatures:++    default bar :: forall b. Context1 => a -> b+    default bar :: forall x. Context2 => a -> x++But the following are NOT acceptable default type signatures:++    default bar :: forall b. b -> a+    default bar :: forall x. x+    default bar :: a -> Int++Note that a is bound by the class declaration for Foo itself, so it is+not allowed to differ in the default type signature.++The default type signature (default bar :: a -> Int) deserves special mention,+since (a -> Int) is a straightforward instantiation of (forall b. a -> b). To+write this, you need to declare the default type signature like so:++    default bar :: forall b. (b ~ Int). a -> b++As noted in #12918, there are several reasons to do this:++1. It would make no sense to have a type that was flat-out incompatible with+   the non-default type signature. For instance, if you had:++     class Foo a where+       bar :: a -> Int+       default bar :: a -> Bool++   Then that would always fail in an instance declaration. So this check+   nips such cases in the bud before they have the chance to produce+   confusing error messages.++2. Internally, GHC uses TypeApplications to instantiate the default method in+   an instance. See Note [Default methods in instances] in TcInstDcls.+   Thus, GHC needs to know exactly what the universally quantified type+   variables are, and when instantiated that way, the default method's type+   must match the expected type.++3. Aesthetically, by only allowing the default type signature to differ in its+   context, we are making it more explicit the ways in which the default type+   signature is less polymorphic than the non-default type signature.++You might be wondering: why are the contexts allowed to be different, but not+the rest of the type signature? That's because default implementations often+rely on assumptions that the more general, non-default type signatures do not.+For instance, in the Enum class declaration:++    class Enum a where+      enum :: [a]+      default enum :: (Generic a, GEnum (Rep a)) => [a]+      enum = map to genum++    class GEnum f where+      genum :: [f a]++The default implementation for enum only works for types that are instances of+Generic, and for which their generic Rep type is an instance of GEnum. But+clearly enum doesn't _have_ to use this implementation, so naturally, the+context for enum is allowed to be different to accomodate this. As a result,+when we validity-check default type signatures, we ignore contexts completely.++Note that when checking whether two type signatures match, we must take care to+split as many foralls as it takes to retrieve the tau types we which to check.+See Note [Splitting nested sigma types in class type signatures].++Note [Splitting nested sigma types in class type signatures]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this type synonym and class definition:++  type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t++  class Each s t a b where+    each         ::                                      Traversal s t a b+    default each :: (Traversable g, s ~ g a, t ~ g b) => Traversal s t a b++It might seem obvious that the tau types in both type signatures for `each`+are the same, but actually getting GHC to conclude this is surprisingly tricky.+That is because in general, the form of a class method's non-default type+signature is:++  forall a. C a => forall d. D d => E a b++And the general form of a default type signature is:++  forall f. F f => E a f -- The variable `a` comes from the class++So it you want to get the tau types in each type signature, you might find it+reasonable to call tcSplitSigmaTy twice on the non-default type signature, and+call it once on the default type signature. For most classes and methods, this+will work, but Each is a bit of an exceptional case. The way `each` is written,+it doesn't quantify any additional type variables besides those of the Each+class itself, so the non-default type signature for `each` is actually this:++  forall s t a b. Each s t a b => Traversal s t a b++Notice that there _appears_ to only be one forall. But there's actually another+forall lurking in the Traversal type synonym, so if you call tcSplitSigmaTy+twice, you'll also go under the forall in Traversal! That is, you'll end up+with:++  (a -> f b) -> s -> f t++A problem arises because you only call tcSplitSigmaTy once on the default type+signature for `each`, which gives you++  Traversal s t a b++Or, equivalently:++  forall f. Applicative f => (a -> f b) -> s -> f t++This is _not_ the same thing as (a -> f b) -> s -> f t! So now tcMatchTy will+say that the tau types for `each` are not equal.++A solution to this problem is to use tcSplitNestedSigmaTys instead of+tcSplitSigmaTy. tcSplitNestedSigmaTys will always split any foralls that it+sees until it can't go any further, so if you called it on the default type+signature for `each`, it would return (a -> f b) -> s -> f t like we desired.++Note [Checking partial record field]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This check checks the partial record field selector, and warns (#7169).++For example:++  data T a = A { m1 :: a, m2 :: a } | B { m1 :: a }++The function 'm2' is partial record field, and will fail when it is applied to+'B'. The warning identifies such partial fields. The check is performed at the+declaration of T, not at the call-sites of m2.++The warning can be suppressed by prefixing the field-name with an underscore.+For example:++  data T a = A { m1 :: a, _m2 :: a } | B { m1 :: a }++************************************************************************+*                                                                      *+                Checking role validity+*                                                                      *+************************************************************************+-}++checkValidRoleAnnots :: RoleAnnotEnv -> TyCon -> TcM ()+checkValidRoleAnnots role_annots tc+  | isTypeSynonymTyCon tc = check_no_roles+  | isFamilyTyCon tc      = check_no_roles+  | isAlgTyCon tc         = check_roles+  | otherwise             = return ()+  where+    -- Role annotations are given only on *explicit* variables,+    -- but a tycon stores roles for all variables.+    -- So, we drop the implicit roles (which are all Nominal, anyway).+    name                   = tyConName tc+    roles                  = tyConRoles tc+    (vis_roles, vis_vars)  = unzip $ mapMaybe pick_vis $+                             zip roles (tyConBinders tc)+    role_annot_decl_maybe  = lookupRoleAnnot role_annots name++    pick_vis :: (Role, TyConBinder) -> Maybe (Role, TyVar)+    pick_vis (role, tvb)+      | isVisibleTyConBinder tvb = Just (role, binderVar tvb)+      | otherwise                = Nothing++    check_roles+      = whenIsJust role_annot_decl_maybe $+          \decl@(dL->L loc (RoleAnnotDecl _ _ the_role_annots)) ->+          addRoleAnnotCtxt name $+          setSrcSpan loc $ do+          { role_annots_ok <- xoptM LangExt.RoleAnnotations+          ; checkTc role_annots_ok $ needXRoleAnnotations tc+          ; checkTc (vis_vars `equalLength` the_role_annots)+                    (wrongNumberOfRoles vis_vars decl)+          ; _ <- zipWith3M checkRoleAnnot vis_vars the_role_annots vis_roles+          -- Representational or phantom roles for class parameters+          -- quickly lead to incoherence. So, we require+          -- IncoherentInstances to have them. See #8773, #14292+          ; incoherent_roles_ok <- xoptM LangExt.IncoherentInstances+          ; checkTc (  incoherent_roles_ok+                    || (not $ isClassTyCon tc)+                    || (all (== Nominal) vis_roles))+                    incoherentRoles++          ; lint <- goptM Opt_DoCoreLinting+          ; when lint $ checkValidRoles tc }++    check_no_roles+      = whenIsJust role_annot_decl_maybe illegalRoleAnnotDecl++checkRoleAnnot :: TyVar -> Located (Maybe Role) -> Role -> TcM ()+checkRoleAnnot _  (dL->L _ Nothing)   _  = return ()+checkRoleAnnot tv (dL->L _ (Just r1)) r2+  = when (r1 /= r2) $+    addErrTc $ badRoleAnnot (tyVarName tv) r1 r2+checkRoleAnnot _ _ _ = panic "checkRoleAnnot: Impossible Match" -- due to #15884++-- This is a double-check on the role inference algorithm. It is only run when+-- -dcore-lint is enabled. See Note [Role inference] in TcTyDecls+checkValidRoles :: TyCon -> TcM ()+-- If you edit this function, you may need to update the GHC formalism+-- See Note [GHC Formalism] in CoreLint+checkValidRoles tc+  | isAlgTyCon tc+    -- tyConDataCons returns an empty list for data families+  = mapM_ check_dc_roles (tyConDataCons tc)+  | Just rhs <- synTyConRhs_maybe tc+  = check_ty_roles (zipVarEnv (tyConTyVars tc) (tyConRoles tc)) Representational rhs+  | otherwise+  = return ()+  where+    check_dc_roles datacon+      = do { traceTc "check_dc_roles" (ppr datacon <+> ppr (tyConRoles tc))+           ; mapM_ (check_ty_roles role_env Representational) $+                    eqSpecPreds eq_spec ++ theta ++ arg_tys }+                    -- See Note [Role-checking data constructor arguments] in TcTyDecls+      where+        (univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res_ty)+          = dataConFullSig datacon+        univ_roles = zipVarEnv univ_tvs (tyConRoles tc)+              -- zipVarEnv uses zipEqual, but we don't want that for ex_tvs+        ex_roles   = mkVarEnv (map (, Nominal) ex_tvs)+        role_env   = univ_roles `plusVarEnv` ex_roles++    check_ty_roles env role ty+      | Just ty' <- coreView ty -- #14101+      = check_ty_roles env role ty'++    check_ty_roles env role (TyVarTy tv)+      = case lookupVarEnv env tv of+          Just role' -> unless (role' `ltRole` role || role' == role) $+                        report_error $ text "type variable" <+> quotes (ppr tv) <+>+                                       text "cannot have role" <+> ppr role <+>+                                       text "because it was assigned role" <+> ppr role'+          Nothing    -> report_error $ text "type variable" <+> quotes (ppr tv) <+>+                                       text "missing in environment"++    check_ty_roles env Representational (TyConApp tc tys)+      = let roles' = tyConRoles tc in+        zipWithM_ (maybe_check_ty_roles env) roles' tys++    check_ty_roles env Nominal (TyConApp _ tys)+      = mapM_ (check_ty_roles env Nominal) tys++    check_ty_roles _   Phantom ty@(TyConApp {})+      = pprPanic "check_ty_roles" (ppr ty)++    check_ty_roles env role (AppTy ty1 ty2)+      =  check_ty_roles env role    ty1+      >> check_ty_roles env Nominal ty2++    check_ty_roles env role (FunTy _ ty1 ty2)+      =  check_ty_roles env role ty1+      >> check_ty_roles env role ty2++    check_ty_roles env role (ForAllTy (Bndr tv _) ty)+      =  check_ty_roles env Nominal (tyVarKind tv)+      >> check_ty_roles (extendVarEnv env tv Nominal) role ty++    check_ty_roles _   _    (LitTy {}) = return ()++    check_ty_roles env role (CastTy t _)+      = check_ty_roles env role t++    check_ty_roles _   role (CoercionTy co)+      = unless (role == Phantom) $+        report_error $ text "coercion" <+> ppr co <+> text "has bad role" <+> ppr role++    maybe_check_ty_roles env role ty+      = when (role == Nominal || role == Representational) $+        check_ty_roles env role ty++    report_error doc+      = addErrTc $ vcat [text "Internal error in role inference:",+                         doc,+                         text "Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug"]++{-+************************************************************************+*                                                                      *+                Error messages+*                                                                      *+************************************************************************+-}++tcAddTyFamInstCtxt :: TyFamInstDecl GhcRn -> TcM a -> TcM a+tcAddTyFamInstCtxt decl+  = tcAddFamInstCtxt (text "type instance") (tyFamInstDeclName decl)++tcMkDataFamInstCtxt :: DataFamInstDecl GhcRn -> SDoc+tcMkDataFamInstCtxt decl@(DataFamInstDecl { dfid_eqn =+                            HsIB { hsib_body = eqn }})+  = tcMkFamInstCtxt (pprDataFamInstFlavour decl <+> text "instance")+                    (unLoc (feqn_tycon eqn))+tcMkDataFamInstCtxt (DataFamInstDecl (XHsImplicitBndrs nec))+  = noExtCon nec++tcAddDataFamInstCtxt :: DataFamInstDecl GhcRn -> TcM a -> TcM a+tcAddDataFamInstCtxt decl+  = addErrCtxt (tcMkDataFamInstCtxt decl)++tcMkFamInstCtxt :: SDoc -> Name -> SDoc+tcMkFamInstCtxt flavour tycon+  = hsep [ text "In the" <+> flavour <+> text "declaration for"+         , quotes (ppr tycon) ]++tcAddFamInstCtxt :: SDoc -> Name -> TcM a -> TcM a+tcAddFamInstCtxt flavour tycon thing_inside+  = addErrCtxt (tcMkFamInstCtxt flavour tycon) thing_inside++tcAddClosedTypeFamilyDeclCtxt :: TyCon -> TcM a -> TcM a+tcAddClosedTypeFamilyDeclCtxt tc+  = addErrCtxt ctxt+  where+    ctxt = text "In the equations for closed type family" <+>+           quotes (ppr tc)++resultTypeMisMatch :: FieldLabelString -> DataCon -> DataCon -> SDoc+resultTypeMisMatch field_name con1 con2+  = vcat [sep [text "Constructors" <+> ppr con1 <+> text "and" <+> ppr con2,+                text "have a common field" <+> quotes (ppr field_name) <> comma],+          nest 2 $ text "but have different result types"]++fieldTypeMisMatch :: FieldLabelString -> DataCon -> DataCon -> SDoc+fieldTypeMisMatch field_name con1 con2+  = sep [text "Constructors" <+> ppr con1 <+> text "and" <+> ppr con2,+         text "give different types for field", quotes (ppr field_name)]++dataConCtxtName :: [Located Name] -> SDoc+dataConCtxtName [con]+   = text "In the definition of data constructor" <+> quotes (ppr con)+dataConCtxtName con+   = text "In the definition of data constructors" <+> interpp'SP con++dataConCtxt :: Outputable a => a -> SDoc+dataConCtxt con = text "In the definition of data constructor" <+> quotes (ppr con)++classOpCtxt :: Var -> Type -> SDoc+classOpCtxt sel_id tau = sep [text "When checking the class method:",+                              nest 2 (pprPrefixOcc sel_id <+> dcolon <+> ppr tau)]++classArityErr :: Int -> Class -> SDoc+classArityErr n cls+    | n == 0 = mkErr "No" "no-parameter"+    | otherwise = mkErr "Too many" "multi-parameter"+  where+    mkErr howMany allowWhat =+        vcat [text (howMany ++ " parameters for class") <+> quotes (ppr cls),+              parens (text ("Enable MultiParamTypeClasses to allow "+                                    ++ allowWhat ++ " classes"))]++classFunDepsErr :: Class -> SDoc+classFunDepsErr cls+  = vcat [text "Fundeps in class" <+> quotes (ppr cls),+          parens (text "Enable FunctionalDependencies to allow fundeps")]++badMethPred :: Id -> TcPredType -> SDoc+badMethPred sel_id pred+  = vcat [ hang (text "Constraint" <+> quotes (ppr pred)+                 <+> text "in the type of" <+> quotes (ppr sel_id))+              2 (text "constrains only the class type variables")+         , text "Enable ConstrainedClassMethods to allow it" ]++noClassTyVarErr :: Class -> TyCon -> SDoc+noClassTyVarErr clas fam_tc+  = sep [ text "The associated type" <+> quotes (ppr fam_tc <+> hsep (map ppr (tyConTyVars fam_tc)))+        , text "mentions none of the type or kind variables of the class" <+>+                quotes (ppr clas <+> hsep (map ppr (classTyVars clas)))]++badDataConTyCon :: DataCon -> Type -> SDoc+badDataConTyCon data_con res_ty_tmpl+  | ASSERT( all isTyVar tvs )+    tcIsForAllTy actual_res_ty+  = nested_foralls_contexts_suggestion+  | isJust (tcSplitPredFunTy_maybe actual_res_ty)+  = nested_foralls_contexts_suggestion+  | otherwise+  = hang (text "Data constructor" <+> quotes (ppr data_con) <+>+                text "returns type" <+> quotes (ppr actual_res_ty))+       2 (text "instead of an instance of its parent type" <+> quotes (ppr res_ty_tmpl))+  where+    actual_res_ty = dataConOrigResTy data_con++    -- This suggestion is useful for suggesting how to correct code like what+    -- was reported in #12087:+    --+    --   data F a where+    --     MkF :: Ord a => Eq a => a -> F a+    --+    -- Although nested foralls or contexts are allowed in function type+    -- signatures, it is much more difficult to engineer GADT constructor type+    -- signatures to allow something similar, so we error in the latter case.+    -- Nevertheless, we can at least suggest how a user might reshuffle their+    -- exotic GADT constructor type signature so that GHC will accept.+    nested_foralls_contexts_suggestion =+      text "GADT constructor type signature cannot contain nested"+      <+> quotes forAllLit <> text "s or contexts"+      $+$ hang (text "Suggestion: instead use this type signature:")+             2 (ppr (dataConName data_con) <+> dcolon <+> ppr suggested_ty)++    -- To construct a type that GHC would accept (suggested_ty), we:+    --+    -- 1) Find the existentially quantified type variables and the class+    --    predicates from the datacon. (NB: We don't need the universally+    --    quantified type variables, since rejigConRes won't substitute them in+    --    the result type if it fails, as in this scenario.)+    -- 2) Split apart the return type (which is headed by a forall or a+    --    context) using tcSplitNestedSigmaTys, collecting the type variables+    --    and class predicates we find, as well as the rho type lurking+    --    underneath the nested foralls and contexts.+    -- 3) Smash together the type variables and class predicates from 1) and+    --    2), and prepend them to the rho type from 2).+    (tvs, theta, rho) = tcSplitNestedSigmaTys (dataConUserType data_con)+    suggested_ty = mkSpecSigmaTy tvs theta rho++badGadtDecl :: Name -> SDoc+badGadtDecl tc_name+  = vcat [ text "Illegal generalised algebraic data declaration for" <+> quotes (ppr tc_name)+         , nest 2 (parens $ text "Enable the GADTs extension to allow this") ]++badExistential :: DataCon -> SDoc+badExistential con+  = hang (text "Data constructor" <+> quotes (ppr con) <+>+                text "has existential type variables, a context, or a specialised result type")+       2 (vcat [ ppr con <+> dcolon <+> ppr (dataConUserType con)+               , parens $ text "Enable ExistentialQuantification or GADTs to allow this" ])++badStupidTheta :: Name -> SDoc+badStupidTheta tc_name+  = text "A data type declared in GADT style cannot have a context:" <+> quotes (ppr tc_name)++newtypeConError :: Name -> Int -> SDoc+newtypeConError tycon n+  = sep [text "A newtype must have exactly one constructor,",+         nest 2 $ text "but" <+> quotes (ppr tycon) <+> text "has" <+> speakN n ]++newtypeStrictError :: DataCon -> SDoc+newtypeStrictError con+  = sep [text "A newtype constructor cannot have a strictness annotation,",+         nest 2 $ text "but" <+> quotes (ppr con) <+> text "does"]++newtypeFieldErr :: DataCon -> Int -> SDoc+newtypeFieldErr con_name n_flds+  = sep [text "The constructor of a newtype must have exactly one field",+         nest 2 $ text "but" <+> quotes (ppr con_name) <+> text "has" <+> speakN n_flds]++badSigTyDecl :: Name -> SDoc+badSigTyDecl tc_name+  = vcat [ text "Illegal kind signature" <+>+           quotes (ppr tc_name)+         , nest 2 (parens $ text "Use KindSignatures to allow kind signatures") ]++emptyConDeclsErr :: Name -> SDoc+emptyConDeclsErr tycon+  = sep [quotes (ppr tycon) <+> text "has no constructors",+         nest 2 $ text "(EmptyDataDecls permits this)"]++wrongKindOfFamily :: TyCon -> SDoc+wrongKindOfFamily family+  = text "Wrong category of family instance; declaration was for a"+    <+> kindOfFamily+  where+    kindOfFamily | isTypeFamilyTyCon family = text "type family"+                 | isDataFamilyTyCon family = text "data family"+                 | otherwise = pprPanic "wrongKindOfFamily" (ppr family)++-- | Produce an error for oversaturated type family equations with too many+-- required arguments.+-- See Note [Oversaturated type family equations] in TcValidity.+wrongNumberOfParmsErr :: Arity -> SDoc+wrongNumberOfParmsErr max_args+  = text "Number of parameters must match family declaration; expected"+    <+> ppr max_args++badRoleAnnot :: Name -> Role -> Role -> SDoc+badRoleAnnot var annot inferred+  = hang (text "Role mismatch on variable" <+> ppr var <> colon)+       2 (sep [ text "Annotation says", ppr annot+              , text "but role", ppr inferred+              , text "is required" ])++wrongNumberOfRoles :: [a] -> LRoleAnnotDecl GhcRn -> SDoc+wrongNumberOfRoles tyvars d@(dL->L _ (RoleAnnotDecl _ _ annots))+  = hang (text "Wrong number of roles listed in role annotation;" $$+          text "Expected" <+> (ppr $ length tyvars) <> comma <+>+          text "got" <+> (ppr $ length annots) <> colon)+       2 (ppr d)+wrongNumberOfRoles _ (dL->L _ (XRoleAnnotDecl nec)) = noExtCon nec+wrongNumberOfRoles _ _ = panic "wrongNumberOfRoles: Impossible Match"+                         -- due to #15884+++illegalRoleAnnotDecl :: LRoleAnnotDecl GhcRn -> TcM ()+illegalRoleAnnotDecl (dL->L loc (RoleAnnotDecl _ tycon _))+  = setErrCtxt [] $+    setSrcSpan loc $+    addErrTc (text "Illegal role annotation for" <+> ppr tycon <> char ';' $$+              text "they are allowed only for datatypes and classes.")+illegalRoleAnnotDecl (dL->L _ (XRoleAnnotDecl nec)) = noExtCon nec illegalRoleAnnotDecl _ = panic "illegalRoleAnnotDecl: Impossible Match"                          -- due to #15884 
typecheck/TcTyDecls.hs view
@@ -10,6 +10,7 @@ -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} @@ -32,12 +33,13 @@  import TcRnMonad import TcEnv-import TcBinds( tcValBinds, addTypecheckedBinds )+import TcBinds( tcValBinds ) import TyCoRep( Type(..), Coercion(..), MCoercion(..), UnivCoProvenance(..) ) import TcType+import Predicate import TysWiredIn( unitTy ) import MkCore( rEC_SEL_ERROR_ID )-import HsSyn+import GHC.Hs import Class import Type import HscTypes@@ -82,14 +84,14 @@   = nameEnvElts (go ty)   where      go :: Type -> NameEnv TyCon  -- The NameEnv does duplicate elim-     go (TyConApp tc tys)         = go_tc tc `plusNameEnv` go_s tys-     go (LitTy _)                 = emptyNameEnv-     go (TyVarTy _)               = emptyNameEnv-     go (AppTy a b)               = go a `plusNameEnv` go b-     go (FunTy a b)               = go a `plusNameEnv` go b-     go (ForAllTy _ ty)           = go ty-     go (CastTy ty co)            = go ty `plusNameEnv` go_co co-     go (CoercionTy co)           = go_co co+     go (TyConApp tc tys) = go_tc tc `plusNameEnv` go_s tys+     go (LitTy _)         = emptyNameEnv+     go (TyVarTy _)       = emptyNameEnv+     go (AppTy a b)       = go a `plusNameEnv` go b+     go (FunTy _ a b)     = go a `plusNameEnv` go b+     go (ForAllTy _ ty)   = go ty+     go (CastTy ty co)    = go ty `plusNameEnv` go_co co+     go (CoercionTy co)   = go_co co       -- Note [TyCon cycles through coercions?!]      -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -149,12 +151,10 @@ -- a failure message reporting that a cycle was found. newtype SynCycleM a = SynCycleM {     runSynCycleM :: SynCycleState -> Either (SrcSpan, SDoc) (a, SynCycleState) }+    deriving (Functor)  type SynCycleState = NameSet -instance Functor SynCycleM where-    fmap = liftM- instance Applicative SynCycleM where     pure x = SynCycleM $ \state -> Right (x, state)     (<*>) = ap@@ -598,7 +598,7 @@                                           lcls' = extendVarSet lcls tv                                     ; markNominal lcls (tyVarKind tv)                                     ; go lcls' ty }-    go lcls (FunTy arg res)    = go lcls arg >> go lcls res+    go lcls (FunTy _ arg res)  = go lcls arg >> go lcls res     go _    (LitTy {})         = return ()       -- See Note [Coercions in role inference]     go lcls (CastTy ty _)      = go lcls ty@@ -634,7 +634,7 @@     get_ty_vars :: Type -> FV     get_ty_vars (TyVarTy tv)      = unitFV tv     get_ty_vars (AppTy t1 t2)     = get_ty_vars t1 `unionFV` get_ty_vars t2-    get_ty_vars (FunTy t1 t2)     = get_ty_vars t1 `unionFV` get_ty_vars t2+    get_ty_vars (FunTy _ t1 t2)   = get_ty_vars t1 `unionFV` get_ty_vars t2     get_ty_vars (TyConApp _ tys)  = mapUnionFV get_ty_vars tys     get_ty_vars (ForAllTy tvb ty) = tyCoFVsBndr tvb (get_ty_vars ty)     get_ty_vars (LitTy {})        = emptyFV@@ -677,9 +677,7 @@                             -> Int          -- size of VarPositions                             -> RoleInferenceState                             -> (a, RoleInferenceState) }--instance Functor RoleM where-    fmap = liftM+    deriving (Functor)  instance Applicative RoleM where     pure x = RM $ \_ _ _ state -> (x, state)@@ -792,7 +790,7 @@      --     used in code generated by the fill-in for missing      --     methods in instances (TcInstDcls.mkDefMethBind), and      --     then typechecked.  So we need the right visibilty info-     --     (Trac #13998)+     --     (#13998)  {- ************************************************************************@@ -805,7 +803,7 @@ {- Note [Default method Ids and Template Haskell] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider this (Trac #4169):+Consider this (#4169):    class Numeric a where      fromIntegerNum :: a      fromIntegerNum = ...@@ -835,8 +833,8 @@                                      tcValBinds TopLevel binds sigs getGblEnv        ; return (tcg_env `addTypecheckedBinds` map snd rec_sel_binds) }   where-    sigs = [ cL loc (IdSig noExt sel_id)   | (sel_id, _) <- sel_bind_prs-                                          , let loc = getSrcSpan sel_id ]+    sigs = [ cL loc (IdSig noExtField sel_id) | (sel_id, _) <- sel_bind_prs+                                              , let loc = getSrcSpan sel_id ]     binds = [(NonRecursive, unitBag bind) | (_, bind) <- sel_bind_prs]  mkRecSelBinds :: [TyCon] -> [(Id, LHsBind GhcRn)]@@ -878,7 +876,7 @@     sel_ty | is_naughty = unitTy  -- See Note [Naughty record selectors]            | otherwise  = mkSpecForAllTys data_tvs          $                           mkPhiTy (conLikeStupidTheta con1) $   -- Urgh!-                          mkFunTy data_ty                   $+                          mkVisFunTy data_ty                $                           mkSpecForAllTys field_tvs         $                           mkPhiTy field_theta               $                           -- req_theta is empty for normal DataCon@@ -895,7 +893,7 @@              | otherwise =  map mk_match cons_w_field ++ deflt     mk_match con = mkSimpleMatch (mkPrefixFunRhs sel_lname)                                  [cL loc (mk_sel_pat con)]-                                 (cL loc (HsVar noExt (cL loc field_var)))+                                 (cL loc (HsVar noExtField (cL loc field_var)))     mk_sel_pat con = ConPatIn (cL loc (getName con)) (RecCon rec_fields)     rec_fields = HsRecFields { rec_flds = [rec_field], rec_dotdot = Nothing }     rec_field  = noLoc (HsRecField@@ -903,7 +901,7 @@                            = cL loc (FieldOcc sel_name                                      (cL loc $ mkVarUnqual lbl))                         , hsRecFieldArg-                           = cL loc (VarPat noExt (cL loc field_var))+                           = cL loc (VarPat noExtField (cL loc field_var))                         , hsRecPun = False })     sel_lname = cL loc sel_name     field_var = mkInternalName (mkBuiltinUnique 1) (getOccName sel_name) loc@@ -913,10 +911,10 @@     -- mentions this particular record selector     deflt | all dealt_with all_cons = []           | otherwise = [mkSimpleMatch CaseAlt-                            [cL loc (WildPat noExt)]-                            (mkHsApp (cL loc (HsVar noExt+                            [cL loc (WildPat noExtField)]+                            (mkHsApp (cL loc (HsVar noExtField                                          (cL loc (getName rEC_SEL_ERROR_ID))))-                                     (cL loc (HsLit noExt msg_lit)))]+                                     (cL loc (HsLit noExtField msg_lit)))]          -- Do not add a default case unless there are unmatched         -- constructors.  We must take account of GADTs, else we@@ -938,7 +936,7 @@     inst_tys = substTyVars eq_subst univ_tvs      unit_rhs = mkLHsTupleExpr []-    msg_lit = HsStringPrim NoSourceText (fastStringToByteString lbl)+    msg_lit = HsStringPrim NoSourceText (bytesFS lbl)  {- Note [Polymorphic selectors]
typecheck/TcType.hs view
@@ -36,7 +36,6 @@   promoteSkolem, promoteSkolemX, promoteSkolemsX,   --------------------------------   -- MetaDetails-  UserTypeCtxt(..), pprUserTypeCtxt, isSigMaybe,   TcTyVarDetails(..), pprTcTyVarDetails, vanillaSkolemTv, superSkolemTv,   MetaDetails(Flexi, Indirect), MetaInfo(..),   isImmutableTyVar, isSkolemTyVar, isMetaTyVar,  isMetaTyVarTy, isTyVarTy,@@ -52,19 +51,19 @@   --------------------------------   -- Builders   mkPhiTy, mkInfSigmaTy, mkSpecSigmaTy, mkSigmaTy,-  mkNakedAppTy, mkNakedAppTys, mkNakedCastTy, nakedSubstTy,+  mkTcAppTy, mkTcAppTys, mkTcCastTy,    --------------------------------   -- Splitters   -- These are important because they do not look through newtypes   getTyVar,   tcSplitForAllTy_maybe,-  tcSplitForAllTys, tcSplitPiTys, tcSplitPiTy_maybe, tcSplitForAllVarBndrs,+  tcSplitForAllTys, tcSplitForAllTysSameVis,+  tcSplitPiTys, tcSplitPiTy_maybe, tcSplitForAllVarBndrs,   tcSplitPhiTy, tcSplitPredFunTy_maybe,   tcSplitFunTy_maybe, tcSplitFunTys, tcFunArgTy, tcFunResultTy, tcFunResultTyN,   tcSplitFunTysN,   tcSplitTyConApp, tcSplitTyConApp_maybe,-  tcRepSplitTyConApp, tcRepSplitTyConApp_maybe, tcRepSplitTyConApp_maybe',   tcTyConAppTyCon, tcTyConAppTyCon_maybe, tcTyConAppArgs,   tcSplitAppTy_maybe, tcSplitAppTy, tcSplitAppTys, tcRepSplitAppTy_maybe,   tcRepGetNumAppTys,@@ -82,7 +81,7 @@   hasIPPred, isTauTy, isTauTyCon, tcIsTyVarTy, tcIsForAllTy,   isPredTy, isTyVarClassPred, isTyVarHead, isInsolubleOccursCheck,   checkValidClsArgs, hasTyVarHead,-  isRigidTy,+  isRigidTy, isAlmostFunctionFree,    ---------------------------------   -- Misc type manipulators@@ -122,25 +121,25 @@    --------------------------------   -- Rexported from Kind-  Kind, typeKind, tcTypeKind,+  Kind, tcTypeKind,   liftedTypeKind,   constraintKind,   isLiftedTypeKind, isUnliftedTypeKind, classifiesTypeWithValues,    --------------------------------   -- Rexported from Type-  Type, PredType, ThetaType, TyCoBinder, ArgFlag(..),+  Type, PredType, ThetaType, TyCoBinder,+  ArgFlag(..), AnonArgFlag(..), ForallVisFlag(..),    mkForAllTy, mkForAllTys, mkTyCoInvForAllTys, mkSpecForAllTys, mkTyCoInvForAllTy,   mkInvForAllTy, mkInvForAllTys,-  mkFunTy, mkFunTys,+  mkVisFunTy, mkVisFunTys, mkInvisFunTy, mkInvisFunTys,   mkTyConApp, mkAppTy, mkAppTys,   mkTyConTy, mkTyVarTy, mkTyVarTys,   mkTyCoVarTy, mkTyCoVarTys, -  isClassPred, isEqPred, isNomEqPred, isIPPred,+  isClassPred, isEqPrimPred, isIPPred, isEqPred, isEqPredClass,   mkClassPred,-  isDictLikeTy,   tcSplitDFunTy, tcSplitDFunHead, tcSplitMethodTy,   isRuntimeRepVar, isKindLevPoly,   isVisibleBinder, isInvisibleBinder,@@ -193,14 +192,17 @@ -- friends: import GhcPrelude -import Kind import TyCoRep+import TyCoSubst ( mkTvSubst, substTyWithCoVars )+import TyCoFVs+import TyCoPpr import Class import Var import ForeignCall import VarSet import Coercion import Type+import Predicate import RepType import TyCon @@ -225,7 +227,7 @@ import qualified GHC.LanguageExtensions as LangExt  import Data.List  ( mapAccumL )-import Data.Functor.Identity( Identity(..) )+-- import Data.Functor.Identity( Identity(..) ) import Data.IORef import Data.List.NonEmpty( NonEmpty(..) ) @@ -324,7 +326,7 @@ where we must take care to check that a variable is a _type_ variable (using isTyVar) before calling tcTyVarDetails--a partial function that is not defined for coercion variables--on the variable. Failing to do so led to-GHC Trac #12785.+GHC #12785. -}  -- See Note [TcTyVars and TyVars in the typechecker]@@ -364,11 +366,16 @@  data InferResult   = IR { ir_uniq :: Unique  -- For debugging only+        , ir_lvl  :: TcLevel -- See Note [TcLevel of ExpType] in TcMType-       , ir_inst :: Bool    -- True <=> deeply instantiate before returning-                            --           i.e. return a RhoType-                            -- False <=> do not instantiate before returning-                            --           i.e. return a SigmaType++       , ir_inst :: Bool+         -- True <=> deeply instantiate before returning+         --           i.e. return a RhoType+         -- False <=> do not instantiate before returning+         --           i.e. return a SigmaType+         -- See Note [Deep instantiation of InferResult] in TcUnify+        , ir_ref  :: IORef (Maybe TcType) }          -- The type that fills in this hole should be a Type,          -- that is, its kind should be (TYPE rr) for some rr@@ -563,121 +570,7 @@  {- ********************************************************************* *                                                                      *-          UserTypeCtxt-*                                                                      *-********************************************************************* -}------------------------------------------ UserTypeCtxt describes the origin of the polymorphic type--- in the places where we need an expression to have that type--data UserTypeCtxt-  = FunSigCtxt      -- Function type signature, when checking the type-                    -- Also used for types in SPECIALISE pragmas-       Name              -- Name of the function-       Bool              -- True <=> report redundant constraints-                            -- This is usually True, but False for-                            --   * Record selectors (not important here)-                            --   * Class and instance methods.  Here-                            --     the code may legitimately be more-                            --     polymorphic than the signature-                            --     generated from the class-                            --     declaration--  | InfSigCtxt Name     -- Inferred type for function-  | ExprSigCtxt         -- Expression type signature-  | KindSigCtxt         -- Kind signature-  | TypeAppCtxt         -- Visible type application-  | ConArgCtxt Name     -- Data constructor argument-  | TySynCtxt Name      -- RHS of a type synonym decl-  | PatSynCtxt Name     -- Type sig for a pattern synonym-  | PatSigCtxt          -- Type sig in pattern-                        --   eg  f (x::t) = ...-                        --   or  (x::t, y) = e-  | RuleSigCtxt Name    -- LHS of a RULE forall-                        --    RULE "foo" forall (x :: a -> a). f (Just x) = ...-  | ResSigCtxt          -- Result type sig-                        --      f x :: t = ....-  | ForSigCtxt Name     -- Foreign import or export signature-  | DefaultDeclCtxt     -- Types in a default declaration-  | InstDeclCtxt Bool   -- An instance declaration-                        --    True:  stand-alone deriving-                        --    False: vanilla instance declaration-  | SpecInstCtxt        -- SPECIALISE instance pragma-  | ThBrackCtxt         -- Template Haskell type brackets [t| ... |]-  | GenSigCtxt          -- Higher-rank or impredicative situations-                        -- e.g. (f e) where f has a higher-rank type-                        -- We might want to elaborate this-  | GhciCtxt Bool       -- GHCi command :kind <type>-                        -- The Bool indicates if we are checking the outermost-                        -- type application.-                        -- See Note [Unsaturated type synonyms in GHCi] in-                        -- TcValidity.--  | ClassSCCtxt Name    -- Superclasses of a class-  | SigmaCtxt           -- Theta part of a normal for-all type-                        --      f :: <S> => a -> a-  | DataTyCtxt Name     -- The "stupid theta" part of a data decl-                        --      data <S> => T a = MkT a-  | DerivClauseCtxt     -- A 'deriving' clause-  | TyVarBndrKindCtxt Name  -- The kind of a type variable being bound-  | DataKindCtxt Name   -- The kind of a data/newtype (instance)-  | TySynKindCtxt Name  -- The kind of the RHS of a type synonym-  | TyFamResKindCtxt Name   -- The result kind of a type family--{---- Notes re TySynCtxt--- We allow type synonyms that aren't types; e.g.  type List = []------ If the RHS mentions tyvars that aren't in scope, we'll--- quantify over them:---      e.g.    type T = a->a--- will become  type T = forall a. a->a------ With gla-exts that's right, but for H98 we should complain.--}---pprUserTypeCtxt :: UserTypeCtxt -> SDoc-pprUserTypeCtxt (FunSigCtxt n _)  = text "the type signature for" <+> quotes (ppr n)-pprUserTypeCtxt (InfSigCtxt n)    = text "the inferred type for" <+> quotes (ppr n)-pprUserTypeCtxt (RuleSigCtxt n)   = text "a RULE for" <+> quotes (ppr n)-pprUserTypeCtxt ExprSigCtxt       = text "an expression type signature"-pprUserTypeCtxt KindSigCtxt       = text "a kind signature"-pprUserTypeCtxt TypeAppCtxt       = text "a type argument"-pprUserTypeCtxt (ConArgCtxt c)    = text "the type of the constructor" <+> quotes (ppr c)-pprUserTypeCtxt (TySynCtxt c)     = text "the RHS of the type synonym" <+> quotes (ppr c)-pprUserTypeCtxt ThBrackCtxt       = text "a Template Haskell quotation [t|...|]"-pprUserTypeCtxt PatSigCtxt        = text "a pattern type signature"-pprUserTypeCtxt ResSigCtxt        = text "a result type signature"-pprUserTypeCtxt (ForSigCtxt n)    = text "the foreign declaration for" <+> quotes (ppr n)-pprUserTypeCtxt DefaultDeclCtxt   = text "a type in a `default' declaration"-pprUserTypeCtxt (InstDeclCtxt False) = text "an instance declaration"-pprUserTypeCtxt (InstDeclCtxt True)  = text "a stand-alone deriving instance declaration"-pprUserTypeCtxt SpecInstCtxt      = text "a SPECIALISE instance pragma"-pprUserTypeCtxt GenSigCtxt        = text "a type expected by the context"-pprUserTypeCtxt (GhciCtxt {})     = text "a type in a GHCi command"-pprUserTypeCtxt (ClassSCCtxt c)   = text "the super-classes of class" <+> quotes (ppr c)-pprUserTypeCtxt SigmaCtxt         = text "the context of a polymorphic type"-pprUserTypeCtxt (DataTyCtxt tc)   = text "the context of the data type declaration for" <+> quotes (ppr tc)-pprUserTypeCtxt (PatSynCtxt n)    = text "the signature for pattern synonym" <+> quotes (ppr n)-pprUserTypeCtxt (DerivClauseCtxt) = text "a `deriving' clause"-pprUserTypeCtxt (TyVarBndrKindCtxt n) = text "the kind annotation on the type variable" <+> quotes (ppr n)-pprUserTypeCtxt (DataKindCtxt n)  = text "the kind annotation on the declaration for" <+> quotes (ppr n)-pprUserTypeCtxt (TySynKindCtxt n) = text "the kind annotation on the declaration for" <+> quotes (ppr n)-pprUserTypeCtxt (TyFamResKindCtxt n) = text "the result kind for" <+> quotes (ppr n)--isSigMaybe :: UserTypeCtxt -> Maybe Name-isSigMaybe (FunSigCtxt n _) = Just n-isSigMaybe (ConArgCtxt n)   = Just n-isSigMaybe (ForSigCtxt n)   = Just n-isSigMaybe (PatSynCtxt n)   = Just n-isSigMaybe _                = Nothing---{- *********************************************************************-*                                                                      *-                Untoucable type variables+                Untouchable type variables *                                                                      * ********************************************************************* -} @@ -859,7 +752,7 @@ --     (F, [Int]), not (F, [Int,Bool]) -- -- This is important for its use in deciding termination of type--- instances (see Trac #11581).  E.g.+-- instances (see #11581).  E.g. --    type instance G [Int] = ...(F Int <big type>)... -- we don't need to take <big type> into account when asking if -- the calls on the RHS are smaller than the LHS@@ -913,7 +806,7 @@     go _            (LitTy {})         = []     go is_invis_arg (ForAllTy bndr ty) = go is_invis_arg (binderType bndr)                                          ++ go is_invis_arg ty-    go is_invis_arg (FunTy ty1 ty2)    = go is_invis_arg ty1+    go is_invis_arg (FunTy _ ty1 ty2)  = go is_invis_arg ty1                                          ++ go is_invis_arg ty2     go is_invis_arg ty@(AppTy _ _)     =       let (ty_head, ty_args) = splitAppTys ty@@ -948,78 +841,6 @@ -- ^ Check that a type does not contain any type family applications. isTyFamFree = null . tcTyFamInsts -{--************************************************************************-*                                                                      *-          The "exact" free variables of a type-*                                                                      *-************************************************************************--Note [Silly type synonym]-~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-  type T a = Int-What are the free tyvars of (T x)?  Empty, of course!--exactTyCoVarsOfType is used by the type checker to figure out exactly-which type variables are mentioned in a type.  It only matters-occasionally -- see the calls to exactTyCoVarsOfType.--Historical note: years and years ago this function was used during-generalisation -- see Trac #1813.  But that code has long since died.--}--exactTyCoVarsOfType :: Type -> TyCoVarSet--- Find the free type variables (of any kind)--- but *expand* type synonyms.  See Note [Silly type synonym] above.-exactTyCoVarsOfType ty-  = go ty-  where-    go ty | Just ty' <- tcView ty = go ty'  -- This is the key line-    go (TyVarTy tv)         = goVar tv-    go (TyConApp _ tys)     = exactTyCoVarsOfTypes tys-    go (LitTy {})           = emptyVarSet-    go (AppTy fun arg)      = go fun `unionVarSet` go arg-    go (FunTy arg res)      = go arg `unionVarSet` go res-    go (ForAllTy bndr ty)   = delBinderVar (go ty) bndr `unionVarSet` go (binderType bndr)-    go (CastTy ty co)       = go ty `unionVarSet` goCo co-    go (CoercionTy co)      = goCo co--    goMCo MRefl    = emptyVarSet-    goMCo (MCo co) = goCo co--    goCo (Refl ty)            = go ty-    goCo (GRefl _ ty mco)     = go ty `unionVarSet` goMCo mco-    goCo (TyConAppCo _ _ args)= goCos args-    goCo (AppCo co arg)     = goCo co `unionVarSet` goCo arg-    goCo (ForAllCo tv k_co co)-      = goCo co `delVarSet` tv `unionVarSet` goCo k_co-    goCo (FunCo _ co1 co2)   = goCo co1 `unionVarSet` goCo co2-    goCo (CoVarCo v)         = goVar v-    goCo (HoleCo h)          = goVar (coHoleCoVar h)-    goCo (AxiomInstCo _ _ args) = goCos args-    goCo (UnivCo p _ t1 t2)  = goProv p `unionVarSet` go t1 `unionVarSet` go t2-    goCo (SymCo co)          = goCo co-    goCo (TransCo co1 co2)   = goCo co1 `unionVarSet` goCo co2-    goCo (NthCo _ _ co)      = goCo co-    goCo (LRCo _ co)         = goCo co-    goCo (InstCo co arg)     = goCo co `unionVarSet` goCo arg-    goCo (KindCo co)         = goCo co-    goCo (SubCo co)          = goCo co-    goCo (AxiomRuleCo _ c)   = goCos c--    goCos cos = foldr (unionVarSet . goCo) emptyVarSet cos--    goProv UnsafeCoerceProv     = emptyVarSet-    goProv (PhantomProv kco)    = goCo kco-    goProv (ProofIrrelProv kco) = goCo kco-    goProv (PluginProv _)       = emptyVarSet--    goVar v = unitVarSet v `unionVarSet` go (varType v)--exactTyCoVarsOfTypes :: [Type] -> TyVarSet-exactTyCoVarsOfTypes tys = mapUnionVarSet exactTyCoVarsOfType tys- anyRewritableTyVar :: Bool    -- Ignore casts and coercions                    -> EqRel   -- Ambient role                    -> (EqRel -> TcTyVar -> Bool)@@ -1034,14 +855,14 @@     go_tv rl bvs tv | tv `elemVarSet` bvs = False                     | otherwise           = pred rl tv -    go rl bvs (TyVarTy tv)      = go_tv rl bvs tv-    go _ _     (LitTy {})       = False-    go rl bvs (TyConApp tc tys) = go_tc rl bvs tc tys-    go rl bvs (AppTy fun arg)   = go rl bvs fun || go NomEq bvs arg-    go rl bvs (FunTy arg res)   = go rl bvs arg || go rl bvs res-    go rl bvs (ForAllTy tv ty)  = go rl (bvs `extendVarSet` binderVar tv) ty-    go rl bvs (CastTy ty co)    = go rl bvs ty || go_co rl bvs co-    go rl bvs (CoercionTy co)   = go_co rl bvs co  -- ToDo: check+    go rl bvs (TyVarTy tv)       = go_tv rl bvs tv+    go _ _     (LitTy {})        = False+    go rl bvs (TyConApp tc tys)  = go_tc rl bvs tc tys+    go rl bvs (AppTy fun arg)    = go rl bvs fun || go NomEq bvs arg+    go rl bvs (FunTy _ arg res)  = go rl bvs arg || go rl bvs res+    go rl bvs (ForAllTy tv ty)   = go rl (bvs `extendVarSet` binderVar tv) ty+    go rl bvs (CastTy ty co)     = go rl bvs ty || go_co rl bvs co+    go rl bvs (CoercionTy co)    = go_co rl bvs co  -- ToDo: check      go_tc NomEq  bvs _  tys = any (go NomEq bvs) tys     go_tc ReprEq bvs tc tys = any (go_arg bvs)@@ -1073,7 +894,7 @@ this case) is nominal, the work item can't actually rewrite the inert item. Moreover, if we were to kick out the inert item the exact same situation would re-occur and we end up with an infinite loop in which each kicks-out the other (Trac #14363).+out the other (#14363). -}  {-@@ -1271,7 +1092,7 @@ mkSpecSigmaTy tyvars preds ty = mkSigmaTy (mkTyCoVarBinders Specified tyvars) preds ty  mkPhiTy :: [PredType] -> Type -> Type-mkPhiTy = mkFunTys+mkPhiTy = mkInvisFunTys  --------------- getDFunTyKey :: Type -> OccName -- Get some string from a type, to be used to@@ -1281,7 +1102,7 @@ getDFunTyKey (TyConApp tc _)         = getOccName tc getDFunTyKey (LitTy x)               = getDFunTyLitKey x getDFunTyKey (AppTy fun _)           = getDFunTyKey fun-getDFunTyKey (FunTy _ _)             = getOccName funTyCon+getDFunTyKey (FunTy {})              = getOccName funTyCon getDFunTyKey (ForAllTy _ t)          = getDFunTyKey t getDFunTyKey (CastTy ty _)           = getDFunTyKey ty getDFunTyKey t@(CoercionTy _)        = pprPanic "getDFunTyKey" (ppr t)@@ -1292,103 +1113,23 @@  {- ********************************************************************* *                                                                      *-           Maintaining the well-kinded type invariant+           Building types *                                                                      * ********************************************************************* -} -{- Note [The well-kinded type invariant]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See also Note [The tcType invariant] in TcHsType.--During type inference, we maintain this invariant--   (INV-TK): it is legal to call 'tcTypeKind' on any Type ty,-             /without/ zonking ty--For example, suppose-    kappa is a unification variable-    We have already unified kappa := Type-      yielding    co :: Refl (Type -> Type)-    a :: kappa-then consider the type-    (a Int)-If we call tcTypeKind on that, we'll crash, because the (un-zonked)-kind of 'a' is just kappa, not an arrow kind.  If we zonk first-we'd be fine, but that is too tiresome, so instead we maintain-(INV-TK).  So we do not form (a Int); instead we form-    (a |> co) Int-and tcTypeKind has no problem with that.--Bottom line: we want to keep that 'co' /even though it is Refl/.--Immediate consequence: during type inference we cannot use the "smart-contructors" for types, particularly-   mkAppTy, mkCastTy-because they all eliminate Refl casts.  Solution: during type-inference use the mkNakedX type formers, which do no Refl-elimination.-E.g. mkNakedCastTy uses an actual CastTy, without optimising for-Refl.  (NB: mkNakedCastTy is only called in two places: in tcInferApps-and in checkExpectedResultKind.)--Where does this show up in practice: apparently mainly in-TcHsType.tcInferApps.  Suppose we are kind-checking the type (a Int),-where (a :: kappa).  Then in tcInferApps we'll run out of binders on-a's kind, so we'll call matchExpectedFunKind, and unify-   kappa := kappa1 -> kappa2,  with evidence co :: kappa ~ (kappa1 ~ kappa2)-That evidence is actually Refl, but we must not discard the cast to-form the result type-   ((a::kappa) (Int::*))-because that does not satisfy the invariant, and crashes TypeKind.  This-caused Trac #14174 and #14520.--Notes:--* The Refls will be removed later, when we zonk the type.--* This /also/ applies to substitution.  We must use nakedSubstTy,-  not substTy, because the latter uses smart constructors that do-  Refl-elimination.---}------------------mkNakedAppTys :: Type -> [Type] -> Type--- See Note [The well-kinded type invariant]-mkNakedAppTys ty1                []   = ty1-mkNakedAppTys (TyConApp tc tys1) tys2 = mkTyConApp tc (tys1 ++ tys2)-mkNakedAppTys ty1                tys2 = foldl' AppTy ty1 tys2--mkNakedAppTy :: Type -> Type -> Type--- See Note [The well-kinded type invariant]-mkNakedAppTy ty1 ty2 = mkNakedAppTys ty1 [ty2]+-- ToDo: I think we need Tc versions of these+-- Reason: mkCastTy checks isReflexiveCastTy, which checks+--         for equality; and that has a different answer+--         depending on whether or not Type = Constraint -mkNakedCastTy :: Type -> Coercion -> Type--- Do /not/ attempt to get rid of the cast altogether,--- even if it is Refl: see Note [The well-kinded type invariant]--- Even doing (t |> co1) |> co2  --->  t |> (co1;co2)--- does not seem worth the bother------ NB: zonking will get rid of these casts, because it uses mkCastTy------ In fact the calls to mkNakedCastTy ar pretty few and far between.-mkNakedCastTy ty co = CastTy ty co+mkTcAppTys :: Type -> [Type] -> Type+mkTcAppTys = mkAppTys -nakedSubstTy :: HasCallStack => TCvSubst -> TcType  -> TcType-nakedSubstTy subst ty-  | isEmptyTCvSubst subst = ty-  | otherwise             = runIdentity                   $-                            checkValidSubst subst [ty] [] $-                            mapType nakedSubstMapper subst ty-  -- Interesting idea: use StrictIdentity to avoid space leaks+mkTcAppTy :: Type -> Type -> Type+mkTcAppTy = mkAppTy -nakedSubstMapper :: TyCoMapper TCvSubst Identity-nakedSubstMapper-  = TyCoMapper { tcm_smart      = False-               , tcm_tyvar      = \subst tv -> return (substTyVar subst tv)-               , tcm_covar      = \subst cv -> return (substCoVar subst cv)-               , tcm_hole       = \_ hole   -> return (HoleCo hole)-               , tcm_tycobinder = \subst tv _ -> return (substVarBndr subst tv)-               , tcm_tycon    = return }+mkTcCastTy :: Type -> Coercion -> Type+mkTcCastTy = mkCastTy   -- Do we need a tc version of mkCastTy?  {- ************************************************************************@@ -1407,27 +1148,39 @@ -- | Splits a forall type into a list of 'TyBinder's and the inner type. -- Always succeeds, even if it returns an empty list. tcSplitPiTys :: Type -> ([TyBinder], Type)-tcSplitPiTys ty = ASSERT( all isTyBinder (fst sty) ) sty+tcSplitPiTys ty+  = ASSERT( all isTyBinder (fst sty) ) sty   where sty = splitPiTys ty  -- | Splits a type into a TyBinder and a body, if possible. Panics otherwise tcSplitPiTy_maybe :: Type -> Maybe (TyBinder, Type)-tcSplitPiTy_maybe ty = ASSERT( isMaybeTyBinder sty ) sty-  where sty = splitPiTy_maybe ty-        isMaybeTyBinder (Just (t,_)) = isTyBinder t-        isMaybeTyBinder _ = True+tcSplitPiTy_maybe ty+  = ASSERT( isMaybeTyBinder sty ) sty+  where+    sty = splitPiTy_maybe ty+    isMaybeTyBinder (Just (t,_)) = isTyBinder t+    isMaybeTyBinder _            = True  tcSplitForAllTy_maybe :: Type -> Maybe (TyVarBinder, Type) tcSplitForAllTy_maybe ty | Just ty' <- tcView ty = tcSplitForAllTy_maybe ty' tcSplitForAllTy_maybe (ForAllTy tv ty) = ASSERT( isTyVarBinder tv ) Just (tv, ty) tcSplitForAllTy_maybe _                = Nothing --- | Like 'tcSplitPiTys', but splits off only named binders, returning--- just the tycovars.+-- | Like 'tcSplitPiTys', but splits off only named binders,+-- returning just the tycovars. tcSplitForAllTys :: Type -> ([TyVar], Type)-tcSplitForAllTys ty = ASSERT( all isTyVar (fst sty) ) sty+tcSplitForAllTys ty+  = ASSERT( all isTyVar (fst sty) ) sty   where sty = splitForAllTys ty +-- | Like 'tcSplitForAllTys', but only splits a 'ForAllTy' if+-- @'sameVis' argf supplied_argf@ is 'True', where @argf@ is the visibility+-- of the @ForAllTy@'s binder and @supplied_argf@ is the visibility provided+-- as an argument to this function.+tcSplitForAllTysSameVis :: ArgFlag -> Type -> ([TyVar], Type)+tcSplitForAllTysSameVis supplied_argf ty = ASSERT( all isTyVar (fst sty) ) sty+  where sty = splitForAllTysSameVis supplied_argf ty+ -- | Like 'tcSplitForAllTys', but splits off only named binders. tcSplitForAllVarBndrs :: Type -> ([TyVarBinder], Type) tcSplitForAllVarBndrs ty = ASSERT( all isTyVarBinder (fst sty)) sty@@ -1443,8 +1196,9 @@ -- Split off the first predicate argument from a type tcSplitPredFunTy_maybe ty   | Just ty' <- tcView ty = tcSplitPredFunTy_maybe ty'-tcSplitPredFunTy_maybe (FunTy arg res)-  | isPredTy arg = Just (arg, res)+tcSplitPredFunTy_maybe (FunTy { ft_af = InvisArg+                              , ft_arg = arg, ft_res = res })+  = Just (arg, res) tcSplitPredFunTy_maybe _   = Nothing @@ -1487,7 +1241,7 @@     -- underneath it.   | Just (arg_tys, tvs1, theta1, rho1) <- tcDeepSplitSigmaTy_maybe ty   = let (tvs2, theta2, rho2) = tcSplitNestedSigmaTys rho1-    in (tvs1 ++ tvs2, theta1 ++ theta2, mkFunTys arg_tys rho2)+    in (tvs1 ++ tvs2, theta1 ++ theta2, mkVisFunTys arg_tys rho2)     -- If there's no forall, we're done.   | otherwise = ([], [], ty) @@ -1521,8 +1275,9 @@   | Just ty' <- tcView ty = tcTyConAppTyCon_maybe ty' tcTyConAppTyCon_maybe (TyConApp tc _)   = Just tc-tcTyConAppTyCon_maybe (FunTy _ _)-  = Just funTyCon+tcTyConAppTyCon_maybe (FunTy { ft_af = VisArg })+  = Just funTyCon  -- (=>) is /not/ a TyCon in its own right+                   -- C.f. tcRepSplitAppTy_maybe tcTyConAppTyCon_maybe _   = Nothing @@ -1536,27 +1291,6 @@                         Just stuff -> stuff                         Nothing    -> pprPanic "tcSplitTyConApp" (pprType ty) --- | Like 'tcRepSplitTyConApp_maybe', but returns 'Nothing' if,------ 1. the type is structurally not a type constructor application, or------ 2. the type is a function type (e.g. application of 'funTyCon'), but we---    currently don't even enough information to fully determine its RuntimeRep---    variables. For instance, @FunTy (a :: k) Int@.------ By contrast 'tcRepSplitTyConApp_maybe' panics in the second case.------ The behavior here is needed during canonicalization; see Note [FunTy and--- decomposing tycon applications] in TcCanonical for details.-tcRepSplitTyConApp_maybe' :: HasCallStack => Type -> Maybe (TyCon, [Type])-tcRepSplitTyConApp_maybe' (TyConApp tc tys)          = Just (tc, tys)-tcRepSplitTyConApp_maybe' (FunTy arg res)-  | Just arg_rep <- getRuntimeRep_maybe arg-  , Just res_rep <- getRuntimeRep_maybe res-  = Just (funTyCon, [arg_rep, res_rep, arg, res])-tcRepSplitTyConApp_maybe' _                          = Nothing-- ----------------------- tcSplitFunTys :: Type -> ([Type], Type) tcSplitFunTys ty = case tcSplitFunTy_maybe ty of@@ -1566,10 +1300,12 @@                                           (args,res') = tcSplitFunTys res  tcSplitFunTy_maybe :: Type -> Maybe (Type, Type)-tcSplitFunTy_maybe ty | Just ty' <- tcView ty         = tcSplitFunTy_maybe ty'-tcSplitFunTy_maybe (FunTy arg res) | not (isPredTy arg) = Just (arg, res)-tcSplitFunTy_maybe _                                    = Nothing-        -- Note the tcTypeKind guard+tcSplitFunTy_maybe ty+  | Just ty' <- tcView ty = tcSplitFunTy_maybe ty'+tcSplitFunTy_maybe (FunTy { ft_af = af, ft_arg = arg, ft_res = res })+  | VisArg <- af = Just (arg, res)+tcSplitFunTy_maybe _ = Nothing+        -- Note the VisArg guard         -- Consider     (?x::Int) => Bool         -- We don't want to treat this as a function type!         -- A concrete example is test tc230:@@ -1717,8 +1453,8 @@ -- equality] (in TyCoRep) as `eqType`, but Type.eqType believes (* == -- Constraint), and that is NOT what we want in the type checker! tcEqType ty1 ty2-  = isNothing (tc_eq_type tcView ki1 ki2) &&-    isNothing (tc_eq_type tcView ty1 ty2)+  =  tc_eq_type False False ki1 ki2+  && tc_eq_type False False ty1 ty2   where     ki1 = tcTypeKind ty1     ki2 = tcTypeKind ty2@@ -1727,93 +1463,85 @@ -- as long as their non-coercion structure is identical. tcEqTypeNoKindCheck :: TcType -> TcType -> Bool tcEqTypeNoKindCheck ty1 ty2-  = isNothing $ tc_eq_type tcView ty1 ty2+  = tc_eq_type False False ty1 ty2 --- | Like 'tcEqType', but returns information about whether the difference--- is visible in the case of a mismatch.--- @Nothing@    : the types are equal--- @Just True@  : the types differ, and the point of difference is visible--- @Just False@ : the types differ, and the point of difference is invisible-tcEqTypeVis :: TcType -> TcType -> Maybe Bool-tcEqTypeVis ty1 ty2-  = tc_eq_type tcView ty1 ty2 <!> invis (tc_eq_type tcView ki1 ki2)-  where-    ki1 = tcTypeKind ty1-    ki2 = tcTypeKind ty2+-- | Like 'tcEqType', but returns True if the /visible/ part of the types+-- are equal, even if they are really unequal (in the invisible bits)+tcEqTypeVis :: TcType -> TcType -> Bool+tcEqTypeVis ty1 ty2 = tc_eq_type False True ty1 ty2 -      -- convert Just True to Just False-    invis :: Maybe Bool -> Maybe Bool-    invis = fmap (const False)+-- | Like 'pickyEqTypeVis', but returns a Bool for convenience+pickyEqType :: TcType -> TcType -> Bool+-- Check when two types _look_ the same, _including_ synonyms.+-- So (pickyEqType String [Char]) returns False+-- This ignores kinds and coercions, because this is used only for printing.+pickyEqType ty1 ty2 = tc_eq_type True False ty1 ty2 -(<!>) :: Maybe Bool -> Maybe Bool -> Maybe Bool-Nothing        <!> x         = x-Just True      <!> _         = Just True-Just _vis      <!> Just True = Just True-Just vis       <!> _         = Just vis-infixr 3 <!> + -- | Real worker for 'tcEqType'. No kind check!-tc_eq_type :: (TcType -> Maybe TcType)  -- ^ @tcView@, if you want unwrapping-           -> Type -> Type -> Maybe Bool-tc_eq_type view_fun orig_ty1 orig_ty2 = go True orig_env orig_ty1 orig_ty2+tc_eq_type :: Bool          -- ^ True <=> do not expand type synonyms+           -> Bool          -- ^ True <=> compare visible args only+           -> Type -> Type+           -> Bool+-- Flags False, False is the usual setting for tc_eq_type+tc_eq_type keep_syns vis_only orig_ty1 orig_ty2+  = go orig_env orig_ty1 orig_ty2   where-    go :: Bool -> RnEnv2 -> Type -> Type -> Maybe Bool-    go vis env t1 t2 | Just t1' <- view_fun t1 = go vis env t1' t2-    go vis env t1 t2 | Just t2' <- view_fun t2 = go vis env t1 t2'+    go :: RnEnv2 -> Type -> Type -> Bool+    go env t1 t2 | not keep_syns, Just t1' <- tcView t1 = go env t1' t2+    go env t1 t2 | not keep_syns, Just t2' <- tcView t2 = go env t1 t2' -    go vis env (TyVarTy tv1)       (TyVarTy tv2)-      = check vis $ rnOccL env tv1 == rnOccR env tv2+    go env (TyVarTy tv1) (TyVarTy tv2)+      = rnOccL env tv1 == rnOccR env tv2 -    go vis _   (LitTy lit1)        (LitTy lit2)-      = check vis $ lit1 == lit2+    go _   (LitTy lit1) (LitTy lit2)+      = lit1 == lit2 -    go vis env (ForAllTy (Bndr tv1 vis1) ty1)-               (ForAllTy (Bndr tv2 vis2) ty2)-      = go (isVisibleArgFlag vis1) env (varType tv1) (varType tv2)-          <!> go vis (rnBndr2 env tv1 tv2) ty1 ty2-          <!> check vis (vis1 == vis2)+    go env (ForAllTy (Bndr tv1 vis1) ty1)+           (ForAllTy (Bndr tv2 vis2) ty2)+      =  vis1 == vis2+      && (vis_only || go env (varType tv1) (varType tv2))+      && go (rnBndr2 env tv1 tv2) ty1 ty2+     -- Make sure we handle all FunTy cases since falling through to the     -- AppTy case means that tcRepSplitAppTy_maybe may see an unzonked     -- kind variable, which causes things to blow up.-    go vis env (FunTy arg1 res1) (FunTy arg2 res2)-      = go vis env arg1 arg2 <!> go vis env res1 res2-    go vis env ty (FunTy arg res)-      = eqFunTy vis env arg res ty-    go vis env (FunTy arg res) ty-      = eqFunTy vis env arg res ty+    go env (FunTy _ arg1 res1) (FunTy _ arg2 res2)+      = go env arg1 arg2 && go env res1 res2+    go env ty (FunTy _ arg res) = eqFunTy env arg res ty+    go env (FunTy _ arg res) ty = eqFunTy env arg res ty        -- See Note [Equality on AppTys] in Type-    go vis env (AppTy s1 t1)        ty2+    go env (AppTy s1 t1)        ty2       | Just (s2, t2) <- tcRepSplitAppTy_maybe ty2-      = go vis env s1 s2 <!> go vis env t1 t2-    go vis env ty1                  (AppTy s2 t2)+      = go env s1 s2 && go env t1 t2+    go env ty1                  (AppTy s2 t2)       | Just (s1, t1) <- tcRepSplitAppTy_maybe ty1-      = go vis env s1 s2 <!> go vis env t1 t2-    go vis env (TyConApp tc1 ts1)   (TyConApp tc2 ts2)-      = check vis (tc1 == tc2) <!> gos (tc_vis vis tc1) env ts1 ts2-    go vis env (CastTy t1 _)        t2              = go vis env t1 t2-    go vis env t1                   (CastTy t2 _)   = go vis env t1 t2-    go _   _   (CoercionTy {})      (CoercionTy {}) = Nothing-    go vis _   _                    _               = Just vis+      = go env s1 s2 && go env t1 t2 -    gos _      _   []       []       = Nothing-    gos (v:vs) env (t1:ts1) (t2:ts2) = go v env t1 t2 <!> gos vs env ts1 ts2-    gos (v:_)  _   _        _        = Just v-    gos _      _   _        _        = panic "tc_eq_type"+    go env (TyConApp tc1 ts1)   (TyConApp tc2 ts2)+      = tc1 == tc2 && gos env (tc_vis tc1) ts1 ts2 -    tc_vis :: Bool -> TyCon -> [Bool]-    tc_vis True tc = viss ++ repeat True-       -- the repeat True is necessary because tycons can legitimately-       -- be oversaturated+    go env (CastTy t1 _)   t2              = go env t1 t2+    go env t1              (CastTy t2 _)   = go env t1 t2+    go _   (CoercionTy {}) (CoercionTy {}) = True++    go _ _ _ = False++    gos _   _         []       []      = True+    gos env (ig:igs) (t1:ts1) (t2:ts2) = (ig || go env t1 t2)+                                      && gos env igs ts1 ts2+    gos _ _ _ _ = False++    tc_vis :: TyCon -> [Bool]  -- True for the fields we should ignore+    tc_vis tc | vis_only  = inviss ++ repeat False    -- Ignore invisibles+              | otherwise = repeat False              -- Ignore nothing+       -- The repeat False is necessary because tycons+       -- can legitimately be oversaturated       where         bndrs = tyConBinders tc-        viss  = map isVisibleTyConBinder bndrs-    tc_vis False _ = repeat False  -- if we're not in a visible context, our args-                                   -- aren't either--    check :: Bool -> Bool -> Maybe Bool-    check _   True  = Nothing-    check vis False = Just vis+        inviss  = map isInvisibleTyConBinder bndrs      orig_env = mkRnEnv2 $ mkInScopeSet $ tyCoVarsOfTypes [orig_ty1, orig_ty2] @@ -1823,30 +1551,19 @@     -- always extract a RuntimeRep (see Note [xyz]) if the kind of the arg or     -- res is unzonked/unflattened. Thus this function, which handles this     -- corner case.-    eqFunTy :: Bool -> RnEnv2 -> Type -> Type -> Type -> Maybe Bool-    eqFunTy vis env arg res (FunTy arg' res')-      = go vis env arg arg' <!> go vis env res res'-    eqFunTy vis env arg res ty@(AppTy{})-      | Just (tc, [_, _, arg', res']) <- get_args ty []-      , tc == funTyCon-      = go vis env arg arg' <!> go vis env res res'+    eqFunTy :: RnEnv2 -> Type -> Type -> Type -> Bool+               -- Last arg is /not/ FunTy+    eqFunTy env arg res ty@(AppTy{}) = get_args ty []       where-        get_args :: Type -> [Type] -> Maybe (TyCon, [Type])+        get_args :: Type -> [Type] -> Bool         get_args (AppTy f x)       args = get_args f (x:args)         get_args (CastTy t _)      args = get_args t args-        get_args (TyConApp tc tys) args = Just (tc, tys ++ args)-        get_args _                 _    = Nothing-    eqFunTy vis _ _ _ _-      = Just vis---- | Like 'pickyEqTypeVis', but returns a Bool for convenience-pickyEqType :: TcType -> TcType -> Bool--- Check when two types _look_ the same, _including_ synonyms.--- So (pickyEqType String [Char]) returns False--- This ignores kinds and coercions, because this is used only for printing.-pickyEqType ty1 ty2-  = isNothing $-    tc_eq_type (const Nothing) ty1 ty2+        get_args (TyConApp tc tys) args+          | tc == funTyCon+          , [_, _, arg', res'] <- tys ++ args+          = go env arg arg' && go env res res'+        get_args _ _    = False+    eqFunTy _ _ _ _     = False  {- ********************************************************************* *                                                                      *@@ -1893,11 +1610,14 @@        Nothing      -> False  evVarPred :: EvVar -> PredType-evVarPred var-  = ASSERT2( isEvVarType var_ty, ppr var <+> dcolon <+> ppr var_ty )-    var_ty- where-    var_ty = varType var+evVarPred var = varType var+  -- Historical note: I used to have an ASSERT here,+  -- checking (isEvVarType (varType var)).  But with something like+  --   f :: c => _ -> _+  -- we end up with (c :: kappa), and (kappa ~ Constraint).  Until+  -- we solve and zonk (which there is no particular reason to do for+  -- partial signatures, (isEvVarType kappa) will return False. But+  -- nothing is wrong.  So I just removed the ASSERT.  ------------------ -- | When inferring types, should we quantify over a given predicate?@@ -1913,7 +1633,7 @@ -- quantified over, given the type variables that are being quantified pickQuantifiablePreds qtvs theta   = let flex_ctxt = True in  -- Quantify over non-tyvar constraints, even without-                             -- -XFlexibleContexts: see Trac #10608, #10351+                             -- -XFlexibleContexts: see #10608, #10351          -- flex_ctxt <- xoptM Opt_FlexibleContexts     mapMaybe (pick_me flex_ctxt) theta   where@@ -1952,7 +1672,7 @@       = tyCoVarsOfTypes tys `intersectsVarSet` qtvs         && (checkValidClsArgs flex_ctxt cls tys)            -- Only quantify over predicates that checkValidType-           -- will pass!  See Trac #10351.+           -- will pass!  See #10351.      -- See Note [Quantifying over equality constraints]     quantify_equality NomEq  ty1 ty2 = quant_fun ty1 || quant_fun ty2@@ -2093,7 +1813,7 @@     go (AppTy t1 t2) = case eq_rel of  -- See Note [AppTy and ReprEq]                          NomEq  -> go t1 || go t2                          ReprEq -> go t1-    go (FunTy t1 t2) = go t1 || go t2+    go (FunTy _ t1 t2) = go t1 || go t2     go (ForAllTy (Bndr tv' _) inner_ty)       | tv' == tv = False       | otherwise = go (varType tv') || go inner_ty@@ -2111,8 +1831,25 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When we expand superclasses, we use the following algorithm: -expand( so_far, pred ) returns the transitive superclasses of pred,-                               not including pred itself+transSuperClasses( C tys ) returns the transitive superclasses+                           of (C tys), not including C itself++For example+  class C a b => D a b+  class D b a => C a b++Then+  transSuperClasses( Ord ty )  = [Eq ty]+  transSuperClasses( C ta tb ) = [D tb ta, C tb ta]++Notice that in the recursive-superclass case we include C again at+the end of the chain.  One could exclude C in this case, but+the code is more awkward and there seems no good reason to do so.+(However C.f. TcCanonical.mk_strict_superclasses, which /does/+appear to do so.)++The algorithm is expand( so_far, pred ):+  1. If pred is not a class constraint, return empty set        Otherwise pred = C ts  2. If C is in so_far, return empty set (breaks loops)@@ -2124,6 +1861,8 @@  * With normal Haskell-98 classes, the loop-detector will never bite,    so we'll get all the superclasses. + * We need the loop-breaker in case we have UndecidableSuperClasses on+  * Since there is only a finite number of distinct classes, expansion    must terminate. @@ -2140,7 +1879,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We can't quantify over a constraint (t1 ~# t2) because that isn't a predicate type; see Note [Types for coercions, predicates, and evidence]-in Type.hs.+in TyCoRep.  So we have to 'lift' it to (t1 ~ t2).  Similarly (~R#) must be lifted to Coercible.@@ -2213,15 +1952,15 @@ -- *necessarily* have any foralls.  E.g --        f :: (?x::Int) => Int -> Int isSigmaTy ty | Just ty' <- tcView ty = isSigmaTy ty'-isSigmaTy (ForAllTy {}) = True-isSigmaTy (FunTy a _)   = isPredTy a-isSigmaTy _             = False+isSigmaTy (ForAllTy {})                = True+isSigmaTy (FunTy { ft_af = InvisArg }) = True+isSigmaTy _                            = False  isRhoTy :: TcType -> Bool   -- True of TcRhoTypes; see Note [TcRhoType] isRhoTy ty | Just ty' <- tcView ty = isRhoTy ty'-isRhoTy (ForAllTy {}) = False-isRhoTy (FunTy a r)   = not (isPredTy a) && isRhoTy r-isRhoTy _             = True+isRhoTy (ForAllTy {})                          = False+isRhoTy (FunTy { ft_af = VisArg, ft_res = r }) = isRhoTy r+isRhoTy _                                      = True  -- | Like 'isRhoTy', but also says 'True' for 'Infer' types isRhoExpTy :: ExpType -> Bool@@ -2232,9 +1971,9 @@ -- Yes for a type of a function that might require evidence-passing -- Used only by bindLocalMethods isOverloadedTy ty | Just ty' <- tcView ty = isOverloadedTy ty'-isOverloadedTy (ForAllTy _  ty) = isOverloadedTy ty-isOverloadedTy (FunTy a _)      = isPredTy a-isOverloadedTy _                = False+isOverloadedTy (ForAllTy _  ty)             = isOverloadedTy ty+isOverloadedTy (FunTy { ft_af = InvisArg }) = True+isOverloadedTy _                            = False  isFloatTy, isDoubleTy, isIntegerTy, isIntTy, isWordTy, isBoolTy,     isUnitTy, isCharTy, isAnyTy :: Type -> Bool@@ -2279,14 +2018,6 @@   | otherwise   = Nothing -hasIPPred :: PredType -> Bool-hasIPPred pred-  = case classifyPredType pred of-      ClassPred cls tys-        | isIPClass     cls -> True-        | isCTupleClass cls -> any hasIPPred tys-      _other -> False- is_tc :: Unique -> Type -> Bool -- Newtypes are opaque to this is_tc uniq ty = case tcSplitTyConApp_maybe ty of@@ -2326,6 +2057,23 @@   | otherwise                               = False  +-- | Is this type *almost function-free*? See Note [Almost function-free]+-- in TcRnTypes+isAlmostFunctionFree :: TcType -> Bool+isAlmostFunctionFree ty | Just ty' <- tcView ty = isAlmostFunctionFree ty'+isAlmostFunctionFree (TyVarTy {})    = True+isAlmostFunctionFree (AppTy ty1 ty2) = isAlmostFunctionFree ty1 &&+                                       isAlmostFunctionFree ty2+isAlmostFunctionFree (TyConApp tc args)+  | isTypeFamilyTyCon tc = False+  | otherwise            = all isAlmostFunctionFree args+isAlmostFunctionFree (ForAllTy bndr _) = isAlmostFunctionFree (binderType bndr)+isAlmostFunctionFree (FunTy _ ty1 ty2) = isAlmostFunctionFree ty1 &&+                                         isAlmostFunctionFree ty2+isAlmostFunctionFree (LitTy {})        = True+isAlmostFunctionFree (CastTy ty _)     = isAlmostFunctionFree ty+isAlmostFunctionFree (CoercionTy {})   = True+ {- ************************************************************************ *                                                                      *@@ -2638,11 +2386,11 @@   2. Once we get into an implicit parameter or equality we     can't get back to a class constraint, so it's safe-    to say "size 0".  See Trac #4200.+    to say "size 0".  See #4200.  NB: we don't want to detect PredTypes in sizeType (and then call sizePred on them), or we might get an infinite loop if that PredType-is irreducible. See Trac #5581.+is irreducible. See #5581. -}  type TypeSize = IntWithInf@@ -2662,7 +2410,7 @@                                    -- size ordering is sound, but why is this better?                                    -- I came across this when investigating #14010.     go (LitTy {})                = 1-    go (FunTy arg res)           = go arg + go res + 1+    go (FunTy _ arg res)         = go arg + go res + 1     go (AppTy fun arg)           = go fun + go arg     go (ForAllTy (Bndr tv vis) ty)         | isVisibleArgFlag vis   = go (tyVarKind tv) + go ty + 1
typecheck/TcTypeNats.hs view
@@ -29,7 +29,7 @@ import TyCon      ( TyCon, FamTyConFlav(..), mkFamilyTyCon                   , Injectivity(..) ) import Coercion   ( Role(..) )-import TcRnTypes  ( Xi )+import Constraint ( Xi ) import CoAxiom    ( CoAxiomRule(..), BuiltInSynFamily(..), TypeEqn ) import Name       ( Name, BuiltInSyntax(..) ) import TysWiredIn@@ -69,7 +69,7 @@  See also the Wiki page: -    https://ghc.haskell.org/trac/ghc/wiki/TypeNats+    https://gitlab.haskell.org/ghc/ghc/wikis/type-nats  Note [Adding built-in type families] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typecheck/TcTypeable.hs view
@@ -3,23 +3,24 @@ (c) The GRASP/AQUA Project, Glasgow University, 1992-1999 -} +{-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} -module TcTypeable(mkTypeableBinds) where+module TcTypeable(mkTypeableBinds, tyConIsTypeable) where +#include "HsVersions.h"  import GhcPrelude  import BasicTypes ( Boxity(..), neverInlinePragma, SourceText(..) )-import TcBinds( addTypecheckedBinds ) import IfaceEnv( newGlobalBinder ) import TyCoRep( Type(..), TyLit(..) ) import TcEnv import TcEvidence ( mkWpTyApps ) import TcRnMonad-import TcTypeableValidity+import TcType import HscTypes ( lookupId ) import PrelNames import TysPrim ( primTyCons )@@ -32,7 +33,7 @@ import TyCon import DataCon import Module-import HsSyn+import GHC.Hs import DynFlags import Bag import Var ( VarBndr(..) )@@ -44,6 +45,7 @@  import Control.Monad.Trans.State import Control.Monad.Trans.Class (lift)+import Data.Maybe ( isJust ) import Data.Word( Word64 )  {- Note [Grand plan for Typeable]@@ -146,7 +148,9 @@ -- See Note [Grand plan for Typeable] in TcTypeable. mkTypeableBinds :: TcM TcGblEnv mkTypeableBinds-  = do { -- Create a binding for $trModule.+  = do { dflags <- getDynFlags+       ; if gopt Opt_NoTypeableBinds dflags then getGblEnv else do+       { -- Create a binding for $trModule.          -- Do this before processing any data type declarations,          -- which need tcg_tr_module to be initialised        ; tcg_env <- mkModIdBindings@@ -164,7 +168,7 @@        ; traceTc "mkTypeableBinds" (ppr tycons)        ; this_mod_todos <- todoForTyCons mod mod_id tycons        ; mkTypeRepTodoBinds (this_mod_todos : prim_todos)-       } }+       } } }   where     needs_typeable_binds tc       | tc `elem` [runtimeRepTyCon, vecCountTyCon, vecElemTyCon]@@ -250,7 +254,7 @@               -- Do, however, make them for their promoted datacon (see #13915).             , not $ isFamInstTyCon tc''             , Just rep_name <- pure $ tyConRepName_maybe tc''-            , typeIsTypeable $ dropForAlls $ tyConKind tc''+            , tyConIsTypeable tc''             ]     return TypeRepTodo { mod_rep_expr    = nlHsVar mod_id                        , pkg_fingerprint = pkg_fpr@@ -397,7 +401,7 @@ -- | Make Typeable bindings for the given 'TyCon'. mkTyConRepBinds :: TypeableStuff -> TypeRepTodo                 -> TypeableTyCon -> KindRepM (LHsBinds GhcTc)-mkTyConRepBinds stuff@(Stuff {..}) todo (TypeableTyCon {..})+mkTyConRepBinds stuff todo (TypeableTyCon {..})   = do -- Make a KindRep        let (bndrs, kind) = splitForAllVarBndrs (tyConKind tycon)        liftTc $ traceTc "mkTyConKindRepBinds"@@ -410,6 +414,36 @@            tycon_rep_bind = mkVarBind tycon_rep_id tycon_rep_rhs        return $ unitBag tycon_rep_bind +-- | Is a particular 'TyCon' representable by @Typeable@?. These exclude type+-- families and polytypes.+tyConIsTypeable :: TyCon -> Bool+tyConIsTypeable tc =+       isJust (tyConRepName_maybe tc)+    && kindIsTypeable (dropForAlls $ tyConKind tc)++-- | Is a particular 'Kind' representable by @Typeable@? Here we look for+-- polytypes and types containing casts (which may be, for instance, a type+-- family).+kindIsTypeable :: Kind -> Bool+-- We handle types of the form (TYPE LiftedRep) specifically to avoid+-- looping on (tyConIsTypeable RuntimeRep). We used to consider (TYPE rr)+-- to be typeable without inspecting rr, but this exhibits bad behavior+-- when rr is a type family.+kindIsTypeable ty+  | Just ty' <- coreView ty         = kindIsTypeable ty'+kindIsTypeable ty+  | isLiftedTypeKind ty             = True+kindIsTypeable (TyVarTy _)          = True+kindIsTypeable (AppTy a b)          = kindIsTypeable a && kindIsTypeable b+kindIsTypeable (FunTy _ a b)        = kindIsTypeable a && kindIsTypeable b+kindIsTypeable (TyConApp tc args)   = tyConIsTypeable tc+                                   && all kindIsTypeable args+kindIsTypeable (ForAllTy{})         = False+kindIsTypeable (LitTy _)            = True+kindIsTypeable (CastTy{})           = False+  -- See Note [Typeable instances for casted types]+kindIsTypeable (CoercionTy{})       = False+ -- | Maps kinds to 'KindRep' bindings. This binding may either be defined in -- some other module (in which case the @Maybe (LHsExpr Id@ will be 'Nothing') -- or a binding which we generated in the current module (in which case it will@@ -430,8 +464,8 @@ builtInKindReps :: [(Kind, Name)] builtInKindReps =     [ (star, starKindRepName)-    , (mkFunTy star star, starArrStarKindRepName)-    , (mkFunTys [star, star] star, starArrStarArrStarKindRepName)+    , (mkVisFunTy star star, starArrStarKindRepName)+    , (mkVisFunTys [star, star] star, starArrStarArrStarKindRepName)     ]   where     star = liftedTypeKind@@ -447,7 +481,7 @@ mkExportedKindReps :: TypeableStuff                    -> [(Kind, Id)]  -- ^ the kinds to generate bindings for                    -> KindRepM ()-mkExportedKindReps stuff@(Stuff {..}) = mapM_ kindrep_binding+mkExportedKindReps stuff = mapM_ kindrep_binding   where     empty_scope = mkDeBruijnContext [] @@ -521,8 +555,9 @@         -- We handle (TYPE LiftedRep) etc separately to make it         -- clear to consumers (e.g. serializers) that there is         -- a loop here (as TYPE :: RuntimeRep -> TYPE 'LiftedRep)-      | not (tcIsConstraintKind k)    -- Typeable respects the Constraint/* distinction-                                      -- so do not follow the special case here+      | not (tcIsConstraintKind k)+              -- Typeable respects the Constraint/Type distinction+              -- so do not follow the special case here       , Just arg <- kindRep_maybe k       , Just (tc, []) <- splitTyConApp_maybe arg       , Just dc <- isPromotedDataCon_maybe tc@@ -554,7 +589,7 @@     new_kind_rep (ForAllTy (Bndr var _) ty)       = pprPanic "mkTyConKindRepBinds(ForAllTy)" (ppr var $$ ppr ty) -    new_kind_rep (FunTy t1 t2)+    new_kind_rep (FunTy _ t1 t2)       = do rep1 <- getKindRep stuff in_scope t1            rep2 <- getKindRep stuff in_scope t2            return $ nlHsDataCon kindRepFunDataCon@@ -570,6 +605,7 @@                  `nlHsApp` nlHsDataCon typeLitSymbolDataCon                  `nlHsApp` nlHsLit (mkHsStringPrimLit $ mkFastString $ show s) +    -- See Note [Typeable instances for casted types]     new_kind_rep (CastTy ty co)       = pprPanic "mkTyConKindRepBinds.go(cast)" (ppr ty $$ ppr co) @@ -668,6 +704,44 @@                  | KindRepApp KindRep KindRep                  | KindRepFun KindRep KindRep                  ...++Note [Typeable instances for casted types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+At present, GHC does not manufacture TypeReps for types containing casts+(#16835). In theory, GHC could do so today, but it might be dangerous tomorrow.++In today's GHC, we normalize all types before computing their TypeRep.+For example:++    type family F a+    type instance F Int = Type++    data D = forall (a :: F Int). MkD a++    tr :: TypeRep (MkD Bool)+    tr = typeRep++When computing the TypeRep for `MkD Bool` (or rather,+`MkD (Bool |> Sym (FInt[0]))`), we simply discard the cast to obtain the+TypeRep for `MkD Bool`.++Why does this work? If we have a type definition with casts, then the+only coercions that those casts can mention are either Refl, type family+axioms, built-in axioms, and coercions built from those roots. Therefore,+type family (and built-in) axioms will apply precisely when type normalization+succeeds (i.e, the type family applications are reducible). Therefore, it+is safe to ignore the cast entirely when constructing the TypeRep.++This approach would be fragile in a future where GHC permits other forms of+coercions to appear in casts (e.g., coercion quantification as described+in #15710). If GHC permits local assumptions to appear in casts that cannot be+reduced with conventional normalization, then discarding casts would become+unsafe. It would be unfortunate for the Typeable solver to become a roadblock+obstructing such a future, so we deliberately do not implement the ability+for TypeReps to represent types with casts at the moment.++If we do wish to allow this in the future, it will likely require modeling+casts and coercions in TypeReps themselves. -}  mkList :: Type -> [LHsExpr GhcTc] -> LHsExpr GhcTc
− typecheck/TcTypeableValidity.hs
@@ -1,46 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1999--}---- | This module is separate from "TcTypeable" because the functions in this--- module are used in "ClsInst", and importing "TcTypeable" from "ClsInst"--- would lead to an import cycle.-module TcTypeableValidity (tyConIsTypeable, typeIsTypeable) where--import GhcPrelude--import TyCoRep-import TyCon-import Type--import Data.Maybe (isJust)---- | Is a particular 'TyCon' representable by @Typeable@?. These exclude type--- families and polytypes.-tyConIsTypeable :: TyCon -> Bool-tyConIsTypeable tc =-       isJust (tyConRepName_maybe tc)-    && typeIsTypeable (dropForAlls $ tyConKind tc)---- | Is a particular 'Type' representable by @Typeable@? Here we look for--- polytypes and types containing casts (which may be, for instance, a type--- family).-typeIsTypeable :: Type -> Bool--- We handle types of the form (TYPE LiftedRep) specifically to avoid--- looping on (tyConIsTypeable RuntimeRep). We used to consider (TYPE rr)--- to be typeable without inspecting rr, but this exhibits bad behavior--- when rr is a type family.-typeIsTypeable ty-  | Just ty' <- coreView ty         = typeIsTypeable ty'-typeIsTypeable ty-  | isLiftedTypeKind ty             = True-typeIsTypeable (TyVarTy _)          = True-typeIsTypeable (AppTy a b)          = typeIsTypeable a && typeIsTypeable b-typeIsTypeable (FunTy a b)          = typeIsTypeable a && typeIsTypeable b-typeIsTypeable (TyConApp tc args)   = tyConIsTypeable tc-                                   && all typeIsTypeable args-typeIsTypeable (ForAllTy{})         = False-typeIsTypeable (LitTy _)            = True-typeIsTypeable (CastTy{})           = False-typeIsTypeable (CoercionTy{})       = False
typecheck/TcUnify.hs view
@@ -6,7 +6,8 @@ Type subsumption and unification -} -{-# LANGUAGE CPP, MultiWayIf, TupleSections, ScopedTypeVariables #-}+{-# LANGUAGE CPP, DeriveFunctor, MultiWayIf, TupleSections,+    ScopedTypeVariables #-}  module TcUnify (   -- Full-blown subsumption@@ -31,7 +32,7 @@   matchActualFunTys, matchActualFunTysPart,   matchExpectedFunKind, -  metaTyVarUpdateOK, occCheckForErrors, OccCheckResult(..)+  metaTyVarUpdateOK, occCheckForErrors, MetaTyVarUpdateResult(..)    ) where @@ -39,14 +40,18 @@  import GhcPrelude -import HsSyn+import GHC.Hs import TyCoRep+import TyCoPpr( debugPprType ) import TcMType import TcRnMonad import TcType import Type import Coercion import TcEvidence+import Constraint+import Predicate+import TcOrigin import Name( isSystemName ) import Inst import TyCon@@ -63,6 +68,7 @@ import qualified GHC.LanguageExtensions as LangExt import Outputable +import Data.Maybe( isNothing ) import Control.Monad import Control.Arrow ( second ) @@ -153,8 +159,8 @@     go acc_arg_tys n ty       | Just ty' <- tcView ty = go acc_arg_tys n ty' -    go acc_arg_tys n (FunTy arg_ty res_ty)-      = ASSERT( not (isPredTy arg_ty) )+    go acc_arg_tys n (FunTy { ft_af = af, ft_arg = arg_ty, ft_res = res_ty })+      = ASSERT( af == VisArg )         do { (result, wrap_res) <- go (mkCheckExpType arg_ty : acc_arg_tys)                                       (n-1) res_ty            ; return ( result@@ -174,7 +180,7 @@        -- However unlike the meta-tyvar case, we are sure that the        -- number of arguments doesn't match arity of the original        -- type, so we can add a bit more context to the error message-       -- (cf Trac #7869).+       -- (cf #7869).        --        -- It is not always an error, because specialized type may have        -- different arity, for example:@@ -184,7 +190,7 @@        -- > f2 = undefined        --        -- But in that case we add specialized type into error context-       -- anyway, because it may be useful. See also Trac #9605.+       -- anyway, because it may be useful. See also #9605.     go acc_arg_tys n ty = addErrCtxtM mk_ctxt $                           defer acc_arg_tys n (mkCheckExpType ty) @@ -196,7 +202,7 @@            ; result       <- thing_inside (reverse acc_arg_tys ++ more_arg_tys) res_ty            ; more_arg_tys <- mapM readExpType more_arg_tys            ; res_ty       <- readExpType res_ty-           ; let unif_fun_ty = mkFunTys more_arg_tys res_ty+           ; let unif_fun_ty = mkVisFunTys more_arg_tys res_ty            ; wrap <- tcSubTypeDS AppOrigin GenSigCtxt unif_fun_ty fun_ty                          -- Not a good origin at all :-(            ; return (result, wrap) }@@ -282,8 +288,8 @@     go n acc_args ty       | Just ty' <- tcView ty = go n acc_args ty' -    go n acc_args (FunTy arg_ty res_ty)-      = ASSERT( not (isPredTy arg_ty) )+    go n acc_args (FunTy { ft_af = af, ft_arg = arg_ty, ft_res = res_ty })+      = ASSERT( af == VisArg )         do { (wrap_res, tys, ty_r) <- go (n-1) (arg_ty : acc_args) res_ty            ; return ( mkWpFun idHsWrapper wrap_res arg_ty ty_r doc                     , arg_ty : tys, ty_r ) }@@ -302,7 +308,7 @@        -- However unlike the meta-tyvar case, we are sure that the        -- number of arguments doesn't match arity of the original        -- type, so we can add a bit more context to the error message-       -- (cf Trac #7869).+       -- (cf #7869).        --        -- It is not always an error, because specialized type may have        -- different arity, for example:@@ -312,7 +318,7 @@        -- > f2 = undefined        --        -- But in that case we add specialized type into error context-       -- anyway, because it may be useful. See also Trac #9605.+       -- anyway, because it may be useful. See also #9605.     go n acc_args ty = addErrCtxtM (mk_ctxt (reverse acc_args) ty) $                        defer n ty @@ -320,14 +326,14 @@     defer n fun_ty       = do { arg_tys <- replicateM n newOpenFlexiTyVarTy            ; res_ty  <- newOpenFlexiTyVarTy-           ; let unif_fun_ty = mkFunTys arg_tys res_ty+           ; let unif_fun_ty = mkVisFunTys arg_tys res_ty            ; co <- unifyType mb_thing fun_ty unif_fun_ty            ; return (mkWpCastN co, arg_tys, res_ty) }      ------------     mk_ctxt :: [TcSigmaType] -> TcSigmaType -> TidyEnv -> TcM (TidyEnv, MsgDoc)     mk_ctxt arg_tys res_ty env-      = do { let ty = mkFunTys arg_tys res_ty+      = do { let ty = mkVisFunTys arg_tys res_ty            ; (env1, zonked) <- zonkTidyTcType env ty                    -- zonking might change # of args            ; let (zonked_args, _) = tcSplitFunTys zonked@@ -399,7 +405,7 @@     -- Then we don't want to instantiate T's data constructors with     --    (a::*) ~ Maybe     -- because that'll make types that are utterly ill-kinded.-    -- This happened in Trac #7368+    -- This happened in #7368     defer       = do { (_, arg_tvs) <- newMetaTyVars (tyConTyVars tc)            ; traceTc "matchExpectedTyConApp" (ppr tc $$ ppr (tyConTyVars tc) $$ ppr arg_tvs)@@ -441,7 +447,7 @@            ; return (co, (ty1, ty2)) }      orig_kind = tcTypeKind orig_ty-    kind1 = mkFunTy liftedTypeKind orig_kind+    kind1 = mkVisFunTy liftedTypeKind orig_kind     kind2 = liftedTypeKind    -- m :: * -> k                               -- arg type :: * @@ -517,7 +523,7 @@ HsWrapper.  Another powerful reason for doing this co/contra stuff is visible-in Trac #9569, involving instantiation of constraint variables,+in #9569, involving instantiation of constraint variables, and again involving eta-expansion.  Wrinkle 3: Note [Higher rank types]@@ -714,7 +720,7 @@      ty_expected isn't really polymorphic  If we prematurely go to equality we'll reject a program we should-accept (e.g. Trac #13752).  So the test (which is only to improve+accept (e.g. #13752).  So the test (which is only to improve error message) is very conservative:  * ty_actual is /definitely/ monomorphic  * ty_expected is /definitely/ polymorphic@@ -751,12 +757,11 @@     -- which, in the impredicative case unified  alpha := ty_a     -- where th_a is a polytype.  Not only is this probably bogus (we     -- simply do not have decent story for impredicative types), but it-    -- caused Trac #12616 because (also bizarrely) 'deriving' code had+    -- caused #12616 because (also bizarrely) 'deriving' code had     -- -XImpredicativeTypes on.  I deleted the entire case. -    go (FunTy act_arg act_res) (FunTy exp_arg exp_res)-      | not (isPredTy act_arg)-      , not (isPredTy exp_arg)+    go (FunTy { ft_af = VisArg, ft_arg = act_arg, ft_res = act_res })+       (FunTy { ft_af = VisArg, ft_arg = exp_arg, ft_res = exp_res })       = -- See Note [Co/contra-variance of subsumption checking]         do { res_wrap <- tc_sub_type_ds eq_orig inst_orig  ctxt       act_res exp_res            ; arg_wrap <- tc_sub_tc_type eq_orig given_orig GenSigCtxt exp_arg act_arg@@ -790,7 +795,7 @@      inst_and_unify = do { (wrap, rho_a) <- deeplyInstantiate inst_orig ty_actual -                           -- if we haven't recurred through an arrow, then+                           -- If we haven't recurred through an arrow, then                            -- the eq_orig will list ty_actual. In this case,                            -- we want to update the origin to reflect the                            -- instantiation. If we *have* recurred through@@ -926,35 +931,63 @@ an InferResult, and in some cases not.  That's why InferReult has the ir_inst flag. -* ir_inst = True: deeply instantiate+ir_inst = True: deeply instantiate+---------------------------------- -  Consider+1. Consider     f x = (*)-  We want to instantiate the type of (*) before returning, else we-  will infer the type-    f :: forall {a}. a -> forall b. Num b => b -> b -> b-  This is surely confusing for users.+   We want to instantiate the type of (*) before returning, else we+   will infer the type+     f :: forall {a}. a -> forall b. Num b => b -> b -> b+   This is surely confusing for users. -  And worse, the monomorphism restriction won't work properly. The MR is-  dealt with in simplifyInfer, and simplifyInfer has no way of-  instantiating. This could perhaps be worked around, but it may be-  hard to know even when instantiation should happen.+   And worse, the monomorphism restriction won't work properly. The MR is+   dealt with in simplifyInfer, and simplifyInfer has no way of+   instantiating. This could perhaps be worked around, but it may be+   hard to know even when instantiation should happen. -  Another reason.  Consider+2. Another reason.  Consider        f :: (?x :: Int) => a -> a        g y = let ?x = 3::Int in f-  Here want to instantiate f's type so that the ?x::Int constraint-  gets discharged by the enclosing implicit-parameter binding.+   Here want to instantiate f's type so that the ?x::Int constraint+   gets discharged by the enclosing implicit-parameter binding. -* ir_inst = False: do not instantiate+ir_inst = False: do not instantiate+----------------------------------- -  Consider this (which uses visible type application):+1. Consider this (which uses visible type application):      (let { f :: forall a. a -> a; f x = x } in f) @Int -  We'll call TcExpr.tcInferFun to infer the type of the (let .. in f)-  And we don't want to instantite the type of 'f' when we reach it,-  else the outer visible type application won't work+   We'll call TcExpr.tcInferFun to infer the type of the (let .. in f)+   And we don't want to instantite the type of 'f' when we reach it,+   else the outer visible type application won't work++2. :type +v. When we say++     :type +v const @Int++   we really want `forall b. Int -> b -> Int`. Note that this is *not*+   instantiated.++3. Pattern bindings. For example:++     foo x+       | blah <- const @Int+       = (blah x False, blah x 'z')++   Note that `blah` is polymorphic. (This isn't a terribly compelling+   reason, but the choice of ir_inst does matter here.)++Discussion+----------+We thought that we should just remove the ir_inst flag, in favor of+always instantiating. Essentially: motivations (1) and (3) for ir_inst = False+are not terribly exciting. However, motivation (2) is quite important.+Furthermore, there really was not much of a simplification of the code+in removing ir_inst, and working around it to enable flows like what we+see in (2) is annoying. This was done in #17173.+ -}  {- *********************************************************************@@ -1004,7 +1037,7 @@  {- Note [Promoting a type] ~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #12427)+Consider (#12427)    data T where     MkT :: (Int -> Int) -> a -> T@@ -1176,7 +1209,13 @@                          -> TcLevel -> WantedConstraints -> TcM () emitResidualTvConstraint skol_info m_telescope skol_tvs tclvl wanted   | isEmptyWC wanted+  , isNothing m_telescope || skol_tvs `lengthAtMost` 1+    -- If m_telescope is (Just d), we must do the bad-telescope check,+    -- so we must /not/ discard the implication even if there are no+    -- wanted constraints. See Note [Checking telescopes] in Constraint.+    -- Lacking this check led to #16247   = return ()+   | otherwise   = do { ev_binds <- newNoTcEvBinds        ; implic   <- newImplication@@ -1221,7 +1260,7 @@ alwaysBuildImplication _ = False  {-  Commmented out for now while I figure out about error messages.-    See Trac #14185+    See #14185  alwaysBuildImplication (SigSkol ctxt _ _)   = case ctxt of@@ -1277,7 +1316,7 @@   top-level unlifted bindings, which are verboten. This only matters   at top level, so we check for that   See also Note [Deferred errors for coercion holes] in TcErrors.-  cf Trac #14149 for an example of what goes wrong.+  cf #14149 for an example of what goes wrong.  * If you have      f :: Int;  f = f_blah@@ -1288,7 +1327,7 @@       [W] C Int b1    -- from f_blah       [W] C Int b2    -- from g_blan   and fundpes can yield [D] b1 ~ b2, even though the two functions have-  literally nothing to do with each other.  Trac #14185 is an example.+  literally nothing to do with each other.  #14185 is an example.   Building an implication keeps them separage. -} @@ -1388,7 +1427,7 @@       = do { co_tys <- uType t_or_k origin t1 t2            ; return (mkCoherenceRightCo Nominal t2 co2 co_tys) } -        -- Variables; go for uVar+        -- Variables; go for uUnfilledVar         -- Note that we pass in *original* (before synonym expansion),         -- so that type variables tend to get filled in with         -- the most informative version of the type@@ -1417,13 +1456,13 @@         --   type Foo = Int         -- and we try to unify  Foo ~ Bool         -- we'll end up saying "can't match Foo with Bool"-        -- rather than "can't match "Int with Bool".  See Trac #4535.+        -- rather than "can't match "Int with Bool".  See #4535.     go ty1 ty2       | Just ty1' <- tcView ty1 = go ty1' ty2       | Just ty2' <- tcView ty2 = go ty1  ty2'          -- Functions (or predicate functions) just check the two parts-    go (FunTy fun1 arg1) (FunTy fun2 arg2)+    go (FunTy _ fun1 arg1) (FunTy _ fun2 arg2)       = do { co_l <- uType t_or_k origin fun1 fun2            ; co_r <- uType t_or_k origin arg1 arg2            ; return $ mkFunCo Nominal co_l co_r }@@ -1457,12 +1496,12 @@      go (AppTy s1 t1) (TyConApp tc2 ts2)       | Just (ts2', t2') <- snocView ts2-      = ASSERT( mightBeUnsaturatedTyCon tc2 )+      = ASSERT( not (mustBeSaturated tc2) )         go_app (isNextTyConArgVisible tc2 ts2') s1 t1 (TyConApp tc2 ts2') t2'      go (TyConApp tc1 ts1) (AppTy s2 t2)       | Just (ts1', t1') <- snocView ts1-      = ASSERT( mightBeUnsaturatedTyCon tc1 )+      = ASSERT( not (mustBeSaturated tc1) )         go_app (isNextTyConArgVisible tc1 ts1') (TyConApp tc1 ts1') t1' s2 t2      go (CoercionTy co1) (CoercionTy co2)@@ -1517,7 +1556,7 @@         w (T x) ~ Foo (T x y) We do match (w ~ Foo) first, but in some circumstances we simply create a deferred constraint; and then go ahead and match (T x ~ T x y).-This came up in Trac #3950.+This came up in #3950.  So either    (a) either we must check for identical argument kinds@@ -1576,11 +1615,11 @@  ************************************************************************ *                                                                      *-                 uVar and friends+                 uUnfilledVar and friends *                                                                      * ************************************************************************ -@uVar@ is called when at least one of the types being unified is a+@uunfilledVar@ is called when at least one of the types being unified is a variable.  It does {\em not} assume that the variable is a fixed point of the substitution; rather, notice that @uVar@ (defined below) nips back into @uTys@ if it turns out that the variable is already bound.@@ -1590,7 +1629,8 @@ uUnfilledVar :: CtOrigin              -> TypeOrKind              -> SwapFlag-             -> TcTyVar        -- Tyvar 1+             -> TcTyVar        -- Tyvar 1: not necessarily a meta-tyvar+                               --    definitely not a /filled/ meta-tyvar              -> TcTauType      -- Type 2              -> TcM Coercion -- "Unfilled" means that the variable is definitely not a filled-in meta tyvar@@ -1608,7 +1648,8 @@ uUnfilledVar1 :: CtOrigin               -> TypeOrKind               -> SwapFlag-              -> TcTyVar        -- Tyvar 1+              -> TcTyVar        -- Tyvar 1: not necessarily a meta-tyvar+                                --    definitely not a /filled/ meta-tyvar               -> TcTauType      -- Type 2, zonked               -> TcM Coercion uUnfilledVar1 origin t_or_k swapped tv1 ty2@@ -1621,12 +1662,19 @@   where     -- 'go' handles the case where both are     -- tyvars so we might want to swap+    -- E.g. maybe tv2 is a meta-tyvar and tv1 is not     go tv2 | tv1 == tv2  -- Same type variable => no-op            = return (mkNomReflCo (mkTyVarTy tv1))             | swapOverTyVars tv1 tv2   -- Distinct type variables-           = uUnfilledVar2 origin t_or_k (flipSwap swapped)-                           tv2 (mkTyVarTy tv1)+               -- Swap meta tyvar to the left if poss+           = do { tv1 <- zonkTyCoVarKind tv1+                     -- We must zonk tv1's kind because that might+                     -- not have happened yet, and it's an invariant of+                     -- uUnfilledTyVar2 that ty2 is fully zonked+                     -- Omitting this caused #16902+                ; uUnfilledVar2 origin t_or_k (flipSwap swapped)+                           tv2 (mkTyVarTy tv1) }             | otherwise            = uUnfilledVar2 origin t_or_k swapped tv1 ty2@@ -1635,7 +1683,8 @@ uUnfilledVar2 :: CtOrigin               -> TypeOrKind               -> SwapFlag-              -> TcTyVar        -- Tyvar 1+              -> TcTyVar        -- Tyvar 1: not necessarily a meta-tyvar+                                --    definitely not a /filled/ meta-tyvar               -> TcTauType      -- Type 2, zonked               -> TcM Coercion uUnfilledVar2 origin t_or_k swapped tv1 ty2@@ -1652,8 +1701,10 @@                   , ppr ty2 <+> dcolon <+> ppr (tcTypeKind  ty2)                   , ppr (isTcReflCo co_k), ppr co_k ] -           ; if isTcReflCo co_k  -- only proceed if the kinds matched.-+           ; if isTcReflCo co_k+               -- Only proceed if the kinds match+               -- NB: tv1 should still be unfilled, despite the kind unification+               --     because tv1 is not free in ty2 (or, hence, in its kind)              then do { writeMetaTyVar tv1 ty2'                      ; return (mkTcNomReflCo ty2') } @@ -1776,7 +1827,7 @@   skolems, so it's important that skolems have (accurate) level   numbers. -See Trac #15009 for an further analysis of why "deepest on the left"+See #15009 for an further analysis of why "deepest on the left" is a good plan.  Note [Fmv Orientation Invariant]@@ -1832,7 +1883,7 @@ and then replace all uses of 'a' with fsk.  That's bad because in error messages instead of saying 'a' we'll say (F [a]).  In all places, including those where the programmer wrote 'a' in the first-place.  Very confusing!  See Trac #7862.+place.  Very confusing!  See #7862.  Solution: re-orient a~fsk to fsk~a, so that we preferentially eliminate the fsk.@@ -1860,7 +1911,7 @@ into kicking out and rewriting inert constraints.  This is a performance optimisation only.  It turns out to fix-Trac #14723 all by itself, but clearly not reliably so!+#14723 all by itself, but clearly not reliably so!  It's simple to implement (see nicer_to_update_tv2 in swapOverTyVars). But, to my surprise, it didn't seem to make any significant difference@@ -2026,37 +2077,43 @@ -}  -- | Breaks apart a function kind into its pieces.-matchExpectedFunKind :: Outputable fun-                     => fun             -- ^ type, only for errors-                     -> TcKind          -- ^ function kind-                     -> TcM (Coercion, TcKind, TcKind)-                                  -- ^ co :: old_kind ~ arg -> res-matchExpectedFunKind hs_ty = go+matchExpectedFunKind+  :: Outputable fun+  => fun             -- ^ type, only for errors+  -> Arity           -- ^ n: number of desired arrows+  -> TcKind          -- ^ fun_ kind+  -> TcM Coercion    -- ^ co :: fun_kind ~ (arg1 -> ... -> argn -> res)++matchExpectedFunKind hs_ty n k = go n k   where-    go k | Just k' <- tcView k = go k'+    go 0 k = return (mkNomReflCo k) -    go k@(TyVarTy kvar)+    go n k | Just k' <- tcView k = go n k'++    go n k@(TyVarTy kvar)       | isMetaTyVar kvar       = do { maybe_kind <- readMetaTyVar kvar            ; case maybe_kind of-                Indirect fun_kind -> go fun_kind-                Flexi ->             defer k }+                Indirect fun_kind -> go n fun_kind+                Flexi ->             defer n k } -    go k@(FunTy arg res) = return (mkNomReflCo k, arg, res)-    go other             = defer other+    go n (FunTy _ arg res)+      = do { co <- go (n-1) res+           ; return (mkTcFunCo Nominal (mkTcNomReflCo arg) co) } -    defer k-      = do { arg_kind <- newMetaKindVar-           ; res_kind <- newMetaKindVar-           ; let new_fun = mkFunTy arg_kind res_kind+    go n other+     = defer n other++    defer n k+      = do { arg_kinds <- newMetaKindVars n+           ; res_kind  <- newMetaKindVar+           ; let new_fun = mkVisFunTys arg_kinds res_kind                  origin  = TypeEqOrigin { uo_actual   = k                                         , uo_expected = new_fun                                         , uo_thing    = Just (ppr hs_ty)                                         , uo_visible  = True                                         }-           ; co <- uType KindLevel origin k new_fun-           ; return (co, arg_kind, res_kind) }-+           ; uType KindLevel origin k new_fun }  {- ********************************************************************* *                                                                      *@@ -2110,43 +2167,41 @@  -} -data OccCheckResult a-  = OC_OK a-  | OC_Bad     -- Forall or type family-  | OC_Occurs--instance Functor OccCheckResult where-      fmap = liftM+data MetaTyVarUpdateResult a+  = MTVU_OK a+  | MTVU_Bad     -- Forall, predicate, or type family+  | MTVU_Occurs+    deriving (Functor) -instance Applicative OccCheckResult where-      pure = OC_OK+instance Applicative MetaTyVarUpdateResult where+      pure = MTVU_OK       (<*>) = ap -instance Monad OccCheckResult where-  OC_OK x    >>= k = k x-  OC_Bad     >>= _ = OC_Bad-  OC_Occurs  >>= _ = OC_Occurs+instance Monad MetaTyVarUpdateResult where+  MTVU_OK x    >>= k = k x+  MTVU_Bad     >>= _ = MTVU_Bad+  MTVU_Occurs  >>= _ = MTVU_Occurs -occCheckForErrors :: DynFlags -> TcTyVar -> Type -> OccCheckResult ()--- Just for error-message generation; so we return OccCheckResult+occCheckForErrors :: DynFlags -> TcTyVar -> Type -> MetaTyVarUpdateResult ()+-- Just for error-message generation; so we return MetaTyVarUpdateResult -- so the caller can report the right kind of error -- Check whether --   a) the given variable occurs in the given type. --   b) there is a forall in the type (unless we have -XImpredicativeTypes) occCheckForErrors dflags tv ty   = case preCheck dflags True tv ty of-      OC_OK _   -> OC_OK ()-      OC_Bad    -> OC_Bad-      OC_Occurs -> case occCheckExpand [tv] ty of-                     Nothing -> OC_Occurs-                     Just _  -> OC_OK ()+      MTVU_OK _   -> MTVU_OK ()+      MTVU_Bad    -> MTVU_Bad+      MTVU_Occurs -> case occCheckExpand [tv] ty of+                       Nothing -> MTVU_Occurs+                       Just _  -> MTVU_OK ()  ---------------- metaTyVarUpdateOK :: DynFlags                   -> TcTyVar             -- tv :: k1                   -> TcType              -- ty :: k2                   -> Maybe TcType        -- possibly-expanded ty--- (metaTyFVarUpdateOK tv ty)+-- (metaTyVarUpdateOK tv ty) -- We are about to update the meta-tyvar tv with ty -- Check (a) that tv doesn't occur in ty (occurs check) --       (b) that ty does not have any foralls@@ -2173,17 +2228,18 @@   = case preCheck dflags False tv ty of          -- False <=> type families not ok          -- See Note [Prevent unification with type families]-      OC_OK _   -> Just ty-      OC_Bad    -> Nothing  -- forall or type function-      OC_Occurs -> occCheckExpand [tv] ty+      MTVU_OK _   -> Just ty+      MTVU_Bad    -> Nothing  -- forall, predicate, or type function+      MTVU_Occurs -> occCheckExpand [tv] ty -preCheck :: DynFlags -> Bool -> TcTyVar -> TcType -> OccCheckResult ()+preCheck :: DynFlags -> Bool -> TcTyVar -> TcType -> MetaTyVarUpdateResult () -- A quick check for---   (a) a forall type (unless -XImpredivativeTypes)---   (b) a type family---   (c) an occurrence of the type variable (occurs check)+--   (a) a forall type (unless -XImpredicativeTypes)+--   (b) a predicate type (unless -XImpredicativeTypes)+--   (c) a type family+--   (d) an occurrence of the type variable (occurs check) ----- For (a) and (b) we check only the top level of the type, NOT+-- For (a), (b), and (c) we check only the top level of the type, NOT -- inside the kinds of variables it mentions.  But for (c) we do -- look in the kinds of course. @@ -2193,25 +2249,28 @@     details          = tcTyVarDetails tv     impredicative_ok = canUnifyWithPolyType dflags details -    ok :: OccCheckResult ()-    ok = OC_OK ()+    ok :: MetaTyVarUpdateResult ()+    ok = MTVU_OK () -    fast_check :: TcType -> OccCheckResult ()+    fast_check :: TcType -> MetaTyVarUpdateResult ()     fast_check (TyVarTy tv')-      | tv == tv' = OC_Occurs+      | tv == tv' = MTVU_Occurs       | otherwise = fast_check_occ (tyVarKind tv')            -- See Note [Occurrence checking: look inside kinds]      fast_check (TyConApp tc tys)-      | bad_tc tc              = OC_Bad+      | bad_tc tc              = MTVU_Bad       | otherwise              = mapM fast_check tys >> ok     fast_check (LitTy {})      = ok-    fast_check (FunTy a r)     = fast_check a   >> fast_check r+    fast_check (FunTy{ft_af = af, ft_arg = a, ft_res = r})+      | InvisArg <- af+      , not impredicative_ok   = MTVU_Bad+      | otherwise              = fast_check a   >> fast_check r     fast_check (AppTy fun arg) = fast_check fun >> fast_check arg     fast_check (CastTy ty co)  = fast_check ty  >> fast_check_co co     fast_check (CoercionTy co) = fast_check_co co     fast_check (ForAllTy (Bndr tv' _) ty)-       | not impredicative_ok = OC_Bad+       | not impredicative_ok = MTVU_Bad        | tv == tv'            = ok        | otherwise = do { fast_check_occ (tyVarKind tv')                         ; fast_check_occ ty }@@ -2221,13 +2280,13 @@      -- For kinds, we only do an occurs check; we do not worry      -- about type families or foralls      -- See Note [Checking for foralls]-    fast_check_occ k | tv `elemVarSet` tyCoVarsOfType k = OC_Occurs+    fast_check_occ k | tv `elemVarSet` tyCoVarsOfType k = MTVU_Occurs                      | otherwise                        = ok       -- For coercions, we are only doing an occurs check here;      -- no bother about impredicativity in coercions, as they're      -- inferred-    fast_check_co co | tv `elemVarSet` tyCoVarsOfCo co = OC_Occurs+    fast_check_co co | tv `elemVarSet` tyCoVarsOfCo co = MTVU_Occurs                      | otherwise                       = ok      bad_tc :: TyCon -> Bool
typecheck/TcUnify.hs-boot view
@@ -1,12 +1,12 @@ module TcUnify where  import GhcPrelude-import TcType      ( TcTauType )-import TcRnTypes   ( TcM )-import TcEvidence  ( TcCoercion )-import HsExpr      ( HsExpr )-import HsTypes     ( HsType )-import HsExtension ( GhcRn )+import TcType           ( TcTauType )+import TcRnTypes        ( TcM )+import TcEvidence       ( TcCoercion )+import GHC.Hs.Expr      ( HsExpr )+import GHC.Hs.Types     ( HsType )+import GHC.Hs.Extension ( GhcRn )  -- This boot file exists only to tie the knot between --              TcUnify and Inst
typecheck/TcValidity.hs view
@@ -13,7 +13,7 @@   checkValidCoAxiom, checkValidCoAxBranch,   checkValidTyFamEqn, checkConsistentFamInst,   badATErr, arityErr,-  checkValidTelescope,+  checkTyConTelescope,   allDistinctTyVars   ) where @@ -27,7 +27,9 @@ import TcUnify    ( tcSubType_NC ) import TcSimplify ( simplifyAmbiguityCheck ) import ClsInst    ( matchGlobalInst, ClsInstResult(..), InstanceWhat(..), AssocInstInfo(..) )+import TyCoFVs import TyCoRep+import TyCoPpr import TcType hiding ( sizeType, sizeTypes ) import TysWiredIn ( heqTyConName, eqTyConName, coercibleTyConName ) import PrelNames@@ -37,22 +39,23 @@ import CoAxiom import Class import TyCon+import Predicate+import TcOrigin  -- others: import IfaceType( pprIfaceType, pprIfaceTypeApp )-import ToIface( toIfaceType, toIfaceTyCon, toIfaceTcArgs )-import HsSyn            -- HsType+import ToIface  ( toIfaceTyCon, toIfaceTcArgs, toIfaceType )+import GHC.Hs           -- HsType import TcRnMonad        -- TcType, amongst others import TcEnv       ( tcInitTidyEnv, tcInitOpenTidyEnv ) import FunDeps import FamInstEnv  ( isDominatedBy, injectiveBranches,                      InjectivityCheckResult(..) )-import FamInst     ( makeInjectivityErrors )+import FamInst import Name import VarEnv import VarSet import Var         ( VarBndr(..), mkTyVar )-import Id          ( idType, idName ) import FV import ErrUtils import DynFlags@@ -157,7 +160,7 @@   * If we try to check for ambiguity of a nested forall like     (forall a. Eq a => b), the implication constraint doesn't bind     all the skolems, which results in "No skolem info" in error-    messages (see Trac #10432).+    messages (see #10432).  To avoid this, we call checkAmbiguity once, at the top, in checkValidType. (I'm still a bit worried about unbound skolems when the type mentions@@ -231,13 +234,14 @@       GhciCtxt {}  -> False       TySynCtxt {} -> False       TypeAppCtxt  -> False+      StandaloneKindSigCtxt{} -> False       _            -> True  checkUserTypeError :: Type -> TcM () -- Check to see if the type signature mentions "TypeError blah" -- anywhere in it, and fail if so. ----- Very unsatisfactorily (Trac #11144) we need to tidy the type+-- Very unsatisfactorily (#11144) we need to tidy the type -- because it may have come from an /inferred/ signature, not a -- user-supplied one.  This is really only a half-baked fix; -- the other errors in checkValidType don't do tidying, and so@@ -269,7 +273,7 @@   It may be that when we /use/ T, we'll give an 'a' or 'b' that somehow   cure the ambiguity.  So we defer the ambiguity check to the use site. -  There is also an implementation reason (Trac #11608).  In the RHS of+  There is also an implementation reason (#11608).  In the RHS of   a type synonym we don't (currently) instantiate 'a' and 'b' with   TcTyVars before calling checkValidType, so we get asertion failures   from doing an ambiguity check on a type with TyVars in it.  Fixing this@@ -279,6 +283,10 @@      f @ty   No need to check ty for ambiguity +* StandaloneKindSigCtxt: type T :: ksig+  Kinds need a different ambiguity check than types, and the currently+  implemented check is only good for types. See #14419, in particular+  https://gitlab.haskell.org/ghc/ghc/issues/14419#note_160844  ************************************************************************ *                                                                      *@@ -342,6 +350,7 @@                   ExprSigCtxt    -> rank1                  KindSigCtxt    -> rank1+                 StandaloneKindSigCtxt{} -> rank1                  TypeAppCtxt | impred_flag -> ArbitraryRank                              | otherwise   -> tyConArgMonoType                     -- Normally, ImpredicativeTypes is handled in check_arg_type,@@ -349,7 +358,9 @@                     -- So we do this check here.                   FunSigCtxt {}  -> rank1-                 InfSigCtxt _   -> ArbitraryRank        -- Inferred type+                 InfSigCtxt {}  -> rank1 -- Inferred types should obey the+                                         -- same rules as declared ones+                  ConArgCtxt _   -> rank1 -- We are given the type of the entire                                          -- constructor, hence rank 1                  PatSynCtxt _   -> rank1@@ -417,7 +428,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~ Technically             Int -> forall a. a->a-is still a rank-1 type, but it's not Haskell 98 (Trac #5957).  So the+is still a rank-1 type, but it's not Haskell 98 (#5957).  So the validity checker allow a forall after an arrow only if we allow it before -- that is, with Rank2Types or RankNTypes -}@@ -456,14 +467,65 @@ forAllAllowed (LimitedRank forall_ok _) = forall_ok forAllAllowed _                         = False -constraintsAllowed :: UserTypeCtxt -> Bool--- We don't allow constraints in kinds-constraintsAllowed (TyVarBndrKindCtxt {}) = False-constraintsAllowed (DataKindCtxt {})      = False-constraintsAllowed (TySynKindCtxt {})     = False-constraintsAllowed (TyFamResKindCtxt {})  = False-constraintsAllowed _ = True+allConstraintsAllowed :: UserTypeCtxt -> Bool+-- We don't allow arbitrary constraints in kinds+allConstraintsAllowed (TyVarBndrKindCtxt {}) = False+allConstraintsAllowed (DataKindCtxt {})      = False+allConstraintsAllowed (TySynKindCtxt {})     = False+allConstraintsAllowed (TyFamResKindCtxt {})  = False+allConstraintsAllowed (StandaloneKindSigCtxt {}) = False+allConstraintsAllowed _ = True +-- | Returns 'True' if the supplied 'UserTypeCtxt' is unambiguously not the+-- context for the type of a term, where visible, dependent quantification is+-- currently disallowed.+--+-- An example of something that is unambiguously the type of a term is the+-- @forall a -> a -> a@ in @foo :: forall a -> a -> a@. On the other hand, the+-- same type in @type family Foo :: forall a -> a -> a@ is unambiguously the+-- kind of a type, not the type of a term, so it is permitted.+--+-- For more examples, see+-- @testsuite/tests/dependent/should_compile/T16326_Compile*.hs@ (for places+-- where VDQ is permitted) and+-- @testsuite/tests/dependent/should_fail/T16326_Fail*.hs@ (for places where+-- VDQ is disallowed).+vdqAllowed :: UserTypeCtxt -> Bool+-- Currently allowed in the kinds of types...+vdqAllowed (KindSigCtxt {}) = True+vdqAllowed (StandaloneKindSigCtxt {}) = True+vdqAllowed (TySynCtxt {}) = True+vdqAllowed (ThBrackCtxt {}) = True+vdqAllowed (GhciCtxt {}) = True+vdqAllowed (TyVarBndrKindCtxt {}) = True+vdqAllowed (DataKindCtxt {}) = True+vdqAllowed (TySynKindCtxt {}) = True+vdqAllowed (TyFamResKindCtxt {}) = True+-- ...but not in the types of terms.+vdqAllowed (ConArgCtxt {}) = False+  -- We could envision allowing VDQ in data constructor types so long as the+  -- constructor is only ever used at the type level, but for now, GHC adopts+  -- the stance that VDQ is never allowed in data constructor types.+vdqAllowed (FunSigCtxt {}) = False+vdqAllowed (InfSigCtxt {}) = False+vdqAllowed (ExprSigCtxt {}) = False+vdqAllowed (TypeAppCtxt {}) = False+vdqAllowed (PatSynCtxt {}) = False+vdqAllowed (PatSigCtxt {}) = False+vdqAllowed (RuleSigCtxt {}) = False+vdqAllowed (ResSigCtxt {}) = False+vdqAllowed (ForSigCtxt {}) = False+vdqAllowed (DefaultDeclCtxt {}) = False+-- We count class constraints as "types of terms". All of the cases below deal+-- with class constraints.+vdqAllowed (InstDeclCtxt {}) = False+vdqAllowed (SpecInstCtxt {}) = False+vdqAllowed (GenSigCtxt {}) = False+vdqAllowed (ClassSCCtxt {}) = False+vdqAllowed (SigmaCtxt {}) = False+vdqAllowed (DataTyCtxt {}) = False+vdqAllowed (DerivClauseCtxt {}) = False+ {- Note [Correctness and performance of type synonym validity checking] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -500,7 +562,7 @@   If we expand `Bar Foo` immediately, we'll miss the fact that the `Foo` type   synonyms is unsaturated. * If one never expands and only checks the arguments, then one can miss-  erroneous programs like the one in Trac #16059:+  erroneous programs like the one in #16059:      type Foo b = Eq b => b     f :: forall b (a :: Foo b). Int@@ -618,16 +680,21 @@ check_type ve@(ValidityEnv{ ve_tidy_env = env, ve_ctxt = ctxt                           , ve_rank = rank, ve_expand = expand }) ty   | not (null tvbs && null theta)-  = do  { traceTc "check_type" (ppr ty $$ ppr (forAllAllowed rank))+  = do  { traceTc "check_type" (ppr ty $$ ppr rank)         ; checkTcM (forAllAllowed rank) (forAllTyErr env rank ty)                 -- Reject e.g. (Maybe (?x::Int => Int)),                 -- with a decent error message -        ; checkTcM (null theta || constraintsAllowed ctxt)-                   (constraintTyErr env ty)+        ; checkConstraintsOK ve theta ty                 -- Reject forall (a :: Eq b => b). blah                 -- In a kind signature we don't allow constraints +        ; checkTcM (all (isInvisibleArgFlag . binderArgFlag) tvbs+                         || vdqAllowed ctxt)+                   (illegalVDQTyErr env ty)+                -- Reject visible, dependent quantification in the type of a+                -- term (e.g., `f :: forall a -> a -> Maybe a`)+         ; check_valid_theta env' SigmaCtxt expand theta                 -- Allow     type T = ?x::Int => Int -> Int                 -- but not   type T = ?x::Int@@ -635,22 +702,13 @@         ; check_type (ve{ve_tidy_env = env'}) tau                 -- Allow foralls to right of arrow -        ; checkTcM (not (any (`elemVarSet` tyCoVarsOfType phi_kind) tvs))-                   (forAllEscapeErr env' ty tau_kind)-        }+        ; checkEscapingKind env' tvbs' theta tau }   where-    (tvbs, phi)  = tcSplitForAllVarBndrs ty-    (theta, tau) = tcSplitPhiTy phi--    tvs          = binderVars tvbs-    (env', _)    = tidyVarBndrs env tvs--    tau_kind              = tcTypeKind tau-    phi_kind | null theta = tau_kind-             | otherwise  = liftedTypeKind-        -- If there are any constraints, the kind is *. (#11405)+    (tvbs, phi)   = tcSplitForAllVarBndrs ty+    (theta, tau)  = tcSplitPhiTy phi+    (env', tvbs') = tidyTyCoVarBinders env tvbs -check_type (ve@ValidityEnv{ve_rank = rank}) (FunTy arg_ty res_ty)+check_type (ve@ValidityEnv{ve_rank = rank}) (FunTy _ arg_ty res_ty)   = do  { check_type (ve{ve_rank = arg_rank}) arg_ty         ; check_type (ve{ve_rank = res_rank}) res_ty }   where@@ -698,11 +756,12 @@      check_args_only, check_expansion_only :: ExpandMode -> TcM ()     check_args_only expand = mapM_ (check_arg expand) tys-    check_expansion_only expand =-      case tcView ty of-         Just ty' -> let syn_tc = fst $ tcRepSplitTyConApp ty-                         err_ctxt = text "In the expansion of type synonym"-                                    <+> quotes (ppr syn_tc)++    check_expansion_only expand+      = ASSERT2( isTypeSynonymTyCon tc, ppr tc )+        case tcView ty of+         Just ty' -> let err_ctxt = text "In the expansion of type synonym"+                                    <+> quotes (ppr tc)                      in addErrCtxt err_ctxt $                         check_type (ve{ve_expand = expand}) ty'          Nothing  -> pprPanic "check_syn_tc_app" (ppr ty)@@ -822,24 +881,82 @@                    MonoType d     -> d                    _              -> Outputable.empty -- Polytype is always illegal -forAllEscapeErr :: TidyEnv -> Type -> Kind -> (TidyEnv, SDoc)-forAllEscapeErr env ty tau_kind+-- | Reject type variables that would escape their escape through a kind.+-- See @Note [Type variables escaping through kinds]@.+checkEscapingKind :: TidyEnv -> [TyVarBinder] -> ThetaType -> Type -> TcM ()+checkEscapingKind env tvbs theta tau =+  case occCheckExpand (binderVars tvbs) phi_kind of+    -- Ensure that none of the tvs occur in the kind of the forall+    -- /after/ expanding type synonyms.+    -- See Note [Phantom type variables in kinds] in Type+    Nothing -> failWithTcM $ forAllEscapeErr env tvbs theta tau tau_kind+    Just _  -> pure ()+  where+    tau_kind              = tcTypeKind tau+    phi_kind | null theta = tau_kind+             | otherwise  = liftedTypeKind+        -- If there are any constraints, the kind is *. (#11405)++forAllEscapeErr :: TidyEnv -> [TyVarBinder] -> ThetaType -> Type -> Kind+                -> (TidyEnv, SDoc)+forAllEscapeErr env tvbs theta tau tau_kind   = ( env-    , hang (vcat [ text "Quantified type's kind mentions quantified type variable"-                 , text "(skolem escape)" ])-         2 (vcat [ text "   type:" <+> ppr_tidy env ty-                 , text "of kind:" <+> ppr_tidy env tau_kind ]) )+    , vcat [ hang (text "Quantified type's kind mentions quantified type variable")+                2 (text "type:" <+> quotes (ppr (mkSigmaTy tvbs theta tau)))+                -- NB: Don't tidy this type since the tvbs were already tidied+                -- previously, and re-tidying them will make the names of type+                -- variables different from tau_kind.+           , hang (text "where the body of the forall has this kind:")+                2 (quotes (ppr_tidy env tau_kind)) ] ) +{-+Note [Type variables escaping through kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider:++  type family T (r :: RuntimeRep) :: TYPE r+  foo :: forall r. T r++Something smells funny about the type of `foo`. If you spell out the kind+explicitly, it becomes clearer from where the smell originates:++  foo :: ((forall r. T r) :: TYPE r)++The type variable `r` appears in the result kind, which escapes the scope of+its binding site! This is not desirable, so we establish a validity check+(`checkEscapingKind`) to catch any type variables that might escape through+kinds in this way.+-}+ ubxArgTyErr :: TidyEnv -> Type -> (TidyEnv, SDoc) ubxArgTyErr env ty   = ( env, vcat [ sep [ text "Illegal unboxed tuple type as function argument:"                       , ppr_tidy env ty ]                 , text "Perhaps you intended to use UnboxedTuples" ] ) +checkConstraintsOK :: ValidityEnv -> ThetaType -> Type -> TcM ()+checkConstraintsOK ve theta ty+  | null theta                         = return ()+  | allConstraintsAllowed (ve_ctxt ve) = return ()+  | otherwise+  = -- We are in a kind, where we allow only equality predicates+    -- See Note [Constraints in kinds] in TyCoRep, and #16263+    checkTcM (all isEqPred theta) $+    constraintTyErr (ve_tidy_env ve) ty+ constraintTyErr :: TidyEnv -> Type -> (TidyEnv, SDoc) constraintTyErr env ty   = (env, text "Illegal constraint in a kind:" <+> ppr_tidy env ty) +-- | Reject a use of visible, dependent quantification in the type of a term.+illegalVDQTyErr :: TidyEnv -> Type -> (TidyEnv, SDoc)+illegalVDQTyErr env ty =+  (env, vcat+  [ hang (text "Illegal visible, dependent quantification" <+>+          text "in the type of a term:")+       2 (ppr_tidy env ty)+  , text "(GHC does not yet support this)" ] )+ {- Note [Liberal type synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -911,7 +1028,7 @@      (e :: (?x::Int) => t) it would be unclear how to discharge all the potential uses of the ?x in e.  For example, a constraint Foo [Int] might come out of e, and-applying the instance decl would show up two uses of ?x.  Trac #8912.+applying the instance decl would show up two uses of ?x.  #8912. -}  checkValidTheta :: UserTypeCtxt -> ThetaType -> TcM ()@@ -951,7 +1068,7 @@  But we record, in 'under_syn', whether we have looked under a synonym to avoid requiring language extensions at the use site.  Main example-(Trac #9838):+(#9838):     {-# LANGUAGE ConstraintKinds #-}    module A where@@ -989,7 +1106,7 @@                 -> PredType -> TcM () check_pred_help under_syn env dflags ctxt pred   | Just pred' <- tcView pred  -- Switch on under_syn when going under a-                                 -- synonym (Trac #9838, yuk)+                                 -- synonym (#9838, yuk)   = check_pred_help True env dflags ctxt pred'    | otherwise  -- A bit like classifyPredType, but not the same@@ -1054,7 +1171,7 @@   = do { -- If it looks like (x t1 t2), require ConstraintKinds          --   see Note [ConstraintKinds in predicates]          -- But (X t1 t2) is always ok because we just require ConstraintKinds-         -- at the definition site (Trac #9838)+         -- at the definition site (#9838)         failIfTcM (not under_syn && not (xopt LangExt.ConstraintKinds dflags)                                 && hasTyVarHead pred)                   (predIrredErr env pred)@@ -1075,7 +1192,7 @@ {- Note [ConstraintKinds in predicates] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Don't check for -XConstraintKinds under a type synonym, because that-was done at the type synonym definition site; see Trac #9838+was done at the type synonym definition site; see #9838 e.g.   module A where           type C a = (Eq a, Ix a)   -- Needs -XConstraintKinds        module B where@@ -1099,8 +1216,8 @@ check_class_pred :: TidyEnv -> DynFlags -> UserTypeCtxt                  -> PredType -> Class -> [TcType] -> TcM () check_class_pred env dflags ctxt pred cls tys-  |  cls `hasKey` heqTyConKey   -- (~) and (~~) are classified as classes,-  || cls `hasKey` eqTyConKey    -- but here we want to treat them as equalities+  |  isEqPredClass cls    -- (~) and (~~) are classified as classes,+                          -- but here we want to treat them as equalities   = -- pprTrace "check_class" (ppr cls) $     check_eq_pred env dflags pred @@ -1157,17 +1274,10 @@     simplifiable_constraint_warn what      = vcat [ hang (text "The constraint" <+> quotes (ppr (tidyType env pred))                     <+> text "matches")-                 2 (ppr_what what)+                 2 (ppr what)             , hang (text "This makes type inference for inner bindings fragile;")                  2 (text "either use MonoLocalBinds, or simplify it using the instance") ] -    ppr_what BuiltinInstance = text "a built-in instance"-    ppr_what LocalInstance   = text "a locally-quantified instance"-    ppr_what (TopLevInstance { iw_dfun_id = dfun })-      = hang (text "instance" <+> pprSigmaType (idType dfun))-           2 (text "--" <+> pprDefinedAt (idName dfun))-- {- Note [Simplifiable given constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A type signature like@@ -1177,7 +1287,7 @@ most part the clever stuff in TcInteract means that we don't use a top-level instance if a local Given might fire, so there is no fragility. But if we /infer/ the type of a local let-binding, things-can go wrong (Trac #11948 is an example, discussed in the Note).+can go wrong (#11948 is an example, discussed in the Note).  So this warning is switched on only if we have NoMonoLocalBinds; in that case the warning discourages users from writing simplifiable@@ -1187,7 +1297,7 @@ matches the top-level instances in only one way, and with no unifiers -- that is, under the same circumstances that TcInteract.matchInstEnv fires an interaction with the top-level instances.  For example (Trac #13526), consider+level instances.  For example (#13526), consider    instance {-# OVERLAPPABLE #-} Eq (T a) where ...   instance                   Eq (T Char) where ..@@ -1221,9 +1331,10 @@ okIPCtxt (DataTyCtxt {})        = True okIPCtxt (PatSynCtxt {})        = True okIPCtxt (TySynCtxt {})         = True   -- e.g.   type Blah = ?x::Int-                                         -- Trac #11466+                                         -- #11466  okIPCtxt (KindSigCtxt {})       = False+okIPCtxt (StandaloneKindSigCtxt {}) = False okIPCtxt (ClassSCCtxt {})       = False okIPCtxt (InstDeclCtxt {})      = False okIPCtxt (SpecInstCtxt {})      = False@@ -1316,7 +1427,7 @@ -- For type-constructor arity errors, be careful to report -- the number of /visible/ arguments required and supplied, -- ignoring the /invisible/ arguments, which the user does not see.--- (e.g. Trac #10516)+-- (e.g. #10516) tyConArityErr tc tks   = arityErr (ppr (tyConFlavour tc)) (tyConName tc)              tc_type_arity tc_type_args@@ -1381,7 +1492,7 @@  That says that any module satisfying M.hsig must provide a KnownNat instance for T.  We absolultely need that instance when compiling a-module that imports M.hsig: see Trac #15379 and+module that imports M.hsig: see #15379 and Note [Fabricating Evidence for Literals in Backpack] in ClsInst.  Hence, checkValidInstHead accepts a user-written instance declaration@@ -1529,7 +1640,7 @@ tcInstHeadTyAppAllTyVars ty   | Just (tc, tys) <- tcSplitTyConApp_maybe (dropCasts ty)   = ok (filterOutInvisibleTypes tc tys)  -- avoid kinds-  | LitTy _ <- ty = True  -- accept type literals (Trac #13833)+  | LitTy _ <- ty = True  -- accept type literals (#13833)   | otherwise   = False   where@@ -1544,12 +1655,12 @@ -- This function can turn a well-kinded type into an ill-kinded -- one, so I've kept it local to this module -- To consider: drop only HoleCo casts-dropCasts (CastTy ty _)     = dropCasts ty-dropCasts (AppTy t1 t2)     = mkAppTy (dropCasts t1) (dropCasts t2)-dropCasts (FunTy t1 t2)     = mkFunTy (dropCasts t1) (dropCasts t2)-dropCasts (TyConApp tc tys) = mkTyConApp tc (map dropCasts tys)-dropCasts (ForAllTy b ty)   = ForAllTy (dropCastsB b) (dropCasts ty)-dropCasts ty                = ty  -- LitTy, TyVarTy, CoercionTy+dropCasts (CastTy ty _)       = dropCasts ty+dropCasts (AppTy t1 t2)       = mkAppTy (dropCasts t1) (dropCasts t2)+dropCasts ty@(FunTy _ t1 t2)  = ty { ft_arg = dropCasts t1, ft_res = dropCasts t2 }+dropCasts (TyConApp tc tys)   = mkTyConApp tc (map dropCasts tys)+dropCasts (ForAllTy b ty)     = ForAllTy (dropCastsB b) (dropCasts ty)+dropCasts ty                  = ty  -- LitTy, TyVarTy, CoercionTy  dropCastsB :: TyVarBinder -> TyVarBinder dropCastsB b = b   -- Don't bother in the kind of a forall@@ -1639,7 +1750,7 @@        newtype T (c :: * -> * -> *) a b = MkT (c a b)        instance Category c => Category (T c) where ...     since the first argument to Category is a non-visible *, which sizeTypes-    would count as a constructor! See Trac #11833.+    would count as a constructor! See #11833.    * Also check for a bizarre corner case, when the derived instance decl     would look like@@ -1647,7 +1758,7 @@     Note that 'b' isn't a parameter of T.  This gives rise to all sorts of     problems; in particular, it's hard to compare solutions for equality     when finding the fixpoint, and that means the inferContext loop does-    not converge.  See Trac #5287.+    not converge.  See #5287.  Note [Equality class instances] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1687,7 +1798,7 @@ {- Note [Instances and constraint synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Currently, we don't allow instances for constraint synonyms at all.-Consider these (Trac #13267):+Consider these (#13267):   type C1 a = Show (a -> Bool)   instance C1 Int where    -- I1     show _ = "ur"@@ -1798,13 +1909,13 @@    check :: VarSet -> PredType -> TcM ()    check foralld_tvs pred      = case classifyPredType pred of-         EqPred {}    -> return ()  -- See Trac #4200.+         EqPred {}    -> return ()  -- See #4200.          IrredPred {} -> check2 foralld_tvs pred (sizeType pred)          ClassPred cls tys            | isTerminatingClass cls            -> return () -           | isCTupleClass cls  -- Look inside tuple predicates; Trac #8359+           | isCTupleClass cls  -- Look inside tuple predicates; #8359            -> check_preds foralld_tvs tys             | otherwise          -- Other ClassPreds@@ -1862,7 +1973,7 @@ No: the type family in the instance head might blow up to an arbitrarily large type, depending on how 'a' is instantiated. So we require UndecidableInstances if we have a type family-in the instance head.  Trac #15172.+in the instance head.  #15172.  Note [Invisible arguments and termination] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1875,7 +1986,7 @@  I think both will ensure termination, provided we are consistent. Currently we are /not/ consistent, which is really a bug.  It's-described in Trac #15177, which contains a number of examples.+described in #15177, which contains a number of examples. The suspicious bits are the calls to filterOutInvisibleTypes. -} @@ -1917,17 +2028,19 @@      -- See Note [Verifying injectivity annotation] in FamInstEnv     check_injectivity prev_branches cur_branch       | Injective inj <- injectivity-      = do { let conflicts =+      = do { dflags <- getDynFlags+           ; let conflicts =                      fst $ foldl' (gather_conflicts inj prev_branches cur_branch)                                  ([], 0) prev_branches-           ; mapM_ (\(err, span) -> setSrcSpan span $ addErr err)-                   (makeInjectivityErrors ax cur_branch inj conflicts) }+           ; reportConflictingInjectivityErrs fam_tc conflicts cur_branch+           ; reportInjectivityErrors dflags ax cur_branch inj }       | otherwise       = return ()      gather_conflicts inj prev_branches cur_branch (acc, n) branch                -- n is 0-based index of branch in prev_branches       = case injectiveBranches inj cur_branch branch of+           -- Case 1B2 in Note [Verifying injectivity annotation] in FamInstEnv           InjectivityUnified ax1 ax2             | ax1 `isDominatedBy` (replace_br prev_branches n ax2)                 -> (acc, n + 1)@@ -1960,15 +2073,28 @@                    -> Type    -- ^ Rhs                    -> TcM () checkValidTyFamEqn fam_tc qvs typats rhs-  = do { checkValidFamPats fam_tc qvs typats rhs+  = do { checkValidTypePats fam_tc typats +         -- Check for things used on the right but not bound on the left+       ; checkFamPatBinders fam_tc qvs typats rhs++         -- Check for oversaturated visible kind arguments in a type family+         -- equation.+         -- See Note [Oversaturated type family equations]+       ; when (isTypeFamilyTyCon fam_tc) $+           case drop (tyConArity fam_tc) typats of+             [] -> pure ()+             spec_arg:_ ->+               addErr $ text "Illegal oversaturated visible kind argument:"+                    <+> quotes (char '@' <> pprParendType spec_arg)+          -- The argument patterns, and RHS, are all boxed tau types          -- E.g  Reject type family F (a :: k1) :: k2          --             type instance F (forall a. a->a) = ...          --             type instance F Int#             = ...          --             type instance F Int              = forall a. a->a          --             type instance F Int              = Int#-         -- See Trac #9357+         -- See #9357        ; checkValidMonoType rhs           -- We have a decidable instance unless otherwise permitted@@ -2005,23 +2131,6 @@                        --   [a,b,a,a] \\ [a,a] = [b,a]                        -- So we are counting repetitions -checkValidFamPats :: TyCon -> [Var]-                  -> [Type]   -- ^ patterns-                  -> Type     -- ^ RHS-                  -> TcM ()--- Patterns in a 'type instance' or 'data instance' decl should--- a) Shoule contain no type family applications---    (vanilla synonyms are fine, though)--- b) For associated types, are consistently instantiated-checkValidFamPats fam_tc qvs pats rhs-  = do { checkValidTypePats fam_tc pats--         -- Check for things used on the right but not bound on the left-       ; checkFamPatBinders fam_tc qvs pats rhs--       ; traceTc "checkValidFamPats" (ppr fam_tc <+> ppr pats)-       }- ----------------- checkFamPatBinders :: TyCon                    -> [TcTyVar]   -- Bound on LHS of family instance@@ -2041,42 +2150,43 @@               , text "qtvs:" <+> ppr qtvs               , text "rhs_tvs:" <+> ppr (fvVarSet rhs_fvs)               , text "pat_tvs:" <+> ppr pat_tvs-              , text "exact_pat_tvs:" <+> ppr exact_pat_tvs ]+              , text "inj_pat_tvs:" <+> ppr inj_pat_tvs ]           -- Check for implicitly-bound tyvars, mentioned on the          -- RHS but not bound on the LHS          --    data T            = MkT (forall (a::k). blah)          --    data family D Int = MkD (forall (a::k). blah)          -- In both cases, 'k' is not bound on the LHS, but is used on the RHS-         -- We catch the former in kcLHsQTyVars, and the latter right here+         -- We catch the former in kcDeclHeader, and the latter right here+         -- See Note [Check type-family instance binders]        ; check_tvs bad_rhs_tvs (text "mentioned in the RHS")                                (text "bound on the LHS of")           -- Check for explicitly forall'd variable that is not bound on LHS          --    data instance forall a.  T Int = MkT Int          -- See Note [Unused explicitly bound variables in a family pattern]+         -- See Note [Check type-family instance binders]        ; check_tvs bad_qtvs (text "bound by a forall")                             (text "used in")--         -- Check for oversaturated visible kind arguments in a type family-         -- equation.-         -- See Note [Oversaturated type family equations]-       ; when (isTypeFamilyTyCon fam_tc) $-           case drop (tyConArity fam_tc) pats of-             [] -> pure ()-             spec_arg:_ ->-               addErr $ text "Illegal oversaturated visible kind argument:"-                    <+> quotes (char '@' <> pprParendType spec_arg) }+       }   where-    pat_tvs       = tyCoVarsOfTypes pats-    exact_pat_tvs = exactTyCoVarsOfTypes pats-    rhs_fvs       = tyCoFVsOfType rhs-    used_tvs      = pat_tvs `unionVarSet` fvVarSet rhs_fvs-    bad_qtvs      = filterOut (`elemVarSet` used_tvs) qtvs-                    -- Bound but not used at all-    bad_rhs_tvs   = filterOut (`elemVarSet` exact_pat_tvs) (fvVarList rhs_fvs)-                    -- Used on RHS but not bound on LHS-    dodgy_tvs     = pat_tvs `minusVarSet` exact_pat_tvs+    pat_tvs     = tyCoVarsOfTypes pats+    inj_pat_tvs = fvVarSet $ injectiveVarsOfTypes False pats+      -- The type variables that are in injective positions.+      -- See Note [Dodgy binding sites in type family instances]+      -- NB: The False above is irrelevant, as we never have type families in+      -- patterns.+      --+      -- NB: It's OK to use the nondeterministic `fvVarSet` function here,+      -- since the order of `inj_pat_tvs` is never revealed in an error+      -- message.+    rhs_fvs     = tyCoFVsOfType rhs+    used_tvs    = pat_tvs `unionVarSet` fvVarSet rhs_fvs+    bad_qtvs    = filterOut (`elemVarSet` used_tvs) qtvs+                  -- Bound but not used at all+    bad_rhs_tvs = filterOut (`elemVarSet` inj_pat_tvs) (fvVarList rhs_fvs)+                  -- Used on RHS but not bound on LHS+    dodgy_tvs   = pat_tvs `minusVarSet` inj_pat_tvs      check_tvs tvs what what2       = unless (null tvs) $ addErrAt (getSrcSpan (head tvs)) $@@ -2085,7 +2195,7 @@            2 (vcat [ text "but not" <+> what2 <+> text "the family instance"                    , mk_extra tvs ]) -    -- mk_extra: Trac #7536: give a decent error message for+    -- mk_extra: #7536: give a decent error message for     --         type T a = Int     --         type instance F (T a) = a     mk_extra tvs = ppWhen (any (`elemVarSet` dodgy_tvs) tvs) $@@ -2093,21 +2203,26 @@                       2 (pprTypeApp fam_tc (map expandTypeSynonyms pats))  --- | Checks for occurrences of type families in class instances and type/data--- family instances.+-- | Checks that a list of type patterns is valid in a matching (LHS)+-- position of a class instances or type/data family instance.+--+-- Specifically:+--    * All monotypes+--    * No type-family applications checkValidTypePats :: TyCon -> [Type] -> TcM ()-checkValidTypePats tc pat_ty_args = do-  -- Check that each of pat_ty_args is a monotype.-  -- One could imagine generalising to allow-  --      instance C (forall a. a->a)-  -- but we don't know what all the consequences might be.-  traverse_ checkValidMonoType pat_ty_args+checkValidTypePats tc pat_ty_args+  = do { -- Check that each of pat_ty_args is a monotype.+         -- One could imagine generalising to allow+         --      instance C (forall a. a->a)+         -- but we don't know what all the consequences might be.+         traverse_ checkValidMonoType pat_ty_args -  -- Ensure that no type family instances occur a type pattern-  case tcTyConAppTyFamInstsAndVis tc pat_ty_args of-    [] -> pure ()-    ((tf_is_invis_arg, tf_tc, tf_args):_) -> failWithTc $-      ty_fam_inst_illegal_err tf_is_invis_arg (mkTyConApp tf_tc tf_args)+       -- Ensure that no type family applications occur a type pattern+       ; case tcTyConAppTyFamInstsAndVis tc pat_ty_args of+            [] -> pure ()+            ((tf_is_invis_arg, tf_tc, tf_args):_) -> failWithTc $+               ty_fam_inst_illegal_err tf_is_invis_arg+                                       (mkTyConApp tf_tc tf_args) }   where     inst_ty = mkTyConApp tc pat_ty_args @@ -2221,10 +2336,92 @@                | otherwise                   = BindMe  -{- Note [Matching in the consistent-instantation check]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Check type-family instance binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In a type family instance, we require (of course), type variables+used on the RHS are matched on the LHS. This is checked by+checkFamPatBinders.  Here is an interesting example:++    type family   T :: k+    type instance T = (Nothing :: Maybe a)++Upon a cursory glance, it may appear that the kind variable `a` is unbound+since there are no (visible) LHS patterns in `T`. However, there is an+*invisible* pattern due to the return kind, so inside of GHC, the instance+looks closer to this:++    type family T @k :: k+    type instance T @(Maybe a) = (Nothing :: Maybe a)++Here, we can see that `a` really is bound by a LHS type pattern, so `a` is in+fact not unbound. Contrast that with this example (#13985)++    type instance T = Proxy (Nothing :: Maybe a)++This would looks like this inside of GHC:++    type instance T @(*) = Proxy (Nothing :: Maybe a)++So this time, `a` is neither bound by a visible nor invisible type pattern on+the LHS, so `a` would be reported as not in scope.++Finally, here's one more brain-teaser (from #9574). In the example below:++    class Funct f where+      type Codomain f :: *+    instance Funct ('KProxy :: KProxy o) where+      type Codomain 'KProxy = NatTr (Proxy :: o -> *)++As it turns out, `o` is in scope in this example. That is because `o` is+bound by the kind signature of the LHS type pattern 'KProxy. To make this more+obvious, one can also write the instance like so:++    instance Funct ('KProxy :: KProxy o) where+      type Codomain ('KProxy :: KProxy o) = NatTr (Proxy :: o -> *)++Note [Dodgy binding sites in type family instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the following example (from #7536):++  type T a = Int+  type instance F (T a) = a++This `F` instance is extremely fishy, since the RHS, `a`, purports to be+"bound" by the LHS pattern `T a`. "Bound" has scare quotes around it because+`T a` expands to `Int`, which doesn't mention at all, so it's as if one had+actually written:++  type instance F Int = a++That is clearly bogus, so to reject this, we check that every type variable+that is mentioned on the RHS is /actually/ bound on the LHS. In other words,+we need to do something slightly more sophisticated that just compute the free+variables of the LHS patterns.++It's tempting to just expand all type synonyms on the LHS and then compute+their free variables, but even that isn't sophisticated enough. After all,+an impish user could write the following (#17008):++  type family ConstType (a :: Type) :: Type where+    ConstType _ = Type++  type family F (x :: ConstType a) :: Type where+    F (x :: ConstType a) = a++Just like in the previous example, the `a` on the RHS isn't actually bound+on the LHS, but this time a type family is responsible for the deception, not+a type synonym.++We avoid both issues by requiring that all RHS type variables are mentioned+in injective positions on the left-hand side (by way of+`injectiveVarsOfTypes`). For instance, the `a` in `T a` is not in an injective+position, as `T` is not an injective type constructor, so we do not count that.+Similarly for the `a` in `ConstType a`.++Note [Matching in the consistent-instantation check]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Matching the class-instance header to family-instance tyvars is-tricker than it sounds.  Consider (Trac #13972)+tricker than it sounds.  Consider (#13972)     class C (a :: k) where       type T k :: Type     instance C Left where@@ -2239,7 +2436,7 @@ We track the lexically-scoped type variables from the class-instance header in ai_tyvars. -Here's another example (Trac #14045a)+Here's another example (#14045a)     class C (a :: k) where       data S (a :: k)     instance C (z :: Bool) where@@ -2257,7 +2454,7 @@  Note [Checking consistent instantiation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See Trac #11450 for background discussion on this check.+See #11450 for background discussion on this check.    class C a b where     type T a x b@@ -2279,7 +2476,7 @@     instance C [p] Int       type T [q] y Int = ...   But from GHC 8.2 onwards, we don't.  It's much simpler this way.-  See Trac #11450.+  See #11450.  * When the class variable isn't used on the RHS of the type instance,   it's tempting to allow wildcards, thus@@ -2326,7 +2523,7 @@       CAux (Either x y) = x -> y    We decided that this restriction wasn't buying us much, so we opted not-  to pursue that design (see also GHC Trac #13398).+  to pursue that design (see also GHC #13398).  Implementation   * Form the mini-envt from the class type variables a,b@@ -2474,8 +2671,8 @@ *                                                                      * ************************************************************************ -Note [Bad telescopes]-~~~~~~~~~~~~~~~~~~~~~+Note [Bad TyCon telescopes]+~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now that we can mix type and kind variables, there are an awful lot of ways to shoot yourself in the foot. Here are some. @@ -2493,54 +2690,93 @@ a nice rule that all implicitly bound variables come before others, this is bogus. -To catch these errors, we call checkValidTelescope during kind-checking-datatype declarations. See also-Note [Required, Specified, and Inferred for types] in TcTyClsDecls.+To catch these errors, we call checkTyConTelescope during kind-checking+datatype declarations.  This checks for -Note [Keeping scoped variables in order: Explicit] discusses how this-check works for `forall x y z.` written in a type.+* Ill-scoped binders. From (1) and (2) above we can get putative+  kinds like+       T1 :: forall (a:k) (k:*) (b:k). SameKind a b -> *+  where 'k' is mentioned a's kind before k is bound +  This is easy to check for: just look for+  out-of-scope variables in the kind++* We should arguably also check for ambiguous binders+  but we don't.  See Note [Ambiguous kind vars].++See also+  * Note [Required, Specified, and Inferred for types] in TcTyClsDecls.+  * Note [Keeping scoped variables in order: Explicit] discusses how+    this check works for `forall x y z.` written in a type.++Note [Ambiguous kind vars]+~~~~~~~~~~~~~~~~~~~~~~~~~~+We used to be concerned about ambiguous binders. Suppose we have the kind+     S1 :: forall k -> * -> *+     S2 :: forall k. * -> *+Here S1 is OK, because k is Required, and at a use of S1 we will+see (S1 *) or (S1 (*->*)) or whatever.++But S2 is /not/ OK because 'k' is Specfied (and hence invisible) and+we have no way (ever) to figure out how 'k' should be instantiated.+For example if we see (S2 Int), that tells us nothing about k's+instantiation.  (In this case we'll instantiate it to Any, but that+seems wrong.)  This is really the same test as we make for ambiguous+type in term type signatures.++Now, it's impossible for a Specified variable not to occur+at all in the kind -- after all, it is Specified so it must have+occurred.  (It /used/ to be possible; see tests T13983 and T7873.  But+with the advent of the forall-or-nothing rule for kind variables,+those strange cases went away.)++But one might worry about+    type v k = *+    S3 :: forall k. V k -> *+which appears to mention 'k' but doesn't really.  Or+    S4 :: forall k. F k -> *+where F is a type function.  But we simply don't check for+those cases of ambiguity, yet anyway.  The worst that can happen+is ambiguity at the call sites.++Historical note: this test used to be called reportFloatingKvs. -}  -- | Check a list of binders to see if they make a valid telescope.--- The key property we're checking for is scoping. For example:--- > data SameKind :: k -> k -> *--- > data X a k (b :: k) (c :: SameKind a b)--- Kind inference says that a's kind should be k. But that's impossible,--- because k isn't in scope when a is bound. This check has to come before--- general validity checking, because once we kind-generalise, this sort--- of problem is harder to spot (as we'll generalise over the unbound--- k in a's type.)------ See Note [Generalisation for type constructors] in TcTyClsDecls for---     data type declarations--- and Note [Keeping scoped variables in order: Explicit] in TcHsType---     for foralls-checkValidTelescope :: TyCon -> TcM ()-checkValidTelescope tc-  = unless (null bad_tcbs) $ addErr $+-- See Note [Bad TyCon telescopes]+type TelescopeAcc+      = ( TyVarSet   -- Bound earlier in the telescope+        , Bool       -- At least one binder occurred (in a kind) before+                     -- it was bound in the telescope.  E.g.+        )            --    T :: forall (a::k) k. blah++checkTyConTelescope :: TyCon -> TcM ()+checkTyConTelescope tc+  | bad_scope+  = -- See "Ill-scoped binders" in Note [Bad TyCon telescopes]+    addErr $     vcat [ hang (text "The kind of" <+> quotes (ppr tc) <+> text "is ill-scoped")-              2 (text "Inferred kind:" <+> ppr tc <+> dcolon <+> ppr_untidy (tyConKind tc))+              2 pp_tc_kind          , extra          , hang (text "Perhaps try this order instead:")-              2 (pprTyVars sorted_tidied_tvs) ]+              2 (pprTyVars sorted_tvs) ]++  | otherwise+  = return ()   where-    ppr_untidy ty = pprIfaceType (toIfaceType ty)     tcbs = tyConBinders tc-    tvs = binderVars tcbs-    (_, sorted_tidied_tvs) = tidyVarBndrs emptyTidyEnv (scopedSort tvs)+    tvs  = binderVars tcbs+    sorted_tvs = scopedSort tvs -    (_, bad_tcbs) = foldl add_one (mkVarSet tvs, []) tcbs+    (_, bad_scope) = foldl add_one (emptyVarSet, False) tcbs -    add_one :: (TyVarSet, [TyConBinder])-            -> TyConBinder -> (TyVarSet, [TyConBinder])-    add_one (bad_bndrs, acc) tvb-      | fkvs `intersectsVarSet` bad_bndrs = (bad', tvb : acc)-      | otherwise                         = (bad', acc)+    add_one :: TelescopeAcc -> TyConBinder -> TelescopeAcc+    add_one (bound, bad_scope) tcb+      = ( bound `extendVarSet` tv+        , bad_scope || not (isEmptyVarSet (fkvs `minusVarSet` bound)) )       where-        tv = binderVar tvb+        tv = binderVar tcb         fkvs = tyCoVarsOfType (tyVarKind tv)-        bad' = bad_bndrs `delVarSet` tv      inferred_tvs  = [ binderVar tcb                     | tcb <- tcbs, Inferred == tyConBinderArgFlag tcb ]@@ -2550,6 +2786,14 @@     pp_inf  = parens (text "namely:" <+> pprTyVars inferred_tvs)     pp_spec = parens (text "namely:" <+> pprTyVars specified_tvs) +    pp_tc_kind = text "Inferred kind:" <+> ppr tc <+> dcolon <+> ppr_untidy (tyConKind tc)+    ppr_untidy ty = pprIfaceType (toIfaceType ty)+      -- We need ppr_untidy here because pprType will tidy the type, which+      -- will turn the bogus kind we are trying to report+      --     T :: forall (a::k) k (b::k) -> blah+      -- into a misleadingly sanitised version+      --     T :: forall (a::k) k1 (b::k1) -> blah+     extra       | null inferred_tvs && null specified_tvs       = empty@@ -2580,7 +2824,7 @@ fvType (TyConApp _ tys)      = fvTypes tys fvType (LitTy {})            = [] fvType (AppTy fun arg)       = fvType fun ++ fvType arg-fvType (FunTy arg res)       = fvType arg ++ fvType res+fvType (FunTy _ arg res)     = fvType arg ++ fvType res fvType (ForAllTy (Bndr tv _) ty)   = fvType (tyVarKind tv) ++     filter (/= tv) (fvType ty)@@ -2597,7 +2841,7 @@ sizeType (TyConApp tc tys) = 1 + sizeTyConAppArgs tc tys sizeType (LitTy {})        = 1 sizeType (AppTy fun arg)   = sizeType fun + sizeType arg-sizeType (FunTy arg res)   = sizeType arg + sizeType res + 1+sizeType (FunTy _ arg res) = sizeType arg + sizeType res + 1 sizeType (ForAllTy _ ty)   = sizeType ty sizeType (CastTy ty _)     = sizeType ty sizeType (CoercionTy _)    = 0@@ -2614,7 +2858,7 @@ -- We are considering whether class constraints terminate. -- Equality constraints and constraints for the implicit -- parameter class always terminate so it is safe to say "size 0".--- See Trac #4200.+-- See #4200. sizePred :: PredType -> Int sizePred ty = goClass ty   where@@ -2636,10 +2880,9 @@   = isIPClass cls    -- Implicit parameter constraints always terminate because                      -- there are no instances for them --- they are only solved                      -- by "local instances" in expressions+    || isEqPredClass cls     || cls `hasKey` typeableClassKey     || cls `hasKey` coercibleTyConKey-    || cls `hasKey` eqTyConKey-    || cls `hasKey` heqTyConKey  -- | Tidy before printing a type ppr_tidy :: TidyEnv -> Type -> SDoc
types/Class.hs view
@@ -26,7 +26,8 @@ import GhcPrelude  import {-# SOURCE #-} TyCon     ( TyCon )-import {-# SOURCE #-} TyCoRep   ( Type, PredType, pprType )+import {-# SOURCE #-} TyCoRep   ( Type, PredType )+import {-# SOURCE #-} TyCoPpr   ( pprType ) import Var import Name import BasicTypes
types/CoAxiom.hs view
@@ -31,7 +31,8 @@  import GhcPrelude -import {-# SOURCE #-} TyCoRep ( Type, pprType )+import {-# SOURCE #-} TyCoRep ( Type )+import {-# SOURCE #-} TyCoPpr ( pprType ) import {-# SOURCE #-} TyCon ( TyCon ) import Outputable import FastString@@ -231,7 +232,6 @@                                     -- in TcTyClsDecls     , cab_roles    :: [Role]        -- See Note [CoAxBranch roles]     , cab_lhs      :: [Type]        -- Type patterns to match against-                                    -- See Note [CoAxiom saturation]     , cab_rhs      :: Type          -- Right-hand side of the equality     , cab_incomps  :: [CoAxBranch]  -- The previous incompatible branches                                     -- See Note [Storing compatibility]@@ -310,10 +310,7 @@ placeHolderIncomps :: [CoAxBranch] placeHolderIncomps = panic "placeHolderIncomps" -{- Note [CoAxiom saturation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* When co-+{- Note [CoAxBranch type variables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the case of a CoAxBranch of an associated type-family instance,
types/Coercion.hs view
@@ -37,11 +37,13 @@         mkPhantomCo,         mkUnsafeCo, mkHoleCo, mkUnivCo, mkSubCo,         mkAxiomInstCo, mkProofIrrelCo,-        downgradeRole, maybeSubCo, mkAxiomRuleCo,+        downgradeRole, mkAxiomRuleCo,         mkGReflRightCo, mkGReflLeftCo, mkCoherenceLeftCo, mkCoherenceRightCo,         mkKindCo, castCoercionKind, castCoercionKindI,          mkHeteroCoercionType,+        mkPrimEqPred, mkReprPrimEqPred, mkPrimEqPredRole,+        mkHeteroPrimEqPred, mkHeteroReprPrimEqPred,          -- ** Decomposition         instNewTyCon_maybe,@@ -62,7 +64,7 @@         pickLR,          isGReflCo, isReflCo, isReflCo_maybe, isGReflCo_maybe, isReflexiveCo, isReflexiveCo_maybe,-        isReflCoVar_maybe,+        isReflCoVar_maybe, isGReflMCo, coToMCo,          -- ** Coercion variables         mkCoVar, isCoVar, coVarName, setCoVarName, setCoVarUnique,@@ -120,6 +122,10 @@  import IfaceType import TyCoRep+import TyCoFVs+import TyCoPpr+import TyCoSubst+import TyCoTidy import Type import TyCon import CoAxiom@@ -134,7 +140,7 @@ import Pair import SrcLoc import PrelNames-import TysPrim          ( eqPhantPrimTyCon )+import TysPrim import ListSetOps import Maybes import UniqFM@@ -196,7 +202,7 @@        2 (vcat (map (pprCoAxBranchUser tc) (fromBranches branches)))  pprCoAxBranchUser :: TyCon -> CoAxBranch -> SDoc--- Used when printing injectivity errors (FamInst.makeInjectivityErrors)+-- Used when printing injectivity errors (FamInst.reportInjectivityErrors) -- and inaccessible branches (TcValidity.inaccessibleCoAxBranch) -- This happens in error messages: don't print the RHS of a data --   family axiom, which is meaningless to a user@@ -209,7 +215,7 @@ --   a conflict between equations (FamInst.conflictInstErr) -- For type families the RHS is important; for data families not so. --   Indeed for data families the RHS is a mysterious internal---   type constructor, so we suppress it (Trac #14179)+--   type constructor, so we suppress it (#14179) -- See FamInstEnv Note [Family instance overlap conflicts] pprCoAxBranchLHS = ppr_co_ax_branch pp_rhs   where@@ -342,7 +348,7 @@   where co :: (forall a. ty) ~ (ty1 -> ty2)   Here 'co' is insoluble, but we don't want to crash in decoposePiCos.   So decomposePiCos carefully tests both sides of the coercion to check-  they are both foralls or both arrows.  Not doing this caused Trac #15343.+  they are both foralls or both arrows.  Not doing this caused #15343. -}  decomposePiCos :: HasDebugCallStack@@ -430,7 +436,7 @@   , Just (args', arg') <- snocView args   = Just ( mkTyConAppCo r tc args', arg' ) -  | mightBeUnsaturatedTyCon tc+  | not (mustBeSaturated tc)     -- Never create unsaturated type family apps!   , Just (args', arg') <- snocView args   , Just arg'' <- setNominalRole_maybe (nthRole r tc (length args')) arg'@@ -502,22 +508,6 @@            Just tc0 -> tc0            Nothing  -> pprPanic "coVarRole: not tyconapp" (ppr cv) --- | Makes a coercion type from two types: the types whose equality--- is proven by the relevant 'Coercion'-mkCoercionType :: Role -> Type -> Type -> Type-mkCoercionType Nominal          = mkPrimEqPred-mkCoercionType Representational = mkReprPrimEqPred-mkCoercionType Phantom          = \ty1 ty2 ->-  let ki1 = typeKind ty1-      ki2 = typeKind ty2-  in-  TyConApp eqPhantPrimTyCon [ki1, ki2, ty1, ty2]--mkHeteroCoercionType :: Role -> Kind -> Kind -> Type -> Type -> Type-mkHeteroCoercionType Nominal          = mkHeteroPrimEqPred-mkHeteroCoercionType Representational = mkHeteroReprPrimEqPred-mkHeteroCoercionType Phantom          = panic "mkHeteroCoercionType"- -- | Given a coercion @co1 :: (a :: TYPE r1) ~ (b :: TYPE r2)@, -- produce a coercion @rep_co :: r1 ~ r2@. mkRuntimeRepCo :: HasDebugCallStack => Coercion -> Coercion@@ -592,6 +582,11 @@   = Nothing   where (Pair ty1 ty2, r) = coercionKindRole co +coToMCo :: Coercion -> MCoercion+coToMCo c = if isReflCo c+  then MRefl+  else MCo c+ {- %************************************************************************ %*                                                                      *@@ -702,7 +697,7 @@     -- See Note [Refl invariant]   | Just (ty1, _) <- isReflCo_maybe co1   , Just (ty2, _) <- isReflCo_maybe co2-  = mkReflCo r (mkFunTy ty1 ty2)+  = mkReflCo r (mkVisFunTy ty1 ty2)   | otherwise = FunCo r co1 co2  -- | Apply a 'Coercion' to another 'Coercion'.@@ -718,7 +713,7 @@    | Just (ty1, r) <- isReflCo_maybe co   , Just (tc, tys) <- splitTyConApp_maybe ty1-    -- Expand type synonyms; a TyConAppCo can't have a type synonym (Trac #9102)+    -- Expand type synonyms; a TyConAppCo can't have a type synonym (#9102)   = mkTyConAppCo r tc (zip_roles (tyConRolesX r tc) tys)   where     zip_roles (r1:_)  []            = [downgradeRole r1 Nominal arg]@@ -1223,13 +1218,6 @@       Just co' -> co'       Nothing  -> pprPanic "downgradeRole" (ppr co) --- | If the EqRel is ReprEq, makes a SubCo; otherwise, does nothing.--- Note that the input coercion should always be nominal.-maybeSubCo :: EqRel -> Coercion -> Coercion-maybeSubCo NomEq  = id-maybeSubCo ReprEq = mkSubCo-- mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion mkAxiomRuleCo = AxiomRuleCo @@ -1900,7 +1888,7 @@                              liftCoSubstTyVar lc r tv     go r (AppTy ty1 ty2)   = mkAppCo (go r ty1) (go Nominal ty2)     go r (TyConApp tc tys) = mkTyConAppCo r tc (zipWith go (tyConRolesX r tc) tys)-    go r (FunTy ty1 ty2)   = mkFunCo r (go r ty1) (go r ty2)+    go r (FunTy _ ty1 ty2) = mkFunCo r (go r ty1) (go r ty2)     go r t@(ForAllTy (Bndr v _) ty)        = let (lc', v', h) = liftCoSubstVarBndr lc v              body_co = ty_co_subst lc' r ty in@@ -2196,7 +2184,7 @@        | otherwise                = go_forall empty_subst co        where          empty_subst = mkEmptyTCvSubst (mkInScopeSet $ tyCoVarsOfCo co)-    go (FunCo _ co1 co2)    = mkFunTy <$> go co1 <*> go co2+    go (FunCo _ co1 co2)    = mkVisFunTy <$> go co1 <*> go co2     go (CoVarCo cv)         = coVarTypes cv     go (HoleCo h)           = coVarTypes (coHoleCoVar h)     go (AxiomInstCo ax ind cos)@@ -2292,10 +2280,10 @@ co)...) )`.   We do not want to perform `n` single-type-variable substitutions over the kind of `co`; rather we want to do one substitution which substitutes for all of `a1`, `a2` ... simultaneously.  If we do one-at a time we get the performance hole reported in Trac #11735.+at a time we get the performance hole reported in #11735.  Solution: gather up the type variables for nested `ForAllCos`, and-substitute for them all at once.  Remarkably, for Trac #11735 this single+substitute for them all at once.  Remarkably, for #11735 this single change reduces /total/ compile time by a factor of more than ten.  -}@@ -2334,7 +2322,7 @@ {- Note [Nested InstCos] ~~~~~~~~~~~~~~~~~~~~~-In Trac #5631 we found that 70% of the entire compilation time was+In #5631 we found that 70% of the entire compilation time was being spent in coercionKind!  The reason was that we had    (g @ ty1 @ ty2 .. @ ty100)    -- The "@s" are InstCos where@@ -2342,12 +2330,60 @@ If we deal with the InstCos one at a time, we'll do this:    1.  Find the kind of (g @ ty1 .. @ ty99) : forall a100. phi'    2.  Substitute phi'[ ty100/a100 ], a single tyvar->type subst-But this is a *quadratic* algorithm, and the blew up Trac #5631.+But this is a *quadratic* algorithm, and the blew up #5631. So it's very important to do the substitution simultaneously; cf Type.piResultTys (which in fact we call here).  -} +-- | Makes a coercion type from two types: the types whose equality+-- is proven by the relevant 'Coercion'+mkCoercionType :: Role -> Type -> Type -> Type+mkCoercionType Nominal          = mkPrimEqPred+mkCoercionType Representational = mkReprPrimEqPred+mkCoercionType Phantom          = \ty1 ty2 ->+  let ki1 = typeKind ty1+      ki2 = typeKind ty2+  in+  TyConApp eqPhantPrimTyCon [ki1, ki2, ty1, ty2]++mkHeteroCoercionType :: Role -> Kind -> Kind -> Type -> Type -> Type+mkHeteroCoercionType Nominal          = mkHeteroPrimEqPred+mkHeteroCoercionType Representational = mkHeteroReprPrimEqPred+mkHeteroCoercionType Phantom          = panic "mkHeteroCoercionType"++-- | Creates a primitive type equality predicate.+-- Invariant: the types are not Coercions+mkPrimEqPred :: Type -> Type -> Type+mkPrimEqPred ty1 ty2+  = mkTyConApp eqPrimTyCon [k1, k2, ty1, ty2]+  where+    k1 = typeKind ty1+    k2 = typeKind ty2++-- | Makes a lifted equality predicate at the given role+mkPrimEqPredRole :: Role -> Type -> Type -> PredType+mkPrimEqPredRole Nominal          = mkPrimEqPred+mkPrimEqPredRole Representational = mkReprPrimEqPred+mkPrimEqPredRole Phantom          = panic "mkPrimEqPredRole phantom"++-- | Creates a primite type equality predicate with explicit kinds+mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type+mkHeteroPrimEqPred k1 k2 ty1 ty2 = mkTyConApp eqPrimTyCon [k1, k2, ty1, ty2]++-- | Creates a primitive representational type equality predicate+-- with explicit kinds+mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type+mkHeteroReprPrimEqPred k1 k2 ty1 ty2+  = mkTyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]++mkReprPrimEqPred :: Type -> Type -> Type+mkReprPrimEqPred ty1  ty2+  = mkTyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]+  where+    k1 = typeKind ty1+    k2 = typeKind ty2+ -- | Assuming that two types are the same, ignoring coercions, find -- a nominal coercion between the types. This is useful when optimizing -- transitivity over coercion applications, where splitting two@@ -2374,7 +2410,8 @@                   ; _           -> False      } )         mkNomReflCo ty1 -    go (FunTy arg1 res1) (FunTy arg2 res2)+    go (FunTy { ft_arg = arg1, ft_res = res1 })+       (FunTy { ft_arg = arg2, ft_res = res2 })       = mkFunCo Nominal (go arg1 arg2) (go res1 res2)      go (TyConApp tc1 args1) (TyConApp tc2 args2)@@ -2594,8 +2631,9 @@ 2. Lifting k gives us co1, so the second argument becomes (Proxy |> co |> sym co1).    This is not a dependent argument, so we don't extend the lifting context. -Now we need to deal with argument (3). After flattening, should we tack on a homogenizing-coercion? The way we normally tell is to lift the kind of the binder.+Now we need to deal with argument (3).+The way we normally proceed is to lift the kind of the binder, to see whether+it's dependent. But here, the remainder of the kind of `a` that we're left with after processing two arguments is just `k`. @@ -2702,6 +2740,19 @@  Whew. +Historical note: I (Richard E) once thought that the final part of the kind+had to be a variable k (as in the example above). But it might not be: it could+be an application of a variable. Here is the example:++  let f :: forall (a :: Type) (b :: a -> Type). b (Any @a)+      k :: Type+      x :: k++  flatten (f @Type @((->) k) x)++After instantiating [a |-> Type, b |-> ((->) k)], we see that `b (Any @a)`+is `k -> Any @a`, and thus the third argument of `x :: k` is well-kinded.+ -}  @@ -2742,7 +2793,7 @@     go acc_xis acc_cos lc binders inner_ki _ []       = (reverse acc_xis, reverse acc_cos, kind_co)       where-        final_kind = mkTyCoPiTys binders inner_ki+        final_kind = mkPiTys binders inner_ki         kind_co = liftCoSubst Nominal lc final_kind      go acc_xis acc_cos lc (binder:binders) inner_ki (role:roles) ((xi,co):args)@@ -2776,9 +2827,8 @@        -- See Note [Last case in simplifyArgsWorker]     go acc_xis acc_cos lc [] inner_ki roles args-      | Just k   <- getTyVar_maybe inner_ki-      , Just co1 <- liftCoSubstTyVar lc Nominal k-      = let co1_kind              = coercionKind co1+      = let co1 = liftCoSubst Nominal lc inner_ki+            co1_kind              = coercionKind co1             unflattened_tys       = map (pSnd . coercionKind . snd) args             (arg_cos, res_co)     = decomposePiCos co1 co1_kind unflattened_tys             casted_args           = ASSERT2( equalLength args arg_cos
types/FamInstEnv.hs view
@@ -2,7 +2,8 @@ -- -- FamInstEnv: Type checked family instance declarations -{-# LANGUAGE CPP, GADTs, ScopedTypeVariables, BangPatterns, TupleSections #-}+{-# LANGUAGE CPP, GADTs, ScopedTypeVariables, BangPatterns, TupleSections,+    DeriveFunctor #-}  module FamInstEnv (         FamInst(..), FamFlavor(..), famInstAxiom, famInstTyCon, famInstRHS,@@ -534,12 +535,12 @@ injectiveBranches injectivity                   ax1@(CoAxBranch { cab_lhs = lhs1, cab_rhs = rhs1 })                   ax2@(CoAxBranch { cab_lhs = lhs2, cab_rhs = rhs2 })-  -- See Note [Verifying injectivity annotation]. This function implements first-  -- check described there.+  -- See Note [Verifying injectivity annotation], case 1.   = let getInjArgs  = filterByList injectivity     in case tcUnifyTyWithTFs True rhs1 rhs2 of -- True = two-way pre-unification-       Nothing -> InjectivityAccepted -- RHS are different, so equations are-                                      -- injective.+       Nothing -> InjectivityAccepted+         -- RHS are different, so equations are injective.+         -- This is case 1A from Note [Verifying injectivity annotation]        Just subst -> -- RHS unify under a substitution         let lhs1Subst = Type.substTys subst (getInjArgs lhs1)             lhs2Subst = Type.substTys subst (getInjArgs lhs2)@@ -548,12 +549,14 @@         -- equal under that substitution then this pair of equations violates         -- injectivity annotation, but for closed type families it still might         -- be the case that one LHS after substitution is unreachable.-        in if eqTypes lhs1Subst lhs2Subst+        in if eqTypes lhs1Subst lhs2Subst  -- check case 1B1 from Note.            then InjectivityAccepted            else InjectivityUnified ( ax1 { cab_lhs = Type.substTys subst lhs1                                          , cab_rhs = Type.substTy  subst rhs1 })                                    ( ax2 { cab_lhs = Type.substTys subst lhs2                                          , cab_rhs = Type.substTy  subst rhs2 })+                -- payload of InjectivityUnified used only for check 1B2, only+                -- for closed type families  -- takes a CoAxiom with unknown branch incompatibilities and computes -- the compatibilities@@ -589,7 +592,7 @@ their variables, and tidy them when we build them. For example, we print out axioms and don't want to print stuff like     F k k a b = ...-Instead we must tidy those kind variables.  See Trac #7524.+Instead we must tidy those kind variables.  See #7524.  We could instead tidy when we print, but that makes it harder to get things like injectivity errors to come out right. Danger of@@ -813,11 +816,11 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Injectivity means that the RHS of a type family uniquely determines the LHS (see-Note [Type inference for type families with injectivity]).  User informs about+Note [Type inference for type families with injectivity]).  The user informs us about injectivity using an injectivity annotation and it is GHC's task to verify that-that annotation is correct wrt. to type family equations. Whenever we see a new-equation of a type family we need to make sure that adding this equation to-already known equations of a type family does not violate injectivity annotation+this annotation is correct w.r.t. type family equations. Whenever we see a new+equation of a type family we need to make sure that adding this equation to the+already known equations of a type family does not violate the injectivity annotation supplied by the user (see Note [Injectivity annotation]).  Of course if the type family has no injectivity annotation then no check is required.  But if a type family has injectivity annotation we need to make sure that the following@@ -826,7 +829,7 @@ 1. For each pair of *different* equations of a type family, one of the following    conditions holds: -   A:  RHSs are different.+   A:  RHSs are different. (Check done in FamInstEnv.injectiveBranches)     B1: OPEN TYPE FAMILIES: If the RHSs can be unified under some substitution        then it must be possible to unify the LHSs under the same substitution.@@ -838,7 +841,7 @@         RHSs of these two equations unify under [ a |-> Int ] substitution.        Under this substitution LHSs are equal therefore these equations don't-       violate injectivity annotation.+       violate injectivity annotation. (Check done in FamInstEnv.injectiveBranches)     B2: CLOSED TYPE FAMILIES: If the RHSs can be unified under some        substitution then either the LHSs unify under the same substitution or@@ -855,7 +858,7 @@        of last equation and check whether it is overlapped by any of previous        equations. Since it is overlapped by the first equation we conclude        that pair of last two equations does not violate injectivity-       annotation.+       annotation. (Check done in TcValidity.checkValidCoAxiom#gather_conflicts)     A special case of B is when RHSs unify with an empty substitution ie. they    are identical.@@ -869,7 +872,7 @@    Note that we only take into account these LHS patterns that were declared    as injective. -2. If a RHS of a type family equation is a bare type variable then+2. If an RHS of a type family equation is a bare type variable then    all LHS variables (including implicit kind variables) also have to be bare.    In other words, this has to be a sole equation of that type family and it has    to cover all possible patterns.  So for example this definition will be@@ -880,16 +883,25 @@     If it were accepted we could call `W1 [W1 Int]`, which would reduce to    `W1 Int` and then by injectivity we could conclude that `[W1 Int] ~ Int`,-   which is bogus.+   which is bogus. Checked FamInst.bareTvInRHSViolated. -3. If a RHS of a type family equation is a type family application then the type-   family is rejected as not injective.+3. If the RHS of a type family equation is a type family application then the type+   family is rejected as not injective. This is checked by FamInst.isTFHeaded. -4. If a LHS type variable that is declared as injective is not mentioned on+4. If a LHS type variable that is declared as injective is not mentioned in an    injective position in the RHS then the type family is rejected as not    injective.  "Injective position" means either an argument to a type    constructor or argument to a type family on injective position.+   There are subtleties here. See Note [Coverage condition for injective type families]+   in FamInst. +Check (1) must be done for all family instances (transitively) imported. Other+checks (2-4) should be done just for locally written equations, as they are checks+involving just a single equation, not about interactions. Doing the other checks for+imported equations led to #17405, as the behavior of check (4) depends on+-XUndecidableInstances (see Note [Coverage condition for injective type families] in+FamInst), which may vary between modules.+ See also Note [Injective type families] in TyCon -} @@ -1233,7 +1245,7 @@ Note [Normalisation and type synonyms] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We need to be a bit careful about normalising in the presence of type-synonyms (Trac #13035).  Suppose S is a type synonym, and we have+synonyms (#13035).  Suppose S is a type synonym, and we have    S t1 t2 If S is family-free (on its RHS) we can just normalise t1 and t2 and reconstruct (S t1' t2').   Expanding S could not reveal any new redexes@@ -1241,7 +1253,7 @@  But if S has a type family on its RHS we expand /before/ normalising the args t1, t2.  If we normalise t1, t2 first, we'll re-normalise them-after expansion, and that can lead to /exponential/ behavour; see Trac #13035.+after expansion, and that can lead to /exponential/ behavour; see #13035.  Notice, though, that expanding first can in principle duplicate t1,t2, which might contain redexes. I'm sure you could conjure up an exponential@@ -1399,11 +1411,11 @@      go (AppTy ty1 ty2) = go_app_tys ty1 [ty2] -    go (FunTy ty1 ty2)+    go ty@(FunTy { ft_arg = ty1, ft_res = ty2 })       = do { (co1, nty1) <- go ty1            ; (co2, nty2) <- go ty2            ; r <- getRole-           ; return (mkFunCo r co1 co2, mkFunTy nty1 nty2) }+           ; return (mkFunCo r co1 co2, ty { ft_arg = nty1, ft_res = nty2 }) }     go (ForAllTy (Bndr tcvar vis) ty)       = do { (lc', tv', h, ki') <- normalise_var_bndr tcvar            ; (co, nty)          <- withLC lc' $ normalise_type ty@@ -1498,6 +1510,7 @@ -- a 'LiftingContext', and a 'Role'. newtype NormM a = NormM { runNormM ::                             FamInstEnvs -> LiftingContext -> Role -> a }+    deriving (Functor)  initNormM :: FamInstEnvs -> Role           -> TyCoVarSet   -- the in-scope variables@@ -1528,8 +1541,6 @@                let a = runNormM ma env lc r in                runNormM (fmb a) env lc r -instance Functor NormM where-  fmap = liftM instance Applicative NormM where   pure x = NormM $ \ _ _ _ -> x   (<*>)  = ap@@ -1571,43 +1582,155 @@ case that (F blah blah) can reduce to Double, no matter what (blah) is!  Flattening as done below ensures this. +The algorithm works by building up a TypeMap TyVar, mapping+type family applications to fresh variables. This mapping must+be threaded through all the function calls, as any entry in+the mapping must be propagated to all future nodes in the tree.++The algorithm also must track the set of in-scope variables, in+order to make fresh variables as it flattens. (We are far from a+source of fresh Uniques.) See Wrinkle 2, below.++There are wrinkles, of course:++1. The flattening algorithm must account for the possibility+   of inner `forall`s. (A `forall` seen here can happen only+   because of impredicativity. However, the flattening operation+   is an algorithm in Core, which is impredicative.)+   Suppose we have (forall b. F b) -> (forall b. F b). Of course,+   those two bs are entirely unrelated, and so we should certainly+   not flatten the two calls F b to the same variable. Instead, they+   must be treated separately. We thus carry a substitution that+   freshens variables; we must apply this substitution (in+   `coreFlattenTyFamApp`) before looking up an application in the environment.+   Note that the range of the substitution contains only TyVars, never anything+   else.++   For the sake of efficiency, we only apply this substitution when absolutely+   necessary. Namely:++   * We do not perform the substitution at all if it is empty.+   * We only need to worry about the arguments of a type family that are within+     the arity of said type family, so we can get away with not applying the+     substitution to any oversaturated type family arguments.+   * Importantly, we do /not/ achieve this substitution by recursively+     flattening the arguments, as this would be wrong. Consider `F (G a)`,+     where F and G are type families. We might decide that `F (G a)` flattens+     to `beta`. Later, the substitution is non-empty (but does not map `a`) and+     so we flatten `G a` to `gamma` and try to flatten `F gamma`. Of course,+     `F gamma` is unknown, and so we flatten it to `delta`, but it really+     should have been `beta`! Argh!++     Moral of the story: instead of flattening the arguments, just substitute+     them directly.++2. There are two different reasons we might add a variable+   to the in-scope set as we work:++     A. We have just invented a new flattening variable.+     B. We have entered a `forall`.++   Annoying here is that in-scope variable source (A) must be+   threaded through the calls. For example, consider (F b -> forall c. F c).+   Suppose that, when flattening F b, we invent a fresh variable c.+   Now, when we encounter (forall c. F c), we need to know c is already in+   scope so that we locally rename c to c'. However, if we don't thread through+   the in-scope set from one argument of (->) to the other, we won't know this+   and might get very confused.++   In contrast, source (B) increases only as we go deeper, as in-scope sets+   normally do. However, even here we must be careful. The TypeMap TyVar that+   contains mappings from type family applications to freshened variables will+   be threaded through both sides of (forall b. F b) -> (forall b. F b). We+   thus must make sure that the two `b`s don't get renamed to the same b1. (If+   they did, then looking up `F b1` would yield the same flatten var for+   each.) So, even though `forall`-bound variables should really be in the+   in-scope set only when they are in scope, we retain these variables even+   outside of their scope. This ensures that, if we enounter a fresh+   `forall`-bound b, we will rename it to b2, not b1. Note that keeping a+   larger in-scope set than strictly necessary is always OK, as in-scope sets+   are only ever used to avoid collisions.++   Sadly, the freshening substitution described in (1) really musn't bind+   variables outside of their scope: note that its domain is the *unrenamed*+   variables. This means that the substitution gets "pushed down" (like a+   reader monad) while the in-scope set gets threaded (like a state monad).+   Because a TCvSubst contains its own in-scope set, we don't carry a TCvSubst;+   instead, we just carry a TvSubstEnv down, tying it to the InScopeSet+   traveling separately as necessary.++3. Consider `F ty_1 ... ty_n`, where F is a type family with arity k:++     type family F ty_1 ... ty_k :: res_k++   It's tempting to just flatten `F ty_1 ... ty_n` to `alpha`, where alpha is a+   flattening skolem. But we must instead flatten it to+   `alpha ty_(k+1) ... ty_n`—that is, by only flattening up to the arity of the+   type family.++   Why is this better? Consider the following concrete example from #16995:++     type family Param :: Type -> Type++     type family LookupParam (a :: Type) :: Type where+       LookupParam (f Char) = Bool+       LookupParam x        = Int++     foo :: LookupParam (Param ())+     foo = 42++   In order for `foo` to typecheck, `LookupParam (Param ())` must reduce to+   `Int`. But if we flatten `Param ()` to `alpha`, then GHC can't be sure if+   `alpha` is apart from `f Char`, so it won't fall through to the second+   equation. But since the `Param` type family has arity 0, we can instead+   flatten `Param ()` to `alpha ()`, about which GHC knows with confidence is+   apart from `f Char`, permitting the second equation to be reached.++   Not only does this allow more programs to be accepted, it's also important+   for correctness. Not doing this was the root cause of the Core Lint error+   in #16995.+ flattenTys is defined here because of module dependencies. -} -data FlattenEnv = FlattenEnv { fe_type_map :: TypeMap TyVar-                             , fe_subst    :: TCvSubst }+data FlattenEnv+  = FlattenEnv { fe_type_map :: TypeMap TyVar+                 -- domain: exactly-saturated type family applications+                 -- range: fresh variables+               , fe_in_scope :: InScopeSet }+                 -- See Note [Flattening]  emptyFlattenEnv :: InScopeSet -> FlattenEnv emptyFlattenEnv in_scope   = FlattenEnv { fe_type_map = emptyTypeMap-               , fe_subst    = mkEmptyTCvSubst in_scope }+               , fe_in_scope = in_scope } --- See Note [Flattening]+updateInScopeSet :: FlattenEnv -> (InScopeSet -> InScopeSet) -> FlattenEnv+updateInScopeSet env upd = env { fe_in_scope = upd (fe_in_scope env) }+ flattenTys :: InScopeSet -> [Type] -> [Type]-flattenTys in_scope tys = snd $ coreFlattenTys env tys-  where-    -- when we hit a type function, we replace it with a fresh variable-    -- but, we need to make sure that this fresh variable isn't mentioned-    -- *anywhere* in the types we're flattening, even if locally-bound in-    -- a forall. That way, we can ensure consistency both within and outside-    -- of that forall.-    all_in_scope = in_scope `extendInScopeSetSet` allTyCoVarsInTys tys-    env          = emptyFlattenEnv all_in_scope+-- See Note [Flattening]+-- NB: the returned types may mention fresh type variables,+--     arising from the flattening.  We don't return the+--     mapping from those fresh vars to the ty-fam+--     applications they stand for (we could, but no need)+flattenTys in_scope tys+  = snd $ coreFlattenTys emptyTvSubstEnv (emptyFlattenEnv in_scope) tys -coreFlattenTys :: FlattenEnv -> [Type] -> (FlattenEnv, [Type])-coreFlattenTys = go []-  where-    go rtys env []         = (env, reverse rtys)-    go rtys env (ty : tys)-      = let (env', ty') = coreFlattenTy env ty in-        go (ty' : rtys) env' tys+coreFlattenTys :: TvSubstEnv -> FlattenEnv+               -> [Type] -> (FlattenEnv, [Type])+coreFlattenTys subst = mapAccumL (coreFlattenTy subst) -coreFlattenTy :: FlattenEnv -> Type -> (FlattenEnv, Type)-coreFlattenTy = go+coreFlattenTy :: TvSubstEnv -> FlattenEnv+              -> Type -> (FlattenEnv, Type)+coreFlattenTy subst = go   where     go env ty | Just ty' <- coreView ty = go env ty' -    go env (TyVarTy tv)    = (env, substTyVar (fe_subst env) tv)+    go env (TyVarTy tv)+      | Just ty <- lookupVarEnv subst tv = (env, ty)+      | otherwise                        = let (env', ki) = go env (tyVarKind tv) in+                                           (env', mkTyVarTy $ setTyVarKind tv ki)     go env (AppTy ty1 ty2) = let (env1, ty1') = go env  ty1                                  (env2, ty2') = go env1 ty2 in                              (env2, AppTy ty1' ty2')@@ -1615,134 +1738,90 @@          -- NB: Don't just check if isFamilyTyCon: this catches *data* families,          -- which are generative and thus can be preserved during flattening       | not (isGenerativeTyCon tc Nominal)-      = let (env', tv) = coreFlattenTyFamApp env tc tys in-        (env', mkTyVarTy tv)+      = coreFlattenTyFamApp subst env tc tys        | otherwise-      = let (env', tys') = coreFlattenTys env tys in+      = let (env', tys') = coreFlattenTys subst env tys in         (env', mkTyConApp tc tys') -    go env (FunTy ty1 ty2) = let (env1, ty1') = go env  ty1-                                 (env2, ty2') = go env1 ty2 in-                             (env2, mkFunTy ty1' ty2')+    go env ty@(FunTy { ft_arg = ty1, ft_res = ty2 })+      = let (env1, ty1') = go env  ty1+            (env2, ty2') = go env1 ty2 in+        (env2, ty { ft_arg = ty1', ft_res = ty2' })      go env (ForAllTy (Bndr tv vis) ty)-      = let (env1, tv') = coreFlattenVarBndr env tv-            (env2, ty') = go env1 ty in+      = let (env1, subst', tv') = coreFlattenVarBndr subst env tv+            (env2, ty') = coreFlattenTy subst' env1 ty in         (env2, ForAllTy (Bndr tv' vis) ty')      go env ty@(LitTy {}) = (env, ty) -    go env (CastTy ty co) = let (env1, ty') = go env ty-                                (env2, co') = coreFlattenCo env1 co in-                            (env2, CastTy ty' co')+    go env (CastTy ty co)+      = let (env1, ty') = go env ty+            (env2, co') = coreFlattenCo subst env1 co in+        (env2, CastTy ty' co') -    go env (CoercionTy co) = let (env', co') = coreFlattenCo env co in-                             (env', CoercionTy co')+    go env (CoercionTy co)+      = let (env', co') = coreFlattenCo subst env co in+        (env', CoercionTy co')  -- when flattening, we don't care about the contents of coercions. -- so, just return a fresh variable of the right (flattened) type-coreFlattenCo :: FlattenEnv -> Coercion -> (FlattenEnv, Coercion)-coreFlattenCo env co+coreFlattenCo :: TvSubstEnv -> FlattenEnv+              -> Coercion -> (FlattenEnv, Coercion)+coreFlattenCo subst env co   = (env2, mkCoVarCo covar)   where-    (env1, kind') = coreFlattenTy env (coercionType co)     fresh_name    = mkFlattenFreshCoName-    subst1        = fe_subst env1-    in_scope      = getTCvInScope subst1-    covar         = uniqAway in_scope (mkCoVar fresh_name kind')-    env2          = env1 { fe_subst = subst1 `extendTCvInScope` covar }--coreFlattenVarBndr :: FlattenEnv -> TyCoVar -> (FlattenEnv, TyCoVar)-coreFlattenVarBndr env tv-  | kind' `eqType` kind-  = ( env { fe_subst = extendTCvSubst old_subst tv (mkTyCoVarTy tv) }-             -- override any previous binding for tv-    , tv)+    (env1, kind') = coreFlattenTy subst env (coercionType co)+    covar         = uniqAway (fe_in_scope env1) (mkCoVar fresh_name kind')+    -- Add the covar to the FlattenEnv's in-scope set.+    -- See Note [Flattening], wrinkle 2A.+    env2          = updateInScopeSet env1 (flip extendInScopeSet covar) -  | otherwise-  = let new_tv    = uniqAway (getTCvInScope old_subst) (setVarType tv kind')-        new_subst = extendTCvSubstWithClone old_subst tv new_tv-    in-    (env' { fe_subst = new_subst }, new_tv)+coreFlattenVarBndr :: TvSubstEnv -> FlattenEnv+                   -> TyCoVar -> (FlattenEnv, TvSubstEnv, TyVar)+coreFlattenVarBndr subst env tv+  = (env2, subst', tv')   where+    -- See Note [Flattening], wrinkle 2B.     kind          = varType tv-    (env', kind') = coreFlattenTy env kind-    old_subst     = fe_subst env+    (env1, kind') = coreFlattenTy subst env kind+    tv'           = uniqAway (fe_in_scope env1) (setVarType tv kind')+    subst'        = extendVarEnv subst tv (mkTyVarTy tv')+    env2          = updateInScopeSet env1 (flip extendInScopeSet tv') -coreFlattenTyFamApp :: FlattenEnv+coreFlattenTyFamApp :: TvSubstEnv -> FlattenEnv                     -> TyCon         -- type family tycon-                    -> [Type]        -- args-                    -> (FlattenEnv, TyVar)-coreFlattenTyFamApp env fam_tc fam_args+                    -> [Type]        -- args, already flattened+                    -> (FlattenEnv, Type)+coreFlattenTyFamApp tv_subst env fam_tc fam_args   = case lookupTypeMap type_map fam_ty of-      Just tv -> (env, tv)-              -- we need fresh variables here, but this is called far from-              -- any good source of uniques. So, we just use the fam_tc's unique-              -- and trust uniqAway to avoid clashes. Recall that the in_scope set-              -- contains *all* tyvars, even locally bound ones elsewhere in the-              -- overall type, so this really is fresh.+      Just tv -> (env', mkAppTys (mkTyVarTy tv) leftover_args')       Nothing -> let tyvar_name = mkFlattenFreshTyName fam_tc-                     tv = uniqAway (getTCvInScope subst) $-                          mkTyVar tyvar_name (typeKind fam_ty)-                     env' = env { fe_type_map = extendTypeMap type_map fam_ty tv-                                , fe_subst = extendTCvInScope subst tv }-                 in (env', tv)-  where fam_ty   = mkTyConApp fam_tc fam_args-        FlattenEnv { fe_type_map = type_map-                   , fe_subst = subst } = env---- | Get the set of all type/coercion variables mentioned anywhere in the list--- of types. These variables are not necessarily free.-allTyCoVarsInTys :: [Type] -> VarSet-allTyCoVarsInTys []       = emptyVarSet-allTyCoVarsInTys (ty:tys) = allTyCoVarsInTy ty `unionVarSet` allTyCoVarsInTys tys+                     tv         = uniqAway in_scope $+                                  mkTyVar tyvar_name (typeKind fam_ty) --- | Get the set of all type/coercion variables mentioned anywhere in a type.-allTyCoVarsInTy :: Type -> VarSet-allTyCoVarsInTy = go+                     ty'   = mkAppTys (mkTyVarTy tv) leftover_args'+                     env'' = env' { fe_type_map = extendTypeMap type_map fam_ty tv+                                  , fe_in_scope = extendInScopeSet in_scope tv }+                 in (env'', ty')   where-    go (TyVarTy tv)      = unitVarSet tv-    go (TyConApp _ tys)  = allTyCoVarsInTys tys-    go (AppTy ty1 ty2)   = (go ty1) `unionVarSet` (go ty2)-    go (FunTy ty1 ty2)   = (go ty1) `unionVarSet` (go ty2)-    go (ForAllTy (Bndr tv _) ty) = unitVarSet tv     `unionVarSet`-                                   go (tyVarKind tv) `unionVarSet`-                                   go ty-                                   -- Don't remove the tv from the set!-    go (LitTy {})        = emptyVarSet-    go (CastTy ty co)    = go ty `unionVarSet` go_co co-    go (CoercionTy co)   = go_co co--    go_mco MRefl    = emptyVarSet-    go_mco (MCo co) = go_co co--    go_co (Refl ty)             = go ty-    go_co (GRefl _ ty mco)      = go ty `unionVarSet` go_mco mco-    go_co (TyConAppCo _ _ args) = go_cos args-    go_co (AppCo co arg)        = go_co co `unionVarSet` go_co arg-    go_co (ForAllCo tv h co)-      = unionVarSets [unitVarSet tv, go_co co, go_co h]-    go_co (FunCo _ c1 c2)       = go_co c1 `unionVarSet` go_co c2-    go_co (CoVarCo cv)          = unitVarSet cv-    go_co (HoleCo h)            = unitVarSet (coHoleCoVar h)-    go_co (AxiomInstCo _ _ cos) = go_cos cos-    go_co (UnivCo p _ t1 t2)    = go_prov p `unionVarSet` go t1 `unionVarSet` go t2-    go_co (SymCo co)            = go_co co-    go_co (TransCo c1 c2)       = go_co c1 `unionVarSet` go_co c2-    go_co (NthCo _ _ co)        = go_co co-    go_co (LRCo _ co)           = go_co co-    go_co (InstCo co arg)       = go_co co `unionVarSet` go_co arg-    go_co (KindCo co)           = go_co co-    go_co (SubCo co)            = go_co co-    go_co (AxiomRuleCo _ cs)    = go_cos cs--    go_cos = foldr (unionVarSet . go_co) emptyVarSet--    go_prov UnsafeCoerceProv    = emptyVarSet-    go_prov (PhantomProv co)    = go_co co-    go_prov (ProofIrrelProv co) = go_co co-    go_prov (PluginProv _)      = emptyVarSet+    arity = tyConArity fam_tc+    tcv_subst = TCvSubst (fe_in_scope env) tv_subst emptyVarEnv+    (sat_fam_args, leftover_args) = ASSERT( arity <= length fam_args )+                                    splitAt arity fam_args+    -- Apply the substitution before looking up an application in the+    -- environment. See Note [Flattening], wrinkle 1.+    -- NB: substTys short-cuts the common case when the substitution is empty.+    sat_fam_args' = substTys tcv_subst sat_fam_args+    (env', leftover_args') = coreFlattenTys tv_subst env leftover_args+    -- `fam_tc` may be over-applied to `fam_args` (see Note [Flattening],+    -- wrinkle 3), so we split it into the arguments needed to saturate it+    -- (sat_fam_args') and the rest (leftover_args')+    fam_ty = mkTyConApp fam_tc sat_fam_args'+    FlattenEnv { fe_type_map = type_map+               , fe_in_scope = in_scope } = env'  mkFlattenFreshTyName :: Uniquable a => a -> Name mkFlattenFreshTyName unq
types/InstEnv.hs view
@@ -21,7 +21,7 @@         emptyInstEnv, extendInstEnv,         deleteFromInstEnv, deleteDFunFromInstEnv,         identicalClsInstHead,-        extendInstEnvList, lookupUniqueInstEnv, lookupInstEnv, instEnvElts,+        extendInstEnvList, lookupUniqueInstEnv, lookupInstEnv, instEnvElts, instEnvClasses,         memberInstEnv,         instIsVisible,         classInstances, instanceBindFun,@@ -136,7 +136,7 @@   inside the DFunId. The rough-match fields allow us to say "definitely does not   match", based only on Names. -  This laziness is very important; see Trac #12367. Try hard to avoid pulling on+  This laziness is very important; see #12367. Try hard to avoid pulling on   the structured fields unless you really need the instance.  * Another place to watch is InstEnv.instIsVisible, which needs the module to@@ -427,6 +427,9 @@ instEnvElts ie = [elt | ClsIE elts <- eltsUDFM ie, elt <- elts]   -- See Note [InstEnv determinism] +instEnvClasses :: InstEnv -> [Class]+instEnvClasses ie = [is_cls e | ClsIE (e : _) <- eltsUDFM ie]+ -- | Test if an instance is visible, by checking that its origin module -- is in 'VisibleOrphanModules'. -- See Note [Instance lookup and orphan instances]@@ -517,7 +520,7 @@ The difficulty is that the "zillion packages" might include ones loaded through earlier invocations of the GHC API, or earlier module loads in GHCi. They might not be in the dependencies of M itself; and if not, the instances-in them should not be visible.  Trac #2182, #8427.+in them should not be visible.  #2182, #8427.  There are two cases:   * If the instance is *not an orphan*, then module X defines C, T, or W.@@ -939,8 +942,8 @@        -- Overlap permitted if either the more specific instance        -- is marked as overlapping, or the more general one is        -- marked as overlappable.-       -- Latest change described in: Trac #9242.-       -- Previous change: Trac #3877, Dec 10.+       -- Latest change described in: #9242.+       -- Previous change: #3877, Dec 10.  {- Note [Incoherent instances]
− types/Kind.hs
@@ -1,97 +0,0 @@--- (c) The University of Glasgow 2006-2012--{-# LANGUAGE CPP #-}-module Kind (-        -- * Main data type-        Kind,--        -- ** Predicates on Kinds-        isLiftedTypeKind, isUnliftedTypeKind,-        isConstraintKindCon,--        classifiesTypeWithValues,-        isKindLevPoly-       ) where--#include "HsVersions.h"--import GhcPrelude--import {-# SOURCE #-} Type    ( coreView )--import TyCoRep-import TyCon-import PrelNames--import Outputable-import Util-import Data.Maybe( isJust )--{--************************************************************************-*                                                                      *-        Functions over Kinds-*                                                                      *-************************************************************************--Note [Kind Constraint and kind Type]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The kind Constraint is the kind of classes and other type constraints.-The special thing about types of kind Constraint is that- * They are displayed with double arrow:-     f :: Ord a => a -> a- * They are implicitly instantiated at call sites; so the type inference-   engine inserts an extra argument of type (Ord a) at every call site-   to f.--However, once type inference is over, there is *no* distinction between-Constraint and Type. Indeed we can have coercions between the two. Consider-   class C a where-     op :: a -> a-For this single-method class we may generate a newtype, which in turn-generates an axiom witnessing-    C a ~ (a -> a)-so on the left we have Constraint, and on the right we have Type.-See Trac #7451.--Bottom line: although 'Type' and 'Constraint' are distinct TyCons, with-distinct uniques, they are treated as equal at all times except-during type inference.--}--isConstraintKindCon :: TyCon -> Bool-isConstraintKindCon tc = tyConUnique tc == constraintKindTyConKey---- | Tests whether the given kind (which should look like @TYPE x@)--- is something other than a constructor tree (that is, constructors at every node).--- E.g.  True of   TYPE k, TYPE (F Int)---       False of  TYPE 'LiftedRep-isKindLevPoly :: Kind -> Bool-isKindLevPoly k = ASSERT2( isLiftedTypeKind k || _is_type, ppr k )-                    -- the isLiftedTypeKind check is necessary b/c of Constraint-                  go k-  where-    go ty | Just ty' <- coreView ty = go ty'-    go TyVarTy{}         = True-    go AppTy{}           = True  -- it can't be a TyConApp-    go (TyConApp tc tys) = isFamilyTyCon tc || any go tys-    go ForAllTy{}        = True-    go (FunTy t1 t2)     = go t1 || go t2-    go LitTy{}           = False-    go CastTy{}          = True-    go CoercionTy{}      = True--    _is_type = classifiesTypeWithValues k----------------------------------------------              Subkinding--- The tc variants are used during type-checking, where ConstraintKind--- is distinct from all other kinds--- After type-checking (in core), Constraint and liftedTypeKind are--- indistinguishable---- | Does this classify a type allowed to have values? Responds True to things--- like *, #, TYPE Lifted, TYPE v, Constraint.-classifiesTypeWithValues :: Kind -> Bool--- ^ True of any sub-kind of OpenTypeKind-classifiesTypeWithValues k = isJust (kindRep_maybe k)
types/OptCoercion.hs view
@@ -2,10 +2,6 @@  {-# LANGUAGE CPP #-} --- The default iteration limit is a bit too low for the definitions--- in this module.-{-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}- module OptCoercion ( optCoercion, checkAxInstCo ) where  #include "HsVersions.h"@@ -14,6 +10,7 @@  import DynFlags import TyCoRep+import TyCoSubst import Coercion import Type hiding( substTyVarBndr, substTy ) import TcType       ( exactTyCoVarsOfType )@@ -122,8 +119,8 @@         (Pair in_ty1  in_ty2,  in_role)  = coercionKindRole co         (Pair out_ty1 out_ty2, out_role) = coercionKindRole out_co     in-    ASSERT2( substTy env in_ty1 `eqType` out_ty1 &&-             substTy env in_ty2 `eqType` out_ty2 &&+    ASSERT2( substTyUnchecked env in_ty1 `eqType` out_ty1 &&+             substTyUnchecked env in_ty2 `eqType` out_ty2 &&              in_role == out_role            , text "optCoercion changed types!"              $$ hang (text "in_co:") 2 (ppr co)@@ -488,7 +485,7 @@   Any * Int                      :: *   Any (*->*) Maybe Int  :: * -Hence the need to compare argument lengths; see Trac #13658+Hence the need to compare argument lengths; see #13658  -}  opt_univ :: LiftingContext -> SymFlag -> UnivCoProvenance -> Role@@ -1159,7 +1156,7 @@   = ASSERT( tc == tc2 ) Just cos2  etaTyConAppCo_maybe tc co-  | mightBeUnsaturatedTyCon tc+  | not (mustBeSaturated tc)   , (Pair ty1 ty2, r) <- coercionKindRole co   , Just (tc1, tys1)  <- splitTyConApp_maybe ty1   , Just (tc2, tys2)  <- splitTyConApp_maybe ty2@@ -1168,7 +1165,7 @@   , let n = length tys1   , tys2 `lengthIs` n      -- This can fail in an erroneous progam                            -- E.g. T a ~# T a b-                           -- Trac #14607+                           -- #14607   = ASSERT( tc == tc1 )     Just (decomposeCo n co (tyConRolesX r tc1))     -- NB: n might be <> tyConArity tc
+ types/TyCoFVs.hs view
@@ -0,0 +1,861 @@+module TyCoFVs+  (+        tyCoVarsOfType, tyCoVarsOfTypeDSet, tyCoVarsOfTypes, tyCoVarsOfTypesDSet,+        exactTyCoVarsOfType, exactTyCoVarsOfTypes,+        tyCoFVsBndr, tyCoFVsVarBndr, tyCoFVsVarBndrs,+        tyCoFVsOfType, tyCoVarsOfTypeList,+        tyCoFVsOfTypes, tyCoVarsOfTypesList,+        tyCoVarsOfTypesSet, tyCoVarsOfCosSet,+        coVarsOfType, coVarsOfTypes,+        coVarsOfCo, coVarsOfCos,+        tyCoVarsOfCo, tyCoVarsOfCos,+        tyCoVarsOfCoDSet,+        tyCoFVsOfCo, tyCoFVsOfCos,+        tyCoVarsOfCoList, tyCoVarsOfProv,+        almostDevoidCoVarOfCo,+        injectiveVarsOfType, injectiveVarsOfTypes,+        invisibleVarsOfType, invisibleVarsOfTypes,++        noFreeVarsOfType, noFreeVarsOfTypes, noFreeVarsOfCo,++        mkTyCoInScopeSet,++        -- * Welll-scoped free variables+        scopedSort, tyCoVarsOfTypeWellScoped,+        tyCoVarsOfTypesWellScoped,+  ) where++import GhcPrelude++import {-# SOURCE #-} Type (coreView, tcView, partitionInvisibleTypes)++import TyCoRep+import TyCon+import Var+import FV++import UniqFM+import VarSet+import VarEnv+import Util+import Panic++{-+%************************************************************************+%*                                                                      *+                 Free variables of types and coercions+%*                                                                      *+%************************************************************************+-}++{- Note [Free variables of types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The family of functions tyCoVarsOfType, tyCoVarsOfTypes etc, returns+a VarSet that is closed over the types of its variables.  More precisely,+  if    S = tyCoVarsOfType( t )+  and   (a:k) is in S+  then  tyCoVarsOftype( k ) is a subset of S++Example: The tyCoVars of this ((a:* -> k) Int) is {a, k}.++We could /not/ close over the kinds of the variable occurrences, and+instead do so at call sites, but it seems that we always want to do+so, so it's easiest to do it here.++It turns out that getting the free variables of types is performance critical,+so we profiled several versions, exploring different implementation strategies.++1. Baseline version: uses FV naively. Essentially:++   tyCoVarsOfType ty = fvVarSet $ tyCoFVsOfType ty++   This is not nice, because FV introduces some overhead to implement+   determinism, and throught its "interesting var" function, neither of which+   we need here, so they are a complete waste.++2. UnionVarSet version: instead of reusing the FV-based code, we simply used+   VarSets directly, trying to avoid the overhead of FV. E.g.:++   -- FV version:+   tyCoFVsOfType (AppTy fun arg)    a b c = (tyCoFVsOfType fun `unionFV` tyCoFVsOfType arg) a b c++   -- UnionVarSet version:+   tyCoVarsOfType (AppTy fun arg)    = (tyCoVarsOfType fun `unionVarSet` tyCoVarsOfType arg)++   This looks deceptively similar, but while FV internally builds a list- and+   set-generating function, the VarSet functions manipulate sets directly, and+   the latter peforms a lot worse than the naive FV version.++3. Accumulator-style VarSet version: this is what we use now. We do use VarSet+   as our data structure, but delegate the actual work to a new+   ty_co_vars_of_...  family of functions, which use accumulator style and the+   "in-scope set" filter found in the internals of FV, but without the+   determinism overhead.++See #14880.++Note [Closing over free variable kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+tyCoVarsOfType and tyCoFVsOfType, while traversing a type, will also close over+free variable kinds. In previous GHC versions, this happened naively: whenever+we would encounter an occurrence of a free type variable, we would close over+its kind. This, however is wrong for two reasons (see #14880):++1. Efficiency. If we have Proxy (a::k) -> Proxy (a::k) -> Proxy (a::k), then+   we don't want to have to traverse k more than once.++2. Correctness. Imagine we have forall k. b -> k, where b has+   kind k, for some k bound in an outer scope. If we look at b's kind inside+   the forall, we'll collect that k is free and then remove k from the set of+   free variables. This is plain wrong. We must instead compute that b is free+   and then conclude that b's kind is free.++An obvious first approach is to move the closing-over-kinds from the+occurrences of a type variable to after finding the free vars - however, this+turns out to introduce performance regressions, and isn't even entirely+correct.++In fact, it isn't even important *when* we close over kinds; what matters is+that we handle each type var exactly once, and that we do it in the right+context.++So the next approach we tried was to use the "in-scope set" part of FV or the+equivalent argument in the accumulator-style `ty_co_vars_of_type` function, to+say "don't bother with variables we have already closed over". This should work+fine in theory, but the code is complicated and doesn't perform well.++But there is a simpler way, which is implemented here. Consider the two points+above:++1. Efficiency: we now have an accumulator, so the second time we encounter 'a',+   we'll ignore it, certainly not looking at its kind - this is why+   pre-checking set membership before inserting ends up not only being faster,+   but also being correct.++2. Correctness: we have an "in-scope set" (I think we should call it it a+  "bound-var set"), specifying variables that are bound by a forall in the type+  we are traversing; we simply ignore these variables, certainly not looking at+  their kind.++So now consider:++    forall k. b -> k++where b :: k->Type is free; but of course, it's a different k! When looking at+b -> k we'll have k in the bound-var set. So we'll ignore the k. But suppose+this is our first encounter with b; we want the free vars of its kind. But we+want to behave as if we took the free vars of its kind at the end; that is,+with no bound vars in scope.++So the solution is easy. The old code was this:++  ty_co_vars_of_type (TyVarTy v) is acc+    | v `elemVarSet` is  = acc+    | v `elemVarSet` acc = acc+    | otherwise          = ty_co_vars_of_type (tyVarKind v) is (extendVarSet acc v)++Now all we need to do is take the free vars of tyVarKind v *with an empty+bound-var set*, thus:++ty_co_vars_of_type (TyVarTy v) is acc+  | v `elemVarSet` is  = acc+  | v `elemVarSet` acc = acc+  | otherwise          = ty_co_vars_of_type (tyVarKind v) emptyVarSet (extendVarSet acc v)+                                                          ^^^^^^^^^^^++And that's it. This works because a variable is either bound or free. If it is bound,+then we won't look at it at all. If it is free, then all the variables free in its+kind are free -- regardless of whether some local variable has the same Unique.+So if we're looking at a variable occurrence at all, then all variables in its+kind are free.+-}++tyCoVarsOfType :: Type -> TyCoVarSet+-- See Note [Free variables of types]+tyCoVarsOfType ty = ty_co_vars_of_type ty emptyVarSet emptyVarSet++tyCoVarsOfTypes :: [Type] -> TyCoVarSet+tyCoVarsOfTypes tys = ty_co_vars_of_types tys emptyVarSet emptyVarSet++ty_co_vars_of_type :: Type -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet+ty_co_vars_of_type (TyVarTy v) is acc+  | v `elemVarSet` is  = acc+  | v `elemVarSet` acc = acc+  | otherwise          = ty_co_vars_of_type (tyVarKind v)+                            emptyVarSet  -- See Note [Closing over free variable kinds]+                            (extendVarSet acc v)++ty_co_vars_of_type (TyConApp _ tys)   is acc = ty_co_vars_of_types tys is acc+ty_co_vars_of_type (LitTy {})         _  acc = acc+ty_co_vars_of_type (AppTy fun arg)    is acc = ty_co_vars_of_type fun is (ty_co_vars_of_type arg is acc)+ty_co_vars_of_type (FunTy _ arg res)  is acc = ty_co_vars_of_type arg is (ty_co_vars_of_type res is acc)+ty_co_vars_of_type (ForAllTy (Bndr tv _) ty) is acc = ty_co_vars_of_type (varType tv) is $+                                                      ty_co_vars_of_type ty (extendVarSet is tv) acc+ty_co_vars_of_type (CastTy ty co)     is acc = ty_co_vars_of_type ty is (ty_co_vars_of_co co is acc)+ty_co_vars_of_type (CoercionTy co)    is acc = ty_co_vars_of_co co is acc++ty_co_vars_of_types :: [Type] -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet+ty_co_vars_of_types []       _  acc = acc+ty_co_vars_of_types (ty:tys) is acc = ty_co_vars_of_type ty is (ty_co_vars_of_types tys is acc)++tyCoVarsOfCo :: Coercion -> TyCoVarSet+-- See Note [Free variables of types]+tyCoVarsOfCo co = ty_co_vars_of_co co emptyVarSet emptyVarSet++tyCoVarsOfCos :: [Coercion] -> TyCoVarSet+tyCoVarsOfCos cos = ty_co_vars_of_cos cos emptyVarSet emptyVarSet+++ty_co_vars_of_co :: Coercion -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet+ty_co_vars_of_co (Refl ty)            is acc = ty_co_vars_of_type ty is acc+ty_co_vars_of_co (GRefl _ ty mco)     is acc = ty_co_vars_of_type ty is $+                                               ty_co_vars_of_mco mco is acc+ty_co_vars_of_co (TyConAppCo _ _ cos) is acc = ty_co_vars_of_cos cos is acc+ty_co_vars_of_co (AppCo co arg)       is acc = ty_co_vars_of_co co is $+                                               ty_co_vars_of_co arg is acc+ty_co_vars_of_co (ForAllCo tv kind_co co) is acc = ty_co_vars_of_co kind_co is $+                                                   ty_co_vars_of_co co (extendVarSet is tv) acc+ty_co_vars_of_co (FunCo _ co1 co2)    is acc = ty_co_vars_of_co co1 is $+                                               ty_co_vars_of_co co2 is acc+ty_co_vars_of_co (CoVarCo v)          is acc = ty_co_vars_of_co_var v is acc+ty_co_vars_of_co (HoleCo h)           is acc = ty_co_vars_of_co_var (coHoleCoVar h) is acc+    -- See Note [CoercionHoles and coercion free variables]+ty_co_vars_of_co (AxiomInstCo _ _ cos) is acc = ty_co_vars_of_cos cos is acc+ty_co_vars_of_co (UnivCo p _ t1 t2)    is acc = ty_co_vars_of_prov p is $+                                                ty_co_vars_of_type t1 is $+                                                ty_co_vars_of_type t2 is acc+ty_co_vars_of_co (SymCo co)          is acc = ty_co_vars_of_co co is acc+ty_co_vars_of_co (TransCo co1 co2)   is acc = ty_co_vars_of_co co1 is $+                                              ty_co_vars_of_co co2 is acc+ty_co_vars_of_co (NthCo _ _ co)      is acc = ty_co_vars_of_co co is acc+ty_co_vars_of_co (LRCo _ co)         is acc = ty_co_vars_of_co co is acc+ty_co_vars_of_co (InstCo co arg)     is acc = ty_co_vars_of_co co is $+                                              ty_co_vars_of_co arg is acc+ty_co_vars_of_co (KindCo co)         is acc = ty_co_vars_of_co co is acc+ty_co_vars_of_co (SubCo co)          is acc = ty_co_vars_of_co co is acc+ty_co_vars_of_co (AxiomRuleCo _ cs)  is acc = ty_co_vars_of_cos cs is acc++ty_co_vars_of_mco :: MCoercion -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet+ty_co_vars_of_mco MRefl    _is acc = acc+ty_co_vars_of_mco (MCo co) is  acc = ty_co_vars_of_co co is acc++ty_co_vars_of_co_var :: CoVar -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet+ty_co_vars_of_co_var v is acc+  | v `elemVarSet` is  = acc+  | v `elemVarSet` acc = acc+  | otherwise          = ty_co_vars_of_type (varType v)+                            emptyVarSet  -- See Note [Closing over free variable kinds]+                            (extendVarSet acc v)++ty_co_vars_of_cos :: [Coercion] -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet+ty_co_vars_of_cos []       _  acc = acc+ty_co_vars_of_cos (co:cos) is acc = ty_co_vars_of_co co is (ty_co_vars_of_cos cos is acc)++tyCoVarsOfProv :: UnivCoProvenance -> TyCoVarSet+tyCoVarsOfProv prov = ty_co_vars_of_prov prov emptyVarSet emptyVarSet++ty_co_vars_of_prov :: UnivCoProvenance -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet+ty_co_vars_of_prov (PhantomProv co)    is acc = ty_co_vars_of_co co is acc+ty_co_vars_of_prov (ProofIrrelProv co) is acc = ty_co_vars_of_co co is acc+ty_co_vars_of_prov UnsafeCoerceProv    _  acc = acc+ty_co_vars_of_prov (PluginProv _)      _  acc = acc++-- | Generates an in-scope set from the free variables in a list of types+-- and a list of coercions+mkTyCoInScopeSet :: [Type] -> [Coercion] -> InScopeSet+mkTyCoInScopeSet tys cos+  = mkInScopeSet (ty_co_vars_of_types tys emptyVarSet $+                  ty_co_vars_of_cos   cos emptyVarSet emptyVarSet)++-- | `tyCoFVsOfType` that returns free variables of a type in a deterministic+-- set. For explanation of why using `VarSet` is not deterministic see+-- Note [Deterministic FV] in FV.+tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet+-- See Note [Free variables of types]+tyCoVarsOfTypeDSet ty = fvDVarSet $ tyCoFVsOfType ty++-- | `tyCoFVsOfType` that returns free variables of a type in deterministic+-- order. For explanation of why using `VarSet` is not deterministic see+-- Note [Deterministic FV] in FV.+tyCoVarsOfTypeList :: Type -> [TyCoVar]+-- See Note [Free variables of types]+tyCoVarsOfTypeList ty = fvVarList $ tyCoFVsOfType ty++-- | Returns free variables of types, including kind variables as+-- a non-deterministic set. For type synonyms it does /not/ expand the+-- synonym.+tyCoVarsOfTypesSet :: TyVarEnv Type -> TyCoVarSet+-- See Note [Free variables of types]+tyCoVarsOfTypesSet tys = tyCoVarsOfTypes $ nonDetEltsUFM tys+  -- It's OK to use nonDetEltsUFM here because we immediately forget the+  -- ordering by returning a set++-- | Returns free variables of types, including kind variables as+-- a deterministic set. For type synonyms it does /not/ expand the+-- synonym.+tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet+-- See Note [Free variables of types]+tyCoVarsOfTypesDSet tys = fvDVarSet $ tyCoFVsOfTypes tys++-- | Returns free variables of types, including kind variables as+-- a deterministically ordered list. For type synonyms it does /not/ expand the+-- synonym.+tyCoVarsOfTypesList :: [Type] -> [TyCoVar]+-- See Note [Free variables of types]+tyCoVarsOfTypesList tys = fvVarList $ tyCoFVsOfTypes tys++{-+************************************************************************+*                                                                      *+          The "exact" free variables of a type+*                                                                      *+************************************************************************++Note [Silly type synonym]+~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  type T a = Int+What are the free tyvars of (T x)?  Empty, of course!++exactTyCoVarsOfType is used by the type checker to figure out exactly+which type variables are mentioned in a type.  It only matters+occasionally -- see the calls to exactTyCoVarsOfType.+-}++exactTyCoVarsOfType :: Type -> TyCoVarSet+-- Find the free type variables (of any kind)+-- but *expand* type synonyms.  See Note [Silly type synonym] above.+exactTyCoVarsOfType ty+  = go ty+  where+    go ty | Just ty' <- tcView ty = go ty'  -- This is the key line+    go (TyVarTy tv)         = goVar tv+    go (TyConApp _ tys)     = exactTyCoVarsOfTypes tys+    go (LitTy {})           = emptyVarSet+    go (AppTy fun arg)      = go fun `unionVarSet` go arg+    go (FunTy _ arg res)    = go arg `unionVarSet` go res+    go (ForAllTy bndr ty)   = delBinderVar (go ty) bndr `unionVarSet` go (binderType bndr)+    go (CastTy ty co)       = go ty `unionVarSet` goCo co+    go (CoercionTy co)      = goCo co++    goMCo MRefl    = emptyVarSet+    goMCo (MCo co) = goCo co++    goCo (Refl ty)            = go ty+    goCo (GRefl _ ty mco)     = go ty `unionVarSet` goMCo mco+    goCo (TyConAppCo _ _ args)= goCos args+    goCo (AppCo co arg)     = goCo co `unionVarSet` goCo arg+    goCo (ForAllCo tv k_co co)+      = goCo co `delVarSet` tv `unionVarSet` goCo k_co+    goCo (FunCo _ co1 co2)   = goCo co1 `unionVarSet` goCo co2+    goCo (CoVarCo v)         = goVar v+    goCo (HoleCo h)          = goVar (coHoleCoVar h)+    goCo (AxiomInstCo _ _ args) = goCos args+    goCo (UnivCo p _ t1 t2)  = goProv p `unionVarSet` go t1 `unionVarSet` go t2+    goCo (SymCo co)          = goCo co+    goCo (TransCo co1 co2)   = goCo co1 `unionVarSet` goCo co2+    goCo (NthCo _ _ co)      = goCo co+    goCo (LRCo _ co)         = goCo co+    goCo (InstCo co arg)     = goCo co `unionVarSet` goCo arg+    goCo (KindCo co)         = goCo co+    goCo (SubCo co)          = goCo co+    goCo (AxiomRuleCo _ c)   = goCos c++    goCos cos = foldr (unionVarSet . goCo) emptyVarSet cos++    goProv UnsafeCoerceProv     = emptyVarSet+    goProv (PhantomProv kco)    = goCo kco+    goProv (ProofIrrelProv kco) = goCo kco+    goProv (PluginProv _)       = emptyVarSet++    goVar v = unitVarSet v `unionVarSet` go (varType v)++exactTyCoVarsOfTypes :: [Type] -> TyVarSet+exactTyCoVarsOfTypes tys = mapUnionVarSet exactTyCoVarsOfType tys++-- | The worker for `tyCoFVsOfType` and `tyCoFVsOfTypeList`.+-- The previous implementation used `unionVarSet` which is O(n+m) and can+-- make the function quadratic.+-- It's exported, so that it can be composed with+-- other functions that compute free variables.+-- See Note [FV naming conventions] in FV.+--+-- Eta-expanded because that makes it run faster (apparently)+-- See Note [FV eta expansion] in FV for explanation.+tyCoFVsOfType :: Type -> FV+-- See Note [Free variables of types]+tyCoFVsOfType (TyVarTy v)        f bound_vars (acc_list, acc_set)+  | not (f v) = (acc_list, acc_set)+  | v `elemVarSet` bound_vars = (acc_list, acc_set)+  | v `elemVarSet` acc_set = (acc_list, acc_set)+  | otherwise = tyCoFVsOfType (tyVarKind v) f+                               emptyVarSet   -- See Note [Closing over free variable kinds]+                               (v:acc_list, extendVarSet acc_set v)+tyCoFVsOfType (TyConApp _ tys)   f bound_vars acc = tyCoFVsOfTypes tys f bound_vars acc+tyCoFVsOfType (LitTy {})         f bound_vars acc = emptyFV f bound_vars acc+tyCoFVsOfType (AppTy fun arg)    f bound_vars acc = (tyCoFVsOfType fun `unionFV` tyCoFVsOfType arg) f bound_vars acc+tyCoFVsOfType (FunTy _ arg res)  f bound_vars acc = (tyCoFVsOfType arg `unionFV` tyCoFVsOfType res) f bound_vars acc+tyCoFVsOfType (ForAllTy bndr ty) f bound_vars acc = tyCoFVsBndr bndr (tyCoFVsOfType ty)  f bound_vars acc+tyCoFVsOfType (CastTy ty co)     f bound_vars acc = (tyCoFVsOfType ty `unionFV` tyCoFVsOfCo co) f bound_vars acc+tyCoFVsOfType (CoercionTy co)    f bound_vars acc = tyCoFVsOfCo co f bound_vars acc++tyCoFVsBndr :: TyCoVarBinder -> FV -> FV+-- Free vars of (forall b. <thing with fvs>)+tyCoFVsBndr (Bndr tv _) fvs = tyCoFVsVarBndr tv fvs++tyCoFVsVarBndrs :: [Var] -> FV -> FV+tyCoFVsVarBndrs vars fvs = foldr tyCoFVsVarBndr fvs vars++tyCoFVsVarBndr :: Var -> FV -> FV+tyCoFVsVarBndr var fvs+  = tyCoFVsOfType (varType var)   -- Free vars of its type/kind+    `unionFV` delFV var fvs       -- Delete it from the thing-inside++tyCoFVsOfTypes :: [Type] -> FV+-- See Note [Free variables of types]+tyCoFVsOfTypes (ty:tys) fv_cand in_scope acc = (tyCoFVsOfType ty `unionFV` tyCoFVsOfTypes tys) fv_cand in_scope acc+tyCoFVsOfTypes []       fv_cand in_scope acc = emptyFV fv_cand in_scope acc++-- | Get a deterministic set of the vars free in a coercion+tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet+-- See Note [Free variables of types]+tyCoVarsOfCoDSet co = fvDVarSet $ tyCoFVsOfCo co++tyCoVarsOfCoList :: Coercion -> [TyCoVar]+-- See Note [Free variables of types]+tyCoVarsOfCoList co = fvVarList $ tyCoFVsOfCo co++tyCoFVsOfMCo :: MCoercion -> FV+tyCoFVsOfMCo MRefl    = emptyFV+tyCoFVsOfMCo (MCo co) = tyCoFVsOfCo co++tyCoVarsOfCosSet :: CoVarEnv Coercion -> TyCoVarSet+tyCoVarsOfCosSet cos = tyCoVarsOfCos $ nonDetEltsUFM cos+  -- It's OK to use nonDetEltsUFM here because we immediately forget the+  -- ordering by returning a set++tyCoFVsOfCo :: Coercion -> FV+-- Extracts type and coercion variables from a coercion+-- See Note [Free variables of types]+tyCoFVsOfCo (Refl ty) fv_cand in_scope acc+  = tyCoFVsOfType ty fv_cand in_scope acc+tyCoFVsOfCo (GRefl _ ty mco) fv_cand in_scope acc+  = (tyCoFVsOfType ty `unionFV` tyCoFVsOfMCo mco) fv_cand in_scope acc+tyCoFVsOfCo (TyConAppCo _ _ cos) fv_cand in_scope acc = tyCoFVsOfCos cos fv_cand in_scope acc+tyCoFVsOfCo (AppCo co arg) fv_cand in_scope acc+  = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCo arg) fv_cand in_scope acc+tyCoFVsOfCo (ForAllCo tv kind_co co) fv_cand in_scope acc+  = (tyCoFVsVarBndr tv (tyCoFVsOfCo co) `unionFV` tyCoFVsOfCo kind_co) fv_cand in_scope acc+tyCoFVsOfCo (FunCo _ co1 co2)    fv_cand in_scope acc+  = (tyCoFVsOfCo co1 `unionFV` tyCoFVsOfCo co2) fv_cand in_scope acc+tyCoFVsOfCo (CoVarCo v) fv_cand in_scope acc+  = tyCoFVsOfCoVar v fv_cand in_scope acc+tyCoFVsOfCo (HoleCo h) fv_cand in_scope acc+  = tyCoFVsOfCoVar (coHoleCoVar h) fv_cand in_scope acc+    -- See Note [CoercionHoles and coercion free variables]+tyCoFVsOfCo (AxiomInstCo _ _ cos) fv_cand in_scope acc = tyCoFVsOfCos cos fv_cand in_scope acc+tyCoFVsOfCo (UnivCo p _ t1 t2) fv_cand in_scope acc+  = (tyCoFVsOfProv p `unionFV` tyCoFVsOfType t1+                     `unionFV` tyCoFVsOfType t2) fv_cand in_scope acc+tyCoFVsOfCo (SymCo co)          fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc+tyCoFVsOfCo (TransCo co1 co2)   fv_cand in_scope acc = (tyCoFVsOfCo co1 `unionFV` tyCoFVsOfCo co2) fv_cand in_scope acc+tyCoFVsOfCo (NthCo _ _ co)      fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc+tyCoFVsOfCo (LRCo _ co)         fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc+tyCoFVsOfCo (InstCo co arg)     fv_cand in_scope acc = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCo arg) fv_cand in_scope acc+tyCoFVsOfCo (KindCo co)         fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc+tyCoFVsOfCo (SubCo co)          fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc+tyCoFVsOfCo (AxiomRuleCo _ cs)  fv_cand in_scope acc = tyCoFVsOfCos cs fv_cand in_scope acc++tyCoFVsOfCoVar :: CoVar -> FV+tyCoFVsOfCoVar v fv_cand in_scope acc+  = (unitFV v `unionFV` tyCoFVsOfType (varType v)) fv_cand in_scope acc++tyCoFVsOfProv :: UnivCoProvenance -> FV+tyCoFVsOfProv UnsafeCoerceProv    fv_cand in_scope acc = emptyFV fv_cand in_scope acc+tyCoFVsOfProv (PhantomProv co)    fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc+tyCoFVsOfProv (ProofIrrelProv co) fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc+tyCoFVsOfProv (PluginProv _)      fv_cand in_scope acc = emptyFV fv_cand in_scope acc++tyCoFVsOfCos :: [Coercion] -> FV+tyCoFVsOfCos []       fv_cand in_scope acc = emptyFV fv_cand in_scope acc+tyCoFVsOfCos (co:cos) fv_cand in_scope acc = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCos cos) fv_cand in_scope acc+++------------- Extracting the CoVars of a type or coercion -----------++{-++Note [CoVarsOfX and the InterestingVarFun]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++The coVarsOfType, coVarsOfTypes, coVarsOfCo, and coVarsOfCos functions are+implemented in terms of the respective FV equivalents (tyCoFVsOf...), rather+than the VarSet-based flavors (tyCoVarsOf...), despite the performance+considerations outlined in Note [Free variables of types].++This is because FV includes the InterestingVarFun, which is useful here,+because we can cleverly use it to restrict our calculations to CoVars - this+is what getCoVarSet achieves.++See #14880.++-}++getCoVarSet :: FV -> CoVarSet+getCoVarSet fv = snd (fv isCoVar emptyVarSet ([], emptyVarSet))++coVarsOfType :: Type -> CoVarSet+coVarsOfType ty = getCoVarSet (tyCoFVsOfType ty)++coVarsOfTypes :: [Type] -> TyCoVarSet+coVarsOfTypes tys = getCoVarSet (tyCoFVsOfTypes tys)++coVarsOfCo :: Coercion -> CoVarSet+coVarsOfCo co = getCoVarSet (tyCoFVsOfCo co)++coVarsOfCos :: [Coercion] -> CoVarSet+coVarsOfCos cos = getCoVarSet (tyCoFVsOfCos cos)++----- Whether a covar is /Almost Devoid/ in a type or coercion ----++-- | Given a covar and a coercion, returns True if covar is almost devoid in+-- the coercion. That is, covar can only appear in Refl and GRefl.+-- See last wrinkle in Note [Unused coercion variable in ForAllCo] in Coercion+almostDevoidCoVarOfCo :: CoVar -> Coercion -> Bool+almostDevoidCoVarOfCo cv co =+  almost_devoid_co_var_of_co co cv++almost_devoid_co_var_of_co :: Coercion -> CoVar -> Bool+almost_devoid_co_var_of_co (Refl {}) _ = True   -- covar is allowed in Refl and+almost_devoid_co_var_of_co (GRefl {}) _ = True  -- GRefl, so we don't look into+                                                -- the coercions+almost_devoid_co_var_of_co (TyConAppCo _ _ cos) cv+  = almost_devoid_co_var_of_cos cos cv+almost_devoid_co_var_of_co (AppCo co arg) cv+  = almost_devoid_co_var_of_co co cv+  && almost_devoid_co_var_of_co arg cv+almost_devoid_co_var_of_co (ForAllCo v kind_co co) cv+  = almost_devoid_co_var_of_co kind_co cv+  && (v == cv || almost_devoid_co_var_of_co co cv)+almost_devoid_co_var_of_co (FunCo _ co1 co2) cv+  = almost_devoid_co_var_of_co co1 cv+  && almost_devoid_co_var_of_co co2 cv+almost_devoid_co_var_of_co (CoVarCo v) cv = v /= cv+almost_devoid_co_var_of_co (HoleCo h)  cv = (coHoleCoVar h) /= cv+almost_devoid_co_var_of_co (AxiomInstCo _ _ cos) cv+  = almost_devoid_co_var_of_cos cos cv+almost_devoid_co_var_of_co (UnivCo p _ t1 t2) cv+  = almost_devoid_co_var_of_prov p cv+  && almost_devoid_co_var_of_type t1 cv+  && almost_devoid_co_var_of_type t2 cv+almost_devoid_co_var_of_co (SymCo co) cv+  = almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_co (TransCo co1 co2) cv+  = almost_devoid_co_var_of_co co1 cv+  && almost_devoid_co_var_of_co co2 cv+almost_devoid_co_var_of_co (NthCo _ _ co) cv+  = almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_co (LRCo _ co) cv+  = almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_co (InstCo co arg) cv+  = almost_devoid_co_var_of_co co cv+  && almost_devoid_co_var_of_co arg cv+almost_devoid_co_var_of_co (KindCo co) cv+  = almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_co (SubCo co) cv+  = almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_co (AxiomRuleCo _ cs) cv+  = almost_devoid_co_var_of_cos cs cv++almost_devoid_co_var_of_cos :: [Coercion] -> CoVar -> Bool+almost_devoid_co_var_of_cos [] _ = True+almost_devoid_co_var_of_cos (co:cos) cv+  = almost_devoid_co_var_of_co co cv+  && almost_devoid_co_var_of_cos cos cv++almost_devoid_co_var_of_prov :: UnivCoProvenance -> CoVar -> Bool+almost_devoid_co_var_of_prov (PhantomProv co) cv+  = almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_prov (ProofIrrelProv co) cv+  = almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_prov UnsafeCoerceProv _ = True+almost_devoid_co_var_of_prov (PluginProv _) _ = True++almost_devoid_co_var_of_type :: Type -> CoVar -> Bool+almost_devoid_co_var_of_type (TyVarTy _) _ = True+almost_devoid_co_var_of_type (TyConApp _ tys) cv+  = almost_devoid_co_var_of_types tys cv+almost_devoid_co_var_of_type (LitTy {}) _ = True+almost_devoid_co_var_of_type (AppTy fun arg) cv+  = almost_devoid_co_var_of_type fun cv+  && almost_devoid_co_var_of_type arg cv+almost_devoid_co_var_of_type (FunTy _ arg res) cv+  = almost_devoid_co_var_of_type arg cv+  && almost_devoid_co_var_of_type res cv+almost_devoid_co_var_of_type (ForAllTy (Bndr v _) ty) cv+  = almost_devoid_co_var_of_type (varType v) cv+  && (v == cv || almost_devoid_co_var_of_type ty cv)+almost_devoid_co_var_of_type (CastTy ty co) cv+  = almost_devoid_co_var_of_type ty cv+  && almost_devoid_co_var_of_co co cv+almost_devoid_co_var_of_type (CoercionTy co) cv+  = almost_devoid_co_var_of_co co cv++almost_devoid_co_var_of_types :: [Type] -> CoVar -> Bool+almost_devoid_co_var_of_types [] _ = True+almost_devoid_co_var_of_types (ty:tys) cv+  = almost_devoid_co_var_of_type ty cv+  && almost_devoid_co_var_of_types tys cv++------------- Injective free vars -----------------++-- | Returns the free variables of a 'Type' that are in injective positions.+-- Specifically, it finds the free variables while:+--+-- * Expanding type synonyms+--+-- * Ignoring the coercion in @(ty |> co)@+--+-- * Ignoring the non-injective fields of a 'TyConApp'+--+--+-- For example, if @F@ is a non-injective type family, then:+--+-- @+-- injectiveTyVarsOf( Either c (Maybe (a, F b c)) ) = {a,c}+-- @+--+-- If @'injectiveVarsOfType' ty = itvs@, then knowing @ty@ fixes @itvs@.+-- More formally, if+-- @a@ is in @'injectiveVarsOfType' ty@+-- and  @S1(ty) ~ S2(ty)@,+-- then @S1(a)  ~ S2(a)@,+-- where @S1@ and @S2@ are arbitrary substitutions.+--+-- See @Note [When does a tycon application need an explicit kind signature?]@.+injectiveVarsOfType :: Bool   -- ^ Should we look under injective type families?+                              -- See Note [Coverage condition for injective type families]+                              -- in FamInst.+                    -> Type -> FV+injectiveVarsOfType look_under_tfs = go+  where+    go ty                 | Just ty' <- coreView ty+                          = go ty'+    go (TyVarTy v)        = unitFV v `unionFV` go (tyVarKind v)+    go (AppTy f a)        = go f `unionFV` go a+    go (FunTy _ ty1 ty2)  = go ty1 `unionFV` go ty2+    go (TyConApp tc tys)  =+      case tyConInjectivityInfo tc of+        Injective inj+          |  look_under_tfs || not (isTypeFamilyTyCon tc)+          -> mapUnionFV go $+             filterByList (inj ++ repeat True) tys+                         -- Oversaturated arguments to a tycon are+                         -- always injective, hence the repeat True+        _ -> emptyFV+    go (ForAllTy (Bndr tv _) ty) = go (tyVarKind tv) `unionFV` delFV tv (go ty)+    go LitTy{}                   = emptyFV+    go (CastTy ty _)             = go ty+    go CoercionTy{}              = emptyFV++-- | Returns the free variables of a 'Type' that are in injective positions.+-- Specifically, it finds the free variables while:+--+-- * Expanding type synonyms+--+-- * Ignoring the coercion in @(ty |> co)@+--+-- * Ignoring the non-injective fields of a 'TyConApp'+--+-- See @Note [When does a tycon application need an explicit kind signature?]@.+injectiveVarsOfTypes :: Bool -- ^ look under injective type families?+                             -- See Note [Coverage condition for injective type families]+                             -- in FamInst.+                     -> [Type] -> FV+injectiveVarsOfTypes look_under_tfs = mapUnionFV (injectiveVarsOfType look_under_tfs)+++------------- Invisible vars -----------------+-- | Returns the set of variables that are used invisibly anywhere within+-- the given type. A variable will be included even if it is used both visibly+-- and invisibly. An invisible use site includes:+--   * In the kind of a variable+--   * In the kind of a bound variable in a forall+--   * In a coercion+--   * In a Specified or Inferred argument to a function+-- See Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep+invisibleVarsOfType :: Type -> FV+invisibleVarsOfType = go+  where+    go ty                 | Just ty' <- coreView ty+                          = go ty'+    go (TyVarTy v)        = go (tyVarKind v)+    go (AppTy f a)        = go f `unionFV` go a+    go (FunTy _ ty1 ty2)  = go ty1 `unionFV` go ty2+    go (TyConApp tc tys)  = tyCoFVsOfTypes invisibles `unionFV`+                            invisibleVarsOfTypes visibles+      where (invisibles, visibles) = partitionInvisibleTypes tc tys+    go (ForAllTy tvb ty)  = tyCoFVsBndr tvb $ go ty+    go LitTy{}            = emptyFV+    go (CastTy ty co)     = tyCoFVsOfCo co `unionFV` go ty+    go (CoercionTy co)    = tyCoFVsOfCo co++-- | Like 'invisibleVarsOfType', but for many types.+invisibleVarsOfTypes :: [Type] -> FV+invisibleVarsOfTypes = mapUnionFV invisibleVarsOfType+++------------- No free vars -----------------++-- | Returns True if this type has no free variables. Should be the same as+-- isEmptyVarSet . tyCoVarsOfType, but faster in the non-forall case.+noFreeVarsOfType :: Type -> Bool+noFreeVarsOfType (TyVarTy _)      = False+noFreeVarsOfType (AppTy t1 t2)    = noFreeVarsOfType t1 && noFreeVarsOfType t2+noFreeVarsOfType (TyConApp _ tys) = all noFreeVarsOfType tys+noFreeVarsOfType ty@(ForAllTy {}) = isEmptyVarSet (tyCoVarsOfType ty)+noFreeVarsOfType (FunTy _ t1 t2)  = noFreeVarsOfType t1 && noFreeVarsOfType t2+noFreeVarsOfType (LitTy _)        = True+noFreeVarsOfType (CastTy ty co)   = noFreeVarsOfType ty && noFreeVarsOfCo co+noFreeVarsOfType (CoercionTy co)  = noFreeVarsOfCo co++noFreeVarsOfMCo :: MCoercion -> Bool+noFreeVarsOfMCo MRefl    = True+noFreeVarsOfMCo (MCo co) = noFreeVarsOfCo co++noFreeVarsOfTypes :: [Type] -> Bool+noFreeVarsOfTypes = all noFreeVarsOfType++-- | Returns True if this coercion has no free variables. Should be the same as+-- isEmptyVarSet . tyCoVarsOfCo, but faster in the non-forall case.+noFreeVarsOfCo :: Coercion -> Bool+noFreeVarsOfCo (Refl ty)              = noFreeVarsOfType ty+noFreeVarsOfCo (GRefl _ ty co)        = noFreeVarsOfType ty && noFreeVarsOfMCo co+noFreeVarsOfCo (TyConAppCo _ _ args)  = all noFreeVarsOfCo args+noFreeVarsOfCo (AppCo c1 c2)          = noFreeVarsOfCo c1 && noFreeVarsOfCo c2+noFreeVarsOfCo co@(ForAllCo {})       = isEmptyVarSet (tyCoVarsOfCo co)+noFreeVarsOfCo (FunCo _ c1 c2)        = noFreeVarsOfCo c1 && noFreeVarsOfCo c2+noFreeVarsOfCo (CoVarCo _)            = False+noFreeVarsOfCo (HoleCo {})            = True    -- I'm unsure; probably never happens+noFreeVarsOfCo (AxiomInstCo _ _ args) = all noFreeVarsOfCo args+noFreeVarsOfCo (UnivCo p _ t1 t2)     = noFreeVarsOfProv p &&+                                        noFreeVarsOfType t1 &&+                                        noFreeVarsOfType t2+noFreeVarsOfCo (SymCo co)             = noFreeVarsOfCo co+noFreeVarsOfCo (TransCo co1 co2)      = noFreeVarsOfCo co1 && noFreeVarsOfCo co2+noFreeVarsOfCo (NthCo _ _ co)         = noFreeVarsOfCo co+noFreeVarsOfCo (LRCo _ co)            = noFreeVarsOfCo co+noFreeVarsOfCo (InstCo co1 co2)       = noFreeVarsOfCo co1 && noFreeVarsOfCo co2+noFreeVarsOfCo (KindCo co)            = noFreeVarsOfCo co+noFreeVarsOfCo (SubCo co)             = noFreeVarsOfCo co+noFreeVarsOfCo (AxiomRuleCo _ cs)     = all noFreeVarsOfCo cs++-- | Returns True if this UnivCoProv has no free variables. Should be the same as+-- isEmptyVarSet . tyCoVarsOfProv, but faster in the non-forall case.+noFreeVarsOfProv :: UnivCoProvenance -> Bool+noFreeVarsOfProv UnsafeCoerceProv    = True+noFreeVarsOfProv (PhantomProv co)    = noFreeVarsOfCo co+noFreeVarsOfProv (ProofIrrelProv co) = noFreeVarsOfCo co+noFreeVarsOfProv (PluginProv {})     = True++{-+%************************************************************************+%*                                                                      *+         Well-scoped tyvars+*                                                                      *+************************************************************************++Note [ScopedSort]+~~~~~~~~~~~~~~~~~+Consider++  foo :: Proxy a -> Proxy (b :: k) -> Proxy (a :: k2) -> ()++This function type is implicitly generalised over [a, b, k, k2]. These+variables will be Specified; that is, they will be available for visible+type application. This is because they are written in the type signature+by the user.++However, we must ask: what order will they appear in? In cases without+dependency, this is easy: we just use the lexical left-to-right ordering+of first occurrence. With dependency, we cannot get off the hook so+easily.++We thus state:++ * These variables appear in the order as given by ScopedSort, where+   the input to ScopedSort is the left-to-right order of first occurrence.++Note that this applies only to *implicit* quantification, without a+`forall`. If the user writes a `forall`, then we just use the order given.++ScopedSort is defined thusly (as proposed in #15743):+  * Work left-to-right through the input list, with a cursor.+  * If variable v at the cursor is depended on by any earlier variable w,+    move v immediately before the leftmost such w.++INVARIANT: The prefix of variables before the cursor form a valid telescope.++Note that ScopedSort makes sense only after type inference is done and all+types/kinds are fully settled and zonked.++-}++-- | Do a topological sort on a list of tyvars,+--   so that binders occur before occurrences+-- E.g. given  [ a::k, k::*, b::k ]+-- it'll return a well-scoped list [ k::*, a::k, b::k ]+--+-- This is a deterministic sorting operation+-- (that is, doesn't depend on Uniques).+--+-- It is also meant to be stable: that is, variables should not+-- be reordered unnecessarily. This is specified in Note [ScopedSort]+-- See also Note [Ordering of implicit variables] in RnTypes++scopedSort :: [TyCoVar] -> [TyCoVar]+scopedSort = go [] []+  where+    go :: [TyCoVar] -- already sorted, in reverse order+       -> [TyCoVarSet] -- each set contains all the variables which must be placed+                       -- before the tv corresponding to the set; they are accumulations+                       -- of the fvs in the sorted tvs' kinds++                       -- This list is in 1-to-1 correspondence with the sorted tyvars+                       -- INVARIANT:+                       --   all (\tl -> all (`subVarSet` head tl) (tail tl)) (tails fv_list)+                       -- That is, each set in the list is a superset of all later sets.++       -> [TyCoVar] -- yet to be sorted+       -> [TyCoVar]+    go acc _fv_list [] = reverse acc+    go acc  fv_list (tv:tvs)+      = go acc' fv_list' tvs+      where+        (acc', fv_list') = insert tv acc fv_list++    insert :: TyCoVar       -- var to insert+           -> [TyCoVar]     -- sorted list, in reverse order+           -> [TyCoVarSet]  -- list of fvs, as above+           -> ([TyCoVar], [TyCoVarSet])   -- augmented lists+    insert tv []     []         = ([tv], [tyCoVarsOfType (tyVarKind tv)])+    insert tv (a:as) (fvs:fvss)+      | tv `elemVarSet` fvs+      , (as', fvss') <- insert tv as fvss+      = (a:as', fvs `unionVarSet` fv_tv : fvss')++      | otherwise+      = (tv:a:as, fvs `unionVarSet` fv_tv : fvs : fvss)+      where+        fv_tv = tyCoVarsOfType (tyVarKind tv)++       -- lists not in correspondence+    insert _ _ _ = panic "scopedSort"++-- | Get the free vars of a type in scoped order+tyCoVarsOfTypeWellScoped :: Type -> [TyVar]+tyCoVarsOfTypeWellScoped = scopedSort . tyCoVarsOfTypeList++-- | Get the free vars of types in scoped order+tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]+tyCoVarsOfTypesWellScoped = scopedSort . tyCoVarsOfTypesList
+ types/TyCoPpr.hs view
@@ -0,0 +1,337 @@+-- | Pretty-printing types and coercions.+module TyCoPpr+  (+        -- * Precedence+        PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen,++        -- * Pretty-printing types+        pprType, pprParendType, pprPrecType, pprPrecTypeX,+        pprTypeApp, pprTCvBndr, pprTCvBndrs,+        pprSigmaType,+        pprTheta, pprParendTheta, pprForAll, pprUserForAll,+        pprTyVar, pprTyVars,+        pprThetaArrowTy, pprClassPred,+        pprKind, pprParendKind, pprTyLit,+        pprDataCons, pprWithExplicitKindsWhen,+        pprWithTYPE, pprSourceTyCon,+++        -- * Pretty-printing coercions+        pprCo, pprParendCo,++        debugPprType,++        -- * Pretty-printing 'TyThing's+        pprTyThingCategory, pprShortTyThing,+  ) where++import GhcPrelude++import {-# SOURCE #-} ToIface( toIfaceTypeX, toIfaceTyLit, toIfaceForAllBndr+                             , toIfaceTyCon, toIfaceTcArgs, toIfaceCoercionX )+import {-# SOURCE #-} DataCon( dataConFullSig+                             , dataConUserTyVarBinders+                             , DataCon )++import {-# SOURCE #-} Type( isLiftedTypeKind )++import TyCon+import TyCoRep+import TyCoTidy+import TyCoFVs+import Class+import Var++import IfaceType++import VarSet+import VarEnv++import DynFlags   ( gopt_set,+                    GeneralFlag(Opt_PrintExplicitKinds, Opt_PrintExplicitRuntimeReps) )+import Outputable+import BasicTypes ( PprPrec(..), topPrec, sigPrec, opPrec+                  , funPrec, appPrec, maybeParen )++{-+%************************************************************************+%*                                                                      *+                   Pretty-printing types++       Defined very early because of debug printing in assertions+%*                                                                      *+%************************************************************************++@pprType@ is the standard @Type@ printer; the overloaded @ppr@ function is+defined to use this.  @pprParendType@ is the same, except it puts+parens around the type, except for the atomic cases.  @pprParendType@+works just by setting the initial context precedence very high.++Note that any function which pretty-prints a @Type@ first converts the @Type@+to an @IfaceType@. See Note [IfaceType and pretty-printing] in IfaceType.++See Note [Precedence in types] in BasicTypes.+-}++--------------------------------------------------------+-- When pretty-printing types, we convert to IfaceType,+--   and pretty-print that.+-- See Note [Pretty printing via IfaceSyn] in PprTyThing+--------------------------------------------------------++pprType, pprParendType :: Type -> SDoc+pprType       = pprPrecType topPrec+pprParendType = pprPrecType appPrec++pprPrecType :: PprPrec -> Type -> SDoc+pprPrecType = pprPrecTypeX emptyTidyEnv++pprPrecTypeX :: TidyEnv -> PprPrec -> Type -> SDoc+pprPrecTypeX env prec ty+  = getPprStyle $ \sty ->+    if debugStyle sty           -- Use debugPprType when in+    then debug_ppr_ty prec ty   -- when in debug-style+    else pprPrecIfaceType prec (tidyToIfaceTypeStyX env ty sty)+    -- NB: debug-style is used for -dppr-debug+    --     dump-style  is used for -ddump-tc-trace etc++pprTyLit :: TyLit -> SDoc+pprTyLit = pprIfaceTyLit . toIfaceTyLit++pprKind, pprParendKind :: Kind -> SDoc+pprKind       = pprType+pprParendKind = pprParendType++tidyToIfaceTypeStyX :: TidyEnv -> Type -> PprStyle -> IfaceType+tidyToIfaceTypeStyX env ty sty+  | userStyle sty = tidyToIfaceTypeX env ty+  | otherwise     = toIfaceTypeX (tyCoVarsOfType ty) ty+     -- in latter case, don't tidy, as we'll be printing uniques.++tidyToIfaceType :: Type -> IfaceType+tidyToIfaceType = tidyToIfaceTypeX emptyTidyEnv++tidyToIfaceTypeX :: TidyEnv -> Type -> IfaceType+-- It's vital to tidy before converting to an IfaceType+-- or nested binders will become indistinguishable!+--+-- Also for the free type variables, tell toIfaceTypeX to+-- leave them as IfaceFreeTyVar.  This is super-important+-- for debug printing.+tidyToIfaceTypeX env ty = toIfaceTypeX (mkVarSet free_tcvs) (tidyType env' ty)+  where+    env'      = tidyFreeTyCoVars env free_tcvs+    free_tcvs = tyCoVarsOfTypeWellScoped ty++------------+pprCo, pprParendCo :: Coercion -> SDoc+pprCo       co = getPprStyle $ \ sty -> pprIfaceCoercion (tidyToIfaceCoSty co sty)+pprParendCo co = getPprStyle $ \ sty -> pprParendIfaceCoercion (tidyToIfaceCoSty co sty)++tidyToIfaceCoSty :: Coercion -> PprStyle -> IfaceCoercion+tidyToIfaceCoSty co sty+  | userStyle sty = tidyToIfaceCo co+  | otherwise     = toIfaceCoercionX (tyCoVarsOfCo co) co+     -- in latter case, don't tidy, as we'll be printing uniques.++tidyToIfaceCo :: Coercion -> IfaceCoercion+-- It's vital to tidy before converting to an IfaceType+-- or nested binders will become indistinguishable!+--+-- Also for the free type variables, tell toIfaceCoercionX to+-- leave them as IfaceFreeCoVar.  This is super-important+-- for debug printing.+tidyToIfaceCo co = toIfaceCoercionX (mkVarSet free_tcvs) (tidyCo env co)+  where+    env       = tidyFreeTyCoVars emptyTidyEnv free_tcvs+    free_tcvs = scopedSort $ tyCoVarsOfCoList co+------------+pprClassPred :: Class -> [Type] -> SDoc+pprClassPred clas tys = pprTypeApp (classTyCon clas) tys++------------+pprTheta :: ThetaType -> SDoc+pprTheta = pprIfaceContext topPrec . map tidyToIfaceType++pprParendTheta :: ThetaType -> SDoc+pprParendTheta = pprIfaceContext appPrec . map tidyToIfaceType++pprThetaArrowTy :: ThetaType -> SDoc+pprThetaArrowTy = pprIfaceContextArr . map tidyToIfaceType++------------------+pprSigmaType :: Type -> SDoc+pprSigmaType = pprIfaceSigmaType ShowForAllWhen . tidyToIfaceType++pprForAll :: [TyCoVarBinder] -> SDoc+pprForAll tvs = pprIfaceForAll (map toIfaceForAllBndr tvs)++-- | Print a user-level forall; see Note [When to print foralls] in this module.+pprUserForAll :: [TyCoVarBinder] -> SDoc+pprUserForAll = pprUserIfaceForAll . map toIfaceForAllBndr++pprTCvBndrs :: [TyCoVarBinder] -> SDoc+pprTCvBndrs tvs = sep (map pprTCvBndr tvs)++pprTCvBndr :: TyCoVarBinder -> SDoc+pprTCvBndr = pprTyVar . binderVar++pprTyVars :: [TyVar] -> SDoc+pprTyVars tvs = sep (map pprTyVar tvs)++pprTyVar :: TyVar -> SDoc+-- Print a type variable binder with its kind (but not if *)+-- Here we do not go via IfaceType, because the duplication with+-- pprIfaceTvBndr is minimal, and the loss of uniques etc in+-- debug printing is disastrous+pprTyVar tv+  | isLiftedTypeKind kind = ppr tv+  | otherwise             = parens (ppr tv <+> dcolon <+> ppr kind)+  where+    kind = tyVarKind tv++-----------------+debugPprType :: Type -> SDoc+-- ^ debugPprType is a simple pretty printer that prints a type+-- without going through IfaceType.  It does not format as prettily+-- as the normal route, but it's much more direct, and that can+-- be useful for debugging.  E.g. with -dppr-debug it prints the+-- kind on type-variable /occurrences/ which the normal route+-- fundamentally cannot do.+debugPprType ty = debug_ppr_ty topPrec ty++debug_ppr_ty :: PprPrec -> Type -> SDoc+debug_ppr_ty _ (LitTy l)+  = ppr l++debug_ppr_ty _ (TyVarTy tv)+  = ppr tv  -- With -dppr-debug we get (tv :: kind)++debug_ppr_ty prec (FunTy { ft_af = af, ft_arg = arg, ft_res = res })+  = maybeParen prec funPrec $+    sep [debug_ppr_ty funPrec arg, arrow <+> debug_ppr_ty prec res]+  where+    arrow = case af of+              VisArg   -> text "->"+              InvisArg -> text "=>"++debug_ppr_ty prec (TyConApp tc tys)+  | null tys  = ppr tc+  | otherwise = maybeParen prec appPrec $+                hang (ppr tc) 2 (sep (map (debug_ppr_ty appPrec) tys))++debug_ppr_ty _ (AppTy t1 t2)+  = hang (debug_ppr_ty appPrec t1)  -- Print parens so we see ((a b) c)+       2 (debug_ppr_ty appPrec t2)  -- so that we can distinguish+                                    -- TyConApp from AppTy++debug_ppr_ty prec (CastTy ty co)+  = maybeParen prec topPrec $+    hang (debug_ppr_ty topPrec ty)+       2 (text "|>" <+> ppr co)++debug_ppr_ty _ (CoercionTy co)+  = parens (text "CO" <+> ppr co)++debug_ppr_ty prec ty@(ForAllTy {})+  | (tvs, body) <- split ty+  = maybeParen prec funPrec $+    hang (text "forall" <+> fsep (map ppr tvs) <> dot)+         -- The (map ppr tvs) will print kind-annotated+         -- tvs, because we are (usually) in debug-style+       2 (ppr body)+  where+    split ty | ForAllTy tv ty' <- ty+             , (tvs, body) <- split ty'+             = (tv:tvs, body)+             | otherwise+             = ([], ty)++{-+Note [When to print foralls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Mostly we want to print top-level foralls when (and only when) the user specifies+-fprint-explicit-foralls.  But when kind polymorphism is at work, that suppresses+too much information; see #9018.++So I'm trying out this rule: print explicit foralls if+  a) User specifies -fprint-explicit-foralls, or+  b) Any of the quantified type variables has a kind+     that mentions a kind variable++This catches common situations, such as a type siguature+     f :: m a+which means+      f :: forall k. forall (m :: k->*) (a :: k). m a+We really want to see both the "forall k" and the kind signatures+on m and a.  The latter comes from pprTCvBndr.++Note [Infix type variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+With TypeOperators you can say++   f :: (a ~> b) -> b++and the (~>) is considered a type variable.  However, the type+pretty-printer in this module will just see (a ~> b) as++   App (App (TyVarTy "~>") (TyVarTy "a")) (TyVarTy "b")++So it'll print the type in prefix form.  To avoid confusion we must+remember to parenthesise the operator, thus++   (~>) a b -> b++See #2766.+-}++pprDataCons :: TyCon -> SDoc+pprDataCons = sepWithVBars . fmap pprDataConWithArgs . tyConDataCons+  where+    sepWithVBars [] = empty+    sepWithVBars docs = sep (punctuate (space <> vbar) docs)++pprDataConWithArgs :: DataCon -> SDoc+pprDataConWithArgs dc = sep [forAllDoc, thetaDoc, ppr dc <+> argsDoc]+  where+    (_univ_tvs, _ex_tvs, _eq_spec, theta, arg_tys, _res_ty) = dataConFullSig dc+    user_bndrs = dataConUserTyVarBinders dc+    forAllDoc  = pprUserForAll user_bndrs+    thetaDoc   = pprThetaArrowTy theta+    argsDoc    = hsep (fmap pprParendType arg_tys)+++pprTypeApp :: TyCon -> [Type] -> SDoc+pprTypeApp tc tys+  = pprIfaceTypeApp topPrec (toIfaceTyCon tc)+                            (toIfaceTcArgs tc tys)+    -- TODO: toIfaceTcArgs seems rather wasteful here++------------------+-- | Display all kind information (with @-fprint-explicit-kinds@) when the+-- provided 'Bool' argument is 'True'.+-- See @Note [Kind arguments in error messages]@ in TcErrors.+pprWithExplicitKindsWhen :: Bool -> SDoc -> SDoc+pprWithExplicitKindsWhen b+  = updSDocDynFlags $ \dflags ->+      if b then gopt_set dflags Opt_PrintExplicitKinds+           else dflags++-- | This variant preserves any use of TYPE in a type, effectively+-- locally setting -fprint-explicit-runtime-reps.+pprWithTYPE :: Type -> SDoc+pprWithTYPE ty = updSDocDynFlags (flip gopt_set Opt_PrintExplicitRuntimeReps) $+                 ppr ty++-- | Pretty prints a 'TyCon', using the family instance in case of a+-- representation tycon.  For example:+--+-- > data T [a] = ...+--+-- In that case we want to print @T [a]@, where @T@ is the family 'TyCon'+pprSourceTyCon :: TyCon -> SDoc+pprSourceTyCon tycon+  | Just (fam_tc, tys) <- tyConFamInst_maybe tycon+  = ppr $ fam_tc `TyConApp` tys        -- can't be FunTyCon+  | otherwise+  = ppr tycon
+ types/TyCoPpr.hs-boot view
@@ -0,0 +1,10 @@+module TyCoPpr where++import {-# SOURCE #-} TyCoRep (Type, Kind, Coercion, TyLit)+import Outputable++pprType :: Type -> SDoc+pprKind :: Kind -> SDoc+pprCo :: Coercion -> SDoc+pprTyLit :: TyLit -> SDoc+
types/TyCoRep.hs view
@@ -9,3902 +9,1654 @@   CoAxiom   TyCon    imports Class, CoAxiom   TyCoRep  imports Class, CoAxiom, TyCon-  TysPrim  imports TyCoRep ( including mkTyConTy )-  Kind     imports TysPrim ( mainly for primitive kinds )-  Type     imports Kind-  Coercion imports Type--}---- We expose the relevant stuff from this module via the Type module-{-# OPTIONS_HADDOCK not-home #-}-{-# LANGUAGE CPP, DeriveDataTypeable, MultiWayIf #-}--module TyCoRep (-        TyThing(..), tyThingCategory, pprTyThingCategory, pprShortTyThing,--        -- * Types-        Type(..),-        TyLit(..),-        KindOrType, Kind,-        KnotTied,-        PredType, ThetaType,      -- Synonyms-        ArgFlag(..),--        -- * Coercions-        Coercion(..),-        UnivCoProvenance(..),-        CoercionHole(..), coHoleCoVar, setCoHoleCoVar,-        CoercionN, CoercionR, CoercionP, KindCoercion,-        MCoercion(..), MCoercionR, MCoercionN,--        -- * Functions over types-        mkTyConTy, mkTyVarTy, mkTyVarTys,-        mkTyCoVarTy, mkTyCoVarTys,-        mkFunTy, mkFunTys, mkTyCoForAllTy, mkForAllTys,-        mkForAllTy,-        mkTyCoPiTy, mkTyCoPiTys,-        mkPiTys,--        kindRep_maybe, kindRep,-        isLiftedTypeKind, isUnliftedTypeKind,-        isLiftedRuntimeRep, isUnliftedRuntimeRep,-        isRuntimeRepTy, isRuntimeRepVar,-        sameVis,--        -- * Functions over binders-        TyCoBinder(..), TyCoVarBinder, TyBinder,-        binderVar, binderVars, binderType, binderArgFlag,-        delBinderVar,-        isInvisibleArgFlag, isVisibleArgFlag,-        isInvisibleBinder, isVisibleBinder,-        isTyBinder, isNamedBinder,-        tyCoBinderArgFlag,--        -- * Functions over coercions-        pickLR,--        -- * Pretty-printing-        pprType, pprParendType, pprPrecType, pprPrecTypeX,-        pprTypeApp, pprTCvBndr, pprTCvBndrs,-        pprSigmaType,-        pprTheta, pprParendTheta, pprForAll, pprUserForAll,-        pprTyVar, pprTyVars,-        pprThetaArrowTy, pprClassPred,-        pprKind, pprParendKind, pprTyLit,-        PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen,-        pprDataCons, pprWithExplicitKindsWhen,--        pprCo, pprParendCo,--        debugPprType,--        -- * Free variables-        tyCoVarsOfType, tyCoVarsOfTypeDSet, tyCoVarsOfTypes, tyCoVarsOfTypesDSet,-        tyCoFVsBndr, tyCoFVsVarBndr, tyCoFVsVarBndrs,-        tyCoFVsOfType, tyCoVarsOfTypeList,-        tyCoFVsOfTypes, tyCoVarsOfTypesList,-        coVarsOfType, coVarsOfTypes,-        coVarsOfCo, coVarsOfCos,-        tyCoVarsOfCo, tyCoVarsOfCos,-        tyCoVarsOfCoDSet,-        tyCoFVsOfCo, tyCoFVsOfCos,-        tyCoVarsOfCoList, tyCoVarsOfProv,-        almostDevoidCoVarOfCo,-        injectiveVarsOfType, tyConAppNeedsKindSig,--        noFreeVarsOfType, noFreeVarsOfCo,--        -- * Substitutions-        TCvSubst(..), TvSubstEnv, CvSubstEnv,-        emptyTvSubstEnv, emptyCvSubstEnv, composeTCvSubstEnv, composeTCvSubst,-        emptyTCvSubst, mkEmptyTCvSubst, isEmptyTCvSubst,-        mkTCvSubst, mkTvSubst, mkCvSubst,-        getTvSubstEnv,-        getCvSubstEnv, getTCvInScope, getTCvSubstRangeFVs,-        isInScope, notElemTCvSubst,-        setTvSubstEnv, setCvSubstEnv, zapTCvSubst,-        extendTCvInScope, extendTCvInScopeList, extendTCvInScopeSet,-        extendTCvSubst, extendTCvSubstWithClone,-        extendCvSubst, extendCvSubstWithClone,-        extendTvSubst, extendTvSubstBinderAndInScope, extendTvSubstWithClone,-        extendTvSubstList, extendTvSubstAndInScope,-        extendTCvSubstList,-        unionTCvSubst, zipTyEnv, zipCoEnv, mkTyCoInScopeSet,-        zipTvSubst, zipCvSubst,-        zipTCvSubst,-        mkTvSubstPrs,--        substTyWith, substTyWithCoVars, substTysWith, substTysWithCoVars,-        substCoWith,-        substTy, substTyAddInScope,-        substTyUnchecked, substTysUnchecked, substThetaUnchecked,-        substTyWithUnchecked,-        substCoUnchecked, substCoWithUnchecked,-        substTyWithInScope,-        substTys, substTheta,-        lookupTyVar,-        substCo, substCos, substCoVar, substCoVars, lookupCoVar,-        cloneTyVarBndr, cloneTyVarBndrs,-        substVarBndr, substVarBndrs,-        substTyVarBndr, substTyVarBndrs,-        substCoVarBndr,-        substTyVar, substTyVars, substTyCoVars,-        substForAllCoBndr,-        substVarBndrUsing, substForAllCoBndrUsing,-        checkValidSubst, isValidTCvSubst,--        -- * Tidying type related things up for printing-        tidyType,      tidyTypes,-        tidyOpenType,  tidyOpenTypes,-        tidyOpenKind,-        tidyVarBndr, tidyVarBndrs, tidyFreeTyCoVars, avoidNameClashes,-        tidyOpenTyCoVar, tidyOpenTyCoVars,-        tidyTyCoVarOcc,-        tidyTopType,-        tidyKind,-        tidyCo, tidyCos,-        tidyTyCoVarBinder, tidyTyCoVarBinders,--        -- * Sizes-        typeSize, coercionSize, provSize-    ) where--#include "HsVersions.h"--import GhcPrelude--import {-# SOURCE #-} DataCon( dataConFullSig-                             , dataConUserTyVarBinders-                             , DataCon )-import {-# SOURCE #-} Type( isPredTy, isCoercionTy, mkAppTy, mkCastTy-                          , tyCoVarsOfTypeWellScoped-                          , tyCoVarsOfTypesWellScoped-                          , scopedSort-                          , coreView )-   -- Transitively pulls in a LOT of stuff, better to break the loop--import {-# SOURCE #-} Coercion-import {-# SOURCE #-} ConLike ( ConLike(..), conLikeName )-import {-# SOURCE #-} ToIface( toIfaceTypeX, toIfaceTyLit, toIfaceForAllBndr-                             , toIfaceTyCon, toIfaceTcArgs, toIfaceCoercionX )---- friends:-import IfaceType-import Var-import VarEnv-import VarSet-import Name hiding ( varName )-import TyCon-import Class-import CoAxiom-import FV---- others-import BasicTypes ( LeftOrRight(..), PprPrec(..), topPrec, sigPrec, opPrec-                  , funPrec, appPrec, maybeParen, pickLR )-import PrelNames-import Outputable-import DynFlags-import FastString-import Pair-import UniqSupply-import Util-import UniqFM-import UniqSet---- libraries-import qualified Data.Data as Data hiding ( TyCon )-import Data.List-import Data.IORef ( IORef )   -- for CoercionHole--{--%************************************************************************-%*                                                                      *-                        TyThing-%*                                                                      *-%************************************************************************--Despite the fact that DataCon has to be imported via a hi-boot route,-this module seems the right place for TyThing, because it's needed for-funTyCon and all the types in TysPrim.--It is also SOURCE-imported into Name.hs---Note [ATyCon for classes]-~~~~~~~~~~~~~~~~~~~~~~~~~-Both classes and type constructors are represented in the type environment-as ATyCon.  You can tell the difference, and get to the class, with-   isClassTyCon :: TyCon -> Bool-   tyConClass_maybe :: TyCon -> Maybe Class-The Class and its associated TyCon have the same Name.--}---- | A global typecheckable-thing, essentially anything that has a name.--- Not to be confused with a 'TcTyThing', which is also a typecheckable--- thing but in the *local* context.  See 'TcEnv' for how to retrieve--- a 'TyThing' given a 'Name'.-data TyThing-  = AnId     Id-  | AConLike ConLike-  | ATyCon   TyCon       -- TyCons and classes; see Note [ATyCon for classes]-  | ACoAxiom (CoAxiom Branched)--instance Outputable TyThing where-  ppr = pprShortTyThing--instance NamedThing TyThing where       -- Can't put this with the type-  getName (AnId id)     = getName id    -- decl, because the DataCon instance-  getName (ATyCon tc)   = getName tc    -- isn't visible there-  getName (ACoAxiom cc) = getName cc-  getName (AConLike cl) = conLikeName cl--pprShortTyThing :: TyThing -> SDoc--- c.f. PprTyThing.pprTyThing, which prints all the details-pprShortTyThing thing-  = pprTyThingCategory thing <+> quotes (ppr (getName thing))--pprTyThingCategory :: TyThing -> SDoc-pprTyThingCategory = text . capitalise . tyThingCategory--tyThingCategory :: TyThing -> String-tyThingCategory (ATyCon tc)-  | isClassTyCon tc = "class"-  | otherwise       = "type constructor"-tyThingCategory (ACoAxiom _) = "coercion axiom"-tyThingCategory (AnId   _)   = "identifier"-tyThingCategory (AConLike (RealDataCon _)) = "data constructor"-tyThingCategory (AConLike (PatSynCon _))  = "pattern synonym"---{- **********************************************************************-*                                                                       *-                        Type-*                                                                       *-********************************************************************** -}---- | The key representation of types within the compiler--type KindOrType = Type -- See Note [Arguments to type constructors]---- | The key type representing kinds in the compiler.-type Kind = Type---- If you edit this type, you may need to update the GHC formalism--- See Note [GHC Formalism] in coreSyn/CoreLint.hs-data Type-  -- See Note [Non-trivial definitional equality]-  = TyVarTy Var -- ^ Vanilla type or kind variable (*never* a coercion variable)--  | AppTy-        Type-        Type            -- ^ Type application to something other than a 'TyCon'. Parameters:-                        ---                        --  1) Function: must /not/ be a 'TyConApp' or 'CastTy',-                        --     must be another 'AppTy', or 'TyVarTy'-                        --     See Note [Respecting definitional equality] (EQ1) about the-                        --     no 'CastTy' requirement-                        ---                        --  2) Argument type--  | TyConApp-        TyCon-        [KindOrType]    -- ^ Application of a 'TyCon', including newtypes /and/ synonyms.-                        -- Invariant: saturated applications of 'FunTyCon' must-                        -- use 'FunTy' and saturated synonyms must use their own-                        -- constructors. However, /unsaturated/ 'FunTyCon's-                        -- do appear as 'TyConApp's.-                        -- Parameters:-                        ---                        -- 1) Type constructor being applied to.-                        ---                        -- 2) Type arguments. Might not have enough type arguments-                        --    here to saturate the constructor.-                        --    Even type synonyms are not necessarily saturated;-                        --    for example unsaturated type synonyms-                        --    can appear as the right hand side of a type synonym.--  | ForAllTy-        {-# UNPACK #-} !TyCoVarBinder-        Type            -- ^ A Π type.--  | FunTy Type Type     -- ^ t1 -> t2   Very common, so an important special case--  | LitTy TyLit     -- ^ Type literals are similar to type constructors.--  | CastTy-        Type-        KindCoercion  -- ^ A kind cast. The coercion is always nominal.-                      -- INVARIANT: The cast is never refl.-                      -- INVARIANT: The Type is not a CastTy (use TransCo instead)-                      -- See Note [Respecting definitional equality] (EQ2) and (EQ3)--  | CoercionTy-        Coercion    -- ^ Injection of a Coercion into a type-                    -- This should only ever be used in the RHS of an AppTy,-                    -- in the list of a TyConApp, when applying a promoted-                    -- GADT data constructor--  deriving Data.Data----- NOTE:  Other parts of the code assume that type literals do not contain--- types or type variables.-data TyLit-  = NumTyLit Integer-  | StrTyLit FastString-  deriving (Eq, Ord, Data.Data)--{- Note [Arguments to type constructors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Because of kind polymorphism, in addition to type application we now-have kind instantiation. We reuse the same notations to do so.--For example:--  Just (* -> *) Maybe-  Right * Nat Zero--are represented by:--  TyConApp (PromotedDataCon Just) [* -> *, Maybe]-  TyConApp (PromotedDataCon Right) [*, Nat, (PromotedDataCon Zero)]--Important note: Nat is used as a *kind* and not as a type. This can be-confusing, since type-level Nat and kind-level Nat are identical. We-use the kind of (PromotedDataCon Right) to know if its arguments are-kinds or types.--This kind instantiation only happens in TyConApp currently.--Note [Non-trivial definitional equality]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Is Int |> <*> the same as Int? YES! In order to reduce headaches,-we decide that any reflexive casts in types are just ignored.-(Indeed they must be. See Note [Respecting definitional equality].)-More generally, the `eqType` function, which defines Core's type equality-relation, ignores casts and coercion arguments, as long as the-two types have the same kind. This allows us to be a little sloppier-in keeping track of coercions, which is a good thing. It also means-that eqType does not depend on eqCoercion, which is also a good thing.--Why is this sensible? That is, why is something different than α-equivalence-appropriate for the implementation of eqType?--Anything smaller than ~ and homogeneous is an appropriate definition for-equality. The type safety of FC depends only on ~. Let's say η : τ ~ σ. Any-expression of type τ can be transmuted to one of type σ at any point by-casting. The same is true of expressions of type σ. So in some sense, τ and σ-are interchangeable.--But let's be more precise. If we examine the typing rules of FC (say, those in-https://cs.brynmawr.edu/~rae/papers/2015/equalities/equalities.pdf)-there are several places where the same metavariable is used in two different-premises to a rule. (For example, see Ty_App.) There is an implicit equality-check here. What definition of equality should we use? By convention, we use-α-equivalence. Take any rule with one (or more) of these implicit equality-checks. Then there is an admissible rule that uses ~ instead of the implicit-check, adding in casts as appropriate.--The only problem here is that ~ is heterogeneous. To make the kinds work out-in the admissible rule that uses ~, it is necessary to homogenize the-coercions. That is, if we have η : (τ : κ1) ~ (σ : κ2), then we don't use η;-we use η |> kind η, which is homogeneous.--The effect of this all is that eqType, the implementation of the implicit-equality check, can use any homogeneous relation that is smaller than ~, as-those rules must also be admissible.--A more drawn out argument around all of this is presented in Section 7.2 of-Richard E's thesis (http://cs.brynmawr.edu/~rae/papers/2016/thesis/eisenberg-thesis.pdf).--What would go wrong if we insisted on the casts matching? See the beginning of-Section 8 in the unpublished paper above. Theoretically, nothing at all goes-wrong. But in practical terms, getting the coercions right proved to be-nightmarish. And types would explode: during kind-checking, we often produce-reflexive kind coercions. When we try to cast by these, mkCastTy just discards-them. But if we used an eqType that distinguished between Int and Int |> <*>,-then we couldn't discard -- the output of kind-checking would be enormous,-and we would need enormous casts with lots of CoherenceCo's to straighten-them out.--Would anything go wrong if eqType respected type families? No, not at all. But-that makes eqType rather hard to implement.--Thus, the guideline for eqType is that it should be the largest-easy-to-implement relation that is still smaller than ~ and homogeneous. The-precise choice of relation is somewhat incidental, as long as the smart-constructors and destructors in Type respect whatever relation is chosen.--Another helpful principle with eqType is this:-- (EQ) If (t1 `eqType` t2) then I can replace t1 by t2 anywhere.--This principle also tells us that eqType must relate only types with the-same kinds.--Note [Respecting definitional equality]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Note [Non-trivial definitional equality] introduces the property (EQ).-How is this upheld?--Any function that pattern matches on all the constructors will have to-consider the possibility of CastTy. Presumably, those functions will handle-CastTy appropriately and we'll be OK.--More dangerous are the splitXXX functions. Let's focus on splitTyConApp.-We don't want it to fail on (T a b c |> co). Happily, if we have-  (T a b c |> co) `eqType` (T d e f)-then co must be reflexive. Why? eqType checks that the kinds are equal, as-well as checking that (a `eqType` d), (b `eqType` e), and (c `eqType` f).-By the kind check, we know that (T a b c |> co) and (T d e f) have the same-kind. So the only way that co could be non-reflexive is for (T a b c) to have-a different kind than (T d e f). But because T's kind is closed (all tycon kinds-are closed), the only way for this to happen is that one of the arguments has-to differ, leading to a contradiction. Thus, co is reflexive.--Accordingly, by eliminating reflexive casts, splitTyConApp need not worry-about outermost casts to uphold (EQ). Eliminating reflexive casts is done-in mkCastTy.--Unforunately, that's not the end of the story. Consider comparing-  (T a b c)      =?       (T a b |> (co -> <Type>)) (c |> co)-These two types have the same kind (Type), but the left type is a TyConApp-while the right type is not. To handle this case, we say that the right-hand-type is ill-formed, requiring an AppTy never to have a casted TyConApp-on its left. It is easy enough to pull around the coercions to maintain-this invariant, as done in Type.mkAppTy. In the example above, trying to-form the right-hand type will instead yield (T a b (c |> co |> sym co) |> <Type>).-Both the casts there are reflexive and will be dropped. Huzzah.--This idea of pulling coercions to the right works for splitAppTy as well.--However, there is one hiccup: it's possible that a coercion doesn't relate two-Pi-types. For example, if we have @type family Fun a b where Fun a b = a -> b@,-then we might have (T :: Fun Type Type) and (T |> axFun) Int. That axFun can't-be pulled to the right. But we don't need to pull it: (T |> axFun) Int is not-`eqType` to any proper TyConApp -- thus, leaving it where it is doesn't violate-our (EQ) property.--Lastly, in order to detect reflexive casts reliably, we must make sure not-to have nested casts: we update (t |> co1 |> co2) to (t |> (co1 `TransCo` co2)).--In sum, in order to uphold (EQ), we need the following three invariants:--  (EQ1) No decomposable CastTy to the left of an AppTy, where a decomposable-        cast is one that relates either a FunTy to a FunTy or a-        ForAllTy to a ForAllTy.-  (EQ2) No reflexive casts in CastTy.-  (EQ3) No nested CastTys.-  (EQ4) No CastTy over (ForAllTy (Bndr tyvar vis) body).-        See Note [Weird typing rule for ForAllTy] in Type.--These invariants are all documented above, in the declaration for Type.--Note [Unused coercion variable in ForAllTy]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have-  \(co:t1 ~ t2). e--What type should we give to this expression?-  (1) forall (co:t1 ~ t2) -> t-  (2) (t1 ~ t2) -> t--If co is used in t, (1) should be the right choice.-if co is not used in t, we would like to have (1) and (2) equivalent.--However, we want to keep eqType simple and don't want eqType (1) (2) to return-True in any case.--We decide to always construct (2) if co is not used in t.--Thus in mkTyCoForAllTy, we check whether the variable is a coercion-variable and whether it is used in the body. If so, it returns a FunTy-instead of a ForAllTy.--There are cases we want to skip the check. For example, the check is unnecessary-when it is known from the context that the input variable is a type variable.-In those cases, we use mkForAllTy.--}---- | A type labeled 'KnotTied' might have knot-tied tycons in it. See--- Note [Type checking recursive type and class declarations] in--- TcTyClsDecls-type KnotTied ty = ty--{- **********************************************************************-*                                                                       *-                  TyCoBinder and ArgFlag-*                                                                       *-********************************************************************** -}---- | A 'TyCoBinder' represents an argument to a function. TyCoBinders can be--- dependent ('Named') or nondependent ('Anon'). They may also be visible or--- not. See Note [TyCoBinders]-data TyCoBinder-  = Named TyCoVarBinder -- A type-lambda binder-  | Anon Type           -- A term-lambda binder. Type here can be CoercionTy.-                        -- Visibility is determined by the type (Constraint vs. *)-  deriving Data.Data---- | 'TyBinder' is like 'TyCoBinder', but there can only be 'TyVarBinder'--- in the 'Named' field.-type TyBinder = TyCoBinder---- | Remove the binder's variable from the set, if the binder has--- a variable.-delBinderVar :: VarSet -> TyCoVarBinder -> VarSet-delBinderVar vars (Bndr tv _) = vars `delVarSet` tv---- | Does this binder bind an invisible argument?-isInvisibleBinder :: TyCoBinder -> Bool-isInvisibleBinder (Named (Bndr _ vis)) = isInvisibleArgFlag vis-isInvisibleBinder (Anon ty)            = isPredTy ty---- | Does this binder bind a visible argument?-isVisibleBinder :: TyCoBinder -> Bool-isVisibleBinder = not . isInvisibleBinder--isNamedBinder :: TyCoBinder -> Bool-isNamedBinder (Named {}) = True-isNamedBinder (Anon {})  = False---- | If its a named binder, is the binder a tyvar?--- Returns True for nondependent binder.-isTyBinder :: TyCoBinder -> Bool-isTyBinder (Named bnd) = isTyVarBinder bnd-isTyBinder _ = True--tyCoBinderArgFlag :: TyCoBinder -> ArgFlag-tyCoBinderArgFlag (Named (Bndr _ flag)) = flag-tyCoBinderArgFlag (Anon ty)- | isPredTy ty = Inferred- | otherwise = Required--{- Note [TyCoBinders]-~~~~~~~~~~~~~~~~~~~-A ForAllTy contains a TyCoVarBinder.  But a type can be decomposed-to a telescope consisting of a [TyCoBinder]--A TyCoBinder represents the type of binders -- that is, the type of an-argument to a Pi-type. GHC Core currently supports two different-Pi-types:-- * A non-dependent function type,-   written with ->, e.g. ty1 -> ty2-   represented as FunTy ty1 ty2. These are-   lifted to Coercions with the corresponding FunCo.-- * A dependent compile-time-only polytype,-   written with forall, e.g.  forall (a:*). ty-   represented as ForAllTy (Bndr a v) ty--Both Pi-types classify terms/types that take an argument. In other-words, if `x` is either a function or a polytype, `x arg` makes sense-(for an appropriate `arg`).---Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* A ForAllTy (used for both types and kinds) contains a TyCoVarBinder.-  Each TyCoVarBinder-      Bndr a tvis-  is equipped with tvis::ArgFlag, which says whether or not arguments-  for this binder should be visible (explicit) in source Haskell.--* A TyCon contains a list of TyConBinders.  Each TyConBinder-      Bndr a cvis-  is equipped with cvis::TyConBndrVis, which says whether or not type-  and kind arguments for this TyCon should be visible (explicit) in-  source Haskell.--This table summarises the visibility rules:-----------------------------------------------------------------------------------------|                                                      Occurrences look like this-|                             GHC displays type as     in Haskell source code-|---------------------------------------------------------------------------------------| Bndr a tvis :: TyCoVarBinder, in the binder of ForAllTy for a term-|  tvis :: ArgFlag-|  tvis = Inferred:            f :: forall {a}. type    Arg not allowed:  f-                               f :: forall {co}. type   Arg not allowed:  f-|  tvis = Specified:           f :: forall a. type      Arg optional:     f  or  f @Int-|  tvis = Required:            T :: forall k -> type    Arg required:     T *-|    This last form is illegal in terms: See Note [No Required TyCoBinder in terms]-|-| Bndr k cvis :: TyConBinder, in the TyConBinders of a TyCon-|  cvis :: TyConBndrVis-|  cvis = AnonTCB:             T :: kind -> kind        Required:            T *-|  cvis = NamedTCB Inferred:   T :: forall {k}. kind    Arg not allowed:     T-|                              T :: forall {co}. kind   Arg not allowed:     T-|  cvis = NamedTCB Specified:  T :: forall k. kind      Arg not allowed[1]:  T-|  cvis = NamedTCB Required:   T :: forall k -> kind    Required:            T *------------------------------------------------------------------------------------------[1] In types, in the Specified case, it would make sense to allow-    optional kind applications, thus (T @*), but we have not-    yet implemented that------ In term declarations ------* Inferred.  Function defn, with no signature:  f1 x = x-  We infer f1 :: forall {a}. a -> a, with 'a' Inferred-  It's Inferred because it doesn't appear in any-  user-written signature for f1--* Specified.  Function defn, with signature (implicit forall):-     f2 :: a -> a; f2 x = x-  So f2 gets the type f2 :: forall a. a -> a, with 'a' Specified-  even though 'a' is not bound in the source code by an explicit forall--* Specified.  Function defn, with signature (explicit forall):-     f3 :: forall a. a -> a; f3 x = x-  So f3 gets the type f3 :: forall a. a -> a, with 'a' Specified--* Inferred/Specified.  Function signature with inferred kind polymorphism.-     f4 :: a b -> Int-  So 'f4' gets the type f4 :: forall {k} (a:k->*) (b:k). a b -> Int-  Here 'k' is Inferred (it's not mentioned in the type),-  but 'a' and 'b' are Specified.--* Specified.  Function signature with explicit kind polymorphism-     f5 :: a (b :: k) -> Int-  This time 'k' is Specified, because it is mentioned explicitly,-  so we get f5 :: forall (k:*) (a:k->*) (b:k). a b -> Int--* Similarly pattern synonyms:-  Inferred - from inferred types (e.g. no pattern type signature)-           - or from inferred kind polymorphism------ In type declarations ------* Inferred (k)-     data T1 a b = MkT1 (a b)-  Here T1's kind is  T1 :: forall {k:*}. (k->*) -> k -> *-  The kind variable 'k' is Inferred, since it is not mentioned--  Note that 'a' and 'b' correspond to /Anon/ TyCoBinders in T1's kind,-  and Anon binders don't have a visibility flag. (Or you could think-  of Anon having an implicit Required flag.)--* Specified (k)-     data T2 (a::k->*) b = MkT (a b)-  Here T's kind is  T :: forall (k:*). (k->*) -> k -> *-  The kind variable 'k' is Specified, since it is mentioned in-  the signature.--* Required (k)-     data T k (a::k->*) b = MkT (a b)-  Here T's kind is  T :: forall k:* -> (k->*) -> k -> *-  The kind is Required, since it bound in a positional way in T's declaration-  Every use of T must be explicitly applied to a kind--* Inferred (k1), Specified (k)-     data T a b (c :: k) = MkT (a b) (Proxy c)-  Here T's kind is  T :: forall {k1:*} (k:*). (k1->*) -> k1 -> k -> *-  So 'k' is Specified, because it appears explicitly,-  but 'k1' is Inferred, because it does not--Generally, in the list of TyConBinders for a TyCon,--* Inferred arguments always come first-* Specified, Anon and Required can be mixed--e.g.-  data Foo (a :: Type) :: forall b. (a -> b -> Type) -> Type where ...--Here Foo's TyConBinders are-   [Required 'a', Specified 'b', Anon]-and its kind prints as-   Foo :: forall a -> forall b. (a -> b -> Type) -> Type--See also Note [Required, Specified, and Inferred for types] in TcTyClsDecls------ Printing ------- We print forall types with enough syntax to tell you their visibility- flag.  But this is not source Haskell, and these types may not all- be parsable.-- Specified: a list of Specified binders is written between `forall` and `.`:-               const :: forall a b. a -> b -> a-- Inferred:  with -fprint-explicit-foralls, Inferred binders are written-            in braces:-               f :: forall {k} (a:k). S k a -> Int-            Otherwise, they are printed like Specified binders.-- Required: binders are put between `forall` and `->`:-              T :: forall k -> *------ Other points -------* In classic Haskell, all named binders (that is, the type variables in-  a polymorphic function type f :: forall a. a -> a) have been Inferred.--* Inferred variables correspond to "generalized" variables from the-  Visible Type Applications paper (ESOP'16).--Note [No Required TyCoBinder in terms]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We don't allow Required foralls for term variables, including pattern-synonyms and data constructors.  Why?  Because then an application-would need a /compulsory/ type argument (possibly without an "@"?),-thus (f Int); and we don't have concrete syntax for that.--We could change this decision, but Required, Named TyCoBinders are rare-anyway.  (Most are Anons.)--However the type of a term can (just about) have a required quantifier;-see Note [Required quantifiers in the type of a term] in TcExpr.--}---{- **********************************************************************-*                                                                       *-                        PredType-*                                                                       *-********************************************************************** -}----- | A type of the form @p@ of kind @Constraint@ represents a value whose type is--- the Haskell predicate @p@, where a predicate is what occurs before--- the @=>@ in a Haskell type.------ We use 'PredType' as documentation to mark those types that we guarantee to have--- this kind.------ It can be expanded into its representation, but:------ * The type checker must treat it as opaque------ * The rest of the compiler treats it as transparent------ Consider these examples:------ > f :: (Eq a) => a -> Int--- > g :: (?x :: Int -> Int) => a -> Int--- > h :: (r\l) => {r} => {l::Int | r}------ Here the @Eq a@ and @?x :: Int -> Int@ and @r\l@ are all called \"predicates\"-type PredType = Type---- | A collection of 'PredType's-type ThetaType = [PredType]--{--(We don't support TREX records yet, but the setup is designed-to expand to allow them.)--A Haskell qualified type, such as that for f,g,h above, is-represented using-        * a FunTy for the double arrow-        * with a type of kind Constraint as the function argument--The predicate really does turn into a real extra argument to the-function.  If the argument has type (p :: Constraint) then the predicate p is-represented by evidence of type p.---%************************************************************************-%*                                                                      *-            Simple constructors-%*                                                                      *-%************************************************************************--These functions are here so that they can be used by TysPrim,-which in turn is imported by Type--}--mkTyVarTy  :: TyVar   -> Type-mkTyVarTy v = ASSERT2( isTyVar v, ppr v <+> dcolon <+> ppr (tyVarKind v) )-              TyVarTy v--mkTyVarTys :: [TyVar] -> [Type]-mkTyVarTys = map mkTyVarTy -- a common use of mkTyVarTy--mkTyCoVarTy :: TyCoVar -> Type-mkTyCoVarTy v-  | isTyVar v-  = TyVarTy v-  | otherwise-  = CoercionTy (CoVarCo v)--mkTyCoVarTys :: [TyCoVar] -> [Type]-mkTyCoVarTys = map mkTyCoVarTy--infixr 3 `mkFunTy`      -- Associates to the right--- | Make an arrow type-mkFunTy :: Type -> Type -> Type-mkFunTy arg res = FunTy arg res---- | Make nested arrow types-mkFunTys :: [Type] -> Type -> Type-mkFunTys tys ty = foldr mkFunTy ty tys---- | If tv is a coercion variable and it is not used in the body, returns--- a FunTy, otherwise makes a forall type.--- See Note [Unused coercion variable in ForAllTy]-mkTyCoForAllTy :: TyCoVar -> ArgFlag -> Type -> Type-mkTyCoForAllTy tv vis ty-  | isCoVar tv-  , not (tv `elemVarSet` tyCoVarsOfType ty)-  = ASSERT( vis == Inferred )-    mkFunTy (varType tv) ty-  | otherwise-  = ForAllTy (Bndr tv vis) ty---- | Like 'mkTyCoForAllTy', but does not check the occurrence of the binder--- See Note [Unused coercion variable in ForAllTy]-mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type-mkForAllTy tv vis ty = ForAllTy (Bndr tv vis) ty---- | Wraps foralls over the type using the provided 'TyCoVar's from left to right-mkForAllTys :: [TyCoVarBinder] -> Type -> Type-mkForAllTys tyvars ty = foldr ForAllTy ty tyvars--mkTyCoPiTy :: TyCoBinder -> Type -> Type-mkTyCoPiTy (Anon ty1) ty2           = FunTy ty1 ty2-mkTyCoPiTy (Named (Bndr tv vis)) ty = mkTyCoForAllTy tv vis ty---- | Like 'mkTyCoPiTy', but does not check the occurrence of the binder-mkPiTy:: TyCoBinder -> Type -> Type-mkPiTy (Anon ty1) ty2           = FunTy ty1 ty2-mkPiTy (Named (Bndr tv vis)) ty = mkForAllTy tv vis ty--mkTyCoPiTys :: [TyCoBinder] -> Type -> Type-mkTyCoPiTys tbs ty = foldr mkTyCoPiTy ty tbs---- | Like 'mkTyCoPiTys', but does not check the occurrence of the binder-mkPiTys :: [TyCoBinder] -> Type -> Type-mkPiTys tbs ty = foldr mkPiTy ty tbs---- | Create the plain type constructor type which has been applied to no type arguments at all.-mkTyConTy :: TyCon -> Type-mkTyConTy tycon = TyConApp tycon []--{--Some basic functions, put here to break loops eg with the pretty printer--}---- | Extract the RuntimeRep classifier of a type from its kind. For example,--- @kindRep * = LiftedRep@; Panics if this is not possible.--- Treats * and Constraint as the same-kindRep :: HasDebugCallStack => Kind -> Type-kindRep k = case kindRep_maybe k of-              Just r  -> r-              Nothing -> pprPanic "kindRep" (ppr k)---- | Given a kind (TYPE rr), extract its RuntimeRep classifier rr.--- For example, @kindRep_maybe * = Just LiftedRep@--- Returns 'Nothing' if the kind is not of form (TYPE rr)--- Treats * and Constraint as the same-kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type-kindRep_maybe kind-  | Just kind' <- coreView kind = kindRep_maybe kind'-  | TyConApp tc [arg] <- kind-  , tc `hasKey` tYPETyConKey    = Just arg-  | otherwise                   = Nothing---- | This version considers Constraint to be the same as *. Returns True--- if the argument is equivalent to Type/Constraint and False otherwise.--- See Note [Kind Constraint and kind Type]-isLiftedTypeKind :: Kind -> Bool-isLiftedTypeKind kind-  = case kindRep_maybe kind of-      Just rep -> isLiftedRuntimeRep rep-      Nothing  -> False---- | Returns True if the kind classifies unlifted types and False otherwise.--- Note that this returns False for levity-polymorphic kinds, which may--- be specialized to a kind that classifies unlifted types.-isUnliftedTypeKind :: Kind -> Bool-isUnliftedTypeKind kind-  = case kindRep_maybe kind of-      Just rep -> isUnliftedRuntimeRep rep-      Nothing  -> False--isLiftedRuntimeRep, isUnliftedRuntimeRep :: Type -> Bool--- isLiftedRuntimeRep is true of LiftedRep :: RuntimeRep--- Similarly isUnliftedRuntimeRep-isLiftedRuntimeRep rep-  | Just rep' <- coreView rep          = isLiftedRuntimeRep rep'-  | TyConApp rr_tc args <- rep-  , rr_tc `hasKey` liftedRepDataConKey = ASSERT( null args ) True-  | otherwise                          = False--isUnliftedRuntimeRep rep-  | Just rep' <- coreView rep          = isUnliftedRuntimeRep rep'-  | TyConApp rr_tc args <- rep-  , isUnliftedRuntimeRepTyCon rr_tc    = ASSERT( null args ) True-  | otherwise                          = False--isUnliftedRuntimeRepTyCon :: TyCon -> Bool-isUnliftedRuntimeRepTyCon rr_tc-  = elem (getUnique rr_tc) unliftedRepDataConKeys---- | Is this the type 'RuntimeRep'?-isRuntimeRepTy :: Type -> Bool-isRuntimeRepTy ty | Just ty' <- coreView ty = isRuntimeRepTy ty'-isRuntimeRepTy (TyConApp tc []) = tc `hasKey` runtimeRepTyConKey-isRuntimeRepTy _ = False---- | Is a tyvar of type 'RuntimeRep'?-isRuntimeRepVar :: TyVar -> Bool-isRuntimeRepVar = isRuntimeRepTy . tyVarKind--{--%************************************************************************-%*                                                                      *-            Coercions-%*                                                                      *-%************************************************************************--}---- | A 'Coercion' is concrete evidence of the equality/convertibility--- of two types.---- If you edit this type, you may need to update the GHC formalism--- See Note [GHC Formalism] in coreSyn/CoreLint.hs-data Coercion-  -- Each constructor has a "role signature", indicating the way roles are-  -- propagated through coercions.-  --    -  P, N, and R stand for coercions of the given role-  --    -  e stands for a coercion of a specific unknown role-  --           (think "role polymorphism")-  --    -  "e" stands for an explicit role parameter indicating role e.-  --    -   _ stands for a parameter that is not a Role or Coercion.--  -- These ones mirror the shape of types-  = -- Refl :: _ -> N-    Refl Type  -- See Note [Refl invariant]-          -- Invariant: applications of (Refl T) to a bunch of identity coercions-          --            always show up as Refl.-          -- For example  (Refl T) (Refl a) (Refl b) shows up as (Refl (T a b)).--          -- Applications of (Refl T) to some coercions, at least one of-          -- which is NOT the identity, show up as TyConAppCo.-          -- (They may not be fully saturated however.)-          -- ConAppCo coercions (like all coercions other than Refl)-          -- are NEVER the identity.--          -- Use (GRefl Representational ty MRefl), not (SubCo (Refl ty))--  -- GRefl :: "e" -> _ -> Maybe N -> e-  -- See Note [Generalized reflexive coercion]-  | GRefl Role Type MCoercionN  -- See Note [Refl invariant]-          -- Use (Refl ty), not (GRefl Nominal ty MRefl)-          -- Use (GRefl Representational _ _), not (SubCo (GRefl Nominal _ _))--  -- These ones simply lift the correspondingly-named-  -- Type constructors into Coercions--  -- TyConAppCo :: "e" -> _ -> ?? -> e-  -- See Note [TyConAppCo roles]-  | TyConAppCo Role TyCon [Coercion]    -- lift TyConApp-               -- The TyCon is never a synonym;-               -- we expand synonyms eagerly-               -- But it can be a type function--  | AppCo Coercion CoercionN             -- lift AppTy-          -- AppCo :: e -> N -> e--  -- See Note [Forall coercions]-  | ForAllCo TyCoVar KindCoercion Coercion-         -- ForAllCo :: _ -> N -> e -> e--  | FunCo Role Coercion Coercion         -- lift FunTy-         -- FunCo :: "e" -> e -> e -> e--  -- These are special-  | CoVarCo CoVar      -- :: _ -> (N or R)-                       -- result role depends on the tycon of the variable's type--    -- AxiomInstCo :: e -> _ -> [N] -> e-  | AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion]-     -- See also [CoAxiom index]-     -- The coercion arguments always *precisely* saturate-     -- arity of (that branch of) the CoAxiom. If there are-     -- any left over, we use AppCo.-     -- See [Coercion axioms applied to coercions]--  | AxiomRuleCo CoAxiomRule [Coercion]-    -- AxiomRuleCo is very like AxiomInstCo, but for a CoAxiomRule-    -- The number coercions should match exactly the expectations-    -- of the CoAxiomRule (i.e., the rule is fully saturated).--  | UnivCo UnivCoProvenance Role Type Type-      -- :: _ -> "e" -> _ -> _ -> e--  | SymCo Coercion             -- :: e -> e-  | TransCo Coercion Coercion  -- :: e -> e -> e--  | NthCo  Role Int Coercion     -- Zero-indexed; decomposes (T t0 ... tn)-    -- :: "e" -> _ -> e0 -> e (inverse of TyConAppCo, see Note [TyConAppCo roles])-    -- Using NthCo on a ForAllCo gives an N coercion always-    -- See Note [NthCo and newtypes]-    ---    -- Invariant:  (NthCo r i co), it is always the case that r = role of (Nth i co)-    -- That is: the role of the entire coercion is redundantly cached here.-    -- See Note [NthCo Cached Roles]--  | LRCo   LeftOrRight CoercionN     -- Decomposes (t_left t_right)-    -- :: _ -> N -> N-  | InstCo Coercion CoercionN-    -- :: e -> N -> e-    -- See Note [InstCo roles]--  -- Extract a kind coercion from a (heterogeneous) type coercion-  -- NB: all kind coercions are Nominal-  | KindCo Coercion-     -- :: e -> N--  | SubCo CoercionN                  -- Turns a ~N into a ~R-    -- :: N -> R--  | HoleCo CoercionHole              -- ^ See Note [Coercion holes]-                                     -- Only present during typechecking-  deriving Data.Data--type CoercionN = Coercion       -- always nominal-type CoercionR = Coercion       -- always representational-type CoercionP = Coercion       -- always phantom-type KindCoercion = CoercionN   -- always nominal---- | A semantically more meaningful type to represent what may or may not be a--- useful 'Coercion'.-data MCoercion-  = MRefl-    -- A trivial Reflexivity coercion-  | MCo Coercion-    -- Other coercions-  deriving Data.Data-type MCoercionR = MCoercion-type MCoercionN = MCoercion--instance Outputable MCoercion where-  ppr MRefl    = text "MRefl"-  ppr (MCo co) = text "MCo" <+> ppr co--{--Note [Refl invariant]-~~~~~~~~~~~~~~~~~~~~~-Invariant 1:--Coercions have the following invariant-     Refl (similar for GRefl r ty MRefl) is always lifted as far as possible.--You might think that a consequencs is:-     Every identity coercions has Refl at the root--But that's not quite true because of coercion variables.  Consider-     g         where g :: Int~Int-     Left h    where h :: Maybe Int ~ Maybe Int-etc.  So the consequence is only true of coercions that-have no coercion variables.--Note [Generalized reflexive coercion]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--GRefl is a generalized reflexive coercion (see Trac #15192). It wraps a kind-coercion, which might be reflexive (MRefl) or any coercion (MCo co). The typing-rules for GRefl:--  ty : k1-  -------------------------------------  GRefl r ty MRefl: ty ~r ty--  ty : k1       co :: k1 ~ k2-  -------------------------------------  GRefl r ty (MCo co) : ty ~r ty |> co--Consider we have--   g1 :: s ~r t-   s  :: k1-   g2 :: k1 ~ k2--and we want to construct a coercions co which has type--   (s |> g2) ~r t--We can define--   co = Sym (GRefl r s g2) ; g1--It is easy to see that--   Refl == GRefl Nominal ty MRefl :: ty ~n ty--A nominal reflexive coercion is quite common, so we keep the special form Refl to-save allocation.--Note [Coercion axioms applied to coercions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The reason coercion axioms can be applied to coercions and not just-types is to allow for better optimization.  There are some cases where-we need to be able to "push transitivity inside" an axiom in order to-expose further opportunities for optimization.--For example, suppose we have--  C a : t[a] ~ F a-  g   : b ~ c--and we want to optimize--  sym (C b) ; t[g] ; C c--which has the kind--  F b ~ F c--(stopping through t[b] and t[c] along the way).--We'd like to optimize this to just F g -- but how?  The key is-that we need to allow axioms to be instantiated by *coercions*,-not just by types.  Then we can (in certain cases) push-transitivity inside the axiom instantiations, and then react-opposite-polarity instantiations of the same axiom.  In this-case, e.g., we match t[g] against the LHS of (C c)'s kind, to-obtain the substitution  a |-> g  (note this operation is sort-of the dual of lifting!) and hence end up with--  C g : t[b] ~ F c--which indeed has the same kind as  t[g] ; C c.--Now we have--  sym (C b) ; C g--which can be optimized to F g.--Note [CoAxiom index]-~~~~~~~~~~~~~~~~~~~~-A CoAxiom has 1 or more branches. Each branch has contains a list-of the free type variables in that branch, the LHS type patterns,-and the RHS type for that branch. When we apply an axiom to a list-of coercions, we must choose which branch of the axiom we wish to-use, as the different branches may have different numbers of free-type variables. (The number of type patterns is always the same-among branches, but that doesn't quite concern us here.)--The Int in the AxiomInstCo constructor is the 0-indexed number-of the chosen branch.--Note [Forall coercions]-~~~~~~~~~~~~~~~~~~~~~~~-Constructing coercions between forall-types can be a bit tricky,-because the kinds of the bound tyvars can be different.--The typing rule is:---  kind_co : k1 ~ k2-  tv1:k1 |- co : t1 ~ t2-  --------------------------------------------------------------------  ForAllCo tv1 kind_co co : all tv1:k1. t1  ~-                            all tv1:k2. (t2[tv1 |-> tv1 |> sym kind_co])--First, the TyCoVar stored in a ForAllCo is really an optimisation: this field-should be a Name, as its kind is redundant. Thinking of the field as a Name-is helpful in understanding what a ForAllCo means.-The kind of TyCoVar always matches the left-hand kind of the coercion.--The idea is that kind_co gives the two kinds of the tyvar. See how, in the-conclusion, tv1 is assigned kind k1 on the left but kind k2 on the right.--Of course, a type variable can't have different kinds at the same time. So,-we arbitrarily prefer the first kind when using tv1 in the inner coercion-co, which shows that t1 equals t2.--The last wrinkle is that we need to fix the kinds in the conclusion. In-t2, tv1 is assumed to have kind k1, but it has kind k2 in the conclusion of-the rule. So we do a kind-fixing substitution, replacing (tv1:k1) with-(tv1:k2) |> sym kind_co. This substitution is slightly bizarre, because it-mentions the same name with different kinds, but it *is* well-kinded, noting-that `(tv1:k2) |> sym kind_co` has kind k1.--This all really would work storing just a Name in the ForAllCo. But we can't-add Names to, e.g., VarSets, and there generally is just an impedance mismatch-in a bunch of places. So we use tv1. When we need tv2, we can use-setTyVarKind.--Note [Predicate coercions]-~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have-   g :: a~b-How can we coerce between types-   ([c]~a) => [a] -> c-and-   ([c]~b) => [b] -> c-where the equality predicate *itself* differs?--Answer: we simply treat (~) as an ordinary type constructor, so these-types really look like--   ((~) [c] a) -> [a] -> c-   ((~) [c] b) -> [b] -> c--So the coercion between the two is obviously--   ((~) [c] g) -> [g] -> c--Another way to see this to say that we simply collapse predicates to-their representation type (see Type.coreView and Type.predTypeRep).--This collapse is done by mkPredCo; there is no PredCo constructor-in Coercion.  This is important because we need Nth to work on-predicates too:-    Nth 1 ((~) [c] g) = g-See Simplify.simplCoercionF, which generates such selections.--Note [Roles]-~~~~~~~~~~~~-Roles are a solution to the GeneralizedNewtypeDeriving problem, articulated-in Trac #1496. The full story is in docs/core-spec/core-spec.pdf. Also, see-http://ghc.haskell.org/trac/ghc/wiki/RolesImplementation--Here is one way to phrase the problem:--Given:-newtype Age = MkAge Int-type family F x-type instance F Age = Bool-type instance F Int = Char--This compiles down to:-axAge :: Age ~ Int-axF1 :: F Age ~ Bool-axF2 :: F Int ~ Char--Then, we can make:-(sym (axF1) ; F axAge ; axF2) :: Bool ~ Char--Yikes!--The solution is _roles_, as articulated in "Generative Type Abstraction and-Type-level Computation" (POPL 2010), available at-http://www.seas.upenn.edu/~sweirich/papers/popl163af-weirich.pdf--The specification for roles has evolved somewhat since that paper. For the-current full details, see the documentation in docs/core-spec. Here are some-highlights.--We label every equality with a notion of type equivalence, of which there are-three options: Nominal, Representational, and Phantom. A ground type is-nominally equivalent only with itself. A newtype (which is considered a ground-type in Haskell) is representationally equivalent to its representation.-Anything is "phantomly" equivalent to anything else. We use "N", "R", and "P"-to denote the equivalences.--The axioms above would be:-axAge :: Age ~R Int-axF1 :: F Age ~N Bool-axF2 :: F Age ~N Char--Then, because transitivity applies only to coercions proving the same notion-of equivalence, the above construction is impossible.--However, there is still an escape hatch: we know that any two types that are-nominally equivalent are representationally equivalent as well. This is what-the form SubCo proves -- it "demotes" a nominal equivalence into a-representational equivalence. So, it would seem the following is possible:--sub (sym axF1) ; F axAge ; sub axF2 :: Bool ~R Char   -- WRONG--What saves us here is that the arguments to a type function F, lifted into a-coercion, *must* prove nominal equivalence. So, (F axAge) is ill-formed, and-we are safe.--Roles are attached to parameters to TyCons. When lifting a TyCon into a-coercion (through TyConAppCo), we need to ensure that the arguments to the-TyCon respect their roles. For example:--data T a b = MkT a (F b)--If we know that a1 ~R a2, then we know (T a1 b) ~R (T a2 b). But, if we know-that b1 ~R b2, we know nothing about (T a b1) and (T a b2)! This is because-the type function F branches on b's *name*, not representation. So, we say-that 'a' has role Representational and 'b' has role Nominal. The third role,-Phantom, is for parameters not used in the type's definition. Given the-following definition--data Q a = MkQ Int--the Phantom role allows us to say that (Q Bool) ~R (Q Char), because we-can construct the coercion Bool ~P Char (using UnivCo).--See the paper cited above for more examples and information.--Note [TyConAppCo roles]-~~~~~~~~~~~~~~~~~~~~~~~-The TyConAppCo constructor has a role parameter, indicating the role at-which the coercion proves equality. The choice of this parameter affects-the required roles of the arguments of the TyConAppCo. To help explain-it, assume the following definition:--  type instance F Int = Bool   -- Axiom axF : F Int ~N Bool-  newtype Age = MkAge Int      -- Axiom axAge : Age ~R Int-  data Foo a = MkFoo a         -- Role on Foo's parameter is Representational--TyConAppCo Nominal Foo axF : Foo (F Int) ~N Foo Bool-  For (TyConAppCo Nominal) all arguments must have role Nominal. Why?-  So that Foo Age ~N Foo Int does *not* hold.--TyConAppCo Representational Foo (SubCo axF) : Foo (F Int) ~R Foo Bool-TyConAppCo Representational Foo axAge       : Foo Age     ~R Foo Int-  For (TyConAppCo Representational), all arguments must have the roles-  corresponding to the result of tyConRoles on the TyCon. This is the-  whole point of having roles on the TyCon to begin with. So, we can-  have Foo Age ~R Foo Int, if Foo's parameter has role R.--  If a Representational TyConAppCo is over-saturated (which is otherwise fine),-  the spill-over arguments must all be at Nominal. This corresponds to the-  behavior for AppCo.--TyConAppCo Phantom Foo (UnivCo Phantom Int Bool) : Foo Int ~P Foo Bool-  All arguments must have role Phantom. This one isn't strictly-  necessary for soundness, but this choice removes ambiguity.--The rules here dictate the roles of the parameters to mkTyConAppCo-(should be checked by Lint).--Note [NthCo and newtypes]-~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have--  newtype N a = MkN Int-  type role N representational--This yields axiom--  NTCo:N :: forall a. N a ~R Int--We can then build--  co :: forall a b. N a ~R N b-  co = NTCo:N a ; sym (NTCo:N b)--for any `a` and `b`. Because of the role annotation on N, if we use-NthCo, we'll get out a representational coercion. That is:--  NthCo r 0 co :: forall a b. a ~R b--Yikes! Clearly, this is terrible. The solution is simple: forbid-NthCo to be used on newtypes if the internal coercion is representational.--This is not just some corner case discovered by a segfault somewhere;-it was discovered in the proof of soundness of roles and described-in the "Safe Coercions" paper (ICFP '14).--Note [NthCo Cached Roles]-~~~~~~~~~~~~~~~~~~~~~~~~~-Why do we cache the role of NthCo in the NthCo constructor?-Because computing role(Nth i co) involves figuring out that--  co :: T tys1 ~ T tys2--using coercionKind, and finding (coercionRole co), and then looking-at the tyConRoles of T. Avoiding bad asymptotic behaviour here means-we have to compute the kind and role of a coercion simultaneously,-which makes the code complicated and inefficient.--This only happens for NthCo. Caching the role solves the problem, and-allows coercionKind and coercionRole to be simple.--See Trac #11735--Note [InstCo roles]-~~~~~~~~~~~~~~~~~~~-Here is (essentially) the typing rule for InstCo:--g :: (forall a. t1) ~r (forall a. t2)-w :: s1 ~N s2-------------------------------- InstCo-InstCo g w :: (t1 [a |-> s1]) ~r (t2 [a |-> s2])--Note that the Coercion w *must* be nominal. This is necessary-because the variable a might be used in a "nominal position"-(that is, a place where role inference would require a nominal-role) in t1 or t2. If we allowed w to be representational, we-could get bogus equalities.--A more nuanced treatment might be able to relax this condition-somewhat, by checking if t1 and/or t2 use their bound variables-in nominal ways. If not, having w be representational is OK.---%************************************************************************-%*                                                                      *-                UnivCoProvenance-%*                                                                      *-%************************************************************************--A UnivCo is a coercion whose proof does not directly express its role-and kind (indeed for some UnivCos, like UnsafeCoerceProv, there /is/-no proof).--The different kinds of UnivCo are described by UnivCoProvenance.  Really-each is entirely separate, but they all share the need to represent their-role and kind, which is done in the UnivCo constructor.---}---- | For simplicity, we have just one UnivCo that represents a coercion from--- some type to some other type, with (in general) no restrictions on the--- type. The UnivCoProvenance specifies more exactly what the coercion really--- is and why a program should (or shouldn't!) trust the coercion.--- It is reasonable to consider each constructor of 'UnivCoProvenance'--- as a totally independent coercion form; their only commonality is--- that they don't tell you what types they coercion between. (That info--- is in the 'UnivCo' constructor of 'Coercion'.-data UnivCoProvenance-  = UnsafeCoerceProv   -- ^ From @unsafeCoerce#@. These are unsound.--  | PhantomProv KindCoercion -- ^ See Note [Phantom coercions]. Only in Phantom-                             -- roled coercions--  | ProofIrrelProv KindCoercion  -- ^ From the fact that any two coercions are-                                 --   considered equivalent. See Note [ProofIrrelProv].-                                 -- Can be used in Nominal or Representational coercions--  | PluginProv String  -- ^ From a plugin, which asserts that this coercion-                       --   is sound. The string is for the use of the plugin.--  deriving Data.Data--instance Outputable UnivCoProvenance where-  ppr UnsafeCoerceProv   = text "(unsafeCoerce#)"-  ppr (PhantomProv _)    = text "(phantom)"-  ppr (ProofIrrelProv _) = text "(proof irrel.)"-  ppr (PluginProv str)   = parens (text "plugin" <+> brackets (text str))---- | A coercion to be filled in by the type-checker. See Note [Coercion holes]-data CoercionHole-  = CoercionHole { ch_co_var :: CoVar-                       -- See Note [CoercionHoles and coercion free variables]--                 , ch_ref    :: IORef (Maybe Coercion)-                 }--coHoleCoVar :: CoercionHole -> CoVar-coHoleCoVar = ch_co_var--setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole-setCoHoleCoVar h cv = h { ch_co_var = cv }--instance Data.Data CoercionHole where-  -- don't traverse?-  toConstr _   = abstractConstr "CoercionHole"-  gunfold _ _  = error "gunfold"-  dataTypeOf _ = mkNoRepType "CoercionHole"--instance Outputable CoercionHole where-  ppr (CoercionHole { ch_co_var = cv }) = braces (ppr cv)---{- Note [Phantom coercions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-     data T a = T1 | T2-Then we have-     T s ~R T t-for any old s,t. The witness for this is (TyConAppCo T Rep co),-where (co :: s ~P t) is a phantom coercion built with PhantomProv.-The role of the UnivCo is always Phantom.  The Coercion stored is the-(nominal) kind coercion between the types-   kind(s) ~N kind (t)--Note [Coercion holes]-~~~~~~~~~~~~~~~~~~~~~~~~-During typechecking, constraint solving for type classes works by-  - Generate an evidence Id,  d7 :: Num a-  - Wrap it in a Wanted constraint, [W] d7 :: Num a-  - Use the evidence Id where the evidence is needed-  - Solve the constraint later-  - When solved, add an enclosing let-binding  let d7 = .... in ....-    which actually binds d7 to the (Num a) evidence--For equality constraints we use a different strategy.  See Note [The-equality types story] in TysPrim for background on equality constraints.-  - For /boxed/ equality constraints, (t1 ~N t2) and (t1 ~R t2), it's just-    like type classes above. (Indeed, boxed equality constraints *are* classes.)-  - But for /unboxed/ equality constraints (t1 ~R# t2) and (t1 ~N# t2)-    we use a different plan--For unboxed equalities:-  - Generate a CoercionHole, a mutable variable just like a unification-    variable-  - Wrap the CoercionHole in a Wanted constraint; see TcRnTypes.TcEvDest-  - Use the CoercionHole in a Coercion, via HoleCo-  - Solve the constraint later-  - When solved, fill in the CoercionHole by side effect, instead of-    doing the let-binding thing--The main reason for all this is that there may be no good place to let-bind-the evidence for unboxed equalities:--  - We emit constraints for kind coercions, to be used to cast a-    type's kind. These coercions then must be used in types. Because-    they might appear in a top-level type, there is no place to bind-    these (unlifted) coercions in the usual way.--  - A coercion for (forall a. t1) ~ (forall a. t2) will look like-       forall a. (coercion for t1~t2)-    But the coercion for (t1~t2) may mention 'a', and we don't have-    let-bindings within coercions.  We could add them, but coercion-    holes are easier.--  - Moreover, nothing is lost from the lack of let-bindings. For-    dicionaries want to achieve sharing to avoid recomoputing the-    dictionary.  But coercions are entirely erased, so there's little-    benefit to sharing. Indeed, even if we had a let-binding, we-    always inline types and coercions at every use site and drop the-    binding.--Other notes about HoleCo:-- * INVARIANT: CoercionHole and HoleCo are used only during type checking,-   and should never appear in Core. Just like unification variables; a Type-   can contain a TcTyVar, but only during type checking. If, one day, we-   use type-level information to separate out forms that can appear during-   type-checking vs forms that can appear in core proper, holes in Core will-   be ruled out.-- * See Note [CoercionHoles and coercion free variables]-- * Coercion holes can be compared for equality like other coercions:-   by looking at the types coerced.---Note [CoercionHoles and coercion free variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Why does a CoercionHole contain a CoVar, as well as reference to-fill in?  Because we want to treat that CoVar as a free variable of-the coercion.  See Trac #14584, and Note [What prevents a-constraint from floating] in TcSimplify, item (4):--        forall k. [W] co1 :: t1 ~# t2 |> co2-                  [W] co2 :: k ~# *--Here co2 is a CoercionHole. But we /must/ know that it is free in-co1, because that's all that stops it floating outside the-implication.---Note [ProofIrrelProv]-~~~~~~~~~~~~~~~~~~~~~-A ProofIrrelProv is a coercion between coercions. For example:--  data G a where-    MkG :: G Bool--In core, we get--  G :: * -> *-  MkG :: forall (a :: *). (a ~ Bool) -> G a--Now, consider 'MkG -- that is, MkG used in a type -- and suppose we want-a proof that ('MkG a1 co1) ~ ('MkG a2 co2). This will have to be--  TyConAppCo Nominal MkG [co3, co4]-  where-    co3 :: co1 ~ co2-    co4 :: a1 ~ a2--Note that-  co1 :: a1 ~ Bool-  co2 :: a2 ~ Bool--Here,-  co3 = UnivCo (ProofIrrelProv co5) Nominal (CoercionTy co1) (CoercionTy co2)-  where-    co5 :: (a1 ~ Bool) ~ (a2 ~ Bool)-    co5 = TyConAppCo Nominal (~#) [<*>, <*>, co4, <Bool>]---%************************************************************************-%*                                                                      *-                 Free variables of types and coercions-%*                                                                      *-%************************************************************************--}--{- Note [Free variables of types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The family of functions tyCoVarsOfType, tyCoVarsOfTypes etc, returns-a VarSet that is closed over the types of its variables.  More precisely,-  if    S = tyCoVarsOfType( t )-  and   (a:k) is in S-  then  tyCoVarsOftype( k ) is a subset of S--Example: The tyCoVars of this ((a:* -> k) Int) is {a, k}.--We could /not/ close over the kinds of the variable occurrences, and-instead do so at call sites, but it seems that we always want to do-so, so it's easiest to do it here.--It turns out that getting the free variables of types is performance critical,-so we profiled several versions, exploring different implementation strategies.--1. Baseline version: uses FV naively. Essentially:--   tyCoVarsOfType ty = fvVarSet $ tyCoFVsOfType ty--   This is not nice, because FV introduces some overhead to implement-   determinism, and throught its "interesting var" function, neither of which-   we need here, so they are a complete waste.--2. UnionVarSet version: instead of reusing the FV-based code, we simply used-   VarSets directly, trying to avoid the overhead of FV. E.g.:--   -- FV version:-   tyCoFVsOfType (AppTy fun arg)    a b c = (tyCoFVsOfType fun `unionFV` tyCoFVsOfType arg) a b c--   -- UnionVarSet version:-   tyCoVarsOfType (AppTy fun arg)    = (tyCoVarsOfType fun `unionVarSet` tyCoVarsOfType arg)--   This looks deceptively similar, but while FV internally builds a list- and-   set-generating function, the VarSet functions manipulate sets directly, and-   the latter peforms a lot worse than the naive FV version.--3. Accumulator-style VarSet version: this is what we use now. We do use VarSet-   as our data structure, but delegate the actual work to a new-   ty_co_vars_of_...  family of functions, which use accumulator style and the-   "in-scope set" filter found in the internals of FV, but without the-   determinism overhead.--See Trac #14880.--Note [Closing over free variable kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-tyCoVarsOfType and tyCoFVsOfType, while traversing a type, will also close over-free variable kinds. In previous GHC versions, this happened naively: whenever-we would encounter an occurrence of a free type variable, we would close over-its kind. This, however is wrong for two reasons (see Trac #14880):--1. Efficiency. If we have Proxy (a::k) -> Proxy (a::k) -> Proxy (a::k), then-   we don't want to have to traverse k more than once.--2. Correctness. Imagine we have forall k. b -> k, where b has-   kind k, for some k bound in an outer scope. If we look at b's kind inside-   the forall, we'll collect that k is free and then remove k from the set of-   free variables. This is plain wrong. We must instead compute that b is free-   and then conclude that b's kind is free.--An obvious first approach is to move the closing-over-kinds from the-occurrences of a type variable to after finding the free vars - however, this-turns out to introduce performance regressions, and isn't even entirely-correct.--In fact, it isn't even important *when* we close over kinds; what matters is-that we handle each type var exactly once, and that we do it in the right-context.--So the next approach we tried was to use the "in-scope set" part of FV or the-equivalent argument in the accumulator-style `ty_co_vars_of_type` function, to-say "don't bother with variables we have already closed over". This should work-fine in theory, but the code is complicated and doesn't perform well.--But there is a simpler way, which is implemented here. Consider the two points-above:--1. Efficiency: we now have an accumulator, so the second time we encounter 'a',-   we'll ignore it, certainly not looking at its kind - this is why-   pre-checking set membership before inserting ends up not only being faster,-   but also being correct.--2. Correctness: we have an "in-scope set" (I think we should call it it a-  "bound-var set"), specifying variables that are bound by a forall in the type-  we are traversing; we simply ignore these variables, certainly not looking at-  their kind.--So now consider:--    forall k. b -> k--where b :: k->Type is free; but of course, it's a different k! When looking at-b -> k we'll have k in the bound-var set. So we'll ignore the k. But suppose-this is our first encounter with b; we want the free vars of its kind. But we-want to behave as if we took the free vars of its kind at the end; that is,-with no bound vars in scope.--So the solution is easy. The old code was this:--  ty_co_vars_of_type (TyVarTy v) is acc-    | v `elemVarSet` is  = acc-    | v `elemVarSet` acc = acc-    | otherwise          = ty_co_vars_of_type (tyVarKind v) is (extendVarSet acc v)--Now all we need to do is take the free vars of tyVarKind v *with an empty-bound-var set*, thus:--ty_co_vars_of_type (TyVarTy v) is acc-  | v `elemVarSet` is  = acc-  | v `elemVarSet` acc = acc-  | otherwise          = ty_co_vars_of_type (tyVarKind v) emptyVarSet (extendVarSet acc v)-                                                          ^^^^^^^^^^^--And that's it.---}--tyCoVarsOfType :: Type -> TyCoVarSet--- See Note [Free variables of types]-tyCoVarsOfType ty = ty_co_vars_of_type ty emptyVarSet emptyVarSet--tyCoVarsOfTypes :: [Type] -> TyCoVarSet-tyCoVarsOfTypes tys = ty_co_vars_of_types tys emptyVarSet emptyVarSet--ty_co_vars_of_type :: Type -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet-ty_co_vars_of_type (TyVarTy v) is acc-  | v `elemVarSet` is  = acc-  | v `elemVarSet` acc = acc-  | otherwise          = ty_co_vars_of_type (tyVarKind v)-                            emptyVarSet  -- See Note [Closing over free variable kinds]-                            (extendVarSet acc v)--ty_co_vars_of_type (TyConApp _ tys)   is acc = ty_co_vars_of_types tys is acc-ty_co_vars_of_type (LitTy {})         _  acc = acc-ty_co_vars_of_type (AppTy fun arg)    is acc = ty_co_vars_of_type fun is (ty_co_vars_of_type arg is acc)-ty_co_vars_of_type (FunTy arg res)    is acc = ty_co_vars_of_type arg is (ty_co_vars_of_type res is acc)-ty_co_vars_of_type (ForAllTy (Bndr tv _) ty) is acc = ty_co_vars_of_type (varType tv) is $-                                                      ty_co_vars_of_type ty (extendVarSet is tv) acc-ty_co_vars_of_type (CastTy ty co)     is acc = ty_co_vars_of_type ty is (ty_co_vars_of_co co is acc)-ty_co_vars_of_type (CoercionTy co)    is acc = ty_co_vars_of_co co is acc--ty_co_vars_of_types :: [Type] -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet-ty_co_vars_of_types []       _  acc = acc-ty_co_vars_of_types (ty:tys) is acc = ty_co_vars_of_type ty is (ty_co_vars_of_types tys is acc)--tyCoVarsOfCo :: Coercion -> TyCoVarSet--- See Note [Free variables of types]-tyCoVarsOfCo co = ty_co_vars_of_co co emptyVarSet emptyVarSet--tyCoVarsOfCos :: [Coercion] -> TyCoVarSet-tyCoVarsOfCos cos = ty_co_vars_of_cos cos emptyVarSet emptyVarSet---ty_co_vars_of_co :: Coercion -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet-ty_co_vars_of_co (Refl ty)            is acc = ty_co_vars_of_type ty is acc-ty_co_vars_of_co (GRefl _ ty mco)     is acc = ty_co_vars_of_type ty is $-                                               ty_co_vars_of_mco mco is acc-ty_co_vars_of_co (TyConAppCo _ _ cos) is acc = ty_co_vars_of_cos cos is acc-ty_co_vars_of_co (AppCo co arg)       is acc = ty_co_vars_of_co co is $-                                               ty_co_vars_of_co arg is acc-ty_co_vars_of_co (ForAllCo tv kind_co co) is acc = ty_co_vars_of_co kind_co is $-                                                   ty_co_vars_of_co co (extendVarSet is tv) acc-ty_co_vars_of_co (FunCo _ co1 co2)    is acc = ty_co_vars_of_co co1 is $-                                               ty_co_vars_of_co co2 is acc-ty_co_vars_of_co (CoVarCo v)          is acc = ty_co_vars_of_co_var v is acc-ty_co_vars_of_co (HoleCo h)           is acc = ty_co_vars_of_co_var (coHoleCoVar h) is acc-    -- See Note [CoercionHoles and coercion free variables]-ty_co_vars_of_co (AxiomInstCo _ _ cos) is acc = ty_co_vars_of_cos cos is acc-ty_co_vars_of_co (UnivCo p _ t1 t2)    is acc = ty_co_vars_of_prov p is $-                                                ty_co_vars_of_type t1 is $-                                                ty_co_vars_of_type t2 is acc-ty_co_vars_of_co (SymCo co)          is acc = ty_co_vars_of_co co is acc-ty_co_vars_of_co (TransCo co1 co2)   is acc = ty_co_vars_of_co co1 is $-                                              ty_co_vars_of_co co2 is acc-ty_co_vars_of_co (NthCo _ _ co)      is acc = ty_co_vars_of_co co is acc-ty_co_vars_of_co (LRCo _ co)         is acc = ty_co_vars_of_co co is acc-ty_co_vars_of_co (InstCo co arg)     is acc = ty_co_vars_of_co co is $-                                              ty_co_vars_of_co arg is acc-ty_co_vars_of_co (KindCo co)         is acc = ty_co_vars_of_co co is acc-ty_co_vars_of_co (SubCo co)          is acc = ty_co_vars_of_co co is acc-ty_co_vars_of_co (AxiomRuleCo _ cs)  is acc = ty_co_vars_of_cos cs is acc--ty_co_vars_of_mco :: MCoercion -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet-ty_co_vars_of_mco MRefl    _is acc = acc-ty_co_vars_of_mco (MCo co) is  acc = ty_co_vars_of_co co is acc--ty_co_vars_of_co_var :: CoVar -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet-ty_co_vars_of_co_var v is acc-  | v `elemVarSet` is  = acc-  | v `elemVarSet` acc = acc-  | otherwise          = ty_co_vars_of_type (varType v)-                            emptyVarSet  -- See Note [Closing over free variable kinds]-                            (extendVarSet acc v)--ty_co_vars_of_cos :: [Coercion] -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet-ty_co_vars_of_cos []       _  acc = acc-ty_co_vars_of_cos (co:cos) is acc = ty_co_vars_of_co co is (ty_co_vars_of_cos cos is acc)--tyCoVarsOfProv :: UnivCoProvenance -> TyCoVarSet-tyCoVarsOfProv prov = ty_co_vars_of_prov prov emptyVarSet emptyVarSet--ty_co_vars_of_prov :: UnivCoProvenance -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet-ty_co_vars_of_prov (PhantomProv co)    is acc = ty_co_vars_of_co co is acc-ty_co_vars_of_prov (ProofIrrelProv co) is acc = ty_co_vars_of_co co is acc-ty_co_vars_of_prov UnsafeCoerceProv    _  acc = acc-ty_co_vars_of_prov (PluginProv _)      _  acc = acc---- | Generates an in-scope set from the free variables in a list of types--- and a list of coercions-mkTyCoInScopeSet :: [Type] -> [Coercion] -> InScopeSet-mkTyCoInScopeSet tys cos-  = mkInScopeSet (ty_co_vars_of_types tys emptyVarSet $-                  ty_co_vars_of_cos   cos emptyVarSet emptyVarSet)---- | `tyCoFVsOfType` that returns free variables of a type in a deterministic--- set. For explanation of why using `VarSet` is not deterministic see--- Note [Deterministic FV] in FV.-tyCoVarsOfTypeDSet :: Type -> DTyCoVarSet--- See Note [Free variables of types]-tyCoVarsOfTypeDSet ty = fvDVarSet $ tyCoFVsOfType ty---- | `tyCoFVsOfType` that returns free variables of a type in deterministic--- order. For explanation of why using `VarSet` is not deterministic see--- Note [Deterministic FV] in FV.-tyCoVarsOfTypeList :: Type -> [TyCoVar]--- See Note [Free variables of types]-tyCoVarsOfTypeList ty = fvVarList $ tyCoFVsOfType ty---- | Returns free variables of types, including kind variables as--- a non-deterministic set. For type synonyms it does /not/ expand the--- synonym.-tyCoVarsOfTypesSet :: TyVarEnv Type -> TyCoVarSet--- See Note [Free variables of types]-tyCoVarsOfTypesSet tys = tyCoVarsOfTypes $ nonDetEltsUFM tys-  -- It's OK to use nonDetEltsUFM here because we immediately forget the-  -- ordering by returning a set---- | Returns free variables of types, including kind variables as--- a deterministic set. For type synonyms it does /not/ expand the--- synonym.-tyCoVarsOfTypesDSet :: [Type] -> DTyCoVarSet--- See Note [Free variables of types]-tyCoVarsOfTypesDSet tys = fvDVarSet $ tyCoFVsOfTypes tys---- | Returns free variables of types, including kind variables as--- a deterministically ordered list. For type synonyms it does /not/ expand the--- synonym.-tyCoVarsOfTypesList :: [Type] -> [TyCoVar]--- See Note [Free variables of types]-tyCoVarsOfTypesList tys = fvVarList $ tyCoFVsOfTypes tys---- | The worker for `tyCoFVsOfType` and `tyCoFVsOfTypeList`.--- The previous implementation used `unionVarSet` which is O(n+m) and can--- make the function quadratic.--- It's exported, so that it can be composed with--- other functions that compute free variables.--- See Note [FV naming conventions] in FV.------ Eta-expanded because that makes it run faster (apparently)--- See Note [FV eta expansion] in FV for explanation.-tyCoFVsOfType :: Type -> FV--- See Note [Free variables of types]-tyCoFVsOfType (TyVarTy v)        f bound_vars (acc_list, acc_set)-  | not (f v) = (acc_list, acc_set)-  | v `elemVarSet` bound_vars = (acc_list, acc_set)-  | v `elemVarSet` acc_set = (acc_list, acc_set)-  | otherwise = tyCoFVsOfType (tyVarKind v) f-                               emptyVarSet   -- See Note [Closing over free variable kinds]-                               (v:acc_list, extendVarSet acc_set v)-tyCoFVsOfType (TyConApp _ tys)   f bound_vars acc = tyCoFVsOfTypes tys f bound_vars acc-tyCoFVsOfType (LitTy {})         f bound_vars acc = emptyFV f bound_vars acc-tyCoFVsOfType (AppTy fun arg)    f bound_vars acc = (tyCoFVsOfType fun `unionFV` tyCoFVsOfType arg) f bound_vars acc-tyCoFVsOfType (FunTy arg res)    f bound_vars acc = (tyCoFVsOfType arg `unionFV` tyCoFVsOfType res) f bound_vars acc-tyCoFVsOfType (ForAllTy bndr ty) f bound_vars acc = tyCoFVsBndr bndr (tyCoFVsOfType ty)  f bound_vars acc-tyCoFVsOfType (CastTy ty co)     f bound_vars acc = (tyCoFVsOfType ty `unionFV` tyCoFVsOfCo co) f bound_vars acc-tyCoFVsOfType (CoercionTy co)    f bound_vars acc = tyCoFVsOfCo co f bound_vars acc--tyCoFVsBndr :: TyCoVarBinder -> FV -> FV--- Free vars of (forall b. <thing with fvs>)-tyCoFVsBndr (Bndr tv _) fvs = tyCoFVsVarBndr tv fvs--tyCoFVsVarBndrs :: [Var] -> FV -> FV-tyCoFVsVarBndrs vars fvs = foldr tyCoFVsVarBndr fvs vars--tyCoFVsVarBndr :: Var -> FV -> FV-tyCoFVsVarBndr var fvs-  = tyCoFVsOfType (varType var)   -- Free vars of its type/kind-    `unionFV` delFV var fvs       -- Delete it from the thing-inside--tyCoFVsOfTypes :: [Type] -> FV--- See Note [Free variables of types]-tyCoFVsOfTypes (ty:tys) fv_cand in_scope acc = (tyCoFVsOfType ty `unionFV` tyCoFVsOfTypes tys) fv_cand in_scope acc-tyCoFVsOfTypes []       fv_cand in_scope acc = emptyFV fv_cand in_scope acc---- | Get a deterministic set of the vars free in a coercion-tyCoVarsOfCoDSet :: Coercion -> DTyCoVarSet--- See Note [Free variables of types]-tyCoVarsOfCoDSet co = fvDVarSet $ tyCoFVsOfCo co--tyCoVarsOfCoList :: Coercion -> [TyCoVar]--- See Note [Free variables of types]-tyCoVarsOfCoList co = fvVarList $ tyCoFVsOfCo co--tyCoFVsOfMCo :: MCoercion -> FV-tyCoFVsOfMCo MRefl    = emptyFV-tyCoFVsOfMCo (MCo co) = tyCoFVsOfCo co--tyCoVarsOfCosSet :: CoVarEnv Coercion -> TyCoVarSet-tyCoVarsOfCosSet cos = tyCoVarsOfCos $ nonDetEltsUFM cos-  -- It's OK to use nonDetEltsUFM here because we immediately forget the-  -- ordering by returning a set--tyCoFVsOfCo :: Coercion -> FV--- Extracts type and coercion variables from a coercion--- See Note [Free variables of types]-tyCoFVsOfCo (Refl ty) fv_cand in_scope acc-  = tyCoFVsOfType ty fv_cand in_scope acc-tyCoFVsOfCo (GRefl _ ty mco) fv_cand in_scope acc-  = (tyCoFVsOfType ty `unionFV` tyCoFVsOfMCo mco) fv_cand in_scope acc-tyCoFVsOfCo (TyConAppCo _ _ cos) fv_cand in_scope acc = tyCoFVsOfCos cos fv_cand in_scope acc-tyCoFVsOfCo (AppCo co arg) fv_cand in_scope acc-  = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCo arg) fv_cand in_scope acc-tyCoFVsOfCo (ForAllCo tv kind_co co) fv_cand in_scope acc-  = (tyCoFVsVarBndr tv (tyCoFVsOfCo co) `unionFV` tyCoFVsOfCo kind_co) fv_cand in_scope acc-tyCoFVsOfCo (FunCo _ co1 co2)    fv_cand in_scope acc-  = (tyCoFVsOfCo co1 `unionFV` tyCoFVsOfCo co2) fv_cand in_scope acc-tyCoFVsOfCo (CoVarCo v) fv_cand in_scope acc-  = tyCoFVsOfCoVar v fv_cand in_scope acc-tyCoFVsOfCo (HoleCo h) fv_cand in_scope acc-  = tyCoFVsOfCoVar (coHoleCoVar h) fv_cand in_scope acc-    -- See Note [CoercionHoles and coercion free variables]-tyCoFVsOfCo (AxiomInstCo _ _ cos) fv_cand in_scope acc = tyCoFVsOfCos cos fv_cand in_scope acc-tyCoFVsOfCo (UnivCo p _ t1 t2) fv_cand in_scope acc-  = (tyCoFVsOfProv p `unionFV` tyCoFVsOfType t1-                     `unionFV` tyCoFVsOfType t2) fv_cand in_scope acc-tyCoFVsOfCo (SymCo co)          fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc-tyCoFVsOfCo (TransCo co1 co2)   fv_cand in_scope acc = (tyCoFVsOfCo co1 `unionFV` tyCoFVsOfCo co2) fv_cand in_scope acc-tyCoFVsOfCo (NthCo _ _ co)      fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc-tyCoFVsOfCo (LRCo _ co)         fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc-tyCoFVsOfCo (InstCo co arg)     fv_cand in_scope acc = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCo arg) fv_cand in_scope acc-tyCoFVsOfCo (KindCo co)         fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc-tyCoFVsOfCo (SubCo co)          fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc-tyCoFVsOfCo (AxiomRuleCo _ cs)  fv_cand in_scope acc = tyCoFVsOfCos cs fv_cand in_scope acc--tyCoFVsOfCoVar :: CoVar -> FV-tyCoFVsOfCoVar v fv_cand in_scope acc-  = (unitFV v `unionFV` tyCoFVsOfType (varType v)) fv_cand in_scope acc--tyCoFVsOfProv :: UnivCoProvenance -> FV-tyCoFVsOfProv UnsafeCoerceProv    fv_cand in_scope acc = emptyFV fv_cand in_scope acc-tyCoFVsOfProv (PhantomProv co)    fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc-tyCoFVsOfProv (ProofIrrelProv co) fv_cand in_scope acc = tyCoFVsOfCo co fv_cand in_scope acc-tyCoFVsOfProv (PluginProv _)      fv_cand in_scope acc = emptyFV fv_cand in_scope acc--tyCoFVsOfCos :: [Coercion] -> FV-tyCoFVsOfCos []       fv_cand in_scope acc = emptyFV fv_cand in_scope acc-tyCoFVsOfCos (co:cos) fv_cand in_scope acc = (tyCoFVsOfCo co `unionFV` tyCoFVsOfCos cos) fv_cand in_scope acc---------------- Extracting the CoVars of a type or coercion -------------{---Note [CoVarsOfX and the InterestingVarFun]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--The coVarsOfType, coVarsOfTypes, coVarsOfCo, and coVarsOfCos functions are-implemented in terms of the respective FV equivalents (tyCoFVsOf...), rather-than the VarSet-based flavors (tyCoVarsOf...), despite the performance-considerations outlined in Note [Free variables of types].--This is because FV includes the InterestingVarFun, which is useful here,-because we can cleverly use it to restrict our calculations to CoVars - this-is what getCoVarSet achieves.--See Trac #14880.---}--getCoVarSet :: FV -> CoVarSet-getCoVarSet fv = snd (fv isCoVar emptyVarSet ([], emptyVarSet))--coVarsOfType :: Type -> CoVarSet-coVarsOfType ty = getCoVarSet (tyCoFVsOfType ty)--coVarsOfTypes :: [Type] -> TyCoVarSet-coVarsOfTypes tys = getCoVarSet (tyCoFVsOfTypes tys)--coVarsOfCo :: Coercion -> CoVarSet-coVarsOfCo co = getCoVarSet (tyCoFVsOfCo co)--coVarsOfCos :: [Coercion] -> CoVarSet-coVarsOfCos cos = getCoVarSet (tyCoFVsOfCos cos)------- Whether a covar is /Almost Devoid/ in a type or coercion -------- | Given a covar and a coercion, returns True if covar is almost devoid in--- the coercion. That is, covar can only appear in Refl and GRefl.--- See last wrinkle in Note [Unused coercion variable in ForAllCo] in Coercion-almostDevoidCoVarOfCo :: CoVar -> Coercion -> Bool-almostDevoidCoVarOfCo cv co =-  almost_devoid_co_var_of_co co cv--almost_devoid_co_var_of_co :: Coercion -> CoVar -> Bool-almost_devoid_co_var_of_co (Refl {}) _ = True   -- covar is allowed in Refl and-almost_devoid_co_var_of_co (GRefl {}) _ = True  -- GRefl, so we don't look into-                                                -- the coercions-almost_devoid_co_var_of_co (TyConAppCo _ _ cos) cv-  = almost_devoid_co_var_of_cos cos cv-almost_devoid_co_var_of_co (AppCo co arg) cv-  = almost_devoid_co_var_of_co co cv-  && almost_devoid_co_var_of_co arg cv-almost_devoid_co_var_of_co (ForAllCo v kind_co co) cv-  = almost_devoid_co_var_of_co kind_co cv-  && (v == cv || almost_devoid_co_var_of_co co cv)-almost_devoid_co_var_of_co (FunCo _ co1 co2) cv-  = almost_devoid_co_var_of_co co1 cv-  && almost_devoid_co_var_of_co co2 cv-almost_devoid_co_var_of_co (CoVarCo v) cv = v /= cv-almost_devoid_co_var_of_co (HoleCo h)  cv = (coHoleCoVar h) /= cv-almost_devoid_co_var_of_co (AxiomInstCo _ _ cos) cv-  = almost_devoid_co_var_of_cos cos cv-almost_devoid_co_var_of_co (UnivCo p _ t1 t2) cv-  = almost_devoid_co_var_of_prov p cv-  && almost_devoid_co_var_of_type t1 cv-  && almost_devoid_co_var_of_type t2 cv-almost_devoid_co_var_of_co (SymCo co) cv-  = almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_co (TransCo co1 co2) cv-  = almost_devoid_co_var_of_co co1 cv-  && almost_devoid_co_var_of_co co2 cv-almost_devoid_co_var_of_co (NthCo _ _ co) cv-  = almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_co (LRCo _ co) cv-  = almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_co (InstCo co arg) cv-  = almost_devoid_co_var_of_co co cv-  && almost_devoid_co_var_of_co arg cv-almost_devoid_co_var_of_co (KindCo co) cv-  = almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_co (SubCo co) cv-  = almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_co (AxiomRuleCo _ cs) cv-  = almost_devoid_co_var_of_cos cs cv--almost_devoid_co_var_of_cos :: [Coercion] -> CoVar -> Bool-almost_devoid_co_var_of_cos [] _ = True-almost_devoid_co_var_of_cos (co:cos) cv-  = almost_devoid_co_var_of_co co cv-  && almost_devoid_co_var_of_cos cos cv--almost_devoid_co_var_of_prov :: UnivCoProvenance -> CoVar -> Bool-almost_devoid_co_var_of_prov (PhantomProv co) cv-  = almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_prov (ProofIrrelProv co) cv-  = almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_prov UnsafeCoerceProv _ = True-almost_devoid_co_var_of_prov (PluginProv _) _ = True--almost_devoid_co_var_of_type :: Type -> CoVar -> Bool-almost_devoid_co_var_of_type (TyVarTy _) _ = True-almost_devoid_co_var_of_type (TyConApp _ tys) cv-  = almost_devoid_co_var_of_types tys cv-almost_devoid_co_var_of_type (LitTy {}) _ = True-almost_devoid_co_var_of_type (AppTy fun arg) cv-  = almost_devoid_co_var_of_type fun cv-  && almost_devoid_co_var_of_type arg cv-almost_devoid_co_var_of_type (FunTy arg res) cv-  = almost_devoid_co_var_of_type arg cv-  && almost_devoid_co_var_of_type res cv-almost_devoid_co_var_of_type (ForAllTy (Bndr v _) ty) cv-  = almost_devoid_co_var_of_type (varType v) cv-  && (v == cv || almost_devoid_co_var_of_type ty cv)-almost_devoid_co_var_of_type (CastTy ty co) cv-  = almost_devoid_co_var_of_type ty cv-  && almost_devoid_co_var_of_co co cv-almost_devoid_co_var_of_type (CoercionTy co) cv-  = almost_devoid_co_var_of_co co cv--almost_devoid_co_var_of_types :: [Type] -> CoVar -> Bool-almost_devoid_co_var_of_types [] _ = True-almost_devoid_co_var_of_types (ty:tys) cv-  = almost_devoid_co_var_of_type ty cv-  && almost_devoid_co_var_of_types tys cv--------------- Injective free vars --------------------- | Returns the free variables of a 'Type' that are in injective positions.--- For example, if @F@ is a non-injective type family, then:------ @--- injectiveTyVarsOf( Either c (Maybe (a, F b c)) ) = {a,c}--- @------ If @'injectiveVarsOfType' ty = itvs@, then knowing @ty@ fixes @itvs@.--- More formally, if--- @a@ is in @'injectiveVarsOfType' ty@--- and  @S1(ty) ~ S2(ty)@,--- then @S1(a)  ~ S2(a)@,--- where @S1@ and @S2@ are arbitrary substitutions.------ See @Note [When does a tycon application need an explicit kind signature?]@.-injectiveVarsOfType :: Type -> FV-injectiveVarsOfType = go-  where-    go ty                | Just ty' <- coreView ty-                         = go ty'-    go (TyVarTy v)       = unitFV v `unionFV` go (tyVarKind v)-    go (AppTy f a)       = go f `unionFV` go a-    go (FunTy ty1 ty2)   = go ty1 `unionFV` go ty2-    go (TyConApp tc tys) =-      case tyConInjectivityInfo tc of-        NotInjective  -> emptyFV-        Injective inj -> mapUnionFV go $-                         filterByList (inj ++ repeat True) tys-                         -- Oversaturated arguments to a tycon are-                         -- always injective, hence the repeat True-    go (ForAllTy tvb ty) = tyCoFVsBndr tvb $ go ty-    go LitTy{}           = emptyFV-    go (CastTy ty _)     = go ty-    go CoercionTy{}      = emptyFV---- | Does a 'TyCon' (that is applied to some number of arguments) need to be--- ascribed with an explicit kind signature to resolve ambiguity if rendered as--- a source-syntax type?--- (See @Note [When does a tycon application need an explicit kind signature?]@--- for a full explanation of what this function checks for.)---- Morally, this function ought to belong in TyCon.hs, not TyCoRep.hs, but--- accomplishing this requires a fair deal of futzing aruond with .hs-boot--- files.-tyConAppNeedsKindSig-  :: Bool  -- ^ Should specified binders count towards injective positions in-           --   the kind of the TyCon?-  -> TyCon-  -> Int   -- ^ The number of args the 'TyCon' is applied to.-  -> Bool  -- ^ Does @T t_1 ... t_n@ need a kind signature? (Where @n@ is the-           --   number of arguments)-tyConAppNeedsKindSig spec_inj_pos tc n_args-  | LT <- listLengthCmp tc_binders n_args-  = False-  | otherwise-  = let (dropped_binders, remaining_binders)-          = splitAt n_args tc_binders-        result_kind  = mkTyConKind remaining_binders tc_res_kind-        result_vars  = tyCoVarsOfType result_kind-        dropped_vars = fvVarSet $-                       mapUnionFV (injective_vars_of_binder spec_inj_pos)-                                  dropped_binders--    in not (subVarSet result_vars dropped_vars)-  where-    tc_binders  = tyConBinders tc-    tc_res_kind = tyConResKind tc--    -- Returns the variables that would be fixed by knowing a TyConBinder. See-    -- Note [When does a tycon application need an explicit kind signature?]-    -- for a more detailed explanation of what this function does.-    injective_vars_of_binder-      :: Bool -- Should specified binders count towards injective positions?-              -- (If you're using visible kind applications, then you want True-              -- here.)-      -> TyConBinder -> FV-    injective_vars_of_binder spec_inj_pos (Bndr tv vis) =-      case vis of-        AnonTCB -> injectiveVarsOfType (varType tv)-        NamedTCB argf-          |     (argf == Required)-             || (spec_inj_pos && (argf == Specified))-          -> unitFV tv `unionFV` injectiveVarsOfType (varType tv)-          |  otherwise-          -> emptyFV--{--Note [When does a tycon application need an explicit kind signature?]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There are a couple of places in GHC where we convert Core Types into forms that-more closely resemble user-written syntax. These include:--1. Template Haskell Type reification (see, for instance, TcSplice.reify_tc_app)-2. Converting Types to LHsTypes (in HsUtils.typeToLHsType, or in Haddock)--This conversion presents a challenge: how do we ensure that the resulting type-has enough kind information so as not to be ambiguous? To better motivate this-question, consider the following Core type:--  -- Foo :: Type -> Type-  type Foo = Proxy Type--There is nothing ambiguous about the RHS of Foo in Core. But if we were to,-say, reify it into a TH Type, then it's tempting to just drop the invisible-Type argument and simply return `Proxy`. But now we've lost crucial kind-information: we don't know if we're dealing with `Proxy Type` or `Proxy Bool`-or `Proxy Int` or something else! We've inadvertently introduced ambiguity.--Unlike in other situations in GHC, we can't just turn on--fprint-explicit-kinds, as we need to produce something which has the same-structure as a source-syntax type. Moreover, we can't rely on visible kind-application, since the first kind argument to Proxy is inferred, not specified.-Our solution is to annotate certain tycons with their kinds whenever they-appear in applied form in order to resolve the ambiguity. For instance, we-would reify the RHS of Foo like so:--  type Foo = (Proxy :: Type -> Type)--We need to devise an algorithm that determines precisely which tycons need-these explicit kind signatures. We certainly don't want to annotate _every_-tycon with a kind signature, or else we might end up with horribly bloated-types like the following:--  (Either :: Type -> Type -> Type) (Int :: Type) (Char :: Type)--We only want to annotate tycons that absolutely require kind signatures in-order to resolve some sort of ambiguity, and nothing more.--Suppose we have a tycon application (T ty_1 ... ty_n). Why might this type-require a kind signature? It might require it when we need to fill in any of-T's omitted arguments. By "omitted argument", we mean one that is dropped when-reifying ty_1 ... ty_n. Sometimes, the omitted arguments are inferred and-specified arguments (e.g., TH reification in TcSplice), and sometimes the-omitted arguments are only the inferred ones (e.g., in HsUtils.typeToLHsType,-which reifies specified arguments through visible kind application).-Regardless, the key idea is that _some_ arguments are going to be omitted after-reification, and the only mechanism we have at our disposal for filling them in-is through explicit kind signatures.--What do we mean by "fill in"? Let's consider this small example:--  T :: forall {k}. Type -> (k -> Type) -> k--Moreover, we have this application of T:--  T @{j} Int aty--When we reify this type, we omit the inferred argument @{j}. Is it fixed by the-other (non-inferred) arguments? Yes! If we know the kind of (aty :: blah), then-we'll generate an equality constraint (kappa -> Type) and, assuming we can-solve it, that will fix `kappa`. (Here, `kappa` is the unification variable-that we instantiate `k` with.)--Therefore, for any application of a tycon T to some arguments, the Question We-Must Answer is:--* Given the first n arguments of T, do the kinds of the non-omitted arguments-  fill in the omitted arguments?--(This is still a bit hand-wavey, but we'll refine this question incrementally-as we explain more of the machinery underlying this process.)--Answering this question is precisely the role that the `injectiveVarsOfType`-and `injective_vars_of_binder` functions exist to serve. If an omitted argument-`a` appears in the set returned by `injectiveVarsOfType ty`, then knowing-`ty` determines (i.e., fills in) `a`. (More on `injective_vars_of_binder` in a-bit.)--More formally, if-`a` is in `injectiveVarsOfType ty`-and  S1(ty) ~ S2(ty),-then S1(a)  ~ S2(a),-where S1 and S2 are arbitrary substitutions.--For example, is `F` is a non-injective type family, then--  injectiveVarsOfType(Either c (Maybe (a, F b c))) = {a, c}--Now that we know what this function does, here is a second attempt at the-Question We Must Answer:--* Given the first n arguments of T (ty_1 ... ty_n), consider the binders-  of T that are instantiated by non-omitted arguments. Do the injective-  variables of these binders fill in the remainder of T's kind?--Alright, we're getting closer. Next, we need to clarify what the injective-variables of a tycon binder are. This the role that the-`injective_vars_of_binder` function serves. Here is what this function does for-each form of tycon binder:--* Anonymous binders are injective positions. For example, in the promoted data-  constructor '(:):--    '(:) :: forall a. a -> [a] -> [a]--  The second and third tyvar binders (of kinds `a` and `[a]`) are both-  anonymous, so if we had '(:) 'True '[], then the kinds of 'True and-  '[] would contribute to the kind of '(:) 'True '[]. Therefore,-  injective_vars_of_binder(_ :: a) = injectiveVarsOfType(a) = {a}.-  (Similarly, injective_vars_of_binder(_ :: [a]) = {a}.)-* Named binders:-  - Inferred binders are never injective positions. For example, in this data-    type:--      data Proxy a-      Proxy :: forall {k}. k -> Type--    If we had Proxy 'True, then the kind of 'True would not contribute to the-    kind of Proxy 'True. Therefore,-    injective_vars_of_binder(forall {k}. ...) = {}.-  - Required binders are injective positions. For example, in this data type:--      data Wurble k (a :: k) :: k-      Wurble :: forall k -> k -> k--  The first tyvar binder (of kind `forall k`) has required visibility, so if-  we had Wurble (Maybe a) Nothing, then the kind of Maybe a would-  contribute to the kind of Wurble (Maybe a) Nothing. Hence,-  injective_vars_of_binder(forall a -> ...) = {a}.-  - Specified binders /might/ be injective positions, depending on how you-    approach things. Continuing the '(:) example:--      '(:) :: forall a. a -> [a] -> [a]--    Normally, the (forall a. ...) tyvar binder wouldn't contribute to the kind-    of '(:) 'True '[], since it's not explicitly instantiated by the user. But-    if visible kind application is enabled, then this is possible, since the-    user can write '(:) @Bool 'True '[]. (In that case,-    injective_vars_of_binder(forall a. ...) = {a}.)--    There are some situations where using visible kind application is appropriate-    (e.g., HsUtils.typeToLHsType) and others where it is not (e.g., TH-    reification), so the `injective_vars_of_binder` function is parametrized by-    a Bool which decides if specified binders should be counted towards-    injective positions or not.--Now that we've defined injective_vars_of_binder, we can refine the Question We-Must Answer once more:--* Given the first n arguments of T (ty_1 ... ty_n), consider the binders-  of T that are instantiated by non-omitted arguments. For each such binder-  b_i, take the union of all injective_vars_of_binder(b_i). Is this set a-  superset of the free variables of the remainder of T's kind?--If the answer to this question is "no", then (T ty_1 ... ty_n) needs an-explicit kind signature, since T's kind has kind variables leftover that-aren't fixed by the non-omitted arguments.--One last sticking point: what does "the remainder of T's kind" mean? You might-be tempted to think that it corresponds to all of the arguments in the kind of-T that would normally be instantiated by omitted arguments. But this isn't-quite right, strictly speaking. Consider the following (silly) example:--  S :: forall {k}. Type -> Type--And suppose we have this application of S:--  S Int Bool--The Int argument would be omitted, and-injective_vars_of_binder(_ :: Type) = {}. This is not a superset of {k}, which-might suggest that (S Bool) needs an explicit kind signature. But-(S Bool :: Type) doesn't actually fix `k`! This is because the kind signature-only affects the /result/ of the application, not all of the individual-arguments. So adding a kind signature here won't make a difference. Therefore,-the fourth (and final) iteration of the Question We Must Answer is:--* Given the first n arguments of T (ty_1 ... ty_n), consider the binders-  of T that are instantiated by non-omitted arguments. For each such binder-  b_i, take the union of all injective_vars_of_binder(b_i). Is this set a-  superset of the free variables of the kind of (T ty_1 ... ty_n)?--Phew, that was a lot of work!--How can be sure that this is correct? That is, how can we be sure that in the-event that we leave off a kind annotation, that one could infer the kind of the-tycon application from its arguments? It's essentially a proof by induction: if-we can infer the kinds of every subtree of a type, then the whole tycon-application will have an inferrable kind--unless, of course, the remainder of-the tycon application's kind has uninstantiated kind variables.--What happens if T is oversaturated? That is, if T's kind has fewer than n-arguments, in the case that the concrete application instantiates a result-kind variable with an arrow kind? If we run out of arguments, we do not attach-a kind annotation. This should be a rare case, indeed. Here is an example:--   data T1 :: k1 -> k2 -> *-   data T2 :: k1 -> k2 -> *--   type family G (a :: k) :: k-   type instance G T1 = T2--   type instance F Char = (G T1 Bool :: (* -> *) -> *)   -- F from above--Here G's kind is (forall k. k -> k), and the desugared RHS of that last-instance of F is (G (* -> (* -> *) -> *) (T1 * (* -> *)) Bool). According to-the algorithm above, there are 3 arguments to G so we should peel off 3-arguments in G's kind. But G's kind has only two arguments. This is the-rare special case, and we choose not to annotate the application of G with-a kind signature. After all, we needn't do this, since that instance would-be reified as:--   type instance F Char = G (T1 :: * -> (* -> *) -> *) Bool--So the kind of G isn't ambiguous anymore due to the explicit kind annotation-on its argument. See #8953 and test th/T8953.--}--------------- No free vars --------------------- | Returns True if this type has no free variables. Should be the same as--- isEmptyVarSet . tyCoVarsOfType, but faster in the non-forall case.-noFreeVarsOfType :: Type -> Bool-noFreeVarsOfType (TyVarTy _)      = False-noFreeVarsOfType (AppTy t1 t2)    = noFreeVarsOfType t1 && noFreeVarsOfType t2-noFreeVarsOfType (TyConApp _ tys) = all noFreeVarsOfType tys-noFreeVarsOfType ty@(ForAllTy {}) = isEmptyVarSet (tyCoVarsOfType ty)-noFreeVarsOfType (FunTy t1 t2)    = noFreeVarsOfType t1 && noFreeVarsOfType t2-noFreeVarsOfType (LitTy _)        = True-noFreeVarsOfType (CastTy ty co)   = noFreeVarsOfType ty && noFreeVarsOfCo co-noFreeVarsOfType (CoercionTy co)  = noFreeVarsOfCo co--noFreeVarsOfMCo :: MCoercion -> Bool-noFreeVarsOfMCo MRefl    = True-noFreeVarsOfMCo (MCo co) = noFreeVarsOfCo co--noFreeVarsOfTypes :: [Type] -> Bool-noFreeVarsOfTypes = all noFreeVarsOfType---- | Returns True if this coercion has no free variables. Should be the same as--- isEmptyVarSet . tyCoVarsOfCo, but faster in the non-forall case.-noFreeVarsOfCo :: Coercion -> Bool-noFreeVarsOfCo (Refl ty)              = noFreeVarsOfType ty-noFreeVarsOfCo (GRefl _ ty co)        = noFreeVarsOfType ty && noFreeVarsOfMCo co-noFreeVarsOfCo (TyConAppCo _ _ args)  = all noFreeVarsOfCo args-noFreeVarsOfCo (AppCo c1 c2)          = noFreeVarsOfCo c1 && noFreeVarsOfCo c2-noFreeVarsOfCo co@(ForAllCo {})       = isEmptyVarSet (tyCoVarsOfCo co)-noFreeVarsOfCo (FunCo _ c1 c2)        = noFreeVarsOfCo c1 && noFreeVarsOfCo c2-noFreeVarsOfCo (CoVarCo _)            = False-noFreeVarsOfCo (HoleCo {})            = True    -- I'm unsure; probably never happens-noFreeVarsOfCo (AxiomInstCo _ _ args) = all noFreeVarsOfCo args-noFreeVarsOfCo (UnivCo p _ t1 t2)     = noFreeVarsOfProv p &&-                                        noFreeVarsOfType t1 &&-                                        noFreeVarsOfType t2-noFreeVarsOfCo (SymCo co)             = noFreeVarsOfCo co-noFreeVarsOfCo (TransCo co1 co2)      = noFreeVarsOfCo co1 && noFreeVarsOfCo co2-noFreeVarsOfCo (NthCo _ _ co)         = noFreeVarsOfCo co-noFreeVarsOfCo (LRCo _ co)            = noFreeVarsOfCo co-noFreeVarsOfCo (InstCo co1 co2)       = noFreeVarsOfCo co1 && noFreeVarsOfCo co2-noFreeVarsOfCo (KindCo co)            = noFreeVarsOfCo co-noFreeVarsOfCo (SubCo co)             = noFreeVarsOfCo co-noFreeVarsOfCo (AxiomRuleCo _ cs)     = all noFreeVarsOfCo cs---- | Returns True if this UnivCoProv has no free variables. Should be the same as--- isEmptyVarSet . tyCoVarsOfProv, but faster in the non-forall case.-noFreeVarsOfProv :: UnivCoProvenance -> Bool-noFreeVarsOfProv UnsafeCoerceProv    = True-noFreeVarsOfProv (PhantomProv co)    = noFreeVarsOfCo co-noFreeVarsOfProv (ProofIrrelProv co) = noFreeVarsOfCo co-noFreeVarsOfProv (PluginProv {})     = True--{--%************************************************************************-%*                                                                      *-                        Substitutions-      Data type defined here to avoid unnecessary mutual recursion-%*                                                                      *-%************************************************************************--}---- | Type & coercion substitution------ #tcvsubst_invariant#--- The following invariants must hold of a 'TCvSubst':------ 1. The in-scope set is needed /only/ to--- guide the generation of fresh uniques------ 2. In particular, the /kind/ of the type variables in--- the in-scope set is not relevant------ 3. The substitution is only applied ONCE! This is because--- in general such application will not reach a fixed point.-data TCvSubst-  = TCvSubst InScopeSet -- The in-scope type and kind variables-             TvSubstEnv -- Substitutes both type and kind variables-             CvSubstEnv -- Substitutes coercion variables-        -- See Note [Substitutions apply only once]-        -- and Note [Extending the TvSubstEnv]-        -- and Note [Substituting types and coercions]-        -- and Note [The substitution invariant]---- | A substitution of 'Type's for 'TyVar's---                 and 'Kind's for 'KindVar's-type TvSubstEnv = TyVarEnv Type-  -- NB: A TvSubstEnv is used-  --   both inside a TCvSubst (with the apply-once invariant-  --        discussed in Note [Substitutions apply only once],-  --   and  also independently in the middle of matching,-  --        and unification (see Types.Unify).-  -- So you have to look at the context to know if it's idempotent or-  -- apply-once or whatever---- | A substitution of 'Coercion's for 'CoVar's-type CvSubstEnv = CoVarEnv Coercion--{- Note [The substitution invariant]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When calling (substTy subst ty) it should be the case that-the in-scope set in the substitution is a superset of both:--  (SIa) The free vars of the range of the substitution-  (SIb) The free vars of ty minus the domain of the substitution--The same rules apply to other substitutions (notably CoreSubst.Subst)--* Reason for (SIa). Consider-      substTy [a :-> Maybe b] (forall b. b->a)-  we must rename the forall b, to get-      forall b2. b2 -> Maybe b-  Making 'b' part of the in-scope set forces this renaming to-  take place.--* Reason for (SIb). Consider-     substTy [a :-> Maybe b] (forall b. (a,b,x))-  Then if we use the in-scope set {b}, satisfying (SIa), there is-  a danger we will rename the forall'd variable to 'x' by mistake,-  getting this:-      forall x. (Maybe b, x, x)-  Breaking (SIb) caused the bug from #11371.--Note: if the free vars of the range of the substitution are freshly created,-then the problems of (SIa) can't happen, and so it would be sound to-ignore (SIa).--Note [Substitutions apply only once]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We use TCvSubsts to instantiate things, and we might instantiate-        forall a b. ty-with the types-        [a, b], or [b, a].-So the substitution might go [a->b, b->a].  A similar situation arises in Core-when we find a beta redex like-        (/\ a /\ b -> e) b a-Then we also end up with a substitution that permutes type variables. Other-variations happen to; for example [a -> (a, b)].--        ********************************************************-        *** So a substitution must be applied precisely once ***-        ********************************************************--A TCvSubst is not idempotent, but, unlike the non-idempotent substitution-we use during unifications, it must not be repeatedly applied.--Note [Extending the TvSubstEnv]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-See #tcvsubst_invariant# for the invariants that must hold.--This invariant allows a short-cut when the subst envs are empty:-if the TvSubstEnv and CvSubstEnv are empty --- i.e. (isEmptyTCvSubst subst)-holds --- then (substTy subst ty) does nothing.--For example, consider:-        (/\a. /\b:(a~Int). ...b..) Int-We substitute Int for 'a'.  The Unique of 'b' does not change, but-nevertheless we add 'b' to the TvSubstEnv, because b's kind does change--This invariant has several crucial consequences:--* In substVarBndr, we need extend the TvSubstEnv-        - if the unique has changed-        - or if the kind has changed--* In substTyVar, we do not need to consult the in-scope set;-  the TvSubstEnv is enough--* In substTy, substTheta, we can short-circuit when the TvSubstEnv is empty--Note [Substituting types and coercions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Types and coercions are mutually recursive, and either may have variables-"belonging" to the other. Thus, every time we wish to substitute in a-type, we may also need to substitute in a coercion, and vice versa.-However, the constructor used to create type variables is distinct from-that of coercion variables, so we carry two VarEnvs in a TCvSubst. Note-that it would be possible to use the CoercionTy constructor to combine-these environments, but that seems like a false economy.--Note that the TvSubstEnv should *never* map a CoVar (built with the Id-constructor) and the CvSubstEnv should *never* map a TyVar. Furthermore,-the range of the TvSubstEnv should *never* include a type headed with-CoercionTy.--}--emptyTvSubstEnv :: TvSubstEnv-emptyTvSubstEnv = emptyVarEnv--emptyCvSubstEnv :: CvSubstEnv-emptyCvSubstEnv = emptyVarEnv--composeTCvSubstEnv :: InScopeSet-                   -> (TvSubstEnv, CvSubstEnv)-                   -> (TvSubstEnv, CvSubstEnv)-                   -> (TvSubstEnv, CvSubstEnv)--- ^ @(compose env1 env2)(x)@ is @env1(env2(x))@; i.e. apply @env2@ then @env1@.--- It assumes that both are idempotent.--- Typically, @env1@ is the refinement to a base substitution @env2@-composeTCvSubstEnv in_scope (tenv1, cenv1) (tenv2, cenv2)-  = ( tenv1 `plusVarEnv` mapVarEnv (substTy subst1) tenv2-    , cenv1 `plusVarEnv` mapVarEnv (substCo subst1) cenv2 )-        -- First apply env1 to the range of env2-        -- Then combine the two, making sure that env1 loses if-        -- both bind the same variable; that's why env1 is the-        --  *left* argument to plusVarEnv, because the right arg wins-  where-    subst1 = TCvSubst in_scope tenv1 cenv1---- | Composes two substitutions, applying the second one provided first,--- like in function composition.-composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst-composeTCvSubst (TCvSubst is1 tenv1 cenv1) (TCvSubst is2 tenv2 cenv2)-  = TCvSubst is3 tenv3 cenv3-  where-    is3 = is1 `unionInScope` is2-    (tenv3, cenv3) = composeTCvSubstEnv is3 (tenv1, cenv1) (tenv2, cenv2)--emptyTCvSubst :: TCvSubst-emptyTCvSubst = TCvSubst emptyInScopeSet emptyTvSubstEnv emptyCvSubstEnv--mkEmptyTCvSubst :: InScopeSet -> TCvSubst-mkEmptyTCvSubst is = TCvSubst is emptyTvSubstEnv emptyCvSubstEnv--isEmptyTCvSubst :: TCvSubst -> Bool-         -- See Note [Extending the TvSubstEnv]-isEmptyTCvSubst (TCvSubst _ tenv cenv) = isEmptyVarEnv tenv && isEmptyVarEnv cenv--mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst-mkTCvSubst in_scope (tenv, cenv) = TCvSubst in_scope tenv cenv--mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst--- ^ Make a TCvSubst with specified tyvar subst and empty covar subst-mkTvSubst in_scope tenv = TCvSubst in_scope tenv emptyCvSubstEnv--mkCvSubst :: InScopeSet -> CvSubstEnv -> TCvSubst--- ^ Make a TCvSubst with specified covar subst and empty tyvar subst-mkCvSubst in_scope cenv = TCvSubst in_scope emptyTvSubstEnv cenv--getTvSubstEnv :: TCvSubst -> TvSubstEnv-getTvSubstEnv (TCvSubst _ env _) = env--getCvSubstEnv :: TCvSubst -> CvSubstEnv-getCvSubstEnv (TCvSubst _ _ env) = env--getTCvInScope :: TCvSubst -> InScopeSet-getTCvInScope (TCvSubst in_scope _ _) = in_scope---- | Returns the free variables of the types in the range of a substitution as--- a non-deterministic set.-getTCvSubstRangeFVs :: TCvSubst -> VarSet-getTCvSubstRangeFVs (TCvSubst _ tenv cenv)-    = unionVarSet tenvFVs cenvFVs-  where-    tenvFVs = tyCoVarsOfTypesSet tenv-    cenvFVs = tyCoVarsOfCosSet cenv--isInScope :: Var -> TCvSubst -> Bool-isInScope v (TCvSubst in_scope _ _) = v `elemInScopeSet` in_scope--notElemTCvSubst :: Var -> TCvSubst -> Bool-notElemTCvSubst v (TCvSubst _ tenv cenv)-  | isTyVar v-  = not (v `elemVarEnv` tenv)-  | otherwise-  = not (v `elemVarEnv` cenv)--setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst-setTvSubstEnv (TCvSubst in_scope _ cenv) tenv = TCvSubst in_scope tenv cenv--setCvSubstEnv :: TCvSubst -> CvSubstEnv -> TCvSubst-setCvSubstEnv (TCvSubst in_scope tenv _) cenv = TCvSubst in_scope tenv cenv--zapTCvSubst :: TCvSubst -> TCvSubst-zapTCvSubst (TCvSubst in_scope _ _) = TCvSubst in_scope emptyVarEnv emptyVarEnv--extendTCvInScope :: TCvSubst -> Var -> TCvSubst-extendTCvInScope (TCvSubst in_scope tenv cenv) var-  = TCvSubst (extendInScopeSet in_scope var) tenv cenv--extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst-extendTCvInScopeList (TCvSubst in_scope tenv cenv) vars-  = TCvSubst (extendInScopeSetList in_scope vars) tenv cenv--extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst-extendTCvInScopeSet (TCvSubst in_scope tenv cenv) vars-  = TCvSubst (extendInScopeSetSet in_scope vars) tenv cenv--extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst-extendTCvSubst subst v ty-  | isTyVar v-  = extendTvSubst subst v ty-  | CoercionTy co <- ty-  = extendCvSubst subst v co-  | otherwise-  = pprPanic "extendTCvSubst" (ppr v <+> text "|->" <+> ppr ty)--extendTCvSubstWithClone :: TCvSubst -> TyCoVar -> TyCoVar -> TCvSubst-extendTCvSubstWithClone subst tcv-  | isTyVar tcv = extendTvSubstWithClone subst tcv-  | otherwise   = extendCvSubstWithClone subst tcv--extendTvSubst :: TCvSubst -> TyVar -> Type -> TCvSubst-extendTvSubst (TCvSubst in_scope tenv cenv) tv ty-  = TCvSubst in_scope (extendVarEnv tenv tv ty) cenv--extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst-extendTvSubstBinderAndInScope subst (Named (Bndr v _)) ty-  = ASSERT( isTyVar v )-    extendTvSubstAndInScope subst v ty-extendTvSubstBinderAndInScope subst (Anon _)     _-  = subst--extendTvSubstWithClone :: TCvSubst -> TyVar -> TyVar -> TCvSubst--- Adds a new tv -> tv mapping, /and/ extends the in-scope set-extendTvSubstWithClone (TCvSubst in_scope tenv cenv) tv tv'-  = TCvSubst (extendInScopeSetSet in_scope new_in_scope)-             (extendVarEnv tenv tv (mkTyVarTy tv'))-             cenv-  where-    new_in_scope = tyCoVarsOfType (tyVarKind tv') `extendVarSet` tv'--extendCvSubst :: TCvSubst -> CoVar -> Coercion -> TCvSubst-extendCvSubst (TCvSubst in_scope tenv cenv) v co-  = TCvSubst in_scope tenv (extendVarEnv cenv v co)--extendCvSubstWithClone :: TCvSubst -> CoVar -> CoVar -> TCvSubst-extendCvSubstWithClone (TCvSubst in_scope tenv cenv) cv cv'-  = TCvSubst (extendInScopeSetSet in_scope new_in_scope)-             tenv-             (extendVarEnv cenv cv (mkCoVarCo cv'))-  where-    new_in_scope = tyCoVarsOfType (varType cv') `extendVarSet` cv'--extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst--- Also extends the in-scope set-extendTvSubstAndInScope (TCvSubst in_scope tenv cenv) tv ty-  = TCvSubst (in_scope `extendInScopeSetSet` tyCoVarsOfType ty)-             (extendVarEnv tenv tv ty)-             cenv--extendTvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst-extendTvSubstList subst tvs tys-  = foldl2 extendTvSubst subst tvs tys--extendTCvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst-extendTCvSubstList subst tvs tys-  = foldl2 extendTCvSubst subst tvs tys--unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst--- Works when the ranges are disjoint-unionTCvSubst (TCvSubst in_scope1 tenv1 cenv1) (TCvSubst in_scope2 tenv2 cenv2)-  = ASSERT( not (tenv1 `intersectsVarEnv` tenv2)-         && not (cenv1 `intersectsVarEnv` cenv2) )-    TCvSubst (in_scope1 `unionInScope` in_scope2)-             (tenv1     `plusVarEnv`   tenv2)-             (cenv1     `plusVarEnv`   cenv2)---- mkTvSubstPrs and zipTvSubst generate the in-scope set from--- the types given; but it's just a thunk so with a bit of luck--- it'll never be evaluated---- | Generates the in-scope set for the 'TCvSubst' from the types in the incoming--- environment. No CoVars, please!-zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst-zipTvSubst tvs tys-  = mkTvSubst (mkInScopeSet (tyCoVarsOfTypes tys)) tenv-  where-    tenv = zipTyEnv tvs tys---- | Generates the in-scope set for the 'TCvSubst' from the types in the incoming--- environment.  No TyVars, please!-zipCvSubst :: HasDebugCallStack => [CoVar] -> [Coercion] -> TCvSubst-zipCvSubst cvs cos-  = TCvSubst (mkInScopeSet (tyCoVarsOfCos cos)) emptyTvSubstEnv cenv-  where-    cenv = zipCoEnv cvs cos--zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst-zipTCvSubst tcvs tys-  = zip_tcvsubst tcvs tys (mkEmptyTCvSubst $ mkInScopeSet (tyCoVarsOfTypes tys))-  where zip_tcvsubst :: [TyCoVar] -> [Type] -> TCvSubst -> TCvSubst-        zip_tcvsubst (tv:tvs) (ty:tys) subst-          = zip_tcvsubst tvs tys (extendTCvSubst subst tv ty)-        zip_tcvsubst [] [] subst = subst -- empty case-        zip_tcvsubst _  _  _     = pprPanic "zipTCvSubst: length mismatch"-                                            (ppr tcvs <+> ppr tys)---- | Generates the in-scope set for the 'TCvSubst' from the types in the--- incoming environment. No CoVars, please!-mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst-mkTvSubstPrs prs =-    ASSERT2( onlyTyVarsAndNoCoercionTy, text "prs" <+> ppr prs )-    mkTvSubst in_scope tenv-  where tenv = mkVarEnv prs-        in_scope = mkInScopeSet $ tyCoVarsOfTypes $ map snd prs-        onlyTyVarsAndNoCoercionTy =-          and [ isTyVar tv && not (isCoercionTy ty)-              | (tv, ty) <- prs ]--zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv-zipTyEnv tyvars tys-  | debugIsOn-  , not (all isTyVar tyvars)-  = pprPanic "zipTyEnv" (ppr tyvars <+> ppr tys)-  | otherwise-  = ASSERT( all (not . isCoercionTy) tys )-    mkVarEnv (zipEqual "zipTyEnv" tyvars tys)-        -- There used to be a special case for when-        --      ty == TyVarTy tv-        -- (a not-uncommon case) in which case the substitution was dropped.-        -- But the type-tidier changes the print-name of a type variable without-        -- changing the unique, and that led to a bug.   Why?  Pre-tidying, we had-        -- a type {Foo t}, where Foo is a one-method class.  So Foo is really a newtype.-        -- And it happened that t was the type variable of the class.  Post-tiding,-        -- it got turned into {Foo t2}.  The ext-core printer expanded this using-        -- sourceTypeRep, but that said "Oh, t == t2" because they have the same unique,-        -- and so generated a rep type mentioning t not t2.-        ---        -- Simplest fix is to nuke the "optimisation"--zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv-zipCoEnv cvs cos-  | debugIsOn-  , not (all isCoVar cvs)-  = pprPanic "zipCoEnv" (ppr cvs <+> ppr cos)-  | otherwise-  = mkVarEnv (zipEqual "zipCoEnv" cvs cos)--instance Outputable TCvSubst where-  ppr (TCvSubst ins tenv cenv)-    = brackets $ sep[ text "TCvSubst",-                      nest 2 (text "In scope:" <+> ppr ins),-                      nest 2 (text "Type env:" <+> ppr tenv),-                      nest 2 (text "Co env:" <+> ppr cenv) ]--{--%************************************************************************-%*                                                                      *-                Performing type or kind substitutions-%*                                                                      *-%************************************************************************--Note [Sym and ForAllCo]-~~~~~~~~~~~~~~~~~~~~~~~-In OptCoercion, we try to push "sym" out to the leaves of a coercion. But,-how do we push sym into a ForAllCo? It's a little ugly.--Here is the typing rule:--h : k1 ~# k2-(tv : k1) |- g : ty1 ~# ty2------------------------------ForAllCo tv h g : (ForAllTy (tv : k1) ty1) ~#-                  (ForAllTy (tv : k2) (ty2[tv |-> tv |> sym h]))--Here is what we want:--ForAllCo tv h' g' : (ForAllTy (tv : k2) (ty2[tv |-> tv |> sym h])) ~#-                    (ForAllTy (tv : k1) ty1)---Because the kinds of the type variables to the right of the colon are the kinds-coerced by h', we know (h' : k2 ~# k1). Thus, (h' = sym h).--Now, we can rewrite ty1 to be (ty1[tv |-> tv |> sym h' |> h']). We thus want--ForAllCo tv h' g' :-  (ForAllTy (tv : k2) (ty2[tv |-> tv |> h'])) ~#-  (ForAllTy (tv : k1) (ty1[tv |-> tv |> h'][tv |-> tv |> sym h']))--We thus see that we want--g' : ty2[tv |-> tv |> h'] ~# ty1[tv |-> tv |> h']--and thus g' = sym (g[tv |-> tv |> h']).--Putting it all together, we get this:--sym (ForAllCo tv h g)-==>-ForAllCo tv (sym h) (sym g[tv |-> tv |> sym h])--Note [Substituting in a coercion hole]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-It seems highly suspicious to be substituting in a coercion that still-has coercion holes. Yet, this can happen in a situation like this:--  f :: forall k. k :~: Type -> ()-  f Refl = let x :: forall (a :: k). [a] -> ...-               x = ...--When we check x's type signature, we require that k ~ Type. We indeed-know this due to the Refl pattern match, but the eager unifier can't-make use of givens. So, when we're done looking at x's type, a coercion-hole will remain. Then, when we're checking x's definition, we skolemise-x's type (in order to, e.g., bring the scoped type variable `a` into scope).-This requires performing a substitution for the fresh skolem variables.--This subsitution needs to affect the kind of the coercion hole, too ---otherwise, the kind will have an out-of-scope variable in it. More problematically-in practice (we won't actually notice the out-of-scope variable ever), skolems-in the kind might have too high a level, triggering a failure to uphold the-invariant that no free variables in a type have a higher level than the-ambient level in the type checker. In the event of having free variables in the-hole's kind, I'm pretty sure we'll always have an erroneous program, so we-don't need to worry what will happen when the hole gets filled in. After all,-a hole relating a locally-bound type variable will be unable to be solved. This-is why it's OK not to look through the IORef of a coercion hole during-substitution.---}---- | Type substitution, see 'zipTvSubst'-substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type--- Works only if the domain of the substitution is a--- superset of the type being substituted into-substTyWith tvs tys = {-#SCC "substTyWith" #-}-                      ASSERT( tvs `equalLength` tys )-                      substTy (zipTvSubst tvs tys)---- | Type substitution, see 'zipTvSubst'. Disables sanity checks.--- The problems that the sanity checks in substTy catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substTyUnchecked to--- substTy and remove this function. Please don't use in new code.-substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type-substTyWithUnchecked tvs tys-  = ASSERT( tvs `equalLength` tys )-    substTyUnchecked (zipTvSubst tvs tys)---- | Substitute tyvars within a type using a known 'InScopeSet'.--- Pre-condition: the 'in_scope' set should satisfy Note [The substitution--- invariant]; specifically it should include the free vars of 'tys',--- and of 'ty' minus the domain of the subst.-substTyWithInScope :: InScopeSet -> [TyVar] -> [Type] -> Type -> Type-substTyWithInScope in_scope tvs tys ty =-  ASSERT( tvs `equalLength` tys )-  substTy (mkTvSubst in_scope tenv) ty-  where tenv = zipTyEnv tvs tys---- | Coercion substitution, see 'zipTvSubst'-substCoWith :: HasCallStack => [TyVar] -> [Type] -> Coercion -> Coercion-substCoWith tvs tys = ASSERT( tvs `equalLength` tys )-                      substCo (zipTvSubst tvs tys)---- | Coercion substitution, see 'zipTvSubst'. Disables sanity checks.--- The problems that the sanity checks in substCo catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substCoUnchecked to--- substCo and remove this function. Please don't use in new code.-substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion-substCoWithUnchecked tvs tys-  = ASSERT( tvs `equalLength` tys )-    substCoUnchecked (zipTvSubst tvs tys)------ | Substitute covars within a type-substTyWithCoVars :: [CoVar] -> [Coercion] -> Type -> Type-substTyWithCoVars cvs cos = substTy (zipCvSubst cvs cos)---- | Type substitution, see 'zipTvSubst'-substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]-substTysWith tvs tys = ASSERT( tvs `equalLength` tys )-                       substTys (zipTvSubst tvs tys)---- | Type substitution, see 'zipTvSubst'-substTysWithCoVars :: [CoVar] -> [Coercion] -> [Type] -> [Type]-substTysWithCoVars cvs cos = ASSERT( cvs `equalLength` cos )-                             substTys (zipCvSubst cvs cos)---- | Substitute within a 'Type' after adding the free variables of the type--- to the in-scope set. This is useful for the case when the free variables--- aren't already in the in-scope set or easily available.--- See also Note [The substitution invariant].-substTyAddInScope :: TCvSubst -> Type -> Type-substTyAddInScope subst ty =-  substTy (extendTCvInScopeSet subst $ tyCoVarsOfType ty) ty---- | When calling `substTy` it should be the case that the in-scope set in--- the substitution is a superset of the free vars of the range of the--- substitution.--- See also Note [The substitution invariant].-isValidTCvSubst :: TCvSubst -> Bool-isValidTCvSubst (TCvSubst in_scope tenv cenv) =-  (tenvFVs `varSetInScope` in_scope) &&-  (cenvFVs `varSetInScope` in_scope)-  where-  tenvFVs = tyCoVarsOfTypesSet tenv-  cenvFVs = tyCoVarsOfCosSet cenv---- | This checks if the substitution satisfies the invariant from--- Note [The substitution invariant].-checkValidSubst :: HasCallStack => TCvSubst -> [Type] -> [Coercion] -> a -> a-checkValidSubst subst@(TCvSubst in_scope tenv cenv) tys cos a--- TODO (RAE): Change back to ASSERT-  = WARN( not (isValidTCvSubst subst),-             text "in_scope" <+> ppr in_scope $$-             text "tenv" <+> ppr tenv $$-             text "tenvFVs" <+> ppr (tyCoVarsOfTypesSet tenv) $$-             text "cenv" <+> ppr cenv $$-             text "cenvFVs" <+> ppr (tyCoVarsOfCosSet cenv) $$-             text "tys" <+> ppr tys $$-             text "cos" <+> ppr cos )-    WARN( not tysCosFVsInScope,-             text "in_scope" <+> ppr in_scope $$-             text "tenv" <+> ppr tenv $$-             text "cenv" <+> ppr cenv $$-             text "tys" <+> ppr tys $$-             text "cos" <+> ppr cos $$-             text "needInScope" <+> ppr needInScope )-    a-  where-  substDomain = nonDetKeysUFM tenv ++ nonDetKeysUFM cenv-    -- It's OK to use nonDetKeysUFM here, because we only use this list to-    -- remove some elements from a set-  needInScope = (tyCoVarsOfTypes tys `unionVarSet` tyCoVarsOfCos cos)-                  `delListFromUniqSet_Directly` substDomain-  tysCosFVsInScope = needInScope `varSetInScope` in_scope----- | Substitute within a 'Type'--- The substitution has to satisfy the invariants described in--- Note [The substitution invariant].-substTy :: HasCallStack => TCvSubst -> Type  -> Type-substTy subst ty-  | isEmptyTCvSubst subst = ty-  | otherwise             = checkValidSubst subst [ty] [] $-                            subst_ty subst ty---- | Substitute within a 'Type' disabling the sanity checks.--- The problems that the sanity checks in substTy catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substTyUnchecked to--- substTy and remove this function. Please don't use in new code.-substTyUnchecked :: TCvSubst -> Type -> Type-substTyUnchecked subst ty-                 | isEmptyTCvSubst subst = ty-                 | otherwise             = subst_ty subst ty---- | Substitute within several 'Type's--- The substitution has to satisfy the invariants described in--- Note [The substitution invariant].-substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]-substTys subst tys-  | isEmptyTCvSubst subst = tys-  | otherwise = checkValidSubst subst tys [] $ map (subst_ty subst) tys---- | Substitute within several 'Type's disabling the sanity checks.--- The problems that the sanity checks in substTys catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substTysUnchecked to--- substTys and remove this function. Please don't use in new code.-substTysUnchecked :: TCvSubst -> [Type] -> [Type]-substTysUnchecked subst tys-                 | isEmptyTCvSubst subst = tys-                 | otherwise             = map (subst_ty subst) tys---- | Substitute within a 'ThetaType'--- The substitution has to satisfy the invariants described in--- Note [The substitution invariant].-substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType-substTheta = substTys---- | Substitute within a 'ThetaType' disabling the sanity checks.--- The problems that the sanity checks in substTys catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substThetaUnchecked to--- substTheta and remove this function. Please don't use in new code.-substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType-substThetaUnchecked = substTysUnchecked---subst_ty :: TCvSubst -> Type -> Type--- subst_ty is the main workhorse for type substitution------ Note that the in_scope set is poked only if we hit a forall--- so it may often never be fully computed-subst_ty subst ty-   = go ty-  where-    go (TyVarTy tv)      = substTyVar subst tv-    go (AppTy fun arg)   = mkAppTy (go fun) $! (go arg)-                -- The mkAppTy smart constructor is important-                -- we might be replacing (a Int), represented with App-                -- by [Int], represented with TyConApp-    go (TyConApp tc tys) = let args = map go tys-                           in  args `seqList` TyConApp tc args-    go (FunTy arg res)   = (FunTy $! go arg) $! go res-    go (ForAllTy (Bndr tv vis) ty)-                         = case substVarBndrUnchecked subst tv of-                             (subst', tv') ->-                               (ForAllTy $! ((Bndr $! tv') vis)) $!-                                            (subst_ty subst' ty)-    go (LitTy n)         = LitTy $! n-    go (CastTy ty co)    = (mkCastTy $! (go ty)) $! (subst_co subst co)-    go (CoercionTy co)   = CoercionTy $! (subst_co subst co)--substTyVar :: TCvSubst -> TyVar -> Type-substTyVar (TCvSubst _ tenv _) tv-  = ASSERT( isTyVar tv )-    case lookupVarEnv tenv tv of-      Just ty -> ty-      Nothing -> TyVarTy tv--substTyVars :: TCvSubst -> [TyVar] -> [Type]-substTyVars subst = map $ substTyVar subst--substTyCoVars :: TCvSubst -> [TyCoVar] -> [Type]-substTyCoVars subst = map $ substTyCoVar subst--substTyCoVar :: TCvSubst -> TyCoVar -> Type-substTyCoVar subst tv-  | isTyVar tv = substTyVar subst tv-  | otherwise = CoercionTy $ substCoVar subst tv--lookupTyVar :: TCvSubst -> TyVar  -> Maybe Type-        -- See Note [Extending the TCvSubst]-lookupTyVar (TCvSubst _ tenv _) tv-  = ASSERT( isTyVar tv )-    lookupVarEnv tenv tv---- | Substitute within a 'Coercion'--- The substitution has to satisfy the invariants described in--- Note [The substitution invariant].-substCo :: HasCallStack => TCvSubst -> Coercion -> Coercion-substCo subst co-  | isEmptyTCvSubst subst = co-  | otherwise = checkValidSubst subst [] [co] $ subst_co subst co---- | Substitute within a 'Coercion' disabling sanity checks.--- The problems that the sanity checks in substCo catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substCoUnchecked to--- substCo and remove this function. Please don't use in new code.-substCoUnchecked :: TCvSubst -> Coercion -> Coercion-substCoUnchecked subst co-  | isEmptyTCvSubst subst = co-  | otherwise = subst_co subst co---- | Substitute within several 'Coercion's--- The substitution has to satisfy the invariants described in--- Note [The substitution invariant].-substCos :: HasCallStack => TCvSubst -> [Coercion] -> [Coercion]-substCos subst cos-  | isEmptyTCvSubst subst = cos-  | otherwise = checkValidSubst subst [] cos $ map (subst_co subst) cos--subst_co :: TCvSubst -> Coercion -> Coercion-subst_co subst co-  = go co-  where-    go_ty :: Type -> Type-    go_ty = subst_ty subst--    go_mco :: MCoercion -> MCoercion-    go_mco MRefl    = MRefl-    go_mco (MCo co) = MCo (go co)--    go :: Coercion -> Coercion-    go (Refl ty)             = mkNomReflCo $! (go_ty ty)-    go (GRefl r ty mco)      = (mkGReflCo r $! (go_ty ty)) $! (go_mco mco)-    go (TyConAppCo r tc args)= let args' = map go args-                               in  args' `seqList` mkTyConAppCo r tc args'-    go (AppCo co arg)        = (mkAppCo $! go co) $! go arg-    go (ForAllCo tv kind_co co)-      = case substForAllCoBndrUnchecked subst tv kind_co of-         (subst', tv', kind_co') ->-          ((mkForAllCo $! tv') $! kind_co') $! subst_co subst' co-    go (FunCo r co1 co2)     = (mkFunCo r $! go co1) $! go co2-    go (CoVarCo cv)          = substCoVar subst cv-    go (AxiomInstCo con ind cos) = mkAxiomInstCo con ind $! map go cos-    go (UnivCo p r t1 t2)    = (((mkUnivCo $! go_prov p) $! r) $!-                                (go_ty t1)) $! (go_ty t2)-    go (SymCo co)            = mkSymCo $! (go co)-    go (TransCo co1 co2)     = (mkTransCo $! (go co1)) $! (go co2)-    go (NthCo r d co)        = mkNthCo r d $! (go co)-    go (LRCo lr co)          = mkLRCo lr $! (go co)-    go (InstCo co arg)       = (mkInstCo $! (go co)) $! go arg-    go (KindCo co)           = mkKindCo $! (go co)-    go (SubCo co)            = mkSubCo $! (go co)-    go (AxiomRuleCo c cs)    = let cs1 = map go cs-                                in cs1 `seqList` AxiomRuleCo c cs1-    go (HoleCo h)            = HoleCo $! go_hole h--    go_prov UnsafeCoerceProv     = UnsafeCoerceProv-    go_prov (PhantomProv kco)    = PhantomProv (go kco)-    go_prov (ProofIrrelProv kco) = ProofIrrelProv (go kco)-    go_prov p@(PluginProv _)     = p--    -- See Note [Substituting in a coercion hole]-    go_hole h@(CoercionHole { ch_co_var = cv })-      = h { ch_co_var = updateVarType go_ty cv }--substForAllCoBndr :: TCvSubst -> TyCoVar -> KindCoercion-                  -> (TCvSubst, TyCoVar, Coercion)-substForAllCoBndr subst-  = substForAllCoBndrUsing False (substCo subst) subst---- | Like 'substForAllCoBndr', but disables sanity checks.--- The problems that the sanity checks in substCo catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substCoUnchecked to--- substCo and remove this function. Please don't use in new code.-substForAllCoBndrUnchecked :: TCvSubst -> TyCoVar -> KindCoercion-                           -> (TCvSubst, TyCoVar, Coercion)-substForAllCoBndrUnchecked subst-  = substForAllCoBndrUsing False (substCoUnchecked subst) subst---- See Note [Sym and ForAllCo]-substForAllCoBndrUsing :: Bool  -- apply sym to binder?-                       -> (Coercion -> Coercion)  -- transformation to kind co-                       -> TCvSubst -> TyCoVar -> KindCoercion-                       -> (TCvSubst, TyCoVar, KindCoercion)-substForAllCoBndrUsing sym sco subst old_var-  | isTyVar old_var = substForAllCoTyVarBndrUsing sym sco subst old_var-  | otherwise       = substForAllCoCoVarBndrUsing sym sco subst old_var--substForAllCoTyVarBndrUsing :: Bool  -- apply sym to binder?-                            -> (Coercion -> Coercion)  -- transformation to kind co-                            -> TCvSubst -> TyVar -> KindCoercion-                            -> (TCvSubst, TyVar, KindCoercion)-substForAllCoTyVarBndrUsing sym sco (TCvSubst in_scope tenv cenv) old_var old_kind_co-  = ASSERT( isTyVar old_var )-    ( TCvSubst (in_scope `extendInScopeSet` new_var) new_env cenv-    , new_var, new_kind_co )-  where-    new_env | no_change && not sym = delVarEnv tenv old_var-            | sym       = extendVarEnv tenv old_var $-                          TyVarTy new_var `CastTy` new_kind_co-            | otherwise = extendVarEnv tenv old_var (TyVarTy new_var)--    no_kind_change = noFreeVarsOfCo old_kind_co-    no_change = no_kind_change && (new_var == old_var)--    new_kind_co | no_kind_change = old_kind_co-                | otherwise      = sco old_kind_co--    Pair new_ki1 _ = coercionKind new_kind_co-    -- We could do substitution to (tyVarKind old_var). We don't do so because-    -- we already substituted new_kind_co, which contains the kind information-    -- we want. We don't want to do substitution once more. Also, in most cases,-    -- new_kind_co is a Refl, in which case coercionKind is really fast.--    new_var  = uniqAway in_scope (setTyVarKind old_var new_ki1)--substForAllCoCoVarBndrUsing :: Bool  -- apply sym to binder?-                            -> (Coercion -> Coercion)  -- transformation to kind co-                            -> TCvSubst -> CoVar -> KindCoercion-                            -> (TCvSubst, CoVar, KindCoercion)-substForAllCoCoVarBndrUsing sym sco (TCvSubst in_scope tenv cenv)-                            old_var old_kind_co-  = ASSERT( isCoVar old_var )-    ( TCvSubst (in_scope `extendInScopeSet` new_var) tenv new_cenv-    , new_var, new_kind_co )-  where-    new_cenv | no_change && not sym = delVarEnv cenv old_var-             | otherwise = extendVarEnv cenv old_var (mkCoVarCo new_var)--    no_kind_change = noFreeVarsOfCo old_kind_co-    no_change = no_kind_change && (new_var == old_var)--    new_kind_co | no_kind_change = old_kind_co-                | otherwise      = sco old_kind_co--    Pair h1 h2 = coercionKind new_kind_co--    new_var       = uniqAway in_scope $ mkCoVar (varName old_var) new_var_type-    new_var_type  | sym       = h2-                  | otherwise = h1--substCoVar :: TCvSubst -> CoVar -> Coercion-substCoVar (TCvSubst _ _ cenv) cv-  = case lookupVarEnv cenv cv of-      Just co -> co-      Nothing -> CoVarCo cv--substCoVars :: TCvSubst -> [CoVar] -> [Coercion]-substCoVars subst cvs = map (substCoVar subst) cvs--lookupCoVar :: TCvSubst -> Var -> Maybe Coercion-lookupCoVar (TCvSubst _ _ cenv) v = lookupVarEnv cenv v--substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)-substTyVarBndr = substTyVarBndrUsing substTy--substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])-substTyVarBndrs = mapAccumL substTyVarBndr--substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)-substVarBndr = substVarBndrUsing substTy--substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar])-substVarBndrs = mapAccumL substVarBndr--substCoVarBndr :: HasCallStack => TCvSubst -> CoVar -> (TCvSubst, CoVar)-substCoVarBndr = substCoVarBndrUsing substTy---- | Like 'substVarBndr', but disables sanity checks.--- The problems that the sanity checks in substTy catch are described in--- Note [The substitution invariant].--- The goal of #11371 is to migrate all the calls of substTyUnchecked to--- substTy and remove this function. Please don't use in new code.-substVarBndrUnchecked :: TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)-substVarBndrUnchecked = substVarBndrUsing substTyUnchecked--substVarBndrUsing :: (TCvSubst -> Type -> Type)-                  -> TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)-substVarBndrUsing subst_fn subst v-  | isTyVar v = substTyVarBndrUsing subst_fn subst v-  | otherwise = substCoVarBndrUsing subst_fn subst v---- | Substitute a tyvar in a binding position, returning an--- extended subst and a new tyvar.--- Use the supplied function to substitute in the kind-substTyVarBndrUsing-  :: (TCvSubst -> Type -> Type)  -- ^ Use this to substitute in the kind-  -> TCvSubst -> TyVar -> (TCvSubst, TyVar)-substTyVarBndrUsing subst_fn subst@(TCvSubst in_scope tenv cenv) old_var-  = ASSERT2( _no_capture, pprTyVar old_var $$ pprTyVar new_var $$ ppr subst )-    ASSERT( isTyVar old_var )-    (TCvSubst (in_scope `extendInScopeSet` new_var) new_env cenv, new_var)-  where-    new_env | no_change = delVarEnv tenv old_var-            | otherwise = extendVarEnv tenv old_var (TyVarTy new_var)--    _no_capture = not (new_var `elemVarSet` tyCoVarsOfTypesSet tenv)-    -- Assertion check that we are not capturing something in the substitution--    old_ki = tyVarKind old_var-    no_kind_change = noFreeVarsOfType old_ki -- verify that kind is closed-    no_change = no_kind_change && (new_var == old_var)-        -- no_change means that the new_var is identical in-        -- all respects to the old_var (same unique, same kind)-        -- See Note [Extending the TCvSubst]-        ---        -- In that case we don't need to extend the substitution-        -- to map old to new.  But instead we must zap any-        -- current substitution for the variable. For example:-        --      (\x.e) with id_subst = [x |-> e']-        -- Here we must simply zap the substitution for x--    new_var | no_kind_change = uniqAway in_scope old_var-            | otherwise = uniqAway in_scope $-                          setTyVarKind old_var (subst_fn subst old_ki)-        -- The uniqAway part makes sure the new variable is not already in scope---- | Substitute a covar in a binding position, returning an--- extended subst and a new covar.--- Use the supplied function to substitute in the kind-substCoVarBndrUsing-  :: (TCvSubst -> Type -> Type)-  -> TCvSubst -> CoVar -> (TCvSubst, CoVar)-substCoVarBndrUsing subst_fn subst@(TCvSubst in_scope tenv cenv) old_var-  = ASSERT( isCoVar old_var )-    (TCvSubst (in_scope `extendInScopeSet` new_var) tenv new_cenv, new_var)-  where-    new_co         = mkCoVarCo new_var-    no_kind_change = noFreeVarsOfTypes [t1, t2]-    no_change      = new_var == old_var && no_kind_change--    new_cenv | no_change = delVarEnv cenv old_var-             | otherwise = extendVarEnv cenv old_var new_co--    new_var = uniqAway in_scope subst_old_var-    subst_old_var = mkCoVar (varName old_var) new_var_type--    (_, _, t1, t2, role) = coVarKindsTypesRole old_var-    t1' = subst_fn subst t1-    t2' = subst_fn subst t2-    new_var_type = mkCoercionType role t1' t2'-                  -- It's important to do the substitution for coercions,-                  -- because they can have free type variables--cloneTyVarBndr :: TCvSubst -> TyVar -> Unique -> (TCvSubst, TyVar)-cloneTyVarBndr subst@(TCvSubst in_scope tv_env cv_env) tv uniq-  = ASSERT2( isTyVar tv, ppr tv )   -- I think it's only called on TyVars-    (TCvSubst (extendInScopeSet in_scope tv')-              (extendVarEnv tv_env tv (mkTyVarTy tv')) cv_env, tv')-  where-    old_ki = tyVarKind tv-    no_kind_change = noFreeVarsOfType old_ki -- verify that kind is closed--    tv1 | no_kind_change = tv-        | otherwise      = setTyVarKind tv (substTy subst old_ki)--    tv' = setVarUnique tv1 uniq--cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar])-cloneTyVarBndrs subst []     _usupply = (subst, [])-cloneTyVarBndrs subst (t:ts)  usupply = (subst'', tv:tvs)-  where-    (uniq, usupply') = takeUniqFromSupply usupply-    (subst' , tv )   = cloneTyVarBndr subst t uniq-    (subst'', tvs)   = cloneTyVarBndrs subst' ts usupply'--{--%************************************************************************-%*                                                                      *-                   Pretty-printing types--       Defined very early because of debug printing in assertions-%*                                                                      *-%************************************************************************--@pprType@ is the standard @Type@ printer; the overloaded @ppr@ function is-defined to use this.  @pprParendType@ is the same, except it puts-parens around the type, except for the atomic cases.  @pprParendType@-works just by setting the initial context precedence very high.--Note that any function which pretty-prints a @Type@ first converts the @Type@-to an @IfaceType@. See Note [IfaceType and pretty-printing] in IfaceType.--See Note [Precedence in types] in BasicTypes.--}------------------------------------------------------------- When pretty-printing types, we convert to IfaceType,---   and pretty-print that.--- See Note [Pretty printing via IfaceSyn] in PprTyThing-----------------------------------------------------------pprType, pprParendType :: Type -> SDoc-pprType       = pprPrecType topPrec-pprParendType = pprPrecType appPrec--pprPrecType :: PprPrec -> Type -> SDoc-pprPrecType = pprPrecTypeX emptyTidyEnv--pprPrecTypeX :: TidyEnv -> PprPrec -> Type -> SDoc-pprPrecTypeX env prec ty-  = getPprStyle $ \sty ->-    if debugStyle sty           -- Use debugPprType when in-    then debug_ppr_ty prec ty   -- when in debug-style-    else pprPrecIfaceType prec (tidyToIfaceTypeStyX env ty sty)--pprTyLit :: TyLit -> SDoc-pprTyLit = pprIfaceTyLit . toIfaceTyLit--pprKind, pprParendKind :: Kind -> SDoc-pprKind       = pprType-pprParendKind = pprParendType--tidyToIfaceTypeStyX :: TidyEnv -> Type -> PprStyle -> IfaceType-tidyToIfaceTypeStyX env ty sty-  | userStyle sty = tidyToIfaceTypeX env ty-  | otherwise     = toIfaceTypeX (tyCoVarsOfType ty) ty-     -- in latter case, don't tidy, as we'll be printing uniques.--tidyToIfaceType :: Type -> IfaceType-tidyToIfaceType = tidyToIfaceTypeX emptyTidyEnv--tidyToIfaceTypeX :: TidyEnv -> Type -> IfaceType--- It's vital to tidy before converting to an IfaceType--- or nested binders will become indistinguishable!------ Also for the free type variables, tell toIfaceTypeX to--- leave them as IfaceFreeTyVar.  This is super-important--- for debug printing.-tidyToIfaceTypeX env ty = toIfaceTypeX (mkVarSet free_tcvs) (tidyType env' ty)-  where-    env'      = tidyFreeTyCoVars env free_tcvs-    free_tcvs = tyCoVarsOfTypeWellScoped ty---------------pprCo, pprParendCo :: Coercion -> SDoc-pprCo       co = getPprStyle $ \ sty -> pprIfaceCoercion (tidyToIfaceCoSty co sty)-pprParendCo co = getPprStyle $ \ sty -> pprParendIfaceCoercion (tidyToIfaceCoSty co sty)--tidyToIfaceCoSty :: Coercion -> PprStyle -> IfaceCoercion-tidyToIfaceCoSty co sty-  | userStyle sty = tidyToIfaceCo co-  | otherwise     = toIfaceCoercionX (tyCoVarsOfCo co) co-     -- in latter case, don't tidy, as we'll be printing uniques.--tidyToIfaceCo :: Coercion -> IfaceCoercion--- It's vital to tidy before converting to an IfaceType--- or nested binders will become indistinguishable!------ Also for the free type variables, tell toIfaceCoercionX to--- leave them as IfaceFreeCoVar.  This is super-important--- for debug printing.-tidyToIfaceCo co = toIfaceCoercionX (mkVarSet free_tcvs) (tidyCo env co)-  where-    env       = tidyFreeTyCoVars emptyTidyEnv free_tcvs-    free_tcvs = scopedSort $ tyCoVarsOfCoList co--------------pprClassPred :: Class -> [Type] -> SDoc-pprClassPred clas tys = pprTypeApp (classTyCon clas) tys---------------pprTheta :: ThetaType -> SDoc-pprTheta = pprIfaceContext topPrec . map tidyToIfaceType--pprParendTheta :: ThetaType -> SDoc-pprParendTheta = pprIfaceContext appPrec . map tidyToIfaceType--pprThetaArrowTy :: ThetaType -> SDoc-pprThetaArrowTy = pprIfaceContextArr . map tidyToIfaceType---------------------instance Outputable Type where-    ppr ty = pprType ty--instance Outputable TyLit where-   ppr = pprTyLit---------------------pprSigmaType :: Type -> SDoc-pprSigmaType = pprIfaceSigmaType ShowForAllWhen . tidyToIfaceType--pprForAll :: [TyCoVarBinder] -> SDoc-pprForAll tvs = pprIfaceForAll (map toIfaceForAllBndr tvs)---- | Print a user-level forall; see Note [When to print foralls]-pprUserForAll :: [TyCoVarBinder] -> SDoc-pprUserForAll = pprUserIfaceForAll . map toIfaceForAllBndr--pprTCvBndrs :: [TyCoVarBinder] -> SDoc-pprTCvBndrs tvs = sep (map pprTCvBndr tvs)--pprTCvBndr :: TyCoVarBinder -> SDoc-pprTCvBndr = pprTyVar . binderVar--pprTyVars :: [TyVar] -> SDoc-pprTyVars tvs = sep (map pprTyVar tvs)--pprTyVar :: TyVar -> SDoc--- Print a type variable binder with its kind (but not if *)--- Here we do not go via IfaceType, because the duplication with--- pprIfaceTvBndr is minimal, and the loss of uniques etc in--- debug printing is disastrous-pprTyVar tv-  | isLiftedTypeKind kind = ppr tv-  | otherwise             = parens (ppr tv <+> dcolon <+> ppr kind)-  where-    kind = tyVarKind tv--instance Outputable TyCoBinder where-  ppr (Anon ty) = text "[anon]" <+> ppr ty-  ppr (Named (Bndr v Required))  = ppr v-  ppr (Named (Bndr v Specified)) = char '@' <> ppr v-  ppr (Named (Bndr v Inferred))  = braces (ppr v)--------------------instance Outputable Coercion where -- defined here to avoid orphans-  ppr = pprCo--debugPprType :: Type -> SDoc--- ^ debugPprType is a simple pretty printer that prints a type--- without going through IfaceType.  It does not format as prettily--- as the normal route, but it's much more direct, and that can--- be useful for debugging.  E.g. with -dppr-debug it prints the--- kind on type-variable /occurrences/ which the normal route--- fundamentally cannot do.-debugPprType ty = debug_ppr_ty topPrec ty--debug_ppr_ty :: PprPrec -> Type -> SDoc-debug_ppr_ty _ (LitTy l)-  = ppr l--debug_ppr_ty _ (TyVarTy tv)-  = ppr tv  -- With -dppr-debug we get (tv :: kind)--debug_ppr_ty prec (FunTy arg res)-  = maybeParen prec funPrec $-    sep [debug_ppr_ty funPrec arg, arrow <+> debug_ppr_ty prec res]--debug_ppr_ty prec (TyConApp tc tys)-  | null tys  = ppr tc-  | otherwise = maybeParen prec appPrec $-                hang (ppr tc) 2 (sep (map (debug_ppr_ty appPrec) tys))--debug_ppr_ty _ (AppTy t1 t2)-  = hang (debug_ppr_ty appPrec t1)  -- Print parens so we see ((a b) c)-       2 (debug_ppr_ty appPrec t2)  -- so that we can distinguish-                                    -- TyConApp from AppTy--debug_ppr_ty prec (CastTy ty co)-  = maybeParen prec topPrec $-    hang (debug_ppr_ty topPrec ty)-       2 (text "|>" <+> ppr co)--debug_ppr_ty _ (CoercionTy co)-  = parens (text "CO" <+> ppr co)--debug_ppr_ty prec ty@(ForAllTy {})-  | (tvs, body) <- split ty-  = maybeParen prec funPrec $-    hang (text "forall" <+> fsep (map ppr tvs) <> dot)-         -- The (map ppr tvs) will print kind-annotated-         -- tvs, because we are (usually) in debug-style-       2 (ppr body)-  where-    split ty | ForAllTy tv ty' <- ty-             , (tvs, body) <- split ty'-             = (tv:tvs, body)-             | otherwise-             = ([], ty)--{--Note [When to print foralls]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Mostly we want to print top-level foralls when (and only when) the user specifies--fprint-explicit-foralls.  But when kind polymorphism is at work, that suppresses-too much information; see Trac #9018.--So I'm trying out this rule: print explicit foralls if-  a) User specifies -fprint-explicit-foralls, or-  b) Any of the quantified type variables has a kind-     that mentions a kind variable--This catches common situations, such as a type siguature-     f :: m a-which means-      f :: forall k. forall (m :: k->*) (a :: k). m a-We really want to see both the "forall k" and the kind signatures-on m and a.  The latter comes from pprTCvBndr.--Note [Infix type variables]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-With TypeOperators you can say--   f :: (a ~> b) -> b--and the (~>) is considered a type variable.  However, the type-pretty-printer in this module will just see (a ~> b) as--   App (App (TyVarTy "~>") (TyVarTy "a")) (TyVarTy "b")--So it'll print the type in prefix form.  To avoid confusion we must-remember to parenthesise the operator, thus--   (~>) a b -> b--See Trac #2766.--}--pprDataCons :: TyCon -> SDoc-pprDataCons = sepWithVBars . fmap pprDataConWithArgs . tyConDataCons-  where-    sepWithVBars [] = empty-    sepWithVBars docs = sep (punctuate (space <> vbar) docs)--pprDataConWithArgs :: DataCon -> SDoc-pprDataConWithArgs dc = sep [forAllDoc, thetaDoc, ppr dc <+> argsDoc]-  where-    (_univ_tvs, _ex_tvs, _eq_spec, theta, arg_tys, _res_ty) = dataConFullSig dc-    user_bndrs = dataConUserTyVarBinders dc-    forAllDoc  = pprUserForAll user_bndrs-    thetaDoc   = pprThetaArrowTy theta-    argsDoc    = hsep (fmap pprParendType arg_tys)---pprTypeApp :: TyCon -> [Type] -> SDoc-pprTypeApp tc tys-  = pprIfaceTypeApp topPrec (toIfaceTyCon tc)-                            (toIfaceTcArgs tc tys)-    -- TODO: toIfaceTcArgs seems rather wasteful here----------------------- | Display all kind information (with @-fprint-explicit-kinds@) when the--- provided 'Bool' argument is 'True'.--- See @Note [Kind arguments in error messages]@ in "TcErrors".-pprWithExplicitKindsWhen :: Bool -> SDoc -> SDoc-pprWithExplicitKindsWhen b-  = updSDocDynFlags $ \dflags ->-      if b then gopt_set dflags Opt_PrintExplicitKinds-           else dflags--{--%************************************************************************-%*                                                                      *-\subsection{TidyType}-%*                                                                      *-%************************************************************************--}---- | This tidies up a type for printing in an error message, or in--- an interface file.------ It doesn't change the uniques at all, just the print names.-tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])-tidyVarBndrs tidy_env tvs-  = mapAccumL tidyVarBndr (avoidNameClashes tvs tidy_env) tvs--tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)-tidyVarBndr tidy_env@(occ_env, subst) var-  = case tidyOccName occ_env (getHelpfulOccName var) of-      (occ_env', occ') -> ((occ_env', subst'), var')-        where-          subst' = extendVarEnv subst var var'-          var'   = setVarType (setVarName var name') type'-          type'  = tidyType tidy_env (varType var)-          name'  = tidyNameOcc name occ'-          name   = varName var--avoidNameClashes :: [TyCoVar] -> TidyEnv -> TidyEnv--- Seed the occ_env with clashes among the names, see--- Node [Tidying multiple names at once] in OccName-avoidNameClashes tvs (occ_env, subst)-  = (avoidClashesOccEnv occ_env occs, subst)-  where-    occs = map getHelpfulOccName tvs--getHelpfulOccName :: TyCoVar -> OccName--- A TcTyVar with a System Name is probably a--- unification variable; when we tidy them we give them a trailing--- "0" (or 1 etc) so that they don't take precedence for the--- un-modified name. Plus, indicating a unification variable in--- this way is a helpful clue for users-getHelpfulOccName tv-  | isSystemName name, isTcTyVar tv-  = mkTyVarOcc (occNameString occ ++ "0")-  | otherwise-  = occ-  where-   name = varName tv-   occ  = getOccName name--tidyTyCoVarBinder :: TidyEnv -> VarBndr TyCoVar vis-                  -> (TidyEnv, VarBndr TyCoVar vis)-tidyTyCoVarBinder tidy_env (Bndr tv vis)-  = (tidy_env', Bndr tv' vis)-  where-    (tidy_env', tv') = tidyVarBndr tidy_env tv--tidyTyCoVarBinders :: TidyEnv -> [VarBndr TyCoVar vis]-                   -> (TidyEnv, [VarBndr TyCoVar vis])-tidyTyCoVarBinders = mapAccumL tidyTyCoVarBinder------------------tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv--- ^ Add the free 'TyVar's to the env in tidy form,--- so that we can tidy the type they are free in-tidyFreeTyCoVars (full_occ_env, var_env) tyvars-  = fst (tidyOpenTyCoVars (full_occ_env, var_env) tyvars)------------------tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])-tidyOpenTyCoVars env tyvars = mapAccumL tidyOpenTyCoVar env tyvars------------------tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)--- ^ Treat a new 'TyCoVar' as a binder, and give it a fresh tidy name--- using the environment if one has not already been allocated. See--- also 'tidyVarBndr'-tidyOpenTyCoVar env@(_, subst) tyvar-  = case lookupVarEnv subst tyvar of-        Just tyvar' -> (env, tyvar')              -- Already substituted-        Nothing     ->-          let env' = tidyFreeTyCoVars env (tyCoVarsOfTypeList (tyVarKind tyvar))-          in tidyVarBndr env' tyvar  -- Treat it as a binder------------------tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar-tidyTyCoVarOcc env@(_, subst) tv-  = case lookupVarEnv subst tv of-        Nothing  -> updateVarType (tidyType env) tv-        Just tv' -> tv'------------------tidyTypes :: TidyEnv -> [Type] -> [Type]-tidyTypes env tys = map (tidyType env) tys------------------tidyType :: TidyEnv -> Type -> Type-tidyType _   (LitTy n)            = LitTy n-tidyType env (TyVarTy tv)         = TyVarTy (tidyTyCoVarOcc env tv)-tidyType env (TyConApp tycon tys) = let args = tidyTypes env tys-                                    in args `seqList` TyConApp tycon args-tidyType env (AppTy fun arg)      = (AppTy $! (tidyType env fun)) $! (tidyType env arg)-tidyType env (FunTy fun arg)      = (FunTy $! (tidyType env fun)) $! (tidyType env arg)-tidyType env (ty@(ForAllTy{}))    = mkForAllTys' (zip tvs' vis) $! tidyType env' body_ty-  where-    (tvs, vis, body_ty) = splitForAllTys' ty-    (env', tvs') = tidyVarBndrs env tvs-tidyType env (CastTy ty co)       = (CastTy $! tidyType env ty) $! (tidyCo env co)-tidyType env (CoercionTy co)      = CoercionTy $! (tidyCo env co)----- The following two functions differ from mkForAllTys and splitForAllTys in that--- they expect/preserve the ArgFlag argument. Thes belong to types/Type.hs, but--- how should they be named?-mkForAllTys' :: [(TyCoVar, ArgFlag)] -> Type -> Type-mkForAllTys' tvvs ty = foldr strictMkForAllTy ty tvvs-  where-    strictMkForAllTy (tv,vis) ty = (ForAllTy $! ((Bndr $! tv) $! vis)) $! ty--splitForAllTys' :: Type -> ([TyCoVar], [ArgFlag], Type)-splitForAllTys' ty = go ty [] []-  where-    go (ForAllTy (Bndr tv vis) ty) tvs viss = go ty (tv:tvs) (vis:viss)-    go ty                          tvs viss = (reverse tvs, reverse viss, ty)--------------------- | Grabs the free type variables, tidies them--- and then uses 'tidyType' to work over the type itself-tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])-tidyOpenTypes env tys-  = (env', tidyTypes (trimmed_occ_env, var_env) tys)-  where-    (env'@(_, var_env), tvs') = tidyOpenTyCoVars env $-                                tyCoVarsOfTypesWellScoped tys-    trimmed_occ_env = initTidyOccEnv (map getOccName tvs')-      -- The idea here was that we restrict the new TidyEnv to the-      -- _free_ vars of the types, so that we don't gratuitously rename-      -- the _bound_ variables of the types.------------------tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)-tidyOpenType env ty = let (env', [ty']) = tidyOpenTypes env [ty] in-                      (env', ty')-------------------- | Calls 'tidyType' on a top-level type (i.e. with an empty tidying environment)-tidyTopType :: Type -> Type-tidyTopType ty = tidyType emptyTidyEnv ty------------------tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)-tidyOpenKind = tidyOpenType--tidyKind :: TidyEnv -> Kind -> Kind-tidyKind = tidyType-------------------tidyCo :: TidyEnv -> Coercion -> Coercion-tidyCo env@(_, subst) co-  = go co-  where-    go_mco MRefl    = MRefl-    go_mco (MCo co) = MCo (go co)--    go (Refl ty)             = Refl (tidyType env ty)-    go (GRefl r ty mco)      = GRefl r (tidyType env ty) $! go_mco mco-    go (TyConAppCo r tc cos) = let args = map go cos-                               in args `seqList` TyConAppCo r tc args-    go (AppCo co1 co2)       = (AppCo $! go co1) $! go co2-    go (ForAllCo tv h co)    = ((ForAllCo $! tvp) $! (go h)) $! (tidyCo envp co)-                               where (envp, tvp) = tidyVarBndr env tv-            -- the case above duplicates a bit of work in tidying h and the kind-            -- of tv. But the alternative is to use coercionKind, which seems worse.-    go (FunCo r co1 co2)     = (FunCo r $! go co1) $! go co2-    go (CoVarCo cv)          = case lookupVarEnv subst cv of-                                 Nothing  -> CoVarCo cv-                                 Just cv' -> CoVarCo cv'-    go (HoleCo h)            = HoleCo h-    go (AxiomInstCo con ind cos) = let args = map go cos-                               in  args `seqList` AxiomInstCo con ind args-    go (UnivCo p r t1 t2)    = (((UnivCo $! (go_prov p)) $! r) $!-                                tidyType env t1) $! tidyType env t2-    go (SymCo co)            = SymCo $! go co-    go (TransCo co1 co2)     = (TransCo $! go co1) $! go co2-    go (NthCo r d co)        = NthCo r d $! go co-    go (LRCo lr co)          = LRCo lr $! go co-    go (InstCo co ty)        = (InstCo $! go co) $! go ty-    go (KindCo co)           = KindCo $! go co-    go (SubCo co)            = SubCo $! go co-    go (AxiomRuleCo ax cos)  = let cos1 = tidyCos env cos-                               in cos1 `seqList` AxiomRuleCo ax cos1--    go_prov UnsafeCoerceProv    = UnsafeCoerceProv-    go_prov (PhantomProv co)    = PhantomProv (go co)-    go_prov (ProofIrrelProv co) = ProofIrrelProv (go co)-    go_prov p@(PluginProv _)    = p--tidyCos :: TidyEnv -> [Coercion] -> [Coercion]-tidyCos env = map (tidyCo env)---{- *********************************************************************-*                                                                      *-                   typeSize, coercionSize-*                                                                      *-********************************************************************* -}---- NB: We put typeSize/coercionSize here because they are mutually---     recursive, and have the CPR property.  If we have mutual---     recursion across a hi-boot file, we don't get the CPR property---     and these functions allocate a tremendous amount of rubbish.---     It's not critical (because typeSize is really only used in---     debug mode, but I tripped over an example (T5642) in which---     typeSize was one of the biggest single allocators in all of GHC.---     And it's easy to fix, so I did.---- NB: typeSize does not respect `eqType`, in that two types that---     are `eqType` may return different sizes. This is OK, because this---     function is used only in reporting, not decision-making.--typeSize :: Type -> Int-typeSize (LitTy {})                 = 1-typeSize (TyVarTy {})               = 1-typeSize (AppTy t1 t2)              = typeSize t1 + typeSize t2-typeSize (FunTy t1 t2)              = typeSize t1 + typeSize t2+  TyCoPpr  imports TyCoRep+  TyCoFVs  imports TyCoRep+  TyCoSubst imports TyCoRep, TyCoFVs, TyCoPpr+  TyCoTidy imports TyCoRep, TyCoFVs+  TysPrim  imports TyCoRep ( including mkTyConTy )+  Coercion imports Type+-}++-- We expose the relevant stuff from this module via the Type module+{-# OPTIONS_HADDOCK not-home #-}+{-# LANGUAGE CPP, DeriveDataTypeable, MultiWayIf, PatternSynonyms, BangPatterns #-}++module TyCoRep (+        TyThing(..), tyThingCategory, pprTyThingCategory, pprShortTyThing,++        -- * Types+        Type( TyVarTy, AppTy, TyConApp, ForAllTy+            , LitTy, CastTy, CoercionTy+            , FunTy, ft_arg, ft_res, ft_af+            ),  -- Export the type synonym FunTy too++        TyLit(..),+        KindOrType, Kind,+        KnotTied,+        PredType, ThetaType,      -- Synonyms+        ArgFlag(..), AnonArgFlag(..), ForallVisFlag(..),++        -- * Coercions+        Coercion(..),+        UnivCoProvenance(..),+        CoercionHole(..), coHoleCoVar, setCoHoleCoVar,+        CoercionN, CoercionR, CoercionP, KindCoercion,+        MCoercion(..), MCoercionR, MCoercionN,++        -- * Functions over types+        mkTyConTy, mkTyVarTy, mkTyVarTys,+        mkTyCoVarTy, mkTyCoVarTys,+        mkFunTy, mkVisFunTy, mkInvisFunTy, mkVisFunTys, mkInvisFunTys,+        mkForAllTy, mkForAllTys,+        mkPiTy, mkPiTys,++        -- * Functions over binders+        TyCoBinder(..), TyCoVarBinder, TyBinder,+        binderVar, binderVars, binderType, binderArgFlag,+        delBinderVar,+        isInvisibleArgFlag, isVisibleArgFlag,+        isInvisibleBinder, isVisibleBinder,+        isTyBinder, isNamedBinder,++        -- * Functions over coercions+        pickLR,++        -- * Sizes+        typeSize, coercionSize, provSize+    ) where++#include "HsVersions.h"++import GhcPrelude++import {-# SOURCE #-} TyCoPpr ( pprType, pprCo, pprTyLit )++   -- Transitively pulls in a LOT of stuff, better to break the loop++import {-# SOURCE #-} ConLike ( ConLike(..), conLikeName )++-- friends:+import IfaceType+import Var+import VarSet+import Name hiding ( varName )+import TyCon+import CoAxiom++-- others+import BasicTypes ( LeftOrRight(..), pickLR )+import Outputable+import FastString+import Util++-- libraries+import qualified Data.Data as Data hiding ( TyCon )+import Data.IORef ( IORef )   -- for CoercionHole++{-+%************************************************************************+%*                                                                      *+                        TyThing+%*                                                                      *+%************************************************************************++Despite the fact that DataCon has to be imported via a hi-boot route,+this module seems the right place for TyThing, because it's needed for+funTyCon and all the types in TysPrim.++It is also SOURCE-imported into Name.hs+++Note [ATyCon for classes]+~~~~~~~~~~~~~~~~~~~~~~~~~+Both classes and type constructors are represented in the type environment+as ATyCon.  You can tell the difference, and get to the class, with+   isClassTyCon :: TyCon -> Bool+   tyConClass_maybe :: TyCon -> Maybe Class+The Class and its associated TyCon have the same Name.+-}++-- | A global typecheckable-thing, essentially anything that has a name.+-- Not to be confused with a 'TcTyThing', which is also a typecheckable+-- thing but in the *local* context.  See 'TcEnv' for how to retrieve+-- a 'TyThing' given a 'Name'.+data TyThing+  = AnId     Id+  | AConLike ConLike+  | ATyCon   TyCon       -- TyCons and classes; see Note [ATyCon for classes]+  | ACoAxiom (CoAxiom Branched)++instance Outputable TyThing where+  ppr = pprShortTyThing++instance NamedThing TyThing where       -- Can't put this with the type+  getName (AnId id)     = getName id    -- decl, because the DataCon instance+  getName (ATyCon tc)   = getName tc    -- isn't visible there+  getName (ACoAxiom cc) = getName cc+  getName (AConLike cl) = conLikeName cl++pprShortTyThing :: TyThing -> SDoc+-- c.f. PprTyThing.pprTyThing, which prints all the details+pprShortTyThing thing+  = pprTyThingCategory thing <+> quotes (ppr (getName thing))++pprTyThingCategory :: TyThing -> SDoc+pprTyThingCategory = text . capitalise . tyThingCategory++tyThingCategory :: TyThing -> String+tyThingCategory (ATyCon tc)+  | isClassTyCon tc = "class"+  | otherwise       = "type constructor"+tyThingCategory (ACoAxiom _) = "coercion axiom"+tyThingCategory (AnId   _)   = "identifier"+tyThingCategory (AConLike (RealDataCon _)) = "data constructor"+tyThingCategory (AConLike (PatSynCon _))  = "pattern synonym"+++{- **********************************************************************+*                                                                       *+                        Type+*                                                                       *+********************************************************************** -}++-- | The key representation of types within the compiler++type KindOrType = Type -- See Note [Arguments to type constructors]++-- | The key type representing kinds in the compiler.+type Kind = Type++-- If you edit this type, you may need to update the GHC formalism+-- See Note [GHC Formalism] in coreSyn/CoreLint.hs+data Type+  -- See Note [Non-trivial definitional equality]+  = TyVarTy Var -- ^ Vanilla type or kind variable (*never* a coercion variable)++  | AppTy+        Type+        Type            -- ^ Type application to something other than a 'TyCon'. Parameters:+                        --+                        --  1) Function: must /not/ be a 'TyConApp' or 'CastTy',+                        --     must be another 'AppTy', or 'TyVarTy'+                        --     See Note [Respecting definitional equality] (EQ1) about the+                        --     no 'CastTy' requirement+                        --+                        --  2) Argument type++  | TyConApp+        TyCon+        [KindOrType]    -- ^ Application of a 'TyCon', including newtypes /and/ synonyms.+                        -- Invariant: saturated applications of 'FunTyCon' must+                        -- use 'FunTy' and saturated synonyms must use their own+                        -- constructors. However, /unsaturated/ 'FunTyCon's+                        -- do appear as 'TyConApp's.+                        -- Parameters:+                        --+                        -- 1) Type constructor being applied to.+                        --+                        -- 2) Type arguments. Might not have enough type arguments+                        --    here to saturate the constructor.+                        --    Even type synonyms are not necessarily saturated;+                        --    for example unsaturated type synonyms+                        --    can appear as the right hand side of a type synonym.++  | ForAllTy+        {-# UNPACK #-} !TyCoVarBinder+        Type            -- ^ A Π type.++  | FunTy      -- ^ t1 -> t2   Very common, so an important special case+                -- See Note [Function types]+     { ft_af  :: AnonArgFlag  -- Is this (->) or (=>)?+     , ft_arg :: Type           -- Argument type+     , ft_res :: Type }         -- Result type++  | LitTy TyLit     -- ^ Type literals are similar to type constructors.++  | CastTy+        Type+        KindCoercion  -- ^ A kind cast. The coercion is always nominal.+                      -- INVARIANT: The cast is never refl.+                      -- INVARIANT: The Type is not a CastTy (use TransCo instead)+                      -- See Note [Respecting definitional equality] (EQ2) and (EQ3)++  | CoercionTy+        Coercion    -- ^ Injection of a Coercion into a type+                    -- This should only ever be used in the RHS of an AppTy,+                    -- in the list of a TyConApp, when applying a promoted+                    -- GADT data constructor++  deriving Data.Data++instance Outputable Type where+  ppr = pprType++-- NOTE:  Other parts of the code assume that type literals do not contain+-- types or type variables.+data TyLit+  = NumTyLit Integer+  | StrTyLit FastString+  deriving (Eq, Ord, Data.Data)++instance Outputable TyLit where+   ppr = pprTyLit++{- Note [Function types]+~~~~~~~~~~~~~~~~~~~~~~~~+FFunTy is the constructor for a function type.  Lots of things to say+about it!++* FFunTy is the data constructor, meaning "full function type".++* The function type constructor (->) has kind+     (->) :: forall r1 r2. TYPE r1 -> TYPE r2 -> Type LiftedRep+  mkTyConApp ensure that we convert a saturated application+    TyConApp (->) [r1,r2,t1,t2] into FunTy t1 t2+  dropping the 'r1' and 'r2' arguments; they are easily recovered+  from 't1' and 't2'.++* The ft_af field says whether or not this is an invisible argument+     VisArg:   t1 -> t2    Ordinary function type+     InvisArg: t1 => t2    t1 is guaranteed to be a predicate type,+                           i.e. t1 :: Constraint+  See Note [Types for coercions, predicates, and evidence]++  This visibility info makes no difference in Core; it matters+  only when we regard the type as a Haskell source type.++* FunTy is a (unidirectional) pattern synonym that allows+  positional pattern matching (FunTy arg res), ignoring the+  ArgFlag.+-}++{- -----------------------+      Commented out until the pattern match+      checker can handle it; see #16185++      For now we use the CPP macro #define FunTy FFunTy _+      (see HsVersions.h) to allow pattern matching on a+      (positional) FunTy constructor.++{-# COMPLETE FunTy, TyVarTy, AppTy, TyConApp+           , ForAllTy, LitTy, CastTy, CoercionTy :: Type #-}++-- | 'FunTy' is a (uni-directional) pattern synonym for the common+-- case where we want to match on the argument/result type, but+-- ignoring the AnonArgFlag+pattern FunTy :: Type -> Type -> Type+pattern FunTy arg res <- FFunTy { ft_arg = arg, ft_res = res }++       End of commented out block+---------------------------------- -}++{- Note [Types for coercions, predicates, and evidence]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We treat differently:++  (a) Predicate types+        Test: isPredTy+        Binders: DictIds+        Kind: Constraint+        Examples: (Eq a), and (a ~ b)++  (b) Coercion types are primitive, unboxed equalities+        Test: isCoVarTy+        Binders: CoVars (can appear in coercions)+        Kind: TYPE (TupleRep [])+        Examples: (t1 ~# t2) or (t1 ~R# t2)++  (c) Evidence types is the type of evidence manipulated by+      the type constraint solver.+        Test: isEvVarType+        Binders: EvVars+        Kind: Constraint or TYPE (TupleRep [])+        Examples: all coercion types and predicate types++Coercion types and predicate types are mutually exclusive,+but evidence types are a superset of both.++When treated as a user type,++  - Predicates (of kind Constraint) are invisible and are+    implicitly instantiated++  - Coercion types, and non-pred evidence types (i.e. not+    of kind Constrain), are just regular old types, are+    visible, and are not implicitly instantiated.++In a FunTy { ft_af = InvisArg }, the argument type is always+a Predicate type.++Note [Constraints in kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Do we allow a type constructor to have a kind like+   S :: Eq a => a -> Type++No, we do not.  Doing so would mean would need a TyConApp like+   S @k @(d :: Eq k) (ty :: k)+ and we have no way to build, or decompose, evidence like+ (d :: Eq k) at the type level.++But we admit one exception: equality.  We /do/ allow, say,+   MkT :: (a ~ b) => a -> b -> Type a b++Why?  Because we can, without much difficulty.  Moreover+we can promote a GADT data constructor (see TyCon+Note [Promoted data constructors]), like+  data GT a b where+    MkGT : a -> a -> GT a a+so programmers might reasonably expect to be able to+promote MkT as well.++How does this work?++* In TcValidity.checkConstraintsOK we reject kinds that+  have constraints other than (a~b) and (a~~b).++* In Inst.tcInstInvisibleTyBinder we instantiate a call+  of MkT by emitting+     [W] co :: alpha ~# beta+  and producing the elaborated term+     MkT @alpha @beta (Eq# alpha beta co)+  We don't generate a boxed "Wanted"; we generate only a+  regular old /unboxed/ primitive-equality Wanted, and build+  the box on the spot.++* How can we get such a MkT?  By promoting a GADT-style data+  constructor+     data T a b where+       MkT :: (a~b) => a -> b -> T a b+  See DataCon.mkPromotedDataCon+  and Note [Promoted data constructors] in TyCon++* We support both homogeneous (~) and heterogeneous (~~)+  equality.  (See Note [The equality types story]+  in TysPrim for a primer on these equality types.)++* How do we prevent a MkT having an illegal constraint like+  Eq a?  We check for this at use-sites; see TcHsType.tcTyVar,+  specifically dc_theta_illegal_constraint.++* Notice that nothing special happens if+    K :: (a ~# b) => blah+  because (a ~# b) is not a predicate type, and is never+  implicitly instantiated. (Mind you, it's not clear how you+  could creates a type constructor with such a kind.) See+  Note [Types for coercions, predicates, and evidence]++* The existence of promoted MkT with an equality-constraint+  argument is the (only) reason that the AnonTCB constructor+  of TyConBndrVis carries an AnonArgFlag (VisArg/InvisArg).+  For example, when we promote the data constructor+     MkT :: forall a b. (a~b) => a -> b -> T a b+  we get a PromotedDataCon with tyConBinders+      Bndr (a :: Type)  (NamedTCB Inferred)+      Bndr (b :: Type)  (NamedTCB Inferred)+      Bndr (_ :: a ~ b) (AnonTCB InvisArg)+      Bndr (_ :: a)     (AnonTCB VisArg))+      Bndr (_ :: b)     (AnonTCB VisArg))++* One might reasonably wonder who *unpacks* these boxes once they are+  made. After all, there is no type-level `case` construct. The+  surprising answer is that no one ever does. Instead, if a GADT+  constructor is used on the left-hand side of a type family equation,+  that occurrence forces GHC to unify the types in question. For+  example:++  data G a where+    MkG :: G Bool++  type family F (x :: G a) :: a where+    F MkG = False++  When checking the LHS `F MkG`, GHC sees the MkG constructor and then must+  unify F's implicit parameter `a` with Bool. This succeeds, making the equation++    F Bool (MkG @Bool <Bool>) = False++  Note that we never need unpack the coercion. This is because type+  family equations are *not* parametric in their kind variables. That+  is, we could have just said++  type family H (x :: G a) :: a where+    H _ = False++  The presence of False on the RHS also forces `a` to become Bool,+  giving us++    H Bool _ = False++  The fact that any of this works stems from the lack of phase+  separation between types and kinds (unlike the very present phase+  separation between terms and types).++  Once we have the ability to pattern-match on types below top-level,+  this will no longer cut it, but it seems fine for now.+++Note [Arguments to type constructors]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Because of kind polymorphism, in addition to type application we now+have kind instantiation. We reuse the same notations to do so.++For example:++  Just (* -> *) Maybe+  Right * Nat Zero++are represented by:++  TyConApp (PromotedDataCon Just) [* -> *, Maybe]+  TyConApp (PromotedDataCon Right) [*, Nat, (PromotedDataCon Zero)]++Important note: Nat is used as a *kind* and not as a type. This can be+confusing, since type-level Nat and kind-level Nat are identical. We+use the kind of (PromotedDataCon Right) to know if its arguments are+kinds or types.++This kind instantiation only happens in TyConApp currently.++Note [Non-trivial definitional equality]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Is Int |> <*> the same as Int? YES! In order to reduce headaches,+we decide that any reflexive casts in types are just ignored.+(Indeed they must be. See Note [Respecting definitional equality].)+More generally, the `eqType` function, which defines Core's type equality+relation, ignores casts and coercion arguments, as long as the+two types have the same kind. This allows us to be a little sloppier+in keeping track of coercions, which is a good thing. It also means+that eqType does not depend on eqCoercion, which is also a good thing.++Why is this sensible? That is, why is something different than α-equivalence+appropriate for the implementation of eqType?++Anything smaller than ~ and homogeneous is an appropriate definition for+equality. The type safety of FC depends only on ~. Let's say η : τ ~ σ. Any+expression of type τ can be transmuted to one of type σ at any point by+casting. The same is true of expressions of type σ. So in some sense, τ and σ+are interchangeable.++But let's be more precise. If we examine the typing rules of FC (say, those in+https://cs.brynmawr.edu/~rae/papers/2015/equalities/equalities.pdf)+there are several places where the same metavariable is used in two different+premises to a rule. (For example, see Ty_App.) There is an implicit equality+check here. What definition of equality should we use? By convention, we use+α-equivalence. Take any rule with one (or more) of these implicit equality+checks. Then there is an admissible rule that uses ~ instead of the implicit+check, adding in casts as appropriate.++The only problem here is that ~ is heterogeneous. To make the kinds work out+in the admissible rule that uses ~, it is necessary to homogenize the+coercions. That is, if we have η : (τ : κ1) ~ (σ : κ2), then we don't use η;+we use η |> kind η, which is homogeneous.++The effect of this all is that eqType, the implementation of the implicit+equality check, can use any homogeneous relation that is smaller than ~, as+those rules must also be admissible.++A more drawn out argument around all of this is presented in Section 7.2 of+Richard E's thesis (http://cs.brynmawr.edu/~rae/papers/2016/thesis/eisenberg-thesis.pdf).++What would go wrong if we insisted on the casts matching? See the beginning of+Section 8 in the unpublished paper above. Theoretically, nothing at all goes+wrong. But in practical terms, getting the coercions right proved to be+nightmarish. And types would explode: during kind-checking, we often produce+reflexive kind coercions. When we try to cast by these, mkCastTy just discards+them. But if we used an eqType that distinguished between Int and Int |> <*>,+then we couldn't discard -- the output of kind-checking would be enormous,+and we would need enormous casts with lots of CoherenceCo's to straighten+them out.++Would anything go wrong if eqType respected type families? No, not at all. But+that makes eqType rather hard to implement.++Thus, the guideline for eqType is that it should be the largest+easy-to-implement relation that is still smaller than ~ and homogeneous. The+precise choice of relation is somewhat incidental, as long as the smart+constructors and destructors in Type respect whatever relation is chosen.++Another helpful principle with eqType is this:++ (EQ) If (t1 `eqType` t2) then I can replace t1 by t2 anywhere.++This principle also tells us that eqType must relate only types with the+same kinds.++Note [Respecting definitional equality]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note [Non-trivial definitional equality] introduces the property (EQ).+How is this upheld?++Any function that pattern matches on all the constructors will have to+consider the possibility of CastTy. Presumably, those functions will handle+CastTy appropriately and we'll be OK.++More dangerous are the splitXXX functions. Let's focus on splitTyConApp.+We don't want it to fail on (T a b c |> co). Happily, if we have+  (T a b c |> co) `eqType` (T d e f)+then co must be reflexive. Why? eqType checks that the kinds are equal, as+well as checking that (a `eqType` d), (b `eqType` e), and (c `eqType` f).+By the kind check, we know that (T a b c |> co) and (T d e f) have the same+kind. So the only way that co could be non-reflexive is for (T a b c) to have+a different kind than (T d e f). But because T's kind is closed (all tycon kinds+are closed), the only way for this to happen is that one of the arguments has+to differ, leading to a contradiction. Thus, co is reflexive.++Accordingly, by eliminating reflexive casts, splitTyConApp need not worry+about outermost casts to uphold (EQ). Eliminating reflexive casts is done+in mkCastTy.++Unforunately, that's not the end of the story. Consider comparing+  (T a b c)      =?       (T a b |> (co -> <Type>)) (c |> co)+These two types have the same kind (Type), but the left type is a TyConApp+while the right type is not. To handle this case, we say that the right-hand+type is ill-formed, requiring an AppTy never to have a casted TyConApp+on its left. It is easy enough to pull around the coercions to maintain+this invariant, as done in Type.mkAppTy. In the example above, trying to+form the right-hand type will instead yield (T a b (c |> co |> sym co) |> <Type>).+Both the casts there are reflexive and will be dropped. Huzzah.++This idea of pulling coercions to the right works for splitAppTy as well.++However, there is one hiccup: it's possible that a coercion doesn't relate two+Pi-types. For example, if we have @type family Fun a b where Fun a b = a -> b@,+then we might have (T :: Fun Type Type) and (T |> axFun) Int. That axFun can't+be pulled to the right. But we don't need to pull it: (T |> axFun) Int is not+`eqType` to any proper TyConApp -- thus, leaving it where it is doesn't violate+our (EQ) property.++Lastly, in order to detect reflexive casts reliably, we must make sure not+to have nested casts: we update (t |> co1 |> co2) to (t |> (co1 `TransCo` co2)).++In sum, in order to uphold (EQ), we need the following three invariants:++  (EQ1) No decomposable CastTy to the left of an AppTy, where a decomposable+        cast is one that relates either a FunTy to a FunTy or a+        ForAllTy to a ForAllTy.+  (EQ2) No reflexive casts in CastTy.+  (EQ3) No nested CastTys.+  (EQ4) No CastTy over (ForAllTy (Bndr tyvar vis) body).+        See Note [Weird typing rule for ForAllTy] in Type.++These invariants are all documented above, in the declaration for Type.++Note [Unused coercion variable in ForAllTy]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+  \(co:t1 ~ t2). e++What type should we give to this expression?+  (1) forall (co:t1 ~ t2) -> t+  (2) (t1 ~ t2) -> t++If co is used in t, (1) should be the right choice.+if co is not used in t, we would like to have (1) and (2) equivalent.++However, we want to keep eqType simple and don't want eqType (1) (2) to return+True in any case.++We decide to always construct (2) if co is not used in t.++Thus in mkLamType, we check whether the variable is a coercion+variable (of type (t1 ~# t2), and whether it is un-used in the+body. If so, it returns a FunTy instead of a ForAllTy.++There are cases we want to skip the check. For example, the check is+unnecessary when it is known from the context that the input variable+is a type variable.  In those cases, we use mkForAllTy.++-}++-- | A type labeled 'KnotTied' might have knot-tied tycons in it. See+-- Note [Type checking recursive type and class declarations] in+-- TcTyClsDecls+type KnotTied ty = ty++{- **********************************************************************+*                                                                       *+                  TyCoBinder and ArgFlag+*                                                                       *+********************************************************************** -}++-- | A 'TyCoBinder' represents an argument to a function. TyCoBinders can be+-- dependent ('Named') or nondependent ('Anon'). They may also be visible or+-- not. See Note [TyCoBinders]+data TyCoBinder+  = Named TyCoVarBinder    -- A type-lambda binder+  | Anon AnonArgFlag Type  -- A term-lambda binder. Type here can be CoercionTy.+                           -- Visibility is determined by the AnonArgFlag+  deriving Data.Data++instance Outputable TyCoBinder where+  ppr (Anon af ty) = ppr af <+> ppr ty+  ppr (Named (Bndr v Required))  = ppr v+  ppr (Named (Bndr v Specified)) = char '@' <> ppr v+  ppr (Named (Bndr v Inferred))  = braces (ppr v)+++-- | 'TyBinder' is like 'TyCoBinder', but there can only be 'TyVarBinder'+-- in the 'Named' field.+type TyBinder = TyCoBinder++-- | Remove the binder's variable from the set, if the binder has+-- a variable.+delBinderVar :: VarSet -> TyCoVarBinder -> VarSet+delBinderVar vars (Bndr tv _) = vars `delVarSet` tv++-- | Does this binder bind an invisible argument?+isInvisibleBinder :: TyCoBinder -> Bool+isInvisibleBinder (Named (Bndr _ vis)) = isInvisibleArgFlag vis+isInvisibleBinder (Anon InvisArg _)    = True+isInvisibleBinder (Anon VisArg   _)    = False++-- | Does this binder bind a visible argument?+isVisibleBinder :: TyCoBinder -> Bool+isVisibleBinder = not . isInvisibleBinder++isNamedBinder :: TyCoBinder -> Bool+isNamedBinder (Named {}) = True+isNamedBinder (Anon {})  = False++-- | If its a named binder, is the binder a tyvar?+-- Returns True for nondependent binder.+-- This check that we're really returning a *Ty*Binder (as opposed to a+-- coercion binder). That way, if/when we allow coercion quantification+-- in more places, we'll know we missed updating some function.+isTyBinder :: TyCoBinder -> Bool+isTyBinder (Named bnd) = isTyVarBinder bnd+isTyBinder _ = True++{- Note [TyCoBinders]+~~~~~~~~~~~~~~~~~~~+A ForAllTy contains a TyCoVarBinder.  But a type can be decomposed+to a telescope consisting of a [TyCoBinder]++A TyCoBinder represents the type of binders -- that is, the type of an+argument to a Pi-type. GHC Core currently supports two different+Pi-types:++ * A non-dependent function type,+   written with ->, e.g. ty1 -> ty2+   represented as FunTy ty1 ty2. These are+   lifted to Coercions with the corresponding FunCo.++ * A dependent compile-time-only polytype,+   written with forall, e.g.  forall (a:*). ty+   represented as ForAllTy (Bndr a v) ty++Both Pi-types classify terms/types that take an argument. In other+words, if `x` is either a function or a polytype, `x arg` makes sense+(for an appropriate `arg`).+++Note [VarBndrs, TyCoVarBinders, TyConBinders, and visibility]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+* A ForAllTy (used for both types and kinds) contains a TyCoVarBinder.+  Each TyCoVarBinder+      Bndr a tvis+  is equipped with tvis::ArgFlag, which says whether or not arguments+  for this binder should be visible (explicit) in source Haskell.++* A TyCon contains a list of TyConBinders.  Each TyConBinder+      Bndr a cvis+  is equipped with cvis::TyConBndrVis, which says whether or not type+  and kind arguments for this TyCon should be visible (explicit) in+  source Haskell.++This table summarises the visibility rules:+---------------------------------------------------------------------------------------+|                                                      Occurrences look like this+|                             GHC displays type as     in Haskell source code+|--------------------------------------------------------------------------------------+| Bndr a tvis :: TyCoVarBinder, in the binder of ForAllTy for a term+|  tvis :: ArgFlag+|  tvis = Inferred:            f :: forall {a}. type    Arg not allowed:  f+                               f :: forall {co}. type   Arg not allowed:  f+|  tvis = Specified:           f :: forall a. type      Arg optional:     f  or  f @Int+|  tvis = Required:            T :: forall k -> type    Arg required:     T *+|    This last form is illegal in terms: See Note [No Required TyCoBinder in terms]+|+| Bndr k cvis :: TyConBinder, in the TyConBinders of a TyCon+|  cvis :: TyConBndrVis+|  cvis = AnonTCB:             T :: kind -> kind        Required:            T *+|  cvis = NamedTCB Inferred:   T :: forall {k}. kind    Arg not allowed:     T+|                              T :: forall {co}. kind   Arg not allowed:     T+|  cvis = NamedTCB Specified:  T :: forall k. kind      Arg not allowed[1]:  T+|  cvis = NamedTCB Required:   T :: forall k -> kind    Required:            T *+---------------------------------------------------------------------------------------++[1] In types, in the Specified case, it would make sense to allow+    optional kind applications, thus (T @*), but we have not+    yet implemented that++---- In term declarations ----++* Inferred.  Function defn, with no signature:  f1 x = x+  We infer f1 :: forall {a}. a -> a, with 'a' Inferred+  It's Inferred because it doesn't appear in any+  user-written signature for f1++* Specified.  Function defn, with signature (implicit forall):+     f2 :: a -> a; f2 x = x+  So f2 gets the type f2 :: forall a. a -> a, with 'a' Specified+  even though 'a' is not bound in the source code by an explicit forall++* Specified.  Function defn, with signature (explicit forall):+     f3 :: forall a. a -> a; f3 x = x+  So f3 gets the type f3 :: forall a. a -> a, with 'a' Specified++* Inferred/Specified.  Function signature with inferred kind polymorphism.+     f4 :: a b -> Int+  So 'f4' gets the type f4 :: forall {k} (a:k->*) (b:k). a b -> Int+  Here 'k' is Inferred (it's not mentioned in the type),+  but 'a' and 'b' are Specified.++* Specified.  Function signature with explicit kind polymorphism+     f5 :: a (b :: k) -> Int+  This time 'k' is Specified, because it is mentioned explicitly,+  so we get f5 :: forall (k:*) (a:k->*) (b:k). a b -> Int++* Similarly pattern synonyms:+  Inferred - from inferred types (e.g. no pattern type signature)+           - or from inferred kind polymorphism++---- In type declarations ----++* Inferred (k)+     data T1 a b = MkT1 (a b)+  Here T1's kind is  T1 :: forall {k:*}. (k->*) -> k -> *+  The kind variable 'k' is Inferred, since it is not mentioned++  Note that 'a' and 'b' correspond to /Anon/ TyCoBinders in T1's kind,+  and Anon binders don't have a visibility flag. (Or you could think+  of Anon having an implicit Required flag.)++* Specified (k)+     data T2 (a::k->*) b = MkT (a b)+  Here T's kind is  T :: forall (k:*). (k->*) -> k -> *+  The kind variable 'k' is Specified, since it is mentioned in+  the signature.++* Required (k)+     data T k (a::k->*) b = MkT (a b)+  Here T's kind is  T :: forall k:* -> (k->*) -> k -> *+  The kind is Required, since it bound in a positional way in T's declaration+  Every use of T must be explicitly applied to a kind++* Inferred (k1), Specified (k)+     data T a b (c :: k) = MkT (a b) (Proxy c)+  Here T's kind is  T :: forall {k1:*} (k:*). (k1->*) -> k1 -> k -> *+  So 'k' is Specified, because it appears explicitly,+  but 'k1' is Inferred, because it does not++Generally, in the list of TyConBinders for a TyCon,++* Inferred arguments always come first+* Specified, Anon and Required can be mixed++e.g.+  data Foo (a :: Type) :: forall b. (a -> b -> Type) -> Type where ...++Here Foo's TyConBinders are+   [Required 'a', Specified 'b', Anon]+and its kind prints as+   Foo :: forall a -> forall b. (a -> b -> Type) -> Type++See also Note [Required, Specified, and Inferred for types] in TcTyClsDecls++---- Printing -----++ We print forall types with enough syntax to tell you their visibility+ flag.  But this is not source Haskell, and these types may not all+ be parsable.++ Specified: a list of Specified binders is written between `forall` and `.`:+               const :: forall a b. a -> b -> a++ Inferred:  with -fprint-explicit-foralls, Inferred binders are written+            in braces:+               f :: forall {k} (a:k). S k a -> Int+            Otherwise, they are printed like Specified binders.++ Required: binders are put between `forall` and `->`:+              T :: forall k -> *++---- Other points -----++* In classic Haskell, all named binders (that is, the type variables in+  a polymorphic function type f :: forall a. a -> a) have been Inferred.++* Inferred variables correspond to "generalized" variables from the+  Visible Type Applications paper (ESOP'16).++Note [No Required TyCoBinder in terms]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We don't allow Required foralls for term variables, including pattern+synonyms and data constructors.  Why?  Because then an application+would need a /compulsory/ type argument (possibly without an "@"?),+thus (f Int); and we don't have concrete syntax for that.++We could change this decision, but Required, Named TyCoBinders are rare+anyway.  (Most are Anons.)++However the type of a term can (just about) have a required quantifier;+see Note [Required quantifiers in the type of a term] in TcExpr.+-}+++{- **********************************************************************+*                                                                       *+                        PredType+*                                                                       *+********************************************************************** -}+++-- | A type of the form @p@ of constraint kind represents a value whose type is+-- the Haskell predicate @p@, where a predicate is what occurs before+-- the @=>@ in a Haskell type.+--+-- We use 'PredType' as documentation to mark those types that we guarantee to+-- have this kind.+--+-- It can be expanded into its representation, but:+--+-- * The type checker must treat it as opaque+--+-- * The rest of the compiler treats it as transparent+--+-- Consider these examples:+--+-- > f :: (Eq a) => a -> Int+-- > g :: (?x :: Int -> Int) => a -> Int+-- > h :: (r\l) => {r} => {l::Int | r}+--+-- Here the @Eq a@ and @?x :: Int -> Int@ and @r\l@ are all called \"predicates\"+type PredType = Type++-- | A collection of 'PredType's+type ThetaType = [PredType]++{-+(We don't support TREX records yet, but the setup is designed+to expand to allow them.)++A Haskell qualified type, such as that for f,g,h above, is+represented using+        * a FunTy for the double arrow+        * with a type of kind Constraint as the function argument++The predicate really does turn into a real extra argument to the+function.  If the argument has type (p :: Constraint) then the predicate p is+represented by evidence of type p.+++%************************************************************************+%*                                                                      *+            Simple constructors+%*                                                                      *+%************************************************************************++These functions are here so that they can be used by TysPrim,+which in turn is imported by Type+-}++mkTyVarTy  :: TyVar   -> Type+mkTyVarTy v = ASSERT2( isTyVar v, ppr v <+> dcolon <+> ppr (tyVarKind v) )+              TyVarTy v++mkTyVarTys :: [TyVar] -> [Type]+mkTyVarTys = map mkTyVarTy -- a common use of mkTyVarTy++mkTyCoVarTy :: TyCoVar -> Type+mkTyCoVarTy v+  | isTyVar v+  = TyVarTy v+  | otherwise+  = CoercionTy (CoVarCo v)++mkTyCoVarTys :: [TyCoVar] -> [Type]+mkTyCoVarTys = map mkTyCoVarTy++infixr 3 `mkFunTy`, `mkVisFunTy`, `mkInvisFunTy`      -- Associates to the right++mkFunTy :: AnonArgFlag -> Type -> Type -> Type+mkFunTy af arg res = FunTy { ft_af = af, ft_arg = arg, ft_res = res }++mkVisFunTy, mkInvisFunTy :: Type -> Type -> Type+mkVisFunTy   = mkFunTy VisArg+mkInvisFunTy = mkFunTy InvisArg++-- | Make nested arrow types+mkVisFunTys, mkInvisFunTys :: [Type] -> Type -> Type+mkVisFunTys   tys ty = foldr mkVisFunTy   ty tys+mkInvisFunTys tys ty = foldr mkInvisFunTy ty tys++-- | Like 'mkTyCoForAllTy', but does not check the occurrence of the binder+-- See Note [Unused coercion variable in ForAllTy]+mkForAllTy :: TyCoVar -> ArgFlag -> Type -> Type+mkForAllTy tv vis ty = ForAllTy (Bndr tv vis) ty++-- | Wraps foralls over the type using the provided 'TyCoVar's from left to right+mkForAllTys :: [TyCoVarBinder] -> Type -> Type+mkForAllTys tyvars ty = foldr ForAllTy ty tyvars++mkPiTy:: TyCoBinder -> Type -> Type+mkPiTy (Anon af ty1) ty2        = FunTy { ft_af = af, ft_arg = ty1, ft_res = ty2 }+mkPiTy (Named (Bndr tv vis)) ty = mkForAllTy tv vis ty++mkPiTys :: [TyCoBinder] -> Type -> Type+mkPiTys tbs ty = foldr mkPiTy ty tbs++-- | Create the plain type constructor type which has been applied to no type arguments at all.+mkTyConTy :: TyCon -> Type+mkTyConTy tycon = TyConApp tycon []++{-+%************************************************************************+%*                                                                      *+            Coercions+%*                                                                      *+%************************************************************************+-}++-- | A 'Coercion' is concrete evidence of the equality/convertibility+-- of two types.++-- If you edit this type, you may need to update the GHC formalism+-- See Note [GHC Formalism] in coreSyn/CoreLint.hs+data Coercion+  -- Each constructor has a "role signature", indicating the way roles are+  -- propagated through coercions.+  --    -  P, N, and R stand for coercions of the given role+  --    -  e stands for a coercion of a specific unknown role+  --           (think "role polymorphism")+  --    -  "e" stands for an explicit role parameter indicating role e.+  --    -   _ stands for a parameter that is not a Role or Coercion.++  -- These ones mirror the shape of types+  = -- Refl :: _ -> N+    Refl Type  -- See Note [Refl invariant]+          -- Invariant: applications of (Refl T) to a bunch of identity coercions+          --            always show up as Refl.+          -- For example  (Refl T) (Refl a) (Refl b) shows up as (Refl (T a b)).++          -- Applications of (Refl T) to some coercions, at least one of+          -- which is NOT the identity, show up as TyConAppCo.+          -- (They may not be fully saturated however.)+          -- ConAppCo coercions (like all coercions other than Refl)+          -- are NEVER the identity.++          -- Use (GRefl Representational ty MRefl), not (SubCo (Refl ty))++  -- GRefl :: "e" -> _ -> Maybe N -> e+  -- See Note [Generalized reflexive coercion]+  | GRefl Role Type MCoercionN  -- See Note [Refl invariant]+          -- Use (Refl ty), not (GRefl Nominal ty MRefl)+          -- Use (GRefl Representational _ _), not (SubCo (GRefl Nominal _ _))++  -- These ones simply lift the correspondingly-named+  -- Type constructors into Coercions++  -- TyConAppCo :: "e" -> _ -> ?? -> e+  -- See Note [TyConAppCo roles]+  | TyConAppCo Role TyCon [Coercion]    -- lift TyConApp+               -- The TyCon is never a synonym;+               -- we expand synonyms eagerly+               -- But it can be a type function++  | AppCo Coercion CoercionN             -- lift AppTy+          -- AppCo :: e -> N -> e++  -- See Note [Forall coercions]+  | ForAllCo TyCoVar KindCoercion Coercion+         -- ForAllCo :: _ -> N -> e -> e++  | FunCo Role Coercion Coercion         -- lift FunTy+         -- FunCo :: "e" -> e -> e -> e+         -- Note: why doesn't FunCo have a AnonArgFlag, like FunTy?+         -- Because the AnonArgFlag has no impact on Core; it is only+         -- there to guide implicit instantiation of Haskell source+         -- types, and that is irrelevant for coercions, which are+         -- Core-only.++  -- These are special+  | CoVarCo CoVar      -- :: _ -> (N or R)+                       -- result role depends on the tycon of the variable's type++    -- AxiomInstCo :: e -> _ -> ?? -> e+  | AxiomInstCo (CoAxiom Branched) BranchIndex [Coercion]+     -- See also [CoAxiom index]+     -- The coercion arguments always *precisely* saturate+     -- arity of (that branch of) the CoAxiom. If there are+     -- any left over, we use AppCo.+     -- See [Coercion axioms applied to coercions]+     -- The roles of the argument coercions are determined+     -- by the cab_roles field of the relevant branch of the CoAxiom++  | AxiomRuleCo CoAxiomRule [Coercion]+    -- AxiomRuleCo is very like AxiomInstCo, but for a CoAxiomRule+    -- The number coercions should match exactly the expectations+    -- of the CoAxiomRule (i.e., the rule is fully saturated).++  | UnivCo UnivCoProvenance Role Type Type+      -- :: _ -> "e" -> _ -> _ -> e++  | SymCo Coercion             -- :: e -> e+  | TransCo Coercion Coercion  -- :: e -> e -> e++  | NthCo  Role Int Coercion     -- Zero-indexed; decomposes (T t0 ... tn)+    -- :: "e" -> _ -> e0 -> e (inverse of TyConAppCo, see Note [TyConAppCo roles])+    -- Using NthCo on a ForAllCo gives an N coercion always+    -- See Note [NthCo and newtypes]+    --+    -- Invariant:  (NthCo r i co), it is always the case that r = role of (Nth i co)+    -- That is: the role of the entire coercion is redundantly cached here.+    -- See Note [NthCo Cached Roles]++  | LRCo   LeftOrRight CoercionN     -- Decomposes (t_left t_right)+    -- :: _ -> N -> N+  | InstCo Coercion CoercionN+    -- :: e -> N -> e+    -- See Note [InstCo roles]++  -- Extract a kind coercion from a (heterogeneous) type coercion+  -- NB: all kind coercions are Nominal+  | KindCo Coercion+     -- :: e -> N++  | SubCo CoercionN                  -- Turns a ~N into a ~R+    -- :: N -> R++  | HoleCo CoercionHole              -- ^ See Note [Coercion holes]+                                     -- Only present during typechecking+  deriving Data.Data++type CoercionN = Coercion       -- always nominal+type CoercionR = Coercion       -- always representational+type CoercionP = Coercion       -- always phantom+type KindCoercion = CoercionN   -- always nominal++instance Outputable Coercion where+  ppr = pprCo++-- | A semantically more meaningful type to represent what may or may not be a+-- useful 'Coercion'.+data MCoercion+  = MRefl+    -- A trivial Reflexivity coercion+  | MCo Coercion+    -- Other coercions+  deriving Data.Data+type MCoercionR = MCoercion+type MCoercionN = MCoercion++instance Outputable MCoercion where+  ppr MRefl    = text "MRefl"+  ppr (MCo co) = text "MCo" <+> ppr co++{-+Note [Refl invariant]+~~~~~~~~~~~~~~~~~~~~~+Invariant 1:++Coercions have the following invariant+     Refl (similar for GRefl r ty MRefl) is always lifted as far as possible.++You might think that a consequencs is:+     Every identity coercions has Refl at the root++But that's not quite true because of coercion variables.  Consider+     g         where g :: Int~Int+     Left h    where h :: Maybe Int ~ Maybe Int+etc.  So the consequence is only true of coercions that+have no coercion variables.++Note [Generalized reflexive coercion]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++GRefl is a generalized reflexive coercion (see #15192). It wraps a kind+coercion, which might be reflexive (MRefl) or any coercion (MCo co). The typing+rules for GRefl:++  ty : k1+  ------------------------------------+  GRefl r ty MRefl: ty ~r ty++  ty : k1       co :: k1 ~ k2+  ------------------------------------+  GRefl r ty (MCo co) : ty ~r ty |> co++Consider we have++   g1 :: s ~r t+   s  :: k1+   g2 :: k1 ~ k2++and we want to construct a coercions co which has type++   (s |> g2) ~r t++We can define++   co = Sym (GRefl r s g2) ; g1++It is easy to see that++   Refl == GRefl Nominal ty MRefl :: ty ~n ty++A nominal reflexive coercion is quite common, so we keep the special form Refl to+save allocation.++Note [Coercion axioms applied to coercions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The reason coercion axioms can be applied to coercions and not just+types is to allow for better optimization.  There are some cases where+we need to be able to "push transitivity inside" an axiom in order to+expose further opportunities for optimization.++For example, suppose we have++  C a : t[a] ~ F a+  g   : b ~ c++and we want to optimize++  sym (C b) ; t[g] ; C c++which has the kind++  F b ~ F c++(stopping through t[b] and t[c] along the way).++We'd like to optimize this to just F g -- but how?  The key is+that we need to allow axioms to be instantiated by *coercions*,+not just by types.  Then we can (in certain cases) push+transitivity inside the axiom instantiations, and then react+opposite-polarity instantiations of the same axiom.  In this+case, e.g., we match t[g] against the LHS of (C c)'s kind, to+obtain the substitution  a |-> g  (note this operation is sort+of the dual of lifting!) and hence end up with++  C g : t[b] ~ F c++which indeed has the same kind as  t[g] ; C c.++Now we have++  sym (C b) ; C g++which can be optimized to F g.++Note [CoAxiom index]+~~~~~~~~~~~~~~~~~~~~+A CoAxiom has 1 or more branches. Each branch has contains a list+of the free type variables in that branch, the LHS type patterns,+and the RHS type for that branch. When we apply an axiom to a list+of coercions, we must choose which branch of the axiom we wish to+use, as the different branches may have different numbers of free+type variables. (The number of type patterns is always the same+among branches, but that doesn't quite concern us here.)++The Int in the AxiomInstCo constructor is the 0-indexed number+of the chosen branch.++Note [Forall coercions]+~~~~~~~~~~~~~~~~~~~~~~~+Constructing coercions between forall-types can be a bit tricky,+because the kinds of the bound tyvars can be different.++The typing rule is:+++  kind_co : k1 ~ k2+  tv1:k1 |- co : t1 ~ t2+  -------------------------------------------------------------------+  ForAllCo tv1 kind_co co : all tv1:k1. t1  ~+                            all tv1:k2. (t2[tv1 |-> tv1 |> sym kind_co])++First, the TyCoVar stored in a ForAllCo is really an optimisation: this field+should be a Name, as its kind is redundant. Thinking of the field as a Name+is helpful in understanding what a ForAllCo means.+The kind of TyCoVar always matches the left-hand kind of the coercion.++The idea is that kind_co gives the two kinds of the tyvar. See how, in the+conclusion, tv1 is assigned kind k1 on the left but kind k2 on the right.++Of course, a type variable can't have different kinds at the same time. So,+we arbitrarily prefer the first kind when using tv1 in the inner coercion+co, which shows that t1 equals t2.++The last wrinkle is that we need to fix the kinds in the conclusion. In+t2, tv1 is assumed to have kind k1, but it has kind k2 in the conclusion of+the rule. So we do a kind-fixing substitution, replacing (tv1:k1) with+(tv1:k2) |> sym kind_co. This substitution is slightly bizarre, because it+mentions the same name with different kinds, but it *is* well-kinded, noting+that `(tv1:k2) |> sym kind_co` has kind k1.++This all really would work storing just a Name in the ForAllCo. But we can't+add Names to, e.g., VarSets, and there generally is just an impedance mismatch+in a bunch of places. So we use tv1. When we need tv2, we can use+setTyVarKind.++Note [Predicate coercions]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+   g :: a~b+How can we coerce between types+   ([c]~a) => [a] -> c+and+   ([c]~b) => [b] -> c+where the equality predicate *itself* differs?++Answer: we simply treat (~) as an ordinary type constructor, so these+types really look like++   ((~) [c] a) -> [a] -> c+   ((~) [c] b) -> [b] -> c++So the coercion between the two is obviously++   ((~) [c] g) -> [g] -> c++Another way to see this to say that we simply collapse predicates to+their representation type (see Type.coreView and Type.predTypeRep).++This collapse is done by mkPredCo; there is no PredCo constructor+in Coercion.  This is important because we need Nth to work on+predicates too:+    Nth 1 ((~) [c] g) = g+See Simplify.simplCoercionF, which generates such selections.++Note [Roles]+~~~~~~~~~~~~+Roles are a solution to the GeneralizedNewtypeDeriving problem, articulated+in #1496. The full story is in docs/core-spec/core-spec.pdf. Also, see+https://gitlab.haskell.org/ghc/ghc/wikis/roles-implementation++Here is one way to phrase the problem:++Given:+newtype Age = MkAge Int+type family F x+type instance F Age = Bool+type instance F Int = Char++This compiles down to:+axAge :: Age ~ Int+axF1 :: F Age ~ Bool+axF2 :: F Int ~ Char++Then, we can make:+(sym (axF1) ; F axAge ; axF2) :: Bool ~ Char++Yikes!++The solution is _roles_, as articulated in "Generative Type Abstraction and+Type-level Computation" (POPL 2010), available at+http://www.seas.upenn.edu/~sweirich/papers/popl163af-weirich.pdf++The specification for roles has evolved somewhat since that paper. For the+current full details, see the documentation in docs/core-spec. Here are some+highlights.++We label every equality with a notion of type equivalence, of which there are+three options: Nominal, Representational, and Phantom. A ground type is+nominally equivalent only with itself. A newtype (which is considered a ground+type in Haskell) is representationally equivalent to its representation.+Anything is "phantomly" equivalent to anything else. We use "N", "R", and "P"+to denote the equivalences.++The axioms above would be:+axAge :: Age ~R Int+axF1 :: F Age ~N Bool+axF2 :: F Age ~N Char++Then, because transitivity applies only to coercions proving the same notion+of equivalence, the above construction is impossible.++However, there is still an escape hatch: we know that any two types that are+nominally equivalent are representationally equivalent as well. This is what+the form SubCo proves -- it "demotes" a nominal equivalence into a+representational equivalence. So, it would seem the following is possible:++sub (sym axF1) ; F axAge ; sub axF2 :: Bool ~R Char   -- WRONG++What saves us here is that the arguments to a type function F, lifted into a+coercion, *must* prove nominal equivalence. So, (F axAge) is ill-formed, and+we are safe.++Roles are attached to parameters to TyCons. When lifting a TyCon into a+coercion (through TyConAppCo), we need to ensure that the arguments to the+TyCon respect their roles. For example:++data T a b = MkT a (F b)++If we know that a1 ~R a2, then we know (T a1 b) ~R (T a2 b). But, if we know+that b1 ~R b2, we know nothing about (T a b1) and (T a b2)! This is because+the type function F branches on b's *name*, not representation. So, we say+that 'a' has role Representational and 'b' has role Nominal. The third role,+Phantom, is for parameters not used in the type's definition. Given the+following definition++data Q a = MkQ Int++the Phantom role allows us to say that (Q Bool) ~R (Q Char), because we+can construct the coercion Bool ~P Char (using UnivCo).++See the paper cited above for more examples and information.++Note [TyConAppCo roles]+~~~~~~~~~~~~~~~~~~~~~~~+The TyConAppCo constructor has a role parameter, indicating the role at+which the coercion proves equality. The choice of this parameter affects+the required roles of the arguments of the TyConAppCo. To help explain+it, assume the following definition:++  type instance F Int = Bool   -- Axiom axF : F Int ~N Bool+  newtype Age = MkAge Int      -- Axiom axAge : Age ~R Int+  data Foo a = MkFoo a         -- Role on Foo's parameter is Representational++TyConAppCo Nominal Foo axF : Foo (F Int) ~N Foo Bool+  For (TyConAppCo Nominal) all arguments must have role Nominal. Why?+  So that Foo Age ~N Foo Int does *not* hold.++TyConAppCo Representational Foo (SubCo axF) : Foo (F Int) ~R Foo Bool+TyConAppCo Representational Foo axAge       : Foo Age     ~R Foo Int+  For (TyConAppCo Representational), all arguments must have the roles+  corresponding to the result of tyConRoles on the TyCon. This is the+  whole point of having roles on the TyCon to begin with. So, we can+  have Foo Age ~R Foo Int, if Foo's parameter has role R.++  If a Representational TyConAppCo is over-saturated (which is otherwise fine),+  the spill-over arguments must all be at Nominal. This corresponds to the+  behavior for AppCo.++TyConAppCo Phantom Foo (UnivCo Phantom Int Bool) : Foo Int ~P Foo Bool+  All arguments must have role Phantom. This one isn't strictly+  necessary for soundness, but this choice removes ambiguity.++The rules here dictate the roles of the parameters to mkTyConAppCo+(should be checked by Lint).++Note [NthCo and newtypes]+~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have++  newtype N a = MkN Int+  type role N representational++This yields axiom++  NTCo:N :: forall a. N a ~R Int++We can then build++  co :: forall a b. N a ~R N b+  co = NTCo:N a ; sym (NTCo:N b)++for any `a` and `b`. Because of the role annotation on N, if we use+NthCo, we'll get out a representational coercion. That is:++  NthCo r 0 co :: forall a b. a ~R b++Yikes! Clearly, this is terrible. The solution is simple: forbid+NthCo to be used on newtypes if the internal coercion is representational.++This is not just some corner case discovered by a segfault somewhere;+it was discovered in the proof of soundness of roles and described+in the "Safe Coercions" paper (ICFP '14).++Note [NthCo Cached Roles]+~~~~~~~~~~~~~~~~~~~~~~~~~+Why do we cache the role of NthCo in the NthCo constructor?+Because computing role(Nth i co) involves figuring out that++  co :: T tys1 ~ T tys2++using coercionKind, and finding (coercionRole co), and then looking+at the tyConRoles of T. Avoiding bad asymptotic behaviour here means+we have to compute the kind and role of a coercion simultaneously,+which makes the code complicated and inefficient.++This only happens for NthCo. Caching the role solves the problem, and+allows coercionKind and coercionRole to be simple.++See #11735++Note [InstCo roles]+~~~~~~~~~~~~~~~~~~~+Here is (essentially) the typing rule for InstCo:++g :: (forall a. t1) ~r (forall a. t2)+w :: s1 ~N s2+------------------------------- InstCo+InstCo g w :: (t1 [a |-> s1]) ~r (t2 [a |-> s2])++Note that the Coercion w *must* be nominal. This is necessary+because the variable a might be used in a "nominal position"+(that is, a place where role inference would require a nominal+role) in t1 or t2. If we allowed w to be representational, we+could get bogus equalities.++A more nuanced treatment might be able to relax this condition+somewhat, by checking if t1 and/or t2 use their bound variables+in nominal ways. If not, having w be representational is OK.+++%************************************************************************+%*                                                                      *+                UnivCoProvenance+%*                                                                      *+%************************************************************************++A UnivCo is a coercion whose proof does not directly express its role+and kind (indeed for some UnivCos, like UnsafeCoerceProv, there /is/+no proof).++The different kinds of UnivCo are described by UnivCoProvenance.  Really+each is entirely separate, but they all share the need to represent their+role and kind, which is done in the UnivCo constructor.++-}++-- | For simplicity, we have just one UnivCo that represents a coercion from+-- some type to some other type, with (in general) no restrictions on the+-- type. The UnivCoProvenance specifies more exactly what the coercion really+-- is and why a program should (or shouldn't!) trust the coercion.+-- It is reasonable to consider each constructor of 'UnivCoProvenance'+-- as a totally independent coercion form; their only commonality is+-- that they don't tell you what types they coercion between. (That info+-- is in the 'UnivCo' constructor of 'Coercion'.+data UnivCoProvenance+  = UnsafeCoerceProv   -- ^ From @unsafeCoerce#@. These are unsound.++  | PhantomProv KindCoercion -- ^ See Note [Phantom coercions]. Only in Phantom+                             -- roled coercions++  | ProofIrrelProv KindCoercion  -- ^ From the fact that any two coercions are+                                 --   considered equivalent. See Note [ProofIrrelProv].+                                 -- Can be used in Nominal or Representational coercions++  | PluginProv String  -- ^ From a plugin, which asserts that this coercion+                       --   is sound. The string is for the use of the plugin.++  deriving Data.Data++instance Outputable UnivCoProvenance where+  ppr UnsafeCoerceProv   = text "(unsafeCoerce#)"+  ppr (PhantomProv _)    = text "(phantom)"+  ppr (ProofIrrelProv _) = text "(proof irrel.)"+  ppr (PluginProv str)   = parens (text "plugin" <+> brackets (text str))++-- | A coercion to be filled in by the type-checker. See Note [Coercion holes]+data CoercionHole+  = CoercionHole { ch_co_var :: CoVar+                       -- See Note [CoercionHoles and coercion free variables]++                 , ch_ref    :: IORef (Maybe Coercion)+                 }++coHoleCoVar :: CoercionHole -> CoVar+coHoleCoVar = ch_co_var++setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole+setCoHoleCoVar h cv = h { ch_co_var = cv }++instance Data.Data CoercionHole where+  -- don't traverse?+  toConstr _   = abstractConstr "CoercionHole"+  gunfold _ _  = error "gunfold"+  dataTypeOf _ = mkNoRepType "CoercionHole"++instance Outputable CoercionHole where+  ppr (CoercionHole { ch_co_var = cv }) = braces (ppr cv)+++{- Note [Phantom coercions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+     data T a = T1 | T2+Then we have+     T s ~R T t+for any old s,t. The witness for this is (TyConAppCo T Rep co),+where (co :: s ~P t) is a phantom coercion built with PhantomProv.+The role of the UnivCo is always Phantom.  The Coercion stored is the+(nominal) kind coercion between the types+   kind(s) ~N kind (t)++Note [Coercion holes]+~~~~~~~~~~~~~~~~~~~~~~~~+During typechecking, constraint solving for type classes works by+  - Generate an evidence Id,  d7 :: Num a+  - Wrap it in a Wanted constraint, [W] d7 :: Num a+  - Use the evidence Id where the evidence is needed+  - Solve the constraint later+  - When solved, add an enclosing let-binding  let d7 = .... in ....+    which actually binds d7 to the (Num a) evidence++For equality constraints we use a different strategy.  See Note [The+equality types story] in TysPrim for background on equality constraints.+  - For /boxed/ equality constraints, (t1 ~N t2) and (t1 ~R t2), it's just+    like type classes above. (Indeed, boxed equality constraints *are* classes.)+  - But for /unboxed/ equality constraints (t1 ~R# t2) and (t1 ~N# t2)+    we use a different plan++For unboxed equalities:+  - Generate a CoercionHole, a mutable variable just like a unification+    variable+  - Wrap the CoercionHole in a Wanted constraint; see TcRnTypes.TcEvDest+  - Use the CoercionHole in a Coercion, via HoleCo+  - Solve the constraint later+  - When solved, fill in the CoercionHole by side effect, instead of+    doing the let-binding thing++The main reason for all this is that there may be no good place to let-bind+the evidence for unboxed equalities:++  - We emit constraints for kind coercions, to be used to cast a+    type's kind. These coercions then must be used in types. Because+    they might appear in a top-level type, there is no place to bind+    these (unlifted) coercions in the usual way.++  - A coercion for (forall a. t1) ~ (forall a. t2) will look like+       forall a. (coercion for t1~t2)+    But the coercion for (t1~t2) may mention 'a', and we don't have+    let-bindings within coercions.  We could add them, but coercion+    holes are easier.++  - Moreover, nothing is lost from the lack of let-bindings. For+    dicionaries want to achieve sharing to avoid recomoputing the+    dictionary.  But coercions are entirely erased, so there's little+    benefit to sharing. Indeed, even if we had a let-binding, we+    always inline types and coercions at every use site and drop the+    binding.++Other notes about HoleCo:++ * INVARIANT: CoercionHole and HoleCo are used only during type checking,+   and should never appear in Core. Just like unification variables; a Type+   can contain a TcTyVar, but only during type checking. If, one day, we+   use type-level information to separate out forms that can appear during+   type-checking vs forms that can appear in core proper, holes in Core will+   be ruled out.++ * See Note [CoercionHoles and coercion free variables]++ * Coercion holes can be compared for equality like other coercions:+   by looking at the types coerced.+++Note [CoercionHoles and coercion free variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Why does a CoercionHole contain a CoVar, as well as reference to+fill in?  Because we want to treat that CoVar as a free variable of+the coercion.  See #14584, and Note [What prevents a+constraint from floating] in TcSimplify, item (4):++        forall k. [W] co1 :: t1 ~# t2 |> co2+                  [W] co2 :: k ~# *++Here co2 is a CoercionHole. But we /must/ know that it is free in+co1, because that's all that stops it floating outside the+implication.+++Note [ProofIrrelProv]+~~~~~~~~~~~~~~~~~~~~~+A ProofIrrelProv is a coercion between coercions. For example:++  data G a where+    MkG :: G Bool++In core, we get++  G :: * -> *+  MkG :: forall (a :: *). (a ~ Bool) -> G a++Now, consider 'MkG -- that is, MkG used in a type -- and suppose we want+a proof that ('MkG a1 co1) ~ ('MkG a2 co2). This will have to be++  TyConAppCo Nominal MkG [co3, co4]+  where+    co3 :: co1 ~ co2+    co4 :: a1 ~ a2++Note that+  co1 :: a1 ~ Bool+  co2 :: a2 ~ Bool++Here,+  co3 = UnivCo (ProofIrrelProv co5) Nominal (CoercionTy co1) (CoercionTy co2)+  where+    co5 :: (a1 ~ Bool) ~ (a2 ~ Bool)+    co5 = TyConAppCo Nominal (~#) [<*>, <*>, co4, <Bool>]+-}+++{- *********************************************************************+*                                                                      *+                   typeSize, coercionSize+*                                                                      *+********************************************************************* -}++-- NB: We put typeSize/coercionSize here because they are mutually+--     recursive, and have the CPR property.  If we have mutual+--     recursion across a hi-boot file, we don't get the CPR property+--     and these functions allocate a tremendous amount of rubbish.+--     It's not critical (because typeSize is really only used in+--     debug mode, but I tripped over an example (T5642) in which+--     typeSize was one of the biggest single allocators in all of GHC.+--     And it's easy to fix, so I did.++-- NB: typeSize does not respect `eqType`, in that two types that+--     are `eqType` may return different sizes. This is OK, because this+--     function is used only in reporting, not decision-making.++typeSize :: Type -> Int+typeSize (LitTy {})                 = 1+typeSize (TyVarTy {})               = 1+typeSize (AppTy t1 t2)              = typeSize t1 + typeSize t2+typeSize (FunTy _ t1 t2)            = typeSize t1 + typeSize t2 typeSize (ForAllTy (Bndr tv _) t)   = typeSize (varType tv) + typeSize t typeSize (TyConApp _ ts)            = 1 + sum (map typeSize ts) typeSize (CastTy ty co)             = typeSize ty + coercionSize co
types/TyCoRep.hs-boot view
@@ -1,15 +1,12 @@ module TyCoRep where -import GhcPrelude--import Outputable ( SDoc ) import Data.Data  ( Data )+import {-# SOURCE #-} Var( Var, ArgFlag, AnonArgFlag )  data Type data TyThing data Coercion data UnivCoProvenance-data TCvSubst data TyLit data TyCoBinder data MCoercion@@ -20,10 +17,7 @@ type CoercionN = Coercion type MCoercionN = MCoercion -pprKind :: Kind -> SDoc-pprType :: Type -> SDoc--isRuntimeRepTy :: Type -> Bool+mkFunTy   :: AnonArgFlag -> Type -> Type -> Type+mkForAllTy :: Var -> ArgFlag -> Type -> Type -instance Data Type-  -- To support Data instances in CoAxiom+instance Data Type  -- To support Data instances in CoAxiom
+ types/TyCoSubst.hs view
@@ -0,0 +1,1029 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1998+Type and Coercion - friends' interface+-}++{-# LANGUAGE CPP #-}+{-# LANGUAGE BangPatterns #-}++-- | Substitution into types and coercions.+module TyCoSubst+  (+        -- * Substitutions+        TCvSubst(..), TvSubstEnv, CvSubstEnv,+        emptyTvSubstEnv, emptyCvSubstEnv, composeTCvSubstEnv, composeTCvSubst,+        emptyTCvSubst, mkEmptyTCvSubst, isEmptyTCvSubst,+        mkTCvSubst, mkTvSubst, mkCvSubst,+        getTvSubstEnv,+        getCvSubstEnv, getTCvInScope, getTCvSubstRangeFVs,+        isInScope, notElemTCvSubst,+        setTvSubstEnv, setCvSubstEnv, zapTCvSubst,+        extendTCvInScope, extendTCvInScopeList, extendTCvInScopeSet,+        extendTCvSubst, extendTCvSubstWithClone,+        extendCvSubst, extendCvSubstWithClone,+        extendTvSubst, extendTvSubstBinderAndInScope, extendTvSubstWithClone,+        extendTvSubstList, extendTvSubstAndInScope,+        extendTCvSubstList,+        unionTCvSubst, zipTyEnv, zipCoEnv, mkTyCoInScopeSet,+        zipTvSubst, zipCvSubst,+        zipTCvSubst,+        mkTvSubstPrs,++        substTyWith, substTyWithCoVars, substTysWith, substTysWithCoVars,+        substCoWith,+        substTy, substTyAddInScope,+        substTyUnchecked, substTysUnchecked, substThetaUnchecked,+        substTyWithUnchecked,+        substCoUnchecked, substCoWithUnchecked,+        substTyWithInScope,+        substTys, substTheta,+        lookupTyVar,+        substCo, substCos, substCoVar, substCoVars, lookupCoVar,+        cloneTyVarBndr, cloneTyVarBndrs,+        substVarBndr, substVarBndrs,+        substTyVarBndr, substTyVarBndrs,+        substCoVarBndr,+        substTyVar, substTyVars, substTyCoVars,+        substForAllCoBndr,+        substVarBndrUsing, substForAllCoBndrUsing,+        checkValidSubst, isValidTCvSubst,+  ) where++#include "HsVersions.h"++import GhcPrelude++import {-# SOURCE #-} Type ( mkCastTy, mkAppTy, isCoercionTy )+import {-# SOURCE #-} Coercion ( mkCoVarCo, mkKindCo, mkNthCo, mkTransCo+                               , mkNomReflCo, mkSubCo, mkSymCo+                               , mkFunCo, mkForAllCo, mkUnivCo+                               , mkAxiomInstCo, mkAppCo, mkGReflCo+                               , mkInstCo, mkLRCo, mkTyConAppCo+                               , mkCoercionType+                               , coercionKind, coVarKindsTypesRole )++import TyCoRep+import TyCoFVs+import TyCoPpr++import Var+import VarSet+import VarEnv++import Pair+import Util+import UniqSupply+import Unique+import UniqFM+import UniqSet+import Outputable++import Data.List (mapAccumL)++{-+%************************************************************************+%*                                                                      *+                        Substitutions+      Data type defined here to avoid unnecessary mutual recursion+%*                                                                      *+%************************************************************************+-}++-- | Type & coercion substitution+--+-- #tcvsubst_invariant#+-- The following invariants must hold of a 'TCvSubst':+--+-- 1. The in-scope set is needed /only/ to+-- guide the generation of fresh uniques+--+-- 2. In particular, the /kind/ of the type variables in+-- the in-scope set is not relevant+--+-- 3. The substitution is only applied ONCE! This is because+-- in general such application will not reach a fixed point.+data TCvSubst+  = TCvSubst InScopeSet -- The in-scope type and kind variables+             TvSubstEnv -- Substitutes both type and kind variables+             CvSubstEnv -- Substitutes coercion variables+        -- See Note [Substitutions apply only once]+        -- and Note [Extending the TvSubstEnv]+        -- and Note [Substituting types and coercions]+        -- and Note [The substitution invariant]++-- | A substitution of 'Type's for 'TyVar's+--                 and 'Kind's for 'KindVar's+type TvSubstEnv = TyVarEnv Type+  -- NB: A TvSubstEnv is used+  --   both inside a TCvSubst (with the apply-once invariant+  --        discussed in Note [Substitutions apply only once],+  --   and  also independently in the middle of matching,+  --        and unification (see Types.Unify).+  -- So you have to look at the context to know if it's idempotent or+  -- apply-once or whatever++-- | A substitution of 'Coercion's for 'CoVar's+type CvSubstEnv = CoVarEnv Coercion++{- Note [The substitution invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When calling (substTy subst ty) it should be the case that+the in-scope set in the substitution is a superset of both:++  (SIa) The free vars of the range of the substitution+  (SIb) The free vars of ty minus the domain of the substitution++The same rules apply to other substitutions (notably CoreSubst.Subst)++* Reason for (SIa). Consider+      substTy [a :-> Maybe b] (forall b. b->a)+  we must rename the forall b, to get+      forall b2. b2 -> Maybe b+  Making 'b' part of the in-scope set forces this renaming to+  take place.++* Reason for (SIb). Consider+     substTy [a :-> Maybe b] (forall b. (a,b,x))+  Then if we use the in-scope set {b}, satisfying (SIa), there is+  a danger we will rename the forall'd variable to 'x' by mistake,+  getting this:+      forall x. (Maybe b, x, x)+  Breaking (SIb) caused the bug from #11371.++Note: if the free vars of the range of the substitution are freshly created,+then the problems of (SIa) can't happen, and so it would be sound to+ignore (SIa).++Note [Substitutions apply only once]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We use TCvSubsts to instantiate things, and we might instantiate+        forall a b. ty+with the types+        [a, b], or [b, a].+So the substitution might go [a->b, b->a].  A similar situation arises in Core+when we find a beta redex like+        (/\ a /\ b -> e) b a+Then we also end up with a substitution that permutes type variables. Other+variations happen to; for example [a -> (a, b)].++        ********************************************************+        *** So a substitution must be applied precisely once ***+        ********************************************************++A TCvSubst is not idempotent, but, unlike the non-idempotent substitution+we use during unifications, it must not be repeatedly applied.++Note [Extending the TvSubstEnv]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See #tcvsubst_invariant# for the invariants that must hold.++This invariant allows a short-cut when the subst envs are empty:+if the TvSubstEnv and CvSubstEnv are empty --- i.e. (isEmptyTCvSubst subst)+holds --- then (substTy subst ty) does nothing.++For example, consider:+        (/\a. /\b:(a~Int). ...b..) Int+We substitute Int for 'a'.  The Unique of 'b' does not change, but+nevertheless we add 'b' to the TvSubstEnv, because b's kind does change++This invariant has several crucial consequences:++* In substVarBndr, we need extend the TvSubstEnv+        - if the unique has changed+        - or if the kind has changed++* In substTyVar, we do not need to consult the in-scope set;+  the TvSubstEnv is enough++* In substTy, substTheta, we can short-circuit when the TvSubstEnv is empty++Note [Substituting types and coercions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Types and coercions are mutually recursive, and either may have variables+"belonging" to the other. Thus, every time we wish to substitute in a+type, we may also need to substitute in a coercion, and vice versa.+However, the constructor used to create type variables is distinct from+that of coercion variables, so we carry two VarEnvs in a TCvSubst. Note+that it would be possible to use the CoercionTy constructor to combine+these environments, but that seems like a false economy.++Note that the TvSubstEnv should *never* map a CoVar (built with the Id+constructor) and the CvSubstEnv should *never* map a TyVar. Furthermore,+the range of the TvSubstEnv should *never* include a type headed with+CoercionTy.+-}++emptyTvSubstEnv :: TvSubstEnv+emptyTvSubstEnv = emptyVarEnv++emptyCvSubstEnv :: CvSubstEnv+emptyCvSubstEnv = emptyVarEnv++composeTCvSubstEnv :: InScopeSet+                   -> (TvSubstEnv, CvSubstEnv)+                   -> (TvSubstEnv, CvSubstEnv)+                   -> (TvSubstEnv, CvSubstEnv)+-- ^ @(compose env1 env2)(x)@ is @env1(env2(x))@; i.e. apply @env2@ then @env1@.+-- It assumes that both are idempotent.+-- Typically, @env1@ is the refinement to a base substitution @env2@+composeTCvSubstEnv in_scope (tenv1, cenv1) (tenv2, cenv2)+  = ( tenv1 `plusVarEnv` mapVarEnv (substTy subst1) tenv2+    , cenv1 `plusVarEnv` mapVarEnv (substCo subst1) cenv2 )+        -- First apply env1 to the range of env2+        -- Then combine the two, making sure that env1 loses if+        -- both bind the same variable; that's why env1 is the+        --  *left* argument to plusVarEnv, because the right arg wins+  where+    subst1 = TCvSubst in_scope tenv1 cenv1++-- | Composes two substitutions, applying the second one provided first,+-- like in function composition.+composeTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst+composeTCvSubst (TCvSubst is1 tenv1 cenv1) (TCvSubst is2 tenv2 cenv2)+  = TCvSubst is3 tenv3 cenv3+  where+    is3 = is1 `unionInScope` is2+    (tenv3, cenv3) = composeTCvSubstEnv is3 (tenv1, cenv1) (tenv2, cenv2)++emptyTCvSubst :: TCvSubst+emptyTCvSubst = TCvSubst emptyInScopeSet emptyTvSubstEnv emptyCvSubstEnv++mkEmptyTCvSubst :: InScopeSet -> TCvSubst+mkEmptyTCvSubst is = TCvSubst is emptyTvSubstEnv emptyCvSubstEnv++isEmptyTCvSubst :: TCvSubst -> Bool+         -- See Note [Extending the TvSubstEnv]+isEmptyTCvSubst (TCvSubst _ tenv cenv) = isEmptyVarEnv tenv && isEmptyVarEnv cenv++mkTCvSubst :: InScopeSet -> (TvSubstEnv, CvSubstEnv) -> TCvSubst+mkTCvSubst in_scope (tenv, cenv) = TCvSubst in_scope tenv cenv++mkTvSubst :: InScopeSet -> TvSubstEnv -> TCvSubst+-- ^ Make a TCvSubst with specified tyvar subst and empty covar subst+mkTvSubst in_scope tenv = TCvSubst in_scope tenv emptyCvSubstEnv++mkCvSubst :: InScopeSet -> CvSubstEnv -> TCvSubst+-- ^ Make a TCvSubst with specified covar subst and empty tyvar subst+mkCvSubst in_scope cenv = TCvSubst in_scope emptyTvSubstEnv cenv++getTvSubstEnv :: TCvSubst -> TvSubstEnv+getTvSubstEnv (TCvSubst _ env _) = env++getCvSubstEnv :: TCvSubst -> CvSubstEnv+getCvSubstEnv (TCvSubst _ _ env) = env++getTCvInScope :: TCvSubst -> InScopeSet+getTCvInScope (TCvSubst in_scope _ _) = in_scope++-- | Returns the free variables of the types in the range of a substitution as+-- a non-deterministic set.+getTCvSubstRangeFVs :: TCvSubst -> VarSet+getTCvSubstRangeFVs (TCvSubst _ tenv cenv)+    = unionVarSet tenvFVs cenvFVs+  where+    tenvFVs = tyCoVarsOfTypesSet tenv+    cenvFVs = tyCoVarsOfCosSet cenv++isInScope :: Var -> TCvSubst -> Bool+isInScope v (TCvSubst in_scope _ _) = v `elemInScopeSet` in_scope++notElemTCvSubst :: Var -> TCvSubst -> Bool+notElemTCvSubst v (TCvSubst _ tenv cenv)+  | isTyVar v+  = not (v `elemVarEnv` tenv)+  | otherwise+  = not (v `elemVarEnv` cenv)++setTvSubstEnv :: TCvSubst -> TvSubstEnv -> TCvSubst+setTvSubstEnv (TCvSubst in_scope _ cenv) tenv = TCvSubst in_scope tenv cenv++setCvSubstEnv :: TCvSubst -> CvSubstEnv -> TCvSubst+setCvSubstEnv (TCvSubst in_scope tenv _) cenv = TCvSubst in_scope tenv cenv++zapTCvSubst :: TCvSubst -> TCvSubst+zapTCvSubst (TCvSubst in_scope _ _) = TCvSubst in_scope emptyVarEnv emptyVarEnv++extendTCvInScope :: TCvSubst -> Var -> TCvSubst+extendTCvInScope (TCvSubst in_scope tenv cenv) var+  = TCvSubst (extendInScopeSet in_scope var) tenv cenv++extendTCvInScopeList :: TCvSubst -> [Var] -> TCvSubst+extendTCvInScopeList (TCvSubst in_scope tenv cenv) vars+  = TCvSubst (extendInScopeSetList in_scope vars) tenv cenv++extendTCvInScopeSet :: TCvSubst -> VarSet -> TCvSubst+extendTCvInScopeSet (TCvSubst in_scope tenv cenv) vars+  = TCvSubst (extendInScopeSetSet in_scope vars) tenv cenv++extendTCvSubst :: TCvSubst -> TyCoVar -> Type -> TCvSubst+extendTCvSubst subst v ty+  | isTyVar v+  = extendTvSubst subst v ty+  | CoercionTy co <- ty+  = extendCvSubst subst v co+  | otherwise+  = pprPanic "extendTCvSubst" (ppr v <+> text "|->" <+> ppr ty)++extendTCvSubstWithClone :: TCvSubst -> TyCoVar -> TyCoVar -> TCvSubst+extendTCvSubstWithClone subst tcv+  | isTyVar tcv = extendTvSubstWithClone subst tcv+  | otherwise   = extendCvSubstWithClone subst tcv++extendTvSubst :: TCvSubst -> TyVar -> Type -> TCvSubst+extendTvSubst (TCvSubst in_scope tenv cenv) tv ty+  = TCvSubst in_scope (extendVarEnv tenv tv ty) cenv++extendTvSubstBinderAndInScope :: TCvSubst -> TyCoBinder -> Type -> TCvSubst+extendTvSubstBinderAndInScope subst (Named (Bndr v _)) ty+  = ASSERT( isTyVar v )+    extendTvSubstAndInScope subst v ty+extendTvSubstBinderAndInScope subst (Anon {}) _+  = subst++extendTvSubstWithClone :: TCvSubst -> TyVar -> TyVar -> TCvSubst+-- Adds a new tv -> tv mapping, /and/ extends the in-scope set+extendTvSubstWithClone (TCvSubst in_scope tenv cenv) tv tv'+  = TCvSubst (extendInScopeSetSet in_scope new_in_scope)+             (extendVarEnv tenv tv (mkTyVarTy tv'))+             cenv+  where+    new_in_scope = tyCoVarsOfType (tyVarKind tv') `extendVarSet` tv'++extendCvSubst :: TCvSubst -> CoVar -> Coercion -> TCvSubst+extendCvSubst (TCvSubst in_scope tenv cenv) v co+  = TCvSubst in_scope tenv (extendVarEnv cenv v co)++extendCvSubstWithClone :: TCvSubst -> CoVar -> CoVar -> TCvSubst+extendCvSubstWithClone (TCvSubst in_scope tenv cenv) cv cv'+  = TCvSubst (extendInScopeSetSet in_scope new_in_scope)+             tenv+             (extendVarEnv cenv cv (mkCoVarCo cv'))+  where+    new_in_scope = tyCoVarsOfType (varType cv') `extendVarSet` cv'++extendTvSubstAndInScope :: TCvSubst -> TyVar -> Type -> TCvSubst+-- Also extends the in-scope set+extendTvSubstAndInScope (TCvSubst in_scope tenv cenv) tv ty+  = TCvSubst (in_scope `extendInScopeSetSet` tyCoVarsOfType ty)+             (extendVarEnv tenv tv ty)+             cenv++extendTvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst+extendTvSubstList subst tvs tys+  = foldl2 extendTvSubst subst tvs tys++extendTCvSubstList :: TCvSubst -> [Var] -> [Type] -> TCvSubst+extendTCvSubstList subst tvs tys+  = foldl2 extendTCvSubst subst tvs tys++unionTCvSubst :: TCvSubst -> TCvSubst -> TCvSubst+-- Works when the ranges are disjoint+unionTCvSubst (TCvSubst in_scope1 tenv1 cenv1) (TCvSubst in_scope2 tenv2 cenv2)+  = ASSERT( not (tenv1 `intersectsVarEnv` tenv2)+         && not (cenv1 `intersectsVarEnv` cenv2) )+    TCvSubst (in_scope1 `unionInScope` in_scope2)+             (tenv1     `plusVarEnv`   tenv2)+             (cenv1     `plusVarEnv`   cenv2)++-- mkTvSubstPrs and zipTvSubst generate the in-scope set from+-- the types given; but it's just a thunk so with a bit of luck+-- it'll never be evaluated++-- | Generates the in-scope set for the 'TCvSubst' from the types in the incoming+-- environment. No CoVars, please!+zipTvSubst :: HasDebugCallStack => [TyVar] -> [Type] -> TCvSubst+zipTvSubst tvs tys+  = mkTvSubst (mkInScopeSet (tyCoVarsOfTypes tys)) tenv+  where+    tenv = zipTyEnv tvs tys++-- | Generates the in-scope set for the 'TCvSubst' from the types in the incoming+-- environment.  No TyVars, please!+zipCvSubst :: HasDebugCallStack => [CoVar] -> [Coercion] -> TCvSubst+zipCvSubst cvs cos+  = TCvSubst (mkInScopeSet (tyCoVarsOfCos cos)) emptyTvSubstEnv cenv+  where+    cenv = zipCoEnv cvs cos++zipTCvSubst :: HasDebugCallStack => [TyCoVar] -> [Type] -> TCvSubst+zipTCvSubst tcvs tys+  = zip_tcvsubst tcvs tys (mkEmptyTCvSubst $ mkInScopeSet (tyCoVarsOfTypes tys))+  where zip_tcvsubst :: [TyCoVar] -> [Type] -> TCvSubst -> TCvSubst+        zip_tcvsubst (tv:tvs) (ty:tys) subst+          = zip_tcvsubst tvs tys (extendTCvSubst subst tv ty)+        zip_tcvsubst [] [] subst = subst -- empty case+        zip_tcvsubst _  _  _     = pprPanic "zipTCvSubst: length mismatch"+                                            (ppr tcvs <+> ppr tys)++-- | Generates the in-scope set for the 'TCvSubst' from the types in the+-- incoming environment. No CoVars, please!+mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst+mkTvSubstPrs prs =+    ASSERT2( onlyTyVarsAndNoCoercionTy, text "prs" <+> ppr prs )+    mkTvSubst in_scope tenv+  where tenv = mkVarEnv prs+        in_scope = mkInScopeSet $ tyCoVarsOfTypes $ map snd prs+        onlyTyVarsAndNoCoercionTy =+          and [ isTyVar tv && not (isCoercionTy ty)+              | (tv, ty) <- prs ]++zipTyEnv :: HasDebugCallStack => [TyVar] -> [Type] -> TvSubstEnv+zipTyEnv tyvars tys+  | debugIsOn+  , not (all isTyVar tyvars)+  = pprPanic "zipTyEnv" (ppr tyvars <+> ppr tys)+  | otherwise+  = ASSERT( all (not . isCoercionTy) tys )+    mkVarEnv (zipEqual "zipTyEnv" tyvars tys)+        -- There used to be a special case for when+        --      ty == TyVarTy tv+        -- (a not-uncommon case) in which case the substitution was dropped.+        -- But the type-tidier changes the print-name of a type variable without+        -- changing the unique, and that led to a bug.   Why?  Pre-tidying, we had+        -- a type {Foo t}, where Foo is a one-method class.  So Foo is really a newtype.+        -- And it happened that t was the type variable of the class.  Post-tiding,+        -- it got turned into {Foo t2}.  The ext-core printer expanded this using+        -- sourceTypeRep, but that said "Oh, t == t2" because they have the same unique,+        -- and so generated a rep type mentioning t not t2.+        --+        -- Simplest fix is to nuke the "optimisation"++zipCoEnv :: HasDebugCallStack => [CoVar] -> [Coercion] -> CvSubstEnv+zipCoEnv cvs cos+  | debugIsOn+  , not (all isCoVar cvs)+  = pprPanic "zipCoEnv" (ppr cvs <+> ppr cos)+  | otherwise+  = mkVarEnv (zipEqual "zipCoEnv" cvs cos)++instance Outputable TCvSubst where+  ppr (TCvSubst ins tenv cenv)+    = brackets $ sep[ text "TCvSubst",+                      nest 2 (text "In scope:" <+> ppr ins),+                      nest 2 (text "Type env:" <+> ppr tenv),+                      nest 2 (text "Co env:" <+> ppr cenv) ]++{-+%************************************************************************+%*                                                                      *+                Performing type or kind substitutions+%*                                                                      *+%************************************************************************++Note [Sym and ForAllCo]+~~~~~~~~~~~~~~~~~~~~~~~+In OptCoercion, we try to push "sym" out to the leaves of a coercion. But,+how do we push sym into a ForAllCo? It's a little ugly.++Here is the typing rule:++h : k1 ~# k2+(tv : k1) |- g : ty1 ~# ty2+----------------------------+ForAllCo tv h g : (ForAllTy (tv : k1) ty1) ~#+                  (ForAllTy (tv : k2) (ty2[tv |-> tv |> sym h]))++Here is what we want:++ForAllCo tv h' g' : (ForAllTy (tv : k2) (ty2[tv |-> tv |> sym h])) ~#+                    (ForAllTy (tv : k1) ty1)+++Because the kinds of the type variables to the right of the colon are the kinds+coerced by h', we know (h' : k2 ~# k1). Thus, (h' = sym h).++Now, we can rewrite ty1 to be (ty1[tv |-> tv |> sym h' |> h']). We thus want++ForAllCo tv h' g' :+  (ForAllTy (tv : k2) (ty2[tv |-> tv |> h'])) ~#+  (ForAllTy (tv : k1) (ty1[tv |-> tv |> h'][tv |-> tv |> sym h']))++We thus see that we want++g' : ty2[tv |-> tv |> h'] ~# ty1[tv |-> tv |> h']++and thus g' = sym (g[tv |-> tv |> h']).++Putting it all together, we get this:++sym (ForAllCo tv h g)+==>+ForAllCo tv (sym h) (sym g[tv |-> tv |> sym h])++Note [Substituting in a coercion hole]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It seems highly suspicious to be substituting in a coercion that still+has coercion holes. Yet, this can happen in a situation like this:++  f :: forall k. k :~: Type -> ()+  f Refl = let x :: forall (a :: k). [a] -> ...+               x = ...++When we check x's type signature, we require that k ~ Type. We indeed+know this due to the Refl pattern match, but the eager unifier can't+make use of givens. So, when we're done looking at x's type, a coercion+hole will remain. Then, when we're checking x's definition, we skolemise+x's type (in order to, e.g., bring the scoped type variable `a` into scope).+This requires performing a substitution for the fresh skolem variables.++This subsitution needs to affect the kind of the coercion hole, too --+otherwise, the kind will have an out-of-scope variable in it. More problematically+in practice (we won't actually notice the out-of-scope variable ever), skolems+in the kind might have too high a level, triggering a failure to uphold the+invariant that no free variables in a type have a higher level than the+ambient level in the type checker. In the event of having free variables in the+hole's kind, I'm pretty sure we'll always have an erroneous program, so we+don't need to worry what will happen when the hole gets filled in. After all,+a hole relating a locally-bound type variable will be unable to be solved. This+is why it's OK not to look through the IORef of a coercion hole during+substitution.++-}++-- | Type substitution, see 'zipTvSubst'+substTyWith :: HasCallStack => [TyVar] -> [Type] -> Type -> Type+-- Works only if the domain of the substitution is a+-- superset of the type being substituted into+substTyWith tvs tys = {-#SCC "substTyWith" #-}+                      ASSERT( tvs `equalLength` tys )+                      substTy (zipTvSubst tvs tys)++-- | Type substitution, see 'zipTvSubst'. Disables sanity checks.+-- The problems that the sanity checks in substTy catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substTyUnchecked to+-- substTy and remove this function. Please don't use in new code.+substTyWithUnchecked :: [TyVar] -> [Type] -> Type -> Type+substTyWithUnchecked tvs tys+  = ASSERT( tvs `equalLength` tys )+    substTyUnchecked (zipTvSubst tvs tys)++-- | Substitute tyvars within a type using a known 'InScopeSet'.+-- Pre-condition: the 'in_scope' set should satisfy Note [The substitution+-- invariant]; specifically it should include the free vars of 'tys',+-- and of 'ty' minus the domain of the subst.+substTyWithInScope :: InScopeSet -> [TyVar] -> [Type] -> Type -> Type+substTyWithInScope in_scope tvs tys ty =+  ASSERT( tvs `equalLength` tys )+  substTy (mkTvSubst in_scope tenv) ty+  where tenv = zipTyEnv tvs tys++-- | Coercion substitution, see 'zipTvSubst'+substCoWith :: HasCallStack => [TyVar] -> [Type] -> Coercion -> Coercion+substCoWith tvs tys = ASSERT( tvs `equalLength` tys )+                      substCo (zipTvSubst tvs tys)++-- | Coercion substitution, see 'zipTvSubst'. Disables sanity checks.+-- The problems that the sanity checks in substCo catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substCoUnchecked to+-- substCo and remove this function. Please don't use in new code.+substCoWithUnchecked :: [TyVar] -> [Type] -> Coercion -> Coercion+substCoWithUnchecked tvs tys+  = ASSERT( tvs `equalLength` tys )+    substCoUnchecked (zipTvSubst tvs tys)++++-- | Substitute covars within a type+substTyWithCoVars :: [CoVar] -> [Coercion] -> Type -> Type+substTyWithCoVars cvs cos = substTy (zipCvSubst cvs cos)++-- | Type substitution, see 'zipTvSubst'+substTysWith :: [TyVar] -> [Type] -> [Type] -> [Type]+substTysWith tvs tys = ASSERT( tvs `equalLength` tys )+                       substTys (zipTvSubst tvs tys)++-- | Type substitution, see 'zipTvSubst'+substTysWithCoVars :: [CoVar] -> [Coercion] -> [Type] -> [Type]+substTysWithCoVars cvs cos = ASSERT( cvs `equalLength` cos )+                             substTys (zipCvSubst cvs cos)++-- | Substitute within a 'Type' after adding the free variables of the type+-- to the in-scope set. This is useful for the case when the free variables+-- aren't already in the in-scope set or easily available.+-- See also Note [The substitution invariant].+substTyAddInScope :: TCvSubst -> Type -> Type+substTyAddInScope subst ty =+  substTy (extendTCvInScopeSet subst $ tyCoVarsOfType ty) ty++-- | When calling `substTy` it should be the case that the in-scope set in+-- the substitution is a superset of the free vars of the range of the+-- substitution.+-- See also Note [The substitution invariant].+isValidTCvSubst :: TCvSubst -> Bool+isValidTCvSubst (TCvSubst in_scope tenv cenv) =+  (tenvFVs `varSetInScope` in_scope) &&+  (cenvFVs `varSetInScope` in_scope)+  where+  tenvFVs = tyCoVarsOfTypesSet tenv+  cenvFVs = tyCoVarsOfCosSet cenv++-- | This checks if the substitution satisfies the invariant from+-- Note [The substitution invariant].+checkValidSubst :: HasCallStack => TCvSubst -> [Type] -> [Coercion] -> a -> a+checkValidSubst subst@(TCvSubst in_scope tenv cenv) tys cos a+  = ASSERT2( isValidTCvSubst subst,+             text "in_scope" <+> ppr in_scope $$+             text "tenv" <+> ppr tenv $$+             text "tenvFVs" <+> ppr (tyCoVarsOfTypesSet tenv) $$+             text "cenv" <+> ppr cenv $$+             text "cenvFVs" <+> ppr (tyCoVarsOfCosSet cenv) $$+             text "tys" <+> ppr tys $$+             text "cos" <+> ppr cos )+    ASSERT2( tysCosFVsInScope,+             text "in_scope" <+> ppr in_scope $$+             text "tenv" <+> ppr tenv $$+             text "cenv" <+> ppr cenv $$+             text "tys" <+> ppr tys $$+             text "cos" <+> ppr cos $$+             text "needInScope" <+> ppr needInScope )+    a+  where+  substDomain = nonDetKeysUFM tenv ++ nonDetKeysUFM cenv+    -- It's OK to use nonDetKeysUFM here, because we only use this list to+    -- remove some elements from a set+  needInScope = (tyCoVarsOfTypes tys `unionVarSet` tyCoVarsOfCos cos)+                  `delListFromUniqSet_Directly` substDomain+  tysCosFVsInScope = needInScope `varSetInScope` in_scope+++-- | Substitute within a 'Type'+-- The substitution has to satisfy the invariants described in+-- Note [The substitution invariant].+substTy :: HasCallStack => TCvSubst -> Type  -> Type+substTy subst ty+  | isEmptyTCvSubst subst = ty+  | otherwise             = checkValidSubst subst [ty] [] $+                            subst_ty subst ty++-- | Substitute within a 'Type' disabling the sanity checks.+-- The problems that the sanity checks in substTy catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substTyUnchecked to+-- substTy and remove this function. Please don't use in new code.+substTyUnchecked :: TCvSubst -> Type -> Type+substTyUnchecked subst ty+                 | isEmptyTCvSubst subst = ty+                 | otherwise             = subst_ty subst ty++-- | Substitute within several 'Type's+-- The substitution has to satisfy the invariants described in+-- Note [The substitution invariant].+substTys :: HasCallStack => TCvSubst -> [Type] -> [Type]+substTys subst tys+  | isEmptyTCvSubst subst = tys+  | otherwise = checkValidSubst subst tys [] $ map (subst_ty subst) tys++-- | Substitute within several 'Type's disabling the sanity checks.+-- The problems that the sanity checks in substTys catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substTysUnchecked to+-- substTys and remove this function. Please don't use in new code.+substTysUnchecked :: TCvSubst -> [Type] -> [Type]+substTysUnchecked subst tys+                 | isEmptyTCvSubst subst = tys+                 | otherwise             = map (subst_ty subst) tys++-- | Substitute within a 'ThetaType'+-- The substitution has to satisfy the invariants described in+-- Note [The substitution invariant].+substTheta :: HasCallStack => TCvSubst -> ThetaType -> ThetaType+substTheta = substTys++-- | Substitute within a 'ThetaType' disabling the sanity checks.+-- The problems that the sanity checks in substTys catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substThetaUnchecked to+-- substTheta and remove this function. Please don't use in new code.+substThetaUnchecked :: TCvSubst -> ThetaType -> ThetaType+substThetaUnchecked = substTysUnchecked+++subst_ty :: TCvSubst -> Type -> Type+-- subst_ty is the main workhorse for type substitution+--+-- Note that the in_scope set is poked only if we hit a forall+-- so it may often never be fully computed+subst_ty subst ty+   = go ty+  where+    go (TyVarTy tv)      = substTyVar subst tv+    go (AppTy fun arg)   = mkAppTy (go fun) $! (go arg)+                -- The mkAppTy smart constructor is important+                -- we might be replacing (a Int), represented with App+                -- by [Int], represented with TyConApp+    go (TyConApp tc tys) = let args = map go tys+                           in  args `seqList` TyConApp tc args+    go ty@(FunTy { ft_arg = arg, ft_res = res })+      = let !arg' = go arg+            !res' = go res+        in ty { ft_arg = arg', ft_res = res' }+    go (ForAllTy (Bndr tv vis) ty)+                         = case substVarBndrUnchecked subst tv of+                             (subst', tv') ->+                               (ForAllTy $! ((Bndr $! tv') vis)) $!+                                            (subst_ty subst' ty)+    go (LitTy n)         = LitTy $! n+    go (CastTy ty co)    = (mkCastTy $! (go ty)) $! (subst_co subst co)+    go (CoercionTy co)   = CoercionTy $! (subst_co subst co)++substTyVar :: TCvSubst -> TyVar -> Type+substTyVar (TCvSubst _ tenv _) tv+  = ASSERT( isTyVar tv )+    case lookupVarEnv tenv tv of+      Just ty -> ty+      Nothing -> TyVarTy tv++substTyVars :: TCvSubst -> [TyVar] -> [Type]+substTyVars subst = map $ substTyVar subst++substTyCoVars :: TCvSubst -> [TyCoVar] -> [Type]+substTyCoVars subst = map $ substTyCoVar subst++substTyCoVar :: TCvSubst -> TyCoVar -> Type+substTyCoVar subst tv+  | isTyVar tv = substTyVar subst tv+  | otherwise = CoercionTy $ substCoVar subst tv++lookupTyVar :: TCvSubst -> TyVar  -> Maybe Type+        -- See Note [Extending the TCvSubst]+lookupTyVar (TCvSubst _ tenv _) tv+  = ASSERT( isTyVar tv )+    lookupVarEnv tenv tv++-- | Substitute within a 'Coercion'+-- The substitution has to satisfy the invariants described in+-- Note [The substitution invariant].+substCo :: HasCallStack => TCvSubst -> Coercion -> Coercion+substCo subst co+  | isEmptyTCvSubst subst = co+  | otherwise = checkValidSubst subst [] [co] $ subst_co subst co++-- | Substitute within a 'Coercion' disabling sanity checks.+-- The problems that the sanity checks in substCo catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substCoUnchecked to+-- substCo and remove this function. Please don't use in new code.+substCoUnchecked :: TCvSubst -> Coercion -> Coercion+substCoUnchecked subst co+  | isEmptyTCvSubst subst = co+  | otherwise = subst_co subst co++-- | Substitute within several 'Coercion's+-- The substitution has to satisfy the invariants described in+-- Note [The substitution invariant].+substCos :: HasCallStack => TCvSubst -> [Coercion] -> [Coercion]+substCos subst cos+  | isEmptyTCvSubst subst = cos+  | otherwise = checkValidSubst subst [] cos $ map (subst_co subst) cos++subst_co :: TCvSubst -> Coercion -> Coercion+subst_co subst co+  = go co+  where+    go_ty :: Type -> Type+    go_ty = subst_ty subst++    go_mco :: MCoercion -> MCoercion+    go_mco MRefl    = MRefl+    go_mco (MCo co) = MCo (go co)++    go :: Coercion -> Coercion+    go (Refl ty)             = mkNomReflCo $! (go_ty ty)+    go (GRefl r ty mco)      = (mkGReflCo r $! (go_ty ty)) $! (go_mco mco)+    go (TyConAppCo r tc args)= let args' = map go args+                               in  args' `seqList` mkTyConAppCo r tc args'+    go (AppCo co arg)        = (mkAppCo $! go co) $! go arg+    go (ForAllCo tv kind_co co)+      = case substForAllCoBndrUnchecked subst tv kind_co of+         (subst', tv', kind_co') ->+          ((mkForAllCo $! tv') $! kind_co') $! subst_co subst' co+    go (FunCo r co1 co2)     = (mkFunCo r $! go co1) $! go co2+    go (CoVarCo cv)          = substCoVar subst cv+    go (AxiomInstCo con ind cos) = mkAxiomInstCo con ind $! map go cos+    go (UnivCo p r t1 t2)    = (((mkUnivCo $! go_prov p) $! r) $!+                                (go_ty t1)) $! (go_ty t2)+    go (SymCo co)            = mkSymCo $! (go co)+    go (TransCo co1 co2)     = (mkTransCo $! (go co1)) $! (go co2)+    go (NthCo r d co)        = mkNthCo r d $! (go co)+    go (LRCo lr co)          = mkLRCo lr $! (go co)+    go (InstCo co arg)       = (mkInstCo $! (go co)) $! go arg+    go (KindCo co)           = mkKindCo $! (go co)+    go (SubCo co)            = mkSubCo $! (go co)+    go (AxiomRuleCo c cs)    = let cs1 = map go cs+                                in cs1 `seqList` AxiomRuleCo c cs1+    go (HoleCo h)            = HoleCo $! go_hole h++    go_prov UnsafeCoerceProv     = UnsafeCoerceProv+    go_prov (PhantomProv kco)    = PhantomProv (go kco)+    go_prov (ProofIrrelProv kco) = ProofIrrelProv (go kco)+    go_prov p@(PluginProv _)     = p++    -- See Note [Substituting in a coercion hole]+    go_hole h@(CoercionHole { ch_co_var = cv })+      = h { ch_co_var = updateVarType go_ty cv }++substForAllCoBndr :: TCvSubst -> TyCoVar -> KindCoercion+                  -> (TCvSubst, TyCoVar, Coercion)+substForAllCoBndr subst+  = substForAllCoBndrUsing False (substCo subst) subst++-- | Like 'substForAllCoBndr', but disables sanity checks.+-- The problems that the sanity checks in substCo catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substCoUnchecked to+-- substCo and remove this function. Please don't use in new code.+substForAllCoBndrUnchecked :: TCvSubst -> TyCoVar -> KindCoercion+                           -> (TCvSubst, TyCoVar, Coercion)+substForAllCoBndrUnchecked subst+  = substForAllCoBndrUsing False (substCoUnchecked subst) subst++-- See Note [Sym and ForAllCo]+substForAllCoBndrUsing :: Bool  -- apply sym to binder?+                       -> (Coercion -> Coercion)  -- transformation to kind co+                       -> TCvSubst -> TyCoVar -> KindCoercion+                       -> (TCvSubst, TyCoVar, KindCoercion)+substForAllCoBndrUsing sym sco subst old_var+  | isTyVar old_var = substForAllCoTyVarBndrUsing sym sco subst old_var+  | otherwise       = substForAllCoCoVarBndrUsing sym sco subst old_var++substForAllCoTyVarBndrUsing :: Bool  -- apply sym to binder?+                            -> (Coercion -> Coercion)  -- transformation to kind co+                            -> TCvSubst -> TyVar -> KindCoercion+                            -> (TCvSubst, TyVar, KindCoercion)+substForAllCoTyVarBndrUsing sym sco (TCvSubst in_scope tenv cenv) old_var old_kind_co+  = ASSERT( isTyVar old_var )+    ( TCvSubst (in_scope `extendInScopeSet` new_var) new_env cenv+    , new_var, new_kind_co )+  where+    new_env | no_change && not sym = delVarEnv tenv old_var+            | sym       = extendVarEnv tenv old_var $+                          TyVarTy new_var `CastTy` new_kind_co+            | otherwise = extendVarEnv tenv old_var (TyVarTy new_var)++    no_kind_change = noFreeVarsOfCo old_kind_co+    no_change = no_kind_change && (new_var == old_var)++    new_kind_co | no_kind_change = old_kind_co+                | otherwise      = sco old_kind_co++    Pair new_ki1 _ = coercionKind new_kind_co+    -- We could do substitution to (tyVarKind old_var). We don't do so because+    -- we already substituted new_kind_co, which contains the kind information+    -- we want. We don't want to do substitution once more. Also, in most cases,+    -- new_kind_co is a Refl, in which case coercionKind is really fast.++    new_var  = uniqAway in_scope (setTyVarKind old_var new_ki1)++substForAllCoCoVarBndrUsing :: Bool  -- apply sym to binder?+                            -> (Coercion -> Coercion)  -- transformation to kind co+                            -> TCvSubst -> CoVar -> KindCoercion+                            -> (TCvSubst, CoVar, KindCoercion)+substForAllCoCoVarBndrUsing sym sco (TCvSubst in_scope tenv cenv)+                            old_var old_kind_co+  = ASSERT( isCoVar old_var )+    ( TCvSubst (in_scope `extendInScopeSet` new_var) tenv new_cenv+    , new_var, new_kind_co )+  where+    new_cenv | no_change && not sym = delVarEnv cenv old_var+             | otherwise = extendVarEnv cenv old_var (mkCoVarCo new_var)++    no_kind_change = noFreeVarsOfCo old_kind_co+    no_change = no_kind_change && (new_var == old_var)++    new_kind_co | no_kind_change = old_kind_co+                | otherwise      = sco old_kind_co++    Pair h1 h2 = coercionKind new_kind_co++    new_var       = uniqAway in_scope $ mkCoVar (varName old_var) new_var_type+    new_var_type  | sym       = h2+                  | otherwise = h1++substCoVar :: TCvSubst -> CoVar -> Coercion+substCoVar (TCvSubst _ _ cenv) cv+  = case lookupVarEnv cenv cv of+      Just co -> co+      Nothing -> CoVarCo cv++substCoVars :: TCvSubst -> [CoVar] -> [Coercion]+substCoVars subst cvs = map (substCoVar subst) cvs++lookupCoVar :: TCvSubst -> Var -> Maybe Coercion+lookupCoVar (TCvSubst _ _ cenv) v = lookupVarEnv cenv v++substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)+substTyVarBndr = substTyVarBndrUsing substTy++substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])+substTyVarBndrs = mapAccumL substTyVarBndr++substVarBndr :: HasCallStack => TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)+substVarBndr = substVarBndrUsing substTy++substVarBndrs :: HasCallStack => TCvSubst -> [TyCoVar] -> (TCvSubst, [TyCoVar])+substVarBndrs = mapAccumL substVarBndr++substCoVarBndr :: HasCallStack => TCvSubst -> CoVar -> (TCvSubst, CoVar)+substCoVarBndr = substCoVarBndrUsing substTy++-- | Like 'substVarBndr', but disables sanity checks.+-- The problems that the sanity checks in substTy catch are described in+-- Note [The substitution invariant].+-- The goal of #11371 is to migrate all the calls of substTyUnchecked to+-- substTy and remove this function. Please don't use in new code.+substVarBndrUnchecked :: TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)+substVarBndrUnchecked = substVarBndrUsing substTyUnchecked++substVarBndrUsing :: (TCvSubst -> Type -> Type)+                  -> TCvSubst -> TyCoVar -> (TCvSubst, TyCoVar)+substVarBndrUsing subst_fn subst v+  | isTyVar v = substTyVarBndrUsing subst_fn subst v+  | otherwise = substCoVarBndrUsing subst_fn subst v++-- | Substitute a tyvar in a binding position, returning an+-- extended subst and a new tyvar.+-- Use the supplied function to substitute in the kind+substTyVarBndrUsing+  :: (TCvSubst -> Type -> Type)  -- ^ Use this to substitute in the kind+  -> TCvSubst -> TyVar -> (TCvSubst, TyVar)+substTyVarBndrUsing subst_fn subst@(TCvSubst in_scope tenv cenv) old_var+  = ASSERT2( _no_capture, pprTyVar old_var $$ pprTyVar new_var $$ ppr subst )+    ASSERT( isTyVar old_var )+    (TCvSubst (in_scope `extendInScopeSet` new_var) new_env cenv, new_var)+  where+    new_env | no_change = delVarEnv tenv old_var+            | otherwise = extendVarEnv tenv old_var (TyVarTy new_var)++    _no_capture = not (new_var `elemVarSet` tyCoVarsOfTypesSet tenv)+    -- Assertion check that we are not capturing something in the substitution++    old_ki = tyVarKind old_var+    no_kind_change = noFreeVarsOfType old_ki -- verify that kind is closed+    no_change = no_kind_change && (new_var == old_var)+        -- no_change means that the new_var is identical in+        -- all respects to the old_var (same unique, same kind)+        -- See Note [Extending the TCvSubst]+        --+        -- In that case we don't need to extend the substitution+        -- to map old to new.  But instead we must zap any+        -- current substitution for the variable. For example:+        --      (\x.e) with id_subst = [x |-> e']+        -- Here we must simply zap the substitution for x++    new_var | no_kind_change = uniqAway in_scope old_var+            | otherwise = uniqAway in_scope $+                          setTyVarKind old_var (subst_fn subst old_ki)+        -- The uniqAway part makes sure the new variable is not already in scope++-- | Substitute a covar in a binding position, returning an+-- extended subst and a new covar.+-- Use the supplied function to substitute in the kind+substCoVarBndrUsing+  :: (TCvSubst -> Type -> Type)+  -> TCvSubst -> CoVar -> (TCvSubst, CoVar)+substCoVarBndrUsing subst_fn subst@(TCvSubst in_scope tenv cenv) old_var+  = ASSERT( isCoVar old_var )+    (TCvSubst (in_scope `extendInScopeSet` new_var) tenv new_cenv, new_var)+  where+    new_co         = mkCoVarCo new_var+    no_kind_change = noFreeVarsOfTypes [t1, t2]+    no_change      = new_var == old_var && no_kind_change++    new_cenv | no_change = delVarEnv cenv old_var+             | otherwise = extendVarEnv cenv old_var new_co++    new_var = uniqAway in_scope subst_old_var+    subst_old_var = mkCoVar (varName old_var) new_var_type++    (_, _, t1, t2, role) = coVarKindsTypesRole old_var+    t1' = subst_fn subst t1+    t2' = subst_fn subst t2+    new_var_type = mkCoercionType role t1' t2'+                  -- It's important to do the substitution for coercions,+                  -- because they can have free type variables++cloneTyVarBndr :: TCvSubst -> TyVar -> Unique -> (TCvSubst, TyVar)+cloneTyVarBndr subst@(TCvSubst in_scope tv_env cv_env) tv uniq+  = ASSERT2( isTyVar tv, ppr tv )   -- I think it's only called on TyVars+    (TCvSubst (extendInScopeSet in_scope tv')+              (extendVarEnv tv_env tv (mkTyVarTy tv')) cv_env, tv')+  where+    old_ki = tyVarKind tv+    no_kind_change = noFreeVarsOfType old_ki -- verify that kind is closed++    tv1 | no_kind_change = tv+        | otherwise      = setTyVarKind tv (substTy subst old_ki)++    tv' = setVarUnique tv1 uniq++cloneTyVarBndrs :: TCvSubst -> [TyVar] -> UniqSupply -> (TCvSubst, [TyVar])+cloneTyVarBndrs subst []     _usupply = (subst, [])+cloneTyVarBndrs subst (t:ts)  usupply = (subst'', tv:tvs)+  where+    (uniq, usupply') = takeUniqFromSupply usupply+    (subst' , tv )   = cloneTyVarBndr subst t uniq+    (subst'', tvs)   = cloneTyVarBndrs subst' ts usupply'+
+ types/TyCoTidy.hs view
@@ -0,0 +1,236 @@+{-# LANGUAGE BangPatterns #-}++-- | Tidying types and coercions for printing in error messages.+module TyCoTidy+  (+        -- * Tidying type related things up for printing+        tidyType,      tidyTypes,+        tidyOpenType,  tidyOpenTypes,+        tidyOpenKind,+        tidyVarBndr, tidyVarBndrs, tidyFreeTyCoVars, avoidNameClashes,+        tidyOpenTyCoVar, tidyOpenTyCoVars,+        tidyTyCoVarOcc,+        tidyTopType,+        tidyKind,+        tidyCo, tidyCos,+        tidyTyCoVarBinder, tidyTyCoVarBinders+  ) where++import GhcPrelude++import TyCoRep+import TyCoFVs (tyCoVarsOfTypesWellScoped, tyCoVarsOfTypeList)++import Name hiding (varName)+import Var+import VarEnv+import Util (seqList)++import Data.List (mapAccumL)++{-+%************************************************************************+%*                                                                      *+\subsection{TidyType}+%*                                                                      *+%************************************************************************+-}++-- | This tidies up a type for printing in an error message, or in+-- an interface file.+--+-- It doesn't change the uniques at all, just the print names.+tidyVarBndrs :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])+tidyVarBndrs tidy_env tvs+  = mapAccumL tidyVarBndr (avoidNameClashes tvs tidy_env) tvs++tidyVarBndr :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)+tidyVarBndr tidy_env@(occ_env, subst) var+  = case tidyOccName occ_env (getHelpfulOccName var) of+      (occ_env', occ') -> ((occ_env', subst'), var')+        where+          subst' = extendVarEnv subst var var'+          var'   = setVarType (setVarName var name') type'+          type'  = tidyType tidy_env (varType var)+          name'  = tidyNameOcc name occ'+          name   = varName var++avoidNameClashes :: [TyCoVar] -> TidyEnv -> TidyEnv+-- Seed the occ_env with clashes among the names, see+-- Note [Tidying multiple names at once] in OccName+avoidNameClashes tvs (occ_env, subst)+  = (avoidClashesOccEnv occ_env occs, subst)+  where+    occs = map getHelpfulOccName tvs++getHelpfulOccName :: TyCoVar -> OccName+-- A TcTyVar with a System Name is probably a+-- unification variable; when we tidy them we give them a trailing+-- "0" (or 1 etc) so that they don't take precedence for the+-- un-modified name. Plus, indicating a unification variable in+-- this way is a helpful clue for users+getHelpfulOccName tv+  | isSystemName name, isTcTyVar tv+  = mkTyVarOcc (occNameString occ ++ "0")+  | otherwise+  = occ+  where+   name = varName tv+   occ  = getOccName name++tidyTyCoVarBinder :: TidyEnv -> VarBndr TyCoVar vis+                  -> (TidyEnv, VarBndr TyCoVar vis)+tidyTyCoVarBinder tidy_env (Bndr tv vis)+  = (tidy_env', Bndr tv' vis)+  where+    (tidy_env', tv') = tidyVarBndr tidy_env tv++tidyTyCoVarBinders :: TidyEnv -> [VarBndr TyCoVar vis]+                   -> (TidyEnv, [VarBndr TyCoVar vis])+tidyTyCoVarBinders tidy_env tvbs+  = mapAccumL tidyTyCoVarBinder+              (avoidNameClashes (binderVars tvbs) tidy_env) tvbs++---------------+tidyFreeTyCoVars :: TidyEnv -> [TyCoVar] -> TidyEnv+-- ^ Add the free 'TyVar's to the env in tidy form,+-- so that we can tidy the type they are free in+tidyFreeTyCoVars (full_occ_env, var_env) tyvars+  = fst (tidyOpenTyCoVars (full_occ_env, var_env) tyvars)++---------------+tidyOpenTyCoVars :: TidyEnv -> [TyCoVar] -> (TidyEnv, [TyCoVar])+tidyOpenTyCoVars env tyvars = mapAccumL tidyOpenTyCoVar env tyvars++---------------+tidyOpenTyCoVar :: TidyEnv -> TyCoVar -> (TidyEnv, TyCoVar)+-- ^ Treat a new 'TyCoVar' as a binder, and give it a fresh tidy name+-- using the environment if one has not already been allocated. See+-- also 'tidyVarBndr'+tidyOpenTyCoVar env@(_, subst) tyvar+  = case lookupVarEnv subst tyvar of+        Just tyvar' -> (env, tyvar')              -- Already substituted+        Nothing     ->+          let env' = tidyFreeTyCoVars env (tyCoVarsOfTypeList (tyVarKind tyvar))+          in tidyVarBndr env' tyvar  -- Treat it as a binder++---------------+tidyTyCoVarOcc :: TidyEnv -> TyCoVar -> TyCoVar+tidyTyCoVarOcc env@(_, subst) tv+  = case lookupVarEnv subst tv of+        Nothing  -> updateVarType (tidyType env) tv+        Just tv' -> tv'++---------------+tidyTypes :: TidyEnv -> [Type] -> [Type]+tidyTypes env tys = map (tidyType env) tys++---------------+tidyType :: TidyEnv -> Type -> Type+tidyType _   (LitTy n)             = LitTy n+tidyType env (TyVarTy tv)          = TyVarTy (tidyTyCoVarOcc env tv)+tidyType env (TyConApp tycon tys)  = let args = tidyTypes env tys+                                     in args `seqList` TyConApp tycon args+tidyType env (AppTy fun arg)       = (AppTy $! (tidyType env fun)) $! (tidyType env arg)+tidyType env ty@(FunTy _ arg res)  = let { !arg' = tidyType env arg+                                         ; !res' = tidyType env res }+                                     in ty { ft_arg = arg', ft_res = res' }+tidyType env (ty@(ForAllTy{}))     = mkForAllTys' (zip tvs' vis) $! tidyType env' body_ty+  where+    (tvs, vis, body_ty) = splitForAllTys' ty+    (env', tvs') = tidyVarBndrs env tvs+tidyType env (CastTy ty co)       = (CastTy $! tidyType env ty) $! (tidyCo env co)+tidyType env (CoercionTy co)      = CoercionTy $! (tidyCo env co)+++-- The following two functions differ from mkForAllTys and splitForAllTys in that+-- they expect/preserve the ArgFlag argument. Thes belong to types/Type.hs, but+-- how should they be named?+mkForAllTys' :: [(TyCoVar, ArgFlag)] -> Type -> Type+mkForAllTys' tvvs ty = foldr strictMkForAllTy ty tvvs+  where+    strictMkForAllTy (tv,vis) ty = (ForAllTy $! ((Bndr $! tv) $! vis)) $! ty++splitForAllTys' :: Type -> ([TyCoVar], [ArgFlag], Type)+splitForAllTys' ty = go ty [] []+  where+    go (ForAllTy (Bndr tv vis) ty) tvs viss = go ty (tv:tvs) (vis:viss)+    go ty                          tvs viss = (reverse tvs, reverse viss, ty)+++---------------+-- | Grabs the free type variables, tidies them+-- and then uses 'tidyType' to work over the type itself+tidyOpenTypes :: TidyEnv -> [Type] -> (TidyEnv, [Type])+tidyOpenTypes env tys+  = (env', tidyTypes (trimmed_occ_env, var_env) tys)+  where+    (env'@(_, var_env), tvs') = tidyOpenTyCoVars env $+                                tyCoVarsOfTypesWellScoped tys+    trimmed_occ_env = initTidyOccEnv (map getOccName tvs')+      -- The idea here was that we restrict the new TidyEnv to the+      -- _free_ vars of the types, so that we don't gratuitously rename+      -- the _bound_ variables of the types.++---------------+tidyOpenType :: TidyEnv -> Type -> (TidyEnv, Type)+tidyOpenType env ty = let (env', [ty']) = tidyOpenTypes env [ty] in+                      (env', ty')++---------------+-- | Calls 'tidyType' on a top-level type (i.e. with an empty tidying environment)+tidyTopType :: Type -> Type+tidyTopType ty = tidyType emptyTidyEnv ty++---------------+tidyOpenKind :: TidyEnv -> Kind -> (TidyEnv, Kind)+tidyOpenKind = tidyOpenType++tidyKind :: TidyEnv -> Kind -> Kind+tidyKind = tidyType++----------------+tidyCo :: TidyEnv -> Coercion -> Coercion+tidyCo env@(_, subst) co+  = go co+  where+    go_mco MRefl    = MRefl+    go_mco (MCo co) = MCo (go co)++    go (Refl ty)             = Refl (tidyType env ty)+    go (GRefl r ty mco)      = GRefl r (tidyType env ty) $! go_mco mco+    go (TyConAppCo r tc cos) = let args = map go cos+                               in args `seqList` TyConAppCo r tc args+    go (AppCo co1 co2)       = (AppCo $! go co1) $! go co2+    go (ForAllCo tv h co)    = ((ForAllCo $! tvp) $! (go h)) $! (tidyCo envp co)+                               where (envp, tvp) = tidyVarBndr env tv+            -- the case above duplicates a bit of work in tidying h and the kind+            -- of tv. But the alternative is to use coercionKind, which seems worse.+    go (FunCo r co1 co2)     = (FunCo r $! go co1) $! go co2+    go (CoVarCo cv)          = case lookupVarEnv subst cv of+                                 Nothing  -> CoVarCo cv+                                 Just cv' -> CoVarCo cv'+    go (HoleCo h)            = HoleCo h+    go (AxiomInstCo con ind cos) = let args = map go cos+                               in  args `seqList` AxiomInstCo con ind args+    go (UnivCo p r t1 t2)    = (((UnivCo $! (go_prov p)) $! r) $!+                                tidyType env t1) $! tidyType env t2+    go (SymCo co)            = SymCo $! go co+    go (TransCo co1 co2)     = (TransCo $! go co1) $! go co2+    go (NthCo r d co)        = NthCo r d $! go co+    go (LRCo lr co)          = LRCo lr $! go co+    go (InstCo co ty)        = (InstCo $! go co) $! go ty+    go (KindCo co)           = KindCo $! go co+    go (SubCo co)            = SubCo $! go co+    go (AxiomRuleCo ax cos)  = let cos1 = tidyCos env cos+                               in cos1 `seqList` AxiomRuleCo ax cos1++    go_prov UnsafeCoerceProv    = UnsafeCoerceProv+    go_prov (PhantomProv co)    = PhantomProv (go co)+    go_prov (ProofIrrelProv co) = ProofIrrelProv (go co)+    go_prov p@(PluginProv _)    = p++tidyCos :: TidyEnv -> [Coercion] -> [Coercion]+tidyCos env = map (tidyCo env)++
types/TyCon.hs view
@@ -41,6 +41,7 @@         mkFamilyTyCon,         mkPromotedDataCon,         mkTcTyCon,+        noTcTyConScopedTyVars,          -- ** Predicates on TyCons         isAlgTyCon, isVanillaAlgTyCon,@@ -50,7 +51,7 @@         isTupleTyCon, isUnboxedTupleTyCon, isBoxedTupleTyCon,         isUnboxedSumTyCon, isPromotedTupleTyCon,         isTypeSynonymTyCon,-        mightBeUnsaturatedTyCon,+        mustBeSaturated,         isPromotedDataCon, isPromotedDataCon_maybe,         isKindTyCon, isLiftedTypeKindTyConName,         isTauTyCon, isFamFreeTyCon,@@ -69,7 +70,8 @@         isTyConAssoc, tyConAssoc_maybe, tyConFlavourAssoc_maybe,         isImplicitTyCon,         isTyConWithSrcDataCons,-        isTcTyCon, isTcLevPoly,+        isTcTyCon, setTcTyConKind,+        isTcLevPoly,          -- ** Extracting information out of TyCons         tyConName,@@ -98,17 +100,16 @@         algTcFields,         tyConRuntimeRepInfo,         tyConBinders, tyConResKind, tyConTyVarBinders,-        tcTyConScopedTyVars, tcTyConUserTyVars, tcTyConIsPoly,+        tcTyConScopedTyVars, tcTyConIsPoly,         mkTyConTagMap,          -- ** Manipulating TyCons         expandSynTyCon_maybe,-        makeRecoveryTyCon,         newTyConCo, newTyConCo_maybe,         pprPromotionQuote, mkTyConKind,          -- ** Predicated on TyConFlavours-        tcFlavourCanBeUnsaturated, tcFlavourIsOpen,+        tcFlavourIsOpen,          -- * Runtime type representation         TyConRepName, tyConRepName_maybe,@@ -121,6 +122,8 @@         primRepSizeB,         primElemRepSizeB,         primRepIsFloat,+        primRepsCompatible,+        primRepCompatible,          -- * Recursion breaking         RecTcChecker, initRecTc, defaultRecTcMaxBound,@@ -132,10 +135,10 @@  import GhcPrelude -import {-# SOURCE #-} TyCoRep    ( Kind, Type, PredType, pprType )+import {-# SOURCE #-} TyCoRep    ( Kind, Type, PredType, mkForAllTy, mkFunTy )+import {-# SOURCE #-} TyCoPpr    ( pprType ) import {-# SOURCE #-} TysWiredIn ( runtimeRepTyCon, constraintKind-                                 , vecCountTyCon, vecElemTyCon, liftedTypeKind-                                 , mkFunKind, mkForAllKind )+                                 , vecCountTyCon, vecElemTyCon, liftedTypeKind ) import {-# SOURCE #-} DataCon    ( DataCon, dataConExTyCoVars, dataConFieldLabels                                  , dataConTyCon, dataConFullSig                                  , isUnboxedSumCon )@@ -396,7 +399,7 @@ must be True.  See also:- * [Injectivity annotation] in HsDecls+ * [Injectivity annotation] in GHC.Hs.Decls  * [Renaming injectivity annotation] in RnSource  * [Verifying injectivity annotation] in FamInstEnv  * [Type inference for type families with injectivity] in TcInteract@@ -416,18 +419,18 @@  data TyConBndrVis   = NamedTCB ArgFlag-  | AnonTCB+  | AnonTCB  AnonArgFlag  instance Outputable TyConBndrVis where-  ppr (NamedTCB flag) = text "NamedTCB" <+> ppr flag-  ppr AnonTCB         = text "AnonTCB"+  ppr (NamedTCB flag) = text "NamedTCB" <> ppr flag+  ppr (AnonTCB af)    = text "AnonTCB"  <> ppr af -mkAnonTyConBinder :: TyVar -> TyConBinder-mkAnonTyConBinder tv = ASSERT( isTyVar tv)-                       Bndr tv AnonTCB+mkAnonTyConBinder :: AnonArgFlag -> TyVar -> TyConBinder+mkAnonTyConBinder af tv = ASSERT( isTyVar tv)+                          Bndr tv (AnonTCB af) -mkAnonTyConBinders :: [TyVar] -> [TyConBinder]-mkAnonTyConBinders tvs = map mkAnonTyConBinder tvs+mkAnonTyConBinders :: AnonArgFlag -> [TyVar] -> [TyConBinder]+mkAnonTyConBinders af tvs = map (mkAnonTyConBinder af) tvs  mkNamedTyConBinder :: ArgFlag -> TyVar -> TyConBinder -- The odd argument order supports currying@@ -445,14 +448,15 @@                       -> TyConBinder mkRequiredTyConBinder dep_set tv   | tv `elemVarSet` dep_set = mkNamedTyConBinder Required tv-  | otherwise               = mkAnonTyConBinder tv+  | otherwise               = mkAnonTyConBinder  VisArg   tv  tyConBinderArgFlag :: TyConBinder -> ArgFlag tyConBinderArgFlag (Bndr _ vis) = tyConBndrVisArgFlag vis  tyConBndrVisArgFlag :: TyConBndrVis -> ArgFlag-tyConBndrVisArgFlag (NamedTCB vis) = vis-tyConBndrVisArgFlag AnonTCB        = Required+tyConBndrVisArgFlag (NamedTCB vis)     = vis+tyConBndrVisArgFlag (AnonTCB VisArg)   = Required+tyConBndrVisArgFlag (AnonTCB InvisArg) = Inferred    -- See Note [AnonTCB InvisArg]  isNamedTyConBinder :: TyConBinder -> Bool -- Identifies kind variables@@ -466,19 +470,22 @@ isVisibleTyConBinder (Bndr _ tcb_vis) = isVisibleTcbVis tcb_vis  isVisibleTcbVis :: TyConBndrVis -> Bool-isVisibleTcbVis (NamedTCB vis) = isVisibleArgFlag vis-isVisibleTcbVis AnonTCB        = True+isVisibleTcbVis (NamedTCB vis)     = isVisibleArgFlag vis+isVisibleTcbVis (AnonTCB VisArg)   = True+isVisibleTcbVis (AnonTCB InvisArg) = False  isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool -- Works for IfaceTyConBinder too isInvisibleTyConBinder tcb = not (isVisibleTyConBinder tcb) +-- Build the 'tyConKind' from the binders and the result kind.+-- Keep in sync with 'mkTyConKind' in iface/IfaceType. mkTyConKind :: [TyConBinder] -> Kind -> Kind mkTyConKind bndrs res_kind = foldr mk res_kind bndrs   where     mk :: TyConBinder -> Kind -> Kind-    mk (Bndr tv AnonTCB)        k = mkFunKind (varType tv) k-    mk (Bndr tv (NamedTCB vis)) k = mkForAllKind tv vis k+    mk (Bndr tv (AnonTCB af))   k = mkFunTy af (varType tv) k+    mk (Bndr tv (NamedTCB vis)) k = mkForAllTy tv vis k  tyConTyVarBinders :: [TyConBinder]   -- From the TyCon                   -> [TyVarBinder]   -- Suitable for the foralls of a term function@@ -489,7 +496,8 @@    mk_binder (Bndr tv tc_vis) = mkTyVarBinder vis tv       where         vis = case tc_vis of-                AnonTCB           -> Specified+                AnonTCB VisArg    -> Specified+                AnonTCB InvisArg  -> Inferred   -- See Note [AnonTCB InvisArg]                 NamedTCB Required -> Specified                 NamedTCB vis      -> vis @@ -499,7 +507,34 @@   = [ tv | Bndr tv vis <- tyConBinders tc          , isVisibleTcbVis vis ] -{- Note [Building TyVarBinders from TyConBinders]+{- Note [AnonTCB InvisArg]+~~~~~~~~~~~~~~~~~~~~~~~~~~+It's pretty rare to have an (AnonTCB InvisArg) binder.  The+only way it can occur is through equality constraints in kinds. These+can arise in one of two ways:++* In a PromotedDataCon whose kind has an equality constraint:++    'MkT :: forall a b. (a~b) => blah++  See Note [Constraints in kinds] in TyCoRep, and+  Note [Promoted data constructors] in this module.+* In a data type whose kind has an equality constraint, as in the+  following example from #12102:++    data T :: forall a. (IsTypeLit a ~ 'True) => a -> Type++When mapping an (AnonTCB InvisArg) to an ArgFlag, in+tyConBndrVisArgFlag, we use "Inferred" to mean "the user cannot+specify this arguments, even with visible type/kind application;+instead the type checker must fill it in.++We map (AnonTCB VisArg) to Required, of course: the user must+provide it. It would be utterly wrong to do this for constraint+arguments, which is why AnonTCB must have the AnonArgFlag in+the first place.++Note [Building TyVarBinders from TyConBinders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We sometimes need to build the quantified type of a value from the TyConBinders of a type or class.  For that we need not@@ -610,18 +645,21 @@ -}  instance Outputable tv => Outputable (VarBndr tv TyConBndrVis) where-  ppr (Bndr v AnonTCB)              = text "anon" <+> parens (ppr v)-  ppr (Bndr v (NamedTCB Required))  = text "req"  <+> parens (ppr v)-  ppr (Bndr v (NamedTCB Specified)) = text "spec" <+> parens (ppr v)-  ppr (Bndr v (NamedTCB Inferred))  = text "inf"  <+> parens (ppr v)+  ppr (Bndr v bi) = ppr_bi bi <+> parens (ppr v)+    where+      ppr_bi (AnonTCB VisArg)     = text "anon-vis"+      ppr_bi (AnonTCB InvisArg)   = text "anon-invis"+      ppr_bi (NamedTCB Required)  = text "req"+      ppr_bi (NamedTCB Specified) = text "spec"+      ppr_bi (NamedTCB Inferred)  = text "inf"  instance Binary TyConBndrVis where-  put_ bh AnonTCB        = putByte bh 0+  put_ bh (AnonTCB af)   = do { putByte bh 0; put_ bh af }   put_ bh (NamedTCB vis) = do { putByte bh 1; put_ bh vis }    get bh = do { h <- getByte bh               ; case h of-                  0 -> return AnonTCB+                  0 -> do { af  <- get bh; return (AnonTCB af) }                   _ -> do { vis <- get bh; return (NamedTCB vis) } }  @@ -861,26 +899,43 @@          -- See Note [The binders/kind/arity fields of a TyCon]         tyConBinders :: [TyConBinder], -- ^ Full binders-        tyConTyVars  :: [TyVar],          -- ^ TyVar binders-        tyConResKind :: Kind,             -- ^ Result kind-        tyConKind    :: Kind,             -- ^ Kind of this TyCon-        tyConArity   :: Arity,            -- ^ Arity+        tyConTyVars  :: [TyVar],       -- ^ TyVar binders+        tyConResKind :: Kind,          -- ^ Result kind+        tyConKind    :: Kind,          -- ^ Kind of this TyCon+        tyConArity   :: Arity,         -- ^ Arity +          -- NB: the TyConArity of a TcTyCon must match+          -- the number of Required (positional, user-specified)+          -- arguments to the type constructor; see the use+          -- of tyConArity in generaliseTcTyCon+         tcTyConScopedTyVars :: [(Name,TyVar)],-                           -- ^ Scoped tyvars over the tycon's body-                           -- See Note [How TcTyCons work] in TcTyClsDecls-                           -- Order *does* matter: for TcTyCons with a CUSK,-                           -- it's the correct dependency order. For TcTyCons-                           -- without a CUSK, it's the original left-to-right-                           -- that the user wrote. Nec'y for getting Specified-                           -- variables in the right order.-        tcTyConUserTyVars :: SDoc, -- ^ Original, user-written tycon tyvars+          -- ^ Scoped tyvars over the tycon's body+          -- See Note [Scoped tyvars in a TcTyCon]+         tcTyConIsPoly     :: Bool, -- ^ Is this TcTyCon already generalized?          tcTyConFlavour :: TyConFlavour                            -- ^ What sort of 'TyCon' this represents.       }+{- Note [Scoped tyvars in a TcTyCon] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The tcTyConScopedTyVars field records the lexicial-binding connection+between the original, user-specified Name (i.e. thing in scope) and+the TcTyVar that the Name is bound to.++Order *does* matter; the tcTyConScopedTyvars list consists of+     specified_tvs ++ required_tvs++where+   * specified ones first+   * required_tvs the same as tyConTyVars+   * tyConArity = length required_tvs++See also Note [How TcTyCons work] in TcTyClsDecls+-}+ -- | Represents right-hand-sides of 'TyCon's for algebraic types data AlgTyConRhs @@ -937,7 +992,7 @@                         -- shorter than the declared arity of the 'TyCon'.                          -- See Note [Newtype eta]-        nt_co :: CoAxiom Unbranched+        nt_co :: CoAxiom Unbranched,                              -- The axiom coercion that creates the @newtype@                              -- from the representation 'Type'. @@ -945,7 +1000,17 @@                              -- Invariant: arity = #tvs in nt_etad_rhs;                              -- See Note [Newtype eta]                              -- Watch out!  If any newtypes become transparent-                             -- again check Trac #1072.+                             -- again check #1072.+        nt_lev_poly :: Bool+                        -- 'True' if the newtype can be levity polymorphic when+                        -- fully applied to its arguments, 'False' otherwise.+                        -- This can only ever be 'True' with UnliftedNewtypes.+                        --+                        -- Invariant: nt_lev_poly nt = isTypeLevPoly (nt_rhs nt)+                        --+                        -- This is cached to make it cheaper to check if a+                        -- variable binding is levity polymorphic, as used by+                        -- isTcLevPoly.     }  mkSumTyConRhs :: [DataCon] -> AlgTyConRhs@@ -970,6 +1035,7 @@ -- constructor of 'PrimRep'. This data structure allows us to store this -- information right in the 'TyCon'. The other approach would be to look -- up things like @RuntimeRep@'s @PrimRep@ by known-key every time.+-- See also Note [Getting from RuntimeRep to PrimRep] in RepType data RuntimeRepInfo   = NoRRI       -- ^ an ordinary promoted data con   | RuntimeRep ([Type] -> [PrimRep])@@ -1133,13 +1199,21 @@   the DataCon.  Eg. If the data constructor Data.Maybe.Just(unique 78,   say) is promoted to a TyCon whose name is Data.Maybe.Just(unique 78) -* Small note: We promote the *user* type of the DataCon.  Eg+* We promote the *user* type of the DataCon.  Eg      data T = MkT {-# UNPACK #-} !(Bool, Bool)   The promoted kind is-     MkT :: (Bool,Bool) -> T+     'MkT :: (Bool,Bool) -> T   *not*-     MkT :: Bool -> Bool -> T+     'MkT :: Bool -> Bool -> T +* Similarly for GADTs:+     data G a where+       MkG :: forall b. b -> G [b]+  The promoted data constructor has kind+       'MkG :: forall b. b -> G [b]+  *not*+       'MkG :: forall a b. (a ~# [b]) => b -> G a+ Note [Enumeration types] ~~~~~~~~~~~~~~~~~~~~~~~~ We define datatypes with no constructors to *not* be@@ -1158,7 +1232,7 @@       T2 :: T Bool       T3 :: T a What would [T1 ..] be?  [T1,T3] :: T Int? Easiest thing is to exclude them.-See Trac #4528.+See #4528.  Note [Newtype coercions] ~~~~~~~~~~~~~~~~~~~~~~~~@@ -1293,12 +1367,12 @@    number of bits.  It may represent a signed or unsigned integer, a    floating-point value, or an address. -    data Width = W8 | W16 | W32 | W64 | W80 | W128+    data Width = W8 | W16 | W32 | W64  | W128   - Size, which is used in the native code generator, is Width +    floating point information. -   data Size = II8 | II16 | II32 | II64 | FF32 | FF64 | FF80+   data Size = II8 | II16 | II32 | II64 | FF32 | FF64     it is necessary because e.g. the instruction to move a 64-bit float    on x86 (movsd) is different from the instruction to move a 64-bit@@ -1335,28 +1409,35 @@  On the other hand, CmmType includes some "nonsense" values, such as CmmType GcPtrCat W32 on a 64-bit machine.++The PrimRep type is closely related to the user-visible RuntimeRep type.+See Note [RuntimeRep and PrimRep] in RepType.+ -}  -- | A 'PrimRep' is an abstraction of a type.  It contains information that -- the code generator needs in order to pass arguments, return results,--- and store values of this type.+-- and store values of this type. See also Note [RuntimeRep and PrimRep] in RepType+-- and Note [VoidRep] in RepType. data PrimRep   = VoidRep   | LiftedRep   | UnliftedRep   -- ^ Unlifted pointer   | Int8Rep       -- ^ Signed, 8-bit value   | Int16Rep      -- ^ Signed, 16-bit value-  | IntRep        -- ^ Signed, word-sized value-  | WordRep       -- ^ Unsigned, word-sized value+  | Int32Rep      -- ^ Signed, 32-bit value   | Int64Rep      -- ^ Signed, 64 bit value (with 32-bit words only)+  | IntRep        -- ^ Signed, word-sized value   | Word8Rep      -- ^ Unsigned, 8 bit value-  | Word16Rep      -- ^ Unsigned, 16 bit value+  | Word16Rep     -- ^ Unsigned, 16 bit value+  | Word32Rep     -- ^ Unsigned, 32 bit value   | Word64Rep     -- ^ Unsigned, 64 bit value (with 32-bit words only)+  | WordRep       -- ^ Unsigned, word-sized value   | AddrRep       -- ^ A pointer, but /not/ to a Haskell value (use '(Un)liftedRep')   | FloatRep   | DoubleRep   | VecRep Int PrimElemRep  -- ^ A vector-  deriving( Eq, Show )+  deriving( Show )  data PrimElemRep   = Int8ElemRep@@ -1386,6 +1467,23 @@ isGcPtrRep UnliftedRep = True isGcPtrRep _           = False +-- A PrimRep is compatible with another iff one can be coerced to the other.+-- See Note [bad unsafe coercion] in CoreLint for when are two types coercible.+primRepCompatible :: DynFlags -> PrimRep -> PrimRep -> Bool+primRepCompatible dflags rep1 rep2 =+    (isUnboxed rep1 == isUnboxed rep2) &&+    (primRepSizeB dflags rep1 == primRepSizeB dflags rep2) &&+    (primRepIsFloat rep1 == primRepIsFloat rep2)+  where+    isUnboxed = not . isGcPtrRep++-- More general version of `primRepCompatible` for types represented by zero or+-- more than one PrimReps.+primRepsCompatible :: DynFlags -> [PrimRep] -> [PrimRep] -> Bool+primRepsCompatible dflags reps1 reps2 =+    length reps1 == length reps2 &&+    and (zipWith (primRepCompatible dflags) reps1 reps2)+ -- | The size of a 'PrimRep' in bytes. -- -- This applies also when used in a constructor, where we allow packing the@@ -1398,9 +1496,11 @@ primRepSizeB dflags WordRep          = wORD_SIZE dflags primRepSizeB _      Int8Rep          = 1 primRepSizeB _      Int16Rep         = 2+primRepSizeB _      Int32Rep         = 4 primRepSizeB _      Int64Rep         = wORD64_SIZE primRepSizeB _      Word8Rep         = 1 primRepSizeB _      Word16Rep        = 2+primRepSizeB _      Word32Rep        = 4 primRepSizeB _      Word64Rep        = wORD64_SIZE primRepSizeB _      FloatRep         = fLOAT_SIZE primRepSizeB dflags DoubleRep        = dOUBLE_SIZE dflags@@ -1596,7 +1696,6 @@ -- See also Note [Kind checking recursive type and class declarations] -- in TcTyClsDecls. mkTcTyCon :: Name-          -> SDoc                -- ^ user-written tycon tyvars           -> [TyConBinder]           -> Kind                -- ^ /result/ kind only           -> [(Name,TcTyVar)]    -- ^ Scoped type variables;@@ -1604,7 +1703,7 @@           -> Bool                -- ^ Is this TcTyCon generalised already?           -> TyConFlavour        -- ^ What sort of 'TyCon' this represents           -> TyCon-mkTcTyCon name tyvars binders res_kind scoped_tvs poly flav+mkTcTyCon name binders res_kind scoped_tvs poly flav   = TcTyCon { tyConUnique  = getUnique name             , tyConName    = name             , tyConTyVars  = binderVars binders@@ -1614,9 +1713,12 @@             , tyConArity   = length binders             , tcTyConScopedTyVars = scoped_tvs             , tcTyConIsPoly       = poly-            , tcTyConFlavour      = flav-            , tcTyConUserTyVars   = tyvars }+            , tcTyConFlavour      = flav } +-- | No scoped type variables (to be used with mkTcTyCon).+noTcTyConScopedTyVars :: [(Name, TcTyVar)]+noTcTyConScopedTyVars = []+ -- | Create an unlifted primitive 'TyCon', such as @Int#@. mkPrimTyCon :: Name -> [TyConBinder]             -> Kind   -- ^ /result/ kind, never levity-polymorphic@@ -1728,16 +1830,6 @@ isAbstractTyCon (AlgTyCon { algTcRhs = AbstractTyCon }) = True isAbstractTyCon _ = False --- | Make a fake, recovery 'TyCon' from an existing one.--- Used when recovering from errors-makeRecoveryTyCon :: TyCon -> TyCon-makeRecoveryTyCon tc-  = mkTcTyCon (tyConName tc) empty-              (tyConBinders tc) (tyConResKind tc)-              [{- no scoped vars -}]-              True-              (tyConFlavour tc)- -- | Does this 'TyCon' represent something that cannot be defined in Haskell? isPrimTyCon :: TyCon -> Bool isPrimTyCon (PrimTyCon {}) = True@@ -1944,11 +2036,11 @@ --            (T ~N d), (a ~N e) and (b ~N f)? -- Specifically NOT true of synonyms (open and otherwise) ----- It'd be unusual to call mightBeUnsaturatedTyCon on a regular H98+-- It'd be unusual to call mustBeSaturated on a regular H98 -- type synonym, because you should probably have expanded it first -- But regardless, it's not decomposable-mightBeUnsaturatedTyCon :: TyCon -> Bool-mightBeUnsaturatedTyCon = tcFlavourCanBeUnsaturated . tyConFlavour+mustBeSaturated :: TyCon -> Bool+mustBeSaturated = tcFlavourMustBeSaturated . tyConFlavour  -- | Is this an algebraic 'TyCon' declared with the GADT syntax? isGadtSyntaxTyCon :: TyCon -> Bool@@ -2122,7 +2214,7 @@ --   (similar to a @dfun@ does that for a class instance). -- -- * Tuples are implicit iff they have a wired-in name---   (namely: boxed and unboxed tupeles are wired-in and implicit,+--   (namely: boxed and unboxed tuples are wired-in and implicit, --            but constraint tuples are not) isImplicitTyCon :: TyCon -> Bool isImplicitTyCon (FunTyCon {})        = True@@ -2145,14 +2237,27 @@ isTcTyCon (TcTyCon {}) = True isTcTyCon _            = False +setTcTyConKind :: TyCon -> Kind -> TyCon+-- Update the Kind of a TcTyCon+-- The new kind is always a zonked version of its previous+-- kind, so we don't need to update any other fields.+-- See Note [The Purely Kinded Invariant] in TcHsType+setTcTyConKind tc@(TcTyCon {}) kind = tc { tyConKind = kind }+setTcTyConKind tc              _    = pprPanic "setTcTyConKind" (ppr tc)+ -- | Could this TyCon ever be levity-polymorphic when fully applied? -- True is safe. False means we're sure. Does only a quick check -- based on the TyCon's category. -- Precondition: The fully-applied TyCon has kind (TYPE blah) isTcLevPoly :: TyCon -> Bool isTcLevPoly FunTyCon{}           = False-isTcLevPoly (AlgTyCon { algTcParent = UnboxedAlgTyCon _ }) = True-isTcLevPoly AlgTyCon{}           = False+isTcLevPoly (AlgTyCon { algTcParent = parent, algTcRhs = rhs })+  | UnboxedAlgTyCon _ <- parent+  = True+  | NewTyCon { nt_lev_poly = lev_poly } <- rhs+  = lev_poly -- Newtypes can be levity polymorphic with UnliftedNewtypes (#17360)+  | otherwise+  = False isTcLevPoly SynonymTyCon{}       = True isTcLevPoly FamilyTyCon{}        = True isTcLevPoly PrimTyCon{}          = False@@ -2518,19 +2623,19 @@ tyConFlavour (TcTyCon { tcTyConFlavour = flav }) = flav  -- | Can this flavour of 'TyCon' appear unsaturated?-tcFlavourCanBeUnsaturated :: TyConFlavour -> Bool-tcFlavourCanBeUnsaturated ClassFlavour            = True-tcFlavourCanBeUnsaturated DataTypeFlavour         = True-tcFlavourCanBeUnsaturated NewtypeFlavour          = True-tcFlavourCanBeUnsaturated DataFamilyFlavour{}     = True-tcFlavourCanBeUnsaturated TupleFlavour{}          = True-tcFlavourCanBeUnsaturated SumFlavour              = True-tcFlavourCanBeUnsaturated AbstractTypeFlavour     = True-tcFlavourCanBeUnsaturated BuiltInTypeFlavour      = True-tcFlavourCanBeUnsaturated PromotedDataConFlavour  = True-tcFlavourCanBeUnsaturated TypeSynonymFlavour      = False-tcFlavourCanBeUnsaturated OpenTypeFamilyFlavour{} = False-tcFlavourCanBeUnsaturated ClosedTypeFamilyFlavour = False+tcFlavourMustBeSaturated :: TyConFlavour -> Bool+tcFlavourMustBeSaturated ClassFlavour            = False+tcFlavourMustBeSaturated DataTypeFlavour         = False+tcFlavourMustBeSaturated NewtypeFlavour          = False+tcFlavourMustBeSaturated DataFamilyFlavour{}     = False+tcFlavourMustBeSaturated TupleFlavour{}          = False+tcFlavourMustBeSaturated SumFlavour              = False+tcFlavourMustBeSaturated AbstractTypeFlavour     = False+tcFlavourMustBeSaturated BuiltInTypeFlavour      = False+tcFlavourMustBeSaturated PromotedDataConFlavour  = False+tcFlavourMustBeSaturated TypeSynonymFlavour      = True+tcFlavourMustBeSaturated OpenTypeFamilyFlavour{} = True+tcFlavourMustBeSaturated ClosedTypeFamilyFlavour = True  -- | Is this flavour of 'TyCon' an open type family or a data family? tcFlavourIsOpen :: TyConFlavour -> Bool@@ -2611,7 +2716,7 @@ More precisely, we keep a *count* of how many times we've seen it. This is to account for    data instance T (a,b) = MkT (T a) (T b)-Then (Trac #10482) if we have a type like+Then (#10482) if we have a type like         T (Int,(Int,(Int,(Int,Int)))) we can still unbox deeply enough during strictness analysis. We have to treat T as potentially recursive, but it's still
types/Type.hs view
@@ -14,3072 +14,3196 @@         -- $type_classification          -- $representation_types-        TyThing(..), Type, ArgFlag(..), KindOrType, PredType, ThetaType,-        Var, TyVar, isTyVar, TyCoVar, TyCoBinder, TyCoVarBinder, TyVarBinder,-        KnotTied,--        -- ** Constructing and deconstructing types-        mkTyVarTy, mkTyVarTys, getTyVar, getTyVar_maybe, repGetTyVar_maybe,-        getCastedTyVar_maybe, tyVarKind, varType,--        mkAppTy, mkAppTys, splitAppTy, splitAppTys, repSplitAppTys,-        splitAppTy_maybe, repSplitAppTy_maybe, tcRepSplitAppTy_maybe,--        mkFunTy, mkFunTys, splitFunTy, splitFunTy_maybe,-        splitFunTys, funResultTy, funArgTy,--        mkTyConApp, mkTyConTy,-        tyConAppTyCon_maybe, tyConAppTyConPicky_maybe,-        tyConAppArgs_maybe, tyConAppTyCon, tyConAppArgs,-        splitTyConApp_maybe, splitTyConApp, tyConAppArgN, nextRole,-        tcRepSplitTyConApp_maybe, tcRepSplitTyConApp, tcSplitTyConApp_maybe,-        splitListTyConApp_maybe,-        repSplitTyConApp_maybe,--        mkForAllTy, mkForAllTys, mkTyCoInvForAllTys, mkSpecForAllTys,-        mkVisForAllTys, mkTyCoInvForAllTy,-        mkInvForAllTy, mkInvForAllTys,-        splitForAllTys, splitForAllVarBndrs,-        splitForAllTy_maybe, splitForAllTy,-        splitForAllTy_ty_maybe, splitForAllTy_co_maybe,-        splitPiTy_maybe, splitPiTy, splitPiTys,-        mkTyCoPiTy, mkTyCoPiTys, mkTyConBindersPreferAnon,-        mkPiTys,-        mkLamType, mkLamTypes,-        piResultTy, piResultTys,-        applyTysX, dropForAlls,--        mkNumLitTy, isNumLitTy,-        mkStrLitTy, isStrLitTy,-        isLitTy,--        getRuntimeRep_maybe, kindRep_maybe, kindRep,--        mkCastTy, mkCoercionTy, splitCastTy_maybe,--        userTypeError_maybe, pprUserTypeErrorTy,--        coAxNthLHS,-        stripCoercionTy, splitCoercionType_maybe,--        splitPiTysInvisible, splitPiTysInvisibleN,-        invisibleTyBndrCount,-        filterOutInvisibleTypes, filterOutInferredTypes,-        partitionInvisibleTypes, partitionInvisibles,-        tyConArgFlags, appTyArgFlags,-        synTyConResKind,--        modifyJoinResTy, setJoinResTy,--        -- Analyzing types-        TyCoMapper(..), mapType, mapCoercion,--        -- (Newtypes)-        newTyConInstRhs,--        -- Pred types-        mkFamilyTyConApp,-        isDictLikeTy,-        mkPrimEqPred, mkReprPrimEqPred, mkPrimEqPredRole,-        equalityTyCon,-        mkHeteroPrimEqPred, mkHeteroReprPrimEqPred,-        mkClassPred,-        isClassPred, isEqPred, isNomEqPred,-        isIPPred, isIPPred_maybe, isIPTyCon, isIPClass,-        isCTupleClass,--        -- Deconstructing predicate types-        PredTree(..), EqRel(..), eqRelRole, classifyPredType,-        getClassPredTys, getClassPredTys_maybe,-        getEqPredTys, getEqPredTys_maybe, getEqPredRole,-        predTypeEqRel,--        -- ** Binders-        sameVis,-        mkTyCoVarBinder, mkTyCoVarBinders,-        mkTyVarBinders,-        mkAnonBinder,-        isAnonTyCoBinder,-        binderVar, binderVars, binderType, binderArgFlag,-        tyCoBinderType, tyCoBinderVar_maybe,-        tyBinderType,-        binderRelevantType_maybe, caseBinder,-        isVisibleArgFlag, isInvisibleArgFlag, isVisibleBinder,-        isInvisibleBinder, isNamedBinder,-        tyConBindersTyCoBinders,--        -- ** Common type constructors-        funTyCon,--        -- ** Predicates on types-        isTyVarTy, isFunTy, isDictTy, isPredTy, isCoercionTy,-        isCoercionTy_maybe, isForAllTy,-        isForAllTy_ty, isForAllTy_co,-        isPiTy, isTauTy, isFamFreeTy,-        isCoVarType, isEvVarType,--        isValidJoinPointType,--        -- (Lifting and boxity)-        isLiftedType_maybe, isUnliftedType, isUnboxedTupleType, isUnboxedSumType,-        isAlgType, isDataFamilyAppType,-        isPrimitiveType, isStrictType,-        isRuntimeRepTy, isRuntimeRepVar, isRuntimeRepKindedTy,-        dropRuntimeRepArgs,-        getRuntimeRep,--        -- * Main data types representing Kinds-        Kind,--        -- ** Finding the kind of a type-        typeKind, tcTypeKind, isTypeLevPoly, resultIsLevPoly,-        tcIsLiftedTypeKind, tcIsConstraintKind, tcReturnsConstraintKind,--        -- ** Common Kind-        liftedTypeKind,--        -- * Type free variables-        tyCoFVsOfType, tyCoFVsBndr, tyCoFVsVarBndr, tyCoFVsVarBndrs,-        tyCoVarsOfType, tyCoVarsOfTypes,-        tyCoVarsOfTypeDSet,-        coVarsOfType,-        coVarsOfTypes,-        closeOverKindsDSet, closeOverKindsFV, closeOverKindsList,-        closeOverKinds,--        noFreeVarsOfType,-        splitVisVarsOfType, splitVisVarsOfTypes,-        expandTypeSynonyms,-        typeSize, occCheckExpand,--        -- * Well-scoped lists of variables-        dVarSetElemsWellScoped, scopedSort, tyCoVarsOfTypeWellScoped,-        tyCoVarsOfTypesWellScoped, tyCoVarsOfBindersWellScoped,--        -- * Type comparison-        eqType, eqTypeX, eqTypes, nonDetCmpType, nonDetCmpTypes, nonDetCmpTypeX,-        nonDetCmpTypesX, nonDetCmpTc,-        eqVarBndrs,--        -- * Forcing evaluation of types-        seqType, seqTypes,--        -- * Other views onto Types-        coreView, tcView,--        tyConsOfType,--        -- * Main type substitution data types-        TvSubstEnv,     -- Representation widely visible-        TCvSubst(..),    -- Representation visible to a few friends--        -- ** Manipulating type substitutions-        emptyTvSubstEnv, emptyTCvSubst, mkEmptyTCvSubst,--        mkTCvSubst, zipTvSubst, mkTvSubstPrs,-        zipTCvSubst,-        notElemTCvSubst,-        getTvSubstEnv, setTvSubstEnv,-        zapTCvSubst, getTCvInScope, getTCvSubstRangeFVs,-        extendTCvInScope, extendTCvInScopeList, extendTCvInScopeSet,-        extendTCvSubst, extendCvSubst,-        extendTvSubst, extendTvSubstBinderAndInScope,-        extendTvSubstList, extendTvSubstAndInScope,-        extendTCvSubstList,-        extendTvSubstWithClone,-        extendTCvSubstWithClone,-        isInScope, composeTCvSubstEnv, composeTCvSubst, zipTyEnv, zipCoEnv,-        isEmptyTCvSubst, unionTCvSubst,--        -- ** Performing substitution on types and kinds-        substTy, substTys, substTyWith, substTysWith, substTheta,-        substTyAddInScope,-        substTyUnchecked, substTysUnchecked, substThetaUnchecked,-        substTyWithUnchecked,-        substCoUnchecked, substCoWithUnchecked,-        substTyVarBndr, substTyVarBndrs, substTyVar, substTyVars,-        substVarBndr, substVarBndrs,-        cloneTyVarBndr, cloneTyVarBndrs, lookupTyVar,--        -- * Pretty-printing-        pprType, pprParendType, pprPrecType,-        pprTypeApp, pprTyThingCategory, pprShortTyThing,-        pprTCvBndr, pprTCvBndrs, pprForAll, pprUserForAll,-        pprSigmaType, pprWithExplicitKindsWhen,-        pprTheta, pprThetaArrowTy, pprClassPred,-        pprKind, pprParendKind, pprSourceTyCon,-        PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen,-        pprTyVar, pprTyVars,-        pprWithTYPE,--        -- * Tidying type related things up for printing-        tidyType,      tidyTypes,-        tidyOpenType,  tidyOpenTypes,-        tidyOpenKind,-        tidyVarBndr, tidyVarBndrs, tidyFreeTyCoVars,-        tidyOpenTyCoVar, tidyOpenTyCoVars,-        tidyTyCoVarOcc,-        tidyTopType,-        tidyKind,-        tidyTyCoVarBinder, tidyTyCoVarBinders-    ) where--#include "HsVersions.h"--import GhcPrelude--import BasicTypes---- We import the representation and primitive functions from TyCoRep.--- Many things are reexported, but not the representation!--import Kind-import TyCoRep---- friends:-import Var-import VarEnv-import VarSet-import UniqSet--import Class-import TyCon-import TysPrim-import {-# SOURCE #-} TysWiredIn ( listTyCon, typeNatKind, unitTy-                                 , typeSymbolKind, liftedTypeKind-                                 , constraintKind )-import PrelNames-import CoAxiom-import {-# SOURCE #-} Coercion( mkNomReflCo, mkGReflCo, mkReflCo-                              , mkTyConAppCo, mkAppCo, mkCoVarCo, mkAxiomRuleCo-                              , mkForAllCo, mkFunCo, mkAxiomInstCo, mkUnivCo-                              , mkSymCo, mkTransCo, mkNthCo, mkLRCo, mkInstCo-                              , mkKindCo, mkSubCo, mkFunCo, mkAxiomInstCo-                              , decomposePiCos, coercionKind, coercionType-                              , isReflexiveCo, seqCo )---- others-import Util-import FV-import Outputable-import FastString-import Pair-import DynFlags  ( gopt_set, GeneralFlag(Opt_PrintExplicitRuntimeReps) )-import ListSetOps-import Unique ( nonDetCmpUnique )--import Maybes           ( orElse )-import Data.Maybe       ( isJust )-import Control.Monad    ( guard )---- $type_classification--- #type_classification#------ Types are one of:------ [Unboxed]            Iff its representation is other than a pointer---                      Unboxed types are also unlifted.------ [Lifted]             Iff it has bottom as an element.---                      Closures always have lifted types: i.e. any---                      let-bound identifier in Core must have a lifted---                      type. Operationally, a lifted object is one that---                      can be entered.---                      Only lifted types may be unified with a type variable.------ [Algebraic]          Iff it is a type with one or more constructors, whether---                      declared with @data@ or @newtype@.---                      An algebraic type is one that can be deconstructed---                      with a case expression. This is /not/ the same as---                      lifted types, because we also include unboxed---                      tuples in this classification.------ [Data]               Iff it is a type declared with @data@, or a boxed tuple.------ [Primitive]          Iff it is a built-in type that can't be expressed in Haskell.------ Currently, all primitive types are unlifted, but that's not necessarily--- the case: for example, @Int@ could be primitive.------ Some primitive types are unboxed, such as @Int#@, whereas some are boxed--- but unlifted (such as @ByteArray#@).  The only primitive types that we--- classify as algebraic are the unboxed tuples.------ Some examples of type classifications that may make this a bit clearer are:------ @--- Type          primitive       boxed           lifted          algebraic--- -------------------------------------------------------------------------------- Int#          Yes             No              No              No--- ByteArray#    Yes             Yes             No              No--- (\# a, b \#)  Yes             No              No              Yes--- (\# a | b \#) Yes             No              No              Yes--- (  a, b  )    No              Yes             Yes             Yes--- [a]           No              Yes             Yes             Yes--- @---- $representation_types--- A /source type/ is a type that is a separate type as far as the type checker is--- concerned, but which has a more low-level representation as far as Core-to-Core--- passes and the rest of the back end is concerned.------ You don't normally have to worry about this, as the utility functions in--- this module will automatically convert a source into a representation type--- if they are spotted, to the best of its abilities. If you don't want this--- to happen, use the equivalent functions from the "TcType" module.--{--************************************************************************-*                                                                      *-                Type representation-*                                                                      *-************************************************************************--Note [coreView vs tcView]-~~~~~~~~~~~~~~~~~~~~~~~~~-So far as the typechecker is concerned, 'Constraint' and 'TYPE-LiftedRep' are distinct kinds.--But in Core these two are treated as identical.--We implement this by making 'coreView' convert 'Constraint' to 'TYPE-LiftedRep' on the fly.  The function tcView (used in the type checker)-does not do this.--See also Trac #11715, which tracks removing this inconsistency.---}---- | Gives the typechecker view of a type. This unwraps synonyms but--- leaves 'Constraint' alone. c.f. coreView, which turns Constraint into--- TYPE LiftedRep. Returns Nothing if no unwrapping happens.--- See also Note [coreView vs tcView]-{-# INLINE tcView #-}-tcView :: Type -> Maybe Type-tcView (TyConApp tc tys) | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys-  = Just (mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys')-               -- The free vars of 'rhs' should all be bound by 'tenv', so it's-               -- ok to use 'substTy' here.-               -- See also Note [The substitution invariant] in TyCoRep.-               -- Its important to use mkAppTys, rather than (foldl AppTy),-               -- because the function part might well return a-               -- partially-applied type constructor; indeed, usually will!-tcView _ = Nothing--{-# INLINE coreView #-}-coreView :: Type -> Maybe Type--- ^ This function Strips off the /top layer only/ of a type synonym--- application (if any) its underlying representation type.--- Returns Nothing if there is nothing to look through.--- This function considers 'Constraint' to be a synonym of @TYPE LiftedRep@.------ By being non-recursive and inlined, this case analysis gets efficiently--- joined onto the case analysis that the caller is already doing-coreView ty@(TyConApp tc tys)-  | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys-  = Just (mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys')-    -- This equation is exactly like tcView--  -- At the Core level, Constraint = Type-  -- See Note [coreView vs tcView]-  | isConstraintKindCon tc-  = ASSERT2( null tys, ppr ty )-    Just liftedTypeKind--coreView _ = Nothing--------------------------------------------------expandTypeSynonyms :: Type -> Type--- ^ Expand out all type synonyms.  Actually, it'd suffice to expand out--- just the ones that discard type variables (e.g.  type Funny a = Int)--- But we don't know which those are currently, so we just expand all.------ 'expandTypeSynonyms' only expands out type synonyms mentioned in the type,--- not in the kinds of any TyCon or TyVar mentioned in the type.------ Keep this synchronized with 'synonymTyConsOfType'-expandTypeSynonyms ty-  = go (mkEmptyTCvSubst in_scope) ty-  where-    in_scope = mkInScopeSet (tyCoVarsOfType ty)--    go subst (TyConApp tc tys)-      | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc expanded_tys-      = let subst' = mkTvSubst in_scope (mkVarEnv tenv)-            -- Make a fresh substitution; rhs has nothing to-            -- do with anything that has happened so far-            -- NB: if you make changes here, be sure to build an-            --     /idempotent/ substitution, even in the nested case-            --        type T a b = a -> b-            --        type S x y = T y x-            -- (Trac #11665)-        in  mkAppTys (go subst' rhs) tys'-      | otherwise-      = TyConApp tc expanded_tys-      where-        expanded_tys = (map (go subst) tys)--    go _     (LitTy l)     = LitTy l-    go subst (TyVarTy tv)  = substTyVar subst tv-    go subst (AppTy t1 t2) = mkAppTy (go subst t1) (go subst t2)-    go subst (FunTy arg res)-      = mkFunTy (go subst arg) (go subst res)-    go subst (ForAllTy (Bndr tv vis) t)-      = let (subst', tv') = substVarBndrUsing go subst tv in-        ForAllTy (Bndr tv' vis) (go subst' t)-    go subst (CastTy ty co)  = mkCastTy (go subst ty) (go_co subst co)-    go subst (CoercionTy co) = mkCoercionTy (go_co subst co)--    go_mco _     MRefl    = MRefl-    go_mco subst (MCo co) = MCo (go_co subst co)--    go_co subst (Refl ty)-      = mkNomReflCo (go subst ty)-    go_co subst (GRefl r ty mco)-      = mkGReflCo r (go subst ty) (go_mco subst mco)-       -- NB: coercions are always expanded upon creation-    go_co subst (TyConAppCo r tc args)-      = mkTyConAppCo r tc (map (go_co subst) args)-    go_co subst (AppCo co arg)-      = mkAppCo (go_co subst co) (go_co subst arg)-    go_co subst (ForAllCo tv kind_co co)-      = let (subst', tv', kind_co') = go_cobndr subst tv kind_co in-        mkForAllCo tv' kind_co' (go_co subst' co)-    go_co subst (FunCo r co1 co2)-      = mkFunCo r (go_co subst co1) (go_co subst co2)-    go_co subst (CoVarCo cv)-      = substCoVar subst cv-    go_co subst (AxiomInstCo ax ind args)-      = mkAxiomInstCo ax ind (map (go_co subst) args)-    go_co subst (UnivCo p r t1 t2)-      = mkUnivCo (go_prov subst p) r (go subst t1) (go subst t2)-    go_co subst (SymCo co)-      = mkSymCo (go_co subst co)-    go_co subst (TransCo co1 co2)-      = mkTransCo (go_co subst co1) (go_co subst co2)-    go_co subst (NthCo r n co)-      = mkNthCo r n (go_co subst co)-    go_co subst (LRCo lr co)-      = mkLRCo lr (go_co subst co)-    go_co subst (InstCo co arg)-      = mkInstCo (go_co subst co) (go_co subst arg)-    go_co subst (KindCo co)-      = mkKindCo (go_co subst co)-    go_co subst (SubCo co)-      = mkSubCo (go_co subst co)-    go_co subst (AxiomRuleCo ax cs)-      = AxiomRuleCo ax (map (go_co subst) cs)-    go_co _ (HoleCo h)-      = pprPanic "expandTypeSynonyms hit a hole" (ppr h)--    go_prov _     UnsafeCoerceProv    = UnsafeCoerceProv-    go_prov subst (PhantomProv co)    = PhantomProv (go_co subst co)-    go_prov subst (ProofIrrelProv co) = ProofIrrelProv (go_co subst co)-    go_prov _     p@(PluginProv _)    = p--      -- the "False" and "const" are to accommodate the type of-      -- substForAllCoBndrUsing, which is general enough to-      -- handle coercion optimization (which sometimes swaps the-      -- order of a coercion)-    go_cobndr subst = substForAllCoBndrUsing False (go_co subst) subst--{--************************************************************************-*                                                                      *-   Analyzing types-*                                                                      *-************************************************************************--These functions do a map-like operation over types, performing some operation-on all variables and binding sites. Primarily used for zonking.--Note [Efficiency for mapCoercion ForAllCo case]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As noted in Note [Forall coercions] in TyCoRep, a ForAllCo is a bit redundant.-It stores a TyCoVar and a Coercion, where the kind of the TyCoVar always matches-the left-hand kind of the coercion. This is convenient lots of the time, but-not when mapping a function over a coercion.--The problem is that tcm_tybinder will affect the TyCoVar's kind and-mapCoercion will affect the Coercion, and we hope that the results will be-the same. Even if they are the same (which should generally happen with-correct algorithms), then there is an efficiency issue. In particular,-this problem seems to make what should be a linear algorithm into a potentially-exponential one. But it's only going to be bad in the case where there's-lots of foralls in the kinds of other foralls. Like this:--  forall a : (forall b : (forall c : ...). ...). ...--This construction seems unlikely. So we'll do the inefficient, easy way-for now.--Note [Specialising mappers]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-These INLINABLE pragmas are indispensable. mapType/mapCoercion are used-to implement zonking, and it's vital that they get specialised to the TcM-monad. This specialisation happens automatically (that is, without a-SPECIALISE pragma) as long as the definitions are INLINABLE. For example,-this one change made a 20% allocation difference in perf/compiler/T5030.---}---- | This describes how a "map" operation over a type/coercion should behave-data TyCoMapper env m-  = TyCoMapper-      { tcm_smart :: Bool -- ^ Should the new type be created with smart-                          -- constructors?-      , tcm_tyvar :: env -> TyVar -> m Type-      , tcm_covar :: env -> CoVar -> m Coercion-      , tcm_hole  :: env -> CoercionHole -> m Coercion-          -- ^ What to do with coercion holes.-          -- See Note [Coercion holes] in TyCoRep.--      , tcm_tycobinder :: env -> TyCoVar -> ArgFlag -> m (env, TyCoVar)-          -- ^ The returned env is used in the extended scope--      , tcm_tycon :: TyCon -> m TyCon-          -- ^ This is used only to turn 'TcTyCon's into 'TyCon's.-          -- See Note [Type checking recursive type and class declarations]-          -- in TcTyClsDecls-      }--{-# INLINABLE mapType #-}  -- See Note [Specialising mappers]-mapType :: Monad m => TyCoMapper env m -> env -> Type -> m Type-mapType mapper@(TyCoMapper { tcm_smart = smart, tcm_tyvar = tyvar-                           , tcm_tycobinder = tycobinder, tcm_tycon = tycon })-        env ty-  = go ty-  where-    go (TyVarTy tv) = tyvar env tv-    go (AppTy t1 t2) = mkappty <$> go t1 <*> go t2-    go t@(TyConApp tc []) | not (isTcTyCon tc)-                          = return t  -- avoid allocation in this exceedingly-                                      -- common case (mostly, for *)-    go (TyConApp tc tys)-      = do { tc' <- tycon tc-           ; mktyconapp tc' <$> mapM go tys }-    go (FunTy arg res)   = FunTy <$> go arg <*> go res-    go (ForAllTy (Bndr tv vis) inner)-      = do { (env', tv') <- tycobinder env tv vis-           ; inner' <- mapType mapper env' inner-           ; return $ ForAllTy (Bndr tv' vis) inner' }-    go ty@(LitTy {})   = return ty-    go (CastTy ty co)  = mkcastty <$> go ty <*> mapCoercion mapper env co-    go (CoercionTy co) = CoercionTy <$> mapCoercion mapper env co--    (mktyconapp, mkappty, mkcastty)-      | smart     = (mkTyConApp, mkAppTy, mkCastTy)-      | otherwise = (TyConApp,   AppTy,   CastTy)--{-# INLINABLE mapCoercion #-}  -- See Note [Specialising mappers]-mapCoercion :: Monad m-            => TyCoMapper env m -> env -> Coercion -> m Coercion-mapCoercion mapper@(TyCoMapper { tcm_smart = smart, tcm_covar = covar-                               , tcm_hole = cohole, tcm_tycobinder = tycobinder-                               , tcm_tycon = tycon })-            env co-  = go co-  where-    go_mco MRefl    = return MRefl-    go_mco (MCo co) = MCo <$> (go co)--    go (Refl ty) = Refl <$> mapType mapper env ty-    go (GRefl r ty mco) = mkgreflco r <$> mapType mapper env ty <*> (go_mco mco)-    go (TyConAppCo r tc args)-      = do { tc' <- tycon tc-           ; mktyconappco r tc' <$> mapM go args }-    go (AppCo c1 c2) = mkappco <$> go c1 <*> go c2-    go (ForAllCo tv kind_co co)-      = do { kind_co' <- go kind_co-           ; (env', tv') <- tycobinder env tv Inferred-           ; co' <- mapCoercion mapper env' co-           ; return $ mkforallco tv' kind_co' co' }-        -- See Note [Efficiency for mapCoercion ForAllCo case]-    go (FunCo r c1 c2) = mkFunCo r <$> go c1 <*> go c2-    go (CoVarCo cv) = covar env cv-    go (AxiomInstCo ax i args)-      = mkaxiominstco ax i <$> mapM go args-    go (HoleCo hole) = cohole env hole-    go (UnivCo p r t1 t2)-      = mkunivco <$> go_prov p <*> pure r-                 <*> mapType mapper env t1 <*> mapType mapper env t2-    go (SymCo co) = mksymco <$> go co-    go (TransCo c1 c2) = mktransco <$> go c1 <*> go c2-    go (AxiomRuleCo r cos) = AxiomRuleCo r <$> mapM go cos-    go (NthCo r i co)      = mknthco r i <$> go co-    go (LRCo lr co)        = mklrco lr <$> go co-    go (InstCo co arg)     = mkinstco <$> go co <*> go arg-    go (KindCo co)         = mkkindco <$> go co-    go (SubCo co)          = mksubco <$> go co--    go_prov UnsafeCoerceProv    = return UnsafeCoerceProv-    go_prov (PhantomProv co)    = PhantomProv <$> go co-    go_prov (ProofIrrelProv co) = ProofIrrelProv <$> go co-    go_prov p@(PluginProv _)    = return p--    ( mktyconappco, mkappco, mkaxiominstco, mkunivco-      , mksymco, mktransco, mknthco, mklrco, mkinstco-      , mkkindco, mksubco, mkforallco, mkgreflco)-      | smart-      = ( mkTyConAppCo, mkAppCo, mkAxiomInstCo, mkUnivCo-        , mkSymCo, mkTransCo, mkNthCo, mkLRCo, mkInstCo-        , mkKindCo, mkSubCo, mkForAllCo, mkGReflCo )-      | otherwise-      = ( TyConAppCo, AppCo, AxiomInstCo, UnivCo-        , SymCo, TransCo, NthCo, LRCo, InstCo-        , KindCo, SubCo, ForAllCo, GRefl )--{--************************************************************************-*                                                                      *-\subsection{Constructor-specific functions}-*                                                                      *-************************************************************************-------------------------------------------------------------------------                                TyVarTy-                                ~~~~~~~--}---- | Attempts to obtain the type variable underlying a 'Type', and panics with the--- given message if this is not a type variable type. See also 'getTyVar_maybe'-getTyVar :: String -> Type -> TyVar-getTyVar msg ty = case getTyVar_maybe ty of-                    Just tv -> tv-                    Nothing -> panic ("getTyVar: " ++ msg)--isTyVarTy :: Type -> Bool-isTyVarTy ty = isJust (getTyVar_maybe ty)---- | Attempts to obtain the type variable underlying a 'Type'-getTyVar_maybe :: Type -> Maybe TyVar-getTyVar_maybe ty | Just ty' <- coreView ty = getTyVar_maybe ty'-                  | otherwise               = repGetTyVar_maybe ty---- | If the type is a tyvar, possibly under a cast, returns it, along--- with the coercion. Thus, the co is :: kind tv ~N kind ty-getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)-getCastedTyVar_maybe ty | Just ty' <- coreView ty = getCastedTyVar_maybe ty'-getCastedTyVar_maybe (CastTy (TyVarTy tv) co)     = Just (tv, co)-getCastedTyVar_maybe (TyVarTy tv)-  = Just (tv, mkReflCo Nominal (tyVarKind tv))-getCastedTyVar_maybe _                            = Nothing---- | Attempts to obtain the type variable underlying a 'Type', without--- any expansion-repGetTyVar_maybe :: Type -> Maybe TyVar-repGetTyVar_maybe (TyVarTy tv) = Just tv-repGetTyVar_maybe _            = Nothing--{------------------------------------------------------------------------                                AppTy-                                ~~~~~-We need to be pretty careful with AppTy to make sure we obey the-invariant that a TyConApp is always visibly so.  mkAppTy maintains the-invariant: use it.--Note [Decomposing fat arrow c=>t]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Can we unify (a b) with (Eq a => ty)?   If we do so, we end up with-a partial application like ((=>) Eq a) which doesn't make sense in-source Haskell.  In contrast, we *can* unify (a b) with (t1 -> t2).-Here's an example (Trac #9858) of how you might do it:-   i :: (Typeable a, Typeable b) => Proxy (a b) -> TypeRep-   i p = typeRep p--   j = i (Proxy :: Proxy (Eq Int => Int))-The type (Proxy (Eq Int => Int)) is only accepted with -XImpredicativeTypes,-but suppose we want that.  But then in the call to 'i', we end-up decomposing (Eq Int => Int), and we definitely don't want that.--This really only applies to the type checker; in Core, '=>' and '->'-are the same, as are 'Constraint' and '*'.  But for now I've put-the test in repSplitAppTy_maybe, which applies throughout, because-the other calls to splitAppTy are in Unify, which is also used by-the type checker (e.g. when matching type-function equations).---}---- | Applies a type to another, as in e.g. @k a@-mkAppTy :: Type -> Type -> Type-  -- See Note [Respecting definitional equality], invariant (EQ1).-mkAppTy (CastTy fun_ty co) arg_ty-  | ([arg_co], res_co) <- decomposePiCos co (coercionKind co) [arg_ty]-  = (fun_ty `mkAppTy` (arg_ty `mkCastTy` arg_co)) `mkCastTy` res_co--mkAppTy (TyConApp tc tys) ty2 = mkTyConApp tc (tys ++ [ty2])-mkAppTy ty1               ty2 = AppTy ty1 ty2-        -- Note that the TyConApp could be an-        -- under-saturated type synonym.  GHC allows that; e.g.-        --      type Foo k = k a -> k a-        --      type Id x = x-        --      foo :: Foo Id -> Foo Id-        ---        -- Here Id is partially applied in the type sig for Foo,-        -- but once the type synonyms are expanded all is well--mkAppTys :: Type -> [Type] -> Type-mkAppTys ty1                []   = ty1-mkAppTys (CastTy fun_ty co) arg_tys  -- much more efficient then nested mkAppTy-                                     -- Why do this? See (EQ1) of-                                     -- Note [Respecting definitional equality]-                                     -- in TyCoRep-  = foldl' AppTy ((mkAppTys fun_ty casted_arg_tys) `mkCastTy` res_co) leftovers-  where-    (arg_cos, res_co) = decomposePiCos co (coercionKind co) arg_tys-    (args_to_cast, leftovers) = splitAtList arg_cos arg_tys-    casted_arg_tys = zipWith mkCastTy args_to_cast arg_cos-mkAppTys (TyConApp tc tys1) tys2 = mkTyConApp tc (tys1 ++ tys2)-mkAppTys ty1                tys2 = foldl' AppTy ty1 tys2----------------splitAppTy_maybe :: Type -> Maybe (Type, Type)--- ^ Attempt to take a type application apart, whether it is a--- function, type constructor, or plain type application. Note--- that type family applications are NEVER unsaturated by this!-splitAppTy_maybe ty | Just ty' <- coreView ty-                    = splitAppTy_maybe ty'-splitAppTy_maybe ty = repSplitAppTy_maybe ty----------------repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type,Type)--- ^ Does the AppTy split as in 'splitAppTy_maybe', but assumes that--- any Core view stuff is already done-repSplitAppTy_maybe (FunTy ty1 ty2)-  = Just (TyConApp funTyCon [rep1, rep2, ty1], ty2)-  where-    rep1 = getRuntimeRep ty1-    rep2 = getRuntimeRep ty2--repSplitAppTy_maybe (AppTy ty1 ty2)-  = Just (ty1, ty2)--repSplitAppTy_maybe (TyConApp tc tys)-  | mightBeUnsaturatedTyCon tc || tys `lengthExceeds` tyConArity tc-  , Just (tys', ty') <- snocView tys-  = Just (TyConApp tc tys', ty')    -- Never create unsaturated type family apps!--repSplitAppTy_maybe _other = Nothing---- This one doesn't break apart (c => t).--- See Note [Decomposing fat arrow c=>t]--- Defined here to avoid module loops between Unify and TcType.-tcRepSplitAppTy_maybe :: Type -> Maybe (Type,Type)--- ^ Does the AppTy split as in 'tcSplitAppTy_maybe', but assumes that--- any coreView stuff is already done. Refuses to look through (c => t)-tcRepSplitAppTy_maybe (FunTy ty1 ty2)-  | isPredTy ty1-  = Nothing  -- See Note [Decomposing fat arrow c=>t]--  | otherwise-  = Just (TyConApp funTyCon [rep1, rep2, ty1], ty2)-  where-    rep1 = getRuntimeRep ty1-    rep2 = getRuntimeRep ty2--tcRepSplitAppTy_maybe (AppTy ty1 ty2)    = Just (ty1, ty2)-tcRepSplitAppTy_maybe (TyConApp tc tys)-  | mightBeUnsaturatedTyCon tc || tys `lengthExceeds` tyConArity tc-  , Just (tys', ty') <- snocView tys-  = Just (TyConApp tc tys', ty')    -- Never create unsaturated type family apps!-tcRepSplitAppTy_maybe _other = Nothing---- | Like 'tcSplitTyConApp_maybe' but doesn't look through type synonyms.-tcRepSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])--- Defined here to avoid module loops between Unify and TcType.-tcRepSplitTyConApp_maybe (TyConApp tc tys)-  = Just (tc, tys)--tcRepSplitTyConApp_maybe (FunTy arg res)-  = Just (funTyCon, [arg_rep, res_rep, arg, res])-  where-    arg_rep = getRuntimeRep arg-    res_rep = getRuntimeRep res--tcRepSplitTyConApp_maybe _-  = Nothing---- | Like 'tcSplitTyConApp' but doesn't look through type synonyms.-tcRepSplitTyConApp :: HasCallStack => Type -> (TyCon, [Type])--- Defined here to avoid module loops between Unify and TcType.-tcRepSplitTyConApp ty =-  case tcRepSplitTyConApp_maybe ty of-    Just stuff -> stuff-    Nothing    -> pprPanic "tcRepSplitTyConApp" (ppr ty)----------------splitAppTy :: Type -> (Type, Type)--- ^ Attempts to take a type application apart, as in 'splitAppTy_maybe',--- and panics if this is not possible-splitAppTy ty = case splitAppTy_maybe ty of-                Just pr -> pr-                Nothing -> panic "splitAppTy"----------------splitAppTys :: Type -> (Type, [Type])--- ^ Recursively splits a type as far as is possible, leaving a residual--- type being applied to and the type arguments applied to it. Never fails,--- even if that means returning an empty list of type applications.-splitAppTys ty = split ty ty []-  where-    split orig_ty ty args | Just ty' <- coreView ty = split orig_ty ty' args-    split _       (AppTy ty arg)        args = split ty ty (arg:args)-    split _       (TyConApp tc tc_args) args-      = let -- keep type families saturated-            n | mightBeUnsaturatedTyCon tc = 0-              | otherwise                  = tyConArity tc-            (tc_args1, tc_args2) = splitAt n tc_args-        in-        (TyConApp tc tc_args1, tc_args2 ++ args)-    split _   (FunTy ty1 ty2) args-      = ASSERT( null args )-        (TyConApp funTyCon [], [rep1, rep2, ty1, ty2])-      where-        rep1 = getRuntimeRep ty1-        rep2 = getRuntimeRep ty2--    split orig_ty _                     args  = (orig_ty, args)---- | Like 'splitAppTys', but doesn't look through type synonyms-repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type])-repSplitAppTys ty = split ty []-  where-    split (AppTy ty arg) args = split ty (arg:args)-    split (TyConApp tc tc_args) args-      = let n | mightBeUnsaturatedTyCon tc = 0-              | otherwise                  = tyConArity tc-            (tc_args1, tc_args2) = splitAt n tc_args-        in-        (TyConApp tc tc_args1, tc_args2 ++ args)-    split (FunTy ty1 ty2) args-      = ASSERT( null args )-        (TyConApp funTyCon [], [rep1, rep2, ty1, ty2])-      where-        rep1 = getRuntimeRep ty1-        rep2 = getRuntimeRep ty2--    split ty args = (ty, args)--{--                      LitTy-                      ~~~~~--}--mkNumLitTy :: Integer -> Type-mkNumLitTy n = LitTy (NumTyLit n)---- | Is this a numeric literal. We also look through type synonyms.-isNumLitTy :: Type -> Maybe Integer-isNumLitTy ty | Just ty1 <- coreView ty = isNumLitTy ty1-isNumLitTy (LitTy (NumTyLit n)) = Just n-isNumLitTy _                    = Nothing--mkStrLitTy :: FastString -> Type-mkStrLitTy s = LitTy (StrTyLit s)---- | Is this a symbol literal. We also look through type synonyms.-isStrLitTy :: Type -> Maybe FastString-isStrLitTy ty | Just ty1 <- coreView ty = isStrLitTy ty1-isStrLitTy (LitTy (StrTyLit s)) = Just s-isStrLitTy _                    = Nothing---- | Is this a type literal (symbol or numeric).-isLitTy :: Type -> Maybe TyLit-isLitTy ty | Just ty1 <- coreView ty = isLitTy ty1-isLitTy (LitTy l)                    = Just l-isLitTy _                            = Nothing---- | Is this type a custom user error?--- If so, give us the kind and the error message.-userTypeError_maybe :: Type -> Maybe Type-userTypeError_maybe t-  = do { (tc, _kind : msg : _) <- splitTyConApp_maybe t-          -- There may be more than 2 arguments, if the type error is-          -- used as a type constructor (e.g. at kind `Type -> Type`).--       ; guard (tyConName tc == errorMessageTypeErrorFamName)-       ; return msg }---- | Render a type corresponding to a user type error into a SDoc.-pprUserTypeErrorTy :: Type -> SDoc-pprUserTypeErrorTy ty =-  case splitTyConApp_maybe ty of--    -- Text "Something"-    Just (tc,[txt])-      | tyConName tc == typeErrorTextDataConName-      , Just str <- isStrLitTy txt -> ftext str--    -- ShowType t-    Just (tc,[_k,t])-      | tyConName tc == typeErrorShowTypeDataConName -> ppr t--    -- t1 :<>: t2-    Just (tc,[t1,t2])-      | tyConName tc == typeErrorAppendDataConName ->-        pprUserTypeErrorTy t1 <> pprUserTypeErrorTy t2--    -- t1 :$$: t2-    Just (tc,[t1,t2])-      | tyConName tc == typeErrorVAppendDataConName ->-        pprUserTypeErrorTy t1 $$ pprUserTypeErrorTy t2--    -- An unevaluated type function-    _ -> ppr ty-----{------------------------------------------------------------------------                                FunTy-                                ~~~~~--Note [Representation of function types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--Functions (e.g. Int -> Char) can be thought of as being applications-of funTyCon (known in Haskell surface syntax as (->)),--    (->) :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)-                   (a :: TYPE r1) (b :: TYPE r2).-            a -> b -> Type--However, for efficiency's sake we represent saturated applications of (->)-with FunTy. For instance, the type,--    (->) r1 r2 a b--is equivalent to,--    FunTy (Anon a) b--Note how the RuntimeReps are implied in the FunTy representation. For this-reason we must be careful when recontructing the TyConApp representation (see,-for instance, splitTyConApp_maybe).--In the compiler we maintain the invariant that all saturated applications of-(->) are represented with FunTy.--See #11714.--}--isFunTy :: Type -> Bool-isFunTy ty = isJust (splitFunTy_maybe ty)--splitFunTy :: Type -> (Type, Type)--- ^ Attempts to extract the argument and result types from a type, and--- panics if that is not possible. See also 'splitFunTy_maybe'-splitFunTy ty | Just ty' <- coreView ty = splitFunTy ty'-splitFunTy (FunTy arg res) = (arg, res)-splitFunTy other           = pprPanic "splitFunTy" (ppr other)--splitFunTy_maybe :: Type -> Maybe (Type, Type)--- ^ Attempts to extract the argument and result types from a type-splitFunTy_maybe ty | Just ty' <- coreView ty = splitFunTy_maybe ty'-splitFunTy_maybe (FunTy arg res) = Just (arg, res)-splitFunTy_maybe _               = Nothing--splitFunTys :: Type -> ([Type], Type)-splitFunTys ty = split [] ty ty-  where-    split args orig_ty ty | Just ty' <- coreView ty = split args orig_ty ty'-    split args _       (FunTy arg res) = split (arg:args) res res-    split args orig_ty _               = (reverse args, orig_ty)--funResultTy :: Type -> Type--- ^ Extract the function result type and panic if that is not possible-funResultTy ty | Just ty' <- coreView ty = funResultTy ty'-funResultTy (FunTy _ res) = res-funResultTy ty            = pprPanic "funResultTy" (ppr ty)--funArgTy :: Type -> Type--- ^ Extract the function argument type and panic if that is not possible-funArgTy ty | Just ty' <- coreView ty = funArgTy ty'-funArgTy (FunTy arg _res) = arg-funArgTy ty               = pprPanic "funArgTy" (ppr ty)---- ^ Just like 'piResultTys' but for a single argument--- Try not to iterate 'piResultTy', because it's inefficient to substitute--- one variable at a time; instead use 'piResultTys"-piResultTy :: HasDebugCallStack => Type -> Type ->  Type-piResultTy ty arg = case piResultTy_maybe ty arg of-                      Just res -> res-                      Nothing  -> pprPanic "piResultTy" (ppr ty $$ ppr arg)--piResultTy_maybe :: Type -> Type -> Maybe Type-piResultTy_maybe ty arg-  | Just ty' <- coreView ty = piResultTy_maybe ty' arg--  | FunTy _ res <- ty-  = Just res--  | ForAllTy (Bndr tv _) res <- ty-  = let empty_subst = mkEmptyTCvSubst $ mkInScopeSet $-                      tyCoVarsOfTypes [arg,res]-    in Just (substTy (extendTCvSubst empty_subst tv arg) res)--  | otherwise-  = Nothing---- | (piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)---   where f :: f_ty--- 'piResultTys' is interesting because:---      1. 'f_ty' may have more for-alls than there are args---      2. Less obviously, it may have fewer for-alls--- For case 2. think of:---   piResultTys (forall a.a) [forall b.b, Int]--- This really can happen, but only (I think) in situations involving--- undefined.  For example:---       undefined :: forall a. a--- Term: undefined @(forall b. b->b) @Int--- This term should have type (Int -> Int), but notice that--- there are more type args than foralls in 'undefined's type.---- If you edit this function, you may need to update the GHC formalism--- See Note [GHC Formalism] in coreSyn/CoreLint.hs---- This is a heavily used function (e.g. from typeKind),--- so we pay attention to efficiency, especially in the special case--- where there are no for-alls so we are just dropping arrows from--- a function type/kind.-piResultTys :: HasDebugCallStack => Type -> [Type] -> Type-piResultTys ty [] = ty-piResultTys ty orig_args@(arg:args)-  | Just ty' <- coreView ty-  = piResultTys ty' orig_args--  | FunTy _ res <- ty-  = piResultTys res args--  | ForAllTy (Bndr tv _) res <- ty-  = go (extendTCvSubst init_subst tv arg) res args--  | otherwise-  = pprPanic "piResultTys1" (ppr ty $$ ppr orig_args)-  where-    init_subst = mkEmptyTCvSubst $ mkInScopeSet (tyCoVarsOfTypes (ty:orig_args))--    go :: TCvSubst -> Type -> [Type] -> Type-    go subst ty [] = substTy subst ty--    go subst ty all_args@(arg:args)-      | Just ty' <- coreView ty-      = go subst ty' all_args--      | FunTy _ res <- ty-      = go subst res args--      | ForAllTy (Bndr tv _) res <- ty-      = go (extendTCvSubst subst tv arg) res args--      | not (isEmptyTCvSubst subst)  -- See Note [Care with kind instantiation]-      = go init_subst-          (substTy subst ty)-          all_args--      | otherwise-      = -- We have not run out of arguments, but the function doesn't-        -- have the right kind to apply to them; so panic.-        -- Without the explicit isEmptyVarEnv test, an ill-kinded type-        -- would give an infniite loop, which is very unhelpful-        -- c.f. Trac #15473-        pprPanic "piResultTys2" (ppr ty $$ ppr orig_args $$ ppr all_args)--applyTysX :: [TyVar] -> Type -> [Type] -> Type--- applyTyxX beta-reduces (/\tvs. body_ty) arg_tys--- Assumes that (/\tvs. body_ty) is closed-applyTysX tvs body_ty arg_tys-  = ASSERT2( arg_tys `lengthAtLeast` n_tvs, pp_stuff )-    ASSERT2( tyCoVarsOfType body_ty `subVarSet` mkVarSet tvs, pp_stuff )-    mkAppTys (substTyWith tvs (take n_tvs arg_tys) body_ty)-             (drop n_tvs arg_tys)-  where-    pp_stuff = vcat [ppr tvs, ppr body_ty, ppr arg_tys]-    n_tvs = length tvs----{- Note [Care with kind instantiation]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have-  T :: forall k. k-and we are finding the kind of-  T (forall b. b -> b) * Int-Then-  T (forall b. b->b) :: k[ k :-> forall b. b->b]-                     :: forall b. b -> b-So-  T (forall b. b->b) * :: (b -> b)[ b :-> *]-                       :: * -> *--In other words we must intantiate the forall!--Similarly (Trac #15428)-   S :: forall k f. k -> f k-and we are finding the kind of-   S * (* ->) Int Bool-We have-   S * (* ->) :: (k -> f k)[ k :-> *, f :-> (* ->)]-              :: * -> * -> *-So again we must instantiate.--The same thing happens in ToIface.toIfaceAppArgsX.-------------------------------------------------------------------------                                TyConApp-                                ~~~~~~~~--}---- | A key function: builds a 'TyConApp' or 'FunTy' as appropriate to--- its arguments.  Applies its arguments to the constructor from left to right.-mkTyConApp :: TyCon -> [Type] -> Type-mkTyConApp tycon tys-  | isFunTyCon tycon-  , [_rep1,_rep2,ty1,ty2] <- tys-  = FunTy ty1 ty2--  | otherwise-  = TyConApp tycon tys---- splitTyConApp "looks through" synonyms, because they don't--- mean a distinct type, but all other type-constructor applications--- including functions are returned as Just ..---- | Retrieve the tycon heading this type, if there is one. Does /not/--- look through synonyms.-tyConAppTyConPicky_maybe :: Type -> Maybe TyCon-tyConAppTyConPicky_maybe (TyConApp tc _) = Just tc-tyConAppTyConPicky_maybe (FunTy {})      = Just funTyCon-tyConAppTyConPicky_maybe _               = Nothing----- | The same as @fst . splitTyConApp@-tyConAppTyCon_maybe :: Type -> Maybe TyCon-tyConAppTyCon_maybe ty | Just ty' <- coreView ty = tyConAppTyCon_maybe ty'-tyConAppTyCon_maybe (TyConApp tc _) = Just tc-tyConAppTyCon_maybe (FunTy {})      = Just funTyCon-tyConAppTyCon_maybe _               = Nothing--tyConAppTyCon :: Type -> TyCon-tyConAppTyCon ty = tyConAppTyCon_maybe ty `orElse` pprPanic "tyConAppTyCon" (ppr ty)---- | The same as @snd . splitTyConApp@-tyConAppArgs_maybe :: Type -> Maybe [Type]-tyConAppArgs_maybe ty | Just ty' <- coreView ty = tyConAppArgs_maybe ty'-tyConAppArgs_maybe (TyConApp _ tys) = Just tys-tyConAppArgs_maybe (FunTy arg res)-  | Just rep1 <- getRuntimeRep_maybe arg-  , Just rep2 <- getRuntimeRep_maybe res-  = Just [rep1, rep2, arg, res]-tyConAppArgs_maybe _  = Nothing--tyConAppArgs :: Type -> [Type]-tyConAppArgs ty = tyConAppArgs_maybe ty `orElse` pprPanic "tyConAppArgs" (ppr ty)--tyConAppArgN :: Int -> Type -> Type--- Executing Nth-tyConAppArgN n ty-  = case tyConAppArgs_maybe ty of-      Just tys -> ASSERT2( tys `lengthExceeds` n, ppr n <+> ppr tys ) tys `getNth` n-      Nothing  -> pprPanic "tyConAppArgN" (ppr n <+> ppr ty)---- | Attempts to tease a type apart into a type constructor and the application--- of a number of arguments to that constructor. Panics if that is not possible.--- See also 'splitTyConApp_maybe'-splitTyConApp :: Type -> (TyCon, [Type])-splitTyConApp ty = case splitTyConApp_maybe ty of-                   Just stuff -> stuff-                   Nothing    -> pprPanic "splitTyConApp" (ppr ty)---- | Attempts to tease a type apart into a type constructor and the application--- of a number of arguments to that constructor-splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])-splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'-splitTyConApp_maybe ty                           = repSplitTyConApp_maybe ty---- | Like 'splitTyConApp_maybe', but doesn't look through synonyms. This--- assumes the synonyms have already been dealt with.-repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])-repSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)-repSplitTyConApp_maybe (FunTy arg res)-  | Just arg_rep <- getRuntimeRep_maybe arg-  , Just res_rep <- getRuntimeRep_maybe res-  = Just (funTyCon, [arg_rep, res_rep, arg, res])-repSplitTyConApp_maybe _ = Nothing---- | Attempts to tease a list type apart and gives the type of the elements if--- successful (looks through type synonyms)-splitListTyConApp_maybe :: Type -> Maybe Type-splitListTyConApp_maybe ty = case splitTyConApp_maybe ty of-  Just (tc,[e]) | tc == listTyCon -> Just e-  _other                          -> Nothing--nextRole :: Type -> Role-nextRole ty-  | Just (tc, tys) <- splitTyConApp_maybe ty-  , let num_tys = length tys-  , num_tys < tyConArity tc-  = tyConRoles tc `getNth` num_tys--  | otherwise-  = Nominal--newTyConInstRhs :: TyCon -> [Type] -> Type--- ^ Unwrap one 'layer' of newtype on a type constructor and its--- arguments, using an eta-reduced version of the @newtype@ if possible.--- This requires tys to have at least @newTyConInstArity tycon@ elements.-newTyConInstRhs tycon tys-    = ASSERT2( tvs `leLength` tys, ppr tycon $$ ppr tys $$ ppr tvs )-      applyTysX tvs rhs tys-  where-    (tvs, rhs) = newTyConEtadRhs tycon--{------------------------------------------------------------------------                           CastTy-                           ~~~~~~-A casted type has its *kind* casted into something new.--}--splitCastTy_maybe :: Type -> Maybe (Type, Coercion)-splitCastTy_maybe ty | Just ty' <- coreView ty = splitCastTy_maybe ty'-splitCastTy_maybe (CastTy ty co)               = Just (ty, co)-splitCastTy_maybe _                            = Nothing---- | Make a 'CastTy'. The Coercion must be nominal. Checks the--- Coercion for reflexivity, dropping it if it's reflexive.--- See Note [Respecting definitional equality] in TyCoRep-mkCastTy :: Type -> Coercion -> Type-mkCastTy ty co | isReflexiveCo co = ty  -- (EQ2) from the Note--- NB: Do the slow check here. This is important to keep the splitXXX--- functions working properly. Otherwise, we may end up with something--- like (((->) |> something_reflexive_but_not_obviously_so) biz baz)--- fails under splitFunTy_maybe. This happened with the cheaper check--- in test dependent/should_compile/dynamic-paper.--mkCastTy (CastTy ty co1) co2-  -- (EQ3) from the Note-  = mkCastTy ty (co1 `mkTransCo` co2)-      -- call mkCastTy again for the reflexivity check--mkCastTy (ForAllTy (Bndr tv vis) inner_ty) co-  -- (EQ4) from the Note-  | isTyVar tv-  , let fvs = tyCoVarsOfCo co-  = -- have to make sure that pushing the co in doesn't capture the bound var!-    if tv `elemVarSet` fvs-    then let empty_subst = mkEmptyTCvSubst (mkInScopeSet fvs)-             (subst, tv') = substVarBndr empty_subst tv-         in ForAllTy (Bndr tv' vis) (substTy subst inner_ty `mkCastTy` co)-    else ForAllTy (Bndr tv vis) (inner_ty `mkCastTy` co)--mkCastTy ty co = CastTy ty co--tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder]--- Return the tyConBinders in TyCoBinder form-tyConBindersTyCoBinders = map to_tyb-  where-    to_tyb (Bndr tv (NamedTCB vis)) = Named (Bndr tv vis)-    to_tyb (Bndr tv AnonTCB)        = Anon (varType tv)--{-----------------------------------------------------------------------                            CoercionTy-                            ~~~~~~~~~~-CoercionTy allows us to inject coercions into types. A CoercionTy-should appear only in the right-hand side of an application.--}--mkCoercionTy :: Coercion -> Type-mkCoercionTy = CoercionTy--isCoercionTy :: Type -> Bool-isCoercionTy (CoercionTy _) = True-isCoercionTy _              = False--isCoercionTy_maybe :: Type -> Maybe Coercion-isCoercionTy_maybe (CoercionTy co) = Just co-isCoercionTy_maybe _               = Nothing--stripCoercionTy :: Type -> Coercion-stripCoercionTy (CoercionTy co) = co-stripCoercionTy ty              = pprPanic "stripCoercionTy" (ppr ty)--{------------------------------------------------------------------------                                SynTy-                                ~~~~~--Notes on type synonyms-~~~~~~~~~~~~~~~~~~~~~~-The various "split" functions (splitFunTy, splitRhoTy, splitForAllTy) try-to return type synonyms wherever possible. Thus--        type Foo a = a -> a--we want-        splitFunTys (a -> Foo a) = ([a], Foo a)-not                                ([a], a -> a)--The reason is that we then get better (shorter) type signatures in-interfaces.  Notably this plays a role in tcTySigs in TcBinds.hs.-------------------------------------------------------------------------                                ForAllTy-                                ~~~~~~~~--}---- | Make a dependent forall over an Inferred variablem-mkTyCoInvForAllTy :: TyCoVar -> Type -> Type-mkTyCoInvForAllTy tv ty-  | isCoVar tv-  , not (tv `elemVarSet` tyCoVarsOfType ty)-  = mkFunTy (varType tv) ty-  | otherwise-  = ForAllTy (Bndr tv Inferred) ty---- | Like mkTyCoInvForAllTy, but tv should be a tyvar-mkInvForAllTy :: TyVar -> Type -> Type-mkInvForAllTy tv ty = ASSERT( isTyVar tv )-                      ForAllTy (Bndr tv Inferred) ty---- | Like mkForAllTys, but assumes all variables are dependent and Inferred,--- a common case-mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type-mkTyCoInvForAllTys tvs ty = foldr mkTyCoInvForAllTy ty tvs---- | Like 'mkTyCoInvForAllTys', but tvs should be a list of tyvar-mkInvForAllTys :: [TyVar] -> Type -> Type-mkInvForAllTys tvs ty = foldr mkInvForAllTy ty tvs---- | Like mkForAllTys, but assumes all variables are dependent and Specified,--- a common case-mkSpecForAllTys :: [TyVar] -> Type -> Type-mkSpecForAllTys tvs = ASSERT( all isTyVar tvs )-                      -- covar is always Inferred, so all inputs should be tyvar-                      mkForAllTys [ Bndr tv Specified | tv <- tvs ]---- | Like mkForAllTys, but assumes all variables are dependent and visible-mkVisForAllTys :: [TyVar] -> Type -> Type-mkVisForAllTys tvs = ASSERT( all isTyVar tvs )-                     -- covar is always Inferred, so all inputs should be tyvar-                     mkForAllTys [ Bndr tv Required | tv <- tvs ]--mkLamType  :: Var -> Type -> Type--- ^ Makes a @(->)@ type or an implicit forall type, depending--- on whether it is given a type variable or a term variable.--- This is used, for example, when producing the type of a lambda.--- Always uses Inferred binders.-mkLamTypes :: [Var] -> Type -> Type--- ^ 'mkLamType' for multiple type or value arguments--mkLamType v ty-   | isCoVar v-   , v `elemVarSet` tyCoVarsOfType ty-   = ForAllTy (Bndr v Inferred) ty-   | isTyVar v-   = ForAllTy (Bndr v Inferred) ty-   | otherwise-   = FunTy (varType v) ty--mkLamTypes vs ty = foldr mkLamType ty vs---- | Given a list of type-level vars and the free vars of a result kind,--- makes TyCoBinders, preferring anonymous binders--- if the variable is, in fact, not dependent.--- e.g.    mkTyConBindersPreferAnon [(k:*),(b:k),(c:k)] (k->k)--- We want (k:*) Named, (b:k) Anon, (c:k) Anon------ All non-coercion binders are /visible/.-mkTyConBindersPreferAnon :: [TyVar]      -- ^ binders-                         -> TyCoVarSet   -- ^ free variables of result-                         -> [TyConBinder]-mkTyConBindersPreferAnon vars inner_tkvs = ASSERT( all isTyVar vars)-                                           fst (go vars)-  where-    go :: [TyVar] -> ([TyConBinder], VarSet) -- also returns the free vars-    go [] = ([], inner_tkvs)-    go (v:vs) | v `elemVarSet` fvs-              = ( Bndr v (NamedTCB Required) : binders-                , fvs `delVarSet` v `unionVarSet` kind_vars )-              | otherwise-              = ( Bndr v AnonTCB : binders-                , fvs `unionVarSet` kind_vars )-      where-        (binders, fvs) = go vs-        kind_vars      = tyCoVarsOfType $ tyVarKind v---- | Take a ForAllTy apart, returning the list of tycovars and the result type.--- This always succeeds, even if it returns only an empty list. Note that the--- result type returned may have free variables that were bound by a forall.-splitForAllTys :: Type -> ([TyCoVar], Type)-splitForAllTys ty = split ty ty []-  where-    split orig_ty ty tvs | Just ty' <- coreView ty = split orig_ty ty' tvs-    split _       (ForAllTy (Bndr tv _) ty)    tvs = split ty ty (tv:tvs)-    split orig_ty _                            tvs = (reverse tvs, orig_ty)---- | Like splitForAllTys, but split only for tyvars.--- This always succeeds, even if it returns only an empty list. Note that the--- result type returned may have free variables that were bound by a forall.-splitTyVarForAllTys :: Type -> ([TyVar], Type)-splitTyVarForAllTys ty = split ty ty []-  where-    split orig_ty ty tvs | Just ty' <- coreView ty     = split orig_ty ty' tvs-    split _ (ForAllTy (Bndr tv _) ty) tvs | isTyVar tv = split ty ty (tv:tvs)-    split orig_ty _                   tvs              = (reverse tvs, orig_ty)---- | Checks whether this is a proper forall (with a named binder)-isForAllTy :: Type -> Bool-isForAllTy ty | Just ty' <- coreView ty = isForAllTy ty'-isForAllTy (ForAllTy {}) = True-isForAllTy _             = False---- | Like `isForAllTy`, but returns True only if it is a tyvar binder-isForAllTy_ty :: Type -> Bool-isForAllTy_ty ty | Just ty' <- coreView ty = isForAllTy_ty ty'-isForAllTy_ty (ForAllTy (Bndr tv _) _) | isTyVar tv = True-isForAllTy_ty _             = False---- | Like `isForAllTy`, but returns True only if it is a covar binder-isForAllTy_co :: Type -> Bool-isForAllTy_co ty | Just ty' <- coreView ty = isForAllTy_co ty'-isForAllTy_co (ForAllTy (Bndr tv _) _) | isCoVar tv = True-isForAllTy_co _             = False---- | Is this a function or forall?-isPiTy :: Type -> Bool-isPiTy ty | Just ty' <- coreView ty = isForAllTy ty'-isPiTy (ForAllTy {}) = True-isPiTy (FunTy {})    = True-isPiTy _             = False---- | Take a forall type apart, or panics if that is not possible.-splitForAllTy :: Type -> (TyCoVar, Type)-splitForAllTy ty-  | Just answer <- splitForAllTy_maybe ty = answer-  | otherwise                             = pprPanic "splitForAllTy" (ppr ty)---- | Drops all ForAllTys-dropForAlls :: Type -> Type-dropForAlls ty = go ty-  where-    go ty | Just ty' <- coreView ty = go ty'-    go (ForAllTy _ res)            = go res-    go res                         = res---- | Attempts to take a forall type apart, but only if it's a proper forall,--- with a named binder-splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type)-splitForAllTy_maybe ty = go ty-  where-    go ty | Just ty' <- coreView ty = go ty'-    go (ForAllTy (Bndr tv _) ty)    = Just (tv, ty)-    go _                            = Nothing---- | Like splitForAllTy_maybe, but only returns Just if it is a tyvar binder.-splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type)-splitForAllTy_ty_maybe ty = go ty-  where-    go ty | Just ty' <- coreView ty = go ty'-    go (ForAllTy (Bndr tv _) ty) | isTyVar tv = Just (tv, ty)-    go _                            = Nothing---- | Like splitForAllTy_maybe, but only returns Just if it is a covar binder.-splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type)-splitForAllTy_co_maybe ty = go ty-  where-    go ty | Just ty' <- coreView ty = go ty'-    go (ForAllTy (Bndr tv _) ty) | isCoVar tv = Just (tv, ty)-    go _                            = Nothing---- | Attempts to take a forall type apart; works with proper foralls and--- functions-splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type)-splitPiTy_maybe ty = go ty-  where-    go ty | Just ty' <- coreView ty = go ty'-    go (ForAllTy bndr ty) = Just (Named bndr, ty)-    go (FunTy arg res)    = Just (Anon arg, res)-    go _                  = Nothing---- | Takes a forall type apart, or panics-splitPiTy :: Type -> (TyCoBinder, Type)-splitPiTy ty-  | Just answer <- splitPiTy_maybe ty = answer-  | otherwise                         = pprPanic "splitPiTy" (ppr ty)---- | Split off all TyCoBinders to a type, splitting both proper foralls--- and functions-splitPiTys :: Type -> ([TyCoBinder], Type)-splitPiTys ty = split ty ty []-  where-    split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs-    split _       (ForAllTy b res) bs = split res res (Named b  : bs)-    split _       (FunTy arg res)  bs = split res res (Anon arg : bs)-    split orig_ty _                bs = (reverse bs, orig_ty)---- | Like 'splitPiTys' but split off only /named/ binders---   and returns TyCoVarBinders rather than TyCoBinders-splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type)-splitForAllVarBndrs ty = split ty ty []-  where-    split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs-    split _       (ForAllTy b res) bs = split res res (b:bs)-    split orig_ty _                bs = (reverse bs, orig_ty)-{-# INLINE splitForAllVarBndrs #-}--invisibleTyBndrCount :: Type -> Int--- Returns the number of leading invisible forall'd binders in the type--- Includes invisible predicate arguments; e.g. for---    e.g.  forall {k}. (k ~ *) => k -> k--- returns 2 not 1-invisibleTyBndrCount ty = length (fst (splitPiTysInvisible ty))---- Like splitPiTys, but returns only *invisible* binders, including constraints--- Stops at the first visible binder-splitPiTysInvisible :: Type -> ([TyCoBinder], Type)-splitPiTysInvisible ty = split ty ty []-   where-    split orig_ty ty bs-      | Just ty' <- coreView ty  = split orig_ty ty' bs-    split _ (ForAllTy b res) bs-      | Bndr _ vis <- b-      , isInvisibleArgFlag vis   = split res res (Named b  : bs)-    split _ (FunTy arg res)  bs-      | isPredTy arg             = split res res (Anon arg : bs)-    split orig_ty _          bs  = (reverse bs, orig_ty)--splitPiTysInvisibleN :: Int -> Type -> ([TyCoBinder], Type)--- Same as splitPiTysInvisible, but stop when---   - you have found 'n' TyCoBinders,---   - or you run out of invisible binders-splitPiTysInvisibleN n ty = split n ty ty []-   where-    split n orig_ty ty bs-      | n == 0                  = (reverse bs, orig_ty)-      | Just ty' <- coreView ty = split n orig_ty ty' bs-      | ForAllTy b res <- ty-      , Bndr _ vis <- b-      , isInvisibleArgFlag vis  = split (n-1) res res (Named b  : bs)-      | FunTy arg res <- ty-      , isPredTy arg            = split (n-1) res res (Anon arg : bs)-      | otherwise               = (reverse bs, orig_ty)---- | Given a 'TyCon' and a list of argument types, filter out any invisible--- (i.e., 'Inferred' or 'Specified') arguments.-filterOutInvisibleTypes :: TyCon -> [Type] -> [Type]-filterOutInvisibleTypes tc tys = snd $ partitionInvisibleTypes tc tys---- | Given a 'TyCon' and a list of argument types, filter out any 'Inferred'--- arguments.-filterOutInferredTypes :: TyCon -> [Type] -> [Type]-filterOutInferredTypes tc tys =-  filterByList (map (/= Inferred) $ tyConArgFlags tc tys) tys---- | Given a 'TyCon' and a list of argument types, partition the arguments--- into:------ 1. 'Inferred' or 'Specified' (i.e., invisible) arguments and------ 2. 'Required' (i.e., visible) arguments-partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])-partitionInvisibleTypes tc tys =-  partitionByList (map isInvisibleArgFlag $ tyConArgFlags tc tys) tys---- | Given a list of things paired with their visibilities, partition the--- things into (invisible things, visible things).-partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a])-partitionInvisibles = partitionWith pick_invis-  where-    pick_invis :: (a, ArgFlag) -> Either a a-    pick_invis (thing, vis) | isInvisibleArgFlag vis = Left thing-                            | otherwise              = Right thing---- | Given a 'TyCon' and a list of argument types to which the 'TyCon' is--- applied, determine each argument's visibility--- ('Inferred', 'Specified', or 'Required').------ Wrinkle: consider the following scenario:------ > T :: forall k. k -> k--- > tyConArgFlags T [forall m. m -> m -> m, S, R, Q]------ After substituting, we get------ > T (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n------ Thus, the first argument is invisible, @S@ is visible, @R@ is invisible again,--- and @Q@ is visible.-tyConArgFlags :: TyCon -> [Type] -> [ArgFlag]-tyConArgFlags tc = fun_kind_arg_flags (tyConKind tc)---- | Given a 'Type' and a list of argument types to which the 'Type' is--- applied, determine each argument's visibility--- ('Inferred', 'Specified', or 'Required').------ Most of the time, the arguments will be 'Required', but not always. Consider--- @f :: forall a. a -> Type@. In @f Type Bool@, the first argument (@Type@) is--- 'Specified' and the second argument (@Bool@) is 'Required'. It is precisely--- this sort of higher-rank situation in which 'appTyArgFlags' comes in handy,--- since @f Type Bool@ would be represented in Core using 'AppTy's.--- (See also Trac #15792).-appTyArgFlags :: Type -> [Type] -> [ArgFlag]-appTyArgFlags ty = fun_kind_arg_flags (typeKind ty)---- | Given a function kind and a list of argument types (where each argument's--- kind aligns with the corresponding position in the argument kind), determine--- each argument's visibility ('Inferred', 'Specified', or 'Required').-fun_kind_arg_flags :: Kind -> [Type] -> [ArgFlag]-fun_kind_arg_flags = go emptyTCvSubst-  where-    go subst ki arg_tys-      | Just ki' <- coreView ki = go subst ki' arg_tys-    go _ _ [] = []-    go subst (ForAllTy (Bndr tv argf) res_ki) (arg_ty:arg_tys)-      = argf : go subst' res_ki arg_tys-      where-        subst' = extendTvSubst subst tv arg_ty-    go subst (TyVarTy tv) arg_tys-      | Just ki <- lookupTyVar subst tv = go subst ki arg_tys-    go _ _ arg_tys = map (const Required) arg_tys-                        -- something is ill-kinded. But this can happen-                        -- when printing errors. Assume everything is Required.---- @isTauTy@ tests if a type has no foralls-isTauTy :: Type -> Bool-isTauTy ty | Just ty' <- coreView ty = isTauTy ty'-isTauTy (TyVarTy _)           = True-isTauTy (LitTy {})            = True-isTauTy (TyConApp tc tys)     = all isTauTy tys && isTauTyCon tc-isTauTy (AppTy a b)           = isTauTy a && isTauTy b-isTauTy (FunTy a b)           = isTauTy a && isTauTy b-isTauTy (ForAllTy {})         = False-isTauTy (CastTy ty _)         = isTauTy ty-isTauTy (CoercionTy _)        = False  -- Not sure about this--{--%************************************************************************-%*                                                                      *-   TyCoBinders-%*                                                                      *-%************************************************************************--}---- | Make an anonymous binder-mkAnonBinder :: Type -> TyCoBinder-mkAnonBinder = Anon---- | Does this binder bind a variable that is /not/ erased? Returns--- 'True' for anonymous binders.-isAnonTyCoBinder :: TyCoBinder -> Bool-isAnonTyCoBinder (Named {}) = False-isAnonTyCoBinder (Anon {})  = True--tyCoBinderVar_maybe :: TyCoBinder -> Maybe TyCoVar-tyCoBinderVar_maybe (Named tv) = Just $ binderVar tv-tyCoBinderVar_maybe _          = Nothing--tyCoBinderType :: TyCoBinder -> Type-tyCoBinderType (Named tvb) = binderType tvb-tyCoBinderType (Anon ty)   = ty--tyBinderType :: TyBinder -> Type-tyBinderType (Named (Bndr tv _))-  = ASSERT( isTyVar tv )-    tyVarKind tv-tyBinderType (Anon ty)   = ty---- | Extract a relevant type, if there is one.-binderRelevantType_maybe :: TyCoBinder -> Maybe Type-binderRelevantType_maybe (Named {}) = Nothing-binderRelevantType_maybe (Anon ty)  = Just ty---- | Like 'maybe', but for binders.-caseBinder :: TyCoBinder           -- ^ binder to scrutinize-           -> (TyCoVarBinder -> a) -- ^ named case-           -> (Type -> a)          -- ^ anonymous case-           -> a-caseBinder (Named v) f _ = f v-caseBinder (Anon t)  _ d = d t---{--%************************************************************************-%*                                                                      *-                         Pred-*                                                                      *-************************************************************************--Predicates on PredType--Note [Types for coercions, predicates, and evidence]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We treat differently:--  (a) Predicate types-        Test: isPredTy-        Binders: DictIds-        Kind: Constraint-        Examples: (Eq a), and (a ~ b)--  (b) Coercion types are primitive, unboxed equalities-        Test: isCoVarTy-        Binders: CoVars (can appear in coercions)-        Kind: TYPE (TupleRep [])-        Examples: (t1 ~# t2) or (t1 ~R# t2)--  (c) Evidence types is the type of evidence manipulated by-      the type constraint solver.-        Test: isEvVarType-        Binders: EvVars-        Kind: Constraint or TYPE (TupleRep [])-        Examples: all coercion types and predicate types--Coercion types and predicate types are mutually exclusive,-but evidence types are a superset of both.--When treated as a user type, predicates are invisible and are-implicitly instantiated; but coercion types, and non-pred evidence-types, are just regular old types.--Note [Evidence for quantified constraints]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The superclass mechanism in TcCanonical.makeSuperClasses risks-taking a quantified constraint like-   (forall a. C a => a ~ b)-and generate superclass evidence-   (forall a. C a => a ~# b)--This is a funny thing: neither isPredTy nor isCoVarType are true-of it.  So we are careful not to generate it in the first place:-see Note [Equality superclasses in quantified constraints]-in TcCanonical.--}---- | Split a type constructor application into its type constructor and--- applied types. Note that this may fail in the case of a 'FunTy' with an--- argument of unknown kind 'FunTy' (e.g. @FunTy (a :: k) Int@. since the kind--- of @a@ isn't of the form @TYPE rep@). Consequently, you may need to zonk your--- type before using this function.------ If you only need the 'TyCon', consider using 'tcTyConAppTyCon_maybe'.-tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])--- Defined here to avoid module loops between Unify and TcType.-tcSplitTyConApp_maybe ty | Just ty' <- tcView ty = tcSplitTyConApp_maybe ty'-tcSplitTyConApp_maybe ty                         = tcRepSplitTyConApp_maybe ty---- tcIsConstraintKind stuf only makes sense in the typechecker--- After that Constraint = Type--- See Note [coreView vs tcView]--- Defined here because it is used in isPredTy and tcRepSplitAppTy_maybe (sigh)-tcIsConstraintKind :: Kind -> Bool-tcIsConstraintKind ty-  | Just (tc, args) <- tcSplitTyConApp_maybe ty    -- Note: tcSplit here-  , isConstraintKindCon tc-  = ASSERT2( null args, ppr ty ) True--  | otherwise-  = False---- | Is this kind equivalent to @*@?------ This considers 'Constraint' to be distinct from @*@. For a version that--- treats them as the same type, see 'isLiftedTypeKind'.-tcIsLiftedTypeKind :: Kind -> Bool-tcIsLiftedTypeKind ty-  | Just (tc, [arg]) <- tcSplitTyConApp_maybe ty    -- Note: tcSplit here-  , tc `hasKey` tYPETyConKey-  = isLiftedRuntimeRep arg-  | otherwise-  = False--tcReturnsConstraintKind :: Kind -> Bool--- True <=> the Kind ultimately returns a Constraint---   E.g.  * -> Constraint---         forall k. k -> Constraint-tcReturnsConstraintKind kind-  | Just kind' <- tcView kind = tcReturnsConstraintKind kind'-tcReturnsConstraintKind (ForAllTy _ ty) = tcReturnsConstraintKind ty-tcReturnsConstraintKind (FunTy    _ ty) = tcReturnsConstraintKind ty-tcReturnsConstraintKind (TyConApp tc _) = isConstraintKindCon tc-tcReturnsConstraintKind _               = False--isEvVarType :: Type -> Bool--- True of (a) predicates, of kind Constraint, such as (Eq a), and (a ~ b)---         (b) coercion types, such as (t1 ~# t2) or (t1 ~R# t2)--- See Note [Types for coercions, predicates, and evidence]--- See Note [Evidence for quantified constraints]-isEvVarType ty = isCoVarType ty || isPredTy ty---- | Does this type classify a core (unlifted) Coercion?--- At either role nominal or representational---    (t1 ~# t2) or (t1 ~R# t2)--- See Note [Types for coercions, predicates, and evidence]-isCoVarType :: Type -> Bool-isCoVarType ty-  | Just (tc,tys) <- splitTyConApp_maybe ty-  , (tc `hasKey` eqPrimTyConKey) || (tc `hasKey` eqReprPrimTyConKey)-  , tys `lengthIs` 4-  = True-isCoVarType _ = False--isClassPred, isEqPred, isNomEqPred, isIPPred :: PredType -> Bool-isClassPred ty = case tyConAppTyCon_maybe ty of-    Just tyCon | isClassTyCon tyCon -> True-    _                               -> False-isEqPred ty = case tyConAppTyCon_maybe ty of-    Just tyCon -> tyCon `hasKey` eqPrimTyConKey-               || tyCon `hasKey` eqReprPrimTyConKey-    _          -> False--isNomEqPred ty = case tyConAppTyCon_maybe ty of-    Just tyCon -> tyCon `hasKey` eqPrimTyConKey-    _          -> False--isIPPred ty = case tyConAppTyCon_maybe ty of-    Just tc -> isIPTyCon tc-    _       -> False--isIPTyCon :: TyCon -> Bool-isIPTyCon tc = tc `hasKey` ipClassKey-  -- Class and its corresponding TyCon have the same Unique--isIPClass :: Class -> Bool-isIPClass cls = cls `hasKey` ipClassKey--isCTupleClass :: Class -> Bool-isCTupleClass cls = isTupleTyCon (classTyCon cls)--isIPPred_maybe :: Type -> Maybe (FastString, Type)-isIPPred_maybe ty =-  do (tc,[t1,t2]) <- splitTyConApp_maybe ty-     guard (isIPTyCon tc)-     x <- isStrLitTy t1-     return (x,t2)--{--Make PredTypes----------------------- Equality types -----------------------------------}---- | Makes a lifted equality predicate at the given role-mkPrimEqPredRole :: Role -> Type -> Type -> PredType-mkPrimEqPredRole Nominal          = mkPrimEqPred-mkPrimEqPredRole Representational = mkReprPrimEqPred-mkPrimEqPredRole Phantom          = panic "mkPrimEqPredRole phantom"---- | Creates a primitive type equality predicate.--- Invariant: the types are not Coercions-mkPrimEqPred :: Type -> Type -> Type-mkPrimEqPred ty1 ty2-  = TyConApp eqPrimTyCon [k1, k2, ty1, ty2]-  where-    k1 = typeKind ty1-    k2 = typeKind ty2---- | Creates a primite type equality predicate with explicit kinds-mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type-mkHeteroPrimEqPred k1 k2 ty1 ty2 = TyConApp eqPrimTyCon [k1, k2, ty1, ty2]---- | Creates a primitive representational type equality predicate--- with explicit kinds-mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type-mkHeteroReprPrimEqPred k1 k2 ty1 ty2-  = TyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]---- | Try to split up a coercion type into the types that it coerces-splitCoercionType_maybe :: Type -> Maybe (Type, Type)-splitCoercionType_maybe ty-  = do { (tc, [_, _, ty1, ty2]) <- splitTyConApp_maybe ty-       ; guard $ tc `hasKey` eqPrimTyConKey || tc `hasKey` eqReprPrimTyConKey-       ; return (ty1, ty2) }--mkReprPrimEqPred :: Type -> Type -> Type-mkReprPrimEqPred ty1  ty2-  = TyConApp eqReprPrimTyCon [k1, k2, ty1, ty2]-  where-    k1 = typeKind ty1-    k2 = typeKind ty2--equalityTyCon :: Role -> TyCon-equalityTyCon Nominal          = eqPrimTyCon-equalityTyCon Representational = eqReprPrimTyCon-equalityTyCon Phantom          = eqPhantPrimTyCon---- --------------------- Dictionary types -----------------------------------mkClassPred :: Class -> [Type] -> PredType-mkClassPred clas tys = TyConApp (classTyCon clas) tys--isDictTy :: Type -> Bool-isDictTy = isClassPred--isDictLikeTy :: Type -> Bool--- Note [Dictionary-like types]-isDictLikeTy ty | Just ty' <- coreView ty = isDictLikeTy ty'-isDictLikeTy ty = case splitTyConApp_maybe ty of-        Just (tc, tys) | isClassTyCon tc -> True-                       | isTupleTyCon tc -> all isDictLikeTy tys-        _other                           -> False--{--Note [Dictionary-like types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Being "dictionary-like" means either a dictionary type or a tuple thereof.-In GHC 6.10 we build implication constraints which construct such tuples,-and if we land up with a binding-    t :: (C [a], Eq [a])-    t = blah-then we want to treat t as cheap under "-fdicts-cheap" for example.-(Implication constraints are normally inlined, but sadly not if the-occurrence is itself inside an INLINE function!  Until we revise the-handling of implication constraints, that is.)  This turned out to-be important in getting good arities in DPH code.  Example:--    class C a-    class D a where { foo :: a -> a }-    instance C a => D (Maybe a) where { foo x = x }--    bar :: (C a, C b) => a -> b -> (Maybe a, Maybe b)-    {-# INLINE bar #-}-    bar x y = (foo (Just x), foo (Just y))--Then 'bar' should jolly well have arity 4 (two dicts, two args), but-we ended up with something like-   bar = __inline_me__ (\d1,d2. let t :: (D (Maybe a), D (Maybe b)) = ...-                                in \x,y. <blah>)--This is all a bit ad-hoc; eg it relies on knowing that implication-constraints build tuples.---Decomposing PredType--}---- | A choice of equality relation. This is separate from the type 'Role'--- because 'Phantom' does not define a (non-trivial) equality relation.-data EqRel = NomEq | ReprEq-  deriving (Eq, Ord)--instance Outputable EqRel where-  ppr NomEq  = text "nominal equality"-  ppr ReprEq = text "representational equality"--eqRelRole :: EqRel -> Role-eqRelRole NomEq  = Nominal-eqRelRole ReprEq = Representational--data PredTree-  = ClassPred Class [Type]-  | EqPred EqRel Type Type-  | IrredPred PredType-  | ForAllPred [TyCoVarBinder] [PredType] PredType-     -- ForAllPred: see Note [Quantified constraints] in TcCanonical-  -- NB: There is no TuplePred case-  --     Tuple predicates like (Eq a, Ord b) are just treated-  --     as ClassPred, as if we had a tuple class with two superclasses-  --        class (c1, c2) => (%,%) c1 c2--classifyPredType :: PredType -> PredTree-classifyPredType ev_ty = case splitTyConApp_maybe ev_ty of-    Just (tc, [_, _, ty1, ty2])-      | tc `hasKey` eqReprPrimTyConKey -> EqPred ReprEq ty1 ty2-      | tc `hasKey` eqPrimTyConKey     -> EqPred NomEq ty1 ty2--    Just (tc, tys)-      | Just clas <- tyConClass_maybe tc-      -> ClassPred clas tys--    _ | (tvs, rho) <- splitForAllVarBndrs ev_ty-      , (theta, pred) <- splitFunTys rho-      , not (null tvs && null theta)-      -> ForAllPred tvs theta pred--      | otherwise-      -> IrredPred ev_ty--getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])-getClassPredTys ty = case getClassPredTys_maybe ty of-        Just (clas, tys) -> (clas, tys)-        Nothing          -> pprPanic "getClassPredTys" (ppr ty)--getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])-getClassPredTys_maybe ty = case splitTyConApp_maybe ty of-        Just (tc, tys) | Just clas <- tyConClass_maybe tc -> Just (clas, tys)-        _ -> Nothing--getEqPredTys :: PredType -> (Type, Type)-getEqPredTys ty-  = case splitTyConApp_maybe ty of-      Just (tc, [_, _, ty1, ty2])-        |  tc `hasKey` eqPrimTyConKey-        || tc `hasKey` eqReprPrimTyConKey-        -> (ty1, ty2)-      _ -> pprPanic "getEqPredTys" (ppr ty)--getEqPredTys_maybe :: PredType -> Maybe (Role, Type, Type)-getEqPredTys_maybe ty-  = case splitTyConApp_maybe ty of-      Just (tc, [_, _, ty1, ty2])-        | tc `hasKey` eqPrimTyConKey     -> Just (Nominal, ty1, ty2)-        | tc `hasKey` eqReprPrimTyConKey -> Just (Representational, ty1, ty2)-      _ -> Nothing--getEqPredRole :: PredType -> Role-getEqPredRole ty = eqRelRole (predTypeEqRel ty)---- | Get the equality relation relevant for a pred type.-predTypeEqRel :: PredType -> EqRel-predTypeEqRel ty-  | Just (tc, _) <- splitTyConApp_maybe ty-  , tc `hasKey` eqReprPrimTyConKey-  = ReprEq-  | otherwise-  = NomEq--{--%************************************************************************-%*                                                                      *-         Well-scoped tyvars-*                                                                      *-************************************************************************--Note [ScopedSort]-~~~~~~~~~~~~~~~~~-Consider--  foo :: Proxy a -> Proxy (b :: k) -> Proxy (a :: k2) -> ()--This function type is implicitly generalised over [a, b, k, k2]. These-variables will be Specified; that is, they will be available for visible-type application. This is because they are written in the type signature-by the user.--However, we must ask: what order will they appear in? In cases without-dependency, this is easy: we just use the lexical left-to-right ordering-of first occurrence. With dependency, we cannot get off the hook so-easily.--We thus state:-- * These variables appear in the order as given by ScopedSort, where-   the input to ScopedSort is the left-to-right order of first occurrence.--Note that this applies only to *implicit* quantification, without a-`forall`. If the user writes a `forall`, then we just use the order given.--ScopedSort is defined thusly (as proposed in #15743):-  * Work left-to-right through the input list, with a cursor.-  * If variable v at the cursor is depended on by any earlier variable w,-    move v immediately before the leftmost such w.--INVARIANT: The prefix of variables before the cursor form a valid telescope.--Note that ScopedSort makes sense only after type inference is done and all-types/kinds are fully settled and zonked.---}---- | Do a topological sort on a list of tyvars,---   so that binders occur before occurrences--- E.g. given  [ a::k, k::*, b::k ]--- it'll return a well-scoped list [ k::*, a::k, b::k ]------ This is a deterministic sorting operation--- (that is, doesn't depend on Uniques).------ It is also meant to be stable: that is, variables should not--- be reordered unnecessarily. This is specified in Note [ScopedSort]--- See also Note [Ordering of implicit variables] in RnTypes--scopedSort :: [TyCoVar] -> [TyCoVar]-scopedSort = go [] []-  where-    go :: [TyCoVar] -- already sorted, in reverse order-       -> [TyCoVarSet] -- each set contains all the variables which must be placed-                       -- before the tv corresponding to the set; they are accumulations-                       -- of the fvs in the sorted tvs' kinds--                       -- This list is in 1-to-1 correspondence with the sorted tyvars-                       -- INVARIANT:-                       --   all (\tl -> all (`subVarSet` head tl) (tail tl)) (tails fv_list)-                       -- That is, each set in the list is a superset of all later sets.--       -> [TyCoVar] -- yet to be sorted-       -> [TyCoVar]-    go acc _fv_list [] = reverse acc-    go acc  fv_list (tv:tvs)-      = go acc' fv_list' tvs-      where-        (acc', fv_list') = insert tv acc fv_list--    insert :: TyCoVar       -- var to insert-           -> [TyCoVar]     -- sorted list, in reverse order-           -> [TyCoVarSet]  -- list of fvs, as above-           -> ([TyCoVar], [TyCoVarSet])   -- augmented lists-    insert tv []     []         = ([tv], [tyCoVarsOfType (tyVarKind tv)])-    insert tv (a:as) (fvs:fvss)-      | tv `elemVarSet` fvs-      , (as', fvss') <- insert tv as fvss-      = (a:as', fvs `unionVarSet` fv_tv : fvss')--      | otherwise-      = (tv:a:as, fvs `unionVarSet` fv_tv : fvs : fvss)-      where-        fv_tv = tyCoVarsOfType (tyVarKind tv)--       -- lists not in correspondence-    insert _ _ _ = panic "scopedSort"---- | Extract a well-scoped list of variables from a deterministic set of--- variables. The result is deterministic.--- NB: There used to exist varSetElemsWellScoped :: VarSet -> [Var] which--- took a non-deterministic set and produced a non-deterministic--- well-scoped list. If you care about the list being well-scoped you also--- most likely care about it being in deterministic order.-dVarSetElemsWellScoped :: DVarSet -> [Var]-dVarSetElemsWellScoped = scopedSort . dVarSetElems---- | Get the free vars of a type in scoped order-tyCoVarsOfTypeWellScoped :: Type -> [TyVar]-tyCoVarsOfTypeWellScoped = scopedSort . tyCoVarsOfTypeList---- | Get the free vars of types in scoped order-tyCoVarsOfTypesWellScoped :: [Type] -> [TyVar]-tyCoVarsOfTypesWellScoped = scopedSort . tyCoVarsOfTypesList---- | Given the suffix of a telescope, returns the prefix.--- Ex: given [(k :: j), (a :: Proxy k)], returns [(j :: *)].-tyCoVarsOfBindersWellScoped :: [TyVar] -> [TyVar]-tyCoVarsOfBindersWellScoped tvs-  = tyCoVarsOfTypeWellScoped (mkInvForAllTys tvs unitTy)--------------- Closing over kinds --------------------- | Add the kind variables free in the kinds of the tyvars in the given set.--- Returns a non-deterministic set.-closeOverKinds :: TyVarSet -> TyVarSet-closeOverKinds = fvVarSet . closeOverKindsFV . nonDetEltsUniqSet-  -- It's OK to use nonDetEltsUniqSet here because we immediately forget-  -- about the ordering by returning a set.---- | Given a list of tyvars returns a deterministic FV computation that--- returns the given tyvars with the kind variables free in the kinds of the--- given tyvars.-closeOverKindsFV :: [TyVar] -> FV-closeOverKindsFV tvs =-  mapUnionFV (tyCoFVsOfType . tyVarKind) tvs `unionFV` mkFVs tvs---- | Add the kind variables free in the kinds of the tyvars in the given set.--- Returns a deterministically ordered list.-closeOverKindsList :: [TyVar] -> [TyVar]-closeOverKindsList tvs = fvVarList $ closeOverKindsFV tvs---- | Add the kind variables free in the kinds of the tyvars in the given set.--- Returns a deterministic set.-closeOverKindsDSet :: DTyVarSet -> DTyVarSet-closeOverKindsDSet = fvDVarSet . closeOverKindsFV . dVarSetElems--{--************************************************************************-*                                                                      *-\subsection{Type families}-*                                                                      *-************************************************************************--}--mkFamilyTyConApp :: TyCon -> [Type] -> Type--- ^ Given a family instance TyCon and its arg types, return the--- corresponding family type.  E.g:------ > data family T a--- > data instance T (Maybe b) = MkT b------ Where the instance tycon is :RTL, so:------ > mkFamilyTyConApp :RTL Int  =  T (Maybe Int)-mkFamilyTyConApp tc tys-  | Just (fam_tc, fam_tys) <- tyConFamInst_maybe tc-  , let tvs = tyConTyVars tc-        fam_subst = ASSERT2( tvs `equalLength` tys, ppr tc <+> ppr tys )-                    zipTvSubst tvs tys-  = mkTyConApp fam_tc (substTys fam_subst fam_tys)-  | otherwise-  = mkTyConApp tc tys---- | Get the type on the LHS of a coercion induced by a type/data--- family instance.-coAxNthLHS :: CoAxiom br -> Int -> Type-coAxNthLHS ax ind =-  mkTyConApp (coAxiomTyCon ax) (coAxBranchLHS (coAxiomNthBranch ax ind))---- | Pretty prints a 'TyCon', using the family instance in case of a--- representation tycon.  For example:------ > data T [a] = ...------ In that case we want to print @T [a]@, where @T@ is the family 'TyCon'-pprSourceTyCon :: TyCon -> SDoc-pprSourceTyCon tycon-  | Just (fam_tc, tys) <- tyConFamInst_maybe tycon-  = ppr $ fam_tc `TyConApp` tys        -- can't be FunTyCon-  | otherwise-  = ppr tycon--isFamFreeTy :: Type -> Bool-isFamFreeTy ty | Just ty' <- coreView ty = isFamFreeTy ty'-isFamFreeTy (TyVarTy _)       = True-isFamFreeTy (LitTy {})        = True-isFamFreeTy (TyConApp tc tys) = all isFamFreeTy tys && isFamFreeTyCon tc-isFamFreeTy (AppTy a b)       = isFamFreeTy a && isFamFreeTy b-isFamFreeTy (FunTy a b)       = isFamFreeTy a && isFamFreeTy b-isFamFreeTy (ForAllTy _ ty)   = isFamFreeTy ty-isFamFreeTy (CastTy ty _)     = isFamFreeTy ty-isFamFreeTy (CoercionTy _)    = False  -- Not sure about this--{--************************************************************************-*                                                                      *-\subsection{Liftedness}-*                                                                      *-************************************************************************--}---- | Returns Just True if this type is surely lifted, Just False--- if it is surely unlifted, Nothing if we can't be sure (i.e., it is--- levity polymorphic), and panics if the kind does not have the shape--- TYPE r.-isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool-isLiftedType_maybe ty = go (getRuntimeRep ty)-  where-    go rr | Just rr' <- coreView rr = go rr'-          | isLiftedRuntimeRep rr  = Just True-          | TyConApp {} <- rr      = Just False  -- Everything else is unlifted-          | otherwise              = Nothing     -- levity polymorphic---- | See "Type#type_classification" for what an unlifted type is.--- Panics on levity polymorphic types.-isUnliftedType :: HasDebugCallStack => Type -> Bool-        -- isUnliftedType returns True for forall'd unlifted types:-        --      x :: forall a. Int#-        -- I found bindings like these were getting floated to the top level.-        -- They are pretty bogus types, mind you.  It would be better never to-        -- construct them-isUnliftedType ty-  = not (isLiftedType_maybe ty `orElse`-         pprPanic "isUnliftedType" (ppr ty <+> dcolon <+> ppr (typeKind ty)))---- | Is this a type of kind RuntimeRep? (e.g. LiftedRep)-isRuntimeRepKindedTy :: Type -> Bool-isRuntimeRepKindedTy = isRuntimeRepTy . typeKind---- | Drops prefix of RuntimeRep constructors in 'TyConApp's. Useful for e.g.--- dropping 'LiftedRep arguments of unboxed tuple TyCon applications:------   dropRuntimeRepArgs [ 'LiftedRep, 'IntRep---                      , String, Int# ] == [String, Int#]----dropRuntimeRepArgs :: [Type] -> [Type]-dropRuntimeRepArgs = dropWhile isRuntimeRepKindedTy---- | Extract the RuntimeRep classifier of a type. For instance,--- @getRuntimeRep_maybe Int = LiftedRep@. Returns 'Nothing' if this is not--- possible.-getRuntimeRep_maybe :: HasDebugCallStack-                    => Type -> Maybe Type-getRuntimeRep_maybe = kindRep_maybe . typeKind---- | Extract the RuntimeRep classifier of a type. For instance,--- @getRuntimeRep_maybe Int = LiftedRep@. Panics if this is not possible.-getRuntimeRep :: HasDebugCallStack => Type -> Type-getRuntimeRep ty-  = case getRuntimeRep_maybe ty of-      Just r  -> r-      Nothing -> pprPanic "getRuntimeRep" (ppr ty <+> dcolon <+> ppr (typeKind ty))--isUnboxedTupleType :: Type -> Bool-isUnboxedTupleType ty-  = tyConAppTyCon (getRuntimeRep ty) `hasKey` tupleRepDataConKey-  -- NB: Do not use typePrimRep, as that can't tell the difference between-  -- unboxed tuples and unboxed sums---isUnboxedSumType :: Type -> Bool-isUnboxedSumType ty-  = tyConAppTyCon (getRuntimeRep ty) `hasKey` sumRepDataConKey---- | See "Type#type_classification" for what an algebraic type is.--- Should only be applied to /types/, as opposed to e.g. partially--- saturated type constructors-isAlgType :: Type -> Bool-isAlgType ty-  = case splitTyConApp_maybe ty of-      Just (tc, ty_args) -> ASSERT( ty_args `lengthIs` tyConArity tc )-                            isAlgTyCon tc-      _other             -> False---- | Check whether a type is a data family type-isDataFamilyAppType :: Type -> Bool-isDataFamilyAppType ty = case tyConAppTyCon_maybe ty of-                           Just tc -> isDataFamilyTyCon tc-                           _       -> False---- | Computes whether an argument (or let right hand side) should--- be computed strictly or lazily, based only on its type.--- Currently, it's just 'isUnliftedType'. Panics on levity-polymorphic types.-isStrictType :: HasDebugCallStack => Type -> Bool-isStrictType = isUnliftedType--isPrimitiveType :: Type -> Bool--- ^ Returns true of types that are opaque to Haskell.-isPrimitiveType ty = case splitTyConApp_maybe ty of-                        Just (tc, ty_args) -> ASSERT( ty_args `lengthIs` tyConArity tc )-                                              isPrimTyCon tc-                        _                  -> False--{--************************************************************************-*                                                                      *-\subsection{Join points}-*                                                                      *-************************************************************************--}---- | Determine whether a type could be the type of a join point of given total--- arity, according to the polymorphism rule. A join point cannot be polymorphic--- in its return type, since given---   join j @a @b x y z = e1 in e2,--- the types of e1 and e2 must be the same, and a and b are not in scope for e2.--- (See Note [The polymorphism rule of join points] in CoreSyn.) Returns False--- also if the type simply doesn't have enough arguments.------ Note that we need to know how many arguments (type *and* value) the putative--- join point takes; for instance, if---   j :: forall a. a -> Int--- then j could be a binary join point returning an Int, but it could *not* be a--- unary join point returning a -> Int.------ TODO: See Note [Excess polymorphism and join points]-isValidJoinPointType :: JoinArity -> Type -> Bool-isValidJoinPointType arity ty-  = valid_under emptyVarSet arity ty-  where-    valid_under tvs arity ty-      | arity == 0-      = isEmptyVarSet (tvs `intersectVarSet` tyCoVarsOfType ty)-      | Just (t, ty') <- splitForAllTy_maybe ty-      = valid_under (tvs `extendVarSet` t) (arity-1) ty'-      | Just (_, res_ty) <- splitFunTy_maybe ty-      = valid_under tvs (arity-1) res_ty-      | otherwise-      = False--{- Note [Excess polymorphism and join points]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In principle, if a function would be a join point except that it fails-the polymorphism rule (see Note [The polymorphism rule of join points] in-CoreSyn), it can still be made a join point with some effort. This is because-all tail calls must return the same type (they return to the same context!), and-thus if the return type depends on an argument, that argument must always be the-same.--For instance, consider:--  let f :: forall a. a -> Char -> [a]-      f @a x c = ... f @a y 'a' ...-  in ... f @Int 1 'b' ... f @Int 2 'c' ...--(where the calls are tail calls). `f` fails the polymorphism rule because its-return type is [a], where [a] is bound. But since the type argument is always-'Int', we can rewrite it as:--  let f' :: Int -> Char -> [Int]-      f' x c = ... f' y 'a' ...-  in ... f' 1 'b' ... f 2 'c' ...--and now we can make f' a join point:--  join f' :: Int -> Char -> [Int]-       f' x c = ... jump f' y 'a' ...-  in ... jump f' 1 'b' ... jump f' 2 'c' ...--It's not clear that this comes up often, however. TODO: Measure how often and-add this analysis if necessary.  See Trac #14620.---************************************************************************-*                                                                      *-\subsection{Sequencing on types}-*                                                                      *-************************************************************************--}--seqType :: Type -> ()-seqType (LitTy n)                   = n `seq` ()-seqType (TyVarTy tv)                = tv `seq` ()-seqType (AppTy t1 t2)               = seqType t1 `seq` seqType t2-seqType (FunTy t1 t2)               = seqType t1 `seq` seqType t2-seqType (TyConApp tc tys)           = tc `seq` seqTypes tys-seqType (ForAllTy (Bndr tv _) ty)   = seqType (varType tv) `seq` seqType ty-seqType (CastTy ty co)              = seqType ty `seq` seqCo co-seqType (CoercionTy co)             = seqCo co--seqTypes :: [Type] -> ()-seqTypes []       = ()-seqTypes (ty:tys) = seqType ty `seq` seqTypes tys--{--************************************************************************-*                                                                      *-                Comparison for types-        (We don't use instances so that we know where it happens)-*                                                                      *-************************************************************************--Note [Equality on AppTys]-~~~~~~~~~~~~~~~~~~~~~~~~~-In our cast-ignoring equality, we want to say that the following two-are equal:--  (Maybe |> co) (Int |> co')   ~?       Maybe Int--But the left is an AppTy while the right is a TyConApp. The solution is-to use repSplitAppTy_maybe to break up the TyConApp into its pieces and-then continue. Easy to do, but also easy to forget to do.---}--eqType :: Type -> Type -> Bool--- ^ Type equality on source types. Does not look through @newtypes@ or--- 'PredType's, but it does look through type synonyms.--- This first checks that the kinds of the types are equal and then--- checks whether the types are equal, ignoring casts and coercions.--- (The kind check is a recursive call, but since all kinds have type--- @Type@, there is no need to check the types of kinds.)--- See also Note [Non-trivial definitional equality] in TyCoRep.-eqType t1 t2 = isEqual $ nonDetCmpType t1 t2-  -- It's OK to use nonDetCmpType here and eqType is deterministic,-  -- nonDetCmpType does equality deterministically---- | Compare types with respect to a (presumably) non-empty 'RnEnv2'.-eqTypeX :: RnEnv2 -> Type -> Type -> Bool-eqTypeX env t1 t2 = isEqual $ nonDetCmpTypeX env t1 t2-  -- It's OK to use nonDetCmpType here and eqTypeX is deterministic,-  -- nonDetCmpTypeX does equality deterministically---- | Type equality on lists of types, looking through type synonyms--- but not newtypes.-eqTypes :: [Type] -> [Type] -> Bool-eqTypes tys1 tys2 = isEqual $ nonDetCmpTypes tys1 tys2-  -- It's OK to use nonDetCmpType here and eqTypes is deterministic,-  -- nonDetCmpTypes does equality deterministically--eqVarBndrs :: RnEnv2 -> [Var] -> [Var] -> Maybe RnEnv2--- Check that the var lists are the same length--- and have matching kinds; if so, extend the RnEnv2--- Returns Nothing if they don't match-eqVarBndrs env [] []- = Just env-eqVarBndrs env (tv1:tvs1) (tv2:tvs2)- | eqTypeX env (varType tv1) (varType tv2)- = eqVarBndrs (rnBndr2 env tv1 tv2) tvs1 tvs2-eqVarBndrs _ _ _= Nothing---- Now here comes the real worker--{--Note [nonDetCmpType nondeterminism]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-nonDetCmpType is implemented in terms of nonDetCmpTypeX. nonDetCmpTypeX-uses nonDetCmpTc which compares TyCons by their Unique value. Using Uniques for-ordering leads to nondeterminism. We hit the same problem in the TyVarTy case,-comparing type variables is nondeterministic, note the call to nonDetCmpVar in-nonDetCmpTypeX.-See Note [Unique Determinism] for more details.--}--nonDetCmpType :: Type -> Type -> Ordering-nonDetCmpType t1 t2-  -- we know k1 and k2 have the same kind, because they both have kind *.-  = nonDetCmpTypeX rn_env t1 t2-  where-    rn_env = mkRnEnv2 (mkInScopeSet (tyCoVarsOfTypes [t1, t2]))--nonDetCmpTypes :: [Type] -> [Type] -> Ordering-nonDetCmpTypes ts1 ts2 = nonDetCmpTypesX rn_env ts1 ts2-  where-    rn_env = mkRnEnv2 (mkInScopeSet (tyCoVarsOfTypes (ts1 ++ ts2)))---- | An ordering relation between two 'Type's (known below as @t1 :: k1@--- and @t2 :: k2@)-data TypeOrdering = TLT  -- ^ @t1 < t2@-                  | TEQ  -- ^ @t1 ~ t2@ and there are no casts in either,-                         -- therefore we can conclude @k1 ~ k2@-                  | TEQX -- ^ @t1 ~ t2@ yet one of the types contains a cast so-                         -- they may differ in kind.-                  | TGT  -- ^ @t1 > t2@-                  deriving (Eq, Ord, Enum, Bounded)--nonDetCmpTypeX :: RnEnv2 -> Type -> Type -> Ordering  -- Main workhorse-    -- See Note [Non-trivial definitional equality] in TyCoRep-nonDetCmpTypeX env orig_t1 orig_t2 =-    case go env orig_t1 orig_t2 of-      -- If there are casts then we also need to do a comparison of the kinds of-      -- the types being compared-      TEQX          -> toOrdering $ go env k1 k2-      ty_ordering   -> toOrdering ty_ordering-  where-    k1 = typeKind orig_t1-    k2 = typeKind orig_t2--    toOrdering :: TypeOrdering -> Ordering-    toOrdering TLT  = LT-    toOrdering TEQ  = EQ-    toOrdering TEQX = EQ-    toOrdering TGT  = GT--    liftOrdering :: Ordering -> TypeOrdering-    liftOrdering LT = TLT-    liftOrdering EQ = TEQ-    liftOrdering GT = TGT--    thenCmpTy :: TypeOrdering -> TypeOrdering -> TypeOrdering-    thenCmpTy TEQ  rel  = rel-    thenCmpTy TEQX rel  = hasCast rel-    thenCmpTy rel  _    = rel--    hasCast :: TypeOrdering -> TypeOrdering-    hasCast TEQ = TEQX-    hasCast rel = rel--    -- Returns both the resulting ordering relation between the two types-    -- and whether either contains a cast.-    go :: RnEnv2 -> Type -> Type -> TypeOrdering-    go env t1 t2-      | Just t1' <- coreView t1 = go env t1' t2-      | Just t2' <- coreView t2 = go env t1 t2'--    go env (TyVarTy tv1)       (TyVarTy tv2)-      = liftOrdering $ rnOccL env tv1 `nonDetCmpVar` rnOccR env tv2-    go env (ForAllTy (Bndr tv1 _) t1) (ForAllTy (Bndr tv2 _) t2)-      = go env (varType tv1) (varType tv2)-        `thenCmpTy` go (rnBndr2 env tv1 tv2) t1 t2-        -- See Note [Equality on AppTys]-    go env (AppTy s1 t1) ty2-      | Just (s2, t2) <- repSplitAppTy_maybe ty2-      = go env s1 s2 `thenCmpTy` go env t1 t2-    go env ty1 (AppTy s2 t2)-      | Just (s1, t1) <- repSplitAppTy_maybe ty1-      = go env s1 s2 `thenCmpTy` go env t1 t2-    go env (FunTy s1 t1) (FunTy s2 t2)-      = go env s1 s2 `thenCmpTy` go env t1 t2-    go env (TyConApp tc1 tys1) (TyConApp tc2 tys2)-      = liftOrdering (tc1 `nonDetCmpTc` tc2) `thenCmpTy` gos env tys1 tys2-    go _   (LitTy l1)          (LitTy l2)          = liftOrdering (compare l1 l2)-    go env (CastTy t1 _)       t2                  = hasCast $ go env t1 t2-    go env t1                  (CastTy t2 _)       = hasCast $ go env t1 t2--    go _   (CoercionTy {})     (CoercionTy {})     = TEQ--        -- Deal with the rest: TyVarTy < CoercionTy < AppTy < LitTy < TyConApp < ForAllTy-    go _ ty1 ty2-      = liftOrdering $ (get_rank ty1) `compare` (get_rank ty2)-      where get_rank :: Type -> Int-            get_rank (CastTy {})-              = pprPanic "nonDetCmpTypeX.get_rank" (ppr [ty1,ty2])-            get_rank (TyVarTy {})    = 0-            get_rank (CoercionTy {}) = 1-            get_rank (AppTy {})      = 3-            get_rank (LitTy {})      = 4-            get_rank (TyConApp {})   = 5-            get_rank (FunTy {})      = 6-            get_rank (ForAllTy {})   = 7--    gos :: RnEnv2 -> [Type] -> [Type] -> TypeOrdering-    gos _   []         []         = TEQ-    gos _   []         _          = TLT-    gos _   _          []         = TGT-    gos env (ty1:tys1) (ty2:tys2) = go env ty1 ty2 `thenCmpTy` gos env tys1 tys2----------------nonDetCmpTypesX :: RnEnv2 -> [Type] -> [Type] -> Ordering-nonDetCmpTypesX _   []        []        = EQ-nonDetCmpTypesX env (t1:tys1) (t2:tys2) = nonDetCmpTypeX env t1 t2-                                          `thenCmp`-                                          nonDetCmpTypesX env tys1 tys2-nonDetCmpTypesX _   []        _         = LT-nonDetCmpTypesX _   _         []        = GT------------------ | Compare two 'TyCon's. NB: This should /never/ see 'Constraint' (as--- recognized by Kind.isConstraintKindCon) which is considered a synonym for--- 'Type' in Core.--- See Note [Kind Constraint and kind Type] in Kind.--- See Note [nonDetCmpType nondeterminism]-nonDetCmpTc :: TyCon -> TyCon -> Ordering-nonDetCmpTc tc1 tc2-  = ASSERT( not (isConstraintKindCon tc1) && not (isConstraintKindCon tc2) )-    u1 `nonDetCmpUnique` u2-  where-    u1  = tyConUnique tc1-    u2  = tyConUnique tc2--{--************************************************************************-*                                                                      *-        The kind of a type-*                                                                      *-************************************************************************--Note [typeKind vs tcTypeKind]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We have two functions to get the kind of a type--  * typeKind   ignores  the distinction between Constraint and *-  * tcTypeKind respects the distinction between Constraint and *--tcTypeKind is used by the type inference engine, for which Constraint-and * are different; after that we use typeKind.--See also Note [coreView vs tcView]--Note [Kinding rules for types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In typeKind we consider Constraint and (TYPE LiftedRep) to be identical.-We then have--         t1 : TYPE rep1-         t2 : TYPE rep2-   (FUN) -----------------         t1 -> t2 : Type--         ty : TYPE rep-         `a` is not free in rep-(FORALL) ------------------------         forall a. ty : TYPE rep--In tcTypeKind we consider Constraint and (TYPE LiftedRep) to be distinct:--          t1 : TYPE rep1-          t2 : TYPE rep2-    (FUN) -----------------          t1 -> t2 : Type--          t1 : Constraint-          t2 : TYPE rep-  (PRED1) -----------------          t1 => t2 : Type--          t1 : Constraint-          t2 : Constraint-  (PRED2) ----------------------          t1 => t2 : Constraint--          ty : TYPE rep-          `a` is not free in rep-(FORALL1) ------------------------          forall a. ty : TYPE rep--          ty : Constraint-(FORALL2) --------------------------          forall a. ty : Constraint--Note that:-* The only way we distinguish '->' from '=>' is by the fact-  that the argument is a PredTy.  Both are FunTys--}--------------------------------typeKind :: HasDebugCallStack => Type -> Kind-typeKind (TyConApp tc tys) = piResultTys (tyConKind tc) tys-typeKind (LitTy l)         = typeLiteralKind l-typeKind (FunTy {})        = liftedTypeKind-typeKind (TyVarTy tyvar)   = tyVarKind tyvar-typeKind (CastTy _ty co)   = pSnd $ coercionKind co-typeKind (CoercionTy co)   = coercionType co--typeKind (AppTy fun arg)-  = go fun [arg]-  where-    -- Accumulate the type arugments, so we can call piResultTys,-    -- rather than a succession of calls to piResultTy (which is-    -- asymptotically costly as the number of arguments increases)-    go (AppTy fun arg) args = go fun (arg:args)-    go fun             args = piResultTys (typeKind fun) args--typeKind ty@(ForAllTy {})-  = case occCheckExpand tvs body_kind of   -- We must make sure tv does not occur in kind-      Just k' -> k'                        -- As it is already out of scope!-      Nothing -> pprPanic "typeKind"-                  (ppr ty $$ ppr tvs $$ ppr body <+> dcolon <+> ppr body_kind)-  where-    (tvs, body) = splitTyVarForAllTys ty-    body_kind   = typeKind body--------------------------------tcTypeKind :: HasDebugCallStack => Type -> Kind-tcTypeKind (TyConApp tc tys) = piResultTys (tyConKind tc) tys-tcTypeKind (LitTy l)         = typeLiteralKind l-tcTypeKind (TyVarTy tyvar)   = tyVarKind tyvar-tcTypeKind (CastTy _ty co)   = pSnd $ coercionKind co-tcTypeKind (CoercionTy co)   = coercionType co--tcTypeKind (FunTy arg res)-  | isPredTy arg && isPredTy res = constraintKind-  | otherwise                    = liftedTypeKind--tcTypeKind (AppTy fun arg)-  = go fun [arg]-  where-    -- Accumulate the type arugments, so we can call piResultTys,-    -- rather than a succession of calls to piResultTy (which is-    -- asymptotically costly as the number of arguments increases)-    go (AppTy fun arg) args = go fun (arg:args)-    go fun             args = piResultTys (tcTypeKind fun) args--tcTypeKind ty@(ForAllTy {})-  | tcIsConstraintKind body_kind-  = constraintKind--  | otherwise-  = case occCheckExpand tvs body_kind of   -- We must make sure tv does not occur in kind-      Just k' -> k'                        -- As it is already out of scope!-      Nothing -> pprPanic "tcTypeKind"-                  (ppr ty $$ ppr tvs $$ ppr body <+> dcolon <+> ppr body_kind)-  where-    (tvs, body) = splitTyVarForAllTys ty-    body_kind = tcTypeKind body---isPredTy :: Type -> Bool--- See Note [Types for coercions, predicates, and evidence]-isPredTy ty = tcIsConstraintKind (tcTypeKind ty)-----------------------------typeLiteralKind :: TyLit -> Kind-typeLiteralKind l =-  case l of-    NumTyLit _ -> typeNatKind-    StrTyLit _ -> typeSymbolKind---- | Returns True if a type is levity polymorphic. Should be the same--- as (isKindLevPoly . typeKind) but much faster.--- Precondition: The type has kind (TYPE blah)-isTypeLevPoly :: Type -> Bool-isTypeLevPoly = go-  where-    go ty@(TyVarTy {})                           = check_kind ty-    go ty@(AppTy {})                             = check_kind ty-    go ty@(TyConApp tc _) | not (isTcLevPoly tc) = False-                          | otherwise            = check_kind ty-    go (ForAllTy _ ty)                           = go ty-    go (FunTy {})                                = False-    go (LitTy {})                                = False-    go ty@(CastTy {})                            = check_kind ty-    go ty@(CoercionTy {})                        = pprPanic "isTypeLevPoly co" (ppr ty)--    check_kind = isKindLevPoly . typeKind---- | Looking past all pi-types, is the end result potentially levity polymorphic?--- Example: True for (forall r (a :: TYPE r). String -> a)--- Example: False for (forall r1 r2 (a :: TYPE r1) (b :: TYPE r2). a -> b -> Type)-resultIsLevPoly :: Type -> Bool-resultIsLevPoly = isTypeLevPoly . snd . splitPiTys---{- **********************************************************************-*                                                                       *-           Occurs check expansion-%*                                                                      *-%********************************************************************* -}--{- Note [Occurs check expansion]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-(occurCheckExpand tv xi) expands synonyms in xi just enough to get rid-of occurrences of tv outside type function arguments, if that is-possible; otherwise, it returns Nothing.--For example, suppose we have-  type F a b = [a]-Then-  occCheckExpand b (F Int b) = Just [Int]-but-  occCheckExpand a (F a Int) = Nothing--We don't promise to do the absolute minimum amount of expanding-necessary, but we try not to do expansions we don't need to.  We-prefer doing inner expansions first.  For example,-  type F a b = (a, Int, a, [a])-  type G b   = Char-We have-  occCheckExpand b (F (G b)) = Just (F Char)-even though we could also expand F to get rid of b.--}--occCheckExpand :: [Var] -> Type -> Maybe Type--- See Note [Occurs check expansion]--- We may have needed to do some type synonym unfolding in order to--- get rid of the variable (or forall), so we also return the unfolded--- version of the type, which is guaranteed to be syntactically free--- of the given type variable.  If the type is already syntactically--- free of the variable, then the same type is returned.-occCheckExpand vs_to_avoid ty-  = go (mkVarSet vs_to_avoid, emptyVarEnv) ty-  where-    go :: (VarSet, VarEnv TyCoVar) -> Type -> Maybe Type-          -- The VarSet is the set of variables we are trying to avoid-          -- The VarEnv carries mappings necessary-          -- because of kind expansion-    go cxt@(as, env) (TyVarTy tv')-      | tv' `elemVarSet` as               = Nothing-      | Just tv'' <- lookupVarEnv env tv' = return (mkTyVarTy tv'')-      | otherwise                         = do { tv'' <- go_var cxt tv'-                                               ; return (mkTyVarTy tv'') }--    go _   ty@(LitTy {}) = return ty-    go cxt (AppTy ty1 ty2) = do { ty1' <- go cxt ty1-                                ; ty2' <- go cxt ty2-                                ; return (mkAppTy ty1' ty2') }-    go cxt (FunTy ty1 ty2) = do { ty1' <- go cxt ty1-                                ; ty2' <- go cxt ty2-                                ; return (mkFunTy ty1' ty2') }-    go cxt@(as, env) (ForAllTy (Bndr tv vis) body_ty)-       = do { ki' <- go cxt (varType tv)-            ; let tv' = setVarType tv ki'-                  env' = extendVarEnv env tv tv'-                  as'  = as `delVarSet` tv-            ; body' <- go (as', env') body_ty-            ; return (ForAllTy (Bndr tv' vis) body') }--    -- For a type constructor application, first try expanding away the-    -- offending variable from the arguments.  If that doesn't work, next-    -- see if the type constructor is a type synonym, and if so, expand-    -- it and try again.-    go cxt ty@(TyConApp tc tys)-      = case mapM (go cxt) tys of-          Just tys' -> return (mkTyConApp tc tys')-          Nothing | Just ty' <- tcView ty -> go cxt ty'-                  | otherwise             -> Nothing-                      -- Failing that, try to expand a synonym--    go cxt (CastTy ty co) =  do { ty' <- go cxt ty-                                ; co' <- go_co cxt co-                                ; return (mkCastTy ty' co') }-    go cxt (CoercionTy co) = do { co' <- go_co cxt co-                                ; return (mkCoercionTy co') }--    -------------------    go_var cxt v = do { k' <- go cxt (varType v)-                      ; return (setVarType v k') }-           -- Works for TyVar and CoVar-           -- See Note [Occurrence checking: look inside kinds]--    -------------------    go_mco _   MRefl = return MRefl-    go_mco ctx (MCo co) = MCo <$> go_co ctx co--    -------------------    go_co cxt (Refl ty)                 = do { ty' <- go cxt ty-                                             ; return (mkNomReflCo ty') }-    go_co cxt (GRefl r ty mco)          = do { mco' <- go_mco cxt mco-                                             ; ty' <- go cxt ty-                                             ; return (mkGReflCo r ty' mco') }-      -- Note: Coercions do not contain type synonyms-    go_co cxt (TyConAppCo r tc args)    = do { args' <- mapM (go_co cxt) args-                                             ; return (mkTyConAppCo r tc args') }-    go_co cxt (AppCo co arg)            = do { co' <- go_co cxt co-                                             ; arg' <- go_co cxt arg-                                             ; return (mkAppCo co' arg') }-    go_co cxt@(as, env) (ForAllCo tv kind_co body_co)-      = do { kind_co' <- go_co cxt kind_co-           ; let tv' = setVarType tv $-                       pFst (coercionKind kind_co')-                 env' = extendVarEnv env tv tv'-                 as'  = as `delVarSet` tv-           ; body' <- go_co (as', env') body_co-           ; return (ForAllCo tv' kind_co' body') }-    go_co cxt (FunCo r co1 co2)         = do { co1' <- go_co cxt co1-                                             ; co2' <- go_co cxt co2-                                             ; return (mkFunCo r co1' co2') }-    go_co cxt@(as,env) (CoVarCo c)-      | c `elemVarSet` as               = Nothing-      | Just c' <- lookupVarEnv env c   = return (mkCoVarCo c')-      | otherwise                       = do { c' <- go_var cxt c-                                             ; return (mkCoVarCo c') }-    go_co cxt (HoleCo h)                = do { c' <- go_var cxt (ch_co_var h)-                                             ; return (HoleCo (h { ch_co_var = c' })) }-    go_co cxt (AxiomInstCo ax ind args) = do { args' <- mapM (go_co cxt) args-                                             ; return (mkAxiomInstCo ax ind args') }-    go_co cxt (UnivCo p r ty1 ty2)      = do { p' <- go_prov cxt p-                                             ; ty1' <- go cxt ty1-                                             ; ty2' <- go cxt ty2-                                             ; return (mkUnivCo p' r ty1' ty2') }-    go_co cxt (SymCo co)                = do { co' <- go_co cxt co-                                             ; return (mkSymCo co') }-    go_co cxt (TransCo co1 co2)         = do { co1' <- go_co cxt co1-                                             ; co2' <- go_co cxt co2-                                             ; return (mkTransCo co1' co2') }-    go_co cxt (NthCo r n co)            = do { co' <- go_co cxt co-                                             ; return (mkNthCo r n co') }-    go_co cxt (LRCo lr co)              = do { co' <- go_co cxt co-                                             ; return (mkLRCo lr co') }-    go_co cxt (InstCo co arg)           = do { co' <- go_co cxt co-                                             ; arg' <- go_co cxt arg-                                             ; return (mkInstCo co' arg') }-    go_co cxt (KindCo co)               = do { co' <- go_co cxt co-                                             ; return (mkKindCo co') }-    go_co cxt (SubCo co)                = do { co' <- go_co cxt co-                                             ; return (mkSubCo co') }-    go_co cxt (AxiomRuleCo ax cs)       = do { cs' <- mapM (go_co cxt) cs-                                             ; return (mkAxiomRuleCo ax cs') }--    -------------------    go_prov _   UnsafeCoerceProv    = return UnsafeCoerceProv-    go_prov cxt (PhantomProv co)    = PhantomProv <$> go_co cxt co-    go_prov cxt (ProofIrrelProv co) = ProofIrrelProv <$> go_co cxt co-    go_prov _   p@(PluginProv _)    = return p---{--%************************************************************************-%*                                                                      *-        Miscellaneous functions-%*                                                                      *-%************************************************************************---}--- | All type constructors occurring in the type; looking through type---   synonyms, but not newtypes.---  When it finds a Class, it returns the class TyCon.-tyConsOfType :: Type -> UniqSet TyCon-tyConsOfType ty-  = go ty-  where-     go :: Type -> UniqSet TyCon  -- The UniqSet does duplicate elim-     go ty | Just ty' <- coreView ty = go ty'-     go (TyVarTy {})                = emptyUniqSet-     go (LitTy {})                  = emptyUniqSet-     go (TyConApp tc tys)           = go_tc tc `unionUniqSets` go_s tys-     go (AppTy a b)                 = go a `unionUniqSets` go b-     go (FunTy a b)                 = go a `unionUniqSets` go b `unionUniqSets` go_tc funTyCon-     go (ForAllTy (Bndr tv _) ty)   = go ty `unionUniqSets` go (varType tv)-     go (CastTy ty co)              = go ty `unionUniqSets` go_co co-     go (CoercionTy co)             = go_co co--     go_co (Refl ty)               = go ty-     go_co (GRefl _ ty mco)        = go ty `unionUniqSets` go_mco mco-     go_co (TyConAppCo _ tc args)  = go_tc tc `unionUniqSets` go_cos args-     go_co (AppCo co arg)          = go_co co `unionUniqSets` go_co arg-     go_co (ForAllCo _ kind_co co) = go_co kind_co `unionUniqSets` go_co co-     go_co (FunCo _ co1 co2)       = go_co co1 `unionUniqSets` go_co co2-     go_co (AxiomInstCo ax _ args) = go_ax ax `unionUniqSets` go_cos args-     go_co (UnivCo p _ t1 t2)      = go_prov p `unionUniqSets` go t1 `unionUniqSets` go t2-     go_co (CoVarCo {})            = emptyUniqSet-     go_co (HoleCo {})             = emptyUniqSet-     go_co (SymCo co)              = go_co co-     go_co (TransCo co1 co2)       = go_co co1 `unionUniqSets` go_co co2-     go_co (NthCo _ _ co)          = go_co co-     go_co (LRCo _ co)             = go_co co-     go_co (InstCo co arg)         = go_co co `unionUniqSets` go_co arg-     go_co (KindCo co)             = go_co co-     go_co (SubCo co)              = go_co co-     go_co (AxiomRuleCo _ cs)      = go_cos cs--     go_mco MRefl    = emptyUniqSet-     go_mco (MCo co) = go_co co--     go_prov UnsafeCoerceProv    = emptyUniqSet-     go_prov (PhantomProv co)    = go_co co-     go_prov (ProofIrrelProv co) = go_co co-     go_prov (PluginProv _)      = emptyUniqSet-        -- this last case can happen from the tyConsOfType used from-        -- checkTauTvUpdate--     go_s tys     = foldr (unionUniqSets . go)     emptyUniqSet tys-     go_cos cos   = foldr (unionUniqSets . go_co)  emptyUniqSet cos--     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.-splitVisVarsOfType :: Type -> Pair TyCoVarSet-splitVisVarsOfType orig_ty = Pair invis_vars vis_vars-  where-    Pair invis_vars1 vis_vars = go orig_ty-    invis_vars = invis_vars1 `minusVarSet` vis_vars--    go (TyVarTy tv)      = Pair (tyCoVarsOfType $ tyVarKind tv) (unitVarSet tv)-    go (AppTy t1 t2)     = go t1 `mappend` go t2-    go (TyConApp tc tys) = go_tc tc tys-    go (FunTy t1 t2)     = go t1 `mappend` go t2-    go (ForAllTy (Bndr tv _) ty)-      = ((`delVarSet` tv) <$> go ty) `mappend`-        (invisible (tyCoVarsOfType $ varType tv))-    go (LitTy {}) = mempty-    go (CastTy ty co) = go ty `mappend` invisible (tyCoVarsOfCo co)-    go (CoercionTy co) = invisible $ tyCoVarsOfCo co--    invisible vs = Pair vs emptyVarSet--    go_tc tc tys = let (invis, vis) = partitionInvisibleTypes tc tys in-                   invisible (tyCoVarsOfTypes invis) `mappend` foldMap go vis--splitVisVarsOfTypes :: [Type] -> Pair TyCoVarSet-splitVisVarsOfTypes = foldMap splitVisVarsOfType--modifyJoinResTy :: Int            -- Number of binders to skip-                -> (Type -> Type) -- Function to apply to result type-                -> Type           -- Type of join point-                -> Type           -- New type--- INVARIANT: If any of the first n binders are foralls, those tyvars cannot--- appear in the original result type. See isValidJoinPointType.-modifyJoinResTy orig_ar f orig_ty-  = go orig_ar orig_ty-  where-    go 0 ty = f ty-    go n ty | Just (arg_bndr, res_ty) <- splitPiTy_maybe ty-            = mkTyCoPiTy arg_bndr (go (n-1) res_ty)-            | otherwise-            = pprPanic "modifyJoinResTy" (ppr orig_ar <+> ppr orig_ty)--setJoinResTy :: Int  -- Number of binders to skip-             -> Type -- New result type-             -> Type -- Type of join point-             -> Type -- New type--- INVARIANT: Same as for modifyJoinResTy-setJoinResTy ar new_res_ty ty-  = modifyJoinResTy ar (const new_res_ty) ty---{--%************************************************************************-%*                                                                      *-         Pretty-printing-%*                                                                      *-%************************************************************************--Most pretty-printing is either in TyCoRep or IfaceType.---}---- | This variant preserves any use of TYPE in a type, effectively--- locally setting -fprint-explicit-runtime-reps.-pprWithTYPE :: Type -> SDoc-pprWithTYPE ty = updSDocDynFlags (flip gopt_set Opt_PrintExplicitRuntimeReps) $-                 ppr ty+        TyThing(..), Type, ArgFlag(..), AnonArgFlag(..), ForallVisFlag(..),+        KindOrType, PredType, ThetaType,+        Var, TyVar, isTyVar, TyCoVar, TyCoBinder, TyCoVarBinder, TyVarBinder,+        KnotTied,++        -- ** Constructing and deconstructing types+        mkTyVarTy, mkTyVarTys, getTyVar, getTyVar_maybe, repGetTyVar_maybe,+        getCastedTyVar_maybe, tyVarKind, varType,++        mkAppTy, mkAppTys, splitAppTy, splitAppTys, repSplitAppTys,+        splitAppTy_maybe, repSplitAppTy_maybe, tcRepSplitAppTy_maybe,++        mkVisFunTy, mkInvisFunTy, mkVisFunTys, mkInvisFunTys,+        splitFunTy, splitFunTy_maybe,+        splitFunTys, funResultTy, funArgTy,++        mkTyConApp, mkTyConTy,+        tyConAppTyCon_maybe, tyConAppTyConPicky_maybe,+        tyConAppArgs_maybe, tyConAppTyCon, tyConAppArgs,+        splitTyConApp_maybe, splitTyConApp, tyConAppArgN, nextRole,+        tcSplitTyConApp_maybe,+        splitListTyConApp_maybe,+        repSplitTyConApp_maybe,++        mkForAllTy, mkForAllTys, mkTyCoInvForAllTys,+        mkSpecForAllTy, mkSpecForAllTys,+        mkVisForAllTys, mkTyCoInvForAllTy,+        mkInvForAllTy, mkInvForAllTys,+        splitForAllTys, splitForAllTysSameVis,+        splitForAllVarBndrs,+        splitForAllTy_maybe, splitForAllTy,+        splitForAllTy_ty_maybe, splitForAllTy_co_maybe,+        splitPiTy_maybe, splitPiTy, splitPiTys,+        mkTyConBindersPreferAnon,+        mkPiTy, mkPiTys,+        mkLamType, mkLamTypes,+        piResultTy, piResultTys,+        applyTysX, dropForAlls,+        mkFamilyTyConApp,++        mkNumLitTy, isNumLitTy,+        mkStrLitTy, isStrLitTy,+        isLitTy,++        isPredTy,++        getRuntimeRep_maybe, kindRep_maybe, kindRep,++        mkCastTy, mkCoercionTy, splitCastTy_maybe,+        discardCast,++        userTypeError_maybe, pprUserTypeErrorTy,++        coAxNthLHS,+        stripCoercionTy,++        splitPiTysInvisible, splitPiTysInvisibleN,+        invisibleTyBndrCount,+        filterOutInvisibleTypes, filterOutInferredTypes,+        partitionInvisibleTypes, partitionInvisibles,+        tyConArgFlags, appTyArgFlags,+        synTyConResKind,++        modifyJoinResTy, setJoinResTy,++        -- ** Analyzing types+        TyCoMapper(..), mapType, mapCoercion,++        -- (Newtypes)+        newTyConInstRhs,++        -- ** Binders+        sameVis,+        mkTyCoVarBinder, mkTyCoVarBinders,+        mkTyVarBinders,+        mkAnonBinder,+        isAnonTyCoBinder,+        binderVar, binderVars, binderType, binderArgFlag,+        tyCoBinderType, tyCoBinderVar_maybe,+        tyBinderType,+        binderRelevantType_maybe,+        isVisibleArgFlag, isInvisibleArgFlag, isVisibleBinder,+        isInvisibleBinder, isNamedBinder,+        tyConBindersTyCoBinders,++        -- ** Common type constructors+        funTyCon,++        -- ** Predicates on types+        isTyVarTy, isFunTy, isCoercionTy,+        isCoercionTy_maybe, isForAllTy,+        isForAllTy_ty, isForAllTy_co,+        isPiTy, isTauTy, isFamFreeTy,+        isCoVarType,++        isValidJoinPointType,+        tyConAppNeedsKindSig,++        -- *** Levity and boxity+        isLiftedType_maybe,+        isLiftedTypeKind, isUnliftedTypeKind,+        isLiftedRuntimeRep, isUnliftedRuntimeRep,+        isUnliftedType, mightBeUnliftedType, isUnboxedTupleType, isUnboxedSumType,+        isAlgType, isDataFamilyAppType,+        isPrimitiveType, isStrictType,+        isRuntimeRepTy, isRuntimeRepVar, isRuntimeRepKindedTy,+        dropRuntimeRepArgs,+        getRuntimeRep,++        -- * Main data types representing Kinds+        Kind,++        -- ** Finding the kind of a type+        typeKind, tcTypeKind, isTypeLevPoly, resultIsLevPoly,+        tcIsLiftedTypeKind, tcIsConstraintKind, tcReturnsConstraintKind,+        tcIsRuntimeTypeKind,++        -- ** Common Kind+        liftedTypeKind,++        -- * Type free variables+        tyCoFVsOfType, tyCoFVsBndr, tyCoFVsVarBndr, tyCoFVsVarBndrs,+        tyCoVarsOfType, tyCoVarsOfTypes,+        tyCoVarsOfTypeDSet,+        coVarsOfType,+        coVarsOfTypes,+        closeOverKindsDSet, closeOverKindsFV, closeOverKindsList,+        closeOverKinds,++        noFreeVarsOfType,+        splitVisVarsOfType, splitVisVarsOfTypes,+        expandTypeSynonyms,+        typeSize, occCheckExpand,++        -- * Well-scoped lists of variables+        scopedSort, tyCoVarsOfTypeWellScoped,+        tyCoVarsOfTypesWellScoped,++        -- * Type comparison+        eqType, eqTypeX, eqTypes, nonDetCmpType, nonDetCmpTypes, nonDetCmpTypeX,+        nonDetCmpTypesX, nonDetCmpTc,+        eqVarBndrs,++        -- * Forcing evaluation of types+        seqType, seqTypes,++        -- * Other views onto Types+        coreView, tcView,++        tyConsOfType,++        -- * Main type substitution data types+        TvSubstEnv,     -- Representation widely visible+        TCvSubst(..),    -- Representation visible to a few friends++        -- ** Manipulating type substitutions+        emptyTvSubstEnv, emptyTCvSubst, mkEmptyTCvSubst,++        mkTCvSubst, zipTvSubst, mkTvSubstPrs,+        zipTCvSubst,+        notElemTCvSubst,+        getTvSubstEnv, setTvSubstEnv,+        zapTCvSubst, getTCvInScope, getTCvSubstRangeFVs,+        extendTCvInScope, extendTCvInScopeList, extendTCvInScopeSet,+        extendTCvSubst, extendCvSubst,+        extendTvSubst, extendTvSubstBinderAndInScope,+        extendTvSubstList, extendTvSubstAndInScope,+        extendTCvSubstList,+        extendTvSubstWithClone,+        extendTCvSubstWithClone,+        isInScope, composeTCvSubstEnv, composeTCvSubst, zipTyEnv, zipCoEnv,+        isEmptyTCvSubst, unionTCvSubst,++        -- ** Performing substitution on types and kinds+        substTy, substTys, substTyWith, substTysWith, substTheta,+        substTyAddInScope,+        substTyUnchecked, substTysUnchecked, substThetaUnchecked,+        substTyWithUnchecked,+        substCoUnchecked, substCoWithUnchecked,+        substTyVarBndr, substTyVarBndrs, substTyVar, substTyVars,+        substVarBndr, substVarBndrs,+        cloneTyVarBndr, cloneTyVarBndrs, lookupTyVar,++        -- * Tidying type related things up for printing+        tidyType,      tidyTypes,+        tidyOpenType,  tidyOpenTypes,+        tidyOpenKind,+        tidyVarBndr, tidyVarBndrs, tidyFreeTyCoVars,+        tidyOpenTyCoVar, tidyOpenTyCoVars,+        tidyTyCoVarOcc,+        tidyTopType,+        tidyKind,+        tidyTyCoVarBinder, tidyTyCoVarBinders,++        -- * Kinds+        isConstraintKindCon,+        classifiesTypeWithValues,+        isKindLevPoly+    ) where++#include "HsVersions.h"++import GhcPrelude++import BasicTypes++-- We import the representation and primitive functions from TyCoRep.+-- Many things are reexported, but not the representation!++import TyCoRep+import TyCoSubst+import TyCoTidy+import TyCoFVs++-- friends:+import Var+import VarEnv+import VarSet+import UniqSet++import TyCon+import TysPrim+import {-# SOURCE #-} TysWiredIn ( listTyCon, typeNatKind+                                 , typeSymbolKind, liftedTypeKind+                                 , constraintKind )+import PrelNames+import CoAxiom+import {-# SOURCE #-} Coercion( mkNomReflCo, mkGReflCo, mkReflCo+                              , mkTyConAppCo, mkAppCo, mkCoVarCo, mkAxiomRuleCo+                              , mkForAllCo, mkFunCo, mkAxiomInstCo, mkUnivCo+                              , mkSymCo, mkTransCo, mkNthCo, mkLRCo, mkInstCo+                              , mkKindCo, mkSubCo, mkFunCo, mkAxiomInstCo+                              , decomposePiCos, coercionKind, coercionType+                              , isReflexiveCo, seqCo )++-- others+import Util+import FV+import Outputable+import FastString+import Pair+import ListSetOps+import Unique ( nonDetCmpUnique )++import Maybes           ( orElse )+import Data.Maybe       ( isJust )+import Control.Monad    ( guard )++-- $type_classification+-- #type_classification#+--+-- Types are one of:+--+-- [Unboxed]            Iff its representation is other than a pointer+--                      Unboxed types are also unlifted.+--+-- [Lifted]             Iff it has bottom as an element.+--                      Closures always have lifted types: i.e. any+--                      let-bound identifier in Core must have a lifted+--                      type. Operationally, a lifted object is one that+--                      can be entered.+--                      Only lifted types may be unified with a type variable.+--+-- [Algebraic]          Iff it is a type with one or more constructors, whether+--                      declared with @data@ or @newtype@.+--                      An algebraic type is one that can be deconstructed+--                      with a case expression. This is /not/ the same as+--                      lifted types, because we also include unboxed+--                      tuples in this classification.+--+-- [Data]               Iff it is a type declared with @data@, or a boxed tuple.+--+-- [Primitive]          Iff it is a built-in type that can't be expressed in Haskell.+--+-- Currently, all primitive types are unlifted, but that's not necessarily+-- the case: for example, @Int@ could be primitive.+--+-- Some primitive types are unboxed, such as @Int#@, whereas some are boxed+-- but unlifted (such as @ByteArray#@).  The only primitive types that we+-- classify as algebraic are the unboxed tuples.+--+-- Some examples of type classifications that may make this a bit clearer are:+--+-- @+-- Type          primitive       boxed           lifted          algebraic+-- -----------------------------------------------------------------------------+-- Int#          Yes             No              No              No+-- ByteArray#    Yes             Yes             No              No+-- (\# a, b \#)  Yes             No              No              Yes+-- (\# a | b \#) Yes             No              No              Yes+-- (  a, b  )    No              Yes             Yes             Yes+-- [a]           No              Yes             Yes             Yes+-- @++-- $representation_types+-- A /source type/ is a type that is a separate type as far as the type checker is+-- concerned, but which has a more low-level representation as far as Core-to-Core+-- passes and the rest of the back end is concerned.+--+-- You don't normally have to worry about this, as the utility functions in+-- this module will automatically convert a source into a representation type+-- if they are spotted, to the best of its abilities. If you don't want this+-- to happen, use the equivalent functions from the "TcType" module.++{-+************************************************************************+*                                                                      *+                Type representation+*                                                                      *+************************************************************************++Note [coreView vs tcView]+~~~~~~~~~~~~~~~~~~~~~~~~~+So far as the typechecker is concerned, 'Constraint' and 'TYPE+LiftedRep' are distinct kinds.++But in Core these two are treated as identical.++We implement this by making 'coreView' convert 'Constraint' to 'TYPE+LiftedRep' on the fly.  The function tcView (used in the type checker)+does not do this.++See also #11715, which tracks removing this inconsistency.++-}++-- | Gives the typechecker view of a type. This unwraps synonyms but+-- leaves 'Constraint' alone. c.f. coreView, which turns Constraint into+-- TYPE LiftedRep. Returns Nothing if no unwrapping happens.+-- See also Note [coreView vs tcView]+{-# INLINE tcView #-}+tcView :: Type -> Maybe Type+tcView (TyConApp tc tys) | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys+  = Just (mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys')+               -- The free vars of 'rhs' should all be bound by 'tenv', so it's+               -- ok to use 'substTy' here.+               -- See also Note [The substitution invariant] in TyCoSubst.+               -- Its important to use mkAppTys, rather than (foldl AppTy),+               -- because the function part might well return a+               -- partially-applied type constructor; indeed, usually will!+tcView _ = Nothing++{-# INLINE coreView #-}+coreView :: Type -> Maybe Type+-- ^ This function Strips off the /top layer only/ of a type synonym+-- application (if any) its underlying representation type.+-- Returns Nothing if there is nothing to look through.+-- This function considers 'Constraint' to be a synonym of @TYPE LiftedRep@.+--+-- By being non-recursive and inlined, this case analysis gets efficiently+-- joined onto the case analysis that the caller is already doing+coreView ty@(TyConApp tc tys)+  | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys+  = Just (mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys')+    -- This equation is exactly like tcView++  -- At the Core level, Constraint = Type+  -- See Note [coreView vs tcView]+  | isConstraintKindCon tc+  = ASSERT2( null tys, ppr ty )+    Just liftedTypeKind++coreView _ = Nothing++-----------------------------------------------+expandTypeSynonyms :: Type -> Type+-- ^ Expand out all type synonyms.  Actually, it'd suffice to expand out+-- just the ones that discard type variables (e.g.  type Funny a = Int)+-- But we don't know which those are currently, so we just expand all.+--+-- 'expandTypeSynonyms' only expands out type synonyms mentioned in the type,+-- not in the kinds of any TyCon or TyVar mentioned in the type.+--+-- Keep this synchronized with 'synonymTyConsOfType'+expandTypeSynonyms ty+  = go (mkEmptyTCvSubst in_scope) ty+  where+    in_scope = mkInScopeSet (tyCoVarsOfType ty)++    go subst (TyConApp tc tys)+      | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc expanded_tys+      = let subst' = mkTvSubst in_scope (mkVarEnv tenv)+            -- Make a fresh substitution; rhs has nothing to+            -- do with anything that has happened so far+            -- NB: if you make changes here, be sure to build an+            --     /idempotent/ substitution, even in the nested case+            --        type T a b = a -> b+            --        type S x y = T y x+            -- (#11665)+        in  mkAppTys (go subst' rhs) tys'+      | otherwise+      = TyConApp tc expanded_tys+      where+        expanded_tys = (map (go subst) tys)++    go _     (LitTy l)     = LitTy l+    go subst (TyVarTy tv)  = substTyVar subst tv+    go subst (AppTy t1 t2) = mkAppTy (go subst t1) (go subst t2)+    go subst ty@(FunTy _ arg res)+      = ty { ft_arg = go subst arg, ft_res = go subst res }+    go subst (ForAllTy (Bndr tv vis) t)+      = let (subst', tv') = substVarBndrUsing go subst tv in+        ForAllTy (Bndr tv' vis) (go subst' t)+    go subst (CastTy ty co)  = mkCastTy (go subst ty) (go_co subst co)+    go subst (CoercionTy co) = mkCoercionTy (go_co subst co)++    go_mco _     MRefl    = MRefl+    go_mco subst (MCo co) = MCo (go_co subst co)++    go_co subst (Refl ty)+      = mkNomReflCo (go subst ty)+    go_co subst (GRefl r ty mco)+      = mkGReflCo r (go subst ty) (go_mco subst mco)+       -- NB: coercions are always expanded upon creation+    go_co subst (TyConAppCo r tc args)+      = mkTyConAppCo r tc (map (go_co subst) args)+    go_co subst (AppCo co arg)+      = mkAppCo (go_co subst co) (go_co subst arg)+    go_co subst (ForAllCo tv kind_co co)+      = let (subst', tv', kind_co') = go_cobndr subst tv kind_co in+        mkForAllCo tv' kind_co' (go_co subst' co)+    go_co subst (FunCo r co1 co2)+      = mkFunCo r (go_co subst co1) (go_co subst co2)+    go_co subst (CoVarCo cv)+      = substCoVar subst cv+    go_co subst (AxiomInstCo ax ind args)+      = mkAxiomInstCo ax ind (map (go_co subst) args)+    go_co subst (UnivCo p r t1 t2)+      = mkUnivCo (go_prov subst p) r (go subst t1) (go subst t2)+    go_co subst (SymCo co)+      = mkSymCo (go_co subst co)+    go_co subst (TransCo co1 co2)+      = mkTransCo (go_co subst co1) (go_co subst co2)+    go_co subst (NthCo r n co)+      = mkNthCo r n (go_co subst co)+    go_co subst (LRCo lr co)+      = mkLRCo lr (go_co subst co)+    go_co subst (InstCo co arg)+      = mkInstCo (go_co subst co) (go_co subst arg)+    go_co subst (KindCo co)+      = mkKindCo (go_co subst co)+    go_co subst (SubCo co)+      = mkSubCo (go_co subst co)+    go_co subst (AxiomRuleCo ax cs)+      = AxiomRuleCo ax (map (go_co subst) cs)+    go_co _ (HoleCo h)+      = pprPanic "expandTypeSynonyms hit a hole" (ppr h)++    go_prov _     UnsafeCoerceProv    = UnsafeCoerceProv+    go_prov subst (PhantomProv co)    = PhantomProv (go_co subst co)+    go_prov subst (ProofIrrelProv co) = ProofIrrelProv (go_co subst co)+    go_prov _     p@(PluginProv _)    = p++      -- the "False" and "const" are to accommodate the type of+      -- substForAllCoBndrUsing, which is general enough to+      -- handle coercion optimization (which sometimes swaps the+      -- order of a coercion)+    go_cobndr subst = substForAllCoBndrUsing False (go_co subst) subst+++-- | Extract the RuntimeRep classifier of a type from its kind. For example,+-- @kindRep * = LiftedRep@; Panics if this is not possible.+-- Treats * and Constraint as the same+kindRep :: HasDebugCallStack => Kind -> Type+kindRep k = case kindRep_maybe k of+              Just r  -> r+              Nothing -> pprPanic "kindRep" (ppr k)++-- | Given a kind (TYPE rr), extract its RuntimeRep classifier rr.+-- For example, @kindRep_maybe * = Just LiftedRep@+-- Returns 'Nothing' if the kind is not of form (TYPE rr)+-- Treats * and Constraint as the same+kindRep_maybe :: HasDebugCallStack => Kind -> Maybe Type+kindRep_maybe kind+  | Just kind' <- coreView kind = kindRep_maybe kind'+  | TyConApp tc [arg] <- kind+  , tc `hasKey` tYPETyConKey    = Just arg+  | otherwise                   = Nothing++-- | This version considers Constraint to be the same as *. Returns True+-- if the argument is equivalent to Type/Constraint and False otherwise.+-- See Note [Kind Constraint and kind Type]+isLiftedTypeKind :: Kind -> Bool+isLiftedTypeKind kind+  = case kindRep_maybe kind of+      Just rep -> isLiftedRuntimeRep rep+      Nothing  -> False++isLiftedRuntimeRep :: Type -> Bool+-- isLiftedRuntimeRep is true of LiftedRep :: RuntimeRep+-- False of type variables (a :: RuntimeRep)+--   and of other reps e.g. (IntRep :: RuntimeRep)+isLiftedRuntimeRep rep+  | Just rep' <- coreView rep          = isLiftedRuntimeRep rep'+  | TyConApp rr_tc args <- rep+  , rr_tc `hasKey` liftedRepDataConKey = ASSERT( null args ) True+  | otherwise                          = False++-- | Returns True if the kind classifies unlifted types and False otherwise.+-- Note that this returns False for levity-polymorphic kinds, which may+-- be specialized to a kind that classifies unlifted types.+isUnliftedTypeKind :: Kind -> Bool+isUnliftedTypeKind kind+  = case kindRep_maybe kind of+      Just rep -> isUnliftedRuntimeRep rep+      Nothing  -> False++isUnliftedRuntimeRep :: Type -> Bool+-- True of definitely-unlifted RuntimeReps+-- False of           (LiftedRep :: RuntimeRep)+--   and of variables (a :: RuntimeRep)+isUnliftedRuntimeRep rep+  | Just rep' <- coreView rep = isUnliftedRuntimeRep rep'+  | TyConApp rr_tc _ <- rep   -- NB: args might be non-empty+                              --     e.g. TupleRep [r1, .., rn]+  = isPromotedDataCon rr_tc && not (rr_tc `hasKey` liftedRepDataConKey)+        -- Avoid searching all the unlifted RuntimeRep type cons+        -- In the RuntimeRep data type, only LiftedRep is lifted+        -- But be careful of type families (F tys) :: RuntimeRep+  | otherwise {- Variables, applications -}+  = False++-- | Is this the type 'RuntimeRep'?+isRuntimeRepTy :: Type -> Bool+isRuntimeRepTy ty | Just ty' <- coreView ty = isRuntimeRepTy ty'+isRuntimeRepTy (TyConApp tc args)+  | tc `hasKey` runtimeRepTyConKey = ASSERT( null args ) True+isRuntimeRepTy _ = False++-- | Is a tyvar of type 'RuntimeRep'?+isRuntimeRepVar :: TyVar -> Bool+isRuntimeRepVar = isRuntimeRepTy . tyVarKind+++{-+************************************************************************+*                                                                      *+   Analyzing types+*                                                                      *+************************************************************************++These functions do a map-like operation over types, performing some operation+on all variables and binding sites. Primarily used for zonking.++Note [Efficiency for mapCoercion ForAllCo case]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+As noted in Note [Forall coercions] in TyCoRep, a ForAllCo is a bit redundant.+It stores a TyCoVar and a Coercion, where the kind of the TyCoVar always matches+the left-hand kind of the coercion. This is convenient lots of the time, but+not when mapping a function over a coercion.++The problem is that tcm_tybinder will affect the TyCoVar's kind and+mapCoercion will affect the Coercion, and we hope that the results will be+the same. Even if they are the same (which should generally happen with+correct algorithms), then there is an efficiency issue. In particular,+this problem seems to make what should be a linear algorithm into a potentially+exponential one. But it's only going to be bad in the case where there's+lots of foralls in the kinds of other foralls. Like this:++  forall a : (forall b : (forall c : ...). ...). ...++This construction seems unlikely. So we'll do the inefficient, easy way+for now.++Note [Specialising mappers]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+These INLINABLE pragmas are indispensable. mapType/mapCoercion are used+to implement zonking, and it's vital that they get specialised to the TcM+monad. This specialisation happens automatically (that is, without a+SPECIALISE pragma) as long as the definitions are INLINABLE. For example,+this one change made a 20% allocation difference in perf/compiler/T5030.++-}++-- | This describes how a "map" operation over a type/coercion should behave+data TyCoMapper env m+  = TyCoMapper+      { tcm_tyvar :: env -> TyVar -> m Type+      , tcm_covar :: env -> CoVar -> m Coercion+      , tcm_hole  :: env -> CoercionHole -> m Coercion+          -- ^ What to do with coercion holes.+          -- See Note [Coercion holes] in TyCoRep.++      , tcm_tycobinder :: env -> TyCoVar -> ArgFlag -> m (env, TyCoVar)+          -- ^ The returned env is used in the extended scope++      , tcm_tycon :: TyCon -> m TyCon+          -- ^ This is used only for TcTyCons+          -- a) To zonk TcTyCons+          -- b) To turn TcTyCons into TyCons.+          --    See Note [Type checking recursive type and class declarations]+          --    in TcTyClsDecls+      }++{-# INLINABLE mapType #-}  -- See Note [Specialising mappers]+mapType :: Monad m => TyCoMapper env m -> env -> Type -> m Type+mapType mapper@(TyCoMapper { tcm_tyvar = tyvar+                           , tcm_tycobinder = tycobinder+                           , tcm_tycon = tycon })+        env ty+  = go ty+  where+    go (TyVarTy tv)    = tyvar env tv+    go (AppTy t1 t2)   = mkAppTy <$> go t1 <*> go t2+    go ty@(LitTy {})   = return ty+    go (CastTy ty co)  = mkCastTy <$> go ty <*> mapCoercion mapper env co+    go (CoercionTy co) = CoercionTy <$> mapCoercion mapper env co++    go ty@(FunTy _ arg res)+      = do { arg' <- go arg; res' <- go res+           ; return (ty { ft_arg = arg', ft_res = res' }) }++    go ty@(TyConApp tc tys)+      | isTcTyCon tc+      = do { tc' <- tycon tc+           ; mkTyConApp tc' <$> mapM go tys }++      -- Not a TcTyCon+      | null tys    -- Avoid allocation in this very+      = return ty   -- common case (E.g. Int, LiftedRep etc)++      | otherwise+      = mkTyConApp tc <$> mapM go tys++    go (ForAllTy (Bndr tv vis) inner)+      = do { (env', tv') <- tycobinder env tv vis+           ; inner' <- mapType mapper env' inner+           ; return $ ForAllTy (Bndr tv' vis) inner' }++{-# INLINABLE mapCoercion #-}  -- See Note [Specialising mappers]+mapCoercion :: Monad m+            => TyCoMapper env m -> env -> Coercion -> m Coercion+mapCoercion mapper@(TyCoMapper { tcm_covar = covar+                               , tcm_hole = cohole+                               , tcm_tycobinder = tycobinder+                               , tcm_tycon = tycon })+            env co+  = go co+  where+    go_mco MRefl    = return MRefl+    go_mco (MCo co) = MCo <$> (go co)++    go (Refl ty) = Refl <$> mapType mapper env ty+    go (GRefl r ty mco) = mkGReflCo r <$> mapType mapper env ty <*> (go_mco mco)+    go (TyConAppCo r tc args)+      = do { tc' <- if isTcTyCon tc+                    then tycon tc+                    else return tc+           ; mkTyConAppCo r tc' <$> mapM go args }+    go (AppCo c1 c2) = mkAppCo <$> go c1 <*> go c2+    go (ForAllCo tv kind_co co)+      = do { kind_co' <- go kind_co+           ; (env', tv') <- tycobinder env tv Inferred+           ; co' <- mapCoercion mapper env' co+           ; return $ mkForAllCo tv' kind_co' co' }+        -- See Note [Efficiency for mapCoercion ForAllCo case]+    go (FunCo r c1 c2) = mkFunCo r <$> go c1 <*> go c2+    go (CoVarCo cv) = covar env cv+    go (AxiomInstCo ax i args)+      = mkAxiomInstCo ax i <$> mapM go args+    go (HoleCo hole) = cohole env hole+    go (UnivCo p r t1 t2)+      = mkUnivCo <$> go_prov p <*> pure r+                 <*> mapType mapper env t1 <*> mapType mapper env t2+    go (SymCo co) = mkSymCo <$> go co+    go (TransCo c1 c2) = mkTransCo <$> go c1 <*> go c2+    go (AxiomRuleCo r cos) = AxiomRuleCo r <$> mapM go cos+    go (NthCo r i co)      = mkNthCo r i <$> go co+    go (LRCo lr co)        = mkLRCo lr <$> go co+    go (InstCo co arg)     = mkInstCo <$> go co <*> go arg+    go (KindCo co)         = mkKindCo <$> go co+    go (SubCo co)          = mkSubCo <$> go co++    go_prov UnsafeCoerceProv    = return UnsafeCoerceProv+    go_prov (PhantomProv co)    = PhantomProv <$> go co+    go_prov (ProofIrrelProv co) = ProofIrrelProv <$> go co+    go_prov p@(PluginProv _)    = return p++{-+************************************************************************+*                                                                      *+\subsection{Constructor-specific functions}+*                                                                      *+************************************************************************+++---------------------------------------------------------------------+                                TyVarTy+                                ~~~~~~~+-}++-- | Attempts to obtain the type variable underlying a 'Type', and panics with the+-- given message if this is not a type variable type. See also 'getTyVar_maybe'+getTyVar :: String -> Type -> TyVar+getTyVar msg ty = case getTyVar_maybe ty of+                    Just tv -> tv+                    Nothing -> panic ("getTyVar: " ++ msg)++isTyVarTy :: Type -> Bool+isTyVarTy ty = isJust (getTyVar_maybe ty)++-- | Attempts to obtain the type variable underlying a 'Type'+getTyVar_maybe :: Type -> Maybe TyVar+getTyVar_maybe ty | Just ty' <- coreView ty = getTyVar_maybe ty'+                  | otherwise               = repGetTyVar_maybe ty++-- | If the type is a tyvar, possibly under a cast, returns it, along+-- with the coercion. Thus, the co is :: kind tv ~N kind ty+getCastedTyVar_maybe :: Type -> Maybe (TyVar, CoercionN)+getCastedTyVar_maybe ty | Just ty' <- coreView ty = getCastedTyVar_maybe ty'+getCastedTyVar_maybe (CastTy (TyVarTy tv) co)     = Just (tv, co)+getCastedTyVar_maybe (TyVarTy tv)+  = Just (tv, mkReflCo Nominal (tyVarKind tv))+getCastedTyVar_maybe _                            = Nothing++-- | Attempts to obtain the type variable underlying a 'Type', without+-- any expansion+repGetTyVar_maybe :: Type -> Maybe TyVar+repGetTyVar_maybe (TyVarTy tv) = Just tv+repGetTyVar_maybe _            = Nothing++{-+---------------------------------------------------------------------+                                AppTy+                                ~~~~~+We need to be pretty careful with AppTy to make sure we obey the+invariant that a TyConApp is always visibly so.  mkAppTy maintains the+invariant: use it.++Note [Decomposing fat arrow c=>t]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Can we unify (a b) with (Eq a => ty)?   If we do so, we end up with+a partial application like ((=>) Eq a) which doesn't make sense in+source Haskell.  In contrast, we *can* unify (a b) with (t1 -> t2).+Here's an example (#9858) of how you might do it:+   i :: (Typeable a, Typeable b) => Proxy (a b) -> TypeRep+   i p = typeRep p++   j = i (Proxy :: Proxy (Eq Int => Int))+The type (Proxy (Eq Int => Int)) is only accepted with -XImpredicativeTypes,+but suppose we want that.  But then in the call to 'i', we end+up decomposing (Eq Int => Int), and we definitely don't want that.++This really only applies to the type checker; in Core, '=>' and '->'+are the same, as are 'Constraint' and '*'.  But for now I've put+the test in repSplitAppTy_maybe, which applies throughout, because+the other calls to splitAppTy are in Unify, which is also used by+the type checker (e.g. when matching type-function equations).++-}++-- | Applies a type to another, as in e.g. @k a@+mkAppTy :: Type -> Type -> Type+  -- See Note [Respecting definitional equality], invariant (EQ1).+mkAppTy (CastTy fun_ty co) arg_ty+  | ([arg_co], res_co) <- decomposePiCos co (coercionKind co) [arg_ty]+  = (fun_ty `mkAppTy` (arg_ty `mkCastTy` arg_co)) `mkCastTy` res_co++mkAppTy (TyConApp tc tys) ty2 = mkTyConApp tc (tys ++ [ty2])+mkAppTy ty1               ty2 = AppTy ty1 ty2+        -- Note that the TyConApp could be an+        -- under-saturated type synonym.  GHC allows that; e.g.+        --      type Foo k = k a -> k a+        --      type Id x = x+        --      foo :: Foo Id -> Foo Id+        --+        -- Here Id is partially applied in the type sig for Foo,+        -- but once the type synonyms are expanded all is well+        --+        -- Moreover in TcHsTypes.tcInferApps we build up a type+        --   (T t1 t2 t3) one argument at a type, thus forming+        --   (T t1), (T t1 t2), etc++mkAppTys :: Type -> [Type] -> Type+mkAppTys ty1                []   = ty1+mkAppTys (CastTy fun_ty co) arg_tys  -- much more efficient then nested mkAppTy+                                     -- Why do this? See (EQ1) of+                                     -- Note [Respecting definitional equality]+                                     -- in TyCoRep+  = foldl' AppTy ((mkAppTys fun_ty casted_arg_tys) `mkCastTy` res_co) leftovers+  where+    (arg_cos, res_co) = decomposePiCos co (coercionKind co) arg_tys+    (args_to_cast, leftovers) = splitAtList arg_cos arg_tys+    casted_arg_tys = zipWith mkCastTy args_to_cast arg_cos+mkAppTys (TyConApp tc tys1) tys2 = mkTyConApp tc (tys1 ++ tys2)+mkAppTys ty1                tys2 = foldl' AppTy ty1 tys2++-------------+splitAppTy_maybe :: Type -> Maybe (Type, Type)+-- ^ Attempt to take a type application apart, whether it is a+-- function, type constructor, or plain type application. Note+-- that type family applications are NEVER unsaturated by this!+splitAppTy_maybe ty | Just ty' <- coreView ty+                    = splitAppTy_maybe ty'+splitAppTy_maybe ty = repSplitAppTy_maybe ty++-------------+repSplitAppTy_maybe :: HasDebugCallStack => Type -> Maybe (Type,Type)+-- ^ Does the AppTy split as in 'splitAppTy_maybe', but assumes that+-- any Core view stuff is already done+repSplitAppTy_maybe (FunTy _ ty1 ty2)+  = Just (TyConApp funTyCon [rep1, rep2, ty1], ty2)+  where+    rep1 = getRuntimeRep ty1+    rep2 = getRuntimeRep ty2++repSplitAppTy_maybe (AppTy ty1 ty2)+  = Just (ty1, ty2)++repSplitAppTy_maybe (TyConApp tc tys)+  | not (mustBeSaturated tc) || tys `lengthExceeds` tyConArity tc+  , Just (tys', ty') <- snocView tys+  = Just (TyConApp tc tys', ty')    -- Never create unsaturated type family apps!++repSplitAppTy_maybe _other = Nothing++-- This one doesn't break apart (c => t).+-- See Note [Decomposing fat arrow c=>t]+-- Defined here to avoid module loops between Unify and TcType.+tcRepSplitAppTy_maybe :: Type -> Maybe (Type,Type)+-- ^ Does the AppTy split as in 'tcSplitAppTy_maybe', but assumes that+-- any coreView stuff is already done. Refuses to look through (c => t)+tcRepSplitAppTy_maybe (FunTy { ft_af = af, ft_arg = ty1, ft_res = ty2 })+  | InvisArg <- af+  = Nothing  -- See Note [Decomposing fat arrow c=>t]++  | otherwise+  = Just (TyConApp funTyCon [rep1, rep2, ty1], ty2)+  where+    rep1 = getRuntimeRep ty1+    rep2 = getRuntimeRep ty2++tcRepSplitAppTy_maybe (AppTy ty1 ty2)    = Just (ty1, ty2)+tcRepSplitAppTy_maybe (TyConApp tc tys)+  | not (mustBeSaturated tc) || tys `lengthExceeds` tyConArity tc+  , Just (tys', ty') <- snocView tys+  = Just (TyConApp tc tys', ty')    -- Never create unsaturated type family apps!+tcRepSplitAppTy_maybe _other = Nothing++-------------+splitAppTy :: Type -> (Type, Type)+-- ^ Attempts to take a type application apart, as in 'splitAppTy_maybe',+-- and panics if this is not possible+splitAppTy ty = case splitAppTy_maybe ty of+                Just pr -> pr+                Nothing -> panic "splitAppTy"++-------------+splitAppTys :: Type -> (Type, [Type])+-- ^ Recursively splits a type as far as is possible, leaving a residual+-- type being applied to and the type arguments applied to it. Never fails,+-- even if that means returning an empty list of type applications.+splitAppTys ty = split ty ty []+  where+    split orig_ty ty args | Just ty' <- coreView ty = split orig_ty ty' args+    split _       (AppTy ty arg)        args = split ty ty (arg:args)+    split _       (TyConApp tc tc_args) args+      = let -- keep type families saturated+            n | mustBeSaturated tc = tyConArity tc+              | otherwise          = 0+            (tc_args1, tc_args2) = splitAt n tc_args+        in+        (TyConApp tc tc_args1, tc_args2 ++ args)+    split _   (FunTy _ ty1 ty2) args+      = ASSERT( null args )+        (TyConApp funTyCon [], [rep1, rep2, ty1, ty2])+      where+        rep1 = getRuntimeRep ty1+        rep2 = getRuntimeRep ty2++    split orig_ty _                     args  = (orig_ty, args)++-- | Like 'splitAppTys', but doesn't look through type synonyms+repSplitAppTys :: HasDebugCallStack => Type -> (Type, [Type])+repSplitAppTys ty = split ty []+  where+    split (AppTy ty arg) args = split ty (arg:args)+    split (TyConApp tc tc_args) args+      = let n | mustBeSaturated tc = tyConArity tc+              | otherwise          = 0+            (tc_args1, tc_args2) = splitAt n tc_args+        in+        (TyConApp tc tc_args1, tc_args2 ++ args)+    split (FunTy _ ty1 ty2) args+      = ASSERT( null args )+        (TyConApp funTyCon [], [rep1, rep2, ty1, ty2])+      where+        rep1 = getRuntimeRep ty1+        rep2 = getRuntimeRep ty2++    split ty args = (ty, args)++{-+                      LitTy+                      ~~~~~+-}++mkNumLitTy :: Integer -> Type+mkNumLitTy n = LitTy (NumTyLit n)++-- | Is this a numeric literal. We also look through type synonyms.+isNumLitTy :: Type -> Maybe Integer+isNumLitTy ty | Just ty1 <- coreView ty = isNumLitTy ty1+isNumLitTy (LitTy (NumTyLit n)) = Just n+isNumLitTy _                    = Nothing++mkStrLitTy :: FastString -> Type+mkStrLitTy s = LitTy (StrTyLit s)++-- | Is this a symbol literal. We also look through type synonyms.+isStrLitTy :: Type -> Maybe FastString+isStrLitTy ty | Just ty1 <- coreView ty = isStrLitTy ty1+isStrLitTy (LitTy (StrTyLit s)) = Just s+isStrLitTy _                    = Nothing++-- | Is this a type literal (symbol or numeric).+isLitTy :: Type -> Maybe TyLit+isLitTy ty | Just ty1 <- coreView ty = isLitTy ty1+isLitTy (LitTy l)                    = Just l+isLitTy _                            = Nothing++-- | Is this type a custom user error?+-- If so, give us the kind and the error message.+userTypeError_maybe :: Type -> Maybe Type+userTypeError_maybe t+  = do { (tc, _kind : msg : _) <- splitTyConApp_maybe t+          -- There may be more than 2 arguments, if the type error is+          -- used as a type constructor (e.g. at kind `Type -> Type`).++       ; guard (tyConName tc == errorMessageTypeErrorFamName)+       ; return msg }++-- | Render a type corresponding to a user type error into a SDoc.+pprUserTypeErrorTy :: Type -> SDoc+pprUserTypeErrorTy ty =+  case splitTyConApp_maybe ty of++    -- Text "Something"+    Just (tc,[txt])+      | tyConName tc == typeErrorTextDataConName+      , Just str <- isStrLitTy txt -> ftext str++    -- ShowType t+    Just (tc,[_k,t])+      | tyConName tc == typeErrorShowTypeDataConName -> ppr t++    -- t1 :<>: t2+    Just (tc,[t1,t2])+      | tyConName tc == typeErrorAppendDataConName ->+        pprUserTypeErrorTy t1 <> pprUserTypeErrorTy t2++    -- t1 :$$: t2+    Just (tc,[t1,t2])+      | tyConName tc == typeErrorVAppendDataConName ->+        pprUserTypeErrorTy t1 $$ pprUserTypeErrorTy t2++    -- An unevaluated type function+    _ -> ppr ty+++++{-+---------------------------------------------------------------------+                                FunTy+                                ~~~~~++Note [Representation of function types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++Functions (e.g. Int -> Char) can be thought of as being applications+of funTyCon (known in Haskell surface syntax as (->)),++    (->) :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)+                   (a :: TYPE r1) (b :: TYPE r2).+            a -> b -> Type++However, for efficiency's sake we represent saturated applications of (->)+with FunTy. For instance, the type,++    (->) r1 r2 a b++is equivalent to,++    FunTy (Anon a) b++Note how the RuntimeReps are implied in the FunTy representation. For this+reason we must be careful when recontructing the TyConApp representation (see,+for instance, splitTyConApp_maybe).++In the compiler we maintain the invariant that all saturated applications of+(->) are represented with FunTy.++See #11714.+-}++splitFunTy :: Type -> (Type, Type)+-- ^ Attempts to extract the argument and result types from a type, and+-- panics if that is not possible. See also 'splitFunTy_maybe'+splitFunTy ty | Just ty' <- coreView ty = splitFunTy ty'+splitFunTy (FunTy _ arg res) = (arg, res)+splitFunTy other             = pprPanic "splitFunTy" (ppr other)++splitFunTy_maybe :: Type -> Maybe (Type, Type)+-- ^ Attempts to extract the argument and result types from a type+splitFunTy_maybe ty | Just ty' <- coreView ty = splitFunTy_maybe ty'+splitFunTy_maybe (FunTy _ arg res) = Just (arg, res)+splitFunTy_maybe _                 = Nothing++splitFunTys :: Type -> ([Type], Type)+splitFunTys ty = split [] ty ty+  where+    split args orig_ty ty | Just ty' <- coreView ty = split args orig_ty ty'+    split args _       (FunTy _ arg res) = split (arg:args) res res+    split args orig_ty _                 = (reverse args, orig_ty)++funResultTy :: Type -> Type+-- ^ Extract the function result type and panic if that is not possible+funResultTy ty | Just ty' <- coreView ty = funResultTy ty'+funResultTy (FunTy { ft_res = res }) = res+funResultTy ty                       = pprPanic "funResultTy" (ppr ty)++funArgTy :: Type -> Type+-- ^ Extract the function argument type and panic if that is not possible+funArgTy ty | Just ty' <- coreView ty = funArgTy ty'+funArgTy (FunTy { ft_arg = arg })    = arg+funArgTy ty                           = pprPanic "funArgTy" (ppr ty)++-- ^ Just like 'piResultTys' but for a single argument+-- Try not to iterate 'piResultTy', because it's inefficient to substitute+-- one variable at a time; instead use 'piResultTys"+piResultTy :: HasDebugCallStack => Type -> Type ->  Type+piResultTy ty arg = case piResultTy_maybe ty arg of+                      Just res -> res+                      Nothing  -> pprPanic "piResultTy" (ppr ty $$ ppr arg)++piResultTy_maybe :: Type -> Type -> Maybe Type+-- We don't need a 'tc' version, because+-- this function behaves the same for Type and Constraint+piResultTy_maybe ty arg+  | Just ty' <- coreView ty = piResultTy_maybe ty' arg++  | FunTy { ft_res = res } <- ty+  = Just res++  | ForAllTy (Bndr tv _) res <- ty+  = let empty_subst = mkEmptyTCvSubst $ mkInScopeSet $+                      tyCoVarsOfTypes [arg,res]+    in Just (substTy (extendTCvSubst empty_subst tv arg) res)++  | otherwise+  = Nothing++-- | (piResultTys f_ty [ty1, .., tyn]) gives the type of (f ty1 .. tyn)+--   where f :: f_ty+-- 'piResultTys' is interesting because:+--      1. 'f_ty' may have more for-alls than there are args+--      2. Less obviously, it may have fewer for-alls+-- For case 2. think of:+--   piResultTys (forall a.a) [forall b.b, Int]+-- This really can happen, but only (I think) in situations involving+-- undefined.  For example:+--       undefined :: forall a. a+-- Term: undefined @(forall b. b->b) @Int+-- This term should have type (Int -> Int), but notice that+-- there are more type args than foralls in 'undefined's type.++-- If you edit this function, you may need to update the GHC formalism+-- See Note [GHC Formalism] in coreSyn/CoreLint.hs++-- This is a heavily used function (e.g. from typeKind),+-- so we pay attention to efficiency, especially in the special case+-- where there are no for-alls so we are just dropping arrows from+-- a function type/kind.+piResultTys :: HasDebugCallStack => Type -> [Type] -> Type+piResultTys ty [] = ty+piResultTys ty orig_args@(arg:args)+  | Just ty' <- coreView ty+  = piResultTys ty' orig_args++  | FunTy { ft_res = res } <- ty+  = piResultTys res args++  | ForAllTy (Bndr tv _) res <- ty+  = go (extendTCvSubst init_subst tv arg) res args++  | otherwise+  = pprPanic "piResultTys1" (ppr ty $$ ppr orig_args)+  where+    init_subst = mkEmptyTCvSubst $ mkInScopeSet (tyCoVarsOfTypes (ty:orig_args))++    go :: TCvSubst -> Type -> [Type] -> Type+    go subst ty [] = substTyUnchecked subst ty++    go subst ty all_args@(arg:args)+      | Just ty' <- coreView ty+      = go subst ty' all_args++      | FunTy { ft_res = res } <- ty+      = go subst res args++      | ForAllTy (Bndr tv _) res <- ty+      = go (extendTCvSubst subst tv arg) res args++      | not (isEmptyTCvSubst subst)  -- See Note [Care with kind instantiation]+      = go init_subst+          (substTy subst ty)+          all_args++      | otherwise+      = -- We have not run out of arguments, but the function doesn't+        -- have the right kind to apply to them; so panic.+        -- Without the explicit isEmptyVarEnv test, an ill-kinded type+        -- would give an infniite loop, which is very unhelpful+        -- c.f. #15473+        pprPanic "piResultTys2" (ppr ty $$ ppr orig_args $$ ppr all_args)++applyTysX :: [TyVar] -> Type -> [Type] -> Type+-- applyTyxX beta-reduces (/\tvs. body_ty) arg_tys+-- Assumes that (/\tvs. body_ty) is closed+applyTysX tvs body_ty arg_tys+  = ASSERT2( arg_tys `lengthAtLeast` n_tvs, pp_stuff )+    ASSERT2( tyCoVarsOfType body_ty `subVarSet` mkVarSet tvs, pp_stuff )+    mkAppTys (substTyWith tvs (take n_tvs arg_tys) body_ty)+             (drop n_tvs arg_tys)+  where+    pp_stuff = vcat [ppr tvs, ppr body_ty, ppr arg_tys]+    n_tvs = length tvs++++{- Note [Care with kind instantiation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+  T :: forall k. k+and we are finding the kind of+  T (forall b. b -> b) * Int+Then+  T (forall b. b->b) :: k[ k :-> forall b. b->b]+                     :: forall b. b -> b+So+  T (forall b. b->b) * :: (b -> b)[ b :-> *]+                       :: * -> *++In other words we must intantiate the forall!++Similarly (#15428)+   S :: forall k f. k -> f k+and we are finding the kind of+   S * (* ->) Int Bool+We have+   S * (* ->) :: (k -> f k)[ k :-> *, f :-> (* ->)]+              :: * -> * -> *+So again we must instantiate.++The same thing happens in ToIface.toIfaceAppArgsX.+++---------------------------------------------------------------------+                                TyConApp+                                ~~~~~~~~+-}++-- | A key function: builds a 'TyConApp' or 'FunTy' as appropriate to+-- its arguments.  Applies its arguments to the constructor from left to right.+mkTyConApp :: TyCon -> [Type] -> Type+mkTyConApp tycon tys+  | isFunTyCon tycon+  , [_rep1,_rep2,ty1,ty2] <- tys+  = FunTy { ft_af = VisArg, ft_arg = ty1, ft_res = ty2 }+    -- The FunTyCon (->) is always a visible one++  | otherwise+  = TyConApp tycon tys++-- splitTyConApp "looks through" synonyms, because they don't+-- mean a distinct type, but all other type-constructor applications+-- including functions are returned as Just ..++-- | Retrieve the tycon heading this type, if there is one. Does /not/+-- look through synonyms.+tyConAppTyConPicky_maybe :: Type -> Maybe TyCon+tyConAppTyConPicky_maybe (TyConApp tc _) = Just tc+tyConAppTyConPicky_maybe (FunTy {})      = Just funTyCon+tyConAppTyConPicky_maybe _               = Nothing+++-- | The same as @fst . splitTyConApp@+tyConAppTyCon_maybe :: Type -> Maybe TyCon+tyConAppTyCon_maybe ty | Just ty' <- coreView ty = tyConAppTyCon_maybe ty'+tyConAppTyCon_maybe (TyConApp tc _) = Just tc+tyConAppTyCon_maybe (FunTy {})      = Just funTyCon+tyConAppTyCon_maybe _               = Nothing++tyConAppTyCon :: Type -> TyCon+tyConAppTyCon ty = tyConAppTyCon_maybe ty `orElse` pprPanic "tyConAppTyCon" (ppr ty)++-- | The same as @snd . splitTyConApp@+tyConAppArgs_maybe :: Type -> Maybe [Type]+tyConAppArgs_maybe ty | Just ty' <- coreView ty = tyConAppArgs_maybe ty'+tyConAppArgs_maybe (TyConApp _ tys) = Just tys+tyConAppArgs_maybe (FunTy _ arg res)+  | Just rep1 <- getRuntimeRep_maybe arg+  , Just rep2 <- getRuntimeRep_maybe res+  = Just [rep1, rep2, arg, res]+tyConAppArgs_maybe _  = Nothing++tyConAppArgs :: Type -> [Type]+tyConAppArgs ty = tyConAppArgs_maybe ty `orElse` pprPanic "tyConAppArgs" (ppr ty)++tyConAppArgN :: Int -> Type -> Type+-- Executing Nth+tyConAppArgN n ty+  = case tyConAppArgs_maybe ty of+      Just tys -> ASSERT2( tys `lengthExceeds` n, ppr n <+> ppr tys ) tys `getNth` n+      Nothing  -> pprPanic "tyConAppArgN" (ppr n <+> ppr ty)++-- | Attempts to tease a type apart into a type constructor and the application+-- of a number of arguments to that constructor. Panics if that is not possible.+-- See also 'splitTyConApp_maybe'+splitTyConApp :: Type -> (TyCon, [Type])+splitTyConApp ty = case splitTyConApp_maybe ty of+                   Just stuff -> stuff+                   Nothing    -> pprPanic "splitTyConApp" (ppr ty)++-- | Attempts to tease a type apart into a type constructor and the application+-- of a number of arguments to that constructor+splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])+splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'+splitTyConApp_maybe ty                           = repSplitTyConApp_maybe ty++-- | Split a type constructor application into its type constructor and+-- applied types. Note that this may fail in the case of a 'FunTy' with an+-- argument of unknown kind 'FunTy' (e.g. @FunTy (a :: k) Int@. since the kind+-- of @a@ isn't of the form @TYPE rep@). Consequently, you may need to zonk your+-- type before using this function.+--+-- If you only need the 'TyCon', consider using 'tcTyConAppTyCon_maybe'.+tcSplitTyConApp_maybe :: HasCallStack => Type -> Maybe (TyCon, [Type])+-- Defined here to avoid module loops between Unify and TcType.+tcSplitTyConApp_maybe ty | Just ty' <- tcView ty = tcSplitTyConApp_maybe ty'+tcSplitTyConApp_maybe ty                         = repSplitTyConApp_maybe ty++-------------------+repSplitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])+-- ^ Like 'splitTyConApp_maybe', but doesn't look through synonyms. This+-- assumes the synonyms have already been dealt with.+--+-- Moreover, for a FunTy, it only succeeds if the argument types+-- have enough info to extract the runtime-rep arguments that+-- the funTyCon requires.  This will usually be true;+-- but may be temporarily false during canonicalization:+--     see Note [FunTy and decomposing tycon applications] in TcCanonical+--+repSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)+repSplitTyConApp_maybe (FunTy _ arg res)+  | Just arg_rep <- getRuntimeRep_maybe arg+  , Just res_rep <- getRuntimeRep_maybe res+  = Just (funTyCon, [arg_rep, res_rep, arg, res])+repSplitTyConApp_maybe _ = Nothing++-------------------+-- | Attempts to tease a list type apart and gives the type of the elements if+-- successful (looks through type synonyms)+splitListTyConApp_maybe :: Type -> Maybe Type+splitListTyConApp_maybe ty = case splitTyConApp_maybe ty of+  Just (tc,[e]) | tc == listTyCon -> Just e+  _other                          -> Nothing++nextRole :: Type -> Role+nextRole ty+  | Just (tc, tys) <- splitTyConApp_maybe ty+  , let num_tys = length tys+  , num_tys < tyConArity tc+  = tyConRoles tc `getNth` num_tys++  | otherwise+  = Nominal++newTyConInstRhs :: TyCon -> [Type] -> Type+-- ^ Unwrap one 'layer' of newtype on a type constructor and its+-- arguments, using an eta-reduced version of the @newtype@ if possible.+-- This requires tys to have at least @newTyConInstArity tycon@ elements.+newTyConInstRhs tycon tys+    = ASSERT2( tvs `leLength` tys, ppr tycon $$ ppr tys $$ ppr tvs )+      applyTysX tvs rhs tys+  where+    (tvs, rhs) = newTyConEtadRhs tycon++{-+---------------------------------------------------------------------+                           CastTy+                           ~~~~~~+A casted type has its *kind* casted into something new.+-}++splitCastTy_maybe :: Type -> Maybe (Type, Coercion)+splitCastTy_maybe ty | Just ty' <- coreView ty = splitCastTy_maybe ty'+splitCastTy_maybe (CastTy ty co)               = Just (ty, co)+splitCastTy_maybe _                            = Nothing++-- | Make a 'CastTy'. The Coercion must be nominal. Checks the+-- Coercion for reflexivity, dropping it if it's reflexive.+-- See Note [Respecting definitional equality] in TyCoRep+mkCastTy :: Type -> Coercion -> Type+mkCastTy ty co | isReflexiveCo co = ty  -- (EQ2) from the Note+-- NB: Do the slow check here. This is important to keep the splitXXX+-- functions working properly. Otherwise, we may end up with something+-- like (((->) |> something_reflexive_but_not_obviously_so) biz baz)+-- fails under splitFunTy_maybe. This happened with the cheaper check+-- in test dependent/should_compile/dynamic-paper.++mkCastTy (CastTy ty co1) co2+  -- (EQ3) from the Note+  = mkCastTy ty (co1 `mkTransCo` co2)+      -- call mkCastTy again for the reflexivity check++mkCastTy (ForAllTy (Bndr tv vis) inner_ty) co+  -- (EQ4) from the Note+  | isTyVar tv+  , let fvs = tyCoVarsOfCo co+  = -- have to make sure that pushing the co in doesn't capture the bound var!+    if tv `elemVarSet` fvs+    then let empty_subst = mkEmptyTCvSubst (mkInScopeSet fvs)+             (subst, tv') = substVarBndr empty_subst tv+         in ForAllTy (Bndr tv' vis) (substTy subst inner_ty `mkCastTy` co)+    else ForAllTy (Bndr tv vis) (inner_ty `mkCastTy` co)++mkCastTy ty co = CastTy ty co++tyConBindersTyCoBinders :: [TyConBinder] -> [TyCoBinder]+-- Return the tyConBinders in TyCoBinder form+tyConBindersTyCoBinders = map to_tyb+  where+    to_tyb (Bndr tv (NamedTCB vis)) = Named (Bndr tv vis)+    to_tyb (Bndr tv (AnonTCB af))   = Anon af (varType tv)++-- | Drop the cast on a type, if any. If there is no+-- cast, just return the original type. This is rarely what+-- you want. The CastTy data constructor (in TyCoRep) has the+-- invariant that another CastTy is not inside. See the+-- data constructor for a full description of this invariant.+-- Since CastTy cannot be nested, the result of discardCast+-- cannot be a CastTy.+discardCast :: Type -> Type+discardCast (CastTy ty _) = ASSERT(not (isCastTy ty)) ty+  where+  isCastTy CastTy{} = True+  isCastTy _        = False+discardCast ty            = ty+++{-+--------------------------------------------------------------------+                            CoercionTy+                            ~~~~~~~~~~+CoercionTy allows us to inject coercions into types. A CoercionTy+should appear only in the right-hand side of an application.+-}++mkCoercionTy :: Coercion -> Type+mkCoercionTy = CoercionTy++isCoercionTy :: Type -> Bool+isCoercionTy (CoercionTy _) = True+isCoercionTy _              = False++isCoercionTy_maybe :: Type -> Maybe Coercion+isCoercionTy_maybe (CoercionTy co) = Just co+isCoercionTy_maybe _               = Nothing++stripCoercionTy :: Type -> Coercion+stripCoercionTy (CoercionTy co) = co+stripCoercionTy ty              = pprPanic "stripCoercionTy" (ppr ty)++{-+---------------------------------------------------------------------+                                SynTy+                                ~~~~~++Notes on type synonyms+~~~~~~~~~~~~~~~~~~~~~~+The various "split" functions (splitFunTy, splitRhoTy, splitForAllTy) try+to return type synonyms wherever possible. Thus++        type Foo a = a -> a++we want+        splitFunTys (a -> Foo a) = ([a], Foo a)+not                                ([a], a -> a)++The reason is that we then get better (shorter) type signatures in+interfaces.  Notably this plays a role in tcTySigs in TcBinds.hs.+++---------------------------------------------------------------------+                                ForAllTy+                                ~~~~~~~~+-}++-- | Make a dependent forall over an 'Inferred' variable+mkTyCoInvForAllTy :: TyCoVar -> Type -> Type+mkTyCoInvForAllTy tv ty+  | isCoVar tv+  , not (tv `elemVarSet` tyCoVarsOfType ty)+  = mkVisFunTy (varType tv) ty+  | otherwise+  = ForAllTy (Bndr tv Inferred) ty++-- | Like 'mkTyCoInvForAllTy', but tv should be a tyvar+mkInvForAllTy :: TyVar -> Type -> Type+mkInvForAllTy tv ty = ASSERT( isTyVar tv )+                      ForAllTy (Bndr tv Inferred) ty++-- | Like 'mkForAllTys', but assumes all variables are dependent and+-- 'Inferred', a common case+mkTyCoInvForAllTys :: [TyCoVar] -> Type -> Type+mkTyCoInvForAllTys tvs ty = foldr mkTyCoInvForAllTy ty tvs++-- | Like 'mkTyCoInvForAllTys', but tvs should be a list of tyvar+mkInvForAllTys :: [TyVar] -> Type -> Type+mkInvForAllTys tvs ty = foldr mkInvForAllTy ty tvs++-- | Like 'mkForAllTy', but assumes the variable is dependent and 'Specified',+-- a common case+mkSpecForAllTy :: TyVar -> Type -> Type+mkSpecForAllTy tv ty = ASSERT( isTyVar tv )+                       -- covar is always Inferred, so input should be tyvar+                       ForAllTy (Bndr tv Specified) ty++-- | Like 'mkForAllTys', but assumes all variables are dependent and+-- 'Specified', a common case+mkSpecForAllTys :: [TyVar] -> Type -> Type+mkSpecForAllTys tvs ty = foldr mkSpecForAllTy ty tvs++-- | Like mkForAllTys, but assumes all variables are dependent and visible+mkVisForAllTys :: [TyVar] -> Type -> Type+mkVisForAllTys tvs = ASSERT( all isTyVar tvs )+                     -- covar is always Inferred, so all inputs should be tyvar+                     mkForAllTys [ Bndr tv Required | tv <- tvs ]++mkLamType  :: Var -> Type -> Type+-- ^ Makes a @(->)@ type or an implicit forall type, depending+-- on whether it is given a type variable or a term variable.+-- This is used, for example, when producing the type of a lambda.+-- Always uses Inferred binders.+mkLamTypes :: [Var] -> Type -> Type+-- ^ 'mkLamType' for multiple type or value arguments++mkLamType v body_ty+   | isTyVar v+   = ForAllTy (Bndr v Inferred) body_ty++   | isCoVar v+   , v `elemVarSet` tyCoVarsOfType body_ty+   = ForAllTy (Bndr v Required) body_ty++   | isPredTy arg_ty  -- See Note [mkLamType: dictionary arguments]+   = mkInvisFunTy arg_ty body_ty++   | otherwise+   = mkVisFunTy arg_ty body_ty+   where+     arg_ty = varType v++mkLamTypes vs ty = foldr mkLamType ty vs++{- Note [mkLamType: dictionary arguments]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we have (\ (d :: Ord a). blah), we want to give it type+           (Ord a => blah_ty)+with a fat arrow; that is, using mkInvisFunTy, not mkVisFunTy.++Why? After all, we are in Core, where (=>) and (->) behave the same.+Yes, but the /specialiser/ does treat dictionary arguments specially.+Suppose we do w/w on 'foo' in module A, thus (#11272, #6056)+   foo :: Ord a => Int -> blah+   foo a d x = case x of I# x' -> $wfoo @a d x'++   $wfoo :: Ord a => Int# -> blah++Now in module B we see (foo @Int dOrdInt).  The specialiser will+specialise this to $sfoo, where+   $sfoo :: Int -> blah+   $sfoo x = case x of I# x' -> $wfoo @Int dOrdInt x'++Now we /must/ also specialise $wfoo!  But it wasn't user-written,+and has a type built with mkLamTypes.++Conclusion: the easiest thing is to make mkLamType build+            (c => ty)+when the argument is a predicate type.  See TyCoRep+Note [Types for coercions, predicates, and evidence]+-}++-- | Given a list of type-level vars and the free vars of a result kind,+-- makes TyCoBinders, preferring anonymous binders+-- if the variable is, in fact, not dependent.+-- e.g.    mkTyConBindersPreferAnon [(k:*),(b:k),(c:k)] (k->k)+-- We want (k:*) Named, (b:k) Anon, (c:k) Anon+--+-- All non-coercion binders are /visible/.+mkTyConBindersPreferAnon :: [TyVar]      -- ^ binders+                         -> TyCoVarSet   -- ^ free variables of result+                         -> [TyConBinder]+mkTyConBindersPreferAnon vars inner_tkvs = ASSERT( all isTyVar vars)+                                           fst (go vars)+  where+    go :: [TyVar] -> ([TyConBinder], VarSet) -- also returns the free vars+    go [] = ([], inner_tkvs)+    go (v:vs) | v `elemVarSet` fvs+              = ( Bndr v (NamedTCB Required) : binders+                , fvs `delVarSet` v `unionVarSet` kind_vars )+              | otherwise+              = ( Bndr v (AnonTCB VisArg) : binders+                , fvs `unionVarSet` kind_vars )+      where+        (binders, fvs) = go vs+        kind_vars      = tyCoVarsOfType $ tyVarKind v++-- | Take a ForAllTy apart, returning the list of tycovars and the result type.+-- This always succeeds, even if it returns only an empty list. Note that the+-- result type returned may have free variables that were bound by a forall.+splitForAllTys :: Type -> ([TyCoVar], Type)+splitForAllTys ty = split ty ty []+  where+    split orig_ty ty tvs | Just ty' <- coreView ty = split orig_ty ty' tvs+    split _       (ForAllTy (Bndr tv _) ty)    tvs = split ty ty (tv:tvs)+    split orig_ty _                            tvs = (reverse tvs, orig_ty)++-- | Like 'splitForAllTys', but only splits a 'ForAllTy' if+-- @'sameVis' argf supplied_argf@ is 'True', where @argf@ is the visibility+-- of the @ForAllTy@'s binder and @supplied_argf@ is the visibility provided+-- as an argument to this function.+splitForAllTysSameVis :: ArgFlag -> Type -> ([TyCoVar], Type)+splitForAllTysSameVis supplied_argf ty = split ty ty []+  where+    split orig_ty ty tvs | Just ty' <- coreView ty = split orig_ty ty' tvs+    split _       (ForAllTy (Bndr tv argf) ty) tvs+      | argf `sameVis` supplied_argf               = split ty ty (tv:tvs)+    split orig_ty _                            tvs = (reverse tvs, orig_ty)++-- | Like splitForAllTys, but split only for tyvars.+-- This always succeeds, even if it returns only an empty list. Note that the+-- result type returned may have free variables that were bound by a forall.+splitTyVarForAllTys :: Type -> ([TyVar], Type)+splitTyVarForAllTys ty = split ty ty []+  where+    split orig_ty ty tvs | Just ty' <- coreView ty     = split orig_ty ty' tvs+    split _ (ForAllTy (Bndr tv _) ty) tvs | isTyVar tv = split ty ty (tv:tvs)+    split orig_ty _                   tvs              = (reverse tvs, orig_ty)++-- | Checks whether this is a proper forall (with a named binder)+isForAllTy :: Type -> Bool+isForAllTy ty | Just ty' <- coreView ty = isForAllTy ty'+isForAllTy (ForAllTy {}) = True+isForAllTy _             = False++-- | Like `isForAllTy`, but returns True only if it is a tyvar binder+isForAllTy_ty :: Type -> Bool+isForAllTy_ty ty | Just ty' <- coreView ty = isForAllTy_ty ty'+isForAllTy_ty (ForAllTy (Bndr tv _) _) | isTyVar tv = True+isForAllTy_ty _             = False++-- | Like `isForAllTy`, but returns True only if it is a covar binder+isForAllTy_co :: Type -> Bool+isForAllTy_co ty | Just ty' <- coreView ty = isForAllTy_co ty'+isForAllTy_co (ForAllTy (Bndr tv _) _) | isCoVar tv = True+isForAllTy_co _             = False++-- | Is this a function or forall?+isPiTy :: Type -> Bool+isPiTy ty | Just ty' <- coreView ty = isPiTy ty'+isPiTy (ForAllTy {}) = True+isPiTy (FunTy {})    = True+isPiTy _             = False++-- | Is this a function?+isFunTy :: Type -> Bool+isFunTy ty | Just ty' <- coreView ty = isFunTy ty'+isFunTy (FunTy {}) = True+isFunTy _          = False++-- | Take a forall type apart, or panics if that is not possible.+splitForAllTy :: Type -> (TyCoVar, Type)+splitForAllTy ty+  | Just answer <- splitForAllTy_maybe ty = answer+  | otherwise                             = pprPanic "splitForAllTy" (ppr ty)++-- | Drops all ForAllTys+dropForAlls :: Type -> Type+dropForAlls ty = go ty+  where+    go ty | Just ty' <- coreView ty = go ty'+    go (ForAllTy _ res)            = go res+    go res                         = res++-- | Attempts to take a forall type apart, but only if it's a proper forall,+-- with a named binder+splitForAllTy_maybe :: Type -> Maybe (TyCoVar, Type)+splitForAllTy_maybe ty = go ty+  where+    go ty | Just ty' <- coreView ty = go ty'+    go (ForAllTy (Bndr tv _) ty)    = Just (tv, ty)+    go _                            = Nothing++-- | Like splitForAllTy_maybe, but only returns Just if it is a tyvar binder.+splitForAllTy_ty_maybe :: Type -> Maybe (TyCoVar, Type)+splitForAllTy_ty_maybe ty = go ty+  where+    go ty | Just ty' <- coreView ty = go ty'+    go (ForAllTy (Bndr tv _) ty) | isTyVar tv = Just (tv, ty)+    go _                            = Nothing++-- | Like splitForAllTy_maybe, but only returns Just if it is a covar binder.+splitForAllTy_co_maybe :: Type -> Maybe (TyCoVar, Type)+splitForAllTy_co_maybe ty = go ty+  where+    go ty | Just ty' <- coreView ty = go ty'+    go (ForAllTy (Bndr tv _) ty) | isCoVar tv = Just (tv, ty)+    go _                            = Nothing++-- | Attempts to take a forall type apart; works with proper foralls and+-- functions+splitPiTy_maybe :: Type -> Maybe (TyCoBinder, Type)+splitPiTy_maybe ty = go ty+  where+    go ty | Just ty' <- coreView ty = go ty'+    go (ForAllTy bndr ty) = Just (Named bndr, ty)+    go (FunTy { ft_af = af, ft_arg = arg, ft_res = res})+                          = Just (Anon af arg, res)+    go _                  = Nothing++-- | Takes a forall type apart, or panics+splitPiTy :: Type -> (TyCoBinder, Type)+splitPiTy ty+  | Just answer <- splitPiTy_maybe ty = answer+  | otherwise                         = pprPanic "splitPiTy" (ppr ty)++-- | Split off all TyCoBinders to a type, splitting both proper foralls+-- and functions+splitPiTys :: Type -> ([TyCoBinder], Type)+splitPiTys ty = split ty ty []+  where+    split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs+    split _       (ForAllTy b res) bs = split res res (Named b  : bs)+    split _       (FunTy { ft_af = af, ft_arg = arg, ft_res = res }) bs+                                      = split res res (Anon af arg : bs)+    split orig_ty _                bs = (reverse bs, orig_ty)++-- | Like 'splitPiTys' but split off only /named/ binders+--   and returns TyCoVarBinders rather than TyCoBinders+splitForAllVarBndrs :: Type -> ([TyCoVarBinder], Type)+splitForAllVarBndrs ty = split ty ty []+  where+    split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs+    split _       (ForAllTy b res) bs = split res res (b:bs)+    split orig_ty _                bs = (reverse bs, orig_ty)+{-# INLINE splitForAllVarBndrs #-}++invisibleTyBndrCount :: Type -> Int+-- Returns the number of leading invisible forall'd binders in the type+-- Includes invisible predicate arguments; e.g. for+--    e.g.  forall {k}. (k ~ *) => k -> k+-- returns 2 not 1+invisibleTyBndrCount ty = length (fst (splitPiTysInvisible ty))++-- Like splitPiTys, but returns only *invisible* binders, including constraints+-- Stops at the first visible binder+splitPiTysInvisible :: Type -> ([TyCoBinder], Type)+splitPiTysInvisible ty = split ty ty []+   where+    split orig_ty ty bs+      | Just ty' <- coreView ty  = split orig_ty ty' bs+    split _ (ForAllTy b res) bs+      | Bndr _ vis <- b+      , isInvisibleArgFlag vis   = split res res (Named b  : bs)+    split _ (FunTy { ft_af = InvisArg, ft_arg = arg, ft_res = res })  bs+                                 = split res res (Anon InvisArg arg : bs)+    split orig_ty _          bs  = (reverse bs, orig_ty)++splitPiTysInvisibleN :: Int -> Type -> ([TyCoBinder], Type)+-- Same as splitPiTysInvisible, but stop when+--   - you have found 'n' TyCoBinders,+--   - or you run out of invisible binders+splitPiTysInvisibleN n ty = split n ty ty []+   where+    split n orig_ty ty bs+      | n == 0                  = (reverse bs, orig_ty)+      | Just ty' <- coreView ty = split n orig_ty ty' bs+      | ForAllTy b res <- ty+      , Bndr _ vis <- b+      , isInvisibleArgFlag vis  = split (n-1) res res (Named b  : bs)+      | FunTy { ft_af = InvisArg, ft_arg = arg, ft_res = res } <- ty+                                = split (n-1) res res (Anon InvisArg arg : bs)+      | otherwise               = (reverse bs, orig_ty)++-- | Given a 'TyCon' and a list of argument types, filter out any invisible+-- (i.e., 'Inferred' or 'Specified') arguments.+filterOutInvisibleTypes :: TyCon -> [Type] -> [Type]+filterOutInvisibleTypes tc tys = snd $ partitionInvisibleTypes tc tys++-- | Given a 'TyCon' and a list of argument types, filter out any 'Inferred'+-- arguments.+filterOutInferredTypes :: TyCon -> [Type] -> [Type]+filterOutInferredTypes tc tys =+  filterByList (map (/= Inferred) $ tyConArgFlags tc tys) tys++-- | Given a 'TyCon' and a list of argument types, partition the arguments+-- into:+--+-- 1. 'Inferred' or 'Specified' (i.e., invisible) arguments and+--+-- 2. 'Required' (i.e., visible) arguments+partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])+partitionInvisibleTypes tc tys =+  partitionByList (map isInvisibleArgFlag $ tyConArgFlags tc tys) tys++-- | Given a list of things paired with their visibilities, partition the+-- things into (invisible things, visible things).+partitionInvisibles :: [(a, ArgFlag)] -> ([a], [a])+partitionInvisibles = partitionWith pick_invis+  where+    pick_invis :: (a, ArgFlag) -> Either a a+    pick_invis (thing, vis) | isInvisibleArgFlag vis = Left thing+                            | otherwise              = Right thing++-- | Given a 'TyCon' and a list of argument types to which the 'TyCon' is+-- applied, determine each argument's visibility+-- ('Inferred', 'Specified', or 'Required').+--+-- Wrinkle: consider the following scenario:+--+-- > T :: forall k. k -> k+-- > tyConArgFlags T [forall m. m -> m -> m, S, R, Q]+--+-- After substituting, we get+--+-- > T (forall m. m -> m -> m) :: (forall m. m -> m -> m) -> forall n. n -> n -> n+--+-- Thus, the first argument is invisible, @S@ is visible, @R@ is invisible again,+-- and @Q@ is visible.+tyConArgFlags :: TyCon -> [Type] -> [ArgFlag]+tyConArgFlags tc = fun_kind_arg_flags (tyConKind tc)++-- | Given a 'Type' and a list of argument types to which the 'Type' is+-- applied, determine each argument's visibility+-- ('Inferred', 'Specified', or 'Required').+--+-- Most of the time, the arguments will be 'Required', but not always. Consider+-- @f :: forall a. a -> Type@. In @f Type Bool@, the first argument (@Type@) is+-- 'Specified' and the second argument (@Bool@) is 'Required'. It is precisely+-- this sort of higher-rank situation in which 'appTyArgFlags' comes in handy,+-- since @f Type Bool@ would be represented in Core using 'AppTy's.+-- (See also #15792).+appTyArgFlags :: Type -> [Type] -> [ArgFlag]+appTyArgFlags ty = fun_kind_arg_flags (typeKind ty)++-- | Given a function kind and a list of argument types (where each argument's+-- kind aligns with the corresponding position in the argument kind), determine+-- each argument's visibility ('Inferred', 'Specified', or 'Required').+fun_kind_arg_flags :: Kind -> [Type] -> [ArgFlag]+fun_kind_arg_flags = go emptyTCvSubst+  where+    go subst ki arg_tys+      | Just ki' <- coreView ki = go subst ki' arg_tys+    go _ _ [] = []+    go subst (ForAllTy (Bndr tv argf) res_ki) (arg_ty:arg_tys)+      = argf : go subst' res_ki arg_tys+      where+        subst' = extendTvSubst subst tv arg_ty+    go subst (TyVarTy tv) arg_tys+      | Just ki <- lookupTyVar subst tv = go subst ki arg_tys+    -- This FunTy case is important to handle kinds with nested foralls, such+    -- as this kind (inspired by #16518):+    --+    --   forall {k1} k2. k1 -> k2 -> forall k3. k3 -> Type+    --+    -- Here, we want to get the following ArgFlags:+    --+    -- [Inferred,   Specified, Required, Required, Specified, Required]+    -- forall {k1}. forall k2. k1 ->     k2 ->     forall k3. k3 ->     Type+    go subst (FunTy{ft_af = af, ft_res = res_ki}) (_:arg_tys)+      = argf : go subst res_ki arg_tys+      where+        argf = case af of+                 VisArg   -> Required+                 InvisArg -> Inferred+    go _ _ arg_tys = map (const Required) arg_tys+                        -- something is ill-kinded. But this can happen+                        -- when printing errors. Assume everything is Required.++-- @isTauTy@ tests if a type has no foralls+isTauTy :: Type -> Bool+isTauTy ty | Just ty' <- coreView ty = isTauTy ty'+isTauTy (TyVarTy _)           = True+isTauTy (LitTy {})            = True+isTauTy (TyConApp tc tys)     = all isTauTy tys && isTauTyCon tc+isTauTy (AppTy a b)           = isTauTy a && isTauTy b+isTauTy (FunTy _ a b)         = isTauTy a && isTauTy b+isTauTy (ForAllTy {})         = False+isTauTy (CastTy ty _)         = isTauTy ty+isTauTy (CoercionTy _)        = False  -- Not sure about this++{-+%************************************************************************+%*                                                                      *+   TyCoBinders+%*                                                                      *+%************************************************************************+-}++-- | Make an anonymous binder+mkAnonBinder :: AnonArgFlag -> Type -> TyCoBinder+mkAnonBinder = Anon++-- | Does this binder bind a variable that is /not/ erased? Returns+-- 'True' for anonymous binders.+isAnonTyCoBinder :: TyCoBinder -> Bool+isAnonTyCoBinder (Named {}) = False+isAnonTyCoBinder (Anon {})  = True++tyCoBinderVar_maybe :: TyCoBinder -> Maybe TyCoVar+tyCoBinderVar_maybe (Named tv) = Just $ binderVar tv+tyCoBinderVar_maybe _          = Nothing++tyCoBinderType :: TyCoBinder -> Type+tyCoBinderType (Named tvb) = binderType tvb+tyCoBinderType (Anon _ ty) = ty++tyBinderType :: TyBinder -> Type+tyBinderType (Named (Bndr tv _))+  = ASSERT( isTyVar tv )+    tyVarKind tv+tyBinderType (Anon _ ty)   = ty++-- | Extract a relevant type, if there is one.+binderRelevantType_maybe :: TyCoBinder -> Maybe Type+binderRelevantType_maybe (Named {})  = Nothing+binderRelevantType_maybe (Anon _ ty) = Just ty++------------- Closing over kinds -----------------++-- | Add the kind variables free in the kinds of the tyvars in the given set.+-- Returns a non-deterministic set.+closeOverKinds :: TyVarSet -> TyVarSet+closeOverKinds = fvVarSet . closeOverKindsFV . nonDetEltsUniqSet+  -- It's OK to use nonDetEltsUniqSet here because we immediately forget+  -- about the ordering by returning a set.++-- | Given a list of tyvars returns a deterministic FV computation that+-- returns the given tyvars with the kind variables free in the kinds of the+-- given tyvars.+closeOverKindsFV :: [TyVar] -> FV+closeOverKindsFV tvs =+  mapUnionFV (tyCoFVsOfType . tyVarKind) tvs `unionFV` mkFVs tvs++-- | Add the kind variables free in the kinds of the tyvars in the given set.+-- Returns a deterministically ordered list.+closeOverKindsList :: [TyVar] -> [TyVar]+closeOverKindsList tvs = fvVarList $ closeOverKindsFV tvs++-- | Add the kind variables free in the kinds of the tyvars in the given set.+-- Returns a deterministic set.+closeOverKindsDSet :: DTyVarSet -> DTyVarSet+closeOverKindsDSet = fvDVarSet . closeOverKindsFV . dVarSetElems++{-+************************************************************************+*                                                                      *+\subsection{Type families}+*                                                                      *+************************************************************************+-}++mkFamilyTyConApp :: TyCon -> [Type] -> Type+-- ^ Given a family instance TyCon and its arg types, return the+-- corresponding family type.  E.g:+--+-- > data family T a+-- > data instance T (Maybe b) = MkT b+--+-- Where the instance tycon is :RTL, so:+--+-- > mkFamilyTyConApp :RTL Int  =  T (Maybe Int)+mkFamilyTyConApp tc tys+  | Just (fam_tc, fam_tys) <- tyConFamInst_maybe tc+  , let tvs = tyConTyVars tc+        fam_subst = ASSERT2( tvs `equalLength` tys, ppr tc <+> ppr tys )+                    zipTvSubst tvs tys+  = mkTyConApp fam_tc (substTys fam_subst fam_tys)+  | otherwise+  = mkTyConApp tc tys++-- | Get the type on the LHS of a coercion induced by a type/data+-- family instance.+coAxNthLHS :: CoAxiom br -> Int -> Type+coAxNthLHS ax ind =+  mkTyConApp (coAxiomTyCon ax) (coAxBranchLHS (coAxiomNthBranch ax ind))++isFamFreeTy :: Type -> Bool+isFamFreeTy ty | Just ty' <- coreView ty = isFamFreeTy ty'+isFamFreeTy (TyVarTy _)       = True+isFamFreeTy (LitTy {})        = True+isFamFreeTy (TyConApp tc tys) = all isFamFreeTy tys && isFamFreeTyCon tc+isFamFreeTy (AppTy a b)       = isFamFreeTy a && isFamFreeTy b+isFamFreeTy (FunTy _ a b)     = isFamFreeTy a && isFamFreeTy b+isFamFreeTy (ForAllTy _ ty)   = isFamFreeTy ty+isFamFreeTy (CastTy ty _)     = isFamFreeTy ty+isFamFreeTy (CoercionTy _)    = False  -- Not sure about this++-- | Does this type classify a core (unlifted) Coercion?+-- At either role nominal or representational+--    (t1 ~# t2) or (t1 ~R# t2)+-- See Note [Types for coercions, predicates, and evidence] in TyCoRep+isCoVarType :: Type -> Bool+  -- ToDo: should we check saturation?+isCoVarType ty+  | Just tc <- tyConAppTyCon_maybe ty+  = tc `hasKey` eqPrimTyConKey || tc `hasKey` eqReprPrimTyConKey+  | otherwise+  = False+++{-+************************************************************************+*                                                                      *+\subsection{Liftedness}+*                                                                      *+************************************************************************+-}++-- | Returns Just True if this type is surely lifted, Just False+-- if it is surely unlifted, Nothing if we can't be sure (i.e., it is+-- levity polymorphic), and panics if the kind does not have the shape+-- TYPE r.+isLiftedType_maybe :: HasDebugCallStack => Type -> Maybe Bool+isLiftedType_maybe ty = go (getRuntimeRep ty)+  where+    go rr | Just rr' <- coreView rr = go rr'+          | isLiftedRuntimeRep rr  = Just True+          | TyConApp {} <- rr      = Just False  -- Everything else is unlifted+          | otherwise              = Nothing     -- levity polymorphic++-- | See "Type#type_classification" for what an unlifted type is.+-- Panics on levity polymorphic types; See 'mightBeUnliftedType' for+-- a more approximate predicate that behaves better in the presence of+-- levity polymorphism.+isUnliftedType :: HasDebugCallStack => Type -> Bool+        -- isUnliftedType returns True for forall'd unlifted types:+        --      x :: forall a. Int#+        -- I found bindings like these were getting floated to the top level.+        -- They are pretty bogus types, mind you.  It would be better never to+        -- construct them+isUnliftedType ty+  = not (isLiftedType_maybe ty `orElse`+         pprPanic "isUnliftedType" (ppr ty <+> dcolon <+> ppr (typeKind ty)))++-- | Returns:+--+-- * 'False' if the type is /guaranteed/ lifted or+-- * 'True' if it is unlifted, OR we aren't sure (e.g. in a levity-polymorphic case)+mightBeUnliftedType :: Type -> Bool+mightBeUnliftedType ty+  = case isLiftedType_maybe ty of+      Just is_lifted -> not is_lifted+      Nothing -> True++-- | Is this a type of kind RuntimeRep? (e.g. LiftedRep)+isRuntimeRepKindedTy :: Type -> Bool+isRuntimeRepKindedTy = isRuntimeRepTy . typeKind++-- | Drops prefix of RuntimeRep constructors in 'TyConApp's. Useful for e.g.+-- dropping 'LiftedRep arguments of unboxed tuple TyCon applications:+--+--   dropRuntimeRepArgs [ 'LiftedRep, 'IntRep+--                      , String, Int# ] == [String, Int#]+--+dropRuntimeRepArgs :: [Type] -> [Type]+dropRuntimeRepArgs = dropWhile isRuntimeRepKindedTy++-- | Extract the RuntimeRep classifier of a type. For instance,+-- @getRuntimeRep_maybe Int = LiftedRep@. Returns 'Nothing' if this is not+-- possible.+getRuntimeRep_maybe :: HasDebugCallStack+                    => Type -> Maybe Type+getRuntimeRep_maybe = kindRep_maybe . typeKind++-- | Extract the RuntimeRep classifier of a type. For instance,+-- @getRuntimeRep_maybe Int = LiftedRep@. Panics if this is not possible.+getRuntimeRep :: HasDebugCallStack => Type -> Type+getRuntimeRep ty+  = case getRuntimeRep_maybe ty of+      Just r  -> r+      Nothing -> pprPanic "getRuntimeRep" (ppr ty <+> dcolon <+> ppr (typeKind ty))++isUnboxedTupleType :: Type -> Bool+isUnboxedTupleType ty+  = tyConAppTyCon (getRuntimeRep ty) `hasKey` tupleRepDataConKey+  -- NB: Do not use typePrimRep, as that can't tell the difference between+  -- unboxed tuples and unboxed sums+++isUnboxedSumType :: Type -> Bool+isUnboxedSumType ty+  = tyConAppTyCon (getRuntimeRep ty) `hasKey` sumRepDataConKey++-- | See "Type#type_classification" for what an algebraic type is.+-- Should only be applied to /types/, as opposed to e.g. partially+-- saturated type constructors+isAlgType :: Type -> Bool+isAlgType ty+  = case splitTyConApp_maybe ty of+      Just (tc, ty_args) -> ASSERT( ty_args `lengthIs` tyConArity tc )+                            isAlgTyCon tc+      _other             -> False++-- | Check whether a type is a data family type+isDataFamilyAppType :: Type -> Bool+isDataFamilyAppType ty = case tyConAppTyCon_maybe ty of+                           Just tc -> isDataFamilyTyCon tc+                           _       -> False++-- | Computes whether an argument (or let right hand side) should+-- be computed strictly or lazily, based only on its type.+-- Currently, it's just 'isUnliftedType'. Panics on levity-polymorphic types.+isStrictType :: HasDebugCallStack => Type -> Bool+isStrictType = isUnliftedType++isPrimitiveType :: Type -> Bool+-- ^ Returns true of types that are opaque to Haskell.+isPrimitiveType ty = case splitTyConApp_maybe ty of+                        Just (tc, ty_args) -> ASSERT( ty_args `lengthIs` tyConArity tc )+                                              isPrimTyCon tc+                        _                  -> False++{-+************************************************************************+*                                                                      *+\subsection{Join points}+*                                                                      *+************************************************************************+-}++-- | Determine whether a type could be the type of a join point of given total+-- arity, according to the polymorphism rule. A join point cannot be polymorphic+-- in its return type, since given+--   join j @a @b x y z = e1 in e2,+-- the types of e1 and e2 must be the same, and a and b are not in scope for e2.+-- (See Note [The polymorphism rule of join points] in CoreSyn.) Returns False+-- also if the type simply doesn't have enough arguments.+--+-- Note that we need to know how many arguments (type *and* value) the putative+-- join point takes; for instance, if+--   j :: forall a. a -> Int+-- then j could be a binary join point returning an Int, but it could *not* be a+-- unary join point returning a -> Int.+--+-- TODO: See Note [Excess polymorphism and join points]+isValidJoinPointType :: JoinArity -> Type -> Bool+isValidJoinPointType arity ty+  = valid_under emptyVarSet arity ty+  where+    valid_under tvs arity ty+      | arity == 0+      = isEmptyVarSet (tvs `intersectVarSet` tyCoVarsOfType ty)+      | Just (t, ty') <- splitForAllTy_maybe ty+      = valid_under (tvs `extendVarSet` t) (arity-1) ty'+      | Just (_, res_ty) <- splitFunTy_maybe ty+      = valid_under tvs (arity-1) res_ty+      | otherwise+      = False++{- Note [Excess polymorphism and join points]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In principle, if a function would be a join point except that it fails+the polymorphism rule (see Note [The polymorphism rule of join points] in+CoreSyn), it can still be made a join point with some effort. This is because+all tail calls must return the same type (they return to the same context!), and+thus if the return type depends on an argument, that argument must always be the+same.++For instance, consider:++  let f :: forall a. a -> Char -> [a]+      f @a x c = ... f @a y 'a' ...+  in ... f @Int 1 'b' ... f @Int 2 'c' ...++(where the calls are tail calls). `f` fails the polymorphism rule because its+return type is [a], where [a] is bound. But since the type argument is always+'Int', we can rewrite it as:++  let f' :: Int -> Char -> [Int]+      f' x c = ... f' y 'a' ...+  in ... f' 1 'b' ... f 2 'c' ...++and now we can make f' a join point:++  join f' :: Int -> Char -> [Int]+       f' x c = ... jump f' y 'a' ...+  in ... jump f' 1 'b' ... jump f' 2 'c' ...++It's not clear that this comes up often, however. TODO: Measure how often and+add this analysis if necessary.  See #14620.+++************************************************************************+*                                                                      *+\subsection{Sequencing on types}+*                                                                      *+************************************************************************+-}++seqType :: Type -> ()+seqType (LitTy n)                   = n `seq` ()+seqType (TyVarTy tv)                = tv `seq` ()+seqType (AppTy t1 t2)               = seqType t1 `seq` seqType t2+seqType (FunTy _ t1 t2)             = seqType t1 `seq` seqType t2+seqType (TyConApp tc tys)           = tc `seq` seqTypes tys+seqType (ForAllTy (Bndr tv _) ty)   = seqType (varType tv) `seq` seqType ty+seqType (CastTy ty co)              = seqType ty `seq` seqCo co+seqType (CoercionTy co)             = seqCo co++seqTypes :: [Type] -> ()+seqTypes []       = ()+seqTypes (ty:tys) = seqType ty `seq` seqTypes tys++{-+************************************************************************+*                                                                      *+                Comparison for types+        (We don't use instances so that we know where it happens)+*                                                                      *+************************************************************************++Note [Equality on AppTys]+~~~~~~~~~~~~~~~~~~~~~~~~~+In our cast-ignoring equality, we want to say that the following two+are equal:++  (Maybe |> co) (Int |> co')   ~?       Maybe Int++But the left is an AppTy while the right is a TyConApp. The solution is+to use repSplitAppTy_maybe to break up the TyConApp into its pieces and+then continue. Easy to do, but also easy to forget to do.++-}++eqType :: Type -> Type -> Bool+-- ^ Type equality on source types. Does not look through @newtypes@ or+-- 'PredType's, but it does look through type synonyms.+-- This first checks that the kinds of the types are equal and then+-- checks whether the types are equal, ignoring casts and coercions.+-- (The kind check is a recursive call, but since all kinds have type+-- @Type@, there is no need to check the types of kinds.)+-- See also Note [Non-trivial definitional equality] in TyCoRep.+eqType t1 t2 = isEqual $ nonDetCmpType t1 t2+  -- It's OK to use nonDetCmpType here and eqType is deterministic,+  -- nonDetCmpType does equality deterministically++-- | Compare types with respect to a (presumably) non-empty 'RnEnv2'.+eqTypeX :: RnEnv2 -> Type -> Type -> Bool+eqTypeX env t1 t2 = isEqual $ nonDetCmpTypeX env t1 t2+  -- It's OK to use nonDetCmpType here and eqTypeX is deterministic,+  -- nonDetCmpTypeX does equality deterministically++-- | Type equality on lists of types, looking through type synonyms+-- but not newtypes.+eqTypes :: [Type] -> [Type] -> Bool+eqTypes tys1 tys2 = isEqual $ nonDetCmpTypes tys1 tys2+  -- It's OK to use nonDetCmpType here and eqTypes is deterministic,+  -- nonDetCmpTypes does equality deterministically++eqVarBndrs :: RnEnv2 -> [Var] -> [Var] -> Maybe RnEnv2+-- Check that the var lists are the same length+-- and have matching kinds; if so, extend the RnEnv2+-- Returns Nothing if they don't match+eqVarBndrs env [] []+ = Just env+eqVarBndrs env (tv1:tvs1) (tv2:tvs2)+ | eqTypeX env (varType tv1) (varType tv2)+ = eqVarBndrs (rnBndr2 env tv1 tv2) tvs1 tvs2+eqVarBndrs _ _ _= Nothing++-- Now here comes the real worker++{-+Note [nonDetCmpType nondeterminism]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+nonDetCmpType is implemented in terms of nonDetCmpTypeX. nonDetCmpTypeX+uses nonDetCmpTc which compares TyCons by their Unique value. Using Uniques for+ordering leads to nondeterminism. We hit the same problem in the TyVarTy case,+comparing type variables is nondeterministic, note the call to nonDetCmpVar in+nonDetCmpTypeX.+See Note [Unique Determinism] for more details.+-}++nonDetCmpType :: Type -> Type -> Ordering+nonDetCmpType t1 t2+  -- we know k1 and k2 have the same kind, because they both have kind *.+  = nonDetCmpTypeX rn_env t1 t2+  where+    rn_env = mkRnEnv2 (mkInScopeSet (tyCoVarsOfTypes [t1, t2]))++nonDetCmpTypes :: [Type] -> [Type] -> Ordering+nonDetCmpTypes ts1 ts2 = nonDetCmpTypesX rn_env ts1 ts2+  where+    rn_env = mkRnEnv2 (mkInScopeSet (tyCoVarsOfTypes (ts1 ++ ts2)))++-- | An ordering relation between two 'Type's (known below as @t1 :: k1@+-- and @t2 :: k2@)+data TypeOrdering = TLT  -- ^ @t1 < t2@+                  | TEQ  -- ^ @t1 ~ t2@ and there are no casts in either,+                         -- therefore we can conclude @k1 ~ k2@+                  | TEQX -- ^ @t1 ~ t2@ yet one of the types contains a cast so+                         -- they may differ in kind.+                  | TGT  -- ^ @t1 > t2@+                  deriving (Eq, Ord, Enum, Bounded)++nonDetCmpTypeX :: RnEnv2 -> Type -> Type -> Ordering  -- Main workhorse+    -- See Note [Non-trivial definitional equality] in TyCoRep+nonDetCmpTypeX env orig_t1 orig_t2 =+    case go env orig_t1 orig_t2 of+      -- If there are casts then we also need to do a comparison of the kinds of+      -- the types being compared+      TEQX          -> toOrdering $ go env k1 k2+      ty_ordering   -> toOrdering ty_ordering+  where+    k1 = typeKind orig_t1+    k2 = typeKind orig_t2++    toOrdering :: TypeOrdering -> Ordering+    toOrdering TLT  = LT+    toOrdering TEQ  = EQ+    toOrdering TEQX = EQ+    toOrdering TGT  = GT++    liftOrdering :: Ordering -> TypeOrdering+    liftOrdering LT = TLT+    liftOrdering EQ = TEQ+    liftOrdering GT = TGT++    thenCmpTy :: TypeOrdering -> TypeOrdering -> TypeOrdering+    thenCmpTy TEQ  rel  = rel+    thenCmpTy TEQX rel  = hasCast rel+    thenCmpTy rel  _    = rel++    hasCast :: TypeOrdering -> TypeOrdering+    hasCast TEQ = TEQX+    hasCast rel = rel++    -- Returns both the resulting ordering relation between the two types+    -- and whether either contains a cast.+    go :: RnEnv2 -> Type -> Type -> TypeOrdering+    go env t1 t2+      | Just t1' <- coreView t1 = go env t1' t2+      | Just t2' <- coreView t2 = go env t1 t2'++    go env (TyVarTy tv1)       (TyVarTy tv2)+      = liftOrdering $ rnOccL env tv1 `nonDetCmpVar` rnOccR env tv2+    go env (ForAllTy (Bndr tv1 _) t1) (ForAllTy (Bndr tv2 _) t2)+      = go env (varType tv1) (varType tv2)+        `thenCmpTy` go (rnBndr2 env tv1 tv2) t1 t2+        -- See Note [Equality on AppTys]+    go env (AppTy s1 t1) ty2+      | Just (s2, t2) <- repSplitAppTy_maybe ty2+      = go env s1 s2 `thenCmpTy` go env t1 t2+    go env ty1 (AppTy s2 t2)+      | Just (s1, t1) <- repSplitAppTy_maybe ty1+      = go env s1 s2 `thenCmpTy` go env t1 t2+    go env (FunTy _ s1 t1) (FunTy _ s2 t2)+      = go env s1 s2 `thenCmpTy` go env t1 t2+    go env (TyConApp tc1 tys1) (TyConApp tc2 tys2)+      = liftOrdering (tc1 `nonDetCmpTc` tc2) `thenCmpTy` gos env tys1 tys2+    go _   (LitTy l1)          (LitTy l2)          = liftOrdering (compare l1 l2)+    go env (CastTy t1 _)       t2                  = hasCast $ go env t1 t2+    go env t1                  (CastTy t2 _)       = hasCast $ go env t1 t2++    go _   (CoercionTy {})     (CoercionTy {})     = TEQ++        -- Deal with the rest: TyVarTy < CoercionTy < AppTy < LitTy < TyConApp < ForAllTy+    go _ ty1 ty2+      = liftOrdering $ (get_rank ty1) `compare` (get_rank ty2)+      where get_rank :: Type -> Int+            get_rank (CastTy {})+              = pprPanic "nonDetCmpTypeX.get_rank" (ppr [ty1,ty2])+            get_rank (TyVarTy {})    = 0+            get_rank (CoercionTy {}) = 1+            get_rank (AppTy {})      = 3+            get_rank (LitTy {})      = 4+            get_rank (TyConApp {})   = 5+            get_rank (FunTy {})      = 6+            get_rank (ForAllTy {})   = 7++    gos :: RnEnv2 -> [Type] -> [Type] -> TypeOrdering+    gos _   []         []         = TEQ+    gos _   []         _          = TLT+    gos _   _          []         = TGT+    gos env (ty1:tys1) (ty2:tys2) = go env ty1 ty2 `thenCmpTy` gos env tys1 tys2++-------------+nonDetCmpTypesX :: RnEnv2 -> [Type] -> [Type] -> Ordering+nonDetCmpTypesX _   []        []        = EQ+nonDetCmpTypesX env (t1:tys1) (t2:tys2) = nonDetCmpTypeX env t1 t2+                                          `thenCmp`+                                          nonDetCmpTypesX env tys1 tys2+nonDetCmpTypesX _   []        _         = LT+nonDetCmpTypesX _   _         []        = GT++-------------+-- | Compare two 'TyCon's. NB: This should /never/ see 'Constraint' (as+-- recognized by Kind.isConstraintKindCon) which is considered a synonym for+-- 'Type' in Core.+-- See Note [Kind Constraint and kind Type] in Kind.+-- See Note [nonDetCmpType nondeterminism]+nonDetCmpTc :: TyCon -> TyCon -> Ordering+nonDetCmpTc tc1 tc2+  = ASSERT( not (isConstraintKindCon tc1) && not (isConstraintKindCon tc2) )+    u1 `nonDetCmpUnique` u2+  where+    u1  = tyConUnique tc1+    u2  = tyConUnique tc2++{-+************************************************************************+*                                                                      *+        The kind of a type+*                                                                      *+************************************************************************++Note [typeKind vs tcTypeKind]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We have two functions to get the kind of a type++  * typeKind   ignores  the distinction between Constraint and *+  * tcTypeKind respects the distinction between Constraint and *++tcTypeKind is used by the type inference engine, for which Constraint+and * are different; after that we use typeKind.++See also Note [coreView vs tcView]++Note [Kinding rules for types]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In typeKind we consider Constraint and (TYPE LiftedRep) to be identical.+We then have++         t1 : TYPE rep1+         t2 : TYPE rep2+   (FUN) ----------------+         t1 -> t2 : Type++         ty : TYPE rep+         `a` is not free in rep+(FORALL) -----------------------+         forall a. ty : TYPE rep++In tcTypeKind we consider Constraint and (TYPE LiftedRep) to be distinct:++          t1 : TYPE rep1+          t2 : TYPE rep2+    (FUN) ----------------+          t1 -> t2 : Type++          t1 : Constraint+          t2 : TYPE rep+  (PRED1) ----------------+          t1 => t2 : Type++          t1 : Constraint+          t2 : Constraint+  (PRED2) ---------------------+          t1 => t2 : Constraint++          ty : TYPE rep+          `a` is not free in rep+(FORALL1) -----------------------+          forall a. ty : TYPE rep++          ty : Constraint+(FORALL2) -------------------------+          forall a. ty : Constraint++Note that:+* The only way we distinguish '->' from '=>' is by the fact+  that the argument is a PredTy.  Both are FunTys++Note [Phantom type variables in kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++  type K (r :: RuntimeRep) = Type   -- Note 'r' is unused+  data T r :: K r                   -- T :: forall r -> K r+  foo :: forall r. T r++The body of the forall in foo's type has kind (K r), and+normally it would make no sense to have+   forall r. (ty :: K r)+because the kind of the forall would escape the binding+of 'r'.  But in this case it's fine because (K r) exapands+to Type, so we expliclity /permit/ the type+   forall r. T r++To accommodate such a type, in typeKind (forall a.ty) we use+occCheckExpand to expand any type synonyms in the kind of 'ty'+to eliminate 'a'.  See kinding rule (FORALL) in+Note [Kinding rules for types]++And in TcValidity.checkEscapingKind, we use also use+occCheckExpand, for the same reason.+-}++-----------------------------+typeKind :: HasDebugCallStack => Type -> Kind+-- No need to expand synonyms+typeKind (TyConApp tc tys) = piResultTys (tyConKind tc) tys+typeKind (LitTy l)         = typeLiteralKind l+typeKind (FunTy {})        = liftedTypeKind+typeKind (TyVarTy tyvar)   = tyVarKind tyvar+typeKind (CastTy _ty co)   = pSnd $ coercionKind co+typeKind (CoercionTy co)   = coercionType co++typeKind (AppTy fun arg)+  = go fun [arg]+  where+    -- Accumulate the type arugments, so we can call piResultTys,+    -- rather than a succession of calls to piResultTy (which is+    -- asymptotically costly as the number of arguments increases)+    go (AppTy fun arg) args = go fun (arg:args)+    go fun             args = piResultTys (typeKind fun) args++typeKind ty@(ForAllTy {})+  = case occCheckExpand tvs body_kind of+      -- We must make sure tv does not occur in kind+      -- As it is already out of scope!+      -- See Note [Phantom type variables in kinds]+      Just k' -> k'+      Nothing -> pprPanic "typeKind"+                  (ppr ty $$ ppr tvs $$ ppr body <+> dcolon <+> ppr body_kind)+  where+    (tvs, body) = splitTyVarForAllTys ty+    body_kind   = typeKind body++---------------------------------------------+-- Utilities to be used in Unify, which uses "tc" functions+---------------------------------------------++tcTypeKind :: HasDebugCallStack => Type -> Kind+-- No need to expand synonyms+tcTypeKind (TyConApp tc tys) = piResultTys (tyConKind tc) tys+tcTypeKind (LitTy l)         = typeLiteralKind l+tcTypeKind (TyVarTy tyvar)   = tyVarKind tyvar+tcTypeKind (CastTy _ty co)   = pSnd $ coercionKind co+tcTypeKind (CoercionTy co)   = coercionType co++tcTypeKind (FunTy { ft_af = af, ft_res = res })+  | InvisArg <- af+  , tcIsConstraintKind (tcTypeKind res)+  = constraintKind     -- Eq a => Ord a         :: Constraint+  | otherwise          -- Eq a => a -> a        :: TYPE LiftedRep+  = liftedTypeKind     -- Eq a => Array# Int    :: Type LiftedRep (not TYPE PtrRep)++tcTypeKind (AppTy fun arg)+  = go fun [arg]+  where+    -- Accumulate the type arugments, so we can call piResultTys,+    -- rather than a succession of calls to piResultTy (which is+    -- asymptotically costly as the number of arguments increases)+    go (AppTy fun arg) args = go fun (arg:args)+    go fun             args = piResultTys (tcTypeKind fun) args++tcTypeKind ty@(ForAllTy {})+  | tcIsConstraintKind body_kind+  = constraintKind++  | otherwise+  = case occCheckExpand tvs body_kind of+      -- We must make sure tv does not occur in kind+      -- As it is already out of scope!+      -- See Note [Phantom type variables in kinds]+      Just k' -> k'+      Nothing -> pprPanic "tcTypeKind"+                  (ppr ty $$ ppr tvs $$ ppr body <+> dcolon <+> ppr body_kind)+  where+    (tvs, body) = splitTyVarForAllTys ty+    body_kind = tcTypeKind body+++isPredTy :: HasDebugCallStack => Type -> Bool+-- See Note [Types for coercions, predicates, and evidence] in TyCoRep+isPredTy ty = tcIsConstraintKind (tcTypeKind ty)++-- tcIsConstraintKind stuff only makes sense in the typechecker+-- After that Constraint = Type+-- See Note [coreView vs tcView]+-- Defined here because it is used in isPredTy and tcRepSplitAppTy_maybe (sigh)+tcIsConstraintKind :: Kind -> Bool+tcIsConstraintKind ty+  | Just (tc, args) <- tcSplitTyConApp_maybe ty    -- Note: tcSplit here+  , isConstraintKindCon tc+  = ASSERT2( null args, ppr ty ) True++  | otherwise+  = False++-- | Is this kind equivalent to @*@?+--+-- This considers 'Constraint' to be distinct from @*@. For a version that+-- treats them as the same type, see 'isLiftedTypeKind'.+tcIsLiftedTypeKind :: Kind -> Bool+tcIsLiftedTypeKind ty+  | Just (tc, [arg]) <- tcSplitTyConApp_maybe ty    -- Note: tcSplit here+  , tc `hasKey` tYPETyConKey+  = isLiftedRuntimeRep arg+  | otherwise+  = False++-- | Is this kind equivalent to @TYPE r@ (for some unknown r)?+--+-- This considers 'Constraint' to be distinct from @*@.+tcIsRuntimeTypeKind :: Kind -> Bool+tcIsRuntimeTypeKind ty+  | Just (tc, _) <- tcSplitTyConApp_maybe ty    -- Note: tcSplit here+  , tc `hasKey` tYPETyConKey+  = True+  | otherwise+  = False++tcReturnsConstraintKind :: Kind -> Bool+-- True <=> the Kind ultimately returns a Constraint+--   E.g.  * -> Constraint+--         forall k. k -> Constraint+tcReturnsConstraintKind kind+  | Just kind' <- tcView kind = tcReturnsConstraintKind kind'+tcReturnsConstraintKind (ForAllTy _ ty)         = tcReturnsConstraintKind ty+tcReturnsConstraintKind (FunTy { ft_res = ty }) = tcReturnsConstraintKind ty+tcReturnsConstraintKind (TyConApp tc _)         = isConstraintKindCon tc+tcReturnsConstraintKind _                       = False++--------------------------+typeLiteralKind :: TyLit -> Kind+typeLiteralKind (NumTyLit {}) = typeNatKind+typeLiteralKind (StrTyLit {}) = typeSymbolKind++-- | Returns True if a type is levity polymorphic. Should be the same+-- as (isKindLevPoly . typeKind) but much faster.+-- Precondition: The type has kind (TYPE blah)+isTypeLevPoly :: Type -> Bool+isTypeLevPoly = go+  where+    go ty@(TyVarTy {})                           = check_kind ty+    go ty@(AppTy {})                             = check_kind ty+    go ty@(TyConApp tc _) | not (isTcLevPoly tc) = False+                          | otherwise            = check_kind ty+    go (ForAllTy _ ty)                           = go ty+    go (FunTy {})                                = False+    go (LitTy {})                                = False+    go ty@(CastTy {})                            = check_kind ty+    go ty@(CoercionTy {})                        = pprPanic "isTypeLevPoly co" (ppr ty)++    check_kind = isKindLevPoly . typeKind++-- | Looking past all pi-types, is the end result potentially levity polymorphic?+-- Example: True for (forall r (a :: TYPE r). String -> a)+-- Example: False for (forall r1 r2 (a :: TYPE r1) (b :: TYPE r2). a -> b -> Type)+resultIsLevPoly :: Type -> Bool+resultIsLevPoly = isTypeLevPoly . snd . splitPiTys+++{- **********************************************************************+*                                                                       *+           Occurs check expansion+%*                                                                      *+%********************************************************************* -}++{- Note [Occurs check expansion]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+(occurCheckExpand tv xi) expands synonyms in xi just enough to get rid+of occurrences of tv outside type function arguments, if that is+possible; otherwise, it returns Nothing.++For example, suppose we have+  type F a b = [a]+Then+  occCheckExpand b (F Int b) = Just [Int]+but+  occCheckExpand a (F a Int) = Nothing++We don't promise to do the absolute minimum amount of expanding+necessary, but we try not to do expansions we don't need to.  We+prefer doing inner expansions first.  For example,+  type F a b = (a, Int, a, [a])+  type G b   = Char+We have+  occCheckExpand b (F (G b)) = Just (F Char)+even though we could also expand F to get rid of b.+-}++occCheckExpand :: [Var] -> Type -> Maybe Type+-- See Note [Occurs check expansion]+-- We may have needed to do some type synonym unfolding in order to+-- get rid of the variable (or forall), so we also return the unfolded+-- version of the type, which is guaranteed to be syntactically free+-- of the given type variable.  If the type is already syntactically+-- free of the variable, then the same type is returned.+occCheckExpand vs_to_avoid ty+  | null vs_to_avoid  -- Efficient shortcut+  = Just ty           -- Can happen, eg. CoreUtils.mkSingleAltCase++  | otherwise+  = go (mkVarSet vs_to_avoid, emptyVarEnv) ty+  where+    go :: (VarSet, VarEnv TyCoVar) -> Type -> Maybe Type+          -- The VarSet is the set of variables we are trying to avoid+          -- The VarEnv carries mappings necessary+          -- because of kind expansion+    go cxt@(as, env) (TyVarTy tv')+      | tv' `elemVarSet` as               = Nothing+      | Just tv'' <- lookupVarEnv env tv' = return (mkTyVarTy tv'')+      | otherwise                         = do { tv'' <- go_var cxt tv'+                                               ; return (mkTyVarTy tv'') }++    go _   ty@(LitTy {}) = return ty+    go cxt (AppTy ty1 ty2) = do { ty1' <- go cxt ty1+                                ; ty2' <- go cxt ty2+                                ; return (mkAppTy ty1' ty2') }+    go cxt ty@(FunTy _ ty1 ty2)+       = do { ty1' <- go cxt ty1+            ; ty2' <- go cxt ty2+            ; return (ty { ft_arg = ty1', ft_res = ty2' }) }+    go cxt@(as, env) (ForAllTy (Bndr tv vis) body_ty)+       = do { ki' <- go cxt (varType tv)+            ; let tv' = setVarType tv ki'+                  env' = extendVarEnv env tv tv'+                  as'  = as `delVarSet` tv+            ; body' <- go (as', env') body_ty+            ; return (ForAllTy (Bndr tv' vis) body') }++    -- For a type constructor application, first try expanding away the+    -- offending variable from the arguments.  If that doesn't work, next+    -- see if the type constructor is a type synonym, and if so, expand+    -- it and try again.+    go cxt ty@(TyConApp tc tys)+      = case mapM (go cxt) tys of+          Just tys' -> return (mkTyConApp tc tys')+          Nothing | Just ty' <- tcView ty -> go cxt ty'+                  | otherwise             -> Nothing+                      -- Failing that, try to expand a synonym++    go cxt (CastTy ty co) =  do { ty' <- go cxt ty+                                ; co' <- go_co cxt co+                                ; return (mkCastTy ty' co') }+    go cxt (CoercionTy co) = do { co' <- go_co cxt co+                                ; return (mkCoercionTy co') }++    ------------------+    go_var cxt v = do { k' <- go cxt (varType v)+                      ; return (setVarType v k') }+           -- Works for TyVar and CoVar+           -- See Note [Occurrence checking: look inside kinds]++    ------------------+    go_mco _   MRefl = return MRefl+    go_mco ctx (MCo co) = MCo <$> go_co ctx co++    ------------------+    go_co cxt (Refl ty)                 = do { ty' <- go cxt ty+                                             ; return (mkNomReflCo ty') }+    go_co cxt (GRefl r ty mco)          = do { mco' <- go_mco cxt mco+                                             ; ty' <- go cxt ty+                                             ; return (mkGReflCo r ty' mco') }+      -- Note: Coercions do not contain type synonyms+    go_co cxt (TyConAppCo r tc args)    = do { args' <- mapM (go_co cxt) args+                                             ; return (mkTyConAppCo r tc args') }+    go_co cxt (AppCo co arg)            = do { co' <- go_co cxt co+                                             ; arg' <- go_co cxt arg+                                             ; return (mkAppCo co' arg') }+    go_co cxt@(as, env) (ForAllCo tv kind_co body_co)+      = do { kind_co' <- go_co cxt kind_co+           ; let tv' = setVarType tv $+                       pFst (coercionKind kind_co')+                 env' = extendVarEnv env tv tv'+                 as'  = as `delVarSet` tv+           ; body' <- go_co (as', env') body_co+           ; return (ForAllCo tv' kind_co' body') }+    go_co cxt (FunCo r co1 co2)         = do { co1' <- go_co cxt co1+                                             ; co2' <- go_co cxt co2+                                             ; return (mkFunCo r co1' co2') }+    go_co cxt@(as,env) (CoVarCo c)+      | c `elemVarSet` as               = Nothing+      | Just c' <- lookupVarEnv env c   = return (mkCoVarCo c')+      | otherwise                       = do { c' <- go_var cxt c+                                             ; return (mkCoVarCo c') }+    go_co cxt (HoleCo h)                = do { c' <- go_var cxt (ch_co_var h)+                                             ; return (HoleCo (h { ch_co_var = c' })) }+    go_co cxt (AxiomInstCo ax ind args) = do { args' <- mapM (go_co cxt) args+                                             ; return (mkAxiomInstCo ax ind args') }+    go_co cxt (UnivCo p r ty1 ty2)      = do { p' <- go_prov cxt p+                                             ; ty1' <- go cxt ty1+                                             ; ty2' <- go cxt ty2+                                             ; return (mkUnivCo p' r ty1' ty2') }+    go_co cxt (SymCo co)                = do { co' <- go_co cxt co+                                             ; return (mkSymCo co') }+    go_co cxt (TransCo co1 co2)         = do { co1' <- go_co cxt co1+                                             ; co2' <- go_co cxt co2+                                             ; return (mkTransCo co1' co2') }+    go_co cxt (NthCo r n co)            = do { co' <- go_co cxt co+                                             ; return (mkNthCo r n co') }+    go_co cxt (LRCo lr co)              = do { co' <- go_co cxt co+                                             ; return (mkLRCo lr co') }+    go_co cxt (InstCo co arg)           = do { co' <- go_co cxt co+                                             ; arg' <- go_co cxt arg+                                             ; return (mkInstCo co' arg') }+    go_co cxt (KindCo co)               = do { co' <- go_co cxt co+                                             ; return (mkKindCo co') }+    go_co cxt (SubCo co)                = do { co' <- go_co cxt co+                                             ; return (mkSubCo co') }+    go_co cxt (AxiomRuleCo ax cs)       = do { cs' <- mapM (go_co cxt) cs+                                             ; return (mkAxiomRuleCo ax cs') }++    ------------------+    go_prov _   UnsafeCoerceProv    = return UnsafeCoerceProv+    go_prov cxt (PhantomProv co)    = PhantomProv <$> go_co cxt co+    go_prov cxt (ProofIrrelProv co) = ProofIrrelProv <$> go_co cxt co+    go_prov _   p@(PluginProv _)    = return p+++{-+%************************************************************************+%*                                                                      *+        Miscellaneous functions+%*                                                                      *+%************************************************************************++-}+-- | All type constructors occurring in the type; looking through type+--   synonyms, but not newtypes.+--  When it finds a Class, it returns the class TyCon.+tyConsOfType :: Type -> UniqSet TyCon+tyConsOfType ty+  = go ty+  where+     go :: Type -> UniqSet TyCon  -- The UniqSet does duplicate elim+     go ty | Just ty' <- coreView ty = go ty'+     go (TyVarTy {})                = emptyUniqSet+     go (LitTy {})                  = emptyUniqSet+     go (TyConApp tc tys)           = go_tc tc `unionUniqSets` go_s tys+     go (AppTy a b)                 = go a `unionUniqSets` go b+     go (FunTy _ a b)               = go a `unionUniqSets` go b `unionUniqSets` go_tc funTyCon+     go (ForAllTy (Bndr tv _) ty)   = go ty `unionUniqSets` go (varType tv)+     go (CastTy ty co)              = go ty `unionUniqSets` go_co co+     go (CoercionTy co)             = go_co co++     go_co (Refl ty)               = go ty+     go_co (GRefl _ ty mco)        = go ty `unionUniqSets` go_mco mco+     go_co (TyConAppCo _ tc args)  = go_tc tc `unionUniqSets` go_cos args+     go_co (AppCo co arg)          = go_co co `unionUniqSets` go_co arg+     go_co (ForAllCo _ kind_co co) = go_co kind_co `unionUniqSets` go_co co+     go_co (FunCo _ co1 co2)       = go_co co1 `unionUniqSets` go_co co2+     go_co (AxiomInstCo ax _ args) = go_ax ax `unionUniqSets` go_cos args+     go_co (UnivCo p _ t1 t2)      = go_prov p `unionUniqSets` go t1 `unionUniqSets` go t2+     go_co (CoVarCo {})            = emptyUniqSet+     go_co (HoleCo {})             = emptyUniqSet+     go_co (SymCo co)              = go_co co+     go_co (TransCo co1 co2)       = go_co co1 `unionUniqSets` go_co co2+     go_co (NthCo _ _ co)          = go_co co+     go_co (LRCo _ co)             = go_co co+     go_co (InstCo co arg)         = go_co co `unionUniqSets` go_co arg+     go_co (KindCo co)             = go_co co+     go_co (SubCo co)              = go_co co+     go_co (AxiomRuleCo _ cs)      = go_cos cs++     go_mco MRefl    = emptyUniqSet+     go_mco (MCo co) = go_co co++     go_prov UnsafeCoerceProv    = emptyUniqSet+     go_prov (PhantomProv co)    = go_co co+     go_prov (ProofIrrelProv co) = go_co co+     go_prov (PluginProv _)      = emptyUniqSet+        -- this last case can happen from the tyConsOfType used from+        -- checkTauTvUpdate++     go_s tys     = foldr (unionUniqSets . go)     emptyUniqSet tys+     go_cos cos   = foldr (unionUniqSets . go_co)  emptyUniqSet cos++     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.+splitVisVarsOfType :: Type -> Pair TyCoVarSet+splitVisVarsOfType orig_ty = Pair invis_vars vis_vars+  where+    Pair invis_vars1 vis_vars = go orig_ty+    invis_vars = invis_vars1 `minusVarSet` vis_vars++    go (TyVarTy tv)      = Pair (tyCoVarsOfType $ tyVarKind tv) (unitVarSet tv)+    go (AppTy t1 t2)     = go t1 `mappend` go t2+    go (TyConApp tc tys) = go_tc tc tys+    go (FunTy _ t1 t2)   = go t1 `mappend` go t2+    go (ForAllTy (Bndr tv _) ty)+      = ((`delVarSet` tv) <$> go ty) `mappend`+        (invisible (tyCoVarsOfType $ varType tv))+    go (LitTy {}) = mempty+    go (CastTy ty co) = go ty `mappend` invisible (tyCoVarsOfCo co)+    go (CoercionTy co) = invisible $ tyCoVarsOfCo co++    invisible vs = Pair vs emptyVarSet++    go_tc tc tys = let (invis, vis) = partitionInvisibleTypes tc tys in+                   invisible (tyCoVarsOfTypes invis) `mappend` foldMap go vis++splitVisVarsOfTypes :: [Type] -> Pair TyCoVarSet+splitVisVarsOfTypes = foldMap splitVisVarsOfType++modifyJoinResTy :: Int            -- Number of binders to skip+                -> (Type -> Type) -- Function to apply to result type+                -> Type           -- Type of join point+                -> Type           -- New type+-- INVARIANT: If any of the first n binders are foralls, those tyvars cannot+-- appear in the original result type. See isValidJoinPointType.+modifyJoinResTy orig_ar f orig_ty+  = go orig_ar orig_ty+  where+    go 0 ty = f ty+    go n ty | Just (arg_bndr, res_ty) <- splitPiTy_maybe ty+            = mkPiTy arg_bndr (go (n-1) res_ty)+            | otherwise+            = pprPanic "modifyJoinResTy" (ppr orig_ar <+> ppr orig_ty)++setJoinResTy :: Int  -- Number of binders to skip+             -> Type -- New result type+             -> Type -- Type of join point+             -> Type -- New type+-- INVARIANT: Same as for modifyJoinResTy+setJoinResTy ar new_res_ty ty+  = modifyJoinResTy ar (const new_res_ty) ty++{-+************************************************************************+*                                                                      *+        Functions over Kinds+*                                                                      *+************************************************************************++Note [Kind Constraint and kind Type]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The kind Constraint is the kind of classes and other type constraints.+The special thing about types of kind Constraint is that+ * They are displayed with double arrow:+     f :: Ord a => a -> a+ * They are implicitly instantiated at call sites; so the type inference+   engine inserts an extra argument of type (Ord a) at every call site+   to f.++However, once type inference is over, there is *no* distinction between+Constraint and Type. Indeed we can have coercions between the two. Consider+   class C a where+     op :: a -> a+For this single-method class we may generate a newtype, which in turn+generates an axiom witnessing+    C a ~ (a -> a)+so on the left we have Constraint, and on the right we have Type.+See #7451.++Bottom line: although 'Type' and 'Constraint' are distinct TyCons, with+distinct uniques, they are treated as equal at all times except+during type inference.+-}++isConstraintKindCon :: TyCon -> Bool+isConstraintKindCon tc = tyConUnique tc == constraintKindTyConKey++-- | Tests whether the given kind (which should look like @TYPE x@)+-- is something other than a constructor tree (that is, constructors at every node).+-- E.g.  True of   TYPE k, TYPE (F Int)+--       False of  TYPE 'LiftedRep+isKindLevPoly :: Kind -> Bool+isKindLevPoly k = ASSERT2( isLiftedTypeKind k || _is_type, ppr k )+                    -- the isLiftedTypeKind check is necessary b/c of Constraint+                  go k+  where+    go ty | Just ty' <- coreView ty = go ty'+    go TyVarTy{}         = True+    go AppTy{}           = True  -- it can't be a TyConApp+    go (TyConApp tc tys) = isFamilyTyCon tc || any go tys+    go ForAllTy{}        = True+    go (FunTy _ t1 t2)   = go t1 || go t2+    go LitTy{}           = False+    go CastTy{}          = True+    go CoercionTy{}      = True++    _is_type = classifiesTypeWithValues k++-----------------------------------------+--              Subkinding+-- The tc variants are used during type-checking, where ConstraintKind+-- is distinct from all other kinds+-- After type-checking (in core), Constraint and liftedTypeKind are+-- indistinguishable++-- | Does this classify a type allowed to have values? Responds True to things+-- like *, #, TYPE Lifted, TYPE v, Constraint.+classifiesTypeWithValues :: Kind -> Bool+-- ^ True of any sub-kind of OpenTypeKind+classifiesTypeWithValues k = isJust (kindRep_maybe k)++{-+%************************************************************************+%*                                                                      *+         Pretty-printing+%*                                                                      *+%************************************************************************++Most pretty-printing is either in TyCoRep or IfaceType.++-}++-- | Does a 'TyCon' (that is applied to some number of arguments) need to be+-- ascribed with an explicit kind signature to resolve ambiguity if rendered as+-- a source-syntax type?+-- (See @Note [When does a tycon application need an explicit kind signature?]@+-- for a full explanation of what this function checks for.)+tyConAppNeedsKindSig+  :: Bool  -- ^ Should specified binders count towards injective positions in+           --   the kind of the TyCon? (If you're using visible kind+           --   applications, then you want True here.+  -> TyCon+  -> Int   -- ^ The number of args the 'TyCon' is applied to.+  -> Bool  -- ^ Does @T t_1 ... t_n@ need a kind signature? (Where @n@ is the+           --   number of arguments)+tyConAppNeedsKindSig spec_inj_pos tc n_args+  | LT <- listLengthCmp tc_binders n_args+  = False+  | otherwise+  = let (dropped_binders, remaining_binders)+          = splitAt n_args tc_binders+        result_kind  = mkTyConKind remaining_binders tc_res_kind+        result_vars  = tyCoVarsOfType result_kind+        dropped_vars = fvVarSet $+                       mapUnionFV injective_vars_of_binder dropped_binders++    in not (subVarSet result_vars dropped_vars)+  where+    tc_binders  = tyConBinders tc+    tc_res_kind = tyConResKind tc++    -- Returns the variables that would be fixed by knowing a TyConBinder. See+    -- Note [When does a tycon application need an explicit kind signature?]+    -- for a more detailed explanation of what this function does.+    injective_vars_of_binder :: TyConBinder -> FV+    injective_vars_of_binder (Bndr tv vis) =+      case vis of+        AnonTCB VisArg -> injectiveVarsOfType False -- conservative choice+                                              (varType tv)+        NamedTCB argf  | source_of_injectivity argf+                       -> unitFV tv `unionFV`+                          injectiveVarsOfType False (varType tv)+        _              -> emptyFV++    source_of_injectivity Required  = True+    source_of_injectivity Specified = spec_inj_pos+    source_of_injectivity Inferred  = False++{-+Note [When does a tycon application need an explicit kind signature?]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There are a couple of places in GHC where we convert Core Types into forms that+more closely resemble user-written syntax. These include:++1. Template Haskell Type reification (see, for instance, TcSplice.reify_tc_app)+2. Converting Types to LHsTypes (in GHC.Hs.Utils.typeToLHsType, or in Haddock)++This conversion presents a challenge: how do we ensure that the resulting type+has enough kind information so as not to be ambiguous? To better motivate this+question, consider the following Core type:++  -- Foo :: Type -> Type+  type Foo = Proxy Type++There is nothing ambiguous about the RHS of Foo in Core. But if we were to,+say, reify it into a TH Type, then it's tempting to just drop the invisible+Type argument and simply return `Proxy`. But now we've lost crucial kind+information: we don't know if we're dealing with `Proxy Type` or `Proxy Bool`+or `Proxy Int` or something else! We've inadvertently introduced ambiguity.++Unlike in other situations in GHC, we can't just turn on+-fprint-explicit-kinds, as we need to produce something which has the same+structure as a source-syntax type. Moreover, we can't rely on visible kind+application, since the first kind argument to Proxy is inferred, not specified.+Our solution is to annotate certain tycons with their kinds whenever they+appear in applied form in order to resolve the ambiguity. For instance, we+would reify the RHS of Foo like so:++  type Foo = (Proxy :: Type -> Type)++We need to devise an algorithm that determines precisely which tycons need+these explicit kind signatures. We certainly don't want to annotate _every_+tycon with a kind signature, or else we might end up with horribly bloated+types like the following:++  (Either :: Type -> Type -> Type) (Int :: Type) (Char :: Type)++We only want to annotate tycons that absolutely require kind signatures in+order to resolve some sort of ambiguity, and nothing more.++Suppose we have a tycon application (T ty_1 ... ty_n). Why might this type+require a kind signature? It might require it when we need to fill in any of+T's omitted arguments. By "omitted argument", we mean one that is dropped when+reifying ty_1 ... ty_n. Sometimes, the omitted arguments are inferred and+specified arguments (e.g., TH reification in TcSplice), and sometimes the+omitted arguments are only the inferred ones (e.g., in GHC.Hs.Utils.typeToLHsType,+which reifies specified arguments through visible kind application).+Regardless, the key idea is that _some_ arguments are going to be omitted after+reification, and the only mechanism we have at our disposal for filling them in+is through explicit kind signatures.++What do we mean by "fill in"? Let's consider this small example:++  T :: forall {k}. Type -> (k -> Type) -> k++Moreover, we have this application of T:++  T @{j} Int aty++When we reify this type, we omit the inferred argument @{j}. Is it fixed by the+other (non-inferred) arguments? Yes! If we know the kind of (aty :: blah), then+we'll generate an equality constraint (kappa -> Type) and, assuming we can+solve it, that will fix `kappa`. (Here, `kappa` is the unification variable+that we instantiate `k` with.)++Therefore, for any application of a tycon T to some arguments, the Question We+Must Answer is:++* Given the first n arguments of T, do the kinds of the non-omitted arguments+  fill in the omitted arguments?++(This is still a bit hand-wavey, but we'll refine this question incrementally+as we explain more of the machinery underlying this process.)++Answering this question is precisely the role that the `injectiveVarsOfType`+and `injective_vars_of_binder` functions exist to serve. If an omitted argument+`a` appears in the set returned by `injectiveVarsOfType ty`, then knowing+`ty` determines (i.e., fills in) `a`. (More on `injective_vars_of_binder` in a+bit.)++More formally, if+`a` is in `injectiveVarsOfType ty`+and  S1(ty) ~ S2(ty),+then S1(a)  ~ S2(a),+where S1 and S2 are arbitrary substitutions.++For example, is `F` is a non-injective type family, then++  injectiveVarsOfType(Either c (Maybe (a, F b c))) = {a, c}++Now that we know what this function does, here is a second attempt at the+Question We Must Answer:++* Given the first n arguments of T (ty_1 ... ty_n), consider the binders+  of T that are instantiated by non-omitted arguments. Do the injective+  variables of these binders fill in the remainder of T's kind?++Alright, we're getting closer. Next, we need to clarify what the injective+variables of a tycon binder are. This the role that the+`injective_vars_of_binder` function serves. Here is what this function does for+each form of tycon binder:++* Anonymous binders are injective positions. For example, in the promoted data+  constructor '(:):++    '(:) :: forall a. a -> [a] -> [a]++  The second and third tyvar binders (of kinds `a` and `[a]`) are both+  anonymous, so if we had '(:) 'True '[], then the kinds of 'True and+  '[] would contribute to the kind of '(:) 'True '[]. Therefore,+  injective_vars_of_binder(_ :: a) = injectiveVarsOfType(a) = {a}.+  (Similarly, injective_vars_of_binder(_ :: [a]) = {a}.)+* Named binders:+  - Inferred binders are never injective positions. For example, in this data+    type:++      data Proxy a+      Proxy :: forall {k}. k -> Type++    If we had Proxy 'True, then the kind of 'True would not contribute to the+    kind of Proxy 'True. Therefore,+    injective_vars_of_binder(forall {k}. ...) = {}.+  - Required binders are injective positions. For example, in this data type:++      data Wurble k (a :: k) :: k+      Wurble :: forall k -> k -> k++  The first tyvar binder (of kind `forall k`) has required visibility, so if+  we had Wurble (Maybe a) Nothing, then the kind of Maybe a would+  contribute to the kind of Wurble (Maybe a) Nothing. Hence,+  injective_vars_of_binder(forall a -> ...) = {a}.+  - Specified binders /might/ be injective positions, depending on how you+    approach things. Continuing the '(:) example:++      '(:) :: forall a. a -> [a] -> [a]++    Normally, the (forall a. ...) tyvar binder wouldn't contribute to the kind+    of '(:) 'True '[], since it's not explicitly instantiated by the user. But+    if visible kind application is enabled, then this is possible, since the+    user can write '(:) @Bool 'True '[]. (In that case,+    injective_vars_of_binder(forall a. ...) = {a}.)++    There are some situations where using visible kind application is appropriate+    (e.g., GHC.Hs.Utils.typeToLHsType) and others where it is not (e.g., TH+    reification), so the `injective_vars_of_binder` function is parametrized by+    a Bool which decides if specified binders should be counted towards+    injective positions or not.++Now that we've defined injective_vars_of_binder, we can refine the Question We+Must Answer once more:++* Given the first n arguments of T (ty_1 ... ty_n), consider the binders+  of T that are instantiated by non-omitted arguments. For each such binder+  b_i, take the union of all injective_vars_of_binder(b_i). Is this set a+  superset of the free variables of the remainder of T's kind?++If the answer to this question is "no", then (T ty_1 ... ty_n) needs an+explicit kind signature, since T's kind has kind variables leftover that+aren't fixed by the non-omitted arguments.++One last sticking point: what does "the remainder of T's kind" mean? You might+be tempted to think that it corresponds to all of the arguments in the kind of+T that would normally be instantiated by omitted arguments. But this isn't+quite right, strictly speaking. Consider the following (silly) example:++  S :: forall {k}. Type -> Type++And suppose we have this application of S:++  S Int Bool++The Int argument would be omitted, and+injective_vars_of_binder(_ :: Type) = {}. This is not a superset of {k}, which+might suggest that (S Bool) needs an explicit kind signature. But+(S Bool :: Type) doesn't actually fix `k`! This is because the kind signature+only affects the /result/ of the application, not all of the individual+arguments. So adding a kind signature here won't make a difference. Therefore,+the fourth (and final) iteration of the Question We Must Answer is:++* Given the first n arguments of T (ty_1 ... ty_n), consider the binders+  of T that are instantiated by non-omitted arguments. For each such binder+  b_i, take the union of all injective_vars_of_binder(b_i). Is this set a+  superset of the free variables of the kind of (T ty_1 ... ty_n)?++Phew, that was a lot of work!++How can be sure that this is correct? That is, how can we be sure that in the+event that we leave off a kind annotation, that one could infer the kind of the+tycon application from its arguments? It's essentially a proof by induction: if+we can infer the kinds of every subtree of a type, then the whole tycon+application will have an inferrable kind--unless, of course, the remainder of+the tycon application's kind has uninstantiated kind variables.++What happens if T is oversaturated? That is, if T's kind has fewer than n+arguments, in the case that the concrete application instantiates a result+kind variable with an arrow kind? If we run out of arguments, we do not attach+a kind annotation. This should be a rare case, indeed. Here is an example:++   data T1 :: k1 -> k2 -> *+   data T2 :: k1 -> k2 -> *++   type family G (a :: k) :: k+   type instance G T1 = T2++   type instance F Char = (G T1 Bool :: (* -> *) -> *)   -- F from above++Here G's kind is (forall k. k -> k), and the desugared RHS of that last+instance of F is (G (* -> (* -> *) -> *) (T1 * (* -> *)) Bool). According to+the algorithm above, there are 3 arguments to G so we should peel off 3+arguments in G's kind. But G's kind has only two arguments. This is the+rare special case, and we choose not to annotate the application of G with+a kind signature. After all, we needn't do this, since that instance would+be reified as:++   type instance F Char = G (T1 :: * -> (* -> *) -> *) Bool++So the kind of G isn't ambiguous anymore due to the explicit kind annotation+on its argument. See #8953 and test th/T8953.+-}
types/Type.hs-boot view
@@ -4,11 +4,10 @@  import GhcPrelude import TyCon-import Var ( TyCoVar ) import {-# SOURCE #-} TyCoRep( Type, Coercion ) import Util -isPredTy     :: Type -> Bool+isPredTy     :: HasDebugCallStack => Type -> Bool isCoercionTy :: Type -> Bool  mkAppTy    :: Type -> Type -> Type@@ -19,8 +18,9 @@  coreView :: Type -> Maybe Type tcView :: Type -> Maybe Type+isRuntimeRepTy :: Type -> Bool+isLiftedTypeKind :: Type -> Bool -tyCoVarsOfTypesWellScoped :: [Type] -> [TyCoVar]-tyCoVarsOfTypeWellScoped :: Type -> [TyCoVar]-scopedSort :: [TyCoVar] -> [TyCoVar] splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])++partitionInvisibleTypes :: TyCon -> [Type] -> ([Type], [Type])
types/Unify.hs view
@@ -35,7 +35,9 @@ import Type hiding ( getTvSubstEnv ) import Coercion hiding ( getCvSubstEnv ) import TyCon-import TyCoRep hiding ( getTvSubstEnv, getCvSubstEnv )+import TyCoRep+import TyCoFVs ( tyCoVarsOfCoList, tyCoFVsOfTypes )+import TyCoSubst ( mkTvSubst ) import FV( FV, fvVarSet, fvVarList ) import Util import Pair@@ -330,7 +332,7 @@ tcUnifyTysFG ("fine-grained") returns one of three results: success, occurs-check failure ("MaybeApart"), or general failure ("SurelyApart"). -See also Trac #8162.+See also #8162.  It's worth noting that unification in the presence of infinite types is not complete. This means that, sometimes, a closed type family does not reduce@@ -387,14 +389,19 @@   = case tc_unify_tys (const BindMe) twoWay True False                        rn_env emptyTvSubstEnv emptyCvSubstEnv                        [t1] [t2] of-      Unifiable  (subst, _) -> Just $ niFixTCvSubst subst-      MaybeApart (subst, _) -> Just $ niFixTCvSubst subst+      Unifiable  (subst, _) -> Just $ maybe_fix subst+      MaybeApart (subst, _) -> Just $ maybe_fix subst       -- we want to *succeed* in questionable cases. This is a       -- pre-unification algorithm.       SurelyApart      -> Nothing   where-    rn_env = mkRnEnv2 $ mkInScopeSet $ tyCoVarsOfTypes [t1, t2]+    in_scope = mkInScopeSet $ tyCoVarsOfTypes [t1, t2]+    rn_env   = mkRnEnv2 in_scope +    maybe_fix | twoWay    = niFixTCvSubst+              | otherwise = mkTvSubst in_scope -- when matching, don't confuse+                                               -- domain with range+ ----------------- tcUnifyTys :: (TyCoVar -> BindFlag)            -> [Type] -> [Type]@@ -554,9 +561,9 @@    , g -> H k (f:*) ] If we don't do this, we may apply the substitution to something, and get an ill-formed type, i.e. one where typeKind will fail.-This happened, for example, in Trac #9106.+This happened, for example, in #9106. -It gets worse.  In Trac #14164 we wanted to take the fixpoint of+It gets worse.  In #14164 we wanted to take the fixpoint of this substitution    [ xs_asV :-> F a_aY6 (z_aY7 :: a_aY6)                         (rest_aWF :: G a_aY6 (z_aY7 :: a_aY6))@@ -869,8 +876,8 @@ a dictionary for that constraint, which requires dealing with coercions in this manner. -Note [Matching in the presence of casts]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note [Matching in the presence of casts (1)]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When matching, it is crucial that no variables from the template end up in the range of the matching substitution (obviously!). When unifying, that's not a constraint; instead we take the fixpoint@@ -887,7 +894,7 @@ But that is obviously wrong because 'co' (from the template) ends up in 'kco', which in turn ends up in the range of the substitution. -This all came up in Trac #13910.  Because we match tycon arguments+This all came up in #13910.  Because we match tycon arguments left-to-right, the ambient substitution will already have a matching substitution for any kinds; so there is an easy fix: just apply the substitution-so-far to the coercion from the LHS.@@ -901,8 +908,28 @@   better way.  * One better way is to ensure that type patterns (the template-  in the matching process) have no casts.  See Trac #14119.+  in the matching process) have no casts.  See #14119. +Note [Matching in the presence of casts (2)]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There is another wrinkle (#17395).  Suppose (T :: forall k. k -> Type)+and we are matching+   tcMatchTy (T k (a::k))  (T j (b::j))++Then we'll match k :-> j, as expected. But then in unify_tys+we invoke+   unify_tys env (a::k) (b::j) (Refl j)++Although we have unified k and j, it's very important that we put+(Refl j), /not/ (Refl k) as the fourth argument to unify_tys.+If we put (Refl k) we'd end up with teh substitution+  a :-> b |> Refl k+which is bogus because one of the template variables, k,+appears in the range of the substitution.  Eek.++Similar care is needed in unify_ty_app.++ Note [Polykinded tycon applications] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppose  T :: forall k. Type -> K@@ -913,7 +940,7 @@ These two TyConApps have the same TyCon at the front but they (legitimately) have different numbers of arguments.  They are surelyApart, so we can report that without looking any-further (see Trac #15704).+further (see #15704). -}  -------------- unify_ty: the main workhorse -----------@@ -935,7 +962,7 @@   | Just ty2' <- tcView ty2   = unify_ty env ty1 ty2' kco   | CastTy ty1' co <- ty1     = if um_unif env                                 then unify_ty env ty1' ty2 (co `mkTransCo` kco)-                                else -- See Note [Matching in the presence of casts]+                                else -- See Note [Matching in the presence of casts (1)]                                      do { subst <- getSubst env                                         ; let co' = substCo subst co                                         ; unify_ty env ty1' ty2 (co' `mkTransCo` kco) }@@ -1038,7 +1065,9 @@              ki2 = typeKind ty2            -- See Note [Kind coercions in Unify]        ; unify_ty  env ki1 ki2 (mkNomReflCo liftedTypeKind)-       ; unify_ty  env ty1 ty2 (mkNomReflCo ki1)+       ; unify_ty  env ty1 ty2 (mkNomReflCo ki2)+                 -- Very important: 'ki2' not 'ki1'+                 -- See Note [Matching in the presence of casts (2)]        ; unify_tys env ty1args ty2args }  unify_tys :: UMEnv -> [Type] -> [Type] -> UM ()@@ -1048,7 +1077,9 @@     go []     []     = return ()     go (x:xs) (y:ys)       -- See Note [Kind coercions in Unify]-      = do { unify_ty env x y (mkNomReflCo $ typeKind x)+      = do { unify_ty env x y (mkNomReflCo $ typeKind y)+                 -- Very important: 'y' not 'x'+                 -- See Note [Matching in the presence of casts (2)]            ; go xs ys }     go _ _ = surelyApart       -- Possibly different saturations of a polykinded tycon@@ -1141,7 +1172,7 @@         ; checkRnEnv env free_tvs2          -- Occurs check, see Note [Fine-grained unification]-        -- Make sure you include 'kco' (which ty2 does) Trac #14846+        -- Make sure you include 'kco' (which ty2 does) #14846         ; occurs <- occursCheck env tv1 free_tvs2          ; if occurs then maybeApart@@ -1206,9 +1237,7 @@                    , um_cv_env   :: CvSubstEnv }  newtype UM a = UM { unUM :: UMState -> UnifyResultM (UMState, a) }--instance Functor UM where-      fmap = liftM+    deriving (Functor)  instance Applicative UM where       pure a = UM (\s -> pure (s, a))@@ -1393,7 +1422,7 @@  ty_co_match menv subst ty co lkco rkco   | CastTy ty' co' <- ty-     -- See Note [Matching in the presence of casts]+     -- See Note [Matching in the presence of casts (1)]   = let empty_subst  = mkEmptyTCvSubst (rnInScopeSet (me_env menv))         substed_co_l = substCo (liftEnvSubstLeft empty_subst subst)  co'         substed_co_r = substCo (liftEnvSubstRight empty_subst subst) co'@@ -1438,7 +1467,7 @@  ty_co_match menv subst (TyConApp tc1 tys) (TyConAppCo _ tc2 cos) _lkco _rkco   = ty_co_match_tc menv subst tc1 tys tc2 cos-ty_co_match menv subst (FunTy ty1 ty2) co _lkco _rkco+ty_co_match menv subst (FunTy _ ty1 ty2) co _lkco _rkco     -- Despite the fact that (->) is polymorphic in four type variables (two     -- runtime rep and two types), we shouldn't need to explicitly unify the     -- runtime reps here; unifying the types themselves should be sufficient.@@ -1550,7 +1579,7 @@   case (isReflCo_maybe co) of     Just (AppTy ty1 ty2, Nominal)       -> Just (AppCo (mkReflCo Nominal ty1) (mkNomReflCo ty2))-    Just (FunTy ty1 ty2, r)+    Just (FunTy _ ty1 ty2, r)       | Just rep1 <- getRuntimeRep_maybe ty1       , Just rep2 <- getRuntimeRep_maybe ty2       ->  Just (TyConAppCo r funTyCon [ mkReflCo r rep1, mkReflCo r rep2
utils/AsmUtils.hs view
@@ -8,7 +8,7 @@  import GhcPrelude -import Platform+import GHC.Platform import Outputable  -- | Generate a section type (e.g. @\@progbits@). See #13937.
utils/Bag.hs view
@@ -6,7 +6,7 @@ Bag: an unordered collection with duplicates -} -{-# LANGUAGE ScopedTypeVariables, CPP #-}+{-# LANGUAGE ScopedTypeVariables, CPP, DeriveFunctor #-}  module Bag (         Bag, -- abstract type@@ -15,11 +15,11 @@         mapBag,         elemBag, lengthBag,         filterBag, partitionBag, partitionBagWith,-        concatBag, catBagMaybes, foldBag, foldrBag, foldlBag,+        concatBag, catBagMaybes, foldBag,         isEmptyBag, isSingletonBag, consBag, snocBag, anyBag, allBag,         listToBag, bagToList, mapAccumBagL,         concatMapBag, concatMapBagPair, mapMaybeBag,-        foldrBagM, foldlBagM, mapBagM, mapBagM_,+        mapBagM, mapBagM_,         flatMapBagM, flatMapBagPairM,         mapAndUnzipBagM, mapAccumBagLM,         anyBagM, filterBagM@@ -45,6 +45,7 @@   | UnitBag a   | TwoBags (Bag a) (Bag a) -- INVARIANT: neither branch is empty   | ListBag [a]             -- INVARIANT: the list is non-empty+  deriving (Functor)  emptyBag :: Bag a emptyBag = EmptyBag@@ -133,12 +134,12 @@ anyBagM p (ListBag xs)    = anyM p xs  concatBag :: Bag (Bag a) -> Bag a-concatBag bss = foldrBag add emptyBag bss+concatBag bss = foldr add emptyBag bss   where     add bs rs = bs `unionBags` rs  catBagMaybes :: Bag (Maybe a) -> Bag a-catBagMaybes bs = foldrBag add emptyBag bs+catBagMaybes bs = foldr add emptyBag bs   where     add Nothing rs = rs     add (Just x) rs = x `consBag` rs@@ -190,41 +191,8 @@ foldBag t u e (TwoBags b1 b2) = foldBag t u (foldBag t u e b2) b1 foldBag t u e (ListBag xs)    = foldr (t.u) e xs -foldrBag :: (a -> r -> r) -> r-         -> Bag a-         -> r--foldrBag _ z EmptyBag        = z-foldrBag k z (UnitBag x)     = k x z-foldrBag k z (TwoBags b1 b2) = foldrBag k (foldrBag k z b2) b1-foldrBag k z (ListBag xs)    = foldr k z xs--foldlBag :: (r -> a -> r) -> r-         -> Bag a-         -> r--foldlBag _ z EmptyBag        = z-foldlBag k z (UnitBag x)     = k z x-foldlBag k z (TwoBags b1 b2) = foldlBag k (foldlBag k z b1) b2-foldlBag k z (ListBag xs)    = foldl k z xs--foldrBagM :: (Monad m) => (a -> b -> m b) -> b -> Bag a -> m b-foldrBagM _ z EmptyBag        = return z-foldrBagM k z (UnitBag x)     = k x z-foldrBagM k z (TwoBags b1 b2) = do { z' <- foldrBagM k z b2; foldrBagM k z' b1 }-foldrBagM k z (ListBag xs)    = foldrM k z xs--foldlBagM :: (Monad m) => (b -> a -> m b) -> b -> Bag a -> m b-foldlBagM _ z EmptyBag        = return z-foldlBagM k z (UnitBag x)     = k z x-foldlBagM k z (TwoBags b1 b2) = do { z' <- foldlBagM k z b1; foldlBagM k z' b2 }-foldlBagM k z (ListBag xs)    = foldlM k z xs- mapBag :: (a -> b) -> Bag a -> Bag b-mapBag _ EmptyBag        = EmptyBag-mapBag f (UnitBag x)     = UnitBag (f x)-mapBag f (TwoBags b1 b2) = TwoBags (mapBag f b1) (mapBag f b2)-mapBag f (ListBag xs)    = ListBag (map f xs)+mapBag = fmap  concatMapBag :: (a -> Bag b) -> Bag a -> Bag b concatMapBag _ EmptyBag        = EmptyBag@@ -332,7 +300,7 @@ listToBag vs = ListBag vs  bagToList :: Bag a -> [a]-bagToList b = foldrBag (:) [] b+bagToList b = foldr (:) [] b  instance (Outputable a) => Outputable (Bag a) where     ppr bag = braces (pprWithCommas ppr (bagToList bag))@@ -344,8 +312,24 @@   dataTypeOf _ = mkNoRepType "Bag"   dataCast1 x  = gcast1 x -instance Functor Bag where-    fmap = mapBag- instance Foldable.Foldable Bag where-    foldr = foldrBag+  foldr _ z EmptyBag        = z+  foldr k z (UnitBag x)     = k x z+  foldr k z (TwoBags b1 b2) = foldr k (foldr k z b2) b1+  foldr k z (ListBag xs)    = foldr k z xs++  foldl _ z EmptyBag        = z+  foldl k z (UnitBag x)     = k z x+  foldl k z (TwoBags b1 b2) = foldl k (foldl k z b1) b2+  foldl k z (ListBag xs)    = foldl k z xs++  foldl' _ z EmptyBag        = z+  foldl' k z (UnitBag x)     = k z x+  foldl' k z (TwoBags b1 b2) = let r1 = foldl' k z b1 in seq r1 $ foldl' k r1 b2+  foldl' k z (ListBag xs)    = foldl' k z xs++instance Traversable Bag where+  traverse _ EmptyBag        = pure EmptyBag+  traverse f (UnitBag x)     = UnitBag <$> f x+  traverse f (TwoBags b1 b2) = TwoBags <$> traverse f b1 <*> traverse f b2+  traverse f (ListBag xs)    = ListBag <$> traverse f xs
utils/Binary.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE BangPatterns #-}  {-# OPTIONS_GHC -O2 -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised@@ -45,6 +46,12 @@    putByte,    getByte, +   -- * Variable length encodings+   putULEB128,+   getULEB128,+   putSLEB128,+   getSLEB128,+    -- * Lazy Binary I/O    lazyGet,    lazyPut,@@ -57,9 +64,6 @@  #include "HsVersions.h" --- The *host* architecture version:-#include "MachDeps.h"- import GhcPrelude  import {-# SOURCE #-} Name (Name)@@ -79,11 +83,12 @@ import Data.IORef import Data.Char                ( ord, chr ) import Data.Time+import Data.List (unfoldr) import Type.Reflection import Type.Reflection.Unsafe import Data.Kind (Type) import GHC.Exts (TYPE, RuntimeRep(..), VecCount(..), VecElem(..))-import Control.Monad            ( when )+import Control.Monad            ( when, (<$!>), unless ) import System.IO as IO import System.IO.Unsafe         ( unsafeInterleaveIO ) import System.IO.Error          ( mkIOError, eofErrorType )@@ -138,6 +143,8 @@ -- class Binary --------------------------------------------------------------- +-- | Do not rely on instance sizes for general types,+-- we use variable length encoding for many of them. class Binary a where     put_   :: BinHandle -> a -> IO ()     put    :: BinHandle -> a -> IO (Bin a)@@ -171,14 +178,14 @@ tellBin (BinMem _ r _ _) = do ix <- readFastMutInt r; return (BinPtr ix)  seekBin :: BinHandle -> Bin a -> IO ()-seekBin h@(BinMem _ ix_r sz_r _) (BinPtr p) = do+seekBin h@(BinMem _ ix_r sz_r _) (BinPtr !p) = do   sz <- readFastMutInt sz_r   if (p >= sz)         then do expandBin h p; writeFastMutInt ix_r p         else writeFastMutInt ix_r p  seekBy :: BinHandle -> Int -> IO ()-seekBy h@(BinMem _ ix_r sz_r _) off = do+seekBy h@(BinMem _ ix_r sz_r _) !off = do   sz <- readFastMutInt sz_r   ix <- readFastMutInt ix_r   let ix' = ix + off@@ -220,9 +227,9 @@  -- expand the size of the array to include a specified offset expandBin :: BinHandle -> Int -> IO ()-expandBin (BinMem _ _ sz_r arr_r) off = do-   sz <- readFastMutInt sz_r-   let sz' = head (dropWhile (<= off) (iterate (* 2) sz))+expandBin (BinMem _ _ sz_r arr_r) !off = do+   !sz <- readFastMutInt sz_r+   let !sz' = getSize sz    arr <- readIORef arr_r    arr' <- mallocForeignPtrBytes sz'    withForeignPtr arr $ \old ->@@ -230,10 +237,20 @@        copyBytes new old sz    writeFastMutInt sz_r sz'    writeIORef arr_r arr'+   where+    getSize :: Int -> Int+    getSize !sz+      | sz > off+      = sz+      | otherwise+      = getSize (sz * 2)  -- ----------------------------------------------------------------------------- -- Low-level reading/writing of bytes +-- | Takes a size and action writing up to @size@ bytes.+--   After the action has run advance the index to the buffer+--   by size bytes. putPrim :: BinHandle -> Int -> (Ptr Word8 -> IO ()) -> IO () putPrim h@(BinMem _ ix_r sz_r arr_r) size f = do   ix <- readFastMutInt ix_r@@ -244,6 +261,18 @@   withForeignPtr arr $ \op -> f (op `plusPtr` ix)   writeFastMutInt ix_r (ix + size) +-- -- | Similar to putPrim but advances the index by the actual number of+-- -- bytes written.+-- putPrimMax :: BinHandle -> Int -> (Ptr Word8 -> IO Int) -> IO ()+-- putPrimMax h@(BinMem _ ix_r sz_r arr_r) size f = do+--   ix <- readFastMutInt ix_r+--   sz <- readFastMutInt sz_r+--   when (ix + size > sz) $+--     expandBin h (ix + size)+--   arr <- readIORef arr_r+--   written <- withForeignPtr arr $ \op -> f (op `plusPtr` ix)+--   writeFastMutInt ix_r (ix + written)+ getPrim :: BinHandle -> Int -> (Ptr Word8 -> IO a) -> IO a getPrim (BinMem _ ix_r sz_r arr_r) size f = do   ix <- readFastMutInt ix_r@@ -256,23 +285,23 @@   return w  putWord8 :: BinHandle -> Word8 -> IO ()-putWord8 h w = putPrim h 1 (\op -> poke op w)+putWord8 h !w = putPrim h 1 (\op -> poke op w)  getWord8 :: BinHandle -> IO Word8 getWord8 h = getPrim h 1 peek -putWord16 :: BinHandle -> Word16 -> IO ()-putWord16 h w = putPrim h 2 (\op -> do-  pokeElemOff op 0 (fromIntegral (w `shiftR` 8))-  pokeElemOff op 1 (fromIntegral (w .&. 0xFF))-  )+-- putWord16 :: BinHandle -> Word16 -> IO ()+-- putWord16 h w = putPrim h 2 (\op -> do+--   pokeElemOff op 0 (fromIntegral (w `shiftR` 8))+--   pokeElemOff op 1 (fromIntegral (w .&. 0xFF))+--   ) -getWord16 :: BinHandle -> IO Word16-getWord16 h = getPrim h 2 (\op -> do-  w0 <- fromIntegral <$> peekElemOff op 0-  w1 <- fromIntegral <$> peekElemOff op 1-  return $! w0 `shiftL` 8 .|. w1-  )+-- getWord16 :: BinHandle -> IO Word16+-- getWord16 h = getPrim h 2 (\op -> do+--   w0 <- fromIntegral <$> peekElemOff op 0+--   w1 <- fromIntegral <$> peekElemOff op 1+--   return $! w0 `shiftL` 8 .|. w1+--   )  putWord32 :: BinHandle -> Word32 -> IO () putWord32 h w = putPrim h 4 (\op -> do@@ -295,63 +324,188 @@             w3   ) -putWord64 :: BinHandle -> Word64 -> IO ()-putWord64 h w = putPrim h 8 (\op -> do-  pokeElemOff op 0 (fromIntegral (w `shiftR` 56))-  pokeElemOff op 1 (fromIntegral ((w `shiftR` 48) .&. 0xFF))-  pokeElemOff op 2 (fromIntegral ((w `shiftR` 40) .&. 0xFF))-  pokeElemOff op 3 (fromIntegral ((w `shiftR` 32) .&. 0xFF))-  pokeElemOff op 4 (fromIntegral ((w `shiftR` 24) .&. 0xFF))-  pokeElemOff op 5 (fromIntegral ((w `shiftR` 16) .&. 0xFF))-  pokeElemOff op 6 (fromIntegral ((w `shiftR` 8) .&. 0xFF))-  pokeElemOff op 7 (fromIntegral (w .&. 0xFF))-  )+-- putWord64 :: BinHandle -> Word64 -> IO ()+-- putWord64 h w = putPrim h 8 (\op -> do+--   pokeElemOff op 0 (fromIntegral (w `shiftR` 56))+--   pokeElemOff op 1 (fromIntegral ((w `shiftR` 48) .&. 0xFF))+--   pokeElemOff op 2 (fromIntegral ((w `shiftR` 40) .&. 0xFF))+--   pokeElemOff op 3 (fromIntegral ((w `shiftR` 32) .&. 0xFF))+--   pokeElemOff op 4 (fromIntegral ((w `shiftR` 24) .&. 0xFF))+--   pokeElemOff op 5 (fromIntegral ((w `shiftR` 16) .&. 0xFF))+--   pokeElemOff op 6 (fromIntegral ((w `shiftR` 8) .&. 0xFF))+--   pokeElemOff op 7 (fromIntegral (w .&. 0xFF))+--   ) -getWord64 :: BinHandle -> IO Word64-getWord64 h = getPrim h 8 (\op -> do-  w0 <- fromIntegral <$> peekElemOff op 0-  w1 <- fromIntegral <$> peekElemOff op 1-  w2 <- fromIntegral <$> peekElemOff op 2-  w3 <- fromIntegral <$> peekElemOff op 3-  w4 <- fromIntegral <$> peekElemOff op 4-  w5 <- fromIntegral <$> peekElemOff op 5-  w6 <- fromIntegral <$> peekElemOff op 6-  w7 <- fromIntegral <$> peekElemOff op 7+-- getWord64 :: BinHandle -> IO Word64+-- getWord64 h = getPrim h 8 (\op -> do+--   w0 <- fromIntegral <$> peekElemOff op 0+--   w1 <- fromIntegral <$> peekElemOff op 1+--   w2 <- fromIntegral <$> peekElemOff op 2+--   w3 <- fromIntegral <$> peekElemOff op 3+--   w4 <- fromIntegral <$> peekElemOff op 4+--   w5 <- fromIntegral <$> peekElemOff op 5+--   w6 <- fromIntegral <$> peekElemOff op 6+--   w7 <- fromIntegral <$> peekElemOff op 7 -  return $! (w0 `shiftL` 56) .|.-            (w1 `shiftL` 48) .|.-            (w2 `shiftL` 40) .|.-            (w3 `shiftL` 32) .|.-            (w4 `shiftL` 24) .|.-            (w5 `shiftL` 16) .|.-            (w6 `shiftL` 8)  .|.-            w7-  )+--   return $! (w0 `shiftL` 56) .|.+--             (w1 `shiftL` 48) .|.+--             (w2 `shiftL` 40) .|.+--             (w3 `shiftL` 32) .|.+--             (w4 `shiftL` 24) .|.+--             (w5 `shiftL` 16) .|.+--             (w6 `shiftL` 8)  .|.+--             w7+--   )  putByte :: BinHandle -> Word8 -> IO ()-putByte bh w = putWord8 bh w+putByte bh !w = putWord8 bh w  getByte :: BinHandle -> IO Word8 getByte h = getWord8 h  -- -----------------------------------------------------------------------------+-- Encode numbers in LEB128 encoding.+-- Requires one byte of space per 7 bits of data.+--+-- There are signed and unsigned variants.+-- Do NOT use the unsigned one for signed values, at worst it will+-- result in wrong results, at best it will lead to bad performance+-- when coercing negative values to an unsigned type.+--+-- We mark them as SPECIALIZE as it's extremely critical that they get specialized+-- to their specific types.+--+-- TODO: Each use of putByte performs a bounds check,+--       we should use putPrimMax here. However it's quite hard to return+--       the number of bytes written into putPrimMax without allocating an+--       Int for it, while the code below does not allocate at all.+--       So we eat the cost of the bounds check instead of increasing allocations+--       for now.++-- Unsigned numbers+{-# SPECIALISE putULEB128 :: BinHandle -> Word -> IO () #-}+{-# SPECIALISE putULEB128 :: BinHandle -> Word64 -> IO () #-}+{-# SPECIALISE putULEB128 :: BinHandle -> Word32 -> IO () #-}+{-# SPECIALISE putULEB128 :: BinHandle -> Word16 -> IO () #-}+{-# SPECIALISE putULEB128 :: BinHandle -> Int -> IO () #-}+{-# SPECIALISE putULEB128 :: BinHandle -> Int64 -> IO () #-}+{-# SPECIALISE putULEB128 :: BinHandle -> Int32 -> IO () #-}+{-# SPECIALISE putULEB128 :: BinHandle -> Int16 -> IO () #-}+putULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> a -> IO ()+putULEB128 bh w =+#if defined(DEBUG)+    (if w < 0 then panic "putULEB128: Signed number" else id) $+#endif+    go w+  where+    go :: a -> IO ()+    go w+      | w <= (127 :: a)+      = putByte bh (fromIntegral w :: Word8)+      | otherwise = do+        -- bit 7 (8th bit) indicates more to come.+        let !byte = setBit (fromIntegral w) 7 :: Word8+        putByte bh byte+        go (w `unsafeShiftR` 7)++{-# SPECIALISE getULEB128 :: BinHandle -> IO Word #-}+{-# SPECIALISE getULEB128 :: BinHandle -> IO Word64 #-}+{-# SPECIALISE getULEB128 :: BinHandle -> IO Word32 #-}+{-# SPECIALISE getULEB128 :: BinHandle -> IO Word16 #-}+{-# SPECIALISE getULEB128 :: BinHandle -> IO Int #-}+{-# SPECIALISE getULEB128 :: BinHandle -> IO Int64 #-}+{-# SPECIALISE getULEB128 :: BinHandle -> IO Int32 #-}+{-# SPECIALISE getULEB128 :: BinHandle -> IO Int16 #-}+getULEB128 :: forall a. (Integral a, FiniteBits a) => BinHandle -> IO a+getULEB128 bh =+    go 0 0+  where+    go :: Int -> a -> IO a+    go shift w = do+        b <- getByte bh+        let !hasMore = testBit b 7+        let !val = w .|. ((clearBit (fromIntegral b) 7) `unsafeShiftL` shift) :: a+        if hasMore+            then do+                go (shift+7) val+            else+                return $! val++-- Signed numbers+{-# SPECIALISE putSLEB128 :: BinHandle -> Word -> IO () #-}+{-# SPECIALISE putSLEB128 :: BinHandle -> Word64 -> IO () #-}+{-# SPECIALISE putSLEB128 :: BinHandle -> Word32 -> IO () #-}+{-# SPECIALISE putSLEB128 :: BinHandle -> Word16 -> IO () #-}+{-# SPECIALISE putSLEB128 :: BinHandle -> Int -> IO () #-}+{-# SPECIALISE putSLEB128 :: BinHandle -> Int64 -> IO () #-}+{-# SPECIALISE putSLEB128 :: BinHandle -> Int32 -> IO () #-}+{-# SPECIALISE putSLEB128 :: BinHandle -> Int16 -> IO () #-}+putSLEB128 :: forall a. (Integral a, Bits a) => BinHandle -> a -> IO ()+putSLEB128 bh initial = go initial+  where+    go :: a -> IO ()+    go val = do+        let !byte = fromIntegral (clearBit val 7) :: Word8+        let !val' = val `unsafeShiftR` 7+        let !signBit = testBit byte 6+        let !done =+                -- Unsigned value, val' == 0 and and last value can+                -- be discriminated from a negative number.+                ((val' == 0 && not signBit) ||+                -- Signed value,+                 (val' == -1 && signBit))++        let !byte' = if done then byte else setBit byte 7+        putByte bh byte'++        unless done $ go val'++{-# SPECIALISE getSLEB128 :: BinHandle -> IO Word #-}+{-# SPECIALISE getSLEB128 :: BinHandle -> IO Word64 #-}+{-# SPECIALISE getSLEB128 :: BinHandle -> IO Word32 #-}+{-# SPECIALISE getSLEB128 :: BinHandle -> IO Word16 #-}+{-# SPECIALISE getSLEB128 :: BinHandle -> IO Int #-}+{-# SPECIALISE getSLEB128 :: BinHandle -> IO Int64 #-}+{-# SPECIALISE getSLEB128 :: BinHandle -> IO Int32 #-}+{-# SPECIALISE getSLEB128 :: BinHandle -> IO Int16 #-}+getSLEB128 :: forall a. (Show a, Integral a, FiniteBits a) => BinHandle -> IO a+getSLEB128 bh = do+    (val,shift,signed) <- go 0 0+    if signed && (shift < finiteBitSize val )+        then return $! ((complement 0 `unsafeShiftL` shift) .|. val)+        else return val+    where+        go :: Int -> a -> IO (a,Int,Bool)+        go shift val = do+            byte <- getByte bh+            let !byteVal = fromIntegral (clearBit byte 7) :: a+            let !val' = val .|. (byteVal `unsafeShiftL` shift)+            let !more = testBit byte 7+            let !shift' = shift+7+            if more+                then go (shift') val'+                else do+                    let !signed = testBit byte 6+                    return (val',shift',signed)++-- ----------------------------------------------------------------------------- -- Primitive Word writes  instance Binary Word8 where-  put_ = putWord8+  put_ bh !w = putWord8 bh w   get  = getWord8  instance Binary Word16 where-  put_ h w = putWord16 h w-  get h = getWord16 h+  put_ = putULEB128+  get  = getULEB128  instance Binary Word32 where-  put_ h w = putWord32 h w-  get h = getWord32 h+  put_ = putULEB128+  get  = getULEB128  instance Binary Word64 where-  put_ h w = putWord64 h w-  get h = getWord64 h+  put_ = putULEB128+  get = getULEB128  -- ----------------------------------------------------------------------------- -- Primitive Int writes@@ -361,16 +515,16 @@   get h    = do w <- get h; return $! (fromIntegral (w::Word8))  instance Binary Int16 where-  put_ h w = put_ h (fromIntegral w :: Word16)-  get h    = do w <- get h; return $! (fromIntegral (w::Word16))+  put_ = putSLEB128+  get = getSLEB128  instance Binary Int32 where-  put_ h w = put_ h (fromIntegral w :: Word32)-  get h    = do w <- get h; return $! (fromIntegral (w::Word32))+  put_ = putSLEB128+  get = getSLEB128  instance Binary Int64 where-  put_ h w = put_ h (fromIntegral w :: Word64)-  get h    = do w <- get h; return $! (fromIntegral (w::Word64))+  put_ h w = putSLEB128 h w+  get h    = getSLEB128 h  -- ----------------------------------------------------------------------------- -- Instances for standard types@@ -396,15 +550,11 @@ instance Binary a => Binary [a] where     put_ bh l = do         let len = length l-        if (len < 0xff)-          then putByte bh (fromIntegral len :: Word8)-          else do putByte bh 0xff; put_ bh (fromIntegral len :: Word32)+        put_ bh len         mapM_ (put_ bh) l     get bh = do-        b <- getByte bh-        len <- if b == 0xff-                  then get bh-                  else return (fromIntegral b :: Word32)+        len <- get bh :: IO Int -- Int is variable length encoded so only+                                -- one byte for small lists.         let loop 0 = return []             loop n = do a <- get bh; as <- loop (n-1); return (a:as)         loop len@@ -502,44 +652,92 @@     get bh = do r <- get bh                 return $ fromRational r ---to quote binary-0.3 on this code idea,------ TODO  This instance is not architecture portable.  GMP stores numbers as--- arrays of machine sized words, so the byte format is not portable across--- architectures with different endianness and word size.------ This makes it hard (impossible) to make an equivalent instance--- with code that is compilable with non-GHC.  Do we need any instance--- Binary Integer, and if so, does it have to be blazing fast?  Or can--- we just change this instance to be portable like the rest of the--- instances? (binary package has code to steal for that)------ yes, we need Binary Integer and Binary Rational in basicTypes/Literal.hs+{-+Finally - a reasonable portable Integer instance. +We used to encode values in the Int32 range as such,+falling back to a string of all things. In either case+we stored a tag byte to discriminate between the two cases.++This made some sense as it's highly portable but also not very+efficient.++However GHC stores a surprisingly large number off large Integer+values. In the examples looked at between 25% and 50% of Integers+serialized were outside of the Int32 range.++Consider a valie like `2724268014499746065`, some sort of hash+actually generated by GHC.+In the old scheme this was encoded as a list of 19 chars. This+gave a size of 77 Bytes, one for the length of the list and 76+since we encod chars as Word32 as well.++We can easily do better. The new plan is:++* Start with a tag byte+  * 0 => Int64 (LEB128 encoded)+  * 1 => Negative large interger+  * 2 => Positive large integer+* Followed by the value:+  * Int64 is encoded as usual+  * Large integers are encoded as a list of bytes (Word8).+    We use Data.Bits which defines a bit order independent of the representation.+    Values are stored LSB first.++This means our example value `2724268014499746065` is now only 10 bytes large.+* One byte tag+* One byte for the length of the [Word8] list.+* 8 bytes for the actual date.++The new scheme also does not depend in any way on+architecture specific details.++We still use this scheme even with LEB128 available,+as it has less overhead for truely large numbers. (> maxBound :: Int64)++The instance is used for in Binary Integer and Binary Rational in basicTypes/Literal.hs+-}+ instance Binary Integer where     put_ bh i-      | i >= lo32 && i <= hi32 = do+      | i >= lo64 && i <= hi64 = do           putWord8 bh 0-          put_ bh (fromIntegral i :: Int32)+          put_ bh (fromIntegral i :: Int64)       | otherwise = do-          putWord8 bh 1-          put_ bh (show i)+          if i < 0+            then putWord8 bh 1+            else putWord8 bh 2+          put_ bh (unroll $ abs i)       where-        lo32 = fromIntegral (minBound :: Int32)-        hi32 = fromIntegral (maxBound :: Int32)-+        lo64 = fromIntegral (minBound :: Int64)+        hi64 = fromIntegral (maxBound :: Int64)     get bh = do       int_kind <- getWord8 bh       case int_kind of-        0 -> fromIntegral <$> (get bh :: IO Int32)-        _ -> do str <- get bh-                case reads str of-                  [(i, "")] -> return i-                  _ -> fail ("Binary integer: got " ++ show str)+        0 -> fromIntegral <$!> (get bh :: IO Int64)+        -- Large integer+        1 -> negate <$!> getInt+        2 -> getInt+        _ -> panic "Binary Integer - Invalid byte"+        where+          getInt :: IO Integer+          getInt = roll <$!> (get bh :: IO [Word8]) +unroll :: Integer -> [Word8]+unroll = unfoldr step+  where+    step 0 = Nothing+    step i = Just (fromIntegral i, i `shiftR` 8)++roll :: [Word8] -> Integer+roll   = foldl' unstep 0 . reverse+  where+    unstep a b = a `shiftL` 8 .|. fromIntegral b++     {-     -- This code is currently commented out.-    -- See https://ghc.haskell.org/trac/ghc/ticket/3379#comment:10 for+    -- See https://gitlab.haskell.org/ghc/ghc/issues/3379#note_104346 for     -- discussion.      put_ bh (S# i#) = do putByte bh 0; put_ bh (I# i#)@@ -608,9 +806,11 @@     put_ bh (a :% b) = do put_ bh a; put_ bh b     get bh = do a <- get bh; b <- get bh; return (a :% b) +-- Instance uses fixed-width encoding to allow inserting+-- Bin placeholders in the stream. instance Binary (Bin a) where-  put_ bh (BinPtr i) = put_ bh (fromIntegral i :: Int32)-  get bh = do i <- get bh; return (BinPtr (fromIntegral (i :: Int32)))+  put_ bh (BinPtr i) = putWord32 bh (fromIntegral i :: Word32)+  get bh = do i <- getWord32 bh; return (BinPtr (fromIntegral (i :: Word32)))  -- ----------------------------------------------------------------------------- -- Instances for Data.Typeable stuff@@ -652,6 +852,10 @@     put_ bh Int16Rep        = putByte bh 14     put_ bh Word16Rep       = putByte bh 15 #endif+#if __GLASGOW_HASKELL__ >= 809+    put_ bh Int32Rep        = putByte bh 16+    put_ bh Word32Rep       = putByte bh 17+#endif      get bh = do         tag <- getByte bh@@ -674,6 +878,10 @@           14 -> pure Int16Rep           15 -> pure Word16Rep #endif+#if __GLASGOW_HASKELL__ >= 809+          16 -> pure Int32Rep+          17 -> pure Word32Rep+#endif           _  -> fail "Binary.putRuntimeRep: invalid tag"  instance Binary KindRep where@@ -724,7 +932,6 @@     put_ bh (3 :: Word8)     putTypeRep bh arg     putTypeRep bh res-putTypeRep _ _ = fail "Binary.putTypeRep: Impossible"  getSomeTypeRep :: BinHandle -> IO SomeTypeRep getSomeTypeRep bh = do@@ -916,7 +1123,7 @@ ---------------------------------------------------------  putFS :: BinHandle -> FastString -> IO ()-putFS bh fs = putBS bh $ fastStringToByteString fs+putFS bh fs = putBS bh $ bytesFS fs  getFS :: BinHandle -> IO FastString getFS bh = do
utils/BufWrite.hs view
@@ -77,7 +77,7 @@                 loop cs (i+1)  bPutFS :: BufHandle -> FastString -> IO ()-bPutFS b fs = bPutBS b $ fastStringToByteString fs+bPutFS b fs = bPutBS b $ bytesFS fs  bPutFZS :: BufHandle -> FastZString -> IO () bPutFZS b fs = bPutBS b $ fastZStringToByteString fs
+ utils/Dominators.hs view
@@ -0,0 +1,597 @@+{-# LANGUAGE RankNTypes, BangPatterns, FlexibleContexts, Strict #-}
+
+{- |
+  Module      :  Dominators
+  Copyright   :  (c) Matt Morrow 2009
+  License     :  BSD3
+  Maintainer  :  <morrow@moonpatio.com>
+  Stability   :  experimental
+  Portability :  portable
+
+  Taken from the dom-lt package.
+
+  The Lengauer-Tarjan graph dominators algorithm.
+
+    \[1\] Lengauer, Tarjan,
+      /A Fast Algorithm for Finding Dominators in a Flowgraph/, 1979.
+
+    \[2\] Muchnick,
+      /Advanced Compiler Design and Implementation/, 1997.
+
+    \[3\] Brisk, Sarrafzadeh,
+      /Interference Graphs for Procedures in Static Single/
+      /Information Form are Interval Graphs/, 2007.
+
+  Originally taken from the dom-lt package.
+-}
+
+module Dominators (
+   Node,Path,Edge
+  ,Graph,Rooted
+  ,idom,ipdom
+  ,domTree,pdomTree
+  ,dom,pdom
+  ,pddfs,rpddfs
+  ,fromAdj,fromEdges
+  ,toAdj,toEdges
+  ,asTree,asGraph
+  ,parents,ancestors
+) where
+
+import GhcPrelude
+
+import Data.Bifunctor
+import Data.Tuple (swap)
+
+import Data.Tree
+import Data.IntMap(IntMap)
+import Data.IntSet(IntSet)
+import qualified Data.IntMap.Strict as IM
+import qualified Data.IntSet as IS
+
+import Control.Monad
+import Control.Monad.ST.Strict
+
+import Data.Array.ST
+import Data.Array.Base hiding ((!))
+  -- (unsafeNewArray_
+  -- ,unsafeWrite,unsafeRead
+  -- ,readArray,writeArray)
+
+import Util (debugIsOn)
+
+-----------------------------------------------------------------------------
+
+type Node       = Int
+type Path       = [Node]
+type Edge       = (Node,Node)
+type Graph      = IntMap IntSet
+type Rooted     = (Node, Graph)
+
+-----------------------------------------------------------------------------
+
+-- | /Dominators/.
+-- Complexity as for @idom@
+dom :: Rooted -> [(Node, Path)]
+dom = ancestors . domTree
+
+-- | /Post-dominators/.
+-- Complexity as for @idom@.
+pdom :: Rooted -> [(Node, Path)]
+pdom = ancestors . pdomTree
+
+-- | /Dominator tree/.
+-- Complexity as for @idom@.
+domTree :: Rooted -> Tree Node
+domTree a@(r,_) =
+  let is = filter ((/=r).fst) (idom a)
+      tg = fromEdges (fmap swap is)
+  in asTree (r,tg)
+
+-- | /Post-dominator tree/.
+-- Complexity as for @idom@.
+pdomTree :: Rooted -> Tree Node
+pdomTree a@(r,_) =
+  let is = filter ((/=r).fst) (ipdom a)
+      tg = fromEdges (fmap swap is)
+  in asTree (r,tg)
+
+-- | /Immediate dominators/.
+-- /O(|E|*alpha(|E|,|V|))/, where /alpha(m,n)/ is
+-- \"a functional inverse of Ackermann's function\".
+--
+-- This Complexity bound assumes /O(1)/ indexing. Since we're
+-- using @IntMap@, it has an additional /lg |V|/ factor
+-- somewhere in there. I'm not sure where.
+idom :: Rooted -> [(Node,Node)]
+idom rg = runST (evalS idomM =<< initEnv (pruneReach rg))
+
+-- | /Immediate post-dominators/.
+-- Complexity as for @idom@.
+ipdom :: Rooted -> [(Node,Node)]
+ipdom rg = runST (evalS idomM =<< initEnv (pruneReach (second predG rg)))
+
+-----------------------------------------------------------------------------
+
+-- | /Post-dominated depth-first search/.
+pddfs :: Rooted -> [Node]
+pddfs = reverse . rpddfs
+
+-- | /Reverse post-dominated depth-first search/.
+rpddfs :: Rooted -> [Node]
+rpddfs = concat . levels . pdomTree
+
+-----------------------------------------------------------------------------
+
+type Dom s a = S s (Env s) a
+type NodeSet    = IntSet
+type NodeMap a  = IntMap a
+data Env s = Env
+  {succE      :: !Graph
+  ,predE      :: !Graph
+  ,bucketE    :: !Graph
+  ,dfsE       :: {-# UNPACK #-}!Int
+  ,zeroE      :: {-# UNPACK #-}!Node
+  ,rootE      :: {-# UNPACK #-}!Node
+  ,labelE     :: {-# UNPACK #-}!(Arr s Node)
+  ,parentE    :: {-# UNPACK #-}!(Arr s Node)
+  ,ancestorE  :: {-# UNPACK #-}!(Arr s Node)
+  ,childE     :: {-# UNPACK #-}!(Arr s Node)
+  ,ndfsE      :: {-# UNPACK #-}!(Arr s Node)
+  ,dfnE       :: {-# UNPACK #-}!(Arr s Int)
+  ,sdnoE      :: {-# UNPACK #-}!(Arr s Int)
+  ,sizeE      :: {-# UNPACK #-}!(Arr s Int)
+  ,domE       :: {-# UNPACK #-}!(Arr s Node)
+  ,rnE        :: {-# UNPACK #-}!(Arr s Node)}
+
+-----------------------------------------------------------------------------
+
+idomM :: Dom s [(Node,Node)]
+idomM = do
+  dfsDom =<< rootM
+  n <- gets dfsE
+  forM_ [n,n-1..1] (\i-> do
+    w <- ndfsM i
+    sw <- sdnoM w
+    ps <- predsM w
+    forM_ ps (\v-> do
+      u <- eval v
+      su <- sdnoM u
+      when (su < sw)
+        (store sdnoE w su))
+    z <- ndfsM =<< sdnoM w
+    modify(\e->e{bucketE=IM.adjust
+                      (w`IS.insert`)
+                      z (bucketE e)})
+    pw <- parentM w
+    link pw w
+    bps <- bucketM pw
+    forM_ bps (\v-> do
+      u <- eval v
+      su <- sdnoM u
+      sv <- sdnoM v
+      let dv = case su < sv of
+                True-> u
+                False-> pw
+      store domE v dv))
+  forM_ [1..n] (\i-> do
+    w <- ndfsM i
+    j <- sdnoM w
+    z <- ndfsM j
+    dw <- domM w
+    when (dw /= z)
+      (do ddw <- domM dw
+          store domE w ddw))
+  fromEnv
+
+-----------------------------------------------------------------------------
+
+eval :: Node -> Dom s Node
+eval v = do
+  n0 <- zeroM
+  a  <- ancestorM v
+  case a==n0 of
+    True-> labelM v
+    False-> do
+      compress v
+      a   <- ancestorM v
+      l   <- labelM v
+      la  <- labelM a
+      sl  <- sdnoM l
+      sla <- sdnoM la
+      case sl <= sla of
+        True-> return l
+        False-> return la
+
+compress :: Node -> Dom s ()
+compress v = do
+  n0  <- zeroM
+  a   <- ancestorM v
+  aa  <- ancestorM a
+  when (aa /= n0) (do
+    compress a
+    a   <- ancestorM v
+    aa  <- ancestorM a
+    l   <- labelM v
+    la  <- labelM a
+    sl  <- sdnoM l
+    sla <- sdnoM la
+    when (sla < sl)
+      (store labelE v la)
+    store ancestorE v aa)
+
+-----------------------------------------------------------------------------
+
+link :: Node -> Node -> Dom s ()
+link v w = do
+  n0  <- zeroM
+  lw  <- labelM w
+  slw <- sdnoM lw
+  let balance s = do
+        c   <- childM s
+        lc  <- labelM c
+        slc <- sdnoM lc
+        case slw < slc of
+          False-> return s
+          True-> do
+            zs  <- sizeM s
+            zc  <- sizeM c
+            cc  <- childM c
+            zcc <- sizeM cc
+            case 2*zc <= zs+zcc of
+              True-> do
+                store ancestorE c s
+                store childE s cc
+                balance s
+              False-> do
+                store sizeE c zs
+                store ancestorE s c
+                balance c
+  s   <- balance w
+  lw  <- labelM w
+  zw  <- sizeM w
+  store labelE s lw
+  store sizeE v . (+zw) =<< sizeM v
+  let follow s = do
+        when (s /= n0) (do
+          store ancestorE s v
+          follow =<< childM s)
+  zv  <- sizeM v
+  follow =<< case zv < 2*zw of
+              False-> return s
+              True-> do
+                cv <- childM v
+                store childE v s
+                return cv
+
+-----------------------------------------------------------------------------
+
+dfsDom :: Node -> Dom s ()
+dfsDom i = do
+  _   <- go i
+  n0  <- zeroM
+  r   <- rootM
+  store parentE r n0
+  where go i = do
+          n <- nextM
+          store dfnE   i n
+          store sdnoE  i n
+          store ndfsE  n i
+          store labelE i i
+          ss <- succsM i
+          forM_ ss (\j-> do
+            s <- sdnoM j
+            case s==0 of
+              False-> return()
+              True-> do
+                store parentE j i
+                go j)
+
+-----------------------------------------------------------------------------
+
+initEnv :: Rooted -> ST s (Env s)
+initEnv (r0,g0) = do
+  let (g,rnmap) = renum 1 g0
+      pred      = predG g
+      r         = rnmap IM.! r0
+      n         = IM.size g
+      ns        = [0..n]
+      m         = n+1
+
+  let bucket = IM.fromList
+        (zip ns (repeat mempty))
+
+  rna <- newI m
+  writes rna (fmap swap
+        (IM.toList rnmap))
+
+  doms      <- newI m
+  sdno      <- newI m
+  size      <- newI m
+  parent    <- newI m
+  ancestor  <- newI m
+  child     <- newI m
+  label     <- newI m
+  ndfs      <- newI m
+  dfn       <- newI m
+
+  forM_ [0..n] (doms.=0)
+  forM_ [0..n] (sdno.=0)
+  forM_ [1..n] (size.=1)
+  forM_ [0..n] (ancestor.=0)
+  forM_ [0..n] (child.=0)
+
+  (doms.=r) r
+  (size.=0) 0
+  (label.=0) 0
+
+  return (Env
+    {rnE        = rna
+    ,dfsE       = 0
+    ,zeroE      = 0
+    ,rootE      = r
+    ,labelE     = label
+    ,parentE    = parent
+    ,ancestorE  = ancestor
+    ,childE     = child
+    ,ndfsE      = ndfs
+    ,dfnE       = dfn
+    ,sdnoE      = sdno
+    ,sizeE      = size
+    ,succE      = g
+    ,predE      = pred
+    ,bucketE    = bucket
+    ,domE       = doms})
+
+fromEnv :: Dom s [(Node,Node)]
+fromEnv = do
+  dom   <- gets domE
+  rn    <- gets rnE
+  -- r     <- gets rootE
+  (_,n) <- st (getBounds dom)
+  forM [1..n] (\i-> do
+    j <- st(rn!:i)
+    d <- st(dom!:i)
+    k <- st(rn!:d)
+    return (j,k))
+
+-----------------------------------------------------------------------------
+
+zeroM :: Dom s Node
+zeroM = gets zeroE
+domM :: Node -> Dom s Node
+domM = fetch domE
+rootM :: Dom s Node
+rootM = gets rootE
+succsM :: Node -> Dom s [Node]
+succsM i = gets (IS.toList . (! i) . succE)
+predsM :: Node -> Dom s [Node]
+predsM i = gets (IS.toList . (! i) . predE)
+bucketM :: Node -> Dom s [Node]
+bucketM i = gets (IS.toList . (! i) . bucketE)
+sizeM :: Node -> Dom s Int
+sizeM = fetch sizeE
+sdnoM :: Node -> Dom s Int
+sdnoM = fetch sdnoE
+-- dfnM :: Node -> Dom s Int
+-- dfnM = fetch dfnE
+ndfsM :: Int -> Dom s Node
+ndfsM = fetch ndfsE
+childM :: Node -> Dom s Node
+childM = fetch childE
+ancestorM :: Node -> Dom s Node
+ancestorM = fetch ancestorE
+parentM :: Node -> Dom s Node
+parentM = fetch parentE
+labelM :: Node -> Dom s Node
+labelM = fetch labelE
+nextM :: Dom s Int
+nextM = do
+  n <- gets dfsE
+  let n' = n+1
+  modify(\e->e{dfsE=n'})
+  return n'
+
+-----------------------------------------------------------------------------
+
+type A = STUArray
+type Arr s a = A s Int a
+
+infixl 9 !:
+infixr 2 .=
+
+(.=) :: (MArray (A s) a (ST s))
+     => Arr s a -> a -> Int -> ST s ()
+(v .= x) i
+  | debugIsOn = writeArray v i x
+  | otherwise = unsafeWrite v i x
+
+(!:) :: (MArray (A s) a (ST s))
+     => A s Int a -> Int -> ST s a
+a !: i
+  | debugIsOn = do
+      o <- readArray a i
+      return $! o
+  | otherwise = do
+      o <- unsafeRead a i
+      return $! o
+
+new :: (MArray (A s) a (ST s))
+    => Int -> ST s (Arr s a)
+new n = unsafeNewArray_ (0,n-1)
+
+newI :: Int -> ST s (Arr s Int)
+newI = new
+
+-- newD :: Int -> ST s (Arr s Double)
+-- newD = new
+
+-- dump :: (MArray (A s) a (ST s)) => Arr s a -> ST s [a]
+-- dump a = do
+--   (m,n) <- getBounds a
+--   forM [m..n] (\i -> a!:i)
+
+writes :: (MArray (A s) a (ST s))
+     => Arr s a -> [(Int,a)] -> ST s ()
+writes a xs = forM_ xs (\(i,x) -> (a.=x) i)
+
+-- arr :: (MArray (A s) a (ST s)) => [a] -> ST s (Arr s a)
+-- arr xs = do
+--   let n = length xs
+--   a <- new n
+--   go a n 0 xs
+--   return a
+--   where go _ _ _    [] = return ()
+--         go a n i (x:xs)
+--           | i <= n = (a.=x) i >> go a n (i+1) xs
+--           | otherwise = return ()
+
+-----------------------------------------------------------------------------
+
+(!) :: Monoid a => IntMap a -> Int -> a
+(!) g n = maybe mempty id (IM.lookup n g)
+
+fromAdj :: [(Node, [Node])] -> Graph
+fromAdj = IM.fromList . fmap (second IS.fromList)
+
+fromEdges :: [Edge] -> Graph
+fromEdges = collectI IS.union fst (IS.singleton . snd)
+
+toAdj :: Graph -> [(Node, [Node])]
+toAdj = fmap (second IS.toList) . IM.toList
+
+toEdges :: Graph -> [Edge]
+toEdges = concatMap (uncurry (fmap . (,))) . toAdj
+
+predG :: Graph -> Graph
+predG g = IM.unionWith IS.union (go g) g0
+  where g0 = fmap (const mempty) g
+        f :: IntMap IntSet -> Int -> IntSet -> IntMap IntSet
+        f m i a = foldl' (\m p -> IM.insertWith mappend p
+                                      (IS.singleton i) m)
+                        m
+                       (IS.toList a)
+        go :: IntMap IntSet -> IntMap IntSet
+        go = flip IM.foldlWithKey' mempty f
+
+pruneReach :: Rooted -> Rooted
+pruneReach (r,g) = (r,g2)
+  where is = reachable
+              (maybe mempty id
+                . flip IM.lookup g) $ r
+        g2 = IM.fromList
+            . fmap (second (IS.filter (`IS.member`is)))
+            . filter ((`IS.member`is) . fst)
+            . IM.toList $ g
+
+tip :: Tree a -> (a, [Tree a])
+tip (Node a ts) = (a, ts)
+
+parents :: Tree a -> [(a, a)]
+parents (Node i xs) = p i xs
+        ++ concatMap parents xs
+  where p i = fmap (flip (,) i . rootLabel)
+
+ancestors :: Tree a -> [(a, [a])]
+ancestors = go []
+  where go acc (Node i xs)
+          = let acc' = i:acc
+            in p acc' xs ++ concatMap (go acc') xs
+        p is = fmap (flip (,) is . rootLabel)
+
+asGraph :: Tree Node -> Rooted
+asGraph t@(Node a _) = let g = go t in (a, fromAdj g)
+  where go (Node a ts) = let as = (fst . unzip . fmap tip) ts
+                          in (a, as) : concatMap go ts
+
+asTree :: Rooted -> Tree Node
+asTree (r,g) = let go a = Node a (fmap go ((IS.toList . f) a))
+                   f = (g !)
+            in go r
+
+reachable :: (Node -> NodeSet) -> (Node -> NodeSet)
+reachable f a = go (IS.singleton a) a
+  where go seen a = let s = f a
+                        as = IS.toList (s `IS.difference` seen)
+                    in foldl' go (s `IS.union` seen) as
+
+collectI :: (c -> c -> c)
+        -> (a -> Int) -> (a -> c) -> [a] -> IntMap c
+collectI (<>) f g
+  = foldl' (\m a -> IM.insertWith (<>)
+                                  (f a)
+                                  (g a) m) mempty
+
+-- collect :: (Ord b) => (c -> c -> c)
+--         -> (a -> b) -> (a -> c) -> [a] -> Map b c
+-- collect (<>) f g
+--   = foldl' (\m a -> SM.insertWith (<>)
+--                                   (f a)
+--                                   (g a) m) mempty
+
+-- (renamed, old -> new)
+renum :: Int -> Graph -> (Graph, NodeMap Node)
+renum from = (\(_,m,g)->(g,m))
+  . IM.foldlWithKey'
+      f (from,mempty,mempty)
+  where
+    f :: (Int, NodeMap Node, IntMap IntSet) -> Node -> IntSet
+      -> (Int, NodeMap Node, IntMap IntSet)
+    f (!n,!env,!new) i ss =
+            let (j,n2,env2) = go n env i
+                (n3,env3,ss2) = IS.fold
+                  (\k (!n,!env,!new)->
+                      case go n env k of
+                        (l,n2,env2)-> (n2,env2,l `IS.insert` new))
+                  (n2,env2,mempty) ss
+                new2 = IM.insertWith IS.union j ss2 new
+            in (n3,env3,new2)
+    go :: Int
+        -> NodeMap Node
+        -> Node
+        -> (Node,Int,NodeMap Node)
+    go !n !env i =
+        case IM.lookup i env of
+        Just j -> (j,n,env)
+        Nothing -> (n,n+1,IM.insert i n env)
+
+-----------------------------------------------------------------------------
+
+newtype S z s a = S {unS :: forall o. (a -> s -> ST z o) -> s -> ST z o}
+instance Functor (S z s) where
+  fmap f (S g) = S (\k -> g (k . f))
+instance Monad (S z s) where
+  return = pure
+  S g >>= f = S (\k -> g (\a -> unS (f a) k))
+instance Applicative (S z s) where
+  pure a = S (\k -> k a)
+  (<*>) = ap
+-- get :: S z s s
+-- get = S (\k s -> k s s)
+gets :: (s -> a) -> S z s a
+gets f = S (\k s -> k (f s) s)
+-- set :: s -> S z s ()
+-- set s = S (\k _ -> k () s)
+modify :: (s -> s) -> S z s ()
+modify f = S (\k -> k () . f)
+-- runS :: S z s a -> s -> ST z (a, s)
+-- runS (S g) = g (\a s -> return (a,s))
+evalS :: S z s a -> s -> ST z a
+evalS (S g) = g ((return .) . const)
+-- execS :: S z s a -> s -> ST z s
+-- execS (S g) = g ((return .) . flip const)
+st :: ST z a -> S z s a
+st m = S (\k s-> do
+  a <- m
+  k a s)
+store :: (MArray (A z) a (ST z))
+      => (s -> Arr z a) -> Int -> a -> S z s ()
+store f i x = do
+  a <- gets f
+  st ((a.=x) i)
+fetch :: (MArray (A z) a (ST z))
+      => (s -> Arr z a) -> Int -> S z s a
+fetch f i = do
+  a <- gets f
+  st (a!:i)
+
utils/FastString.hs view
@@ -32,7 +32,8 @@ module FastString        (         -- * ByteString-        fastStringToByteString,+        bytesFS,            -- :: FastString -> ByteString+        fastStringToByteString, -- = bytesFS (kept for haddock)         mkFastStringByteString,         fastZStringToByteString,         unsafeMkByteString,@@ -56,7 +57,6 @@          -- ** Deconstruction         unpackFS,           -- :: FastString -> String-        bytesFS,            -- :: FastString -> [Word8]          -- ** Encoding         zEncodeFS,@@ -78,7 +78,7 @@          -- ** Internal         getFastStringTable,-        hasZEncoding,+        getFastStringZEncCounter,          -- * PtrStrings         PtrString (..),@@ -117,7 +117,6 @@ import System.IO import Data.Data import Data.IORef-import Data.Maybe       ( isJust ) import Data.Char import Data.Semigroup as Semi @@ -125,15 +124,20 @@  import Foreign -#if STAGE >= 2+#if GHC_STAGE >= 2 import GHC.Conc.Sync    (sharedCAF) #endif  import GHC.Base         ( unpackCString#, unpackNBytes# )  +-- | Gives the UTF-8 encoded bytes corresponding to a 'FastString'+bytesFS :: FastString -> ByteString+bytesFS f = fs_bs f++{-# DEPRECATED fastStringToByteString "Use `bytesFS` instead" #-} fastStringToByteString :: FastString -> ByteString-fastStringToByteString f = fs_bs f+fastStringToByteString = bytesFS  fastZStringToByteString :: FastZString -> ByteString fastZStringToByteString (FastZString bs) = bs@@ -167,20 +171,22 @@  -- ----------------------------------------------------------------------------- -{-|-A 'FastString' is an array of bytes, hashed to support fast O(1)-comparison.  It is also associated with a character encoding, so that-we know how to convert a 'FastString' to the local encoding, or to the-Z-encoding used by the compiler internally.+{-| A 'FastString' is a UTF-8 encoded string together with a unique ID. All+'FastString's are stored in a global hashtable to support fast O(1)+comparison. -'FastString's support a memoized conversion to the Z-encoding via zEncodeFS.+It is also associated with a lazy reference to the Z-encoding+of this string which is used by the compiler internally. -}- data FastString = FastString {       uniq    :: {-# UNPACK #-} !Int, -- unique id       n_chars :: {-# UNPACK #-} !Int, -- number of chars       fs_bs   :: {-# UNPACK #-} !ByteString,-      fs_ref  :: {-# UNPACK #-} !(IORef (Maybe FastZString))+      fs_zenc :: FastZString+      -- ^ Lazily computed z-encoding of this string.+      --+      -- Since 'FastString's are globally memoized this is computed at most+      -- once for any given string.   }  instance Eq FastString where@@ -218,10 +224,13 @@   gunfold _ _  = error "gunfold"   dataTypeOf _ = mkNoRepType "FastString" +instance NFData FastString where+  rnf fs = seq fs ()+ cmpFS :: FastString -> FastString -> Ordering cmpFS f1@(FastString u1 _ _ _) f2@(FastString u2 _ _ _) =   if u1 == u2 then EQ else-  compare (fastStringToByteString f1) (fastStringToByteString f2)+  compare (bytesFS f1) (bytesFS f2)  foreign import ccall unsafe "memcmp"   memcmp :: Ptr a -> Ptr b -> Int -> IO Int@@ -241,6 +250,7 @@ -} data FastStringTable = FastStringTable   {-# UNPACK #-} !(IORef Int) -- the unique ID counter shared with all buckets+  {-# UNPACK #-} !(IORef Int) -- number of computed z-encodings for all buckets   (Array# (IORef FastStringTableSegment)) -- concurrent segments  data FastStringTableSegment = FastStringTableSegment@@ -313,20 +323,22 @@                   (# s5#, segment #) -> case writeArray# a# i# segment s5# of                     s6# -> loop a# (i# +# 1#) s6#   uid <- newIORef 603979776 -- ord '$' * 0x01000000+  n_zencs <- newIORef 0   tab <- IO $ \s1# ->     case newArray# numSegments# (panic "string_table") s1# of       (# s2#, arr# #) -> case loop arr# 0# s2# of         s3# -> case unsafeFreezeArray# arr# s3# of-          (# s4#, segments# #) -> (# s4#, FastStringTable uid segments# #)+          (# s4#, segments# #) ->+            (# s4#, FastStringTable uid n_zencs segments# #)    -- use the support wired into the RTS to share this CAF among all images of   -- libHSghc-#if STAGE < 2+#if GHC_STAGE < 2   return tab #else   sharedCAF tab getOrSetLibHSghcFastStringTable --- from the RTS; thus we cannot use this mechanism when STAGE<2; the previous+-- from the RTS; thus we cannot use this mechanism when GHC_STAGE<2; the previous -- RTS might not have this symbol foreign import ccall unsafe "getOrSetLibHSghcFastStringTable"   getOrSetLibHSghcFastStringTable :: Ptr a -> IO (Ptr a)@@ -391,7 +403,8 @@    * Otherwise, insert and return the string we created. -} -mkFastStringWith :: (Int -> IO FastString) -> Ptr Word8 -> Int -> IO FastString+mkFastStringWith+    :: (Int -> IORef Int-> IO FastString) -> Ptr Word8 -> Int -> IO FastString mkFastStringWith mk_fs !ptr !len = do   FastStringTableSegment lock _ buckets# <- readIORef segmentRef   let idx# = hashToIndex# buckets# hash#@@ -404,10 +417,10 @@       -- only run partially and putMVar is not called after takeMVar.       noDuplicate       n <- get_uid-      new_fs <- mk_fs n+      new_fs <- mk_fs n n_zencs       withMVar lock $ \_ -> insert new_fs   where-    !(FastStringTable uid segments#) = stringTable+    !(FastStringTable uid n_zencs segments#) = stringTable     get_uid = atomicModifyIORef' uid $ \n -> (n+1,n)      !(I# hash#) = hashStr ptr len@@ -475,38 +488,37 @@  -- | Creates a 'FastString' from a UTF-8 encoded @[Word8]@ mkFastStringByteList :: [Word8] -> FastString-mkFastStringByteList str =-  inlinePerformIO $ do-    let l = Prelude.length str-    buf <- mallocForeignPtrBytes l-    withForeignPtr buf $ \ptr -> do-      pokeArray (castPtr ptr) str-      mkFastStringForeignPtr ptr buf l+mkFastStringByteList str = mkFastStringByteString (BS.pack str) --- | Creates a Z-encoded 'FastString' from a 'String'-mkZFastString :: String -> FastZString-mkZFastString = mkFastZStringString+-- | Creates a (lazy) Z-encoded 'FastString' from a 'String' and account+-- the number of forced z-strings into the passed 'IORef'.+mkZFastString :: IORef Int -> ByteString -> FastZString+mkZFastString n_zencs bs = unsafePerformIO $ do+  atomicModifyIORef' n_zencs $ \n -> (n+1, ())+  return $ mkFastZStringString (zEncodeString (utf8DecodeByteString bs))  mkNewFastString :: ForeignPtr Word8 -> Ptr Word8 -> Int -> Int-                -> IO FastString-mkNewFastString fp ptr len uid = do-  ref <- newIORef Nothing+                -> IORef Int -> IO FastString+mkNewFastString fp ptr len uid n_zencs = do+  let bs = BS.fromForeignPtr fp 0 len+      zstr = mkZFastString n_zencs bs   n_chars <- countUTF8Chars ptr len-  return (FastString uid n_chars (BS.fromForeignPtr fp 0 len) ref)+  return (FastString uid n_chars bs zstr)  mkNewFastStringByteString :: ByteString -> Ptr Word8 -> Int -> Int-                          -> IO FastString-mkNewFastStringByteString bs ptr len uid = do-  ref <- newIORef Nothing+                          -> IORef Int -> IO FastString+mkNewFastStringByteString bs ptr len uid n_zencs = do+  let zstr = mkZFastString n_zencs bs   n_chars <- countUTF8Chars ptr len-  return (FastString uid n_chars bs ref)+  return (FastString uid n_chars bs zstr) -copyNewFastString :: Ptr Word8 -> Int -> Int -> IO FastString-copyNewFastString ptr len uid = do+copyNewFastString :: Ptr Word8 -> Int -> Int -> IORef Int -> IO FastString+copyNewFastString ptr len uid n_zencs = do   fp <- copyBytesToForeignPtr ptr len-  ref <- newIORef Nothing+  let bs = BS.fromForeignPtr fp 0 len+      zstr = mkZFastString n_zencs bs   n_chars <- countUTF8Chars ptr len-  return (FastString uid n_chars (BS.fromForeignPtr fp 0 len) ref)+  return (FastString uid n_chars bs zstr)  copyBytesToForeignPtr :: Ptr Word8 -> Int -> IO (ForeignPtr Word8) copyBytesToForeignPtr ptr len = do@@ -537,14 +549,6 @@ lengthFS :: FastString -> Int lengthFS f = n_chars f --- | Returns @True@ if this 'FastString' is not Z-encoded but already has--- a Z-encoding cached (used in producing stats).-hasZEncoding :: FastString -> Bool-hasZEncoding (FastString _ _ _ ref) =-      inlinePerformIO $ do-        m <- readIORef ref-        return (isJust m)- -- | Returns @True@ if the 'FastString' is empty nullFS :: FastString -> Bool nullFS f = BS.null (fs_bs f)@@ -553,31 +557,17 @@ unpackFS :: FastString -> String unpackFS (FastString _ _ bs _) = utf8DecodeByteString bs --- | Gives the UTF-8 encoded bytes corresponding to a 'FastString'-bytesFS :: FastString -> [Word8]-bytesFS fs = BS.unpack $ fastStringToByteString fs- -- | Returns a Z-encoded version of a 'FastString'.  This might be the -- original, if it was already Z-encoded.  The first time this -- function is applied to a particular 'FastString', the results are -- memoized. -- zEncodeFS :: FastString -> FastZString-zEncodeFS fs@(FastString _ _ _ ref) =-      inlinePerformIO $ do-        m <- readIORef ref-        case m of-          Just zfs -> return zfs-          Nothing -> do-            atomicModifyIORef' ref $ \m' -> case m' of-              Nothing  -> let zfs = mkZFastString (zEncodeString (unpackFS fs))-                          in (Just zfs, zfs)-              Just zfs -> (m', zfs)+zEncodeFS (FastString _ _ _ ref) = ref  appendFS :: FastString -> FastString -> FastString appendFS fs1 fs2 = mkFastStringByteString-                 $ BS.append (fastStringToByteString fs1)-                             (fastStringToByteString fs2)+                 $ BS.append (bytesFS fs1) (bytesFS fs2)  concatFS :: [FastString] -> FastString concatFS = mkFastStringByteString . BS.concat . map fs_bs@@ -619,15 +609,20 @@     forM [0 .. bucketSize - 1] $ \(I# j#) ->       IO $ readArray# buckets# j#   where-    !(FastStringTable _ segments#) = stringTable+    !(FastStringTable _ _ segments#) = stringTable +getFastStringZEncCounter :: IO Int+getFastStringZEncCounter = readIORef n_zencs+  where+    !(FastStringTable _ n_zencs _) = stringTable+ -- ----------------------------------------------------------------------------- -- Outputting 'FastString's  -- |Outputs a 'FastString' with /no decoding at all/, that is, you -- get the actual bytes in the 'FastString' written to the 'Handle'. hPutFS :: Handle -> FastString -> IO ()-hPutFS handle fs = BS.hPut handle $ fastStringToByteString fs+hPutFS handle fs = BS.hPut handle $ bytesFS fs  -- ToDo: we'll probably want an hPutFSLocal, or something, to output -- in the current locale's encoding (for error messages and suchlike).
+ utils/Fingerprint.hs view
@@ -0,0 +1,46 @@+{-# LANGUAGE CPP #-}++-- ----------------------------------------------------------------------------+--+--  (c) The University of Glasgow 2006+--+-- Fingerprints for recompilation checking and ABI versioning.+--+-- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance+--+-- ----------------------------------------------------------------------------++module Fingerprint (+        readHexFingerprint,+        fingerprintByteString,+        -- * Re-exported from GHC.Fingerprint+        Fingerprint(..), fingerprint0,+        fingerprintFingerprints,+        fingerprintData,+        fingerprintString,+        getFileHash+   ) where++#include "HsVersions.h"++import GhcPrelude++import Foreign+import GHC.IO+import Numeric          ( readHex )++import qualified Data.ByteString as BS+import qualified Data.ByteString.Unsafe as BS++import GHC.Fingerprint++-- useful for parsing the output of 'md5sum', should we want to do that.+readHexFingerprint :: String -> Fingerprint+readHexFingerprint s = Fingerprint w1 w2+ where (s1,s2) = splitAt 16 s+       [(w1,"")] = readHex s1+       [(w2,"")] = readHex (take 16 s2)++fingerprintByteString :: BS.ByteString -> Fingerprint+fingerprintByteString bs = unsafeDupablePerformIO $+  BS.unsafeUseAsCStringLen bs $ \(ptr, len) -> fingerprintData (castPtr ptr) len
− utils/Fingerprint.hsc
@@ -1,47 +0,0 @@-{-# LANGUAGE CPP #-}---- ----------------------------------------------------------------------------------  (c) The University of Glasgow 2006------ Fingerprints for recompilation checking and ABI versioning.------ http://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance------ ------------------------------------------------------------------------------module Fingerprint (-        readHexFingerprint,-        fingerprintByteString,-        -- * Re-exported from GHC.Fingerprint-        Fingerprint(..), fingerprint0,-        fingerprintFingerprints,-        fingerprintData,-        fingerprintString,-        getFileHash-   ) where--#include "md5.h"-##include "HsVersions.h"--import GhcPrelude--import Foreign-import GHC.IO-import Numeric          ( readHex )--import qualified Data.ByteString as BS-import qualified Data.ByteString.Unsafe as BS--import GHC.Fingerprint---- useful for parsing the output of 'md5sum', should we want to do that.-readHexFingerprint :: String -> Fingerprint-readHexFingerprint s = Fingerprint w1 w2- where (s1,s2) = splitAt 16 s-       [(w1,"")] = readHex s1-       [(w2,"")] = readHex (take 16 s2)--fingerprintByteString :: BS.ByteString -> Fingerprint-fingerprintByteString bs = unsafeDupablePerformIO $-  BS.unsafeUseAsCStringLen bs $ \(ptr, len) -> fingerprintData (castPtr ptr) len
utils/GhcPrelude.hs view
@@ -5,7 +5,11 @@ -- This module serves as a replacement for the "Prelude" module -- and abstracts over differences between the bootstrapping -- GHC version, and may also provide a common default vocabulary.---++-- Every module in GHC+--   * Is compiled with -XNoImplicitPrelude+--   * Explicitly imports GhcPrelude+ module GhcPrelude (module X) where  -- We export the 'Semigroup' class but w/o the (<>) operator to avoid
utils/GraphPpr.hs view
@@ -16,7 +16,7 @@ import UniqSet import UniqFM -import Data.List+import Data.List (mapAccumL) import Data.Maybe  
utils/IOEnv.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-} -- -- (c) The University of Glasgow 2002-2006 --@@ -51,7 +52,7 @@ ----------------------------------------------------------------------  -newtype IOEnv env a = IOEnv (env -> IO a)+newtype IOEnv env a = IOEnv (env -> IO a) deriving (Functor)  unIOEnv :: IOEnv env a -> (env -> IO a) unIOEnv (IOEnv m) = m@@ -70,9 +71,6 @@     pure = returnM     IOEnv f <*> IOEnv x = IOEnv (\ env -> f env <*> x env )     (*>) = thenM_--instance Functor (IOEnv m) where-    fmap f (IOEnv m) = IOEnv (\ env -> fmap f (m env))  returnM :: a -> IOEnv env a returnM a = IOEnv (\ _ -> return a)
utils/ListSetOps.hs view
@@ -28,7 +28,7 @@ import Outputable import Util -import Data.List+import qualified Data.List as L import qualified Data.List.NonEmpty as NE import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.Set as S@@ -40,7 +40,7 @@ deleteBys :: (a -> a -> Bool) -> [a] -> [a] -> [a] -- (deleteBys eq xs ys) returns xs-ys, using the given equality function -- Just like 'Data.List.delete' but with an equality function-deleteBys eq xs ys = foldl' (flip (deleteBy eq)) xs ys+deleteBys eq xs ys = foldl' (flip (L.deleteBy eq)) xs ys  {- ************************************************************************@@ -52,8 +52,17 @@ -}  -unionLists :: (Outputable a, Eq a) => [a] -> [a] -> [a]--- Assumes that the arguments contain no duplicates+-- | Assumes that the arguments contain no duplicates+unionLists :: (HasDebugCallStack, Outputable a, Eq a) => [a] -> [a] -> [a]+-- We special case some reasonable common patterns.+unionLists xs [] = xs+unionLists [] ys = ys+unionLists [x] ys+  | isIn "unionLists" x ys = ys+  | otherwise = x:ys+unionLists xs [y]+  | isIn "unionLists" y xs = xs+  | otherwise = y:xs unionLists xs ys   = WARN(lengthExceeds xs 100 || lengthExceeds ys 100, ppr xs $$ ppr ys)     [x | x <- xs, isn'tIn "unionLists" x ys] ++ ys@@ -144,7 +153,7 @@  equivClasses _   []      = [] equivClasses _   [stuff] = [stuff :| []]-equivClasses cmp items   = NE.groupBy eq (sortBy cmp items)+equivClasses cmp items   = NE.groupBy eq (L.sortBy cmp items)   where     eq a b = case cmp a b of { EQ -> True; _ -> False } @@ -157,7 +166,7 @@ removeDups _   []  = ([], []) removeDups _   [x] = ([x],[]) removeDups cmp xs-  = case (mapAccumR collect_dups [] (equivClasses cmp xs)) of { (dups, xs') ->+  = case L.mapAccumR collect_dups [] (equivClasses cmp xs) of { (dups, xs') ->     (xs', dups) }   where     collect_dups :: [NonEmpty a] -> NonEmpty a -> ([NonEmpty a], a)@@ -166,6 +175,6 @@  findDupsEq :: (a->a->Bool) -> [a] -> [NonEmpty a] findDupsEq _  [] = []-findDupsEq eq (x:xs) | null eq_xs  = findDupsEq eq xs-                     | otherwise   = (x :| eq_xs) : findDupsEq eq neq_xs-    where (eq_xs, neq_xs) = partition (eq x) xs+findDupsEq eq (x:xs) | L.null eq_xs  = findDupsEq eq xs+                     | otherwise     = (x :| eq_xs) : findDupsEq eq neq_xs+    where (eq_xs, neq_xs) = L.partition (eq x) xs
− utils/ListT.hs
@@ -1,80 +0,0 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE UndecidableInstances #-}-{-# LANGUAGE Rank2Types #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE MultiParamTypeClasses #-}------------------------------------------------------------------------------ |--- Module      : Control.Monad.Logic--- Copyright   : (c) Dan Doel--- License     : BSD3------ Maintainer  : dan.doel@gmail.com--- Stability   : experimental--- Portability : non-portable (multi-parameter type classes)------ A backtracking, logic programming monad.------    Adapted from the paper---    /Backtracking, Interleaving, and Terminating---        Monad Transformers/, by---    Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, Amr Sabry---    (<http://www.cs.rutgers.edu/~ccshan/logicprog/ListT-icfp2005.pdf>).----------------------------------------------------------------------------module ListT (-    ListT(..),-    runListT,-    select,-    fold-  ) where--import GhcPrelude--import Control.Applicative--import Control.Monad-import Control.Monad.Fail as MonadFail------------------------------------------------------------------------------ | A monad transformer for performing backtracking computations--- layered over another monad 'm'-newtype ListT m a =-    ListT { unListT :: forall r. (a -> m r -> m r) -> m r -> m r }--select :: Monad m => [a] -> ListT m a-select xs = foldr (<|>) mzero (map pure xs)--fold :: ListT m a -> (a -> m r -> m r) -> m r -> m r-fold = runListT------------------------------------------------------------------------------ | Runs a ListT computation with the specified initial success and--- failure continuations.-runListT :: ListT m a -> (a -> m r -> m r) -> m r -> m r-runListT = unListT--instance Functor (ListT f) where-    fmap f lt = ListT $ \sk fk -> unListT lt (sk . f) fk--instance Applicative (ListT f) where-    pure a = ListT $ \sk fk -> sk a fk-    f <*> a = ListT $ \sk fk -> unListT f (\g fk' -> unListT a (sk . g) fk') fk--instance Alternative (ListT f) where-    empty = ListT $ \_ fk -> fk-    f1 <|> f2 = ListT $ \sk fk -> unListT f1 sk (unListT f2 sk fk)--instance Monad (ListT m) where-    m >>= f = ListT $ \sk fk -> unListT m (\a fk' -> unListT (f a) sk fk') fk-#if !MIN_VERSION_base(4,13,0)-    fail = MonadFail.fail-#endif--instance MonadFail.MonadFail (ListT m) where-    fail _ = ListT $ \_ fk -> fk--instance MonadPlus (ListT m) where-    mzero = ListT $ \_ fk -> fk-    m1 `mplus` m2 = ListT $ \sk fk -> unListT m1 sk (unListT m2 sk fk)
utils/Maybes.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE FlexibleContexts #-} @@ -95,9 +96,7 @@ -}  data MaybeErr err val = Succeeded val | Failed err--instance Functor (MaybeErr err) where-  fmap = liftM+    deriving (Functor)  instance Applicative (MaybeErr err) where   pure  = Succeeded
utils/MonadUtils.hs view
@@ -8,8 +8,6 @@         , MonadFix(..)         , MonadIO(..) -        , liftIO1, liftIO2, liftIO3, liftIO4-         , zipWith3M, zipWith3M_, zipWith4M, zipWithAndUnzipM         , mapAndUnzipM, mapAndUnzip3M, mapAndUnzip4M, mapAndUnzip5M         , mapAccumLM@@ -34,59 +32,58 @@ import Control.Monad import Control.Monad.Fix import Control.Monad.IO.Class+import Data.Foldable (sequenceA_, foldlM, foldrM)+import Data.List (unzip4, unzip5, zipWith4)  ---------------------------------------------------------------------------------- Lift combinators+-- Common functions --  These are used throughout the compiler ------------------------------------------------------------------------------- --- | Lift an 'IO' operation with 1 argument into another monad-liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b-liftIO1 = (.) liftIO+{- --- | Lift an 'IO' operation with 2 arguments into another monad-liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c-liftIO2 = ((.).(.)) liftIO+Note [Inline @zipWithNM@ functions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- | Lift an 'IO' operation with 3 arguments into another monad-liftIO3 :: MonadIO m => (a -> b -> c -> IO d) -> a -> b -> c -> m d-liftIO3 = ((.).((.).(.))) liftIO+The inline principle for 'zipWith3M', 'zipWith4M' and 'zipWith3M_' is the same+as for 'zipWithM' and 'zipWithM_' in "Control.Monad", see+Note [Fusion for zipN/zipWithN] in GHC/List.hs for more details. --- | Lift an 'IO' operation with 4 arguments into another monad-liftIO4 :: MonadIO m => (a -> b -> c -> d -> IO e) -> a -> b -> c -> d -> m e-liftIO4 = (((.).(.)).((.).(.))) liftIO+The 'zipWithM'/'zipWithM_' functions are inlined so that the `zipWith` and+`sequenceA` functions with which they are defined have an opportunity to fuse. ----------------------------------------------------------------------------------- Common functions---  These are used throughout the compiler--------------------------------------------------------------------------------+Furthermore, 'zipWith3M'/'zipWith4M' and 'zipWith3M_' have been explicitly+rewritten in a non-recursive way similarly to 'zipWithM'/'zipWithM_', and for+more than just uniformity: after [D5241](https://phabricator.haskell.org/D5241)+for issue #14037, all @zipN@/@zipWithN@ functions fuse, meaning+'zipWith3M'/'zipWIth4M' and 'zipWith3M_'@ now behave like 'zipWithM' and+'zipWithM_', respectively, with regards to fusion. +As such, since there are not any differences between 2-ary 'zipWithM'/+'zipWithM_' and their n-ary counterparts below aside from the number of+arguments, the `INLINE` pragma should be replicated in the @zipWithNM@+functions below as well.++-}+ zipWith3M :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m [d]-zipWith3M _ []     _      _      = return []-zipWith3M _ _      []     _      = return []-zipWith3M _ _      _      []     = return []-zipWith3M f (x:xs) (y:ys) (z:zs)-  = do { r  <- f x y z-       ; rs <- zipWith3M f xs ys zs-       ; return $ r:rs-       }+{-# INLINE zipWith3M #-}+-- Inline so that fusion with 'zipWith3' and 'sequenceA' has a chance to fire.+-- See Note [Inline @zipWithNM@ functions] above.+zipWith3M f xs ys zs = sequenceA (zipWith3 f xs ys zs)  zipWith3M_ :: Monad m => (a -> b -> c -> m d) -> [a] -> [b] -> [c] -> m ()-zipWith3M_ f as bs cs = do { _ <- zipWith3M f as bs cs-                           ; return () }+{-# INLINE zipWith3M_ #-}+-- Inline so that fusion with 'zipWith4' and 'sequenceA' has a chance to fire.+-- See  Note [Inline @zipWithNM@ functions] above.+zipWith3M_ f xs ys zs = sequenceA_ (zipWith3 f xs ys zs)  zipWith4M :: Monad m => (a -> b -> c -> d -> m e)           -> [a] -> [b] -> [c] -> [d] -> m [e]-zipWith4M _ []     _      _      _      = return []-zipWith4M _ _      []     _      _      = return []-zipWith4M _ _      _      []     _      = return []-zipWith4M _ _      _      _      []     = return []-zipWith4M f (x:xs) (y:ys) (z:zs) (a:as)-  = do { r  <- f x y z a-       ; rs <- zipWith4M f xs ys zs as-       ; return $ r:rs-       }-+{-# INLINE zipWith4M #-}+-- Inline so that fusion with 'zipWith5' and 'sequenceA' has a chance to fire.+-- See  Note [Inline @zipWithNM@ functions] above.+zipWith4M f xs ys ws zs = sequenceA (zipWith4 f xs ys ws zs)  zipWithAndUnzipM :: Monad m                  => (a -> b -> m (c, d)) -> [a] -> [b] -> m ([c], [d])@@ -99,27 +96,47 @@        ; return (c:cs, d:ds) } zipWithAndUnzipM _ _ _ = return ([], []) +{-++Note [Inline @mapAndUnzipNM@ functions]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++The inline principle is the same as 'mapAndUnzipM' in "Control.Monad".+The 'mapAndUnzipM' function is inlined so that the `unzip` and `traverse`+functions with which it is defined have an opportunity to fuse, see+Note [Inline @unzipN@ functions] in Data/OldList.hs for more details.++Furthermore, the @mapAndUnzipNM@ functions have been explicitly rewritten in a+non-recursive way similarly to 'mapAndUnzipM', and for more than just+uniformity: after [D5249](https://phabricator.haskell.org/D5249) for Trac+ticket #14037, all @unzipN@ functions fuse, meaning 'mapAndUnzip3M',+'mapAndUnzip4M' and 'mapAndUnzip5M' now behave like 'mapAndUnzipM' with regards+to fusion.++As such, since there are not any differences between 2-ary 'mapAndUnzipM' and+its n-ary counterparts below aside from the number of arguments, the `INLINE`+pragma should be replicated in the @mapAndUnzipNM@ functions below as well.++-}+ -- | mapAndUnzipM for triples mapAndUnzip3M :: Monad m => (a -> m (b,c,d)) -> [a] -> m ([b],[c],[d])-mapAndUnzip3M _ []     = return ([],[],[])-mapAndUnzip3M f (x:xs) = do-    (r1,  r2,  r3)  <- f x-    (rs1, rs2, rs3) <- mapAndUnzip3M f xs-    return (r1:rs1, r2:rs2, r3:rs3)+{-# INLINE mapAndUnzip3M #-}+-- Inline so that fusion with 'unzip3' and 'traverse' has a chance to fire.+-- See Note [Inline @mapAndUnzipNM@ functions] above.+mapAndUnzip3M f xs =  unzip3 <$> traverse f xs  mapAndUnzip4M :: Monad m => (a -> m (b,c,d,e)) -> [a] -> m ([b],[c],[d],[e])-mapAndUnzip4M _ []     = return ([],[],[],[])-mapAndUnzip4M f (x:xs) = do-    (r1,  r2,  r3,  r4)  <- f x-    (rs1, rs2, rs3, rs4) <- mapAndUnzip4M f xs-    return (r1:rs1, r2:rs2, r3:rs3, r4:rs4)+{-# INLINE mapAndUnzip4M #-}+-- Inline so that fusion with 'unzip4' and 'traverse' has a chance to fire.+-- See Note [Inline @mapAndUnzipNM@ functions] above.+mapAndUnzip4M f xs =  unzip4 <$> traverse f xs  mapAndUnzip5M :: Monad m => (a -> m (b,c,d,e,f)) -> [a] -> m ([b],[c],[d],[e],[f])-mapAndUnzip5M _ [] = return ([],[],[],[],[])-mapAndUnzip5M f (x:xs) = do-    (r1, r2, r3, r4, r5)      <- f x-    (rs1, rs2, rs3, rs4, rs5) <- mapAndUnzip5M f xs-    return (r1:rs1, r2:rs2, r3:rs3, r4:rs4, r5:rs5)+{-# INLINE mapAndUnzip5M #-}+-- Inline so that fusion with 'unzip5' and 'traverse' has a chance to fire.+-- See Note [Inline @mapAndUnzipNM@ functions] above.+mapAndUnzip5M f xs =  unzip5 <$> traverse f xs  -- | Monadic version of mapAccumL mapAccumLM :: Monad m@@ -173,18 +190,9 @@ orM :: Monad m => m Bool -> m Bool -> m Bool orM m1 m2 = m1 >>= \x -> if x then return True else m2 --- | Monadic version of foldl-foldlM :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m a-foldlM = foldM- -- | Monadic version of foldl that discards its result-foldlM_ :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m ()+foldlM_ :: (Monad m, Foldable t) => (a -> b -> m a) -> a -> t b -> m () foldlM_ = foldM_---- | Monadic version of foldr-foldrM        :: (Monad m) => (b -> a -> m a) -> a -> [b] -> m a-foldrM _ z []     = return z-foldrM k z (x:xs) = do { r <- foldrM k z xs; k x r }  -- | Monadic version of fmap specialised for Maybe maybeMapM :: Monad m => (a -> m b) -> (Maybe a -> m (Maybe b))
utils/OrdList.hs view
@@ -8,14 +8,20 @@ Provide trees (of instructions), so that lists of instructions can be appended in linear time. -}+{-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE BangPatterns #-}+ module OrdList (         OrdList,         nilOL, isNilOL, unitOL, appOL, consOL, snocOL, concatOL, lastOL,-        mapOL, fromOL, toOL, foldrOL, foldlOL, reverseOL+        headOL,+        mapOL, fromOL, toOL, foldrOL, foldlOL, reverseOL, fromOLReverse,+        strictlyEqOL, strictlyOrdOL ) where  import GhcPrelude+import Data.Foldable  import Outputable @@ -33,6 +39,7 @@   | Snoc (OrdList a) a   | Two (OrdList a) -- Invariant: non-empty         (OrdList a) -- Invariant: non-empty+  deriving (Functor)  instance Outputable a => Outputable (OrdList a) where   ppr ol = ppr (fromOL ol)  -- Convert to list and print that@@ -45,11 +52,12 @@   mappend = (Semigroup.<>)   mconcat = concatOL -instance Functor OrdList where-  fmap = mapOL- instance Foldable OrdList where-  foldr = foldrOL+  foldr   = foldrOL+  foldl'  = foldlOL+  toList  = fromOL+  null    = isNilOL+  length  = lengthOL  instance Traversable OrdList where   traverse f xs = toOL <$> traverse f (fromOL xs)@@ -62,7 +70,9 @@ consOL   :: a           -> OrdList a -> OrdList a appOL    :: OrdList a   -> OrdList a -> OrdList a concatOL :: [OrdList a] -> OrdList a+headOL   :: OrdList a   -> a lastOL   :: OrdList a   -> a+lengthOL :: OrdList a   -> Int  nilOL        = None unitOL as    = One as@@ -70,6 +80,13 @@ consOL a    bs   = Cons a bs concatOL aas = foldr appOL None aas +headOL None        = panic "headOL"+headOL (One a)     = a+headOL (Many as)   = head as+headOL (Cons a _)  = a+headOL (Snoc as _) = headOL as+headOL (Two as _)  = headOL as+ lastOL None        = panic "lastOL" lastOL (One a)     = a lastOL (Many as)   = last as@@ -77,6 +94,13 @@ lastOL (Snoc _ a)  = a lastOL (Two _ as)  = lastOL as +lengthOL None        = 0+lengthOL (One _)     = 1+lengthOL (Many as)   = length as+lengthOL (Cons _ as) = 1 + length as+lengthOL (Snoc as _) = 1 + length as+lengthOL (Two as bs) = length as + length bs+ isNilOL None = True isNilOL _    = False @@ -95,13 +119,19 @@         go (Two a b)  acc = go a (go b acc)         go (Many xs)  acc = xs ++ acc +fromOLReverse :: OrdList a -> [a]+fromOLReverse a = go a []+        -- acc is already in reverse order+  where go :: OrdList a -> [a] -> [a]+        go None       acc = acc+        go (One a)    acc = a : acc+        go (Cons a b) acc = go b (a : acc)+        go (Snoc a b) acc = b : go a acc+        go (Two a b)  acc = go b (go a acc)+        go (Many xs)  acc = reverse xs ++ acc+ mapOL :: (a -> b) -> OrdList a -> OrdList b-mapOL _ None = None-mapOL f (One x) = One (f x)-mapOL f (Cons x xs) = Cons (f x) (mapOL f xs)-mapOL f (Snoc xs x) = Snoc (mapOL f xs) (f x)-mapOL f (Two x y) = Two (mapOL f x) (mapOL f y)-mapOL f (Many xs) = Many (map f xs)+mapOL = fmap  foldrOL :: (a->b->b) -> b -> OrdList a -> b foldrOL _ z None        = z@@ -111,13 +141,14 @@ foldrOL k z (Two b1 b2) = foldrOL k (foldrOL k z b2) b1 foldrOL k z (Many xs)   = foldr k z xs +-- | Strict left fold. foldlOL :: (b->a->b) -> b -> OrdList a -> b foldlOL _ z None        = z foldlOL k z (One x)     = k z x-foldlOL k z (Cons x xs) = foldlOL k (k z x) xs-foldlOL k z (Snoc xs x) = k (foldlOL k z xs) x-foldlOL k z (Two b1 b2) = foldlOL k (foldlOL k z b1) b2-foldlOL k z (Many xs)   = foldl k z xs+foldlOL k z (Cons x xs) = let !z' = (k z x) in foldlOL k z' xs+foldlOL k z (Snoc xs x) = let !z' = (foldlOL k z xs) in k z' x+foldlOL k z (Two b1 b2) = let !z' = (foldlOL k z b1) in foldlOL k z' b2+foldlOL k z (Many xs)   = foldl' k z xs  toOL :: [a] -> OrdList a toOL [] = None@@ -131,3 +162,33 @@ reverseOL (Snoc a b) = Cons b (reverseOL a) reverseOL (Two a b)  = Two (reverseOL b) (reverseOL a) reverseOL (Many xs)  = Many (reverse xs)++-- | Compare not only the values but also the structure of two lists+strictlyEqOL :: Eq a => OrdList a   -> OrdList a -> Bool+strictlyEqOL None         None       = True+strictlyEqOL (One x)     (One y)     = x == y+strictlyEqOL (Cons a as) (Cons b bs) = a == b && as `strictlyEqOL` bs+strictlyEqOL (Snoc as a) (Snoc bs b) = a == b && as `strictlyEqOL` bs+strictlyEqOL (Two a1 a2) (Two b1 b2) = a1 `strictlyEqOL` b1 && a2 `strictlyEqOL` b2+strictlyEqOL (Many as)   (Many bs)   = as == bs+strictlyEqOL _            _          = False++-- | Compare not only the values but also the structure of two lists+strictlyOrdOL :: Ord a => OrdList a   -> OrdList a -> Ordering+strictlyOrdOL None         None       = EQ+strictlyOrdOL None         _          = LT+strictlyOrdOL (One x)     (One y)     = compare x y+strictlyOrdOL (One _)      _          = LT+strictlyOrdOL (Cons a as) (Cons b bs) =+  compare a b `mappend` strictlyOrdOL as bs+strictlyOrdOL (Cons _ _)   _          = LT+strictlyOrdOL (Snoc as a) (Snoc bs b) =+  compare a b `mappend` strictlyOrdOL as bs+strictlyOrdOL (Snoc _ _)   _          = LT+strictlyOrdOL (Two a1 a2) (Two b1 b2) =+  (strictlyOrdOL a1 b1) `mappend` (strictlyOrdOL a2 b2)+strictlyOrdOL (Two _ _)    _          = LT+strictlyOrdOL (Many as)   (Many bs)   = compare as bs+strictlyOrdOL (Many _ )   _           = GT++
utils/Outputable.hs view
@@ -56,7 +56,7 @@          pprPrimChar, pprPrimInt, pprPrimWord, pprPrimInt64, pprPrimWord64, -        pprFastFilePath,+        pprFastFilePath, pprFilePathString,          -- * Controlling the style in which output is printed         BindingSite(..),@@ -81,8 +81,8 @@          -- * Error handling and debugging utilities         pprPanic, pprSorry, assertPprPanic, pprPgmError,-        pprTrace, pprTraceDebug, pprTraceIt, warnPprTrace, pprSTrace,-        pprTraceException, pprTraceM,+        pprTrace, pprTraceDebug, pprTraceWith, pprTraceIt, warnPprTrace,+        pprSTrace, pprTraceException, pprTraceM,         trace, pgmError, panic, sorry, assertPanic,         pprDebugAndThen, callStackDoc,     ) where@@ -101,7 +101,7 @@ import FastString import qualified Pretty import Util-import Platform+import GHC.Platform import qualified PprColour as Col import Pretty           ( Doc, Mode(..) ) import Panic@@ -327,6 +327,10 @@ instance IsString SDoc where   fromString = text +-- The lazy programmer's friend.+instance Outputable SDoc where+  ppr = id+ initSDocContext :: DynFlags -> PprStyle -> SDocContext initSDocContext dflags sty = SDC   { sdocStyle = sty@@ -609,8 +613,8 @@       else SDoc $ \sty ->            let pp_d = runSDoc d sty                str  = show pp_d-           in case (str, snocView str) of-             (_, Just (_, '\'')) -> pp_d+           in case (str, lastMaybe str) of+             (_, Just '\'') -> pp_d              ('\'' : _, _)       -> pp_d              _other              -> Pretty.quotes pp_d @@ -809,6 +813,12 @@ instance Outputable Word where     ppr n = integer $ fromIntegral n +instance Outputable Float where+    ppr f = float f++instance Outputable Double where+    ppr f = double f+ instance Outputable () where     ppr _ = text "()" @@ -999,6 +1009,16 @@ pprFastFilePath :: FastString -> SDoc pprFastFilePath path = text $ normalise $ unpackFS path +-- | Normalise, escape and render a string representing a path+--+-- e.g. "c:\\whatever"+pprFilePathString :: FilePath -> SDoc+pprFilePathString path = doubleQuotes $ text (escape (normalise path))+   where+      escape []        = []+      escape ('\\':xs) = '\\':'\\':escape xs+      escape (x:xs)    = x:escape xs+ {- ************************************************************************ *                                                                      *@@ -1182,9 +1202,15 @@ pprTraceM :: Applicative f => String -> SDoc -> f () pprTraceM str doc = pprTrace str doc (pure ()) +-- | @pprTraceWith desc f x@ is equivalent to @pprTrace desc (f x) x@.+-- This allows you to print details from the returned value as well as from+-- ambient variables.+pprTraceWith :: String -> (a -> SDoc) -> a -> a+pprTraceWith desc f x = pprTrace desc (f x) x+ -- | @pprTraceIt desc x@ is equivalent to @pprTrace desc (ppr x) x@ pprTraceIt :: Outputable a => String -> a -> a-pprTraceIt desc x = pprTrace desc (ppr x) x+pprTraceIt desc x = pprTraceWith desc ppr x  -- | @pprTraceException desc x action@ runs action, printing a message -- if it throws an exception.@@ -1199,7 +1225,7 @@ pprSTrace :: HasCallStack => SDoc -> a -> a pprSTrace doc = pprTrace "" (doc $$ callStackDoc) -warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a+warnPprTrace :: HasCallStack => Bool -> String -> Int -> SDoc -> a -> a -- ^ Just warn about an assertion failure, recording the given file and line number. -- Should typically be accessed with the WARN macros warnPprTrace _     _     _     _    x | not debugIsOn     = x@@ -1207,7 +1233,9 @@    | hasNoDebugOutput unsafeGlobalDynFlags = x warnPprTrace False _file _line _msg x = x warnPprTrace True   file  line  msg x-  = pprDebugAndThen unsafeGlobalDynFlags trace heading msg x+  = pprDebugAndThen unsafeGlobalDynFlags trace heading+                    (msg $$ callStackDoc )+                    x   where     heading = hsep [text "WARNING: file", text file <> comma, text "line", int line] 
utils/Outputable.hs-boot view
@@ -1,11 +1,12 @@ module Outputable where  import GhcPrelude+import GHC.Stack( HasCallStack )  data SDoc  showSDocUnsafe :: SDoc -> String -warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a+warnPprTrace :: HasCallStack => Bool -> String -> Int -> SDoc -> a -> a  text :: String -> SDoc
utils/Pair.hs view
@@ -4,6 +4,7 @@ -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveFunctor #-}  module Pair ( Pair(..), unPair, toPair, swap, pLiftFst, pLiftSnd ) where @@ -15,14 +16,13 @@ import qualified Data.Semigroup as Semi  data Pair a = Pair { pFst :: a, pSnd :: a }+  deriving (Functor) -- Note that Pair is a *unary* type constructor -- whereas (,) is binary  -- The important thing about Pair is that it has a *homogeneous* -- Functor instance, so you can easily apply the same function -- to both components-instance Functor Pair where-  fmap f (Pair x y) = Pair (f x) (f y)  instance Applicative Pair where   pure x = Pair x x
utils/PlainPanic.hs view
@@ -93,18 +93,17 @@     PlainSorry s -> sorryMsg (showString s)     PlainInstallationError str -> showString str     PlainProgramError str -> showString str-   where     sorryMsg :: ShowS -> ShowS     sorryMsg s =         showString "sorry! (unimplemented feature or known bug)\n"-      . showString ("  (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t")+      . showString ("  (GHC version " ++ cProjectVersion ++ ":\n\t")       . s . showString "\n"      panicMsg :: ShowS -> ShowS     panicMsg s =         showString "panic! (the 'impossible' happened)\n"-      . showString ("  (GHC version " ++ cProjectVersion ++ " for " ++ TargetPlatform_NAME ++ "):\n\t")+      . showString ("  (GHC version " ++ cProjectVersion ++ ":\n\t")       . s . showString "\n\n"       . showString "Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug\n" 
− utils/Platform.hs
@@ -1,162 +0,0 @@---- | A description of the platform we're compiling for.----module Platform (-        Platform(..),-        Arch(..),-        OS(..),-        ArmISA(..),-        ArmISAExt(..),-        ArmABI(..),-        PPC_64ABI(..),--        target32Bit,-        isARM,-        osElfTarget,-        osMachOTarget,-        osSubsectionsViaSymbols,-        platformUsesFrameworks,-)--where--import GhcPrelude---- | Contains enough information for the native code generator to emit---      code for this platform.-data Platform-        = Platform {-              platformArch                     :: Arch,-              platformOS                       :: OS,-              -- Word size in bytes (i.e. normally 4 or 8,-              -- for 32bit and 64bit platforms respectively)-              platformWordSize                 :: {-# UNPACK #-} !Int,-              platformUnregisterised           :: Bool,-              platformHasGnuNonexecStack       :: Bool,-              platformHasIdentDirective        :: Bool,-              platformHasSubsectionsViaSymbols :: Bool,-              platformIsCrossCompiling         :: Bool-          }-        deriving (Read, Show, Eq)----- | Architectures that the native code generator knows about.---      TODO: It might be nice to extend these constructors with information---      about what instruction set extensions an architecture might support.----data Arch-        = ArchUnknown-        | ArchX86-        | ArchX86_64-        | ArchPPC-        | ArchPPC_64-          { ppc_64ABI :: PPC_64ABI-          }-        | ArchSPARC-        | ArchSPARC64-        | ArchARM-          { armISA    :: ArmISA-          , armISAExt :: [ArmISAExt]-          , armABI    :: ArmABI-          }-        | ArchARM64-        | ArchAlpha-        | ArchMipseb-        | ArchMipsel-        | ArchJavaScript-        deriving (Read, Show, Eq)--isARM :: Arch -> Bool-isARM (ArchARM {}) = True-isARM ArchARM64    = True-isARM _ = False---- | Operating systems that the native code generator knows about.---      Having OSUnknown should produce a sensible default, but no promises.-data OS-        = OSUnknown-        | OSLinux-        | OSDarwin-        | OSSolaris2-        | OSMinGW32-        | OSFreeBSD-        | OSDragonFly-        | OSOpenBSD-        | OSNetBSD-        | OSKFreeBSD-        | OSHaiku-        | OSQNXNTO-        | OSAIX-        | OSHurd-        deriving (Read, Show, Eq)---- | ARM Instruction Set Architecture, Extensions and ABI----data ArmISA-    = ARMv5-    | ARMv6-    | ARMv7-    deriving (Read, Show, Eq)--data ArmISAExt-    = VFPv2-    | VFPv3-    | VFPv3D16-    | NEON-    | IWMMX2-    deriving (Read, Show, Eq)--data ArmABI-    = SOFT-    | SOFTFP-    | HARD-    deriving (Read, Show, Eq)---- | PowerPC 64-bit ABI----data PPC_64ABI-    = ELF_V1-    | ELF_V2-    deriving (Read, Show, Eq)---- | This predicate tells us whether the platform is 32-bit.-target32Bit :: Platform -> Bool-target32Bit p = platformWordSize p == 4---- | This predicate tells us whether the OS supports ELF-like shared libraries.-osElfTarget :: OS -> Bool-osElfTarget OSLinux     = True-osElfTarget OSFreeBSD   = True-osElfTarget OSDragonFly = True-osElfTarget OSOpenBSD   = True-osElfTarget OSNetBSD    = True-osElfTarget OSSolaris2  = True-osElfTarget OSDarwin    = False-osElfTarget OSMinGW32   = False-osElfTarget OSKFreeBSD  = True-osElfTarget OSHaiku     = True-osElfTarget OSQNXNTO    = False-osElfTarget OSAIX       = False-osElfTarget OSHurd      = True-osElfTarget OSUnknown   = False- -- Defaulting to False is safe; it means don't rely on any- -- ELF-specific functionality.  It is important to have a default for- -- portability, otherwise we have to answer this question for every- -- new platform we compile on (even unreg).---- | This predicate tells us whether the OS support Mach-O shared libraries.-osMachOTarget :: OS -> Bool-osMachOTarget OSDarwin = True-osMachOTarget _ = False--osUsesFrameworks :: OS -> Bool-osUsesFrameworks OSDarwin = True-osUsesFrameworks _        = False--platformUsesFrameworks :: Platform -> Bool-platformUsesFrameworks = osUsesFrameworks . platformOS--osSubsectionsViaSymbols :: OS -> Bool-osSubsectionsViaSymbols OSDarwin = True-osSubsectionsViaSymbols _        = False-
utils/Pretty.hs view
@@ -32,7 +32,7 @@  * `compiler/utils/Pretty.hs` (this module). It is used by GHC only.  There is an ongoing effort in https://github.com/haskell/pretty/issues/1 and-https://ghc.haskell.org/trac/ghc/ticket/10735 to try to get rid of GHC's copy+https://gitlab.haskell.org/ghc/ghc/issues/10735 to try to get rid of GHC's copy of Pretty.  Currently, GHC's copy of Pretty resembles pretty-1.1.2.0, with the following@@ -432,7 +432,7 @@  Relevant discussions:  * Phabricator: https://phabricator.haskell.org/D4465- * GHC Trac: https://ghc.haskell.org/trac/ghc/ticket/14872+ * GHC Trac: https://gitlab.haskell.org/ghc/ghc/issues/14872  There is a flag `-dword-hex-literals` that causes literals of type `Word#` or `Word64#` to be displayed in hexadecimal instead
utils/State.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE UnboxedTuples #-}  module State where@@ -5,10 +6,7 @@ import GhcPrelude  newtype State s a = State { runState' :: s -> (# a, s #) }--instance Functor (State s) where-    fmap f m  = State $ \s -> case runState' m s of-                              (# r, s' #) -> (# f r, s' #)+    deriving (Functor)  instance Applicative (State s) where    pure x   = State $ \s -> (# x, s #)
utils/Stream.hs view
@@ -7,8 +7,8 @@ -- ----------------------------------------------------------------------------- module Stream (     Stream(..), yield, liftIO,-    collect, fromList,-    Stream.map, Stream.mapM, Stream.mapAccumL+    collect, collect_, consume, fromList,+    Stream.map, Stream.mapM, Stream.mapAccumL, Stream.mapAccumL_   ) where  import GhcPrelude@@ -71,6 +71,25 @@       Left () -> return (reverse acc)       Right (a, str') -> go str' (a:acc) +-- | Turn a Stream into an ordinary list, by demanding all the elements.+collect_ :: Monad m => Stream m a r -> m ([a], r)+collect_ str = go str []+ where+  go str acc = do+    r <- runStream str+    case r of+      Left r -> return (reverse acc, r)+      Right (a, str') -> go str' (a:acc)++consume :: Monad m => Stream m a b -> (a -> m ()) -> m b+consume str f = do+    r <- runStream str+    case r of+      Left ret -> return ret+      Right (a, str') -> do+        f a+        consume str' f+ -- | Turn a list into a 'Stream', by yielding each element in turn. fromList :: Monad m => [a] -> Stream m a () fromList = mapM_ yield@@ -104,3 +123,13 @@     Right (a, str') -> do       (c',b) <- f c a       return (Right (b, mapAccumL f c' str'))++mapAccumL_ :: Monad m => (c -> a -> m (c,b)) -> c -> Stream m a r+           -> Stream m b (c, r)+mapAccumL_ f c str = Stream $ do+  r <- runStream str+  case r of+    Left  r -> return (Left (c, r))+    Right (a, str') -> do+      (c',b) <- f c a+      return (Right (b, mapAccumL_ f c' str'))
utils/UniqDFM.hs view
@@ -17,6 +17,7 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TupleSections #-} {-# OPTIONS_GHC -Wall #-}  module UniqDFM (@@ -116,7 +117,7 @@   TaggedVal     val     {-# UNPACK #-} !Int -- ^ insertion time-  deriving Data+  deriving (Data, Functor)  taggedFst :: TaggedVal val -> val taggedFst (TaggedVal v _) = v@@ -127,9 +128,6 @@ instance Eq val => Eq (TaggedVal val) where   (TaggedVal v1 _) == (TaggedVal v2 _) = v1 == v2 -instance Functor TaggedVal where-  fmap f (TaggedVal val i) = TaggedVal (f val) i- -- | Type of unique deterministic finite maps data UniqDFM ele =   UDFM@@ -140,6 +138,16 @@     {-# UNPACK #-} !Int         -- Upper bound on the values' insertion                                 -- time. See Note [Overflow on plusUDFM]   deriving (Data, Functor)++-- | Deterministic, in O(n log n).+instance Foldable UniqDFM where+  foldr = foldUDFM++-- | Deterministic, in O(n log n).+instance Traversable UniqDFM where+  traverse f = fmap listToUDFM_Directly+             . traverse (\(u,a) -> (u,) <$> f a)+             . udfmToList  emptyUDFM :: UniqDFM elt emptyUDFM = UDFM M.empty 0
utils/UniqFM.hs view
@@ -26,7 +26,8 @@  module UniqFM (         -- * Unique-keyed mappings-        UniqFM,       -- abstract type+        UniqFM,           -- abstract type+        NonDetUniqFM(..), -- wrapper for opting into nondeterminism          -- ** Manipulating those mappings         emptyUFM,@@ -84,9 +85,8 @@  newtype UniqFM ele = UFM (M.IntMap ele)   deriving (Data, Eq, Functor)-  -- We used to derive Traversable and Foldable, but they were nondeterministic-  -- and not obvious at the call site. You can use explicit nonDetEltsUFM-  -- and fold a list if needed.+  -- Nondeterministic Foldable and Traversable instances are accessible through+  -- use of the 'NonDetUniqFM' wrapper.   -- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism.  emptyUFM :: UniqFM elt@@ -332,6 +332,29 @@ -- nondeterminism. nonDetUFMToList :: UniqFM elt -> [(Unique, elt)] nonDetUFMToList (UFM m) = map (\(k, v) -> (getUnique k, v)) $ M.toList m++-- | A wrapper around 'UniqFM' with the sole purpose of informing call sites+-- that the provided 'Foldable' and 'Traversable' instances are+-- nondeterministic.+-- If you use this please provide a justification why it doesn't introduce+-- nondeterminism.+-- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism.+newtype NonDetUniqFM ele = NonDetUniqFM { getNonDet :: UniqFM ele }+  deriving (Functor)++-- | Inherently nondeterministic.+-- If you use this please provide a justification why it doesn't introduce+-- nondeterminism.+-- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism.+instance Foldable NonDetUniqFM where+  foldr f z (NonDetUniqFM (UFM m)) = foldr f z m++-- | Inherently nondeterministic.+-- If you use this please provide a justification why it doesn't introduce+-- nondeterminism.+-- See Note [Deterministic UniqFM] in UniqDFM to learn about determinism.+instance Traversable NonDetUniqFM where+  traverse f (NonDetUniqFM (UFM m)) = NonDetUniqFM . UFM <$> traverse f m  ufmToIntMap :: UniqFM elt -> M.IntMap elt ufmToIntMap (UFM m) = m
utils/Util.hs view
@@ -10,10 +10,13 @@ -- module Util (         -- * Flags dependent on the compiler build-        ghciSupported, debugIsOn, ncgDebugIsOn,+        ghciSupported, debugIsOn,         ghciTablesNextToCode,         isWindowsHost, isDarwinHost, +        -- * Miscellaneous higher-order functions+        applyWhen, nTimes,+         -- * General list processing         zipEqual, zipWithEqual, zipWith3Equal, zipWith4Equal,         zipLazy, stretchZipWith, zipWithAndUnzip, zipAndUnzip,@@ -26,9 +29,9 @@          mapFst, mapSnd, chkAppend,         mapAndUnzip, mapAndUnzip3, mapAccumL2,-        nOfThem, filterOut, partitionWith,+        filterOut, partitionWith, -        dropWhileEndLE, spanEnd, last2,+        dropWhileEndLE, spanEnd, last2, lastMaybe,          foldl1', foldl2, count, countWhile, all2, @@ -46,6 +49,8 @@          changeLast, +        whenNonEmpty,+         -- * Tuples         fstOf3, sndOf3, thdOf3,         firstM, first3M, secondM,@@ -57,9 +62,6 @@         takeList, dropList, splitAtList, split,         dropTail, capitalise, -        -- * For loop-        nTimes,-         -- * Sorting         sortWith, minWith, nubSort, ordNub, @@ -92,13 +94,11 @@         readRational,         readHexRational, -        -- * read helpers-        maybeRead, maybeReadFuzzy,-         -- * IO-ish utilities         doesDirNameExist,         getModificationUTCTime,         modificationTimeIfExists,+        withAtomicRename,          global, consIORef, globalM,         sharedGlobal, sharedGlobalM,@@ -139,15 +139,17 @@ import Data.IORef       ( IORef, newIORef, atomicModifyIORef' ) import System.IO.Unsafe ( unsafePerformIO ) import Data.List        hiding (group)+import Data.List.NonEmpty  ( NonEmpty(..) )  import GHC.Exts import GHC.Stack (HasCallStack)  import Control.Applicative ( liftA2 ) import Control.Monad    ( liftM, guard )+import Control.Monad.IO.Class ( MonadIO, liftIO ) import GHC.Conc.Sync ( sharedCAF ) import System.IO.Error as IO ( isDoesNotExistError )-import System.Directory ( doesDirectoryExist, getModificationTime )+import System.Directory ( doesDirectoryExist, getModificationTime, renameFile ) import System.FilePath  import Data.Char        ( isUpper, isAlphaNum, isSpace, chr, ord, isDigit, toUpper@@ -186,7 +188,7 @@ -}  ghciSupported :: Bool-#if defined(GHCI)+#if defined(HAVE_INTERNAL_INTERPRETER) ghciSupported = True #else ghciSupported = False@@ -199,13 +201,6 @@ debugIsOn = False #endif -ncgDebugIsOn :: Bool-#if defined(NCG_DEBUG)-ncgDebugIsOn = True-#else-ncgDebugIsOn = False-#endif- ghciTablesNextToCode :: Bool #if defined(GHCI_TABLES_NEXT_TO_CODE) ghciTablesNextToCode = True@@ -230,12 +225,17 @@ {- ************************************************************************ *                                                                      *-\subsection{A for loop}+\subsection{Miscellaneous higher-order functions} *                                                                      * ************************************************************************ -} --- | Compose a function with itself n times.  (nth rather than twice)+-- | Apply a function iff some condition is met.+applyWhen :: Bool -> (a -> a) -> a -> a+applyWhen True f x = f x+applyWhen _    _ x = x++-- | A for loop: Compose a function with itself n times.  (nth rather than twice) nTimes :: Int -> (a -> a) -> (a -> a) nTimes 0 _ = id nTimes 1 f = f@@ -390,7 +390,7 @@ -- to 'True' go to the left; elements corresponding to 'False' go to the right. -- For example, @partitionByList [True, False, True] [1,2,3] == ([1,3], [2])@ -- This function does not check whether the lists have equal--- length.+-- length; when one list runs out, the function stops. partitionByList :: [Bool] -> [a] -> ([a], [a]) partitionByList = go [] []   where@@ -456,9 +456,6 @@                                                        (s1', s2', y) -> ((s1', s2'), y))                                      (s1, s2) xs -nOfThem :: Int -> a -> [a]-nOfThem n thing = replicate n thing- -- | @atLength atLen atEnd ls n@ unravels list @ls@ to position @n@. Precisely: -- -- @@@ -580,7 +577,7 @@  isIn, isn'tIn :: Eq a => String -> a -> [a] -> Bool -# ifndef DEBUG+# if !defined(DEBUG) isIn    _msg x ys = x `elem` ys isn'tIn _msg x ys = x `notElem` ys @@ -616,6 +613,10 @@ changeLast [_]    x  = [x] changeLast (x:xs) x' = x : changeLast xs x' +whenNonEmpty :: Applicative m => [a] -> (NonEmpty a -> m ()) -> m ()+whenNonEmpty []     _ = pure ()+whenNonEmpty (x:xs) f = f (x :| xs)+ {- ************************************************************************ *                                                                      *@@ -773,15 +774,29 @@   where     partialError = panic "last2 - list length less than two" +lastMaybe :: [a] -> Maybe a+lastMaybe [] = Nothing+lastMaybe xs = Just $ last xs++-- | Split a list into its last element and the initial part of the list.+-- @snocView xs = Just (init xs, last xs)@ for non-empty lists.+-- @snocView xs = Nothing@ otherwise.+-- Unless both parts of the result are guaranteed to be used+-- prefer separate calls to @last@ + @init@.+-- If you are guaranteed to use both, this will+-- be more efficient. snocView :: [a] -> Maybe ([a],a)-        -- Split off the last element snocView [] = Nothing-snocView xs = go [] xs-            where-                -- Invariant: second arg is non-empty-              go acc [x]    = Just (reverse acc, x)-              go acc (x:xs) = go (x:acc) xs-              go _   []     = panic "Util: snocView"+snocView xs+    | (xs,x) <- go xs+    = Just (xs,x)+  where+    go :: [a] -> ([a],a)+    go [x] = ([],x)+    go (x:xs)+        | !(xs',x') <- go xs+        = (x:xs', x')+    go [] = error "impossible"  split :: Char -> String -> [String] split c s = case rest of@@ -1113,23 +1128,16 @@ ----------------------------------------------------------------------------- -- Integers --- This algorithm for determining the $\log_2$ of exact powers of 2 comes--- from GCC.  It requires bit manipulation primitives, and we use GHC--- extensions.  Tough.-+-- | Determine the $\log_2$ of exact powers of 2 exactLog2 :: Integer -> Maybe Integer exactLog2 x-  = if (x <= 0 || x >= 2147483648) then-       Nothing-    else-       if (x .&. (-x)) /= x then-          Nothing-       else-          Just (pow2 x)-  where-    pow2 x | x == 1 = 0-           | otherwise = 1 + pow2 (x `shiftR` 1)-+   | x <= 0                               = Nothing+   | x > fromIntegral (maxBound :: Int32) = Nothing+   | x' .&. (-x') /= x'                   = Nothing+   | otherwise                            = Just (fromIntegral c)+      where+         x' = fromIntegral x :: Int32+         c = countTrailingZeros x'  {- -- -----------------------------------------------------------------------------@@ -1242,26 +1250,7 @@  readHexRational__ _ = Nothing --- -------------------------------------------------------------------------------- read helpers--maybeRead :: Read a => String -> Maybe a-maybeRead str = case reads str of-                [(x, "")] -> Just x-                _         -> Nothing--maybeReadFuzzy :: Read a => String -> Maybe a-maybeReadFuzzy str = case reads str of-                     [(x, s)]-                      | all isSpace s ->-                         Just x-                     _ ->-                         Nothing------------------------------------------------------------------------------- -- Verify that the 'dirname' portion of a FilePath exists. -- doesDirNameExist :: FilePath -> IO Bool@@ -1282,6 +1271,38 @@         `catchIO` \e -> if isDoesNotExistError e                         then return Nothing                         else ioError e++-- --------------------------------------------------------------+-- atomic file writing by writing to a temporary file first (see #14533)+--+-- This should be used in all cases where GHC writes files to disk+-- and uses their modification time to skip work later,+-- as otherwise a partially written file (e.g. due to crash or Ctrl+C)+-- also results in a skip.++withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a+withAtomicRename targetFile f+  | enableAtomicRename = do+  -- The temp file must be on the same file system (mount) as the target file+  -- to result in an atomic move on most platforms.+  -- The standard way to ensure that is to place it into the same directory.+  -- This can still be fooled when somebody mounts a different file system+  -- at just the right time, but that is not a case we aim to cover here.+  let temp = targetFile <.> "tmp"+  res <- f temp+  liftIO $ renameFile temp targetFile+  return res++  | otherwise = f targetFile+  where+    -- As described in #16450, enabling this causes spurious build failures due+    -- to apparently missing files.+    enableAtomicRename :: Bool+#if defined(mingw32_BUILD_OS)+    enableAtomicRename = False+#else+    enableAtomicRename = True+#endif  -- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True,
− utils/md5.h
@@ -1,18 +0,0 @@-/* MD5 message digest */-#pragma once--#include "HsFFI.h"--typedef HsWord32 word32;-typedef HsWord8  byte;--struct MD5Context {-        word32 buf[4];-        word32 bytes[2];-        word32 in[16];-};--void MD5Init(struct MD5Context *context);-void MD5Update(struct MD5Context *context, byte const *buf, int len);-void MD5Final(byte digest[16], struct MD5Context *context);-void MD5Transform(word32 buf[4], word32 const in[16]);